var e=Object.defineProperty,t=(t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})},n={};t(n,{languages:()=>M,options:()=>N,parsers:()=>P,printers:()=>At});var r=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),i=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},a=r(`replaceAll`,function(){if(typeof this==`string`)return i}),o=()=>{},s=`indent`,c=`group`,l=`if-break`,u=`line`,d=`break-parent`,f=o,p=o;function m(e){return f(e),{type:s,contents:e}}var ee={type:d};function h(e,t={}){return f(e),p(t.expandedStates,!0),{type:c,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function g(e,t=``,n={}){return f(e),t!==``&&f(t),{type:l,breakContents:e,flatContents:t,groupId:n.groupId}}function _(e,t){f(e),p(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var v={type:u},y={type:u,soft:!0},b=[{type:u,hard:!0},ee];function x(e){return(t,n,r)=>{let i=!!r?.backwards;if(n===!1)return!1;let{length:a}=t,o=n;for(;o>=0&&o<a;){let n=t.charAt(o);if(e instanceof RegExp){if(!e.test(n))return o}else if(!e.includes(n))return o;i?o--:o++}return o===-1||o===a?o:!1}}var S=x(` 	`),te=x(`,; 	`),ne=x(/[^\n\r]/u),C=e=>e===`
`||e===`\r`||e===`\u2028`||e===`\u2029`;function re(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
`)return t-2;if(C(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
`)return t+2;if(C(i))return t+1}return t}var w=re;function ie(e,t,n={}){let r=S(e,n.backwards?t-1:t,n);return r!==w(e,r,n)}var ae=ie;function oe(e,t){if(t===!1)return!1;if(e.charAt(t)===`/`&&e.charAt(t+1)===`*`){for(let n=t+2;n<e.length;++n)if(e.charAt(n)===`*`&&e.charAt(n+1)===`/`)return n+2}return t}var se=oe;function ce(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?ne(e,t):t}var le=ce;function ue(e,t){let n=null,r=t;for(;r!==n;)n=r,r=te(e,r),r=se(e,r),r=S(e,r);return r=le(e,r),r=w(e,r),r!==!1&&ae(e,r)}var de=ue;function fe(e){return Array.isArray(e)&&e.length>0}var pe=fe,me=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},T=null;function E(e){if(T!==null&&typeof T.property){let e=T;return T=E.prototype=null,e}return T=E.prototype=e??Object.create(null),new E}var he=10;for(let e=0;e<=he;e++)E();function ge(e){return E(e)}function _e(e,t=`type`){ge(e);function n(n){let r=n[t],i=e[r];if(!Array.isArray(i))throw Object.assign(Error(`Missing visitor keys for '${r}'.`),{node:n});return i}return n}var ve=_e,ye=class{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return`Location`}toJSON(){return{start:this.start,end:this.end}}},be=class{constructor(e,t,n,r,i,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return`Token`}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},xe={Name:[],Document:[`definitions`],OperationDefinition:[`description`,`name`,`variableDefinitions`,`directives`,`selectionSet`],VariableDefinition:[`description`,`variable`,`type`,`defaultValue`,`directives`],Variable:[`name`],SelectionSet:[`selections`],Field:[`alias`,`name`,`arguments`,`directives`,`selectionSet`],Argument:[`name`,`value`],FragmentSpread:[`name`,`directives`],InlineFragment:[`typeCondition`,`directives`,`selectionSet`],FragmentDefinition:[`description`,`name`,`variableDefinitions`,`typeCondition`,`directives`,`selectionSet`],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:[`values`],ObjectValue:[`fields`],ObjectField:[`name`,`value`],Directive:[`name`,`arguments`],NamedType:[`name`],ListType:[`type`],NonNullType:[`type`],SchemaDefinition:[`description`,`directives`,`operationTypes`],OperationTypeDefinition:[`type`],ScalarTypeDefinition:[`description`,`name`,`directives`],ObjectTypeDefinition:[`description`,`name`,`interfaces`,`directives`,`fields`],FieldDefinition:[`description`,`name`,`arguments`,`type`,`directives`],InputValueDefinition:[`description`,`name`,`type`,`defaultValue`,`directives`],InterfaceTypeDefinition:[`description`,`name`,`interfaces`,`directives`,`fields`],UnionTypeDefinition:[`description`,`name`,`directives`,`types`],EnumTypeDefinition:[`description`,`name`,`directives`,`values`],EnumValueDefinition:[`description`,`name`,`directives`],InputObjectTypeDefinition:[`description`,`name`,`directives`,`fields`],DirectiveDefinition:[`description`,`name`,`arguments`,`locations`],SchemaExtension:[`directives`,`operationTypes`],ScalarTypeExtension:[`name`,`directives`],ObjectTypeExtension:[`name`,`interfaces`,`directives`,`fields`],InterfaceTypeExtension:[`name`,`interfaces`,`directives`,`fields`],UnionTypeExtension:[`name`,`directives`,`types`],EnumTypeExtension:[`name`,`directives`,`values`],InputObjectTypeExtension:[`name`,`directives`,`fields`],TypeCoordinate:[`name`],MemberCoordinate:[`name`,`memberName`],ArgumentCoordinate:[`name`,`fieldName`,`argumentName`],DirectiveCoordinate:[`name`],DirectiveArgumentCoordinate:[`name`,`argumentName`]};new Set(Object.keys(xe));var D;(function(e){e.QUERY=`query`,e.MUTATION=`mutation`,e.SUBSCRIPTION=`subscription`})(D||={});var Se={...xe};for(let e of[`ArgumentCoordinate`,`DirectiveArgumentCoordinate`,`DirectiveCoordinate`,`MemberCoordinate`,`TypeCoordinate`])delete Se[e];var Ce=ve(Se,`kind`),O=e=>e.loc.start,we=e=>e.loc.end,Te=`format`,Ee=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u,De=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u,Oe=e=>De.test(e),ke=e=>Ee.test(e),Ae=e=>`# @${Te}

${e}`;function je(e,t,n){let{node:r}=e;if(!r.description)return``;let i=[n(`description`)];return r.kind===`InputValueDefinition`&&!r.description.block?i.push(v):i.push(b),i}var k=je;function Me(e,t,n){let{node:r}=e;switch(r.kind){case`Document`:return[..._(b,j(e,t,n,`definitions`)),b];case`OperationDefinition`:{let i=t.originalText[O(r)]!==`{`,a=!!r.name;return[k(e,t,n),i?r.operation:``,i&&a?[` `,n(`name`)]:``,i&&!a&&pe(r.variableDefinitions)?` `:``,Ie(e,n),A(e,n,r),!i&&!a?``:` `,n(`selectionSet`)]}case`FragmentDefinition`:return[k(e,t,n),`fragment `,n(`name`),Ie(e,n),` on `,n(`typeCondition`),A(e,n,r),` `,n(`selectionSet`)];case`SelectionSet`:return[`{`,m([b,_(b,j(e,t,n,`selections`))]),b,`}`];case`Field`:return h([r.alias?[n(`alias`),`: `]:``,n(`name`),r.arguments.length>0?h([`(`,m([y,_([g(``,`, `),y],j(e,t,n,`arguments`))]),y,`)`]):``,A(e,n,r),r.selectionSet?` `:``,n(`selectionSet`)]);case`Name`:return r.value;case`StringValue`:if(r.block){let e=a(0,r.value,`"""`,`\\"""`).split(`
`);return e.length===1&&(e[0]=e[0].trim()),e.every(e=>e===``)&&(e.length=0),_(b,[`"""`,...e,`"""`])}return[`"`,a(0,a(0,r.value,/["\\]/gu,`\\$&`),`
`,`\\n`),`"`];case`IntValue`:case`FloatValue`:case`EnumValue`:return r.value;case`BooleanValue`:return r.value?`true`:`false`;case`NullValue`:return`null`;case`Variable`:return[`$`,n(`name`)];case`ListValue`:return h([`[`,m([y,_([g(``,`, `),y],e.map(n,`values`))]),y,`]`]);case`ObjectValue`:{let i=t.bracketSpacing&&r.fields.length>0?` `:``;return h([`{`,i,m([y,_([g(``,`, `),y],e.map(n,`fields`))]),y,g(``,i),`}`])}case`ObjectField`:case`Argument`:return[n(`name`),`: `,n(`value`)];case`Directive`:return[`@`,n(`name`),r.arguments.length>0?h([`(`,m([y,_([g(``,`, `),y],j(e,t,n,`arguments`))]),y,`)`]):``];case`NamedType`:return n(`name`);case`VariableDefinition`:return[k(e,t,n),n(`variable`),`: `,n(`type`),r.defaultValue?[` = `,n(`defaultValue`)]:``,A(e,n,r)];case`ObjectTypeExtension`:case`ObjectTypeDefinition`:case`InputObjectTypeExtension`:case`InputObjectTypeDefinition`:case`InterfaceTypeExtension`:case`InterfaceTypeDefinition`:{let{kind:i}=r,a=[];return i.endsWith(`TypeDefinition`)?a.push(k(e,t,n)):a.push(`extend `),i.startsWith(`ObjectType`)?a.push(`type`):i.startsWith(`InputObjectType`)?a.push(`input`):a.push(`interface`),a.push(` `,n(`name`)),!i.startsWith(`InputObjectType`)&&r.interfaces.length>0&&a.push(` implements `,...Fe(e,t,n)),a.push(A(e,n,r)),r.fields.length>0&&a.push([` {`,m([b,_(b,j(e,t,n,`fields`))]),b,`}`]),a}case`FieldDefinition`:return[k(e,t,n),n(`name`),r.arguments.length>0?h([`(`,m([y,_([g(``,`, `),y],j(e,t,n,`arguments`))]),y,`)`]):``,`: `,n(`type`),A(e,n,r)];case`DirectiveDefinition`:return[k(e,t,n),`directive `,`@`,n(`name`),r.arguments.length>0?h([`(`,m([y,_([g(``,`, `),y],j(e,t,n,`arguments`))]),y,`)`]):``,r.repeatable?` repeatable`:``,` on `,..._(` | `,e.map(n,`locations`))];case`EnumTypeExtension`:case`EnumTypeDefinition`:return[k(e,t,n),r.kind===`EnumTypeExtension`?`extend `:``,`enum `,n(`name`),A(e,n,r),r.values.length>0?[` {`,m([b,_(b,j(e,t,n,`values`))]),b,`}`]:``];case`EnumValueDefinition`:return[k(e,t,n),n(`name`),A(e,n,r)];case`InputValueDefinition`:return[k(e,t,n),n(`name`),`: `,n(`type`),r.defaultValue?[` = `,n(`defaultValue`)]:``,A(e,n,r)];case`SchemaExtension`:return[`extend schema`,A(e,n,r),...r.operationTypes.length>0?[` {`,m([b,_(b,j(e,t,n,`operationTypes`))]),b,`}`]:[]];case`SchemaDefinition`:return[k(e,t,n),`schema`,A(e,n,r),` {`,r.operationTypes.length>0?m([b,_(b,j(e,t,n,`operationTypes`))]):``,b,`}`];case`OperationTypeDefinition`:return[r.operation,`: `,n(`type`)];case`FragmentSpread`:return[`...`,n(`name`),A(e,n,r)];case`InlineFragment`:return[`...`,r.typeCondition?[` on `,n(`typeCondition`)]:``,A(e,n,r),` `,n(`selectionSet`)];case`UnionTypeExtension`:case`UnionTypeDefinition`:return h([k(e,t,n),h([r.kind===`UnionTypeExtension`?`extend `:``,`union `,n(`name`),A(e,n,r),r.types.length>0?[` =`,g(``,` `),m([g([v,`| `]),_([v,`| `],e.map(n,`types`))])]:``])]);case`ScalarTypeExtension`:case`ScalarTypeDefinition`:return[k(e,t,n),r.kind===`ScalarTypeExtension`?`extend `:``,`scalar `,n(`name`),A(e,n,r)];case`NonNullType`:return[n(`type`),`!`];case`ListType`:return[`[`,n(`type`),`]`];default:throw new me(r,`Graphql`,`kind`)}}function A(e,t,n){if(n.directives.length===0)return``;let r=_(v,e.map(t,`directives`));return n.kind===`FragmentDefinition`||n.kind===`OperationDefinition`?h([v,r]):[` `,h(m([y,r]))]}function j(e,t,n,r){return e.map(({isLast:e,node:r})=>{let i=n();return!e&&de(t.originalText,we(r))?[i,b]:i},r)}function Ne(e){return e.kind!==`Comment`}function Pe({node:e}){if(e.kind===`Comment`)return`#`+e.value.trimEnd();throw Error(`Not a comment: `+JSON.stringify(e))}function Fe(e,t,n){let{node:r}=e,i=[],{interfaces:a}=r,o=e.map(n,`interfaces`);for(let e=0;e<a.length;e++){let n=a[e];i.push(o[e]);let r=a[e+1];if(r){let e=t.originalText.slice(n.loc.end,r.loc.start).includes(`#`);i.push(` &`,e?v:` `)}}return i}function Ie(e,t){let{node:n}=e;return pe(n.variableDefinitions)?h([`(`,m([y,_([g(``,`, `),y],e.map(t,`variableDefinitions`))]),y,`)`]):``}function Le(e,t){e.kind===`StringValue`&&e.block&&!e.value.includes(`
`)&&(t.value=e.value.trim())}Le.ignoredProperties=new Set([`loc`,`comments`]);function Re(e){let{node:t}=e;return t?.comments?.some(e=>e.value.trim()===`prettier-ignore`)}var ze={print:Me,massageAstNode:Le,hasPrettierIgnore:Re,insertPragma:Ae,printComment:Pe,canAttachComment:Ne,getVisitorKeys:Ce},M=[{name:`GraphQL`,type:`data`,aceMode:`graphqlschema`,extensions:[`.graphql`,`.gql`,`.graphqls`],tmScope:`source.graphql`,parsers:[`graphql`],vscodeLanguageIds:[`graphql`],linguistLanguageId:139}],N={bracketSpacing:{bracketSpacing:{category:`Common`,type:`boolean`,default:!0,description:`Print spaces between brackets.`,oppositeDescription:`Do not print spaces between brackets.`},objectWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap object literals.`,choices:[{value:`preserve`,description:`Keep as multi-line, if there is a newline between the opening brace and first property.`},{value:`collapse`,description:`Fit to a single line when possible.`}]},singleQuote:{category:`Common`,type:`boolean`,default:!1,description:`Use single quotes instead of double quotes.`},proseWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap prose.`,choices:[{value:`always`,description:`Wrap prose if it exceeds the print width.`},{value:`never`,description:`Do not wrap prose.`},{value:`preserve`,description:`Wrap prose as-is.`}]},bracketSameLine:{category:`Common`,type:`boolean`,default:!1,description:`Put > of opening tags on the last line instead of on a new line.`},singleAttributePerLine:{category:`Common`,type:`boolean`,default:!1,description:`Enforce single attribute per line in HTML, Vue and JSX.`}}.bracketSpacing},P={};t(P,{graphql:()=>kt});function Be(e){return typeof e==`object`&&!!e}function Ve(e,t){if(!e)throw Error(t??`Unexpected invariant triggered.`)}var He=/\r\n|[\n\r]/g;function F(e,t){let n=0,r=1;for(let i of e.body.matchAll(He)){if(typeof i.index==`number`||Ve(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Ue(e){return We(e.source,F(e.source,e.start))}function We(e,t){let n=e.locationOffset.column-1,r=``.padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=t.line===1?n:0,c=t.column+s,l=`${e.name}:${o}:${c}
`,u=r.split(/\r\n|[\n\r]/g),d=u[i];if(d.length>120){let e=Math.floor(c/80),t=c%80,n=[];for(let e=0;e<d.length;e+=80)n.push(d.slice(e,e+80));return l+I([[`${o} |`,n[0]],...n.slice(1,e+1).map(e=>[`|`,e]),[`|`,`^`.padStart(t)],[`|`,n[e+1]]])}return l+I([[`${o-1} |`,u[i-1]],[`${o} |`,d],[`|`,`^`.padStart(c)],[`${o+1} |`,u[i+1]]])}function I(e){let t=e.filter(([e,t])=>t!==void 0),n=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(n)+(t?` `+t:``)).join(`
`)}function Ge(e){let t=e[0];return t==null||`kind`in t||`length`in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var Ke=class e extends Error{constructor(t,...n){var r;let{nodes:i,source:a,positions:o,path:s,originalError:c,extensions:l}=Ge(n);super(t),this.name=`GraphQLError`,this.path=s??void 0,this.originalError=c??void 0,this.nodes=L(Array.isArray(i)?i:i?[i]:void 0);let u=L(this.nodes?.map(e=>e.loc).filter(e=>e!=null));this.source=a??(u==null||(r=u[0])==null?void 0:r.source),this.positions=o??u?.map(e=>e.start),this.locations=o&&a?o.map(e=>F(a,e)):u?.map(e=>F(e.source,e.start));let d=Be(c?.extensions)?c?.extensions:void 0;this.extensions=l??d??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),c!=null&&c.stack?Object.defineProperty(this,`stack`,{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,`stack`,{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return`GraphQLError`}toString(){let e=this.message;if(this.nodes)for(let t of this.nodes)t.loc&&(e+=`

`+Ue(t.loc));else if(this.source&&this.locations)for(let t of this.locations)e+=`

`+We(this.source,t);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function L(e){return e===void 0||e.length===0?void 0:e}function R(e,t,n){return new Ke(`Syntax Error: ${n}`,{source:e,positions:[t]})}var z;(function(e){e.QUERY=`QUERY`,e.MUTATION=`MUTATION`,e.SUBSCRIPTION=`SUBSCRIPTION`,e.FIELD=`FIELD`,e.FRAGMENT_DEFINITION=`FRAGMENT_DEFINITION`,e.FRAGMENT_SPREAD=`FRAGMENT_SPREAD`,e.INLINE_FRAGMENT=`INLINE_FRAGMENT`,e.VARIABLE_DEFINITION=`VARIABLE_DEFINITION`,e.SCHEMA=`SCHEMA`,e.SCALAR=`SCALAR`,e.OBJECT=`OBJECT`,e.FIELD_DEFINITION=`FIELD_DEFINITION`,e.ARGUMENT_DEFINITION=`ARGUMENT_DEFINITION`,e.INTERFACE=`INTERFACE`,e.UNION=`UNION`,e.ENUM=`ENUM`,e.ENUM_VALUE=`ENUM_VALUE`,e.INPUT_OBJECT=`INPUT_OBJECT`,e.INPUT_FIELD_DEFINITION=`INPUT_FIELD_DEFINITION`})(z||={});var B;(function(e){e.NAME=`Name`,e.DOCUMENT=`Document`,e.OPERATION_DEFINITION=`OperationDefinition`,e.VARIABLE_DEFINITION=`VariableDefinition`,e.SELECTION_SET=`SelectionSet`,e.FIELD=`Field`,e.ARGUMENT=`Argument`,e.FRAGMENT_SPREAD=`FragmentSpread`,e.INLINE_FRAGMENT=`InlineFragment`,e.FRAGMENT_DEFINITION=`FragmentDefinition`,e.VARIABLE=`Variable`,e.INT=`IntValue`,e.FLOAT=`FloatValue`,e.STRING=`StringValue`,e.BOOLEAN=`BooleanValue`,e.NULL=`NullValue`,e.ENUM=`EnumValue`,e.LIST=`ListValue`,e.OBJECT=`ObjectValue`,e.OBJECT_FIELD=`ObjectField`,e.DIRECTIVE=`Directive`,e.NAMED_TYPE=`NamedType`,e.LIST_TYPE=`ListType`,e.NON_NULL_TYPE=`NonNullType`,e.SCHEMA_DEFINITION=`SchemaDefinition`,e.OPERATION_TYPE_DEFINITION=`OperationTypeDefinition`,e.SCALAR_TYPE_DEFINITION=`ScalarTypeDefinition`,e.OBJECT_TYPE_DEFINITION=`ObjectTypeDefinition`,e.FIELD_DEFINITION=`FieldDefinition`,e.INPUT_VALUE_DEFINITION=`InputValueDefinition`,e.INTERFACE_TYPE_DEFINITION=`InterfaceTypeDefinition`,e.UNION_TYPE_DEFINITION=`UnionTypeDefinition`,e.ENUM_TYPE_DEFINITION=`EnumTypeDefinition`,e.ENUM_VALUE_DEFINITION=`EnumValueDefinition`,e.INPUT_OBJECT_TYPE_DEFINITION=`InputObjectTypeDefinition`,e.DIRECTIVE_DEFINITION=`DirectiveDefinition`,e.SCHEMA_EXTENSION=`SchemaExtension`,e.SCALAR_TYPE_EXTENSION=`ScalarTypeExtension`,e.OBJECT_TYPE_EXTENSION=`ObjectTypeExtension`,e.INTERFACE_TYPE_EXTENSION=`InterfaceTypeExtension`,e.UNION_TYPE_EXTENSION=`UnionTypeExtension`,e.ENUM_TYPE_EXTENSION=`EnumTypeExtension`,e.INPUT_OBJECT_TYPE_EXTENSION=`InputObjectTypeExtension`,e.TYPE_COORDINATE=`TypeCoordinate`,e.MEMBER_COORDINATE=`MemberCoordinate`,e.ARGUMENT_COORDINATE=`ArgumentCoordinate`,e.DIRECTIVE_COORDINATE=`DirectiveCoordinate`,e.DIRECTIVE_ARGUMENT_COORDINATE=`DirectiveArgumentCoordinate`})(B||={});function qe(e){return e===9||e===32}function V(e){return e>=48&&e<=57}function H(e){return e>=97&&e<=122||e>=65&&e<=90}function U(e){return H(e)||e===95}function Je(e){return H(e)||V(e)||e===95}function Ye(e){let t=2**53-1,n=null,r=-1;for(let i=0;i<e.length;++i){let a=e[i],o=Xe(a);o!==a.length&&(n??=i,r=i,i!==0&&o<t&&(t=o))}return e.map((e,n)=>n===0?e:e.slice(t)).slice(n??0,r+1)}function Xe(e){let t=0;for(;t<e.length&&qe(e.charCodeAt(t));)++t;return t}var W;(function(e){e.SOF=`<SOF>`,e.EOF=`<EOF>`,e.BANG=`!`,e.DOLLAR=`$`,e.AMP=`&`,e.PAREN_L=`(`,e.PAREN_R=`)`,e.DOT=`.`,e.SPREAD=`...`,e.COLON=`:`,e.EQUALS=`=`,e.AT=`@`,e.BRACKET_L=`[`,e.BRACKET_R=`]`,e.BRACE_L=`{`,e.PIPE=`|`,e.BRACE_R=`}`,e.NAME=`Name`,e.INT=`Int`,e.FLOAT=`Float`,e.STRING=`String`,e.BLOCK_STRING=`BlockString`,e.COMMENT=`Comment`})(W||={});var Ze=class{constructor(e){let t=new be(W.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return`Lexer`}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==W.EOF)do if(e.next)e=e.next;else{let t=tt(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===W.COMMENT);return e}};function Qe(e){return e===W.BANG||e===W.DOLLAR||e===W.AMP||e===W.PAREN_L||e===W.PAREN_R||e===W.DOT||e===W.SPREAD||e===W.COLON||e===W.EQUALS||e===W.AT||e===W.BRACKET_L||e===W.BRACKET_R||e===W.BRACE_L||e===W.PIPE||e===W.BRACE_R}function G(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function K(e,t){return $e(e.charCodeAt(t))&&et(e.charCodeAt(t+1))}function $e(e){return e>=55296&&e<=56319}function et(e){return e>=56320&&e<=57343}function q(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return W.EOF;if(n>=32&&n<=126){let e=String.fromCodePoint(n);return e===`"`?`'"'`:`"${e}"`}return`U+`+n.toString(16).toUpperCase().padStart(4,`0`)}function J(e,t,n,r,i){let a=e.line;return new be(t,n,r,a,1+n-e.lineStart,i)}function tt(e,t){let n=e.source.body,r=n.length,i=t;for(;i<r;){let t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return nt(e,i);case 33:return J(e,W.BANG,i,i+1);case 36:return J(e,W.DOLLAR,i,i+1);case 38:return J(e,W.AMP,i,i+1);case 40:return J(e,W.PAREN_L,i,i+1);case 41:return J(e,W.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return J(e,W.SPREAD,i,i+3);break;case 58:return J(e,W.COLON,i,i+1);case 61:return J(e,W.EQUALS,i,i+1);case 64:return J(e,W.AT,i,i+1);case 91:return J(e,W.BRACKET_L,i,i+1);case 93:return J(e,W.BRACKET_R,i,i+1);case 123:return J(e,W.BRACE_L,i,i+1);case 124:return J(e,W.PIPE,i,i+1);case 125:return J(e,W.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?lt(e,i):it(e,i)}if(V(t)||t===45)return rt(e,i,t);if(U(t))return ut(e,i);throw R(e.source,i,t===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:G(t)||K(n,i)?`Unexpected character: ${q(e,i)}.`:`Invalid character: ${q(e,i)}.`)}return J(e,W.EOF,r,r)}function nt(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let e=n.charCodeAt(i);if(e===10||e===13)break;if(G(e))++i;else if(K(n,i))i+=2;else break}return J(e,W.COMMENT,t,i,n.slice(t+1,i))}function rt(e,t,n){let r=e.source.body,i=t,a=n,o=!1;if(a===45&&(a=r.charCodeAt(++i)),a===48){if(a=r.charCodeAt(++i),V(a))throw R(e.source,i,`Invalid number, unexpected digit after 0: ${q(e,i)}.`)}else i=Y(e,i,a),a=r.charCodeAt(i);if(a===46&&(o=!0,a=r.charCodeAt(++i),i=Y(e,i,a),a=r.charCodeAt(i)),(a===69||a===101)&&(o=!0,a=r.charCodeAt(++i),(a===43||a===45)&&(a=r.charCodeAt(++i)),i=Y(e,i,a),a=r.charCodeAt(i)),a===46||U(a))throw R(e.source,i,`Invalid number, expected digit but got: ${q(e,i)}.`);return J(e,o?W.FLOAT:W.INT,t,i,r.slice(t,i))}function Y(e,t,n){if(!V(n))throw R(e.source,t,`Invalid number, expected digit but got: ${q(e,t)}.`);let r=e.source.body,i=t+1;for(;V(r.charCodeAt(i));)++i;return i}function it(e,t){let n=e.source.body,r=n.length,i=t+1,a=i,o=``;for(;i<r;){let r=n.charCodeAt(i);if(r===34)return o+=n.slice(a,i),J(e,W.STRING,t,i+1,o);if(r===92){o+=n.slice(a,i);let t=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?at(e,i):ot(e,i):ct(e,i);o+=t.value,i+=t.size,a=i;continue}if(r===10||r===13)break;if(G(r))++i;else if(K(n,i))i+=2;else throw R(e.source,i,`Invalid character within String: ${q(e,i)}.`)}throw R(e.source,i,`Unterminated string.`)}function at(e,t){let n=e.source.body,r=0,i=3;for(;i<12;){let e=n.charCodeAt(t+ i++);if(e===125){if(i<5||!G(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|X(e),r<0)break}throw R(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function ot(e,t){let n=e.source.body,r=st(n,t+2);if(G(r))return{value:String.fromCodePoint(r),size:6};if($e(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let e=st(n,t+8);if(et(e))return{value:String.fromCodePoint(r,e),size:12}}throw R(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function st(e,t){return X(e.charCodeAt(t))<<12|X(e.charCodeAt(t+1))<<8|X(e.charCodeAt(t+2))<<4|X(e.charCodeAt(t+3))}function X(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function ct(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:`"`,size:2};case 92:return{value:`\\`,size:2};case 47:return{value:`/`,size:2};case 98:return{value:`\b`,size:2};case 102:return{value:`\f`,size:2};case 110:return{value:`
`,size:2};case 114:return{value:`\r`,size:2};case 116:return{value:`	`,size:2}}throw R(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function lt(e,t){let n=e.source.body,r=n.length,i=e.lineStart,a=t+3,o=a,s=``,c=[];for(;a<r;){let r=n.charCodeAt(a);if(r===34&&n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34){s+=n.slice(o,a),c.push(s);let r=J(e,W.BLOCK_STRING,t,a+3,Ye(c).join(`
`));return e.line+=c.length-1,e.lineStart=i,r}if(r===92&&n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34&&n.charCodeAt(a+3)===34){s+=n.slice(o,a),o=a+1,a+=4;continue}if(r===10||r===13){s+=n.slice(o,a),c.push(s),r===13&&n.charCodeAt(a+1)===10?a+=2:++a,s=``,o=a,i=a;continue}if(G(r))++a;else if(K(n,a))a+=2;else throw R(e.source,a,`Invalid character within String: ${q(e,a)}.`)}throw R(e.source,a,`Unterminated string.`)}function ut(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r&&Je(n.charCodeAt(i));)++i;return J(e,W.NAME,t,i,n.slice(t,i))}function Z(e,t){if(!e)throw Error(t)}function dt(e){return Q(e,[])}function Q(e,t){switch(typeof e){case`string`:return JSON.stringify(e);case`function`:return e.name?`[function ${e.name}]`:`[function]`;case`object`:return ft(e,t);default:return String(e)}}function ft(e,t){if(e===null)return`null`;if(t.includes(e))return`[Circular]`;let n=[...t,e];if(pt(e)){let t=e.toJSON();if(t!==e)return typeof t==`string`?t:Q(t,n)}else if(Array.isArray(e))return ht(e,n);return mt(e,n)}function pt(e){return typeof e.toJSON==`function`}function mt(e,t){let n=Object.entries(e);return n.length===0?`{}`:t.length>2?`[`+gt(e)+`]`:`{ `+n.map(([e,n])=>e+`: `+Q(n,t)).join(`, `)+` }`}function ht(e,t){if(e.length===0)return`[]`;if(t.length>2)return`[Array]`;let n=Math.min(10,e.length),r=e.length-n,i=[];for(let r=0;r<n;++r)i.push(Q(e[r],t));return r===1?i.push(`... 1 more item`):r>1&&i.push(`... ${r} more items`),`[`+i.join(`, `)+`]`}function gt(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,``).replace(/]$/,``);if(t===`Object`&&typeof e.constructor==`function`){let t=e.constructor.name;if(typeof t==`string`&&t!==``)return t}return t}var _t=globalThis.process?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if(typeof e==`object`&&e){let n=t.prototype[Symbol.toStringTag];if(n===(Symbol.toStringTag in e?e[Symbol.toStringTag]:e.constructor?.name)){let t=dt(e);throw Error(`Cannot use ${n} "${t}" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.`)}}return!1},vt=class{constructor(e,t=`GraphQL request`,n={line:1,column:1}){typeof e==`string`||Z(!1,`Body must be a string. Received: ${dt(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Z(!1,`line in locationOffset is 1-indexed and must be positive.`),this.locationOffset.column>0||Z(!1,`column in locationOffset is 1-indexed and must be positive.`)}get[Symbol.toStringTag](){return`Source`}};function yt(e){return _t(e,vt)}function bt(e,t){let n=new xt(e,t),r=n.parseDocument();return Object.defineProperty(r,`tokenCount`,{enumerable:!1,value:n.tokenCount}),r}var xt=class{constructor(e,t={}){let{lexer:n,...r}=t;n?this._lexer=n:this._lexer=new Ze(yt(e)?e:new vt(e)),this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let e=this.expectToken(W.NAME);return this.node(e,{kind:B.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:B.DOCUMENT,definitions:this.many(W.SOF,this.parseDefinition,W.EOF)})}parseDefinition(){if(this.peek(W.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===W.BRACE_L)throw R(this._lexer.source,this._lexer.token.start,`Unexpected description, descriptions are not supported on shorthand queries.`);if(t.kind===W.NAME){switch(t.value){case`schema`:return this.parseSchemaDefinition();case`scalar`:return this.parseScalarTypeDefinition();case`type`:return this.parseObjectTypeDefinition();case`interface`:return this.parseInterfaceTypeDefinition();case`union`:return this.parseUnionTypeDefinition();case`enum`:return this.parseEnumTypeDefinition();case`input`:return this.parseInputObjectTypeDefinition();case`directive`:return this.parseDirectiveDefinition()}switch(t.value){case`query`:case`mutation`:case`subscription`:return this.parseOperationDefinition();case`fragment`:return this.parseFragmentDefinition()}if(e)throw R(this._lexer.source,this._lexer.token.start,`Unexpected description, only GraphQL definitions support descriptions.`);switch(t.value){case`extend`:return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){let e=this._lexer.token;if(this.peek(W.BRACE_L))return this.node(e,{kind:B.OPERATION_DEFINITION,operation:D.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let t=this.parseDescription(),n=this.parseOperationType(),r;return this.peek(W.NAME)&&(r=this.parseName()),this.node(e,{kind:B.OPERATION_DEFINITION,operation:n,description:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(W.NAME);switch(e.value){case`query`:return D.QUERY;case`mutation`:return D.MUTATION;case`subscription`:return D.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(W.PAREN_L,this.parseVariableDefinition,W.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:B.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(W.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(W.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(W.DOLLAR),this.node(e,{kind:B.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:B.SELECTION_SET,selections:this.many(W.BRACE_L,this.parseSelection,W.BRACE_R)})}parseSelection(){return this.peek(W.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e=this._lexer.token,t=this.parseName(),n,r;return this.expectOptionalToken(W.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:B.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(W.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(W.PAREN_L,t,W.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,n=this.parseName();return this.expectToken(W.COLON),this.node(t,{kind:B.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(W.SPREAD);let t=this.expectOptionalKeyword(`on`);return!t&&this.peek(W.NAME)?this.node(e,{kind:B.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:B.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token,t=this.parseDescription();return this.expectKeyword(`fragment`),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:B.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword(`on`),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:B.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword(`on`),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value===`on`)throw this.unexpected();return this.parseName()}parseValueLiteral(e){let t=this._lexer.token;switch(t.kind){case W.BRACKET_L:return this.parseList(e);case W.BRACE_L:return this.parseObject(e);case W.INT:return this.advanceLexer(),this.node(t,{kind:B.INT,value:t.value});case W.FLOAT:return this.advanceLexer(),this.node(t,{kind:B.FLOAT,value:t.value});case W.STRING:case W.BLOCK_STRING:return this.parseStringLiteral();case W.NAME:switch(this.advanceLexer(),t.value){case`true`:return this.node(t,{kind:B.BOOLEAN,value:!0});case`false`:return this.node(t,{kind:B.BOOLEAN,value:!1});case`null`:return this.node(t,{kind:B.NULL});default:return this.node(t,{kind:B.ENUM,value:t.value})}case W.DOLLAR:if(e)if(this.expectToken(W.DOLLAR),this._lexer.token.kind===W.NAME){let e=this._lexer.token.value;throw R(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}else throw this.unexpected(t);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:B.STRING,value:e.value,block:e.kind===W.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:B.LIST,values:this.any(W.BRACKET_L,()=>this.parseValueLiteral(e),W.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:B.OBJECT,fields:this.any(W.BRACE_L,()=>this.parseObjectField(e),W.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,n=this.parseName();return this.expectToken(W.COLON),this.node(t,{kind:B.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(W.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(W.AT),this.node(t,{kind:B.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e=this._lexer.token,t;if(this.expectOptionalToken(W.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(W.BRACKET_R),t=this.node(e,{kind:B.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(W.BANG)?this.node(e,{kind:B.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:B.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(W.STRING)||this.peek(W.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword(`schema`);let n=this.parseConstDirectives(),r=this.many(W.BRACE_L,this.parseOperationTypeDefinition,W.BRACE_R);return this.node(e,{kind:B.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(W.COLON);let n=this.parseNamedType();return this.node(e,{kind:B.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword(`scalar`);let n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:B.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword(`type`);let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:B.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword(`implements`)?this.delimitedMany(W.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(W.BRACE_L,this.parseFieldDefinition,W.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(W.COLON);let i=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:B.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:a})}parseArgumentDefs(){return this.optionalMany(W.PAREN_L,this.parseInputValueDef,W.PAREN_R)}parseInputValueDef(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(W.COLON);let r=this.parseTypeReference(),i;this.expectOptionalToken(W.EQUALS)&&(i=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(e,{kind:B.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:a})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword(`interface`);let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:B.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword(`union`);let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:B.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(W.EQUALS)?this.delimitedMany(W.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword(`enum`);let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:B.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(W.BRACE_L,this.parseEnumValueDefinition,W.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:B.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if(this._lexer.token.value===`true`||this._lexer.token.value===`false`||this._lexer.token.value===`null`)throw R(this._lexer.source,this._lexer.token.start,`${$(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword(`input`);let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:B.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(W.BRACE_L,this.parseInputValueDef,W.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===W.NAME)switch(e.value){case`schema`:return this.parseSchemaExtension();case`scalar`:return this.parseScalarTypeExtension();case`type`:return this.parseObjectTypeExtension();case`interface`:return this.parseInterfaceTypeExtension();case`union`:return this.parseUnionTypeExtension();case`enum`:return this.parseEnumTypeExtension();case`input`:return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword(`extend`),this.expectKeyword(`schema`);let t=this.parseConstDirectives(),n=this.optionalMany(W.BRACE_L,this.parseOperationTypeDefinition,W.BRACE_R);if(t.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:B.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword(`extend`),this.expectKeyword(`scalar`);let t=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(e,{kind:B.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword(`extend`),this.expectKeyword(`type`);let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:B.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword(`extend`),this.expectKeyword(`interface`);let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:B.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword(`extend`),this.expectKeyword(`union`);let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:B.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword(`extend`),this.expectKeyword(`enum`);let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:B.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword(`extend`),this.expectKeyword(`input`);let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:B.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword(`directive`),this.expectToken(W.AT);let n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword(`repeatable`);this.expectKeyword(`on`);let a=this.parseDirectiveLocations();return this.node(e,{kind:B.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:a})}parseDirectiveLocations(){return this.delimitedMany(W.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(z,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){let e=this._lexer.token,t=this.expectOptionalToken(W.AT),n=this.parseName(),r;!t&&this.expectOptionalToken(W.DOT)&&(r=this.parseName());let i;return(t||r)&&this.expectOptionalToken(W.PAREN_L)&&(i=this.parseName(),this.expectToken(W.COLON),this.expectToken(W.PAREN_R)),t?i?this.node(e,{kind:B.DIRECTIVE_ARGUMENT_COORDINATE,name:n,argumentName:i}):this.node(e,{kind:B.DIRECTIVE_COORDINATE,name:n}):r?i?this.node(e,{kind:B.ARGUMENT_COORDINATE,name:n,fieldName:r,argumentName:i}):this.node(e,{kind:B.MEMBER_COORDINATE,name:n,memberName:r}):this.node(e,{kind:B.TYPE_COORDINATE,name:n})}node(e,t){return this._options.noLocation!==!0&&(t.loc=new ye(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw R(this._lexer.source,t.start,`Expected ${St(e)}, found ${$(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){let t=this._lexer.token;if(t.kind===W.NAME&&t.value===e)this.advanceLexer();else throw R(this._lexer.source,t.start,`Expected "${e}", found ${$(t)}.`)}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===W.NAME&&t.value===e?(this.advanceLexer(),!0):!1}unexpected(e){let t=e??this._lexer.token;return R(this._lexer.source,t.start,`Unexpected ${$(t)}.`)}any(e,t,n){this.expectToken(e);let r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){let e=[];do e.push(t.call(this));while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);let r=[];do r.push(t.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);let n=[];do n.push(t.call(this));while(this.expectOptionalToken(e));return n}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==W.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw R(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};function $(e){let t=e.value;return St(e.kind)+(t==null?``:` "${t}"`)}function St(e){return Qe(e)?`"${e}"`:e}function Ct(e,t){let n=SyntaxError(e+` (`+t.loc.start.line+`:`+t.loc.start.column+`)`);return Object.assign(n,t)}var wt=Ct;function Tt(e){let t=[],{startToken:n,endToken:r}=e.loc;for(let e=n;e!==r;e=e.next)e.kind===`Comment`&&t.push({...e,loc:{start:e.start,end:e.end}});return t}var Et={allowLegacyFragmentVariables:!0};function Dt(e){if(e?.name===`GraphQLError`){let{message:t,locations:[n]}=e;return wt(t,{loc:{start:n},cause:e})}return e}function Ot(e){let t;try{t=bt(e,Et)}catch(e){throw Dt(e)}return t.comments=Tt(t),t}var kt={parse:Ot,astFormat:`graphql`,hasPragma:Oe,hasIgnorePragma:ke,locStart:O,locEnd:we},At={graphql:ze};export{n as default,M as languages,N as options,P as parsers,At as printers};