@fugood/bricks-cli 2.25.5-beta.1 → 2.25.5-beta.2

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.
package/lib/lib.js CHANGED
@@ -999,7 +999,7 @@ ${t1}`);return r.cause=e,r},t2=ea(function e(t,a){var r,i=this;et(this,e),this.b
999
999
  <p>${rL(a)}</p>
1000
1000
  </main>
1001
1001
  </body>
1002
- </html>`,rM=r$({title:"Signed in to BRICKS",heading:"Signed in to BRICKS",message:"You can close this tab now."}),rU=e=>r$({title:"Sign-in failed",heading:"Sign-in failed",message:e}),rB="Sign-in cancelled",rq=(G=ee(function*({onAuthorizeUrl:e,signal:t}={}){if(t?.aborted)throw Error(rB);var a,r,i,n,p,o=(a=ay.randomBytes(32).toString("base64url"),r=ay.createHash("sha256").update(a).digest("base64url"),{verifier:a,challenge:r}),d=o.verifier,s=o.challenge,l=ay.randomBytes(16).toString("base64url"),u=process.env.BRICKS_OAUTH_CALLBACK_PORT,c=null!=u&&""!==u?Number(u):8535,m=new Promise((e,t)=>{i=e,n=t}),f=e8.createServer((e,t)=>{var a=new URL(e.url,`http://${rC}`);if(a.pathname!==rx)return void t.writeHead(404).end();var r=a.searchParams.get("error"),p=a.searchParams.get("code");if(a.searchParams.get("state")!==l)return void t.writeHead(400,{"Content-Type":"text/html"}).end(rU("Invalid state"));if(r){var o=a.searchParams.get("error_description")||r;t.writeHead(200,{"Content-Type":"text/html"}).end(rU(o)),n(Error(o));return}if(!p){t.writeHead(400,{"Content-Type":"text/html"}).end(rU("Invalid state")),n(Error("OAuth callback did not include an authorization code"));return}t.writeHead(200,{"Content-Type":"text/html"}).end(rM),i(p)}),h=yield new Promise((e,t)=>{f.once("error",e=>{e?.code==="EADDRINUSE"?t(Error(`Callback port ${c} is already in use — is another sign-in in progress? Close it and retry.`)):t(e)}),f.listen(c,rC,()=>e(f.address().port))}),v=`http://${rC}:${h}${rx}`,y=(({redirectUri:e,state:t,challenge:a})=>{var r=new URL(`https://${rD}/authorize`);return r.searchParams.set("response_type","code"),r.searchParams.set("client_id",rk),r.searchParams.set("redirect_uri",e),r.searchParams.set("scope",rA),r.searchParams.set("audience",rI),r.searchParams.set("state",t),r.searchParams.set("code_challenge",a),r.searchParams.set("code_challenge_method","S256"),r.toString()})({redirectUri:v,state:l,challenge:s}),g=()=>n(Error(rB));t?.addEventListener("abort",g,{once:!0});try{var _=new Promise((e,t)=>{p=setTimeout(()=>t(Error("Timed out waiting for the browser sign-in (5 minutes)")),3e5)}),b=e?Promise.resolve().then(()=>e(y)):Promise.resolve(),w=yield Promise.all([Promise.race([b,_]),Promise.race([m,_])]),E=ae(w,2)[1];return yield rP("/oauth/token",{grant_type:"authorization_code",client_id:rk,code:E,code_verifier:d,redirect_uri:v})}finally{p&&clearTimeout(p),t?.removeEventListener("abort",g),yield new Promise(e=>{f.close(e),f.closeIdleConnections?.()})}}),function(){return G.apply(this,arguments)}),rQ=(z=ee(function*(){return yield rP("/oauth/device/code",{client_id:rk,scope:rA,audience:rI})}),function(){return z.apply(this,arguments)}),rY=e=>new Promise(t=>setTimeout(t,e)),rG=(H=ee(function*({device_code:e,interval:t=5,expires_in:a=900}){for(var r=Date.now()+1e3*a,i=1e3*t;Date.now()<r;){yield rY(i);try{return yield rP("/oauth/token",{grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:rk,device_code:e})}catch(e){if("authorization_pending"===e.code)continue;if("slow_down"===e.code){i+=5e3;continue}throw e}}throw Error("Device authorization expired before the sign-in was confirmed")}),function(e){return H.apply(this,arguments)}),rz=(e,t=null,{preservePrevious:a=!1}={})=>{if(!e?.access_token)throw Error("OAuth token response did not include an access token");if(!a&&!e.id_token)throw Error("OAuth login response did not include an ID token");var r=e.id_token?rj(e.id_token):{};if(!a&&!r.sub)throw Error("OAuth ID token did not include a user subject");if(a&&r.sub&&t?.user?.sub&&r.sub!==t.user.sub)throw Error("OAuth refresh returned a different user identity");var i=a?t?.user:null;return{accessToken:e.access_token,refreshToken:e.refresh_token||(a?t?.refreshToken:null)||null,expiresAt:new Date(Date.now()+1e3*(e.expires_in||0)).toISOString(),user:{sub:r.sub||i?.sub||null,email:r.email||i?.email||null,name:r.name||i?.name||null},audience:rI}},rH=null,rW=(W=ee(function*({forceRefresh:e=!1}={}){var t=a5();if(!t?.accessToken)return null;var a=new Date(t.expiresAt||0).getTime()-Date.now();if(!e&&a>3e5)return t;if(!t.refreshToken){if(a>0)return t;if(!(yield ri(t)))return a5();throw Error("OAuth session expired. Run `bricks auth login` again.")}var r=`${t.accessToken}\0${t.refreshToken}`;if(rH){var i=rH;return i.sessionKey===r?i.promise:(yield i.promise.catch(()=>{}),rW({forceRefresh:e}))}var n=aR(ee(function*(){var a=a5();if(!a?.accessToken)return null;if(!t||!a||t.accessToken!==a.accessToken||t.refreshToken!==a.refreshToken)return a;var r=new Date(a.expiresAt||0).getTime()-Date.now();if(!e&&r>3e5)return a;if(!a.refreshToken){if(r>0)return a;if(!(yield ri(a)))return a5();throw Error("OAuth session expired. Run `bricks auth login` again.")}try{var i=yield rP("/oauth/token",{grant_type:"refresh_token",client_id:rk,refresh_token:a.refreshToken}),n=rz(i,a,{preservePrevious:!0});if(!(yield rr(a,n)))return a5();return n}catch(e){if("invalid_grant"===e.code){if(!(yield ri(a)))return a5();throw Error("OAuth session expired. Run `bricks auth login` again.")}throw e}}));rH={sessionKey:r,promise:n};try{return yield n}finally{rH?.promise===n&&(rH=null)}}),function(){return W.apply(this,arguments)}),rJ=(J=ee(function*(e){if(e){var t=new AbortController,a=setTimeout(()=>t.abort(),5e3);try{yield rR("/oauth/revoke",{client_id:rk,token:e},{signal:t.signal})}catch{}finally{clearTimeout(a)}}}),function(e){return J.apply(this,arguments)}),rK=(K=ee(function*(){var e=yield rt();return!!e?.accessToken&&(yield rJ(e.refreshToken),!0)}),function(){return K.apply(this,arguments)}),rZ=e=>new Promise(t=>{var a=ae("darwin"===process.platform?["open",[e]]:"win32"===process.platform?["cmd",["/c","start","",e.replace(/&/g,"^&")]]:["xdg-open",[e]],2),r=a[0],i=a[1];try{var n=(0,r_.spawn)(r,i,{stdio:"ignore",detached:!0});n.once("error",()=>t(!1)),n.once("spawn",()=>{n.unref(),t(!0)})}catch{t(!1)}}),rX=(e,t)=>{if(!e)throw Error("Not logged in. Run `bricks auth login` first.");if(e.user?.sub!==t)throw Error("OAuth account changed. Re-select the workspace for the current account.");return e},r1=e=>{var t=((e="default")=>aQ(e,aU.snapshot(["tokens","oauth","devtoolsTokens","baseUrl","activityLogBaseUrl"])))(e);return{...t,auth:(({tokenInfo:e,oauth:t})=>{if(!e)return null;if("oauth"===e.type){if(!t?.accessToken||!e.oauthSubject||e.oauthSubject!==t.user?.sub||!e.workspaceId)return null;var a,r,i,n=e.oauthSubject;return{kind:"oauth",workspaceId:e.workspaceId,workspaceName:e.workspaceName,getHeaders:(r=ee(function*(){var t=rX((yield rW()),n);return{authorization:`Bearer ${t.accessToken}`,"x-bricks-workspace-id":String(e.workspaceId)}}),function(){return r.apply(this,arguments)}),refresh:(i=ee(function*(){rX((yield rW({forceRefresh:!0})),n)}),function(){return i.apply(this,arguments)})}}return e.token?{kind:"token",token:e.token,workspaceId:e.workspaceId,workspaceName:e.workspaceName,getHeaders:(a=ee(function*(){return{authorization:`Bearer ${e.token}`}}),function(){return a.apply(this,arguments)})}:null})(t)}},r0=e=>r1(e).auth},48255(e,t,a){a.d(t,{Wk:()=>s,eO:()=>p,yJ:()=>d});var r=a(91070),i=a(73971),n=a(8238);class p extends Error{constructor(e,...t){var a,n,d;let s,{nodes:l,source:u,positions:c,path:m,originalError:f,extensions:h}=null==(s=t[0])||"kind"in s||"length"in s?{nodes:s,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:s;super(e),this.name="GraphQLError",this.path=null!=m?m:void 0,this.originalError=null!=f?f:void 0,this.nodes=o(Array.isArray(l)?l:l?[l]:void 0);let v=o(null==(a=this.nodes)?void 0:a.map(e=>e.loc).filter(e=>null!=e));this.source=null!=u?u:null==v||null==(n=v[0])?void 0:n.source,this.positions=null!=c?c:null==v?void 0:v.map(e=>e.start),this.locations=c&&u?c.map(e=>(0,i.g)(u,e)):null==v?void 0:v.map(e=>(0,i.g)(e.source,e.start));let y=(0,r.Z)(null==f?void 0:f.extensions)?null==f?void 0:f.extensions:void 0;this.extensions=null!=(d=null!=h?h:y)?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}}),null!=f&&f.stack?Object.defineProperty(this,"stack",{value:f.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,p):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+="\n\n"+(0,n.V)(t.loc));else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+(0,n.C)(this.source,t);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function o(e){return void 0===e||0===e.length?void 0:e}function d(e){return e.toString()}function s(e){return e.toJSON()}},59841(e,t,a){a.d(t,{I:()=>i});var r=a(48255);function i(e,t,a){return new r.eO(`Syntax Error: ${a}`,{source:e,positions:[t]})}},36869(e,t,a){let r;a.r(t),a.d(t,{VariablesAreInputTypesRule:()=>a$,SingleFieldSubscriptionsRule:()=>aT,UniqueVariableNamesRule:()=>aP,GraphQLDeprecatedDirective:()=>e7,GraphQLNonNull:()=>ef,__InputValue:()=>tm,createSourceEventStream:()=>rh,execute:()=>aX,isDefinitionNode:()=>tL.MD,isInterfaceType:()=>Y,isRequiredArgument:()=>eV,isValidNameError:()=>r1,parseValue:()=>h.$x,valueFromAST:()=>am,NoUnusedVariablesRule:()=>t1,__DirectiveLocation:()=>tl,findDangerousChanges:()=>r2,__TypeKind:()=>th,isSchema:()=>tw,UniqueTypeNamesRule:()=>aF,NoSchemaIntrospectionCustomRule:()=>rg,defaultTypeResolver:()=>ra,isType:()=>$,syntaxError:()=>r_.I,version:()=>i,UniqueFragmentNamesRule:()=>ax,assertWrappingType:()=>ev,getNullableType:()=>e_,isObjectType:()=>q,visitWithTypeInfo:()=>tj,assertEnumValueName:()=>L,printSchema:()=>rj,validate:()=>az,BREAK:()=>tV.sP,assertNonNullType:()=>ea,assertNullableType:()=>eg,executeSync:()=>a1,isLeafType:()=>eo,resolveSchemaCoordinate:()=>r8,assertOutputType:()=>ep,buildASTSchema:()=>rk,astFromValue:()=>tp,Kind:()=>V.b,ProvidedRequiredArgumentsRule:()=>ai,UniqueDirectiveNamesRule:()=>aD,KnownDirectivesRule:()=>tQ,DEFAULT_DEPRECATION_REASON:()=>e8,TypeKind:()=>l,assertInterfaceType:()=>G,isValueNode:()=>tL.aR,GraphQLSpecifiedByDirective:()=>te,GraphQLFloat:()=>eJ,UniqueFieldDefinitionNamesRule:()=>ak,LoneAnonymousOperationRule:()=>tH,VariablesInAllowedPositionRule:()=>aM,assertInputType:()=>ei,formatError:()=>y.Wk,assertInputObjectType:()=>Z,isOutputType:()=>en,isWrappingType:()=>eh,assertLeafType:()=>ed,assertValidSchema:()=>tO,FragmentsOnCompositeTypesRule:()=>tU,graphql:()=>rn,UniqueOperationTypesRule:()=>aR,parseSchemaCoordinate:()=>h.Ng,UniqueEnumValueNamesRule:()=>aA,isNonNullType:()=>et,isSelectionNode:()=>tL.VK,printError:()=>y.yJ,specifiedDirectives:()=>ta,visit:()=>tV.YR,GraphQLScalarType:()=>eS,assertEnumType:()=>J,UniqueDirectivesPerLocationRule:()=>aI,assertName:()=>j,getDirectiveValues:()=>ay,isConstValueNode:()=>tL.TZ,isEqualType:()=>eq,isNamedType:()=>eb,isTypeDefinitionNode:()=>tL.a6,validateSchema:()=>tS,parse:()=>h.qg,__Schema:()=>td,isTypeSystemDefinitionNode:()=>tL.xu,valueFromASTUntyped:()=>F,LoneSchemaDefinitionRule:()=>tW,isTypeSubTypeOf:()=>eQ,UniqueArgumentNamesRule:()=>aO,UniqueInputFieldNamesRule:()=>aC,locatedError:()=>aK,typeFromAST:()=>tR,printLocation:()=>rl.V,assertUnionType:()=>H,separateOperations:()=>rJ,getVariableValues:()=>ah,Location:()=>g.aZ,GraphQLObjectType:()=>eO,UniqueArgumentDefinitionNamesRule:()=>aS,stripIgnoredCharacters:()=>rZ,GRAPHQL_MAX_INT:()=>ez,visitInParallel:()=>tV.oP,parseType:()=>h.Mb,isTypeNode:()=>tL.dI,PossibleTypeExtensionsRule:()=>aa,graphqlSync:()=>rp,isSchemaCoordinateNode:()=>tL.gj,DirectiveLocation:()=>eG.H,TypeNameMetaFieldDef:()=>tg,coerceInputValue:()=>au,GraphQLInt:()=>eW,resolveObjMapThunk:()=>eN,GraphQLInterfaceType:()=>eR,UniqueOperationNamesRule:()=>aV,GraphQLSkipDirective:()=>e5,isEnumType:()=>W,assertValidName:()=>rX,buildClientSchema:()=>rN,KnownArgumentNamesRule:()=>tB,ValuesOfCorrectTypeRule:()=>aj,isInputObjectType:()=>K,GraphQLID:()=>eX,NoUnusedFragmentsRule:()=>tX,isUnionType:()=>z,isSpecifiedScalarType:()=>e0,getArgumentValues:()=>av,printSourceLocation:()=>rl.C,__EnumValue:()=>tf,getOperationAST:()=>rw,isExecutableDefinitionNode:()=>tL._m,isAbstractType:()=>eu,assertAbstractType:()=>ec,isTypeExtensionNode:()=>tL.i7,GraphQLInputObjectType:()=>eM,getNamedType:()=>eE,parseConstValue:()=>h.u8,KnownFragmentNamesRule:()=>tY,isListType:()=>X,Lexer:()=>ru.JG,isSpecifiedDirective:()=>tr,responsePathAsArray:()=>al,isDirective:()=>e6,TypeInfo:()=>tF,assertScalarType:()=>B,extendSchema:()=>rS,isIntrospectionType:()=>tb,print:()=>R.y,getIntrospectionQuery:()=>rb,GraphQLBoolean:()=>eZ,KnownTypeNamesRule:()=>tG,assertListType:()=>ee,concatAST:()=>rW,NoDeprecatedCustomRule:()=>ry,defaultFieldResolver:()=>rr,GraphQLDirective:()=>e3,getLocation:()=>rs.g,TypeMetaFieldDef:()=>ty,GRAPHQL_MIN_INT:()=>eH,GraphQLIncludeDirective:()=>e9,ScalarLeafsRule:()=>ao,assertSchema:()=>tE,lexicographicSortSchema:()=>rC,GraphQLList:()=>em,isTypeSystemExtensionNode:()=>tL.fT,specifiedScalarTypes:()=>e1,BreakingChangeType:()=>u,ExecutableDefinitionsRule:()=>t$,assertDirective:()=>e4,__Field:()=>tc,getVisitFn:()=>tV.UY,recommendedRules:()=>aU,SchemaMetaFieldDef:()=>tv,assertCompositeType:()=>el,isRequiredInputField:()=>eB,Token:()=>g.ou,specifiedRules:()=>aB,DangerousChangeType:()=>c,GraphQLUnionType:()=>eF,isCompositeType:()=>es,versionInfo:()=>n,FieldsOnCorrectTypeRule:()=>tM,GraphQLString:()=>eK,assertType:()=>M,introspectionFromSchema:()=>rT,doTypesOverlap:()=>eY,GraphQLEnumType:()=>ej,resolveReadonlyArrayThunk:()=>eT,GraphQLOneOfDirective:()=>tt,NoFragmentCyclesRule:()=>tK,findBreakingChanges:()=>r0,ValidationContext:()=>aG,OverlappingFieldsCanBeMergedRule:()=>t2,isScalarType:()=>U,MaxIntrospectionDepthRule:()=>tJ,NoUndefinedVariablesRule:()=>tZ,assertObjectType:()=>Q,getOperationRootType:()=>rE,printType:()=>rU,OperationTypeNode:()=>g.cE,isInputType:()=>er,__Directive:()=>ts,GraphQLSchema:()=>tT,Source:()=>rd.k,resolveASTSchemaCoordinate:()=>r7,GraphQLError:()=>y.eO,assertNamedType:()=>ew,buildSchema:()=>rx,introspectionTypes:()=>t_,PossibleFragmentSpreadsRule:()=>at,__Type:()=>tu,getEnterLeaveForKind:()=>tV.XO,TokenKind:()=>rc.Y,printIntrospectionSchema:()=>rL,isNullableType:()=>ey,subscribe:()=>rf});let i="16.12.0",n=Object.freeze({major:16,minor:12,patch:0,preReleaseTag:null});var p,o,d,s,l,u,c,m=a(93217);function f(e){return"function"==typeof(null==e?void 0:e.then)}var h=a(20186),v=a(35198),y=a(48255),g=a(59762);function _(e,t){let[a,r]=t?[e,t]:[void 0,e],i=" Did you mean ";a&&(i+=a+" ");let n=r.map(e=>`"${e}"`);switch(n.length){case 0:return"";case 1:return i+n[0]+"?";case 2:return i+n[0]+" or "+n[1]+"?"}let p=n.slice(0,5),o=p.pop();return i+p.join(", ")+", or "+o+"?"}function b(e){return e}var w=a(50792),E=a(91070);function T(e,t){let a=Object.create(null);for(let r of e)a[t(r)]=r;return a}function N(e,t,a){let r=Object.create(null);for(let i of e)r[t(i)]=a(i);return r}function S(e,t){let a=Object.create(null);for(let r of Object.keys(e))a[r]=t(e[r],r);return a}function O(e,t){let a=0,r=0;for(;a<e.length&&r<t.length;){let i=e.charCodeAt(a),n=t.charCodeAt(r);if(I(i)&&I(n)){let p=0;do++a,p=10*p+i-D,i=e.charCodeAt(a);while(I(i)&&p>0);let o=0;do++r,o=10*o+n-D,n=t.charCodeAt(r);while(I(n)&&o>0);if(p<o)return -1;if(p>o)return 1}else{if(i<n)return -1;if(i>n)return 1;++a,++r}}return e.length-t.length}let D=48;function I(e){return!isNaN(e)&&D<=e&&e<=57}function A(e,t){let a=Object.create(null),r=new k(e),i=Math.floor(.4*e.length)+1;for(let e of t){let t=r.measure(e,i);void 0!==t&&(a[e]=t)}return Object.keys(a).sort((e,t)=>{let r=a[e]-a[t];return 0!==r?r:O(e,t)})}class k{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=x(this._inputLowerCase),this._rows=[Array(e.length+1).fill(0),Array(e.length+1).fill(0),Array(e.length+1).fill(0)]}measure(e,t){if(this._input===e)return 0;let a=e.toLowerCase();if(this._inputLowerCase===a)return 1;let r=x(a),i=this._inputArray;if(r.length<i.length){let e=r;r=i,i=e}let n=r.length,p=i.length;if(n-p>t)return;let o=this._rows;for(let e=0;e<=p;e++)o[0][e]=e;for(let e=1;e<=n;e++){let a=o[(e-1)%3],n=o[e%3],d=n[0]=e;for(let t=1;t<=p;t++){let p=+(r[e-1]!==i[t-1]),s=Math.min(a[t]+1,n[t-1]+1,a[t-1]+p);e>1&&t>1&&r[e-1]===i[t-2]&&r[e-2]===i[t-1]&&(s=Math.min(s,o[(e-2)%3][t-2]+1)),s<d&&(d=s),n[t]=s}if(d>t)return}let d=o[n%3][p];return d<=t?d:void 0}}function x(e){let t=e.length,a=Array(t);for(let r=0;r<t;++r)a[r]=e.charCodeAt(r);return a}function C(e){if(null==e)return Object.create(null);if(null===Object.getPrototypeOf(e))return e;let t=Object.create(null);for(let[a,r]of Object.entries(e))t[a]=r;return t}var V=a(42455),R=a(95818);function F(e,t){switch(e.kind){case V.b.NULL:return null;case V.b.INT:return parseInt(e.value,10);case V.b.FLOAT:return parseFloat(e.value);case V.b.STRING:case V.b.ENUM:case V.b.BOOLEAN:return e.value;case V.b.LIST:return e.values.map(e=>F(e,t));case V.b.OBJECT:return N(e.fields,e=>e.name.value,e=>F(e.value,t));case V.b.VARIABLE:return null==t?void 0:t[e.name.value]}}var P=a(25881);function j(e){if(null!=e||(0,m.U)(!1,"Must provide name."),"string"==typeof e||(0,m.U)(!1,"Expected name to be a string."),0===e.length)throw new y.eO("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!(0,P.xr)(e.charCodeAt(t)))throw new y.eO(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!(0,P.un)(e.charCodeAt(0)))throw new y.eO(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function L(e){if("true"===e||"false"===e||"null"===e)throw new y.eO(`Enum values cannot be named: ${e}`);return j(e)}function $(e){return U(e)||q(e)||Y(e)||z(e)||W(e)||K(e)||X(e)||et(e)}function M(e){if(!$(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL type.`);return e}function U(e){return(0,w.h)(e,eS)}function B(e){if(!U(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Scalar type.`);return e}function q(e){return(0,w.h)(e,eO)}function Q(e){if(!q(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Object type.`);return e}function Y(e){return(0,w.h)(e,eR)}function G(e){if(!Y(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Interface type.`);return e}function z(e){return(0,w.h)(e,eF)}function H(e){if(!z(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Union type.`);return e}function W(e){return(0,w.h)(e,ej)}function J(e){if(!W(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Enum type.`);return e}function K(e){return(0,w.h)(e,eM)}function Z(e){if(!K(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Input Object type.`);return e}function X(e){return(0,w.h)(e,em)}function ee(e){if(!X(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL List type.`);return e}function et(e){return(0,w.h)(e,ef)}function ea(e){if(!et(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Non-Null type.`);return e}function er(e){return U(e)||W(e)||K(e)||eh(e)&&er(e.ofType)}function ei(e){if(!er(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL input type.`);return e}function en(e){return U(e)||q(e)||Y(e)||z(e)||W(e)||eh(e)&&en(e.ofType)}function ep(e){if(!en(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL output type.`);return e}function eo(e){return U(e)||W(e)}function ed(e){if(!eo(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL leaf type.`);return e}function es(e){return q(e)||Y(e)||z(e)}function el(e){if(!es(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL composite type.`);return e}function eu(e){return Y(e)||z(e)}function ec(e){if(!eu(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL abstract type.`);return e}class em{constructor(e){$(e)||(0,m.U)(!1,`Expected ${(0,v.N)(e)} to be a GraphQL type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class ef{constructor(e){ey(e)||(0,m.U)(!1,`Expected ${(0,v.N)(e)} to be a GraphQL nullable type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function eh(e){return X(e)||et(e)}function ev(e){if(!eh(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL wrapping type.`);return e}function ey(e){return $(e)&&!et(e)}function eg(e){if(!ey(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL nullable type.`);return e}function e_(e){if(e)return et(e)?e.ofType:e}function eb(e){return U(e)||q(e)||Y(e)||z(e)||W(e)||K(e)}function ew(e){if(!eb(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL named type.`);return e}function eE(e){if(e){let t=e;for(;eh(t);)t=t.ofType;return t}}function eT(e){return"function"==typeof e?e():e}function eN(e){return"function"==typeof e?e():e}class eS{constructor(e){var t,a,r,i;let n=null!=(t=e.parseValue)?t:b;this.name=j(e.name),this.description=e.description,this.specifiedByURL=e.specifiedByURL,this.serialize=null!=(a=e.serialize)?a:b,this.parseValue=n,this.parseLiteral=null!=(r=e.parseLiteral)?r:(e,t)=>n(F(e,t)),this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(i=e.extensionASTNodes)?i:[],null==e.specifiedByURL||"string"==typeof e.specifiedByURL||(0,m.U)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,v.N)(e.specifiedByURL)}.`),null==e.serialize||"function"==typeof e.serialize||(0,m.U)(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||(0,m.U)(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class eO{constructor(e){var t;this.name=j(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(t=e.extensionASTNodes)?t:[],this._fields=()=>eI(e),this._interfaces=()=>eD(e),null==e.isTypeOf||"function"==typeof e.isTypeOf||(0,m.U)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,v.N)(e.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:ex(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function eD(e){var t;let a=eT(null!=(t=e.interfaces)?t:[]);return Array.isArray(a)||(0,m.U)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),a}function eI(e){let t=eN(e.fields);return ek(t)||(0,m.U)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),S(t,(t,a)=>{var r;ek(t)||(0,m.U)(!1,`${e.name}.${a} field config must be an object.`),null==t.resolve||"function"==typeof t.resolve||(0,m.U)(!1,`${e.name}.${a} field resolver must be a function if provided, but got: ${(0,v.N)(t.resolve)}.`);let i=null!=(r=t.args)?r:{};return ek(i)||(0,m.U)(!1,`${e.name}.${a} args must be an object with argument names as keys.`),{name:j(a),description:t.description,type:t.type,args:eA(i),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:C(t.extensions),astNode:t.astNode}})}function eA(e){return Object.entries(e).map(([e,t])=>({name:j(e),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:C(t.extensions),astNode:t.astNode}))}function ek(e){return(0,E.Z)(e)&&!Array.isArray(e)}function ex(e){return S(e,e=>({description:e.description,type:e.type,args:eC(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function eC(e){return N(e,e=>e.name,e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function eV(e){return et(e.type)&&void 0===e.defaultValue}class eR{constructor(e){var t;this.name=j(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(t=e.extensionASTNodes)?t:[],this._fields=eI.bind(void 0,e),this._interfaces=eD.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||(0,m.U)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,v.N)(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:ex(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class eF{constructor(e){var t;this.name=j(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(t=e.extensionASTNodes)?t:[],this._types=eP.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||(0,m.U)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,v.N)(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return"function"==typeof this._types&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function eP(e){let t=eT(e.types);return Array.isArray(t)||(0,m.U)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class ej{constructor(e){var t;this.name=j(e.name),this.description=e.description,this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(t=e.extensionASTNodes)?t:[],this._values="function"==typeof e.values?e.values:e$(this.name,e.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return"function"==typeof this._values&&(this._values=e$(this.name,this._values())),this._values}getValue(e){return null===this._nameLookup&&(this._nameLookup=T(this.getValues(),e=>e.name)),this._nameLookup[e]}serialize(e){null===this._valueLookup&&(this._valueLookup=new Map(this.getValues().map(e=>[e.value,e])));let t=this._valueLookup.get(e);if(void 0===t)throw new y.eO(`Enum "${this.name}" cannot represent value: ${(0,v.N)(e)}`);return t.name}parseValue(e){if("string"!=typeof e){let t=(0,v.N)(e);throw new y.eO(`Enum "${this.name}" cannot represent non-string value: ${t}.`+eL(this,t))}let t=this.getValue(e);if(null==t)throw new y.eO(`Value "${e}" does not exist in "${this.name}" enum.`+eL(this,e));return t.value}parseLiteral(e,t){if(e.kind!==V.b.ENUM){let t=(0,R.y)(e);throw new y.eO(`Enum "${this.name}" cannot represent non-enum value: ${t}.`+eL(this,t),{nodes:e})}let a=this.getValue(e.value);if(null==a){let t=(0,R.y)(e);throw new y.eO(`Value "${t}" does not exist in "${this.name}" enum.`+eL(this,t),{nodes:e})}return a.value}toConfig(){let e=N(this.getValues(),e=>e.name,e=>({description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function eL(e,t){return _("the enum value",A(t,e.getValues().map(e=>e.name)))}function e$(e,t){return ek(t)||(0,m.U)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([t,a])=>(ek(a)||(0,m.U)(!1,`${e}.${t} must refer to an object with a "value" key representing an internal value but got: ${(0,v.N)(a)}.`),{name:L(t),description:a.description,value:void 0!==a.value?a.value:t,deprecationReason:a.deprecationReason,extensions:C(a.extensions),astNode:a.astNode}))}class eM{constructor(e){var t,a;this.name=j(e.name),this.description=e.description,this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(t=e.extensionASTNodes)?t:[],this.isOneOf=null!=(a=e.isOneOf)&&a,this._fields=eU.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}toConfig(){let e=S(this.getFields(),e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}}function eU(e){let t=eN(e.fields);return ek(t)||(0,m.U)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),S(t,(t,a)=>("resolve"in t&&(0,m.U)(!1,`${e.name}.${a} field has a resolve property, but Input Types cannot define resolvers.`),{name:j(a),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:C(t.extensions),astNode:t.astNode}))}function eB(e){return et(e.type)&&void 0===e.defaultValue}function eq(e,t){return e===t||!!(et(e)&&et(t)||X(e)&&X(t))&&eq(e.ofType,t.ofType)}function eQ(e,t,a){return t===a||(et(a)?!!et(t)&&eQ(e,t.ofType,a.ofType):et(t)?eQ(e,t.ofType,a):X(a)?!!X(t)&&eQ(e,t.ofType,a.ofType):!X(t)&&eu(a)&&(Y(t)||q(t))&&e.isSubType(a,t))}function eY(e,t,a){return t===a||(eu(t)?eu(a)?e.getPossibleTypes(t).some(t=>e.isSubType(a,t)):e.isSubType(t,a):!!eu(a)&&e.isSubType(a,t))}var eG=a(42868);let ez=0x7fffffff,eH=-0x80000000,eW=new eS({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){let t=e2(e);if("boolean"==typeof t)return+!!t;let a=t;if("string"==typeof t&&""!==t&&(a=Number(t)),"number"!=typeof a||!Number.isInteger(a))throw new y.eO(`Int cannot represent non-integer value: ${(0,v.N)(t)}`);if(a>ez||a<eH)throw new y.eO("Int cannot represent non 32-bit signed integer value: "+(0,v.N)(t));return a},parseValue(e){if("number"!=typeof e||!Number.isInteger(e))throw new y.eO(`Int cannot represent non-integer value: ${(0,v.N)(e)}`);if(e>ez||e<eH)throw new y.eO(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==V.b.INT)throw new y.eO(`Int cannot represent non-integer value: ${(0,R.y)(e)}`,{nodes:e});let t=parseInt(e.value,10);if(t>ez||t<eH)throw new y.eO(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),eJ=new eS({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){let t=e2(e);if("boolean"==typeof t)return+!!t;let a=t;if("string"==typeof t&&""!==t&&(a=Number(t)),"number"!=typeof a||!Number.isFinite(a))throw new y.eO(`Float cannot represent non numeric value: ${(0,v.N)(t)}`);return a},parseValue(e){if("number"!=typeof e||!Number.isFinite(e))throw new y.eO(`Float cannot represent non numeric value: ${(0,v.N)(e)}`);return e},parseLiteral(e){if(e.kind!==V.b.FLOAT&&e.kind!==V.b.INT)throw new y.eO(`Float cannot represent non numeric value: ${(0,R.y)(e)}`,e);return parseFloat(e.value)}}),eK=new eS({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){let t=e2(e);if("string"==typeof t)return t;if("boolean"==typeof t)return t?"true":"false";if("number"==typeof t&&Number.isFinite(t))return t.toString();throw new y.eO(`String cannot represent value: ${(0,v.N)(e)}`)},parseValue(e){if("string"!=typeof e)throw new y.eO(`String cannot represent a non string value: ${(0,v.N)(e)}`);return e},parseLiteral(e){if(e.kind!==V.b.STRING)throw new y.eO(`String cannot represent a non string value: ${(0,R.y)(e)}`,{nodes:e});return e.value}}),eZ=new eS({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){let t=e2(e);if("boolean"==typeof t)return t;if(Number.isFinite(t))return 0!==t;throw new y.eO(`Boolean cannot represent a non boolean value: ${(0,v.N)(t)}`)},parseValue(e){if("boolean"!=typeof e)throw new y.eO(`Boolean cannot represent a non boolean value: ${(0,v.N)(e)}`);return e},parseLiteral(e){if(e.kind!==V.b.BOOLEAN)throw new y.eO(`Boolean cannot represent a non boolean value: ${(0,R.y)(e)}`,{nodes:e});return e.value}}),eX=new eS({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){let t=e2(e);if("string"==typeof t)return t;if(Number.isInteger(t))return String(t);throw new y.eO(`ID cannot represent value: ${(0,v.N)(e)}`)},parseValue(e){if("string"==typeof e)return e;if("number"==typeof e&&Number.isInteger(e))return e.toString();throw new y.eO(`ID cannot represent value: ${(0,v.N)(e)}`)},parseLiteral(e){if(e.kind!==V.b.STRING&&e.kind!==V.b.INT)throw new y.eO("ID cannot represent a non-string and non-integer value: "+(0,R.y)(e),{nodes:e});return e.value}}),e1=Object.freeze([eK,eW,eJ,eZ,eX]);function e0(e){return e1.some(({name:t})=>e.name===t)}function e2(e){if((0,E.Z)(e)){if("function"==typeof e.valueOf){let t=e.valueOf();if(!(0,E.Z)(t))return t}if("function"==typeof e.toJSON)return e.toJSON()}return e}function e6(e){return(0,w.h)(e,e3)}function e4(e){if(!e6(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL directive.`);return e}class e3{constructor(e){var t,a;this.name=j(e.name),this.description=e.description,this.locations=e.locations,this.isRepeatable=null!=(t=e.isRepeatable)&&t,this.extensions=C(e.extensions),this.astNode=e.astNode,Array.isArray(e.locations)||(0,m.U)(!1,`@${e.name} locations must be an Array.`);let r=null!=(a=e.args)?a:{};(0,E.Z)(r)&&!Array.isArray(r)||(0,m.U)(!1,`@${e.name} args must be an object with argument names as keys.`),this.args=eA(r)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:eC(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}let e9=new e3({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[eG.H.FIELD,eG.H.FRAGMENT_SPREAD,eG.H.INLINE_FRAGMENT],args:{if:{type:new ef(eZ),description:"Included when true."}}}),e5=new e3({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[eG.H.FIELD,eG.H.FRAGMENT_SPREAD,eG.H.INLINE_FRAGMENT],args:{if:{type:new ef(eZ),description:"Skipped when true."}}}),e8="No longer supported",e7=new e3({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[eG.H.FIELD_DEFINITION,eG.H.ARGUMENT_DEFINITION,eG.H.INPUT_FIELD_DEFINITION,eG.H.ENUM_VALUE],args:{reason:{type:eK,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:e8}}}),te=new e3({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[eG.H.SCALAR],args:{url:{type:new ef(eK),description:"The URL that specifies the behavior of this scalar."}}}),tt=new e3({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[eG.H.INPUT_OBJECT],args:{}}),ta=Object.freeze([e9,e5,e7,te,tt]);function tr(e){return ta.some(({name:t})=>t===e.name)}var ti=a(71306);function tn(e){return"object"==typeof e&&"function"==typeof(null==e?void 0:e[Symbol.iterator])}function tp(e,t){if(et(t)){let a=tp(e,t.ofType);return(null==a?void 0:a.kind)===V.b.NULL?null:a}if(null===e)return{kind:V.b.NULL};if(void 0===e)return null;if(X(t)){let a=t.ofType;if(tn(e)){let t=[];for(let r of e){let e=tp(r,a);null!=e&&t.push(e)}return{kind:V.b.LIST,values:t}}return tp(e,a)}if(K(t)){if(!(0,E.Z)(e))return null;let a=[];for(let r of Object.values(t.getFields())){let t=tp(e[r.name],r.type);t&&a.push({kind:V.b.OBJECT_FIELD,name:{kind:V.b.NAME,value:r.name},value:t})}return{kind:V.b.OBJECT,fields:a}}if(eo(t)){let a=t.serialize(e);if(null==a)return null;if("boolean"==typeof a)return{kind:V.b.BOOLEAN,value:a};if("number"==typeof a&&Number.isFinite(a)){let e=String(a);return to.test(e)?{kind:V.b.INT,value:e}:{kind:V.b.FLOAT,value:e}}if("string"==typeof a)return W(t)?{kind:V.b.ENUM,value:a}:t===eX&&to.test(a)?{kind:V.b.INT,value:a}:{kind:V.b.STRING,value:a};throw TypeError(`Cannot convert value to AST: ${(0,v.N)(a)}.`)}(0,ti.V)(!1,"Unexpected input type: "+(0,v.N)(t))}let to=/^-?(?:0|[1-9][0-9]*)$/,td=new eO({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:eK,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new ef(new em(new ef(tu))),resolve:e=>Object.values(e.getTypeMap())},queryType:{description:"The type that query operations will be rooted at.",type:new ef(tu),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:tu,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:tu,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new ef(new em(new ef(ts))),resolve:e=>e.getDirectives()}})}),ts=new eO({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:()=>({name:{type:new ef(eK),resolve:e=>e.name},description:{type:eK,resolve:e=>e.description},isRepeatable:{type:new ef(eZ),resolve:e=>e.isRepeatable},locations:{type:new ef(new em(new ef(tl))),resolve:e=>e.locations},args:{type:new ef(new em(new ef(tm))),args:{includeDeprecated:{type:eZ,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter(e=>null==e.deprecationReason)}})}),tl=new ej({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:eG.H.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:eG.H.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:eG.H.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:eG.H.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:eG.H.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:eG.H.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:eG.H.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:eG.H.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:eG.H.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:eG.H.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:eG.H.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:eG.H.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:eG.H.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:eG.H.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:eG.H.UNION,description:"Location adjacent to a union definition."},ENUM:{value:eG.H.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:eG.H.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:eG.H.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:eG.H.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),tu=new eO({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new ef(th),resolve:e=>U(e)?l.SCALAR:q(e)?l.OBJECT:Y(e)?l.INTERFACE:z(e)?l.UNION:W(e)?l.ENUM:K(e)?l.INPUT_OBJECT:X(e)?l.LIST:et(e)?l.NON_NULL:void(0,ti.V)(!1,`Unexpected type: "${(0,v.N)(e)}".`)},name:{type:eK,resolve:e=>"name"in e?e.name:void 0},description:{type:eK,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:eK,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new em(new ef(tc)),args:{includeDeprecated:{type:eZ,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(q(e)||Y(e)){let a=Object.values(e.getFields());return t?a:a.filter(e=>null==e.deprecationReason)}}},interfaces:{type:new em(new ef(tu)),resolve(e){if(q(e)||Y(e))return e.getInterfaces()}},possibleTypes:{type:new em(new ef(tu)),resolve(e,t,a,{schema:r}){if(eu(e))return r.getPossibleTypes(e)}},enumValues:{type:new em(new ef(tf)),args:{includeDeprecated:{type:eZ,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(W(e)){let a=e.getValues();return t?a:a.filter(e=>null==e.deprecationReason)}}},inputFields:{type:new em(new ef(tm)),args:{includeDeprecated:{type:eZ,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(K(e)){let a=Object.values(e.getFields());return t?a:a.filter(e=>null==e.deprecationReason)}}},ofType:{type:tu,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:eZ,resolve:e=>{if(K(e))return e.isOneOf}}})}),tc=new eO({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new ef(eK),resolve:e=>e.name},description:{type:eK,resolve:e=>e.description},args:{type:new ef(new em(new ef(tm))),args:{includeDeprecated:{type:eZ,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter(e=>null==e.deprecationReason)},type:{type:new ef(tu),resolve:e=>e.type},isDeprecated:{type:new ef(eZ),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:eK,resolve:e=>e.deprecationReason}})}),tm=new eO({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new ef(eK),resolve:e=>e.name},description:{type:eK,resolve:e=>e.description},type:{type:new ef(tu),resolve:e=>e.type},defaultValue:{type:eK,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:a}=e,r=tp(a,t);return r?(0,R.y)(r):null}},isDeprecated:{type:new ef(eZ),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:eK,resolve:e=>e.deprecationReason}})}),tf=new eO({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new ef(eK),resolve:e=>e.name},description:{type:eK,resolve:e=>e.description},isDeprecated:{type:new ef(eZ),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:eK,resolve:e=>e.deprecationReason}})});(p=l||(l={})).SCALAR="SCALAR",p.OBJECT="OBJECT",p.INTERFACE="INTERFACE",p.UNION="UNION",p.ENUM="ENUM",p.INPUT_OBJECT="INPUT_OBJECT",p.LIST="LIST",p.NON_NULL="NON_NULL";let th=new ej({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:l.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:l.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:l.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:l.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:l.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:l.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:l.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:l.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),tv={name:"__schema",type:new ef(td),description:"Access the current type schema of this server.",args:[],resolve:(e,t,a,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ty={name:"__type",type:tu,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new ef(eK),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},a,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},tg={name:"__typename",type:new ef(eK),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,a,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},t_=Object.freeze([td,ts,tl,tu,tc,tm,tf,th]);function tb(e){return t_.some(({name:t})=>e.name===t)}function tw(e){return(0,w.h)(e,tT)}function tE(e){if(!tw(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL schema.`);return e}class tT{constructor(e){var t,a;this.__validationErrors=!0===e.assumeValid?[]:void 0,(0,E.Z)(e)||(0,m.U)(!1,"Must provide configuration object."),!e.types||Array.isArray(e.types)||(0,m.U)(!1,`"types" must be Array if provided but got: ${(0,v.N)(e.types)}.`),!e.directives||Array.isArray(e.directives)||(0,m.U)(!1,`"directives" must be Array if provided but got: ${(0,v.N)(e.directives)}.`),this.description=e.description,this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(t=e.extensionASTNodes)?t:[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=null!=(a=e.directives)?a:ta;let r=new Set(e.types);if(null!=e.types)for(let t of e.types)r.delete(t),tN(t,r);for(let e of(null!=this._queryType&&tN(this._queryType,r),null!=this._mutationType&&tN(this._mutationType,r),null!=this._subscriptionType&&tN(this._subscriptionType,r),this._directives))if(e6(e))for(let t of e.args)tN(t.type,r);for(let e of(tN(td,r),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null),r)){if(null==e)continue;let t=e.name;if(t||(0,m.U)(!1,"One of the provided types for building the Schema is missing a name."),void 0!==this._typeMap[t])throw Error(`Schema must contain uniquely named types but contains multiple types named "${t}".`);if(this._typeMap[t]=e,Y(e)){for(let t of e.getInterfaces())if(Y(t)){let a=this._implementationsMap[t.name];void 0===a&&(a=this._implementationsMap[t.name]={objects:[],interfaces:[]}),a.interfaces.push(e)}}else if(q(e)){for(let t of e.getInterfaces())if(Y(t)){let a=this._implementationsMap[t.name];void 0===a&&(a=this._implementationsMap[t.name]={objects:[],interfaces:[]}),a.objects.push(e)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case g.cE.QUERY:return this.getQueryType();case g.cE.MUTATION:return this.getMutationType();case g.cE.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return z(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){let t=this._implementationsMap[e.name];return null!=t?t:{objects:[],interfaces:[]}}isSubType(e,t){let a=this._subTypeMap[e.name];if(void 0===a){if(a=Object.create(null),z(e))for(let t of e.getTypes())a[t.name]=!0;else{let t=this.getImplementations(e);for(let e of t.objects)a[e.name]=!0;for(let e of t.interfaces)a[e.name]=!0}this._subTypeMap[e.name]=a}return void 0!==a[t.name]}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find(t=>t.name===e)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:void 0!==this.__validationErrors}}}function tN(e,t){let a=eE(e);if(!t.has(a)){if(t.add(a),z(a))for(let e of a.getTypes())tN(e,t);else if(q(a)||Y(a)){for(let e of a.getInterfaces())tN(e,t);for(let e of Object.values(a.getFields()))for(let a of(tN(e.type,t),e.args))tN(a.type,t)}else if(K(a))for(let e of Object.values(a.getFields()))tN(e.type,t)}return t}function tS(e){var t,a,r,i;let n,p,o,d;if(tE(e),e.__validationErrors)return e.__validationErrors;let s=new tD(e);(p=(n=(t=s).schema).getQueryType())?q(p)||t.reportError(`Query root type must be Object type, it cannot be ${(0,v.N)(p)}.`,null!=(a=tI(n,g.cE.QUERY))?a:p.astNode):t.reportError("Query root type must be provided.",n.astNode),(o=n.getMutationType())&&!q(o)&&t.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,v.N)(o)}.`,null!=(r=tI(n,g.cE.MUTATION))?r:o.astNode),(d=n.getSubscriptionType())&&!q(d)&&t.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,v.N)(d)}.`,null!=(i=tI(n,g.cE.SUBSCRIPTION))?i:d.astNode),function(e){for(let a of e.schema.getDirectives()){if(!e6(a)){e.reportError(`Expected directive but got: ${(0,v.N)(a)}.`,null==a?void 0:a.astNode);continue}for(let r of(tA(e,a),0===a.locations.length&&e.reportError(`Directive @${a.name} must include 1 or more locations.`,a.astNode),a.args))if(tA(e,r),er(r.type)||e.reportError(`The type of @${a.name}(${r.name}:) must be Input Type but got: ${(0,v.N)(r.type)}.`,r.astNode),eV(r)&&null!=r.deprecationReason){var t;e.reportError(`Required argument @${a.name}(${r.name}:) cannot be deprecated.`,[tC(r.astNode),null==(t=r.astNode)?void 0:t.type])}}}(s),function(e){var t;let a,r,i,n=(t=e,a=Object.create(null),r=[],i=Object.create(null),function e(n){if(!a[n.name]){for(let p of(a[n.name]=!0,i[n.name]=r.length,Object.values(n.getFields())))if(et(p.type)&&K(p.type.ofType)){let a=p.type.ofType,n=i[a.name];if(r.push(p),void 0===n)e(a);else{let e=r.slice(n),i=e.map(e=>e.name).join(".");t.reportError(`Cannot reference Input Object "${a.name}" within itself through a series of non-null fields: "${i}".`,e.map(e=>e.astNode))}r.pop()}i[n.name]=void 0}});for(let t of Object.values(e.schema.getTypeMap())){if(!eb(t)){e.reportError(`Expected GraphQL named type but got: ${(0,v.N)(t)}.`,t.astNode);continue}tb(t)||tA(e,t),q(t)||Y(t)?(function(e,t){let a=Object.values(t.getFields());for(let p of(0===a.length&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]),a)){var r,i,n;for(let a of(tA(e,p),en(p.type)||e.reportError(`The type of ${t.name}.${p.name} must be Output Type but got: ${(0,v.N)(p.type)}.`,null==(r=p.astNode)?void 0:r.type),p.args)){let r=a.name;tA(e,a),er(a.type)||e.reportError(`The type of ${t.name}.${p.name}(${r}:) must be Input Type but got: ${(0,v.N)(a.type)}.`,null==(i=a.astNode)?void 0:i.type),eV(a)&&null!=a.deprecationReason&&e.reportError(`Required argument ${t.name}.${p.name}(${r}:) cannot be deprecated.`,[tC(a.astNode),null==(n=a.astNode)?void 0:n.type])}}}(e,t),function(e,t){let a=Object.create(null);for(let r of t.getInterfaces()){if(!Y(r)){e.reportError(`Type ${(0,v.N)(t)} must only implement Interface types, it cannot implement ${(0,v.N)(r)}.`,tk(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,tk(t,r));continue}if(a[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,tk(t,r));continue}a[r.name]=!0,function(e,t,a){let r=t.getInterfaces();for(let i of a.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${a.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${a.name}.`,[...tk(a,i),...tk(t,a)])}(e,t,r),function(e,t,a){let r=t.getFields();for(let d of Object.values(a.getFields())){var i,n,p,o;let s=d.name,l=r[s];if(!l){e.reportError(`Interface field ${a.name}.${s} expected but ${t.name} does not provide it.`,[d.astNode,t.astNode,...t.extensionASTNodes]);continue}for(let r of(eQ(e.schema,l.type,d.type)||e.reportError(`Interface field ${a.name}.${s} expects type ${(0,v.N)(d.type)} but ${t.name}.${s} is type ${(0,v.N)(l.type)}.`,[null==(i=d.astNode)?void 0:i.type,null==(n=l.astNode)?void 0:n.type]),d.args)){let i=r.name,n=l.args.find(e=>e.name===i);if(!n){e.reportError(`Interface field argument ${a.name}.${s}(${i}:) expected but ${t.name}.${s} does not provide it.`,[r.astNode,l.astNode]);continue}eq(r.type,n.type)||e.reportError(`Interface field argument ${a.name}.${s}(${i}:) expects type ${(0,v.N)(r.type)} but ${t.name}.${s}(${i}:) is type ${(0,v.N)(n.type)}.`,[null==(p=r.astNode)?void 0:p.type,null==(o=n.astNode)?void 0:o.type])}for(let r of l.args){let i=r.name;!d.args.find(e=>e.name===i)&&eV(r)&&e.reportError(`Object field ${t.name}.${s} includes required argument ${i} that is missing from the Interface field ${a.name}.${s}.`,[r.astNode,d.astNode])}}}(e,t,r)}}(e,t)):z(t)?function(e,t){let a=t.getTypes();0===a.length&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);let r=Object.create(null);for(let i of a){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,tx(t,i.name));continue}r[i.name]=!0,q(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,v.N)(i)}.`,tx(t,String(i)))}}(e,t):W(t)?function(e,t){let a=t.getValues();for(let r of(0===a.length&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]),a))tA(e,r)}(e,t):K(t)&&(function(e,t){let a=Object.values(t.getFields());for(let n of(0===a.length&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]),a)){var r,i;tA(e,n),er(n.type)||e.reportError(`The type of ${t.name}.${n.name} must be Input Type but got: ${(0,v.N)(n.type)}.`,null==(r=n.astNode)?void 0:r.type),eB(n)&&null!=n.deprecationReason&&e.reportError(`Required input field ${t.name}.${n.name} cannot be deprecated.`,[tC(n.astNode),null==(i=n.astNode)?void 0:i.type]),t.isOneOf&&function(e,t,a){if(et(t.type)){var r;a.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,null==(r=t.astNode)?void 0:r.type)}void 0!==t.defaultValue&&a.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}(t,n,e)}}(e,t),n(t))}}(s);let l=s.getErrors();return e.__validationErrors=l,l}function tO(e){let t=tS(e);if(0!==t.length)throw Error(t.map(e=>e.message).join("\n\n"))}class tD{constructor(e){this._errors=[],this.schema=e}reportError(e,t){let a=Array.isArray(t)?t.filter(Boolean):t;this._errors.push(new y.eO(e,{nodes:a}))}getErrors(){return this._errors}}function tI(e,t){var a;return null==(a=[e.astNode,...e.extensionASTNodes].flatMap(e=>{var t;return null!=(t=null==e?void 0:e.operationTypes)?t:[]}).find(e=>e.operation===t))?void 0:a.type}function tA(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function tk(e,t){let{astNode:a,extensionASTNodes:r}=e;return(null!=a?[a,...r]:r).flatMap(e=>{var t;return null!=(t=e.interfaces)?t:[]}).filter(e=>e.name.value===t.name)}function tx(e,t){let{astNode:a,extensionASTNodes:r}=e;return(null!=a?[a,...r]:r).flatMap(e=>{var t;return null!=(t=e.types)?t:[]}).filter(e=>e.name.value===t)}function tC(e){var t;return null==e||null==(t=e.directives)?void 0:t.find(e=>e.name.value===e7.name)}var tV=a(90424);function tR(e,t){switch(t.kind){case V.b.LIST_TYPE:{let a=tR(e,t.type);return a&&new em(a)}case V.b.NON_NULL_TYPE:{let a=tR(e,t.type);return a&&new ef(a)}case V.b.NAMED_TYPE:return e.getType(t.name.value)}}class tF{constructor(e,t,a){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=null!=a?a:tP,t&&(er(t)&&this._inputTypeStack.push(t),es(t)&&this._parentTypeStack.push(t),en(t)&&this._typeStack.push(t))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){let t=this._schema;switch(e.kind){case V.b.SELECTION_SET:{let e=eE(this.getType());this._parentTypeStack.push(es(e)?e:void 0);break}case V.b.FIELD:{let a,r,i=this.getParentType();i&&(a=this._getFieldDef(t,i,e))&&(r=a.type),this._fieldDefStack.push(a),this._typeStack.push(en(r)?r:void 0);break}case V.b.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case V.b.OPERATION_DEFINITION:{let a=t.getRootType(e.operation);this._typeStack.push(q(a)?a:void 0);break}case V.b.INLINE_FRAGMENT:case V.b.FRAGMENT_DEFINITION:{let a=e.typeCondition,r=a?tR(t,a):eE(this.getType());this._typeStack.push(en(r)?r:void 0);break}case V.b.VARIABLE_DEFINITION:{let a=tR(t,e.type);this._inputTypeStack.push(er(a)?a:void 0);break}case V.b.ARGUMENT:{var a;let t,r,i=null!=(a=this.getDirective())?a:this.getFieldDef();i&&(t=i.args.find(t=>t.name===e.name.value))&&(r=t.type),this._argument=t,this._defaultValueStack.push(t?t.defaultValue:void 0),this._inputTypeStack.push(er(r)?r:void 0);break}case V.b.LIST:{let e=e_(this.getInputType()),t=X(e)?e.ofType:e;this._defaultValueStack.push(void 0),this._inputTypeStack.push(er(t)?t:void 0);break}case V.b.OBJECT_FIELD:{let t,a,r=eE(this.getInputType());K(r)&&(a=r.getFields()[e.name.value])&&(t=a.type),this._defaultValueStack.push(a?a.defaultValue:void 0),this._inputTypeStack.push(er(t)?t:void 0);break}case V.b.ENUM:{let t,a=eE(this.getInputType());W(a)&&(t=a.getValue(e.value)),this._enumValue=t}}}leave(e){switch(e.kind){case V.b.SELECTION_SET:this._parentTypeStack.pop();break;case V.b.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case V.b.DIRECTIVE:this._directive=null;break;case V.b.OPERATION_DEFINITION:case V.b.INLINE_FRAGMENT:case V.b.FRAGMENT_DEFINITION:this._typeStack.pop();break;case V.b.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case V.b.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case V.b.LIST:case V.b.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case V.b.ENUM:this._enumValue=null}}}function tP(e,t,a){let r=a.name.value;return r===tv.name&&e.getQueryType()===t?tv:r===ty.name&&e.getQueryType()===t?ty:r===tg.name&&es(t)?tg:q(t)||Y(t)?t.getFields()[r]:void 0}function tj(e,t){return{enter(...a){let r=a[0];e.enter(r);let i=(0,tV.XO)(t,r.kind).enter;if(i){let n=i.apply(t,a);return void 0!==n&&(e.leave(r),(0,g.Ll)(n)&&e.enter(n)),n}},leave(...a){let r,i=a[0],n=(0,tV.XO)(t,i.kind).leave;return n&&(r=n.apply(t,a)),e.leave(i),r}}}var tL=a(3420);function t$(e){return{Document(t){for(let a of t.definitions)if(!(0,tL._m)(a)){let t=a.kind===V.b.SCHEMA_DEFINITION||a.kind===V.b.SCHEMA_EXTENSION?"schema":'"'+a.name.value+'"';e.reportError(new y.eO(`The ${t} definition is not executable.`,{nodes:a}))}return!1}}}function tM(e){return{Field(t){let a=e.getParentType();if(a&&!e.getFieldDef()){var r,i;let n=e.getSchema(),p=t.name.value,o=_("to use an inline fragment on",function(e,t,a){if(!eu(t))return[];let r=new Set,i=Object.create(null);for(let p of e.getPossibleTypes(t))if(p.getFields()[a])for(let e of(r.add(p),i[p.name]=1,p.getInterfaces())){var n;e.getFields()[a]&&(r.add(e),i[e.name]=(null!=(n=i[e.name])?n:0)+1)}return[...r].sort((t,a)=>{let r=i[a.name]-i[t.name];return 0!==r?r:Y(t)&&e.isSubType(t,a)?-1:Y(a)&&e.isSubType(a,t)?1:O(t.name,a.name)}).map(e=>e.name)}(n,a,p));""===o&&(o=_((r=a,i=p,q(r)||Y(r)?A(i,Object.keys(r.getFields())):[]))),e.reportError(new y.eO(`Cannot query field "${p}" on type "${a.name}".`+o,{nodes:t}))}}}}function tU(e){return{InlineFragment(t){let a=t.typeCondition;if(a){let t=tR(e.getSchema(),a);if(t&&!es(t)){let t=(0,R.y)(a);e.reportError(new y.eO(`Fragment cannot condition on non composite type "${t}".`,{nodes:a}))}}},FragmentDefinition(t){let a=tR(e.getSchema(),t.typeCondition);if(a&&!es(a)){let a=(0,R.y)(t.typeCondition);e.reportError(new y.eO(`Fragment "${t.name.value}" cannot condition on non composite type "${a}".`,{nodes:t.typeCondition}))}}}}function tB(e){return{...tq(e),Argument(t){let a=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!a&&r&&i){let a=t.name.value,n=A(a,r.args.map(e=>e.name));e.reportError(new y.eO(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+_(n),{nodes:t}))}}}}function tq(e){let t=Object.create(null),a=e.getSchema();for(let e of a?a.getDirectives():ta)t[e.name]=e.args.map(e=>e.name);for(let a of e.getDocument().definitions)if(a.kind===V.b.DIRECTIVE_DEFINITION){var r;let e=null!=(r=a.arguments)?r:[];t[a.name.value]=e.map(e=>e.name.value)}return{Directive(a){let r=a.name.value,i=t[r];if(a.arguments&&i)for(let t of a.arguments){let a=t.name.value;if(!i.includes(a)){let n=A(a,i);e.reportError(new y.eO(`Unknown argument "${a}" on directive "@${r}".`+_(n),{nodes:t}))}}return!1}}}function tQ(e){let t=Object.create(null),a=e.getSchema();for(let e of a?a.getDirectives():ta)t[e.name]=e.locations;for(let a of e.getDocument().definitions)a.kind===V.b.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(e=>e.value));return{Directive(a,r,i,n,p){let o=a.name.value,d=t[o];if(!d)return void e.reportError(new y.eO(`Unknown directive "@${o}".`,{nodes:a}));let s=function(e){let t=e[e.length-1];switch("kind"in t||(0,ti.V)(!1),t.kind){case V.b.OPERATION_DEFINITION:var a=t.operation;switch(a){case g.cE.QUERY:return eG.H.QUERY;case g.cE.MUTATION:return eG.H.MUTATION;case g.cE.SUBSCRIPTION:return eG.H.SUBSCRIPTION}return;case V.b.FIELD:return eG.H.FIELD;case V.b.FRAGMENT_SPREAD:return eG.H.FRAGMENT_SPREAD;case V.b.INLINE_FRAGMENT:return eG.H.INLINE_FRAGMENT;case V.b.FRAGMENT_DEFINITION:return eG.H.FRAGMENT_DEFINITION;case V.b.VARIABLE_DEFINITION:return eG.H.VARIABLE_DEFINITION;case V.b.SCHEMA_DEFINITION:case V.b.SCHEMA_EXTENSION:return eG.H.SCHEMA;case V.b.SCALAR_TYPE_DEFINITION:case V.b.SCALAR_TYPE_EXTENSION:return eG.H.SCALAR;case V.b.OBJECT_TYPE_DEFINITION:case V.b.OBJECT_TYPE_EXTENSION:return eG.H.OBJECT;case V.b.FIELD_DEFINITION:return eG.H.FIELD_DEFINITION;case V.b.INTERFACE_TYPE_DEFINITION:case V.b.INTERFACE_TYPE_EXTENSION:return eG.H.INTERFACE;case V.b.UNION_TYPE_DEFINITION:case V.b.UNION_TYPE_EXTENSION:return eG.H.UNION;case V.b.ENUM_TYPE_DEFINITION:case V.b.ENUM_TYPE_EXTENSION:return eG.H.ENUM;case V.b.ENUM_VALUE_DEFINITION:return eG.H.ENUM_VALUE;case V.b.INPUT_OBJECT_TYPE_DEFINITION:case V.b.INPUT_OBJECT_TYPE_EXTENSION:return eG.H.INPUT_OBJECT;case V.b.INPUT_VALUE_DEFINITION:{let t=e[e.length-3];return"kind"in t||(0,ti.V)(!1),t.kind===V.b.INPUT_OBJECT_TYPE_DEFINITION?eG.H.INPUT_FIELD_DEFINITION:eG.H.ARGUMENT_DEFINITION}default:(0,ti.V)(!1,"Unexpected kind: "+(0,v.N)(t.kind))}}(p);s&&!d.includes(s)&&e.reportError(new y.eO(`Directive "@${o}" may not be used on ${s}.`,{nodes:a}))}}}function tY(e){return{FragmentSpread(t){let a=t.name.value;e.getFragment(a)||e.reportError(new y.eO(`Unknown fragment "${a}".`,{nodes:t.name}))}}}function tG(e){let t=e.getSchema(),a=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let t of e.getDocument().definitions)(0,tL.a6)(t)&&(r[t.name.value]=!0);let i=[...Object.keys(a),...Object.keys(r)];return{NamedType(t,n,p,o,d){let s=t.name.value;if(!a[s]&&!r[s]){var l,u;let a=null!=(l=d[2])?l:p,r=null!=a&&"kind"in(u=a)&&((0,tL.xu)(u)||(0,tL.fT)(u));if(r&&tz.includes(s))return;let n=A(s,r?tz.concat(i):i);e.reportError(new y.eO(`Unknown type "${s}".`+_(n),{nodes:t}))}}}}let tz=[...e1,...t_].map(e=>e.name);function tH(e){let t=0;return{Document(e){t=e.definitions.filter(e=>e.kind===V.b.OPERATION_DEFINITION).length},OperationDefinition(a){!a.name&&t>1&&e.reportError(new y.eO("This anonymous operation must be the only defined operation.",{nodes:a}))}}}function tW(e){var t,a,r;let i=e.getSchema(),n=null!=(t=null!=(a=null!=(r=null==i?void 0:i.astNode)?r:null==i?void 0:i.getQueryType())?a:null==i?void 0:i.getMutationType())?t:null==i?void 0:i.getSubscriptionType(),p=0;return{SchemaDefinition(t){n?e.reportError(new y.eO("Cannot define a new schema within a schema extension.",{nodes:t})):(p>0&&e.reportError(new y.eO("Must provide only one schema definition.",{nodes:t})),++p)}}}function tJ(e){return{Field(t){if(("__schema"===t.name.value||"__type"===t.name.value)&&function t(a,r=Object.create(null),i=0){if(a.kind===V.b.FRAGMENT_SPREAD){let n=a.name.value;if(!0===r[n])return!1;let p=e.getFragment(n);if(!p)return!1;try{return r[n]=!0,t(p,r,i)}finally{r[n]=void 0}}if(a.kind===V.b.FIELD&&("fields"===a.name.value||"interfaces"===a.name.value||"possibleTypes"===a.name.value||"inputFields"===a.name.value)&&++i>=3)return!0;if("selectionSet"in a&&a.selectionSet){for(let e of a.selectionSet.selections)if(t(e,r,i))return!0}return!1}(t))return e.reportError(new y.eO("Maximum introspection depth exceeded",{nodes:[t]})),!1}}}function tK(e){let t=Object.create(null),a=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition:i=>((function i(n){if(t[n.name.value])return;let p=n.name.value;t[p]=!0;let o=e.getFragmentSpreads(n.selectionSet);if(0!==o.length){for(let t of(r[p]=a.length,o)){let n=t.name.value,p=r[n];if(a.push(t),void 0===p){let t=e.getFragment(n);t&&i(t)}else{let t=a.slice(p),r=t.slice(0,-1).map(e=>'"'+e.name.value+'"').join(", ");e.reportError(new y.eO(`Cannot spread fragment "${n}" within itself`+(""!==r?` via ${r}.`:"."),{nodes:t}))}a.pop()}r[p]=void 0}})(i),!1)}}function tZ(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(a){for(let{node:r}of e.getRecursiveVariableUsages(a)){let i=r.name.value;!0!==t[i]&&e.reportError(new y.eO(a.name?`Variable "$${i}" is not defined by operation "${a.name.value}".`:`Variable "$${i}" is not defined.`,{nodes:[r,a]}))}}},VariableDefinition(e){t[e.variable.name.value]=!0}}}function tX(e){let t=[],a=[];return{OperationDefinition:e=>(t.push(e),!1),FragmentDefinition:e=>(a.push(e),!1),Document:{leave(){let r=Object.create(null);for(let a of t)for(let t of e.getRecursivelyReferencedFragments(a))r[t.name.value]=!0;for(let t of a){let a=t.name.value;!0!==r[a]&&e.reportError(new y.eO(`Fragment "${a}" is never used.`,{nodes:t}))}}}}}function t1(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(a){let r=Object.create(null);for(let{node:t}of e.getRecursiveVariableUsages(a))r[t.name.value]=!0;for(let i of t){let t=i.variable.name.value;!0!==r[t]&&e.reportError(new y.eO(a.name?`Variable "$${t}" is never used in operation "${a.name.value}".`:`Variable "$${t}" is never used.`,{nodes:i}))}}},VariableDefinition(e){t.push(e)}}}function t0(e){switch(e.kind){case V.b.OBJECT:return{...e,fields:e.fields.map(e=>({...e,value:t0(e.value)})).sort((e,t)=>O(e.name.value,t.name.value))};case V.b.LIST:return{...e,values:e.values.map(t0)};case V.b.INT:case V.b.FLOAT:case V.b.STRING:case V.b.BOOLEAN:case V.b.NULL:case V.b.ENUM:case V.b.VARIABLE:return e}}function t2(e){let t=new t7,a=new ae,r=new Map;return{SelectionSet(i){for(let[[n,p],o,d]of function(e,t,a,r,i,n){let p=[],[o,d]=t5(e,t,i,n);if(function(e,t,a,r,i,n){for(let[p,o]of Object.entries(n))if(o.length>1)for(let n=0;n<o.length;n++)for(let d=n+1;d<o.length;d++){let s=t9(e,a,r,i,!1,p,o[n],o[d]);s&&t.push(s)}}(e,p,t,a,r,o),0!==d.length)for(let i=0;i<d.length;i++){t6(e,p,t,a,r,!1,o,d[i]);for(let n=i+1;n<d.length;n++)t4(e,p,t,a,r,!1,d[i],d[n])}return p}(e,r,t,a,e.getParentType(),i)){let t=function e(t){return Array.isArray(t)?t.map(([t,a])=>`subfields "${t}" conflict because `+e(a)).join(" and "):t}(p);e.reportError(new y.eO(`Fields "${n}" conflict because ${t}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:o.concat(d)}))}}}}function t6(e,t,a,r,i,n,p,o){if(r.has(p,o,n))return;r.add(p,o,n);let d=e.getFragment(o);if(!d)return;let[s,l]=t8(e,a,d);if(p!==s)for(let o of(t3(e,t,a,r,i,n,p,s),l))t6(e,t,a,r,i,n,p,o)}function t4(e,t,a,r,i,n,p,o){if(p===o||i.has(p,o,n))return;i.add(p,o,n);let d=e.getFragment(p),s=e.getFragment(o);if(!d||!s)return;let[l,u]=t8(e,a,d),[c,m]=t8(e,a,s);for(let o of(t3(e,t,a,r,i,n,l,c),m))t4(e,t,a,r,i,n,p,o);for(let p of u)t4(e,t,a,r,i,n,p,o)}function t3(e,t,a,r,i,n,p,o){for(let[d,s]of Object.entries(p)){let p=o[d];if(p)for(let o of s)for(let s of p){let p=t9(e,a,r,i,n,d,o,s);p&&t.push(p)}}}function t9(e,t,a,r,i,n,p,o){let[d,s,l]=p,[u,c,m]=o,f=i||d!==u&&q(d)&&q(u);if(!f){let e=s.name.value,t=c.name.value;if(e!==t)return[[n,`"${e}" and "${t}" are different fields`],[s],[c]];if(!function(e,t){let a=e.arguments,r=t.arguments;if(void 0===a||0===a.length)return void 0===r||0===r.length;if(void 0===r||0===r.length||a.length!==r.length)return!1;let i=new Map(r.map(({name:e,value:t})=>[e.value,t]));return a.every(e=>{let t=e.value,a=i.get(e.name.value);return void 0!==a&&function(e){return(0,R.y)(t0(e))}(t)===function(e){return(0,R.y)(t0(e))}(a)})}(s,c))return[[n,"they have differing arguments"],[s],[c]]}let h=null==l?void 0:l.type,y=null==m?void 0:m.type;if(h&&y&&function e(t,a){return X(t)?!X(a)||e(t.ofType,a.ofType):!!X(a)||(et(t)?!et(a)||e(t.ofType,a.ofType):!!et(a)||!!(eo(t)||eo(a))&&t!==a)}(h,y))return[[n,`they return conflicting types "${(0,v.N)(h)}" and "${(0,v.N)(y)}"`],[s],[c]];let g=s.selectionSet,_=c.selectionSet;if(g&&_){var b=function(e,t,a,r,i,n,p,o,d){let s=[],[l,u]=t5(e,t,n,p),[c,m]=t5(e,t,o,d);for(let n of(t3(e,s,t,a,r,i,l,c),m))t6(e,s,t,a,r,i,l,n);for(let n of u)t6(e,s,t,a,r,i,c,n);for(let n of u)for(let p of m)t4(e,s,t,a,r,i,n,p);return s}(e,t,a,r,f,eE(h),g,eE(y),_),w=n,E=s,T=c;return b.length>0?[[w,b.map(([e])=>e)],[E,...b.map(([,e])=>e).flat()],[T,...b.map(([,,e])=>e).flat()]]:void 0}}function t5(e,t,a,r){let i=t.get(r);if(i)return i;let n=Object.create(null),p=Object.create(null);!function e(t,a,r,i,n){for(let p of r.selections)switch(p.kind){case V.b.FIELD:{let e,t=p.name.value;(q(a)||Y(a))&&(e=a.getFields()[t]);let r=p.alias?p.alias.value:t;i[r]||(i[r]=[]),i[r].push([a,p,e]);break}case V.b.FRAGMENT_SPREAD:n[p.name.value]=!0;break;case V.b.INLINE_FRAGMENT:{let r=p.typeCondition,o=r?tR(t.getSchema(),r):a;e(t,o,p.selectionSet,i,n)}}}(e,a,r,n,p);let o=[n,Object.keys(p)];return t.set(r,o),o}function t8(e,t,a){let r=t.get(a.selectionSet);if(r)return r;let i=tR(e.getSchema(),a.typeCondition);return t5(e,t,i,a.selectionSet)}class t7{constructor(){this._data=new Map}has(e,t,a){var r;let i=null==(r=this._data.get(e))?void 0:r.get(t);return void 0!==i&&(!!a||a===i)}add(e,t,a){let r=this._data.get(e);void 0===r?this._data.set(e,new Map([[t,a]])):r.set(t,a)}}class ae{constructor(){this._orderedPairSet=new t7}has(e,t,a){return e<t?this._orderedPairSet.has(e,t,a):this._orderedPairSet.has(t,e,a)}add(e,t,a){e<t?this._orderedPairSet.add(e,t,a):this._orderedPairSet.add(t,e,a)}}function at(e){return{InlineFragment(t){let a=e.getType(),r=e.getParentType();if(es(a)&&es(r)&&!eY(e.getSchema(),a,r)){let i=(0,v.N)(r),n=(0,v.N)(a);e.reportError(new y.eO(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${n}".`,{nodes:t}))}},FragmentSpread(t){let a=t.name.value,r=function(e,t){let a=e.getFragment(t);if(a){let t=tR(e.getSchema(),a.typeCondition);if(es(t))return t}}(e,a),i=e.getParentType();if(r&&i&&!eY(e.getSchema(),r,i)){let n=(0,v.N)(i),p=(0,v.N)(r);e.reportError(new y.eO(`Fragment "${a}" cannot be spread here as objects of type "${n}" can never be of type "${p}".`,{nodes:t}))}}}}function aa(e){let t=e.getSchema(),a=Object.create(null);for(let t of e.getDocument().definitions)(0,tL.a6)(t)&&(a[t.name.value]=t);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(r){var i;let n,p=r.name.value,o=a[p],d=null==t?void 0:t.getType(p);if(o?n=ar[o.kind]:d&&(n=U(i=d)?V.b.SCALAR_TYPE_EXTENSION:q(i)?V.b.OBJECT_TYPE_EXTENSION:Y(i)?V.b.INTERFACE_TYPE_EXTENSION:z(i)?V.b.UNION_TYPE_EXTENSION:W(i)?V.b.ENUM_TYPE_EXTENSION:K(i)?V.b.INPUT_OBJECT_TYPE_EXTENSION:void(0,ti.V)(!1,"Unexpected type: "+(0,v.N)(i))),n){if(n!==r.kind){let t=function(e){switch(e){case V.b.SCALAR_TYPE_EXTENSION:return"scalar";case V.b.OBJECT_TYPE_EXTENSION:return"object";case V.b.INTERFACE_TYPE_EXTENSION:return"interface";case V.b.UNION_TYPE_EXTENSION:return"union";case V.b.ENUM_TYPE_EXTENSION:return"enum";case V.b.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,ti.V)(!1,"Unexpected kind: "+(0,v.N)(e))}}(r.kind);e.reportError(new y.eO(`Cannot extend non-${t} type "${p}".`,{nodes:o?[o,r]:r}))}}else{let i=A(p,Object.keys({...a,...null==t?void 0:t.getTypeMap()}));e.reportError(new y.eO(`Cannot extend type "${p}" because it is not defined.`+_(i),{nodes:r.name}))}}}let ar={[V.b.SCALAR_TYPE_DEFINITION]:V.b.SCALAR_TYPE_EXTENSION,[V.b.OBJECT_TYPE_DEFINITION]:V.b.OBJECT_TYPE_EXTENSION,[V.b.INTERFACE_TYPE_DEFINITION]:V.b.INTERFACE_TYPE_EXTENSION,[V.b.UNION_TYPE_DEFINITION]:V.b.UNION_TYPE_EXTENSION,[V.b.ENUM_TYPE_DEFINITION]:V.b.ENUM_TYPE_EXTENSION,[V.b.INPUT_OBJECT_TYPE_DEFINITION]:V.b.INPUT_OBJECT_TYPE_EXTENSION};function ai(e){return{...an(e),Field:{leave(t){var a;let r=e.getFieldDef();if(!r)return!1;let i=new Set(null==(a=t.arguments)?void 0:a.map(e=>e.name.value));for(let a of r.args)if(!i.has(a.name)&&eV(a)){let i=(0,v.N)(a.type);e.reportError(new y.eO(`Field "${r.name}" argument "${a.name}" of type "${i}" is required, but it was not provided.`,{nodes:t}))}}}}}function an(e){var t,a;let r=Object.create(null),i=e.getSchema();for(let e of null!=(t=null==i?void 0:i.getDirectives())?t:ta)r[e.name]=T(e.args.filter(eV),e=>e.name);for(let t of e.getDocument().definitions)if(t.kind===V.b.DIRECTIVE_DEFINITION){let e=null!=(a=t.arguments)?a:[];r[t.name.value]=T(e.filter(ap),e=>e.name.value)}return{Directive:{leave(t){let a=t.name.value,i=r[a];if(i){var n;let r=new Set((null!=(n=t.arguments)?n:[]).map(e=>e.name.value));for(let[n,p]of Object.entries(i))if(!r.has(n)){let r=$(p.type)?(0,v.N)(p.type):(0,R.y)(p.type);e.reportError(new y.eO(`Directive "@${a}" argument "${n}" of type "${r}" is required, but it was not provided.`,{nodes:t}))}}}}}}function ap(e){return e.type.kind===V.b.NON_NULL_TYPE&&null==e.defaultValue}function ao(e){return{Field(t){let a=e.getType(),r=t.selectionSet;if(a)if(eo(eE(a))){if(r){let i=t.name.value,n=(0,v.N)(a);e.reportError(new y.eO(`Field "${i}" must not have a selection since type "${n}" has no subfields.`,{nodes:r}))}}else if(r){if(0===r.selections.length){let r=t.name.value,i=(0,v.N)(a);e.reportError(new y.eO(`Field "${r}" of type "${i}" must have at least one field selected.`,{nodes:t}))}}else{let r=t.name.value,i=(0,v.N)(a);e.reportError(new y.eO(`Field "${r}" of type "${i}" must have a selection of subfields. Did you mean "${r} { ... }"?`,{nodes:t}))}}}}function ad(e){return e.map(e=>"number"==typeof e?"["+e.toString()+"]":"."+e).join("")}function as(e,t,a){return{prev:e,key:t,typename:a}}function al(e){let t=[],a=e;for(;a;)t.push(a.key),a=a.prev;return t.reverse()}function au(e,t,a=ac){return function e(t,a,r,i){if(et(a))return null!=t?e(t,a.ofType,r,i):void r(al(i),t,new y.eO(`Expected non-nullable type "${(0,v.N)(a)}" not to be null.`));if(null==t)return null;if(X(a)){let n=a.ofType;return tn(t)?Array.from(t,(t,a)=>e(t,n,r,as(i,a,void 0))):[e(t,n,r,i)]}if(K(a)){if(!(0,E.Z)(t)||Array.isArray(t))return void r(al(i),t,new y.eO(`Expected type "${a.name}" to be an object.`));let n={},p=a.getFields();for(let o of Object.values(p)){let p=t[o.name];if(void 0===p){if(void 0!==o.defaultValue)n[o.name]=o.defaultValue;else if(et(o.type)){let e=(0,v.N)(o.type);r(al(i),t,new y.eO(`Field "${o.name}" of required type "${e}" was not provided.`))}continue}n[o.name]=e(p,o.type,r,as(i,o.name,a.name))}for(let e of Object.keys(t))if(!p[e]){let n=A(e,Object.keys(a.getFields()));r(al(i),t,new y.eO(`Field "${e}" is not defined by type "${a.name}".`+_(n)))}if(a.isOneOf){let e=Object.keys(n);1!==e.length&&r(al(i),t,new y.eO(`Exactly one key must be specified for OneOf type "${a.name}".`));let p=e[0],o=n[p];null===o&&r(al(i).concat(p),o,new y.eO(`Field "${p}" must be non-null.`))}return n}if(eo(a)){let e;try{e=a.parseValue(t)}catch(e){e instanceof y.eO?r(al(i),t,e):r(al(i),t,new y.eO(`Expected type "${a.name}". `+e.message,{originalError:e}));return}return void 0===e&&r(al(i),t,new y.eO(`Expected type "${a.name}".`)),e}(0,ti.V)(!1,"Unexpected input type: "+(0,v.N)(a))}(e,t,a,void 0)}function ac(e,t,a){let r="Invalid value "+(0,v.N)(t);throw e.length>0&&(r+=` at "value${ad(e)}"`),a.message=r+": "+a.message,a}function am(e,t,a){if(e){if(e.kind===V.b.VARIABLE){let r=e.name.value;if(null==a||void 0===a[r])return;let i=a[r];if(null===i&&et(t))return;return i}if(et(t)){if(e.kind===V.b.NULL)return;return am(e,t.ofType,a)}if(e.kind===V.b.NULL)return null;if(X(t)){let r=t.ofType;if(e.kind===V.b.LIST){let t=[];for(let i of e.values)if(af(i,a)){if(et(r))return;t.push(null)}else{let e=am(i,r,a);if(void 0===e)return;t.push(e)}return t}let i=am(e,r,a);if(void 0===i)return;return[i]}if(K(t)){if(e.kind!==V.b.OBJECT)return;let r=Object.create(null),i=T(e.fields,e=>e.name.value);for(let e of Object.values(t.getFields())){let t=i[e.name];if(!t||af(t.value,a)){if(void 0!==e.defaultValue)r[e.name]=e.defaultValue;else if(et(e.type))return;continue}let n=am(t.value,e.type,a);if(void 0===n)return;r[e.name]=n}if(t.isOneOf){let e=Object.keys(r);if(1!==e.length||null===r[e[0]])return}return r}if(eo(t)){let r;try{r=t.parseLiteral(e,a)}catch(e){return}if(void 0===r)return;return r}(0,ti.V)(!1,"Unexpected input type: "+(0,v.N)(t))}}function af(e,t){return e.kind===V.b.VARIABLE&&(null==t||void 0===t[e.name.value])}function ah(e,t,a,r){let i=[],n=null==r?void 0:r.maxErrors;try{let r=function(e,t,a,r){let i={};for(let n of t){let t=n.variable.name.value,p=tR(e,n.type);if(!er(p)){let e=(0,R.y)(n.type);r(new y.eO(`Variable "$${t}" expected value of type "${e}" which cannot be used as an input type.`,{nodes:n.type}));continue}if(!ag(a,t)){if(n.defaultValue)i[t]=am(n.defaultValue,p);else if(et(p)){let e=(0,v.N)(p);r(new y.eO(`Variable "$${t}" of required type "${e}" was not provided.`,{nodes:n}))}continue}let o=a[t];if(null===o&&et(p)){let e=(0,v.N)(p);r(new y.eO(`Variable "$${t}" of non-null type "${e}" must not be null.`,{nodes:n}));continue}i[t]=au(o,p,(e,a,i)=>{let p=`Variable "$${t}" got invalid value `+(0,v.N)(a);e.length>0&&(p+=` at "${t}${ad(e)}"`),r(new y.eO(p+"; "+i.message,{nodes:n,originalError:i}))})}return i}(e,t,a,e=>{if(null!=n&&i.length>=n)throw new y.eO("Too many errors processing variables, error limit reached. Execution aborted.");i.push(e)});if(0===i.length)return{coerced:r}}catch(e){i.push(e)}return{errors:i}}function av(e,t,a){var r;let i={},n=T(null!=(r=t.arguments)?r:[],e=>e.name.value);for(let r of e.args){let e=r.name,p=r.type,o=n[e];if(!o){if(void 0!==r.defaultValue)i[e]=r.defaultValue;else if(et(p))throw new y.eO(`Argument "${e}" of required type "${(0,v.N)(p)}" was not provided.`,{nodes:t});continue}let d=o.value,s=d.kind===V.b.NULL;if(d.kind===V.b.VARIABLE){let t=d.name.value;if(null==a||!ag(a,t)){if(void 0!==r.defaultValue)i[e]=r.defaultValue;else if(et(p))throw new y.eO(`Argument "${e}" of required type "${(0,v.N)(p)}" was provided the variable "$${t}" which was not provided a runtime value.`,{nodes:d});continue}s=null==a[t]}if(s&&et(p))throw new y.eO(`Argument "${e}" of non-null type "${(0,v.N)(p)}" must not be null.`,{nodes:d});let l=am(d,p,a);if(void 0===l)throw new y.eO(`Argument "${e}" has invalid value ${(0,R.y)(d)}.`,{nodes:d});i[e]=l}return i}function ay(e,t,a){var r;let i=null==(r=t.directives)?void 0:r.find(t=>t.name.value===e.name);if(i)return av(e,i,a)}function ag(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function a_(e,t,a,r,i){let n=new Map;return ab(e,t,a,r,i,n,new Set),n}function ab(e,t,a,r,i,n,p){for(let d of i.selections)switch(d.kind){case V.b.FIELD:{var o;if(!aw(a,d))continue;let e=(o=d).alias?o.alias.value:o.name.value,t=n.get(e);void 0!==t?t.push(d):n.set(e,[d]);break}case V.b.INLINE_FRAGMENT:if(!aw(a,d)||!aE(e,d,r))continue;ab(e,t,a,r,d.selectionSet,n,p);break;case V.b.FRAGMENT_SPREAD:{let i=d.name.value;if(p.has(i)||!aw(a,d))continue;p.add(i);let o=t[i];if(!o||!aE(e,o,r))continue;ab(e,t,a,r,o.selectionSet,n,p)}}}function aw(e,t){let a=ay(e5,t,e);if((null==a?void 0:a.if)===!0)return!1;let r=ay(e9,t,e);return(null==r?void 0:r.if)!==!1}function aE(e,t,a){let r=t.typeCondition;if(!r)return!0;let i=tR(e,r);return i===a||!!eu(i)&&e.isSubType(i,a)}function aT(e){return{OperationDefinition(t){if("subscription"===t.operation){let a=e.getSchema(),r=a.getSubscriptionType();if(r){let i=t.name?t.name.value:null,n=Object.create(null),p=e.getDocument(),o=Object.create(null);for(let e of p.definitions)e.kind===V.b.FRAGMENT_DEFINITION&&(o[e.name.value]=e);let d=a_(a,o,n,r,t.selectionSet);if(d.size>1){let t=[...d.values()].slice(1).flat();e.reportError(new y.eO(null!=i?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:t}))}for(let t of d.values())t[0].name.value.startsWith("__")&&e.reportError(new y.eO(null!=i?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:t}))}}}}}function aN(e,t){let a=new Map;for(let r of e){let e=t(r),i=a.get(e);void 0===i?a.set(e,[r]):i.push(r)}return a}function aS(e){return{DirectiveDefinition(e){var t;let r=null!=(t=e.arguments)?t:[];return a(`@${e.name.value}`,r)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(e){var t,r;let i=e.name.value;for(let n of null!=(t=e.fields)?t:[]){let e=n.name.value;a(`${i}.${e}`,null!=(r=n.arguments)?r:[])}return!1}function a(t,a){for(let[r,i]of aN(a,e=>e.name.value))i.length>1&&e.reportError(new y.eO(`Argument "${t}(${r}:)" can only be defined once.`,{nodes:i.map(e=>e.name)}));return!1}}function aO(e){return{Field:t,Directive:t};function t(t){var a;for(let[r,i]of aN(null!=(a=t.arguments)?a:[],e=>e.name.value))i.length>1&&e.reportError(new y.eO(`There can be only one argument named "${r}".`,{nodes:i.map(e=>e.name)}))}}function aD(e){let t=Object.create(null),a=e.getSchema();return{DirectiveDefinition(r){let i=r.name.value;return null!=a&&a.getDirective(i)?void e.reportError(new y.eO(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name})):(t[i]?e.reportError(new y.eO(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1)}}}function aI(e){let t=Object.create(null),a=e.getSchema();for(let e of a?a.getDirectives():ta)t[e.name]=!e.isRepeatable;for(let a of e.getDocument().definitions)a.kind===V.b.DIRECTIVE_DEFINITION&&(t[a.name.value]=!a.repeatable);let r=Object.create(null),i=Object.create(null);return{enter(a){let n;if("directives"in a&&a.directives){if(a.kind===V.b.SCHEMA_DEFINITION||a.kind===V.b.SCHEMA_EXTENSION)n=r;else if((0,tL.a6)(a)||(0,tL.i7)(a)){let e=a.name.value;void 0===(n=i[e])&&(i[e]=n=Object.create(null))}else n=Object.create(null);for(let r of a.directives){let a=r.name.value;t[a]&&(n[a]?e.reportError(new y.eO(`The directive "@${a}" can only be used once at this location.`,{nodes:[n[a],r]})):n[a]=r)}}}}}function aA(e){let t=e.getSchema(),a=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(t){var i;let n=t.name.value;r[n]||(r[n]=Object.create(null));let p=null!=(i=t.values)?i:[],o=r[n];for(let t of p){let r=t.name.value,i=a[n];W(i)&&i.getValue(r)?e.reportError(new y.eO(`Enum value "${n}.${r}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:t.name})):o[r]?e.reportError(new y.eO(`Enum value "${n}.${r}" can only be defined once.`,{nodes:[o[r],t.name]})):o[r]=t.name}return!1}}function ak(e){let t=e.getSchema(),a=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(t){var i,n,p;let o=t.name.value;r[o]||(r[o]=Object.create(null));let d=null!=(i=t.fields)?i:[],s=r[o];for(let t of d){let r=t.name.value;(n=a[o],p=r,(q(n)||Y(n)||K(n))&&null!=n.getFields()[p])?e.reportError(new y.eO(`Field "${o}.${r}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:t.name})):s[r]?e.reportError(new y.eO(`Field "${o}.${r}" can only be defined once.`,{nodes:[s[r],t.name]})):s[r]=t.name}return!1}}function ax(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(a){let r=a.name.value;return t[r]?e.reportError(new y.eO(`There can be only one fragment named "${r}".`,{nodes:[t[r],a.name]})):t[r]=a.name,!1}}}function aC(e){let t=[],a=Object.create(null);return{ObjectValue:{enter(){t.push(a),a=Object.create(null)},leave(){let e=t.pop();e||(0,ti.V)(!1),a=e}},ObjectField(t){let r=t.name.value;a[r]?e.reportError(new y.eO(`There can be only one input field named "${r}".`,{nodes:[a[r],t.name]})):a[r]=t.name}}}function aV(e){let t=Object.create(null);return{OperationDefinition(a){let r=a.name;return r&&(t[r.value]?e.reportError(new y.eO(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function aR(e){let t=e.getSchema(),a=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(t){var i;for(let n of null!=(i=t.operationTypes)?i:[]){let t=n.operation,i=a[t];r[t]?e.reportError(new y.eO(`Type for ${t} already defined in the schema. It cannot be redefined.`,{nodes:n})):i?e.reportError(new y.eO(`There can be only one ${t} type in schema.`,{nodes:[i,n]})):a[t]=n}return!1}}function aF(e){let t=Object.create(null),a=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(r){let i=r.name.value;return null!=a&&a.getType(i)?void e.reportError(new y.eO(`Type "${i}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:r.name})):(t[i]?e.reportError(new y.eO(`There can be only one type named "${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1)}}function aP(e){return{OperationDefinition(t){var a;for(let[r,i]of aN(null!=(a=t.variableDefinitions)?a:[],e=>e.variable.name.value))i.length>1&&e.reportError(new y.eO(`There can be only one variable named "$${r}".`,{nodes:i.map(e=>e.variable.name)}))}}}function aj(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(e){t[e.variable.name.value]=e},ListValue(t){if(!X(e_(e.getParentInputType())))return aL(e,t),!1},ObjectValue(t){let a=eE(e.getInputType());if(!K(a))return aL(e,t),!1;let r=T(t.fields,e=>e.name.value);for(let i of Object.values(a.getFields()))if(!r[i.name]&&eB(i)){let r=(0,v.N)(i.type);e.reportError(new y.eO(`Field "${a.name}.${i.name}" of required type "${r}" was not provided.`,{nodes:t}))}a.isOneOf&&function(e,t,a,r){var i;let n=Object.keys(r);if(1!==n.length)return e.reportError(new y.eO(`OneOf Input Object "${a.name}" must specify exactly one key.`,{nodes:[t]}));let p=null==(i=r[n[0]])?void 0:i.value;p&&p.kind!==V.b.NULL||e.reportError(new y.eO(`Field "${a.name}.${n[0]}" must be non-null.`,{nodes:[t]}))}(e,t,a,r)},ObjectField(t){let a=eE(e.getParentInputType());if(!e.getInputType()&&K(a)){let r=A(t.name.value,Object.keys(a.getFields()));e.reportError(new y.eO(`Field "${t.name.value}" is not defined by type "${a.name}".`+_(r),{nodes:t}))}},NullValue(t){let a=e.getInputType();et(a)&&e.reportError(new y.eO(`Expected value of type "${(0,v.N)(a)}", found ${(0,R.y)(t)}.`,{nodes:t}))},EnumValue:t=>aL(e,t),IntValue:t=>aL(e,t),FloatValue:t=>aL(e,t),StringValue:t=>aL(e,t),BooleanValue:t=>aL(e,t)}}function aL(e,t){let a=e.getInputType();if(!a)return;let r=eE(a);if(!eo(r)){let r=(0,v.N)(a);e.reportError(new y.eO(`Expected value of type "${r}", found ${(0,R.y)(t)}.`,{nodes:t}));return}try{let i=r.parseLiteral(t,void 0);if(void 0===i){let r=(0,v.N)(a);e.reportError(new y.eO(`Expected value of type "${r}", found ${(0,R.y)(t)}.`,{nodes:t}))}}catch(i){let r=(0,v.N)(a);i instanceof y.eO?e.reportError(i):e.reportError(new y.eO(`Expected value of type "${r}", found ${(0,R.y)(t)}; `+i.message,{nodes:t,originalError:i}))}}function a$(e){return{VariableDefinition(t){let a=tR(e.getSchema(),t.type);if(void 0!==a&&!er(a)){let a=t.variable.name.value,r=(0,R.y)(t.type);e.reportError(new y.eO(`Variable "$${a}" cannot be non-input type "${r}".`,{nodes:t.type}))}}}}function aM(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(a){for(let{node:d,type:s,defaultValue:l,parentType:u}of e.getRecursiveVariableUsages(a)){let a=d.name.value,c=t[a];if(c&&s){var r,i,n,p,o;let t=e.getSchema(),m=tR(t,c.type);if(m&&(r=t,i=m,n=c.defaultValue,p=s,o=l,et(p)&&!et(i)?!((null!=n&&n.kind!==V.b.NULL||void 0!==o)&&eQ(r,i,p.ofType)):!eQ(r,i,p))){let t=(0,v.N)(m),r=(0,v.N)(s);e.reportError(new y.eO(`Variable "$${a}" of type "${t}" used in position expecting type "${r}".`,{nodes:[c,d]}))}K(u)&&u.isOneOf&&ey(m)&&e.reportError(new y.eO(`Variable "$${a}" is of type "${m}" but must be non-nullable to be used for OneOf Input Object "${u}".`,{nodes:[c,d]}))}}}},VariableDefinition(e){t[e.variable.name.value]=e}}}let aU=Object.freeze([tJ]),aB=Object.freeze([t$,aV,tH,aT,tG,tU,a$,ao,tM,ax,tY,tX,at,tK,aP,tZ,t1,tQ,aI,tB,aO,aj,ai,aM,t2,aC,...aU]),aq=Object.freeze([tW,aR,aF,aA,ak,aS,aD,tG,tQ,aI,aa,tq,aO,aC,an]);class aQ{constructor(e,t){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=t}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let t;if(this._fragments)t=this._fragments;else{for(let e of(t=Object.create(null),this.getDocument().definitions))e.kind===V.b.FRAGMENT_DEFINITION&&(t[e.name.value]=e);this._fragments=t}return t[e]}getFragmentSpreads(e){let t=this._fragmentSpreads.get(e);if(!t){let a;t=[];let r=[e];for(;a=r.pop();)for(let e of a.selections)e.kind===V.b.FRAGMENT_SPREAD?t.push(e):e.selectionSet&&r.push(e.selectionSet);this._fragmentSpreads.set(e,t)}return t}getRecursivelyReferencedFragments(e){let t=this._recursivelyReferencedFragments.get(e);if(!t){let a;t=[];let r=Object.create(null),i=[e.selectionSet];for(;a=i.pop();)for(let e of this.getFragmentSpreads(a)){let a=e.name.value;if(!0!==r[a]){r[a]=!0;let e=this.getFragment(a);e&&(t.push(e),i.push(e.selectionSet))}}this._recursivelyReferencedFragments.set(e,t)}return t}}class aY extends aQ{constructor(e,t,a){super(e,a),this._schema=t}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class aG extends aQ{constructor(e,t,a,r){super(t,r),this._schema=e,this._typeInfo=a,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(e){let t=this._variableUsages.get(e);if(!t){let a=[],r=new tF(this._schema);(0,tV.YR)(e,tj(r,{VariableDefinition:()=>!1,Variable(e){a.push({node:e,type:r.getInputType(),defaultValue:r.getDefaultValue(),parentType:r.getParentInputType()})}})),t=a,this._variableUsages.set(e,t)}return t}getRecursiveVariableUsages(e){let t=this._recursiveVariableUsages.get(e);if(!t){for(let a of(t=this.getVariableUsages(e),this.getRecursivelyReferencedFragments(e)))t=t.concat(this.getVariableUsages(a));this._recursiveVariableUsages.set(e,t)}return t}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 az(e,t,a=aB,r,i=new tF(e)){var n;let p=null!=(n=null==r?void 0:r.maxErrors)?n:100;t||(0,m.U)(!1,"Must provide document."),tO(e);let o=Object.freeze({}),d=[],s=new aG(e,t,i,e=>{if(d.length>=p)throw d.push(new y.eO("Too many validation errors, error limit reached. Validation aborted.")),o;d.push(e)}),l=(0,tV.oP)(a.map(e=>e(s)));try{(0,tV.YR)(t,tj(i,l))}catch(e){if(e!==o)throw e}return d}function aH(e,t,a=aq){let r=[],i=new aY(e,t,e=>{r.push(e)}),n=a.map(e=>e(i));return(0,tV.YR)(e,(0,tV.oP)(n)),r}function aW(e){return Promise.all(Object.values(e)).then(t=>{let a=Object.create(null);for(let[r,i]of Object.keys(e).entries())a[i]=t[r];return a})}class aJ extends Error{constructor(e){super("Unexpected error value: "+(0,v.N)(e)),this.name="NonErrorThrown",this.thrownValue=e}}function aK(e,t,a){var r;let i=e instanceof Error?e:new aJ(e);return Array.isArray(i.path)?i:new y.eO(i.message,{nodes:null!=(r=i.nodes)?r:t,source:i.source,positions:i.positions,path:a,originalError:i})}let aZ=(o=(e,t,a)=>(function(e,t,a,r,i){let n=new Map,p=new Set;for(let o of i)o.selectionSet&&ab(e,t,a,r,o.selectionSet,n,p);return n})(e.schema,e.fragments,e.variableValues,t,a),function(e,t,a){void 0===r&&(r=new WeakMap);let i=r.get(e);void 0===i&&(i=new WeakMap,r.set(e,i));let n=i.get(t);void 0===n&&(n=new WeakMap,i.set(t,n));let p=n.get(a);return void 0===p&&(p=o(e,t,a),n.set(a,p)),p});function aX(e){arguments.length<2||(0,m.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,document:a,variableValues:r,rootValue:i}=e;a2(t,a,r);let n=a6(e);if(!("schema"in n))return{errors:n};try{let{operation:e}=n,t=function(e,t,a){let r=e.schema.getRootType(t.operation);if(null==r)throw new y.eO(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=a_(e.schema,e.fragments,e.variableValues,r,t.selectionSet),n;switch(t.operation){case g.cE.QUERY:return a4(e,r,a,n,i);case g.cE.MUTATION:var p,o,d,s,l;return p=e,o=r,d=a,s=n,l=i,function(e,t,a){let r=a;for(let a of e)r=f(r)?r.then(e=>t(e,a)):t(r,a);return r}(l.entries(),(e,[t,a])=>{let r=as(s,t,o.name),i=a3(p,o,d,a,r);return void 0===i?e:f(i)?i.then(a=>(e[t]=a,e)):(e[t]=i,e)},Object.create(null));case g.cE.SUBSCRIPTION:return a4(e,r,a,n,i)}}(n,e,i);if(f(t))return t.then(e=>a0(e,n.errors),e=>(n.errors.push(e),a0(null,n.errors)));return a0(t,n.errors)}catch(e){return n.errors.push(e),a0(null,n.errors)}}function a1(e){let t=aX(e);if(f(t))throw Error("GraphQL execution failed to complete synchronously.");return t}function a0(e,t){return 0===t.length?{data:e}:{errors:t,data:e}}function a2(e,t,a){t||(0,m.U)(!1,"Must provide document."),tO(e),null==a||(0,E.Z)(a)||(0,m.U)(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function a6(e){var t,a,r;let i,{schema:n,document:p,rootValue:o,contextValue:d,variableValues:s,operationName:l,fieldResolver:u,typeResolver:c,subscribeFieldResolver:m,options:f}=e,h=Object.create(null);for(let e of p.definitions)switch(e.kind){case V.b.OPERATION_DEFINITION:if(null==l){if(void 0!==i)return[new y.eO("Must provide operation name if query contains multiple operations.")];i=e}else(null==(t=e.name)?void 0:t.value)===l&&(i=e);break;case V.b.FRAGMENT_DEFINITION:h[e.name.value]=e}if(!i)return null!=l?[new y.eO(`Unknown operation named "${l}".`)]:[new y.eO("Must provide an operation.")];let v=ah(n,null!=(a=i.variableDefinitions)?a:[],null!=s?s:{},{maxErrors:null!=(r=null==f?void 0:f.maxCoercionErrors)?r:50});return v.errors?v.errors:{schema:n,fragments:h,rootValue:o,contextValue:d,operation:i,variableValues:v.coerced,fieldResolver:null!=u?u:rr,typeResolver:null!=c?c:ra,subscribeFieldResolver:null!=m?m:rr,errors:[]}}function a4(e,t,a,r,i){let n=Object.create(null),p=!1;try{for(let[o,d]of i.entries()){let i=as(r,o,t.name),s=a3(e,t,a,d,i);void 0!==s&&(n[o]=s,f(s)&&(p=!0))}}catch(e){if(p)return aW(n).finally(()=>{throw e});throw e}return p?aW(n):n}function a3(e,t,a,r,i){var n;let p=ri(e.schema,t,r[0]);if(!p)return;let o=p.type,d=null!=(n=p.resolve)?n:e.fieldResolver,s=a9(e,p,r,t,i);try{let t,n=av(p,r[0],e.variableValues),l=e.contextValue,u=d(a,n,l,s);if(t=f(u)?u.then(t=>a8(e,o,r,s,i,t)):a8(e,o,r,s,i,u),f(t))return t.then(void 0,t=>{let a=aK(t,r,al(i));return a5(a,o,e)});return t}catch(t){return a5(aK(t,r,al(i)),o,e)}}function a9(e,t,a,r,i){return{fieldName:t.name,fieldNodes:a,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function a5(e,t,a){if(et(t))throw e;return a.errors.push(e),null}function a8(e,t,a,r,i,n){var p,o,d,s,l,u,c;let m;if(n instanceof Error)throw n;if(et(t)){let p=a8(e,t.ofType,a,r,i,n);if(null===p)throw Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return p}return null==n?null:X(t)?function(e,t,a,r,i,n){if(!tn(n))throw new y.eO(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);let p=t.ofType,o=!1,d=Array.from(n,(t,n)=>{let d=as(i,n,void 0);try{let i;if(i=f(t)?t.then(t=>a8(e,p,a,r,d,t)):a8(e,p,a,r,d,t),f(i))return o=!0,i.then(void 0,t=>{let r=aK(t,a,al(d));return a5(r,p,e)});return i}catch(t){return a5(aK(t,a,al(d)),p,e)}});return o?Promise.all(d):d}(e,t,a,r,i,n):eo(t)?function(e,t){let a=e.serialize(t);if(null==a)throw Error(`Expected \`${(0,v.N)(e)}.serialize(${(0,v.N)(t)})\` to return non-nullable value, returned: ${(0,v.N)(a)}`);return a}(t,n):eu(t)?(p=e,o=t,d=a,s=r,l=i,u=n,f(m=(null!=(c=o.resolveType)?c:p.typeResolver)(u,p.contextValue,s,o))?m.then(e=>re(p,a7(e,p,o,d,s,u),d,s,l,u)):re(p,a7(m,p,o,d,s,u),d,s,l,u)):q(t)?re(e,t,a,r,i,n):void(0,ti.V)(!1,"Cannot complete value of unexpected output type: "+(0,v.N)(t))}function a7(e,t,a,r,i,n){if(null==e)throw new y.eO(`Abstract type "${a.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${a.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if(q(e))throw new y.eO("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if("string"!=typeof e)throw new y.eO(`Abstract type "${a.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,v.N)(n)}, received "${(0,v.N)(e)}".`);let p=t.schema.getType(e);if(null==p)throw new y.eO(`Abstract type "${a.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!q(p))throw new y.eO(`Abstract type "${a.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(a,p))throw new y.eO(`Runtime Object type "${p.name}" is not a possible type for "${a.name}".`,{nodes:r});return p}function re(e,t,a,r,i,n){let p=aZ(e,t,a);if(t.isTypeOf){let o=t.isTypeOf(n,e.contextValue,r);if(f(o))return o.then(r=>{if(!r)throw rt(t,n,a);return a4(e,t,n,i,p)});if(!o)throw rt(t,n,a)}return a4(e,t,n,i,p)}function rt(e,t,a){return new y.eO(`Expected value of type "${e.name}" but got: ${(0,v.N)(t)}.`,{nodes:a})}let ra=function(e,t,a,r){if((0,E.Z)(e)&&"string"==typeof e.__typename)return e.__typename;let i=a.schema.getPossibleTypes(r),n=[];for(let r=0;r<i.length;r++){let p=i[r];if(p.isTypeOf){let i=p.isTypeOf(e,t,a);if(f(i))n[r]=i;else if(i)return n.length&&Promise.allSettled(n).catch(()=>{}),p.name}}if(n.length)return Promise.all(n).then(e=>{for(let t=0;t<e.length;t++)if(e[t])return i[t].name})},rr=function(e,t,a,r){if((0,E.Z)(e)||"function"==typeof e){let i=e[r.fieldName];return"function"==typeof i?e[r.fieldName](t,a,r):i}};function ri(e,t,a){let r=a.name.value;return r===tv.name&&e.getQueryType()===t?tv:r===ty.name&&e.getQueryType()===t?ty:r===tg.name?tg:t.getFields()[r]}function rn(e){return new Promise(t=>t(ro(e)))}function rp(e){let t=ro(e);if(f(t))throw Error("GraphQL execution failed to complete synchronously.");return t}function ro(e){let t;arguments.length<2||(0,m.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:a,source:r,rootValue:i,contextValue:n,variableValues:p,operationName:o,fieldResolver:d,typeResolver:s}=e,l=tS(a);if(l.length>0)return{errors:l};try{t=(0,h.qg)(r)}catch(e){return{errors:[e]}}let u=az(a,t);return u.length>0?{errors:u}:aX({schema:a,document:t,rootValue:i,contextValue:n,variableValues:p,operationName:o,fieldResolver:d,typeResolver:s})}var rd=a(39537),rs=a(73971),rl=a(8238),ru=a(98472),rc=a(12039);function rm(e){return"function"==typeof(null==e?void 0:e[Symbol.asyncIterator])}async function rf(e){arguments.length<2||(0,m.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let t=await rh(e);if(!rm(t))return t;let a=t[Symbol.asyncIterator]();async function r(t){if(t.done)return t;try{let a;return{value:await (a=t.value,aX({...e,rootValue:a})),done:!1}}catch(e){if("function"==typeof a.return)try{await a.return()}catch(e){}throw e}}return{next:async()=>r(await a.next()),return:async()=>"function"==typeof a.return?r(await a.return()):{value:void 0,done:!0},async throw(e){if("function"==typeof a.throw)return r(await a.throw(e));throw e},[Symbol.asyncIterator](){return this}}}async function rh(...e){let t,a=(t=e[0])&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]},{schema:r,document:i,variableValues:n}=a;a2(r,i,n);let p=a6(a);if(!("schema"in p))return{errors:p};try{let e=await rv(p);if(!rm(e))throw Error(`Subscription field must return Async Iterable. Received: ${(0,v.N)(e)}.`);return e}catch(e){if(e instanceof y.eO)return{errors:[e]};throw e}}async function rv(e){let{schema:t,fragments:a,operation:r,variableValues:i,rootValue:n}=e,p=t.getSubscriptionType();if(null==p)throw new y.eO("Schema is not configured to execute subscription operation.",{nodes:r});let[o,d]=[...a_(t,a,i,p,r.selectionSet).entries()][0],s=ri(t,p,d[0]);if(!s){let e=d[0].name.value;throw new y.eO(`The subscription field "${e}" is not defined.`,{nodes:d})}let l=as(void 0,o,p.name),u=a9(e,s,d,p,l);try{var c;let t=av(s,d[0],i),a=e.contextValue,r=null!=(c=s.subscribe)?c:e.subscribeFieldResolver,p=await r(n,t,a,u);if(p instanceof Error)throw p;return p}catch(e){throw aK(e,d,al(l))}}function ry(e){return{Field(t){let a=e.getFieldDef(),r=null==a?void 0:a.deprecationReason;if(a&&null!=r){let i=e.getParentType();null!=i||(0,ti.V)(!1),e.reportError(new y.eO(`The field ${i.name}.${a.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){let a=e.getArgument(),r=null==a?void 0:a.deprecationReason;if(a&&null!=r){let i=e.getDirective();if(null!=i)e.reportError(new y.eO(`Directive "@${i.name}" argument "${a.name}" is deprecated. ${r}`,{nodes:t}));else{let i=e.getParentType(),n=e.getFieldDef();null!=i&&null!=n||(0,ti.V)(!1),e.reportError(new y.eO(`Field "${i.name}.${n.name}" argument "${a.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let a=eE(e.getParentInputType());if(K(a)){let r=a.getFields()[t.name.value],i=null==r?void 0:r.deprecationReason;null!=i&&e.reportError(new y.eO(`The input field ${a.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){let a=e.getEnumValue(),r=null==a?void 0:a.deprecationReason;if(a&&null!=r){let i=eE(e.getInputType());null!=i||(0,ti.V)(!1),e.reportError(new y.eO(`The enum value "${i.name}.${a.name}" is deprecated. ${r}`,{nodes:t}))}}}}function rg(e){return{Field(t){let a=eE(e.getType());a&&tb(a)&&e.reportError(new y.eO(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}var r_=a(59841);function rb(e){let t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1,...e},a=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",n=t.schemaDescription?a:"";function p(e){return t.inputValueDeprecation?e:""}let o=t.oneOf?"isOneOf":"";return`
1002
+ </html>`,rM=r$({title:"Signed in to BRICKS",heading:"Signed in to BRICKS",message:"You can close this tab now."}),rU=e=>r$({title:"Sign-in failed",heading:"Sign-in failed",message:e}),rB="Sign-in cancelled",rq=(G=ee(function*({onAuthorizeUrl:e,signal:t}={}){if(t?.aborted)throw Error(rB);var a,r,i,n,p,o=(a=ay.randomBytes(32).toString("base64url"),r=ay.createHash("sha256").update(a).digest("base64url"),{verifier:a,challenge:r}),d=o.verifier,s=o.challenge,l=ay.randomBytes(16).toString("base64url"),u=process.env.BRICKS_OAUTH_CALLBACK_PORT,c=null!=u&&""!==u?Number(u):8535,m=new Promise((e,t)=>{i=e,n=t}),f=e8.createServer((e,t)=>{var a=new URL(e.url,`http://${rC}`);if(a.pathname!==rx)return void t.writeHead(404).end();var r=a.searchParams.get("error"),p=a.searchParams.get("code");if(a.searchParams.get("state")!==l)return void t.writeHead(400,{"Content-Type":"text/html"}).end(rU("Invalid state"));if(r){var o=a.searchParams.get("error_description")||r;t.writeHead(200,{"Content-Type":"text/html"}).end(rU(o)),n(Error(o));return}if(!p){t.writeHead(400,{"Content-Type":"text/html"}).end(rU("Invalid state")),n(Error("OAuth callback did not include an authorization code"));return}t.writeHead(200,{"Content-Type":"text/html"}).end(rM),i(p)}),h=yield new Promise((e,t)=>{f.once("error",e=>{e?.code==="EADDRINUSE"?t(Error(`Callback port ${c} is already in use — is another sign-in in progress? Close it and retry.`)):t(e)}),f.listen(c,rC,()=>e(f.address().port))}),v=`http://${rC}:${h}${rx}`,y=(({redirectUri:e,state:t,challenge:a})=>{var r=new URL(`https://${rD}/authorize`);return r.searchParams.set("response_type","code"),r.searchParams.set("client_id",rk),r.searchParams.set("redirect_uri",e),r.searchParams.set("scope",rA),r.searchParams.set("audience",rI),r.searchParams.set("state",t),r.searchParams.set("code_challenge",a),r.searchParams.set("code_challenge_method","S256"),r.toString()})({redirectUri:v,state:l,challenge:s}),g=()=>n(Error(rB));t?.addEventListener("abort",g,{once:!0});try{var _=new Promise((e,t)=>{p=setTimeout(()=>t(Error("Timed out waiting for the browser sign-in (5 minutes)")),3e5)}),b=e?Promise.resolve().then(()=>e(y)):Promise.resolve(),w=yield Promise.all([Promise.race([b,_]),Promise.race([m,_])]),E=ae(w,2)[1];return yield rP("/oauth/token",{grant_type:"authorization_code",client_id:rk,code:E,code_verifier:d,redirect_uri:v})}finally{p&&clearTimeout(p),t?.removeEventListener("abort",g),yield new Promise(e=>{f.close(e),f.closeIdleConnections?.()})}}),function(){return G.apply(this,arguments)}),rQ=(z=ee(function*(){return yield rP("/oauth/device/code",{client_id:rk,scope:rA,audience:rI})}),function(){return z.apply(this,arguments)}),rY=e=>new Promise(t=>setTimeout(t,e)),rG=(H=ee(function*({device_code:e,interval:t=5,expires_in:a=900}){for(var r=Date.now()+1e3*a,i=1e3*t;Date.now()<r;){yield rY(i);try{return yield rP("/oauth/token",{grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:rk,device_code:e})}catch(e){if("authorization_pending"===e.code)continue;if("slow_down"===e.code){i+=5e3;continue}throw e}}throw Error("Device authorization expired before the sign-in was confirmed")}),function(e){return H.apply(this,arguments)}),rz=(e,t=null,{preservePrevious:a=!1}={})=>{if(!e?.access_token)throw Error("OAuth token response did not include an access token");if(!a&&!e.id_token)throw Error("OAuth login response did not include an ID token");var r=e.id_token?rj(e.id_token):{};if(!a&&!r.sub)throw Error("OAuth ID token did not include a user subject");if(a&&r.sub&&t?.user?.sub&&r.sub!==t.user.sub)throw Error("OAuth refresh returned a different user identity");var i=a?t?.user:null;return{accessToken:e.access_token,refreshToken:e.refresh_token||(a?t?.refreshToken:null)||null,expiresAt:new Date(Date.now()+1e3*(e.expires_in||0)).toISOString(),user:{sub:r.sub||i?.sub||null,email:r.email||i?.email||null,name:r.name||i?.name||null,nickname:r.nickname||i?.nickname||null,picture:r.picture||i?.picture||null},audience:rI}},rH=null,rW=(W=ee(function*({forceRefresh:e=!1}={}){var t=a5();if(!t?.accessToken)return null;var a=new Date(t.expiresAt||0).getTime()-Date.now();if(!e&&a>3e5)return t;if(!t.refreshToken){if(a>0)return t;if(!(yield ri(t)))return a5();throw Error("OAuth session expired. Run `bricks auth login` again.")}var r=`${t.accessToken}\0${t.refreshToken}`;if(rH){var i=rH;return i.sessionKey===r?i.promise:(yield i.promise.catch(()=>{}),rW({forceRefresh:e}))}var n=aR(ee(function*(){var a=a5();if(!a?.accessToken)return null;if(!t||!a||t.accessToken!==a.accessToken||t.refreshToken!==a.refreshToken)return a;var r=new Date(a.expiresAt||0).getTime()-Date.now();if(!e&&r>3e5)return a;if(!a.refreshToken){if(r>0)return a;if(!(yield ri(a)))return a5();throw Error("OAuth session expired. Run `bricks auth login` again.")}try{var i=yield rP("/oauth/token",{grant_type:"refresh_token",client_id:rk,refresh_token:a.refreshToken}),n=rz(i,a,{preservePrevious:!0});if(!(yield rr(a,n)))return a5();return n}catch(e){if("invalid_grant"===e.code){if(!(yield ri(a)))return a5();throw Error("OAuth session expired. Run `bricks auth login` again.")}throw e}}));rH={sessionKey:r,promise:n};try{return yield n}finally{rH?.promise===n&&(rH=null)}}),function(){return W.apply(this,arguments)}),rJ=(J=ee(function*(e){if(e){var t=new AbortController,a=setTimeout(()=>t.abort(),5e3);try{yield rR("/oauth/revoke",{client_id:rk,token:e},{signal:t.signal})}catch{}finally{clearTimeout(a)}}}),function(e){return J.apply(this,arguments)}),rK=(K=ee(function*(){var e=yield rt();return!!e?.accessToken&&(yield rJ(e.refreshToken),!0)}),function(){return K.apply(this,arguments)}),rZ=e=>new Promise(t=>{var a=ae("darwin"===process.platform?["open",[e]]:"win32"===process.platform?["cmd",["/c","start","",e.replace(/&/g,"^&")]]:["xdg-open",[e]],2),r=a[0],i=a[1];try{var n=(0,r_.spawn)(r,i,{stdio:"ignore",detached:!0});n.once("error",()=>t(!1)),n.once("spawn",()=>{n.unref(),t(!0)})}catch{t(!1)}}),rX=(e,t)=>{if(!e)throw Error("Not logged in. Run `bricks auth login` first.");if(e.user?.sub!==t)throw Error("OAuth account changed. Re-select the workspace for the current account.");return e},r1=e=>{var t=((e="default")=>aQ(e,aU.snapshot(["tokens","oauth","devtoolsTokens","baseUrl","activityLogBaseUrl"])))(e);return{...t,auth:(({tokenInfo:e,oauth:t})=>{if(!e)return null;if("oauth"===e.type){if(!t?.accessToken||!e.oauthSubject||e.oauthSubject!==t.user?.sub||!e.workspaceId)return null;var a,r,i,n=e.oauthSubject;return{kind:"oauth",workspaceId:e.workspaceId,workspaceName:e.workspaceName,getHeaders:(r=ee(function*(){var t=rX((yield rW()),n);return{authorization:`Bearer ${t.accessToken}`,"x-bricks-workspace-id":String(e.workspaceId)}}),function(){return r.apply(this,arguments)}),refresh:(i=ee(function*(){rX((yield rW({forceRefresh:!0})),n)}),function(){return i.apply(this,arguments)})}}return e.token?{kind:"token",token:e.token,workspaceId:e.workspaceId,workspaceName:e.workspaceName,getHeaders:(a=ee(function*(){return{authorization:`Bearer ${e.token}`}}),function(){return a.apply(this,arguments)})}:null})(t)}},r0=e=>r1(e).auth},48255(e,t,a){a.d(t,{Wk:()=>s,eO:()=>p,yJ:()=>d});var r=a(91070),i=a(73971),n=a(8238);class p extends Error{constructor(e,...t){var a,n,d;let s,{nodes:l,source:u,positions:c,path:m,originalError:f,extensions:h}=null==(s=t[0])||"kind"in s||"length"in s?{nodes:s,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:s;super(e),this.name="GraphQLError",this.path=null!=m?m:void 0,this.originalError=null!=f?f:void 0,this.nodes=o(Array.isArray(l)?l:l?[l]:void 0);let v=o(null==(a=this.nodes)?void 0:a.map(e=>e.loc).filter(e=>null!=e));this.source=null!=u?u:null==v||null==(n=v[0])?void 0:n.source,this.positions=null!=c?c:null==v?void 0:v.map(e=>e.start),this.locations=c&&u?c.map(e=>(0,i.g)(u,e)):null==v?void 0:v.map(e=>(0,i.g)(e.source,e.start));let y=(0,r.Z)(null==f?void 0:f.extensions)?null==f?void 0:f.extensions:void 0;this.extensions=null!=(d=null!=h?h:y)?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}}),null!=f&&f.stack?Object.defineProperty(this,"stack",{value:f.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,p):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+="\n\n"+(0,n.V)(t.loc));else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+(0,n.C)(this.source,t);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function o(e){return void 0===e||0===e.length?void 0:e}function d(e){return e.toString()}function s(e){return e.toJSON()}},59841(e,t,a){a.d(t,{I:()=>i});var r=a(48255);function i(e,t,a){return new r.eO(`Syntax Error: ${a}`,{source:e,positions:[t]})}},36869(e,t,a){let r;a.r(t),a.d(t,{VariablesAreInputTypesRule:()=>a$,SingleFieldSubscriptionsRule:()=>aT,UniqueVariableNamesRule:()=>aP,GraphQLDeprecatedDirective:()=>e7,GraphQLNonNull:()=>ef,__InputValue:()=>tm,createSourceEventStream:()=>rh,execute:()=>aX,isDefinitionNode:()=>tL.MD,isInterfaceType:()=>Y,isRequiredArgument:()=>eV,isValidNameError:()=>r1,parseValue:()=>h.$x,valueFromAST:()=>am,NoUnusedVariablesRule:()=>t1,__DirectiveLocation:()=>tl,findDangerousChanges:()=>r2,__TypeKind:()=>th,isSchema:()=>tw,UniqueTypeNamesRule:()=>aF,NoSchemaIntrospectionCustomRule:()=>rg,defaultTypeResolver:()=>ra,isType:()=>$,syntaxError:()=>r_.I,version:()=>i,UniqueFragmentNamesRule:()=>ax,assertWrappingType:()=>ev,getNullableType:()=>e_,isObjectType:()=>q,visitWithTypeInfo:()=>tj,assertEnumValueName:()=>L,printSchema:()=>rj,validate:()=>az,BREAK:()=>tV.sP,assertNonNullType:()=>ea,assertNullableType:()=>eg,executeSync:()=>a1,isLeafType:()=>eo,resolveSchemaCoordinate:()=>r8,assertOutputType:()=>ep,buildASTSchema:()=>rk,astFromValue:()=>tp,Kind:()=>V.b,ProvidedRequiredArgumentsRule:()=>ai,UniqueDirectiveNamesRule:()=>aD,KnownDirectivesRule:()=>tQ,DEFAULT_DEPRECATION_REASON:()=>e8,TypeKind:()=>l,assertInterfaceType:()=>G,isValueNode:()=>tL.aR,GraphQLSpecifiedByDirective:()=>te,GraphQLFloat:()=>eJ,UniqueFieldDefinitionNamesRule:()=>ak,LoneAnonymousOperationRule:()=>tH,VariablesInAllowedPositionRule:()=>aM,assertInputType:()=>ei,formatError:()=>y.Wk,assertInputObjectType:()=>Z,isOutputType:()=>en,isWrappingType:()=>eh,assertLeafType:()=>ed,assertValidSchema:()=>tO,FragmentsOnCompositeTypesRule:()=>tU,graphql:()=>rn,UniqueOperationTypesRule:()=>aR,parseSchemaCoordinate:()=>h.Ng,UniqueEnumValueNamesRule:()=>aA,isNonNullType:()=>et,isSelectionNode:()=>tL.VK,printError:()=>y.yJ,specifiedDirectives:()=>ta,visit:()=>tV.YR,GraphQLScalarType:()=>eS,assertEnumType:()=>J,UniqueDirectivesPerLocationRule:()=>aI,assertName:()=>j,getDirectiveValues:()=>ay,isConstValueNode:()=>tL.TZ,isEqualType:()=>eq,isNamedType:()=>eb,isTypeDefinitionNode:()=>tL.a6,validateSchema:()=>tS,parse:()=>h.qg,__Schema:()=>td,isTypeSystemDefinitionNode:()=>tL.xu,valueFromASTUntyped:()=>F,LoneSchemaDefinitionRule:()=>tW,isTypeSubTypeOf:()=>eQ,UniqueArgumentNamesRule:()=>aO,UniqueInputFieldNamesRule:()=>aC,locatedError:()=>aK,typeFromAST:()=>tR,printLocation:()=>rl.V,assertUnionType:()=>H,separateOperations:()=>rJ,getVariableValues:()=>ah,Location:()=>g.aZ,GraphQLObjectType:()=>eO,UniqueArgumentDefinitionNamesRule:()=>aS,stripIgnoredCharacters:()=>rZ,GRAPHQL_MAX_INT:()=>ez,visitInParallel:()=>tV.oP,parseType:()=>h.Mb,isTypeNode:()=>tL.dI,PossibleTypeExtensionsRule:()=>aa,graphqlSync:()=>rp,isSchemaCoordinateNode:()=>tL.gj,DirectiveLocation:()=>eG.H,TypeNameMetaFieldDef:()=>tg,coerceInputValue:()=>au,GraphQLInt:()=>eW,resolveObjMapThunk:()=>eN,GraphQLInterfaceType:()=>eR,UniqueOperationNamesRule:()=>aV,GraphQLSkipDirective:()=>e5,isEnumType:()=>W,assertValidName:()=>rX,buildClientSchema:()=>rN,KnownArgumentNamesRule:()=>tB,ValuesOfCorrectTypeRule:()=>aj,isInputObjectType:()=>K,GraphQLID:()=>eX,NoUnusedFragmentsRule:()=>tX,isUnionType:()=>z,isSpecifiedScalarType:()=>e0,getArgumentValues:()=>av,printSourceLocation:()=>rl.C,__EnumValue:()=>tf,getOperationAST:()=>rw,isExecutableDefinitionNode:()=>tL._m,isAbstractType:()=>eu,assertAbstractType:()=>ec,isTypeExtensionNode:()=>tL.i7,GraphQLInputObjectType:()=>eM,getNamedType:()=>eE,parseConstValue:()=>h.u8,KnownFragmentNamesRule:()=>tY,isListType:()=>X,Lexer:()=>ru.JG,isSpecifiedDirective:()=>tr,responsePathAsArray:()=>al,isDirective:()=>e6,TypeInfo:()=>tF,assertScalarType:()=>B,extendSchema:()=>rS,isIntrospectionType:()=>tb,print:()=>R.y,getIntrospectionQuery:()=>rb,GraphQLBoolean:()=>eZ,KnownTypeNamesRule:()=>tG,assertListType:()=>ee,concatAST:()=>rW,NoDeprecatedCustomRule:()=>ry,defaultFieldResolver:()=>rr,GraphQLDirective:()=>e3,getLocation:()=>rs.g,TypeMetaFieldDef:()=>ty,GRAPHQL_MIN_INT:()=>eH,GraphQLIncludeDirective:()=>e9,ScalarLeafsRule:()=>ao,assertSchema:()=>tE,lexicographicSortSchema:()=>rC,GraphQLList:()=>em,isTypeSystemExtensionNode:()=>tL.fT,specifiedScalarTypes:()=>e1,BreakingChangeType:()=>u,ExecutableDefinitionsRule:()=>t$,assertDirective:()=>e4,__Field:()=>tc,getVisitFn:()=>tV.UY,recommendedRules:()=>aU,SchemaMetaFieldDef:()=>tv,assertCompositeType:()=>el,isRequiredInputField:()=>eB,Token:()=>g.ou,specifiedRules:()=>aB,DangerousChangeType:()=>c,GraphQLUnionType:()=>eF,isCompositeType:()=>es,versionInfo:()=>n,FieldsOnCorrectTypeRule:()=>tM,GraphQLString:()=>eK,assertType:()=>M,introspectionFromSchema:()=>rT,doTypesOverlap:()=>eY,GraphQLEnumType:()=>ej,resolveReadonlyArrayThunk:()=>eT,GraphQLOneOfDirective:()=>tt,NoFragmentCyclesRule:()=>tK,findBreakingChanges:()=>r0,ValidationContext:()=>aG,OverlappingFieldsCanBeMergedRule:()=>t2,isScalarType:()=>U,MaxIntrospectionDepthRule:()=>tJ,NoUndefinedVariablesRule:()=>tZ,assertObjectType:()=>Q,getOperationRootType:()=>rE,printType:()=>rU,OperationTypeNode:()=>g.cE,isInputType:()=>er,__Directive:()=>ts,GraphQLSchema:()=>tT,Source:()=>rd.k,resolveASTSchemaCoordinate:()=>r7,GraphQLError:()=>y.eO,assertNamedType:()=>ew,buildSchema:()=>rx,introspectionTypes:()=>t_,PossibleFragmentSpreadsRule:()=>at,__Type:()=>tu,getEnterLeaveForKind:()=>tV.XO,TokenKind:()=>rc.Y,printIntrospectionSchema:()=>rL,isNullableType:()=>ey,subscribe:()=>rf});let i="16.12.0",n=Object.freeze({major:16,minor:12,patch:0,preReleaseTag:null});var p,o,d,s,l,u,c,m=a(93217);function f(e){return"function"==typeof(null==e?void 0:e.then)}var h=a(20186),v=a(35198),y=a(48255),g=a(59762);function _(e,t){let[a,r]=t?[e,t]:[void 0,e],i=" Did you mean ";a&&(i+=a+" ");let n=r.map(e=>`"${e}"`);switch(n.length){case 0:return"";case 1:return i+n[0]+"?";case 2:return i+n[0]+" or "+n[1]+"?"}let p=n.slice(0,5),o=p.pop();return i+p.join(", ")+", or "+o+"?"}function b(e){return e}var w=a(50792),E=a(91070);function T(e,t){let a=Object.create(null);for(let r of e)a[t(r)]=r;return a}function N(e,t,a){let r=Object.create(null);for(let i of e)r[t(i)]=a(i);return r}function S(e,t){let a=Object.create(null);for(let r of Object.keys(e))a[r]=t(e[r],r);return a}function O(e,t){let a=0,r=0;for(;a<e.length&&r<t.length;){let i=e.charCodeAt(a),n=t.charCodeAt(r);if(I(i)&&I(n)){let p=0;do++a,p=10*p+i-D,i=e.charCodeAt(a);while(I(i)&&p>0);let o=0;do++r,o=10*o+n-D,n=t.charCodeAt(r);while(I(n)&&o>0);if(p<o)return -1;if(p>o)return 1}else{if(i<n)return -1;if(i>n)return 1;++a,++r}}return e.length-t.length}let D=48;function I(e){return!isNaN(e)&&D<=e&&e<=57}function A(e,t){let a=Object.create(null),r=new k(e),i=Math.floor(.4*e.length)+1;for(let e of t){let t=r.measure(e,i);void 0!==t&&(a[e]=t)}return Object.keys(a).sort((e,t)=>{let r=a[e]-a[t];return 0!==r?r:O(e,t)})}class k{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=x(this._inputLowerCase),this._rows=[Array(e.length+1).fill(0),Array(e.length+1).fill(0),Array(e.length+1).fill(0)]}measure(e,t){if(this._input===e)return 0;let a=e.toLowerCase();if(this._inputLowerCase===a)return 1;let r=x(a),i=this._inputArray;if(r.length<i.length){let e=r;r=i,i=e}let n=r.length,p=i.length;if(n-p>t)return;let o=this._rows;for(let e=0;e<=p;e++)o[0][e]=e;for(let e=1;e<=n;e++){let a=o[(e-1)%3],n=o[e%3],d=n[0]=e;for(let t=1;t<=p;t++){let p=+(r[e-1]!==i[t-1]),s=Math.min(a[t]+1,n[t-1]+1,a[t-1]+p);e>1&&t>1&&r[e-1]===i[t-2]&&r[e-2]===i[t-1]&&(s=Math.min(s,o[(e-2)%3][t-2]+1)),s<d&&(d=s),n[t]=s}if(d>t)return}let d=o[n%3][p];return d<=t?d:void 0}}function x(e){let t=e.length,a=Array(t);for(let r=0;r<t;++r)a[r]=e.charCodeAt(r);return a}function C(e){if(null==e)return Object.create(null);if(null===Object.getPrototypeOf(e))return e;let t=Object.create(null);for(let[a,r]of Object.entries(e))t[a]=r;return t}var V=a(42455),R=a(95818);function F(e,t){switch(e.kind){case V.b.NULL:return null;case V.b.INT:return parseInt(e.value,10);case V.b.FLOAT:return parseFloat(e.value);case V.b.STRING:case V.b.ENUM:case V.b.BOOLEAN:return e.value;case V.b.LIST:return e.values.map(e=>F(e,t));case V.b.OBJECT:return N(e.fields,e=>e.name.value,e=>F(e.value,t));case V.b.VARIABLE:return null==t?void 0:t[e.name.value]}}var P=a(25881);function j(e){if(null!=e||(0,m.U)(!1,"Must provide name."),"string"==typeof e||(0,m.U)(!1,"Expected name to be a string."),0===e.length)throw new y.eO("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!(0,P.xr)(e.charCodeAt(t)))throw new y.eO(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!(0,P.un)(e.charCodeAt(0)))throw new y.eO(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function L(e){if("true"===e||"false"===e||"null"===e)throw new y.eO(`Enum values cannot be named: ${e}`);return j(e)}function $(e){return U(e)||q(e)||Y(e)||z(e)||W(e)||K(e)||X(e)||et(e)}function M(e){if(!$(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL type.`);return e}function U(e){return(0,w.h)(e,eS)}function B(e){if(!U(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Scalar type.`);return e}function q(e){return(0,w.h)(e,eO)}function Q(e){if(!q(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Object type.`);return e}function Y(e){return(0,w.h)(e,eR)}function G(e){if(!Y(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Interface type.`);return e}function z(e){return(0,w.h)(e,eF)}function H(e){if(!z(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Union type.`);return e}function W(e){return(0,w.h)(e,ej)}function J(e){if(!W(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Enum type.`);return e}function K(e){return(0,w.h)(e,eM)}function Z(e){if(!K(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Input Object type.`);return e}function X(e){return(0,w.h)(e,em)}function ee(e){if(!X(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL List type.`);return e}function et(e){return(0,w.h)(e,ef)}function ea(e){if(!et(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL Non-Null type.`);return e}function er(e){return U(e)||W(e)||K(e)||eh(e)&&er(e.ofType)}function ei(e){if(!er(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL input type.`);return e}function en(e){return U(e)||q(e)||Y(e)||z(e)||W(e)||eh(e)&&en(e.ofType)}function ep(e){if(!en(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL output type.`);return e}function eo(e){return U(e)||W(e)}function ed(e){if(!eo(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL leaf type.`);return e}function es(e){return q(e)||Y(e)||z(e)}function el(e){if(!es(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL composite type.`);return e}function eu(e){return Y(e)||z(e)}function ec(e){if(!eu(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL abstract type.`);return e}class em{constructor(e){$(e)||(0,m.U)(!1,`Expected ${(0,v.N)(e)} to be a GraphQL type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class ef{constructor(e){ey(e)||(0,m.U)(!1,`Expected ${(0,v.N)(e)} to be a GraphQL nullable type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function eh(e){return X(e)||et(e)}function ev(e){if(!eh(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL wrapping type.`);return e}function ey(e){return $(e)&&!et(e)}function eg(e){if(!ey(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL nullable type.`);return e}function e_(e){if(e)return et(e)?e.ofType:e}function eb(e){return U(e)||q(e)||Y(e)||z(e)||W(e)||K(e)}function ew(e){if(!eb(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL named type.`);return e}function eE(e){if(e){let t=e;for(;eh(t);)t=t.ofType;return t}}function eT(e){return"function"==typeof e?e():e}function eN(e){return"function"==typeof e?e():e}class eS{constructor(e){var t,a,r,i;let n=null!=(t=e.parseValue)?t:b;this.name=j(e.name),this.description=e.description,this.specifiedByURL=e.specifiedByURL,this.serialize=null!=(a=e.serialize)?a:b,this.parseValue=n,this.parseLiteral=null!=(r=e.parseLiteral)?r:(e,t)=>n(F(e,t)),this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(i=e.extensionASTNodes)?i:[],null==e.specifiedByURL||"string"==typeof e.specifiedByURL||(0,m.U)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,v.N)(e.specifiedByURL)}.`),null==e.serialize||"function"==typeof e.serialize||(0,m.U)(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||(0,m.U)(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class eO{constructor(e){var t;this.name=j(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(t=e.extensionASTNodes)?t:[],this._fields=()=>eI(e),this._interfaces=()=>eD(e),null==e.isTypeOf||"function"==typeof e.isTypeOf||(0,m.U)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,v.N)(e.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:ex(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function eD(e){var t;let a=eT(null!=(t=e.interfaces)?t:[]);return Array.isArray(a)||(0,m.U)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),a}function eI(e){let t=eN(e.fields);return ek(t)||(0,m.U)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),S(t,(t,a)=>{var r;ek(t)||(0,m.U)(!1,`${e.name}.${a} field config must be an object.`),null==t.resolve||"function"==typeof t.resolve||(0,m.U)(!1,`${e.name}.${a} field resolver must be a function if provided, but got: ${(0,v.N)(t.resolve)}.`);let i=null!=(r=t.args)?r:{};return ek(i)||(0,m.U)(!1,`${e.name}.${a} args must be an object with argument names as keys.`),{name:j(a),description:t.description,type:t.type,args:eA(i),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:C(t.extensions),astNode:t.astNode}})}function eA(e){return Object.entries(e).map(([e,t])=>({name:j(e),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:C(t.extensions),astNode:t.astNode}))}function ek(e){return(0,E.Z)(e)&&!Array.isArray(e)}function ex(e){return S(e,e=>({description:e.description,type:e.type,args:eC(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function eC(e){return N(e,e=>e.name,e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function eV(e){return et(e.type)&&void 0===e.defaultValue}class eR{constructor(e){var t;this.name=j(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(t=e.extensionASTNodes)?t:[],this._fields=eI.bind(void 0,e),this._interfaces=eD.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||(0,m.U)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,v.N)(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:ex(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class eF{constructor(e){var t;this.name=j(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(t=e.extensionASTNodes)?t:[],this._types=eP.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||(0,m.U)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,v.N)(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return"function"==typeof this._types&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function eP(e){let t=eT(e.types);return Array.isArray(t)||(0,m.U)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class ej{constructor(e){var t;this.name=j(e.name),this.description=e.description,this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(t=e.extensionASTNodes)?t:[],this._values="function"==typeof e.values?e.values:e$(this.name,e.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return"function"==typeof this._values&&(this._values=e$(this.name,this._values())),this._values}getValue(e){return null===this._nameLookup&&(this._nameLookup=T(this.getValues(),e=>e.name)),this._nameLookup[e]}serialize(e){null===this._valueLookup&&(this._valueLookup=new Map(this.getValues().map(e=>[e.value,e])));let t=this._valueLookup.get(e);if(void 0===t)throw new y.eO(`Enum "${this.name}" cannot represent value: ${(0,v.N)(e)}`);return t.name}parseValue(e){if("string"!=typeof e){let t=(0,v.N)(e);throw new y.eO(`Enum "${this.name}" cannot represent non-string value: ${t}.`+eL(this,t))}let t=this.getValue(e);if(null==t)throw new y.eO(`Value "${e}" does not exist in "${this.name}" enum.`+eL(this,e));return t.value}parseLiteral(e,t){if(e.kind!==V.b.ENUM){let t=(0,R.y)(e);throw new y.eO(`Enum "${this.name}" cannot represent non-enum value: ${t}.`+eL(this,t),{nodes:e})}let a=this.getValue(e.value);if(null==a){let t=(0,R.y)(e);throw new y.eO(`Value "${t}" does not exist in "${this.name}" enum.`+eL(this,t),{nodes:e})}return a.value}toConfig(){let e=N(this.getValues(),e=>e.name,e=>({description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function eL(e,t){return _("the enum value",A(t,e.getValues().map(e=>e.name)))}function e$(e,t){return ek(t)||(0,m.U)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([t,a])=>(ek(a)||(0,m.U)(!1,`${e}.${t} must refer to an object with a "value" key representing an internal value but got: ${(0,v.N)(a)}.`),{name:L(t),description:a.description,value:void 0!==a.value?a.value:t,deprecationReason:a.deprecationReason,extensions:C(a.extensions),astNode:a.astNode}))}class eM{constructor(e){var t,a;this.name=j(e.name),this.description=e.description,this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(t=e.extensionASTNodes)?t:[],this.isOneOf=null!=(a=e.isOneOf)&&a,this._fields=eU.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}toConfig(){let e=S(this.getFields(),e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}}function eU(e){let t=eN(e.fields);return ek(t)||(0,m.U)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),S(t,(t,a)=>("resolve"in t&&(0,m.U)(!1,`${e.name}.${a} field has a resolve property, but Input Types cannot define resolvers.`),{name:j(a),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:C(t.extensions),astNode:t.astNode}))}function eB(e){return et(e.type)&&void 0===e.defaultValue}function eq(e,t){return e===t||!!(et(e)&&et(t)||X(e)&&X(t))&&eq(e.ofType,t.ofType)}function eQ(e,t,a){return t===a||(et(a)?!!et(t)&&eQ(e,t.ofType,a.ofType):et(t)?eQ(e,t.ofType,a):X(a)?!!X(t)&&eQ(e,t.ofType,a.ofType):!X(t)&&eu(a)&&(Y(t)||q(t))&&e.isSubType(a,t))}function eY(e,t,a){return t===a||(eu(t)?eu(a)?e.getPossibleTypes(t).some(t=>e.isSubType(a,t)):e.isSubType(t,a):!!eu(a)&&e.isSubType(a,t))}var eG=a(42868);let ez=0x7fffffff,eH=-0x80000000,eW=new eS({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){let t=e2(e);if("boolean"==typeof t)return+!!t;let a=t;if("string"==typeof t&&""!==t&&(a=Number(t)),"number"!=typeof a||!Number.isInteger(a))throw new y.eO(`Int cannot represent non-integer value: ${(0,v.N)(t)}`);if(a>ez||a<eH)throw new y.eO("Int cannot represent non 32-bit signed integer value: "+(0,v.N)(t));return a},parseValue(e){if("number"!=typeof e||!Number.isInteger(e))throw new y.eO(`Int cannot represent non-integer value: ${(0,v.N)(e)}`);if(e>ez||e<eH)throw new y.eO(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==V.b.INT)throw new y.eO(`Int cannot represent non-integer value: ${(0,R.y)(e)}`,{nodes:e});let t=parseInt(e.value,10);if(t>ez||t<eH)throw new y.eO(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),eJ=new eS({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){let t=e2(e);if("boolean"==typeof t)return+!!t;let a=t;if("string"==typeof t&&""!==t&&(a=Number(t)),"number"!=typeof a||!Number.isFinite(a))throw new y.eO(`Float cannot represent non numeric value: ${(0,v.N)(t)}`);return a},parseValue(e){if("number"!=typeof e||!Number.isFinite(e))throw new y.eO(`Float cannot represent non numeric value: ${(0,v.N)(e)}`);return e},parseLiteral(e){if(e.kind!==V.b.FLOAT&&e.kind!==V.b.INT)throw new y.eO(`Float cannot represent non numeric value: ${(0,R.y)(e)}`,e);return parseFloat(e.value)}}),eK=new eS({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){let t=e2(e);if("string"==typeof t)return t;if("boolean"==typeof t)return t?"true":"false";if("number"==typeof t&&Number.isFinite(t))return t.toString();throw new y.eO(`String cannot represent value: ${(0,v.N)(e)}`)},parseValue(e){if("string"!=typeof e)throw new y.eO(`String cannot represent a non string value: ${(0,v.N)(e)}`);return e},parseLiteral(e){if(e.kind!==V.b.STRING)throw new y.eO(`String cannot represent a non string value: ${(0,R.y)(e)}`,{nodes:e});return e.value}}),eZ=new eS({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){let t=e2(e);if("boolean"==typeof t)return t;if(Number.isFinite(t))return 0!==t;throw new y.eO(`Boolean cannot represent a non boolean value: ${(0,v.N)(t)}`)},parseValue(e){if("boolean"!=typeof e)throw new y.eO(`Boolean cannot represent a non boolean value: ${(0,v.N)(e)}`);return e},parseLiteral(e){if(e.kind!==V.b.BOOLEAN)throw new y.eO(`Boolean cannot represent a non boolean value: ${(0,R.y)(e)}`,{nodes:e});return e.value}}),eX=new eS({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){let t=e2(e);if("string"==typeof t)return t;if(Number.isInteger(t))return String(t);throw new y.eO(`ID cannot represent value: ${(0,v.N)(e)}`)},parseValue(e){if("string"==typeof e)return e;if("number"==typeof e&&Number.isInteger(e))return e.toString();throw new y.eO(`ID cannot represent value: ${(0,v.N)(e)}`)},parseLiteral(e){if(e.kind!==V.b.STRING&&e.kind!==V.b.INT)throw new y.eO("ID cannot represent a non-string and non-integer value: "+(0,R.y)(e),{nodes:e});return e.value}}),e1=Object.freeze([eK,eW,eJ,eZ,eX]);function e0(e){return e1.some(({name:t})=>e.name===t)}function e2(e){if((0,E.Z)(e)){if("function"==typeof e.valueOf){let t=e.valueOf();if(!(0,E.Z)(t))return t}if("function"==typeof e.toJSON)return e.toJSON()}return e}function e6(e){return(0,w.h)(e,e3)}function e4(e){if(!e6(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL directive.`);return e}class e3{constructor(e){var t,a;this.name=j(e.name),this.description=e.description,this.locations=e.locations,this.isRepeatable=null!=(t=e.isRepeatable)&&t,this.extensions=C(e.extensions),this.astNode=e.astNode,Array.isArray(e.locations)||(0,m.U)(!1,`@${e.name} locations must be an Array.`);let r=null!=(a=e.args)?a:{};(0,E.Z)(r)&&!Array.isArray(r)||(0,m.U)(!1,`@${e.name} args must be an object with argument names as keys.`),this.args=eA(r)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:eC(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}let e9=new e3({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[eG.H.FIELD,eG.H.FRAGMENT_SPREAD,eG.H.INLINE_FRAGMENT],args:{if:{type:new ef(eZ),description:"Included when true."}}}),e5=new e3({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[eG.H.FIELD,eG.H.FRAGMENT_SPREAD,eG.H.INLINE_FRAGMENT],args:{if:{type:new ef(eZ),description:"Skipped when true."}}}),e8="No longer supported",e7=new e3({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[eG.H.FIELD_DEFINITION,eG.H.ARGUMENT_DEFINITION,eG.H.INPUT_FIELD_DEFINITION,eG.H.ENUM_VALUE],args:{reason:{type:eK,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:e8}}}),te=new e3({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[eG.H.SCALAR],args:{url:{type:new ef(eK),description:"The URL that specifies the behavior of this scalar."}}}),tt=new e3({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[eG.H.INPUT_OBJECT],args:{}}),ta=Object.freeze([e9,e5,e7,te,tt]);function tr(e){return ta.some(({name:t})=>t===e.name)}var ti=a(71306);function tn(e){return"object"==typeof e&&"function"==typeof(null==e?void 0:e[Symbol.iterator])}function tp(e,t){if(et(t)){let a=tp(e,t.ofType);return(null==a?void 0:a.kind)===V.b.NULL?null:a}if(null===e)return{kind:V.b.NULL};if(void 0===e)return null;if(X(t)){let a=t.ofType;if(tn(e)){let t=[];for(let r of e){let e=tp(r,a);null!=e&&t.push(e)}return{kind:V.b.LIST,values:t}}return tp(e,a)}if(K(t)){if(!(0,E.Z)(e))return null;let a=[];for(let r of Object.values(t.getFields())){let t=tp(e[r.name],r.type);t&&a.push({kind:V.b.OBJECT_FIELD,name:{kind:V.b.NAME,value:r.name},value:t})}return{kind:V.b.OBJECT,fields:a}}if(eo(t)){let a=t.serialize(e);if(null==a)return null;if("boolean"==typeof a)return{kind:V.b.BOOLEAN,value:a};if("number"==typeof a&&Number.isFinite(a)){let e=String(a);return to.test(e)?{kind:V.b.INT,value:e}:{kind:V.b.FLOAT,value:e}}if("string"==typeof a)return W(t)?{kind:V.b.ENUM,value:a}:t===eX&&to.test(a)?{kind:V.b.INT,value:a}:{kind:V.b.STRING,value:a};throw TypeError(`Cannot convert value to AST: ${(0,v.N)(a)}.`)}(0,ti.V)(!1,"Unexpected input type: "+(0,v.N)(t))}let to=/^-?(?:0|[1-9][0-9]*)$/,td=new eO({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:eK,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new ef(new em(new ef(tu))),resolve:e=>Object.values(e.getTypeMap())},queryType:{description:"The type that query operations will be rooted at.",type:new ef(tu),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:tu,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:tu,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new ef(new em(new ef(ts))),resolve:e=>e.getDirectives()}})}),ts=new eO({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:()=>({name:{type:new ef(eK),resolve:e=>e.name},description:{type:eK,resolve:e=>e.description},isRepeatable:{type:new ef(eZ),resolve:e=>e.isRepeatable},locations:{type:new ef(new em(new ef(tl))),resolve:e=>e.locations},args:{type:new ef(new em(new ef(tm))),args:{includeDeprecated:{type:eZ,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter(e=>null==e.deprecationReason)}})}),tl=new ej({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:eG.H.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:eG.H.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:eG.H.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:eG.H.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:eG.H.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:eG.H.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:eG.H.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:eG.H.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:eG.H.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:eG.H.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:eG.H.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:eG.H.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:eG.H.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:eG.H.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:eG.H.UNION,description:"Location adjacent to a union definition."},ENUM:{value:eG.H.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:eG.H.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:eG.H.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:eG.H.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),tu=new eO({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new ef(th),resolve:e=>U(e)?l.SCALAR:q(e)?l.OBJECT:Y(e)?l.INTERFACE:z(e)?l.UNION:W(e)?l.ENUM:K(e)?l.INPUT_OBJECT:X(e)?l.LIST:et(e)?l.NON_NULL:void(0,ti.V)(!1,`Unexpected type: "${(0,v.N)(e)}".`)},name:{type:eK,resolve:e=>"name"in e?e.name:void 0},description:{type:eK,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:eK,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new em(new ef(tc)),args:{includeDeprecated:{type:eZ,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(q(e)||Y(e)){let a=Object.values(e.getFields());return t?a:a.filter(e=>null==e.deprecationReason)}}},interfaces:{type:new em(new ef(tu)),resolve(e){if(q(e)||Y(e))return e.getInterfaces()}},possibleTypes:{type:new em(new ef(tu)),resolve(e,t,a,{schema:r}){if(eu(e))return r.getPossibleTypes(e)}},enumValues:{type:new em(new ef(tf)),args:{includeDeprecated:{type:eZ,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(W(e)){let a=e.getValues();return t?a:a.filter(e=>null==e.deprecationReason)}}},inputFields:{type:new em(new ef(tm)),args:{includeDeprecated:{type:eZ,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(K(e)){let a=Object.values(e.getFields());return t?a:a.filter(e=>null==e.deprecationReason)}}},ofType:{type:tu,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:eZ,resolve:e=>{if(K(e))return e.isOneOf}}})}),tc=new eO({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new ef(eK),resolve:e=>e.name},description:{type:eK,resolve:e=>e.description},args:{type:new ef(new em(new ef(tm))),args:{includeDeprecated:{type:eZ,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter(e=>null==e.deprecationReason)},type:{type:new ef(tu),resolve:e=>e.type},isDeprecated:{type:new ef(eZ),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:eK,resolve:e=>e.deprecationReason}})}),tm=new eO({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new ef(eK),resolve:e=>e.name},description:{type:eK,resolve:e=>e.description},type:{type:new ef(tu),resolve:e=>e.type},defaultValue:{type:eK,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:a}=e,r=tp(a,t);return r?(0,R.y)(r):null}},isDeprecated:{type:new ef(eZ),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:eK,resolve:e=>e.deprecationReason}})}),tf=new eO({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new ef(eK),resolve:e=>e.name},description:{type:eK,resolve:e=>e.description},isDeprecated:{type:new ef(eZ),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:eK,resolve:e=>e.deprecationReason}})});(p=l||(l={})).SCALAR="SCALAR",p.OBJECT="OBJECT",p.INTERFACE="INTERFACE",p.UNION="UNION",p.ENUM="ENUM",p.INPUT_OBJECT="INPUT_OBJECT",p.LIST="LIST",p.NON_NULL="NON_NULL";let th=new ej({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:l.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:l.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:l.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:l.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:l.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:l.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:l.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:l.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),tv={name:"__schema",type:new ef(td),description:"Access the current type schema of this server.",args:[],resolve:(e,t,a,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ty={name:"__type",type:tu,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new ef(eK),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},a,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},tg={name:"__typename",type:new ef(eK),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,a,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},t_=Object.freeze([td,ts,tl,tu,tc,tm,tf,th]);function tb(e){return t_.some(({name:t})=>e.name===t)}function tw(e){return(0,w.h)(e,tT)}function tE(e){if(!tw(e))throw Error(`Expected ${(0,v.N)(e)} to be a GraphQL schema.`);return e}class tT{constructor(e){var t,a;this.__validationErrors=!0===e.assumeValid?[]:void 0,(0,E.Z)(e)||(0,m.U)(!1,"Must provide configuration object."),!e.types||Array.isArray(e.types)||(0,m.U)(!1,`"types" must be Array if provided but got: ${(0,v.N)(e.types)}.`),!e.directives||Array.isArray(e.directives)||(0,m.U)(!1,`"directives" must be Array if provided but got: ${(0,v.N)(e.directives)}.`),this.description=e.description,this.extensions=C(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!=(t=e.extensionASTNodes)?t:[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=null!=(a=e.directives)?a:ta;let r=new Set(e.types);if(null!=e.types)for(let t of e.types)r.delete(t),tN(t,r);for(let e of(null!=this._queryType&&tN(this._queryType,r),null!=this._mutationType&&tN(this._mutationType,r),null!=this._subscriptionType&&tN(this._subscriptionType,r),this._directives))if(e6(e))for(let t of e.args)tN(t.type,r);for(let e of(tN(td,r),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null),r)){if(null==e)continue;let t=e.name;if(t||(0,m.U)(!1,"One of the provided types for building the Schema is missing a name."),void 0!==this._typeMap[t])throw Error(`Schema must contain uniquely named types but contains multiple types named "${t}".`);if(this._typeMap[t]=e,Y(e)){for(let t of e.getInterfaces())if(Y(t)){let a=this._implementationsMap[t.name];void 0===a&&(a=this._implementationsMap[t.name]={objects:[],interfaces:[]}),a.interfaces.push(e)}}else if(q(e)){for(let t of e.getInterfaces())if(Y(t)){let a=this._implementationsMap[t.name];void 0===a&&(a=this._implementationsMap[t.name]={objects:[],interfaces:[]}),a.objects.push(e)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case g.cE.QUERY:return this.getQueryType();case g.cE.MUTATION:return this.getMutationType();case g.cE.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return z(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){let t=this._implementationsMap[e.name];return null!=t?t:{objects:[],interfaces:[]}}isSubType(e,t){let a=this._subTypeMap[e.name];if(void 0===a){if(a=Object.create(null),z(e))for(let t of e.getTypes())a[t.name]=!0;else{let t=this.getImplementations(e);for(let e of t.objects)a[e.name]=!0;for(let e of t.interfaces)a[e.name]=!0}this._subTypeMap[e.name]=a}return void 0!==a[t.name]}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find(t=>t.name===e)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:void 0!==this.__validationErrors}}}function tN(e,t){let a=eE(e);if(!t.has(a)){if(t.add(a),z(a))for(let e of a.getTypes())tN(e,t);else if(q(a)||Y(a)){for(let e of a.getInterfaces())tN(e,t);for(let e of Object.values(a.getFields()))for(let a of(tN(e.type,t),e.args))tN(a.type,t)}else if(K(a))for(let e of Object.values(a.getFields()))tN(e.type,t)}return t}function tS(e){var t,a,r,i;let n,p,o,d;if(tE(e),e.__validationErrors)return e.__validationErrors;let s=new tD(e);(p=(n=(t=s).schema).getQueryType())?q(p)||t.reportError(`Query root type must be Object type, it cannot be ${(0,v.N)(p)}.`,null!=(a=tI(n,g.cE.QUERY))?a:p.astNode):t.reportError("Query root type must be provided.",n.astNode),(o=n.getMutationType())&&!q(o)&&t.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,v.N)(o)}.`,null!=(r=tI(n,g.cE.MUTATION))?r:o.astNode),(d=n.getSubscriptionType())&&!q(d)&&t.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,v.N)(d)}.`,null!=(i=tI(n,g.cE.SUBSCRIPTION))?i:d.astNode),function(e){for(let a of e.schema.getDirectives()){if(!e6(a)){e.reportError(`Expected directive but got: ${(0,v.N)(a)}.`,null==a?void 0:a.astNode);continue}for(let r of(tA(e,a),0===a.locations.length&&e.reportError(`Directive @${a.name} must include 1 or more locations.`,a.astNode),a.args))if(tA(e,r),er(r.type)||e.reportError(`The type of @${a.name}(${r.name}:) must be Input Type but got: ${(0,v.N)(r.type)}.`,r.astNode),eV(r)&&null!=r.deprecationReason){var t;e.reportError(`Required argument @${a.name}(${r.name}:) cannot be deprecated.`,[tC(r.astNode),null==(t=r.astNode)?void 0:t.type])}}}(s),function(e){var t;let a,r,i,n=(t=e,a=Object.create(null),r=[],i=Object.create(null),function e(n){if(!a[n.name]){for(let p of(a[n.name]=!0,i[n.name]=r.length,Object.values(n.getFields())))if(et(p.type)&&K(p.type.ofType)){let a=p.type.ofType,n=i[a.name];if(r.push(p),void 0===n)e(a);else{let e=r.slice(n),i=e.map(e=>e.name).join(".");t.reportError(`Cannot reference Input Object "${a.name}" within itself through a series of non-null fields: "${i}".`,e.map(e=>e.astNode))}r.pop()}i[n.name]=void 0}});for(let t of Object.values(e.schema.getTypeMap())){if(!eb(t)){e.reportError(`Expected GraphQL named type but got: ${(0,v.N)(t)}.`,t.astNode);continue}tb(t)||tA(e,t),q(t)||Y(t)?(function(e,t){let a=Object.values(t.getFields());for(let p of(0===a.length&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]),a)){var r,i,n;for(let a of(tA(e,p),en(p.type)||e.reportError(`The type of ${t.name}.${p.name} must be Output Type but got: ${(0,v.N)(p.type)}.`,null==(r=p.astNode)?void 0:r.type),p.args)){let r=a.name;tA(e,a),er(a.type)||e.reportError(`The type of ${t.name}.${p.name}(${r}:) must be Input Type but got: ${(0,v.N)(a.type)}.`,null==(i=a.astNode)?void 0:i.type),eV(a)&&null!=a.deprecationReason&&e.reportError(`Required argument ${t.name}.${p.name}(${r}:) cannot be deprecated.`,[tC(a.astNode),null==(n=a.astNode)?void 0:n.type])}}}(e,t),function(e,t){let a=Object.create(null);for(let r of t.getInterfaces()){if(!Y(r)){e.reportError(`Type ${(0,v.N)(t)} must only implement Interface types, it cannot implement ${(0,v.N)(r)}.`,tk(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,tk(t,r));continue}if(a[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,tk(t,r));continue}a[r.name]=!0,function(e,t,a){let r=t.getInterfaces();for(let i of a.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${a.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${a.name}.`,[...tk(a,i),...tk(t,a)])}(e,t,r),function(e,t,a){let r=t.getFields();for(let d of Object.values(a.getFields())){var i,n,p,o;let s=d.name,l=r[s];if(!l){e.reportError(`Interface field ${a.name}.${s} expected but ${t.name} does not provide it.`,[d.astNode,t.astNode,...t.extensionASTNodes]);continue}for(let r of(eQ(e.schema,l.type,d.type)||e.reportError(`Interface field ${a.name}.${s} expects type ${(0,v.N)(d.type)} but ${t.name}.${s} is type ${(0,v.N)(l.type)}.`,[null==(i=d.astNode)?void 0:i.type,null==(n=l.astNode)?void 0:n.type]),d.args)){let i=r.name,n=l.args.find(e=>e.name===i);if(!n){e.reportError(`Interface field argument ${a.name}.${s}(${i}:) expected but ${t.name}.${s} does not provide it.`,[r.astNode,l.astNode]);continue}eq(r.type,n.type)||e.reportError(`Interface field argument ${a.name}.${s}(${i}:) expects type ${(0,v.N)(r.type)} but ${t.name}.${s}(${i}:) is type ${(0,v.N)(n.type)}.`,[null==(p=r.astNode)?void 0:p.type,null==(o=n.astNode)?void 0:o.type])}for(let r of l.args){let i=r.name;!d.args.find(e=>e.name===i)&&eV(r)&&e.reportError(`Object field ${t.name}.${s} includes required argument ${i} that is missing from the Interface field ${a.name}.${s}.`,[r.astNode,d.astNode])}}}(e,t,r)}}(e,t)):z(t)?function(e,t){let a=t.getTypes();0===a.length&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);let r=Object.create(null);for(let i of a){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,tx(t,i.name));continue}r[i.name]=!0,q(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,v.N)(i)}.`,tx(t,String(i)))}}(e,t):W(t)?function(e,t){let a=t.getValues();for(let r of(0===a.length&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]),a))tA(e,r)}(e,t):K(t)&&(function(e,t){let a=Object.values(t.getFields());for(let n of(0===a.length&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]),a)){var r,i;tA(e,n),er(n.type)||e.reportError(`The type of ${t.name}.${n.name} must be Input Type but got: ${(0,v.N)(n.type)}.`,null==(r=n.astNode)?void 0:r.type),eB(n)&&null!=n.deprecationReason&&e.reportError(`Required input field ${t.name}.${n.name} cannot be deprecated.`,[tC(n.astNode),null==(i=n.astNode)?void 0:i.type]),t.isOneOf&&function(e,t,a){if(et(t.type)){var r;a.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,null==(r=t.astNode)?void 0:r.type)}void 0!==t.defaultValue&&a.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}(t,n,e)}}(e,t),n(t))}}(s);let l=s.getErrors();return e.__validationErrors=l,l}function tO(e){let t=tS(e);if(0!==t.length)throw Error(t.map(e=>e.message).join("\n\n"))}class tD{constructor(e){this._errors=[],this.schema=e}reportError(e,t){let a=Array.isArray(t)?t.filter(Boolean):t;this._errors.push(new y.eO(e,{nodes:a}))}getErrors(){return this._errors}}function tI(e,t){var a;return null==(a=[e.astNode,...e.extensionASTNodes].flatMap(e=>{var t;return null!=(t=null==e?void 0:e.operationTypes)?t:[]}).find(e=>e.operation===t))?void 0:a.type}function tA(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function tk(e,t){let{astNode:a,extensionASTNodes:r}=e;return(null!=a?[a,...r]:r).flatMap(e=>{var t;return null!=(t=e.interfaces)?t:[]}).filter(e=>e.name.value===t.name)}function tx(e,t){let{astNode:a,extensionASTNodes:r}=e;return(null!=a?[a,...r]:r).flatMap(e=>{var t;return null!=(t=e.types)?t:[]}).filter(e=>e.name.value===t)}function tC(e){var t;return null==e||null==(t=e.directives)?void 0:t.find(e=>e.name.value===e7.name)}var tV=a(90424);function tR(e,t){switch(t.kind){case V.b.LIST_TYPE:{let a=tR(e,t.type);return a&&new em(a)}case V.b.NON_NULL_TYPE:{let a=tR(e,t.type);return a&&new ef(a)}case V.b.NAMED_TYPE:return e.getType(t.name.value)}}class tF{constructor(e,t,a){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=null!=a?a:tP,t&&(er(t)&&this._inputTypeStack.push(t),es(t)&&this._parentTypeStack.push(t),en(t)&&this._typeStack.push(t))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){let t=this._schema;switch(e.kind){case V.b.SELECTION_SET:{let e=eE(this.getType());this._parentTypeStack.push(es(e)?e:void 0);break}case V.b.FIELD:{let a,r,i=this.getParentType();i&&(a=this._getFieldDef(t,i,e))&&(r=a.type),this._fieldDefStack.push(a),this._typeStack.push(en(r)?r:void 0);break}case V.b.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case V.b.OPERATION_DEFINITION:{let a=t.getRootType(e.operation);this._typeStack.push(q(a)?a:void 0);break}case V.b.INLINE_FRAGMENT:case V.b.FRAGMENT_DEFINITION:{let a=e.typeCondition,r=a?tR(t,a):eE(this.getType());this._typeStack.push(en(r)?r:void 0);break}case V.b.VARIABLE_DEFINITION:{let a=tR(t,e.type);this._inputTypeStack.push(er(a)?a:void 0);break}case V.b.ARGUMENT:{var a;let t,r,i=null!=(a=this.getDirective())?a:this.getFieldDef();i&&(t=i.args.find(t=>t.name===e.name.value))&&(r=t.type),this._argument=t,this._defaultValueStack.push(t?t.defaultValue:void 0),this._inputTypeStack.push(er(r)?r:void 0);break}case V.b.LIST:{let e=e_(this.getInputType()),t=X(e)?e.ofType:e;this._defaultValueStack.push(void 0),this._inputTypeStack.push(er(t)?t:void 0);break}case V.b.OBJECT_FIELD:{let t,a,r=eE(this.getInputType());K(r)&&(a=r.getFields()[e.name.value])&&(t=a.type),this._defaultValueStack.push(a?a.defaultValue:void 0),this._inputTypeStack.push(er(t)?t:void 0);break}case V.b.ENUM:{let t,a=eE(this.getInputType());W(a)&&(t=a.getValue(e.value)),this._enumValue=t}}}leave(e){switch(e.kind){case V.b.SELECTION_SET:this._parentTypeStack.pop();break;case V.b.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case V.b.DIRECTIVE:this._directive=null;break;case V.b.OPERATION_DEFINITION:case V.b.INLINE_FRAGMENT:case V.b.FRAGMENT_DEFINITION:this._typeStack.pop();break;case V.b.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case V.b.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case V.b.LIST:case V.b.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case V.b.ENUM:this._enumValue=null}}}function tP(e,t,a){let r=a.name.value;return r===tv.name&&e.getQueryType()===t?tv:r===ty.name&&e.getQueryType()===t?ty:r===tg.name&&es(t)?tg:q(t)||Y(t)?t.getFields()[r]:void 0}function tj(e,t){return{enter(...a){let r=a[0];e.enter(r);let i=(0,tV.XO)(t,r.kind).enter;if(i){let n=i.apply(t,a);return void 0!==n&&(e.leave(r),(0,g.Ll)(n)&&e.enter(n)),n}},leave(...a){let r,i=a[0],n=(0,tV.XO)(t,i.kind).leave;return n&&(r=n.apply(t,a)),e.leave(i),r}}}var tL=a(3420);function t$(e){return{Document(t){for(let a of t.definitions)if(!(0,tL._m)(a)){let t=a.kind===V.b.SCHEMA_DEFINITION||a.kind===V.b.SCHEMA_EXTENSION?"schema":'"'+a.name.value+'"';e.reportError(new y.eO(`The ${t} definition is not executable.`,{nodes:a}))}return!1}}}function tM(e){return{Field(t){let a=e.getParentType();if(a&&!e.getFieldDef()){var r,i;let n=e.getSchema(),p=t.name.value,o=_("to use an inline fragment on",function(e,t,a){if(!eu(t))return[];let r=new Set,i=Object.create(null);for(let p of e.getPossibleTypes(t))if(p.getFields()[a])for(let e of(r.add(p),i[p.name]=1,p.getInterfaces())){var n;e.getFields()[a]&&(r.add(e),i[e.name]=(null!=(n=i[e.name])?n:0)+1)}return[...r].sort((t,a)=>{let r=i[a.name]-i[t.name];return 0!==r?r:Y(t)&&e.isSubType(t,a)?-1:Y(a)&&e.isSubType(a,t)?1:O(t.name,a.name)}).map(e=>e.name)}(n,a,p));""===o&&(o=_((r=a,i=p,q(r)||Y(r)?A(i,Object.keys(r.getFields())):[]))),e.reportError(new y.eO(`Cannot query field "${p}" on type "${a.name}".`+o,{nodes:t}))}}}}function tU(e){return{InlineFragment(t){let a=t.typeCondition;if(a){let t=tR(e.getSchema(),a);if(t&&!es(t)){let t=(0,R.y)(a);e.reportError(new y.eO(`Fragment cannot condition on non composite type "${t}".`,{nodes:a}))}}},FragmentDefinition(t){let a=tR(e.getSchema(),t.typeCondition);if(a&&!es(a)){let a=(0,R.y)(t.typeCondition);e.reportError(new y.eO(`Fragment "${t.name.value}" cannot condition on non composite type "${a}".`,{nodes:t.typeCondition}))}}}}function tB(e){return{...tq(e),Argument(t){let a=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!a&&r&&i){let a=t.name.value,n=A(a,r.args.map(e=>e.name));e.reportError(new y.eO(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+_(n),{nodes:t}))}}}}function tq(e){let t=Object.create(null),a=e.getSchema();for(let e of a?a.getDirectives():ta)t[e.name]=e.args.map(e=>e.name);for(let a of e.getDocument().definitions)if(a.kind===V.b.DIRECTIVE_DEFINITION){var r;let e=null!=(r=a.arguments)?r:[];t[a.name.value]=e.map(e=>e.name.value)}return{Directive(a){let r=a.name.value,i=t[r];if(a.arguments&&i)for(let t of a.arguments){let a=t.name.value;if(!i.includes(a)){let n=A(a,i);e.reportError(new y.eO(`Unknown argument "${a}" on directive "@${r}".`+_(n),{nodes:t}))}}return!1}}}function tQ(e){let t=Object.create(null),a=e.getSchema();for(let e of a?a.getDirectives():ta)t[e.name]=e.locations;for(let a of e.getDocument().definitions)a.kind===V.b.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(e=>e.value));return{Directive(a,r,i,n,p){let o=a.name.value,d=t[o];if(!d)return void e.reportError(new y.eO(`Unknown directive "@${o}".`,{nodes:a}));let s=function(e){let t=e[e.length-1];switch("kind"in t||(0,ti.V)(!1),t.kind){case V.b.OPERATION_DEFINITION:var a=t.operation;switch(a){case g.cE.QUERY:return eG.H.QUERY;case g.cE.MUTATION:return eG.H.MUTATION;case g.cE.SUBSCRIPTION:return eG.H.SUBSCRIPTION}return;case V.b.FIELD:return eG.H.FIELD;case V.b.FRAGMENT_SPREAD:return eG.H.FRAGMENT_SPREAD;case V.b.INLINE_FRAGMENT:return eG.H.INLINE_FRAGMENT;case V.b.FRAGMENT_DEFINITION:return eG.H.FRAGMENT_DEFINITION;case V.b.VARIABLE_DEFINITION:return eG.H.VARIABLE_DEFINITION;case V.b.SCHEMA_DEFINITION:case V.b.SCHEMA_EXTENSION:return eG.H.SCHEMA;case V.b.SCALAR_TYPE_DEFINITION:case V.b.SCALAR_TYPE_EXTENSION:return eG.H.SCALAR;case V.b.OBJECT_TYPE_DEFINITION:case V.b.OBJECT_TYPE_EXTENSION:return eG.H.OBJECT;case V.b.FIELD_DEFINITION:return eG.H.FIELD_DEFINITION;case V.b.INTERFACE_TYPE_DEFINITION:case V.b.INTERFACE_TYPE_EXTENSION:return eG.H.INTERFACE;case V.b.UNION_TYPE_DEFINITION:case V.b.UNION_TYPE_EXTENSION:return eG.H.UNION;case V.b.ENUM_TYPE_DEFINITION:case V.b.ENUM_TYPE_EXTENSION:return eG.H.ENUM;case V.b.ENUM_VALUE_DEFINITION:return eG.H.ENUM_VALUE;case V.b.INPUT_OBJECT_TYPE_DEFINITION:case V.b.INPUT_OBJECT_TYPE_EXTENSION:return eG.H.INPUT_OBJECT;case V.b.INPUT_VALUE_DEFINITION:{let t=e[e.length-3];return"kind"in t||(0,ti.V)(!1),t.kind===V.b.INPUT_OBJECT_TYPE_DEFINITION?eG.H.INPUT_FIELD_DEFINITION:eG.H.ARGUMENT_DEFINITION}default:(0,ti.V)(!1,"Unexpected kind: "+(0,v.N)(t.kind))}}(p);s&&!d.includes(s)&&e.reportError(new y.eO(`Directive "@${o}" may not be used on ${s}.`,{nodes:a}))}}}function tY(e){return{FragmentSpread(t){let a=t.name.value;e.getFragment(a)||e.reportError(new y.eO(`Unknown fragment "${a}".`,{nodes:t.name}))}}}function tG(e){let t=e.getSchema(),a=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let t of e.getDocument().definitions)(0,tL.a6)(t)&&(r[t.name.value]=!0);let i=[...Object.keys(a),...Object.keys(r)];return{NamedType(t,n,p,o,d){let s=t.name.value;if(!a[s]&&!r[s]){var l,u;let a=null!=(l=d[2])?l:p,r=null!=a&&"kind"in(u=a)&&((0,tL.xu)(u)||(0,tL.fT)(u));if(r&&tz.includes(s))return;let n=A(s,r?tz.concat(i):i);e.reportError(new y.eO(`Unknown type "${s}".`+_(n),{nodes:t}))}}}}let tz=[...e1,...t_].map(e=>e.name);function tH(e){let t=0;return{Document(e){t=e.definitions.filter(e=>e.kind===V.b.OPERATION_DEFINITION).length},OperationDefinition(a){!a.name&&t>1&&e.reportError(new y.eO("This anonymous operation must be the only defined operation.",{nodes:a}))}}}function tW(e){var t,a,r;let i=e.getSchema(),n=null!=(t=null!=(a=null!=(r=null==i?void 0:i.astNode)?r:null==i?void 0:i.getQueryType())?a:null==i?void 0:i.getMutationType())?t:null==i?void 0:i.getSubscriptionType(),p=0;return{SchemaDefinition(t){n?e.reportError(new y.eO("Cannot define a new schema within a schema extension.",{nodes:t})):(p>0&&e.reportError(new y.eO("Must provide only one schema definition.",{nodes:t})),++p)}}}function tJ(e){return{Field(t){if(("__schema"===t.name.value||"__type"===t.name.value)&&function t(a,r=Object.create(null),i=0){if(a.kind===V.b.FRAGMENT_SPREAD){let n=a.name.value;if(!0===r[n])return!1;let p=e.getFragment(n);if(!p)return!1;try{return r[n]=!0,t(p,r,i)}finally{r[n]=void 0}}if(a.kind===V.b.FIELD&&("fields"===a.name.value||"interfaces"===a.name.value||"possibleTypes"===a.name.value||"inputFields"===a.name.value)&&++i>=3)return!0;if("selectionSet"in a&&a.selectionSet){for(let e of a.selectionSet.selections)if(t(e,r,i))return!0}return!1}(t))return e.reportError(new y.eO("Maximum introspection depth exceeded",{nodes:[t]})),!1}}}function tK(e){let t=Object.create(null),a=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition:i=>((function i(n){if(t[n.name.value])return;let p=n.name.value;t[p]=!0;let o=e.getFragmentSpreads(n.selectionSet);if(0!==o.length){for(let t of(r[p]=a.length,o)){let n=t.name.value,p=r[n];if(a.push(t),void 0===p){let t=e.getFragment(n);t&&i(t)}else{let t=a.slice(p),r=t.slice(0,-1).map(e=>'"'+e.name.value+'"').join(", ");e.reportError(new y.eO(`Cannot spread fragment "${n}" within itself`+(""!==r?` via ${r}.`:"."),{nodes:t}))}a.pop()}r[p]=void 0}})(i),!1)}}function tZ(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(a){for(let{node:r}of e.getRecursiveVariableUsages(a)){let i=r.name.value;!0!==t[i]&&e.reportError(new y.eO(a.name?`Variable "$${i}" is not defined by operation "${a.name.value}".`:`Variable "$${i}" is not defined.`,{nodes:[r,a]}))}}},VariableDefinition(e){t[e.variable.name.value]=!0}}}function tX(e){let t=[],a=[];return{OperationDefinition:e=>(t.push(e),!1),FragmentDefinition:e=>(a.push(e),!1),Document:{leave(){let r=Object.create(null);for(let a of t)for(let t of e.getRecursivelyReferencedFragments(a))r[t.name.value]=!0;for(let t of a){let a=t.name.value;!0!==r[a]&&e.reportError(new y.eO(`Fragment "${a}" is never used.`,{nodes:t}))}}}}}function t1(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(a){let r=Object.create(null);for(let{node:t}of e.getRecursiveVariableUsages(a))r[t.name.value]=!0;for(let i of t){let t=i.variable.name.value;!0!==r[t]&&e.reportError(new y.eO(a.name?`Variable "$${t}" is never used in operation "${a.name.value}".`:`Variable "$${t}" is never used.`,{nodes:i}))}}},VariableDefinition(e){t.push(e)}}}function t0(e){switch(e.kind){case V.b.OBJECT:return{...e,fields:e.fields.map(e=>({...e,value:t0(e.value)})).sort((e,t)=>O(e.name.value,t.name.value))};case V.b.LIST:return{...e,values:e.values.map(t0)};case V.b.INT:case V.b.FLOAT:case V.b.STRING:case V.b.BOOLEAN:case V.b.NULL:case V.b.ENUM:case V.b.VARIABLE:return e}}function t2(e){let t=new t7,a=new ae,r=new Map;return{SelectionSet(i){for(let[[n,p],o,d]of function(e,t,a,r,i,n){let p=[],[o,d]=t5(e,t,i,n);if(function(e,t,a,r,i,n){for(let[p,o]of Object.entries(n))if(o.length>1)for(let n=0;n<o.length;n++)for(let d=n+1;d<o.length;d++){let s=t9(e,a,r,i,!1,p,o[n],o[d]);s&&t.push(s)}}(e,p,t,a,r,o),0!==d.length)for(let i=0;i<d.length;i++){t6(e,p,t,a,r,!1,o,d[i]);for(let n=i+1;n<d.length;n++)t4(e,p,t,a,r,!1,d[i],d[n])}return p}(e,r,t,a,e.getParentType(),i)){let t=function e(t){return Array.isArray(t)?t.map(([t,a])=>`subfields "${t}" conflict because `+e(a)).join(" and "):t}(p);e.reportError(new y.eO(`Fields "${n}" conflict because ${t}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:o.concat(d)}))}}}}function t6(e,t,a,r,i,n,p,o){if(r.has(p,o,n))return;r.add(p,o,n);let d=e.getFragment(o);if(!d)return;let[s,l]=t8(e,a,d);if(p!==s)for(let o of(t3(e,t,a,r,i,n,p,s),l))t6(e,t,a,r,i,n,p,o)}function t4(e,t,a,r,i,n,p,o){if(p===o||i.has(p,o,n))return;i.add(p,o,n);let d=e.getFragment(p),s=e.getFragment(o);if(!d||!s)return;let[l,u]=t8(e,a,d),[c,m]=t8(e,a,s);for(let o of(t3(e,t,a,r,i,n,l,c),m))t4(e,t,a,r,i,n,p,o);for(let p of u)t4(e,t,a,r,i,n,p,o)}function t3(e,t,a,r,i,n,p,o){for(let[d,s]of Object.entries(p)){let p=o[d];if(p)for(let o of s)for(let s of p){let p=t9(e,a,r,i,n,d,o,s);p&&t.push(p)}}}function t9(e,t,a,r,i,n,p,o){let[d,s,l]=p,[u,c,m]=o,f=i||d!==u&&q(d)&&q(u);if(!f){let e=s.name.value,t=c.name.value;if(e!==t)return[[n,`"${e}" and "${t}" are different fields`],[s],[c]];if(!function(e,t){let a=e.arguments,r=t.arguments;if(void 0===a||0===a.length)return void 0===r||0===r.length;if(void 0===r||0===r.length||a.length!==r.length)return!1;let i=new Map(r.map(({name:e,value:t})=>[e.value,t]));return a.every(e=>{let t=e.value,a=i.get(e.name.value);return void 0!==a&&function(e){return(0,R.y)(t0(e))}(t)===function(e){return(0,R.y)(t0(e))}(a)})}(s,c))return[[n,"they have differing arguments"],[s],[c]]}let h=null==l?void 0:l.type,y=null==m?void 0:m.type;if(h&&y&&function e(t,a){return X(t)?!X(a)||e(t.ofType,a.ofType):!!X(a)||(et(t)?!et(a)||e(t.ofType,a.ofType):!!et(a)||!!(eo(t)||eo(a))&&t!==a)}(h,y))return[[n,`they return conflicting types "${(0,v.N)(h)}" and "${(0,v.N)(y)}"`],[s],[c]];let g=s.selectionSet,_=c.selectionSet;if(g&&_){var b=function(e,t,a,r,i,n,p,o,d){let s=[],[l,u]=t5(e,t,n,p),[c,m]=t5(e,t,o,d);for(let n of(t3(e,s,t,a,r,i,l,c),m))t6(e,s,t,a,r,i,l,n);for(let n of u)t6(e,s,t,a,r,i,c,n);for(let n of u)for(let p of m)t4(e,s,t,a,r,i,n,p);return s}(e,t,a,r,f,eE(h),g,eE(y),_),w=n,E=s,T=c;return b.length>0?[[w,b.map(([e])=>e)],[E,...b.map(([,e])=>e).flat()],[T,...b.map(([,,e])=>e).flat()]]:void 0}}function t5(e,t,a,r){let i=t.get(r);if(i)return i;let n=Object.create(null),p=Object.create(null);!function e(t,a,r,i,n){for(let p of r.selections)switch(p.kind){case V.b.FIELD:{let e,t=p.name.value;(q(a)||Y(a))&&(e=a.getFields()[t]);let r=p.alias?p.alias.value:t;i[r]||(i[r]=[]),i[r].push([a,p,e]);break}case V.b.FRAGMENT_SPREAD:n[p.name.value]=!0;break;case V.b.INLINE_FRAGMENT:{let r=p.typeCondition,o=r?tR(t.getSchema(),r):a;e(t,o,p.selectionSet,i,n)}}}(e,a,r,n,p);let o=[n,Object.keys(p)];return t.set(r,o),o}function t8(e,t,a){let r=t.get(a.selectionSet);if(r)return r;let i=tR(e.getSchema(),a.typeCondition);return t5(e,t,i,a.selectionSet)}class t7{constructor(){this._data=new Map}has(e,t,a){var r;let i=null==(r=this._data.get(e))?void 0:r.get(t);return void 0!==i&&(!!a||a===i)}add(e,t,a){let r=this._data.get(e);void 0===r?this._data.set(e,new Map([[t,a]])):r.set(t,a)}}class ae{constructor(){this._orderedPairSet=new t7}has(e,t,a){return e<t?this._orderedPairSet.has(e,t,a):this._orderedPairSet.has(t,e,a)}add(e,t,a){e<t?this._orderedPairSet.add(e,t,a):this._orderedPairSet.add(t,e,a)}}function at(e){return{InlineFragment(t){let a=e.getType(),r=e.getParentType();if(es(a)&&es(r)&&!eY(e.getSchema(),a,r)){let i=(0,v.N)(r),n=(0,v.N)(a);e.reportError(new y.eO(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${n}".`,{nodes:t}))}},FragmentSpread(t){let a=t.name.value,r=function(e,t){let a=e.getFragment(t);if(a){let t=tR(e.getSchema(),a.typeCondition);if(es(t))return t}}(e,a),i=e.getParentType();if(r&&i&&!eY(e.getSchema(),r,i)){let n=(0,v.N)(i),p=(0,v.N)(r);e.reportError(new y.eO(`Fragment "${a}" cannot be spread here as objects of type "${n}" can never be of type "${p}".`,{nodes:t}))}}}}function aa(e){let t=e.getSchema(),a=Object.create(null);for(let t of e.getDocument().definitions)(0,tL.a6)(t)&&(a[t.name.value]=t);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(r){var i;let n,p=r.name.value,o=a[p],d=null==t?void 0:t.getType(p);if(o?n=ar[o.kind]:d&&(n=U(i=d)?V.b.SCALAR_TYPE_EXTENSION:q(i)?V.b.OBJECT_TYPE_EXTENSION:Y(i)?V.b.INTERFACE_TYPE_EXTENSION:z(i)?V.b.UNION_TYPE_EXTENSION:W(i)?V.b.ENUM_TYPE_EXTENSION:K(i)?V.b.INPUT_OBJECT_TYPE_EXTENSION:void(0,ti.V)(!1,"Unexpected type: "+(0,v.N)(i))),n){if(n!==r.kind){let t=function(e){switch(e){case V.b.SCALAR_TYPE_EXTENSION:return"scalar";case V.b.OBJECT_TYPE_EXTENSION:return"object";case V.b.INTERFACE_TYPE_EXTENSION:return"interface";case V.b.UNION_TYPE_EXTENSION:return"union";case V.b.ENUM_TYPE_EXTENSION:return"enum";case V.b.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,ti.V)(!1,"Unexpected kind: "+(0,v.N)(e))}}(r.kind);e.reportError(new y.eO(`Cannot extend non-${t} type "${p}".`,{nodes:o?[o,r]:r}))}}else{let i=A(p,Object.keys({...a,...null==t?void 0:t.getTypeMap()}));e.reportError(new y.eO(`Cannot extend type "${p}" because it is not defined.`+_(i),{nodes:r.name}))}}}let ar={[V.b.SCALAR_TYPE_DEFINITION]:V.b.SCALAR_TYPE_EXTENSION,[V.b.OBJECT_TYPE_DEFINITION]:V.b.OBJECT_TYPE_EXTENSION,[V.b.INTERFACE_TYPE_DEFINITION]:V.b.INTERFACE_TYPE_EXTENSION,[V.b.UNION_TYPE_DEFINITION]:V.b.UNION_TYPE_EXTENSION,[V.b.ENUM_TYPE_DEFINITION]:V.b.ENUM_TYPE_EXTENSION,[V.b.INPUT_OBJECT_TYPE_DEFINITION]:V.b.INPUT_OBJECT_TYPE_EXTENSION};function ai(e){return{...an(e),Field:{leave(t){var a;let r=e.getFieldDef();if(!r)return!1;let i=new Set(null==(a=t.arguments)?void 0:a.map(e=>e.name.value));for(let a of r.args)if(!i.has(a.name)&&eV(a)){let i=(0,v.N)(a.type);e.reportError(new y.eO(`Field "${r.name}" argument "${a.name}" of type "${i}" is required, but it was not provided.`,{nodes:t}))}}}}}function an(e){var t,a;let r=Object.create(null),i=e.getSchema();for(let e of null!=(t=null==i?void 0:i.getDirectives())?t:ta)r[e.name]=T(e.args.filter(eV),e=>e.name);for(let t of e.getDocument().definitions)if(t.kind===V.b.DIRECTIVE_DEFINITION){let e=null!=(a=t.arguments)?a:[];r[t.name.value]=T(e.filter(ap),e=>e.name.value)}return{Directive:{leave(t){let a=t.name.value,i=r[a];if(i){var n;let r=new Set((null!=(n=t.arguments)?n:[]).map(e=>e.name.value));for(let[n,p]of Object.entries(i))if(!r.has(n)){let r=$(p.type)?(0,v.N)(p.type):(0,R.y)(p.type);e.reportError(new y.eO(`Directive "@${a}" argument "${n}" of type "${r}" is required, but it was not provided.`,{nodes:t}))}}}}}}function ap(e){return e.type.kind===V.b.NON_NULL_TYPE&&null==e.defaultValue}function ao(e){return{Field(t){let a=e.getType(),r=t.selectionSet;if(a)if(eo(eE(a))){if(r){let i=t.name.value,n=(0,v.N)(a);e.reportError(new y.eO(`Field "${i}" must not have a selection since type "${n}" has no subfields.`,{nodes:r}))}}else if(r){if(0===r.selections.length){let r=t.name.value,i=(0,v.N)(a);e.reportError(new y.eO(`Field "${r}" of type "${i}" must have at least one field selected.`,{nodes:t}))}}else{let r=t.name.value,i=(0,v.N)(a);e.reportError(new y.eO(`Field "${r}" of type "${i}" must have a selection of subfields. Did you mean "${r} { ... }"?`,{nodes:t}))}}}}function ad(e){return e.map(e=>"number"==typeof e?"["+e.toString()+"]":"."+e).join("")}function as(e,t,a){return{prev:e,key:t,typename:a}}function al(e){let t=[],a=e;for(;a;)t.push(a.key),a=a.prev;return t.reverse()}function au(e,t,a=ac){return function e(t,a,r,i){if(et(a))return null!=t?e(t,a.ofType,r,i):void r(al(i),t,new y.eO(`Expected non-nullable type "${(0,v.N)(a)}" not to be null.`));if(null==t)return null;if(X(a)){let n=a.ofType;return tn(t)?Array.from(t,(t,a)=>e(t,n,r,as(i,a,void 0))):[e(t,n,r,i)]}if(K(a)){if(!(0,E.Z)(t)||Array.isArray(t))return void r(al(i),t,new y.eO(`Expected type "${a.name}" to be an object.`));let n={},p=a.getFields();for(let o of Object.values(p)){let p=t[o.name];if(void 0===p){if(void 0!==o.defaultValue)n[o.name]=o.defaultValue;else if(et(o.type)){let e=(0,v.N)(o.type);r(al(i),t,new y.eO(`Field "${o.name}" of required type "${e}" was not provided.`))}continue}n[o.name]=e(p,o.type,r,as(i,o.name,a.name))}for(let e of Object.keys(t))if(!p[e]){let n=A(e,Object.keys(a.getFields()));r(al(i),t,new y.eO(`Field "${e}" is not defined by type "${a.name}".`+_(n)))}if(a.isOneOf){let e=Object.keys(n);1!==e.length&&r(al(i),t,new y.eO(`Exactly one key must be specified for OneOf type "${a.name}".`));let p=e[0],o=n[p];null===o&&r(al(i).concat(p),o,new y.eO(`Field "${p}" must be non-null.`))}return n}if(eo(a)){let e;try{e=a.parseValue(t)}catch(e){e instanceof y.eO?r(al(i),t,e):r(al(i),t,new y.eO(`Expected type "${a.name}". `+e.message,{originalError:e}));return}return void 0===e&&r(al(i),t,new y.eO(`Expected type "${a.name}".`)),e}(0,ti.V)(!1,"Unexpected input type: "+(0,v.N)(a))}(e,t,a,void 0)}function ac(e,t,a){let r="Invalid value "+(0,v.N)(t);throw e.length>0&&(r+=` at "value${ad(e)}"`),a.message=r+": "+a.message,a}function am(e,t,a){if(e){if(e.kind===V.b.VARIABLE){let r=e.name.value;if(null==a||void 0===a[r])return;let i=a[r];if(null===i&&et(t))return;return i}if(et(t)){if(e.kind===V.b.NULL)return;return am(e,t.ofType,a)}if(e.kind===V.b.NULL)return null;if(X(t)){let r=t.ofType;if(e.kind===V.b.LIST){let t=[];for(let i of e.values)if(af(i,a)){if(et(r))return;t.push(null)}else{let e=am(i,r,a);if(void 0===e)return;t.push(e)}return t}let i=am(e,r,a);if(void 0===i)return;return[i]}if(K(t)){if(e.kind!==V.b.OBJECT)return;let r=Object.create(null),i=T(e.fields,e=>e.name.value);for(let e of Object.values(t.getFields())){let t=i[e.name];if(!t||af(t.value,a)){if(void 0!==e.defaultValue)r[e.name]=e.defaultValue;else if(et(e.type))return;continue}let n=am(t.value,e.type,a);if(void 0===n)return;r[e.name]=n}if(t.isOneOf){let e=Object.keys(r);if(1!==e.length||null===r[e[0]])return}return r}if(eo(t)){let r;try{r=t.parseLiteral(e,a)}catch(e){return}if(void 0===r)return;return r}(0,ti.V)(!1,"Unexpected input type: "+(0,v.N)(t))}}function af(e,t){return e.kind===V.b.VARIABLE&&(null==t||void 0===t[e.name.value])}function ah(e,t,a,r){let i=[],n=null==r?void 0:r.maxErrors;try{let r=function(e,t,a,r){let i={};for(let n of t){let t=n.variable.name.value,p=tR(e,n.type);if(!er(p)){let e=(0,R.y)(n.type);r(new y.eO(`Variable "$${t}" expected value of type "${e}" which cannot be used as an input type.`,{nodes:n.type}));continue}if(!ag(a,t)){if(n.defaultValue)i[t]=am(n.defaultValue,p);else if(et(p)){let e=(0,v.N)(p);r(new y.eO(`Variable "$${t}" of required type "${e}" was not provided.`,{nodes:n}))}continue}let o=a[t];if(null===o&&et(p)){let e=(0,v.N)(p);r(new y.eO(`Variable "$${t}" of non-null type "${e}" must not be null.`,{nodes:n}));continue}i[t]=au(o,p,(e,a,i)=>{let p=`Variable "$${t}" got invalid value `+(0,v.N)(a);e.length>0&&(p+=` at "${t}${ad(e)}"`),r(new y.eO(p+"; "+i.message,{nodes:n,originalError:i}))})}return i}(e,t,a,e=>{if(null!=n&&i.length>=n)throw new y.eO("Too many errors processing variables, error limit reached. Execution aborted.");i.push(e)});if(0===i.length)return{coerced:r}}catch(e){i.push(e)}return{errors:i}}function av(e,t,a){var r;let i={},n=T(null!=(r=t.arguments)?r:[],e=>e.name.value);for(let r of e.args){let e=r.name,p=r.type,o=n[e];if(!o){if(void 0!==r.defaultValue)i[e]=r.defaultValue;else if(et(p))throw new y.eO(`Argument "${e}" of required type "${(0,v.N)(p)}" was not provided.`,{nodes:t});continue}let d=o.value,s=d.kind===V.b.NULL;if(d.kind===V.b.VARIABLE){let t=d.name.value;if(null==a||!ag(a,t)){if(void 0!==r.defaultValue)i[e]=r.defaultValue;else if(et(p))throw new y.eO(`Argument "${e}" of required type "${(0,v.N)(p)}" was provided the variable "$${t}" which was not provided a runtime value.`,{nodes:d});continue}s=null==a[t]}if(s&&et(p))throw new y.eO(`Argument "${e}" of non-null type "${(0,v.N)(p)}" must not be null.`,{nodes:d});let l=am(d,p,a);if(void 0===l)throw new y.eO(`Argument "${e}" has invalid value ${(0,R.y)(d)}.`,{nodes:d});i[e]=l}return i}function ay(e,t,a){var r;let i=null==(r=t.directives)?void 0:r.find(t=>t.name.value===e.name);if(i)return av(e,i,a)}function ag(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function a_(e,t,a,r,i){let n=new Map;return ab(e,t,a,r,i,n,new Set),n}function ab(e,t,a,r,i,n,p){for(let d of i.selections)switch(d.kind){case V.b.FIELD:{var o;if(!aw(a,d))continue;let e=(o=d).alias?o.alias.value:o.name.value,t=n.get(e);void 0!==t?t.push(d):n.set(e,[d]);break}case V.b.INLINE_FRAGMENT:if(!aw(a,d)||!aE(e,d,r))continue;ab(e,t,a,r,d.selectionSet,n,p);break;case V.b.FRAGMENT_SPREAD:{let i=d.name.value;if(p.has(i)||!aw(a,d))continue;p.add(i);let o=t[i];if(!o||!aE(e,o,r))continue;ab(e,t,a,r,o.selectionSet,n,p)}}}function aw(e,t){let a=ay(e5,t,e);if((null==a?void 0:a.if)===!0)return!1;let r=ay(e9,t,e);return(null==r?void 0:r.if)!==!1}function aE(e,t,a){let r=t.typeCondition;if(!r)return!0;let i=tR(e,r);return i===a||!!eu(i)&&e.isSubType(i,a)}function aT(e){return{OperationDefinition(t){if("subscription"===t.operation){let a=e.getSchema(),r=a.getSubscriptionType();if(r){let i=t.name?t.name.value:null,n=Object.create(null),p=e.getDocument(),o=Object.create(null);for(let e of p.definitions)e.kind===V.b.FRAGMENT_DEFINITION&&(o[e.name.value]=e);let d=a_(a,o,n,r,t.selectionSet);if(d.size>1){let t=[...d.values()].slice(1).flat();e.reportError(new y.eO(null!=i?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:t}))}for(let t of d.values())t[0].name.value.startsWith("__")&&e.reportError(new y.eO(null!=i?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:t}))}}}}}function aN(e,t){let a=new Map;for(let r of e){let e=t(r),i=a.get(e);void 0===i?a.set(e,[r]):i.push(r)}return a}function aS(e){return{DirectiveDefinition(e){var t;let r=null!=(t=e.arguments)?t:[];return a(`@${e.name.value}`,r)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(e){var t,r;let i=e.name.value;for(let n of null!=(t=e.fields)?t:[]){let e=n.name.value;a(`${i}.${e}`,null!=(r=n.arguments)?r:[])}return!1}function a(t,a){for(let[r,i]of aN(a,e=>e.name.value))i.length>1&&e.reportError(new y.eO(`Argument "${t}(${r}:)" can only be defined once.`,{nodes:i.map(e=>e.name)}));return!1}}function aO(e){return{Field:t,Directive:t};function t(t){var a;for(let[r,i]of aN(null!=(a=t.arguments)?a:[],e=>e.name.value))i.length>1&&e.reportError(new y.eO(`There can be only one argument named "${r}".`,{nodes:i.map(e=>e.name)}))}}function aD(e){let t=Object.create(null),a=e.getSchema();return{DirectiveDefinition(r){let i=r.name.value;return null!=a&&a.getDirective(i)?void e.reportError(new y.eO(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name})):(t[i]?e.reportError(new y.eO(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1)}}}function aI(e){let t=Object.create(null),a=e.getSchema();for(let e of a?a.getDirectives():ta)t[e.name]=!e.isRepeatable;for(let a of e.getDocument().definitions)a.kind===V.b.DIRECTIVE_DEFINITION&&(t[a.name.value]=!a.repeatable);let r=Object.create(null),i=Object.create(null);return{enter(a){let n;if("directives"in a&&a.directives){if(a.kind===V.b.SCHEMA_DEFINITION||a.kind===V.b.SCHEMA_EXTENSION)n=r;else if((0,tL.a6)(a)||(0,tL.i7)(a)){let e=a.name.value;void 0===(n=i[e])&&(i[e]=n=Object.create(null))}else n=Object.create(null);for(let r of a.directives){let a=r.name.value;t[a]&&(n[a]?e.reportError(new y.eO(`The directive "@${a}" can only be used once at this location.`,{nodes:[n[a],r]})):n[a]=r)}}}}}function aA(e){let t=e.getSchema(),a=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(t){var i;let n=t.name.value;r[n]||(r[n]=Object.create(null));let p=null!=(i=t.values)?i:[],o=r[n];for(let t of p){let r=t.name.value,i=a[n];W(i)&&i.getValue(r)?e.reportError(new y.eO(`Enum value "${n}.${r}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:t.name})):o[r]?e.reportError(new y.eO(`Enum value "${n}.${r}" can only be defined once.`,{nodes:[o[r],t.name]})):o[r]=t.name}return!1}}function ak(e){let t=e.getSchema(),a=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(t){var i,n,p;let o=t.name.value;r[o]||(r[o]=Object.create(null));let d=null!=(i=t.fields)?i:[],s=r[o];for(let t of d){let r=t.name.value;(n=a[o],p=r,(q(n)||Y(n)||K(n))&&null!=n.getFields()[p])?e.reportError(new y.eO(`Field "${o}.${r}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:t.name})):s[r]?e.reportError(new y.eO(`Field "${o}.${r}" can only be defined once.`,{nodes:[s[r],t.name]})):s[r]=t.name}return!1}}function ax(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(a){let r=a.name.value;return t[r]?e.reportError(new y.eO(`There can be only one fragment named "${r}".`,{nodes:[t[r],a.name]})):t[r]=a.name,!1}}}function aC(e){let t=[],a=Object.create(null);return{ObjectValue:{enter(){t.push(a),a=Object.create(null)},leave(){let e=t.pop();e||(0,ti.V)(!1),a=e}},ObjectField(t){let r=t.name.value;a[r]?e.reportError(new y.eO(`There can be only one input field named "${r}".`,{nodes:[a[r],t.name]})):a[r]=t.name}}}function aV(e){let t=Object.create(null);return{OperationDefinition(a){let r=a.name;return r&&(t[r.value]?e.reportError(new y.eO(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function aR(e){let t=e.getSchema(),a=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(t){var i;for(let n of null!=(i=t.operationTypes)?i:[]){let t=n.operation,i=a[t];r[t]?e.reportError(new y.eO(`Type for ${t} already defined in the schema. It cannot be redefined.`,{nodes:n})):i?e.reportError(new y.eO(`There can be only one ${t} type in schema.`,{nodes:[i,n]})):a[t]=n}return!1}}function aF(e){let t=Object.create(null),a=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(r){let i=r.name.value;return null!=a&&a.getType(i)?void e.reportError(new y.eO(`Type "${i}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:r.name})):(t[i]?e.reportError(new y.eO(`There can be only one type named "${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1)}}function aP(e){return{OperationDefinition(t){var a;for(let[r,i]of aN(null!=(a=t.variableDefinitions)?a:[],e=>e.variable.name.value))i.length>1&&e.reportError(new y.eO(`There can be only one variable named "$${r}".`,{nodes:i.map(e=>e.variable.name)}))}}}function aj(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(e){t[e.variable.name.value]=e},ListValue(t){if(!X(e_(e.getParentInputType())))return aL(e,t),!1},ObjectValue(t){let a=eE(e.getInputType());if(!K(a))return aL(e,t),!1;let r=T(t.fields,e=>e.name.value);for(let i of Object.values(a.getFields()))if(!r[i.name]&&eB(i)){let r=(0,v.N)(i.type);e.reportError(new y.eO(`Field "${a.name}.${i.name}" of required type "${r}" was not provided.`,{nodes:t}))}a.isOneOf&&function(e,t,a,r){var i;let n=Object.keys(r);if(1!==n.length)return e.reportError(new y.eO(`OneOf Input Object "${a.name}" must specify exactly one key.`,{nodes:[t]}));let p=null==(i=r[n[0]])?void 0:i.value;p&&p.kind!==V.b.NULL||e.reportError(new y.eO(`Field "${a.name}.${n[0]}" must be non-null.`,{nodes:[t]}))}(e,t,a,r)},ObjectField(t){let a=eE(e.getParentInputType());if(!e.getInputType()&&K(a)){let r=A(t.name.value,Object.keys(a.getFields()));e.reportError(new y.eO(`Field "${t.name.value}" is not defined by type "${a.name}".`+_(r),{nodes:t}))}},NullValue(t){let a=e.getInputType();et(a)&&e.reportError(new y.eO(`Expected value of type "${(0,v.N)(a)}", found ${(0,R.y)(t)}.`,{nodes:t}))},EnumValue:t=>aL(e,t),IntValue:t=>aL(e,t),FloatValue:t=>aL(e,t),StringValue:t=>aL(e,t),BooleanValue:t=>aL(e,t)}}function aL(e,t){let a=e.getInputType();if(!a)return;let r=eE(a);if(!eo(r)){let r=(0,v.N)(a);e.reportError(new y.eO(`Expected value of type "${r}", found ${(0,R.y)(t)}.`,{nodes:t}));return}try{let i=r.parseLiteral(t,void 0);if(void 0===i){let r=(0,v.N)(a);e.reportError(new y.eO(`Expected value of type "${r}", found ${(0,R.y)(t)}.`,{nodes:t}))}}catch(i){let r=(0,v.N)(a);i instanceof y.eO?e.reportError(i):e.reportError(new y.eO(`Expected value of type "${r}", found ${(0,R.y)(t)}; `+i.message,{nodes:t,originalError:i}))}}function a$(e){return{VariableDefinition(t){let a=tR(e.getSchema(),t.type);if(void 0!==a&&!er(a)){let a=t.variable.name.value,r=(0,R.y)(t.type);e.reportError(new y.eO(`Variable "$${a}" cannot be non-input type "${r}".`,{nodes:t.type}))}}}}function aM(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(a){for(let{node:d,type:s,defaultValue:l,parentType:u}of e.getRecursiveVariableUsages(a)){let a=d.name.value,c=t[a];if(c&&s){var r,i,n,p,o;let t=e.getSchema(),m=tR(t,c.type);if(m&&(r=t,i=m,n=c.defaultValue,p=s,o=l,et(p)&&!et(i)?!((null!=n&&n.kind!==V.b.NULL||void 0!==o)&&eQ(r,i,p.ofType)):!eQ(r,i,p))){let t=(0,v.N)(m),r=(0,v.N)(s);e.reportError(new y.eO(`Variable "$${a}" of type "${t}" used in position expecting type "${r}".`,{nodes:[c,d]}))}K(u)&&u.isOneOf&&ey(m)&&e.reportError(new y.eO(`Variable "$${a}" is of type "${m}" but must be non-nullable to be used for OneOf Input Object "${u}".`,{nodes:[c,d]}))}}}},VariableDefinition(e){t[e.variable.name.value]=e}}}let aU=Object.freeze([tJ]),aB=Object.freeze([t$,aV,tH,aT,tG,tU,a$,ao,tM,ax,tY,tX,at,tK,aP,tZ,t1,tQ,aI,tB,aO,aj,ai,aM,t2,aC,...aU]),aq=Object.freeze([tW,aR,aF,aA,ak,aS,aD,tG,tQ,aI,aa,tq,aO,aC,an]);class aQ{constructor(e,t){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=t}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let t;if(this._fragments)t=this._fragments;else{for(let e of(t=Object.create(null),this.getDocument().definitions))e.kind===V.b.FRAGMENT_DEFINITION&&(t[e.name.value]=e);this._fragments=t}return t[e]}getFragmentSpreads(e){let t=this._fragmentSpreads.get(e);if(!t){let a;t=[];let r=[e];for(;a=r.pop();)for(let e of a.selections)e.kind===V.b.FRAGMENT_SPREAD?t.push(e):e.selectionSet&&r.push(e.selectionSet);this._fragmentSpreads.set(e,t)}return t}getRecursivelyReferencedFragments(e){let t=this._recursivelyReferencedFragments.get(e);if(!t){let a;t=[];let r=Object.create(null),i=[e.selectionSet];for(;a=i.pop();)for(let e of this.getFragmentSpreads(a)){let a=e.name.value;if(!0!==r[a]){r[a]=!0;let e=this.getFragment(a);e&&(t.push(e),i.push(e.selectionSet))}}this._recursivelyReferencedFragments.set(e,t)}return t}}class aY extends aQ{constructor(e,t,a){super(e,a),this._schema=t}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class aG extends aQ{constructor(e,t,a,r){super(t,r),this._schema=e,this._typeInfo=a,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(e){let t=this._variableUsages.get(e);if(!t){let a=[],r=new tF(this._schema);(0,tV.YR)(e,tj(r,{VariableDefinition:()=>!1,Variable(e){a.push({node:e,type:r.getInputType(),defaultValue:r.getDefaultValue(),parentType:r.getParentInputType()})}})),t=a,this._variableUsages.set(e,t)}return t}getRecursiveVariableUsages(e){let t=this._recursiveVariableUsages.get(e);if(!t){for(let a of(t=this.getVariableUsages(e),this.getRecursivelyReferencedFragments(e)))t=t.concat(this.getVariableUsages(a));this._recursiveVariableUsages.set(e,t)}return t}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 az(e,t,a=aB,r,i=new tF(e)){var n;let p=null!=(n=null==r?void 0:r.maxErrors)?n:100;t||(0,m.U)(!1,"Must provide document."),tO(e);let o=Object.freeze({}),d=[],s=new aG(e,t,i,e=>{if(d.length>=p)throw d.push(new y.eO("Too many validation errors, error limit reached. Validation aborted.")),o;d.push(e)}),l=(0,tV.oP)(a.map(e=>e(s)));try{(0,tV.YR)(t,tj(i,l))}catch(e){if(e!==o)throw e}return d}function aH(e,t,a=aq){let r=[],i=new aY(e,t,e=>{r.push(e)}),n=a.map(e=>e(i));return(0,tV.YR)(e,(0,tV.oP)(n)),r}function aW(e){return Promise.all(Object.values(e)).then(t=>{let a=Object.create(null);for(let[r,i]of Object.keys(e).entries())a[i]=t[r];return a})}class aJ extends Error{constructor(e){super("Unexpected error value: "+(0,v.N)(e)),this.name="NonErrorThrown",this.thrownValue=e}}function aK(e,t,a){var r;let i=e instanceof Error?e:new aJ(e);return Array.isArray(i.path)?i:new y.eO(i.message,{nodes:null!=(r=i.nodes)?r:t,source:i.source,positions:i.positions,path:a,originalError:i})}let aZ=(o=(e,t,a)=>(function(e,t,a,r,i){let n=new Map,p=new Set;for(let o of i)o.selectionSet&&ab(e,t,a,r,o.selectionSet,n,p);return n})(e.schema,e.fragments,e.variableValues,t,a),function(e,t,a){void 0===r&&(r=new WeakMap);let i=r.get(e);void 0===i&&(i=new WeakMap,r.set(e,i));let n=i.get(t);void 0===n&&(n=new WeakMap,i.set(t,n));let p=n.get(a);return void 0===p&&(p=o(e,t,a),n.set(a,p)),p});function aX(e){arguments.length<2||(0,m.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,document:a,variableValues:r,rootValue:i}=e;a2(t,a,r);let n=a6(e);if(!("schema"in n))return{errors:n};try{let{operation:e}=n,t=function(e,t,a){let r=e.schema.getRootType(t.operation);if(null==r)throw new y.eO(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=a_(e.schema,e.fragments,e.variableValues,r,t.selectionSet),n;switch(t.operation){case g.cE.QUERY:return a4(e,r,a,n,i);case g.cE.MUTATION:var p,o,d,s,l;return p=e,o=r,d=a,s=n,l=i,function(e,t,a){let r=a;for(let a of e)r=f(r)?r.then(e=>t(e,a)):t(r,a);return r}(l.entries(),(e,[t,a])=>{let r=as(s,t,o.name),i=a3(p,o,d,a,r);return void 0===i?e:f(i)?i.then(a=>(e[t]=a,e)):(e[t]=i,e)},Object.create(null));case g.cE.SUBSCRIPTION:return a4(e,r,a,n,i)}}(n,e,i);if(f(t))return t.then(e=>a0(e,n.errors),e=>(n.errors.push(e),a0(null,n.errors)));return a0(t,n.errors)}catch(e){return n.errors.push(e),a0(null,n.errors)}}function a1(e){let t=aX(e);if(f(t))throw Error("GraphQL execution failed to complete synchronously.");return t}function a0(e,t){return 0===t.length?{data:e}:{errors:t,data:e}}function a2(e,t,a){t||(0,m.U)(!1,"Must provide document."),tO(e),null==a||(0,E.Z)(a)||(0,m.U)(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function a6(e){var t,a,r;let i,{schema:n,document:p,rootValue:o,contextValue:d,variableValues:s,operationName:l,fieldResolver:u,typeResolver:c,subscribeFieldResolver:m,options:f}=e,h=Object.create(null);for(let e of p.definitions)switch(e.kind){case V.b.OPERATION_DEFINITION:if(null==l){if(void 0!==i)return[new y.eO("Must provide operation name if query contains multiple operations.")];i=e}else(null==(t=e.name)?void 0:t.value)===l&&(i=e);break;case V.b.FRAGMENT_DEFINITION:h[e.name.value]=e}if(!i)return null!=l?[new y.eO(`Unknown operation named "${l}".`)]:[new y.eO("Must provide an operation.")];let v=ah(n,null!=(a=i.variableDefinitions)?a:[],null!=s?s:{},{maxErrors:null!=(r=null==f?void 0:f.maxCoercionErrors)?r:50});return v.errors?v.errors:{schema:n,fragments:h,rootValue:o,contextValue:d,operation:i,variableValues:v.coerced,fieldResolver:null!=u?u:rr,typeResolver:null!=c?c:ra,subscribeFieldResolver:null!=m?m:rr,errors:[]}}function a4(e,t,a,r,i){let n=Object.create(null),p=!1;try{for(let[o,d]of i.entries()){let i=as(r,o,t.name),s=a3(e,t,a,d,i);void 0!==s&&(n[o]=s,f(s)&&(p=!0))}}catch(e){if(p)return aW(n).finally(()=>{throw e});throw e}return p?aW(n):n}function a3(e,t,a,r,i){var n;let p=ri(e.schema,t,r[0]);if(!p)return;let o=p.type,d=null!=(n=p.resolve)?n:e.fieldResolver,s=a9(e,p,r,t,i);try{let t,n=av(p,r[0],e.variableValues),l=e.contextValue,u=d(a,n,l,s);if(t=f(u)?u.then(t=>a8(e,o,r,s,i,t)):a8(e,o,r,s,i,u),f(t))return t.then(void 0,t=>{let a=aK(t,r,al(i));return a5(a,o,e)});return t}catch(t){return a5(aK(t,r,al(i)),o,e)}}function a9(e,t,a,r,i){return{fieldName:t.name,fieldNodes:a,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function a5(e,t,a){if(et(t))throw e;return a.errors.push(e),null}function a8(e,t,a,r,i,n){var p,o,d,s,l,u,c;let m;if(n instanceof Error)throw n;if(et(t)){let p=a8(e,t.ofType,a,r,i,n);if(null===p)throw Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return p}return null==n?null:X(t)?function(e,t,a,r,i,n){if(!tn(n))throw new y.eO(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);let p=t.ofType,o=!1,d=Array.from(n,(t,n)=>{let d=as(i,n,void 0);try{let i;if(i=f(t)?t.then(t=>a8(e,p,a,r,d,t)):a8(e,p,a,r,d,t),f(i))return o=!0,i.then(void 0,t=>{let r=aK(t,a,al(d));return a5(r,p,e)});return i}catch(t){return a5(aK(t,a,al(d)),p,e)}});return o?Promise.all(d):d}(e,t,a,r,i,n):eo(t)?function(e,t){let a=e.serialize(t);if(null==a)throw Error(`Expected \`${(0,v.N)(e)}.serialize(${(0,v.N)(t)})\` to return non-nullable value, returned: ${(0,v.N)(a)}`);return a}(t,n):eu(t)?(p=e,o=t,d=a,s=r,l=i,u=n,f(m=(null!=(c=o.resolveType)?c:p.typeResolver)(u,p.contextValue,s,o))?m.then(e=>re(p,a7(e,p,o,d,s,u),d,s,l,u)):re(p,a7(m,p,o,d,s,u),d,s,l,u)):q(t)?re(e,t,a,r,i,n):void(0,ti.V)(!1,"Cannot complete value of unexpected output type: "+(0,v.N)(t))}function a7(e,t,a,r,i,n){if(null==e)throw new y.eO(`Abstract type "${a.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${a.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if(q(e))throw new y.eO("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if("string"!=typeof e)throw new y.eO(`Abstract type "${a.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,v.N)(n)}, received "${(0,v.N)(e)}".`);let p=t.schema.getType(e);if(null==p)throw new y.eO(`Abstract type "${a.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!q(p))throw new y.eO(`Abstract type "${a.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(a,p))throw new y.eO(`Runtime Object type "${p.name}" is not a possible type for "${a.name}".`,{nodes:r});return p}function re(e,t,a,r,i,n){let p=aZ(e,t,a);if(t.isTypeOf){let o=t.isTypeOf(n,e.contextValue,r);if(f(o))return o.then(r=>{if(!r)throw rt(t,n,a);return a4(e,t,n,i,p)});if(!o)throw rt(t,n,a)}return a4(e,t,n,i,p)}function rt(e,t,a){return new y.eO(`Expected value of type "${e.name}" but got: ${(0,v.N)(t)}.`,{nodes:a})}let ra=function(e,t,a,r){if((0,E.Z)(e)&&"string"==typeof e.__typename)return e.__typename;let i=a.schema.getPossibleTypes(r),n=[];for(let r=0;r<i.length;r++){let p=i[r];if(p.isTypeOf){let i=p.isTypeOf(e,t,a);if(f(i))n[r]=i;else if(i)return n.length&&Promise.allSettled(n).catch(()=>{}),p.name}}if(n.length)return Promise.all(n).then(e=>{for(let t=0;t<e.length;t++)if(e[t])return i[t].name})},rr=function(e,t,a,r){if((0,E.Z)(e)||"function"==typeof e){let i=e[r.fieldName];return"function"==typeof i?e[r.fieldName](t,a,r):i}};function ri(e,t,a){let r=a.name.value;return r===tv.name&&e.getQueryType()===t?tv:r===ty.name&&e.getQueryType()===t?ty:r===tg.name?tg:t.getFields()[r]}function rn(e){return new Promise(t=>t(ro(e)))}function rp(e){let t=ro(e);if(f(t))throw Error("GraphQL execution failed to complete synchronously.");return t}function ro(e){let t;arguments.length<2||(0,m.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:a,source:r,rootValue:i,contextValue:n,variableValues:p,operationName:o,fieldResolver:d,typeResolver:s}=e,l=tS(a);if(l.length>0)return{errors:l};try{t=(0,h.qg)(r)}catch(e){return{errors:[e]}}let u=az(a,t);return u.length>0?{errors:u}:aX({schema:a,document:t,rootValue:i,contextValue:n,variableValues:p,operationName:o,fieldResolver:d,typeResolver:s})}var rd=a(39537),rs=a(73971),rl=a(8238),ru=a(98472),rc=a(12039);function rm(e){return"function"==typeof(null==e?void 0:e[Symbol.asyncIterator])}async function rf(e){arguments.length<2||(0,m.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let t=await rh(e);if(!rm(t))return t;let a=t[Symbol.asyncIterator]();async function r(t){if(t.done)return t;try{let a;return{value:await (a=t.value,aX({...e,rootValue:a})),done:!1}}catch(e){if("function"==typeof a.return)try{await a.return()}catch(e){}throw e}}return{next:async()=>r(await a.next()),return:async()=>"function"==typeof a.return?r(await a.return()):{value:void 0,done:!0},async throw(e){if("function"==typeof a.throw)return r(await a.throw(e));throw e},[Symbol.asyncIterator](){return this}}}async function rh(...e){let t,a=(t=e[0])&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]},{schema:r,document:i,variableValues:n}=a;a2(r,i,n);let p=a6(a);if(!("schema"in p))return{errors:p};try{let e=await rv(p);if(!rm(e))throw Error(`Subscription field must return Async Iterable. Received: ${(0,v.N)(e)}.`);return e}catch(e){if(e instanceof y.eO)return{errors:[e]};throw e}}async function rv(e){let{schema:t,fragments:a,operation:r,variableValues:i,rootValue:n}=e,p=t.getSubscriptionType();if(null==p)throw new y.eO("Schema is not configured to execute subscription operation.",{nodes:r});let[o,d]=[...a_(t,a,i,p,r.selectionSet).entries()][0],s=ri(t,p,d[0]);if(!s){let e=d[0].name.value;throw new y.eO(`The subscription field "${e}" is not defined.`,{nodes:d})}let l=as(void 0,o,p.name),u=a9(e,s,d,p,l);try{var c;let t=av(s,d[0],i),a=e.contextValue,r=null!=(c=s.subscribe)?c:e.subscribeFieldResolver,p=await r(n,t,a,u);if(p instanceof Error)throw p;return p}catch(e){throw aK(e,d,al(l))}}function ry(e){return{Field(t){let a=e.getFieldDef(),r=null==a?void 0:a.deprecationReason;if(a&&null!=r){let i=e.getParentType();null!=i||(0,ti.V)(!1),e.reportError(new y.eO(`The field ${i.name}.${a.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){let a=e.getArgument(),r=null==a?void 0:a.deprecationReason;if(a&&null!=r){let i=e.getDirective();if(null!=i)e.reportError(new y.eO(`Directive "@${i.name}" argument "${a.name}" is deprecated. ${r}`,{nodes:t}));else{let i=e.getParentType(),n=e.getFieldDef();null!=i&&null!=n||(0,ti.V)(!1),e.reportError(new y.eO(`Field "${i.name}.${n.name}" argument "${a.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let a=eE(e.getParentInputType());if(K(a)){let r=a.getFields()[t.name.value],i=null==r?void 0:r.deprecationReason;null!=i&&e.reportError(new y.eO(`The input field ${a.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){let a=e.getEnumValue(),r=null==a?void 0:a.deprecationReason;if(a&&null!=r){let i=eE(e.getInputType());null!=i||(0,ti.V)(!1),e.reportError(new y.eO(`The enum value "${i.name}.${a.name}" is deprecated. ${r}`,{nodes:t}))}}}}function rg(e){return{Field(t){let a=eE(e.getType());a&&tb(a)&&e.reportError(new y.eO(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}var r_=a(59841);function rb(e){let t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1,...e},a=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",n=t.schemaDescription?a:"";function p(e){return t.inputValueDeprecation?e:""}let o=t.oneOf?"isOneOf":"";return`
1003
1003
  query IntrospectionQuery {
1004
1004
  __schema {
1005
1005
  ${n}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-cli",
3
- "version": "2.25.5-beta.1",
3
+ "version": "2.25.5-beta.2",
4
4
  "description": "BRICKS CLI - Command-line interface for BRICKS Workspace API",
5
5
  "keywords": [
6
6
  "bricks",
@@ -55,10 +55,11 @@
55
55
  "@babel/parser": "7.28.5",
56
56
  "@babel/traverse": "7.28.5",
57
57
  "@babel/types": "7.28.5",
58
- "@fugood/bricks-config-core": "^2.25.5-beta.1",
59
- "@fugood/bricks-core-generated": "^2.25.5-beta.1",
58
+ "@fugood/bricks-config-core": "^2.25.5-beta.2",
59
+ "@fugood/bricks-core-generated": "^2.25.5-beta.2",
60
+ "@fugood/bricks-devtools-core": "^2.25.5-beta.2",
60
61
  "@fugood/bricks-system-properties-definition": "^2.25.3",
61
- "@fugood/property-bank-calc-generated": "^2.25.5-beta.1",
62
+ "@fugood/property-bank-calc-generated": "^2.25.5-beta.2",
62
63
  "@huggingface/gguf": "^0.3.2",
63
64
  "@iarna/toml": "^3.0.0",
64
65
  "@inquirer/prompts": "^7.0.0",
@@ -89,5 +90,5 @@
89
90
  "engines": {
90
91
  "node": ">=18.0.0"
91
92
  },
92
- "gitHead": "a60473021097f275088bbb082e850809dce76e0a"
93
+ "gitHead": "9bacac6ddaa4b4ae0991cbbe94b524772afd369c"
93
94
  }