parse-dashboard 8.2.0-alpha.4 → 8.2.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[874],{49181:(e,n,t)=>{t.d(n,{C:()=>i,P:()=>s,R:()=>a});var r=Object.defineProperty,o=(e,n)=>r(e,"name",{value:n,configurable:!0});class i{constructor(e){this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>0===this._pos,this.peek=()=>this._sourceText.charAt(this._pos)?this._sourceText.charAt(this._pos):null,this.next=()=>{const e=this._sourceText.charAt(this._pos);return this._pos++,e},this.eat=e=>{if(this._testNextCharacter(e))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=e=>{let n=this._testNextCharacter(e),t=!1;for(n&&(t=n,this._start=this._pos);n;)this._pos++,n=this._testNextCharacter(e),t=!0;return t},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=e=>{this._pos=e},this.match=(e,n=!0,t=!1)=>{let r=null,o=null;return"string"==typeof e?(o=new RegExp(e,t?"i":"g").test(this._sourceText.substr(this._pos,e.length)),r=e):e instanceof RegExp&&(o=this._sourceText.slice(this._pos).match(e),r=null==o?void 0:o[0]),!(null==o||!("string"==typeof e||o instanceof Array&&this._sourceText.startsWith(o[0],this._pos)))&&(n&&(this._start=this._pos,r&&r.length&&(this._pos+=r.length)),o)},this.backUp=e=>{this._pos-=e},this.column=()=>this._pos,this.indentation=()=>{const e=this._sourceText.match(/\s*/);let n=0;if(e&&0!==e.length){const t=e[0];let r=0;for(;t.length>r;)9===t.charCodeAt(r)?n+=2:n++,r++}return n},this.current=()=>this._sourceText.slice(this._start,this._pos),this._start=0,this._pos=0,this._sourceText=e}_testNextCharacter(e){const n=this._sourceText.charAt(this._pos);let t=!1;return t="string"==typeof e?n===e:e instanceof RegExp?e.test(n):e(n),t}}o(i,"CharacterStream");class a{constructor(e,n){this.containsPosition=e=>this.start.line===e.line?this.start.character<=e.character:this.end.line===e.line?this.end.character>=e.character:this.start.line<=e.line&&this.end.line>=e.line,this.start=e,this.end=n}setStart(e,n){this.start=new s(e,n)}setEnd(e,n){this.end=new s(e,n)}}o(a,"Range");class s{constructor(e,n){this.lessThanOrEqualTo=e=>this.line<e.line||this.line===e.line&&this.character<=e.character,this.line=e,this.character=n}setLine(e){this.line=e}setCharacter(e){this.character=e}}o(s,"Position")},54874:(e,n,t)=>{var r=t(38950),o=t(4405);function i(e){var n,t,r;const i=e.getSchema(),a=null!==(n=null!==(t=null!==(r=null==i?void 0:i.astNode)&&void 0!==r?r:null==i?void 0:i.getQueryType())&&void 0!==t?t:null==i?void 0:i.getMutationType())&&void 0!==n?n:null==i?void 0:i.getSubscriptionType();let s=0;return{SchemaDefinition(n){a?e.reportError(new o.eO("Cannot define a new schema within a schema extension.",{nodes:n})):(s>0&&e.reportError(new o.eO("Must provide only one schema definition.",{nodes:n})),++s)}}}function a(e){const n=e.getSchema(),t=Object.create(null),r=n?{query:n.getQueryType(),mutation:n.getMutationType(),subscription:n.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(n){var i;const a=null!==(i=n.operationTypes)&&void 0!==i?i:[];for(const n of a){const i=n.operation,a=t[i];r[i]?e.reportError(new o.eO(`Type for ${i} already defined in the schema. It cannot be redefined.`,{nodes:n})):a?e.reportError(new o.eO(`There can be only one ${i} type in schema.`,{nodes:[a,n]})):t[i]=n}return!1}}function s(e){const n=Object.create(null),t=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(r){const i=r.name.value;if(null==t||!t.getType(i))return n[i]?e.reportError(new o.eO(`There can be only one type named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name,!1;e.reportError(new o.eO(`Type "${i}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:r.name}))}}var c=t(85236);function u(e){const n=e.getSchema(),t=n?n.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(n){var i;const a=n.name.value;r[a]||(r[a]=Object.create(null));const s=null!==(i=n.values)&&void 0!==i?i:[],u=r[a];for(const n of s){const r=n.name.value,i=t[a];(0,c.oF)(i)&&i.getValue(r)?e.reportError(new o.eO(`Enum value "${a}.${r}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:n.name})):u[r]?e.reportError(new o.eO(`Enum value "${a}.${r}" can only be defined once.`,{nodes:[u[r],n.name]})):u[r]=n.name}return!1}}function l(e){const n=e.getSchema(),t=n?n.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(n){var i;const a=n.name.value;r[a]||(r[a]=Object.create(null));const s=null!==(i=n.fields)&&void 0!==i?i:[],c=r[a];for(const n of s){const r=n.name.value;f(t[a],r)?e.reportError(new o.eO(`Field "${a}.${r}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:n.name})):c[r]?e.reportError(new o.eO(`Field "${a}.${r}" can only be defined once.`,{nodes:[c[r],n.name]})):c[r]=n.name}return!1}}function f(e,n){return!!((0,c.YQ)(e)||(0,c.kD)(e)||(0,c.qK)(e))&&null!=e.getFields()[n]}function d(e){const n=Object.create(null),t=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(null==t||!t.getDirective(i))return n[i]?e.reportError(new o.eO(`There can be only one directive named "@${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name,!1;e.reportError(new o.eO(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}))}}}var p=t(60758),E=t(30221),m=t(14552);function h(e){return e.kind===m.b.OPERATION_DEFINITION||e.kind===m.b.FRAGMENT_DEFINITION}function v(e){return e.kind===m.b.SCALAR_TYPE_DEFINITION||e.kind===m.b.OBJECT_TYPE_DEFINITION||e.kind===m.b.INTERFACE_TYPE_DEFINITION||e.kind===m.b.UNION_TYPE_DEFINITION||e.kind===m.b.ENUM_TYPE_DEFINITION||e.kind===m.b.INPUT_OBJECT_TYPE_DEFINITION}function T(e){return e.kind===m.b.SCALAR_TYPE_EXTENSION||e.kind===m.b.OBJECT_TYPE_EXTENSION||e.kind===m.b.INTERFACE_TYPE_EXTENSION||e.kind===m.b.UNION_TYPE_EXTENSION||e.kind===m.b.ENUM_TYPE_EXTENSION||e.kind===m.b.INPUT_OBJECT_TYPE_EXTENSION}var g=t(34058);function b(e){const n=e.getSchema(),t=n?n.getTypeMap():Object.create(null),r=Object.create(null);for(const n of e.getDocument().definitions)v(n)&&(r[n.name.value]=!0);const i=[...Object.keys(t),...Object.keys(r)];return{NamedType(n,a,s,c,u){const l=n.name.value;if(!t[l]&&!r[l]){var f;const t=null!==(f=u[2])&&void 0!==f?f:s,r=null!=t&&"kind"in(d=t)&&(function(e){return e.kind===m.b.SCHEMA_DEFINITION||v(e)||e.kind===m.b.DIRECTIVE_DEFINITION}(d)||function(e){return e.kind===m.b.SCHEMA_EXTENSION||T(e)}(d));if(r&&O.includes(l))return;const a=(0,E.x)(l,r?O.concat(i):i);e.reportError(new o.eO(`Unknown type "${l}".`+(0,p.a)(a),{nodes:n}))}var d}}}const O=[...t(50080).YC,...g.V4].map((e=>e.name));var I=t(16003),N=t(99115),y=t(4049),_=t(59847),S=t(14231);function D(e){const n=Object.create(null),t=e.getSchema(),r=t?t.getDirectives():S.rc;for(const e of r)n[e.name]=e.locations;const i=e.getDocument().definitions;for(const e of i)e.kind===m.b.DIRECTIVE_DEFINITION&&(n[e.name.value]=e.locations.map((e=>e.value)));return{Directive(t,r,i,a,s){const c=t.name.value,u=n[c];if(!u)return void e.reportError(new o.eO(`Unknown directive "@${c}".`,{nodes:t}));const l=function(e){const n=e[e.length-1];switch("kind"in n||(0,N.V)(!1),n.kind){case m.b.OPERATION_DEFINITION:return function(e){switch(e){case y.cE.QUERY:return _.H.QUERY;case y.cE.MUTATION:return _.H.MUTATION;case y.cE.SUBSCRIPTION:return _.H.SUBSCRIPTION}}(n.operation);case m.b.FIELD:return _.H.FIELD;case m.b.FRAGMENT_SPREAD:return _.H.FRAGMENT_SPREAD;case m.b.INLINE_FRAGMENT:return _.H.INLINE_FRAGMENT;case m.b.FRAGMENT_DEFINITION:return _.H.FRAGMENT_DEFINITION;case m.b.VARIABLE_DEFINITION:return _.H.VARIABLE_DEFINITION;case m.b.SCHEMA_DEFINITION:case m.b.SCHEMA_EXTENSION:return _.H.SCHEMA;case m.b.SCALAR_TYPE_DEFINITION:case m.b.SCALAR_TYPE_EXTENSION:return _.H.SCALAR;case m.b.OBJECT_TYPE_DEFINITION:case m.b.OBJECT_TYPE_EXTENSION:return _.H.OBJECT;case m.b.FIELD_DEFINITION:return _.H.FIELD_DEFINITION;case m.b.INTERFACE_TYPE_DEFINITION:case m.b.INTERFACE_TYPE_EXTENSION:return _.H.INTERFACE;case m.b.UNION_TYPE_DEFINITION:case m.b.UNION_TYPE_EXTENSION:return _.H.UNION;case m.b.ENUM_TYPE_DEFINITION:case m.b.ENUM_TYPE_EXTENSION:return _.H.ENUM;case m.b.ENUM_VALUE_DEFINITION:return _.H.ENUM_VALUE;case m.b.INPUT_OBJECT_TYPE_DEFINITION:case m.b.INPUT_OBJECT_TYPE_EXTENSION:return _.H.INPUT_OBJECT;case m.b.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||(0,N.V)(!1),n.kind===m.b.INPUT_OBJECT_TYPE_DEFINITION?_.H.INPUT_FIELD_DEFINITION:_.H.ARGUMENT_DEFINITION}default:(0,N.V)(!1,"Unexpected kind: "+(0,I.N)(n.kind))}}(s);l&&!u.includes(l)&&e.reportError(new o.eO(`Directive "@${c}" may not be used on ${l}.`,{nodes:t}))}}}function F(e){const n=Object.create(null),t=e.getSchema(),r=t?t.getDirectives():S.rc;for(const e of r)n[e.name]=!e.isRepeatable;const i=e.getDocument().definitions;for(const e of i)e.kind===m.b.DIRECTIVE_DEFINITION&&(n[e.name.value]=!e.repeatable);const a=Object.create(null),s=Object.create(null);return{enter(t){if(!("directives"in t)||!t.directives)return;let r;if(t.kind===m.b.SCHEMA_DEFINITION||t.kind===m.b.SCHEMA_EXTENSION)r=a;else if(v(t)||T(t)){const e=t.name.value;r=s[e],void 0===r&&(s[e]=r=Object.create(null))}else r=Object.create(null);for(const i of t.directives){const t=i.name.value;n[t]&&(r[t]?e.reportError(new o.eO(`The directive "@${t}" can only be used once at this location.`,{nodes:[r[t],i]})):r[t]=i)}}}}function $(e){const n=e.getSchema(),t=Object.create(null);for(const n of e.getDocument().definitions)v(n)&&(t[n.name.value]=n);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(r){const i=r.name.value,a=t[i],s=null==n?void 0:n.getType(i);let u;if(a?u=w[a.kind]:s&&(l=s,u=(0,c.lg)(l)?m.b.SCALAR_TYPE_EXTENSION:(0,c.YQ)(l)?m.b.OBJECT_TYPE_EXTENSION:(0,c.kD)(l)?m.b.INTERFACE_TYPE_EXTENSION:(0,c.CK)(l)?m.b.UNION_TYPE_EXTENSION:(0,c.oF)(l)?m.b.ENUM_TYPE_EXTENSION:(0,c.qK)(l)?m.b.INPUT_OBJECT_TYPE_EXTENSION:void(0,N.V)(!1,"Unexpected type: "+(0,I.N)(l))),u){if(u!==r.kind){const n=function(e){switch(e){case m.b.SCALAR_TYPE_EXTENSION:return"scalar";case m.b.OBJECT_TYPE_EXTENSION:return"object";case m.b.INTERFACE_TYPE_EXTENSION:return"interface";case m.b.UNION_TYPE_EXTENSION:return"union";case m.b.ENUM_TYPE_EXTENSION:return"enum";case m.b.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,N.V)(!1,"Unexpected kind: "+(0,I.N)(e))}}(r.kind);e.reportError(new o.eO(`Cannot extend non-${n} type "${i}".`,{nodes:a?[a,r]:r}))}}else{const a=Object.keys({...t,...null==n?void 0:n.getTypeMap()}),s=(0,E.x)(i,a);e.reportError(new o.eO(`Cannot extend type "${i}" because it is not defined.`+(0,p.a)(s),{nodes:r.name}))}var l}}const w={[m.b.SCALAR_TYPE_DEFINITION]:m.b.SCALAR_TYPE_EXTENSION,[m.b.OBJECT_TYPE_DEFINITION]:m.b.OBJECT_TYPE_EXTENSION,[m.b.INTERFACE_TYPE_DEFINITION]:m.b.INTERFACE_TYPE_EXTENSION,[m.b.UNION_TYPE_DEFINITION]:m.b.UNION_TYPE_EXTENSION,[m.b.ENUM_TYPE_DEFINITION]:m.b.ENUM_TYPE_EXTENSION,[m.b.INPUT_OBJECT_TYPE_DEFINITION]:m.b.INPUT_OBJECT_TYPE_EXTENSION};function P(e,n){const t=new Map;for(const r of e){const e=n(r),o=t.get(e);void 0===o?t.set(e,[r]):o.push(r)}return t}function A(e){return{Field:n,Directive:n};function n(n){var t;const r=P(null!==(t=n.arguments)&&void 0!==t?t:[],(e=>e.name.value));for(const[n,t]of r)t.length>1&&e.reportError(new o.eO(`There can be only one argument named "${n}".`,{nodes:t.map((e=>e.name))}))}}function R(e){const n=[];let t=Object.create(null);return{ObjectValue:{enter(){n.push(t),t=Object.create(null)},leave(){const e=n.pop();e||(0,N.V)(!1),t=e}},ObjectField(n){const r=n.name.value;t[r]?e.reportError(new o.eO(`There can be only one input field named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name}}}function k(e){return{Document(n){for(const t of n.definitions)if(!h(t)){const n=t.kind===m.b.SCHEMA_DEFINITION||t.kind===m.b.SCHEMA_EXTENSION?"schema":'"'+t.name.value+'"';e.reportError(new o.eO(`The ${n} definition is not executable.`,{nodes:t}))}return!1}}}var C=t(39929),j=t(64121),V=t(79187);function U(e){const n=Object.create(null),t=e.getSchema(),r=t?t.getDirectives():S.rc;for(const e of r)n[e.name]=e.args.map((e=>e.name));const i=e.getDocument().definitions;for(const e of i)if(e.kind===m.b.DIRECTIVE_DEFINITION){var a;const t=null!==(a=e.arguments)&&void 0!==a?a:[];n[e.name.value]=t.map((e=>e.name.value))}return{Directive(t){const r=t.name.value,i=n[r];if(t.arguments&&i)for(const n of t.arguments){const t=n.name.value;if(!i.includes(t)){const a=(0,E.x)(t,i);e.reportError(new o.eO(`Unknown argument "${t}" on directive "@${r}".`+(0,p.a)(a),{nodes:n}))}}return!1}}}function x(e){return{FragmentSpread(n){const t=n.name.value;e.getFragment(t)||e.reportError(new o.eO(`Unknown fragment "${t}".`,{nodes:n.name}))}}}function M(e){const n=[],t=[];return{OperationDefinition:e=>(n.push(e),!1),FragmentDefinition:e=>(t.push(e),!1),Document:{leave(){const r=Object.create(null);for(const t of n)for(const n of e.getRecursivelyReferencedFragments(t))r[n.name.value]=!0;for(const n of t){const t=n.name.value;!0!==r[t]&&e.reportError(new o.eO(`Fragment "${t}" is never used.`,{nodes:n}))}}}}}function Y(e){switch(e.kind){case m.b.OBJECT:return{...e,fields:(n=e.fields,n.map((e=>({...e,value:Y(e.value)}))).sort(((e,n)=>(0,C.p)(e.name.value,n.name.value))))};case m.b.LIST:return{...e,values:e.values.map(Y)};case m.b.INT:case m.b.FLOAT:case m.b.STRING:case m.b.BOOLEAN:case m.b.NULL:case m.b.ENUM:case m.b.VARIABLE:return e}var n}function L(e){return Array.isArray(e)?e.map((([e,n])=>`subfields "${e}" conflict because `+L(n))).join(" and "):e}function X(e,n,t,r,o,i,a,s){if(r.has(a,s,i))return;r.add(a,s,i);const c=e.getFragment(s);if(!c)return;const[u,l]=K(e,t,c);if(a!==u){B(e,n,t,r,o,i,a,u);for(const s of l)X(e,n,t,r,o,i,a,s)}}function H(e,n,t,r,o,i,a,s){if(a===s)return;if(o.has(a,s,i))return;o.add(a,s,i);const c=e.getFragment(a),u=e.getFragment(s);if(!c||!u)return;const[l,f]=K(e,t,c),[d,p]=K(e,t,u);B(e,n,t,r,o,i,l,d);for(const s of p)H(e,n,t,r,o,i,a,s);for(const a of f)H(e,n,t,r,o,i,a,s)}function B(e,n,t,r,o,i,a,s){for(const[c,u]of Object.entries(a)){const a=s[c];if(a)for(const s of u)for(const u of a){const a=G(e,t,r,o,i,c,s,u);a&&n.push(a)}}}function G(e,n,t,r,o,i,a,s){const[u,l,f]=a,[d,p,E]=s,m=o||u!==d&&(0,c.YQ)(u)&&(0,c.YQ)(d);if(!m){const e=l.name.value,n=p.name.value;if(e!==n)return[[i,`"${e}" and "${n}" are different fields`],[l],[p]];if(!function(e,n){const t=e.arguments,r=n.arguments;if(void 0===t||0===t.length)return void 0===r||0===r.length;if(void 0===r||0===r.length)return!1;if(t.length!==r.length)return!1;const o=new Map(r.map((({name:e,value:n})=>[e.value,n])));return t.every((e=>{const n=e.value,t=o.get(e.name.value);return void 0!==t&&J(n)===J(t)}))}(l,p))return[[i,"they have differing arguments"],[l],[p]]}const h=null==f?void 0:f.type,v=null==E?void 0:E.type;if(h&&v&&Q(h,v))return[[i,`they return conflicting types "${(0,I.N)(h)}" and "${(0,I.N)(v)}"`],[l],[p]];const T=l.selectionSet,g=p.selectionSet;if(T&&g){const o=function(e,n,t,r,o,i,a,s,c){const u=[],[l,f]=q(e,n,i,a),[d,p]=q(e,n,s,c);B(e,u,n,t,r,o,l,d);for(const i of p)X(e,u,n,t,r,o,l,i);for(const i of f)X(e,u,n,t,r,o,d,i);for(const i of f)for(const a of p)H(e,u,n,t,r,o,i,a);return u}(e,n,t,r,m,(0,c.MR)(h),T,(0,c.MR)(v),g);return function(e,n,t,r){if(e.length>0)return[[n,e.map((([e])=>e))],[t,...e.map((([,e])=>e)).flat()],[r,...e.map((([,,e])=>e)).flat()]]}(o,i,l,p)}}function J(e){return(0,j.y)(Y(e))}function Q(e,n){return(0,c.Fs)(e)?!(0,c.Fs)(n)||Q(e.ofType,n.ofType):!!(0,c.Fs)(n)||((0,c.bd)(e)?!(0,c.bd)(n)||Q(e.ofType,n.ofType):!!(0,c.bd)(n)||!(!(0,c.zf)(e)&&!(0,c.zf)(n))&&e!==n)}function q(e,n,t,r){const o=n.get(r);if(o)return o;const i=Object.create(null),a=Object.create(null);z(e,t,r,i,a);const s=[i,Object.keys(a)];return n.set(r,s),s}function K(e,n,t){const r=n.get(t.selectionSet);if(r)return r;const o=(0,V.v)(e.getSchema(),t.typeCondition);return q(e,n,o,t.selectionSet)}function z(e,n,t,r,o){for(const i of t.selections)switch(i.kind){case m.b.FIELD:{const e=i.name.value;let t;((0,c.YQ)(n)||(0,c.kD)(n))&&(t=n.getFields()[e]);const o=i.alias?i.alias.value:e;r[o]||(r[o]=[]),r[o].push([n,i,t]);break}case m.b.FRAGMENT_SPREAD:o[i.name.value]=!0;break;case m.b.INLINE_FRAGMENT:{const t=i.typeCondition,a=t?(0,V.v)(e.getSchema(),t):n;z(e,a,i.selectionSet,r,o);break}}}class W{constructor(){this._data=new Map}has(e,n,t){var r;const o=null===(r=this._data.get(e))||void 0===r?void 0:r.get(n);return void 0!==o&&(!!t||t===o)}add(e,n,t){const r=this._data.get(e);void 0===r?this._data.set(e,new Map([[n,t]])):r.set(n,t)}}class Z{constructor(){this._orderedPairSet=new W}has(e,n,t){return e<n?this._orderedPairSet.has(e,n,t):this._orderedPairSet.has(n,e,t)}add(e,n,t){e<n?this._orderedPairSet.add(e,n,t):this._orderedPairSet.add(n,e,t)}}var ee=t(93544),ne=t(48144);function te(e){var n;const t=Object.create(null),r=e.getSchema(),i=null!==(n=null==r?void 0:r.getDirectives())&&void 0!==n?n:S.rc;for(const e of i)t[e.name]=(0,ne.K)(e.args.filter(c.xP),(e=>e.name));const a=e.getDocument().definitions;for(const e of a)if(e.kind===m.b.DIRECTIVE_DEFINITION){var s;const n=null!==(s=e.arguments)&&void 0!==s?s:[];t[e.name.value]=(0,ne.K)(n.filter(re),(e=>e.name.value))}return{Directive:{leave(n){const r=n.name.value,i=t[r];if(i){var a;const t=null!==(a=n.arguments)&&void 0!==a?a:[],s=new Set(t.map((e=>e.name.value)));for(const[t,a]of Object.entries(i))if(!s.has(t)){const i=(0,c.Xj)(a.type)?(0,I.N)(a.type):(0,j.y)(a.type);e.reportError(new o.eO(`Directive "@${r}" argument "${t}" of type "${i}" is required, but it was not provided.`,{nodes:n}))}}}}}}function re(e){return e.type.kind===m.b.NON_NULL_TYPE&&null==e.defaultValue}var oe=t(36220);function ie(e,n,t){var r;const i=null===(r=n.directives)||void 0===r?void 0:r.find((n=>n.name.value===e.name));if(i)return function(e,n,t){var r;const i={},a=null!==(r=n.arguments)&&void 0!==r?r:[],s=(0,ne.K)(a,(e=>e.name.value));for(const r of e.args){const e=r.name,a=r.type,f=s[e];if(!f){if(void 0!==r.defaultValue)i[e]=r.defaultValue;else if((0,c.bd)(a))throw new o.eO(`Argument "${e}" of required type "${(0,I.N)(a)}" was not provided.`,{nodes:n});continue}const d=f.value;let p=d.kind===m.b.NULL;if(d.kind===m.b.VARIABLE){const n=d.name.value;if(null==t||(u=t,l=n,!Object.prototype.hasOwnProperty.call(u,l))){if(void 0!==r.defaultValue)i[e]=r.defaultValue;else if((0,c.bd)(a))throw new o.eO(`Argument "${e}" of required type "${(0,I.N)(a)}" was provided the variable "$${n}" which was not provided a runtime value.`,{nodes:d});continue}p=null==t[n]}if(p&&(0,c.bd)(a))throw new o.eO(`Argument "${e}" of non-null type "${(0,I.N)(a)}" must not be null.`,{nodes:d});const E=(0,oe.i)(d,a,t);if(void 0===E)throw new o.eO(`Argument "${e}" has invalid value ${(0,j.y)(d)}.`,{nodes:d});i[e]=E}var u,l;return i}(e,i,t)}function ae(e,n,t,r,o,i,a){for(const c of o.selections)switch(c.kind){case m.b.FIELD:{if(!se(t,c))continue;const e=(s=c).alias?s.alias.value:s.name.value,n=i.get(e);void 0!==n?n.push(c):i.set(e,[c]);break}case m.b.INLINE_FRAGMENT:if(!se(t,c)||!ce(e,c,r))continue;ae(e,n,t,r,c.selectionSet,i,a);break;case m.b.FRAGMENT_SPREAD:{const o=c.name.value;if(a.has(o)||!se(t,c))continue;a.add(o);const s=n[o];if(!s||!ce(e,s,r))continue;ae(e,n,t,r,s.selectionSet,i,a);break}}var s}function se(e,n){const t=ie(S.MQ,n,e);if(!0===(null==t?void 0:t.if))return!1;const r=ie(S.HQ,n,e);return!1!==(null==r?void 0:r.if)}function ce(e,n,t){const r=n.typeCondition;if(!r)return!0;const o=(0,V.v)(e,r);return o===t||!!(0,c.Lc)(o)&&e.isSubType(o,t)}function ue(e,n){const t=e.getInputType();if(!t)return;const r=(0,c.MR)(t);if((0,c.zf)(r))try{if(void 0===r.parseLiteral(n,void 0)){const r=(0,I.N)(t);e.reportError(new o.eO(`Expected value of type "${r}", found ${(0,j.y)(n)}.`,{nodes:n}))}}catch(r){const i=(0,I.N)(t);r instanceof o.eO?e.reportError(r):e.reportError(new o.eO(`Expected value of type "${i}", found ${(0,j.y)(n)}; `+r.message,{nodes:n,originalError:r}))}else{const r=(0,I.N)(t);e.reportError(new o.eO(`Expected value of type "${r}", found ${(0,j.y)(n)}.`,{nodes:n}))}}function le(e,n,t,r,o){if((0,c.bd)(r)&&!(0,c.bd)(n)){if((null==t||t.kind===m.b.NULL)&&void 0===o)return!1;const i=r.ofType;return(0,ee.sP)(e,n,i)}return(0,ee.sP)(e,n,r)}const fe=Object.freeze([function(e){function n(t,r=Object.create(null),o=0){if(t.kind===m.b.FRAGMENT_SPREAD){const i=t.name.value;if(!0===r[i])return!1;const a=e.getFragment(i);if(!a)return!1;try{return r[i]=!0,n(a,r,o)}finally{r[i]=void 0}}if(t.kind===m.b.FIELD&&("fields"===t.name.value||"interfaces"===t.name.value||"possibleTypes"===t.name.value||"inputFields"===t.name.value)&&++o>=3)return!0;if("selectionSet"in t&&t.selectionSet)for(const e of t.selectionSet.selections)if(n(e,r,o))return!0;return!1}return{Field(t){if(("__schema"===t.name.value||"__type"===t.name.value)&&n(t))return e.reportError(new o.eO("Maximum introspection depth exceeded",{nodes:[t]})),!1}}}]),de=Object.freeze([k,function(e){const n=Object.create(null);return{OperationDefinition(t){const r=t.name;return r&&(n[r.value]?e.reportError(new o.eO(`There can be only one operation named "${r.value}".`,{nodes:[n[r.value],r]})):n[r.value]=r),!1},FragmentDefinition:()=>!1}},function(e){let n=0;return{Document(e){n=e.definitions.filter((e=>e.kind===m.b.OPERATION_DEFINITION)).length},OperationDefinition(t){!t.name&&n>1&&e.reportError(new o.eO("This anonymous operation must be the only defined operation.",{nodes:t}))}}},function(e){return{OperationDefinition(n){if("subscription"===n.operation){const t=e.getSchema(),r=t.getSubscriptionType();if(r){const i=n.name?n.name.value:null,a=Object.create(null),s=e.getDocument(),c=Object.create(null);for(const e of s.definitions)e.kind===m.b.FRAGMENT_DEFINITION&&(c[e.name.value]=e);const u=function(e,n,t,r,o){const i=new Map;return ae(e,n,t,r,o,i,new Set),i}(t,c,a,r,n.selectionSet);if(u.size>1){const n=[...u.values()].slice(1).flat();e.reportError(new o.eO(null!=i?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:n}))}for(const n of u.values())n[0].name.value.startsWith("__")&&e.reportError(new o.eO(null!=i?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:n}))}}}}},b,function(e){return{InlineFragment(n){const t=n.typeCondition;if(t){const n=(0,V.v)(e.getSchema(),t);if(n&&!(0,c.ML)(n)){const n=(0,j.y)(t);e.reportError(new o.eO(`Fragment cannot condition on non composite type "${n}".`,{nodes:t}))}}},FragmentDefinition(n){const t=(0,V.v)(e.getSchema(),n.typeCondition);if(t&&!(0,c.ML)(t)){const t=(0,j.y)(n.typeCondition);e.reportError(new o.eO(`Fragment "${n.name.value}" cannot condition on non composite type "${t}".`,{nodes:n.typeCondition}))}}}},function(e){return{VariableDefinition(n){const t=(0,V.v)(e.getSchema(),n.type);if(void 0!==t&&!(0,c.dX)(t)){const t=n.variable.name.value,r=(0,j.y)(n.type);e.reportError(new o.eO(`Variable "$${t}" cannot be non-input type "${r}".`,{nodes:n.type}))}}}},function(e){return{Field(n){const t=e.getType(),r=n.selectionSet;if(t)if((0,c.zf)((0,c.MR)(t))){if(r){const i=n.name.value,a=(0,I.N)(t);e.reportError(new o.eO(`Field "${i}" must not have a selection since type "${a}" has no subfields.`,{nodes:r}))}}else if(r){if(0===r.selections.length){const r=n.name.value,i=(0,I.N)(t);e.reportError(new o.eO(`Field "${r}" of type "${i}" must have at least one field selected.`,{nodes:n}))}}else{const r=n.name.value,i=(0,I.N)(t);e.reportError(new o.eO(`Field "${r}" of type "${i}" must have a selection of subfields. Did you mean "${r} { ... }"?`,{nodes:n}))}}}},function(e){return{Field(n){const t=e.getParentType();if(t&&!e.getFieldDef()){const r=e.getSchema(),i=n.name.value;let a=(0,p.a)("to use an inline fragment on",function(e,n,t){if(!(0,c.Lc)(n))return[];const r=new Set,o=Object.create(null);for(const a of e.getPossibleTypes(n))if(a.getFields()[t]){r.add(a),o[a.name]=1;for(const e of a.getInterfaces()){var i;e.getFields()[t]&&(r.add(e),o[e.name]=(null!==(i=o[e.name])&&void 0!==i?i:0)+1)}}return[...r].sort(((n,t)=>{const r=o[t.name]-o[n.name];return 0!==r?r:(0,c.kD)(n)&&e.isSubType(n,t)?-1:(0,c.kD)(t)&&e.isSubType(t,n)?1:(0,C.p)(n.name,t.name)})).map((e=>e.name))}(r,t,i));""===a&&(a=(0,p.a)(function(e,n){if((0,c.YQ)(e)||(0,c.kD)(e)){const t=Object.keys(e.getFields());return(0,E.x)(n,t)}return[]}(t,i))),e.reportError(new o.eO(`Cannot query field "${i}" on type "${t.name}".`+a,{nodes:n}))}}}},function(e){const n=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(t){const r=t.name.value;return n[r]?e.reportError(new o.eO(`There can be only one fragment named "${r}".`,{nodes:[n[r],t.name]})):n[r]=t.name,!1}}},x,M,function(e){return{InlineFragment(n){const t=e.getType(),r=e.getParentType();if((0,c.ML)(t)&&(0,c.ML)(r)&&!(0,ee.uI)(e.getSchema(),t,r)){const i=(0,I.N)(r),a=(0,I.N)(t);e.reportError(new o.eO(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${a}".`,{nodes:n}))}},FragmentSpread(n){const t=n.name.value,r=function(e,n){const t=e.getFragment(n);if(t){const n=(0,V.v)(e.getSchema(),t.typeCondition);if((0,c.ML)(n))return n}}(e,t),i=e.getParentType();if(r&&i&&!(0,ee.uI)(e.getSchema(),r,i)){const a=(0,I.N)(i),s=(0,I.N)(r);e.reportError(new o.eO(`Fragment "${t}" cannot be spread here as objects of type "${a}" can never be of type "${s}".`,{nodes:n}))}}}},function(e){const n=Object.create(null),t=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition:e=>(i(e),!1)};function i(a){if(n[a.name.value])return;const s=a.name.value;n[s]=!0;const c=e.getFragmentSpreads(a.selectionSet);if(0!==c.length){r[s]=t.length;for(const n of c){const a=n.name.value,s=r[a];if(t.push(n),void 0===s){const n=e.getFragment(a);n&&i(n)}else{const n=t.slice(s),r=n.slice(0,-1).map((e=>'"'+e.name.value+'"')).join(", ");e.reportError(new o.eO(`Cannot spread fragment "${a}" within itself`+(""!==r?` via ${r}.`:"."),{nodes:n}))}t.pop()}r[s]=void 0}}},function(e){return{OperationDefinition(n){var t;const r=P(null!==(t=n.variableDefinitions)&&void 0!==t?t:[],(e=>e.variable.name.value));for(const[n,t]of r)t.length>1&&e.reportError(new o.eO(`There can be only one variable named "$${n}".`,{nodes:t.map((e=>e.variable.name))}))}}},function(e){let n=Object.create(null);return{OperationDefinition:{enter(){n=Object.create(null)},leave(t){const r=e.getRecursiveVariableUsages(t);for(const{node:i}of r){const r=i.name.value;!0!==n[r]&&e.reportError(new o.eO(t.name?`Variable "$${r}" is not defined by operation "${t.name.value}".`:`Variable "$${r}" is not defined.`,{nodes:[i,t]}))}}},VariableDefinition(e){n[e.variable.name.value]=!0}}},function(e){let n=[];return{OperationDefinition:{enter(){n=[]},leave(t){const r=Object.create(null),i=e.getRecursiveVariableUsages(t);for(const{node:e}of i)r[e.name.value]=!0;for(const i of n){const n=i.variable.name.value;!0!==r[n]&&e.reportError(new o.eO(t.name?`Variable "$${n}" is never used in operation "${t.name.value}".`:`Variable "$${n}" is never used.`,{nodes:i}))}}},VariableDefinition(e){n.push(e)}}},D,F,function(e){return{...U(e),Argument(n){const t=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!t&&r&&i){const t=n.name.value,a=r.args.map((e=>e.name)),s=(0,E.x)(t,a);e.reportError(new o.eO(`Unknown argument "${t}" on field "${i.name}.${r.name}".`+(0,p.a)(s),{nodes:n}))}}}},A,function(e){let n={};return{OperationDefinition:{enter(){n={}}},VariableDefinition(e){n[e.variable.name.value]=e},ListValue(n){const t=(0,c.yl)(e.getParentInputType());if(!(0,c.Fs)(t))return ue(e,n),!1},ObjectValue(t){const r=(0,c.MR)(e.getInputType());if(!(0,c.qK)(r))return ue(e,t),!1;const i=(0,ne.K)(t.fields,(e=>e.name.value));for(const n of Object.values(r.getFields()))if(!i[n.name]&&(0,c.YX)(n)){const i=(0,I.N)(n.type);e.reportError(new o.eO(`Field "${r.name}.${n.name}" of required type "${i}" was not provided.`,{nodes:t}))}r.isOneOf&&function(e,n,t,r,i){var a;const s=Object.keys(r);if(1!==s.length)return void e.reportError(new o.eO(`OneOf Input Object "${t.name}" must specify exactly one key.`,{nodes:[n]}));const c=null===(a=r[s[0]])||void 0===a?void 0:a.value,u=!c||c.kind===m.b.NULL,l=(null==c?void 0:c.kind)===m.b.VARIABLE;if(u)e.reportError(new o.eO(`Field "${t.name}.${s[0]}" must be non-null.`,{nodes:[n]}));else if(l){const r=c.name.value;i[r].type.kind!==m.b.NON_NULL_TYPE&&e.reportError(new o.eO(`Variable "${r}" must be non-nullable to be used for OneOf Input Object "${t.name}".`,{nodes:[n]}))}}(e,t,r,i,n)},ObjectField(n){const t=(0,c.MR)(e.getParentInputType());if(!e.getInputType()&&(0,c.qK)(t)){const r=(0,E.x)(n.name.value,Object.keys(t.getFields()));e.reportError(new o.eO(`Field "${n.name.value}" is not defined by type "${t.name}".`+(0,p.a)(r),{nodes:n}))}},NullValue(n){const t=e.getInputType();(0,c.bd)(t)&&e.reportError(new o.eO(`Expected value of type "${(0,I.N)(t)}", found ${(0,j.y)(n)}.`,{nodes:n}))},EnumValue:n=>ue(e,n),IntValue:n=>ue(e,n),FloatValue:n=>ue(e,n),StringValue:n=>ue(e,n),BooleanValue:n=>ue(e,n)}},function(e){return{...te(e),Field:{leave(n){var t;const r=e.getFieldDef();if(!r)return!1;const i=new Set(null===(t=n.arguments)||void 0===t?void 0:t.map((e=>e.name.value)));for(const t of r.args)if(!i.has(t.name)&&(0,c.xP)(t)){const i=(0,I.N)(t.type);e.reportError(new o.eO(`Field "${r.name}" argument "${t.name}" of type "${i}" is required, but it was not provided.`,{nodes:n}))}}}}},function(e){let n=Object.create(null);return{OperationDefinition:{enter(){n=Object.create(null)},leave(t){const r=e.getRecursiveVariableUsages(t);for(const{node:t,type:i,defaultValue:a,parentType:s}of r){const r=t.name.value,u=n[r];if(u&&i){const n=e.getSchema(),l=(0,V.v)(n,u.type);if(l&&!le(n,l,u.defaultValue,i,a)){const n=(0,I.N)(l),a=(0,I.N)(i);e.reportError(new o.eO(`Variable "$${r}" of type "${n}" used in position expecting type "${a}".`,{nodes:[u,t]}))}(0,c.qK)(s)&&s.isOneOf&&(0,c.wj)(l)&&e.reportError(new o.eO(`Variable "$${r}" is of type "${l}" but must be non-nullable to be used for OneOf Input Object "${s}".`,{nodes:[u,t]}))}}}},VariableDefinition(e){n[e.variable.name.value]=e}}},function(e){const n=new W,t=new Z,r=new Map;return{SelectionSet(i){const a=function(e,n,t,r,o,i){const a=[],[s,c]=q(e,n,o,i);if(function(e,n,t,r,o,i){for(const[a,s]of Object.entries(i))if(s.length>1)for(let i=0;i<s.length;i++)for(let c=i+1;c<s.length;c++){const u=G(e,t,r,o,!1,a,s[i],s[c]);u&&n.push(u)}}(e,a,n,t,r,s),0!==c.length)for(let o=0;o<c.length;o++){X(e,a,n,t,r,!1,s,c[o]);for(let i=o+1;i<c.length;i++)H(e,a,n,t,r,!1,c[o],c[i])}return a}(e,r,n,t,e.getParentType(),i);for(const[[n,t],r,i]of a){const a=L(t);e.reportError(new o.eO(`Fields "${n}" conflict because ${a}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:r.concat(i)}))}}}},R,...fe]);Object.freeze([i,a,s,u,l,function(e){return{DirectiveDefinition(e){var n;const r=null!==(n=e.arguments)&&void 0!==n?n:[];return t(`@${e.name.value}`,r)},InterfaceTypeDefinition:n,InterfaceTypeExtension:n,ObjectTypeDefinition:n,ObjectTypeExtension:n};function n(e){var n;const r=e.name.value,o=null!==(n=e.fields)&&void 0!==n?n:[];for(const e of o){var i;t(`${r}.${e.name.value}`,null!==(i=e.arguments)&&void 0!==i?i:[])}return!1}function t(n,t){const r=P(t,(e=>e.name.value));for(const[t,i]of r)i.length>1&&e.reportError(new o.eO(`Argument "${n}(${t}:)" can only be defined once.`,{nodes:i.map((e=>e.name))}));return!1}},d,b,D,F,$,U,A,R,te]);var pe=t(46228),Ee=t(34627),me=t(99703),he=t(58709);class ve{constructor(e,n){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const e of this.getDocument().definitions)e.kind===m.b.FRAGMENT_DEFINITION&&(n[e.name.value]=e);this._fragments=n}return n[e]}getFragmentSpreads(e){let n=this._fragmentSpreads.get(e);if(!n){n=[];const t=[e];let r;for(;r=t.pop();)for(const e of r.selections)e.kind===m.b.FRAGMENT_SPREAD?n.push(e):e.selectionSet&&t.push(e.selectionSet);this._fragmentSpreads.set(e,n)}return n}getRecursivelyReferencedFragments(e){let n=this._recursivelyReferencedFragments.get(e);if(!n){n=[];const t=Object.create(null),r=[e.selectionSet];let o;for(;o=r.pop();)for(const e of this.getFragmentSpreads(o)){const o=e.name.value;if(!0!==t[o]){t[o]=!0;const e=this.getFragment(o);e&&(n.push(e),r.push(e.selectionSet))}}this._recursivelyReferencedFragments.set(e,n)}return n}}Symbol.toStringTag;class Te extends ve{constructor(e,n,t,r){super(n,r),this._schema=e,this._typeInfo=t,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(e){let n=this._variableUsages.get(e);if(!n){const t=[],r=new he.D(this._schema);(0,Ee.YR)(e,(0,he.S)(r,{VariableDefinition:()=>!1,Variable(e){t.push({node:e,type:r.getInputType(),defaultValue:r.getDefaultValue(),parentType:r.getParentInputType()})}})),n=t,this._variableUsages.set(e,n)}return n}getRecursiveVariableUsages(e){let n=this._recursiveVariableUsages.get(e);if(!n){n=this.getVariableUsages(e);for(const t of this.getRecursivelyReferencedFragments(e))n=n.concat(this.getVariableUsages(t));this._recursiveVariableUsages.set(e,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function ge(e,n,t=de,r,i=new he.D(e)){var a;const s=null!==(a=null==r?void 0:r.maxErrors)&&void 0!==a?a:100;n||(0,pe.U)(!1,"Must provide document."),(0,me.Y)(e);const c=Object.freeze({}),u=[],l=new Te(e,n,i,(e=>{if(u.length>=s)throw u.push(new o.eO("Too many validation errors, error limit reached. Validation aborted.")),c;u.push(e)})),f=(0,Ee.oP)(t.map((e=>e(l))));try{(0,Ee.YR)(n,(0,he.S)(i,f))}catch(e){if(e!==c)throw e}return u}var be=t(26788);function Oe(e){return{Field(n){const t=e.getFieldDef(),r=null==t?void 0:t.deprecationReason;if(t&&null!=r){const i=e.getParentType();null!=i||(0,N.V)(!1),e.reportError(new o.eO(`The field ${i.name}.${t.name} is deprecated. ${r}`,{nodes:n}))}},Argument(n){const t=e.getArgument(),r=null==t?void 0:t.deprecationReason;if(t&&null!=r){const i=e.getDirective();if(null!=i)e.reportError(new o.eO(`Directive "@${i.name}" argument "${t.name}" is deprecated. ${r}`,{nodes:n}));else{const i=e.getParentType(),a=e.getFieldDef();null!=i&&null!=a||(0,N.V)(!1),e.reportError(new o.eO(`Field "${i.name}.${a.name}" argument "${t.name}" is deprecated. ${r}`,{nodes:n}))}}},ObjectField(n){const t=(0,c.MR)(e.getParentInputType());if((0,c.qK)(t)){const r=t.getFields()[n.name.value],i=null==r?void 0:r.deprecationReason;null!=i&&e.reportError(new o.eO(`The input field ${t.name}.${r.name} is deprecated. ${i}`,{nodes:n}))}},EnumValue(n){const t=e.getEnumValue(),r=null==t?void 0:t.deprecationReason;if(t&&null!=r){const i=(0,c.MR)(e.getInputType());null!=i||(0,N.V)(!1),e.reportError(new o.eO(`The enum value "${i.name}.${t.name}" is deprecated. ${r}`,{nodes:n}))}}}}var Ie=t(2629),Ne=t(49181),ye=(t(75909),t(63696),t(78325),Object.defineProperty),_e=(e,n)=>ye(e,"name",{value:n,configurable:!0});const Se=[i,a,s,u,l,d,b,D,F,$,A,R];function De(e,n,t,r,o){const i=de.filter((e=>e!==M&&e!==k&&(!r||e!==x)));return t&&Array.prototype.push.apply(i,t),o&&Array.prototype.push.apply(i,Se),ge(e,n,i).filter((e=>{if(-1!==e.message.indexOf("Unknown directive")&&e.nodes){const n=e.nodes[0];if(n&&n.kind===m.b.DIRECTIVE){const e=n.name.value;if("arguments"===e||"argumentDefinitions"===e)return!1}}return!0}))}_e(De,"validateWithCustomRules");const Fe="Error",$e="Warning",we="Information",Pe="Hint",Ae={[Fe]:1,[$e]:2,[we]:3,[Pe]:4},Re=_e(((e,n)=>{if(!e)throw new Error(n)}),"invariant");function ke(e,n=null,t,r,i){var a,s;let c=null;i&&(e+="string"==typeof i?"\n\n"+i:"\n\n"+i.reduce(((e,n)=>e+((0,j.y)(n)+"\n\n")),""));try{c=(0,be.qg)(e)}catch(n){if(n instanceof o.eO){const t=Ue(null!==(s=null===(a=n.locations)||void 0===a?void 0:a[0])&&void 0!==s?s:{line:0,column:0},e);return[{severity:Ae.Error,message:n.message,source:"GraphQL: Syntax",range:t}]}throw n}return Ce(c,n,t,r)}function Ce(e,n=null,t,r){if(!n)return[];const o=je(De(n,e,t,r),(e=>Ve(e,Ae.Error,"Validation"))),i=je(ge(n,e,[Oe]),(e=>Ve(e,Ae.Warning,"Deprecation")));return o.concat(i)}function je(e,n){return Array.prototype.concat.apply([],e.map(n))}function Ve(e,n,t){if(!e.nodes)return[];const r=[];return e.nodes.forEach((o=>{const i="Variable"!==o.kind&&"name"in o&&void 0!==o.name?o.name:"variable"in o&&void 0!==o.variable?o.variable:o;if(i){Re(e.locations,"GraphQL validation error requires locations.");const o=e.locations[0],a=xe(i),s=o.column+(a.end-a.start);r.push({source:`GraphQL: ${t}`,message:e.message,severity:n,range:new Ne.R(new Ne.P(o.line-1,o.column-1),new Ne.P(o.line-1,s))})}})),r}function Ue(e,n){const t=(0,Ie.o)(),r=t.startState(),o=n.split("\n");Re(o.length>=e.line,"Query text must have more lines than where the error happened");let i=null;for(let n=0;n<e.line;n++)for(i=new Ne.C(o[n]);!i.eol()&&"invalidchar"!==t.token(i,r););Re(i,"Expected Parser stream to be available.");const a=e.line-1,s=i.getStartOfToken(),c=i.getCurrentPosition();return new Ne.R(new Ne.P(a,s),new Ne.P(a,c))}function xe(e){const n=e.loc;return Re(n,"Expected ASTNode to have a location."),n}_e(ke,"getDiagnostics"),_e(Ce,"validateQuery"),_e(je,"mapCat"),_e(Ve,"annotations"),_e(Ue,"getRange"),_e(xe,"getLocation");const Me=["error","warning","information","hint"],Ye={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};r.C.registerHelper("lint","graphql",((e,n)=>ke(e,n.schema,n.validationRules,void 0,n.externalFragments).map((e=>({message:e.message,severity:e.severity?Me[e.severity-1]:Me[0],type:e.source?Ye[e.source]:void 0,from:r.C.Pos(e.range.start.line,e.range.start.character),to:r.C.Pos(e.range.end.line,e.range.end.character)})))))}}]);
1
+ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[874],{49181:(e,n,t)=>{t.d(n,{C:()=>i,P:()=>s,R:()=>a});var r=Object.defineProperty,o=(e,n)=>r(e,"name",{value:n,configurable:!0});class i{constructor(e){this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>0===this._pos,this.peek=()=>this._sourceText.charAt(this._pos)?this._sourceText.charAt(this._pos):null,this.next=()=>{const e=this._sourceText.charAt(this._pos);return this._pos++,e},this.eat=e=>{if(this._testNextCharacter(e))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=e=>{let n=this._testNextCharacter(e),t=!1;for(n&&(t=n,this._start=this._pos);n;)this._pos++,n=this._testNextCharacter(e),t=!0;return t},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=e=>{this._pos=e},this.match=(e,n=!0,t=!1)=>{let r=null,o=null;return"string"==typeof e?(o=new RegExp(e,t?"i":"g").test(this._sourceText.substr(this._pos,e.length)),r=e):e instanceof RegExp&&(o=this._sourceText.slice(this._pos).match(e),r=null==o?void 0:o[0]),!(null==o||!("string"==typeof e||o instanceof Array&&this._sourceText.startsWith(o[0],this._pos)))&&(n&&(this._start=this._pos,r&&r.length&&(this._pos+=r.length)),o)},this.backUp=e=>{this._pos-=e},this.column=()=>this._pos,this.indentation=()=>{const e=this._sourceText.match(/\s*/);let n=0;if(e&&0!==e.length){const t=e[0];let r=0;for(;t.length>r;)9===t.charCodeAt(r)?n+=2:n++,r++}return n},this.current=()=>this._sourceText.slice(this._start,this._pos),this._start=0,this._pos=0,this._sourceText=e}_testNextCharacter(e){const n=this._sourceText.charAt(this._pos);let t=!1;return t="string"==typeof e?n===e:e instanceof RegExp?e.test(n):e(n),t}}o(i,"CharacterStream");class a{constructor(e,n){this.containsPosition=e=>this.start.line===e.line?this.start.character<=e.character:this.end.line===e.line?this.end.character>=e.character:this.start.line<=e.line&&this.end.line>=e.line,this.start=e,this.end=n}setStart(e,n){this.start=new s(e,n)}setEnd(e,n){this.end=new s(e,n)}}o(a,"Range");class s{constructor(e,n){this.lessThanOrEqualTo=e=>this.line<e.line||this.line===e.line&&this.character<=e.character,this.line=e,this.character=n}setLine(e){this.line=e}setCharacter(e){this.character=e}}o(s,"Position")},54874:(e,n,t)=>{var r=t(38950),o=t(4405);function i(e){var n,t,r;const i=e.getSchema(),a=null!==(n=null!==(t=null!==(r=null==i?void 0:i.astNode)&&void 0!==r?r:null==i?void 0:i.getQueryType())&&void 0!==t?t:null==i?void 0:i.getMutationType())&&void 0!==n?n:null==i?void 0:i.getSubscriptionType();let s=0;return{SchemaDefinition(n){a?e.reportError(new o.eO("Cannot define a new schema within a schema extension.",{nodes:n})):(s>0&&e.reportError(new o.eO("Must provide only one schema definition.",{nodes:n})),++s)}}}function a(e){const n=e.getSchema(),t=Object.create(null),r=n?{query:n.getQueryType(),mutation:n.getMutationType(),subscription:n.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(n){var i;const a=null!==(i=n.operationTypes)&&void 0!==i?i:[];for(const n of a){const i=n.operation,a=t[i];r[i]?e.reportError(new o.eO(`Type for ${i} already defined in the schema. It cannot be redefined.`,{nodes:n})):a?e.reportError(new o.eO(`There can be only one ${i} type in schema.`,{nodes:[a,n]})):t[i]=n}return!1}}function s(e){const n=Object.create(null),t=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(r){const i=r.name.value;if(null==t||!t.getType(i))return n[i]?e.reportError(new o.eO(`There can be only one type named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name,!1;e.reportError(new o.eO(`Type "${i}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:r.name}))}}var c=t(85236);function u(e){const n=e.getSchema(),t=n?n.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(n){var i;const a=n.name.value;r[a]||(r[a]=Object.create(null));const s=null!==(i=n.values)&&void 0!==i?i:[],u=r[a];for(const n of s){const r=n.name.value,i=t[a];(0,c.oF)(i)&&i.getValue(r)?e.reportError(new o.eO(`Enum value "${a}.${r}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:n.name})):u[r]?e.reportError(new o.eO(`Enum value "${a}.${r}" can only be defined once.`,{nodes:[u[r],n.name]})):u[r]=n.name}return!1}}function l(e){const n=e.getSchema(),t=n?n.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(n){var i;const a=n.name.value;r[a]||(r[a]=Object.create(null));const s=null!==(i=n.fields)&&void 0!==i?i:[],c=r[a];for(const n of s){const r=n.name.value;f(t[a],r)?e.reportError(new o.eO(`Field "${a}.${r}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:n.name})):c[r]?e.reportError(new o.eO(`Field "${a}.${r}" can only be defined once.`,{nodes:[c[r],n.name]})):c[r]=n.name}return!1}}function f(e,n){return!!((0,c.YQ)(e)||(0,c.kD)(e)||(0,c.qK)(e))&&null!=e.getFields()[n]}function d(e){const n=Object.create(null),t=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(null==t||!t.getDirective(i))return n[i]?e.reportError(new o.eO(`There can be only one directive named "@${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name,!1;e.reportError(new o.eO(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}))}}}var p=t(60758),E=t(30221),m=t(14552);function h(e){return e.kind===m.b.OPERATION_DEFINITION||e.kind===m.b.FRAGMENT_DEFINITION}function v(e){return e.kind===m.b.SCALAR_TYPE_DEFINITION||e.kind===m.b.OBJECT_TYPE_DEFINITION||e.kind===m.b.INTERFACE_TYPE_DEFINITION||e.kind===m.b.UNION_TYPE_DEFINITION||e.kind===m.b.ENUM_TYPE_DEFINITION||e.kind===m.b.INPUT_OBJECT_TYPE_DEFINITION}function T(e){return e.kind===m.b.SCALAR_TYPE_EXTENSION||e.kind===m.b.OBJECT_TYPE_EXTENSION||e.kind===m.b.INTERFACE_TYPE_EXTENSION||e.kind===m.b.UNION_TYPE_EXTENSION||e.kind===m.b.ENUM_TYPE_EXTENSION||e.kind===m.b.INPUT_OBJECT_TYPE_EXTENSION}var g=t(34058);function b(e){const n=e.getSchema(),t=n?n.getTypeMap():Object.create(null),r=Object.create(null);for(const n of e.getDocument().definitions)v(n)&&(r[n.name.value]=!0);const i=[...Object.keys(t),...Object.keys(r)];return{NamedType(n,a,s,c,u){const l=n.name.value;if(!t[l]&&!r[l]){var f;const t=null!==(f=u[2])&&void 0!==f?f:s,r=null!=t&&"kind"in(d=t)&&(function(e){return e.kind===m.b.SCHEMA_DEFINITION||v(e)||e.kind===m.b.DIRECTIVE_DEFINITION}(d)||function(e){return e.kind===m.b.SCHEMA_EXTENSION||T(e)}(d));if(r&&O.includes(l))return;const a=(0,E.x)(l,r?O.concat(i):i);e.reportError(new o.eO(`Unknown type "${l}".`+(0,p.a)(a),{nodes:n}))}var d}}}const O=[...t(50080).YC,...g.V4].map((e=>e.name));var I=t(16003),N=t(99115),y=t(4049),_=t(59847),S=t(14231);function D(e){const n=Object.create(null),t=e.getSchema(),r=t?t.getDirectives():S.rc;for(const e of r)n[e.name]=e.locations;const i=e.getDocument().definitions;for(const e of i)e.kind===m.b.DIRECTIVE_DEFINITION&&(n[e.name.value]=e.locations.map((e=>e.value)));return{Directive(t,r,i,a,s){const c=t.name.value,u=n[c];if(!u)return void e.reportError(new o.eO(`Unknown directive "@${c}".`,{nodes:t}));const l=function(e){const n=e[e.length-1];switch("kind"in n||(0,N.V)(!1),n.kind){case m.b.OPERATION_DEFINITION:return function(e){switch(e){case y.cE.QUERY:return _.H.QUERY;case y.cE.MUTATION:return _.H.MUTATION;case y.cE.SUBSCRIPTION:return _.H.SUBSCRIPTION}}(n.operation);case m.b.FIELD:return _.H.FIELD;case m.b.FRAGMENT_SPREAD:return _.H.FRAGMENT_SPREAD;case m.b.INLINE_FRAGMENT:return _.H.INLINE_FRAGMENT;case m.b.FRAGMENT_DEFINITION:return _.H.FRAGMENT_DEFINITION;case m.b.VARIABLE_DEFINITION:return _.H.VARIABLE_DEFINITION;case m.b.SCHEMA_DEFINITION:case m.b.SCHEMA_EXTENSION:return _.H.SCHEMA;case m.b.SCALAR_TYPE_DEFINITION:case m.b.SCALAR_TYPE_EXTENSION:return _.H.SCALAR;case m.b.OBJECT_TYPE_DEFINITION:case m.b.OBJECT_TYPE_EXTENSION:return _.H.OBJECT;case m.b.FIELD_DEFINITION:return _.H.FIELD_DEFINITION;case m.b.INTERFACE_TYPE_DEFINITION:case m.b.INTERFACE_TYPE_EXTENSION:return _.H.INTERFACE;case m.b.UNION_TYPE_DEFINITION:case m.b.UNION_TYPE_EXTENSION:return _.H.UNION;case m.b.ENUM_TYPE_DEFINITION:case m.b.ENUM_TYPE_EXTENSION:return _.H.ENUM;case m.b.ENUM_VALUE_DEFINITION:return _.H.ENUM_VALUE;case m.b.INPUT_OBJECT_TYPE_DEFINITION:case m.b.INPUT_OBJECT_TYPE_EXTENSION:return _.H.INPUT_OBJECT;case m.b.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||(0,N.V)(!1),n.kind===m.b.INPUT_OBJECT_TYPE_DEFINITION?_.H.INPUT_FIELD_DEFINITION:_.H.ARGUMENT_DEFINITION}default:(0,N.V)(!1,"Unexpected kind: "+(0,I.N)(n.kind))}}(s);l&&!u.includes(l)&&e.reportError(new o.eO(`Directive "@${c}" may not be used on ${l}.`,{nodes:t}))}}}function F(e){const n=Object.create(null),t=e.getSchema(),r=t?t.getDirectives():S.rc;for(const e of r)n[e.name]=!e.isRepeatable;const i=e.getDocument().definitions;for(const e of i)e.kind===m.b.DIRECTIVE_DEFINITION&&(n[e.name.value]=!e.repeatable);const a=Object.create(null),s=Object.create(null);return{enter(t){if(!("directives"in t)||!t.directives)return;let r;if(t.kind===m.b.SCHEMA_DEFINITION||t.kind===m.b.SCHEMA_EXTENSION)r=a;else if(v(t)||T(t)){const e=t.name.value;r=s[e],void 0===r&&(s[e]=r=Object.create(null))}else r=Object.create(null);for(const i of t.directives){const t=i.name.value;n[t]&&(r[t]?e.reportError(new o.eO(`The directive "@${t}" can only be used once at this location.`,{nodes:[r[t],i]})):r[t]=i)}}}}function $(e){const n=e.getSchema(),t=Object.create(null);for(const n of e.getDocument().definitions)v(n)&&(t[n.name.value]=n);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(r){const i=r.name.value,a=t[i],s=null==n?void 0:n.getType(i);let u;if(a?u=w[a.kind]:s&&(l=s,u=(0,c.lg)(l)?m.b.SCALAR_TYPE_EXTENSION:(0,c.YQ)(l)?m.b.OBJECT_TYPE_EXTENSION:(0,c.kD)(l)?m.b.INTERFACE_TYPE_EXTENSION:(0,c.CK)(l)?m.b.UNION_TYPE_EXTENSION:(0,c.oF)(l)?m.b.ENUM_TYPE_EXTENSION:(0,c.qK)(l)?m.b.INPUT_OBJECT_TYPE_EXTENSION:void(0,N.V)(!1,"Unexpected type: "+(0,I.N)(l))),u){if(u!==r.kind){const n=function(e){switch(e){case m.b.SCALAR_TYPE_EXTENSION:return"scalar";case m.b.OBJECT_TYPE_EXTENSION:return"object";case m.b.INTERFACE_TYPE_EXTENSION:return"interface";case m.b.UNION_TYPE_EXTENSION:return"union";case m.b.ENUM_TYPE_EXTENSION:return"enum";case m.b.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,N.V)(!1,"Unexpected kind: "+(0,I.N)(e))}}(r.kind);e.reportError(new o.eO(`Cannot extend non-${n} type "${i}".`,{nodes:a?[a,r]:r}))}}else{const a=Object.keys({...t,...null==n?void 0:n.getTypeMap()}),s=(0,E.x)(i,a);e.reportError(new o.eO(`Cannot extend type "${i}" because it is not defined.`+(0,p.a)(s),{nodes:r.name}))}var l}}const w={[m.b.SCALAR_TYPE_DEFINITION]:m.b.SCALAR_TYPE_EXTENSION,[m.b.OBJECT_TYPE_DEFINITION]:m.b.OBJECT_TYPE_EXTENSION,[m.b.INTERFACE_TYPE_DEFINITION]:m.b.INTERFACE_TYPE_EXTENSION,[m.b.UNION_TYPE_DEFINITION]:m.b.UNION_TYPE_EXTENSION,[m.b.ENUM_TYPE_DEFINITION]:m.b.ENUM_TYPE_EXTENSION,[m.b.INPUT_OBJECT_TYPE_DEFINITION]:m.b.INPUT_OBJECT_TYPE_EXTENSION};function P(e,n){const t=new Map;for(const r of e){const e=n(r),o=t.get(e);void 0===o?t.set(e,[r]):o.push(r)}return t}function A(e){return{Field:n,Directive:n};function n(n){var t;const r=P(null!==(t=n.arguments)&&void 0!==t?t:[],(e=>e.name.value));for(const[n,t]of r)t.length>1&&e.reportError(new o.eO(`There can be only one argument named "${n}".`,{nodes:t.map((e=>e.name))}))}}function R(e){const n=[];let t=Object.create(null);return{ObjectValue:{enter(){n.push(t),t=Object.create(null)},leave(){const e=n.pop();e||(0,N.V)(!1),t=e}},ObjectField(n){const r=n.name.value;t[r]?e.reportError(new o.eO(`There can be only one input field named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name}}}function C(e){return{Document(n){for(const t of n.definitions)if(!h(t)){const n=t.kind===m.b.SCHEMA_DEFINITION||t.kind===m.b.SCHEMA_EXTENSION?"schema":'"'+t.name.value+'"';e.reportError(new o.eO(`The ${n} definition is not executable.`,{nodes:t}))}return!1}}}var k=t(39929),j=t(64121),V=t(79187);function x(e){const n=Object.create(null),t=e.getSchema(),r=t?t.getDirectives():S.rc;for(const e of r)n[e.name]=e.args.map((e=>e.name));const i=e.getDocument().definitions;for(const e of i)if(e.kind===m.b.DIRECTIVE_DEFINITION){var a;const t=null!==(a=e.arguments)&&void 0!==a?a:[];n[e.name.value]=t.map((e=>e.name.value))}return{Directive(t){const r=t.name.value,i=n[r];if(t.arguments&&i)for(const n of t.arguments){const t=n.name.value;if(!i.includes(t)){const a=(0,E.x)(t,i);e.reportError(new o.eO(`Unknown argument "${t}" on directive "@${r}".`+(0,p.a)(a),{nodes:n}))}}return!1}}}function U(e){return{FragmentSpread(n){const t=n.name.value;e.getFragment(t)||e.reportError(new o.eO(`Unknown fragment "${t}".`,{nodes:n.name}))}}}function M(e){const n=[],t=[];return{OperationDefinition:e=>(n.push(e),!1),FragmentDefinition:e=>(t.push(e),!1),Document:{leave(){const r=Object.create(null);for(const t of n)for(const n of e.getRecursivelyReferencedFragments(t))r[n.name.value]=!0;for(const n of t){const t=n.name.value;!0!==r[t]&&e.reportError(new o.eO(`Fragment "${t}" is never used.`,{nodes:n}))}}}}}function Y(e){switch(e.kind){case m.b.OBJECT:return{...e,fields:(n=e.fields,n.map((e=>({...e,value:Y(e.value)}))).sort(((e,n)=>(0,k.p)(e.name.value,n.name.value))))};case m.b.LIST:return{...e,values:e.values.map(Y)};case m.b.INT:case m.b.FLOAT:case m.b.STRING:case m.b.BOOLEAN:case m.b.NULL:case m.b.ENUM:case m.b.VARIABLE:return e}var n}function L(e){return Array.isArray(e)?e.map((([e,n])=>`subfields "${e}" conflict because `+L(n))).join(" and "):e}function X(e,n,t,r,o,i,a,s){if(r.has(a,s,i))return;r.add(a,s,i);const c=e.getFragment(s);if(!c)return;const[u,l]=K(e,t,c);if(a!==u){B(e,n,t,r,o,i,a,u);for(const s of l)X(e,n,t,r,o,i,a,s)}}function H(e,n,t,r,o,i,a,s){if(a===s)return;if(o.has(a,s,i))return;o.add(a,s,i);const c=e.getFragment(a),u=e.getFragment(s);if(!c||!u)return;const[l,f]=K(e,t,c),[d,p]=K(e,t,u);B(e,n,t,r,o,i,l,d);for(const s of p)H(e,n,t,r,o,i,a,s);for(const a of f)H(e,n,t,r,o,i,a,s)}function B(e,n,t,r,o,i,a,s){for(const[c,u]of Object.entries(a)){const a=s[c];if(a)for(const s of u)for(const u of a){const a=G(e,t,r,o,i,c,s,u);a&&n.push(a)}}}function G(e,n,t,r,o,i,a,s){const[u,l,f]=a,[d,p,E]=s,m=o||u!==d&&(0,c.YQ)(u)&&(0,c.YQ)(d);if(!m){const e=l.name.value,n=p.name.value;if(e!==n)return[[i,`"${e}" and "${n}" are different fields`],[l],[p]];if(!function(e,n){const t=e.arguments,r=n.arguments;if(void 0===t||0===t.length)return void 0===r||0===r.length;if(void 0===r||0===r.length)return!1;if(t.length!==r.length)return!1;const o=new Map(r.map((({name:e,value:n})=>[e.value,n])));return t.every((e=>{const n=e.value,t=o.get(e.name.value);return void 0!==t&&J(n)===J(t)}))}(l,p))return[[i,"they have differing arguments"],[l],[p]]}const h=null==f?void 0:f.type,v=null==E?void 0:E.type;if(h&&v&&Q(h,v))return[[i,`they return conflicting types "${(0,I.N)(h)}" and "${(0,I.N)(v)}"`],[l],[p]];const T=l.selectionSet,g=p.selectionSet;if(T&&g){const o=function(e,n,t,r,o,i,a,s,c){const u=[],[l,f]=q(e,n,i,a),[d,p]=q(e,n,s,c);B(e,u,n,t,r,o,l,d);for(const i of p)X(e,u,n,t,r,o,l,i);for(const i of f)X(e,u,n,t,r,o,d,i);for(const i of f)for(const a of p)H(e,u,n,t,r,o,i,a);return u}(e,n,t,r,m,(0,c.MR)(h),T,(0,c.MR)(v),g);return function(e,n,t,r){if(e.length>0)return[[n,e.map((([e])=>e))],[t,...e.map((([,e])=>e)).flat()],[r,...e.map((([,,e])=>e)).flat()]]}(o,i,l,p)}}function J(e){return(0,j.y)(Y(e))}function Q(e,n){return(0,c.Fs)(e)?!(0,c.Fs)(n)||Q(e.ofType,n.ofType):!!(0,c.Fs)(n)||((0,c.bd)(e)?!(0,c.bd)(n)||Q(e.ofType,n.ofType):!!(0,c.bd)(n)||!(!(0,c.zf)(e)&&!(0,c.zf)(n))&&e!==n)}function q(e,n,t,r){const o=n.get(r);if(o)return o;const i=Object.create(null),a=Object.create(null);z(e,t,r,i,a);const s=[i,Object.keys(a)];return n.set(r,s),s}function K(e,n,t){const r=n.get(t.selectionSet);if(r)return r;const o=(0,V.v)(e.getSchema(),t.typeCondition);return q(e,n,o,t.selectionSet)}function z(e,n,t,r,o){for(const i of t.selections)switch(i.kind){case m.b.FIELD:{const e=i.name.value;let t;((0,c.YQ)(n)||(0,c.kD)(n))&&(t=n.getFields()[e]);const o=i.alias?i.alias.value:e;r[o]||(r[o]=[]),r[o].push([n,i,t]);break}case m.b.FRAGMENT_SPREAD:o[i.name.value]=!0;break;case m.b.INLINE_FRAGMENT:{const t=i.typeCondition,a=t?(0,V.v)(e.getSchema(),t):n;z(e,a,i.selectionSet,r,o);break}}}class W{constructor(){this._data=new Map}has(e,n,t){var r;const o=null===(r=this._data.get(e))||void 0===r?void 0:r.get(n);return void 0!==o&&(!!t||t===o)}add(e,n,t){const r=this._data.get(e);void 0===r?this._data.set(e,new Map([[n,t]])):r.set(n,t)}}class Z{constructor(){this._orderedPairSet=new W}has(e,n,t){return e<n?this._orderedPairSet.has(e,n,t):this._orderedPairSet.has(n,e,t)}add(e,n,t){e<n?this._orderedPairSet.add(e,n,t):this._orderedPairSet.add(n,e,t)}}var ee=t(93544),ne=t(48144);function te(e){var n;const t=Object.create(null),r=e.getSchema(),i=null!==(n=null==r?void 0:r.getDirectives())&&void 0!==n?n:S.rc;for(const e of i)t[e.name]=(0,ne.K)(e.args.filter(c.xP),(e=>e.name));const a=e.getDocument().definitions;for(const e of a)if(e.kind===m.b.DIRECTIVE_DEFINITION){var s;const n=null!==(s=e.arguments)&&void 0!==s?s:[];t[e.name.value]=(0,ne.K)(n.filter(re),(e=>e.name.value))}return{Directive:{leave(n){const r=n.name.value,i=t[r];if(i){var a;const t=null!==(a=n.arguments)&&void 0!==a?a:[],s=new Set(t.map((e=>e.name.value)));for(const[t,a]of Object.entries(i))if(!s.has(t)){const i=(0,c.Xj)(a.type)?(0,I.N)(a.type):(0,j.y)(a.type);e.reportError(new o.eO(`Directive "@${r}" argument "${t}" of type "${i}" is required, but it was not provided.`,{nodes:n}))}}}}}}function re(e){return e.type.kind===m.b.NON_NULL_TYPE&&null==e.defaultValue}var oe=t(36220);function ie(e,n,t){var r;const i=null===(r=n.directives)||void 0===r?void 0:r.find((n=>n.name.value===e.name));if(i)return function(e,n,t){var r;const i={},a=null!==(r=n.arguments)&&void 0!==r?r:[],s=(0,ne.K)(a,(e=>e.name.value));for(const r of e.args){const e=r.name,a=r.type,f=s[e];if(!f){if(void 0!==r.defaultValue)i[e]=r.defaultValue;else if((0,c.bd)(a))throw new o.eO(`Argument "${e}" of required type "${(0,I.N)(a)}" was not provided.`,{nodes:n});continue}const d=f.value;let p=d.kind===m.b.NULL;if(d.kind===m.b.VARIABLE){const n=d.name.value;if(null==t||(u=t,l=n,!Object.prototype.hasOwnProperty.call(u,l))){if(void 0!==r.defaultValue)i[e]=r.defaultValue;else if((0,c.bd)(a))throw new o.eO(`Argument "${e}" of required type "${(0,I.N)(a)}" was provided the variable "$${n}" which was not provided a runtime value.`,{nodes:d});continue}p=null==t[n]}if(p&&(0,c.bd)(a))throw new o.eO(`Argument "${e}" of non-null type "${(0,I.N)(a)}" must not be null.`,{nodes:d});const E=(0,oe.i)(d,a,t);if(void 0===E)throw new o.eO(`Argument "${e}" has invalid value ${(0,j.y)(d)}.`,{nodes:d});i[e]=E}var u,l;return i}(e,i,t)}function ae(e,n,t,r,o,i,a){for(const c of o.selections)switch(c.kind){case m.b.FIELD:{if(!se(t,c))continue;const e=(s=c).alias?s.alias.value:s.name.value,n=i.get(e);void 0!==n?n.push(c):i.set(e,[c]);break}case m.b.INLINE_FRAGMENT:if(!se(t,c)||!ce(e,c,r))continue;ae(e,n,t,r,c.selectionSet,i,a);break;case m.b.FRAGMENT_SPREAD:{const o=c.name.value;if(a.has(o)||!se(t,c))continue;a.add(o);const s=n[o];if(!s||!ce(e,s,r))continue;ae(e,n,t,r,s.selectionSet,i,a);break}}var s}function se(e,n){const t=ie(S.MQ,n,e);if(!0===(null==t?void 0:t.if))return!1;const r=ie(S.HQ,n,e);return!1!==(null==r?void 0:r.if)}function ce(e,n,t){const r=n.typeCondition;if(!r)return!0;const o=(0,V.v)(e,r);return o===t||!!(0,c.Lc)(o)&&e.isSubType(o,t)}function ue(e,n){const t=e.getInputType();if(!t)return;const r=(0,c.MR)(t);if((0,c.zf)(r))try{if(void 0===r.parseLiteral(n,void 0)){const r=(0,I.N)(t);e.reportError(new o.eO(`Expected value of type "${r}", found ${(0,j.y)(n)}.`,{nodes:n}))}}catch(r){const i=(0,I.N)(t);r instanceof o.eO?e.reportError(r):e.reportError(new o.eO(`Expected value of type "${i}", found ${(0,j.y)(n)}; `+r.message,{nodes:n,originalError:r}))}else{const r=(0,I.N)(t);e.reportError(new o.eO(`Expected value of type "${r}", found ${(0,j.y)(n)}.`,{nodes:n}))}}function le(e,n,t,r,o){if((0,c.bd)(r)&&!(0,c.bd)(n)){if((null==t||t.kind===m.b.NULL)&&void 0===o)return!1;const i=r.ofType;return(0,ee.sP)(e,n,i)}return(0,ee.sP)(e,n,r)}const fe=Object.freeze([function(e){function n(t,r=Object.create(null),o=0){if(t.kind===m.b.FRAGMENT_SPREAD){const i=t.name.value;if(!0===r[i])return!1;const a=e.getFragment(i);if(!a)return!1;try{return r[i]=!0,n(a,r,o)}finally{r[i]=void 0}}if(t.kind===m.b.FIELD&&("fields"===t.name.value||"interfaces"===t.name.value||"possibleTypes"===t.name.value||"inputFields"===t.name.value)&&++o>=3)return!0;if("selectionSet"in t&&t.selectionSet)for(const e of t.selectionSet.selections)if(n(e,r,o))return!0;return!1}return{Field(t){if(("__schema"===t.name.value||"__type"===t.name.value)&&n(t))return e.reportError(new o.eO("Maximum introspection depth exceeded",{nodes:[t]})),!1}}}]),de=Object.freeze([C,function(e){const n=Object.create(null);return{OperationDefinition(t){const r=t.name;return r&&(n[r.value]?e.reportError(new o.eO(`There can be only one operation named "${r.value}".`,{nodes:[n[r.value],r]})):n[r.value]=r),!1},FragmentDefinition:()=>!1}},function(e){let n=0;return{Document(e){n=e.definitions.filter((e=>e.kind===m.b.OPERATION_DEFINITION)).length},OperationDefinition(t){!t.name&&n>1&&e.reportError(new o.eO("This anonymous operation must be the only defined operation.",{nodes:t}))}}},function(e){return{OperationDefinition(n){if("subscription"===n.operation){const t=e.getSchema(),r=t.getSubscriptionType();if(r){const i=n.name?n.name.value:null,a=Object.create(null),s=e.getDocument(),c=Object.create(null);for(const e of s.definitions)e.kind===m.b.FRAGMENT_DEFINITION&&(c[e.name.value]=e);const u=function(e,n,t,r,o){const i=new Map;return ae(e,n,t,r,o,i,new Set),i}(t,c,a,r,n.selectionSet);if(u.size>1){const n=[...u.values()].slice(1).flat();e.reportError(new o.eO(null!=i?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:n}))}for(const n of u.values())n[0].name.value.startsWith("__")&&e.reportError(new o.eO(null!=i?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:n}))}}}}},b,function(e){return{InlineFragment(n){const t=n.typeCondition;if(t){const n=(0,V.v)(e.getSchema(),t);if(n&&!(0,c.ML)(n)){const n=(0,j.y)(t);e.reportError(new o.eO(`Fragment cannot condition on non composite type "${n}".`,{nodes:t}))}}},FragmentDefinition(n){const t=(0,V.v)(e.getSchema(),n.typeCondition);if(t&&!(0,c.ML)(t)){const t=(0,j.y)(n.typeCondition);e.reportError(new o.eO(`Fragment "${n.name.value}" cannot condition on non composite type "${t}".`,{nodes:n.typeCondition}))}}}},function(e){return{VariableDefinition(n){const t=(0,V.v)(e.getSchema(),n.type);if(void 0!==t&&!(0,c.dX)(t)){const t=n.variable.name.value,r=(0,j.y)(n.type);e.reportError(new o.eO(`Variable "$${t}" cannot be non-input type "${r}".`,{nodes:n.type}))}}}},function(e){return{Field(n){const t=e.getType(),r=n.selectionSet;if(t)if((0,c.zf)((0,c.MR)(t))){if(r){const i=n.name.value,a=(0,I.N)(t);e.reportError(new o.eO(`Field "${i}" must not have a selection since type "${a}" has no subfields.`,{nodes:r}))}}else if(r){if(0===r.selections.length){const r=n.name.value,i=(0,I.N)(t);e.reportError(new o.eO(`Field "${r}" of type "${i}" must have at least one field selected.`,{nodes:n}))}}else{const r=n.name.value,i=(0,I.N)(t);e.reportError(new o.eO(`Field "${r}" of type "${i}" must have a selection of subfields. Did you mean "${r} { ... }"?`,{nodes:n}))}}}},function(e){return{Field(n){const t=e.getParentType();if(t&&!e.getFieldDef()){const r=e.getSchema(),i=n.name.value;let a=(0,p.a)("to use an inline fragment on",function(e,n,t){if(!(0,c.Lc)(n))return[];const r=new Set,o=Object.create(null);for(const a of e.getPossibleTypes(n))if(a.getFields()[t]){r.add(a),o[a.name]=1;for(const e of a.getInterfaces()){var i;e.getFields()[t]&&(r.add(e),o[e.name]=(null!==(i=o[e.name])&&void 0!==i?i:0)+1)}}return[...r].sort(((n,t)=>{const r=o[t.name]-o[n.name];return 0!==r?r:(0,c.kD)(n)&&e.isSubType(n,t)?-1:(0,c.kD)(t)&&e.isSubType(t,n)?1:(0,k.p)(n.name,t.name)})).map((e=>e.name))}(r,t,i));""===a&&(a=(0,p.a)(function(e,n){if((0,c.YQ)(e)||(0,c.kD)(e)){const t=Object.keys(e.getFields());return(0,E.x)(n,t)}return[]}(t,i))),e.reportError(new o.eO(`Cannot query field "${i}" on type "${t.name}".`+a,{nodes:n}))}}}},function(e){const n=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(t){const r=t.name.value;return n[r]?e.reportError(new o.eO(`There can be only one fragment named "${r}".`,{nodes:[n[r],t.name]})):n[r]=t.name,!1}}},U,M,function(e){return{InlineFragment(n){const t=e.getType(),r=e.getParentType();if((0,c.ML)(t)&&(0,c.ML)(r)&&!(0,ee.uI)(e.getSchema(),t,r)){const i=(0,I.N)(r),a=(0,I.N)(t);e.reportError(new o.eO(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${a}".`,{nodes:n}))}},FragmentSpread(n){const t=n.name.value,r=function(e,n){const t=e.getFragment(n);if(t){const n=(0,V.v)(e.getSchema(),t.typeCondition);if((0,c.ML)(n))return n}}(e,t),i=e.getParentType();if(r&&i&&!(0,ee.uI)(e.getSchema(),r,i)){const a=(0,I.N)(i),s=(0,I.N)(r);e.reportError(new o.eO(`Fragment "${t}" cannot be spread here as objects of type "${a}" can never be of type "${s}".`,{nodes:n}))}}}},function(e){const n=Object.create(null),t=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition:e=>(i(e),!1)};function i(a){if(n[a.name.value])return;const s=a.name.value;n[s]=!0;const c=e.getFragmentSpreads(a.selectionSet);if(0!==c.length){r[s]=t.length;for(const n of c){const a=n.name.value,s=r[a];if(t.push(n),void 0===s){const n=e.getFragment(a);n&&i(n)}else{const n=t.slice(s),r=n.slice(0,-1).map((e=>'"'+e.name.value+'"')).join(", ");e.reportError(new o.eO(`Cannot spread fragment "${a}" within itself`+(""!==r?` via ${r}.`:"."),{nodes:n}))}t.pop()}r[s]=void 0}}},function(e){return{OperationDefinition(n){var t;const r=P(null!==(t=n.variableDefinitions)&&void 0!==t?t:[],(e=>e.variable.name.value));for(const[n,t]of r)t.length>1&&e.reportError(new o.eO(`There can be only one variable named "$${n}".`,{nodes:t.map((e=>e.variable.name))}))}}},function(e){let n=Object.create(null);return{OperationDefinition:{enter(){n=Object.create(null)},leave(t){const r=e.getRecursiveVariableUsages(t);for(const{node:i}of r){const r=i.name.value;!0!==n[r]&&e.reportError(new o.eO(t.name?`Variable "$${r}" is not defined by operation "${t.name.value}".`:`Variable "$${r}" is not defined.`,{nodes:[i,t]}))}}},VariableDefinition(e){n[e.variable.name.value]=!0}}},function(e){let n=[];return{OperationDefinition:{enter(){n=[]},leave(t){const r=Object.create(null),i=e.getRecursiveVariableUsages(t);for(const{node:e}of i)r[e.name.value]=!0;for(const i of n){const n=i.variable.name.value;!0!==r[n]&&e.reportError(new o.eO(t.name?`Variable "$${n}" is never used in operation "${t.name.value}".`:`Variable "$${n}" is never used.`,{nodes:i}))}}},VariableDefinition(e){n.push(e)}}},D,F,function(e){return{...x(e),Argument(n){const t=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!t&&r&&i){const t=n.name.value,a=r.args.map((e=>e.name)),s=(0,E.x)(t,a);e.reportError(new o.eO(`Unknown argument "${t}" on field "${i.name}.${r.name}".`+(0,p.a)(s),{nodes:n}))}}}},A,function(e){let n={};return{OperationDefinition:{enter(){n={}}},VariableDefinition(e){n[e.variable.name.value]=e},ListValue(n){const t=(0,c.yl)(e.getParentInputType());if(!(0,c.Fs)(t))return ue(e,n),!1},ObjectValue(n){const t=(0,c.MR)(e.getInputType());if(!(0,c.qK)(t))return ue(e,n),!1;const r=(0,ne.K)(n.fields,(e=>e.name.value));for(const i of Object.values(t.getFields()))if(!r[i.name]&&(0,c.YX)(i)){const r=(0,I.N)(i.type);e.reportError(new o.eO(`Field "${t.name}.${i.name}" of required type "${r}" was not provided.`,{nodes:n}))}t.isOneOf&&function(e,n,t,r){var i;const a=Object.keys(r);if(1!==a.length)return void e.reportError(new o.eO(`OneOf Input Object "${t.name}" must specify exactly one key.`,{nodes:[n]}));const s=null===(i=r[a[0]])||void 0===i?void 0:i.value;s&&s.kind!==m.b.NULL||e.reportError(new o.eO(`Field "${t.name}.${a[0]}" must be non-null.`,{nodes:[n]}))}(e,n,t,r)},ObjectField(n){const t=(0,c.MR)(e.getParentInputType());if(!e.getInputType()&&(0,c.qK)(t)){const r=(0,E.x)(n.name.value,Object.keys(t.getFields()));e.reportError(new o.eO(`Field "${n.name.value}" is not defined by type "${t.name}".`+(0,p.a)(r),{nodes:n}))}},NullValue(n){const t=e.getInputType();(0,c.bd)(t)&&e.reportError(new o.eO(`Expected value of type "${(0,I.N)(t)}", found ${(0,j.y)(n)}.`,{nodes:n}))},EnumValue:n=>ue(e,n),IntValue:n=>ue(e,n),FloatValue:n=>ue(e,n),StringValue:n=>ue(e,n),BooleanValue:n=>ue(e,n)}},function(e){return{...te(e),Field:{leave(n){var t;const r=e.getFieldDef();if(!r)return!1;const i=new Set(null===(t=n.arguments)||void 0===t?void 0:t.map((e=>e.name.value)));for(const t of r.args)if(!i.has(t.name)&&(0,c.xP)(t)){const i=(0,I.N)(t.type);e.reportError(new o.eO(`Field "${r.name}" argument "${t.name}" of type "${i}" is required, but it was not provided.`,{nodes:n}))}}}}},function(e){let n=Object.create(null);return{OperationDefinition:{enter(){n=Object.create(null)},leave(t){const r=e.getRecursiveVariableUsages(t);for(const{node:t,type:i,defaultValue:a,parentType:s}of r){const r=t.name.value,u=n[r];if(u&&i){const n=e.getSchema(),l=(0,V.v)(n,u.type);if(l&&!le(n,l,u.defaultValue,i,a)){const n=(0,I.N)(l),a=(0,I.N)(i);e.reportError(new o.eO(`Variable "$${r}" of type "${n}" used in position expecting type "${a}".`,{nodes:[u,t]}))}(0,c.qK)(s)&&s.isOneOf&&(0,c.wj)(l)&&e.reportError(new o.eO(`Variable "$${r}" is of type "${l}" but must be non-nullable to be used for OneOf Input Object "${s}".`,{nodes:[u,t]}))}}}},VariableDefinition(e){n[e.variable.name.value]=e}}},function(e){const n=new W,t=new Z,r=new Map;return{SelectionSet(i){const a=function(e,n,t,r,o,i){const a=[],[s,c]=q(e,n,o,i);if(function(e,n,t,r,o,i){for(const[a,s]of Object.entries(i))if(s.length>1)for(let i=0;i<s.length;i++)for(let c=i+1;c<s.length;c++){const u=G(e,t,r,o,!1,a,s[i],s[c]);u&&n.push(u)}}(e,a,n,t,r,s),0!==c.length)for(let o=0;o<c.length;o++){X(e,a,n,t,r,!1,s,c[o]);for(let i=o+1;i<c.length;i++)H(e,a,n,t,r,!1,c[o],c[i])}return a}(e,r,n,t,e.getParentType(),i);for(const[[n,t],r,i]of a){const a=L(t);e.reportError(new o.eO(`Fields "${n}" conflict because ${a}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:r.concat(i)}))}}}},R,...fe]);Object.freeze([i,a,s,u,l,function(e){return{DirectiveDefinition(e){var n;const r=null!==(n=e.arguments)&&void 0!==n?n:[];return t(`@${e.name.value}`,r)},InterfaceTypeDefinition:n,InterfaceTypeExtension:n,ObjectTypeDefinition:n,ObjectTypeExtension:n};function n(e){var n;const r=e.name.value,o=null!==(n=e.fields)&&void 0!==n?n:[];for(const e of o){var i;t(`${r}.${e.name.value}`,null!==(i=e.arguments)&&void 0!==i?i:[])}return!1}function t(n,t){const r=P(t,(e=>e.name.value));for(const[t,i]of r)i.length>1&&e.reportError(new o.eO(`Argument "${n}(${t}:)" can only be defined once.`,{nodes:i.map((e=>e.name))}));return!1}},d,b,D,F,$,x,A,R,te]);var pe=t(46228),Ee=t(34627),me=t(99703),he=t(58709);class ve{constructor(e,n){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const e of this.getDocument().definitions)e.kind===m.b.FRAGMENT_DEFINITION&&(n[e.name.value]=e);this._fragments=n}return n[e]}getFragmentSpreads(e){let n=this._fragmentSpreads.get(e);if(!n){n=[];const t=[e];let r;for(;r=t.pop();)for(const e of r.selections)e.kind===m.b.FRAGMENT_SPREAD?n.push(e):e.selectionSet&&t.push(e.selectionSet);this._fragmentSpreads.set(e,n)}return n}getRecursivelyReferencedFragments(e){let n=this._recursivelyReferencedFragments.get(e);if(!n){n=[];const t=Object.create(null),r=[e.selectionSet];let o;for(;o=r.pop();)for(const e of this.getFragmentSpreads(o)){const o=e.name.value;if(!0!==t[o]){t[o]=!0;const e=this.getFragment(o);e&&(n.push(e),r.push(e.selectionSet))}}this._recursivelyReferencedFragments.set(e,n)}return n}}Symbol.toStringTag;class Te extends ve{constructor(e,n,t,r){super(n,r),this._schema=e,this._typeInfo=t,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(e){let n=this._variableUsages.get(e);if(!n){const t=[],r=new he.D(this._schema);(0,Ee.YR)(e,(0,he.S)(r,{VariableDefinition:()=>!1,Variable(e){t.push({node:e,type:r.getInputType(),defaultValue:r.getDefaultValue(),parentType:r.getParentInputType()})}})),n=t,this._variableUsages.set(e,n)}return n}getRecursiveVariableUsages(e){let n=this._recursiveVariableUsages.get(e);if(!n){n=this.getVariableUsages(e);for(const t of this.getRecursivelyReferencedFragments(e))n=n.concat(this.getVariableUsages(t));this._recursiveVariableUsages.set(e,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function ge(e,n,t=de,r,i=new he.D(e)){var a;const s=null!==(a=null==r?void 0:r.maxErrors)&&void 0!==a?a:100;n||(0,pe.U)(!1,"Must provide document."),(0,me.Y)(e);const c=Object.freeze({}),u=[],l=new Te(e,n,i,(e=>{if(u.length>=s)throw u.push(new o.eO("Too many validation errors, error limit reached. Validation aborted.")),c;u.push(e)})),f=(0,Ee.oP)(t.map((e=>e(l))));try{(0,Ee.YR)(n,(0,he.S)(i,f))}catch(e){if(e!==c)throw e}return u}var be=t(26788);function Oe(e){return{Field(n){const t=e.getFieldDef(),r=null==t?void 0:t.deprecationReason;if(t&&null!=r){const i=e.getParentType();null!=i||(0,N.V)(!1),e.reportError(new o.eO(`The field ${i.name}.${t.name} is deprecated. ${r}`,{nodes:n}))}},Argument(n){const t=e.getArgument(),r=null==t?void 0:t.deprecationReason;if(t&&null!=r){const i=e.getDirective();if(null!=i)e.reportError(new o.eO(`Directive "@${i.name}" argument "${t.name}" is deprecated. ${r}`,{nodes:n}));else{const i=e.getParentType(),a=e.getFieldDef();null!=i&&null!=a||(0,N.V)(!1),e.reportError(new o.eO(`Field "${i.name}.${a.name}" argument "${t.name}" is deprecated. ${r}`,{nodes:n}))}}},ObjectField(n){const t=(0,c.MR)(e.getParentInputType());if((0,c.qK)(t)){const r=t.getFields()[n.name.value],i=null==r?void 0:r.deprecationReason;null!=i&&e.reportError(new o.eO(`The input field ${t.name}.${r.name} is deprecated. ${i}`,{nodes:n}))}},EnumValue(n){const t=e.getEnumValue(),r=null==t?void 0:t.deprecationReason;if(t&&null!=r){const i=(0,c.MR)(e.getInputType());null!=i||(0,N.V)(!1),e.reportError(new o.eO(`The enum value "${i.name}.${t.name}" is deprecated. ${r}`,{nodes:n}))}}}}var Ie=t(2629),Ne=t(49181),ye=(t(75909),t(63696),t(78325),Object.defineProperty),_e=(e,n)=>ye(e,"name",{value:n,configurable:!0});const Se=[i,a,s,u,l,d,b,D,F,$,A,R];function De(e,n,t,r,o){const i=de.filter((e=>e!==M&&e!==C&&(!r||e!==U)));return t&&Array.prototype.push.apply(i,t),o&&Array.prototype.push.apply(i,Se),ge(e,n,i).filter((e=>{if(-1!==e.message.indexOf("Unknown directive")&&e.nodes){const n=e.nodes[0];if(n&&n.kind===m.b.DIRECTIVE){const e=n.name.value;if("arguments"===e||"argumentDefinitions"===e)return!1}}return!0}))}_e(De,"validateWithCustomRules");const Fe="Error",$e="Warning",we="Information",Pe="Hint",Ae={[Fe]:1,[$e]:2,[we]:3,[Pe]:4},Re=_e(((e,n)=>{if(!e)throw new Error(n)}),"invariant");function Ce(e,n=null,t,r,i){var a,s;let c=null;i&&(e+="string"==typeof i?"\n\n"+i:"\n\n"+i.reduce(((e,n)=>e+((0,j.y)(n)+"\n\n")),""));try{c=(0,be.qg)(e)}catch(n){if(n instanceof o.eO){const t=xe(null!==(s=null===(a=n.locations)||void 0===a?void 0:a[0])&&void 0!==s?s:{line:0,column:0},e);return[{severity:Ae.Error,message:n.message,source:"GraphQL: Syntax",range:t}]}throw n}return ke(c,n,t,r)}function ke(e,n=null,t,r){if(!n)return[];const o=je(De(n,e,t,r),(e=>Ve(e,Ae.Error,"Validation"))),i=je(ge(n,e,[Oe]),(e=>Ve(e,Ae.Warning,"Deprecation")));return o.concat(i)}function je(e,n){return Array.prototype.concat.apply([],e.map(n))}function Ve(e,n,t){if(!e.nodes)return[];const r=[];return e.nodes.forEach((o=>{const i="Variable"!==o.kind&&"name"in o&&void 0!==o.name?o.name:"variable"in o&&void 0!==o.variable?o.variable:o;if(i){Re(e.locations,"GraphQL validation error requires locations.");const o=e.locations[0],a=Ue(i),s=o.column+(a.end-a.start);r.push({source:`GraphQL: ${t}`,message:e.message,severity:n,range:new Ne.R(new Ne.P(o.line-1,o.column-1),new Ne.P(o.line-1,s))})}})),r}function xe(e,n){const t=(0,Ie.o)(),r=t.startState(),o=n.split("\n");Re(o.length>=e.line,"Query text must have more lines than where the error happened");let i=null;for(let n=0;n<e.line;n++)for(i=new Ne.C(o[n]);!i.eol()&&"invalidchar"!==t.token(i,r););Re(i,"Expected Parser stream to be available.");const a=e.line-1,s=i.getStartOfToken(),c=i.getCurrentPosition();return new Ne.R(new Ne.P(a,s),new Ne.P(a,c))}function Ue(e){const n=e.loc;return Re(n,"Expected ASTNode to have a location."),n}_e(Ce,"getDiagnostics"),_e(ke,"validateQuery"),_e(je,"mapCat"),_e(Ve,"annotations"),_e(xe,"getRange"),_e(Ue,"getLocation");const Me=["error","warning","information","hint"],Ye={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};r.C.registerHelper("lint","graphql",((e,n)=>Ce(e,n.schema,n.validationRules,void 0,n.externalFragments).map((e=>({message:e.message,severity:e.severity?Me[e.severity-1]:Me[0],type:e.source?Ye[e.source]:void 0,from:r.C.Pos(e.range.start.line,e.range.start.character),to:r.C.Pos(e.range.end.line,e.range.end.character)})))))}}]);