diff --git a/cli/src/commands/router/commands/compose.ts b/cli/src/commands/router/commands/compose.ts index 9b4f5e75e1..04387946b8 100644 --- a/cli/src/commands/router/commands/compose.ts +++ b/cli/src/commands/router/commands/compose.ts @@ -171,6 +171,7 @@ export default (opts: BaseCommandOptions) => { '--disable-resolvability-validation', 'This flag will disable the validation for whether all nodes of the federated graph are resolvable. Do NOT use unless troubleshooting.', ); + command.option('--ignore-external-keys', 'This flag ignores errors related to true external entity keys.'); command.action(async (options) => { const inputFile = resolve(options.input); @@ -207,7 +208,10 @@ export default (opts: BaseCommandOptions) => { definitions: parse(s.sdl), }; }), - options.disableResolvabilityValidation, + { + disableResolvabilityValidation: options.disableResolvabilityValidation, + ignoreExternalKeys: options.ignoreExternalKeys, + }, ); if (!result.success) { @@ -587,7 +591,10 @@ async function buildFeatureFlagsConfig( url: normalizeURL(s.routingUrl), definitions: parse(s.sdl), })), - options.disableResolvabilityValidation, + { + disableResolvabilityValidation: options.disableResolvabilityValidation, + ignoreExternalKeys: options.ignoreExternalKeys, + }, ); if (!featureResult.success) { diff --git a/cli/src/utils.ts b/cli/src/utils.ts index 6cae117be5..c6058df997 100644 --- a/cli/src/utils.ts +++ b/cli/src/utils.ts @@ -1,6 +1,7 @@ /* eslint-disable import/named */ import { existsSync, readFileSync, writeFileSync } from 'node:fs'; import { + CompositionOptions, federateSubgraphs, FederationResult, ROUTER_COMPATIBILITY_VERSION_ONE, @@ -179,9 +180,9 @@ export const introspectSubgraph = async ({ /** * Composes a list of subgraphs into a single schema. */ -export function composeSubgraphs(subgraphs: Subgraph[], disableResolvabilityValidation?: boolean): FederationResult { +export function composeSubgraphs(subgraphs: Subgraph[], options?: CompositionOptions): FederationResult { // @TODO get router compatibility version programmatically - return federateSubgraphs({ disableResolvabilityValidation, subgraphs, version: ROUTER_COMPATIBILITY_VERSION_ONE }); + return federateSubgraphs({ options, subgraphs, version: ROUTER_COMPATIBILITY_VERSION_ONE }); } export type ConfigData = Partial; diff --git a/cli/vite.config.ts b/cli/vite.config.ts index d8e544492e..94e502c1d5 100644 --- a/cli/vite.config.ts +++ b/cli/vite.config.ts @@ -2,7 +2,7 @@ // Configure Vitest (https://vitest.dev/config/) -import { defineConfig } from "vitest/config"; +import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { diff --git a/composition-go/index.global.js b/composition-go/index.global.js index 4e4233c5de..ea7aa3e706 100644 --- a/composition-go/index.global.js +++ b/composition-go/index.global.js @@ -15,17 +15,17 @@ class URL { return urlCanParse(url, base || ''); } } -"use strict";var shim=(()=>{var UH=Object.create;var Gd=Object.defineProperty,kH=Object.defineProperties,MH=Object.getOwnPropertyDescriptor,xH=Object.getOwnPropertyDescriptors,qH=Object.getOwnPropertyNames,Km=Object.getOwnPropertySymbols,VH=Object.getPrototypeOf,Yy=Object.prototype.hasOwnProperty,$R=Object.prototype.propertyIsEnumerable;var ln=Math.pow,Qy=(e,t,n)=>t in e?Gd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,k=(e,t)=>{for(var n in t||(t={}))Yy.call(t,n)&&Qy(e,n,t[n]);if(Km)for(var n of Km(t))$R.call(t,n)&&Qy(e,n,t[n]);return e},$=(e,t)=>kH(e,xH(t));var GR=(e,t)=>{var n={};for(var r in e)Yy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Km)for(var r of Km(e))t.indexOf(r)<0&&$R.call(e,r)&&(n[r]=e[r]);return n};var Zu=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$m=(e,t)=>{for(var n in t)Gd(e,n,{get:t[n],enumerable:!0})},QR=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qH(t))!Yy.call(e,i)&&i!==n&&Gd(e,i,{get:()=>t[i],enumerable:!(r=MH(t,i))||r.enumerable});return e};var Ni=(e,t,n)=>(n=e!=null?UH(VH(e)):{},QR(t||!e||!e.__esModule?Gd(n,"default",{value:e,enumerable:!0}):n,e)),Gm=e=>QR(Gd({},"__esModule",{value:!0}),e);var g=(e,t,n)=>(Qy(e,typeof t!="symbol"?t+"":t,n),n),Jy=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Hy=(e,t,n)=>(Jy(e,t,"read from private field"),n?n.call(e):t.get(e)),ec=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},zy=(e,t,n,r)=>(Jy(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var El=(e,t,n)=>(Jy(e,t,"access private method"),n);var wi=(e,t,n)=>new Promise((r,i)=>{var a=l=>{try{u(n.next(l))}catch(d){i(d)}},o=l=>{try{u(n.throw(l))}catch(d){i(d)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,o);u((n=n.apply(e,t)).next())});var m=Zu(()=>{"use strict"});var S={};$m(S,{_debugEnd:()=>CP,_debugProcess:()=>LP,_events:()=>zP,_eventsCount:()=>WP,_exiting:()=>mP,_fatalExceptions:()=>RP,_getActiveHandles:()=>hP,_getActiveRequests:()=>EP,_kill:()=>IP,_linkedBinding:()=>fP,_maxListeners:()=>HP,_preload_modules:()=>QP,_rawDebug:()=>lP,_startProfilerIdleNotifier:()=>BP,_stopProfilerIdleNotifier:()=>UP,_tickCallback:()=>wP,abort:()=>qP,addListener:()=>XP,allowedNodeEnvironmentFlags:()=>DP,arch:()=>WR,argv:()=>eP,argv0:()=>GP,assert:()=>bP,binding:()=>aP,chdir:()=>uP,config:()=>NP,cpuUsage:()=>Jm,cwd:()=>oP,debugPort:()=>$P,default:()=>oF,dlopen:()=>TP,domain:()=>pP,emit:()=>rF,emitWarning:()=>iP,env:()=>ZR,execArgv:()=>tP,execPath:()=>KP,exit:()=>OP,features:()=>AP,hasUncaughtExceptionCaptureCallback:()=>FP,hrtime:()=>Ym,kill:()=>vP,listeners:()=>sF,memoryUsage:()=>_P,moduleLoadList:()=>dP,nextTick:()=>JR,off:()=>eF,on:()=>Ss,once:()=>ZP,openStdin:()=>SP,pid:()=>VP,platform:()=>XR,ppid:()=>jP,prependListener:()=>iF,prependOnceListener:()=>aF,reallyExit:()=>yP,release:()=>cP,removeAllListeners:()=>nF,removeListener:()=>tF,resourceUsage:()=>gP,setSourceMapsEnabled:()=>YP,setUncaughtExceptionCaptureCallback:()=>PP,stderr:()=>MP,stdin:()=>xP,stdout:()=>kP,title:()=>zR,umask:()=>sP,uptime:()=>JP,version:()=>nP,versions:()=>rP});function Zy(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function jH(){!hl||!tc||(hl=!1,tc.length?Os=tc.concat(Os):Qm=-1,Os.length&&YR())}function YR(){if(!hl){var e=setTimeout(jH,0);hl=!0;for(var t=Os.length;t;){for(tc=Os,Os=[];++Qm1)for(var n=1;n{"use strict";m();T();N();Os=[],hl=!1,Qm=-1;HR.prototype.run=function(){this.fun.apply(null,this.array)};zR="browser",WR="x64",XR="browser",ZR={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},eP=["/usr/bin/node"],tP=[],nP="v16.8.0",rP={},iP=function(e,t){console.warn((t?t+": ":"")+e)},aP=function(e){Zy("binding")},sP=function(e){return 0},oP=function(){return"/"},uP=function(e){},cP={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};lP=br,dP=[];pP={},mP=!1,NP={};yP=br,IP=br,Jm=function(){return{}},gP=Jm,_P=Jm,vP=br,OP=br,SP=br,DP={};AP={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},RP=br,PP=br;wP=br,LP=br,CP=br,BP=br,UP=br,kP=void 0,MP=void 0,xP=void 0,qP=br,VP=2,jP=1,KP="/bin/usr/node",$P=9229,GP="node",QP=[],YP=br,fu={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};fu.now===void 0&&(Wy=Date.now(),fu.timing&&fu.timing.navigationStart&&(Wy=fu.timing.navigationStart),fu.now=()=>Date.now()-Wy);Xy=1e9;Ym.bigint=function(e){var t=Ym(e);return typeof BigInt=="undefined"?t[0]*Xy+t[1]:BigInt(t[0]*Xy)+BigInt(t[1])};HP=10,zP={},WP=0;XP=Ss,ZP=Ss,eF=Ss,tF=Ss,nF=Ss,rF=br,iF=Ss,aF=Ss;oF={version:nP,versions:rP,arch:WR,platform:XR,release:cP,_rawDebug:lP,moduleLoadList:dP,binding:aP,_linkedBinding:fP,_events:zP,_eventsCount:WP,_maxListeners:HP,on:Ss,addListener:XP,once:ZP,off:eF,removeListener:tF,removeAllListeners:nF,emit:rF,prependListener:iF,prependOnceListener:aF,listeners:sF,domain:pP,_exiting:mP,config:NP,dlopen:TP,uptime:JP,_getActiveRequests:EP,_getActiveHandles:hP,reallyExit:yP,_kill:IP,cpuUsage:Jm,resourceUsage:gP,memoryUsage:_P,kill:vP,exit:OP,openStdin:SP,allowedNodeEnvironmentFlags:DP,assert:bP,features:AP,_fatalExceptions:RP,setUncaughtExceptionCaptureCallback:PP,hasUncaughtExceptionCaptureCallback:FP,emitWarning:iP,nextTick:JR,_tickCallback:wP,_debugProcess:LP,_debugEnd:CP,_startProfilerIdleNotifier:BP,_stopProfilerIdleNotifier:UP,stdout:kP,stdin:xP,stderr:MP,abort:qP,umask:sP,chdir:uP,cwd:oP,env:ZR,title:zR,argv:eP,execArgv:tP,pid:VP,ppid:jP,execPath:KP,debugPort:$P,hrtime:Ym,argv0:GP,_preload_modules:QP,setSourceMapsEnabled:YP}});var N=Zu(()=>{"use strict";uF()});function KH(){if(cF)return Qd;cF=!0,Qd.byteLength=u,Qd.toByteArray=d,Qd.fromByteArray=I;for(var e=[],t=[],n=typeof Uint8Array!="undefined"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=r.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var U=v.indexOf("=");U===-1&&(U=A);var j=U===A?0:4-U%4;return[U,j]}function u(v){var A=o(v),U=A[0],j=A[1];return(U+j)*3/4-j}function l(v,A,U){return(A+U)*3/4-U}function d(v){var A,U=o(v),j=U[0],Q=U[1],ee=new n(l(v,j,Q)),ne=0,pe=Q>0?j-4:j,le;for(le=0;le>16&255,ee[ne++]=A>>8&255,ee[ne++]=A&255;return Q===2&&(A=t[v.charCodeAt(le)]<<2|t[v.charCodeAt(le+1)]>>4,ee[ne++]=A&255),Q===1&&(A=t[v.charCodeAt(le)]<<10|t[v.charCodeAt(le+1)]<<4|t[v.charCodeAt(le+2)]>>2,ee[ne++]=A>>8&255,ee[ne++]=A&255),ee}function p(v){return e[v>>18&63]+e[v>>12&63]+e[v>>6&63]+e[v&63]}function E(v,A,U){for(var j,Q=[],ee=A;eepe?pe:ne+ee));return j===1?(A=v[U-1],Q.push(e[A>>2]+e[A<<4&63]+"==")):j===2&&(A=(v[U-2]<<8)+v[U-1],Q.push(e[A>>10]+e[A>>4&63]+e[A<<2&63]+"=")),Q.join("")}return Qd}function $H(){if(lF)return Hm;lF=!0;return Hm.read=function(e,t,n,r,i){var a,o,u=i*8-r-1,l=(1<>1,p=-7,E=n?i-1:0,I=n?-1:1,v=e[t+E];for(E+=I,a=v&(1<<-p)-1,v>>=-p,p+=u;p>0;a=a*256+e[t+E],E+=I,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=r;p>0;o=o*256+e[t+E],E+=I,p-=8);if(a===0)a=1-d;else{if(a===l)return o?NaN:(v?-1:1)*(1/0);o=o+Math.pow(2,r),a=a-d}return(v?-1:1)*o*Math.pow(2,a-r)},Hm.write=function(e,t,n,r,i,a){var o,u,l,d=a*8-i-1,p=(1<>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:a-1,A=r?1:-1,U=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+E>=1?t+=I/l:t+=I*Math.pow(2,1-E),t*l>=2&&(o++,l/=2),o+E>=p?(u=0,o=p):o+E>=1?(u=(t*l-1)*Math.pow(2,i),o=o+E):(u=t*Math.pow(2,E-1)*Math.pow(2,i),o=0));i>=8;e[n+v]=u&255,v+=A,u/=256,i-=8);for(o=o<0;e[n+v]=o&255,v+=A,o/=256,d-=8);e[n+v-A]|=U*128},Hm}function GH(){if(dF)return nc;dF=!0;let e=KH(),t=$H(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nc.Buffer=o,nc.SlowBuffer=Q,nc.INSPECT_MAX_BYTES=50;let r=2147483647;nc.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{let P=new Uint8Array(1),y={foo:function(){return 42}};return Object.setPrototypeOf(y,Uint8Array.prototype),Object.setPrototypeOf(P,y),P.foo()===42}catch(P){return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(P){if(P>r)throw new RangeError('The value "'+P+'" is invalid for option "size"');let y=new Uint8Array(P);return Object.setPrototypeOf(y,o.prototype),y}function o(P,y,_){if(typeof P=="number"){if(typeof y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(P)}return u(P,y,_)}o.poolSize=8192;function u(P,y,_){if(typeof P=="string")return E(P,y);if(ArrayBuffer.isView(P))return v(P);if(P==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P);if(qt(P,ArrayBuffer)||P&&qt(P.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(qt(P,SharedArrayBuffer)||P&&qt(P.buffer,SharedArrayBuffer)))return A(P,y,_);if(typeof P=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let B=P.valueOf&&P.valueOf();if(B!=null&&B!==P)return o.from(B,y,_);let K=U(P);if(K)return K;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof P[Symbol.toPrimitive]=="function")return o.from(P[Symbol.toPrimitive]("string"),y,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P)}o.from=function(P,y,_){return u(P,y,_)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(P){if(typeof P!="number")throw new TypeError('"size" argument must be of type number');if(P<0)throw new RangeError('The value "'+P+'" is invalid for option "size"')}function d(P,y,_){return l(P),P<=0?a(P):y!==void 0?typeof _=="string"?a(P).fill(y,_):a(P).fill(y):a(P)}o.alloc=function(P,y,_){return d(P,y,_)};function p(P){return l(P),a(P<0?0:j(P)|0)}o.allocUnsafe=function(P){return p(P)},o.allocUnsafeSlow=function(P){return p(P)};function E(P,y){if((typeof y!="string"||y==="")&&(y="utf8"),!o.isEncoding(y))throw new TypeError("Unknown encoding: "+y);let _=ee(P,y)|0,B=a(_),K=B.write(P,y);return K!==_&&(B=B.slice(0,K)),B}function I(P){let y=P.length<0?0:j(P.length)|0,_=a(y);for(let B=0;B=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return P|0}function Q(P){return+P!=P&&(P=0),o.alloc(+P)}o.isBuffer=function(y){return y!=null&&y._isBuffer===!0&&y!==o.prototype},o.compare=function(y,_){if(qt(y,Uint8Array)&&(y=o.from(y,y.offset,y.byteLength)),qt(_,Uint8Array)&&(_=o.from(_,_.offset,_.byteLength)),!o.isBuffer(y)||!o.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(y===_)return 0;let B=y.length,K=_.length;for(let te=0,ue=Math.min(B,K);teK.length?(o.isBuffer(ue)||(ue=o.from(ue)),ue.copy(K,te)):Uint8Array.prototype.set.call(K,ue,te);else if(o.isBuffer(ue))ue.copy(K,te);else throw new TypeError('"list" argument must be an Array of Buffers');te+=ue.length}return K};function ee(P,y){if(o.isBuffer(P))return P.length;if(ArrayBuffer.isView(P)||qt(P,ArrayBuffer))return P.byteLength;if(typeof P!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof P);let _=P.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&_===0)return 0;let K=!1;for(;;)switch(y){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return ms(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Ir(P).length;default:if(K)return B?-1:ms(P).length;y=(""+y).toLowerCase(),K=!0}}o.byteLength=ee;function ne(P,y,_){let B=!1;if((y===void 0||y<0)&&(y=0),y>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,y>>>=0,_<=y))return"";for(P||(P="utf8");;)switch(P){case"hex":return nr(this,y,_);case"utf8":case"utf-8":return un(this,y,_);case"ascii":return an(this,y,_);case"latin1":case"binary":return kr(this,y,_);case"base64":return rn(this,y,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return En(this,y,_);default:if(B)throw new TypeError("Unknown encoding: "+P);P=(P+"").toLowerCase(),B=!0}}o.prototype._isBuffer=!0;function pe(P,y,_){let B=P[y];P[y]=P[_],P[_]=B}o.prototype.swap16=function(){let y=this.length;if(y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;__&&(y+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(y,_,B,K,te){if(qt(y,Uint8Array)&&(y=o.from(y,y.offset,y.byteLength)),!o.isBuffer(y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof y);if(_===void 0&&(_=0),B===void 0&&(B=y?y.length:0),K===void 0&&(K=0),te===void 0&&(te=this.length),_<0||B>y.length||K<0||te>this.length)throw new RangeError("out of range index");if(K>=te&&_>=B)return 0;if(K>=te)return-1;if(_>=B)return 1;if(_>>>=0,B>>>=0,K>>>=0,te>>>=0,this===y)return 0;let ue=te-K,Tt=B-_,hn=Math.min(ue,Tt),cn=this.slice(K,te),vn=y.slice(_,B);for(let sn=0;sn2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,gr(_)&&(_=K?0:P.length-1),_<0&&(_=P.length+_),_>=P.length){if(K)return-1;_=P.length-1}else if(_<0)if(K)_=0;else return-1;if(typeof y=="string"&&(y=o.from(y,B)),o.isBuffer(y))return y.length===0?-1:Ae(P,y,_,B,K);if(typeof y=="number")return y=y&255,typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(P,y,_):Uint8Array.prototype.lastIndexOf.call(P,y,_):Ae(P,[y],_,B,K);throw new TypeError("val must be string, number or Buffer")}function Ae(P,y,_,B,K){let te=1,ue=P.length,Tt=y.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(P.length<2||y.length<2)return-1;te=2,ue/=2,Tt/=2,_/=2}function hn(vn,sn){return te===1?vn[sn]:vn.readUInt16BE(sn*te)}let cn;if(K){let vn=-1;for(cn=_;cnue&&(_=ue-Tt),cn=_;cn>=0;cn--){let vn=!0;for(let sn=0;snK&&(B=K)):B=K;let te=y.length;B>te/2&&(B=te/2);let ue;for(ue=0;ue>>0,isFinite(B)?(B=B>>>0,K===void 0&&(K="utf8")):(K=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let te=this.length-_;if((B===void 0||B>te)&&(B=te),y.length>0&&(B<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");let ue=!1;for(;;)switch(K){case"hex":return Me(this,y,_,B);case"utf8":case"utf-8":return Ze(this,y,_,B);case"ascii":case"latin1":case"binary":return Z(this,y,_,B);case"base64":return ve(this,y,_,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,y,_,B);default:if(ue)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),ue=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function rn(P,y,_){return y===0&&_===P.length?e.fromByteArray(P):e.fromByteArray(P.slice(y,_))}function un(P,y,_){_=Math.min(P.length,_);let B=[],K=y;for(;K<_;){let te=P[K],ue=null,Tt=te>239?4:te>223?3:te>191?2:1;if(K+Tt<=_){let hn,cn,vn,sn;switch(Tt){case 1:te<128&&(ue=te);break;case 2:hn=P[K+1],(hn&192)===128&&(sn=(te&31)<<6|hn&63,sn>127&&(ue=sn));break;case 3:hn=P[K+1],cn=P[K+2],(hn&192)===128&&(cn&192)===128&&(sn=(te&15)<<12|(hn&63)<<6|cn&63,sn>2047&&(sn<55296||sn>57343)&&(ue=sn));break;case 4:hn=P[K+1],cn=P[K+2],vn=P[K+3],(hn&192)===128&&(cn&192)===128&&(vn&192)===128&&(sn=(te&15)<<18|(hn&63)<<12|(cn&63)<<6|vn&63,sn>65535&&sn<1114112&&(ue=sn))}}ue===null?(ue=65533,Tt=1):ue>65535&&(ue-=65536,B.push(ue>>>10&1023|55296),ue=56320|ue&1023),B.push(ue),K+=Tt}return xt(B)}let In=4096;function xt(P){let y=P.length;if(y<=In)return String.fromCharCode.apply(String,P);let _="",B=0;for(;BB)&&(_=B);let K="";for(let te=y;te<_;++te)K+=ju[P[te]];return K}function En(P,y,_){let B=P.slice(y,_),K="";for(let te=0;teB&&(y=B),_<0?(_+=B,_<0&&(_=0)):_>B&&(_=B),__)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y],te=1,ue=0;for(;++ue<_&&(te*=256);)K+=this[y+ue]*te;return K},o.prototype.readUintBE=o.prototype.readUIntBE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y+--_],te=1;for(;_>0&&(te*=256);)K+=this[y+--_]*te;return K},o.prototype.readUint8=o.prototype.readUInt8=function(y,_){return y=y>>>0,_||Ht(y,1,this.length),this[y]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(y,_){return y=y>>>0,_||Ht(y,2,this.length),this[y]|this[y+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(y,_){return y=y>>>0,_||Ht(y,2,this.length),this[y]<<8|this[y+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+this[y+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]*16777216+(this[y+1]<<16|this[y+2]<<8|this[y+3])},o.prototype.readBigUInt64LE=ka(function(y){y=y>>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=_+this[++y]*ln(2,8)+this[++y]*ln(2,16)+this[++y]*ln(2,24),te=this[++y]+this[++y]*ln(2,8)+this[++y]*ln(2,16)+B*ln(2,24);return BigInt(K)+(BigInt(te)<>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=_*ln(2,24)+this[++y]*ln(2,16)+this[++y]*ln(2,8)+this[++y],te=this[++y]*ln(2,24)+this[++y]*ln(2,16)+this[++y]*ln(2,8)+B;return(BigInt(K)<>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y],te=1,ue=0;for(;++ue<_&&(te*=256);)K+=this[y+ue]*te;return te*=128,K>=te&&(K-=Math.pow(2,8*_)),K},o.prototype.readIntBE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=_,te=1,ue=this[y+--K];for(;K>0&&(te*=256);)ue+=this[y+--K]*te;return te*=128,ue>=te&&(ue-=Math.pow(2,8*_)),ue},o.prototype.readInt8=function(y,_){return y=y>>>0,_||Ht(y,1,this.length),this[y]&128?(255-this[y]+1)*-1:this[y]},o.prototype.readInt16LE=function(y,_){y=y>>>0,_||Ht(y,2,this.length);let B=this[y]|this[y+1]<<8;return B&32768?B|4294901760:B},o.prototype.readInt16BE=function(y,_){y=y>>>0,_||Ht(y,2,this.length);let B=this[y+1]|this[y]<<8;return B&32768?B|4294901760:B},o.prototype.readInt32LE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},o.prototype.readInt32BE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},o.prototype.readBigInt64LE=ka(function(y){y=y>>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=this[y+4]+this[y+5]*ln(2,8)+this[y+6]*ln(2,16)+(B<<24);return(BigInt(K)<>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=(_<<24)+this[++y]*ln(2,16)+this[++y]*ln(2,8)+this[++y];return(BigInt(K)<>>0,_||Ht(y,4,this.length),t.read(this,y,!0,23,4)},o.prototype.readFloatBE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),t.read(this,y,!1,23,4)},o.prototype.readDoubleLE=function(y,_){return y=y>>>0,_||Ht(y,8,this.length),t.read(this,y,!0,52,8)},o.prototype.readDoubleBE=function(y,_){return y=y>>>0,_||Ht(y,8,this.length),t.read(this,y,!1,52,8)};function Ln(P,y,_,B,K,te){if(!o.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(y>K||yP.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(y,_,B,K){if(y=+y,_=_>>>0,B=B>>>0,!K){let Tt=Math.pow(2,8*B)-1;Ln(this,y,_,B,Tt,0)}let te=1,ue=0;for(this[_]=y&255;++ue>>0,B=B>>>0,!K){let Tt=Math.pow(2,8*B)-1;Ln(this,y,_,B,Tt,0)}let te=B-1,ue=1;for(this[_+te]=y&255;--te>=0&&(ue*=256);)this[_+te]=y/ue&255;return _+B},o.prototype.writeUint8=o.prototype.writeUInt8=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,1,255,0),this[_]=y&255,_+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,65535,0),this[_]=y&255,this[_+1]=y>>>8,_+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,65535,0),this[_]=y>>>8,this[_+1]=y&255,_+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,4294967295,0),this[_+3]=y>>>24,this[_+2]=y>>>16,this[_+1]=y>>>8,this[_]=y&255,_+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,4294967295,0),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4};function ae(P,y,_,B,K){Bt(y,B,K,P,_,7);let te=Number(y&BigInt(4294967295));P[_++]=te,te=te>>8,P[_++]=te,te=te>>8,P[_++]=te,te=te>>8,P[_++]=te;let ue=Number(y>>BigInt(32)&BigInt(4294967295));return P[_++]=ue,ue=ue>>8,P[_++]=ue,ue=ue>>8,P[_++]=ue,ue=ue>>8,P[_++]=ue,_}function De(P,y,_,B,K){Bt(y,B,K,P,_,7);let te=Number(y&BigInt(4294967295));P[_+7]=te,te=te>>8,P[_+6]=te,te=te>>8,P[_+5]=te,te=te>>8,P[_+4]=te;let ue=Number(y>>BigInt(32)&BigInt(4294967295));return P[_+3]=ue,ue=ue>>8,P[_+2]=ue,ue=ue>>8,P[_+1]=ue,ue=ue>>8,P[_]=ue,_+8}o.prototype.writeBigUInt64LE=ka(function(y,_=0){return ae(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=ka(function(y,_=0){return De(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(y,_,B,K){if(y=+y,_=_>>>0,!K){let hn=Math.pow(2,8*B-1);Ln(this,y,_,B,hn-1,-hn)}let te=0,ue=1,Tt=0;for(this[_]=y&255;++te>0)-Tt&255;return _+B},o.prototype.writeIntBE=function(y,_,B,K){if(y=+y,_=_>>>0,!K){let hn=Math.pow(2,8*B-1);Ln(this,y,_,B,hn-1,-hn)}let te=B-1,ue=1,Tt=0;for(this[_+te]=y&255;--te>=0&&(ue*=256);)y<0&&Tt===0&&this[_+te+1]!==0&&(Tt=1),this[_+te]=(y/ue>>0)-Tt&255;return _+B},o.prototype.writeInt8=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,1,127,-128),y<0&&(y=255+y+1),this[_]=y&255,_+1},o.prototype.writeInt16LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,32767,-32768),this[_]=y&255,this[_+1]=y>>>8,_+2},o.prototype.writeInt16BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,32767,-32768),this[_]=y>>>8,this[_+1]=y&255,_+2},o.prototype.writeInt32LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,2147483647,-2147483648),this[_]=y&255,this[_+1]=y>>>8,this[_+2]=y>>>16,this[_+3]=y>>>24,_+4},o.prototype.writeInt32BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4},o.prototype.writeBigInt64LE=ka(function(y,_=0){return ae(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=ka(function(y,_=0){return De(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ge(P,y,_,B,K,te){if(_+B>P.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function Le(P,y,_,B,K){return y=+y,_=_>>>0,K||ge(P,y,_,4),t.write(P,y,_,B,23,4),_+4}o.prototype.writeFloatLE=function(y,_,B){return Le(this,y,_,!0,B)},o.prototype.writeFloatBE=function(y,_,B){return Le(this,y,_,!1,B)};function St(P,y,_,B,K){return y=+y,_=_>>>0,K||ge(P,y,_,8),t.write(P,y,_,B,52,8),_+8}o.prototype.writeDoubleLE=function(y,_,B){return St(this,y,_,!0,B)},o.prototype.writeDoubleBE=function(y,_,B){return St(this,y,_,!1,B)},o.prototype.copy=function(y,_,B,K){if(!o.isBuffer(y))throw new TypeError("argument should be a Buffer");if(B||(B=0),!K&&K!==0&&(K=this.length),_>=y.length&&(_=y.length),_||(_=0),K>0&&K=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),y.length-_>>0,B=B===void 0?this.length:B>>>0,y||(y=0);let te;if(typeof y=="number")for(te=_;teln(2,32)?K=xe(String(_)):typeof _=="bigint"&&(K=String(_),(_>ln(BigInt(2),BigInt(32))||_<-ln(BigInt(2),BigInt(32)))&&(K=xe(K)),K+="n"),B+=` It must be ${y}. Received ${K}`,B},RangeError);function xe(P){let y="",_=P.length,B=P[0]==="-"?1:0;for(;_>=B+4;_-=3)y=`_${P.slice(_-3,_)}${y}`;return`${P.slice(0,_)}${y}`}function He(P,y,_){it(y,"offset"),(P[y]===void 0||P[y+_]===void 0)&&Pt(y,P.length-(_+1))}function Bt(P,y,_,B,K,te){if(P>_||P3?y===0||y===BigInt(0)?Tt=`>= 0${ue} and < 2${ue} ** ${(te+1)*8}${ue}`:Tt=`>= -(2${ue} ** ${(te+1)*8-1}${ue}) and < 2 ** ${(te+1)*8-1}${ue}`:Tt=`>= ${y}${ue} and <= ${_}${ue}`,new Y.ERR_OUT_OF_RANGE("value",Tt,P)}He(B,K,te)}function it(P,y){if(typeof P!="number")throw new Y.ERR_INVALID_ARG_TYPE(y,"number",P)}function Pt(P,y,_){throw Math.floor(P)!==P?(it(P,_),new Y.ERR_OUT_OF_RANGE(_||"offset","an integer",P)):y<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${y}`,P)}let ps=/[^+/0-9A-Za-z-_]/g;function Yr(P){if(P=P.split("=")[0],P=P.trim().replace(ps,""),P.length<2)return"";for(;P.length%4!==0;)P=P+"=";return P}function ms(P,y){y=y||1/0;let _,B=P.length,K=null,te=[];for(let ue=0;ue55295&&_<57344){if(!K){if(_>56319){(y-=3)>-1&&te.push(239,191,189);continue}else if(ue+1===B){(y-=3)>-1&&te.push(239,191,189);continue}K=_;continue}if(_<56320){(y-=3)>-1&&te.push(239,191,189),K=_;continue}_=(K-55296<<10|_-56320)+65536}else K&&(y-=3)>-1&&te.push(239,191,189);if(K=null,_<128){if((y-=1)<0)break;te.push(_)}else if(_<2048){if((y-=2)<0)break;te.push(_>>6|192,_&63|128)}else if(_<65536){if((y-=3)<0)break;te.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((y-=4)<0)break;te.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return te}function rl(P){let y=[];for(let _=0;_>8,K=_%256,te.push(K),te.push(B);return te}function Ir(P){return e.toByteArray(Yr(P))}function ui(P,y,_,B){let K;for(K=0;K=y.length||K>=P.length);++K)y[K+_]=P[K];return K}function qt(P,y){return P instanceof y||P!=null&&P.constructor!=null&&P.constructor.name!=null&&P.constructor.name===y.name}function gr(P){return P!==P}let ju=function(){let P="0123456789abcdef",y=new Array(256);for(let _=0;_<16;++_){let B=_*16;for(let K=0;K<16;++K)y[B+K]=P[_]+P[K]}return y}();function ka(P){return typeof BigInt=="undefined"?Ku:P}function Ku(){throw new Error("BigInt not supported")}return nc}var Qd,cF,Hm,lF,nc,dF,rc,D,Vpe,jpe,fF=Zu(()=>{"use strict";m();T();N();Qd={},cF=!1;Hm={},lF=!1;nc={},dF=!1;rc=GH();rc.Buffer;rc.SlowBuffer;rc.INSPECT_MAX_BYTES;rc.kMaxLength;D=rc.Buffer,Vpe=rc.INSPECT_MAX_BYTES,jpe=rc.kMaxLength});var T=Zu(()=>{"use strict";fF()});var pF=w(yl=>{"use strict";m();T();N();Object.defineProperty(yl,"__esModule",{value:!0});yl.versionInfo=yl.version=void 0;var QH="16.9.0";yl.version=QH;var YH=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});yl.versionInfo=YH});var Vr=w(eI=>{"use strict";m();T();N();Object.defineProperty(eI,"__esModule",{value:!0});eI.devAssert=JH;function JH(e,t){if(!!!e)throw new Error(t)}});var zm=w(tI=>{"use strict";m();T();N();Object.defineProperty(tI,"__esModule",{value:!0});tI.isPromise=HH;function HH(e){return typeof(e==null?void 0:e.then)=="function"}});var Va=w(nI=>{"use strict";m();T();N();Object.defineProperty(nI,"__esModule",{value:!0});nI.isObjectLike=zH;function zH(e){return typeof e=="object"&&e!==null}});var Ar=w(rI=>{"use strict";m();T();N();Object.defineProperty(rI,"__esModule",{value:!0});rI.invariant=WH;function WH(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}});var Wm=w(iI=>{"use strict";m();T();N();Object.defineProperty(iI,"__esModule",{value:!0});iI.getLocation=e3;var XH=Ar(),ZH=/\r\n|[\n\r]/g;function e3(e,t){let n=0,r=1;for(let i of e.body.matchAll(ZH)){if(typeof i.index=="number"||(0,XH.invariant)(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}});var aI=w(Xm=>{"use strict";m();T();N();Object.defineProperty(Xm,"__esModule",{value:!0});Xm.printLocation=n3;Xm.printSourceLocation=NF;var t3=Wm();function n3(e){return NF(e.source,(0,t3.getLocation)(e.source,e.start))}function NF(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,u=t.line===1?n:0,l=t.column+u,d=`${e.name}:${o}:${l} +"use strict";var shim=(()=>{var jH=Object.create;var Gd=Object.defineProperty,KH=Object.defineProperties,$H=Object.getOwnPropertyDescriptor,GH=Object.getOwnPropertyDescriptors,QH=Object.getOwnPropertyNames,Km=Object.getOwnPropertySymbols,YH=Object.getPrototypeOf,Yy=Object.prototype.hasOwnProperty,$R=Object.prototype.propertyIsEnumerable;var ln=Math.pow,Qy=(e,t,n)=>t in e?Gd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,k=(e,t)=>{for(var n in t||(t={}))Yy.call(t,n)&&Qy(e,n,t[n]);if(Km)for(var n of Km(t))$R.call(t,n)&&Qy(e,n,t[n]);return e},$=(e,t)=>KH(e,GH(t));var GR=(e,t)=>{var n={};for(var r in e)Yy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Km)for(var r of Km(e))t.indexOf(r)<0&&$R.call(e,r)&&(n[r]=e[r]);return n};var Zu=(e,t)=>()=>(e&&(t=e(e=0)),t);var F=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$m=(e,t)=>{for(var n in t)Gd(e,n,{get:t[n],enumerable:!0})},QR=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of QH(t))!Yy.call(e,i)&&i!==n&&Gd(e,i,{get:()=>t[i],enumerable:!(r=$H(t,i))||r.enumerable});return e};var Ni=(e,t,n)=>(n=e!=null?jH(YH(e)):{},QR(t||!e||!e.__esModule?Gd(n,"default",{value:e,enumerable:!0}):n,e)),Gm=e=>QR(Gd({},"__esModule",{value:!0}),e);var g=(e,t,n)=>(Qy(e,typeof t!="symbol"?t+"":t,n),n),Jy=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Hy=(e,t,n)=>(Jy(e,t,"read from private field"),n?n.call(e):t.get(e)),ec=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},zy=(e,t,n,r)=>(Jy(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var El=(e,t,n)=>(Jy(e,t,"access private method"),n);var wi=(e,t,n)=>new Promise((r,i)=>{var a=l=>{try{u(n.next(l))}catch(d){i(d)}},o=l=>{try{u(n.throw(l))}catch(d){i(d)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,o);u((n=n.apply(e,t)).next())});var m=Zu(()=>{"use strict"});var S={};$m(S,{_debugEnd:()=>CP,_debugProcess:()=>LP,_events:()=>zP,_eventsCount:()=>WP,_exiting:()=>mP,_fatalExceptions:()=>RP,_getActiveHandles:()=>hP,_getActiveRequests:()=>EP,_kill:()=>IP,_linkedBinding:()=>fP,_maxListeners:()=>HP,_preload_modules:()=>QP,_rawDebug:()=>lP,_startProfilerIdleNotifier:()=>BP,_stopProfilerIdleNotifier:()=>UP,_tickCallback:()=>wP,abort:()=>qP,addListener:()=>XP,allowedNodeEnvironmentFlags:()=>DP,arch:()=>WR,argv:()=>eP,argv0:()=>GP,assert:()=>bP,binding:()=>aP,chdir:()=>uP,config:()=>NP,cpuUsage:()=>Jm,cwd:()=>oP,debugPort:()=>$P,default:()=>oF,dlopen:()=>TP,domain:()=>pP,emit:()=>rF,emitWarning:()=>iP,env:()=>ZR,execArgv:()=>tP,execPath:()=>KP,exit:()=>OP,features:()=>AP,hasUncaughtExceptionCaptureCallback:()=>FP,hrtime:()=>Ym,kill:()=>vP,listeners:()=>sF,memoryUsage:()=>_P,moduleLoadList:()=>dP,nextTick:()=>JR,off:()=>eF,on:()=>Ss,once:()=>ZP,openStdin:()=>SP,pid:()=>VP,platform:()=>XR,ppid:()=>jP,prependListener:()=>iF,prependOnceListener:()=>aF,reallyExit:()=>yP,release:()=>cP,removeAllListeners:()=>nF,removeListener:()=>tF,resourceUsage:()=>gP,setSourceMapsEnabled:()=>YP,setUncaughtExceptionCaptureCallback:()=>PP,stderr:()=>MP,stdin:()=>xP,stdout:()=>kP,title:()=>zR,umask:()=>sP,uptime:()=>JP,version:()=>nP,versions:()=>rP});function Zy(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function JH(){!hl||!tc||(hl=!1,tc.length?Os=tc.concat(Os):Qm=-1,Os.length&&YR())}function YR(){if(!hl){var e=setTimeout(JH,0);hl=!0;for(var t=Os.length;t;){for(tc=Os,Os=[];++Qm1)for(var n=1;n{"use strict";m();T();N();Os=[],hl=!1,Qm=-1;HR.prototype.run=function(){this.fun.apply(null,this.array)};zR="browser",WR="x64",XR="browser",ZR={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},eP=["/usr/bin/node"],tP=[],nP="v16.8.0",rP={},iP=function(e,t){console.warn((t?t+": ":"")+e)},aP=function(e){Zy("binding")},sP=function(e){return 0},oP=function(){return"/"},uP=function(e){},cP={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};lP=br,dP=[];pP={},mP=!1,NP={};yP=br,IP=br,Jm=function(){return{}},gP=Jm,_P=Jm,vP=br,OP=br,SP=br,DP={};AP={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},RP=br,PP=br;wP=br,LP=br,CP=br,BP=br,UP=br,kP=void 0,MP=void 0,xP=void 0,qP=br,VP=2,jP=1,KP="/bin/usr/node",$P=9229,GP="node",QP=[],YP=br,fu={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};fu.now===void 0&&(Wy=Date.now(),fu.timing&&fu.timing.navigationStart&&(Wy=fu.timing.navigationStart),fu.now=()=>Date.now()-Wy);Xy=1e9;Ym.bigint=function(e){var t=Ym(e);return typeof BigInt=="undefined"?t[0]*Xy+t[1]:BigInt(t[0]*Xy)+BigInt(t[1])};HP=10,zP={},WP=0;XP=Ss,ZP=Ss,eF=Ss,tF=Ss,nF=Ss,rF=br,iF=Ss,aF=Ss;oF={version:nP,versions:rP,arch:WR,platform:XR,release:cP,_rawDebug:lP,moduleLoadList:dP,binding:aP,_linkedBinding:fP,_events:zP,_eventsCount:WP,_maxListeners:HP,on:Ss,addListener:XP,once:ZP,off:eF,removeListener:tF,removeAllListeners:nF,emit:rF,prependListener:iF,prependOnceListener:aF,listeners:sF,domain:pP,_exiting:mP,config:NP,dlopen:TP,uptime:JP,_getActiveRequests:EP,_getActiveHandles:hP,reallyExit:yP,_kill:IP,cpuUsage:Jm,resourceUsage:gP,memoryUsage:_P,kill:vP,exit:OP,openStdin:SP,allowedNodeEnvironmentFlags:DP,assert:bP,features:AP,_fatalExceptions:RP,setUncaughtExceptionCaptureCallback:PP,hasUncaughtExceptionCaptureCallback:FP,emitWarning:iP,nextTick:JR,_tickCallback:wP,_debugProcess:LP,_debugEnd:CP,_startProfilerIdleNotifier:BP,_stopProfilerIdleNotifier:UP,stdout:kP,stdin:xP,stderr:MP,abort:qP,umask:sP,chdir:uP,cwd:oP,env:ZR,title:zR,argv:eP,execArgv:tP,pid:VP,ppid:jP,execPath:KP,debugPort:$P,hrtime:Ym,argv0:GP,_preload_modules:QP,setSourceMapsEnabled:YP}});var N=Zu(()=>{"use strict";uF()});function HH(){if(cF)return Qd;cF=!0,Qd.byteLength=u,Qd.toByteArray=d,Qd.fromByteArray=I;for(var e=[],t=[],n=typeof Uint8Array!="undefined"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=r.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var U=v.indexOf("=");U===-1&&(U=A);var j=U===A?0:4-U%4;return[U,j]}function u(v){var A=o(v),U=A[0],j=A[1];return(U+j)*3/4-j}function l(v,A,U){return(A+U)*3/4-U}function d(v){var A,U=o(v),j=U[0],J=U[1],re=new n(l(v,j,J)),te=0,pe=J>0?j-4:j,Ne;for(Ne=0;Ne>16&255,re[te++]=A>>8&255,re[te++]=A&255;return J===2&&(A=t[v.charCodeAt(Ne)]<<2|t[v.charCodeAt(Ne+1)]>>4,re[te++]=A&255),J===1&&(A=t[v.charCodeAt(Ne)]<<10|t[v.charCodeAt(Ne+1)]<<4|t[v.charCodeAt(Ne+2)]>>2,re[te++]=A>>8&255,re[te++]=A&255),re}function p(v){return e[v>>18&63]+e[v>>12&63]+e[v>>6&63]+e[v&63]}function E(v,A,U){for(var j,J=[],re=A;repe?pe:te+re));return j===1?(A=v[U-1],J.push(e[A>>2]+e[A<<4&63]+"==")):j===2&&(A=(v[U-2]<<8)+v[U-1],J.push(e[A>>10]+e[A>>4&63]+e[A<<2&63]+"=")),J.join("")}return Qd}function zH(){if(lF)return Hm;lF=!0;return Hm.read=function(e,t,n,r,i){var a,o,u=i*8-r-1,l=(1<>1,p=-7,E=n?i-1:0,I=n?-1:1,v=e[t+E];for(E+=I,a=v&(1<<-p)-1,v>>=-p,p+=u;p>0;a=a*256+e[t+E],E+=I,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=r;p>0;o=o*256+e[t+E],E+=I,p-=8);if(a===0)a=1-d;else{if(a===l)return o?NaN:(v?-1:1)*(1/0);o=o+Math.pow(2,r),a=a-d}return(v?-1:1)*o*Math.pow(2,a-r)},Hm.write=function(e,t,n,r,i,a){var o,u,l,d=a*8-i-1,p=(1<>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:a-1,A=r?1:-1,U=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+E>=1?t+=I/l:t+=I*Math.pow(2,1-E),t*l>=2&&(o++,l/=2),o+E>=p?(u=0,o=p):o+E>=1?(u=(t*l-1)*Math.pow(2,i),o=o+E):(u=t*Math.pow(2,E-1)*Math.pow(2,i),o=0));i>=8;e[n+v]=u&255,v+=A,u/=256,i-=8);for(o=o<0;e[n+v]=o&255,v+=A,o/=256,d-=8);e[n+v-A]|=U*128},Hm}function WH(){if(dF)return nc;dF=!0;let e=HH(),t=zH(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nc.Buffer=o,nc.SlowBuffer=J,nc.INSPECT_MAX_BYTES=50;let r=2147483647;nc.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{let P=new Uint8Array(1),y={foo:function(){return 42}};return Object.setPrototypeOf(y,Uint8Array.prototype),Object.setPrototypeOf(P,y),P.foo()===42}catch(P){return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(P){if(P>r)throw new RangeError('The value "'+P+'" is invalid for option "size"');let y=new Uint8Array(P);return Object.setPrototypeOf(y,o.prototype),y}function o(P,y,_){if(typeof P=="number"){if(typeof y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(P)}return u(P,y,_)}o.poolSize=8192;function u(P,y,_){if(typeof P=="string")return E(P,y);if(ArrayBuffer.isView(P))return v(P);if(P==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P);if(qt(P,ArrayBuffer)||P&&qt(P.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(qt(P,SharedArrayBuffer)||P&&qt(P.buffer,SharedArrayBuffer)))return A(P,y,_);if(typeof P=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let B=P.valueOf&&P.valueOf();if(B!=null&&B!==P)return o.from(B,y,_);let K=U(P);if(K)return K;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof P[Symbol.toPrimitive]=="function")return o.from(P[Symbol.toPrimitive]("string"),y,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P)}o.from=function(P,y,_){return u(P,y,_)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(P){if(typeof P!="number")throw new TypeError('"size" argument must be of type number');if(P<0)throw new RangeError('The value "'+P+'" is invalid for option "size"')}function d(P,y,_){return l(P),P<=0?a(P):y!==void 0?typeof _=="string"?a(P).fill(y,_):a(P).fill(y):a(P)}o.alloc=function(P,y,_){return d(P,y,_)};function p(P){return l(P),a(P<0?0:j(P)|0)}o.allocUnsafe=function(P){return p(P)},o.allocUnsafeSlow=function(P){return p(P)};function E(P,y){if((typeof y!="string"||y==="")&&(y="utf8"),!o.isEncoding(y))throw new TypeError("Unknown encoding: "+y);let _=re(P,y)|0,B=a(_),K=B.write(P,y);return K!==_&&(B=B.slice(0,K)),B}function I(P){let y=P.length<0?0:j(P.length)|0,_=a(y);for(let B=0;B=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return P|0}function J(P){return+P!=P&&(P=0),o.alloc(+P)}o.isBuffer=function(y){return y!=null&&y._isBuffer===!0&&y!==o.prototype},o.compare=function(y,_){if(qt(y,Uint8Array)&&(y=o.from(y,y.offset,y.byteLength)),qt(_,Uint8Array)&&(_=o.from(_,_.offset,_.byteLength)),!o.isBuffer(y)||!o.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(y===_)return 0;let B=y.length,K=_.length;for(let ee=0,ue=Math.min(B,K);eeK.length?(o.isBuffer(ue)||(ue=o.from(ue)),ue.copy(K,ee)):Uint8Array.prototype.set.call(K,ue,ee);else if(o.isBuffer(ue))ue.copy(K,ee);else throw new TypeError('"list" argument must be an Array of Buffers');ee+=ue.length}return K};function re(P,y){if(o.isBuffer(P))return P.length;if(ArrayBuffer.isView(P)||qt(P,ArrayBuffer))return P.byteLength;if(typeof P!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof P);let _=P.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&_===0)return 0;let K=!1;for(;;)switch(y){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return ms(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Ir(P).length;default:if(K)return B?-1:ms(P).length;y=(""+y).toLowerCase(),K=!0}}o.byteLength=re;function te(P,y,_){let B=!1;if((y===void 0||y<0)&&(y=0),y>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,y>>>=0,_<=y))return"";for(P||(P="utf8");;)switch(P){case"hex":return nr(this,y,_);case"utf8":case"utf-8":return En(this,y,_);case"ascii":return rn(this,y,_);case"latin1":case"binary":return kr(this,y,_);case"base64":return on(this,y,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return hn(this,y,_);default:if(B)throw new TypeError("Unknown encoding: "+P);P=(P+"").toLowerCase(),B=!0}}o.prototype._isBuffer=!0;function pe(P,y,_){let B=P[y];P[y]=P[_],P[_]=B}o.prototype.swap16=function(){let y=this.length;if(y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;__&&(y+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(y,_,B,K,ee){if(qt(y,Uint8Array)&&(y=o.from(y,y.offset,y.byteLength)),!o.isBuffer(y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof y);if(_===void 0&&(_=0),B===void 0&&(B=y?y.length:0),K===void 0&&(K=0),ee===void 0&&(ee=this.length),_<0||B>y.length||K<0||ee>this.length)throw new RangeError("out of range index");if(K>=ee&&_>=B)return 0;if(K>=ee)return-1;if(_>=B)return 1;if(_>>>=0,B>>>=0,K>>>=0,ee>>>=0,this===y)return 0;let ue=ee-K,Tt=B-_,yn=Math.min(ue,Tt),cn=this.slice(K,ee),vn=y.slice(_,B);for(let an=0;an2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,gr(_)&&(_=K?0:P.length-1),_<0&&(_=P.length+_),_>=P.length){if(K)return-1;_=P.length-1}else if(_<0)if(K)_=0;else return-1;if(typeof y=="string"&&(y=o.from(y,B)),o.isBuffer(y))return y.length===0?-1:Ie(P,y,_,B,K);if(typeof y=="number")return y=y&255,typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(P,y,_):Uint8Array.prototype.lastIndexOf.call(P,y,_):Ie(P,[y],_,B,K);throw new TypeError("val must be string, number or Buffer")}function Ie(P,y,_,B,K){let ee=1,ue=P.length,Tt=y.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(P.length<2||y.length<2)return-1;ee=2,ue/=2,Tt/=2,_/=2}function yn(vn,an){return ee===1?vn[an]:vn.readUInt16BE(an*ee)}let cn;if(K){let vn=-1;for(cn=_;cnue&&(_=ue-Tt),cn=_;cn>=0;cn--){let vn=!0;for(let an=0;anK&&(B=K)):B=K;let ee=y.length;B>ee/2&&(B=ee/2);let ue;for(ue=0;ue>>0,isFinite(B)?(B=B>>>0,K===void 0&&(K="utf8")):(K=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let ee=this.length-_;if((B===void 0||B>ee)&&(B=ee),y.length>0&&(B<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");let ue=!1;for(;;)switch(K){case"hex":return Ue(this,y,_,B);case"utf8":case"utf-8":return He(this,y,_,B);case"ascii":case"latin1":case"binary":return W(this,y,_,B);case"base64":return Oe(this,y,_,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Et(this,y,_,B);default:if(ue)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),ue=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function on(P,y,_){return y===0&&_===P.length?e.fromByteArray(P):e.fromByteArray(P.slice(y,_))}function En(P,y,_){_=Math.min(P.length,_);let B=[],K=y;for(;K<_;){let ee=P[K],ue=null,Tt=ee>239?4:ee>223?3:ee>191?2:1;if(K+Tt<=_){let yn,cn,vn,an;switch(Tt){case 1:ee<128&&(ue=ee);break;case 2:yn=P[K+1],(yn&192)===128&&(an=(ee&31)<<6|yn&63,an>127&&(ue=an));break;case 3:yn=P[K+1],cn=P[K+2],(yn&192)===128&&(cn&192)===128&&(an=(ee&15)<<12|(yn&63)<<6|cn&63,an>2047&&(an<55296||an>57343)&&(ue=an));break;case 4:yn=P[K+1],cn=P[K+2],vn=P[K+3],(yn&192)===128&&(cn&192)===128&&(vn&192)===128&&(an=(ee&15)<<18|(yn&63)<<12|(cn&63)<<6|vn&63,an>65535&&an<1114112&&(ue=an))}}ue===null?(ue=65533,Tt=1):ue>65535&&(ue-=65536,B.push(ue>>>10&1023|55296),ue=56320|ue&1023),B.push(ue),K+=Tt}return Pt(B)}let un=4096;function Pt(P){let y=P.length;if(y<=un)return String.fromCharCode.apply(String,P);let _="",B=0;for(;BB)&&(_=B);let K="";for(let ee=y;ee<_;++ee)K+=ju[P[ee]];return K}function hn(P,y,_){let B=P.slice(y,_),K="";for(let ee=0;eeB&&(y=B),_<0?(_+=B,_<0&&(_=0)):_>B&&(_=B),__)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y],ee=1,ue=0;for(;++ue<_&&(ee*=256);)K+=this[y+ue]*ee;return K},o.prototype.readUintBE=o.prototype.readUIntBE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y+--_],ee=1;for(;_>0&&(ee*=256);)K+=this[y+--_]*ee;return K},o.prototype.readUint8=o.prototype.readUInt8=function(y,_){return y=y>>>0,_||Ht(y,1,this.length),this[y]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(y,_){return y=y>>>0,_||Ht(y,2,this.length),this[y]|this[y+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(y,_){return y=y>>>0,_||Ht(y,2,this.length),this[y]<<8|this[y+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+this[y+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]*16777216+(this[y+1]<<16|this[y+2]<<8|this[y+3])},o.prototype.readBigUInt64LE=ka(function(y){y=y>>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Ft(y,this.length-8);let K=_+this[++y]*ln(2,8)+this[++y]*ln(2,16)+this[++y]*ln(2,24),ee=this[++y]+this[++y]*ln(2,8)+this[++y]*ln(2,16)+B*ln(2,24);return BigInt(K)+(BigInt(ee)<>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Ft(y,this.length-8);let K=_*ln(2,24)+this[++y]*ln(2,16)+this[++y]*ln(2,8)+this[++y],ee=this[++y]*ln(2,24)+this[++y]*ln(2,16)+this[++y]*ln(2,8)+B;return(BigInt(K)<>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y],ee=1,ue=0;for(;++ue<_&&(ee*=256);)K+=this[y+ue]*ee;return ee*=128,K>=ee&&(K-=Math.pow(2,8*_)),K},o.prototype.readIntBE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=_,ee=1,ue=this[y+--K];for(;K>0&&(ee*=256);)ue+=this[y+--K]*ee;return ee*=128,ue>=ee&&(ue-=Math.pow(2,8*_)),ue},o.prototype.readInt8=function(y,_){return y=y>>>0,_||Ht(y,1,this.length),this[y]&128?(255-this[y]+1)*-1:this[y]},o.prototype.readInt16LE=function(y,_){y=y>>>0,_||Ht(y,2,this.length);let B=this[y]|this[y+1]<<8;return B&32768?B|4294901760:B},o.prototype.readInt16BE=function(y,_){y=y>>>0,_||Ht(y,2,this.length);let B=this[y+1]|this[y]<<8;return B&32768?B|4294901760:B},o.prototype.readInt32LE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},o.prototype.readInt32BE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},o.prototype.readBigInt64LE=ka(function(y){y=y>>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Ft(y,this.length-8);let K=this[y+4]+this[y+5]*ln(2,8)+this[y+6]*ln(2,16)+(B<<24);return(BigInt(K)<>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Ft(y,this.length-8);let K=(_<<24)+this[++y]*ln(2,16)+this[++y]*ln(2,8)+this[++y];return(BigInt(K)<>>0,_||Ht(y,4,this.length),t.read(this,y,!0,23,4)},o.prototype.readFloatBE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),t.read(this,y,!1,23,4)},o.prototype.readDoubleLE=function(y,_){return y=y>>>0,_||Ht(y,8,this.length),t.read(this,y,!0,52,8)},o.prototype.readDoubleBE=function(y,_){return y=y>>>0,_||Ht(y,8,this.length),t.read(this,y,!1,52,8)};function Ln(P,y,_,B,K,ee){if(!o.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(y>K||yP.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(y,_,B,K){if(y=+y,_=_>>>0,B=B>>>0,!K){let Tt=Math.pow(2,8*B)-1;Ln(this,y,_,B,Tt,0)}let ee=1,ue=0;for(this[_]=y&255;++ue>>0,B=B>>>0,!K){let Tt=Math.pow(2,8*B)-1;Ln(this,y,_,B,Tt,0)}let ee=B-1,ue=1;for(this[_+ee]=y&255;--ee>=0&&(ue*=256);)this[_+ee]=y/ue&255;return _+B},o.prototype.writeUint8=o.prototype.writeUInt8=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,1,255,0),this[_]=y&255,_+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,65535,0),this[_]=y&255,this[_+1]=y>>>8,_+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,65535,0),this[_]=y>>>8,this[_+1]=y&255,_+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,4294967295,0),this[_+3]=y>>>24,this[_+2]=y>>>16,this[_+1]=y>>>8,this[_]=y&255,_+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,4294967295,0),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4};function ae(P,y,_,B,K){Ut(y,B,K,P,_,7);let ee=Number(y&BigInt(4294967295));P[_++]=ee,ee=ee>>8,P[_++]=ee,ee=ee>>8,P[_++]=ee,ee=ee>>8,P[_++]=ee;let ue=Number(y>>BigInt(32)&BigInt(4294967295));return P[_++]=ue,ue=ue>>8,P[_++]=ue,ue=ue>>8,P[_++]=ue,ue=ue>>8,P[_++]=ue,_}function be(P,y,_,B,K){Ut(y,B,K,P,_,7);let ee=Number(y&BigInt(4294967295));P[_+7]=ee,ee=ee>>8,P[_+6]=ee,ee=ee>>8,P[_+5]=ee,ee=ee>>8,P[_+4]=ee;let ue=Number(y>>BigInt(32)&BigInt(4294967295));return P[_+3]=ue,ue=ue>>8,P[_+2]=ue,ue=ue>>8,P[_+1]=ue,ue=ue>>8,P[_]=ue,_+8}o.prototype.writeBigUInt64LE=ka(function(y,_=0){return ae(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=ka(function(y,_=0){return be(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(y,_,B,K){if(y=+y,_=_>>>0,!K){let yn=Math.pow(2,8*B-1);Ln(this,y,_,B,yn-1,-yn)}let ee=0,ue=1,Tt=0;for(this[_]=y&255;++ee>0)-Tt&255;return _+B},o.prototype.writeIntBE=function(y,_,B,K){if(y=+y,_=_>>>0,!K){let yn=Math.pow(2,8*B-1);Ln(this,y,_,B,yn-1,-yn)}let ee=B-1,ue=1,Tt=0;for(this[_+ee]=y&255;--ee>=0&&(ue*=256);)y<0&&Tt===0&&this[_+ee+1]!==0&&(Tt=1),this[_+ee]=(y/ue>>0)-Tt&255;return _+B},o.prototype.writeInt8=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,1,127,-128),y<0&&(y=255+y+1),this[_]=y&255,_+1},o.prototype.writeInt16LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,32767,-32768),this[_]=y&255,this[_+1]=y>>>8,_+2},o.prototype.writeInt16BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,32767,-32768),this[_]=y>>>8,this[_+1]=y&255,_+2},o.prototype.writeInt32LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,2147483647,-2147483648),this[_]=y&255,this[_+1]=y>>>8,this[_+2]=y>>>16,this[_+3]=y>>>24,_+4},o.prototype.writeInt32BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4},o.prototype.writeBigInt64LE=ka(function(y,_=0){return ae(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=ka(function(y,_=0){return be(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ge(P,y,_,B,K,ee){if(_+B>P.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function Le(P,y,_,B,K){return y=+y,_=_>>>0,K||ge(P,y,_,4),t.write(P,y,_,B,23,4),_+4}o.prototype.writeFloatLE=function(y,_,B){return Le(this,y,_,!0,B)},o.prototype.writeFloatBE=function(y,_,B){return Le(this,y,_,!1,B)};function St(P,y,_,B,K){return y=+y,_=_>>>0,K||ge(P,y,_,8),t.write(P,y,_,B,52,8),_+8}o.prototype.writeDoubleLE=function(y,_,B){return St(this,y,_,!0,B)},o.prototype.writeDoubleBE=function(y,_,B){return St(this,y,_,!1,B)},o.prototype.copy=function(y,_,B,K){if(!o.isBuffer(y))throw new TypeError("argument should be a Buffer");if(B||(B=0),!K&&K!==0&&(K=this.length),_>=y.length&&(_=y.length),_||(_=0),K>0&&K=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),y.length-_>>0,B=B===void 0?this.length:B>>>0,y||(y=0);let ee;if(typeof y=="number")for(ee=_;eeln(2,32)?K=xe(String(_)):typeof _=="bigint"&&(K=String(_),(_>ln(BigInt(2),BigInt(32))||_<-ln(BigInt(2),BigInt(32)))&&(K=xe(K)),K+="n"),B+=` It must be ${y}. Received ${K}`,B},RangeError);function xe(P){let y="",_=P.length,B=P[0]==="-"?1:0;for(;_>=B+4;_-=3)y=`_${P.slice(_-3,_)}${y}`;return`${P.slice(0,_)}${y}`}function ze(P,y,_){it(y,"offset"),(P[y]===void 0||P[y+_]===void 0)&&Ft(y,P.length-(_+1))}function Ut(P,y,_,B,K,ee){if(P>_||P3?y===0||y===BigInt(0)?Tt=`>= 0${ue} and < 2${ue} ** ${(ee+1)*8}${ue}`:Tt=`>= -(2${ue} ** ${(ee+1)*8-1}${ue}) and < 2 ** ${(ee+1)*8-1}${ue}`:Tt=`>= ${y}${ue} and <= ${_}${ue}`,new Q.ERR_OUT_OF_RANGE("value",Tt,P)}ze(B,K,ee)}function it(P,y){if(typeof P!="number")throw new Q.ERR_INVALID_ARG_TYPE(y,"number",P)}function Ft(P,y,_){throw Math.floor(P)!==P?(it(P,_),new Q.ERR_OUT_OF_RANGE(_||"offset","an integer",P)):y<0?new Q.ERR_BUFFER_OUT_OF_BOUNDS:new Q.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${y}`,P)}let ps=/[^+/0-9A-Za-z-_]/g;function Yr(P){if(P=P.split("=")[0],P=P.trim().replace(ps,""),P.length<2)return"";for(;P.length%4!==0;)P=P+"=";return P}function ms(P,y){y=y||1/0;let _,B=P.length,K=null,ee=[];for(let ue=0;ue55295&&_<57344){if(!K){if(_>56319){(y-=3)>-1&&ee.push(239,191,189);continue}else if(ue+1===B){(y-=3)>-1&&ee.push(239,191,189);continue}K=_;continue}if(_<56320){(y-=3)>-1&&ee.push(239,191,189),K=_;continue}_=(K-55296<<10|_-56320)+65536}else K&&(y-=3)>-1&&ee.push(239,191,189);if(K=null,_<128){if((y-=1)<0)break;ee.push(_)}else if(_<2048){if((y-=2)<0)break;ee.push(_>>6|192,_&63|128)}else if(_<65536){if((y-=3)<0)break;ee.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((y-=4)<0)break;ee.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return ee}function rl(P){let y=[];for(let _=0;_>8,K=_%256,ee.push(K),ee.push(B);return ee}function Ir(P){return e.toByteArray(Yr(P))}function ui(P,y,_,B){let K;for(K=0;K=y.length||K>=P.length);++K)y[K+_]=P[K];return K}function qt(P,y){return P instanceof y||P!=null&&P.constructor!=null&&P.constructor.name!=null&&P.constructor.name===y.name}function gr(P){return P!==P}let ju=function(){let P="0123456789abcdef",y=new Array(256);for(let _=0;_<16;++_){let B=_*16;for(let K=0;K<16;++K)y[B+K]=P[_]+P[K]}return y}();function ka(P){return typeof BigInt=="undefined"?Ku:P}function Ku(){throw new Error("BigInt not supported")}return nc}var Qd,cF,Hm,lF,nc,dF,rc,D,Qpe,Ype,fF=Zu(()=>{"use strict";m();T();N();Qd={},cF=!1;Hm={},lF=!1;nc={},dF=!1;rc=WH();rc.Buffer;rc.SlowBuffer;rc.INSPECT_MAX_BYTES;rc.kMaxLength;D=rc.Buffer,Qpe=rc.INSPECT_MAX_BYTES,Ype=rc.kMaxLength});var T=Zu(()=>{"use strict";fF()});var pF=F(yl=>{"use strict";m();T();N();Object.defineProperty(yl,"__esModule",{value:!0});yl.versionInfo=yl.version=void 0;var XH="16.9.0";yl.version=XH;var ZH=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});yl.versionInfo=ZH});var Vr=F(eI=>{"use strict";m();T();N();Object.defineProperty(eI,"__esModule",{value:!0});eI.devAssert=e3;function e3(e,t){if(!!!e)throw new Error(t)}});var zm=F(tI=>{"use strict";m();T();N();Object.defineProperty(tI,"__esModule",{value:!0});tI.isPromise=t3;function t3(e){return typeof(e==null?void 0:e.then)=="function"}});var Va=F(nI=>{"use strict";m();T();N();Object.defineProperty(nI,"__esModule",{value:!0});nI.isObjectLike=n3;function n3(e){return typeof e=="object"&&e!==null}});var Ar=F(rI=>{"use strict";m();T();N();Object.defineProperty(rI,"__esModule",{value:!0});rI.invariant=r3;function r3(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}});var Wm=F(iI=>{"use strict";m();T();N();Object.defineProperty(iI,"__esModule",{value:!0});iI.getLocation=s3;var i3=Ar(),a3=/\r\n|[\n\r]/g;function s3(e,t){let n=0,r=1;for(let i of e.body.matchAll(a3)){if(typeof i.index=="number"||(0,i3.invariant)(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}});var aI=F(Xm=>{"use strict";m();T();N();Object.defineProperty(Xm,"__esModule",{value:!0});Xm.printLocation=u3;Xm.printSourceLocation=NF;var o3=Wm();function u3(e){return NF(e.source,(0,o3.getLocation)(e.source,e.start))}function NF(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,u=t.line===1?n:0,l=t.column+u,d=`${e.name}:${o}:${l} `,p=r.split(/\r\n|[\n\r]/g),E=p[i];if(E.length>120){let I=Math.floor(l/80),v=l%80,A=[];for(let U=0;U["|",U]),["|","^".padStart(v)],["|",A[I+1]]])}return d+mF([[`${o-1} |`,p[i-1]],[`${o} |`,E],["|","^".padStart(l)],[`${o+1} |`,p[i+1]]])}function mF(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` -`)}});var ze=w(Il=>{"use strict";m();T();N();Object.defineProperty(Il,"__esModule",{value:!0});Il.GraphQLError=void 0;Il.formatError=s3;Il.printError=a3;var r3=Va(),TF=Wm(),EF=aI();function i3(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var sI=class e extends Error{constructor(t,...n){var r,i,a;let{nodes:o,source:u,positions:l,path:d,originalError:p,extensions:E}=i3(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=p!=null?p:void 0,this.nodes=hF(Array.isArray(o)?o:o?[o]:void 0);let I=hF((r=this.nodes)===null||r===void 0?void 0:r.map(A=>A.loc).filter(A=>A!=null));this.source=u!=null?u:I==null||(i=I[0])===null||i===void 0?void 0:i.source,this.positions=l!=null?l:I==null?void 0:I.map(A=>A.start),this.locations=l&&u?l.map(A=>(0,TF.getLocation)(u,A)):I==null?void 0:I.map(A=>(0,TF.getLocation)(A.source,A.start));let v=(0,r3.isObjectLike)(p==null?void 0:p.extensions)?p==null?void 0:p.extensions:void 0;this.extensions=(a=E!=null?E:v)!==null&&a!==void 0?a: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}}),p!=null&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` +`)}});var Xe=F(Il=>{"use strict";m();T();N();Object.defineProperty(Il,"__esModule",{value:!0});Il.GraphQLError=void 0;Il.formatError=f3;Il.printError=d3;var c3=Va(),TF=Wm(),EF=aI();function l3(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var sI=class e extends Error{constructor(t,...n){var r,i,a;let{nodes:o,source:u,positions:l,path:d,originalError:p,extensions:E}=l3(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=p!=null?p:void 0,this.nodes=hF(Array.isArray(o)?o:o?[o]:void 0);let I=hF((r=this.nodes)===null||r===void 0?void 0:r.map(A=>A.loc).filter(A=>A!=null));this.source=u!=null?u:I==null||(i=I[0])===null||i===void 0?void 0:i.source,this.positions=l!=null?l:I==null?void 0:I.map(A=>A.start),this.locations=l&&u?l.map(A=>(0,TF.getLocation)(u,A)):I==null?void 0:I.map(A=>(0,TF.getLocation)(A.source,A.start));let v=(0,c3.isObjectLike)(p==null?void 0:p.extensions)?p==null?void 0:p.extensions:void 0;this.extensions=(a=E!=null?E:v)!==null&&a!==void 0?a: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}}),p!=null&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` `+(0,EF.printLocation)(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` -`+(0,EF.printSourceLocation)(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};Il.GraphQLError=sI;function hF(e){return e===void 0||e.length===0?void 0:e}function a3(e){return e.toString()}function s3(e){return e.toJSON()}});var Zm=w(oI=>{"use strict";m();T();N();Object.defineProperty(oI,"__esModule",{value:!0});oI.syntaxError=u3;var o3=ze();function u3(e,t,n){return new o3.GraphQLError(`Syntax Error: ${n}`,{source:e,positions:[t]})}});var ja=w(Li=>{"use strict";m();T();N();Object.defineProperty(Li,"__esModule",{value:!0});Li.Token=Li.QueryDocumentKeys=Li.OperationTypeNode=Li.Location=void 0;Li.isNode=l3;var uI=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};Li.Location=uI;var cI=class{constructor(t,n,r,i,a,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=a,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};Li.Token=cI;var yF={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};Li.QueryDocumentKeys=yF;var c3=new Set(Object.keys(yF));function l3(e){let t=e==null?void 0:e.kind;return typeof t=="string"&&c3.has(t)}var lI;Li.OperationTypeNode=lI;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(lI||(Li.OperationTypeNode=lI={}))});var gl=w(Yd=>{"use strict";m();T();N();Object.defineProperty(Yd,"__esModule",{value:!0});Yd.DirectiveLocation=void 0;var dI;Yd.DirectiveLocation=dI;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(dI||(Yd.DirectiveLocation=dI={}))});var wt=w(Jd=>{"use strict";m();T();N();Object.defineProperty(Jd,"__esModule",{value:!0});Jd.Kind=void 0;var fI;Jd.Kind=fI;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(fI||(Jd.Kind=fI={}))});var eN=w(ic=>{"use strict";m();T();N();Object.defineProperty(ic,"__esModule",{value:!0});ic.isDigit=IF;ic.isLetter=pI;ic.isNameContinue=p3;ic.isNameStart=f3;ic.isWhiteSpace=d3;function d3(e){return e===9||e===32}function IF(e){return e>=48&&e<=57}function pI(e){return e>=97&&e<=122||e>=65&&e<=90}function f3(e){return pI(e)||e===95}function p3(e){return pI(e)||IF(e)||e===95}});var zd=w(Hd=>{"use strict";m();T();N();Object.defineProperty(Hd,"__esModule",{value:!0});Hd.dedentBlockStringLines=m3;Hd.isPrintableAsBlockString=T3;Hd.printBlockString=E3;var mI=eN();function m3(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;ou===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function N3(e){let t=0;for(;t1&&r.slice(1).every(v=>v.length===0||(0,mI.isWhiteSpace)(v.charCodeAt(0))),o=n.endsWith('\\"""'),u=e.endsWith('"')&&!o,l=e.endsWith("\\"),d=u||l,p=!(t!=null&&t.minimize)&&(!i||e.length>70||d||a||o),E="",I=i&&(0,mI.isWhiteSpace)(e.charCodeAt(0));return(p&&!I||a)&&(E+=` +`+(0,EF.printSourceLocation)(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};Il.GraphQLError=sI;function hF(e){return e===void 0||e.length===0?void 0:e}function d3(e){return e.toString()}function f3(e){return e.toJSON()}});var Zm=F(oI=>{"use strict";m();T();N();Object.defineProperty(oI,"__esModule",{value:!0});oI.syntaxError=m3;var p3=Xe();function m3(e,t,n){return new p3.GraphQLError(`Syntax Error: ${n}`,{source:e,positions:[t]})}});var ja=F(Li=>{"use strict";m();T();N();Object.defineProperty(Li,"__esModule",{value:!0});Li.Token=Li.QueryDocumentKeys=Li.OperationTypeNode=Li.Location=void 0;Li.isNode=T3;var uI=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};Li.Location=uI;var cI=class{constructor(t,n,r,i,a,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=a,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};Li.Token=cI;var yF={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};Li.QueryDocumentKeys=yF;var N3=new Set(Object.keys(yF));function T3(e){let t=e==null?void 0:e.kind;return typeof t=="string"&&N3.has(t)}var lI;Li.OperationTypeNode=lI;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(lI||(Li.OperationTypeNode=lI={}))});var gl=F(Yd=>{"use strict";m();T();N();Object.defineProperty(Yd,"__esModule",{value:!0});Yd.DirectiveLocation=void 0;var dI;Yd.DirectiveLocation=dI;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(dI||(Yd.DirectiveLocation=dI={}))});var Lt=F(Jd=>{"use strict";m();T();N();Object.defineProperty(Jd,"__esModule",{value:!0});Jd.Kind=void 0;var fI;Jd.Kind=fI;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(fI||(Jd.Kind=fI={}))});var eN=F(ic=>{"use strict";m();T();N();Object.defineProperty(ic,"__esModule",{value:!0});ic.isDigit=IF;ic.isLetter=pI;ic.isNameContinue=y3;ic.isNameStart=h3;ic.isWhiteSpace=E3;function E3(e){return e===9||e===32}function IF(e){return e>=48&&e<=57}function pI(e){return e>=97&&e<=122||e>=65&&e<=90}function h3(e){return pI(e)||e===95}function y3(e){return pI(e)||IF(e)||e===95}});var zd=F(Hd=>{"use strict";m();T();N();Object.defineProperty(Hd,"__esModule",{value:!0});Hd.dedentBlockStringLines=I3;Hd.isPrintableAsBlockString=_3;Hd.printBlockString=v3;var mI=eN();function I3(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;ou===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function g3(e){let t=0;for(;t1&&r.slice(1).every(v=>v.length===0||(0,mI.isWhiteSpace)(v.charCodeAt(0))),o=n.endsWith('\\"""'),u=e.endsWith('"')&&!o,l=e.endsWith("\\"),d=u||l,p=!(t!=null&&t.minimize)&&(!i||e.length>70||d||a||o),E="",I=i&&(0,mI.isWhiteSpace)(e.charCodeAt(0));return(p&&!I||a)&&(E+=` `),E+=n,(p||d)&&(E+=` -`),'"""'+E+'"""'}});var Xd=w(Wd=>{"use strict";m();T();N();Object.defineProperty(Wd,"__esModule",{value:!0});Wd.TokenKind=void 0;var NI;Wd.TokenKind=NI;(function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(NI||(Wd.TokenKind=NI={}))});var nN=w(ef=>{"use strict";m();T();N();Object.defineProperty(ef,"__esModule",{value:!0});ef.Lexer=void 0;ef.isPunctuatorTokenKind=y3;var la=Zm(),_F=ja(),h3=zd(),ac=eN(),vt=Xd(),EI=class{constructor(t){let n=new _F.Token(vt.TokenKind.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==vt.TokenKind.EOF)do if(t.next)t=t.next;else{let n=I3(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===vt.TokenKind.COMMENT);return t}};ef.Lexer=EI;function y3(e){return e===vt.TokenKind.BANG||e===vt.TokenKind.DOLLAR||e===vt.TokenKind.AMP||e===vt.TokenKind.PAREN_L||e===vt.TokenKind.PAREN_R||e===vt.TokenKind.SPREAD||e===vt.TokenKind.COLON||e===vt.TokenKind.EQUALS||e===vt.TokenKind.AT||e===vt.TokenKind.BRACKET_L||e===vt.TokenKind.BRACKET_R||e===vt.TokenKind.BRACE_L||e===vt.TokenKind.PIPE||e===vt.TokenKind.BRACE_R}function _l(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function tN(e,t){return vF(e.charCodeAt(t))&&OF(e.charCodeAt(t+1))}function vF(e){return e>=55296&&e<=56319}function OF(e){return e>=56320&&e<=57343}function sc(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return vt.TokenKind.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Hn(e,t,n,r,i){let a=e.line,o=1+n-e.lineStart;return new _F.Token(t,n,r,a,o,i)}function I3(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function D3(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` -`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw(0,la.syntaxError)(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function b3(e,t){let n=e.source.body,r=n.length,i=e.lineStart,a=t+3,o=a,u="",l=[];for(;a{"use strict";m();T();N();Object.defineProperty(hI,"__esModule",{value:!0});hI.inspect=P3;var R3=10,SF=2;function P3(e){return rN(e,[])}function rN(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return F3(e,t);default:return String(e)}}function F3(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(w3(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:rN(r,n)}else if(Array.isArray(e))return C3(e,n);return L3(e,n)}function w3(e){return typeof e.toJSON=="function"}function L3(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>SF?"["+B3(e)+"]":"{ "+n.map(([i,a])=>i+": "+rN(a,t)).join(", ")+" }"}function C3(e,t){if(e.length===0)return"[]";if(t.length>SF)return"[Array]";let n=Math.min(R3,e.length),r=e.length-n,i=[];for(let a=0;a1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function B3(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}});var tf=w(iN=>{"use strict";m();T();N();Object.defineProperty(iN,"__esModule",{value:!0});iN.instanceOf=void 0;var U3=Wt(),k3=globalThis.process&&S.env.NODE_ENV==="production",M3=k3?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],a=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===a){let o=(0,U3.inspect)(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm. +`),'"""'+E+'"""'}});var Xd=F(Wd=>{"use strict";m();T();N();Object.defineProperty(Wd,"__esModule",{value:!0});Wd.TokenKind=void 0;var NI;Wd.TokenKind=NI;(function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(NI||(Wd.TokenKind=NI={}))});var nN=F(ef=>{"use strict";m();T();N();Object.defineProperty(ef,"__esModule",{value:!0});ef.Lexer=void 0;ef.isPunctuatorTokenKind=S3;var la=Zm(),_F=ja(),O3=zd(),ac=eN(),vt=Xd(),EI=class{constructor(t){let n=new _F.Token(vt.TokenKind.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==vt.TokenKind.EOF)do if(t.next)t=t.next;else{let n=D3(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===vt.TokenKind.COMMENT);return t}};ef.Lexer=EI;function S3(e){return e===vt.TokenKind.BANG||e===vt.TokenKind.DOLLAR||e===vt.TokenKind.AMP||e===vt.TokenKind.PAREN_L||e===vt.TokenKind.PAREN_R||e===vt.TokenKind.SPREAD||e===vt.TokenKind.COLON||e===vt.TokenKind.EQUALS||e===vt.TokenKind.AT||e===vt.TokenKind.BRACKET_L||e===vt.TokenKind.BRACKET_R||e===vt.TokenKind.BRACE_L||e===vt.TokenKind.PIPE||e===vt.TokenKind.BRACE_R}function _l(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function tN(e,t){return vF(e.charCodeAt(t))&&OF(e.charCodeAt(t+1))}function vF(e){return e>=55296&&e<=56319}function OF(e){return e>=56320&&e<=57343}function sc(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return vt.TokenKind.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Hn(e,t,n,r,i){let a=e.line,o=1+n-e.lineStart;return new _F.Token(t,n,r,a,o,i)}function D3(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function w3(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw(0,la.syntaxError)(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function L3(e,t){let n=e.source.body,r=n.length,i=e.lineStart,a=t+3,o=a,u="",l=[];for(;a{"use strict";m();T();N();Object.defineProperty(hI,"__esModule",{value:!0});hI.inspect=U3;var B3=10,SF=2;function U3(e){return rN(e,[])}function rN(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return k3(e,t);default:return String(e)}}function k3(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(M3(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:rN(r,n)}else if(Array.isArray(e))return q3(e,n);return x3(e,n)}function M3(e){return typeof e.toJSON=="function"}function x3(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>SF?"["+V3(e)+"]":"{ "+n.map(([i,a])=>i+": "+rN(a,t)).join(", ")+" }"}function q3(e,t){if(e.length===0)return"[]";if(t.length>SF)return"[Array]";let n=Math.min(B3,e.length),r=e.length-n,i=[];for(let a=0;a1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function V3(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}});var tf=F(iN=>{"use strict";m();T();N();Object.defineProperty(iN,"__esModule",{value:!0});iN.instanceOf=void 0;var j3=Wt(),K3=globalThis.process&&S.env.NODE_ENV==="production",$3=K3?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],a=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===a){let o=(0,j3.inspect)(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other @@ -36,12 +36,12 @@ https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and -spurious results.`)}}return!1};iN.instanceOf=M3});var sN=w(nf=>{"use strict";m();T();N();Object.defineProperty(nf,"__esModule",{value:!0});nf.Source=void 0;nf.isSource=V3;var yI=Vr(),x3=Wt(),q3=tf(),aN=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||(0,yI.devAssert)(!1,`Body must be a string. Received: ${(0,x3.inspect)(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||(0,yI.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,yI.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};nf.Source=aN;function V3(e){return(0,q3.instanceOf)(e,aN)}});var vl=w(pu=>{"use strict";m();T();N();Object.defineProperty(pu,"__esModule",{value:!0});pu.Parser=void 0;pu.parse=K3;pu.parseConstValue=G3;pu.parseType=Q3;pu.parseValue=$3;var oc=Zm(),rf=ja(),j3=gl(),ot=wt(),bF=nN(),DF=sN(),Se=Xd();function K3(e,t){return new uc(e,t).parseDocument()}function $3(e,t){let n=new uc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(Se.TokenKind.EOF),r}function G3(e,t){let n=new uc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseConstValueLiteral();return n.expectToken(Se.TokenKind.EOF),r}function Q3(e,t){let n=new uc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseTypeReference();return n.expectToken(Se.TokenKind.EOF),r}var uc=class{constructor(t,n={}){let r=(0,DF.isSource)(t)?t:new DF.Source(t);this._lexer=new bF.Lexer(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(Se.TokenKind.NAME);return this.node(t,{kind:ot.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:ot.Kind.DOCUMENT,definitions:this.many(Se.TokenKind.SOF,this.parseDefinition,Se.TokenKind.EOF)})}parseDefinition(){if(this.peek(Se.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Se.TokenKind.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw(0,oc.syntaxError)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(Se.TokenKind.BRACE_L))return this.node(t,{kind:ot.Kind.OPERATION_DEFINITION,operation:rf.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(Se.TokenKind.NAME)&&(r=this.parseName()),this.node(t,{kind:ot.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(Se.TokenKind.NAME);switch(t.value){case"query":return rf.OperationTypeNode.QUERY;case"mutation":return rf.OperationTypeNode.MUTATION;case"subscription":return rf.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Se.TokenKind.PAREN_L,this.parseVariableDefinition,Se.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ot.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Se.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Se.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(Se.TokenKind.DOLLAR),this.node(t,{kind:ot.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ot.Kind.SELECTION_SET,selections:this.many(Se.TokenKind.BRACE_L,this.parseSelection,Se.TokenKind.BRACE_R)})}parseSelection(){return this.peek(Se.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(Se.TokenKind.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:ot.Kind.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Se.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Se.TokenKind.PAREN_L,n,Se.TokenKind.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(Se.TokenKind.COLON),this.node(n,{kind:ot.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(Se.TokenKind.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(Se.TokenKind.NAME)?this.node(t,{kind:ot.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:ot.Kind.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:ot.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:ot.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case Se.TokenKind.BRACKET_L:return this.parseList(t);case Se.TokenKind.BRACE_L:return this.parseObject(t);case Se.TokenKind.INT:return this.advanceLexer(),this.node(n,{kind:ot.Kind.INT,value:n.value});case Se.TokenKind.FLOAT:return this.advanceLexer(),this.node(n,{kind:ot.Kind.FLOAT,value:n.value});case Se.TokenKind.STRING:case Se.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case Se.TokenKind.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:ot.Kind.BOOLEAN,value:!0});case"false":return this.node(n,{kind:ot.Kind.BOOLEAN,value:!1});case"null":return this.node(n,{kind:ot.Kind.NULL});default:return this.node(n,{kind:ot.Kind.ENUM,value:n.value})}case Se.TokenKind.DOLLAR:if(t)if(this.expectToken(Se.TokenKind.DOLLAR),this._lexer.token.kind===Se.TokenKind.NAME){let r=this._lexer.token.value;throw(0,oc.syntaxError)(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:ot.Kind.STRING,value:t.value,block:t.kind===Se.TokenKind.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:ot.Kind.LIST,values:this.any(Se.TokenKind.BRACKET_L,n,Se.TokenKind.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:ot.Kind.OBJECT,fields:this.any(Se.TokenKind.BRACE_L,n,Se.TokenKind.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(Se.TokenKind.COLON),this.node(n,{kind:ot.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(Se.TokenKind.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(Se.TokenKind.AT),this.node(n,{kind:ot.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(Se.TokenKind.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(Se.TokenKind.BRACKET_R),n=this.node(t,{kind:ot.Kind.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Se.TokenKind.BANG)?this.node(t,{kind:ot.Kind.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:ot.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Se.TokenKind.STRING)||this.peek(Se.TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(Se.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Se.TokenKind.BRACE_R);return this.node(t,{kind:ot.Kind.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(Se.TokenKind.COLON);let r=this.parseNamedType();return this.node(t,{kind:ot.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ot.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Se.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseFieldDefinition,Se.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Se.TokenKind.COLON);let a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(Se.TokenKind.PAREN_L,this.parseInputValueDef,Se.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Se.TokenKind.COLON);let i=this.parseTypeReference(),a;this.expectOptionalToken(Se.TokenKind.EQUALS)&&(a=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:a,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ot.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(t,{kind:ot.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(Se.TokenKind.EQUALS)?this.delimitedMany(Se.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(t,{kind:ot.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseEnumValueDefinition,Se.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw(0,oc.syntaxError)(this._lexer.source,this._lexer.token.start,`${oN(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(t,{kind:ot.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseInputValueDef,Se.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===Se.TokenKind.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(Se.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Se.TokenKind.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Se.TokenKind.AT);let r=this.parseName(),i=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:ot.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Se.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(j3.DirectiveLocation,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new rf.Location(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw(0,oc.syntaxError)(this._lexer.source,n.start,`Expected ${AF(t)}, found ${oN(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===Se.TokenKind.NAME&&n.value===t)this.advanceLexer();else throw(0,oc.syntaxError)(this._lexer.source,n.start,`Expected "${t}", found ${oN(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===Se.TokenKind.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return(0,oc.syntaxError)(this._lexer.source,n.start,`Unexpected ${oN(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==Se.TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw(0,oc.syntaxError)(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};pu.Parser=uc;function oN(e){let t=e.value;return AF(e.kind)+(t!=null?` "${t}"`:"")}function AF(e){return(0,bF.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var mu=w(II=>{"use strict";m();T();N();Object.defineProperty(II,"__esModule",{value:!0});II.didYouMean=J3;var Y3=5;function J3(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let a=r.map(l=>`"${l}"`);switch(a.length){case 0:return"";case 1:return i+a[0]+"?";case 2:return i+a[0]+" or "+a[1]+"?"}let o=a.slice(0,Y3),u=o.pop();return i+o.join(", ")+", or "+u+"?"}});var RF=w(gI=>{"use strict";m();T();N();Object.defineProperty(gI,"__esModule",{value:!0});gI.identityFunc=H3;function H3(e){return e}});var Nu=w(_I=>{"use strict";m();T();N();Object.defineProperty(_I,"__esModule",{value:!0});_I.keyMap=z3;function z3(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}});var af=w(vI=>{"use strict";m();T();N();Object.defineProperty(vI,"__esModule",{value:!0});vI.keyValMap=W3;function W3(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}});var SI=w(OI=>{"use strict";m();T();N();Object.defineProperty(OI,"__esModule",{value:!0});OI.mapValue=X3;function X3(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}});var sf=w(bI=>{"use strict";m();T();N();Object.defineProperty(bI,"__esModule",{value:!0});bI.naturalCompare=Z3;function Z3(e,t){let n=0,r=0;for(;n0);let u=0;do++r,u=u*10+a-DI,a=t.charCodeAt(r);while(uN(a)&&u>0);if(ou)return 1}else{if(ia)return 1;++n,++r}}return e.length-t.length}var DI=48,ez=57;function uN(e){return!isNaN(e)&&DI<=e&&e<=ez}});var Tu=w(RI=>{"use strict";m();T();N();Object.defineProperty(RI,"__esModule",{value:!0});RI.suggestionList=nz;var tz=sf();function nz(e,t){let n=Object.create(null),r=new AI(e),i=Math.floor(e.length*.4)+1;for(let a of t){let o=r.measure(a,i);o!==void 0&&(n[a]=o)}return Object.keys(n).sort((a,o)=>{let u=n[a]-n[o];return u!==0?u:(0,tz.naturalCompare)(a,o)})}var AI=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=PF(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;let r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=PF(r),a=this._inputArray;if(i.lengthn)return;let l=this._rows;for(let p=0;p<=u;p++)l[0][p]=p;for(let p=1;p<=o;p++){let E=l[(p-1)%3],I=l[p%3],v=I[0]=p;for(let A=1;A<=u;A++){let U=i[p-1]===a[A-1]?0:1,j=Math.min(E[A]+1,I[A-1]+1,E[A-1]+U);if(p>1&&A>1&&i[p-1]===a[A-2]&&i[p-2]===a[A-1]){let Q=l[(p-2)%3][A-2];j=Math.min(j,Q+1)}jn)return}let d=l[o%3][u];return d<=n?d:void 0}};function PF(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();N();Object.defineProperty(PI,"__esModule",{value:!0});PI.toObjMap=rz;function rz(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;let t=Object.create(null);for(let[n,r]of Object.entries(e))t[n]=r;return t}});var FF=w(FI=>{"use strict";m();T();N();Object.defineProperty(FI,"__esModule",{value:!0});FI.printString=iz;function iz(e){return`"${e.replace(az,sz)}"`}var az=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function sz(e){return oz[e.charCodeAt(0)]}var oz=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"]});var cc=w(Eu=>{"use strict";m();T();N();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.BREAK=void 0;Eu.getEnterLeaveForKind=lN;Eu.getVisitFn=fz;Eu.visit=lz;Eu.visitInParallel=dz;var uz=Vr(),cz=Wt(),wI=ja(),wF=wt(),Ol=Object.freeze({});Eu.BREAK=Ol;function lz(e,t,n=wI.QueryDocumentKeys){let r=new Map;for(let Q of Object.values(wF.Kind))r.set(Q,lN(t,Q));let i,a=Array.isArray(e),o=[e],u=-1,l=[],d=e,p,E,I=[],v=[];do{u++;let Q=u===o.length,ee=Q&&l.length!==0;if(Q){if(p=v.length===0?void 0:I[I.length-1],d=E,E=v.pop(),ee)if(a){d=d.slice();let pe=0;for(let[le,Ae]of l){let Me=le-pe;Ae===null?(d.splice(Me,1),pe++):d[Me]=Ae}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[pe,le]of l)d[pe]=le}u=i.index,o=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(E){if(p=a?u:o[u],d=E[p],d==null)continue;I.push(p)}let ne;if(!Array.isArray(d)){var A,U;(0,wI.isNode)(d)||(0,uz.devAssert)(!1,`Invalid AST Node: ${(0,cz.inspect)(d)}.`);let pe=Q?(A=r.get(d.kind))===null||A===void 0?void 0:A.leave:(U=r.get(d.kind))===null||U===void 0?void 0:U.enter;if(ne=pe==null?void 0:pe.call(t,d,p,E,I,v),ne===Ol)break;if(ne===!1){if(!Q){I.pop();continue}}else if(ne!==void 0&&(l.push([p,ne]),!Q))if((0,wI.isNode)(ne))d=ne;else{I.pop();continue}}if(ne===void 0&&ee&&l.push([p,d]),Q)I.pop();else{var j;i={inArray:a,index:u,keys:o,edits:l,prev:i},a=Array.isArray(d),o=a?d:(j=n[d.kind])!==null&&j!==void 0?j:[],u=-1,l=[],E&&v.push(E),E=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function dz(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(wF.Kind)){let i=!1,a=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let l=0;l{"use strict";m();T();N();Object.defineProperty(LI,"__esModule",{value:!0});LI.print=Tz;var pz=zd(),mz=FF(),Nz=cc();function Tz(e){return(0,Nz.visit)(e,hz)}var Ez=80,hz={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>qe(e.definitions,` +spurious results.`)}}return!1};iN.instanceOf=$3});var sN=F(nf=>{"use strict";m();T();N();Object.defineProperty(nf,"__esModule",{value:!0});nf.Source=void 0;nf.isSource=Y3;var yI=Vr(),G3=Wt(),Q3=tf(),aN=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||(0,yI.devAssert)(!1,`Body must be a string. Received: ${(0,G3.inspect)(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||(0,yI.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,yI.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};nf.Source=aN;function Y3(e){return(0,Q3.instanceOf)(e,aN)}});var vl=F(pu=>{"use strict";m();T();N();Object.defineProperty(pu,"__esModule",{value:!0});pu.Parser=void 0;pu.parse=H3;pu.parseConstValue=W3;pu.parseType=X3;pu.parseValue=z3;var oc=Zm(),rf=ja(),J3=gl(),ut=Lt(),bF=nN(),DF=sN(),De=Xd();function H3(e,t){return new uc(e,t).parseDocument()}function z3(e,t){let n=new uc(e,t);n.expectToken(De.TokenKind.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(De.TokenKind.EOF),r}function W3(e,t){let n=new uc(e,t);n.expectToken(De.TokenKind.SOF);let r=n.parseConstValueLiteral();return n.expectToken(De.TokenKind.EOF),r}function X3(e,t){let n=new uc(e,t);n.expectToken(De.TokenKind.SOF);let r=n.parseTypeReference();return n.expectToken(De.TokenKind.EOF),r}var uc=class{constructor(t,n={}){let r=(0,DF.isSource)(t)?t:new DF.Source(t);this._lexer=new bF.Lexer(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(De.TokenKind.NAME);return this.node(t,{kind:ut.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:ut.Kind.DOCUMENT,definitions:this.many(De.TokenKind.SOF,this.parseDefinition,De.TokenKind.EOF)})}parseDefinition(){if(this.peek(De.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===De.TokenKind.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw(0,oc.syntaxError)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(De.TokenKind.BRACE_L))return this.node(t,{kind:ut.Kind.OPERATION_DEFINITION,operation:rf.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(De.TokenKind.NAME)&&(r=this.parseName()),this.node(t,{kind:ut.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(De.TokenKind.NAME);switch(t.value){case"query":return rf.OperationTypeNode.QUERY;case"mutation":return rf.OperationTypeNode.MUTATION;case"subscription":return rf.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(De.TokenKind.PAREN_L,this.parseVariableDefinition,De.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ut.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(De.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(De.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(De.TokenKind.DOLLAR),this.node(t,{kind:ut.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ut.Kind.SELECTION_SET,selections:this.many(De.TokenKind.BRACE_L,this.parseSelection,De.TokenKind.BRACE_R)})}parseSelection(){return this.peek(De.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(De.TokenKind.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:ut.Kind.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(De.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(De.TokenKind.PAREN_L,n,De.TokenKind.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(De.TokenKind.COLON),this.node(n,{kind:ut.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(De.TokenKind.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(De.TokenKind.NAME)?this.node(t,{kind:ut.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:ut.Kind.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:ut.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:ut.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case De.TokenKind.BRACKET_L:return this.parseList(t);case De.TokenKind.BRACE_L:return this.parseObject(t);case De.TokenKind.INT:return this.advanceLexer(),this.node(n,{kind:ut.Kind.INT,value:n.value});case De.TokenKind.FLOAT:return this.advanceLexer(),this.node(n,{kind:ut.Kind.FLOAT,value:n.value});case De.TokenKind.STRING:case De.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case De.TokenKind.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:ut.Kind.BOOLEAN,value:!0});case"false":return this.node(n,{kind:ut.Kind.BOOLEAN,value:!1});case"null":return this.node(n,{kind:ut.Kind.NULL});default:return this.node(n,{kind:ut.Kind.ENUM,value:n.value})}case De.TokenKind.DOLLAR:if(t)if(this.expectToken(De.TokenKind.DOLLAR),this._lexer.token.kind===De.TokenKind.NAME){let r=this._lexer.token.value;throw(0,oc.syntaxError)(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:ut.Kind.STRING,value:t.value,block:t.kind===De.TokenKind.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:ut.Kind.LIST,values:this.any(De.TokenKind.BRACKET_L,n,De.TokenKind.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:ut.Kind.OBJECT,fields:this.any(De.TokenKind.BRACE_L,n,De.TokenKind.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(De.TokenKind.COLON),this.node(n,{kind:ut.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(De.TokenKind.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(De.TokenKind.AT),this.node(n,{kind:ut.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(De.TokenKind.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(De.TokenKind.BRACKET_R),n=this.node(t,{kind:ut.Kind.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(De.TokenKind.BANG)?this.node(t,{kind:ut.Kind.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:ut.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(De.TokenKind.STRING)||this.peek(De.TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(De.TokenKind.BRACE_L,this.parseOperationTypeDefinition,De.TokenKind.BRACE_R);return this.node(t,{kind:ut.Kind.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(De.TokenKind.COLON);let r=this.parseNamedType();return this.node(t,{kind:ut.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:ut.Kind.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ut.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(De.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(De.TokenKind.BRACE_L,this.parseFieldDefinition,De.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(De.TokenKind.COLON);let a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:ut.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(De.TokenKind.PAREN_L,this.parseInputValueDef,De.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(De.TokenKind.COLON);let i=this.parseTypeReference(),a;this.expectOptionalToken(De.TokenKind.EQUALS)&&(a=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:ut.Kind.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:a,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ut.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(t,{kind:ut.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(De.TokenKind.EQUALS)?this.delimitedMany(De.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(t,{kind:ut.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(De.TokenKind.BRACE_L,this.parseEnumValueDefinition,De.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:ut.Kind.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw(0,oc.syntaxError)(this._lexer.source,this._lexer.token.start,`${oN(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(t,{kind:ut.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(De.TokenKind.BRACE_L,this.parseInputValueDef,De.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===De.TokenKind.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(De.TokenKind.BRACE_L,this.parseOperationTypeDefinition,De.TokenKind.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:ut.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:ut.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:ut.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:ut.Kind.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ut.Kind.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ut.Kind.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ut.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(De.TokenKind.AT);let r=this.parseName(),i=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:ut.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(De.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(J3.DirectiveLocation,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new rf.Location(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw(0,oc.syntaxError)(this._lexer.source,n.start,`Expected ${AF(t)}, found ${oN(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===De.TokenKind.NAME&&n.value===t)this.advanceLexer();else throw(0,oc.syntaxError)(this._lexer.source,n.start,`Expected "${t}", found ${oN(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===De.TokenKind.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return(0,oc.syntaxError)(this._lexer.source,n.start,`Unexpected ${oN(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==De.TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw(0,oc.syntaxError)(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};pu.Parser=uc;function oN(e){let t=e.value;return AF(e.kind)+(t!=null?` "${t}"`:"")}function AF(e){return(0,bF.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var mu=F(II=>{"use strict";m();T();N();Object.defineProperty(II,"__esModule",{value:!0});II.didYouMean=ez;var Z3=5;function ez(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let a=r.map(l=>`"${l}"`);switch(a.length){case 0:return"";case 1:return i+a[0]+"?";case 2:return i+a[0]+" or "+a[1]+"?"}let o=a.slice(0,Z3),u=o.pop();return i+o.join(", ")+", or "+u+"?"}});var RF=F(gI=>{"use strict";m();T();N();Object.defineProperty(gI,"__esModule",{value:!0});gI.identityFunc=tz;function tz(e){return e}});var Nu=F(_I=>{"use strict";m();T();N();Object.defineProperty(_I,"__esModule",{value:!0});_I.keyMap=nz;function nz(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}});var af=F(vI=>{"use strict";m();T();N();Object.defineProperty(vI,"__esModule",{value:!0});vI.keyValMap=rz;function rz(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}});var SI=F(OI=>{"use strict";m();T();N();Object.defineProperty(OI,"__esModule",{value:!0});OI.mapValue=iz;function iz(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}});var sf=F(bI=>{"use strict";m();T();N();Object.defineProperty(bI,"__esModule",{value:!0});bI.naturalCompare=az;function az(e,t){let n=0,r=0;for(;n0);let u=0;do++r,u=u*10+a-DI,a=t.charCodeAt(r);while(uN(a)&&u>0);if(ou)return 1}else{if(ia)return 1;++n,++r}}return e.length-t.length}var DI=48,sz=57;function uN(e){return!isNaN(e)&&DI<=e&&e<=sz}});var Tu=F(RI=>{"use strict";m();T();N();Object.defineProperty(RI,"__esModule",{value:!0});RI.suggestionList=uz;var oz=sf();function uz(e,t){let n=Object.create(null),r=new AI(e),i=Math.floor(e.length*.4)+1;for(let a of t){let o=r.measure(a,i);o!==void 0&&(n[a]=o)}return Object.keys(n).sort((a,o)=>{let u=n[a]-n[o];return u!==0?u:(0,oz.naturalCompare)(a,o)})}var AI=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=PF(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;let r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=PF(r),a=this._inputArray;if(i.lengthn)return;let l=this._rows;for(let p=0;p<=u;p++)l[0][p]=p;for(let p=1;p<=o;p++){let E=l[(p-1)%3],I=l[p%3],v=I[0]=p;for(let A=1;A<=u;A++){let U=i[p-1]===a[A-1]?0:1,j=Math.min(E[A]+1,I[A-1]+1,E[A-1]+U);if(p>1&&A>1&&i[p-1]===a[A-2]&&i[p-2]===a[A-1]){let J=l[(p-2)%3][A-2];j=Math.min(j,J+1)}jn)return}let d=l[o%3][u];return d<=n?d:void 0}};function PF(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();N();Object.defineProperty(PI,"__esModule",{value:!0});PI.toObjMap=cz;function cz(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;let t=Object.create(null);for(let[n,r]of Object.entries(e))t[n]=r;return t}});var FF=F(FI=>{"use strict";m();T();N();Object.defineProperty(FI,"__esModule",{value:!0});FI.printString=lz;function lz(e){return`"${e.replace(dz,fz)}"`}var dz=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function fz(e){return pz[e.charCodeAt(0)]}var pz=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"]});var cc=F(Eu=>{"use strict";m();T();N();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.BREAK=void 0;Eu.getEnterLeaveForKind=lN;Eu.getVisitFn=hz;Eu.visit=Tz;Eu.visitInParallel=Ez;var mz=Vr(),Nz=Wt(),wI=ja(),wF=Lt(),Ol=Object.freeze({});Eu.BREAK=Ol;function Tz(e,t,n=wI.QueryDocumentKeys){let r=new Map;for(let J of Object.values(wF.Kind))r.set(J,lN(t,J));let i,a=Array.isArray(e),o=[e],u=-1,l=[],d=e,p,E,I=[],v=[];do{u++;let J=u===o.length,re=J&&l.length!==0;if(J){if(p=v.length===0?void 0:I[I.length-1],d=E,E=v.pop(),re)if(a){d=d.slice();let pe=0;for(let[Ne,Ie]of l){let Ue=Ne-pe;Ie===null?(d.splice(Ue,1),pe++):d[Ue]=Ie}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[pe,Ne]of l)d[pe]=Ne}u=i.index,o=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(E){if(p=a?u:o[u],d=E[p],d==null)continue;I.push(p)}let te;if(!Array.isArray(d)){var A,U;(0,wI.isNode)(d)||(0,mz.devAssert)(!1,`Invalid AST Node: ${(0,Nz.inspect)(d)}.`);let pe=J?(A=r.get(d.kind))===null||A===void 0?void 0:A.leave:(U=r.get(d.kind))===null||U===void 0?void 0:U.enter;if(te=pe==null?void 0:pe.call(t,d,p,E,I,v),te===Ol)break;if(te===!1){if(!J){I.pop();continue}}else if(te!==void 0&&(l.push([p,te]),!J))if((0,wI.isNode)(te))d=te;else{I.pop();continue}}if(te===void 0&&re&&l.push([p,d]),J)I.pop();else{var j;i={inArray:a,index:u,keys:o,edits:l,prev:i},a=Array.isArray(d),o=a?d:(j=n[d.kind])!==null&&j!==void 0?j:[],u=-1,l=[],E&&v.push(E),E=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function Ez(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(wF.Kind)){let i=!1,a=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let l=0;l{"use strict";m();T();N();Object.defineProperty(LI,"__esModule",{value:!0});LI.print=_z;var yz=zd(),Iz=FF(),gz=cc();function _z(e){return(0,gz.visit)(e,Oz)}var vz=80,Oz={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>qe(e.definitions,` -`)},OperationDefinition:{leave(e){let t=At("(",qe(e.variableDefinitions,", "),")"),n=qe([e.operation,qe([e.name,t]),qe(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+At(" = ",n)+At(" ",qe(r," "))},SelectionSet:{leave:({selections:e})=>da(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=At("",e,": ")+t,o=a+At("(",qe(n,", "),")");return o.length>Ez&&(o=a+At(`( +`)},OperationDefinition:{leave(e){let t=At("(",qe(e.variableDefinitions,", "),")"),n=qe([e.operation,qe([e.name,t]),qe(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+At(" = ",n)+At(" ",qe(r," "))},SelectionSet:{leave:({selections:e})=>da(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=At("",e,": ")+t,o=a+At("(",qe(n,", "),")");return o.length>vz&&(o=a+At(`( `,dN(qe(n,` `)),` -)`)),qe([o,qe(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+At(" ",qe(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>qe(["...",At("on ",e),qe(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${At("(",qe(n,", "),")")} on ${t} ${At("",qe(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,pz.printBlockString)(e):(0,mz.printString)(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+qe(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+qe(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+At("(",qe(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>At("",e,` +)`)),qe([o,qe(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+At(" ",qe(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>qe(["...",At("on ",e),qe(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${At("(",qe(n,", "),")")} on ${t} ${At("",qe(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,yz.printBlockString)(e):(0,Iz.printString)(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+qe(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+qe(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+At("(",qe(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>At("",e,` `)+qe(["schema",qe(t," "),da(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>At("",e,` `)+qe(["scalar",t,qe(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>At("",e,` `)+qe(["type",t,At("implements ",qe(n," & ")),qe(r," "),da(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>At("",e,` @@ -63,15 +63,15 @@ spurious results.`)}}return!1};iN.instanceOf=M3});var sN=w(nf=>{"use strict";m() `)),` }`)}function At(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function dN(e){return At(" ",e.replace(/\n/g,` `))}function LF(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` -`)))!==null&&t!==void 0?t:!1}});var UI=w(BI=>{"use strict";m();T();N();Object.defineProperty(BI,"__esModule",{value:!0});BI.valueFromASTUntyped=CI;var yz=af(),Ds=wt();function CI(e,t){switch(e.kind){case Ds.Kind.NULL:return null;case Ds.Kind.INT:return parseInt(e.value,10);case Ds.Kind.FLOAT:return parseFloat(e.value);case Ds.Kind.STRING:case Ds.Kind.ENUM:case Ds.Kind.BOOLEAN:return e.value;case Ds.Kind.LIST:return e.values.map(n=>CI(n,t));case Ds.Kind.OBJECT:return(0,yz.keyValMap)(e.fields,n=>n.name.value,n=>CI(n.value,t));case Ds.Kind.VARIABLE:return t==null?void 0:t[e.name.value]}}});var of=w(pN=>{"use strict";m();T();N();Object.defineProperty(pN,"__esModule",{value:!0});pN.assertEnumValueName=Iz;pN.assertName=UF;var CF=Vr(),fN=ze(),BF=eN();function UF(e){if(e!=null||(0,CF.devAssert)(!1,"Must provide name."),typeof e=="string"||(0,CF.devAssert)(!1,"Expected name to be a string."),e.length===0)throw new fN.GraphQLError("Expected name to be a non-empty string.");for(let t=1;t{"use strict";m();T();N();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.GraphQLUnionType=Ge.GraphQLScalarType=Ge.GraphQLObjectType=Ge.GraphQLNonNull=Ge.GraphQLList=Ge.GraphQLInterfaceType=Ge.GraphQLInputObjectType=Ge.GraphQLEnumType=void 0;Ge.argsToArgsConfig=HF;Ge.assertAbstractType=qz;Ge.assertCompositeType=xz;Ge.assertEnumType=wz;Ge.assertInputObjectType=Lz;Ge.assertInputType=Uz;Ge.assertInterfaceType=Pz;Ge.assertLeafType=Mz;Ge.assertListType=Cz;Ge.assertNamedType=$z;Ge.assertNonNullType=Bz;Ge.assertNullableType=jz;Ge.assertObjectType=Rz;Ge.assertOutputType=kz;Ge.assertScalarType=Az;Ge.assertType=bz;Ge.assertUnionType=Fz;Ge.assertWrappingType=Vz;Ge.defineArguments=YF;Ge.getNamedType=Gz;Ge.getNullableType=Kz;Ge.isAbstractType=KF;Ge.isCompositeType=jF;Ge.isEnumType=pc;Ge.isInputObjectType=cf;Ge.isInputType=kI;Ge.isInterfaceType=dc;Ge.isLeafType=VF;Ge.isListType=SN;Ge.isNamedType=$F;Ge.isNonNullType=yu;Ge.isNullableType=xI;Ge.isObjectType=Dl;Ge.isOutputType=MI;Ge.isRequiredArgument=Qz;Ge.isRequiredInputField=Hz;Ge.isScalarType=lc;Ge.isType=ON;Ge.isUnionType=fc;Ge.isWrappingType=lf;Ge.resolveObjMapThunk=VI;Ge.resolveReadonlyArrayThunk=qI;var mr=Vr(),gz=mu(),kF=RF(),Tn=Wt(),hu=tf(),_z=Va(),vz=Nu(),qF=af(),vN=SI(),Oz=Tu(),Ka=cN(),uf=ze(),Sz=wt(),MF=Ti(),Dz=UI(),$a=of();function ON(e){return lc(e)||Dl(e)||dc(e)||fc(e)||pc(e)||cf(e)||SN(e)||yu(e)}function bz(e){if(!ON(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL type.`);return e}function lc(e){return(0,hu.instanceOf)(e,EN)}function Az(e){if(!lc(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Scalar type.`);return e}function Dl(e){return(0,hu.instanceOf)(e,hN)}function Rz(e){if(!Dl(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Object type.`);return e}function dc(e){return(0,hu.instanceOf)(e,yN)}function Pz(e){if(!dc(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Interface type.`);return e}function fc(e){return(0,hu.instanceOf)(e,IN)}function Fz(e){if(!fc(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Union type.`);return e}function pc(e){return(0,hu.instanceOf)(e,gN)}function wz(e){if(!pc(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Enum type.`);return e}function cf(e){return(0,hu.instanceOf)(e,_N)}function Lz(e){if(!cf(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Input Object type.`);return e}function SN(e){return(0,hu.instanceOf)(e,NN)}function Cz(e){if(!SN(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL List type.`);return e}function yu(e){return(0,hu.instanceOf)(e,TN)}function Bz(e){if(!yu(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Non-Null type.`);return e}function kI(e){return lc(e)||pc(e)||cf(e)||lf(e)&&kI(e.ofType)}function Uz(e){if(!kI(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL input type.`);return e}function MI(e){return lc(e)||Dl(e)||dc(e)||fc(e)||pc(e)||lf(e)&&MI(e.ofType)}function kz(e){if(!MI(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL output type.`);return e}function VF(e){return lc(e)||pc(e)}function Mz(e){if(!VF(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL leaf type.`);return e}function jF(e){return Dl(e)||dc(e)||fc(e)}function xz(e){if(!jF(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL composite type.`);return e}function KF(e){return dc(e)||fc(e)}function qz(e){if(!KF(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL abstract type.`);return e}var NN=class{constructor(t){ON(t)||(0,mr.devAssert)(!1,`Expected ${(0,Tn.inspect)(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}};Ge.GraphQLList=NN;var TN=class{constructor(t){xI(t)||(0,mr.devAssert)(!1,`Expected ${(0,Tn.inspect)(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}};Ge.GraphQLNonNull=TN;function lf(e){return SN(e)||yu(e)}function Vz(e){if(!lf(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL wrapping type.`);return e}function xI(e){return ON(e)&&!yu(e)}function jz(e){if(!xI(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL nullable type.`);return e}function Kz(e){if(e)return yu(e)?e.ofType:e}function $F(e){return lc(e)||Dl(e)||dc(e)||fc(e)||pc(e)||cf(e)}function $z(e){if(!$F(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL named type.`);return e}function Gz(e){if(e){let t=e;for(;lf(t);)t=t.ofType;return t}}function qI(e){return typeof e=="function"?e():e}function VI(e){return typeof e=="function"?e():e}var EN=class{constructor(t){var n,r,i,a;let o=(n=t.parseValue)!==null&&n!==void 0?n:kF.identityFunc;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:kF.identityFunc,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(u,l)=>o((0,Dz.valueFromASTUntyped)(u,l)),this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(a=t.extensionASTNodes)!==null&&a!==void 0?a:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||(0,mr.devAssert)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,Tn.inspect)(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||(0,mr.devAssert)(!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.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||(0,mr.devAssert)(!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()}};Ge.GraphQLScalarType=EN;var hN=class{constructor(t){var n;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>QF(t),this._interfaces=()=>GF(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||(0,mr.devAssert)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,Tn.inspect)(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:JF(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLObjectType=hN;function GF(e){var t;let n=qI((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||(0,mr.devAssert)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function QF(e){let t=VI(e.fields);return Sl(t)||(0,mr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,vN.mapValue)(t,(n,r)=>{var i;Sl(n)||(0,mr.devAssert)(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||(0,mr.devAssert)(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${(0,Tn.inspect)(n.resolve)}.`);let a=(i=n.args)!==null&&i!==void 0?i:{};return Sl(a)||(0,mr.devAssert)(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:(0,$a.assertName)(r),description:n.description,type:n.type,args:YF(a),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:(0,Ka.toObjMap)(n.extensions),astNode:n.astNode}})}function YF(e){return Object.entries(e).map(([t,n])=>({name:(0,$a.assertName)(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Ka.toObjMap)(n.extensions),astNode:n.astNode}))}function Sl(e){return(0,_z.isObjectLike)(e)&&!Array.isArray(e)}function JF(e){return(0,vN.mapValue)(e,t=>({description:t.description,type:t.type,args:HF(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function HF(e){return(0,qF.keyValMap)(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Qz(e){return yu(e.type)&&e.defaultValue===void 0}var yN=class{constructor(t){var n;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=QF.bind(void 0,t),this._interfaces=GF.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,mr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Tn.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:JF(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLInterfaceType=yN;var IN=class{constructor(t){var n;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=Yz.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,mr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Tn.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(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()}};Ge.GraphQLUnionType=IN;function Yz(e){let t=qI(e.types);return Array.isArray(t)||(0,mr.devAssert)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var gN=class{constructor(t){var n;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:xF(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=xF(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=(0,vz.keyMap)(this.getValues(),n=>n.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(r=>[r.value,r])));let n=this._valueLookup.get(t);if(n===void 0)throw new uf.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0,Tn.inspect)(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=(0,Tn.inspect)(t);throw new uf.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${r}.`+mN(this,r))}let n=this.getValue(t);if(n==null)throw new uf.GraphQLError(`Value "${t}" does not exist in "${this.name}" enum.`+mN(this,t));return n.value}parseLiteral(t,n){if(t.kind!==Sz.Kind.ENUM){let i=(0,MF.print)(t);throw new uf.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+mN(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=(0,MF.print)(t);throw new uf.GraphQLError(`Value "${i}" does not exist in "${this.name}" enum.`+mN(this,i),{nodes:t})}return r.value}toConfig(){let t=(0,qF.keyValMap)(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLEnumType=gN;function mN(e,t){let n=e.getValues().map(i=>i.name),r=(0,Oz.suggestionList)(t,n);return(0,gz.didYouMean)("the enum value",r)}function xF(e,t){return Sl(t)||(0,mr.devAssert)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(Sl(r)||(0,mr.devAssert)(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${(0,Tn.inspect)(r)}.`),{name:(0,$a.assertEnumValueName)(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:(0,Ka.toObjMap)(r.extensions),astNode:r.astNode}))}var _N=class{constructor(t){var n,r;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this.isOneOf=(r=t.isOneOf)!==null&&r!==void 0?r:!1,this._fields=Jz.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){let t=(0,vN.mapValue)(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLInputObjectType=_N;function Jz(e){let t=VI(e.fields);return Sl(t)||(0,mr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,vN.mapValue)(t,(n,r)=>(!("resolve"in n)||(0,mr.devAssert)(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:(0,$a.assertName)(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Ka.toObjMap)(n.extensions),astNode:n.astNode}))}function Hz(e){return yu(e.type)&&e.defaultValue===void 0}});var ff=w(df=>{"use strict";m();T();N();Object.defineProperty(df,"__esModule",{value:!0});df.doTypesOverlap=zz;df.isEqualType=jI;df.isTypeSubTypeOf=DN;var Rr=Lt();function jI(e,t){return e===t?!0:(0,Rr.isNonNullType)(e)&&(0,Rr.isNonNullType)(t)||(0,Rr.isListType)(e)&&(0,Rr.isListType)(t)?jI(e.ofType,t.ofType):!1}function DN(e,t,n){return t===n?!0:(0,Rr.isNonNullType)(n)?(0,Rr.isNonNullType)(t)?DN(e,t.ofType,n.ofType):!1:(0,Rr.isNonNullType)(t)?DN(e,t.ofType,n):(0,Rr.isListType)(n)?(0,Rr.isListType)(t)?DN(e,t.ofType,n.ofType):!1:(0,Rr.isListType)(t)?!1:(0,Rr.isAbstractType)(n)&&((0,Rr.isInterfaceType)(t)||(0,Rr.isObjectType)(t))&&e.isSubType(n,t)}function zz(e,t,n){return t===n?!0:(0,Rr.isAbstractType)(t)?(0,Rr.isAbstractType)(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):(0,Rr.isAbstractType)(n)?e.isSubType(n,t):!1}});var Ga=w(ar=>{"use strict";m();T();N();Object.defineProperty(ar,"__esModule",{value:!0});ar.GraphQLString=ar.GraphQLInt=ar.GraphQLID=ar.GraphQLFloat=ar.GraphQLBoolean=ar.GRAPHQL_MIN_INT=ar.GRAPHQL_MAX_INT=void 0;ar.isSpecifiedScalarType=Wz;ar.specifiedScalarTypes=void 0;var fa=Wt(),zF=Va(),Nr=ze(),mc=wt(),pf=Ti(),mf=Lt(),bN=2147483647;ar.GRAPHQL_MAX_INT=bN;var AN=-2147483648;ar.GRAPHQL_MIN_INT=AN;var WF=new mf.GraphQLScalarType({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=Nf(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new Nr.GraphQLError(`Int cannot represent non-integer value: ${(0,fa.inspect)(t)}`);if(n>bN||nbN||ebN||te.name===t)}function Nf(e){if((0,zF.isObjectLike)(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!(0,zF.isObjectLike)(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}});var Xr=w(jn=>{"use strict";m();T();N();Object.defineProperty(jn,"__esModule",{value:!0});jn.GraphQLSpecifiedByDirective=jn.GraphQLSkipDirective=jn.GraphQLOneOfDirective=jn.GraphQLIncludeDirective=jn.GraphQLDirective=jn.GraphQLDeprecatedDirective=jn.DEFAULT_DEPRECATION_REASON=void 0;jn.assertDirective=r6;jn.isDirective=iw;jn.isSpecifiedDirective=i6;jn.specifiedDirectives=void 0;var rw=Vr(),Xz=Wt(),Zz=tf(),e6=Va(),t6=cN(),Ci=gl(),n6=of(),Tf=Lt(),RN=Ga();function iw(e){return(0,Zz.instanceOf)(e,bs)}function r6(e){if(!iw(e))throw new Error(`Expected ${(0,Xz.inspect)(e)} to be a GraphQL directive.`);return e}var bs=class{constructor(t){var n,r;this.name=(0,n6.assertName)(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=(0,t6.toObjMap)(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||(0,rw.devAssert)(!1,`@${t.name} locations must be an Array.`);let i=(r=t.args)!==null&&r!==void 0?r:{};(0,e6.isObjectLike)(i)&&!Array.isArray(i)||(0,rw.devAssert)(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=(0,Tf.defineArguments)(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,Tf.argsToArgsConfig)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}};jn.GraphQLDirective=bs;var aw=new bs({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Ci.DirectiveLocation.FIELD,Ci.DirectiveLocation.FRAGMENT_SPREAD,Ci.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Tf.GraphQLNonNull(RN.GraphQLBoolean),description:"Included when true."}}});jn.GraphQLIncludeDirective=aw;var sw=new bs({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Ci.DirectiveLocation.FIELD,Ci.DirectiveLocation.FRAGMENT_SPREAD,Ci.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Tf.GraphQLNonNull(RN.GraphQLBoolean),description:"Skipped when true."}}});jn.GraphQLSkipDirective=sw;var ow="No longer supported";jn.DEFAULT_DEPRECATION_REASON=ow;var uw=new bs({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Ci.DirectiveLocation.FIELD_DEFINITION,Ci.DirectiveLocation.ARGUMENT_DEFINITION,Ci.DirectiveLocation.INPUT_FIELD_DEFINITION,Ci.DirectiveLocation.ENUM_VALUE],args:{reason:{type:RN.GraphQLString,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:ow}}});jn.GraphQLDeprecatedDirective=uw;var cw=new bs({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Ci.DirectiveLocation.SCALAR],args:{url:{type:new Tf.GraphQLNonNull(RN.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});jn.GraphQLSpecifiedByDirective=cw;var lw=new bs({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Ci.DirectiveLocation.INPUT_OBJECT],args:{}});jn.GraphQLOneOfDirective=lw;var dw=Object.freeze([aw,sw,uw,cw,lw]);jn.specifiedDirectives=dw;function i6(e){return dw.some(({name:t})=>t===e.name)}});var PN=w(KI=>{"use strict";m();T();N();Object.defineProperty(KI,"__esModule",{value:!0});KI.isIterableObject=a6;function a6(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}});var yf=w($I=>{"use strict";m();T();N();Object.defineProperty($I,"__esModule",{value:!0});$I.astFromValue=hf;var fw=Wt(),s6=Ar(),o6=PN(),u6=Va(),Bi=wt(),Ef=Lt(),c6=Ga();function hf(e,t){if((0,Ef.isNonNullType)(t)){let n=hf(e,t.ofType);return(n==null?void 0:n.kind)===Bi.Kind.NULL?null:n}if(e===null)return{kind:Bi.Kind.NULL};if(e===void 0)return null;if((0,Ef.isListType)(t)){let n=t.ofType;if((0,o6.isIterableObject)(e)){let r=[];for(let i of e){let a=hf(i,n);a!=null&&r.push(a)}return{kind:Bi.Kind.LIST,values:r}}return hf(e,n)}if((0,Ef.isInputObjectType)(t)){if(!(0,u6.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=hf(e[r.name],r.type);i&&n.push({kind:Bi.Kind.OBJECT_FIELD,name:{kind:Bi.Kind.NAME,value:r.name},value:i})}return{kind:Bi.Kind.OBJECT,fields:n}}if((0,Ef.isLeafType)(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:Bi.Kind.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return pw.test(r)?{kind:Bi.Kind.INT,value:r}:{kind:Bi.Kind.FLOAT,value:r}}if(typeof n=="string")return(0,Ef.isEnumType)(t)?{kind:Bi.Kind.ENUM,value:n}:t===c6.GraphQLID&&pw.test(n)?{kind:Bi.Kind.INT,value:n}:{kind:Bi.Kind.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${(0,fw.inspect)(n)}.`)}(0,s6.invariant)(!1,"Unexpected input type: "+(0,fw.inspect)(t))}var pw=/^-?(?:0|[1-9][0-9]*)$/});var ki=w(Xt=>{"use strict";m();T();N();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.introspectionTypes=Xt.__TypeKind=Xt.__Type=Xt.__Schema=Xt.__InputValue=Xt.__Field=Xt.__EnumValue=Xt.__DirectiveLocation=Xt.__Directive=Xt.TypeNameMetaFieldDef=Xt.TypeMetaFieldDef=Xt.TypeKind=Xt.SchemaMetaFieldDef=void 0;Xt.isIntrospectionType=E6;var l6=Wt(),d6=Ar(),sr=gl(),f6=Ti(),p6=yf(),Ue=Lt(),dn=Ga(),GI=new Ue.GraphQLObjectType({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:dn.GraphQLString,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(Ui))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new Ue.GraphQLNonNull(Ui),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Ui,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Ui,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(QI))),resolve:e=>e.getDirectives()}})});Xt.__Schema=GI;var QI=new Ue.GraphQLObjectType({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. +`)))!==null&&t!==void 0?t:!1}});var UI=F(BI=>{"use strict";m();T();N();Object.defineProperty(BI,"__esModule",{value:!0});BI.valueFromASTUntyped=CI;var Sz=af(),Ds=Lt();function CI(e,t){switch(e.kind){case Ds.Kind.NULL:return null;case Ds.Kind.INT:return parseInt(e.value,10);case Ds.Kind.FLOAT:return parseFloat(e.value);case Ds.Kind.STRING:case Ds.Kind.ENUM:case Ds.Kind.BOOLEAN:return e.value;case Ds.Kind.LIST:return e.values.map(n=>CI(n,t));case Ds.Kind.OBJECT:return(0,Sz.keyValMap)(e.fields,n=>n.name.value,n=>CI(n.value,t));case Ds.Kind.VARIABLE:return t==null?void 0:t[e.name.value]}}});var of=F(pN=>{"use strict";m();T();N();Object.defineProperty(pN,"__esModule",{value:!0});pN.assertEnumValueName=Dz;pN.assertName=UF;var CF=Vr(),fN=Xe(),BF=eN();function UF(e){if(e!=null||(0,CF.devAssert)(!1,"Must provide name."),typeof e=="string"||(0,CF.devAssert)(!1,"Expected name to be a string."),e.length===0)throw new fN.GraphQLError("Expected name to be a non-empty string.");for(let t=1;t{"use strict";m();T();N();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.GraphQLUnionType=Ge.GraphQLScalarType=Ge.GraphQLObjectType=Ge.GraphQLNonNull=Ge.GraphQLList=Ge.GraphQLInterfaceType=Ge.GraphQLInputObjectType=Ge.GraphQLEnumType=void 0;Ge.argsToArgsConfig=HF;Ge.assertAbstractType=Qz;Ge.assertCompositeType=Gz;Ge.assertEnumType=Mz;Ge.assertInputObjectType=xz;Ge.assertInputType=jz;Ge.assertInterfaceType=Uz;Ge.assertLeafType=$z;Ge.assertListType=qz;Ge.assertNamedType=zz;Ge.assertNonNullType=Vz;Ge.assertNullableType=Jz;Ge.assertObjectType=Bz;Ge.assertOutputType=Kz;Ge.assertScalarType=Cz;Ge.assertType=Lz;Ge.assertUnionType=kz;Ge.assertWrappingType=Yz;Ge.defineArguments=YF;Ge.getNamedType=Wz;Ge.getNullableType=Hz;Ge.isAbstractType=KF;Ge.isCompositeType=jF;Ge.isEnumType=pc;Ge.isInputObjectType=cf;Ge.isInputType=kI;Ge.isInterfaceType=dc;Ge.isLeafType=VF;Ge.isListType=SN;Ge.isNamedType=$F;Ge.isNonNullType=yu;Ge.isNullableType=xI;Ge.isObjectType=Dl;Ge.isOutputType=MI;Ge.isRequiredArgument=Xz;Ge.isRequiredInputField=t6;Ge.isScalarType=lc;Ge.isType=ON;Ge.isUnionType=fc;Ge.isWrappingType=lf;Ge.resolveObjMapThunk=VI;Ge.resolveReadonlyArrayThunk=qI;var mr=Vr(),bz=mu(),kF=RF(),Tn=Wt(),hu=tf(),Az=Va(),Rz=Nu(),qF=af(),vN=SI(),Pz=Tu(),Ka=cN(),uf=Xe(),Fz=Lt(),MF=Ti(),wz=UI(),$a=of();function ON(e){return lc(e)||Dl(e)||dc(e)||fc(e)||pc(e)||cf(e)||SN(e)||yu(e)}function Lz(e){if(!ON(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL type.`);return e}function lc(e){return(0,hu.instanceOf)(e,EN)}function Cz(e){if(!lc(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Scalar type.`);return e}function Dl(e){return(0,hu.instanceOf)(e,hN)}function Bz(e){if(!Dl(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Object type.`);return e}function dc(e){return(0,hu.instanceOf)(e,yN)}function Uz(e){if(!dc(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Interface type.`);return e}function fc(e){return(0,hu.instanceOf)(e,IN)}function kz(e){if(!fc(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Union type.`);return e}function pc(e){return(0,hu.instanceOf)(e,gN)}function Mz(e){if(!pc(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Enum type.`);return e}function cf(e){return(0,hu.instanceOf)(e,_N)}function xz(e){if(!cf(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Input Object type.`);return e}function SN(e){return(0,hu.instanceOf)(e,NN)}function qz(e){if(!SN(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL List type.`);return e}function yu(e){return(0,hu.instanceOf)(e,TN)}function Vz(e){if(!yu(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Non-Null type.`);return e}function kI(e){return lc(e)||pc(e)||cf(e)||lf(e)&&kI(e.ofType)}function jz(e){if(!kI(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL input type.`);return e}function MI(e){return lc(e)||Dl(e)||dc(e)||fc(e)||pc(e)||lf(e)&&MI(e.ofType)}function Kz(e){if(!MI(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL output type.`);return e}function VF(e){return lc(e)||pc(e)}function $z(e){if(!VF(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL leaf type.`);return e}function jF(e){return Dl(e)||dc(e)||fc(e)}function Gz(e){if(!jF(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL composite type.`);return e}function KF(e){return dc(e)||fc(e)}function Qz(e){if(!KF(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL abstract type.`);return e}var NN=class{constructor(t){ON(t)||(0,mr.devAssert)(!1,`Expected ${(0,Tn.inspect)(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}};Ge.GraphQLList=NN;var TN=class{constructor(t){xI(t)||(0,mr.devAssert)(!1,`Expected ${(0,Tn.inspect)(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}};Ge.GraphQLNonNull=TN;function lf(e){return SN(e)||yu(e)}function Yz(e){if(!lf(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL wrapping type.`);return e}function xI(e){return ON(e)&&!yu(e)}function Jz(e){if(!xI(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL nullable type.`);return e}function Hz(e){if(e)return yu(e)?e.ofType:e}function $F(e){return lc(e)||Dl(e)||dc(e)||fc(e)||pc(e)||cf(e)}function zz(e){if(!$F(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL named type.`);return e}function Wz(e){if(e){let t=e;for(;lf(t);)t=t.ofType;return t}}function qI(e){return typeof e=="function"?e():e}function VI(e){return typeof e=="function"?e():e}var EN=class{constructor(t){var n,r,i,a;let o=(n=t.parseValue)!==null&&n!==void 0?n:kF.identityFunc;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:kF.identityFunc,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(u,l)=>o((0,wz.valueFromASTUntyped)(u,l)),this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(a=t.extensionASTNodes)!==null&&a!==void 0?a:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||(0,mr.devAssert)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,Tn.inspect)(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||(0,mr.devAssert)(!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.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||(0,mr.devAssert)(!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()}};Ge.GraphQLScalarType=EN;var hN=class{constructor(t){var n;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>QF(t),this._interfaces=()=>GF(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||(0,mr.devAssert)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,Tn.inspect)(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:JF(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLObjectType=hN;function GF(e){var t;let n=qI((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||(0,mr.devAssert)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function QF(e){let t=VI(e.fields);return Sl(t)||(0,mr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,vN.mapValue)(t,(n,r)=>{var i;Sl(n)||(0,mr.devAssert)(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||(0,mr.devAssert)(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${(0,Tn.inspect)(n.resolve)}.`);let a=(i=n.args)!==null&&i!==void 0?i:{};return Sl(a)||(0,mr.devAssert)(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:(0,$a.assertName)(r),description:n.description,type:n.type,args:YF(a),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:(0,Ka.toObjMap)(n.extensions),astNode:n.astNode}})}function YF(e){return Object.entries(e).map(([t,n])=>({name:(0,$a.assertName)(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Ka.toObjMap)(n.extensions),astNode:n.astNode}))}function Sl(e){return(0,Az.isObjectLike)(e)&&!Array.isArray(e)}function JF(e){return(0,vN.mapValue)(e,t=>({description:t.description,type:t.type,args:HF(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function HF(e){return(0,qF.keyValMap)(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Xz(e){return yu(e.type)&&e.defaultValue===void 0}var yN=class{constructor(t){var n;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=QF.bind(void 0,t),this._interfaces=GF.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,mr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Tn.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:JF(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLInterfaceType=yN;var IN=class{constructor(t){var n;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=Zz.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,mr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Tn.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(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()}};Ge.GraphQLUnionType=IN;function Zz(e){let t=qI(e.types);return Array.isArray(t)||(0,mr.devAssert)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var gN=class{constructor(t){var n;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:xF(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=xF(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=(0,Rz.keyMap)(this.getValues(),n=>n.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(r=>[r.value,r])));let n=this._valueLookup.get(t);if(n===void 0)throw new uf.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0,Tn.inspect)(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=(0,Tn.inspect)(t);throw new uf.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${r}.`+mN(this,r))}let n=this.getValue(t);if(n==null)throw new uf.GraphQLError(`Value "${t}" does not exist in "${this.name}" enum.`+mN(this,t));return n.value}parseLiteral(t,n){if(t.kind!==Fz.Kind.ENUM){let i=(0,MF.print)(t);throw new uf.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+mN(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=(0,MF.print)(t);throw new uf.GraphQLError(`Value "${i}" does not exist in "${this.name}" enum.`+mN(this,i),{nodes:t})}return r.value}toConfig(){let t=(0,qF.keyValMap)(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLEnumType=gN;function mN(e,t){let n=e.getValues().map(i=>i.name),r=(0,Pz.suggestionList)(t,n);return(0,bz.didYouMean)("the enum value",r)}function xF(e,t){return Sl(t)||(0,mr.devAssert)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(Sl(r)||(0,mr.devAssert)(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${(0,Tn.inspect)(r)}.`),{name:(0,$a.assertEnumValueName)(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:(0,Ka.toObjMap)(r.extensions),astNode:r.astNode}))}var _N=class{constructor(t){var n,r;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this.isOneOf=(r=t.isOneOf)!==null&&r!==void 0?r:!1,this._fields=e6.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){let t=(0,vN.mapValue)(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLInputObjectType=_N;function e6(e){let t=VI(e.fields);return Sl(t)||(0,mr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,vN.mapValue)(t,(n,r)=>(!("resolve"in n)||(0,mr.devAssert)(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:(0,$a.assertName)(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Ka.toObjMap)(n.extensions),astNode:n.astNode}))}function t6(e){return yu(e.type)&&e.defaultValue===void 0}});var ff=F(df=>{"use strict";m();T();N();Object.defineProperty(df,"__esModule",{value:!0});df.doTypesOverlap=n6;df.isEqualType=jI;df.isTypeSubTypeOf=DN;var Rr=Ct();function jI(e,t){return e===t?!0:(0,Rr.isNonNullType)(e)&&(0,Rr.isNonNullType)(t)||(0,Rr.isListType)(e)&&(0,Rr.isListType)(t)?jI(e.ofType,t.ofType):!1}function DN(e,t,n){return t===n?!0:(0,Rr.isNonNullType)(n)?(0,Rr.isNonNullType)(t)?DN(e,t.ofType,n.ofType):!1:(0,Rr.isNonNullType)(t)?DN(e,t.ofType,n):(0,Rr.isListType)(n)?(0,Rr.isListType)(t)?DN(e,t.ofType,n.ofType):!1:(0,Rr.isListType)(t)?!1:(0,Rr.isAbstractType)(n)&&((0,Rr.isInterfaceType)(t)||(0,Rr.isObjectType)(t))&&e.isSubType(n,t)}function n6(e,t,n){return t===n?!0:(0,Rr.isAbstractType)(t)?(0,Rr.isAbstractType)(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):(0,Rr.isAbstractType)(n)?e.isSubType(n,t):!1}});var Ga=F(ar=>{"use strict";m();T();N();Object.defineProperty(ar,"__esModule",{value:!0});ar.GraphQLString=ar.GraphQLInt=ar.GraphQLID=ar.GraphQLFloat=ar.GraphQLBoolean=ar.GRAPHQL_MIN_INT=ar.GRAPHQL_MAX_INT=void 0;ar.isSpecifiedScalarType=r6;ar.specifiedScalarTypes=void 0;var fa=Wt(),zF=Va(),Nr=Xe(),mc=Lt(),pf=Ti(),mf=Ct(),bN=2147483647;ar.GRAPHQL_MAX_INT=bN;var AN=-2147483648;ar.GRAPHQL_MIN_INT=AN;var WF=new mf.GraphQLScalarType({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=Nf(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new Nr.GraphQLError(`Int cannot represent non-integer value: ${(0,fa.inspect)(t)}`);if(n>bN||nbN||ebN||te.name===t)}function Nf(e){if((0,zF.isObjectLike)(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!(0,zF.isObjectLike)(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}});var Xr=F(jn=>{"use strict";m();T();N();Object.defineProperty(jn,"__esModule",{value:!0});jn.GraphQLSpecifiedByDirective=jn.GraphQLSkipDirective=jn.GraphQLOneOfDirective=jn.GraphQLIncludeDirective=jn.GraphQLDirective=jn.GraphQLDeprecatedDirective=jn.DEFAULT_DEPRECATION_REASON=void 0;jn.assertDirective=c6;jn.isDirective=iw;jn.isSpecifiedDirective=l6;jn.specifiedDirectives=void 0;var rw=Vr(),i6=Wt(),a6=tf(),s6=Va(),o6=cN(),Ci=gl(),u6=of(),Tf=Ct(),RN=Ga();function iw(e){return(0,a6.instanceOf)(e,bs)}function c6(e){if(!iw(e))throw new Error(`Expected ${(0,i6.inspect)(e)} to be a GraphQL directive.`);return e}var bs=class{constructor(t){var n,r;this.name=(0,u6.assertName)(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=(0,o6.toObjMap)(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||(0,rw.devAssert)(!1,`@${t.name} locations must be an Array.`);let i=(r=t.args)!==null&&r!==void 0?r:{};(0,s6.isObjectLike)(i)&&!Array.isArray(i)||(0,rw.devAssert)(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=(0,Tf.defineArguments)(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,Tf.argsToArgsConfig)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}};jn.GraphQLDirective=bs;var aw=new bs({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Ci.DirectiveLocation.FIELD,Ci.DirectiveLocation.FRAGMENT_SPREAD,Ci.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Tf.GraphQLNonNull(RN.GraphQLBoolean),description:"Included when true."}}});jn.GraphQLIncludeDirective=aw;var sw=new bs({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Ci.DirectiveLocation.FIELD,Ci.DirectiveLocation.FRAGMENT_SPREAD,Ci.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Tf.GraphQLNonNull(RN.GraphQLBoolean),description:"Skipped when true."}}});jn.GraphQLSkipDirective=sw;var ow="No longer supported";jn.DEFAULT_DEPRECATION_REASON=ow;var uw=new bs({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Ci.DirectiveLocation.FIELD_DEFINITION,Ci.DirectiveLocation.ARGUMENT_DEFINITION,Ci.DirectiveLocation.INPUT_FIELD_DEFINITION,Ci.DirectiveLocation.ENUM_VALUE],args:{reason:{type:RN.GraphQLString,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:ow}}});jn.GraphQLDeprecatedDirective=uw;var cw=new bs({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Ci.DirectiveLocation.SCALAR],args:{url:{type:new Tf.GraphQLNonNull(RN.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});jn.GraphQLSpecifiedByDirective=cw;var lw=new bs({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Ci.DirectiveLocation.INPUT_OBJECT],args:{}});jn.GraphQLOneOfDirective=lw;var dw=Object.freeze([aw,sw,uw,cw,lw]);jn.specifiedDirectives=dw;function l6(e){return dw.some(({name:t})=>t===e.name)}});var PN=F(KI=>{"use strict";m();T();N();Object.defineProperty(KI,"__esModule",{value:!0});KI.isIterableObject=d6;function d6(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}});var yf=F($I=>{"use strict";m();T();N();Object.defineProperty($I,"__esModule",{value:!0});$I.astFromValue=hf;var fw=Wt(),f6=Ar(),p6=PN(),m6=Va(),Bi=Lt(),Ef=Ct(),N6=Ga();function hf(e,t){if((0,Ef.isNonNullType)(t)){let n=hf(e,t.ofType);return(n==null?void 0:n.kind)===Bi.Kind.NULL?null:n}if(e===null)return{kind:Bi.Kind.NULL};if(e===void 0)return null;if((0,Ef.isListType)(t)){let n=t.ofType;if((0,p6.isIterableObject)(e)){let r=[];for(let i of e){let a=hf(i,n);a!=null&&r.push(a)}return{kind:Bi.Kind.LIST,values:r}}return hf(e,n)}if((0,Ef.isInputObjectType)(t)){if(!(0,m6.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=hf(e[r.name],r.type);i&&n.push({kind:Bi.Kind.OBJECT_FIELD,name:{kind:Bi.Kind.NAME,value:r.name},value:i})}return{kind:Bi.Kind.OBJECT,fields:n}}if((0,Ef.isLeafType)(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:Bi.Kind.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return pw.test(r)?{kind:Bi.Kind.INT,value:r}:{kind:Bi.Kind.FLOAT,value:r}}if(typeof n=="string")return(0,Ef.isEnumType)(t)?{kind:Bi.Kind.ENUM,value:n}:t===N6.GraphQLID&&pw.test(n)?{kind:Bi.Kind.INT,value:n}:{kind:Bi.Kind.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${(0,fw.inspect)(n)}.`)}(0,f6.invariant)(!1,"Unexpected input type: "+(0,fw.inspect)(t))}var pw=/^-?(?:0|[1-9][0-9]*)$/});var ki=F(Xt=>{"use strict";m();T();N();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.introspectionTypes=Xt.__TypeKind=Xt.__Type=Xt.__Schema=Xt.__InputValue=Xt.__Field=Xt.__EnumValue=Xt.__DirectiveLocation=Xt.__Directive=Xt.TypeNameMetaFieldDef=Xt.TypeMetaFieldDef=Xt.TypeKind=Xt.SchemaMetaFieldDef=void 0;Xt.isIntrospectionType=v6;var T6=Wt(),E6=Ar(),sr=gl(),h6=Ti(),y6=yf(),ke=Ct(),dn=Ga(),GI=new ke.GraphQLObjectType({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:dn.GraphQLString,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(Ui))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new ke.GraphQLNonNull(Ui),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Ui,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Ui,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(QI))),resolve:e=>e.getDirectives()}})});Xt.__Schema=GI;var QI=new ke.GraphQLObjectType({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. -In 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 Ue.GraphQLNonNull(dn.GraphQLString),resolve:e=>e.name},description:{type:dn.GraphQLString,resolve:e=>e.description},isRepeatable:{type:new Ue.GraphQLNonNull(dn.GraphQLBoolean),resolve:e=>e.isRepeatable},locations:{type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(YI))),resolve:e=>e.locations},args:{type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(If))),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})});Xt.__Directive=QI;var YI=new Ue.GraphQLEnumType({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:sr.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:sr.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:sr.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:sr.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:sr.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:sr.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:sr.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:sr.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:sr.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:sr.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:sr.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:sr.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:sr.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:sr.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:sr.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:sr.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:sr.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:sr.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:sr.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});Xt.__DirectiveLocation=YI;var Ui=new Ue.GraphQLObjectType({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 Ue.GraphQLNonNull(zI),resolve(e){if((0,Ue.isScalarType)(e))return or.SCALAR;if((0,Ue.isObjectType)(e))return or.OBJECT;if((0,Ue.isInterfaceType)(e))return or.INTERFACE;if((0,Ue.isUnionType)(e))return or.UNION;if((0,Ue.isEnumType)(e))return or.ENUM;if((0,Ue.isInputObjectType)(e))return or.INPUT_OBJECT;if((0,Ue.isListType)(e))return or.LIST;if((0,Ue.isNonNullType)(e))return or.NON_NULL;(0,d6.invariant)(!1,`Unexpected type: "${(0,l6.inspect)(e)}".`)}},name:{type:dn.GraphQLString,resolve:e=>"name"in e?e.name:void 0},description:{type:dn.GraphQLString,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:dn.GraphQLString,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(JI)),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,Ue.isObjectType)(e)||(0,Ue.isInterfaceType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(Ui)),resolve(e){if((0,Ue.isObjectType)(e)||(0,Ue.isInterfaceType)(e))return e.getInterfaces()}},possibleTypes:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(Ui)),resolve(e,t,n,{schema:r}){if((0,Ue.isAbstractType)(e))return r.getPossibleTypes(e)}},enumValues:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(HI)),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,Ue.isEnumType)(e)){let n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(If)),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,Ue.isInputObjectType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Ui,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:dn.GraphQLBoolean,resolve:e=>{if((0,Ue.isInputObjectType)(e))return e.isOneOf}}})});Xt.__Type=Ui;var JI=new Ue.GraphQLObjectType({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 Ue.GraphQLNonNull(dn.GraphQLString),resolve:e=>e.name},description:{type:dn.GraphQLString,resolve:e=>e.description},args:{type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(If))),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new Ue.GraphQLNonNull(Ui),resolve:e=>e.type},isDeprecated:{type:new Ue.GraphQLNonNull(dn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:dn.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__Field=JI;var If=new Ue.GraphQLObjectType({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 Ue.GraphQLNonNull(dn.GraphQLString),resolve:e=>e.name},description:{type:dn.GraphQLString,resolve:e=>e.description},type:{type:new Ue.GraphQLNonNull(Ui),resolve:e=>e.type},defaultValue:{type:dn.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=(0,p6.astFromValue)(n,t);return r?(0,f6.print)(r):null}},isDeprecated:{type:new Ue.GraphQLNonNull(dn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:dn.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__InputValue=If;var HI=new Ue.GraphQLObjectType({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 Ue.GraphQLNonNull(dn.GraphQLString),resolve:e=>e.name},description:{type:dn.GraphQLString,resolve:e=>e.description},isDeprecated:{type:new Ue.GraphQLNonNull(dn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:dn.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__EnumValue=HI;var or;Xt.TypeKind=or;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(or||(Xt.TypeKind=or={}));var zI=new Ue.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:or.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:or.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:or.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:or.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:or.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:or.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:or.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:or.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});Xt.__TypeKind=zI;var m6={name:"__schema",type:new Ue.GraphQLNonNull(GI),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Xt.SchemaMetaFieldDef=m6;var N6={name:"__type",type:Ui,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new Ue.GraphQLNonNull(dn.GraphQLString),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Xt.TypeMetaFieldDef=N6;var T6={name:"__typename",type:new Ue.GraphQLNonNull(dn.GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Xt.TypeNameMetaFieldDef=T6;var mw=Object.freeze([GI,QI,YI,Ui,JI,If,HI,zI]);Xt.introspectionTypes=mw;function E6(e){return mw.some(({name:t})=>e.name===t)}});var Nc=w(bl=>{"use strict";m();T();N();Object.defineProperty(bl,"__esModule",{value:!0});bl.GraphQLSchema=void 0;bl.assertSchema=_6;bl.isSchema=Tw;var FN=Vr(),XI=Wt(),h6=tf(),y6=Va(),I6=cN(),WI=ja(),pa=Lt(),Nw=Xr(),g6=ki();function Tw(e){return(0,h6.instanceOf)(e,wN)}function _6(e){if(!Tw(e))throw new Error(`Expected ${(0,XI.inspect)(e)} to be a GraphQL schema.`);return e}var wN=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,(0,y6.isObjectLike)(t)||(0,FN.devAssert)(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||(0,FN.devAssert)(!1,`"types" must be Array if provided but got: ${(0,XI.inspect)(t.types)}.`),!t.directives||Array.isArray(t.directives)||(0,FN.devAssert)(!1,`"directives" must be Array if provided but got: ${(0,XI.inspect)(t.directives)}.`),this.description=t.description,this.extensions=(0,I6.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(r=t.directives)!==null&&r!==void 0?r:Nw.specifiedDirectives;let i=new Set(t.types);if(t.types!=null)for(let a of t.types)i.delete(a),ma(a,i);this._queryType!=null&&ma(this._queryType,i),this._mutationType!=null&&ma(this._mutationType,i),this._subscriptionType!=null&&ma(this._subscriptionType,i);for(let a of this._directives)if((0,Nw.isDirective)(a))for(let o of a.args)ma(o.type,i);ma(g6.__Schema,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let a of i){if(a==null)continue;let o=a.name;if(o||(0,FN.devAssert)(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=a,(0,pa.isInterfaceType)(a)){for(let u of a.getInterfaces())if((0,pa.isInterfaceType)(u)){let l=this._implementationsMap[u.name];l===void 0&&(l=this._implementationsMap[u.name]={objects:[],interfaces:[]}),l.interfaces.push(a)}}else if((0,pa.isObjectType)(a)){for(let u of a.getInterfaces())if((0,pa.isInterfaceType)(u)){let l=this._implementationsMap[u.name];l===void 0&&(l=this._implementationsMap[u.name]={objects:[],interfaces:[]}),l.objects.push(a)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case WI.OperationTypeNode.QUERY:return this.getQueryType();case WI.OperationTypeNode.MUTATION:return this.getMutationType();case WI.OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return(0,pa.isUnionType)(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){let n=this._implementationsMap[t.name];return n!=null?n:{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),(0,pa.isUnionType)(t))for(let i of t.getTypes())r[i.name]=!0;else{let i=this.getImplementations(t);for(let a of i.objects)r[a.name]=!0;for(let a of i.interfaces)r[a.name]=!0}this._subTypeMap[t.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}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:this.__validationErrors!==void 0}}};bl.GraphQLSchema=wN;function ma(e,t){let n=(0,pa.getNamedType)(e);if(!t.has(n)){if(t.add(n),(0,pa.isUnionType)(n))for(let r of n.getTypes())ma(r,t);else if((0,pa.isObjectType)(n)||(0,pa.isInterfaceType)(n)){for(let r of n.getInterfaces())ma(r,t);for(let r of Object.values(n.getFields())){ma(r.type,t);for(let i of r.args)ma(i.type,t)}}else if((0,pa.isInputObjectType)(n))for(let r of Object.values(n.getFields()))ma(r.type,t)}return t}});var _f=w(LN=>{"use strict";m();T();N();Object.defineProperty(LN,"__esModule",{value:!0});LN.assertValidSchema=D6;LN.validateSchema=_w;var Pr=Wt(),v6=ze(),ZI=ja(),Ew=ff(),Bn=Lt(),gw=Xr(),O6=ki(),S6=Nc();function _w(e){if((0,S6.assertSchema)(e),e.__validationErrors)return e.__validationErrors;let t=new tg(e);b6(t),A6(t),R6(t);let n=t.getErrors();return e.__validationErrors=n,n}function D6(e){let t=_w(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` +In 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 ke.GraphQLNonNull(dn.GraphQLString),resolve:e=>e.name},description:{type:dn.GraphQLString,resolve:e=>e.description},isRepeatable:{type:new ke.GraphQLNonNull(dn.GraphQLBoolean),resolve:e=>e.isRepeatable},locations:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(YI))),resolve:e=>e.locations},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(If))),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})});Xt.__Directive=QI;var YI=new ke.GraphQLEnumType({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:sr.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:sr.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:sr.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:sr.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:sr.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:sr.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:sr.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:sr.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:sr.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:sr.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:sr.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:sr.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:sr.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:sr.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:sr.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:sr.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:sr.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:sr.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:sr.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});Xt.__DirectiveLocation=YI;var Ui=new ke.GraphQLObjectType({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 ke.GraphQLNonNull(zI),resolve(e){if((0,ke.isScalarType)(e))return or.SCALAR;if((0,ke.isObjectType)(e))return or.OBJECT;if((0,ke.isInterfaceType)(e))return or.INTERFACE;if((0,ke.isUnionType)(e))return or.UNION;if((0,ke.isEnumType)(e))return or.ENUM;if((0,ke.isInputObjectType)(e))return or.INPUT_OBJECT;if((0,ke.isListType)(e))return or.LIST;if((0,ke.isNonNullType)(e))return or.NON_NULL;(0,E6.invariant)(!1,`Unexpected type: "${(0,T6.inspect)(e)}".`)}},name:{type:dn.GraphQLString,resolve:e=>"name"in e?e.name:void 0},description:{type:dn.GraphQLString,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:dn.GraphQLString,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new ke.GraphQLList(new ke.GraphQLNonNull(JI)),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,ke.isObjectType)(e)||(0,ke.isInterfaceType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new ke.GraphQLList(new ke.GraphQLNonNull(Ui)),resolve(e){if((0,ke.isObjectType)(e)||(0,ke.isInterfaceType)(e))return e.getInterfaces()}},possibleTypes:{type:new ke.GraphQLList(new ke.GraphQLNonNull(Ui)),resolve(e,t,n,{schema:r}){if((0,ke.isAbstractType)(e))return r.getPossibleTypes(e)}},enumValues:{type:new ke.GraphQLList(new ke.GraphQLNonNull(HI)),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,ke.isEnumType)(e)){let n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new ke.GraphQLList(new ke.GraphQLNonNull(If)),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,ke.isInputObjectType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Ui,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:dn.GraphQLBoolean,resolve:e=>{if((0,ke.isInputObjectType)(e))return e.isOneOf}}})});Xt.__Type=Ui;var JI=new ke.GraphQLObjectType({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 ke.GraphQLNonNull(dn.GraphQLString),resolve:e=>e.name},description:{type:dn.GraphQLString,resolve:e=>e.description},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(If))),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new ke.GraphQLNonNull(Ui),resolve:e=>e.type},isDeprecated:{type:new ke.GraphQLNonNull(dn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:dn.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__Field=JI;var If=new ke.GraphQLObjectType({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 ke.GraphQLNonNull(dn.GraphQLString),resolve:e=>e.name},description:{type:dn.GraphQLString,resolve:e=>e.description},type:{type:new ke.GraphQLNonNull(Ui),resolve:e=>e.type},defaultValue:{type:dn.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=(0,y6.astFromValue)(n,t);return r?(0,h6.print)(r):null}},isDeprecated:{type:new ke.GraphQLNonNull(dn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:dn.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__InputValue=If;var HI=new ke.GraphQLObjectType({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 ke.GraphQLNonNull(dn.GraphQLString),resolve:e=>e.name},description:{type:dn.GraphQLString,resolve:e=>e.description},isDeprecated:{type:new ke.GraphQLNonNull(dn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:dn.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__EnumValue=HI;var or;Xt.TypeKind=or;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(or||(Xt.TypeKind=or={}));var zI=new ke.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:or.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:or.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:or.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:or.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:or.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:or.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:or.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:or.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});Xt.__TypeKind=zI;var I6={name:"__schema",type:new ke.GraphQLNonNull(GI),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Xt.SchemaMetaFieldDef=I6;var g6={name:"__type",type:Ui,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new ke.GraphQLNonNull(dn.GraphQLString),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Xt.TypeMetaFieldDef=g6;var _6={name:"__typename",type:new ke.GraphQLNonNull(dn.GraphQLString),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0};Xt.TypeNameMetaFieldDef=_6;var mw=Object.freeze([GI,QI,YI,Ui,JI,If,HI,zI]);Xt.introspectionTypes=mw;function v6(e){return mw.some(({name:t})=>e.name===t)}});var Nc=F(bl=>{"use strict";m();T();N();Object.defineProperty(bl,"__esModule",{value:!0});bl.GraphQLSchema=void 0;bl.assertSchema=A6;bl.isSchema=Tw;var FN=Vr(),XI=Wt(),O6=tf(),S6=Va(),D6=cN(),WI=ja(),pa=Ct(),Nw=Xr(),b6=ki();function Tw(e){return(0,O6.instanceOf)(e,wN)}function A6(e){if(!Tw(e))throw new Error(`Expected ${(0,XI.inspect)(e)} to be a GraphQL schema.`);return e}var wN=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,(0,S6.isObjectLike)(t)||(0,FN.devAssert)(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||(0,FN.devAssert)(!1,`"types" must be Array if provided but got: ${(0,XI.inspect)(t.types)}.`),!t.directives||Array.isArray(t.directives)||(0,FN.devAssert)(!1,`"directives" must be Array if provided but got: ${(0,XI.inspect)(t.directives)}.`),this.description=t.description,this.extensions=(0,D6.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(r=t.directives)!==null&&r!==void 0?r:Nw.specifiedDirectives;let i=new Set(t.types);if(t.types!=null)for(let a of t.types)i.delete(a),ma(a,i);this._queryType!=null&&ma(this._queryType,i),this._mutationType!=null&&ma(this._mutationType,i),this._subscriptionType!=null&&ma(this._subscriptionType,i);for(let a of this._directives)if((0,Nw.isDirective)(a))for(let o of a.args)ma(o.type,i);ma(b6.__Schema,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let a of i){if(a==null)continue;let o=a.name;if(o||(0,FN.devAssert)(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=a,(0,pa.isInterfaceType)(a)){for(let u of a.getInterfaces())if((0,pa.isInterfaceType)(u)){let l=this._implementationsMap[u.name];l===void 0&&(l=this._implementationsMap[u.name]={objects:[],interfaces:[]}),l.interfaces.push(a)}}else if((0,pa.isObjectType)(a)){for(let u of a.getInterfaces())if((0,pa.isInterfaceType)(u)){let l=this._implementationsMap[u.name];l===void 0&&(l=this._implementationsMap[u.name]={objects:[],interfaces:[]}),l.objects.push(a)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case WI.OperationTypeNode.QUERY:return this.getQueryType();case WI.OperationTypeNode.MUTATION:return this.getMutationType();case WI.OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return(0,pa.isUnionType)(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){let n=this._implementationsMap[t.name];return n!=null?n:{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),(0,pa.isUnionType)(t))for(let i of t.getTypes())r[i.name]=!0;else{let i=this.getImplementations(t);for(let a of i.objects)r[a.name]=!0;for(let a of i.interfaces)r[a.name]=!0}this._subTypeMap[t.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}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:this.__validationErrors!==void 0}}};bl.GraphQLSchema=wN;function ma(e,t){let n=(0,pa.getNamedType)(e);if(!t.has(n)){if(t.add(n),(0,pa.isUnionType)(n))for(let r of n.getTypes())ma(r,t);else if((0,pa.isObjectType)(n)||(0,pa.isInterfaceType)(n)){for(let r of n.getInterfaces())ma(r,t);for(let r of Object.values(n.getFields())){ma(r.type,t);for(let i of r.args)ma(i.type,t)}}else if((0,pa.isInputObjectType)(n))for(let r of Object.values(n.getFields()))ma(r.type,t)}return t}});var _f=F(LN=>{"use strict";m();T();N();Object.defineProperty(LN,"__esModule",{value:!0});LN.assertValidSchema=w6;LN.validateSchema=_w;var Pr=Wt(),R6=Xe(),ZI=ja(),Ew=ff(),Bn=Ct(),gw=Xr(),P6=ki(),F6=Nc();function _w(e){if((0,F6.assertSchema)(e),e.__validationErrors)return e.__validationErrors;let t=new tg(e);L6(t),C6(t),B6(t);let n=t.getErrors();return e.__validationErrors=n,n}function w6(e){let t=_w(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}var tg=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new v6.GraphQLError(t,{nodes:r}))}getErrors(){return this._errors}};function b6(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,Bn.isObjectType)(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${(0,Pr.inspect)(n)}.`,(r=eg(t,ZI.OperationTypeNode.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!(0,Bn.isObjectType)(i)){var a;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,Pr.inspect)(i)}.`,(a=eg(t,ZI.OperationTypeNode.MUTATION))!==null&&a!==void 0?a:i.astNode)}let o=t.getSubscriptionType();if(o&&!(0,Bn.isObjectType)(o)){var u;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,Pr.inspect)(o)}.`,(u=eg(t,ZI.OperationTypeNode.SUBSCRIPTION))!==null&&u!==void 0?u:o.astNode)}}function eg(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return(i=r==null?void 0:r.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function A6(e){for(let n of e.schema.getDirectives()){if(!(0,gw.isDirective)(n)){e.reportError(`Expected directive but got: ${(0,Pr.inspect)(n)}.`,n==null?void 0:n.astNode);continue}Tc(e,n);for(let r of n.args)if(Tc(e,r),(0,Bn.isInputType)(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${(0,Pr.inspect)(r.type)}.`,r.astNode),(0,Bn.isRequiredArgument)(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[ng(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function Tc(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function R6(e){let t=U6(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!(0,Bn.isNamedType)(r)){e.reportError(`Expected GraphQL named type but got: ${(0,Pr.inspect)(r)}.`,r.astNode);continue}(0,O6.isIntrospectionType)(r)||Tc(e,r),(0,Bn.isObjectType)(r)||(0,Bn.isInterfaceType)(r)?(hw(e,r),yw(e,r)):(0,Bn.isUnionType)(r)?w6(e,r):(0,Bn.isEnumType)(r)?L6(e,r):(0,Bn.isInputObjectType)(r)&&(C6(e,r),t(r))}}function hw(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let o of n){if(Tc(e,o),!(0,Bn.isOutputType)(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${(0,Pr.inspect)(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(let u of o.args){let l=u.name;if(Tc(e,u),!(0,Bn.isInputType)(u.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${(0,Pr.inspect)(u.type)}.`,(i=u.astNode)===null||i===void 0?void 0:i.type)}if((0,Bn.isRequiredArgument)(u)&&u.deprecationReason!=null){var a;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[ng(u.astNode),(a=u.astNode)===null||a===void 0?void 0:a.type])}}}}function yw(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!(0,Bn.isInterfaceType)(r)){e.reportError(`Type ${(0,Pr.inspect)(t)} must only implement Interface types, it cannot implement ${(0,Pr.inspect)(r)}.`,gf(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,gf(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,gf(t,r));continue}n[r.name]=!0,F6(e,t,r),P6(e,t,r)}}function P6(e,t,n){let r=t.getFields();for(let l of Object.values(n.getFields())){let d=l.name,p=r[d];if(!p){e.reportError(`Interface field ${n.name}.${d} expected but ${t.name} does not provide it.`,[l.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!(0,Ew.isTypeSubTypeOf)(e.schema,p.type,l.type)){var i,a;e.reportError(`Interface field ${n.name}.${d} expects type ${(0,Pr.inspect)(l.type)} but ${t.name}.${d} is type ${(0,Pr.inspect)(p.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(a=p.astNode)===null||a===void 0?void 0:a.type])}for(let E of l.args){let I=E.name,v=p.args.find(A=>A.name===I);if(!v){e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expected but ${t.name}.${d} does not provide it.`,[E.astNode,p.astNode]);continue}if(!(0,Ew.isEqualType)(E.type,v.type)){var o,u;e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expects type ${(0,Pr.inspect)(E.type)} but ${t.name}.${d}(${I}:) is type ${(0,Pr.inspect)(v.type)}.`,[(o=E.astNode)===null||o===void 0?void 0:o.type,(u=v.astNode)===null||u===void 0?void 0:u.type])}}for(let E of p.args){let I=E.name;!l.args.find(A=>A.name===I)&&(0,Bn.isRequiredArgument)(E)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${I} that is missing from the Interface field ${n.name}.${d}.`,[E.astNode,l.astNode])}}}function F6(e,t,n){let r=t.getInterfaces();for(let i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...gf(n,i),...gf(t,n)])}function w6(e,t){let n=t.getTypes();n.length===0&&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 n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,Iw(t,i.name));continue}r[i.name]=!0,(0,Bn.isObjectType)(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,Pr.inspect)(i)}.`,Iw(t,String(i)))}}function L6(e,t){let n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(let r of n)Tc(e,r)}function C6(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let a of n){if(Tc(e,a),!(0,Bn.isInputType)(a.type)){var r;e.reportError(`The type of ${t.name}.${a.name} must be Input Type but got: ${(0,Pr.inspect)(a.type)}.`,(r=a.astNode)===null||r===void 0?void 0:r.type)}if((0,Bn.isRequiredInputField)(a)&&a.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${a.name} cannot be deprecated.`,[ng(a.astNode),(i=a.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&B6(t,a,e)}}function B6(e,t,n){if((0,Bn.isNonNullType)(t.type)){var r;n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(r=t.astNode)===null||r===void 0?void 0:r.type)}t.defaultValue!==void 0&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function U6(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(a){if(t[a.name])return;t[a.name]=!0,r[a.name]=n.length;let o=Object.values(a.getFields());for(let u of o)if((0,Bn.isNonNullType)(u.type)&&(0,Bn.isInputObjectType)(u.type.ofType)){let l=u.type.ofType,d=r[l.name];if(n.push(u),d===void 0)i(l);else{let p=n.slice(d),E=p.map(I=>I.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${E}".`,p.map(I=>I.astNode))}n.pop()}r[a.name]=void 0}}function gf(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var o;return(o=a.interfaces)!==null&&o!==void 0?o:[]}).filter(a=>a.name.value===t.name)}function Iw(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var o;return(o=a.types)!==null&&o!==void 0?o:[]}).filter(a=>a.name.value===t)}function ng(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===gw.GraphQLDeprecatedDirective.name)}});var Qa=w(ag=>{"use strict";m();T();N();Object.defineProperty(ag,"__esModule",{value:!0});ag.typeFromAST=ig;var rg=wt(),vw=Lt();function ig(e,t){switch(t.kind){case rg.Kind.LIST_TYPE:{let n=ig(e,t.type);return n&&new vw.GraphQLList(n)}case rg.Kind.NON_NULL_TYPE:{let n=ig(e,t.type);return n&&new vw.GraphQLNonNull(n)}case rg.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var CN=w(vf=>{"use strict";m();T();N();Object.defineProperty(vf,"__esModule",{value:!0});vf.TypeInfo=void 0;vf.visitWithTypeInfo=x6;var k6=ja(),Un=wt(),Ow=cc(),kn=Lt(),Al=ki(),Sw=Qa(),sg=class{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r!=null?r:M6,n&&((0,kn.isInputType)(n)&&this._inputTypeStack.push(n),(0,kn.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,kn.isOutputType)(n)&&this._typeStack.push(n))}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(t){let n=this._schema;switch(t.kind){case Un.Kind.SELECTION_SET:{let i=(0,kn.getNamedType)(this.getType());this._parentTypeStack.push((0,kn.isCompositeType)(i)?i:void 0);break}case Un.Kind.FIELD:{let i=this.getParentType(),a,o;i&&(a=this._getFieldDef(n,i,t),a&&(o=a.type)),this._fieldDefStack.push(a),this._typeStack.push((0,kn.isOutputType)(o)?o:void 0);break}case Un.Kind.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case Un.Kind.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push((0,kn.isObjectType)(i)?i:void 0);break}case Un.Kind.INLINE_FRAGMENT:case Un.Kind.FRAGMENT_DEFINITION:{let i=t.typeCondition,a=i?(0,Sw.typeFromAST)(n,i):(0,kn.getNamedType)(this.getType());this._typeStack.push((0,kn.isOutputType)(a)?a:void 0);break}case Un.Kind.VARIABLE_DEFINITION:{let i=(0,Sw.typeFromAST)(n,t.type);this._inputTypeStack.push((0,kn.isInputType)(i)?i:void 0);break}case Un.Kind.ARGUMENT:{var r;let i,a,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(u=>u.name===t.name.value),i&&(a=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.LIST:{let i=(0,kn.getNullableType)(this.getInputType()),a=(0,kn.isListType)(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.OBJECT_FIELD:{let i=(0,kn.getNamedType)(this.getInputType()),a,o;(0,kn.isInputObjectType)(i)&&(o=i.getFields()[t.name.value],o&&(a=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.ENUM:{let i=(0,kn.getNamedType)(this.getInputType()),a;(0,kn.isEnumType)(i)&&(a=i.getValue(t.value)),this._enumValue=a;break}default:}}leave(t){switch(t.kind){case Un.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Un.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Un.Kind.DIRECTIVE:this._directive=null;break;case Un.Kind.OPERATION_DEFINITION:case Un.Kind.INLINE_FRAGMENT:case Un.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Un.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Un.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Un.Kind.LIST:case Un.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Un.Kind.ENUM:this._enumValue=null;break;default:}}};vf.TypeInfo=sg;function M6(e,t,n){let r=n.name.value;if(r===Al.SchemaMetaFieldDef.name&&e.getQueryType()===t)return Al.SchemaMetaFieldDef;if(r===Al.TypeMetaFieldDef.name&&e.getQueryType()===t)return Al.TypeMetaFieldDef;if(r===Al.TypeNameMetaFieldDef.name&&(0,kn.isCompositeType)(t))return Al.TypeNameMetaFieldDef;if((0,kn.isObjectType)(t)||(0,kn.isInterfaceType)(t))return t.getFields()[r]}function x6(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=(0,Ow.getEnterLeaveForKind)(t,r.kind).enter;if(i){let a=i.apply(t,n);return a!==void 0&&(e.leave(r),(0,k6.isNode)(a)&&e.enter(a)),a}},leave(...n){let r=n[0],i=(0,Ow.getEnterLeaveForKind)(t,r.kind).leave,a;return i&&(a=i.apply(t,n)),e.leave(r),a}}}});var Ec=w(Mi=>{"use strict";m();T();N();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.isConstValueNode=og;Mi.isDefinitionNode=q6;Mi.isExecutableDefinitionNode=Dw;Mi.isSelectionNode=V6;Mi.isTypeDefinitionNode=Rw;Mi.isTypeExtensionNode=Fw;Mi.isTypeNode=j6;Mi.isTypeSystemDefinitionNode=Aw;Mi.isTypeSystemExtensionNode=Pw;Mi.isValueNode=bw;var Ct=wt();function q6(e){return Dw(e)||Aw(e)||Pw(e)}function Dw(e){return e.kind===Ct.Kind.OPERATION_DEFINITION||e.kind===Ct.Kind.FRAGMENT_DEFINITION}function V6(e){return e.kind===Ct.Kind.FIELD||e.kind===Ct.Kind.FRAGMENT_SPREAD||e.kind===Ct.Kind.INLINE_FRAGMENT}function bw(e){return e.kind===Ct.Kind.VARIABLE||e.kind===Ct.Kind.INT||e.kind===Ct.Kind.FLOAT||e.kind===Ct.Kind.STRING||e.kind===Ct.Kind.BOOLEAN||e.kind===Ct.Kind.NULL||e.kind===Ct.Kind.ENUM||e.kind===Ct.Kind.LIST||e.kind===Ct.Kind.OBJECT}function og(e){return bw(e)&&(e.kind===Ct.Kind.LIST?e.values.some(og):e.kind===Ct.Kind.OBJECT?e.fields.some(t=>og(t.value)):e.kind!==Ct.Kind.VARIABLE)}function j6(e){return e.kind===Ct.Kind.NAMED_TYPE||e.kind===Ct.Kind.LIST_TYPE||e.kind===Ct.Kind.NON_NULL_TYPE}function Aw(e){return e.kind===Ct.Kind.SCHEMA_DEFINITION||Rw(e)||e.kind===Ct.Kind.DIRECTIVE_DEFINITION}function Rw(e){return e.kind===Ct.Kind.SCALAR_TYPE_DEFINITION||e.kind===Ct.Kind.OBJECT_TYPE_DEFINITION||e.kind===Ct.Kind.INTERFACE_TYPE_DEFINITION||e.kind===Ct.Kind.UNION_TYPE_DEFINITION||e.kind===Ct.Kind.ENUM_TYPE_DEFINITION||e.kind===Ct.Kind.INPUT_OBJECT_TYPE_DEFINITION}function Pw(e){return e.kind===Ct.Kind.SCHEMA_EXTENSION||Fw(e)}function Fw(e){return e.kind===Ct.Kind.SCALAR_TYPE_EXTENSION||e.kind===Ct.Kind.OBJECT_TYPE_EXTENSION||e.kind===Ct.Kind.INTERFACE_TYPE_EXTENSION||e.kind===Ct.Kind.UNION_TYPE_EXTENSION||e.kind===Ct.Kind.ENUM_TYPE_EXTENSION||e.kind===Ct.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var cg=w(ug=>{"use strict";m();T();N();Object.defineProperty(ug,"__esModule",{value:!0});ug.ExecutableDefinitionsRule=G6;var K6=ze(),ww=wt(),$6=Ec();function G6(e){return{Document(t){for(let n of t.definitions)if(!(0,$6.isExecutableDefinitionNode)(n)){let r=n.kind===ww.Kind.SCHEMA_DEFINITION||n.kind===ww.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new K6.GraphQLError(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}});var dg=w(lg=>{"use strict";m();T();N();Object.defineProperty(lg,"__esModule",{value:!0});lg.FieldsOnCorrectTypeRule=H6;var Lw=mu(),Q6=sf(),Y6=Tu(),J6=ze(),Of=Lt();function H6(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),a=t.name.value,o=(0,Lw.didYouMean)("to use an inline fragment on",z6(i,n,a));o===""&&(o=(0,Lw.didYouMean)(W6(n,a))),e.reportError(new J6.GraphQLError(`Cannot query field "${a}" on type "${n.name}".`+o,{nodes:t}))}}}}function z6(e,t,n){if(!(0,Of.isAbstractType)(t))return[];let r=new Set,i=Object.create(null);for(let o of e.getPossibleTypes(t))if(o.getFields()[n]){r.add(o),i[o.name]=1;for(let u of o.getInterfaces()){var a;u.getFields()[n]&&(r.add(u),i[u.name]=((a=i[u.name])!==null&&a!==void 0?a:0)+1)}}return[...r].sort((o,u)=>{let l=i[u.name]-i[o.name];return l!==0?l:(0,Of.isInterfaceType)(o)&&e.isSubType(o,u)?-1:(0,Of.isInterfaceType)(u)&&e.isSubType(u,o)?1:(0,Q6.naturalCompare)(o.name,u.name)}).map(o=>o.name)}function W6(e,t){if((0,Of.isObjectType)(e)||(0,Of.isInterfaceType)(e)){let n=Object.keys(e.getFields());return(0,Y6.suggestionList)(t,n)}return[]}});var pg=w(fg=>{"use strict";m();T();N();Object.defineProperty(fg,"__esModule",{value:!0});fg.FragmentsOnCompositeTypesRule=X6;var Cw=ze(),Bw=Ti(),Uw=Lt(),kw=Qa();function X6(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=(0,kw.typeFromAST)(e.getSchema(),n);if(r&&!(0,Uw.isCompositeType)(r)){let i=(0,Bw.print)(n);e.reportError(new Cw.GraphQLError(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=(0,kw.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,Uw.isCompositeType)(n)){let r=(0,Bw.print)(t.typeCondition);e.reportError(new Cw.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}});var mg=w(BN=>{"use strict";m();T();N();Object.defineProperty(BN,"__esModule",{value:!0});BN.KnownArgumentNamesOnDirectivesRule=Vw;BN.KnownArgumentNamesRule=tW;var Mw=mu(),xw=Tu(),qw=ze(),Z6=wt(),eW=Xr();function tW(e){return $(k({},Vw(e)),{Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let a=t.name.value,o=r.args.map(l=>l.name),u=(0,xw.suggestionList)(a,o);e.reportError(new qw.GraphQLError(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+(0,Mw.didYouMean)(u),{nodes:t}))}}})}function Vw(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():eW.specifiedDirectives;for(let o of r)t[o.name]=o.args.map(u=>u.name);let i=e.getDocument().definitions;for(let o of i)if(o.kind===Z6.Kind.DIRECTIVE_DEFINITION){var a;let u=(a=o.arguments)!==null&&a!==void 0?a:[];t[o.name.value]=u.map(l=>l.name.value)}return{Directive(o){let u=o.name.value,l=t[u];if(o.arguments&&l)for(let d of o.arguments){let p=d.name.value;if(!l.includes(p)){let E=(0,xw.suggestionList)(p,l);e.reportError(new qw.GraphQLError(`Unknown argument "${p}" on directive "@${u}".`+(0,Mw.didYouMean)(E),{nodes:d}))}}return!1}}}});var hg=w(Eg=>{"use strict";m();T();N();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.KnownDirectivesRule=iW;var nW=Wt(),Ng=Ar(),jw=ze(),Tg=ja(),ur=gl(),_n=wt(),rW=Xr();function iW(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():rW.specifiedDirectives;for(let a of r)t[a.name]=a.locations;let i=e.getDocument().definitions;for(let a of i)a.kind===_n.Kind.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(o=>o.value));return{Directive(a,o,u,l,d){let p=a.name.value,E=t[p];if(!E){e.reportError(new jw.GraphQLError(`Unknown directive "@${p}".`,{nodes:a}));return}let I=aW(d);I&&!E.includes(I)&&e.reportError(new jw.GraphQLError(`Directive "@${p}" may not be used on ${I}.`,{nodes:a}))}}}function aW(e){let t=e[e.length-1];switch("kind"in t||(0,Ng.invariant)(!1),t.kind){case _n.Kind.OPERATION_DEFINITION:return sW(t.operation);case _n.Kind.FIELD:return ur.DirectiveLocation.FIELD;case _n.Kind.FRAGMENT_SPREAD:return ur.DirectiveLocation.FRAGMENT_SPREAD;case _n.Kind.INLINE_FRAGMENT:return ur.DirectiveLocation.INLINE_FRAGMENT;case _n.Kind.FRAGMENT_DEFINITION:return ur.DirectiveLocation.FRAGMENT_DEFINITION;case _n.Kind.VARIABLE_DEFINITION:return ur.DirectiveLocation.VARIABLE_DEFINITION;case _n.Kind.SCHEMA_DEFINITION:case _n.Kind.SCHEMA_EXTENSION:return ur.DirectiveLocation.SCHEMA;case _n.Kind.SCALAR_TYPE_DEFINITION:case _n.Kind.SCALAR_TYPE_EXTENSION:return ur.DirectiveLocation.SCALAR;case _n.Kind.OBJECT_TYPE_DEFINITION:case _n.Kind.OBJECT_TYPE_EXTENSION:return ur.DirectiveLocation.OBJECT;case _n.Kind.FIELD_DEFINITION:return ur.DirectiveLocation.FIELD_DEFINITION;case _n.Kind.INTERFACE_TYPE_DEFINITION:case _n.Kind.INTERFACE_TYPE_EXTENSION:return ur.DirectiveLocation.INTERFACE;case _n.Kind.UNION_TYPE_DEFINITION:case _n.Kind.UNION_TYPE_EXTENSION:return ur.DirectiveLocation.UNION;case _n.Kind.ENUM_TYPE_DEFINITION:case _n.Kind.ENUM_TYPE_EXTENSION:return ur.DirectiveLocation.ENUM;case _n.Kind.ENUM_VALUE_DEFINITION:return ur.DirectiveLocation.ENUM_VALUE;case _n.Kind.INPUT_OBJECT_TYPE_DEFINITION:case _n.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ur.DirectiveLocation.INPUT_OBJECT;case _n.Kind.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||(0,Ng.invariant)(!1),n.kind===_n.Kind.INPUT_OBJECT_TYPE_DEFINITION?ur.DirectiveLocation.INPUT_FIELD_DEFINITION:ur.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,Ng.invariant)(!1,"Unexpected kind: "+(0,nW.inspect)(t.kind))}}function sW(e){switch(e){case Tg.OperationTypeNode.QUERY:return ur.DirectiveLocation.QUERY;case Tg.OperationTypeNode.MUTATION:return ur.DirectiveLocation.MUTATION;case Tg.OperationTypeNode.SUBSCRIPTION:return ur.DirectiveLocation.SUBSCRIPTION}}});var Ig=w(yg=>{"use strict";m();T();N();Object.defineProperty(yg,"__esModule",{value:!0});yg.KnownFragmentNamesRule=uW;var oW=ze();function uW(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new oW.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}});var vg=w(_g=>{"use strict";m();T();N();Object.defineProperty(_g,"__esModule",{value:!0});_g.KnownTypeNamesRule=mW;var cW=mu(),lW=Tu(),dW=ze(),gg=Ec(),fW=ki(),pW=Ga();function mW(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let a of e.getDocument().definitions)(0,gg.isTypeDefinitionNode)(a)&&(r[a.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(a,o,u,l,d){let p=a.name.value;if(!n[p]&&!r[p]){var E;let I=(E=d[2])!==null&&E!==void 0?E:u,v=I!=null&&NW(I);if(v&&Kw.includes(p))return;let A=(0,lW.suggestionList)(p,v?Kw.concat(i):i);e.reportError(new dW.GraphQLError(`Unknown type "${p}".`+(0,cW.didYouMean)(A),{nodes:a}))}}}}var Kw=[...pW.specifiedScalarTypes,...fW.introspectionTypes].map(e=>e.name);function NW(e){return"kind"in e&&((0,gg.isTypeSystemDefinitionNode)(e)||(0,gg.isTypeSystemExtensionNode)(e))}});var Sg=w(Og=>{"use strict";m();T();N();Object.defineProperty(Og,"__esModule",{value:!0});Og.LoneAnonymousOperationRule=hW;var TW=ze(),EW=wt();function hW(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===EW.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new TW.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}});var bg=w(Dg=>{"use strict";m();T();N();Object.defineProperty(Dg,"__esModule",{value:!0});Dg.LoneSchemaDefinitionRule=yW;var $w=ze();function yW(e){var t,n,r;let i=e.getSchema(),a=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType(),o=0;return{SchemaDefinition(u){if(a){e.reportError(new $w.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:u}));return}o>0&&e.reportError(new $w.GraphQLError("Must provide only one schema definition.",{nodes:u})),++o}}}});var Rg=w(Ag=>{"use strict";m();T();N();Object.defineProperty(Ag,"__esModule",{value:!0});Ag.MaxIntrospectionDepthRule=_W;var IW=ze(),Gw=wt(),gW=3;function _W(e){function t(n,r=Object.create(null),i=0){if(n.kind===Gw.Kind.FRAGMENT_SPREAD){let a=n.name.value;if(r[a]===!0)return!1;let o=e.getFragment(a);if(!o)return!1;try{return r[a]=!0,t(o,r,i)}finally{r[a]=void 0}}if(n.kind===Gw.Kind.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=gW))return!0;if("selectionSet"in n&&n.selectionSet){for(let a of n.selectionSet.selections)if(t(a,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new IW.GraphQLError("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}});var Fg=w(Pg=>{"use strict";m();T();N();Object.defineProperty(Pg,"__esModule",{value:!0});Pg.NoFragmentCyclesRule=OW;var vW=ze();function OW(e){let t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(a){return i(a),!1}};function i(a){if(t[a.name.value])return;let o=a.name.value;t[o]=!0;let u=e.getFragmentSpreads(a.selectionSet);if(u.length!==0){r[o]=n.length;for(let l of u){let d=l.name.value,p=r[d];if(n.push(l),p===void 0){let E=e.getFragment(d);E&&i(E)}else{let E=n.slice(p),I=E.slice(0,-1).map(v=>'"'+v.name.value+'"').join(", ");e.reportError(new vW.GraphQLError(`Cannot spread fragment "${d}" within itself`+(I!==""?` via ${I}.`:"."),{nodes:E}))}n.pop()}r[o]=void 0}}}});var Lg=w(wg=>{"use strict";m();T();N();Object.defineProperty(wg,"__esModule",{value:!0});wg.NoUndefinedVariablesRule=DW;var SW=ze();function DW(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i}of r){let a=i.name.value;t[a]!==!0&&e.reportError(new SW.GraphQLError(n.name?`Variable "$${a}" is not defined by operation "${n.name.value}".`:`Variable "$${a}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}});var Bg=w(Cg=>{"use strict";m();T();N();Object.defineProperty(Cg,"__esModule",{value:!0});Cg.NoUnusedFragmentsRule=AW;var bW=ze();function AW(e){let t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){let r=Object.create(null);for(let i of t)for(let a of e.getRecursivelyReferencedFragments(i))r[a.name.value]=!0;for(let i of n){let a=i.name.value;r[a]!==!0&&e.reportError(new bW.GraphQLError(`Fragment "${a}" is never used.`,{nodes:i}))}}}}}});var kg=w(Ug=>{"use strict";m();T();N();Object.defineProperty(Ug,"__esModule",{value:!0});Ug.NoUnusedVariablesRule=PW;var RW=ze();function PW(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:a}of i)r[a.name.value]=!0;for(let a of t){let o=a.variable.name.value;r[o]!==!0&&e.reportError(new RW.GraphQLError(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:a}))}}},VariableDefinition(n){t.push(n)}}}});var qg=w(xg=>{"use strict";m();T();N();Object.defineProperty(xg,"__esModule",{value:!0});xg.sortValueNode=Mg;var FW=sf(),As=wt();function Mg(e){switch(e.kind){case As.Kind.OBJECT:return $(k({},e),{fields:wW(e.fields)});case As.Kind.LIST:return $(k({},e),{values:e.values.map(Mg)});case As.Kind.INT:case As.Kind.FLOAT:case As.Kind.STRING:case As.Kind.BOOLEAN:case As.Kind.NULL:case As.Kind.ENUM:case As.Kind.VARIABLE:return e}}function wW(e){return e.map(t=>$(k({},t),{value:Mg(t.value)})).sort((t,n)=>(0,FW.naturalCompare)(t.name.value,n.name.value))}});var Yg=w(Qg=>{"use strict";m();T();N();Object.defineProperty(Qg,"__esModule",{value:!0});Qg.OverlappingFieldsCanBeMergedRule=UW;var Qw=Wt(),LW=ze(),Vg=wt(),CW=Ti(),Zr=Lt(),BW=qg(),Jw=Qa();function Hw(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Hw(n)).join(" and "):e}function UW(e){let t=new $g,n=new Map;return{SelectionSet(r){let i=kW(e,n,t,e.getParentType(),r);for(let[[a,o],u,l]of i){let d=Hw(o);e.reportError(new LW.GraphQLError(`Fields "${a}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:u.concat(l)}))}}}}function kW(e,t,n,r,i){let a=[],[o,u]=MN(e,t,r,i);if(xW(e,a,t,n,o),u.length!==0)for(let l=0;l1)for(let u=0;u[a.value,o]));return n.every(a=>{let o=a.value,u=i.get(a.name.value);return u===void 0?!1:Yw(o)===Yw(u)})}function Yw(e){return(0,CW.print)((0,BW.sortValueNode)(e))}function jg(e,t){return(0,Zr.isListType)(e)?(0,Zr.isListType)(t)?jg(e.ofType,t.ofType):!0:(0,Zr.isListType)(t)?!0:(0,Zr.isNonNullType)(e)?(0,Zr.isNonNullType)(t)?jg(e.ofType,t.ofType):!0:(0,Zr.isNonNullType)(t)?!0:(0,Zr.isLeafType)(e)||(0,Zr.isLeafType)(t)?e!==t:!1}function MN(e,t,n,r){let i=t.get(r);if(i)return i;let a=Object.create(null),o=Object.create(null);Ww(e,n,r,a,o);let u=[a,Object.keys(o)];return t.set(r,u),u}function Kg(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=(0,Jw.typeFromAST)(e.getSchema(),n.typeCondition);return MN(e,t,i,n.selectionSet)}function Ww(e,t,n,r,i){for(let a of n.selections)switch(a.kind){case Vg.Kind.FIELD:{let o=a.name.value,u;((0,Zr.isObjectType)(t)||(0,Zr.isInterfaceType)(t))&&(u=t.getFields()[o]);let l=a.alias?a.alias.value:o;r[l]||(r[l]=[]),r[l].push([t,a,u]);break}case Vg.Kind.FRAGMENT_SPREAD:i[a.name.value]=!0;break;case Vg.Kind.INLINE_FRAGMENT:{let o=a.typeCondition,u=o?(0,Jw.typeFromAST)(e.getSchema(),o):t;Ww(e,u,a.selectionSet,r,i);break}}}function VW(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}var $g=class{constructor(){this._data=new Map}has(t,n,r){var i;let[a,o]=t{"use strict";m();T();N();Object.defineProperty(Hg,"__esModule",{value:!0});Hg.PossibleFragmentSpreadsRule=KW;var xN=Wt(),Xw=ze(),Jg=Lt(),Zw=ff(),jW=Qa();function KW(e){return{InlineFragment(t){let n=e.getType(),r=e.getParentType();if((0,Jg.isCompositeType)(n)&&(0,Jg.isCompositeType)(r)&&!(0,Zw.doTypesOverlap)(e.getSchema(),n,r)){let i=(0,xN.inspect)(r),a=(0,xN.inspect)(n);e.reportError(new Xw.GraphQLError(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${a}".`,{nodes:t}))}},FragmentSpread(t){let n=t.name.value,r=$W(e,n),i=e.getParentType();if(r&&i&&!(0,Zw.doTypesOverlap)(e.getSchema(),r,i)){let a=(0,xN.inspect)(i),o=(0,xN.inspect)(r);e.reportError(new Xw.GraphQLError(`Fragment "${n}" cannot be spread here as objects of type "${a}" can never be of type "${o}".`,{nodes:t}))}}}}function $W(e,t){let n=e.getFragment(t);if(n){let r=(0,jW.typeFromAST)(e.getSchema(),n.typeCondition);if((0,Jg.isCompositeType)(r))return r}}});var Xg=w(Wg=>{"use strict";m();T();N();Object.defineProperty(Wg,"__esModule",{value:!0});Wg.PossibleTypeExtensionsRule=JW;var GW=mu(),tL=Wt(),nL=Ar(),QW=Tu(),eL=ze(),Sn=wt(),YW=Ec(),Rl=Lt();function JW(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)(0,YW.isTypeDefinitionNode)(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){let a=i.name.value,o=n[a],u=t==null?void 0:t.getType(a),l;if(o?l=HW[o.kind]:u&&(l=zW(u)),l){if(l!==i.kind){let d=WW(i.kind);e.reportError(new eL.GraphQLError(`Cannot extend non-${d} type "${a}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(k(k({},n),t==null?void 0:t.getTypeMap())),p=(0,QW.suggestionList)(a,d);e.reportError(new eL.GraphQLError(`Cannot extend type "${a}" because it is not defined.`+(0,GW.didYouMean)(p),{nodes:i.name}))}}}var HW={[Sn.Kind.SCALAR_TYPE_DEFINITION]:Sn.Kind.SCALAR_TYPE_EXTENSION,[Sn.Kind.OBJECT_TYPE_DEFINITION]:Sn.Kind.OBJECT_TYPE_EXTENSION,[Sn.Kind.INTERFACE_TYPE_DEFINITION]:Sn.Kind.INTERFACE_TYPE_EXTENSION,[Sn.Kind.UNION_TYPE_DEFINITION]:Sn.Kind.UNION_TYPE_EXTENSION,[Sn.Kind.ENUM_TYPE_DEFINITION]:Sn.Kind.ENUM_TYPE_EXTENSION,[Sn.Kind.INPUT_OBJECT_TYPE_DEFINITION]:Sn.Kind.INPUT_OBJECT_TYPE_EXTENSION};function zW(e){if((0,Rl.isScalarType)(e))return Sn.Kind.SCALAR_TYPE_EXTENSION;if((0,Rl.isObjectType)(e))return Sn.Kind.OBJECT_TYPE_EXTENSION;if((0,Rl.isInterfaceType)(e))return Sn.Kind.INTERFACE_TYPE_EXTENSION;if((0,Rl.isUnionType)(e))return Sn.Kind.UNION_TYPE_EXTENSION;if((0,Rl.isEnumType)(e))return Sn.Kind.ENUM_TYPE_EXTENSION;if((0,Rl.isInputObjectType)(e))return Sn.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,nL.invariant)(!1,"Unexpected type: "+(0,tL.inspect)(e))}function WW(e){switch(e){case Sn.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case Sn.Kind.OBJECT_TYPE_EXTENSION:return"object";case Sn.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case Sn.Kind.UNION_TYPE_EXTENSION:return"union";case Sn.Kind.ENUM_TYPE_EXTENSION:return"enum";case Sn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,nL.invariant)(!1,"Unexpected kind: "+(0,tL.inspect)(e))}}});var e_=w(qN=>{"use strict";m();T();N();Object.defineProperty(qN,"__esModule",{value:!0});qN.ProvidedRequiredArgumentsOnDirectivesRule=oL;qN.ProvidedRequiredArgumentsRule=e4;var iL=Wt(),rL=Nu(),aL=ze(),sL=wt(),XW=Ti(),Zg=Lt(),ZW=Xr();function e4(e){return $(k({},oL(e)),{Field:{leave(t){var n;let r=e.getFieldDef();if(!r)return!1;let i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(a=>a.name.value));for(let a of r.args)if(!i.has(a.name)&&(0,Zg.isRequiredArgument)(a)){let o=(0,iL.inspect)(a.type);e.reportError(new aL.GraphQLError(`Field "${r.name}" argument "${a.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function oL(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:ZW.specifiedDirectives;for(let u of i)n[u.name]=(0,rL.keyMap)(u.args.filter(Zg.isRequiredArgument),l=>l.name);let a=e.getDocument().definitions;for(let u of a)if(u.kind===sL.Kind.DIRECTIVE_DEFINITION){var o;let l=(o=u.arguments)!==null&&o!==void 0?o:[];n[u.name.value]=(0,rL.keyMap)(l.filter(t4),d=>d.name.value)}return{Directive:{leave(u){let l=u.name.value,d=n[l];if(d){var p;let E=(p=u.arguments)!==null&&p!==void 0?p:[],I=new Set(E.map(v=>v.name.value));for(let[v,A]of Object.entries(d))if(!I.has(v)){let U=(0,Zg.isType)(A.type)?(0,iL.inspect)(A.type):(0,XW.print)(A.type);e.reportError(new aL.GraphQLError(`Directive "@${l}" argument "${v}" of type "${U}" is required, but it was not provided.`,{nodes:u}))}}}}}}function t4(e){return e.type.kind===sL.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var n_=w(t_=>{"use strict";m();T();N();Object.defineProperty(t_,"__esModule",{value:!0});t_.ScalarLeafsRule=n4;var uL=Wt(),cL=ze(),lL=Lt();function n4(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if((0,lL.isLeafType)((0,lL.getNamedType)(n))){if(r){let i=t.name.value,a=(0,uL.inspect)(n);e.reportError(new cL.GraphQLError(`Field "${i}" must not have a selection since type "${a}" has no subfields.`,{nodes:r}))}}else if(!r){let i=t.name.value,a=(0,uL.inspect)(n);e.reportError(new cL.GraphQLError(`Field "${i}" of type "${a}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}});var i_=w(r_=>{"use strict";m();T();N();Object.defineProperty(r_,"__esModule",{value:!0});r_.printPathArray=r4;function r4(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var Sf=w(VN=>{"use strict";m();T();N();Object.defineProperty(VN,"__esModule",{value:!0});VN.addPath=i4;VN.pathToArray=a4;function i4(e,t,n){return{prev:e,key:t,typename:n}}function a4(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}});var s_=w(a_=>{"use strict";m();T();N();Object.defineProperty(a_,"__esModule",{value:!0});a_.coerceInputValue=f4;var s4=mu(),jN=Wt(),o4=Ar(),u4=PN(),c4=Va(),Na=Sf(),l4=i_(),d4=Tu(),Rs=ze(),Df=Lt();function f4(e,t,n=p4){return bf(e,t,n,void 0)}function p4(e,t,n){let r="Invalid value "+(0,jN.inspect)(t);throw e.length>0&&(r+=` at "value${(0,l4.printPathArray)(e)}"`),n.message=r+": "+n.message,n}function bf(e,t,n,r){if((0,Df.isNonNullType)(t)){if(e!=null)return bf(e,t.ofType,n,r);n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Expected non-nullable type "${(0,jN.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,Df.isListType)(t)){let i=t.ofType;return(0,u4.isIterableObject)(e)?Array.from(e,(a,o)=>{let u=(0,Na.addPath)(r,o,void 0);return bf(a,i,n,u)}):[bf(e,i,n,r)]}if((0,Df.isInputObjectType)(t)){if(!(0,c4.isObjectLike)(e)){n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Expected type "${t.name}" to be an object.`));return}let i={},a=t.getFields();for(let o of Object.values(a)){let u=e[o.name];if(u===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if((0,Df.isNonNullType)(o.type)){let l=(0,jN.inspect)(o.type);n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=bf(u,o.type,n,(0,Na.addPath)(r,o.name,t.name))}for(let o of Object.keys(e))if(!a[o]){let u=(0,d4.suggestionList)(o,Object.keys(t.getFields()));n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Field "${o}" is not defined by type "${t.name}".`+(0,s4.didYouMean)(u)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let u=o[0],l=i[u];l===null&&n((0,Na.pathToArray)(r).concat(u),l,new Rs.GraphQLError(`Field "${u}" must be non-null.`))}return i}if((0,Df.isLeafType)(t)){let i;try{i=t.parseValue(e)}catch(a){a instanceof Rs.GraphQLError?n((0,Na.pathToArray)(r),e,a):n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Expected type "${t.name}". `+a.message,{originalError:a}));return}return i===void 0&&n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Expected type "${t.name}".`)),i}(0,o4.invariant)(!1,"Unexpected input type: "+(0,jN.inspect)(t))}});var Rf=w(o_=>{"use strict";m();T();N();Object.defineProperty(o_,"__esModule",{value:!0});o_.valueFromAST=Af;var m4=Wt(),N4=Ar(),T4=Nu(),Pl=wt(),hc=Lt();function Af(e,t,n){if(e){if(e.kind===Pl.Kind.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&(0,hc.isNonNullType)(t)?void 0:i}if((0,hc.isNonNullType)(t))return e.kind===Pl.Kind.NULL?void 0:Af(e,t.ofType,n);if(e.kind===Pl.Kind.NULL)return null;if((0,hc.isListType)(t)){let r=t.ofType;if(e.kind===Pl.Kind.LIST){let a=[];for(let o of e.values)if(dL(o,n)){if((0,hc.isNonNullType)(r))return;a.push(null)}else{let u=Af(o,r,n);if(u===void 0)return;a.push(u)}return a}let i=Af(e,r,n);return i===void 0?void 0:[i]}if((0,hc.isInputObjectType)(t)){if(e.kind!==Pl.Kind.OBJECT)return;let r=Object.create(null),i=(0,T4.keyMap)(e.fields,a=>a.name.value);for(let a of Object.values(t.getFields())){let o=i[a.name];if(!o||dL(o.value,n)){if(a.defaultValue!==void 0)r[a.name]=a.defaultValue;else if((0,hc.isNonNullType)(a.type))return;continue}let u=Af(o.value,a.type,n);if(u===void 0)return;r[a.name]=u}if(t.isOneOf){let a=Object.keys(r);if(a.length!==1||r[a[0]]===null)return}return r}if((0,hc.isLeafType)(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}(0,N4.invariant)(!1,"Unexpected input type: "+(0,m4.inspect)(t))}}function dL(e,t){return e.kind===Pl.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var Ll=w(Pf=>{"use strict";m();T();N();Object.defineProperty(Pf,"__esModule",{value:!0});Pf.getArgumentValues=NL;Pf.getDirectiveValues=v4;Pf.getVariableValues=g4;var Fl=Wt(),E4=Nu(),h4=i_(),Ps=ze(),fL=wt(),pL=Ti(),wl=Lt(),y4=s_(),I4=Qa(),mL=Rf();function g4(e,t,n,r){let i=[],a=r==null?void 0:r.maxErrors;try{let o=_4(e,t,n,u=>{if(a!=null&&i.length>=a)throw new Ps.GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");i.push(u)});if(i.length===0)return{coerced:o}}catch(o){i.push(o)}return{errors:i}}function _4(e,t,n,r){let i={};for(let a of t){let o=a.variable.name.value,u=(0,I4.typeFromAST)(e,a.type);if(!(0,wl.isInputType)(u)){let d=(0,pL.print)(a.type);r(new Ps.GraphQLError(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:a.type}));continue}if(!TL(n,o)){if(a.defaultValue)i[o]=(0,mL.valueFromAST)(a.defaultValue,u);else if((0,wl.isNonNullType)(u)){let d=(0,Fl.inspect)(u);r(new Ps.GraphQLError(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:a}))}continue}let l=n[o];if(l===null&&(0,wl.isNonNullType)(u)){let d=(0,Fl.inspect)(u);r(new Ps.GraphQLError(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:a}));continue}i[o]=(0,y4.coerceInputValue)(l,u,(d,p,E)=>{let I=`Variable "$${o}" got invalid value `+(0,Fl.inspect)(p);d.length>0&&(I+=` at "${o}${(0,h4.printPathArray)(d)}"`),r(new Ps.GraphQLError(I+"; "+E.message,{nodes:a,originalError:E}))})}return i}function NL(e,t,n){var r;let i={},a=(r=t.arguments)!==null&&r!==void 0?r:[],o=(0,E4.keyMap)(a,u=>u.name.value);for(let u of e.args){let l=u.name,d=u.type,p=o[l];if(!p){if(u.defaultValue!==void 0)i[l]=u.defaultValue;else if((0,wl.isNonNullType)(d))throw new Ps.GraphQLError(`Argument "${l}" of required type "${(0,Fl.inspect)(d)}" was not provided.`,{nodes:t});continue}let E=p.value,I=E.kind===fL.Kind.NULL;if(E.kind===fL.Kind.VARIABLE){let A=E.name.value;if(n==null||!TL(n,A)){if(u.defaultValue!==void 0)i[l]=u.defaultValue;else if((0,wl.isNonNullType)(d))throw new Ps.GraphQLError(`Argument "${l}" of required type "${(0,Fl.inspect)(d)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:E});continue}I=n[A]==null}if(I&&(0,wl.isNonNullType)(d))throw new Ps.GraphQLError(`Argument "${l}" of non-null type "${(0,Fl.inspect)(d)}" must not be null.`,{nodes:E});let v=(0,mL.valueFromAST)(E,d,n);if(v===void 0)throw new Ps.GraphQLError(`Argument "${l}" has invalid value ${(0,pL.print)(E)}.`,{nodes:E});i[l]=v}return i}function v4(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(a=>a.name.value===e.name);if(i)return NL(e,i,n)}function TL(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var GN=w($N=>{"use strict";m();T();N();Object.defineProperty($N,"__esModule",{value:!0});$N.collectFields=D4;$N.collectSubfields=b4;var u_=wt(),O4=Lt(),EL=Xr(),S4=Qa(),hL=Ll();function D4(e,t,n,r,i){let a=new Map;return KN(e,t,n,r,i,a,new Set),a}function b4(e,t,n,r,i){let a=new Map,o=new Set;for(let u of i)u.selectionSet&&KN(e,t,n,r,u.selectionSet,a,o);return a}function KN(e,t,n,r,i,a,o){for(let u of i.selections)switch(u.kind){case u_.Kind.FIELD:{if(!c_(n,u))continue;let l=A4(u),d=a.get(l);d!==void 0?d.push(u):a.set(l,[u]);break}case u_.Kind.INLINE_FRAGMENT:{if(!c_(n,u)||!yL(e,u,r))continue;KN(e,t,n,r,u.selectionSet,a,o);break}case u_.Kind.FRAGMENT_SPREAD:{let l=u.name.value;if(o.has(l)||!c_(n,u))continue;o.add(l);let d=t[l];if(!d||!yL(e,d,r))continue;KN(e,t,n,r,d.selectionSet,a,o);break}}}function c_(e,t){let n=(0,hL.getDirectiveValues)(EL.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,hL.getDirectiveValues)(EL.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function yL(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,S4.typeFromAST)(e,r);return i===n?!0:(0,O4.isAbstractType)(i)?e.isSubType(i,n):!1}function A4(e){return e.alias?e.alias.value:e.name.value}});var d_=w(l_=>{"use strict";m();T();N();Object.defineProperty(l_,"__esModule",{value:!0});l_.SingleFieldSubscriptionsRule=F4;var IL=ze(),R4=wt(),P4=GN();function F4(e){return{OperationDefinition(t){if(t.operation==="subscription"){let n=e.getSchema(),r=n.getSubscriptionType();if(r){let i=t.name?t.name.value:null,a=Object.create(null),o=e.getDocument(),u=Object.create(null);for(let d of o.definitions)d.kind===R4.Kind.FRAGMENT_DEFINITION&&(u[d.name.value]=d);let l=(0,P4.collectFields)(n,u,a,r,t.selectionSet);if(l.size>1){let E=[...l.values()].slice(1).flat();e.reportError(new IL.GraphQLError(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:E}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new IL.GraphQLError(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:d}))}}}}}});var QN=w(f_=>{"use strict";m();T();N();Object.defineProperty(f_,"__esModule",{value:!0});f_.groupBy=w4;function w4(e,t){let n=new Map;for(let r of e){let i=t(r),a=n.get(i);a===void 0?n.set(i,[r]):a.push(r)}return n}});var m_=w(p_=>{"use strict";m();T();N();Object.defineProperty(p_,"__esModule",{value:!0});p_.UniqueArgumentDefinitionNamesRule=B4;var L4=QN(),C4=ze();function B4(e){return{DirectiveDefinition(r){var i;let a=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,a)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;let a=r.name.value,o=(i=r.fields)!==null&&i!==void 0?i:[];for(let l of o){var u;let d=l.name.value,p=(u=l.arguments)!==null&&u!==void 0?u:[];n(`${a}.${d}`,p)}return!1}function n(r,i){let a=(0,L4.groupBy)(i,o=>o.name.value);for(let[o,u]of a)u.length>1&&e.reportError(new C4.GraphQLError(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:u.map(l=>l.name)}));return!1}}});var T_=w(N_=>{"use strict";m();T();N();Object.defineProperty(N_,"__esModule",{value:!0});N_.UniqueArgumentNamesRule=M4;var U4=QN(),k4=ze();function M4(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],a=(0,U4.groupBy)(i,o=>o.name.value);for(let[o,u]of a)u.length>1&&e.reportError(new k4.GraphQLError(`There can be only one argument named "${o}".`,{nodes:u.map(l=>l.name)}))}}});var h_=w(E_=>{"use strict";m();T();N();Object.defineProperty(E_,"__esModule",{value:!0});E_.UniqueDirectiveNamesRule=x4;var gL=ze();function x4(e){let t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){let i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new gL.GraphQLError(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new gL.GraphQLError(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}});var g_=w(I_=>{"use strict";m();T();N();Object.defineProperty(I_,"__esModule",{value:!0});I_.UniqueDirectivesPerLocationRule=j4;var q4=ze(),y_=wt(),_L=Ec(),V4=Xr();function j4(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():V4.specifiedDirectives;for(let u of r)t[u.name]=!u.isRepeatable;let i=e.getDocument().definitions;for(let u of i)u.kind===y_.Kind.DIRECTIVE_DEFINITION&&(t[u.name.value]=!u.repeatable);let a=Object.create(null),o=Object.create(null);return{enter(u){if(!("directives"in u)||!u.directives)return;let l;if(u.kind===y_.Kind.SCHEMA_DEFINITION||u.kind===y_.Kind.SCHEMA_EXTENSION)l=a;else if((0,_L.isTypeDefinitionNode)(u)||(0,_L.isTypeExtensionNode)(u)){let d=u.name.value;l=o[d],l===void 0&&(o[d]=l=Object.create(null))}else l=Object.create(null);for(let d of u.directives){let p=d.name.value;t[p]&&(l[p]?e.reportError(new q4.GraphQLError(`The directive "@${p}" can only be used once at this location.`,{nodes:[l[p],d]})):l[p]=d)}}}}});var v_=w(__=>{"use strict";m();T();N();Object.defineProperty(__,"__esModule",{value:!0});__.UniqueEnumValueNamesRule=$4;var vL=ze(),K4=Lt();function $4(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(a){var o;let u=a.name.value;r[u]||(r[u]=Object.create(null));let l=(o=a.values)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let E=p.name.value,I=n[u];(0,K4.isEnumType)(I)&&I.getValue(E)?e.reportError(new vL.GraphQLError(`Enum value "${u}.${E}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[E]?e.reportError(new vL.GraphQLError(`Enum value "${u}.${E}" can only be defined once.`,{nodes:[d[E],p.name]})):d[E]=p.name}return!1}}});var D_=w(S_=>{"use strict";m();T();N();Object.defineProperty(S_,"__esModule",{value:!0});S_.UniqueFieldDefinitionNamesRule=G4;var OL=ze(),O_=Lt();function G4(e){let t=e.getSchema(),n=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(a){var o;let u=a.name.value;r[u]||(r[u]=Object.create(null));let l=(o=a.fields)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let E=p.name.value;Q4(n[u],E)?e.reportError(new OL.GraphQLError(`Field "${u}.${E}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[E]?e.reportError(new OL.GraphQLError(`Field "${u}.${E}" can only be defined once.`,{nodes:[d[E],p.name]})):d[E]=p.name}return!1}}function Q4(e,t){return(0,O_.isObjectType)(e)||(0,O_.isInterfaceType)(e)||(0,O_.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var A_=w(b_=>{"use strict";m();T();N();Object.defineProperty(b_,"__esModule",{value:!0});b_.UniqueFragmentNamesRule=J4;var Y4=ze();function J4(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new Y4.GraphQLError(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}});var P_=w(R_=>{"use strict";m();T();N();Object.defineProperty(R_,"__esModule",{value:!0});R_.UniqueInputFieldNamesRule=W4;var H4=Ar(),z4=ze();function W4(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||(0,H4.invariant)(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new z4.GraphQLError(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}});var w_=w(F_=>{"use strict";m();T();N();Object.defineProperty(F_,"__esModule",{value:!0});F_.UniqueOperationNamesRule=Z4;var X4=ze();function Z4(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new X4.GraphQLError(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}});var C_=w(L_=>{"use strict";m();T();N();Object.defineProperty(L_,"__esModule",{value:!0});L_.UniqueOperationTypesRule=e8;var SL=ze();function e8(e){let t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(a){var o;let u=(o=a.operationTypes)!==null&&o!==void 0?o:[];for(let l of u){let d=l.operation,p=n[d];r[d]?e.reportError(new SL.GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):p?e.reportError(new SL.GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[p,l]})):n[d]=l}return!1}}});var U_=w(B_=>{"use strict";m();T();N();Object.defineProperty(B_,"__esModule",{value:!0});B_.UniqueTypeNamesRule=t8;var DL=ze();function t8(e){let t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){let a=i.name.value;if(n!=null&&n.getType(a)){e.reportError(new DL.GraphQLError(`Type "${a}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[a]?e.reportError(new DL.GraphQLError(`There can be only one type named "${a}".`,{nodes:[t[a],i.name]})):t[a]=i.name,!1}}});var M_=w(k_=>{"use strict";m();T();N();Object.defineProperty(k_,"__esModule",{value:!0});k_.UniqueVariableNamesRule=i8;var n8=QN(),r8=ze();function i8(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=(0,n8.groupBy)(r,a=>a.variable.name.value);for(let[a,o]of i)o.length>1&&e.reportError(new r8.GraphQLError(`There can be only one variable named "$${a}".`,{nodes:o.map(u=>u.variable.name)}))}}}});var V_=w(q_=>{"use strict";m();T();N();Object.defineProperty(q_,"__esModule",{value:!0});q_.ValuesOfCorrectTypeRule=u8;var a8=mu(),Ff=Wt(),s8=Nu(),o8=Tu(),Ja=ze(),x_=wt(),YN=Ti(),Ya=Lt();function u8(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=(0,Ya.getNullableType)(e.getParentInputType());if(!(0,Ya.isListType)(r))return yc(e,n),!1},ObjectValue(n){let r=(0,Ya.getNamedType)(e.getInputType());if(!(0,Ya.isInputObjectType)(r))return yc(e,n),!1;let i=(0,s8.keyMap)(n.fields,a=>a.name.value);for(let a of Object.values(r.getFields()))if(!i[a.name]&&(0,Ya.isRequiredInputField)(a)){let u=(0,Ff.inspect)(a.type);e.reportError(new Ja.GraphQLError(`Field "${r.name}.${a.name}" of required type "${u}" was not provided.`,{nodes:n}))}r.isOneOf&&c8(e,n,r,i,t)},ObjectField(n){let r=(0,Ya.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,Ya.isInputObjectType)(r)){let a=(0,o8.suggestionList)(n.name.value,Object.keys(r.getFields()));e.reportError(new Ja.GraphQLError(`Field "${n.name.value}" is not defined by type "${r.name}".`+(0,a8.didYouMean)(a),{nodes:n}))}},NullValue(n){let r=e.getInputType();(0,Ya.isNonNullType)(r)&&e.reportError(new Ja.GraphQLError(`Expected value of type "${(0,Ff.inspect)(r)}", found ${(0,YN.print)(n)}.`,{nodes:n}))},EnumValue:n=>yc(e,n),IntValue:n=>yc(e,n),FloatValue:n=>yc(e,n),StringValue:n=>yc(e,n),BooleanValue:n=>yc(e,n)}}function yc(e,t){let n=e.getInputType();if(!n)return;let r=(0,Ya.getNamedType)(n);if(!(0,Ya.isLeafType)(r)){let i=(0,Ff.inspect)(n);e.reportError(new Ja.GraphQLError(`Expected value of type "${i}", found ${(0,YN.print)(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let a=(0,Ff.inspect)(n);e.reportError(new Ja.GraphQLError(`Expected value of type "${a}", found ${(0,YN.print)(t)}.`,{nodes:t}))}}catch(i){let a=(0,Ff.inspect)(n);i instanceof Ja.GraphQLError?e.reportError(i):e.reportError(new Ja.GraphQLError(`Expected value of type "${a}", found ${(0,YN.print)(t)}; `+i.message,{nodes:t,originalError:i}))}}function c8(e,t,n,r,i){var a;let o=Object.keys(r);if(o.length!==1){e.reportError(new Ja.GraphQLError(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let l=(a=r[o[0]])===null||a===void 0?void 0:a.value,d=!l||l.kind===x_.Kind.NULL,p=(l==null?void 0:l.kind)===x_.Kind.VARIABLE;if(d){e.reportError(new Ja.GraphQLError(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(p){let E=l.name.value;i[E].type.kind!==x_.Kind.NON_NULL_TYPE&&e.reportError(new Ja.GraphQLError(`Variable "${E}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}});var K_=w(j_=>{"use strict";m();T();N();Object.defineProperty(j_,"__esModule",{value:!0});j_.VariablesAreInputTypesRule=m8;var l8=ze(),d8=Ti(),f8=Lt(),p8=Qa();function m8(e){return{VariableDefinition(t){let n=(0,p8.typeFromAST)(e.getSchema(),t.type);if(n!==void 0&&!(0,f8.isInputType)(n)){let r=t.variable.name.value,i=(0,d8.print)(t.type);e.reportError(new l8.GraphQLError(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}});var G_=w($_=>{"use strict";m();T();N();Object.defineProperty($_,"__esModule",{value:!0});$_.VariablesInAllowedPositionRule=h8;var bL=Wt(),N8=ze(),T8=wt(),AL=Lt(),RL=ff(),E8=Qa();function h8(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i,type:a,defaultValue:o}of r){let u=i.name.value,l=t[u];if(l&&a){let d=e.getSchema(),p=(0,E8.typeFromAST)(d,l.type);if(p&&!y8(d,p,l.defaultValue,a,o)){let E=(0,bL.inspect)(p),I=(0,bL.inspect)(a);e.reportError(new N8.GraphQLError(`Variable "$${u}" of type "${E}" used in position expecting type "${I}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function y8(e,t,n,r,i){if((0,AL.isNonNullType)(r)&&!(0,AL.isNonNullType)(t)){if(!(n!=null&&n.kind!==T8.Kind.NULL)&&!(i!==void 0))return!1;let u=r.ofType;return(0,RL.isTypeSubTypeOf)(e,t,u)}return(0,RL.isTypeSubTypeOf)(e,t,r)}});var Q_=w(Iu=>{"use strict";m();T();N();Object.defineProperty(Iu,"__esModule",{value:!0});Iu.specifiedSDLRules=Iu.specifiedRules=Iu.recommendedRules=void 0;var I8=cg(),g8=dg(),_8=pg(),PL=mg(),FL=hg(),v8=Ig(),wL=vg(),O8=Sg(),S8=bg(),D8=Rg(),b8=Fg(),A8=Lg(),R8=Bg(),P8=kg(),F8=Yg(),w8=zg(),L8=Xg(),LL=e_(),C8=n_(),B8=d_(),U8=m_(),CL=T_(),k8=h_(),BL=g_(),M8=v_(),x8=D_(),q8=A_(),UL=P_(),V8=w_(),j8=C_(),K8=U_(),$8=M_(),G8=V_(),Q8=K_(),Y8=G_(),kL=Object.freeze([D8.MaxIntrospectionDepthRule]);Iu.recommendedRules=kL;var J8=Object.freeze([I8.ExecutableDefinitionsRule,V8.UniqueOperationNamesRule,O8.LoneAnonymousOperationRule,B8.SingleFieldSubscriptionsRule,wL.KnownTypeNamesRule,_8.FragmentsOnCompositeTypesRule,Q8.VariablesAreInputTypesRule,C8.ScalarLeafsRule,g8.FieldsOnCorrectTypeRule,q8.UniqueFragmentNamesRule,v8.KnownFragmentNamesRule,R8.NoUnusedFragmentsRule,w8.PossibleFragmentSpreadsRule,b8.NoFragmentCyclesRule,$8.UniqueVariableNamesRule,A8.NoUndefinedVariablesRule,P8.NoUnusedVariablesRule,FL.KnownDirectivesRule,BL.UniqueDirectivesPerLocationRule,PL.KnownArgumentNamesRule,CL.UniqueArgumentNamesRule,G8.ValuesOfCorrectTypeRule,LL.ProvidedRequiredArgumentsRule,Y8.VariablesInAllowedPositionRule,F8.OverlappingFieldsCanBeMergedRule,UL.UniqueInputFieldNamesRule,...kL]);Iu.specifiedRules=J8;var H8=Object.freeze([S8.LoneSchemaDefinitionRule,j8.UniqueOperationTypesRule,K8.UniqueTypeNamesRule,M8.UniqueEnumValueNamesRule,x8.UniqueFieldDefinitionNamesRule,U8.UniqueArgumentDefinitionNamesRule,k8.UniqueDirectiveNamesRule,wL.KnownTypeNamesRule,FL.KnownDirectivesRule,BL.UniqueDirectivesPerLocationRule,L8.PossibleTypeExtensionsRule,PL.KnownArgumentNamesOnDirectivesRule,CL.UniqueArgumentNamesRule,UL.UniqueInputFieldNamesRule,LL.ProvidedRequiredArgumentsOnDirectivesRule]);Iu.specifiedSDLRules=H8});var H_=w(gu=>{"use strict";m();T();N();Object.defineProperty(gu,"__esModule",{value:!0});gu.ValidationContext=gu.SDLValidationContext=gu.ASTValidationContext=void 0;var ML=wt(),z8=cc(),xL=CN(),wf=class{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(let r of this.getDocument().definitions)r.kind===ML.Kind.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];let r=[t],i;for(;i=r.pop();)for(let a of i.selections)a.kind===ML.Kind.FRAGMENT_SPREAD?n.push(a):a.selectionSet&&r.push(a.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];let r=Object.create(null),i=[t.selectionSet],a;for(;a=i.pop();)for(let o of this.getFragmentSpreads(a)){let u=o.name.value;if(r[u]!==!0){r[u]=!0;let l=this.getFragment(u);l&&(n.push(l),i.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}};gu.ASTValidationContext=wf;var Y_=class extends wf{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};gu.SDLValidationContext=Y_;var J_=class extends wf{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){let r=[],i=new xL.TypeInfo(this._schema);(0,z8.visit)(t,(0,xL.visitWithTypeInfo)(i,{VariableDefinition:()=>!1,Variable(a){r.push({node:a,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(let r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}};gu.ValidationContext=J_});var Bl=w(Cl=>{"use strict";m();T();N();Object.defineProperty(Cl,"__esModule",{value:!0});Cl.assertValidSDL=tX;Cl.assertValidSDLExtension=nX;Cl.validate=eX;Cl.validateSDL=z_;var W8=Vr(),X8=ze(),JN=cc(),Z8=_f(),qL=CN(),VL=Q_(),jL=H_();function eX(e,t,n=VL.specifiedRules,r,i=new qL.TypeInfo(e)){var a;let o=(a=r==null?void 0:r.maxErrors)!==null&&a!==void 0?a:100;t||(0,W8.devAssert)(!1,"Must provide document."),(0,Z8.assertValidSchema)(e);let u=Object.freeze({}),l=[],d=new jL.ValidationContext(e,t,i,E=>{if(l.length>=o)throw l.push(new X8.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),u;l.push(E)}),p=(0,JN.visitInParallel)(n.map(E=>E(d)));try{(0,JN.visit)(t,(0,qL.visitWithTypeInfo)(i,p))}catch(E){if(E!==u)throw E}return l}function z_(e,t,n=VL.specifiedSDLRules){let r=[],i=new jL.SDLValidationContext(e,t,o=>{r.push(o)}),a=n.map(o=>o(i));return(0,JN.visit)(e,(0,JN.visitInParallel)(a)),r}function tX(e){let t=z_(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` +`))}var tg=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new R6.GraphQLError(t,{nodes:r}))}getErrors(){return this._errors}};function L6(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,Bn.isObjectType)(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${(0,Pr.inspect)(n)}.`,(r=eg(t,ZI.OperationTypeNode.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!(0,Bn.isObjectType)(i)){var a;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,Pr.inspect)(i)}.`,(a=eg(t,ZI.OperationTypeNode.MUTATION))!==null&&a!==void 0?a:i.astNode)}let o=t.getSubscriptionType();if(o&&!(0,Bn.isObjectType)(o)){var u;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,Pr.inspect)(o)}.`,(u=eg(t,ZI.OperationTypeNode.SUBSCRIPTION))!==null&&u!==void 0?u:o.astNode)}}function eg(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return(i=r==null?void 0:r.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function C6(e){for(let n of e.schema.getDirectives()){if(!(0,gw.isDirective)(n)){e.reportError(`Expected directive but got: ${(0,Pr.inspect)(n)}.`,n==null?void 0:n.astNode);continue}Tc(e,n);for(let r of n.args)if(Tc(e,r),(0,Bn.isInputType)(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${(0,Pr.inspect)(r.type)}.`,r.astNode),(0,Bn.isRequiredArgument)(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[ng(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function Tc(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function B6(e){let t=j6(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!(0,Bn.isNamedType)(r)){e.reportError(`Expected GraphQL named type but got: ${(0,Pr.inspect)(r)}.`,r.astNode);continue}(0,P6.isIntrospectionType)(r)||Tc(e,r),(0,Bn.isObjectType)(r)||(0,Bn.isInterfaceType)(r)?(hw(e,r),yw(e,r)):(0,Bn.isUnionType)(r)?M6(e,r):(0,Bn.isEnumType)(r)?x6(e,r):(0,Bn.isInputObjectType)(r)&&(q6(e,r),t(r))}}function hw(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let o of n){if(Tc(e,o),!(0,Bn.isOutputType)(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${(0,Pr.inspect)(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(let u of o.args){let l=u.name;if(Tc(e,u),!(0,Bn.isInputType)(u.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${(0,Pr.inspect)(u.type)}.`,(i=u.astNode)===null||i===void 0?void 0:i.type)}if((0,Bn.isRequiredArgument)(u)&&u.deprecationReason!=null){var a;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[ng(u.astNode),(a=u.astNode)===null||a===void 0?void 0:a.type])}}}}function yw(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!(0,Bn.isInterfaceType)(r)){e.reportError(`Type ${(0,Pr.inspect)(t)} must only implement Interface types, it cannot implement ${(0,Pr.inspect)(r)}.`,gf(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,gf(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,gf(t,r));continue}n[r.name]=!0,k6(e,t,r),U6(e,t,r)}}function U6(e,t,n){let r=t.getFields();for(let l of Object.values(n.getFields())){let d=l.name,p=r[d];if(!p){e.reportError(`Interface field ${n.name}.${d} expected but ${t.name} does not provide it.`,[l.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!(0,Ew.isTypeSubTypeOf)(e.schema,p.type,l.type)){var i,a;e.reportError(`Interface field ${n.name}.${d} expects type ${(0,Pr.inspect)(l.type)} but ${t.name}.${d} is type ${(0,Pr.inspect)(p.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(a=p.astNode)===null||a===void 0?void 0:a.type])}for(let E of l.args){let I=E.name,v=p.args.find(A=>A.name===I);if(!v){e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expected but ${t.name}.${d} does not provide it.`,[E.astNode,p.astNode]);continue}if(!(0,Ew.isEqualType)(E.type,v.type)){var o,u;e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expects type ${(0,Pr.inspect)(E.type)} but ${t.name}.${d}(${I}:) is type ${(0,Pr.inspect)(v.type)}.`,[(o=E.astNode)===null||o===void 0?void 0:o.type,(u=v.astNode)===null||u===void 0?void 0:u.type])}}for(let E of p.args){let I=E.name;!l.args.find(A=>A.name===I)&&(0,Bn.isRequiredArgument)(E)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${I} that is missing from the Interface field ${n.name}.${d}.`,[E.astNode,l.astNode])}}}function k6(e,t,n){let r=t.getInterfaces();for(let i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...gf(n,i),...gf(t,n)])}function M6(e,t){let n=t.getTypes();n.length===0&&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 n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,Iw(t,i.name));continue}r[i.name]=!0,(0,Bn.isObjectType)(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,Pr.inspect)(i)}.`,Iw(t,String(i)))}}function x6(e,t){let n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(let r of n)Tc(e,r)}function q6(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let a of n){if(Tc(e,a),!(0,Bn.isInputType)(a.type)){var r;e.reportError(`The type of ${t.name}.${a.name} must be Input Type but got: ${(0,Pr.inspect)(a.type)}.`,(r=a.astNode)===null||r===void 0?void 0:r.type)}if((0,Bn.isRequiredInputField)(a)&&a.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${a.name} cannot be deprecated.`,[ng(a.astNode),(i=a.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&V6(t,a,e)}}function V6(e,t,n){if((0,Bn.isNonNullType)(t.type)){var r;n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(r=t.astNode)===null||r===void 0?void 0:r.type)}t.defaultValue!==void 0&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function j6(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(a){if(t[a.name])return;t[a.name]=!0,r[a.name]=n.length;let o=Object.values(a.getFields());for(let u of o)if((0,Bn.isNonNullType)(u.type)&&(0,Bn.isInputObjectType)(u.type.ofType)){let l=u.type.ofType,d=r[l.name];if(n.push(u),d===void 0)i(l);else{let p=n.slice(d),E=p.map(I=>I.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${E}".`,p.map(I=>I.astNode))}n.pop()}r[a.name]=void 0}}function gf(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var o;return(o=a.interfaces)!==null&&o!==void 0?o:[]}).filter(a=>a.name.value===t.name)}function Iw(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var o;return(o=a.types)!==null&&o!==void 0?o:[]}).filter(a=>a.name.value===t)}function ng(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===gw.GraphQLDeprecatedDirective.name)}});var Qa=F(ag=>{"use strict";m();T();N();Object.defineProperty(ag,"__esModule",{value:!0});ag.typeFromAST=ig;var rg=Lt(),vw=Ct();function ig(e,t){switch(t.kind){case rg.Kind.LIST_TYPE:{let n=ig(e,t.type);return n&&new vw.GraphQLList(n)}case rg.Kind.NON_NULL_TYPE:{let n=ig(e,t.type);return n&&new vw.GraphQLNonNull(n)}case rg.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var CN=F(vf=>{"use strict";m();T();N();Object.defineProperty(vf,"__esModule",{value:!0});vf.TypeInfo=void 0;vf.visitWithTypeInfo=G6;var K6=ja(),Un=Lt(),Ow=cc(),kn=Ct(),Al=ki(),Sw=Qa(),sg=class{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r!=null?r:$6,n&&((0,kn.isInputType)(n)&&this._inputTypeStack.push(n),(0,kn.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,kn.isOutputType)(n)&&this._typeStack.push(n))}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(t){let n=this._schema;switch(t.kind){case Un.Kind.SELECTION_SET:{let i=(0,kn.getNamedType)(this.getType());this._parentTypeStack.push((0,kn.isCompositeType)(i)?i:void 0);break}case Un.Kind.FIELD:{let i=this.getParentType(),a,o;i&&(a=this._getFieldDef(n,i,t),a&&(o=a.type)),this._fieldDefStack.push(a),this._typeStack.push((0,kn.isOutputType)(o)?o:void 0);break}case Un.Kind.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case Un.Kind.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push((0,kn.isObjectType)(i)?i:void 0);break}case Un.Kind.INLINE_FRAGMENT:case Un.Kind.FRAGMENT_DEFINITION:{let i=t.typeCondition,a=i?(0,Sw.typeFromAST)(n,i):(0,kn.getNamedType)(this.getType());this._typeStack.push((0,kn.isOutputType)(a)?a:void 0);break}case Un.Kind.VARIABLE_DEFINITION:{let i=(0,Sw.typeFromAST)(n,t.type);this._inputTypeStack.push((0,kn.isInputType)(i)?i:void 0);break}case Un.Kind.ARGUMENT:{var r;let i,a,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(u=>u.name===t.name.value),i&&(a=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.LIST:{let i=(0,kn.getNullableType)(this.getInputType()),a=(0,kn.isListType)(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.OBJECT_FIELD:{let i=(0,kn.getNamedType)(this.getInputType()),a,o;(0,kn.isInputObjectType)(i)&&(o=i.getFields()[t.name.value],o&&(a=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.ENUM:{let i=(0,kn.getNamedType)(this.getInputType()),a;(0,kn.isEnumType)(i)&&(a=i.getValue(t.value)),this._enumValue=a;break}default:}}leave(t){switch(t.kind){case Un.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Un.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Un.Kind.DIRECTIVE:this._directive=null;break;case Un.Kind.OPERATION_DEFINITION:case Un.Kind.INLINE_FRAGMENT:case Un.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Un.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Un.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Un.Kind.LIST:case Un.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Un.Kind.ENUM:this._enumValue=null;break;default:}}};vf.TypeInfo=sg;function $6(e,t,n){let r=n.name.value;if(r===Al.SchemaMetaFieldDef.name&&e.getQueryType()===t)return Al.SchemaMetaFieldDef;if(r===Al.TypeMetaFieldDef.name&&e.getQueryType()===t)return Al.TypeMetaFieldDef;if(r===Al.TypeNameMetaFieldDef.name&&(0,kn.isCompositeType)(t))return Al.TypeNameMetaFieldDef;if((0,kn.isObjectType)(t)||(0,kn.isInterfaceType)(t))return t.getFields()[r]}function G6(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=(0,Ow.getEnterLeaveForKind)(t,r.kind).enter;if(i){let a=i.apply(t,n);return a!==void 0&&(e.leave(r),(0,K6.isNode)(a)&&e.enter(a)),a}},leave(...n){let r=n[0],i=(0,Ow.getEnterLeaveForKind)(t,r.kind).leave,a;return i&&(a=i.apply(t,n)),e.leave(r),a}}}});var Ec=F(Mi=>{"use strict";m();T();N();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.isConstValueNode=og;Mi.isDefinitionNode=Q6;Mi.isExecutableDefinitionNode=Dw;Mi.isSelectionNode=Y6;Mi.isTypeDefinitionNode=Rw;Mi.isTypeExtensionNode=Fw;Mi.isTypeNode=J6;Mi.isTypeSystemDefinitionNode=Aw;Mi.isTypeSystemExtensionNode=Pw;Mi.isValueNode=bw;var Bt=Lt();function Q6(e){return Dw(e)||Aw(e)||Pw(e)}function Dw(e){return e.kind===Bt.Kind.OPERATION_DEFINITION||e.kind===Bt.Kind.FRAGMENT_DEFINITION}function Y6(e){return e.kind===Bt.Kind.FIELD||e.kind===Bt.Kind.FRAGMENT_SPREAD||e.kind===Bt.Kind.INLINE_FRAGMENT}function bw(e){return e.kind===Bt.Kind.VARIABLE||e.kind===Bt.Kind.INT||e.kind===Bt.Kind.FLOAT||e.kind===Bt.Kind.STRING||e.kind===Bt.Kind.BOOLEAN||e.kind===Bt.Kind.NULL||e.kind===Bt.Kind.ENUM||e.kind===Bt.Kind.LIST||e.kind===Bt.Kind.OBJECT}function og(e){return bw(e)&&(e.kind===Bt.Kind.LIST?e.values.some(og):e.kind===Bt.Kind.OBJECT?e.fields.some(t=>og(t.value)):e.kind!==Bt.Kind.VARIABLE)}function J6(e){return e.kind===Bt.Kind.NAMED_TYPE||e.kind===Bt.Kind.LIST_TYPE||e.kind===Bt.Kind.NON_NULL_TYPE}function Aw(e){return e.kind===Bt.Kind.SCHEMA_DEFINITION||Rw(e)||e.kind===Bt.Kind.DIRECTIVE_DEFINITION}function Rw(e){return e.kind===Bt.Kind.SCALAR_TYPE_DEFINITION||e.kind===Bt.Kind.OBJECT_TYPE_DEFINITION||e.kind===Bt.Kind.INTERFACE_TYPE_DEFINITION||e.kind===Bt.Kind.UNION_TYPE_DEFINITION||e.kind===Bt.Kind.ENUM_TYPE_DEFINITION||e.kind===Bt.Kind.INPUT_OBJECT_TYPE_DEFINITION}function Pw(e){return e.kind===Bt.Kind.SCHEMA_EXTENSION||Fw(e)}function Fw(e){return e.kind===Bt.Kind.SCALAR_TYPE_EXTENSION||e.kind===Bt.Kind.OBJECT_TYPE_EXTENSION||e.kind===Bt.Kind.INTERFACE_TYPE_EXTENSION||e.kind===Bt.Kind.UNION_TYPE_EXTENSION||e.kind===Bt.Kind.ENUM_TYPE_EXTENSION||e.kind===Bt.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var cg=F(ug=>{"use strict";m();T();N();Object.defineProperty(ug,"__esModule",{value:!0});ug.ExecutableDefinitionsRule=W6;var H6=Xe(),ww=Lt(),z6=Ec();function W6(e){return{Document(t){for(let n of t.definitions)if(!(0,z6.isExecutableDefinitionNode)(n)){let r=n.kind===ww.Kind.SCHEMA_DEFINITION||n.kind===ww.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new H6.GraphQLError(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}});var dg=F(lg=>{"use strict";m();T();N();Object.defineProperty(lg,"__esModule",{value:!0});lg.FieldsOnCorrectTypeRule=tW;var Lw=mu(),X6=sf(),Z6=Tu(),eW=Xe(),Of=Ct();function tW(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),a=t.name.value,o=(0,Lw.didYouMean)("to use an inline fragment on",nW(i,n,a));o===""&&(o=(0,Lw.didYouMean)(rW(n,a))),e.reportError(new eW.GraphQLError(`Cannot query field "${a}" on type "${n.name}".`+o,{nodes:t}))}}}}function nW(e,t,n){if(!(0,Of.isAbstractType)(t))return[];let r=new Set,i=Object.create(null);for(let o of e.getPossibleTypes(t))if(o.getFields()[n]){r.add(o),i[o.name]=1;for(let u of o.getInterfaces()){var a;u.getFields()[n]&&(r.add(u),i[u.name]=((a=i[u.name])!==null&&a!==void 0?a:0)+1)}}return[...r].sort((o,u)=>{let l=i[u.name]-i[o.name];return l!==0?l:(0,Of.isInterfaceType)(o)&&e.isSubType(o,u)?-1:(0,Of.isInterfaceType)(u)&&e.isSubType(u,o)?1:(0,X6.naturalCompare)(o.name,u.name)}).map(o=>o.name)}function rW(e,t){if((0,Of.isObjectType)(e)||(0,Of.isInterfaceType)(e)){let n=Object.keys(e.getFields());return(0,Z6.suggestionList)(t,n)}return[]}});var pg=F(fg=>{"use strict";m();T();N();Object.defineProperty(fg,"__esModule",{value:!0});fg.FragmentsOnCompositeTypesRule=iW;var Cw=Xe(),Bw=Ti(),Uw=Ct(),kw=Qa();function iW(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=(0,kw.typeFromAST)(e.getSchema(),n);if(r&&!(0,Uw.isCompositeType)(r)){let i=(0,Bw.print)(n);e.reportError(new Cw.GraphQLError(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=(0,kw.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,Uw.isCompositeType)(n)){let r=(0,Bw.print)(t.typeCondition);e.reportError(new Cw.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}});var mg=F(BN=>{"use strict";m();T();N();Object.defineProperty(BN,"__esModule",{value:!0});BN.KnownArgumentNamesOnDirectivesRule=Vw;BN.KnownArgumentNamesRule=oW;var Mw=mu(),xw=Tu(),qw=Xe(),aW=Lt(),sW=Xr();function oW(e){return $(k({},Vw(e)),{Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let a=t.name.value,o=r.args.map(l=>l.name),u=(0,xw.suggestionList)(a,o);e.reportError(new qw.GraphQLError(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+(0,Mw.didYouMean)(u),{nodes:t}))}}})}function Vw(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():sW.specifiedDirectives;for(let o of r)t[o.name]=o.args.map(u=>u.name);let i=e.getDocument().definitions;for(let o of i)if(o.kind===aW.Kind.DIRECTIVE_DEFINITION){var a;let u=(a=o.arguments)!==null&&a!==void 0?a:[];t[o.name.value]=u.map(l=>l.name.value)}return{Directive(o){let u=o.name.value,l=t[u];if(o.arguments&&l)for(let d of o.arguments){let p=d.name.value;if(!l.includes(p)){let E=(0,xw.suggestionList)(p,l);e.reportError(new qw.GraphQLError(`Unknown argument "${p}" on directive "@${u}".`+(0,Mw.didYouMean)(E),{nodes:d}))}}return!1}}}});var hg=F(Eg=>{"use strict";m();T();N();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.KnownDirectivesRule=lW;var uW=Wt(),Ng=Ar(),jw=Xe(),Tg=ja(),ur=gl(),_n=Lt(),cW=Xr();function lW(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():cW.specifiedDirectives;for(let a of r)t[a.name]=a.locations;let i=e.getDocument().definitions;for(let a of i)a.kind===_n.Kind.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(o=>o.value));return{Directive(a,o,u,l,d){let p=a.name.value,E=t[p];if(!E){e.reportError(new jw.GraphQLError(`Unknown directive "@${p}".`,{nodes:a}));return}let I=dW(d);I&&!E.includes(I)&&e.reportError(new jw.GraphQLError(`Directive "@${p}" may not be used on ${I}.`,{nodes:a}))}}}function dW(e){let t=e[e.length-1];switch("kind"in t||(0,Ng.invariant)(!1),t.kind){case _n.Kind.OPERATION_DEFINITION:return fW(t.operation);case _n.Kind.FIELD:return ur.DirectiveLocation.FIELD;case _n.Kind.FRAGMENT_SPREAD:return ur.DirectiveLocation.FRAGMENT_SPREAD;case _n.Kind.INLINE_FRAGMENT:return ur.DirectiveLocation.INLINE_FRAGMENT;case _n.Kind.FRAGMENT_DEFINITION:return ur.DirectiveLocation.FRAGMENT_DEFINITION;case _n.Kind.VARIABLE_DEFINITION:return ur.DirectiveLocation.VARIABLE_DEFINITION;case _n.Kind.SCHEMA_DEFINITION:case _n.Kind.SCHEMA_EXTENSION:return ur.DirectiveLocation.SCHEMA;case _n.Kind.SCALAR_TYPE_DEFINITION:case _n.Kind.SCALAR_TYPE_EXTENSION:return ur.DirectiveLocation.SCALAR;case _n.Kind.OBJECT_TYPE_DEFINITION:case _n.Kind.OBJECT_TYPE_EXTENSION:return ur.DirectiveLocation.OBJECT;case _n.Kind.FIELD_DEFINITION:return ur.DirectiveLocation.FIELD_DEFINITION;case _n.Kind.INTERFACE_TYPE_DEFINITION:case _n.Kind.INTERFACE_TYPE_EXTENSION:return ur.DirectiveLocation.INTERFACE;case _n.Kind.UNION_TYPE_DEFINITION:case _n.Kind.UNION_TYPE_EXTENSION:return ur.DirectiveLocation.UNION;case _n.Kind.ENUM_TYPE_DEFINITION:case _n.Kind.ENUM_TYPE_EXTENSION:return ur.DirectiveLocation.ENUM;case _n.Kind.ENUM_VALUE_DEFINITION:return ur.DirectiveLocation.ENUM_VALUE;case _n.Kind.INPUT_OBJECT_TYPE_DEFINITION:case _n.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ur.DirectiveLocation.INPUT_OBJECT;case _n.Kind.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||(0,Ng.invariant)(!1),n.kind===_n.Kind.INPUT_OBJECT_TYPE_DEFINITION?ur.DirectiveLocation.INPUT_FIELD_DEFINITION:ur.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,Ng.invariant)(!1,"Unexpected kind: "+(0,uW.inspect)(t.kind))}}function fW(e){switch(e){case Tg.OperationTypeNode.QUERY:return ur.DirectiveLocation.QUERY;case Tg.OperationTypeNode.MUTATION:return ur.DirectiveLocation.MUTATION;case Tg.OperationTypeNode.SUBSCRIPTION:return ur.DirectiveLocation.SUBSCRIPTION}}});var Ig=F(yg=>{"use strict";m();T();N();Object.defineProperty(yg,"__esModule",{value:!0});yg.KnownFragmentNamesRule=mW;var pW=Xe();function mW(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new pW.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}});var vg=F(_g=>{"use strict";m();T();N();Object.defineProperty(_g,"__esModule",{value:!0});_g.KnownTypeNamesRule=IW;var NW=mu(),TW=Tu(),EW=Xe(),gg=Ec(),hW=ki(),yW=Ga();function IW(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let a of e.getDocument().definitions)(0,gg.isTypeDefinitionNode)(a)&&(r[a.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(a,o,u,l,d){let p=a.name.value;if(!n[p]&&!r[p]){var E;let I=(E=d[2])!==null&&E!==void 0?E:u,v=I!=null&&gW(I);if(v&&Kw.includes(p))return;let A=(0,TW.suggestionList)(p,v?Kw.concat(i):i);e.reportError(new EW.GraphQLError(`Unknown type "${p}".`+(0,NW.didYouMean)(A),{nodes:a}))}}}}var Kw=[...yW.specifiedScalarTypes,...hW.introspectionTypes].map(e=>e.name);function gW(e){return"kind"in e&&((0,gg.isTypeSystemDefinitionNode)(e)||(0,gg.isTypeSystemExtensionNode)(e))}});var Sg=F(Og=>{"use strict";m();T();N();Object.defineProperty(Og,"__esModule",{value:!0});Og.LoneAnonymousOperationRule=OW;var _W=Xe(),vW=Lt();function OW(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===vW.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new _W.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}});var bg=F(Dg=>{"use strict";m();T();N();Object.defineProperty(Dg,"__esModule",{value:!0});Dg.LoneSchemaDefinitionRule=SW;var $w=Xe();function SW(e){var t,n,r;let i=e.getSchema(),a=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType(),o=0;return{SchemaDefinition(u){if(a){e.reportError(new $w.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:u}));return}o>0&&e.reportError(new $w.GraphQLError("Must provide only one schema definition.",{nodes:u})),++o}}}});var Rg=F(Ag=>{"use strict";m();T();N();Object.defineProperty(Ag,"__esModule",{value:!0});Ag.MaxIntrospectionDepthRule=AW;var DW=Xe(),Gw=Lt(),bW=3;function AW(e){function t(n,r=Object.create(null),i=0){if(n.kind===Gw.Kind.FRAGMENT_SPREAD){let a=n.name.value;if(r[a]===!0)return!1;let o=e.getFragment(a);if(!o)return!1;try{return r[a]=!0,t(o,r,i)}finally{r[a]=void 0}}if(n.kind===Gw.Kind.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=bW))return!0;if("selectionSet"in n&&n.selectionSet){for(let a of n.selectionSet.selections)if(t(a,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new DW.GraphQLError("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}});var Fg=F(Pg=>{"use strict";m();T();N();Object.defineProperty(Pg,"__esModule",{value:!0});Pg.NoFragmentCyclesRule=PW;var RW=Xe();function PW(e){let t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(a){return i(a),!1}};function i(a){if(t[a.name.value])return;let o=a.name.value;t[o]=!0;let u=e.getFragmentSpreads(a.selectionSet);if(u.length!==0){r[o]=n.length;for(let l of u){let d=l.name.value,p=r[d];if(n.push(l),p===void 0){let E=e.getFragment(d);E&&i(E)}else{let E=n.slice(p),I=E.slice(0,-1).map(v=>'"'+v.name.value+'"').join(", ");e.reportError(new RW.GraphQLError(`Cannot spread fragment "${d}" within itself`+(I!==""?` via ${I}.`:"."),{nodes:E}))}n.pop()}r[o]=void 0}}}});var Lg=F(wg=>{"use strict";m();T();N();Object.defineProperty(wg,"__esModule",{value:!0});wg.NoUndefinedVariablesRule=wW;var FW=Xe();function wW(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i}of r){let a=i.name.value;t[a]!==!0&&e.reportError(new FW.GraphQLError(n.name?`Variable "$${a}" is not defined by operation "${n.name.value}".`:`Variable "$${a}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}});var Bg=F(Cg=>{"use strict";m();T();N();Object.defineProperty(Cg,"__esModule",{value:!0});Cg.NoUnusedFragmentsRule=CW;var LW=Xe();function CW(e){let t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){let r=Object.create(null);for(let i of t)for(let a of e.getRecursivelyReferencedFragments(i))r[a.name.value]=!0;for(let i of n){let a=i.name.value;r[a]!==!0&&e.reportError(new LW.GraphQLError(`Fragment "${a}" is never used.`,{nodes:i}))}}}}}});var kg=F(Ug=>{"use strict";m();T();N();Object.defineProperty(Ug,"__esModule",{value:!0});Ug.NoUnusedVariablesRule=UW;var BW=Xe();function UW(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:a}of i)r[a.name.value]=!0;for(let a of t){let o=a.variable.name.value;r[o]!==!0&&e.reportError(new BW.GraphQLError(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:a}))}}},VariableDefinition(n){t.push(n)}}}});var qg=F(xg=>{"use strict";m();T();N();Object.defineProperty(xg,"__esModule",{value:!0});xg.sortValueNode=Mg;var kW=sf(),As=Lt();function Mg(e){switch(e.kind){case As.Kind.OBJECT:return $(k({},e),{fields:MW(e.fields)});case As.Kind.LIST:return $(k({},e),{values:e.values.map(Mg)});case As.Kind.INT:case As.Kind.FLOAT:case As.Kind.STRING:case As.Kind.BOOLEAN:case As.Kind.NULL:case As.Kind.ENUM:case As.Kind.VARIABLE:return e}}function MW(e){return e.map(t=>$(k({},t),{value:Mg(t.value)})).sort((t,n)=>(0,kW.naturalCompare)(t.name.value,n.name.value))}});var Yg=F(Qg=>{"use strict";m();T();N();Object.defineProperty(Qg,"__esModule",{value:!0});Qg.OverlappingFieldsCanBeMergedRule=jW;var Qw=Wt(),xW=Xe(),Vg=Lt(),qW=Ti(),Zr=Ct(),VW=qg(),Jw=Qa();function Hw(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Hw(n)).join(" and "):e}function jW(e){let t=new $g,n=new Map;return{SelectionSet(r){let i=KW(e,n,t,e.getParentType(),r);for(let[[a,o],u,l]of i){let d=Hw(o);e.reportError(new xW.GraphQLError(`Fields "${a}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:u.concat(l)}))}}}}function KW(e,t,n,r,i){let a=[],[o,u]=MN(e,t,r,i);if(GW(e,a,t,n,o),u.length!==0)for(let l=0;l1)for(let u=0;u[a.value,o]));return n.every(a=>{let o=a.value,u=i.get(a.name.value);return u===void 0?!1:Yw(o)===Yw(u)})}function Yw(e){return(0,qW.print)((0,VW.sortValueNode)(e))}function jg(e,t){return(0,Zr.isListType)(e)?(0,Zr.isListType)(t)?jg(e.ofType,t.ofType):!0:(0,Zr.isListType)(t)?!0:(0,Zr.isNonNullType)(e)?(0,Zr.isNonNullType)(t)?jg(e.ofType,t.ofType):!0:(0,Zr.isNonNullType)(t)?!0:(0,Zr.isLeafType)(e)||(0,Zr.isLeafType)(t)?e!==t:!1}function MN(e,t,n,r){let i=t.get(r);if(i)return i;let a=Object.create(null),o=Object.create(null);Ww(e,n,r,a,o);let u=[a,Object.keys(o)];return t.set(r,u),u}function Kg(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=(0,Jw.typeFromAST)(e.getSchema(),n.typeCondition);return MN(e,t,i,n.selectionSet)}function Ww(e,t,n,r,i){for(let a of n.selections)switch(a.kind){case Vg.Kind.FIELD:{let o=a.name.value,u;((0,Zr.isObjectType)(t)||(0,Zr.isInterfaceType)(t))&&(u=t.getFields()[o]);let l=a.alias?a.alias.value:o;r[l]||(r[l]=[]),r[l].push([t,a,u]);break}case Vg.Kind.FRAGMENT_SPREAD:i[a.name.value]=!0;break;case Vg.Kind.INLINE_FRAGMENT:{let o=a.typeCondition,u=o?(0,Jw.typeFromAST)(e.getSchema(),o):t;Ww(e,u,a.selectionSet,r,i);break}}}function YW(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}var $g=class{constructor(){this._data=new Map}has(t,n,r){var i;let[a,o]=t{"use strict";m();T();N();Object.defineProperty(Hg,"__esModule",{value:!0});Hg.PossibleFragmentSpreadsRule=HW;var xN=Wt(),Xw=Xe(),Jg=Ct(),Zw=ff(),JW=Qa();function HW(e){return{InlineFragment(t){let n=e.getType(),r=e.getParentType();if((0,Jg.isCompositeType)(n)&&(0,Jg.isCompositeType)(r)&&!(0,Zw.doTypesOverlap)(e.getSchema(),n,r)){let i=(0,xN.inspect)(r),a=(0,xN.inspect)(n);e.reportError(new Xw.GraphQLError(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${a}".`,{nodes:t}))}},FragmentSpread(t){let n=t.name.value,r=zW(e,n),i=e.getParentType();if(r&&i&&!(0,Zw.doTypesOverlap)(e.getSchema(),r,i)){let a=(0,xN.inspect)(i),o=(0,xN.inspect)(r);e.reportError(new Xw.GraphQLError(`Fragment "${n}" cannot be spread here as objects of type "${a}" can never be of type "${o}".`,{nodes:t}))}}}}function zW(e,t){let n=e.getFragment(t);if(n){let r=(0,JW.typeFromAST)(e.getSchema(),n.typeCondition);if((0,Jg.isCompositeType)(r))return r}}});var Xg=F(Wg=>{"use strict";m();T();N();Object.defineProperty(Wg,"__esModule",{value:!0});Wg.PossibleTypeExtensionsRule=e4;var WW=mu(),tL=Wt(),nL=Ar(),XW=Tu(),eL=Xe(),Sn=Lt(),ZW=Ec(),Rl=Ct();function e4(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)(0,ZW.isTypeDefinitionNode)(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){let a=i.name.value,o=n[a],u=t==null?void 0:t.getType(a),l;if(o?l=t4[o.kind]:u&&(l=n4(u)),l){if(l!==i.kind){let d=r4(i.kind);e.reportError(new eL.GraphQLError(`Cannot extend non-${d} type "${a}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(k(k({},n),t==null?void 0:t.getTypeMap())),p=(0,XW.suggestionList)(a,d);e.reportError(new eL.GraphQLError(`Cannot extend type "${a}" because it is not defined.`+(0,WW.didYouMean)(p),{nodes:i.name}))}}}var t4={[Sn.Kind.SCALAR_TYPE_DEFINITION]:Sn.Kind.SCALAR_TYPE_EXTENSION,[Sn.Kind.OBJECT_TYPE_DEFINITION]:Sn.Kind.OBJECT_TYPE_EXTENSION,[Sn.Kind.INTERFACE_TYPE_DEFINITION]:Sn.Kind.INTERFACE_TYPE_EXTENSION,[Sn.Kind.UNION_TYPE_DEFINITION]:Sn.Kind.UNION_TYPE_EXTENSION,[Sn.Kind.ENUM_TYPE_DEFINITION]:Sn.Kind.ENUM_TYPE_EXTENSION,[Sn.Kind.INPUT_OBJECT_TYPE_DEFINITION]:Sn.Kind.INPUT_OBJECT_TYPE_EXTENSION};function n4(e){if((0,Rl.isScalarType)(e))return Sn.Kind.SCALAR_TYPE_EXTENSION;if((0,Rl.isObjectType)(e))return Sn.Kind.OBJECT_TYPE_EXTENSION;if((0,Rl.isInterfaceType)(e))return Sn.Kind.INTERFACE_TYPE_EXTENSION;if((0,Rl.isUnionType)(e))return Sn.Kind.UNION_TYPE_EXTENSION;if((0,Rl.isEnumType)(e))return Sn.Kind.ENUM_TYPE_EXTENSION;if((0,Rl.isInputObjectType)(e))return Sn.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,nL.invariant)(!1,"Unexpected type: "+(0,tL.inspect)(e))}function r4(e){switch(e){case Sn.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case Sn.Kind.OBJECT_TYPE_EXTENSION:return"object";case Sn.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case Sn.Kind.UNION_TYPE_EXTENSION:return"union";case Sn.Kind.ENUM_TYPE_EXTENSION:return"enum";case Sn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,nL.invariant)(!1,"Unexpected kind: "+(0,tL.inspect)(e))}}});var e_=F(qN=>{"use strict";m();T();N();Object.defineProperty(qN,"__esModule",{value:!0});qN.ProvidedRequiredArgumentsOnDirectivesRule=oL;qN.ProvidedRequiredArgumentsRule=s4;var iL=Wt(),rL=Nu(),aL=Xe(),sL=Lt(),i4=Ti(),Zg=Ct(),a4=Xr();function s4(e){return $(k({},oL(e)),{Field:{leave(t){var n;let r=e.getFieldDef();if(!r)return!1;let i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(a=>a.name.value));for(let a of r.args)if(!i.has(a.name)&&(0,Zg.isRequiredArgument)(a)){let o=(0,iL.inspect)(a.type);e.reportError(new aL.GraphQLError(`Field "${r.name}" argument "${a.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function oL(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:a4.specifiedDirectives;for(let u of i)n[u.name]=(0,rL.keyMap)(u.args.filter(Zg.isRequiredArgument),l=>l.name);let a=e.getDocument().definitions;for(let u of a)if(u.kind===sL.Kind.DIRECTIVE_DEFINITION){var o;let l=(o=u.arguments)!==null&&o!==void 0?o:[];n[u.name.value]=(0,rL.keyMap)(l.filter(o4),d=>d.name.value)}return{Directive:{leave(u){let l=u.name.value,d=n[l];if(d){var p;let E=(p=u.arguments)!==null&&p!==void 0?p:[],I=new Set(E.map(v=>v.name.value));for(let[v,A]of Object.entries(d))if(!I.has(v)){let U=(0,Zg.isType)(A.type)?(0,iL.inspect)(A.type):(0,i4.print)(A.type);e.reportError(new aL.GraphQLError(`Directive "@${l}" argument "${v}" of type "${U}" is required, but it was not provided.`,{nodes:u}))}}}}}}function o4(e){return e.type.kind===sL.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var n_=F(t_=>{"use strict";m();T();N();Object.defineProperty(t_,"__esModule",{value:!0});t_.ScalarLeafsRule=u4;var uL=Wt(),cL=Xe(),lL=Ct();function u4(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if((0,lL.isLeafType)((0,lL.getNamedType)(n))){if(r){let i=t.name.value,a=(0,uL.inspect)(n);e.reportError(new cL.GraphQLError(`Field "${i}" must not have a selection since type "${a}" has no subfields.`,{nodes:r}))}}else if(!r){let i=t.name.value,a=(0,uL.inspect)(n);e.reportError(new cL.GraphQLError(`Field "${i}" of type "${a}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}});var i_=F(r_=>{"use strict";m();T();N();Object.defineProperty(r_,"__esModule",{value:!0});r_.printPathArray=c4;function c4(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var Sf=F(VN=>{"use strict";m();T();N();Object.defineProperty(VN,"__esModule",{value:!0});VN.addPath=l4;VN.pathToArray=d4;function l4(e,t,n){return{prev:e,key:t,typename:n}}function d4(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}});var s_=F(a_=>{"use strict";m();T();N();Object.defineProperty(a_,"__esModule",{value:!0});a_.coerceInputValue=h4;var f4=mu(),jN=Wt(),p4=Ar(),m4=PN(),N4=Va(),Na=Sf(),T4=i_(),E4=Tu(),Rs=Xe(),Df=Ct();function h4(e,t,n=y4){return bf(e,t,n,void 0)}function y4(e,t,n){let r="Invalid value "+(0,jN.inspect)(t);throw e.length>0&&(r+=` at "value${(0,T4.printPathArray)(e)}"`),n.message=r+": "+n.message,n}function bf(e,t,n,r){if((0,Df.isNonNullType)(t)){if(e!=null)return bf(e,t.ofType,n,r);n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Expected non-nullable type "${(0,jN.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,Df.isListType)(t)){let i=t.ofType;return(0,m4.isIterableObject)(e)?Array.from(e,(a,o)=>{let u=(0,Na.addPath)(r,o,void 0);return bf(a,i,n,u)}):[bf(e,i,n,r)]}if((0,Df.isInputObjectType)(t)){if(!(0,N4.isObjectLike)(e)){n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Expected type "${t.name}" to be an object.`));return}let i={},a=t.getFields();for(let o of Object.values(a)){let u=e[o.name];if(u===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if((0,Df.isNonNullType)(o.type)){let l=(0,jN.inspect)(o.type);n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=bf(u,o.type,n,(0,Na.addPath)(r,o.name,t.name))}for(let o of Object.keys(e))if(!a[o]){let u=(0,E4.suggestionList)(o,Object.keys(t.getFields()));n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Field "${o}" is not defined by type "${t.name}".`+(0,f4.didYouMean)(u)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let u=o[0],l=i[u];l===null&&n((0,Na.pathToArray)(r).concat(u),l,new Rs.GraphQLError(`Field "${u}" must be non-null.`))}return i}if((0,Df.isLeafType)(t)){let i;try{i=t.parseValue(e)}catch(a){a instanceof Rs.GraphQLError?n((0,Na.pathToArray)(r),e,a):n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Expected type "${t.name}". `+a.message,{originalError:a}));return}return i===void 0&&n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Expected type "${t.name}".`)),i}(0,p4.invariant)(!1,"Unexpected input type: "+(0,jN.inspect)(t))}});var Rf=F(o_=>{"use strict";m();T();N();Object.defineProperty(o_,"__esModule",{value:!0});o_.valueFromAST=Af;var I4=Wt(),g4=Ar(),_4=Nu(),Pl=Lt(),hc=Ct();function Af(e,t,n){if(e){if(e.kind===Pl.Kind.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&(0,hc.isNonNullType)(t)?void 0:i}if((0,hc.isNonNullType)(t))return e.kind===Pl.Kind.NULL?void 0:Af(e,t.ofType,n);if(e.kind===Pl.Kind.NULL)return null;if((0,hc.isListType)(t)){let r=t.ofType;if(e.kind===Pl.Kind.LIST){let a=[];for(let o of e.values)if(dL(o,n)){if((0,hc.isNonNullType)(r))return;a.push(null)}else{let u=Af(o,r,n);if(u===void 0)return;a.push(u)}return a}let i=Af(e,r,n);return i===void 0?void 0:[i]}if((0,hc.isInputObjectType)(t)){if(e.kind!==Pl.Kind.OBJECT)return;let r=Object.create(null),i=(0,_4.keyMap)(e.fields,a=>a.name.value);for(let a of Object.values(t.getFields())){let o=i[a.name];if(!o||dL(o.value,n)){if(a.defaultValue!==void 0)r[a.name]=a.defaultValue;else if((0,hc.isNonNullType)(a.type))return;continue}let u=Af(o.value,a.type,n);if(u===void 0)return;r[a.name]=u}if(t.isOneOf){let a=Object.keys(r);if(a.length!==1||r[a[0]]===null)return}return r}if((0,hc.isLeafType)(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}(0,g4.invariant)(!1,"Unexpected input type: "+(0,I4.inspect)(t))}}function dL(e,t){return e.kind===Pl.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var Ll=F(Pf=>{"use strict";m();T();N();Object.defineProperty(Pf,"__esModule",{value:!0});Pf.getArgumentValues=NL;Pf.getDirectiveValues=R4;Pf.getVariableValues=b4;var Fl=Wt(),v4=Nu(),O4=i_(),Ps=Xe(),fL=Lt(),pL=Ti(),wl=Ct(),S4=s_(),D4=Qa(),mL=Rf();function b4(e,t,n,r){let i=[],a=r==null?void 0:r.maxErrors;try{let o=A4(e,t,n,u=>{if(a!=null&&i.length>=a)throw new Ps.GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");i.push(u)});if(i.length===0)return{coerced:o}}catch(o){i.push(o)}return{errors:i}}function A4(e,t,n,r){let i={};for(let a of t){let o=a.variable.name.value,u=(0,D4.typeFromAST)(e,a.type);if(!(0,wl.isInputType)(u)){let d=(0,pL.print)(a.type);r(new Ps.GraphQLError(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:a.type}));continue}if(!TL(n,o)){if(a.defaultValue)i[o]=(0,mL.valueFromAST)(a.defaultValue,u);else if((0,wl.isNonNullType)(u)){let d=(0,Fl.inspect)(u);r(new Ps.GraphQLError(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:a}))}continue}let l=n[o];if(l===null&&(0,wl.isNonNullType)(u)){let d=(0,Fl.inspect)(u);r(new Ps.GraphQLError(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:a}));continue}i[o]=(0,S4.coerceInputValue)(l,u,(d,p,E)=>{let I=`Variable "$${o}" got invalid value `+(0,Fl.inspect)(p);d.length>0&&(I+=` at "${o}${(0,O4.printPathArray)(d)}"`),r(new Ps.GraphQLError(I+"; "+E.message,{nodes:a,originalError:E}))})}return i}function NL(e,t,n){var r;let i={},a=(r=t.arguments)!==null&&r!==void 0?r:[],o=(0,v4.keyMap)(a,u=>u.name.value);for(let u of e.args){let l=u.name,d=u.type,p=o[l];if(!p){if(u.defaultValue!==void 0)i[l]=u.defaultValue;else if((0,wl.isNonNullType)(d))throw new Ps.GraphQLError(`Argument "${l}" of required type "${(0,Fl.inspect)(d)}" was not provided.`,{nodes:t});continue}let E=p.value,I=E.kind===fL.Kind.NULL;if(E.kind===fL.Kind.VARIABLE){let A=E.name.value;if(n==null||!TL(n,A)){if(u.defaultValue!==void 0)i[l]=u.defaultValue;else if((0,wl.isNonNullType)(d))throw new Ps.GraphQLError(`Argument "${l}" of required type "${(0,Fl.inspect)(d)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:E});continue}I=n[A]==null}if(I&&(0,wl.isNonNullType)(d))throw new Ps.GraphQLError(`Argument "${l}" of non-null type "${(0,Fl.inspect)(d)}" must not be null.`,{nodes:E});let v=(0,mL.valueFromAST)(E,d,n);if(v===void 0)throw new Ps.GraphQLError(`Argument "${l}" has invalid value ${(0,pL.print)(E)}.`,{nodes:E});i[l]=v}return i}function R4(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(a=>a.name.value===e.name);if(i)return NL(e,i,n)}function TL(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var GN=F($N=>{"use strict";m();T();N();Object.defineProperty($N,"__esModule",{value:!0});$N.collectFields=w4;$N.collectSubfields=L4;var u_=Lt(),P4=Ct(),EL=Xr(),F4=Qa(),hL=Ll();function w4(e,t,n,r,i){let a=new Map;return KN(e,t,n,r,i,a,new Set),a}function L4(e,t,n,r,i){let a=new Map,o=new Set;for(let u of i)u.selectionSet&&KN(e,t,n,r,u.selectionSet,a,o);return a}function KN(e,t,n,r,i,a,o){for(let u of i.selections)switch(u.kind){case u_.Kind.FIELD:{if(!c_(n,u))continue;let l=C4(u),d=a.get(l);d!==void 0?d.push(u):a.set(l,[u]);break}case u_.Kind.INLINE_FRAGMENT:{if(!c_(n,u)||!yL(e,u,r))continue;KN(e,t,n,r,u.selectionSet,a,o);break}case u_.Kind.FRAGMENT_SPREAD:{let l=u.name.value;if(o.has(l)||!c_(n,u))continue;o.add(l);let d=t[l];if(!d||!yL(e,d,r))continue;KN(e,t,n,r,d.selectionSet,a,o);break}}}function c_(e,t){let n=(0,hL.getDirectiveValues)(EL.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,hL.getDirectiveValues)(EL.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function yL(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,F4.typeFromAST)(e,r);return i===n?!0:(0,P4.isAbstractType)(i)?e.isSubType(i,n):!1}function C4(e){return e.alias?e.alias.value:e.name.value}});var d_=F(l_=>{"use strict";m();T();N();Object.defineProperty(l_,"__esModule",{value:!0});l_.SingleFieldSubscriptionsRule=k4;var IL=Xe(),B4=Lt(),U4=GN();function k4(e){return{OperationDefinition(t){if(t.operation==="subscription"){let n=e.getSchema(),r=n.getSubscriptionType();if(r){let i=t.name?t.name.value:null,a=Object.create(null),o=e.getDocument(),u=Object.create(null);for(let d of o.definitions)d.kind===B4.Kind.FRAGMENT_DEFINITION&&(u[d.name.value]=d);let l=(0,U4.collectFields)(n,u,a,r,t.selectionSet);if(l.size>1){let E=[...l.values()].slice(1).flat();e.reportError(new IL.GraphQLError(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:E}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new IL.GraphQLError(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:d}))}}}}}});var QN=F(f_=>{"use strict";m();T();N();Object.defineProperty(f_,"__esModule",{value:!0});f_.groupBy=M4;function M4(e,t){let n=new Map;for(let r of e){let i=t(r),a=n.get(i);a===void 0?n.set(i,[r]):a.push(r)}return n}});var m_=F(p_=>{"use strict";m();T();N();Object.defineProperty(p_,"__esModule",{value:!0});p_.UniqueArgumentDefinitionNamesRule=V4;var x4=QN(),q4=Xe();function V4(e){return{DirectiveDefinition(r){var i;let a=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,a)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;let a=r.name.value,o=(i=r.fields)!==null&&i!==void 0?i:[];for(let l of o){var u;let d=l.name.value,p=(u=l.arguments)!==null&&u!==void 0?u:[];n(`${a}.${d}`,p)}return!1}function n(r,i){let a=(0,x4.groupBy)(i,o=>o.name.value);for(let[o,u]of a)u.length>1&&e.reportError(new q4.GraphQLError(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:u.map(l=>l.name)}));return!1}}});var T_=F(N_=>{"use strict";m();T();N();Object.defineProperty(N_,"__esModule",{value:!0});N_.UniqueArgumentNamesRule=$4;var j4=QN(),K4=Xe();function $4(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],a=(0,j4.groupBy)(i,o=>o.name.value);for(let[o,u]of a)u.length>1&&e.reportError(new K4.GraphQLError(`There can be only one argument named "${o}".`,{nodes:u.map(l=>l.name)}))}}});var h_=F(E_=>{"use strict";m();T();N();Object.defineProperty(E_,"__esModule",{value:!0});E_.UniqueDirectiveNamesRule=G4;var gL=Xe();function G4(e){let t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){let i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new gL.GraphQLError(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new gL.GraphQLError(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}});var g_=F(I_=>{"use strict";m();T();N();Object.defineProperty(I_,"__esModule",{value:!0});I_.UniqueDirectivesPerLocationRule=J4;var Q4=Xe(),y_=Lt(),_L=Ec(),Y4=Xr();function J4(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Y4.specifiedDirectives;for(let u of r)t[u.name]=!u.isRepeatable;let i=e.getDocument().definitions;for(let u of i)u.kind===y_.Kind.DIRECTIVE_DEFINITION&&(t[u.name.value]=!u.repeatable);let a=Object.create(null),o=Object.create(null);return{enter(u){if(!("directives"in u)||!u.directives)return;let l;if(u.kind===y_.Kind.SCHEMA_DEFINITION||u.kind===y_.Kind.SCHEMA_EXTENSION)l=a;else if((0,_L.isTypeDefinitionNode)(u)||(0,_L.isTypeExtensionNode)(u)){let d=u.name.value;l=o[d],l===void 0&&(o[d]=l=Object.create(null))}else l=Object.create(null);for(let d of u.directives){let p=d.name.value;t[p]&&(l[p]?e.reportError(new Q4.GraphQLError(`The directive "@${p}" can only be used once at this location.`,{nodes:[l[p],d]})):l[p]=d)}}}}});var v_=F(__=>{"use strict";m();T();N();Object.defineProperty(__,"__esModule",{value:!0});__.UniqueEnumValueNamesRule=z4;var vL=Xe(),H4=Ct();function z4(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(a){var o;let u=a.name.value;r[u]||(r[u]=Object.create(null));let l=(o=a.values)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let E=p.name.value,I=n[u];(0,H4.isEnumType)(I)&&I.getValue(E)?e.reportError(new vL.GraphQLError(`Enum value "${u}.${E}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[E]?e.reportError(new vL.GraphQLError(`Enum value "${u}.${E}" can only be defined once.`,{nodes:[d[E],p.name]})):d[E]=p.name}return!1}}});var D_=F(S_=>{"use strict";m();T();N();Object.defineProperty(S_,"__esModule",{value:!0});S_.UniqueFieldDefinitionNamesRule=W4;var OL=Xe(),O_=Ct();function W4(e){let t=e.getSchema(),n=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(a){var o;let u=a.name.value;r[u]||(r[u]=Object.create(null));let l=(o=a.fields)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let E=p.name.value;X4(n[u],E)?e.reportError(new OL.GraphQLError(`Field "${u}.${E}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[E]?e.reportError(new OL.GraphQLError(`Field "${u}.${E}" can only be defined once.`,{nodes:[d[E],p.name]})):d[E]=p.name}return!1}}function X4(e,t){return(0,O_.isObjectType)(e)||(0,O_.isInterfaceType)(e)||(0,O_.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var A_=F(b_=>{"use strict";m();T();N();Object.defineProperty(b_,"__esModule",{value:!0});b_.UniqueFragmentNamesRule=e8;var Z4=Xe();function e8(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new Z4.GraphQLError(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}});var P_=F(R_=>{"use strict";m();T();N();Object.defineProperty(R_,"__esModule",{value:!0});R_.UniqueInputFieldNamesRule=r8;var t8=Ar(),n8=Xe();function r8(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||(0,t8.invariant)(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new n8.GraphQLError(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}});var w_=F(F_=>{"use strict";m();T();N();Object.defineProperty(F_,"__esModule",{value:!0});F_.UniqueOperationNamesRule=a8;var i8=Xe();function a8(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new i8.GraphQLError(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}});var C_=F(L_=>{"use strict";m();T();N();Object.defineProperty(L_,"__esModule",{value:!0});L_.UniqueOperationTypesRule=s8;var SL=Xe();function s8(e){let t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(a){var o;let u=(o=a.operationTypes)!==null&&o!==void 0?o:[];for(let l of u){let d=l.operation,p=n[d];r[d]?e.reportError(new SL.GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):p?e.reportError(new SL.GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[p,l]})):n[d]=l}return!1}}});var U_=F(B_=>{"use strict";m();T();N();Object.defineProperty(B_,"__esModule",{value:!0});B_.UniqueTypeNamesRule=o8;var DL=Xe();function o8(e){let t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){let a=i.name.value;if(n!=null&&n.getType(a)){e.reportError(new DL.GraphQLError(`Type "${a}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[a]?e.reportError(new DL.GraphQLError(`There can be only one type named "${a}".`,{nodes:[t[a],i.name]})):t[a]=i.name,!1}}});var M_=F(k_=>{"use strict";m();T();N();Object.defineProperty(k_,"__esModule",{value:!0});k_.UniqueVariableNamesRule=l8;var u8=QN(),c8=Xe();function l8(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=(0,u8.groupBy)(r,a=>a.variable.name.value);for(let[a,o]of i)o.length>1&&e.reportError(new c8.GraphQLError(`There can be only one variable named "$${a}".`,{nodes:o.map(u=>u.variable.name)}))}}}});var V_=F(q_=>{"use strict";m();T();N();Object.defineProperty(q_,"__esModule",{value:!0});q_.ValuesOfCorrectTypeRule=m8;var d8=mu(),Ff=Wt(),f8=Nu(),p8=Tu(),Ja=Xe(),x_=Lt(),YN=Ti(),Ya=Ct();function m8(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=(0,Ya.getNullableType)(e.getParentInputType());if(!(0,Ya.isListType)(r))return yc(e,n),!1},ObjectValue(n){let r=(0,Ya.getNamedType)(e.getInputType());if(!(0,Ya.isInputObjectType)(r))return yc(e,n),!1;let i=(0,f8.keyMap)(n.fields,a=>a.name.value);for(let a of Object.values(r.getFields()))if(!i[a.name]&&(0,Ya.isRequiredInputField)(a)){let u=(0,Ff.inspect)(a.type);e.reportError(new Ja.GraphQLError(`Field "${r.name}.${a.name}" of required type "${u}" was not provided.`,{nodes:n}))}r.isOneOf&&N8(e,n,r,i,t)},ObjectField(n){let r=(0,Ya.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,Ya.isInputObjectType)(r)){let a=(0,p8.suggestionList)(n.name.value,Object.keys(r.getFields()));e.reportError(new Ja.GraphQLError(`Field "${n.name.value}" is not defined by type "${r.name}".`+(0,d8.didYouMean)(a),{nodes:n}))}},NullValue(n){let r=e.getInputType();(0,Ya.isNonNullType)(r)&&e.reportError(new Ja.GraphQLError(`Expected value of type "${(0,Ff.inspect)(r)}", found ${(0,YN.print)(n)}.`,{nodes:n}))},EnumValue:n=>yc(e,n),IntValue:n=>yc(e,n),FloatValue:n=>yc(e,n),StringValue:n=>yc(e,n),BooleanValue:n=>yc(e,n)}}function yc(e,t){let n=e.getInputType();if(!n)return;let r=(0,Ya.getNamedType)(n);if(!(0,Ya.isLeafType)(r)){let i=(0,Ff.inspect)(n);e.reportError(new Ja.GraphQLError(`Expected value of type "${i}", found ${(0,YN.print)(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let a=(0,Ff.inspect)(n);e.reportError(new Ja.GraphQLError(`Expected value of type "${a}", found ${(0,YN.print)(t)}.`,{nodes:t}))}}catch(i){let a=(0,Ff.inspect)(n);i instanceof Ja.GraphQLError?e.reportError(i):e.reportError(new Ja.GraphQLError(`Expected value of type "${a}", found ${(0,YN.print)(t)}; `+i.message,{nodes:t,originalError:i}))}}function N8(e,t,n,r,i){var a;let o=Object.keys(r);if(o.length!==1){e.reportError(new Ja.GraphQLError(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let l=(a=r[o[0]])===null||a===void 0?void 0:a.value,d=!l||l.kind===x_.Kind.NULL,p=(l==null?void 0:l.kind)===x_.Kind.VARIABLE;if(d){e.reportError(new Ja.GraphQLError(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(p){let E=l.name.value;i[E].type.kind!==x_.Kind.NON_NULL_TYPE&&e.reportError(new Ja.GraphQLError(`Variable "${E}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}});var K_=F(j_=>{"use strict";m();T();N();Object.defineProperty(j_,"__esModule",{value:!0});j_.VariablesAreInputTypesRule=I8;var T8=Xe(),E8=Ti(),h8=Ct(),y8=Qa();function I8(e){return{VariableDefinition(t){let n=(0,y8.typeFromAST)(e.getSchema(),t.type);if(n!==void 0&&!(0,h8.isInputType)(n)){let r=t.variable.name.value,i=(0,E8.print)(t.type);e.reportError(new T8.GraphQLError(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}});var G_=F($_=>{"use strict";m();T();N();Object.defineProperty($_,"__esModule",{value:!0});$_.VariablesInAllowedPositionRule=O8;var bL=Wt(),g8=Xe(),_8=Lt(),AL=Ct(),RL=ff(),v8=Qa();function O8(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i,type:a,defaultValue:o}of r){let u=i.name.value,l=t[u];if(l&&a){let d=e.getSchema(),p=(0,v8.typeFromAST)(d,l.type);if(p&&!S8(d,p,l.defaultValue,a,o)){let E=(0,bL.inspect)(p),I=(0,bL.inspect)(a);e.reportError(new g8.GraphQLError(`Variable "$${u}" of type "${E}" used in position expecting type "${I}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function S8(e,t,n,r,i){if((0,AL.isNonNullType)(r)&&!(0,AL.isNonNullType)(t)){if(!(n!=null&&n.kind!==_8.Kind.NULL)&&!(i!==void 0))return!1;let u=r.ofType;return(0,RL.isTypeSubTypeOf)(e,t,u)}return(0,RL.isTypeSubTypeOf)(e,t,r)}});var Q_=F(Iu=>{"use strict";m();T();N();Object.defineProperty(Iu,"__esModule",{value:!0});Iu.specifiedSDLRules=Iu.specifiedRules=Iu.recommendedRules=void 0;var D8=cg(),b8=dg(),A8=pg(),PL=mg(),FL=hg(),R8=Ig(),wL=vg(),P8=Sg(),F8=bg(),w8=Rg(),L8=Fg(),C8=Lg(),B8=Bg(),U8=kg(),k8=Yg(),M8=zg(),x8=Xg(),LL=e_(),q8=n_(),V8=d_(),j8=m_(),CL=T_(),K8=h_(),BL=g_(),$8=v_(),G8=D_(),Q8=A_(),UL=P_(),Y8=w_(),J8=C_(),H8=U_(),z8=M_(),W8=V_(),X8=K_(),Z8=G_(),kL=Object.freeze([w8.MaxIntrospectionDepthRule]);Iu.recommendedRules=kL;var eX=Object.freeze([D8.ExecutableDefinitionsRule,Y8.UniqueOperationNamesRule,P8.LoneAnonymousOperationRule,V8.SingleFieldSubscriptionsRule,wL.KnownTypeNamesRule,A8.FragmentsOnCompositeTypesRule,X8.VariablesAreInputTypesRule,q8.ScalarLeafsRule,b8.FieldsOnCorrectTypeRule,Q8.UniqueFragmentNamesRule,R8.KnownFragmentNamesRule,B8.NoUnusedFragmentsRule,M8.PossibleFragmentSpreadsRule,L8.NoFragmentCyclesRule,z8.UniqueVariableNamesRule,C8.NoUndefinedVariablesRule,U8.NoUnusedVariablesRule,FL.KnownDirectivesRule,BL.UniqueDirectivesPerLocationRule,PL.KnownArgumentNamesRule,CL.UniqueArgumentNamesRule,W8.ValuesOfCorrectTypeRule,LL.ProvidedRequiredArgumentsRule,Z8.VariablesInAllowedPositionRule,k8.OverlappingFieldsCanBeMergedRule,UL.UniqueInputFieldNamesRule,...kL]);Iu.specifiedRules=eX;var tX=Object.freeze([F8.LoneSchemaDefinitionRule,J8.UniqueOperationTypesRule,H8.UniqueTypeNamesRule,$8.UniqueEnumValueNamesRule,G8.UniqueFieldDefinitionNamesRule,j8.UniqueArgumentDefinitionNamesRule,K8.UniqueDirectiveNamesRule,wL.KnownTypeNamesRule,FL.KnownDirectivesRule,BL.UniqueDirectivesPerLocationRule,x8.PossibleTypeExtensionsRule,PL.KnownArgumentNamesOnDirectivesRule,CL.UniqueArgumentNamesRule,UL.UniqueInputFieldNamesRule,LL.ProvidedRequiredArgumentsOnDirectivesRule]);Iu.specifiedSDLRules=tX});var H_=F(gu=>{"use strict";m();T();N();Object.defineProperty(gu,"__esModule",{value:!0});gu.ValidationContext=gu.SDLValidationContext=gu.ASTValidationContext=void 0;var ML=Lt(),nX=cc(),xL=CN(),wf=class{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(let r of this.getDocument().definitions)r.kind===ML.Kind.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];let r=[t],i;for(;i=r.pop();)for(let a of i.selections)a.kind===ML.Kind.FRAGMENT_SPREAD?n.push(a):a.selectionSet&&r.push(a.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];let r=Object.create(null),i=[t.selectionSet],a;for(;a=i.pop();)for(let o of this.getFragmentSpreads(a)){let u=o.name.value;if(r[u]!==!0){r[u]=!0;let l=this.getFragment(u);l&&(n.push(l),i.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}};gu.ASTValidationContext=wf;var Y_=class extends wf{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};gu.SDLValidationContext=Y_;var J_=class extends wf{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){let r=[],i=new xL.TypeInfo(this._schema);(0,nX.visit)(t,(0,xL.visitWithTypeInfo)(i,{VariableDefinition:()=>!1,Variable(a){r.push({node:a,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(let r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}};gu.ValidationContext=J_});var Bl=F(Cl=>{"use strict";m();T();N();Object.defineProperty(Cl,"__esModule",{value:!0});Cl.assertValidSDL=oX;Cl.assertValidSDLExtension=uX;Cl.validate=sX;Cl.validateSDL=z_;var rX=Vr(),iX=Xe(),JN=cc(),aX=_f(),qL=CN(),VL=Q_(),jL=H_();function sX(e,t,n=VL.specifiedRules,r,i=new qL.TypeInfo(e)){var a;let o=(a=r==null?void 0:r.maxErrors)!==null&&a!==void 0?a:100;t||(0,rX.devAssert)(!1,"Must provide document."),(0,aX.assertValidSchema)(e);let u=Object.freeze({}),l=[],d=new jL.ValidationContext(e,t,i,E=>{if(l.length>=o)throw l.push(new iX.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),u;l.push(E)}),p=(0,JN.visitInParallel)(n.map(E=>E(d)));try{(0,JN.visit)(t,(0,qL.visitWithTypeInfo)(i,p))}catch(E){if(E!==u)throw E}return l}function z_(e,t,n=VL.specifiedSDLRules){let r=[],i=new jL.SDLValidationContext(e,t,o=>{r.push(o)}),a=n.map(o=>o(i));return(0,JN.visit)(e,(0,JN.visitInParallel)(a)),r}function oX(e){let t=z_(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}function nX(e,t){let n=z_(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(` +`))}function uX(e,t){let n=z_(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(` -`))}});var KL=w(W_=>{"use strict";m();T();N();Object.defineProperty(W_,"__esModule",{value:!0});W_.memoize3=rX;function rX(e){let t;return function(r,i,a){t===void 0&&(t=new WeakMap);let o=t.get(r);o===void 0&&(o=new WeakMap,t.set(r,o));let u=o.get(i);u===void 0&&(u=new WeakMap,o.set(i,u));let l=u.get(a);return l===void 0&&(l=e(r,i,a),u.set(a,l)),l}}});var $L=w(X_=>{"use strict";m();T();N();Object.defineProperty(X_,"__esModule",{value:!0});X_.promiseForObject=iX;function iX(e){return Promise.all(Object.values(e)).then(t=>{let n=Object.create(null);for(let[r,i]of Object.keys(e).entries())n[i]=t[r];return n})}});var GL=w(Z_=>{"use strict";m();T();N();Object.defineProperty(Z_,"__esModule",{value:!0});Z_.promiseReduce=sX;var aX=zm();function sX(e,t,n){let r=n;for(let i of e)r=(0,aX.isPromise)(r)?r.then(a=>t(a,i)):t(r,i);return r}});var QL=w(tv=>{"use strict";m();T();N();Object.defineProperty(tv,"__esModule",{value:!0});tv.toError=uX;var oX=Wt();function uX(e){return e instanceof Error?e:new ev(e)}var ev=class extends Error{constructor(t){super("Unexpected error value: "+(0,oX.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var HN=w(nv=>{"use strict";m();T();N();Object.defineProperty(nv,"__esModule",{value:!0});nv.locatedError=dX;var cX=QL(),lX=ze();function dX(e,t,n){var r;let i=(0,cX.toError)(e);return fX(i)?i:new lX.GraphQLError(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function fX(e){return Array.isArray(e.path)}});var Cf=w(qi=>{"use strict";m();T();N();Object.defineProperty(qi,"__esModule",{value:!0});qi.assertValidExecutionArguments=eC;qi.buildExecutionContext=tC;qi.buildResolveInfo=rC;qi.defaultTypeResolver=qi.defaultFieldResolver=void 0;qi.execute=ZL;qi.executeSync=yX;qi.getFieldDef=aC;var iv=Vr(),Ic=Wt(),pX=Ar(),mX=PN(),ov=Va(),Ta=zm(),NX=KL(),gc=Sf(),YL=$L(),TX=GL(),xi=ze(),WN=HN(),rv=ja(),JL=wt(),_u=Lt(),Ul=ki(),EX=_f(),WL=GN(),XL=Ll(),hX=(0,NX.memoize3)((e,t,n)=>(0,WL.collectSubfields)(e.schema,e.fragments,e.variableValues,t,n));function ZL(e){arguments.length<2||(0,iv.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,document:n,variableValues:r,rootValue:i}=e;eC(t,n,r);let a=tC(e);if(!("schema"in a))return{errors:a};try{let{operation:o}=a,u=IX(a,o,i);return(0,Ta.isPromise)(u)?u.then(l=>zN(l,a.errors),l=>(a.errors.push(l),zN(null,a.errors))):zN(u,a.errors)}catch(o){return a.errors.push(o),zN(null,a.errors)}}function yX(e){let t=ZL(e);if((0,Ta.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function zN(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function eC(e,t,n){t||(0,iv.devAssert)(!1,"Must provide document."),(0,EX.assertValidSchema)(e),n==null||(0,ov.isObjectLike)(n)||(0,iv.devAssert)(!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 tC(e){var t,n;let{schema:r,document:i,rootValue:a,contextValue:o,variableValues:u,operationName:l,fieldResolver:d,typeResolver:p,subscribeFieldResolver:E}=e,I,v=Object.create(null);for(let j of i.definitions)switch(j.kind){case JL.Kind.OPERATION_DEFINITION:if(l==null){if(I!==void 0)return[new xi.GraphQLError("Must provide operation name if query contains multiple operations.")];I=j}else((t=j.name)===null||t===void 0?void 0:t.value)===l&&(I=j);break;case JL.Kind.FRAGMENT_DEFINITION:v[j.name.value]=j;break;default:}if(!I)return l!=null?[new xi.GraphQLError(`Unknown operation named "${l}".`)]:[new xi.GraphQLError("Must provide an operation.")];let A=(n=I.variableDefinitions)!==null&&n!==void 0?n:[],U=(0,XL.getVariableValues)(r,A,u!=null?u:{},{maxErrors:50});return U.errors?U.errors:{schema:r,fragments:v,rootValue:a,contextValue:o,operation:I,variableValues:U.coerced,fieldResolver:d!=null?d:sv,typeResolver:p!=null?p:iC,subscribeFieldResolver:E!=null?E:sv,errors:[]}}function IX(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new xi.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=(0,WL.collectFields)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),a=void 0;switch(t.operation){case rv.OperationTypeNode.QUERY:return XN(e,r,n,a,i);case rv.OperationTypeNode.MUTATION:return gX(e,r,n,a,i);case rv.OperationTypeNode.SUBSCRIPTION:return XN(e,r,n,a,i)}}function gX(e,t,n,r,i){return(0,TX.promiseReduce)(i.entries(),(a,[o,u])=>{let l=(0,gc.addPath)(r,o,t.name),d=nC(e,t,n,u,l);return d===void 0?a:(0,Ta.isPromise)(d)?d.then(p=>(a[o]=p,a)):(a[o]=d,a)},Object.create(null))}function XN(e,t,n,r,i){let a=Object.create(null),o=!1;try{for(let[u,l]of i.entries()){let d=(0,gc.addPath)(r,u,t.name),p=nC(e,t,n,l,d);p!==void 0&&(a[u]=p,(0,Ta.isPromise)(p)&&(o=!0))}}catch(u){if(o)return(0,YL.promiseForObject)(a).finally(()=>{throw u});throw u}return o?(0,YL.promiseForObject)(a):a}function nC(e,t,n,r,i){var a;let o=aC(e.schema,t,r[0]);if(!o)return;let u=o.type,l=(a=o.resolve)!==null&&a!==void 0?a:e.fieldResolver,d=rC(e,o,r,t,i);try{let p=(0,XL.getArgumentValues)(o,r[0],e.variableValues),E=e.contextValue,I=l(n,p,E,d),v;return(0,Ta.isPromise)(I)?v=I.then(A=>Lf(e,u,r,d,i,A)):v=Lf(e,u,r,d,i,I),(0,Ta.isPromise)(v)?v.then(void 0,A=>{let U=(0,WN.locatedError)(A,r,(0,gc.pathToArray)(i));return ZN(U,u,e)}):v}catch(p){let E=(0,WN.locatedError)(p,r,(0,gc.pathToArray)(i));return ZN(E,u,e)}}function rC(e,t,n,r,i){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function ZN(e,t,n){if((0,_u.isNonNullType)(t))throw e;return n.errors.push(e),null}function Lf(e,t,n,r,i,a){if(a instanceof Error)throw a;if((0,_u.isNonNullType)(t)){let o=Lf(e,t.ofType,n,r,i,a);if(o===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return o}if(a==null)return null;if((0,_u.isListType)(t))return _X(e,t,n,r,i,a);if((0,_u.isLeafType)(t))return vX(t,a);if((0,_u.isAbstractType)(t))return OX(e,t,n,r,i,a);if((0,_u.isObjectType)(t))return av(e,t,n,r,i,a);(0,pX.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,Ic.inspect)(t))}function _X(e,t,n,r,i,a){if(!(0,mX.isIterableObject)(a))throw new xi.GraphQLError(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);let o=t.ofType,u=!1,l=Array.from(a,(d,p)=>{let E=(0,gc.addPath)(i,p,void 0);try{let I;return(0,Ta.isPromise)(d)?I=d.then(v=>Lf(e,o,n,r,E,v)):I=Lf(e,o,n,r,E,d),(0,Ta.isPromise)(I)?(u=!0,I.then(void 0,v=>{let A=(0,WN.locatedError)(v,n,(0,gc.pathToArray)(E));return ZN(A,o,e)})):I}catch(I){let v=(0,WN.locatedError)(I,n,(0,gc.pathToArray)(E));return ZN(v,o,e)}});return u?Promise.all(l):l}function vX(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${(0,Ic.inspect)(e)}.serialize(${(0,Ic.inspect)(t)})\` to return non-nullable value, returned: ${(0,Ic.inspect)(n)}`);return n}function OX(e,t,n,r,i,a){var o;let u=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,l=e.contextValue,d=u(a,l,r,t);return(0,Ta.isPromise)(d)?d.then(p=>av(e,HL(p,e,t,n,r,a),n,r,i,a)):av(e,HL(d,e,t,n,r,a),n,r,i,a)}function HL(e,t,n,r,i,a){if(e==null)throw new xi.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if((0,_u.isObjectType)(e))throw new xi.GraphQLError("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new xi.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,Ic.inspect)(a)}, received "${(0,Ic.inspect)(e)}".`);let o=t.schema.getType(e);if(o==null)throw new xi.GraphQLError(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!(0,_u.isObjectType)(o))throw new xi.GraphQLError(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new xi.GraphQLError(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function av(e,t,n,r,i,a){let o=hX(e,t,n);if(t.isTypeOf){let u=t.isTypeOf(a,e.contextValue,r);if((0,Ta.isPromise)(u))return u.then(l=>{if(!l)throw zL(t,a,n);return XN(e,t,a,i,o)});if(!u)throw zL(t,a,n)}return XN(e,t,a,i,o)}function zL(e,t,n){return new xi.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,Ic.inspect)(t)}.`,{nodes:n})}var iC=function(e,t,n,r){if((0,ov.isObjectLike)(e)&&typeof e.__typename=="string")return e.__typename;let i=n.schema.getPossibleTypes(r),a=[];for(let o=0;o{for(let u=0;u{"use strict";m();T();N();Object.defineProperty(eT,"__esModule",{value:!0});eT.graphql=FX;eT.graphqlSync=wX;var SX=Vr(),DX=zm(),bX=vl(),AX=_f(),RX=Bl(),PX=Cf();function FX(e){return new Promise(t=>t(sC(e)))}function wX(e){let t=sC(e);if((0,DX.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function sC(e){arguments.length<2||(0,SX.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,source:n,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:u,typeResolver:l}=e,d=(0,AX.validateSchema)(t);if(d.length>0)return{errors:d};let p;try{p=(0,bX.parse)(n)}catch(I){return{errors:[I]}}let E=(0,RX.validate)(t,p);return E.length>0?{errors:E}:(0,PX.execute)({schema:t,document:p,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:u,typeResolver:l})}});var lC=w(he=>{"use strict";m();T();N();Object.defineProperty(he,"__esModule",{value:!0});Object.defineProperty(he,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return Ea.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(he,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return Fs.GRAPHQL_MAX_INT}});Object.defineProperty(he,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return Fs.GRAPHQL_MIN_INT}});Object.defineProperty(he,"GraphQLBoolean",{enumerable:!0,get:function(){return Fs.GraphQLBoolean}});Object.defineProperty(he,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return Ea.GraphQLDeprecatedDirective}});Object.defineProperty(he,"GraphQLDirective",{enumerable:!0,get:function(){return Ea.GraphQLDirective}});Object.defineProperty(he,"GraphQLEnumType",{enumerable:!0,get:function(){return at.GraphQLEnumType}});Object.defineProperty(he,"GraphQLFloat",{enumerable:!0,get:function(){return Fs.GraphQLFloat}});Object.defineProperty(he,"GraphQLID",{enumerable:!0,get:function(){return Fs.GraphQLID}});Object.defineProperty(he,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return Ea.GraphQLIncludeDirective}});Object.defineProperty(he,"GraphQLInputObjectType",{enumerable:!0,get:function(){return at.GraphQLInputObjectType}});Object.defineProperty(he,"GraphQLInt",{enumerable:!0,get:function(){return Fs.GraphQLInt}});Object.defineProperty(he,"GraphQLInterfaceType",{enumerable:!0,get:function(){return at.GraphQLInterfaceType}});Object.defineProperty(he,"GraphQLList",{enumerable:!0,get:function(){return at.GraphQLList}});Object.defineProperty(he,"GraphQLNonNull",{enumerable:!0,get:function(){return at.GraphQLNonNull}});Object.defineProperty(he,"GraphQLObjectType",{enumerable:!0,get:function(){return at.GraphQLObjectType}});Object.defineProperty(he,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return Ea.GraphQLOneOfDirective}});Object.defineProperty(he,"GraphQLScalarType",{enumerable:!0,get:function(){return at.GraphQLScalarType}});Object.defineProperty(he,"GraphQLSchema",{enumerable:!0,get:function(){return uv.GraphQLSchema}});Object.defineProperty(he,"GraphQLSkipDirective",{enumerable:!0,get:function(){return Ea.GraphQLSkipDirective}});Object.defineProperty(he,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return Ea.GraphQLSpecifiedByDirective}});Object.defineProperty(he,"GraphQLString",{enumerable:!0,get:function(){return Fs.GraphQLString}});Object.defineProperty(he,"GraphQLUnionType",{enumerable:!0,get:function(){return at.GraphQLUnionType}});Object.defineProperty(he,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ei.SchemaMetaFieldDef}});Object.defineProperty(he,"TypeKind",{enumerable:!0,get:function(){return ei.TypeKind}});Object.defineProperty(he,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ei.TypeMetaFieldDef}});Object.defineProperty(he,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ei.TypeNameMetaFieldDef}});Object.defineProperty(he,"__Directive",{enumerable:!0,get:function(){return ei.__Directive}});Object.defineProperty(he,"__DirectiveLocation",{enumerable:!0,get:function(){return ei.__DirectiveLocation}});Object.defineProperty(he,"__EnumValue",{enumerable:!0,get:function(){return ei.__EnumValue}});Object.defineProperty(he,"__Field",{enumerable:!0,get:function(){return ei.__Field}});Object.defineProperty(he,"__InputValue",{enumerable:!0,get:function(){return ei.__InputValue}});Object.defineProperty(he,"__Schema",{enumerable:!0,get:function(){return ei.__Schema}});Object.defineProperty(he,"__Type",{enumerable:!0,get:function(){return ei.__Type}});Object.defineProperty(he,"__TypeKind",{enumerable:!0,get:function(){return ei.__TypeKind}});Object.defineProperty(he,"assertAbstractType",{enumerable:!0,get:function(){return at.assertAbstractType}});Object.defineProperty(he,"assertCompositeType",{enumerable:!0,get:function(){return at.assertCompositeType}});Object.defineProperty(he,"assertDirective",{enumerable:!0,get:function(){return Ea.assertDirective}});Object.defineProperty(he,"assertEnumType",{enumerable:!0,get:function(){return at.assertEnumType}});Object.defineProperty(he,"assertEnumValueName",{enumerable:!0,get:function(){return cC.assertEnumValueName}});Object.defineProperty(he,"assertInputObjectType",{enumerable:!0,get:function(){return at.assertInputObjectType}});Object.defineProperty(he,"assertInputType",{enumerable:!0,get:function(){return at.assertInputType}});Object.defineProperty(he,"assertInterfaceType",{enumerable:!0,get:function(){return at.assertInterfaceType}});Object.defineProperty(he,"assertLeafType",{enumerable:!0,get:function(){return at.assertLeafType}});Object.defineProperty(he,"assertListType",{enumerable:!0,get:function(){return at.assertListType}});Object.defineProperty(he,"assertName",{enumerable:!0,get:function(){return cC.assertName}});Object.defineProperty(he,"assertNamedType",{enumerable:!0,get:function(){return at.assertNamedType}});Object.defineProperty(he,"assertNonNullType",{enumerable:!0,get:function(){return at.assertNonNullType}});Object.defineProperty(he,"assertNullableType",{enumerable:!0,get:function(){return at.assertNullableType}});Object.defineProperty(he,"assertObjectType",{enumerable:!0,get:function(){return at.assertObjectType}});Object.defineProperty(he,"assertOutputType",{enumerable:!0,get:function(){return at.assertOutputType}});Object.defineProperty(he,"assertScalarType",{enumerable:!0,get:function(){return at.assertScalarType}});Object.defineProperty(he,"assertSchema",{enumerable:!0,get:function(){return uv.assertSchema}});Object.defineProperty(he,"assertType",{enumerable:!0,get:function(){return at.assertType}});Object.defineProperty(he,"assertUnionType",{enumerable:!0,get:function(){return at.assertUnionType}});Object.defineProperty(he,"assertValidSchema",{enumerable:!0,get:function(){return uC.assertValidSchema}});Object.defineProperty(he,"assertWrappingType",{enumerable:!0,get:function(){return at.assertWrappingType}});Object.defineProperty(he,"getNamedType",{enumerable:!0,get:function(){return at.getNamedType}});Object.defineProperty(he,"getNullableType",{enumerable:!0,get:function(){return at.getNullableType}});Object.defineProperty(he,"introspectionTypes",{enumerable:!0,get:function(){return ei.introspectionTypes}});Object.defineProperty(he,"isAbstractType",{enumerable:!0,get:function(){return at.isAbstractType}});Object.defineProperty(he,"isCompositeType",{enumerable:!0,get:function(){return at.isCompositeType}});Object.defineProperty(he,"isDirective",{enumerable:!0,get:function(){return Ea.isDirective}});Object.defineProperty(he,"isEnumType",{enumerable:!0,get:function(){return at.isEnumType}});Object.defineProperty(he,"isInputObjectType",{enumerable:!0,get:function(){return at.isInputObjectType}});Object.defineProperty(he,"isInputType",{enumerable:!0,get:function(){return at.isInputType}});Object.defineProperty(he,"isInterfaceType",{enumerable:!0,get:function(){return at.isInterfaceType}});Object.defineProperty(he,"isIntrospectionType",{enumerable:!0,get:function(){return ei.isIntrospectionType}});Object.defineProperty(he,"isLeafType",{enumerable:!0,get:function(){return at.isLeafType}});Object.defineProperty(he,"isListType",{enumerable:!0,get:function(){return at.isListType}});Object.defineProperty(he,"isNamedType",{enumerable:!0,get:function(){return at.isNamedType}});Object.defineProperty(he,"isNonNullType",{enumerable:!0,get:function(){return at.isNonNullType}});Object.defineProperty(he,"isNullableType",{enumerable:!0,get:function(){return at.isNullableType}});Object.defineProperty(he,"isObjectType",{enumerable:!0,get:function(){return at.isObjectType}});Object.defineProperty(he,"isOutputType",{enumerable:!0,get:function(){return at.isOutputType}});Object.defineProperty(he,"isRequiredArgument",{enumerable:!0,get:function(){return at.isRequiredArgument}});Object.defineProperty(he,"isRequiredInputField",{enumerable:!0,get:function(){return at.isRequiredInputField}});Object.defineProperty(he,"isScalarType",{enumerable:!0,get:function(){return at.isScalarType}});Object.defineProperty(he,"isSchema",{enumerable:!0,get:function(){return uv.isSchema}});Object.defineProperty(he,"isSpecifiedDirective",{enumerable:!0,get:function(){return Ea.isSpecifiedDirective}});Object.defineProperty(he,"isSpecifiedScalarType",{enumerable:!0,get:function(){return Fs.isSpecifiedScalarType}});Object.defineProperty(he,"isType",{enumerable:!0,get:function(){return at.isType}});Object.defineProperty(he,"isUnionType",{enumerable:!0,get:function(){return at.isUnionType}});Object.defineProperty(he,"isWrappingType",{enumerable:!0,get:function(){return at.isWrappingType}});Object.defineProperty(he,"resolveObjMapThunk",{enumerable:!0,get:function(){return at.resolveObjMapThunk}});Object.defineProperty(he,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return at.resolveReadonlyArrayThunk}});Object.defineProperty(he,"specifiedDirectives",{enumerable:!0,get:function(){return Ea.specifiedDirectives}});Object.defineProperty(he,"specifiedScalarTypes",{enumerable:!0,get:function(){return Fs.specifiedScalarTypes}});Object.defineProperty(he,"validateSchema",{enumerable:!0,get:function(){return uC.validateSchema}});var uv=Nc(),at=Lt(),Ea=Xr(),Fs=Ga(),ei=ki(),uC=_f(),cC=of()});var fC=w(Ut=>{"use strict";m();T();N();Object.defineProperty(Ut,"__esModule",{value:!0});Object.defineProperty(Ut,"BREAK",{enumerable:!0,get:function(){return Bf.BREAK}});Object.defineProperty(Ut,"DirectiveLocation",{enumerable:!0,get:function(){return xX.DirectiveLocation}});Object.defineProperty(Ut,"Kind",{enumerable:!0,get:function(){return BX.Kind}});Object.defineProperty(Ut,"Lexer",{enumerable:!0,get:function(){return kX.Lexer}});Object.defineProperty(Ut,"Location",{enumerable:!0,get:function(){return cv.Location}});Object.defineProperty(Ut,"OperationTypeNode",{enumerable:!0,get:function(){return cv.OperationTypeNode}});Object.defineProperty(Ut,"Source",{enumerable:!0,get:function(){return LX.Source}});Object.defineProperty(Ut,"Token",{enumerable:!0,get:function(){return cv.Token}});Object.defineProperty(Ut,"TokenKind",{enumerable:!0,get:function(){return UX.TokenKind}});Object.defineProperty(Ut,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Bf.getEnterLeaveForKind}});Object.defineProperty(Ut,"getLocation",{enumerable:!0,get:function(){return CX.getLocation}});Object.defineProperty(Ut,"getVisitFn",{enumerable:!0,get:function(){return Bf.getVisitFn}});Object.defineProperty(Ut,"isConstValueNode",{enumerable:!0,get:function(){return Ha.isConstValueNode}});Object.defineProperty(Ut,"isDefinitionNode",{enumerable:!0,get:function(){return Ha.isDefinitionNode}});Object.defineProperty(Ut,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Ha.isExecutableDefinitionNode}});Object.defineProperty(Ut,"isSelectionNode",{enumerable:!0,get:function(){return Ha.isSelectionNode}});Object.defineProperty(Ut,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Ha.isTypeDefinitionNode}});Object.defineProperty(Ut,"isTypeExtensionNode",{enumerable:!0,get:function(){return Ha.isTypeExtensionNode}});Object.defineProperty(Ut,"isTypeNode",{enumerable:!0,get:function(){return Ha.isTypeNode}});Object.defineProperty(Ut,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Ha.isTypeSystemDefinitionNode}});Object.defineProperty(Ut,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Ha.isTypeSystemExtensionNode}});Object.defineProperty(Ut,"isValueNode",{enumerable:!0,get:function(){return Ha.isValueNode}});Object.defineProperty(Ut,"parse",{enumerable:!0,get:function(){return tT.parse}});Object.defineProperty(Ut,"parseConstValue",{enumerable:!0,get:function(){return tT.parseConstValue}});Object.defineProperty(Ut,"parseType",{enumerable:!0,get:function(){return tT.parseType}});Object.defineProperty(Ut,"parseValue",{enumerable:!0,get:function(){return tT.parseValue}});Object.defineProperty(Ut,"print",{enumerable:!0,get:function(){return MX.print}});Object.defineProperty(Ut,"printLocation",{enumerable:!0,get:function(){return dC.printLocation}});Object.defineProperty(Ut,"printSourceLocation",{enumerable:!0,get:function(){return dC.printSourceLocation}});Object.defineProperty(Ut,"visit",{enumerable:!0,get:function(){return Bf.visit}});Object.defineProperty(Ut,"visitInParallel",{enumerable:!0,get:function(){return Bf.visitInParallel}});var LX=sN(),CX=Wm(),dC=aI(),BX=wt(),UX=Xd(),kX=nN(),tT=vl(),MX=Ti(),Bf=cc(),cv=ja(),Ha=Ec(),xX=gl()});var pC=w(lv=>{"use strict";m();T();N();Object.defineProperty(lv,"__esModule",{value:!0});lv.isAsyncIterable=qX;function qX(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}});var mC=w(dv=>{"use strict";m();T();N();Object.defineProperty(dv,"__esModule",{value:!0});dv.mapAsyncIterator=VX;function VX(e,t){let n=e[Symbol.asyncIterator]();function r(a){return wi(this,null,function*(){if(a.done)return a;try{return{value:yield t(a.value),done:!1}}catch(o){if(typeof n.return=="function")try{yield n.return()}catch(u){}throw o}})}return{next(){return wi(this,null,function*(){return r(yield n.next())})},return(){return wi(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(a){return wi(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(a));throw a})},[Symbol.asyncIterator](){return this}}}});var hC=w(nT=>{"use strict";m();T();N();Object.defineProperty(nT,"__esModule",{value:!0});nT.createSourceEventStream=EC;nT.subscribe=JX;var jX=Vr(),KX=Wt(),TC=pC(),NC=Sf(),fv=ze(),$X=HN(),GX=GN(),Uf=Cf(),QX=mC(),YX=Ll();function JX(t){return wi(this,arguments,function*(e){arguments.length<2||(0,jX.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield EC(e);if(!(0,TC.isAsyncIterable)(n))return n;let r=i=>(0,Uf.execute)($(k({},e),{rootValue:i}));return(0,QX.mapAsyncIterator)(n,r)})}function HX(e){let t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}function EC(...e){return wi(this,null,function*(){let t=HX(e),{schema:n,document:r,variableValues:i}=t;(0,Uf.assertValidExecutionArguments)(n,r,i);let a=(0,Uf.buildExecutionContext)(t);if(!("schema"in a))return{errors:a};try{let o=yield zX(a);if(!(0,TC.isAsyncIterable)(o))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,KX.inspect)(o)}.`);return o}catch(o){if(o instanceof fv.GraphQLError)return{errors:[o]};throw o}})}function zX(e){return wi(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:a}=e,o=t.getSubscriptionType();if(o==null)throw new fv.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:r});let u=(0,GX.collectFields)(t,n,i,o,r.selectionSet),[l,d]=[...u.entries()][0],p=(0,Uf.getFieldDef)(t,o,d[0]);if(!p){let A=d[0].name.value;throw new fv.GraphQLError(`The subscription field "${A}" is not defined.`,{nodes:d})}let E=(0,NC.addPath)(void 0,l,o.name),I=(0,Uf.buildResolveInfo)(e,p,d,o,E);try{var v;let A=(0,YX.getArgumentValues)(p,d[0],i),U=e.contextValue,Q=yield((v=p.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(a,A,U,I);if(Q instanceof Error)throw Q;return Q}catch(A){throw(0,$X.locatedError)(A,d,(0,NC.pathToArray)(E))}})}});var IC=w(Vi=>{"use strict";m();T();N();Object.defineProperty(Vi,"__esModule",{value:!0});Object.defineProperty(Vi,"createSourceEventStream",{enumerable:!0,get:function(){return yC.createSourceEventStream}});Object.defineProperty(Vi,"defaultFieldResolver",{enumerable:!0,get:function(){return rT.defaultFieldResolver}});Object.defineProperty(Vi,"defaultTypeResolver",{enumerable:!0,get:function(){return rT.defaultTypeResolver}});Object.defineProperty(Vi,"execute",{enumerable:!0,get:function(){return rT.execute}});Object.defineProperty(Vi,"executeSync",{enumerable:!0,get:function(){return rT.executeSync}});Object.defineProperty(Vi,"getArgumentValues",{enumerable:!0,get:function(){return pv.getArgumentValues}});Object.defineProperty(Vi,"getDirectiveValues",{enumerable:!0,get:function(){return pv.getDirectiveValues}});Object.defineProperty(Vi,"getVariableValues",{enumerable:!0,get:function(){return pv.getVariableValues}});Object.defineProperty(Vi,"responsePathAsArray",{enumerable:!0,get:function(){return WX.pathToArray}});Object.defineProperty(Vi,"subscribe",{enumerable:!0,get:function(){return yC.subscribe}});var WX=Sf(),rT=Cf(),yC=hC(),pv=Ll()});var gC=w(Tv=>{"use strict";m();T();N();Object.defineProperty(Tv,"__esModule",{value:!0});Tv.NoDeprecatedCustomRule=XX;var mv=Ar(),kf=ze(),Nv=Lt();function XX(e){return{Field(t){let n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=e.getParentType();i!=null||(0,mv.invariant)(!1),e.reportError(new kf.GraphQLError(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){let n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=e.getDirective();if(i!=null)e.reportError(new kf.GraphQLError(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{let a=e.getParentType(),o=e.getFieldDef();a!=null&&o!=null||(0,mv.invariant)(!1),e.reportError(new kf.GraphQLError(`Field "${a.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=(0,Nv.getNamedType)(e.getParentInputType());if((0,Nv.isInputObjectType)(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new kf.GraphQLError(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){let n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=(0,Nv.getNamedType)(e.getInputType());i!=null||(0,mv.invariant)(!1),e.reportError(new kf.GraphQLError(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}});var _C=w(Ev=>{"use strict";m();T();N();Object.defineProperty(Ev,"__esModule",{value:!0});Ev.NoSchemaIntrospectionCustomRule=n5;var ZX=ze(),e5=Lt(),t5=ki();function n5(e){return{Field(t){let n=(0,e5.getNamedType)(e.getType());n&&(0,t5.isIntrospectionType)(n)&&e.reportError(new ZX.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var OC=w(pt=>{"use strict";m();T();N();Object.defineProperty(pt,"__esModule",{value:!0});Object.defineProperty(pt,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return a5.ExecutableDefinitionsRule}});Object.defineProperty(pt,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return s5.FieldsOnCorrectTypeRule}});Object.defineProperty(pt,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return o5.FragmentsOnCompositeTypesRule}});Object.defineProperty(pt,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return u5.KnownArgumentNamesRule}});Object.defineProperty(pt,"KnownDirectivesRule",{enumerable:!0,get:function(){return c5.KnownDirectivesRule}});Object.defineProperty(pt,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return l5.KnownFragmentNamesRule}});Object.defineProperty(pt,"KnownTypeNamesRule",{enumerable:!0,get:function(){return d5.KnownTypeNamesRule}});Object.defineProperty(pt,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return f5.LoneAnonymousOperationRule}});Object.defineProperty(pt,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return w5.LoneSchemaDefinitionRule}});Object.defineProperty(pt,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return F5.MaxIntrospectionDepthRule}});Object.defineProperty(pt,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return q5.NoDeprecatedCustomRule}});Object.defineProperty(pt,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return p5.NoFragmentCyclesRule}});Object.defineProperty(pt,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return V5.NoSchemaIntrospectionCustomRule}});Object.defineProperty(pt,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return m5.NoUndefinedVariablesRule}});Object.defineProperty(pt,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return N5.NoUnusedFragmentsRule}});Object.defineProperty(pt,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return T5.NoUnusedVariablesRule}});Object.defineProperty(pt,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return E5.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(pt,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return h5.PossibleFragmentSpreadsRule}});Object.defineProperty(pt,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return x5.PossibleTypeExtensionsRule}});Object.defineProperty(pt,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return y5.ProvidedRequiredArgumentsRule}});Object.defineProperty(pt,"ScalarLeafsRule",{enumerable:!0,get:function(){return I5.ScalarLeafsRule}});Object.defineProperty(pt,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return g5.SingleFieldSubscriptionsRule}});Object.defineProperty(pt,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return k5.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(pt,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return _5.UniqueArgumentNamesRule}});Object.defineProperty(pt,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return M5.UniqueDirectiveNamesRule}});Object.defineProperty(pt,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return v5.UniqueDirectivesPerLocationRule}});Object.defineProperty(pt,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return B5.UniqueEnumValueNamesRule}});Object.defineProperty(pt,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return U5.UniqueFieldDefinitionNamesRule}});Object.defineProperty(pt,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return O5.UniqueFragmentNamesRule}});Object.defineProperty(pt,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return S5.UniqueInputFieldNamesRule}});Object.defineProperty(pt,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return D5.UniqueOperationNamesRule}});Object.defineProperty(pt,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return L5.UniqueOperationTypesRule}});Object.defineProperty(pt,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return C5.UniqueTypeNamesRule}});Object.defineProperty(pt,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return b5.UniqueVariableNamesRule}});Object.defineProperty(pt,"ValidationContext",{enumerable:!0,get:function(){return i5.ValidationContext}});Object.defineProperty(pt,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return A5.ValuesOfCorrectTypeRule}});Object.defineProperty(pt,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return R5.VariablesAreInputTypesRule}});Object.defineProperty(pt,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return P5.VariablesInAllowedPositionRule}});Object.defineProperty(pt,"recommendedRules",{enumerable:!0,get:function(){return vC.recommendedRules}});Object.defineProperty(pt,"specifiedRules",{enumerable:!0,get:function(){return vC.specifiedRules}});Object.defineProperty(pt,"validate",{enumerable:!0,get:function(){return r5.validate}});var r5=Bl(),i5=H_(),vC=Q_(),a5=cg(),s5=dg(),o5=pg(),u5=mg(),c5=hg(),l5=Ig(),d5=vg(),f5=Sg(),p5=Fg(),m5=Lg(),N5=Bg(),T5=kg(),E5=Yg(),h5=zg(),y5=e_(),I5=n_(),g5=d_(),_5=T_(),v5=g_(),O5=A_(),S5=P_(),D5=w_(),b5=M_(),A5=V_(),R5=K_(),P5=G_(),F5=Rg(),w5=bg(),L5=C_(),C5=U_(),B5=v_(),U5=D_(),k5=m_(),M5=h_(),x5=Xg(),q5=gC(),V5=_C()});var SC=w(_c=>{"use strict";m();T();N();Object.defineProperty(_c,"__esModule",{value:!0});Object.defineProperty(_c,"GraphQLError",{enumerable:!0,get:function(){return hv.GraphQLError}});Object.defineProperty(_c,"formatError",{enumerable:!0,get:function(){return hv.formatError}});Object.defineProperty(_c,"locatedError",{enumerable:!0,get:function(){return K5.locatedError}});Object.defineProperty(_c,"printError",{enumerable:!0,get:function(){return hv.printError}});Object.defineProperty(_c,"syntaxError",{enumerable:!0,get:function(){return j5.syntaxError}});var hv=ze(),j5=Zm(),K5=HN()});var Iv=w(yv=>{"use strict";m();T();N();Object.defineProperty(yv,"__esModule",{value:!0});yv.getIntrospectionQuery=$5;function $5(e){let t=k({descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1},e),n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",a=t.schemaDescription?n:"";function o(l){return t.inputValueDeprecation?l:""}let u=t.oneOf?"isOneOf":"";return` +`))}});var KL=F(W_=>{"use strict";m();T();N();Object.defineProperty(W_,"__esModule",{value:!0});W_.memoize3=cX;function cX(e){let t;return function(r,i,a){t===void 0&&(t=new WeakMap);let o=t.get(r);o===void 0&&(o=new WeakMap,t.set(r,o));let u=o.get(i);u===void 0&&(u=new WeakMap,o.set(i,u));let l=u.get(a);return l===void 0&&(l=e(r,i,a),u.set(a,l)),l}}});var $L=F(X_=>{"use strict";m();T();N();Object.defineProperty(X_,"__esModule",{value:!0});X_.promiseForObject=lX;function lX(e){return Promise.all(Object.values(e)).then(t=>{let n=Object.create(null);for(let[r,i]of Object.keys(e).entries())n[i]=t[r];return n})}});var GL=F(Z_=>{"use strict";m();T();N();Object.defineProperty(Z_,"__esModule",{value:!0});Z_.promiseReduce=fX;var dX=zm();function fX(e,t,n){let r=n;for(let i of e)r=(0,dX.isPromise)(r)?r.then(a=>t(a,i)):t(r,i);return r}});var QL=F(tv=>{"use strict";m();T();N();Object.defineProperty(tv,"__esModule",{value:!0});tv.toError=mX;var pX=Wt();function mX(e){return e instanceof Error?e:new ev(e)}var ev=class extends Error{constructor(t){super("Unexpected error value: "+(0,pX.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var HN=F(nv=>{"use strict";m();T();N();Object.defineProperty(nv,"__esModule",{value:!0});nv.locatedError=EX;var NX=QL(),TX=Xe();function EX(e,t,n){var r;let i=(0,NX.toError)(e);return hX(i)?i:new TX.GraphQLError(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function hX(e){return Array.isArray(e.path)}});var Cf=F(qi=>{"use strict";m();T();N();Object.defineProperty(qi,"__esModule",{value:!0});qi.assertValidExecutionArguments=eC;qi.buildExecutionContext=tC;qi.buildResolveInfo=rC;qi.defaultTypeResolver=qi.defaultFieldResolver=void 0;qi.execute=ZL;qi.executeSync=SX;qi.getFieldDef=aC;var iv=Vr(),Ic=Wt(),yX=Ar(),IX=PN(),ov=Va(),Ta=zm(),gX=KL(),gc=Sf(),YL=$L(),_X=GL(),xi=Xe(),WN=HN(),rv=ja(),JL=Lt(),_u=Ct(),Ul=ki(),vX=_f(),WL=GN(),XL=Ll(),OX=(0,gX.memoize3)((e,t,n)=>(0,WL.collectSubfields)(e.schema,e.fragments,e.variableValues,t,n));function ZL(e){arguments.length<2||(0,iv.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,document:n,variableValues:r,rootValue:i}=e;eC(t,n,r);let a=tC(e);if(!("schema"in a))return{errors:a};try{let{operation:o}=a,u=DX(a,o,i);return(0,Ta.isPromise)(u)?u.then(l=>zN(l,a.errors),l=>(a.errors.push(l),zN(null,a.errors))):zN(u,a.errors)}catch(o){return a.errors.push(o),zN(null,a.errors)}}function SX(e){let t=ZL(e);if((0,Ta.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function zN(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function eC(e,t,n){t||(0,iv.devAssert)(!1,"Must provide document."),(0,vX.assertValidSchema)(e),n==null||(0,ov.isObjectLike)(n)||(0,iv.devAssert)(!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 tC(e){var t,n;let{schema:r,document:i,rootValue:a,contextValue:o,variableValues:u,operationName:l,fieldResolver:d,typeResolver:p,subscribeFieldResolver:E}=e,I,v=Object.create(null);for(let j of i.definitions)switch(j.kind){case JL.Kind.OPERATION_DEFINITION:if(l==null){if(I!==void 0)return[new xi.GraphQLError("Must provide operation name if query contains multiple operations.")];I=j}else((t=j.name)===null||t===void 0?void 0:t.value)===l&&(I=j);break;case JL.Kind.FRAGMENT_DEFINITION:v[j.name.value]=j;break;default:}if(!I)return l!=null?[new xi.GraphQLError(`Unknown operation named "${l}".`)]:[new xi.GraphQLError("Must provide an operation.")];let A=(n=I.variableDefinitions)!==null&&n!==void 0?n:[],U=(0,XL.getVariableValues)(r,A,u!=null?u:{},{maxErrors:50});return U.errors?U.errors:{schema:r,fragments:v,rootValue:a,contextValue:o,operation:I,variableValues:U.coerced,fieldResolver:d!=null?d:sv,typeResolver:p!=null?p:iC,subscribeFieldResolver:E!=null?E:sv,errors:[]}}function DX(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new xi.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=(0,WL.collectFields)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),a=void 0;switch(t.operation){case rv.OperationTypeNode.QUERY:return XN(e,r,n,a,i);case rv.OperationTypeNode.MUTATION:return bX(e,r,n,a,i);case rv.OperationTypeNode.SUBSCRIPTION:return XN(e,r,n,a,i)}}function bX(e,t,n,r,i){return(0,_X.promiseReduce)(i.entries(),(a,[o,u])=>{let l=(0,gc.addPath)(r,o,t.name),d=nC(e,t,n,u,l);return d===void 0?a:(0,Ta.isPromise)(d)?d.then(p=>(a[o]=p,a)):(a[o]=d,a)},Object.create(null))}function XN(e,t,n,r,i){let a=Object.create(null),o=!1;try{for(let[u,l]of i.entries()){let d=(0,gc.addPath)(r,u,t.name),p=nC(e,t,n,l,d);p!==void 0&&(a[u]=p,(0,Ta.isPromise)(p)&&(o=!0))}}catch(u){if(o)return(0,YL.promiseForObject)(a).finally(()=>{throw u});throw u}return o?(0,YL.promiseForObject)(a):a}function nC(e,t,n,r,i){var a;let o=aC(e.schema,t,r[0]);if(!o)return;let u=o.type,l=(a=o.resolve)!==null&&a!==void 0?a:e.fieldResolver,d=rC(e,o,r,t,i);try{let p=(0,XL.getArgumentValues)(o,r[0],e.variableValues),E=e.contextValue,I=l(n,p,E,d),v;return(0,Ta.isPromise)(I)?v=I.then(A=>Lf(e,u,r,d,i,A)):v=Lf(e,u,r,d,i,I),(0,Ta.isPromise)(v)?v.then(void 0,A=>{let U=(0,WN.locatedError)(A,r,(0,gc.pathToArray)(i));return ZN(U,u,e)}):v}catch(p){let E=(0,WN.locatedError)(p,r,(0,gc.pathToArray)(i));return ZN(E,u,e)}}function rC(e,t,n,r,i){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function ZN(e,t,n){if((0,_u.isNonNullType)(t))throw e;return n.errors.push(e),null}function Lf(e,t,n,r,i,a){if(a instanceof Error)throw a;if((0,_u.isNonNullType)(t)){let o=Lf(e,t.ofType,n,r,i,a);if(o===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return o}if(a==null)return null;if((0,_u.isListType)(t))return AX(e,t,n,r,i,a);if((0,_u.isLeafType)(t))return RX(t,a);if((0,_u.isAbstractType)(t))return PX(e,t,n,r,i,a);if((0,_u.isObjectType)(t))return av(e,t,n,r,i,a);(0,yX.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,Ic.inspect)(t))}function AX(e,t,n,r,i,a){if(!(0,IX.isIterableObject)(a))throw new xi.GraphQLError(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);let o=t.ofType,u=!1,l=Array.from(a,(d,p)=>{let E=(0,gc.addPath)(i,p,void 0);try{let I;return(0,Ta.isPromise)(d)?I=d.then(v=>Lf(e,o,n,r,E,v)):I=Lf(e,o,n,r,E,d),(0,Ta.isPromise)(I)?(u=!0,I.then(void 0,v=>{let A=(0,WN.locatedError)(v,n,(0,gc.pathToArray)(E));return ZN(A,o,e)})):I}catch(I){let v=(0,WN.locatedError)(I,n,(0,gc.pathToArray)(E));return ZN(v,o,e)}});return u?Promise.all(l):l}function RX(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${(0,Ic.inspect)(e)}.serialize(${(0,Ic.inspect)(t)})\` to return non-nullable value, returned: ${(0,Ic.inspect)(n)}`);return n}function PX(e,t,n,r,i,a){var o;let u=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,l=e.contextValue,d=u(a,l,r,t);return(0,Ta.isPromise)(d)?d.then(p=>av(e,HL(p,e,t,n,r,a),n,r,i,a)):av(e,HL(d,e,t,n,r,a),n,r,i,a)}function HL(e,t,n,r,i,a){if(e==null)throw new xi.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if((0,_u.isObjectType)(e))throw new xi.GraphQLError("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new xi.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,Ic.inspect)(a)}, received "${(0,Ic.inspect)(e)}".`);let o=t.schema.getType(e);if(o==null)throw new xi.GraphQLError(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!(0,_u.isObjectType)(o))throw new xi.GraphQLError(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new xi.GraphQLError(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function av(e,t,n,r,i,a){let o=OX(e,t,n);if(t.isTypeOf){let u=t.isTypeOf(a,e.contextValue,r);if((0,Ta.isPromise)(u))return u.then(l=>{if(!l)throw zL(t,a,n);return XN(e,t,a,i,o)});if(!u)throw zL(t,a,n)}return XN(e,t,a,i,o)}function zL(e,t,n){return new xi.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,Ic.inspect)(t)}.`,{nodes:n})}var iC=function(e,t,n,r){if((0,ov.isObjectLike)(e)&&typeof e.__typename=="string")return e.__typename;let i=n.schema.getPossibleTypes(r),a=[];for(let o=0;o{for(let u=0;u{"use strict";m();T();N();Object.defineProperty(eT,"__esModule",{value:!0});eT.graphql=kX;eT.graphqlSync=MX;var FX=Vr(),wX=zm(),LX=vl(),CX=_f(),BX=Bl(),UX=Cf();function kX(e){return new Promise(t=>t(sC(e)))}function MX(e){let t=sC(e);if((0,wX.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function sC(e){arguments.length<2||(0,FX.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,source:n,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:u,typeResolver:l}=e,d=(0,CX.validateSchema)(t);if(d.length>0)return{errors:d};let p;try{p=(0,LX.parse)(n)}catch(I){return{errors:[I]}}let E=(0,BX.validate)(t,p);return E.length>0?{errors:E}:(0,UX.execute)({schema:t,document:p,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:u,typeResolver:l})}});var lC=F(he=>{"use strict";m();T();N();Object.defineProperty(he,"__esModule",{value:!0});Object.defineProperty(he,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return Ea.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(he,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return Fs.GRAPHQL_MAX_INT}});Object.defineProperty(he,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return Fs.GRAPHQL_MIN_INT}});Object.defineProperty(he,"GraphQLBoolean",{enumerable:!0,get:function(){return Fs.GraphQLBoolean}});Object.defineProperty(he,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return Ea.GraphQLDeprecatedDirective}});Object.defineProperty(he,"GraphQLDirective",{enumerable:!0,get:function(){return Ea.GraphQLDirective}});Object.defineProperty(he,"GraphQLEnumType",{enumerable:!0,get:function(){return at.GraphQLEnumType}});Object.defineProperty(he,"GraphQLFloat",{enumerable:!0,get:function(){return Fs.GraphQLFloat}});Object.defineProperty(he,"GraphQLID",{enumerable:!0,get:function(){return Fs.GraphQLID}});Object.defineProperty(he,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return Ea.GraphQLIncludeDirective}});Object.defineProperty(he,"GraphQLInputObjectType",{enumerable:!0,get:function(){return at.GraphQLInputObjectType}});Object.defineProperty(he,"GraphQLInt",{enumerable:!0,get:function(){return Fs.GraphQLInt}});Object.defineProperty(he,"GraphQLInterfaceType",{enumerable:!0,get:function(){return at.GraphQLInterfaceType}});Object.defineProperty(he,"GraphQLList",{enumerable:!0,get:function(){return at.GraphQLList}});Object.defineProperty(he,"GraphQLNonNull",{enumerable:!0,get:function(){return at.GraphQLNonNull}});Object.defineProperty(he,"GraphQLObjectType",{enumerable:!0,get:function(){return at.GraphQLObjectType}});Object.defineProperty(he,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return Ea.GraphQLOneOfDirective}});Object.defineProperty(he,"GraphQLScalarType",{enumerable:!0,get:function(){return at.GraphQLScalarType}});Object.defineProperty(he,"GraphQLSchema",{enumerable:!0,get:function(){return uv.GraphQLSchema}});Object.defineProperty(he,"GraphQLSkipDirective",{enumerable:!0,get:function(){return Ea.GraphQLSkipDirective}});Object.defineProperty(he,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return Ea.GraphQLSpecifiedByDirective}});Object.defineProperty(he,"GraphQLString",{enumerable:!0,get:function(){return Fs.GraphQLString}});Object.defineProperty(he,"GraphQLUnionType",{enumerable:!0,get:function(){return at.GraphQLUnionType}});Object.defineProperty(he,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ei.SchemaMetaFieldDef}});Object.defineProperty(he,"TypeKind",{enumerable:!0,get:function(){return ei.TypeKind}});Object.defineProperty(he,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ei.TypeMetaFieldDef}});Object.defineProperty(he,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ei.TypeNameMetaFieldDef}});Object.defineProperty(he,"__Directive",{enumerable:!0,get:function(){return ei.__Directive}});Object.defineProperty(he,"__DirectiveLocation",{enumerable:!0,get:function(){return ei.__DirectiveLocation}});Object.defineProperty(he,"__EnumValue",{enumerable:!0,get:function(){return ei.__EnumValue}});Object.defineProperty(he,"__Field",{enumerable:!0,get:function(){return ei.__Field}});Object.defineProperty(he,"__InputValue",{enumerable:!0,get:function(){return ei.__InputValue}});Object.defineProperty(he,"__Schema",{enumerable:!0,get:function(){return ei.__Schema}});Object.defineProperty(he,"__Type",{enumerable:!0,get:function(){return ei.__Type}});Object.defineProperty(he,"__TypeKind",{enumerable:!0,get:function(){return ei.__TypeKind}});Object.defineProperty(he,"assertAbstractType",{enumerable:!0,get:function(){return at.assertAbstractType}});Object.defineProperty(he,"assertCompositeType",{enumerable:!0,get:function(){return at.assertCompositeType}});Object.defineProperty(he,"assertDirective",{enumerable:!0,get:function(){return Ea.assertDirective}});Object.defineProperty(he,"assertEnumType",{enumerable:!0,get:function(){return at.assertEnumType}});Object.defineProperty(he,"assertEnumValueName",{enumerable:!0,get:function(){return cC.assertEnumValueName}});Object.defineProperty(he,"assertInputObjectType",{enumerable:!0,get:function(){return at.assertInputObjectType}});Object.defineProperty(he,"assertInputType",{enumerable:!0,get:function(){return at.assertInputType}});Object.defineProperty(he,"assertInterfaceType",{enumerable:!0,get:function(){return at.assertInterfaceType}});Object.defineProperty(he,"assertLeafType",{enumerable:!0,get:function(){return at.assertLeafType}});Object.defineProperty(he,"assertListType",{enumerable:!0,get:function(){return at.assertListType}});Object.defineProperty(he,"assertName",{enumerable:!0,get:function(){return cC.assertName}});Object.defineProperty(he,"assertNamedType",{enumerable:!0,get:function(){return at.assertNamedType}});Object.defineProperty(he,"assertNonNullType",{enumerable:!0,get:function(){return at.assertNonNullType}});Object.defineProperty(he,"assertNullableType",{enumerable:!0,get:function(){return at.assertNullableType}});Object.defineProperty(he,"assertObjectType",{enumerable:!0,get:function(){return at.assertObjectType}});Object.defineProperty(he,"assertOutputType",{enumerable:!0,get:function(){return at.assertOutputType}});Object.defineProperty(he,"assertScalarType",{enumerable:!0,get:function(){return at.assertScalarType}});Object.defineProperty(he,"assertSchema",{enumerable:!0,get:function(){return uv.assertSchema}});Object.defineProperty(he,"assertType",{enumerable:!0,get:function(){return at.assertType}});Object.defineProperty(he,"assertUnionType",{enumerable:!0,get:function(){return at.assertUnionType}});Object.defineProperty(he,"assertValidSchema",{enumerable:!0,get:function(){return uC.assertValidSchema}});Object.defineProperty(he,"assertWrappingType",{enumerable:!0,get:function(){return at.assertWrappingType}});Object.defineProperty(he,"getNamedType",{enumerable:!0,get:function(){return at.getNamedType}});Object.defineProperty(he,"getNullableType",{enumerable:!0,get:function(){return at.getNullableType}});Object.defineProperty(he,"introspectionTypes",{enumerable:!0,get:function(){return ei.introspectionTypes}});Object.defineProperty(he,"isAbstractType",{enumerable:!0,get:function(){return at.isAbstractType}});Object.defineProperty(he,"isCompositeType",{enumerable:!0,get:function(){return at.isCompositeType}});Object.defineProperty(he,"isDirective",{enumerable:!0,get:function(){return Ea.isDirective}});Object.defineProperty(he,"isEnumType",{enumerable:!0,get:function(){return at.isEnumType}});Object.defineProperty(he,"isInputObjectType",{enumerable:!0,get:function(){return at.isInputObjectType}});Object.defineProperty(he,"isInputType",{enumerable:!0,get:function(){return at.isInputType}});Object.defineProperty(he,"isInterfaceType",{enumerable:!0,get:function(){return at.isInterfaceType}});Object.defineProperty(he,"isIntrospectionType",{enumerable:!0,get:function(){return ei.isIntrospectionType}});Object.defineProperty(he,"isLeafType",{enumerable:!0,get:function(){return at.isLeafType}});Object.defineProperty(he,"isListType",{enumerable:!0,get:function(){return at.isListType}});Object.defineProperty(he,"isNamedType",{enumerable:!0,get:function(){return at.isNamedType}});Object.defineProperty(he,"isNonNullType",{enumerable:!0,get:function(){return at.isNonNullType}});Object.defineProperty(he,"isNullableType",{enumerable:!0,get:function(){return at.isNullableType}});Object.defineProperty(he,"isObjectType",{enumerable:!0,get:function(){return at.isObjectType}});Object.defineProperty(he,"isOutputType",{enumerable:!0,get:function(){return at.isOutputType}});Object.defineProperty(he,"isRequiredArgument",{enumerable:!0,get:function(){return at.isRequiredArgument}});Object.defineProperty(he,"isRequiredInputField",{enumerable:!0,get:function(){return at.isRequiredInputField}});Object.defineProperty(he,"isScalarType",{enumerable:!0,get:function(){return at.isScalarType}});Object.defineProperty(he,"isSchema",{enumerable:!0,get:function(){return uv.isSchema}});Object.defineProperty(he,"isSpecifiedDirective",{enumerable:!0,get:function(){return Ea.isSpecifiedDirective}});Object.defineProperty(he,"isSpecifiedScalarType",{enumerable:!0,get:function(){return Fs.isSpecifiedScalarType}});Object.defineProperty(he,"isType",{enumerable:!0,get:function(){return at.isType}});Object.defineProperty(he,"isUnionType",{enumerable:!0,get:function(){return at.isUnionType}});Object.defineProperty(he,"isWrappingType",{enumerable:!0,get:function(){return at.isWrappingType}});Object.defineProperty(he,"resolveObjMapThunk",{enumerable:!0,get:function(){return at.resolveObjMapThunk}});Object.defineProperty(he,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return at.resolveReadonlyArrayThunk}});Object.defineProperty(he,"specifiedDirectives",{enumerable:!0,get:function(){return Ea.specifiedDirectives}});Object.defineProperty(he,"specifiedScalarTypes",{enumerable:!0,get:function(){return Fs.specifiedScalarTypes}});Object.defineProperty(he,"validateSchema",{enumerable:!0,get:function(){return uC.validateSchema}});var uv=Nc(),at=Ct(),Ea=Xr(),Fs=Ga(),ei=ki(),uC=_f(),cC=of()});var fC=F(kt=>{"use strict";m();T();N();Object.defineProperty(kt,"__esModule",{value:!0});Object.defineProperty(kt,"BREAK",{enumerable:!0,get:function(){return Bf.BREAK}});Object.defineProperty(kt,"DirectiveLocation",{enumerable:!0,get:function(){return GX.DirectiveLocation}});Object.defineProperty(kt,"Kind",{enumerable:!0,get:function(){return VX.Kind}});Object.defineProperty(kt,"Lexer",{enumerable:!0,get:function(){return KX.Lexer}});Object.defineProperty(kt,"Location",{enumerable:!0,get:function(){return cv.Location}});Object.defineProperty(kt,"OperationTypeNode",{enumerable:!0,get:function(){return cv.OperationTypeNode}});Object.defineProperty(kt,"Source",{enumerable:!0,get:function(){return xX.Source}});Object.defineProperty(kt,"Token",{enumerable:!0,get:function(){return cv.Token}});Object.defineProperty(kt,"TokenKind",{enumerable:!0,get:function(){return jX.TokenKind}});Object.defineProperty(kt,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Bf.getEnterLeaveForKind}});Object.defineProperty(kt,"getLocation",{enumerable:!0,get:function(){return qX.getLocation}});Object.defineProperty(kt,"getVisitFn",{enumerable:!0,get:function(){return Bf.getVisitFn}});Object.defineProperty(kt,"isConstValueNode",{enumerable:!0,get:function(){return Ha.isConstValueNode}});Object.defineProperty(kt,"isDefinitionNode",{enumerable:!0,get:function(){return Ha.isDefinitionNode}});Object.defineProperty(kt,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Ha.isExecutableDefinitionNode}});Object.defineProperty(kt,"isSelectionNode",{enumerable:!0,get:function(){return Ha.isSelectionNode}});Object.defineProperty(kt,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Ha.isTypeDefinitionNode}});Object.defineProperty(kt,"isTypeExtensionNode",{enumerable:!0,get:function(){return Ha.isTypeExtensionNode}});Object.defineProperty(kt,"isTypeNode",{enumerable:!0,get:function(){return Ha.isTypeNode}});Object.defineProperty(kt,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Ha.isTypeSystemDefinitionNode}});Object.defineProperty(kt,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Ha.isTypeSystemExtensionNode}});Object.defineProperty(kt,"isValueNode",{enumerable:!0,get:function(){return Ha.isValueNode}});Object.defineProperty(kt,"parse",{enumerable:!0,get:function(){return tT.parse}});Object.defineProperty(kt,"parseConstValue",{enumerable:!0,get:function(){return tT.parseConstValue}});Object.defineProperty(kt,"parseType",{enumerable:!0,get:function(){return tT.parseType}});Object.defineProperty(kt,"parseValue",{enumerable:!0,get:function(){return tT.parseValue}});Object.defineProperty(kt,"print",{enumerable:!0,get:function(){return $X.print}});Object.defineProperty(kt,"printLocation",{enumerable:!0,get:function(){return dC.printLocation}});Object.defineProperty(kt,"printSourceLocation",{enumerable:!0,get:function(){return dC.printSourceLocation}});Object.defineProperty(kt,"visit",{enumerable:!0,get:function(){return Bf.visit}});Object.defineProperty(kt,"visitInParallel",{enumerable:!0,get:function(){return Bf.visitInParallel}});var xX=sN(),qX=Wm(),dC=aI(),VX=Lt(),jX=Xd(),KX=nN(),tT=vl(),$X=Ti(),Bf=cc(),cv=ja(),Ha=Ec(),GX=gl()});var pC=F(lv=>{"use strict";m();T();N();Object.defineProperty(lv,"__esModule",{value:!0});lv.isAsyncIterable=QX;function QX(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}});var mC=F(dv=>{"use strict";m();T();N();Object.defineProperty(dv,"__esModule",{value:!0});dv.mapAsyncIterator=YX;function YX(e,t){let n=e[Symbol.asyncIterator]();function r(a){return wi(this,null,function*(){if(a.done)return a;try{return{value:yield t(a.value),done:!1}}catch(o){if(typeof n.return=="function")try{yield n.return()}catch(u){}throw o}})}return{next(){return wi(this,null,function*(){return r(yield n.next())})},return(){return wi(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(a){return wi(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(a));throw a})},[Symbol.asyncIterator](){return this}}}});var hC=F(nT=>{"use strict";m();T();N();Object.defineProperty(nT,"__esModule",{value:!0});nT.createSourceEventStream=EC;nT.subscribe=e5;var JX=Vr(),HX=Wt(),TC=pC(),NC=Sf(),fv=Xe(),zX=HN(),WX=GN(),Uf=Cf(),XX=mC(),ZX=Ll();function e5(t){return wi(this,arguments,function*(e){arguments.length<2||(0,JX.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield EC(e);if(!(0,TC.isAsyncIterable)(n))return n;let r=i=>(0,Uf.execute)($(k({},e),{rootValue:i}));return(0,XX.mapAsyncIterator)(n,r)})}function t5(e){let t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}function EC(...e){return wi(this,null,function*(){let t=t5(e),{schema:n,document:r,variableValues:i}=t;(0,Uf.assertValidExecutionArguments)(n,r,i);let a=(0,Uf.buildExecutionContext)(t);if(!("schema"in a))return{errors:a};try{let o=yield n5(a);if(!(0,TC.isAsyncIterable)(o))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,HX.inspect)(o)}.`);return o}catch(o){if(o instanceof fv.GraphQLError)return{errors:[o]};throw o}})}function n5(e){return wi(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:a}=e,o=t.getSubscriptionType();if(o==null)throw new fv.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:r});let u=(0,WX.collectFields)(t,n,i,o,r.selectionSet),[l,d]=[...u.entries()][0],p=(0,Uf.getFieldDef)(t,o,d[0]);if(!p){let A=d[0].name.value;throw new fv.GraphQLError(`The subscription field "${A}" is not defined.`,{nodes:d})}let E=(0,NC.addPath)(void 0,l,o.name),I=(0,Uf.buildResolveInfo)(e,p,d,o,E);try{var v;let A=(0,ZX.getArgumentValues)(p,d[0],i),U=e.contextValue,J=yield((v=p.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(a,A,U,I);if(J instanceof Error)throw J;return J}catch(A){throw(0,zX.locatedError)(A,d,(0,NC.pathToArray)(E))}})}});var IC=F(Vi=>{"use strict";m();T();N();Object.defineProperty(Vi,"__esModule",{value:!0});Object.defineProperty(Vi,"createSourceEventStream",{enumerable:!0,get:function(){return yC.createSourceEventStream}});Object.defineProperty(Vi,"defaultFieldResolver",{enumerable:!0,get:function(){return rT.defaultFieldResolver}});Object.defineProperty(Vi,"defaultTypeResolver",{enumerable:!0,get:function(){return rT.defaultTypeResolver}});Object.defineProperty(Vi,"execute",{enumerable:!0,get:function(){return rT.execute}});Object.defineProperty(Vi,"executeSync",{enumerable:!0,get:function(){return rT.executeSync}});Object.defineProperty(Vi,"getArgumentValues",{enumerable:!0,get:function(){return pv.getArgumentValues}});Object.defineProperty(Vi,"getDirectiveValues",{enumerable:!0,get:function(){return pv.getDirectiveValues}});Object.defineProperty(Vi,"getVariableValues",{enumerable:!0,get:function(){return pv.getVariableValues}});Object.defineProperty(Vi,"responsePathAsArray",{enumerable:!0,get:function(){return r5.pathToArray}});Object.defineProperty(Vi,"subscribe",{enumerable:!0,get:function(){return yC.subscribe}});var r5=Sf(),rT=Cf(),yC=hC(),pv=Ll()});var gC=F(Tv=>{"use strict";m();T();N();Object.defineProperty(Tv,"__esModule",{value:!0});Tv.NoDeprecatedCustomRule=i5;var mv=Ar(),kf=Xe(),Nv=Ct();function i5(e){return{Field(t){let n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=e.getParentType();i!=null||(0,mv.invariant)(!1),e.reportError(new kf.GraphQLError(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){let n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=e.getDirective();if(i!=null)e.reportError(new kf.GraphQLError(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{let a=e.getParentType(),o=e.getFieldDef();a!=null&&o!=null||(0,mv.invariant)(!1),e.reportError(new kf.GraphQLError(`Field "${a.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=(0,Nv.getNamedType)(e.getParentInputType());if((0,Nv.isInputObjectType)(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new kf.GraphQLError(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){let n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=(0,Nv.getNamedType)(e.getInputType());i!=null||(0,mv.invariant)(!1),e.reportError(new kf.GraphQLError(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}});var _C=F(Ev=>{"use strict";m();T();N();Object.defineProperty(Ev,"__esModule",{value:!0});Ev.NoSchemaIntrospectionCustomRule=u5;var a5=Xe(),s5=Ct(),o5=ki();function u5(e){return{Field(t){let n=(0,s5.getNamedType)(e.getType());n&&(0,o5.isIntrospectionType)(n)&&e.reportError(new a5.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var OC=F(pt=>{"use strict";m();T();N();Object.defineProperty(pt,"__esModule",{value:!0});Object.defineProperty(pt,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return d5.ExecutableDefinitionsRule}});Object.defineProperty(pt,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return f5.FieldsOnCorrectTypeRule}});Object.defineProperty(pt,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return p5.FragmentsOnCompositeTypesRule}});Object.defineProperty(pt,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return m5.KnownArgumentNamesRule}});Object.defineProperty(pt,"KnownDirectivesRule",{enumerable:!0,get:function(){return N5.KnownDirectivesRule}});Object.defineProperty(pt,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return T5.KnownFragmentNamesRule}});Object.defineProperty(pt,"KnownTypeNamesRule",{enumerable:!0,get:function(){return E5.KnownTypeNamesRule}});Object.defineProperty(pt,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return h5.LoneAnonymousOperationRule}});Object.defineProperty(pt,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return M5.LoneSchemaDefinitionRule}});Object.defineProperty(pt,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return k5.MaxIntrospectionDepthRule}});Object.defineProperty(pt,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return Q5.NoDeprecatedCustomRule}});Object.defineProperty(pt,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return y5.NoFragmentCyclesRule}});Object.defineProperty(pt,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return Y5.NoSchemaIntrospectionCustomRule}});Object.defineProperty(pt,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return I5.NoUndefinedVariablesRule}});Object.defineProperty(pt,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return g5.NoUnusedFragmentsRule}});Object.defineProperty(pt,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return _5.NoUnusedVariablesRule}});Object.defineProperty(pt,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return v5.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(pt,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return O5.PossibleFragmentSpreadsRule}});Object.defineProperty(pt,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return G5.PossibleTypeExtensionsRule}});Object.defineProperty(pt,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return S5.ProvidedRequiredArgumentsRule}});Object.defineProperty(pt,"ScalarLeafsRule",{enumerable:!0,get:function(){return D5.ScalarLeafsRule}});Object.defineProperty(pt,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return b5.SingleFieldSubscriptionsRule}});Object.defineProperty(pt,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return K5.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(pt,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return A5.UniqueArgumentNamesRule}});Object.defineProperty(pt,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return $5.UniqueDirectiveNamesRule}});Object.defineProperty(pt,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return R5.UniqueDirectivesPerLocationRule}});Object.defineProperty(pt,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return V5.UniqueEnumValueNamesRule}});Object.defineProperty(pt,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return j5.UniqueFieldDefinitionNamesRule}});Object.defineProperty(pt,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return P5.UniqueFragmentNamesRule}});Object.defineProperty(pt,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return F5.UniqueInputFieldNamesRule}});Object.defineProperty(pt,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return w5.UniqueOperationNamesRule}});Object.defineProperty(pt,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return x5.UniqueOperationTypesRule}});Object.defineProperty(pt,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return q5.UniqueTypeNamesRule}});Object.defineProperty(pt,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return L5.UniqueVariableNamesRule}});Object.defineProperty(pt,"ValidationContext",{enumerable:!0,get:function(){return l5.ValidationContext}});Object.defineProperty(pt,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return C5.ValuesOfCorrectTypeRule}});Object.defineProperty(pt,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return B5.VariablesAreInputTypesRule}});Object.defineProperty(pt,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return U5.VariablesInAllowedPositionRule}});Object.defineProperty(pt,"recommendedRules",{enumerable:!0,get:function(){return vC.recommendedRules}});Object.defineProperty(pt,"specifiedRules",{enumerable:!0,get:function(){return vC.specifiedRules}});Object.defineProperty(pt,"validate",{enumerable:!0,get:function(){return c5.validate}});var c5=Bl(),l5=H_(),vC=Q_(),d5=cg(),f5=dg(),p5=pg(),m5=mg(),N5=hg(),T5=Ig(),E5=vg(),h5=Sg(),y5=Fg(),I5=Lg(),g5=Bg(),_5=kg(),v5=Yg(),O5=zg(),S5=e_(),D5=n_(),b5=d_(),A5=T_(),R5=g_(),P5=A_(),F5=P_(),w5=w_(),L5=M_(),C5=V_(),B5=K_(),U5=G_(),k5=Rg(),M5=bg(),x5=C_(),q5=U_(),V5=v_(),j5=D_(),K5=m_(),$5=h_(),G5=Xg(),Q5=gC(),Y5=_C()});var SC=F(_c=>{"use strict";m();T();N();Object.defineProperty(_c,"__esModule",{value:!0});Object.defineProperty(_c,"GraphQLError",{enumerable:!0,get:function(){return hv.GraphQLError}});Object.defineProperty(_c,"formatError",{enumerable:!0,get:function(){return hv.formatError}});Object.defineProperty(_c,"locatedError",{enumerable:!0,get:function(){return H5.locatedError}});Object.defineProperty(_c,"printError",{enumerable:!0,get:function(){return hv.printError}});Object.defineProperty(_c,"syntaxError",{enumerable:!0,get:function(){return J5.syntaxError}});var hv=Xe(),J5=Zm(),H5=HN()});var Iv=F(yv=>{"use strict";m();T();N();Object.defineProperty(yv,"__esModule",{value:!0});yv.getIntrospectionQuery=z5;function z5(e){let t=k({descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1},e),n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",a=t.schemaDescription?n:"";function o(l){return t.inputValueDeprecation?l:""}let u=t.oneOf?"isOneOf":"";return` query IntrospectionQuery { __schema { ${a} @@ -177,85 +177,85 @@ In some cases, you need to provide options to alter GraphQL's execution behavior } } } - `}});var DC=w(gv=>{"use strict";m();T();N();Object.defineProperty(gv,"__esModule",{value:!0});gv.getOperationAST=Q5;var G5=wt();function Q5(e,t){let n=null;for(let i of e.definitions)if(i.kind===G5.Kind.OPERATION_DEFINITION){var r;if(t==null){if(n)return null;n=i}else if(((r=i.name)===null||r===void 0?void 0:r.value)===t)return i}return n}});var bC=w(_v=>{"use strict";m();T();N();Object.defineProperty(_v,"__esModule",{value:!0});_v.getOperationRootType=Y5;var iT=ze();function Y5(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new iT.GraphQLError("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){let n=e.getMutationType();if(!n)throw new iT.GraphQLError("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new iT.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return n}throw new iT.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var AC=w(vv=>{"use strict";m();T();N();Object.defineProperty(vv,"__esModule",{value:!0});vv.introspectionFromSchema=X5;var J5=Ar(),H5=vl(),z5=Cf(),W5=Iv();function X5(e,t){let n=k({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=(0,H5.parse)((0,W5.getIntrospectionQuery)(n)),i=(0,z5.executeSync)({schema:e,document:r});return!i.errors&&i.data||(0,J5.invariant)(!1),i.data}});var PC=w(Ov=>{"use strict";m();T();N();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.buildClientSchema=a9;var Z5=Vr(),Ei=Wt(),RC=Va(),aT=af(),e9=vl(),hi=Lt(),t9=Xr(),za=ki(),n9=Ga(),r9=Nc(),i9=Rf();function a9(e,t){(0,RC.isObjectLike)(e)&&(0,RC.isObjectLike)(e.__schema)||(0,Z5.devAssert)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,Ei.inspect)(e)}.`);let n=e.__schema,r=(0,aT.keyValMap)(n.types,Z=>Z.name,Z=>I(Z));for(let Z of[...n9.specifiedScalarTypes,...za.introspectionTypes])r[Z.name]&&(r[Z.name]=Z);let i=n.queryType?p(n.queryType):null,a=n.mutationType?p(n.mutationType):null,o=n.subscriptionType?p(n.subscriptionType):null,u=n.directives?n.directives.map(Ze):[];return new r9.GraphQLSchema({description:n.description,query:i,mutation:a,subscription:o,types:Object.values(r),directives:u,assumeValid:t==null?void 0:t.assumeValid});function l(Z){if(Z.kind===za.TypeKind.LIST){let ve=Z.ofType;if(!ve)throw new Error("Decorated type deeper than introspection query.");return new hi.GraphQLList(l(ve))}if(Z.kind===za.TypeKind.NON_NULL){let ve=Z.ofType;if(!ve)throw new Error("Decorated type deeper than introspection query.");let gt=l(ve);return new hi.GraphQLNonNull((0,hi.assertNullableType)(gt))}return d(Z)}function d(Z){let ve=Z.name;if(!ve)throw new Error(`Unknown type reference: ${(0,Ei.inspect)(Z)}.`);let gt=r[ve];if(!gt)throw new Error(`Invalid or incomplete schema, unknown type: ${ve}. Ensure that a full introspection query is used in order to build a client schema.`);return gt}function p(Z){return(0,hi.assertObjectType)(d(Z))}function E(Z){return(0,hi.assertInterfaceType)(d(Z))}function I(Z){if(Z!=null&&Z.name!=null&&Z.kind!=null)switch(Z.kind){case za.TypeKind.SCALAR:return v(Z);case za.TypeKind.OBJECT:return U(Z);case za.TypeKind.INTERFACE:return j(Z);case za.TypeKind.UNION:return Q(Z);case za.TypeKind.ENUM:return ee(Z);case za.TypeKind.INPUT_OBJECT:return ne(Z)}let ve=(0,Ei.inspect)(Z);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${ve}.`)}function v(Z){return new hi.GraphQLScalarType({name:Z.name,description:Z.description,specifiedByURL:Z.specifiedByURL})}function A(Z){if(Z.interfaces===null&&Z.kind===za.TypeKind.INTERFACE)return[];if(!Z.interfaces){let ve=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing interfaces: ${ve}.`)}return Z.interfaces.map(E)}function U(Z){return new hi.GraphQLObjectType({name:Z.name,description:Z.description,interfaces:()=>A(Z),fields:()=>pe(Z)})}function j(Z){return new hi.GraphQLInterfaceType({name:Z.name,description:Z.description,interfaces:()=>A(Z),fields:()=>pe(Z)})}function Q(Z){if(!Z.possibleTypes){let ve=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing possibleTypes: ${ve}.`)}return new hi.GraphQLUnionType({name:Z.name,description:Z.description,types:()=>Z.possibleTypes.map(p)})}function ee(Z){if(!Z.enumValues){let ve=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing enumValues: ${ve}.`)}return new hi.GraphQLEnumType({name:Z.name,description:Z.description,values:(0,aT.keyValMap)(Z.enumValues,ve=>ve.name,ve=>({description:ve.description,deprecationReason:ve.deprecationReason}))})}function ne(Z){if(!Z.inputFields){let ve=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing inputFields: ${ve}.`)}return new hi.GraphQLInputObjectType({name:Z.name,description:Z.description,fields:()=>Ae(Z.inputFields),isOneOf:Z.isOneOf})}function pe(Z){if(!Z.fields)throw new Error(`Introspection result missing fields: ${(0,Ei.inspect)(Z)}.`);return(0,aT.keyValMap)(Z.fields,ve=>ve.name,le)}function le(Z){let ve=l(Z.type);if(!(0,hi.isOutputType)(ve)){let gt=(0,Ei.inspect)(ve);throw new Error(`Introspection must provide output type for fields, but received: ${gt}.`)}if(!Z.args){let gt=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing field args: ${gt}.`)}return{description:Z.description,deprecationReason:Z.deprecationReason,type:ve,args:Ae(Z.args)}}function Ae(Z){return(0,aT.keyValMap)(Z,ve=>ve.name,Me)}function Me(Z){let ve=l(Z.type);if(!(0,hi.isInputType)(ve)){let rn=(0,Ei.inspect)(ve);throw new Error(`Introspection must provide input type for arguments, but received: ${rn}.`)}let gt=Z.defaultValue!=null?(0,i9.valueFromAST)((0,e9.parseValue)(Z.defaultValue),ve):void 0;return{description:Z.description,type:ve,defaultValue:gt,deprecationReason:Z.deprecationReason}}function Ze(Z){if(!Z.args){let ve=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing directive args: ${ve}.`)}if(!Z.locations){let ve=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing directive locations: ${ve}.`)}return new t9.GraphQLDirective({name:Z.name,description:Z.description,isRepeatable:Z.isRepeatable,locations:Z.locations.slice(),args:Ae(Z.args)})}}});var Dv=w(oT=>{"use strict";m();T();N();Object.defineProperty(oT,"__esModule",{value:!0});oT.extendSchema=d9;oT.extendSchemaImpl=MC;var s9=Vr(),o9=Wt(),u9=Ar(),c9=Nu(),Mf=SI(),ji=wt(),FC=Ec(),Dn=Lt(),xf=Xr(),UC=ki(),kC=Ga(),wC=Nc(),l9=Bl(),Sv=Ll(),LC=Rf();function d9(e,t,n){(0,wC.assertSchema)(e),t!=null&&t.kind===ji.Kind.DOCUMENT||(0,s9.devAssert)(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&(0,l9.assertValidSDLExtension)(t,e);let r=e.toConfig(),i=MC(r,t,n);return r===i?e:new wC.GraphQLSchema(i)}function MC(e,t,n){var r,i,a,o;let u=[],l=Object.create(null),d=[],p,E=[];for(let ae of t.definitions)if(ae.kind===ji.Kind.SCHEMA_DEFINITION)p=ae;else if(ae.kind===ji.Kind.SCHEMA_EXTENSION)E.push(ae);else if((0,FC.isTypeDefinitionNode)(ae))u.push(ae);else if((0,FC.isTypeExtensionNode)(ae)){let De=ae.name.value,ge=l[De];l[De]=ge?ge.concat([ae]):[ae]}else ae.kind===ji.Kind.DIRECTIVE_DEFINITION&&d.push(ae);if(Object.keys(l).length===0&&u.length===0&&d.length===0&&E.length===0&&p==null)return e;let I=Object.create(null);for(let ae of e.types)I[ae.name]=ee(ae);for(let ae of u){var v;let De=ae.name.value;I[De]=(v=CC[De])!==null&&v!==void 0?v:Ln(ae)}let A=k(k({query:e.query&&j(e.query),mutation:e.mutation&&j(e.mutation),subscription:e.subscription&&j(e.subscription)},p&>([p])),gt(E));return $(k({description:(r=p)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},A),{types:Object.values(I),directives:[...e.directives.map(Q),...d.map(In)],extensions:Object.create(null),astNode:(a=p)!==null&&a!==void 0?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(E),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function U(ae){return(0,Dn.isListType)(ae)?new Dn.GraphQLList(U(ae.ofType)):(0,Dn.isNonNullType)(ae)?new Dn.GraphQLNonNull(U(ae.ofType)):j(ae)}function j(ae){return I[ae.name]}function Q(ae){let De=ae.toConfig();return new xf.GraphQLDirective($(k({},De),{args:(0,Mf.mapValue)(De.args,ve)}))}function ee(ae){if((0,UC.isIntrospectionType)(ae)||(0,kC.isSpecifiedScalarType)(ae))return ae;if((0,Dn.isScalarType)(ae))return le(ae);if((0,Dn.isObjectType)(ae))return Ae(ae);if((0,Dn.isInterfaceType)(ae))return Me(ae);if((0,Dn.isUnionType)(ae))return Ze(ae);if((0,Dn.isEnumType)(ae))return pe(ae);if((0,Dn.isInputObjectType)(ae))return ne(ae);(0,u9.invariant)(!1,"Unexpected type: "+(0,o9.inspect)(ae))}function ne(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[];return new Dn.GraphQLInputObjectType($(k({},ge),{fields:()=>k(k({},(0,Mf.mapValue)(ge.fields,St=>$(k({},St),{type:U(St.type)}))),kr(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function pe(ae){var De;let ge=ae.toConfig(),Le=(De=l[ae.name])!==null&&De!==void 0?De:[];return new Dn.GraphQLEnumType($(k({},ge),{values:k(k({},ge.values),nr(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function le(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[],St=ge.specifiedByURL;for(let ie of Le){var Y;St=(Y=BC(ie))!==null&&Y!==void 0?Y:St}return new Dn.GraphQLScalarType($(k({},ge),{specifiedByURL:St,extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Ae(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[];return new Dn.GraphQLObjectType($(k({},ge),{interfaces:()=>[...ae.getInterfaces().map(j),...En(Le)],fields:()=>k(k({},(0,Mf.mapValue)(ge.fields,Z)),xt(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Me(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[];return new Dn.GraphQLInterfaceType($(k({},ge),{interfaces:()=>[...ae.getInterfaces().map(j),...En(Le)],fields:()=>k(k({},(0,Mf.mapValue)(ge.fields,Z)),xt(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Ze(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[];return new Dn.GraphQLUnionType($(k({},ge),{types:()=>[...ae.getTypes().map(j),...Ht(Le)],extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Z(ae){return $(k({},ae),{type:U(ae.type),args:ae.args&&(0,Mf.mapValue)(ae.args,ve)})}function ve(ae){return $(k({},ae),{type:U(ae.type)})}function gt(ae){let De={};for(let Le of ae){var ge;let St=(ge=Le.operationTypes)!==null&&ge!==void 0?ge:[];for(let Y of St)De[Y.operation]=rn(Y.type)}return De}function rn(ae){var De;let ge=ae.name.value,Le=(De=CC[ge])!==null&&De!==void 0?De:I[ge];if(Le===void 0)throw new Error(`Unknown type: "${ge}".`);return Le}function un(ae){return ae.kind===ji.Kind.LIST_TYPE?new Dn.GraphQLList(un(ae.type)):ae.kind===ji.Kind.NON_NULL_TYPE?new Dn.GraphQLNonNull(un(ae.type)):rn(ae)}function In(ae){var De;return new xf.GraphQLDirective({name:ae.name.value,description:(De=ae.description)===null||De===void 0?void 0:De.value,locations:ae.locations.map(({value:ge})=>ge),isRepeatable:ae.repeatable,args:an(ae.arguments),astNode:ae})}function xt(ae){let De=Object.create(null);for(let St of ae){var ge;let Y=(ge=St.fields)!==null&&ge!==void 0?ge:[];for(let ie of Y){var Le;De[ie.name.value]={type:un(ie.type),description:(Le=ie.description)===null||Le===void 0?void 0:Le.value,args:an(ie.arguments),deprecationReason:sT(ie),astNode:ie}}}return De}function an(ae){let De=ae!=null?ae:[],ge=Object.create(null);for(let St of De){var Le;let Y=un(St.type);ge[St.name.value]={type:Y,description:(Le=St.description)===null||Le===void 0?void 0:Le.value,defaultValue:(0,LC.valueFromAST)(St.defaultValue,Y),deprecationReason:sT(St),astNode:St}}return ge}function kr(ae){let De=Object.create(null);for(let St of ae){var ge;let Y=(ge=St.fields)!==null&&ge!==void 0?ge:[];for(let ie of Y){var Le;let xe=un(ie.type);De[ie.name.value]={type:xe,description:(Le=ie.description)===null||Le===void 0?void 0:Le.value,defaultValue:(0,LC.valueFromAST)(ie.defaultValue,xe),deprecationReason:sT(ie),astNode:ie}}}return De}function nr(ae){let De=Object.create(null);for(let St of ae){var ge;let Y=(ge=St.values)!==null&&ge!==void 0?ge:[];for(let ie of Y){var Le;De[ie.name.value]={description:(Le=ie.description)===null||Le===void 0?void 0:Le.value,deprecationReason:sT(ie),astNode:ie}}}return De}function En(ae){return ae.flatMap(De=>{var ge,Le;return(ge=(Le=De.interfaces)===null||Le===void 0?void 0:Le.map(rn))!==null&&ge!==void 0?ge:[]})}function Ht(ae){return ae.flatMap(De=>{var ge,Le;return(ge=(Le=De.types)===null||Le===void 0?void 0:Le.map(rn))!==null&&ge!==void 0?ge:[]})}function Ln(ae){var De;let ge=ae.name.value,Le=(De=l[ge])!==null&&De!==void 0?De:[];switch(ae.kind){case ji.Kind.OBJECT_TYPE_DEFINITION:{var St;let it=[ae,...Le];return new Dn.GraphQLObjectType({name:ge,description:(St=ae.description)===null||St===void 0?void 0:St.value,interfaces:()=>En(it),fields:()=>xt(it),astNode:ae,extensionASTNodes:Le})}case ji.Kind.INTERFACE_TYPE_DEFINITION:{var Y;let it=[ae,...Le];return new Dn.GraphQLInterfaceType({name:ge,description:(Y=ae.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>En(it),fields:()=>xt(it),astNode:ae,extensionASTNodes:Le})}case ji.Kind.ENUM_TYPE_DEFINITION:{var ie;let it=[ae,...Le];return new Dn.GraphQLEnumType({name:ge,description:(ie=ae.description)===null||ie===void 0?void 0:ie.value,values:nr(it),astNode:ae,extensionASTNodes:Le})}case ji.Kind.UNION_TYPE_DEFINITION:{var xe;let it=[ae,...Le];return new Dn.GraphQLUnionType({name:ge,description:(xe=ae.description)===null||xe===void 0?void 0:xe.value,types:()=>Ht(it),astNode:ae,extensionASTNodes:Le})}case ji.Kind.SCALAR_TYPE_DEFINITION:{var He;return new Dn.GraphQLScalarType({name:ge,description:(He=ae.description)===null||He===void 0?void 0:He.value,specifiedByURL:BC(ae),astNode:ae,extensionASTNodes:Le})}case ji.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Bt;let it=[ae,...Le];return new Dn.GraphQLInputObjectType({name:ge,description:(Bt=ae.description)===null||Bt===void 0?void 0:Bt.value,fields:()=>kr(it),astNode:ae,extensionASTNodes:Le,isOneOf:f9(ae)})}}}}var CC=(0,c9.keyMap)([...kC.specifiedScalarTypes,...UC.introspectionTypes],e=>e.name);function sT(e){let t=(0,Sv.getDirectiveValues)(xf.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function BC(e){let t=(0,Sv.getDirectiveValues)(xf.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}function f9(e){return!!(0,Sv.getDirectiveValues)(xf.GraphQLOneOfDirective,e)}});var qC=w(uT=>{"use strict";m();T();N();Object.defineProperty(uT,"__esModule",{value:!0});uT.buildASTSchema=xC;uT.buildSchema=I9;var p9=Vr(),m9=wt(),N9=vl(),T9=Xr(),E9=Nc(),h9=Bl(),y9=Dv();function xC(e,t){e!=null&&e.kind===m9.Kind.DOCUMENT||(0,p9.devAssert)(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,h9.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,y9.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}let i=[...r.directives,...T9.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new E9.GraphQLSchema($(k({},r),{directives:i}))}function I9(e,t){let n=(0,N9.parse)(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return xC(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}});var KC=w(Av=>{"use strict";m();T();N();Object.defineProperty(Av,"__esModule",{value:!0});Av.lexicographicSortSchema=b9;var g9=Wt(),_9=Ar(),v9=af(),VC=sf(),jr=Lt(),O9=Xr(),S9=ki(),D9=Nc();function b9(e){let t=e.toConfig(),n=(0,v9.keyValMap)(bv(t.types),I=>I.name,E);return new D9.GraphQLSchema($(k({},t),{types:Object.values(n),directives:bv(t.directives).map(o),query:a(t.query),mutation:a(t.mutation),subscription:a(t.subscription)}));function r(I){return(0,jr.isListType)(I)?new jr.GraphQLList(r(I.ofType)):(0,jr.isNonNullType)(I)?new jr.GraphQLNonNull(r(I.ofType)):i(I)}function i(I){return n[I.name]}function a(I){return I&&i(I)}function o(I){let v=I.toConfig();return new O9.GraphQLDirective($(k({},v),{locations:jC(v.locations,A=>A),args:u(v.args)}))}function u(I){return cT(I,v=>$(k({},v),{type:r(v.type)}))}function l(I){return cT(I,v=>$(k({},v),{type:r(v.type),args:v.args&&u(v.args)}))}function d(I){return cT(I,v=>$(k({},v),{type:r(v.type)}))}function p(I){return bv(I).map(i)}function E(I){if((0,jr.isScalarType)(I)||(0,S9.isIntrospectionType)(I))return I;if((0,jr.isObjectType)(I)){let v=I.toConfig();return new jr.GraphQLObjectType($(k({},v),{interfaces:()=>p(v.interfaces),fields:()=>l(v.fields)}))}if((0,jr.isInterfaceType)(I)){let v=I.toConfig();return new jr.GraphQLInterfaceType($(k({},v),{interfaces:()=>p(v.interfaces),fields:()=>l(v.fields)}))}if((0,jr.isUnionType)(I)){let v=I.toConfig();return new jr.GraphQLUnionType($(k({},v),{types:()=>p(v.types)}))}if((0,jr.isEnumType)(I)){let v=I.toConfig();return new jr.GraphQLEnumType($(k({},v),{values:cT(v.values,A=>A)}))}if((0,jr.isInputObjectType)(I)){let v=I.toConfig();return new jr.GraphQLInputObjectType($(k({},v),{fields:()=>d(v.fields)}))}(0,_9.invariant)(!1,"Unexpected type: "+(0,g9.inspect)(I))}}function cT(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(VC.naturalCompare))n[r]=t(e[r]);return n}function bv(e){return jC(e,t=>t.name)}function jC(e,t){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);return(0,VC.naturalCompare)(i,a)})}});var zC=w(qf=>{"use strict";m();T();N();Object.defineProperty(qf,"__esModule",{value:!0});qf.printIntrospectionSchema=C9;qf.printSchema=L9;qf.printType=QC;var A9=Wt(),R9=Ar(),P9=zd(),Pv=wt(),lT=Ti(),kl=Lt(),Fv=Xr(),$C=ki(),F9=Ga(),w9=yf();function L9(e){return GC(e,t=>!(0,Fv.isSpecifiedDirective)(t),B9)}function C9(e){return GC(e,Fv.isSpecifiedDirective,$C.isIntrospectionType)}function B9(e){return!(0,F9.isSpecifiedScalarType)(e)&&!(0,$C.isIntrospectionType)(e)}function GC(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[U9(e),...r.map(a=>$9(a)),...i.map(a=>QC(a))].filter(Boolean).join(` + `}});var DC=F(gv=>{"use strict";m();T();N();Object.defineProperty(gv,"__esModule",{value:!0});gv.getOperationAST=X5;var W5=Lt();function X5(e,t){let n=null;for(let i of e.definitions)if(i.kind===W5.Kind.OPERATION_DEFINITION){var r;if(t==null){if(n)return null;n=i}else if(((r=i.name)===null||r===void 0?void 0:r.value)===t)return i}return n}});var bC=F(_v=>{"use strict";m();T();N();Object.defineProperty(_v,"__esModule",{value:!0});_v.getOperationRootType=Z5;var iT=Xe();function Z5(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new iT.GraphQLError("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){let n=e.getMutationType();if(!n)throw new iT.GraphQLError("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new iT.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return n}throw new iT.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var AC=F(vv=>{"use strict";m();T();N();Object.defineProperty(vv,"__esModule",{value:!0});vv.introspectionFromSchema=i9;var e9=Ar(),t9=vl(),n9=Cf(),r9=Iv();function i9(e,t){let n=k({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=(0,t9.parse)((0,r9.getIntrospectionQuery)(n)),i=(0,n9.executeSync)({schema:e,document:r});return!i.errors&&i.data||(0,e9.invariant)(!1),i.data}});var PC=F(Ov=>{"use strict";m();T();N();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.buildClientSchema=d9;var a9=Vr(),Ei=Wt(),RC=Va(),aT=af(),s9=vl(),hi=Ct(),o9=Xr(),za=ki(),u9=Ga(),c9=Nc(),l9=Rf();function d9(e,t){(0,RC.isObjectLike)(e)&&(0,RC.isObjectLike)(e.__schema)||(0,a9.devAssert)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,Ei.inspect)(e)}.`);let n=e.__schema,r=(0,aT.keyValMap)(n.types,W=>W.name,W=>I(W));for(let W of[...u9.specifiedScalarTypes,...za.introspectionTypes])r[W.name]&&(r[W.name]=W);let i=n.queryType?p(n.queryType):null,a=n.mutationType?p(n.mutationType):null,o=n.subscriptionType?p(n.subscriptionType):null,u=n.directives?n.directives.map(He):[];return new c9.GraphQLSchema({description:n.description,query:i,mutation:a,subscription:o,types:Object.values(r),directives:u,assumeValid:t==null?void 0:t.assumeValid});function l(W){if(W.kind===za.TypeKind.LIST){let Oe=W.ofType;if(!Oe)throw new Error("Decorated type deeper than introspection query.");return new hi.GraphQLList(l(Oe))}if(W.kind===za.TypeKind.NON_NULL){let Oe=W.ofType;if(!Oe)throw new Error("Decorated type deeper than introspection query.");let Et=l(Oe);return new hi.GraphQLNonNull((0,hi.assertNullableType)(Et))}return d(W)}function d(W){let Oe=W.name;if(!Oe)throw new Error(`Unknown type reference: ${(0,Ei.inspect)(W)}.`);let Et=r[Oe];if(!Et)throw new Error(`Invalid or incomplete schema, unknown type: ${Oe}. Ensure that a full introspection query is used in order to build a client schema.`);return Et}function p(W){return(0,hi.assertObjectType)(d(W))}function E(W){return(0,hi.assertInterfaceType)(d(W))}function I(W){if(W!=null&&W.name!=null&&W.kind!=null)switch(W.kind){case za.TypeKind.SCALAR:return v(W);case za.TypeKind.OBJECT:return U(W);case za.TypeKind.INTERFACE:return j(W);case za.TypeKind.UNION:return J(W);case za.TypeKind.ENUM:return re(W);case za.TypeKind.INPUT_OBJECT:return te(W)}let Oe=(0,Ei.inspect)(W);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${Oe}.`)}function v(W){return new hi.GraphQLScalarType({name:W.name,description:W.description,specifiedByURL:W.specifiedByURL})}function A(W){if(W.interfaces===null&&W.kind===za.TypeKind.INTERFACE)return[];if(!W.interfaces){let Oe=(0,Ei.inspect)(W);throw new Error(`Introspection result missing interfaces: ${Oe}.`)}return W.interfaces.map(E)}function U(W){return new hi.GraphQLObjectType({name:W.name,description:W.description,interfaces:()=>A(W),fields:()=>pe(W)})}function j(W){return new hi.GraphQLInterfaceType({name:W.name,description:W.description,interfaces:()=>A(W),fields:()=>pe(W)})}function J(W){if(!W.possibleTypes){let Oe=(0,Ei.inspect)(W);throw new Error(`Introspection result missing possibleTypes: ${Oe}.`)}return new hi.GraphQLUnionType({name:W.name,description:W.description,types:()=>W.possibleTypes.map(p)})}function re(W){if(!W.enumValues){let Oe=(0,Ei.inspect)(W);throw new Error(`Introspection result missing enumValues: ${Oe}.`)}return new hi.GraphQLEnumType({name:W.name,description:W.description,values:(0,aT.keyValMap)(W.enumValues,Oe=>Oe.name,Oe=>({description:Oe.description,deprecationReason:Oe.deprecationReason}))})}function te(W){if(!W.inputFields){let Oe=(0,Ei.inspect)(W);throw new Error(`Introspection result missing inputFields: ${Oe}.`)}return new hi.GraphQLInputObjectType({name:W.name,description:W.description,fields:()=>Ie(W.inputFields),isOneOf:W.isOneOf})}function pe(W){if(!W.fields)throw new Error(`Introspection result missing fields: ${(0,Ei.inspect)(W)}.`);return(0,aT.keyValMap)(W.fields,Oe=>Oe.name,Ne)}function Ne(W){let Oe=l(W.type);if(!(0,hi.isOutputType)(Oe)){let Et=(0,Ei.inspect)(Oe);throw new Error(`Introspection must provide output type for fields, but received: ${Et}.`)}if(!W.args){let Et=(0,Ei.inspect)(W);throw new Error(`Introspection result missing field args: ${Et}.`)}return{description:W.description,deprecationReason:W.deprecationReason,type:Oe,args:Ie(W.args)}}function Ie(W){return(0,aT.keyValMap)(W,Oe=>Oe.name,Ue)}function Ue(W){let Oe=l(W.type);if(!(0,hi.isInputType)(Oe)){let on=(0,Ei.inspect)(Oe);throw new Error(`Introspection must provide input type for arguments, but received: ${on}.`)}let Et=W.defaultValue!=null?(0,l9.valueFromAST)((0,s9.parseValue)(W.defaultValue),Oe):void 0;return{description:W.description,type:Oe,defaultValue:Et,deprecationReason:W.deprecationReason}}function He(W){if(!W.args){let Oe=(0,Ei.inspect)(W);throw new Error(`Introspection result missing directive args: ${Oe}.`)}if(!W.locations){let Oe=(0,Ei.inspect)(W);throw new Error(`Introspection result missing directive locations: ${Oe}.`)}return new o9.GraphQLDirective({name:W.name,description:W.description,isRepeatable:W.isRepeatable,locations:W.locations.slice(),args:Ie(W.args)})}}});var Dv=F(oT=>{"use strict";m();T();N();Object.defineProperty(oT,"__esModule",{value:!0});oT.extendSchema=E9;oT.extendSchemaImpl=MC;var f9=Vr(),p9=Wt(),m9=Ar(),N9=Nu(),Mf=SI(),ji=Lt(),FC=Ec(),Dn=Ct(),xf=Xr(),UC=ki(),kC=Ga(),wC=Nc(),T9=Bl(),Sv=Ll(),LC=Rf();function E9(e,t,n){(0,wC.assertSchema)(e),t!=null&&t.kind===ji.Kind.DOCUMENT||(0,f9.devAssert)(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&(0,T9.assertValidSDLExtension)(t,e);let r=e.toConfig(),i=MC(r,t,n);return r===i?e:new wC.GraphQLSchema(i)}function MC(e,t,n){var r,i,a,o;let u=[],l=Object.create(null),d=[],p,E=[];for(let ae of t.definitions)if(ae.kind===ji.Kind.SCHEMA_DEFINITION)p=ae;else if(ae.kind===ji.Kind.SCHEMA_EXTENSION)E.push(ae);else if((0,FC.isTypeDefinitionNode)(ae))u.push(ae);else if((0,FC.isTypeExtensionNode)(ae)){let be=ae.name.value,ge=l[be];l[be]=ge?ge.concat([ae]):[ae]}else ae.kind===ji.Kind.DIRECTIVE_DEFINITION&&d.push(ae);if(Object.keys(l).length===0&&u.length===0&&d.length===0&&E.length===0&&p==null)return e;let I=Object.create(null);for(let ae of e.types)I[ae.name]=re(ae);for(let ae of u){var v;let be=ae.name.value;I[be]=(v=CC[be])!==null&&v!==void 0?v:Ln(ae)}let A=k(k({query:e.query&&j(e.query),mutation:e.mutation&&j(e.mutation),subscription:e.subscription&&j(e.subscription)},p&&Et([p])),Et(E));return $(k({description:(r=p)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},A),{types:Object.values(I),directives:[...e.directives.map(J),...d.map(un)],extensions:Object.create(null),astNode:(a=p)!==null&&a!==void 0?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(E),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function U(ae){return(0,Dn.isListType)(ae)?new Dn.GraphQLList(U(ae.ofType)):(0,Dn.isNonNullType)(ae)?new Dn.GraphQLNonNull(U(ae.ofType)):j(ae)}function j(ae){return I[ae.name]}function J(ae){let be=ae.toConfig();return new xf.GraphQLDirective($(k({},be),{args:(0,Mf.mapValue)(be.args,Oe)}))}function re(ae){if((0,UC.isIntrospectionType)(ae)||(0,kC.isSpecifiedScalarType)(ae))return ae;if((0,Dn.isScalarType)(ae))return Ne(ae);if((0,Dn.isObjectType)(ae))return Ie(ae);if((0,Dn.isInterfaceType)(ae))return Ue(ae);if((0,Dn.isUnionType)(ae))return He(ae);if((0,Dn.isEnumType)(ae))return pe(ae);if((0,Dn.isInputObjectType)(ae))return te(ae);(0,m9.invariant)(!1,"Unexpected type: "+(0,p9.inspect)(ae))}function te(ae){var be;let ge=ae.toConfig(),Le=(be=l[ge.name])!==null&&be!==void 0?be:[];return new Dn.GraphQLInputObjectType($(k({},ge),{fields:()=>k(k({},(0,Mf.mapValue)(ge.fields,St=>$(k({},St),{type:U(St.type)}))),kr(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function pe(ae){var be;let ge=ae.toConfig(),Le=(be=l[ae.name])!==null&&be!==void 0?be:[];return new Dn.GraphQLEnumType($(k({},ge),{values:k(k({},ge.values),nr(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Ne(ae){var be;let ge=ae.toConfig(),Le=(be=l[ge.name])!==null&&be!==void 0?be:[],St=ge.specifiedByURL;for(let ie of Le){var Q;St=(Q=BC(ie))!==null&&Q!==void 0?Q:St}return new Dn.GraphQLScalarType($(k({},ge),{specifiedByURL:St,extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Ie(ae){var be;let ge=ae.toConfig(),Le=(be=l[ge.name])!==null&&be!==void 0?be:[];return new Dn.GraphQLObjectType($(k({},ge),{interfaces:()=>[...ae.getInterfaces().map(j),...hn(Le)],fields:()=>k(k({},(0,Mf.mapValue)(ge.fields,W)),Pt(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Ue(ae){var be;let ge=ae.toConfig(),Le=(be=l[ge.name])!==null&&be!==void 0?be:[];return new Dn.GraphQLInterfaceType($(k({},ge),{interfaces:()=>[...ae.getInterfaces().map(j),...hn(Le)],fields:()=>k(k({},(0,Mf.mapValue)(ge.fields,W)),Pt(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function He(ae){var be;let ge=ae.toConfig(),Le=(be=l[ge.name])!==null&&be!==void 0?be:[];return new Dn.GraphQLUnionType($(k({},ge),{types:()=>[...ae.getTypes().map(j),...Ht(Le)],extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function W(ae){return $(k({},ae),{type:U(ae.type),args:ae.args&&(0,Mf.mapValue)(ae.args,Oe)})}function Oe(ae){return $(k({},ae),{type:U(ae.type)})}function Et(ae){let be={};for(let Le of ae){var ge;let St=(ge=Le.operationTypes)!==null&&ge!==void 0?ge:[];for(let Q of St)be[Q.operation]=on(Q.type)}return be}function on(ae){var be;let ge=ae.name.value,Le=(be=CC[ge])!==null&&be!==void 0?be:I[ge];if(Le===void 0)throw new Error(`Unknown type: "${ge}".`);return Le}function En(ae){return ae.kind===ji.Kind.LIST_TYPE?new Dn.GraphQLList(En(ae.type)):ae.kind===ji.Kind.NON_NULL_TYPE?new Dn.GraphQLNonNull(En(ae.type)):on(ae)}function un(ae){var be;return new xf.GraphQLDirective({name:ae.name.value,description:(be=ae.description)===null||be===void 0?void 0:be.value,locations:ae.locations.map(({value:ge})=>ge),isRepeatable:ae.repeatable,args:rn(ae.arguments),astNode:ae})}function Pt(ae){let be=Object.create(null);for(let St of ae){var ge;let Q=(ge=St.fields)!==null&&ge!==void 0?ge:[];for(let ie of Q){var Le;be[ie.name.value]={type:En(ie.type),description:(Le=ie.description)===null||Le===void 0?void 0:Le.value,args:rn(ie.arguments),deprecationReason:sT(ie),astNode:ie}}}return be}function rn(ae){let be=ae!=null?ae:[],ge=Object.create(null);for(let St of be){var Le;let Q=En(St.type);ge[St.name.value]={type:Q,description:(Le=St.description)===null||Le===void 0?void 0:Le.value,defaultValue:(0,LC.valueFromAST)(St.defaultValue,Q),deprecationReason:sT(St),astNode:St}}return ge}function kr(ae){let be=Object.create(null);for(let St of ae){var ge;let Q=(ge=St.fields)!==null&&ge!==void 0?ge:[];for(let ie of Q){var Le;let xe=En(ie.type);be[ie.name.value]={type:xe,description:(Le=ie.description)===null||Le===void 0?void 0:Le.value,defaultValue:(0,LC.valueFromAST)(ie.defaultValue,xe),deprecationReason:sT(ie),astNode:ie}}}return be}function nr(ae){let be=Object.create(null);for(let St of ae){var ge;let Q=(ge=St.values)!==null&&ge!==void 0?ge:[];for(let ie of Q){var Le;be[ie.name.value]={description:(Le=ie.description)===null||Le===void 0?void 0:Le.value,deprecationReason:sT(ie),astNode:ie}}}return be}function hn(ae){return ae.flatMap(be=>{var ge,Le;return(ge=(Le=be.interfaces)===null||Le===void 0?void 0:Le.map(on))!==null&&ge!==void 0?ge:[]})}function Ht(ae){return ae.flatMap(be=>{var ge,Le;return(ge=(Le=be.types)===null||Le===void 0?void 0:Le.map(on))!==null&&ge!==void 0?ge:[]})}function Ln(ae){var be;let ge=ae.name.value,Le=(be=l[ge])!==null&&be!==void 0?be:[];switch(ae.kind){case ji.Kind.OBJECT_TYPE_DEFINITION:{var St;let it=[ae,...Le];return new Dn.GraphQLObjectType({name:ge,description:(St=ae.description)===null||St===void 0?void 0:St.value,interfaces:()=>hn(it),fields:()=>Pt(it),astNode:ae,extensionASTNodes:Le})}case ji.Kind.INTERFACE_TYPE_DEFINITION:{var Q;let it=[ae,...Le];return new Dn.GraphQLInterfaceType({name:ge,description:(Q=ae.description)===null||Q===void 0?void 0:Q.value,interfaces:()=>hn(it),fields:()=>Pt(it),astNode:ae,extensionASTNodes:Le})}case ji.Kind.ENUM_TYPE_DEFINITION:{var ie;let it=[ae,...Le];return new Dn.GraphQLEnumType({name:ge,description:(ie=ae.description)===null||ie===void 0?void 0:ie.value,values:nr(it),astNode:ae,extensionASTNodes:Le})}case ji.Kind.UNION_TYPE_DEFINITION:{var xe;let it=[ae,...Le];return new Dn.GraphQLUnionType({name:ge,description:(xe=ae.description)===null||xe===void 0?void 0:xe.value,types:()=>Ht(it),astNode:ae,extensionASTNodes:Le})}case ji.Kind.SCALAR_TYPE_DEFINITION:{var ze;return new Dn.GraphQLScalarType({name:ge,description:(ze=ae.description)===null||ze===void 0?void 0:ze.value,specifiedByURL:BC(ae),astNode:ae,extensionASTNodes:Le})}case ji.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Ut;let it=[ae,...Le];return new Dn.GraphQLInputObjectType({name:ge,description:(Ut=ae.description)===null||Ut===void 0?void 0:Ut.value,fields:()=>kr(it),astNode:ae,extensionASTNodes:Le,isOneOf:h9(ae)})}}}}var CC=(0,N9.keyMap)([...kC.specifiedScalarTypes,...UC.introspectionTypes],e=>e.name);function sT(e){let t=(0,Sv.getDirectiveValues)(xf.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function BC(e){let t=(0,Sv.getDirectiveValues)(xf.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}function h9(e){return!!(0,Sv.getDirectiveValues)(xf.GraphQLOneOfDirective,e)}});var qC=F(uT=>{"use strict";m();T();N();Object.defineProperty(uT,"__esModule",{value:!0});uT.buildASTSchema=xC;uT.buildSchema=D9;var y9=Vr(),I9=Lt(),g9=vl(),_9=Xr(),v9=Nc(),O9=Bl(),S9=Dv();function xC(e,t){e!=null&&e.kind===I9.Kind.DOCUMENT||(0,y9.devAssert)(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,O9.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,S9.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}let i=[...r.directives,..._9.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new v9.GraphQLSchema($(k({},r),{directives:i}))}function D9(e,t){let n=(0,g9.parse)(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return xC(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}});var KC=F(Av=>{"use strict";m();T();N();Object.defineProperty(Av,"__esModule",{value:!0});Av.lexicographicSortSchema=L9;var b9=Wt(),A9=Ar(),R9=af(),VC=sf(),jr=Ct(),P9=Xr(),F9=ki(),w9=Nc();function L9(e){let t=e.toConfig(),n=(0,R9.keyValMap)(bv(t.types),I=>I.name,E);return new w9.GraphQLSchema($(k({},t),{types:Object.values(n),directives:bv(t.directives).map(o),query:a(t.query),mutation:a(t.mutation),subscription:a(t.subscription)}));function r(I){return(0,jr.isListType)(I)?new jr.GraphQLList(r(I.ofType)):(0,jr.isNonNullType)(I)?new jr.GraphQLNonNull(r(I.ofType)):i(I)}function i(I){return n[I.name]}function a(I){return I&&i(I)}function o(I){let v=I.toConfig();return new P9.GraphQLDirective($(k({},v),{locations:jC(v.locations,A=>A),args:u(v.args)}))}function u(I){return cT(I,v=>$(k({},v),{type:r(v.type)}))}function l(I){return cT(I,v=>$(k({},v),{type:r(v.type),args:v.args&&u(v.args)}))}function d(I){return cT(I,v=>$(k({},v),{type:r(v.type)}))}function p(I){return bv(I).map(i)}function E(I){if((0,jr.isScalarType)(I)||(0,F9.isIntrospectionType)(I))return I;if((0,jr.isObjectType)(I)){let v=I.toConfig();return new jr.GraphQLObjectType($(k({},v),{interfaces:()=>p(v.interfaces),fields:()=>l(v.fields)}))}if((0,jr.isInterfaceType)(I)){let v=I.toConfig();return new jr.GraphQLInterfaceType($(k({},v),{interfaces:()=>p(v.interfaces),fields:()=>l(v.fields)}))}if((0,jr.isUnionType)(I)){let v=I.toConfig();return new jr.GraphQLUnionType($(k({},v),{types:()=>p(v.types)}))}if((0,jr.isEnumType)(I)){let v=I.toConfig();return new jr.GraphQLEnumType($(k({},v),{values:cT(v.values,A=>A)}))}if((0,jr.isInputObjectType)(I)){let v=I.toConfig();return new jr.GraphQLInputObjectType($(k({},v),{fields:()=>d(v.fields)}))}(0,A9.invariant)(!1,"Unexpected type: "+(0,b9.inspect)(I))}}function cT(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(VC.naturalCompare))n[r]=t(e[r]);return n}function bv(e){return jC(e,t=>t.name)}function jC(e,t){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);return(0,VC.naturalCompare)(i,a)})}});var zC=F(qf=>{"use strict";m();T();N();Object.defineProperty(qf,"__esModule",{value:!0});qf.printIntrospectionSchema=q9;qf.printSchema=x9;qf.printType=QC;var C9=Wt(),B9=Ar(),U9=zd(),Pv=Lt(),lT=Ti(),kl=Ct(),Fv=Xr(),$C=ki(),k9=Ga(),M9=yf();function x9(e){return GC(e,t=>!(0,Fv.isSpecifiedDirective)(t),V9)}function q9(e){return GC(e,Fv.isSpecifiedDirective,$C.isIntrospectionType)}function V9(e){return!(0,k9.isSpecifiedScalarType)(e)&&!(0,$C.isIntrospectionType)(e)}function GC(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[j9(e),...r.map(a=>z9(a)),...i.map(a=>QC(a))].filter(Boolean).join(` -`)}function U9(e){if(e.description==null&&k9(e))return;let t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);let r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);let i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),Ki(e)+`schema { +`)}function j9(e){if(e.description==null&&K9(e))return;let t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);let r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);let i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),Ki(e)+`schema { ${t.join(` `)} -}`}function k9(e){let t=e.getQueryType();if(t&&t.name!=="Query")return!1;let n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;let r=e.getSubscriptionType();return!(r&&r.name!=="Subscription")}function QC(e){if((0,kl.isScalarType)(e))return M9(e);if((0,kl.isObjectType)(e))return x9(e);if((0,kl.isInterfaceType)(e))return q9(e);if((0,kl.isUnionType)(e))return V9(e);if((0,kl.isEnumType)(e))return j9(e);if((0,kl.isInputObjectType)(e))return K9(e);(0,R9.invariant)(!1,"Unexpected type: "+(0,A9.inspect)(e))}function M9(e){return Ki(e)+`scalar ${e.name}`+G9(e)}function YC(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function x9(e){return Ki(e)+`type ${e.name}`+YC(e)+JC(e)}function q9(e){return Ki(e)+`interface ${e.name}`+YC(e)+JC(e)}function V9(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return Ki(e)+"union "+e.name+n}function j9(e){let t=e.getValues().map((n,r)=>Ki(n," ",!r)+" "+n.name+Lv(n.deprecationReason));return Ki(e)+`enum ${e.name}`+wv(t)}function K9(e){let t=Object.values(e.getFields()).map((n,r)=>Ki(n," ",!r)+" "+Rv(n));return Ki(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+wv(t)}function JC(e){let t=Object.values(e.getFields()).map((n,r)=>Ki(n," ",!r)+" "+n.name+HC(n.args," ")+": "+String(n.type)+Lv(n.deprecationReason));return wv(t)}function wv(e){return e.length!==0?` { +}`}function K9(e){let t=e.getQueryType();if(t&&t.name!=="Query")return!1;let n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;let r=e.getSubscriptionType();return!(r&&r.name!=="Subscription")}function QC(e){if((0,kl.isScalarType)(e))return $9(e);if((0,kl.isObjectType)(e))return G9(e);if((0,kl.isInterfaceType)(e))return Q9(e);if((0,kl.isUnionType)(e))return Y9(e);if((0,kl.isEnumType)(e))return J9(e);if((0,kl.isInputObjectType)(e))return H9(e);(0,B9.invariant)(!1,"Unexpected type: "+(0,C9.inspect)(e))}function $9(e){return Ki(e)+`scalar ${e.name}`+W9(e)}function YC(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function G9(e){return Ki(e)+`type ${e.name}`+YC(e)+JC(e)}function Q9(e){return Ki(e)+`interface ${e.name}`+YC(e)+JC(e)}function Y9(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return Ki(e)+"union "+e.name+n}function J9(e){let t=e.getValues().map((n,r)=>Ki(n," ",!r)+" "+n.name+Lv(n.deprecationReason));return Ki(e)+`enum ${e.name}`+wv(t)}function H9(e){let t=Object.values(e.getFields()).map((n,r)=>Ki(n," ",!r)+" "+Rv(n));return Ki(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+wv(t)}function JC(e){let t=Object.values(e.getFields()).map((n,r)=>Ki(n," ",!r)+" "+n.name+HC(n.args," ")+": "+String(n.type)+Lv(n.deprecationReason));return wv(t)}function wv(e){return e.length!==0?` { `+e.join(` `)+` }`:""}function HC(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(Rv).join(", ")+")":`( `+e.map((n,r)=>Ki(n," "+t,!r)+" "+t+Rv(n)).join(` `)+` -`+t+")"}function Rv(e){let t=(0,w9.astFromValue)(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=` = ${(0,lT.print)(t)}`),n+Lv(e.deprecationReason)}function $9(e){return Ki(e)+"directive @"+e.name+HC(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Lv(e){return e==null?"":e!==Fv.DEFAULT_DEPRECATION_REASON?` @deprecated(reason: ${(0,lT.print)({kind:Pv.Kind.STRING,value:e})})`:" @deprecated"}function G9(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${(0,lT.print)({kind:Pv.Kind.STRING,value:e.specifiedByURL})})`}function Ki(e,t="",n=!0){let{description:r}=e;if(r==null)return"";let i=(0,lT.print)({kind:Pv.Kind.STRING,value:r,block:(0,P9.isPrintableAsBlockString)(r)});return(t&&!n?` +`+t+")"}function Rv(e){let t=(0,M9.astFromValue)(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=` = ${(0,lT.print)(t)}`),n+Lv(e.deprecationReason)}function z9(e){return Ki(e)+"directive @"+e.name+HC(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Lv(e){return e==null?"":e!==Fv.DEFAULT_DEPRECATION_REASON?` @deprecated(reason: ${(0,lT.print)({kind:Pv.Kind.STRING,value:e})})`:" @deprecated"}function W9(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${(0,lT.print)({kind:Pv.Kind.STRING,value:e.specifiedByURL})})`}function Ki(e,t="",n=!0){let{description:r}=e;if(r==null)return"";let i=(0,lT.print)({kind:Pv.Kind.STRING,value:r,block:(0,U9.isPrintableAsBlockString)(r)});return(t&&!n?` `+t:t)+i.replace(/\n/g,` `+t)+` -`}});var WC=w(Cv=>{"use strict";m();T();N();Object.defineProperty(Cv,"__esModule",{value:!0});Cv.concatAST=Y9;var Q9=wt();function Y9(e){let t=[];for(let n of e)t.push(...n.definitions);return{kind:Q9.Kind.DOCUMENT,definitions:t}}});var eB=w(Bv=>{"use strict";m();T();N();Object.defineProperty(Bv,"__esModule",{value:!0});Bv.separateOperations=H9;var dT=wt(),J9=cc();function H9(e){let t=[],n=Object.create(null);for(let i of e.definitions)switch(i.kind){case dT.Kind.OPERATION_DEFINITION:t.push(i);break;case dT.Kind.FRAGMENT_DEFINITION:n[i.name.value]=XC(i.selectionSet);break;default:}let r=Object.create(null);for(let i of t){let a=new Set;for(let u of XC(i.selectionSet))ZC(a,n,u);let o=i.name?i.name.value:"";r[o]={kind:dT.Kind.DOCUMENT,definitions:e.definitions.filter(u=>u===i||u.kind===dT.Kind.FRAGMENT_DEFINITION&&a.has(u.name.value))}}return r}function ZC(e,t,n){if(!e.has(n)){e.add(n);let r=t[n];if(r!==void 0)for(let i of r)ZC(e,t,i)}}function XC(e){let t=[];return(0,J9.visit)(e,{FragmentSpread(n){t.push(n.name.value)}}),t}});var rB=w(kv=>{"use strict";m();T();N();Object.defineProperty(kv,"__esModule",{value:!0});kv.stripIgnoredCharacters=W9;var z9=zd(),tB=nN(),nB=sN(),Uv=Xd();function W9(e){let t=(0,nB.isSource)(e)?e:new nB.Source(e),n=t.body,r=new tB.Lexer(t),i="",a=!1;for(;r.advance().kind!==Uv.TokenKind.EOF;){let o=r.token,u=o.kind,l=!(0,tB.isPunctuatorTokenKind)(o.kind);a&&(l||o.kind===Uv.TokenKind.SPREAD)&&(i+=" ");let d=n.slice(o.start,o.end);u===Uv.TokenKind.BLOCK_STRING?i+=(0,z9.printBlockString)(o.value,{minimize:!0}):i+=d,a=l}return i}});var aB=w(fT=>{"use strict";m();T();N();Object.defineProperty(fT,"__esModule",{value:!0});fT.assertValidName=t7;fT.isValidNameError=iB;var X9=Vr(),Z9=ze(),e7=of();function t7(e){let t=iB(e);if(t)throw t;return e}function iB(e){if(typeof e=="string"||(0,X9.devAssert)(!1,"Expected name to be a string."),e.startsWith("__"))return new Z9.GraphQLError(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{(0,e7.assertName)(e)}catch(t){return t}}});var pB=w(Wa=>{"use strict";m();T();N();Object.defineProperty(Wa,"__esModule",{value:!0});Wa.DangerousChangeType=Wa.BreakingChangeType=void 0;Wa.findBreakingChanges=o7;Wa.findDangerousChanges=u7;var n7=Wt(),dB=Ar(),sB=Nu(),r7=Ti(),Vt=Lt(),i7=Ga(),a7=yf(),s7=qg(),Mn;Wa.BreakingChangeType=Mn;(function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(Mn||(Wa.BreakingChangeType=Mn={}));var ha;Wa.DangerousChangeType=ha;(function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(ha||(Wa.DangerousChangeType=ha={}));function o7(e,t){return fB(e,t).filter(n=>n.type in Mn)}function u7(e,t){return fB(e,t).filter(n=>n.type in ha)}function fB(e,t){return[...l7(e,t),...c7(e,t)]}function c7(e,t){let n=[],r=ws(e.getDirectives(),t.getDirectives());for(let i of r.removed)n.push({type:Mn.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(let[i,a]of r.persisted){let o=ws(i.args,a.args);for(let u of o.added)(0,Vt.isRequiredArgument)(u)&&n.push({type:Mn.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${u.name} on directive ${i.name} was added.`});for(let u of o.removed)n.push({type:Mn.DIRECTIVE_ARG_REMOVED,description:`${u.name} was removed from ${i.name}.`});i.isRepeatable&&!a.isRepeatable&&n.push({type:Mn.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(let u of i.locations)a.locations.includes(u)||n.push({type:Mn.DIRECTIVE_LOCATION_REMOVED,description:`${u} was removed from ${i.name}.`})}return n}function l7(e,t){let n=[],r=ws(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(let i of r.removed)n.push({type:Mn.TYPE_REMOVED,description:(0,i7.isSpecifiedScalarType)(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(let[i,a]of r.persisted)(0,Vt.isEnumType)(i)&&(0,Vt.isEnumType)(a)?n.push(...p7(i,a)):(0,Vt.isUnionType)(i)&&(0,Vt.isUnionType)(a)?n.push(...f7(i,a)):(0,Vt.isInputObjectType)(i)&&(0,Vt.isInputObjectType)(a)?n.push(...d7(i,a)):(0,Vt.isObjectType)(i)&&(0,Vt.isObjectType)(a)?n.push(...uB(i,a),...oB(i,a)):(0,Vt.isInterfaceType)(i)&&(0,Vt.isInterfaceType)(a)?n.push(...uB(i,a),...oB(i,a)):i.constructor!==a.constructor&&n.push({type:Mn.TYPE_CHANGED_KIND,description:`${i.name} changed from ${cB(i)} to ${cB(a)}.`});return n}function d7(e,t){let n=[],r=ws(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.added)(0,Vt.isRequiredInputField)(i)?n.push({type:Mn.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:ha.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(let i of r.removed)n.push({type:Mn.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)jf(i.type,a.type)||n.push({type:Mn.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function f7(e,t){let n=[],r=ws(e.getTypes(),t.getTypes());for(let i of r.added)n.push({type:ha.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(let i of r.removed)n.push({type:Mn.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function p7(e,t){let n=[],r=ws(e.getValues(),t.getValues());for(let i of r.added)n.push({type:ha.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(let i of r.removed)n.push({type:Mn.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function oB(e,t){let n=[],r=ws(e.getInterfaces(),t.getInterfaces());for(let i of r.added)n.push({type:ha.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(let i of r.removed)n.push({type:Mn.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function uB(e,t){let n=[],r=ws(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.removed)n.push({type:Mn.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)n.push(...m7(e,i,a)),Vf(i.type,a.type)||n.push({type:Mn.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function m7(e,t,n){let r=[],i=ws(t.args,n.args);for(let a of i.removed)r.push({type:Mn.ARG_REMOVED,description:`${e.name}.${t.name} arg ${a.name} was removed.`});for(let[a,o]of i.persisted)if(!jf(a.type,o.type))r.push({type:Mn.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${a.name} has changed type from ${String(a.type)} to ${String(o.type)}.`});else if(a.defaultValue!==void 0)if(o.defaultValue===void 0)r.push({type:ha.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} defaultValue was removed.`});else{let l=lB(a.defaultValue,a.type),d=lB(o.defaultValue,o.type);l!==d&&r.push({type:ha.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} has changed defaultValue from ${l} to ${d}.`})}for(let a of i.added)(0,Vt.isRequiredArgument)(a)?r.push({type:Mn.REQUIRED_ARG_ADDED,description:`A required arg ${a.name} on ${e.name}.${t.name} was added.`}):r.push({type:ha.OPTIONAL_ARG_ADDED,description:`An optional arg ${a.name} on ${e.name}.${t.name} was added.`});return r}function Vf(e,t){return(0,Vt.isListType)(e)?(0,Vt.isListType)(t)&&Vf(e.ofType,t.ofType)||(0,Vt.isNonNullType)(t)&&Vf(e,t.ofType):(0,Vt.isNonNullType)(e)?(0,Vt.isNonNullType)(t)&&Vf(e.ofType,t.ofType):(0,Vt.isNamedType)(t)&&e.name===t.name||(0,Vt.isNonNullType)(t)&&Vf(e,t.ofType)}function jf(e,t){return(0,Vt.isListType)(e)?(0,Vt.isListType)(t)&&jf(e.ofType,t.ofType):(0,Vt.isNonNullType)(e)?(0,Vt.isNonNullType)(t)&&jf(e.ofType,t.ofType)||!(0,Vt.isNonNullType)(t)&&jf(e.ofType,t):(0,Vt.isNamedType)(t)&&e.name===t.name}function cB(e){if((0,Vt.isScalarType)(e))return"a Scalar type";if((0,Vt.isObjectType)(e))return"an Object type";if((0,Vt.isInterfaceType)(e))return"an Interface type";if((0,Vt.isUnionType)(e))return"a Union type";if((0,Vt.isEnumType)(e))return"an Enum type";if((0,Vt.isInputObjectType)(e))return"an Input type";(0,dB.invariant)(!1,"Unexpected type: "+(0,n7.inspect)(e))}function lB(e,t){let n=(0,a7.astFromValue)(e,t);return n!=null||(0,dB.invariant)(!1),(0,r7.print)((0,s7.sortValueNode)(n))}function ws(e,t){let n=[],r=[],i=[],a=(0,sB.keyMap)(e,({name:u})=>u),o=(0,sB.keyMap)(t,({name:u})=>u);for(let u of e){let l=o[u.name];l===void 0?r.push(u):i.push([u,l])}for(let u of t)a[u.name]===void 0&&n.push(u);return{added:n,persisted:i,removed:r}}});var EB=w(kt=>{"use strict";m();T();N();Object.defineProperty(kt,"__esModule",{value:!0});Object.defineProperty(kt,"BreakingChangeType",{enumerable:!0,get:function(){return pT.BreakingChangeType}});Object.defineProperty(kt,"DangerousChangeType",{enumerable:!0,get:function(){return pT.DangerousChangeType}});Object.defineProperty(kt,"TypeInfo",{enumerable:!0,get:function(){return NB.TypeInfo}});Object.defineProperty(kt,"assertValidName",{enumerable:!0,get:function(){return TB.assertValidName}});Object.defineProperty(kt,"astFromValue",{enumerable:!0,get:function(){return S7.astFromValue}});Object.defineProperty(kt,"buildASTSchema",{enumerable:!0,get:function(){return mB.buildASTSchema}});Object.defineProperty(kt,"buildClientSchema",{enumerable:!0,get:function(){return y7.buildClientSchema}});Object.defineProperty(kt,"buildSchema",{enumerable:!0,get:function(){return mB.buildSchema}});Object.defineProperty(kt,"coerceInputValue",{enumerable:!0,get:function(){return D7.coerceInputValue}});Object.defineProperty(kt,"concatAST",{enumerable:!0,get:function(){return b7.concatAST}});Object.defineProperty(kt,"doTypesOverlap",{enumerable:!0,get:function(){return xv.doTypesOverlap}});Object.defineProperty(kt,"extendSchema",{enumerable:!0,get:function(){return I7.extendSchema}});Object.defineProperty(kt,"findBreakingChanges",{enumerable:!0,get:function(){return pT.findBreakingChanges}});Object.defineProperty(kt,"findDangerousChanges",{enumerable:!0,get:function(){return pT.findDangerousChanges}});Object.defineProperty(kt,"getIntrospectionQuery",{enumerable:!0,get:function(){return N7.getIntrospectionQuery}});Object.defineProperty(kt,"getOperationAST",{enumerable:!0,get:function(){return T7.getOperationAST}});Object.defineProperty(kt,"getOperationRootType",{enumerable:!0,get:function(){return E7.getOperationRootType}});Object.defineProperty(kt,"introspectionFromSchema",{enumerable:!0,get:function(){return h7.introspectionFromSchema}});Object.defineProperty(kt,"isEqualType",{enumerable:!0,get:function(){return xv.isEqualType}});Object.defineProperty(kt,"isTypeSubTypeOf",{enumerable:!0,get:function(){return xv.isTypeSubTypeOf}});Object.defineProperty(kt,"isValidNameError",{enumerable:!0,get:function(){return TB.isValidNameError}});Object.defineProperty(kt,"lexicographicSortSchema",{enumerable:!0,get:function(){return g7.lexicographicSortSchema}});Object.defineProperty(kt,"printIntrospectionSchema",{enumerable:!0,get:function(){return Mv.printIntrospectionSchema}});Object.defineProperty(kt,"printSchema",{enumerable:!0,get:function(){return Mv.printSchema}});Object.defineProperty(kt,"printType",{enumerable:!0,get:function(){return Mv.printType}});Object.defineProperty(kt,"separateOperations",{enumerable:!0,get:function(){return A7.separateOperations}});Object.defineProperty(kt,"stripIgnoredCharacters",{enumerable:!0,get:function(){return R7.stripIgnoredCharacters}});Object.defineProperty(kt,"typeFromAST",{enumerable:!0,get:function(){return _7.typeFromAST}});Object.defineProperty(kt,"valueFromAST",{enumerable:!0,get:function(){return v7.valueFromAST}});Object.defineProperty(kt,"valueFromASTUntyped",{enumerable:!0,get:function(){return O7.valueFromASTUntyped}});Object.defineProperty(kt,"visitWithTypeInfo",{enumerable:!0,get:function(){return NB.visitWithTypeInfo}});var N7=Iv(),T7=DC(),E7=bC(),h7=AC(),y7=PC(),mB=qC(),I7=Dv(),g7=KC(),Mv=zC(),_7=Qa(),v7=Rf(),O7=UI(),S7=yf(),NB=CN(),D7=s_(),b7=WC(),A7=eB(),R7=rB(),xv=ff(),TB=aB(),pT=pB()});var Ie=w(q=>{"use strict";m();T();N();Object.defineProperty(q,"__esModule",{value:!0});Object.defineProperty(q,"BREAK",{enumerable:!0,get:function(){return Yt.BREAK}});Object.defineProperty(q,"BreakingChangeType",{enumerable:!0,get:function(){return Jt.BreakingChangeType}});Object.defineProperty(q,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return ye.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(q,"DangerousChangeType",{enumerable:!0,get:function(){return Jt.DangerousChangeType}});Object.defineProperty(q,"DirectiveLocation",{enumerable:!0,get:function(){return Yt.DirectiveLocation}});Object.defineProperty(q,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return ht.ExecutableDefinitionsRule}});Object.defineProperty(q,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return ht.FieldsOnCorrectTypeRule}});Object.defineProperty(q,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return ht.FragmentsOnCompositeTypesRule}});Object.defineProperty(q,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return ye.GRAPHQL_MAX_INT}});Object.defineProperty(q,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return ye.GRAPHQL_MIN_INT}});Object.defineProperty(q,"GraphQLBoolean",{enumerable:!0,get:function(){return ye.GraphQLBoolean}});Object.defineProperty(q,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return ye.GraphQLDeprecatedDirective}});Object.defineProperty(q,"GraphQLDirective",{enumerable:!0,get:function(){return ye.GraphQLDirective}});Object.defineProperty(q,"GraphQLEnumType",{enumerable:!0,get:function(){return ye.GraphQLEnumType}});Object.defineProperty(q,"GraphQLError",{enumerable:!0,get:function(){return Kf.GraphQLError}});Object.defineProperty(q,"GraphQLFloat",{enumerable:!0,get:function(){return ye.GraphQLFloat}});Object.defineProperty(q,"GraphQLID",{enumerable:!0,get:function(){return ye.GraphQLID}});Object.defineProperty(q,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return ye.GraphQLIncludeDirective}});Object.defineProperty(q,"GraphQLInputObjectType",{enumerable:!0,get:function(){return ye.GraphQLInputObjectType}});Object.defineProperty(q,"GraphQLInt",{enumerable:!0,get:function(){return ye.GraphQLInt}});Object.defineProperty(q,"GraphQLInterfaceType",{enumerable:!0,get:function(){return ye.GraphQLInterfaceType}});Object.defineProperty(q,"GraphQLList",{enumerable:!0,get:function(){return ye.GraphQLList}});Object.defineProperty(q,"GraphQLNonNull",{enumerable:!0,get:function(){return ye.GraphQLNonNull}});Object.defineProperty(q,"GraphQLObjectType",{enumerable:!0,get:function(){return ye.GraphQLObjectType}});Object.defineProperty(q,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return ye.GraphQLOneOfDirective}});Object.defineProperty(q,"GraphQLScalarType",{enumerable:!0,get:function(){return ye.GraphQLScalarType}});Object.defineProperty(q,"GraphQLSchema",{enumerable:!0,get:function(){return ye.GraphQLSchema}});Object.defineProperty(q,"GraphQLSkipDirective",{enumerable:!0,get:function(){return ye.GraphQLSkipDirective}});Object.defineProperty(q,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return ye.GraphQLSpecifiedByDirective}});Object.defineProperty(q,"GraphQLString",{enumerable:!0,get:function(){return ye.GraphQLString}});Object.defineProperty(q,"GraphQLUnionType",{enumerable:!0,get:function(){return ye.GraphQLUnionType}});Object.defineProperty(q,"Kind",{enumerable:!0,get:function(){return Yt.Kind}});Object.defineProperty(q,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return ht.KnownArgumentNamesRule}});Object.defineProperty(q,"KnownDirectivesRule",{enumerable:!0,get:function(){return ht.KnownDirectivesRule}});Object.defineProperty(q,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return ht.KnownFragmentNamesRule}});Object.defineProperty(q,"KnownTypeNamesRule",{enumerable:!0,get:function(){return ht.KnownTypeNamesRule}});Object.defineProperty(q,"Lexer",{enumerable:!0,get:function(){return Yt.Lexer}});Object.defineProperty(q,"Location",{enumerable:!0,get:function(){return Yt.Location}});Object.defineProperty(q,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return ht.LoneAnonymousOperationRule}});Object.defineProperty(q,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return ht.LoneSchemaDefinitionRule}});Object.defineProperty(q,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return ht.MaxIntrospectionDepthRule}});Object.defineProperty(q,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return ht.NoDeprecatedCustomRule}});Object.defineProperty(q,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return ht.NoFragmentCyclesRule}});Object.defineProperty(q,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return ht.NoSchemaIntrospectionCustomRule}});Object.defineProperty(q,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return ht.NoUndefinedVariablesRule}});Object.defineProperty(q,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return ht.NoUnusedFragmentsRule}});Object.defineProperty(q,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return ht.NoUnusedVariablesRule}});Object.defineProperty(q,"OperationTypeNode",{enumerable:!0,get:function(){return Yt.OperationTypeNode}});Object.defineProperty(q,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return ht.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(q,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return ht.PossibleFragmentSpreadsRule}});Object.defineProperty(q,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return ht.PossibleTypeExtensionsRule}});Object.defineProperty(q,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return ht.ProvidedRequiredArgumentsRule}});Object.defineProperty(q,"ScalarLeafsRule",{enumerable:!0,get:function(){return ht.ScalarLeafsRule}});Object.defineProperty(q,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ye.SchemaMetaFieldDef}});Object.defineProperty(q,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return ht.SingleFieldSubscriptionsRule}});Object.defineProperty(q,"Source",{enumerable:!0,get:function(){return Yt.Source}});Object.defineProperty(q,"Token",{enumerable:!0,get:function(){return Yt.Token}});Object.defineProperty(q,"TokenKind",{enumerable:!0,get:function(){return Yt.TokenKind}});Object.defineProperty(q,"TypeInfo",{enumerable:!0,get:function(){return Jt.TypeInfo}});Object.defineProperty(q,"TypeKind",{enumerable:!0,get:function(){return ye.TypeKind}});Object.defineProperty(q,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ye.TypeMetaFieldDef}});Object.defineProperty(q,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ye.TypeNameMetaFieldDef}});Object.defineProperty(q,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return ht.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(q,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return ht.UniqueArgumentNamesRule}});Object.defineProperty(q,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return ht.UniqueDirectiveNamesRule}});Object.defineProperty(q,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return ht.UniqueDirectivesPerLocationRule}});Object.defineProperty(q,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return ht.UniqueEnumValueNamesRule}});Object.defineProperty(q,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return ht.UniqueFieldDefinitionNamesRule}});Object.defineProperty(q,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return ht.UniqueFragmentNamesRule}});Object.defineProperty(q,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return ht.UniqueInputFieldNamesRule}});Object.defineProperty(q,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return ht.UniqueOperationNamesRule}});Object.defineProperty(q,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return ht.UniqueOperationTypesRule}});Object.defineProperty(q,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return ht.UniqueTypeNamesRule}});Object.defineProperty(q,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return ht.UniqueVariableNamesRule}});Object.defineProperty(q,"ValidationContext",{enumerable:!0,get:function(){return ht.ValidationContext}});Object.defineProperty(q,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return ht.ValuesOfCorrectTypeRule}});Object.defineProperty(q,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return ht.VariablesAreInputTypesRule}});Object.defineProperty(q,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return ht.VariablesInAllowedPositionRule}});Object.defineProperty(q,"__Directive",{enumerable:!0,get:function(){return ye.__Directive}});Object.defineProperty(q,"__DirectiveLocation",{enumerable:!0,get:function(){return ye.__DirectiveLocation}});Object.defineProperty(q,"__EnumValue",{enumerable:!0,get:function(){return ye.__EnumValue}});Object.defineProperty(q,"__Field",{enumerable:!0,get:function(){return ye.__Field}});Object.defineProperty(q,"__InputValue",{enumerable:!0,get:function(){return ye.__InputValue}});Object.defineProperty(q,"__Schema",{enumerable:!0,get:function(){return ye.__Schema}});Object.defineProperty(q,"__Type",{enumerable:!0,get:function(){return ye.__Type}});Object.defineProperty(q,"__TypeKind",{enumerable:!0,get:function(){return ye.__TypeKind}});Object.defineProperty(q,"assertAbstractType",{enumerable:!0,get:function(){return ye.assertAbstractType}});Object.defineProperty(q,"assertCompositeType",{enumerable:!0,get:function(){return ye.assertCompositeType}});Object.defineProperty(q,"assertDirective",{enumerable:!0,get:function(){return ye.assertDirective}});Object.defineProperty(q,"assertEnumType",{enumerable:!0,get:function(){return ye.assertEnumType}});Object.defineProperty(q,"assertEnumValueName",{enumerable:!0,get:function(){return ye.assertEnumValueName}});Object.defineProperty(q,"assertInputObjectType",{enumerable:!0,get:function(){return ye.assertInputObjectType}});Object.defineProperty(q,"assertInputType",{enumerable:!0,get:function(){return ye.assertInputType}});Object.defineProperty(q,"assertInterfaceType",{enumerable:!0,get:function(){return ye.assertInterfaceType}});Object.defineProperty(q,"assertLeafType",{enumerable:!0,get:function(){return ye.assertLeafType}});Object.defineProperty(q,"assertListType",{enumerable:!0,get:function(){return ye.assertListType}});Object.defineProperty(q,"assertName",{enumerable:!0,get:function(){return ye.assertName}});Object.defineProperty(q,"assertNamedType",{enumerable:!0,get:function(){return ye.assertNamedType}});Object.defineProperty(q,"assertNonNullType",{enumerable:!0,get:function(){return ye.assertNonNullType}});Object.defineProperty(q,"assertNullableType",{enumerable:!0,get:function(){return ye.assertNullableType}});Object.defineProperty(q,"assertObjectType",{enumerable:!0,get:function(){return ye.assertObjectType}});Object.defineProperty(q,"assertOutputType",{enumerable:!0,get:function(){return ye.assertOutputType}});Object.defineProperty(q,"assertScalarType",{enumerable:!0,get:function(){return ye.assertScalarType}});Object.defineProperty(q,"assertSchema",{enumerable:!0,get:function(){return ye.assertSchema}});Object.defineProperty(q,"assertType",{enumerable:!0,get:function(){return ye.assertType}});Object.defineProperty(q,"assertUnionType",{enumerable:!0,get:function(){return ye.assertUnionType}});Object.defineProperty(q,"assertValidName",{enumerable:!0,get:function(){return Jt.assertValidName}});Object.defineProperty(q,"assertValidSchema",{enumerable:!0,get:function(){return ye.assertValidSchema}});Object.defineProperty(q,"assertWrappingType",{enumerable:!0,get:function(){return ye.assertWrappingType}});Object.defineProperty(q,"astFromValue",{enumerable:!0,get:function(){return Jt.astFromValue}});Object.defineProperty(q,"buildASTSchema",{enumerable:!0,get:function(){return Jt.buildASTSchema}});Object.defineProperty(q,"buildClientSchema",{enumerable:!0,get:function(){return Jt.buildClientSchema}});Object.defineProperty(q,"buildSchema",{enumerable:!0,get:function(){return Jt.buildSchema}});Object.defineProperty(q,"coerceInputValue",{enumerable:!0,get:function(){return Jt.coerceInputValue}});Object.defineProperty(q,"concatAST",{enumerable:!0,get:function(){return Jt.concatAST}});Object.defineProperty(q,"createSourceEventStream",{enumerable:!0,get:function(){return Xa.createSourceEventStream}});Object.defineProperty(q,"defaultFieldResolver",{enumerable:!0,get:function(){return Xa.defaultFieldResolver}});Object.defineProperty(q,"defaultTypeResolver",{enumerable:!0,get:function(){return Xa.defaultTypeResolver}});Object.defineProperty(q,"doTypesOverlap",{enumerable:!0,get:function(){return Jt.doTypesOverlap}});Object.defineProperty(q,"execute",{enumerable:!0,get:function(){return Xa.execute}});Object.defineProperty(q,"executeSync",{enumerable:!0,get:function(){return Xa.executeSync}});Object.defineProperty(q,"extendSchema",{enumerable:!0,get:function(){return Jt.extendSchema}});Object.defineProperty(q,"findBreakingChanges",{enumerable:!0,get:function(){return Jt.findBreakingChanges}});Object.defineProperty(q,"findDangerousChanges",{enumerable:!0,get:function(){return Jt.findDangerousChanges}});Object.defineProperty(q,"formatError",{enumerable:!0,get:function(){return Kf.formatError}});Object.defineProperty(q,"getArgumentValues",{enumerable:!0,get:function(){return Xa.getArgumentValues}});Object.defineProperty(q,"getDirectiveValues",{enumerable:!0,get:function(){return Xa.getDirectiveValues}});Object.defineProperty(q,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Yt.getEnterLeaveForKind}});Object.defineProperty(q,"getIntrospectionQuery",{enumerable:!0,get:function(){return Jt.getIntrospectionQuery}});Object.defineProperty(q,"getLocation",{enumerable:!0,get:function(){return Yt.getLocation}});Object.defineProperty(q,"getNamedType",{enumerable:!0,get:function(){return ye.getNamedType}});Object.defineProperty(q,"getNullableType",{enumerable:!0,get:function(){return ye.getNullableType}});Object.defineProperty(q,"getOperationAST",{enumerable:!0,get:function(){return Jt.getOperationAST}});Object.defineProperty(q,"getOperationRootType",{enumerable:!0,get:function(){return Jt.getOperationRootType}});Object.defineProperty(q,"getVariableValues",{enumerable:!0,get:function(){return Xa.getVariableValues}});Object.defineProperty(q,"getVisitFn",{enumerable:!0,get:function(){return Yt.getVisitFn}});Object.defineProperty(q,"graphql",{enumerable:!0,get:function(){return yB.graphql}});Object.defineProperty(q,"graphqlSync",{enumerable:!0,get:function(){return yB.graphqlSync}});Object.defineProperty(q,"introspectionFromSchema",{enumerable:!0,get:function(){return Jt.introspectionFromSchema}});Object.defineProperty(q,"introspectionTypes",{enumerable:!0,get:function(){return ye.introspectionTypes}});Object.defineProperty(q,"isAbstractType",{enumerable:!0,get:function(){return ye.isAbstractType}});Object.defineProperty(q,"isCompositeType",{enumerable:!0,get:function(){return ye.isCompositeType}});Object.defineProperty(q,"isConstValueNode",{enumerable:!0,get:function(){return Yt.isConstValueNode}});Object.defineProperty(q,"isDefinitionNode",{enumerable:!0,get:function(){return Yt.isDefinitionNode}});Object.defineProperty(q,"isDirective",{enumerable:!0,get:function(){return ye.isDirective}});Object.defineProperty(q,"isEnumType",{enumerable:!0,get:function(){return ye.isEnumType}});Object.defineProperty(q,"isEqualType",{enumerable:!0,get:function(){return Jt.isEqualType}});Object.defineProperty(q,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Yt.isExecutableDefinitionNode}});Object.defineProperty(q,"isInputObjectType",{enumerable:!0,get:function(){return ye.isInputObjectType}});Object.defineProperty(q,"isInputType",{enumerable:!0,get:function(){return ye.isInputType}});Object.defineProperty(q,"isInterfaceType",{enumerable:!0,get:function(){return ye.isInterfaceType}});Object.defineProperty(q,"isIntrospectionType",{enumerable:!0,get:function(){return ye.isIntrospectionType}});Object.defineProperty(q,"isLeafType",{enumerable:!0,get:function(){return ye.isLeafType}});Object.defineProperty(q,"isListType",{enumerable:!0,get:function(){return ye.isListType}});Object.defineProperty(q,"isNamedType",{enumerable:!0,get:function(){return ye.isNamedType}});Object.defineProperty(q,"isNonNullType",{enumerable:!0,get:function(){return ye.isNonNullType}});Object.defineProperty(q,"isNullableType",{enumerable:!0,get:function(){return ye.isNullableType}});Object.defineProperty(q,"isObjectType",{enumerable:!0,get:function(){return ye.isObjectType}});Object.defineProperty(q,"isOutputType",{enumerable:!0,get:function(){return ye.isOutputType}});Object.defineProperty(q,"isRequiredArgument",{enumerable:!0,get:function(){return ye.isRequiredArgument}});Object.defineProperty(q,"isRequiredInputField",{enumerable:!0,get:function(){return ye.isRequiredInputField}});Object.defineProperty(q,"isScalarType",{enumerable:!0,get:function(){return ye.isScalarType}});Object.defineProperty(q,"isSchema",{enumerable:!0,get:function(){return ye.isSchema}});Object.defineProperty(q,"isSelectionNode",{enumerable:!0,get:function(){return Yt.isSelectionNode}});Object.defineProperty(q,"isSpecifiedDirective",{enumerable:!0,get:function(){return ye.isSpecifiedDirective}});Object.defineProperty(q,"isSpecifiedScalarType",{enumerable:!0,get:function(){return ye.isSpecifiedScalarType}});Object.defineProperty(q,"isType",{enumerable:!0,get:function(){return ye.isType}});Object.defineProperty(q,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Yt.isTypeDefinitionNode}});Object.defineProperty(q,"isTypeExtensionNode",{enumerable:!0,get:function(){return Yt.isTypeExtensionNode}});Object.defineProperty(q,"isTypeNode",{enumerable:!0,get:function(){return Yt.isTypeNode}});Object.defineProperty(q,"isTypeSubTypeOf",{enumerable:!0,get:function(){return Jt.isTypeSubTypeOf}});Object.defineProperty(q,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Yt.isTypeSystemDefinitionNode}});Object.defineProperty(q,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Yt.isTypeSystemExtensionNode}});Object.defineProperty(q,"isUnionType",{enumerable:!0,get:function(){return ye.isUnionType}});Object.defineProperty(q,"isValidNameError",{enumerable:!0,get:function(){return Jt.isValidNameError}});Object.defineProperty(q,"isValueNode",{enumerable:!0,get:function(){return Yt.isValueNode}});Object.defineProperty(q,"isWrappingType",{enumerable:!0,get:function(){return ye.isWrappingType}});Object.defineProperty(q,"lexicographicSortSchema",{enumerable:!0,get:function(){return Jt.lexicographicSortSchema}});Object.defineProperty(q,"locatedError",{enumerable:!0,get:function(){return Kf.locatedError}});Object.defineProperty(q,"parse",{enumerable:!0,get:function(){return Yt.parse}});Object.defineProperty(q,"parseConstValue",{enumerable:!0,get:function(){return Yt.parseConstValue}});Object.defineProperty(q,"parseType",{enumerable:!0,get:function(){return Yt.parseType}});Object.defineProperty(q,"parseValue",{enumerable:!0,get:function(){return Yt.parseValue}});Object.defineProperty(q,"print",{enumerable:!0,get:function(){return Yt.print}});Object.defineProperty(q,"printError",{enumerable:!0,get:function(){return Kf.printError}});Object.defineProperty(q,"printIntrospectionSchema",{enumerable:!0,get:function(){return Jt.printIntrospectionSchema}});Object.defineProperty(q,"printLocation",{enumerable:!0,get:function(){return Yt.printLocation}});Object.defineProperty(q,"printSchema",{enumerable:!0,get:function(){return Jt.printSchema}});Object.defineProperty(q,"printSourceLocation",{enumerable:!0,get:function(){return Yt.printSourceLocation}});Object.defineProperty(q,"printType",{enumerable:!0,get:function(){return Jt.printType}});Object.defineProperty(q,"recommendedRules",{enumerable:!0,get:function(){return ht.recommendedRules}});Object.defineProperty(q,"resolveObjMapThunk",{enumerable:!0,get:function(){return ye.resolveObjMapThunk}});Object.defineProperty(q,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return ye.resolveReadonlyArrayThunk}});Object.defineProperty(q,"responsePathAsArray",{enumerable:!0,get:function(){return Xa.responsePathAsArray}});Object.defineProperty(q,"separateOperations",{enumerable:!0,get:function(){return Jt.separateOperations}});Object.defineProperty(q,"specifiedDirectives",{enumerable:!0,get:function(){return ye.specifiedDirectives}});Object.defineProperty(q,"specifiedRules",{enumerable:!0,get:function(){return ht.specifiedRules}});Object.defineProperty(q,"specifiedScalarTypes",{enumerable:!0,get:function(){return ye.specifiedScalarTypes}});Object.defineProperty(q,"stripIgnoredCharacters",{enumerable:!0,get:function(){return Jt.stripIgnoredCharacters}});Object.defineProperty(q,"subscribe",{enumerable:!0,get:function(){return Xa.subscribe}});Object.defineProperty(q,"syntaxError",{enumerable:!0,get:function(){return Kf.syntaxError}});Object.defineProperty(q,"typeFromAST",{enumerable:!0,get:function(){return Jt.typeFromAST}});Object.defineProperty(q,"validate",{enumerable:!0,get:function(){return ht.validate}});Object.defineProperty(q,"validateSchema",{enumerable:!0,get:function(){return ye.validateSchema}});Object.defineProperty(q,"valueFromAST",{enumerable:!0,get:function(){return Jt.valueFromAST}});Object.defineProperty(q,"valueFromASTUntyped",{enumerable:!0,get:function(){return Jt.valueFromASTUntyped}});Object.defineProperty(q,"version",{enumerable:!0,get:function(){return hB.version}});Object.defineProperty(q,"versionInfo",{enumerable:!0,get:function(){return hB.versionInfo}});Object.defineProperty(q,"visit",{enumerable:!0,get:function(){return Yt.visit}});Object.defineProperty(q,"visitInParallel",{enumerable:!0,get:function(){return Yt.visitInParallel}});Object.defineProperty(q,"visitWithTypeInfo",{enumerable:!0,get:function(){return Jt.visitWithTypeInfo}});var hB=pF(),yB=oC(),ye=lC(),Yt=fC(),Xa=IC(),ht=OC(),Kf=SC(),Jt=EB()});var zn=w(R=>{"use strict";m();T();N();Object.defineProperty(R,"__esModule",{value:!0});R.FIELD_UPPER=R.FIELD_PATH=R.FIELD=R.EXTENSIONS=R.EXTENDS=R.EXTERNAL=R.EXECUTION=R.ENUM_VALUE_UPPER=R.ENUM_VALUE=R.ENUM_UPPER=R.ENUM=R.ENTITY_UNION=R.ENTITIES_FIELD=R.ENTITIES=R.EDFS_REDIS_SUBSCRIBE=R.EDFS_REDIS_PUBLISH=R.EDFS_NATS_STREAM_CONFIGURATION=R.EDFS_PUBLISH_RESULT=R.EDFS_NATS_SUBSCRIBE=R.EDFS_NATS_REQUEST=R.EDFS_NATS_PUBLISH=R.EDFS_KAFKA_SUBSCRIBE=R.EDFS_KAFKA_PUBLISH=R.DIRECTIVE_DEFINITION=R.DESCRIPTION_OVERRIDE=R.DEPRECATED_DEFAULT_ARGUMENT_VALUE=R.DEPRECATED=R.DEFAULT_SUBSCRIPTION=R.DEFAULT_QUERY=R.DEFAULT_MUTATION=R.DEFAULT_EDFS_PROVIDER_ID=R.DEFAULT=R.CONTEXT=R.CONNECT_FIELD_RESOLVER=R.CONSUMER_NAME=R.CONSUMER_INACTIVE_THRESHOLD=R.CONFIGURE_CHILD_DESCRIPTIONS=R.CONFIGURE_DESCRIPTION=R.CONDITION=R.COMPOSE_DIRECTIVE=R.CHANNELS=R.CHANNEL=R.BOOLEAN_SCALAR=R.BOOLEAN=R.ARGUMENT_DEFINITION_UPPER=R.AUTHENTICATED=R.ARGUMENT=R.ANY_SCALAR=R.AND_UPPER=R.AS=void 0;R.NOT_UPPER=R.NON_NULLABLE_STRING=R.NON_NULLABLE_INT=R.NON_NULLABLE_BOOLEAN=R.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT=R.NAME=R.NOT_APPLICABLE=R.PROVIDER_TYPE_REDIS=R.PROVIDER_TYPE_NATS=R.PROVIDER_TYPE_KAFKA=R.PROPAGATE=R.MUTATION_UPPER=R.MUTATION=R.NUMBER=R.LITERAL_PERIOD=R.LITERAL_NEW_LINE=R.LITERAL_SPACE=R.LIST=R.LINK_PURPOSE=R.LINK_IMPORT=R.LINK=R.LEVELS=R.LEFT_PARENTHESIS=R.KEY=R.INTERFACE_OBJECT=R.INTERFACE_UPPER=R.INTERFACE=R.INT_SCALAR=R.INPUT_VALUE=R.INPUT_OBJECT_UPPER=R.INPUT_OBJECT=R.INPUT_FIELD_DEFINITION_UPPER=R.INPUT_FIELD=R.INPUT=R.INLINE_FRAGMENT_UPPER=R.INLINE_FRAGMENT=R.INACCESSIBLE=R.IN_UPPER=R.IMPORT=R.ID_SCALAR=R.HYPHEN_JOIN=R.FROM=R.FRAGMENT_SPREAD_UPPER=R.FRAGMENT_DEFINITION_UPPER=R.FOR=R.FLOAT_SCALAR=R.FIRST_ORDINAL=R.FIELD_DEFINITION_UPPER=R.FIELDS=R.FIELD_SET_SCALAR=void 0;R.TAG=R.SUCCESS=R.SUBSCRIPTION_UPPER=R.SUBSCRIBE=R.SUBSCRIPTION_FILTER_VALUE=R.SUBSCRIPTION_FILTER_CONDITION=R.SUBSCRIPTION_FILTER=R.SUBSCRIPTION_FIELD_CONDITION=R.SUBSCRIPTION=R.SUBJECTS=R.SUBJECT=R.STRING_SCALAR=R.STRING=R.STREAM_NAME=R.STREAM_CONFIGURATION=R.SPECIFIED_BY=R.SHAREABLE=R.SERVICE_FIELD=R.SERVICE_OBJECT=R.SEMANTIC_NON_NULL=R.SELECTION_REPRESENTATION=R.SECURITY=R.SCOPE_SCALAR=R.SCOPES=R.SCHEMA_UPPER=R.SCHEMA=R.SCALAR_UPPER=R.SCALAR=R.RESOLVABLE=R.REQUIRES_SCOPES=R.REQUIRES=R.REQUIRE_FETCH_REASONS=R.REQUEST=R.REASON=R.QUOTATION_JOIN=R.QUERY_UPPER=R.QUERY=R.PUBLISH=R.PROVIDES=R.PROVIDER_ID=R.PARENT_EXTENSION_DATA_MAP=R.PARENT_DEFINITION_DATA_MAP=R.PARENT_DEFINITION_DATA=R.OVERRIDE=R.OR_UPPER=R.OBJECT_UPPER=R.OBJECT=R.OPERATION_TO_DEFAULT=R.ONE_OF=R.NULL=void 0;R.NON_REPEATABLE_PERSISTED_DIRECTIVES=R.OUTPUT_NODE_KINDS=R.INPUT_NODE_KINDS=R.IGNORED_FIELDS=R.INHERITABLE_DIRECTIVE_NAMES=R.PERSISTED_CLIENT_DIRECTIVES=R.AUTHORIZATION_DIRECTIVES=R.ROOT_TYPE_NAMES=R.EXECUTABLE_DIRECTIVE_LOCATIONS=R.VARIABLE_DEFINITION_UPPER=R.VALUES=R.URL_LOWER=R.UNION_UPPER=R.UNION=R.TYPENAME=R.TOPICS=R.TOPIC=void 0;var vu=Ie();R.AS="as";R.AND_UPPER="AND";R.ANY_SCALAR="_Any";R.ARGUMENT="argument";R.AUTHENTICATED="authenticated";R.ARGUMENT_DEFINITION_UPPER="ARGUMENT_DEFINITION";R.BOOLEAN="boolean";R.BOOLEAN_SCALAR="Boolean";R.CHANNEL="channel";R.CHANNELS="channels";R.COMPOSE_DIRECTIVE="composeDirective";R.CONDITION="condition";R.CONFIGURE_DESCRIPTION="openfed__configureDescription";R.CONFIGURE_CHILD_DESCRIPTIONS="openfed__configureChildDescriptions";R.CONSUMER_INACTIVE_THRESHOLD="consumerInactiveThreshold";R.CONSUMER_NAME="consumerName";R.CONNECT_FIELD_RESOLVER="connect__fieldResolver";R.CONTEXT="context";R.DEFAULT="default";R.DEFAULT_EDFS_PROVIDER_ID="default";R.DEFAULT_MUTATION="Mutation";R.DEFAULT_QUERY="Query";R.DEFAULT_SUBSCRIPTION="Subscription";R.DEPRECATED="deprecated";R.DEPRECATED_DEFAULT_ARGUMENT_VALUE="No longer supported";R.DESCRIPTION_OVERRIDE="descriptionOverride";R.DIRECTIVE_DEFINITION="directive definition";R.EDFS_KAFKA_PUBLISH="edfs__kafkaPublish";R.EDFS_KAFKA_SUBSCRIBE="edfs__kafkaSubscribe";R.EDFS_NATS_PUBLISH="edfs__natsPublish";R.EDFS_NATS_REQUEST="edfs__natsRequest";R.EDFS_NATS_SUBSCRIBE="edfs__natsSubscribe";R.EDFS_PUBLISH_RESULT="edfs__PublishResult";R.EDFS_NATS_STREAM_CONFIGURATION="edfs__NatsStreamConfiguration";R.EDFS_REDIS_PUBLISH="edfs__redisPublish";R.EDFS_REDIS_SUBSCRIBE="edfs__redisSubscribe";R.ENTITIES="entities";R.ENTITIES_FIELD="_entities";R.ENTITY_UNION="_Entity";R.ENUM="Enum";R.ENUM_UPPER="ENUM";R.ENUM_VALUE="Enum Value";R.ENUM_VALUE_UPPER="ENUM_VALUE";R.EXECUTION="EXECUTION";R.EXTERNAL="external";R.EXTENDS="extends";R.EXTENSIONS="extensions";R.FIELD="field";R.FIELD_PATH="fieldPath";R.FIELD_UPPER="FIELD";R.FIELD_SET_SCALAR="openfed__FieldSet";R.FIELDS="fields";R.FIELD_DEFINITION_UPPER="FIELD_DEFINITION";R.FIRST_ORDINAL="1st";R.FLOAT_SCALAR="Float";R.FOR="for";R.FRAGMENT_DEFINITION_UPPER="FRAGMENT_DEFINITION";R.FRAGMENT_SPREAD_UPPER="FRAGMENT_SPREAD";R.FROM="from";R.HYPHEN_JOIN=` +`}});var WC=F(Cv=>{"use strict";m();T();N();Object.defineProperty(Cv,"__esModule",{value:!0});Cv.concatAST=Z9;var X9=Lt();function Z9(e){let t=[];for(let n of e)t.push(...n.definitions);return{kind:X9.Kind.DOCUMENT,definitions:t}}});var eB=F(Bv=>{"use strict";m();T();N();Object.defineProperty(Bv,"__esModule",{value:!0});Bv.separateOperations=t7;var dT=Lt(),e7=cc();function t7(e){let t=[],n=Object.create(null);for(let i of e.definitions)switch(i.kind){case dT.Kind.OPERATION_DEFINITION:t.push(i);break;case dT.Kind.FRAGMENT_DEFINITION:n[i.name.value]=XC(i.selectionSet);break;default:}let r=Object.create(null);for(let i of t){let a=new Set;for(let u of XC(i.selectionSet))ZC(a,n,u);let o=i.name?i.name.value:"";r[o]={kind:dT.Kind.DOCUMENT,definitions:e.definitions.filter(u=>u===i||u.kind===dT.Kind.FRAGMENT_DEFINITION&&a.has(u.name.value))}}return r}function ZC(e,t,n){if(!e.has(n)){e.add(n);let r=t[n];if(r!==void 0)for(let i of r)ZC(e,t,i)}}function XC(e){let t=[];return(0,e7.visit)(e,{FragmentSpread(n){t.push(n.name.value)}}),t}});var rB=F(kv=>{"use strict";m();T();N();Object.defineProperty(kv,"__esModule",{value:!0});kv.stripIgnoredCharacters=r7;var n7=zd(),tB=nN(),nB=sN(),Uv=Xd();function r7(e){let t=(0,nB.isSource)(e)?e:new nB.Source(e),n=t.body,r=new tB.Lexer(t),i="",a=!1;for(;r.advance().kind!==Uv.TokenKind.EOF;){let o=r.token,u=o.kind,l=!(0,tB.isPunctuatorTokenKind)(o.kind);a&&(l||o.kind===Uv.TokenKind.SPREAD)&&(i+=" ");let d=n.slice(o.start,o.end);u===Uv.TokenKind.BLOCK_STRING?i+=(0,n7.printBlockString)(o.value,{minimize:!0}):i+=d,a=l}return i}});var aB=F(fT=>{"use strict";m();T();N();Object.defineProperty(fT,"__esModule",{value:!0});fT.assertValidName=o7;fT.isValidNameError=iB;var i7=Vr(),a7=Xe(),s7=of();function o7(e){let t=iB(e);if(t)throw t;return e}function iB(e){if(typeof e=="string"||(0,i7.devAssert)(!1,"Expected name to be a string."),e.startsWith("__"))return new a7.GraphQLError(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{(0,s7.assertName)(e)}catch(t){return t}}});var pB=F(Wa=>{"use strict";m();T();N();Object.defineProperty(Wa,"__esModule",{value:!0});Wa.DangerousChangeType=Wa.BreakingChangeType=void 0;Wa.findBreakingChanges=p7;Wa.findDangerousChanges=m7;var u7=Wt(),dB=Ar(),sB=Nu(),c7=Ti(),Vt=Ct(),l7=Ga(),d7=yf(),f7=qg(),Mn;Wa.BreakingChangeType=Mn;(function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(Mn||(Wa.BreakingChangeType=Mn={}));var ha;Wa.DangerousChangeType=ha;(function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(ha||(Wa.DangerousChangeType=ha={}));function p7(e,t){return fB(e,t).filter(n=>n.type in Mn)}function m7(e,t){return fB(e,t).filter(n=>n.type in ha)}function fB(e,t){return[...T7(e,t),...N7(e,t)]}function N7(e,t){let n=[],r=ws(e.getDirectives(),t.getDirectives());for(let i of r.removed)n.push({type:Mn.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(let[i,a]of r.persisted){let o=ws(i.args,a.args);for(let u of o.added)(0,Vt.isRequiredArgument)(u)&&n.push({type:Mn.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${u.name} on directive ${i.name} was added.`});for(let u of o.removed)n.push({type:Mn.DIRECTIVE_ARG_REMOVED,description:`${u.name} was removed from ${i.name}.`});i.isRepeatable&&!a.isRepeatable&&n.push({type:Mn.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(let u of i.locations)a.locations.includes(u)||n.push({type:Mn.DIRECTIVE_LOCATION_REMOVED,description:`${u} was removed from ${i.name}.`})}return n}function T7(e,t){let n=[],r=ws(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(let i of r.removed)n.push({type:Mn.TYPE_REMOVED,description:(0,l7.isSpecifiedScalarType)(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(let[i,a]of r.persisted)(0,Vt.isEnumType)(i)&&(0,Vt.isEnumType)(a)?n.push(...y7(i,a)):(0,Vt.isUnionType)(i)&&(0,Vt.isUnionType)(a)?n.push(...h7(i,a)):(0,Vt.isInputObjectType)(i)&&(0,Vt.isInputObjectType)(a)?n.push(...E7(i,a)):(0,Vt.isObjectType)(i)&&(0,Vt.isObjectType)(a)?n.push(...uB(i,a),...oB(i,a)):(0,Vt.isInterfaceType)(i)&&(0,Vt.isInterfaceType)(a)?n.push(...uB(i,a),...oB(i,a)):i.constructor!==a.constructor&&n.push({type:Mn.TYPE_CHANGED_KIND,description:`${i.name} changed from ${cB(i)} to ${cB(a)}.`});return n}function E7(e,t){let n=[],r=ws(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.added)(0,Vt.isRequiredInputField)(i)?n.push({type:Mn.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:ha.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(let i of r.removed)n.push({type:Mn.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)jf(i.type,a.type)||n.push({type:Mn.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function h7(e,t){let n=[],r=ws(e.getTypes(),t.getTypes());for(let i of r.added)n.push({type:ha.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(let i of r.removed)n.push({type:Mn.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function y7(e,t){let n=[],r=ws(e.getValues(),t.getValues());for(let i of r.added)n.push({type:ha.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(let i of r.removed)n.push({type:Mn.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function oB(e,t){let n=[],r=ws(e.getInterfaces(),t.getInterfaces());for(let i of r.added)n.push({type:ha.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(let i of r.removed)n.push({type:Mn.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function uB(e,t){let n=[],r=ws(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.removed)n.push({type:Mn.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)n.push(...I7(e,i,a)),Vf(i.type,a.type)||n.push({type:Mn.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function I7(e,t,n){let r=[],i=ws(t.args,n.args);for(let a of i.removed)r.push({type:Mn.ARG_REMOVED,description:`${e.name}.${t.name} arg ${a.name} was removed.`});for(let[a,o]of i.persisted)if(!jf(a.type,o.type))r.push({type:Mn.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${a.name} has changed type from ${String(a.type)} to ${String(o.type)}.`});else if(a.defaultValue!==void 0)if(o.defaultValue===void 0)r.push({type:ha.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} defaultValue was removed.`});else{let l=lB(a.defaultValue,a.type),d=lB(o.defaultValue,o.type);l!==d&&r.push({type:ha.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} has changed defaultValue from ${l} to ${d}.`})}for(let a of i.added)(0,Vt.isRequiredArgument)(a)?r.push({type:Mn.REQUIRED_ARG_ADDED,description:`A required arg ${a.name} on ${e.name}.${t.name} was added.`}):r.push({type:ha.OPTIONAL_ARG_ADDED,description:`An optional arg ${a.name} on ${e.name}.${t.name} was added.`});return r}function Vf(e,t){return(0,Vt.isListType)(e)?(0,Vt.isListType)(t)&&Vf(e.ofType,t.ofType)||(0,Vt.isNonNullType)(t)&&Vf(e,t.ofType):(0,Vt.isNonNullType)(e)?(0,Vt.isNonNullType)(t)&&Vf(e.ofType,t.ofType):(0,Vt.isNamedType)(t)&&e.name===t.name||(0,Vt.isNonNullType)(t)&&Vf(e,t.ofType)}function jf(e,t){return(0,Vt.isListType)(e)?(0,Vt.isListType)(t)&&jf(e.ofType,t.ofType):(0,Vt.isNonNullType)(e)?(0,Vt.isNonNullType)(t)&&jf(e.ofType,t.ofType)||!(0,Vt.isNonNullType)(t)&&jf(e.ofType,t):(0,Vt.isNamedType)(t)&&e.name===t.name}function cB(e){if((0,Vt.isScalarType)(e))return"a Scalar type";if((0,Vt.isObjectType)(e))return"an Object type";if((0,Vt.isInterfaceType)(e))return"an Interface type";if((0,Vt.isUnionType)(e))return"a Union type";if((0,Vt.isEnumType)(e))return"an Enum type";if((0,Vt.isInputObjectType)(e))return"an Input type";(0,dB.invariant)(!1,"Unexpected type: "+(0,u7.inspect)(e))}function lB(e,t){let n=(0,d7.astFromValue)(e,t);return n!=null||(0,dB.invariant)(!1),(0,c7.print)((0,f7.sortValueNode)(n))}function ws(e,t){let n=[],r=[],i=[],a=(0,sB.keyMap)(e,({name:u})=>u),o=(0,sB.keyMap)(t,({name:u})=>u);for(let u of e){let l=o[u.name];l===void 0?r.push(u):i.push([u,l])}for(let u of t)a[u.name]===void 0&&n.push(u);return{added:n,persisted:i,removed:r}}});var EB=F(Mt=>{"use strict";m();T();N();Object.defineProperty(Mt,"__esModule",{value:!0});Object.defineProperty(Mt,"BreakingChangeType",{enumerable:!0,get:function(){return pT.BreakingChangeType}});Object.defineProperty(Mt,"DangerousChangeType",{enumerable:!0,get:function(){return pT.DangerousChangeType}});Object.defineProperty(Mt,"TypeInfo",{enumerable:!0,get:function(){return NB.TypeInfo}});Object.defineProperty(Mt,"assertValidName",{enumerable:!0,get:function(){return TB.assertValidName}});Object.defineProperty(Mt,"astFromValue",{enumerable:!0,get:function(){return F7.astFromValue}});Object.defineProperty(Mt,"buildASTSchema",{enumerable:!0,get:function(){return mB.buildASTSchema}});Object.defineProperty(Mt,"buildClientSchema",{enumerable:!0,get:function(){return S7.buildClientSchema}});Object.defineProperty(Mt,"buildSchema",{enumerable:!0,get:function(){return mB.buildSchema}});Object.defineProperty(Mt,"coerceInputValue",{enumerable:!0,get:function(){return w7.coerceInputValue}});Object.defineProperty(Mt,"concatAST",{enumerable:!0,get:function(){return L7.concatAST}});Object.defineProperty(Mt,"doTypesOverlap",{enumerable:!0,get:function(){return xv.doTypesOverlap}});Object.defineProperty(Mt,"extendSchema",{enumerable:!0,get:function(){return D7.extendSchema}});Object.defineProperty(Mt,"findBreakingChanges",{enumerable:!0,get:function(){return pT.findBreakingChanges}});Object.defineProperty(Mt,"findDangerousChanges",{enumerable:!0,get:function(){return pT.findDangerousChanges}});Object.defineProperty(Mt,"getIntrospectionQuery",{enumerable:!0,get:function(){return g7.getIntrospectionQuery}});Object.defineProperty(Mt,"getOperationAST",{enumerable:!0,get:function(){return _7.getOperationAST}});Object.defineProperty(Mt,"getOperationRootType",{enumerable:!0,get:function(){return v7.getOperationRootType}});Object.defineProperty(Mt,"introspectionFromSchema",{enumerable:!0,get:function(){return O7.introspectionFromSchema}});Object.defineProperty(Mt,"isEqualType",{enumerable:!0,get:function(){return xv.isEqualType}});Object.defineProperty(Mt,"isTypeSubTypeOf",{enumerable:!0,get:function(){return xv.isTypeSubTypeOf}});Object.defineProperty(Mt,"isValidNameError",{enumerable:!0,get:function(){return TB.isValidNameError}});Object.defineProperty(Mt,"lexicographicSortSchema",{enumerable:!0,get:function(){return b7.lexicographicSortSchema}});Object.defineProperty(Mt,"printIntrospectionSchema",{enumerable:!0,get:function(){return Mv.printIntrospectionSchema}});Object.defineProperty(Mt,"printSchema",{enumerable:!0,get:function(){return Mv.printSchema}});Object.defineProperty(Mt,"printType",{enumerable:!0,get:function(){return Mv.printType}});Object.defineProperty(Mt,"separateOperations",{enumerable:!0,get:function(){return C7.separateOperations}});Object.defineProperty(Mt,"stripIgnoredCharacters",{enumerable:!0,get:function(){return B7.stripIgnoredCharacters}});Object.defineProperty(Mt,"typeFromAST",{enumerable:!0,get:function(){return A7.typeFromAST}});Object.defineProperty(Mt,"valueFromAST",{enumerable:!0,get:function(){return R7.valueFromAST}});Object.defineProperty(Mt,"valueFromASTUntyped",{enumerable:!0,get:function(){return P7.valueFromASTUntyped}});Object.defineProperty(Mt,"visitWithTypeInfo",{enumerable:!0,get:function(){return NB.visitWithTypeInfo}});var g7=Iv(),_7=DC(),v7=bC(),O7=AC(),S7=PC(),mB=qC(),D7=Dv(),b7=KC(),Mv=zC(),A7=Qa(),R7=Rf(),P7=UI(),F7=yf(),NB=CN(),w7=s_(),L7=WC(),C7=eB(),B7=rB(),xv=ff(),TB=aB(),pT=pB()});var _e=F(q=>{"use strict";m();T();N();Object.defineProperty(q,"__esModule",{value:!0});Object.defineProperty(q,"BREAK",{enumerable:!0,get:function(){return Yt.BREAK}});Object.defineProperty(q,"BreakingChangeType",{enumerable:!0,get:function(){return Jt.BreakingChangeType}});Object.defineProperty(q,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return ye.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(q,"DangerousChangeType",{enumerable:!0,get:function(){return Jt.DangerousChangeType}});Object.defineProperty(q,"DirectiveLocation",{enumerable:!0,get:function(){return Yt.DirectiveLocation}});Object.defineProperty(q,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return yt.ExecutableDefinitionsRule}});Object.defineProperty(q,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return yt.FieldsOnCorrectTypeRule}});Object.defineProperty(q,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return yt.FragmentsOnCompositeTypesRule}});Object.defineProperty(q,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return ye.GRAPHQL_MAX_INT}});Object.defineProperty(q,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return ye.GRAPHQL_MIN_INT}});Object.defineProperty(q,"GraphQLBoolean",{enumerable:!0,get:function(){return ye.GraphQLBoolean}});Object.defineProperty(q,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return ye.GraphQLDeprecatedDirective}});Object.defineProperty(q,"GraphQLDirective",{enumerable:!0,get:function(){return ye.GraphQLDirective}});Object.defineProperty(q,"GraphQLEnumType",{enumerable:!0,get:function(){return ye.GraphQLEnumType}});Object.defineProperty(q,"GraphQLError",{enumerable:!0,get:function(){return Kf.GraphQLError}});Object.defineProperty(q,"GraphQLFloat",{enumerable:!0,get:function(){return ye.GraphQLFloat}});Object.defineProperty(q,"GraphQLID",{enumerable:!0,get:function(){return ye.GraphQLID}});Object.defineProperty(q,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return ye.GraphQLIncludeDirective}});Object.defineProperty(q,"GraphQLInputObjectType",{enumerable:!0,get:function(){return ye.GraphQLInputObjectType}});Object.defineProperty(q,"GraphQLInt",{enumerable:!0,get:function(){return ye.GraphQLInt}});Object.defineProperty(q,"GraphQLInterfaceType",{enumerable:!0,get:function(){return ye.GraphQLInterfaceType}});Object.defineProperty(q,"GraphQLList",{enumerable:!0,get:function(){return ye.GraphQLList}});Object.defineProperty(q,"GraphQLNonNull",{enumerable:!0,get:function(){return ye.GraphQLNonNull}});Object.defineProperty(q,"GraphQLObjectType",{enumerable:!0,get:function(){return ye.GraphQLObjectType}});Object.defineProperty(q,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return ye.GraphQLOneOfDirective}});Object.defineProperty(q,"GraphQLScalarType",{enumerable:!0,get:function(){return ye.GraphQLScalarType}});Object.defineProperty(q,"GraphQLSchema",{enumerable:!0,get:function(){return ye.GraphQLSchema}});Object.defineProperty(q,"GraphQLSkipDirective",{enumerable:!0,get:function(){return ye.GraphQLSkipDirective}});Object.defineProperty(q,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return ye.GraphQLSpecifiedByDirective}});Object.defineProperty(q,"GraphQLString",{enumerable:!0,get:function(){return ye.GraphQLString}});Object.defineProperty(q,"GraphQLUnionType",{enumerable:!0,get:function(){return ye.GraphQLUnionType}});Object.defineProperty(q,"Kind",{enumerable:!0,get:function(){return Yt.Kind}});Object.defineProperty(q,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return yt.KnownArgumentNamesRule}});Object.defineProperty(q,"KnownDirectivesRule",{enumerable:!0,get:function(){return yt.KnownDirectivesRule}});Object.defineProperty(q,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return yt.KnownFragmentNamesRule}});Object.defineProperty(q,"KnownTypeNamesRule",{enumerable:!0,get:function(){return yt.KnownTypeNamesRule}});Object.defineProperty(q,"Lexer",{enumerable:!0,get:function(){return Yt.Lexer}});Object.defineProperty(q,"Location",{enumerable:!0,get:function(){return Yt.Location}});Object.defineProperty(q,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return yt.LoneAnonymousOperationRule}});Object.defineProperty(q,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return yt.LoneSchemaDefinitionRule}});Object.defineProperty(q,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return yt.MaxIntrospectionDepthRule}});Object.defineProperty(q,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return yt.NoDeprecatedCustomRule}});Object.defineProperty(q,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return yt.NoFragmentCyclesRule}});Object.defineProperty(q,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return yt.NoSchemaIntrospectionCustomRule}});Object.defineProperty(q,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return yt.NoUndefinedVariablesRule}});Object.defineProperty(q,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return yt.NoUnusedFragmentsRule}});Object.defineProperty(q,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return yt.NoUnusedVariablesRule}});Object.defineProperty(q,"OperationTypeNode",{enumerable:!0,get:function(){return Yt.OperationTypeNode}});Object.defineProperty(q,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return yt.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(q,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return yt.PossibleFragmentSpreadsRule}});Object.defineProperty(q,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return yt.PossibleTypeExtensionsRule}});Object.defineProperty(q,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return yt.ProvidedRequiredArgumentsRule}});Object.defineProperty(q,"ScalarLeafsRule",{enumerable:!0,get:function(){return yt.ScalarLeafsRule}});Object.defineProperty(q,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ye.SchemaMetaFieldDef}});Object.defineProperty(q,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return yt.SingleFieldSubscriptionsRule}});Object.defineProperty(q,"Source",{enumerable:!0,get:function(){return Yt.Source}});Object.defineProperty(q,"Token",{enumerable:!0,get:function(){return Yt.Token}});Object.defineProperty(q,"TokenKind",{enumerable:!0,get:function(){return Yt.TokenKind}});Object.defineProperty(q,"TypeInfo",{enumerable:!0,get:function(){return Jt.TypeInfo}});Object.defineProperty(q,"TypeKind",{enumerable:!0,get:function(){return ye.TypeKind}});Object.defineProperty(q,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ye.TypeMetaFieldDef}});Object.defineProperty(q,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ye.TypeNameMetaFieldDef}});Object.defineProperty(q,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return yt.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(q,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return yt.UniqueArgumentNamesRule}});Object.defineProperty(q,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return yt.UniqueDirectiveNamesRule}});Object.defineProperty(q,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return yt.UniqueDirectivesPerLocationRule}});Object.defineProperty(q,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return yt.UniqueEnumValueNamesRule}});Object.defineProperty(q,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return yt.UniqueFieldDefinitionNamesRule}});Object.defineProperty(q,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return yt.UniqueFragmentNamesRule}});Object.defineProperty(q,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return yt.UniqueInputFieldNamesRule}});Object.defineProperty(q,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return yt.UniqueOperationNamesRule}});Object.defineProperty(q,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return yt.UniqueOperationTypesRule}});Object.defineProperty(q,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return yt.UniqueTypeNamesRule}});Object.defineProperty(q,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return yt.UniqueVariableNamesRule}});Object.defineProperty(q,"ValidationContext",{enumerable:!0,get:function(){return yt.ValidationContext}});Object.defineProperty(q,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return yt.ValuesOfCorrectTypeRule}});Object.defineProperty(q,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return yt.VariablesAreInputTypesRule}});Object.defineProperty(q,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return yt.VariablesInAllowedPositionRule}});Object.defineProperty(q,"__Directive",{enumerable:!0,get:function(){return ye.__Directive}});Object.defineProperty(q,"__DirectiveLocation",{enumerable:!0,get:function(){return ye.__DirectiveLocation}});Object.defineProperty(q,"__EnumValue",{enumerable:!0,get:function(){return ye.__EnumValue}});Object.defineProperty(q,"__Field",{enumerable:!0,get:function(){return ye.__Field}});Object.defineProperty(q,"__InputValue",{enumerable:!0,get:function(){return ye.__InputValue}});Object.defineProperty(q,"__Schema",{enumerable:!0,get:function(){return ye.__Schema}});Object.defineProperty(q,"__Type",{enumerable:!0,get:function(){return ye.__Type}});Object.defineProperty(q,"__TypeKind",{enumerable:!0,get:function(){return ye.__TypeKind}});Object.defineProperty(q,"assertAbstractType",{enumerable:!0,get:function(){return ye.assertAbstractType}});Object.defineProperty(q,"assertCompositeType",{enumerable:!0,get:function(){return ye.assertCompositeType}});Object.defineProperty(q,"assertDirective",{enumerable:!0,get:function(){return ye.assertDirective}});Object.defineProperty(q,"assertEnumType",{enumerable:!0,get:function(){return ye.assertEnumType}});Object.defineProperty(q,"assertEnumValueName",{enumerable:!0,get:function(){return ye.assertEnumValueName}});Object.defineProperty(q,"assertInputObjectType",{enumerable:!0,get:function(){return ye.assertInputObjectType}});Object.defineProperty(q,"assertInputType",{enumerable:!0,get:function(){return ye.assertInputType}});Object.defineProperty(q,"assertInterfaceType",{enumerable:!0,get:function(){return ye.assertInterfaceType}});Object.defineProperty(q,"assertLeafType",{enumerable:!0,get:function(){return ye.assertLeafType}});Object.defineProperty(q,"assertListType",{enumerable:!0,get:function(){return ye.assertListType}});Object.defineProperty(q,"assertName",{enumerable:!0,get:function(){return ye.assertName}});Object.defineProperty(q,"assertNamedType",{enumerable:!0,get:function(){return ye.assertNamedType}});Object.defineProperty(q,"assertNonNullType",{enumerable:!0,get:function(){return ye.assertNonNullType}});Object.defineProperty(q,"assertNullableType",{enumerable:!0,get:function(){return ye.assertNullableType}});Object.defineProperty(q,"assertObjectType",{enumerable:!0,get:function(){return ye.assertObjectType}});Object.defineProperty(q,"assertOutputType",{enumerable:!0,get:function(){return ye.assertOutputType}});Object.defineProperty(q,"assertScalarType",{enumerable:!0,get:function(){return ye.assertScalarType}});Object.defineProperty(q,"assertSchema",{enumerable:!0,get:function(){return ye.assertSchema}});Object.defineProperty(q,"assertType",{enumerable:!0,get:function(){return ye.assertType}});Object.defineProperty(q,"assertUnionType",{enumerable:!0,get:function(){return ye.assertUnionType}});Object.defineProperty(q,"assertValidName",{enumerable:!0,get:function(){return Jt.assertValidName}});Object.defineProperty(q,"assertValidSchema",{enumerable:!0,get:function(){return ye.assertValidSchema}});Object.defineProperty(q,"assertWrappingType",{enumerable:!0,get:function(){return ye.assertWrappingType}});Object.defineProperty(q,"astFromValue",{enumerable:!0,get:function(){return Jt.astFromValue}});Object.defineProperty(q,"buildASTSchema",{enumerable:!0,get:function(){return Jt.buildASTSchema}});Object.defineProperty(q,"buildClientSchema",{enumerable:!0,get:function(){return Jt.buildClientSchema}});Object.defineProperty(q,"buildSchema",{enumerable:!0,get:function(){return Jt.buildSchema}});Object.defineProperty(q,"coerceInputValue",{enumerable:!0,get:function(){return Jt.coerceInputValue}});Object.defineProperty(q,"concatAST",{enumerable:!0,get:function(){return Jt.concatAST}});Object.defineProperty(q,"createSourceEventStream",{enumerable:!0,get:function(){return Xa.createSourceEventStream}});Object.defineProperty(q,"defaultFieldResolver",{enumerable:!0,get:function(){return Xa.defaultFieldResolver}});Object.defineProperty(q,"defaultTypeResolver",{enumerable:!0,get:function(){return Xa.defaultTypeResolver}});Object.defineProperty(q,"doTypesOverlap",{enumerable:!0,get:function(){return Jt.doTypesOverlap}});Object.defineProperty(q,"execute",{enumerable:!0,get:function(){return Xa.execute}});Object.defineProperty(q,"executeSync",{enumerable:!0,get:function(){return Xa.executeSync}});Object.defineProperty(q,"extendSchema",{enumerable:!0,get:function(){return Jt.extendSchema}});Object.defineProperty(q,"findBreakingChanges",{enumerable:!0,get:function(){return Jt.findBreakingChanges}});Object.defineProperty(q,"findDangerousChanges",{enumerable:!0,get:function(){return Jt.findDangerousChanges}});Object.defineProperty(q,"formatError",{enumerable:!0,get:function(){return Kf.formatError}});Object.defineProperty(q,"getArgumentValues",{enumerable:!0,get:function(){return Xa.getArgumentValues}});Object.defineProperty(q,"getDirectiveValues",{enumerable:!0,get:function(){return Xa.getDirectiveValues}});Object.defineProperty(q,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Yt.getEnterLeaveForKind}});Object.defineProperty(q,"getIntrospectionQuery",{enumerable:!0,get:function(){return Jt.getIntrospectionQuery}});Object.defineProperty(q,"getLocation",{enumerable:!0,get:function(){return Yt.getLocation}});Object.defineProperty(q,"getNamedType",{enumerable:!0,get:function(){return ye.getNamedType}});Object.defineProperty(q,"getNullableType",{enumerable:!0,get:function(){return ye.getNullableType}});Object.defineProperty(q,"getOperationAST",{enumerable:!0,get:function(){return Jt.getOperationAST}});Object.defineProperty(q,"getOperationRootType",{enumerable:!0,get:function(){return Jt.getOperationRootType}});Object.defineProperty(q,"getVariableValues",{enumerable:!0,get:function(){return Xa.getVariableValues}});Object.defineProperty(q,"getVisitFn",{enumerable:!0,get:function(){return Yt.getVisitFn}});Object.defineProperty(q,"graphql",{enumerable:!0,get:function(){return yB.graphql}});Object.defineProperty(q,"graphqlSync",{enumerable:!0,get:function(){return yB.graphqlSync}});Object.defineProperty(q,"introspectionFromSchema",{enumerable:!0,get:function(){return Jt.introspectionFromSchema}});Object.defineProperty(q,"introspectionTypes",{enumerable:!0,get:function(){return ye.introspectionTypes}});Object.defineProperty(q,"isAbstractType",{enumerable:!0,get:function(){return ye.isAbstractType}});Object.defineProperty(q,"isCompositeType",{enumerable:!0,get:function(){return ye.isCompositeType}});Object.defineProperty(q,"isConstValueNode",{enumerable:!0,get:function(){return Yt.isConstValueNode}});Object.defineProperty(q,"isDefinitionNode",{enumerable:!0,get:function(){return Yt.isDefinitionNode}});Object.defineProperty(q,"isDirective",{enumerable:!0,get:function(){return ye.isDirective}});Object.defineProperty(q,"isEnumType",{enumerable:!0,get:function(){return ye.isEnumType}});Object.defineProperty(q,"isEqualType",{enumerable:!0,get:function(){return Jt.isEqualType}});Object.defineProperty(q,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Yt.isExecutableDefinitionNode}});Object.defineProperty(q,"isInputObjectType",{enumerable:!0,get:function(){return ye.isInputObjectType}});Object.defineProperty(q,"isInputType",{enumerable:!0,get:function(){return ye.isInputType}});Object.defineProperty(q,"isInterfaceType",{enumerable:!0,get:function(){return ye.isInterfaceType}});Object.defineProperty(q,"isIntrospectionType",{enumerable:!0,get:function(){return ye.isIntrospectionType}});Object.defineProperty(q,"isLeafType",{enumerable:!0,get:function(){return ye.isLeafType}});Object.defineProperty(q,"isListType",{enumerable:!0,get:function(){return ye.isListType}});Object.defineProperty(q,"isNamedType",{enumerable:!0,get:function(){return ye.isNamedType}});Object.defineProperty(q,"isNonNullType",{enumerable:!0,get:function(){return ye.isNonNullType}});Object.defineProperty(q,"isNullableType",{enumerable:!0,get:function(){return ye.isNullableType}});Object.defineProperty(q,"isObjectType",{enumerable:!0,get:function(){return ye.isObjectType}});Object.defineProperty(q,"isOutputType",{enumerable:!0,get:function(){return ye.isOutputType}});Object.defineProperty(q,"isRequiredArgument",{enumerable:!0,get:function(){return ye.isRequiredArgument}});Object.defineProperty(q,"isRequiredInputField",{enumerable:!0,get:function(){return ye.isRequiredInputField}});Object.defineProperty(q,"isScalarType",{enumerable:!0,get:function(){return ye.isScalarType}});Object.defineProperty(q,"isSchema",{enumerable:!0,get:function(){return ye.isSchema}});Object.defineProperty(q,"isSelectionNode",{enumerable:!0,get:function(){return Yt.isSelectionNode}});Object.defineProperty(q,"isSpecifiedDirective",{enumerable:!0,get:function(){return ye.isSpecifiedDirective}});Object.defineProperty(q,"isSpecifiedScalarType",{enumerable:!0,get:function(){return ye.isSpecifiedScalarType}});Object.defineProperty(q,"isType",{enumerable:!0,get:function(){return ye.isType}});Object.defineProperty(q,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Yt.isTypeDefinitionNode}});Object.defineProperty(q,"isTypeExtensionNode",{enumerable:!0,get:function(){return Yt.isTypeExtensionNode}});Object.defineProperty(q,"isTypeNode",{enumerable:!0,get:function(){return Yt.isTypeNode}});Object.defineProperty(q,"isTypeSubTypeOf",{enumerable:!0,get:function(){return Jt.isTypeSubTypeOf}});Object.defineProperty(q,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Yt.isTypeSystemDefinitionNode}});Object.defineProperty(q,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Yt.isTypeSystemExtensionNode}});Object.defineProperty(q,"isUnionType",{enumerable:!0,get:function(){return ye.isUnionType}});Object.defineProperty(q,"isValidNameError",{enumerable:!0,get:function(){return Jt.isValidNameError}});Object.defineProperty(q,"isValueNode",{enumerable:!0,get:function(){return Yt.isValueNode}});Object.defineProperty(q,"isWrappingType",{enumerable:!0,get:function(){return ye.isWrappingType}});Object.defineProperty(q,"lexicographicSortSchema",{enumerable:!0,get:function(){return Jt.lexicographicSortSchema}});Object.defineProperty(q,"locatedError",{enumerable:!0,get:function(){return Kf.locatedError}});Object.defineProperty(q,"parse",{enumerable:!0,get:function(){return Yt.parse}});Object.defineProperty(q,"parseConstValue",{enumerable:!0,get:function(){return Yt.parseConstValue}});Object.defineProperty(q,"parseType",{enumerable:!0,get:function(){return Yt.parseType}});Object.defineProperty(q,"parseValue",{enumerable:!0,get:function(){return Yt.parseValue}});Object.defineProperty(q,"print",{enumerable:!0,get:function(){return Yt.print}});Object.defineProperty(q,"printError",{enumerable:!0,get:function(){return Kf.printError}});Object.defineProperty(q,"printIntrospectionSchema",{enumerable:!0,get:function(){return Jt.printIntrospectionSchema}});Object.defineProperty(q,"printLocation",{enumerable:!0,get:function(){return Yt.printLocation}});Object.defineProperty(q,"printSchema",{enumerable:!0,get:function(){return Jt.printSchema}});Object.defineProperty(q,"printSourceLocation",{enumerable:!0,get:function(){return Yt.printSourceLocation}});Object.defineProperty(q,"printType",{enumerable:!0,get:function(){return Jt.printType}});Object.defineProperty(q,"recommendedRules",{enumerable:!0,get:function(){return yt.recommendedRules}});Object.defineProperty(q,"resolveObjMapThunk",{enumerable:!0,get:function(){return ye.resolveObjMapThunk}});Object.defineProperty(q,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return ye.resolveReadonlyArrayThunk}});Object.defineProperty(q,"responsePathAsArray",{enumerable:!0,get:function(){return Xa.responsePathAsArray}});Object.defineProperty(q,"separateOperations",{enumerable:!0,get:function(){return Jt.separateOperations}});Object.defineProperty(q,"specifiedDirectives",{enumerable:!0,get:function(){return ye.specifiedDirectives}});Object.defineProperty(q,"specifiedRules",{enumerable:!0,get:function(){return yt.specifiedRules}});Object.defineProperty(q,"specifiedScalarTypes",{enumerable:!0,get:function(){return ye.specifiedScalarTypes}});Object.defineProperty(q,"stripIgnoredCharacters",{enumerable:!0,get:function(){return Jt.stripIgnoredCharacters}});Object.defineProperty(q,"subscribe",{enumerable:!0,get:function(){return Xa.subscribe}});Object.defineProperty(q,"syntaxError",{enumerable:!0,get:function(){return Kf.syntaxError}});Object.defineProperty(q,"typeFromAST",{enumerable:!0,get:function(){return Jt.typeFromAST}});Object.defineProperty(q,"validate",{enumerable:!0,get:function(){return yt.validate}});Object.defineProperty(q,"validateSchema",{enumerable:!0,get:function(){return ye.validateSchema}});Object.defineProperty(q,"valueFromAST",{enumerable:!0,get:function(){return Jt.valueFromAST}});Object.defineProperty(q,"valueFromASTUntyped",{enumerable:!0,get:function(){return Jt.valueFromASTUntyped}});Object.defineProperty(q,"version",{enumerable:!0,get:function(){return hB.version}});Object.defineProperty(q,"versionInfo",{enumerable:!0,get:function(){return hB.versionInfo}});Object.defineProperty(q,"visit",{enumerable:!0,get:function(){return Yt.visit}});Object.defineProperty(q,"visitInParallel",{enumerable:!0,get:function(){return Yt.visitInParallel}});Object.defineProperty(q,"visitWithTypeInfo",{enumerable:!0,get:function(){return Jt.visitWithTypeInfo}});var hB=pF(),yB=oC(),ye=lC(),Yt=fC(),Xa=IC(),yt=OC(),Kf=SC(),Jt=EB()});var zn=F(R=>{"use strict";m();T();N();Object.defineProperty(R,"__esModule",{value:!0});R.FIELD_UPPER=R.FIELD_PATH=R.FIELD=R.EXTENSIONS=R.EXTENDS=R.EXTERNAL=R.EXECUTION=R.ENUM_VALUE_UPPER=R.ENUM_VALUE=R.ENUM_UPPER=R.ENUM=R.ENTITY_UNION=R.ENTITIES_FIELD=R.ENTITIES=R.EDFS_REDIS_SUBSCRIBE=R.EDFS_REDIS_PUBLISH=R.EDFS_NATS_STREAM_CONFIGURATION=R.EDFS_PUBLISH_RESULT=R.EDFS_NATS_SUBSCRIBE=R.EDFS_NATS_REQUEST=R.EDFS_NATS_PUBLISH=R.EDFS_KAFKA_SUBSCRIBE=R.EDFS_KAFKA_PUBLISH=R.DIRECTIVE_DEFINITION=R.DESCRIPTION_OVERRIDE=R.DEPRECATED_DEFAULT_ARGUMENT_VALUE=R.DEPRECATED=R.DEFAULT_SUBSCRIPTION=R.DEFAULT_QUERY=R.DEFAULT_MUTATION=R.DEFAULT_EDFS_PROVIDER_ID=R.DEFAULT=R.CONTEXT=R.CONNECT_FIELD_RESOLVER=R.CONSUMER_NAME=R.CONSUMER_INACTIVE_THRESHOLD=R.CONFIGURE_CHILD_DESCRIPTIONS=R.CONFIGURE_DESCRIPTION=R.CONDITION=R.COMPOSE_DIRECTIVE=R.CHANNELS=R.CHANNEL=R.BOOLEAN_SCALAR=R.BOOLEAN=R.ARGUMENT_DEFINITION_UPPER=R.AUTHENTICATED=R.ARGUMENT=R.ANY_SCALAR=R.AND_UPPER=R.AS=void 0;R.NOT_UPPER=R.NON_NULLABLE_STRING=R.NON_NULLABLE_INT=R.NON_NULLABLE_BOOLEAN=R.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT=R.NAME=R.NOT_APPLICABLE=R.PROVIDER_TYPE_REDIS=R.PROVIDER_TYPE_NATS=R.PROVIDER_TYPE_KAFKA=R.PROPAGATE=R.MUTATION_UPPER=R.MUTATION=R.NUMBER=R.LITERAL_PERIOD=R.LITERAL_NEW_LINE=R.LITERAL_SPACE=R.LIST=R.LINK_PURPOSE=R.LINK_IMPORT=R.LINK=R.LEVELS=R.LEFT_PARENTHESIS=R.KEY=R.INTERFACE_OBJECT=R.INTERFACE_UPPER=R.INTERFACE=R.INT_SCALAR=R.INPUT_VALUE=R.INPUT_OBJECT_UPPER=R.INPUT_OBJECT=R.INPUT_FIELD_DEFINITION_UPPER=R.INPUT_FIELD=R.INPUT=R.INLINE_FRAGMENT_UPPER=R.INLINE_FRAGMENT=R.INACCESSIBLE=R.IN_UPPER=R.IMPORT=R.ID_SCALAR=R.HYPHEN_JOIN=R.FROM=R.FRAGMENT_SPREAD_UPPER=R.FRAGMENT_DEFINITION_UPPER=R.FOR=R.FLOAT_SCALAR=R.FIRST_ORDINAL=R.FIELD_DEFINITION_UPPER=R.FIELDS=R.FIELD_SET_SCALAR=void 0;R.TAG=R.SUCCESS=R.SUBSCRIPTION_UPPER=R.SUBSCRIBE=R.SUBSCRIPTION_FILTER_VALUE=R.SUBSCRIPTION_FILTER_CONDITION=R.SUBSCRIPTION_FILTER=R.SUBSCRIPTION_FIELD_CONDITION=R.SUBSCRIPTION=R.SUBJECTS=R.SUBJECT=R.STRING_SCALAR=R.STRING=R.STREAM_NAME=R.STREAM_CONFIGURATION=R.SPECIFIED_BY=R.SHAREABLE=R.SERVICE_FIELD=R.SERVICE_OBJECT=R.SEMANTIC_NON_NULL=R.SELECTION_REPRESENTATION=R.SECURITY=R.SCOPE_SCALAR=R.SCOPES=R.SCHEMA_UPPER=R.SCHEMA=R.SCALAR_UPPER=R.SCALAR=R.RESOLVABLE=R.REQUIRES_SCOPES=R.REQUIRES=R.REQUIRE_FETCH_REASONS=R.REQUEST=R.REASON=R.QUOTATION_JOIN=R.QUERY_UPPER=R.QUERY=R.PUBLISH=R.PROVIDES=R.PROVIDER_ID=R.PARENT_EXTENSION_DATA_MAP=R.PARENT_DEFINITION_DATA_MAP=R.PARENT_DEFINITION_DATA=R.OVERRIDE=R.OR_UPPER=R.OBJECT_UPPER=R.OBJECT=R.OPERATION_TO_DEFAULT=R.ONE_OF=R.NULL=void 0;R.NON_REPEATABLE_PERSISTED_DIRECTIVES=R.OUTPUT_NODE_KINDS=R.INPUT_NODE_KINDS=R.IGNORED_FIELDS=R.INHERITABLE_DIRECTIVE_NAMES=R.PERSISTED_CLIENT_DIRECTIVES=R.AUTHORIZATION_DIRECTIVES=R.ROOT_TYPE_NAMES=R.EXECUTABLE_DIRECTIVE_LOCATIONS=R.VARIABLE_DEFINITION_UPPER=R.VALUES=R.URL_LOWER=R.UNION_UPPER=R.UNION=R.TYPENAME=R.TOPICS=R.TOPIC=void 0;var vu=_e();R.AS="as";R.AND_UPPER="AND";R.ANY_SCALAR="_Any";R.ARGUMENT="argument";R.AUTHENTICATED="authenticated";R.ARGUMENT_DEFINITION_UPPER="ARGUMENT_DEFINITION";R.BOOLEAN="boolean";R.BOOLEAN_SCALAR="Boolean";R.CHANNEL="channel";R.CHANNELS="channels";R.COMPOSE_DIRECTIVE="composeDirective";R.CONDITION="condition";R.CONFIGURE_DESCRIPTION="openfed__configureDescription";R.CONFIGURE_CHILD_DESCRIPTIONS="openfed__configureChildDescriptions";R.CONSUMER_INACTIVE_THRESHOLD="consumerInactiveThreshold";R.CONSUMER_NAME="consumerName";R.CONNECT_FIELD_RESOLVER="connect__fieldResolver";R.CONTEXT="context";R.DEFAULT="default";R.DEFAULT_EDFS_PROVIDER_ID="default";R.DEFAULT_MUTATION="Mutation";R.DEFAULT_QUERY="Query";R.DEFAULT_SUBSCRIPTION="Subscription";R.DEPRECATED="deprecated";R.DEPRECATED_DEFAULT_ARGUMENT_VALUE="No longer supported";R.DESCRIPTION_OVERRIDE="descriptionOverride";R.DIRECTIVE_DEFINITION="directive definition";R.EDFS_KAFKA_PUBLISH="edfs__kafkaPublish";R.EDFS_KAFKA_SUBSCRIBE="edfs__kafkaSubscribe";R.EDFS_NATS_PUBLISH="edfs__natsPublish";R.EDFS_NATS_REQUEST="edfs__natsRequest";R.EDFS_NATS_SUBSCRIBE="edfs__natsSubscribe";R.EDFS_PUBLISH_RESULT="edfs__PublishResult";R.EDFS_NATS_STREAM_CONFIGURATION="edfs__NatsStreamConfiguration";R.EDFS_REDIS_PUBLISH="edfs__redisPublish";R.EDFS_REDIS_SUBSCRIBE="edfs__redisSubscribe";R.ENTITIES="entities";R.ENTITIES_FIELD="_entities";R.ENTITY_UNION="_Entity";R.ENUM="Enum";R.ENUM_UPPER="ENUM";R.ENUM_VALUE="Enum Value";R.ENUM_VALUE_UPPER="ENUM_VALUE";R.EXECUTION="EXECUTION";R.EXTERNAL="external";R.EXTENDS="extends";R.EXTENSIONS="extensions";R.FIELD="field";R.FIELD_PATH="fieldPath";R.FIELD_UPPER="FIELD";R.FIELD_SET_SCALAR="openfed__FieldSet";R.FIELDS="fields";R.FIELD_DEFINITION_UPPER="FIELD_DEFINITION";R.FIRST_ORDINAL="1st";R.FLOAT_SCALAR="Float";R.FOR="for";R.FRAGMENT_DEFINITION_UPPER="FRAGMENT_DEFINITION";R.FRAGMENT_SPREAD_UPPER="FRAGMENT_SPREAD";R.FROM="from";R.HYPHEN_JOIN=` -`;R.ID_SCALAR="ID";R.IMPORT="import";R.IN_UPPER="IN";R.INACCESSIBLE="inaccessible";R.INLINE_FRAGMENT="inlineFragment";R.INLINE_FRAGMENT_UPPER="INLINE_FRAGMENT";R.INPUT="Input";R.INPUT_FIELD="Input field";R.INPUT_FIELD_DEFINITION_UPPER="INPUT_FIELD_DEFINITION";R.INPUT_OBJECT="Input Object";R.INPUT_OBJECT_UPPER="INPUT_OBJECT";R.INPUT_VALUE="Input Value";R.INT_SCALAR="Int";R.INTERFACE="Interface";R.INTERFACE_UPPER="INTERFACE";R.INTERFACE_OBJECT="interfaceObject";R.KEY="key";R.LEFT_PARENTHESIS="(";R.LEVELS="levels";R.LINK="link";R.LINK_IMPORT="link__Import";R.LINK_PURPOSE="link__Purpose";R.LIST="list";R.LITERAL_SPACE=" ";R.LITERAL_NEW_LINE=` -`;R.LITERAL_PERIOD=".";R.NUMBER="number";R.MUTATION="Mutation";R.MUTATION_UPPER="MUTATION";R.PROPAGATE="propagate";R.PROVIDER_TYPE_KAFKA="kafka";R.PROVIDER_TYPE_NATS="nats";R.PROVIDER_TYPE_REDIS="redis";R.NOT_APPLICABLE="N/A";R.NAME="name";R.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT="edfs__PublishResult!";R.NON_NULLABLE_BOOLEAN="Boolean!";R.NON_NULLABLE_INT="Int!";R.NON_NULLABLE_STRING="String!";R.NOT_UPPER="NOT";R.NULL="Null";R.ONE_OF="oneOf";R.OPERATION_TO_DEFAULT="operationTypeNodeToDefaultType";R.OBJECT="Object";R.OBJECT_UPPER="OBJECT";R.OR_UPPER="OR";R.OVERRIDE="override";R.PARENT_DEFINITION_DATA="parentDefinitionDataByTypeName";R.PARENT_DEFINITION_DATA_MAP="parentDefinitionDataByParentTypeName";R.PARENT_EXTENSION_DATA_MAP="parentExtensionDataByParentTypeName";R.PROVIDER_ID="providerId";R.PROVIDES="provides";R.PUBLISH="publish";R.QUERY="Query";R.QUERY_UPPER="QUERY";R.QUOTATION_JOIN='", "';R.REASON="reason";R.REQUEST="request";R.REQUIRE_FETCH_REASONS="openfed__requireFetchReasons";R.REQUIRES="requires";R.REQUIRES_SCOPES="requiresScopes";R.RESOLVABLE="resolvable";R.SCALAR="Scalar";R.SCALAR_UPPER="SCALAR";R.SCHEMA="schema";R.SCHEMA_UPPER="SCHEMA";R.SCOPES="scopes";R.SCOPE_SCALAR="openfed__Scope";R.SECURITY="SECURITY";R.SELECTION_REPRESENTATION=" { ... }";R.SEMANTIC_NON_NULL="semanticNonNull";R.SERVICE_OBJECT="_Service";R.SERVICE_FIELD="_service";R.SHAREABLE="shareable";R.SPECIFIED_BY="specifiedBy";R.STREAM_CONFIGURATION="streamConfiguration";R.STREAM_NAME="streamName";R.STRING="string";R.STRING_SCALAR="String";R.SUBJECT="subject";R.SUBJECTS="subjects";R.SUBSCRIPTION="Subscription";R.SUBSCRIPTION_FIELD_CONDITION="openfed__SubscriptionFieldCondition";R.SUBSCRIPTION_FILTER="openfed__subscriptionFilter";R.SUBSCRIPTION_FILTER_CONDITION="openfed__SubscriptionFilterCondition";R.SUBSCRIPTION_FILTER_VALUE="openfed__SubscriptionFilterValue";R.SUBSCRIBE="subscribe";R.SUBSCRIPTION_UPPER="SUBSCRIPTION";R.SUCCESS="success";R.TAG="tag";R.TOPIC="topic";R.TOPICS="topics";R.TYPENAME="__typename";R.UNION="Union";R.UNION_UPPER="UNION";R.URL_LOWER="url";R.VALUES="values";R.VARIABLE_DEFINITION_UPPER="VARIABLE_DEFINITION";R.EXECUTABLE_DIRECTIVE_LOCATIONS=new Set([R.FIELD_UPPER,R.FRAGMENT_DEFINITION_UPPER,R.FRAGMENT_SPREAD_UPPER,R.INLINE_FRAGMENT_UPPER,R.MUTATION_UPPER,R.QUERY_UPPER,R.SUBSCRIPTION_UPPER]);R.ROOT_TYPE_NAMES=new Set([R.MUTATION,R.QUERY,R.SUBSCRIPTION]);R.AUTHORIZATION_DIRECTIVES=new Set([R.AUTHENTICATED,R.REQUIRES_SCOPES]);R.PERSISTED_CLIENT_DIRECTIVES=new Set([R.DEPRECATED,R.ONE_OF,R.SEMANTIC_NON_NULL]);R.INHERITABLE_DIRECTIVE_NAMES=new Set([R.EXTERNAL,R.REQUIRE_FETCH_REASONS,R.SHAREABLE]);R.IGNORED_FIELDS=new Set([R.ENTITIES_FIELD,R.SERVICE_FIELD]);R.INPUT_NODE_KINDS=new Set([vu.Kind.ENUM_TYPE_DEFINITION,vu.Kind.INPUT_OBJECT_TYPE_DEFINITION,vu.Kind.SCALAR_TYPE_DEFINITION]);R.OUTPUT_NODE_KINDS=new Set([vu.Kind.ENUM_TYPE_DEFINITION,vu.Kind.INTERFACE_TYPE_DEFINITION,vu.Kind.OBJECT_TYPE_DEFINITION,vu.Kind.SCALAR_TYPE_DEFINITION,vu.Kind.UNION_TYPE_DEFINITION]);R.NON_REPEATABLE_PERSISTED_DIRECTIVES=new Set([R.INACCESSIBLE,R.ONE_OF,R.SEMANTIC_NON_NULL])});var Fr=w(Wn=>{"use strict";m();T();N();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.operationTypeNodeToDefaultType=void 0;Wn.isObjectLikeNodeEntity=P7;Wn.isNodeInterfaceObject=F7;Wn.stringToNameNode=NT;Wn.stringArrayToNameNodeArray=w7;Wn.setToNameNodeArray=L7;Wn.stringToNamedTypeNode=IB;Wn.setToNamedTypeNodeArray=C7;Wn.nodeKindToDirectiveLocation=B7;Wn.isKindAbstract=U7;Wn.extractExecutableDirectiveLocations=k7;Wn.formatDescription=M7;Wn.lexicographicallySortArgumentNodes=gB;Wn.lexicographicallySortSelectionSetNode=mT;Wn.lexicographicallySortDocumentNode=x7;Wn.parse=_B;Wn.safeParse=q7;var Mt=Ie(),Rn=zn();function P7(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Rn.KEY)return!0;return!1}function F7(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Rn.INTERFACE_OBJECT)return!0;return!1}function NT(e){return{kind:Mt.Kind.NAME,value:e}}function w7(e){let t=[];for(let n of e)t.push(NT(n));return t}function L7(e){let t=[];for(let n of e)t.push(NT(n));return t}function IB(e){return{kind:Mt.Kind.NAMED_TYPE,name:NT(e)}}function C7(e){let t=[];for(let n of e)t.push(IB(n));return t}function B7(e){switch(e){case Mt.Kind.ARGUMENT:return Rn.ARGUMENT_DEFINITION_UPPER;case Mt.Kind.ENUM_TYPE_DEFINITION:case Mt.Kind.ENUM_TYPE_EXTENSION:return Rn.ENUM_UPPER;case Mt.Kind.ENUM_VALUE_DEFINITION:return Rn.ENUM_VALUE_UPPER;case Mt.Kind.FIELD_DEFINITION:return Rn.FIELD_DEFINITION_UPPER;case Mt.Kind.FRAGMENT_DEFINITION:return Rn.FRAGMENT_DEFINITION_UPPER;case Mt.Kind.FRAGMENT_SPREAD:return Rn.FRAGMENT_SPREAD_UPPER;case Mt.Kind.INLINE_FRAGMENT:return Rn.INLINE_FRAGMENT_UPPER;case Mt.Kind.INPUT_VALUE_DEFINITION:return Rn.INPUT_FIELD_DEFINITION_UPPER;case Mt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Mt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return Rn.INPUT_OBJECT_UPPER;case Mt.Kind.INTERFACE_TYPE_DEFINITION:case Mt.Kind.INTERFACE_TYPE_EXTENSION:return Rn.INTERFACE_UPPER;case Mt.Kind.OBJECT_TYPE_DEFINITION:case Mt.Kind.OBJECT_TYPE_EXTENSION:return Rn.OBJECT_UPPER;case Mt.Kind.SCALAR_TYPE_DEFINITION:case Mt.Kind.SCALAR_TYPE_EXTENSION:return Rn.SCALAR_UPPER;case Mt.Kind.SCHEMA_DEFINITION:case Mt.Kind.SCHEMA_EXTENSION:return Rn.SCHEMA_UPPER;case Mt.Kind.UNION_TYPE_DEFINITION:case Mt.Kind.UNION_TYPE_EXTENSION:return Rn.UNION_UPPER;default:return e}}Wn.operationTypeNodeToDefaultType=new Map([[Mt.OperationTypeNode.MUTATION,Rn.MUTATION],[Mt.OperationTypeNode.QUERY,Rn.QUERY],[Mt.OperationTypeNode.SUBSCRIPTION,Rn.SUBSCRIPTION]]);function U7(e){return e===Mt.Kind.INTERFACE_TYPE_DEFINITION||e===Mt.Kind.UNION_TYPE_DEFINITION}function k7(e,t){for(let n of e){let r=n.value;Rn.EXECUTABLE_DIRECTIVE_LOCATIONS.has(r)&&t.add(r)}return t}function M7(e){if(!e)return e;let t=e.value;if(e.block){let n=t.split(` +`;R.LITERAL_PERIOD=".";R.NUMBER="number";R.MUTATION="Mutation";R.MUTATION_UPPER="MUTATION";R.PROPAGATE="propagate";R.PROVIDER_TYPE_KAFKA="kafka";R.PROVIDER_TYPE_NATS="nats";R.PROVIDER_TYPE_REDIS="redis";R.NOT_APPLICABLE="N/A";R.NAME="name";R.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT="edfs__PublishResult!";R.NON_NULLABLE_BOOLEAN="Boolean!";R.NON_NULLABLE_INT="Int!";R.NON_NULLABLE_STRING="String!";R.NOT_UPPER="NOT";R.NULL="Null";R.ONE_OF="oneOf";R.OPERATION_TO_DEFAULT="operationTypeNodeToDefaultType";R.OBJECT="Object";R.OBJECT_UPPER="OBJECT";R.OR_UPPER="OR";R.OVERRIDE="override";R.PARENT_DEFINITION_DATA="parentDefinitionDataByTypeName";R.PARENT_DEFINITION_DATA_MAP="parentDefinitionDataByParentTypeName";R.PARENT_EXTENSION_DATA_MAP="parentExtensionDataByParentTypeName";R.PROVIDER_ID="providerId";R.PROVIDES="provides";R.PUBLISH="publish";R.QUERY="Query";R.QUERY_UPPER="QUERY";R.QUOTATION_JOIN='", "';R.REASON="reason";R.REQUEST="request";R.REQUIRE_FETCH_REASONS="openfed__requireFetchReasons";R.REQUIRES="requires";R.REQUIRES_SCOPES="requiresScopes";R.RESOLVABLE="resolvable";R.SCALAR="Scalar";R.SCALAR_UPPER="SCALAR";R.SCHEMA="schema";R.SCHEMA_UPPER="SCHEMA";R.SCOPES="scopes";R.SCOPE_SCALAR="openfed__Scope";R.SECURITY="SECURITY";R.SELECTION_REPRESENTATION=" { ... }";R.SEMANTIC_NON_NULL="semanticNonNull";R.SERVICE_OBJECT="_Service";R.SERVICE_FIELD="_service";R.SHAREABLE="shareable";R.SPECIFIED_BY="specifiedBy";R.STREAM_CONFIGURATION="streamConfiguration";R.STREAM_NAME="streamName";R.STRING="string";R.STRING_SCALAR="String";R.SUBJECT="subject";R.SUBJECTS="subjects";R.SUBSCRIPTION="Subscription";R.SUBSCRIPTION_FIELD_CONDITION="openfed__SubscriptionFieldCondition";R.SUBSCRIPTION_FILTER="openfed__subscriptionFilter";R.SUBSCRIPTION_FILTER_CONDITION="openfed__SubscriptionFilterCondition";R.SUBSCRIPTION_FILTER_VALUE="openfed__SubscriptionFilterValue";R.SUBSCRIBE="subscribe";R.SUBSCRIPTION_UPPER="SUBSCRIPTION";R.SUCCESS="success";R.TAG="tag";R.TOPIC="topic";R.TOPICS="topics";R.TYPENAME="__typename";R.UNION="Union";R.UNION_UPPER="UNION";R.URL_LOWER="url";R.VALUES="values";R.VARIABLE_DEFINITION_UPPER="VARIABLE_DEFINITION";R.EXECUTABLE_DIRECTIVE_LOCATIONS=new Set([R.FIELD_UPPER,R.FRAGMENT_DEFINITION_UPPER,R.FRAGMENT_SPREAD_UPPER,R.INLINE_FRAGMENT_UPPER,R.MUTATION_UPPER,R.QUERY_UPPER,R.SUBSCRIPTION_UPPER]);R.ROOT_TYPE_NAMES=new Set([R.MUTATION,R.QUERY,R.SUBSCRIPTION]);R.AUTHORIZATION_DIRECTIVES=new Set([R.AUTHENTICATED,R.REQUIRES_SCOPES]);R.PERSISTED_CLIENT_DIRECTIVES=new Set([R.DEPRECATED,R.ONE_OF,R.SEMANTIC_NON_NULL]);R.INHERITABLE_DIRECTIVE_NAMES=new Set([R.EXTERNAL,R.REQUIRE_FETCH_REASONS,R.SHAREABLE]);R.IGNORED_FIELDS=new Set([R.ENTITIES_FIELD,R.SERVICE_FIELD]);R.INPUT_NODE_KINDS=new Set([vu.Kind.ENUM_TYPE_DEFINITION,vu.Kind.INPUT_OBJECT_TYPE_DEFINITION,vu.Kind.SCALAR_TYPE_DEFINITION]);R.OUTPUT_NODE_KINDS=new Set([vu.Kind.ENUM_TYPE_DEFINITION,vu.Kind.INTERFACE_TYPE_DEFINITION,vu.Kind.OBJECT_TYPE_DEFINITION,vu.Kind.SCALAR_TYPE_DEFINITION,vu.Kind.UNION_TYPE_DEFINITION]);R.NON_REPEATABLE_PERSISTED_DIRECTIVES=new Set([R.INACCESSIBLE,R.ONE_OF,R.SEMANTIC_NON_NULL])});var Fr=F(Wn=>{"use strict";m();T();N();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.operationTypeNodeToDefaultType=void 0;Wn.isObjectLikeNodeEntity=U7;Wn.isNodeInterfaceObject=k7;Wn.stringToNameNode=NT;Wn.stringArrayToNameNodeArray=M7;Wn.setToNameNodeArray=x7;Wn.stringToNamedTypeNode=IB;Wn.setToNamedTypeNodeArray=q7;Wn.nodeKindToDirectiveLocation=V7;Wn.isKindAbstract=j7;Wn.extractExecutableDirectiveLocations=K7;Wn.formatDescription=$7;Wn.lexicographicallySortArgumentNodes=gB;Wn.lexicographicallySortSelectionSetNode=mT;Wn.lexicographicallySortDocumentNode=G7;Wn.parse=_B;Wn.safeParse=Q7;var xt=_e(),Rn=zn();function U7(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Rn.KEY)return!0;return!1}function k7(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Rn.INTERFACE_OBJECT)return!0;return!1}function NT(e){return{kind:xt.Kind.NAME,value:e}}function M7(e){let t=[];for(let n of e)t.push(NT(n));return t}function x7(e){let t=[];for(let n of e)t.push(NT(n));return t}function IB(e){return{kind:xt.Kind.NAMED_TYPE,name:NT(e)}}function q7(e){let t=[];for(let n of e)t.push(IB(n));return t}function V7(e){switch(e){case xt.Kind.ARGUMENT:return Rn.ARGUMENT_DEFINITION_UPPER;case xt.Kind.ENUM_TYPE_DEFINITION:case xt.Kind.ENUM_TYPE_EXTENSION:return Rn.ENUM_UPPER;case xt.Kind.ENUM_VALUE_DEFINITION:return Rn.ENUM_VALUE_UPPER;case xt.Kind.FIELD_DEFINITION:return Rn.FIELD_DEFINITION_UPPER;case xt.Kind.FRAGMENT_DEFINITION:return Rn.FRAGMENT_DEFINITION_UPPER;case xt.Kind.FRAGMENT_SPREAD:return Rn.FRAGMENT_SPREAD_UPPER;case xt.Kind.INLINE_FRAGMENT:return Rn.INLINE_FRAGMENT_UPPER;case xt.Kind.INPUT_VALUE_DEFINITION:return Rn.INPUT_FIELD_DEFINITION_UPPER;case xt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case xt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return Rn.INPUT_OBJECT_UPPER;case xt.Kind.INTERFACE_TYPE_DEFINITION:case xt.Kind.INTERFACE_TYPE_EXTENSION:return Rn.INTERFACE_UPPER;case xt.Kind.OBJECT_TYPE_DEFINITION:case xt.Kind.OBJECT_TYPE_EXTENSION:return Rn.OBJECT_UPPER;case xt.Kind.SCALAR_TYPE_DEFINITION:case xt.Kind.SCALAR_TYPE_EXTENSION:return Rn.SCALAR_UPPER;case xt.Kind.SCHEMA_DEFINITION:case xt.Kind.SCHEMA_EXTENSION:return Rn.SCHEMA_UPPER;case xt.Kind.UNION_TYPE_DEFINITION:case xt.Kind.UNION_TYPE_EXTENSION:return Rn.UNION_UPPER;default:return e}}Wn.operationTypeNodeToDefaultType=new Map([[xt.OperationTypeNode.MUTATION,Rn.MUTATION],[xt.OperationTypeNode.QUERY,Rn.QUERY],[xt.OperationTypeNode.SUBSCRIPTION,Rn.SUBSCRIPTION]]);function j7(e){return e===xt.Kind.INTERFACE_TYPE_DEFINITION||e===xt.Kind.UNION_TYPE_DEFINITION}function K7(e,t){for(let n of e){let r=n.value;Rn.EXECUTABLE_DIRECTIVE_LOCATIONS.has(r)&&t.add(r)}return t}function $7(e){if(!e)return e;let t=e.value;if(e.block){let n=t.split(` `);n.length>1&&(t=n.map(r=>r.trimStart()).join(` -`))}return $(k({},e),{value:t,block:!0})}function gB(e){return e.arguments?e.arguments.sort((n,r)=>n.name.value.localeCompare(r.name.value)):e.arguments}function mT(e){let t=e.selections;return $(k({},e),{selections:t.sort((n,r)=>{var a,o,u,l;return Rn.NAME in n?Rn.NAME in r?n.name.value.localeCompare(r.name.value):-1:Rn.NAME in r?1:((o=(a=n.typeCondition)==null?void 0:a.name.value)!=null?o:"").localeCompare((l=(u=r.typeCondition)==null?void 0:u.name.value)!=null?l:"")}).map(n=>{switch(n.kind){case Mt.Kind.FIELD:return $(k({},n),{arguments:gB(n),selectionSet:n.selectionSet?mT(n.selectionSet):n.selectionSet});case Mt.Kind.FRAGMENT_SPREAD:return n;case Mt.Kind.INLINE_FRAGMENT:return $(k({},n),{selectionSet:mT(n.selectionSet)})}})})}function x7(e){return $(k({},e),{definitions:e.definitions.map(t=>t.kind!==Mt.Kind.OPERATION_DEFINITION?t:$(k({},t),{selectionSet:mT(t.selectionSet)}))})}function _B(e,t=!0){return(0,Mt.parse)(e,{noLocation:t})}function q7(e,t=!0){try{return{documentNode:_B(e,t)}}catch(n){return{error:n}}}});var SB=w(xl=>{"use strict";m();T();N();Object.defineProperty(xl,"__esModule",{value:!0});xl.AccumulatorMap=void 0;xl.mapValue=Ml;xl.extendSchemaImpl=V7;var Be=Ie(),Ls=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};xl.AccumulatorMap=Ls;function Ml(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function V7(e,t,n){var De,ge,Le,St;let r=[],i=new Ls,a=new Ls,o=new Ls,u=new Ls,l=new Ls,d=new Ls,p=[],E,I=[],v=!1;for(let Y of t.definitions){switch(Y.kind){case Be.Kind.SCHEMA_DEFINITION:E=Y;break;case Be.Kind.SCHEMA_EXTENSION:I.push(Y);break;case Be.Kind.DIRECTIVE_DEFINITION:p.push(Y);break;case Be.Kind.SCALAR_TYPE_DEFINITION:case Be.Kind.OBJECT_TYPE_DEFINITION:case Be.Kind.INTERFACE_TYPE_DEFINITION:case Be.Kind.UNION_TYPE_DEFINITION:case Be.Kind.ENUM_TYPE_DEFINITION:case Be.Kind.INPUT_OBJECT_TYPE_DEFINITION:r.push(Y);break;case Be.Kind.SCALAR_TYPE_EXTENSION:i.add(Y.name.value,Y);break;case Be.Kind.OBJECT_TYPE_EXTENSION:a.add(Y.name.value,Y);break;case Be.Kind.INTERFACE_TYPE_EXTENSION:o.add(Y.name.value,Y);break;case Be.Kind.UNION_TYPE_EXTENSION:u.add(Y.name.value,Y);break;case Be.Kind.ENUM_TYPE_EXTENSION:l.add(Y.name.value,Y);break;case Be.Kind.INPUT_OBJECT_TYPE_EXTENSION:d.add(Y.name.value,Y);break;default:continue}v=!0}if(!v)return e;let A=new Map;for(let Y of e.types){let ie=ne(Y);ie&&A.set(Y.name,ie)}for(let Y of r){let ie=Y.name.value;A.set(ie,(De=vB.get(ie))!=null?De:ae(Y))}for(let[Y,ie]of a)A.set(Y,new Be.GraphQLObjectType({name:Y,interfaces:()=>Ht(ie),fields:()=>an(ie),extensionASTNodes:ie}));if(n!=null&&n.addInvalidExtensionOrphans){for(let[Y,ie]of o)A.set(Y,new Be.GraphQLInterfaceType({name:Y,interfaces:()=>Ht(ie),fields:()=>an(ie),extensionASTNodes:ie}));for(let[Y,ie]of l)A.set(Y,new Be.GraphQLEnumType({name:Y,values:En(ie),extensionASTNodes:ie}));for(let[Y,ie]of u)A.set(Y,new Be.GraphQLUnionType({name:Y,types:()=>Ln(ie),extensionASTNodes:ie}));for(let[Y,ie]of i)A.set(Y,new Be.GraphQLScalarType({name:Y,extensionASTNodes:ie}));for(let[Y,ie]of d)A.set(Y,new Be.GraphQLInputObjectType({name:Y,fields:()=>nr(ie),extensionASTNodes:ie}))}let U=k(k({query:e.query&&Q(e.query),mutation:e.mutation&&Q(e.mutation),subscription:e.subscription&&Q(e.subscription)},E&&rn([E])),rn(I));return $(k({description:(Le=(ge=E==null?void 0:E.description)==null?void 0:ge.value)!=null?Le:e.description},U),{types:Array.from(A.values()),directives:[...e.directives.map(ee),...p.map(xt)],extensions:e.extensions,astNode:E!=null?E:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(I),assumeValid:(St=n==null?void 0:n.assumeValid)!=null?St:!1});function j(Y){return(0,Be.isListType)(Y)?new Be.GraphQLList(j(Y.ofType)):(0,Be.isNonNullType)(Y)?new Be.GraphQLNonNull(j(Y.ofType)):Q(Y)}function Q(Y){return A.get(Y.name)}function ee(Y){if((0,Be.isSpecifiedDirective)(Y))return Y;let ie=Y.toConfig();return new Be.GraphQLDirective($(k({},ie),{args:Ml(ie.args,gt)}))}function ne(Y){if((0,Be.isIntrospectionType)(Y)||(0,Be.isSpecifiedScalarType)(Y))return Y;if((0,Be.isScalarType)(Y))return Ae(Y);if((0,Be.isObjectType)(Y))return Me(Y);if((0,Be.isInterfaceType)(Y))return Ze(Y);if((0,Be.isUnionType)(Y))return Z(Y);if((0,Be.isEnumType)(Y))return le(Y);if((0,Be.isInputObjectType)(Y))return pe(Y)}function pe(Y){var He;let ie=Y.toConfig(),xe=(He=d.get(ie.name))!=null?He:[];return new Be.GraphQLInputObjectType($(k({},ie),{fields:()=>k(k({},Ml(ie.fields,Bt=>$(k({},Bt),{type:j(Bt.type)}))),nr(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function le(Y){var He;let ie=Y.toConfig(),xe=(He=l.get(Y.name))!=null?He:[];return new Be.GraphQLEnumType($(k({},ie),{values:k(k({},ie.values),En(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Ae(Y){var Bt,it;let ie=Y.toConfig(),xe=(Bt=i.get(ie.name))!=null?Bt:[],He=ie.specifiedByURL;for(let Pt of xe)He=(it=OB(Pt))!=null?it:He;return new Be.GraphQLScalarType($(k({},ie),{specifiedByURL:He,extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Me(Y){var He;let ie=Y.toConfig(),xe=(He=a.get(ie.name))!=null?He:[];return new Be.GraphQLObjectType($(k({},ie),{interfaces:()=>[...Y.getInterfaces().map(Q),...Ht(xe)],fields:()=>k(k({},Ml(ie.fields,ve)),an(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Ze(Y){var He;let ie=Y.toConfig(),xe=(He=o.get(ie.name))!=null?He:[];return new Be.GraphQLInterfaceType($(k({},ie),{interfaces:()=>[...Y.getInterfaces().map(Q),...Ht(xe)],fields:()=>k(k({},Ml(ie.fields,ve)),an(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Z(Y){var He;let ie=Y.toConfig(),xe=(He=u.get(ie.name))!=null?He:[];return new Be.GraphQLUnionType($(k({},ie),{types:()=>[...Y.getTypes().map(Q),...Ln(xe)],extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function ve(Y){return $(k({},Y),{type:j(Y.type),args:Y.args&&Ml(Y.args,gt)})}function gt(Y){return $(k({},Y),{type:j(Y.type)})}function rn(Y){var xe;let ie={};for(let He of Y){let Bt=(xe=He.operationTypes)!=null?xe:[];for(let it of Bt)ie[it.operation]=un(it.type)}return ie}function un(Y){var He;let ie=Y.name.value,xe=(He=vB.get(ie))!=null?He:A.get(ie);if(xe===void 0)throw new Error(`Unknown type: "${ie}".`);return xe}function In(Y){return Y.kind===Be.Kind.LIST_TYPE?new Be.GraphQLList(In(Y.type)):Y.kind===Be.Kind.NON_NULL_TYPE?new Be.GraphQLNonNull(In(Y.type)):un(Y)}function xt(Y){var ie;return new Be.GraphQLDirective({name:Y.name.value,description:(ie=Y.description)==null?void 0:ie.value,locations:Y.locations.map(({value:xe})=>xe),isRepeatable:Y.repeatable,args:kr(Y.arguments),astNode:Y})}function an(Y){var xe,He;let ie=Object.create(null);for(let Bt of Y){let it=(xe=Bt.fields)!=null?xe:[];for(let Pt of it)ie[Pt.name.value]={type:In(Pt.type),description:(He=Pt.description)==null?void 0:He.value,args:kr(Pt.arguments),deprecationReason:TT(Pt),astNode:Pt}}return ie}function kr(Y){var He;let ie=Y!=null?Y:[],xe=Object.create(null);for(let Bt of ie){let it=In(Bt.type);xe[Bt.name.value]={type:it,description:(He=Bt.description)==null?void 0:He.value,defaultValue:(0,Be.valueFromAST)(Bt.defaultValue,it),deprecationReason:TT(Bt),astNode:Bt}}return xe}function nr(Y){var xe,He;let ie=Object.create(null);for(let Bt of Y){let it=(xe=Bt.fields)!=null?xe:[];for(let Pt of it){let ps=In(Pt.type);ie[Pt.name.value]={type:ps,description:(He=Pt.description)==null?void 0:He.value,defaultValue:(0,Be.valueFromAST)(Pt.defaultValue,ps),deprecationReason:TT(Pt),astNode:Pt}}}return ie}function En(Y){var xe,He;let ie=Object.create(null);for(let Bt of Y){let it=(xe=Bt.values)!=null?xe:[];for(let Pt of it)ie[Pt.name.value]={description:(He=Pt.description)==null?void 0:He.value,deprecationReason:TT(Pt),astNode:Pt}}return ie}function Ht(Y){return Y.flatMap(ie=>{var xe,He;return(He=(xe=ie.interfaces)==null?void 0:xe.map(un))!=null?He:[]})}function Ln(Y){return Y.flatMap(ie=>{var xe,He;return(He=(xe=ie.types)==null?void 0:xe.map(un))!=null?He:[]})}function ae(Y){var xe,He,Bt,it,Pt,ps,Yr,ms,rl,Ua,Ir,ui;let ie=Y.name.value;switch(Y.kind){case Be.Kind.OBJECT_TYPE_DEFINITION:{let qt=(xe=a.get(ie))!=null?xe:[],gr=[Y,...qt];return a.delete(ie),new Be.GraphQLObjectType({name:ie,description:(He=Y.description)==null?void 0:He.value,interfaces:()=>Ht(gr),fields:()=>an(gr),astNode:Y,extensionASTNodes:qt})}case Be.Kind.INTERFACE_TYPE_DEFINITION:{let qt=(Bt=o.get(ie))!=null?Bt:[],gr=[Y,...qt];return o.delete(ie),new Be.GraphQLInterfaceType({name:ie,description:(it=Y.description)==null?void 0:it.value,interfaces:()=>Ht(gr),fields:()=>an(gr),astNode:Y,extensionASTNodes:qt})}case Be.Kind.ENUM_TYPE_DEFINITION:{let qt=(Pt=l.get(ie))!=null?Pt:[],gr=[Y,...qt];return l.delete(ie),new Be.GraphQLEnumType({name:ie,description:(ps=Y.description)==null?void 0:ps.value,values:En(gr),astNode:Y,extensionASTNodes:qt})}case Be.Kind.UNION_TYPE_DEFINITION:{let qt=(Yr=u.get(ie))!=null?Yr:[],gr=[Y,...qt];return u.delete(ie),new Be.GraphQLUnionType({name:ie,description:(ms=Y.description)==null?void 0:ms.value,types:()=>Ln(gr),astNode:Y,extensionASTNodes:qt})}case Be.Kind.SCALAR_TYPE_DEFINITION:{let qt=(rl=i.get(ie))!=null?rl:[];return i.delete(ie),new Be.GraphQLScalarType({name:ie,description:(Ua=Y.description)==null?void 0:Ua.value,specifiedByURL:OB(Y),astNode:Y,extensionASTNodes:qt})}case Be.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let qt=(Ir=d.get(ie))!=null?Ir:[],gr=[Y,...qt];return d.delete(ie),new Be.GraphQLInputObjectType({name:ie,description:(ui=Y.description)==null?void 0:ui.value,fields:()=>nr(gr),astNode:Y,extensionASTNodes:qt})}}}}var vB=new Map([...Be.specifiedScalarTypes,...Be.introspectionTypes].map(e=>[e.name,e]));function TT(e){let t=(0,Be.getDirectiveValues)(Be.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function OB(e){let t=(0,Be.getDirectiveValues)(Be.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}});var Vv=w(qv=>{"use strict";m();T();N();Object.defineProperty(qv,"__esModule",{value:!0});qv.buildASTSchema=$7;var DB=Ie(),j7=Bl(),K7=SB();function $7(e,t){(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,j7.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,K7.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}let i=[...r.directives,...DB.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new DB.GraphQLSchema($(k({},r),{directives:i}))}});var ql=w(Ou=>{"use strict";m();T();N();Object.defineProperty(Ou,"__esModule",{value:!0});Ou.MAX_INT32=Ou.MAX_SUBSCRIPTION_FILTER_DEPTH=Ou.MAXIMUM_TYPE_NESTING=void 0;Ou.MAXIMUM_TYPE_NESTING=30;Ou.MAX_SUBSCRIPTION_FILTER_DEPTH=5;Ou.MAX_INT32=ln(2,31)-1});var wr=w(cr=>{"use strict";m();T();N();Object.defineProperty(cr,"__esModule",{value:!0});cr.getOrThrowError=Q7;cr.getEntriesNotInHashSet=Y7;cr.numberToOrdinal=J7;cr.addIterableToSet=H7;cr.addOptionalIterableToSet=z7;cr.addSets=W7;cr.kindToNodeType=X7;cr.getValueOrDefault=Z7;cr.add=eZ;cr.generateSimpleDirective=tZ;cr.generateRequiresScopesDirective=nZ;cr.generateSemanticNonNullDirective=rZ;cr.copyObjectValueMap=iZ;cr.addNewObjectValueMapEntries=aZ;cr.copyArrayValueMap=sZ;cr.addMapEntries=oZ;cr.getFirstEntry=uZ;var jt=Ie(),Tr=zn(),G7=$i(),$f=Fr();function Q7(e,t,n){let r=e.get(t);if(r===void 0)throw(0,G7.invalidKeyFatalError)(t,n);return r}function Y7(e,t){let n=[];for(let r of e)t.has(r)||n.push(r);return n}function J7(e){let t=e.toString();switch(t[t.length-1]){case"1":return`${t}st`;case"2":return`${t}nd`;case"3":return`${t}rd`;default:return`${t}th`}}function H7({source:e,target:t}){for(let n of e)t.add(n)}function z7({source:e,target:t}){if(e)for(let n of e)t.add(n)}function W7(e,t){let n=new Set(e);for(let r of t)n.add(r);return n}function X7(e){switch(e){case jt.Kind.BOOLEAN:return Tr.BOOLEAN_SCALAR;case jt.Kind.ENUM:case jt.Kind.ENUM_TYPE_DEFINITION:return Tr.ENUM;case jt.Kind.ENUM_TYPE_EXTENSION:return"Enum extension";case jt.Kind.ENUM_VALUE_DEFINITION:return Tr.ENUM_VALUE;case jt.Kind.FIELD_DEFINITION:return Tr.FIELD;case jt.Kind.FLOAT:return Tr.FLOAT_SCALAR;case jt.Kind.INPUT_OBJECT_TYPE_DEFINITION:return Tr.INPUT_OBJECT;case jt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"Input Object extension";case jt.Kind.INPUT_VALUE_DEFINITION:return Tr.INPUT_VALUE;case jt.Kind.INT:return Tr.INT_SCALAR;case jt.Kind.INTERFACE_TYPE_DEFINITION:return Tr.INTERFACE;case jt.Kind.INTERFACE_TYPE_EXTENSION:return"Interface extension";case jt.Kind.NULL:return Tr.NULL;case jt.Kind.OBJECT:case jt.Kind.OBJECT_TYPE_DEFINITION:return Tr.OBJECT;case jt.Kind.OBJECT_TYPE_EXTENSION:return"Object extension";case jt.Kind.STRING:return Tr.STRING_SCALAR;case jt.Kind.SCALAR_TYPE_DEFINITION:return Tr.SCALAR;case jt.Kind.SCALAR_TYPE_EXTENSION:return"Scalar extension";case jt.Kind.UNION_TYPE_DEFINITION:return Tr.UNION;case jt.Kind.UNION_TYPE_EXTENSION:return"Union extension";default:return e}}function Z7(e,t,n){let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i}function eZ(e,t){return e.has(t)?!1:(e.add(t),!0)}function tZ(e){return{kind:jt.Kind.DIRECTIVE,name:(0,$f.stringToNameNode)(e)}}function nZ(e){let t=[];for(let n of e){let r=[];for(let i of n)r.push({kind:jt.Kind.STRING,value:i});t.push({kind:jt.Kind.LIST,values:r})}return{kind:jt.Kind.DIRECTIVE,name:(0,$f.stringToNameNode)(Tr.REQUIRES_SCOPES),arguments:[{kind:jt.Kind.ARGUMENT,name:(0,$f.stringToNameNode)(Tr.SCOPES),value:{kind:jt.Kind.LIST,values:t}}]}}function rZ(e){let t=Array.from(e).sort((r,i)=>r-i),n=new Array;for(let r of t)n.push({kind:jt.Kind.INT,value:r.toString()});return{kind:jt.Kind.DIRECTIVE,name:(0,$f.stringToNameNode)(Tr.SEMANTIC_NON_NULL),arguments:[{kind:jt.Kind.ARGUMENT,name:(0,$f.stringToNameNode)(Tr.LEVELS),value:{kind:jt.Kind.LIST,values:n}}]}}function iZ(e){let t=new Map;for(let[n,r]of e)t.set(n,k({},r));return t}function aZ(e,t){for(let[n,r]of e)t.set(n,k({},r))}function sZ(e){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function oZ({source:e,target:t}){for(let[n,r]of e)t.set(n,r)}function uZ(e){let{value:t,done:n}=e.values().next();if(!n)return t}});var Gf=w(ET=>{"use strict";m();T();N();Object.defineProperty(ET,"__esModule",{value:!0});ET.ExtensionType=void 0;var bB;(function(e){e[e.EXTENDS=0]="EXTENDS",e[e.NONE=1]="NONE",e[e.REAL=2]="REAL"})(bB||(ET.ExtensionType=bB={}))});var Su=w(Cr=>{"use strict";m();T();N();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.getMutableDirectiveDefinitionNode=lZ;Cr.getMutableEnumNode=dZ;Cr.getMutableEnumValueNode=fZ;Cr.getMutableFieldNode=pZ;Cr.getMutableInputObjectNode=mZ;Cr.getMutableInputValueNode=NZ;Cr.getMutableInterfaceNode=TZ;Cr.getMutableObjectNode=EZ;Cr.getMutableObjectExtensionNode=hZ;Cr.getMutableScalarNode=yZ;Cr.getMutableTypeNode=jv;Cr.getMutableUnionNode=IZ;Cr.getTypeNodeNamedTypeName=Kv;Cr.getNamedTypeNode=RB;var Lr=Ie(),Vl=Fr(),AB=$i(),cZ=ql();function lZ(e){return{arguments:[],kind:e.kind,locations:[],name:k({},e.name),repeatable:e.repeatable,description:(0,Vl.formatDescription)(e.description)}}function dZ(e){return{kind:Lr.Kind.ENUM_TYPE_DEFINITION,name:k({},e)}}function fZ(e){return{directives:[],kind:e.kind,name:k({},e.name),description:(0,Vl.formatDescription)(e.description)}}function pZ(e,t,n){return{arguments:[],directives:[],kind:e.kind,name:k({},e.name),type:jv(e.type,t,n),description:(0,Vl.formatDescription)(e.description)}}function mZ(e){return{kind:Lr.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:k({},e)}}function NZ(e,t,n){return{directives:[],kind:e.kind,name:k({},e.name),type:jv(e.type,t,n),defaultValue:e.defaultValue,description:(0,Vl.formatDescription)(e.description)}}function TZ(e){return{kind:Lr.Kind.INTERFACE_TYPE_DEFINITION,name:k({},e)}}function EZ(e){return{kind:Lr.Kind.OBJECT_TYPE_DEFINITION,name:k({},e)}}function hZ(e){let t=e.kind===Lr.Kind.OBJECT_TYPE_DEFINITION?e.description:void 0;return{kind:Lr.Kind.OBJECT_TYPE_EXTENSION,name:k({},e.name),description:(0,Vl.formatDescription)(t)}}function yZ(e){return{kind:Lr.Kind.SCALAR_TYPE_DEFINITION,name:k({},e)}}function jv(e,t,n){let r={kind:e.kind},i=r;for(let a=0;a{"use strict";m();T();N();Object.defineProperty(jl,"__esModule",{value:!0});jl.REQUIRED_FIELDSET_TYPE_NODE=jl.REQUIRED_STRING_TYPE_NODE=void 0;var PB=Ie(),FB=Fr(),wB=zn();jl.REQUIRED_STRING_TYPE_NODE={kind:PB.Kind.NON_NULL_TYPE,type:(0,FB.stringToNamedTypeNode)(wB.STRING_SCALAR)};jl.REQUIRED_FIELDSET_TYPE_NODE={kind:PB.Kind.NON_NULL_TYPE,type:(0,FB.stringToNamedTypeNode)(wB.FIELD_SET_SCALAR)}});var Qf=w(je=>{"use strict";m();T();N();Object.defineProperty(je,"__esModule",{value:!0});je.TAG_DEFINITION=je.SUBSCRIPTION_FILTER_DEFINITION=je.SPECIFIED_BY_DEFINITION=je.SHAREABLE_DEFINITION=je.SEMANTIC_NON_NULL_DEFINITION=je.REQUIRES_SCOPES_DEFINITION=je.REQUIRES_DEFINITION=je.REQUIRE_FETCH_REASONS_DEFINITION=je.PROVIDES_DEFINITION=je.OVERRIDE_DEFINITION=je.ONE_OF_DEFINITION=je.LINK_DEFINITION=je.KEY_DEFINITION=je.INTERFACE_OBJECT_DEFINITION=je.INACCESSIBLE_DEFINITION=je.EDFS_REDIS_SUBSCRIBE_DEFINITION=je.EDFS_REDIS_PUBLISH_DEFINITION=je.EDFS_NATS_SUBSCRIBE_DEFINITION=je.EDFS_NATS_REQUEST_DEFINITION=je.EDFS_NATS_PUBLISH_DEFINITION=je.EDFS_KAFKA_SUBSCRIBE_DEFINITION=je.EDFS_KAFKA_PUBLISH_DEFINITION=je.EXTERNAL_DEFINITION=je.EXTENDS_DEFINITION=je.DEPRECATED_DEFINITION=je.CONNECT_FIELD_RESOLVER_DEFINITION=je.CONFIGURE_DESCRIPTION_DEFINITION=je.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION=je.COMPOSE_DIRECTIVE_DEFINITION=je.AUTHENTICATED_DEFINITION=void 0;var Ee=Ie(),me=Fr(),H=zn(),vr=hT();je.AUTHENTICATED_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER]),name:(0,me.stringToNameNode)(H.AUTHENTICATED),repeatable:!1};je.COMPOSE_DIRECTIVE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.NAME),type:vr.REQUIRED_STRING_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.SCHEMA_UPPER]),name:(0,me.stringToNameNode)(H.COMPOSE_DIRECTIVE),repeatable:!0};je.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROPAGATE),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.BOOLEAN_SCALAR)},defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.CONFIGURE_CHILD_DESCRIPTIONS),repeatable:!1};je.CONFIGURE_DESCRIPTION_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROPAGATE),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.BOOLEAN_SCALAR)},defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}},{directives:[],kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.DESCRIPTION_OVERRIDE),type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.INPUT_OBJECT_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.SCHEMA_UPPER,H.UNION_UPPER]),name:(0,me.stringToNameNode)(H.CONFIGURE_DESCRIPTION),repeatable:!1};je.CONNECT_FIELD_RESOLVER_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.CONTEXT),type:vr.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,me.stringToNameNode)(H.CONNECT_FIELD_RESOLVER),repeatable:!1};je.DEPRECATED_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.REASON),type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR),defaultValue:{kind:Ee.Kind.STRING,value:Ee.DEFAULT_DEPRECATION_REASON}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER]),name:(0,me.stringToNameNode)(H.DEPRECATED),repeatable:!1};je.EXTENDS_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.EXTENDS),repeatable:!1};je.EXTERNAL_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.EXTERNAL),repeatable:!1};je.EDFS_KAFKA_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.TOPIC),type:vr.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_KAFKA_PUBLISH),repeatable:!1};je.EDFS_KAFKA_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.TOPICS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:vr.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_KAFKA_SUBSCRIBE),repeatable:!1};je.EDFS_NATS_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.SUBJECT),type:vr.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)},defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_NATS_PUBLISH),repeatable:!1};je.EDFS_NATS_REQUEST_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.SUBJECT),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)},defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_NATS_REQUEST),repeatable:!1};je.EDFS_NATS_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.SUBJECTS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:vr.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.STREAM_CONFIGURATION),type:(0,me.stringToNamedTypeNode)(H.EDFS_NATS_STREAM_CONFIGURATION)}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_NATS_SUBSCRIBE),repeatable:!1};je.EDFS_REDIS_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.CHANNEL),type:vr.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_REDIS_PUBLISH),repeatable:!1};je.EDFS_REDIS_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.CHANNELS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:vr.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_REDIS_SUBSCRIBE),repeatable:!1};je.INACCESSIBLE_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.UNION_UPPER]),name:(0,me.stringToNameNode)(H.INACCESSIBLE),repeatable:!1};je.INTERFACE_OBJECT_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.INTERFACE_OBJECT),repeatable:!1};je.KEY_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.FIELDS),type:vr.REQUIRED_FIELDSET_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.RESOLVABLE),type:(0,me.stringToNamedTypeNode)(H.BOOLEAN_SCALAR),defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.KEY),repeatable:!0};je.LINK_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.URL_LOWER),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.AS),type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.FOR),type:(0,me.stringToNamedTypeNode)(H.LINK_PURPOSE)},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.IMPORT),type:{kind:Ee.Kind.LIST_TYPE,type:(0,me.stringToNamedTypeNode)(H.LINK_IMPORT)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.SCHEMA_UPPER]),name:(0,me.stringToNameNode)(H.LINK),repeatable:!0};je.ONE_OF_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.INPUT_OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.ONE_OF),repeatable:!1};je.OVERRIDE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.FROM),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,me.stringToNameNode)(H.OVERRIDE),repeatable:!1};je.PROVIDES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.FIELDS),type:vr.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.PROVIDES),repeatable:!1};je.REQUIRE_FETCH_REASONS_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.REQUIRE_FETCH_REASONS),repeatable:!0};je.REQUIRES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.FIELDS),type:vr.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.REQUIRES),repeatable:!1};je.REQUIRES_SCOPES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.SCOPES),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.SCOPE_SCALAR)}}}}}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER]),name:(0,me.stringToNameNode)(H.REQUIRES_SCOPES),repeatable:!1};je.SEMANTIC_NON_NULL_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.LEVELS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.INT_SCALAR)}}},defaultValue:{kind:Ee.Kind.LIST,values:[{kind:Ee.Kind.INT,value:"0"}]}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.SEMANTIC_NON_NULL),repeatable:!1};je.SHAREABLE_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.SHAREABLE),repeatable:!0};je.SPECIFIED_BY_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.URL_LOWER),type:vr.REQUIRED_STRING_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.SCALAR_UPPER]),name:(0,me.stringToNameNode)(H.SPECIFIED_BY),repeatable:!1};je.SUBSCRIPTION_FILTER_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.CONDITION),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.SUBSCRIPTION_FILTER_CONDITION)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,me.stringToNameNode)(H.SUBSCRIPTION_FILTER),repeatable:!1};je.TAG_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.NAME),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.UNION_UPPER]),name:(0,me.stringToNameNode)(H.TAG),repeatable:!0}});var Du=w(Gi=>{"use strict";m();T();N();Object.defineProperty(Gi,"__esModule",{value:!0});Gi.MAX_OR_SCOPES=Gi.EDFS_ARGS_REGEXP=Gi.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=Gi.BASE_SCALARS=Gi.DIRECTIVE_DEFINITION_BY_NAME=void 0;var ut=zn(),Ot=Qf();Gi.DIRECTIVE_DEFINITION_BY_NAME=new Map([[ut.AUTHENTICATED,Ot.AUTHENTICATED_DEFINITION],[ut.COMPOSE_DIRECTIVE,Ot.COMPOSE_DIRECTIVE_DEFINITION],[ut.CONFIGURE_DESCRIPTION,Ot.CONFIGURE_DESCRIPTION_DEFINITION],[ut.CONFIGURE_CHILD_DESCRIPTIONS,Ot.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION],[ut.CONNECT_FIELD_RESOLVER,Ot.CONNECT_FIELD_RESOLVER_DEFINITION],[ut.DEPRECATED,Ot.DEPRECATED_DEFINITION],[ut.EDFS_KAFKA_PUBLISH,Ot.EDFS_KAFKA_PUBLISH_DEFINITION],[ut.EDFS_KAFKA_SUBSCRIBE,Ot.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[ut.EDFS_NATS_PUBLISH,Ot.EDFS_NATS_PUBLISH_DEFINITION],[ut.EDFS_NATS_REQUEST,Ot.EDFS_NATS_REQUEST_DEFINITION],[ut.EDFS_NATS_SUBSCRIBE,Ot.EDFS_NATS_SUBSCRIBE_DEFINITION],[ut.EDFS_REDIS_PUBLISH,Ot.EDFS_REDIS_PUBLISH_DEFINITION],[ut.EDFS_REDIS_SUBSCRIBE,Ot.EDFS_REDIS_SUBSCRIBE_DEFINITION],[ut.EXTENDS,Ot.EXTENDS_DEFINITION],[ut.EXTERNAL,Ot.EXTERNAL_DEFINITION],[ut.INACCESSIBLE,Ot.INACCESSIBLE_DEFINITION],[ut.INTERFACE_OBJECT,Ot.INTERFACE_OBJECT_DEFINITION],[ut.KEY,Ot.KEY_DEFINITION],[ut.LINK,Ot.LINK_DEFINITION],[ut.ONE_OF,Ot.ONE_OF_DEFINITION],[ut.OVERRIDE,Ot.OVERRIDE_DEFINITION],[ut.PROVIDES,Ot.PROVIDES_DEFINITION],[ut.REQUIRE_FETCH_REASONS,Ot.REQUIRE_FETCH_REASONS_DEFINITION],[ut.REQUIRES,Ot.REQUIRES_DEFINITION],[ut.REQUIRES_SCOPES,Ot.REQUIRES_SCOPES_DEFINITION],[ut.SEMANTIC_NON_NULL,Ot.SEMANTIC_NON_NULL_DEFINITION],[ut.SHAREABLE,Ot.SHAREABLE_DEFINITION],[ut.SPECIFIED_BY,Ot.SPECIFIED_BY_DEFINITION],[ut.SUBSCRIPTION_FILTER,Ot.SUBSCRIPTION_FILTER_DEFINITION],[ut.TAG,Ot.TAG_DEFINITION]]);Gi.BASE_SCALARS=new Set(["_Any","_Entities",ut.BOOLEAN_SCALAR,ut.FLOAT_SCALAR,ut.ID_SCALAR,ut.INT_SCALAR,ut.FIELD_SET_SCALAR,ut.SCOPE_SCALAR,ut.STRING_SCALAR]);Gi.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[ut.AUTHENTICATED,Ot.AUTHENTICATED_DEFINITION],[ut.COMPOSE_DIRECTIVE,Ot.COMPOSE_DIRECTIVE_DEFINITION],[ut.INACCESSIBLE,Ot.INACCESSIBLE_DEFINITION],[ut.INTERFACE_OBJECT,Ot.INTERFACE_OBJECT_DEFINITION],[ut.LINK,Ot.LINK_DEFINITION],[ut.OVERRIDE,Ot.OVERRIDE_DEFINITION],[ut.REQUIRES_SCOPES,Ot.REQUIRES_SCOPES_DEFINITION],[ut.SHAREABLE,Ot.SHAREABLE_DEFINITION]]);Gi.EDFS_ARGS_REGEXP=/{{\s*args\.([a-zA-Z0-9_]+)\s*}}/g;Gi.MAX_OR_SCOPES=16});var yT=w(vc=>{"use strict";m();T();N();Object.defineProperty(vc,"__esModule",{value:!0});vc.newParentTagData=SZ;vc.newChildTagData=DZ;vc.validateImplicitFieldSets=bZ;vc.newContractTagOptionsFromArrays=AZ;vc.getDescriptionFromString=RZ;var ti=Ie(),gZ=Su(),_Z=Du(),vZ=Fr(),LB=wr(),OZ=zn();function SZ(e){return{childTagDataByChildName:new Map,tagNames:new Set,typeName:e}}function DZ(e){return{name:e,tagNames:new Set,tagNamesByArgumentName:new Map}}function bZ({conditionalFieldDataByCoords:e,currentSubgraphName:t,entityData:n,implicitKeys:r,objectData:i,parentDefinitionDataByTypeName:a,graphNode:o}){let u=(0,LB.getValueOrDefault)(n.keyFieldSetDatasBySubgraphName,t,()=>new Map);for(let[l,d]of n.documentNodeByKeyFieldSet){if(u.has(l))continue;let p=[i],E=[],I=[],v=-1,A=!0,U=!0;(0,ti.visit)(d,{Argument:{enter(){return U=!1,ti.BREAK}},Field:{enter(j){let Q=p[v];if(A)return U=!1,ti.BREAK;let ee=j.name.value;if(ee===OZ.TYPENAME)return;let ne=Q.fieldDataByName.get(ee);if(!ne||ne.argumentDataByName.size||E[v].has(ee))return U=!1,ti.BREAK;let{isUnconditionallyProvided:pe}=(0,LB.getOrThrowError)(ne.externalFieldDataBySubgraphName,t,`${ne.originalParentTypeName}.${ee}.externalFieldDataBySubgraphName`),le=e.get(`${ne.renamedParentTypeName}.${ee}`);if(le){if(le.providedBy.length>0)I.push(...le.providedBy);else if(le.requiredBy.length>0)return U=!1,ti.BREAK}else if(!pe)return U=!1,ti.BREAK;E[v].add(ee);let Ae=(0,gZ.getTypeNodeNamedTypeName)(ne.node.type);if(_Z.BASE_SCALARS.has(Ae))return;let Me=a.get(Ae);if(!Me)return U=!1,ti.BREAK;if(Me.kind===ti.Kind.OBJECT_TYPE_DEFINITION){A=!0,p.push(Me);return}if((0,vZ.isKindAbstract)(Me.kind))return U=!1,ti.BREAK}},InlineFragment:{enter(){return U=!1,ti.BREAK}},SelectionSet:{enter(){if(!A||(v+=1,A=!1,v<0||v>=p.length))return U=!1,ti.BREAK;E.push(new Set)},leave(){if(A)return U=!1,ti.BREAK;v-=1,p.pop(),E.pop()}}}),U&&(r.push($(k({fieldName:"",selectionSet:l},I.length>0?{conditions:I}:{}),{disableEntityResolver:!0})),o&&o.satisfiedFieldSets.add(l))}}function AZ(e,t){return{tagNamesToExclude:new Set(e),tagNamesToInclude:new Set(t)}}function RZ(e){if(e)return{block:!0,kind:ti.Kind.STRING,value:e}}});var $l=w(mt=>{"use strict";m();T();N();Object.defineProperty(mt,"__esModule",{value:!0});mt.MergeMethod=void 0;mt.newPersistedDirectivesData=wZ;mt.isNodeExternalOrShareable=LZ;mt.isTypeRequired=CZ;mt.areDefaultValuesCompatible=BB;mt.compareAndValidateInputValueDefaultValues=BZ;mt.setMutualExecutableLocations=UZ;mt.isTypeNameRootType=kZ;mt.getRenamedRootTypeName=MZ;mt.childMapToValueArray=qZ;mt.setLongestDescription=VZ;mt.isParentDataRootType=UB;mt.isInterfaceDefinitionData=jZ;mt.setParentDataExtensionType=KZ;mt.upsertDeprecatedDirective=$Z;mt.upsertTagDirectives=GZ;mt.propagateAuthDirectives=QZ;mt.propagateFieldAuthDirectives=YZ;mt.generateDeprecatedDirective=Yv;mt.getClientPersistedDirectiveNodes=Gv;mt.getClientSchemaFieldNodeByFieldData=zZ;mt.getNodeWithPersistedDirectivesByInputValueData=kB;mt.addValidPersistedDirectiveDefinitionNodeByData=XZ;mt.newInvalidFieldNames=ZZ;mt.validateExternalAndShareable=eee;mt.isTypeValidImplementation=IT;mt.isNodeDataInaccessible=MB;mt.isLeafKind=tee;mt.getSubscriptionFilterValue=nee;mt.getParentTypeName=ree;mt.newConditionalFieldData=iee;mt.getDefinitionDataCoords=aee;mt.isParentDataCompositeOutputType=see;mt.newExternalFieldData=oee;mt.getInitialFederatedDescription=uee;mt.areKindsEqual=cee;mt.isFieldData=Jv;mt.isInputObjectDefinitionData=lee;mt.isInputNodeKind=dee;mt.isOutputNodeKind=fee;var rt=Ie(),$v=Gf(),Kl=Fr(),Qv=$i(),Kt=zn(),Oc=wr(),PZ=yT(),FZ=Ie();function wZ(){return{deprecatedReason:"",directivesByName:new Map,isDeprecated:!1,tagDirectiveByName:new Map}}function LZ(e,t,n){var i;let r={isExternal:n.has(Kt.EXTERNAL),isShareable:t||n.has(Kt.SHAREABLE)};if(!((i=e.directives)!=null&&i.length))return r;for(let a of e.directives){let o=a.name.value;if(o===Kt.EXTERNAL){r.isExternal=!0;continue}o===Kt.SHAREABLE&&(r.isShareable=!0)}return r}function CZ(e){return e.kind===rt.Kind.NON_NULL_TYPE}function BB(e,t){switch(e.kind){case rt.Kind.LIST_TYPE:return t.kind===rt.Kind.LIST||t.kind===rt.Kind.NULL;case rt.Kind.NAMED_TYPE:if(t.kind===rt.Kind.NULL)return!0;switch(e.name.value){case Kt.BOOLEAN_SCALAR:return t.kind===rt.Kind.BOOLEAN;case Kt.FLOAT_SCALAR:return t.kind===rt.Kind.INT||t.kind===rt.Kind.FLOAT;case Kt.INT_SCALAR:return t.kind===rt.Kind.INT;case Kt.STRING_SCALAR:return t.kind===rt.Kind.STRING;default:return!0}case rt.Kind.NON_NULL_TYPE:return t.kind===rt.Kind.NULL?!1:BB(e.type,t)}}function BZ(e,t,n){if(!e.defaultValue)return;if(!t.defaultValue){e.includeDefaultValue=!1;return}let r=(0,rt.print)(e.defaultValue),i=(0,rt.print)(t.defaultValue);if(r!==i){n.push((0,Qv.incompatibleInputValueDefaultValuesError)(`${e.isArgument?Kt.ARGUMENT:Kt.INPUT_FIELD} "${e.name}"`,e.originalCoords,[...t.subgraphNames],r,i));return}}function UZ(e,t){let n=new Set;for(let r of t)e.executableLocations.has(r)&&n.add(r);e.executableLocations=n}function kZ(e,t){return Kt.ROOT_TYPE_NAMES.has(e)||t.has(e)}function MZ(e,t){let n=t.get(e);if(!n)return e;switch(n){case rt.OperationTypeNode.MUTATION:return Kt.MUTATION;case rt.OperationTypeNode.SUBSCRIPTION:return Kt.SUBSCRIPTION;default:return Kt.QUERY}}function xZ(e){for(let t of e.argumentDataByName.values()){for(let n of t.directivesByName.values())t.node.directives.push(...n);e.node.arguments.push(t.node)}}function qZ(e){var n;let t=[];for(let r of e.values()){Jv(r)&&xZ(r);for(let[i,a]of r.directivesByName){if(i===Kt.DEPRECATED){let o=a[0];if(!o)continue;if((n=o.arguments)!=null&&n.length){r.node.directives.push(o);continue}r.node.directives.push($(k({},o),{arguments:[{kind:rt.Kind.ARGUMENT,value:{kind:rt.Kind.STRING,value:FZ.DEFAULT_DEPRECATION_REASON},name:(0,Kl.stringToNameNode)(Kt.REASON)}]}));continue}r.node.directives.push(...a)}t.push(r.node)}return t}function VZ(e,t){if(t.description){if("configureDescriptionDataBySubgraphName"in t){for(let{propagate:n}of t.configureDescriptionDataBySubgraphName.values())if(!n)return}(!e.description||e.description.value.length0&&e.persistedDirectivesData.directivesByName.set(Kt.REQUIRES_SCOPES,[(0,Oc.generateRequiresScopesDirective)(t.requiredScopes)]))}function YZ(e,t){if(!t)return;let n=t.fieldAuthDataByFieldName.get(e.name);n&&(n.originalData.requiresAuthentication&&e.persistedDirectivesData.directivesByName.set(Kt.AUTHENTICATED,[(0,Oc.generateSimpleDirective)(Kt.AUTHENTICATED)]),n.originalData.requiredScopes.length>0&&e.persistedDirectivesData.directivesByName.set(Kt.REQUIRES_SCOPES,[(0,Oc.generateRequiresScopesDirective)(n.originalData.requiredScopes)]))}function Yv(e){return{kind:rt.Kind.DIRECTIVE,name:(0,Kl.stringToNameNode)(Kt.DEPRECATED),arguments:[{kind:rt.Kind.ARGUMENT,name:(0,Kl.stringToNameNode)(Kt.REASON),value:{kind:rt.Kind.STRING,value:e||Kt.DEPRECATED_DEFAULT_ARGUMENT_VALUE}}]}}function JZ(e,t,n,r){let i=[];for(let[a,o]of e){let u=t.get(a);if(u){if(o.length<2){i.push(...o);continue}if(!u.repeatable){r.push((0,Qv.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}i.push(...o)}}return i}function HZ(e,t,n){let r=[...e.persistedDirectivesData.tagDirectiveByName.values()];return e.persistedDirectivesData.isDeprecated&&r.push(Yv(e.persistedDirectivesData.deprecatedReason)),r.push(...JZ(e.persistedDirectivesData.directivesByName,t,e.name,n)),r}function Gv(e){var n;let t=[];e.persistedDirectivesData.isDeprecated&&t.push(Yv(e.persistedDirectivesData.deprecatedReason));for(let[r,i]of e.persistedDirectivesData.directivesByName){if(r===Kt.SEMANTIC_NON_NULL&&Jv(e)){t.push((0,Oc.generateSemanticNonNullDirective)((n=(0,Oc.getFirstEntry)(e.nullLevelsBySubgraphName))!=null?n:new Set([0])));continue}Kt.PERSISTED_CLIENT_DIRECTIVES.has(r)&&t.push(i[0])}return t}function zZ(e){let t=Gv(e),n=[];for(let r of e.argumentDataByName.values())MB(r)||n.push($(k({},r.node),{directives:Gv(r)}));return $(k({},e.node),{directives:t,arguments:n})}function kB(e,t,n){return e.node.name=(0,Kl.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=HZ(e,t,n),e.includeDefaultValue&&(e.node.defaultValue=e.defaultValue),e.node}function WZ(e,t,n,r,i){let a=[];for(let[o,u]of t.argumentDataByName){let l=(0,Oc.getEntriesNotInHashSet)(t.subgraphNames,u.subgraphNames);if(l.length>0){u.requiredSubgraphNames.size>0&&a.push({inputValueName:o,missingSubgraphs:l,requiredSubgraphs:[...u.requiredSubgraphNames]});continue}e.push(kB(u,n,r)),i&&i.add(o)}return a.length>0?(r.push((0,Qv.invalidRequiredInputValueError)(Kt.DIRECTIVE_DEFINITION,`@${t.name}`,a)),!1):!0}function XZ(e,t,n,r){let i=[];WZ(i,t,n,r)&&e.push({arguments:i,kind:rt.Kind.DIRECTIVE_DEFINITION,locations:(0,Kl.setToNameNodeArray)(t.executableLocations),name:(0,Kl.stringToNameNode)(t.name),repeatable:t.repeatable,description:t.description})}function ZZ(){return{byShareable:new Set,subgraphNamesByExternalFieldName:new Map}}function eee(e,t){let n=e.isShareableBySubgraphName.size,r=new Array,i=0;for(let[a,o]of e.isShareableBySubgraphName){let u=e.externalFieldDataBySubgraphName.get(a);if(u&&!u.isUnconditionallyProvided){r.push(a);continue}o||(i+=1)}switch(i){case 0:n===r.length&&t.subgraphNamesByExternalFieldName.set(e.name,r);return;case 1:if(n===1)return;n-r.length!==1&&t.byShareable.add(e.name);return;default:t.byShareable.add(e.name)}}var CB;(function(e){e[e.UNION=0]="UNION",e[e.INTERSECTION=1]="INTERSECTION",e[e.CONSISTENT=2]="CONSISTENT"})(CB||(mt.MergeMethod=CB={}));function IT(e,t,n){if(e.kind===rt.Kind.NON_NULL_TYPE)return t.kind!==rt.Kind.NON_NULL_TYPE?!1:IT(e.type,t.type,n);if(t.kind===rt.Kind.NON_NULL_TYPE)return IT(e,t.type,n);switch(e.kind){case rt.Kind.NAMED_TYPE:if(t.kind===rt.Kind.NAMED_TYPE){let r=e.name.value,i=t.name.value;if(r===i)return!0;let a=n.get(r);return a?a.has(i):!1}return!1;default:return t.kind===rt.Kind.LIST_TYPE?IT(e.type,t.type,n):!1}}function MB(e){return e.persistedDirectivesData.directivesByName.has(Kt.INACCESSIBLE)||e.directivesByName.has(Kt.INACCESSIBLE)}function tee(e){return e===rt.Kind.SCALAR_TYPE_DEFINITION||e===rt.Kind.ENUM_TYPE_DEFINITION}function nee(e){switch(e.kind){case rt.Kind.BOOLEAN:return e.value;case rt.Kind.ENUM:case rt.Kind.STRING:return e.value;case rt.Kind.FLOAT:case rt.Kind.INT:try{return parseFloat(e.value)}catch(t){return"NaN"}case rt.Kind.NULL:return null}}function ree(e){return e.kind===rt.Kind.OBJECT_TYPE_DEFINITION&&e.renamedTypeName||e.name}function iee(){return{providedBy:[],requiredBy:[]}}function aee(e,t){switch(e.kind){case rt.Kind.ENUM_VALUE_DEFINITION:return`${e.parentTypeName}.${e.name}`;case rt.Kind.FIELD_DEFINITION:return`${t?e.renamedParentTypeName:e.originalParentTypeName}.${e.name}`;case rt.Kind.ARGUMENT:case rt.Kind.INPUT_VALUE_DEFINITION:return t?e.federatedCoords:e.originalCoords;case rt.Kind.OBJECT_TYPE_DEFINITION:return t?e.renamedTypeName:e.name;default:return e.name}}function see(e){return e.kind===rt.Kind.OBJECT_TYPE_DEFINITION||e.kind===rt.Kind.INTERFACE_TYPE_DEFINITION}function oee(e){return{isDefinedExternal:e,isUnconditionallyProvided:!e}}function uee(e){let{value:t,done:n}=e.configureDescriptionDataBySubgraphName.values().next();if(n)return e.description;if(t.propagate)return(0,PZ.getDescriptionFromString)(t.description)||e.description}function cee(e,t){return e.kind===t.kind}function Jv(e){return e.kind===rt.Kind.FIELD_DEFINITION}function lee(e){return e.kind===rt.Kind.INPUT_OBJECT_TYPE_DEFINITION}function dee(e){return Kt.INPUT_NODE_KINDS.has(e)}function fee(e){return Kt.OUTPUT_NODE_KINDS.has(e)}});var Wv={};$m(Wv,{__addDisposableResource:()=>aU,__assign:()=>gT,__asyncDelegator:()=>WB,__asyncGenerator:()=>zB,__asyncValues:()=>XB,__await:()=>Gl,__awaiter:()=>$B,__classPrivateFieldGet:()=>nU,__classPrivateFieldIn:()=>iU,__classPrivateFieldSet:()=>rU,__createBinding:()=>vT,__decorate:()=>VB,__disposeResources:()=>sU,__esDecorate:()=>pee,__exportStar:()=>QB,__extends:()=>xB,__generator:()=>GB,__importDefault:()=>tU,__importStar:()=>eU,__makeTemplateObject:()=>ZB,__metadata:()=>KB,__param:()=>jB,__propKey:()=>Nee,__read:()=>zv,__rest:()=>qB,__runInitializers:()=>mee,__setFunctionName:()=>Tee,__spread:()=>YB,__spreadArray:()=>HB,__spreadArrays:()=>JB,__values:()=>_T,default:()=>yee});function xB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Hv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function qB(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function jB(e,t){return function(n,r){t(n,r,e)}}function pee(e,t,n,r,i,a){function o(Q){if(Q!==void 0&&typeof Q!="function")throw new TypeError("Function expected");return Q}for(var u=r.kind,l=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),E,I=!1,v=n.length-1;v>=0;v--){var A={};for(var U in r)A[U]=U==="access"?{}:r[U];for(var U in r.access)A.access[U]=r.access[U];A.addInitializer=function(Q){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(Q||null))};var j=(0,n[v])(u==="accessor"?{get:p.get,set:p.set}:p[l],A);if(u==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(E=o(j.get))&&(p.get=E),(E=o(j.set))&&(p.set=E),(E=o(j.init))&&i.unshift(E)}else(E=o(j))&&(u==="field"?i.unshift(E):p[l]=E)}d&&Object.defineProperty(d,r.name,p),I=!0}function mee(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function zv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function YB(){for(var e=[],t=0;t1||u(I,v)})})}function u(I,v){try{l(r[I](v))}catch(A){E(a[0][3],A)}}function l(I){I.value instanceof Gl?Promise.resolve(I.value.v).then(d,p):E(a[0][2],I)}function d(I){u("next",I)}function p(I){u("throw",I)}function E(I,v){I(v),a.shift(),a.length&&u(a[0][0],a[0][1])}}function WB(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:Gl(e[i](o)),done:!1}:a?a(o):o}:a}}function XB(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof _T=="function"?_T(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(u,l){o=e[a](o),i(u,l,o.done,o.value)})}}function i(a,o,u,l){Promise.resolve(l).then(function(d){a({value:d,done:u})},o)}}function ZB(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function eU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&vT(t,e,n);return Eee(t,e),t}function tU(e){return e&&e.__esModule?e:{default:e}}function nU(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function rU(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function iU(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function aU(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if(typeof r!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}function sU(e){function t(r){e.error=e.hasError?new hee(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(a){return t(a),n()})}catch(a){t(a)}}if(e.hasError)throw e.error}return n()}var Hv,gT,vT,Eee,hee,yee,Xv=Zu(()=>{"use strict";m();T();N();Hv=function(e,t){return Hv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Hv(e,t)};gT=function(){return gT=Object.assign||function(t){for(var n,r=1,i=arguments.length;rFU,__assign:()=>OT,__asyncDelegator:()=>vU,__asyncGenerator:()=>_U,__asyncValues:()=>OU,__await:()=>Ql,__awaiter:()=>TU,__classPrivateFieldGet:()=>AU,__classPrivateFieldIn:()=>PU,__classPrivateFieldSet:()=>RU,__createBinding:()=>DT,__decorate:()=>cU,__disposeResources:()=>wU,__esDecorate:()=>dU,__exportStar:()=>hU,__extends:()=>oU,__generator:()=>EU,__importDefault:()=>bU,__importStar:()=>DU,__makeTemplateObject:()=>SU,__metadata:()=>NU,__param:()=>lU,__propKey:()=>pU,__read:()=>tO,__rest:()=>uU,__rewriteRelativeImportExtension:()=>LU,__runInitializers:()=>fU,__setFunctionName:()=>mU,__spread:()=>yU,__spreadArray:()=>gU,__spreadArrays:()=>IU,__values:()=>ST,default:()=>_ee});function oU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function uU(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function lU(e,t){return function(n,r){t(n,r,e)}}function dU(e,t,n,r,i,a){function o(Q){if(Q!==void 0&&typeof Q!="function")throw new TypeError("Function expected");return Q}for(var u=r.kind,l=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),E,I=!1,v=n.length-1;v>=0;v--){var A={};for(var U in r)A[U]=U==="access"?{}:r[U];for(var U in r.access)A.access[U]=r.access[U];A.addInitializer=function(Q){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(Q||null))};var j=(0,n[v])(u==="accessor"?{get:p.get,set:p.set}:p[l],A);if(u==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(E=o(j.get))&&(p.get=E),(E=o(j.set))&&(p.set=E),(E=o(j.init))&&i.unshift(E)}else(E=o(j))&&(u==="field"?i.unshift(E):p[l]=E)}d&&Object.defineProperty(d,r.name,p),I=!0}function fU(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function tO(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function yU(){for(var e=[],t=0;t1||l(v,U)})},A&&(i[v]=A(i[v])))}function l(v,A){try{d(r[v](A))}catch(U){I(a[0][3],U)}}function d(v){v.value instanceof Ql?Promise.resolve(v.value.v).then(p,E):I(a[0][2],v)}function p(v){l("next",v)}function E(v){l("throw",v)}function I(v,A){v(A),a.shift(),a.length&&l(a[0][0],a[0][1])}}function vU(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:Ql(e[i](o)),done:!1}:a?a(o):o}:a}}function OU(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof ST=="function"?ST(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(u,l){o=e[a](o),i(u,l,o.done,o.value)})}}function i(a,o,u,l){Promise.resolve(l).then(function(d){a({value:d,done:u})},o)}}function SU(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function DU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=eO(e),r=0;r{"use strict";m();T();N();Zv=function(e,t){return Zv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Zv(e,t)};OT=function(){return OT=Object.assign||function(t){for(var n,r=1,i=arguments.length;r{"use strict";m();T();N()});var Yl=w(Qi=>{"use strict";m();T();N();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.asArray=void 0;Qi.isUrl=kU;Qi.isDocumentString=bee;Qi.isValidPath=Ree;Qi.compareStrings=MU;Qi.nodeToString=nO;Qi.compareNodes=Pee;Qi.isSome=Fee;Qi.assertSome=wee;var vee=Ie(),Oee=/^(https?|wss?|file):\/\//;function kU(e){if(typeof e!="string"||!Oee.test(e))return!1;if(URL.canParse)return URL.canParse(e);try{return!!new URL(e)}catch(t){return!1}}var See=e=>Array.isArray(e)?e:e?[e]:[];Qi.asArray=See;var Dee=/\.[a-z0-9]+$/i;function bee(e){if(typeof e!="string"||Dee.test(e)||kU(e))return!1;try{return(0,vee.parse)(e),!0}catch(t){if(!t.message.includes("EOF")&&e.replace(/(\#[^*]*)/g,"").trim()!==""&&e.includes(" "))throw new Error(`Failed to parse the GraphQL document. ${t.message} -${e}`)}return!1}var Aee=/[‘“!%^<>`\n]/;function Ree(e){return typeof e=="string"&&!Aee.test(e)}function MU(e,t){return String(e)String(t)?1:0}function nO(e){var n,r;let t;return"alias"in e&&(t=(n=e.alias)==null?void 0:n.value),t==null&&"name"in e&&(t=(r=e.name)==null?void 0:r.value),t==null&&(t=e.kind),t}function Pee(e,t,n){let r=nO(e),i=nO(t);return typeof n=="function"?n(r,i):MU(r,i)}function Fee(e){return e!=null}function wee(e,t="Value should be something"){if(e==null)throw new Error(t)}});var Yf=w(AT=>{"use strict";m();T();N();Object.defineProperty(AT,"__esModule",{value:!0});AT.inspect=void 0;var VU=3;function Lee(e){return bT(e,[])}AT.inspect=Lee;function bT(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Cee(e,t);default:return String(e)}}function xU(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; - ${e.stack}`}function Cee(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?xU(e)+` -`+qU(e.errors,t):xU(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(Bee(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:bT(r,n)}else if(Array.isArray(e))return qU(e,n);return Uee(e,n)}function Bee(e){return typeof e.toJSON=="function"}function Uee(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>VU?"["+kee(e)+"]":"{ "+n.map(([i,a])=>i+": "+bT(a,t)).join(", ")+" }"}function qU(e,t){if(e.length===0)return"[]";if(t.length>VU)return"[Array]";let n=e.length,r=[];for(let i=0;i{"use strict";m();T();N();Object.defineProperty(RT,"__esModule",{value:!0});RT.createGraphQLError=iO;RT.relocatedError=qee;var rO=Ie(),Mee=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function xee(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>Mee.includes(t))}function iO(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&xee(t.originalError)&&(t.originalError=iO(t.originalError.message,t.originalError)),rO.versionInfo.major>=17?new rO.GraphQLError(e,t):new rO.GraphQLError(e,t==null?void 0:t.nodes,t==null?void 0:t.source,t==null?void 0:t.positions,t==null?void 0:t.path,t==null?void 0:t.originalError,t==null?void 0:t.extensions)}function qee(e,t){return iO(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t==null?e.path:t,originalError:e,extensions:e.extensions})}});var Jf=w(ni=>{"use strict";m();T();N();Object.defineProperty(ni,"__esModule",{value:!0});ni.isPromise=FT;ni.isActualPromise=KU;ni.handleMaybePromise=bu;ni.fakePromise=Za;ni.createDeferredPromise=Vee;ni.iterateAsync=$U;ni.iterateAsyncVoid=$U;ni.fakeRejectPromise=Sc;ni.mapMaybePromise=jee;ni.mapAsyncIterator=Kee;ni.promiseLikeFinally=GU;ni.unfakePromise=QU;var wT=Symbol.for("@whatwg-node/promise-helpers/FakePromise");function FT(e){return(e==null?void 0:e.then)!=null}function KU(e){let t=e;return t&&t.then&&t.catch&&t.finally}function bu(e,t,n,r){let i=Za().then(e).then(t,n);return r&&(i=i.finally(r)),QU(i)}function Za(e){return e&&KU(e)?e:FT(e)?{then:(t,n)=>Za(e.then(t,n)),catch:t=>Za(e.then(n=>n,t)),finally:t=>Za(t?GU(e,t):e),[Symbol.toStringTag]:"Promise"}:{then(t){if(t)try{return Za(t(e))}catch(n){return Sc(n)}return this},catch(){return this},finally(t){if(t)try{return Za(t()).then(()=>e,()=>e)}catch(n){return Sc(n)}return this},[Symbol.toStringTag]:"Promise",__fakePromiseValue:e,[wT]:"resolved"}}function Vee(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise(function(i,a){e=i,t=a}),get resolve(){return e},get reject(){return t}}}function $U(e,t,n){if((e==null?void 0:e.length)===0)return;let r=e[Symbol.iterator](),i=0;function a(){let{done:o,value:u}=r.next();if(o)return;let l=!1;function d(){l=!0}return bu(function(){return t(u,d,i++)},function(E){if(E&&(n==null||n.push(E)),!l)return a()})}return a()}function Sc(e){return{then(t,n){if(n)try{return Za(n(e))}catch(r){return Sc(r)}return this},catch(t){if(t)try{return Za(t(e))}catch(n){return Sc(n)}return this},finally(t){if(t)try{t()}catch(n){return Sc(n)}return this},__fakeRejectError:e,[Symbol.toStringTag]:"Promise",[wT]:"rejected"}}function jee(e,t,n){return bu(()=>e,t,n)}function Kee(e,t,n,r){Symbol.asyncIterator in e&&(e=e[Symbol.asyncIterator]());let i,a,o;if(r){let d;o=p=>(d||(d=bu(r,()=>p,()=>p)),d)}typeof e.return=="function"&&(i=e.return,a=d=>{let p=()=>{throw d};return i.call(e).then(p,p)});function u(d){return d.done?o?o(d):d:bu(()=>d.value,p=>bu(()=>t(p),jU,a))}let l;if(n){let d,p=n;l=E=>(d||(d=bu(()=>E,I=>bu(()=>p(I),jU,a))),d)}return{next(){return e.next().then(u,l)},return(){let d=i?i.call(e).then(u,l):Za({value:void 0,done:!0});return o?d.then(o):d},throw(d){return typeof e.throw=="function"?e.throw(d).then(u,l):a?a(d):Sc(d)},[Symbol.asyncIterator](){return this}}}function jU(e){return{value:e,done:!1}}function $ee(e){return(e==null?void 0:e[wT])==="resolved"}function Gee(e){return(e==null?void 0:e[wT])==="rejected"}function GU(e,t){return"finally"in e?e.finally(t):e.then(n=>{let r=t();return FT(r)?r.then(()=>n):n},n=>{let r=t();if(FT(r))return r.then(()=>{throw n});throw n})}function QU(e){if($ee(e))return e.__fakePromiseValue;if(Gee(e))throw e.__fakeRejectError;return e}});var LT=w(Au=>{"use strict";m();T();N();Object.defineProperty(Au,"__esModule",{value:!0});Au.isPromise=void 0;Au.isIterableObject=Qee;Au.isObjectLike=Yee;Au.promiseReduce=Jee;Au.hasOwnProperty=Hee;var YU=Jf();Object.defineProperty(Au,"isPromise",{enumerable:!0,get:function(){return YU.isPromise}});function Qee(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function Yee(e){return typeof e=="object"&&e!==null}function Jee(e,t,n){let r=n;for(let i of e)r=(0,YU.handleMaybePromise)(()=>r,a=>t(a,i));return r}function Hee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var oO=w(sO=>{"use strict";m();T();N();Object.defineProperty(sO,"__esModule",{value:!0});sO.getArgumentValues=Wee;var aO=Yf(),Dc=Ie(),CT=PT(),zee=LT();function Wee(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((u,l)=>$(k({},u),{[l.name.value]:l}),{});for(let{name:u,type:l,defaultValue:d}of e.args){let p=a[u];if(!p){if(d!==void 0)r[u]=d;else if((0,Dc.isNonNullType)(l))throw(0,CT.createGraphQLError)(`Argument "${u}" of required type "${(0,aO.inspect)(l)}" was not provided.`,{nodes:[t]});continue}let E=p.value,I=E.kind===Dc.Kind.NULL;if(E.kind===Dc.Kind.VARIABLE){let A=E.name.value;if(n==null||!(0,zee.hasOwnProperty)(n,A)){if(d!==void 0)r[u]=d;else if((0,Dc.isNonNullType)(l))throw(0,CT.createGraphQLError)(`Argument "${u}" of required type "${(0,aO.inspect)(l)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:[E]});continue}I=n[A]==null}if(I&&(0,Dc.isNonNullType)(l))throw(0,CT.createGraphQLError)(`Argument "${u}" of non-null type "${(0,aO.inspect)(l)}" must not be null.`,{nodes:[E]});let v=(0,Dc.valueFromAST)(E,l,n);if(v===void 0)throw(0,CT.createGraphQLError)(`Argument "${u}" has invalid value ${(0,Dc.print)(E)}.`,{nodes:[E]});r[u]=v}return r}});var Ru=w(Cs=>{"use strict";m();T();N();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.memoize1=Xee;Cs.memoize2=Zee;Cs.memoize3=ete;Cs.memoize4=tte;Cs.memoize5=nte;Cs.memoize2of4=rte;Cs.memoize2of5=ite;function Xee(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let a=e(r);return t.set(r,a),a}return i}}function Zee(e){let t=new WeakMap;return function(r,i){let a=t.get(r);if(!a){a=new WeakMap,t.set(r,a);let u=e(r,i);return a.set(i,u),u}let o=a.get(i);if(o===void 0){let u=e(r,i);return a.set(i,u),u}return o}}function ete(e){let t=new WeakMap;return function(r,i,a){let o=t.get(r);if(!o){o=new WeakMap,t.set(r,o);let d=new WeakMap;o.set(i,d);let p=e(r,i,a);return d.set(a,p),p}let u=o.get(i);if(!u){u=new WeakMap,o.set(i,u);let d=e(r,i,a);return u.set(a,d),d}let l=u.get(a);if(l===void 0){let d=e(r,i,a);return u.set(a,d),d}return l}}function tte(e){let t=new WeakMap;return function(r,i,a,o){let u=t.get(r);if(!u){u=new WeakMap,t.set(r,u);let E=new WeakMap;u.set(i,E);let I=new WeakMap;E.set(a,I);let v=e(r,i,a,o);return I.set(o,v),v}let l=u.get(i);if(!l){l=new WeakMap,u.set(i,l);let E=new WeakMap;l.set(a,E);let I=e(r,i,a,o);return E.set(o,I),I}let d=l.get(a);if(!d){let E=new WeakMap;l.set(a,E);let I=e(r,i,a,o);return E.set(o,I),I}let p=d.get(o);if(p===void 0){let E=e(r,i,a,o);return d.set(o,E),E}return p}}function nte(e){let t=new WeakMap;return function(r,i,a,o,u){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let v=new WeakMap;l.set(i,v);let A=new WeakMap;v.set(a,A);let U=new WeakMap;A.set(o,U);let j=e(r,i,a,o,u);return U.set(u,j),j}let d=l.get(i);if(!d){d=new WeakMap,l.set(i,d);let v=new WeakMap;d.set(a,v);let A=new WeakMap;v.set(o,A);let U=e(r,i,a,o,u);return A.set(u,U),U}let p=d.get(a);if(!p){p=new WeakMap,d.set(a,p);let v=new WeakMap;p.set(o,v);let A=e(r,i,a,o,u);return v.set(u,A),A}let E=p.get(o);if(!E){E=new WeakMap,p.set(o,E);let v=e(r,i,a,o,u);return E.set(u,v),v}let I=E.get(u);if(I===void 0){let v=e(r,i,a,o,u);return E.set(u,v),v}return I}}function rte(e){let t=new WeakMap;return function(r,i,a,o){let u=t.get(r);if(!u){u=new WeakMap,t.set(r,u);let d=e(r,i,a,o);return u.set(i,d),d}let l=u.get(i);if(l===void 0){let d=e(r,i,a,o);return u.set(i,d),d}return l}}function ite(e){let t=new WeakMap;return function(r,i,a,o,u){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let p=e(r,i,a,o,u);return l.set(i,p),p}let d=l.get(i);if(d===void 0){let p=e(r,i,a,o,u);return l.set(i,p),p}return d}}});var cO=w(uO=>{"use strict";m();T();N();Object.defineProperty(uO,"__esModule",{value:!0});uO.getDirectiveExtensions=ote;var JU=Ie(),ate=oO(),ste=Ru();function ote(e,t,n=["directives"]){var o;let r={};if(e.extensions){let u=e.extensions;for(let l of n)u=u==null?void 0:u[l];if(u!=null)for(let l in u){let d=u[l],p=l;if(Array.isArray(d))for(let E of d){let I=r[p];I||(I=[],r[p]=I),I.push(E)}else{let E=r[p];E||(E=[],r[p]=E),E.push(d)}}}let i=(0,ste.memoize1)(u=>JSON.stringify(u)),a=[];e.astNode&&a.push(e.astNode),e.extensionASTNodes&&a.push(...e.extensionASTNodes);for(let u of a)if((o=u.directives)!=null&&o.length)for(let l of u.directives){let d=l.name.value,p=r[d];p||(p=[],r[d]=p);let E=t==null?void 0:t.getDirective(d),I={};if(E&&(I=(0,ate.getArgumentValues)(E,l)),l.arguments)for(let v of l.arguments){let A=v.name.value;if(I[A]==null){let U=E==null?void 0:E.args.find(j=>j.name===A);U&&(I[A]=(0,JU.valueFromAST)(v.value,U.type))}I[A]==null&&(I[A]=(0,JU.valueFromASTUntyped)(v.value))}if(a.length>0&&p.length>0){let v=i(I);if(p.some(A=>i(A)===v))continue}p.push(I)}return r}});var lO=w(Jl=>{"use strict";m();T();N();Object.defineProperty(Jl,"__esModule",{value:!0});Jl.getDirectivesInExtensions=ute;Jl.getDirectiveInExtensions=cte;Jl.getDirectives=lte;Jl.getDirective=dte;var BT=cO();function ute(e,t=["directives"]){let n=(0,BT.getDirectiveExtensions)(e,void 0,t);return Object.entries(n).map(([r,i])=>i==null?void 0:i.map(a=>({name:r,args:a}))).flat(1/0).filter(Boolean)}function cte(e,t,n=["directives"]){return(0,BT.getDirectiveExtensions)(e,void 0,n)[t]}function lte(e,t,n=["directives"]){let r=(0,BT.getDirectiveExtensions)(t,e,n);return Object.entries(r).map(([i,a])=>a==null?void 0:a.map(o=>({name:i,args:o}))).flat(1/0).filter(Boolean)}function dte(e,t,n,r=["directives"]){return(0,BT.getDirectiveExtensions)(t,e,r)[n]}});var fO=w(dO=>{"use strict";m();T();N();Object.defineProperty(dO,"__esModule",{value:!0});dO.getFieldsWithDirectives=pte;var fte=Ie();function pte(e,t={}){let n={},r=["ObjectTypeDefinition","ObjectTypeExtension"];t.includeInputTypes&&(r=[...r,"InputObjectTypeDefinition","InputObjectTypeExtension"]);let i=e.definitions.filter(a=>r.includes(a.kind));for(let a of i){let o=a.name.value;if(a.fields!=null){for(let u of a.fields)if(u.directives&&u.directives.length>0){let l=u.name.value,d=`${o}.${l}`,p=u.directives.map(E=>({name:E.name.value,args:(E.arguments||[]).reduce((I,v)=>$(k({},I),{[v.name.value]:(0,fte.valueFromASTUntyped)(v.value)}),{})}));n[d]=p}}}return n}});var HU=w(mO=>{"use strict";m();T();N();Object.defineProperty(mO,"__esModule",{value:!0});mO.getArgumentsWithDirectives=Nte;var pO=Ie();function mte(e){return e.kind===pO.Kind.OBJECT_TYPE_DEFINITION||e.kind===pO.Kind.OBJECT_TYPE_EXTENSION}function Nte(e){var r;let t={},n=e.definitions.filter(mte);for(let i of n)if(i.fields!=null)for(let a of i.fields){let o=(r=a.arguments)==null?void 0:r.filter(l=>{var d;return(d=l.directives)==null?void 0:d.length});if(!(o!=null&&o.length))continue;let u=t[`${i.name.value}.${a.name.value}`]={};for(let l of o){let d=l.directives.map(p=>({name:p.name.value,args:(p.arguments||[]).reduce((E,I)=>$(k({},E),{[I.name.value]:(0,pO.valueFromASTUntyped)(I.value)}),{})}));u[l.name.value]=d}}return t}});var TO=w(NO=>{"use strict";m();T();N();Object.defineProperty(NO,"__esModule",{value:!0});NO.getImplementingTypes=Tte;function Tte(e,t){let n=t.getTypeMap(),r=[];for(let i in n){let a=n[i];"getInterfaces"in a&&a.getInterfaces().find(u=>u.name===e)&&r.push(a.name)}return r}});var UT=w(hO=>{"use strict";m();T();N();Object.defineProperty(hO,"__esModule",{value:!0});hO.astFromType=EO;var Ete=Yf(),bc=Ie();function EO(e){if((0,bc.isNonNullType)(e)){let t=EO(e.ofType);if(t.kind===bc.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${(0,Ete.inspect)(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:bc.Kind.NON_NULL_TYPE,type:t}}else if((0,bc.isListType)(e))return{kind:bc.Kind.LIST_TYPE,type:EO(e.ofType)};return{kind:bc.Kind.NAMED_TYPE,name:{kind:bc.Kind.NAME,value:e.name}}}});var Hf=w(yO=>{"use strict";m();T();N();Object.defineProperty(yO,"__esModule",{value:!0});yO.astFromValueUntyped=kT;var es=Ie();function kT(e){if(e===null)return{kind:es.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=kT(n);r!=null&&t.push(r)}return{kind:es.Kind.LIST,values:t}}if(typeof e=="object"){if(e!=null&&e.toJSON)return kT(e.toJSON());let t=[];for(let n in e){let r=e[n],i=kT(r);i&&t.push({kind:es.Kind.OBJECT_FIELD,name:{kind:es.Kind.NAME,value:n},value:i})}return{kind:es.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:es.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:es.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return hte.test(t)?{kind:es.Kind.INT,value:t}:{kind:es.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:es.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var hte=/^-?(?:0|[1-9][0-9]*)$/});var WU=w(IO=>{"use strict";m();T();N();Object.defineProperty(IO,"__esModule",{value:!0});IO.astFromValue=zf;var yte=Yf(),yi=Ie(),Ite=Hf(),zU=LT();function zf(e,t){if((0,yi.isNonNullType)(t)){let n=zf(e,t.ofType);return(n==null?void 0:n.kind)===yi.Kind.NULL?null:n}if(e===null)return{kind:yi.Kind.NULL};if(e===void 0)return null;if((0,yi.isListType)(t)){let n=t.ofType;if((0,zU.isIterableObject)(e)){let r=[];for(let i of e){let a=zf(i,n);a!=null&&r.push(a)}return{kind:yi.Kind.LIST,values:r}}return zf(e,n)}if((0,yi.isInputObjectType)(t)){if(!(0,zU.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=zf(e[r.name],r.type);i&&n.push({kind:yi.Kind.OBJECT_FIELD,name:{kind:yi.Kind.NAME,value:r.name},value:i})}return{kind:yi.Kind.OBJECT,fields:n}}if((0,yi.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,yi.isEnumType)(t)?{kind:yi.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&>e.test(n)?{kind:yi.Kind.INT,value:n}:(0,Ite.astFromValueUntyped)(n)}console.assert(!1,"Unexpected input type: "+(0,yte.inspect)(t))}var gte=/^-?(?:0|[1-9][0-9]*)$/});var XU=w(gO=>{"use strict";m();T();N();Object.defineProperty(gO,"__esModule",{value:!0});gO.getDescriptionNode=vte;var _te=Ie();function vte(e){var t;if((t=e.astNode)!=null&&t.description)return $(k({},e.astNode.description),{block:!0});if(e.description)return{kind:_te.Kind.STRING,value:e.description,block:!0}}});var Wf=w(Yi=>{"use strict";m();T();N();Object.defineProperty(Yi,"__esModule",{value:!0});Yi.getRootTypeMap=Yi.getRootTypes=Yi.getRootTypeNames=void 0;Yi.getDefinedRootType=Ste;var Ote=PT(),_O=Ru();function Ste(e,t,n){let i=(0,Yi.getRootTypeMap)(e).get(t);if(i==null)throw(0,Ote.createGraphQLError)(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}Yi.getRootTypeNames=(0,_O.memoize1)(function(t){let n=(0,Yi.getRootTypes)(t);return new Set([...n].map(r=>r.name))});Yi.getRootTypes=(0,_O.memoize1)(function(t){let n=(0,Yi.getRootTypeMap)(t);return new Set(n.values())});Yi.getRootTypeMap=(0,_O.memoize1)(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let a=t.getSubscriptionType();return a&&n.set("subscription",a),n})});var bO=w(Xn=>{"use strict";m();T();N();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.getDocumentNodeFromSchema=ek;Xn.printSchemaWithDirectives=Rte;Xn.astFromSchema=tk;Xn.astFromDirective=nk;Xn.getDirectiveNodes=ya;Xn.astFromArg=OO;Xn.astFromObjectType=rk;Xn.astFromInterfaceType=ik;Xn.astFromUnionType=ak;Xn.astFromInputObjectType=sk;Xn.astFromEnumType=ok;Xn.astFromScalarType=uk;Xn.astFromField=SO;Xn.astFromInputField=ck;Xn.astFromEnumValue=lk;Xn.makeDeprecatedDirective=dk;Xn.makeDirectiveNode=Hl;Xn.makeDirectiveNodes=DO;var Nt=Ie(),Ac=UT(),vO=WU(),Dte=Hf(),Ji=XU(),ZU=lO(),bte=Yl(),Ate=Wf();function ek(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=tk(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let u of o)(0,Nt.isSpecifiedDirective)(u)||a.push(nk(u,e,n));for(let u in r){let l=r[u],d=(0,Nt.isSpecifiedScalarType)(l),p=(0,Nt.isIntrospectionType)(l);if(!(d||p))if((0,Nt.isObjectType)(l))a.push(rk(l,e,n));else if((0,Nt.isInterfaceType)(l))a.push(ik(l,e,n));else if((0,Nt.isUnionType)(l))a.push(ak(l,e,n));else if((0,Nt.isInputObjectType)(l))a.push(sk(l,e,n));else if((0,Nt.isEnumType)(l))a.push(ok(l,e,n));else if((0,Nt.isScalarType)(l))a.push(uk(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:Nt.Kind.DOCUMENT,definitions:a}}function Rte(e,t={}){let n=ek(e,t);return(0,Nt.print)(n)}function tk(e,t){let n=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),r=[];if(e.astNode!=null&&r.push(e.astNode),e.extensionASTNodes!=null)for(let d of e.extensionASTNodes)r.push(d);for(let d of r)if(d.operationTypes)for(let p of d.operationTypes)n.set(p.operation,p);let i=(0,Ate.getRootTypeMap)(e);for(let[d,p]of n){let E=i.get(d);if(E!=null){let I=(0,Ac.astFromType)(E);p!=null?p.type=I:n.set(d,{kind:Nt.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(bte.isSome),o=ya(e,e,t);if(!a.length&&!o.length)return null;let u={kind:a.length?Nt.Kind.SCHEMA_DEFINITION:Nt.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=(0,Ji.getDescriptionNode)(e);return l&&(u.description=l),u}function nk(e,t,n){var r,i;return{kind:Nt.Kind.DIRECTIVE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>OO(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:Nt.Kind.NAME,value:a})))||[]}}function ya(e,t,n){let r=[],i=(0,ZU.getDirectivesInExtensions)(e,n),a;i!=null&&(a=DO(t,i));let o=null,u=null,l=null;if(a!=null&&(r=a.filter(d=>Nt.specifiedDirectives.every(p=>p.name!==d.name.value)),o=a.find(d=>d.name.value==="deprecated"),u=a.find(d=>d.name.value==="specifiedBy"),l=a.find(d=>d.name.value==="oneOf")),e.deprecationReason!=null&&o==null&&(o=dk(e.deprecationReason)),e.specifiedByUrl!=null||e.specifiedByURL!=null&&u==null){let p={url:e.specifiedByUrl||e.specifiedByURL};u=Hl("specifiedBy",p)}return e.isOneOf&&l==null&&(l=Hl("oneOf")),o!=null&&r.push(o),u!=null&&r.push(u),l!=null&&r.push(l),r}function OO(e,t,n){var r;return{kind:Nt.Kind.INPUT_VALUE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},type:(0,Ac.astFromType)(e.type),defaultValue:e.defaultValue!==void 0&&(r=(0,vO.astFromValue)(e.defaultValue,e.type))!=null?r:void 0,directives:ya(e,t,n)}}function rk(e,t,n){return{kind:Nt.Kind.OBJECT_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>SO(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>(0,Ac.astFromType)(r)),directives:ya(e,t,n)}}function ik(e,t,n){let r={kind:Nt.Kind.INTERFACE_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>SO(i,t,n)),directives:ya(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>(0,Ac.astFromType)(i))),r}function ak(e,t,n){return{kind:Nt.Kind.UNION_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:ya(e,t,n),types:e.getTypes().map(r=>(0,Ac.astFromType)(r))}}function sk(e,t,n){return{kind:Nt.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>ck(r,t,n)),directives:ya(e,t,n)}}function ok(e,t,n){return{kind:Nt.Kind.ENUM_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>lk(r,t,n)),directives:ya(e,t,n)}}function uk(e,t,n){let r=(0,ZU.getDirectivesInExtensions)(e,n),i=DO(t,r),a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(o=>o.name.value==="specifiedBy")){let o={url:a};i.push(Hl("specifiedBy",o))}return{kind:Nt.Kind.SCALAR_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:i}}function SO(e,t,n){return{kind:Nt.Kind.FIELD_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},arguments:e.args.map(r=>OO(r,t,n)),type:(0,Ac.astFromType)(e.type),directives:ya(e,t,n)}}function ck(e,t,n){var r;return{kind:Nt.Kind.INPUT_VALUE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},type:(0,Ac.astFromType)(e.type),directives:ya(e,t,n),defaultValue:(r=(0,vO.astFromValue)(e.defaultValue,e.type))!=null?r:void 0}}function lk(e,t,n){return{kind:Nt.Kind.ENUM_VALUE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:ya(e,t,n)}}function dk(e){return Hl("deprecated",{reason:e},Nt.GraphQLDeprecatedDirective)}function Hl(e,t,n){let r=[];for(let i in t){let a=t[i],o;if(n!=null){let u=n.args.find(l=>l.name===i);u&&(o=(0,vO.astFromValue)(a,u.type))}o==null&&(o=(0,Dte.astFromValueUntyped)(a)),o!=null&&r.push({kind:Nt.Kind.ARGUMENT,name:{kind:Nt.Kind.NAME,value:i},value:o})}return{kind:Nt.Kind.DIRECTIVE,name:{kind:Nt.Kind.NAME,value:e},arguments:r}}function DO(e,t){let n=[];for(let{name:r,args:i}of t){let a=e==null?void 0:e.getDirective(r);n.push(Hl(r,i,a))}return n}});var pk=w(MT=>{"use strict";m();T();N();Object.defineProperty(MT,"__esModule",{value:!0});MT.validateGraphQlDocuments=Pte;MT.createDefaultRules=fk;var Xf=Ie();function Pte(e,t,n=fk()){var u;let r=new Set,i=new Map;for(let l of t)for(let d of l.definitions)d.kind===Xf.Kind.FRAGMENT_DEFINITION?i.set(d.name.value,d):r.add(d);let a={kind:Xf.Kind.DOCUMENT,definitions:Array.from([...r,...i.values()])},o=(0,Xf.validate)(e,a,n);for(let l of o)if(l.stack=l.message,l.locations)for(let d of l.locations)l.stack+=` - at ${(u=l.source)==null?void 0:u.name}:${d.line}:${d.column}`;return o}function fk(){let e=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return Xf.versionInfo.major<15&&(e=e.map(t=>t.replace(/Rule$/,""))),Xf.specifiedRules.filter(t=>!e.includes(t.name))}});var mk=w(AO=>{"use strict";m();T();N();Object.defineProperty(AO,"__esModule",{value:!0});AO.parseGraphQLJSON=Cte;var Fte=Ie();function wte(e){return e=e.toString(),e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function Lte(e){return JSON.parse(wte(e))}function Cte(e,t,n){let r=Lte(t);if(r.data&&(r=r.data),r.kind==="Document")return{location:e,document:r};if(r.__schema){let i=(0,Fte.buildClientSchema)(r,n);return{location:e,schema:i}}else if(typeof r=="string")return{location:e,rawSDL:r};throw new Error("Not valid JSON content")}});var PO=w(Hi=>{"use strict";m();T();N();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.resetComments=Ute;Hi.collectComment=kte;Hi.pushComment=Zf;Hi.printComment=yk;Hi.printWithComments=Vte;Hi.getDescription=Kte;Hi.getComment=RO;Hi.getLeadingCommentBlock=Ik;Hi.dedentBlockStringValue=gk;Hi.getBlockStringIndentation=_k;var hk=Ie(),Bte=80,zl={};function Ute(){zl={}}function kte(e){var n;let t=(n=e.name)==null?void 0:n.value;if(t!=null)switch(Zf(e,t),e.kind){case"EnumTypeDefinition":if(e.values)for(let r of e.values)Zf(r,t,r.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(let r of e.fields)if(Zf(r,t,r.name.value),jte(r)&&r.arguments)for(let i of r.arguments)Zf(i,t,r.name.value,i.name.value)}break}}function Zf(e,t,n,r){let i=RO(e);if(typeof i!="string"||i.length===0)return;let a=[t];n&&(a.push(n),r&&a.push(r));let o=a.join(".");zl[o]||(zl[o]=[]),zl[o].push(i)}function yk(e){return` +`))}return $(k({},e),{value:t,block:!0})}function gB(e){return e.arguments?e.arguments.sort((n,r)=>n.name.value.localeCompare(r.name.value)):e.arguments}function mT(e){let t=e.selections;return $(k({},e),{selections:t.sort((n,r)=>{var a,o,u,l;return Rn.NAME in n?Rn.NAME in r?n.name.value.localeCompare(r.name.value):-1:Rn.NAME in r?1:((o=(a=n.typeCondition)==null?void 0:a.name.value)!=null?o:"").localeCompare((l=(u=r.typeCondition)==null?void 0:u.name.value)!=null?l:"")}).map(n=>{switch(n.kind){case xt.Kind.FIELD:return $(k({},n),{arguments:gB(n),selectionSet:n.selectionSet?mT(n.selectionSet):n.selectionSet});case xt.Kind.FRAGMENT_SPREAD:return n;case xt.Kind.INLINE_FRAGMENT:return $(k({},n),{selectionSet:mT(n.selectionSet)})}})})}function G7(e){return $(k({},e),{definitions:e.definitions.map(t=>t.kind!==xt.Kind.OPERATION_DEFINITION?t:$(k({},t),{selectionSet:mT(t.selectionSet)}))})}function _B(e,t=!0){return(0,xt.parse)(e,{noLocation:t})}function Q7(e,t=!0){try{return{documentNode:_B(e,t)}}catch(n){return{error:n}}}});var SB=F(xl=>{"use strict";m();T();N();Object.defineProperty(xl,"__esModule",{value:!0});xl.AccumulatorMap=void 0;xl.mapValue=Ml;xl.extendSchemaImpl=Y7;var Be=_e(),Ls=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};xl.AccumulatorMap=Ls;function Ml(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function Y7(e,t,n){var be,ge,Le,St;let r=[],i=new Ls,a=new Ls,o=new Ls,u=new Ls,l=new Ls,d=new Ls,p=[],E,I=[],v=!1;for(let Q of t.definitions){switch(Q.kind){case Be.Kind.SCHEMA_DEFINITION:E=Q;break;case Be.Kind.SCHEMA_EXTENSION:I.push(Q);break;case Be.Kind.DIRECTIVE_DEFINITION:p.push(Q);break;case Be.Kind.SCALAR_TYPE_DEFINITION:case Be.Kind.OBJECT_TYPE_DEFINITION:case Be.Kind.INTERFACE_TYPE_DEFINITION:case Be.Kind.UNION_TYPE_DEFINITION:case Be.Kind.ENUM_TYPE_DEFINITION:case Be.Kind.INPUT_OBJECT_TYPE_DEFINITION:r.push(Q);break;case Be.Kind.SCALAR_TYPE_EXTENSION:i.add(Q.name.value,Q);break;case Be.Kind.OBJECT_TYPE_EXTENSION:a.add(Q.name.value,Q);break;case Be.Kind.INTERFACE_TYPE_EXTENSION:o.add(Q.name.value,Q);break;case Be.Kind.UNION_TYPE_EXTENSION:u.add(Q.name.value,Q);break;case Be.Kind.ENUM_TYPE_EXTENSION:l.add(Q.name.value,Q);break;case Be.Kind.INPUT_OBJECT_TYPE_EXTENSION:d.add(Q.name.value,Q);break;default:continue}v=!0}if(!v)return e;let A=new Map;for(let Q of e.types){let ie=te(Q);ie&&A.set(Q.name,ie)}for(let Q of r){let ie=Q.name.value;A.set(ie,(be=vB.get(ie))!=null?be:ae(Q))}for(let[Q,ie]of a)A.set(Q,new Be.GraphQLObjectType({name:Q,interfaces:()=>Ht(ie),fields:()=>rn(ie),extensionASTNodes:ie}));if(n!=null&&n.addInvalidExtensionOrphans){for(let[Q,ie]of o)A.set(Q,new Be.GraphQLInterfaceType({name:Q,interfaces:()=>Ht(ie),fields:()=>rn(ie),extensionASTNodes:ie}));for(let[Q,ie]of l)A.set(Q,new Be.GraphQLEnumType({name:Q,values:hn(ie),extensionASTNodes:ie}));for(let[Q,ie]of u)A.set(Q,new Be.GraphQLUnionType({name:Q,types:()=>Ln(ie),extensionASTNodes:ie}));for(let[Q,ie]of i)A.set(Q,new Be.GraphQLScalarType({name:Q,extensionASTNodes:ie}));for(let[Q,ie]of d)A.set(Q,new Be.GraphQLInputObjectType({name:Q,fields:()=>nr(ie),extensionASTNodes:ie}))}let U=k(k({query:e.query&&J(e.query),mutation:e.mutation&&J(e.mutation),subscription:e.subscription&&J(e.subscription)},E&&on([E])),on(I));return $(k({description:(Le=(ge=E==null?void 0:E.description)==null?void 0:ge.value)!=null?Le:e.description},U),{types:Array.from(A.values()),directives:[...e.directives.map(re),...p.map(Pt)],extensions:e.extensions,astNode:E!=null?E:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(I),assumeValid:(St=n==null?void 0:n.assumeValid)!=null?St:!1});function j(Q){return(0,Be.isListType)(Q)?new Be.GraphQLList(j(Q.ofType)):(0,Be.isNonNullType)(Q)?new Be.GraphQLNonNull(j(Q.ofType)):J(Q)}function J(Q){return A.get(Q.name)}function re(Q){if((0,Be.isSpecifiedDirective)(Q))return Q;let ie=Q.toConfig();return new Be.GraphQLDirective($(k({},ie),{args:Ml(ie.args,Et)}))}function te(Q){if((0,Be.isIntrospectionType)(Q)||(0,Be.isSpecifiedScalarType)(Q))return Q;if((0,Be.isScalarType)(Q))return Ie(Q);if((0,Be.isObjectType)(Q))return Ue(Q);if((0,Be.isInterfaceType)(Q))return He(Q);if((0,Be.isUnionType)(Q))return W(Q);if((0,Be.isEnumType)(Q))return Ne(Q);if((0,Be.isInputObjectType)(Q))return pe(Q)}function pe(Q){var ze;let ie=Q.toConfig(),xe=(ze=d.get(ie.name))!=null?ze:[];return new Be.GraphQLInputObjectType($(k({},ie),{fields:()=>k(k({},Ml(ie.fields,Ut=>$(k({},Ut),{type:j(Ut.type)}))),nr(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Ne(Q){var ze;let ie=Q.toConfig(),xe=(ze=l.get(Q.name))!=null?ze:[];return new Be.GraphQLEnumType($(k({},ie),{values:k(k({},ie.values),hn(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Ie(Q){var Ut,it;let ie=Q.toConfig(),xe=(Ut=i.get(ie.name))!=null?Ut:[],ze=ie.specifiedByURL;for(let Ft of xe)ze=(it=OB(Ft))!=null?it:ze;return new Be.GraphQLScalarType($(k({},ie),{specifiedByURL:ze,extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Ue(Q){var ze;let ie=Q.toConfig(),xe=(ze=a.get(ie.name))!=null?ze:[];return new Be.GraphQLObjectType($(k({},ie),{interfaces:()=>[...Q.getInterfaces().map(J),...Ht(xe)],fields:()=>k(k({},Ml(ie.fields,Oe)),rn(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function He(Q){var ze;let ie=Q.toConfig(),xe=(ze=o.get(ie.name))!=null?ze:[];return new Be.GraphQLInterfaceType($(k({},ie),{interfaces:()=>[...Q.getInterfaces().map(J),...Ht(xe)],fields:()=>k(k({},Ml(ie.fields,Oe)),rn(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function W(Q){var ze;let ie=Q.toConfig(),xe=(ze=u.get(ie.name))!=null?ze:[];return new Be.GraphQLUnionType($(k({},ie),{types:()=>[...Q.getTypes().map(J),...Ln(xe)],extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Oe(Q){return $(k({},Q),{type:j(Q.type),args:Q.args&&Ml(Q.args,Et)})}function Et(Q){return $(k({},Q),{type:j(Q.type)})}function on(Q){var xe;let ie={};for(let ze of Q){let Ut=(xe=ze.operationTypes)!=null?xe:[];for(let it of Ut)ie[it.operation]=En(it.type)}return ie}function En(Q){var ze;let ie=Q.name.value,xe=(ze=vB.get(ie))!=null?ze:A.get(ie);if(xe===void 0)throw new Error(`Unknown type: "${ie}".`);return xe}function un(Q){return Q.kind===Be.Kind.LIST_TYPE?new Be.GraphQLList(un(Q.type)):Q.kind===Be.Kind.NON_NULL_TYPE?new Be.GraphQLNonNull(un(Q.type)):En(Q)}function Pt(Q){var ie;return new Be.GraphQLDirective({name:Q.name.value,description:(ie=Q.description)==null?void 0:ie.value,locations:Q.locations.map(({value:xe})=>xe),isRepeatable:Q.repeatable,args:kr(Q.arguments),astNode:Q})}function rn(Q){var xe,ze;let ie=Object.create(null);for(let Ut of Q){let it=(xe=Ut.fields)!=null?xe:[];for(let Ft of it)ie[Ft.name.value]={type:un(Ft.type),description:(ze=Ft.description)==null?void 0:ze.value,args:kr(Ft.arguments),deprecationReason:TT(Ft),astNode:Ft}}return ie}function kr(Q){var ze;let ie=Q!=null?Q:[],xe=Object.create(null);for(let Ut of ie){let it=un(Ut.type);xe[Ut.name.value]={type:it,description:(ze=Ut.description)==null?void 0:ze.value,defaultValue:(0,Be.valueFromAST)(Ut.defaultValue,it),deprecationReason:TT(Ut),astNode:Ut}}return xe}function nr(Q){var xe,ze;let ie=Object.create(null);for(let Ut of Q){let it=(xe=Ut.fields)!=null?xe:[];for(let Ft of it){let ps=un(Ft.type);ie[Ft.name.value]={type:ps,description:(ze=Ft.description)==null?void 0:ze.value,defaultValue:(0,Be.valueFromAST)(Ft.defaultValue,ps),deprecationReason:TT(Ft),astNode:Ft}}}return ie}function hn(Q){var xe,ze;let ie=Object.create(null);for(let Ut of Q){let it=(xe=Ut.values)!=null?xe:[];for(let Ft of it)ie[Ft.name.value]={description:(ze=Ft.description)==null?void 0:ze.value,deprecationReason:TT(Ft),astNode:Ft}}return ie}function Ht(Q){return Q.flatMap(ie=>{var xe,ze;return(ze=(xe=ie.interfaces)==null?void 0:xe.map(En))!=null?ze:[]})}function Ln(Q){return Q.flatMap(ie=>{var xe,ze;return(ze=(xe=ie.types)==null?void 0:xe.map(En))!=null?ze:[]})}function ae(Q){var xe,ze,Ut,it,Ft,ps,Yr,ms,rl,Ua,Ir,ui;let ie=Q.name.value;switch(Q.kind){case Be.Kind.OBJECT_TYPE_DEFINITION:{let qt=(xe=a.get(ie))!=null?xe:[],gr=[Q,...qt];return a.delete(ie),new Be.GraphQLObjectType({name:ie,description:(ze=Q.description)==null?void 0:ze.value,interfaces:()=>Ht(gr),fields:()=>rn(gr),astNode:Q,extensionASTNodes:qt})}case Be.Kind.INTERFACE_TYPE_DEFINITION:{let qt=(Ut=o.get(ie))!=null?Ut:[],gr=[Q,...qt];return o.delete(ie),new Be.GraphQLInterfaceType({name:ie,description:(it=Q.description)==null?void 0:it.value,interfaces:()=>Ht(gr),fields:()=>rn(gr),astNode:Q,extensionASTNodes:qt})}case Be.Kind.ENUM_TYPE_DEFINITION:{let qt=(Ft=l.get(ie))!=null?Ft:[],gr=[Q,...qt];return l.delete(ie),new Be.GraphQLEnumType({name:ie,description:(ps=Q.description)==null?void 0:ps.value,values:hn(gr),astNode:Q,extensionASTNodes:qt})}case Be.Kind.UNION_TYPE_DEFINITION:{let qt=(Yr=u.get(ie))!=null?Yr:[],gr=[Q,...qt];return u.delete(ie),new Be.GraphQLUnionType({name:ie,description:(ms=Q.description)==null?void 0:ms.value,types:()=>Ln(gr),astNode:Q,extensionASTNodes:qt})}case Be.Kind.SCALAR_TYPE_DEFINITION:{let qt=(rl=i.get(ie))!=null?rl:[];return i.delete(ie),new Be.GraphQLScalarType({name:ie,description:(Ua=Q.description)==null?void 0:Ua.value,specifiedByURL:OB(Q),astNode:Q,extensionASTNodes:qt})}case Be.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let qt=(Ir=d.get(ie))!=null?Ir:[],gr=[Q,...qt];return d.delete(ie),new Be.GraphQLInputObjectType({name:ie,description:(ui=Q.description)==null?void 0:ui.value,fields:()=>nr(gr),astNode:Q,extensionASTNodes:qt})}}}}var vB=new Map([...Be.specifiedScalarTypes,...Be.introspectionTypes].map(e=>[e.name,e]));function TT(e){let t=(0,Be.getDirectiveValues)(Be.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function OB(e){let t=(0,Be.getDirectiveValues)(Be.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}});var Vv=F(qv=>{"use strict";m();T();N();Object.defineProperty(qv,"__esModule",{value:!0});qv.buildASTSchema=z7;var DB=_e(),J7=Bl(),H7=SB();function z7(e,t){(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,J7.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,H7.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}let i=[...r.directives,...DB.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new DB.GraphQLSchema($(k({},r),{directives:i}))}});var ql=F(Ou=>{"use strict";m();T();N();Object.defineProperty(Ou,"__esModule",{value:!0});Ou.MAX_INT32=Ou.MAX_SUBSCRIPTION_FILTER_DEPTH=Ou.MAXIMUM_TYPE_NESTING=void 0;Ou.MAXIMUM_TYPE_NESTING=30;Ou.MAX_SUBSCRIPTION_FILTER_DEPTH=5;Ou.MAX_INT32=ln(2,31)-1});var wr=F(cr=>{"use strict";m();T();N();Object.defineProperty(cr,"__esModule",{value:!0});cr.getOrThrowError=X7;cr.getEntriesNotInHashSet=Z7;cr.numberToOrdinal=eZ;cr.addIterableToSet=tZ;cr.addOptionalIterableToSet=nZ;cr.addSets=rZ;cr.kindToNodeType=iZ;cr.getValueOrDefault=aZ;cr.add=sZ;cr.generateSimpleDirective=oZ;cr.generateRequiresScopesDirective=uZ;cr.generateSemanticNonNullDirective=cZ;cr.copyObjectValueMap=lZ;cr.addNewObjectValueMapEntries=dZ;cr.copyArrayValueMap=fZ;cr.addMapEntries=pZ;cr.getFirstEntry=mZ;var jt=_e(),Tr=zn(),W7=$i(),$f=Fr();function X7(e,t,n){let r=e.get(t);if(r===void 0)throw(0,W7.invalidKeyFatalError)(t,n);return r}function Z7(e,t){let n=[];for(let r of e)t.has(r)||n.push(r);return n}function eZ(e){let t=e.toString();switch(t[t.length-1]){case"1":return`${t}st`;case"2":return`${t}nd`;case"3":return`${t}rd`;default:return`${t}th`}}function tZ({source:e,target:t}){for(let n of e)t.add(n)}function nZ({source:e,target:t}){if(e)for(let n of e)t.add(n)}function rZ(e,t){let n=new Set(e);for(let r of t)n.add(r);return n}function iZ(e){switch(e){case jt.Kind.BOOLEAN:return Tr.BOOLEAN_SCALAR;case jt.Kind.ENUM:case jt.Kind.ENUM_TYPE_DEFINITION:return Tr.ENUM;case jt.Kind.ENUM_TYPE_EXTENSION:return"Enum extension";case jt.Kind.ENUM_VALUE_DEFINITION:return Tr.ENUM_VALUE;case jt.Kind.FIELD_DEFINITION:return Tr.FIELD;case jt.Kind.FLOAT:return Tr.FLOAT_SCALAR;case jt.Kind.INPUT_OBJECT_TYPE_DEFINITION:return Tr.INPUT_OBJECT;case jt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"Input Object extension";case jt.Kind.INPUT_VALUE_DEFINITION:return Tr.INPUT_VALUE;case jt.Kind.INT:return Tr.INT_SCALAR;case jt.Kind.INTERFACE_TYPE_DEFINITION:return Tr.INTERFACE;case jt.Kind.INTERFACE_TYPE_EXTENSION:return"Interface extension";case jt.Kind.NULL:return Tr.NULL;case jt.Kind.OBJECT:case jt.Kind.OBJECT_TYPE_DEFINITION:return Tr.OBJECT;case jt.Kind.OBJECT_TYPE_EXTENSION:return"Object extension";case jt.Kind.STRING:return Tr.STRING_SCALAR;case jt.Kind.SCALAR_TYPE_DEFINITION:return Tr.SCALAR;case jt.Kind.SCALAR_TYPE_EXTENSION:return"Scalar extension";case jt.Kind.UNION_TYPE_DEFINITION:return Tr.UNION;case jt.Kind.UNION_TYPE_EXTENSION:return"Union extension";default:return e}}function aZ(e,t,n){let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i}function sZ(e,t){return e.has(t)?!1:(e.add(t),!0)}function oZ(e){return{kind:jt.Kind.DIRECTIVE,name:(0,$f.stringToNameNode)(e)}}function uZ(e){let t=[];for(let n of e){let r=[];for(let i of n)r.push({kind:jt.Kind.STRING,value:i});t.push({kind:jt.Kind.LIST,values:r})}return{kind:jt.Kind.DIRECTIVE,name:(0,$f.stringToNameNode)(Tr.REQUIRES_SCOPES),arguments:[{kind:jt.Kind.ARGUMENT,name:(0,$f.stringToNameNode)(Tr.SCOPES),value:{kind:jt.Kind.LIST,values:t}}]}}function cZ(e){let t=Array.from(e).sort((r,i)=>r-i),n=new Array;for(let r of t)n.push({kind:jt.Kind.INT,value:r.toString()});return{kind:jt.Kind.DIRECTIVE,name:(0,$f.stringToNameNode)(Tr.SEMANTIC_NON_NULL),arguments:[{kind:jt.Kind.ARGUMENT,name:(0,$f.stringToNameNode)(Tr.LEVELS),value:{kind:jt.Kind.LIST,values:n}}]}}function lZ(e){let t=new Map;for(let[n,r]of e)t.set(n,k({},r));return t}function dZ(e,t){for(let[n,r]of e)t.set(n,k({},r))}function fZ(e){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function pZ({source:e,target:t}){for(let[n,r]of e)t.set(n,r)}function mZ(e){let{value:t,done:n}=e.values().next();if(!n)return t}});var Gf=F(ET=>{"use strict";m();T();N();Object.defineProperty(ET,"__esModule",{value:!0});ET.ExtensionType=void 0;var bB;(function(e){e[e.EXTENDS=0]="EXTENDS",e[e.NONE=1]="NONE",e[e.REAL=2]="REAL"})(bB||(ET.ExtensionType=bB={}))});var Su=F(Cr=>{"use strict";m();T();N();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.getMutableDirectiveDefinitionNode=TZ;Cr.getMutableEnumNode=EZ;Cr.getMutableEnumValueNode=hZ;Cr.getMutableFieldNode=yZ;Cr.getMutableInputObjectNode=IZ;Cr.getMutableInputValueNode=gZ;Cr.getMutableInterfaceNode=_Z;Cr.getMutableObjectNode=vZ;Cr.getMutableObjectExtensionNode=OZ;Cr.getMutableScalarNode=SZ;Cr.getMutableTypeNode=jv;Cr.getMutableUnionNode=DZ;Cr.getTypeNodeNamedTypeName=Kv;Cr.getNamedTypeNode=RB;var Lr=_e(),Vl=Fr(),AB=$i(),NZ=ql();function TZ(e){return{arguments:[],kind:e.kind,locations:[],name:k({},e.name),repeatable:e.repeatable,description:(0,Vl.formatDescription)(e.description)}}function EZ(e){return{kind:Lr.Kind.ENUM_TYPE_DEFINITION,name:k({},e)}}function hZ(e){return{directives:[],kind:e.kind,name:k({},e.name),description:(0,Vl.formatDescription)(e.description)}}function yZ(e,t,n){return{arguments:[],directives:[],kind:e.kind,name:k({},e.name),type:jv(e.type,t,n),description:(0,Vl.formatDescription)(e.description)}}function IZ(e){return{kind:Lr.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:k({},e)}}function gZ(e,t,n){return{directives:[],kind:e.kind,name:k({},e.name),type:jv(e.type,t,n),defaultValue:e.defaultValue,description:(0,Vl.formatDescription)(e.description)}}function _Z(e){return{kind:Lr.Kind.INTERFACE_TYPE_DEFINITION,name:k({},e)}}function vZ(e){return{kind:Lr.Kind.OBJECT_TYPE_DEFINITION,name:k({},e)}}function OZ(e){let t=e.kind===Lr.Kind.OBJECT_TYPE_DEFINITION?e.description:void 0;return{kind:Lr.Kind.OBJECT_TYPE_EXTENSION,name:k({},e.name),description:(0,Vl.formatDescription)(t)}}function SZ(e){return{kind:Lr.Kind.SCALAR_TYPE_DEFINITION,name:k({},e)}}function jv(e,t,n){let r={kind:e.kind},i=r;for(let a=0;a{"use strict";m();T();N();Object.defineProperty(jl,"__esModule",{value:!0});jl.REQUIRED_FIELDSET_TYPE_NODE=jl.REQUIRED_STRING_TYPE_NODE=void 0;var PB=_e(),FB=Fr(),wB=zn();jl.REQUIRED_STRING_TYPE_NODE={kind:PB.Kind.NON_NULL_TYPE,type:(0,FB.stringToNamedTypeNode)(wB.STRING_SCALAR)};jl.REQUIRED_FIELDSET_TYPE_NODE={kind:PB.Kind.NON_NULL_TYPE,type:(0,FB.stringToNamedTypeNode)(wB.FIELD_SET_SCALAR)}});var Qf=F(je=>{"use strict";m();T();N();Object.defineProperty(je,"__esModule",{value:!0});je.TAG_DEFINITION=je.SUBSCRIPTION_FILTER_DEFINITION=je.SPECIFIED_BY_DEFINITION=je.SHAREABLE_DEFINITION=je.SEMANTIC_NON_NULL_DEFINITION=je.REQUIRES_SCOPES_DEFINITION=je.REQUIRES_DEFINITION=je.REQUIRE_FETCH_REASONS_DEFINITION=je.PROVIDES_DEFINITION=je.OVERRIDE_DEFINITION=je.ONE_OF_DEFINITION=je.LINK_DEFINITION=je.KEY_DEFINITION=je.INTERFACE_OBJECT_DEFINITION=je.INACCESSIBLE_DEFINITION=je.EDFS_REDIS_SUBSCRIBE_DEFINITION=je.EDFS_REDIS_PUBLISH_DEFINITION=je.EDFS_NATS_SUBSCRIBE_DEFINITION=je.EDFS_NATS_REQUEST_DEFINITION=je.EDFS_NATS_PUBLISH_DEFINITION=je.EDFS_KAFKA_SUBSCRIBE_DEFINITION=je.EDFS_KAFKA_PUBLISH_DEFINITION=je.EXTERNAL_DEFINITION=je.EXTENDS_DEFINITION=je.DEPRECATED_DEFINITION=je.CONNECT_FIELD_RESOLVER_DEFINITION=je.CONFIGURE_DESCRIPTION_DEFINITION=je.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION=je.COMPOSE_DIRECTIVE_DEFINITION=je.AUTHENTICATED_DEFINITION=void 0;var Ee=_e(),fe=Fr(),H=zn(),vr=hT();je.AUTHENTICATED_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER]),name:(0,fe.stringToNameNode)(H.AUTHENTICATED),repeatable:!1};je.COMPOSE_DIRECTIVE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.NAME),type:vr.REQUIRED_STRING_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.SCHEMA_UPPER]),name:(0,fe.stringToNameNode)(H.COMPOSE_DIRECTIVE),repeatable:!0};je.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.PROPAGATE),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,fe.stringToNamedTypeNode)(H.BOOLEAN_SCALAR)},defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,fe.stringToNameNode)(H.CONFIGURE_CHILD_DESCRIPTIONS),repeatable:!1};je.CONFIGURE_DESCRIPTION_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.PROPAGATE),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,fe.stringToNamedTypeNode)(H.BOOLEAN_SCALAR)},defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}},{directives:[],kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.DESCRIPTION_OVERRIDE),type:(0,fe.stringToNamedTypeNode)(H.STRING_SCALAR)}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.INPUT_OBJECT_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.SCHEMA_UPPER,H.UNION_UPPER]),name:(0,fe.stringToNameNode)(H.CONFIGURE_DESCRIPTION),repeatable:!1};je.CONNECT_FIELD_RESOLVER_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.CONTEXT),type:vr.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,fe.stringToNameNode)(H.CONNECT_FIELD_RESOLVER),repeatable:!1};je.DEPRECATED_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.REASON),type:(0,fe.stringToNamedTypeNode)(H.STRING_SCALAR),defaultValue:{kind:Ee.Kind.STRING,value:Ee.DEFAULT_DEPRECATION_REASON}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER]),name:(0,fe.stringToNameNode)(H.DEPRECATED),repeatable:!1};je.EXTENDS_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,fe.stringToNameNode)(H.EXTENDS),repeatable:!1};je.EXTERNAL_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.OBJECT_UPPER]),name:(0,fe.stringToNameNode)(H.EXTERNAL),repeatable:!1};je.EDFS_KAFKA_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.TOPIC),type:vr.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,fe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,fe.stringToNameNode)(H.EDFS_KAFKA_PUBLISH),repeatable:!1};je.EDFS_KAFKA_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.TOPICS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:vr.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,fe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,fe.stringToNameNode)(H.EDFS_KAFKA_SUBSCRIBE),repeatable:!1};je.EDFS_NATS_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.SUBJECT),type:vr.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.PROVIDER_ID),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,fe.stringToNamedTypeNode)(H.STRING_SCALAR)},defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,fe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,fe.stringToNameNode)(H.EDFS_NATS_PUBLISH),repeatable:!1};je.EDFS_NATS_REQUEST_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.SUBJECT),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,fe.stringToNamedTypeNode)(H.STRING_SCALAR)}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.PROVIDER_ID),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,fe.stringToNamedTypeNode)(H.STRING_SCALAR)},defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,fe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,fe.stringToNameNode)(H.EDFS_NATS_REQUEST),repeatable:!1};je.EDFS_NATS_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.SUBJECTS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:vr.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.STREAM_CONFIGURATION),type:(0,fe.stringToNamedTypeNode)(H.EDFS_NATS_STREAM_CONFIGURATION)}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,fe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,fe.stringToNameNode)(H.EDFS_NATS_SUBSCRIBE),repeatable:!1};je.EDFS_REDIS_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.CHANNEL),type:vr.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,fe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,fe.stringToNameNode)(H.EDFS_REDIS_PUBLISH),repeatable:!1};je.EDFS_REDIS_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.CHANNELS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:vr.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,fe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,fe.stringToNameNode)(H.EDFS_REDIS_SUBSCRIBE),repeatable:!1};je.INACCESSIBLE_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.UNION_UPPER]),name:(0,fe.stringToNameNode)(H.INACCESSIBLE),repeatable:!1};je.INTERFACE_OBJECT_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.OBJECT_UPPER]),name:(0,fe.stringToNameNode)(H.INTERFACE_OBJECT),repeatable:!1};je.KEY_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.FIELDS),type:vr.REQUIRED_FIELDSET_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.RESOLVABLE),type:(0,fe.stringToNamedTypeNode)(H.BOOLEAN_SCALAR),defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,fe.stringToNameNode)(H.KEY),repeatable:!0};je.LINK_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.URL_LOWER),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,fe.stringToNamedTypeNode)(H.STRING_SCALAR)}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.AS),type:(0,fe.stringToNamedTypeNode)(H.STRING_SCALAR)},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.FOR),type:(0,fe.stringToNamedTypeNode)(H.LINK_PURPOSE)},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.IMPORT),type:{kind:Ee.Kind.LIST_TYPE,type:(0,fe.stringToNamedTypeNode)(H.LINK_IMPORT)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.SCHEMA_UPPER]),name:(0,fe.stringToNameNode)(H.LINK),repeatable:!0};je.ONE_OF_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.INPUT_OBJECT_UPPER]),name:(0,fe.stringToNameNode)(H.ONE_OF),repeatable:!1};je.OVERRIDE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.FROM),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,fe.stringToNamedTypeNode)(H.STRING_SCALAR)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,fe.stringToNameNode)(H.OVERRIDE),repeatable:!1};je.PROVIDES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.FIELDS),type:vr.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,fe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,fe.stringToNameNode)(H.PROVIDES),repeatable:!1};je.REQUIRE_FETCH_REASONS_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,fe.stringToNameNode)(H.REQUIRE_FETCH_REASONS),repeatable:!0};je.REQUIRES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.FIELDS),type:vr.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,fe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,fe.stringToNameNode)(H.REQUIRES),repeatable:!1};je.REQUIRES_SCOPES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.SCOPES),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,fe.stringToNamedTypeNode)(H.SCOPE_SCALAR)}}}}}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER]),name:(0,fe.stringToNameNode)(H.REQUIRES_SCOPES),repeatable:!1};je.SEMANTIC_NON_NULL_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.LEVELS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,fe.stringToNamedTypeNode)(H.INT_SCALAR)}}},defaultValue:{kind:Ee.Kind.LIST,values:[{kind:Ee.Kind.INT,value:"0"}]}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,fe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,fe.stringToNameNode)(H.SEMANTIC_NON_NULL),repeatable:!1};je.SHAREABLE_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.OBJECT_UPPER]),name:(0,fe.stringToNameNode)(H.SHAREABLE),repeatable:!0};je.SPECIFIED_BY_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.URL_LOWER),type:vr.REQUIRED_STRING_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.SCALAR_UPPER]),name:(0,fe.stringToNameNode)(H.SPECIFIED_BY),repeatable:!1};je.SUBSCRIPTION_FILTER_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.CONDITION),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,fe.stringToNamedTypeNode)(H.SUBSCRIPTION_FILTER_CONDITION)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,fe.stringToNameNode)(H.SUBSCRIPTION_FILTER),repeatable:!1};je.TAG_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,fe.stringToNameNode)(H.NAME),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,fe.stringToNamedTypeNode)(H.STRING_SCALAR)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,fe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.UNION_UPPER]),name:(0,fe.stringToNameNode)(H.TAG),repeatable:!0}});var Du=F(Gi=>{"use strict";m();T();N();Object.defineProperty(Gi,"__esModule",{value:!0});Gi.MAX_OR_SCOPES=Gi.EDFS_ARGS_REGEXP=Gi.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=Gi.BASE_SCALARS=Gi.DIRECTIVE_DEFINITION_BY_NAME=void 0;var ct=zn(),Ot=Qf();Gi.DIRECTIVE_DEFINITION_BY_NAME=new Map([[ct.AUTHENTICATED,Ot.AUTHENTICATED_DEFINITION],[ct.COMPOSE_DIRECTIVE,Ot.COMPOSE_DIRECTIVE_DEFINITION],[ct.CONFIGURE_DESCRIPTION,Ot.CONFIGURE_DESCRIPTION_DEFINITION],[ct.CONFIGURE_CHILD_DESCRIPTIONS,Ot.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION],[ct.CONNECT_FIELD_RESOLVER,Ot.CONNECT_FIELD_RESOLVER_DEFINITION],[ct.DEPRECATED,Ot.DEPRECATED_DEFINITION],[ct.EDFS_KAFKA_PUBLISH,Ot.EDFS_KAFKA_PUBLISH_DEFINITION],[ct.EDFS_KAFKA_SUBSCRIBE,Ot.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[ct.EDFS_NATS_PUBLISH,Ot.EDFS_NATS_PUBLISH_DEFINITION],[ct.EDFS_NATS_REQUEST,Ot.EDFS_NATS_REQUEST_DEFINITION],[ct.EDFS_NATS_SUBSCRIBE,Ot.EDFS_NATS_SUBSCRIBE_DEFINITION],[ct.EDFS_REDIS_PUBLISH,Ot.EDFS_REDIS_PUBLISH_DEFINITION],[ct.EDFS_REDIS_SUBSCRIBE,Ot.EDFS_REDIS_SUBSCRIBE_DEFINITION],[ct.EXTENDS,Ot.EXTENDS_DEFINITION],[ct.EXTERNAL,Ot.EXTERNAL_DEFINITION],[ct.INACCESSIBLE,Ot.INACCESSIBLE_DEFINITION],[ct.INTERFACE_OBJECT,Ot.INTERFACE_OBJECT_DEFINITION],[ct.KEY,Ot.KEY_DEFINITION],[ct.LINK,Ot.LINK_DEFINITION],[ct.ONE_OF,Ot.ONE_OF_DEFINITION],[ct.OVERRIDE,Ot.OVERRIDE_DEFINITION],[ct.PROVIDES,Ot.PROVIDES_DEFINITION],[ct.REQUIRE_FETCH_REASONS,Ot.REQUIRE_FETCH_REASONS_DEFINITION],[ct.REQUIRES,Ot.REQUIRES_DEFINITION],[ct.REQUIRES_SCOPES,Ot.REQUIRES_SCOPES_DEFINITION],[ct.SEMANTIC_NON_NULL,Ot.SEMANTIC_NON_NULL_DEFINITION],[ct.SHAREABLE,Ot.SHAREABLE_DEFINITION],[ct.SPECIFIED_BY,Ot.SPECIFIED_BY_DEFINITION],[ct.SUBSCRIPTION_FILTER,Ot.SUBSCRIPTION_FILTER_DEFINITION],[ct.TAG,Ot.TAG_DEFINITION]]);Gi.BASE_SCALARS=new Set(["_Any","_Entities",ct.BOOLEAN_SCALAR,ct.FLOAT_SCALAR,ct.ID_SCALAR,ct.INT_SCALAR,ct.FIELD_SET_SCALAR,ct.SCOPE_SCALAR,ct.STRING_SCALAR]);Gi.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[ct.AUTHENTICATED,Ot.AUTHENTICATED_DEFINITION],[ct.COMPOSE_DIRECTIVE,Ot.COMPOSE_DIRECTIVE_DEFINITION],[ct.INACCESSIBLE,Ot.INACCESSIBLE_DEFINITION],[ct.INTERFACE_OBJECT,Ot.INTERFACE_OBJECT_DEFINITION],[ct.LINK,Ot.LINK_DEFINITION],[ct.OVERRIDE,Ot.OVERRIDE_DEFINITION],[ct.REQUIRES_SCOPES,Ot.REQUIRES_SCOPES_DEFINITION],[ct.SHAREABLE,Ot.SHAREABLE_DEFINITION]]);Gi.EDFS_ARGS_REGEXP=/{{\s*args\.([a-zA-Z0-9_]+)\s*}}/g;Gi.MAX_OR_SCOPES=16});var yT=F(vc=>{"use strict";m();T();N();Object.defineProperty(vc,"__esModule",{value:!0});vc.newParentTagData=FZ;vc.newChildTagData=wZ;vc.validateImplicitFieldSets=LZ;vc.newContractTagOptionsFromArrays=CZ;vc.getDescriptionFromString=BZ;var ti=_e(),bZ=Su(),AZ=Du(),RZ=Fr(),LB=wr(),PZ=zn();function FZ(e){return{childTagDataByChildName:new Map,tagNames:new Set,typeName:e}}function wZ(e){return{name:e,tagNames:new Set,tagNamesByArgumentName:new Map}}function LZ({conditionalFieldDataByCoords:e,currentSubgraphName:t,entityData:n,implicitKeys:r,objectData:i,parentDefinitionDataByTypeName:a,graphNode:o}){let u=(0,LB.getValueOrDefault)(n.keyFieldSetDatasBySubgraphName,t,()=>new Map);for(let[l,d]of n.documentNodeByKeyFieldSet){if(u.has(l))continue;let p=[i],E=[],I=[],v=-1,A=!0,U=!0;(0,ti.visit)(d,{Argument:{enter(){return U=!1,ti.BREAK}},Field:{enter(j){let J=p[v];if(A)return U=!1,ti.BREAK;let re=j.name.value;if(re===PZ.TYPENAME)return;let te=J.fieldDataByName.get(re);if(!te||te.argumentDataByName.size||E[v].has(re))return U=!1,ti.BREAK;let{isUnconditionallyProvided:pe}=(0,LB.getOrThrowError)(te.externalFieldDataBySubgraphName,t,`${te.originalParentTypeName}.${re}.externalFieldDataBySubgraphName`),Ne=e.get(`${te.renamedParentTypeName}.${re}`);if(Ne){if(Ne.providedBy.length>0)I.push(...Ne.providedBy);else if(Ne.requiredBy.length>0)return U=!1,ti.BREAK}else if(!pe)return U=!1,ti.BREAK;E[v].add(re);let Ie=(0,bZ.getTypeNodeNamedTypeName)(te.node.type);if(AZ.BASE_SCALARS.has(Ie))return;let Ue=a.get(Ie);if(!Ue)return U=!1,ti.BREAK;if(Ue.kind===ti.Kind.OBJECT_TYPE_DEFINITION){A=!0,p.push(Ue);return}if((0,RZ.isKindAbstract)(Ue.kind))return U=!1,ti.BREAK}},InlineFragment:{enter(){return U=!1,ti.BREAK}},SelectionSet:{enter(){if(!A||(v+=1,A=!1,v<0||v>=p.length))return U=!1,ti.BREAK;E.push(new Set)},leave(){if(A)return U=!1,ti.BREAK;v-=1,p.pop(),E.pop()}}}),U&&(r.push($(k({fieldName:"",selectionSet:l},I.length>0?{conditions:I}:{}),{disableEntityResolver:!0})),o&&o.satisfiedFieldSets.add(l))}}function CZ(e,t){return{tagNamesToExclude:new Set(e),tagNamesToInclude:new Set(t)}}function BZ(e){if(e)return{block:!0,kind:ti.Kind.STRING,value:e}}});var $l=F(mt=>{"use strict";m();T();N();Object.defineProperty(mt,"__esModule",{value:!0});mt.MergeMethod=void 0;mt.newPersistedDirectivesData=kZ;mt.isNodeExternalOrShareable=MZ;mt.isTypeRequired=xZ;mt.areDefaultValuesCompatible=BB;mt.compareAndValidateInputValueDefaultValues=qZ;mt.setMutualExecutableLocations=VZ;mt.isTypeNameRootType=jZ;mt.getRenamedRootTypeName=KZ;mt.childMapToValueArray=GZ;mt.setLongestDescription=QZ;mt.isParentDataRootType=UB;mt.isInterfaceDefinitionData=YZ;mt.setParentDataExtensionType=JZ;mt.upsertDeprecatedDirective=HZ;mt.upsertTagDirectives=zZ;mt.propagateAuthDirectives=WZ;mt.propagateFieldAuthDirectives=XZ;mt.generateDeprecatedDirective=Yv;mt.getClientPersistedDirectiveNodes=Gv;mt.getClientSchemaFieldNodeByFieldData=tee;mt.getNodeWithPersistedDirectivesByInputValueData=kB;mt.addValidPersistedDirectiveDefinitionNodeByData=ree;mt.newInvalidFieldNames=iee;mt.validateExternalAndShareable=aee;mt.isTypeValidImplementation=IT;mt.isNodeDataInaccessible=MB;mt.isLeafKind=see;mt.getSubscriptionFilterValue=oee;mt.getParentTypeName=uee;mt.newConditionalFieldData=cee;mt.getDefinitionDataCoords=lee;mt.isParentDataCompositeOutputType=dee;mt.newExternalFieldData=fee;mt.getInitialFederatedDescription=pee;mt.areKindsEqual=mee;mt.isFieldData=Jv;mt.isInputObjectDefinitionData=Nee;mt.isInputNodeKind=Tee;mt.isOutputNodeKind=Eee;var nt=_e(),$v=Gf(),Kl=Fr(),Qv=$i(),Kt=zn(),Oc=wr(),UZ=yT();function kZ(){return{deprecatedReason:"",directivesByName:new Map,isDeprecated:!1,tagDirectiveByName:new Map}}function MZ(e,t,n){var i;let r={isExternal:n.has(Kt.EXTERNAL),isShareable:t||n.has(Kt.SHAREABLE)};if(!((i=e.directives)!=null&&i.length))return r;for(let a of e.directives){let o=a.name.value;if(o===Kt.EXTERNAL){r.isExternal=!0;continue}o===Kt.SHAREABLE&&(r.isShareable=!0)}return r}function xZ(e){return e.kind===nt.Kind.NON_NULL_TYPE}function BB(e,t){switch(e.kind){case nt.Kind.LIST_TYPE:return t.kind===nt.Kind.LIST||t.kind===nt.Kind.NULL;case nt.Kind.NAMED_TYPE:if(t.kind===nt.Kind.NULL)return!0;switch(e.name.value){case Kt.BOOLEAN_SCALAR:return t.kind===nt.Kind.BOOLEAN;case Kt.FLOAT_SCALAR:return t.kind===nt.Kind.INT||t.kind===nt.Kind.FLOAT;case Kt.INT_SCALAR:return t.kind===nt.Kind.INT;case Kt.STRING_SCALAR:return t.kind===nt.Kind.STRING;default:return!0}case nt.Kind.NON_NULL_TYPE:return t.kind===nt.Kind.NULL?!1:BB(e.type,t)}}function qZ(e,t,n){if(!e.defaultValue)return;if(!t.defaultValue){e.includeDefaultValue=!1;return}let r=(0,nt.print)(e.defaultValue),i=(0,nt.print)(t.defaultValue);if(r!==i){n.push((0,Qv.incompatibleInputValueDefaultValuesError)(`${e.isArgument?Kt.ARGUMENT:Kt.INPUT_FIELD} "${e.name}"`,e.originalCoords,[...t.subgraphNames],r,i));return}}function VZ(e,t){let n=new Set;for(let r of t)e.executableLocations.has(r)&&n.add(r);e.executableLocations=n}function jZ(e,t){return Kt.ROOT_TYPE_NAMES.has(e)||t.has(e)}function KZ(e,t){let n=t.get(e);if(!n)return e;switch(n){case nt.OperationTypeNode.MUTATION:return Kt.MUTATION;case nt.OperationTypeNode.SUBSCRIPTION:return Kt.SUBSCRIPTION;default:return Kt.QUERY}}function $Z(e){for(let t of e.argumentDataByName.values()){for(let n of t.directivesByName.values())t.node.directives.push(...n);e.node.arguments.push(t.node)}}function GZ(e){var n;let t=[];for(let r of e.values()){Jv(r)&&$Z(r);for(let[i,a]of r.directivesByName){if(i===Kt.DEPRECATED){let o=a[0];if(!o)continue;if((n=o.arguments)!=null&&n.length){r.node.directives.push(o);continue}r.node.directives.push($(k({},o),{arguments:[{kind:nt.Kind.ARGUMENT,value:{kind:nt.Kind.STRING,value:nt.DEFAULT_DEPRECATION_REASON},name:(0,Kl.stringToNameNode)(Kt.REASON)}]}));continue}r.node.directives.push(...a)}t.push(r.node)}return t}function QZ(e,t){if(t.description){if("configureDescriptionDataBySubgraphName"in t){for(let{propagate:n}of t.configureDescriptionDataBySubgraphName.values())if(!n)return}(!e.description||e.description.value.length0&&e.persistedDirectivesData.directivesByName.set(Kt.REQUIRES_SCOPES,[(0,Oc.generateRequiresScopesDirective)(t.requiredScopes)]))}function XZ(e,t){if(!t)return;let n=t.fieldAuthDataByFieldName.get(e.name);n&&(n.originalData.requiresAuthentication&&e.persistedDirectivesData.directivesByName.set(Kt.AUTHENTICATED,[(0,Oc.generateSimpleDirective)(Kt.AUTHENTICATED)]),n.originalData.requiredScopes.length>0&&e.persistedDirectivesData.directivesByName.set(Kt.REQUIRES_SCOPES,[(0,Oc.generateRequiresScopesDirective)(n.originalData.requiredScopes)]))}function Yv(e){return{kind:nt.Kind.DIRECTIVE,name:(0,Kl.stringToNameNode)(Kt.DEPRECATED),arguments:[{kind:nt.Kind.ARGUMENT,name:(0,Kl.stringToNameNode)(Kt.REASON),value:{kind:nt.Kind.STRING,value:e||Kt.DEPRECATED_DEFAULT_ARGUMENT_VALUE}}]}}function ZZ(e,t,n,r){let i=[];for(let[a,o]of e){let u=t.get(a);if(u){if(o.length<2){i.push(...o);continue}if(!u.repeatable){r.push((0,Qv.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}i.push(...o)}}return i}function eee(e,t,n){let r=[...e.persistedDirectivesData.tagDirectiveByName.values()];return e.persistedDirectivesData.isDeprecated&&r.push(Yv(e.persistedDirectivesData.deprecatedReason)),r.push(...ZZ(e.persistedDirectivesData.directivesByName,t,e.name,n)),r}function Gv(e){var n;let t=[];e.persistedDirectivesData.isDeprecated&&t.push(Yv(e.persistedDirectivesData.deprecatedReason));for(let[r,i]of e.persistedDirectivesData.directivesByName){if(r===Kt.SEMANTIC_NON_NULL&&Jv(e)){t.push((0,Oc.generateSemanticNonNullDirective)((n=(0,Oc.getFirstEntry)(e.nullLevelsBySubgraphName))!=null?n:new Set([0])));continue}Kt.PERSISTED_CLIENT_DIRECTIVES.has(r)&&t.push(i[0])}return t}function tee(e){let t=Gv(e),n=[];for(let r of e.argumentDataByName.values())MB(r)||n.push($(k({},r.node),{directives:Gv(r)}));return $(k({},e.node),{directives:t,arguments:n})}function kB(e,t,n){return e.node.name=(0,Kl.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=eee(e,t,n),e.includeDefaultValue&&(e.node.defaultValue=e.defaultValue),e.node}function nee(e,t,n,r,i){let a=[];for(let[o,u]of t.argumentDataByName){let l=(0,Oc.getEntriesNotInHashSet)(t.subgraphNames,u.subgraphNames);if(l.length>0){u.requiredSubgraphNames.size>0&&a.push({inputValueName:o,missingSubgraphs:l,requiredSubgraphs:[...u.requiredSubgraphNames]});continue}e.push(kB(u,n,r)),i&&i.add(o)}return a.length>0?(r.push((0,Qv.invalidRequiredInputValueError)(Kt.DIRECTIVE_DEFINITION,`@${t.name}`,a)),!1):!0}function ree(e,t,n,r){let i=[];nee(i,t,n,r)&&e.push({arguments:i,kind:nt.Kind.DIRECTIVE_DEFINITION,locations:(0,Kl.setToNameNodeArray)(t.executableLocations),name:(0,Kl.stringToNameNode)(t.name),repeatable:t.repeatable,description:t.description})}function iee(){return{byShareable:new Set,subgraphNamesByExternalFieldName:new Map}}function aee(e,t){let n=e.isShareableBySubgraphName.size,r=new Array,i=0;for(let[a,o]of e.isShareableBySubgraphName){let u=e.externalFieldDataBySubgraphName.get(a);if(u&&!u.isUnconditionallyProvided){r.push(a);continue}o||(i+=1)}switch(i){case 0:n===r.length&&t.subgraphNamesByExternalFieldName.set(e.name,r);return;case 1:if(n===1)return;n-r.length!==1&&t.byShareable.add(e.name);return;default:t.byShareable.add(e.name)}}var CB;(function(e){e[e.UNION=0]="UNION",e[e.INTERSECTION=1]="INTERSECTION",e[e.CONSISTENT=2]="CONSISTENT"})(CB||(mt.MergeMethod=CB={}));function IT(e,t,n){if(e.kind===nt.Kind.NON_NULL_TYPE)return t.kind!==nt.Kind.NON_NULL_TYPE?!1:IT(e.type,t.type,n);if(t.kind===nt.Kind.NON_NULL_TYPE)return IT(e,t.type,n);switch(e.kind){case nt.Kind.NAMED_TYPE:if(t.kind===nt.Kind.NAMED_TYPE){let r=e.name.value,i=t.name.value;if(r===i)return!0;let a=n.get(r);return a?a.has(i):!1}return!1;default:return t.kind===nt.Kind.LIST_TYPE?IT(e.type,t.type,n):!1}}function MB(e){return e.persistedDirectivesData.directivesByName.has(Kt.INACCESSIBLE)||e.directivesByName.has(Kt.INACCESSIBLE)}function see(e){return e===nt.Kind.SCALAR_TYPE_DEFINITION||e===nt.Kind.ENUM_TYPE_DEFINITION}function oee(e){switch(e.kind){case nt.Kind.BOOLEAN:return e.value;case nt.Kind.ENUM:case nt.Kind.STRING:return e.value;case nt.Kind.FLOAT:case nt.Kind.INT:try{return parseFloat(e.value)}catch(t){return"NaN"}case nt.Kind.NULL:return null}}function uee(e){return e.kind===nt.Kind.OBJECT_TYPE_DEFINITION&&e.renamedTypeName||e.name}function cee(){return{providedBy:[],requiredBy:[]}}function lee(e,t){switch(e.kind){case nt.Kind.ENUM_VALUE_DEFINITION:return`${e.parentTypeName}.${e.name}`;case nt.Kind.FIELD_DEFINITION:return`${t?e.renamedParentTypeName:e.originalParentTypeName}.${e.name}`;case nt.Kind.ARGUMENT:case nt.Kind.INPUT_VALUE_DEFINITION:return t?e.federatedCoords:e.originalCoords;case nt.Kind.OBJECT_TYPE_DEFINITION:return t?e.renamedTypeName:e.name;default:return e.name}}function dee(e){return e.kind===nt.Kind.OBJECT_TYPE_DEFINITION||e.kind===nt.Kind.INTERFACE_TYPE_DEFINITION}function fee(e){return{isDefinedExternal:e,isUnconditionallyProvided:!e}}function pee(e){let{value:t,done:n}=e.configureDescriptionDataBySubgraphName.values().next();if(n)return e.description;if(t.propagate)return(0,UZ.getDescriptionFromString)(t.description)||e.description}function mee(e,t){return e.kind===t.kind}function Jv(e){return e.kind===nt.Kind.FIELD_DEFINITION}function Nee(e){return e.kind===nt.Kind.INPUT_OBJECT_TYPE_DEFINITION}function Tee(e){return Kt.INPUT_NODE_KINDS.has(e)}function Eee(e){return Kt.OUTPUT_NODE_KINDS.has(e)}});var Wv={};$m(Wv,{__addDisposableResource:()=>aU,__assign:()=>gT,__asyncDelegator:()=>WB,__asyncGenerator:()=>zB,__asyncValues:()=>XB,__await:()=>Gl,__awaiter:()=>$B,__classPrivateFieldGet:()=>nU,__classPrivateFieldIn:()=>iU,__classPrivateFieldSet:()=>rU,__createBinding:()=>vT,__decorate:()=>VB,__disposeResources:()=>sU,__esDecorate:()=>hee,__exportStar:()=>QB,__extends:()=>xB,__generator:()=>GB,__importDefault:()=>tU,__importStar:()=>eU,__makeTemplateObject:()=>ZB,__metadata:()=>KB,__param:()=>jB,__propKey:()=>Iee,__read:()=>zv,__rest:()=>qB,__runInitializers:()=>yee,__setFunctionName:()=>gee,__spread:()=>YB,__spreadArray:()=>HB,__spreadArrays:()=>JB,__values:()=>_T,default:()=>Oee});function xB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Hv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function qB(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function jB(e,t){return function(n,r){t(n,r,e)}}function hee(e,t,n,r,i,a){function o(J){if(J!==void 0&&typeof J!="function")throw new TypeError("Function expected");return J}for(var u=r.kind,l=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),E,I=!1,v=n.length-1;v>=0;v--){var A={};for(var U in r)A[U]=U==="access"?{}:r[U];for(var U in r.access)A.access[U]=r.access[U];A.addInitializer=function(J){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(J||null))};var j=(0,n[v])(u==="accessor"?{get:p.get,set:p.set}:p[l],A);if(u==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(E=o(j.get))&&(p.get=E),(E=o(j.set))&&(p.set=E),(E=o(j.init))&&i.unshift(E)}else(E=o(j))&&(u==="field"?i.unshift(E):p[l]=E)}d&&Object.defineProperty(d,r.name,p),I=!0}function yee(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function zv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function YB(){for(var e=[],t=0;t1||u(I,v)})})}function u(I,v){try{l(r[I](v))}catch(A){E(a[0][3],A)}}function l(I){I.value instanceof Gl?Promise.resolve(I.value.v).then(d,p):E(a[0][2],I)}function d(I){u("next",I)}function p(I){u("throw",I)}function E(I,v){I(v),a.shift(),a.length&&u(a[0][0],a[0][1])}}function WB(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:Gl(e[i](o)),done:!1}:a?a(o):o}:a}}function XB(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof _T=="function"?_T(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(u,l){o=e[a](o),i(u,l,o.done,o.value)})}}function i(a,o,u,l){Promise.resolve(l).then(function(d){a({value:d,done:u})},o)}}function ZB(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function eU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&vT(t,e,n);return _ee(t,e),t}function tU(e){return e&&e.__esModule?e:{default:e}}function nU(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function rU(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function iU(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function aU(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if(typeof r!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}function sU(e){function t(r){e.error=e.hasError?new vee(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(a){return t(a),n()})}catch(a){t(a)}}if(e.hasError)throw e.error}return n()}var Hv,gT,vT,_ee,vee,Oee,Xv=Zu(()=>{"use strict";m();T();N();Hv=function(e,t){return Hv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Hv(e,t)};gT=function(){return gT=Object.assign||function(t){for(var n,r=1,i=arguments.length;rFU,__assign:()=>OT,__asyncDelegator:()=>vU,__asyncGenerator:()=>_U,__asyncValues:()=>OU,__await:()=>Ql,__awaiter:()=>TU,__classPrivateFieldGet:()=>AU,__classPrivateFieldIn:()=>PU,__classPrivateFieldSet:()=>RU,__createBinding:()=>DT,__decorate:()=>cU,__disposeResources:()=>wU,__esDecorate:()=>dU,__exportStar:()=>hU,__extends:()=>oU,__generator:()=>EU,__importDefault:()=>bU,__importStar:()=>DU,__makeTemplateObject:()=>SU,__metadata:()=>NU,__param:()=>lU,__propKey:()=>pU,__read:()=>tO,__rest:()=>uU,__rewriteRelativeImportExtension:()=>LU,__runInitializers:()=>fU,__setFunctionName:()=>mU,__spread:()=>yU,__spreadArray:()=>gU,__spreadArrays:()=>IU,__values:()=>ST,default:()=>bee});function oU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function uU(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function lU(e,t){return function(n,r){t(n,r,e)}}function dU(e,t,n,r,i,a){function o(J){if(J!==void 0&&typeof J!="function")throw new TypeError("Function expected");return J}for(var u=r.kind,l=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),E,I=!1,v=n.length-1;v>=0;v--){var A={};for(var U in r)A[U]=U==="access"?{}:r[U];for(var U in r.access)A.access[U]=r.access[U];A.addInitializer=function(J){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(J||null))};var j=(0,n[v])(u==="accessor"?{get:p.get,set:p.set}:p[l],A);if(u==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(E=o(j.get))&&(p.get=E),(E=o(j.set))&&(p.set=E),(E=o(j.init))&&i.unshift(E)}else(E=o(j))&&(u==="field"?i.unshift(E):p[l]=E)}d&&Object.defineProperty(d,r.name,p),I=!0}function fU(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function tO(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function yU(){for(var e=[],t=0;t1||l(v,U)})},A&&(i[v]=A(i[v])))}function l(v,A){try{d(r[v](A))}catch(U){I(a[0][3],U)}}function d(v){v.value instanceof Ql?Promise.resolve(v.value.v).then(p,E):I(a[0][2],v)}function p(v){l("next",v)}function E(v){l("throw",v)}function I(v,A){v(A),a.shift(),a.length&&l(a[0][0],a[0][1])}}function vU(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:Ql(e[i](o)),done:!1}:a?a(o):o}:a}}function OU(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof ST=="function"?ST(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(u,l){o=e[a](o),i(u,l,o.done,o.value)})}}function i(a,o,u,l){Promise.resolve(l).then(function(d){a({value:d,done:u})},o)}}function SU(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function DU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=eO(e),r=0;r{"use strict";m();T();N();Zv=function(e,t){return Zv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Zv(e,t)};OT=function(){return OT=Object.assign||function(t){for(var n,r=1,i=arguments.length;r{"use strict";m();T();N()});var Yl=F(Qi=>{"use strict";m();T();N();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.asArray=void 0;Qi.isUrl=kU;Qi.isDocumentString=wee;Qi.isValidPath=Cee;Qi.compareStrings=MU;Qi.nodeToString=nO;Qi.compareNodes=Bee;Qi.isSome=Uee;Qi.assertSome=kee;var Aee=_e(),Ree=/^(https?|wss?|file):\/\//;function kU(e){if(typeof e!="string"||!Ree.test(e))return!1;if(URL.canParse)return URL.canParse(e);try{return!!new URL(e)}catch(t){return!1}}var Pee=e=>Array.isArray(e)?e:e?[e]:[];Qi.asArray=Pee;var Fee=/\.[a-z0-9]+$/i;function wee(e){if(typeof e!="string"||Fee.test(e)||kU(e))return!1;try{return(0,Aee.parse)(e),!0}catch(t){if(!t.message.includes("EOF")&&e.replace(/(\#[^*]*)/g,"").trim()!==""&&e.includes(" "))throw new Error(`Failed to parse the GraphQL document. ${t.message} +${e}`)}return!1}var Lee=/[‘“!%^<>`\n]/;function Cee(e){return typeof e=="string"&&!Lee.test(e)}function MU(e,t){return String(e)String(t)?1:0}function nO(e){var n,r;let t;return"alias"in e&&(t=(n=e.alias)==null?void 0:n.value),t==null&&"name"in e&&(t=(r=e.name)==null?void 0:r.value),t==null&&(t=e.kind),t}function Bee(e,t,n){let r=nO(e),i=nO(t);return typeof n=="function"?n(r,i):MU(r,i)}function Uee(e){return e!=null}function kee(e,t="Value should be something"){if(e==null)throw new Error(t)}});var Yf=F(AT=>{"use strict";m();T();N();Object.defineProperty(AT,"__esModule",{value:!0});AT.inspect=void 0;var VU=3;function Mee(e){return bT(e,[])}AT.inspect=Mee;function bT(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return xee(e,t);default:return String(e)}}function xU(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; + ${e.stack}`}function xee(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?xU(e)+` +`+qU(e.errors,t):xU(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(qee(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:bT(r,n)}else if(Array.isArray(e))return qU(e,n);return Vee(e,n)}function qee(e){return typeof e.toJSON=="function"}function Vee(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>VU?"["+jee(e)+"]":"{ "+n.map(([i,a])=>i+": "+bT(a,t)).join(", ")+" }"}function qU(e,t){if(e.length===0)return"[]";if(t.length>VU)return"[Array]";let n=e.length,r=[];for(let i=0;i{"use strict";m();T();N();Object.defineProperty(RT,"__esModule",{value:!0});RT.createGraphQLError=iO;RT.relocatedError=Gee;var rO=_e(),Kee=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function $ee(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>Kee.includes(t))}function iO(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&$ee(t.originalError)&&(t.originalError=iO(t.originalError.message,t.originalError)),rO.versionInfo.major>=17?new rO.GraphQLError(e,t):new rO.GraphQLError(e,t==null?void 0:t.nodes,t==null?void 0:t.source,t==null?void 0:t.positions,t==null?void 0:t.path,t==null?void 0:t.originalError,t==null?void 0:t.extensions)}function Gee(e,t){return iO(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t==null?e.path:t,originalError:e,extensions:e.extensions})}});var Jf=F(ni=>{"use strict";m();T();N();Object.defineProperty(ni,"__esModule",{value:!0});ni.isPromise=FT;ni.isActualPromise=KU;ni.handleMaybePromise=bu;ni.fakePromise=Za;ni.createDeferredPromise=Qee;ni.iterateAsync=$U;ni.iterateAsyncVoid=$U;ni.fakeRejectPromise=Sc;ni.mapMaybePromise=Yee;ni.mapAsyncIterator=Jee;ni.promiseLikeFinally=GU;ni.unfakePromise=QU;var wT=Symbol.for("@whatwg-node/promise-helpers/FakePromise");function FT(e){return(e==null?void 0:e.then)!=null}function KU(e){let t=e;return t&&t.then&&t.catch&&t.finally}function bu(e,t,n,r){let i=Za().then(e).then(t,n);return r&&(i=i.finally(r)),QU(i)}function Za(e){return e&&KU(e)?e:FT(e)?{then:(t,n)=>Za(e.then(t,n)),catch:t=>Za(e.then(n=>n,t)),finally:t=>Za(t?GU(e,t):e),[Symbol.toStringTag]:"Promise"}:{then(t){if(t)try{return Za(t(e))}catch(n){return Sc(n)}return this},catch(){return this},finally(t){if(t)try{return Za(t()).then(()=>e,()=>e)}catch(n){return Sc(n)}return this},[Symbol.toStringTag]:"Promise",__fakePromiseValue:e,[wT]:"resolved"}}function Qee(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise(function(i,a){e=i,t=a}),get resolve(){return e},get reject(){return t}}}function $U(e,t,n){if((e==null?void 0:e.length)===0)return;let r=e[Symbol.iterator](),i=0;function a(){let{done:o,value:u}=r.next();if(o)return;let l=!1;function d(){l=!0}return bu(function(){return t(u,d,i++)},function(E){if(E&&(n==null||n.push(E)),!l)return a()})}return a()}function Sc(e){return{then(t,n){if(n)try{return Za(n(e))}catch(r){return Sc(r)}return this},catch(t){if(t)try{return Za(t(e))}catch(n){return Sc(n)}return this},finally(t){if(t)try{t()}catch(n){return Sc(n)}return this},__fakeRejectError:e,[Symbol.toStringTag]:"Promise",[wT]:"rejected"}}function Yee(e,t,n){return bu(()=>e,t,n)}function Jee(e,t,n,r){Symbol.asyncIterator in e&&(e=e[Symbol.asyncIterator]());let i,a,o;if(r){let d;o=p=>(d||(d=bu(r,()=>p,()=>p)),d)}typeof e.return=="function"&&(i=e.return,a=d=>{let p=()=>{throw d};return i.call(e).then(p,p)});function u(d){return d.done?o?o(d):d:bu(()=>d.value,p=>bu(()=>t(p),jU,a))}let l;if(n){let d,p=n;l=E=>(d||(d=bu(()=>E,I=>bu(()=>p(I),jU,a))),d)}return{next(){return e.next().then(u,l)},return(){let d=i?i.call(e).then(u,l):Za({value:void 0,done:!0});return o?d.then(o):d},throw(d){return typeof e.throw=="function"?e.throw(d).then(u,l):a?a(d):Sc(d)},[Symbol.asyncIterator](){return this}}}function jU(e){return{value:e,done:!1}}function Hee(e){return(e==null?void 0:e[wT])==="resolved"}function zee(e){return(e==null?void 0:e[wT])==="rejected"}function GU(e,t){return"finally"in e?e.finally(t):e.then(n=>{let r=t();return FT(r)?r.then(()=>n):n},n=>{let r=t();if(FT(r))return r.then(()=>{throw n});throw n})}function QU(e){if(Hee(e))return e.__fakePromiseValue;if(zee(e))throw e.__fakeRejectError;return e}});var LT=F(Au=>{"use strict";m();T();N();Object.defineProperty(Au,"__esModule",{value:!0});Au.isPromise=void 0;Au.isIterableObject=Wee;Au.isObjectLike=Xee;Au.promiseReduce=Zee;Au.hasOwnProperty=ete;var YU=Jf();Object.defineProperty(Au,"isPromise",{enumerable:!0,get:function(){return YU.isPromise}});function Wee(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function Xee(e){return typeof e=="object"&&e!==null}function Zee(e,t,n){let r=n;for(let i of e)r=(0,YU.handleMaybePromise)(()=>r,a=>t(a,i));return r}function ete(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var oO=F(sO=>{"use strict";m();T();N();Object.defineProperty(sO,"__esModule",{value:!0});sO.getArgumentValues=nte;var aO=Yf(),Dc=_e(),CT=PT(),tte=LT();function nte(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((u,l)=>$(k({},u),{[l.name.value]:l}),{});for(let{name:u,type:l,defaultValue:d}of e.args){let p=a[u];if(!p){if(d!==void 0)r[u]=d;else if((0,Dc.isNonNullType)(l))throw(0,CT.createGraphQLError)(`Argument "${u}" of required type "${(0,aO.inspect)(l)}" was not provided.`,{nodes:[t]});continue}let E=p.value,I=E.kind===Dc.Kind.NULL;if(E.kind===Dc.Kind.VARIABLE){let A=E.name.value;if(n==null||!(0,tte.hasOwnProperty)(n,A)){if(d!==void 0)r[u]=d;else if((0,Dc.isNonNullType)(l))throw(0,CT.createGraphQLError)(`Argument "${u}" of required type "${(0,aO.inspect)(l)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:[E]});continue}I=n[A]==null}if(I&&(0,Dc.isNonNullType)(l))throw(0,CT.createGraphQLError)(`Argument "${u}" of non-null type "${(0,aO.inspect)(l)}" must not be null.`,{nodes:[E]});let v=(0,Dc.valueFromAST)(E,l,n);if(v===void 0)throw(0,CT.createGraphQLError)(`Argument "${u}" has invalid value ${(0,Dc.print)(E)}.`,{nodes:[E]});r[u]=v}return r}});var Ru=F(Cs=>{"use strict";m();T();N();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.memoize1=rte;Cs.memoize2=ite;Cs.memoize3=ate;Cs.memoize4=ste;Cs.memoize5=ote;Cs.memoize2of4=ute;Cs.memoize2of5=cte;function rte(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let a=e(r);return t.set(r,a),a}return i}}function ite(e){let t=new WeakMap;return function(r,i){let a=t.get(r);if(!a){a=new WeakMap,t.set(r,a);let u=e(r,i);return a.set(i,u),u}let o=a.get(i);if(o===void 0){let u=e(r,i);return a.set(i,u),u}return o}}function ate(e){let t=new WeakMap;return function(r,i,a){let o=t.get(r);if(!o){o=new WeakMap,t.set(r,o);let d=new WeakMap;o.set(i,d);let p=e(r,i,a);return d.set(a,p),p}let u=o.get(i);if(!u){u=new WeakMap,o.set(i,u);let d=e(r,i,a);return u.set(a,d),d}let l=u.get(a);if(l===void 0){let d=e(r,i,a);return u.set(a,d),d}return l}}function ste(e){let t=new WeakMap;return function(r,i,a,o){let u=t.get(r);if(!u){u=new WeakMap,t.set(r,u);let E=new WeakMap;u.set(i,E);let I=new WeakMap;E.set(a,I);let v=e(r,i,a,o);return I.set(o,v),v}let l=u.get(i);if(!l){l=new WeakMap,u.set(i,l);let E=new WeakMap;l.set(a,E);let I=e(r,i,a,o);return E.set(o,I),I}let d=l.get(a);if(!d){let E=new WeakMap;l.set(a,E);let I=e(r,i,a,o);return E.set(o,I),I}let p=d.get(o);if(p===void 0){let E=e(r,i,a,o);return d.set(o,E),E}return p}}function ote(e){let t=new WeakMap;return function(r,i,a,o,u){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let v=new WeakMap;l.set(i,v);let A=new WeakMap;v.set(a,A);let U=new WeakMap;A.set(o,U);let j=e(r,i,a,o,u);return U.set(u,j),j}let d=l.get(i);if(!d){d=new WeakMap,l.set(i,d);let v=new WeakMap;d.set(a,v);let A=new WeakMap;v.set(o,A);let U=e(r,i,a,o,u);return A.set(u,U),U}let p=d.get(a);if(!p){p=new WeakMap,d.set(a,p);let v=new WeakMap;p.set(o,v);let A=e(r,i,a,o,u);return v.set(u,A),A}let E=p.get(o);if(!E){E=new WeakMap,p.set(o,E);let v=e(r,i,a,o,u);return E.set(u,v),v}let I=E.get(u);if(I===void 0){let v=e(r,i,a,o,u);return E.set(u,v),v}return I}}function ute(e){let t=new WeakMap;return function(r,i,a,o){let u=t.get(r);if(!u){u=new WeakMap,t.set(r,u);let d=e(r,i,a,o);return u.set(i,d),d}let l=u.get(i);if(l===void 0){let d=e(r,i,a,o);return u.set(i,d),d}return l}}function cte(e){let t=new WeakMap;return function(r,i,a,o,u){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let p=e(r,i,a,o,u);return l.set(i,p),p}let d=l.get(i);if(d===void 0){let p=e(r,i,a,o,u);return l.set(i,p),p}return d}}});var cO=F(uO=>{"use strict";m();T();N();Object.defineProperty(uO,"__esModule",{value:!0});uO.getDirectiveExtensions=fte;var JU=_e(),lte=oO(),dte=Ru();function fte(e,t,n=["directives"]){var o;let r={};if(e.extensions){let u=e.extensions;for(let l of n)u=u==null?void 0:u[l];if(u!=null)for(let l in u){let d=u[l],p=l;if(Array.isArray(d))for(let E of d){let I=r[p];I||(I=[],r[p]=I),I.push(E)}else{let E=r[p];E||(E=[],r[p]=E),E.push(d)}}}let i=(0,dte.memoize1)(u=>JSON.stringify(u)),a=[];e.astNode&&a.push(e.astNode),e.extensionASTNodes&&a.push(...e.extensionASTNodes);for(let u of a)if((o=u.directives)!=null&&o.length)for(let l of u.directives){let d=l.name.value,p=r[d];p||(p=[],r[d]=p);let E=t==null?void 0:t.getDirective(d),I={};if(E&&(I=(0,lte.getArgumentValues)(E,l)),l.arguments)for(let v of l.arguments){let A=v.name.value;if(I[A]==null){let U=E==null?void 0:E.args.find(j=>j.name===A);U&&(I[A]=(0,JU.valueFromAST)(v.value,U.type))}I[A]==null&&(I[A]=(0,JU.valueFromASTUntyped)(v.value))}if(a.length>0&&p.length>0){let v=i(I);if(p.some(A=>i(A)===v))continue}p.push(I)}return r}});var lO=F(Jl=>{"use strict";m();T();N();Object.defineProperty(Jl,"__esModule",{value:!0});Jl.getDirectivesInExtensions=pte;Jl.getDirectiveInExtensions=mte;Jl.getDirectives=Nte;Jl.getDirective=Tte;var BT=cO();function pte(e,t=["directives"]){let n=(0,BT.getDirectiveExtensions)(e,void 0,t);return Object.entries(n).map(([r,i])=>i==null?void 0:i.map(a=>({name:r,args:a}))).flat(1/0).filter(Boolean)}function mte(e,t,n=["directives"]){return(0,BT.getDirectiveExtensions)(e,void 0,n)[t]}function Nte(e,t,n=["directives"]){let r=(0,BT.getDirectiveExtensions)(t,e,n);return Object.entries(r).map(([i,a])=>a==null?void 0:a.map(o=>({name:i,args:o}))).flat(1/0).filter(Boolean)}function Tte(e,t,n,r=["directives"]){return(0,BT.getDirectiveExtensions)(t,e,r)[n]}});var fO=F(dO=>{"use strict";m();T();N();Object.defineProperty(dO,"__esModule",{value:!0});dO.getFieldsWithDirectives=hte;var Ete=_e();function hte(e,t={}){let n={},r=["ObjectTypeDefinition","ObjectTypeExtension"];t.includeInputTypes&&(r=[...r,"InputObjectTypeDefinition","InputObjectTypeExtension"]);let i=e.definitions.filter(a=>r.includes(a.kind));for(let a of i){let o=a.name.value;if(a.fields!=null){for(let u of a.fields)if(u.directives&&u.directives.length>0){let l=u.name.value,d=`${o}.${l}`,p=u.directives.map(E=>({name:E.name.value,args:(E.arguments||[]).reduce((I,v)=>$(k({},I),{[v.name.value]:(0,Ete.valueFromASTUntyped)(v.value)}),{})}));n[d]=p}}}return n}});var HU=F(mO=>{"use strict";m();T();N();Object.defineProperty(mO,"__esModule",{value:!0});mO.getArgumentsWithDirectives=Ite;var pO=_e();function yte(e){return e.kind===pO.Kind.OBJECT_TYPE_DEFINITION||e.kind===pO.Kind.OBJECT_TYPE_EXTENSION}function Ite(e){var r;let t={},n=e.definitions.filter(yte);for(let i of n)if(i.fields!=null)for(let a of i.fields){let o=(r=a.arguments)==null?void 0:r.filter(l=>{var d;return(d=l.directives)==null?void 0:d.length});if(!(o!=null&&o.length))continue;let u=t[`${i.name.value}.${a.name.value}`]={};for(let l of o){let d=l.directives.map(p=>({name:p.name.value,args:(p.arguments||[]).reduce((E,I)=>$(k({},E),{[I.name.value]:(0,pO.valueFromASTUntyped)(I.value)}),{})}));u[l.name.value]=d}}return t}});var TO=F(NO=>{"use strict";m();T();N();Object.defineProperty(NO,"__esModule",{value:!0});NO.getImplementingTypes=gte;function gte(e,t){let n=t.getTypeMap(),r=[];for(let i in n){let a=n[i];"getInterfaces"in a&&a.getInterfaces().find(u=>u.name===e)&&r.push(a.name)}return r}});var UT=F(hO=>{"use strict";m();T();N();Object.defineProperty(hO,"__esModule",{value:!0});hO.astFromType=EO;var _te=Yf(),bc=_e();function EO(e){if((0,bc.isNonNullType)(e)){let t=EO(e.ofType);if(t.kind===bc.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${(0,_te.inspect)(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:bc.Kind.NON_NULL_TYPE,type:t}}else if((0,bc.isListType)(e))return{kind:bc.Kind.LIST_TYPE,type:EO(e.ofType)};return{kind:bc.Kind.NAMED_TYPE,name:{kind:bc.Kind.NAME,value:e.name}}}});var Hf=F(yO=>{"use strict";m();T();N();Object.defineProperty(yO,"__esModule",{value:!0});yO.astFromValueUntyped=kT;var es=_e();function kT(e){if(e===null)return{kind:es.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=kT(n);r!=null&&t.push(r)}return{kind:es.Kind.LIST,values:t}}if(typeof e=="object"){if(e!=null&&e.toJSON)return kT(e.toJSON());let t=[];for(let n in e){let r=e[n],i=kT(r);i&&t.push({kind:es.Kind.OBJECT_FIELD,name:{kind:es.Kind.NAME,value:n},value:i})}return{kind:es.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:es.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:es.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return vte.test(t)?{kind:es.Kind.INT,value:t}:{kind:es.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:es.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var vte=/^-?(?:0|[1-9][0-9]*)$/});var WU=F(IO=>{"use strict";m();T();N();Object.defineProperty(IO,"__esModule",{value:!0});IO.astFromValue=zf;var Ote=Yf(),yi=_e(),Ste=Hf(),zU=LT();function zf(e,t){if((0,yi.isNonNullType)(t)){let n=zf(e,t.ofType);return(n==null?void 0:n.kind)===yi.Kind.NULL?null:n}if(e===null)return{kind:yi.Kind.NULL};if(e===void 0)return null;if((0,yi.isListType)(t)){let n=t.ofType;if((0,zU.isIterableObject)(e)){let r=[];for(let i of e){let a=zf(i,n);a!=null&&r.push(a)}return{kind:yi.Kind.LIST,values:r}}return zf(e,n)}if((0,yi.isInputObjectType)(t)){if(!(0,zU.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=zf(e[r.name],r.type);i&&n.push({kind:yi.Kind.OBJECT_FIELD,name:{kind:yi.Kind.NAME,value:r.name},value:i})}return{kind:yi.Kind.OBJECT,fields:n}}if((0,yi.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,yi.isEnumType)(t)?{kind:yi.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&Dte.test(n)?{kind:yi.Kind.INT,value:n}:(0,Ste.astFromValueUntyped)(n)}console.assert(!1,"Unexpected input type: "+(0,Ote.inspect)(t))}var Dte=/^-?(?:0|[1-9][0-9]*)$/});var XU=F(gO=>{"use strict";m();T();N();Object.defineProperty(gO,"__esModule",{value:!0});gO.getDescriptionNode=Ate;var bte=_e();function Ate(e){var t;if((t=e.astNode)!=null&&t.description)return $(k({},e.astNode.description),{block:!0});if(e.description)return{kind:bte.Kind.STRING,value:e.description,block:!0}}});var Wf=F(Yi=>{"use strict";m();T();N();Object.defineProperty(Yi,"__esModule",{value:!0});Yi.getRootTypeMap=Yi.getRootTypes=Yi.getRootTypeNames=void 0;Yi.getDefinedRootType=Pte;var Rte=PT(),_O=Ru();function Pte(e,t,n){let i=(0,Yi.getRootTypeMap)(e).get(t);if(i==null)throw(0,Rte.createGraphQLError)(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}Yi.getRootTypeNames=(0,_O.memoize1)(function(t){let n=(0,Yi.getRootTypes)(t);return new Set([...n].map(r=>r.name))});Yi.getRootTypes=(0,_O.memoize1)(function(t){let n=(0,Yi.getRootTypeMap)(t);return new Set(n.values())});Yi.getRootTypeMap=(0,_O.memoize1)(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let a=t.getSubscriptionType();return a&&n.set("subscription",a),n})});var bO=F(Xn=>{"use strict";m();T();N();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.getDocumentNodeFromSchema=ek;Xn.printSchemaWithDirectives=Cte;Xn.astFromSchema=tk;Xn.astFromDirective=nk;Xn.getDirectiveNodes=ya;Xn.astFromArg=OO;Xn.astFromObjectType=rk;Xn.astFromInterfaceType=ik;Xn.astFromUnionType=ak;Xn.astFromInputObjectType=sk;Xn.astFromEnumType=ok;Xn.astFromScalarType=uk;Xn.astFromField=SO;Xn.astFromInputField=ck;Xn.astFromEnumValue=lk;Xn.makeDeprecatedDirective=dk;Xn.makeDirectiveNode=Hl;Xn.makeDirectiveNodes=DO;var Nt=_e(),Ac=UT(),vO=WU(),Fte=Hf(),Ji=XU(),ZU=lO(),wte=Yl(),Lte=Wf();function ek(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=tk(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let u of o)(0,Nt.isSpecifiedDirective)(u)||a.push(nk(u,e,n));for(let u in r){let l=r[u],d=(0,Nt.isSpecifiedScalarType)(l),p=(0,Nt.isIntrospectionType)(l);if(!(d||p))if((0,Nt.isObjectType)(l))a.push(rk(l,e,n));else if((0,Nt.isInterfaceType)(l))a.push(ik(l,e,n));else if((0,Nt.isUnionType)(l))a.push(ak(l,e,n));else if((0,Nt.isInputObjectType)(l))a.push(sk(l,e,n));else if((0,Nt.isEnumType)(l))a.push(ok(l,e,n));else if((0,Nt.isScalarType)(l))a.push(uk(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:Nt.Kind.DOCUMENT,definitions:a}}function Cte(e,t={}){let n=ek(e,t);return(0,Nt.print)(n)}function tk(e,t){let n=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),r=[];if(e.astNode!=null&&r.push(e.astNode),e.extensionASTNodes!=null)for(let d of e.extensionASTNodes)r.push(d);for(let d of r)if(d.operationTypes)for(let p of d.operationTypes)n.set(p.operation,p);let i=(0,Lte.getRootTypeMap)(e);for(let[d,p]of n){let E=i.get(d);if(E!=null){let I=(0,Ac.astFromType)(E);p!=null?p.type=I:n.set(d,{kind:Nt.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(wte.isSome),o=ya(e,e,t);if(!a.length&&!o.length)return null;let u={kind:a.length?Nt.Kind.SCHEMA_DEFINITION:Nt.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=(0,Ji.getDescriptionNode)(e);return l&&(u.description=l),u}function nk(e,t,n){var r,i;return{kind:Nt.Kind.DIRECTIVE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>OO(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:Nt.Kind.NAME,value:a})))||[]}}function ya(e,t,n){let r=[],i=(0,ZU.getDirectivesInExtensions)(e,n),a;i!=null&&(a=DO(t,i));let o=null,u=null,l=null;if(a!=null&&(r=a.filter(d=>Nt.specifiedDirectives.every(p=>p.name!==d.name.value)),o=a.find(d=>d.name.value==="deprecated"),u=a.find(d=>d.name.value==="specifiedBy"),l=a.find(d=>d.name.value==="oneOf")),e.deprecationReason!=null&&o==null&&(o=dk(e.deprecationReason)),e.specifiedByUrl!=null||e.specifiedByURL!=null&&u==null){let p={url:e.specifiedByUrl||e.specifiedByURL};u=Hl("specifiedBy",p)}return e.isOneOf&&l==null&&(l=Hl("oneOf")),o!=null&&r.push(o),u!=null&&r.push(u),l!=null&&r.push(l),r}function OO(e,t,n){var r;return{kind:Nt.Kind.INPUT_VALUE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},type:(0,Ac.astFromType)(e.type),defaultValue:e.defaultValue!==void 0&&(r=(0,vO.astFromValue)(e.defaultValue,e.type))!=null?r:void 0,directives:ya(e,t,n)}}function rk(e,t,n){return{kind:Nt.Kind.OBJECT_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>SO(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>(0,Ac.astFromType)(r)),directives:ya(e,t,n)}}function ik(e,t,n){let r={kind:Nt.Kind.INTERFACE_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>SO(i,t,n)),directives:ya(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>(0,Ac.astFromType)(i))),r}function ak(e,t,n){return{kind:Nt.Kind.UNION_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:ya(e,t,n),types:e.getTypes().map(r=>(0,Ac.astFromType)(r))}}function sk(e,t,n){return{kind:Nt.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>ck(r,t,n)),directives:ya(e,t,n)}}function ok(e,t,n){return{kind:Nt.Kind.ENUM_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>lk(r,t,n)),directives:ya(e,t,n)}}function uk(e,t,n){let r=(0,ZU.getDirectivesInExtensions)(e,n),i=DO(t,r),a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(o=>o.name.value==="specifiedBy")){let o={url:a};i.push(Hl("specifiedBy",o))}return{kind:Nt.Kind.SCALAR_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:i}}function SO(e,t,n){return{kind:Nt.Kind.FIELD_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},arguments:e.args.map(r=>OO(r,t,n)),type:(0,Ac.astFromType)(e.type),directives:ya(e,t,n)}}function ck(e,t,n){var r;return{kind:Nt.Kind.INPUT_VALUE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},type:(0,Ac.astFromType)(e.type),directives:ya(e,t,n),defaultValue:(r=(0,vO.astFromValue)(e.defaultValue,e.type))!=null?r:void 0}}function lk(e,t,n){return{kind:Nt.Kind.ENUM_VALUE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:ya(e,t,n)}}function dk(e){return Hl("deprecated",{reason:e},Nt.GraphQLDeprecatedDirective)}function Hl(e,t,n){let r=[];for(let i in t){let a=t[i],o;if(n!=null){let u=n.args.find(l=>l.name===i);u&&(o=(0,vO.astFromValue)(a,u.type))}o==null&&(o=(0,Fte.astFromValueUntyped)(a)),o!=null&&r.push({kind:Nt.Kind.ARGUMENT,name:{kind:Nt.Kind.NAME,value:i},value:o})}return{kind:Nt.Kind.DIRECTIVE,name:{kind:Nt.Kind.NAME,value:e},arguments:r}}function DO(e,t){let n=[];for(let{name:r,args:i}of t){let a=e==null?void 0:e.getDirective(r);n.push(Hl(r,i,a))}return n}});var pk=F(MT=>{"use strict";m();T();N();Object.defineProperty(MT,"__esModule",{value:!0});MT.validateGraphQlDocuments=Bte;MT.createDefaultRules=fk;var Xf=_e();function Bte(e,t,n=fk()){var u;let r=new Set,i=new Map;for(let l of t)for(let d of l.definitions)d.kind===Xf.Kind.FRAGMENT_DEFINITION?i.set(d.name.value,d):r.add(d);let a={kind:Xf.Kind.DOCUMENT,definitions:Array.from([...r,...i.values()])},o=(0,Xf.validate)(e,a,n);for(let l of o)if(l.stack=l.message,l.locations)for(let d of l.locations)l.stack+=` + at ${(u=l.source)==null?void 0:u.name}:${d.line}:${d.column}`;return o}function fk(){let e=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return Xf.versionInfo.major<15&&(e=e.map(t=>t.replace(/Rule$/,""))),Xf.specifiedRules.filter(t=>!e.includes(t.name))}});var mk=F(AO=>{"use strict";m();T();N();Object.defineProperty(AO,"__esModule",{value:!0});AO.parseGraphQLJSON=xte;var Ute=_e();function kte(e){return e=e.toString(),e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function Mte(e){return JSON.parse(kte(e))}function xte(e,t,n){let r=Mte(t);if(r.data&&(r=r.data),r.kind==="Document")return{location:e,document:r};if(r.__schema){let i=(0,Ute.buildClientSchema)(r,n);return{location:e,schema:i}}else if(typeof r=="string")return{location:e,rawSDL:r};throw new Error("Not valid JSON content")}});var PO=F(Hi=>{"use strict";m();T();N();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.resetComments=Vte;Hi.collectComment=jte;Hi.pushComment=Zf;Hi.printComment=yk;Hi.printWithComments=Qte;Hi.getDescription=Jte;Hi.getComment=RO;Hi.getLeadingCommentBlock=Ik;Hi.dedentBlockStringValue=gk;Hi.getBlockStringIndentation=_k;var hk=_e(),qte=80,zl={};function Vte(){zl={}}function jte(e){var n;let t=(n=e.name)==null?void 0:n.value;if(t!=null)switch(Zf(e,t),e.kind){case"EnumTypeDefinition":if(e.values)for(let r of e.values)Zf(r,t,r.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(let r of e.fields)if(Zf(r,t,r.name.value),Yte(r)&&r.arguments)for(let i of r.arguments)Zf(i,t,r.name.value,i.name.value)}break}}function Zf(e,t,n,r){let i=RO(e);if(typeof i!="string"||i.length===0)return;let a=[t];n&&(a.push(n),r&&a.push(r));let o=a.join(".");zl[o]||(zl[o]=[]),zl[o].push(i)}function yk(e){return` # `+e.replace(/\n/g,` -# `)}function ke(e,t){return e?e.filter(n=>n).join(t||""):""}function Nk(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` -`)))!=null?t:!1}function Mte(e){return(t,n,r,i,a)=>{var p;let o=[],u=i.reduce((E,I)=>(["fields","arguments","values"].includes(I)&&E.name&&o.push(E.name.value),E[I]),a[0]),l=[...o,(p=u==null?void 0:u.name)==null?void 0:p.value].filter(Boolean).join("."),d=[];return t.kind.includes("Definition")&&zl[l]&&d.push(...zl[l]),ke([...d.map(yk),t.description,e(t,n,r,i,a)],` +# `)}function Me(e,t){return e?e.filter(n=>n).join(t||""):""}function Nk(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` +`)))!=null?t:!1}function Kte(e){return(t,n,r,i,a)=>{var p;let o=[],u=i.reduce((E,I)=>(["fields","arguments","values"].includes(I)&&E.name&&o.push(E.name.value),E[I]),a[0]),l=[...o,(p=u==null?void 0:u.name)==null?void 0:p.value].filter(Boolean).join("."),d=[];return t.kind.includes("Definition")&&zl[l]&&d.push(...zl[l]),Me([...d.map(yk),t.description,e(t,n,r,i,a)],` `)}}function ep(e){return e&&` ${e.replace(/\n/g,` `)}`}function Ia(e){return e&&e.length!==0?`{ -${ep(ke(e,` +${ep(Me(e,` `))} -}`:""}function Pn(e,t,n){return t?e+t+(n||""):""}function xte(e,t=!1){let n=e.replace(/\\/g,"\\\\").replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(` +}`:""}function Pn(e,t,n){return t?e+t+(n||""):""}function $te(e,t=!1){let n=e.replace(/\\/g,"\\\\").replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(` `)===-1?`"""${n.replace(/"$/,`" `)}"""`:`""" ${t?n:ep(n)} -"""`}var Tk={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>ke(e.definitions,` +"""`}var Tk={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Me(e.definitions,` -`)},OperationDefinition:{leave:e=>{let t=Pn("(",ke(e.variableDefinitions,", "),")");return ke([e.operation,ke([e.name,t]),ke(e.directives," ")]," ")+" "+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+Pn(" = ",n)+Pn(" ",ke(r," "))},SelectionSet:{leave:({selections:e})=>Ia(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=Pn("",e,": ")+t,o=a+Pn("(",ke(n,", "),")");return o.length>Bte&&(o=a+Pn(`( -`,ep(ke(n,` +`)},OperationDefinition:{leave:e=>{let t=Pn("(",Me(e.variableDefinitions,", "),")");return Me([e.operation,Me([e.name,t]),Me(e.directives," ")]," ")+" "+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+Pn(" = ",n)+Pn(" ",Me(r," "))},SelectionSet:{leave:({selections:e})=>Ia(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=Pn("",e,": ")+t,o=a+Pn("(",Me(n,", "),")");return o.length>qte&&(o=a+Pn(`( +`,ep(Me(n,` `)),` -)`)),ke([o,ke(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Pn(" ",ke(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>ke(["...",Pn("on ",e),ke(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Pn("(",ke(n,", "),")")} on ${t} ${Pn("",ke(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?xte(e):JSON.stringify(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+ke(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+ke(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Pn("(",ke(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({directives:e,operationTypes:t})=>ke(["schema",ke(e," "),Ia(t)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({name:e,directives:t})=>ke(["scalar",e,ke(t," ")]," ")},ObjectTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ke(["type",e,Pn("implements ",ke(t," & ")),ke(n," "),Ia(r)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:n,directives:r})=>e+(Nk(t)?Pn(`( -`,ep(ke(t,` +)`)),Me([o,Me(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Pn(" ",Me(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Me(["...",Pn("on ",e),Me(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Pn("(",Me(n,", "),")")} on ${t} ${Pn("",Me(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?$te(e):JSON.stringify(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Me(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Me(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Pn("(",Me(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({directives:e,operationTypes:t})=>Me(["schema",Me(e," "),Ia(t)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({name:e,directives:t})=>Me(["scalar",e,Me(t," ")]," ")},ObjectTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["type",e,Pn("implements ",Me(t," & ")),Me(n," "),Ia(r)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:n,directives:r})=>e+(Nk(t)?Pn(`( +`,ep(Me(t,` `)),` -)`):Pn("(",ke(t,", "),")"))+": "+n+Pn(" ",ke(r," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:n,directives:r})=>ke([e+": "+t,Pn("= ",n),ke(r," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ke(["interface",e,Pn("implements ",ke(t," & ")),ke(n," "),Ia(r)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:n})=>ke(["union",e,ke(t," "),Pn("= ",ke(n," | "))]," ")},EnumTypeDefinition:{leave:({name:e,directives:t,values:n})=>ke(["enum",e,ke(t," "),Ia(n)]," ")},EnumValueDefinition:{leave:({name:e,directives:t})=>ke([e,ke(t," ")]," ")},InputObjectTypeDefinition:{leave:({name:e,directives:t,fields:n})=>ke(["input",e,ke(t," "),Ia(n)]," ")},DirectiveDefinition:{leave:({name:e,arguments:t,repeatable:n,locations:r})=>"directive @"+e+(Nk(t)?Pn(`( -`,ep(ke(t,` +)`):Pn("(",Me(t,", "),")"))+": "+n+Pn(" ",Me(r," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:n,directives:r})=>Me([e+": "+t,Pn("= ",n),Me(r," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["interface",e,Pn("implements ",Me(t," & ")),Me(n," "),Ia(r)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:n})=>Me(["union",e,Me(t," "),Pn("= ",Me(n," | "))]," ")},EnumTypeDefinition:{leave:({name:e,directives:t,values:n})=>Me(["enum",e,Me(t," "),Ia(n)]," ")},EnumValueDefinition:{leave:({name:e,directives:t})=>Me([e,Me(t," ")]," ")},InputObjectTypeDefinition:{leave:({name:e,directives:t,fields:n})=>Me(["input",e,Me(t," "),Ia(n)]," ")},DirectiveDefinition:{leave:({name:e,arguments:t,repeatable:n,locations:r})=>"directive @"+e+(Nk(t)?Pn(`( +`,ep(Me(t,` `)),` -)`):Pn("(",ke(t,", "),")"))+(n?" repeatable":"")+" on "+ke(r," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ke(["extend schema",ke(e," "),Ia(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ke(["extend scalar",e,ke(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ke(["extend type",e,Pn("implements ",ke(t," & ")),ke(n," "),Ia(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ke(["extend interface",e,Pn("implements ",ke(t," & ")),ke(n," "),Ia(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>ke(["extend union",e,ke(t," "),Pn("= ",ke(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>ke(["extend enum",e,ke(t," "),Ia(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>ke(["extend input",e,ke(t," "),Ia(n)]," ")}},qte=Object.keys(Tk).reduce((e,t)=>$(k({},e),{[t]:{leave:Mte(Tk[t].leave)}}),{});function Vte(e){return(0,hk.visit)(e,qte)}function jte(e){return e.kind==="FieldDefinition"}function Kte(e,t){if(e.description!=null)return e.description.value;if(t!=null&&t.commentDescriptions)return RO(e)}function RO(e){let t=Ik(e);if(t!==void 0)return gk(` +)`):Pn("(",Me(t,", "),")"))+(n?" repeatable":"")+" on "+Me(r," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Me(["extend schema",Me(e," "),Ia(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Me(["extend scalar",e,Me(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["extend type",e,Pn("implements ",Me(t," & ")),Me(n," "),Ia(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["extend interface",e,Pn("implements ",Me(t," & ")),Me(n," "),Ia(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Me(["extend union",e,Me(t," "),Pn("= ",Me(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Me(["extend enum",e,Me(t," "),Ia(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Me(["extend input",e,Me(t," "),Ia(n)]," ")}},Gte=Object.keys(Tk).reduce((e,t)=>$(k({},e),{[t]:{leave:Kte(Tk[t].leave)}}),{});function Qte(e){return(0,hk.visit)(e,Gte)}function Yte(e){return e.kind==="FieldDefinition"}function Jte(e,t){if(e.description!=null)return e.description.value;if(t!=null&&t.commentDescriptions)return RO(e)}function RO(e){let t=Ik(e);if(t!==void 0)return gk(` ${t}`)}function Ik(e){let t=e.loc;if(!t)return;let n=[],r=t.startToken.prev;for(;r!=null&&r.kind===hk.TokenKind.COMMENT&&r.next!=null&&r.prev!=null&&r.line+1===r.next.line&&r.line!==r.prev.line;){let i=String(r.value);n.push(i),r=r.prev}return n.length>0?n.reverse().join(` `):void 0}function gk(e){let t=e.split(/\r\n|[\n\r]/g),n=_k(t);if(n!==0)for(let r=1;r0&&Ek(t[0]);)t.shift();for(;t.length>0&&Ek(t[t.length-1]);)t.pop();return t.join(` -`)}function _k(e){let t=null;for(let n=1;n{"use strict";m();T();N();Object.defineProperty(tp,"__esModule",{value:!0});tp.parseGraphQLSDL=$te;tp.transformCommentsToDescriptions=Sk;tp.isDescribable=Dk;var zi=Ie(),Ok=PO();function $te(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=Sk(t,n),n.noLocation&&(r=(0,zi.parse)((0,zi.print)(r),n))):r=(0,zi.parse)(new zi.Source(t,e),n)}catch(i){if(i.message.includes("EOF")&&t.replace(/(\#[^*]*)/g,"").trim()==="")r={kind:zi.Kind.DOCUMENT,definitions:[]};else throw i}return{location:e,document:r}}function Sk(e,t={}){let n=(0,zi.parse)(e,$(k({},t),{noLocation:!1}));return(0,zi.visit)(n,{leave:i=>{if(Dk(i)){let a=(0,Ok.getLeadingCommentBlock)(i);if(a!==void 0){let o=(0,Ok.dedentBlockStringValue)(` +`)}function _k(e){let t=null;for(let n=1;n{"use strict";m();T();N();Object.defineProperty(tp,"__esModule",{value:!0});tp.parseGraphQLSDL=Hte;tp.transformCommentsToDescriptions=Sk;tp.isDescribable=Dk;var zi=_e(),Ok=PO();function Hte(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=Sk(t,n),n.noLocation&&(r=(0,zi.parse)((0,zi.print)(r),n))):r=(0,zi.parse)(new zi.Source(t,e),n)}catch(i){if(i.message.includes("EOF")&&t.replace(/(\#[^*]*)/g,"").trim()==="")r={kind:zi.Kind.DOCUMENT,definitions:[]};else throw i}return{location:e,document:r}}function Sk(e,t={}){let n=(0,zi.parse)(e,$(k({},t),{noLocation:!1}));return(0,zi.visit)(n,{leave:i=>{if(Dk(i)){let a=(0,Ok.getLeadingCommentBlock)(i);if(a!==void 0){let o=(0,Ok.dedentBlockStringValue)(` `+a),u=o.includes(` `);return i.description?$(k({},i),{description:$(k({},i.description),{value:i.description.value+` -`+o,block:!0})}):$(k({},i),{description:{kind:zi.Kind.STRING,value:o,block:u}})}}}})}function Dk(e){return(0,zi.isTypeSystemDefinitionNode)(e)||e.kind===zi.Kind.FIELD_DEFINITION||e.kind===zi.Kind.INPUT_VALUE_DEFINITION||e.kind===zi.Kind.ENUM_VALUE_DEFINITION}});var Bk=w(CO=>{"use strict";m();T();N();Object.defineProperty(CO,"__esModule",{value:!0});CO.buildOperationNodeForField=Qte;var ct=Ie(),Gte=Hf(),Fk=Wf(),LO=[],xT=new Map;function wk(e){LO.push(e)}function Ak(){LO=[]}function Rk(){xT=new Map}function Qte({schema:e,kind:t,field:n,models:r,ignore:i=[],depthLimit:a,circularReferenceDepth:o,argNames:u,selectedFields:l=!0}){Ak(),Rk();let d=(0,Fk.getRootTypeNames)(e),p=Yte({schema:e,fieldName:n,kind:t,models:r||[],ignore:i,depthLimit:a||1/0,circularReferenceDepth:o||1,argNames:u,selectedFields:l,rootTypeNames:d});return p.variableDefinitions=[...LO],Ak(),Rk(),p}function Yte({schema:e,fieldName:t,kind:n,models:r,ignore:i,depthLimit:a,circularReferenceDepth:o,argNames:u,selectedFields:l,rootTypeNames:d}){let p=(0,Fk.getDefinedRootType)(e,n),E=p.getFields()[t],I=`${t}_${n}`;if(E.args)for(let v of E.args){let A=v.name;(!u||u.includes(A))&&wk(Lk(v,A))}return{kind:ct.Kind.OPERATION_DEFINITION,operation:n,name:{kind:ct.Kind.NAME,value:I},variableDefinitions:[],selectionSet:{kind:ct.Kind.SELECTION_SET,selections:[Ck({type:p,field:E,models:r,firstCall:!0,path:[],ancestors:[],ignore:i,depthLimit:a,circularReferenceDepth:o,schema:e,depth:0,argNames:u,selectedFields:l,rootTypeNames:d})]}}}function wO({parent:e,type:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v}){if(!(typeof I=="boolean"&&p>u)){if((0,ct.isUnionType)(t)){let A=t.getTypes();return{kind:ct.Kind.SELECTION_SET,selections:A.filter(U=>!FO([...a,U],{depth:l})).map(U=>({kind:ct.Kind.INLINE_FRAGMENT,typeCondition:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:U.name}},selectionSet:wO({parent:t,type:U,models:n,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v})})).filter(U=>{var j,Q;return((Q=(j=U==null?void 0:U.selectionSet)==null?void 0:j.selections)==null?void 0:Q.length)>0})}}if((0,ct.isInterfaceType)(t)){let A=Object.values(d.getTypeMap()).filter(U=>(0,ct.isObjectType)(U)&&U.getInterfaces().includes(t));return{kind:ct.Kind.SELECTION_SET,selections:A.filter(U=>!FO([...a,U],{depth:l})).map(U=>({kind:ct.Kind.INLINE_FRAGMENT,typeCondition:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:U.name}},selectionSet:wO({parent:t,type:U,models:n,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v})})).filter(U=>{var j,Q;return((Q=(j=U==null?void 0:U.selectionSet)==null?void 0:j.selections)==null?void 0:Q.length)>0})}}if((0,ct.isObjectType)(t)&&!v.has(t.name)){let A=o.includes(t.name)||o.includes(`${e.name}.${i[i.length-1]}`),U=n.includes(t.name);if(!r&&U&&!A)return{kind:ct.Kind.SELECTION_SET,selections:[{kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:"id"}}]};let j=t.getFields();return{kind:ct.Kind.SELECTION_SET,selections:Object.keys(j).filter(Q=>!FO([...a,(0,ct.getNamedType)(j[Q].type)],{depth:l})).map(Q=>{let ee=typeof I=="object"?I[Q]:!0;return ee?Ck({type:t,field:j[Q],models:n,path:[...i,Q],ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:ee,rootTypeNames:v}):null}).filter(Q=>{var ee,ne;return Q==null?!1:"selectionSet"in Q?!!((ne=(ee=Q.selectionSet)==null?void 0:ee.selections)!=null&&ne.length):!0})}}}}function Lk(e,t){function n(i){return(0,ct.isListType)(i)?{kind:ct.Kind.LIST_TYPE,type:n(i.ofType)}:(0,ct.isNonNullType)(i)?{kind:ct.Kind.NON_NULL_TYPE,type:n(i.ofType)}:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:i.name}}}let r;try{let i=(0,ct.astFromValue)(e.defaultValue,e.type);i==null?r=void 0:r=i}catch(i){let a=(0,Gte.astFromValueUntyped)(e.defaultValue);a==null?r=void 0:r=a}return{kind:ct.Kind.VARIABLE_DEFINITION,variable:{kind:ct.Kind.VARIABLE,name:{kind:ct.Kind.NAME,value:t||e.name}},type:n(e.type),defaultValue:r}}function Pk(e,t){return[...t,e].join("_")}function Ck({type:e,field:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v}){let A=(0,ct.getNamedType)(t.type),U=[],j=!1;if(t.args&&t.args.length&&(U=t.args.map(pe=>{let le=Pk(pe.name,i);return E&&!E.includes(le)?((0,ct.isNonNullType)(pe.type)&&(j=!0),null):(r||wk(Lk(pe,le)),{kind:ct.Kind.ARGUMENT,name:{kind:ct.Kind.NAME,value:pe.name},value:{kind:ct.Kind.VARIABLE,name:{kind:ct.Kind.NAME,value:Pk(pe.name,i)}}})}).filter(Boolean)),j)return null;let Q=[...i,t.name],ee=Q.join("."),ne=t.name;return xT.has(ee)&&xT.get(ee)!==t.type.toString()&&(ne+=t.type.toString().replace(/!/g,"NonNull").replace(/\[/g,"List").replace(/\]/g,"")),xT.set(ee,t.type.toString()),!(0,ct.isScalarType)(A)&&!(0,ct.isEnumType)(A)?$(k({kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:t.name}},ne!==t.name&&{alias:{kind:ct.Kind.NAME,value:ne}}),{selectionSet:wO({parent:e,type:A,models:n,firstCall:r,path:Q,ancestors:[...a,e],ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p+1,argNames:E,selectedFields:I,rootTypeNames:v})||void 0,arguments:U}):$(k({kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:t.name}},ne!==t.name&&{alias:{kind:ct.Kind.NAME,value:ne}}),{arguments:U})}function FO(e,t={depth:1}){let n=e[e.length-1];return(0,ct.isScalarType)(n)?!1:e.filter(i=>i.name===n.name).length>t.depth}});var kk=w(qT=>{"use strict";m();T();N();Object.defineProperty(qT,"__esModule",{value:!0});qT.DirectiveLocation=void 0;var Uk;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Uk||(qT.DirectiveLocation=Uk={}))});var Rc=w(VT=>{"use strict";m();T();N();Object.defineProperty(VT,"__esModule",{value:!0});VT.MapperKind=void 0;var Mk;(function(e){e.TYPE="MapperKind.TYPE",e.SCALAR_TYPE="MapperKind.SCALAR_TYPE",e.ENUM_TYPE="MapperKind.ENUM_TYPE",e.COMPOSITE_TYPE="MapperKind.COMPOSITE_TYPE",e.OBJECT_TYPE="MapperKind.OBJECT_TYPE",e.INPUT_OBJECT_TYPE="MapperKind.INPUT_OBJECT_TYPE",e.ABSTRACT_TYPE="MapperKind.ABSTRACT_TYPE",e.UNION_TYPE="MapperKind.UNION_TYPE",e.INTERFACE_TYPE="MapperKind.INTERFACE_TYPE",e.ROOT_OBJECT="MapperKind.ROOT_OBJECT",e.QUERY="MapperKind.QUERY",e.MUTATION="MapperKind.MUTATION",e.SUBSCRIPTION="MapperKind.SUBSCRIPTION",e.DIRECTIVE="MapperKind.DIRECTIVE",e.FIELD="MapperKind.FIELD",e.COMPOSITE_FIELD="MapperKind.COMPOSITE_FIELD",e.OBJECT_FIELD="MapperKind.OBJECT_FIELD",e.ROOT_FIELD="MapperKind.ROOT_FIELD",e.QUERY_ROOT_FIELD="MapperKind.QUERY_ROOT_FIELD",e.MUTATION_ROOT_FIELD="MapperKind.MUTATION_ROOT_FIELD",e.SUBSCRIPTION_ROOT_FIELD="MapperKind.SUBSCRIPTION_ROOT_FIELD",e.INTERFACE_FIELD="MapperKind.INTERFACE_FIELD",e.INPUT_OBJECT_FIELD="MapperKind.INPUT_OBJECT_FIELD",e.ARGUMENT="MapperKind.ARGUMENT",e.ENUM_VALUE="MapperKind.ENUM_VALUE"})(Mk||(VT.MapperKind=Mk={}))});var UO=w(BO=>{"use strict";m();T();N();Object.defineProperty(BO,"__esModule",{value:!0});BO.getObjectTypeFromTypeMap=Hte;var Jte=Ie();function Hte(e,t){if(t){let n=e[t.name];if((0,Jte.isObjectType)(n))return n}}});var xO=w(Wl=>{"use strict";m();T();N();Object.defineProperty(Wl,"__esModule",{value:!0});Wl.createNamedStub=kO;Wl.createStub=MO;Wl.isNamedStub=zte;Wl.getBuiltInForStub=Wte;var Er=Ie();function kO(e,t){let n;return t==="object"?n=Er.GraphQLObjectType:t==="interface"?n=Er.GraphQLInterfaceType:n=Er.GraphQLInputObjectType,new n({name:e,fields:{_fake:{type:Er.GraphQLString}}})}function MO(e,t){switch(e.kind){case Er.Kind.LIST_TYPE:return new Er.GraphQLList(MO(e.type,t));case Er.Kind.NON_NULL_TYPE:return new Er.GraphQLNonNull(MO(e.type,t));default:return t==="output"?kO(e.name.value,"object"):kO(e.name.value,"input")}}function zte(e){if("getFields"in e){let t=e.getFields();for(let n in t)return t[n].name==="_fake"}return!1}function Wte(e){switch(e.name){case Er.GraphQLInt.name:return Er.GraphQLInt;case Er.GraphQLFloat.name:return Er.GraphQLFloat;case Er.GraphQLString.name:return Er.GraphQLString;case Er.GraphQLBoolean.name:return Er.GraphQLBoolean;case Er.GraphQLID.name:return Er.GraphQLID;default:return e}}});var jT=w(qO=>{"use strict";m();T();N();Object.defineProperty(qO,"__esModule",{value:!0});qO.rewireTypes=Xte;var Zn=Ie(),xk=xO();function Xte(e,t){let n=Object.create(null);for(let I in e)n[I]=e[I];let r=Object.create(null);for(let I in n){let v=n[I];if(v==null||I.startsWith("__"))continue;let A=v.name;if(!A.startsWith("__")){if(r[A]!=null){console.warn(`Duplicate schema type name ${A} found; keeping the existing one found in the schema`);continue}r[A]=v}}for(let I in r)r[I]=u(r[I]);let i=t.map(I=>a(I));return{typeMap:r,directives:i};function a(I){if((0,Zn.isSpecifiedDirective)(I))return I;let v=I.toConfig();return v.args=o(v.args),new Zn.GraphQLDirective(v)}function o(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&(U.type=j,v[A]=U)}return v}function u(I){if((0,Zn.isObjectType)(I)){let v=I.toConfig(),A=$(k({},v),{fields:()=>l(v.fields),interfaces:()=>p(v.interfaces)});return new Zn.GraphQLObjectType(A)}else if((0,Zn.isInterfaceType)(I)){let v=I.toConfig(),A=$(k({},v),{fields:()=>l(v.fields)});return"interfaces"in A&&(A.interfaces=()=>p(v.interfaces)),new Zn.GraphQLInterfaceType(A)}else if((0,Zn.isUnionType)(I)){let v=I.toConfig(),A=$(k({},v),{types:()=>p(v.types)});return new Zn.GraphQLUnionType(A)}else if((0,Zn.isInputObjectType)(I)){let v=I.toConfig(),A=$(k({},v),{fields:()=>d(v.fields)});return new Zn.GraphQLInputObjectType(A)}else if((0,Zn.isEnumType)(I)){let v=I.toConfig();return new Zn.GraphQLEnumType(v)}else if((0,Zn.isScalarType)(I)){if((0,Zn.isSpecifiedScalarType)(I))return I;let v=I.toConfig();return new Zn.GraphQLScalarType(v)}throw new Error(`Unexpected schema type: ${I}`)}function l(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&U.args&&(U.type=j,U.args=o(U.args),v[A]=U)}return v}function d(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&(U.type=j,v[A]=U)}return v}function p(I){let v=[];for(let A of I){let U=E(A);U!=null&&v.push(U)}return v}function E(I){if((0,Zn.isListType)(I)){let v=E(I.ofType);return v!=null?new Zn.GraphQLList(v):null}else if((0,Zn.isNonNullType)(I)){let v=E(I.ofType);return v!=null?new Zn.GraphQLNonNull(v):null}else if((0,Zn.isNamedType)(I)){let v=n[I.name];return v===void 0&&(v=(0,xk.isNamedStub)(I)?(0,xk.getBuiltInForStub)(I):u(I),r[v.name]=n[I.name]=v),v!=null?r[v.name]:null}return null}}});var VO=w(Zl=>{"use strict";m();T();N();Object.defineProperty(Zl,"__esModule",{value:!0});Zl.transformInputValue=Xl;Zl.serializeInputValue=ene;Zl.parseInputValue=tne;Zl.parseInputValueLiteral=nne;var KT=Ie(),Zte=Yl();function Xl(e,t,n=null,r=null){if(t==null)return t;let i=(0,KT.getNullableType)(e);if((0,KT.isLeafType)(i))return n!=null?n(i,t):t;if((0,KT.isListType)(i))return(0,Zte.asArray)(t).map(a=>Xl(i.ofType,a,n,r));if((0,KT.isInputObjectType)(i)){let a=i.getFields(),o={};for(let u in t){let l=a[u];l!=null&&(o[u]=Xl(l.type,t[u],n,r))}return r!=null?r(i,o):o}}function ene(e,t){return Xl(e,t,(n,r)=>{try{return n.serialize(r)}catch(i){return r}})}function tne(e,t){return Xl(e,t,(n,r)=>{try{return n.parseValue(r)}catch(i){return r}})}function nne(e,t){return Xl(e,t,(n,r)=>n.parseLiteral(r,{}))}});var td=w(GT=>{"use strict";m();T();N();Object.defineProperty(GT,"__esModule",{value:!0});GT.mapSchema=ine;GT.correctASTNodes=np;var st=Ie(),ed=UO(),Rt=Rc(),rne=jT(),qk=VO();function ine(e,t={}){let n=Kk(jk(jO(Vk(sne(jO(Vk(e.getTypeMap(),e,qk.serializeInputValue),e,t,u=>(0,st.isLeafType)(u)),e,t),e,qk.parseInputValue),e,t,u=>!(0,st.isLeafType)(u)),e,t),e,t),r=e.getDirectives(),i=one(r,e,t),{typeMap:a,directives:o}=(0,rne.rewireTypes)(n,i);return new st.GraphQLSchema($(k({},e.toConfig()),{query:(0,ed.getObjectTypeFromTypeMap)(a,(0,ed.getObjectTypeFromTypeMap)(n,e.getQueryType())),mutation:(0,ed.getObjectTypeFromTypeMap)(a,(0,ed.getObjectTypeFromTypeMap)(n,e.getMutationType())),subscription:(0,ed.getObjectTypeFromTypeMap)(a,(0,ed.getObjectTypeFromTypeMap)(n,e.getSubscriptionType())),types:Object.values(a),directives:o}))}var ane=["String","ID","Int","Float","Boolean"];function jO(e,t,n,r=()=>!0){let i={};for(let a in e)if(!a.startsWith("__")&&!ane.includes(a)){let o=e[a];if(o==null||!r(o)){i[a]=o;continue}let u=cne(t,n,a);if(u==null){i[a]=o;continue}let l=u(o,t);if(l===void 0){i[a]=o;continue}i[a]=l}return i}function sne(e,t,n){let r=mne(n);return r?jO(e,t,{[Rt.MapperKind.ENUM_TYPE]:i=>{let a=i.toConfig(),o=a.values,u={};for(let l in o){let d=o[l],p=r(d,i.name,t,l);if(p===void 0)u[l]=d;else if(Array.isArray(p)){let[E,I]=p;u[E]=I===void 0?d:I}else p!==null&&(u[l]=p)}return np(new st.GraphQLEnumType($(k({},a),{values:u})))}},i=>(0,st.isEnumType)(i)):e}function Vk(e,t,n){let r=Kk(e,t,{[Rt.MapperKind.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;let a=$T(e,i.type);if(a!=null)return $(k({},i),{defaultValue:n(a,i.defaultValue)})}});return jk(r,t,{[Rt.MapperKind.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;let a=$T(r,i.type);if(a!=null)return $(k({},i),{defaultValue:n(a,i.defaultValue)})}})}function $T(e,t){if((0,st.isListType)(t)){let n=$T(e,t.ofType);return n!=null?new st.GraphQLList(n):null}else if((0,st.isNonNullType)(t)){let n=$T(e,t.ofType);return n!=null?new st.GraphQLNonNull(n):null}else if((0,st.isNamedType)(t)){let n=e[t.name];return n!=null?n:null}return null}function jk(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,st.isObjectType)(a)&&!(0,st.isInterfaceType)(a)&&!(0,st.isInputObjectType)(a)){r[i]=a;continue}let o=dne(t,n,i);if(o==null){r[i]=a;continue}let u=a.toConfig(),l=u.fields,d={};for(let p in l){let E=l[p],I=o(E,p,i,t);if(I===void 0)d[p]=E;else if(Array.isArray(I)){let[v,A]=I;A.astNode!=null&&(A.astNode=$(k({},A.astNode),{name:$(k({},A.astNode.name),{value:v})})),d[v]=A===void 0?E:A}else I!==null&&(d[p]=I)}(0,st.isObjectType)(a)?r[i]=np(new st.GraphQLObjectType($(k({},u),{fields:d}))):(0,st.isInterfaceType)(a)?r[i]=np(new st.GraphQLInterfaceType($(k({},u),{fields:d}))):r[i]=np(new st.GraphQLInputObjectType($(k({},u),{fields:d})))}return r}function Kk(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,st.isObjectType)(a)&&!(0,st.isInterfaceType)(a)){r[i]=a;continue}let o=fne(n);if(o==null){r[i]=a;continue}let u=a.toConfig(),l=u.fields,d={};for(let p in l){let E=l[p],I=E.args;if(I==null){d[p]=E;continue}let v=Object.keys(I);if(!v.length){d[p]=E;continue}let A={};for(let U of v){let j=I[U],Q=o(j,p,i,t);if(Q===void 0)A[U]=j;else if(Array.isArray(Q)){let[ee,ne]=Q;A[ee]=ne}else Q!==null&&(A[U]=Q)}d[p]=$(k({},E),{args:A})}(0,st.isObjectType)(a)?r[i]=new st.GraphQLObjectType($(k({},u),{fields:d})):(0,st.isInterfaceType)(a)?r[i]=new st.GraphQLInterfaceType($(k({},u),{fields:d})):r[i]=new st.GraphQLInputObjectType($(k({},u),{fields:d}))}return r}function one(e,t,n){let r=pne(n);if(r==null)return e.slice();let i=[];for(let a of e){let o=r(a,t);o===void 0?i.push(a):o!==null&&i.push(o)}return i}function une(e,t){var i,a,o;let n=e.getType(t),r=[Rt.MapperKind.TYPE];return(0,st.isObjectType)(n)?(r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.OBJECT_TYPE),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.QUERY):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.MUTATION):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.SUBSCRIPTION)):(0,st.isInputObjectType)(n)?r.push(Rt.MapperKind.INPUT_OBJECT_TYPE):(0,st.isInterfaceType)(n)?r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.ABSTRACT_TYPE,Rt.MapperKind.INTERFACE_TYPE):(0,st.isUnionType)(n)?r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.ABSTRACT_TYPE,Rt.MapperKind.UNION_TYPE):(0,st.isEnumType)(n)?r.push(Rt.MapperKind.ENUM_TYPE):(0,st.isScalarType)(n)&&r.push(Rt.MapperKind.SCALAR_TYPE),r}function cne(e,t,n){let r=une(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function lne(e,t){var i,a,o;let n=e.getType(t),r=[Rt.MapperKind.FIELD];return(0,st.isObjectType)(n)?(r.push(Rt.MapperKind.COMPOSITE_FIELD,Rt.MapperKind.OBJECT_FIELD),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.QUERY_ROOT_FIELD):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.MUTATION_ROOT_FIELD):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.SUBSCRIPTION_ROOT_FIELD)):(0,st.isInterfaceType)(n)?r.push(Rt.MapperKind.COMPOSITE_FIELD,Rt.MapperKind.INTERFACE_FIELD):(0,st.isInputObjectType)(n)&&r.push(Rt.MapperKind.INPUT_OBJECT_FIELD),r}function dne(e,t,n){let r=lne(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function fne(e){let t=e[Rt.MapperKind.ARGUMENT];return t!=null?t:null}function pne(e){let t=e[Rt.MapperKind.DIRECTIVE];return t!=null?t:null}function mne(e){let t=e[Rt.MapperKind.ENUM_VALUE];return t!=null?t:null}function np(e){if((0,st.isObjectType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{kind:st.Kind.OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{kind:st.Kind.OBJECT_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLObjectType(t)}else if((0,st.isInterfaceType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{kind:st.Kind.INTERFACE_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{kind:st.Kind.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLInterfaceType(t)}else if((0,st.isInputObjectType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{kind:st.Kind.INPUT_OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{kind:st.Kind.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLInputObjectType(t)}else if((0,st.isEnumType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.values){let i=t.values[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{values:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{values:void 0}))),new st.GraphQLEnumType(t)}else return e}});var $k=w(GO=>{"use strict";m();T();N();Object.defineProperty(GO,"__esModule",{value:!0});GO.filterSchema=Tne;var QT=Ie(),ga=Rc(),Nne=td();function Tne({schema:e,typeFilter:t=()=>!0,fieldFilter:n=void 0,rootFieldFilter:r=void 0,objectFieldFilter:i=void 0,interfaceFieldFilter:a=void 0,inputObjectFieldFilter:o=void 0,argumentFilter:u=void 0,directiveFilter:l=void 0,enumValueFilter:d=void 0}){return(0,Nne.mapSchema)(e,{[ga.MapperKind.QUERY]:E=>KO(E,"Query",r,u),[ga.MapperKind.MUTATION]:E=>KO(E,"Mutation",r,u),[ga.MapperKind.SUBSCRIPTION]:E=>KO(E,"Subscription",r,u),[ga.MapperKind.OBJECT_TYPE]:E=>t(E.name,E)?$O(QT.GraphQLObjectType,E,i||n,u):null,[ga.MapperKind.INTERFACE_TYPE]:E=>t(E.name,E)?$O(QT.GraphQLInterfaceType,E,a||n,u):null,[ga.MapperKind.INPUT_OBJECT_TYPE]:E=>t(E.name,E)?$O(QT.GraphQLInputObjectType,E,o||n):null,[ga.MapperKind.UNION_TYPE]:E=>t(E.name,E)?void 0:null,[ga.MapperKind.ENUM_TYPE]:E=>t(E.name,E)?void 0:null,[ga.MapperKind.SCALAR_TYPE]:E=>t(E.name,E)?void 0:null,[ga.MapperKind.DIRECTIVE]:E=>l&&!l(E.name,E)?null:void 0,[ga.MapperKind.ENUM_VALUE]:(E,I,v,A)=>d&&!d(I,A,E)?null:void 0})}function KO(e,t,n,r){if(n||r){let i=e.toConfig();for(let a in i.fields){let o=i.fields[a];if(n&&!n(t,a,i.fields[a]))delete i.fields[a];else if(r&&o.args)for(let u in o.args)r(e.name,a,u,o.args[u])||delete o.args[u]}return new QT.GraphQLObjectType(i)}return e}function $O(e,t,n,r){if(n||r){let i=t.toConfig();for(let a in i.fields){let o=i.fields[a];if(n&&!n(t.name,a,i.fields[a]))delete i.fields[a];else if(r&&"args"in o)for(let u in o.args)r(t.name,a,u,o.args[u])||delete o.args[u]}return new e(i)}}});var Qk=w(YT=>{"use strict";m();T();N();Object.defineProperty(YT,"__esModule",{value:!0});YT.healSchema=Ene;YT.healTypes=Gk;var ts=Ie();function Ene(e){return Gk(e.getTypeMap(),e.getDirectives()),e}function Gk(e,t){let n=Object.create(null);for(let d in e){let p=e[d];if(p==null||d.startsWith("__"))continue;let E=p.name;if(!E.startsWith("__")){if(n[E]!=null){console.warn(`Duplicate schema type name ${E} found; keeping the existing one found in the schema`);continue}n[E]=p}}for(let d in n){let p=n[d];e[d]=p}for(let d of t)d.args=d.args.filter(p=>(p.type=l(p.type),p.type!==null));for(let d in e){let p=e[d];!d.startsWith("__")&&d in n&&p!=null&&r(p)}for(let d in e)!d.startsWith("__")&&!(d in n)&&delete e[d];function r(d){if((0,ts.isObjectType)(d)){i(d),a(d);return}else if((0,ts.isInterfaceType)(d)){i(d),"getInterfaces"in d&&a(d);return}else if((0,ts.isUnionType)(d)){u(d);return}else if((0,ts.isInputObjectType)(d)){o(d);return}else if((0,ts.isLeafType)(d))return;throw new Error(`Unexpected schema type: ${d}`)}function i(d){let p=d.getFields();for(let[E,I]of Object.entries(p))I.args.map(v=>(v.type=l(v.type),v.type===null?null:v)).filter(Boolean),I.type=l(I.type),I.type===null&&delete p[E]}function a(d){if("getInterfaces"in d){let p=d.getInterfaces();p.push(...p.splice(0).map(E=>l(E)).filter(Boolean))}}function o(d){let p=d.getFields();for(let[E,I]of Object.entries(p))I.type=l(I.type),I.type===null&&delete p[E]}function u(d){let p=d.getTypes();p.push(...p.splice(0).map(E=>l(E)).filter(Boolean))}function l(d){if((0,ts.isListType)(d)){let p=l(d.ofType);return p!=null?new ts.GraphQLList(p):null}else if((0,ts.isNonNullType)(d)){let p=l(d.ofType);return p!=null?new ts.GraphQLNonNull(p):null}else if((0,ts.isNamedType)(d)){let p=e[d.name];if(p&&d!==p)return p}return d}}});var Yk=w(QO=>{"use strict";m();T();N();Object.defineProperty(QO,"__esModule",{value:!0});QO.getResolversFromSchema=hne;var Pc=Ie();function hne(e,t){var i,a;let n=Object.create(null),r=e.getTypeMap();for(let o in r)if(!o.startsWith("__")){let u=r[o];if((0,Pc.isScalarType)(u)){if(!(0,Pc.isSpecifiedScalarType)(u)){let l=u.toConfig();delete l.astNode,n[o]=new Pc.GraphQLScalarType(l)}}else if((0,Pc.isEnumType)(u)){n[o]={};let l=u.getValues();for(let d of l)n[o][d.name]=d.value}else if((0,Pc.isInterfaceType)(u))u.resolveType!=null&&(n[o]={__resolveType:u.resolveType});else if((0,Pc.isUnionType)(u))u.resolveType!=null&&(n[o]={__resolveType:u.resolveType});else if((0,Pc.isObjectType)(u)){n[o]={},u.isTypeOf!=null&&(n[o].__isTypeOf=u.isTypeOf);let l=u.getFields();for(let d in l){let p=l[d];if(p.subscribe!=null&&(n[o][d]=n[o][d]||{},n[o][d].subscribe=p.subscribe),p.resolve!=null&&((i=p.resolve)==null?void 0:i.name)!=="defaultFieldResolver"){switch((a=p.resolve)==null?void 0:a.name){case"defaultMergedResolver":if(!t)continue;break;case"defaultFieldResolver":continue}n[o][d]=n[o][d]||{},n[o][d].resolve=p.resolve}}}}return n}});var Hk=w(YO=>{"use strict";m();T();N();Object.defineProperty(YO,"__esModule",{value:!0});YO.forEachField=yne;var Jk=Ie();function yne(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,Jk.getNamedType)(i).name.startsWith("__")&&(0,Jk.isObjectType)(i)){let a=i.getFields();for(let o in a){let u=a[o];t(u,r,o)}}}}});var zk=w(HO=>{"use strict";m();T();N();Object.defineProperty(HO,"__esModule",{value:!0});HO.forEachDefaultValue=Ine;var JO=Ie();function Ine(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,JO.getNamedType)(i).name.startsWith("__")){if((0,JO.isObjectType)(i)){let a=i.getFields();for(let o in a){let u=a[o];for(let l of u.args)l.defaultValue=t(l.type,l.defaultValue)}}else if((0,JO.isInputObjectType)(i)){let a=i.getFields();for(let o in a){let u=a[o];u.defaultValue=t(u.type,u.defaultValue)}}}}}});var ZO=w(XO=>{"use strict";m();T();N();Object.defineProperty(XO,"__esModule",{value:!0});XO.addTypes=_ne;var zO=Ie(),WO=UO(),gne=jT();function _ne(e,t){let n=e.toConfig(),r={};for(let u of n.types)r[u.name]=u;let i={};for(let u of n.directives)i[u.name]=u;for(let u of t)(0,zO.isNamedType)(u)?r[u.name]=u:(0,zO.isDirective)(u)&&(i[u.name]=u);let{typeMap:a,directives:o}=(0,gne.rewireTypes)(r,Object.values(i));return new zO.GraphQLSchema($(k({},n),{query:(0,WO.getObjectTypeFromTypeMap)(a,e.getQueryType()),mutation:(0,WO.getObjectTypeFromTypeMap)(a,e.getMutationType()),subscription:(0,WO.getObjectTypeFromTypeMap)(a,e.getSubscriptionType()),types:Object.values(a),directives:o}))}});var Xk=w(eS=>{"use strict";m();T();N();Object.defineProperty(eS,"__esModule",{value:!0});eS.pruneSchema=bne;var er=Ie(),vne=TO(),One=Rc(),Sne=td(),Dne=Wf();function bne(e,t={}){let{skipEmptyCompositeTypePruning:n,skipEmptyUnionPruning:r,skipPruning:i,skipUnimplementedInterfacesPruning:a,skipUnusedTypesPruning:o}=t,u=[],l=e;do{let d=Ane(l);if(i){let p=[];for(let E in l.getTypeMap()){if(E.startsWith("__"))continue;let I=l.getType(E);I&&i(I)&&p.push(E)}d=Wk(p,l,d)}u=[],l=(0,Sne.mapSchema)(l,{[One.MapperKind.TYPE]:p=>!d.has(p.name)&&!(0,er.isSpecifiedScalarType)(p)?((0,er.isUnionType)(p)||(0,er.isInputObjectType)(p)||(0,er.isInterfaceType)(p)||(0,er.isObjectType)(p)||(0,er.isScalarType)(p))&&(o||(0,er.isUnionType)(p)&&r&&!Object.keys(p.getTypes()).length||((0,er.isInputObjectType)(p)||(0,er.isInterfaceType)(p)||(0,er.isObjectType)(p))&&n&&!Object.keys(p.getFields()).length||(0,er.isInterfaceType)(p)&&a)?p:(u.push(p.name),d.delete(p.name),null):p})}while(u.length);return l}function Ane(e){let t=[];for(let n of(0,Dne.getRootTypes)(e))t.push(n.name);return Wk(t,e)}function Wk(e,t,n=new Set){let r=new Map;for(;e.length;){let i=e.pop();if(n.has(i)&&r[i]!==!0)continue;let a=t.getType(i);if(a){if((0,er.isUnionType)(a)&&e.push(...a.getTypes().map(o=>o.name)),(0,er.isInterfaceType)(a)&&r[i]===!0&&(e.push(...(0,vne.getImplementingTypes)(a.name,t)),r[i]=!1),(0,er.isEnumType)(a)&&e.push(...a.getValues().flatMap(o=>JT(t,o))),"getInterfaces"in a&&e.push(...a.getInterfaces().map(o=>o.name)),"getFields"in a){let o=a.getFields(),u=Object.entries(o);if(!u.length)continue;for(let[,l]of u){(0,er.isObjectType)(a)&&e.push(...l.args.flatMap(p=>{let E=[(0,er.getNamedType)(p.type).name];return E.push(...JT(t,p)),E}));let d=(0,er.getNamedType)(l.type);e.push(d.name),e.push(...JT(t,l)),(0,er.isInterfaceType)(d)&&!(d.name in r)&&(r[d.name]=!0)}}e.push(...JT(t,a)),n.add(i)}}return n}function JT(e,t){var r,i;let n=new Set;if((r=t.astNode)!=null&&r.directives)for(let a of t.astNode.directives){let o=e.getDirective(a.name.value);if(o!=null&&o.args)for(let u of o.args){let l=(0,er.getNamedType)(u.type);n.add(l.name)}}if((i=t.extensions)!=null&&i.directives)for(let a in t.extensions.directives){let o=e.getDirective(a);if(o!=null&&o.args)for(let u of o.args){let l=(0,er.getNamedType)(u.type);n.add(l.name)}}return[...n]}});var nS=w(tS=>{"use strict";m();T();N();Object.defineProperty(tS,"__esModule",{value:!0});tS.mergeDeep=HT;var Rne=Yl();function HT(e,t=!1,n=!1,r=!1){if(e.length===0)return;if(e.length===1)return e[0];let i,a=!0,o=e.every(d=>{if(Array.isArray(d)){if(i===void 0)return i=d.length,!0;if(i===d.length)return!0}else a=!1;return!1});if(r&&o)return new Array(i).fill(null).map((d,p)=>HT(e.map(E=>E[p]),t,n,r));if(a)return e.flat(1);let u,l;t&&(l=e.find(d=>Zk(d)),l&&(u==null&&(u={}),Object.setPrototypeOf(u,Object.create(Object.getPrototypeOf(l)))));for(let d of e)if(d!=null)if(Zk(d)){if(l){let p=Object.getPrototypeOf(u),E=Object.getPrototypeOf(d);if(E)for(let I of Object.getOwnPropertyNames(E)){let v=Object.getOwnPropertyDescriptor(E,I);(0,Rne.isSome)(v)&&Object.defineProperty(p,I,v)}}for(let p in d)u==null&&(u={}),p in u?u[p]=HT([u[p],d[p]],t,n,r):u[p]=d[p]}else Array.isArray(d)&&Array.isArray(u)?u=HT([u,d],t,n,r):u=d;return u}function Zk(e){return e&&typeof e=="object"&&!Array.isArray(e)}});var eM=w(rS=>{"use strict";m();T();N();Object.defineProperty(rS,"__esModule",{value:!0});rS.parseSelectionSet=Fne;var Pne=Ie();function Fne(e,t){return(0,Pne.parse)(e,t).definitions[0].selectionSet}});var tM=w(iS=>{"use strict";m();T();N();Object.defineProperty(iS,"__esModule",{value:!0});iS.getResponseKeyFromInfo=wne;function wne(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}});var nM=w(nd=>{"use strict";m();T();N();Object.defineProperty(nd,"__esModule",{value:!0});nd.appendObjectFields=Cne;nd.removeObjectFields=Bne;nd.selectObjectFields=Une;nd.modifyObjectFields=kne;var zT=Ie(),Lne=ZO(),WT=Rc(),Fc=td();function Cne(e,t,n){return e.getType(t)==null?(0,Lne.addTypes)(e,[new zT.GraphQLObjectType({name:t,fields:n})]):(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:r=>{if(r.name===t){let i=r.toConfig(),a=i.fields,o={};for(let u in a)o[u]=a[u];for(let u in n)o[u]=n[u];return(0,Fc.correctASTNodes)(new zT.GraphQLObjectType($(k({},i),{fields:o})))}}})}function Bne(e,t,n){let r={};return[(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:a=>{if(a.name===t){let o=a.toConfig(),u=o.fields,l={};for(let d in u){let p=u[d];n(d,p)?r[d]=p:l[d]=p}return(0,Fc.correctASTNodes)(new zT.GraphQLObjectType($(k({},o),{fields:l})))}}}),r]}function Une(e,t,n){let r={};return(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:i=>{if(i.name===t){let o=i.toConfig().fields;for(let u in o){let l=o[u];n(u,l)&&(r[u]=l)}}}}),r}function kne(e,t,n,r){let i={};return[(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:o=>{if(o.name===t){let u=o.toConfig(),l=u.fields,d={};for(let p in l){let E=l[p];n(p,E)?i[p]=E:d[p]=E}for(let p in r){let E=r[p];d[p]=E}return(0,Fc.correctASTNodes)(new zT.GraphQLObjectType($(k({},u),{fields:d})))}}}),i]}});var rM=w(aS=>{"use strict";m();T();N();Object.defineProperty(aS,"__esModule",{value:!0});aS.renameType=Mne;var Wi=Ie();function Mne(e,t){if((0,Wi.isObjectType)(e))return new Wi.GraphQLObjectType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isInterfaceType)(e))return new Wi.GraphQLInterfaceType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isUnionType)(e))return new Wi.GraphQLUnionType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isInputObjectType)(e))return new Wi.GraphQLInputObjectType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isEnumType)(e))return new Wi.GraphQLEnumType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isScalarType)(e))return new Wi.GraphQLScalarType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));throw new Error(`Unknown type ${e}.`)}});var iM=w(XT=>{"use strict";m();T();N();Object.defineProperty(XT,"__esModule",{value:!0});XT.updateArgument=qne;XT.createVariableNameGenerator=Vne;var wc=Ie(),xne=UT();function qne(e,t,n,r,i,a,o){if(e[r]={kind:wc.Kind.ARGUMENT,name:{kind:wc.Kind.NAME,value:r},value:{kind:wc.Kind.VARIABLE,name:{kind:wc.Kind.NAME,value:i}}},t[i]={kind:wc.Kind.VARIABLE_DEFINITION,variable:{kind:wc.Kind.VARIABLE,name:{kind:wc.Kind.NAME,value:i}},type:(0,xne.astFromType)(a)},o!==void 0){n[i]=o;return}i in n&&delete n[i]}function Vne(e){let t=0;return n=>{let r;do r=t===0?n:`_v${t.toString()}_${n}`,t++;while(r in e);return r}}});var aM=w(oS=>{"use strict";m();T();N();Object.defineProperty(oS,"__esModule",{value:!0});oS.implementsAbstractType=jne;var sS=Ie();function jne(e,t,n){return n==null||t==null?!1:t===n?!0:(0,sS.isCompositeType)(t)&&(0,sS.isCompositeType)(n)?(0,sS.doTypesOverlap)(e,t,n):!1}});var oM=w(uS=>{"use strict";m();T();N();Object.defineProperty(uS,"__esModule",{value:!0});uS.observableToAsyncIterable=Kne;var sM=Jf();function Kne(e){let t=[],n=[],r=!0,i=p=>{t.length!==0?t.shift()({value:p,done:!1}):n.push({value:p,done:!1})},a=p=>{t.length!==0?t.shift()({value:{errors:[p]},done:!1}):n.push({value:{errors:[p]},done:!1})},o=()=>{t.length!==0?t.shift()({done:!0}):n.push({done:!0})},u=()=>new Promise(p=>{if(n.length!==0){let E=n.shift();p(E)}else t.push(p)}),l=e.subscribe({next(p){return i(p)},error(p){return a(p)},complete(){return o()}}),d=()=>{if(r){r=!1,l.unsubscribe();for(let p of t)p({value:void 0,done:!0});t.length=0,n.length=0}};return{next(){return r?u():this.return()},return(){return d(),(0,sM.fakePromise)({value:void 0,done:!0})},throw(p){return d(),(0,sM.fakeRejectPromise)(p)},[Symbol.asyncIterator](){return this}}}});var uM=w(ZT=>{"use strict";m();T();N();Object.defineProperty(ZT,"__esModule",{value:!0});ZT.AccumulatorMap=void 0;var cS=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};ZT.AccumulatorMap=cS});var lS=w(rd=>{"use strict";m();T();N();Object.defineProperty(rd,"__esModule",{value:!0});rd.GraphQLStreamDirective=rd.GraphQLDeferDirective=void 0;var Xi=Ie();rd.GraphQLDeferDirective=new Xi.GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Xi.DirectiveLocation.FRAGMENT_SPREAD,Xi.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Xi.GraphQLNonNull(Xi.GraphQLBoolean),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Xi.GraphQLString,description:"Unique name"}}});rd.GraphQLStreamDirective=new Xi.GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Xi.DirectiveLocation.FIELD],args:{if:{type:new Xi.GraphQLNonNull(Xi.GraphQLBoolean),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Xi.GraphQLString,description:"Unique name"},initialCount:{defaultValue:0,type:Xi.GraphQLInt,description:"Number of items to return immediately"}}})});var pS=w(Bs=>{"use strict";m();T();N();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.collectSubFields=void 0;Bs.collectFields=Qne;Bs.shouldIncludeNode=eE;Bs.doesFragmentConditionMatch=dS;Bs.getFieldEntryKey=cM;Bs.getDeferValues=fS;var ns=Ie(),tE=uM(),$ne=lS(),Gne=Ru();function id(e,t,n,r,i,a,o,u){for(let l of i.selections)switch(l.kind){case ns.Kind.FIELD:{if(!eE(n,l))continue;a.add(cM(l),l);break}case ns.Kind.INLINE_FRAGMENT:{if(!eE(n,l)||!dS(e,l,r))continue;let d=fS(n,l);if(d){let p=new tE.AccumulatorMap;id(e,t,n,r,l.selectionSet,p,o,u),o.push({label:d.label,fields:p})}else id(e,t,n,r,l.selectionSet,a,o,u);break}case ns.Kind.FRAGMENT_SPREAD:{let d=l.name.value;if(!eE(n,l))continue;let p=fS(n,l);if(u.has(d)&&!p)continue;let E=t[d];if(!E||!dS(e,E,r))continue;if(p||u.add(d),p){let I=new tE.AccumulatorMap;id(e,t,n,r,E.selectionSet,I,o,u),o.push({label:p.label,fields:I})}else id(e,t,n,r,E.selectionSet,a,o,u);break}}}function Qne(e,t,n,r,i){let a=new tE.AccumulatorMap,o=[];return id(e,t,n,r,i,a,o,new Set),{fields:a,patches:o}}function eE(e,t){let n=(0,ns.getDirectiveValues)(ns.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,ns.getDirectiveValues)(ns.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function dS(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,ns.typeFromAST)(e,r);return i===n?!0:(0,ns.isAbstractType)(i)?e.getPossibleTypes(i).includes(n):!1}function cM(e){return e.alias?e.alias.value:e.name.value}function fS(e,t){let n=(0,ns.getDirectiveValues)($ne.GraphQLDeferDirective,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}Bs.collectSubFields=(0,Gne.memoize5)(function(t,n,r,i,a){let o=new tE.AccumulatorMap,u=new Set,l=[],d={fields:o,patches:l};for(let p of a)p.selectionSet&&id(t,n,r,i,p.selectionSet,o,l,u);return d})});var mS=w(rp=>{"use strict";m();T();N();Object.defineProperty(rp,"__esModule",{value:!0});rp.getOperationASTFromRequest=void 0;rp.getOperationASTFromDocument=lM;var Yne=Ie(),Jne=Ru();function lM(e,t){let n=(0,Yne.getOperationAST)(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}rp.getOperationASTFromRequest=(0,Jne.memoize1)(function(t){return lM(t.document,t.operationName)})});var pM=w(ip=>{"use strict";m();T();N();Object.defineProperty(ip,"__esModule",{value:!0});ip.visitData=TS;ip.visitErrors=zne;ip.visitResult=Wne;var Pu=Ie(),NS=pS(),Hne=mS();function TS(e,t,n){if(Array.isArray(e))return e.map(r=>TS(r,t,n));if(typeof e=="object"){let r=t!=null?t(e):e;if(r!=null)for(let i in r){let a=r[i];Object.defineProperty(r,i,{value:TS(a,t,n)})}return n!=null?n(r):r}return e}function zne(e,t){return e.map(n=>t(n))}function Wne(e,t,n,r,i){let a=t.document.definitions.reduce((I,v)=>(v.kind===Pu.Kind.FRAGMENT_DEFINITION&&(I[v.name.value]=v),I),{}),o=t.variables||{},u={segmentInfoMap:new Map,unpathedErrors:new Set},l=e.data,d=e.errors,p=d!=null&&i!=null,E=(0,Hne.getOperationASTFromRequest)(t);return l!=null&&E!=null&&(e.data=ere(l,E,n,a,o,r,p?d:void 0,u)),d!=null&&i&&(e.errors=Xne(d,i,u)),e}function Xne(e,t,n){let r=n.segmentInfoMap,i=n.unpathedErrors,a=t.__unpathed;return e.map(o=>{let u=r.get(o),l=u==null?o:u.reduceRight((d,p)=>{let E=p.type.name,I=t[E];if(I==null)return d;let v=I[p.fieldName];return v==null?d:v(d,p.pathIndex)},o);return a&&i.has(o)?a(l):l})}function Zne(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":return e.getMutationType();case"subscription":return e.getSubscriptionType()}}function ere(e,t,n,r,i,a,o,u){let l=Zne(n,t),{fields:d}=(0,NS.collectFields)(n,r,i,l,t.selectionSet);return ES(e,l,d,n,r,i,a,0,o,u)}function ES(e,t,n,r,i,a,o,u,l,d){var ee;let p=t.getFields(),E=o==null?void 0:o[t.name],I=E==null?void 0:E.__enter,v=I!=null?I(e):e,A,U=null;if(l!=null){A=nre(l,u),U=A.errorMap;for(let ne of A.unpathedErrors)d.unpathedErrors.add(ne)}for(let[ne,pe]of n){let le=pe[0].name.value,Ae=(ee=p[le])==null?void 0:ee.type;if(Ae==null)switch(le){case"__typename":Ae=Pu.TypeNameMetaFieldDef.type;break;case"__schema":Ae=Pu.SchemaMetaFieldDef.type;break;case"__type":Ae=Pu.TypeMetaFieldDef.type;break}let Me=u+1,Ze;U&&(Ze=U[ne],Ze!=null&&delete U[ne],rre(t,le,Me,Ze,d));let Z=fM(e[ne],Ae,pe,r,i,a,o,Me,Ze,d);dM(v,ne,Z,E,le)}let j=v.__typename;if(j!=null&&dM(v,"__typename",j,E,"__typename"),U)for(let ne in U){let pe=U[ne];for(let le of pe)d.unpathedErrors.add(le)}let Q=E==null?void 0:E.__leave;return Q!=null?Q(v):v}function dM(e,t,n,r,i){if(r==null){e[t]=n;return}let a=r[i];if(a==null){e[t]=n;return}let o=a(n);if(o===void 0){delete e[t];return}e[t]=o}function tre(e,t,n,r,i,a,o,u,l,d){return e.map(p=>fM(p,t,n,r,i,a,o,u+1,l,d))}function fM(e,t,n,r,i,a,o,u,l=[],d){if(e==null)return e;let p=(0,Pu.getNullableType)(t);if((0,Pu.isListType)(p))return tre(e,p.ofType,n,r,i,a,o,u,l,d);if((0,Pu.isAbstractType)(p)){let v=r.getType(e.__typename),{fields:A,patches:U}=(0,NS.collectSubFields)(r,i,a,v,n);if(U.length){A=new Map(A);for(let j of U)for(let[Q,ee]of j.fields){let ne=A.get(Q);ne?ne.push(...ee):A.set(Q,ee)}}return ES(e,v,A,r,i,a,o,u,l,d)}else if((0,Pu.isObjectType)(p)){let{fields:v,patches:A}=(0,NS.collectSubFields)(r,i,a,p,n);if(A.length){v=new Map(v);for(let U of A)for(let[j,Q]of U.fields){let ee=v.get(j);ee?ee.push(...Q):v.set(j,Q)}}return ES(e,p,v,r,i,a,o,u,l,d)}let E=o==null?void 0:o[p.name];if(E==null)return e;let I=E(e);return I===void 0?e:I}function nre(e,t){var i;let n=Object.create(null),r=new Set;for(let a of e){let o=(i=a.path)==null?void 0:i[t];if(o==null){r.add(a);continue}o in n?n[o].push(a):n[o]=[a]}return{errorMap:n,unpathedErrors:r}}function rre(e,t,n,r=[],i){for(let a of r){let o={type:e,fieldName:t,pathIndex:n},u=i.segmentInfoMap.get(a);u==null?i.segmentInfoMap.set(a,[o]):u.push(o)}}});var mM=w(yS=>{"use strict";m();T();N();Object.defineProperty(yS,"__esModule",{value:!0});yS.valueMatchesCriteria=hS;function hS(e,t){return e==null?e===t:Array.isArray(e)?Array.isArray(t)&&e.every((n,r)=>hS(n,t[r])):typeof e=="object"?typeof t=="object"&&t&&Object.keys(t).every(n=>hS(e[n],t[n])):t instanceof RegExp?t.test(e):e===t}});var NM=w(IS=>{"use strict";m();T();N();Object.defineProperty(IS,"__esModule",{value:!0});IS.isAsyncIterable=ire;function ire(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}});var TM=w(gS=>{"use strict";m();T();N();Object.defineProperty(gS,"__esModule",{value:!0});gS.isDocumentNode=sre;var are=Ie();function sre(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===are.Kind.DOCUMENT}});var EM=w(()=>{"use strict";m();T();N()});var gM=w(ap=>{"use strict";m();T();N();Object.defineProperty(ap,"__esModule",{value:!0});ap.getAsyncIteratorWithCancel=yM;ap.getAsyncIterableWithCancel=IM;ap.withCancel=IM;var ore=Ru();function ure(e){return wi(this,null,function*(){return{value:e,done:!0}})}var hM=(0,ore.memoize2)(function(t,n){return function(...i){return Reflect.apply(n,t,i)}});function yM(e,t){return new Proxy(e,{has(n,r){return r==="return"?!0:Reflect.has(n,r)},get(n,r,i){let a=Reflect.get(n,r,i);if(r==="return"){let o=a||ure;return function(l){return wi(this,null,function*(){let d=yield t(l);return Reflect.apply(o,n,[d])})}}else if(typeof a=="function")return hM(n,a);return a}})}function IM(e,t){return new Proxy(e,{get(n,r,i){let a=Reflect.get(n,r,i);return Symbol.asyncIterator===r?function(){let u=Reflect.apply(a,n,[]);return yM(u,t)}:typeof a=="function"?hM(n,a):a}})}});var _M=w(_S=>{"use strict";m();T();N();Object.defineProperty(_S,"__esModule",{value:!0});_S.fixSchemaAst=fre;var cre=Ie(),lre=bO();function dre(e,t){let n=(0,lre.getDocumentNodeFromSchema)(e);return(0,cre.buildASTSchema)(n,k({},t||{}))}function fre(e,t){let n;return(!e.astNode||!e.extensionASTNodes)&&(n=dre(e,t)),!e.astNode&&(n!=null&&n.astNode)&&(e.astNode=n.astNode),!e.extensionASTNodes&&(n!=null&&n.astNode)&&(e.extensionASTNodes=n.extensionASTNodes),e}});var vM=w(vS=>{"use strict";m();T();N();Object.defineProperty(vS,"__esModule",{value:!0});vS.extractExtensionsFromSchema=Nre;var pre=Yl(),Us=Rc(),mre=td();function _a(e,t){e=e||{};let a=e,{directives:n}=a,r=GR(a,["directives"]),i=k({},r);if(!t&&n!=null){let o={};for(let u in n)o[u]=[...(0,pre.asArray)(n[u])];i.directives=o}return i}function Nre(e,t=!1){let n={schemaExtensions:_a(e.extensions,t),types:{}};return(0,mre.mapSchema)(e,{[Us.MapperKind.OBJECT_TYPE]:r=>(n.types[r.name]={fields:{},type:"object",extensions:_a(r.extensions,t)},r),[Us.MapperKind.INTERFACE_TYPE]:r=>(n.types[r.name]={fields:{},type:"interface",extensions:_a(r.extensions,t)},r),[Us.MapperKind.FIELD]:(r,i,a)=>{n.types[a].fields[i]={arguments:{},extensions:_a(r.extensions,t)};let o=r.args;if(o!=null)for(let u in o)n.types[a].fields[i].arguments[u]=_a(o[u].extensions,t);return r},[Us.MapperKind.ENUM_TYPE]:r=>(n.types[r.name]={values:{},type:"enum",extensions:_a(r.extensions,t)},r),[Us.MapperKind.ENUM_VALUE]:(r,i,a,o)=>(n.types[i].values[o]=_a(r.extensions,t),r),[Us.MapperKind.SCALAR_TYPE]:r=>(n.types[r.name]={type:"scalar",extensions:_a(r.extensions,t)},r),[Us.MapperKind.UNION_TYPE]:r=>(n.types[r.name]={type:"union",extensions:_a(r.extensions,t)},r),[Us.MapperKind.INPUT_OBJECT_TYPE]:r=>(n.types[r.name]={fields:{},type:"input",extensions:_a(r.extensions,t)},r),[Us.MapperKind.INPUT_OBJECT_FIELD]:(r,i,a)=>(n.types[a].fields[i]={extensions:_a(r.extensions,t)},r)}),n}});var OM=w(sp=>{"use strict";m();T();N();Object.defineProperty(sp,"__esModule",{value:!0});sp.addPath=Tre;sp.pathToArray=Ere;sp.printPathArray=hre;function Tre(e,t,n){return{prev:e,key:t,typename:n}}function Ere(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function hre(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var DM=w(SS=>{"use strict";m();T();N();Object.defineProperty(SS,"__esModule",{value:!0});SS.mergeIncrementalResult=SM;var yre=nS();function SM({incrementalResult:e,executionResult:t}){var r;let n=["data",...(r=e.path)!=null?r:[]];if(e.items)for(let i of e.items)OS(t,n,i),n[n.length-1]++;e.data&&OS(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&OS(t,["extensions"],e.extensions),e.incremental&&e.incremental.forEach(i=>{SM({incrementalResult:i,executionResult:t})})}function OS(e,t,n){let r=e,i;for(i=0;i{"use strict";m();T();N();Object.defineProperty(nE,"__esModule",{value:!0});nE.debugTimerStart=Ire;nE.debugTimerEnd=gre;var bM=new Set;function Ire(e){var n,r;let t=((r=(n=globalThis.process)==null?void 0:n.env)==null?void 0:r.DEBUG)||globalThis.DEBUG;(t==="1"||t!=null&&t.includes(e))&&(bM.add(e),console.time(e))}function gre(e){bM.has(e)&&console.timeEnd(e)}});var FM=w(op=>{"use strict";m();T();N();Object.defineProperty(op,"__esModule",{value:!0});op.getAbortPromise=void 0;op.registerAbortSignalListener=PM;var _re=Jf(),RM=Ru(),vre=(0,RM.memoize1)(function(t){let n=new Set;return t.addEventListener("abort",r=>{for(let i of n)i(r)},{once:!0}),n});function PM(e,t){if(e.aborted){t();return}vre(e).add(t)}op.getAbortPromise=(0,RM.memoize1)(function(t){return t.aborted?(0,_re.fakeRejectPromise)(t.reason):new Promise((n,r)=>{if(t.aborted){r(t.reason);return}PM(t,()=>{r(t.reason)})})})});var va=w(we=>{"use strict";m();T();N();Object.defineProperty(we,"__esModule",{value:!0});we.createDeferred=we.fakePromise=we.mapMaybePromise=we.mapAsyncIterator=we.inspect=void 0;var Qe=(BU(),Gm(CU));Qe.__exportStar(UU(),we);Qe.__exportStar(Yl(),we);Qe.__exportStar(lO(),we);Qe.__exportStar(fO(),we);Qe.__exportStar(HU(),we);Qe.__exportStar(TO(),we);Qe.__exportStar(bO(),we);Qe.__exportStar(fO(),we);Qe.__exportStar(pk(),we);Qe.__exportStar(mk(),we);Qe.__exportStar(bk(),we);Qe.__exportStar(Bk(),we);Qe.__exportStar(kk(),we);Qe.__exportStar($k(),we);Qe.__exportStar(Qk(),we);Qe.__exportStar(Yk(),we);Qe.__exportStar(Hk(),we);Qe.__exportStar(zk(),we);Qe.__exportStar(td(),we);Qe.__exportStar(ZO(),we);Qe.__exportStar(jT(),we);Qe.__exportStar(Xk(),we);Qe.__exportStar(nS(),we);Qe.__exportStar(Rc(),we);Qe.__exportStar(xO(),we);Qe.__exportStar(eM(),we);Qe.__exportStar(tM(),we);Qe.__exportStar(nM(),we);Qe.__exportStar(rM(),we);Qe.__exportStar(VO(),we);Qe.__exportStar(iM(),we);Qe.__exportStar(UT(),we);Qe.__exportStar(aM(),we);Qe.__exportStar(PT(),we);Qe.__exportStar(oM(),we);Qe.__exportStar(pM(),we);Qe.__exportStar(oO(),we);Qe.__exportStar(mM(),we);Qe.__exportStar(NM(),we);Qe.__exportStar(TM(),we);Qe.__exportStar(Hf(),we);Qe.__exportStar(EM(),we);Qe.__exportStar(gM(),we);Qe.__exportStar(Wf(),we);Qe.__exportStar(PO(),we);Qe.__exportStar(pS(),we);var Ore=Yf();Object.defineProperty(we,"inspect",{enumerable:!0,get:function(){return Ore.inspect}});Qe.__exportStar(Ru(),we);Qe.__exportStar(_M(),we);Qe.__exportStar(mS(),we);Qe.__exportStar(vM(),we);Qe.__exportStar(OM(),we);Qe.__exportStar(LT(),we);Qe.__exportStar(lS(),we);Qe.__exportStar(DM(),we);Qe.__exportStar(AM(),we);Qe.__exportStar(cO(),we);var rE=Jf();Object.defineProperty(we,"mapAsyncIterator",{enumerable:!0,get:function(){return rE.mapAsyncIterator}});Object.defineProperty(we,"mapMaybePromise",{enumerable:!0,get:function(){return rE.mapMaybePromise}});Object.defineProperty(we,"fakePromise",{enumerable:!0,get:function(){return rE.fakePromise}});Object.defineProperty(we,"createDeferred",{enumerable:!0,get:function(){return rE.createDeferredPromise}});Qe.__exportStar(FM(),we)});var LM=w(iE=>{"use strict";m();T();N();Object.defineProperty(iE,"__esModule",{value:!0});iE.mergeResolvers=void 0;var Sre=va();function wM(e,t){if(!e||Array.isArray(e)&&e.length===0)return{};if(!Array.isArray(e))return e;if(e.length===1)return e[0]||{};let n=new Array;for(let i of e)Array.isArray(i)&&(i=wM(i)),typeof i=="object"&&i&&n.push(i);let r=(0,Sre.mergeDeep)(n,!0);if(t!=null&&t.exclusions)for(let i of t.exclusions){let[a,o]=i.split(".");!o||o==="*"?delete r[a]:r[a]&&delete r[a][o]}return r}iE.mergeResolvers=wM});var DS=w(aE=>{"use strict";m();T();N();Object.defineProperty(aE,"__esModule",{value:!0});aE.mergeArguments=void 0;var CM=va();function Dre(e,t,n){let r=bre([...t,...e].filter(CM.isSome),n);return n&&n.sort&&r.sort(CM.compareNodes),r}aE.mergeArguments=Dre;function bre(e,t){return e.reduce((n,r)=>{let i=n.findIndex(a=>a.name.value===r.name.value);return i===-1?n.concat([r]):(t!=null&&t.reverseArguments||(n[i]=r),n)},[])}});var Zi=w(ad=>{"use strict";m();T();N();Object.defineProperty(ad,"__esModule",{value:!0});ad.mergeDirective=ad.mergeDirectives=void 0;var BM=Ie(),Are=va();function Rre(e,t){return!!e.find(n=>n.name.value===t.name.value)}function UM(e,t){var n;return!!((n=t==null?void 0:t[e.name.value])!=null&&n.repeatable)}function Pre(e,t){return t.some(({value:n})=>n===e.value)}function kM(e,t){let n=[...t];for(let r of e){let i=n.findIndex(a=>a.name.value===r.name.value);if(i>-1){let a=n[i];if(a.value.kind==="ListValue"){let o=a.value.values,u=r.value.values;a.value.values=Bre(o,u,(l,d)=>{let p=l.value;return!p||!d.some(E=>E.value===p)})}else a.value=r.value}else n.push(r)}return n}function Fre(e,t){return e.map((n,r,i)=>{let a=i.findIndex(o=>o.name.value===n.name.value);if(a!==r&&!UM(n,t)){let o=i[a];return n.arguments=kM(n.arguments,o.arguments),null}return n}).filter(Are.isSome)}function wre(e=[],t=[],n,r){let i=n&&n.reverseDirectives,a=i?e:t,o=i?t:e,u=Fre([...a],r);for(let l of o)if(Rre(u,l)&&!UM(l,r)){let d=u.findIndex(E=>E.name.value===l.name.value),p=u[d];u[d].arguments=kM(l.arguments||[],p.arguments||[])}else u.push(l);return u}ad.mergeDirectives=wre;function Lre(e,t){let n=(0,BM.print)($(k({},e),{description:void 0})),r=(0,BM.print)($(k({},t),{description:void 0})),i=new RegExp("(directive @w*d*)|( on .*$)","g");if(!(n.replace(i,"")===r.replace(i,"")))throw new Error(`Unable to merge GraphQL directive "${e.name.value}". +`+o,block:!0})}):$(k({},i),{description:{kind:zi.Kind.STRING,value:o,block:u}})}}}})}function Dk(e){return(0,zi.isTypeSystemDefinitionNode)(e)||e.kind===zi.Kind.FIELD_DEFINITION||e.kind===zi.Kind.INPUT_VALUE_DEFINITION||e.kind===zi.Kind.ENUM_VALUE_DEFINITION}});var Bk=F(CO=>{"use strict";m();T();N();Object.defineProperty(CO,"__esModule",{value:!0});CO.buildOperationNodeForField=Wte;var lt=_e(),zte=Hf(),Fk=Wf(),LO=[],xT=new Map;function wk(e){LO.push(e)}function Ak(){LO=[]}function Rk(){xT=new Map}function Wte({schema:e,kind:t,field:n,models:r,ignore:i=[],depthLimit:a,circularReferenceDepth:o,argNames:u,selectedFields:l=!0}){Ak(),Rk();let d=(0,Fk.getRootTypeNames)(e),p=Xte({schema:e,fieldName:n,kind:t,models:r||[],ignore:i,depthLimit:a||1/0,circularReferenceDepth:o||1,argNames:u,selectedFields:l,rootTypeNames:d});return p.variableDefinitions=[...LO],Ak(),Rk(),p}function Xte({schema:e,fieldName:t,kind:n,models:r,ignore:i,depthLimit:a,circularReferenceDepth:o,argNames:u,selectedFields:l,rootTypeNames:d}){let p=(0,Fk.getDefinedRootType)(e,n),E=p.getFields()[t],I=`${t}_${n}`;if(E.args)for(let v of E.args){let A=v.name;(!u||u.includes(A))&&wk(Lk(v,A))}return{kind:lt.Kind.OPERATION_DEFINITION,operation:n,name:{kind:lt.Kind.NAME,value:I},variableDefinitions:[],selectionSet:{kind:lt.Kind.SELECTION_SET,selections:[Ck({type:p,field:E,models:r,firstCall:!0,path:[],ancestors:[],ignore:i,depthLimit:a,circularReferenceDepth:o,schema:e,depth:0,argNames:u,selectedFields:l,rootTypeNames:d})]}}}function wO({parent:e,type:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v}){if(!(typeof I=="boolean"&&p>u)){if((0,lt.isUnionType)(t)){let A=t.getTypes();return{kind:lt.Kind.SELECTION_SET,selections:A.filter(U=>!FO([...a,U],{depth:l})).map(U=>({kind:lt.Kind.INLINE_FRAGMENT,typeCondition:{kind:lt.Kind.NAMED_TYPE,name:{kind:lt.Kind.NAME,value:U.name}},selectionSet:wO({parent:t,type:U,models:n,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v})})).filter(U=>{var j,J;return((J=(j=U==null?void 0:U.selectionSet)==null?void 0:j.selections)==null?void 0:J.length)>0})}}if((0,lt.isInterfaceType)(t)){let A=Object.values(d.getTypeMap()).filter(U=>(0,lt.isObjectType)(U)&&U.getInterfaces().includes(t));return{kind:lt.Kind.SELECTION_SET,selections:A.filter(U=>!FO([...a,U],{depth:l})).map(U=>({kind:lt.Kind.INLINE_FRAGMENT,typeCondition:{kind:lt.Kind.NAMED_TYPE,name:{kind:lt.Kind.NAME,value:U.name}},selectionSet:wO({parent:t,type:U,models:n,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v})})).filter(U=>{var j,J;return((J=(j=U==null?void 0:U.selectionSet)==null?void 0:j.selections)==null?void 0:J.length)>0})}}if((0,lt.isObjectType)(t)&&!v.has(t.name)){let A=o.includes(t.name)||o.includes(`${e.name}.${i[i.length-1]}`),U=n.includes(t.name);if(!r&&U&&!A)return{kind:lt.Kind.SELECTION_SET,selections:[{kind:lt.Kind.FIELD,name:{kind:lt.Kind.NAME,value:"id"}}]};let j=t.getFields();return{kind:lt.Kind.SELECTION_SET,selections:Object.keys(j).filter(J=>!FO([...a,(0,lt.getNamedType)(j[J].type)],{depth:l})).map(J=>{let re=typeof I=="object"?I[J]:!0;return re?Ck({type:t,field:j[J],models:n,path:[...i,J],ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:re,rootTypeNames:v}):null}).filter(J=>{var re,te;return J==null?!1:"selectionSet"in J?!!((te=(re=J.selectionSet)==null?void 0:re.selections)!=null&&te.length):!0})}}}}function Lk(e,t){function n(i){return(0,lt.isListType)(i)?{kind:lt.Kind.LIST_TYPE,type:n(i.ofType)}:(0,lt.isNonNullType)(i)?{kind:lt.Kind.NON_NULL_TYPE,type:n(i.ofType)}:{kind:lt.Kind.NAMED_TYPE,name:{kind:lt.Kind.NAME,value:i.name}}}let r;try{let i=(0,lt.astFromValue)(e.defaultValue,e.type);i==null?r=void 0:r=i}catch(i){let a=(0,zte.astFromValueUntyped)(e.defaultValue);a==null?r=void 0:r=a}return{kind:lt.Kind.VARIABLE_DEFINITION,variable:{kind:lt.Kind.VARIABLE,name:{kind:lt.Kind.NAME,value:t||e.name}},type:n(e.type),defaultValue:r}}function Pk(e,t){return[...t,e].join("_")}function Ck({type:e,field:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v}){let A=(0,lt.getNamedType)(t.type),U=[],j=!1;if(t.args&&t.args.length&&(U=t.args.map(pe=>{let Ne=Pk(pe.name,i);return E&&!E.includes(Ne)?((0,lt.isNonNullType)(pe.type)&&(j=!0),null):(r||wk(Lk(pe,Ne)),{kind:lt.Kind.ARGUMENT,name:{kind:lt.Kind.NAME,value:pe.name},value:{kind:lt.Kind.VARIABLE,name:{kind:lt.Kind.NAME,value:Pk(pe.name,i)}}})}).filter(Boolean)),j)return null;let J=[...i,t.name],re=J.join("."),te=t.name;return xT.has(re)&&xT.get(re)!==t.type.toString()&&(te+=t.type.toString().replace(/!/g,"NonNull").replace(/\[/g,"List").replace(/\]/g,"")),xT.set(re,t.type.toString()),!(0,lt.isScalarType)(A)&&!(0,lt.isEnumType)(A)?$(k({kind:lt.Kind.FIELD,name:{kind:lt.Kind.NAME,value:t.name}},te!==t.name&&{alias:{kind:lt.Kind.NAME,value:te}}),{selectionSet:wO({parent:e,type:A,models:n,firstCall:r,path:J,ancestors:[...a,e],ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p+1,argNames:E,selectedFields:I,rootTypeNames:v})||void 0,arguments:U}):$(k({kind:lt.Kind.FIELD,name:{kind:lt.Kind.NAME,value:t.name}},te!==t.name&&{alias:{kind:lt.Kind.NAME,value:te}}),{arguments:U})}function FO(e,t={depth:1}){let n=e[e.length-1];return(0,lt.isScalarType)(n)?!1:e.filter(i=>i.name===n.name).length>t.depth}});var kk=F(qT=>{"use strict";m();T();N();Object.defineProperty(qT,"__esModule",{value:!0});qT.DirectiveLocation=void 0;var Uk;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Uk||(qT.DirectiveLocation=Uk={}))});var Rc=F(VT=>{"use strict";m();T();N();Object.defineProperty(VT,"__esModule",{value:!0});VT.MapperKind=void 0;var Mk;(function(e){e.TYPE="MapperKind.TYPE",e.SCALAR_TYPE="MapperKind.SCALAR_TYPE",e.ENUM_TYPE="MapperKind.ENUM_TYPE",e.COMPOSITE_TYPE="MapperKind.COMPOSITE_TYPE",e.OBJECT_TYPE="MapperKind.OBJECT_TYPE",e.INPUT_OBJECT_TYPE="MapperKind.INPUT_OBJECT_TYPE",e.ABSTRACT_TYPE="MapperKind.ABSTRACT_TYPE",e.UNION_TYPE="MapperKind.UNION_TYPE",e.INTERFACE_TYPE="MapperKind.INTERFACE_TYPE",e.ROOT_OBJECT="MapperKind.ROOT_OBJECT",e.QUERY="MapperKind.QUERY",e.MUTATION="MapperKind.MUTATION",e.SUBSCRIPTION="MapperKind.SUBSCRIPTION",e.DIRECTIVE="MapperKind.DIRECTIVE",e.FIELD="MapperKind.FIELD",e.COMPOSITE_FIELD="MapperKind.COMPOSITE_FIELD",e.OBJECT_FIELD="MapperKind.OBJECT_FIELD",e.ROOT_FIELD="MapperKind.ROOT_FIELD",e.QUERY_ROOT_FIELD="MapperKind.QUERY_ROOT_FIELD",e.MUTATION_ROOT_FIELD="MapperKind.MUTATION_ROOT_FIELD",e.SUBSCRIPTION_ROOT_FIELD="MapperKind.SUBSCRIPTION_ROOT_FIELD",e.INTERFACE_FIELD="MapperKind.INTERFACE_FIELD",e.INPUT_OBJECT_FIELD="MapperKind.INPUT_OBJECT_FIELD",e.ARGUMENT="MapperKind.ARGUMENT",e.ENUM_VALUE="MapperKind.ENUM_VALUE"})(Mk||(VT.MapperKind=Mk={}))});var UO=F(BO=>{"use strict";m();T();N();Object.defineProperty(BO,"__esModule",{value:!0});BO.getObjectTypeFromTypeMap=ene;var Zte=_e();function ene(e,t){if(t){let n=e[t.name];if((0,Zte.isObjectType)(n))return n}}});var xO=F(Wl=>{"use strict";m();T();N();Object.defineProperty(Wl,"__esModule",{value:!0});Wl.createNamedStub=kO;Wl.createStub=MO;Wl.isNamedStub=tne;Wl.getBuiltInForStub=nne;var Er=_e();function kO(e,t){let n;return t==="object"?n=Er.GraphQLObjectType:t==="interface"?n=Er.GraphQLInterfaceType:n=Er.GraphQLInputObjectType,new n({name:e,fields:{_fake:{type:Er.GraphQLString}}})}function MO(e,t){switch(e.kind){case Er.Kind.LIST_TYPE:return new Er.GraphQLList(MO(e.type,t));case Er.Kind.NON_NULL_TYPE:return new Er.GraphQLNonNull(MO(e.type,t));default:return t==="output"?kO(e.name.value,"object"):kO(e.name.value,"input")}}function tne(e){if("getFields"in e){let t=e.getFields();for(let n in t)return t[n].name==="_fake"}return!1}function nne(e){switch(e.name){case Er.GraphQLInt.name:return Er.GraphQLInt;case Er.GraphQLFloat.name:return Er.GraphQLFloat;case Er.GraphQLString.name:return Er.GraphQLString;case Er.GraphQLBoolean.name:return Er.GraphQLBoolean;case Er.GraphQLID.name:return Er.GraphQLID;default:return e}}});var jT=F(qO=>{"use strict";m();T();N();Object.defineProperty(qO,"__esModule",{value:!0});qO.rewireTypes=rne;var Zn=_e(),xk=xO();function rne(e,t){let n=Object.create(null);for(let I in e)n[I]=e[I];let r=Object.create(null);for(let I in n){let v=n[I];if(v==null||I.startsWith("__"))continue;let A=v.name;if(!A.startsWith("__")){if(r[A]!=null){console.warn(`Duplicate schema type name ${A} found; keeping the existing one found in the schema`);continue}r[A]=v}}for(let I in r)r[I]=u(r[I]);let i=t.map(I=>a(I));return{typeMap:r,directives:i};function a(I){if((0,Zn.isSpecifiedDirective)(I))return I;let v=I.toConfig();return v.args=o(v.args),new Zn.GraphQLDirective(v)}function o(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&(U.type=j,v[A]=U)}return v}function u(I){if((0,Zn.isObjectType)(I)){let v=I.toConfig(),A=$(k({},v),{fields:()=>l(v.fields),interfaces:()=>p(v.interfaces)});return new Zn.GraphQLObjectType(A)}else if((0,Zn.isInterfaceType)(I)){let v=I.toConfig(),A=$(k({},v),{fields:()=>l(v.fields)});return"interfaces"in A&&(A.interfaces=()=>p(v.interfaces)),new Zn.GraphQLInterfaceType(A)}else if((0,Zn.isUnionType)(I)){let v=I.toConfig(),A=$(k({},v),{types:()=>p(v.types)});return new Zn.GraphQLUnionType(A)}else if((0,Zn.isInputObjectType)(I)){let v=I.toConfig(),A=$(k({},v),{fields:()=>d(v.fields)});return new Zn.GraphQLInputObjectType(A)}else if((0,Zn.isEnumType)(I)){let v=I.toConfig();return new Zn.GraphQLEnumType(v)}else if((0,Zn.isScalarType)(I)){if((0,Zn.isSpecifiedScalarType)(I))return I;let v=I.toConfig();return new Zn.GraphQLScalarType(v)}throw new Error(`Unexpected schema type: ${I}`)}function l(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&U.args&&(U.type=j,U.args=o(U.args),v[A]=U)}return v}function d(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&(U.type=j,v[A]=U)}return v}function p(I){let v=[];for(let A of I){let U=E(A);U!=null&&v.push(U)}return v}function E(I){if((0,Zn.isListType)(I)){let v=E(I.ofType);return v!=null?new Zn.GraphQLList(v):null}else if((0,Zn.isNonNullType)(I)){let v=E(I.ofType);return v!=null?new Zn.GraphQLNonNull(v):null}else if((0,Zn.isNamedType)(I)){let v=n[I.name];return v===void 0&&(v=(0,xk.isNamedStub)(I)?(0,xk.getBuiltInForStub)(I):u(I),r[v.name]=n[I.name]=v),v!=null?r[v.name]:null}return null}}});var VO=F(Zl=>{"use strict";m();T();N();Object.defineProperty(Zl,"__esModule",{value:!0});Zl.transformInputValue=Xl;Zl.serializeInputValue=ane;Zl.parseInputValue=sne;Zl.parseInputValueLiteral=one;var KT=_e(),ine=Yl();function Xl(e,t,n=null,r=null){if(t==null)return t;let i=(0,KT.getNullableType)(e);if((0,KT.isLeafType)(i))return n!=null?n(i,t):t;if((0,KT.isListType)(i))return(0,ine.asArray)(t).map(a=>Xl(i.ofType,a,n,r));if((0,KT.isInputObjectType)(i)){let a=i.getFields(),o={};for(let u in t){let l=a[u];l!=null&&(o[u]=Xl(l.type,t[u],n,r))}return r!=null?r(i,o):o}}function ane(e,t){return Xl(e,t,(n,r)=>{try{return n.serialize(r)}catch(i){return r}})}function sne(e,t){return Xl(e,t,(n,r)=>{try{return n.parseValue(r)}catch(i){return r}})}function one(e,t){return Xl(e,t,(n,r)=>n.parseLiteral(r,{}))}});var td=F(GT=>{"use strict";m();T();N();Object.defineProperty(GT,"__esModule",{value:!0});GT.mapSchema=cne;GT.correctASTNodes=np;var st=_e(),ed=UO(),Rt=Rc(),une=jT(),qk=VO();function cne(e,t={}){let n=Kk(jk(jO(Vk(dne(jO(Vk(e.getTypeMap(),e,qk.serializeInputValue),e,t,u=>(0,st.isLeafType)(u)),e,t),e,qk.parseInputValue),e,t,u=>!(0,st.isLeafType)(u)),e,t),e,t),r=e.getDirectives(),i=fne(r,e,t),{typeMap:a,directives:o}=(0,une.rewireTypes)(n,i);return new st.GraphQLSchema($(k({},e.toConfig()),{query:(0,ed.getObjectTypeFromTypeMap)(a,(0,ed.getObjectTypeFromTypeMap)(n,e.getQueryType())),mutation:(0,ed.getObjectTypeFromTypeMap)(a,(0,ed.getObjectTypeFromTypeMap)(n,e.getMutationType())),subscription:(0,ed.getObjectTypeFromTypeMap)(a,(0,ed.getObjectTypeFromTypeMap)(n,e.getSubscriptionType())),types:Object.values(a),directives:o}))}var lne=["String","ID","Int","Float","Boolean"];function jO(e,t,n,r=()=>!0){let i={};for(let a in e)if(!a.startsWith("__")&&!lne.includes(a)){let o=e[a];if(o==null||!r(o)){i[a]=o;continue}let u=mne(t,n,a);if(u==null){i[a]=o;continue}let l=u(o,t);if(l===void 0){i[a]=o;continue}i[a]=l}return i}function dne(e,t,n){let r=yne(n);return r?jO(e,t,{[Rt.MapperKind.ENUM_TYPE]:i=>{let a=i.toConfig(),o=a.values,u={};for(let l in o){let d=o[l],p=r(d,i.name,t,l);if(p===void 0)u[l]=d;else if(Array.isArray(p)){let[E,I]=p;u[E]=I===void 0?d:I}else p!==null&&(u[l]=p)}return np(new st.GraphQLEnumType($(k({},a),{values:u})))}},i=>(0,st.isEnumType)(i)):e}function Vk(e,t,n){let r=Kk(e,t,{[Rt.MapperKind.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;let a=$T(e,i.type);if(a!=null)return $(k({},i),{defaultValue:n(a,i.defaultValue)})}});return jk(r,t,{[Rt.MapperKind.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;let a=$T(r,i.type);if(a!=null)return $(k({},i),{defaultValue:n(a,i.defaultValue)})}})}function $T(e,t){if((0,st.isListType)(t)){let n=$T(e,t.ofType);return n!=null?new st.GraphQLList(n):null}else if((0,st.isNonNullType)(t)){let n=$T(e,t.ofType);return n!=null?new st.GraphQLNonNull(n):null}else if((0,st.isNamedType)(t)){let n=e[t.name];return n!=null?n:null}return null}function jk(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,st.isObjectType)(a)&&!(0,st.isInterfaceType)(a)&&!(0,st.isInputObjectType)(a)){r[i]=a;continue}let o=Tne(t,n,i);if(o==null){r[i]=a;continue}let u=a.toConfig(),l=u.fields,d={};for(let p in l){let E=l[p],I=o(E,p,i,t);if(I===void 0)d[p]=E;else if(Array.isArray(I)){let[v,A]=I;A.astNode!=null&&(A.astNode=$(k({},A.astNode),{name:$(k({},A.astNode.name),{value:v})})),d[v]=A===void 0?E:A}else I!==null&&(d[p]=I)}(0,st.isObjectType)(a)?r[i]=np(new st.GraphQLObjectType($(k({},u),{fields:d}))):(0,st.isInterfaceType)(a)?r[i]=np(new st.GraphQLInterfaceType($(k({},u),{fields:d}))):r[i]=np(new st.GraphQLInputObjectType($(k({},u),{fields:d})))}return r}function Kk(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,st.isObjectType)(a)&&!(0,st.isInterfaceType)(a)){r[i]=a;continue}let o=Ene(n);if(o==null){r[i]=a;continue}let u=a.toConfig(),l=u.fields,d={};for(let p in l){let E=l[p],I=E.args;if(I==null){d[p]=E;continue}let v=Object.keys(I);if(!v.length){d[p]=E;continue}let A={};for(let U of v){let j=I[U],J=o(j,p,i,t);if(J===void 0)A[U]=j;else if(Array.isArray(J)){let[re,te]=J;A[re]=te}else J!==null&&(A[U]=J)}d[p]=$(k({},E),{args:A})}(0,st.isObjectType)(a)?r[i]=new st.GraphQLObjectType($(k({},u),{fields:d})):(0,st.isInterfaceType)(a)?r[i]=new st.GraphQLInterfaceType($(k({},u),{fields:d})):r[i]=new st.GraphQLInputObjectType($(k({},u),{fields:d}))}return r}function fne(e,t,n){let r=hne(n);if(r==null)return e.slice();let i=[];for(let a of e){let o=r(a,t);o===void 0?i.push(a):o!==null&&i.push(o)}return i}function pne(e,t){var i,a,o;let n=e.getType(t),r=[Rt.MapperKind.TYPE];return(0,st.isObjectType)(n)?(r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.OBJECT_TYPE),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.QUERY):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.MUTATION):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.SUBSCRIPTION)):(0,st.isInputObjectType)(n)?r.push(Rt.MapperKind.INPUT_OBJECT_TYPE):(0,st.isInterfaceType)(n)?r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.ABSTRACT_TYPE,Rt.MapperKind.INTERFACE_TYPE):(0,st.isUnionType)(n)?r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.ABSTRACT_TYPE,Rt.MapperKind.UNION_TYPE):(0,st.isEnumType)(n)?r.push(Rt.MapperKind.ENUM_TYPE):(0,st.isScalarType)(n)&&r.push(Rt.MapperKind.SCALAR_TYPE),r}function mne(e,t,n){let r=pne(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function Nne(e,t){var i,a,o;let n=e.getType(t),r=[Rt.MapperKind.FIELD];return(0,st.isObjectType)(n)?(r.push(Rt.MapperKind.COMPOSITE_FIELD,Rt.MapperKind.OBJECT_FIELD),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.QUERY_ROOT_FIELD):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.MUTATION_ROOT_FIELD):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.SUBSCRIPTION_ROOT_FIELD)):(0,st.isInterfaceType)(n)?r.push(Rt.MapperKind.COMPOSITE_FIELD,Rt.MapperKind.INTERFACE_FIELD):(0,st.isInputObjectType)(n)&&r.push(Rt.MapperKind.INPUT_OBJECT_FIELD),r}function Tne(e,t,n){let r=Nne(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function Ene(e){let t=e[Rt.MapperKind.ARGUMENT];return t!=null?t:null}function hne(e){let t=e[Rt.MapperKind.DIRECTIVE];return t!=null?t:null}function yne(e){let t=e[Rt.MapperKind.ENUM_VALUE];return t!=null?t:null}function np(e){if((0,st.isObjectType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{kind:st.Kind.OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{kind:st.Kind.OBJECT_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLObjectType(t)}else if((0,st.isInterfaceType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{kind:st.Kind.INTERFACE_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{kind:st.Kind.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLInterfaceType(t)}else if((0,st.isInputObjectType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{kind:st.Kind.INPUT_OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{kind:st.Kind.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLInputObjectType(t)}else if((0,st.isEnumType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.values){let i=t.values[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{values:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{values:void 0}))),new st.GraphQLEnumType(t)}else return e}});var $k=F(GO=>{"use strict";m();T();N();Object.defineProperty(GO,"__esModule",{value:!0});GO.filterSchema=gne;var QT=_e(),ga=Rc(),Ine=td();function gne({schema:e,typeFilter:t=()=>!0,fieldFilter:n=void 0,rootFieldFilter:r=void 0,objectFieldFilter:i=void 0,interfaceFieldFilter:a=void 0,inputObjectFieldFilter:o=void 0,argumentFilter:u=void 0,directiveFilter:l=void 0,enumValueFilter:d=void 0}){return(0,Ine.mapSchema)(e,{[ga.MapperKind.QUERY]:E=>KO(E,"Query",r,u),[ga.MapperKind.MUTATION]:E=>KO(E,"Mutation",r,u),[ga.MapperKind.SUBSCRIPTION]:E=>KO(E,"Subscription",r,u),[ga.MapperKind.OBJECT_TYPE]:E=>t(E.name,E)?$O(QT.GraphQLObjectType,E,i||n,u):null,[ga.MapperKind.INTERFACE_TYPE]:E=>t(E.name,E)?$O(QT.GraphQLInterfaceType,E,a||n,u):null,[ga.MapperKind.INPUT_OBJECT_TYPE]:E=>t(E.name,E)?$O(QT.GraphQLInputObjectType,E,o||n):null,[ga.MapperKind.UNION_TYPE]:E=>t(E.name,E)?void 0:null,[ga.MapperKind.ENUM_TYPE]:E=>t(E.name,E)?void 0:null,[ga.MapperKind.SCALAR_TYPE]:E=>t(E.name,E)?void 0:null,[ga.MapperKind.DIRECTIVE]:E=>l&&!l(E.name,E)?null:void 0,[ga.MapperKind.ENUM_VALUE]:(E,I,v,A)=>d&&!d(I,A,E)?null:void 0})}function KO(e,t,n,r){if(n||r){let i=e.toConfig();for(let a in i.fields){let o=i.fields[a];if(n&&!n(t,a,i.fields[a]))delete i.fields[a];else if(r&&o.args)for(let u in o.args)r(e.name,a,u,o.args[u])||delete o.args[u]}return new QT.GraphQLObjectType(i)}return e}function $O(e,t,n,r){if(n||r){let i=t.toConfig();for(let a in i.fields){let o=i.fields[a];if(n&&!n(t.name,a,i.fields[a]))delete i.fields[a];else if(r&&"args"in o)for(let u in o.args)r(t.name,a,u,o.args[u])||delete o.args[u]}return new e(i)}}});var Qk=F(YT=>{"use strict";m();T();N();Object.defineProperty(YT,"__esModule",{value:!0});YT.healSchema=_ne;YT.healTypes=Gk;var ts=_e();function _ne(e){return Gk(e.getTypeMap(),e.getDirectives()),e}function Gk(e,t){let n=Object.create(null);for(let d in e){let p=e[d];if(p==null||d.startsWith("__"))continue;let E=p.name;if(!E.startsWith("__")){if(n[E]!=null){console.warn(`Duplicate schema type name ${E} found; keeping the existing one found in the schema`);continue}n[E]=p}}for(let d in n){let p=n[d];e[d]=p}for(let d of t)d.args=d.args.filter(p=>(p.type=l(p.type),p.type!==null));for(let d in e){let p=e[d];!d.startsWith("__")&&d in n&&p!=null&&r(p)}for(let d in e)!d.startsWith("__")&&!(d in n)&&delete e[d];function r(d){if((0,ts.isObjectType)(d)){i(d),a(d);return}else if((0,ts.isInterfaceType)(d)){i(d),"getInterfaces"in d&&a(d);return}else if((0,ts.isUnionType)(d)){u(d);return}else if((0,ts.isInputObjectType)(d)){o(d);return}else if((0,ts.isLeafType)(d))return;throw new Error(`Unexpected schema type: ${d}`)}function i(d){let p=d.getFields();for(let[E,I]of Object.entries(p))I.args.map(v=>(v.type=l(v.type),v.type===null?null:v)).filter(Boolean),I.type=l(I.type),I.type===null&&delete p[E]}function a(d){if("getInterfaces"in d){let p=d.getInterfaces();p.push(...p.splice(0).map(E=>l(E)).filter(Boolean))}}function o(d){let p=d.getFields();for(let[E,I]of Object.entries(p))I.type=l(I.type),I.type===null&&delete p[E]}function u(d){let p=d.getTypes();p.push(...p.splice(0).map(E=>l(E)).filter(Boolean))}function l(d){if((0,ts.isListType)(d)){let p=l(d.ofType);return p!=null?new ts.GraphQLList(p):null}else if((0,ts.isNonNullType)(d)){let p=l(d.ofType);return p!=null?new ts.GraphQLNonNull(p):null}else if((0,ts.isNamedType)(d)){let p=e[d.name];if(p&&d!==p)return p}return d}}});var Yk=F(QO=>{"use strict";m();T();N();Object.defineProperty(QO,"__esModule",{value:!0});QO.getResolversFromSchema=vne;var Pc=_e();function vne(e,t){var i,a;let n=Object.create(null),r=e.getTypeMap();for(let o in r)if(!o.startsWith("__")){let u=r[o];if((0,Pc.isScalarType)(u)){if(!(0,Pc.isSpecifiedScalarType)(u)){let l=u.toConfig();delete l.astNode,n[o]=new Pc.GraphQLScalarType(l)}}else if((0,Pc.isEnumType)(u)){n[o]={};let l=u.getValues();for(let d of l)n[o][d.name]=d.value}else if((0,Pc.isInterfaceType)(u))u.resolveType!=null&&(n[o]={__resolveType:u.resolveType});else if((0,Pc.isUnionType)(u))u.resolveType!=null&&(n[o]={__resolveType:u.resolveType});else if((0,Pc.isObjectType)(u)){n[o]={},u.isTypeOf!=null&&(n[o].__isTypeOf=u.isTypeOf);let l=u.getFields();for(let d in l){let p=l[d];if(p.subscribe!=null&&(n[o][d]=n[o][d]||{},n[o][d].subscribe=p.subscribe),p.resolve!=null&&((i=p.resolve)==null?void 0:i.name)!=="defaultFieldResolver"){switch((a=p.resolve)==null?void 0:a.name){case"defaultMergedResolver":if(!t)continue;break;case"defaultFieldResolver":continue}n[o][d]=n[o][d]||{},n[o][d].resolve=p.resolve}}}}return n}});var Hk=F(YO=>{"use strict";m();T();N();Object.defineProperty(YO,"__esModule",{value:!0});YO.forEachField=One;var Jk=_e();function One(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,Jk.getNamedType)(i).name.startsWith("__")&&(0,Jk.isObjectType)(i)){let a=i.getFields();for(let o in a){let u=a[o];t(u,r,o)}}}}});var zk=F(HO=>{"use strict";m();T();N();Object.defineProperty(HO,"__esModule",{value:!0});HO.forEachDefaultValue=Sne;var JO=_e();function Sne(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,JO.getNamedType)(i).name.startsWith("__")){if((0,JO.isObjectType)(i)){let a=i.getFields();for(let o in a){let u=a[o];for(let l of u.args)l.defaultValue=t(l.type,l.defaultValue)}}else if((0,JO.isInputObjectType)(i)){let a=i.getFields();for(let o in a){let u=a[o];u.defaultValue=t(u.type,u.defaultValue)}}}}}});var ZO=F(XO=>{"use strict";m();T();N();Object.defineProperty(XO,"__esModule",{value:!0});XO.addTypes=bne;var zO=_e(),WO=UO(),Dne=jT();function bne(e,t){let n=e.toConfig(),r={};for(let u of n.types)r[u.name]=u;let i={};for(let u of n.directives)i[u.name]=u;for(let u of t)(0,zO.isNamedType)(u)?r[u.name]=u:(0,zO.isDirective)(u)&&(i[u.name]=u);let{typeMap:a,directives:o}=(0,Dne.rewireTypes)(r,Object.values(i));return new zO.GraphQLSchema($(k({},n),{query:(0,WO.getObjectTypeFromTypeMap)(a,e.getQueryType()),mutation:(0,WO.getObjectTypeFromTypeMap)(a,e.getMutationType()),subscription:(0,WO.getObjectTypeFromTypeMap)(a,e.getSubscriptionType()),types:Object.values(a),directives:o}))}});var Xk=F(eS=>{"use strict";m();T();N();Object.defineProperty(eS,"__esModule",{value:!0});eS.pruneSchema=wne;var er=_e(),Ane=TO(),Rne=Rc(),Pne=td(),Fne=Wf();function wne(e,t={}){let{skipEmptyCompositeTypePruning:n,skipEmptyUnionPruning:r,skipPruning:i,skipUnimplementedInterfacesPruning:a,skipUnusedTypesPruning:o}=t,u=[],l=e;do{let d=Lne(l);if(i){let p=[];for(let E in l.getTypeMap()){if(E.startsWith("__"))continue;let I=l.getType(E);I&&i(I)&&p.push(E)}d=Wk(p,l,d)}u=[],l=(0,Pne.mapSchema)(l,{[Rne.MapperKind.TYPE]:p=>!d.has(p.name)&&!(0,er.isSpecifiedScalarType)(p)?((0,er.isUnionType)(p)||(0,er.isInputObjectType)(p)||(0,er.isInterfaceType)(p)||(0,er.isObjectType)(p)||(0,er.isScalarType)(p))&&(o||(0,er.isUnionType)(p)&&r&&!Object.keys(p.getTypes()).length||((0,er.isInputObjectType)(p)||(0,er.isInterfaceType)(p)||(0,er.isObjectType)(p))&&n&&!Object.keys(p.getFields()).length||(0,er.isInterfaceType)(p)&&a)?p:(u.push(p.name),d.delete(p.name),null):p})}while(u.length);return l}function Lne(e){let t=[];for(let n of(0,Fne.getRootTypes)(e))t.push(n.name);return Wk(t,e)}function Wk(e,t,n=new Set){let r=new Map;for(;e.length;){let i=e.pop();if(n.has(i)&&r[i]!==!0)continue;let a=t.getType(i);if(a){if((0,er.isUnionType)(a)&&e.push(...a.getTypes().map(o=>o.name)),(0,er.isInterfaceType)(a)&&r[i]===!0&&(e.push(...(0,Ane.getImplementingTypes)(a.name,t)),r[i]=!1),(0,er.isEnumType)(a)&&e.push(...a.getValues().flatMap(o=>JT(t,o))),"getInterfaces"in a&&e.push(...a.getInterfaces().map(o=>o.name)),"getFields"in a){let o=a.getFields(),u=Object.entries(o);if(!u.length)continue;for(let[,l]of u){(0,er.isObjectType)(a)&&e.push(...l.args.flatMap(p=>{let E=[(0,er.getNamedType)(p.type).name];return E.push(...JT(t,p)),E}));let d=(0,er.getNamedType)(l.type);e.push(d.name),e.push(...JT(t,l)),(0,er.isInterfaceType)(d)&&!(d.name in r)&&(r[d.name]=!0)}}e.push(...JT(t,a)),n.add(i)}}return n}function JT(e,t){var r,i;let n=new Set;if((r=t.astNode)!=null&&r.directives)for(let a of t.astNode.directives){let o=e.getDirective(a.name.value);if(o!=null&&o.args)for(let u of o.args){let l=(0,er.getNamedType)(u.type);n.add(l.name)}}if((i=t.extensions)!=null&&i.directives)for(let a in t.extensions.directives){let o=e.getDirective(a);if(o!=null&&o.args)for(let u of o.args){let l=(0,er.getNamedType)(u.type);n.add(l.name)}}return[...n]}});var nS=F(tS=>{"use strict";m();T();N();Object.defineProperty(tS,"__esModule",{value:!0});tS.mergeDeep=HT;var Cne=Yl();function HT(e,t=!1,n=!1,r=!1){if(e.length===0)return;if(e.length===1)return e[0];let i,a=!0,o=e.every(d=>{if(Array.isArray(d)){if(i===void 0)return i=d.length,!0;if(i===d.length)return!0}else a=!1;return!1});if(r&&o)return new Array(i).fill(null).map((d,p)=>HT(e.map(E=>E[p]),t,n,r));if(a)return e.flat(1);let u,l;t&&(l=e.find(d=>Zk(d)),l&&(u==null&&(u={}),Object.setPrototypeOf(u,Object.create(Object.getPrototypeOf(l)))));for(let d of e)if(d!=null)if(Zk(d)){if(l){let p=Object.getPrototypeOf(u),E=Object.getPrototypeOf(d);if(E)for(let I of Object.getOwnPropertyNames(E)){let v=Object.getOwnPropertyDescriptor(E,I);(0,Cne.isSome)(v)&&Object.defineProperty(p,I,v)}}for(let p in d)u==null&&(u={}),p in u?u[p]=HT([u[p],d[p]],t,n,r):u[p]=d[p]}else Array.isArray(d)&&Array.isArray(u)?u=HT([u,d],t,n,r):u=d;return u}function Zk(e){return e&&typeof e=="object"&&!Array.isArray(e)}});var eM=F(rS=>{"use strict";m();T();N();Object.defineProperty(rS,"__esModule",{value:!0});rS.parseSelectionSet=Une;var Bne=_e();function Une(e,t){return(0,Bne.parse)(e,t).definitions[0].selectionSet}});var tM=F(iS=>{"use strict";m();T();N();Object.defineProperty(iS,"__esModule",{value:!0});iS.getResponseKeyFromInfo=kne;function kne(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}});var nM=F(nd=>{"use strict";m();T();N();Object.defineProperty(nd,"__esModule",{value:!0});nd.appendObjectFields=xne;nd.removeObjectFields=qne;nd.selectObjectFields=Vne;nd.modifyObjectFields=jne;var zT=_e(),Mne=ZO(),WT=Rc(),Fc=td();function xne(e,t,n){return e.getType(t)==null?(0,Mne.addTypes)(e,[new zT.GraphQLObjectType({name:t,fields:n})]):(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:r=>{if(r.name===t){let i=r.toConfig(),a=i.fields,o={};for(let u in a)o[u]=a[u];for(let u in n)o[u]=n[u];return(0,Fc.correctASTNodes)(new zT.GraphQLObjectType($(k({},i),{fields:o})))}}})}function qne(e,t,n){let r={};return[(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:a=>{if(a.name===t){let o=a.toConfig(),u=o.fields,l={};for(let d in u){let p=u[d];n(d,p)?r[d]=p:l[d]=p}return(0,Fc.correctASTNodes)(new zT.GraphQLObjectType($(k({},o),{fields:l})))}}}),r]}function Vne(e,t,n){let r={};return(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:i=>{if(i.name===t){let o=i.toConfig().fields;for(let u in o){let l=o[u];n(u,l)&&(r[u]=l)}}}}),r}function jne(e,t,n,r){let i={};return[(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:o=>{if(o.name===t){let u=o.toConfig(),l=u.fields,d={};for(let p in l){let E=l[p];n(p,E)?i[p]=E:d[p]=E}for(let p in r){let E=r[p];d[p]=E}return(0,Fc.correctASTNodes)(new zT.GraphQLObjectType($(k({},u),{fields:d})))}}}),i]}});var rM=F(aS=>{"use strict";m();T();N();Object.defineProperty(aS,"__esModule",{value:!0});aS.renameType=Kne;var Wi=_e();function Kne(e,t){if((0,Wi.isObjectType)(e))return new Wi.GraphQLObjectType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isInterfaceType)(e))return new Wi.GraphQLInterfaceType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isUnionType)(e))return new Wi.GraphQLUnionType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isInputObjectType)(e))return new Wi.GraphQLInputObjectType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isEnumType)(e))return new Wi.GraphQLEnumType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isScalarType)(e))return new Wi.GraphQLScalarType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));throw new Error(`Unknown type ${e}.`)}});var iM=F(XT=>{"use strict";m();T();N();Object.defineProperty(XT,"__esModule",{value:!0});XT.updateArgument=Gne;XT.createVariableNameGenerator=Qne;var wc=_e(),$ne=UT();function Gne(e,t,n,r,i,a,o){if(e[r]={kind:wc.Kind.ARGUMENT,name:{kind:wc.Kind.NAME,value:r},value:{kind:wc.Kind.VARIABLE,name:{kind:wc.Kind.NAME,value:i}}},t[i]={kind:wc.Kind.VARIABLE_DEFINITION,variable:{kind:wc.Kind.VARIABLE,name:{kind:wc.Kind.NAME,value:i}},type:(0,$ne.astFromType)(a)},o!==void 0){n[i]=o;return}i in n&&delete n[i]}function Qne(e){let t=0;return n=>{let r;do r=t===0?n:`_v${t.toString()}_${n}`,t++;while(r in e);return r}}});var aM=F(oS=>{"use strict";m();T();N();Object.defineProperty(oS,"__esModule",{value:!0});oS.implementsAbstractType=Yne;var sS=_e();function Yne(e,t,n){return n==null||t==null?!1:t===n?!0:(0,sS.isCompositeType)(t)&&(0,sS.isCompositeType)(n)?(0,sS.doTypesOverlap)(e,t,n):!1}});var oM=F(uS=>{"use strict";m();T();N();Object.defineProperty(uS,"__esModule",{value:!0});uS.observableToAsyncIterable=Jne;var sM=Jf();function Jne(e){let t=[],n=[],r=!0,i=p=>{t.length!==0?t.shift()({value:p,done:!1}):n.push({value:p,done:!1})},a=p=>{t.length!==0?t.shift()({value:{errors:[p]},done:!1}):n.push({value:{errors:[p]},done:!1})},o=()=>{t.length!==0?t.shift()({done:!0}):n.push({done:!0})},u=()=>new Promise(p=>{if(n.length!==0){let E=n.shift();p(E)}else t.push(p)}),l=e.subscribe({next(p){return i(p)},error(p){return a(p)},complete(){return o()}}),d=()=>{if(r){r=!1,l.unsubscribe();for(let p of t)p({value:void 0,done:!0});t.length=0,n.length=0}};return{next(){return r?u():this.return()},return(){return d(),(0,sM.fakePromise)({value:void 0,done:!0})},throw(p){return d(),(0,sM.fakeRejectPromise)(p)},[Symbol.asyncIterator](){return this}}}});var uM=F(ZT=>{"use strict";m();T();N();Object.defineProperty(ZT,"__esModule",{value:!0});ZT.AccumulatorMap=void 0;var cS=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};ZT.AccumulatorMap=cS});var lS=F(rd=>{"use strict";m();T();N();Object.defineProperty(rd,"__esModule",{value:!0});rd.GraphQLStreamDirective=rd.GraphQLDeferDirective=void 0;var Xi=_e();rd.GraphQLDeferDirective=new Xi.GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Xi.DirectiveLocation.FRAGMENT_SPREAD,Xi.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Xi.GraphQLNonNull(Xi.GraphQLBoolean),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Xi.GraphQLString,description:"Unique name"}}});rd.GraphQLStreamDirective=new Xi.GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Xi.DirectiveLocation.FIELD],args:{if:{type:new Xi.GraphQLNonNull(Xi.GraphQLBoolean),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Xi.GraphQLString,description:"Unique name"},initialCount:{defaultValue:0,type:Xi.GraphQLInt,description:"Number of items to return immediately"}}})});var pS=F(Bs=>{"use strict";m();T();N();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.collectSubFields=void 0;Bs.collectFields=Wne;Bs.shouldIncludeNode=eE;Bs.doesFragmentConditionMatch=dS;Bs.getFieldEntryKey=cM;Bs.getDeferValues=fS;var ns=_e(),tE=uM(),Hne=lS(),zne=Ru();function id(e,t,n,r,i,a,o,u){for(let l of i.selections)switch(l.kind){case ns.Kind.FIELD:{if(!eE(n,l))continue;a.add(cM(l),l);break}case ns.Kind.INLINE_FRAGMENT:{if(!eE(n,l)||!dS(e,l,r))continue;let d=fS(n,l);if(d){let p=new tE.AccumulatorMap;id(e,t,n,r,l.selectionSet,p,o,u),o.push({label:d.label,fields:p})}else id(e,t,n,r,l.selectionSet,a,o,u);break}case ns.Kind.FRAGMENT_SPREAD:{let d=l.name.value;if(!eE(n,l))continue;let p=fS(n,l);if(u.has(d)&&!p)continue;let E=t[d];if(!E||!dS(e,E,r))continue;if(p||u.add(d),p){let I=new tE.AccumulatorMap;id(e,t,n,r,E.selectionSet,I,o,u),o.push({label:p.label,fields:I})}else id(e,t,n,r,E.selectionSet,a,o,u);break}}}function Wne(e,t,n,r,i){let a=new tE.AccumulatorMap,o=[];return id(e,t,n,r,i,a,o,new Set),{fields:a,patches:o}}function eE(e,t){let n=(0,ns.getDirectiveValues)(ns.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,ns.getDirectiveValues)(ns.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function dS(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,ns.typeFromAST)(e,r);return i===n?!0:(0,ns.isAbstractType)(i)?e.getPossibleTypes(i).includes(n):!1}function cM(e){return e.alias?e.alias.value:e.name.value}function fS(e,t){let n=(0,ns.getDirectiveValues)(Hne.GraphQLDeferDirective,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}Bs.collectSubFields=(0,zne.memoize5)(function(t,n,r,i,a){let o=new tE.AccumulatorMap,u=new Set,l=[],d={fields:o,patches:l};for(let p of a)p.selectionSet&&id(t,n,r,i,p.selectionSet,o,l,u);return d})});var mS=F(rp=>{"use strict";m();T();N();Object.defineProperty(rp,"__esModule",{value:!0});rp.getOperationASTFromRequest=void 0;rp.getOperationASTFromDocument=lM;var Xne=_e(),Zne=Ru();function lM(e,t){let n=(0,Xne.getOperationAST)(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}rp.getOperationASTFromRequest=(0,Zne.memoize1)(function(t){return lM(t.document,t.operationName)})});var pM=F(ip=>{"use strict";m();T();N();Object.defineProperty(ip,"__esModule",{value:!0});ip.visitData=TS;ip.visitErrors=tre;ip.visitResult=nre;var Pu=_e(),NS=pS(),ere=mS();function TS(e,t,n){if(Array.isArray(e))return e.map(r=>TS(r,t,n));if(typeof e=="object"){let r=t!=null?t(e):e;if(r!=null)for(let i in r){let a=r[i];Object.defineProperty(r,i,{value:TS(a,t,n)})}return n!=null?n(r):r}return e}function tre(e,t){return e.map(n=>t(n))}function nre(e,t,n,r,i){let a=t.document.definitions.reduce((I,v)=>(v.kind===Pu.Kind.FRAGMENT_DEFINITION&&(I[v.name.value]=v),I),{}),o=t.variables||{},u={segmentInfoMap:new Map,unpathedErrors:new Set},l=e.data,d=e.errors,p=d!=null&&i!=null,E=(0,ere.getOperationASTFromRequest)(t);return l!=null&&E!=null&&(e.data=are(l,E,n,a,o,r,p?d:void 0,u)),d!=null&&i&&(e.errors=rre(d,i,u)),e}function rre(e,t,n){let r=n.segmentInfoMap,i=n.unpathedErrors,a=t.__unpathed;return e.map(o=>{let u=r.get(o),l=u==null?o:u.reduceRight((d,p)=>{let E=p.type.name,I=t[E];if(I==null)return d;let v=I[p.fieldName];return v==null?d:v(d,p.pathIndex)},o);return a&&i.has(o)?a(l):l})}function ire(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":return e.getMutationType();case"subscription":return e.getSubscriptionType()}}function are(e,t,n,r,i,a,o,u){let l=ire(n,t),{fields:d}=(0,NS.collectFields)(n,r,i,l,t.selectionSet);return ES(e,l,d,n,r,i,a,0,o,u)}function ES(e,t,n,r,i,a,o,u,l,d){var re;let p=t.getFields(),E=o==null?void 0:o[t.name],I=E==null?void 0:E.__enter,v=I!=null?I(e):e,A,U=null;if(l!=null){A=ore(l,u),U=A.errorMap;for(let te of A.unpathedErrors)d.unpathedErrors.add(te)}for(let[te,pe]of n){let Ne=pe[0].name.value,Ie=(re=p[Ne])==null?void 0:re.type;if(Ie==null)switch(Ne){case"__typename":Ie=Pu.TypeNameMetaFieldDef.type;break;case"__schema":Ie=Pu.SchemaMetaFieldDef.type;break;case"__type":Ie=Pu.TypeMetaFieldDef.type;break}let Ue=u+1,He;U&&(He=U[te],He!=null&&delete U[te],ure(t,Ne,Ue,He,d));let W=fM(e[te],Ie,pe,r,i,a,o,Ue,He,d);dM(v,te,W,E,Ne)}let j=v.__typename;if(j!=null&&dM(v,"__typename",j,E,"__typename"),U)for(let te in U){let pe=U[te];for(let Ne of pe)d.unpathedErrors.add(Ne)}let J=E==null?void 0:E.__leave;return J!=null?J(v):v}function dM(e,t,n,r,i){if(r==null){e[t]=n;return}let a=r[i];if(a==null){e[t]=n;return}let o=a(n);if(o===void 0){delete e[t];return}e[t]=o}function sre(e,t,n,r,i,a,o,u,l,d){return e.map(p=>fM(p,t,n,r,i,a,o,u+1,l,d))}function fM(e,t,n,r,i,a,o,u,l=[],d){if(e==null)return e;let p=(0,Pu.getNullableType)(t);if((0,Pu.isListType)(p))return sre(e,p.ofType,n,r,i,a,o,u,l,d);if((0,Pu.isAbstractType)(p)){let v=r.getType(e.__typename),{fields:A,patches:U}=(0,NS.collectSubFields)(r,i,a,v,n);if(U.length){A=new Map(A);for(let j of U)for(let[J,re]of j.fields){let te=A.get(J);te?te.push(...re):A.set(J,re)}}return ES(e,v,A,r,i,a,o,u,l,d)}else if((0,Pu.isObjectType)(p)){let{fields:v,patches:A}=(0,NS.collectSubFields)(r,i,a,p,n);if(A.length){v=new Map(v);for(let U of A)for(let[j,J]of U.fields){let re=v.get(j);re?re.push(...J):v.set(j,J)}}return ES(e,p,v,r,i,a,o,u,l,d)}let E=o==null?void 0:o[p.name];if(E==null)return e;let I=E(e);return I===void 0?e:I}function ore(e,t){var i;let n=Object.create(null),r=new Set;for(let a of e){let o=(i=a.path)==null?void 0:i[t];if(o==null){r.add(a);continue}o in n?n[o].push(a):n[o]=[a]}return{errorMap:n,unpathedErrors:r}}function ure(e,t,n,r=[],i){for(let a of r){let o={type:e,fieldName:t,pathIndex:n},u=i.segmentInfoMap.get(a);u==null?i.segmentInfoMap.set(a,[o]):u.push(o)}}});var mM=F(yS=>{"use strict";m();T();N();Object.defineProperty(yS,"__esModule",{value:!0});yS.valueMatchesCriteria=hS;function hS(e,t){return e==null?e===t:Array.isArray(e)?Array.isArray(t)&&e.every((n,r)=>hS(n,t[r])):typeof e=="object"?typeof t=="object"&&t&&Object.keys(t).every(n=>hS(e[n],t[n])):t instanceof RegExp?t.test(e):e===t}});var NM=F(IS=>{"use strict";m();T();N();Object.defineProperty(IS,"__esModule",{value:!0});IS.isAsyncIterable=cre;function cre(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}});var TM=F(gS=>{"use strict";m();T();N();Object.defineProperty(gS,"__esModule",{value:!0});gS.isDocumentNode=dre;var lre=_e();function dre(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===lre.Kind.DOCUMENT}});var EM=F(()=>{"use strict";m();T();N()});var gM=F(ap=>{"use strict";m();T();N();Object.defineProperty(ap,"__esModule",{value:!0});ap.getAsyncIteratorWithCancel=yM;ap.getAsyncIterableWithCancel=IM;ap.withCancel=IM;var fre=Ru();function pre(e){return wi(this,null,function*(){return{value:e,done:!0}})}var hM=(0,fre.memoize2)(function(t,n){return function(...i){return Reflect.apply(n,t,i)}});function yM(e,t){return new Proxy(e,{has(n,r){return r==="return"?!0:Reflect.has(n,r)},get(n,r,i){let a=Reflect.get(n,r,i);if(r==="return"){let o=a||pre;return function(l){return wi(this,null,function*(){let d=yield t(l);return Reflect.apply(o,n,[d])})}}else if(typeof a=="function")return hM(n,a);return a}})}function IM(e,t){return new Proxy(e,{get(n,r,i){let a=Reflect.get(n,r,i);return Symbol.asyncIterator===r?function(){let u=Reflect.apply(a,n,[]);return yM(u,t)}:typeof a=="function"?hM(n,a):a}})}});var _M=F(_S=>{"use strict";m();T();N();Object.defineProperty(_S,"__esModule",{value:!0});_S.fixSchemaAst=Ere;var mre=_e(),Nre=bO();function Tre(e,t){let n=(0,Nre.getDocumentNodeFromSchema)(e);return(0,mre.buildASTSchema)(n,k({},t||{}))}function Ere(e,t){let n;return(!e.astNode||!e.extensionASTNodes)&&(n=Tre(e,t)),!e.astNode&&(n!=null&&n.astNode)&&(e.astNode=n.astNode),!e.extensionASTNodes&&(n!=null&&n.astNode)&&(e.extensionASTNodes=n.extensionASTNodes),e}});var vM=F(vS=>{"use strict";m();T();N();Object.defineProperty(vS,"__esModule",{value:!0});vS.extractExtensionsFromSchema=Ire;var hre=Yl(),Us=Rc(),yre=td();function _a(e,t){e=e||{};let a=e,{directives:n}=a,r=GR(a,["directives"]),i=k({},r);if(!t&&n!=null){let o={};for(let u in n)o[u]=[...(0,hre.asArray)(n[u])];i.directives=o}return i}function Ire(e,t=!1){let n={schemaExtensions:_a(e.extensions,t),types:{}};return(0,yre.mapSchema)(e,{[Us.MapperKind.OBJECT_TYPE]:r=>(n.types[r.name]={fields:{},type:"object",extensions:_a(r.extensions,t)},r),[Us.MapperKind.INTERFACE_TYPE]:r=>(n.types[r.name]={fields:{},type:"interface",extensions:_a(r.extensions,t)},r),[Us.MapperKind.FIELD]:(r,i,a)=>{n.types[a].fields[i]={arguments:{},extensions:_a(r.extensions,t)};let o=r.args;if(o!=null)for(let u in o)n.types[a].fields[i].arguments[u]=_a(o[u].extensions,t);return r},[Us.MapperKind.ENUM_TYPE]:r=>(n.types[r.name]={values:{},type:"enum",extensions:_a(r.extensions,t)},r),[Us.MapperKind.ENUM_VALUE]:(r,i,a,o)=>(n.types[i].values[o]=_a(r.extensions,t),r),[Us.MapperKind.SCALAR_TYPE]:r=>(n.types[r.name]={type:"scalar",extensions:_a(r.extensions,t)},r),[Us.MapperKind.UNION_TYPE]:r=>(n.types[r.name]={type:"union",extensions:_a(r.extensions,t)},r),[Us.MapperKind.INPUT_OBJECT_TYPE]:r=>(n.types[r.name]={fields:{},type:"input",extensions:_a(r.extensions,t)},r),[Us.MapperKind.INPUT_OBJECT_FIELD]:(r,i,a)=>(n.types[a].fields[i]={extensions:_a(r.extensions,t)},r)}),n}});var OM=F(sp=>{"use strict";m();T();N();Object.defineProperty(sp,"__esModule",{value:!0});sp.addPath=gre;sp.pathToArray=_re;sp.printPathArray=vre;function gre(e,t,n){return{prev:e,key:t,typename:n}}function _re(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function vre(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var DM=F(SS=>{"use strict";m();T();N();Object.defineProperty(SS,"__esModule",{value:!0});SS.mergeIncrementalResult=SM;var Ore=nS();function SM({incrementalResult:e,executionResult:t}){var r;let n=["data",...(r=e.path)!=null?r:[]];if(e.items)for(let i of e.items)OS(t,n,i),n[n.length-1]++;e.data&&OS(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&OS(t,["extensions"],e.extensions),e.incremental&&e.incremental.forEach(i=>{SM({incrementalResult:i,executionResult:t})})}function OS(e,t,n){let r=e,i;for(i=0;i{"use strict";m();T();N();Object.defineProperty(nE,"__esModule",{value:!0});nE.debugTimerStart=Sre;nE.debugTimerEnd=Dre;var bM=new Set;function Sre(e){var n,r;let t=((r=(n=globalThis.process)==null?void 0:n.env)==null?void 0:r.DEBUG)||globalThis.DEBUG;(t==="1"||t!=null&&t.includes(e))&&(bM.add(e),console.time(e))}function Dre(e){bM.has(e)&&console.timeEnd(e)}});var FM=F(op=>{"use strict";m();T();N();Object.defineProperty(op,"__esModule",{value:!0});op.getAbortPromise=void 0;op.registerAbortSignalListener=PM;var bre=Jf(),RM=Ru(),Are=(0,RM.memoize1)(function(t){let n=new Set;return t.addEventListener("abort",r=>{for(let i of n)i(r)},{once:!0}),n});function PM(e,t){if(e.aborted){t();return}Are(e).add(t)}op.getAbortPromise=(0,RM.memoize1)(function(t){return t.aborted?(0,bre.fakeRejectPromise)(t.reason):new Promise((n,r)=>{if(t.aborted){r(t.reason);return}PM(t,()=>{r(t.reason)})})})});var va=F(we=>{"use strict";m();T();N();Object.defineProperty(we,"__esModule",{value:!0});we.createDeferred=we.fakePromise=we.mapMaybePromise=we.mapAsyncIterator=we.inspect=void 0;var Qe=(BU(),Gm(CU));Qe.__exportStar(UU(),we);Qe.__exportStar(Yl(),we);Qe.__exportStar(lO(),we);Qe.__exportStar(fO(),we);Qe.__exportStar(HU(),we);Qe.__exportStar(TO(),we);Qe.__exportStar(bO(),we);Qe.__exportStar(fO(),we);Qe.__exportStar(pk(),we);Qe.__exportStar(mk(),we);Qe.__exportStar(bk(),we);Qe.__exportStar(Bk(),we);Qe.__exportStar(kk(),we);Qe.__exportStar($k(),we);Qe.__exportStar(Qk(),we);Qe.__exportStar(Yk(),we);Qe.__exportStar(Hk(),we);Qe.__exportStar(zk(),we);Qe.__exportStar(td(),we);Qe.__exportStar(ZO(),we);Qe.__exportStar(jT(),we);Qe.__exportStar(Xk(),we);Qe.__exportStar(nS(),we);Qe.__exportStar(Rc(),we);Qe.__exportStar(xO(),we);Qe.__exportStar(eM(),we);Qe.__exportStar(tM(),we);Qe.__exportStar(nM(),we);Qe.__exportStar(rM(),we);Qe.__exportStar(VO(),we);Qe.__exportStar(iM(),we);Qe.__exportStar(UT(),we);Qe.__exportStar(aM(),we);Qe.__exportStar(PT(),we);Qe.__exportStar(oM(),we);Qe.__exportStar(pM(),we);Qe.__exportStar(oO(),we);Qe.__exportStar(mM(),we);Qe.__exportStar(NM(),we);Qe.__exportStar(TM(),we);Qe.__exportStar(Hf(),we);Qe.__exportStar(EM(),we);Qe.__exportStar(gM(),we);Qe.__exportStar(Wf(),we);Qe.__exportStar(PO(),we);Qe.__exportStar(pS(),we);var Rre=Yf();Object.defineProperty(we,"inspect",{enumerable:!0,get:function(){return Rre.inspect}});Qe.__exportStar(Ru(),we);Qe.__exportStar(_M(),we);Qe.__exportStar(mS(),we);Qe.__exportStar(vM(),we);Qe.__exportStar(OM(),we);Qe.__exportStar(LT(),we);Qe.__exportStar(lS(),we);Qe.__exportStar(DM(),we);Qe.__exportStar(AM(),we);Qe.__exportStar(cO(),we);var rE=Jf();Object.defineProperty(we,"mapAsyncIterator",{enumerable:!0,get:function(){return rE.mapAsyncIterator}});Object.defineProperty(we,"mapMaybePromise",{enumerable:!0,get:function(){return rE.mapMaybePromise}});Object.defineProperty(we,"fakePromise",{enumerable:!0,get:function(){return rE.fakePromise}});Object.defineProperty(we,"createDeferred",{enumerable:!0,get:function(){return rE.createDeferredPromise}});Qe.__exportStar(FM(),we)});var LM=F(iE=>{"use strict";m();T();N();Object.defineProperty(iE,"__esModule",{value:!0});iE.mergeResolvers=void 0;var Pre=va();function wM(e,t){if(!e||Array.isArray(e)&&e.length===0)return{};if(!Array.isArray(e))return e;if(e.length===1)return e[0]||{};let n=new Array;for(let i of e)Array.isArray(i)&&(i=wM(i)),typeof i=="object"&&i&&n.push(i);let r=(0,Pre.mergeDeep)(n,!0);if(t!=null&&t.exclusions)for(let i of t.exclusions){let[a,o]=i.split(".");!o||o==="*"?delete r[a]:r[a]&&delete r[a][o]}return r}iE.mergeResolvers=wM});var DS=F(aE=>{"use strict";m();T();N();Object.defineProperty(aE,"__esModule",{value:!0});aE.mergeArguments=void 0;var CM=va();function Fre(e,t,n){let r=wre([...t,...e].filter(CM.isSome),n);return n&&n.sort&&r.sort(CM.compareNodes),r}aE.mergeArguments=Fre;function wre(e,t){return e.reduce((n,r)=>{let i=n.findIndex(a=>a.name.value===r.name.value);return i===-1?n.concat([r]):(t!=null&&t.reverseArguments||(n[i]=r),n)},[])}});var Zi=F(ad=>{"use strict";m();T();N();Object.defineProperty(ad,"__esModule",{value:!0});ad.mergeDirective=ad.mergeDirectives=void 0;var BM=_e(),Lre=va();function Cre(e,t){return!!e.find(n=>n.name.value===t.name.value)}function UM(e,t){var n;return!!((n=t==null?void 0:t[e.name.value])!=null&&n.repeatable)}function Bre(e,t){return t.some(({value:n})=>n===e.value)}function kM(e,t){let n=[...t];for(let r of e){let i=n.findIndex(a=>a.name.value===r.name.value);if(i>-1){let a=n[i];if(a.value.kind==="ListValue"){let o=a.value.values,u=r.value.values;a.value.values=qre(o,u,(l,d)=>{let p=l.value;return!p||!d.some(E=>E.value===p)})}else a.value=r.value}else n.push(r)}return n}function Ure(e,t){return e.map((n,r,i)=>{let a=i.findIndex(o=>o.name.value===n.name.value);if(a!==r&&!UM(n,t)){let o=i[a];return n.arguments=kM(n.arguments,o.arguments),null}return n}).filter(Lre.isSome)}function kre(e=[],t=[],n,r){let i=n&&n.reverseDirectives,a=i?e:t,o=i?t:e,u=Ure([...a],r);for(let l of o)if(Cre(u,l)&&!UM(l,r)){let d=u.findIndex(E=>E.name.value===l.name.value),p=u[d];u[d].arguments=kM(l.arguments||[],p.arguments||[])}else u.push(l);return u}ad.mergeDirectives=kre;function Mre(e,t){let n=(0,BM.print)($(k({},e),{description:void 0})),r=(0,BM.print)($(k({},t),{description:void 0})),i=new RegExp("(directive @w*d*)|( on .*$)","g");if(!(n.replace(i,"")===r.replace(i,"")))throw new Error(`Unable to merge GraphQL directive "${e.name.value}". Existing directive: ${r} Received directive: - ${n}`)}function Cre(e,t){return t?(Lre(e,t),$(k({},e),{locations:[...t.locations,...e.locations.filter(n=>!Pre(n,t.locations))]})):e}ad.mergeDirective=Cre;function Bre(e,t,n){return e.concat(t.filter(r=>n(r,e)))}});var bS=w(sE=>{"use strict";m();T();N();Object.defineProperty(sE,"__esModule",{value:!0});sE.mergeEnumValues=void 0;var Ure=Zi(),kre=va();function Mre(e,t,n,r){if(n!=null&&n.consistentEnumMerge){let o=[];e&&o.push(...e),e=t,t=o}let i=new Map;if(e)for(let o of e)i.set(o.name.value,o);if(t)for(let o of t){let u=o.name.value;if(i.has(u)){let l=i.get(u);l.description=o.description||l.description,l.directives=(0,Ure.mergeDirectives)(o.directives,l.directives,r)}else i.set(u,o)}let a=[...i.values()];return n&&n.sort&&a.sort(kre.compareNodes),a}sE.mergeEnumValues=Mre});var AS=w(oE=>{"use strict";m();T();N();Object.defineProperty(oE,"__esModule",{value:!0});oE.mergeEnum=void 0;var xre=Ie(),qre=Zi(),Vre=bS();function jre(e,t,n,r){return t?{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="EnumTypeDefinition"||t.kind==="EnumTypeDefinition"?"EnumTypeDefinition":"EnumTypeExtension",loc:e.loc,directives:(0,qre.mergeDirectives)(e.directives,t.directives,n,r),values:(0,Vre.mergeEnumValues)(e.values,t.values,n)}:n!=null&&n.convertExtensions?$(k({},e),{kind:xre.Kind.ENUM_TYPE_DEFINITION}):e}oE.mergeEnum=jre});var uE=w(Kn=>{"use strict";m();T();N();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.defaultStringComparator=Kn.CompareVal=Kn.printTypeNode=Kn.isNonNullTypeNode=Kn.isListTypeNode=Kn.isWrappingTypeNode=Kn.extractType=Kn.isSourceTypes=Kn.isStringTypes=void 0;var up=Ie();function Kre(e){return typeof e=="string"}Kn.isStringTypes=Kre;function $re(e){return e instanceof up.Source}Kn.isSourceTypes=$re;function Gre(e){let t=e;for(;t.kind===up.Kind.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}Kn.extractType=Gre;function Qre(e){return e.kind!==up.Kind.NAMED_TYPE}Kn.isWrappingTypeNode=Qre;function MM(e){return e.kind===up.Kind.LIST_TYPE}Kn.isListTypeNode=MM;function xM(e){return e.kind===up.Kind.NON_NULL_TYPE}Kn.isNonNullTypeNode=xM;function RS(e){return MM(e)?`[${RS(e.type)}]`:xM(e)?`${RS(e.type)}!`:e.name.value}Kn.printTypeNode=RS;var Lc;(function(e){e[e.A_SMALLER_THAN_B=-1]="A_SMALLER_THAN_B",e[e.A_EQUALS_B=0]="A_EQUALS_B",e[e.A_GREATER_THAN_B=1]="A_GREATER_THAN_B"})(Lc=Kn.CompareVal||(Kn.CompareVal={}));function Yre(e,t){return e==null&&t==null?Lc.A_EQUALS_B:e==null?Lc.A_SMALLER_THAN_B:t==null?Lc.A_GREATER_THAN_B:et?Lc.A_GREATER_THAN_B:Lc.A_EQUALS_B}Kn.defaultStringComparator=Yre});var lp=w(cE=>{"use strict";m();T();N();Object.defineProperty(cE,"__esModule",{value:!0});cE.mergeFields=void 0;var ri=uE(),Jre=Zi(),Hre=va(),zre=DS();function Wre(e,t){let n=e.findIndex(r=>r.name.value===t.name.value);return[n>-1?e[n]:null,n]}function Xre(e,t,n,r,i){let a=[];if(n!=null&&a.push(...n),t!=null)for(let o of t){let[u,l]=Wre(a,o);if(u&&!(r!=null&&r.ignoreFieldConflicts)){let d=(r==null?void 0:r.onFieldTypeConflict)&&r.onFieldTypeConflict(u,o,e,r==null?void 0:r.throwOnConflict)||Zre(e,u,o,r==null?void 0:r.throwOnConflict);d.arguments=(0,zre.mergeArguments)(o.arguments||[],u.arguments||[],r),d.directives=(0,Jre.mergeDirectives)(o.directives,u.directives,r,i),d.description=o.description||u.description,a[l]=d}else a.push(o)}if(r&&r.sort&&a.sort(Hre.compareNodes),r&&r.exclusions){let o=r.exclusions;return a.filter(u=>!o.includes(`${e.name.value}.${u.name.value}`))}return a}cE.mergeFields=Xre;function Zre(e,t,n,r=!1){let i=(0,ri.printTypeNode)(t.type),a=(0,ri.printTypeNode)(n.type);if(i!==a){let o=(0,ri.extractType)(t.type),u=(0,ri.extractType)(n.type);if(o.name.value!==u.name.value)throw new Error(`Field "${n.name.value}" already defined with a different type. Declared as "${o.name.value}", but you tried to override with "${u.name.value}"`);if(!cp(t.type,n.type,!r))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${i}' to '${a}'`)}return(0,ri.isNonNullTypeNode)(n.type)&&!(0,ri.isNonNullTypeNode)(t.type)&&(t.type=n.type),t}function cp(e,t,n=!1){if(!(0,ri.isWrappingTypeNode)(e)&&!(0,ri.isWrappingTypeNode)(t))return e.toString()===t.toString();if((0,ri.isNonNullTypeNode)(t)){let r=(0,ri.isNonNullTypeNode)(e)?e.type:e;return cp(r,t.type)}return(0,ri.isNonNullTypeNode)(e)?cp(t,e,n):(0,ri.isListTypeNode)(e)?(0,ri.isListTypeNode)(t)&&cp(e.type,t.type)||(0,ri.isNonNullTypeNode)(t)&&cp(e,t.type):!1}});var PS=w(lE=>{"use strict";m();T();N();Object.defineProperty(lE,"__esModule",{value:!0});lE.mergeInputType=void 0;var eie=Ie(),tie=lp(),nie=Zi();function rie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="InputObjectTypeDefinition"||t.kind==="InputObjectTypeDefinition"?"InputObjectTypeDefinition":"InputObjectTypeExtension",loc:e.loc,fields:(0,tie.mergeFields)(e,e.fields,t.fields,n),directives:(0,nie.mergeDirectives)(e.directives,t.directives,n,r)}}catch(i){throw new Error(`Unable to merge GraphQL input type "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?$(k({},e),{kind:eie.Kind.INPUT_OBJECT_TYPE_DEFINITION}):e}lE.mergeInputType=rie});var dp=w(dE=>{"use strict";m();T();N();Object.defineProperty(dE,"__esModule",{value:!0});dE.mergeNamedTypeArray=void 0;var iie=va();function aie(e,t){return!!e.find(n=>n.name.value===t.name.value)}function sie(e=[],t=[],n={}){let r=[...t,...e.filter(i=>!aie(t,i))];return n&&n.sort&&r.sort(iie.compareNodes),r}dE.mergeNamedTypeArray=sie});var FS=w(fE=>{"use strict";m();T();N();Object.defineProperty(fE,"__esModule",{value:!0});fE.mergeInterface=void 0;var oie=Ie(),uie=lp(),cie=Zi(),lie=dp();function die(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="InterfaceTypeDefinition"||t.kind==="InterfaceTypeDefinition"?"InterfaceTypeDefinition":"InterfaceTypeExtension",loc:e.loc,fields:(0,uie.mergeFields)(e,e.fields,t.fields,n),directives:(0,cie.mergeDirectives)(e.directives,t.directives,n,r),interfaces:e.interfaces?(0,lie.mergeNamedTypeArray)(e.interfaces,t.interfaces,n):void 0}}catch(i){throw new Error(`Unable to merge GraphQL interface "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?$(k({},e),{kind:oie.Kind.INTERFACE_TYPE_DEFINITION}):e}fE.mergeInterface=die});var wS=w(pE=>{"use strict";m();T();N();Object.defineProperty(pE,"__esModule",{value:!0});pE.mergeType=void 0;var fie=Ie(),pie=lp(),mie=Zi(),Nie=dp();function Tie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="ObjectTypeDefinition"||t.kind==="ObjectTypeDefinition"?"ObjectTypeDefinition":"ObjectTypeExtension",loc:e.loc,fields:(0,pie.mergeFields)(e,e.fields,t.fields,n),directives:(0,mie.mergeDirectives)(e.directives,t.directives,n,r),interfaces:(0,Nie.mergeNamedTypeArray)(e.interfaces,t.interfaces,n)}}catch(i){throw new Error(`Unable to merge GraphQL type "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?$(k({},e),{kind:fie.Kind.OBJECT_TYPE_DEFINITION}):e}pE.mergeType=Tie});var LS=w(mE=>{"use strict";m();T();N();Object.defineProperty(mE,"__esModule",{value:!0});mE.mergeScalar=void 0;var Eie=Ie(),hie=Zi();function yie(e,t,n,r){return t?{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="ScalarTypeDefinition"||t.kind==="ScalarTypeDefinition"?"ScalarTypeDefinition":"ScalarTypeExtension",loc:e.loc,directives:(0,hie.mergeDirectives)(e.directives,t.directives,n,r)}:n!=null&&n.convertExtensions?$(k({},e),{kind:Eie.Kind.SCALAR_TYPE_DEFINITION}):e}mE.mergeScalar=yie});var BS=w(NE=>{"use strict";m();T();N();Object.defineProperty(NE,"__esModule",{value:!0});NE.mergeUnion=void 0;var CS=Ie(),Iie=Zi(),gie=dp();function _ie(e,t,n,r){return t?{name:e.name,description:e.description||t.description,directives:(0,Iie.mergeDirectives)(e.directives,t.directives,n,r),kind:n!=null&&n.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?CS.Kind.UNION_TYPE_DEFINITION:CS.Kind.UNION_TYPE_EXTENSION,loc:e.loc,types:(0,gie.mergeNamedTypeArray)(e.types,t.types,n)}:n!=null&&n.convertExtensions?$(k({},e),{kind:CS.Kind.UNION_TYPE_DEFINITION}):e}NE.mergeUnion=_ie});var US=w(Cc=>{"use strict";m();T();N();Object.defineProperty(Cc,"__esModule",{value:!0});Cc.mergeSchemaDefs=Cc.DEFAULT_OPERATION_TYPE_NAME_MAP=void 0;var fp=Ie(),vie=Zi();Cc.DEFAULT_OPERATION_TYPE_NAME_MAP={query:"Query",mutation:"Mutation",subscription:"Subscription"};function Oie(e=[],t=[]){let n=[];for(let r in Cc.DEFAULT_OPERATION_TYPE_NAME_MAP){let i=e.find(a=>a.operation===r)||t.find(a=>a.operation===r);i&&n.push(i)}return n}function Sie(e,t,n,r){return t?{kind:e.kind===fp.Kind.SCHEMA_DEFINITION||t.kind===fp.Kind.SCHEMA_DEFINITION?fp.Kind.SCHEMA_DEFINITION:fp.Kind.SCHEMA_EXTENSION,description:e.description||t.description,directives:(0,vie.mergeDirectives)(e.directives,t.directives,n,r),operationTypes:Oie(e.operationTypes,t.operationTypes)}:n!=null&&n.convertExtensions?$(k({},e),{kind:fp.Kind.SCHEMA_DEFINITION}):e}Cc.mergeSchemaDefs=Sie});var kS=w(rs=>{"use strict";m();T();N();Object.defineProperty(rs,"__esModule",{value:!0});rs.mergeGraphQLNodes=rs.isNamedDefinitionNode=rs.schemaDefSymbol=void 0;var Kr=Ie(),Die=wS(),bie=AS(),Aie=LS(),Rie=BS(),Pie=PS(),Fie=FS(),wie=Zi(),Lie=US(),Cie=va();rs.schemaDefSymbol="SCHEMA_DEF_SYMBOL";function qM(e){return"name"in e}rs.isNamedDefinitionNode=qM;function Bie(e,t,n={}){var i,a,o;let r=n;for(let u of e)if(qM(u)){let l=(i=u.name)==null?void 0:i.value;if(t!=null&&t.commentDescriptions&&(0,Cie.collectComment)(u),l==null)continue;if((a=t==null?void 0:t.exclusions)!=null&&a.includes(l+".*")||(o=t==null?void 0:t.exclusions)!=null&&o.includes(l))delete r[l];else switch(u.kind){case Kr.Kind.OBJECT_TYPE_DEFINITION:case Kr.Kind.OBJECT_TYPE_EXTENSION:r[l]=(0,Die.mergeType)(u,r[l],t,n);break;case Kr.Kind.ENUM_TYPE_DEFINITION:case Kr.Kind.ENUM_TYPE_EXTENSION:r[l]=(0,bie.mergeEnum)(u,r[l],t,n);break;case Kr.Kind.UNION_TYPE_DEFINITION:case Kr.Kind.UNION_TYPE_EXTENSION:r[l]=(0,Rie.mergeUnion)(u,r[l],t,n);break;case Kr.Kind.SCALAR_TYPE_DEFINITION:case Kr.Kind.SCALAR_TYPE_EXTENSION:r[l]=(0,Aie.mergeScalar)(u,r[l],t,n);break;case Kr.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Kr.Kind.INPUT_OBJECT_TYPE_EXTENSION:r[l]=(0,Pie.mergeInputType)(u,r[l],t,n);break;case Kr.Kind.INTERFACE_TYPE_DEFINITION:case Kr.Kind.INTERFACE_TYPE_EXTENSION:r[l]=(0,Fie.mergeInterface)(u,r[l],t,n);break;case Kr.Kind.DIRECTIVE_DEFINITION:r[l]=(0,wie.mergeDirective)(u,r[l]);break}}else(u.kind===Kr.Kind.SCHEMA_DEFINITION||u.kind===Kr.Kind.SCHEMA_EXTENSION)&&(r[rs.schemaDefSymbol]=(0,Lie.mergeSchemaDefs)(u,r[rs.schemaDefSymbol],t));return r}rs.mergeGraphQLNodes=Bie});var KM=w(cd=>{"use strict";m();T();N();Object.defineProperty(cd,"__esModule",{value:!0});cd.mergeGraphQLTypes=cd.mergeTypeDefs=void 0;var ea=Ie(),MS=uE(),sd=kS(),ud=va(),VM=US();function Uie(e,t){(0,ud.resetComments)();let n={kind:ea.Kind.DOCUMENT,definitions:jM(e,k({useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1},t))},r;return t!=null&&t.commentDescriptions?r=(0,ud.printWithComments)(n):r=n,(0,ud.resetComments)(),r}cd.mergeTypeDefs=Uie;function od(e,t,n=[],r=[],i=new Set){if(e&&!i.has(e))if(i.add(e),typeof e=="function")od(e(),t,n,r,i);else if(Array.isArray(e))for(let a of e)od(a,t,n,r,i);else if((0,ea.isSchema)(e)){let a=(0,ud.getDocumentNodeFromSchema)(e,t);od(a.definitions,t,n,r,i)}else if((0,MS.isStringTypes)(e)||(0,MS.isSourceTypes)(e)){let a=(0,ea.parse)(e,t);od(a.definitions,t,n,r,i)}else if(typeof e=="object"&&(0,ea.isDefinitionNode)(e))e.kind===ea.Kind.DIRECTIVE_DEFINITION?n.push(e):r.push(e);else if((0,ud.isDocumentNode)(e))od(e.definitions,t,n,r,i);else throw new Error(`typeDefs must contain only strings, documents, schemas, or functions, got ${typeof e}`);return{allDirectives:n,allNodes:r}}function jM(e,t){var u,l,d;(0,ud.resetComments)();let{allDirectives:n,allNodes:r}=od(e,t),i=(0,sd.mergeGraphQLNodes)(n,t),a=(0,sd.mergeGraphQLNodes)(r,t,i);if(t!=null&&t.useSchemaDefinition){let p=a[sd.schemaDefSymbol]||{kind:ea.Kind.SCHEMA_DEFINITION,operationTypes:[]},E=p.operationTypes;for(let I in VM.DEFAULT_OPERATION_TYPE_NAME_MAP)if(!E.find(A=>A.operation===I)){let A=VM.DEFAULT_OPERATION_TYPE_NAME_MAP[I],U=a[A];U!=null&&U.name!=null&&E.push({kind:ea.Kind.OPERATION_TYPE_DEFINITION,type:{kind:ea.Kind.NAMED_TYPE,name:U.name},operation:I})}((u=p==null?void 0:p.operationTypes)==null?void 0:u.length)!=null&&p.operationTypes.length>0&&(a[sd.schemaDefSymbol]=p)}t!=null&&t.forceSchemaDefinition&&!((d=(l=a[sd.schemaDefSymbol])==null?void 0:l.operationTypes)!=null&&d.length)&&(a[sd.schemaDefSymbol]={kind:ea.Kind.SCHEMA_DEFINITION,operationTypes:[{kind:ea.Kind.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:ea.Kind.NAMED_TYPE,name:{kind:ea.Kind.NAME,value:"Query"}}}]});let o=Object.values(a);if(t!=null&&t.sort){let p=typeof t.sort=="function"?t.sort:MS.defaultStringComparator;o.sort((E,I)=>{var v,A;return p((v=E.name)==null?void 0:v.value,(A=I.name)==null?void 0:A.value)})}return o}cd.mergeGraphQLTypes=jM});var $M=w(Br=>{"use strict";m();T();N();Object.defineProperty(Br,"__esModule",{value:!0});var ii=(Xv(),Gm(Wv));ii.__exportStar(DS(),Br);ii.__exportStar(Zi(),Br);ii.__exportStar(bS(),Br);ii.__exportStar(AS(),Br);ii.__exportStar(lp(),Br);ii.__exportStar(PS(),Br);ii.__exportStar(FS(),Br);ii.__exportStar(dp(),Br);ii.__exportStar(kS(),Br);ii.__exportStar(KM(),Br);ii.__exportStar(LS(),Br);ii.__exportStar(wS(),Br);ii.__exportStar(BS(),Br);ii.__exportStar(uE(),Br)});var QM=w(Fu=>{"use strict";m();T();N();Object.defineProperty(Fu,"__esModule",{value:!0});Fu.applyExtensions=Fu.mergeExtensions=Fu.extractExtensionsFromSchema=void 0;var GM=va(),kie=va();Object.defineProperty(Fu,"extractExtensionsFromSchema",{enumerable:!0,get:function(){return kie.extractExtensionsFromSchema}});function Mie(e){return(0,GM.mergeDeep)(e)}Fu.mergeExtensions=Mie;function ld(e,t){e&&(e.extensions=(0,GM.mergeDeep)([e.extensions||{},t||{}]))}function xie(e,t){ld(e,t.schemaExtensions);for(let[n,r]of Object.entries(t.types||{})){let i=e.getType(n);if(i){if(ld(i,r.extensions),r.type==="object"||r.type==="interface")for(let[a,o]of Object.entries(r.fields)){let u=i.getFields()[a];if(u){ld(u,o.extensions);for(let[l,d]of Object.entries(o.arguments))ld(u.args.find(p=>p.name===l),d)}}else if(r.type==="input")for(let[a,o]of Object.entries(r.fields)){let u=i.getFields()[a];ld(u,o.extensions)}else if(r.type==="enum")for(let[a,o]of Object.entries(r.values)){let u=i.getValue(a);ld(u,o)}}}return e}Fu.applyExtensions=xie});var TE=w(pp=>{"use strict";m();T();N();Object.defineProperty(pp,"__esModule",{value:!0});var xS=(Xv(),Gm(Wv));xS.__exportStar(LM(),pp);xS.__exportStar($M(),pp);xS.__exportStar(QM(),pp)});var $i=w(z=>{"use strict";m();T();N();Object.defineProperty(z,"__esModule",{value:!0});z.semanticNonNullArgumentErrorMessage=z.invalidEventProviderIdErrorMessage=z.invalidNatsStreamConfigurationDefinitionErrorMessage=z.invalidEdfsPublishResultObjectErrorMessage=z.invalidNatsStreamInputErrorMessage=z.inlineFragmentInFieldSetErrorMessage=z.inaccessibleQueryRootTypeError=z.subgraphValidationFailureError=z.minimumSubgraphRequirementError=void 0;z.multipleNamedTypeDefinitionError=jie;z.incompatibleInputValueDefaultValueTypeError=Kie;z.incompatibleMergedTypesError=$ie;z.incompatibleInputValueDefaultValuesError=Gie;z.incompatibleSharedEnumError=Qie;z.invalidSubgraphNamesError=Yie;z.duplicateDirectiveDefinitionError=Jie;z.duplicateEnumValueDefinitionError=Hie;z.duplicateFieldDefinitionError=zie;z.duplicateInputFieldDefinitionError=Wie;z.duplicateImplementedInterfaceError=Xie;z.duplicateUnionMemberDefinitionError=Zie;z.duplicateTypeDefinitionError=eae;z.duplicateOperationTypeDefinitionError=tae;z.noBaseDefinitionForExtensionError=nae;z.noBaseScalarDefinitionError=rae;z.noDefinedUnionMembersError=iae;z.noDefinedEnumValuesError=aae;z.operationDefinitionError=sae;z.invalidFieldShareabilityError=oae;z.undefinedDirectiveError=uae;z.undefinedTypeError=cae;z.invalidRepeatedDirectiveErrorMessage=lae;z.invalidDirectiveError=dae;z.invalidRepeatedFederatedDirectiveErrorMessage=fae;z.invalidDirectiveLocationErrorMessage=pae;z.undefinedRequiredArgumentsErrorMessage=mae;z.unexpectedDirectiveArgumentErrorMessage=Nae;z.duplicateDirectiveArgumentDefinitionsErrorMessage=Tae;z.invalidArgumentValueErrorMessage=Eae;z.maximumTypeNestingExceededError=hae;z.unexpectedKindFatalError=yae;z.incompatibleParentKindFatalError=Iae;z.unexpectedEdgeFatalError=gae;z.incompatibleParentTypeMergeError=vae;z.unexpectedTypeNodeKindFatalError=Oae;z.invalidKeyFatalError=Sae;z.unexpectedParentKindForChildError=Dae;z.subgraphValidationError=bae;z.invalidSubgraphNameErrorMessage=Aae;z.invalidOperationTypeDefinitionError=Rae;z.invalidRootTypeDefinitionError=Pae;z.subgraphInvalidSyntaxError=Fae;z.invalidInterfaceImplementationError=wae;z.invalidRequiredInputValueError=Lae;z.duplicateArgumentsError=Cae;z.noQueryRootTypeError=Bae;z.expectedEntityError=Uae;z.abstractTypeInKeyFieldSetErrorMessage=kae;z.unknownTypeInFieldSetErrorMessage=Mae;z.invalidSelectionSetErrorMessage=xae;z.invalidSelectionSetDefinitionErrorMessage=qae;z.undefinedFieldInFieldSetErrorMessage=Vae;z.unparsableFieldSetErrorMessage=jae;z.unparsableFieldSetSelectionErrorMessage=Kae;z.undefinedCompositeOutputTypeError=$ae;z.unexpectedArgumentErrorMessage=Gae;z.argumentsInKeyFieldSetErrorMessage=Qae;z.invalidProvidesOrRequiresDirectivesError=Yae;z.duplicateFieldInFieldSetErrorMessage=Jae;z.invalidConfigurationDataErrorMessage=Hae;z.incompatibleTypeWithProvidesErrorMessage=zae;z.invalidInlineFragmentTypeErrorMessage=Wae;z.inlineFragmentWithoutTypeConditionErrorMessage=Xae;z.unknownInlineFragmentTypeConditionErrorMessage=Zae;z.invalidInlineFragmentTypeConditionTypeErrorMessage=ese;z.invalidInlineFragmentTypeConditionErrorMessage=tse;z.invalidSelectionOnUnionErrorMessage=nse;z.duplicateOverriddenFieldErrorMessage=rse;z.duplicateOverriddenFieldsError=ise;z.noFieldDefinitionsError=ase;z.noInputValueDefinitionsError=sse;z.allChildDefinitionsAreInaccessibleError=ose;z.equivalentSourceAndTargetOverrideErrorMessage=use;z.undefinedEntityInterfaceImplementationsError=cse;z.orScopesLimitError=lse;z.invalidEventDrivenGraphError=dse;z.invalidRootTypeFieldEventsDirectivesErrorMessage=fse;z.invalidEventDrivenMutationResponseTypeErrorMessage=pse;z.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage=mse;z.invalidNatsStreamInputFieldsErrorMessage=Nse;z.invalidKeyFieldSetsEventDrivenErrorMessage=Tse;z.nonExternalKeyFieldNamesEventDrivenErrorMessage=Ese;z.nonKeyFieldNamesEventDrivenErrorMessage=hse;z.nonEntityObjectExtensionsEventDrivenErrorMessage=yse;z.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage=Ise;z.invalidEdfsDirectiveName=gse;z.invalidImplementedTypeError=_se;z.selfImplementationError=vse;z.invalidEventSubjectErrorMessage=Ose;z.invalidEventSubjectsErrorMessage=Sse;z.invalidEventSubjectsItemErrorMessage=Dse;z.invalidEventSubjectsArgumentErrorMessage=bse;z.undefinedEventSubjectsArgumentErrorMessage=Ase;z.invalidEventDirectiveError=Rse;z.invalidReferencesOfInaccessibleTypeError=Pse;z.inaccessibleRequiredInputValueError=Fse;z.invalidUnionMemberTypeError=wse;z.invalidRootTypeError=Lse;z.invalidSubscriptionFilterLocationError=Cse;z.invalidSubscriptionFilterDirectiveError=Bse;z.subscriptionFilterNamedTypeErrorMessage=Use;z.subscriptionFilterConditionDepthExceededErrorMessage=kse;z.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage=Mse;z.subscriptionFilterConditionInvalidInputFieldErrorMessage=xse;z.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage=qse;z.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage=Vse;z.subscriptionFilterArrayConditionInvalidLengthErrorMessage=jse;z.invalidInputFieldTypeErrorMessage=Kse;z.subscriptionFieldConditionInvalidInputFieldErrorMessage=$se;z.subscriptionFieldConditionInvalidValuesArrayErrorMessage=Gse;z.subscriptionFieldConditionEmptyValuesArrayErrorMessage=Qse;z.unknownFieldSubgraphNameError=Yse;z.invalidSubscriptionFieldConditionFieldPathErrorMessage=Jse;z.invalidSubscriptionFieldConditionFieldPathParentErrorMessage=Hse;z.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage=zse;z.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage=Wse;z.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage=Xse;z.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage=Zse;z.unresolvablePathError=eoe;z.allExternalFieldInstancesError=toe;z.externalInterfaceFieldsError=noe;z.nonExternalConditionalFieldError=roe;z.incompatibleFederatedFieldNamedTypeError=ioe;z.unknownNamedTypeErrorMessage=XM;z.unknownNamedTypeError=aoe;z.unknownFieldDataError=soe;z.unexpectedNonCompositeOutputTypeError=ooe;z.invalidExternalDirectiveError=uoe;z.configureDescriptionNoDescriptionError=coe;z.configureDescriptionPropagationError=loe;z.duplicateDirectiveDefinitionArgumentErrorMessage=doe;z.duplicateDirectiveDefinitionLocationErrorMessage=foe;z.invalidDirectiveDefinitionLocationErrorMessage=poe;z.invalidDirectiveDefinitionError=moe;z.typeNameAlreadyProvidedErrorMessage=Noe;z.fieldAlreadyProvidedErrorMessage=Toe;z.invalidInterfaceObjectImplementationDefinitionsError=Eoe;z.invalidNamedTypeError=hoe;z.semanticNonNullLevelsNaNIndexErrorMessage=yoe;z.semanticNonNullLevelsIndexOutOfBoundsErrorMessage=Ioe;z.semanticNonNullLevelsNonNullErrorMessage=goe;z.semanticNonNullInconsistentLevelsError=_oe;z.oneOfRequiredFieldsError=voe;var YM=Ie(),Ye=zn(),JM=ql(),Bc=wr(),qie=$l(),Vie=TE();z.minimumSubgraphRequirementError=new Error("At least one subgraph is required for federation.");function jie(e,t,n){return new Error(`The named type "${e}" is defined as both types "${t}" and "${n}". -However, there must be only one type named "${e}".`)}function Kie(e,t,n,r){return new Error(`The ${e} of type "${n}" defined on path "${t}" is incompatible with the default value of "${r}".`)}function $ie({actualType:e,coords:t,expectedType:n,isArgument:r}){return new Error(`Incompatible types when merging two instances of ${r?"field argument":Ye.FIELD} "${t}": - Expected type "${n}" but received "${e}".`)}function Gie(e,t,n,r,i){return new Error(`Expected the ${e} defined on path "${t}" to define the default value "${r}". + ${n}`)}function xre(e,t){return t?(Mre(e,t),$(k({},e),{locations:[...t.locations,...e.locations.filter(n=>!Bre(n,t.locations))]})):e}ad.mergeDirective=xre;function qre(e,t,n){return e.concat(t.filter(r=>n(r,e)))}});var bS=F(sE=>{"use strict";m();T();N();Object.defineProperty(sE,"__esModule",{value:!0});sE.mergeEnumValues=void 0;var Vre=Zi(),jre=va();function Kre(e,t,n,r){if(n!=null&&n.consistentEnumMerge){let o=[];e&&o.push(...e),e=t,t=o}let i=new Map;if(e)for(let o of e)i.set(o.name.value,o);if(t)for(let o of t){let u=o.name.value;if(i.has(u)){let l=i.get(u);l.description=o.description||l.description,l.directives=(0,Vre.mergeDirectives)(o.directives,l.directives,r)}else i.set(u,o)}let a=[...i.values()];return n&&n.sort&&a.sort(jre.compareNodes),a}sE.mergeEnumValues=Kre});var AS=F(oE=>{"use strict";m();T();N();Object.defineProperty(oE,"__esModule",{value:!0});oE.mergeEnum=void 0;var $re=_e(),Gre=Zi(),Qre=bS();function Yre(e,t,n,r){return t?{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="EnumTypeDefinition"||t.kind==="EnumTypeDefinition"?"EnumTypeDefinition":"EnumTypeExtension",loc:e.loc,directives:(0,Gre.mergeDirectives)(e.directives,t.directives,n,r),values:(0,Qre.mergeEnumValues)(e.values,t.values,n)}:n!=null&&n.convertExtensions?$(k({},e),{kind:$re.Kind.ENUM_TYPE_DEFINITION}):e}oE.mergeEnum=Yre});var uE=F(Kn=>{"use strict";m();T();N();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.defaultStringComparator=Kn.CompareVal=Kn.printTypeNode=Kn.isNonNullTypeNode=Kn.isListTypeNode=Kn.isWrappingTypeNode=Kn.extractType=Kn.isSourceTypes=Kn.isStringTypes=void 0;var up=_e();function Jre(e){return typeof e=="string"}Kn.isStringTypes=Jre;function Hre(e){return e instanceof up.Source}Kn.isSourceTypes=Hre;function zre(e){let t=e;for(;t.kind===up.Kind.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}Kn.extractType=zre;function Wre(e){return e.kind!==up.Kind.NAMED_TYPE}Kn.isWrappingTypeNode=Wre;function MM(e){return e.kind===up.Kind.LIST_TYPE}Kn.isListTypeNode=MM;function xM(e){return e.kind===up.Kind.NON_NULL_TYPE}Kn.isNonNullTypeNode=xM;function RS(e){return MM(e)?`[${RS(e.type)}]`:xM(e)?`${RS(e.type)}!`:e.name.value}Kn.printTypeNode=RS;var Lc;(function(e){e[e.A_SMALLER_THAN_B=-1]="A_SMALLER_THAN_B",e[e.A_EQUALS_B=0]="A_EQUALS_B",e[e.A_GREATER_THAN_B=1]="A_GREATER_THAN_B"})(Lc=Kn.CompareVal||(Kn.CompareVal={}));function Xre(e,t){return e==null&&t==null?Lc.A_EQUALS_B:e==null?Lc.A_SMALLER_THAN_B:t==null?Lc.A_GREATER_THAN_B:et?Lc.A_GREATER_THAN_B:Lc.A_EQUALS_B}Kn.defaultStringComparator=Xre});var lp=F(cE=>{"use strict";m();T();N();Object.defineProperty(cE,"__esModule",{value:!0});cE.mergeFields=void 0;var ri=uE(),Zre=Zi(),eie=va(),tie=DS();function nie(e,t){let n=e.findIndex(r=>r.name.value===t.name.value);return[n>-1?e[n]:null,n]}function rie(e,t,n,r,i){let a=[];if(n!=null&&a.push(...n),t!=null)for(let o of t){let[u,l]=nie(a,o);if(u&&!(r!=null&&r.ignoreFieldConflicts)){let d=(r==null?void 0:r.onFieldTypeConflict)&&r.onFieldTypeConflict(u,o,e,r==null?void 0:r.throwOnConflict)||iie(e,u,o,r==null?void 0:r.throwOnConflict);d.arguments=(0,tie.mergeArguments)(o.arguments||[],u.arguments||[],r),d.directives=(0,Zre.mergeDirectives)(o.directives,u.directives,r,i),d.description=o.description||u.description,a[l]=d}else a.push(o)}if(r&&r.sort&&a.sort(eie.compareNodes),r&&r.exclusions){let o=r.exclusions;return a.filter(u=>!o.includes(`${e.name.value}.${u.name.value}`))}return a}cE.mergeFields=rie;function iie(e,t,n,r=!1){let i=(0,ri.printTypeNode)(t.type),a=(0,ri.printTypeNode)(n.type);if(i!==a){let o=(0,ri.extractType)(t.type),u=(0,ri.extractType)(n.type);if(o.name.value!==u.name.value)throw new Error(`Field "${n.name.value}" already defined with a different type. Declared as "${o.name.value}", but you tried to override with "${u.name.value}"`);if(!cp(t.type,n.type,!r))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${i}' to '${a}'`)}return(0,ri.isNonNullTypeNode)(n.type)&&!(0,ri.isNonNullTypeNode)(t.type)&&(t.type=n.type),t}function cp(e,t,n=!1){if(!(0,ri.isWrappingTypeNode)(e)&&!(0,ri.isWrappingTypeNode)(t))return e.toString()===t.toString();if((0,ri.isNonNullTypeNode)(t)){let r=(0,ri.isNonNullTypeNode)(e)?e.type:e;return cp(r,t.type)}return(0,ri.isNonNullTypeNode)(e)?cp(t,e,n):(0,ri.isListTypeNode)(e)?(0,ri.isListTypeNode)(t)&&cp(e.type,t.type)||(0,ri.isNonNullTypeNode)(t)&&cp(e,t.type):!1}});var PS=F(lE=>{"use strict";m();T();N();Object.defineProperty(lE,"__esModule",{value:!0});lE.mergeInputType=void 0;var aie=_e(),sie=lp(),oie=Zi();function uie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="InputObjectTypeDefinition"||t.kind==="InputObjectTypeDefinition"?"InputObjectTypeDefinition":"InputObjectTypeExtension",loc:e.loc,fields:(0,sie.mergeFields)(e,e.fields,t.fields,n),directives:(0,oie.mergeDirectives)(e.directives,t.directives,n,r)}}catch(i){throw new Error(`Unable to merge GraphQL input type "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?$(k({},e),{kind:aie.Kind.INPUT_OBJECT_TYPE_DEFINITION}):e}lE.mergeInputType=uie});var dp=F(dE=>{"use strict";m();T();N();Object.defineProperty(dE,"__esModule",{value:!0});dE.mergeNamedTypeArray=void 0;var cie=va();function lie(e,t){return!!e.find(n=>n.name.value===t.name.value)}function die(e=[],t=[],n={}){let r=[...t,...e.filter(i=>!lie(t,i))];return n&&n.sort&&r.sort(cie.compareNodes),r}dE.mergeNamedTypeArray=die});var FS=F(fE=>{"use strict";m();T();N();Object.defineProperty(fE,"__esModule",{value:!0});fE.mergeInterface=void 0;var fie=_e(),pie=lp(),mie=Zi(),Nie=dp();function Tie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="InterfaceTypeDefinition"||t.kind==="InterfaceTypeDefinition"?"InterfaceTypeDefinition":"InterfaceTypeExtension",loc:e.loc,fields:(0,pie.mergeFields)(e,e.fields,t.fields,n),directives:(0,mie.mergeDirectives)(e.directives,t.directives,n,r),interfaces:e.interfaces?(0,Nie.mergeNamedTypeArray)(e.interfaces,t.interfaces,n):void 0}}catch(i){throw new Error(`Unable to merge GraphQL interface "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?$(k({},e),{kind:fie.Kind.INTERFACE_TYPE_DEFINITION}):e}fE.mergeInterface=Tie});var wS=F(pE=>{"use strict";m();T();N();Object.defineProperty(pE,"__esModule",{value:!0});pE.mergeType=void 0;var Eie=_e(),hie=lp(),yie=Zi(),Iie=dp();function gie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="ObjectTypeDefinition"||t.kind==="ObjectTypeDefinition"?"ObjectTypeDefinition":"ObjectTypeExtension",loc:e.loc,fields:(0,hie.mergeFields)(e,e.fields,t.fields,n),directives:(0,yie.mergeDirectives)(e.directives,t.directives,n,r),interfaces:(0,Iie.mergeNamedTypeArray)(e.interfaces,t.interfaces,n)}}catch(i){throw new Error(`Unable to merge GraphQL type "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?$(k({},e),{kind:Eie.Kind.OBJECT_TYPE_DEFINITION}):e}pE.mergeType=gie});var LS=F(mE=>{"use strict";m();T();N();Object.defineProperty(mE,"__esModule",{value:!0});mE.mergeScalar=void 0;var _ie=_e(),vie=Zi();function Oie(e,t,n,r){return t?{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="ScalarTypeDefinition"||t.kind==="ScalarTypeDefinition"?"ScalarTypeDefinition":"ScalarTypeExtension",loc:e.loc,directives:(0,vie.mergeDirectives)(e.directives,t.directives,n,r)}:n!=null&&n.convertExtensions?$(k({},e),{kind:_ie.Kind.SCALAR_TYPE_DEFINITION}):e}mE.mergeScalar=Oie});var BS=F(NE=>{"use strict";m();T();N();Object.defineProperty(NE,"__esModule",{value:!0});NE.mergeUnion=void 0;var CS=_e(),Sie=Zi(),Die=dp();function bie(e,t,n,r){return t?{name:e.name,description:e.description||t.description,directives:(0,Sie.mergeDirectives)(e.directives,t.directives,n,r),kind:n!=null&&n.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?CS.Kind.UNION_TYPE_DEFINITION:CS.Kind.UNION_TYPE_EXTENSION,loc:e.loc,types:(0,Die.mergeNamedTypeArray)(e.types,t.types,n)}:n!=null&&n.convertExtensions?$(k({},e),{kind:CS.Kind.UNION_TYPE_DEFINITION}):e}NE.mergeUnion=bie});var US=F(Cc=>{"use strict";m();T();N();Object.defineProperty(Cc,"__esModule",{value:!0});Cc.mergeSchemaDefs=Cc.DEFAULT_OPERATION_TYPE_NAME_MAP=void 0;var fp=_e(),Aie=Zi();Cc.DEFAULT_OPERATION_TYPE_NAME_MAP={query:"Query",mutation:"Mutation",subscription:"Subscription"};function Rie(e=[],t=[]){let n=[];for(let r in Cc.DEFAULT_OPERATION_TYPE_NAME_MAP){let i=e.find(a=>a.operation===r)||t.find(a=>a.operation===r);i&&n.push(i)}return n}function Pie(e,t,n,r){return t?{kind:e.kind===fp.Kind.SCHEMA_DEFINITION||t.kind===fp.Kind.SCHEMA_DEFINITION?fp.Kind.SCHEMA_DEFINITION:fp.Kind.SCHEMA_EXTENSION,description:e.description||t.description,directives:(0,Aie.mergeDirectives)(e.directives,t.directives,n,r),operationTypes:Rie(e.operationTypes,t.operationTypes)}:n!=null&&n.convertExtensions?$(k({},e),{kind:fp.Kind.SCHEMA_DEFINITION}):e}Cc.mergeSchemaDefs=Pie});var kS=F(rs=>{"use strict";m();T();N();Object.defineProperty(rs,"__esModule",{value:!0});rs.mergeGraphQLNodes=rs.isNamedDefinitionNode=rs.schemaDefSymbol=void 0;var Kr=_e(),Fie=wS(),wie=AS(),Lie=LS(),Cie=BS(),Bie=PS(),Uie=FS(),kie=Zi(),Mie=US(),xie=va();rs.schemaDefSymbol="SCHEMA_DEF_SYMBOL";function qM(e){return"name"in e}rs.isNamedDefinitionNode=qM;function qie(e,t,n={}){var i,a,o;let r=n;for(let u of e)if(qM(u)){let l=(i=u.name)==null?void 0:i.value;if(t!=null&&t.commentDescriptions&&(0,xie.collectComment)(u),l==null)continue;if((a=t==null?void 0:t.exclusions)!=null&&a.includes(l+".*")||(o=t==null?void 0:t.exclusions)!=null&&o.includes(l))delete r[l];else switch(u.kind){case Kr.Kind.OBJECT_TYPE_DEFINITION:case Kr.Kind.OBJECT_TYPE_EXTENSION:r[l]=(0,Fie.mergeType)(u,r[l],t,n);break;case Kr.Kind.ENUM_TYPE_DEFINITION:case Kr.Kind.ENUM_TYPE_EXTENSION:r[l]=(0,wie.mergeEnum)(u,r[l],t,n);break;case Kr.Kind.UNION_TYPE_DEFINITION:case Kr.Kind.UNION_TYPE_EXTENSION:r[l]=(0,Cie.mergeUnion)(u,r[l],t,n);break;case Kr.Kind.SCALAR_TYPE_DEFINITION:case Kr.Kind.SCALAR_TYPE_EXTENSION:r[l]=(0,Lie.mergeScalar)(u,r[l],t,n);break;case Kr.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Kr.Kind.INPUT_OBJECT_TYPE_EXTENSION:r[l]=(0,Bie.mergeInputType)(u,r[l],t,n);break;case Kr.Kind.INTERFACE_TYPE_DEFINITION:case Kr.Kind.INTERFACE_TYPE_EXTENSION:r[l]=(0,Uie.mergeInterface)(u,r[l],t,n);break;case Kr.Kind.DIRECTIVE_DEFINITION:r[l]=(0,kie.mergeDirective)(u,r[l]);break}}else(u.kind===Kr.Kind.SCHEMA_DEFINITION||u.kind===Kr.Kind.SCHEMA_EXTENSION)&&(r[rs.schemaDefSymbol]=(0,Mie.mergeSchemaDefs)(u,r[rs.schemaDefSymbol],t));return r}rs.mergeGraphQLNodes=qie});var KM=F(cd=>{"use strict";m();T();N();Object.defineProperty(cd,"__esModule",{value:!0});cd.mergeGraphQLTypes=cd.mergeTypeDefs=void 0;var ea=_e(),MS=uE(),sd=kS(),ud=va(),VM=US();function Vie(e,t){(0,ud.resetComments)();let n={kind:ea.Kind.DOCUMENT,definitions:jM(e,k({useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1},t))},r;return t!=null&&t.commentDescriptions?r=(0,ud.printWithComments)(n):r=n,(0,ud.resetComments)(),r}cd.mergeTypeDefs=Vie;function od(e,t,n=[],r=[],i=new Set){if(e&&!i.has(e))if(i.add(e),typeof e=="function")od(e(),t,n,r,i);else if(Array.isArray(e))for(let a of e)od(a,t,n,r,i);else if((0,ea.isSchema)(e)){let a=(0,ud.getDocumentNodeFromSchema)(e,t);od(a.definitions,t,n,r,i)}else if((0,MS.isStringTypes)(e)||(0,MS.isSourceTypes)(e)){let a=(0,ea.parse)(e,t);od(a.definitions,t,n,r,i)}else if(typeof e=="object"&&(0,ea.isDefinitionNode)(e))e.kind===ea.Kind.DIRECTIVE_DEFINITION?n.push(e):r.push(e);else if((0,ud.isDocumentNode)(e))od(e.definitions,t,n,r,i);else throw new Error(`typeDefs must contain only strings, documents, schemas, or functions, got ${typeof e}`);return{allDirectives:n,allNodes:r}}function jM(e,t){var u,l,d;(0,ud.resetComments)();let{allDirectives:n,allNodes:r}=od(e,t),i=(0,sd.mergeGraphQLNodes)(n,t),a=(0,sd.mergeGraphQLNodes)(r,t,i);if(t!=null&&t.useSchemaDefinition){let p=a[sd.schemaDefSymbol]||{kind:ea.Kind.SCHEMA_DEFINITION,operationTypes:[]},E=p.operationTypes;for(let I in VM.DEFAULT_OPERATION_TYPE_NAME_MAP)if(!E.find(A=>A.operation===I)){let A=VM.DEFAULT_OPERATION_TYPE_NAME_MAP[I],U=a[A];U!=null&&U.name!=null&&E.push({kind:ea.Kind.OPERATION_TYPE_DEFINITION,type:{kind:ea.Kind.NAMED_TYPE,name:U.name},operation:I})}((u=p==null?void 0:p.operationTypes)==null?void 0:u.length)!=null&&p.operationTypes.length>0&&(a[sd.schemaDefSymbol]=p)}t!=null&&t.forceSchemaDefinition&&!((d=(l=a[sd.schemaDefSymbol])==null?void 0:l.operationTypes)!=null&&d.length)&&(a[sd.schemaDefSymbol]={kind:ea.Kind.SCHEMA_DEFINITION,operationTypes:[{kind:ea.Kind.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:ea.Kind.NAMED_TYPE,name:{kind:ea.Kind.NAME,value:"Query"}}}]});let o=Object.values(a);if(t!=null&&t.sort){let p=typeof t.sort=="function"?t.sort:MS.defaultStringComparator;o.sort((E,I)=>{var v,A;return p((v=E.name)==null?void 0:v.value,(A=I.name)==null?void 0:A.value)})}return o}cd.mergeGraphQLTypes=jM});var $M=F(Br=>{"use strict";m();T();N();Object.defineProperty(Br,"__esModule",{value:!0});var ii=(Xv(),Gm(Wv));ii.__exportStar(DS(),Br);ii.__exportStar(Zi(),Br);ii.__exportStar(bS(),Br);ii.__exportStar(AS(),Br);ii.__exportStar(lp(),Br);ii.__exportStar(PS(),Br);ii.__exportStar(FS(),Br);ii.__exportStar(dp(),Br);ii.__exportStar(kS(),Br);ii.__exportStar(KM(),Br);ii.__exportStar(LS(),Br);ii.__exportStar(wS(),Br);ii.__exportStar(BS(),Br);ii.__exportStar(uE(),Br)});var QM=F(Fu=>{"use strict";m();T();N();Object.defineProperty(Fu,"__esModule",{value:!0});Fu.applyExtensions=Fu.mergeExtensions=Fu.extractExtensionsFromSchema=void 0;var GM=va(),jie=va();Object.defineProperty(Fu,"extractExtensionsFromSchema",{enumerable:!0,get:function(){return jie.extractExtensionsFromSchema}});function Kie(e){return(0,GM.mergeDeep)(e)}Fu.mergeExtensions=Kie;function ld(e,t){e&&(e.extensions=(0,GM.mergeDeep)([e.extensions||{},t||{}]))}function $ie(e,t){ld(e,t.schemaExtensions);for(let[n,r]of Object.entries(t.types||{})){let i=e.getType(n);if(i){if(ld(i,r.extensions),r.type==="object"||r.type==="interface")for(let[a,o]of Object.entries(r.fields)){let u=i.getFields()[a];if(u){ld(u,o.extensions);for(let[l,d]of Object.entries(o.arguments))ld(u.args.find(p=>p.name===l),d)}}else if(r.type==="input")for(let[a,o]of Object.entries(r.fields)){let u=i.getFields()[a];ld(u,o.extensions)}else if(r.type==="enum")for(let[a,o]of Object.entries(r.values)){let u=i.getValue(a);ld(u,o)}}}return e}Fu.applyExtensions=$ie});var TE=F(pp=>{"use strict";m();T();N();Object.defineProperty(pp,"__esModule",{value:!0});var xS=(Xv(),Gm(Wv));xS.__exportStar(LM(),pp);xS.__exportStar($M(),pp);xS.__exportStar(QM(),pp)});var $i=F(z=>{"use strict";m();T();N();Object.defineProperty(z,"__esModule",{value:!0});z.semanticNonNullArgumentErrorMessage=z.invalidEventProviderIdErrorMessage=z.invalidNatsStreamConfigurationDefinitionErrorMessage=z.invalidEdfsPublishResultObjectErrorMessage=z.invalidNatsStreamInputErrorMessage=z.inlineFragmentInFieldSetErrorMessage=z.inaccessibleQueryRootTypeError=z.subgraphValidationFailureError=z.minimumSubgraphRequirementError=void 0;z.multipleNamedTypeDefinitionError=Yie;z.incompatibleInputValueDefaultValueTypeError=Jie;z.incompatibleMergedTypesError=Hie;z.incompatibleInputValueDefaultValuesError=zie;z.incompatibleSharedEnumError=Wie;z.invalidSubgraphNamesError=Xie;z.duplicateDirectiveDefinitionError=Zie;z.duplicateEnumValueDefinitionError=eae;z.duplicateFieldDefinitionError=tae;z.duplicateInputFieldDefinitionError=nae;z.duplicateImplementedInterfaceError=rae;z.duplicateUnionMemberDefinitionError=iae;z.duplicateTypeDefinitionError=aae;z.duplicateOperationTypeDefinitionError=sae;z.noBaseDefinitionForExtensionError=oae;z.noBaseScalarDefinitionError=uae;z.noDefinedUnionMembersError=cae;z.noDefinedEnumValuesError=lae;z.operationDefinitionError=dae;z.invalidFieldShareabilityError=fae;z.undefinedDirectiveError=pae;z.undefinedTypeError=mae;z.invalidRepeatedDirectiveErrorMessage=Nae;z.invalidDirectiveError=Tae;z.invalidRepeatedFederatedDirectiveErrorMessage=Eae;z.invalidDirectiveLocationErrorMessage=hae;z.undefinedRequiredArgumentsErrorMessage=yae;z.unexpectedDirectiveArgumentErrorMessage=Iae;z.duplicateDirectiveArgumentDefinitionsErrorMessage=gae;z.invalidArgumentValueErrorMessage=_ae;z.maximumTypeNestingExceededError=vae;z.unexpectedKindFatalError=Oae;z.incompatibleParentKindFatalError=Sae;z.unexpectedEdgeFatalError=Dae;z.incompatibleParentTypeMergeError=Aae;z.unexpectedTypeNodeKindFatalError=Rae;z.invalidKeyFatalError=Pae;z.unexpectedParentKindForChildError=Fae;z.subgraphValidationError=wae;z.invalidSubgraphNameErrorMessage=Lae;z.invalidOperationTypeDefinitionError=Cae;z.invalidRootTypeDefinitionError=Bae;z.subgraphInvalidSyntaxError=Uae;z.invalidInterfaceImplementationError=kae;z.invalidRequiredInputValueError=Mae;z.duplicateArgumentsError=xae;z.noQueryRootTypeError=qae;z.expectedEntityError=Vae;z.abstractTypeInKeyFieldSetErrorMessage=jae;z.unknownTypeInFieldSetErrorMessage=Kae;z.invalidSelectionSetErrorMessage=$ae;z.invalidSelectionSetDefinitionErrorMessage=Gae;z.undefinedFieldInFieldSetErrorMessage=Qae;z.unparsableFieldSetErrorMessage=Yae;z.unparsableFieldSetSelectionErrorMessage=Jae;z.undefinedCompositeOutputTypeError=Hae;z.unexpectedArgumentErrorMessage=zae;z.argumentsInKeyFieldSetErrorMessage=Wae;z.invalidProvidesOrRequiresDirectivesError=Xae;z.duplicateFieldInFieldSetErrorMessage=Zae;z.invalidConfigurationDataErrorMessage=ese;z.incompatibleTypeWithProvidesErrorMessage=tse;z.invalidInlineFragmentTypeErrorMessage=nse;z.inlineFragmentWithoutTypeConditionErrorMessage=rse;z.unknownInlineFragmentTypeConditionErrorMessage=ise;z.invalidInlineFragmentTypeConditionTypeErrorMessage=ase;z.invalidInlineFragmentTypeConditionErrorMessage=sse;z.invalidSelectionOnUnionErrorMessage=ose;z.duplicateOverriddenFieldErrorMessage=use;z.duplicateOverriddenFieldsError=cse;z.noFieldDefinitionsError=lse;z.noInputValueDefinitionsError=dse;z.allChildDefinitionsAreInaccessibleError=fse;z.equivalentSourceAndTargetOverrideErrorMessage=pse;z.undefinedEntityInterfaceImplementationsError=mse;z.orScopesLimitError=Nse;z.invalidEventDrivenGraphError=Tse;z.invalidRootTypeFieldEventsDirectivesErrorMessage=Ese;z.invalidEventDrivenMutationResponseTypeErrorMessage=hse;z.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage=yse;z.invalidNatsStreamInputFieldsErrorMessage=Ise;z.invalidKeyFieldSetsEventDrivenErrorMessage=gse;z.nonExternalKeyFieldNamesEventDrivenErrorMessage=_se;z.nonKeyFieldNamesEventDrivenErrorMessage=vse;z.nonEntityObjectExtensionsEventDrivenErrorMessage=Ose;z.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage=Sse;z.invalidEdfsDirectiveName=Dse;z.invalidImplementedTypeError=bse;z.selfImplementationError=Ase;z.invalidEventSubjectErrorMessage=Rse;z.invalidEventSubjectsErrorMessage=Pse;z.invalidEventSubjectsItemErrorMessage=Fse;z.invalidEventSubjectsArgumentErrorMessage=wse;z.undefinedEventSubjectsArgumentErrorMessage=Lse;z.invalidEventDirectiveError=Cse;z.invalidReferencesOfInaccessibleTypeError=Bse;z.inaccessibleRequiredInputValueError=Use;z.invalidUnionMemberTypeError=kse;z.invalidRootTypeError=Mse;z.invalidSubscriptionFilterLocationError=xse;z.invalidSubscriptionFilterDirectiveError=qse;z.subscriptionFilterNamedTypeErrorMessage=Vse;z.subscriptionFilterConditionDepthExceededErrorMessage=jse;z.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage=Kse;z.subscriptionFilterConditionInvalidInputFieldErrorMessage=$se;z.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage=Gse;z.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage=Qse;z.subscriptionFilterArrayConditionInvalidLengthErrorMessage=Yse;z.invalidInputFieldTypeErrorMessage=Jse;z.subscriptionFieldConditionInvalidInputFieldErrorMessage=Hse;z.subscriptionFieldConditionInvalidValuesArrayErrorMessage=zse;z.subscriptionFieldConditionEmptyValuesArrayErrorMessage=Wse;z.unknownFieldSubgraphNameError=Xse;z.invalidSubscriptionFieldConditionFieldPathErrorMessage=Zse;z.invalidSubscriptionFieldConditionFieldPathParentErrorMessage=eoe;z.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage=toe;z.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage=noe;z.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage=roe;z.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage=ioe;z.unresolvablePathError=aoe;z.allExternalFieldInstancesError=soe;z.externalInterfaceFieldsError=ooe;z.nonExternalConditionalFieldError=uoe;z.incompatibleFederatedFieldNamedTypeError=coe;z.unknownNamedTypeErrorMessage=XM;z.unknownNamedTypeError=loe;z.unknownFieldDataError=doe;z.unexpectedNonCompositeOutputTypeError=foe;z.invalidExternalDirectiveError=poe;z.configureDescriptionNoDescriptionError=moe;z.configureDescriptionPropagationError=Noe;z.duplicateDirectiveDefinitionArgumentErrorMessage=Toe;z.duplicateDirectiveDefinitionLocationErrorMessage=Eoe;z.invalidDirectiveDefinitionLocationErrorMessage=hoe;z.invalidDirectiveDefinitionError=yoe;z.typeNameAlreadyProvidedErrorMessage=Ioe;z.fieldAlreadyProvidedErrorMessage=goe;z.invalidInterfaceObjectImplementationDefinitionsError=_oe;z.invalidNamedTypeError=voe;z.semanticNonNullLevelsNaNIndexErrorMessage=Ooe;z.semanticNonNullLevelsIndexOutOfBoundsErrorMessage=Soe;z.semanticNonNullLevelsNonNullErrorMessage=Doe;z.semanticNonNullInconsistentLevelsError=boe;z.oneOfRequiredFieldsError=Aoe;var YM=_e(),Ye=zn(),JM=ql(),Bc=wr(),Gie=$l(),Qie=TE();z.minimumSubgraphRequirementError=new Error("At least one subgraph is required for federation.");function Yie(e,t,n){return new Error(`The named type "${e}" is defined as both types "${t}" and "${n}". +However, there must be only one type named "${e}".`)}function Jie(e,t,n,r){return new Error(`The ${e} of type "${n}" defined on path "${t}" is incompatible with the default value of "${r}".`)}function Hie({actualType:e,coords:t,expectedType:n,isArgument:r}){return new Error(`Incompatible types when merging two instances of ${r?"field argument":Ye.FIELD} "${t}": + Expected type "${n}" but received "${e}".`)}function zie(e,t,n,r,i){return new Error(`Expected the ${e} defined on path "${t}" to define the default value "${r}". "However, the default value "${i}" is defined in the following subgraph`+(n.length>1?"s":"")+`: "`+n.join(Ye.QUOTATION_JOIN)+`" -If an instance defines a default value, that default value must be consistently defined across all subgraphs.`)}function Qie(e){return new Error(`Enum "${e}" was used as both an input and output but was inconsistently defined across inclusive subgraphs. To update an Enum used as both an input and output, add any new Enum values with the @inaccessible directive in the origin subgraph. Next, add those new Enum values to all other subgraphs that define the Enum\u2014this time without the @inaccessible directive. Finally, once all subgraphs have been updated, remove @inaccessible from the Enum values in the origin subgraph.`)}function Yie(e,t){let n="Subgraphs to be federated must each have a unique, non-empty name.";e.length>0&&(n+=` +If an instance defines a default value, that default value must be consistently defined across all subgraphs.`)}function Wie(e){return new Error(`Enum "${e}" was used as both an input and output but was inconsistently defined across inclusive subgraphs. To update an Enum used as both an input and output, add any new Enum values with the @inaccessible directive in the origin subgraph. Next, add those new Enum values to all other subgraphs that define the Enum\u2014this time without the @inaccessible directive. Finally, once all subgraphs have been updated, remove @inaccessible from the Enum values in the origin subgraph.`)}function Xie(e,t){let n="Subgraphs to be federated must each have a unique, non-empty name.";e.length>0&&(n+=` The following subgraph names are not unique: "`+e.join('", "')+'"');for(let r of t)n+=` - ${r}`;return new Error(n)}function Jie(e){return new Error(`The directive "${e}" must only be defined once.`)}function Hie(e,t){return new Error(`The Enum "${e}" must only define the Enum value definition "${t}" once.`)}function zie(e,t,n){return new Error(`The ${e} "${t}" must only define the field definition "${n}" once.`)}function Wie(e,t){return new Error(`The Input Object "${e}" must only define the Input field definition "${t}" once.`)}function Xie(e,t,n){return new Error(`The ${e} "${t}" must only implement the Interface "${n}" once.`)}function Zie(e,t){return new Error(`The Union "${e}" must only define the Union member "${t}" once.`)}function eae(e,t){return new Error(`The ${e} "${t}" must only be defined once.`)}function tae(e,t,n){return new Error(`The operation type "${e}" cannot be defined as "${t}" because it has already been defined as "${n}".`)}function nae(e,t){return new Error(`The ${e} "${t}" is an extension, but no base ${e} definition of "${t}" is defined in any subgraph.`)}function rae(e){return new Error(`The Scalar extension "${e}" is invalid because no base Scalar definition of "${e} is defined in the subgraph.`)}function iae(e){return new Error(`The Union "${e}" must define at least one Union member.`)}function aae(e){return new Error(`The Enum "${e}" must define at least one Enum value.`)}function sae(e,t,n){return new Error(`Expected the response type "${e}" for operation "${t}" to be type Object but received "${n}.`)}function oae(e,t){let n=e.name,r=[];for(let[i,a]of e.fieldDataByName){if(!t.has(i))continue;let o=[],u=[];for(let[l,d]of a.isShareableBySubgraphName)d?o.push(l):u.push(l);o.length<1?r.push(` + ${r}`;return new Error(n)}function Zie(e){return new Error(`The directive "${e}" must only be defined once.`)}function eae(e,t){return new Error(`The Enum "${e}" must only define the Enum value definition "${t}" once.`)}function tae(e,t,n){return new Error(`The ${e} "${t}" must only define the field definition "${n}" once.`)}function nae(e,t){return new Error(`The Input Object "${e}" must only define the Input field definition "${t}" once.`)}function rae(e,t,n){return new Error(`The ${e} "${t}" must only implement the Interface "${n}" once.`)}function iae(e,t){return new Error(`The Union "${e}" must only define the Union member "${t}" once.`)}function aae(e,t){return new Error(`The ${e} "${t}" must only be defined once.`)}function sae(e,t,n){return new Error(`The operation type "${e}" cannot be defined as "${t}" because it has already been defined as "${n}".`)}function oae(e,t){return new Error(`The ${e} "${t}" is an extension, but no base ${e} definition of "${t}" is defined in any subgraph.`)}function uae(e){return new Error(`The Scalar extension "${e}" is invalid because no base Scalar definition of "${e} is defined in the subgraph.`)}function cae(e){return new Error(`The Union "${e}" must define at least one Union member.`)}function lae(e){return new Error(`The Enum "${e}" must define at least one Enum value.`)}function dae(e,t,n){return new Error(`Expected the response type "${e}" for operation "${t}" to be type Object but received "${n}.`)}function fae(e,t){let n=e.name,r=[];for(let[i,a]of e.fieldDataByName){if(!t.has(i))continue;let o=[],u=[];for(let[l,d]of a.isShareableBySubgraphName)d?o.push(l):u.push(l);o.length<1?r.push(` The field "${i}" is defined in the following subgraphs: "${[...a.subgraphNames].join('", "')}". However, it is not declared "@shareable" in any of them.`):r.push(` The field "${i}" is defined and declared "@shareable" in the following subgraph`+(o.length>1?"s":"")+': "'+o.join(Ye.QUOTATION_JOIN)+`". However, it is not declared "@shareable" in the following subgraph`+(u.length>1?"s":"")+`: "${u.join(Ye.QUOTATION_JOIN)}".`)}return new Error(`The Object "${n}" defines the same fields in multiple subgraphs without the "@shareable" directive:${r.join(` -`)}`)}function uae(e,t){return new Error(`The directive "@${e}" declared on coordinates "${t}" is not defined in the schema.`)}function cae(e){return new Error(` The type "${e}" was referenced in the schema, but it was never defined.`)}function lae(e){return`The definition for the directive "@${e}" does not define it as repeatable, but it is declared more than once on these coordinates.`}function dae(e,t,n,r){return new Error(`The ${n} instance of the directive "@${e}" declared on coordinates "${t}" is invalid for the following reason`+(r.length>1?`s: +`)}`)}function pae(e,t){return new Error(`The directive "@${e}" declared on coordinates "${t}" is not defined in the schema.`)}function mae(e){return new Error(` The type "${e}" was referenced in the schema, but it was never defined.`)}function Nae(e){return`The definition for the directive "@${e}" does not define it as repeatable, but it is declared more than once on these coordinates.`}function Tae(e,t,n,r){return new Error(`The ${n} instance of the directive "@${e}" declared on coordinates "${t}" is invalid for the following reason`+(r.length>1?`s: `:`: `)+r.join(` -`))}function fae(e,t){return new Error(`The definition for the directive "@${e}" does not define it as repeatable, but the directive has been declared on more than one instance of the type "${t}".`)}function pae(e,t){return` The definition for "@${e}" does not define "${t}" as a valid location.`}function mae(e,t,n){let r=` The definition for "@${e}" defines the following `+t.length+" required argument"+(t.length>1?"s: ":": ")+'"'+t.join('", "')+`". - However,`;return n.length<1?r+" no arguments are defined on this instance.":r+" the following required argument"+(n.length>1?"s are":" is")+' not defined on this instance: "'+n.join(Ye.QUOTATION_JOIN)+'".'}function Nae(e,t){return` The definition for "@${e}" does not define the following argument`+(t.length>1?"s that are":" that is")+' provided: "'+t.join(Ye.QUOTATION_JOIN)+'".'}function Tae(e){return" The following argument"+(e.length>1?"s are":" is")+' defined more than once: "'+e.join(Ye.QUOTATION_JOIN)+'"'}function Eae(e,t,n,r){return` The value "${e}" provided to argument "${t}(${n}: ...)" is not a valid "${r}" type.`}function hae(e){return new Error(` The type defined at path "${e}" has more than ${JM.MAXIMUM_TYPE_NESTING} layers of nesting, or there is a cyclical error.`)}function yae(e){return new Error(`Fatal: Unexpected type for "${e}"`)}function Iae(e,t,n){return new Error(`Fatal: Expected "${e}" to be type ${(0,Bc.kindToNodeType)(t)} but received "${(0,Bc.kindToNodeType)(n)}".`)}function gae(e,t){return new Error(`Fatal: The type "${e}" visited the following unexpected edge`+(t.length>1?"s":"")+`: - "${t.join(Ye.QUOTATION_JOIN)}".`)}var _ae='"Interface Object" (an "Object" type that also defines the "@interfaceObject" directive)';function vae({existingData:e,incomingNodeType:t,incomingSubgraphName:n}){let r=[...e.subgraphNames],i=t?`"${t}"`:_ae;return new Error(` "${e.name}" is defined using incompatible types across subgraphs. It is defined as type "${(0,Bc.kindToNodeType)(e.kind)}" in subgraph`+(r.length>1?"s":"")+` "${r.join(Ye.QUOTATION_JOIN)}" but type ${i} in subgraph "${n}".`)}function Oae(e){return new Error(`Fatal: Expected all constituent types at path "${e}" to be one of the following: "LIST_TYPE", "NAMED_TYPE", or "NON_NULL_TYPE".`)}function Sae(e,t){return new Error(`Fatal: Expected key "${e}" to exist in the map "${t}".`)}z.subgraphValidationFailureError=new Error(" Fatal: Subgraph validation did not return a valid AST.");function Dae(e,t,n,r,i){return new Error(` Expected "${e}" to be type "${t}" but received "${n}" when handling child "${r}" of type "${i}".`)}function bae(e,t){return new Error(`The subgraph "${e}" could not be federated for the following reason`+(t.length>1?"s":"")+`: +`))}function Eae(e,t){return new Error(`The definition for the directive "@${e}" does not define it as repeatable, but the directive has been declared on more than one instance of the type "${t}".`)}function hae(e,t){return` The definition for "@${e}" does not define "${t}" as a valid location.`}function yae(e,t,n){let r=` The definition for "@${e}" defines the following `+t.length+" required argument"+(t.length>1?"s: ":": ")+'"'+t.join('", "')+`". + However,`;return n.length<1?r+" no arguments are defined on this instance.":r+" the following required argument"+(n.length>1?"s are":" is")+' not defined on this instance: "'+n.join(Ye.QUOTATION_JOIN)+'".'}function Iae(e,t){return` The definition for "@${e}" does not define the following argument`+(t.length>1?"s that are":" that is")+' provided: "'+t.join(Ye.QUOTATION_JOIN)+'".'}function gae(e){return" The following argument"+(e.length>1?"s are":" is")+' defined more than once: "'+e.join(Ye.QUOTATION_JOIN)+'"'}function _ae(e,t,n,r){return` The value "${e}" provided to argument "${t}(${n}: ...)" is not a valid "${r}" type.`}function vae(e){return new Error(` The type defined at path "${e}" has more than ${JM.MAXIMUM_TYPE_NESTING} layers of nesting, or there is a cyclical error.`)}function Oae(e){return new Error(`Fatal: Unexpected type for "${e}"`)}function Sae(e,t,n){return new Error(`Fatal: Expected "${e}" to be type ${(0,Bc.kindToNodeType)(t)} but received "${(0,Bc.kindToNodeType)(n)}".`)}function Dae(e,t){return new Error(`Fatal: The type "${e}" visited the following unexpected edge`+(t.length>1?"s":"")+`: + "${t.join(Ye.QUOTATION_JOIN)}".`)}var bae='"Interface Object" (an "Object" type that also defines the "@interfaceObject" directive)';function Aae({existingData:e,incomingNodeType:t,incomingSubgraphName:n}){let r=[...e.subgraphNames],i=t?`"${t}"`:bae;return new Error(` "${e.name}" is defined using incompatible types across subgraphs. It is defined as type "${(0,Bc.kindToNodeType)(e.kind)}" in subgraph`+(r.length>1?"s":"")+` "${r.join(Ye.QUOTATION_JOIN)}" but type ${i} in subgraph "${n}".`)}function Rae(e){return new Error(`Fatal: Expected all constituent types at path "${e}" to be one of the following: "LIST_TYPE", "NAMED_TYPE", or "NON_NULL_TYPE".`)}function Pae(e,t){return new Error(`Fatal: Expected key "${e}" to exist in the map "${t}".`)}z.subgraphValidationFailureError=new Error(" Fatal: Subgraph validation did not return a valid AST.");function Fae(e,t,n,r,i){return new Error(` Expected "${e}" to be type "${t}" but received "${n}" when handling child "${r}" of type "${i}".`)}function wae(e,t){return new Error(`The subgraph "${e}" could not be federated for the following reason`+(t.length>1?"s":"")+`: `+t.map(n=>n.message).join(` -`))}function Aae(e,t){return`The ${(0,Bc.numberToOrdinal)(e+1)} subgraph in the array did not define a name. Consequently, any further errors will temporarily identify this subgraph as "${t}".`}function Rae(e,t,n){return new Error(`The schema definition defines the "${e}" operation as type "${t}". However, "${t}" was also used for the "${n}" operation. - If explicitly defined, each operation type must be a unique and valid Object type.`)}function Pae(e,t,n){return new Error(`The schema definition defines the "${e}" operation as type "${t}". However, the schema also defines another type named "${n}", which is the default (root) type name for the "${e}" operation. -For federation, it is only possible to use the default root types names ("Mutation", "Query", "Subscription") as operation definitions. No other definitions with these default root type names are valid.`)}function Fae(e){let t="The subgraph has syntax errors and could not be parsed.";return e&&(t+=` - The reason provided was: `+e.message),new Error(t)}function wae(e,t,n){let r=[];for(let[i,a]of n){let o=` The implementation of Interface "${i}" by "${e}" is invalid because: +`))}function Lae(e,t){return`The ${(0,Bc.numberToOrdinal)(e+1)} subgraph in the array did not define a name. Consequently, any further errors will temporarily identify this subgraph as "${t}".`}function Cae(e,t,n){return new Error(`The schema definition defines the "${e}" operation as type "${t}". However, "${t}" was also used for the "${n}" operation. + If explicitly defined, each operation type must be a unique and valid Object type.`)}function Bae(e,t,n){return new Error(`The schema definition defines the "${e}" operation as type "${t}". However, the schema also defines another type named "${n}", which is the default (root) type name for the "${e}" operation. +For federation, it is only possible to use the default root types names ("Mutation", "Query", "Subscription") as operation definitions. No other definitions with these default root type names are valid.`)}function Uae(e){let t="The subgraph has syntax errors and could not be parsed.";return e&&(t+=` + The reason provided was: `+e.message),new Error(t)}function kae(e,t,n){let r=[];for(let[i,a]of n){let o=` The implementation of Interface "${i}" by "${e}" is invalid because: `,u=a.unimplementedFields.length;u&&(o+=` The following field${u>1?"s are":" is"} not implemented: "`+a.unimplementedFields.join('", "')+`" `);for(let[l,d]of a.invalidFieldImplementations){let p=d.unimplementedArguments.size,E=d.invalidImplementedArguments.length,I=d.invalidAdditionalArguments.size;if(o+=` The field "${l}" is invalid because: `,p&&(o+=` The following argument${p>1?"s are":" is"} not implemented: "`+[...d.unimplementedArguments].join('", "')+`" @@ -268,87 +268,87 @@ For federation, it is only possible to use the default root types names ("Mutati Consequently, the Interface implementation cannot be satisfied. `)}r.push(o)}return new Error(`The ${t} "${e}" has the following Interface implementation errors: `+r.join(` -`))}function Lae(e,t,n,r=!0){let i=r?Ye.ARGUMENT:Ye.INPUT_FIELD,a=`The ${e} "${t}" could not be federated because: +`))}function Mae(e,t,n,r=!0){let i=r?Ye.ARGUMENT:Ye.INPUT_FIELD,a=`The ${e} "${t}" could not be federated because: `;for(let o of n)a+=` The ${i} "${o.inputValueName}" is required in the following subgraph`+(o.requiredSubgraphs.length>1?"s":"")+': "'+o.requiredSubgraphs.join('", "')+`" However, the ${i} "${o.inputValueName}" is not defined in the following subgraph`+(o.missingSubgraphs.length>1?"s":"")+': "'+o.missingSubgraphs.join('", "')+`" If an ${i} is required on a ${e} in any one subgraph, it must be at least defined as optional on all other definitions of that ${e} in all other subgraphs. -`;return new Error(a)}function Cae(e,t){return new Error(`The field "${e}" is invalid because: +`;return new Error(a)}function xae(e,t){return new Error(`The field "${e}" is invalid because: The following argument`+(t.length>1?"s are":" is")+' defined more than once: "'+t.join(Ye.QUOTATION_JOIN)+`" -`)}function Bae(e=!0){return new Error(`The ${e?"router":"client"} schema does not define at least one accessible query root type field after federation was completed, which is necessary for a federated graph to be valid. +`)}function qae(e=!0){return new Error(`The ${e?"router":"client"} schema does not define at least one accessible query root type field after federation was completed, which is necessary for a federated graph to be valid. For example: type Query { dummy: String - }`)}z.inaccessibleQueryRootTypeError=new Error('The root query type "Query" must be present in the client schema; consequently, it must not be declared "@inaccessible".');function Uae(e){return new Error(`Expected object "${e}" to define a "key" directive, but it defines no directives.`)}z.inlineFragmentInFieldSetErrorMessage=" Inline fragments are not currently supported within a field set argument.";function kae(e,t,n,r){return` The following field set is invalid: + }`)}z.inaccessibleQueryRootTypeError=new Error('The root query type "Query" must be present in the client schema; consequently, it must not be declared "@inaccessible".');function Vae(e){return new Error(`Expected object "${e}" to define a "key" directive, but it defines no directives.`)}z.inlineFragmentInFieldSetErrorMessage=" Inline fragments are not currently supported within a field set argument.";function jae(e,t,n,r){return` The following field set is invalid: "${e}" This is because "${t}" returns "${n}", which is type "${r}". - Fields that return abstract types (Interfaces and Unions) cannot be included in the field set of "@key" directives.`}function Mae(e,t,n){return` The following field set is invalid: + Fields that return abstract types (Interfaces and Unions) cannot be included in the field set of "@key" directives.`}function Kae(e,t,n){return` The following field set is invalid: "${e}" - This is because "${t}" returns the unknown type "${n}".`}function xae(e,t,n,r){return` The following field set is invalid: + This is because "${t}" returns the unknown type "${n}".`}function $ae(e,t,n,r){return` The following field set is invalid: "${e}" - This is because of the selection set corresponding to the `+EE(t,n,r)+` Composite types such as "${r}" types must define a selection set with at least one field selection.`}function qae(e,t,n,r){return` The following field set is invalid: + This is because of the selection set corresponding to the `+EE(t,n,r)+` Composite types such as "${r}" types must define a selection set with at least one field selection.`}function Gae(e,t,n,r){return` The following field set is invalid: "${e}" - This is because of the selection set corresponding to the `+EE(t,n,r)+` Non-composite types such as "${r}" cannot define a selection set.`}function Vae(e,t,n){return` The following field set is invalid: + This is because of the selection set corresponding to the `+EE(t,n,r)+` Non-composite types such as "${r}" cannot define a selection set.`}function Qae(e,t,n){return` The following field set is invalid: "${e}" This is because of the selection set corresponding to the field coordinates "${t}.${n}". - The type "${t}" does not define a field named "${n}".`}function jae(e,t){let n=` The following field set is invalid: + The type "${t}" does not define a field named "${n}".`}function Yae(e,t){let n=` The following field set is invalid: "${e}" The field set could not be parsed.`;return t&&(n+=` - The reason provided was: `+t.message),n}function Kae(e,t){return` The following field set is invalid: + The reason provided was: `+t.message),n}function Jae(e,t){return` The following field set is invalid: "${e}" - This is because the selection set defined on "${t}" could not be parsed.`}function $ae(e){return new Error(` Expected an object/interface or object/interface extension named "${e}" to exist.`)}function Gae(e,t,n){return` The following field set is invalid: + This is because the selection set defined on "${t}" could not be parsed.`}function Hae(e){return new Error(` Expected an object/interface or object/interface extension named "${e}" to exist.`)}function zae(e,t,n){return` The following field set is invalid: "${e}" - This is because "${t}" does not define an argument named "${n}".`}function Qae(e,t){return` The following field set is invalid: + This is because "${t}" does not define an argument named "${n}".`}function Wae(e,t){return` The following field set is invalid: "${e}" This is because "${t}" defines arguments. - Fields that define arguments cannot be included in the field set of @key directives.`}function Yae(e,t){return new Error(`The following "${e}" directive`+(t.length>1?"s are":" is")+` invalid: + Fields that define arguments cannot be included in the field set of @key directives.`}function Xae(e,t){return new Error(`The following "${e}" directive`+(t.length>1?"s are":" is")+` invalid: `+t.join(` -`))}function Jae(e,t){return` The following field set is invalid: +`))}function Zae(e,t){return` The following field set is invalid: "${e}" - This is because "${t}" was included in the field set more than once.`}function Hae(e,t,n){return` Expected ConfigurationData to exist for type "${e}" when adding field "${t}" while validating field set "${n}".`}function zae({fieldCoords:e,responseType:t,subgraphName:n}){return` A "@provides" directive is declared on field "${e}" in subgraph "${n}". + This is because "${t}" was included in the field set more than once.`}function ese(e,t,n){return` Expected ConfigurationData to exist for type "${e}" when adding field "${t}" while validating field set "${n}".`}function tse({fieldCoords:e,responseType:t,subgraphName:n}){return` A "@provides" directive is declared on field "${e}" in subgraph "${n}". However, the response type "${t}" is not an Object nor Interface.`}function qS(e,t,n=!1){return e.length<1?`enclosing type name "${t}". `:`field coordinates "${e[e.length-1]}"`+(n?` that returns "${t}"`:"")+`. `}function EE(e,t,n){return e.length<1?`enclosing type name "${t}", which is type "${n}". `:`field coordinates "${e[e.length-1]}" that returns "${t}", which is type "${n}". -`}function Wae(e,t,n,r){return` The following field set is invalid: +`}function nse(e,t,n,r){return` The following field set is invalid: "${e}" This is because an inline fragment with the type condition "${n}" is defined on the selection set corresponding to the `+qS(t,r,!0)+` However, "${r}" is not an abstract (Interface or Union) type. - Consequently, the only valid type condition at this selection set would be "${r}".`}function Xae(e,t){return` The following field set is invalid: + Consequently, the only valid type condition at this selection set would be "${r}".`}function rse(e,t){return` The following field set is invalid: "${e}" - This is because "${t}" defines an inline fragment without a type condition.`}function Zae(e,t,n,r){return` The following field set is invalid: + This is because "${t}" defines an inline fragment without a type condition.`}function ise(e,t,n,r){return` The following field set is invalid: "${e}" - This is because an inline fragment with the unknown type condition "${r}" is defined on the selection set corresponding to the `+qS(t,n)}function ese(e,t,n,r,i){return` The following field set is invalid: + This is because an inline fragment with the unknown type condition "${r}" is defined on the selection set corresponding to the `+qS(t,n)}function ase(e,t,n,r,i){return` The following field set is invalid: "${e}" - This is because an inline fragment with the type condition "${r}" is defined on the selection set corresponding to the `+qS(t,n)+` However, "${r}" is type "${i}" when types "Interface" or "Object" would be expected.`}function tse(e,t,n,r,i){let a=` The following field set is invalid: + This is because an inline fragment with the type condition "${r}" is defined on the selection set corresponding to the `+qS(t,n)+` However, "${r}" is type "${i}" when types "Interface" or "Object" would be expected.`}function sse(e,t,n,r,i){let a=` The following field set is invalid: "${e}" - This is because an inline fragment with the type condition "${n}" is defined on the selection set corresponding to the `+EE(t,i,r);return r===Ye.INTERFACE?a+` However, "${n}" does not implement "${i}"`:a+` However, "${n}" is not a member of "${i}".`}function nse(e,t,n){return` The following field set is invalid: + This is because an inline fragment with the type condition "${n}" is defined on the selection set corresponding to the `+EE(t,i,r);return r===Ye.INTERFACE?a+` However, "${n}" does not implement "${i}"`:a+` However, "${n}" is not a member of "${i}".`}function ose(e,t,n){return` The following field set is invalid: "${e}" - This is because of the selection set corresponding to the `+EE(t,n,Ye.UNION)+` Union types such as "${n}" must define field selections (besides "__typename") on an inline fragment whose type condition corresponds to a constituent union member.`}function rse(e,t){return` The field "${e}" declares an @override directive in the following subgraphs: "`+t.join(Ye.QUOTATION_JOIN)+'".'}function ise(e){return new Error('The "@override" directive must only be declared on one single instance of a field. However, an "@override" directive was declared on more than one instance of the following field'+(e.length>1?"s":"")+': "'+e.join(Ye.QUOTATION_JOIN)+`". -`)}function ase(e,t){return new Error(`The ${e} "${t}" is invalid because it does not define any fields.`)}function sse(e){return new Error(`The Input Object "${e}" is invalid because it does not define any input values.`)}function ose(e,t,n){return new Error(`The ${e} "${t}" is invalid because all its ${n} definitions are declared "@inaccessible".`)}function use(e,t){return`Cannot override field "${t}" because the source and target subgraph names are both "${e}"`}function cse(e,t){let n=`Federation was unsuccessful because any one subgraph that defines a specific entity Interface must also define each and every entity Object that implements that entity Interface. + This is because of the selection set corresponding to the `+EE(t,n,Ye.UNION)+` Union types such as "${n}" must define field selections (besides "__typename") on an inline fragment whose type condition corresponds to a constituent union member.`}function use(e,t){return` The field "${e}" declares an @override directive in the following subgraphs: "`+t.join(Ye.QUOTATION_JOIN)+'".'}function cse(e){return new Error('The "@override" directive must only be declared on one single instance of a field. However, an "@override" directive was declared on more than one instance of the following field'+(e.length>1?"s":"")+': "'+e.join(Ye.QUOTATION_JOIN)+`". +`)}function lse(e,t){return new Error(`The ${e} "${t}" is invalid because it does not define any fields.`)}function dse(e){return new Error(`The Input Object "${e}" is invalid because it does not define any input values.`)}function fse(e,t,n){return new Error(`The ${e} "${t}" is invalid because all its ${n} definitions are declared "@inaccessible".`)}function pse(e,t){return`Cannot override field "${t}" because the source and target subgraph names are both "${e}"`}function mse(e,t){let n=`Federation was unsuccessful because any one subgraph that defines a specific entity Interface must also define each and every entity Object that implements that entity Interface. Each entity Object must also explicitly define its implementation of the entity Interface. `;for(let[r,i]of e){let o=(0,Bc.getOrThrowError)(t,r,"entityInterfaceFederationDataByTypeName").concreteTypeNames;n+=` Across all subgraphs, the entity interface "${r}" is implemented by the following entit`+(o.size>1?"ies":"y")+`: "`+Array.from(o).join(Ye.QUOTATION_JOIN)+`" However, the definition of at least one of these implementations is missing in a subgraph that defines the entity interface "${r}": `;for(let{subgraphName:u,definedConcreteTypeNames:l}of i){let d=(0,Bc.getEntriesNotInHashSet)(o,l);n+=` Subgraph "${u}" does not define the following implementations: "`+d.join(Ye.QUOTATION_JOIN)+`" -`}}return new Error(n)}function lse(e,t){return new Error(`The maximum number of OR scopes that can be defined by @requiresScopes on a single field is ${e}. However, the following coordinates attempt to define more: +`}}return new Error(n)}function Nse(e,t){return new Error(`The maximum number of OR scopes that can be defined by @requiresScopes on a single field is ${e}. However, the following coordinates attempt to define more: "`+t.join(Ye.QUOTATION_JOIN)+`" -If you require more, please contact support.`)}function dse(e){return new Error(`An "Event Driven" graph\u2014a subgraph that defines event driven directives\u2014must not define any resolvers. +If you require more, please contact support.`)}function Tse(e){return new Error(`An "Event Driven" graph\u2014a subgraph that defines event driven directives\u2014must not define any resolvers. Consequently, any "@key" definitions must also include the "resolvable: false" argument. Moreover, only fields that compose part of an entity's (composite) key and are declared "@external" are permitted. `+e.join(` -`))}function fse(e){let t=` Root type fields defined in an Event Driven graph must define a valid events directive: +`))}function Ese(e){let t=` Root type fields defined in an Event Driven graph must define a valid events directive: Mutation type fields must define either a edfs publish or request directive." Query type fields must define "@edfs__natsRequest" Subscription type fields must define an edfs subscribe directive The following root field path`+(e.size>1?"s are":" is")+` invalid: `;for(let[n,r]of e)r.definesDirectives?t+=` The root field path "${n}" defines the following invalid events directive`+(r.invalidDirectiveNames.length>1?"s":"")+': "@'+r.invalidDirectiveNames.join('", "@')+`" `:t+=` The root field path "${n}" does not define any valid events directives. -`;return t}function pse(e){let t=` Mutation type fields defined in an Event Driven graph must return the non-nullable type "edfs__PublishResult!", which has the following definition: +`;return t}function hse(e){let t=` Mutation type fields defined in an Event Driven graph must return the non-nullable type "edfs__PublishResult!", which has the following definition: type edfs__PublishResult { success: Boolean! } However, the following mutation field path`+(e.size>1?"s are":" is")+` invalid: `;for(let[n,r]of e)t+=` The mutation field path "${n}" returns "${r}". -`;return t}function mse(e){let t=` The named response type of root type fields defined in an Event Driven graph must be a non-nullable, non-list named type that is either an entity, an interface implemented by an entity, or a union of which an entity is a member. +`;return t}function yse(e){let t=` The named response type of root type fields defined in an Event Driven graph must be a non-nullable, non-list named type that is either an entity, an interface implemented by an entity, or a union of which an entity is a member. Consequently, the following root field path`+(e.size>1?"s are":" is")+` invalid: `;for(let[n,r]of e)t+=` The root field path "${n}", which returns the invalid type "${r}" `;return t}z.invalidNatsStreamInputErrorMessage=`The "streamConfiguration" argument must be a valid input object with the following form: @@ -356,19 +356,19 @@ Moreover, only fields that compose part of an entity's (composite) key and are d consumerInactiveThreshold: Int! = 30 consumerName: String! streamName: String! - }`;function Nse(e,t,n,r){let i=z.invalidNatsStreamInputErrorMessage,a=[];return e.length>0&&a.push("The following required field"+(e.length>1?"s were":" was")+' not defined: "'+e.join(Ye.QUOTATION_JOIN)+'".'),t.length>0&&a.push("The following required field"+(t.length>1?"s were":" was")+' defined more than once: "'+t.join(Ye.QUOTATION_JOIN)+'".'),n.length>0&&a.push("The following required field"+(n.length>1?"s were":" was")+' not type "String!" with a minimum length of 1: "'+n.join(Ye.QUOTATION_JOIN)+'".'),r.length>0&&a.push("The following field"+(r.length>1?"s are":" is")+' not part of a valid "edfs__NatsStreamConfiguration" input definition: "'+r.join(Ye.QUOTATION_JOIN)+'".'),i+=` + }`;function Ise(e,t,n,r){let i=z.invalidNatsStreamInputErrorMessage,a=[];return e.length>0&&a.push("The following required field"+(e.length>1?"s were":" was")+' not defined: "'+e.join(Ye.QUOTATION_JOIN)+'".'),t.length>0&&a.push("The following required field"+(t.length>1?"s were":" was")+' defined more than once: "'+t.join(Ye.QUOTATION_JOIN)+'".'),n.length>0&&a.push("The following required field"+(n.length>1?"s were":" was")+' not type "String!" with a minimum length of 1: "'+n.join(Ye.QUOTATION_JOIN)+'".'),r.length>0&&a.push("The following field"+(r.length>1?"s are":" is")+' not part of a valid "edfs__NatsStreamConfiguration" input definition: "'+r.join(Ye.QUOTATION_JOIN)+'".'),i+=` However, the provided input was invalid for the following reason`+(a.length>1?"s":"")+`: `+a.join(` - `),i}function Tse(e=new Map){let t="";for(let[n,r]of e)t+=' The following "@key" field set'+(r.length>1?"s are":" is")+` defined on the entity "${n}" without a "resolvable: false" argument: + `),i}function gse(e=new Map){let t="";for(let[n,r]of e)t+=' The following "@key" field set'+(r.length>1?"s are":" is")+` defined on the entity "${n}" without a "resolvable: false" argument: "`+r.join(Ye.QUOTATION_JOIN)+`" -`;return t}function Ese(e){let t=" The following field"+(e.size>1?"s are referenced":" is referenced")+` within an entity "@key" field without an "@external" declaration: +`;return t}function _se(e){let t=" The following field"+(e.size>1?"s are referenced":" is referenced")+` within an entity "@key" field without an "@external" declaration: `;for(let[n,r]of e)t+=` field "${r}" defined on path "${n}" -`;return t}function hse(e){let t=" The following field"+(e.size>1?"s are":" is")+` defined despite not composing part of a "@key" directive field set: +`;return t}function vse(e){let t=" The following field"+(e.size>1?"s are":" is")+` defined despite not composing part of a "@key" directive field set: `;for(let[n,r]of e)t+=` Field "${r}" defined on path "${n}" -`;return t}function yse(e){return`Only root types and entities (objects that define one or more primary keys with the "@key" directive) may be defined as object extensions in an Event Driven graph. +`;return t}function Ose(e){return`Only root types and entities (objects that define one or more primary keys with the "@key" directive) may be defined as object extensions in an Event Driven graph. Consequently, the following object extension definition`+(e.length>1?"s are":" is")+` invalid: "`+e.join(Ye.QUOTATION_JOIN)+`" -`}function Ise(e){return` Only object definitions whose fields compose part of a "@key" directive's field set may be defined in an Event Driven graph. Consequently, the following object type definition`+(e.length>1?"s are":" is")+` invalid: +`}function Sse(e){return` Only object definitions whose fields compose part of a "@key" directive's field set may be defined in an Event Driven graph. Consequently, the following object type definition`+(e.length>1?"s are":" is")+` invalid: "`+e.join(Ye.QUOTATION_JOIN)+`" `}z.invalidEdfsPublishResultObjectErrorMessage=` The object "edfs__PublishResult" that was defined in the Event Driven graph is invalid and must instead have the following definition: type edfs__PublishResult { @@ -378,20 +378,20 @@ Consequently, the following object extension definition`+(e.length>1?"s are":" i consumerInactiveThreshold: Int! = 30 consumerName: String! streamName: String! - }`;function gse(e){return new Error(`Could not retrieve definition for Event-Driven Federated Subscription directive "${e}".`)}function _se(e,t){let n=` Only interfaces can be implemented. However, the type "${e}" attempts to implement the following invalid type`+(t.size>1?"s":"")+`: + }`;function Dse(e){return new Error(`Could not retrieve definition for Event-Driven Federated Subscription directive "${e}".`)}function bse(e,t){let n=` Only interfaces can be implemented. However, the type "${e}" attempts to implement the following invalid type`+(t.size>1?"s":"")+`: `;for(let[r,i]of t)n+=` "${r}", which is type "${i}" -`;return new Error(n)}function vse(e){return new Error(` The interface "${e}" must not implement itself.`)}function Ose(e){return`The "${e}" argument must be string with a minimum length of one.`}function Sse(e){return`The "${e}" argument must be a list of strings.`}function Dse(e){return`Each item in the "${e}" argument list must be a string with a minimum length of one. However, at least one value provided in the list was invalid.`}function bse(e){return`An argument template references the invalid argument "${e}".`}function Ase(e){return`An argument template references the undefined argument "${e}".`}z.invalidEventProviderIdErrorMessage='If explicitly defined, the "providerId" argument must be a string with a minimum length of one.';function Rse(e,t,n){return new Error(`The event directive "${e}" declared on "${t}" is invalid for the following reason`+(n.length>1?"s":"")+`: +`;return new Error(n)}function Ase(e){return new Error(` The interface "${e}" must not implement itself.`)}function Rse(e){return`The "${e}" argument must be string with a minimum length of one.`}function Pse(e){return`The "${e}" argument must be a list of strings.`}function Fse(e){return`Each item in the "${e}" argument list must be a string with a minimum length of one. However, at least one value provided in the list was invalid.`}function wse(e){return`An argument template references the invalid argument "${e}".`}function Lse(e){return`An argument template references the undefined argument "${e}".`}z.invalidEventProviderIdErrorMessage='If explicitly defined, the "providerId" argument must be a string with a minimum length of one.';function Cse(e,t,n){return new Error(`The event directive "${e}" declared on "${t}" is invalid for the following reason`+(n.length>1?"s":"")+`: `+n.join(` - `))}function Pse(e,t,n){return new Error(`The ${e} "${t}" is declared "@inaccessible"; however, the ${e} is still referenced at the following paths: + `))}function Bse(e,t,n){return new Error(`The ${e} "${t}" is declared "@inaccessible"; however, the ${e} is still referenced at the following paths: "`+n.join(Ye.QUOTATION_JOIN)+`" -`)}function Fse(e,t){return new Error(`The ${e.kind===YM.Kind.ARGUMENT?"argument":"Input field"} "${e.name}" defined at coordinates "${e.federatedCoords}" is declared "@inaccessible"; however, it is a required ${e.kind===YM.Kind.ARGUMENT?"argument of field":"field of Input Object"} "${t}".`)}function wse(e,t){return new Error(` The union "${e}" defines the following member`+(t.length>1?"s that are not object types":" that is not an object type")+`: +`)}function Use(e,t){return new Error(`The ${e.kind===YM.Kind.ARGUMENT?"argument":"Input field"} "${e.name}" defined at coordinates "${e.federatedCoords}" is declared "@inaccessible"; however, it is a required ${e.kind===YM.Kind.ARGUMENT?"argument of field":"field of Input Object"} "${t}".`)}function kse(e,t){return new Error(` The union "${e}" defines the following member`+(t.length>1?"s that are not object types":" that is not an object type")+`: `+t.join(` - `))}function Lse(e){return new Error(`Expected type "${e}" to be a root type but could not find its respective OperationTypeNode.`)}function Cse(e){return new Error(`The "@${Ye.SUBSCRIPTION_FILTER}" directive must only be defined on a subscription root field, but it was defined on the path "${e}".`)}function Bse(e,t){return new Error(`The "@${Ye.SUBSCRIPTION_FILTER}" directive defined on path "${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: + `))}function Mse(e){return new Error(`Expected type "${e}" to be a root type but could not find its respective OperationTypeNode.`)}function xse(e){return new Error(`The "@${Ye.SUBSCRIPTION_FILTER}" directive must only be defined on a subscription root field, but it was defined on the path "${e}".`)}function qse(e,t){return new Error(`The "@${Ye.SUBSCRIPTION_FILTER}" directive defined on path "${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: `+t.join(` -`))}function Use(e){return` Unknown type "${e}".`}function kse(e){return` The input path "${e}" exceeds the maximum depth of ${JM.MAX_SUBSCRIPTION_FILTER_DEPTH} for any one filter condition. +`))}function Vse(e){return` Unknown type "${e}".`}function jse(e){return` The input path "${e}" exceeds the maximum depth of ${JM.MAX_SUBSCRIPTION_FILTER_DEPTH} for any one filter condition. If you require a larger maximum depth, please contact support.`}var HM=` Each "${Ye.SUBSCRIPTION_FILTER_CONDITION}" input object must define exactly one of the following input value fields: "${Ye.AND_UPPER}", "${Ye.IN_UPPER}", "${Ye.NOT_UPPER}", or "${Ye.OR_UPPER}". -`;function Mse(e,t){return HM+` However, input path "${e}" defines ${t} fields.`}function xse(e,t){return HM+` However, input path "${e}" defines the invalid input value field "${t}".`}function qse(e,t,n){return` Expected the value of input path "${e}" to be type "${t}" but received type "${n}"`}var zM=` An AND or OR input field defined on a "${Ye.SUBSCRIPTION_FILTER_CONDITION}" should define a list of 1\u20135 nested conditions. -`;function Vse(e,t){let n=t.length>1;return zM+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+' not type "object": '+t.join(", ")}function jse(e,t){return zM+` However, the list defined on input path "${e}" has a length of ${t}.`}function Kse(e,t,n){return` Expected the input path "${e}" to be type "${t}" but received "${n}".`}function $se(e,t,n,r,i){let a=` Each "${Ye.SUBSCRIPTION_FIELD_CONDITION}" input object must only define the following two input value fields: "${Ye.FIELD_PATH}" and "${Ye.VALUES}". +`;function Kse(e,t){return HM+` However, input path "${e}" defines ${t} fields.`}function $se(e,t){return HM+` However, input path "${e}" defines the invalid input value field "${t}".`}function Gse(e,t,n){return` Expected the value of input path "${e}" to be type "${t}" but received type "${n}"`}var zM=` An AND or OR input field defined on a "${Ye.SUBSCRIPTION_FILTER_CONDITION}" should define a list of 1\u20135 nested conditions. +`;function Qse(e,t){let n=t.length>1;return zM+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+' not type "object": '+t.join(", ")}function Yse(e,t){return zM+` However, the list defined on input path "${e}" has a length of ${t}.`}function Jse(e,t,n){return` Expected the input path "${e}" to be type "${t}" but received "${n}".`}function Hse(e,t,n,r,i){let a=` Each "${Ye.SUBSCRIPTION_FIELD_CONDITION}" input object must only define the following two input value fields: "${Ye.FIELD_PATH}" and "${Ye.VALUES}". However, input path "${e}" is invalid because:`;return t.length>0&&(a+=` The following required field`+(t.length>1?"s are":" is")+` not defined: "`+t.join(Ye.QUOTATION_JOIN)+'"'),n.length>0&&(a+=` @@ -401,82 +401,82 @@ Consequently, the following object extension definition`+(e.length>1?"s are":" i "`+r.join(Ye.QUOTATION_JOIN)+'"'),i.length>0&&(a+=` `+i.join(` `)),a}var WM=` A "${Ye.SUBSCRIPTION_FIELD_CONDITION}" input object must define a "values" input value field with a list of at least one valid "${Ye.SUBSCRIPTION_FILTER_VALUE}" kind (boolean, enum, float, int, null, or string). -`;function Gse(e,t){let n=t.length>1;return WM+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+` not a valid "${Ye.SUBSCRIPTION_FILTER_VALUE}": `+t.join(", ")}function Qse(e){return WM+` However, the list defined on input path "${e}" is empty.`}function Yse(e){return new Error(` Field "${e}" defined no subgraph names.`)}function Jse(e,t){return` Input path "${e}" defines the value "${t}", which is not a period (.) delimited field path.`}function Hse(e,t,n){return` Input path "${e}" defines the value "${t}". - However, "${n}" is not type "object"`}function zse(e,t,n,r,i){return` Input path "${e}" defines the value "${t}". - However, the path "${n}" is invalid because no field named "${r}" exists on type "${i}".`}function Wse(e,t,n,r,i){return`Input path "${e}" defines the value "${t}". +`;function zse(e,t){let n=t.length>1;return WM+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+` not a valid "${Ye.SUBSCRIPTION_FILTER_VALUE}": `+t.join(", ")}function Wse(e){return WM+` However, the list defined on input path "${e}" is empty.`}function Xse(e){return new Error(` Field "${e}" defined no subgraph names.`)}function Zse(e,t){return` Input path "${e}" defines the value "${t}", which is not a period (.) delimited field path.`}function eoe(e,t,n){return` Input path "${e}" defines the value "${t}". + However, "${n}" is not type "object"`}function toe(e,t,n,r,i){return` Input path "${e}" defines the value "${t}". + However, the path "${n}" is invalid because no field named "${r}" exists on type "${i}".`}function noe(e,t,n,r,i){return`Input path "${e}" defines the value "${t}". However, only fields that are defined in the same graph as the "@${Ye.SUBSCRIPTION_FILTER}" directive can compose part of an "IN" condition's "fieldPath" input value field. - Consequently, the path "${n}" is invalid because field "${r}" is not defined in subgraph "${i}".`}function Xse(e,t,n,r){return` Input path "${e}" defines the value "${t}". - The path segment "${n}" is invalid because it refers to "${r}", which is declared "@inaccessible".`}function Zse(e,t,n,r,i){return` Input path "${e}" defines the value "${t}". - However, the final field "${n}" is ${r} "${i}", which is not a leaf type; therefore, it requires further selections.`}function eoe({fieldName:e,selectionSet:t},n){let r=`The field "${e}" is unresolvable at the following path: + Consequently, the path "${n}" is invalid because field "${r}" is not defined in subgraph "${i}".`}function roe(e,t,n,r){return` Input path "${e}" defines the value "${t}". + The path segment "${n}" is invalid because it refers to "${r}", which is declared "@inaccessible".`}function ioe(e,t,n,r,i){return` Input path "${e}" defines the value "${t}". + However, the final field "${n}" is ${r} "${i}", which is not a leaf type; therefore, it requires further selections.`}function aoe({fieldName:e,selectionSet:t},n){let r=`The field "${e}" is unresolvable at the following path: ${t} This is because: - `+n.join(` - - `);return new Error(r)}function toe(e,t){let n=`The Object "${e}" is invalid because the following field definition`+(t.size>1?"s are":" is")+` declared "@external" on all instances of that field: + - `);return new Error(r)}function soe(e,t){let n=`The Object "${e}" is invalid because the following field definition`+(t.size>1?"s are":" is")+` declared "@external" on all instances of that field: `;for(let[r,i]of t)n+=` "${r}" in subgraph`+(i.length>1?"s":"")+' "'+i.join(Ye.QUOTATION_JOIN)+`" -`;return n+='At least one instance of a field definition must always be resolvable (and therefore not declared "@external").',new Error(n)}function noe(e,t){return new Error(`The interface "${e}" is invalid because the following field definition`+(t.length>1?"s are":" is")+` declared "@external": +`;return n+='At least one instance of a field definition must always be resolvable (and therefore not declared "@external").',new Error(n)}function ooe(e,t){return new Error(`The interface "${e}" is invalid because the following field definition`+(t.length>1?"s are":" is")+` declared "@external": "`+t.join(Ye.QUOTATION_JOIN)+`" -Interface fields should not be declared "@external". This is because interface fields do not resolve directly, but the "@external" directive relates to whether a field instance can be resolved by the subgraph in which it is defined.`)}function roe({directiveCoords:e,fieldSet:t,directiveName:n,subgraphName:r,targetCoords:i}){let a=i.split(Ye.LITERAL_PERIOD),o=a[a.length-1]===Ye.TYPENAME;return new Error(`The field "${e}" in subgraph "${r}" defines a "@${n}" directive with the following field set: +Interface fields should not be declared "@external". This is because interface fields do not resolve directly, but the "@external" directive relates to whether a field instance can be resolved by the subgraph in which it is defined.`)}function uoe({directiveCoords:e,fieldSet:t,directiveName:n,subgraphName:r,targetCoords:i}){let a=i.split(Ye.LITERAL_PERIOD),o=a[a.length-1]===Ye.TYPENAME;return new Error(`The field "${e}" in subgraph "${r}" defines a "@${n}" directive with the following field set: "${t}".`+(o?` However, none of the field set ancestors of "__typename" is declared "@external".`:` However, neither the field "${i}" nor any of its field set ancestors are declared "@external".`)+` -Consequently, "${i}" is already provided by subgraph "${r}" and should not form part of a "@${n}" directive field set.`)}function ioe(e,t){let n=[];for(let[r,i]of t){let a=[...i];n.push(` The named type "${r}" is returned by the following subgraph`+(a.length>1?"s":"")+': "'+a.join(Ye.QUOTATION_JOIN)+'".')}return new Error(`Each instance of a shared field must resolve identically across subgraphs. +Consequently, "${i}" is already provided by subgraph "${r}" and should not form part of a "@${n}" directive field set.`)}function coe(e,t){let n=[];for(let[r,i]of t){let a=[...i];n.push(` The named type "${r}" is returned by the following subgraph`+(a.length>1?"s":"")+': "'+a.join(Ye.QUOTATION_JOIN)+'".')}return new Error(`Each instance of a shared field must resolve identically across subgraphs. The field "${e}" could not be federated due to incompatible types across subgraphs. The discrepancies are as follows: `+n.join(` -`))}function XM(e,t){return`The field "${e}" returns the unknown named type "${t}".`}function aoe(e,t){return new Error(XM(e,t))}function soe(e){return new Error(`Could not find FieldData for field "${e}" -.This should never happen. Please report this issue on GitHub.`)}function ooe(e,t){return new Error(`Expected named type "${e}" to be a composite output type (Object or Interface) but received "${t}". -This should never happen. Please report this issue on GitHub.`)}function uoe(e){return new Error(`The Object field "${e}" is invalidly declared "@external". An Object field should only be declared "@external" if it is part of a "@key", "@provides", or "@requires" field set, or the field is necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the "@external" directive should be removed.`)}function coe(e,t){return new Error(`The "@openfed__configureDescription" directive defined on ${e} "${t}" is invalid because neither a description nor the "descriptionOverride" argument is defined.`)}function loe(e,t){return new Error(`The coordinates "${e}" declare "@openfed__configureDescription(propagate: true)" in the following subgraphs: +`))}function XM(e,t){return`The field "${e}" returns the unknown named type "${t}".`}function loe(e,t){return new Error(XM(e,t))}function doe(e){return new Error(`Could not find FieldData for field "${e}" +.This should never happen. Please report this issue on GitHub.`)}function foe(e,t){return new Error(`Expected named type "${e}" to be a composite output type (Object or Interface) but received "${t}". +This should never happen. Please report this issue on GitHub.`)}function poe(e){return new Error(`The Object field "${e}" is invalidly declared "@external". An Object field should only be declared "@external" if it is part of a "@key", "@provides", or "@requires" field set, or the field is necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the "@external" directive should be removed.`)}function moe(e,t){return new Error(`The "@openfed__configureDescription" directive defined on ${e} "${t}" is invalid because neither a description nor the "descriptionOverride" argument is defined.`)}function Noe(e,t){return new Error(`The coordinates "${e}" declare "@openfed__configureDescription(propagate: true)" in the following subgraphs: "`+t.join(Ye.QUOTATION_JOIN)+`" -A federated graph only supports a single description; consequently, only one subgraph may define argument "propagate" as true (this is the default value).`)}function doe(e){return"- The following argument"+(e.length>1?"s are":" is")+` defined more than once: - "`+e.join(Ye.QUOTATION_JOIN)+'"'}function foe(e){return`- The location "${e}" is defined multiple times.`}function poe(e){return`- "${e}" is not a valid directive location.`}function moe(e,t){return new Error(`The directive definition for "@${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: -`+t.join(Ye.LITERAL_NEW_LINE)+'"')}function Noe(e,t){return` The field "${e}" is unconditionally provided by subgraph "${t}" and should not form part of any "@provides" field set.`}function Toe(e,t,n){return` The field "${e}" is unconditionally provided by subgraph "${t}" and should not form part of any "@${n}" field set. Although "${e}" is declared "@external", it is part of a "@key" directive on an extension type. Such fields are only declared "@external" for legacy syntactical reasons and are not internally considered "@external".`}function Eoe(e,t,n){return new Error(`The subgraph that defines an entity Interface Object (using "@interfaceObject") must not define any implementation types of that interface. However, the subgraph "${t}" defines the entity Interface "${e}" as an Interface Object alongside the following implementation type`+(n.length>1?"s":"")+` of "${e}": - "`+n.join(Ye.QUOTATION_JOIN)+'"')}function hoe({data:e,namedTypeData:t,nodeType:n}){let r=(0,qie.isFieldData)(e),i=r?`${e.originalParentTypeName}.${e.name}`:e.originalCoords;return new Error(`The ${n} "${i}" is invalid because it defines type `+(0,Vie.printTypeNode)(e.type)+`; however, ${(0,Bc.kindToNodeType)(t.kind)} "${t.name}" is not a valid `+(r?"output":"input")+" type.")}function yoe(e){return`Index "${e}" is not a valid integer.`}function Ioe({maxIndex:e,typeString:t,value:n}){return`Index "${n}" is out of bounds for type ${t}; `+(e>0?`valid indices are 0-${e} inclusive.`:"the only valid index is 0.")}function goe({typeString:e,value:t}){return`Index "${t}" of type ${e} is non-null but must be nullable.`}z.semanticNonNullArgumentErrorMessage=`Argument "${Ye.LEVELS}" validation error.`;function _oe(e){let t=`${e.renamedParentTypeName}.${e.name}`,n=`The "@semanticNonNull" directive defined on field "${t}" is invalid due to inconsistent values provided to the "levels" argument across the following subgraphs: +A federated graph only supports a single description; consequently, only one subgraph may define argument "propagate" as true (this is the default value).`)}function Toe(e){return"- The following argument"+(e.length>1?"s are":" is")+` defined more than once: + "`+e.join(Ye.QUOTATION_JOIN)+'"'}function Eoe(e){return`- The location "${e}" is defined multiple times.`}function hoe(e){return`- "${e}" is not a valid directive location.`}function yoe(e,t){return new Error(`The directive definition for "@${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: +`+t.join(Ye.LITERAL_NEW_LINE)+'"')}function Ioe(e,t){return` The field "${e}" is unconditionally provided by subgraph "${t}" and should not form part of any "@provides" field set.`}function goe(e,t,n){return` The field "${e}" is unconditionally provided by subgraph "${t}" and should not form part of any "@${n}" field set. Although "${e}" is declared "@external", it is part of a "@key" directive on an extension type. Such fields are only declared "@external" for legacy syntactical reasons and are not internally considered "@external".`}function _oe(e,t,n){return new Error(`The subgraph that defines an entity Interface Object (using "@interfaceObject") must not define any implementation types of that interface. However, the subgraph "${t}" defines the entity Interface "${e}" as an Interface Object alongside the following implementation type`+(n.length>1?"s":"")+` of "${e}": + "`+n.join(Ye.QUOTATION_JOIN)+'"')}function voe({data:e,namedTypeData:t,nodeType:n}){let r=(0,Gie.isFieldData)(e),i=r?`${e.originalParentTypeName}.${e.name}`:e.originalCoords;return new Error(`The ${n} "${i}" is invalid because it defines type `+(0,Qie.printTypeNode)(e.type)+`; however, ${(0,Bc.kindToNodeType)(t.kind)} "${t.name}" is not a valid `+(r?"output":"input")+" type.")}function Ooe(e){return`Index "${e}" is not a valid integer.`}function Soe({maxIndex:e,typeString:t,value:n}){return`Index "${n}" is out of bounds for type ${t}; `+(e>0?`valid indices are 0-${e} inclusive.`:"the only valid index is 0.")}function Doe({typeString:e,value:t}){return`Index "${t}" of type ${e} is non-null but must be nullable.`}z.semanticNonNullArgumentErrorMessage=`Argument "${Ye.LEVELS}" validation error.`;function boe(e){let t=`${e.renamedParentTypeName}.${e.name}`,n=`The "@semanticNonNull" directive defined on field "${t}" is invalid due to inconsistent values provided to the "levels" argument across the following subgraphs: `;for(let[r,i]of e.nullLevelsBySubgraphName)n+=` Subgraph "${r}" defines levels ${Array.from(i).sort((a,o)=>a-o)}. -`;return n+=`The list value provided to the "levels" argument must be consistently defined across all subgraphs that define "@semanticNonNull" on field "${t}".`,new Error(n)}function voe({requiredFieldNames:e,typeName:t}){return new Error(`The "@oneOf" directive defined on Input Object "${t}" is invalid because all Input fields must be optional (nullable); however, the following Input field`+(e.length>1?"s are":" is")+' required (non-nullable): "'+e.join(Ye.QUOTATION_JOIN)+'".')}});var ex=w(ZM=>{"use strict";m();T();N();Object.defineProperty(ZM,"__esModule",{value:!0})});var yE=w(hE=>{"use strict";m();T();N();Object.defineProperty(hE,"__esModule",{value:!0});hE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=void 0;hE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=30});var IE=w(hr=>{"use strict";m();T();N();Object.defineProperty(hr,"__esModule",{value:!0});hr.SUBSCRIPTION_FILTER_VALUE_DEFINITION=hr.SUBSCRIPTION_FILTER_CONDITION_DEFINITION=hr.SUBSCRIPTION_FIELD_CONDITION_DEFINITION=hr.SCOPE_SCALAR_DEFINITION=hr.LINK_PURPOSE_DEFINITION=hr.LINK_IMPORT_DEFINITION=hr.FIELD_SET_SCALAR_DEFINITION=hr.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION=void 0;var Zt=Ie(),fn=Fr(),pn=zn(),Ooe=yE();hr.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION={kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.EDFS_NATS_STREAM_CONFIGURATION),fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.CONSUMER_INACTIVE_THRESHOLD),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.INT_SCALAR)},defaultValue:{kind:Zt.Kind.INT,value:Ooe.DEFAULT_CONSUMER_INACTIVE_THRESHOLD.toString()}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.CONSUMER_NAME),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.STRING_SCALAR)}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.STREAM_NAME),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.STRING_SCALAR)}}]};hr.FIELD_SET_SCALAR_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.FIELD_SET_SCALAR)};hr.LINK_IMPORT_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.LINK_IMPORT)};hr.LINK_PURPOSE_DEFINITION={kind:Zt.Kind.ENUM_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.LINK_PURPOSE),values:[{directives:[],kind:Zt.Kind.ENUM_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.EXECUTION)},{directives:[],kind:Zt.Kind.ENUM_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SECURITY)}]};hr.SCOPE_SCALAR_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SCOPE_SCALAR)};hr.SUBSCRIPTION_FIELD_CONDITION_DEFINITION={fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.FIELD_PATH),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.STRING_SCALAR)}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.VALUES),type:{kind:Zt.Kind.NON_NULL_TYPE,type:{kind:Zt.Kind.LIST_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FILTER_VALUE)}}}],kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SUBSCRIPTION_FIELD_CONDITION)};hr.SUBSCRIPTION_FILTER_CONDITION_DEFINITION={fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.AND_UPPER),type:{kind:Zt.Kind.LIST_TYPE,type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.IN_UPPER),type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FIELD_CONDITION)},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.OR_UPPER),type:{kind:Zt.Kind.LIST_TYPE,type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.NOT_UPPER),type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FILTER_CONDITION)}],kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SUBSCRIPTION_FILTER_CONDITION)};hr.SUBSCRIPTION_FILTER_VALUE_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SUBSCRIPTION_FILTER_VALUE)}});var dd=w(tr=>{"use strict";m();T();N();Object.defineProperty(tr,"__esModule",{value:!0});tr.CLIENT_PERSISTED_DIRECTIVE_NAMES=tr.IGNORED_FEDERATED_TYPE_NAMES=tr.DEPENDENCIES_BY_DIRECTIVE_NAME=tr.COMPOSITE_OUTPUT_NODE_KINDS=tr.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=tr.SUBSCRIPTION_FILTER_INPUT_NAMES=tr.STREAM_CONFIGURATION_FIELD_NAMES=tr.EVENT_DIRECTIVE_NAMES=tr.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=void 0;var nt=zn(),gE=Ie(),Oa=IE();tr.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=new Set([nt.ARGUMENT_DEFINITION_UPPER,nt.ENUM_UPPER,nt.ENUM_VALUE_UPPER,nt.FIELD_DEFINITION_UPPER,nt.INPUT_FIELD_DEFINITION_UPPER,nt.INPUT_OBJECT_UPPER,nt.INTERFACE_UPPER,nt.OBJECT_UPPER,nt.SCALAR_UPPER,nt.SCHEMA_UPPER,nt.UNION_UPPER]);tr.EVENT_DIRECTIVE_NAMES=new Set([nt.EDFS_KAFKA_PUBLISH,nt.EDFS_KAFKA_SUBSCRIBE,nt.EDFS_NATS_PUBLISH,nt.EDFS_NATS_REQUEST,nt.EDFS_NATS_SUBSCRIBE,nt.EDFS_REDIS_PUBLISH,nt.EDFS_REDIS_SUBSCRIBE]);tr.STREAM_CONFIGURATION_FIELD_NAMES=new Set([nt.CONSUMER_INACTIVE_THRESHOLD,nt.CONSUMER_NAME,nt.STREAM_NAME]);tr.SUBSCRIPTION_FILTER_INPUT_NAMES=new Set([nt.AND_UPPER,nt.IN_UPPER,nt.NOT_UPPER,nt.OR_UPPER]);tr.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=new Set([nt.AND_UPPER,nt.OR_UPPER]);tr.COMPOSITE_OUTPUT_NODE_KINDS=new Set([gE.Kind.INTERFACE_TYPE_DEFINITION,gE.Kind.INTERFACE_TYPE_EXTENSION,gE.Kind.OBJECT_TYPE_DEFINITION,gE.Kind.OBJECT_TYPE_EXTENSION]);tr.DEPENDENCIES_BY_DIRECTIVE_NAME=new Map([[nt.CONNECT_FIELD_RESOLVER,[Oa.FIELD_SET_SCALAR_DEFINITION]],[nt.EDFS_NATS_SUBSCRIBE,[Oa.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION]],[nt.KEY,[Oa.FIELD_SET_SCALAR_DEFINITION]],[nt.LINK,[Oa.LINK_IMPORT_DEFINITION,Oa.LINK_PURPOSE_DEFINITION]],[nt.PROVIDES,[Oa.FIELD_SET_SCALAR_DEFINITION]],[nt.REQUIRES,[Oa.FIELD_SET_SCALAR_DEFINITION]],[nt.REQUIRES_SCOPES,[Oa.SCOPE_SCALAR_DEFINITION]],[nt.SUBSCRIPTION_FILTER,[Oa.SUBSCRIPTION_FIELD_CONDITION_DEFINITION,Oa.SUBSCRIPTION_FILTER_CONDITION_DEFINITION,Oa.SUBSCRIPTION_FILTER_VALUE_DEFINITION]]]);tr.IGNORED_FEDERATED_TYPE_NAMES=new Set([nt.BOOLEAN_SCALAR,nt.EDFS_NATS_STREAM_CONFIGURATION,nt.FIELD_SET_SCALAR,nt.ID_SCALAR,nt.INT_SCALAR,nt.FLOAT_SCALAR,nt.LINK_IMPORT,nt.LINK_PURPOSE,nt.STRING_SCALAR,nt.SUBSCRIPTION_FIELD_CONDITION,nt.SUBSCRIPTION_FILTER_CONDITION,nt.SUBSCRIPTION_FILTER_VALUE]);tr.CLIENT_PERSISTED_DIRECTIVE_NAMES=new Set([nt.DEPRECATED,nt.ONE_OF,nt.SEMANTIC_NON_NULL])});var ta=w((VS,tx)=>{"use strict";m();T();N();var mp=function(e){return e&&e.Math===Math&&e};tx.exports=mp(typeof globalThis=="object"&&globalThis)||mp(typeof window=="object"&&window)||mp(typeof self=="object"&&self)||mp(typeof global=="object"&&global)||mp(typeof VS=="object"&&VS)||function(){return this}()||Function("return this")()});var ks=w((APe,nx)=>{"use strict";m();T();N();nx.exports=function(e){try{return!!e()}catch(t){return!0}}});var wu=w((wPe,rx)=>{"use strict";m();T();N();var Soe=ks();rx.exports=!Soe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var jS=w((UPe,ix)=>{"use strict";m();T();N();var Doe=ks();ix.exports=!Doe(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var Uc=w((qPe,ax)=>{"use strict";m();T();N();var boe=jS(),_E=Function.prototype.call;ax.exports=boe?_E.bind(_E):function(){return _E.apply(_E,arguments)}});var cx=w(ux=>{"use strict";m();T();N();var sx={}.propertyIsEnumerable,ox=Object.getOwnPropertyDescriptor,Aoe=ox&&!sx.call({1:2},1);ux.f=Aoe?function(t){var n=ox(this,t);return!!n&&n.enumerable}:sx});var KS=w((JPe,lx)=>{"use strict";m();T();N();lx.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var Ii=w((XPe,px)=>{"use strict";m();T();N();var dx=jS(),fx=Function.prototype,$S=fx.call,Roe=dx&&fx.bind.bind($S,$S);px.exports=dx?Roe:function(e){return function(){return $S.apply(e,arguments)}}});var Tx=w((nFe,Nx)=>{"use strict";m();T();N();var mx=Ii(),Poe=mx({}.toString),Foe=mx("".slice);Nx.exports=function(e){return Foe(Poe(e),8,-1)}});var hx=w((sFe,Ex)=>{"use strict";m();T();N();var woe=Ii(),Loe=ks(),Coe=Tx(),GS=Object,Boe=woe("".split);Ex.exports=Loe(function(){return!GS("z").propertyIsEnumerable(0)})?function(e){return Coe(e)==="String"?Boe(e,""):GS(e)}:GS});var QS=w((lFe,yx)=>{"use strict";m();T();N();yx.exports=function(e){return e==null}});var YS=w((mFe,Ix)=>{"use strict";m();T();N();var Uoe=QS(),koe=TypeError;Ix.exports=function(e){if(Uoe(e))throw new koe("Can't call method on "+e);return e}});var vE=w((hFe,gx)=>{"use strict";m();T();N();var Moe=hx(),xoe=YS();gx.exports=function(e){return Moe(xoe(e))}});var Sa=w((_Fe,_x)=>{"use strict";m();T();N();var JS=typeof document=="object"&&document.all;_x.exports=typeof JS=="undefined"&&JS!==void 0?function(e){return typeof e=="function"||e===JS}:function(e){return typeof e=="function"}});var fd=w((DFe,vx)=>{"use strict";m();T();N();var qoe=Sa();vx.exports=function(e){return typeof e=="object"?e!==null:qoe(e)}});var OE=w((PFe,Ox)=>{"use strict";m();T();N();var HS=ta(),Voe=Sa(),joe=function(e){return Voe(e)?e:void 0};Ox.exports=function(e,t){return arguments.length<2?joe(HS[e]):HS[e]&&HS[e][t]}});var Dx=w((CFe,Sx)=>{"use strict";m();T();N();var Koe=Ii();Sx.exports=Koe({}.isPrototypeOf)});var Px=w((MFe,Rx)=>{"use strict";m();T();N();var $oe=ta(),bx=$oe.navigator,Ax=bx&&bx.userAgent;Rx.exports=Ax?String(Ax):""});var kx=w((jFe,Ux)=>{"use strict";m();T();N();var Bx=ta(),zS=Px(),Fx=Bx.process,wx=Bx.Deno,Lx=Fx&&Fx.versions||wx&&wx.version,Cx=Lx&&Lx.v8,Da,SE;Cx&&(Da=Cx.split("."),SE=Da[0]>0&&Da[0]<4?1:+(Da[0]+Da[1]));!SE&&zS&&(Da=zS.match(/Edge\/(\d+)/),(!Da||Da[1]>=74)&&(Da=zS.match(/Chrome\/(\d+)/),Da&&(SE=+Da[1])));Ux.exports=SE});var WS=w((QFe,xx)=>{"use strict";m();T();N();var Mx=kx(),Goe=ks(),Qoe=ta(),Yoe=Qoe.String;xx.exports=!!Object.getOwnPropertySymbols&&!Goe(function(){var e=Symbol("symbol detection");return!Yoe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Mx&&Mx<41})});var XS=w((zFe,qx)=>{"use strict";m();T();N();var Joe=WS();qx.exports=Joe&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var ZS=w((ewe,Vx)=>{"use strict";m();T();N();var Hoe=OE(),zoe=Sa(),Woe=Dx(),Xoe=XS(),Zoe=Object;Vx.exports=Xoe?function(e){return typeof e=="symbol"}:function(e){var t=Hoe("Symbol");return zoe(t)&&Woe(t.prototype,Zoe(e))}});var Kx=w((iwe,jx)=>{"use strict";m();T();N();var eue=String;jx.exports=function(e){try{return eue(e)}catch(t){return"Object"}}});var DE=w((uwe,$x)=>{"use strict";m();T();N();var tue=Sa(),nue=Kx(),rue=TypeError;$x.exports=function(e){if(tue(e))return e;throw new rue(nue(e)+" is not a function")}});var eD=w((fwe,Gx)=>{"use strict";m();T();N();var iue=DE(),aue=QS();Gx.exports=function(e,t){var n=e[t];return aue(n)?void 0:iue(n)}});var Yx=w((Twe,Qx)=>{"use strict";m();T();N();var tD=Uc(),nD=Sa(),rD=fd(),sue=TypeError;Qx.exports=function(e,t){var n,r;if(t==="string"&&nD(n=e.toString)&&!rD(r=tD(n,e))||nD(n=e.valueOf)&&!rD(r=tD(n,e))||t!=="string"&&nD(n=e.toString)&&!rD(r=tD(n,e)))return r;throw new sue("Can't convert object to primitive value")}});var Hx=w((Iwe,Jx)=>{"use strict";m();T();N();Jx.exports=!1});var bE=w((Owe,Wx)=>{"use strict";m();T();N();var zx=ta(),oue=Object.defineProperty;Wx.exports=function(e,t){try{oue(zx,e,{value:t,configurable:!0,writable:!0})}catch(n){zx[e]=t}return t}});var AE=w((Awe,eq)=>{"use strict";m();T();N();var uue=Hx(),cue=ta(),lue=bE(),Xx="__core-js_shared__",Zx=eq.exports=cue[Xx]||lue(Xx,{});(Zx.versions||(Zx.versions=[])).push({version:"3.41.0",mode:uue?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var iD=w((wwe,nq)=>{"use strict";m();T();N();var tq=AE();nq.exports=function(e,t){return tq[e]||(tq[e]=t||{})}});var iq=w((Uwe,rq)=>{"use strict";m();T();N();var due=YS(),fue=Object;rq.exports=function(e){return fue(due(e))}});var Lu=w((qwe,aq)=>{"use strict";m();T();N();var pue=Ii(),mue=iq(),Nue=pue({}.hasOwnProperty);aq.exports=Object.hasOwn||function(t,n){return Nue(mue(t),n)}});var aD=w(($we,sq)=>{"use strict";m();T();N();var Tue=Ii(),Eue=0,hue=Math.random(),yue=Tue(1 .toString);sq.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+yue(++Eue+hue,36)}});var cq=w((Jwe,uq)=>{"use strict";m();T();N();var Iue=ta(),gue=iD(),oq=Lu(),_ue=aD(),vue=WS(),Oue=XS(),pd=Iue.Symbol,sD=gue("wks"),Sue=Oue?pd.for||pd:pd&&pd.withoutSetter||_ue;uq.exports=function(e){return oq(sD,e)||(sD[e]=vue&&oq(pd,e)?pd[e]:Sue("Symbol."+e)),sD[e]}});var pq=w((Xwe,fq)=>{"use strict";m();T();N();var Due=Uc(),lq=fd(),dq=ZS(),bue=eD(),Aue=Yx(),Rue=cq(),Pue=TypeError,Fue=Rue("toPrimitive");fq.exports=function(e,t){if(!lq(e)||dq(e))return e;var n=bue(e,Fue),r;if(n){if(t===void 0&&(t="default"),r=Due(n,e,t),!lq(r)||dq(r))return r;throw new Pue("Can't convert object to primitive value")}return t===void 0&&(t="number"),Aue(e,t)}});var oD=w((nLe,mq)=>{"use strict";m();T();N();var wue=pq(),Lue=ZS();mq.exports=function(e){var t=wue(e,"string");return Lue(t)?t:t+""}});var Eq=w((sLe,Tq)=>{"use strict";m();T();N();var Cue=ta(),Nq=fd(),uD=Cue.document,Bue=Nq(uD)&&Nq(uD.createElement);Tq.exports=function(e){return Bue?uD.createElement(e):{}}});var cD=w((lLe,hq)=>{"use strict";m();T();N();var Uue=wu(),kue=ks(),Mue=Eq();hq.exports=!Uue&&!kue(function(){return Object.defineProperty(Mue("div"),"a",{get:function(){return 7}}).a!==7})});var lD=w(Iq=>{"use strict";m();T();N();var xue=wu(),que=Uc(),Vue=cx(),jue=KS(),Kue=vE(),$ue=oD(),Gue=Lu(),Que=cD(),yq=Object.getOwnPropertyDescriptor;Iq.f=xue?yq:function(t,n){if(t=Kue(t),n=$ue(n),Que)try{return yq(t,n)}catch(r){}if(Gue(t,n))return jue(!que(Vue.f,t,n),t[n])}});var _q=w((hLe,gq)=>{"use strict";m();T();N();var Yue=wu(),Jue=ks();gq.exports=Yue&&Jue(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Np=w((_Le,vq)=>{"use strict";m();T();N();var Hue=fd(),zue=String,Wue=TypeError;vq.exports=function(e){if(Hue(e))return e;throw new Wue(zue(e)+" is not an object")}});var PE=w(Sq=>{"use strict";m();T();N();var Xue=wu(),Zue=cD(),ece=_q(),RE=Np(),Oq=oD(),tce=TypeError,dD=Object.defineProperty,nce=Object.getOwnPropertyDescriptor,fD="enumerable",pD="configurable",mD="writable";Sq.f=Xue?ece?function(t,n,r){if(RE(t),n=Oq(n),RE(r),typeof t=="function"&&n==="prototype"&&"value"in r&&mD in r&&!r[mD]){var i=nce(t,n);i&&i[mD]&&(t[n]=r.value,r={configurable:pD in r?r[pD]:i[pD],enumerable:fD in r?r[fD]:i[fD],writable:!1})}return dD(t,n,r)}:dD:function(t,n,r){if(RE(t),n=Oq(n),RE(r),Zue)try{return dD(t,n,r)}catch(i){}if("get"in r||"set"in r)throw new tce("Accessors not supported");return"value"in r&&(t[n]=r.value),t}});var ND=w((PLe,Dq)=>{"use strict";m();T();N();var rce=wu(),ice=PE(),ace=KS();Dq.exports=rce?function(e,t,n){return ice.f(e,t,ace(1,n))}:function(e,t,n){return e[t]=n,e}});var Rq=w((CLe,Aq)=>{"use strict";m();T();N();var TD=wu(),sce=Lu(),bq=Function.prototype,oce=TD&&Object.getOwnPropertyDescriptor,ED=sce(bq,"name"),uce=ED&&function(){}.name==="something",cce=ED&&(!TD||TD&&oce(bq,"name").configurable);Aq.exports={EXISTS:ED,PROPER:uce,CONFIGURABLE:cce}});var Fq=w((MLe,Pq)=>{"use strict";m();T();N();var lce=Ii(),dce=Sa(),hD=AE(),fce=lce(Function.toString);dce(hD.inspectSource)||(hD.inspectSource=function(e){return fce(e)});Pq.exports=hD.inspectSource});var Cq=w((jLe,Lq)=>{"use strict";m();T();N();var pce=ta(),mce=Sa(),wq=pce.WeakMap;Lq.exports=mce(wq)&&/native code/.test(String(wq))});var kq=w((QLe,Uq)=>{"use strict";m();T();N();var Nce=iD(),Tce=aD(),Bq=Nce("keys");Uq.exports=function(e){return Bq[e]||(Bq[e]=Tce(e))}});var yD=w((zLe,Mq)=>{"use strict";m();T();N();Mq.exports={}});var jq=w((eCe,Vq)=>{"use strict";m();T();N();var Ece=Cq(),qq=ta(),hce=fd(),yce=ND(),ID=Lu(),gD=AE(),Ice=kq(),gce=yD(),xq="Object already initialized",_D=qq.TypeError,_ce=qq.WeakMap,FE,Tp,wE,vce=function(e){return wE(e)?Tp(e):FE(e,{})},Oce=function(e){return function(t){var n;if(!hce(t)||(n=Tp(t)).type!==e)throw new _D("Incompatible receiver, "+e+" required");return n}};Ece||gD.state?(ba=gD.state||(gD.state=new _ce),ba.get=ba.get,ba.has=ba.has,ba.set=ba.set,FE=function(e,t){if(ba.has(e))throw new _D(xq);return t.facade=e,ba.set(e,t),t},Tp=function(e){return ba.get(e)||{}},wE=function(e){return ba.has(e)}):(kc=Ice("state"),gce[kc]=!0,FE=function(e,t){if(ID(e,kc))throw new _D(xq);return t.facade=e,yce(e,kc,t),t},Tp=function(e){return ID(e,kc)?e[kc]:{}},wE=function(e){return ID(e,kc)});var ba,kc;Vq.exports={set:FE,get:Tp,has:wE,enforce:vce,getterFor:Oce}});var Qq=w((iCe,Gq)=>{"use strict";m();T();N();var OD=Ii(),Sce=ks(),Dce=Sa(),LE=Lu(),vD=wu(),bce=Rq().CONFIGURABLE,Ace=Fq(),$q=jq(),Rce=$q.enforce,Pce=$q.get,Kq=String,CE=Object.defineProperty,Fce=OD("".slice),wce=OD("".replace),Lce=OD([].join),Cce=vD&&!Sce(function(){return CE(function(){},"length",{value:8}).length!==8}),Bce=String(String).split("String"),Uce=Gq.exports=function(e,t,n){Fce(Kq(t),0,7)==="Symbol("&&(t="["+wce(Kq(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!LE(e,"name")||bce&&e.name!==t)&&(vD?CE(e,"name",{value:t,configurable:!0}):e.name=t),Cce&&n&&LE(n,"arity")&&e.length!==n.arity&&CE(e,"length",{value:n.arity});try{n&&LE(n,"constructor")&&n.constructor?vD&&CE(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=Rce(e);return LE(r,"source")||(r.source=Lce(Bce,typeof t=="string"?t:"")),e};Function.prototype.toString=Uce(function(){return Dce(this)&&Pce(this).source||Ace(this)},"toString")});var Jq=w((uCe,Yq)=>{"use strict";m();T();N();var kce=Sa(),Mce=PE(),xce=Qq(),qce=bE();Yq.exports=function(e,t,n,r){r||(r={});var i=r.enumerable,a=r.name!==void 0?r.name:t;if(kce(n)&&xce(n,a,r),r.global)i?e[t]=n:qce(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(o){}i?e[t]=n:Mce.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}});var zq=w((fCe,Hq)=>{"use strict";m();T();N();var Vce=Math.ceil,jce=Math.floor;Hq.exports=Math.trunc||function(t){var n=+t;return(n>0?jce:Vce)(n)}});var BE=w((TCe,Wq)=>{"use strict";m();T();N();var Kce=zq();Wq.exports=function(e){var t=+e;return t!==t||t===0?0:Kce(t)}});var Zq=w((ICe,Xq)=>{"use strict";m();T();N();var $ce=BE(),Gce=Math.max,Qce=Math.min;Xq.exports=function(e,t){var n=$ce(e);return n<0?Gce(n+t,0):Qce(n,t)}});var t1=w((OCe,e1)=>{"use strict";m();T();N();var Yce=BE(),Jce=Math.min;e1.exports=function(e){var t=Yce(e);return t>0?Jce(t,9007199254740991):0}});var r1=w((ACe,n1)=>{"use strict";m();T();N();var Hce=t1();n1.exports=function(e){return Hce(e.length)}});var s1=w((wCe,a1)=>{"use strict";m();T();N();var zce=vE(),Wce=Zq(),Xce=r1(),i1=function(e){return function(t,n,r){var i=zce(t),a=Xce(i);if(a===0)return!e&&-1;var o=Wce(r,a),u;if(e&&n!==n){for(;a>o;)if(u=i[o++],u!==u)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}};a1.exports={includes:i1(!0),indexOf:i1(!1)}});var c1=w((UCe,u1)=>{"use strict";m();T();N();var Zce=Ii(),SD=Lu(),ele=vE(),tle=s1().indexOf,nle=yD(),o1=Zce([].push);u1.exports=function(e,t){var n=ele(e),r=0,i=[],a;for(a in n)!SD(nle,a)&&SD(n,a)&&o1(i,a);for(;t.length>r;)SD(n,a=t[r++])&&(~tle(i,a)||o1(i,a));return i}});var d1=w((qCe,l1)=>{"use strict";m();T();N();l1.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var p1=w(f1=>{"use strict";m();T();N();var rle=c1(),ile=d1(),ale=ile.concat("length","prototype");f1.f=Object.getOwnPropertyNames||function(t){return rle(t,ale)}});var N1=w(m1=>{"use strict";m();T();N();m1.f=Object.getOwnPropertySymbols});var E1=w((XCe,T1)=>{"use strict";m();T();N();var sle=OE(),ole=Ii(),ule=p1(),cle=N1(),lle=Np(),dle=ole([].concat);T1.exports=sle("Reflect","ownKeys")||function(t){var n=ule.f(lle(t)),r=cle.f;return r?dle(n,r(t)):n}});var I1=w((nBe,y1)=>{"use strict";m();T();N();var h1=Lu(),fle=E1(),ple=lD(),mle=PE();y1.exports=function(e,t,n){for(var r=fle(t),i=mle.f,a=ple.f,o=0;o{"use strict";m();T();N();var Nle=ks(),Tle=Sa(),Ele=/#|\.prototype\./,Ep=function(e,t){var n=yle[hle(e)];return n===gle?!0:n===Ile?!1:Tle(t)?Nle(t):!!t},hle=Ep.normalize=function(e){return String(e).replace(Ele,".").toLowerCase()},yle=Ep.data={},Ile=Ep.NATIVE="N",gle=Ep.POLYFILL="P";g1.exports=Ep});var DD=w((lBe,v1)=>{"use strict";m();T();N();var UE=ta(),_le=lD().f,vle=ND(),Ole=Jq(),Sle=bE(),Dle=I1(),ble=_1();v1.exports=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,u,l,d,p;if(r?o=UE:i?o=UE[n]||Sle(n,{}):o=UE[n]&&UE[n].prototype,o)for(u in t){if(d=t[u],e.dontCallGetSet?(p=_le(o,u),l=p&&p.value):l=o[u],a=ble(r?u:n+(i?".":"#")+u,e.forced),!a&&l!==void 0){if(typeof d==typeof l)continue;Dle(d,l)}(e.sham||l&&l.sham)&&vle(d,"sham",!0),Ole(o,u,d,e)}}});var hp=w((mBe,O1)=>{"use strict";m();T();N();var bD=Ii(),kE=Set.prototype;O1.exports={Set,add:bD(kE.add),has:bD(kE.has),remove:bD(kE.delete),proto:kE}});var AD=w((hBe,S1)=>{"use strict";m();T();N();var Ale=hp().has;S1.exports=function(e){return Ale(e),e}});var b1=w((_Be,D1)=>{"use strict";m();T();N();var Rle=Ii(),Ple=DE();D1.exports=function(e,t,n){try{return Rle(Ple(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}}});var RD=w((DBe,A1)=>{"use strict";m();T();N();var Fle=b1(),wle=hp();A1.exports=Fle(wle.proto,"size","get")||function(e){return e.size}});var PD=w((PBe,R1)=>{"use strict";m();T();N();var Lle=Uc();R1.exports=function(e,t,n){for(var r=n?e:e.iterator,i=e.next,a,o;!(a=Lle(i,r)).done;)if(o=t(a.value),o!==void 0)return o}});var B1=w((CBe,C1)=>{"use strict";m();T();N();var P1=Ii(),Cle=PD(),F1=hp(),Ble=F1.Set,w1=F1.proto,Ule=P1(w1.forEach),L1=P1(w1.keys),kle=L1(new Ble).next;C1.exports=function(e,t,n){return n?Cle({iterator:L1(e),next:kle},t):Ule(e,t)}});var k1=w((MBe,U1)=>{"use strict";m();T();N();U1.exports=function(e){return{iterator:e,next:e.next,done:!1}}});var FD=w((jBe,K1)=>{"use strict";m();T();N();var M1=DE(),V1=Np(),x1=Uc(),Mle=BE(),xle=k1(),q1="Invalid size",qle=RangeError,Vle=TypeError,jle=Math.max,j1=function(e,t){this.set=e,this.size=jle(t,0),this.has=M1(e.has),this.keys=M1(e.keys)};j1.prototype={getIterator:function(){return xle(V1(x1(this.keys,this.set)))},includes:function(e){return x1(this.has,this.set,e)}};K1.exports=function(e){V1(e);var t=+e.size;if(t!==t)throw new Vle(q1);var n=Mle(t);if(n<0)throw new qle(q1);return new j1(e,n)}});var G1=w((QBe,$1)=>{"use strict";m();T();N();var Kle=AD(),$le=RD(),Gle=B1(),Qle=FD();$1.exports=function(t){var n=Kle(this),r=Qle(t);return $le(n)>r.size?!1:Gle(n,function(i){if(!r.includes(i))return!1},!0)!==!1}});var wD=w((zBe,J1)=>{"use strict";m();T();N();var Yle=OE(),Q1=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},Y1=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};J1.exports=function(e,t){var n=Yle("Set");try{new n()[e](Q1(0));try{return new n()[e](Q1(-1)),!1}catch(i){if(!t)return!0;try{return new n()[e](Y1(-1/0)),!1}catch(a){var r=new n;return r.add(1),r.add(2),t(r[e](Y1(1/0)))}}}catch(i){return!1}}});var H1=w(()=>{"use strict";m();T();N();var Jle=DD(),Hle=G1(),zle=wD(),Wle=!zle("isSubsetOf",function(e){return e});Jle({target:"Set",proto:!0,real:!0,forced:Wle},{isSubsetOf:Hle})});var z1=w(()=>{"use strict";m();T();N();H1()});var Z1=w((lUe,X1)=>{"use strict";m();T();N();var Xle=Uc(),W1=Np(),Zle=eD();X1.exports=function(e,t,n){var r,i;W1(e);try{if(r=Zle(e,"return"),!r){if(t==="throw")throw n;return n}r=Xle(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return W1(r),n}});var tV=w((mUe,eV)=>{"use strict";m();T();N();var ede=AD(),tde=hp().has,nde=RD(),rde=FD(),ide=PD(),ade=Z1();eV.exports=function(t){var n=ede(this),r=rde(t);if(nde(n){"use strict";m();T();N();var sde=DD(),ode=tV(),ude=wD(),cde=!ude("isSupersetOf",function(e){return!e});sde({target:"Set",proto:!0,real:!0,forced:cde},{isSupersetOf:ode})});var rV=w(()=>{"use strict";m();T();N();nV()});var yp=w(Fn=>{"use strict";m();T();N();Object.defineProperty(Fn,"__esModule",{value:!0});Fn.subtractSet=dde;Fn.mapToArrayOfValues=fde;Fn.kindToConvertedTypeString=pde;Fn.fieldDatasToSimpleFieldDatas=mde;Fn.isNodeLeaf=Nde;Fn.newEntityInterfaceFederationData=Tde;Fn.upsertEntityInterfaceFederationData=Ede;Fn.upsertEntityData=yde;Fn.updateEntityData=iV;Fn.newFieldAuthorizationData=Ide;Fn.newAuthorizationData=gde;Fn.addScopes=LD;Fn.mergeRequiredScopesByAND=qE;Fn.mergeRequiredScopesByOR=CD;Fn.upsertFieldAuthorizationData=aV;Fn.upsertAuthorizationData=Ode;Fn.upsertAuthorizationConfiguration=Sde;Fn.isObjectNodeKind=Dde;Fn.isCompositeOutputNodeKind=bde;Fn.isObjectDefinitionData=Ade;Fn.getNodeCoords=Rde;var $t=Ie(),ai=zn(),ME=wr(),xE=Du();z1();rV();var lde=dd();function dde(e,t){for(let n of e)t.delete(n)}function fde(e){let t=[];for(let n of e.values())t.push(n);return t}function pde(e){switch(e){case $t.Kind.BOOLEAN:return ai.BOOLEAN_SCALAR;case $t.Kind.ENUM:case $t.Kind.ENUM_TYPE_DEFINITION:case $t.Kind.ENUM_TYPE_EXTENSION:return ai.ENUM;case $t.Kind.ENUM_VALUE_DEFINITION:return ai.ENUM_VALUE;case $t.Kind.FIELD_DEFINITION:return ai.FIELD;case $t.Kind.FLOAT:return ai.FLOAT_SCALAR;case $t.Kind.INPUT_OBJECT_TYPE_DEFINITION:case $t.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ai.INPUT_OBJECT;case $t.Kind.INPUT_VALUE_DEFINITION:return ai.INPUT_VALUE;case $t.Kind.INT:return ai.INT_SCALAR;case $t.Kind.INTERFACE_TYPE_DEFINITION:case $t.Kind.INTERFACE_TYPE_EXTENSION:return ai.INTERFACE;case $t.Kind.NULL:return ai.NULL;case $t.Kind.OBJECT:case $t.Kind.OBJECT_TYPE_DEFINITION:case $t.Kind.OBJECT_TYPE_EXTENSION:return ai.OBJECT;case $t.Kind.STRING:return ai.STRING_SCALAR;case $t.Kind.SCALAR_TYPE_DEFINITION:case $t.Kind.SCALAR_TYPE_EXTENSION:return ai.SCALAR;case $t.Kind.UNION_TYPE_DEFINITION:case $t.Kind.UNION_TYPE_EXTENSION:return ai.UNION;default:return e}}function mde(e){let t=[];for(let{name:n,namedTypeName:r}of e)t.push({name:n,namedTypeName:r});return t}function Nde(e){if(!e)return!0;switch(e){case $t.Kind.OBJECT_TYPE_DEFINITION:case $t.Kind.INTERFACE_TYPE_DEFINITION:case $t.Kind.UNION_TYPE_DEFINITION:return!1;default:return!0}}function Tde(e,t){return{concreteTypeNames:new Set(e.concreteTypeNames),fieldDatasBySubgraphName:new Map([[t,e.fieldDatas]]),interfaceFieldNames:new Set(e.interfaceFieldNames),interfaceObjectFieldNames:new Set(e.interfaceObjectFieldNames),interfaceObjectSubgraphNames:new Set(e.isInterfaceObject?[t]:[]),subgraphDataByTypeName:new Map([[t,e]]),typeName:e.typeName}}function Ede(e,t,n){(0,ME.addIterableToSet)({source:t.concreteTypeNames,target:e.concreteTypeNames}),e.subgraphDataByTypeName.set(n,t),e.fieldDatasBySubgraphName.set(n,t.fieldDatas),(0,ME.addIterableToSet)({source:t.interfaceFieldNames,target:e.interfaceFieldNames}),(0,ME.addIterableToSet)({source:t.interfaceObjectFieldNames,target:e.interfaceObjectFieldNames}),t.isInterfaceObject&&e.interfaceObjectSubgraphNames.add(n)}function hde({keyFieldSetDataByFieldSet:e,subgraphName:t,typeName:n}){let r=new Map([[t,e]]),i=new Map;for(let[a,{documentNode:o,isUnresolvable:u}]of e)u||i.set(a,o);return{keyFieldSetDatasBySubgraphName:r,documentNodeByKeyFieldSet:i,keyFieldSets:new Set,subgraphNames:new Set([t]),typeName:n}}function yde({entityDataByTypeName:e,keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}){let i=e.get(r);i?iV({entityData:i,keyFieldSetDataByFieldSet:t,subgraphName:n}):e.set(r,hde({keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}))}function iV({entityData:e,keyFieldSetDataByFieldSet:t,subgraphName:n}){e.subgraphNames.add(n);let r=e.keyFieldSetDatasBySubgraphName.get(n);if(!r){e.keyFieldSetDatasBySubgraphName.set(n,t);for(let[i,{documentNode:a,isUnresolvable:o}]of t)o||e.documentNodeByKeyFieldSet.set(i,a);return}for(let[i,a]of t){a.isUnresolvable||e.documentNodeByKeyFieldSet.set(i,a.documentNode);let o=r.get(i);if(o){o.isUnresolvable||(o.isUnresolvable=a.isUnresolvable);continue}r.set(i,a)}}function Ide(e){return{fieldName:e,inheritedData:{requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1},originalData:{requiredScopes:[],requiresAuthentication:!1}}}function gde(e){return{fieldAuthDataByFieldName:new Map,requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1,typeName:e}}function LD(e,t){for(let n=e.length-1;n>-1;n--){if(e[n].isSubsetOf(t))return;e[n].isSupersetOf(t)&&e.splice(n,1)}e.push(t)}function qE(e,t){if(e.length<1||t.length<1){for(let r of t)e.push(new Set(r));return e}let n=[];for(let r of t)for(let i of e){let a=(0,ME.addSets)(r,i);LD(n,a)}return n}function CD(e,t){for(let n of t)LD(e,n);return e.length<=xE.MAX_OR_SCOPES}function aV(e,t){var i,a;let n=t.fieldName,r=e.get(n);return r?((i=r.inheritedData).requiresAuthentication||(i.requiresAuthentication=t.inheritedData.requiresAuthentication),(a=r.originalData).requiresAuthentication||(a.requiresAuthentication=t.originalData.requiresAuthentication),!CD(r.inheritedData.requiredScopesByOR,t.inheritedData.requiredScopes)||r.inheritedData.requiredScopes.length*t.inheritedData.requiredScopes.length>xE.MAX_OR_SCOPES||r.originalData.requiredScopes.length*t.originalData.requiredScopes.length>xE.MAX_OR_SCOPES?!1:(r.inheritedData.requiredScopes=qE(r.inheritedData.requiredScopes,t.inheritedData.requiredScopes),r.originalData.requiredScopes=qE(r.originalData.requiredScopes,t.originalData.requiredScopes),!0)):(e.set(n,sV(t)),!0)}function _de(e){let t=new Map;for(let[n,r]of e)t.set(n,sV(r));return t}function sV(e){return{fieldName:e.fieldName,inheritedData:{requiredScopes:[...e.inheritedData.requiredScopes],requiredScopesByOR:[...e.inheritedData.requiredScopes],requiresAuthentication:e.inheritedData.requiresAuthentication},originalData:{requiredScopes:[...e.originalData.requiredScopes],requiresAuthentication:e.originalData.requiresAuthentication}}}function vde(e){return{fieldAuthDataByFieldName:_de(e.fieldAuthDataByFieldName),requiredScopes:[...e.requiredScopes],requiredScopesByOR:[...e.requiredScopes],requiresAuthentication:e.requiresAuthentication,typeName:e.typeName}}function Ode(e,t,n){let r=e.get(t.typeName);if(!r){e.set(t.typeName,vde(t));return}r.requiresAuthentication||(r.requiresAuthentication=t.requiresAuthentication),!CD(r.requiredScopesByOR,t.requiredScopes)||r.requiredScopes.length*t.requiredScopes.length>xE.MAX_OR_SCOPES?n.add(t.typeName):r.requiredScopes=qE(r.requiredScopes,t.requiredScopes);for(let[i,a]of t.fieldAuthDataByFieldName)aV(r.fieldAuthDataByFieldName,a)||n.add(`${t.typeName}.${i}`)}function Sde(e,t){let n=t.typeName;for(let[r,i]of t.fieldAuthDataByFieldName){let a=`${n}.${r}`,o=e.get(a);o?(o.requiresAuthentication=i.inheritedData.requiresAuthentication,o.requiredScopes=i.inheritedData.requiredScopes.map(u=>[...u]),o.requiredScopesByOR=i.inheritedData.requiredScopesByOR.map(u=>[...u])):e.set(a,{argumentNames:[],typeName:n,fieldName:r,requiresAuthentication:i.inheritedData.requiresAuthentication,requiredScopes:i.inheritedData.requiredScopes.map(u=>[...u]),requiredScopesByOR:i.inheritedData.requiredScopesByOR.map(u=>[...u])})}}function Dde(e){return e===$t.Kind.OBJECT_TYPE_DEFINITION||e===$t.Kind.OBJECT_TYPE_EXTENSION}function bde(e){return lde.COMPOSITE_OUTPUT_NODE_KINDS.has(e)}function Ade(e){return e?e.kind===$t.Kind.OBJECT_TYPE_DEFINITION:!1}function Rde(e){switch(e.kind){case $t.Kind.ARGUMENT:case $t.Kind.FIELD_DEFINITION:case $t.Kind.INPUT_VALUE_DEFINITION:case $t.Kind.ENUM_VALUE_DEFINITION:return e.federatedCoords;default:return e.name}}});var BD=w(Ke=>{"use strict";m();T();N();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.TAG_DEFINITION_DATA=Ke.SUBSCRIPTION_FILTER_DEFINITION_DATA=Ke.SHAREABLE_DEFINITION_DATA=Ke.SPECIFIED_BY_DEFINITION_DATA=Ke.SEMANTIC_NON_NULL_DATA=Ke.REQUIRES_SCOPES_DEFINITION_DATA=Ke.REQUIRE_FETCH_REASONS_DEFINITION_DATA=Ke.REDIS_SUBSCRIBE_DEFINITION_DATA=Ke.REDIS_PUBLISH_DEFINITION_DATA=Ke.REQUIRES_DEFINITION_DATA=Ke.PROVIDES_DEFINITION_DATA=Ke.LINK_DEFINITION_DATA=Ke.KEY_DEFINITION_DATA=Ke.OVERRIDE_DEFINITION_DATA=Ke.ONE_OF_DEFINITION_DATA=Ke.NATS_SUBSCRIBE_DEFINITION_DATA=Ke.NATS_REQUEST_DEFINITION_DATA=Ke.NATS_PUBLISH_DEFINITION_DATA=Ke.KAFKA_SUBSCRIBE_DEFINITION_DATA=Ke.KAFKA_PUBLISH_DEFINITION_DATA=Ke.INTERFACE_OBJECT_DEFINITION_DATA=Ke.INACCESSIBLE_DEFINITION_DATA=Ke.EXTERNAL_DEFINITION_DATA=Ke.EXTENDS_DEFINITION_DATA=Ke.DEPRECATED_DEFINITION_DATA=Ke.CONNECT_FIELD_RESOLVER_DEFINITION_DATA=Ke.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA=Ke.CONFIGURE_DESCRIPTION_DEFINITION_DATA=Ke.COMPOSE_DIRECTIVE_DEFINITION_DATA=Ke.AUTHENTICATED_DEFINITION_DATA=void 0;var na=Fr(),Gt=Ie(),x=zn(),en=Qf(),wn=hT();Ke.AUTHENTICATED_DEFINITION_DATA={argumentTypeNodeByName:new Map([]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER]),name:x.AUTHENTICATED,node:en.AUTHENTICATED_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.COMPOSE_DIRECTIVE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.NAME,{name:x.NAME,typeNode:wn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([x.SCHEMA_UPPER]),name:x.COMPOSE_DIRECTIVE,node:en.COMPOSE_DIRECTIVE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.NAME])};Ke.CONFIGURE_DESCRIPTION_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.PROPAGATE,{name:x.PROPAGATE,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.BOOLEAN_SCALAR)},defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}],[x.DESCRIPTION_OVERRIDE,{name:x.DESCRIPTION_OVERRIDE,typeNode:(0,na.stringToNamedTypeNode)(x.STRING_SCALAR)}]]),isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.INPUT_OBJECT_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.SCHEMA_UPPER,x.UNION_UPPER]),name:x.CONFIGURE_DESCRIPTION,node:en.CONFIGURE_DESCRIPTION_DEFINITION,optionalArgumentNames:new Set([x.PROPAGATE,x.DESCRIPTION_OVERRIDE]),requiredArgumentNames:new Set};Ke.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.PROPAGATE,{name:x.PROPAGATE,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.BOOLEAN_SCALAR)},defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.CONFIGURE_CHILD_DESCRIPTIONS,node:en.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION,optionalArgumentNames:new Set([x.PROPAGATE]),requiredArgumentNames:new Set};Ke.CONNECT_FIELD_RESOLVER_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CONTEXT,{name:x.CONTEXT,typeNode:wn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.CONNECT_FIELD_RESOLVER,node:en.CONNECT_FIELD_RESOLVER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.CONTEXT])};Ke.DEPRECATED_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.REASON,{name:x.REASON,typeNode:(0,na.stringToNamedTypeNode)(x.STRING_SCALAR),defaultValue:{kind:Gt.Kind.STRING,value:Gt.DEFAULT_DEPRECATION_REASON}}]]),isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER]),name:x.DEPRECATED,node:en.DEPRECATED_DEFINITION,optionalArgumentNames:new Set([x.REASON]),requiredArgumentNames:new Set};Ke.EXTENDS_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.EXTENDS,node:en.EXTENDS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.EXTERNAL_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER,x.OBJECT_UPPER]),name:x.EXTERNAL,node:en.EXTERNAL_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.INACCESSIBLE_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.UNION_UPPER]),name:x.INACCESSIBLE,node:en.INACCESSIBLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.INTERFACE_OBJECT_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.OBJECT_UPPER]),name:x.INTERFACE_OBJECT,node:en.INTERFACE_OBJECT_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.KAFKA_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.TOPIC,{name:x.TOPIC,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_KAFKA_PUBLISH,node:en.EDFS_KAFKA_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.TOPIC])};Ke.KAFKA_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.TOPICS,{name:x.TOPICS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:wn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_KAFKA_SUBSCRIBE,node:en.EDFS_KAFKA_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.TOPICS])};Ke.NATS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECT,{name:x.SUBJECT,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_PUBLISH,node:en.EDFS_NATS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.SUBJECT])};Ke.NATS_REQUEST_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECT,{name:x.SUBJECT,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_REQUEST,node:en.EDFS_NATS_REQUEST_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.SUBJECT])};Ke.NATS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECTS,{name:x.SUBJECTS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:wn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}],[x.STREAM_CONFIGURATION,{name:x.STREAM_CONFIGURATION,typeNode:(0,na.stringToNamedTypeNode)(x.EDFS_NATS_STREAM_CONFIGURATION)}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_SUBSCRIBE,node:en.EDFS_NATS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID,x.STREAM_CONFIGURATION]),requiredArgumentNames:new Set([x.SUBJECTS])};Ke.ONE_OF_DEFINITION_DATA={argumentTypeNodeByName:new Map([]),isRepeatable:!1,locations:new Set([x.INPUT_OBJECT_UPPER]),name:x.ONE_OF,node:en.ONE_OF_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.OVERRIDE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FROM,{name:x.FROM,typeNode:wn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.OVERRIDE,node:en.OVERRIDE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FROM])};Ke.KEY_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:wn.REQUIRED_FIELDSET_TYPE_NODE}],[x.RESOLVABLE,{name:x.RESOLVABLE,typeNode:(0,na.stringToNamedTypeNode)(x.BOOLEAN_SCALAR),defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!0,locations:new Set([x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.KEY,node:en.KEY_DEFINITION,optionalArgumentNames:new Set([x.RESOLVABLE]),requiredArgumentNames:new Set([x.FIELDS])};Ke.LINK_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.URL_LOWER,{name:x.URL_LOWER,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.AS,{name:x.AS,typeNode:(0,na.stringToNamedTypeNode)(x.STRING_SCALAR)}],[x.FOR,{name:x.FOR,typeNode:(0,na.stringToNamedTypeNode)(x.LINK_PURPOSE)}],[x.IMPORT,{name:x.IMPORT,typeNode:{kind:Gt.Kind.LIST_TYPE,type:(0,na.stringToNamedTypeNode)(x.LINK_IMPORT)}}]]),isRepeatable:!0,locations:new Set([x.SCHEMA_UPPER]),name:x.LINK,node:en.LINK_DEFINITION,optionalArgumentNames:new Set([x.AS,x.FOR,x.IMPORT]),requiredArgumentNames:new Set([x.URL_LOWER])};Ke.PROVIDES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:wn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.PROVIDES,node:en.PROVIDES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FIELDS])};Ke.REQUIRES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:wn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.REQUIRES,node:en.REQUIRES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FIELDS])};Ke.REDIS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CHANNEL,{name:x.CHANNEL,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_REDIS_PUBLISH,node:en.EDFS_REDIS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.CHANNEL])};Ke.REDIS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CHANNELS,{name:x.CHANNELS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:wn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_REDIS_SUBSCRIBE,node:en.EDFS_REDIS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.CHANNELS])};Ke.REQUIRE_FETCH_REASONS_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!0,locations:new Set([x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.REQUIRE_FETCH_REASONS,node:en.REQUIRE_FETCH_REASONS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.REQUIRES_SCOPES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SCOPES,{name:x.SCOPES,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.SCOPE_SCALAR)}}}}}}]]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER]),name:x.REQUIRES_SCOPES,node:en.REQUIRES_SCOPES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.SCOPES])};Ke.SEMANTIC_NON_NULL_DATA={argumentTypeNodeByName:new Map([[x.LEVELS,{name:x.LEVELS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.INT_SCALAR)}}},defaultValue:{kind:Gt.Kind.LIST,values:[{kind:Gt.Kind.INT,value:"0"}]}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.SEMANTIC_NON_NULL,node:en.SEMANTIC_NON_NULL_DEFINITION,optionalArgumentNames:new Set([x.LEVELS]),requiredArgumentNames:new Set};Ke.SPECIFIED_BY_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.URL_LOWER,{name:x.URL_LOWER,typeNode:wn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.SCALAR_UPPER]),name:x.SPECIFIED_BY,node:en.SPECIFIED_BY_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.URL_LOWER])};Ke.SHAREABLE_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!0,locations:new Set([x.FIELD_DEFINITION_UPPER,x.OBJECT_UPPER]),name:x.SHAREABLE,node:en.SHAREABLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.SUBSCRIPTION_FILTER_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CONDITION,{name:x.CONDITION,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.SUBSCRIPTION_FILTER_CONDITION)}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.SUBSCRIPTION_FILTER,node:en.SUBSCRIPTION_FILTER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.CONDITION])};Ke.TAG_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.NAME,{name:x.NAME,typeNode:wn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.UNION_UPPER]),name:x.TAG,node:en.TAG_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.NAME])}});var Ip=w(Aa=>{"use strict";m();T();N();Object.defineProperty(Aa,"__esModule",{value:!0});Aa.newFieldSetData=Pde;Aa.extractFieldSetValue=Fde;Aa.getNormalizedFieldSet=wde;Aa.getInitialFieldCoordsPath=Lde;Aa.validateKeyFieldSets=Cde;Aa.getConditionalFieldSetDirectiveName=Bde;Aa.isNodeQuery=Ude;Aa.validateArgumentTemplateReferences=kde;Aa.initializeDirectiveDefinitionDatas=Mde;var $n=Ie(),oV=Fr(),Or=$i(),uV=Du(),UD=Su(),tn=BD(),It=zn(),Ms=wr();function Pde(){return{provides:new Map,requires:new Map}}function Fde(e,t,n){if(!n||n.length>1)return;let r=n[0].arguments;if(!r||r.length!==1)return;let i=r[0];i.name.value!==It.FIELDS||i.value.kind!==$n.Kind.STRING||t.set(e,i.value.value)}function wde(e){return(0,$n.print)((0,oV.lexicographicallySortDocumentNode)(e)).replaceAll(/\s+/g," ").slice(2,-2)}function Lde(e,t){return e?[t]:[]}function Cde(e,t,n){let r=e.entityInterfaceDataByTypeName.get(t.name),i=t.name,a=[],o=r?void 0:e.internalGraph.addEntityDataNode(t.name),u=e.internalGraph.addOrUpdateNode(t.name),l=0;for(let[d,{documentNode:p,isUnresolvable:E,rawFieldSet:I}]of n){r&&(r.resolvable||(r.resolvable=!E)),l+=1;let v=[],A=[t],U=[],j=[],Q=new Set,ee=-1,ne=!0,pe="",le=!1;if((0,$n.visit)(p,{Argument:{enter(Ae){return v.push((0,Or.unexpectedArgumentErrorMessage)(I,`${A[ee].name}.${pe}`,Ae.name.value)),$n.BREAK}},Field:{enter(Ae){let Me=A[ee],Ze=Me.name;if(ne){let xt=`${Ze}.${pe}`,an=Me.fieldDataByName.get(pe);if(!an)return v.push((0,Or.undefinedFieldInFieldSetErrorMessage)(I,xt,pe)),$n.BREAK;let kr=(0,UD.getTypeNodeNamedTypeName)(an.node.type),nr=e.parentDefinitionDataByTypeName.get(kr),En=nr?nr.kind:$n.Kind.SCALAR_TYPE_DEFINITION;return v.push((0,Or.invalidSelectionSetErrorMessage)(I,[xt],kr,(0,Ms.kindToNodeType)(En))),$n.BREAK}let Z=Ae.name.value,ve=`${Ze}.${Z}`;if(pe=Z,Z===It.TYPENAME)return;let gt=Me.fieldDataByName.get(Z);if(!gt)return v.push((0,Or.undefinedFieldInFieldSetErrorMessage)(I,Ze,Z)),$n.BREAK;if(gt.argumentDataByName.size)return v.push((0,Or.argumentsInKeyFieldSetErrorMessage)(I,ve)),$n.BREAK;if(U[ee].has(Z))return v.push((0,Or.duplicateFieldInFieldSetErrorMessage)(I,ve)),$n.BREAK;let rn=gt.externalFieldDataBySubgraphName.get(e.subgraphName);if(!e.isSubgraphEventDrivenGraph&&(rn!=null&&rn.isDefinedExternal)&&!rn.isUnconditionallyProvided&&!e.conditionalFieldDataByCoords.get(ve)){le=!0;let an=u.headToTailEdges.get(Z);an&&(an.isExternal=!0)}(0,Ms.getValueOrDefault)((0,Ms.getValueOrDefault)(e.keyFieldSetsByEntityTypeNameByFieldCoords,ve,()=>new Map),i,()=>new Set).add(d),j.push(Z),gt.isShareableBySubgraphName.set(e.subgraphName,!0),U[ee].add(Z),(0,Ms.getValueOrDefault)(e.keyFieldNamesByParentTypeName,Ze,()=>new Set).add(Z);let un=(0,UD.getTypeNodeNamedTypeName)(gt.node.type);if(uV.BASE_SCALARS.has(un)){Q.add(j.join(It.LITERAL_PERIOD)),j.pop();return}let In=e.parentDefinitionDataByTypeName.get(un);if(!In)return v.push((0,Or.unknownTypeInFieldSetErrorMessage)(I,ve,un)),$n.BREAK;if(In.kind===$n.Kind.OBJECT_TYPE_DEFINITION){ne=!0,A.push(In);return}if((0,oV.isKindAbstract)(In.kind))return v.push((0,Or.abstractTypeInKeyFieldSetErrorMessage)(I,ve,un,(0,Ms.kindToNodeType)(In.kind))),$n.BREAK;Q.add(j.join(It.LITERAL_PERIOD)),j.pop()}},InlineFragment:{enter(){return v.push(Or.inlineFragmentInFieldSetErrorMessage),$n.BREAK}},SelectionSet:{enter(){if(!ne){let Ae=A[ee],Ze=`${Ae.name}.${pe}`;if(pe===It.TYPENAME)return v.push((0,Or.invalidSelectionSetDefinitionErrorMessage)(I,[Ze],It.STRING_SCALAR,(0,Ms.kindToNodeType)($n.Kind.SCALAR_TYPE_DEFINITION))),$n.BREAK;let Z=Ae.fieldDataByName.get(pe);if(!Z)return v.push((0,Or.undefinedFieldInFieldSetErrorMessage)(I,Ze,pe)),$n.BREAK;let ve=(0,UD.getTypeNodeNamedTypeName)(Z.node.type),gt=e.parentDefinitionDataByTypeName.get(ve),rn=gt?gt.kind:$n.Kind.SCALAR_TYPE_DEFINITION;return v.push((0,Or.invalidSelectionSetDefinitionErrorMessage)(I,[Ze],ve,(0,Ms.kindToNodeType)(rn))),$n.BREAK}if(ee+=1,ne=!1,ee<0||ee>=A.length)return v.push((0,Or.unparsableFieldSetSelectionErrorMessage)(I,pe)),$n.BREAK;U.push(new Set)},leave(){if(ne){let Me=A[ee].name,Ze=A[ee+1],Z=`${Me}.${pe}`;v.push((0,Or.invalidSelectionSetErrorMessage)(I,[Z],Ze.name,(0,Ms.kindToNodeType)(Ze.kind))),ne=!1}ee-=1,A.pop(),U.pop()}}}),v.length>0){e.errors.push((0,Or.invalidDirectiveError)(It.KEY,i,(0,Ms.numberToOrdinal)(l),v));continue}a.push(k({fieldName:"",selectionSet:d},E?{disableEntityResolver:!0}:{})),u.satisfiedFieldSets.add(d),le&&u.externalFieldSets.add(d),!E&&(o==null||o.addTargetSubgraphByFieldSet(d,e.subgraphName))}if(a.length>0)return a}function Bde(e){return e?It.PROVIDES:It.REQUIRES}function Ude(e,t){return e===It.QUERY||t===$n.OperationTypeNode.QUERY}function kde(e,t,n){let r=e.matchAll(uV.EDFS_ARGS_REGEXP),i=new Set,a=new Set;for(let o of r){if(o.length<2){a.add(o[0]);continue}t.has(o[1])||i.add(o[1])}for(let o of i)n.push((0,Or.undefinedEventSubjectsArgumentErrorMessage)(o));for(let o of a)n.push((0,Or.invalidEventSubjectsArgumentErrorMessage)(o))}function Mde(){return new Map([[It.AUTHENTICATED,tn.AUTHENTICATED_DEFINITION_DATA],[It.COMPOSE_DIRECTIVE,tn.COMPOSE_DIRECTIVE_DEFINITION_DATA],[It.CONFIGURE_DESCRIPTION,tn.CONFIGURE_DESCRIPTION_DEFINITION_DATA],[It.CONFIGURE_CHILD_DESCRIPTIONS,tn.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA],[It.CONNECT_FIELD_RESOLVER,tn.CONNECT_FIELD_RESOLVER_DEFINITION_DATA],[It.DEPRECATED,tn.DEPRECATED_DEFINITION_DATA],[It.EDFS_KAFKA_PUBLISH,tn.KAFKA_PUBLISH_DEFINITION_DATA],[It.EDFS_KAFKA_SUBSCRIBE,tn.KAFKA_SUBSCRIBE_DEFINITION_DATA],[It.EDFS_NATS_PUBLISH,tn.NATS_PUBLISH_DEFINITION_DATA],[It.EDFS_NATS_REQUEST,tn.NATS_REQUEST_DEFINITION_DATA],[It.EDFS_NATS_SUBSCRIBE,tn.NATS_SUBSCRIBE_DEFINITION_DATA],[It.EDFS_REDIS_PUBLISH,tn.REDIS_PUBLISH_DEFINITION_DATA],[It.EDFS_REDIS_SUBSCRIBE,tn.REDIS_SUBSCRIBE_DEFINITION_DATA],[It.EXTENDS,tn.EXTENDS_DEFINITION_DATA],[It.EXTERNAL,tn.EXTERNAL_DEFINITION_DATA],[It.INACCESSIBLE,tn.INACCESSIBLE_DEFINITION_DATA],[It.INTERFACE_OBJECT,tn.INTERFACE_OBJECT_DEFINITION_DATA],[It.KEY,tn.KEY_DEFINITION_DATA],[It.LINK,tn.LINK_DEFINITION_DATA],[It.ONE_OF,tn.ONE_OF_DEFINITION_DATA],[It.OVERRIDE,tn.OVERRIDE_DEFINITION_DATA],[It.PROVIDES,tn.PROVIDES_DEFINITION_DATA],[It.REQUIRE_FETCH_REASONS,tn.REQUIRE_FETCH_REASONS_DEFINITION_DATA],[It.REQUIRES,tn.REQUIRES_DEFINITION_DATA],[It.REQUIRES_SCOPES,tn.REQUIRES_SCOPES_DEFINITION_DATA],[It.SEMANTIC_NON_NULL,tn.SEMANTIC_NON_NULL_DATA],[It.SHAREABLE,tn.SHAREABLE_DEFINITION_DATA],[It.SPECIFIED_BY,tn.SPECIFIED_BY_DEFINITION_DATA],[It.SUBSCRIPTION_FILTER,tn.SUBSCRIPTION_FILTER_DEFINITION_DATA],[It.TAG,tn.TAG_DEFINITION_DATA]])}});var MD=w(kD=>{"use strict";m();T();N();Object.defineProperty(kD,"__esModule",{value:!0});kD.recordSubgraphName=xde;function xde(e,t,n){if(!t.has(e)){t.add(e);return}n.add(e)}});var qD=w(VE=>{"use strict";m();T();N();Object.defineProperty(VE,"__esModule",{value:!0});VE.Warning=void 0;var xD=class extends Error{constructor(n){super(n.message);g(this,"subgraph");this.name="Warning",this.subgraph=n.subgraph}};VE.Warning=xD});var gp=w(gi=>{"use strict";m();T();N();Object.defineProperty(gi,"__esModule",{value:!0});gi.invalidOverrideTargetSubgraphNameWarning=qde;gi.externalInterfaceFieldsWarning=Vde;gi.nonExternalConditionalFieldWarning=jde;gi.unimplementedInterfaceOutputTypeWarning=Kde;gi.invalidExternalFieldWarning=$de;gi.requiresDefinedOnNonEntityFieldWarning=Gde;gi.consumerInactiveThresholdInvalidValueWarning=Qde;gi.externalEntityExtensionKeyFieldWarning=Yde;gi.fieldAlreadyProvidedWarning=Jde;gi.singleSubgraphInputFieldOneOfWarning=Hde;gi.singleFederatedInputFieldOneOfWarning=zde;var Ra=qD(),VD=zn();function qde(e,t,n,r){return new Ra.Warning({message:`The Object type "${t}" defines the directive "@override(from: "${e}")" on the following field`+(n.length>1?"s":"")+': "'+n.join(VD.QUOTATION_JOIN)+`". +`;return n+=`The list value provided to the "levels" argument must be consistently defined across all subgraphs that define "@semanticNonNull" on field "${t}".`,new Error(n)}function Aoe({requiredFieldNames:e,typeName:t}){return new Error(`The "@oneOf" directive defined on Input Object "${t}" is invalid because all Input fields must be optional (nullable); however, the following Input field`+(e.length>1?"s are":" is")+' required (non-nullable): "'+e.join(Ye.QUOTATION_JOIN)+'".')}});var ex=F(ZM=>{"use strict";m();T();N();Object.defineProperty(ZM,"__esModule",{value:!0})});var yE=F(hE=>{"use strict";m();T();N();Object.defineProperty(hE,"__esModule",{value:!0});hE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=void 0;hE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=30});var IE=F(hr=>{"use strict";m();T();N();Object.defineProperty(hr,"__esModule",{value:!0});hr.SUBSCRIPTION_FILTER_VALUE_DEFINITION=hr.SUBSCRIPTION_FILTER_CONDITION_DEFINITION=hr.SUBSCRIPTION_FIELD_CONDITION_DEFINITION=hr.SCOPE_SCALAR_DEFINITION=hr.LINK_PURPOSE_DEFINITION=hr.LINK_IMPORT_DEFINITION=hr.FIELD_SET_SCALAR_DEFINITION=hr.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION=void 0;var Zt=_e(),fn=Fr(),pn=zn(),Roe=yE();hr.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION={kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.EDFS_NATS_STREAM_CONFIGURATION),fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.CONSUMER_INACTIVE_THRESHOLD),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.INT_SCALAR)},defaultValue:{kind:Zt.Kind.INT,value:Roe.DEFAULT_CONSUMER_INACTIVE_THRESHOLD.toString()}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.CONSUMER_NAME),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.STRING_SCALAR)}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.STREAM_NAME),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.STRING_SCALAR)}}]};hr.FIELD_SET_SCALAR_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.FIELD_SET_SCALAR)};hr.LINK_IMPORT_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.LINK_IMPORT)};hr.LINK_PURPOSE_DEFINITION={kind:Zt.Kind.ENUM_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.LINK_PURPOSE),values:[{directives:[],kind:Zt.Kind.ENUM_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.EXECUTION)},{directives:[],kind:Zt.Kind.ENUM_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SECURITY)}]};hr.SCOPE_SCALAR_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SCOPE_SCALAR)};hr.SUBSCRIPTION_FIELD_CONDITION_DEFINITION={fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.FIELD_PATH),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.STRING_SCALAR)}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.VALUES),type:{kind:Zt.Kind.NON_NULL_TYPE,type:{kind:Zt.Kind.LIST_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FILTER_VALUE)}}}],kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SUBSCRIPTION_FIELD_CONDITION)};hr.SUBSCRIPTION_FILTER_CONDITION_DEFINITION={fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.AND_UPPER),type:{kind:Zt.Kind.LIST_TYPE,type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.IN_UPPER),type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FIELD_CONDITION)},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.OR_UPPER),type:{kind:Zt.Kind.LIST_TYPE,type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.NOT_UPPER),type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FILTER_CONDITION)}],kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SUBSCRIPTION_FILTER_CONDITION)};hr.SUBSCRIPTION_FILTER_VALUE_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SUBSCRIPTION_FILTER_VALUE)}});var dd=F(tr=>{"use strict";m();T();N();Object.defineProperty(tr,"__esModule",{value:!0});tr.CLIENT_PERSISTED_DIRECTIVE_NAMES=tr.IGNORED_FEDERATED_TYPE_NAMES=tr.DEPENDENCIES_BY_DIRECTIVE_NAME=tr.COMPOSITE_OUTPUT_NODE_KINDS=tr.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=tr.SUBSCRIPTION_FILTER_INPUT_NAMES=tr.STREAM_CONFIGURATION_FIELD_NAMES=tr.EVENT_DIRECTIVE_NAMES=tr.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=void 0;var rt=zn(),gE=_e(),Oa=IE();tr.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=new Set([rt.ARGUMENT_DEFINITION_UPPER,rt.ENUM_UPPER,rt.ENUM_VALUE_UPPER,rt.FIELD_DEFINITION_UPPER,rt.INPUT_FIELD_DEFINITION_UPPER,rt.INPUT_OBJECT_UPPER,rt.INTERFACE_UPPER,rt.OBJECT_UPPER,rt.SCALAR_UPPER,rt.SCHEMA_UPPER,rt.UNION_UPPER]);tr.EVENT_DIRECTIVE_NAMES=new Set([rt.EDFS_KAFKA_PUBLISH,rt.EDFS_KAFKA_SUBSCRIBE,rt.EDFS_NATS_PUBLISH,rt.EDFS_NATS_REQUEST,rt.EDFS_NATS_SUBSCRIBE,rt.EDFS_REDIS_PUBLISH,rt.EDFS_REDIS_SUBSCRIBE]);tr.STREAM_CONFIGURATION_FIELD_NAMES=new Set([rt.CONSUMER_INACTIVE_THRESHOLD,rt.CONSUMER_NAME,rt.STREAM_NAME]);tr.SUBSCRIPTION_FILTER_INPUT_NAMES=new Set([rt.AND_UPPER,rt.IN_UPPER,rt.NOT_UPPER,rt.OR_UPPER]);tr.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=new Set([rt.AND_UPPER,rt.OR_UPPER]);tr.COMPOSITE_OUTPUT_NODE_KINDS=new Set([gE.Kind.INTERFACE_TYPE_DEFINITION,gE.Kind.INTERFACE_TYPE_EXTENSION,gE.Kind.OBJECT_TYPE_DEFINITION,gE.Kind.OBJECT_TYPE_EXTENSION]);tr.DEPENDENCIES_BY_DIRECTIVE_NAME=new Map([[rt.CONNECT_FIELD_RESOLVER,[Oa.FIELD_SET_SCALAR_DEFINITION]],[rt.EDFS_NATS_SUBSCRIBE,[Oa.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION]],[rt.KEY,[Oa.FIELD_SET_SCALAR_DEFINITION]],[rt.LINK,[Oa.LINK_IMPORT_DEFINITION,Oa.LINK_PURPOSE_DEFINITION]],[rt.PROVIDES,[Oa.FIELD_SET_SCALAR_DEFINITION]],[rt.REQUIRES,[Oa.FIELD_SET_SCALAR_DEFINITION]],[rt.REQUIRES_SCOPES,[Oa.SCOPE_SCALAR_DEFINITION]],[rt.SUBSCRIPTION_FILTER,[Oa.SUBSCRIPTION_FIELD_CONDITION_DEFINITION,Oa.SUBSCRIPTION_FILTER_CONDITION_DEFINITION,Oa.SUBSCRIPTION_FILTER_VALUE_DEFINITION]]]);tr.IGNORED_FEDERATED_TYPE_NAMES=new Set([rt.BOOLEAN_SCALAR,rt.EDFS_NATS_STREAM_CONFIGURATION,rt.FIELD_SET_SCALAR,rt.ID_SCALAR,rt.INT_SCALAR,rt.FLOAT_SCALAR,rt.LINK_IMPORT,rt.LINK_PURPOSE,rt.STRING_SCALAR,rt.SUBSCRIPTION_FIELD_CONDITION,rt.SUBSCRIPTION_FILTER_CONDITION,rt.SUBSCRIPTION_FILTER_VALUE]);tr.CLIENT_PERSISTED_DIRECTIVE_NAMES=new Set([rt.DEPRECATED,rt.ONE_OF,rt.SEMANTIC_NON_NULL])});var ta=F((VS,tx)=>{"use strict";m();T();N();var mp=function(e){return e&&e.Math===Math&&e};tx.exports=mp(typeof globalThis=="object"&&globalThis)||mp(typeof window=="object"&&window)||mp(typeof self=="object"&&self)||mp(typeof global=="object"&&global)||mp(typeof VS=="object"&&VS)||function(){return this}()||Function("return this")()});var ks=F((LPe,nx)=>{"use strict";m();T();N();nx.exports=function(e){try{return!!e()}catch(t){return!0}}});var wu=F((kPe,rx)=>{"use strict";m();T();N();var Poe=ks();rx.exports=!Poe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var jS=F((VPe,ix)=>{"use strict";m();T();N();var Foe=ks();ix.exports=!Foe(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var Uc=F((GPe,ax)=>{"use strict";m();T();N();var woe=jS(),_E=Function.prototype.call;ax.exports=woe?_E.bind(_E):function(){return _E.apply(_E,arguments)}});var cx=F(ux=>{"use strict";m();T();N();var sx={}.propertyIsEnumerable,ox=Object.getOwnPropertyDescriptor,Loe=ox&&!sx.call({1:2},1);ux.f=Loe?function(t){var n=ox(this,t);return!!n&&n.enumerable}:sx});var KS=F((ZPe,lx)=>{"use strict";m();T();N();lx.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var Ii=F((rFe,px)=>{"use strict";m();T();N();var dx=jS(),fx=Function.prototype,$S=fx.call,Coe=dx&&fx.bind.bind($S,$S);px.exports=dx?Coe:function(e){return function(){return $S.apply(e,arguments)}}});var Tx=F((oFe,Nx)=>{"use strict";m();T();N();var mx=Ii(),Boe=mx({}.toString),Uoe=mx("".slice);Nx.exports=function(e){return Uoe(Boe(e),8,-1)}});var hx=F((dFe,Ex)=>{"use strict";m();T();N();var koe=Ii(),Moe=ks(),xoe=Tx(),GS=Object,qoe=koe("".split);Ex.exports=Moe(function(){return!GS("z").propertyIsEnumerable(0)})?function(e){return xoe(e)==="String"?qoe(e,""):GS(e)}:GS});var QS=F((NFe,yx)=>{"use strict";m();T();N();yx.exports=function(e){return e==null}});var YS=F((yFe,Ix)=>{"use strict";m();T();N();var Voe=QS(),joe=TypeError;Ix.exports=function(e){if(Voe(e))throw new joe("Can't call method on "+e);return e}});var vE=F((vFe,gx)=>{"use strict";m();T();N();var Koe=hx(),$oe=YS();gx.exports=function(e){return Koe($oe(e))}});var Sa=F((bFe,_x)=>{"use strict";m();T();N();var JS=typeof document=="object"&&document.all;_x.exports=typeof JS=="undefined"&&JS!==void 0?function(e){return typeof e=="function"||e===JS}:function(e){return typeof e=="function"}});var fd=F((FFe,vx)=>{"use strict";m();T();N();var Goe=Sa();vx.exports=function(e){return typeof e=="object"?e!==null:Goe(e)}});var OE=F((BFe,Ox)=>{"use strict";m();T();N();var HS=ta(),Qoe=Sa(),Yoe=function(e){return Qoe(e)?e:void 0};Ox.exports=function(e,t){return arguments.length<2?Yoe(HS[e]):HS[e]&&HS[e][t]}});var Dx=F((xFe,Sx)=>{"use strict";m();T();N();var Joe=Ii();Sx.exports=Joe({}.isPrototypeOf)});var Px=F((KFe,Rx)=>{"use strict";m();T();N();var Hoe=ta(),bx=Hoe.navigator,Ax=bx&&bx.userAgent;Rx.exports=Ax?String(Ax):""});var kx=F((YFe,Ux)=>{"use strict";m();T();N();var Bx=ta(),zS=Px(),Fx=Bx.process,wx=Bx.Deno,Lx=Fx&&Fx.versions||wx&&wx.version,Cx=Lx&&Lx.v8,Da,SE;Cx&&(Da=Cx.split("."),SE=Da[0]>0&&Da[0]<4?1:+(Da[0]+Da[1]));!SE&&zS&&(Da=zS.match(/Edge\/(\d+)/),(!Da||Da[1]>=74)&&(Da=zS.match(/Chrome\/(\d+)/),Da&&(SE=+Da[1])));Ux.exports=SE});var WS=F((WFe,xx)=>{"use strict";m();T();N();var Mx=kx(),zoe=ks(),Woe=ta(),Xoe=Woe.String;xx.exports=!!Object.getOwnPropertySymbols&&!zoe(function(){var e=Symbol("symbol detection");return!Xoe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Mx&&Mx<41})});var XS=F((twe,qx)=>{"use strict";m();T();N();var Zoe=WS();qx.exports=Zoe&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var ZS=F((awe,Vx)=>{"use strict";m();T();N();var eue=OE(),tue=Sa(),nue=Dx(),rue=XS(),iue=Object;Vx.exports=rue?function(e){return typeof e=="symbol"}:function(e){var t=eue("Symbol");return tue(t)&&nue(t.prototype,iue(e))}});var Kx=F((cwe,jx)=>{"use strict";m();T();N();var aue=String;jx.exports=function(e){try{return aue(e)}catch(t){return"Object"}}});var DE=F((pwe,$x)=>{"use strict";m();T();N();var sue=Sa(),oue=Kx(),uue=TypeError;$x.exports=function(e){if(sue(e))return e;throw new uue(oue(e)+" is not a function")}});var eD=F((Ewe,Gx)=>{"use strict";m();T();N();var cue=DE(),lue=QS();Gx.exports=function(e,t){var n=e[t];return lue(n)?void 0:cue(n)}});var Yx=F((gwe,Qx)=>{"use strict";m();T();N();var tD=Uc(),nD=Sa(),rD=fd(),due=TypeError;Qx.exports=function(e,t){var n,r;if(t==="string"&&nD(n=e.toString)&&!rD(r=tD(n,e))||nD(n=e.valueOf)&&!rD(r=tD(n,e))||t!=="string"&&nD(n=e.toString)&&!rD(r=tD(n,e)))return r;throw new due("Can't convert object to primitive value")}});var Hx=F((Swe,Jx)=>{"use strict";m();T();N();Jx.exports=!1});var bE=F((Rwe,Wx)=>{"use strict";m();T();N();var zx=ta(),fue=Object.defineProperty;Wx.exports=function(e,t){try{fue(zx,e,{value:t,configurable:!0,writable:!0})}catch(n){zx[e]=t}return t}});var AE=F((Lwe,eq)=>{"use strict";m();T();N();var pue=Hx(),mue=ta(),Nue=bE(),Xx="__core-js_shared__",Zx=eq.exports=mue[Xx]||Nue(Xx,{});(Zx.versions||(Zx.versions=[])).push({version:"3.41.0",mode:pue?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var iD=F((kwe,nq)=>{"use strict";m();T();N();var tq=AE();nq.exports=function(e,t){return tq[e]||(tq[e]=t||{})}});var iq=F((Vwe,rq)=>{"use strict";m();T();N();var Tue=YS(),Eue=Object;rq.exports=function(e){return Eue(Tue(e))}});var Lu=F((Gwe,aq)=>{"use strict";m();T();N();var hue=Ii(),yue=iq(),Iue=hue({}.hasOwnProperty);aq.exports=Object.hasOwn||function(t,n){return Iue(yue(t),n)}});var aD=F((Hwe,sq)=>{"use strict";m();T();N();var gue=Ii(),_ue=0,vue=Math.random(),Oue=gue(1 .toString);sq.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Oue(++_ue+vue,36)}});var cq=F((Zwe,uq)=>{"use strict";m();T();N();var Sue=ta(),Due=iD(),oq=Lu(),bue=aD(),Aue=WS(),Rue=XS(),pd=Sue.Symbol,sD=Due("wks"),Pue=Rue?pd.for||pd:pd&&pd.withoutSetter||bue;uq.exports=function(e){return oq(sD,e)||(sD[e]=Aue&&oq(pd,e)?pd[e]:Pue("Symbol."+e)),sD[e]}});var pq=F((rLe,fq)=>{"use strict";m();T();N();var Fue=Uc(),lq=fd(),dq=ZS(),wue=eD(),Lue=Yx(),Cue=cq(),Bue=TypeError,Uue=Cue("toPrimitive");fq.exports=function(e,t){if(!lq(e)||dq(e))return e;var n=wue(e,Uue),r;if(n){if(t===void 0&&(t="default"),r=Fue(n,e,t),!lq(r)||dq(r))return r;throw new Bue("Can't convert object to primitive value")}return t===void 0&&(t="number"),Lue(e,t)}});var oD=F((oLe,mq)=>{"use strict";m();T();N();var kue=pq(),Mue=ZS();mq.exports=function(e){var t=kue(e,"string");return Mue(t)?t:t+""}});var Eq=F((dLe,Tq)=>{"use strict";m();T();N();var xue=ta(),Nq=fd(),uD=xue.document,que=Nq(uD)&&Nq(uD.createElement);Tq.exports=function(e){return que?uD.createElement(e):{}}});var cD=F((NLe,hq)=>{"use strict";m();T();N();var Vue=wu(),jue=ks(),Kue=Eq();hq.exports=!Vue&&!jue(function(){return Object.defineProperty(Kue("div"),"a",{get:function(){return 7}}).a!==7})});var lD=F(Iq=>{"use strict";m();T();N();var $ue=wu(),Gue=Uc(),Que=cx(),Yue=KS(),Jue=vE(),Hue=oD(),zue=Lu(),Wue=cD(),yq=Object.getOwnPropertyDescriptor;Iq.f=$ue?yq:function(t,n){if(t=Jue(t),n=Hue(n),Wue)try{return yq(t,n)}catch(r){}if(zue(t,n))return Yue(!Gue(Que.f,t,n),t[n])}});var _q=F((vLe,gq)=>{"use strict";m();T();N();var Xue=wu(),Zue=ks();gq.exports=Xue&&Zue(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Np=F((bLe,vq)=>{"use strict";m();T();N();var ece=fd(),tce=String,nce=TypeError;vq.exports=function(e){if(ece(e))return e;throw new nce(tce(e)+" is not an object")}});var PE=F(Sq=>{"use strict";m();T();N();var rce=wu(),ice=cD(),ace=_q(),RE=Np(),Oq=oD(),sce=TypeError,dD=Object.defineProperty,oce=Object.getOwnPropertyDescriptor,fD="enumerable",pD="configurable",mD="writable";Sq.f=rce?ace?function(t,n,r){if(RE(t),n=Oq(n),RE(r),typeof t=="function"&&n==="prototype"&&"value"in r&&mD in r&&!r[mD]){var i=oce(t,n);i&&i[mD]&&(t[n]=r.value,r={configurable:pD in r?r[pD]:i[pD],enumerable:fD in r?r[fD]:i[fD],writable:!1})}return dD(t,n,r)}:dD:function(t,n,r){if(RE(t),n=Oq(n),RE(r),ice)try{return dD(t,n,r)}catch(i){}if("get"in r||"set"in r)throw new sce("Accessors not supported");return"value"in r&&(t[n]=r.value),t}});var ND=F((BLe,Dq)=>{"use strict";m();T();N();var uce=wu(),cce=PE(),lce=KS();Dq.exports=uce?function(e,t,n){return cce.f(e,t,lce(1,n))}:function(e,t,n){return e[t]=n,e}});var Rq=F((xLe,Aq)=>{"use strict";m();T();N();var TD=wu(),dce=Lu(),bq=Function.prototype,fce=TD&&Object.getOwnPropertyDescriptor,ED=dce(bq,"name"),pce=ED&&function(){}.name==="something",mce=ED&&(!TD||TD&&fce(bq,"name").configurable);Aq.exports={EXISTS:ED,PROPER:pce,CONFIGURABLE:mce}});var Fq=F((KLe,Pq)=>{"use strict";m();T();N();var Nce=Ii(),Tce=Sa(),hD=AE(),Ece=Nce(Function.toString);Tce(hD.inspectSource)||(hD.inspectSource=function(e){return Ece(e)});Pq.exports=hD.inspectSource});var Cq=F((YLe,Lq)=>{"use strict";m();T();N();var hce=ta(),yce=Sa(),wq=hce.WeakMap;Lq.exports=yce(wq)&&/native code/.test(String(wq))});var kq=F((WLe,Uq)=>{"use strict";m();T();N();var Ice=iD(),gce=aD(),Bq=Ice("keys");Uq.exports=function(e){return Bq[e]||(Bq[e]=gce(e))}});var yD=F((tCe,Mq)=>{"use strict";m();T();N();Mq.exports={}});var jq=F((aCe,Vq)=>{"use strict";m();T();N();var _ce=Cq(),qq=ta(),vce=fd(),Oce=ND(),ID=Lu(),gD=AE(),Sce=kq(),Dce=yD(),xq="Object already initialized",_D=qq.TypeError,bce=qq.WeakMap,FE,Tp,wE,Ace=function(e){return wE(e)?Tp(e):FE(e,{})},Rce=function(e){return function(t){var n;if(!vce(t)||(n=Tp(t)).type!==e)throw new _D("Incompatible receiver, "+e+" required");return n}};_ce||gD.state?(ba=gD.state||(gD.state=new bce),ba.get=ba.get,ba.has=ba.has,ba.set=ba.set,FE=function(e,t){if(ba.has(e))throw new _D(xq);return t.facade=e,ba.set(e,t),t},Tp=function(e){return ba.get(e)||{}},wE=function(e){return ba.has(e)}):(kc=Sce("state"),Dce[kc]=!0,FE=function(e,t){if(ID(e,kc))throw new _D(xq);return t.facade=e,Oce(e,kc,t),t},Tp=function(e){return ID(e,kc)?e[kc]:{}},wE=function(e){return ID(e,kc)});var ba,kc;Vq.exports={set:FE,get:Tp,has:wE,enforce:Ace,getterFor:Rce}});var Qq=F((cCe,Gq)=>{"use strict";m();T();N();var OD=Ii(),Pce=ks(),Fce=Sa(),LE=Lu(),vD=wu(),wce=Rq().CONFIGURABLE,Lce=Fq(),$q=jq(),Cce=$q.enforce,Bce=$q.get,Kq=String,CE=Object.defineProperty,Uce=OD("".slice),kce=OD("".replace),Mce=OD([].join),xce=vD&&!Pce(function(){return CE(function(){},"length",{value:8}).length!==8}),qce=String(String).split("String"),Vce=Gq.exports=function(e,t,n){Uce(Kq(t),0,7)==="Symbol("&&(t="["+kce(Kq(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!LE(e,"name")||wce&&e.name!==t)&&(vD?CE(e,"name",{value:t,configurable:!0}):e.name=t),xce&&n&&LE(n,"arity")&&e.length!==n.arity&&CE(e,"length",{value:n.arity});try{n&&LE(n,"constructor")&&n.constructor?vD&&CE(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=Cce(e);return LE(r,"source")||(r.source=Mce(qce,typeof t=="string"?t:"")),e};Function.prototype.toString=Vce(function(){return Fce(this)&&Bce(this).source||Lce(this)},"toString")});var Jq=F((pCe,Yq)=>{"use strict";m();T();N();var jce=Sa(),Kce=PE(),$ce=Qq(),Gce=bE();Yq.exports=function(e,t,n,r){r||(r={});var i=r.enumerable,a=r.name!==void 0?r.name:t;if(jce(n)&&$ce(n,a,r),r.global)i?e[t]=n:Gce(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(o){}i?e[t]=n:Kce.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}});var zq=F((ECe,Hq)=>{"use strict";m();T();N();var Qce=Math.ceil,Yce=Math.floor;Hq.exports=Math.trunc||function(t){var n=+t;return(n>0?Yce:Qce)(n)}});var BE=F((gCe,Wq)=>{"use strict";m();T();N();var Jce=zq();Wq.exports=function(e){var t=+e;return t!==t||t===0?0:Jce(t)}});var Zq=F((SCe,Xq)=>{"use strict";m();T();N();var Hce=BE(),zce=Math.max,Wce=Math.min;Xq.exports=function(e,t){var n=Hce(e);return n<0?zce(n+t,0):Wce(n,t)}});var t1=F((RCe,e1)=>{"use strict";m();T();N();var Xce=BE(),Zce=Math.min;e1.exports=function(e){var t=Xce(e);return t>0?Zce(t,9007199254740991):0}});var r1=F((LCe,n1)=>{"use strict";m();T();N();var ele=t1();n1.exports=function(e){return ele(e.length)}});var s1=F((kCe,a1)=>{"use strict";m();T();N();var tle=vE(),nle=Zq(),rle=r1(),i1=function(e){return function(t,n,r){var i=tle(t),a=rle(i);if(a===0)return!e&&-1;var o=nle(r,a),u;if(e&&n!==n){for(;a>o;)if(u=i[o++],u!==u)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}};a1.exports={includes:i1(!0),indexOf:i1(!1)}});var c1=F((VCe,u1)=>{"use strict";m();T();N();var ile=Ii(),SD=Lu(),ale=vE(),sle=s1().indexOf,ole=yD(),o1=ile([].push);u1.exports=function(e,t){var n=ale(e),r=0,i=[],a;for(a in n)!SD(ole,a)&&SD(n,a)&&o1(i,a);for(;t.length>r;)SD(n,a=t[r++])&&(~sle(i,a)||o1(i,a));return i}});var d1=F((GCe,l1)=>{"use strict";m();T();N();l1.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var p1=F(f1=>{"use strict";m();T();N();var ule=c1(),cle=d1(),lle=cle.concat("length","prototype");f1.f=Object.getOwnPropertyNames||function(t){return ule(t,lle)}});var N1=F(m1=>{"use strict";m();T();N();m1.f=Object.getOwnPropertySymbols});var E1=F((rBe,T1)=>{"use strict";m();T();N();var dle=OE(),fle=Ii(),ple=p1(),mle=N1(),Nle=Np(),Tle=fle([].concat);T1.exports=dle("Reflect","ownKeys")||function(t){var n=ple.f(Nle(t)),r=mle.f;return r?Tle(n,r(t)):n}});var I1=F((oBe,y1)=>{"use strict";m();T();N();var h1=Lu(),Ele=E1(),hle=lD(),yle=PE();y1.exports=function(e,t,n){for(var r=Ele(t),i=yle.f,a=hle.f,o=0;o{"use strict";m();T();N();var Ile=ks(),gle=Sa(),_le=/#|\.prototype\./,Ep=function(e,t){var n=Ole[vle(e)];return n===Dle?!0:n===Sle?!1:gle(t)?Ile(t):!!t},vle=Ep.normalize=function(e){return String(e).replace(_le,".").toLowerCase()},Ole=Ep.data={},Sle=Ep.NATIVE="N",Dle=Ep.POLYFILL="P";g1.exports=Ep});var DD=F((NBe,v1)=>{"use strict";m();T();N();var UE=ta(),ble=lD().f,Ale=ND(),Rle=Jq(),Ple=bE(),Fle=I1(),wle=_1();v1.exports=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,u,l,d,p;if(r?o=UE:i?o=UE[n]||Ple(n,{}):o=UE[n]&&UE[n].prototype,o)for(u in t){if(d=t[u],e.dontCallGetSet?(p=ble(o,u),l=p&&p.value):l=o[u],a=wle(r?u:n+(i?".":"#")+u,e.forced),!a&&l!==void 0){if(typeof d==typeof l)continue;Fle(d,l)}(e.sham||l&&l.sham)&&Ale(d,"sham",!0),Rle(o,u,d,e)}}});var hp=F((yBe,O1)=>{"use strict";m();T();N();var bD=Ii(),kE=Set.prototype;O1.exports={Set,add:bD(kE.add),has:bD(kE.has),remove:bD(kE.delete),proto:kE}});var AD=F((vBe,S1)=>{"use strict";m();T();N();var Lle=hp().has;S1.exports=function(e){return Lle(e),e}});var b1=F((bBe,D1)=>{"use strict";m();T();N();var Cle=Ii(),Ble=DE();D1.exports=function(e,t,n){try{return Cle(Ble(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}}});var RD=F((FBe,A1)=>{"use strict";m();T();N();var Ule=b1(),kle=hp();A1.exports=Ule(kle.proto,"size","get")||function(e){return e.size}});var PD=F((BBe,R1)=>{"use strict";m();T();N();var Mle=Uc();R1.exports=function(e,t,n){for(var r=n?e:e.iterator,i=e.next,a,o;!(a=Mle(i,r)).done;)if(o=t(a.value),o!==void 0)return o}});var B1=F((xBe,C1)=>{"use strict";m();T();N();var P1=Ii(),xle=PD(),F1=hp(),qle=F1.Set,w1=F1.proto,Vle=P1(w1.forEach),L1=P1(w1.keys),jle=L1(new qle).next;C1.exports=function(e,t,n){return n?xle({iterator:L1(e),next:jle},t):Vle(e,t)}});var k1=F((KBe,U1)=>{"use strict";m();T();N();U1.exports=function(e){return{iterator:e,next:e.next,done:!1}}});var FD=F((YBe,K1)=>{"use strict";m();T();N();var M1=DE(),V1=Np(),x1=Uc(),Kle=BE(),$le=k1(),q1="Invalid size",Gle=RangeError,Qle=TypeError,Yle=Math.max,j1=function(e,t){this.set=e,this.size=Yle(t,0),this.has=M1(e.has),this.keys=M1(e.keys)};j1.prototype={getIterator:function(){return $le(V1(x1(this.keys,this.set)))},includes:function(e){return x1(this.has,this.set,e)}};K1.exports=function(e){V1(e);var t=+e.size;if(t!==t)throw new Qle(q1);var n=Kle(t);if(n<0)throw new Gle(q1);return new j1(e,n)}});var G1=F((WBe,$1)=>{"use strict";m();T();N();var Jle=AD(),Hle=RD(),zle=B1(),Wle=FD();$1.exports=function(t){var n=Jle(this),r=Wle(t);return Hle(n)>r.size?!1:zle(n,function(i){if(!r.includes(i))return!1},!0)!==!1}});var wD=F((tUe,J1)=>{"use strict";m();T();N();var Xle=OE(),Q1=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},Y1=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};J1.exports=function(e,t){var n=Xle("Set");try{new n()[e](Q1(0));try{return new n()[e](Q1(-1)),!1}catch(i){if(!t)return!0;try{return new n()[e](Y1(-1/0)),!1}catch(a){var r=new n;return r.add(1),r.add(2),t(r[e](Y1(1/0)))}}}catch(i){return!1}}});var H1=F(()=>{"use strict";m();T();N();var Zle=DD(),ede=G1(),tde=wD(),nde=!tde("isSubsetOf",function(e){return e});Zle({target:"Set",proto:!0,real:!0,forced:nde},{isSubsetOf:ede})});var z1=F(()=>{"use strict";m();T();N();H1()});var Z1=F((NUe,X1)=>{"use strict";m();T();N();var rde=Uc(),W1=Np(),ide=eD();X1.exports=function(e,t,n){var r,i;W1(e);try{if(r=ide(e,"return"),!r){if(t==="throw")throw n;return n}r=rde(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return W1(r),n}});var tV=F((yUe,eV)=>{"use strict";m();T();N();var ade=AD(),sde=hp().has,ode=RD(),ude=FD(),cde=PD(),lde=Z1();eV.exports=function(t){var n=ade(this),r=ude(t);if(ode(n){"use strict";m();T();N();var dde=DD(),fde=tV(),pde=wD(),mde=!pde("isSupersetOf",function(e){return!e});dde({target:"Set",proto:!0,real:!0,forced:mde},{isSupersetOf:fde})});var rV=F(()=>{"use strict";m();T();N();nV()});var yp=F(Fn=>{"use strict";m();T();N();Object.defineProperty(Fn,"__esModule",{value:!0});Fn.subtractSet=Tde;Fn.mapToArrayOfValues=Ede;Fn.kindToConvertedTypeString=hde;Fn.fieldDatasToSimpleFieldDatas=yde;Fn.isNodeLeaf=Ide;Fn.newEntityInterfaceFederationData=gde;Fn.upsertEntityInterfaceFederationData=_de;Fn.upsertEntityData=Ode;Fn.updateEntityData=iV;Fn.newFieldAuthorizationData=Sde;Fn.newAuthorizationData=Dde;Fn.addScopes=LD;Fn.mergeRequiredScopesByAND=qE;Fn.mergeRequiredScopesByOR=CD;Fn.upsertFieldAuthorizationData=aV;Fn.upsertAuthorizationData=Rde;Fn.upsertAuthorizationConfiguration=Pde;Fn.isObjectNodeKind=Fde;Fn.isCompositeOutputNodeKind=wde;Fn.isObjectDefinitionData=Lde;Fn.getNodeCoords=Cde;var $t=_e(),ai=zn(),ME=wr(),xE=Du();z1();rV();var Nde=dd();function Tde(e,t){for(let n of e)t.delete(n)}function Ede(e){let t=[];for(let n of e.values())t.push(n);return t}function hde(e){switch(e){case $t.Kind.BOOLEAN:return ai.BOOLEAN_SCALAR;case $t.Kind.ENUM:case $t.Kind.ENUM_TYPE_DEFINITION:case $t.Kind.ENUM_TYPE_EXTENSION:return ai.ENUM;case $t.Kind.ENUM_VALUE_DEFINITION:return ai.ENUM_VALUE;case $t.Kind.FIELD_DEFINITION:return ai.FIELD;case $t.Kind.FLOAT:return ai.FLOAT_SCALAR;case $t.Kind.INPUT_OBJECT_TYPE_DEFINITION:case $t.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ai.INPUT_OBJECT;case $t.Kind.INPUT_VALUE_DEFINITION:return ai.INPUT_VALUE;case $t.Kind.INT:return ai.INT_SCALAR;case $t.Kind.INTERFACE_TYPE_DEFINITION:case $t.Kind.INTERFACE_TYPE_EXTENSION:return ai.INTERFACE;case $t.Kind.NULL:return ai.NULL;case $t.Kind.OBJECT:case $t.Kind.OBJECT_TYPE_DEFINITION:case $t.Kind.OBJECT_TYPE_EXTENSION:return ai.OBJECT;case $t.Kind.STRING:return ai.STRING_SCALAR;case $t.Kind.SCALAR_TYPE_DEFINITION:case $t.Kind.SCALAR_TYPE_EXTENSION:return ai.SCALAR;case $t.Kind.UNION_TYPE_DEFINITION:case $t.Kind.UNION_TYPE_EXTENSION:return ai.UNION;default:return e}}function yde(e){let t=[];for(let{name:n,namedTypeName:r}of e)t.push({name:n,namedTypeName:r});return t}function Ide(e){if(!e)return!0;switch(e){case $t.Kind.OBJECT_TYPE_DEFINITION:case $t.Kind.INTERFACE_TYPE_DEFINITION:case $t.Kind.UNION_TYPE_DEFINITION:return!1;default:return!0}}function gde(e,t){return{concreteTypeNames:new Set(e.concreteTypeNames),fieldDatasBySubgraphName:new Map([[t,e.fieldDatas]]),interfaceFieldNames:new Set(e.interfaceFieldNames),interfaceObjectFieldNames:new Set(e.interfaceObjectFieldNames),interfaceObjectSubgraphNames:new Set(e.isInterfaceObject?[t]:[]),subgraphDataByTypeName:new Map([[t,e]]),typeName:e.typeName}}function _de(e,t,n){(0,ME.addIterableToSet)({source:t.concreteTypeNames,target:e.concreteTypeNames}),e.subgraphDataByTypeName.set(n,t),e.fieldDatasBySubgraphName.set(n,t.fieldDatas),(0,ME.addIterableToSet)({source:t.interfaceFieldNames,target:e.interfaceFieldNames}),(0,ME.addIterableToSet)({source:t.interfaceObjectFieldNames,target:e.interfaceObjectFieldNames}),t.isInterfaceObject&&e.interfaceObjectSubgraphNames.add(n)}function vde({keyFieldSetDataByFieldSet:e,subgraphName:t,typeName:n}){let r=new Map([[t,e]]),i=new Map;for(let[a,{documentNode:o,isUnresolvable:u}]of e)u||i.set(a,o);return{keyFieldSetDatasBySubgraphName:r,documentNodeByKeyFieldSet:i,keyFieldSets:new Set,subgraphNames:new Set([t]),typeName:n}}function Ode({entityDataByTypeName:e,keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}){let i=e.get(r);i?iV({entityData:i,keyFieldSetDataByFieldSet:t,subgraphName:n}):e.set(r,vde({keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}))}function iV({entityData:e,keyFieldSetDataByFieldSet:t,subgraphName:n}){e.subgraphNames.add(n);let r=e.keyFieldSetDatasBySubgraphName.get(n);if(!r){e.keyFieldSetDatasBySubgraphName.set(n,t);for(let[i,{documentNode:a,isUnresolvable:o}]of t)o||e.documentNodeByKeyFieldSet.set(i,a);return}for(let[i,a]of t){a.isUnresolvable||e.documentNodeByKeyFieldSet.set(i,a.documentNode);let o=r.get(i);if(o){o.isUnresolvable||(o.isUnresolvable=a.isUnresolvable);continue}r.set(i,a)}}function Sde(e){return{fieldName:e,inheritedData:{requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1},originalData:{requiredScopes:[],requiresAuthentication:!1}}}function Dde(e){return{fieldAuthDataByFieldName:new Map,requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1,typeName:e}}function LD(e,t){for(let n=e.length-1;n>-1;n--){if(e[n].isSubsetOf(t))return;e[n].isSupersetOf(t)&&e.splice(n,1)}e.push(t)}function qE(e,t){if(e.length<1||t.length<1){for(let r of t)e.push(new Set(r));return e}let n=[];for(let r of t)for(let i of e){let a=(0,ME.addSets)(r,i);LD(n,a)}return n}function CD(e,t){for(let n of t)LD(e,n);return e.length<=xE.MAX_OR_SCOPES}function aV(e,t){var i,a;let n=t.fieldName,r=e.get(n);return r?((i=r.inheritedData).requiresAuthentication||(i.requiresAuthentication=t.inheritedData.requiresAuthentication),(a=r.originalData).requiresAuthentication||(a.requiresAuthentication=t.originalData.requiresAuthentication),!CD(r.inheritedData.requiredScopesByOR,t.inheritedData.requiredScopes)||r.inheritedData.requiredScopes.length*t.inheritedData.requiredScopes.length>xE.MAX_OR_SCOPES||r.originalData.requiredScopes.length*t.originalData.requiredScopes.length>xE.MAX_OR_SCOPES?!1:(r.inheritedData.requiredScopes=qE(r.inheritedData.requiredScopes,t.inheritedData.requiredScopes),r.originalData.requiredScopes=qE(r.originalData.requiredScopes,t.originalData.requiredScopes),!0)):(e.set(n,sV(t)),!0)}function bde(e){let t=new Map;for(let[n,r]of e)t.set(n,sV(r));return t}function sV(e){return{fieldName:e.fieldName,inheritedData:{requiredScopes:[...e.inheritedData.requiredScopes],requiredScopesByOR:[...e.inheritedData.requiredScopes],requiresAuthentication:e.inheritedData.requiresAuthentication},originalData:{requiredScopes:[...e.originalData.requiredScopes],requiresAuthentication:e.originalData.requiresAuthentication}}}function Ade(e){return{fieldAuthDataByFieldName:bde(e.fieldAuthDataByFieldName),requiredScopes:[...e.requiredScopes],requiredScopesByOR:[...e.requiredScopes],requiresAuthentication:e.requiresAuthentication,typeName:e.typeName}}function Rde(e,t,n){let r=e.get(t.typeName);if(!r){e.set(t.typeName,Ade(t));return}r.requiresAuthentication||(r.requiresAuthentication=t.requiresAuthentication),!CD(r.requiredScopesByOR,t.requiredScopes)||r.requiredScopes.length*t.requiredScopes.length>xE.MAX_OR_SCOPES?n.add(t.typeName):r.requiredScopes=qE(r.requiredScopes,t.requiredScopes);for(let[i,a]of t.fieldAuthDataByFieldName)aV(r.fieldAuthDataByFieldName,a)||n.add(`${t.typeName}.${i}`)}function Pde(e,t){let n=t.typeName;for(let[r,i]of t.fieldAuthDataByFieldName){let a=`${n}.${r}`,o=e.get(a);o?(o.requiresAuthentication=i.inheritedData.requiresAuthentication,o.requiredScopes=i.inheritedData.requiredScopes.map(u=>[...u]),o.requiredScopesByOR=i.inheritedData.requiredScopesByOR.map(u=>[...u])):e.set(a,{argumentNames:[],typeName:n,fieldName:r,requiresAuthentication:i.inheritedData.requiresAuthentication,requiredScopes:i.inheritedData.requiredScopes.map(u=>[...u]),requiredScopesByOR:i.inheritedData.requiredScopesByOR.map(u=>[...u])})}}function Fde(e){return e===$t.Kind.OBJECT_TYPE_DEFINITION||e===$t.Kind.OBJECT_TYPE_EXTENSION}function wde(e){return Nde.COMPOSITE_OUTPUT_NODE_KINDS.has(e)}function Lde(e){return e?e.kind===$t.Kind.OBJECT_TYPE_DEFINITION:!1}function Cde(e){switch(e.kind){case $t.Kind.ARGUMENT:case $t.Kind.FIELD_DEFINITION:case $t.Kind.INPUT_VALUE_DEFINITION:case $t.Kind.ENUM_VALUE_DEFINITION:return e.federatedCoords;default:return e.name}}});var BD=F(Ke=>{"use strict";m();T();N();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.TAG_DEFINITION_DATA=Ke.SUBSCRIPTION_FILTER_DEFINITION_DATA=Ke.SHAREABLE_DEFINITION_DATA=Ke.SPECIFIED_BY_DEFINITION_DATA=Ke.SEMANTIC_NON_NULL_DATA=Ke.REQUIRES_SCOPES_DEFINITION_DATA=Ke.REQUIRE_FETCH_REASONS_DEFINITION_DATA=Ke.REDIS_SUBSCRIBE_DEFINITION_DATA=Ke.REDIS_PUBLISH_DEFINITION_DATA=Ke.REQUIRES_DEFINITION_DATA=Ke.PROVIDES_DEFINITION_DATA=Ke.LINK_DEFINITION_DATA=Ke.KEY_DEFINITION_DATA=Ke.OVERRIDE_DEFINITION_DATA=Ke.ONE_OF_DEFINITION_DATA=Ke.NATS_SUBSCRIBE_DEFINITION_DATA=Ke.NATS_REQUEST_DEFINITION_DATA=Ke.NATS_PUBLISH_DEFINITION_DATA=Ke.KAFKA_SUBSCRIBE_DEFINITION_DATA=Ke.KAFKA_PUBLISH_DEFINITION_DATA=Ke.INTERFACE_OBJECT_DEFINITION_DATA=Ke.INACCESSIBLE_DEFINITION_DATA=Ke.EXTERNAL_DEFINITION_DATA=Ke.EXTENDS_DEFINITION_DATA=Ke.DEPRECATED_DEFINITION_DATA=Ke.CONNECT_FIELD_RESOLVER_DEFINITION_DATA=Ke.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA=Ke.CONFIGURE_DESCRIPTION_DEFINITION_DATA=Ke.COMPOSE_DIRECTIVE_DEFINITION_DATA=Ke.AUTHENTICATED_DEFINITION_DATA=void 0;var na=Fr(),Gt=_e(),x=zn(),en=Qf(),wn=hT();Ke.AUTHENTICATED_DEFINITION_DATA={argumentTypeNodeByName:new Map([]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER]),name:x.AUTHENTICATED,node:en.AUTHENTICATED_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.COMPOSE_DIRECTIVE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.NAME,{name:x.NAME,typeNode:wn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([x.SCHEMA_UPPER]),name:x.COMPOSE_DIRECTIVE,node:en.COMPOSE_DIRECTIVE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.NAME])};Ke.CONFIGURE_DESCRIPTION_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.PROPAGATE,{name:x.PROPAGATE,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.BOOLEAN_SCALAR)},defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}],[x.DESCRIPTION_OVERRIDE,{name:x.DESCRIPTION_OVERRIDE,typeNode:(0,na.stringToNamedTypeNode)(x.STRING_SCALAR)}]]),isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.INPUT_OBJECT_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.SCHEMA_UPPER,x.UNION_UPPER]),name:x.CONFIGURE_DESCRIPTION,node:en.CONFIGURE_DESCRIPTION_DEFINITION,optionalArgumentNames:new Set([x.PROPAGATE,x.DESCRIPTION_OVERRIDE]),requiredArgumentNames:new Set};Ke.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.PROPAGATE,{name:x.PROPAGATE,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.BOOLEAN_SCALAR)},defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.CONFIGURE_CHILD_DESCRIPTIONS,node:en.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION,optionalArgumentNames:new Set([x.PROPAGATE]),requiredArgumentNames:new Set};Ke.CONNECT_FIELD_RESOLVER_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CONTEXT,{name:x.CONTEXT,typeNode:wn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.CONNECT_FIELD_RESOLVER,node:en.CONNECT_FIELD_RESOLVER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.CONTEXT])};Ke.DEPRECATED_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.REASON,{name:x.REASON,typeNode:(0,na.stringToNamedTypeNode)(x.STRING_SCALAR),defaultValue:{kind:Gt.Kind.STRING,value:Gt.DEFAULT_DEPRECATION_REASON}}]]),isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER]),name:x.DEPRECATED,node:en.DEPRECATED_DEFINITION,optionalArgumentNames:new Set([x.REASON]),requiredArgumentNames:new Set};Ke.EXTENDS_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.EXTENDS,node:en.EXTENDS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.EXTERNAL_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER,x.OBJECT_UPPER]),name:x.EXTERNAL,node:en.EXTERNAL_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.INACCESSIBLE_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.UNION_UPPER]),name:x.INACCESSIBLE,node:en.INACCESSIBLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.INTERFACE_OBJECT_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.OBJECT_UPPER]),name:x.INTERFACE_OBJECT,node:en.INTERFACE_OBJECT_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.KAFKA_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.TOPIC,{name:x.TOPIC,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_KAFKA_PUBLISH,node:en.EDFS_KAFKA_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.TOPIC])};Ke.KAFKA_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.TOPICS,{name:x.TOPICS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:wn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_KAFKA_SUBSCRIBE,node:en.EDFS_KAFKA_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.TOPICS])};Ke.NATS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECT,{name:x.SUBJECT,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_PUBLISH,node:en.EDFS_NATS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.SUBJECT])};Ke.NATS_REQUEST_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECT,{name:x.SUBJECT,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_REQUEST,node:en.EDFS_NATS_REQUEST_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.SUBJECT])};Ke.NATS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECTS,{name:x.SUBJECTS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:wn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}],[x.STREAM_CONFIGURATION,{name:x.STREAM_CONFIGURATION,typeNode:(0,na.stringToNamedTypeNode)(x.EDFS_NATS_STREAM_CONFIGURATION)}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_SUBSCRIBE,node:en.EDFS_NATS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID,x.STREAM_CONFIGURATION]),requiredArgumentNames:new Set([x.SUBJECTS])};Ke.ONE_OF_DEFINITION_DATA={argumentTypeNodeByName:new Map([]),isRepeatable:!1,locations:new Set([x.INPUT_OBJECT_UPPER]),name:x.ONE_OF,node:en.ONE_OF_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.OVERRIDE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FROM,{name:x.FROM,typeNode:wn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.OVERRIDE,node:en.OVERRIDE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FROM])};Ke.KEY_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:wn.REQUIRED_FIELDSET_TYPE_NODE}],[x.RESOLVABLE,{name:x.RESOLVABLE,typeNode:(0,na.stringToNamedTypeNode)(x.BOOLEAN_SCALAR),defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!0,locations:new Set([x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.KEY,node:en.KEY_DEFINITION,optionalArgumentNames:new Set([x.RESOLVABLE]),requiredArgumentNames:new Set([x.FIELDS])};Ke.LINK_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.URL_LOWER,{name:x.URL_LOWER,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.AS,{name:x.AS,typeNode:(0,na.stringToNamedTypeNode)(x.STRING_SCALAR)}],[x.FOR,{name:x.FOR,typeNode:(0,na.stringToNamedTypeNode)(x.LINK_PURPOSE)}],[x.IMPORT,{name:x.IMPORT,typeNode:{kind:Gt.Kind.LIST_TYPE,type:(0,na.stringToNamedTypeNode)(x.LINK_IMPORT)}}]]),isRepeatable:!0,locations:new Set([x.SCHEMA_UPPER]),name:x.LINK,node:en.LINK_DEFINITION,optionalArgumentNames:new Set([x.AS,x.FOR,x.IMPORT]),requiredArgumentNames:new Set([x.URL_LOWER])};Ke.PROVIDES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:wn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.PROVIDES,node:en.PROVIDES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FIELDS])};Ke.REQUIRES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:wn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.REQUIRES,node:en.REQUIRES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FIELDS])};Ke.REDIS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CHANNEL,{name:x.CHANNEL,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_REDIS_PUBLISH,node:en.EDFS_REDIS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.CHANNEL])};Ke.REDIS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CHANNELS,{name:x.CHANNELS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:wn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_REDIS_SUBSCRIBE,node:en.EDFS_REDIS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.CHANNELS])};Ke.REQUIRE_FETCH_REASONS_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!0,locations:new Set([x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.REQUIRE_FETCH_REASONS,node:en.REQUIRE_FETCH_REASONS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.REQUIRES_SCOPES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SCOPES,{name:x.SCOPES,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.SCOPE_SCALAR)}}}}}}]]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER]),name:x.REQUIRES_SCOPES,node:en.REQUIRES_SCOPES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.SCOPES])};Ke.SEMANTIC_NON_NULL_DATA={argumentTypeNodeByName:new Map([[x.LEVELS,{name:x.LEVELS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.INT_SCALAR)}}},defaultValue:{kind:Gt.Kind.LIST,values:[{kind:Gt.Kind.INT,value:"0"}]}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.SEMANTIC_NON_NULL,node:en.SEMANTIC_NON_NULL_DEFINITION,optionalArgumentNames:new Set([x.LEVELS]),requiredArgumentNames:new Set};Ke.SPECIFIED_BY_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.URL_LOWER,{name:x.URL_LOWER,typeNode:wn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.SCALAR_UPPER]),name:x.SPECIFIED_BY,node:en.SPECIFIED_BY_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.URL_LOWER])};Ke.SHAREABLE_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!0,locations:new Set([x.FIELD_DEFINITION_UPPER,x.OBJECT_UPPER]),name:x.SHAREABLE,node:en.SHAREABLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.SUBSCRIPTION_FILTER_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CONDITION,{name:x.CONDITION,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.SUBSCRIPTION_FILTER_CONDITION)}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.SUBSCRIPTION_FILTER,node:en.SUBSCRIPTION_FILTER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.CONDITION])};Ke.TAG_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.NAME,{name:x.NAME,typeNode:wn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.UNION_UPPER]),name:x.TAG,node:en.TAG_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.NAME])}});var Ip=F(Aa=>{"use strict";m();T();N();Object.defineProperty(Aa,"__esModule",{value:!0});Aa.newFieldSetData=Bde;Aa.extractFieldSetValue=Ude;Aa.getNormalizedFieldSet=kde;Aa.getInitialFieldCoordsPath=Mde;Aa.validateKeyFieldSets=xde;Aa.getConditionalFieldSetDirectiveName=qde;Aa.isNodeQuery=Vde;Aa.validateArgumentTemplateReferences=jde;Aa.initializeDirectiveDefinitionDatas=Kde;var $n=_e(),oV=Fr(),Or=$i(),uV=Du(),UD=Su(),tn=BD(),gt=zn(),Ms=wr();function Bde(){return{provides:new Map,requires:new Map}}function Ude(e,t,n){if(!n||n.length>1)return;let r=n[0].arguments;if(!r||r.length!==1)return;let i=r[0];i.name.value!==gt.FIELDS||i.value.kind!==$n.Kind.STRING||t.set(e,i.value.value)}function kde(e){return(0,$n.print)((0,oV.lexicographicallySortDocumentNode)(e)).replaceAll(/\s+/g," ").slice(2,-2)}function Mde(e,t){return e?[t]:[]}function xde(e,t,n){let r=e.entityInterfaceDataByTypeName.get(t.name),i=t.name,a=[],o=r?void 0:e.internalGraph.addEntityDataNode(t.name),u=e.internalGraph.addOrUpdateNode(t.name),l=0;for(let[d,{documentNode:p,isUnresolvable:E,rawFieldSet:I}]of n){r&&(r.resolvable||(r.resolvable=!E)),l+=1;let v=[],A=[t],U=[],j=[],J=new Set,re=-1,te=!0,pe="",Ne=!1;if((0,$n.visit)(p,{Argument:{enter(Ie){return v.push((0,Or.unexpectedArgumentErrorMessage)(I,`${A[re].name}.${pe}`,Ie.name.value)),$n.BREAK}},Field:{enter(Ie){let Ue=A[re],He=Ue.name;if(te){let Pt=`${He}.${pe}`,rn=Ue.fieldDataByName.get(pe);if(!rn)return v.push((0,Or.undefinedFieldInFieldSetErrorMessage)(I,Pt,pe)),$n.BREAK;let kr=(0,UD.getTypeNodeNamedTypeName)(rn.node.type),nr=e.parentDefinitionDataByTypeName.get(kr),hn=nr?nr.kind:$n.Kind.SCALAR_TYPE_DEFINITION;return v.push((0,Or.invalidSelectionSetErrorMessage)(I,[Pt],kr,(0,Ms.kindToNodeType)(hn))),$n.BREAK}let W=Ie.name.value,Oe=`${He}.${W}`;if(pe=W,W===gt.TYPENAME)return;let Et=Ue.fieldDataByName.get(W);if(!Et)return v.push((0,Or.undefinedFieldInFieldSetErrorMessage)(I,He,W)),$n.BREAK;if(Et.argumentDataByName.size)return v.push((0,Or.argumentsInKeyFieldSetErrorMessage)(I,Oe)),$n.BREAK;if(U[re].has(W))return v.push((0,Or.duplicateFieldInFieldSetErrorMessage)(I,Oe)),$n.BREAK;let on=Et.externalFieldDataBySubgraphName.get(e.subgraphName);if(!e.isSubgraphEventDrivenGraph&&(on!=null&&on.isDefinedExternal)&&!on.isUnconditionallyProvided&&!e.conditionalFieldDataByCoords.get(Oe)&&!e.options.ignoreExternalKeys){Ne=!0;let rn=u.headToTailEdges.get(W);rn&&(rn.isExternal=!0)}(0,Ms.getValueOrDefault)((0,Ms.getValueOrDefault)(e.keyFieldSetsByEntityTypeNameByFieldCoords,Oe,()=>new Map),i,()=>new Set).add(d),j.push(W),Et.isShareableBySubgraphName.set(e.subgraphName,!0),U[re].add(W),(0,Ms.getValueOrDefault)(e.keyFieldNamesByParentTypeName,He,()=>new Set).add(W);let En=(0,UD.getTypeNodeNamedTypeName)(Et.node.type);if(uV.BASE_SCALARS.has(En)){J.add(j.join(gt.LITERAL_PERIOD)),j.pop();return}let un=e.parentDefinitionDataByTypeName.get(En);if(!un)return v.push((0,Or.unknownTypeInFieldSetErrorMessage)(I,Oe,En)),$n.BREAK;if(un.kind===$n.Kind.OBJECT_TYPE_DEFINITION){te=!0,A.push(un);return}if((0,oV.isKindAbstract)(un.kind))return v.push((0,Or.abstractTypeInKeyFieldSetErrorMessage)(I,Oe,En,(0,Ms.kindToNodeType)(un.kind))),$n.BREAK;J.add(j.join(gt.LITERAL_PERIOD)),j.pop()}},InlineFragment:{enter(){return v.push(Or.inlineFragmentInFieldSetErrorMessage),$n.BREAK}},SelectionSet:{enter(){if(!te){let Ie=A[re],He=`${Ie.name}.${pe}`;if(pe===gt.TYPENAME)return v.push((0,Or.invalidSelectionSetDefinitionErrorMessage)(I,[He],gt.STRING_SCALAR,(0,Ms.kindToNodeType)($n.Kind.SCALAR_TYPE_DEFINITION))),$n.BREAK;let W=Ie.fieldDataByName.get(pe);if(!W)return v.push((0,Or.undefinedFieldInFieldSetErrorMessage)(I,He,pe)),$n.BREAK;let Oe=(0,UD.getTypeNodeNamedTypeName)(W.node.type),Et=e.parentDefinitionDataByTypeName.get(Oe),on=Et?Et.kind:$n.Kind.SCALAR_TYPE_DEFINITION;return v.push((0,Or.invalidSelectionSetDefinitionErrorMessage)(I,[He],Oe,(0,Ms.kindToNodeType)(on))),$n.BREAK}if(re+=1,te=!1,re<0||re>=A.length)return v.push((0,Or.unparsableFieldSetSelectionErrorMessage)(I,pe)),$n.BREAK;U.push(new Set)},leave(){if(te){let Ue=A[re].name,He=A[re+1],W=`${Ue}.${pe}`;v.push((0,Or.invalidSelectionSetErrorMessage)(I,[W],He.name,(0,Ms.kindToNodeType)(He.kind))),te=!1}re-=1,A.pop(),U.pop()}}}),v.length>0){e.errors.push((0,Or.invalidDirectiveError)(gt.KEY,i,(0,Ms.numberToOrdinal)(l),v));continue}a.push(k({fieldName:"",selectionSet:d},E?{disableEntityResolver:!0}:{})),u.satisfiedFieldSets.add(d),Ne&&u.externalFieldSets.add(d),!E&&(o==null||o.addTargetSubgraphByFieldSet(d,e.subgraphName))}if(a.length>0)return a}function qde(e){return e?gt.PROVIDES:gt.REQUIRES}function Vde(e,t){return e===gt.QUERY||t===$n.OperationTypeNode.QUERY}function jde(e,t,n){let r=e.matchAll(uV.EDFS_ARGS_REGEXP),i=new Set,a=new Set;for(let o of r){if(o.length<2){a.add(o[0]);continue}t.has(o[1])||i.add(o[1])}for(let o of i)n.push((0,Or.undefinedEventSubjectsArgumentErrorMessage)(o));for(let o of a)n.push((0,Or.invalidEventSubjectsArgumentErrorMessage)(o))}function Kde(){return new Map([[gt.AUTHENTICATED,tn.AUTHENTICATED_DEFINITION_DATA],[gt.COMPOSE_DIRECTIVE,tn.COMPOSE_DIRECTIVE_DEFINITION_DATA],[gt.CONFIGURE_DESCRIPTION,tn.CONFIGURE_DESCRIPTION_DEFINITION_DATA],[gt.CONFIGURE_CHILD_DESCRIPTIONS,tn.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA],[gt.CONNECT_FIELD_RESOLVER,tn.CONNECT_FIELD_RESOLVER_DEFINITION_DATA],[gt.DEPRECATED,tn.DEPRECATED_DEFINITION_DATA],[gt.EDFS_KAFKA_PUBLISH,tn.KAFKA_PUBLISH_DEFINITION_DATA],[gt.EDFS_KAFKA_SUBSCRIBE,tn.KAFKA_SUBSCRIBE_DEFINITION_DATA],[gt.EDFS_NATS_PUBLISH,tn.NATS_PUBLISH_DEFINITION_DATA],[gt.EDFS_NATS_REQUEST,tn.NATS_REQUEST_DEFINITION_DATA],[gt.EDFS_NATS_SUBSCRIBE,tn.NATS_SUBSCRIBE_DEFINITION_DATA],[gt.EDFS_REDIS_PUBLISH,tn.REDIS_PUBLISH_DEFINITION_DATA],[gt.EDFS_REDIS_SUBSCRIBE,tn.REDIS_SUBSCRIBE_DEFINITION_DATA],[gt.EXTENDS,tn.EXTENDS_DEFINITION_DATA],[gt.EXTERNAL,tn.EXTERNAL_DEFINITION_DATA],[gt.INACCESSIBLE,tn.INACCESSIBLE_DEFINITION_DATA],[gt.INTERFACE_OBJECT,tn.INTERFACE_OBJECT_DEFINITION_DATA],[gt.KEY,tn.KEY_DEFINITION_DATA],[gt.LINK,tn.LINK_DEFINITION_DATA],[gt.ONE_OF,tn.ONE_OF_DEFINITION_DATA],[gt.OVERRIDE,tn.OVERRIDE_DEFINITION_DATA],[gt.PROVIDES,tn.PROVIDES_DEFINITION_DATA],[gt.REQUIRE_FETCH_REASONS,tn.REQUIRE_FETCH_REASONS_DEFINITION_DATA],[gt.REQUIRES,tn.REQUIRES_DEFINITION_DATA],[gt.REQUIRES_SCOPES,tn.REQUIRES_SCOPES_DEFINITION_DATA],[gt.SEMANTIC_NON_NULL,tn.SEMANTIC_NON_NULL_DATA],[gt.SHAREABLE,tn.SHAREABLE_DEFINITION_DATA],[gt.SPECIFIED_BY,tn.SPECIFIED_BY_DEFINITION_DATA],[gt.SUBSCRIPTION_FILTER,tn.SUBSCRIPTION_FILTER_DEFINITION_DATA],[gt.TAG,tn.TAG_DEFINITION_DATA]])}});var MD=F(kD=>{"use strict";m();T();N();Object.defineProperty(kD,"__esModule",{value:!0});kD.recordSubgraphName=$de;function $de(e,t,n){if(!t.has(e)){t.add(e);return}n.add(e)}});var qD=F(VE=>{"use strict";m();T();N();Object.defineProperty(VE,"__esModule",{value:!0});VE.Warning=void 0;var xD=class extends Error{constructor(n){super(n.message);g(this,"subgraph");this.name="Warning",this.subgraph=n.subgraph}};VE.Warning=xD});var gp=F(gi=>{"use strict";m();T();N();Object.defineProperty(gi,"__esModule",{value:!0});gi.invalidOverrideTargetSubgraphNameWarning=Gde;gi.externalInterfaceFieldsWarning=Qde;gi.nonExternalConditionalFieldWarning=Yde;gi.unimplementedInterfaceOutputTypeWarning=Jde;gi.invalidExternalFieldWarning=Hde;gi.requiresDefinedOnNonEntityFieldWarning=zde;gi.consumerInactiveThresholdInvalidValueWarning=Wde;gi.externalEntityExtensionKeyFieldWarning=Xde;gi.fieldAlreadyProvidedWarning=Zde;gi.singleSubgraphInputFieldOneOfWarning=efe;gi.singleFederatedInputFieldOneOfWarning=tfe;var Ra=qD(),VD=zn();function Gde(e,t,n,r){return new Ra.Warning({message:`The Object type "${t}" defines the directive "@override(from: "${e}")" on the following field`+(n.length>1?"s":"")+': "'+n.join(VD.QUOTATION_JOIN)+`". The required "from" argument of type "String!" should be provided with an existing subgraph name. However, a subgraph by the name of "${e}" does not exist. If this subgraph has been recently deleted, remember to clean up unused "@override" directives that reference this subgraph.`,subgraph:{name:r}})}function jE(e){return`The subgraph "${e}" is currently a "version one" subgraph, but if it were updated to "version two" in its current state, composition would be unsuccessful due to the following warning that would instead propagate as an error: -`}function Vde(e,t,n){return new Ra.Warning({message:jE(e)+`The Interface "${t}" is invalid because the following field definition`+(n.length>1?"s are":" is")+` declared "@external": +`}function Qde(e,t,n){return new Ra.Warning({message:jE(e)+`The Interface "${t}" is invalid because the following field definition`+(n.length>1?"s are":" is")+` declared "@external": "`+n.join(VD.QUOTATION_JOIN)+`" -Interface fields should not be declared "@external". This is because Interface fields do not resolve directly, but the "@external" directive relates to whether a Field instance can be resolved by the subgraph in which it is defined.`,subgraph:{name:e}})}function jde(e,t,n,r,i){return new Ra.Warning({message:jE(t)+`The Field "${e}" in subgraph "${t}" defines a "@${i}" directive with the following field set: +Interface fields should not be declared "@external". This is because Interface fields do not resolve directly, but the "@external" directive relates to whether a Field instance can be resolved by the subgraph in which it is defined.`,subgraph:{name:e}})}function Yde(e,t,n,r,i){return new Ra.Warning({message:jE(t)+`The Field "${e}" in subgraph "${t}" defines a "@${i}" directive with the following field set: "${r}". However, neither the field "${n}" nor any of its field set ancestors are declared @external. -Consequently, "${n}" is already provided by subgraph "${t}" and should not form part of a "@${i}" directive field set.`,subgraph:{name:t}})}function Kde(e,t){return new Ra.Warning({message:`Subgraph "${e}": The Interface "${t}" is used as an output type without at least one Object type implementation defined in the schema.`,subgraph:{name:e}})}function $de(e,t){return new Ra.Warning({message:jE(t)+` The Object Field "${e}" is invalidly declared "@external". An Object field should only be declared "@external" if it is part of a "@key", "@provides", or "@requires" field set, or the field is necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the "@external" directive should be removed.`,subgraph:{name:t}})}function Gde(e,t){return new Ra.Warning({message:` The Object Field "${e}" defines a "@requires" directive, but the Object is not an entity. Consequently, the "@requires" FieldSet cannot be satisfied because there is no entity resolver with which to provide the required Fields.`,subgraph:{name:t}})}function Qde(e,t=""){return new Ra.Warning({message:'The "consumerInactiveThreshold" argument of type "Int" should be positive and smaller than 2,147,483,648.'+ +t?` -${t}`:"",subgraph:{name:e}})}function Yde(e,t,n,r){return new Ra.Warning({message:`The entity extension "${e}" defined in subgraph "${r}" defines a "@key" directive with the field set "${t}". +Consequently, "${n}" is already provided by subgraph "${t}" and should not form part of a "@${i}" directive field set.`,subgraph:{name:t}})}function Jde(e,t){return new Ra.Warning({message:`Subgraph "${e}": The Interface "${t}" is used as an output type without at least one Object type implementation defined in the schema.`,subgraph:{name:e}})}function Hde(e,t){return new Ra.Warning({message:jE(t)+` The Object Field "${e}" is invalidly declared "@external". An Object field should only be declared "@external" if it is part of a "@key", "@provides", or "@requires" field set, or the field is necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the "@external" directive should be removed.`,subgraph:{name:t}})}function zde(e,t){return new Ra.Warning({message:` The Object Field "${e}" defines a "@requires" directive, but the Object is not an entity. Consequently, the "@requires" FieldSet cannot be satisfied because there is no entity resolver with which to provide the required Fields.`,subgraph:{name:t}})}function Wde(e,t=""){return new Ra.Warning({message:'The "consumerInactiveThreshold" argument of type "Int" should be positive and smaller than 2,147,483,648.'+ +t?` +${t}`:"",subgraph:{name:e}})}function Xde(e,t,n,r){return new Ra.Warning({message:`The entity extension "${e}" defined in subgraph "${r}" defines a "@key" directive with the field set "${t}". The following field coordinates that form part of that field set are declared "@external": "`+n.join(VD.QUOTATION_JOIN)+`" -Please note fields that form part of entity extension "@key" field sets are always provided in that subgraph. Any such "@external" declarations are unnecessary relics of Federation Version 1 syntax and are effectively ignored.`,subgraph:{name:r}})}function Jde(e,t,n,r){return new Ra.Warning({message:jE(r)+`The field "${e}" is unconditionally provided by subgraph "${r}" and should not form part of any "@${t}" field set. +Please note fields that form part of entity extension "@key" field sets are always provided in that subgraph. Any such "@external" declarations are unnecessary relics of Federation Version 1 syntax and are effectively ignored.`,subgraph:{name:r}})}function Zde(e,t,n,r){return new Ra.Warning({message:jE(r)+`The field "${e}" is unconditionally provided by subgraph "${r}" and should not form part of any "@${t}" field set. However, "${e}" forms part of the "@${t}" field set defined "${n}". -Although "${e}" is declared "@external", it is part of a "@key" directive on an extension type. Such fields are only declared "@external" for legacy syntactical reasons and are not internally considered "@external".`,subgraph:{name:r}})}function Hde({fieldName:e,subgraphName:t,typeName:n}){return new Ra.Warning({message:`The directive "@oneOf" is defined on Input Object "${n}", but only one optional Input field, "${e}", is defined. Consider removing "@oneOf" and changing "${e}" to a required type instead.`,subgraph:{name:t}})}function zde({fieldName:e,typeName:t}){return new Ra.Warning({message:`The directive "@oneOf" is defined on Input Object "${t}", but only one optional Input field, "${e}", is propagated to the federated graph. Consider removing "@oneOf", changing "${e}" to a required type, and removing any other remaining optional Input fields instead.`,subgraph:{name:""}})}});var $D=w($E=>{"use strict";m();T();N();Object.defineProperty($E,"__esModule",{value:!0});$E.upsertDirectiveSchemaAndEntityDefinitions=Zde;$E.upsertParentsAndChildren=efe;var Gn=Ie(),Cu=$i(),KD=Du(),KE=yp(),Nd=Fr(),jD=Ip(),Wde=dd(),md=$l(),_p=Su(),Xde=gp(),ra=zn(),yr=wr();function Zde(e,t){(0,Gn.visit)(t,{Directive:{enter(n){let r=n.name.value;return e.referencedDirectiveNames.add(r),Wde.EVENT_DIRECTIVE_NAMES.has(r)&&e.edfsDirectiveReferences.add(r),KD.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r)&&(e.isSubgraphVersionTwo=!0),!1}},DirectiveDefinition:{enter(n){return e.addDirectiveDefinitionDataByNode(n)&&e.customDirectiveDefinitionByName.set(n.name.value,n),!1}},InterfaceTypeDefinition:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,Nd.isObjectLikeNodeEntity)(n))return;let i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,yr.getValueOrDefault)(e.entityInterfaceDataByTypeName,r,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,resolvable:!1,typeName:r}))}},InterfaceTypeExtension:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,Nd.isObjectLikeNodeEntity)(n))return;let i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,yr.getValueOrDefault)(e.entityInterfaceDataByTypeName,r,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,resolvable:!1,typeName:r}))}},ObjectTypeDefinition:{enter(n){if(!(0,Nd.isObjectLikeNodeEntity)(n))return;let r=n.name.value;(0,Nd.isNodeInterfaceObject)(n)&&(e.entityInterfaceDataByTypeName.set(r,{concreteTypeNames:new Set,fieldDatas:[],interfaceObjectFieldNames:new Set,interfaceFieldNames:new Set,isInterfaceObject:!0,resolvable:!1,typeName:r}),e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}));let i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},ObjectTypeExtension:{enter(n){if(!(0,Nd.isObjectLikeNodeEntity)(n))return;let r=n.name.value,i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},OperationTypeDefinition:{enter(n){let r=n.operation,i=e.schemaData.operationTypes.get(r),a=(0,_p.getTypeNodeNamedTypeName)(n.type);if(i)return e.errors.push((0,Cu.duplicateOperationTypeDefinitionError)(r,a,(0,_p.getTypeNodeNamedTypeName)(i.type))),!1;let o=e.operationTypeNodeByTypeName.get(a);return o?(e.errors.push((0,Cu.invalidOperationTypeDefinitionError)(o,a,r)),!1):(e.operationTypeNodeByTypeName.set(a,r),e.schemaData.operationTypes.set(r,n),!1)}},SchemaDefinition:{enter(n){e.schemaData.description=n.description,e.extractDirectives(n,e.schemaData.directivesByName)}},SchemaExtension:{enter(n){e.extractDirectives(n,e.schemaData.directivesByName)}}})}function efe(e,t){let n=!1,r;(0,Gn.visit)(t,{EnumTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},EnumTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},EnumValueDefinition:{enter(i){let a=i.name.value;e.lastChildNodeKind=i.kind;let o=(0,yr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,ra.PARENT_DEFINITION_DATA);if(o.kind!==Gn.Kind.ENUM_TYPE_DEFINITION){e.errors.push((0,Cu.unexpectedParentKindForChildError)(e.originalParentTypeName,"Enum or Enum extension",(0,yr.kindToNodeType)(o.kind),a,(0,yr.kindToNodeType)(i.kind)));return}if(o.enumValueDataByName.has(a)){e.errors.push((0,Cu.duplicateEnumValueDefinitionError)(e.originalParentTypeName,a));return}o.enumValueDataByName.set(a,{appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:e.extractDirectives(i,new Map),federatedCoords:`${e.originalParentTypeName}.${a}`,kind:Gn.Kind.ENUM_VALUE_DEFINITION,name:a,node:(0,_p.getMutableEnumValueNode)(i),parentTypeName:e.originalParentTypeName,persistedDirectivesData:(0,md.newPersistedDirectivesData)(),subgraphNames:new Set([e.subgraphName]),description:(0,Nd.formatDescription)(i.description)})},leave(){e.lastChildNodeKind=Gn.Kind.NULL}},FieldDefinition:{enter(i){let a=i.name.value;if(n&&ra.IGNORED_FIELDS.has(a))return!1;e.edfsDirectiveReferences.size>0&&e.validateSubscriptionFilterDirectiveLocation(i),e.lastChildNodeKind=i.kind;let o=(0,_p.getTypeNodeNamedTypeName)(i.type);(0,yr.getValueOrDefault)(e.fieldCoordsByNamedTypeName,o,()=>new Set).add(`${e.renamedParentTypeName||e.originalParentTypeName}.${a}`),r&&!r.isAbstract&&e.internalGraph.addEdge(r,e.internalGraph.addOrUpdateNode(o),a),KD.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let u=(0,yr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,ra.PARENT_DEFINITION_DATA);if(!(0,md.isParentDataCompositeOutputType)(u)){e.errors.push((0,Cu.unexpectedParentKindForChildError)(e.originalParentTypeName,'"Object" or "Interface"',(0,yr.kindToNodeType)(u.kind),a,(0,yr.kindToNodeType)(i.kind)));return}if(u.fieldDataByName.has(a)){e.errors.push((0,Cu.duplicateFieldDefinitionError)((0,yr.kindToNodeType)(u.kind),u.name,a));return}let l=e.extractArguments(new Map,i),d=e.extractDirectives(i,new Map),p=new Set;e.handleFieldInheritableDirectives({directivesByName:d,fieldName:a,inheritedDirectiveNames:p,parentData:u});let E=e.addFieldDataByNode(u.fieldDataByName,i,l,d,p);n&&e.extractEventDirectivesToConfiguration(i,l);let I=E.directivesByName.get(ra.PROVIDES),v=E.directivesByName.get(ra.REQUIRES);if(!v&&!I)return;let A=e.entityDataByTypeName.get(e.originalParentTypeName),U=(0,yr.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,jD.newFieldSetData);I&&(0,jD.extractFieldSetValue)(a,U.provides,I),v&&(A||e.warnings.push((0,Xde.requiresDefinedOnNonEntityFieldWarning)(`${e.originalParentTypeName}.${a}`,e.subgraphName)),(0,jD.extractFieldSetValue)(a,U.requires,v))},leave(){e.lastChildNodeKind=Gn.Kind.NULL}},InputObjectTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i)},leave(){e.lastParentNodeKind=Gn.Kind.NULL,e.originalParentTypeName=""}},InputObjectTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},InputValueDefinition:{enter(i){let a=i.name.value;if(e.lastParentNodeKind!==Gn.Kind.INPUT_OBJECT_TYPE_DEFINITION&&e.lastParentNodeKind!==Gn.Kind.INPUT_OBJECT_TYPE_EXTENSION){e.argumentName=a;return}e.lastChildNodeKind=i.kind;let o=(0,_p.getTypeNodeNamedTypeName)(i.type);KD.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let u=(0,yr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,ra.PARENT_DEFINITION_DATA);if(u.kind!==Gn.Kind.INPUT_OBJECT_TYPE_DEFINITION)return e.errors.push((0,Cu.unexpectedParentKindForChildError)(e.originalParentTypeName,"input object or input object extension",(0,yr.kindToNodeType)(u.kind),a,(0,yr.kindToNodeType)(i.kind))),!1;if(u.inputValueDataByName.has(a)){e.errors.push((0,Cu.duplicateInputFieldDefinitionError)(e.originalParentTypeName,a));return}e.addInputValueDataByNode({inputValueDataByName:u.inputValueDataByName,isArgument:!1,node:i,originalParentTypeName:e.originalParentTypeName})},leave(){e.argumentName="",e.lastChildNodeKind===Gn.Kind.INPUT_VALUE_DEFINITION&&(e.lastChildNodeKind=Gn.Kind.NULL)}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i)},leave(){e.doesParentRequireFetchReasons=!1,e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i,!0)},leave(){e.doesParentRequireFetchReasons=!1,e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},ObjectTypeDefinition:{enter(i){if(i.name.value===ra.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,md.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,md.getRenamedRootTypeName)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.originalTypeNameByRenamedTypeName.set(e.renamedParentTypeName,e.originalParentTypeName),r=n?e.internalGraph.getRootNode(e.renamedParentTypeName):e.internalGraph.addOrUpdateNode(e.renamedParentTypeName),e.lastParentNodeKind=i.kind,e.upsertObjectDataByNode(i)},leave(){r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ObjectTypeExtension:{enter(i){if(i.name.value===ra.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,md.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,md.getRenamedRootTypeName)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.originalTypeNameByRenamedTypeName.set(e.renamedParentTypeName,e.originalParentTypeName),r=n?e.internalGraph.getRootNode(e.renamedParentTypeName):e.internalGraph.addOrUpdateNode(e.renamedParentTypeName),e.lastParentNodeKind=i.kind,e.upsertObjectDataByNode(i,!0)},leave(){r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ScalarTypeDefinition:{enter(i){if(i.name.value===ra.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},ScalarTypeExtension:{enter(i){if(i.name.value===ra.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},UnionTypeDefinition:{enter(i){if(i.name.value===ra.ENTITY_UNION)return!1;e.upsertUnionByNode(i)}},UnionTypeExtension:{enter(i){if(i.name.value===ra.ENTITY_UNION)return!1;e.upsertUnionByNode(i,!0)}}})}});var HD=w(is=>{"use strict";m();T();N();Object.defineProperty(is,"__esModule",{value:!0});is.EntityDataNode=is.RootNode=is.GraphNode=is.Edge=void 0;var GE=wr(),GD=class{constructor(t,n,r,i=!1){g(this,"edgeName");g(this,"id");g(this,"isAbstractEdge");g(this,"isExternal",!1);g(this,"isInaccessible",!1);g(this,"node");g(this,"visitedIndices",new Set);this.edgeName=i?`... on ${r}`:r,this.id=t,this.isAbstractEdge=i,this.node=n}isEdgeInaccessible(){return this.isInaccessible||this.node.isInaccessible}};is.Edge=GD;var QD=class{constructor(t,n,r){g(this,"externalFieldSets",new Set);g(this,"fieldDataByName",new Map);g(this,"headToTailEdges",new Map);g(this,"entityEdges",new Array);g(this,"nodeName");g(this,"hasEntitySiblings",!1);g(this,"isAbstract");g(this,"isInaccessible",!1);g(this,"isLeaf",!1);g(this,"isRootNode",!1);g(this,"satisfiedFieldSets",new Set);g(this,"subgraphName");g(this,"typeName");this.isAbstract=!!(r!=null&&r.isAbstract),this.isLeaf=!!(r!=null&&r.isLeaf),this.nodeName=`${t}.${n}`,this.subgraphName=t,this.typeName=n}handleInaccessibleEdges(){if(this.isAbstract)return;let t=(0,GE.getEntriesNotInHashSet)(this.headToTailEdges.keys(),this.fieldDataByName);for(let n of t){let r=this.headToTailEdges.get(n);r&&(r.isInaccessible=!0)}}getAllAccessibleEntityNodeNames(){let t=new Set([this.nodeName]);return this.getAccessibleEntityNodeNames(this,t),t.delete(this.nodeName),t}getAccessibleEntityNodeNames(t,n){for(let r of t.entityEdges)(0,GE.add)(n,r.node.nodeName)&&this.getAccessibleEntityNodeNames(r.node,n)}};is.GraphNode=QD;var YD=class{constructor(t){g(this,"fieldDataByName",new Map);g(this,"headToSharedTailEdges",new Map);g(this,"isAbstract",!1);g(this,"isRootNode",!0);g(this,"typeName");this.typeName=t}removeInaccessibleEdges(t){for(let[n,r]of this.headToSharedTailEdges)if(!t.has(n))for(let i of r)i.isInaccessible=!0}};is.RootNode=YD;var JD=class{constructor(t){g(this,"fieldSetsByTargetSubgraphName",new Map);g(this,"targetSubgraphNamesByFieldSet",new Map);g(this,"typeName");this.typeName=t}addTargetSubgraphByFieldSet(t,n){(0,GE.getValueOrDefault)(this.targetSubgraphNamesByFieldSet,t,()=>new Set).add(n),(0,GE.getValueOrDefault)(this.fieldSetsByTargetSubgraphName,n,()=>new Set).add(t)}};is.EntityDataNode=JD});var zD=w(Qn=>{"use strict";m();T();N();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ROOT_TYPE_NAMES=Qn.QUOTATION_JOIN=Qn.NOT_APPLICABLE=Qn.LITERAL_SPACE=Qn.LITERAL_PERIOD=Qn.SUBSCRIPTION=Qn.QUERY=Qn.MUTATION=void 0;Qn.MUTATION="Mutation";Qn.QUERY="Query";Qn.SUBSCRIPTION="Subscription";Qn.LITERAL_PERIOD=".";Qn.LITERAL_SPACE=" ";Qn.NOT_APPLICABLE="N/A";Qn.QUOTATION_JOIN='", "';Qn.ROOT_TYPE_NAMES=new Set([Qn.MUTATION,Qn.QUERY,Qn.SUBSCRIPTION])});var eb=w(Pa=>{"use strict";m();T();N();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.newRootFieldData=tfe;Pa.generateResolvabilityErrorReasons=ZD;Pa.generateSharedResolvabilityErrorReasons=cV;Pa.generateSelectionSetSegments=QE;Pa.renderSelectionSet=YE;Pa.generateRootResolvabilityErrors=rfe;Pa.generateEntityResolvabilityErrors=ife;Pa.generateSharedEntityResolvabilityErrors=afe;Pa.getMultipliedRelativeOriginPaths=sfe;var WD=$i(),XD=wr(),si=zD();function tfe(e,t,n){return{coords:`${e}.${t}`,message:`The root type field "${e}.${t}" is defined in the following subgraph`+(n.size>1?"s":"")+`: "${[...n].join(si.QUOTATION_JOIN)}".`,subgraphNames:n}}function nfe(e,t){return e.isLeaf?e.name+` <-- +Although "${e}" is declared "@external", it is part of a "@key" directive on an extension type. Such fields are only declared "@external" for legacy syntactical reasons and are not internally considered "@external".`,subgraph:{name:r}})}function efe({fieldName:e,subgraphName:t,typeName:n}){return new Ra.Warning({message:`The directive "@oneOf" is defined on Input Object "${n}", but only one optional Input field, "${e}", is defined. Consider removing "@oneOf" and changing "${e}" to a required type instead.`,subgraph:{name:t}})}function tfe({fieldName:e,typeName:t}){return new Ra.Warning({message:`The directive "@oneOf" is defined on Input Object "${t}", but only one optional Input field, "${e}", is propagated to the federated graph. Consider removing "@oneOf", changing "${e}" to a required type, and removing any other remaining optional Input fields instead.`,subgraph:{name:""}})}});var $D=F($E=>{"use strict";m();T();N();Object.defineProperty($E,"__esModule",{value:!0});$E.upsertDirectiveSchemaAndEntityDefinitions=ife;$E.upsertParentsAndChildren=afe;var Gn=_e(),Cu=$i(),KD=Du(),KE=yp(),Nd=Fr(),jD=Ip(),nfe=dd(),md=$l(),_p=Su(),rfe=gp(),ra=zn(),yr=wr();function ife(e,t){(0,Gn.visit)(t,{Directive:{enter(n){let r=n.name.value;return e.referencedDirectiveNames.add(r),nfe.EVENT_DIRECTIVE_NAMES.has(r)&&e.edfsDirectiveReferences.add(r),KD.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r)&&(e.isSubgraphVersionTwo=!0),!1}},DirectiveDefinition:{enter(n){return e.addDirectiveDefinitionDataByNode(n)&&e.customDirectiveDefinitionByName.set(n.name.value,n),!1}},InterfaceTypeDefinition:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,Nd.isObjectLikeNodeEntity)(n))return;let i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,yr.getValueOrDefault)(e.entityInterfaceDataByTypeName,r,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,resolvable:!1,typeName:r}))}},InterfaceTypeExtension:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,Nd.isObjectLikeNodeEntity)(n))return;let i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,yr.getValueOrDefault)(e.entityInterfaceDataByTypeName,r,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,resolvable:!1,typeName:r}))}},ObjectTypeDefinition:{enter(n){if(!(0,Nd.isObjectLikeNodeEntity)(n))return;let r=n.name.value;(0,Nd.isNodeInterfaceObject)(n)&&(e.entityInterfaceDataByTypeName.set(r,{concreteTypeNames:new Set,fieldDatas:[],interfaceObjectFieldNames:new Set,interfaceFieldNames:new Set,isInterfaceObject:!0,resolvable:!1,typeName:r}),e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}));let i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},ObjectTypeExtension:{enter(n){if(!(0,Nd.isObjectLikeNodeEntity)(n))return;let r=n.name.value,i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},OperationTypeDefinition:{enter(n){let r=n.operation,i=e.schemaData.operationTypes.get(r),a=(0,_p.getTypeNodeNamedTypeName)(n.type);if(i)return e.errors.push((0,Cu.duplicateOperationTypeDefinitionError)(r,a,(0,_p.getTypeNodeNamedTypeName)(i.type))),!1;let o=e.operationTypeNodeByTypeName.get(a);return o?(e.errors.push((0,Cu.invalidOperationTypeDefinitionError)(o,a,r)),!1):(e.operationTypeNodeByTypeName.set(a,r),e.schemaData.operationTypes.set(r,n),!1)}},SchemaDefinition:{enter(n){e.schemaData.description=n.description,e.extractDirectives(n,e.schemaData.directivesByName)}},SchemaExtension:{enter(n){e.extractDirectives(n,e.schemaData.directivesByName)}}})}function afe(e,t){let n=!1,r;(0,Gn.visit)(t,{EnumTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},EnumTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},EnumValueDefinition:{enter(i){let a=i.name.value;e.lastChildNodeKind=i.kind;let o=(0,yr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,ra.PARENT_DEFINITION_DATA);if(o.kind!==Gn.Kind.ENUM_TYPE_DEFINITION){e.errors.push((0,Cu.unexpectedParentKindForChildError)(e.originalParentTypeName,"Enum or Enum extension",(0,yr.kindToNodeType)(o.kind),a,(0,yr.kindToNodeType)(i.kind)));return}if(o.enumValueDataByName.has(a)){e.errors.push((0,Cu.duplicateEnumValueDefinitionError)(e.originalParentTypeName,a));return}o.enumValueDataByName.set(a,{appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:e.extractDirectives(i,new Map),federatedCoords:`${e.originalParentTypeName}.${a}`,kind:Gn.Kind.ENUM_VALUE_DEFINITION,name:a,node:(0,_p.getMutableEnumValueNode)(i),parentTypeName:e.originalParentTypeName,persistedDirectivesData:(0,md.newPersistedDirectivesData)(),subgraphNames:new Set([e.subgraphName]),description:(0,Nd.formatDescription)(i.description)})},leave(){e.lastChildNodeKind=Gn.Kind.NULL}},FieldDefinition:{enter(i){let a=i.name.value;if(n&&ra.IGNORED_FIELDS.has(a))return!1;e.edfsDirectiveReferences.size>0&&e.validateSubscriptionFilterDirectiveLocation(i),e.lastChildNodeKind=i.kind;let o=(0,_p.getTypeNodeNamedTypeName)(i.type);(0,yr.getValueOrDefault)(e.fieldCoordsByNamedTypeName,o,()=>new Set).add(`${e.renamedParentTypeName||e.originalParentTypeName}.${a}`),r&&!r.isAbstract&&e.internalGraph.addEdge(r,e.internalGraph.addOrUpdateNode(o),a),KD.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let u=(0,yr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,ra.PARENT_DEFINITION_DATA);if(!(0,md.isParentDataCompositeOutputType)(u)){e.errors.push((0,Cu.unexpectedParentKindForChildError)(e.originalParentTypeName,'"Object" or "Interface"',(0,yr.kindToNodeType)(u.kind),a,(0,yr.kindToNodeType)(i.kind)));return}if(u.fieldDataByName.has(a)){e.errors.push((0,Cu.duplicateFieldDefinitionError)((0,yr.kindToNodeType)(u.kind),u.name,a));return}let l=e.extractArguments(new Map,i),d=e.extractDirectives(i,new Map),p=new Set;e.handleFieldInheritableDirectives({directivesByName:d,fieldName:a,inheritedDirectiveNames:p,parentData:u});let E=e.addFieldDataByNode(u.fieldDataByName,i,l,d,p);n&&e.extractEventDirectivesToConfiguration(i,l);let I=E.directivesByName.get(ra.PROVIDES),v=E.directivesByName.get(ra.REQUIRES);if(!v&&!I)return;let A=e.entityDataByTypeName.get(e.originalParentTypeName),U=(0,yr.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,jD.newFieldSetData);I&&(0,jD.extractFieldSetValue)(a,U.provides,I),v&&(A||e.warnings.push((0,rfe.requiresDefinedOnNonEntityFieldWarning)(`${e.originalParentTypeName}.${a}`,e.subgraphName)),(0,jD.extractFieldSetValue)(a,U.requires,v))},leave(){e.lastChildNodeKind=Gn.Kind.NULL}},InputObjectTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i)},leave(){e.lastParentNodeKind=Gn.Kind.NULL,e.originalParentTypeName=""}},InputObjectTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},InputValueDefinition:{enter(i){let a=i.name.value;if(e.lastParentNodeKind!==Gn.Kind.INPUT_OBJECT_TYPE_DEFINITION&&e.lastParentNodeKind!==Gn.Kind.INPUT_OBJECT_TYPE_EXTENSION){e.argumentName=a;return}e.lastChildNodeKind=i.kind;let o=(0,_p.getTypeNodeNamedTypeName)(i.type);KD.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let u=(0,yr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,ra.PARENT_DEFINITION_DATA);if(u.kind!==Gn.Kind.INPUT_OBJECT_TYPE_DEFINITION)return e.errors.push((0,Cu.unexpectedParentKindForChildError)(e.originalParentTypeName,"input object or input object extension",(0,yr.kindToNodeType)(u.kind),a,(0,yr.kindToNodeType)(i.kind))),!1;if(u.inputValueDataByName.has(a)){e.errors.push((0,Cu.duplicateInputFieldDefinitionError)(e.originalParentTypeName,a));return}e.addInputValueDataByNode({inputValueDataByName:u.inputValueDataByName,isArgument:!1,node:i,originalParentTypeName:e.originalParentTypeName})},leave(){e.argumentName="",e.lastChildNodeKind===Gn.Kind.INPUT_VALUE_DEFINITION&&(e.lastChildNodeKind=Gn.Kind.NULL)}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i)},leave(){e.doesParentRequireFetchReasons=!1,e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i,!0)},leave(){e.doesParentRequireFetchReasons=!1,e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},ObjectTypeDefinition:{enter(i){if(i.name.value===ra.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,md.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,md.getRenamedRootTypeName)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.originalTypeNameByRenamedTypeName.set(e.renamedParentTypeName,e.originalParentTypeName),r=n?e.internalGraph.getRootNode(e.renamedParentTypeName):e.internalGraph.addOrUpdateNode(e.renamedParentTypeName),e.lastParentNodeKind=i.kind,e.upsertObjectDataByNode(i)},leave(){r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ObjectTypeExtension:{enter(i){if(i.name.value===ra.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,md.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,md.getRenamedRootTypeName)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.originalTypeNameByRenamedTypeName.set(e.renamedParentTypeName,e.originalParentTypeName),r=n?e.internalGraph.getRootNode(e.renamedParentTypeName):e.internalGraph.addOrUpdateNode(e.renamedParentTypeName),e.lastParentNodeKind=i.kind,e.upsertObjectDataByNode(i,!0)},leave(){r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ScalarTypeDefinition:{enter(i){if(i.name.value===ra.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},ScalarTypeExtension:{enter(i){if(i.name.value===ra.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},UnionTypeDefinition:{enter(i){if(i.name.value===ra.ENTITY_UNION)return!1;e.upsertUnionByNode(i)}},UnionTypeExtension:{enter(i){if(i.name.value===ra.ENTITY_UNION)return!1;e.upsertUnionByNode(i,!0)}}})}});var HD=F(is=>{"use strict";m();T();N();Object.defineProperty(is,"__esModule",{value:!0});is.EntityDataNode=is.RootNode=is.GraphNode=is.Edge=void 0;var GE=wr(),GD=class{constructor(t,n,r,i=!1){g(this,"edgeName");g(this,"id");g(this,"isAbstractEdge");g(this,"isExternal",!1);g(this,"isInaccessible",!1);g(this,"node");g(this,"visitedIndices",new Set);this.edgeName=i?`... on ${r}`:r,this.id=t,this.isAbstractEdge=i,this.node=n}isEdgeInaccessible(){return this.isInaccessible||this.node.isInaccessible}};is.Edge=GD;var QD=class{constructor(t,n,r){g(this,"externalFieldSets",new Set);g(this,"fieldDataByName",new Map);g(this,"headToTailEdges",new Map);g(this,"entityEdges",new Array);g(this,"nodeName");g(this,"hasEntitySiblings",!1);g(this,"isAbstract");g(this,"isInaccessible",!1);g(this,"isLeaf",!1);g(this,"isRootNode",!1);g(this,"satisfiedFieldSets",new Set);g(this,"subgraphName");g(this,"typeName");this.isAbstract=!!(r!=null&&r.isAbstract),this.isLeaf=!!(r!=null&&r.isLeaf),this.nodeName=`${t}.${n}`,this.subgraphName=t,this.typeName=n}handleInaccessibleEdges(){if(this.isAbstract)return;let t=(0,GE.getEntriesNotInHashSet)(this.headToTailEdges.keys(),this.fieldDataByName);for(let n of t){let r=this.headToTailEdges.get(n);r&&(r.isInaccessible=!0)}}getAllAccessibleEntityNodeNames(){let t=new Set([this.nodeName]);return this.getAccessibleEntityNodeNames(this,t),t.delete(this.nodeName),t}getAccessibleEntityNodeNames(t,n){for(let r of t.entityEdges)(0,GE.add)(n,r.node.nodeName)&&this.getAccessibleEntityNodeNames(r.node,n)}};is.GraphNode=QD;var YD=class{constructor(t){g(this,"fieldDataByName",new Map);g(this,"headToSharedTailEdges",new Map);g(this,"isAbstract",!1);g(this,"isRootNode",!0);g(this,"typeName");this.typeName=t}removeInaccessibleEdges(t){for(let[n,r]of this.headToSharedTailEdges)if(!t.has(n))for(let i of r)i.isInaccessible=!0}};is.RootNode=YD;var JD=class{constructor(t){g(this,"fieldSetsByTargetSubgraphName",new Map);g(this,"targetSubgraphNamesByFieldSet",new Map);g(this,"typeName");this.typeName=t}addTargetSubgraphByFieldSet(t,n){(0,GE.getValueOrDefault)(this.targetSubgraphNamesByFieldSet,t,()=>new Set).add(n),(0,GE.getValueOrDefault)(this.fieldSetsByTargetSubgraphName,n,()=>new Set).add(t)}};is.EntityDataNode=JD});var zD=F(Qn=>{"use strict";m();T();N();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ROOT_TYPE_NAMES=Qn.QUOTATION_JOIN=Qn.NOT_APPLICABLE=Qn.LITERAL_SPACE=Qn.LITERAL_PERIOD=Qn.SUBSCRIPTION=Qn.QUERY=Qn.MUTATION=void 0;Qn.MUTATION="Mutation";Qn.QUERY="Query";Qn.SUBSCRIPTION="Subscription";Qn.LITERAL_PERIOD=".";Qn.LITERAL_SPACE=" ";Qn.NOT_APPLICABLE="N/A";Qn.QUOTATION_JOIN='", "';Qn.ROOT_TYPE_NAMES=new Set([Qn.MUTATION,Qn.QUERY,Qn.SUBSCRIPTION])});var eb=F(Pa=>{"use strict";m();T();N();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.newRootFieldData=sfe;Pa.generateResolvabilityErrorReasons=ZD;Pa.generateSharedResolvabilityErrorReasons=cV;Pa.generateSelectionSetSegments=QE;Pa.renderSelectionSet=YE;Pa.generateRootResolvabilityErrors=ufe;Pa.generateEntityResolvabilityErrors=cfe;Pa.generateSharedEntityResolvabilityErrors=lfe;Pa.getMultipliedRelativeOriginPaths=dfe;var WD=$i(),XD=wr(),si=zD();function sfe(e,t,n){return{coords:`${e}.${t}`,message:`The root type field "${e}.${t}" is defined in the following subgraph`+(n.size>1?"s":"")+`: "${[...n].join(si.QUOTATION_JOIN)}".`,subgraphNames:n}}function ofe(e,t){return e.isLeaf?e.name+` <-- `:e.name+` { <-- `+si.LITERAL_SPACE.repeat(t+3)+`... `+si.LITERAL_SPACE.repeat(t+2)+`} `}function ZD({entityAncestorData:e,rootFieldData:t,unresolvableFieldData:n}){let{externalSubgraphNames:r,fieldName:i,typeName:a,subgraphNames:o}=n,u=[t.message];if(r.size>0){let l=o.difference(r);u.push(`The field "${a}.${i}" is defined (and resolvable) in the following subgraph`+(l.size>1?"s":"")+`: "${[...l].join(si.QUOTATION_JOIN)}".`,`The field "${a}.${i}" is defined "@external" (and unresolvable) in the following subgraph`+(r.size>1?"s":"")+`: "${[...r].join(si.QUOTATION_JOIN)}".`)}else u.push(`The field "${a}.${i}" is defined in the following subgraph`+(o.size>1?"s":"")+`: "${[...o].join(si.QUOTATION_JOIN)}".`);if(e){let l=!1;for(let[d,p]of e.fieldSetsByTargetSubgraphName)if(o.has(d)){l=!0;for(let E of p)e.subgraphName!==d&&u.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" does not satisfy the key field set "${E}" to access subgraph "${d}".`)}l||u.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" has no accessible target entities (resolvable @key directives) in the subgraphs where "${a}.${i}" is defined.`),u.push(`The type "${a}" is not a descendant of any other entity ancestors that can provide a shared route to access "${i}".`)}else t.subgraphNames.size>1&&u.push(`None of the subgraphs that shares the same root type field "${t.coords}" can provide a route to access "${i}".`),u.push(`The type "${a}" is not a descendant of an entity ancestor that can provide a shared route to access "${i}".`);return a!==(e==null?void 0:e.typeName)&&u.push(`The type "${a}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),u}function cV({entityAncestors:e,rootFieldData:t,unresolvableFieldData:n}){let{externalSubgraphNames:r,fieldName:i,typeName:a,subgraphNames:o}=n,u=[t.message];if(r.size>0){let d=o.difference(r);u.push(`The field "${a}.${i}" is defined (and resolvable) in the following subgraph`+(d.size>1?"s":"")+`: "${[...d].join(si.QUOTATION_JOIN)}".`,`The field "${a}.${i}" is defined "@external" (and unresolvable) in the following subgraph`+(r.size>1?"s":"")+`: "${[...r].join(si.QUOTATION_JOIN)}".`)}else u.push(`The field "${a}.${i}" is defined in the following subgraph`+(o.size>1?"s":"")+`: "${[...o].join(si.QUOTATION_JOIN)}".`);let l=!1;for(let[d,p]of e.fieldSetsByTargetSubgraphName){if(!o.has(d))continue;let E=e.subgraphNames.filter(v=>v!==d),I=E.length>1;l=!0;for(let v of p)u.push(`The entity ancestor "${e.typeName}" in subgraph${I?"s":""} "${E.join(si.QUOTATION_JOIN)}" do${I?"":"es"} not satisfy the key field set "${v}" to access subgraph "${d}".`)}if(!l){let d=e.subgraphNames.length>1;u.push(`The entity ancestor "${e.typeName}" in subgraph${d?"s":""} "${e.subgraphNames.join(si.QUOTATION_JOIN)}" ha${d?"ve":"s"} no accessible target entities (resolvable @key directives) in the subgraphs where "${a}.${i}" is defined.`)}return u.push(`The type "${a}" is not a descendant of any other entity ancestors that can provide a shared route to access "${i}".`),a!==e.typeName&&u.push(`The type "${a}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),u}function QE(e){let t=e.split(new RegExp("(?<=\\w)\\.")),n="",r="";for(let i=0;i{"use strict";m();T();N();Object.defineProperty(JE,"__esModule",{value:!0});JE.NodeResolutionData=void 0;var dV=$i(),Mc,nb=class nb{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){ec(this,Mc,!1);g(this,"fieldDataByName");g(this,"resolvedDescendantNames");g(this,"resolvedFieldNames");g(this,"typeName");zy(this,Mc,n),this.fieldDataByName=t,this.resolvedDescendantNames=new Set(r),this.resolvedFieldNames=new Set(i),this.typeName=a}addData({resolvedDescendantNames:t,resolvedFieldNames:n}){for(let r of n)this.addResolvedFieldName(r);for(let r of t)this.resolvedDescendantNames.add(r)}addResolvedFieldName(t){if(!this.fieldDataByName.has(t))throw(0,dV.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}addExternalSubgraphName({fieldName:t,subgraphName:n}){let r=this.fieldDataByName.get(t);if(!r)throw(0,dV.unexpectedEdgeFatalError)(this.typeName,[t]);r.externalSubgraphNames.add(n)}copy(){return new nb({fieldDataByName:this.fieldDataByName,isResolved:Hy(this,Mc),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(Hy(this,Mc))return!0;if(this.fieldDataByName.size!==this.resolvedFieldNames.size)return!1;for(let t of this.fieldDataByName.keys())if(!this.resolvedFieldNames.has(t))return!1;return zy(this,Mc,!0),!0}};Mc=new WeakMap;var tb=nb;JE.NodeResolutionData=tb});var fV=w(zE=>{"use strict";m();T();N();Object.defineProperty(zE,"__esModule",{value:!0});zE.EntityWalker=void 0;var ofe=HE(),as=wr(),rb=class{constructor({encounteredEntityNodeNames:t,index:n,relativeOriginPaths:r,resDataByNodeName:i,resDataByRelativeOriginPath:a,resolvedPaths:o,subgraphNameByUnresolvablePath:u,visitedEntities:l}){g(this,"encounteredEntityNodeNames");g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByRelativeOriginPath");g(this,"resolvedPaths");g(this,"selectionPathByEntityNodeName",new Map);g(this,"subgraphNameByUnresolvablePath");g(this,"visitedEntities");g(this,"relativeOriginPaths");this.encounteredEntityNodeNames=t,this.index=n,this.relativeOriginPaths=r,this.resDataByNodeName=i,this.resDataByRelativeOriginPath=a,this.resolvedPaths=o,this.subgraphNameByUnresolvablePath=u,this.visitedEntities=l}getNodeResolutionData({node:{fieldDataByName:t,nodeName:n,typeName:r},selectionPath:i}){let a=(0,as.getValueOrDefault)(this.resDataByNodeName,n,()=>new ofe.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let u of this.relativeOriginPaths){let l=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,`${u}${i}`,()=>a.copy());o!=null||(o=l)}return o}visitEntityDescendantEdge({edge:t,selectionPath:n}){if(t.isEdgeInaccessible())return{visited:!1,areDescendantsResolved:!1};if(t.isExternal)return{visited:!1,areDescendantsResolved:!1,isExternal:!0};if(t.node.isLeaf)return{visited:!0,areDescendantsResolved:!0};let r=`${n}.${t.edgeName}`;return this.getNodeResolutionData({node:t.node,selectionPath:r}).areDescendantsResolved()?{visited:!0,areDescendantsResolved:!0}:(0,as.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.visitedEntities.has(t.node.nodeName)||this.encounteredEntityNodeNames.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:(this.encounteredEntityNodeNames.add(t.node.nodeName),(0,as.getValueOrDefault)(this.selectionPathByEntityNodeName,t.node.nodeName,()=>r),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitEntityDescendantAbstractNode({node:t.node,selectionPath:r}):this.visitEntityDescendantConcreteNode({node:t.node,selectionPath:r}):(this.removeUnresolvablePaths({selectionPath:r,removeDescendantPaths:!0}),{visited:!0,areDescendantsResolved:!0,isRevisitedNode:!0})}visitEntityDescendantConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};let i;for(let[a,o]of t.headToTailEdges){let{areDescendantsResolved:u,isExternal:l,isRevisitedNode:d,visited:p}=this.visitEntityDescendantEdge({edge:o,selectionPath:n});i!=null||(i=d),this.propagateVisitedField({areDescendantsResolved:u,data:r,fieldName:a,isExternal:l,node:t,selectionPath:n,visited:p})}return r.isResolved()?this.removeUnresolvablePaths({removeDescendantPaths:i,selectionPath:n}):this.addUnresolvablePaths({selectionPath:n,subgraphName:t.subgraphName}),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}visitEntityDescendantAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEntityDescendantEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,isExternal:i,node:a,selectionPath:o,visited:u}){if(i){n.addExternalSubgraphName({fieldName:r,subgraphName:a.subgraphName});return}if(!u)return;let l=(0,as.getValueOrDefault)(this.resDataByNodeName,a.nodeName,()=>n.copy());if(n.addResolvedFieldName(r),l.addResolvedFieldName(r),t&&n.resolvedDescendantNames.add(r),this.relativeOriginPaths){for(let p of this.relativeOriginPaths){let E=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,`${p}${o}`,()=>n.copy());E.addResolvedFieldName(r),t&&(E.resolvedDescendantNames.add(r),this.removeUnresolvablePaths({selectionPath:`.${r}`,removeDescendantPaths:!0}))}return}let d=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,o,()=>n.copy());d.addResolvedFieldName(r),t&&d.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){if(this.resolvedPaths.has(t))return;(0,as.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;this.resolvedPaths.has(i)||(0,as.getValueOrDefault)(this.subgraphNameByUnresolvablePath,i,()=>n)}}removeUnresolvablePaths({selectionPath:t,removeDescendantPaths:n}){if(!this.relativeOriginPaths){if(this.subgraphNameByUnresolvablePath.delete(t),n)for(let r of this.subgraphNameByUnresolvablePath.keys())r.startsWith(t)&&(this.subgraphNameByUnresolvablePath.delete(r),this.resolvedPaths.add(r));return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;if(this.subgraphNameByUnresolvablePath.delete(i),this.resolvedPaths.add(i),n)for(let a of this.subgraphNameByUnresolvablePath.keys())a.startsWith(i)&&(this.subgraphNameByUnresolvablePath.delete(a),this.resolvedPaths.add(a))}}};zE.EntityWalker=rb});var pV=w(XE=>{"use strict";m();T();N();Object.defineProperty(XE,"__esModule",{value:!0});XE.RootFieldWalker=void 0;var ss=wr(),WE=HE(),ib=class{constructor({index:t,nodeResolutionDataByNodeName:n}){g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByPath",new Map);g(this,"entityNodeNamesByPath",new Map);g(this,"pathsByEntityNodeName",new Map);g(this,"unresolvablePaths",new Set);this.index=t,this.resDataByNodeName=n}visitEdge({edge:t,selectionPath:n}){return t.isEdgeInaccessible()?{visited:!1,areDescendantsResolved:!1}:t.isExternal?{visited:!1,areDescendantsResolved:!1,isExternal:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ss.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,ss.getValueOrDefault)(this.pathsByEntityNodeName,t.node.nodeName,()=>new Set).add(`${n}.${t.edgeName}`),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):{visited:!0,areDescendantsResolved:!0}}visitAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.resDataByNodeName.get(t.nodeName);if(r)return{visited:!0,areDescendantsResolved:r.areDescendantsResolved()};let i=this.getNodeResolutionData({node:t,selectionPath:n});if(i.isResolved()&&i.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[a,o]of t.headToTailEdges){let{areDescendantsResolved:u,isExternal:l,visited:d}=this.visitEdge({edge:o,selectionPath:n});this.propagateVisitedField({areDescendantsResolved:u,data:i,fieldName:a,isExternal:l,node:t,selectionPath:n,visited:d})}return i.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:i.areDescendantsResolved()}}visitSharedEdge({edge:t,selectionPath:n}){return t.isEdgeInaccessible()?{visited:!1,areDescendantsResolved:!1}:t.isExternal?{visited:!1,areDescendantsResolved:!1,isExternal:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ss.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,ss.getValueOrDefault)(this.entityNodeNamesByPath,`${n}.${t.edgeName}`,()=>new Set).add(t.node.nodeName),t.node.isAbstract?this.visitSharedAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitSharedConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`})):{visited:!0,areDescendantsResolved:!0}}visitSharedAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitSharedEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitSharedConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getSharedNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[i,a]of t.headToTailEdges){let{visited:o,areDescendantsResolved:u}=this.visitSharedEdge({edge:a,selectionPath:n});this.propagateSharedVisitedField({areDescendantsResolved:u,data:r,fieldName:i,node:t,visited:o})}return r.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}getNodeResolutionData({node:t,selectionPath:n}){let r=(0,ss.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ss.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,ss.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ss.getValueOrDefault)(this.resDataByPath,n,()=>r.copy())}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,isExternal:i,node:a,selectionPath:o,visited:u}){if(i){n.addExternalSubgraphName({fieldName:r,subgraphName:a.subgraphName});return}if(!u)return;n.addResolvedFieldName(r);let l=(0,ss.getValueOrDefault)(this.resDataByPath,o,()=>new WE.NodeResolutionData({fieldDataByName:a.fieldDataByName,typeName:a.typeName}));l.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),l.resolvedDescendantNames.add(r))}propagateSharedVisitedField({areDescendantsResolved:t,data:n,fieldName:r,node:i,visited:a}){if(!a)return;n.addResolvedFieldName(r);let o=(0,ss.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:i.fieldDataByName,typeName:i.typeName}));o.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),o.resolvedDescendantNames.add(r))}visitRootFieldEdges({edges:t,rootTypeName:n}){let r=t.length>1;for(let i of t){if(i.isInaccessible)return{visited:!1,areDescendantsResolved:!1};let a=r?this.visitSharedEdge({edge:i,selectionPath:n}):this.visitEdge({edge:i,selectionPath:n});if(a.areDescendantsResolved)return a}return{visited:!0,areDescendantsResolved:!1}}};XE.RootFieldWalker=ib});var sb=w(eh=>{"use strict";m();T();N();Object.defineProperty(eh,"__esModule",{value:!0});eh.Graph=void 0;var Td=HD(),xc=eb(),ia=wr(),ZE=zD(),ufe=fV(),cfe=pV(),ab=class{constructor(){g(this,"edgeId",-1);g(this,"entityDataNodeByTypeName",new Map);g(this,"nodeByNodeName",new Map);g(this,"nodesByTypeName",new Map);g(this,"resolvedRootFieldNodeNames",new Set);g(this,"rootNodeByTypeName",new Map);g(this,"subgraphName",ZE.NOT_APPLICABLE);g(this,"resDataByNodeName",new Map);g(this,"resDataByRelativePathByEntity",new Map);g(this,"visitedEntitiesByOriginEntity",new Map);g(this,"walkerIndex",-1)}getRootNode(t){return(0,ia.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new Td.RootNode(t))}addOrUpdateNode(t,n){let r=`${this.subgraphName}.${t}`,i=this.nodeByNodeName.get(r);if(i)return i.isAbstract||(i.isAbstract=!!(n!=null&&n.isAbstract)),!i.isLeaf&&(n!=null&&n.isLeaf)&&(i.isLeaf=!0),i;let a=new Td.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,ia.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let u=new Td.Edge(this.getNextEdgeId(),n,r);return(0,ia.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(u),u}let a=t,o=new Td.Edge(this.getNextEdgeId(),n,i?n.typeName:r,i);return a.headToTailEdges.set(r,o),o}addEntityDataNode(t){let n=this.entityDataNodeByTypeName.get(t);if(n)return n;let r=new Td.EntityDataNode(t);return this.entityDataNodeByTypeName.set(t,r),r}getNextEdgeId(){return this.edgeId+=1}getNextWalkerIndex(){return this.walkerIndex+=1}setNodeInaccessible(t){let n=this.nodesByTypeName.get(t);if(n)for(let r of n)r.isInaccessible=!0}initializeNode(t,n){let r=this.entityDataNodeByTypeName.get(t);if(ZE.ROOT_TYPE_NAMES.has(t)){let a=this.getRootNode(t);a.removeInaccessibleEdges(n),a.fieldDataByName=n;return}let i=this.nodesByTypeName.get(t);if(i){for(let a of i)if(a.fieldDataByName=n,a.handleInaccessibleEdges(),a.isLeaf=!1,!!r){a.hasEntitySiblings=!0;for(let o of a.satisfiedFieldSets){if(a.externalFieldSets.has(o))continue;let u=r.targetSubgraphNamesByFieldSet.get(o);for(let l of u!=null?u:[]){if(l===a.subgraphName)continue;let d=this.nodeByNodeName.get(`${l}.${a.typeName}`);d&&a.entityEdges.push(new Td.Edge(this.getNextEdgeId(),d,""))}}}}}setSubgraphName(t){this.subgraphName=t}visitEntity({encounteredEntityNodeNames:t,entityNodeName:n,relativeOriginPaths:r,resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u}){let l=this.nodeByNodeName.get(n);if(!l)throw new Error(`Fatal: Could not find entity node for "${n}".`);u.add(n);let d=this.nodesByTypeName.get(l.typeName);if(!(d!=null&&d.length))throw new Error(`Fatal: Could not find any nodes for "${n}".`);let p=new ufe.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u}),E=l.getAllAccessibleEntityNodeNames();for(let I of d){if(I.nodeName!==l.nodeName&&!E.has(I.nodeName))continue;let{areDescendantsResolved:v}=p.visitEntityDescendantConcreteNode({node:I,selectionPath:""});if(v)return}for(let[I,v]of p.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:I,relativeOriginPaths:(0,xc.getMultipliedRelativeOriginPaths)({relativeOriginPaths:r,selectionPath:v}),resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u})}validate(){for(let t of this.rootNodeByTypeName.values())for(let[n,r]of t.headToSharedTailEdges){let i=r.length>1;if(!i){let p=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(p))continue;this.resolvedRootFieldNodeNames.add(p)}let a=new cfe.RootFieldWalker({index:this.getNextWalkerIndex(),nodeResolutionDataByNodeName:this.resDataByNodeName});if(a.visitRootFieldEdges({edges:r,rootTypeName:t.typeName.toLowerCase()}).areDescendantsResolved)continue;let o=i?a.entityNodeNamesByPath.size>0:a.pathsByEntityNodeName.size>0;if(a.unresolvablePaths.size<1&&!o)continue;let u=(0,ia.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,xc.newRootFieldData)(t.typeName,n,u.subgraphNames);if(!o)return{errors:(0,xc.generateRootResolvabilityErrors)({unresolvablePaths:a.unresolvablePaths,resDataByPath:a.resDataByPath,rootFieldData:l}),success:!1};let d=this.validateEntities({isSharedRootField:i,rootFieldData:l,walker:a});if(!d.success)return d}return{success:!0}}consolidateUnresolvableRootWithEntityPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of i.unresolvablePaths){if(!a.startsWith(t))continue;let o=a.slice(t.length),u=(0,ia.getOrThrowError)(i.resDataByPath,a,"rootFieldWalker.unresolvablePaths"),l=n.get(o);if(l){if(u.addData(l),l.addData(u),!u.isResolved()){i.unresolvablePaths.delete(a);continue}i.unresolvablePaths.delete(a),r.delete(o)}}}consolidateUnresolvableEntityWithRootPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of r.keys()){let o=(0,ia.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),u=`${t}${a}`,l=i.resDataByPath.get(u);l&&(o.addData(l),l.addData(o)),o.isResolved()&&r.delete(a)}}validateSharedRootFieldEntities({rootFieldData:t,walker:n}){let r=new Set;for(let[i,a]of n.entityNodeNamesByPath){let o=new Map,u=new Map;for(let d of a)this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:d,resDataByRelativeOriginPath:u,resolvedPaths:r,subgraphNameByUnresolvablePath:o,visitedEntities:new Set});if(this.consolidateUnresolvableRootWithEntityPaths({pathFromRoot:i,resDataByRelativeOriginPath:u,subgraphNameByUnresolvablePath:o,walker:n}),o.size<1)continue;this.consolidateUnresolvableEntityWithRootPaths({pathFromRoot:i,resDataByRelativeOriginPath:u,subgraphNameByUnresolvablePath:o,walker:n});let l=new Array;if(o.size>0&&l.push(...this.getSharedEntityResolvabilityErrors({entityNodeNames:a,resDataByPath:u,pathFromRoot:i,rootFieldData:t,subgraphNameByUnresolvablePath:o})),n.unresolvablePaths.size>0&&l.push(...(0,xc.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(l.length<1))return{errors:l,success:!1}}return n.unresolvablePaths.size>0?{errors:(0,xc.generateRootResolvabilityErrors)({resDataByPath:n.resDataByPath,rootFieldData:t,unresolvablePaths:n.unresolvablePaths}),success:!1}:{success:!0}}validateRootFieldEntities({rootFieldData:t,walker:n}){var i;let r=new Set;for(let[a,o]of n.pathsByEntityNodeName){let u=new Map;if(this.resDataByNodeName.has(a))continue;let l=(0,ia.getValueOrDefault)(this.resDataByRelativePathByEntity,a,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:a,resDataByRelativeOriginPath:l,resolvedPaths:r,subgraphNameByUnresolvablePath:u,visitedEntities:(0,ia.getValueOrDefault)(this.visitedEntitiesByOriginEntity,a,()=>new Set)}),!(u.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:a,pathFromRoot:(i=(0,ia.getFirstEntry)(o))!=null?i:"",rootFieldData:t,subgraphNameByUnresolvablePath:u}),success:!1}}return{success:!0}}validateEntities(t){return t.isSharedRootField?this.validateSharedRootFieldEntities(t):this.validateRootFieldEntities(t)}getEntityResolvabilityErrors({entityNodeName:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=(0,ia.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(ZE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:u}=(0,ia.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,xc.generateEntityResolvabilityErrors)({entityAncestorData:{fieldSetsByTargetSubgraphName:u,subgraphName:"",typeName:o},pathFromRoot:n,resDataByPath:a,rootFieldData:r,subgraphNameByUnresolvablePath:i})}getSharedEntityResolvabilityErrors({entityNodeNames:t,pathFromRoot:n,rootFieldData:r,resDataByPath:i,subgraphNameByUnresolvablePath:a}){let o,u=new Array;for(let d of t){let p=d.split(ZE.LITERAL_PERIOD);o!=null||(o=p[1]),u.push(p[0])}let{fieldSetsByTargetSubgraphName:l}=(0,ia.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,xc.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:u,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};eh.Graph=ab});var ob=w(th=>{"use strict";m();T();N();Object.defineProperty(th,"__esModule",{value:!0});th.newFieldSetConditionData=lfe;th.newConfigurationData=dfe;function lfe({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function dfe(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var lb=w(qc=>{"use strict";m();T();N();Object.defineProperty(qc,"__esModule",{value:!0});qc.NormalizationFactory=void 0;qc.normalizeSubgraphFromString=Nfe;qc.normalizeSubgraph=TV;qc.batchNormalize=Tfe;var W=Ie(),bn=Fr(),oi=Ip(),Ur=Du(),Yn=yp(),se=$i(),vp=dd(),ffe=Vv(),_i=TE(),pfe=MD(),us=gp(),mV=$D(),os=Gf(),nn=$l(),lr=Su(),cb=sb(),nh=yE(),X=zn(),mfe=ql(),Ve=wr(),Op=ob(),NV=IE();function Nfe(e,t=!0){let{error:n,documentNode:r}=(0,bn.safeParse)(e,t);return n||!r?{errors:[(0,se.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Sp(new cb.Graph).normalize(r)}function TV(e,t,n){return new Sp(n||new cb.Graph,t).normalize(e)}var Dp,ub,rh,EV,Sp=class{constructor(t,n){ec(this,Dp);ec(this,rh);g(this,"argumentName","");g(this,"authorizationDataByParentTypeName",new Map);g(this,"concreteTypeNamesByAbstractTypeName",new Map);g(this,"conditionalFieldDataByCoords",new Map);g(this,"configurationDataByTypeName",new Map);g(this,"customDirectiveDefinitionByName",new Map);g(this,"definedDirectiveNames",new Set);g(this,"directiveDefinitionByName",new Map);g(this,"directiveDefinitionDataByName",(0,oi.initializeDirectiveDefinitionDatas)());g(this,"doesParentRequireFetchReasons",!1);g(this,"edfsDirectiveReferences",new Set);g(this,"errors",new Array);g(this,"entityDataByTypeName",new Map);g(this,"entityInterfaceDataByTypeName",new Map);g(this,"eventsConfigurations",new Map);g(this,"fieldSetDataByTypeName",new Map);g(this,"internalGraph");g(this,"invalidConfigureDescriptionNodeDatas",[]);g(this,"invalidORScopesCoords",new Set);g(this,"invalidRepeatedDirectiveNameByCoords",new Map);g(this,"isParentObjectExternal",!1);g(this,"isParentObjectShareable",!1);g(this,"isSubgraphEventDrivenGraph",!1);g(this,"isSubgraphVersionTwo",!1);g(this,"keyFieldSetDatasByTypeName",new Map);g(this,"lastParentNodeKind",W.Kind.NULL);g(this,"lastChildNodeKind",W.Kind.NULL);g(this,"parentTypeNamesWithAuthDirectives",new Set);g(this,"keyFieldSetsByEntityTypeNameByFieldCoords",new Map);g(this,"keyFieldNamesByParentTypeName",new Map);g(this,"fieldCoordsByNamedTypeName",new Map);g(this,"operationTypeNodeByTypeName",new Map);g(this,"originalParentTypeName","");g(this,"originalTypeNameByRenamedTypeName",new Map);g(this,"overridesByTargetSubgraphName",new Map);g(this,"parentDefinitionDataByTypeName",new Map);g(this,"schemaData");g(this,"referencedDirectiveNames",new Set);g(this,"referencedTypeNames",new Set);g(this,"renamedParentTypeName","");g(this,"subgraphName");g(this,"unvalidatedExternalFieldCoords",new Set);g(this,"usesEdfsNatsStreamConfiguration",!1);g(this,"warnings",[]);this.subgraphName=n||X.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByName:new Map,kind:W.Kind.SCHEMA_DEFINITION,name:X.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,lr.getTypeNodeNamedTypeName)(r.type);if(Ur.BASE_SCALARS.has(i)){r.namedTypeKind=W.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,nn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,se.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,Ve.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return X.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===W.Kind.NULL)return t.kind!==W.Kind.NON_NULL_TYPE;switch(t.kind){case W.Kind.LIST_TYPE:{if(n.kind!==W.Kind.LIST)return this.isArgumentValueValid((0,lr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case W.Kind.NAMED_TYPE:switch(t.name.value){case X.BOOLEAN_SCALAR:return n.kind===W.Kind.BOOLEAN;case X.FLOAT_SCALAR:return n.kind===W.Kind.FLOAT||n.kind===W.Kind.INT;case X.ID_SCALAR:return n.kind===W.Kind.STRING||n.kind===W.Kind.INT;case X.INT_SCALAR:return n.kind===W.Kind.INT;case X.FIELD_SET_SCALAR:case X.SCOPE_SCALAR:case X.STRING_SCALAR:return n.kind===W.Kind.STRING;case X.LINK_IMPORT:return!0;case X.LINK_PURPOSE:return n.kind!==W.Kind.ENUM?!1:n.value===X.SECURITY||n.value===X.EXECUTION;case X.SUBSCRIPTION_FIELD_CONDITION:case X.SUBSCRIPTION_FILTER_CONDITION:return n.kind===W.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===W.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===W.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==W.Kind.ENUM)return!1;let i=r.enumValueDataByName.get(n.value);return i?!i.directivesByName.has(X.INACCESSIBLE):!1}return r.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===W.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}handleFieldInheritableDirectives({directivesByName:t,fieldName:n,inheritedDirectiveNames:r,parentData:i}){this.doesParentRequireFetchReasons&&!t.has(X.REQUIRE_FETCH_REASONS)&&(t.set(X.REQUIRE_FETCH_REASONS,[(0,Ve.generateSimpleDirective)(X.REQUIRE_FETCH_REASONS)]),r.add(X.REQUIRE_FETCH_REASONS)),(this.doesParentRequireFetchReasons||t.has(X.REQUIRE_FETCH_REASONS))&&i.requireFetchReasonsFieldNames.add(n),(0,Yn.isObjectDefinitionData)(i)&&(this.isParentObjectExternal&&!t.has(X.EXTERNAL)&&(t.set(X.EXTERNAL,[(0,Ve.generateSimpleDirective)(X.EXTERNAL)]),r.add(X.EXTERNAL)),t.has(X.EXTERNAL)&&this.unvalidatedExternalFieldCoords.add(`${i.name}.${n}`),this.isParentObjectShareable&&!t.has(X.SHAREABLE)&&(t.set(X.SHAREABLE,[(0,Ve.generateSimpleDirective)(X.SHAREABLE)]),r.add(X.SHAREABLE)))}extractDirectives(t,n){if(!t.directives)return n;let r=(0,Yn.isCompositeOutputNodeKind)(t.kind),i=(0,Yn.isObjectNodeKind)(t.kind);for(let a of t.directives){let o=a.name.value;o===X.SHAREABLE?(0,Ve.getValueOrDefault)(n,o,()=>[a]):(0,Ve.getValueOrDefault)(n,o,()=>[]).push(a),r&&(this.doesParentRequireFetchReasons||(this.doesParentRequireFetchReasons=o===X.REQUIRE_FETCH_REASONS),i&&(this.isParentObjectExternal||(this.isParentObjectExternal=o===X.EXTERNAL),this.isParentObjectShareable||(this.isParentObjectShareable=o===X.SHAREABLE)))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let u=i.name.value,l=t.kind===W.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=u===X.AUTHENTICATED,p=(0,nn.isFieldData)(t),E=u===X.OVERRIDE,I=u===X.REQUIRES_SCOPES,v=u===X.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(u,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&p&&((0,nn.isTypeRequired)(t.type)?a.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,_i.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let A=new Set,U=new Set,j=new Set,Q=[];for(let pe of i.arguments){let le=pe.name.value;if(A.has(le)){U.add(le);continue}A.add(le);let Ae=n.argumentTypeNodeByName.get(le);if(!Ae){j.add(le);continue}if(!this.isArgumentValueValid(Ae.typeNode,pe.value)){a.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(pe.value),`@${u}`,le,(0,_i.printTypeNode)(Ae.typeNode)));continue}if(E&&p){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:pe.value.value});continue}if(v&&p){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||le!==X.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:pe.value.values,requiredScopes:Q})}U.size>0&&a.push((0,se.duplicateDirectiveArgumentDefinitionsErrorMessage)([...U])),j.size>0&&a.push((0,se.unexpectedDirectiveArgumentErrorMessage)(u,[...j]));let ee=(0,Ve.getEntriesNotInHashSet)(o,A);if(ee.length>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(u,o,ee)),a.length>0||!I)return a;let ne=(0,Ve.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,Yn.newAuthorizationData)(l));if(t.kind!==W.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ne.requiredScopes.push(...Q);else{let pe=(0,Ve.getValueOrDefault)(ne.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));pe.inheritedData.requiredScopes.push(...Q),pe.originalData.requiredScopes.push(...Q)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByName){let o=this.directiveDefinitionDataByName.get(i);if(!o){r.has(i)||(this.errors.push((0,se.undefinedDirectiveError)(i,n)),r.add(i));continue}let u=[],l=(0,bn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||u.push((0,se.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let p=(0,Ve.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(i)||(p.add(i),u.push((0,se.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let p=0;p0&&this.errors.push((0,se.invalidDirectiveError)(i,n,(0,Ve.numberToOrdinal)(p+1),E))}}switch(t.kind){case W.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.fieldDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}default:return}}getNodeExtensionType(t,n,r=!1){return t?os.ExtensionType.REAL:r||!n.has(X.EXTENDS)?os.ExtensionType.NONE:os.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case os.ExtensionType.EXTENDS:case os.ExtensionType.NONE:{if(n===os.ExtensionType.REAL)return;this.errors.push((0,se.duplicateTypeDefinitionError)((0,Ve.kindToNodeType)(t.kind),t.name));return}default:t.extensionType=n}}extractConfigureDescriptionData(t,n){var i,a;if(!n.arguments||n.arguments.length<1){t.description||this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,{propagate:!0,description:((i=t.description)==null?void 0:i.value)||""});return}let r={propagate:!0,description:((a=t.description)==null?void 0:a.value)||""};for(let o of n.arguments)switch(o.name.value){case X.PROPAGATE:{if(o.value.kind!=W.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case X.DESCRIPTION_OVERRIDE:{if(o.value.kind!=W.Kind.STRING)return;r.description=o.value.value;break}default:return}!t.description&&!r.description&&this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,r)}extractConfigureDescriptionsData(t){let n=t.directivesByName.get(X.CONFIGURE_DESCRIPTION);n&&n.length==1&&this.extractConfigureDescriptionData(t,n[0])}extractImplementedInterfaceTypeNames(t,n){if(!t.interfaces)return n;let r=t.name.value;for(let i of t.interfaces){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateImplementedInterfaceError)((0,Yn.kindToConvertedTypeString)(t.kind),r,a));continue}n.add(a)}return n}updateCompositeOutputDataByNode(t,n,r){this.setParentDataExtensionType(n,r),this.extractImplementedInterfaceTypeNames(t,n.implementedInterfaceTypeNames),n.description||(n.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(n),n.isEntity||(n.isEntity=n.directivesByName.has(X.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByName.has(X.INACCESSIBLE)),n.subgraphNames.add(this.subgraphName)}addConcreteTypeNamesForImplementedInterfaces(t,n){for(let r of t)(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(n),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(n),n,!0)}extractArguments(t,n){var o;if(!((o=n.arguments)!=null&&o.length))return t;let r=n.name.value,i=`${this.originalParentTypeName}.${r}`,a=new Set;for(let u of n.arguments){let l=u.name.value;if(t.has(l)){a.add(l);continue}this.addInputValueDataByNode({fieldName:r,inputValueDataByName:t,isArgument:!0,node:u,originalParentTypeName:this.originalParentTypeName,renamedParentTypeName:this.renamedParentTypeName})}return a.size>0&&this.errors.push((0,se.duplicateArgumentsError)(i,[...a])),t}addPersistedDirectiveDefinitionDataByNode(t,n,r){let i=n.name.value,a=`@${i}`,o=new Map;for(let u of n.arguments||[])this.addInputValueDataByNode({inputValueDataByName:o,isArgument:!0,node:u,originalParentTypeName:a});t.set(i,{argumentDataByName:o,executableLocations:r,name:i,repeatable:n.repeatable,subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)(n.description)})}extractDirectiveLocations(t,n){let r=new Set,i=new Set;for(let a of t.locations){let o=a.value;if(!i.has(o)){if(!X.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!vp.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,se.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,se.duplicateDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}r.add(o)}}return r}extractArgumentData(t,n){let r=new Map,i=new Set,a=new Set,o={argumentTypeNodeByName:r,optionalArgumentNames:i,requiredArgumentNames:a};if(!t)return o;let u=new Set;for(let l of t){let d=l.name.value;if(r.has(d)){u.add(d);continue}l.defaultValue&&i.add(d),(0,nn.isTypeRequired)(l.type)&&!l.defaultValue&&a.add(d),r.set(d,{name:d,typeNode:l.type,defaultValue:l.defaultValue})}return u.size>0&&n.push((0,se.duplicateDirectiveDefinitionArgumentErrorMessage)([...u])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,se.duplicateDirectiveDefinitionError)(n)),!1;this.definedDirectiveNames.add(n);let r=Ur.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.get(n);if(r)return this.directiveDefinitionByName.set(n,r),this.isSubgraphVersionTwo=!0,!1;if(Ur.DIRECTIVE_DEFINITION_BY_NAME.has(n))return!1;this.directiveDefinitionByName.set(n,t);let i=[],{argumentTypeNodeByName:a,optionalArgumentNames:o,requiredArgumentNames:u}=this.extractArgumentData(t.arguments,i);return this.directiveDefinitionDataByName.set(n,{argumentTypeNodeByName:a,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,i),name:n,node:t,optionalArgumentNames:o,requiredArgumentNames:u}),i.length>0&&this.errors.push((0,se.invalidDirectiveDefinitionError)(n,i)),!0}addFieldDataByNode(t,n,r,i,a=new Set){let o=n.name.value,u=this.renamedParentTypeName||this.originalParentTypeName,l=`${this.originalParentTypeName}.${o}`,{isExternal:d,isShareable:p}=(0,nn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),E=(0,lr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,nn.newExternalFieldData)(d)]]),federatedCoords:`${u}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(X.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,p]]),kind:W.Kind.FIELD_DEFINITION,name:o,namedTypeKind:Ur.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,lr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:u,subgraphNames:new Set([this.subgraphName]),type:(0,lr.getMutableTypeNode)(n.type,l,this.errors),directivesByName:i,description:(0,bn.formatDescription)(n.description)};return Ur.BASE_SCALARS.has(I.namedTypeName)||this.referencedTypeNames.add(I.namedTypeName),this.extractConfigureDescriptionsData(I),t.set(o,I),I}addInputValueDataByNode({fieldName:t,inputValueDataByName:n,isArgument:r,node:i,originalParentTypeName:a,renamedParentTypeName:o}){let u=o||a,l=i.name.value,d=r?`${a}${t?`.${t}`:""}(${l}: ...)`:`${a}.${l}`;i.defaultValue&&!(0,nn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,se.incompatibleInputValueDefaultValueTypeError)((r?X.ARGUMENT:X.INPUT_FIELD)+` "${l}"`,d,(0,_i.printTypeNode)(i.type),(0,W.print)(i.defaultValue)));let p=r?`${u}${t?`.${t}`:""}(${l}: ...)`:`${u}.${l}`,E=(0,lr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByName:this.extractDirectives(i,new Map),federatedCoords:p,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?W.Kind.ARGUMENT:W.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:Ur.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,lr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:u,requiredSubgraphNames:new Set((0,nn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,lr.getMutableTypeNode)(i.type,a,this.errors),defaultValue:i.defaultValue,description:(0,bn.formatDescription)(i.description)};this.extractConfigureDescriptionsData(I),n.set(l,I)}upsertInterfaceDataByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a),u=this.entityInterfaceDataByTypeName.get(r);if(u&&t.fields)for(let d of t.fields)u.interfaceFieldNames.add(d.name.value);if(i){if(i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,lr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(l),this.parentDefinitionDataByTypeName.set(r,l)}getRenamedRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(!n)return t;switch(n){case W.OperationTypeNode.MUTATION:return X.MUTATION;case W.OperationTypeNode.SUBSCRIPTION:return X.SUBSCRIPTION;default:return X.QUERY}}addInterfaceObjectFieldsByNode(t){let n=t.name.value,r=this.entityInterfaceDataByTypeName.get(n);if(!(!r||!r.isInterfaceObject||!t.fields))for(let i of t.fields)r.interfaceObjectFieldNames.add(i.name.value)}upsertObjectDataByNode(t,n=!1){var p;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(p=i==null?void 0:i.directivesByName)!=null?p:new Map),o=this.isTypeNameRootType(r),u=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==W.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,u),a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:u,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),isRootType:o,kind:W.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,lr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,renamedTypeName:this.getRenamedRootTypeName(r),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(d),this.parentDefinitionDataByTypeName.set(r,d)}upsertEnumDataByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i);return}let u={appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,enumValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,lr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}upsertInputObjectByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i)return i.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?(this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind))),{success:!1}):(this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i),{success:!0,data:i});let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,lr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};return this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u),{success:!0,data:u}}upsertScalarByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,lr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}extractUnionMembers(t,n){if(!t.types)return n;let r=t.name.value;for(let i of t.types){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateUnionMemberDefinitionError)(r,a));continue}(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),Ur.BASE_SCALARS.has(a)||this.referencedTypeNames.add(a),n.set(a,i)}return n}upsertUnionByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==W.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),this.extractUnionMembers(t,i.memberByMemberTypeName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,lr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}extractKeyFieldSets(t,n){var a;let r=t.name.value;if(!((a=t.directives)!=null&&a.length)){this.errors.push((0,se.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==X.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let u,l=!1;for(let v of o.arguments){if(v.name.value===X.RESOLVABLE){v.value.kind===W.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==X.FIELDS){u=void 0;break}if(v.value.kind!==W.Kind.STRING){u=void 0;break}u=v.value.value}if(u===void 0)continue;let{error:d,documentNode:p}=(0,bn.safeParse)("{"+u+"}");if(d||!p){this.errors.push((0,se.invalidDirectiveError)(X.KEY,r,(0,Ve.numberToOrdinal)(i),[(0,se.unparsableFieldSetErrorMessage)(u,d)]));continue}let E=(0,oi.getNormalizedFieldSet)(p),I=n.get(E);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(E,{documentNode:p,isUnresolvable:l,normalizedFieldSet:E,rawFieldSet:u})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,Ve.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,lr.getTypeNodeNamedTypeName)(a.node.type),u=`${i}.${r}`;if(Ur.BASE_SCALARS.has(o))return{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:u,responseType:o,subgraphName:this.subgraphName})};let l=this.parentDefinitionDataByTypeName.get(o);return l?l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION&&l.kind!==W.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:u,responseType:o,subgraphName:this.subgraphName})}:{fieldSetParentData:l}:{errorString:(0,se.unknownNamedTypeErrorMessage)(u,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:u}=(0,bn.safeParse)("{"+n+"}");if(o||!u)return{errorMessages:[(0,se.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],p=(0,oi.getConditionalFieldSetDirectiveName)(i),E=[],I=`${a}.${r}`,v=(0,oi.getInitialFieldCoordsPath)(i,I),A=[r],U=new Set,j=[],Q=-1,ee=!0,ne=r,pe=!1;return(0,W.visit)(u,{Argument:{enter(){return!1}},Field:{enter(le){var an,kr;let Ae=d[Q],Me=Ae.name;if(Ae.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.invalidSelectionOnUnionErrorMessage)(n,v,Me)),W.BREAK;let Ze=le.name.value,Z=`${Me}.${Ze}`;if(l.unvalidatedExternalFieldCoords.delete(Z),ee)return j.push((0,se.invalidSelectionSetErrorMessage)(n,v,Me,(0,Ve.kindToNodeType)(Ae.kind))),W.BREAK;if(v.push(Z),A.push(Ze),ne=Ze,Ze===X.TYPENAME){if(i)return j.push((0,se.typeNameAlreadyProvidedErrorMessage)(Z,l.subgraphName)),W.BREAK;U.size<1&&El(an=l,Dp,ub).call(an,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}let ve=Ae.fieldDataByName.get(Ze);if(!ve)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,Me,Ze)),W.BREAK;if(E[Q].has(Ze))return j.push((0,se.duplicateFieldInFieldSetErrorMessage)(n,Z)),W.BREAK;E[Q].add(Ze);let{isDefinedExternal:gt,isUnconditionallyProvided:rn}=(0,Ve.getOrThrowError)(ve.externalFieldDataBySubgraphName,l.subgraphName,`${Z}.externalFieldDataBySubgraphName`),un=gt&&!rn;rn||(pe=!0);let In=(0,lr.getTypeNodeNamedTypeName)(ve.node.type),xt=l.parentDefinitionDataByTypeName.get(In);if(Ur.BASE_SCALARS.has(In)||(xt==null?void 0:xt.kind)===W.Kind.SCALAR_TYPE_DEFINITION||(xt==null?void 0:xt.kind)===W.Kind.ENUM_TYPE_DEFINITION){if(U.size<1&&!gt){El(kr=l,Dp,ub).call(kr,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}if(U.size<1&&rn){l.isSubgraphVersionTwo?j.push((0,se.fieldAlreadyProvidedErrorMessage)(Z,l.subgraphName,p)):l.warnings.push((0,us.fieldAlreadyProvidedWarning)(Z,p,I,l.subgraphName));return}if(!un&&!i)return;let nr=(0,Ve.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData),En=(0,Op.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]});i?nr.providedBy.push(En):nr.requiredBy.push(En);return}if(!xt)return j.push((0,se.unknownTypeInFieldSetErrorMessage)(n,Z,In)),W.BREAK;if(gt&&(i&&(0,Ve.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData).providedBy.push((0,Op.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]})),U.add(Z)),xt.kind===W.Kind.OBJECT_TYPE_DEFINITION||xt.kind===W.Kind.INTERFACE_TYPE_DEFINITION||xt.kind===W.Kind.UNION_TYPE_DEFINITION){ee=!0,d.push(xt);return}},leave(){U.delete(v.pop()||""),A.pop()}},InlineFragment:{enter(le){let Ae=d[Q],Me=Ae.name,Ze=v.length<1?t.name:v[v.length-1];if(!le.typeCondition)return j.push((0,se.inlineFragmentWithoutTypeConditionErrorMessage)(n,Ze)),W.BREAK;let Z=le.typeCondition.name.value;if(Z===Me){d.push(Ae),ee=!0;return}if(!(0,bn.isKindAbstract)(Ae.kind))return j.push((0,se.invalidInlineFragmentTypeErrorMessage)(n,v,Z,Me)),W.BREAK;let ve=l.parentDefinitionDataByTypeName.get(Z);if(!ve)return j.push((0,se.unknownInlineFragmentTypeConditionErrorMessage)(n,v,Me,Z)),W.BREAK;switch(ee=!0,ve.kind){case W.Kind.INTERFACE_TYPE_DEFINITION:{if(!ve.implementedInterfaceTypeNames.has(Me))break;d.push(ve);return}case W.Kind.OBJECT_TYPE_DEFINITION:{let gt=l.concreteTypeNamesByAbstractTypeName.get(Me);if(!gt||!gt.has(Z))break;d.push(ve);return}case W.Kind.UNION_TYPE_DEFINITION:{d.push(ve);return}default:return j.push((0,se.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,Me,Z,(0,Ve.kindToNodeType)(ve.kind))),W.BREAK}return j.push((0,se.invalidInlineFragmentTypeConditionErrorMessage)(n,v,Z,(0,Ve.kindToNodeType)(Ae.kind),Me)),W.BREAK}},SelectionSet:{enter(){if(!ee){let le=d[Q];if(le.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ne)),W.BREAK;if(ne===X.TYPENAME)return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,X.STRING_SCALAR,(0,Ve.kindToNodeType)(W.Kind.SCALAR_TYPE_DEFINITION))),W.BREAK;let Ae=le.fieldDataByName.get(ne);if(!Ae)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,le.name,ne)),W.BREAK;let Me=(0,lr.getTypeNodeNamedTypeName)(Ae.node.type),Ze=l.parentDefinitionDataByTypeName.get(Me),Z=Ze?Ze.kind:W.Kind.SCALAR_TYPE_DEFINITION;return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,Me,(0,Ve.kindToNodeType)(Z))),W.BREAK}if(Q+=1,ee=!1,Q<0||Q>=d.length)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ne)),W.BREAK;E.push(new Set)},leave(){if(ee){let le=d[Q+1];j.push((0,se.invalidSelectionSetErrorMessage)(n,v,le.name,(0,Ve.kindToNodeType)(le.kind))),ee=!1}Q-=1,d.pop(),E.pop()}}}),j.length>0||!pe?{errorMessages:j}:{configuration:{fieldName:r,selectionSet:(0,oi.getNormalizedFieldSet)(u)},errorMessages:j}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,nn.getParentTypeName)(t);for(let[u,l]of n){let{fieldSetParentData:d,errorString:p}=this.getFieldSetParent(r,t,u,o),E=`${o}.${u}`;if(p){i.push(p);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,u,r,o);if(I.length>0){i.push(` On field "${E}": - -`+I.join(X.HYPHEN_JOIN));continue}v&&a.push(v)}if(i.length>0){this.errors.push((0,se.invalidProvidesOrRequiresDirectivesError)((0,oi.getConditionalFieldSetDirectiveName)(r),i));return}if(a.length>0)return a}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByName.has(X.INACCESSIBLE),r=new Map,i=new Map,a=!1;for(let o of t.implementedInterfaceTypeNames){let u=this.parentDefinitionDataByTypeName.get(o);if(Ur.BASE_SCALARS.has(o)&&this.referencedTypeNames.add(o),!u)continue;if(u.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){i.set(u.name,(0,Ve.kindToNodeType)(u.kind));continue}if(t.name===u.name){a=!0;continue}let l={invalidFieldImplementations:new Map,unimplementedFields:[]},d=!1;for(let[p,E]of u.fieldDataByName){this.unvalidatedExternalFieldCoords.delete(`${t.name}.${p}`);let I=!1,v=t.fieldDataByName.get(p);if(!v){d=!0,l.unimplementedFields.push(p);continue}let A={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,_i.printTypeNode)(E.node.type),unimplementedArguments:new Set};(0,nn.isTypeValidImplementation)(E.node.type,v.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,I=!0,A.implementedResponseType=(0,_i.printTypeNode)(v.node.type));let U=new Set;for(let[j,Q]of E.argumentDataByName){U.add(j);let ee=v.argumentDataByName.get(j);if(!ee){d=!0,I=!0,A.unimplementedArguments.add(j);continue}let ne=(0,_i.printTypeNode)(ee.type),pe=(0,_i.printTypeNode)(Q.type);pe!==ne&&(d=!0,I=!0,A.invalidImplementedArguments.push({actualType:ne,argumentName:j,expectedType:pe}))}for(let[j,Q]of v.argumentDataByName)U.has(j)||Q.type.kind===W.Kind.NON_NULL_TYPE&&(d=!0,I=!0,A.invalidAdditionalArguments.add(j));!n&&v.isInaccessible&&!E.isInaccessible&&(d=!0,I=!0,A.isInaccessible=!0),I&&l.invalidFieldImplementations.set(p,A)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,se.invalidImplementedTypeError)(t.name,i)),a&&this.errors.push((0,se.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,se.invalidInterfaceImplementationError)(t.name,(0,Ve.kindToNodeType)(t.kind),r))}handleAuthenticatedDirective(t,n){let r=(0,Ve.getValueOrDefault)(this.authorizationDataByParentTypeName,n,()=>(0,Yn.newAuthorizationData)(n));if(t.kind===W.Kind.FIELD_DEFINITION){let i=(0,Ve.getValueOrDefault)(r.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));i.inheritedData.requiresAuthentication=!0,i.originalData.requiresAuthentication=!0}else r.requiresAuthentication=!0,this.parentTypeNamesWithAuthDirectives.add(n)}handleOverrideDirective({data:t,directiveCoords:n,errorMessages:r,targetSubgraphName:i}){if(i===this.subgraphName){r.push((0,se.equivalentSourceAndTargetOverrideErrorMessage)(i,n));return}let a=(0,Ve.getValueOrDefault)(this.overridesByTargetSubgraphName,i,()=>new Map);(0,Ve.getValueOrDefault)(a,t.renamedParentTypeName,()=>new Set).add(t.name)}handleSemanticNonNullDirective({data:t,directiveNode:n,errorMessages:r}){var E;let i=new Set,a=t.node.type,o=0;for(;a;)switch(a.kind){case W.Kind.LIST_TYPE:{o+=1,a=a.type;break}case W.Kind.NON_NULL_TYPE:{i.add(o),a=a.type;break}default:{a=null;break}}let u=(E=n.arguments)==null?void 0:E.find(I=>I.name.value===X.LEVELS);if(!u||u.value.kind!==W.Kind.LIST){r.push(se.semanticNonNullArgumentErrorMessage);return}let l=u.value.values,d=(0,_i.printTypeNode)(t.type),p=new Set;for(let{value:I}of l){let v=parseInt(I,10);if(Number.isNaN(v)){r.push((0,se.semanticNonNullLevelsNaNIndexErrorMessage)(I));continue}if(v<0||v>o){r.push((0,se.semanticNonNullLevelsIndexOutOfBoundsErrorMessage)({maxIndex:o,typeString:d,value:I}));continue}if(!i.has(v)){p.add(v);continue}r.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:d,value:I}))}t.nullLevelsBySubgraphName.set(this.subgraphName,p)}extractRequiredScopes({directiveCoords:t,orScopes:n,requiredScopes:r}){if(n.length>Ur.MAX_OR_SCOPES){this.invalidORScopesCoords.add(t);return}for(let i of n){let a=new Set;for(let o of i.values)a.add(o.value);a.size<1||(0,Yn.addScopes)(r,a)}}getKafkaPublishConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.TOPIC:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(X.TOPIC));continue}(0,oi.validateArgumentTemplateReferences)(u.value.value,n,i),a.push(u.value.value);break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_KAFKA,topics:a,type:X.PUBLISH}}getKafkaSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.TOPICS:{if(u.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.TOPICS));continue}for(let l of u.value.values){if(l.kind!==W.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.TOPICS));break}(0,oi.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_KAFKA,topics:a,type:X.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r,i,a){let o=[],u=X.DEFAULT_EDFS_PROVIDER_ID;for(let l of n.arguments||[])switch(l.name.value){case X.SUBJECT:{if(l.value.kind!==W.Kind.STRING||l.value.value.length<1){a.push((0,se.invalidEventSubjectErrorMessage)(X.SUBJECT));continue}(0,oi.validateArgumentTemplateReferences)(l.value.value,r,a),o.push(l.value.value);break}case X.PROVIDER_ID:{if(l.value.kind!==W.Kind.STRING||l.value.value.length<1){a.push(se.invalidEventProviderIdErrorMessage);continue}u=l.value.value;break}}if(!(a.length>0))return{fieldName:i,providerId:u,providerType:X.PROVIDER_TYPE_NATS,subjects:o,type:t}}getNatsSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID,u=nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,l="",d="";for(let p of t.arguments||[])switch(p.name.value){case X.SUBJECTS:{if(p.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.SUBJECTS));continue}for(let E of p.value.values){if(E.kind!==W.Kind.STRING||E.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.SUBJECTS));break}(0,oi.validateArgumentTemplateReferences)(E.value,n,i),a.push(E.value)}break}case X.PROVIDER_ID:{if(p.value.kind!==W.Kind.STRING||p.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=p.value.value;break}case X.STREAM_CONFIGURATION:{if(this.usesEdfsNatsStreamConfiguration=!0,p.value.kind!==W.Kind.OBJECT||p.value.fields.length<1){i.push(se.invalidNatsStreamInputErrorMessage);continue}let E=!0,I=new Set,v=new Set(vp.STREAM_CONFIGURATION_FIELD_NAMES),A=new Set([X.CONSUMER_NAME,X.STREAM_NAME]),U=new Set,j=new Set;for(let Q of p.value.fields){let ee=Q.name.value;if(!vp.STREAM_CONFIGURATION_FIELD_NAMES.has(ee)){I.add(ee),E=!1;continue}if(v.has(ee))v.delete(ee);else{U.add(ee),E=!1;continue}switch(A.has(ee)&&A.delete(ee),ee){case X.CONSUMER_NAME:if(Q.value.kind!=W.Kind.STRING||Q.value.value.length<1){j.add(ee),E=!1;continue}l=Q.value.value;break;case X.STREAM_NAME:if(Q.value.kind!=W.Kind.STRING||Q.value.value.length<1){j.add(ee),E=!1;continue}d=Q.value.value;break;case X.CONSUMER_INACTIVE_THRESHOLD:if(Q.value.kind!=W.Kind.INT){i.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(Q.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",X.INT_SCALAR)),E=!1;continue}try{u=parseInt(Q.value.value,10)}catch(ne){i.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(Q.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",X.INT_SCALAR)),E=!1}break}}(!E||A.size>0)&&i.push((0,se.invalidNatsStreamInputFieldsErrorMessage)([...A],[...U],[...j],[...I]))}}if(!(i.length>0))return u<0?(u=nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,this.warnings.push((0,us.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,`The value has been set to ${nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}.`))):u>mfe.MAX_INT32&&(u=0,this.warnings.push((0,us.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,"The value has been set to 0. This means the consumer will remain indefinitely active until its manual deletion."))),k({fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_NATS,subjects:a,type:X.SUBSCRIBE},l&&d?{streamConfiguration:{consumerInactiveThreshold:u,consumerName:l,streamName:d}}:{})}getRedisPublishConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.CHANNEL:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(X.CHANNEL));continue}(0,oi.validateArgumentTemplateReferences)(u.value.value,n,i),a.push(u.value.value);break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_REDIS,channels:a,type:X.PUBLISH}}getRedisSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.CHANNELS:{if(u.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.CHANNELS));continue}for(let l of u.value.values){if(l.kind!==W.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.CHANNELS));break}(0,oi.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_REDIS,channels:a,type:X.SUBSCRIBE}}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===W.OperationTypeNode.SUBSCRIPTION;for(let a of t.directives)if(a.name.value===X.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,se.invalidSubscriptionFilterLocationError)(r));return}}extractEventDirectivesToConfiguration(t,n){if(!t.directives)return;let r=t.name.value,i=`${this.renamedParentTypeName||this.originalParentTypeName}.${r}`;for(let a of t.directives){let o=[],u;switch(a.name.value){case X.EDFS_KAFKA_PUBLISH:u=this.getKafkaPublishConfiguration(a,n,r,o);break;case X.EDFS_KAFKA_SUBSCRIBE:u=this.getKafkaSubscribeConfiguration(a,n,r,o);break;case X.EDFS_NATS_PUBLISH:{u=this.getNatsPublishAndRequestConfiguration(X.PUBLISH,a,n,r,o);break}case X.EDFS_NATS_REQUEST:{u=this.getNatsPublishAndRequestConfiguration(X.REQUEST,a,n,r,o);break}case X.EDFS_NATS_SUBSCRIBE:{u=this.getNatsSubscribeConfiguration(a,n,r,o);break}case X.EDFS_REDIS_PUBLISH:{u=this.getRedisPublishConfiguration(a,n,r,o);break}case X.EDFS_REDIS_SUBSCRIBE:{u=this.getRedisSubscribeConfiguration(a,n,r,o);break}default:continue}if(o.length>0){this.errors.push((0,se.invalidEventDirectiveError)(a.name.value,i,o));continue}u&&(0,Ve.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(u)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case W.OperationTypeNode.MUTATION:return new Set([X.EDFS_KAFKA_PUBLISH,X.EDFS_NATS_PUBLISH,X.EDFS_NATS_REQUEST,X.EDFS_REDIS_PUBLISH]);case W.OperationTypeNode.QUERY:return new Set([X.EDFS_NATS_REQUEST]);case W.OperationTypeNode.SUBSCRIPTION:return new Set([X.EDFS_KAFKA_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case X.MUTATION:return W.OperationTypeNode.MUTATION;case X.QUERY:return W.OperationTypeNode.QUERY;case X.SUBSCRIPTION:return W.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let a=this.getOperationTypeNodeForRootTypeName(t.name);if(!a){this.errors.push((0,se.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(a);for(let[u,l]of t.fieldDataByName){let d=`${l.originalParentTypeName}.${u}`,p=new Set;for(let j of vp.EVENT_DIRECTIVE_NAMES)l.directivesByName.has(j)&&p.add(j);let E=new Set;for(let j of p)o.has(j)||E.add(j);if((p.size<1||E.size>0)&&n.set(d,{definesDirectives:p.size>0,invalidDirectiveNames:[...E]}),a===W.OperationTypeNode.MUTATION){let j=(0,_i.printTypeNode)(l.type);j!==X.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,j);continue}let I=(0,_i.printTypeNode)(l.type),v=l.namedTypeName+"!",A=!1,U=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let j of U)if(A||(A=this.entityDataByTypeName.has(j)),A)break;(!A||I!==v)&&r.set(d,I)}}validateEventDrivenKeyDefinition(t,n){let r=this.keyFieldSetDatasByTypeName.get(t);if(r)for(let[i,{isUnresolvable:a}]of r)a||(0,Ve.getValueOrDefault)(n,t,()=>[]).push(i)}validateEventDrivenObjectFields(t,n,r,i){var a;for(let[o,u]of t){let l=`${u.originalParentTypeName}.${o}`;if(n.has(o)){(a=u.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&a.isDefinedExternal||r.set(l,o);continue}i.set(l,o)}}isEdfsPublishResultValid(){let t=this.parentDefinitionDataByTypeName.get(X.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==W.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size!=1)return!1;for(let[n,r]of t.fieldDataByName)if(r.argumentDataByName.size>0||n!==X.SUCCESS||(0,_i.printTypeNode)(r.type)!==X.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(!(0,nn.isInputObjectDefinitionData)(t)||t.inputValueDataByName.size!=3)return!1;for(let[n,r]of t.inputValueDataByName)switch(n){case X.CONSUMER_INACTIVE_THRESHOLD:{if((0,_i.printTypeNode)(r.type)!==X.NON_NULLABLE_INT||!r.defaultValue||r.defaultValue.kind!==W.Kind.INT||r.defaultValue.value!==`${nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}`)return!1;break}case X.CONSUMER_NAME:case X.STREAM_NAME:{if((0,_i.printTypeNode)(r.type)!==X.NON_NULLABLE_STRING)return!1;break}default:return!1}return!0}validateEventDrivenSubgraph(){let t=[],n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,u=new Map,l=new Set,d=new Set;for(let[p,E]of this.parentDefinitionDataByTypeName){if(p===X.EDFS_PUBLISH_RESULT||p===X.EDFS_NATS_STREAM_CONFIGURATION||E.kind!==W.Kind.OBJECT_TYPE_DEFINITION)continue;if(E.isRootType){this.validateEventDrivenRootType(E,n,r,i);continue}let I=this.keyFieldNamesByParentTypeName.get(p);if(!I){d.add(p);continue}this.validateEventDrivenKeyDefinition(p,a),this.validateEventDrivenObjectFields(E.fieldDataByName,I,o,u)}if(this.isEdfsPublishResultValid()||t.push(se.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(X.EDFS_NATS_SUBSCRIBE)){let p=this.parentDefinitionDataByTypeName.get(X.EDFS_NATS_STREAM_CONFIGURATION);p&&this.usesEdfsNatsStreamConfiguration&&!this.isNatsStreamConfigurationInputObjectValid(p)&&t.push(se.invalidNatsStreamConfigurationDefinitionErrorMessage),this.parentDefinitionDataByTypeName.delete(X.EDFS_NATS_STREAM_CONFIGURATION);let E=this.upsertInputObjectByNode(NV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION);if(E.success)for(let I of NV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION.fields)this.addInputValueDataByNode({fieldName:I.name.value,isArgument:!1,inputValueDataByName:E.data.inputValueDataByName,node:I,originalParentTypeName:X.EDFS_NATS_STREAM_CONFIGURATION});else return}n.size>0&&t.push((0,se.invalidRootTypeFieldEventsDirectivesErrorMessage)(n)),i.size>0&&t.push((0,se.invalidEventDrivenMutationResponseTypeErrorMessage)(i)),r.size>0&&t.push((0,se.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(r)),a.size>0&&t.push((0,se.invalidKeyFieldSetsEventDrivenErrorMessage)(a)),o.size>0&&t.push((0,se.nonExternalKeyFieldNamesEventDrivenErrorMessage)(o)),u.size>0&&t.push((0,se.nonKeyFieldNamesEventDrivenErrorMessage)(u)),l.size>0&&t.push((0,se.nonEntityObjectExtensionsEventDrivenErrorMessage)([...l])),d.size>0&&t.push((0,se.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...d])),t.length>0&&this.errors.push((0,se.invalidEventDrivenGraphError)(t))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,se.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,Ve.kindToNodeType)(i.kind)}"`)}n.length>0&&this.errors.push((0,se.invalidUnionMemberTypeError)(t.name,n))}addConcreteTypeNamesForUnion(t){if(!t.types||t.types.length<1)return;let n=t.name.value;for(let r of t.types){let i=r.name.value;(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,n,()=>new Set).add(i),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(n,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(i),i,!0)}}addValidKeyFieldSetConfigurations(){for(let[t,n]of this.keyFieldSetDatasByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Op.newConfigurationData)(!0,i)),o=(0,oi.validateKeyFieldSets)(this,r,n);o&&(a.keys=o)}}getValidFlattenedDirectiveArray(t,n,r=!1){let i=[];for(let[a,o]of t){if(r&&X.INHERITABLE_DIRECTIVE_NAMES.has(a))continue;let u=this.directiveDefinitionDataByName.get(a);if(!u)continue;if(!u.isRepeatable&&o.length>1){let p=(0,Ve.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(a)||(p.add(a),this.errors.push((0,se.invalidDirectiveError)(a,n,"1st",[(0,se.invalidRepeatedDirectiveErrorMessage)(a)])));continue}if(a!==X.KEY){i.push(...o);continue}let l=[],d=new Set;for(let p=0;p0)return $(k({},t.description?{description:t.description}:{}),{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:W.Kind.SCHEMA_DEFINITION,operationTypes:n});if(!(t.directivesByName.size<1))return{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:W.Kind.SCHEMA_EXTENSION}}getUnionNodeByData(t){return t.node.description=t.description,t.node.directives=this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),t.node.types=(0,Yn.mapToArrayOfValues)(t.memberByMemberTypeName),t.node}evaluateExternalKeyFields(){let t=[];for(let[n,r]of this.keyFieldSetDatasByTypeName){let i=this.parentDefinitionDataByTypeName.get(n);if(!i||i.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){t.push(n),this.errors.push((0,se.undefinedCompositeOutputTypeError)(n));continue}let a=this;for(let o of r.values()){let u=[i],l=new Map,d=-1,p=!0;if((0,W.visit)(o.documentNode,{Argument:{enter(){return W.BREAK}},Field:{enter(E){let I=u[d],v=I.name;if(p)return W.BREAK;let A=E.name.value,U=`${v}.${A}`;a.unvalidatedExternalFieldCoords.delete(U);let j=I.fieldDataByName.get(A);if(!j||j.argumentDataByName.size)return W.BREAK;j.isShareableBySubgraphName.set(a.subgraphName,!0);let Q=j.externalFieldDataBySubgraphName.get(a.subgraphName);a.edfsDirectiveReferences.size<1&&Q&&Q.isDefinedExternal&&!Q.isUnconditionallyProvided&&i.extensionType!==os.ExtensionType.NONE&&(Q.isUnconditionallyProvided=!0,(0,Ve.getValueOrDefault)(l,o.rawFieldSet,()=>new Set).add(U)),(0,Ve.getValueOrDefault)(a.keyFieldNamesByParentTypeName,v,()=>new Set).add(A);let ee=(0,lr.getTypeNodeNamedTypeName)(j.node.type);if(Ur.BASE_SCALARS.has(ee))return;let ne=a.parentDefinitionDataByTypeName.get(ee);if(!ne)return W.BREAK;if(ne.kind===W.Kind.OBJECT_TYPE_DEFINITION){p=!0,u.push(ne);return}if((0,bn.isKindAbstract)(ne.kind))return W.BREAK}},InlineFragment:{enter(){return W.BREAK}},SelectionSet:{enter(){if(!p||(d+=1,p=!1,d<0||d>=u.length))return W.BREAK},leave(){p&&(p=!1),d-=1,u.pop()}}}),!(l.size<1))for(let[E,I]of l)this.warnings.push((0,us.externalEntityExtensionKeyFieldWarning)(i.name,E,[...I],this.subgraphName))}}for(let n of t)this.keyFieldSetDatasByTypeName.delete(n)}addValidConditionalFieldSetConfigurations(){for(let[t,n]of this.fieldSetDataByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Op.newConfigurationData)(!1,i)),o=this.validateProvidesOrRequires(r,n.provides,!0);o&&(a.provides=o);let u=this.validateProvidesOrRequires(r,n.requires,!1);u&&(a.requires=u)}}addFieldNamesToConfigurationData(t,n){let r=new Set;for(let[i,a]of t){let o=a.externalFieldDataBySubgraphName.get(this.subgraphName);if(!o||o.isUnconditionallyProvided){n.fieldNames.add(i);continue}r.add(i),this.edfsDirectiveReferences.size>0&&n.fieldNames.add(i)}r.size>0&&(n.externalFieldNames=r)}validateOneOfDirective({data:t,requiredFieldNames:n}){var r,i;return t.directivesByName.has(X.ONE_OF)?n.size>0?(this.errors.push((0,se.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(n),typeName:t.name})),!1):(t.inputValueDataByName.size===1&&this.warnings.push((0,us.singleSubgraphInputFieldOneOfWarning)({fieldName:(i=(r=(0,Ve.getFirstEntry)(t.inputValueDataByName))==null?void 0:r.name)!=null?i:"unknown",subgraphName:this.subgraphName,typeName:t.name})),!0):!0}normalize(t){var o;(0,mV.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,mV.upsertParentsAndChildren)(this,t);let n=[];El(this,rh,EV).call(this,n),this.validateDirectives(this.schemaData,X.SCHEMA);let r=this.getSchemaNodeByData(this.schemaData);(r==null?void 0:r.kind)===W.Kind.SCHEMA_DEFINITION&&n.push(r);for(let[u,l]of this.parentDefinitionDataByTypeName)this.validateDirectives(l,u);this.invalidORScopesCoords.size>0&&this.errors.push((0,se.orScopesLimitError)(Ur.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let u of this.invalidConfigureDescriptionNodeDatas)u.description||this.errors.push((0,se.configureDescriptionNoDescriptionError)((0,Ve.kindToNodeType)(u.kind),u.name));this.evaluateExternalKeyFields();for(let[u,l]of this.parentDefinitionDataByTypeName)switch(l.kind){case W.Kind.ENUM_TYPE_DEFINITION:{if(l.enumValueDataByName.size<1){this.errors.push((0,se.noDefinedEnumValuesError)(u));break}n.push(this.getEnumNodeByData(l));break}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(l.inputValueDataByName.size<1){this.errors.push((0,se.noInputValueDefinitionsError)(u));break}let d=new Set;for(let p of l.inputValueDataByName.values()){if((0,nn.isTypeRequired)(p.type)&&d.add(p.name),p.namedTypeKind!==W.Kind.NULL)continue;let E=this.parentDefinitionDataByTypeName.get(p.namedTypeName);if(E){if(!(0,nn.isInputNodeKind)(E.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:p,namedTypeData:E,nodeType:`${(0,Ve.kindToNodeType)(l.kind)} field`}));continue}p.namedTypeKind=E.kind}}if(!this.validateOneOfDirective({data:l,requiredFieldNames:d}))break;u!==X.EDFS_NATS_STREAM_CONFIGURATION&&n.push(this.getInputObjectNodeByData(l));break}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{let d=this.entityDataByTypeName.has(u),p=this.operationTypeNodeByTypeName.get(u),E=l.kind===W.Kind.OBJECT_TYPE_DEFINITION;this.isSubgraphVersionTwo&&l.extensionType===os.ExtensionType.EXTENDS&&(l.extensionType=os.ExtensionType.NONE),p&&(l.fieldDataByName.delete(X.SERVICE_FIELD),l.fieldDataByName.delete(X.ENTITIES_FIELD));let I=[];for(let[Q,ee]of l.fieldDataByName){if(!E&&((o=ee.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&o.isDefinedExternal)&&I.push(Q),this.validateArguments(ee,l.kind),ee.namedTypeKind!==W.Kind.NULL)continue;let ne=this.parentDefinitionDataByTypeName.get(ee.namedTypeName);if(ne){if(!(0,nn.isOutputNodeKind)(ne.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:ee,namedTypeData:ne,nodeType:`${(0,Ve.kindToNodeType)(l.kind)} field`}));continue}ee.namedTypeKind=this.entityInterfaceDataByTypeName.get(ne.name)?W.Kind.INTERFACE_TYPE_DEFINITION:ne.kind}}I.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,se.externalInterfaceFieldsError)(u,I)):this.warnings.push((0,us.externalInterfaceFieldsWarning)(this.subgraphName,u,[...I])));let v=(0,nn.getParentTypeName)(l),A=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,v,()=>(0,Op.newConfigurationData)(d,u)),U=this.entityInterfaceDataByTypeName.get(u);if(U){U.fieldDatas=(0,Yn.fieldDatasToSimpleFieldDatas)(l.fieldDataByName.values());let Q=this.concreteTypeNamesByAbstractTypeName.get(u);Q&&(0,Ve.addIterableToSet)({source:Q,target:U.concreteTypeNames}),A.isInterfaceObject=U.isInterfaceObject,A.entityInterfaceConcreteTypeNames=U.concreteTypeNames}let j=this.eventsConfigurations.get(v);j&&(A.events=j),this.addFieldNamesToConfigurationData(l.fieldDataByName,A),this.validateInterfaceImplementations(l),n.push(this.getCompositeOutputNodeByData(l)),l.fieldDataByName.size<1&&!(0,oi.isNodeQuery)(u,p)&&this.errors.push((0,se.noFieldDefinitionsError)((0,Ve.kindToNodeType)(l.kind),u)),l.requireFetchReasonsFieldNames.size>0&&(A.requireFetchReasonsFieldNames=[...l.requireFetchReasonsFieldNames]);break}case W.Kind.SCALAR_TYPE_DEFINITION:{if(l.extensionType===os.ExtensionType.REAL){this.errors.push((0,se.noBaseScalarDefinitionError)(u));break}n.push(this.getScalarNodeByData(l));break}case W.Kind.UNION_TYPE_DEFINITION:{n.push(this.getUnionNodeByData(l)),this.validateUnionMembers(l);break}default:throw(0,se.unexpectedKindFatalError)(u)}this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.addValidConditionalFieldSetConfigurations(),this.addValidKeyFieldSetConfigurations();for(let u of Object.values(W.OperationTypeNode)){let l=this.schemaData.operationTypes.get(u),d=(0,Ve.getOrThrowError)(bn.operationTypeNodeToDefaultType,u,X.OPERATION_TO_DEFAULT),p=l?(0,lr.getTypeNodeNamedTypeName)(l.type):d;if(Ur.BASE_SCALARS.has(p)&&this.referencedTypeNames.add(p),p!==d&&this.parentDefinitionDataByTypeName.has(d)){this.errors.push((0,se.invalidRootTypeDefinitionError)(u,p,d));continue}let E=this.parentDefinitionDataByTypeName.get(p);if(l){if(!E)continue;this.operationTypeNodeByTypeName.set(p,u)}if(!E)continue;let I=this.configurationDataByTypeName.get(d);I&&(I.isRootNode=!0,I.typeName=d),E.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&this.errors.push((0,se.operationDefinitionError)(p,u,E.kind))}for(let u of this.referencedTypeNames){let l=this.parentDefinitionDataByTypeName.get(u);if(!l){this.errors.push((0,se.undefinedTypeError)(u));continue}if(l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION)continue;let d=this.concreteTypeNamesByAbstractTypeName.get(u);(!d||d.size<1)&&this.warnings.push((0,us.unimplementedInterfaceOutputTypeWarning)(this.subgraphName,u))}let i=new Map;for(let u of this.directiveDefinitionByName.values()){let l=(0,bn.extractExecutableDirectiveLocations)(u.locations,new Set);l.size<1||this.addPersistedDirectiveDefinitionDataByNode(i,u,l)}this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph();for(let u of this.unvalidatedExternalFieldCoords)this.isSubgraphVersionTwo?this.errors.push((0,se.invalidExternalDirectiveError)(u)):this.warnings.push((0,us.invalidExternalFieldWarning)(u,this.subgraphName));if(this.errors.length>0)return{success:!1,errors:this.errors,warnings:this.warnings};let a={kind:W.Kind.DOCUMENT,definitions:n};return{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoords,configurationDataByTypeName:this.configurationDataByTypeName,directiveDefinitionByName:this.directiveDefinitionByName,entityDataByTypeName:this.entityDataByTypeName,entityInterfaces:this.entityInterfaceDataByTypeName,fieldCoordsByNamedTypeName:this.fieldCoordsByNamedTypeName,isEventDrivenGraph:this.isSubgraphEventDrivenGraph,isVersionTwo:this.isSubgraphVersionTwo,keyFieldNamesByParentTypeName:this.keyFieldNamesByParentTypeName,keyFieldSetsByEntityTypeNameByKeyFieldCoords:this.keyFieldSetsByEntityTypeNameByFieldCoords,operationTypes:this.operationTypeNodeByTypeName,originalTypeNameByRenamedTypeName:this.originalTypeNameByRenamedTypeName,overridesByTargetSubgraphName:this.overridesByTargetSubgraphName,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:i,schemaNode:r,subgraphAST:a,subgraphString:(0,W.print)(a),schema:(0,ffe.buildASTSchema)(a,{addInvalidExtensionOrphans:!0,assumeValid:!0,assumeValidSDL:!0}),success:!0,warnings:this.warnings}}};Dp=new WeakSet,ub=function({currentFieldCoords:t,directiveCoords:n,directiveName:r,fieldSet:i}){if(this.isSubgraphVersionTwo){this.errors.push((0,se.nonExternalConditionalFieldError)({directiveCoords:n,directiveName:r,fieldSet:i,subgraphName:this.subgraphName,targetCoords:t}));return}this.warnings.push((0,us.nonExternalConditionalFieldWarning)(n,this.subgraphName,t,i,r))},rh=new WeakSet,EV=function(t){let n=new Set;for(let r of this.referencedDirectiveNames){let i=Ur.DIRECTIVE_DEFINITION_BY_NAME.get(r);i&&(this.directiveDefinitionByName.set(r,i),(0,Ve.addOptionalIterableToSet)({source:vp.DEPENDENCIES_BY_DIRECTIVE_NAME.get(r),target:n}),t.push(i))}for(let r of this.customDirectiveDefinitionByName.values())t.push(r);t.push(...n)};qc.NormalizationFactory=Sp;function Tfe(e){let t=new Map,n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,u=new Set,l=new Map,d=new Set,p=new Set,E=[],I=new Set,v=new Map,A=[],U=[];for(let ee of e)ee.name&&(0,pfe.recordSubgraphName)(ee.name,d,p);let j=new cb.Graph;for(let ee=0;ee0&&A.push(...le.warnings),!le.success){U.push((0,se.subgraphValidationError)(pe,le.errors));continue}if(!le){U.push((0,se.subgraphValidationError)(pe,[se.subgraphValidationFailureError]));continue}l.set(pe,le.parentDefinitionDataByTypeName);for(let Ae of le.authorizationDataByParentTypeName.values())(0,Yn.upsertAuthorizationData)(t,Ae,I);for(let[Ae,Me]of le.fieldCoordsByNamedTypeName)(0,Ve.addIterableToSet)({source:Me,target:(0,Ve.getValueOrDefault)(v,Ae,()=>new Set)});for(let[Ae,Me]of le.concreteTypeNamesByAbstractTypeName){let Ze=n.get(Ae);if(!Ze){n.set(Ae,new Set(Me));continue}(0,Ve.addIterableToSet)({source:Me,target:Ze})}for(let[Ae,Me]of le.entityDataByTypeName){let Ze=Me.keyFieldSetDatasBySubgraphName.get(pe);Ze&&(0,Yn.upsertEntityData)({entityDataByTypeName:r,keyFieldSetDataByFieldSet:Ze,typeName:Ae,subgraphName:pe})}if(ne.name&&i.set(pe,{conditionalFieldDataByCoordinates:le.conditionalFieldDataByCoordinates,configurationDataByTypeName:le.configurationDataByTypeName,definitions:le.subgraphAST,directiveDefinitionByName:le.directiveDefinitionByName,entityInterfaces:le.entityInterfaces,isVersionTwo:le.isVersionTwo,keyFieldNamesByParentTypeName:le.keyFieldNamesByParentTypeName,name:pe,operationTypes:le.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:le.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:le.persistedDirectiveDefinitionDataByDirectiveName,schema:le.schema,schemaNode:le.schemaNode,url:ne.url}),!(le.overridesByTargetSubgraphName.size<1))for(let[Ae,Me]of le.overridesByTargetSubgraphName){let Ze=d.has(Ae);for(let[Z,ve]of Me){let gt=le.originalTypeNameByRenamedTypeName.get(Z)||Z;if(!Ze)A.push((0,us.invalidOverrideTargetSubgraphNameWarning)(Ae,gt,[...ve],ne.name));else{let rn=(0,Ve.getValueOrDefault)(a,Ae,()=>new Map),un=(0,Ve.getValueOrDefault)(rn,Z,()=>new Set(ve));(0,Ve.addIterableToSet)({source:ve,target:un})}for(let rn of ve){let un=`${gt}.${rn}`,In=o.get(un);if(!In){o.set(un,[pe]);continue}In.push(pe),u.add(un)}}}}let Q=[];if(I.size>0&&Q.push((0,se.orScopesLimitError)(Ur.MAX_OR_SCOPES,[...I])),(E.length>0||p.size>0)&&Q.push((0,se.invalidSubgraphNamesError)([...p],E)),u.size>0){let ee=[];for(let ne of u){let pe=(0,Ve.getOrThrowError)(o,ne,"overrideSourceSubgraphNamesByFieldPath");ee.push((0,se.duplicateOverriddenFieldErrorMessage)(ne,pe))}Q.push((0,se.duplicateOverriddenFieldsError)(ee))}if(Q.push(...U),Q.length>0)return{errors:Q,success:!1,warnings:A};for(let[ee,ne]of a){let pe=(0,Ve.getOrThrowError)(i,ee,"internalSubgraphBySubgraphName");pe.overriddenFieldNamesByParentTypeName=ne;for(let[le,Ae]of ne){let Me=pe.configurationDataByTypeName.get(le);Me&&((0,Yn.subtractSet)(Ae,Me.fieldNames),Me.fieldNames.size<1&&pe.configurationDataByTypeName.delete(le))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,fieldCoordsByNamedTypeName:v,internalSubgraphBySubgraphName:i,internalGraph:j,success:!0,warnings:A}}});var ih=w(Kc=>{"use strict";m();T();N();Object.defineProperty(Kc,"__esModule",{value:!0});Kc.DivergentType=void 0;Kc.getLeastRestrictiveMergedTypeNode=hfe;Kc.getMostRestrictiveMergedTypeNode=yfe;Kc.renameNamedTypeName=Ife;var Vc=Ie(),yV=$i(),Efe=Su(),hV=Fr(),IV=ql(),jc;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(jc||(Kc.DivergentType=jc={}));function gV(e,t,n,r,i){t=(0,Efe.getMutableTypeNode)(t,n,i);let a={kind:e.kind},o=jc.NONE,u=a;for(let l=0;l{"use strict";m();T();N();Object.defineProperty(fb,"__esModule",{value:!0});fb.renameRootTypes=vfe;var gfe=Ie(),db=Fr(),_fe=ih(),Bu=zn(),$c=wr();function vfe(e,t){let n,r=!1,i;(0,gfe.visit)(t.definitions,{FieldDefinition:{enter(a){let o=a.name.value;if(r&&(o===Bu.SERVICE_FIELD||o===Bu.ENTITIES_FIELD))return n.fieldDataByName.delete(o),!1;let u=n.name,l=(0,$c.getOrThrowError)(n.fieldDataByName,o,`${u}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let p=(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,d,Bu.OPERATION_TO_DEFAULT);l.namedTypeName!==p&&(0,_fe.renameNamedTypeName)(l,p,e.errors)}return i!=null&&i.has(o)&&l.isShareableBySubgraphName.delete(t.name),!1}},InterfaceTypeDefinition:{enter(a){let o=a.name.value;if(!e.entityInterfaceFederationDataByTypeName.get(o))return!1;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(a){let o=a.name.value,u=t.operationTypes.get(o),l=u?(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,u,Bu.OPERATION_TO_DEFAULT):o;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA),r=n.isRootType,!e.entityInterfaceFederationDataByTypeName.get(o)&&(e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(l),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o)))},leave(){n=void 0,r=!1,i=void 0}},ObjectTypeExtension:{enter(a){let o=a.name.value,u=t.operationTypes.get(o),l=u?(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,u,Bu.OPERATION_TO_DEFAULT):o;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA),r=n.isRootType,e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(o),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o))},leave(){n=void 0,r=!1,i=void 0}}})}});var _V=w((Ed,bp)=>{"use strict";m();T();N();(function(){var e,t="4.17.21",n=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",a="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",u=500,l="__lodash_placeholder__",d=1,p=2,E=4,I=1,v=2,A=1,U=2,j=4,Q=8,ee=16,ne=32,pe=64,le=128,Ae=256,Me=512,Ze=30,Z="...",ve=800,gt=16,rn=1,un=2,In=3,xt=1/0,an=9007199254740991,kr=17976931348623157e292,nr=NaN,En=4294967295,Ht=En-1,Ln=En>>>1,ae=[["ary",le],["bind",A],["bindKey",U],["curry",Q],["curryRight",ee],["flip",Me],["partial",ne],["partialRight",pe],["rearg",Ae]],De="[object Arguments]",ge="[object Array]",Le="[object AsyncFunction]",St="[object Boolean]",Y="[object Date]",ie="[object DOMException]",xe="[object Error]",He="[object Function]",Bt="[object GeneratorFunction]",it="[object Map]",Pt="[object Number]",ps="[object Null]",Yr="[object Object]",ms="[object Promise]",rl="[object Proxy]",Ua="[object RegExp]",Ir="[object Set]",ui="[object String]",qt="[object Symbol]",gr="[object Undefined]",ju="[object WeakMap]",ka="[object WeakSet]",Ku="[object ArrayBuffer]",P="[object DataView]",y="[object Float32Array]",_="[object Float64Array]",B="[object Int8Array]",K="[object Int16Array]",te="[object Int32Array]",ue="[object Uint8Array]",Tt="[object Uint8ClampedArray]",hn="[object Uint16Array]",cn="[object Uint32Array]",vn=/\b__p \+= '';/g,sn=/\b(__p \+=) '' \+/g,aK=/(__e\(.*?\)|\b__t\)) \+\n'';/g,N0=/&(?:amp|lt|gt|quot|#39);/g,T0=/[&<>"']/g,sK=RegExp(N0.source),oK=RegExp(T0.source),uK=/<%-([\s\S]+?)%>/g,cK=/<%([\s\S]+?)%>/g,E0=/<%=([\s\S]+?)%>/g,lK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dK=/^\w*$/,fK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ch=/[\\^$.*+?()[\]{}|]/g,pK=RegExp(Ch.source),Bh=/^\s+/,mK=/\s/,NK=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,TK=/\{\n\/\* \[wrapped with (.+)\] \*/,EK=/,? & /,hK=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yK=/[()=,{}\[\]\/\s]/,IK=/\\(\\)?/g,gK=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h0=/\w*$/,_K=/^[-+]0x[0-9a-f]+$/i,vK=/^0b[01]+$/i,OK=/^\[object .+?Constructor\]$/,SK=/^0o[0-7]+$/i,DK=/^(?:0|[1-9]\d*)$/,bK=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tm=/($^)/,AK=/['\n\r\u2028\u2029\\]/g,nm="\\ud800-\\udfff",RK="\\u0300-\\u036f",PK="\\ufe20-\\ufe2f",FK="\\u20d0-\\u20ff",y0=RK+PK+FK,I0="\\u2700-\\u27bf",g0="a-z\\xdf-\\xf6\\xf8-\\xff",wK="\\xac\\xb1\\xd7\\xf7",LK="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",CK="\\u2000-\\u206f",BK=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_0="A-Z\\xc0-\\xd6\\xd8-\\xde",v0="\\ufe0e\\ufe0f",O0=wK+LK+CK+BK,Uh="['\u2019]",UK="["+nm+"]",S0="["+O0+"]",rm="["+y0+"]",D0="\\d+",kK="["+I0+"]",b0="["+g0+"]",A0="[^"+nm+O0+D0+I0+g0+_0+"]",kh="\\ud83c[\\udffb-\\udfff]",MK="(?:"+rm+"|"+kh+")",R0="[^"+nm+"]",Mh="(?:\\ud83c[\\udde6-\\uddff]){2}",xh="[\\ud800-\\udbff][\\udc00-\\udfff]",il="["+_0+"]",P0="\\u200d",F0="(?:"+b0+"|"+A0+")",xK="(?:"+il+"|"+A0+")",w0="(?:"+Uh+"(?:d|ll|m|re|s|t|ve))?",L0="(?:"+Uh+"(?:D|LL|M|RE|S|T|VE))?",C0=MK+"?",B0="["+v0+"]?",qK="(?:"+P0+"(?:"+[R0,Mh,xh].join("|")+")"+B0+C0+")*",VK="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jK="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",U0=B0+C0+qK,KK="(?:"+[kK,Mh,xh].join("|")+")"+U0,$K="(?:"+[R0+rm+"?",rm,Mh,xh,UK].join("|")+")",GK=RegExp(Uh,"g"),QK=RegExp(rm,"g"),qh=RegExp(kh+"(?="+kh+")|"+$K+U0,"g"),YK=RegExp([il+"?"+b0+"+"+w0+"(?="+[S0,il,"$"].join("|")+")",xK+"+"+L0+"(?="+[S0,il+F0,"$"].join("|")+")",il+"?"+F0+"+"+w0,il+"+"+L0,jK,VK,D0,KK].join("|"),"g"),JK=RegExp("["+P0+nm+y0+v0+"]"),HK=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zK=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],WK=-1,gn={};gn[y]=gn[_]=gn[B]=gn[K]=gn[te]=gn[ue]=gn[Tt]=gn[hn]=gn[cn]=!0,gn[De]=gn[ge]=gn[Ku]=gn[St]=gn[P]=gn[Y]=gn[xe]=gn[He]=gn[it]=gn[Pt]=gn[Yr]=gn[Ua]=gn[Ir]=gn[ui]=gn[ju]=!1;var yn={};yn[De]=yn[ge]=yn[Ku]=yn[P]=yn[St]=yn[Y]=yn[y]=yn[_]=yn[B]=yn[K]=yn[te]=yn[it]=yn[Pt]=yn[Yr]=yn[Ua]=yn[Ir]=yn[ui]=yn[qt]=yn[ue]=yn[Tt]=yn[hn]=yn[cn]=!0,yn[xe]=yn[He]=yn[ju]=!1;var XK={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},ZK={"&":"&","<":"<",">":">",'"':""","'":"'"},e$={"&":"&","<":"<",">":">",""":'"',"'":"'"},t$={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},n$=parseFloat,r$=parseInt,k0=typeof global=="object"&&global&&global.Object===Object&&global,i$=typeof self=="object"&&self&&self.Object===Object&&self,fr=k0||i$||Function("return this")(),Vh=typeof Ed=="object"&&Ed&&!Ed.nodeType&&Ed,$u=Vh&&typeof bp=="object"&&bp&&!bp.nodeType&&bp,M0=$u&&$u.exports===Vh,jh=M0&&k0.process,Oi=function(){try{var G=$u&&$u.require&&$u.require("util").types;return G||jh&&jh.binding&&jh.binding("util")}catch(oe){}}(),x0=Oi&&Oi.isArrayBuffer,q0=Oi&&Oi.isDate,V0=Oi&&Oi.isMap,j0=Oi&&Oi.isRegExp,K0=Oi&&Oi.isSet,$0=Oi&&Oi.isTypedArray;function ci(G,oe,re){switch(re.length){case 0:return G.call(oe);case 1:return G.call(oe,re[0]);case 2:return G.call(oe,re[0],re[1]);case 3:return G.call(oe,re[0],re[1],re[2])}return G.apply(oe,re)}function a$(G,oe,re,Ce){for(var dt=-1,Qt=G==null?0:G.length;++dt-1}function Kh(G,oe,re){for(var Ce=-1,dt=G==null?0:G.length;++Ce-1;);return re}function X0(G,oe){for(var re=G.length;re--&&al(oe,G[re],0)>-1;);return re}function m$(G,oe){for(var re=G.length,Ce=0;re--;)G[re]===oe&&++Ce;return Ce}var N$=Yh(XK),T$=Yh(ZK);function E$(G){return"\\"+t$[G]}function h$(G,oe){return G==null?e:G[oe]}function sl(G){return JK.test(G)}function y$(G){return HK.test(G)}function I$(G){for(var oe,re=[];!(oe=G.next()).done;)re.push(oe.value);return re}function Wh(G){var oe=-1,re=Array(G.size);return G.forEach(function(Ce,dt){re[++oe]=[dt,Ce]}),re}function Z0(G,oe){return function(re){return G(oe(re))}}function iu(G,oe){for(var re=-1,Ce=G.length,dt=0,Qt=[];++re-1}function oG(s,c){var f=this.__data__,h=gm(f,s);return h<0?(++this.size,f.push([s,c])):f[h][1]=c,this}Ns.prototype.clear=rG,Ns.prototype.delete=iG,Ns.prototype.get=aG,Ns.prototype.has=sG,Ns.prototype.set=oG;function Ts(s){var c=-1,f=s==null?0:s.length;for(this.clear();++c=c?s:c)),s}function Ai(s,c,f,h,O,L){var M,V=c&d,J=c&p,ce=c&E;if(f&&(M=O?f(s,h,O,L):f(s)),M!==e)return M;if(!An(s))return s;var de=ft(s);if(de){if(M=dQ(s),!V)return Jr(s,M)}else{var Te=Dr(s),be=Te==He||Te==Bt;if(du(s))return BA(s,V);if(Te==Yr||Te==De||be&&!O){if(M=J||be?{}:eR(s),!V)return J?eQ(s,vG(M,s)):ZG(s,dA(M,s))}else{if(!yn[Te])return O?s:{};M=fQ(s,Te,V)}}L||(L=new oa);var $e=L.get(s);if($e)return $e;L.set(s,M),RR(s)?s.forEach(function(tt){M.add(Ai(tt,c,f,tt,s,L))}):bR(s)&&s.forEach(function(tt,Dt){M.set(Dt,Ai(tt,c,f,Dt,s,L))});var et=ce?J?vy:_y:J?zr:pr,yt=de?e:et(s);return Si(yt||s,function(tt,Dt){yt&&(Dt=tt,tt=s[Dt]),Ud(M,Dt,Ai(tt,c,f,Dt,s,L))}),M}function OG(s){var c=pr(s);return function(f){return fA(f,s,c)}}function fA(s,c,f){var h=f.length;if(s==null)return!h;for(s=Nn(s);h--;){var O=f[h],L=c[O],M=s[O];if(M===e&&!(O in s)||!L(M))return!1}return!0}function pA(s,c,f){if(typeof s!="function")throw new Di(i);return Kd(function(){s.apply(e,f)},c)}function kd(s,c,f,h){var O=-1,L=im,M=!0,V=s.length,J=[],ce=c.length;if(!V)return J;f&&(c=On(c,li(f))),h?(L=Kh,M=!1):c.length>=n&&(L=Pd,M=!1,c=new Yu(c));e:for(;++OO?0:O+f),h=h===e||h>O?O:Et(h),h<0&&(h+=O),h=f>h?0:FR(h);f0&&f(V)?c>1?_r(V,c-1,f,h,O):ru(O,V):h||(O[O.length]=V)}return O}var iy=VA(),TA=VA(!0);function Ma(s,c){return s&&iy(s,c,pr)}function ay(s,c){return s&&TA(s,c,pr)}function vm(s,c){return nu(c,function(f){return gs(s[f])})}function Hu(s,c){c=cu(c,s);for(var f=0,h=c.length;s!=null&&fc}function bG(s,c){return s!=null&&on.call(s,c)}function AG(s,c){return s!=null&&c in Nn(s)}function RG(s,c,f){return s>=Sr(c,f)&&s=120&&de.length>=120)?new Yu(M&&de):e}de=s[0];var Te=-1,be=V[0];e:for(;++Te-1;)V!==s&&mm.call(V,J,1),mm.call(s,J,1);return s}function bA(s,c){for(var f=s?c.length:0,h=f-1;f--;){var O=c[f];if(f==h||O!==L){var L=O;Is(O)?mm.call(s,O,1):Ny(s,O)}}return s}function fy(s,c){return s+Em(oA()*(c-s+1))}function jG(s,c,f,h){for(var O=-1,L=ir(Tm((c-s)/(f||1)),0),M=re(L);L--;)M[h?L:++O]=s,s+=f;return M}function py(s,c){var f="";if(!s||c<1||c>an)return f;do c%2&&(f+=s),c=Em(c/2),c&&(s+=s);while(c);return f}function _t(s,c){return Py(rR(s,c,Wr),s+"")}function KG(s){return lA(Tl(s))}function $G(s,c){var f=Tl(s);return Cm(f,Ju(c,0,f.length))}function qd(s,c,f,h){if(!An(s))return s;c=cu(c,s);for(var O=-1,L=c.length,M=L-1,V=s;V!=null&&++OO?0:O+c),f=f>O?O:f,f<0&&(f+=O),O=c>f?0:f-c>>>0,c>>>=0;for(var L=re(O);++h>>1,M=s[L];M!==null&&!fi(M)&&(f?M<=c:M=n){var ce=c?null:iQ(s);if(ce)return sm(ce);M=!1,O=Pd,J=new Yu}else J=c?[]:V;e:for(;++h=h?s:Ri(s,c,f)}var CA=B$||function(s){return fr.clearTimeout(s)};function BA(s,c){if(c)return s.slice();var f=s.length,h=nA?nA(f):new s.constructor(f);return s.copy(h),h}function yy(s){var c=new s.constructor(s.byteLength);return new fm(c).set(new fm(s)),c}function HG(s,c){var f=c?yy(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.byteLength)}function zG(s){var c=new s.constructor(s.source,h0.exec(s));return c.lastIndex=s.lastIndex,c}function WG(s){return Bd?Nn(Bd.call(s)):{}}function UA(s,c){var f=c?yy(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.length)}function kA(s,c){if(s!==c){var f=s!==e,h=s===null,O=s===s,L=fi(s),M=c!==e,V=c===null,J=c===c,ce=fi(c);if(!V&&!ce&&!L&&s>c||L&&M&&J&&!V&&!ce||h&&M&&J||!f&&J||!O)return 1;if(!h&&!L&&!ce&&s=V)return J;var ce=f[h];return J*(ce=="desc"?-1:1)}}return s.index-c.index}function MA(s,c,f,h){for(var O=-1,L=s.length,M=f.length,V=-1,J=c.length,ce=ir(L-M,0),de=re(J+ce),Te=!h;++V1?f[O-1]:e,M=O>2?f[2]:e;for(L=s.length>3&&typeof L=="function"?(O--,L):e,M&&xr(f[0],f[1],M)&&(L=O<3?e:L,O=1),c=Nn(c);++h-1?O[L?c[M]:M]:e}}function $A(s){return ys(function(c){var f=c.length,h=f,O=bi.prototype.thru;for(s&&c.reverse();h--;){var L=c[h];if(typeof L!="function")throw new Di(i);if(O&&!M&&wm(L)=="wrapper")var M=new bi([],!0)}for(h=M?h:f;++h1&&Ft.reverse(),de&&JV))return!1;var ce=L.get(s),de=L.get(c);if(ce&&de)return ce==c&&de==s;var Te=-1,be=!0,$e=f&v?new Yu:e;for(L.set(s,c),L.set(c,s);++Te1?"& ":"")+c[h],c=c.join(f>2?", ":" "),s.replace(NK,`{ +`+r;return{outputEnd:r,outputStart:n,pathNodes:t}}function YE({outputEnd:e,outputStart:t,pathNodes:n},r){return t+si.LITERAL_SPACE.repeat(n.length+1)+ofe(r,n.length)+e}function lV(e,t){return t?e?`${t}${e}`:t:e}function ufe({resDataByPath:e,rootFieldData:t,unresolvablePaths:n}){let r=new Array;for(let a of n){let o=(0,XD.getOrThrowError)(e,a,"resDataByPath"),u=new Map;for(let[d,p]of o.fieldDataByName)o.resolvedFieldNames.has(d)||u.set(d,p);let l=QE(a);for(let[d,p]of u)r.push({externalSubgraphNames:p.externalSubgraphNames,fieldName:d,selectionSet:YE(l,p),subgraphNames:p.subgraphNames,typeName:o.typeName})}let i=new Array;for(let a of r)i.push((0,WD.unresolvablePathError)(a,ZD({rootFieldData:t,unresolvableFieldData:a})));return i}function cfe({entityAncestorData:e,resDataByPath:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=new Array;for(let[o,u]of i){let l=new Array,d=(0,XD.getOrThrowError)(t,o,"resDataByPath"),p=new Map;for(let[v,A]of d.fieldDataByName)d.resolvedFieldNames.has(v)||p.set(v,A);let E=lV(o,n),I=QE(E);for(let[v,A]of p)l.push({externalSubgraphNames:A.externalSubgraphNames,fieldName:v,selectionSet:YE(I,A),subgraphNames:A.subgraphNames,typeName:d.typeName});e.subgraphName=u;for(let v of l)a.push((0,WD.unresolvablePathError)(v,ZD({rootFieldData:r,unresolvableFieldData:v,entityAncestorData:e})))}return a}function lfe({entityAncestors:e,resDataByPath:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=new Array;for(let o of i.keys()){let u=new Array,l=(0,XD.getOrThrowError)(t,o,"resDataByPath"),d=new Map;for(let[I,v]of l.fieldDataByName)l.resolvedFieldNames.has(I)||d.set(I,v);let p=lV(o,n),E=QE(p);for(let[I,v]of d)u.push({externalSubgraphNames:v.externalSubgraphNames,fieldName:I,selectionSet:YE(E,v),subgraphNames:v.subgraphNames,typeName:l.typeName});for(let I of u)a.push((0,WD.unresolvablePathError)(I,cV({rootFieldData:r,unresolvableFieldData:I,entityAncestors:e})))}return a}function dfe({relativeOriginPaths:e,selectionPath:t}){if(!e)return new Set([t]);let n=new Set;for(let r of e)n.add(`${r}${t}`);return n}});var HE=F(JE=>{"use strict";m();T();N();Object.defineProperty(JE,"__esModule",{value:!0});JE.NodeResolutionData=void 0;var dV=$i(),Mc,nb=class nb{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){ec(this,Mc,!1);g(this,"fieldDataByName");g(this,"resolvedDescendantNames");g(this,"resolvedFieldNames");g(this,"typeName");zy(this,Mc,n),this.fieldDataByName=t,this.resolvedDescendantNames=new Set(r),this.resolvedFieldNames=new Set(i),this.typeName=a}addData({resolvedDescendantNames:t,resolvedFieldNames:n}){for(let r of n)this.addResolvedFieldName(r);for(let r of t)this.resolvedDescendantNames.add(r)}addResolvedFieldName(t){if(!this.fieldDataByName.has(t))throw(0,dV.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}addExternalSubgraphName({fieldName:t,subgraphName:n}){let r=this.fieldDataByName.get(t);if(!r)throw(0,dV.unexpectedEdgeFatalError)(this.typeName,[t]);r.externalSubgraphNames.add(n)}copy(){return new nb({fieldDataByName:this.fieldDataByName,isResolved:Hy(this,Mc),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(Hy(this,Mc))return!0;if(this.fieldDataByName.size!==this.resolvedFieldNames.size)return!1;for(let t of this.fieldDataByName.keys())if(!this.resolvedFieldNames.has(t))return!1;return zy(this,Mc,!0),!0}};Mc=new WeakMap;var tb=nb;JE.NodeResolutionData=tb});var fV=F(zE=>{"use strict";m();T();N();Object.defineProperty(zE,"__esModule",{value:!0});zE.EntityWalker=void 0;var ffe=HE(),as=wr(),rb=class{constructor({encounteredEntityNodeNames:t,index:n,relativeOriginPaths:r,resDataByNodeName:i,resDataByRelativeOriginPath:a,resolvedPaths:o,subgraphNameByUnresolvablePath:u,visitedEntities:l}){g(this,"encounteredEntityNodeNames");g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByRelativeOriginPath");g(this,"resolvedPaths");g(this,"selectionPathByEntityNodeName",new Map);g(this,"subgraphNameByUnresolvablePath");g(this,"visitedEntities");g(this,"relativeOriginPaths");this.encounteredEntityNodeNames=t,this.index=n,this.relativeOriginPaths=r,this.resDataByNodeName=i,this.resDataByRelativeOriginPath=a,this.resolvedPaths=o,this.subgraphNameByUnresolvablePath=u,this.visitedEntities=l}getNodeResolutionData({node:{fieldDataByName:t,nodeName:n,typeName:r},selectionPath:i}){let a=(0,as.getValueOrDefault)(this.resDataByNodeName,n,()=>new ffe.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let u of this.relativeOriginPaths){let l=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,`${u}${i}`,()=>a.copy());o!=null||(o=l)}return o}visitEntityDescendantEdge({edge:t,selectionPath:n}){if(t.isEdgeInaccessible())return{visited:!1,areDescendantsResolved:!1};if(t.isExternal)return{visited:!1,areDescendantsResolved:!1,isExternal:!0};if(t.node.isLeaf)return{visited:!0,areDescendantsResolved:!0};let r=`${n}.${t.edgeName}`;return this.getNodeResolutionData({node:t.node,selectionPath:r}).areDescendantsResolved()?{visited:!0,areDescendantsResolved:!0}:(0,as.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.visitedEntities.has(t.node.nodeName)||this.encounteredEntityNodeNames.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:(this.encounteredEntityNodeNames.add(t.node.nodeName),(0,as.getValueOrDefault)(this.selectionPathByEntityNodeName,t.node.nodeName,()=>r),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitEntityDescendantAbstractNode({node:t.node,selectionPath:r}):this.visitEntityDescendantConcreteNode({node:t.node,selectionPath:r}):(this.removeUnresolvablePaths({selectionPath:r,removeDescendantPaths:!0}),{visited:!0,areDescendantsResolved:!0,isRevisitedNode:!0})}visitEntityDescendantConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};let i;for(let[a,o]of t.headToTailEdges){let{areDescendantsResolved:u,isExternal:l,isRevisitedNode:d,visited:p}=this.visitEntityDescendantEdge({edge:o,selectionPath:n});i!=null||(i=d),this.propagateVisitedField({areDescendantsResolved:u,data:r,fieldName:a,isExternal:l,node:t,selectionPath:n,visited:p})}return r.isResolved()?this.removeUnresolvablePaths({removeDescendantPaths:i,selectionPath:n}):this.addUnresolvablePaths({selectionPath:n,subgraphName:t.subgraphName}),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}visitEntityDescendantAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEntityDescendantEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,isExternal:i,node:a,selectionPath:o,visited:u}){if(i){n.addExternalSubgraphName({fieldName:r,subgraphName:a.subgraphName});return}if(!u)return;let l=(0,as.getValueOrDefault)(this.resDataByNodeName,a.nodeName,()=>n.copy());if(n.addResolvedFieldName(r),l.addResolvedFieldName(r),t&&n.resolvedDescendantNames.add(r),this.relativeOriginPaths){for(let p of this.relativeOriginPaths){let E=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,`${p}${o}`,()=>n.copy());E.addResolvedFieldName(r),t&&(E.resolvedDescendantNames.add(r),this.removeUnresolvablePaths({selectionPath:`.${r}`,removeDescendantPaths:!0}))}return}let d=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,o,()=>n.copy());d.addResolvedFieldName(r),t&&d.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){if(this.resolvedPaths.has(t))return;(0,as.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;this.resolvedPaths.has(i)||(0,as.getValueOrDefault)(this.subgraphNameByUnresolvablePath,i,()=>n)}}removeUnresolvablePaths({selectionPath:t,removeDescendantPaths:n}){if(!this.relativeOriginPaths){if(this.subgraphNameByUnresolvablePath.delete(t),n)for(let r of this.subgraphNameByUnresolvablePath.keys())r.startsWith(t)&&(this.subgraphNameByUnresolvablePath.delete(r),this.resolvedPaths.add(r));return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;if(this.subgraphNameByUnresolvablePath.delete(i),this.resolvedPaths.add(i),n)for(let a of this.subgraphNameByUnresolvablePath.keys())a.startsWith(i)&&(this.subgraphNameByUnresolvablePath.delete(a),this.resolvedPaths.add(a))}}};zE.EntityWalker=rb});var pV=F(XE=>{"use strict";m();T();N();Object.defineProperty(XE,"__esModule",{value:!0});XE.RootFieldWalker=void 0;var ss=wr(),WE=HE(),ib=class{constructor({index:t,nodeResolutionDataByNodeName:n}){g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByPath",new Map);g(this,"entityNodeNamesByPath",new Map);g(this,"pathsByEntityNodeName",new Map);g(this,"unresolvablePaths",new Set);this.index=t,this.resDataByNodeName=n}visitEdge({edge:t,selectionPath:n}){return t.isEdgeInaccessible()?{visited:!1,areDescendantsResolved:!1}:t.isExternal?{visited:!1,areDescendantsResolved:!1,isExternal:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ss.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,ss.getValueOrDefault)(this.pathsByEntityNodeName,t.node.nodeName,()=>new Set).add(`${n}.${t.edgeName}`),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):{visited:!0,areDescendantsResolved:!0}}visitAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.resDataByNodeName.get(t.nodeName);if(r)return{visited:!0,areDescendantsResolved:r.areDescendantsResolved()};let i=this.getNodeResolutionData({node:t,selectionPath:n});if(i.isResolved()&&i.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[a,o]of t.headToTailEdges){let{areDescendantsResolved:u,isExternal:l,visited:d}=this.visitEdge({edge:o,selectionPath:n});this.propagateVisitedField({areDescendantsResolved:u,data:i,fieldName:a,isExternal:l,node:t,selectionPath:n,visited:d})}return i.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:i.areDescendantsResolved()}}visitSharedEdge({edge:t,selectionPath:n}){return t.isEdgeInaccessible()?{visited:!1,areDescendantsResolved:!1}:t.isExternal?{visited:!1,areDescendantsResolved:!1,isExternal:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ss.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,ss.getValueOrDefault)(this.entityNodeNamesByPath,`${n}.${t.edgeName}`,()=>new Set).add(t.node.nodeName),t.node.isAbstract?this.visitSharedAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitSharedConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`})):{visited:!0,areDescendantsResolved:!0}}visitSharedAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitSharedEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitSharedConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getSharedNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[i,a]of t.headToTailEdges){let{visited:o,areDescendantsResolved:u}=this.visitSharedEdge({edge:a,selectionPath:n});this.propagateSharedVisitedField({areDescendantsResolved:u,data:r,fieldName:i,node:t,visited:o})}return r.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}getNodeResolutionData({node:t,selectionPath:n}){let r=(0,ss.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ss.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,ss.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ss.getValueOrDefault)(this.resDataByPath,n,()=>r.copy())}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,isExternal:i,node:a,selectionPath:o,visited:u}){if(i){n.addExternalSubgraphName({fieldName:r,subgraphName:a.subgraphName});return}if(!u)return;n.addResolvedFieldName(r);let l=(0,ss.getValueOrDefault)(this.resDataByPath,o,()=>new WE.NodeResolutionData({fieldDataByName:a.fieldDataByName,typeName:a.typeName}));l.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),l.resolvedDescendantNames.add(r))}propagateSharedVisitedField({areDescendantsResolved:t,data:n,fieldName:r,node:i,visited:a}){if(!a)return;n.addResolvedFieldName(r);let o=(0,ss.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:i.fieldDataByName,typeName:i.typeName}));o.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),o.resolvedDescendantNames.add(r))}visitRootFieldEdges({edges:t,rootTypeName:n}){let r=t.length>1;for(let i of t){if(i.isInaccessible)return{visited:!1,areDescendantsResolved:!1};let a=r?this.visitSharedEdge({edge:i,selectionPath:n}):this.visitEdge({edge:i,selectionPath:n});if(a.areDescendantsResolved)return a}return{visited:!0,areDescendantsResolved:!1}}};XE.RootFieldWalker=ib});var sb=F(eh=>{"use strict";m();T();N();Object.defineProperty(eh,"__esModule",{value:!0});eh.Graph=void 0;var Td=HD(),xc=eb(),ia=wr(),ZE=zD(),pfe=fV(),mfe=pV(),ab=class{constructor(){g(this,"edgeId",-1);g(this,"entityDataNodeByTypeName",new Map);g(this,"nodeByNodeName",new Map);g(this,"nodesByTypeName",new Map);g(this,"resolvedRootFieldNodeNames",new Set);g(this,"rootNodeByTypeName",new Map);g(this,"subgraphName",ZE.NOT_APPLICABLE);g(this,"resDataByNodeName",new Map);g(this,"resDataByRelativePathByEntity",new Map);g(this,"visitedEntitiesByOriginEntity",new Map);g(this,"walkerIndex",-1)}getRootNode(t){return(0,ia.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new Td.RootNode(t))}addOrUpdateNode(t,n){let r=`${this.subgraphName}.${t}`,i=this.nodeByNodeName.get(r);if(i)return i.isAbstract||(i.isAbstract=!!(n!=null&&n.isAbstract)),!i.isLeaf&&(n!=null&&n.isLeaf)&&(i.isLeaf=!0),i;let a=new Td.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,ia.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let u=new Td.Edge(this.getNextEdgeId(),n,r);return(0,ia.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(u),u}let a=t,o=new Td.Edge(this.getNextEdgeId(),n,i?n.typeName:r,i);return a.headToTailEdges.set(r,o),o}addEntityDataNode(t){let n=this.entityDataNodeByTypeName.get(t);if(n)return n;let r=new Td.EntityDataNode(t);return this.entityDataNodeByTypeName.set(t,r),r}getNextEdgeId(){return this.edgeId+=1}getNextWalkerIndex(){return this.walkerIndex+=1}setNodeInaccessible(t){let n=this.nodesByTypeName.get(t);if(n)for(let r of n)r.isInaccessible=!0}initializeNode(t,n){let r=this.entityDataNodeByTypeName.get(t);if(ZE.ROOT_TYPE_NAMES.has(t)){let a=this.getRootNode(t);a.removeInaccessibleEdges(n),a.fieldDataByName=n;return}let i=this.nodesByTypeName.get(t);if(i){for(let a of i)if(a.fieldDataByName=n,a.handleInaccessibleEdges(),a.isLeaf=!1,!!r){a.hasEntitySiblings=!0;for(let o of a.satisfiedFieldSets){if(a.externalFieldSets.has(o))continue;let u=r.targetSubgraphNamesByFieldSet.get(o);for(let l of u!=null?u:[]){if(l===a.subgraphName)continue;let d=this.nodeByNodeName.get(`${l}.${a.typeName}`);d&&a.entityEdges.push(new Td.Edge(this.getNextEdgeId(),d,""))}}}}}setSubgraphName(t){this.subgraphName=t}visitEntity({encounteredEntityNodeNames:t,entityNodeName:n,relativeOriginPaths:r,resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u}){let l=this.nodeByNodeName.get(n);if(!l)throw new Error(`Fatal: Could not find entity node for "${n}".`);u.add(n);let d=this.nodesByTypeName.get(l.typeName);if(!(d!=null&&d.length))throw new Error(`Fatal: Could not find any nodes for "${n}".`);let p=new pfe.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u}),E=l.getAllAccessibleEntityNodeNames();for(let I of d){if(I.nodeName!==l.nodeName&&!E.has(I.nodeName))continue;let{areDescendantsResolved:v}=p.visitEntityDescendantConcreteNode({node:I,selectionPath:""});if(v)return}for(let[I,v]of p.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:I,relativeOriginPaths:(0,xc.getMultipliedRelativeOriginPaths)({relativeOriginPaths:r,selectionPath:v}),resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u})}validate(){for(let t of this.rootNodeByTypeName.values())for(let[n,r]of t.headToSharedTailEdges){let i=r.length>1;if(!i){let p=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(p))continue;this.resolvedRootFieldNodeNames.add(p)}let a=new mfe.RootFieldWalker({index:this.getNextWalkerIndex(),nodeResolutionDataByNodeName:this.resDataByNodeName});if(a.visitRootFieldEdges({edges:r,rootTypeName:t.typeName.toLowerCase()}).areDescendantsResolved)continue;let o=i?a.entityNodeNamesByPath.size>0:a.pathsByEntityNodeName.size>0;if(a.unresolvablePaths.size<1&&!o)continue;let u=(0,ia.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,xc.newRootFieldData)(t.typeName,n,u.subgraphNames);if(!o)return{errors:(0,xc.generateRootResolvabilityErrors)({unresolvablePaths:a.unresolvablePaths,resDataByPath:a.resDataByPath,rootFieldData:l}),success:!1};let d=this.validateEntities({isSharedRootField:i,rootFieldData:l,walker:a});if(!d.success)return d}return{success:!0}}consolidateUnresolvableRootWithEntityPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of i.unresolvablePaths){if(!a.startsWith(t))continue;let o=a.slice(t.length),u=(0,ia.getOrThrowError)(i.resDataByPath,a,"rootFieldWalker.unresolvablePaths"),l=n.get(o);if(l){if(u.addData(l),l.addData(u),!u.isResolved()){i.unresolvablePaths.delete(a);continue}i.unresolvablePaths.delete(a),r.delete(o)}}}consolidateUnresolvableEntityWithRootPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of r.keys()){let o=(0,ia.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),u=`${t}${a}`,l=i.resDataByPath.get(u);l&&(o.addData(l),l.addData(o)),o.isResolved()&&r.delete(a)}}validateSharedRootFieldEntities({rootFieldData:t,walker:n}){let r=new Set;for(let[i,a]of n.entityNodeNamesByPath){let o=new Map,u=new Map;for(let d of a)this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:d,resDataByRelativeOriginPath:u,resolvedPaths:r,subgraphNameByUnresolvablePath:o,visitedEntities:new Set});if(this.consolidateUnresolvableRootWithEntityPaths({pathFromRoot:i,resDataByRelativeOriginPath:u,subgraphNameByUnresolvablePath:o,walker:n}),o.size<1)continue;this.consolidateUnresolvableEntityWithRootPaths({pathFromRoot:i,resDataByRelativeOriginPath:u,subgraphNameByUnresolvablePath:o,walker:n});let l=new Array;if(o.size>0&&l.push(...this.getSharedEntityResolvabilityErrors({entityNodeNames:a,resDataByPath:u,pathFromRoot:i,rootFieldData:t,subgraphNameByUnresolvablePath:o})),n.unresolvablePaths.size>0&&l.push(...(0,xc.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(l.length<1))return{errors:l,success:!1}}return n.unresolvablePaths.size>0?{errors:(0,xc.generateRootResolvabilityErrors)({resDataByPath:n.resDataByPath,rootFieldData:t,unresolvablePaths:n.unresolvablePaths}),success:!1}:{success:!0}}validateRootFieldEntities({rootFieldData:t,walker:n}){var i;let r=new Set;for(let[a,o]of n.pathsByEntityNodeName){let u=new Map;if(this.resDataByNodeName.has(a))continue;let l=(0,ia.getValueOrDefault)(this.resDataByRelativePathByEntity,a,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:a,resDataByRelativeOriginPath:l,resolvedPaths:r,subgraphNameByUnresolvablePath:u,visitedEntities:(0,ia.getValueOrDefault)(this.visitedEntitiesByOriginEntity,a,()=>new Set)}),!(u.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:a,pathFromRoot:(i=(0,ia.getFirstEntry)(o))!=null?i:"",rootFieldData:t,subgraphNameByUnresolvablePath:u}),success:!1}}return{success:!0}}validateEntities(t){return t.isSharedRootField?this.validateSharedRootFieldEntities(t):this.validateRootFieldEntities(t)}getEntityResolvabilityErrors({entityNodeName:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=(0,ia.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(ZE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:u}=(0,ia.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,xc.generateEntityResolvabilityErrors)({entityAncestorData:{fieldSetsByTargetSubgraphName:u,subgraphName:"",typeName:o},pathFromRoot:n,resDataByPath:a,rootFieldData:r,subgraphNameByUnresolvablePath:i})}getSharedEntityResolvabilityErrors({entityNodeNames:t,pathFromRoot:n,rootFieldData:r,resDataByPath:i,subgraphNameByUnresolvablePath:a}){let o,u=new Array;for(let d of t){let p=d.split(ZE.LITERAL_PERIOD);o!=null||(o=p[1]),u.push(p[0])}let{fieldSetsByTargetSubgraphName:l}=(0,ia.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,xc.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:u,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};eh.Graph=ab});var ob=F(th=>{"use strict";m();T();N();Object.defineProperty(th,"__esModule",{value:!0});th.newFieldSetConditionData=Nfe;th.newConfigurationData=Tfe;function Nfe({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function Tfe(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var lb=F(qc=>{"use strict";m();T();N();Object.defineProperty(qc,"__esModule",{value:!0});qc.NormalizationFactory=void 0;qc.normalizeSubgraphFromString=Ife;qc.normalizeSubgraph=TV;qc.batchNormalize=gfe;var X=_e(),bn=Fr(),oi=Ip(),Ur=Du(),Yn=yp(),se=$i(),vp=dd(),Efe=Vv(),_i=TE(),hfe=MD(),us=gp(),mV=$D(),os=Gf(),nn=$l(),lr=Su(),cb=sb(),nh=yE(),Z=zn(),yfe=ql(),Ve=wr(),Op=ob(),NV=IE();function Ife({noLocation:e,options:t,sdlString:n}){let{error:r,documentNode:i}=(0,bn.safeParse)(n,e);return r||!i?{errors:[(0,se.subgraphInvalidSyntaxError)(r)],success:!1,warnings:[]}:new Sp({internalGraph:new cb.Graph,options:t}).normalize(i)}function TV({document:e,internalGraph:t,options:n,subgraphName:r}){return new Sp({internalGraph:t||new cb.Graph,options:n,subgraphName:r}).normalize(e)}var Dp,ub,rh,EV,Sp=class{constructor({internalGraph:t,options:n,subgraphName:r}){ec(this,Dp);ec(this,rh);g(this,"argumentName","");g(this,"authorizationDataByParentTypeName",new Map);g(this,"concreteTypeNamesByAbstractTypeName",new Map);g(this,"conditionalFieldDataByCoords",new Map);g(this,"configurationDataByTypeName",new Map);g(this,"customDirectiveDefinitionByName",new Map);g(this,"definedDirectiveNames",new Set);g(this,"directiveDefinitionByName",new Map);g(this,"directiveDefinitionDataByName",(0,oi.initializeDirectiveDefinitionDatas)());g(this,"doesParentRequireFetchReasons",!1);g(this,"edfsDirectiveReferences",new Set);g(this,"errors",new Array);g(this,"entityDataByTypeName",new Map);g(this,"entityInterfaceDataByTypeName",new Map);g(this,"eventsConfigurations",new Map);g(this,"fieldSetDataByTypeName",new Map);g(this,"internalGraph");g(this,"invalidConfigureDescriptionNodeDatas",[]);g(this,"invalidORScopesCoords",new Set);g(this,"invalidRepeatedDirectiveNameByCoords",new Map);g(this,"isParentObjectExternal",!1);g(this,"isParentObjectShareable",!1);g(this,"isSubgraphEventDrivenGraph",!1);g(this,"isSubgraphVersionTwo",!1);g(this,"keyFieldSetDatasByTypeName",new Map);g(this,"lastParentNodeKind",X.Kind.NULL);g(this,"lastChildNodeKind",X.Kind.NULL);g(this,"options");g(this,"parentTypeNamesWithAuthDirectives",new Set);g(this,"keyFieldSetsByEntityTypeNameByFieldCoords",new Map);g(this,"keyFieldNamesByParentTypeName",new Map);g(this,"fieldCoordsByNamedTypeName",new Map);g(this,"operationTypeNodeByTypeName",new Map);g(this,"originalParentTypeName","");g(this,"originalTypeNameByRenamedTypeName",new Map);g(this,"overridesByTargetSubgraphName",new Map);g(this,"parentDefinitionDataByTypeName",new Map);g(this,"schemaData");g(this,"referencedDirectiveNames",new Set);g(this,"referencedTypeNames",new Set);g(this,"renamedParentTypeName","");g(this,"subgraphName");g(this,"unvalidatedExternalFieldCoords",new Set);g(this,"usesEdfsNatsStreamConfiguration",!1);g(this,"warnings",[]);this.options=n!=null?n:{},this.subgraphName=r||Z.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByName:new Map,kind:X.Kind.SCHEMA_DEFINITION,name:Z.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,lr.getTypeNodeNamedTypeName)(r.type);if(Ur.BASE_SCALARS.has(i)){r.namedTypeKind=X.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,nn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,se.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,Ve.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return Z.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===X.Kind.NULL)return t.kind!==X.Kind.NON_NULL_TYPE;switch(t.kind){case X.Kind.LIST_TYPE:{if(n.kind!==X.Kind.LIST)return this.isArgumentValueValid((0,lr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case X.Kind.NAMED_TYPE:switch(t.name.value){case Z.BOOLEAN_SCALAR:return n.kind===X.Kind.BOOLEAN;case Z.FLOAT_SCALAR:return n.kind===X.Kind.FLOAT||n.kind===X.Kind.INT;case Z.ID_SCALAR:return n.kind===X.Kind.STRING||n.kind===X.Kind.INT;case Z.INT_SCALAR:return n.kind===X.Kind.INT;case Z.FIELD_SET_SCALAR:case Z.SCOPE_SCALAR:case Z.STRING_SCALAR:return n.kind===X.Kind.STRING;case Z.LINK_IMPORT:return!0;case Z.LINK_PURPOSE:return n.kind!==X.Kind.ENUM?!1:n.value===Z.SECURITY||n.value===Z.EXECUTION;case Z.SUBSCRIPTION_FIELD_CONDITION:case Z.SUBSCRIPTION_FILTER_CONDITION:return n.kind===X.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===X.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===X.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==X.Kind.ENUM)return!1;let i=r.enumValueDataByName.get(n.value);return i?!i.directivesByName.has(Z.INACCESSIBLE):!1}return r.kind!==X.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===X.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}handleFieldInheritableDirectives({directivesByName:t,fieldName:n,inheritedDirectiveNames:r,parentData:i}){this.doesParentRequireFetchReasons&&!t.has(Z.REQUIRE_FETCH_REASONS)&&(t.set(Z.REQUIRE_FETCH_REASONS,[(0,Ve.generateSimpleDirective)(Z.REQUIRE_FETCH_REASONS)]),r.add(Z.REQUIRE_FETCH_REASONS)),(this.doesParentRequireFetchReasons||t.has(Z.REQUIRE_FETCH_REASONS))&&i.requireFetchReasonsFieldNames.add(n),(0,Yn.isObjectDefinitionData)(i)&&(this.isParentObjectExternal&&!t.has(Z.EXTERNAL)&&(t.set(Z.EXTERNAL,[(0,Ve.generateSimpleDirective)(Z.EXTERNAL)]),r.add(Z.EXTERNAL)),t.has(Z.EXTERNAL)&&this.unvalidatedExternalFieldCoords.add(`${i.name}.${n}`),this.isParentObjectShareable&&!t.has(Z.SHAREABLE)&&(t.set(Z.SHAREABLE,[(0,Ve.generateSimpleDirective)(Z.SHAREABLE)]),r.add(Z.SHAREABLE)))}extractDirectives(t,n){if(!t.directives)return n;let r=(0,Yn.isCompositeOutputNodeKind)(t.kind),i=(0,Yn.isObjectNodeKind)(t.kind);for(let a of t.directives){let o=a.name.value;o===Z.SHAREABLE?(0,Ve.getValueOrDefault)(n,o,()=>[a]):(0,Ve.getValueOrDefault)(n,o,()=>[]).push(a),r&&(this.doesParentRequireFetchReasons||(this.doesParentRequireFetchReasons=o===Z.REQUIRE_FETCH_REASONS),i&&(this.isParentObjectExternal||(this.isParentObjectExternal=o===Z.EXTERNAL),this.isParentObjectShareable||(this.isParentObjectShareable=o===Z.SHAREABLE)))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let u=i.name.value,l=t.kind===X.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=u===Z.AUTHENTICATED,p=(0,nn.isFieldData)(t),E=u===Z.OVERRIDE,I=u===Z.REQUIRES_SCOPES,v=u===Z.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(u,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&p&&((0,nn.isTypeRequired)(t.type)?a.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,_i.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let A=new Set,U=new Set,j=new Set,J=[];for(let pe of i.arguments){let Ne=pe.name.value;if(A.has(Ne)){U.add(Ne);continue}A.add(Ne);let Ie=n.argumentTypeNodeByName.get(Ne);if(!Ie){j.add(Ne);continue}if(!this.isArgumentValueValid(Ie.typeNode,pe.value)){a.push((0,se.invalidArgumentValueErrorMessage)((0,X.print)(pe.value),`@${u}`,Ne,(0,_i.printTypeNode)(Ie.typeNode)));continue}if(E&&p){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:pe.value.value});continue}if(v&&p){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||Ne!==Z.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:pe.value.values,requiredScopes:J})}U.size>0&&a.push((0,se.duplicateDirectiveArgumentDefinitionsErrorMessage)([...U])),j.size>0&&a.push((0,se.unexpectedDirectiveArgumentErrorMessage)(u,[...j]));let re=(0,Ve.getEntriesNotInHashSet)(o,A);if(re.length>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(u,o,re)),a.length>0||!I)return a;let te=(0,Ve.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,Yn.newAuthorizationData)(l));if(t.kind!==X.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),te.requiredScopes.push(...J);else{let pe=(0,Ve.getValueOrDefault)(te.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));pe.inheritedData.requiredScopes.push(...J),pe.originalData.requiredScopes.push(...J)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByName){let o=this.directiveDefinitionDataByName.get(i);if(!o){r.has(i)||(this.errors.push((0,se.undefinedDirectiveError)(i,n)),r.add(i));continue}let u=[],l=(0,bn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||u.push((0,se.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let p=(0,Ve.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(i)||(p.add(i),u.push((0,se.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let p=0;p0&&this.errors.push((0,se.invalidDirectiveError)(i,n,(0,Ve.numberToOrdinal)(p+1),E))}}switch(t.kind){case X.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case X.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case X.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case X.Kind.INTERFACE_TYPE_DEFINITION:case X.Kind.OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.fieldDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}default:return}}getNodeExtensionType(t,n,r=!1){return t?os.ExtensionType.REAL:r||!n.has(Z.EXTENDS)?os.ExtensionType.NONE:os.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case os.ExtensionType.EXTENDS:case os.ExtensionType.NONE:{if(n===os.ExtensionType.REAL)return;this.errors.push((0,se.duplicateTypeDefinitionError)((0,Ve.kindToNodeType)(t.kind),t.name));return}default:t.extensionType=n}}extractConfigureDescriptionData(t,n){var i,a;if(!n.arguments||n.arguments.length<1){t.description||this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,{propagate:!0,description:((i=t.description)==null?void 0:i.value)||""});return}let r={propagate:!0,description:((a=t.description)==null?void 0:a.value)||""};for(let o of n.arguments)switch(o.name.value){case Z.PROPAGATE:{if(o.value.kind!=X.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case Z.DESCRIPTION_OVERRIDE:{if(o.value.kind!=X.Kind.STRING)return;r.description=o.value.value;break}default:return}!t.description&&!r.description&&this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,r)}extractConfigureDescriptionsData(t){let n=t.directivesByName.get(Z.CONFIGURE_DESCRIPTION);n&&n.length==1&&this.extractConfigureDescriptionData(t,n[0])}extractImplementedInterfaceTypeNames(t,n){if(!t.interfaces)return n;let r=t.name.value;for(let i of t.interfaces){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateImplementedInterfaceError)((0,Yn.kindToConvertedTypeString)(t.kind),r,a));continue}n.add(a)}return n}updateCompositeOutputDataByNode(t,n,r){this.setParentDataExtensionType(n,r),this.extractImplementedInterfaceTypeNames(t,n.implementedInterfaceTypeNames),n.description||(n.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(n),n.isEntity||(n.isEntity=n.directivesByName.has(Z.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByName.has(Z.INACCESSIBLE)),n.subgraphNames.add(this.subgraphName)}addConcreteTypeNamesForImplementedInterfaces(t,n){for(let r of t)(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(n),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(n),n,!0)}extractArguments(t,n){var o;if(!((o=n.arguments)!=null&&o.length))return t;let r=n.name.value,i=`${this.originalParentTypeName}.${r}`,a=new Set;for(let u of n.arguments){let l=u.name.value;if(t.has(l)){a.add(l);continue}this.addInputValueDataByNode({fieldName:r,inputValueDataByName:t,isArgument:!0,node:u,originalParentTypeName:this.originalParentTypeName,renamedParentTypeName:this.renamedParentTypeName})}return a.size>0&&this.errors.push((0,se.duplicateArgumentsError)(i,[...a])),t}addPersistedDirectiveDefinitionDataByNode(t,n,r){let i=n.name.value,a=`@${i}`,o=new Map;for(let u of n.arguments||[])this.addInputValueDataByNode({inputValueDataByName:o,isArgument:!0,node:u,originalParentTypeName:a});t.set(i,{argumentDataByName:o,executableLocations:r,name:i,repeatable:n.repeatable,subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)(n.description)})}extractDirectiveLocations(t,n){let r=new Set,i=new Set;for(let a of t.locations){let o=a.value;if(!i.has(o)){if(!Z.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!vp.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,se.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,se.duplicateDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}r.add(o)}}return r}extractArgumentData(t,n){let r=new Map,i=new Set,a=new Set,o={argumentTypeNodeByName:r,optionalArgumentNames:i,requiredArgumentNames:a};if(!t)return o;let u=new Set;for(let l of t){let d=l.name.value;if(r.has(d)){u.add(d);continue}l.defaultValue&&i.add(d),(0,nn.isTypeRequired)(l.type)&&!l.defaultValue&&a.add(d),r.set(d,{name:d,typeNode:l.type,defaultValue:l.defaultValue})}return u.size>0&&n.push((0,se.duplicateDirectiveDefinitionArgumentErrorMessage)([...u])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,se.duplicateDirectiveDefinitionError)(n)),!1;this.definedDirectiveNames.add(n);let r=Ur.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.get(n);if(r)return this.directiveDefinitionByName.set(n,r),this.isSubgraphVersionTwo=!0,!1;if(Ur.DIRECTIVE_DEFINITION_BY_NAME.has(n))return!1;this.directiveDefinitionByName.set(n,t);let i=[],{argumentTypeNodeByName:a,optionalArgumentNames:o,requiredArgumentNames:u}=this.extractArgumentData(t.arguments,i);return this.directiveDefinitionDataByName.set(n,{argumentTypeNodeByName:a,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,i),name:n,node:t,optionalArgumentNames:o,requiredArgumentNames:u}),i.length>0&&this.errors.push((0,se.invalidDirectiveDefinitionError)(n,i)),!0}addFieldDataByNode(t,n,r,i,a=new Set){let o=n.name.value,u=this.renamedParentTypeName||this.originalParentTypeName,l=`${this.originalParentTypeName}.${o}`,{isExternal:d,isShareable:p}=(0,nn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),E=(0,lr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,nn.newExternalFieldData)(d)]]),federatedCoords:`${u}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(Z.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,p]]),kind:X.Kind.FIELD_DEFINITION,name:o,namedTypeKind:Ur.BASE_SCALARS.has(E)?X.Kind.SCALAR_TYPE_DEFINITION:X.Kind.NULL,namedTypeName:E,node:(0,lr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:u,subgraphNames:new Set([this.subgraphName]),type:(0,lr.getMutableTypeNode)(n.type,l,this.errors),directivesByName:i,description:(0,bn.formatDescription)(n.description)};return Ur.BASE_SCALARS.has(I.namedTypeName)||this.referencedTypeNames.add(I.namedTypeName),this.extractConfigureDescriptionsData(I),t.set(o,I),I}addInputValueDataByNode({fieldName:t,inputValueDataByName:n,isArgument:r,node:i,originalParentTypeName:a,renamedParentTypeName:o}){let u=o||a,l=i.name.value,d=r?`${a}${t?`.${t}`:""}(${l}: ...)`:`${a}.${l}`;i.defaultValue&&!(0,nn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,se.incompatibleInputValueDefaultValueTypeError)((r?Z.ARGUMENT:Z.INPUT_FIELD)+` "${l}"`,d,(0,_i.printTypeNode)(i.type),(0,X.print)(i.defaultValue)));let p=r?`${u}${t?`.${t}`:""}(${l}: ...)`:`${u}.${l}`,E=(0,lr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByName:this.extractDirectives(i,new Map),federatedCoords:p,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?X.Kind.ARGUMENT:X.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:Ur.BASE_SCALARS.has(E)?X.Kind.SCALAR_TYPE_DEFINITION:X.Kind.NULL,namedTypeName:E,node:(0,lr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:u,requiredSubgraphNames:new Set((0,nn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,lr.getMutableTypeNode)(i.type,a,this.errors),defaultValue:i.defaultValue,description:(0,bn.formatDescription)(i.description)};this.extractConfigureDescriptionsData(I),n.set(l,I)}upsertInterfaceDataByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a),u=this.entityInterfaceDataByTypeName.get(r);if(u&&t.fields)for(let d of t.fields)u.interfaceFieldNames.add(d.name.value);if(i){if(i.kind!==X.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(Z.KEY),isInaccessible:a.has(Z.INACCESSIBLE),kind:X.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,lr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(l),this.parentDefinitionDataByTypeName.set(r,l)}getRenamedRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(!n)return t;switch(n){case X.OperationTypeNode.MUTATION:return Z.MUTATION;case X.OperationTypeNode.SUBSCRIPTION:return Z.SUBSCRIPTION;default:return Z.QUERY}}addInterfaceObjectFieldsByNode(t){let n=t.name.value,r=this.entityInterfaceDataByTypeName.get(n);if(!(!r||!r.isInterfaceObject||!t.fields))for(let i of t.fields)r.interfaceObjectFieldNames.add(i.name.value)}upsertObjectDataByNode(t,n=!1){var p;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(p=i==null?void 0:i.directivesByName)!=null?p:new Map),o=this.isTypeNameRootType(r),u=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==X.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,u),a.has(Z.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(Z.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:u,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(Z.KEY),isInaccessible:a.has(Z.INACCESSIBLE),isRootType:o,kind:X.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,lr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,renamedTypeName:this.getRenamedRootTypeName(r),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(d),this.parentDefinitionDataByTypeName.set(r,d)}upsertEnumDataByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==X.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(Z.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i);return}let u={appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,enumValueDataByName:new Map,isInaccessible:a.has(Z.INACCESSIBLE),kind:X.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,lr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}upsertInputObjectByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i)return i.kind!==X.Kind.INPUT_OBJECT_TYPE_DEFINITION?(this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind))),{success:!1}):(this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(Z.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i),{success:!0,data:i});let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(Z.INACCESSIBLE),kind:X.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,lr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};return this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u),{success:!0,data:u}}upsertScalarByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==X.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:X.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,lr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}extractUnionMembers(t,n){if(!t.types)return n;let r=t.name.value;for(let i of t.types){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateUnionMemberDefinitionError)(r,a));continue}(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),Ur.BASE_SCALARS.has(a)||this.referencedTypeNames.add(a),n.set(a,i)}return n}upsertUnionByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==X.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),this.extractUnionMembers(t,i.memberByMemberTypeName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:X.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,lr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}extractKeyFieldSets(t,n){var a;let r=t.name.value;if(!((a=t.directives)!=null&&a.length)){this.errors.push((0,se.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==Z.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let u,l=!1;for(let v of o.arguments){if(v.name.value===Z.RESOLVABLE){v.value.kind===X.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==Z.FIELDS){u=void 0;break}if(v.value.kind!==X.Kind.STRING){u=void 0;break}u=v.value.value}if(u===void 0)continue;let{error:d,documentNode:p}=(0,bn.safeParse)("{"+u+"}");if(d||!p){this.errors.push((0,se.invalidDirectiveError)(Z.KEY,r,(0,Ve.numberToOrdinal)(i),[(0,se.unparsableFieldSetErrorMessage)(u,d)]));continue}let E=(0,oi.getNormalizedFieldSet)(p),I=n.get(E);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(E,{documentNode:p,isUnresolvable:l,normalizedFieldSet:E,rawFieldSet:u})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,Ve.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,lr.getTypeNodeNamedTypeName)(a.node.type),u=`${i}.${r}`;if(Ur.BASE_SCALARS.has(o))return{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:u,responseType:o,subgraphName:this.subgraphName})};let l=this.parentDefinitionDataByTypeName.get(o);return l?l.kind!==X.Kind.INTERFACE_TYPE_DEFINITION&&l.kind!==X.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:u,responseType:o,subgraphName:this.subgraphName})}:{fieldSetParentData:l}:{errorString:(0,se.unknownNamedTypeErrorMessage)(u,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:u}=(0,bn.safeParse)("{"+n+"}");if(o||!u)return{errorMessages:[(0,se.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],p=(0,oi.getConditionalFieldSetDirectiveName)(i),E=[],I=`${a}.${r}`,v=(0,oi.getInitialFieldCoordsPath)(i,I),A=[r],U=new Set,j=[],J=-1,re=!0,te=r,pe=!1;return(0,X.visit)(u,{Argument:{enter(){return!1}},Field:{enter(Ne){var rn,kr;let Ie=d[J],Ue=Ie.name;if(Ie.kind===X.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.invalidSelectionOnUnionErrorMessage)(n,v,Ue)),X.BREAK;let He=Ne.name.value,W=`${Ue}.${He}`;if(l.unvalidatedExternalFieldCoords.delete(W),re)return j.push((0,se.invalidSelectionSetErrorMessage)(n,v,Ue,(0,Ve.kindToNodeType)(Ie.kind))),X.BREAK;if(v.push(W),A.push(He),te=He,He===Z.TYPENAME){if(i)return j.push((0,se.typeNameAlreadyProvidedErrorMessage)(W,l.subgraphName)),X.BREAK;U.size<1&&El(rn=l,Dp,ub).call(rn,{currentFieldCoords:W,directiveCoords:I,directiveName:p,fieldSet:n});return}let Oe=Ie.fieldDataByName.get(He);if(!Oe)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,Ue,He)),X.BREAK;if(E[J].has(He))return j.push((0,se.duplicateFieldInFieldSetErrorMessage)(n,W)),X.BREAK;E[J].add(He);let{isDefinedExternal:Et,isUnconditionallyProvided:on}=(0,Ve.getOrThrowError)(Oe.externalFieldDataBySubgraphName,l.subgraphName,`${W}.externalFieldDataBySubgraphName`),En=Et&&!on;on||(pe=!0);let un=(0,lr.getTypeNodeNamedTypeName)(Oe.node.type),Pt=l.parentDefinitionDataByTypeName.get(un);if(Ur.BASE_SCALARS.has(un)||(Pt==null?void 0:Pt.kind)===X.Kind.SCALAR_TYPE_DEFINITION||(Pt==null?void 0:Pt.kind)===X.Kind.ENUM_TYPE_DEFINITION){if(U.size<1&&!Et){El(kr=l,Dp,ub).call(kr,{currentFieldCoords:W,directiveCoords:I,directiveName:p,fieldSet:n});return}if(U.size<1&&on){l.isSubgraphVersionTwo?j.push((0,se.fieldAlreadyProvidedErrorMessage)(W,l.subgraphName,p)):l.warnings.push((0,us.fieldAlreadyProvidedWarning)(W,p,I,l.subgraphName));return}if(!En&&!i)return;let nr=(0,Ve.getValueOrDefault)(l.conditionalFieldDataByCoords,W,nn.newConditionalFieldData),hn=(0,Op.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]});i?nr.providedBy.push(hn):nr.requiredBy.push(hn);return}if(!Pt)return j.push((0,se.unknownTypeInFieldSetErrorMessage)(n,W,un)),X.BREAK;if(Et&&(i&&(0,Ve.getValueOrDefault)(l.conditionalFieldDataByCoords,W,nn.newConditionalFieldData).providedBy.push((0,Op.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]})),U.add(W)),Pt.kind===X.Kind.OBJECT_TYPE_DEFINITION||Pt.kind===X.Kind.INTERFACE_TYPE_DEFINITION||Pt.kind===X.Kind.UNION_TYPE_DEFINITION){re=!0,d.push(Pt);return}},leave(){U.delete(v.pop()||""),A.pop()}},InlineFragment:{enter(Ne){let Ie=d[J],Ue=Ie.name,He=v.length<1?t.name:v[v.length-1];if(!Ne.typeCondition)return j.push((0,se.inlineFragmentWithoutTypeConditionErrorMessage)(n,He)),X.BREAK;let W=Ne.typeCondition.name.value;if(W===Ue){d.push(Ie),re=!0;return}if(!(0,bn.isKindAbstract)(Ie.kind))return j.push((0,se.invalidInlineFragmentTypeErrorMessage)(n,v,W,Ue)),X.BREAK;let Oe=l.parentDefinitionDataByTypeName.get(W);if(!Oe)return j.push((0,se.unknownInlineFragmentTypeConditionErrorMessage)(n,v,Ue,W)),X.BREAK;switch(re=!0,Oe.kind){case X.Kind.INTERFACE_TYPE_DEFINITION:{if(!Oe.implementedInterfaceTypeNames.has(Ue))break;d.push(Oe);return}case X.Kind.OBJECT_TYPE_DEFINITION:{let Et=l.concreteTypeNamesByAbstractTypeName.get(Ue);if(!Et||!Et.has(W))break;d.push(Oe);return}case X.Kind.UNION_TYPE_DEFINITION:{d.push(Oe);return}default:return j.push((0,se.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,Ue,W,(0,Ve.kindToNodeType)(Oe.kind))),X.BREAK}return j.push((0,se.invalidInlineFragmentTypeConditionErrorMessage)(n,v,W,(0,Ve.kindToNodeType)(Ie.kind),Ue)),X.BREAK}},SelectionSet:{enter(){if(!re){let Ne=d[J];if(Ne.kind===X.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,te)),X.BREAK;if(te===Z.TYPENAME)return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,Z.STRING_SCALAR,(0,Ve.kindToNodeType)(X.Kind.SCALAR_TYPE_DEFINITION))),X.BREAK;let Ie=Ne.fieldDataByName.get(te);if(!Ie)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,Ne.name,te)),X.BREAK;let Ue=(0,lr.getTypeNodeNamedTypeName)(Ie.node.type),He=l.parentDefinitionDataByTypeName.get(Ue),W=He?He.kind:X.Kind.SCALAR_TYPE_DEFINITION;return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,Ue,(0,Ve.kindToNodeType)(W))),X.BREAK}if(J+=1,re=!1,J<0||J>=d.length)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,te)),X.BREAK;E.push(new Set)},leave(){if(re){let Ne=d[J+1];j.push((0,se.invalidSelectionSetErrorMessage)(n,v,Ne.name,(0,Ve.kindToNodeType)(Ne.kind))),re=!1}J-=1,d.pop(),E.pop()}}}),j.length>0||!pe?{errorMessages:j}:{configuration:{fieldName:r,selectionSet:(0,oi.getNormalizedFieldSet)(u)},errorMessages:j}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,nn.getParentTypeName)(t);for(let[u,l]of n){let{fieldSetParentData:d,errorString:p}=this.getFieldSetParent(r,t,u,o),E=`${o}.${u}`;if(p){i.push(p);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,u,r,o);if(I.length>0){i.push(` On field "${E}": + -`+I.join(Z.HYPHEN_JOIN));continue}v&&a.push(v)}if(i.length>0){this.errors.push((0,se.invalidProvidesOrRequiresDirectivesError)((0,oi.getConditionalFieldSetDirectiveName)(r),i));return}if(a.length>0)return a}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByName.has(Z.INACCESSIBLE),r=new Map,i=new Map,a=!1;for(let o of t.implementedInterfaceTypeNames){let u=this.parentDefinitionDataByTypeName.get(o);if(Ur.BASE_SCALARS.has(o)&&this.referencedTypeNames.add(o),!u)continue;if(u.kind!==X.Kind.INTERFACE_TYPE_DEFINITION){i.set(u.name,(0,Ve.kindToNodeType)(u.kind));continue}if(t.name===u.name){a=!0;continue}let l={invalidFieldImplementations:new Map,unimplementedFields:[]},d=!1;for(let[p,E]of u.fieldDataByName){this.unvalidatedExternalFieldCoords.delete(`${t.name}.${p}`);let I=!1,v=t.fieldDataByName.get(p);if(!v){d=!0,l.unimplementedFields.push(p);continue}let A={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,_i.printTypeNode)(E.node.type),unimplementedArguments:new Set};(0,nn.isTypeValidImplementation)(E.node.type,v.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,I=!0,A.implementedResponseType=(0,_i.printTypeNode)(v.node.type));let U=new Set;for(let[j,J]of E.argumentDataByName){U.add(j);let re=v.argumentDataByName.get(j);if(!re){d=!0,I=!0,A.unimplementedArguments.add(j);continue}let te=(0,_i.printTypeNode)(re.type),pe=(0,_i.printTypeNode)(J.type);pe!==te&&(d=!0,I=!0,A.invalidImplementedArguments.push({actualType:te,argumentName:j,expectedType:pe}))}for(let[j,J]of v.argumentDataByName)U.has(j)||J.type.kind===X.Kind.NON_NULL_TYPE&&(d=!0,I=!0,A.invalidAdditionalArguments.add(j));!n&&v.isInaccessible&&!E.isInaccessible&&(d=!0,I=!0,A.isInaccessible=!0),I&&l.invalidFieldImplementations.set(p,A)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,se.invalidImplementedTypeError)(t.name,i)),a&&this.errors.push((0,se.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,se.invalidInterfaceImplementationError)(t.name,(0,Ve.kindToNodeType)(t.kind),r))}handleAuthenticatedDirective(t,n){let r=(0,Ve.getValueOrDefault)(this.authorizationDataByParentTypeName,n,()=>(0,Yn.newAuthorizationData)(n));if(t.kind===X.Kind.FIELD_DEFINITION){let i=(0,Ve.getValueOrDefault)(r.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));i.inheritedData.requiresAuthentication=!0,i.originalData.requiresAuthentication=!0}else r.requiresAuthentication=!0,this.parentTypeNamesWithAuthDirectives.add(n)}handleOverrideDirective({data:t,directiveCoords:n,errorMessages:r,targetSubgraphName:i}){if(i===this.subgraphName){r.push((0,se.equivalentSourceAndTargetOverrideErrorMessage)(i,n));return}let a=(0,Ve.getValueOrDefault)(this.overridesByTargetSubgraphName,i,()=>new Map);(0,Ve.getValueOrDefault)(a,t.renamedParentTypeName,()=>new Set).add(t.name)}handleSemanticNonNullDirective({data:t,directiveNode:n,errorMessages:r}){var E;let i=new Set,a=t.node.type,o=0;for(;a;)switch(a.kind){case X.Kind.LIST_TYPE:{o+=1,a=a.type;break}case X.Kind.NON_NULL_TYPE:{i.add(o),a=a.type;break}default:{a=null;break}}let u=(E=n.arguments)==null?void 0:E.find(I=>I.name.value===Z.LEVELS);if(!u||u.value.kind!==X.Kind.LIST){r.push(se.semanticNonNullArgumentErrorMessage);return}let l=u.value.values,d=(0,_i.printTypeNode)(t.type),p=new Set;for(let{value:I}of l){let v=parseInt(I,10);if(Number.isNaN(v)){r.push((0,se.semanticNonNullLevelsNaNIndexErrorMessage)(I));continue}if(v<0||v>o){r.push((0,se.semanticNonNullLevelsIndexOutOfBoundsErrorMessage)({maxIndex:o,typeString:d,value:I}));continue}if(!i.has(v)){p.add(v);continue}r.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:d,value:I}))}t.nullLevelsBySubgraphName.set(this.subgraphName,p)}extractRequiredScopes({directiveCoords:t,orScopes:n,requiredScopes:r}){if(n.length>Ur.MAX_OR_SCOPES){this.invalidORScopesCoords.add(t);return}for(let i of n){let a=new Set;for(let o of i.values)a.add(o.value);a.size<1||(0,Yn.addScopes)(r,a)}}getKafkaPublishConfiguration(t,n,r,i){let a=[],o=Z.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case Z.TOPIC:{if(u.value.kind!==X.Kind.STRING||u.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(Z.TOPIC));continue}(0,oi.validateArgumentTemplateReferences)(u.value.value,n,i),a.push(u.value.value);break}case Z.PROVIDER_ID:{if(u.value.kind!==X.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:Z.PROVIDER_TYPE_KAFKA,topics:a,type:Z.PUBLISH}}getKafkaSubscribeConfiguration(t,n,r,i){let a=[],o=Z.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case Z.TOPICS:{if(u.value.kind!==X.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(Z.TOPICS));continue}for(let l of u.value.values){if(l.kind!==X.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(Z.TOPICS));break}(0,oi.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case Z.PROVIDER_ID:{if(u.value.kind!==X.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:Z.PROVIDER_TYPE_KAFKA,topics:a,type:Z.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r,i,a){let o=[],u=Z.DEFAULT_EDFS_PROVIDER_ID;for(let l of n.arguments||[])switch(l.name.value){case Z.SUBJECT:{if(l.value.kind!==X.Kind.STRING||l.value.value.length<1){a.push((0,se.invalidEventSubjectErrorMessage)(Z.SUBJECT));continue}(0,oi.validateArgumentTemplateReferences)(l.value.value,r,a),o.push(l.value.value);break}case Z.PROVIDER_ID:{if(l.value.kind!==X.Kind.STRING||l.value.value.length<1){a.push(se.invalidEventProviderIdErrorMessage);continue}u=l.value.value;break}}if(!(a.length>0))return{fieldName:i,providerId:u,providerType:Z.PROVIDER_TYPE_NATS,subjects:o,type:t}}getNatsSubscribeConfiguration(t,n,r,i){let a=[],o=Z.DEFAULT_EDFS_PROVIDER_ID,u=nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,l="",d="";for(let p of t.arguments||[])switch(p.name.value){case Z.SUBJECTS:{if(p.value.kind!==X.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(Z.SUBJECTS));continue}for(let E of p.value.values){if(E.kind!==X.Kind.STRING||E.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(Z.SUBJECTS));break}(0,oi.validateArgumentTemplateReferences)(E.value,n,i),a.push(E.value)}break}case Z.PROVIDER_ID:{if(p.value.kind!==X.Kind.STRING||p.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=p.value.value;break}case Z.STREAM_CONFIGURATION:{if(this.usesEdfsNatsStreamConfiguration=!0,p.value.kind!==X.Kind.OBJECT||p.value.fields.length<1){i.push(se.invalidNatsStreamInputErrorMessage);continue}let E=!0,I=new Set,v=new Set(vp.STREAM_CONFIGURATION_FIELD_NAMES),A=new Set([Z.CONSUMER_NAME,Z.STREAM_NAME]),U=new Set,j=new Set;for(let J of p.value.fields){let re=J.name.value;if(!vp.STREAM_CONFIGURATION_FIELD_NAMES.has(re)){I.add(re),E=!1;continue}if(v.has(re))v.delete(re);else{U.add(re),E=!1;continue}switch(A.has(re)&&A.delete(re),re){case Z.CONSUMER_NAME:if(J.value.kind!=X.Kind.STRING||J.value.value.length<1){j.add(re),E=!1;continue}l=J.value.value;break;case Z.STREAM_NAME:if(J.value.kind!=X.Kind.STRING||J.value.value.length<1){j.add(re),E=!1;continue}d=J.value.value;break;case Z.CONSUMER_INACTIVE_THRESHOLD:if(J.value.kind!=X.Kind.INT){i.push((0,se.invalidArgumentValueErrorMessage)((0,X.print)(J.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",Z.INT_SCALAR)),E=!1;continue}try{u=parseInt(J.value.value,10)}catch(te){i.push((0,se.invalidArgumentValueErrorMessage)((0,X.print)(J.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",Z.INT_SCALAR)),E=!1}break}}(!E||A.size>0)&&i.push((0,se.invalidNatsStreamInputFieldsErrorMessage)([...A],[...U],[...j],[...I]))}}if(!(i.length>0))return u<0?(u=nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,this.warnings.push((0,us.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,`The value has been set to ${nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}.`))):u>yfe.MAX_INT32&&(u=0,this.warnings.push((0,us.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,"The value has been set to 0. This means the consumer will remain indefinitely active until its manual deletion."))),k({fieldName:r,providerId:o,providerType:Z.PROVIDER_TYPE_NATS,subjects:a,type:Z.SUBSCRIBE},l&&d?{streamConfiguration:{consumerInactiveThreshold:u,consumerName:l,streamName:d}}:{})}getRedisPublishConfiguration(t,n,r,i){let a=[],o=Z.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case Z.CHANNEL:{if(u.value.kind!==X.Kind.STRING||u.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(Z.CHANNEL));continue}(0,oi.validateArgumentTemplateReferences)(u.value.value,n,i),a.push(u.value.value);break}case Z.PROVIDER_ID:{if(u.value.kind!==X.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:Z.PROVIDER_TYPE_REDIS,channels:a,type:Z.PUBLISH}}getRedisSubscribeConfiguration(t,n,r,i){let a=[],o=Z.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case Z.CHANNELS:{if(u.value.kind!==X.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(Z.CHANNELS));continue}for(let l of u.value.values){if(l.kind!==X.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(Z.CHANNELS));break}(0,oi.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case Z.PROVIDER_ID:{if(u.value.kind!==X.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:Z.PROVIDER_TYPE_REDIS,channels:a,type:Z.SUBSCRIBE}}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===X.OperationTypeNode.SUBSCRIPTION;for(let a of t.directives)if(a.name.value===Z.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,se.invalidSubscriptionFilterLocationError)(r));return}}extractEventDirectivesToConfiguration(t,n){if(!t.directives)return;let r=t.name.value,i=`${this.renamedParentTypeName||this.originalParentTypeName}.${r}`;for(let a of t.directives){let o=[],u;switch(a.name.value){case Z.EDFS_KAFKA_PUBLISH:u=this.getKafkaPublishConfiguration(a,n,r,o);break;case Z.EDFS_KAFKA_SUBSCRIBE:u=this.getKafkaSubscribeConfiguration(a,n,r,o);break;case Z.EDFS_NATS_PUBLISH:{u=this.getNatsPublishAndRequestConfiguration(Z.PUBLISH,a,n,r,o);break}case Z.EDFS_NATS_REQUEST:{u=this.getNatsPublishAndRequestConfiguration(Z.REQUEST,a,n,r,o);break}case Z.EDFS_NATS_SUBSCRIBE:{u=this.getNatsSubscribeConfiguration(a,n,r,o);break}case Z.EDFS_REDIS_PUBLISH:{u=this.getRedisPublishConfiguration(a,n,r,o);break}case Z.EDFS_REDIS_SUBSCRIBE:{u=this.getRedisSubscribeConfiguration(a,n,r,o);break}default:continue}if(o.length>0){this.errors.push((0,se.invalidEventDirectiveError)(a.name.value,i,o));continue}u&&(0,Ve.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(u)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case X.OperationTypeNode.MUTATION:return new Set([Z.EDFS_KAFKA_PUBLISH,Z.EDFS_NATS_PUBLISH,Z.EDFS_NATS_REQUEST,Z.EDFS_REDIS_PUBLISH]);case X.OperationTypeNode.QUERY:return new Set([Z.EDFS_NATS_REQUEST]);case X.OperationTypeNode.SUBSCRIPTION:return new Set([Z.EDFS_KAFKA_SUBSCRIBE,Z.EDFS_NATS_SUBSCRIBE,Z.EDFS_REDIS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case Z.MUTATION:return X.OperationTypeNode.MUTATION;case Z.QUERY:return X.OperationTypeNode.QUERY;case Z.SUBSCRIPTION:return X.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let a=this.getOperationTypeNodeForRootTypeName(t.name);if(!a){this.errors.push((0,se.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(a);for(let[u,l]of t.fieldDataByName){let d=`${l.originalParentTypeName}.${u}`,p=new Set;for(let j of vp.EVENT_DIRECTIVE_NAMES)l.directivesByName.has(j)&&p.add(j);let E=new Set;for(let j of p)o.has(j)||E.add(j);if((p.size<1||E.size>0)&&n.set(d,{definesDirectives:p.size>0,invalidDirectiveNames:[...E]}),a===X.OperationTypeNode.MUTATION){let j=(0,_i.printTypeNode)(l.type);j!==Z.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,j);continue}let I=(0,_i.printTypeNode)(l.type),v=l.namedTypeName+"!",A=!1,U=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let j of U)if(A||(A=this.entityDataByTypeName.has(j)),A)break;(!A||I!==v)&&r.set(d,I)}}validateEventDrivenKeyDefinition(t,n){let r=this.keyFieldSetDatasByTypeName.get(t);if(r)for(let[i,{isUnresolvable:a}]of r)a||(0,Ve.getValueOrDefault)(n,t,()=>[]).push(i)}validateEventDrivenObjectFields(t,n,r,i){var a;for(let[o,u]of t){let l=`${u.originalParentTypeName}.${o}`;if(n.has(o)){(a=u.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&a.isDefinedExternal||r.set(l,o);continue}i.set(l,o)}}isEdfsPublishResultValid(){let t=this.parentDefinitionDataByTypeName.get(Z.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==X.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size!=1)return!1;for(let[n,r]of t.fieldDataByName)if(r.argumentDataByName.size>0||n!==Z.SUCCESS||(0,_i.printTypeNode)(r.type)!==Z.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(!(0,nn.isInputObjectDefinitionData)(t)||t.inputValueDataByName.size!=3)return!1;for(let[n,r]of t.inputValueDataByName)switch(n){case Z.CONSUMER_INACTIVE_THRESHOLD:{if((0,_i.printTypeNode)(r.type)!==Z.NON_NULLABLE_INT||!r.defaultValue||r.defaultValue.kind!==X.Kind.INT||r.defaultValue.value!==`${nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}`)return!1;break}case Z.CONSUMER_NAME:case Z.STREAM_NAME:{if((0,_i.printTypeNode)(r.type)!==Z.NON_NULLABLE_STRING)return!1;break}default:return!1}return!0}validateEventDrivenSubgraph(){let t=[],n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,u=new Map,l=new Set,d=new Set;for(let[p,E]of this.parentDefinitionDataByTypeName){if(p===Z.EDFS_PUBLISH_RESULT||p===Z.EDFS_NATS_STREAM_CONFIGURATION||E.kind!==X.Kind.OBJECT_TYPE_DEFINITION)continue;if(E.isRootType){this.validateEventDrivenRootType(E,n,r,i);continue}let I=this.keyFieldNamesByParentTypeName.get(p);if(!I){d.add(p);continue}this.validateEventDrivenKeyDefinition(p,a),this.validateEventDrivenObjectFields(E.fieldDataByName,I,o,u)}if(this.isEdfsPublishResultValid()||t.push(se.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(Z.EDFS_NATS_SUBSCRIBE)){let p=this.parentDefinitionDataByTypeName.get(Z.EDFS_NATS_STREAM_CONFIGURATION);p&&this.usesEdfsNatsStreamConfiguration&&!this.isNatsStreamConfigurationInputObjectValid(p)&&t.push(se.invalidNatsStreamConfigurationDefinitionErrorMessage),this.parentDefinitionDataByTypeName.delete(Z.EDFS_NATS_STREAM_CONFIGURATION);let E=this.upsertInputObjectByNode(NV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION);if(E.success)for(let I of NV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION.fields)this.addInputValueDataByNode({fieldName:I.name.value,isArgument:!1,inputValueDataByName:E.data.inputValueDataByName,node:I,originalParentTypeName:Z.EDFS_NATS_STREAM_CONFIGURATION});else return}n.size>0&&t.push((0,se.invalidRootTypeFieldEventsDirectivesErrorMessage)(n)),i.size>0&&t.push((0,se.invalidEventDrivenMutationResponseTypeErrorMessage)(i)),r.size>0&&t.push((0,se.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(r)),a.size>0&&t.push((0,se.invalidKeyFieldSetsEventDrivenErrorMessage)(a)),o.size>0&&t.push((0,se.nonExternalKeyFieldNamesEventDrivenErrorMessage)(o)),u.size>0&&t.push((0,se.nonKeyFieldNamesEventDrivenErrorMessage)(u)),l.size>0&&t.push((0,se.nonEntityObjectExtensionsEventDrivenErrorMessage)([...l])),d.size>0&&t.push((0,se.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...d])),t.length>0&&this.errors.push((0,se.invalidEventDrivenGraphError)(t))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,se.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==X.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,Ve.kindToNodeType)(i.kind)}"`)}n.length>0&&this.errors.push((0,se.invalidUnionMemberTypeError)(t.name,n))}addConcreteTypeNamesForUnion(t){if(!t.types||t.types.length<1)return;let n=t.name.value;for(let r of t.types){let i=r.name.value;(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,n,()=>new Set).add(i),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(n,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(i),i,!0)}}addValidKeyFieldSetConfigurations(){for(let[t,n]of this.keyFieldSetDatasByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==X.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==X.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Op.newConfigurationData)(!0,i)),o=(0,oi.validateKeyFieldSets)(this,r,n);o&&(a.keys=o)}}getValidFlattenedDirectiveArray(t,n,r=!1){let i=[];for(let[a,o]of t){if(r&&Z.INHERITABLE_DIRECTIVE_NAMES.has(a))continue;let u=this.directiveDefinitionDataByName.get(a);if(!u)continue;if(!u.isRepeatable&&o.length>1){let p=(0,Ve.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(a)||(p.add(a),this.errors.push((0,se.invalidDirectiveError)(a,n,"1st",[(0,se.invalidRepeatedDirectiveErrorMessage)(a)])));continue}if(a!==Z.KEY){i.push(...o);continue}let l=[],d=new Set;for(let p=0;p0)return $(k({},t.description?{description:t.description}:{}),{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:X.Kind.SCHEMA_DEFINITION,operationTypes:n});if(!(t.directivesByName.size<1))return{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:X.Kind.SCHEMA_EXTENSION}}getUnionNodeByData(t){return t.node.description=t.description,t.node.directives=this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),t.node.types=(0,Yn.mapToArrayOfValues)(t.memberByMemberTypeName),t.node}evaluateExternalKeyFields(){let t=[];for(let[n,r]of this.keyFieldSetDatasByTypeName){let i=this.parentDefinitionDataByTypeName.get(n);if(!i||i.kind!==X.Kind.OBJECT_TYPE_DEFINITION&&i.kind!==X.Kind.INTERFACE_TYPE_DEFINITION){t.push(n),this.errors.push((0,se.undefinedCompositeOutputTypeError)(n));continue}let a=this;for(let o of r.values()){let u=[i],l=new Map,d=-1,p=!0;if((0,X.visit)(o.documentNode,{Argument:{enter(){return X.BREAK}},Field:{enter(E){let I=u[d],v=I.name;if(p)return X.BREAK;let A=E.name.value,U=`${v}.${A}`;a.unvalidatedExternalFieldCoords.delete(U);let j=I.fieldDataByName.get(A);if(!j||j.argumentDataByName.size)return X.BREAK;j.isShareableBySubgraphName.set(a.subgraphName,!0);let J=j.externalFieldDataBySubgraphName.get(a.subgraphName);a.edfsDirectiveReferences.size<1&&J&&J.isDefinedExternal&&!J.isUnconditionallyProvided&&i.extensionType!==os.ExtensionType.NONE&&(J.isUnconditionallyProvided=!0,(0,Ve.getValueOrDefault)(l,o.rawFieldSet,()=>new Set).add(U)),(0,Ve.getValueOrDefault)(a.keyFieldNamesByParentTypeName,v,()=>new Set).add(A);let re=(0,lr.getTypeNodeNamedTypeName)(j.node.type);if(Ur.BASE_SCALARS.has(re))return;let te=a.parentDefinitionDataByTypeName.get(re);if(!te)return X.BREAK;if(te.kind===X.Kind.OBJECT_TYPE_DEFINITION){p=!0,u.push(te);return}if((0,bn.isKindAbstract)(te.kind))return X.BREAK}},InlineFragment:{enter(){return X.BREAK}},SelectionSet:{enter(){if(!p||(d+=1,p=!1,d<0||d>=u.length))return X.BREAK},leave(){p&&(p=!1),d-=1,u.pop()}}}),!(l.size<1))for(let[E,I]of l)this.warnings.push((0,us.externalEntityExtensionKeyFieldWarning)(i.name,E,[...I],this.subgraphName))}}for(let n of t)this.keyFieldSetDatasByTypeName.delete(n)}addValidConditionalFieldSetConfigurations(){for(let[t,n]of this.fieldSetDataByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==X.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==X.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Op.newConfigurationData)(!1,i)),o=this.validateProvidesOrRequires(r,n.provides,!0);o&&(a.provides=o);let u=this.validateProvidesOrRequires(r,n.requires,!1);u&&(a.requires=u)}}addFieldNamesToConfigurationData(t,n){let r=new Set;for(let[i,a]of t){let o=a.externalFieldDataBySubgraphName.get(this.subgraphName);if(!o||o.isUnconditionallyProvided){n.fieldNames.add(i);continue}r.add(i),this.edfsDirectiveReferences.size>0&&n.fieldNames.add(i)}r.size>0&&(n.externalFieldNames=r)}validateOneOfDirective({data:t,requiredFieldNames:n}){var r,i;return t.directivesByName.has(Z.ONE_OF)?n.size>0?(this.errors.push((0,se.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(n),typeName:t.name})),!1):(t.inputValueDataByName.size===1&&this.warnings.push((0,us.singleSubgraphInputFieldOneOfWarning)({fieldName:(i=(r=(0,Ve.getFirstEntry)(t.inputValueDataByName))==null?void 0:r.name)!=null?i:"unknown",subgraphName:this.subgraphName,typeName:t.name})),!0):!0}normalize(t){var o;(0,mV.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,mV.upsertParentsAndChildren)(this,t);let n=[];El(this,rh,EV).call(this,n),this.validateDirectives(this.schemaData,Z.SCHEMA);let r=this.getSchemaNodeByData(this.schemaData);(r==null?void 0:r.kind)===X.Kind.SCHEMA_DEFINITION&&n.push(r);for(let[u,l]of this.parentDefinitionDataByTypeName)this.validateDirectives(l,u);this.invalidORScopesCoords.size>0&&this.errors.push((0,se.orScopesLimitError)(Ur.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let u of this.invalidConfigureDescriptionNodeDatas)u.description||this.errors.push((0,se.configureDescriptionNoDescriptionError)((0,Ve.kindToNodeType)(u.kind),u.name));this.evaluateExternalKeyFields();for(let[u,l]of this.parentDefinitionDataByTypeName)switch(l.kind){case X.Kind.ENUM_TYPE_DEFINITION:{if(l.enumValueDataByName.size<1){this.errors.push((0,se.noDefinedEnumValuesError)(u));break}n.push(this.getEnumNodeByData(l));break}case X.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(l.inputValueDataByName.size<1){this.errors.push((0,se.noInputValueDefinitionsError)(u));break}let d=new Set;for(let p of l.inputValueDataByName.values()){if((0,nn.isTypeRequired)(p.type)&&d.add(p.name),p.namedTypeKind!==X.Kind.NULL)continue;let E=this.parentDefinitionDataByTypeName.get(p.namedTypeName);if(E){if(!(0,nn.isInputNodeKind)(E.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:p,namedTypeData:E,nodeType:`${(0,Ve.kindToNodeType)(l.kind)} field`}));continue}p.namedTypeKind=E.kind}}if(!this.validateOneOfDirective({data:l,requiredFieldNames:d}))break;u!==Z.EDFS_NATS_STREAM_CONFIGURATION&&n.push(this.getInputObjectNodeByData(l));break}case X.Kind.INTERFACE_TYPE_DEFINITION:case X.Kind.OBJECT_TYPE_DEFINITION:{let d=this.entityDataByTypeName.has(u),p=this.operationTypeNodeByTypeName.get(u),E=l.kind===X.Kind.OBJECT_TYPE_DEFINITION;this.isSubgraphVersionTwo&&l.extensionType===os.ExtensionType.EXTENDS&&(l.extensionType=os.ExtensionType.NONE),p&&(l.fieldDataByName.delete(Z.SERVICE_FIELD),l.fieldDataByName.delete(Z.ENTITIES_FIELD));let I=[];for(let[J,re]of l.fieldDataByName){if(!E&&((o=re.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&o.isDefinedExternal)&&I.push(J),this.validateArguments(re,l.kind),re.namedTypeKind!==X.Kind.NULL)continue;let te=this.parentDefinitionDataByTypeName.get(re.namedTypeName);if(te){if(!(0,nn.isOutputNodeKind)(te.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:re,namedTypeData:te,nodeType:`${(0,Ve.kindToNodeType)(l.kind)} field`}));continue}re.namedTypeKind=this.entityInterfaceDataByTypeName.get(te.name)?X.Kind.INTERFACE_TYPE_DEFINITION:te.kind}}I.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,se.externalInterfaceFieldsError)(u,I)):this.warnings.push((0,us.externalInterfaceFieldsWarning)(this.subgraphName,u,[...I])));let v=(0,nn.getParentTypeName)(l),A=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,v,()=>(0,Op.newConfigurationData)(d,u)),U=this.entityInterfaceDataByTypeName.get(u);if(U){U.fieldDatas=(0,Yn.fieldDatasToSimpleFieldDatas)(l.fieldDataByName.values());let J=this.concreteTypeNamesByAbstractTypeName.get(u);J&&(0,Ve.addIterableToSet)({source:J,target:U.concreteTypeNames}),A.isInterfaceObject=U.isInterfaceObject,A.entityInterfaceConcreteTypeNames=U.concreteTypeNames}let j=this.eventsConfigurations.get(v);j&&(A.events=j),this.addFieldNamesToConfigurationData(l.fieldDataByName,A),this.validateInterfaceImplementations(l),n.push(this.getCompositeOutputNodeByData(l)),l.fieldDataByName.size<1&&!(0,oi.isNodeQuery)(u,p)&&this.errors.push((0,se.noFieldDefinitionsError)((0,Ve.kindToNodeType)(l.kind),u)),l.requireFetchReasonsFieldNames.size>0&&(A.requireFetchReasonsFieldNames=[...l.requireFetchReasonsFieldNames]);break}case X.Kind.SCALAR_TYPE_DEFINITION:{if(l.extensionType===os.ExtensionType.REAL){this.errors.push((0,se.noBaseScalarDefinitionError)(u));break}n.push(this.getScalarNodeByData(l));break}case X.Kind.UNION_TYPE_DEFINITION:{n.push(this.getUnionNodeByData(l)),this.validateUnionMembers(l);break}default:throw(0,se.unexpectedKindFatalError)(u)}this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.addValidConditionalFieldSetConfigurations(),this.addValidKeyFieldSetConfigurations();for(let u of Object.values(X.OperationTypeNode)){let l=this.schemaData.operationTypes.get(u),d=(0,Ve.getOrThrowError)(bn.operationTypeNodeToDefaultType,u,Z.OPERATION_TO_DEFAULT),p=l?(0,lr.getTypeNodeNamedTypeName)(l.type):d;if(Ur.BASE_SCALARS.has(p)&&this.referencedTypeNames.add(p),p!==d&&this.parentDefinitionDataByTypeName.has(d)){this.errors.push((0,se.invalidRootTypeDefinitionError)(u,p,d));continue}let E=this.parentDefinitionDataByTypeName.get(p);if(l){if(!E)continue;this.operationTypeNodeByTypeName.set(p,u)}if(!E)continue;let I=this.configurationDataByTypeName.get(d);I&&(I.isRootNode=!0,I.typeName=d),E.kind!==X.Kind.OBJECT_TYPE_DEFINITION&&this.errors.push((0,se.operationDefinitionError)(p,u,E.kind))}for(let u of this.referencedTypeNames){let l=this.parentDefinitionDataByTypeName.get(u);if(!l){this.errors.push((0,se.undefinedTypeError)(u));continue}if(l.kind!==X.Kind.INTERFACE_TYPE_DEFINITION)continue;let d=this.concreteTypeNamesByAbstractTypeName.get(u);(!d||d.size<1)&&this.warnings.push((0,us.unimplementedInterfaceOutputTypeWarning)(this.subgraphName,u))}let i=new Map;for(let u of this.directiveDefinitionByName.values()){let l=(0,bn.extractExecutableDirectiveLocations)(u.locations,new Set);l.size<1||this.addPersistedDirectiveDefinitionDataByNode(i,u,l)}this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph();for(let u of this.unvalidatedExternalFieldCoords)this.isSubgraphVersionTwo?this.errors.push((0,se.invalidExternalDirectiveError)(u)):this.warnings.push((0,us.invalidExternalFieldWarning)(u,this.subgraphName));if(this.errors.length>0)return{success:!1,errors:this.errors,warnings:this.warnings};let a={kind:X.Kind.DOCUMENT,definitions:n};return{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoords,configurationDataByTypeName:this.configurationDataByTypeName,directiveDefinitionByName:this.directiveDefinitionByName,entityDataByTypeName:this.entityDataByTypeName,entityInterfaces:this.entityInterfaceDataByTypeName,fieldCoordsByNamedTypeName:this.fieldCoordsByNamedTypeName,isEventDrivenGraph:this.isSubgraphEventDrivenGraph,isVersionTwo:this.isSubgraphVersionTwo,keyFieldNamesByParentTypeName:this.keyFieldNamesByParentTypeName,keyFieldSetsByEntityTypeNameByKeyFieldCoords:this.keyFieldSetsByEntityTypeNameByFieldCoords,operationTypes:this.operationTypeNodeByTypeName,originalTypeNameByRenamedTypeName:this.originalTypeNameByRenamedTypeName,overridesByTargetSubgraphName:this.overridesByTargetSubgraphName,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:i,schemaNode:r,subgraphAST:a,subgraphString:(0,X.print)(a),schema:(0,Efe.buildASTSchema)(a,{addInvalidExtensionOrphans:!0,assumeValid:!0,assumeValidSDL:!0}),success:!0,warnings:this.warnings}}};Dp=new WeakSet,ub=function({currentFieldCoords:t,directiveCoords:n,directiveName:r,fieldSet:i}){if(this.isSubgraphVersionTwo){this.errors.push((0,se.nonExternalConditionalFieldError)({directiveCoords:n,directiveName:r,fieldSet:i,subgraphName:this.subgraphName,targetCoords:t}));return}this.warnings.push((0,us.nonExternalConditionalFieldWarning)(n,this.subgraphName,t,i,r))},rh=new WeakSet,EV=function(t){let n=new Set;for(let r of this.referencedDirectiveNames){let i=Ur.DIRECTIVE_DEFINITION_BY_NAME.get(r);i&&(this.directiveDefinitionByName.set(r,i),(0,Ve.addOptionalIterableToSet)({source:vp.DEPENDENCIES_BY_DIRECTIVE_NAME.get(r),target:n}),t.push(i))}for(let r of this.customDirectiveDefinitionByName.values())t.push(r);t.push(...n)};qc.NormalizationFactory=Sp;function gfe({options:e,subgraphs:t}){let n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,u=new Map,l=new Set,d=new Map,p=new Set,E=new Set,I=[],v=new Set,A=new Map,U=[],j=[];for(let te of t)te.name&&(0,hfe.recordSubgraphName)(te.name,p,E);let J=new cb.Graph;for(let te=0;te0&&U.push(...Ie.warnings),!Ie.success){j.push((0,se.subgraphValidationError)(Ne,Ie.errors));continue}if(!Ie){j.push((0,se.subgraphValidationError)(Ne,[se.subgraphValidationFailureError]));continue}d.set(Ne,Ie.parentDefinitionDataByTypeName);for(let Ue of Ie.authorizationDataByParentTypeName.values())(0,Yn.upsertAuthorizationData)(n,Ue,v);for(let[Ue,He]of Ie.fieldCoordsByNamedTypeName)(0,Ve.addIterableToSet)({source:He,target:(0,Ve.getValueOrDefault)(A,Ue,()=>new Set)});for(let[Ue,He]of Ie.concreteTypeNamesByAbstractTypeName){let W=r.get(Ue);if(!W){r.set(Ue,new Set(He));continue}(0,Ve.addIterableToSet)({source:He,target:W})}for(let[Ue,He]of Ie.entityDataByTypeName){let W=He.keyFieldSetDatasBySubgraphName.get(Ne);W&&(0,Yn.upsertEntityData)({entityDataByTypeName:i,keyFieldSetDataByFieldSet:W,typeName:Ue,subgraphName:Ne})}if(pe.name&&a.set(Ne,{conditionalFieldDataByCoordinates:Ie.conditionalFieldDataByCoordinates,configurationDataByTypeName:Ie.configurationDataByTypeName,definitions:Ie.subgraphAST,directiveDefinitionByName:Ie.directiveDefinitionByName,entityInterfaces:Ie.entityInterfaces,isVersionTwo:Ie.isVersionTwo,keyFieldNamesByParentTypeName:Ie.keyFieldNamesByParentTypeName,name:Ne,operationTypes:Ie.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:Ie.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:Ie.persistedDirectiveDefinitionDataByDirectiveName,schema:Ie.schema,schemaNode:Ie.schemaNode,url:pe.url}),!(Ie.overridesByTargetSubgraphName.size<1))for(let[Ue,He]of Ie.overridesByTargetSubgraphName){let W=p.has(Ue);for(let[Oe,Et]of He){let on=Ie.originalTypeNameByRenamedTypeName.get(Oe)||Oe;if(!W)U.push((0,us.invalidOverrideTargetSubgraphNameWarning)(Ue,on,[...Et],pe.name));else{let En=(0,Ve.getValueOrDefault)(o,Ue,()=>new Map),un=(0,Ve.getValueOrDefault)(En,Oe,()=>new Set(Et));(0,Ve.addIterableToSet)({source:Et,target:un})}for(let En of Et){let un=`${on}.${En}`,Pt=u.get(un);if(!Pt){u.set(un,[Ne]);continue}Pt.push(Ne),l.add(un)}}}}let re=[];if(v.size>0&&re.push((0,se.orScopesLimitError)(Ur.MAX_OR_SCOPES,[...v])),(I.length>0||E.size>0)&&re.push((0,se.invalidSubgraphNamesError)([...E],I)),l.size>0){let te=[];for(let pe of l){let Ne=(0,Ve.getOrThrowError)(u,pe,"overrideSourceSubgraphNamesByFieldPath");te.push((0,se.duplicateOverriddenFieldErrorMessage)(pe,Ne))}re.push((0,se.duplicateOverriddenFieldsError)(te))}if(re.push(...j),re.length>0)return{errors:re,success:!1,warnings:U};for(let[te,pe]of o){let Ne=(0,Ve.getOrThrowError)(a,te,"internalSubgraphBySubgraphName");Ne.overriddenFieldNamesByParentTypeName=pe;for(let[Ie,Ue]of pe){let He=Ne.configurationDataByTypeName.get(Ie);He&&((0,Yn.subtractSet)(Ue,He.fieldNames),He.fieldNames.size<1&&Ne.configurationDataByTypeName.delete(Ie))}}return{authorizationDataByParentTypeName:n,concreteTypeNamesByAbstractTypeName:r,entityDataByTypeName:i,fieldCoordsByNamedTypeName:A,internalSubgraphBySubgraphName:a,internalGraph:J,success:!0,warnings:U}}});var ih=F(Kc=>{"use strict";m();T();N();Object.defineProperty(Kc,"__esModule",{value:!0});Kc.DivergentType=void 0;Kc.getLeastRestrictiveMergedTypeNode=vfe;Kc.getMostRestrictiveMergedTypeNode=Ofe;Kc.renameNamedTypeName=Sfe;var Vc=_e(),yV=$i(),_fe=Su(),hV=Fr(),IV=ql(),jc;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(jc||(Kc.DivergentType=jc={}));function gV(e,t,n,r,i){t=(0,_fe.getMutableTypeNode)(t,n,i);let a={kind:e.kind},o=jc.NONE,u=a;for(let l=0;l{"use strict";m();T();N();Object.defineProperty(fb,"__esModule",{value:!0});fb.renameRootTypes=Afe;var Dfe=_e(),db=Fr(),bfe=ih(),Bu=zn(),$c=wr();function Afe(e,t){let n,r=!1,i;(0,Dfe.visit)(t.definitions,{FieldDefinition:{enter(a){let o=a.name.value;if(r&&(o===Bu.SERVICE_FIELD||o===Bu.ENTITIES_FIELD))return n.fieldDataByName.delete(o),!1;let u=n.name,l=(0,$c.getOrThrowError)(n.fieldDataByName,o,`${u}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let p=(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,d,Bu.OPERATION_TO_DEFAULT);l.namedTypeName!==p&&(0,bfe.renameNamedTypeName)(l,p,e.errors)}return i!=null&&i.has(o)&&l.isShareableBySubgraphName.delete(t.name),!1}},InterfaceTypeDefinition:{enter(a){let o=a.name.value;if(!e.entityInterfaceFederationDataByTypeName.get(o))return!1;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(a){let o=a.name.value,u=t.operationTypes.get(o),l=u?(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,u,Bu.OPERATION_TO_DEFAULT):o;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA),r=n.isRootType,!e.entityInterfaceFederationDataByTypeName.get(o)&&(e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(l),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o)))},leave(){n=void 0,r=!1,i=void 0}},ObjectTypeExtension:{enter(a){let o=a.name.value,u=t.operationTypes.get(o),l=u?(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,u,Bu.OPERATION_TO_DEFAULT):o;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA),r=n.isRootType,e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(o),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o))},leave(){n=void 0,r=!1,i=void 0}}})}});var _V=F((Ed,bp)=>{"use strict";m();T();N();(function(){var e,t="4.17.21",n=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",a="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",u=500,l="__lodash_placeholder__",d=1,p=2,E=4,I=1,v=2,A=1,U=2,j=4,J=8,re=16,te=32,pe=64,Ne=128,Ie=256,Ue=512,He=30,W="...",Oe=800,Et=16,on=1,En=2,un=3,Pt=1/0,rn=9007199254740991,kr=17976931348623157e292,nr=NaN,hn=4294967295,Ht=hn-1,Ln=hn>>>1,ae=[["ary",Ne],["bind",A],["bindKey",U],["curry",J],["curryRight",re],["flip",Ue],["partial",te],["partialRight",pe],["rearg",Ie]],be="[object Arguments]",ge="[object Array]",Le="[object AsyncFunction]",St="[object Boolean]",Q="[object Date]",ie="[object DOMException]",xe="[object Error]",ze="[object Function]",Ut="[object GeneratorFunction]",it="[object Map]",Ft="[object Number]",ps="[object Null]",Yr="[object Object]",ms="[object Promise]",rl="[object Proxy]",Ua="[object RegExp]",Ir="[object Set]",ui="[object String]",qt="[object Symbol]",gr="[object Undefined]",ju="[object WeakMap]",ka="[object WeakSet]",Ku="[object ArrayBuffer]",P="[object DataView]",y="[object Float32Array]",_="[object Float64Array]",B="[object Int8Array]",K="[object Int16Array]",ee="[object Int32Array]",ue="[object Uint8Array]",Tt="[object Uint8ClampedArray]",yn="[object Uint16Array]",cn="[object Uint32Array]",vn=/\b__p \+= '';/g,an=/\b(__p \+=) '' \+/g,dK=/(__e\(.*?\)|\b__t\)) \+\n'';/g,N0=/&(?:amp|lt|gt|quot|#39);/g,T0=/[&<>"']/g,fK=RegExp(N0.source),pK=RegExp(T0.source),mK=/<%-([\s\S]+?)%>/g,NK=/<%([\s\S]+?)%>/g,E0=/<%=([\s\S]+?)%>/g,TK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,EK=/^\w*$/,hK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ch=/[\\^$.*+?()[\]{}|]/g,yK=RegExp(Ch.source),Bh=/^\s+/,IK=/\s/,gK=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_K=/\{\n\/\* \[wrapped with (.+)\] \*/,vK=/,? & /,OK=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,SK=/[()=,{}\[\]\/\s]/,DK=/\\(\\)?/g,bK=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h0=/\w*$/,AK=/^[-+]0x[0-9a-f]+$/i,RK=/^0b[01]+$/i,PK=/^\[object .+?Constructor\]$/,FK=/^0o[0-7]+$/i,wK=/^(?:0|[1-9]\d*)$/,LK=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tm=/($^)/,CK=/['\n\r\u2028\u2029\\]/g,nm="\\ud800-\\udfff",BK="\\u0300-\\u036f",UK="\\ufe20-\\ufe2f",kK="\\u20d0-\\u20ff",y0=BK+UK+kK,I0="\\u2700-\\u27bf",g0="a-z\\xdf-\\xf6\\xf8-\\xff",MK="\\xac\\xb1\\xd7\\xf7",xK="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qK="\\u2000-\\u206f",VK=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_0="A-Z\\xc0-\\xd6\\xd8-\\xde",v0="\\ufe0e\\ufe0f",O0=MK+xK+qK+VK,Uh="['\u2019]",jK="["+nm+"]",S0="["+O0+"]",rm="["+y0+"]",D0="\\d+",KK="["+I0+"]",b0="["+g0+"]",A0="[^"+nm+O0+D0+I0+g0+_0+"]",kh="\\ud83c[\\udffb-\\udfff]",$K="(?:"+rm+"|"+kh+")",R0="[^"+nm+"]",Mh="(?:\\ud83c[\\udde6-\\uddff]){2}",xh="[\\ud800-\\udbff][\\udc00-\\udfff]",il="["+_0+"]",P0="\\u200d",F0="(?:"+b0+"|"+A0+")",GK="(?:"+il+"|"+A0+")",w0="(?:"+Uh+"(?:d|ll|m|re|s|t|ve))?",L0="(?:"+Uh+"(?:D|LL|M|RE|S|T|VE))?",C0=$K+"?",B0="["+v0+"]?",QK="(?:"+P0+"(?:"+[R0,Mh,xh].join("|")+")"+B0+C0+")*",YK="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",JK="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",U0=B0+C0+QK,HK="(?:"+[KK,Mh,xh].join("|")+")"+U0,zK="(?:"+[R0+rm+"?",rm,Mh,xh,jK].join("|")+")",WK=RegExp(Uh,"g"),XK=RegExp(rm,"g"),qh=RegExp(kh+"(?="+kh+")|"+zK+U0,"g"),ZK=RegExp([il+"?"+b0+"+"+w0+"(?="+[S0,il,"$"].join("|")+")",GK+"+"+L0+"(?="+[S0,il+F0,"$"].join("|")+")",il+"?"+F0+"+"+w0,il+"+"+L0,JK,YK,D0,HK].join("|"),"g"),e$=RegExp("["+P0+nm+y0+v0+"]"),t$=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,n$=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],r$=-1,gn={};gn[y]=gn[_]=gn[B]=gn[K]=gn[ee]=gn[ue]=gn[Tt]=gn[yn]=gn[cn]=!0,gn[be]=gn[ge]=gn[Ku]=gn[St]=gn[P]=gn[Q]=gn[xe]=gn[ze]=gn[it]=gn[Ft]=gn[Yr]=gn[Ua]=gn[Ir]=gn[ui]=gn[ju]=!1;var In={};In[be]=In[ge]=In[Ku]=In[P]=In[St]=In[Q]=In[y]=In[_]=In[B]=In[K]=In[ee]=In[it]=In[Ft]=In[Yr]=In[Ua]=In[Ir]=In[ui]=In[qt]=In[ue]=In[Tt]=In[yn]=In[cn]=!0,In[xe]=In[ze]=In[ju]=!1;var i$={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},a$={"&":"&","<":"<",">":">",'"':""","'":"'"},s$={"&":"&","<":"<",">":">",""":'"',"'":"'"},o$={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},u$=parseFloat,c$=parseInt,k0=typeof global=="object"&&global&&global.Object===Object&&global,l$=typeof self=="object"&&self&&self.Object===Object&&self,fr=k0||l$||Function("return this")(),Vh=typeof Ed=="object"&&Ed&&!Ed.nodeType&&Ed,$u=Vh&&typeof bp=="object"&&bp&&!bp.nodeType&&bp,M0=$u&&$u.exports===Vh,jh=M0&&k0.process,Oi=function(){try{var G=$u&&$u.require&&$u.require("util").types;return G||jh&&jh.binding&&jh.binding("util")}catch(oe){}}(),x0=Oi&&Oi.isArrayBuffer,q0=Oi&&Oi.isDate,V0=Oi&&Oi.isMap,j0=Oi&&Oi.isRegExp,K0=Oi&&Oi.isSet,$0=Oi&&Oi.isTypedArray;function ci(G,oe,ne){switch(ne.length){case 0:return G.call(oe);case 1:return G.call(oe,ne[0]);case 2:return G.call(oe,ne[0],ne[1]);case 3:return G.call(oe,ne[0],ne[1],ne[2])}return G.apply(oe,ne)}function d$(G,oe,ne,Ce){for(var dt=-1,Qt=G==null?0:G.length;++dt-1}function Kh(G,oe,ne){for(var Ce=-1,dt=G==null?0:G.length;++Ce-1;);return ne}function X0(G,oe){for(var ne=G.length;ne--&&al(oe,G[ne],0)>-1;);return ne}function I$(G,oe){for(var ne=G.length,Ce=0;ne--;)G[ne]===oe&&++Ce;return Ce}var g$=Yh(i$),_$=Yh(a$);function v$(G){return"\\"+o$[G]}function O$(G,oe){return G==null?e:G[oe]}function sl(G){return e$.test(G)}function S$(G){return t$.test(G)}function D$(G){for(var oe,ne=[];!(oe=G.next()).done;)ne.push(oe.value);return ne}function Wh(G){var oe=-1,ne=Array(G.size);return G.forEach(function(Ce,dt){ne[++oe]=[dt,Ce]}),ne}function Z0(G,oe){return function(ne){return G(oe(ne))}}function iu(G,oe){for(var ne=-1,Ce=G.length,dt=0,Qt=[];++ne-1}function pG(s,c){var f=this.__data__,h=gm(f,s);return h<0?(++this.size,f.push([s,c])):f[h][1]=c,this}Ns.prototype.clear=cG,Ns.prototype.delete=lG,Ns.prototype.get=dG,Ns.prototype.has=fG,Ns.prototype.set=pG;function Ts(s){var c=-1,f=s==null?0:s.length;for(this.clear();++c=c?s:c)),s}function Ai(s,c,f,h,O,L){var M,V=c&d,Y=c&p,ce=c&E;if(f&&(M=O?f(s,h,O,L):f(s)),M!==e)return M;if(!An(s))return s;var le=ft(s);if(le){if(M=EQ(s),!V)return Jr(s,M)}else{var Te=Dr(s),Ae=Te==ze||Te==Ut;if(du(s))return BA(s,V);if(Te==Yr||Te==be||Ae&&!O){if(M=Y||Ae?{}:eR(s),!V)return Y?sQ(s,RG(M,s)):aQ(s,dA(M,s))}else{if(!In[Te])return O?s:{};M=hQ(s,Te,V)}}L||(L=new oa);var $e=L.get(s);if($e)return $e;L.set(s,M),RR(s)?s.forEach(function(tt){M.add(Ai(tt,c,f,tt,s,L))}):bR(s)&&s.forEach(function(tt,Dt){M.set(Dt,Ai(tt,c,f,Dt,s,L))});var et=ce?Y?vy:_y:Y?zr:pr,It=le?e:et(s);return Si(It||s,function(tt,Dt){It&&(Dt=tt,tt=s[Dt]),Ud(M,Dt,Ai(tt,c,f,Dt,s,L))}),M}function PG(s){var c=pr(s);return function(f){return fA(f,s,c)}}function fA(s,c,f){var h=f.length;if(s==null)return!h;for(s=Nn(s);h--;){var O=f[h],L=c[O],M=s[O];if(M===e&&!(O in s)||!L(M))return!1}return!0}function pA(s,c,f){if(typeof s!="function")throw new Di(i);return Kd(function(){s.apply(e,f)},c)}function kd(s,c,f,h){var O=-1,L=im,M=!0,V=s.length,Y=[],ce=c.length;if(!V)return Y;f&&(c=On(c,li(f))),h?(L=Kh,M=!1):c.length>=n&&(L=Pd,M=!1,c=new Yu(c));e:for(;++OO?0:O+f),h=h===e||h>O?O:ht(h),h<0&&(h+=O),h=f>h?0:FR(h);f0&&f(V)?c>1?_r(V,c-1,f,h,O):ru(O,V):h||(O[O.length]=V)}return O}var iy=VA(),TA=VA(!0);function Ma(s,c){return s&&iy(s,c,pr)}function ay(s,c){return s&&TA(s,c,pr)}function vm(s,c){return nu(c,function(f){return gs(s[f])})}function Hu(s,c){c=cu(c,s);for(var f=0,h=c.length;s!=null&&fc}function LG(s,c){return s!=null&&sn.call(s,c)}function CG(s,c){return s!=null&&c in Nn(s)}function BG(s,c,f){return s>=Sr(c,f)&&s=120&&le.length>=120)?new Yu(M&&le):e}le=s[0];var Te=-1,Ae=V[0];e:for(;++Te-1;)V!==s&&mm.call(V,Y,1),mm.call(s,Y,1);return s}function bA(s,c){for(var f=s?c.length:0,h=f-1;f--;){var O=c[f];if(f==h||O!==L){var L=O;Is(O)?mm.call(s,O,1):Ny(s,O)}}return s}function fy(s,c){return s+Em(oA()*(c-s+1))}function JG(s,c,f,h){for(var O=-1,L=ir(Tm((c-s)/(f||1)),0),M=ne(L);L--;)M[h?L:++O]=s,s+=f;return M}function py(s,c){var f="";if(!s||c<1||c>rn)return f;do c%2&&(f+=s),c=Em(c/2),c&&(s+=s);while(c);return f}function _t(s,c){return Py(rR(s,c,Wr),s+"")}function HG(s){return lA(Tl(s))}function zG(s,c){var f=Tl(s);return Cm(f,Ju(c,0,f.length))}function qd(s,c,f,h){if(!An(s))return s;c=cu(c,s);for(var O=-1,L=c.length,M=L-1,V=s;V!=null&&++OO?0:O+c),f=f>O?O:f,f<0&&(f+=O),O=c>f?0:f-c>>>0,c>>>=0;for(var L=ne(O);++h>>1,M=s[L];M!==null&&!fi(M)&&(f?M<=c:M=n){var ce=c?null:lQ(s);if(ce)return sm(ce);M=!1,O=Pd,Y=new Yu}else Y=c?[]:V;e:for(;++h=h?s:Ri(s,c,f)}var CA=V$||function(s){return fr.clearTimeout(s)};function BA(s,c){if(c)return s.slice();var f=s.length,h=nA?nA(f):new s.constructor(f);return s.copy(h),h}function yy(s){var c=new s.constructor(s.byteLength);return new fm(c).set(new fm(s)),c}function tQ(s,c){var f=c?yy(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.byteLength)}function nQ(s){var c=new s.constructor(s.source,h0.exec(s));return c.lastIndex=s.lastIndex,c}function rQ(s){return Bd?Nn(Bd.call(s)):{}}function UA(s,c){var f=c?yy(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.length)}function kA(s,c){if(s!==c){var f=s!==e,h=s===null,O=s===s,L=fi(s),M=c!==e,V=c===null,Y=c===c,ce=fi(c);if(!V&&!ce&&!L&&s>c||L&&M&&Y&&!V&&!ce||h&&M&&Y||!f&&Y||!O)return 1;if(!h&&!L&&!ce&&s=V)return Y;var ce=f[h];return Y*(ce=="desc"?-1:1)}}return s.index-c.index}function MA(s,c,f,h){for(var O=-1,L=s.length,M=f.length,V=-1,Y=c.length,ce=ir(L-M,0),le=ne(Y+ce),Te=!h;++V1?f[O-1]:e,M=O>2?f[2]:e;for(L=s.length>3&&typeof L=="function"?(O--,L):e,M&&xr(f[0],f[1],M)&&(L=O<3?e:L,O=1),c=Nn(c);++h-1?O[L?c[M]:M]:e}}function $A(s){return ys(function(c){var f=c.length,h=f,O=bi.prototype.thru;for(s&&c.reverse();h--;){var L=c[h];if(typeof L!="function")throw new Di(i);if(O&&!M&&wm(L)=="wrapper")var M=new bi([],!0)}for(h=M?h:f;++h1&&wt.reverse(),le&&YV))return!1;var ce=L.get(s),le=L.get(c);if(ce&&le)return ce==c&&le==s;var Te=-1,Ae=!0,$e=f&v?new Yu:e;for(L.set(s,c),L.set(c,s);++Te1?"& ":"")+c[h],c=c.join(f>2?", ":" "),s.replace(gK,`{ /* [wrapped with `+c+`] */ -`)}function mQ(s){return ft(s)||Xu(s)||!!(aA&&s&&s[aA])}function Is(s,c){var f=typeof s;return c=c==null?an:c,!!c&&(f=="number"||f!="symbol"&&DK.test(s))&&s>-1&&s%1==0&&s0){if(++c>=ve)return arguments[0]}else c=0;return s.apply(e,arguments)}}function Cm(s,c){var f=-1,h=s.length,O=h-1;for(c=c===e?h:c;++f1?s[c-1]:e;return f=typeof f=="function"?(s.pop(),f):e,NR(s,f)});function TR(s){var c=F(s);return c.__chain__=!0,c}function SY(s,c){return c(s),s}function Bm(s,c){return c(s)}var DY=ys(function(s){var c=s.length,f=c?s[0]:0,h=this.__wrapped__,O=function(L){return ry(L,s)};return c>1||this.__actions__.length||!(h instanceof bt)||!Is(f)?this.thru(O):(h=h.slice(f,+f+(c?1:0)),h.__actions__.push({func:Bm,args:[O],thisArg:e}),new bi(h,this.__chain__).thru(function(L){return c&&!L.length&&L.push(e),L}))});function bY(){return TR(this)}function AY(){return new bi(this.value(),this.__chain__)}function RY(){this.__values__===e&&(this.__values__=PR(this.value()));var s=this.__index__>=this.__values__.length,c=s?e:this.__values__[this.__index__++];return{done:s,value:c}}function PY(){return this}function FY(s){for(var c,f=this;f instanceof Im;){var h=cR(f);h.__index__=0,h.__values__=e,c?O.__wrapped__=h:c=h;var O=h;f=f.__wrapped__}return O.__wrapped__=s,c}function wY(){var s=this.__wrapped__;if(s instanceof bt){var c=s;return this.__actions__.length&&(c=new bt(this)),c=c.reverse(),c.__actions__.push({func:Bm,args:[Fy],thisArg:e}),new bi(c,this.__chain__)}return this.thru(Fy)}function LY(){return wA(this.__wrapped__,this.__actions__)}var CY=bm(function(s,c,f){on.call(s,f)?++s[f]:Es(s,f,1)});function BY(s,c,f){var h=ft(s)?G0:SG;return f&&xr(s,c,f)&&(c=e),h(s,We(c,3))}function UY(s,c){var f=ft(s)?nu:NA;return f(s,We(c,3))}var kY=KA(lR),MY=KA(dR);function xY(s,c){return _r(Um(s,c),1)}function qY(s,c){return _r(Um(s,c),xt)}function VY(s,c,f){return f=f===e?1:Et(f),_r(Um(s,c),f)}function ER(s,c){var f=ft(s)?Si:ou;return f(s,We(c,3))}function hR(s,c){var f=ft(s)?s$:mA;return f(s,We(c,3))}var jY=bm(function(s,c,f){on.call(s,f)?s[f].push(c):Es(s,f,[c])});function KY(s,c,f,h){s=Hr(s)?s:Tl(s),f=f&&!h?Et(f):0;var O=s.length;return f<0&&(f=ir(O+f,0)),Vm(s)?f<=O&&s.indexOf(c,f)>-1:!!O&&al(s,c,f)>-1}var $Y=_t(function(s,c,f){var h=-1,O=typeof c=="function",L=Hr(s)?re(s.length):[];return ou(s,function(M){L[++h]=O?ci(c,M,f):Md(M,c,f)}),L}),GY=bm(function(s,c,f){Es(s,f,c)});function Um(s,c){var f=ft(s)?On:gA;return f(s,We(c,3))}function QY(s,c,f,h){return s==null?[]:(ft(c)||(c=c==null?[]:[c]),f=h?e:f,ft(f)||(f=f==null?[]:[f]),SA(s,c,f))}var YY=bm(function(s,c,f){s[f?0:1].push(c)},function(){return[[],[]]});function JY(s,c,f){var h=ft(s)?$h:H0,O=arguments.length<3;return h(s,We(c,4),f,O,ou)}function HY(s,c,f){var h=ft(s)?o$:H0,O=arguments.length<3;return h(s,We(c,4),f,O,mA)}function zY(s,c){var f=ft(s)?nu:NA;return f(s,xm(We(c,3)))}function WY(s){var c=ft(s)?lA:KG;return c(s)}function XY(s,c,f){(f?xr(s,c,f):c===e)?c=1:c=Et(c);var h=ft(s)?IG:$G;return h(s,c)}function ZY(s){var c=ft(s)?gG:QG;return c(s)}function e2(s){if(s==null)return 0;if(Hr(s))return Vm(s)?ol(s):s.length;var c=Dr(s);return c==it||c==Ir?s.size:cy(s).length}function t2(s,c,f){var h=ft(s)?Gh:YG;return f&&xr(s,c,f)&&(c=e),h(s,We(c,3))}var n2=_t(function(s,c){if(s==null)return[];var f=c.length;return f>1&&xr(s,c[0],c[1])?c=[]:f>2&&xr(c[0],c[1],c[2])&&(c=[c[0]]),SA(s,_r(c,1),[])}),km=U$||function(){return fr.Date.now()};function r2(s,c){if(typeof c!="function")throw new Di(i);return s=Et(s),function(){if(--s<1)return c.apply(this,arguments)}}function yR(s,c,f){return c=f?e:c,c=s&&c==null?s.length:c,hs(s,le,e,e,e,e,c)}function IR(s,c){var f;if(typeof c!="function")throw new Di(i);return s=Et(s),function(){return--s>0&&(f=c.apply(this,arguments)),s<=1&&(c=e),f}}var Ly=_t(function(s,c,f){var h=A;if(f.length){var O=iu(f,ml(Ly));h|=ne}return hs(s,h,c,f,O)}),gR=_t(function(s,c,f){var h=A|U;if(f.length){var O=iu(f,ml(gR));h|=ne}return hs(c,h,s,f,O)});function _R(s,c,f){c=f?e:c;var h=hs(s,Q,e,e,e,e,e,c);return h.placeholder=_R.placeholder,h}function vR(s,c,f){c=f?e:c;var h=hs(s,ee,e,e,e,e,e,c);return h.placeholder=vR.placeholder,h}function OR(s,c,f){var h,O,L,M,V,J,ce=0,de=!1,Te=!1,be=!0;if(typeof s!="function")throw new Di(i);c=Fi(c)||0,An(f)&&(de=!!f.leading,Te="maxWait"in f,L=Te?ir(Fi(f.maxWait)||0,c):L,be="trailing"in f?!!f.trailing:be);function $e(Vn){var ca=h,vs=O;return h=O=e,ce=Vn,M=s.apply(vs,ca),M}function et(Vn){return ce=Vn,V=Kd(Dt,c),de?$e(Vn):M}function yt(Vn){var ca=Vn-J,vs=Vn-ce,KR=c-ca;return Te?Sr(KR,L-vs):KR}function tt(Vn){var ca=Vn-J,vs=Vn-ce;return J===e||ca>=c||ca<0||Te&&vs>=L}function Dt(){var Vn=km();if(tt(Vn))return Ft(Vn);V=Kd(Dt,yt(Vn))}function Ft(Vn){return V=e,be&&h?$e(Vn):(h=O=e,M)}function pi(){V!==e&&CA(V),ce=0,h=J=O=V=e}function qr(){return V===e?M:Ft(km())}function mi(){var Vn=km(),ca=tt(Vn);if(h=arguments,O=this,J=Vn,ca){if(V===e)return et(J);if(Te)return CA(V),V=Kd(Dt,c),$e(J)}return V===e&&(V=Kd(Dt,c)),M}return mi.cancel=pi,mi.flush=qr,mi}var i2=_t(function(s,c){return pA(s,1,c)}),a2=_t(function(s,c,f){return pA(s,Fi(c)||0,f)});function s2(s){return hs(s,Me)}function Mm(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new Di(i);var f=function(){var h=arguments,O=c?c.apply(this,h):h[0],L=f.cache;if(L.has(O))return L.get(O);var M=s.apply(this,h);return f.cache=L.set(O,M)||L,M};return f.cache=new(Mm.Cache||Ts),f}Mm.Cache=Ts;function xm(s){if(typeof s!="function")throw new Di(i);return function(){var c=arguments;switch(c.length){case 0:return!s.call(this);case 1:return!s.call(this,c[0]);case 2:return!s.call(this,c[0],c[1]);case 3:return!s.call(this,c[0],c[1],c[2])}return!s.apply(this,c)}}function o2(s){return IR(2,s)}var u2=JG(function(s,c){c=c.length==1&&ft(c[0])?On(c[0],li(We())):On(_r(c,1),li(We()));var f=c.length;return _t(function(h){for(var O=-1,L=Sr(h.length,f);++O=c}),Xu=hA(function(){return arguments}())?hA:function(s){return Cn(s)&&on.call(s,"callee")&&!iA.call(s,"callee")},ft=re.isArray,v2=x0?li(x0):FG;function Hr(s){return s!=null&&qm(s.length)&&!gs(s)}function qn(s){return Cn(s)&&Hr(s)}function O2(s){return s===!0||s===!1||Cn(s)&&Mr(s)==St}var du=M$||Gy,S2=q0?li(q0):wG;function D2(s){return Cn(s)&&s.nodeType===1&&!$d(s)}function b2(s){if(s==null)return!0;if(Hr(s)&&(ft(s)||typeof s=="string"||typeof s.splice=="function"||du(s)||Nl(s)||Xu(s)))return!s.length;var c=Dr(s);if(c==it||c==Ir)return!s.size;if(jd(s))return!cy(s).length;for(var f in s)if(on.call(s,f))return!1;return!0}function A2(s,c){return xd(s,c)}function R2(s,c,f){f=typeof f=="function"?f:e;var h=f?f(s,c):e;return h===e?xd(s,c,e,f):!!h}function By(s){if(!Cn(s))return!1;var c=Mr(s);return c==xe||c==ie||typeof s.message=="string"&&typeof s.name=="string"&&!$d(s)}function P2(s){return typeof s=="number"&&sA(s)}function gs(s){if(!An(s))return!1;var c=Mr(s);return c==He||c==Bt||c==Le||c==rl}function DR(s){return typeof s=="number"&&s==Et(s)}function qm(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=an}function An(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}function Cn(s){return s!=null&&typeof s=="object"}var bR=V0?li(V0):CG;function F2(s,c){return s===c||uy(s,c,Sy(c))}function w2(s,c,f){return f=typeof f=="function"?f:e,uy(s,c,Sy(c),f)}function L2(s){return AR(s)&&s!=+s}function C2(s){if(EQ(s))throw new dt(r);return yA(s)}function B2(s){return s===null}function U2(s){return s==null}function AR(s){return typeof s=="number"||Cn(s)&&Mr(s)==Pt}function $d(s){if(!Cn(s)||Mr(s)!=Yr)return!1;var c=pm(s);if(c===null)return!0;var f=on.call(c,"constructor")&&c.constructor;return typeof f=="function"&&f instanceof f&&cm.call(f)==w$}var Uy=j0?li(j0):BG;function k2(s){return DR(s)&&s>=-an&&s<=an}var RR=K0?li(K0):UG;function Vm(s){return typeof s=="string"||!ft(s)&&Cn(s)&&Mr(s)==ui}function fi(s){return typeof s=="symbol"||Cn(s)&&Mr(s)==qt}var Nl=$0?li($0):kG;function M2(s){return s===e}function x2(s){return Cn(s)&&Dr(s)==ju}function q2(s){return Cn(s)&&Mr(s)==ka}var V2=Fm(ly),j2=Fm(function(s,c){return s<=c});function PR(s){if(!s)return[];if(Hr(s))return Vm(s)?sa(s):Jr(s);if(Fd&&s[Fd])return I$(s[Fd]());var c=Dr(s),f=c==it?Wh:c==Ir?sm:Tl;return f(s)}function _s(s){if(!s)return s===0?s:0;if(s=Fi(s),s===xt||s===-xt){var c=s<0?-1:1;return c*kr}return s===s?s:0}function Et(s){var c=_s(s),f=c%1;return c===c?f?c-f:c:0}function FR(s){return s?Ju(Et(s),0,En):0}function Fi(s){if(typeof s=="number")return s;if(fi(s))return nr;if(An(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=An(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=z0(s);var f=vK.test(s);return f||SK.test(s)?r$(s.slice(2),f?2:8):_K.test(s)?nr:+s}function wR(s){return xa(s,zr(s))}function K2(s){return s?Ju(Et(s),-an,an):s===0?s:0}function zt(s){return s==null?"":di(s)}var $2=fl(function(s,c){if(jd(c)||Hr(c)){xa(c,pr(c),s);return}for(var f in c)on.call(c,f)&&Ud(s,f,c[f])}),LR=fl(function(s,c){xa(c,zr(c),s)}),jm=fl(function(s,c,f,h){xa(c,zr(c),s,h)}),G2=fl(function(s,c,f,h){xa(c,pr(c),s,h)}),Q2=ys(ry);function Y2(s,c){var f=dl(s);return c==null?f:dA(f,c)}var J2=_t(function(s,c){s=Nn(s);var f=-1,h=c.length,O=h>2?c[2]:e;for(O&&xr(c[0],c[1],O)&&(h=1);++f1),L}),xa(s,vy(s),f),h&&(f=Ai(f,d|p|E,aQ));for(var O=c.length;O--;)Ny(f,c[O]);return f});function fJ(s,c){return BR(s,xm(We(c)))}var pJ=ys(function(s,c){return s==null?{}:qG(s,c)});function BR(s,c){if(s==null)return{};var f=On(vy(s),function(h){return[h]});return c=We(c),DA(s,f,function(h,O){return c(h,O[0])})}function mJ(s,c,f){c=cu(c,s);var h=-1,O=c.length;for(O||(O=1,s=e);++hc){var h=s;s=c,c=h}if(f||s%1||c%1){var O=oA();return Sr(s+O*(c-s+n$("1e-"+((O+"").length-1))),c)}return fy(s,c)}var SJ=pl(function(s,c,f){return c=c.toLowerCase(),s+(f?MR(c):c)});function MR(s){return xy(zt(s).toLowerCase())}function xR(s){return s=zt(s),s&&s.replace(bK,N$).replace(QK,"")}function DJ(s,c,f){s=zt(s),c=di(c);var h=s.length;f=f===e?h:Ju(Et(f),0,h);var O=f;return f-=c.length,f>=0&&s.slice(f,O)==c}function bJ(s){return s=zt(s),s&&oK.test(s)?s.replace(T0,T$):s}function AJ(s){return s=zt(s),s&&pK.test(s)?s.replace(Ch,"\\$&"):s}var RJ=pl(function(s,c,f){return s+(f?"-":"")+c.toLowerCase()}),PJ=pl(function(s,c,f){return s+(f?" ":"")+c.toLowerCase()}),FJ=jA("toLowerCase");function wJ(s,c,f){s=zt(s),c=Et(c);var h=c?ol(s):0;if(!c||h>=c)return s;var O=(c-h)/2;return Pm(Em(O),f)+s+Pm(Tm(O),f)}function LJ(s,c,f){s=zt(s),c=Et(c);var h=c?ol(s):0;return c&&h>>0,f?(s=zt(s),s&&(typeof c=="string"||c!=null&&!Uy(c))&&(c=di(c),!c&&sl(s))?lu(sa(s),0,f):s.split(c,f)):[]}var qJ=pl(function(s,c,f){return s+(f?" ":"")+xy(c)});function VJ(s,c,f){return s=zt(s),f=f==null?0:Ju(Et(f),0,s.length),c=di(c),s.slice(f,f+c.length)==c}function jJ(s,c,f){var h=F.templateSettings;f&&xr(s,c,f)&&(c=e),s=zt(s),c=jm({},c,h,HA);var O=jm({},c.imports,h.imports,HA),L=pr(O),M=zh(O,L),V,J,ce=0,de=c.interpolate||tm,Te="__p += '",be=Xh((c.escape||tm).source+"|"+de.source+"|"+(de===E0?gK:tm).source+"|"+(c.evaluate||tm).source+"|$","g"),$e="//# sourceURL="+(on.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++WK+"]")+` -`;s.replace(be,function(tt,Dt,Ft,pi,qr,mi){return Ft||(Ft=pi),Te+=s.slice(ce,mi).replace(AK,E$),Dt&&(V=!0,Te+=`' + +`)}function IQ(s){return ft(s)||Xu(s)||!!(aA&&s&&s[aA])}function Is(s,c){var f=typeof s;return c=c==null?rn:c,!!c&&(f=="number"||f!="symbol"&&wK.test(s))&&s>-1&&s%1==0&&s0){if(++c>=Oe)return arguments[0]}else c=0;return s.apply(e,arguments)}}function Cm(s,c){var f=-1,h=s.length,O=h-1;for(c=c===e?h:c;++f1?s[c-1]:e;return f=typeof f=="function"?(s.pop(),f):e,NR(s,f)});function TR(s){var c=w(s);return c.__chain__=!0,c}function FY(s,c){return c(s),s}function Bm(s,c){return c(s)}var wY=ys(function(s){var c=s.length,f=c?s[0]:0,h=this.__wrapped__,O=function(L){return ry(L,s)};return c>1||this.__actions__.length||!(h instanceof bt)||!Is(f)?this.thru(O):(h=h.slice(f,+f+(c?1:0)),h.__actions__.push({func:Bm,args:[O],thisArg:e}),new bi(h,this.__chain__).thru(function(L){return c&&!L.length&&L.push(e),L}))});function LY(){return TR(this)}function CY(){return new bi(this.value(),this.__chain__)}function BY(){this.__values__===e&&(this.__values__=PR(this.value()));var s=this.__index__>=this.__values__.length,c=s?e:this.__values__[this.__index__++];return{done:s,value:c}}function UY(){return this}function kY(s){for(var c,f=this;f instanceof Im;){var h=cR(f);h.__index__=0,h.__values__=e,c?O.__wrapped__=h:c=h;var O=h;f=f.__wrapped__}return O.__wrapped__=s,c}function MY(){var s=this.__wrapped__;if(s instanceof bt){var c=s;return this.__actions__.length&&(c=new bt(this)),c=c.reverse(),c.__actions__.push({func:Bm,args:[Fy],thisArg:e}),new bi(c,this.__chain__)}return this.thru(Fy)}function xY(){return wA(this.__wrapped__,this.__actions__)}var qY=bm(function(s,c,f){sn.call(s,f)?++s[f]:Es(s,f,1)});function VY(s,c,f){var h=ft(s)?G0:FG;return f&&xr(s,c,f)&&(c=e),h(s,Ze(c,3))}function jY(s,c){var f=ft(s)?nu:NA;return f(s,Ze(c,3))}var KY=KA(lR),$Y=KA(dR);function GY(s,c){return _r(Um(s,c),1)}function QY(s,c){return _r(Um(s,c),Pt)}function YY(s,c,f){return f=f===e?1:ht(f),_r(Um(s,c),f)}function ER(s,c){var f=ft(s)?Si:ou;return f(s,Ze(c,3))}function hR(s,c){var f=ft(s)?f$:mA;return f(s,Ze(c,3))}var JY=bm(function(s,c,f){sn.call(s,f)?s[f].push(c):Es(s,f,[c])});function HY(s,c,f,h){s=Hr(s)?s:Tl(s),f=f&&!h?ht(f):0;var O=s.length;return f<0&&(f=ir(O+f,0)),Vm(s)?f<=O&&s.indexOf(c,f)>-1:!!O&&al(s,c,f)>-1}var zY=_t(function(s,c,f){var h=-1,O=typeof c=="function",L=Hr(s)?ne(s.length):[];return ou(s,function(M){L[++h]=O?ci(c,M,f):Md(M,c,f)}),L}),WY=bm(function(s,c,f){Es(s,f,c)});function Um(s,c){var f=ft(s)?On:gA;return f(s,Ze(c,3))}function XY(s,c,f,h){return s==null?[]:(ft(c)||(c=c==null?[]:[c]),f=h?e:f,ft(f)||(f=f==null?[]:[f]),SA(s,c,f))}var ZY=bm(function(s,c,f){s[f?0:1].push(c)},function(){return[[],[]]});function e2(s,c,f){var h=ft(s)?$h:H0,O=arguments.length<3;return h(s,Ze(c,4),f,O,ou)}function t2(s,c,f){var h=ft(s)?p$:H0,O=arguments.length<3;return h(s,Ze(c,4),f,O,mA)}function n2(s,c){var f=ft(s)?nu:NA;return f(s,xm(Ze(c,3)))}function r2(s){var c=ft(s)?lA:HG;return c(s)}function i2(s,c,f){(f?xr(s,c,f):c===e)?c=1:c=ht(c);var h=ft(s)?DG:zG;return h(s,c)}function a2(s){var c=ft(s)?bG:XG;return c(s)}function s2(s){if(s==null)return 0;if(Hr(s))return Vm(s)?ol(s):s.length;var c=Dr(s);return c==it||c==Ir?s.size:cy(s).length}function o2(s,c,f){var h=ft(s)?Gh:ZG;return f&&xr(s,c,f)&&(c=e),h(s,Ze(c,3))}var u2=_t(function(s,c){if(s==null)return[];var f=c.length;return f>1&&xr(s,c[0],c[1])?c=[]:f>2&&xr(c[0],c[1],c[2])&&(c=[c[0]]),SA(s,_r(c,1),[])}),km=j$||function(){return fr.Date.now()};function c2(s,c){if(typeof c!="function")throw new Di(i);return s=ht(s),function(){if(--s<1)return c.apply(this,arguments)}}function yR(s,c,f){return c=f?e:c,c=s&&c==null?s.length:c,hs(s,Ne,e,e,e,e,c)}function IR(s,c){var f;if(typeof c!="function")throw new Di(i);return s=ht(s),function(){return--s>0&&(f=c.apply(this,arguments)),s<=1&&(c=e),f}}var Ly=_t(function(s,c,f){var h=A;if(f.length){var O=iu(f,ml(Ly));h|=te}return hs(s,h,c,f,O)}),gR=_t(function(s,c,f){var h=A|U;if(f.length){var O=iu(f,ml(gR));h|=te}return hs(c,h,s,f,O)});function _R(s,c,f){c=f?e:c;var h=hs(s,J,e,e,e,e,e,c);return h.placeholder=_R.placeholder,h}function vR(s,c,f){c=f?e:c;var h=hs(s,re,e,e,e,e,e,c);return h.placeholder=vR.placeholder,h}function OR(s,c,f){var h,O,L,M,V,Y,ce=0,le=!1,Te=!1,Ae=!0;if(typeof s!="function")throw new Di(i);c=Fi(c)||0,An(f)&&(le=!!f.leading,Te="maxWait"in f,L=Te?ir(Fi(f.maxWait)||0,c):L,Ae="trailing"in f?!!f.trailing:Ae);function $e(Vn){var ca=h,vs=O;return h=O=e,ce=Vn,M=s.apply(vs,ca),M}function et(Vn){return ce=Vn,V=Kd(Dt,c),le?$e(Vn):M}function It(Vn){var ca=Vn-Y,vs=Vn-ce,KR=c-ca;return Te?Sr(KR,L-vs):KR}function tt(Vn){var ca=Vn-Y,vs=Vn-ce;return Y===e||ca>=c||ca<0||Te&&vs>=L}function Dt(){var Vn=km();if(tt(Vn))return wt(Vn);V=Kd(Dt,It(Vn))}function wt(Vn){return V=e,Ae&&h?$e(Vn):(h=O=e,M)}function pi(){V!==e&&CA(V),ce=0,h=Y=O=V=e}function qr(){return V===e?M:wt(km())}function mi(){var Vn=km(),ca=tt(Vn);if(h=arguments,O=this,Y=Vn,ca){if(V===e)return et(Y);if(Te)return CA(V),V=Kd(Dt,c),$e(Y)}return V===e&&(V=Kd(Dt,c)),M}return mi.cancel=pi,mi.flush=qr,mi}var l2=_t(function(s,c){return pA(s,1,c)}),d2=_t(function(s,c,f){return pA(s,Fi(c)||0,f)});function f2(s){return hs(s,Ue)}function Mm(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new Di(i);var f=function(){var h=arguments,O=c?c.apply(this,h):h[0],L=f.cache;if(L.has(O))return L.get(O);var M=s.apply(this,h);return f.cache=L.set(O,M)||L,M};return f.cache=new(Mm.Cache||Ts),f}Mm.Cache=Ts;function xm(s){if(typeof s!="function")throw new Di(i);return function(){var c=arguments;switch(c.length){case 0:return!s.call(this);case 1:return!s.call(this,c[0]);case 2:return!s.call(this,c[0],c[1]);case 3:return!s.call(this,c[0],c[1],c[2])}return!s.apply(this,c)}}function p2(s){return IR(2,s)}var m2=eQ(function(s,c){c=c.length==1&&ft(c[0])?On(c[0],li(Ze())):On(_r(c,1),li(Ze()));var f=c.length;return _t(function(h){for(var O=-1,L=Sr(h.length,f);++O=c}),Xu=hA(function(){return arguments}())?hA:function(s){return Cn(s)&&sn.call(s,"callee")&&!iA.call(s,"callee")},ft=ne.isArray,R2=x0?li(x0):kG;function Hr(s){return s!=null&&qm(s.length)&&!gs(s)}function qn(s){return Cn(s)&&Hr(s)}function P2(s){return s===!0||s===!1||Cn(s)&&Mr(s)==St}var du=$$||Gy,F2=q0?li(q0):MG;function w2(s){return Cn(s)&&s.nodeType===1&&!$d(s)}function L2(s){if(s==null)return!0;if(Hr(s)&&(ft(s)||typeof s=="string"||typeof s.splice=="function"||du(s)||Nl(s)||Xu(s)))return!s.length;var c=Dr(s);if(c==it||c==Ir)return!s.size;if(jd(s))return!cy(s).length;for(var f in s)if(sn.call(s,f))return!1;return!0}function C2(s,c){return xd(s,c)}function B2(s,c,f){f=typeof f=="function"?f:e;var h=f?f(s,c):e;return h===e?xd(s,c,e,f):!!h}function By(s){if(!Cn(s))return!1;var c=Mr(s);return c==xe||c==ie||typeof s.message=="string"&&typeof s.name=="string"&&!$d(s)}function U2(s){return typeof s=="number"&&sA(s)}function gs(s){if(!An(s))return!1;var c=Mr(s);return c==ze||c==Ut||c==Le||c==rl}function DR(s){return typeof s=="number"&&s==ht(s)}function qm(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=rn}function An(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}function Cn(s){return s!=null&&typeof s=="object"}var bR=V0?li(V0):qG;function k2(s,c){return s===c||uy(s,c,Sy(c))}function M2(s,c,f){return f=typeof f=="function"?f:e,uy(s,c,Sy(c),f)}function x2(s){return AR(s)&&s!=+s}function q2(s){if(vQ(s))throw new dt(r);return yA(s)}function V2(s){return s===null}function j2(s){return s==null}function AR(s){return typeof s=="number"||Cn(s)&&Mr(s)==Ft}function $d(s){if(!Cn(s)||Mr(s)!=Yr)return!1;var c=pm(s);if(c===null)return!0;var f=sn.call(c,"constructor")&&c.constructor;return typeof f=="function"&&f instanceof f&&cm.call(f)==M$}var Uy=j0?li(j0):VG;function K2(s){return DR(s)&&s>=-rn&&s<=rn}var RR=K0?li(K0):jG;function Vm(s){return typeof s=="string"||!ft(s)&&Cn(s)&&Mr(s)==ui}function fi(s){return typeof s=="symbol"||Cn(s)&&Mr(s)==qt}var Nl=$0?li($0):KG;function $2(s){return s===e}function G2(s){return Cn(s)&&Dr(s)==ju}function Q2(s){return Cn(s)&&Mr(s)==ka}var Y2=Fm(ly),J2=Fm(function(s,c){return s<=c});function PR(s){if(!s)return[];if(Hr(s))return Vm(s)?sa(s):Jr(s);if(Fd&&s[Fd])return D$(s[Fd]());var c=Dr(s),f=c==it?Wh:c==Ir?sm:Tl;return f(s)}function _s(s){if(!s)return s===0?s:0;if(s=Fi(s),s===Pt||s===-Pt){var c=s<0?-1:1;return c*kr}return s===s?s:0}function ht(s){var c=_s(s),f=c%1;return c===c?f?c-f:c:0}function FR(s){return s?Ju(ht(s),0,hn):0}function Fi(s){if(typeof s=="number")return s;if(fi(s))return nr;if(An(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=An(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=z0(s);var f=RK.test(s);return f||FK.test(s)?c$(s.slice(2),f?2:8):AK.test(s)?nr:+s}function wR(s){return xa(s,zr(s))}function H2(s){return s?Ju(ht(s),-rn,rn):s===0?s:0}function zt(s){return s==null?"":di(s)}var z2=fl(function(s,c){if(jd(c)||Hr(c)){xa(c,pr(c),s);return}for(var f in c)sn.call(c,f)&&Ud(s,f,c[f])}),LR=fl(function(s,c){xa(c,zr(c),s)}),jm=fl(function(s,c,f,h){xa(c,zr(c),s,h)}),W2=fl(function(s,c,f,h){xa(c,pr(c),s,h)}),X2=ys(ry);function Z2(s,c){var f=dl(s);return c==null?f:dA(f,c)}var eJ=_t(function(s,c){s=Nn(s);var f=-1,h=c.length,O=h>2?c[2]:e;for(O&&xr(c[0],c[1],O)&&(h=1);++f1),L}),xa(s,vy(s),f),h&&(f=Ai(f,d|p|E,dQ));for(var O=c.length;O--;)Ny(f,c[O]);return f});function hJ(s,c){return BR(s,xm(Ze(c)))}var yJ=ys(function(s,c){return s==null?{}:QG(s,c)});function BR(s,c){if(s==null)return{};var f=On(vy(s),function(h){return[h]});return c=Ze(c),DA(s,f,function(h,O){return c(h,O[0])})}function IJ(s,c,f){c=cu(c,s);var h=-1,O=c.length;for(O||(O=1,s=e);++hc){var h=s;s=c,c=h}if(f||s%1||c%1){var O=oA();return Sr(s+O*(c-s+u$("1e-"+((O+"").length-1))),c)}return fy(s,c)}var FJ=pl(function(s,c,f){return c=c.toLowerCase(),s+(f?MR(c):c)});function MR(s){return xy(zt(s).toLowerCase())}function xR(s){return s=zt(s),s&&s.replace(LK,g$).replace(XK,"")}function wJ(s,c,f){s=zt(s),c=di(c);var h=s.length;f=f===e?h:Ju(ht(f),0,h);var O=f;return f-=c.length,f>=0&&s.slice(f,O)==c}function LJ(s){return s=zt(s),s&&pK.test(s)?s.replace(T0,_$):s}function CJ(s){return s=zt(s),s&&yK.test(s)?s.replace(Ch,"\\$&"):s}var BJ=pl(function(s,c,f){return s+(f?"-":"")+c.toLowerCase()}),UJ=pl(function(s,c,f){return s+(f?" ":"")+c.toLowerCase()}),kJ=jA("toLowerCase");function MJ(s,c,f){s=zt(s),c=ht(c);var h=c?ol(s):0;if(!c||h>=c)return s;var O=(c-h)/2;return Pm(Em(O),f)+s+Pm(Tm(O),f)}function xJ(s,c,f){s=zt(s),c=ht(c);var h=c?ol(s):0;return c&&h>>0,f?(s=zt(s),s&&(typeof c=="string"||c!=null&&!Uy(c))&&(c=di(c),!c&&sl(s))?lu(sa(s),0,f):s.split(c,f)):[]}var QJ=pl(function(s,c,f){return s+(f?" ":"")+xy(c)});function YJ(s,c,f){return s=zt(s),f=f==null?0:Ju(ht(f),0,s.length),c=di(c),s.slice(f,f+c.length)==c}function JJ(s,c,f){var h=w.templateSettings;f&&xr(s,c,f)&&(c=e),s=zt(s),c=jm({},c,h,HA);var O=jm({},c.imports,h.imports,HA),L=pr(O),M=zh(O,L),V,Y,ce=0,le=c.interpolate||tm,Te="__p += '",Ae=Xh((c.escape||tm).source+"|"+le.source+"|"+(le===E0?bK:tm).source+"|"+(c.evaluate||tm).source+"|$","g"),$e="//# sourceURL="+(sn.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++r$+"]")+` +`;s.replace(Ae,function(tt,Dt,wt,pi,qr,mi){return wt||(wt=pi),Te+=s.slice(ce,mi).replace(CK,v$),Dt&&(V=!0,Te+=`' + __e(`+Dt+`) + -'`),qr&&(J=!0,Te+=`'; +'`),qr&&(Y=!0,Te+=`'; `+qr+`; -__p += '`),Ft&&(Te+=`' + -((__t = (`+Ft+`)) == null ? '' : __t) + +__p += '`),wt&&(Te+=`' + +((__t = (`+wt+`)) == null ? '' : __t) + '`),ce=mi+tt.length,tt}),Te+=`'; -`;var et=on.call(c,"variable")&&c.variable;if(!et)Te=`with (obj) { +`;var et=sn.call(c,"variable")&&c.variable;if(!et)Te=`with (obj) { `+Te+` } -`;else if(yK.test(et))throw new dt(a);Te=(J?Te.replace(vn,""):Te).replace(sn,"$1").replace(aK,"$1;"),Te="function("+(et||"obj")+`) { +`;else if(SK.test(et))throw new dt(a);Te=(Y?Te.replace(vn,""):Te).replace(an,"$1").replace(dK,"$1;"),Te="function("+(et||"obj")+`) { `+(et?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(V?", __e = _.escape":"")+(J?`, __j = Array.prototype.join; +`)+"var __t, __p = ''"+(V?", __e = _.escape":"")+(Y?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Te+`return __p -}`;var yt=VR(function(){return Qt(L,$e+"return "+Te).apply(e,M)});if(yt.source=Te,By(yt))throw yt;return yt}function KJ(s){return zt(s).toLowerCase()}function $J(s){return zt(s).toUpperCase()}function GJ(s,c,f){if(s=zt(s),s&&(f||c===e))return z0(s);if(!s||!(c=di(c)))return s;var h=sa(s),O=sa(c),L=W0(h,O),M=X0(h,O)+1;return lu(h,L,M).join("")}function QJ(s,c,f){if(s=zt(s),s&&(f||c===e))return s.slice(0,eA(s)+1);if(!s||!(c=di(c)))return s;var h=sa(s),O=X0(h,sa(c))+1;return lu(h,0,O).join("")}function YJ(s,c,f){if(s=zt(s),s&&(f||c===e))return s.replace(Bh,"");if(!s||!(c=di(c)))return s;var h=sa(s),O=W0(h,sa(c));return lu(h,O).join("")}function JJ(s,c){var f=Ze,h=Z;if(An(c)){var O="separator"in c?c.separator:O;f="length"in c?Et(c.length):f,h="omission"in c?di(c.omission):h}s=zt(s);var L=s.length;if(sl(s)){var M=sa(s);L=M.length}if(f>=L)return s;var V=f-ol(h);if(V<1)return h;var J=M?lu(M,0,V).join(""):s.slice(0,V);if(O===e)return J+h;if(M&&(V+=J.length-V),Uy(O)){if(s.slice(V).search(O)){var ce,de=J;for(O.global||(O=Xh(O.source,zt(h0.exec(O))+"g")),O.lastIndex=0;ce=O.exec(de);)var Te=ce.index;J=J.slice(0,Te===e?V:Te)}}else if(s.indexOf(di(O),V)!=V){var be=J.lastIndexOf(O);be>-1&&(J=J.slice(0,be))}return J+h}function HJ(s){return s=zt(s),s&&sK.test(s)?s.replace(N0,O$):s}var zJ=pl(function(s,c,f){return s+(f?" ":"")+c.toUpperCase()}),xy=jA("toUpperCase");function qR(s,c,f){return s=zt(s),c=f?e:c,c===e?y$(s)?b$(s):l$(s):s.match(c)||[]}var VR=_t(function(s,c){try{return ci(s,e,c)}catch(f){return By(f)?f:new dt(f)}}),WJ=ys(function(s,c){return Si(c,function(f){f=qa(f),Es(s,f,Ly(s[f],s))}),s});function XJ(s){var c=s==null?0:s.length,f=We();return s=c?On(s,function(h){if(typeof h[1]!="function")throw new Di(i);return[f(h[0]),h[1]]}):[],_t(function(h){for(var O=-1;++Oan)return[];var f=En,h=Sr(s,En);c=We(c),s-=En;for(var O=Hh(h,c);++f0||c<0)?new bt(f):(s<0?f=f.takeRight(-s):s&&(f=f.drop(s)),c!==e&&(c=Et(c),f=c<0?f.dropRight(-c):f.take(c-s)),f)},bt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},bt.prototype.toArray=function(){return this.take(En)},Ma(bt.prototype,function(s,c){var f=/^(?:filter|find|map|reject)|While$/.test(c),h=/^(?:head|last)$/.test(c),O=F[h?"take"+(c=="last"?"Right":""):c],L=h||/^find/.test(c);O&&(F.prototype[c]=function(){var M=this.__wrapped__,V=h?[1]:arguments,J=M instanceof bt,ce=V[0],de=J||ft(M),Te=function(Dt){var Ft=O.apply(F,ru([Dt],V));return h&&be?Ft[0]:Ft};de&&f&&typeof ce=="function"&&ce.length!=1&&(J=de=!1);var be=this.__chain__,$e=!!this.__actions__.length,et=L&&!be,yt=J&&!$e;if(!L&&de){M=yt?M:new bt(this);var tt=s.apply(M,V);return tt.__actions__.push({func:Bm,args:[Te],thisArg:e}),new bi(tt,be)}return et&&yt?s.apply(this,V):(tt=this.thru(Te),et?h?tt.value()[0]:tt.value():tt)})}),Si(["pop","push","shift","sort","splice","unshift"],function(s){var c=om[s],f=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",h=/^(?:pop|shift)$/.test(s);F.prototype[s]=function(){var O=arguments;if(h&&!this.__chain__){var L=this.value();return c.apply(ft(L)?L:[],O)}return this[f](function(M){return c.apply(ft(M)?M:[],O)})}}),Ma(bt.prototype,function(s,c){var f=F[c];if(f){var h=f.name+"";on.call(ll,h)||(ll[h]=[]),ll[h].push({name:c,func:f})}}),ll[Am(e,U).name]=[{name:"wrapper",func:e}],bt.prototype.clone=H$,bt.prototype.reverse=z$,bt.prototype.value=W$,F.prototype.at=DY,F.prototype.chain=bY,F.prototype.commit=AY,F.prototype.next=RY,F.prototype.plant=FY,F.prototype.reverse=wY,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=LY,F.prototype.first=F.prototype.head,Fd&&(F.prototype[Fd]=PY),F},au=A$();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(fr._=au,define(function(){return au})):$u?(($u.exports=au)._=au,Vh._=au):fr._=au}).call(Ed)});var bV=w(Yc=>{"use strict";m();T();N();Object.defineProperty(Yc,"__esModule",{value:!0});Yc.FederationFactory=void 0;Yc.federateSubgraphs=Afe;Yc.federateSubgraphsWithContracts=Rfe;Yc.federateSubgraphsContract=Pfe;var Re=Ie(),vV=Su(),$r=Fr(),Pe=$i(),Gc=yT(),Qc=dd(),Gr=yp(),ah=TE(),Ap=Du(),Ofe=lb(),Sfe=Ip(),OV=Gf(),_e=$l(),Dfe=pb(),SV=_V(),hd=ih(),Oe=zn(),sh=ql(),Ne=wr(),bfe=gp(),Uu=Qf(),uh,DV,oh=class{constructor({authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,disableResolvabilityValidation:r,entityDataByTypeName:i,entityInterfaceFederationDataByTypeName:a,fieldCoordsByNamedTypeName:o,internalGraph:u,internalSubgraphBySubgraphName:l,warnings:d}){ec(this,uh);g(this,"authorizationDataByParentTypeName");g(this,"coordsByNamedTypeName",new Map);g(this,"disableResolvabilityValidation",!1);g(this,"directiveDefinitionByName",new Map);g(this,"clientDefinitions",[]);g(this,"currentSubgraphName","");g(this,"concreteTypeNamesByAbstractTypeName");g(this,"subgraphNamesByNamedTypeNameByFieldCoords",new Map);g(this,"entityDataByTypeName");g(this,"entityInterfaceFederationDataByTypeName");g(this,"errors",[]);g(this,"fieldConfigurationByFieldCoords",new Map);g(this,"fieldCoordsByNamedTypeName");g(this,"inaccessibleCoords",new Set);g(this,"inaccessibleRequiredInputValueErrorByCoords",new Map);g(this,"internalGraph");g(this,"internalSubgraphBySubgraphName");g(this,"invalidORScopesCoords",new Set);g(this,"isMaxDepth",!1);g(this,"isVersionTwo",!1);g(this,"namedInputValueTypeNames",new Set);g(this,"namedOutputTypeNames",new Set);g(this,"parentDefinitionDataByTypeName",new Map);g(this,"parentTagDataByTypeName",new Map);g(this,"persistedDirectiveDefinitionByDirectiveName",new Map([[Oe.AUTHENTICATED,Uu.AUTHENTICATED_DEFINITION],[Oe.DEPRECATED,Uu.DEPRECATED_DEFINITION],[Oe.INACCESSIBLE,Uu.INACCESSIBLE_DEFINITION],[Oe.ONE_OF,Uu.ONE_OF_DEFINITION],[Oe.REQUIRES_SCOPES,Uu.REQUIRES_SCOPES_DEFINITION],[Oe.SEMANTIC_NON_NULL,Uu.SEMANTIC_NON_NULL_DEFINITION],[Oe.TAG,Uu.TAG_DEFINITION]]));g(this,"potentialPersistedDirectiveDefinitionDataByDirectiveName",new Map);g(this,"referencedPersistedDirectiveNames",new Set);g(this,"routerDefinitions",[]);g(this,"subscriptionFilterDataByFieldPath",new Map);g(this,"tagNamesByCoords",new Map);g(this,"warnings");this.authorizationDataByParentTypeName=t,this.concreteTypeNamesByAbstractTypeName=n,this.disableResolvabilityValidation=r!=null?r:!1,this.entityDataByTypeName=i,this.entityInterfaceFederationDataByTypeName=a,this.fieldCoordsByNamedTypeName=o,this.internalGraph=u,this.internalSubgraphBySubgraphName=l,this.warnings=d}extractPersistedDirectives({data:t,directivesByName:n}){for(let[r,i]of n)if(this.persistedDirectiveDefinitionByDirectiveName.get(r)&&(this.referencedPersistedDirectiveNames.add(r),!(Oe.AUTHORIZATION_DIRECTIVES.has(r)||i.length<1)))switch(r){case Oe.DEPRECATED:{t.isDeprecated=!0,(0,_e.upsertDeprecatedDirective)(t,i[0]);break}case Oe.TAG:{(0,_e.upsertTagDirectives)(t,i);break}default:{let o=t.directivesByName.get(r);if(!o){t.directivesByName.set(r,[...i]);break}if(Oe.NON_REPEATABLE_PERSISTED_DIRECTIVES.has(r))break;o.push(...i)}}return t}getValidImplementedInterfaces(t){var o;let n=[];if(t.implementedInterfaceTypeNames.size<1)return n;let r=(0,_e.isNodeDataInaccessible)(t),i=new Map,a=new Map;for(let u of t.implementedInterfaceTypeNames){n.push((0,$r.stringToNamedTypeNode)(u));let l=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,u,Oe.PARENT_DEFINITION_DATA);if(l.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION){a.set(l.name,(0,Ne.kindToNodeType)(l.kind));continue}let d={invalidFieldImplementations:new Map,unimplementedFields:[]},p=!1;for(let[E,I]of l.fieldDataByName){let v=!1,A=t.fieldDataByName.get(E);if(!A){p=!0,d.unimplementedFields.push(E);continue}let U={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,ah.printTypeNode)(I.node.type),unimplementedArguments:new Set};(0,_e.isTypeValidImplementation)(I.node.type,A.node.type,this.concreteTypeNamesByAbstractTypeName)||(p=!0,v=!0,U.implementedResponseType=(0,ah.printTypeNode)(A.node.type));let j=new Set;for(let[Q,ee]of I.argumentDataByName){let ne=ee.node;j.add(Q);let pe=(o=A.argumentDataByName.get(Q))==null?void 0:o.node;if(!pe){p=!0,v=!0,U.unimplementedArguments.add(Q);continue}let le=(0,ah.printTypeNode)(pe.type),Ae=(0,ah.printTypeNode)(ne.type);Ae!==le&&(p=!0,v=!0,U.invalidImplementedArguments.push({actualType:le,argumentName:Q,expectedType:Ae}))}for(let[Q,ee]of A.argumentDataByName){let ne=ee.node;j.has(Q)||ne.type.kind===Re.Kind.NON_NULL_TYPE&&(p=!0,v=!0,U.invalidAdditionalArguments.add(Q))}!r&&A.isInaccessible&&!I.isInaccessible&&(p=!0,v=!0,U.isInaccessible=!0),v&&d.invalidFieldImplementations.set(E,U)}p&&i.set(u,d)}return a.size>0&&this.errors.push((0,Pe.invalidImplementedTypeError)(t.name,a)),i.size>0&&this.errors.push((0,Pe.invalidInterfaceImplementationError)(t.node.name.value,(0,Ne.kindToNodeType)(t.kind),i)),n}addValidPrimaryKeyTargetsToEntityData(t){var p;let n=this.entityDataByTypeName.get(t);if(!n)return;let r=(0,Ne.getOrThrowError)(this.internalSubgraphBySubgraphName,this.currentSubgraphName,"internalSubgraphBySubgraphName"),i=r.parentDefinitionDataByTypeName,a=i.get(n.typeName);if(!a||a.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)throw(0,Pe.incompatibleParentKindFatalError)(n.typeName,Re.Kind.OBJECT_TYPE_DEFINITION,(a==null?void 0:a.kind)||Re.Kind.NULL);let o=r.configurationDataByTypeName.get(n.typeName);if(!o)return;let u=[],l=this.internalGraph.nodeByNodeName.get(`${this.currentSubgraphName}.${n.typeName}`);(0,Gc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:n,implicitKeys:u,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l});for(let[E,I]of this.entityInterfaceFederationDataByTypeName){if(!((p=I.concreteTypeNames)!=null&&p.has(n.typeName)))continue;let v=this.entityDataByTypeName.get(E);v&&(0,Gc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:v,implicitKeys:u,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l})}if(u.length<1)return;if(!o.keys||o.keys.length<1){o.isRootNode=!0,o.keys=u;return}let d=new Set(o.keys.map(E=>E.selectionSet));for(let E of u)d.has(E.selectionSet)||(o.keys.push(E),d.add(E.selectionSet))}addValidPrimaryKeyTargetsFromInterfaceObject(t,n,r,i){let a=t.parentDefinitionDataByTypeName,o=a.get(n);if(!o||!(0,_e.isParentDataCompositeOutputType)(o))throw(0,Pe.incompatibleParentKindFatalError)(n,Re.Kind.INTERFACE_TYPE_DEFINITION,(o==null?void 0:o.kind)||Re.Kind.NULL);let u=(0,Ne.getOrThrowError)(t.configurationDataByTypeName,r.typeName,"internalSubgraph.configurationDataByTypeName"),l=[];if((0,Gc.validateImplicitFieldSets)({conditionalFieldDataByCoords:t.conditionalFieldDataByCoordinates,currentSubgraphName:t.name,entityData:r,implicitKeys:l,objectData:o,parentDefinitionDataByTypeName:a,graphNode:i}),l.length<1)return;if(!u.keys||u.keys.length<1){u.isRootNode=!0,u.keys=l;return}let d=new Set(u.keys.map(p=>p.selectionSet));for(let p of l)d.has(p.selectionSet)||(u.keys.push(p),d.add(p.selectionSet))}getEnumValueMergeMethod(t){return this.namedInputValueTypeNames.has(t)?this.namedOutputTypeNames.has(t)?_e.MergeMethod.CONSISTENT:_e.MergeMethod.INTERSECTION:_e.MergeMethod.UNION}generateTagData(){for(let[t,n]of this.tagNamesByCoords){let r=t.split(Oe.LITERAL_PERIOD);if(r.length<1)continue;let i=(0,Ne.getValueOrDefault)(this.parentTagDataByTypeName,r[0],()=>(0,Gc.newParentTagData)(r[0]));switch(r.length){case 1:for(let l of n)i.tagNames.add(l);break;case 2:let a=(0,Ne.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Gc.newChildTagData)(r[1]));for(let l of n)a.tagNames.add(l);break;case 3:let o=(0,Ne.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Gc.newChildTagData)(r[1])),u=(0,Ne.getValueOrDefault)(o.tagNamesByArgumentName,r[2],()=>new Set);for(let l of n)u.add(l);break;default:break}}}upsertEnumValueData(t,n,r){let i=t.get(n.name),a=i||this.copyEnumValueData(n);this.extractPersistedDirectives({data:a.persistedDirectivesData,directivesByName:n.directivesByName});let o=(0,_e.isNodeDataInaccessible)(n);if((r||o)&&this.inaccessibleCoords.add(a.federatedCoords),this.recordTagNamesByCoords(a,a.federatedCoords),!i){t.set(a.name,a);return}a.appearances+=1,(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,_e.setLongestDescription)(a,n),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:a.subgraphNames})}upsertInputValueData(t,n,r,i){let a=t.get(n.name),o=a||this.copyInputValueData(n);if(this.extractPersistedDirectives({data:o.persistedDirectivesData,directivesByName:n.directivesByName}),this.recordTagNamesByCoords(o,`${r}.${o.name}`),this.namedInputValueTypeNames.add(o.namedTypeName),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,o.namedTypeName,()=>new Set).add(o.federatedCoords),!a){t.set(o.name,o);return}(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,o.configureDescriptionDataBySubgraphName),(0,_e.setLongestDescription)(o,n),(0,Ne.addIterableToSet)({source:n.requiredSubgraphNames,target:o.requiredSubgraphNames}),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:o.subgraphNames}),this.handleInputValueInaccessibility(i,o,r);let u=(0,hd.getMostRestrictiveMergedTypeNode)(o.type,n.type,o.originalCoords,this.errors);u.success?o.type=u.typeNode:this.errors.push((0,Pe.incompatibleMergedTypesError)({actualType:u.actualType,isArgument:a.isArgument,coords:a.federatedCoords,expectedType:u.expectedType})),(0,_e.compareAndValidateInputValueDefaultValues)(o,n,this.errors)}handleInputValueInaccessibility(t,n,r){if(t){this.inaccessibleRequiredInputValueErrorByCoords.delete(n.federatedCoords),this.inaccessibleCoords.add(n.federatedCoords);return}if((0,_e.isNodeDataInaccessible)(n)){if((0,_e.isTypeRequired)(n.type)){this.inaccessibleRequiredInputValueErrorByCoords.set(n.federatedCoords,(0,Pe.inaccessibleRequiredInputValueError)(n,r));return}this.inaccessibleCoords.add(n.federatedCoords)}}handleSubscriptionFilterDirective(t,n){let r=t.directivesByName.get(Oe.SUBSCRIPTION_FILTER);if(!r)return;let i=(0,Ne.getFirstEntry)(t.subgraphNames);if(i===void 0){this.errors.push((0,Pe.unknownFieldSubgraphNameError)(t.federatedCoords));return}this.subscriptionFilterDataByFieldPath.set(t.federatedCoords,{directive:r[0],fieldData:n||t,directiveSubgraphName:i})}federateOutputType({current:t,other:n,coords:r,mostRestrictive:i}){n=(0,vV.getMutableTypeNode)(n,r,this.errors);let a={kind:t.kind},o=hd.DivergentType.NONE,u=a;for(let l=0;lnew Set)})}upsertFieldData(t,n,r){let i=t.get(n.name),a=i||this.copyFieldData(n,r||(0,_e.isNodeDataInaccessible)(n));(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,n.namedTypeName,()=>new Set).add(a.federatedCoords),this.namedOutputTypeNames.add(n.namedTypeName),this.handleSubscriptionFilterDirective(n,a),this.extractPersistedDirectives({data:a.persistedDirectivesData,directivesByName:n.directivesByName});let o=r||(0,_e.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.federatedCoords),this.recordTagNamesByCoords(a,a.federatedCoords),!i){t.set(a.name,a);return}let u=this.federateOutputType({current:a.type,other:n.type,coords:a.federatedCoords,mostRestrictive:!1});if(u.success)if(a.type=u.typeNode,a.namedTypeName!==n.namedTypeName){let l=(0,Ne.getValueOrDefault)(this.subgraphNamesByNamedTypeNameByFieldCoords,a.federatedCoords,()=>new Map),d=(0,Ne.getValueOrDefault)(l,a.namedTypeName,()=>new Set);if(d.size<1)for(let p of a.subgraphNames)n.subgraphNames.has(p)||d.add(p);(0,Ne.addIterableToSet)({source:n.subgraphNames,target:(0,Ne.getValueOrDefault)(l,n.namedTypeName,()=>new Set)})}else this.addSubgraphNameToExistingFieldNamedTypeDisparity(n);for(let l of n.argumentDataByName.values())this.upsertInputValueData(a.argumentDataByName,l,a.federatedCoords,o);(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,i.configureDescriptionDataBySubgraphName),(0,_e.setLongestDescription)(a,n),a.isInaccessible||(a.isInaccessible=n.isInaccessible),(0,Ne.addNewObjectValueMapEntries)(n.externalFieldDataBySubgraphName,a.externalFieldDataBySubgraphName),(0,Ne.addMapEntries)({source:n.isShareableBySubgraphName,target:a.isShareableBySubgraphName}),(0,Ne.addMapEntries)({source:n.nullLevelsBySubgraphName,target:a.nullLevelsBySubgraphName}),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:a.subgraphNames})}getClientSchemaUnionMembers(t){let n=[];for(let[r,i]of t.memberByMemberTypeName)this.inaccessibleCoords.has(r)||n.push(i);return n}recordTagNamesByCoords(t,n){let r=n||t.name;if(t.persistedDirectivesData.tagDirectiveByName.size<1)return;let i=(0,Ne.getValueOrDefault)(this.tagNamesByCoords,r,()=>new Set);for(let a of t.persistedDirectivesData.tagDirectiveByName.keys())i.add(a)}copyMutualParentDefinitionData(t){return{configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),extensionType:t.extensionType,name:t.name,persistedDirectivesData:this.extractPersistedDirectives({data:(0,_e.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),description:(0,_e.getInitialFederatedDescription)(t)}}copyEnumValueData(t){return{appearances:t.appearances,configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),federatedCoords:t.federatedCoords,directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),kind:t.kind,name:t.name,node:{directives:[],kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},parentTypeName:t.parentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,_e.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),subgraphNames:new Set(t.subgraphNames),description:(0,_e.getInitialFederatedDescription)(t)}}copyInputValueData(t){return{configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),federatedCoords:t.federatedCoords,fieldName:t.fieldName,includeDefaultValue:t.includeDefaultValue,isArgument:t.isArgument,kind:t.kind,name:t.name,namedTypeKind:t.namedTypeKind,namedTypeName:t.namedTypeName,node:{directives:[],kind:Re.Kind.INPUT_VALUE_DEFINITION,name:(0,$r.stringToNameNode)(t.name),type:t.type},originalCoords:t.originalCoords,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,_e.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),renamedParentTypeName:t.renamedParentTypeName,requiredSubgraphNames:new Set(t.requiredSubgraphNames),subgraphNames:new Set(t.subgraphNames),type:t.type,defaultValue:t.defaultValue,description:(0,_e.getInitialFederatedDescription)(t)}}copyInputValueDataByValueName(t,n,r){let i=new Map;for(let[a,o]of t){let u=this.copyInputValueData(o);this.handleInputValueInaccessibility(n,u,r),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,u.namedTypeName,()=>new Set).add(u.federatedCoords),this.namedInputValueTypeNames.add(u.namedTypeName),this.recordTagNamesByCoords(u,`${r}.${o.name}`),i.set(a,u)}return i}copyFieldData(t,n){return{argumentDataByName:this.copyInputValueDataByValueName(t.argumentDataByName,n,t.federatedCoords),configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),externalFieldDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.externalFieldDataBySubgraphName),federatedCoords:t.federatedCoords,inheritedDirectiveNames:new Set,isInaccessible:t.isInaccessible,isShareableBySubgraphName:new Map(t.isShareableBySubgraphName),kind:t.kind,name:t.name,namedTypeKind:t.namedTypeKind,namedTypeName:t.namedTypeName,node:{arguments:[],directives:[],kind:t.kind,name:(0,$r.stringToNameNode)(t.name),type:t.type},nullLevelsBySubgraphName:t.nullLevelsBySubgraphName,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,_e.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),renamedParentTypeName:t.renamedParentTypeName,subgraphNames:new Set(t.subgraphNames),type:t.type,description:(0,_e.getInitialFederatedDescription)(t)}}copyEnumValueDataByName(t,n){let r=new Map;for(let[i,a]of t){let o=this.copyEnumValueData(a);this.recordTagNamesByCoords(o,o.federatedCoords),(n||(0,_e.isNodeDataInaccessible)(o))&&this.inaccessibleCoords.add(o.federatedCoords),r.set(i,o)}return r}copyFieldDataByName(t,n){let r=new Map;for(let[i,a]of t){let o=n||(0,_e.isNodeDataInaccessible)(a),u=this.copyFieldData(a,o);this.handleSubscriptionFilterDirective(u),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,u.namedTypeName,()=>new Set).add(u.federatedCoords),this.namedOutputTypeNames.add(u.namedTypeName),this.recordTagNamesByCoords(u,u.federatedCoords),o&&this.inaccessibleCoords.add(u.federatedCoords),r.set(i,u)}return r}copyParentDefinitionData(t){let n=this.copyMutualParentDefinitionData(t);switch(t.kind){case Re.Kind.ENUM_TYPE_DEFINITION:return $(k({},n),{appearances:t.appearances,enumValueDataByName:this.copyEnumValueDataByName(t.enumValueDataByName,t.isInaccessible),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:return $(k({},n),{inputValueDataByName:this.copyInputValueDataByValueName(t.inputValueDataByName,t.isInaccessible,t.name),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.INTERFACE_TYPE_DEFINITION:return $(k({},n),{fieldDataByName:this.copyFieldDataByName(t.fieldDataByName,t.isInaccessible),implementedInterfaceTypeNames:new Set(t.implementedInterfaceTypeNames),isEntity:t.isEntity,isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},requireFetchReasonsFieldNames:new Set,subgraphNames:new Set(t.subgraphNames)});case Re.Kind.OBJECT_TYPE_DEFINITION:return $(k({},n),{fieldDataByName:this.copyFieldDataByName(t.fieldDataByName,t.isInaccessible),implementedInterfaceTypeNames:new Set(t.implementedInterfaceTypeNames),isEntity:t.isEntity,isInaccessible:t.isInaccessible,isRootType:t.isRootType,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.renamedTypeName||t.name)},requireFetchReasonsFieldNames:new Set,renamedTypeName:t.renamedTypeName,subgraphNames:new Set(t.subgraphNames)});case Re.Kind.SCALAR_TYPE_DEFINITION:return $(k({},n),{kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.UNION_TYPE_DEFINITION:return $(k({},n),{kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},memberByMemberTypeName:new Map(t.memberByMemberTypeName),subgraphNames:new Set(t.subgraphNames)})}}getParentTargetData({existingData:t,incomingData:n}){if(!t){let r=this.copyParentDefinitionData(n);return(0,_e.isParentDataRootType)(r)&&(r.extensionType=OV.ExtensionType.NONE),r}return this.extractPersistedDirectives({data:t.persistedDirectivesData,directivesByName:n.directivesByName}),t}upsertParentDefinitionData(t,n){let r=this.entityInterfaceFederationDataByTypeName.get(t.name),i=this.parentDefinitionDataByTypeName.get(t.name),a=this.getParentTargetData({existingData:i,incomingData:t});this.recordTagNamesByCoords(a);let o=(0,_e.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.name),r&&r.interfaceObjectSubgraphNames.has(n)){if(i&&i.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,Pe.incompatibleParentTypeMergeError)({existingData:i,incomingSubgraphName:n}));return}a.kind=Re.Kind.INTERFACE_TYPE_DEFINITION,a.node.kind=Re.Kind.INTERFACE_TYPE_DEFINITION}if(!i){this.parentDefinitionDataByTypeName.set(a.name,a);return}if(a.kind!==t.kind&&(!r||!r.interfaceObjectSubgraphNames.has(n)||a.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION||t.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)){this.errors.push((0,Pe.incompatibleParentTypeMergeError)({existingData:a,incomingNodeType:(0,Ne.kindToNodeType)(t.kind),incomingSubgraphName:n}));return}switch((0,Ne.addNewObjectValueMapEntries)(t.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,_e.setLongestDescription)(a,t),(0,_e.setParentDataExtensionType)(a,t),a.kind){case Re.Kind.ENUM_TYPE_DEFINITION:if(!(0,_e.areKindsEqual)(a,t))return;a.appearances+=1,a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});for(let l of t.enumValueDataByName.values())this.upsertEnumValueData(a.enumValueDataByName,l,o);return;case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:if(!(0,_e.areKindsEqual)(a,t))return;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});for(let l of t.inputValueDataByName.values())this.upsertInputValueData(a.inputValueDataByName,l,a.name,a.isInaccessible);return;case Re.Kind.INTERFACE_TYPE_DEFINITION:case Re.Kind.OBJECT_TYPE_DEFINITION:let u=t;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:u.implementedInterfaceTypeNames,target:a.implementedInterfaceTypeNames}),(0,Ne.addIterableToSet)({source:u.subgraphNames,target:a.subgraphNames});for(let l of u.fieldDataByName.values())this.upsertFieldData(a.fieldDataByName,l,a.isInaccessible);return;case Re.Kind.UNION_TYPE_DEFINITION:if(!(0,_e.areKindsEqual)(a,t))return;(0,Ne.addMapEntries)({source:t.memberByMemberTypeName,target:a.memberByMemberTypeName}),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});return;default:(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});return}}propagateInaccessibilityToExistingChildren(t){switch(t.kind){case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:for(let n of t.inputValueDataByName.values())this.inaccessibleCoords.add(n.federatedCoords);break;default:for(let n of t.fieldDataByName.values()){this.inaccessibleCoords.add(n.federatedCoords);for(let r of n.argumentDataByName.values())this.inaccessibleCoords.add(r.federatedCoords)}}}upsertPersistedDirectiveDefinitionData(t,n){let r=t.name,i=this.potentialPersistedDirectiveDefinitionDataByDirectiveName.get(r);if(!i){if(n>1)return;let a=new Map;for(let o of t.argumentDataByName.values())this.namedInputValueTypeNames.add(o.namedTypeName),this.upsertInputValueData(a,o,`@${t.name}`,!1);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.set(r,{argumentDataByName:a,executableLocations:new Set(t.executableLocations),name:r,repeatable:t.repeatable,subgraphNames:new Set(t.subgraphNames),description:t.description});return}if(i.subgraphNames.size+1!==n){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}if((0,_e.setMutualExecutableLocations)(i,t.executableLocations),i.executableLocations.size<1){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}for(let a of t.argumentDataByName.values())this.namedInputValueTypeNames.add((0,vV.getTypeNodeNamedTypeName)(a.type)),this.upsertInputValueData(i.argumentDataByName,a,`@${i.name}`,!1);(0,_e.setLongestDescription)(i,t),i.repeatable&&(i.repeatable=t.repeatable),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:i.subgraphNames})}shouldUpdateFederatedFieldAbstractNamedType(t,n){if(!t)return!1;let r=this.concreteTypeNamesByAbstractTypeName.get(t);if(!r||r.size<1)return!1;for(let i of n)if(!r.has(i))return!1;return!0}updateTypeNodeNamedType(t,n){let r=t;for(let i=0;i1){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}break}case Re.Kind.UNION_TYPE_DEFINITION:{if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}l=p;break}default:{this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));break}}}if(o.size<1&&!l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}let d=l;if(o.size>0){if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}for(let p of o.keys()){d=p;for(let[E,I]of o)if(p!==E&&!I.implementedInterfaceTypeNames.has(p)){d="";break}if(d)break}}if(!this.shouldUpdateFederatedFieldAbstractNamedType(d,u)){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}a.namedTypeName=d,this.updateTypeNodeNamedType(a.type,d)}}federateInternalSubgraphData(){let t=0,n=!1;for(let r of this.internalSubgraphBySubgraphName.values()){t+=1,this.currentSubgraphName=r.name,this.isVersionTwo||(this.isVersionTwo=r.isVersionTwo),(0,Dfe.renameRootTypes)(this,r);for(let i of r.parentDefinitionDataByTypeName.values())this.upsertParentDefinitionData(i,r.name);if(!n){if(!r.persistedDirectiveDefinitionDataByDirectiveName.size){n=!0;continue}for(let i of r.persistedDirectiveDefinitionDataByDirectiveName.values())this.upsertPersistedDirectiveDefinitionData(i,t);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.size<1&&(n=!0)}}this.handleDisparateFieldNamedTypes()}handleInterfaceObjectForInternalGraph({entityData:t,internalSubgraph:n,interfaceObjectData:r,interfaceObjectNode:i,resolvableKeyFieldSets:a,subgraphName:o}){let u=this.internalGraph.addOrUpdateNode(t.typeName),l=this.internalGraph.addEntityDataNode(t.typeName);for(let p of i.satisfiedFieldSets)u.satisfiedFieldSets.add(p),a.has(p)&&l.addTargetSubgraphByFieldSet(p,o);let d=r.fieldDatasBySubgraphName.get(o);for(let{name:p,namedTypeName:E}of d||[])this.internalGraph.addEdge(u,this.internalGraph.addOrUpdateNode(E),p);this.internalGraph.addEdge(i,u,t.typeName,!0),this.addValidPrimaryKeyTargetsFromInterfaceObject(n,i.typeName,t,u)}handleEntityInterfaces(){var t;for(let[n,r]of this.entityInterfaceFederationDataByTypeName){let i=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,n,Oe.PARENT_DEFINITION_DATA);if(i.kind===Re.Kind.INTERFACE_TYPE_DEFINITION)for(let a of r.interfaceObjectSubgraphNames){let o=(0,Ne.getOrThrowError)(this.internalSubgraphBySubgraphName,a,"internalSubgraphBySubgraphName"),u=o.configurationDataByTypeName,l=this.concreteTypeNamesByAbstractTypeName.get(n);if(!l)continue;let d=(0,Ne.getOrThrowError)(u,n,"configurationDataByTypeName"),p=d.keys;if(!p)continue;d.entityInterfaceConcreteTypeNames=new Set(r.concreteTypeNames),this.internalGraph.setSubgraphName(a);let E=this.internalGraph.addOrUpdateNode(n,{isAbstract:!0});for(let I of l){let v=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,I,Oe.PARENT_DEFINITION_DATA);if(!(0,Gr.isObjectDefinitionData)(v))continue;let A=(0,Ne.getOrThrowError)(this.entityDataByTypeName,I,"entityDataByTypeName");A.subgraphNames.add(a);let U=u.get(I);if(U)if((0,Ne.addIterableToSet)({source:d.fieldNames,target:U.fieldNames}),!U.keys)U.keys=[...p];else e:for(let ne of p){for(let{selectionSet:pe}of U.keys)if(ne.selectionSet===pe)continue e;U.keys.push(ne)}else u.set(I,{fieldNames:new Set(d.fieldNames),isRootNode:!0,keys:[...p],typeName:I});let j=new Set;for(let ne of p.filter(pe=>!pe.disableEntityResolver))j.add(ne.selectionSet);let Q=this.authorizationDataByParentTypeName.get(n),ee=(0,Ne.getOrThrowError)(o.parentDefinitionDataByTypeName,n,"internalSubgraph.parentDefinitionDataByTypeName");if((0,Gr.isObjectDefinitionData)(ee)){for(let[ne,pe]of ee.fieldDataByName){let le=`${I}.${ne}`;(0,Ne.getValueOrDefault)(this.fieldCoordsByNamedTypeName,pe.namedTypeName,()=>new Set).add(le);let Ae=Q==null?void 0:Q.fieldAuthDataByFieldName.get(ne);if(Ae){let Z=(0,Ne.getValueOrDefault)(this.authorizationDataByParentTypeName,I,()=>(0,Gr.newAuthorizationData)(I));(0,Gr.upsertFieldAuthorizationData)(Z.fieldAuthDataByFieldName,Ae)||this.invalidORScopesCoords.add(le)}let Me=v.fieldDataByName.get(ne);if(Me){let Z=(t=pe.isShareableBySubgraphName.get(a))!=null?t:!1;Me.isShareableBySubgraphName.set(a,Z),Me.subgraphNames.add(a);let ve=pe.externalFieldDataBySubgraphName.get(a);if(!ve)continue;Me.externalFieldDataBySubgraphName.set(a,k({},ve));continue}let Ze=i.isInaccessible||v.isInaccessible||pe.isInaccessible;v.fieldDataByName.set(ne,this.copyFieldData(pe,Ze))}this.handleInterfaceObjectForInternalGraph({internalSubgraph:o,subgraphName:a,interfaceObjectData:r,interfaceObjectNode:E,resolvableKeyFieldSets:j,entityData:A})}}}}}fieldDataToGraphFieldData(t){var n;return{externalSubgraphNames:new Set,name:t.name,namedTypeName:t.namedTypeName,isLeaf:(0,Gr.isNodeLeaf)((n=this.parentDefinitionDataByTypeName.get(t.namedTypeName))==null?void 0:n.kind),subgraphNames:t.subgraphNames}}getValidFlattenedPersistedDirectiveNodeArray(t){var i;let n=(0,Gr.getNodeCoords)(t),r=[];for(let[a,o]of t.persistedDirectivesData.directivesByName){if(a===Oe.SEMANTIC_NON_NULL&&(0,_e.isFieldData)(t)){r.push((0,Ne.generateSemanticNonNullDirective)((i=(0,Ne.getFirstEntry)(t.nullLevelsBySubgraphName))!=null?i:new Set([0])));continue}let u=this.persistedDirectiveDefinitionByDirectiveName.get(a);if(u){if(o.length<2){r.push(...o);continue}if(!u.repeatable){this.errors.push((0,Pe.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}r.push(...o)}}return r}getRouterPersistedDirectiveNodes(t){let n=[...t.persistedDirectivesData.tagDirectiveByName.values()];return t.persistedDirectivesData.isDeprecated&&n.push((0,_e.generateDeprecatedDirective)(t.persistedDirectivesData.deprecatedReason)),n.push(...this.getValidFlattenedPersistedDirectiveNodeArray(t)),n}getFederatedGraphNodeDescription(t){if(t.configureDescriptionDataBySubgraphName.size<1)return t.description;let n=[],r="";for(let[i,{propagate:a,description:o}]of t.configureDescriptionDataBySubgraphName)a&&(n.push(i),r=o);if(n.length===1)return(0,Gc.getDescriptionFromString)(r);if(n.length<1)return t.description;this.errors.push((0,Pe.configureDescriptionPropagationError)((0,_e.getDefinitionDataCoords)(t,!0),n))}getNodeForRouterSchemaByData(t){return t.node.name=(0,$r.stringToNameNode)(t.name),t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}getNodeWithPersistedDirectivesByInputValueData(t){return t.node.name=(0,$r.stringToNameNode)(t.name),t.node.type=t.type,t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.includeDefaultValue&&(t.node.defaultValue=t.defaultValue),t.node}getValidFieldArgumentNodes(t){let n=[],r=[],i=[],a=`${t.renamedParentTypeName}.${t.name}`;for(let[o,u]of t.argumentDataByName)t.subgraphNames.size===u.subgraphNames.size?(r.push(o),n.push(this.getNodeWithPersistedDirectivesByInputValueData(u))):(0,_e.isTypeRequired)(u.type)&&i.push({inputValueName:o,missingSubgraphs:(0,Ne.getEntriesNotInHashSet)(t.subgraphNames,u.subgraphNames),requiredSubgraphs:[...u.requiredSubgraphNames]});return i.length>0?this.errors.push((0,Pe.invalidRequiredInputValueError)(Oe.FIELD,a,i)):r.length>0&&((0,Ne.getValueOrDefault)(this.fieldConfigurationByFieldCoords,a,()=>({argumentNames:r,fieldName:t.name,typeName:t.renamedParentTypeName})).argumentNames=r),n}getNodeWithPersistedDirectivesByFieldData(t,n){return t.node.arguments=n,t.node.name=(0,$r.stringToNameNode)(t.name),t.node.type=t.type,t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}validateSemanticNonNull(t){let n;for(let r of t.nullLevelsBySubgraphName.values()){if(!n){n=r;continue}if(n.size!==r.size){this.errors.push((0,Pe.semanticNonNullInconsistentLevelsError)(t));return}for(let i of r)if(!n.has(i)){this.errors.push((0,Pe.semanticNonNullInconsistentLevelsError)(t));return}}}validateOneOfDirective({data:t,inputValueNodes:n,requiredFieldNames:r}){return t.directivesByName.has(Oe.ONE_OF)?r.size>0?(this.errors.push((0,Pe.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(r),typeName:t.name})),!1):(n.length===1&&this.warnings.push((0,bfe.singleFederatedInputFieldOneOfWarning)({fieldName:n[0].name.value,typeName:t.name})),!0):!0}pushParentDefinitionDataToDocumentDefinitions(t){for(let[n,r]of this.parentDefinitionDataByTypeName)switch(r.extensionType!==OV.ExtensionType.NONE&&this.errors.push((0,Pe.noBaseDefinitionForExtensionError)((0,Ne.kindToNodeType)(r.kind),n)),r.kind){case Re.Kind.ENUM_TYPE_DEFINITION:{if(Qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;let i=[],a=[],o=this.getEnumValueMergeMethod(n);(0,_e.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n));for(let u of r.enumValueDataByName.values()){let l=this.getNodeForRouterSchemaByData(u),d=(0,_e.isNodeDataInaccessible)(u),p=$(k({},u.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(u)});switch(o){case _e.MergeMethod.CONSISTENT:!d&&r.appearances>u.appearances&&this.errors.push((0,Pe.incompatibleSharedEnumError)(n)),i.push(l),d||a.push(p);break;case _e.MergeMethod.INTERSECTION:r.appearances===u.appearances&&(i.push(l),d||a.push(p));break;default:i.push(l),d||a.push(p);break}}if(r.node.values=i,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,_e.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,Oe.ENUM_VALUE));break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r),values:a}));break}case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(Qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;let i=new Array,a=new Array,o=new Array,u=new Set;for(let[l,d]of r.inputValueDataByName)if((0,_e.isTypeRequired)(d.type)&&u.add(l),r.subgraphNames.size===d.subgraphNames.size){if(a.push(this.getNodeWithPersistedDirectivesByInputValueData(d)),(0,_e.isNodeDataInaccessible)(d))continue;o.push($(k({},d.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(d)}))}else(0,_e.isTypeRequired)(d.type)&&i.push({inputValueName:l,missingSubgraphs:(0,Ne.getEntriesNotInHashSet)(r.subgraphNames,d.subgraphNames),requiredSubgraphs:[...d.requiredSubgraphNames]});if(i.length>0){this.errors.push((0,Pe.invalidRequiredInputValueError)(Oe.INPUT_OBJECT,n,i,!1));break}if(!this.validateOneOfDirective({data:r,inputValueNodes:a,requiredFieldNames:u}))break;if(r.node.fields=a,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,_e.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r);break}if(o.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,"Input field"));break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r),fields:o}));break}case Re.Kind.INTERFACE_TYPE_DEFINITION:case Re.Kind.OBJECT_TYPE_DEFINITION:{let i=[],a=[],o=new Map,u=(0,_e.newInvalidFieldNames)(),l=r.kind===Re.Kind.OBJECT_TYPE_DEFINITION,d=this.authorizationDataByParentTypeName.get(n);(0,_e.propagateAuthDirectives)(r,d);for(let[E,I]of r.fieldDataByName){(0,_e.propagateFieldAuthDirectives)(I,d);let v=this.getValidFieldArgumentNodes(I);l&&(0,_e.validateExternalAndShareable)(I,u),this.validateSemanticNonNull(I),i.push(this.getNodeWithPersistedDirectivesByFieldData(I,v)),!(0,_e.isNodeDataInaccessible)(I)&&(a.push((0,_e.getClientSchemaFieldNodeByFieldData)(I)),o.set(E,this.fieldDataToGraphFieldData(I)))}if(l&&(u.byShareable.size>0&&this.errors.push((0,Pe.invalidFieldShareabilityError)(r,u.byShareable)),u.subgraphNamesByExternalFieldName.size>0&&this.errors.push((0,Pe.allExternalFieldInstancesError)(n,u.subgraphNamesByExternalFieldName))),r.node.fields=i,this.internalGraph.initializeNode(n,o),r.implementedInterfaceTypeNames.size>0){t.push({data:r,clientSchemaFieldNodes:a});break}this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r));let p=(0,Sfe.isNodeQuery)(n);if((0,_e.isNodeDataInaccessible)(r)){if(p){this.errors.push(Pe.inaccessibleQueryRootTypeError);break}this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){let E=p?(0,Pe.noQueryRootTypeError)(!1):(0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,Oe.FIELD);this.errors.push(E);break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r),fields:a}));break}case Re.Kind.SCALAR_TYPE_DEFINITION:{if(Qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;if((0,_e.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n)),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,_e.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r)}));break}case Re.Kind.UNION_TYPE_DEFINITION:{if(r.node.types=(0,Gr.mapToArrayOfValues)(r.memberByMemberTypeName),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,_e.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}let i=this.getClientSchemaUnionMembers(r);if(i.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)(Oe.UNION,n,"union member type"));break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r),types:i}));break}}}pushNamedTypeAuthDataToFields(){var t;for(let[n,r]of this.authorizationDataByParentTypeName){if(!r.requiresAuthentication&&r.requiredScopes.length<1)continue;let i=this.fieldCoordsByNamedTypeName.get(n);if(i)for(let a of i){let o=a.split(Oe.LITERAL_PERIOD);switch(o.length){case 2:{let u=(0,Ne.getValueOrDefault)(this.authorizationDataByParentTypeName,o[0],()=>(0,Gr.newAuthorizationData)(o[0])),l=(0,Ne.getValueOrDefault)(u.fieldAuthDataByFieldName,o[1],()=>(0,Gr.newFieldAuthorizationData)(o[1]));(t=l.inheritedData).requiresAuthentication||(t.requiresAuthentication=r.requiresAuthentication),l.inheritedData.requiredScopes.length*r.requiredScopes.length>Ap.MAX_OR_SCOPES?this.invalidORScopesCoords.add(a):(l.inheritedData.requiredScopesByOR=(0,Gr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopesByOR,r.requiredScopesByOR),l.inheritedData.requiredScopes=(0,Gr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopes,r.requiredScopes));break}default:break}}}}federateSubgraphData(){this.federateInternalSubgraphData(),this.handleEntityInterfaces(),this.generateTagData(),El(this,uh,DV).call(this),this.pushNamedTypeAuthDataToFields()}validateInterfaceImplementationsAndPushToDocumentDefinitions(t){for(let{data:n,clientSchemaFieldNodes:r}of t){if(n.node.interfaces=this.getValidImplementedInterfaces(n),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(n)),(0,_e.isNodeDataInaccessible)(n)){this.validateReferencesOfInaccessibleType(n),this.internalGraph.setNodeInaccessible(n.name);continue}let i=[];for(let a of n.implementedInterfaceTypeNames)this.inaccessibleCoords.has(a)||i.push((0,$r.stringToNamedTypeNode)(a));this.clientDefinitions.push($(k({},n.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(n),fields:r,interfaces:i}))}}validatePathSegmentInaccessibility(t){if(!t)return!1;let r=t.split(Oe.LEFT_PARENTHESIS)[0].split(Oe.LITERAL_PERIOD),i=r[0];for(let a=0;a0&&this.errors.push((0,Pe.invalidReferencesOfInaccessibleTypeError)((0,Ne.kindToNodeType)(t.kind),t.name,r))}validateQueryRootType(){let t=this.parentDefinitionDataByTypeName.get(Oe.QUERY);if(!t||t.kind!==Re.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size<1){this.errors.push((0,Pe.noQueryRootTypeError)());return}for(let n of t.fieldDataByName.values())if(!(0,_e.isNodeDataInaccessible)(n))return;this.errors.push((0,Pe.noQueryRootTypeError)())}validateSubscriptionFieldConditionFieldPath(t,n,r,i,a){let o=t.split(Oe.LITERAL_PERIOD);if(o.length<1)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathErrorMessage)(r,t)),[];let u=n;if(this.inaccessibleCoords.has(u.renamedTypeName))return a.push((0,Pe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,o[0],u.renamedTypeName)),[];let l="";for(let d=0;d0?`.${p}`:p,u.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathParentErrorMessage)(r,t,l)),[];let E=u.fieldDataByName.get(p);if(!E)return a.push((0,Pe.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,p,u.renamedTypeName)),[];let I=`${u.renamedTypeName}.${p}`;if(!E.subgraphNames.has(i))return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I,i)),[];if(this.inaccessibleCoords.has(I))return a.push((0,Pe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I)),[];if(Ap.BASE_SCALARS.has(E.namedTypeName)){u={kind:Re.Kind.SCALAR_TYPE_DEFINITION,name:E.namedTypeName};continue}u=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,E.namedTypeName,Oe.PARENT_DEFINITION_DATA)}return(0,_e.isLeafKind)(u.kind)?o:(a.push((0,Pe.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage)(r,t,o[o.length-1],(0,Ne.kindToNodeType)(u.kind),u.name)),[])}validateSubscriptionFieldCondition(t,n,r,i,a,o,u){if(i>sh.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return u.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;let l=!1,d=new Set([Oe.FIELD_PATH,Oe.VALUES]),p=new Set,E=new Set,I=[];for(let v of t.fields){let A=v.name.value,U=a+`.${A}`;switch(A){case Oe.FIELD_PATH:{if(d.has(Oe.FIELD_PATH))d.delete(Oe.FIELD_PATH);else{l=!0,p.add(Oe.FIELD_PATH);break}if(v.value.kind!==Re.Kind.STRING){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(U,Oe.STRING,(0,Ne.kindToNodeType)(v.value.kind))),l=!0;break}let j=this.validateSubscriptionFieldConditionFieldPath(v.value.value,r,U,o,I);if(j.length<1){l=!0;break}n.fieldPath=j;break}case Oe.VALUES:{if(d.has(Oe.VALUES))d.delete(Oe.VALUES);else{l=!0,p.add(Oe.VALUES);break}let j=v.value.kind;if(j==Re.Kind.NULL||j==Re.Kind.OBJECT){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(U,Oe.LIST,(0,Ne.kindToNodeType)(v.value.kind))),l=!0;break}if(j!==Re.Kind.LIST){n.values=[(0,_e.getSubscriptionFilterValue)(v.value)];break}let Q=new Set,ee=[];for(let ne=0;ne0){I.push((0,Pe.subscriptionFieldConditionInvalidValuesArrayErrorMessage)(U,ee));continue}if(Q.size<1){l=!0,I.push((0,Pe.subscriptionFieldConditionEmptyValuesArrayErrorMessage)(U));continue}n.values=[...Q];break}default:l=!0,E.add(A)}}return l?(u.push((0,Pe.subscriptionFieldConditionInvalidInputFieldErrorMessage)(a,[...d],[...p],[...E],I)),!1):!0}validateSubscriptionFilterCondition(t,n,r,i,a,o,u){if(i>sh.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return u.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;if(i+=1,t.fields.length!==1)return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage)(a,t.fields.length)),!1;let l=t.fields[0],d=l.name.value;if(!Qc.SUBSCRIPTION_FILTER_INPUT_NAMES.has(d))return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldErrorMessage)(a,d)),!1;let p=a+`.${d}`;switch(l.value.kind){case Re.Kind.OBJECT:switch(d){case Oe.IN_UPPER:return n.in={fieldPath:[],values:[]},this.validateSubscriptionFieldCondition(l.value,n.in,r,i,a+".IN",o,u);case Oe.NOT_UPPER:return n.not={},this.validateSubscriptionFilterCondition(l.value,n.not,r,i,a+".NOT",o,u);default:return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,Oe.LIST,Oe.OBJECT)),!1}case Re.Kind.LIST:{let E=[];switch(d){case Oe.AND_UPPER:{n.and=E;break}case Oe.OR_UPPER:{n.or=E;break}default:return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,Oe.OBJECT,Oe.LIST)),!1}let I=l.value.values.length;if(I<1||I>5)return u.push((0,Pe.subscriptionFilterArrayConditionInvalidLengthErrorMessage)(p,I)),!1;let v=!0,A=[];for(let U=0;U0?(u.push((0,Pe.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage)(p,A)),!1):v}default:{let E=Qc.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES.has(d)?Oe.LIST:Oe.OBJECT;return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,E,(0,Ne.kindToNodeType)(l.value.kind))),!1}}}validateSubscriptionFilterAndGenerateConfiguration(t,n,r,i,a,o){if(!t.arguments||t.arguments.length!==1)return;let u=t.arguments[0];if(u.value.kind!==Re.Kind.OBJECT){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,[(0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(Oe.CONDITION,Oe.OBJECT,(0,Ne.kindToNodeType)(u.value.kind))]));return}let l={},d=[];if(!this.validateSubscriptionFilterCondition(u.value,l,n,0,Oe.CONDITION,o,d)){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,d)),this.isMaxDepth=!1;return}(0,Ne.getValueOrDefault)(this.fieldConfigurationByFieldCoords,r,()=>({argumentNames:[],fieldName:i,typeName:a})).subscriptionFilterCondition=l}validateSubscriptionFiltersAndGenerateConfiguration(){for(let[t,n]of this.subscriptionFilterDataByFieldPath){if(this.inaccessibleCoords.has(t))continue;let r=this.parentDefinitionDataByTypeName.get(n.fieldData.namedTypeName);if(!r){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(t,[(0,Pe.subscriptionFilterNamedTypeErrorMessage)(n.fieldData.namedTypeName)]));continue}(0,_e.isNodeDataInaccessible)(r)||r.kind===Re.Kind.OBJECT_TYPE_DEFINITION&&this.validateSubscriptionFilterAndGenerateConfiguration(n.directive,r,t,n.fieldData.name,n.fieldData.renamedParentTypeName,n.directiveSubgraphName)}}buildFederationResult(){this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration(),this.invalidORScopesCoords.size>0&&this.errors.push((0,Pe.orScopesLimitError)(Ap.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let a of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,_e.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,a,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let t=[];this.pushParentDefinitionDataToDocumentDefinitions(t),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(t),this.validateQueryRootType();for(let a of this.inaccessibleRequiredInputValueErrorByCoords.values())this.errors.push(a);if(this.errors.length>0)return{errors:this.errors,success:!1,warnings:this.warnings};if(!this.disableResolvabilityValidation&&this.internalSubgraphBySubgraphName.size>1){let a=this.internalGraph.validate();if(!a.success)return{errors:a.errors,success:!1,warnings:this.warnings}}let n={kind:Re.Kind.DOCUMENT,definitions:this.routerDefinitions},r=(0,Re.buildASTSchema)({kind:Re.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),i=new Map;for(let{configurationDataByTypeName:a,directiveDefinitionByName:o,isVersionTwo:u,name:l,parentDefinitionDataByTypeName:d,schema:p,schemaNode:E}of this.internalSubgraphBySubgraphName.values())i.set(l,{configurationDataByTypeName:a,directiveDefinitionByName:o,isVersionTwo:u,parentDefinitionDataByTypeName:d,schema:p,schemaNode:E});for(let a of this.authorizationDataByParentTypeName.values())(0,Gr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,a);return k({directiveDefinitionByName:this.directiveDefinitionByName,fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),federatedGraphAST:n,federatedGraphSchema:(0,Re.buildASTSchema)(n,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:r,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,subgraphConfigBySubgraphName:i,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}getClientSchemaObjectBoolean(){return this.inaccessibleCoords.size<1&&this.tagNamesByCoords.size<1?{}:{shouldIncludeClientSchema:!0}}handleChildTagExclusions(t,n,r,i){let a=n.size;for(let[o,u]of r){let l=(0,Ne.getOrThrowError)(n,o,`${t.name}.childDataByChildName`);if((0,_e.isNodeDataInaccessible)(l)){a-=1;continue}i.isDisjointFrom(u.tagNames)||((0,Ne.getValueOrDefault)(l.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}handleChildTagInclusions(t,n,r,i){let a=n.size;for(let[o,u]of n){if((0,_e.isNodeDataInaccessible)(u)){a-=1;continue}let l=r.get(o);(!l||i.isDisjointFrom(l.tagNames))&&((0,Ne.getValueOrDefault)(u.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}buildFederationContractResult(t){if(this.isVersionTwo||this.routerDefinitions.push(Uu.INACCESSIBLE_DEFINITION),t.tagNamesToExclude.size>0)for(let[o,u]of this.parentTagDataByTypeName){let l=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,o,Oe.PARENT_DEFINITION_DATA);if(!(0,_e.isNodeDataInaccessible)(l)){if(!t.tagNamesToExclude.isDisjointFrom(u.tagNames)){l.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(!(u.childTagDataByChildName.size<1))switch(l.kind){case Re.Kind.SCALAR_TYPE_DEFINITION:case Re.Kind.UNION_TYPE_DEFINITION:break;case Re.Kind.ENUM_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.enumValueDataByName,u.childTagDataByChildName,t.tagNamesToExclude);break}case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.inputValueDataByName,u.childTagDataByChildName,t.tagNamesToExclude);break}default:{let d=l.fieldDataByName.size;for(let[p,E]of u.childTagDataByChildName){let I=(0,Ne.getOrThrowError)(l.fieldDataByName,p,`${o}.fieldDataByFieldName`);if((0,_e.isNodeDataInaccessible)(I)){d-=1;continue}if(!t.tagNamesToExclude.isDisjointFrom(E.tagNames)){(0,Ne.getValueOrDefault)(I.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(I.federatedCoords),d-=1;continue}for(let[v,A]of E.tagNamesByArgumentName){let U=(0,Ne.getOrThrowError)(I.argumentDataByName,v,`${p}.argumentDataByArgumentName`);(0,_e.isNodeDataInaccessible)(U)||t.tagNamesToExclude.isDisjointFrom(A)||((0,Ne.getValueOrDefault)(U.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(U.federatedCoords))}}d<1&&(l.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}}else if(t.tagNamesToInclude.size>0)for(let[o,u]of this.parentDefinitionDataByTypeName){if((0,_e.isNodeDataInaccessible)(u))continue;let l=this.parentTagDataByTypeName.get(o);if(!l){u.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(t.tagNamesToInclude.isDisjointFrom(l.tagNames)){if(l.childTagDataByChildName.size<1){u.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}switch(u.kind){case Re.Kind.SCALAR_TYPE_DEFINITION:case Re.Kind.UNION_TYPE_DEFINITION:continue;case Re.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagInclusions(u,u.enumValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagInclusions(u,u.inputValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;default:let d=u.fieldDataByName.size;for(let[p,E]of u.fieldDataByName){if((0,_e.isNodeDataInaccessible)(E)){d-=1;continue}let I=l.childTagDataByChildName.get(p);(!I||t.tagNamesToInclude.isDisjointFrom(I.tagNames))&&((0,Ne.getValueOrDefault)(E.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(E.federatedCoords),d-=1)}d<1&&(u.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration();for(let o of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,_e.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,o,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let n=[];if(this.pushParentDefinitionDataToDocumentDefinitions(n),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(n),this.validateQueryRootType(),this.errors.length>0)return{errors:this.errors,success:!1,warnings:this.warnings};let r={kind:Re.Kind.DOCUMENT,definitions:this.routerDefinitions},i=(0,Re.buildASTSchema)({kind:Re.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),a=new Map;for(let{configurationDataByTypeName:o,directiveDefinitionByName:u,isVersionTwo:l,name:d,parentDefinitionDataByTypeName:p,schema:E,schemaNode:I}of this.internalSubgraphBySubgraphName.values())a.set(d,{configurationDataByTypeName:o,directiveDefinitionByName:u,isVersionTwo:l,parentDefinitionDataByTypeName:p,schema:E,schemaNode:I});for(let o of this.authorizationDataByParentTypeName.values())(0,Gr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,o);return k({directiveDefinitionByName:this.directiveDefinitionByName,fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),federatedGraphAST:r,federatedGraphSchema:(0,Re.buildASTSchema)(r,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:i,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,subgraphConfigBySubgraphName:a,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}federateSubgraphsInternal(){return this.federateSubgraphData(),this.buildFederationResult()}};uh=new WeakSet,DV=function(){var r;let t=new Set,n=new Set;for(let i of this.referencedPersistedDirectiveNames){let a=Ap.DIRECTIVE_DEFINITION_BY_NAME.get(i);if(!a)continue;let o=(r=Qc.DEPENDENCIES_BY_DIRECTIVE_NAME.get(i))!=null?r:[];this.directiveDefinitionByName.set(i,a),Qc.CLIENT_PERSISTED_DIRECTIVE_NAMES.has(i)&&(this.clientDefinitions.push(a),(0,Ne.addIterableToSet)({source:o,target:t})),this.routerDefinitions.push(a),(0,Ne.addIterableToSet)({source:o,target:n})}this.clientDefinitions.push(...t),this.routerDefinitions.push(...n)};Yc.FederationFactory=oh;function mb({disableResolvabilityValidation:e,subgraphs:t}){if(t.length<1)return{errors:[Pe.minimumSubgraphRequirementError],success:!1,warnings:[]};let n=(0,Ofe.batchNormalize)(t);if(!n.success)return{errors:n.errors,success:!1,warnings:n.warnings};let r=new Map,i=new Map;for(let[u,l]of n.internalSubgraphBySubgraphName)for(let[d,p]of l.entityInterfaces){let E=r.get(d);if(!E){r.set(d,(0,Gr.newEntityInterfaceFederationData)(p,u));continue}(0,Gr.upsertEntityInterfaceFederationData)(E,p,u)}let a=new Array,o=new Map;for(let[u,l]of r){let d=l.concreteTypeNames.size;for(let[p,E]of l.subgraphDataByTypeName){let I=(0,Ne.getValueOrDefault)(o,p,()=>new Set);if((0,Ne.addIterableToSet)({source:E.concreteTypeNames,target:I}),!E.isInterfaceObject){E.resolvable&&E.concreteTypeNames.size!==d&&(0,Ne.getValueOrDefault)(i,u,()=>new Array).push({subgraphName:p,definedConcreteTypeNames:new Set(E.concreteTypeNames),requiredConcreteTypeNames:new Set(l.concreteTypeNames)});continue}(0,Ne.addIterableToSet)({source:l.concreteTypeNames,target:I});let{parentDefinitionDataByTypeName:v}=(0,Ne.getOrThrowError)(n.internalSubgraphBySubgraphName,p,"internalSubgraphBySubgraphName"),A=[];for(let U of l.concreteTypeNames)v.has(U)&&A.push(U);A.length>0&&a.push((0,Pe.invalidInterfaceObjectImplementationDefinitionsError)(u,p,A))}}for(let[u,l]of i){let d=new Array;for(let p of l){let E=o.get(p.subgraphName);if(!E){d.push(p);continue}let I=p.requiredConcreteTypeNames.intersection(E);p.requiredConcreteTypeNames.size!==I.size&&(p.definedConcreteTypeNames=I,d.push(p))}if(d.length>0){i.set(u,d);continue}i.delete(u)}return i.size>0&&a.push((0,Pe.undefinedEntityInterfaceImplementationsError)(i,r)),a.length>0?{errors:a,success:!1,warnings:n.warnings}:{federationFactory:new oh({authorizationDataByParentTypeName:n.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:n.concreteTypeNamesByAbstractTypeName,disableResolvabilityValidation:e,entityDataByTypeName:n.entityDataByTypeName,entityInterfaceFederationDataByTypeName:r,fieldCoordsByNamedTypeName:n.fieldCoordsByNamedTypeName,internalSubgraphBySubgraphName:n.internalSubgraphBySubgraphName,internalGraph:n.internalGraph,warnings:n.warnings}),success:!0,warnings:n.warnings}}function Afe({disableResolvabilityValidation:e,subgraphs:t}){let n=mb({subgraphs:t,disableResolvabilityValidation:e});return n.success?n.federationFactory.federateSubgraphsInternal():{errors:n.errors,success:!1,warnings:n.warnings}}function Rfe({subgraphs:e,tagOptionsByContractName:t,disableResolvabilityValidation:n}){let r=mb({subgraphs:e,disableResolvabilityValidation:n});if(!r.success)return{errors:r.errors,success:!1,warnings:r.warnings};r.federationFactory.federateSubgraphData();let i=[(0,SV.cloneDeep)(r.federationFactory)],a=r.federationFactory.buildFederationResult();if(!a.success)return{errors:a.errors,success:!1,warnings:a.warnings};let o=t.size-1,u=new Map,l=0;for(let[d,p]of t){l!==o&&i.push((0,SV.cloneDeep)(i[l]));let E=i[l].buildFederationContractResult(p);u.set(d,E),l++}return $(k({},a),{federationResultByContractName:u})}function Pfe({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n}){let r=mb({subgraphs:n,disableResolvabilityValidation:t});return r.success?(r.federationFactory.federateSubgraphData(),r.federationFactory.buildFederationContractResult(e)):{errors:r.errors,success:!1,warnings:r.warnings}}});var ch=w(xs=>{"use strict";m();T();N();Object.defineProperty(xs,"__esModule",{value:!0});xs.LATEST_ROUTER_COMPATIBILITY_VERSION=xs.ROUTER_COMPATIBILITY_VERSIONS=xs.ROUTER_COMPATIBILITY_VERSION_ONE=void 0;xs.ROUTER_COMPATIBILITY_VERSION_ONE="1";xs.ROUTER_COMPATIBILITY_VERSIONS=new Set([xs.ROUTER_COMPATIBILITY_VERSION_ONE]);xs.LATEST_ROUTER_COMPATIBILITY_VERSION="1"});var AV=w(Rp=>{"use strict";m();T();N();Object.defineProperty(Rp,"__esModule",{value:!0});Rp.federateSubgraphs=Ffe;Rp.federateSubgraphsWithContracts=wfe;Rp.federateSubgraphsContract=Lfe;var Nb=bV(),Tb=ch();function Ffe({disableResolvabilityValidation:e,subgraphs:t,version:n=Tb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(n){default:return(0,Nb.federateSubgraphs)({disableResolvabilityValidation:e,subgraphs:t})}}function wfe({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n,version:r=Tb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,Nb.federateSubgraphsWithContracts)({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n})}}function Lfe({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n,version:r=Tb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,Nb.federateSubgraphsContract)({disableResolvabilityValidation:t,subgraphs:n,contractTagOptions:e})}}});var PV=w(RV=>{"use strict";m();T();N();Object.defineProperty(RV,"__esModule",{value:!0})});var FV=w(Pp=>{"use strict";m();T();N();Object.defineProperty(Pp,"__esModule",{value:!0});Pp.normalizeSubgraphFromString=Cfe;Pp.normalizeSubgraph=Bfe;Pp.batchNormalize=Ufe;var Eb=lb(),hb=ch();function Cfe(e,t=!0,n=hb.ROUTER_COMPATIBILITY_VERSION_ONE){switch(n){default:return(0,Eb.normalizeSubgraphFromString)(e,t)}}function Bfe(e,t,n,r=hb.ROUTER_COMPATIBILITY_VERSION_ONE){switch(r){default:return(0,Eb.normalizeSubgraph)(e,t,n)}}function Ufe(e,t=hb.ROUTER_COMPATIBILITY_VERSION_ONE){switch(t){default:return(0,Eb.batchNormalize)(e)}}});var LV=w(wV=>{"use strict";m();T();N();Object.defineProperty(wV,"__esModule",{value:!0})});var BV=w(CV=>{"use strict";m();T();N();Object.defineProperty(CV,"__esModule",{value:!0})});var kV=w(UV=>{"use strict";m();T();N();Object.defineProperty(UV,"__esModule",{value:!0})});var xV=w(MV=>{"use strict";m();T();N();Object.defineProperty(MV,"__esModule",{value:!0})});var VV=w(qV=>{"use strict";m();T();N();Object.defineProperty(qV,"__esModule",{value:!0})});var KV=w(jV=>{"use strict";m();T();N();Object.defineProperty(jV,"__esModule",{value:!0})});var $V=w(lh=>{"use strict";m();T();N();Object.defineProperty(lh,"__esModule",{value:!0});lh.COMPOSITION_VERSION=void 0;lh.COMPOSITION_VERSION="{{$COMPOSITION__VERSION}}"});var QV=w(GV=>{"use strict";m();T();N();Object.defineProperty(GV,"__esModule",{value:!0})});var JV=w(YV=>{"use strict";m();T();N();Object.defineProperty(YV,"__esModule",{value:!0})});var zV=w(HV=>{"use strict";m();T();N();Object.defineProperty(HV,"__esModule",{value:!0})});var XV=w(WV=>{"use strict";m();T();N();Object.defineProperty(WV,"__esModule",{value:!0})});var dh=w(Xe=>{"use strict";m();T();N();var kfe=Xe&&Xe.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),lt=Xe&&Xe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&kfe(t,e,n)};Object.defineProperty(Xe,"__esModule",{value:!0});lt(Fr(),Xe);lt(Vv(),Xe);lt($i(),Xe);lt(ex(),Xe);lt(AV(),Xe);lt(PV(),Xe);lt(FV(),Xe);lt(LV(),Xe);lt(sb(),Xe);lt(HD(),Xe);lt(HE(),Xe);lt(BV(),Xe);lt(kV(),Xe);lt(eb(),Xe);lt(ch(),Xe);lt(xV(),Xe);lt(ob(),Xe);lt(Su(),Xe);lt(Gf(),Xe);lt($l(),Xe);lt(VV(),Xe);lt(KV(),Xe);lt($V(),Xe);lt(QV(),Xe);lt(zn(),Xe);lt(JV(),Xe);lt(wr(),Xe);lt(qD(),Xe);lt(Du(),Xe);lt(Qf(),Xe);lt(yE(),Xe);lt(IE(),Xe);lt(dd(),Xe);lt(hT(),Xe);lt(yT(),Xe);lt(pb(),Xe);lt(zV(),Xe);lt(BD(),Xe);lt(Ip(),Xe);lt(XV(),Xe);lt($D(),Xe);lt(ih(),Xe);lt(MD(),Xe);lt(yp(),Xe);lt(gp(),Xe)});var Lpe={};$m(Lpe,{buildRouterConfiguration:()=>wpe,federateSubgraphs:()=>Fpe});m();T();N();var tl=Ni(dh());m();T();N();m();T();N();function yb(e){if(!e)return e;if(!URL.canParse(e))throw new Error("Invalid URL");let t=e.indexOf("?"),n=e.indexOf("#"),r=e;return t>0?r=r.slice(0,n>0?Math.min(t,n):t):n>0&&(r=r.slice(0,n)),r}m();T();N();m();T();N();var ZV={};m();T();N();function ej(e){return e!=null}m();T();N();m();T();N();var ph=Ni(Ie(),1);m();T();N();m();T();N();function ku(e){return fh(e,[])}function fh(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Mfe(e,t);default:return String(e)}}function tj(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; - ${e.stack}`}function Mfe(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?tj(e)+` -`+nj(e.errors,t):tj(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(xfe(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:fh(r,n)}else if(Array.isArray(e))return nj(e,n);return qfe(e,n)}function xfe(e){return typeof e.toJSON=="function"}function qfe(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>3?"["+Vfe(e)+"]":"{ "+n.map(([i,a])=>i+": "+fh(a,t)).join(", ")+" }"}function nj(e,t){if(e.length===0)return"[]";if(t.length>3)return"[Array]";let n=e.length,r=[];for(let i=0;ijfe.includes(t))}function yd(e,t){t!=null&&t.originalError&&!(t.originalError instanceof Error)&&Kfe(t.originalError)&&(t.originalError=yd(t.originalError.message,t.originalError));let n=Fp.GraphQLError,r=Fp.versionInfo.major>=16?new n(e,t):new n(e,t==null?void 0:t.nodes,t==null?void 0:t.source,t==null?void 0:t.positions,t==null?void 0:t.path,t==null?void 0:t.originalError,t==null?void 0:t.extensions);return t!=null&&t.coordinate&&r.coordinate==null&&Object.defineProperties(r,{coordinate:{value:t.coordinate,enumerable:!0,configurable:!0}}),r}m();T();N();function rj(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function ij(e){return typeof e=="object"&&e!==null}function aj(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function sj(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((u,l)=>$(k({},u),{[l.name.value]:l}),{});for(let{name:u,type:l,defaultValue:d}of e.args){let p=a[u];if(!p){if(d!==void 0)r[u]=d;else if((0,Fa.isNonNullType)(l))throw yd(`Argument "${u}" of required type "${ku(l)}" was not provided.`,{nodes:[t]});continue}let E=p.value,I=E.kind===Fa.Kind.NULL;if(E.kind===Fa.Kind.VARIABLE){let A=E.name.value;if(n==null||!aj(n,A)){if(d!==void 0)r[u]=d;else if((0,Fa.isNonNullType)(l))throw yd(`Argument "${u}" of required type "${ku(l)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:[E]});continue}I=n[A]==null}if(I&&(0,Fa.isNonNullType)(l))throw yd(`Argument "${u}" of non-null type "${ku(l)}" must not be null.`,{nodes:[E]});let v=(0,Fa.valueFromAST)(E,l,n);if(v===void 0)throw yd(`Argument "${u}" has invalid value ${(0,Fa.print)(E)}.`,{nodes:[E]});r[u]=v}return r}m();T();N();function Id(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let a=e(r);return t.set(r,a),a}return i}}function oj(e,t,n=["directives"]){var o;let r={};if(e.extensions){let u=e.extensions;for(let l of n)u=u==null?void 0:u[l];if(u!=null)for(let l in u){let d=u[l],p=l;if(Array.isArray(d))for(let E of d){let I=r[p];I||(I=[],r[p]=I),I.push(E)}else{let E=r[p];E||(E=[],r[p]=E),E.push(d)}}}let i=Id(u=>JSON.stringify(u)),a=[];e.astNode&&a.push(e.astNode),e.extensionASTNodes&&a.push(...e.extensionASTNodes);for(let u of a)if((o=u.directives)!=null&&o.length)for(let l of u.directives){let d=l.name.value,p=r[d];p||(p=[],r[d]=p);let E=t==null?void 0:t.getDirective(d),I={};if(E&&(I=sj(E,l)),l.arguments)for(let v of l.arguments){let A=v.name.value;if(I[A]==null){let U=E==null?void 0:E.args.find(j=>j.name===A);U&&(I[A]=(0,ph.valueFromAST)(v.value,U.type))}I[A]==null&&(I[A]=(0,ph.valueFromASTUntyped)(v.value))}if(a.length>0&&p.length>0){let v=i(I);if(p.some(A=>i(A)===v))continue}p.push(I)}return r}function Ib(e,t=["directives"]){let n=oj(e,void 0,t);return Object.entries(n).map(([r,i])=>i==null?void 0:i.map(a=>({name:r,args:a}))).flat(1/0).filter(Boolean)}m();T();N();var Je=Ni(Ie(),1);m();T();N();var cs=Ni(Ie(),1);function ls(e){if((0,cs.isNonNullType)(e)){let t=ls(e.ofType);if(t.kind===cs.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${ku(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:cs.Kind.NON_NULL_TYPE,type:t}}else if((0,cs.isListType)(e))return{kind:cs.Kind.LIST_TYPE,type:ls(e.ofType)};return{kind:cs.Kind.NAMED_TYPE,name:{kind:cs.Kind.NAME,value:e.name}}}m();T();N();var dr=Ni(Ie(),1);m();T();N();var wa=Ni(Ie(),1);function Jc(e){if(e===null)return{kind:wa.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=Jc(n);r!=null&&t.push(r)}return{kind:wa.Kind.LIST,values:t}}if(typeof e=="object"){if(e!=null&&e.toJSON)return Jc(e.toJSON());let t=[];for(let n in e){let r=e[n],i=Jc(r);i&&t.push({kind:wa.Kind.OBJECT_FIELD,name:{kind:wa.Kind.NAME,value:n},value:i})}return{kind:wa.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:wa.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:wa.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return $fe.test(t)?{kind:wa.Kind.INT,value:t}:{kind:wa.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:wa.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var $fe=/^-?(?:0|[1-9][0-9]*)$/;function Mu(e,t){if((0,dr.isNonNullType)(t)){let n=Mu(e,t.ofType);return(n==null?void 0:n.kind)===dr.Kind.NULL?null:n}if(e===null)return{kind:dr.Kind.NULL};if(e===void 0)return null;if((0,dr.isListType)(t)){let n=t.ofType;if(rj(e)){let r=[];for(let i of e){let a=Mu(i,n);a!=null&&r.push(a)}return{kind:dr.Kind.LIST,values:r}}return Mu(e,n)}if((0,dr.isInputObjectType)(t)){if(!ij(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Mu(e[r.name],r.type);i&&n.push({kind:dr.Kind.OBJECT_FIELD,name:{kind:dr.Kind.NAME,value:r.name},value:i})}return{kind:dr.Kind.OBJECT,fields:n}}if((0,dr.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,dr.isEnumType)(t)?{kind:dr.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&Gfe.test(n)?{kind:dr.Kind.INT,value:n}:Jc(n)}console.assert(!1,"Unexpected input type: "+ku(t))}var Gfe=/^-?(?:0|[1-9][0-9]*)$/;m();T();N();var uj=Ni(Ie(),1);function vi(e){var t;if((t=e.astNode)!=null&&t.description)return $(k({},e.astNode.description),{block:!0});if(e.description)return{kind:uj.Kind.STRING,value:e.description,block:!0}}m();T();N();var Lqe=Id(function(t){let n=Qfe(t);return new Set([...n].map(r=>r.name))}),Qfe=Id(function(t){let n=gb(t);return new Set(n.values())}),gb=Id(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let a=t.getSubscriptionType();return a&&n.set("subscription",a),n});function Yfe(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=Jfe(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let u of o)(0,Je.isSpecifiedDirective)(u)||a.push(Hfe(u,e,n));for(let u in r){let l=r[u],d=(0,Je.isSpecifiedScalarType)(l),p=(0,Je.isIntrospectionType)(l);if(!(d||p))if((0,Je.isObjectType)(l))a.push(zfe(l,e,n));else if((0,Je.isInterfaceType)(l))a.push(Wfe(l,e,n));else if((0,Je.isUnionType)(l))a.push(Xfe(l,e,n));else if((0,Je.isInputObjectType)(l))a.push(Zfe(l,e,n));else if((0,Je.isEnumType)(l))a.push(epe(l,e,n));else if((0,Je.isScalarType)(l))a.push(tpe(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:Je.Kind.DOCUMENT,definitions:a}}function cj(e,t={}){let n=Yfe(e,t);return(0,Je.print)(n)}function Jfe(e,t){let n=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),r=[];if(e.astNode!=null&&r.push(e.astNode),e.extensionASTNodes!=null)for(let d of e.extensionASTNodes)r.push(d);for(let d of r)if(d.operationTypes)for(let p of d.operationTypes)n.set(p.operation,p);let i=gb(e);for(let[d,p]of n){let E=i.get(d);if(E!=null){let I=ls(E);p!=null?p.type=I:n.set(d,{kind:Je.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(ej),o=ds(e,e,t);if(!a.length&&!o.length)return null;let u={kind:a.length?Je.Kind.SCHEMA_DEFINITION:Je.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=vi(e);return l&&(u.description=l),u}function Hfe(e,t,n){var r,i;return{kind:Je.Kind.DIRECTIVE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>lj(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:Je.Kind.NAME,value:a})))||[]}}function ds(e,t,n){let r=[],i=Ib(e,n),a;i!=null&&(a=fj(t,i));let o=null,u=null,l=null;if(a!=null&&(r=a.filter(d=>Je.specifiedDirectives.every(p=>p.name!==d.name.value)),o=a.find(d=>d.name.value==="deprecated"),u=a.find(d=>d.name.value==="specifiedBy"),l=a.find(d=>d.name.value==="oneOf")),e.deprecationReason!=null&&o==null&&(o=ipe(e.deprecationReason)),e.specifiedByUrl!=null||e.specifiedByURL!=null&&u==null){let p={url:e.specifiedByUrl||e.specifiedByURL};u=wp("specifiedBy",p)}return e.isOneOf&&l==null&&(l=wp("oneOf")),o!=null&&r.push(o),u!=null&&r.push(u),l!=null&&r.push(l),r}function lj(e,t,n){var r;return{kind:Je.Kind.INPUT_VALUE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},type:ls(e.type),defaultValue:e.defaultValue!==void 0&&(r=Mu(e.defaultValue,e.type))!=null?r:void 0,directives:ds(e,t,n)}}function zfe(e,t,n){return{kind:Je.Kind.OBJECT_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>dj(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>ls(r)),directives:ds(e,t,n)}}function Wfe(e,t,n){let r={kind:Je.Kind.INTERFACE_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>dj(i,t,n)),directives:ds(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>ls(i))),r}function Xfe(e,t,n){return{kind:Je.Kind.UNION_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},directives:ds(e,t,n),types:e.getTypes().map(r=>ls(r))}}function Zfe(e,t,n){return{kind:Je.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>npe(r,t,n)),directives:ds(e,t,n)}}function epe(e,t,n){return{kind:Je.Kind.ENUM_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>rpe(r,t,n)),directives:ds(e,t,n)}}function tpe(e,t,n){let r=Ib(e,n),i=fj(t,r),a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(o=>o.name.value==="specifiedBy")){let o={url:a};i.push(wp("specifiedBy",o))}return{kind:Je.Kind.SCALAR_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},directives:i}}function dj(e,t,n){return{kind:Je.Kind.FIELD_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},arguments:e.args.map(r=>lj(r,t,n)),type:ls(e.type),directives:ds(e,t,n)}}function npe(e,t,n){var r;return{kind:Je.Kind.INPUT_VALUE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},type:ls(e.type),directives:ds(e,t,n),defaultValue:(r=Mu(e.defaultValue,e.type))!=null?r:void 0}}function rpe(e,t,n){return{kind:Je.Kind.ENUM_VALUE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},directives:ds(e,t,n)}}function ipe(e){return wp("deprecated",{reason:e},Je.GraphQLDeprecatedDirective)}function wp(e,t,n){let r=[];for(let i in t){let a=t[i],o;if(n!=null){let u=n.args.find(l=>l.name===i);u&&(o=Mu(a,u.type))}o==null&&(o=Jc(a)),o!=null&&r.push({kind:Je.Kind.ARGUMENT,name:{kind:Je.Kind.NAME,value:i},value:o})}return{kind:Je.Kind.DIRECTIVE,name:{kind:Je.Kind.NAME,value:e},arguments:r}}function fj(e,t){let n=[];for(let{name:r,args:i}of t){let a=e==null?void 0:e.getDirective(r);n.push(wp(r,i,a))}return n}var Rd=Ni(dh(),1);m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();function mn(e,t){if(!e)throw new Error(t)}var ape=34028234663852886e22,spe=-34028234663852886e22,ope=4294967295,upe=2147483647,cpe=-2147483648;function gd(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>upe||eope||e<0)throw new Error("invalid uint 32: "+e)}function mh(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>ape||e({no:i.no,name:i.name,localName:e[i.no]})),r)}function vb(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let o of t){let u=Tj(o);a.push(u),r[o.name]=u,i[o.no]=u}return{typeName:e,values:a,findName(o){return r[o]},findNumber(o){return i[o]}}}function Nj(e,t,n){let r={};for(let i of t){let a=Tj(i);r[a.localName]=a.no,r[a.no]=a.localName}return _b(r,e,t,n),r}function Tj(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}m();T();N();m();T();N();var Fe=class{equals(t){return this.getType().runtime.util.equals(this.getType(),this,t)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(t,n){let r=this.getType(),i=r.runtime.bin,a=i.makeReadOptions(n);return i.readMessage(this,a.readerFactory(t),t.byteLength,a),this}fromJson(t,n){let r=this.getType(),i=r.runtime.json,a=i.makeReadOptions(n);return i.readMessage(r,t,a,this),this}fromJsonString(t,n){let r;try{r=JSON.parse(t)}catch(i){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${i instanceof Error?i.message:String(i)}`)}return this.fromJson(r,n)}toBinary(t){let n=this.getType(),r=n.runtime.bin,i=r.makeWriteOptions(t),a=i.writerFactory();return r.writeMessage(this,a,i),a.finish()}toJson(t){let n=this.getType(),r=n.runtime.json,i=r.makeWriteOptions(t);return r.writeMessage(this,i)}toJsonString(t){var n;let r=this.toJson(t);return JSON.stringify(r,null,(n=t==null?void 0:t.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}};function Ej(e,t,n,r){var i;let a=(i=r==null?void 0:r.localName)!==null&&i!==void 0?i:t.substring(t.lastIndexOf(".")+1),o={[a]:function(u){e.util.initFields(this),e.util.initPartial(u,this)}}[a];return Object.setPrototypeOf(o.prototype,new Fe),Object.assign(o,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary(u,l){return new o().fromBinary(u,l)},fromJson(u,l){return new o().fromJson(u,l)},fromJsonString(u,l){return new o().fromJsonString(u,l)},equals(u,l){return e.util.equals(o,u,l)}}),o}m();T();N();m();T();N();m();T();N();m();T();N();function yj(){let e=0,t=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<>4,!(n&128))return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<>>a,u=!(!(o>>>7)&&t==0),l=(u?o|128:o)&255;if(n.push(l),!u)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),!!i){for(let a=3;a<31;a=a+7){let o=t>>>a,u=!!(o>>>7),l=(u?o|128:o)&255;if(n.push(l),!u)return}n.push(t>>>31&1)}}var Nh=4294967296;function Ob(e){let t=e[0]==="-";t&&(e=e.slice(1));let n=1e6,r=0,i=0;function a(o,u){let l=Number(e.slice(o,u));i*=n,r=r*n+l,r>=Nh&&(i=i+(r/Nh|0),r=r%Nh)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?gj(r,i):Db(r,i)}function Ij(e,t){let n=Db(e,t),r=n.hi&2147483648;r&&(n=gj(n.lo,n.hi));let i=Sb(n.lo,n.hi);return r?"-"+i:i}function Sb(e,t){if({lo:e,hi:t}=lpe(e,t),t<=2097151)return String(Nh*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,u=i*2,l=1e7;return a>=l&&(o+=Math.floor(a/l),a%=l),o>=l&&(u+=Math.floor(o/l),o%=l),u.toString()+hj(o)+hj(a)}function lpe(e,t){return{lo:e>>>0,hi:t>>>0}}function Db(e,t){return{lo:e|0,hi:t|0}}function gj(e,t){return t=~t,e?e=~e+1:t+=1,Db(e,t)}var hj=e=>{let t=String(e);return"0000000".slice(t.length)+t};function bb(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function _j(){let e=this.buf[this.pos++],t=e&127;if(!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;e&128&&n<10;n++)e=this.buf[this.pos++];if(e&128)throw new Error("invalid varint");return this.assertBounds(),t>>>0}function dpe(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof S!="object"||typeof S.env!="object"||S.env.BUF_BIGINT_DISABLE!=="1")){let i=BigInt("-9223372036854775808"),a=BigInt("9223372036854775807"),o=BigInt("0"),u=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){let d=typeof l=="bigint"?l:BigInt(l);if(d>a||du||dmn(/^-?[0-9]+$/.test(i),`int64 invalid: ${i}`),r=i=>mn(/^[0-9]+$/.test(i),`uint64 invalid: ${i}`);return{zero:"0",supported:!1,parse(i){return typeof i!="string"&&(i=i.toString()),n(i),i},uParse(i){return typeof i!="string"&&(i=i.toString()),r(i),i},enc(i){return typeof i!="string"&&(i=i.toString()),n(i),Ob(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),r(i),Ob(i)},dec(i,a){return Ij(i,a)},uDec(i,a){return Sb(i,a)}}}var Jn=dpe();m();T();N();var fe;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(fe||(fe={}));var La;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(La||(La={}));function qs(e,t,n){if(t===n)return!0;if(e==fe.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let r=0;r>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(Lp(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return gd(t),bb(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.textEncoder.encode(t);return this.uint32(n.byteLength),this.raw(n)}float(t){mh(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){Lp(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){gd(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return gd(t),t=(t<<1^t>>31)>>>0,bb(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Jn.enc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Jn.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=Jn.enc(t);return Th(n.lo,n.hi,this.buf),this}sint64(t){let n=Jn.enc(t),r=n.hi>>31,i=n.lo<<1^r,a=(n.hi<<1|n.lo>>>31)^r;return Th(i,a,this.buf),this}uint64(t){let n=Jn.uEnc(t);return Th(n.lo,n.hi,this.buf),this}},yh=class{constructor(t,n){this.varint64=yj,this.uint32=_j,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.textDecoder=n!=null?n:new TextDecoder}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t){let n=this.pos;switch(t){case xn.Varint:for(;this.buf[this.pos++]&128;);break;case xn.Bit64:this.pos+=4;case xn.Bit32:this.pos+=4;break;case xn.LengthDelimited:let r=this.uint32();this.pos+=r;break;case xn.StartGroup:let i;for(;(i=this.tag()[1])!==xn.EndGroup;)this.skip(i);break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return Jn.dec(...this.varint64())}uint64(){return Jn.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,Jn.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Jn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Jn.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.textDecoder.decode(this.bytes())}};function vj(e,t,n,r){let i;return{typeName:t,extendee:n,get field(){if(!i){let a=typeof r=="function"?r():r;a.name=t.split(".").pop(),a.jsonName=`[${t}]`,i=e.util.newFieldList([a]).list()[0]}return i},runtime:e}}function Ih(e){let t=e.field.localName,n=Object.create(null);return n[t]=fpe(e),[n,()=>n[t]]}function fpe(e){let t=e.field;if(t.repeated)return[];if(t.default!==void 0)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return Ca(t.T,t.L);case"message":let n=t.T,r=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(r):r;case"map":throw"map fields are not allowed to be extensions"}}function Oj(e,t){if(!t.repeated&&(t.kind=="enum"||t.kind=="scalar")){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(n=>n.no===t.no)}m();T();N();m();T();N();var Vs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),gh=[];for(let e=0;e>4,o=a,i=2;break;case 2:n[r++]=(o&15)<<4|(a&60)>>2,o=a,i=3;break;case 3:n[r++]=(o&3)<<6|a,i=0;break}}if(i==1)throw Error("invalid base64 string.");return n.subarray(0,r)},enc(e){let t="",n=0,r,i=0;for(let a=0;a>2],i=(r&3)<<4,n=1;break;case 1:t+=Vs[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=Vs[i|r>>6],t+=Vs[r&63],n=0;break}return n&&(t+=Vs[i],t+="=",n==1&&(t+="=")),t}};m();T();N();function Sj(e,t,n){bj(t,e);let r=t.runtime.bin.makeReadOptions(n),i=Oj(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,o]=Ih(t);for(let u of i)t.runtime.bin.readField(a,r.readerFactory(u.data),t.field,u.wireType,r);return o()}function Dj(e,t,n,r){bj(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(Rb(e,t)){let d=e.getType().runtime.bin.listUnknownFields(e).filter(p=>p.no!=t.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(let p of d)e.getType().runtime.bin.onUnknownField(e,p.no,p.wireType,p.data)}let o=a.writerFactory(),u=t.field;!u.opt&&!u.repeated&&(u.kind=="enum"||u.kind=="scalar")&&(u=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(u,n,o,a);let l=i.readerFactory(o.finish());for(;l.posr.no==t.field.no)}function bj(e,t){mn(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}m();T();N();function _h(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case"enum":case"scalar":return e.opt||e.req?t[n]!==void 0:e.kind=="enum"?t[n]!==e.T.values[0].no:!Eh(e.T,t[n]);case"message":return t[n]!==void 0;case"map":return Object.keys(t[n]).length>0}}function Pb(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":t[n]={};break;case"enum":t[n]=r?e.T.values[0].no:void 0;break;case"scalar":t[n]=r?Ca(e.T,e.L):void 0;break;case"message":t[n]=void 0;break}}m();T();N();m();T();N();function Ba(e,t){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(Fe.prototype).every(r=>r in e&&typeof e[r]=="function"))return!1;let n=e.getType();return n===null||typeof n!="function"||!("typeName"in n)||typeof n.typeName!="string"?!1:t===void 0?!0:n.typeName==t.typeName}function vh(e,t){return Ba(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}var mVe={"google.protobuf.DoubleValue":fe.DOUBLE,"google.protobuf.FloatValue":fe.FLOAT,"google.protobuf.Int64Value":fe.INT64,"google.protobuf.UInt64Value":fe.UINT64,"google.protobuf.Int32Value":fe.INT32,"google.protobuf.UInt32Value":fe.UINT32,"google.protobuf.BoolValue":fe.BOOL,"google.protobuf.StringValue":fe.STRING,"google.protobuf.BytesValue":fe.BYTES};var Aj={ignoreUnknownFields:!1},Rj={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function ppe(e){return e?Object.assign(Object.assign({},Aj),e):Aj}function mpe(e){return e?Object.assign(Object.assign({},Rj),e):Rj}var Dh=Symbol(),Oh=Symbol();function wj(){return{makeReadOptions:ppe,makeWriteOptions:mpe,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.typeName} from JSON: ${fs(t)}`);r=r!=null?r:new e;let i=new Map,a=n.typeRegistry;for(let[o,u]of Object.entries(t)){let l=e.fields.findJsonName(o);if(l){if(l.oneof){if(u===null&&l.kind=="scalar")continue;let d=i.get(l.oneof);if(d!==void 0)throw new Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${d}", "${o}"`);i.set(l.oneof,o)}Pj(r,u,l,n,e)}else{let d=!1;if(a!=null&&a.findExtension&&o.startsWith("[")&&o.endsWith("]")){let p=a.findExtension(o.substring(1,o.length-1));if(p&&p.extendee.typeName==e.typeName){d=!0;let[E,I]=Ih(p);Pj(E,u,p.field,n,p),Dj(r,p,I(),n)}}if(!d&&!n.ignoreUnknownFields)throw new Error(`cannot decode message ${e.typeName} from JSON: key "${o}" is unknown`)}}return r},writeMessage(e,t){let n=e.getType(),r={},i;try{for(i of n.fields.byNumber()){if(!_h(i,e)){if(i.req)throw"required field not set";if(!t.emitDefaultValues||!Tpe(i))continue}let o=i.oneof?e[i.oneof.localName].value:e[i.localName],u=Fj(i,o,t);u!==void 0&&(r[t.useProtoFieldName?i.name:i.jsonName]=u)}let a=t.typeRegistry;if(a!=null&&a.findExtensionFor)for(let o of n.runtime.bin.listUnknownFields(e)){let u=a.findExtensionFor(n.typeName,o.no);if(u&&Rb(e,u)){let l=Sj(e,u,t),d=Fj(u.field,l,t);d!==void 0&&(r[u.field.jsonName]=d)}}}catch(a){let o=i?`cannot encode field ${n.typeName}.${i.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,u=a instanceof Error?a.message:String(a);throw new Error(o+(u.length>0?`: ${u}`:""))}return r},readScalar(e,t,n){return Cp(e,t,n!=null?n:La.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||Eh(e,t)))return Sh(e,t)},debug:fs}}function fs(e){if(e===null)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function Pj(e,t,n,r,i){let a=n.localName;if(n.repeated){if(mn(n.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(t)}`);let o=e[a];for(let u of t){if(u===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(u)}`);switch(n.kind){case"message":o.push(n.T.fromJson(u,r));break;case"enum":let l=Fb(n.T,u,r.ignoreUnknownFields,!0);l!==Oh&&o.push(l);break;case"scalar":try{o.push(Cp(n.T,u,n.L,!0))}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(u)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}}else if(n.kind=="map"){if(t===null)return;if(typeof t!="object"||Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(t)}`);let o=e[a];for(let[u,l]of Object.entries(t)){if(l===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);let d;try{d=Npe(n.K,u)}catch(p){let E=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${fs(t)}`;throw p instanceof Error&&p.message.length>0&&(E+=`: ${p.message}`),new Error(E)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(l,r);break;case"enum":let p=Fb(n.V.T,l,r.ignoreUnknownFields,!0);p!==Oh&&(o[d]=p);break;case"scalar":try{o[d]=Cp(n.V.T,l,La.BIGINT,!0)}catch(E){let I=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${fs(t)}`;throw E instanceof Error&&E.message.length>0&&(I+=`: ${E.message}`),new Error(I)}break}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a="value"),n.kind){case"message":let o=n.T;if(t===null&&o.typeName!="google.protobuf.Value")return;let u=e[a];Ba(u)?u.fromJson(t,r):(e[a]=u=o.fromJson(t,r),o.fieldWrapper&&!n.oneof&&(e[a]=o.fieldWrapper.unwrapField(u)));break;case"enum":let l=Fb(n.T,t,r.ignoreUnknownFields,!1);switch(l){case Dh:Pb(n,e);break;case Oh:break;default:e[a]=l;break}break;case"scalar":try{let d=Cp(n.T,t,n.L,!1);switch(d){case Dh:Pb(n,e);break;default:e[a]=d;break}}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(t)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}function Npe(e,t){if(e===fe.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return Cp(e,t,La.BIGINT,!0).toString()}function Cp(e,t,n,r){if(t===null)return r?Ca(e,n):Dh;switch(e){case fe.DOUBLE:case fe.FLOAT:if(t==="NaN")return Number.NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(t===""||typeof t=="string"&&t.trim().length!==t.length||typeof t!="string"&&typeof t!="number")break;let i=Number(t);if(Number.isNaN(i)||!Number.isFinite(i))break;return e==fe.FLOAT&&mh(i),i;case fe.INT32:case fe.FIXED32:case fe.SFIXED32:case fe.SINT32:case fe.UINT32:let a;if(typeof t=="number"?a=t:typeof t=="string"&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),a===void 0)break;return e==fe.UINT32||e==fe.FIXED32?Lp(a):gd(a),a;case fe.INT64:case fe.SFIXED64:case fe.SINT64:if(typeof t!="number"&&typeof t!="string")break;let o=Jn.parse(t);return n?o.toString():o;case fe.FIXED64:case fe.UINT64:if(typeof t!="number"&&typeof t!="string")break;let u=Jn.uParse(t);return n?u.toString():u;case fe.BOOL:if(typeof t!="boolean")break;return t;case fe.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch(l){throw new Error("invalid UTF8")}return t;case fe.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return Ab.dec(t)}throw new Error}function Fb(e,t,n,r){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:r?e.values[0].no:Dh;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let i=e.findName(t);if(i!==void 0)return i.no;if(n)return Oh;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${fs(t)}`)}function Tpe(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function Fj(e,t,n){if(e.kind=="map"){mn(typeof t=="object"&&t!=null);let r={},i=Object.entries(t);switch(e.V.kind){case"scalar":for(let[o,u]of i)r[o.toString()]=Sh(e.V.T,u);break;case"message":for(let[o,u]of i)r[o.toString()]=u.toJson(n);break;case"enum":let a=e.V.T;for(let[o,u]of i)r[o.toString()]=wb(a,u,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){mn(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let i=0;i0?r:void 0}switch(e.kind){case"scalar":return Sh(e.T,t);case"enum":return wb(e.T,t,n.enumAsInteger);case"message":return vh(e.T,t).toJson(n)}}function wb(e,t,n){var r;if(mn(typeof t=="number"),e.typeName=="google.protobuf.NullValue")return null;if(n)return t;let i=e.findNumber(t);return(r=i==null?void 0:i.name)!==null&&r!==void 0?r:t}function Sh(e,t){switch(e){case fe.INT32:case fe.SFIXED32:case fe.SINT32:case fe.FIXED32:case fe.UINT32:return mn(typeof t=="number"),t;case fe.FLOAT:case fe.DOUBLE:return mn(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case fe.STRING:return mn(typeof t=="string"),t;case fe.BOOL:return mn(typeof t=="boolean"),t;case fe.UINT64:case fe.FIXED64:case fe.INT64:case fe.SFIXED64:case fe.SINT64:return mn(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case fe.BYTES:return mn(t instanceof Uint8Array),Ab.enc(t)}}m();T();N();var _d=Symbol("@bufbuild/protobuf/unknown-fields"),Lj={readUnknownFields:!0,readerFactory:e=>new yh(e)},Cj={writeUnknownFields:!0,writerFactory:()=>new hh};function Epe(e){return e?Object.assign(Object.assign({},Lj),e):Lj}function hpe(e){return e?Object.assign(Object.assign({},Cj),e):Cj}function Mj(){return{makeReadOptions:Epe,makeWriteOptions:hpe,listUnknownFields(e){var t;return(t=e[_d])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[_d]},writeUnknownFields(e,t){let r=e[_d];if(r)for(let i of r)t.tag(i.no,i.wireType).raw(i.data)},onUnknownField(e,t,n,r){let i=e;Array.isArray(i[_d])||(i[_d]=[]),i[_d].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a=e.getType(),o=i?t.len:t.pos+n,u,l;for(;t.pos0&&(l=Ipe),a){let I=e[o];if(r==xn.LengthDelimited&&u!=fe.STRING&&u!=fe.BYTES){let A=t.uint32()+t.pos;for(;t.posBa(I,E)?I:new E(I));else{let I=o[i];E.fieldWrapper?E.typeName==="google.protobuf.BytesValue"?a[i]=Up(I):a[i]=I:a[i]=Ba(I,E)?I:new E(I)}break}}},equals(e,t,n){return t===n?!0:!t||!n?!1:e.fields.byMember().every(r=>{let i=t[r.localName],a=n[r.localName];if(r.repeated){if(i.length!==a.length)return!1;switch(r.kind){case"message":return i.every((o,u)=>r.T.equals(o,a[u]));case"scalar":return i.every((o,u)=>qs(r.T,o,a[u]));case"enum":return i.every((o,u)=>qs(fe.INT32,o,a[u]))}throw new Error(`repeated cannot contain ${r.kind}`)}switch(r.kind){case"message":return r.T.equals(i,a);case"enum":return qs(fe.INT32,i,a);case"scalar":return qs(r.T,i,a);case"oneof":if(i.case!==a.case)return!1;let o=r.findField(i.case);if(o===void 0)return!0;switch(o.kind){case"message":return o.T.equals(i.value,a.value);case"enum":return qs(fe.INT32,i.value,a.value);case"scalar":return qs(o.T,i.value,a.value)}throw new Error(`oneof cannot contain ${o.kind}`);case"map":let u=Object.keys(i).concat(Object.keys(a));switch(r.V.kind){case"message":let l=r.V.T;return u.every(p=>l.equals(i[p],a[p]));case"enum":return u.every(p=>qs(fe.INT32,i[p],a[p]));case"scalar":let d=r.V.T;return u.every(p=>qs(d,i[p],a[p]))}break}})},clone(e){let t=e.getType(),n=new t,r=n;for(let i of t.fields.byMember()){let a=e[i.localName],o;if(i.repeated)o=a.map(Rh);else if(i.kind=="map"){o=r[i.localName];for(let[u,l]of Object.entries(a))o[u]=Rh(l)}else i.kind=="oneof"?o=i.findField(a.case)?{case:a.case,value:Rh(a.value)}:{case:void 0}:o=Rh(a);r[i.localName]=o}for(let i of t.runtime.bin.listUnknownFields(e))t.runtime.bin.onUnknownField(r,i.no,i.wireType,i.data);return n}}}function Rh(e){if(e===void 0)return e;if(Ba(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function Up(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function Vj(e,t,n){return{syntax:e,json:wj(),bin:Mj(),util:Object.assign(Object.assign({},qj()),{newFieldList:t,initFields:n}),makeMessageType(r,i,a){return Ej(this,r,i,a)},makeEnum:Nj,makeEnumType:vb,getEnumType:mj,makeExtension(r,i,a){return vj(this,r,i,a)}}}m();T();N();var Ph=class{constructor(t,n){this._fields=t,this._normalizer=n}findJsonName(t){if(!this.jsonNames){let n={};for(let r of this.list())n[r.jsonName]=n[r.name]=r;this.jsonNames=n}return this.jsonNames[t]}find(t){if(!this.numbers){let n={};for(let r of this.list())n[r.no]=r;this.numbers=n}return this.numbers[t]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((t,n)=>t.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];let t=this.members,n;for(let r of this.list())r.oneof?r.oneof!==n&&(n=r.oneof,t.push(n)):t.push(r)}return this.members}};m();T();N();m();T();N();m();T();N();function Lb(e,t){let n=$j(e);return t?n:Dpe(Spe(n))}function jj(e){return Lb(e,!1)}var Kj=$j;function $j(e){let t=!1,n=[];for(let r=0;r`${e}$`,Spe=e=>Ope.has(e)?Gj(e):e,Dpe=e=>vpe.has(e)?Gj(e):e;var Fh=class{constructor(t){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=t,this.localName=jj(t)}addField(t){mn(t.oneof===this,`field ${t.name} not one of ${this.name}`),this.fields.push(t)}findField(t){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;nnew Ph(e,t=>Qj(t,!0)),e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName,r=e;if(t.repeated){r[n]=[];continue}switch(t.kind){case"oneof":r[n]={case:void 0};break;case"enum":r[n]=0;break;case"map":r[n]={};break;case"scalar":r[n]=Ca(t.T,t.L);break;case"message":break}}});var vd;(function(e){e[e.OK=0]="OK",e[e.ERR=1]="ERR",e[e.ERR_NOT_FOUND=2]="ERR_NOT_FOUND",e[e.ERR_ALREADY_EXISTS=3]="ERR_ALREADY_EXISTS",e[e.ERR_INVALID_SUBGRAPH_SCHEMA=4]="ERR_INVALID_SUBGRAPH_SCHEMA",e[e.ERR_SUBGRAPH_COMPOSITION_FAILED=5]="ERR_SUBGRAPH_COMPOSITION_FAILED",e[e.ERR_SUBGRAPH_CHECK_FAILED=6]="ERR_SUBGRAPH_CHECK_FAILED",e[e.ERR_INVALID_LABELS=7]="ERR_INVALID_LABELS",e[e.ERR_ANALYTICS_DISABLED=8]="ERR_ANALYTICS_DISABLED",e[e.ERROR_NOT_AUTHENTICATED=9]="ERROR_NOT_AUTHENTICATED",e[e.ERR_OPENAI_DISABLED=10]="ERR_OPENAI_DISABLED",e[e.ERR_FREE_TRIAL_EXPIRED=11]="ERR_FREE_TRIAL_EXPIRED",e[e.ERROR_NOT_AUTHORIZED=12]="ERROR_NOT_AUTHORIZED",e[e.ERR_LIMIT_REACHED=13]="ERR_LIMIT_REACHED",e[e.ERR_DEPLOYMENT_FAILED=14]="ERR_DEPLOYMENT_FAILED",e[e.ERR_INVALID_NAME=15]="ERR_INVALID_NAME",e[e.ERR_UPGRADE_PLAN=16]="ERR_UPGRADE_PLAN",e[e.ERR_BAD_REQUEST=17]="ERR_BAD_REQUEST",e[e.ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL=18]="ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL"})(vd||(vd={}));C.util.setEnumType(vd,"wg.cosmo.common.EnumStatusCode",[{no:0,name:"OK"},{no:1,name:"ERR"},{no:2,name:"ERR_NOT_FOUND"},{no:3,name:"ERR_ALREADY_EXISTS"},{no:4,name:"ERR_INVALID_SUBGRAPH_SCHEMA"},{no:5,name:"ERR_SUBGRAPH_COMPOSITION_FAILED"},{no:6,name:"ERR_SUBGRAPH_CHECK_FAILED"},{no:7,name:"ERR_INVALID_LABELS"},{no:8,name:"ERR_ANALYTICS_DISABLED"},{no:9,name:"ERROR_NOT_AUTHENTICATED"},{no:10,name:"ERR_OPENAI_DISABLED"},{no:11,name:"ERR_FREE_TRIAL_EXPIRED"},{no:12,name:"ERROR_NOT_AUTHORIZED"},{no:13,name:"ERR_LIMIT_REACHED"},{no:14,name:"ERR_DEPLOYMENT_FAILED"},{no:15,name:"ERR_INVALID_NAME"},{no:16,name:"ERR_UPGRADE_PLAN"},{no:17,name:"ERR_BAD_REQUEST"},{no:18,name:"ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL"}]);var js;(function(e){e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS=0]="GRAPHQL_SUBSCRIPTION_PROTOCOL_WS",e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE=1]="GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE",e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST=2]="GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST"})(js||(js={}));C.util.setEnumType(js,"wg.cosmo.common.GraphQLSubscriptionProtocol",[{no:0,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_WS"},{no:1,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE"},{no:2,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST"}]);var Ks;(function(e){e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO=0]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO",e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS=1]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS",e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS=2]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS"})(Ks||(Ks={}));C.util.setEnumType(Ks,"wg.cosmo.common.GraphQLWebsocketSubprotocol",[{no:0,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO"},{no:1,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS"},{no:2,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS"}]);var nK=Ni(Ie(),1);m();T();N();var Cb;(function(e){e[e.RENDER_ARGUMENT_DEFAULT=0]="RENDER_ARGUMENT_DEFAULT",e[e.RENDER_ARGUMENT_AS_GRAPHQL_VALUE=1]="RENDER_ARGUMENT_AS_GRAPHQL_VALUE",e[e.RENDER_ARGUMENT_AS_ARRAY_CSV=2]="RENDER_ARGUMENT_AS_ARRAY_CSV"})(Cb||(Cb={}));C.util.setEnumType(Cb,"wg.cosmo.node.v1.ArgumentRenderConfiguration",[{no:0,name:"RENDER_ARGUMENT_DEFAULT"},{no:1,name:"RENDER_ARGUMENT_AS_GRAPHQL_VALUE"},{no:2,name:"RENDER_ARGUMENT_AS_ARRAY_CSV"}]);var zc;(function(e){e[e.OBJECT_FIELD=0]="OBJECT_FIELD",e[e.FIELD_ARGUMENT=1]="FIELD_ARGUMENT"})(zc||(zc={}));C.util.setEnumType(zc,"wg.cosmo.node.v1.ArgumentSource",[{no:0,name:"OBJECT_FIELD"},{no:1,name:"FIELD_ARGUMENT"}]);var xu;(function(e){e[e.STATIC=0]="STATIC",e[e.GRAPHQL=1]="GRAPHQL",e[e.PUBSUB=2]="PUBSUB"})(xu||(xu={}));C.util.setEnumType(xu,"wg.cosmo.node.v1.DataSourceKind",[{no:0,name:"STATIC"},{no:1,name:"GRAPHQL"},{no:2,name:"PUBSUB"}]);var kp;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.RESOLVE=1]="RESOLVE",e[e.REQUIRES=2]="REQUIRES"})(kp||(kp={}));C.util.setEnumType(kp,"wg.cosmo.node.v1.LookupType",[{no:0,name:"LOOKUP_TYPE_UNSPECIFIED"},{no:1,name:"LOOKUP_TYPE_RESOLVE"},{no:2,name:"LOOKUP_TYPE_REQUIRES"}]);var Mp;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.QUERY=1]="QUERY",e[e.MUTATION=2]="MUTATION",e[e.SUBSCRIPTION=3]="SUBSCRIPTION"})(Mp||(Mp={}));C.util.setEnumType(Mp,"wg.cosmo.node.v1.OperationType",[{no:0,name:"OPERATION_TYPE_UNSPECIFIED"},{no:1,name:"OPERATION_TYPE_QUERY"},{no:2,name:"OPERATION_TYPE_MUTATION"},{no:3,name:"OPERATION_TYPE_SUBSCRIPTION"}]);var eu;(function(e){e[e.PUBLISH=0]="PUBLISH",e[e.REQUEST=1]="REQUEST",e[e.SUBSCRIBE=2]="SUBSCRIBE"})(eu||(eu={}));C.util.setEnumType(eu,"wg.cosmo.node.v1.EventType",[{no:0,name:"PUBLISH"},{no:1,name:"REQUEST"},{no:2,name:"SUBSCRIBE"}]);var qu;(function(e){e[e.STATIC_CONFIGURATION_VARIABLE=0]="STATIC_CONFIGURATION_VARIABLE",e[e.ENV_CONFIGURATION_VARIABLE=1]="ENV_CONFIGURATION_VARIABLE",e[e.PLACEHOLDER_CONFIGURATION_VARIABLE=2]="PLACEHOLDER_CONFIGURATION_VARIABLE"})(qu||(qu={}));C.util.setEnumType(qu,"wg.cosmo.node.v1.ConfigurationVariableKind",[{no:0,name:"STATIC_CONFIGURATION_VARIABLE"},{no:1,name:"ENV_CONFIGURATION_VARIABLE"},{no:2,name:"PLACEHOLDER_CONFIGURATION_VARIABLE"}]);var Wc;(function(e){e[e.GET=0]="GET",e[e.POST=1]="POST",e[e.PUT=2]="PUT",e[e.DELETE=3]="DELETE",e[e.OPTIONS=4]="OPTIONS"})(Wc||(Wc={}));C.util.setEnumType(Wc,"wg.cosmo.node.v1.HTTPMethod",[{no:0,name:"GET"},{no:1,name:"POST"},{no:2,name:"PUT"},{no:3,name:"DELETE"},{no:4,name:"OPTIONS"}]);var $s=class $s extends Fe{constructor(n){super();g(this,"id","");g(this,"name","");g(this,"routingUrl","");C.util.initPartial(n,this)}static fromBinary(n,r){return new $s().fromBinary(n,r)}static fromJson(n,r){return new $s().fromJson(n,r)}static fromJsonString(n,r){return new $s().fromJsonString(n,r)}static equals(n,r){return C.util.equals($s,n,r)}};g($s,"runtime",C),g($s,"typeName","wg.cosmo.node.v1.Subgraph"),g($s,"fields",C.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"routing_url",kind:"scalar",T:9}]));var wh=$s,Gs=class Gs extends Fe{constructor(n){super();g(this,"configByFeatureFlagName",{});C.util.initPartial(n,this)}static fromBinary(n,r){return new Gs().fromBinary(n,r)}static fromJson(n,r){return new Gs().fromJson(n,r)}static fromJsonString(n,r){return new Gs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Gs,n,r)}};g(Gs,"runtime",C),g(Gs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs"),g(Gs,"fields",C.util.newFieldList(()=>[{no:1,name:"config_by_feature_flag_name",kind:"map",K:9,V:{kind:"message",T:Ub}}]));var Bb=Gs,Qs=class Qs extends Fe{constructor(n){super();g(this,"engineConfig");g(this,"version","");g(this,"subgraphs",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Qs().fromBinary(n,r)}static fromJson(n,r){return new Qs().fromJson(n,r)}static fromJsonString(n,r){return new Qs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Qs,n,r)}};g(Qs,"runtime",C),g(Qs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig"),g(Qs,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:Od},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:wh,repeated:!0}]));var Ub=Qs,Ys=class Ys extends Fe{constructor(n){super();g(this,"engineConfig");g(this,"version","");g(this,"subgraphs",[]);g(this,"featureFlagConfigs");g(this,"compatibilityVersion","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ys().fromBinary(n,r)}static fromJson(n,r){return new Ys().fromJson(n,r)}static fromJsonString(n,r){return new Ys().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ys,n,r)}};g(Ys,"runtime",C),g(Ys,"typeName","wg.cosmo.node.v1.RouterConfig"),g(Ys,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:Od},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:wh,repeated:!0},{no:4,name:"feature_flag_configs",kind:"message",T:Bb,opt:!0},{no:5,name:"compatibility_version",kind:"scalar",T:9}]));var xp=Ys,Js=class Js extends Fe{constructor(n){super();g(this,"code",vd.OK);g(this,"details");C.util.initPartial(n,this)}static fromBinary(n,r){return new Js().fromBinary(n,r)}static fromJson(n,r){return new Js().fromJson(n,r)}static fromJsonString(n,r){return new Js().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Js,n,r)}};g(Js,"runtime",C),g(Js,"typeName","wg.cosmo.node.v1.Response"),g(Js,"fields",C.util.newFieldList(()=>[{no:1,name:"code",kind:"enum",T:C.getEnumType(vd)},{no:2,name:"details",kind:"scalar",T:9,opt:!0}]));var kb=Js,Hs=class Hs extends Fe{constructor(n){super();g(this,"code",0);g(this,"message","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Hs().fromBinary(n,r)}static fromJson(n,r){return new Hs().fromJson(n,r)}static fromJsonString(n,r){return new Hs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Hs,n,r)}};g(Hs,"runtime",C),g(Hs,"typeName","wg.cosmo.node.v1.ResponseStatus"),g(Hs,"fields",C.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}]));var Yj=Hs,zs=class zs extends Fe{constructor(n){super();g(this,"accountLimits");g(this,"graphPublicKey","");C.util.initPartial(n,this)}static fromBinary(n,r){return new zs().fromBinary(n,r)}static fromJson(n,r){return new zs().fromJson(n,r)}static fromJsonString(n,r){return new zs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(zs,n,r)}};g(zs,"runtime",C),g(zs,"typeName","wg.cosmo.node.v1.RegistrationInfo"),g(zs,"fields",C.util.newFieldList(()=>[{no:1,name:"account_limits",kind:"message",T:xb},{no:2,name:"graph_public_key",kind:"scalar",T:9}]));var Mb=zs,Ws=class Ws extends Fe{constructor(n){super();g(this,"traceSamplingRate",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ws().fromBinary(n,r)}static fromJson(n,r){return new Ws().fromJson(n,r)}static fromJsonString(n,r){return new Ws().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ws,n,r)}};g(Ws,"runtime",C),g(Ws,"typeName","wg.cosmo.node.v1.AccountLimits"),g(Ws,"fields",C.util.newFieldList(()=>[{no:1,name:"trace_sampling_rate",kind:"scalar",T:2}]));var xb=Ws,Xs=class Xs extends Fe{constructor(t){super(),C.util.initPartial(t,this)}static fromBinary(t,n){return new Xs().fromBinary(t,n)}static fromJson(t,n){return new Xs().fromJson(t,n)}static fromJsonString(t,n){return new Xs().fromJsonString(t,n)}static equals(t,n){return C.util.equals(Xs,t,n)}};g(Xs,"runtime",C),g(Xs,"typeName","wg.cosmo.node.v1.SelfRegisterRequest"),g(Xs,"fields",C.util.newFieldList(()=>[]));var Jj=Xs,Zs=class Zs extends Fe{constructor(n){super();g(this,"response");g(this,"registrationInfo");C.util.initPartial(n,this)}static fromBinary(n,r){return new Zs().fromBinary(n,r)}static fromJson(n,r){return new Zs().fromJson(n,r)}static fromJsonString(n,r){return new Zs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Zs,n,r)}};g(Zs,"runtime",C),g(Zs,"typeName","wg.cosmo.node.v1.SelfRegisterResponse"),g(Zs,"fields",C.util.newFieldList(()=>[{no:1,name:"response",kind:"message",T:kb},{no:2,name:"registrationInfo",kind:"message",T:Mb,opt:!0}]));var Hj=Zs,eo=class eo extends Fe{constructor(n){super();g(this,"defaultFlushInterval",Jn.zero);g(this,"datasourceConfigurations",[]);g(this,"fieldConfigurations",[]);g(this,"graphqlSchema","");g(this,"typeConfigurations",[]);g(this,"stringStorage",{});g(this,"graphqlClientSchema");C.util.initPartial(n,this)}static fromBinary(n,r){return new eo().fromBinary(n,r)}static fromJson(n,r){return new eo().fromJson(n,r)}static fromJsonString(n,r){return new eo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(eo,n,r)}};g(eo,"runtime",C),g(eo,"typeName","wg.cosmo.node.v1.EngineConfiguration"),g(eo,"fields",C.util.newFieldList(()=>[{no:1,name:"defaultFlushInterval",kind:"scalar",T:3},{no:2,name:"datasource_configurations",kind:"message",T:qp,repeated:!0},{no:3,name:"field_configurations",kind:"message",T:Kp,repeated:!0},{no:4,name:"graphqlSchema",kind:"scalar",T:9},{no:5,name:"type_configurations",kind:"message",T:qb,repeated:!0},{no:6,name:"string_storage",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:7,name:"graphql_client_schema",kind:"scalar",T:9,opt:!0}]));var Od=eo,to=class to extends Fe{constructor(n){super();g(this,"kind",xu.STATIC);g(this,"rootNodes",[]);g(this,"childNodes",[]);g(this,"overrideFieldPathFromAlias",!1);g(this,"customGraphql");g(this,"customStatic");g(this,"directives",[]);g(this,"requestTimeoutSeconds",Jn.zero);g(this,"id","");g(this,"keys",[]);g(this,"provides",[]);g(this,"requires",[]);g(this,"customEvents");g(this,"entityInterfaces",[]);g(this,"interfaceObjects",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new to().fromBinary(n,r)}static fromJson(n,r){return new to().fromJson(n,r)}static fromJsonString(n,r){return new to().fromJsonString(n,r)}static equals(n,r){return C.util.equals(to,n,r)}};g(to,"runtime",C),g(to,"typeName","wg.cosmo.node.v1.DataSourceConfiguration"),g(to,"fields",C.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(xu)},{no:2,name:"root_nodes",kind:"message",T:Sd,repeated:!0},{no:3,name:"child_nodes",kind:"message",T:Sd,repeated:!0},{no:4,name:"override_field_path_from_alias",kind:"scalar",T:8},{no:5,name:"custom_graphql",kind:"message",T:Qp},{no:6,name:"custom_static",kind:"message",T:Zb},{no:7,name:"directives",kind:"message",T:e0,repeated:!0},{no:8,name:"request_timeout_seconds",kind:"scalar",T:3},{no:9,name:"id",kind:"scalar",T:9},{no:10,name:"keys",kind:"message",T:Hc,repeated:!0},{no:11,name:"provides",kind:"message",T:Hc,repeated:!0},{no:12,name:"requires",kind:"message",T:Hc,repeated:!0},{no:13,name:"custom_events",kind:"message",T:Zc},{no:14,name:"entity_interfaces",kind:"message",T:Dd,repeated:!0},{no:15,name:"interface_objects",kind:"message",T:Dd,repeated:!0}]));var qp=to,no=class no extends Fe{constructor(n){super();g(this,"name","");g(this,"sourceType",zc.OBJECT_FIELD);C.util.initPartial(n,this)}static fromBinary(n,r){return new no().fromBinary(n,r)}static fromJson(n,r){return new no().fromJson(n,r)}static fromJsonString(n,r){return new no().fromJsonString(n,r)}static equals(n,r){return C.util.equals(no,n,r)}};g(no,"runtime",C),g(no,"typeName","wg.cosmo.node.v1.ArgumentConfiguration"),g(no,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source_type",kind:"enum",T:C.getEnumType(zc)}]));var Vp=no,ro=class ro extends Fe{constructor(n){super();g(this,"requiredAndScopes",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new ro().fromBinary(n,r)}static fromJson(n,r){return new ro().fromJson(n,r)}static fromJsonString(n,r){return new ro().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ro,n,r)}};g(ro,"runtime",C),g(ro,"typeName","wg.cosmo.node.v1.Scopes"),g(ro,"fields",C.util.newFieldList(()=>[{no:1,name:"required_and_scopes",kind:"scalar",T:9,repeated:!0}]));var Xc=ro,io=class io extends Fe{constructor(n){super();g(this,"requiresAuthentication",!1);g(this,"requiredOrScopes",[]);g(this,"requiredOrScopesByOr",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new io().fromBinary(n,r)}static fromJson(n,r){return new io().fromJson(n,r)}static fromJsonString(n,r){return new io().fromJsonString(n,r)}static equals(n,r){return C.util.equals(io,n,r)}};g(io,"runtime",C),g(io,"typeName","wg.cosmo.node.v1.AuthorizationConfiguration"),g(io,"fields",C.util.newFieldList(()=>[{no:1,name:"requires_authentication",kind:"scalar",T:8},{no:2,name:"required_or_scopes",kind:"message",T:Xc,repeated:!0},{no:3,name:"required_or_scopes_by_or",kind:"message",T:Xc,repeated:!0}]));var jp=io,ao=class ao extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");g(this,"argumentsConfiguration",[]);g(this,"authorizationConfiguration");g(this,"subscriptionFilterCondition");C.util.initPartial(n,this)}static fromBinary(n,r){return new ao().fromBinary(n,r)}static fromJson(n,r){return new ao().fromJson(n,r)}static fromJsonString(n,r){return new ao().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ao,n,r)}};g(ao,"runtime",C),g(ao,"typeName","wg.cosmo.node.v1.FieldConfiguration"),g(ao,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9},{no:3,name:"arguments_configuration",kind:"message",T:Vp,repeated:!0},{no:4,name:"authorization_configuration",kind:"message",T:jp},{no:5,name:"subscription_filter_condition",kind:"message",T:Vu,opt:!0}]));var Kp=ao,so=class so extends Fe{constructor(n){super();g(this,"typeName","");g(this,"renameTo","");C.util.initPartial(n,this)}static fromBinary(n,r){return new so().fromBinary(n,r)}static fromJson(n,r){return new so().fromJson(n,r)}static fromJsonString(n,r){return new so().fromJsonString(n,r)}static equals(n,r){return C.util.equals(so,n,r)}};g(so,"runtime",C),g(so,"typeName","wg.cosmo.node.v1.TypeConfiguration"),g(so,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var qb=so,oo=class oo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldNames",[]);g(this,"externalFieldNames",[]);g(this,"requireFetchReasonsFieldNames",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new oo().fromBinary(n,r)}static fromJson(n,r){return new oo().fromJson(n,r)}static fromJsonString(n,r){return new oo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(oo,n,r)}};g(oo,"runtime",C),g(oo,"typeName","wg.cosmo.node.v1.TypeField"),g(oo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_names",kind:"scalar",T:9,repeated:!0},{no:3,name:"external_field_names",kind:"scalar",T:9,repeated:!0},{no:4,name:"require_fetch_reasons_field_names",kind:"scalar",T:9,repeated:!0}]));var Sd=oo,uo=class uo extends Fe{constructor(n){super();g(this,"fieldName","");g(this,"typeName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new uo().fromBinary(n,r)}static fromJson(n,r){return new uo().fromJson(n,r)}static fromJsonString(n,r){return new uo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(uo,n,r)}};g(uo,"runtime",C),g(uo,"typeName","wg.cosmo.node.v1.FieldCoordinates"),g(uo,"fields",C.util.newFieldList(()=>[{no:1,name:"field_name",kind:"scalar",T:9},{no:2,name:"type_name",kind:"scalar",T:9}]));var $p=uo,co=class co extends Fe{constructor(n){super();g(this,"fieldCoordinatesPath",[]);g(this,"fieldPath",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new co().fromBinary(n,r)}static fromJson(n,r){return new co().fromJson(n,r)}static fromJsonString(n,r){return new co().fromJsonString(n,r)}static equals(n,r){return C.util.equals(co,n,r)}};g(co,"runtime",C),g(co,"typeName","wg.cosmo.node.v1.FieldSetCondition"),g(co,"fields",C.util.newFieldList(()=>[{no:1,name:"field_coordinates_path",kind:"message",T:$p,repeated:!0},{no:2,name:"field_path",kind:"scalar",T:9,repeated:!0}]));var Gp=co,lo=class lo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");g(this,"selectionSet","");g(this,"disableEntityResolver",!1);g(this,"conditions",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new lo().fromBinary(n,r)}static fromJson(n,r){return new lo().fromJson(n,r)}static fromJsonString(n,r){return new lo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(lo,n,r)}};g(lo,"runtime",C),g(lo,"typeName","wg.cosmo.node.v1.RequiredField"),g(lo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9},{no:3,name:"selection_set",kind:"scalar",T:9},{no:4,name:"disable_entity_resolver",kind:"scalar",T:8},{no:5,name:"conditions",kind:"message",T:Gp,repeated:!0}]));var Hc=lo,fo=class fo extends Fe{constructor(n){super();g(this,"interfaceTypeName","");g(this,"concreteTypeNames",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new fo().fromBinary(n,r)}static fromJson(n,r){return new fo().fromJson(n,r)}static fromJsonString(n,r){return new fo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(fo,n,r)}};g(fo,"runtime",C),g(fo,"typeName","wg.cosmo.node.v1.EntityInterfaceConfiguration"),g(fo,"fields",C.util.newFieldList(()=>[{no:1,name:"interface_type_name",kind:"scalar",T:9},{no:2,name:"concrete_type_names",kind:"scalar",T:9,repeated:!0}]));var Dd=fo,po=class po extends Fe{constructor(n){super();g(this,"url");g(this,"method",Wc.GET);g(this,"header",{});g(this,"body");g(this,"query",[]);g(this,"urlEncodeBody",!1);g(this,"mtls");g(this,"baseUrl");g(this,"path");g(this,"httpProxyUrl");C.util.initPartial(n,this)}static fromBinary(n,r){return new po().fromBinary(n,r)}static fromJson(n,r){return new po().fromJson(n,r)}static fromJsonString(n,r){return new po().fromJsonString(n,r)}static equals(n,r){return C.util.equals(po,n,r)}};g(po,"runtime",C),g(po,"typeName","wg.cosmo.node.v1.FetchConfiguration"),g(po,"fields",C.util.newFieldList(()=>[{no:1,name:"url",kind:"message",T:Qr},{no:2,name:"method",kind:"enum",T:C.getEnumType(Wc)},{no:3,name:"header",kind:"map",K:9,V:{kind:"message",T:n0}},{no:4,name:"body",kind:"message",T:Qr},{no:5,name:"query",kind:"message",T:t0,repeated:!0},{no:7,name:"url_encode_body",kind:"scalar",T:8},{no:8,name:"mtls",kind:"message",T:r0},{no:9,name:"base_url",kind:"message",T:Qr},{no:10,name:"path",kind:"message",T:Qr},{no:11,name:"http_proxy_url",kind:"message",T:Qr,opt:!0}]));var Vb=po,mo=class mo extends Fe{constructor(n){super();g(this,"statusCode",Jn.zero);g(this,"typeName","");g(this,"injectStatusCodeIntoBody",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new mo().fromBinary(n,r)}static fromJson(n,r){return new mo().fromJson(n,r)}static fromJsonString(n,r){return new mo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(mo,n,r)}};g(mo,"runtime",C),g(mo,"typeName","wg.cosmo.node.v1.StatusCodeTypeMapping"),g(mo,"fields",C.util.newFieldList(()=>[{no:1,name:"status_code",kind:"scalar",T:3},{no:2,name:"type_name",kind:"scalar",T:9},{no:3,name:"inject_status_code_into_body",kind:"scalar",T:8}]));var zj=mo,No=class No extends Fe{constructor(n){super();g(this,"fetch");g(this,"subscription");g(this,"federation");g(this,"upstreamSchema");g(this,"customScalarTypeFields",[]);g(this,"grpc");C.util.initPartial(n,this)}static fromBinary(n,r){return new No().fromBinary(n,r)}static fromJson(n,r){return new No().fromJson(n,r)}static fromJsonString(n,r){return new No().fromJsonString(n,r)}static equals(n,r){return C.util.equals(No,n,r)}};g(No,"runtime",C),g(No,"typeName","wg.cosmo.node.v1.DataSourceCustom_GraphQL"),g(No,"fields",C.util.newFieldList(()=>[{no:1,name:"fetch",kind:"message",T:Vb},{no:2,name:"subscription",kind:"message",T:i0},{no:3,name:"federation",kind:"message",T:a0},{no:4,name:"upstream_schema",kind:"message",T:Zp},{no:6,name:"custom_scalar_type_fields",kind:"message",T:s0,repeated:!0},{no:7,name:"grpc",kind:"message",T:bd}]));var Qp=No,To=class To extends Fe{constructor(n){super();g(this,"mapping");g(this,"protoSchema","");g(this,"plugin");C.util.initPartial(n,this)}static fromBinary(n,r){return new To().fromBinary(n,r)}static fromJson(n,r){return new To().fromJson(n,r)}static fromJsonString(n,r){return new To().fromJsonString(n,r)}static equals(n,r){return C.util.equals(To,n,r)}};g(To,"runtime",C),g(To,"typeName","wg.cosmo.node.v1.GRPCConfiguration"),g(To,"fields",C.util.newFieldList(()=>[{no:1,name:"mapping",kind:"message",T:Kb},{no:2,name:"proto_schema",kind:"scalar",T:9},{no:3,name:"plugin",kind:"message",T:Yp}]));var bd=To,Eo=class Eo extends Fe{constructor(n){super();g(this,"repository","");g(this,"reference","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Eo().fromBinary(n,r)}static fromJson(n,r){return new Eo().fromJson(n,r)}static fromJsonString(n,r){return new Eo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Eo,n,r)}};g(Eo,"runtime",C),g(Eo,"typeName","wg.cosmo.node.v1.ImageReference"),g(Eo,"fields",C.util.newFieldList(()=>[{no:1,name:"repository",kind:"scalar",T:9},{no:2,name:"reference",kind:"scalar",T:9}]));var jb=Eo,ho=class ho extends Fe{constructor(n){super();g(this,"name","");g(this,"version","");g(this,"imageReference");C.util.initPartial(n,this)}static fromBinary(n,r){return new ho().fromBinary(n,r)}static fromJson(n,r){return new ho().fromJson(n,r)}static fromJsonString(n,r){return new ho().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ho,n,r)}};g(ho,"runtime",C),g(ho,"typeName","wg.cosmo.node.v1.PluginConfiguration"),g(ho,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"image_reference",kind:"message",T:jb,opt:!0}]));var Yp=ho,yo=class yo extends Fe{constructor(n){super();g(this,"enabled",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new yo().fromBinary(n,r)}static fromJson(n,r){return new yo().fromJson(n,r)}static fromJsonString(n,r){return new yo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(yo,n,r)}};g(yo,"runtime",C),g(yo,"typeName","wg.cosmo.node.v1.SSLConfiguration"),g(yo,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8}]));var Wj=yo,Io=class Io extends Fe{constructor(n){super();g(this,"version",0);g(this,"service","");g(this,"operationMappings",[]);g(this,"entityMappings",[]);g(this,"typeFieldMappings",[]);g(this,"enumMappings",[]);g(this,"resolveMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Io().fromBinary(n,r)}static fromJson(n,r){return new Io().fromJson(n,r)}static fromJsonString(n,r){return new Io().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Io,n,r)}};g(Io,"runtime",C),g(Io,"typeName","wg.cosmo.node.v1.GRPCMapping"),g(Io,"fields",C.util.newFieldList(()=>[{no:1,name:"version",kind:"scalar",T:5},{no:2,name:"service",kind:"scalar",T:9},{no:3,name:"operation_mappings",kind:"message",T:Qb,repeated:!0},{no:4,name:"entity_mappings",kind:"message",T:Yb,repeated:!0},{no:5,name:"type_field_mappings",kind:"message",T:Hb,repeated:!0},{no:6,name:"enum_mappings",kind:"message",T:Wb,repeated:!0},{no:7,name:"resolve_mappings",kind:"message",T:$b,repeated:!0}]));var Kb=Io,go=class go extends Fe{constructor(n){super();g(this,"type",kp.UNSPECIFIED);g(this,"lookupMapping");g(this,"rpc","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new go().fromBinary(n,r)}static fromJson(n,r){return new go().fromJson(n,r)}static fromJsonString(n,r){return new go().fromJsonString(n,r)}static equals(n,r){return C.util.equals(go,n,r)}};g(go,"runtime",C),g(go,"typeName","wg.cosmo.node.v1.LookupMapping"),g(go,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:C.getEnumType(kp)},{no:2,name:"lookup_mapping",kind:"message",T:Gb},{no:3,name:"rpc",kind:"scalar",T:9},{no:4,name:"request",kind:"scalar",T:9},{no:5,name:"response",kind:"scalar",T:9}]));var $b=go,_o=class _o extends Fe{constructor(n){super();g(this,"type","");g(this,"fieldMapping");C.util.initPartial(n,this)}static fromBinary(n,r){return new _o().fromBinary(n,r)}static fromJson(n,r){return new _o().fromJson(n,r)}static fromJsonString(n,r){return new _o().fromJsonString(n,r)}static equals(n,r){return C.util.equals(_o,n,r)}};g(_o,"runtime",C),g(_o,"typeName","wg.cosmo.node.v1.LookupFieldMapping"),g(_o,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mapping",kind:"message",T:Jp}]));var Gb=_o,vo=class vo extends Fe{constructor(n){super();g(this,"type",Mp.UNSPECIFIED);g(this,"original","");g(this,"mapped","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new vo().fromBinary(n,r)}static fromJson(n,r){return new vo().fromJson(n,r)}static fromJsonString(n,r){return new vo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(vo,n,r)}};g(vo,"runtime",C),g(vo,"typeName","wg.cosmo.node.v1.OperationMapping"),g(vo,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:C.getEnumType(Mp)},{no:2,name:"original",kind:"scalar",T:9},{no:3,name:"mapped",kind:"scalar",T:9},{no:4,name:"request",kind:"scalar",T:9},{no:5,name:"response",kind:"scalar",T:9}]));var Qb=vo,Oo=class Oo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"kind","");g(this,"key","");g(this,"rpc","");g(this,"request","");g(this,"response","");g(this,"requiredFieldMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Oo().fromBinary(n,r)}static fromJson(n,r){return new Oo().fromJson(n,r)}static fromJsonString(n,r){return new Oo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Oo,n,r)}};g(Oo,"runtime",C),g(Oo,"typeName","wg.cosmo.node.v1.EntityMapping"),g(Oo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"kind",kind:"scalar",T:9},{no:3,name:"key",kind:"scalar",T:9},{no:4,name:"rpc",kind:"scalar",T:9},{no:5,name:"request",kind:"scalar",T:9},{no:6,name:"response",kind:"scalar",T:9},{no:7,name:"required_field_mappings",kind:"message",T:Jb,repeated:!0}]));var Yb=Oo,So=class So extends Fe{constructor(n){super();g(this,"fieldMapping");g(this,"rpc","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new So().fromBinary(n,r)}static fromJson(n,r){return new So().fromJson(n,r)}static fromJsonString(n,r){return new So().fromJsonString(n,r)}static equals(n,r){return C.util.equals(So,n,r)}};g(So,"runtime",C),g(So,"typeName","wg.cosmo.node.v1.RequiredFieldMapping"),g(So,"fields",C.util.newFieldList(()=>[{no:1,name:"field_mapping",kind:"message",T:Jp},{no:2,name:"rpc",kind:"scalar",T:9},{no:3,name:"request",kind:"scalar",T:9},{no:4,name:"response",kind:"scalar",T:9}]));var Jb=So,Do=class Do extends Fe{constructor(n){super();g(this,"type","");g(this,"fieldMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Do().fromBinary(n,r)}static fromJson(n,r){return new Do().fromJson(n,r)}static fromJsonString(n,r){return new Do().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Do,n,r)}};g(Do,"runtime",C),g(Do,"typeName","wg.cosmo.node.v1.TypeFieldMapping"),g(Do,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mappings",kind:"message",T:Jp,repeated:!0}]));var Hb=Do,bo=class bo extends Fe{constructor(n){super();g(this,"original","");g(this,"mapped","");g(this,"argumentMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new bo().fromBinary(n,r)}static fromJson(n,r){return new bo().fromJson(n,r)}static fromJsonString(n,r){return new bo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(bo,n,r)}};g(bo,"runtime",C),g(bo,"typeName","wg.cosmo.node.v1.FieldMapping"),g(bo,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9},{no:3,name:"argument_mappings",kind:"message",T:zb,repeated:!0}]));var Jp=bo,Ao=class Ao extends Fe{constructor(n){super();g(this,"original","");g(this,"mapped","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ao().fromBinary(n,r)}static fromJson(n,r){return new Ao().fromJson(n,r)}static fromJsonString(n,r){return new Ao().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ao,n,r)}};g(Ao,"runtime",C),g(Ao,"typeName","wg.cosmo.node.v1.ArgumentMapping"),g(Ao,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var zb=Ao,Ro=class Ro extends Fe{constructor(n){super();g(this,"type","");g(this,"values",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ro().fromBinary(n,r)}static fromJson(n,r){return new Ro().fromJson(n,r)}static fromJsonString(n,r){return new Ro().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ro,n,r)}};g(Ro,"runtime",C),g(Ro,"typeName","wg.cosmo.node.v1.EnumMapping"),g(Ro,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"values",kind:"message",T:Xb,repeated:!0}]));var Wb=Ro,Po=class Po extends Fe{constructor(n){super();g(this,"original","");g(this,"mapped","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Po().fromBinary(n,r)}static fromJson(n,r){return new Po().fromJson(n,r)}static fromJsonString(n,r){return new Po().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Po,n,r)}};g(Po,"runtime",C),g(Po,"typeName","wg.cosmo.node.v1.EnumValueMapping"),g(Po,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var Xb=Po,Fo=class Fo extends Fe{constructor(n){super();g(this,"consumerName","");g(this,"streamName","");g(this,"consumerInactiveThreshold",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Fo().fromBinary(n,r)}static fromJson(n,r){return new Fo().fromJson(n,r)}static fromJsonString(n,r){return new Fo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Fo,n,r)}};g(Fo,"runtime",C),g(Fo,"typeName","wg.cosmo.node.v1.NatsStreamConfiguration"),g(Fo,"fields",C.util.newFieldList(()=>[{no:1,name:"consumer_name",kind:"scalar",T:9},{no:2,name:"stream_name",kind:"scalar",T:9},{no:3,name:"consumer_inactive_threshold",kind:"scalar",T:5}]));var Hp=Fo,wo=class wo extends Fe{constructor(n){super();g(this,"engineEventConfiguration");g(this,"subjects",[]);g(this,"streamConfiguration");C.util.initPartial(n,this)}static fromBinary(n,r){return new wo().fromBinary(n,r)}static fromJson(n,r){return new wo().fromJson(n,r)}static fromJsonString(n,r){return new wo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(wo,n,r)}};g(wo,"runtime",C),g(wo,"typeName","wg.cosmo.node.v1.NatsEventConfiguration"),g(wo,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:tu},{no:2,name:"subjects",kind:"scalar",T:9,repeated:!0},{no:3,name:"stream_configuration",kind:"message",T:Hp}]));var zp=wo,Lo=class Lo extends Fe{constructor(n){super();g(this,"engineEventConfiguration");g(this,"topics",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Lo().fromBinary(n,r)}static fromJson(n,r){return new Lo().fromJson(n,r)}static fromJsonString(n,r){return new Lo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Lo,n,r)}};g(Lo,"runtime",C),g(Lo,"typeName","wg.cosmo.node.v1.KafkaEventConfiguration"),g(Lo,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:tu},{no:2,name:"topics",kind:"scalar",T:9,repeated:!0}]));var Wp=Lo,Co=class Co extends Fe{constructor(n){super();g(this,"engineEventConfiguration");g(this,"channels",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Co().fromBinary(n,r)}static fromJson(n,r){return new Co().fromJson(n,r)}static fromJsonString(n,r){return new Co().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Co,n,r)}};g(Co,"runtime",C),g(Co,"typeName","wg.cosmo.node.v1.RedisEventConfiguration"),g(Co,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:tu},{no:2,name:"channels",kind:"scalar",T:9,repeated:!0}]));var Xp=Co,Bo=class Bo extends Fe{constructor(n){super();g(this,"providerId","");g(this,"type",eu.PUBLISH);g(this,"typeName","");g(this,"fieldName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Bo().fromBinary(n,r)}static fromJson(n,r){return new Bo().fromJson(n,r)}static fromJsonString(n,r){return new Bo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Bo,n,r)}};g(Bo,"runtime",C),g(Bo,"typeName","wg.cosmo.node.v1.EngineEventConfiguration"),g(Bo,"fields",C.util.newFieldList(()=>[{no:1,name:"provider_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:C.getEnumType(eu)},{no:3,name:"type_name",kind:"scalar",T:9},{no:4,name:"field_name",kind:"scalar",T:9}]));var tu=Bo,Uo=class Uo extends Fe{constructor(n){super();g(this,"nats",[]);g(this,"kafka",[]);g(this,"redis",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Uo().fromBinary(n,r)}static fromJson(n,r){return new Uo().fromJson(n,r)}static fromJsonString(n,r){return new Uo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Uo,n,r)}};g(Uo,"runtime",C),g(Uo,"typeName","wg.cosmo.node.v1.DataSourceCustomEvents"),g(Uo,"fields",C.util.newFieldList(()=>[{no:1,name:"nats",kind:"message",T:zp,repeated:!0},{no:2,name:"kafka",kind:"message",T:Wp,repeated:!0},{no:3,name:"redis",kind:"message",T:Xp,repeated:!0}]));var Zc=Uo,ko=class ko extends Fe{constructor(n){super();g(this,"data");C.util.initPartial(n,this)}static fromBinary(n,r){return new ko().fromBinary(n,r)}static fromJson(n,r){return new ko().fromJson(n,r)}static fromJsonString(n,r){return new ko().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ko,n,r)}};g(ko,"runtime",C),g(ko,"typeName","wg.cosmo.node.v1.DataSourceCustom_Static"),g(ko,"fields",C.util.newFieldList(()=>[{no:1,name:"data",kind:"message",T:Qr}]));var Zb=ko,Mo=class Mo extends Fe{constructor(n){super();g(this,"kind",qu.STATIC_CONFIGURATION_VARIABLE);g(this,"staticVariableContent","");g(this,"environmentVariableName","");g(this,"environmentVariableDefaultValue","");g(this,"placeholderVariableName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Mo().fromBinary(n,r)}static fromJson(n,r){return new Mo().fromJson(n,r)}static fromJsonString(n,r){return new Mo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Mo,n,r)}};g(Mo,"runtime",C),g(Mo,"typeName","wg.cosmo.node.v1.ConfigurationVariable"),g(Mo,"fields",C.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(qu)},{no:2,name:"static_variable_content",kind:"scalar",T:9},{no:3,name:"environment_variable_name",kind:"scalar",T:9},{no:4,name:"environment_variable_default_value",kind:"scalar",T:9},{no:5,name:"placeholder_variable_name",kind:"scalar",T:9}]));var Qr=Mo,xo=class xo extends Fe{constructor(n){super();g(this,"directiveName","");g(this,"renameTo","");C.util.initPartial(n,this)}static fromBinary(n,r){return new xo().fromBinary(n,r)}static fromJson(n,r){return new xo().fromJson(n,r)}static fromJsonString(n,r){return new xo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(xo,n,r)}};g(xo,"runtime",C),g(xo,"typeName","wg.cosmo.node.v1.DirectiveConfiguration"),g(xo,"fields",C.util.newFieldList(()=>[{no:1,name:"directive_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var e0=xo,qo=class qo extends Fe{constructor(n){super();g(this,"name","");g(this,"value","");C.util.initPartial(n,this)}static fromBinary(n,r){return new qo().fromBinary(n,r)}static fromJson(n,r){return new qo().fromJson(n,r)}static fromJsonString(n,r){return new qo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(qo,n,r)}};g(qo,"runtime",C),g(qo,"typeName","wg.cosmo.node.v1.URLQueryConfiguration"),g(qo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]));var t0=qo,Vo=class Vo extends Fe{constructor(n){super();g(this,"values",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Vo().fromBinary(n,r)}static fromJson(n,r){return new Vo().fromJson(n,r)}static fromJsonString(n,r){return new Vo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Vo,n,r)}};g(Vo,"runtime",C),g(Vo,"typeName","wg.cosmo.node.v1.HTTPHeader"),g(Vo,"fields",C.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:Qr,repeated:!0}]));var n0=Vo,jo=class jo extends Fe{constructor(n){super();g(this,"key");g(this,"cert");g(this,"insecureSkipVerify",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new jo().fromBinary(n,r)}static fromJson(n,r){return new jo().fromJson(n,r)}static fromJsonString(n,r){return new jo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(jo,n,r)}};g(jo,"runtime",C),g(jo,"typeName","wg.cosmo.node.v1.MTLSConfiguration"),g(jo,"fields",C.util.newFieldList(()=>[{no:1,name:"key",kind:"message",T:Qr},{no:2,name:"cert",kind:"message",T:Qr},{no:3,name:"insecureSkipVerify",kind:"scalar",T:8}]));var r0=jo,Ko=class Ko extends Fe{constructor(n){super();g(this,"enabled",!1);g(this,"url");g(this,"useSSE");g(this,"protocol");g(this,"websocketSubprotocol");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ko().fromBinary(n,r)}static fromJson(n,r){return new Ko().fromJson(n,r)}static fromJsonString(n,r){return new Ko().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ko,n,r)}};g(Ko,"runtime",C),g(Ko,"typeName","wg.cosmo.node.v1.GraphQLSubscriptionConfiguration"),g(Ko,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"url",kind:"message",T:Qr},{no:3,name:"useSSE",kind:"scalar",T:8,opt:!0},{no:4,name:"protocol",kind:"enum",T:C.getEnumType(js),opt:!0},{no:5,name:"websocketSubprotocol",kind:"enum",T:C.getEnumType(Ks),opt:!0}]));var i0=Ko,$o=class $o extends Fe{constructor(n){super();g(this,"enabled",!1);g(this,"serviceSdl","");C.util.initPartial(n,this)}static fromBinary(n,r){return new $o().fromBinary(n,r)}static fromJson(n,r){return new $o().fromJson(n,r)}static fromJsonString(n,r){return new $o().fromJsonString(n,r)}static equals(n,r){return C.util.equals($o,n,r)}};g($o,"runtime",C),g($o,"typeName","wg.cosmo.node.v1.GraphQLFederationConfiguration"),g($o,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"serviceSdl",kind:"scalar",T:9}]));var a0=$o,Go=class Go extends Fe{constructor(n){super();g(this,"key","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Go().fromBinary(n,r)}static fromJson(n,r){return new Go().fromJson(n,r)}static fromJsonString(n,r){return new Go().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Go,n,r)}};g(Go,"runtime",C),g(Go,"typeName","wg.cosmo.node.v1.InternedString"),g(Go,"fields",C.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9}]));var Zp=Go,Qo=class Qo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Qo().fromBinary(n,r)}static fromJson(n,r){return new Qo().fromJson(n,r)}static fromJsonString(n,r){return new Qo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Qo,n,r)}};g(Qo,"runtime",C),g(Qo,"typeName","wg.cosmo.node.v1.SingleTypeField"),g(Qo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9}]));var s0=Qo,Yo=class Yo extends Fe{constructor(n){super();g(this,"fieldPath",[]);g(this,"json","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Yo().fromBinary(n,r)}static fromJson(n,r){return new Yo().fromJson(n,r)}static fromJsonString(n,r){return new Yo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Yo,n,r)}};g(Yo,"runtime",C),g(Yo,"typeName","wg.cosmo.node.v1.SubscriptionFieldCondition"),g(Yo,"fields",C.util.newFieldList(()=>[{no:1,name:"field_path",kind:"scalar",T:9,repeated:!0},{no:2,name:"json",kind:"scalar",T:9}]));var em=Yo,aa=class aa extends Fe{constructor(n){super();g(this,"and",[]);g(this,"in");g(this,"not");g(this,"or",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new aa().fromBinary(n,r)}static fromJson(n,r){return new aa().fromJson(n,r)}static fromJsonString(n,r){return new aa().fromJsonString(n,r)}static equals(n,r){return C.util.equals(aa,n,r)}};g(aa,"runtime",C),g(aa,"typeName","wg.cosmo.node.v1.SubscriptionFilterCondition"),g(aa,"fields",C.util.newFieldList(()=>[{no:1,name:"and",kind:"message",T:aa,repeated:!0},{no:2,name:"in",kind:"message",T:em,opt:!0},{no:3,name:"not",kind:"message",T:aa,opt:!0},{no:4,name:"or",kind:"message",T:aa,repeated:!0}]));var Vu=aa,Jo=class Jo extends Fe{constructor(n){super();g(this,"operations",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Jo().fromBinary(n,r)}static fromJson(n,r){return new Jo().fromJson(n,r)}static fromJsonString(n,r){return new Jo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Jo,n,r)}};g(Jo,"runtime",C),g(Jo,"typeName","wg.cosmo.node.v1.CacheWarmerOperations"),g(Jo,"fields",C.util.newFieldList(()=>[{no:1,name:"operations",kind:"message",T:o0,repeated:!0}]));var Xj=Jo,Ho=class Ho extends Fe{constructor(n){super();g(this,"request");g(this,"client");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ho().fromBinary(n,r)}static fromJson(n,r){return new Ho().fromJson(n,r)}static fromJsonString(n,r){return new Ho().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ho,n,r)}};g(Ho,"runtime",C),g(Ho,"typeName","wg.cosmo.node.v1.Operation"),g(Ho,"fields",C.util.newFieldList(()=>[{no:1,name:"request",kind:"message",T:u0},{no:2,name:"client",kind:"message",T:d0}]));var o0=Ho,zo=class zo extends Fe{constructor(n){super();g(this,"operationName","");g(this,"query","");g(this,"extensions");C.util.initPartial(n,this)}static fromBinary(n,r){return new zo().fromBinary(n,r)}static fromJson(n,r){return new zo().fromJson(n,r)}static fromJsonString(n,r){return new zo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(zo,n,r)}};g(zo,"runtime",C),g(zo,"typeName","wg.cosmo.node.v1.OperationRequest"),g(zo,"fields",C.util.newFieldList(()=>[{no:1,name:"operation_name",kind:"scalar",T:9},{no:2,name:"query",kind:"scalar",T:9},{no:3,name:"extensions",kind:"message",T:c0}]));var u0=zo,Wo=class Wo extends Fe{constructor(n){super();g(this,"persistedQuery");C.util.initPartial(n,this)}static fromBinary(n,r){return new Wo().fromBinary(n,r)}static fromJson(n,r){return new Wo().fromJson(n,r)}static fromJsonString(n,r){return new Wo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Wo,n,r)}};g(Wo,"runtime",C),g(Wo,"typeName","wg.cosmo.node.v1.Extension"),g(Wo,"fields",C.util.newFieldList(()=>[{no:1,name:"persisted_query",kind:"message",T:l0}]));var c0=Wo,Xo=class Xo extends Fe{constructor(n){super();g(this,"sha256Hash","");g(this,"version",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Xo().fromBinary(n,r)}static fromJson(n,r){return new Xo().fromJson(n,r)}static fromJsonString(n,r){return new Xo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Xo,n,r)}};g(Xo,"runtime",C),g(Xo,"typeName","wg.cosmo.node.v1.PersistedQuery"),g(Xo,"fields",C.util.newFieldList(()=>[{no:1,name:"sha256_hash",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:5}]));var l0=Xo,Zo=class Zo extends Fe{constructor(n){super();g(this,"name","");g(this,"version","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Zo().fromBinary(n,r)}static fromJson(n,r){return new Zo().fromJson(n,r)}static fromJsonString(n,r){return new Zo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Zo,n,r)}};g(Zo,"runtime",C),g(Zo,"typeName","wg.cosmo.node.v1.ClientInfo"),g(Zo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9}]));var d0=Zo;m();T();N();function f0(e){return new Error(`Normalization failed to return a ${e}.`)}function Zj(e){return new Error(`Invalid router compatibility version "${e}".`)}m();T();N();var Ad=Ni(dh(),1);function bpe(e){if(!e.conditions)return;let t=[];for(let n of e.conditions){let r=[];for(let i of n.fieldCoordinatesPath){let a=i.split(".");if(a.length!==2)throw new Error(`fatal: malformed conditional field coordinates "${i}" for field set "${e.selectionSet}".`);r.push(new $p({fieldName:a[1],typeName:a[0]}))}t.push(new Gp({fieldCoordinatesPath:r,fieldPath:n.fieldPath}))}return t}function p0(e,t,n){if(e)for(let r of e){let i=bpe(r);t.push(new Hc(k(k({typeName:n,fieldName:r.fieldName,selectionSet:r.selectionSet},r.disableEntityResolver?{disableEntityResolver:!0}:{}),i?{conditions:i}:{})))}}function m0(e){switch(e){case"publish":return eu.PUBLISH;case"request":return eu.REQUEST;case"subscribe":return eu.SUBSCRIBE}}function eK(e){var n;let t={rootNodes:[],childNodes:[],keys:[],provides:[],events:new Zc({nats:[],kafka:[],redis:[]}),requires:[],entityInterfaces:[],interfaceObjects:[]};for(let r of e.values()){let i=r.typeName,a=[...r.fieldNames],o=new Sd({fieldNames:a,typeName:i});if(r.externalFieldNames&&r.externalFieldNames.size>0&&(o.externalFieldNames=[...r.externalFieldNames]),r.requireFetchReasonsFieldNames&&r.requireFetchReasonsFieldNames.length>0&&(o.requireFetchReasonsFieldNames=[...r.requireFetchReasonsFieldNames]),r.isRootNode?t.rootNodes.push(o):t.childNodes.push(o),r.entityInterfaceConcreteTypeNames){let p=new Dd({interfaceTypeName:i,concreteTypeNames:[...r.entityInterfaceConcreteTypeNames]});r.isInterfaceObject?t.interfaceObjects.push(p):t.entityInterfaces.push(p)}p0(r.keys,t.keys,i),p0(r.provides,t.provides,i),p0(r.requires,t.requires,i);let u=[],l=[],d=[];for(let p of(n=r.events)!=null?n:[])switch(p.providerType){case Ad.PROVIDER_TYPE_KAFKA:{l.push(new Wp({engineEventConfiguration:new tu({fieldName:p.fieldName,providerId:p.providerId,type:m0(p.type),typeName:i}),topics:p.topics}));break}case Ad.PROVIDER_TYPE_NATS:{u.push(new zp(k({engineEventConfiguration:new tu({fieldName:p.fieldName,providerId:p.providerId,type:m0(p.type),typeName:i}),subjects:p.subjects},p.streamConfiguration?{streamConfiguration:new Hp({consumerInactiveThreshold:p.streamConfiguration.consumerInactiveThreshold,consumerName:p.streamConfiguration.consumerName,streamName:p.streamConfiguration.streamName})}:{})));break}case Ad.PROVIDER_TYPE_REDIS:{d.push(new Xp({engineEventConfiguration:new tu({fieldName:p.fieldName,providerId:p.providerId,type:m0(p.type),typeName:i}),channels:p.channels}));break}default:throw new Error("Fatal: Unknown event provider.")}t.events.nats.push(...u),t.events.kafka.push(...l),t.events.redis.push(...d)}return t}function tK(e){var n,r;let t=[];for(let i of e){let a=i.argumentNames.map(p=>new Vp({name:p,sourceType:zc.FIELD_ARGUMENT})),o=new Kp({argumentsConfiguration:a,fieldName:i.fieldName,typeName:i.typeName}),u=((n=i.requiredScopes)==null?void 0:n.map(p=>new Xc({requiredAndScopes:p})))||[],l=((r=i.requiredScopesByOR)==null?void 0:r.map(p=>new Xc({requiredAndScopes:p})))||[],d=u.length>0;if((i.requiresAuthentication||d)&&(o.authorizationConfiguration=new jp({requiresAuthentication:i.requiresAuthentication||d,requiredOrScopes:u,requiredOrScopesByOr:l})),i.subscriptionFilterCondition){let p=new Vu;Lh(p,i.subscriptionFilterCondition),o.subscriptionFilterCondition=p}t.push(o)}return t}function Lh(e,t){if(t.and!==void 0){let n=[];for(let r of t.and){let i=new Vu;Lh(i,r),n.push(i)}e.and=n;return}if(t.in!==void 0){e.in=new em({fieldPath:t.in.fieldPath,json:JSON.stringify(t.in.values)});return}if(t.not!==void 0){e.not=new Vu,Lh(e.not,t.not);return}if(t.or!==void 0){let n=[];for(let r of t.or){let i=new Vu;Lh(i,r),n.push(i)}e.or=n;return}throw new Error("Fatal: Incoming SubscriptionCondition object was malformed.")}var el;(function(e){e[e.Plugin=0]="Plugin",e[e.Standard=1]="Standard",e[e.GRPC=2]="GRPC"})(el||(el={}));var Ape=(e,t)=>{let n=stringHash(t);return e.stringStorage[n]=t,new Zp({key:n})},Rpe=e=>{switch(e){case"ws":return js.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS;case"sse":return js.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE;case"sse_post":return js.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST}},Ppe=e=>{switch(e){case"auto":return Ks.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO;case"graphql-ws":return Ks.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS;case"graphql-transport-ws":return Ks.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS}},rK=function(e){if(!Rd.ROUTER_COMPATIBILITY_VERSIONS.has(e.routerCompatibilityVersion))throw Zj(e.routerCompatibilityVersion);let t=new Od({defaultFlushInterval:BigInt(500),datasourceConfigurations:[],fieldConfigurations:[],graphqlSchema:"",stringStorage:{},typeConfigurations:[]});for(let n of e.subgraphs){if(!n.configurationDataByTypeName)throw f0("ConfigurationDataByTypeName");if(!n.schema)throw f0("GraphQLSchema");let r={enabled:!0},i=Ape(t,cj((0,nK.lexicographicSortSchema)(n.schema))),{childNodes:a,entityInterfaces:o,events:u,interfaceObjects:l,keys:d,provides:p,requires:E,rootNodes:I}=eK(n.configurationDataByTypeName),v;switch(n.kind){case el.Standard:{r.enabled=!0,r.protocol=Rpe(n.subscriptionProtocol||"ws"),r.websocketSubprotocol=Ppe(n.websocketSubprotocol||"auto"),r.url=new Qr({kind:qu.STATIC_CONFIGURATION_VARIABLE,staticVariableContent:n.subscriptionUrl||n.url});break}case el.Plugin:{v=new bd({mapping:n.mapping,protoSchema:n.protoSchema,plugin:new Yp({name:n.name,version:n.version,imageReference:n.imageReference})});break}case el.GRPC:{v=new bd({mapping:n.mapping,protoSchema:n.protoSchema});break}}let A,U,j;if(u.kafka.length>0||u.nats.length>0||u.redis.length>0){A=xu.PUBSUB,j=new Zc({kafka:u.kafka,nats:u.nats,redis:u.redis});let ee=le=>Rd.ROOT_TYPE_NAMES.has(le.typeName),ne=0,pe=0;for(;ne({id:n.id,name:n.name,routingUrl:n.url})),compatibilityVersion:`${e.routerCompatibilityVersion}:${Rd.COMPOSITION_VERSION}`})};m();T();N();var nl=Ni(Ie());function iK(e){let t;try{t=(0,nl.parse)(e.schema)}catch(n){throw new Error(`could not parse schema for Graph ${e.name}: ${n}`)}return{definitions:t,name:e.name,url:e.url}}function Fpe(e){let t=(0,tl.federateSubgraphs)({subgraphs:e.map(iK),version:tl.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(n=>n.message).join(", ")}`);return{fieldConfigurations:t.fieldConfigurations,sdl:(0,nl.print)(t.federatedGraphAST)}}function wpe(e){let t=(0,tl.federateSubgraphs)({subgraphs:e.map(iK),version:tl.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(r=>r.message).join(", ")}`);return rK({federatedClientSDL:(0,nl.printSchema)(t.federatedGraphClientSchema),federatedSDL:(0,nl.printSchema)(t.federatedGraphSchema),fieldConfigurations:t.fieldConfigurations,routerCompatibilityVersion:tl.LATEST_ROUTER_COMPATIBILITY_VERSION,schemaVersionId:"",subgraphs:e.map((r,i)=>{var l,d;let a=t.subgraphConfigBySubgraphName.get(r.name),o=a==null?void 0:a.schema,u=a==null?void 0:a.configurationDataByTypeName;return{kind:el.Standard,id:`${i}`,name:r.name,url:yb(r.url),sdl:r.schema,subscriptionUrl:yb((l=r.subscription_url)!=null?l:r.url),subscriptionProtocol:(d=r.subscription_protocol)!=null?d:"ws",websocketSubprotocol:r.subscription_protocol==="ws"?r.websocketSubprotocol||"auto":void 0,schema:o,configurationDataByTypeName:u}})}).toJsonString()}return Gm(Lpe);})(); +}`;var It=VR(function(){return Qt(L,$e+"return "+Te).apply(e,M)});if(It.source=Te,By(It))throw It;return It}function HJ(s){return zt(s).toLowerCase()}function zJ(s){return zt(s).toUpperCase()}function WJ(s,c,f){if(s=zt(s),s&&(f||c===e))return z0(s);if(!s||!(c=di(c)))return s;var h=sa(s),O=sa(c),L=W0(h,O),M=X0(h,O)+1;return lu(h,L,M).join("")}function XJ(s,c,f){if(s=zt(s),s&&(f||c===e))return s.slice(0,eA(s)+1);if(!s||!(c=di(c)))return s;var h=sa(s),O=X0(h,sa(c))+1;return lu(h,0,O).join("")}function ZJ(s,c,f){if(s=zt(s),s&&(f||c===e))return s.replace(Bh,"");if(!s||!(c=di(c)))return s;var h=sa(s),O=W0(h,sa(c));return lu(h,O).join("")}function eH(s,c){var f=He,h=W;if(An(c)){var O="separator"in c?c.separator:O;f="length"in c?ht(c.length):f,h="omission"in c?di(c.omission):h}s=zt(s);var L=s.length;if(sl(s)){var M=sa(s);L=M.length}if(f>=L)return s;var V=f-ol(h);if(V<1)return h;var Y=M?lu(M,0,V).join(""):s.slice(0,V);if(O===e)return Y+h;if(M&&(V+=Y.length-V),Uy(O)){if(s.slice(V).search(O)){var ce,le=Y;for(O.global||(O=Xh(O.source,zt(h0.exec(O))+"g")),O.lastIndex=0;ce=O.exec(le);)var Te=ce.index;Y=Y.slice(0,Te===e?V:Te)}}else if(s.indexOf(di(O),V)!=V){var Ae=Y.lastIndexOf(O);Ae>-1&&(Y=Y.slice(0,Ae))}return Y+h}function tH(s){return s=zt(s),s&&fK.test(s)?s.replace(N0,P$):s}var nH=pl(function(s,c,f){return s+(f?" ":"")+c.toUpperCase()}),xy=jA("toUpperCase");function qR(s,c,f){return s=zt(s),c=f?e:c,c===e?S$(s)?L$(s):T$(s):s.match(c)||[]}var VR=_t(function(s,c){try{return ci(s,e,c)}catch(f){return By(f)?f:new dt(f)}}),rH=ys(function(s,c){return Si(c,function(f){f=qa(f),Es(s,f,Ly(s[f],s))}),s});function iH(s){var c=s==null?0:s.length,f=Ze();return s=c?On(s,function(h){if(typeof h[1]!="function")throw new Di(i);return[f(h[0]),h[1]]}):[],_t(function(h){for(var O=-1;++Orn)return[];var f=hn,h=Sr(s,hn);c=Ze(c),s-=hn;for(var O=Hh(h,c);++f0||c<0)?new bt(f):(s<0?f=f.takeRight(-s):s&&(f=f.drop(s)),c!==e&&(c=ht(c),f=c<0?f.dropRight(-c):f.take(c-s)),f)},bt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},bt.prototype.toArray=function(){return this.take(hn)},Ma(bt.prototype,function(s,c){var f=/^(?:filter|find|map|reject)|While$/.test(c),h=/^(?:head|last)$/.test(c),O=w[h?"take"+(c=="last"?"Right":""):c],L=h||/^find/.test(c);O&&(w.prototype[c]=function(){var M=this.__wrapped__,V=h?[1]:arguments,Y=M instanceof bt,ce=V[0],le=Y||ft(M),Te=function(Dt){var wt=O.apply(w,ru([Dt],V));return h&&Ae?wt[0]:wt};le&&f&&typeof ce=="function"&&ce.length!=1&&(Y=le=!1);var Ae=this.__chain__,$e=!!this.__actions__.length,et=L&&!Ae,It=Y&&!$e;if(!L&&le){M=It?M:new bt(this);var tt=s.apply(M,V);return tt.__actions__.push({func:Bm,args:[Te],thisArg:e}),new bi(tt,Ae)}return et&&It?s.apply(this,V):(tt=this.thru(Te),et?h?tt.value()[0]:tt.value():tt)})}),Si(["pop","push","shift","sort","splice","unshift"],function(s){var c=om[s],f=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",h=/^(?:pop|shift)$/.test(s);w.prototype[s]=function(){var O=arguments;if(h&&!this.__chain__){var L=this.value();return c.apply(ft(L)?L:[],O)}return this[f](function(M){return c.apply(ft(M)?M:[],O)})}}),Ma(bt.prototype,function(s,c){var f=w[c];if(f){var h=f.name+"";sn.call(ll,h)||(ll[h]=[]),ll[h].push({name:c,func:f})}}),ll[Am(e,U).name]=[{name:"wrapper",func:e}],bt.prototype.clone=tG,bt.prototype.reverse=nG,bt.prototype.value=rG,w.prototype.at=wY,w.prototype.chain=LY,w.prototype.commit=CY,w.prototype.next=BY,w.prototype.plant=kY,w.prototype.reverse=MY,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=xY,w.prototype.first=w.prototype.head,Fd&&(w.prototype[Fd]=UY),w},au=C$();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(fr._=au,define(function(){return au})):$u?(($u.exports=au)._=au,Vh._=au):fr._=au}).call(Ed)});var bV=F(Yc=>{"use strict";m();T();N();Object.defineProperty(Yc,"__esModule",{value:!0});Yc.FederationFactory=void 0;Yc.federateSubgraphs=Lfe;Yc.federateSubgraphsWithContracts=Cfe;Yc.federateSubgraphsContract=Bfe;var Re=_e(),vV=Su(),$r=Fr(),Pe=$i(),Gc=yT(),Qc=dd(),Gr=yp(),ah=TE(),Ap=Du(),Rfe=lb(),Pfe=Ip(),OV=Gf(),ve=$l(),Ffe=pb(),SV=_V(),hd=ih(),Se=zn(),sh=ql(),me=wr(),wfe=gp(),Uu=Qf(),uh,DV,oh=class{constructor({authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,entityInterfaceFederationDataByTypeName:i,fieldCoordsByNamedTypeName:a,internalGraph:o,internalSubgraphBySubgraphName:u,options:l,warnings:d}){ec(this,uh);g(this,"authorizationDataByParentTypeName");g(this,"coordsByNamedTypeName",new Map);g(this,"directiveDefinitionByName",new Map);g(this,"clientDefinitions",[]);g(this,"currentSubgraphName","");g(this,"concreteTypeNamesByAbstractTypeName");g(this,"subgraphNamesByNamedTypeNameByFieldCoords",new Map);g(this,"entityDataByTypeName");g(this,"entityInterfaceFederationDataByTypeName");g(this,"errors",[]);g(this,"fieldConfigurationByFieldCoords",new Map);g(this,"fieldCoordsByNamedTypeName");g(this,"inaccessibleCoords",new Set);g(this,"inaccessibleRequiredInputValueErrorByCoords",new Map);g(this,"internalGraph");g(this,"internalSubgraphBySubgraphName");g(this,"invalidORScopesCoords",new Set);g(this,"isMaxDepth",!1);g(this,"isVersionTwo",!1);g(this,"namedInputValueTypeNames",new Set);g(this,"namedOutputTypeNames",new Set);g(this,"options");g(this,"parentDefinitionDataByTypeName",new Map);g(this,"parentTagDataByTypeName",new Map);g(this,"persistedDirectiveDefinitionByDirectiveName",new Map([[Se.AUTHENTICATED,Uu.AUTHENTICATED_DEFINITION],[Se.DEPRECATED,Uu.DEPRECATED_DEFINITION],[Se.INACCESSIBLE,Uu.INACCESSIBLE_DEFINITION],[Se.ONE_OF,Uu.ONE_OF_DEFINITION],[Se.REQUIRES_SCOPES,Uu.REQUIRES_SCOPES_DEFINITION],[Se.SEMANTIC_NON_NULL,Uu.SEMANTIC_NON_NULL_DEFINITION],[Se.TAG,Uu.TAG_DEFINITION]]));g(this,"potentialPersistedDirectiveDefinitionDataByDirectiveName",new Map);g(this,"referencedPersistedDirectiveNames",new Set);g(this,"routerDefinitions",[]);g(this,"subscriptionFilterDataByFieldPath",new Map);g(this,"tagNamesByCoords",new Map);g(this,"warnings");this.authorizationDataByParentTypeName=t,this.options=l!=null?l:{},this.concreteTypeNamesByAbstractTypeName=n,this.entityDataByTypeName=r,this.entityInterfaceFederationDataByTypeName=i,this.fieldCoordsByNamedTypeName=a,this.internalGraph=o,this.internalSubgraphBySubgraphName=u,this.warnings=d}extractPersistedDirectives({data:t,directivesByName:n}){for(let[r,i]of n)if(this.persistedDirectiveDefinitionByDirectiveName.get(r)&&(this.referencedPersistedDirectiveNames.add(r),!(Se.AUTHORIZATION_DIRECTIVES.has(r)||i.length<1)))switch(r){case Se.DEPRECATED:{t.isDeprecated=!0,(0,ve.upsertDeprecatedDirective)(t,i[0]);break}case Se.TAG:{(0,ve.upsertTagDirectives)(t,i);break}default:{let o=t.directivesByName.get(r);if(!o){t.directivesByName.set(r,[...i]);break}if(Se.NON_REPEATABLE_PERSISTED_DIRECTIVES.has(r))break;o.push(...i)}}return t}getValidImplementedInterfaces(t){var o;let n=[];if(t.implementedInterfaceTypeNames.size<1)return n;let r=(0,ve.isNodeDataInaccessible)(t),i=new Map,a=new Map;for(let u of t.implementedInterfaceTypeNames){n.push((0,$r.stringToNamedTypeNode)(u));let l=(0,me.getOrThrowError)(this.parentDefinitionDataByTypeName,u,Se.PARENT_DEFINITION_DATA);if(l.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION){a.set(l.name,(0,me.kindToNodeType)(l.kind));continue}let d={invalidFieldImplementations:new Map,unimplementedFields:[]},p=!1;for(let[E,I]of l.fieldDataByName){let v=!1,A=t.fieldDataByName.get(E);if(!A){p=!0,d.unimplementedFields.push(E);continue}let U={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,ah.printTypeNode)(I.node.type),unimplementedArguments:new Set};(0,ve.isTypeValidImplementation)(I.node.type,A.node.type,this.concreteTypeNamesByAbstractTypeName)||(p=!0,v=!0,U.implementedResponseType=(0,ah.printTypeNode)(A.node.type));let j=new Set;for(let[J,re]of I.argumentDataByName){let te=re.node;j.add(J);let pe=(o=A.argumentDataByName.get(J))==null?void 0:o.node;if(!pe){p=!0,v=!0,U.unimplementedArguments.add(J);continue}let Ne=(0,ah.printTypeNode)(pe.type),Ie=(0,ah.printTypeNode)(te.type);Ie!==Ne&&(p=!0,v=!0,U.invalidImplementedArguments.push({actualType:Ne,argumentName:J,expectedType:Ie}))}for(let[J,re]of A.argumentDataByName){let te=re.node;j.has(J)||te.type.kind===Re.Kind.NON_NULL_TYPE&&(p=!0,v=!0,U.invalidAdditionalArguments.add(J))}!r&&A.isInaccessible&&!I.isInaccessible&&(p=!0,v=!0,U.isInaccessible=!0),v&&d.invalidFieldImplementations.set(E,U)}p&&i.set(u,d)}return a.size>0&&this.errors.push((0,Pe.invalidImplementedTypeError)(t.name,a)),i.size>0&&this.errors.push((0,Pe.invalidInterfaceImplementationError)(t.node.name.value,(0,me.kindToNodeType)(t.kind),i)),n}addValidPrimaryKeyTargetsToEntityData(t){var p;let n=this.entityDataByTypeName.get(t);if(!n)return;let r=(0,me.getOrThrowError)(this.internalSubgraphBySubgraphName,this.currentSubgraphName,"internalSubgraphBySubgraphName"),i=r.parentDefinitionDataByTypeName,a=i.get(n.typeName);if(!a||a.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)throw(0,Pe.incompatibleParentKindFatalError)(n.typeName,Re.Kind.OBJECT_TYPE_DEFINITION,(a==null?void 0:a.kind)||Re.Kind.NULL);let o=r.configurationDataByTypeName.get(n.typeName);if(!o)return;let u=[],l=this.internalGraph.nodeByNodeName.get(`${this.currentSubgraphName}.${n.typeName}`);(0,Gc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:n,implicitKeys:u,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l});for(let[E,I]of this.entityInterfaceFederationDataByTypeName){if(!((p=I.concreteTypeNames)!=null&&p.has(n.typeName)))continue;let v=this.entityDataByTypeName.get(E);v&&(0,Gc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:v,implicitKeys:u,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l})}if(u.length<1)return;if(!o.keys||o.keys.length<1){o.isRootNode=!0,o.keys=u;return}let d=new Set(o.keys.map(E=>E.selectionSet));for(let E of u)d.has(E.selectionSet)||(o.keys.push(E),d.add(E.selectionSet))}addValidPrimaryKeyTargetsFromInterfaceObject(t,n,r,i){let a=t.parentDefinitionDataByTypeName,o=a.get(n);if(!o||!(0,ve.isParentDataCompositeOutputType)(o))throw(0,Pe.incompatibleParentKindFatalError)(n,Re.Kind.INTERFACE_TYPE_DEFINITION,(o==null?void 0:o.kind)||Re.Kind.NULL);let u=(0,me.getOrThrowError)(t.configurationDataByTypeName,r.typeName,"internalSubgraph.configurationDataByTypeName"),l=[];if((0,Gc.validateImplicitFieldSets)({conditionalFieldDataByCoords:t.conditionalFieldDataByCoordinates,currentSubgraphName:t.name,entityData:r,implicitKeys:l,objectData:o,parentDefinitionDataByTypeName:a,graphNode:i}),l.length<1)return;if(!u.keys||u.keys.length<1){u.isRootNode=!0,u.keys=l;return}let d=new Set(u.keys.map(p=>p.selectionSet));for(let p of l)d.has(p.selectionSet)||(u.keys.push(p),d.add(p.selectionSet))}getEnumValueMergeMethod(t){return this.namedInputValueTypeNames.has(t)?this.namedOutputTypeNames.has(t)?ve.MergeMethod.CONSISTENT:ve.MergeMethod.INTERSECTION:ve.MergeMethod.UNION}generateTagData(){for(let[t,n]of this.tagNamesByCoords){let r=t.split(Se.LITERAL_PERIOD);if(r.length<1)continue;let i=(0,me.getValueOrDefault)(this.parentTagDataByTypeName,r[0],()=>(0,Gc.newParentTagData)(r[0]));switch(r.length){case 1:for(let l of n)i.tagNames.add(l);break;case 2:let a=(0,me.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Gc.newChildTagData)(r[1]));for(let l of n)a.tagNames.add(l);break;case 3:let o=(0,me.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Gc.newChildTagData)(r[1])),u=(0,me.getValueOrDefault)(o.tagNamesByArgumentName,r[2],()=>new Set);for(let l of n)u.add(l);break;default:break}}}upsertEnumValueData(t,n,r){let i=t.get(n.name),a=i||this.copyEnumValueData(n);this.extractPersistedDirectives({data:a.persistedDirectivesData,directivesByName:n.directivesByName});let o=(0,ve.isNodeDataInaccessible)(n);if((r||o)&&this.inaccessibleCoords.add(a.federatedCoords),this.recordTagNamesByCoords(a,a.federatedCoords),!i){t.set(a.name,a);return}a.appearances+=1,(0,me.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,ve.setLongestDescription)(a,n),(0,me.addIterableToSet)({source:n.subgraphNames,target:a.subgraphNames})}upsertInputValueData(t,n,r,i){let a=t.get(n.name),o=a||this.copyInputValueData(n);if(this.extractPersistedDirectives({data:o.persistedDirectivesData,directivesByName:n.directivesByName}),this.recordTagNamesByCoords(o,`${r}.${o.name}`),this.namedInputValueTypeNames.add(o.namedTypeName),(0,me.getValueOrDefault)(this.coordsByNamedTypeName,o.namedTypeName,()=>new Set).add(o.federatedCoords),!a){t.set(o.name,o);return}(0,me.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,o.configureDescriptionDataBySubgraphName),(0,ve.setLongestDescription)(o,n),(0,me.addIterableToSet)({source:n.requiredSubgraphNames,target:o.requiredSubgraphNames}),(0,me.addIterableToSet)({source:n.subgraphNames,target:o.subgraphNames}),this.handleInputValueInaccessibility(i,o,r);let u=(0,hd.getMostRestrictiveMergedTypeNode)(o.type,n.type,o.originalCoords,this.errors);u.success?o.type=u.typeNode:this.errors.push((0,Pe.incompatibleMergedTypesError)({actualType:u.actualType,isArgument:a.isArgument,coords:a.federatedCoords,expectedType:u.expectedType})),(0,ve.compareAndValidateInputValueDefaultValues)(o,n,this.errors)}handleInputValueInaccessibility(t,n,r){if(t){this.inaccessibleRequiredInputValueErrorByCoords.delete(n.federatedCoords),this.inaccessibleCoords.add(n.federatedCoords);return}if((0,ve.isNodeDataInaccessible)(n)){if((0,ve.isTypeRequired)(n.type)){this.inaccessibleRequiredInputValueErrorByCoords.set(n.federatedCoords,(0,Pe.inaccessibleRequiredInputValueError)(n,r));return}this.inaccessibleCoords.add(n.federatedCoords)}}handleSubscriptionFilterDirective(t,n){let r=t.directivesByName.get(Se.SUBSCRIPTION_FILTER);if(!r)return;let i=(0,me.getFirstEntry)(t.subgraphNames);if(i===void 0){this.errors.push((0,Pe.unknownFieldSubgraphNameError)(t.federatedCoords));return}this.subscriptionFilterDataByFieldPath.set(t.federatedCoords,{directive:r[0],fieldData:n||t,directiveSubgraphName:i})}federateOutputType({current:t,other:n,coords:r,mostRestrictive:i}){n=(0,vV.getMutableTypeNode)(n,r,this.errors);let a={kind:t.kind},o=hd.DivergentType.NONE,u=a;for(let l=0;lnew Set)})}upsertFieldData(t,n,r){let i=t.get(n.name),a=i||this.copyFieldData(n,r||(0,ve.isNodeDataInaccessible)(n));(0,me.getValueOrDefault)(this.coordsByNamedTypeName,n.namedTypeName,()=>new Set).add(a.federatedCoords),this.namedOutputTypeNames.add(n.namedTypeName),this.handleSubscriptionFilterDirective(n,a),this.extractPersistedDirectives({data:a.persistedDirectivesData,directivesByName:n.directivesByName});let o=r||(0,ve.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.federatedCoords),this.recordTagNamesByCoords(a,a.federatedCoords),!i){t.set(a.name,a);return}let u=this.federateOutputType({current:a.type,other:n.type,coords:a.federatedCoords,mostRestrictive:!1});if(u.success)if(a.type=u.typeNode,a.namedTypeName!==n.namedTypeName){let l=(0,me.getValueOrDefault)(this.subgraphNamesByNamedTypeNameByFieldCoords,a.federatedCoords,()=>new Map),d=(0,me.getValueOrDefault)(l,a.namedTypeName,()=>new Set);if(d.size<1)for(let p of a.subgraphNames)n.subgraphNames.has(p)||d.add(p);(0,me.addIterableToSet)({source:n.subgraphNames,target:(0,me.getValueOrDefault)(l,n.namedTypeName,()=>new Set)})}else this.addSubgraphNameToExistingFieldNamedTypeDisparity(n);for(let l of n.argumentDataByName.values())this.upsertInputValueData(a.argumentDataByName,l,a.federatedCoords,o);(0,me.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,i.configureDescriptionDataBySubgraphName),(0,ve.setLongestDescription)(a,n),a.isInaccessible||(a.isInaccessible=n.isInaccessible),(0,me.addNewObjectValueMapEntries)(n.externalFieldDataBySubgraphName,a.externalFieldDataBySubgraphName),(0,me.addMapEntries)({source:n.isShareableBySubgraphName,target:a.isShareableBySubgraphName}),(0,me.addMapEntries)({source:n.nullLevelsBySubgraphName,target:a.nullLevelsBySubgraphName}),(0,me.addIterableToSet)({source:n.subgraphNames,target:a.subgraphNames})}getClientSchemaUnionMembers(t){let n=[];for(let[r,i]of t.memberByMemberTypeName)this.inaccessibleCoords.has(r)||n.push(i);return n}recordTagNamesByCoords(t,n){let r=n||t.name;if(t.persistedDirectivesData.tagDirectiveByName.size<1)return;let i=(0,me.getValueOrDefault)(this.tagNamesByCoords,r,()=>new Set);for(let a of t.persistedDirectivesData.tagDirectiveByName.keys())i.add(a)}copyMutualParentDefinitionData(t){return{configureDescriptionDataBySubgraphName:(0,me.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,me.copyArrayValueMap)(t.directivesByName),extensionType:t.extensionType,name:t.name,persistedDirectivesData:this.extractPersistedDirectives({data:(0,ve.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),description:(0,ve.getInitialFederatedDescription)(t)}}copyEnumValueData(t){return{appearances:t.appearances,configureDescriptionDataBySubgraphName:(0,me.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),federatedCoords:t.federatedCoords,directivesByName:(0,me.copyArrayValueMap)(t.directivesByName),kind:t.kind,name:t.name,node:{directives:[],kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},parentTypeName:t.parentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,ve.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),subgraphNames:new Set(t.subgraphNames),description:(0,ve.getInitialFederatedDescription)(t)}}copyInputValueData(t){return{configureDescriptionDataBySubgraphName:(0,me.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,me.copyArrayValueMap)(t.directivesByName),federatedCoords:t.federatedCoords,fieldName:t.fieldName,includeDefaultValue:t.includeDefaultValue,isArgument:t.isArgument,kind:t.kind,name:t.name,namedTypeKind:t.namedTypeKind,namedTypeName:t.namedTypeName,node:{directives:[],kind:Re.Kind.INPUT_VALUE_DEFINITION,name:(0,$r.stringToNameNode)(t.name),type:t.type},originalCoords:t.originalCoords,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,ve.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),renamedParentTypeName:t.renamedParentTypeName,requiredSubgraphNames:new Set(t.requiredSubgraphNames),subgraphNames:new Set(t.subgraphNames),type:t.type,defaultValue:t.defaultValue,description:(0,ve.getInitialFederatedDescription)(t)}}copyInputValueDataByValueName(t,n,r){let i=new Map;for(let[a,o]of t){let u=this.copyInputValueData(o);this.handleInputValueInaccessibility(n,u,r),(0,me.getValueOrDefault)(this.coordsByNamedTypeName,u.namedTypeName,()=>new Set).add(u.federatedCoords),this.namedInputValueTypeNames.add(u.namedTypeName),this.recordTagNamesByCoords(u,`${r}.${o.name}`),i.set(a,u)}return i}copyFieldData(t,n){return{argumentDataByName:this.copyInputValueDataByValueName(t.argumentDataByName,n,t.federatedCoords),configureDescriptionDataBySubgraphName:(0,me.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,me.copyArrayValueMap)(t.directivesByName),externalFieldDataBySubgraphName:(0,me.copyObjectValueMap)(t.externalFieldDataBySubgraphName),federatedCoords:t.federatedCoords,inheritedDirectiveNames:new Set,isInaccessible:t.isInaccessible,isShareableBySubgraphName:new Map(t.isShareableBySubgraphName),kind:t.kind,name:t.name,namedTypeKind:t.namedTypeKind,namedTypeName:t.namedTypeName,node:{arguments:[],directives:[],kind:t.kind,name:(0,$r.stringToNameNode)(t.name),type:t.type},nullLevelsBySubgraphName:t.nullLevelsBySubgraphName,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,ve.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),renamedParentTypeName:t.renamedParentTypeName,subgraphNames:new Set(t.subgraphNames),type:t.type,description:(0,ve.getInitialFederatedDescription)(t)}}copyEnumValueDataByName(t,n){let r=new Map;for(let[i,a]of t){let o=this.copyEnumValueData(a);this.recordTagNamesByCoords(o,o.federatedCoords),(n||(0,ve.isNodeDataInaccessible)(o))&&this.inaccessibleCoords.add(o.federatedCoords),r.set(i,o)}return r}copyFieldDataByName(t,n){let r=new Map;for(let[i,a]of t){let o=n||(0,ve.isNodeDataInaccessible)(a),u=this.copyFieldData(a,o);this.handleSubscriptionFilterDirective(u),(0,me.getValueOrDefault)(this.coordsByNamedTypeName,u.namedTypeName,()=>new Set).add(u.federatedCoords),this.namedOutputTypeNames.add(u.namedTypeName),this.recordTagNamesByCoords(u,u.federatedCoords),o&&this.inaccessibleCoords.add(u.federatedCoords),r.set(i,u)}return r}copyParentDefinitionData(t){let n=this.copyMutualParentDefinitionData(t);switch(t.kind){case Re.Kind.ENUM_TYPE_DEFINITION:return $(k({},n),{appearances:t.appearances,enumValueDataByName:this.copyEnumValueDataByName(t.enumValueDataByName,t.isInaccessible),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:return $(k({},n),{inputValueDataByName:this.copyInputValueDataByValueName(t.inputValueDataByName,t.isInaccessible,t.name),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.INTERFACE_TYPE_DEFINITION:return $(k({},n),{fieldDataByName:this.copyFieldDataByName(t.fieldDataByName,t.isInaccessible),implementedInterfaceTypeNames:new Set(t.implementedInterfaceTypeNames),isEntity:t.isEntity,isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},requireFetchReasonsFieldNames:new Set,subgraphNames:new Set(t.subgraphNames)});case Re.Kind.OBJECT_TYPE_DEFINITION:return $(k({},n),{fieldDataByName:this.copyFieldDataByName(t.fieldDataByName,t.isInaccessible),implementedInterfaceTypeNames:new Set(t.implementedInterfaceTypeNames),isEntity:t.isEntity,isInaccessible:t.isInaccessible,isRootType:t.isRootType,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.renamedTypeName||t.name)},requireFetchReasonsFieldNames:new Set,renamedTypeName:t.renamedTypeName,subgraphNames:new Set(t.subgraphNames)});case Re.Kind.SCALAR_TYPE_DEFINITION:return $(k({},n),{kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.UNION_TYPE_DEFINITION:return $(k({},n),{kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},memberByMemberTypeName:new Map(t.memberByMemberTypeName),subgraphNames:new Set(t.subgraphNames)})}}getParentTargetData({existingData:t,incomingData:n}){if(!t){let r=this.copyParentDefinitionData(n);return(0,ve.isParentDataRootType)(r)&&(r.extensionType=OV.ExtensionType.NONE),r}return this.extractPersistedDirectives({data:t.persistedDirectivesData,directivesByName:n.directivesByName}),t}upsertParentDefinitionData(t,n){let r=this.entityInterfaceFederationDataByTypeName.get(t.name),i=this.parentDefinitionDataByTypeName.get(t.name),a=this.getParentTargetData({existingData:i,incomingData:t});this.recordTagNamesByCoords(a);let o=(0,ve.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.name),r&&r.interfaceObjectSubgraphNames.has(n)){if(i&&i.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,Pe.incompatibleParentTypeMergeError)({existingData:i,incomingSubgraphName:n}));return}a.kind=Re.Kind.INTERFACE_TYPE_DEFINITION,a.node.kind=Re.Kind.INTERFACE_TYPE_DEFINITION}if(!i){this.parentDefinitionDataByTypeName.set(a.name,a);return}if(a.kind!==t.kind&&(!r||!r.interfaceObjectSubgraphNames.has(n)||a.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION||t.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)){this.errors.push((0,Pe.incompatibleParentTypeMergeError)({existingData:a,incomingNodeType:(0,me.kindToNodeType)(t.kind),incomingSubgraphName:n}));return}switch((0,me.addNewObjectValueMapEntries)(t.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,ve.setLongestDescription)(a,t),(0,ve.setParentDataExtensionType)(a,t),a.kind){case Re.Kind.ENUM_TYPE_DEFINITION:if(!(0,ve.areKindsEqual)(a,t))return;a.appearances+=1,a.isInaccessible||(a.isInaccessible=o),(0,me.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});for(let l of t.enumValueDataByName.values())this.upsertEnumValueData(a.enumValueDataByName,l,o);return;case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:if(!(0,ve.areKindsEqual)(a,t))return;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,me.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});for(let l of t.inputValueDataByName.values())this.upsertInputValueData(a.inputValueDataByName,l,a.name,a.isInaccessible);return;case Re.Kind.INTERFACE_TYPE_DEFINITION:case Re.Kind.OBJECT_TYPE_DEFINITION:let u=t;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,me.addIterableToSet)({source:u.implementedInterfaceTypeNames,target:a.implementedInterfaceTypeNames}),(0,me.addIterableToSet)({source:u.subgraphNames,target:a.subgraphNames});for(let l of u.fieldDataByName.values())this.upsertFieldData(a.fieldDataByName,l,a.isInaccessible);return;case Re.Kind.UNION_TYPE_DEFINITION:if(!(0,ve.areKindsEqual)(a,t))return;(0,me.addMapEntries)({source:t.memberByMemberTypeName,target:a.memberByMemberTypeName}),(0,me.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});return;default:(0,me.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});return}}propagateInaccessibilityToExistingChildren(t){switch(t.kind){case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:for(let n of t.inputValueDataByName.values())this.inaccessibleCoords.add(n.federatedCoords);break;default:for(let n of t.fieldDataByName.values()){this.inaccessibleCoords.add(n.federatedCoords);for(let r of n.argumentDataByName.values())this.inaccessibleCoords.add(r.federatedCoords)}}}upsertPersistedDirectiveDefinitionData(t,n){let r=t.name,i=this.potentialPersistedDirectiveDefinitionDataByDirectiveName.get(r);if(!i){if(n>1)return;let a=new Map;for(let o of t.argumentDataByName.values())this.namedInputValueTypeNames.add(o.namedTypeName),this.upsertInputValueData(a,o,`@${t.name}`,!1);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.set(r,{argumentDataByName:a,executableLocations:new Set(t.executableLocations),name:r,repeatable:t.repeatable,subgraphNames:new Set(t.subgraphNames),description:t.description});return}if(i.subgraphNames.size+1!==n){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}if((0,ve.setMutualExecutableLocations)(i,t.executableLocations),i.executableLocations.size<1){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}for(let a of t.argumentDataByName.values())this.namedInputValueTypeNames.add((0,vV.getTypeNodeNamedTypeName)(a.type)),this.upsertInputValueData(i.argumentDataByName,a,`@${i.name}`,!1);(0,ve.setLongestDescription)(i,t),i.repeatable&&(i.repeatable=t.repeatable),(0,me.addIterableToSet)({source:t.subgraphNames,target:i.subgraphNames})}shouldUpdateFederatedFieldAbstractNamedType(t,n){if(!t)return!1;let r=this.concreteTypeNamesByAbstractTypeName.get(t);if(!r||r.size<1)return!1;for(let i of n)if(!r.has(i))return!1;return!0}updateTypeNodeNamedType(t,n){let r=t;for(let i=0;i1){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}break}case Re.Kind.UNION_TYPE_DEFINITION:{if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}l=p;break}default:{this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));break}}}if(o.size<1&&!l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}let d=l;if(o.size>0){if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}for(let p of o.keys()){d=p;for(let[E,I]of o)if(p!==E&&!I.implementedInterfaceTypeNames.has(p)){d="";break}if(d)break}}if(!this.shouldUpdateFederatedFieldAbstractNamedType(d,u)){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}a.namedTypeName=d,this.updateTypeNodeNamedType(a.type,d)}}federateInternalSubgraphData(){let t=0,n=!1;for(let r of this.internalSubgraphBySubgraphName.values()){t+=1,this.currentSubgraphName=r.name,this.isVersionTwo||(this.isVersionTwo=r.isVersionTwo),(0,Ffe.renameRootTypes)(this,r);for(let i of r.parentDefinitionDataByTypeName.values())this.upsertParentDefinitionData(i,r.name);if(!n){if(!r.persistedDirectiveDefinitionDataByDirectiveName.size){n=!0;continue}for(let i of r.persistedDirectiveDefinitionDataByDirectiveName.values())this.upsertPersistedDirectiveDefinitionData(i,t);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.size<1&&(n=!0)}}this.handleDisparateFieldNamedTypes()}handleInterfaceObjectForInternalGraph({entityData:t,internalSubgraph:n,interfaceObjectData:r,interfaceObjectNode:i,resolvableKeyFieldSets:a,subgraphName:o}){let u=this.internalGraph.addOrUpdateNode(t.typeName),l=this.internalGraph.addEntityDataNode(t.typeName);for(let p of i.satisfiedFieldSets)u.satisfiedFieldSets.add(p),a.has(p)&&l.addTargetSubgraphByFieldSet(p,o);let d=r.fieldDatasBySubgraphName.get(o);for(let{name:p,namedTypeName:E}of d||[])this.internalGraph.addEdge(u,this.internalGraph.addOrUpdateNode(E),p);this.internalGraph.addEdge(i,u,t.typeName,!0),this.addValidPrimaryKeyTargetsFromInterfaceObject(n,i.typeName,t,u)}handleEntityInterfaces(){var t;for(let[n,r]of this.entityInterfaceFederationDataByTypeName){let i=(0,me.getOrThrowError)(this.parentDefinitionDataByTypeName,n,Se.PARENT_DEFINITION_DATA);if(i.kind===Re.Kind.INTERFACE_TYPE_DEFINITION)for(let a of r.interfaceObjectSubgraphNames){let o=(0,me.getOrThrowError)(this.internalSubgraphBySubgraphName,a,"internalSubgraphBySubgraphName"),u=o.configurationDataByTypeName,l=this.concreteTypeNamesByAbstractTypeName.get(n);if(!l)continue;let d=(0,me.getOrThrowError)(u,n,"configurationDataByTypeName"),p=d.keys;if(!p)continue;d.entityInterfaceConcreteTypeNames=new Set(r.concreteTypeNames),this.internalGraph.setSubgraphName(a);let E=this.internalGraph.addOrUpdateNode(n,{isAbstract:!0});for(let I of l){let v=(0,me.getOrThrowError)(this.parentDefinitionDataByTypeName,I,Se.PARENT_DEFINITION_DATA);if(!(0,Gr.isObjectDefinitionData)(v))continue;let A=(0,me.getOrThrowError)(this.entityDataByTypeName,I,"entityDataByTypeName");A.subgraphNames.add(a);let U=u.get(I);if(U)if((0,me.addIterableToSet)({source:d.fieldNames,target:U.fieldNames}),!U.keys)U.keys=[...p];else e:for(let te of p){for(let{selectionSet:pe}of U.keys)if(te.selectionSet===pe)continue e;U.keys.push(te)}else u.set(I,{fieldNames:new Set(d.fieldNames),isRootNode:!0,keys:[...p],typeName:I});let j=new Set;for(let te of p.filter(pe=>!pe.disableEntityResolver))j.add(te.selectionSet);let J=this.authorizationDataByParentTypeName.get(n),re=(0,me.getOrThrowError)(o.parentDefinitionDataByTypeName,n,"internalSubgraph.parentDefinitionDataByTypeName");if((0,Gr.isObjectDefinitionData)(re)){for(let[te,pe]of re.fieldDataByName){let Ne=`${I}.${te}`;(0,me.getValueOrDefault)(this.fieldCoordsByNamedTypeName,pe.namedTypeName,()=>new Set).add(Ne);let Ie=J==null?void 0:J.fieldAuthDataByFieldName.get(te);if(Ie){let W=(0,me.getValueOrDefault)(this.authorizationDataByParentTypeName,I,()=>(0,Gr.newAuthorizationData)(I));(0,Gr.upsertFieldAuthorizationData)(W.fieldAuthDataByFieldName,Ie)||this.invalidORScopesCoords.add(Ne)}let Ue=v.fieldDataByName.get(te);if(Ue){let W=(t=pe.isShareableBySubgraphName.get(a))!=null?t:!1;Ue.isShareableBySubgraphName.set(a,W),Ue.subgraphNames.add(a);let Oe=pe.externalFieldDataBySubgraphName.get(a);if(!Oe)continue;Ue.externalFieldDataBySubgraphName.set(a,k({},Oe));continue}let He=i.isInaccessible||v.isInaccessible||pe.isInaccessible;v.fieldDataByName.set(te,this.copyFieldData(pe,He))}this.handleInterfaceObjectForInternalGraph({internalSubgraph:o,subgraphName:a,interfaceObjectData:r,interfaceObjectNode:E,resolvableKeyFieldSets:j,entityData:A})}}}}}fieldDataToGraphFieldData(t){var n;return{externalSubgraphNames:new Set,name:t.name,namedTypeName:t.namedTypeName,isLeaf:(0,Gr.isNodeLeaf)((n=this.parentDefinitionDataByTypeName.get(t.namedTypeName))==null?void 0:n.kind),subgraphNames:t.subgraphNames}}getValidFlattenedPersistedDirectiveNodeArray(t){var i;let n=(0,Gr.getNodeCoords)(t),r=[];for(let[a,o]of t.persistedDirectivesData.directivesByName){if(a===Se.SEMANTIC_NON_NULL&&(0,ve.isFieldData)(t)){r.push((0,me.generateSemanticNonNullDirective)((i=(0,me.getFirstEntry)(t.nullLevelsBySubgraphName))!=null?i:new Set([0])));continue}let u=this.persistedDirectiveDefinitionByDirectiveName.get(a);if(u){if(o.length<2){r.push(...o);continue}if(!u.repeatable){this.errors.push((0,Pe.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}r.push(...o)}}return r}getRouterPersistedDirectiveNodes(t){let n=[...t.persistedDirectivesData.tagDirectiveByName.values()];return t.persistedDirectivesData.isDeprecated&&n.push((0,ve.generateDeprecatedDirective)(t.persistedDirectivesData.deprecatedReason)),n.push(...this.getValidFlattenedPersistedDirectiveNodeArray(t)),n}getFederatedGraphNodeDescription(t){if(t.configureDescriptionDataBySubgraphName.size<1)return t.description;let n=[],r="";for(let[i,{propagate:a,description:o}]of t.configureDescriptionDataBySubgraphName)a&&(n.push(i),r=o);if(n.length===1)return(0,Gc.getDescriptionFromString)(r);if(n.length<1)return t.description;this.errors.push((0,Pe.configureDescriptionPropagationError)((0,ve.getDefinitionDataCoords)(t,!0),n))}getNodeForRouterSchemaByData(t){return t.node.name=(0,$r.stringToNameNode)(t.name),t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}getNodeWithPersistedDirectivesByInputValueData(t){return t.node.name=(0,$r.stringToNameNode)(t.name),t.node.type=t.type,t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.includeDefaultValue&&(t.node.defaultValue=t.defaultValue),t.node}getValidFieldArgumentNodes(t){let n=[],r=[],i=[],a=`${t.renamedParentTypeName}.${t.name}`;for(let[o,u]of t.argumentDataByName)t.subgraphNames.size===u.subgraphNames.size?(r.push(o),n.push(this.getNodeWithPersistedDirectivesByInputValueData(u))):(0,ve.isTypeRequired)(u.type)&&i.push({inputValueName:o,missingSubgraphs:(0,me.getEntriesNotInHashSet)(t.subgraphNames,u.subgraphNames),requiredSubgraphs:[...u.requiredSubgraphNames]});return i.length>0?this.errors.push((0,Pe.invalidRequiredInputValueError)(Se.FIELD,a,i)):r.length>0&&((0,me.getValueOrDefault)(this.fieldConfigurationByFieldCoords,a,()=>({argumentNames:r,fieldName:t.name,typeName:t.renamedParentTypeName})).argumentNames=r),n}getNodeWithPersistedDirectivesByFieldData(t,n){return t.node.arguments=n,t.node.name=(0,$r.stringToNameNode)(t.name),t.node.type=t.type,t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}validateSemanticNonNull(t){let n;for(let r of t.nullLevelsBySubgraphName.values()){if(!n){n=r;continue}if(n.size!==r.size){this.errors.push((0,Pe.semanticNonNullInconsistentLevelsError)(t));return}for(let i of r)if(!n.has(i)){this.errors.push((0,Pe.semanticNonNullInconsistentLevelsError)(t));return}}}validateOneOfDirective({data:t,inputValueNodes:n,requiredFieldNames:r}){return t.directivesByName.has(Se.ONE_OF)?r.size>0?(this.errors.push((0,Pe.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(r),typeName:t.name})),!1):(n.length===1&&this.warnings.push((0,wfe.singleFederatedInputFieldOneOfWarning)({fieldName:n[0].name.value,typeName:t.name})),!0):!0}pushParentDefinitionDataToDocumentDefinitions(t){for(let[n,r]of this.parentDefinitionDataByTypeName)switch(r.extensionType!==OV.ExtensionType.NONE&&this.errors.push((0,Pe.noBaseDefinitionForExtensionError)((0,me.kindToNodeType)(r.kind),n)),r.kind){case Re.Kind.ENUM_TYPE_DEFINITION:{if(Qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;let i=[],a=[],o=this.getEnumValueMergeMethod(n);(0,ve.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n));for(let u of r.enumValueDataByName.values()){let l=this.getNodeForRouterSchemaByData(u),d=(0,ve.isNodeDataInaccessible)(u),p=$(k({},u.node),{directives:(0,ve.getClientPersistedDirectiveNodes)(u)});switch(o){case ve.MergeMethod.CONSISTENT:!d&&r.appearances>u.appearances&&this.errors.push((0,Pe.incompatibleSharedEnumError)(n)),i.push(l),d||a.push(p);break;case ve.MergeMethod.INTERSECTION:r.appearances===u.appearances&&(i.push(l),d||a.push(p));break;default:i.push(l),d||a.push(p);break}}if(r.node.values=i,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,ve.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,me.kindToNodeType)(r.kind),n,Se.ENUM_VALUE));break}this.clientDefinitions.push($(k({},r.node),{directives:(0,ve.getClientPersistedDirectiveNodes)(r),values:a}));break}case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(Qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;let i=new Array,a=new Array,o=new Array,u=new Set;for(let[l,d]of r.inputValueDataByName)if((0,ve.isTypeRequired)(d.type)&&u.add(l),r.subgraphNames.size===d.subgraphNames.size){if(a.push(this.getNodeWithPersistedDirectivesByInputValueData(d)),(0,ve.isNodeDataInaccessible)(d))continue;o.push($(k({},d.node),{directives:(0,ve.getClientPersistedDirectiveNodes)(d)}))}else(0,ve.isTypeRequired)(d.type)&&i.push({inputValueName:l,missingSubgraphs:(0,me.getEntriesNotInHashSet)(r.subgraphNames,d.subgraphNames),requiredSubgraphs:[...d.requiredSubgraphNames]});if(i.length>0){this.errors.push((0,Pe.invalidRequiredInputValueError)(Se.INPUT_OBJECT,n,i,!1));break}if(!this.validateOneOfDirective({data:r,inputValueNodes:a,requiredFieldNames:u}))break;if(r.node.fields=a,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,ve.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r);break}if(o.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,me.kindToNodeType)(r.kind),n,"Input field"));break}this.clientDefinitions.push($(k({},r.node),{directives:(0,ve.getClientPersistedDirectiveNodes)(r),fields:o}));break}case Re.Kind.INTERFACE_TYPE_DEFINITION:case Re.Kind.OBJECT_TYPE_DEFINITION:{let i=[],a=[],o=new Map,u=(0,ve.newInvalidFieldNames)(),l=r.kind===Re.Kind.OBJECT_TYPE_DEFINITION,d=this.authorizationDataByParentTypeName.get(n);(0,ve.propagateAuthDirectives)(r,d);for(let[E,I]of r.fieldDataByName){(0,ve.propagateFieldAuthDirectives)(I,d);let v=this.getValidFieldArgumentNodes(I);l&&(0,ve.validateExternalAndShareable)(I,u),this.validateSemanticNonNull(I),i.push(this.getNodeWithPersistedDirectivesByFieldData(I,v)),!(0,ve.isNodeDataInaccessible)(I)&&(a.push((0,ve.getClientSchemaFieldNodeByFieldData)(I)),o.set(E,this.fieldDataToGraphFieldData(I)))}if(l&&(u.byShareable.size>0&&this.errors.push((0,Pe.invalidFieldShareabilityError)(r,u.byShareable)),u.subgraphNamesByExternalFieldName.size>0&&this.errors.push((0,Pe.allExternalFieldInstancesError)(n,u.subgraphNamesByExternalFieldName))),r.node.fields=i,this.internalGraph.initializeNode(n,o),r.implementedInterfaceTypeNames.size>0){t.push({data:r,clientSchemaFieldNodes:a});break}this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r));let p=(0,Pfe.isNodeQuery)(n);if((0,ve.isNodeDataInaccessible)(r)){if(p){this.errors.push(Pe.inaccessibleQueryRootTypeError);break}this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){let E=p?(0,Pe.noQueryRootTypeError)(!1):(0,Pe.allChildDefinitionsAreInaccessibleError)((0,me.kindToNodeType)(r.kind),n,Se.FIELD);this.errors.push(E);break}this.clientDefinitions.push($(k({},r.node),{directives:(0,ve.getClientPersistedDirectiveNodes)(r),fields:a}));break}case Re.Kind.SCALAR_TYPE_DEFINITION:{if(Qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;if((0,ve.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n)),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,ve.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}this.clientDefinitions.push($(k({},r.node),{directives:(0,ve.getClientPersistedDirectiveNodes)(r)}));break}case Re.Kind.UNION_TYPE_DEFINITION:{if(r.node.types=(0,Gr.mapToArrayOfValues)(r.memberByMemberTypeName),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,ve.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}let i=this.getClientSchemaUnionMembers(r);if(i.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)(Se.UNION,n,"union member type"));break}this.clientDefinitions.push($(k({},r.node),{directives:(0,ve.getClientPersistedDirectiveNodes)(r),types:i}));break}}}pushNamedTypeAuthDataToFields(){var t;for(let[n,r]of this.authorizationDataByParentTypeName){if(!r.requiresAuthentication&&r.requiredScopes.length<1)continue;let i=this.fieldCoordsByNamedTypeName.get(n);if(i)for(let a of i){let o=a.split(Se.LITERAL_PERIOD);switch(o.length){case 2:{let u=(0,me.getValueOrDefault)(this.authorizationDataByParentTypeName,o[0],()=>(0,Gr.newAuthorizationData)(o[0])),l=(0,me.getValueOrDefault)(u.fieldAuthDataByFieldName,o[1],()=>(0,Gr.newFieldAuthorizationData)(o[1]));(t=l.inheritedData).requiresAuthentication||(t.requiresAuthentication=r.requiresAuthentication),l.inheritedData.requiredScopes.length*r.requiredScopes.length>Ap.MAX_OR_SCOPES?this.invalidORScopesCoords.add(a):(l.inheritedData.requiredScopesByOR=(0,Gr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopesByOR,r.requiredScopesByOR),l.inheritedData.requiredScopes=(0,Gr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopes,r.requiredScopes));break}default:break}}}}federateSubgraphData(){this.federateInternalSubgraphData(),this.handleEntityInterfaces(),this.generateTagData(),El(this,uh,DV).call(this),this.pushNamedTypeAuthDataToFields()}validateInterfaceImplementationsAndPushToDocumentDefinitions(t){for(let{data:n,clientSchemaFieldNodes:r}of t){if(n.node.interfaces=this.getValidImplementedInterfaces(n),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(n)),(0,ve.isNodeDataInaccessible)(n)){this.validateReferencesOfInaccessibleType(n),this.internalGraph.setNodeInaccessible(n.name);continue}let i=[];for(let a of n.implementedInterfaceTypeNames)this.inaccessibleCoords.has(a)||i.push((0,$r.stringToNamedTypeNode)(a));this.clientDefinitions.push($(k({},n.node),{directives:(0,ve.getClientPersistedDirectiveNodes)(n),fields:r,interfaces:i}))}}validatePathSegmentInaccessibility(t){if(!t)return!1;let r=t.split(Se.LEFT_PARENTHESIS)[0].split(Se.LITERAL_PERIOD),i=r[0];for(let a=0;a0&&this.errors.push((0,Pe.invalidReferencesOfInaccessibleTypeError)((0,me.kindToNodeType)(t.kind),t.name,r))}validateQueryRootType(){let t=this.parentDefinitionDataByTypeName.get(Se.QUERY);if(!t||t.kind!==Re.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size<1){this.errors.push((0,Pe.noQueryRootTypeError)());return}for(let n of t.fieldDataByName.values())if(!(0,ve.isNodeDataInaccessible)(n))return;this.errors.push((0,Pe.noQueryRootTypeError)())}validateSubscriptionFieldConditionFieldPath(t,n,r,i,a){let o=t.split(Se.LITERAL_PERIOD);if(o.length<1)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathErrorMessage)(r,t)),[];let u=n;if(this.inaccessibleCoords.has(u.renamedTypeName))return a.push((0,Pe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,o[0],u.renamedTypeName)),[];let l="";for(let d=0;d0?`.${p}`:p,u.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathParentErrorMessage)(r,t,l)),[];let E=u.fieldDataByName.get(p);if(!E)return a.push((0,Pe.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,p,u.renamedTypeName)),[];let I=`${u.renamedTypeName}.${p}`;if(!E.subgraphNames.has(i))return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I,i)),[];if(this.inaccessibleCoords.has(I))return a.push((0,Pe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I)),[];if(Ap.BASE_SCALARS.has(E.namedTypeName)){u={kind:Re.Kind.SCALAR_TYPE_DEFINITION,name:E.namedTypeName};continue}u=(0,me.getOrThrowError)(this.parentDefinitionDataByTypeName,E.namedTypeName,Se.PARENT_DEFINITION_DATA)}return(0,ve.isLeafKind)(u.kind)?o:(a.push((0,Pe.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage)(r,t,o[o.length-1],(0,me.kindToNodeType)(u.kind),u.name)),[])}validateSubscriptionFieldCondition(t,n,r,i,a,o,u){if(i>sh.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return u.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;let l=!1,d=new Set([Se.FIELD_PATH,Se.VALUES]),p=new Set,E=new Set,I=[];for(let v of t.fields){let A=v.name.value,U=a+`.${A}`;switch(A){case Se.FIELD_PATH:{if(d.has(Se.FIELD_PATH))d.delete(Se.FIELD_PATH);else{l=!0,p.add(Se.FIELD_PATH);break}if(v.value.kind!==Re.Kind.STRING){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(U,Se.STRING,(0,me.kindToNodeType)(v.value.kind))),l=!0;break}let j=this.validateSubscriptionFieldConditionFieldPath(v.value.value,r,U,o,I);if(j.length<1){l=!0;break}n.fieldPath=j;break}case Se.VALUES:{if(d.has(Se.VALUES))d.delete(Se.VALUES);else{l=!0,p.add(Se.VALUES);break}let j=v.value.kind;if(j==Re.Kind.NULL||j==Re.Kind.OBJECT){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(U,Se.LIST,(0,me.kindToNodeType)(v.value.kind))),l=!0;break}if(j!==Re.Kind.LIST){n.values=[(0,ve.getSubscriptionFilterValue)(v.value)];break}let J=new Set,re=[];for(let te=0;te0){I.push((0,Pe.subscriptionFieldConditionInvalidValuesArrayErrorMessage)(U,re));continue}if(J.size<1){l=!0,I.push((0,Pe.subscriptionFieldConditionEmptyValuesArrayErrorMessage)(U));continue}n.values=[...J];break}default:l=!0,E.add(A)}}return l?(u.push((0,Pe.subscriptionFieldConditionInvalidInputFieldErrorMessage)(a,[...d],[...p],[...E],I)),!1):!0}validateSubscriptionFilterCondition(t,n,r,i,a,o,u){if(i>sh.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return u.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;if(i+=1,t.fields.length!==1)return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage)(a,t.fields.length)),!1;let l=t.fields[0],d=l.name.value;if(!Qc.SUBSCRIPTION_FILTER_INPUT_NAMES.has(d))return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldErrorMessage)(a,d)),!1;let p=a+`.${d}`;switch(l.value.kind){case Re.Kind.OBJECT:switch(d){case Se.IN_UPPER:return n.in={fieldPath:[],values:[]},this.validateSubscriptionFieldCondition(l.value,n.in,r,i,a+".IN",o,u);case Se.NOT_UPPER:return n.not={},this.validateSubscriptionFilterCondition(l.value,n.not,r,i,a+".NOT",o,u);default:return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,Se.LIST,Se.OBJECT)),!1}case Re.Kind.LIST:{let E=[];switch(d){case Se.AND_UPPER:{n.and=E;break}case Se.OR_UPPER:{n.or=E;break}default:return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,Se.OBJECT,Se.LIST)),!1}let I=l.value.values.length;if(I<1||I>5)return u.push((0,Pe.subscriptionFilterArrayConditionInvalidLengthErrorMessage)(p,I)),!1;let v=!0,A=[];for(let U=0;U0?(u.push((0,Pe.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage)(p,A)),!1):v}default:{let E=Qc.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES.has(d)?Se.LIST:Se.OBJECT;return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,E,(0,me.kindToNodeType)(l.value.kind))),!1}}}validateSubscriptionFilterAndGenerateConfiguration(t,n,r,i,a,o){if(!t.arguments||t.arguments.length!==1)return;let u=t.arguments[0];if(u.value.kind!==Re.Kind.OBJECT){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,[(0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(Se.CONDITION,Se.OBJECT,(0,me.kindToNodeType)(u.value.kind))]));return}let l={},d=[];if(!this.validateSubscriptionFilterCondition(u.value,l,n,0,Se.CONDITION,o,d)){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,d)),this.isMaxDepth=!1;return}(0,me.getValueOrDefault)(this.fieldConfigurationByFieldCoords,r,()=>({argumentNames:[],fieldName:i,typeName:a})).subscriptionFilterCondition=l}validateSubscriptionFiltersAndGenerateConfiguration(){for(let[t,n]of this.subscriptionFilterDataByFieldPath){if(this.inaccessibleCoords.has(t))continue;let r=this.parentDefinitionDataByTypeName.get(n.fieldData.namedTypeName);if(!r){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(t,[(0,Pe.subscriptionFilterNamedTypeErrorMessage)(n.fieldData.namedTypeName)]));continue}(0,ve.isNodeDataInaccessible)(r)||r.kind===Re.Kind.OBJECT_TYPE_DEFINITION&&this.validateSubscriptionFilterAndGenerateConfiguration(n.directive,r,t,n.fieldData.name,n.fieldData.renamedParentTypeName,n.directiveSubgraphName)}}buildFederationResult(){this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration(),this.invalidORScopesCoords.size>0&&this.errors.push((0,Pe.orScopesLimitError)(Ap.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let a of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,ve.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,a,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let t=[];this.pushParentDefinitionDataToDocumentDefinitions(t),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(t),this.validateQueryRootType();for(let a of this.inaccessibleRequiredInputValueErrorByCoords.values())this.errors.push(a);if(this.errors.length>0)return{errors:this.errors,success:!1,warnings:this.warnings};if(!this.options.disableResolvabilityValidation&&this.internalSubgraphBySubgraphName.size>1){let a=this.internalGraph.validate();if(!a.success)return{errors:a.errors,success:!1,warnings:this.warnings}}let n={kind:Re.Kind.DOCUMENT,definitions:this.routerDefinitions},r=(0,Re.buildASTSchema)({kind:Re.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),i=new Map;for(let{configurationDataByTypeName:a,directiveDefinitionByName:o,isVersionTwo:u,name:l,parentDefinitionDataByTypeName:d,schema:p,schemaNode:E}of this.internalSubgraphBySubgraphName.values())i.set(l,{configurationDataByTypeName:a,directiveDefinitionByName:o,isVersionTwo:u,parentDefinitionDataByTypeName:d,schema:p,schemaNode:E});for(let a of this.authorizationDataByParentTypeName.values())(0,Gr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,a);return k({directiveDefinitionByName:this.directiveDefinitionByName,fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),federatedGraphAST:n,federatedGraphSchema:(0,Re.buildASTSchema)(n,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:r,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,subgraphConfigBySubgraphName:i,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}getClientSchemaObjectBoolean(){return this.inaccessibleCoords.size<1&&this.tagNamesByCoords.size<1?{}:{shouldIncludeClientSchema:!0}}handleChildTagExclusions(t,n,r,i){let a=n.size;for(let[o,u]of r){let l=(0,me.getOrThrowError)(n,o,`${t.name}.childDataByChildName`);if((0,ve.isNodeDataInaccessible)(l)){a-=1;continue}i.isDisjointFrom(u.tagNames)||((0,me.getValueOrDefault)(l.persistedDirectivesData.directivesByName,Se.INACCESSIBLE,()=>[(0,me.generateSimpleDirective)(Se.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByName.set(Se.INACCESSIBLE,[(0,me.generateSimpleDirective)(Se.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}handleChildTagInclusions(t,n,r,i){let a=n.size;for(let[o,u]of n){if((0,ve.isNodeDataInaccessible)(u)){a-=1;continue}let l=r.get(o);(!l||i.isDisjointFrom(l.tagNames))&&((0,me.getValueOrDefault)(u.persistedDirectivesData.directivesByName,Se.INACCESSIBLE,()=>[(0,me.generateSimpleDirective)(Se.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByName.set(Se.INACCESSIBLE,[(0,me.generateSimpleDirective)(Se.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}buildFederationContractResult(t){if(this.isVersionTwo||this.routerDefinitions.push(Uu.INACCESSIBLE_DEFINITION),t.tagNamesToExclude.size>0)for(let[o,u]of this.parentTagDataByTypeName){let l=(0,me.getOrThrowError)(this.parentDefinitionDataByTypeName,o,Se.PARENT_DEFINITION_DATA);if(!(0,ve.isNodeDataInaccessible)(l)){if(!t.tagNamesToExclude.isDisjointFrom(u.tagNames)){l.persistedDirectivesData.directivesByName.set(Se.INACCESSIBLE,[(0,me.generateSimpleDirective)(Se.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(!(u.childTagDataByChildName.size<1))switch(l.kind){case Re.Kind.SCALAR_TYPE_DEFINITION:case Re.Kind.UNION_TYPE_DEFINITION:break;case Re.Kind.ENUM_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.enumValueDataByName,u.childTagDataByChildName,t.tagNamesToExclude);break}case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.inputValueDataByName,u.childTagDataByChildName,t.tagNamesToExclude);break}default:{let d=l.fieldDataByName.size;for(let[p,E]of u.childTagDataByChildName){let I=(0,me.getOrThrowError)(l.fieldDataByName,p,`${o}.fieldDataByFieldName`);if((0,ve.isNodeDataInaccessible)(I)){d-=1;continue}if(!t.tagNamesToExclude.isDisjointFrom(E.tagNames)){(0,me.getValueOrDefault)(I.persistedDirectivesData.directivesByName,Se.INACCESSIBLE,()=>[(0,me.generateSimpleDirective)(Se.INACCESSIBLE)]),this.inaccessibleCoords.add(I.federatedCoords),d-=1;continue}for(let[v,A]of E.tagNamesByArgumentName){let U=(0,me.getOrThrowError)(I.argumentDataByName,v,`${p}.argumentDataByArgumentName`);(0,ve.isNodeDataInaccessible)(U)||t.tagNamesToExclude.isDisjointFrom(A)||((0,me.getValueOrDefault)(U.persistedDirectivesData.directivesByName,Se.INACCESSIBLE,()=>[(0,me.generateSimpleDirective)(Se.INACCESSIBLE)]),this.inaccessibleCoords.add(U.federatedCoords))}}d<1&&(l.persistedDirectivesData.directivesByName.set(Se.INACCESSIBLE,[(0,me.generateSimpleDirective)(Se.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}}else if(t.tagNamesToInclude.size>0)for(let[o,u]of this.parentDefinitionDataByTypeName){if((0,ve.isNodeDataInaccessible)(u))continue;let l=this.parentTagDataByTypeName.get(o);if(!l){u.persistedDirectivesData.directivesByName.set(Se.INACCESSIBLE,[(0,me.generateSimpleDirective)(Se.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(t.tagNamesToInclude.isDisjointFrom(l.tagNames)){if(l.childTagDataByChildName.size<1){u.persistedDirectivesData.directivesByName.set(Se.INACCESSIBLE,[(0,me.generateSimpleDirective)(Se.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}switch(u.kind){case Re.Kind.SCALAR_TYPE_DEFINITION:case Re.Kind.UNION_TYPE_DEFINITION:continue;case Re.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagInclusions(u,u.enumValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagInclusions(u,u.inputValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;default:let d=u.fieldDataByName.size;for(let[p,E]of u.fieldDataByName){if((0,ve.isNodeDataInaccessible)(E)){d-=1;continue}let I=l.childTagDataByChildName.get(p);(!I||t.tagNamesToInclude.isDisjointFrom(I.tagNames))&&((0,me.getValueOrDefault)(E.persistedDirectivesData.directivesByName,Se.INACCESSIBLE,()=>[(0,me.generateSimpleDirective)(Se.INACCESSIBLE)]),this.inaccessibleCoords.add(E.federatedCoords),d-=1)}d<1&&(u.persistedDirectivesData.directivesByName.set(Se.INACCESSIBLE,[(0,me.generateSimpleDirective)(Se.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration();for(let o of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,ve.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,o,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let n=[];if(this.pushParentDefinitionDataToDocumentDefinitions(n),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(n),this.validateQueryRootType(),this.errors.length>0)return{errors:this.errors,success:!1,warnings:this.warnings};let r={kind:Re.Kind.DOCUMENT,definitions:this.routerDefinitions},i=(0,Re.buildASTSchema)({kind:Re.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),a=new Map;for(let{configurationDataByTypeName:o,directiveDefinitionByName:u,isVersionTwo:l,name:d,parentDefinitionDataByTypeName:p,schema:E,schemaNode:I}of this.internalSubgraphBySubgraphName.values())a.set(d,{configurationDataByTypeName:o,directiveDefinitionByName:u,isVersionTwo:l,parentDefinitionDataByTypeName:p,schema:E,schemaNode:I});for(let o of this.authorizationDataByParentTypeName.values())(0,Gr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,o);return k({directiveDefinitionByName:this.directiveDefinitionByName,fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),federatedGraphAST:r,federatedGraphSchema:(0,Re.buildASTSchema)(r,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:i,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,subgraphConfigBySubgraphName:a,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}federateSubgraphsInternal(){return this.federateSubgraphData(),this.buildFederationResult()}};uh=new WeakSet,DV=function(){var r;let t=new Set,n=new Set;for(let i of this.referencedPersistedDirectiveNames){let a=Ap.DIRECTIVE_DEFINITION_BY_NAME.get(i);if(!a)continue;let o=(r=Qc.DEPENDENCIES_BY_DIRECTIVE_NAME.get(i))!=null?r:[];this.directiveDefinitionByName.set(i,a),Qc.CLIENT_PERSISTED_DIRECTIVE_NAMES.has(i)&&(this.clientDefinitions.push(a),(0,me.addIterableToSet)({source:o,target:t})),this.routerDefinitions.push(a),(0,me.addIterableToSet)({source:o,target:n})}this.clientDefinitions.push(...t),this.routerDefinitions.push(...n)};Yc.FederationFactory=oh;function mb({options:e,subgraphs:t}){if(t.length<1)return{errors:[Pe.minimumSubgraphRequirementError],success:!1,warnings:[]};let n=(0,Rfe.batchNormalize)({subgraphs:t,options:e});if(!n.success)return{errors:n.errors,success:!1,warnings:n.warnings};let r=new Map,i=new Map;for(let[u,l]of n.internalSubgraphBySubgraphName)for(let[d,p]of l.entityInterfaces){let E=r.get(d);if(!E){r.set(d,(0,Gr.newEntityInterfaceFederationData)(p,u));continue}(0,Gr.upsertEntityInterfaceFederationData)(E,p,u)}let a=new Array,o=new Map;for(let[u,l]of r){let d=l.concreteTypeNames.size;for(let[p,E]of l.subgraphDataByTypeName){let I=(0,me.getValueOrDefault)(o,p,()=>new Set);if((0,me.addIterableToSet)({source:E.concreteTypeNames,target:I}),!E.isInterfaceObject){E.resolvable&&E.concreteTypeNames.size!==d&&(0,me.getValueOrDefault)(i,u,()=>new Array).push({subgraphName:p,definedConcreteTypeNames:new Set(E.concreteTypeNames),requiredConcreteTypeNames:new Set(l.concreteTypeNames)});continue}(0,me.addIterableToSet)({source:l.concreteTypeNames,target:I});let{parentDefinitionDataByTypeName:v}=(0,me.getOrThrowError)(n.internalSubgraphBySubgraphName,p,"internalSubgraphBySubgraphName"),A=[];for(let U of l.concreteTypeNames)v.has(U)&&A.push(U);A.length>0&&a.push((0,Pe.invalidInterfaceObjectImplementationDefinitionsError)(u,p,A))}}for(let[u,l]of i){let d=new Array;for(let p of l){let E=o.get(p.subgraphName);if(!E){d.push(p);continue}let I=p.requiredConcreteTypeNames.intersection(E);p.requiredConcreteTypeNames.size!==I.size&&(p.definedConcreteTypeNames=I,d.push(p))}if(d.length>0){i.set(u,d);continue}i.delete(u)}return i.size>0&&a.push((0,Pe.undefinedEntityInterfaceImplementationsError)(i,r)),a.length>0?{errors:a,success:!1,warnings:n.warnings}:{federationFactory:new oh({authorizationDataByParentTypeName:n.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:n.concreteTypeNamesByAbstractTypeName,entityDataByTypeName:n.entityDataByTypeName,entityInterfaceFederationDataByTypeName:r,fieldCoordsByNamedTypeName:n.fieldCoordsByNamedTypeName,internalSubgraphBySubgraphName:n.internalSubgraphBySubgraphName,internalGraph:n.internalGraph,options:e,warnings:n.warnings}),success:!0,warnings:n.warnings}}function Lfe({options:e,subgraphs:t}){let n=mb({options:e,subgraphs:t});return n.success?n.federationFactory.federateSubgraphsInternal():{errors:n.errors,success:!1,warnings:n.warnings}}function Cfe({options:e,subgraphs:t,tagOptionsByContractName:n}){let r=mb({options:e,subgraphs:t});if(!r.success)return{errors:r.errors,success:!1,warnings:r.warnings};r.federationFactory.federateSubgraphData();let i=[(0,SV.cloneDeep)(r.federationFactory)],a=r.federationFactory.buildFederationResult();if(!a.success)return{errors:a.errors,success:!1,warnings:a.warnings};let o=n.size-1,u=new Map,l=0;for(let[d,p]of n){l!==o&&i.push((0,SV.cloneDeep)(i[l]));let E=i[l].buildFederationContractResult(p);u.set(d,E),l++}return $(k({},a),{federationResultByContractName:u})}function Bfe({contractTagOptions:e,options:t,subgraphs:n}){let r=mb({options:t,subgraphs:n});return r.success?(r.federationFactory.federateSubgraphData(),r.federationFactory.buildFederationContractResult(e)):{errors:r.errors,success:!1,warnings:r.warnings}}});var ch=F(xs=>{"use strict";m();T();N();Object.defineProperty(xs,"__esModule",{value:!0});xs.LATEST_ROUTER_COMPATIBILITY_VERSION=xs.ROUTER_COMPATIBILITY_VERSIONS=xs.ROUTER_COMPATIBILITY_VERSION_ONE=void 0;xs.ROUTER_COMPATIBILITY_VERSION_ONE="1";xs.ROUTER_COMPATIBILITY_VERSIONS=new Set([xs.ROUTER_COMPATIBILITY_VERSION_ONE]);xs.LATEST_ROUTER_COMPATIBILITY_VERSION="1"});var AV=F(Rp=>{"use strict";m();T();N();Object.defineProperty(Rp,"__esModule",{value:!0});Rp.federateSubgraphs=Ufe;Rp.federateSubgraphsWithContracts=kfe;Rp.federateSubgraphsContract=Mfe;var Nb=bV(),Tb=ch();function Ufe({options:e,subgraphs:t,version:n=Tb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(n){default:return(0,Nb.federateSubgraphs)({options:e,subgraphs:t})}}function kfe({options:e,subgraphs:t,tagOptionsByContractName:n,version:r=Tb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,Nb.federateSubgraphsWithContracts)({options:e,subgraphs:t,tagOptionsByContractName:n})}}function Mfe({contractTagOptions:e,options:t,subgraphs:n,version:r=Tb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,Nb.federateSubgraphsContract)({contractTagOptions:e,options:t,subgraphs:n})}}});var PV=F(RV=>{"use strict";m();T();N();Object.defineProperty(RV,"__esModule",{value:!0})});var wV=F(FV=>{"use strict";m();T();N();Object.defineProperty(FV,"__esModule",{value:!0})});var LV=F(Pp=>{"use strict";m();T();N();Object.defineProperty(Pp,"__esModule",{value:!0});Pp.normalizeSubgraphFromString=xfe;Pp.normalizeSubgraph=qfe;Pp.batchNormalize=Vfe;var Eb=lb(),hb=ch();function xfe({noLocation:e=!0,options:t,sdlString:n,version:r=hb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,Eb.normalizeSubgraphFromString)({noLocation:e,options:t,sdlString:n})}}function qfe({document:e,internalGraph:t,options:n,subgraphName:r,version:i=hb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(i){default:return(0,Eb.normalizeSubgraph)({document:e,internalGraph:t,options:n,subgraphName:r})}}function Vfe({options:e,subgraphs:t,version:n=hb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(n){default:return(0,Eb.batchNormalize)({options:e,subgraphs:t})}}});var BV=F(CV=>{"use strict";m();T();N();Object.defineProperty(CV,"__esModule",{value:!0})});var kV=F(UV=>{"use strict";m();T();N();Object.defineProperty(UV,"__esModule",{value:!0})});var xV=F(MV=>{"use strict";m();T();N();Object.defineProperty(MV,"__esModule",{value:!0})});var VV=F(qV=>{"use strict";m();T();N();Object.defineProperty(qV,"__esModule",{value:!0})});var KV=F(jV=>{"use strict";m();T();N();Object.defineProperty(jV,"__esModule",{value:!0})});var GV=F($V=>{"use strict";m();T();N();Object.defineProperty($V,"__esModule",{value:!0})});var YV=F(QV=>{"use strict";m();T();N();Object.defineProperty(QV,"__esModule",{value:!0})});var HV=F(JV=>{"use strict";m();T();N();Object.defineProperty(JV,"__esModule",{value:!0})});var zV=F(lh=>{"use strict";m();T();N();Object.defineProperty(lh,"__esModule",{value:!0});lh.COMPOSITION_VERSION=void 0;lh.COMPOSITION_VERSION="{{$COMPOSITION__VERSION}}"});var XV=F(WV=>{"use strict";m();T();N();Object.defineProperty(WV,"__esModule",{value:!0})});var ej=F(ZV=>{"use strict";m();T();N();Object.defineProperty(ZV,"__esModule",{value:!0})});var nj=F(tj=>{"use strict";m();T();N();Object.defineProperty(tj,"__esModule",{value:!0})});var ij=F(rj=>{"use strict";m();T();N();Object.defineProperty(rj,"__esModule",{value:!0})});var dh=F(We=>{"use strict";m();T();N();var jfe=We&&We.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),ot=We&&We.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&jfe(t,e,n)};Object.defineProperty(We,"__esModule",{value:!0});ot(Fr(),We);ot(Vv(),We);ot($i(),We);ot(ex(),We);ot(AV(),We);ot(PV(),We);ot(wV(),We);ot(LV(),We);ot(BV(),We);ot(kV(),We);ot(sb(),We);ot(HD(),We);ot(HE(),We);ot(xV(),We);ot(VV(),We);ot(eb(),We);ot(ch(),We);ot(KV(),We);ot(ob(),We);ot(Su(),We);ot(Gf(),We);ot($l(),We);ot(GV(),We);ot(YV(),We);ot(HV(),We);ot(zV(),We);ot(XV(),We);ot(zn(),We);ot(ej(),We);ot(wr(),We);ot(qD(),We);ot(Du(),We);ot(Qf(),We);ot(yE(),We);ot(IE(),We);ot(dd(),We);ot(hT(),We);ot(nj(),We);ot(yT(),We);ot(pb(),We);ot(BD(),We);ot(Ip(),We);ot(ij(),We);ot($D(),We);ot(ih(),We);ot(MD(),We);ot(yp(),We);ot(gp(),We)});var Mpe={};$m(Mpe,{buildRouterConfiguration:()=>kpe,federateSubgraphs:()=>Upe});m();T();N();var tl=Ni(dh());m();T();N();m();T();N();function yb(e){if(!e)return e;if(!URL.canParse(e))throw new Error("Invalid URL");let t=e.indexOf("?"),n=e.indexOf("#"),r=e;return t>0?r=r.slice(0,n>0?Math.min(t,n):t):n>0&&(r=r.slice(0,n)),r}m();T();N();m();T();N();var aj={};m();T();N();function sj(e){return e!=null}m();T();N();m();T();N();var ph=Ni(_e(),1);m();T();N();m();T();N();function ku(e){return fh(e,[])}function fh(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Kfe(e,t);default:return String(e)}}function oj(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; + ${e.stack}`}function Kfe(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?oj(e)+` +`+uj(e.errors,t):oj(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if($fe(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:fh(r,n)}else if(Array.isArray(e))return uj(e,n);return Gfe(e,n)}function $fe(e){return typeof e.toJSON=="function"}function Gfe(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>3?"["+Qfe(e)+"]":"{ "+n.map(([i,a])=>i+": "+fh(a,t)).join(", ")+" }"}function uj(e,t){if(e.length===0)return"[]";if(t.length>3)return"[Array]";let n=e.length,r=[];for(let i=0;iYfe.includes(t))}function yd(e,t){t!=null&&t.originalError&&!(t.originalError instanceof Error)&&Jfe(t.originalError)&&(t.originalError=yd(t.originalError.message,t.originalError));let n=Fp.GraphQLError,r=Fp.versionInfo.major>=16?new n(e,t):new n(e,t==null?void 0:t.nodes,t==null?void 0:t.source,t==null?void 0:t.positions,t==null?void 0:t.path,t==null?void 0:t.originalError,t==null?void 0:t.extensions);return t!=null&&t.coordinate&&r.coordinate==null&&Object.defineProperties(r,{coordinate:{value:t.coordinate,enumerable:!0,configurable:!0}}),r}m();T();N();function cj(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function lj(e){return typeof e=="object"&&e!==null}function dj(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function fj(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((u,l)=>$(k({},u),{[l.name.value]:l}),{});for(let{name:u,type:l,defaultValue:d}of e.args){let p=a[u];if(!p){if(d!==void 0)r[u]=d;else if((0,Fa.isNonNullType)(l))throw yd(`Argument "${u}" of required type "${ku(l)}" was not provided.`,{nodes:[t]});continue}let E=p.value,I=E.kind===Fa.Kind.NULL;if(E.kind===Fa.Kind.VARIABLE){let A=E.name.value;if(n==null||!dj(n,A)){if(d!==void 0)r[u]=d;else if((0,Fa.isNonNullType)(l))throw yd(`Argument "${u}" of required type "${ku(l)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:[E]});continue}I=n[A]==null}if(I&&(0,Fa.isNonNullType)(l))throw yd(`Argument "${u}" of non-null type "${ku(l)}" must not be null.`,{nodes:[E]});let v=(0,Fa.valueFromAST)(E,l,n);if(v===void 0)throw yd(`Argument "${u}" has invalid value ${(0,Fa.print)(E)}.`,{nodes:[E]});r[u]=v}return r}m();T();N();function Id(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let a=e(r);return t.set(r,a),a}return i}}function pj(e,t,n=["directives"]){var o;let r={};if(e.extensions){let u=e.extensions;for(let l of n)u=u==null?void 0:u[l];if(u!=null)for(let l in u){let d=u[l],p=l;if(Array.isArray(d))for(let E of d){let I=r[p];I||(I=[],r[p]=I),I.push(E)}else{let E=r[p];E||(E=[],r[p]=E),E.push(d)}}}let i=Id(u=>JSON.stringify(u)),a=[];e.astNode&&a.push(e.astNode),e.extensionASTNodes&&a.push(...e.extensionASTNodes);for(let u of a)if((o=u.directives)!=null&&o.length)for(let l of u.directives){let d=l.name.value,p=r[d];p||(p=[],r[d]=p);let E=t==null?void 0:t.getDirective(d),I={};if(E&&(I=fj(E,l)),l.arguments)for(let v of l.arguments){let A=v.name.value;if(I[A]==null){let U=E==null?void 0:E.args.find(j=>j.name===A);U&&(I[A]=(0,ph.valueFromAST)(v.value,U.type))}I[A]==null&&(I[A]=(0,ph.valueFromASTUntyped)(v.value))}if(a.length>0&&p.length>0){let v=i(I);if(p.some(A=>i(A)===v))continue}p.push(I)}return r}function Ib(e,t=["directives"]){let n=pj(e,void 0,t);return Object.entries(n).map(([r,i])=>i==null?void 0:i.map(a=>({name:r,args:a}))).flat(1/0).filter(Boolean)}m();T();N();var Je=Ni(_e(),1);m();T();N();var cs=Ni(_e(),1);function ls(e){if((0,cs.isNonNullType)(e)){let t=ls(e.ofType);if(t.kind===cs.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${ku(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:cs.Kind.NON_NULL_TYPE,type:t}}else if((0,cs.isListType)(e))return{kind:cs.Kind.LIST_TYPE,type:ls(e.ofType)};return{kind:cs.Kind.NAMED_TYPE,name:{kind:cs.Kind.NAME,value:e.name}}}m();T();N();var dr=Ni(_e(),1);m();T();N();var wa=Ni(_e(),1);function Jc(e){if(e===null)return{kind:wa.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=Jc(n);r!=null&&t.push(r)}return{kind:wa.Kind.LIST,values:t}}if(typeof e=="object"){if(e!=null&&e.toJSON)return Jc(e.toJSON());let t=[];for(let n in e){let r=e[n],i=Jc(r);i&&t.push({kind:wa.Kind.OBJECT_FIELD,name:{kind:wa.Kind.NAME,value:n},value:i})}return{kind:wa.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:wa.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:wa.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return Hfe.test(t)?{kind:wa.Kind.INT,value:t}:{kind:wa.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:wa.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var Hfe=/^-?(?:0|[1-9][0-9]*)$/;function Mu(e,t){if((0,dr.isNonNullType)(t)){let n=Mu(e,t.ofType);return(n==null?void 0:n.kind)===dr.Kind.NULL?null:n}if(e===null)return{kind:dr.Kind.NULL};if(e===void 0)return null;if((0,dr.isListType)(t)){let n=t.ofType;if(cj(e)){let r=[];for(let i of e){let a=Mu(i,n);a!=null&&r.push(a)}return{kind:dr.Kind.LIST,values:r}}return Mu(e,n)}if((0,dr.isInputObjectType)(t)){if(!lj(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Mu(e[r.name],r.type);i&&n.push({kind:dr.Kind.OBJECT_FIELD,name:{kind:dr.Kind.NAME,value:r.name},value:i})}return{kind:dr.Kind.OBJECT,fields:n}}if((0,dr.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,dr.isEnumType)(t)?{kind:dr.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&zfe.test(n)?{kind:dr.Kind.INT,value:n}:Jc(n)}console.assert(!1,"Unexpected input type: "+ku(t))}var zfe=/^-?(?:0|[1-9][0-9]*)$/;m();T();N();var mj=Ni(_e(),1);function vi(e){var t;if((t=e.astNode)!=null&&t.description)return $(k({},e.astNode.description),{block:!0});if(e.description)return{kind:mj.Kind.STRING,value:e.description,block:!0}}m();T();N();var zqe=Id(function(t){let n=Wfe(t);return new Set([...n].map(r=>r.name))}),Wfe=Id(function(t){let n=gb(t);return new Set(n.values())}),gb=Id(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let a=t.getSubscriptionType();return a&&n.set("subscription",a),n});function Xfe(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=Zfe(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let u of o)(0,Je.isSpecifiedDirective)(u)||a.push(epe(u,e,n));for(let u in r){let l=r[u],d=(0,Je.isSpecifiedScalarType)(l),p=(0,Je.isIntrospectionType)(l);if(!(d||p))if((0,Je.isObjectType)(l))a.push(tpe(l,e,n));else if((0,Je.isInterfaceType)(l))a.push(npe(l,e,n));else if((0,Je.isUnionType)(l))a.push(rpe(l,e,n));else if((0,Je.isInputObjectType)(l))a.push(ipe(l,e,n));else if((0,Je.isEnumType)(l))a.push(ape(l,e,n));else if((0,Je.isScalarType)(l))a.push(spe(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:Je.Kind.DOCUMENT,definitions:a}}function Nj(e,t={}){let n=Xfe(e,t);return(0,Je.print)(n)}function Zfe(e,t){let n=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),r=[];if(e.astNode!=null&&r.push(e.astNode),e.extensionASTNodes!=null)for(let d of e.extensionASTNodes)r.push(d);for(let d of r)if(d.operationTypes)for(let p of d.operationTypes)n.set(p.operation,p);let i=gb(e);for(let[d,p]of n){let E=i.get(d);if(E!=null){let I=ls(E);p!=null?p.type=I:n.set(d,{kind:Je.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(sj),o=ds(e,e,t);if(!a.length&&!o.length)return null;let u={kind:a.length?Je.Kind.SCHEMA_DEFINITION:Je.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=vi(e);return l&&(u.description=l),u}function epe(e,t,n){var r,i;return{kind:Je.Kind.DIRECTIVE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>Tj(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:Je.Kind.NAME,value:a})))||[]}}function ds(e,t,n){let r=[],i=Ib(e,n),a;i!=null&&(a=hj(t,i));let o=null,u=null,l=null;if(a!=null&&(r=a.filter(d=>Je.specifiedDirectives.every(p=>p.name!==d.name.value)),o=a.find(d=>d.name.value==="deprecated"),u=a.find(d=>d.name.value==="specifiedBy"),l=a.find(d=>d.name.value==="oneOf")),e.deprecationReason!=null&&o==null&&(o=cpe(e.deprecationReason)),e.specifiedByUrl!=null||e.specifiedByURL!=null&&u==null){let p={url:e.specifiedByUrl||e.specifiedByURL};u=wp("specifiedBy",p)}return e.isOneOf&&l==null&&(l=wp("oneOf")),o!=null&&r.push(o),u!=null&&r.push(u),l!=null&&r.push(l),r}function Tj(e,t,n){var r;return{kind:Je.Kind.INPUT_VALUE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},type:ls(e.type),defaultValue:e.defaultValue!==void 0&&(r=Mu(e.defaultValue,e.type))!=null?r:void 0,directives:ds(e,t,n)}}function tpe(e,t,n){return{kind:Je.Kind.OBJECT_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>Ej(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>ls(r)),directives:ds(e,t,n)}}function npe(e,t,n){let r={kind:Je.Kind.INTERFACE_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>Ej(i,t,n)),directives:ds(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>ls(i))),r}function rpe(e,t,n){return{kind:Je.Kind.UNION_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},directives:ds(e,t,n),types:e.getTypes().map(r=>ls(r))}}function ipe(e,t,n){return{kind:Je.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>ope(r,t,n)),directives:ds(e,t,n)}}function ape(e,t,n){return{kind:Je.Kind.ENUM_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>upe(r,t,n)),directives:ds(e,t,n)}}function spe(e,t,n){let r=Ib(e,n),i=hj(t,r),a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(o=>o.name.value==="specifiedBy")){let o={url:a};i.push(wp("specifiedBy",o))}return{kind:Je.Kind.SCALAR_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},directives:i}}function Ej(e,t,n){return{kind:Je.Kind.FIELD_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},arguments:e.args.map(r=>Tj(r,t,n)),type:ls(e.type),directives:ds(e,t,n)}}function ope(e,t,n){var r;return{kind:Je.Kind.INPUT_VALUE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},type:ls(e.type),directives:ds(e,t,n),defaultValue:(r=Mu(e.defaultValue,e.type))!=null?r:void 0}}function upe(e,t,n){return{kind:Je.Kind.ENUM_VALUE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},directives:ds(e,t,n)}}function cpe(e){return wp("deprecated",{reason:e},Je.GraphQLDeprecatedDirective)}function wp(e,t,n){let r=[];for(let i in t){let a=t[i],o;if(n!=null){let u=n.args.find(l=>l.name===i);u&&(o=Mu(a,u.type))}o==null&&(o=Jc(a)),o!=null&&r.push({kind:Je.Kind.ARGUMENT,name:{kind:Je.Kind.NAME,value:i},value:o})}return{kind:Je.Kind.DIRECTIVE,name:{kind:Je.Kind.NAME,value:e},arguments:r}}function hj(e,t){let n=[];for(let{name:r,args:i}of t){let a=e==null?void 0:e.getDirective(r);n.push(wp(r,i,a))}return n}var Rd=Ni(dh(),1);m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();function mn(e,t){if(!e)throw new Error(t)}var lpe=34028234663852886e22,dpe=-34028234663852886e22,fpe=4294967295,ppe=2147483647,mpe=-2147483648;function gd(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>ppe||efpe||e<0)throw new Error("invalid uint 32: "+e)}function mh(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>lpe||e({no:i.no,name:i.name,localName:e[i.no]})),r)}function vb(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let o of t){let u=_j(o);a.push(u),r[o.name]=u,i[o.no]=u}return{typeName:e,values:a,findName(o){return r[o]},findNumber(o){return i[o]}}}function gj(e,t,n){let r={};for(let i of t){let a=_j(i);r[a.localName]=a.no,r[a.no]=a.localName}return _b(r,e,t,n),r}function _j(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}m();T();N();m();T();N();var Fe=class{equals(t){return this.getType().runtime.util.equals(this.getType(),this,t)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(t,n){let r=this.getType(),i=r.runtime.bin,a=i.makeReadOptions(n);return i.readMessage(this,a.readerFactory(t),t.byteLength,a),this}fromJson(t,n){let r=this.getType(),i=r.runtime.json,a=i.makeReadOptions(n);return i.readMessage(r,t,a,this),this}fromJsonString(t,n){let r;try{r=JSON.parse(t)}catch(i){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${i instanceof Error?i.message:String(i)}`)}return this.fromJson(r,n)}toBinary(t){let n=this.getType(),r=n.runtime.bin,i=r.makeWriteOptions(t),a=i.writerFactory();return r.writeMessage(this,a,i),a.finish()}toJson(t){let n=this.getType(),r=n.runtime.json,i=r.makeWriteOptions(t);return r.writeMessage(this,i)}toJsonString(t){var n;let r=this.toJson(t);return JSON.stringify(r,null,(n=t==null?void 0:t.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}};function vj(e,t,n,r){var i;let a=(i=r==null?void 0:r.localName)!==null&&i!==void 0?i:t.substring(t.lastIndexOf(".")+1),o={[a]:function(u){e.util.initFields(this),e.util.initPartial(u,this)}}[a];return Object.setPrototypeOf(o.prototype,new Fe),Object.assign(o,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary(u,l){return new o().fromBinary(u,l)},fromJson(u,l){return new o().fromJson(u,l)},fromJsonString(u,l){return new o().fromJsonString(u,l)},equals(u,l){return e.util.equals(o,u,l)}}),o}m();T();N();m();T();N();m();T();N();m();T();N();function Sj(){let e=0,t=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<>4,!(n&128))return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<>>a,u=!(!(o>>>7)&&t==0),l=(u?o|128:o)&255;if(n.push(l),!u)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),!!i){for(let a=3;a<31;a=a+7){let o=t>>>a,u=!!(o>>>7),l=(u?o|128:o)&255;if(n.push(l),!u)return}n.push(t>>>31&1)}}var Nh=4294967296;function Ob(e){let t=e[0]==="-";t&&(e=e.slice(1));let n=1e6,r=0,i=0;function a(o,u){let l=Number(e.slice(o,u));i*=n,r=r*n+l,r>=Nh&&(i=i+(r/Nh|0),r=r%Nh)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?bj(r,i):Db(r,i)}function Dj(e,t){let n=Db(e,t),r=n.hi&2147483648;r&&(n=bj(n.lo,n.hi));let i=Sb(n.lo,n.hi);return r?"-"+i:i}function Sb(e,t){if({lo:e,hi:t}=Npe(e,t),t<=2097151)return String(Nh*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,u=i*2,l=1e7;return a>=l&&(o+=Math.floor(a/l),a%=l),o>=l&&(u+=Math.floor(o/l),o%=l),u.toString()+Oj(o)+Oj(a)}function Npe(e,t){return{lo:e>>>0,hi:t>>>0}}function Db(e,t){return{lo:e|0,hi:t|0}}function bj(e,t){return t=~t,e?e=~e+1:t+=1,Db(e,t)}var Oj=e=>{let t=String(e);return"0000000".slice(t.length)+t};function bb(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function Aj(){let e=this.buf[this.pos++],t=e&127;if(!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;e&128&&n<10;n++)e=this.buf[this.pos++];if(e&128)throw new Error("invalid varint");return this.assertBounds(),t>>>0}function Tpe(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof S!="object"||typeof S.env!="object"||S.env.BUF_BIGINT_DISABLE!=="1")){let i=BigInt("-9223372036854775808"),a=BigInt("9223372036854775807"),o=BigInt("0"),u=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){let d=typeof l=="bigint"?l:BigInt(l);if(d>a||du||dmn(/^-?[0-9]+$/.test(i),`int64 invalid: ${i}`),r=i=>mn(/^[0-9]+$/.test(i),`uint64 invalid: ${i}`);return{zero:"0",supported:!1,parse(i){return typeof i!="string"&&(i=i.toString()),n(i),i},uParse(i){return typeof i!="string"&&(i=i.toString()),r(i),i},enc(i){return typeof i!="string"&&(i=i.toString()),n(i),Ob(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),r(i),Ob(i)},dec(i,a){return Dj(i,a)},uDec(i,a){return Sb(i,a)}}}var Jn=Tpe();m();T();N();var de;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(de||(de={}));var La;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(La||(La={}));function qs(e,t,n){if(t===n)return!0;if(e==de.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let r=0;r>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(Lp(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return gd(t),bb(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.textEncoder.encode(t);return this.uint32(n.byteLength),this.raw(n)}float(t){mh(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){Lp(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){gd(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return gd(t),t=(t<<1^t>>31)>>>0,bb(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Jn.enc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Jn.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=Jn.enc(t);return Th(n.lo,n.hi,this.buf),this}sint64(t){let n=Jn.enc(t),r=n.hi>>31,i=n.lo<<1^r,a=(n.hi<<1|n.lo>>>31)^r;return Th(i,a,this.buf),this}uint64(t){let n=Jn.uEnc(t);return Th(n.lo,n.hi,this.buf),this}},yh=class{constructor(t,n){this.varint64=Sj,this.uint32=Aj,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.textDecoder=n!=null?n:new TextDecoder}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t){let n=this.pos;switch(t){case xn.Varint:for(;this.buf[this.pos++]&128;);break;case xn.Bit64:this.pos+=4;case xn.Bit32:this.pos+=4;break;case xn.LengthDelimited:let r=this.uint32();this.pos+=r;break;case xn.StartGroup:let i;for(;(i=this.tag()[1])!==xn.EndGroup;)this.skip(i);break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return Jn.dec(...this.varint64())}uint64(){return Jn.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,Jn.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Jn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Jn.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.textDecoder.decode(this.bytes())}};function Rj(e,t,n,r){let i;return{typeName:t,extendee:n,get field(){if(!i){let a=typeof r=="function"?r():r;a.name=t.split(".").pop(),a.jsonName=`[${t}]`,i=e.util.newFieldList([a]).list()[0]}return i},runtime:e}}function Ih(e){let t=e.field.localName,n=Object.create(null);return n[t]=Epe(e),[n,()=>n[t]]}function Epe(e){let t=e.field;if(t.repeated)return[];if(t.default!==void 0)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return Ca(t.T,t.L);case"message":let n=t.T,r=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(r):r;case"map":throw"map fields are not allowed to be extensions"}}function Pj(e,t){if(!t.repeated&&(t.kind=="enum"||t.kind=="scalar")){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(n=>n.no===t.no)}m();T();N();m();T();N();var Vs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),gh=[];for(let e=0;e>4,o=a,i=2;break;case 2:n[r++]=(o&15)<<4|(a&60)>>2,o=a,i=3;break;case 3:n[r++]=(o&3)<<6|a,i=0;break}}if(i==1)throw Error("invalid base64 string.");return n.subarray(0,r)},enc(e){let t="",n=0,r,i=0;for(let a=0;a>2],i=(r&3)<<4,n=1;break;case 1:t+=Vs[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=Vs[i|r>>6],t+=Vs[r&63],n=0;break}return n&&(t+=Vs[i],t+="=",n==1&&(t+="=")),t}};m();T();N();function Fj(e,t,n){Lj(t,e);let r=t.runtime.bin.makeReadOptions(n),i=Pj(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,o]=Ih(t);for(let u of i)t.runtime.bin.readField(a,r.readerFactory(u.data),t.field,u.wireType,r);return o()}function wj(e,t,n,r){Lj(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(Rb(e,t)){let d=e.getType().runtime.bin.listUnknownFields(e).filter(p=>p.no!=t.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(let p of d)e.getType().runtime.bin.onUnknownField(e,p.no,p.wireType,p.data)}let o=a.writerFactory(),u=t.field;!u.opt&&!u.repeated&&(u.kind=="enum"||u.kind=="scalar")&&(u=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(u,n,o,a);let l=i.readerFactory(o.finish());for(;l.posr.no==t.field.no)}function Lj(e,t){mn(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}m();T();N();function _h(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case"enum":case"scalar":return e.opt||e.req?t[n]!==void 0:e.kind=="enum"?t[n]!==e.T.values[0].no:!Eh(e.T,t[n]);case"message":return t[n]!==void 0;case"map":return Object.keys(t[n]).length>0}}function Pb(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":t[n]={};break;case"enum":t[n]=r?e.T.values[0].no:void 0;break;case"scalar":t[n]=r?Ca(e.T,e.L):void 0;break;case"message":t[n]=void 0;break}}m();T();N();m();T();N();function Ba(e,t){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(Fe.prototype).every(r=>r in e&&typeof e[r]=="function"))return!1;let n=e.getType();return n===null||typeof n!="function"||!("typeName"in n)||typeof n.typeName!="string"?!1:t===void 0?!0:n.typeName==t.typeName}function vh(e,t){return Ba(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}var FVe={"google.protobuf.DoubleValue":de.DOUBLE,"google.protobuf.FloatValue":de.FLOAT,"google.protobuf.Int64Value":de.INT64,"google.protobuf.UInt64Value":de.UINT64,"google.protobuf.Int32Value":de.INT32,"google.protobuf.UInt32Value":de.UINT32,"google.protobuf.BoolValue":de.BOOL,"google.protobuf.StringValue":de.STRING,"google.protobuf.BytesValue":de.BYTES};var Cj={ignoreUnknownFields:!1},Bj={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function hpe(e){return e?Object.assign(Object.assign({},Cj),e):Cj}function ype(e){return e?Object.assign(Object.assign({},Bj),e):Bj}var Dh=Symbol(),Oh=Symbol();function Mj(){return{makeReadOptions:hpe,makeWriteOptions:ype,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.typeName} from JSON: ${fs(t)}`);r=r!=null?r:new e;let i=new Map,a=n.typeRegistry;for(let[o,u]of Object.entries(t)){let l=e.fields.findJsonName(o);if(l){if(l.oneof){if(u===null&&l.kind=="scalar")continue;let d=i.get(l.oneof);if(d!==void 0)throw new Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${d}", "${o}"`);i.set(l.oneof,o)}Uj(r,u,l,n,e)}else{let d=!1;if(a!=null&&a.findExtension&&o.startsWith("[")&&o.endsWith("]")){let p=a.findExtension(o.substring(1,o.length-1));if(p&&p.extendee.typeName==e.typeName){d=!0;let[E,I]=Ih(p);Uj(E,u,p.field,n,p),wj(r,p,I(),n)}}if(!d&&!n.ignoreUnknownFields)throw new Error(`cannot decode message ${e.typeName} from JSON: key "${o}" is unknown`)}}return r},writeMessage(e,t){let n=e.getType(),r={},i;try{for(i of n.fields.byNumber()){if(!_h(i,e)){if(i.req)throw"required field not set";if(!t.emitDefaultValues||!gpe(i))continue}let o=i.oneof?e[i.oneof.localName].value:e[i.localName],u=kj(i,o,t);u!==void 0&&(r[t.useProtoFieldName?i.name:i.jsonName]=u)}let a=t.typeRegistry;if(a!=null&&a.findExtensionFor)for(let o of n.runtime.bin.listUnknownFields(e)){let u=a.findExtensionFor(n.typeName,o.no);if(u&&Rb(e,u)){let l=Fj(e,u,t),d=kj(u.field,l,t);d!==void 0&&(r[u.field.jsonName]=d)}}}catch(a){let o=i?`cannot encode field ${n.typeName}.${i.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,u=a instanceof Error?a.message:String(a);throw new Error(o+(u.length>0?`: ${u}`:""))}return r},readScalar(e,t,n){return Cp(e,t,n!=null?n:La.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||Eh(e,t)))return Sh(e,t)},debug:fs}}function fs(e){if(e===null)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function Uj(e,t,n,r,i){let a=n.localName;if(n.repeated){if(mn(n.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(t)}`);let o=e[a];for(let u of t){if(u===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(u)}`);switch(n.kind){case"message":o.push(n.T.fromJson(u,r));break;case"enum":let l=Fb(n.T,u,r.ignoreUnknownFields,!0);l!==Oh&&o.push(l);break;case"scalar":try{o.push(Cp(n.T,u,n.L,!0))}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(u)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}}else if(n.kind=="map"){if(t===null)return;if(typeof t!="object"||Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(t)}`);let o=e[a];for(let[u,l]of Object.entries(t)){if(l===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);let d;try{d=Ipe(n.K,u)}catch(p){let E=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${fs(t)}`;throw p instanceof Error&&p.message.length>0&&(E+=`: ${p.message}`),new Error(E)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(l,r);break;case"enum":let p=Fb(n.V.T,l,r.ignoreUnknownFields,!0);p!==Oh&&(o[d]=p);break;case"scalar":try{o[d]=Cp(n.V.T,l,La.BIGINT,!0)}catch(E){let I=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${fs(t)}`;throw E instanceof Error&&E.message.length>0&&(I+=`: ${E.message}`),new Error(I)}break}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a="value"),n.kind){case"message":let o=n.T;if(t===null&&o.typeName!="google.protobuf.Value")return;let u=e[a];Ba(u)?u.fromJson(t,r):(e[a]=u=o.fromJson(t,r),o.fieldWrapper&&!n.oneof&&(e[a]=o.fieldWrapper.unwrapField(u)));break;case"enum":let l=Fb(n.T,t,r.ignoreUnknownFields,!1);switch(l){case Dh:Pb(n,e);break;case Oh:break;default:e[a]=l;break}break;case"scalar":try{let d=Cp(n.T,t,n.L,!1);switch(d){case Dh:Pb(n,e);break;default:e[a]=d;break}}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(t)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}function Ipe(e,t){if(e===de.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return Cp(e,t,La.BIGINT,!0).toString()}function Cp(e,t,n,r){if(t===null)return r?Ca(e,n):Dh;switch(e){case de.DOUBLE:case de.FLOAT:if(t==="NaN")return Number.NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(t===""||typeof t=="string"&&t.trim().length!==t.length||typeof t!="string"&&typeof t!="number")break;let i=Number(t);if(Number.isNaN(i)||!Number.isFinite(i))break;return e==de.FLOAT&&mh(i),i;case de.INT32:case de.FIXED32:case de.SFIXED32:case de.SINT32:case de.UINT32:let a;if(typeof t=="number"?a=t:typeof t=="string"&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),a===void 0)break;return e==de.UINT32||e==de.FIXED32?Lp(a):gd(a),a;case de.INT64:case de.SFIXED64:case de.SINT64:if(typeof t!="number"&&typeof t!="string")break;let o=Jn.parse(t);return n?o.toString():o;case de.FIXED64:case de.UINT64:if(typeof t!="number"&&typeof t!="string")break;let u=Jn.uParse(t);return n?u.toString():u;case de.BOOL:if(typeof t!="boolean")break;return t;case de.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch(l){throw new Error("invalid UTF8")}return t;case de.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return Ab.dec(t)}throw new Error}function Fb(e,t,n,r){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:r?e.values[0].no:Dh;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let i=e.findName(t);if(i!==void 0)return i.no;if(n)return Oh;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${fs(t)}`)}function gpe(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function kj(e,t,n){if(e.kind=="map"){mn(typeof t=="object"&&t!=null);let r={},i=Object.entries(t);switch(e.V.kind){case"scalar":for(let[o,u]of i)r[o.toString()]=Sh(e.V.T,u);break;case"message":for(let[o,u]of i)r[o.toString()]=u.toJson(n);break;case"enum":let a=e.V.T;for(let[o,u]of i)r[o.toString()]=wb(a,u,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){mn(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let i=0;i0?r:void 0}switch(e.kind){case"scalar":return Sh(e.T,t);case"enum":return wb(e.T,t,n.enumAsInteger);case"message":return vh(e.T,t).toJson(n)}}function wb(e,t,n){var r;if(mn(typeof t=="number"),e.typeName=="google.protobuf.NullValue")return null;if(n)return t;let i=e.findNumber(t);return(r=i==null?void 0:i.name)!==null&&r!==void 0?r:t}function Sh(e,t){switch(e){case de.INT32:case de.SFIXED32:case de.SINT32:case de.FIXED32:case de.UINT32:return mn(typeof t=="number"),t;case de.FLOAT:case de.DOUBLE:return mn(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case de.STRING:return mn(typeof t=="string"),t;case de.BOOL:return mn(typeof t=="boolean"),t;case de.UINT64:case de.FIXED64:case de.INT64:case de.SFIXED64:case de.SINT64:return mn(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case de.BYTES:return mn(t instanceof Uint8Array),Ab.enc(t)}}m();T();N();var _d=Symbol("@bufbuild/protobuf/unknown-fields"),xj={readUnknownFields:!0,readerFactory:e=>new yh(e)},qj={writeUnknownFields:!0,writerFactory:()=>new hh};function _pe(e){return e?Object.assign(Object.assign({},xj),e):xj}function vpe(e){return e?Object.assign(Object.assign({},qj),e):qj}function $j(){return{makeReadOptions:_pe,makeWriteOptions:vpe,listUnknownFields(e){var t;return(t=e[_d])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[_d]},writeUnknownFields(e,t){let r=e[_d];if(r)for(let i of r)t.tag(i.no,i.wireType).raw(i.data)},onUnknownField(e,t,n,r){let i=e;Array.isArray(i[_d])||(i[_d]=[]),i[_d].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a=e.getType(),o=i?t.len:t.pos+n,u,l;for(;t.pos0&&(l=Spe),a){let I=e[o];if(r==xn.LengthDelimited&&u!=de.STRING&&u!=de.BYTES){let A=t.uint32()+t.pos;for(;t.posBa(I,E)?I:new E(I));else{let I=o[i];E.fieldWrapper?E.typeName==="google.protobuf.BytesValue"?a[i]=Up(I):a[i]=I:a[i]=Ba(I,E)?I:new E(I)}break}}},equals(e,t,n){return t===n?!0:!t||!n?!1:e.fields.byMember().every(r=>{let i=t[r.localName],a=n[r.localName];if(r.repeated){if(i.length!==a.length)return!1;switch(r.kind){case"message":return i.every((o,u)=>r.T.equals(o,a[u]));case"scalar":return i.every((o,u)=>qs(r.T,o,a[u]));case"enum":return i.every((o,u)=>qs(de.INT32,o,a[u]))}throw new Error(`repeated cannot contain ${r.kind}`)}switch(r.kind){case"message":return r.T.equals(i,a);case"enum":return qs(de.INT32,i,a);case"scalar":return qs(r.T,i,a);case"oneof":if(i.case!==a.case)return!1;let o=r.findField(i.case);if(o===void 0)return!0;switch(o.kind){case"message":return o.T.equals(i.value,a.value);case"enum":return qs(de.INT32,i.value,a.value);case"scalar":return qs(o.T,i.value,a.value)}throw new Error(`oneof cannot contain ${o.kind}`);case"map":let u=Object.keys(i).concat(Object.keys(a));switch(r.V.kind){case"message":let l=r.V.T;return u.every(p=>l.equals(i[p],a[p]));case"enum":return u.every(p=>qs(de.INT32,i[p],a[p]));case"scalar":let d=r.V.T;return u.every(p=>qs(d,i[p],a[p]))}break}})},clone(e){let t=e.getType(),n=new t,r=n;for(let i of t.fields.byMember()){let a=e[i.localName],o;if(i.repeated)o=a.map(Rh);else if(i.kind=="map"){o=r[i.localName];for(let[u,l]of Object.entries(a))o[u]=Rh(l)}else i.kind=="oneof"?o=i.findField(a.case)?{case:a.case,value:Rh(a.value)}:{case:void 0}:o=Rh(a);r[i.localName]=o}for(let i of t.runtime.bin.listUnknownFields(e))t.runtime.bin.onUnknownField(r,i.no,i.wireType,i.data);return n}}}function Rh(e){if(e===void 0)return e;if(Ba(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function Up(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function Yj(e,t,n){return{syntax:e,json:Mj(),bin:$j(),util:Object.assign(Object.assign({},Qj()),{newFieldList:t,initFields:n}),makeMessageType(r,i,a){return vj(this,r,i,a)},makeEnum:gj,makeEnumType:vb,getEnumType:Ij,makeExtension(r,i,a){return Rj(this,r,i,a)}}}m();T();N();var Ph=class{constructor(t,n){this._fields=t,this._normalizer=n}findJsonName(t){if(!this.jsonNames){let n={};for(let r of this.list())n[r.jsonName]=n[r.name]=r;this.jsonNames=n}return this.jsonNames[t]}find(t){if(!this.numbers){let n={};for(let r of this.list())n[r.no]=r;this.numbers=n}return this.numbers[t]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((t,n)=>t.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];let t=this.members,n;for(let r of this.list())r.oneof?r.oneof!==n&&(n=r.oneof,t.push(n)):t.push(r)}return this.members}};m();T();N();m();T();N();m();T();N();function Lb(e,t){let n=zj(e);return t?n:Fpe(Ppe(n))}function Jj(e){return Lb(e,!1)}var Hj=zj;function zj(e){let t=!1,n=[];for(let r=0;r`${e}$`,Ppe=e=>Rpe.has(e)?Wj(e):e,Fpe=e=>Ape.has(e)?Wj(e):e;var Fh=class{constructor(t){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=t,this.localName=Jj(t)}addField(t){mn(t.oneof===this,`field ${t.name} not one of ${this.name}`),this.fields.push(t)}findField(t){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;nnew Ph(e,t=>Xj(t,!0)),e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName,r=e;if(t.repeated){r[n]=[];continue}switch(t.kind){case"oneof":r[n]={case:void 0};break;case"enum":r[n]=0;break;case"map":r[n]={};break;case"scalar":r[n]=Ca(t.T,t.L);break;case"message":break}}});var vd;(function(e){e[e.OK=0]="OK",e[e.ERR=1]="ERR",e[e.ERR_NOT_FOUND=2]="ERR_NOT_FOUND",e[e.ERR_ALREADY_EXISTS=3]="ERR_ALREADY_EXISTS",e[e.ERR_INVALID_SUBGRAPH_SCHEMA=4]="ERR_INVALID_SUBGRAPH_SCHEMA",e[e.ERR_SUBGRAPH_COMPOSITION_FAILED=5]="ERR_SUBGRAPH_COMPOSITION_FAILED",e[e.ERR_SUBGRAPH_CHECK_FAILED=6]="ERR_SUBGRAPH_CHECK_FAILED",e[e.ERR_INVALID_LABELS=7]="ERR_INVALID_LABELS",e[e.ERR_ANALYTICS_DISABLED=8]="ERR_ANALYTICS_DISABLED",e[e.ERROR_NOT_AUTHENTICATED=9]="ERROR_NOT_AUTHENTICATED",e[e.ERR_OPENAI_DISABLED=10]="ERR_OPENAI_DISABLED",e[e.ERR_FREE_TRIAL_EXPIRED=11]="ERR_FREE_TRIAL_EXPIRED",e[e.ERROR_NOT_AUTHORIZED=12]="ERROR_NOT_AUTHORIZED",e[e.ERR_LIMIT_REACHED=13]="ERR_LIMIT_REACHED",e[e.ERR_DEPLOYMENT_FAILED=14]="ERR_DEPLOYMENT_FAILED",e[e.ERR_INVALID_NAME=15]="ERR_INVALID_NAME",e[e.ERR_UPGRADE_PLAN=16]="ERR_UPGRADE_PLAN",e[e.ERR_BAD_REQUEST=17]="ERR_BAD_REQUEST",e[e.ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL=18]="ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL"})(vd||(vd={}));C.util.setEnumType(vd,"wg.cosmo.common.EnumStatusCode",[{no:0,name:"OK"},{no:1,name:"ERR"},{no:2,name:"ERR_NOT_FOUND"},{no:3,name:"ERR_ALREADY_EXISTS"},{no:4,name:"ERR_INVALID_SUBGRAPH_SCHEMA"},{no:5,name:"ERR_SUBGRAPH_COMPOSITION_FAILED"},{no:6,name:"ERR_SUBGRAPH_CHECK_FAILED"},{no:7,name:"ERR_INVALID_LABELS"},{no:8,name:"ERR_ANALYTICS_DISABLED"},{no:9,name:"ERROR_NOT_AUTHENTICATED"},{no:10,name:"ERR_OPENAI_DISABLED"},{no:11,name:"ERR_FREE_TRIAL_EXPIRED"},{no:12,name:"ERROR_NOT_AUTHORIZED"},{no:13,name:"ERR_LIMIT_REACHED"},{no:14,name:"ERR_DEPLOYMENT_FAILED"},{no:15,name:"ERR_INVALID_NAME"},{no:16,name:"ERR_UPGRADE_PLAN"},{no:17,name:"ERR_BAD_REQUEST"},{no:18,name:"ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL"}]);var js;(function(e){e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS=0]="GRAPHQL_SUBSCRIPTION_PROTOCOL_WS",e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE=1]="GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE",e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST=2]="GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST"})(js||(js={}));C.util.setEnumType(js,"wg.cosmo.common.GraphQLSubscriptionProtocol",[{no:0,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_WS"},{no:1,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE"},{no:2,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST"}]);var Ks;(function(e){e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO=0]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO",e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS=1]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS",e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS=2]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS"})(Ks||(Ks={}));C.util.setEnumType(Ks,"wg.cosmo.common.GraphQLWebsocketSubprotocol",[{no:0,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO"},{no:1,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS"},{no:2,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS"}]);var uK=Ni(_e(),1);m();T();N();var Cb;(function(e){e[e.RENDER_ARGUMENT_DEFAULT=0]="RENDER_ARGUMENT_DEFAULT",e[e.RENDER_ARGUMENT_AS_GRAPHQL_VALUE=1]="RENDER_ARGUMENT_AS_GRAPHQL_VALUE",e[e.RENDER_ARGUMENT_AS_ARRAY_CSV=2]="RENDER_ARGUMENT_AS_ARRAY_CSV"})(Cb||(Cb={}));C.util.setEnumType(Cb,"wg.cosmo.node.v1.ArgumentRenderConfiguration",[{no:0,name:"RENDER_ARGUMENT_DEFAULT"},{no:1,name:"RENDER_ARGUMENT_AS_GRAPHQL_VALUE"},{no:2,name:"RENDER_ARGUMENT_AS_ARRAY_CSV"}]);var zc;(function(e){e[e.OBJECT_FIELD=0]="OBJECT_FIELD",e[e.FIELD_ARGUMENT=1]="FIELD_ARGUMENT"})(zc||(zc={}));C.util.setEnumType(zc,"wg.cosmo.node.v1.ArgumentSource",[{no:0,name:"OBJECT_FIELD"},{no:1,name:"FIELD_ARGUMENT"}]);var xu;(function(e){e[e.STATIC=0]="STATIC",e[e.GRAPHQL=1]="GRAPHQL",e[e.PUBSUB=2]="PUBSUB"})(xu||(xu={}));C.util.setEnumType(xu,"wg.cosmo.node.v1.DataSourceKind",[{no:0,name:"STATIC"},{no:1,name:"GRAPHQL"},{no:2,name:"PUBSUB"}]);var kp;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.RESOLVE=1]="RESOLVE",e[e.REQUIRES=2]="REQUIRES"})(kp||(kp={}));C.util.setEnumType(kp,"wg.cosmo.node.v1.LookupType",[{no:0,name:"LOOKUP_TYPE_UNSPECIFIED"},{no:1,name:"LOOKUP_TYPE_RESOLVE"},{no:2,name:"LOOKUP_TYPE_REQUIRES"}]);var Mp;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.QUERY=1]="QUERY",e[e.MUTATION=2]="MUTATION",e[e.SUBSCRIPTION=3]="SUBSCRIPTION"})(Mp||(Mp={}));C.util.setEnumType(Mp,"wg.cosmo.node.v1.OperationType",[{no:0,name:"OPERATION_TYPE_UNSPECIFIED"},{no:1,name:"OPERATION_TYPE_QUERY"},{no:2,name:"OPERATION_TYPE_MUTATION"},{no:3,name:"OPERATION_TYPE_SUBSCRIPTION"}]);var eu;(function(e){e[e.PUBLISH=0]="PUBLISH",e[e.REQUEST=1]="REQUEST",e[e.SUBSCRIBE=2]="SUBSCRIBE"})(eu||(eu={}));C.util.setEnumType(eu,"wg.cosmo.node.v1.EventType",[{no:0,name:"PUBLISH"},{no:1,name:"REQUEST"},{no:2,name:"SUBSCRIBE"}]);var qu;(function(e){e[e.STATIC_CONFIGURATION_VARIABLE=0]="STATIC_CONFIGURATION_VARIABLE",e[e.ENV_CONFIGURATION_VARIABLE=1]="ENV_CONFIGURATION_VARIABLE",e[e.PLACEHOLDER_CONFIGURATION_VARIABLE=2]="PLACEHOLDER_CONFIGURATION_VARIABLE"})(qu||(qu={}));C.util.setEnumType(qu,"wg.cosmo.node.v1.ConfigurationVariableKind",[{no:0,name:"STATIC_CONFIGURATION_VARIABLE"},{no:1,name:"ENV_CONFIGURATION_VARIABLE"},{no:2,name:"PLACEHOLDER_CONFIGURATION_VARIABLE"}]);var Wc;(function(e){e[e.GET=0]="GET",e[e.POST=1]="POST",e[e.PUT=2]="PUT",e[e.DELETE=3]="DELETE",e[e.OPTIONS=4]="OPTIONS"})(Wc||(Wc={}));C.util.setEnumType(Wc,"wg.cosmo.node.v1.HTTPMethod",[{no:0,name:"GET"},{no:1,name:"POST"},{no:2,name:"PUT"},{no:3,name:"DELETE"},{no:4,name:"OPTIONS"}]);var $s=class $s extends Fe{constructor(n){super();g(this,"id","");g(this,"name","");g(this,"routingUrl","");C.util.initPartial(n,this)}static fromBinary(n,r){return new $s().fromBinary(n,r)}static fromJson(n,r){return new $s().fromJson(n,r)}static fromJsonString(n,r){return new $s().fromJsonString(n,r)}static equals(n,r){return C.util.equals($s,n,r)}};g($s,"runtime",C),g($s,"typeName","wg.cosmo.node.v1.Subgraph"),g($s,"fields",C.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"routing_url",kind:"scalar",T:9}]));var wh=$s,Gs=class Gs extends Fe{constructor(n){super();g(this,"configByFeatureFlagName",{});C.util.initPartial(n,this)}static fromBinary(n,r){return new Gs().fromBinary(n,r)}static fromJson(n,r){return new Gs().fromJson(n,r)}static fromJsonString(n,r){return new Gs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Gs,n,r)}};g(Gs,"runtime",C),g(Gs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs"),g(Gs,"fields",C.util.newFieldList(()=>[{no:1,name:"config_by_feature_flag_name",kind:"map",K:9,V:{kind:"message",T:Ub}}]));var Bb=Gs,Qs=class Qs extends Fe{constructor(n){super();g(this,"engineConfig");g(this,"version","");g(this,"subgraphs",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Qs().fromBinary(n,r)}static fromJson(n,r){return new Qs().fromJson(n,r)}static fromJsonString(n,r){return new Qs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Qs,n,r)}};g(Qs,"runtime",C),g(Qs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig"),g(Qs,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:Od},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:wh,repeated:!0}]));var Ub=Qs,Ys=class Ys extends Fe{constructor(n){super();g(this,"engineConfig");g(this,"version","");g(this,"subgraphs",[]);g(this,"featureFlagConfigs");g(this,"compatibilityVersion","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ys().fromBinary(n,r)}static fromJson(n,r){return new Ys().fromJson(n,r)}static fromJsonString(n,r){return new Ys().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ys,n,r)}};g(Ys,"runtime",C),g(Ys,"typeName","wg.cosmo.node.v1.RouterConfig"),g(Ys,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:Od},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:wh,repeated:!0},{no:4,name:"feature_flag_configs",kind:"message",T:Bb,opt:!0},{no:5,name:"compatibility_version",kind:"scalar",T:9}]));var xp=Ys,Js=class Js extends Fe{constructor(n){super();g(this,"code",vd.OK);g(this,"details");C.util.initPartial(n,this)}static fromBinary(n,r){return new Js().fromBinary(n,r)}static fromJson(n,r){return new Js().fromJson(n,r)}static fromJsonString(n,r){return new Js().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Js,n,r)}};g(Js,"runtime",C),g(Js,"typeName","wg.cosmo.node.v1.Response"),g(Js,"fields",C.util.newFieldList(()=>[{no:1,name:"code",kind:"enum",T:C.getEnumType(vd)},{no:2,name:"details",kind:"scalar",T:9,opt:!0}]));var kb=Js,Hs=class Hs extends Fe{constructor(n){super();g(this,"code",0);g(this,"message","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Hs().fromBinary(n,r)}static fromJson(n,r){return new Hs().fromJson(n,r)}static fromJsonString(n,r){return new Hs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Hs,n,r)}};g(Hs,"runtime",C),g(Hs,"typeName","wg.cosmo.node.v1.ResponseStatus"),g(Hs,"fields",C.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}]));var Zj=Hs,zs=class zs extends Fe{constructor(n){super();g(this,"accountLimits");g(this,"graphPublicKey","");C.util.initPartial(n,this)}static fromBinary(n,r){return new zs().fromBinary(n,r)}static fromJson(n,r){return new zs().fromJson(n,r)}static fromJsonString(n,r){return new zs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(zs,n,r)}};g(zs,"runtime",C),g(zs,"typeName","wg.cosmo.node.v1.RegistrationInfo"),g(zs,"fields",C.util.newFieldList(()=>[{no:1,name:"account_limits",kind:"message",T:xb},{no:2,name:"graph_public_key",kind:"scalar",T:9}]));var Mb=zs,Ws=class Ws extends Fe{constructor(n){super();g(this,"traceSamplingRate",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ws().fromBinary(n,r)}static fromJson(n,r){return new Ws().fromJson(n,r)}static fromJsonString(n,r){return new Ws().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ws,n,r)}};g(Ws,"runtime",C),g(Ws,"typeName","wg.cosmo.node.v1.AccountLimits"),g(Ws,"fields",C.util.newFieldList(()=>[{no:1,name:"trace_sampling_rate",kind:"scalar",T:2}]));var xb=Ws,Xs=class Xs extends Fe{constructor(t){super(),C.util.initPartial(t,this)}static fromBinary(t,n){return new Xs().fromBinary(t,n)}static fromJson(t,n){return new Xs().fromJson(t,n)}static fromJsonString(t,n){return new Xs().fromJsonString(t,n)}static equals(t,n){return C.util.equals(Xs,t,n)}};g(Xs,"runtime",C),g(Xs,"typeName","wg.cosmo.node.v1.SelfRegisterRequest"),g(Xs,"fields",C.util.newFieldList(()=>[]));var eK=Xs,Zs=class Zs extends Fe{constructor(n){super();g(this,"response");g(this,"registrationInfo");C.util.initPartial(n,this)}static fromBinary(n,r){return new Zs().fromBinary(n,r)}static fromJson(n,r){return new Zs().fromJson(n,r)}static fromJsonString(n,r){return new Zs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Zs,n,r)}};g(Zs,"runtime",C),g(Zs,"typeName","wg.cosmo.node.v1.SelfRegisterResponse"),g(Zs,"fields",C.util.newFieldList(()=>[{no:1,name:"response",kind:"message",T:kb},{no:2,name:"registrationInfo",kind:"message",T:Mb,opt:!0}]));var tK=Zs,eo=class eo extends Fe{constructor(n){super();g(this,"defaultFlushInterval",Jn.zero);g(this,"datasourceConfigurations",[]);g(this,"fieldConfigurations",[]);g(this,"graphqlSchema","");g(this,"typeConfigurations",[]);g(this,"stringStorage",{});g(this,"graphqlClientSchema");C.util.initPartial(n,this)}static fromBinary(n,r){return new eo().fromBinary(n,r)}static fromJson(n,r){return new eo().fromJson(n,r)}static fromJsonString(n,r){return new eo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(eo,n,r)}};g(eo,"runtime",C),g(eo,"typeName","wg.cosmo.node.v1.EngineConfiguration"),g(eo,"fields",C.util.newFieldList(()=>[{no:1,name:"defaultFlushInterval",kind:"scalar",T:3},{no:2,name:"datasource_configurations",kind:"message",T:qp,repeated:!0},{no:3,name:"field_configurations",kind:"message",T:Kp,repeated:!0},{no:4,name:"graphqlSchema",kind:"scalar",T:9},{no:5,name:"type_configurations",kind:"message",T:qb,repeated:!0},{no:6,name:"string_storage",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:7,name:"graphql_client_schema",kind:"scalar",T:9,opt:!0}]));var Od=eo,to=class to extends Fe{constructor(n){super();g(this,"kind",xu.STATIC);g(this,"rootNodes",[]);g(this,"childNodes",[]);g(this,"overrideFieldPathFromAlias",!1);g(this,"customGraphql");g(this,"customStatic");g(this,"directives",[]);g(this,"requestTimeoutSeconds",Jn.zero);g(this,"id","");g(this,"keys",[]);g(this,"provides",[]);g(this,"requires",[]);g(this,"customEvents");g(this,"entityInterfaces",[]);g(this,"interfaceObjects",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new to().fromBinary(n,r)}static fromJson(n,r){return new to().fromJson(n,r)}static fromJsonString(n,r){return new to().fromJsonString(n,r)}static equals(n,r){return C.util.equals(to,n,r)}};g(to,"runtime",C),g(to,"typeName","wg.cosmo.node.v1.DataSourceConfiguration"),g(to,"fields",C.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(xu)},{no:2,name:"root_nodes",kind:"message",T:Sd,repeated:!0},{no:3,name:"child_nodes",kind:"message",T:Sd,repeated:!0},{no:4,name:"override_field_path_from_alias",kind:"scalar",T:8},{no:5,name:"custom_graphql",kind:"message",T:Qp},{no:6,name:"custom_static",kind:"message",T:Zb},{no:7,name:"directives",kind:"message",T:e0,repeated:!0},{no:8,name:"request_timeout_seconds",kind:"scalar",T:3},{no:9,name:"id",kind:"scalar",T:9},{no:10,name:"keys",kind:"message",T:Hc,repeated:!0},{no:11,name:"provides",kind:"message",T:Hc,repeated:!0},{no:12,name:"requires",kind:"message",T:Hc,repeated:!0},{no:13,name:"custom_events",kind:"message",T:Zc},{no:14,name:"entity_interfaces",kind:"message",T:Dd,repeated:!0},{no:15,name:"interface_objects",kind:"message",T:Dd,repeated:!0}]));var qp=to,no=class no extends Fe{constructor(n){super();g(this,"name","");g(this,"sourceType",zc.OBJECT_FIELD);C.util.initPartial(n,this)}static fromBinary(n,r){return new no().fromBinary(n,r)}static fromJson(n,r){return new no().fromJson(n,r)}static fromJsonString(n,r){return new no().fromJsonString(n,r)}static equals(n,r){return C.util.equals(no,n,r)}};g(no,"runtime",C),g(no,"typeName","wg.cosmo.node.v1.ArgumentConfiguration"),g(no,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source_type",kind:"enum",T:C.getEnumType(zc)}]));var Vp=no,ro=class ro extends Fe{constructor(n){super();g(this,"requiredAndScopes",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new ro().fromBinary(n,r)}static fromJson(n,r){return new ro().fromJson(n,r)}static fromJsonString(n,r){return new ro().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ro,n,r)}};g(ro,"runtime",C),g(ro,"typeName","wg.cosmo.node.v1.Scopes"),g(ro,"fields",C.util.newFieldList(()=>[{no:1,name:"required_and_scopes",kind:"scalar",T:9,repeated:!0}]));var Xc=ro,io=class io extends Fe{constructor(n){super();g(this,"requiresAuthentication",!1);g(this,"requiredOrScopes",[]);g(this,"requiredOrScopesByOr",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new io().fromBinary(n,r)}static fromJson(n,r){return new io().fromJson(n,r)}static fromJsonString(n,r){return new io().fromJsonString(n,r)}static equals(n,r){return C.util.equals(io,n,r)}};g(io,"runtime",C),g(io,"typeName","wg.cosmo.node.v1.AuthorizationConfiguration"),g(io,"fields",C.util.newFieldList(()=>[{no:1,name:"requires_authentication",kind:"scalar",T:8},{no:2,name:"required_or_scopes",kind:"message",T:Xc,repeated:!0},{no:3,name:"required_or_scopes_by_or",kind:"message",T:Xc,repeated:!0}]));var jp=io,ao=class ao extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");g(this,"argumentsConfiguration",[]);g(this,"authorizationConfiguration");g(this,"subscriptionFilterCondition");C.util.initPartial(n,this)}static fromBinary(n,r){return new ao().fromBinary(n,r)}static fromJson(n,r){return new ao().fromJson(n,r)}static fromJsonString(n,r){return new ao().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ao,n,r)}};g(ao,"runtime",C),g(ao,"typeName","wg.cosmo.node.v1.FieldConfiguration"),g(ao,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9},{no:3,name:"arguments_configuration",kind:"message",T:Vp,repeated:!0},{no:4,name:"authorization_configuration",kind:"message",T:jp},{no:5,name:"subscription_filter_condition",kind:"message",T:Vu,opt:!0}]));var Kp=ao,so=class so extends Fe{constructor(n){super();g(this,"typeName","");g(this,"renameTo","");C.util.initPartial(n,this)}static fromBinary(n,r){return new so().fromBinary(n,r)}static fromJson(n,r){return new so().fromJson(n,r)}static fromJsonString(n,r){return new so().fromJsonString(n,r)}static equals(n,r){return C.util.equals(so,n,r)}};g(so,"runtime",C),g(so,"typeName","wg.cosmo.node.v1.TypeConfiguration"),g(so,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var qb=so,oo=class oo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldNames",[]);g(this,"externalFieldNames",[]);g(this,"requireFetchReasonsFieldNames",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new oo().fromBinary(n,r)}static fromJson(n,r){return new oo().fromJson(n,r)}static fromJsonString(n,r){return new oo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(oo,n,r)}};g(oo,"runtime",C),g(oo,"typeName","wg.cosmo.node.v1.TypeField"),g(oo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_names",kind:"scalar",T:9,repeated:!0},{no:3,name:"external_field_names",kind:"scalar",T:9,repeated:!0},{no:4,name:"require_fetch_reasons_field_names",kind:"scalar",T:9,repeated:!0}]));var Sd=oo,uo=class uo extends Fe{constructor(n){super();g(this,"fieldName","");g(this,"typeName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new uo().fromBinary(n,r)}static fromJson(n,r){return new uo().fromJson(n,r)}static fromJsonString(n,r){return new uo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(uo,n,r)}};g(uo,"runtime",C),g(uo,"typeName","wg.cosmo.node.v1.FieldCoordinates"),g(uo,"fields",C.util.newFieldList(()=>[{no:1,name:"field_name",kind:"scalar",T:9},{no:2,name:"type_name",kind:"scalar",T:9}]));var $p=uo,co=class co extends Fe{constructor(n){super();g(this,"fieldCoordinatesPath",[]);g(this,"fieldPath",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new co().fromBinary(n,r)}static fromJson(n,r){return new co().fromJson(n,r)}static fromJsonString(n,r){return new co().fromJsonString(n,r)}static equals(n,r){return C.util.equals(co,n,r)}};g(co,"runtime",C),g(co,"typeName","wg.cosmo.node.v1.FieldSetCondition"),g(co,"fields",C.util.newFieldList(()=>[{no:1,name:"field_coordinates_path",kind:"message",T:$p,repeated:!0},{no:2,name:"field_path",kind:"scalar",T:9,repeated:!0}]));var Gp=co,lo=class lo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");g(this,"selectionSet","");g(this,"disableEntityResolver",!1);g(this,"conditions",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new lo().fromBinary(n,r)}static fromJson(n,r){return new lo().fromJson(n,r)}static fromJsonString(n,r){return new lo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(lo,n,r)}};g(lo,"runtime",C),g(lo,"typeName","wg.cosmo.node.v1.RequiredField"),g(lo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9},{no:3,name:"selection_set",kind:"scalar",T:9},{no:4,name:"disable_entity_resolver",kind:"scalar",T:8},{no:5,name:"conditions",kind:"message",T:Gp,repeated:!0}]));var Hc=lo,fo=class fo extends Fe{constructor(n){super();g(this,"interfaceTypeName","");g(this,"concreteTypeNames",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new fo().fromBinary(n,r)}static fromJson(n,r){return new fo().fromJson(n,r)}static fromJsonString(n,r){return new fo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(fo,n,r)}};g(fo,"runtime",C),g(fo,"typeName","wg.cosmo.node.v1.EntityInterfaceConfiguration"),g(fo,"fields",C.util.newFieldList(()=>[{no:1,name:"interface_type_name",kind:"scalar",T:9},{no:2,name:"concrete_type_names",kind:"scalar",T:9,repeated:!0}]));var Dd=fo,po=class po extends Fe{constructor(n){super();g(this,"url");g(this,"method",Wc.GET);g(this,"header",{});g(this,"body");g(this,"query",[]);g(this,"urlEncodeBody",!1);g(this,"mtls");g(this,"baseUrl");g(this,"path");g(this,"httpProxyUrl");C.util.initPartial(n,this)}static fromBinary(n,r){return new po().fromBinary(n,r)}static fromJson(n,r){return new po().fromJson(n,r)}static fromJsonString(n,r){return new po().fromJsonString(n,r)}static equals(n,r){return C.util.equals(po,n,r)}};g(po,"runtime",C),g(po,"typeName","wg.cosmo.node.v1.FetchConfiguration"),g(po,"fields",C.util.newFieldList(()=>[{no:1,name:"url",kind:"message",T:Qr},{no:2,name:"method",kind:"enum",T:C.getEnumType(Wc)},{no:3,name:"header",kind:"map",K:9,V:{kind:"message",T:n0}},{no:4,name:"body",kind:"message",T:Qr},{no:5,name:"query",kind:"message",T:t0,repeated:!0},{no:7,name:"url_encode_body",kind:"scalar",T:8},{no:8,name:"mtls",kind:"message",T:r0},{no:9,name:"base_url",kind:"message",T:Qr},{no:10,name:"path",kind:"message",T:Qr},{no:11,name:"http_proxy_url",kind:"message",T:Qr,opt:!0}]));var Vb=po,mo=class mo extends Fe{constructor(n){super();g(this,"statusCode",Jn.zero);g(this,"typeName","");g(this,"injectStatusCodeIntoBody",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new mo().fromBinary(n,r)}static fromJson(n,r){return new mo().fromJson(n,r)}static fromJsonString(n,r){return new mo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(mo,n,r)}};g(mo,"runtime",C),g(mo,"typeName","wg.cosmo.node.v1.StatusCodeTypeMapping"),g(mo,"fields",C.util.newFieldList(()=>[{no:1,name:"status_code",kind:"scalar",T:3},{no:2,name:"type_name",kind:"scalar",T:9},{no:3,name:"inject_status_code_into_body",kind:"scalar",T:8}]));var nK=mo,No=class No extends Fe{constructor(n){super();g(this,"fetch");g(this,"subscription");g(this,"federation");g(this,"upstreamSchema");g(this,"customScalarTypeFields",[]);g(this,"grpc");C.util.initPartial(n,this)}static fromBinary(n,r){return new No().fromBinary(n,r)}static fromJson(n,r){return new No().fromJson(n,r)}static fromJsonString(n,r){return new No().fromJsonString(n,r)}static equals(n,r){return C.util.equals(No,n,r)}};g(No,"runtime",C),g(No,"typeName","wg.cosmo.node.v1.DataSourceCustom_GraphQL"),g(No,"fields",C.util.newFieldList(()=>[{no:1,name:"fetch",kind:"message",T:Vb},{no:2,name:"subscription",kind:"message",T:i0},{no:3,name:"federation",kind:"message",T:a0},{no:4,name:"upstream_schema",kind:"message",T:Zp},{no:6,name:"custom_scalar_type_fields",kind:"message",T:s0,repeated:!0},{no:7,name:"grpc",kind:"message",T:bd}]));var Qp=No,To=class To extends Fe{constructor(n){super();g(this,"mapping");g(this,"protoSchema","");g(this,"plugin");C.util.initPartial(n,this)}static fromBinary(n,r){return new To().fromBinary(n,r)}static fromJson(n,r){return new To().fromJson(n,r)}static fromJsonString(n,r){return new To().fromJsonString(n,r)}static equals(n,r){return C.util.equals(To,n,r)}};g(To,"runtime",C),g(To,"typeName","wg.cosmo.node.v1.GRPCConfiguration"),g(To,"fields",C.util.newFieldList(()=>[{no:1,name:"mapping",kind:"message",T:Kb},{no:2,name:"proto_schema",kind:"scalar",T:9},{no:3,name:"plugin",kind:"message",T:Yp}]));var bd=To,Eo=class Eo extends Fe{constructor(n){super();g(this,"repository","");g(this,"reference","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Eo().fromBinary(n,r)}static fromJson(n,r){return new Eo().fromJson(n,r)}static fromJsonString(n,r){return new Eo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Eo,n,r)}};g(Eo,"runtime",C),g(Eo,"typeName","wg.cosmo.node.v1.ImageReference"),g(Eo,"fields",C.util.newFieldList(()=>[{no:1,name:"repository",kind:"scalar",T:9},{no:2,name:"reference",kind:"scalar",T:9}]));var jb=Eo,ho=class ho extends Fe{constructor(n){super();g(this,"name","");g(this,"version","");g(this,"imageReference");C.util.initPartial(n,this)}static fromBinary(n,r){return new ho().fromBinary(n,r)}static fromJson(n,r){return new ho().fromJson(n,r)}static fromJsonString(n,r){return new ho().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ho,n,r)}};g(ho,"runtime",C),g(ho,"typeName","wg.cosmo.node.v1.PluginConfiguration"),g(ho,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"image_reference",kind:"message",T:jb,opt:!0}]));var Yp=ho,yo=class yo extends Fe{constructor(n){super();g(this,"enabled",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new yo().fromBinary(n,r)}static fromJson(n,r){return new yo().fromJson(n,r)}static fromJsonString(n,r){return new yo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(yo,n,r)}};g(yo,"runtime",C),g(yo,"typeName","wg.cosmo.node.v1.SSLConfiguration"),g(yo,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8}]));var rK=yo,Io=class Io extends Fe{constructor(n){super();g(this,"version",0);g(this,"service","");g(this,"operationMappings",[]);g(this,"entityMappings",[]);g(this,"typeFieldMappings",[]);g(this,"enumMappings",[]);g(this,"resolveMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Io().fromBinary(n,r)}static fromJson(n,r){return new Io().fromJson(n,r)}static fromJsonString(n,r){return new Io().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Io,n,r)}};g(Io,"runtime",C),g(Io,"typeName","wg.cosmo.node.v1.GRPCMapping"),g(Io,"fields",C.util.newFieldList(()=>[{no:1,name:"version",kind:"scalar",T:5},{no:2,name:"service",kind:"scalar",T:9},{no:3,name:"operation_mappings",kind:"message",T:Qb,repeated:!0},{no:4,name:"entity_mappings",kind:"message",T:Yb,repeated:!0},{no:5,name:"type_field_mappings",kind:"message",T:Hb,repeated:!0},{no:6,name:"enum_mappings",kind:"message",T:Wb,repeated:!0},{no:7,name:"resolve_mappings",kind:"message",T:$b,repeated:!0}]));var Kb=Io,go=class go extends Fe{constructor(n){super();g(this,"type",kp.UNSPECIFIED);g(this,"lookupMapping");g(this,"rpc","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new go().fromBinary(n,r)}static fromJson(n,r){return new go().fromJson(n,r)}static fromJsonString(n,r){return new go().fromJsonString(n,r)}static equals(n,r){return C.util.equals(go,n,r)}};g(go,"runtime",C),g(go,"typeName","wg.cosmo.node.v1.LookupMapping"),g(go,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:C.getEnumType(kp)},{no:2,name:"lookup_mapping",kind:"message",T:Gb},{no:3,name:"rpc",kind:"scalar",T:9},{no:4,name:"request",kind:"scalar",T:9},{no:5,name:"response",kind:"scalar",T:9}]));var $b=go,_o=class _o extends Fe{constructor(n){super();g(this,"type","");g(this,"fieldMapping");C.util.initPartial(n,this)}static fromBinary(n,r){return new _o().fromBinary(n,r)}static fromJson(n,r){return new _o().fromJson(n,r)}static fromJsonString(n,r){return new _o().fromJsonString(n,r)}static equals(n,r){return C.util.equals(_o,n,r)}};g(_o,"runtime",C),g(_o,"typeName","wg.cosmo.node.v1.LookupFieldMapping"),g(_o,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mapping",kind:"message",T:Jp}]));var Gb=_o,vo=class vo extends Fe{constructor(n){super();g(this,"type",Mp.UNSPECIFIED);g(this,"original","");g(this,"mapped","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new vo().fromBinary(n,r)}static fromJson(n,r){return new vo().fromJson(n,r)}static fromJsonString(n,r){return new vo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(vo,n,r)}};g(vo,"runtime",C),g(vo,"typeName","wg.cosmo.node.v1.OperationMapping"),g(vo,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:C.getEnumType(Mp)},{no:2,name:"original",kind:"scalar",T:9},{no:3,name:"mapped",kind:"scalar",T:9},{no:4,name:"request",kind:"scalar",T:9},{no:5,name:"response",kind:"scalar",T:9}]));var Qb=vo,Oo=class Oo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"kind","");g(this,"key","");g(this,"rpc","");g(this,"request","");g(this,"response","");g(this,"requiredFieldMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Oo().fromBinary(n,r)}static fromJson(n,r){return new Oo().fromJson(n,r)}static fromJsonString(n,r){return new Oo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Oo,n,r)}};g(Oo,"runtime",C),g(Oo,"typeName","wg.cosmo.node.v1.EntityMapping"),g(Oo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"kind",kind:"scalar",T:9},{no:3,name:"key",kind:"scalar",T:9},{no:4,name:"rpc",kind:"scalar",T:9},{no:5,name:"request",kind:"scalar",T:9},{no:6,name:"response",kind:"scalar",T:9},{no:7,name:"required_field_mappings",kind:"message",T:Jb,repeated:!0}]));var Yb=Oo,So=class So extends Fe{constructor(n){super();g(this,"fieldMapping");g(this,"rpc","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new So().fromBinary(n,r)}static fromJson(n,r){return new So().fromJson(n,r)}static fromJsonString(n,r){return new So().fromJsonString(n,r)}static equals(n,r){return C.util.equals(So,n,r)}};g(So,"runtime",C),g(So,"typeName","wg.cosmo.node.v1.RequiredFieldMapping"),g(So,"fields",C.util.newFieldList(()=>[{no:1,name:"field_mapping",kind:"message",T:Jp},{no:2,name:"rpc",kind:"scalar",T:9},{no:3,name:"request",kind:"scalar",T:9},{no:4,name:"response",kind:"scalar",T:9}]));var Jb=So,Do=class Do extends Fe{constructor(n){super();g(this,"type","");g(this,"fieldMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Do().fromBinary(n,r)}static fromJson(n,r){return new Do().fromJson(n,r)}static fromJsonString(n,r){return new Do().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Do,n,r)}};g(Do,"runtime",C),g(Do,"typeName","wg.cosmo.node.v1.TypeFieldMapping"),g(Do,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mappings",kind:"message",T:Jp,repeated:!0}]));var Hb=Do,bo=class bo extends Fe{constructor(n){super();g(this,"original","");g(this,"mapped","");g(this,"argumentMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new bo().fromBinary(n,r)}static fromJson(n,r){return new bo().fromJson(n,r)}static fromJsonString(n,r){return new bo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(bo,n,r)}};g(bo,"runtime",C),g(bo,"typeName","wg.cosmo.node.v1.FieldMapping"),g(bo,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9},{no:3,name:"argument_mappings",kind:"message",T:zb,repeated:!0}]));var Jp=bo,Ao=class Ao extends Fe{constructor(n){super();g(this,"original","");g(this,"mapped","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ao().fromBinary(n,r)}static fromJson(n,r){return new Ao().fromJson(n,r)}static fromJsonString(n,r){return new Ao().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ao,n,r)}};g(Ao,"runtime",C),g(Ao,"typeName","wg.cosmo.node.v1.ArgumentMapping"),g(Ao,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var zb=Ao,Ro=class Ro extends Fe{constructor(n){super();g(this,"type","");g(this,"values",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ro().fromBinary(n,r)}static fromJson(n,r){return new Ro().fromJson(n,r)}static fromJsonString(n,r){return new Ro().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ro,n,r)}};g(Ro,"runtime",C),g(Ro,"typeName","wg.cosmo.node.v1.EnumMapping"),g(Ro,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"values",kind:"message",T:Xb,repeated:!0}]));var Wb=Ro,Po=class Po extends Fe{constructor(n){super();g(this,"original","");g(this,"mapped","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Po().fromBinary(n,r)}static fromJson(n,r){return new Po().fromJson(n,r)}static fromJsonString(n,r){return new Po().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Po,n,r)}};g(Po,"runtime",C),g(Po,"typeName","wg.cosmo.node.v1.EnumValueMapping"),g(Po,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var Xb=Po,Fo=class Fo extends Fe{constructor(n){super();g(this,"consumerName","");g(this,"streamName","");g(this,"consumerInactiveThreshold",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Fo().fromBinary(n,r)}static fromJson(n,r){return new Fo().fromJson(n,r)}static fromJsonString(n,r){return new Fo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Fo,n,r)}};g(Fo,"runtime",C),g(Fo,"typeName","wg.cosmo.node.v1.NatsStreamConfiguration"),g(Fo,"fields",C.util.newFieldList(()=>[{no:1,name:"consumer_name",kind:"scalar",T:9},{no:2,name:"stream_name",kind:"scalar",T:9},{no:3,name:"consumer_inactive_threshold",kind:"scalar",T:5}]));var Hp=Fo,wo=class wo extends Fe{constructor(n){super();g(this,"engineEventConfiguration");g(this,"subjects",[]);g(this,"streamConfiguration");C.util.initPartial(n,this)}static fromBinary(n,r){return new wo().fromBinary(n,r)}static fromJson(n,r){return new wo().fromJson(n,r)}static fromJsonString(n,r){return new wo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(wo,n,r)}};g(wo,"runtime",C),g(wo,"typeName","wg.cosmo.node.v1.NatsEventConfiguration"),g(wo,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:tu},{no:2,name:"subjects",kind:"scalar",T:9,repeated:!0},{no:3,name:"stream_configuration",kind:"message",T:Hp}]));var zp=wo,Lo=class Lo extends Fe{constructor(n){super();g(this,"engineEventConfiguration");g(this,"topics",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Lo().fromBinary(n,r)}static fromJson(n,r){return new Lo().fromJson(n,r)}static fromJsonString(n,r){return new Lo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Lo,n,r)}};g(Lo,"runtime",C),g(Lo,"typeName","wg.cosmo.node.v1.KafkaEventConfiguration"),g(Lo,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:tu},{no:2,name:"topics",kind:"scalar",T:9,repeated:!0}]));var Wp=Lo,Co=class Co extends Fe{constructor(n){super();g(this,"engineEventConfiguration");g(this,"channels",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Co().fromBinary(n,r)}static fromJson(n,r){return new Co().fromJson(n,r)}static fromJsonString(n,r){return new Co().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Co,n,r)}};g(Co,"runtime",C),g(Co,"typeName","wg.cosmo.node.v1.RedisEventConfiguration"),g(Co,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:tu},{no:2,name:"channels",kind:"scalar",T:9,repeated:!0}]));var Xp=Co,Bo=class Bo extends Fe{constructor(n){super();g(this,"providerId","");g(this,"type",eu.PUBLISH);g(this,"typeName","");g(this,"fieldName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Bo().fromBinary(n,r)}static fromJson(n,r){return new Bo().fromJson(n,r)}static fromJsonString(n,r){return new Bo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Bo,n,r)}};g(Bo,"runtime",C),g(Bo,"typeName","wg.cosmo.node.v1.EngineEventConfiguration"),g(Bo,"fields",C.util.newFieldList(()=>[{no:1,name:"provider_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:C.getEnumType(eu)},{no:3,name:"type_name",kind:"scalar",T:9},{no:4,name:"field_name",kind:"scalar",T:9}]));var tu=Bo,Uo=class Uo extends Fe{constructor(n){super();g(this,"nats",[]);g(this,"kafka",[]);g(this,"redis",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Uo().fromBinary(n,r)}static fromJson(n,r){return new Uo().fromJson(n,r)}static fromJsonString(n,r){return new Uo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Uo,n,r)}};g(Uo,"runtime",C),g(Uo,"typeName","wg.cosmo.node.v1.DataSourceCustomEvents"),g(Uo,"fields",C.util.newFieldList(()=>[{no:1,name:"nats",kind:"message",T:zp,repeated:!0},{no:2,name:"kafka",kind:"message",T:Wp,repeated:!0},{no:3,name:"redis",kind:"message",T:Xp,repeated:!0}]));var Zc=Uo,ko=class ko extends Fe{constructor(n){super();g(this,"data");C.util.initPartial(n,this)}static fromBinary(n,r){return new ko().fromBinary(n,r)}static fromJson(n,r){return new ko().fromJson(n,r)}static fromJsonString(n,r){return new ko().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ko,n,r)}};g(ko,"runtime",C),g(ko,"typeName","wg.cosmo.node.v1.DataSourceCustom_Static"),g(ko,"fields",C.util.newFieldList(()=>[{no:1,name:"data",kind:"message",T:Qr}]));var Zb=ko,Mo=class Mo extends Fe{constructor(n){super();g(this,"kind",qu.STATIC_CONFIGURATION_VARIABLE);g(this,"staticVariableContent","");g(this,"environmentVariableName","");g(this,"environmentVariableDefaultValue","");g(this,"placeholderVariableName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Mo().fromBinary(n,r)}static fromJson(n,r){return new Mo().fromJson(n,r)}static fromJsonString(n,r){return new Mo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Mo,n,r)}};g(Mo,"runtime",C),g(Mo,"typeName","wg.cosmo.node.v1.ConfigurationVariable"),g(Mo,"fields",C.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(qu)},{no:2,name:"static_variable_content",kind:"scalar",T:9},{no:3,name:"environment_variable_name",kind:"scalar",T:9},{no:4,name:"environment_variable_default_value",kind:"scalar",T:9},{no:5,name:"placeholder_variable_name",kind:"scalar",T:9}]));var Qr=Mo,xo=class xo extends Fe{constructor(n){super();g(this,"directiveName","");g(this,"renameTo","");C.util.initPartial(n,this)}static fromBinary(n,r){return new xo().fromBinary(n,r)}static fromJson(n,r){return new xo().fromJson(n,r)}static fromJsonString(n,r){return new xo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(xo,n,r)}};g(xo,"runtime",C),g(xo,"typeName","wg.cosmo.node.v1.DirectiveConfiguration"),g(xo,"fields",C.util.newFieldList(()=>[{no:1,name:"directive_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var e0=xo,qo=class qo extends Fe{constructor(n){super();g(this,"name","");g(this,"value","");C.util.initPartial(n,this)}static fromBinary(n,r){return new qo().fromBinary(n,r)}static fromJson(n,r){return new qo().fromJson(n,r)}static fromJsonString(n,r){return new qo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(qo,n,r)}};g(qo,"runtime",C),g(qo,"typeName","wg.cosmo.node.v1.URLQueryConfiguration"),g(qo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]));var t0=qo,Vo=class Vo extends Fe{constructor(n){super();g(this,"values",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Vo().fromBinary(n,r)}static fromJson(n,r){return new Vo().fromJson(n,r)}static fromJsonString(n,r){return new Vo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Vo,n,r)}};g(Vo,"runtime",C),g(Vo,"typeName","wg.cosmo.node.v1.HTTPHeader"),g(Vo,"fields",C.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:Qr,repeated:!0}]));var n0=Vo,jo=class jo extends Fe{constructor(n){super();g(this,"key");g(this,"cert");g(this,"insecureSkipVerify",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new jo().fromBinary(n,r)}static fromJson(n,r){return new jo().fromJson(n,r)}static fromJsonString(n,r){return new jo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(jo,n,r)}};g(jo,"runtime",C),g(jo,"typeName","wg.cosmo.node.v1.MTLSConfiguration"),g(jo,"fields",C.util.newFieldList(()=>[{no:1,name:"key",kind:"message",T:Qr},{no:2,name:"cert",kind:"message",T:Qr},{no:3,name:"insecureSkipVerify",kind:"scalar",T:8}]));var r0=jo,Ko=class Ko extends Fe{constructor(n){super();g(this,"enabled",!1);g(this,"url");g(this,"useSSE");g(this,"protocol");g(this,"websocketSubprotocol");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ko().fromBinary(n,r)}static fromJson(n,r){return new Ko().fromJson(n,r)}static fromJsonString(n,r){return new Ko().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ko,n,r)}};g(Ko,"runtime",C),g(Ko,"typeName","wg.cosmo.node.v1.GraphQLSubscriptionConfiguration"),g(Ko,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"url",kind:"message",T:Qr},{no:3,name:"useSSE",kind:"scalar",T:8,opt:!0},{no:4,name:"protocol",kind:"enum",T:C.getEnumType(js),opt:!0},{no:5,name:"websocketSubprotocol",kind:"enum",T:C.getEnumType(Ks),opt:!0}]));var i0=Ko,$o=class $o extends Fe{constructor(n){super();g(this,"enabled",!1);g(this,"serviceSdl","");C.util.initPartial(n,this)}static fromBinary(n,r){return new $o().fromBinary(n,r)}static fromJson(n,r){return new $o().fromJson(n,r)}static fromJsonString(n,r){return new $o().fromJsonString(n,r)}static equals(n,r){return C.util.equals($o,n,r)}};g($o,"runtime",C),g($o,"typeName","wg.cosmo.node.v1.GraphQLFederationConfiguration"),g($o,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"serviceSdl",kind:"scalar",T:9}]));var a0=$o,Go=class Go extends Fe{constructor(n){super();g(this,"key","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Go().fromBinary(n,r)}static fromJson(n,r){return new Go().fromJson(n,r)}static fromJsonString(n,r){return new Go().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Go,n,r)}};g(Go,"runtime",C),g(Go,"typeName","wg.cosmo.node.v1.InternedString"),g(Go,"fields",C.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9}]));var Zp=Go,Qo=class Qo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Qo().fromBinary(n,r)}static fromJson(n,r){return new Qo().fromJson(n,r)}static fromJsonString(n,r){return new Qo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Qo,n,r)}};g(Qo,"runtime",C),g(Qo,"typeName","wg.cosmo.node.v1.SingleTypeField"),g(Qo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9}]));var s0=Qo,Yo=class Yo extends Fe{constructor(n){super();g(this,"fieldPath",[]);g(this,"json","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Yo().fromBinary(n,r)}static fromJson(n,r){return new Yo().fromJson(n,r)}static fromJsonString(n,r){return new Yo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Yo,n,r)}};g(Yo,"runtime",C),g(Yo,"typeName","wg.cosmo.node.v1.SubscriptionFieldCondition"),g(Yo,"fields",C.util.newFieldList(()=>[{no:1,name:"field_path",kind:"scalar",T:9,repeated:!0},{no:2,name:"json",kind:"scalar",T:9}]));var em=Yo,aa=class aa extends Fe{constructor(n){super();g(this,"and",[]);g(this,"in");g(this,"not");g(this,"or",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new aa().fromBinary(n,r)}static fromJson(n,r){return new aa().fromJson(n,r)}static fromJsonString(n,r){return new aa().fromJsonString(n,r)}static equals(n,r){return C.util.equals(aa,n,r)}};g(aa,"runtime",C),g(aa,"typeName","wg.cosmo.node.v1.SubscriptionFilterCondition"),g(aa,"fields",C.util.newFieldList(()=>[{no:1,name:"and",kind:"message",T:aa,repeated:!0},{no:2,name:"in",kind:"message",T:em,opt:!0},{no:3,name:"not",kind:"message",T:aa,opt:!0},{no:4,name:"or",kind:"message",T:aa,repeated:!0}]));var Vu=aa,Jo=class Jo extends Fe{constructor(n){super();g(this,"operations",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Jo().fromBinary(n,r)}static fromJson(n,r){return new Jo().fromJson(n,r)}static fromJsonString(n,r){return new Jo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Jo,n,r)}};g(Jo,"runtime",C),g(Jo,"typeName","wg.cosmo.node.v1.CacheWarmerOperations"),g(Jo,"fields",C.util.newFieldList(()=>[{no:1,name:"operations",kind:"message",T:o0,repeated:!0}]));var iK=Jo,Ho=class Ho extends Fe{constructor(n){super();g(this,"request");g(this,"client");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ho().fromBinary(n,r)}static fromJson(n,r){return new Ho().fromJson(n,r)}static fromJsonString(n,r){return new Ho().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ho,n,r)}};g(Ho,"runtime",C),g(Ho,"typeName","wg.cosmo.node.v1.Operation"),g(Ho,"fields",C.util.newFieldList(()=>[{no:1,name:"request",kind:"message",T:u0},{no:2,name:"client",kind:"message",T:d0}]));var o0=Ho,zo=class zo extends Fe{constructor(n){super();g(this,"operationName","");g(this,"query","");g(this,"extensions");C.util.initPartial(n,this)}static fromBinary(n,r){return new zo().fromBinary(n,r)}static fromJson(n,r){return new zo().fromJson(n,r)}static fromJsonString(n,r){return new zo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(zo,n,r)}};g(zo,"runtime",C),g(zo,"typeName","wg.cosmo.node.v1.OperationRequest"),g(zo,"fields",C.util.newFieldList(()=>[{no:1,name:"operation_name",kind:"scalar",T:9},{no:2,name:"query",kind:"scalar",T:9},{no:3,name:"extensions",kind:"message",T:c0}]));var u0=zo,Wo=class Wo extends Fe{constructor(n){super();g(this,"persistedQuery");C.util.initPartial(n,this)}static fromBinary(n,r){return new Wo().fromBinary(n,r)}static fromJson(n,r){return new Wo().fromJson(n,r)}static fromJsonString(n,r){return new Wo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Wo,n,r)}};g(Wo,"runtime",C),g(Wo,"typeName","wg.cosmo.node.v1.Extension"),g(Wo,"fields",C.util.newFieldList(()=>[{no:1,name:"persisted_query",kind:"message",T:l0}]));var c0=Wo,Xo=class Xo extends Fe{constructor(n){super();g(this,"sha256Hash","");g(this,"version",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Xo().fromBinary(n,r)}static fromJson(n,r){return new Xo().fromJson(n,r)}static fromJsonString(n,r){return new Xo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Xo,n,r)}};g(Xo,"runtime",C),g(Xo,"typeName","wg.cosmo.node.v1.PersistedQuery"),g(Xo,"fields",C.util.newFieldList(()=>[{no:1,name:"sha256_hash",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:5}]));var l0=Xo,Zo=class Zo extends Fe{constructor(n){super();g(this,"name","");g(this,"version","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Zo().fromBinary(n,r)}static fromJson(n,r){return new Zo().fromJson(n,r)}static fromJsonString(n,r){return new Zo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Zo,n,r)}};g(Zo,"runtime",C),g(Zo,"typeName","wg.cosmo.node.v1.ClientInfo"),g(Zo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9}]));var d0=Zo;m();T();N();function f0(e){return new Error(`Normalization failed to return a ${e}.`)}function aK(e){return new Error(`Invalid router compatibility version "${e}".`)}m();T();N();var Ad=Ni(dh(),1);function wpe(e){if(!e.conditions)return;let t=[];for(let n of e.conditions){let r=[];for(let i of n.fieldCoordinatesPath){let a=i.split(".");if(a.length!==2)throw new Error(`fatal: malformed conditional field coordinates "${i}" for field set "${e.selectionSet}".`);r.push(new $p({fieldName:a[1],typeName:a[0]}))}t.push(new Gp({fieldCoordinatesPath:r,fieldPath:n.fieldPath}))}return t}function p0(e,t,n){if(e)for(let r of e){let i=wpe(r);t.push(new Hc(k(k({typeName:n,fieldName:r.fieldName,selectionSet:r.selectionSet},r.disableEntityResolver?{disableEntityResolver:!0}:{}),i?{conditions:i}:{})))}}function m0(e){switch(e){case"publish":return eu.PUBLISH;case"request":return eu.REQUEST;case"subscribe":return eu.SUBSCRIBE}}function sK(e){var n;let t={rootNodes:[],childNodes:[],keys:[],provides:[],events:new Zc({nats:[],kafka:[],redis:[]}),requires:[],entityInterfaces:[],interfaceObjects:[]};for(let r of e.values()){let i=r.typeName,a=[...r.fieldNames],o=new Sd({fieldNames:a,typeName:i});if(r.externalFieldNames&&r.externalFieldNames.size>0&&(o.externalFieldNames=[...r.externalFieldNames]),r.requireFetchReasonsFieldNames&&r.requireFetchReasonsFieldNames.length>0&&(o.requireFetchReasonsFieldNames=[...r.requireFetchReasonsFieldNames]),r.isRootNode?t.rootNodes.push(o):t.childNodes.push(o),r.entityInterfaceConcreteTypeNames){let p=new Dd({interfaceTypeName:i,concreteTypeNames:[...r.entityInterfaceConcreteTypeNames]});r.isInterfaceObject?t.interfaceObjects.push(p):t.entityInterfaces.push(p)}p0(r.keys,t.keys,i),p0(r.provides,t.provides,i),p0(r.requires,t.requires,i);let u=[],l=[],d=[];for(let p of(n=r.events)!=null?n:[])switch(p.providerType){case Ad.PROVIDER_TYPE_KAFKA:{l.push(new Wp({engineEventConfiguration:new tu({fieldName:p.fieldName,providerId:p.providerId,type:m0(p.type),typeName:i}),topics:p.topics}));break}case Ad.PROVIDER_TYPE_NATS:{u.push(new zp(k({engineEventConfiguration:new tu({fieldName:p.fieldName,providerId:p.providerId,type:m0(p.type),typeName:i}),subjects:p.subjects},p.streamConfiguration?{streamConfiguration:new Hp({consumerInactiveThreshold:p.streamConfiguration.consumerInactiveThreshold,consumerName:p.streamConfiguration.consumerName,streamName:p.streamConfiguration.streamName})}:{})));break}case Ad.PROVIDER_TYPE_REDIS:{d.push(new Xp({engineEventConfiguration:new tu({fieldName:p.fieldName,providerId:p.providerId,type:m0(p.type),typeName:i}),channels:p.channels}));break}default:throw new Error("Fatal: Unknown event provider.")}t.events.nats.push(...u),t.events.kafka.push(...l),t.events.redis.push(...d)}return t}function oK(e){var n,r;let t=[];for(let i of e){let a=i.argumentNames.map(p=>new Vp({name:p,sourceType:zc.FIELD_ARGUMENT})),o=new Kp({argumentsConfiguration:a,fieldName:i.fieldName,typeName:i.typeName}),u=((n=i.requiredScopes)==null?void 0:n.map(p=>new Xc({requiredAndScopes:p})))||[],l=((r=i.requiredScopesByOR)==null?void 0:r.map(p=>new Xc({requiredAndScopes:p})))||[],d=u.length>0;if((i.requiresAuthentication||d)&&(o.authorizationConfiguration=new jp({requiresAuthentication:i.requiresAuthentication||d,requiredOrScopes:u,requiredOrScopesByOr:l})),i.subscriptionFilterCondition){let p=new Vu;Lh(p,i.subscriptionFilterCondition),o.subscriptionFilterCondition=p}t.push(o)}return t}function Lh(e,t){if(t.and!==void 0){let n=[];for(let r of t.and){let i=new Vu;Lh(i,r),n.push(i)}e.and=n;return}if(t.in!==void 0){e.in=new em({fieldPath:t.in.fieldPath,json:JSON.stringify(t.in.values)});return}if(t.not!==void 0){e.not=new Vu,Lh(e.not,t.not);return}if(t.or!==void 0){let n=[];for(let r of t.or){let i=new Vu;Lh(i,r),n.push(i)}e.or=n;return}throw new Error("Fatal: Incoming SubscriptionCondition object was malformed.")}var el;(function(e){e[e.Plugin=0]="Plugin",e[e.Standard=1]="Standard",e[e.GRPC=2]="GRPC"})(el||(el={}));var Lpe=(e,t)=>{let n=stringHash(t);return e.stringStorage[n]=t,new Zp({key:n})},Cpe=e=>{switch(e){case"ws":return js.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS;case"sse":return js.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE;case"sse_post":return js.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST}},Bpe=e=>{switch(e){case"auto":return Ks.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO;case"graphql-ws":return Ks.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS;case"graphql-transport-ws":return Ks.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS}},cK=function(e){if(!Rd.ROUTER_COMPATIBILITY_VERSIONS.has(e.routerCompatibilityVersion))throw aK(e.routerCompatibilityVersion);let t=new Od({defaultFlushInterval:BigInt(500),datasourceConfigurations:[],fieldConfigurations:[],graphqlSchema:"",stringStorage:{},typeConfigurations:[]});for(let n of e.subgraphs){if(!n.configurationDataByTypeName)throw f0("ConfigurationDataByTypeName");if(!n.schema)throw f0("GraphQLSchema");let r={enabled:!0},i=Lpe(t,Nj((0,uK.lexicographicSortSchema)(n.schema))),{childNodes:a,entityInterfaces:o,events:u,interfaceObjects:l,keys:d,provides:p,requires:E,rootNodes:I}=sK(n.configurationDataByTypeName),v;switch(n.kind){case el.Standard:{r.enabled=!0,r.protocol=Cpe(n.subscriptionProtocol||"ws"),r.websocketSubprotocol=Bpe(n.websocketSubprotocol||"auto"),r.url=new Qr({kind:qu.STATIC_CONFIGURATION_VARIABLE,staticVariableContent:n.subscriptionUrl||n.url});break}case el.Plugin:{v=new bd({mapping:n.mapping,protoSchema:n.protoSchema,plugin:new Yp({name:n.name,version:n.version,imageReference:n.imageReference})});break}case el.GRPC:{v=new bd({mapping:n.mapping,protoSchema:n.protoSchema});break}}let A,U,j;if(u.kafka.length>0||u.nats.length>0||u.redis.length>0){A=xu.PUBSUB,j=new Zc({kafka:u.kafka,nats:u.nats,redis:u.redis});let re=Ne=>Rd.ROOT_TYPE_NAMES.has(Ne.typeName),te=0,pe=0;for(;te({id:n.id,name:n.name,routingUrl:n.url})),compatibilityVersion:`${e.routerCompatibilityVersion}:${Rd.COMPOSITION_VERSION}`})};m();T();N();var nl=Ni(_e());function lK(e){let t;try{t=(0,nl.parse)(e.schema)}catch(n){throw new Error(`could not parse schema for Graph ${e.name}: ${n}`)}return{definitions:t,name:e.name,url:e.url}}function Upe(e){let t=(0,tl.federateSubgraphs)({subgraphs:e.map(lK),version:tl.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(n=>n.message).join(", ")}`);return{fieldConfigurations:t.fieldConfigurations,sdl:(0,nl.print)(t.federatedGraphAST)}}function kpe(e){let t=(0,tl.federateSubgraphs)({subgraphs:e.map(lK),version:tl.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(r=>r.message).join(", ")}`);return cK({federatedClientSDL:(0,nl.printSchema)(t.federatedGraphClientSchema),federatedSDL:(0,nl.printSchema)(t.federatedGraphSchema),fieldConfigurations:t.fieldConfigurations,routerCompatibilityVersion:tl.LATEST_ROUTER_COMPATIBILITY_VERSION,schemaVersionId:"",subgraphs:e.map((r,i)=>{var l,d;let a=t.subgraphConfigBySubgraphName.get(r.name),o=a==null?void 0:a.schema,u=a==null?void 0:a.configurationDataByTypeName;return{kind:el.Standard,id:`${i}`,name:r.name,url:yb(r.url),sdl:r.schema,subscriptionUrl:yb((l=r.subscription_url)!=null?l:r.url),subscriptionProtocol:(d=r.subscription_protocol)!=null?d:"ws",websocketSubprotocol:r.subscription_protocol==="ws"?r.websocketSubprotocol||"auto":void 0,schema:o,configurationDataByTypeName:u}})}).toJsonString()}return Gm(Mpe);})(); /*! Bundled license information: @jspm/core/nodelibs/browser/buffer.js: diff --git a/composition/.eslintrc.json b/composition/.eslintrc.json new file mode 100644 index 0000000000..e7e643ccd4 --- /dev/null +++ b/composition/.eslintrc.json @@ -0,0 +1,16 @@ +{ + "ignorePatterns": ["*.d.ts"], + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint", "import"], + "rules": { + "@typescript-eslint/consistent-type-imports": [ + "error", + { + "prefer": "type-imports", + "fixStyle": "inline-type-imports" + } + ], + "import/no-duplicates": ["error", { "prefer-inline": true }], + "object-curly-spacing": ["error", "always"] + } +} diff --git a/composition/package.json b/composition/package.json index 7717288f76..2c1e395ef4 100644 --- a/composition/package.json +++ b/composition/package.json @@ -20,7 +20,7 @@ "test:core": "vitest run --exclude ./tests/unstaged-tests", "test:coverage": "vitest run --coverage", "lint": "prettier --check .", - "lint:fix": "pnpm format", + "lint:fix": "eslint --cache --fix --ext .ts,.mjs,.cjs . && pnpm format", "format": "prettier -w -c .", "postversion": "node ./scripts/get-composition-version.mjs" }, diff --git a/composition/src/ast/utils.ts b/composition/src/ast/utils.ts index f8f1338c9a..a4c9e9635a 100644 --- a/composition/src/ast/utils.ts +++ b/composition/src/ast/utils.ts @@ -1,31 +1,31 @@ import { - ArgumentNode, - DocumentNode, - EnumTypeDefinitionNode, - EnumTypeExtensionNode, - FieldNode, - InputObjectTypeDefinitionNode, - InputObjectTypeExtensionNode, - InterfaceTypeDefinitionNode, - InterfaceTypeExtensionNode, + type ArgumentNode, + type DocumentNode, + type EnumTypeDefinitionNode, + type EnumTypeExtensionNode, + type FieldNode, + type InputObjectTypeDefinitionNode, + type InputObjectTypeExtensionNode, + type InterfaceTypeDefinitionNode, + type InterfaceTypeExtensionNode, Kind, - NamedTypeNode, - NameNode, - ObjectTypeDefinitionNode, - ObjectTypeExtensionNode, + type NamedTypeNode, + type NameNode, + type ObjectTypeDefinitionNode, + type ObjectTypeExtensionNode, OperationTypeNode, parse as graphqlParse, - ScalarTypeDefinitionNode, - ScalarTypeExtensionNode, - SchemaDefinitionNode, - SchemaExtensionNode, - SelectionNode, - SelectionSetNode, - StringValueNode, - UnionTypeDefinitionNode, - UnionTypeExtensionNode, + type ScalarTypeDefinitionNode, + type ScalarTypeExtensionNode, + type SchemaDefinitionNode, + type SchemaExtensionNode, + type SelectionNode, + type SelectionSetNode, + type StringValueNode, + type UnionTypeDefinitionNode, + type UnionTypeExtensionNode, } from 'graphql'; -import { CompositeOutputNode } from '../schema-building/ast'; +import { type CompositeOutputNode } from '../schema-building/ast'; import { ARGUMENT_DEFINITION_UPPER, ENUM_UPPER, diff --git a/composition/src/buildASTSchema/buildASTSchema.ts b/composition/src/buildASTSchema/buildASTSchema.ts index d16a934d08..9bd131a567 100644 --- a/composition/src/buildASTSchema/buildASTSchema.ts +++ b/composition/src/buildASTSchema/buildASTSchema.ts @@ -1,7 +1,7 @@ -import { DocumentNode, GraphQLSchema, specifiedDirectives } from 'graphql'; +import { type DocumentNode, GraphQLSchema, specifiedDirectives } from 'graphql'; import { assertValidSDL } from 'graphql/validation/validate'; import { extendSchemaImpl } from './extendSchema'; -import { GraphQLSchemaValidationOptions } from 'graphql/type/schema'; +import { type GraphQLSchemaValidationOptions } from 'graphql/type/schema'; export interface BuildASTSchemaOptions extends GraphQLSchemaValidationOptions { addInvalidExtensionOrphans?: boolean; diff --git a/composition/src/buildASTSchema/extendSchema.ts b/composition/src/buildASTSchema/extendSchema.ts index b783a34bd1..002b146c34 100644 --- a/composition/src/buildASTSchema/extendSchema.ts +++ b/composition/src/buildASTSchema/extendSchema.ts @@ -1,47 +1,35 @@ import { - DirectiveDefinitionNode, - DocumentNode, - EnumTypeDefinitionNode, - EnumTypeExtensionNode, - EnumValueDefinitionNode, - FieldDefinitionNode, - GraphQLArgumentConfig, + type DirectiveDefinitionNode, + type DocumentNode, + type EnumTypeDefinitionNode, + type EnumTypeExtensionNode, + type EnumValueDefinitionNode, + type FieldDefinitionNode, + getDirectiveValues, + type GraphQLArgumentConfig, GraphQLDeprecatedDirective, GraphQLDirective, GraphQLEnumType, - GraphQLEnumValueConfigMap, - GraphQLFieldConfig, - GraphQLFieldConfigArgumentMap, - GraphQLFieldConfigMap, - GraphQLInputFieldConfigMap, + type GraphQLEnumValueConfigMap, + type GraphQLFieldConfig, + type GraphQLFieldConfigArgumentMap, + type GraphQLFieldConfigMap, + type GraphQLInputFieldConfigMap, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLList, - GraphQLNamedType, + type GraphQLNamedType, GraphQLNonNull, GraphQLObjectType, GraphQLScalarType, GraphQLSpecifiedByDirective, - GraphQLType, + type GraphQLType, GraphQLUnionType, - InputObjectTypeDefinitionNode, - InputObjectTypeExtensionNode, - InputValueDefinitionNode, - InterfaceTypeDefinitionNode, - InterfaceTypeExtensionNode, - Kind, - NamedTypeNode, - ObjectTypeDefinitionNode, - ObjectTypeExtensionNode, - ScalarTypeDefinitionNode, - ScalarTypeExtensionNode, - SchemaDefinitionNode, - SchemaExtensionNode, - TypeDefinitionNode, - TypeNode, - UnionTypeDefinitionNode, - UnionTypeExtensionNode, - getDirectiveValues, + type InputObjectTypeDefinitionNode, + type InputObjectTypeExtensionNode, + type InputValueDefinitionNode, + type InterfaceTypeDefinitionNode, + type InterfaceTypeExtensionNode, introspectionTypes, isEnumType, isInputObjectType, @@ -54,12 +42,24 @@ import { isSpecifiedDirective, isSpecifiedScalarType, isUnionType, + Kind, + type NamedTypeNode, + type ObjectTypeDefinitionNode, + type ObjectTypeExtensionNode, + type ScalarTypeDefinitionNode, + type ScalarTypeExtensionNode, + type SchemaDefinitionNode, + type SchemaExtensionNode, specifiedScalarTypes, + type TypeDefinitionNode, + type TypeNode, + type UnionTypeDefinitionNode, + type UnionTypeExtensionNode, valueFromAST, } from 'graphql'; -import { GraphQLSchemaNormalizedConfig } from 'graphql/type/schema'; -import { BuildASTSchemaOptions } from './buildASTSchema'; -import { Maybe } from 'graphql/jsutils/Maybe'; +import { type GraphQLSchemaNormalizedConfig } from 'graphql/type/schema'; +import { type BuildASTSchemaOptions } from './buildASTSchema'; +import { type Maybe } from 'graphql/jsutils/Maybe'; export class AccumulatorMap extends Map> { get [Symbol.toStringTag]() { diff --git a/composition/src/errors/errors.ts b/composition/src/errors/errors.ts index 2c68510107..9f22dfa01b 100644 --- a/composition/src/errors/errors.ts +++ b/composition/src/errors/errors.ts @@ -1,22 +1,22 @@ -import { Kind, OperationTypeNode } from 'graphql'; +import { Kind, type OperationTypeNode } from 'graphql'; import { - EntityInterfaceFederationData, - FieldData, - InputValueData, - ObjectDefinitionData, + type EntityInterfaceFederationData, + type FieldData, + type InputValueData, + type ObjectDefinitionData, } from '../schema-building/types'; import { - IncompatibleMergedTypesErrorParams, - IncompatibleParentTypeMergeErrorParams, - IncompatibleTypeWithProvidesErrorMessageParams, - InvalidNamedTypeErrorParams, - InvalidRootTypeFieldEventsDirectiveData, - NonExternalConditionalFieldErrorParams, - OneOfRequiredFieldsErrorParams, - SemanticNonNullLevelsIndexOutOfBoundsErrorParams, - SemanticNonNullLevelsNonNullErrorParams, + type IncompatibleMergedTypesErrorParams, + type IncompatibleParentTypeMergeErrorParams, + type IncompatibleTypeWithProvidesErrorMessageParams, + type InvalidNamedTypeErrorParams, + type InvalidRootTypeFieldEventsDirectiveData, + type NonExternalConditionalFieldErrorParams, + type OneOfRequiredFieldsErrorParams, + type SemanticNonNullLevelsIndexOutOfBoundsErrorParams, + type SemanticNonNullLevelsNonNullErrorParams, } from './types'; -import { UnresolvableFieldData } from '../resolvability-graph/utils/utils'; +import { type UnresolvableFieldData } from '../resolvability-graph/utils/utils'; import { AND_UPPER, ARGUMENT, @@ -41,10 +41,14 @@ import { } from '../utils/string-constants'; import { MAX_SUBSCRIPTION_FILTER_DEPTH, MAXIMUM_TYPE_NESTING } from '../utils/integer-constants'; import { getEntriesNotInHashSet, getOrThrowError, kindToNodeType, numberToOrdinal } from '../utils/utils'; -import { ImplementationErrors, InvalidEntityInterface, InvalidRequiredInputValueData } from '../utils/types'; +import { + type ImplementationErrors, + type InvalidEntityInterface, + type InvalidRequiredInputValueData, +} from '../utils/types'; import { isFieldData } from '../schema-building/utils'; import { printTypeNode } from '@graphql-tools/merge'; -import { NodeType, TypeName } from '../types/types'; +import { type NodeType, type TypeName } from '../types/types'; export const minimumSubgraphRequirementError = new Error('At least one subgraph is required for federation.'); diff --git a/composition/src/errors/types.ts b/composition/src/errors/types.ts index 35e86e1c2d..cf2e62d127 100644 --- a/composition/src/errors/types.ts +++ b/composition/src/errors/types.ts @@ -1,5 +1,5 @@ -import { FieldData, InputValueData, ParentDefinitionData } from '../schema-building/types'; -import { DirectiveName, FieldName, SubgraphName, TypeName } from '../types/types'; +import { type FieldData, type InputValueData, type ParentDefinitionData } from '../schema-building/types'; +import { type DirectiveName, type FieldName, type SubgraphName, type TypeName } from '../types/types'; export type InvalidRootTypeFieldEventsDirectiveData = { definesDirectives: boolean; diff --git a/composition/src/federation/federation.ts b/composition/src/federation/federation.ts index 5def086ce6..b822bbccfa 100644 --- a/composition/src/federation/federation.ts +++ b/composition/src/federation/federation.ts @@ -1,52 +1,51 @@ -import { - FederateSubgraphsContractParams, - FederateSubgraphsParams, - FederateSubgraphsWithContractsParams, - FederationResult, - FederationResultWithContracts, -} from './types'; +import { type FederationResult, type FederationResultWithContracts } from './types'; import { federateSubgraphs as federateSubgraphsV1, federateSubgraphsContract as federateSubgraphsContractV1, federateSubgraphsWithContracts as federateSubgraphsWithContractsV1, } from '../v1/federation/federation-factory'; import { ROUTER_COMPATIBILITY_VERSION_ONE } from '../router-compatibility-version/router-compatibility-version'; +import { + type FederateSubgraphsContractParams, + type FederateSubgraphsParams, + type FederateSubgraphsWithContractsParams, +} from './params'; export function federateSubgraphs({ - disableResolvabilityValidation, + options, subgraphs, version = ROUTER_COMPATIBILITY_VERSION_ONE, }: FederateSubgraphsParams): FederationResult { switch (version) { default: { - return federateSubgraphsV1({ disableResolvabilityValidation, subgraphs }); + return federateSubgraphsV1({ options, subgraphs }); } } } // the flow when publishing a subgraph that also has contracts export function federateSubgraphsWithContracts({ - disableResolvabilityValidation, + options, subgraphs, tagOptionsByContractName, version = ROUTER_COMPATIBILITY_VERSION_ONE, }: FederateSubgraphsWithContractsParams): FederationResultWithContracts { switch (version) { default: { - return federateSubgraphsWithContractsV1({ disableResolvabilityValidation, subgraphs, tagOptionsByContractName }); + return federateSubgraphsWithContractsV1({ options, subgraphs, tagOptionsByContractName }); } } } export function federateSubgraphsContract({ contractTagOptions, - disableResolvabilityValidation, + options, subgraphs, version = ROUTER_COMPATIBILITY_VERSION_ONE, }: FederateSubgraphsContractParams): FederationResult { switch (version) { default: { - return federateSubgraphsContractV1({ disableResolvabilityValidation, subgraphs, contractTagOptions }); + return federateSubgraphsContractV1({ contractTagOptions, options, subgraphs }); } } } diff --git a/composition/src/federation/params.ts b/composition/src/federation/params.ts new file mode 100644 index 0000000000..74070075d2 --- /dev/null +++ b/composition/src/federation/params.ts @@ -0,0 +1,25 @@ +import { type Subgraph } from '../subgraph/types'; +import type { CompositionOptions } from '../types/params'; +import { type SupportedRouterCompatibilityVersion } from '../router-compatibility-version/router-compatibility-version'; +import type { ContractName } from '../types/types'; +import { type ContractTagOptions } from './types'; + +export type FederateSubgraphsParams = { + subgraphs: Array; + options?: CompositionOptions; + version?: SupportedRouterCompatibilityVersion; +}; + +export type FederateSubgraphsWithContractsParams = { + subgraphs: Array; + tagOptionsByContractName: Map; + options?: CompositionOptions; + version?: SupportedRouterCompatibilityVersion; +}; + +export type FederateSubgraphsContractParams = { + contractTagOptions: ContractTagOptions; + subgraphs: Array; + options?: CompositionOptions; + version?: SupportedRouterCompatibilityVersion; +}; diff --git a/composition/src/federation/types.ts b/composition/src/federation/types.ts index 21db77b248..959f32b3d9 100644 --- a/composition/src/federation/types.ts +++ b/composition/src/federation/types.ts @@ -1,15 +1,20 @@ -import { Warning } from '../warnings/types'; -import { ConstDirectiveNode, DirectiveDefinitionNode, DocumentNode, GraphQLSchema, StringValueNode } from 'graphql'; +import { type Warning } from '../warnings/types'; import { - ConfigureDescriptionData, - ExtensionType, - ParentDefinitionData, - PersistedDirectivesData, + type ConstDirectiveNode, + type DirectiveDefinitionNode, + type DocumentNode, + type GraphQLSchema, + type StringValueNode, +} from 'graphql'; +import { + type ConfigureDescriptionData, + type ExtensionType, + type ParentDefinitionData, + type PersistedDirectivesData, } from '../schema-building/types'; -import { FieldConfiguration } from '../router-configuration/types'; -import { Subgraph, SubgraphConfig } from '../subgraph/types'; -import { SupportedRouterCompatibilityVersion } from '../router-compatibility-version/router-compatibility-version'; -import { ContractName, DirectiveName, SubgraphName, TypeName } from '../types/types'; +import { type FieldConfiguration } from '../router-configuration/types'; +import { type SubgraphConfig } from '../subgraph/types'; +import type { DirectiveName, SubgraphName, TypeName } from '../types/types'; export type FederationFailure = { errors: Array; @@ -67,23 +72,3 @@ export type MutualParentDefinitionData = { persistedDirectivesData: PersistedDirectivesData; description?: StringValueNode; }; - -export type FederateSubgraphsParams = { - subgraphs: Array; - disableResolvabilityValidation?: boolean; - version?: SupportedRouterCompatibilityVersion; -}; - -export type FederateSubgraphsWithContractsParams = { - subgraphs: Array; - tagOptionsByContractName: Map; - disableResolvabilityValidation?: boolean; - version?: SupportedRouterCompatibilityVersion; -}; - -export type FederateSubgraphsContractParams = { - contractTagOptions: ContractTagOptions; - subgraphs: Array; - disableResolvabilityValidation?: boolean; - version?: SupportedRouterCompatibilityVersion; -}; diff --git a/composition/src/index.ts b/composition/src/index.ts index 47a7d9e405..c9f27f9ac5 100644 --- a/composition/src/index.ts +++ b/composition/src/index.ts @@ -3,8 +3,10 @@ export * from './buildASTSchema/buildASTSchema'; export * from './errors/errors'; export * from './errors/types'; export * from './federation/federation'; +export * from './federation/params'; export * from './federation/types'; export * from './normalization/normalization'; +export * from './normalization/params'; export * from './normalization/types'; export * from './resolvability-graph/graph'; export * from './resolvability-graph/graph-nodes'; @@ -19,6 +21,7 @@ export * from './schema-building/ast'; export * from './schema-building/types'; export * from './schema-building/utils'; export * from './subgraph/types'; +export * from './types/params'; export * from './types/types'; export * from './utils/composition-version'; export * from './utils/params'; @@ -34,9 +37,9 @@ export * from './v1/constants/integers'; export * from './v1/constants/non-directive-definitions'; export * from './v1/constants/strings'; export * from './v1/constants/type-nodes'; +export * from './v1/federation/params'; export * from './v1/federation/utils'; export * from './v1/federation/walkers'; -export * from './v1/federation/types'; export * from './v1/normalization/directive-definition-data'; export * from './v1/normalization/utils'; export * from './v1/normalization/types'; diff --git a/composition/src/normalization/normalization.ts b/composition/src/normalization/normalization.ts index feea3bca6b..7a6138509b 100644 --- a/composition/src/normalization/normalization.ts +++ b/composition/src/normalization/normalization.ts @@ -3,47 +3,49 @@ import { normalizeSubgraph as normalizeSubgraphV1, normalizeSubgraphFromString as normalizeSubgraphFromStringV1, } from '../v1/normalization/normalization-factory'; +import { ROUTER_COMPATIBILITY_VERSION_ONE } from '../router-compatibility-version/router-compatibility-version'; +import { type BatchNormalizationResult, type NormalizationResult } from './types'; import { - ROUTER_COMPATIBILITY_VERSION_ONE, - SupportedRouterCompatibilityVersion, -} from '../router-compatibility-version/router-compatibility-version'; -import { BatchNormalizationResult, NormalizationResult } from './types'; -import { DocumentNode } from 'graphql'; -import { Graph } from '../resolvability-graph/graph'; -import { Subgraph } from '../subgraph/types'; + type BatchNormalizeParams, + type NormalizeSubgraphFromStringParams, + type NormalizeSubgraphParams, +} from './params'; -export function normalizeSubgraphFromString( - schema: string, +export function normalizeSubgraphFromString({ noLocation = true, - version: SupportedRouterCompatibilityVersion = ROUTER_COMPATIBILITY_VERSION_ONE, -): NormalizationResult { + options, + sdlString, + version = ROUTER_COMPATIBILITY_VERSION_ONE, +}: NormalizeSubgraphFromStringParams): NormalizationResult { switch (version) { default: { - return normalizeSubgraphFromStringV1(schema, noLocation); + return normalizeSubgraphFromStringV1({ noLocation, options, sdlString }); } } } -export function normalizeSubgraph( - document: DocumentNode, - subgraphName?: string, - internalGraph?: Graph, - version: SupportedRouterCompatibilityVersion = ROUTER_COMPATIBILITY_VERSION_ONE, -): NormalizationResult { +export function normalizeSubgraph({ + document, + internalGraph, + options, + subgraphName, + version = ROUTER_COMPATIBILITY_VERSION_ONE, +}: NormalizeSubgraphParams): NormalizationResult { switch (version) { default: { - return normalizeSubgraphV1(document, subgraphName, internalGraph); + return normalizeSubgraphV1({ document, internalGraph, options, subgraphName }); } } } -export function batchNormalize( - subgraphs: Array, - version: SupportedRouterCompatibilityVersion = ROUTER_COMPATIBILITY_VERSION_ONE, -): BatchNormalizationResult { +export function batchNormalize({ + options, + subgraphs, + version = ROUTER_COMPATIBILITY_VERSION_ONE, +}: BatchNormalizeParams): BatchNormalizationResult { switch (version) { default: { - return batchNormalizeV1(subgraphs); + return batchNormalizeV1({ options, subgraphs }); } } } diff --git a/composition/src/normalization/params.ts b/composition/src/normalization/params.ts new file mode 100644 index 0000000000..7087ff7af8 --- /dev/null +++ b/composition/src/normalization/params.ts @@ -0,0 +1,27 @@ +import type { Subgraph } from '../subgraph/types'; +import type { SupportedRouterCompatibilityVersion } from '../router-compatibility-version/router-compatibility-version'; +import type { CompositionOptions } from '../types/params'; +import type { DocumentNode } from 'graphql'; +import type { Graph } from '../resolvability-graph/graph'; +import type { SubgraphName } from '../types/types'; + +export type BatchNormalizeParams = { + subgraphs: Array; + options?: CompositionOptions; + version?: SupportedRouterCompatibilityVersion; +}; + +export type NormalizeSubgraphParams = { + document: DocumentNode; + internalGraph?: Graph; + options?: CompositionOptions; + subgraphName?: SubgraphName; + version?: SupportedRouterCompatibilityVersion; +}; + +export type NormalizeSubgraphFromStringParams = { + sdlString: string; + noLocation?: boolean; + options?: CompositionOptions; + version?: SupportedRouterCompatibilityVersion; +}; diff --git a/composition/src/normalization/types.ts b/composition/src/normalization/types.ts index b06fa89d9b..e8383dd773 100644 --- a/composition/src/normalization/types.ts +++ b/composition/src/normalization/types.ts @@ -1,24 +1,24 @@ -import { Warning } from '../warnings/types'; +import { type Warning } from '../warnings/types'; import { - DirectiveDefinitionNode, - DocumentNode, - GraphQLSchema, - OperationTypeNode, - SchemaDefinitionNode, - SchemaExtensionNode, + type DirectiveDefinitionNode, + type DocumentNode, + type GraphQLSchema, + type OperationTypeNode, + type SchemaDefinitionNode, + type SchemaExtensionNode, } from 'graphql'; -import { ConfigurationData } from '../router-configuration/types'; +import { type ConfigurationData } from '../router-configuration/types'; import { - AuthorizationData, - ConditionalFieldData, - EntityData, - EntityInterfaceSubgraphData, - ParentDefinitionData, - PersistedDirectiveDefinitionData, + type AuthorizationData, + type ConditionalFieldData, + type EntityData, + type EntityInterfaceSubgraphData, + type ParentDefinitionData, + type PersistedDirectiveDefinitionData, } from '../schema-building/types'; -import { Graph } from '../resolvability-graph/graph'; -import { InternalSubgraph } from '../subgraph/types'; -import { DirectiveName, TypeName } from '../types/types'; +import { type Graph } from '../resolvability-graph/graph'; +import { type InternalSubgraph } from '../subgraph/types'; +import { type DirectiveName, type TypeName } from '../types/types'; export type NormalizationFailure = { errors: Array; diff --git a/composition/src/resolvability-graph/graph-nodes.ts b/composition/src/resolvability-graph/graph-nodes.ts index 6530d545f7..c52d1ccfac 100644 --- a/composition/src/resolvability-graph/graph-nodes.ts +++ b/composition/src/resolvability-graph/graph-nodes.ts @@ -1,6 +1,6 @@ import { add, getEntriesNotInHashSet, getValueOrDefault } from '../utils/utils'; -import { GraphFieldData } from '../utils/types'; -import { FieldName, NodeName, SubgraphName, TypeName } from './types/types'; +import { type GraphFieldData } from '../utils/types'; +import { type FieldName, type NodeName, type SubgraphName, type TypeName } from './types/types'; export class Edge { edgeName: string; diff --git a/composition/src/resolvability-graph/graph.ts b/composition/src/resolvability-graph/graph.ts index 17ebe9d90b..f7b87863e2 100644 --- a/composition/src/resolvability-graph/graph.ts +++ b/composition/src/resolvability-graph/graph.ts @@ -1,4 +1,4 @@ -import { Edge, EntityDataNode, GraphNode, GraphNodeOptions, RootNode } from './graph-nodes'; +import { Edge, EntityDataNode, GraphNode, type GraphNodeOptions, RootNode } from './graph-nodes'; import { generateEntityResolvabilityErrors, generateRootResolvabilityErrors, @@ -6,15 +6,29 @@ import { getMultipliedRelativeOriginPaths, newRootFieldData, } from './utils/utils'; -import { GraphFieldData, RootTypeName } from '../utils/types'; +import { type GraphFieldData, type RootTypeName } from '../utils/types'; import { getFirstEntry, getOrThrowError, getValueOrDefault } from '../utils/utils'; -import { FieldName, NodeName, SelectionPath, SubgraphName, TypeName, ValidationResult } from './types/types'; -import { ConsolidateUnresolvablePathsParams, ValidateEntitiesParams, VisitEntityParams } from './types/params'; -import { NodeResolutionData } from './node-resolution-data/node-resolution-data'; +import { + type FieldName, + type NodeName, + type SelectionPath, + type SubgraphName, + type TypeName, + type ValidationResult, +} from './types/types'; +import { + type ConsolidateUnresolvablePathsParams, + type ValidateEntitiesParams, + type VisitEntityParams, +} from './types/params'; +import { type NodeResolutionData } from './node-resolution-data/node-resolution-data'; import { LITERAL_PERIOD, NOT_APPLICABLE, ROOT_TYPE_NAMES } from './constants/string-constants'; import { EntityWalker } from './walker/entity-walker/entity-walker'; import { RootFieldWalker } from './walker/root-field-walkers/root-field-walker'; -import { EntityResolvabilityErrorsParams, EntitySharedRootFieldResolvabilityErrorsParams } from './utils/types/params'; +import { + type EntityResolvabilityErrorsParams, + type EntitySharedRootFieldResolvabilityErrorsParams, +} from './utils/types/params'; export class Graph { edgeId = -1; diff --git a/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts b/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts index af1344f825..dab18795dd 100644 --- a/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts +++ b/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts @@ -1,7 +1,7 @@ -import { GraphFieldData } from '../../utils/types'; +import { type GraphFieldData } from '../../utils/types'; import { unexpectedEdgeFatalError } from '../../errors/errors'; -import { FieldName } from '../types/types'; -import { AddExternalSubgraphNameParams, NodeResolutionDataParams } from './types/params'; +import { type FieldName } from '../types/types'; +import { type AddExternalSubgraphNameParams, type NodeResolutionDataParams } from './types/params'; export class NodeResolutionData { #isResolved = false; diff --git a/composition/src/resolvability-graph/node-resolution-data/types/params.ts b/composition/src/resolvability-graph/node-resolution-data/types/params.ts index 7fa339ebdf..43cd0cfb90 100644 --- a/composition/src/resolvability-graph/node-resolution-data/types/params.ts +++ b/composition/src/resolvability-graph/node-resolution-data/types/params.ts @@ -1,5 +1,5 @@ -import { FieldName, SubgraphName, TypeName } from '../../types/types'; -import { GraphFieldData } from '../../../utils/types'; +import { type FieldName, type SubgraphName, type TypeName } from '../../types/types'; +import { type GraphFieldData } from '../../../utils/types'; export type NodeResolutionDataParams = { readonly fieldDataByName: ReadonlyMap; diff --git a/composition/src/resolvability-graph/types/params.ts b/composition/src/resolvability-graph/types/params.ts index 7f6a4b9c09..7f5837296c 100644 --- a/composition/src/resolvability-graph/types/params.ts +++ b/composition/src/resolvability-graph/types/params.ts @@ -1,7 +1,7 @@ import type { NodeName, RootFieldData, SelectionPath, SubgraphName } from './types'; -import { NodeResolutionData } from '../node-resolution-data/node-resolution-data'; -import { RootFieldWalker } from '../walker/root-field-walkers/root-field-walker'; +import { type NodeResolutionData } from '../node-resolution-data/node-resolution-data'; +import { type RootFieldWalker } from '../walker/root-field-walkers/root-field-walker'; export type VisitEntityParams = { encounteredEntityNodeNames: Set; diff --git a/composition/src/resolvability-graph/utils/types/params.ts b/composition/src/resolvability-graph/utils/types/params.ts index 8f4e241966..e1b3c23153 100644 --- a/composition/src/resolvability-graph/utils/types/params.ts +++ b/composition/src/resolvability-graph/utils/types/params.ts @@ -1,8 +1,8 @@ -import { NodeName, RootFieldData, SelectionPath, SubgraphName } from '../../types/types'; -import { NodeResolutionData } from '../../node-resolution-data/node-resolution-data'; +import { type NodeName, type RootFieldData, type SelectionPath, type SubgraphName } from '../../types/types'; +import { type NodeResolutionData } from '../../node-resolution-data/node-resolution-data'; -import { EntityAncestorCollection, EntityAncestorData } from './types'; -import { UnresolvableFieldData } from '../utils'; +import { type EntityAncestorCollection, type EntityAncestorData } from './types'; +import { type UnresolvableFieldData } from '../utils'; export type EntityResolvabilityErrorsParams = { entityNodeName: NodeName; diff --git a/composition/src/resolvability-graph/utils/types/types.ts b/composition/src/resolvability-graph/utils/types/types.ts index 98b77ee9aa..621f651460 100644 --- a/composition/src/resolvability-graph/utils/types/types.ts +++ b/composition/src/resolvability-graph/utils/types/types.ts @@ -1,4 +1,4 @@ -import { SubgraphName, TypeName } from '../../types/types'; +import { type SubgraphName, type TypeName } from '../../types/types'; export type EntityAncestorData = { fieldSetsByTargetSubgraphName: Map>; diff --git a/composition/src/resolvability-graph/utils/utils.ts b/composition/src/resolvability-graph/utils/utils.ts index 49ef3aad97..c7cf370b48 100644 --- a/composition/src/resolvability-graph/utils/utils.ts +++ b/composition/src/resolvability-graph/utils/utils.ts @@ -1,17 +1,23 @@ import { unresolvablePathError } from '../../errors/errors'; import { getOrThrowError } from '../../utils/utils'; -import { GraphFieldData } from '../../utils/types'; -import { FieldName, RootFieldData, SelectionPath, SubgraphName, TypeName } from '../types/types'; +import { type GraphFieldData } from '../../utils/types'; +import { + type FieldName, + type RootFieldData, + type SelectionPath, + type SubgraphName, + type TypeName, +} from '../types/types'; import { - GenerateResolvabilityErrorReasonsParams, - GenerateSharedResolvabilityErrorReasonsParams, - GetMultipliedRelativeOriginPathsParams, - ResolvabilityErrorsParams, - RootResolvabilityErrorsParams, - SharedResolvabilityErrorsParams, + type GenerateResolvabilityErrorReasonsParams, + type GenerateSharedResolvabilityErrorReasonsParams, + type GetMultipliedRelativeOriginPathsParams, + type ResolvabilityErrorsParams, + type RootResolvabilityErrorsParams, + type SharedResolvabilityErrorsParams, } from './types/params'; -import { SelectionSetSegments } from './types/types'; +import { type SelectionSetSegments } from './types/types'; import { LITERAL_SPACE, QUOTATION_JOIN } from '../constants/string-constants'; export type UnresolvableFieldData = { diff --git a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts index b859475b89..66661e16da 100644 --- a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts +++ b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts @@ -1,13 +1,13 @@ import { NodeResolutionData } from '../../node-resolution-data/node-resolution-data'; import type { NodeName, SelectionPath, SubgraphName, VisitNodeResult } from '../../types/types'; import { - AddUnresolvablePathsParams, - EntityWalkerParams, - GetNodeResolutionDataParams, - PropagateVisitedFieldParams, - RemoveUnresolvablePathsParams, - VisitEntityDescendantEdgeParams, - VisitEntityDescendantNodeParams, + type AddUnresolvablePathsParams, + type EntityWalkerParams, + type GetNodeResolutionDataParams, + type PropagateVisitedFieldParams, + type RemoveUnresolvablePathsParams, + type VisitEntityDescendantEdgeParams, + type VisitEntityDescendantNodeParams, } from './types/params'; import { add, getValueOrDefault } from '../../../utils/utils'; diff --git a/composition/src/resolvability-graph/walker/entity-walker/types/params.ts b/composition/src/resolvability-graph/walker/entity-walker/types/params.ts index 6fd54bbe53..9452d91db1 100644 --- a/composition/src/resolvability-graph/walker/entity-walker/types/params.ts +++ b/composition/src/resolvability-graph/walker/entity-walker/types/params.ts @@ -1,6 +1,6 @@ -import { FieldName, NodeName, SelectionPath, SubgraphName } from '../../../types/types'; -import { Edge, GraphNode } from '../../../graph-nodes'; -import { NodeResolutionData } from '../../../node-resolution-data/node-resolution-data'; +import { type FieldName, type NodeName, type SelectionPath, type SubgraphName } from '../../../types/types'; +import { type Edge, type GraphNode } from '../../../graph-nodes'; +import { type NodeResolutionData } from '../../../node-resolution-data/node-resolution-data'; export type EntityWalkerParams = { encounteredEntityNodeNames: Set; diff --git a/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts b/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts index e450780cb5..2a76d43827 100644 --- a/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts +++ b/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts @@ -1,14 +1,14 @@ import { - GetNodeResolutionDataParams, - PropagateVisitedFieldParams, - PropagateVisitedSharedFieldParams, - RootFieldWalkerParams, - VisitEdgeParams, - VisitNodeParams, - VisitRootFieldEdgesParams, + type GetNodeResolutionDataParams, + type PropagateVisitedFieldParams, + type PropagateVisitedSharedFieldParams, + type RootFieldWalkerParams, + type VisitEdgeParams, + type VisitNodeParams, + type VisitRootFieldEdgesParams, } from './types/params'; import { add, getValueOrDefault } from '../../../utils/utils'; -import { NodeName, SelectionPath, VisitNodeResult } from '../../types/types'; +import { type NodeName, type SelectionPath, type VisitNodeResult } from '../../types/types'; import { NodeResolutionData } from '../../node-resolution-data/node-resolution-data'; export class RootFieldWalker { diff --git a/composition/src/resolvability-graph/walker/root-field-walkers/types/params.ts b/composition/src/resolvability-graph/walker/root-field-walkers/types/params.ts index 0c71d84f04..8ebfb47938 100644 --- a/composition/src/resolvability-graph/walker/root-field-walkers/types/params.ts +++ b/composition/src/resolvability-graph/walker/root-field-walkers/types/params.ts @@ -1,6 +1,6 @@ -import { Edge, GraphNode } from '../../../graph-nodes'; -import { FieldName, NodeName, SelectionPath, TypeName } from '../../../types/types'; -import { NodeResolutionData } from '../../../node-resolution-data/node-resolution-data'; +import { type Edge, type GraphNode } from '../../../graph-nodes'; +import { type FieldName, type NodeName, type SelectionPath, type TypeName } from '../../../types/types'; +import { type NodeResolutionData } from '../../../node-resolution-data/node-resolution-data'; export type RootFieldWalkerParams = { index: number; diff --git a/composition/src/router-configuration/types.ts b/composition/src/router-configuration/types.ts index 5c949140ca..6b420056c4 100644 --- a/composition/src/router-configuration/types.ts +++ b/composition/src/router-configuration/types.ts @@ -1,4 +1,4 @@ -import { FieldName, TypeName } from '../types/types'; +import { type FieldName, type TypeName } from '../types/types'; export type NatsEventType = 'subscribe' | 'publish' | 'request'; diff --git a/composition/src/router-configuration/utils.ts b/composition/src/router-configuration/utils.ts index fffcd10515..b0f95f18e7 100644 --- a/composition/src/router-configuration/utils.ts +++ b/composition/src/router-configuration/utils.ts @@ -1,5 +1,5 @@ -import { ConfigurationData, FieldSetConditionData, FieldSetConditionDataParams } from './types'; -import { FieldName } from '../types/types'; +import { type ConfigurationData, type FieldSetConditionData, type FieldSetConditionDataParams } from './types'; +import { type FieldName } from '../types/types'; export function newFieldSetConditionData({ fieldCoordinatesPath, diff --git a/composition/src/schema-building/ast.ts b/composition/src/schema-building/ast.ts index 6e62d2e78b..22d28dc253 100644 --- a/composition/src/schema-building/ast.ts +++ b/composition/src/schema-building/ast.ts @@ -1,19 +1,19 @@ import { - ConstDirectiveNode, - ConstValueNode, - DirectiveDefinitionNode, - EnumValueDefinitionNode, - FieldDefinitionNode, - InputValueDefinitionNode, - InterfaceTypeDefinitionNode, - InterfaceTypeExtensionNode, + type ConstDirectiveNode, + type ConstValueNode, + type DirectiveDefinitionNode, + type EnumValueDefinitionNode, + type FieldDefinitionNode, + type InputValueDefinitionNode, + type InterfaceTypeDefinitionNode, + type InterfaceTypeExtensionNode, Kind, - NamedTypeNode, - NameNode, - ObjectTypeDefinitionNode, - ObjectTypeExtensionNode, - StringValueNode, - TypeNode, + type NamedTypeNode, + type NameNode, + type ObjectTypeDefinitionNode, + type ObjectTypeExtensionNode, + type StringValueNode, + type TypeNode, } from 'graphql'; import { formatDescription, stringToNameNode } from '../ast/utils'; import { maximumTypeNestingExceededError, unexpectedTypeNodeKindFatalError } from '../errors/errors'; diff --git a/composition/src/schema-building/types.ts b/composition/src/schema-building/types.ts index f4883c4bd5..7861f0e540 100644 --- a/composition/src/schema-building/types.ts +++ b/composition/src/schema-building/types.ts @@ -1,31 +1,31 @@ import { - ConstDirectiveNode, - ConstValueNode, - DirectiveDefinitionNode, - DocumentNode, - Kind, - NamedTypeNode, - OperationTypeDefinitionNode, - OperationTypeNode, - StringValueNode, - TypeNode, + type ConstDirectiveNode, + type ConstValueNode, + type DirectiveDefinitionNode, + type DocumentNode, + type Kind, + type NamedTypeNode, + type OperationTypeDefinitionNode, + type OperationTypeNode, + type StringValueNode, + type TypeNode, } from 'graphql'; import { - MutableEnumNode, - MutableEnumValueNode, - MutableFieldNode, - MutableInputObjectNode, - MutableInputValueNode, - MutableInterfaceNode, - MutableObjectNode, - MutableScalarNode, - MutableTypeNode, - MutableUnionNode, + type MutableEnumNode, + type MutableEnumValueNode, + type MutableFieldNode, + type MutableInputObjectNode, + type MutableInputValueNode, + type MutableInterfaceNode, + type MutableObjectNode, + type MutableScalarNode, + type MutableTypeNode, + type MutableUnionNode, } from './ast'; -import { FieldSetConditionData } from '../router-configuration/types'; -import { KeyFieldSetData } from '../v1/normalization/types'; -import { InputNodeKind, OutputNodeKind } from '../utils/types'; -import { DirectiveName, FieldName, SubgraphName, TypeName } from '../types/types'; +import { type FieldSetConditionData } from '../router-configuration/types'; +import { type KeyFieldSetData } from '../v1/normalization/types'; +import { type InputNodeKind, type OutputNodeKind } from '../utils/types'; +import { type DirectiveName, type FieldName, type SubgraphName, type TypeName } from '../types/types'; export type ArgumentData = { name: string; diff --git a/composition/src/schema-building/utils.ts b/composition/src/schema-building/utils.ts index 469a626bff..be012ef6f9 100644 --- a/composition/src/schema-building/utils.ts +++ b/composition/src/schema-building/utils.ts @@ -1,50 +1,50 @@ import { - BooleanValueNode, - ConstDirectiveNode, - ConstValueNode, - DefinitionNode, - DirectiveDefinitionNode, - EnumValueDefinitionNode, - EnumValueNode, - FieldDefinitionNode, - FloatValueNode, - InputValueDefinitionNode, - IntValueNode, + type BooleanValueNode, + type ConstDirectiveNode, + type ConstValueNode, + DEFAULT_DEPRECATION_REASON, + type DefinitionNode, + type DirectiveDefinitionNode, + type EnumValueDefinitionNode, + type EnumValueNode, + type FieldDefinitionNode, + type FloatValueNode, + type InputValueDefinitionNode, + type IntValueNode, Kind, - NullValueNode, + type NullValueNode, OperationTypeNode, print, - StringValueNode, - TypeNode, + type StringValueNode, + type TypeNode, } from 'graphql'; import { - AuthorizationData, - ChildData, - CompositeOutputData, - ConditionalFieldData, - DefinitionData, - EnumValueData, + type AuthorizationData, + type ChildData, + type CompositeOutputData, + type ConditionalFieldData, + type DefinitionData, ExtensionType, - ExternalFieldData, - FieldData, - InputObjectDefinitionData, - InputValueData, - InterfaceDefinitionData, - NodeData, - ObjectDefinitionData, - ParentDefinitionData, - PersistedDirectiveDefinitionData, - PersistedDirectivesData, - SchemaData, + type ExternalFieldData, + type FieldData, + type InputObjectDefinitionData, + type InputValueData, + type InterfaceDefinitionData, + type NodeData, + type ObjectDefinitionData, + type ParentDefinitionData, + type PersistedDirectiveDefinitionData, + type PersistedDirectivesData, + type SchemaData, } from './types'; -import { MutableDefinitionNode, MutableFieldNode, MutableInputValueNode } from './ast'; -import { ObjectTypeNode, setToNameNodeArray, stringToNameNode } from '../ast/utils'; +import { type MutableDefinitionNode, type MutableFieldNode, type MutableInputValueNode } from './ast'; +import { type ObjectTypeNode, setToNameNodeArray, stringToNameNode } from '../ast/utils'; import { incompatibleInputValueDefaultValuesError, invalidRepeatedFederatedDirectiveErrorMessage, invalidRequiredInputValueError, } from '../errors/errors'; -import { SubscriptionFilterValue } from '../router-configuration/types'; +import { type SubscriptionFilterValue } from '../router-configuration/types'; import { ARGUMENT, AUTHENTICATED, @@ -58,7 +58,6 @@ import { INPUT_FIELD, INPUT_NODE_KINDS, INT_SCALAR, - KEY, MUTATION, OUTPUT_NODE_KINDS, PERSISTED_CLIENT_DIRECTIVES, @@ -78,10 +77,9 @@ import { getEntriesNotInHashSet, getFirstEntry, } from '../utils/utils'; -import { InputNodeKind, InvalidRequiredInputValueData, OutputNodeKind } from '../utils/types'; +import { type InputNodeKind, type InvalidRequiredInputValueData, type OutputNodeKind } from '../utils/types'; import { getDescriptionFromString } from '../v1/federation/utils'; -import { DirectiveName, FieldName, SubgraphName, TypeName } from '../types/types'; -import { DEFAULT_DEPRECATION_REASON } from 'graphql'; +import { type DirectiveName, type FieldName, type SubgraphName, type TypeName } from '../types/types'; export function newPersistedDirectivesData(): PersistedDirectivesData { return { diff --git a/composition/src/subgraph/types.ts b/composition/src/subgraph/types.ts index d22468ed3a..5f18c5ea19 100644 --- a/composition/src/subgraph/types.ts +++ b/composition/src/subgraph/types.ts @@ -1,19 +1,19 @@ import { - DirectiveDefinitionNode, - DocumentNode, - GraphQLSchema, - OperationTypeNode, - SchemaDefinitionNode, - SchemaExtensionNode, + type DirectiveDefinitionNode, + type DocumentNode, + type GraphQLSchema, + type OperationTypeNode, + type SchemaDefinitionNode, + type SchemaExtensionNode, } from 'graphql'; -import { ConfigurationData } from '../router-configuration/types'; +import { type ConfigurationData } from '../router-configuration/types'; import { - ConditionalFieldData, - EntityInterfaceSubgraphData, - ParentDefinitionData, - PersistedDirectiveDefinitionData, + type ConditionalFieldData, + type EntityInterfaceSubgraphData, + type ParentDefinitionData, + type PersistedDirectiveDefinitionData, } from '../schema-building/types'; -import { DirectiveName, FieldName, SubgraphName, TypeName } from '../types/types'; +import { type DirectiveName, type FieldName, type SubgraphName, type TypeName } from '../types/types'; export type Subgraph = { definitions: DocumentNode; diff --git a/composition/src/types/params.ts b/composition/src/types/params.ts new file mode 100644 index 0000000000..09533928e9 --- /dev/null +++ b/composition/src/types/params.ts @@ -0,0 +1,4 @@ +export type CompositionOptions = { + disableResolvabilityValidation?: boolean; + ignoreExternalKeys?: boolean; +}; diff --git a/composition/src/utils/string-constants.ts b/composition/src/utils/string-constants.ts index 4be8364ef8..b37e89b1bc 100644 --- a/composition/src/utils/string-constants.ts +++ b/composition/src/utils/string-constants.ts @@ -1,5 +1,5 @@ import { Kind } from 'graphql'; -import { DirectiveName } from '../types/types'; +import { type DirectiveName } from '../types/types'; export const AS = 'as'; export const AND_UPPER = 'AND'; diff --git a/composition/src/utils/types.ts b/composition/src/utils/types.ts index 255c18f53c..c2cbc90ecb 100644 --- a/composition/src/utils/types.ts +++ b/composition/src/utils/types.ts @@ -1,5 +1,5 @@ -import { Kind } from 'graphql'; -import { SubgraphName } from '../types/types'; +import { type Kind } from 'graphql'; +import { type SubgraphName } from '../types/types'; export type RootTypeName = 'Mutation' | 'Query' | 'Subscription'; diff --git a/composition/src/utils/utils.ts b/composition/src/utils/utils.ts index a8dbf221d0..e6d2380f6b 100644 --- a/composition/src/utils/utils.ts +++ b/composition/src/utils/utils.ts @@ -1,4 +1,4 @@ -import { ConstDirectiveNode, ConstValueNode, Kind, StringValueNode } from 'graphql'; +import { type ConstDirectiveNode, type ConstValueNode, Kind, type StringValueNode } from 'graphql'; import { BOOLEAN_SCALAR, ENUM, @@ -21,7 +21,7 @@ import { } from './string-constants'; import { invalidKeyFatalError } from '../errors/errors'; import { stringToNameNode } from '../ast/utils'; -import { AddMapEntriesParams, AddOptionalToSetParams, AddToSetParams } from './params'; +import { type AddMapEntriesParams, type AddOptionalToSetParams, type AddToSetParams } from './params'; export function getOrThrowError(map: Map, key: K, mapName: string): V { const value = map.get(key); diff --git a/composition/src/v1/constants/constants.ts b/composition/src/v1/constants/constants.ts index c9c8524539..1b30d1ca91 100644 --- a/composition/src/v1/constants/constants.ts +++ b/composition/src/v1/constants/constants.ts @@ -1,4 +1,4 @@ -import { DirectiveDefinitionNode } from 'graphql'; +import { type DirectiveDefinitionNode } from 'graphql'; import { AUTHENTICATED, BOOLEAN_SCALAR, @@ -38,7 +38,7 @@ import { SUBSCRIPTION_FILTER, TAG, } from '../../utils/string-constants'; -import { DirectiveName } from '../../types/types'; +import { type DirectiveName } from '../../types/types'; import { AUTHENTICATED_DEFINITION, COMPOSE_DIRECTIVE_DEFINITION, diff --git a/composition/src/v1/constants/directive-definitions.ts b/composition/src/v1/constants/directive-definitions.ts index e5b5fd7e37..351e31ac51 100644 --- a/composition/src/v1/constants/directive-definitions.ts +++ b/composition/src/v1/constants/directive-definitions.ts @@ -1,7 +1,7 @@ /* directive @deprecated(reason: String = "No longer supported") on ARGUMENT_DEFINITION | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION */ -import { DEFAULT_DEPRECATION_REASON, DirectiveDefinitionNode, Kind } from 'graphql'; +import { DEFAULT_DEPRECATION_REASON, type DirectiveDefinitionNode, Kind } from 'graphql'; import { stringArrayToNameNodeArray, stringToNamedTypeNode, stringToNameNode } from '../../ast/utils'; import { ARGUMENT_DEFINITION_UPPER, diff --git a/composition/src/v1/constants/non-directive-definitions.ts b/composition/src/v1/constants/non-directive-definitions.ts index 9cdbece15f..826667b965 100644 --- a/composition/src/v1/constants/non-directive-definitions.ts +++ b/composition/src/v1/constants/non-directive-definitions.ts @@ -1,4 +1,9 @@ -import { EnumTypeDefinitionNode, InputObjectTypeDefinitionNode, Kind, ScalarTypeDefinitionNode } from 'graphql'; +import { + type EnumTypeDefinitionNode, + type InputObjectTypeDefinitionNode, + Kind, + type ScalarTypeDefinitionNode, +} from 'graphql'; import { stringToNamedTypeNode, stringToNameNode } from '../../ast/utils'; import { AND_UPPER, diff --git a/composition/src/v1/constants/strings.ts b/composition/src/v1/constants/strings.ts index 7cf2b1fbc3..379b4d669f 100644 --- a/composition/src/v1/constants/strings.ts +++ b/composition/src/v1/constants/strings.ts @@ -47,8 +47,8 @@ import { SUBSCRIPTION_FILTER_VALUE, UNION_UPPER, } from '../../utils/string-constants'; -import { DefinitionNode, Kind } from 'graphql'; -import { DirectiveName, FieldName, TypeName } from '../../types/types'; +import { type DefinitionNode, Kind } from 'graphql'; +import { type DirectiveName, type FieldName, type TypeName } from '../../types/types'; import { EDFS_NATS_STREAM_CONFIGURATION_DEFINITION, FIELD_SET_SCALAR_DEFINITION, diff --git a/composition/src/v1/constants/type-nodes.ts b/composition/src/v1/constants/type-nodes.ts index f5fc5a321c..63d34993fc 100644 --- a/composition/src/v1/constants/type-nodes.ts +++ b/composition/src/v1/constants/type-nodes.ts @@ -1,4 +1,4 @@ -import { Kind, TypeNode } from 'graphql'; +import { Kind, type TypeNode } from 'graphql'; import { stringToNamedTypeNode } from '../../ast/utils'; import { FIELD_SET_SCALAR, STRING_SCALAR } from '../../utils/string-constants'; diff --git a/composition/src/v1/federation/federation-factory.ts b/composition/src/v1/federation/federation-factory.ts index 4db3731289..5af85f91c8 100644 --- a/composition/src/v1/federation/federation-factory.ts +++ b/composition/src/v1/federation/federation-factory.ts @@ -1,27 +1,27 @@ import { buildASTSchema, - ConstDirectiveNode, - ConstObjectValueNode, - DefinitionNode, - DirectiveDefinitionNode, - DocumentNode, - GraphQLSchema, + type ConstDirectiveNode, + type ConstObjectValueNode, + type DefinitionNode, + type DirectiveDefinitionNode, + type DocumentNode, + type GraphQLSchema, Kind, - ListTypeNode, - NamedTypeNode, - NonNullTypeNode, - StringValueNode, - TypeNode, + type ListTypeNode, + type NamedTypeNode, + type NonNullTypeNode, + type StringValueNode, + type TypeNode, } from 'graphql'; import { getMutableTypeNode, getTypeNodeNamedTypeName, - MutableDefinitionNode, - MutableEnumValueNode, - MutableFieldNode, - MutableInputValueNode, - MutableIntermediateTypeNode, - MutableTypeNode, + type MutableDefinitionNode, + type MutableEnumValueNode, + type MutableFieldNode, + type MutableInputValueNode, + type MutableIntermediateTypeNode, + type MutableTypeNode, } from '../../schema-building/ast'; import { stringToNamedTypeNode, stringToNameNode } from '../../ast/utils'; import { @@ -75,15 +75,14 @@ import { unknownNamedTypeError, } from '../../errors/errors'; import { - ChildTagData, - FederationFactoryParams, + type ChildTagData, getDescriptionFromString, - InterfaceImplementationData, - InterfaceObjectForInternalGraphOptions, + type InterfaceImplementationData, + type InterfaceObjectForInternalGraphOptions, newChildTagData, newParentTagData, - ParentTagData, - SubscriptionFilterData, + type ParentTagData, + type SubscriptionFilterData, validateImplicitFieldSets, } from './utils'; import { @@ -108,34 +107,34 @@ import { } from '../utils/utils'; import { printTypeNode } from '@graphql-tools/merge'; import { - FieldConfiguration, - RequiredFieldConfiguration, - SubscriptionCondition, - SubscriptionFieldCondition, - SubscriptionFilterValue, + type FieldConfiguration, + type RequiredFieldConfiguration, + type SubscriptionCondition, + type SubscriptionFieldCondition, + type SubscriptionFilterValue, } from '../../router-configuration/types'; import { BASE_SCALARS, DIRECTIVE_DEFINITION_BY_NAME, MAX_OR_SCOPES } from '../constants/constants'; import { batchNormalize } from '../normalization/normalization-factory'; import { isNodeQuery } from '../normalization/utils'; import { - AuthorizationData, - ChildData, - CompositeOutputData, - EntityData, - EntityInterfaceFederationData, - EnumValueData, + type AuthorizationData, + type ChildData, + type CompositeOutputData, + type EntityData, + type EntityInterfaceFederationData, + type EnumValueData, ExtensionType, - FieldData, - InputObjectDefinitionData, - InputValueData, - InterfaceDefinitionData, - NodeData, - ObjectDefinitionData, - ParentDefinitionData, - PersistedDirectiveDefinitionData, - PersistedDirectivesData, - ScalarDefinitionData, - UnionDefinitionData, + type FieldData, + type InputObjectDefinitionData, + type InputValueData, + type InterfaceDefinitionData, + type NodeData, + type ObjectDefinitionData, + type ParentDefinitionData, + type PersistedDirectiveDefinitionData, + type PersistedDirectivesData, + type ScalarDefinitionData, + type UnionDefinitionData, } from '../../schema-building/types'; import { addValidPersistedDirectiveDefinitionNodeByData, @@ -171,19 +170,19 @@ import { renameRootTypes } from './walkers'; import { cloneDeep } from 'lodash'; import { DivergentType, - FederateTypeParams, - FederateTypeResult, + type FederateTypeParams, + type FederateTypeResult, getMostRestrictiveMergedTypeNode, } from '../schema-building/type-merging'; -import { Graph } from '../../resolvability-graph/graph'; -import { GraphNode } from '../../resolvability-graph/graph-nodes'; -import { InternalSubgraph, SubgraphConfig } from '../../subgraph/types'; -import { Warning } from '../../warnings/types'; +import { type Graph } from '../../resolvability-graph/graph'; +import { type GraphNode } from '../../resolvability-graph/graph-nodes'; +import { type InternalSubgraph, type SubgraphConfig } from '../../subgraph/types'; +import { type Warning } from '../../warnings/types'; import { - ContractTagOptions, - FederationResult, - FederationResultWithContracts, - MutualParentDefinitionData, + type ContractTagOptions, + type FederationResult, + type FederationResultWithContracts, + type MutualParentDefinitionData, } from '../../federation/types'; import { AND_UPPER, @@ -199,13 +198,13 @@ import { INPUT_OBJECT, LEFT_PARENTHESIS, LIST, + LITERAL_PERIOD, NON_REPEATABLE_PERSISTED_DIRECTIVES, NOT_UPPER, OBJECT, ONE_OF, OR_UPPER, PARENT_DEFINITION_DATA, - LITERAL_PERIOD, QUERY, REQUIRES_SCOPES, SEMANTIC_NON_NULL, @@ -230,17 +229,30 @@ import { getValueOrDefault, kindToNodeType, } from '../../utils/utils'; -import { +import type { GraphFieldData, ImplementationErrors, InvalidEntityInterface, InvalidFieldImplementation, InvalidRequiredInputValueData, } from '../../utils/types'; -import { FederateSubgraphsContractV1Params, FederateSubgraphsWithContractsV1Params, FederationParams } from './types'; -import { ContractName, DirectiveName, FieldCoords, FieldName, SubgraphName, TypeName } from '../../types/types'; +import { + type ContractName, + type DirectiveName, + type FieldCoords, + type FieldName, + type SubgraphName, + type TypeName, +} from '../../types/types'; import { singleFederatedInputFieldOneOfWarning } from '../warnings/warnings'; -import { ExtractPersistedDirectivesParams, ValidateOneOfDirectiveParams } from './params'; +import type { + ExtractPersistedDirectivesParams, + FederateSubgraphsContractV1Params, + FederateSubgraphsWithContractsV1Params, + FederationFactoryParams, + FederationParams, + ValidateOneOfDirectiveParams, +} from './params'; import { AUTHENTICATED_DEFINITION, DEPRECATED_DEFINITION, @@ -250,11 +262,11 @@ import { SEMANTIC_NON_NULL_DEFINITION, TAG_DEFINITION, } from '../constants/directive-definitions'; +import type { CompositionOptions } from '../../types/params'; export class FederationFactory { authorizationDataByParentTypeName: Map; coordsByNamedTypeName = new Map>(); - disableResolvabilityValidation: boolean = false; directiveDefinitionByName = new Map(); clientDefinitions: Array = []; currentSubgraphName = ''; @@ -274,6 +286,7 @@ export class FederationFactory { isVersionTwo = false; namedInputValueTypeNames = new Set(); namedOutputTypeNames = new Set(); + options: CompositionOptions; parentDefinitionDataByTypeName = new Map(); parentTagDataByTypeName = new Map(); persistedDirectiveDefinitionByDirectiveName = new Map([ @@ -295,17 +308,17 @@ export class FederationFactory { constructor({ authorizationDataByParentTypeName, concreteTypeNamesByAbstractTypeName, - disableResolvabilityValidation, entityDataByTypeName, entityInterfaceFederationDataByTypeName, fieldCoordsByNamedTypeName, internalGraph, internalSubgraphBySubgraphName, + options, warnings, }: FederationFactoryParams) { this.authorizationDataByParentTypeName = authorizationDataByParentTypeName; + this.options = options ?? {}; this.concreteTypeNamesByAbstractTypeName = concreteTypeNamesByAbstractTypeName; - this.disableResolvabilityValidation = disableResolvabilityValidation ?? false; this.entityDataByTypeName = entityDataByTypeName; this.entityInterfaceFederationDataByTypeName = entityInterfaceFederationDataByTypeName; this.fieldCoordsByNamedTypeName = fieldCoordsByNamedTypeName; @@ -2868,7 +2881,7 @@ export class FederationFactory { * These checks can be disabled by setting `disableResolvabilityValidation` to true. * This should only be done for troubleshooting purposes. * */ - if (!this.disableResolvabilityValidation && this.internalSubgraphBySubgraphName.size > 1) { + if (!this.options.disableResolvabilityValidation && this.internalSubgraphBySubgraphName.size > 1) { const validationResult = this.internalGraph.validate(); if (!validationResult.success) { return { errors: validationResult.errors, success: false, warnings: this.warnings }; @@ -3241,19 +3254,16 @@ type FederationFactoryResultFailure = { type FederationFactoryResult = FederationFactoryResultFailure | FederationFactoryResultSuccess; -function initializeFederationFactory({ - disableResolvabilityValidation, - subgraphs, -}: FederationParams): FederationFactoryResult { +function initializeFederationFactory({ options, subgraphs }: FederationParams): FederationFactoryResult { if (subgraphs.length < 1) { return { errors: [minimumSubgraphRequirementError], success: false, warnings: [] }; } - const result = batchNormalize(subgraphs); + const result = batchNormalize({ subgraphs, options }); if (!result.success) { return { errors: result.errors, success: false, warnings: result.warnings }; } - const entityInterfaceFederationDataByTypeName = new Map(); - const invalidEntityInterfacesByTypeName = new Map>(); + const entityInterfaceFederationDataByTypeName = new Map(); + const invalidEntityInterfacesByTypeName = new Map>(); for (const [subgraphName, internalSubgraph] of result.internalSubgraphBySubgraphName) { for (const [typeName, entityInterfaceData] of internalSubgraph.entityInterfaces) { const existingData = entityInterfaceFederationDataByTypeName.get(typeName); @@ -3356,12 +3366,12 @@ function initializeFederationFactory({ federationFactory: new FederationFactory({ authorizationDataByParentTypeName: result.authorizationDataByParentTypeName, concreteTypeNamesByAbstractTypeName: result.concreteTypeNamesByAbstractTypeName, - disableResolvabilityValidation, entityDataByTypeName: result.entityDataByTypeName, entityInterfaceFederationDataByTypeName, fieldCoordsByNamedTypeName: result.fieldCoordsByNamedTypeName, internalSubgraphBySubgraphName: result.internalSubgraphBySubgraphName, internalGraph: result.internalGraph, + options, warnings: result.warnings, }), success: true, @@ -3369,8 +3379,8 @@ function initializeFederationFactory({ }; } -export function federateSubgraphs({ disableResolvabilityValidation, subgraphs }: FederationParams): FederationResult { - const federationFactoryResult = initializeFederationFactory({ subgraphs, disableResolvabilityValidation }); +export function federateSubgraphs({ options, subgraphs }: FederationParams): FederationResult { + const federationFactoryResult = initializeFederationFactory({ options, subgraphs }); if (!federationFactoryResult.success) { return { errors: federationFactoryResult.errors, success: false, warnings: federationFactoryResult.warnings }; } @@ -3379,11 +3389,11 @@ export function federateSubgraphs({ disableResolvabilityValidation, subgraphs }: // the flow when publishing a subgraph that also has contracts export function federateSubgraphsWithContracts({ + options, subgraphs, tagOptionsByContractName, - disableResolvabilityValidation, }: FederateSubgraphsWithContractsV1Params): FederationResultWithContracts { - const factoryResult = initializeFederationFactory({ subgraphs, disableResolvabilityValidation }); + const factoryResult = initializeFederationFactory({ options, subgraphs }); if (!factoryResult.success) { return { errors: factoryResult.errors, @@ -3417,10 +3427,10 @@ export function federateSubgraphsWithContracts({ // the flow when adding a completely new contract export function federateSubgraphsContract({ contractTagOptions, - disableResolvabilityValidation, + options, subgraphs, }: FederateSubgraphsContractV1Params): FederationResult { - const result = initializeFederationFactory({ subgraphs, disableResolvabilityValidation }); + const result = initializeFederationFactory({ options, subgraphs }); if (!result.success) { return { errors: result.errors, success: false, warnings: result.warnings }; } diff --git a/composition/src/v1/federation/params.ts b/composition/src/v1/federation/params.ts index 53f01e6fa2..e97fda04c8 100644 --- a/composition/src/v1/federation/params.ts +++ b/composition/src/v1/federation/params.ts @@ -1,6 +1,17 @@ -import { DirectiveName, FieldName } from '../../types/types'; -import { InputObjectDefinitionData, PersistedDirectivesData } from '../../schema-building/types'; -import { ConstDirectiveNode, InputValueDefinitionNode } from 'graphql'; +import type { ContractName, DirectiveName, FieldName, SubgraphName, TypeName } from '../../types/types'; +import type { + AuthorizationData, + EntityData, + EntityInterfaceFederationData, + InputObjectDefinitionData, + PersistedDirectivesData, +} from '../../schema-building/types'; +import type { ConstDirectiveNode, InputValueDefinitionNode } from 'graphql'; +import type { InternalSubgraph, Subgraph } from '../../subgraph/types'; +import type { ContractTagOptions } from '../../federation/types'; +import type { CompositionOptions } from '../../types/params'; +import type { Graph } from '../../resolvability-graph/graph'; +import type { Warning } from '../../warnings/types'; export type ValidateOneOfDirectiveParams = { data: InputObjectDefinitionData; @@ -12,3 +23,32 @@ export type ExtractPersistedDirectivesParams = { data: PersistedDirectivesData; directivesByName: Map>; }; + +export type FederationParams = { + subgraphs: Array; + options?: CompositionOptions; +}; + +export type FederateSubgraphsWithContractsV1Params = { + subgraphs: Array; + tagOptionsByContractName: Map; + options?: CompositionOptions; +}; + +export type FederateSubgraphsContractV1Params = { + subgraphs: Array; + contractTagOptions: ContractTagOptions; + options?: CompositionOptions; +}; + +export type FederationFactoryParams = { + authorizationDataByParentTypeName: Map; + concreteTypeNamesByAbstractTypeName: Map>; + entityDataByTypeName: Map; + entityInterfaceFederationDataByTypeName: Map; + fieldCoordsByNamedTypeName: Map>; + internalGraph: Graph; + internalSubgraphBySubgraphName: Map; + warnings: Array; + options?: CompositionOptions; +}; diff --git a/composition/src/v1/federation/types.ts b/composition/src/v1/federation/types.ts deleted file mode 100644 index bf184c308a..0000000000 --- a/composition/src/v1/federation/types.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { Subgraph } from '../../subgraph/types'; -import { ContractTagOptions } from '../../federation/types'; -import { ContractName } from '../../types/types'; - -export type FederationParams = { - subgraphs: Array; - disableResolvabilityValidation?: boolean; -}; - -export type FederateSubgraphsWithContractsV1Params = { - subgraphs: Array; - tagOptionsByContractName: Map; - disableResolvabilityValidation?: boolean; -}; - -export type FederateSubgraphsContractV1Params = { - subgraphs: Array; - contractTagOptions: ContractTagOptions; - disableResolvabilityValidation?: boolean; -}; diff --git a/composition/src/v1/federation/utils.ts b/composition/src/v1/federation/utils.ts index 2d546847fe..cd2a9a8166 100644 --- a/composition/src/v1/federation/utils.ts +++ b/composition/src/v1/federation/utils.ts @@ -1,42 +1,26 @@ -import { BREAK, ConstDirectiveNode, Kind, StringValueNode, visit } from 'graphql'; -import { FieldSetConditionData, RequiredFieldConfiguration } from '../../router-configuration/types'; +import { BREAK, type ConstDirectiveNode, Kind, type StringValueNode, visit } from 'graphql'; +import { type FieldSetConditionData, type RequiredFieldConfiguration } from '../../router-configuration/types'; import { - AuthorizationData, - CompositeOutputData, - ConditionalFieldData, - EntityData, - EntityInterfaceFederationData, - FieldData, - InterfaceDefinitionData, - ObjectDefinitionData, - ParentDefinitionData, + type CompositeOutputData, + type ConditionalFieldData, + type EntityData, + type EntityInterfaceFederationData, + type FieldData, + type InterfaceDefinitionData, + type ObjectDefinitionData, + type ParentDefinitionData, } from '../../schema-building/types'; -import { Graph } from '../../resolvability-graph/graph'; -import { getTypeNodeNamedTypeName, MutableFieldNode } from '../../schema-building/ast'; +import { getTypeNodeNamedTypeName, type MutableFieldNode } from '../../schema-building/ast'; import { BASE_SCALARS } from '../constants/constants'; import { isKindAbstract } from '../../ast/utils'; -import { GraphNode } from '../../resolvability-graph/graph-nodes'; - -import { Warning } from '../../warnings/types'; -import { InternalSubgraph } from '../../subgraph/types'; -import { ContractTagOptions } from '../../federation/types'; +import { type GraphNode } from '../../resolvability-graph/graph-nodes'; +import { type InternalSubgraph } from '../../subgraph/types'; +import { type ContractTagOptions } from '../../federation/types'; import { getOrThrowError, getValueOrDefault } from '../../utils/utils'; -import { KeyFieldSetData } from '../normalization/types'; -import { SubgraphName, TypeName } from '../../types/types'; +import { type KeyFieldSetData } from '../normalization/types'; +import { type TypeName } from '../../types/types'; import { TYPENAME } from '../../utils/string-constants'; -export type FederationFactoryParams = { - authorizationDataByParentTypeName: Map; - concreteTypeNamesByAbstractTypeName: Map>; - entityDataByTypeName: Map; - entityInterfaceFederationDataByTypeName: Map; - fieldCoordsByNamedTypeName: Map>; - internalGraph: Graph; - internalSubgraphBySubgraphName: Map; - warnings: Warning[]; - disableResolvabilityValidation?: boolean; -}; - export type ParentTagData = { childTagDataByChildName: Map; tagNames: Set; diff --git a/composition/src/v1/federation/walkers.ts b/composition/src/v1/federation/walkers.ts index 2376173121..0cda3acdd1 100644 --- a/composition/src/v1/federation/walkers.ts +++ b/composition/src/v1/federation/walkers.ts @@ -1,9 +1,13 @@ -import { FederationFactory } from './federation-factory'; -import { CompositeOutputData, InterfaceDefinitionData, ObjectDefinitionData } from '../../schema-building/types'; +import { type FederationFactory } from './federation-factory'; +import { + type CompositeOutputData, + type InterfaceDefinitionData, + type ObjectDefinitionData, +} from '../../schema-building/types'; import { visit } from 'graphql'; import { operationTypeNodeToDefaultType } from '../../ast/utils'; import { renameNamedTypeName } from '../schema-building/type-merging'; -import { InternalSubgraph } from '../../subgraph/types'; +import { type InternalSubgraph } from '../../subgraph/types'; import { ENTITIES_FIELD, OPERATION_TO_DEFAULT, diff --git a/composition/src/v1/normalization/directive-definition-data.ts b/composition/src/v1/normalization/directive-definition-data.ts index 1be1bcb33d..773f6b32b6 100644 --- a/composition/src/v1/normalization/directive-definition-data.ts +++ b/composition/src/v1/normalization/directive-definition-data.ts @@ -1,4 +1,4 @@ -import { ArgumentData, DirectiveDefinitionData } from '../../schema-building/types'; +import { type ArgumentData, type DirectiveDefinitionData } from '../../schema-building/types'; import { stringToNamedTypeNode } from '../../ast/utils'; import { DEFAULT_DEPRECATION_REASON, Kind } from 'graphql'; import { diff --git a/composition/src/v1/normalization/normalization-factory.ts b/composition/src/v1/normalization/normalization-factory.ts index b864430b89..5611599677 100644 --- a/composition/src/v1/normalization/normalization-factory.ts +++ b/composition/src/v1/normalization/normalization-factory.ts @@ -1,48 +1,48 @@ import { BREAK, - ConstDirectiveNode, - ConstValueNode, - DefinitionNode, - DirectiveDefinitionNode, - DocumentNode, - EnumValueDefinitionNode, - FieldDefinitionNode, - InputValueDefinitionNode, - InterfaceTypeDefinitionNode, - InterfaceTypeExtensionNode, - IntValueNode, + type ConstDirectiveNode, + type ConstValueNode, + type DefinitionNode, + type DirectiveDefinitionNode, + type DocumentNode, + type EnumValueDefinitionNode, + type FieldDefinitionNode, + type InputValueDefinitionNode, + type InterfaceTypeDefinitionNode, + type InterfaceTypeExtensionNode, + type IntValueNode, Kind, - ListValueNode, - NamedTypeNode, - ObjectTypeDefinitionNode, - ObjectTypeExtensionNode, - OperationTypeDefinitionNode, + type ListValueNode, + type NamedTypeNode, + type ObjectTypeDefinitionNode, + type ObjectTypeExtensionNode, + type OperationTypeDefinitionNode, OperationTypeNode, print, - SchemaDefinitionNode, - SchemaExtensionNode, - StringValueNode, - TypeDefinitionNode, - TypeExtensionNode, - TypeNode, + type SchemaDefinitionNode, + type SchemaExtensionNode, + type StringValueNode, + type TypeDefinitionNode, + type TypeExtensionNode, + type TypeNode, visit, } from 'graphql'; import { - EnumTypeNode, + type EnumTypeNode, extractExecutableDirectiveLocations, formatDescription, - InputObjectTypeNode, - InterfaceTypeNode, + type InputObjectTypeNode, + type InterfaceTypeNode, isKindAbstract, nodeKindToDirectiveLocation, - ObjectTypeNode, + type ObjectTypeNode, operationTypeNodeToDefaultType, safeParse, - ScalarTypeNode, - SchemaNode, + type ScalarTypeNode, + type SchemaNode, setToNamedTypeNodeArray, stringToNamedTypeNode, - UnionTypeNode, + type UnionTypeNode, } from '../../ast/utils'; import { getConditionalFieldSetDirectiveName, @@ -174,10 +174,10 @@ import { } from '../constants/strings'; import { buildASTSchema } from '../../buildASTSchema/buildASTSchema'; import { - ConfigurationData, - EventConfiguration, - NatsEventType, - RequiredFieldConfiguration, + type ConfigurationData, + type EventConfiguration, + type NatsEventType, + type RequiredFieldConfiguration, } from '../../router-configuration/types'; import { printTypeNode } from '@graphql-tools/merge'; import { recordSubgraphName } from '../subgraph/subgraph'; @@ -194,28 +194,28 @@ import { } from '../warnings/warnings'; import { upsertDirectiveSchemaAndEntityDefinitions, upsertParentsAndChildren } from './walkers'; import { - ArgumentData, - AuthorizationData, - CompositeOutputData, - ConditionalFieldData, - ConfigureDescriptionData, - EntityData, - EntityInterfaceSubgraphData, - EnumDefinitionData, - EnumValueData, + type ArgumentData, + type AuthorizationData, + type CompositeOutputData, + type ConditionalFieldData, + type ConfigureDescriptionData, + type EntityData, + type EntityInterfaceSubgraphData, + type EnumDefinitionData, + type EnumValueData, ExtensionType, - ExternalFieldData, - FieldData, - InputObjectDefinitionData, - InputValueData, - InterfaceDefinitionData, - NodeData, - ObjectDefinitionData, - ParentDefinitionData, - PersistedDirectiveDefinitionData, - ScalarDefinitionData, - SchemaData, - UnionDefinitionData, + type ExternalFieldData, + type FieldData, + type InputObjectDefinitionData, + type InputValueData, + type InterfaceDefinitionData, + type NodeData, + type ObjectDefinitionData, + type ParentDefinitionData, + type PersistedDirectiveDefinitionData, + type ScalarDefinitionData, + type SchemaData, + type UnionDefinitionData, } from '../../schema-building/types'; import { areDefaultValuesCompatible, @@ -233,7 +233,7 @@ import { newPersistedDirectivesData, } from '../../schema-building/utils'; import { - CompositeOutputNode, + type CompositeOutputNode, getMutableEnumNode, getMutableFieldNode, getMutableInputObjectNode, @@ -245,14 +245,14 @@ import { getMutableUnionNode, getNamedTypeNode, getTypeNodeNamedTypeName, - MutableTypeNode, + type MutableTypeNode, } from '../../schema-building/ast'; -import { InvalidRootTypeFieldEventsDirectiveData } from '../../errors/types'; +import { type InvalidRootTypeFieldEventsDirectiveData } from '../../errors/types'; import { Graph } from '../../resolvability-graph/graph'; import { DEFAULT_CONSUMER_INACTIVE_THRESHOLD } from '../constants/integers'; -import { InternalSubgraph, Subgraph } from '../../subgraph/types'; -import { Warning } from '../../warnings/types'; -import { BatchNormalizationResult, NormalizationResult } from '../../normalization/types'; +import { type InternalSubgraph } from '../../subgraph/types'; +import { type Warning } from '../../warnings/types'; +import { type BatchNormalizationResult, type NormalizationResult } from '../../normalization/types'; import { ARGUMENT, AUTHENTICATED, @@ -348,43 +348,57 @@ import { numberToOrdinal, } from '../../utils/utils'; import { - AddInputValueDataByNodeParams, - ConditionalFieldSetValidationResult, - ExtractArgumentDataResult, - FieldSetData, - FieldSetParentResult, - HandleOverrideDirectiveParams, - HandleRequiresScopesDirectiveParams, - HandleSemanticNonNullDirectiveParams, - KeyFieldSetData, - UpsertInputObjectResult, - ValidateDirectiveParams, + type AddInputValueDataByNodeParams, + type ConditionalFieldSetValidationResult, + type ExtractArgumentDataResult, + type FieldSetData, + type FieldSetParentResult, + type HandleOverrideDirectiveParams, + type HandleRequiresScopesDirectiveParams, + type HandleSemanticNonNullDirectiveParams, + type KeyFieldSetData, + type UpsertInputObjectResult, + type ValidateDirectiveParams, } from './types'; import { newConfigurationData, newFieldSetConditionData } from '../../router-configuration/utils'; -import { ImplementationErrors, InvalidFieldImplementation } from '../../utils/types'; -import { DirectiveName, FieldName, SubgraphName, TypeName } from '../../types/types'; +import { type ImplementationErrors, type InvalidFieldImplementation } from '../../utils/types'; +import { type DirectiveName, type FieldName, type SubgraphName, type TypeName } from '../../types/types'; import { - HandleFieldInheritableDirectivesParams, - HandleNonExternalConditionalFieldParams, - ValidateOneOfDirectiveParams, + type BatchNormalizeParams, + type HandleFieldInheritableDirectivesParams, + type HandleNonExternalConditionalFieldParams, + type NormalizationFactoryParams, + type NormalizeSubgraphFromStringParams, + type NormalizeSubgraphParams, + type ValidateOneOfDirectiveParams, } from './params'; import { EDFS_NATS_STREAM_CONFIGURATION_DEFINITION } from '../constants/non-directive-definitions'; - -export function normalizeSubgraphFromString(subgraphSDL: string, noLocation = true): NormalizationResult { - const { error, documentNode } = safeParse(subgraphSDL, noLocation); +import type { CompositionOptions } from '../../types/params'; + +export function normalizeSubgraphFromString({ + noLocation, + options, + sdlString, +}: NormalizeSubgraphFromStringParams): NormalizationResult { + const { error, documentNode } = safeParse(sdlString, noLocation); if (error || !documentNode) { return { errors: [subgraphInvalidSyntaxError(error)], success: false, warnings: [] }; } - const normalizationFactory = new NormalizationFactory(new Graph()); + const normalizationFactory = new NormalizationFactory({ internalGraph: new Graph(), options }); return normalizationFactory.normalize(documentNode); } -export function normalizeSubgraph( - document: DocumentNode, - subgraphName?: string, - internalGraph?: Graph, -): NormalizationResult { - const normalizationFactory = new NormalizationFactory(internalGraph || new Graph(), subgraphName); +export function normalizeSubgraph({ + document, + internalGraph, + options, + subgraphName, +}: NormalizeSubgraphParams): NormalizationResult { + const normalizationFactory = new NormalizationFactory({ + internalGraph: internalGraph || new Graph(), + options, + subgraphName, + }); return normalizationFactory.normalize(document); } @@ -416,6 +430,7 @@ export class NormalizationFactory { keyFieldSetDatasByTypeName = new Map>(); lastParentNodeKind: Kind = Kind.NULL; lastChildNodeKind: Kind = Kind.NULL; + options: CompositionOptions; parentTypeNamesWithAuthDirectives = new Set(); keyFieldSetsByEntityTypeNameByFieldCoords = new Map>>(); keyFieldNamesByParentTypeName = new Map>(); @@ -434,12 +449,13 @@ export class NormalizationFactory { usesEdfsNatsStreamConfiguration: boolean = false; warnings: Array = []; - constructor(internalGraph: Graph, subgraphName?: SubgraphName) { + constructor({ internalGraph, options, subgraphName }: NormalizationFactoryParams) { + this.options = options ?? {}; this.subgraphName = subgraphName || NOT_APPLICABLE; this.internalGraph = internalGraph; this.internalGraph.setSubgraphName(this.subgraphName); this.schemaData = { - directivesByName: new Map(), + directivesByName: new Map>(), kind: Kind.SCHEMA_DEFINITION, name: SCHEMA, operationTypes: new Map(), @@ -3560,7 +3576,7 @@ export class NormalizationFactory { this.validateDirectives(this.schemaData, SCHEMA); const schemaNode = this.getSchemaNodeByData(this.schemaData); /* Schema extension orphans are not supported on old routers. - * Consequently, it is a breaking change that requires a new composition version, and hat composition version + * Consequently, it is a breaking change that requires a new composition version, and that composition version * would only be compatible with newer routers that support schema extension orphans. * For now, only a valid schema definition node is pushed. */ @@ -3861,13 +3877,13 @@ export class NormalizationFactory { } } -export function batchNormalize(subgraphs: Subgraph[]): BatchNormalizationResult { +export function batchNormalize({ options, subgraphs }: BatchNormalizeParams): BatchNormalizationResult { const authorizationDataByParentTypeName = new Map(); const concreteTypeNamesByAbstractTypeName = new Map>(); const entityDataByTypeName = new Map(); const internalSubgraphBySubgraphName = new Map(); - const allOverridesByTargetSubgraphName = new Map>>(); - const overrideSourceSubgraphNamesByFieldPath = new Map(); + const allOverridesByTargetSubgraphName = new Map>>(); + const overrideSourceSubgraphNamesByFieldPath = new Map>(); const duplicateOverriddenFieldPaths = new Set(); const parentDefinitionDataMapsBySubgraphName = new Map>(); const subgraphNames = new Set(); @@ -3890,7 +3906,12 @@ export function batchNormalize(subgraphs: Subgraph[]): BatchNormalizationResult if (!subgraph.name) { invalidNameErrorMessages.push(invalidSubgraphNameErrorMessage(i, subgraphName)); } - const normalizationResult = normalizeSubgraph(subgraph.definitions, subgraph.name, internalGraph); + const normalizationResult = normalizeSubgraph({ + document: subgraph.definitions, + internalGraph, + options, + subgraphName, + }); if (normalizationResult.warnings.length > 0) { warnings.push(...normalizationResult.warnings); } diff --git a/composition/src/v1/normalization/params.ts b/composition/src/v1/normalization/params.ts index 2e98e1f277..075a8e6d02 100644 --- a/composition/src/v1/normalization/params.ts +++ b/composition/src/v1/normalization/params.ts @@ -1,6 +1,9 @@ -import type { DirectiveName, FieldName } from '../../types/types'; +import type { DirectiveName, FieldName, SubgraphName } from '../../types/types'; import type { CompositeOutputData, InputObjectDefinitionData } from '../../schema-building/types'; -import type { ConstDirectiveNode } from 'graphql'; +import type { ConstDirectiveNode, DocumentNode } from 'graphql'; +import type { Subgraph } from '../../subgraph/types'; +import type { CompositionOptions } from '../../types/params'; +import type { Graph } from '../../resolvability-graph/graph'; export type ValidateOneOfDirectiveParams = { data: InputObjectDefinitionData; @@ -20,3 +23,27 @@ export type HandleNonExternalConditionalFieldParams = { directiveName: DirectiveName; fieldSet: string; }; + +export type BatchNormalizeParams = { + subgraphs: Array; + options?: CompositionOptions; +}; + +export type NormalizationFactoryParams = { + internalGraph: Graph; + options?: CompositionOptions; + subgraphName?: SubgraphName; +}; + +export type NormalizeSubgraphParams = { + document: DocumentNode; + internalGraph?: Graph; + options?: CompositionOptions; + subgraphName?: SubgraphName; +}; + +export type NormalizeSubgraphFromStringParams = { + noLocation: boolean; + sdlString: string; + options?: CompositionOptions; +}; diff --git a/composition/src/v1/normalization/types.ts b/composition/src/v1/normalization/types.ts index 68d4e16671..09f9b0442c 100644 --- a/composition/src/v1/normalization/types.ts +++ b/composition/src/v1/normalization/types.ts @@ -1,16 +1,16 @@ import { - ArgumentData, - CompositeOutputData, - DirectiveDefinitionData, - FieldData, - InputObjectDefinitionData, - InputValueData, - NodeData, - SchemaData, + type ArgumentData, + type CompositeOutputData, + type DirectiveDefinitionData, + type FieldData, + type InputObjectDefinitionData, + type InputValueData, + type NodeData, + type SchemaData, } from '../../schema-building/types'; -import { ConstDirectiveNode, DocumentNode, InputValueDefinitionNode, ValueNode } from 'graphql'; -import { RequiredFieldConfiguration } from '../../router-configuration/types'; -import { SubgraphName } from '../../types/types'; +import { type ConstDirectiveNode, type DocumentNode, type InputValueDefinitionNode, type ValueNode } from 'graphql'; +import { type RequiredFieldConfiguration } from '../../router-configuration/types'; +import { type SubgraphName } from '../../types/types'; export type KeyFieldSetData = { documentNode: DocumentNode; diff --git a/composition/src/v1/normalization/utils.ts b/composition/src/v1/normalization/utils.ts index 838f19360e..3df6f85432 100644 --- a/composition/src/v1/normalization/utils.ts +++ b/composition/src/v1/normalization/utils.ts @@ -1,6 +1,6 @@ -import { BREAK, ConstDirectiveNode, DocumentNode, Kind, OperationTypeNode, print, visit } from 'graphql'; +import { BREAK, type ConstDirectiveNode, type DocumentNode, Kind, OperationTypeNode, print, visit } from 'graphql'; import { isKindAbstract, lexicographicallySortDocumentNode } from '../../ast/utils'; -import { NormalizationFactory } from './normalization-factory'; +import { type NormalizationFactory } from './normalization-factory'; import { abstractTypeInKeyFieldSetErrorMessage, argumentsInKeyFieldSetErrorMessage, @@ -17,8 +17,12 @@ import { unparsableFieldSetSelectionErrorMessage, } from '../../errors/errors'; import { BASE_SCALARS, EDFS_ARGS_REGEXP } from '../constants/constants'; -import { RequiredFieldConfiguration } from '../../router-configuration/types'; -import { CompositeOutputData, DirectiveDefinitionData, InputValueData } from '../../schema-building/types'; +import { type RequiredFieldConfiguration } from '../../router-configuration/types'; +import { + type CompositeOutputData, + type DirectiveDefinitionData, + type InputValueData, +} from '../../schema-building/types'; import { getTypeNodeNamedTypeName } from '../../schema-building/ast'; import { AUTHENTICATED_DEFINITION_DATA, @@ -90,7 +94,7 @@ import { TYPENAME, } from '../../utils/string-constants'; import { getValueOrDefault, kindToNodeType, numberToOrdinal } from '../../utils/utils'; -import { FieldSetData, KeyFieldSetData } from './types'; +import { type FieldSetData, type KeyFieldSetData } from './types'; export function newFieldSetData(): FieldSetData { return { @@ -230,7 +234,7 @@ export function validateKeyFieldSets( !externalFieldData.isUnconditionallyProvided ) { const conditionalData = nf.conditionalFieldDataByCoords.get(fieldCoords); - if (!conditionalData) { + if (!conditionalData && !nf.options.ignoreExternalKeys) { isUnconditionallyExternalKey = true; const edge = graphNode.headToTailEdges.get(fieldName); if (edge) { diff --git a/composition/src/v1/normalization/walkers.ts b/composition/src/v1/normalization/walkers.ts index 35d6b925da..da658bf78c 100644 --- a/composition/src/v1/normalization/walkers.ts +++ b/composition/src/v1/normalization/walkers.ts @@ -1,4 +1,4 @@ -import { ConstDirectiveNode, DocumentNode, Kind, visit } from 'graphql'; +import { type ConstDirectiveNode, type DocumentNode, Kind, visit } from 'graphql'; import { duplicateEnumValueDefinitionError, duplicateFieldDefinitionError, @@ -7,7 +7,7 @@ import { invalidOperationTypeDefinitionError, unexpectedParentKindForChildError, } from '../../errors/errors'; -import { NormalizationFactory } from './normalization-factory'; +import { type NormalizationFactory } from './normalization-factory'; import { BASE_SCALARS, V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME } from '../constants/constants'; import { upsertEntityData } from '../utils/utils'; import { formatDescription, isNodeInterfaceObject, isObjectLikeNodeEntity } from '../../ast/utils'; @@ -19,9 +19,9 @@ import { isTypeNameRootType, newPersistedDirectivesData, } from '../../schema-building/utils'; -import { ConfigureDescriptionData, InputValueData } from '../../schema-building/types'; +import { type ConfigureDescriptionData, type InputValueData } from '../../schema-building/types'; import { getMutableEnumValueNode, getTypeNodeNamedTypeName } from '../../schema-building/ast'; -import { GraphNode, RootNode } from '../../resolvability-graph/graph-nodes'; +import { type GraphNode, type RootNode } from '../../resolvability-graph/graph-nodes'; import { requiresDefinedOnNonEntityFieldWarning } from '../warnings/warnings'; import { ANY_SCALAR, @@ -32,10 +32,10 @@ import { REQUIRES, SERVICE_OBJECT, } from '../../utils/string-constants'; -import { RootTypeName } from '../../utils/types'; +import { type RootTypeName } from '../../utils/types'; import { getOrThrowError, getValueOrDefault, kindToNodeType } from '../../utils/utils'; -import { KeyFieldSetData } from './types'; -import { FieldName, TypeName } from '../../types/types'; +import { type KeyFieldSetData } from './types'; +import { type FieldName, type TypeName } from '../../types/types'; /* Walker to collect schema definition, directive definitions, and entities. * Directives are not validated upon immediate extract because all types must be recorded first. diff --git a/composition/src/v1/schema-building/type-merging.ts b/composition/src/v1/schema-building/type-merging.ts index ab1b5eaa69..701ec7dbf9 100644 --- a/composition/src/v1/schema-building/type-merging.ts +++ b/composition/src/v1/schema-building/type-merging.ts @@ -1,8 +1,8 @@ -import { Kind, ListTypeNode, NamedTypeNode, NonNullTypeNode, TypeNode } from 'graphql'; +import { Kind, type ListTypeNode, type NamedTypeNode, type NonNullTypeNode, type TypeNode } from 'graphql'; import { maximumTypeNestingExceededError } from '../../errors/errors'; -import { getMutableTypeNode, MutableIntermediateTypeNode } from '../../schema-building/ast'; +import { getMutableTypeNode, type MutableIntermediateTypeNode } from '../../schema-building/ast'; import { stringToNameNode } from '../../ast/utils'; -import { FieldData } from '../../schema-building/types'; +import { type FieldData } from '../../schema-building/types'; import { MAXIMUM_TYPE_NESTING } from '../../utils/integer-constants'; export enum DivergentType { diff --git a/composition/src/v1/utils/utils.ts b/composition/src/v1/utils/utils.ts index a69a213f00..92d90b45f0 100644 --- a/composition/src/v1/utils/utils.ts +++ b/composition/src/v1/utils/utils.ts @@ -35,7 +35,7 @@ import 'core-js/modules/esnext.set.is-subset-of.v2'; import 'core-js/modules/esnext.set.is-superset-of.v2'; import type { CompositeOutputNodeKind } from '../../ast/utils'; import { COMPOSITE_OUTPUT_NODE_KINDS } from '../constants/strings'; -import { SubgraphName, TypeName } from '../../types/types'; +import { type SubgraphName, type TypeName } from '../../types/types'; export function subtractSet(source: Set, target: Set) { for (const entry of source) { diff --git a/composition/src/v1/warnings/params.ts b/composition/src/v1/warnings/params.ts index d7820430b5..d9383dfd0f 100644 --- a/composition/src/v1/warnings/params.ts +++ b/composition/src/v1/warnings/params.ts @@ -1,4 +1,4 @@ -import { FieldName, SubgraphName, TypeName } from '../../types/types'; +import { type FieldName, type SubgraphName, type TypeName } from '../../types/types'; export type SingleSubgraphInputFieldOneOfWarningParams = { fieldName: FieldName; diff --git a/composition/src/v1/warnings/warnings.ts b/composition/src/v1/warnings/warnings.ts index 45570cb49c..9e8ee44cdc 100644 --- a/composition/src/v1/warnings/warnings.ts +++ b/composition/src/v1/warnings/warnings.ts @@ -1,6 +1,9 @@ import { Warning } from '../../warnings/types'; import { QUOTATION_JOIN } from '../../utils/string-constants'; -import { SingleFederatedInputFieldOneOfWarningParams, SingleSubgraphInputFieldOneOfWarningParams } from './params'; +import { + type SingleFederatedInputFieldOneOfWarningParams, + type SingleSubgraphInputFieldOneOfWarningParams, +} from './params'; export function invalidOverrideTargetSubgraphNameWarning( targetSubgraphName: string, diff --git a/composition/tests/utils/utils.ts b/composition/tests/utils/utils.ts index 8bf5f9229d..21e79c4f61 100644 --- a/composition/tests/utils/utils.ts +++ b/composition/tests/utils/utils.ts @@ -1,18 +1,23 @@ -import { DocumentNode, GraphQLSchema, lexicographicSortSchema, print } from 'graphql'; +import { type GraphQLSchema, lexicographicSortSchema } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; import { - ContractTagOptions, + type CompositionOptions, + type ContractTagOptions, federateSubgraphs, federateSubgraphsContract, federateSubgraphsWithContracts, - FederationFailure, - FederationResultWithContractsSuccess, - FederationSuccess, - NormalizationFailure, - NormalizationSuccess, + type FederationFailure, + type FederationResultWithContractsSuccess, + type FederationSuccess, + type NormalizationFailure, + type NormalizationSuccess, normalizeSubgraph, - Subgraph, - SupportedRouterCompatibilityVersion, + normalizeSubgraphFromString, + type NormalizeSubgraphFromStringParams, + parse, + type Subgraph, + type SubgraphName, + type SupportedRouterCompatibilityVersion, } from '../../src'; import { expect } from 'vitest'; @@ -24,11 +29,23 @@ export function schemaToSortedNormalizedString(schema: GraphQLSchema): string { return normalizeString(printSchemaWithDirectives(lexicographicSortSchema(schema))); } +export function normalizeSubgraphFromStringFailure(params: NormalizeSubgraphFromStringParams): NormalizationFailure { + const result = normalizeSubgraphFromString(params); + expect(result.success, 'normalizeSubgraph succeeded when expected to fail').toBe(false); + return result as NormalizationFailure; +} + export function normalizeSubgraphFailure( subgraph: Subgraph, version: SupportedRouterCompatibilityVersion, + options?: CompositionOptions, ): NormalizationFailure { - const result = normalizeSubgraph(subgraph.definitions, subgraph.name, undefined, version); + const result = normalizeSubgraph({ + document: subgraph.definitions, + options, + subgraphName: subgraph.name, + version, + }); expect(result.success, 'normalizeSubgraph succeeded when expected to fail').toBe(false); return result as NormalizationFailure; } @@ -36,8 +53,14 @@ export function normalizeSubgraphFailure( export function normalizeSubgraphSuccess( subgraph: Subgraph, version: SupportedRouterCompatibilityVersion, + options?: CompositionOptions, ): NormalizationSuccess { - const result = normalizeSubgraph(subgraph.definitions, subgraph.name, undefined, version); + const result = normalizeSubgraph({ + document: subgraph.definitions, + options, + subgraphName: subgraph.name, + version, + }); if (!result.success) { console.dir(result.errors, { depth: null }); } @@ -48,9 +71,9 @@ export function normalizeSubgraphSuccess( export function federateSubgraphsFailure( subgraphs: Array, version: SupportedRouterCompatibilityVersion, - disableResolvabilityValidation = false, + options?: CompositionOptions, ): FederationFailure { - const result = federateSubgraphs({ disableResolvabilityValidation, subgraphs, version }); + const result = federateSubgraphs({ options, subgraphs, version }); expect(result.success, 'federateSubgraphs succeeded when expected to fail').toBe(false); return result as FederationFailure; } @@ -58,9 +81,9 @@ export function federateSubgraphsFailure( export function federateSubgraphsSuccess( subgraphs: Array, version: SupportedRouterCompatibilityVersion, - disableResolvabilityValidation = false, + options?: CompositionOptions, ): FederationSuccess { - const result = federateSubgraphs({ disableResolvabilityValidation, subgraphs, version }); + const result = federateSubgraphs({ options, subgraphs, version }); if (!result.success) { for (const error of result.errors) { console.dir(error, { depth: null }); @@ -74,11 +97,11 @@ export function federateSubgraphsContractSuccess( subgraphs: Array, contractTagOptions: ContractTagOptions, version: SupportedRouterCompatibilityVersion, - disableResolvabilityValidation = false, + options?: CompositionOptions, ): FederationSuccess { const result = federateSubgraphsContract({ contractTagOptions, - disableResolvabilityValidation, + options, subgraphs, version, }); @@ -90,10 +113,10 @@ export function federateSubgraphsWithContractsSuccess( subgraphs: Array, tagOptionsByContractName: Map, version: SupportedRouterCompatibilityVersion, - disableResolvabilityValidation = false, + options?: CompositionOptions, ): FederationResultWithContractsSuccess { const result = federateSubgraphsWithContracts({ - disableResolvabilityValidation, + options, subgraphs, tagOptionsByContractName, version, @@ -101,3 +124,11 @@ export function federateSubgraphsWithContractsSuccess( expect(result.success, 'federateSubgraphsWithContracts failed when expected to succeed').toBe(true); return result as FederationResultWithContractsSuccess; } + +export function createSubgraph(name: SubgraphName, sdlString: string): Subgraph { + return { + definitions: parse(sdlString), + name, + url: '', + }; +} diff --git a/composition/tests/v1/contracts.test.ts b/composition/tests/v1/contracts.test.ts index c6e9de4e32..aada2e1740 100644 --- a/composition/tests/v1/contracts.test.ts +++ b/composition/tests/v1/contracts.test.ts @@ -1,4 +1,10 @@ -import { ContractTagOptions, FederationSuccess, parse, ROUTER_COMPATIBILITY_VERSION_ONE, Subgraph } from '../../src'; +import { + type ContractTagOptions, + type FederationSuccess, + parse, + ROUTER_COMPATIBILITY_VERSION_ONE, + type Subgraph, +} from '../../src'; import { describe, expect, test } from 'vitest'; import { INACCESSIBLE_DIRECTIVE, SCHEMA_QUERY_DEFINITION, TAG_DIRECTIVE } from './utils/utils'; import { diff --git a/composition/tests/v1/directives/authorization-directives.test.ts b/composition/tests/v1/directives/authorization-directives.test.ts index f050d0f160..ee81b670bc 100644 --- a/composition/tests/v1/directives/authorization-directives.test.ts +++ b/composition/tests/v1/directives/authorization-directives.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from 'vitest'; import { - AuthorizationData, - FieldAuthorizationData, + type AuthorizationData, + type FieldAuthorizationData, INTERFACE, MAX_OR_SCOPES, OBJECT, @@ -9,7 +9,7 @@ import { parse, QUERY, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, } from '../../../src'; import { AUTHENTICATED_DIRECTIVE, diff --git a/composition/tests/v1/directives/configure-description.test.ts b/composition/tests/v1/directives/configure-description.test.ts index df7cc79eec..3b90d2b9e2 100644 --- a/composition/tests/v1/directives/configure-description.test.ts +++ b/composition/tests/v1/directives/configure-description.test.ts @@ -17,7 +17,7 @@ import { ROUTER_COMPATIBILITY_VERSION_ONE, SCALAR, STRING_SCALAR, - Subgraph, + type Subgraph, UNION, } from '../../../src'; import { CONFIGURE_DESCRIPTION_DIRECTIVE, SCHEMA_QUERY_DEFINITION } from '../utils/utils'; diff --git a/composition/tests/v1/directives/connect-configure-resolver.test.ts b/composition/tests/v1/directives/connect-configure-resolver.test.ts index 6640166b14..4429836a7c 100644 --- a/composition/tests/v1/directives/connect-configure-resolver.test.ts +++ b/composition/tests/v1/directives/connect-configure-resolver.test.ts @@ -3,14 +3,11 @@ import { CONNECT_FIELD_RESOLVER, CONTEXT, invalidDirectiveError, - NormalizationFailure, - NormalizationSuccess, - normalizeSubgraph, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, undefinedRequiredArgumentsErrorMessage, } from '../../../src'; -import { parse, printSchema } from 'graphql'; +import { parse } from 'graphql'; import { normalizeString, normalizeSubgraphFailure, diff --git a/composition/tests/v1/directives/directives.test.ts b/composition/tests/v1/directives/directives.test.ts index b6a70c1a68..fd6edbf39d 100644 --- a/composition/tests/v1/directives/directives.test.ts +++ b/composition/tests/v1/directives/directives.test.ts @@ -1,18 +1,15 @@ import { DEPRECATED, DEPRECATED_DEFINITION, - DirectiveName, + type DirectiveName, FIRST_ORDINAL, INACCESSIBLE, INACCESSIBLE_DEFINITION, invalidArgumentValueErrorMessage, invalidDirectiveError, - NormalizationFailure, - NormalizationSuccess, - normalizeSubgraph, parse, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, TAG, TAG_DEFINITION, } from '../../../src'; @@ -21,39 +18,28 @@ import { INACCESSIBLE_DIRECTIVE, SCHEMA_QUERY_DEFINITION, TAG_DIRECTIVE } from ' import { federateSubgraphsSuccess, normalizeString, + normalizeSubgraphFailure, normalizeSubgraphSuccess, schemaToSortedNormalizedString, } from '../../utils/utils'; -import { DirectiveDefinitionNode } from 'graphql/language'; +import { type DirectiveDefinitionNode } from 'graphql'; describe('Directive tests', () => { describe('Normalization tests', () => { test('that an error is returned if an @inaccessible Enum Value is used as a directive argument', () => { - const result = normalizeSubgraph( - na.definitions, - na.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(na, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError('z', 'Query.dummy', FIRST_ORDINAL, [ invalidArgumentValueErrorMessage('B', '@z', 'enum', 'Enum!'), ]), ); - expect(result.warnings).toHaveLength(0); + expect(warnings).toHaveLength(0); }); test('that a string can be coerced into a List of String type', () => { - const result = normalizeSubgraph( - nb.definitions, - nb.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(schemaToSortedNormalizedString(result.schema)).toBe( + const { schema, warnings } = normalizeSubgraphSuccess(nb, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( SCHEMA_QUERY_DEFINITION + ` @@ -65,35 +51,23 @@ describe('Directive tests', () => { `, ), ); - expect(result.warnings).toHaveLength(0); + expect(warnings).toHaveLength(0); }); test('that an error is returned if null is provided to a non-nullable List type', () => { - const result = normalizeSubgraph( - nc.definitions, - nc.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(nc, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError('z', 'Query.dummy', FIRST_ORDINAL, [ invalidArgumentValueErrorMessage('null', '@z', 'list', '[[String]!]!'), ]), ); - expect(result.warnings).toHaveLength(0); + expect(warnings).toHaveLength(0); }); test('that a nullable List type can accept null', () => { - const result = normalizeSubgraph( - nd.definitions, - nd.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(schemaToSortedNormalizedString(result.schema)).toBe( + const { schema, warnings } = normalizeSubgraphSuccess(nd, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( SCHEMA_QUERY_DEFINITION + ` @@ -105,7 +79,7 @@ describe('Directive tests', () => { `, ), ); - expect(result.warnings).toHaveLength(0); + expect(warnings).toHaveLength(0); }); test('that an object can be coerced into a List of Input Object type', () => { @@ -130,31 +104,19 @@ describe('Directive tests', () => { }); test('that an error is returned if an @inaccessible Enum attempts to coerce into a List type', () => { - const result = normalizeSubgraph( - nf.definitions, - nf.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(nf, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError('z', 'Query.dummy', FIRST_ORDINAL, [ invalidArgumentValueErrorMessage('B', '@z', 'list', '[[Enum!]!]!'), ]), ); - expect(result.warnings).toHaveLength(0); + expect(warnings).toHaveLength(0); }); test('that an Enum Value can be coerced into a List of Enum type', () => { - const result = normalizeSubgraph( - ng.definitions, - ng.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(schemaToSortedNormalizedString(result.schema)).toBe( + const { schema, warnings } = normalizeSubgraphSuccess(ng, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( SCHEMA_QUERY_DEFINITION + INACCESSIBLE_DIRECTIVE + @@ -172,72 +134,51 @@ describe('Directive tests', () => { `, ), ); - expect(result.warnings).toHaveLength(0); + expect(warnings).toHaveLength(0); }); test('that an integer can be coerced into a List of Int type', () => { - const result = normalizeSubgraph( - nh.definitions, - nh.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(schemaToSortedNormalizedString(result.schema)).toBe( + const { schema, warnings } = normalizeSubgraphSuccess(nh, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( SCHEMA_QUERY_DEFINITION + ` directive @z(list: [[Int!]!]!) on FIELD_DEFINITION - type Query { dummy: String! @z(list: 1) } `, ), ); - expect(result.warnings).toHaveLength(0); + expect(warnings).toHaveLength(0); }); - test('that a float can be coerced into a List of Int type', () => { - const result = normalizeSubgraph( - ni.definitions, - ni.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(schemaToSortedNormalizedString(result.schema)).toBe( + test('that a float can be coerced into a List of Float type', () => { + const { schema, warnings } = normalizeSubgraphSuccess(ni, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( SCHEMA_QUERY_DEFINITION + ` directive @z(list: [[Float!]!]!) on FIELD_DEFINITION - type Query { dummy: String! @z(list: 1.1) } `, ), ); - expect(result.warnings).toHaveLength(0); + expect(warnings).toHaveLength(0); }); - test('that a custom scalar can be coerced into a List of Int type', () => { - const result = normalizeSubgraph( - nj.definitions, - nj.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(schemaToSortedNormalizedString(result.schema)).toBe( + test('that a custom scalar can be coerced into a List of that type', () => { + const { schema, warnings } = normalizeSubgraphSuccess(nj, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( SCHEMA_QUERY_DEFINITION + ` directive @z(list: [[Scalar!]!]!) on FIELD_DEFINITION - type Query { dummy: String! @z(list: {name: "test"}) } @@ -246,41 +187,41 @@ describe('Directive tests', () => { `, ), ); - expect(result.warnings).toHaveLength(0); + expect(warnings).toHaveLength(0); }); test('that a integer can be coerced into a Float', () => { - const result = normalizeSubgraph( - nk.definitions, - nk.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(schemaToSortedNormalizedString(result.schema)).toBe( + const { schema, warnings } = normalizeSubgraphSuccess(nk, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( SCHEMA_QUERY_DEFINITION + ` directive @z(float: Float!) on FIELD_DEFINITION - type Query { dummy: String! @z(float: 1) } `, ), ); - expect(result.warnings).toHaveLength(0); + expect(warnings).toHaveLength(0); }); test('that @specifiedBy is supported', () => { - const result = normalizeSubgraph( - subgraphA.definitions, - subgraphA.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); + const { schema, warnings } = normalizeSubgraphSuccess(subgraphA, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(schema)).toBe( + normalizeString( + SCHEMA_QUERY_DEFINITION + + ` + scalar JSON @specifiedBy(url: "https://wundergraph.com") + + type Query { + json: JSON! + } + `, + ), + ); + expect(warnings).toHaveLength(0); }); test('that directives declared after schema definitions and extensions are still valid #1', () => { diff --git a/composition/tests/v1/directives/external.test.ts b/composition/tests/v1/directives/external.test.ts index 01565791cb..a98efc485d 100644 --- a/composition/tests/v1/directives/external.test.ts +++ b/composition/tests/v1/directives/external.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from 'vitest'; import { allExternalFieldInstancesError, - ConfigurationData, + type ConfigurationData, EXTERNAL, externalEntityExtensionKeyFieldWarning, externalInterfaceFieldsError, @@ -14,8 +14,8 @@ import { parse, requiresDefinedOnNonEntityFieldWarning, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, - TypeName, + type Subgraph, + type TypeName, } from '../../../src'; import { EXTERNAL_DIRECTIVE, KEY_DIRECTIVE, OPENFED_FIELD_SET, SCHEMA_QUERY_DEFINITION } from '../utils/utils'; import { diff --git a/composition/tests/v1/directives/fieldset-directives.test.ts b/composition/tests/v1/directives/fieldset-directives.test.ts index a3c67ece22..4593cc3f4f 100644 --- a/composition/tests/v1/directives/fieldset-directives.test.ts +++ b/composition/tests/v1/directives/fieldset-directives.test.ts @@ -2,9 +2,11 @@ import { describe, expect, test } from 'vitest'; import { abstractTypeInKeyFieldSetErrorMessage, argumentsInKeyFieldSetErrorMessage, - ConfigurationData, + type ConfigurationData, duplicateFieldInFieldSetErrorMessage, - FieldName, + externalEntityExtensionKeyFieldWarning, + fieldAlreadyProvidedWarning, + type FieldName, FIRST_ORDINAL, INTERFACE, invalidDirectiveError, @@ -18,11 +20,6 @@ import { kindToNodeType, nonExternalConditionalFieldError, nonExternalConditionalFieldWarning, - NormalizationFailure, - NormalizationSuccess, - normalizeSubgraph, - normalizeSubgraphFromString, - NOT_APPLICABLE, numberToOrdinal, OBJECT, parse, @@ -33,9 +30,8 @@ import { ROUTER_COMPATIBILITY_VERSION_ONE, SCALAR, STRING_SCALAR, - Subgraph, - TypeName, - typeNameAlreadyProvidedErrorMessage, + type Subgraph, + type TypeName, undefinedFieldInFieldSetErrorMessage, unexpectedArgumentErrorMessage, UNION, @@ -56,313 +52,138 @@ import { normalizeSubgraphSuccess, schemaToSortedNormalizedString, } from '../../utils/utils'; -import { Kind } from 'graphql/index'; +import { Kind } from 'graphql'; describe('openfed_FieldSet tests', () => { describe('@key FieldSets', () => { test('that a complex key FieldSet is validated', () => { - const result = normalizeSubgraphFromString( - ` - scalar DateTime - - type Rating { - comments: [PostBody] - stars: Float! - } - - type PostBody { - author: String! - date: DateTime! - content: String! - } - - type Post { - title: String! - body: PostBody! - rating: Rating - } - - type Entity @key(fields: """ - posts { - rating { - stars, - comments { - content, - author - }, - }, - title, - body { - author, - date, - content, - }, - }, - name, - id, - """) { - id: String! - name: String! - posts: [Post] - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); + const { warnings } = normalizeSubgraphSuccess(naaaf, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(warnings).toHaveLength(0); }); test('that referencing undefined arguments in the FieldSet returns an error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id(undefinedArg: \\"hi\\")") { - id: ID! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaag, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ unexpectedArgumentErrorMessage(`id(undefinedArg: "hi")`, 'Entity.id', 'undefinedArg'), ]), ); + expect(warnings).toHaveLength(0); }); test('that referencing defined arguments in the FieldSet returns an error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id(undefinedArg: \\"hi\\")") { - id(undefinedArg: String!): ID! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaah, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ argumentsInKeyFieldSetErrorMessage(`id(undefinedArg: "hi")`, 'Entity.id'), ]), ); + expect(warnings).toHaveLength(0); }); test('that including a field that defines an argument in the FieldSet returns an error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id") { - id(undefinedArg: String!): ID! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaai, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [argumentsInKeyFieldSetErrorMessage(`id`, 'Entity.id')]), ); + expect(warnings).toHaveLength(0); }); test('that including an undefined field in the FieldSet returns an error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "name") { - id: ID! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaaj, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ undefinedFieldInFieldSetErrorMessage(`name`, 'Entity', 'name'), ]), ); + expect(warnings).toHaveLength(0); }); test('that including an interface in the FieldSet returns an error', () => { - const result = normalizeSubgraph( - subgraphL.definitions, - subgraphL.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(subgraphL, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ abstractTypeInKeyFieldSetErrorMessage(`id`, 'Entity.id', INTERFACE, INTERFACE), ]), ); + expect(warnings).toHaveLength(0); }); test('that including a Union in the FieldSet returns an error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id") { - id: Union! - } - - type ObjectOne { - name: String! - } - - type ObjectTwo { - name: String! - } - - union Union = ObjectOne | ObjectTwo - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaak, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ abstractTypeInKeyFieldSetErrorMessage(`id`, 'Entity.id', UNION, UNION), ]), ); + expect(warnings).toHaveLength(0); }); test('that an empty key returns a parse error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "") { - id: ID! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaal, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ unparsableFieldSetErrorMessage('', new Error(`Syntax Error: Expected Name, found "}".`)), ]), ); + expect(warnings).toHaveLength(0); }); test('that an empty selection set returns a parse error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id { }") { - id: Object! - } - - type Object { - name: String! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaam, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ unparsableFieldSetErrorMessage('id { }', new Error(`Syntax Error: Expected Name, found "}".`)), ]), ); + expect(warnings).toHaveLength(0); }); test('that a consecutive selection set returns a parse error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id { { name } }") { - id: Object! - } - - type Object { - name: String! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaan, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ unparsableFieldSetErrorMessage('id { { name } }', new Error(`Syntax Error: Expected Name, found "{".`)), ]), ); + expect(warnings).toHaveLength(0); }); test('that a selection set on a type without fields returns an error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id { something }") { - id: ID! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaao, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ invalidSelectionSetDefinitionErrorMessage('id { something }', ['Entity.id'], 'ID', SCALAR), ]), ); + expect(warnings).toHaveLength(0); }); test('that an object-like without a selection set returns an error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id") { - id: Object! - } - - type Object { - name: String! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaap, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ invalidSelectionSetErrorMessage('id', ['Entity.id'], OBJECT, OBJECT), ]), ); + expect(warnings).toHaveLength(0); }); test('that a nested object-like without a selection set returns an error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id { object { object } }") { - id: Object! - } - - type Object { - object: AnotherObject! - } - - type AnotherObject { - object: YetAnotherObject! - } - - type YetAnotherObject { - name: String! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaaq, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ invalidSelectionSetErrorMessage( 'id { object { object } }', @@ -372,55 +193,24 @@ describe('openfed_FieldSet tests', () => { ), ]), ); + expect(warnings).toHaveLength(0); }); test('that a duplicated field returns an error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id name age size id") { - id: ID! - name: String! - age: Int! - size: Float! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaar, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ duplicateFieldInFieldSetErrorMessage('id name age size id', 'Entity.id'), ]), ); + expect(warnings).toHaveLength(0); }); test('that a duplicated nested field returns an error', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id { object { object { name } object { name } } }") { - id: Object! - } - - type Object { - object: AnotherObject! - } - - type AnotherObject { - object: YetAnotherObject! - } - - type YetAnotherObject { - name: String! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaas, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ duplicateFieldInFieldSetErrorMessage( 'id { object { object { name } object { name } } }', @@ -428,11 +218,11 @@ describe('openfed_FieldSet tests', () => { ), ]), ); + expect(warnings).toHaveLength(0); }); test('that __typename is a valid key', () => { const { schema, warnings } = normalizeSubgraphSuccess(naaad, ROUTER_COMPATIBILITY_VERSION_ONE); - expect(warnings).toHaveLength(0); expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( KEY_DIRECTIVE + @@ -444,11 +234,11 @@ describe('openfed_FieldSet tests', () => { OPENFED_FIELD_SET, ), ); + expect(warnings).toHaveLength(0); }); test('that an error is returned if a selection is made on __typename', () => { const { errors, warnings } = normalizeSubgraphFailure(naaae, ROUTER_COMPATIBILITY_VERSION_ONE); - expect(warnings).toHaveLength(0); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', numberToOrdinal(1), [ @@ -460,6 +250,7 @@ describe('openfed_FieldSet tests', () => { ), ]), ); + expect(warnings).toHaveLength(0); }); test('that __typename keys create an entity link between subgraphs', () => { @@ -511,9 +302,11 @@ describe('openfed_FieldSet tests', () => { describe('@requires FieldSets', () => { test('that a warning is returned for an unconditionally provided @external field that is also required', () => { - const result = normalizeSubgraphSuccess(subgraphA, ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(true); - expect(result.configurationDataByTypeName).toStrictEqual( + const { configurationDataByTypeName, warnings } = normalizeSubgraphSuccess( + subgraphA, + ROUTER_COMPATIBILITY_VERSION_ONE, + ); + expect(configurationDataByTypeName).toStrictEqual( new Map([ [ 'Entity', @@ -531,26 +324,19 @@ describe('openfed_FieldSet tests', () => { ], ]), ); + expect(warnings).toHaveLength(2); + expect(warnings).toStrictEqual([ + externalEntityExtensionKeyFieldWarning('Entity', 'id', ['Entity.id'], subgraphA.name), + fieldAlreadyProvidedWarning('Entity.id', REQUIRES, 'Entity.name', subgraphA.name), + ]); }); test('that a @requires directive is ignored when declared on a non-entity parent', () => { - const result = normalizeSubgraphFromString( - ` - type Object { - id: ID! - name: Object! @requires(fields: "id") - } - `, - true, + const { configurationDataByTypeName, warnings } = normalizeSubgraphSuccess( + naaat, ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(result.warnings).toHaveLength(2); - expect(result.warnings[0]).toStrictEqual(requiresDefinedOnNonEntityFieldWarning(`Object.name`, NOT_APPLICABLE)); - expect(result.warnings[1]).toStrictEqual( - nonExternalConditionalFieldWarning('Object.name', NOT_APPLICABLE, 'Object.id', 'id', REQUIRES), - ); - expect(result.configurationDataByTypeName).toStrictEqual( + ); + expect(configurationDataByTypeName).toStrictEqual( new Map([ [ 'Object', @@ -562,22 +348,19 @@ describe('openfed_FieldSet tests', () => { ], ]), ); + expect(warnings).toHaveLength(2); + expect(warnings[0]).toStrictEqual(requiresDefinedOnNonEntityFieldWarning(`Object.name`, naaat.name)); + expect(warnings[1]).toStrictEqual( + nonExternalConditionalFieldWarning('Object.name', naaat.name, 'Object.id', 'id', REQUIRES), + ); }); test('that a @requires FieldSet supports an immediate inline fragment', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id") { - id: ID! - name: String! @external - age: Int! @requires(fields: "... on Entity { name }") - } - `, - true, + const { configurationDataByTypeName, warnings } = normalizeSubgraphSuccess( + naaau, ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(result.configurationDataByTypeName).toStrictEqual( + ); + expect(configurationDataByTypeName).toStrictEqual( new Map([ [ 'Entity', @@ -592,33 +375,26 @@ describe('openfed_FieldSet tests', () => { ], ]), ); + expect(warnings).toHaveLength(0); }); test('that a @requires FieldSet returns an error for an invalid inline fragment', () => { - const result = normalizeSubgraph( - subgraphO.definitions, - subgraphO.name, - undefined, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(subgraphO, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidProvidesOrRequiresDirectivesError(REQUIRES, [ ` On field "Entity.age":\n -` + invalidInlineFragmentTypeErrorMessage('... on I { name }', [], 'I', 'Entity'), ]), ); + expect(warnings).toHaveLength(0); }); test('that a @requires FieldSet supports multiple inline fragments', () => { - const result = normalizeSubgraph( - subgraphP.definitions, - subgraphP.name, - undefined, + const { configurationDataByTypeName, warnings } = normalizeSubgraphSuccess( + subgraphP, ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(result.configurationDataByTypeName).toStrictEqual( + ); + expect(configurationDataByTypeName).toStrictEqual( new Map([ [ 'Entity', @@ -649,31 +425,15 @@ describe('openfed_FieldSet tests', () => { ], ]), ); + expect(warnings).toHaveLength(0); }); test('that a @requires FieldSet supports an inline fragment with a valid type condition', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id") { - id: ID! - interface: I! @external - age: Int! @requires(fields: "interface { ... on Object { age } }") - } - - interface I { - name: String! - } - - type Object implements I { - name: String! - age: Int! - } - `, - true, + const { configurationDataByTypeName, warnings } = normalizeSubgraphSuccess( + naaav, ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(result.configurationDataByTypeName).toStrictEqual( + ); + expect(configurationDataByTypeName).toStrictEqual( new Map([ [ 'Entity', @@ -704,10 +464,11 @@ describe('openfed_FieldSet tests', () => { ], ]), ); + expect(warnings).toHaveLength(0); }); test('that a @requires FieldSet returns an error for an inline fragment with an invalid type condition on an interface', () => { - const { errors } = normalizeSubgraphFailure(subgraphQ, ROUTER_COMPATIBILITY_VERSION_ONE); + const { errors, warnings } = normalizeSubgraphFailure(subgraphQ, ROUTER_COMPATIBILITY_VERSION_ONE); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidProvidesOrRequiresDirectivesError(REQUIRES, [ @@ -721,27 +482,14 @@ describe('openfed_FieldSet tests', () => { ), ]), ); + expect(warnings).toHaveLength(0); }); test('that a @requires FieldSet supports an inline fragment with a valid type condition on a union', () => { - const { configurationDataByTypeName } = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id") { - id: ID! - union: U! @external - age: Int! @requires(fields: "union { ... on Object { age } }") - } - - union U = Object - - type Object { - name: String! - age: Int! - } - `, - true, + const { configurationDataByTypeName, warnings } = normalizeSubgraphSuccess( + naaaw, ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; + ); expect(configurationDataByTypeName).toStrictEqual( new Map([ [ @@ -765,61 +513,24 @@ describe('openfed_FieldSet tests', () => { ], ]), ); + expect(warnings).toHaveLength(0); }); test('that a @requires FieldSet returns an error if a union does not define a fragment', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id") { - id: ID! - union: U @external - name: String! @requires(fields: "union { name }") - } - - union U = Object - - type Object { - name: String! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaax, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidProvidesOrRequiresDirectivesError(REQUIRES, [ ` On field "Entity.name":\n -` + invalidSelectionOnUnionErrorMessage('union { name }', ['Entity.union'], 'U'), ]), ); + expect(warnings).toHaveLength(0); }); test('that a @requires FieldSet returns an error for an inline fragment with an invalid type condition on a union', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id") { - id: ID! - union: U! @external - age: Int! @requires(fields: "union { ... on AnotherObject { age } }") - } - - union U = Object - - type Object { - name: String! - age: Int! - } - - type AnotherObject { - name: String! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors, warnings } = normalizeSubgraphFailure(naaay, ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( invalidProvidesOrRequiresDirectivesError(REQUIRES, [ ` On field "Entity.age":\n -` + invalidInlineFragmentTypeConditionErrorMessage( @@ -831,26 +542,15 @@ describe('openfed_FieldSet tests', () => { ), ]), ); + expect(warnings).toHaveLength(0); }); test('that a @requires FieldSet allows undefined optional arguments', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id") { - id: ID! - object(arg: String): Object! @external - age: Int! @requires(fields: "object { name }") - } - - type Object { - name: String! - } - `, - true, + const { configurationDataByTypeName, warnings } = normalizeSubgraphSuccess( + naaaz, ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(result.configurationDataByTypeName).toStrictEqual( + ); + expect(configurationDataByTypeName).toStrictEqual( new Map([ [ 'Entity', @@ -873,26 +573,15 @@ describe('openfed_FieldSet tests', () => { ], ]), ); + expect(warnings).toHaveLength(0); }); test('that a @requires FieldSet allows defined optional arguments', () => { - const result = normalizeSubgraphFromString( - ` - type Entity @key(fields: "id") { - id: ID! - object(arg: String): Object! @external - age: Int! @requires(fields: "object(arg: \\"string\\") { name }") - } - - type Object { - name: String! - } - `, - true, + const { configurationDataByTypeName, warnings } = normalizeSubgraphSuccess( + nbaaa, ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - expect(result.configurationDataByTypeName).toStrictEqual( + ); + expect(configurationDataByTypeName).toStrictEqual( new Map([ [ 'Entity', @@ -915,10 +604,11 @@ describe('openfed_FieldSet tests', () => { ], ]), ); + expect(warnings).toHaveLength(0); }); test('that a @requires FieldSet allows inline fragments #1', () => { - const { configurationDataByTypeName, schema } = normalizeSubgraphSuccess( + const { configurationDataByTypeName, schema, warnings } = normalizeSubgraphSuccess( subgraphH, ROUTER_COMPATIBILITY_VERSION_ONE, ); @@ -1042,6 +732,7 @@ describe('openfed_FieldSet tests', () => { ], ]), ); + expect(warnings).toHaveLength(0); }); test('that a warning is returned if a provided __typename is required in a V1 subgraph', () => { @@ -1540,7 +1231,7 @@ describe('openfed_FieldSet tests', () => { describe('Router configuration tests', () => { test('that a field that forms part of a @requires field set cannot be used as an implicit key', () => { - const { subgraphConfigBySubgraphName } = federateSubgraphsSuccess( + const { subgraphConfigBySubgraphName, warnings } = federateSubgraphsSuccess( [subgraphD, subgraphE], ROUTER_COMPATIBILITY_VERSION_ONE, ); @@ -1645,6 +1336,7 @@ describe('openfed_FieldSet tests', () => { ], ]), ); + expect(warnings).toHaveLength(0); }); test('that non-external v1 fields that form part of a @requires field set are treated as non-conditional but return a warning', () => { @@ -2066,7 +1758,7 @@ const subgraphO: Subgraph = { definitions: parse(` type Entity @key(fields: "id") { id: ID! - name: I! @external + name: I! age: Int! @requires(fields: "... on I { name }") } @@ -2106,7 +1798,7 @@ const subgraphQ: Subgraph = { definitions: parse(` type Entity @key(fields: "id") { id: ID! - interface: I! @external + interface: I! age: Int! @requires(fields: "interface { ... on Object { age } }") } @@ -2178,6 +1870,370 @@ const naaae: Subgraph = { `), }; +const naaaf: Subgraph = { + name: 'naaaf', + url: '', + definitions: parse(` + scalar DateTime + + type Rating { + comments: [PostBody] + stars: Float! + } + + type PostBody { + author: String! + date: DateTime! + content: String! + } + + type Post { + title: String! + body: PostBody! + rating: Rating + } + + type Entity @key(fields: """ + posts { + rating { + stars, + comments { + content, + author + }, + }, + title, + body { + author, + date, + content, + }, + }, + name, + id, + """) { + id: String! + name: String! + posts: [Post] + } + `), +}; + +const naaag: Subgraph = { + name: 'naaag', + url: '', + definitions: parse(` + type Entity @key(fields: "id(undefinedArg: \\"hi\\")") { + id: ID! + } + `), +}; + +const naaah: Subgraph = { + name: 'naaah', + url: '', + definitions: parse(` + type Entity @key(fields: "id(undefinedArg: \\"hi\\")") { + id(undefinedArg: String!): ID! + } + `), +}; + +const naaai: Subgraph = { + name: 'naaai', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id(undefinedArg: String!): ID! + } + `), +}; + +const naaaj: Subgraph = { + name: 'naaaj', + url: '', + definitions: parse(` + type Entity @key(fields: "name") { + id: ID! + } + `), +}; + +const naaak: Subgraph = { + name: 'naaak', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: Union! + } + + type ObjectOne { + name: String! + } + + type ObjectTwo { + name: String! + } + + union Union = ObjectOne | ObjectTwo + `), +}; + +const naaal: Subgraph = { + name: 'naaal', + url: '', + definitions: parse(` + type Entity @key(fields: "") { + id: ID! + } + `), +}; + +const naaam: Subgraph = { + name: 'naaam', + url: '', + definitions: parse(` + type Entity @key(fields: "id { }") { + id: Object! + } + + type Object { + name: String! + } + `), +}; + +const naaan: Subgraph = { + name: 'naaan', + url: '', + definitions: parse(` + type Entity @key(fields: "id { { name } }") { + id: Object! + } + + type Object { + name: String! + } + `), +}; + +const naaao: Subgraph = { + name: 'naaao', + url: '', + definitions: parse(` + type Entity @key(fields: "id { something }") { + id: ID! + } + `), +}; + +const naaap: Subgraph = { + name: 'naaap', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: Object! + } + + type Object { + name: String! + } + `), +}; + +const naaaq: Subgraph = { + name: 'naaaq', + url: '', + definitions: parse(` + type Entity @key(fields: "id { object { object } }") { + id: Object! + } + + type Object { + object: AnotherObject! + } + + type AnotherObject { + object: YetAnotherObject! + } + + type YetAnotherObject { + name: String! + } + `), +}; + +const naaar: Subgraph = { + name: 'naaar', + url: '', + definitions: parse(` + type Entity @key(fields: "id name age size id") { + id: ID! + name: String! + age: Int! + size: Float! + } + `), +}; + +const naaas: Subgraph = { + name: 'naaas', + url: '', + definitions: parse(` + type Entity @key(fields: "id { object { object { name } object { name } } }") { + id: Object! + } + + type Object { + object: AnotherObject! + } + + type AnotherObject { + object: YetAnotherObject! + } + + type YetAnotherObject { + name: String! + } + `), +}; + +const naaat: Subgraph = { + name: 'naaat', + url: '', + definitions: parse(` + type Object { + id: ID! + name: Object! @requires(fields: "id") + } + `), +}; + +const naaau: Subgraph = { + name: 'naaau', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID! + name: String! @external + age: Int! @requires(fields: "... on Entity { name }") + } + `), +}; + +const naaav: Subgraph = { + name: 'naaav', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID! + interface: I! @external + age: Int! @requires(fields: "interface { ... on Object { age } }") + } + + interface I { + name: String! + } + + type Object implements I { + name: String! + age: Int! + } + `), +}; + +const naaaw: Subgraph = { + name: 'naaaw', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID! + union: U! @external + age: Int! @requires(fields: "union { ... on Object { age } }") + } + + union U = Object + + type Object { + name: String! + age: Int! + } + `), +}; + +const naaax: Subgraph = { + name: 'naaax', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID! + union: U @external + name: String! @requires(fields: "union { name }") + } + + union U = Object + + type Object { + name: String! + } + `), +}; + +const naaay: Subgraph = { + name: 'naaay', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID! + union: U! @external + age: Int! @requires(fields: "union { ... on AnotherObject { age } }") + } + + union U = Object + + type Object { + name: String! + age: Int! + } + + type AnotherObject { + name: String! + } + `), +}; + +const naaaz: Subgraph = { + name: 'naaaz', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID! + object(arg: String): Object! @external + age: Int! @requires(fields: "object { name }") + } + + type Object { + name: String! + } + `), +}; + +const nbaaa: Subgraph = { + name: 'nbaaa', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID! + object(arg: String): Object! @external + age: Int! @requires(fields: "object(arg: \\"string\\") { name }") + } + + type Object { + name: String! + } + `), +}; + const saaaa: Subgraph = { name: 'saaaa', url: '', diff --git a/composition/tests/v1/directives/inaccessible.test.ts b/composition/tests/v1/directives/inaccessible.test.ts index c3f624ab46..2c0f24123a 100644 --- a/composition/tests/v1/directives/inaccessible.test.ts +++ b/composition/tests/v1/directives/inaccessible.test.ts @@ -2,19 +2,19 @@ import { describe, expect, test } from 'vitest'; import { allChildDefinitionsAreInaccessibleError, FIELD, - FieldData, - ImplementationErrors, + type FieldData, + type ImplementationErrors, inaccessibleRequiredInputValueError, - InputValueData, + type InputValueData, INTERFACE, - InvalidFieldImplementation, + type InvalidFieldImplementation, invalidFieldShareabilityError, invalidInterfaceImplementationError, OBJECT, - ObjectDefinitionData, + type ObjectDefinitionData, parse, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, UNION, } from '../../../src'; import { INACCESSIBLE_DIRECTIVE, SCHEMA_QUERY_DEFINITION } from '../utils/utils'; diff --git a/composition/tests/v1/directives/interface-object.test.ts b/composition/tests/v1/directives/interface-object.test.ts index b6019e1b47..964c54e55b 100644 --- a/composition/tests/v1/directives/interface-object.test.ts +++ b/composition/tests/v1/directives/interface-object.test.ts @@ -1,24 +1,24 @@ import { describe, expect, test } from 'vitest'; import { - ConfigurationData, - EntityInterfaceFederationData, - EntityInterfaceSubgraphData, - FieldData, - FieldName, - ImplementationErrors, + type ConfigurationData, + type EntityInterfaceFederationData, + type EntityInterfaceSubgraphData, + type FieldData, + type FieldName, + type ImplementationErrors, INTERFACE, - InvalidEntityInterface, - InvalidFieldImplementation, + type InvalidEntityInterface, + type InvalidFieldImplementation, invalidFieldShareabilityError, invalidInterfaceImplementationError, invalidInterfaceObjectImplementationDefinitionsError, - ObjectDefinitionData, + type ObjectDefinitionData, parse, ROUTER_COMPATIBILITY_VERSION_ONE, - SimpleFieldData, - Subgraph, - SubgraphName, - TypeName, + type SimpleFieldData, + type Subgraph, + type SubgraphName, + type TypeName, undefinedEntityInterfaceImplementationsError, } from '../../../src'; import { diff --git a/composition/tests/v1/directives/one-of.test.ts b/composition/tests/v1/directives/one-of.test.ts index 3366c17b41..d3cb5cf7fd 100644 --- a/composition/tests/v1/directives/one-of.test.ts +++ b/composition/tests/v1/directives/one-of.test.ts @@ -6,7 +6,7 @@ import { ROUTER_COMPATIBILITY_VERSION_ONE, singleFederatedInputFieldOneOfWarning, singleSubgraphInputFieldOneOfWarning, - Subgraph, + type Subgraph, } from '../../../src'; import { federateSubgraphsFailure, diff --git a/composition/tests/v1/directives/override.test.ts b/composition/tests/v1/directives/override.test.ts index 74441526d7..bdf175d8af 100644 --- a/composition/tests/v1/directives/override.test.ts +++ b/composition/tests/v1/directives/override.test.ts @@ -1,24 +1,24 @@ import { describe, expect, test } from 'vitest'; import { ARGUMENT_DEFINITION_UPPER, - BatchNormalizationSuccess, - ConfigurationData, + type BatchNormalizationSuccess, + type ConfigurationData, duplicateOverriddenFieldErrorMessage, duplicateOverriddenFieldsError, equivalentSourceAndTargetOverrideErrorMessage, - FieldData, + type FieldData, FIRST_ORDINAL, invalidDirectiveError, invalidDirectiveLocationErrorMessage, invalidFieldShareabilityError, invalidOverrideTargetSubgraphNameWarning, - ObjectDefinitionData, + type ObjectDefinitionData, OVERRIDE, parse, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, subgraphValidationError, - TypeName, + type TypeName, } from '../../../src'; import { SCHEMA_QUERY_DEFINITION } from '../utils/utils'; import { batchNormalize } from '../../../src/v1/normalization/normalization-factory'; @@ -43,7 +43,7 @@ describe('@override directive tests', () => { }); test('that @override produces the correct engine configuration', () => { - const result = batchNormalize([subgraphA, subgraphE, subgraphF]) as BatchNormalizationSuccess; + const result = batchNormalize({ subgraphs: [subgraphA, subgraphE, subgraphF] }) as BatchNormalizationSuccess; expect(result.success).toBe(true); const a = result.internalSubgraphBySubgraphName.get('subgraph-a'); expect(a).toBeDefined(); diff --git a/composition/tests/v1/directives/provides.test.ts b/composition/tests/v1/directives/provides.test.ts index 2f9951cc83..e8f1939d60 100644 --- a/composition/tests/v1/directives/provides.test.ts +++ b/composition/tests/v1/directives/provides.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from 'vitest'; import { - ConditionalFieldData, - ConfigurationData, + type ConditionalFieldData, + type ConfigurationData, externalEntityExtensionKeyFieldWarning, fieldAlreadyProvidedErrorMessage, fieldAlreadyProvidedWarning, @@ -17,9 +17,9 @@ import { parse, PROVIDES, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, subgraphValidationError, - TypeName, + type TypeName, typeNameAlreadyProvidedErrorMessage, UNION, } from '../../../src'; diff --git a/composition/tests/v1/directives/require-fetch-reasons.test.ts b/composition/tests/v1/directives/require-fetch-reasons.test.ts index 41680382d8..9e14771264 100644 --- a/composition/tests/v1/directives/require-fetch-reasons.test.ts +++ b/composition/tests/v1/directives/require-fetch-reasons.test.ts @@ -1,13 +1,13 @@ import { describe, expect, test } from 'vitest'; import { - ConfigurationData, - FieldName, + type ConfigurationData, + type FieldName, INTERFACE, parse, QUERY, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, - TypeName, + type Subgraph, + type TypeName, } from '../../../src'; import { federateSubgraphsSuccess, normalizeString, schemaToSortedNormalizedString } from '../../utils/utils'; import { REQUEST_FETCH_REASONS_DIRECTIVE, SCHEMA_QUERY_DEFINITION } from '../utils/utils'; diff --git a/composition/tests/v1/directives/semantic-non-null.test.ts b/composition/tests/v1/directives/semantic-non-null.test.ts index 28c43c057a..51e0d65bba 100644 --- a/composition/tests/v1/directives/semantic-non-null.test.ts +++ b/composition/tests/v1/directives/semantic-non-null.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; import { - FieldData, + type FieldData, ID_SCALAR, invalidDirectiveError, parse, @@ -10,8 +10,8 @@ import { semanticNonNullInconsistentLevelsError, semanticNonNullLevelsIndexOutOfBoundsErrorMessage, semanticNonNullLevelsNonNullErrorMessage, - Subgraph, - SubgraphName, + type Subgraph, + type SubgraphName, } from '../../../src'; import { federateSubgraphsFailure, diff --git a/composition/tests/v1/directives/shareable.test.ts b/composition/tests/v1/directives/shareable.test.ts index 5e2abbb4fb..2d748a9c94 100644 --- a/composition/tests/v1/directives/shareable.test.ts +++ b/composition/tests/v1/directives/shareable.test.ts @@ -1,11 +1,11 @@ import { describe, expect, test } from 'vitest'; import { - FieldData, + type FieldData, invalidFieldShareabilityError, - ObjectDefinitionData, + type ObjectDefinitionData, parse, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, } from '../../../src'; import { KEY_DIRECTIVE, OPENFED_FIELD_SET, SCHEMA_QUERY_DEFINITION, SHAREABLE_DIRECTIVE } from '../utils/utils'; import { diff --git a/composition/tests/v1/directives/subscription-filter.test.ts b/composition/tests/v1/directives/subscription-filter.test.ts index bb2f512636..6c6084f879 100644 --- a/composition/tests/v1/directives/subscription-filter.test.ts +++ b/composition/tests/v1/directives/subscription-filter.test.ts @@ -14,12 +14,12 @@ import { LIST, nonKeyComposingObjectTypeNamesEventDrivenErrorMessage, nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage, - NormalizationSuccess, + type NormalizationSuccess, NULL, OBJECT, parse, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, subgraphValidationError, SUBSCRIPTION, SUBSCRIPTION_FILTER, diff --git a/composition/tests/v1/directives/v2-directives.test.ts b/composition/tests/v1/directives/v2-directives.test.ts index 4a923fa992..cb463a3773 100644 --- a/composition/tests/v1/directives/v2-directives.test.ts +++ b/composition/tests/v1/directives/v2-directives.test.ts @@ -1,11 +1,11 @@ import { describe, expect, test } from 'vitest'; import { - FieldData, + type FieldData, invalidFieldShareabilityError, - ObjectDefinitionData, + type ObjectDefinitionData, parse, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, } from '../../../src'; import { SCHEMA_QUERY_DEFINITION } from '../utils/utils'; import { diff --git a/composition/tests/v1/entities.test.ts b/composition/tests/v1/entities.test.ts index 361d0d476d..9c7ff0f77f 100644 --- a/composition/tests/v1/entities.test.ts +++ b/composition/tests/v1/entities.test.ts @@ -1,17 +1,17 @@ import { - ConfigurationData, + type ConfigurationData, duplicateDirectiveArgumentDefinitionsErrorMessage, - FieldData, + type FieldData, FIELDS, FIRST_ORDINAL, invalidDirectiveError, invalidFieldShareabilityError, KEY, - ObjectDefinitionData, + type ObjectDefinitionData, parse, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, - TypeName, + type Subgraph, + type TypeName, undefinedRequiredArgumentsErrorMessage, unexpectedDirectiveArgumentErrorMessage, } from '../../src'; diff --git a/composition/tests/v1/entity-interface.test.ts b/composition/tests/v1/entity-interface.test.ts index 9594d885c5..8ceabea2f3 100644 --- a/composition/tests/v1/entity-interface.test.ts +++ b/composition/tests/v1/entity-interface.test.ts @@ -1,18 +1,18 @@ import { - ConfigurationData, - EntityInterfaceFederationData, - EntityInterfaceSubgraphData, + type ConfigurationData, + type EntityInterfaceFederationData, + type EntityInterfaceSubgraphData, incompatibleParentTypeMergeError, INTERFACE, - InterfaceDefinitionData, - InvalidEntityInterface, + type InterfaceDefinitionData, + type InvalidEntityInterface, OBJECT, - ObjectDefinitionData, + type ObjectDefinitionData, ROUTER_COMPATIBILITY_VERSION_ONE, - SimpleFieldData, - Subgraph, - SubgraphName, - TypeName, + type SimpleFieldData, + type Subgraph, + type SubgraphName, + type TypeName, undefinedEntityInterfaceImplementationsError, } from '../../src'; import { describe, expect, test } from 'vitest'; diff --git a/composition/tests/v1/events.test.ts b/composition/tests/v1/events.test.ts index 23f7371a68..745a99890b 100644 --- a/composition/tests/v1/events.test.ts +++ b/composition/tests/v1/events.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from 'vitest'; import { allExternalFieldInstancesError, - ConfigurationData, + type ConfigurationData, DEFAULT_EDFS_PROVIDER_ID, duplicateDirectiveArgumentDefinitionsErrorMessage, EDFS_NATS_PUBLISH, @@ -18,7 +18,7 @@ import { invalidKeyFieldSetsEventDrivenErrorMessage, invalidNatsStreamConfigurationDefinitionErrorMessage, invalidNatsStreamInputFieldsErrorMessage, - InvalidRootTypeFieldEventsDirectiveData, + type InvalidRootTypeFieldEventsDirectiveData, invalidRootTypeFieldEventsDirectivesErrorMessage, invalidRootTypeFieldResponseTypesEventDrivenErrorMessage, noBaseDefinitionForExtensionError, @@ -31,10 +31,10 @@ import { PROVIDER_TYPE_NATS, PROVIDER_TYPE_REDIS, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, subgraphValidationError, SUBJECTS, - TypeName, + type TypeName, undefinedEventSubjectsArgumentErrorMessage, undefinedRequiredArgumentsErrorMessage, unexpectedDirectiveArgumentErrorMessage, diff --git a/composition/tests/v1/federation-factory.test.ts b/composition/tests/v1/federation-factory.test.ts index 58e0165723..8c61d68f64 100644 --- a/composition/tests/v1/federation-factory.test.ts +++ b/composition/tests/v1/federation-factory.test.ts @@ -1,21 +1,21 @@ import { incompatibleParentTypeMergeError, INPUT_OBJECT, - InputObjectDefinitionData, + type InputObjectDefinitionData, invalidSubgraphNamesError, KEY, noBaseDefinitionForExtensionError, noQueryRootTypeError, OBJECT, - ObjectDefinitionData, + type ObjectDefinitionData, parse, ROUTER_COMPATIBILITY_VERSION_ONE, SCALAR, - ScalarDefinitionData, + type ScalarDefinitionData, SHAREABLE, stringToNamedTypeNode, - Subgraph, - SubgraphName, + type Subgraph, + type SubgraphName, } from '../../src'; import { describe, expect, test } from 'vitest'; import { diff --git a/composition/tests/v1/normalization.test.ts b/composition/tests/v1/normalization.test.ts index 166cca5370..ebec0d6f1a 100644 --- a/composition/tests/v1/normalization.test.ts +++ b/composition/tests/v1/normalization.test.ts @@ -5,14 +5,14 @@ import { ENUM, ENUM_UPPER, EXTERNAL, - FieldData, + type FieldData, FIELDS, FIRST_ORDINAL, INACCESSIBLE, INPUT, INPUT_OBJECT_UPPER, - InputObjectDefinitionData, - InputValueData, + type InputObjectDefinitionData, + type InputValueData, INTERFACE, INTERFACE_UPPER, invalidDirectiveError, @@ -21,13 +21,10 @@ import { invalidSelectionSetErrorMessage, KEY, NAME, - NormalizationFailure, - NormalizationSuccess, - normalizeSubgraphFromString, numberToOrdinal, OBJECT, OBJECT_UPPER, - ObjectDefinitionData, + type ObjectDefinitionData, parse, PROVIDES, QUERY, @@ -36,7 +33,7 @@ import { SCALAR, SHAREABLE, stringToNamedTypeNode, - Subgraph, + type Subgraph, TAG, undefinedDirectiveError, undefinedFieldInFieldSetErrorMessage, @@ -51,6 +48,7 @@ import { join } from 'node:path'; import { describe, expect, test } from 'vitest'; import { AUTHENTICATED_DIRECTIVE, + EXTERNAL_DIRECTIVE, KEY_DIRECTIVE, OPENFED_FIELD_SET, OPENFED_SCOPE, @@ -59,36 +57,47 @@ import { SHAREABLE_DIRECTIVE, TAG_DIRECTIVE, } from './utils/utils'; -import { normalizeString, normalizeSubgraphSuccess, schemaToSortedNormalizedString } from '../utils/utils'; +import { + createSubgraph, + normalizeString, + normalizeSubgraphFailure, + normalizeSubgraphFromStringFailure, + normalizeSubgraphSuccess, + schemaToSortedNormalizedString, +} from '../utils/utils'; import { Kind, OperationTypeNode } from 'graphql'; import { printTypeNode } from '@graphql-tools/merge'; describe('Normalization tests', () => { - test('that an unparsable graph returns an error', () => { - const { errors } = normalizeSubgraphFromString('', true, ROUTER_COMPATIBILITY_VERSION_ONE) as NormalizationFailure; + test('that an error is returned for an unparsable subgraph', () => { + const { errors } = normalizeSubgraphFromStringFailure({ sdlString: '' }); expect(errors).toHaveLength(1); expect(errors[0].message).toContain( `The subgraph has syntax errors and could not be parsed.\n` + ` The reason provided was: Syntax Error`, ); }); - test('that an undefined type that is referenced in the schema returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if an undefined type is referenced in the subgraph', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Example { field: Unknown } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual(undefinedTypeError('Unknown')); }); test('that the base scalars are identified', () => { - const { schema } = normalizeSubgraphFromString( - ` + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` type Example { boolean: Boolean! float: Float @@ -97,9 +106,9 @@ describe('Normalization tests', () => { string: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; + ); expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( ` @@ -115,22 +124,26 @@ describe('Normalization tests', () => { }); test('that undefined directives return an error', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Example { string: String @UnknownDirective } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual(undefinedDirectiveError('UnknownDirective', 'Example.string')); }); test('that duplicate directive definitions return an error', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` directive @KnownDirective on FIELD_DEFINITION directive @KnownDirective on FIELD_DEFINITION @@ -138,16 +151,18 @@ describe('Normalization tests', () => { string: String @KnownDirective } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual(duplicateDirectiveDefinitionError('KnownDirective')); }); test('that extending an entity with its key field is valid', () => { - const { schema } = normalizeSubgraphFromString( - ` + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "id") { name: String! } @@ -156,9 +171,9 @@ describe('Normalization tests', () => { id: ID! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; + ); expect(schemaToSortedNormalizedString(schema!)).toBe( normalizeString( KEY_DIRECTIVE + @@ -174,8 +189,10 @@ describe('Normalization tests', () => { }); test('that extending an object with the key directive is valid', () => { - const { schema } = normalizeSubgraphFromString( - ` + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` type Entity { id: ID! } @@ -184,9 +201,9 @@ describe('Normalization tests', () => { name: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; + ); expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( KEY_DIRECTIVE + @@ -202,15 +219,17 @@ describe('Normalization tests', () => { }); test('that an undefined key field returns an error #1', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "unknown") { name: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ @@ -220,8 +239,10 @@ describe('Normalization tests', () => { }); test('that an undefined key field returns an error #2', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Entity { id: ID! } @@ -230,9 +251,9 @@ describe('Normalization tests', () => { name: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ @@ -242,15 +263,17 @@ describe('Normalization tests', () => { }); test('that an undefined key field returns an error #3', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` extend type Entity @key(fields: "unknown") { name: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', FIRST_ORDINAL, [ @@ -260,8 +283,10 @@ describe('Normalization tests', () => { }); test('that extending an entity with the same key directive does not duplicate the directive', () => { - const { schema } = normalizeSubgraphFromString( - ` + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "id") { id: ID! } @@ -270,9 +295,9 @@ describe('Normalization tests', () => { name: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; + ); expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( KEY_DIRECTIVE + @@ -288,8 +313,10 @@ describe('Normalization tests', () => { }); test('that enums are normalized', () => { - const { schema } = normalizeSubgraphFromString( - ` + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` directive @CustomDirectiveOne on ENUM directive @CustomDirectiveTwo on ENUM_VALUE directive @CustomDirectiveThree on ENUM @@ -306,9 +333,9 @@ describe('Normalization tests', () => { E @CustomDirectiveFour } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; + ); expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( ` @@ -329,8 +356,10 @@ describe('Normalization tests', () => { }); test('that extending an enum with a value that already exists returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` enum Alphabet { A B @@ -342,16 +371,18 @@ describe('Normalization tests', () => { D } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual(duplicateEnumValueDefinitionError('Alphabet', 'D')); }); test('that redefining an enum returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` enum Alphabet { A } @@ -360,16 +391,18 @@ describe('Normalization tests', () => { B } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual(duplicateTypeDefinitionError(ENUM, 'Alphabet')); }); test('that interfaces are normalized', () => { - const { schema } = normalizeSubgraphFromString( - ` + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` directive @CustomDirectiveOne on INTERFACE directive @CustomDirectiveTwo on FIELD_DEFINITION directive @CustomDirectiveThree on INTERFACE @@ -384,9 +417,9 @@ describe('Normalization tests', () => { height: Int @CustomDirectiveFour } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; + ); expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( ` @@ -405,8 +438,10 @@ describe('Normalization tests', () => { }); test('that Input Objects are normalized', () => { - const { schema } = normalizeSubgraphFromString( - ` + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` directive @CustomDirectiveOne on INPUT_OBJECT directive @CustomDirectiveTwo on INPUT_FIELD_DEFINITION directive @CustomDirectiveThree on INPUT_OBJECT @@ -421,9 +456,9 @@ describe('Normalization tests', () => { height: Int @CustomDirectiveFour } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; + ); expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( ` @@ -442,8 +477,10 @@ describe('Normalization tests', () => { }); test('that object types are normalized successfully', () => { - const { schema } = normalizeSubgraphFromString( - ` + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` type Object { name: String! } @@ -452,9 +489,9 @@ describe('Normalization tests', () => { age: Int! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; + ); expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( ` @@ -467,14 +504,12 @@ describe('Normalization tests', () => { }); test('that an object with no fields returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` - type Object { - } + const { errors } = normalizeSubgraphFromStringFailure({ + sdlString: ` + type Object { + } `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + }); expect(errors).toHaveLength(1); expect(errors[0].message).toBe( `The subgraph has syntax errors and could not be parsed.\n` + @@ -483,8 +518,10 @@ describe('Normalization tests', () => { }); test('that scalars are normalized', () => { - const result = normalizeSubgraphFromString( - ` + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` directive @CustomDirectiveOne on SCALAR directive @CustomDirectiveTwo on SCALAR @@ -492,12 +529,10 @@ describe('Normalization tests', () => { extend scalar JSON @CustomDirectiveTwo `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - const subgraphString = result.subgraphString; - expect(normalizeString(subgraphString!)).toBe( + ); + expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( ` directive @CustomDirectiveOne on SCALAR @@ -509,8 +544,10 @@ describe('Normalization tests', () => { }); test('that unions are normalized', () => { - const result = normalizeSubgraphFromString( - ` + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` directive @deprecated(reason: String = "No longer supported") on ARGUMENT_DEFINITION | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @external on FIELD_DEFINITION | OBJECT directive @key(fields: openfed__FieldSet!, resolvable: Boolean = true) repeatable on INTERFACE | OBJECT @@ -536,28 +573,26 @@ describe('Normalization tests', () => { age: Int } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; - expect(result.success).toBe(true); - const subgraphString = result.subgraphString; - expect(normalizeString(subgraphString!)).toBe( + ); + expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( ` directive @CustomDirectiveOne on UNION directive @CustomDirectiveTwo on UNION - union Cats @CustomDirectiveOne @CustomDirectiveTwo = Treacle | Muffin | Pepper + union Cats @CustomDirectiveOne @CustomDirectiveTwo = Muffin | Pepper | Treacle - type Treacle { + type Muffin { age: Int } - type Muffin { + type Pepper { age: Int } - type Pepper { + type Treacle { age: Int } `, @@ -566,17 +601,15 @@ describe('Normalization tests', () => { }); test('that a union without members returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` - union Cats = - - type Pepper { - name: String - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + const { errors } = normalizeSubgraphFromStringFailure({ + sdlString: ` + union Cats = + + type Pepper { + name: String + } + `, + }); expect(errors).toHaveLength(1); expect(errors[0].message).toBe( `The subgraph has syntax errors and could not be parsed.\n` + @@ -585,82 +618,74 @@ describe('Normalization tests', () => { }); test('that undefined union members return an error', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` union Cats = Pepper `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual(undefinedTypeError('Pepper')); }); - test('Should return an error when a enum has values with type Int', () => { - const { errors } = normalizeSubgraphFromString( - ` - enum UserRole { - ADMIN - MODERATOR - 1 - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + test('that an error is returned if an integer is provided as an Enum value', () => { + const { errors } = normalizeSubgraphFromStringFailure({ + sdlString: ` + enum UserRole { + ADMIN + MODERATOR + 1 + } + `, + }); expect(errors[0].message).toBe( `The subgraph has syntax errors and could not be parsed.\n` + ` The reason provided was: Syntax Error: Expected Name, found Int "1".`, ); }); - test('Should return an error when a enum has duplicate values', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if an Enum defines duplicate values', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` enum UserRole { ADMIN MODERATOR ADMIN } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual(duplicateEnumValueDefinitionError('UserRole', 'ADMIN')); }); - test('Should return an error when a enum values have special characters', () => { - const { errors } = normalizeSubgraphFromString( - ` - enum Continent { - AFR!CA - EUROPE - ASIA - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + test('that an error is returned if an Enum value contains special characters', () => { + const { errors } = normalizeSubgraphFromStringFailure({ + sdlString: ` + enum Continent { + AFR!CA + EUROPE + ASIA + } + `, + }); expect(errors[0].message).toBe( `The subgraph has syntax errors and could not be parsed.\n` + ` The reason provided was: Syntax Error: Expected Name, found "!".`, ); }); - test('Should normalize schemas with only root types', () => { - const result = normalizeSubgraphFromString(` - type Query { - a: String - schema: String - } - `); - expect(result.success).toBe(true); - }); - - test('Should normalize type extensions', () => { - const { schema } = normalizeSubgraphFromString( - ` + test('that Object extensions are normalized successfully', () => { + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` directive @tag(name: String!) repeatable on FIELD_DEFINITION extend type Product @key(fields: "id") { @@ -683,9 +708,9 @@ describe('Normalization tests', () => { fastestDelivery: String } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; + ); expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( KEY_DIRECTIVE + @@ -713,9 +738,11 @@ describe('Normalization tests', () => { ); }); - test('Should normalize root type extensions', () => { - const { schema } = normalizeSubgraphFromString( - ` + test('that query extensions are normalized successfully', () => { + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` directive @tag(name: String!) repeatable on FIELD_DEFINITION type Product @key(fields: "id") @key(fields: "sku package") @key(fields: "sku variation { id }"){ @@ -746,9 +773,9 @@ describe('Normalization tests', () => { totalProductsCreated: Int } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationSuccess; + ); expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( SCHEMA_QUERY_DEFINITION + @@ -792,7 +819,7 @@ describe('Normalization tests', () => { const sdl = readFileSync(join(__dirname, 'test-data/testNormalization.graphql'), { encoding: 'utf8', }); - const { schema } = normalizeSubgraphFromString(sdl, true, ROUTER_COMPATIBILITY_VERSION_ONE) as NormalizationSuccess; + const { schema } = normalizeSubgraphSuccess(createSubgraph('subgraph', sdl), ROUTER_COMPATIBILITY_VERSION_ONE); expect(schemaToSortedNormalizedString(schema)).toBe( normalizeString( SCHEMA_QUERY_DEFINITION + @@ -863,72 +890,57 @@ describe('Normalization tests', () => { ); }); - //Key directive - test('Should normalize schemas with valid key directives', () => { - const result = normalizeSubgraphFromString(` - type User @key(fields: "name") { - name: String! - age: Int! - } - `); - expect(result.success).toBe(true); - }); - - test('Should normalize composite key directives', () => { - const result = normalizeSubgraphFromString(` - type User @key(fields: "name age") { - name: String! - age: Int! - } - `); - expect(result.success).toBe(true); - }); - - test('Should give errors when key directive points to a field which doesnt exist', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if a field set references a non-existent field', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type User @key(fields: "id") { name: String! age: Int! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'User', FIRST_ORDINAL, [undefinedFieldInFieldSetErrorMessage('id', 'User', 'id')]), ); }); - test('Should give errors when key directive is applied to a enum', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if a directive is applied to an invalid Enum location', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` enum User @key(fields: "name") { USER1 USER2 } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'User', FIRST_ORDINAL, [invalidDirectiveLocationErrorMessage(KEY, ENUM_UPPER)]), ); }); - test('Should give errors when key directive is applied to an Input', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if a directive is applied to an invalid Input Object location', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` input User @key(fields: "name") { name: String! age: Int! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'User', FIRST_ORDINAL, [ @@ -937,28 +949,19 @@ describe('Normalization tests', () => { ); }); - // Tag directive - test('Should normalize schemas with valid tag directive', () => { - const result = normalizeSubgraphFromString(` - type User { - name: String! @tag(name: "user") - age: Int! - } - `); - expect(result.success).toBe(true); - }); - test('that declaring the @tag directive on a parent without the required name argument returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type User @tag { name: String! age: Int! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(TAG, 'User', FIRST_ORDINAL, [undefinedRequiredArgumentsErrorMessage(TAG, [NAME], [])]), @@ -966,16 +969,18 @@ describe('Normalization tests', () => { }); test('that declaring the @tag directive on a child without the required name argument returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type User { name: String! @tag age: Int! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError('tag', 'User.name', FIRST_ORDINAL, [ @@ -985,27 +990,45 @@ describe('Normalization tests', () => { }); // External directive - test('Should normalize schemas with external directives', () => { - const result = normalizeSubgraphFromString(` + test('that an @external directive declared on the Object level is normalized successfully', () => { + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` type User @external { - name: String! age: Int! + name: String! } - `); - expect(result.success).toBe(true); + `, + ), + ROUTER_COMPATIBILITY_VERSION_ONE, + ); + expect(schemaToSortedNormalizedString(schema)).toBe( + normalizeString( + EXTERNAL_DIRECTIVE + + ` + type User { + age: Int! @external + name: String! @external + } + `, + ), + ); }); - test('Should give errors when external directive is applied to a interface', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if @external is declared on an Interface', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` interface User @external { name: String! age: Int! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(EXTERNAL, 'User', FIRST_ORDINAL, [ @@ -1014,17 +1037,19 @@ describe('Normalization tests', () => { ); }); - test('Should give errors when external directive is applied to an enum', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if @external is declared on an Enum', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` enum User @external { USER1 USER2 } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(EXTERNAL, 'User', FIRST_ORDINAL, [ @@ -1033,17 +1058,19 @@ describe('Normalization tests', () => { ); }); - test('Should give errors when external directive is applied to a input', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if @external is declared on an Input Object', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` input User @external { name: String! age: Int! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(EXTERNAL, 'User', FIRST_ORDINAL, [ @@ -1052,25 +1079,11 @@ describe('Normalization tests', () => { ); }); - // Provides directive - test('Should normalize schemas with provides directives', () => { - const result = normalizeSubgraphFromString(` - type Review @key(fields : "id") { - id: String! - user: User! @provides(fields : "name") - } - - type User @key(fields : "userId") { - userId: String! - name: String! @external - } - `); - expect(result.success).toBe(true); - }); - - test('that an error is returned if @provides refers to a non-existent field', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if @provides references a non-existent field', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Review @key(fields : "id") { id: String! user: User! @provides(fields : "age") @@ -1081,9 +1094,9 @@ describe('Normalization tests', () => { name: String! @external } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0].message).toStrictEqual( `The following "provides" directive is invalid:\n On field "Review.user":\n -` + @@ -1092,8 +1105,10 @@ describe('Normalization tests', () => { }); test('that declaring the @provides directive without the required fields argument returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Review @key(fields : "id") { id: String! user: User! @provides @@ -1104,9 +1119,9 @@ describe('Normalization tests', () => { name: String! @external } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(PROVIDES, 'Review.user', FIRST_ORDINAL, [ @@ -1115,17 +1130,19 @@ describe('Normalization tests', () => { ); }); - test('Should give errors when provides directive is applied to a object', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if @provides is declared on an Object', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type User @provides(fields : "age") { name: String! age: Int! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(PROVIDES, 'User', FIRST_ORDINAL, [ @@ -1134,17 +1151,19 @@ describe('Normalization tests', () => { ); }); - test('Should give errors when provides directive is applied to a interface', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if @provides is declared on an Interface', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` interface User @provides(fields : "age") { name: String! age: Int! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(PROVIDES, 'User', FIRST_ORDINAL, [ @@ -1153,17 +1172,19 @@ describe('Normalization tests', () => { ); }); - test('Should give errors when provides directive is applied to a enum', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if @provides is declared on an Enum', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` enum User @provides(fields : "age") { USER1 USER2 } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(PROVIDES, 'User', FIRST_ORDINAL, [ @@ -1172,17 +1193,19 @@ describe('Normalization tests', () => { ); }); - test('Should give errors when provides directive is applied to a input', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if @provides is declared on an Input Object', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` input User @provides(fields : "age") { name: String! age: Int! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(PROVIDES, 'User', FIRST_ORDINAL, [ @@ -1191,29 +1214,20 @@ describe('Normalization tests', () => { ); }); - test('that a valid @requires directive composes', () => { - const result = normalizeSubgraphFromString(` - type Product @key(fields : "id") { - id: String! - shippingCost: String! @requires(fields: "weight") - weight: Float! @external - } - `); - expect(result.success).toBe(true); - }); - - test('Should give errors if the requires directive points to a field which does not exist ', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if @requires references a non-existent field', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Product @key(fields : "id") { id: String! shippingCost: String! @requires(fields : "age") weight: Float! @external } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidProvidesOrRequiresDirectivesError(REQUIRES, [ @@ -1222,243 +1236,91 @@ describe('Normalization tests', () => { ); }); - test('Should give errors if the requires directive doesnt have a fields argument', () => { - const result = normalizeSubgraphFromString(` + test('that an error is returned if a @requires directive does not define arguments', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Product @key(fields : "id") { id: String! shippingCost: String! @requires weight: Float! @external } - `); - expect(result.success).toBe(false); - }); - - test('Should give errors when requires directive is applied to a object', () => { - const { errors } = normalizeSubgraphFromString( - ` - type User @requires(fields : "age") { - name: String! - age: Int! - } `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(errors).toHaveLength(1); - expect(errors[0]).toStrictEqual( - invalidDirectiveError(REQUIRES, 'User', FIRST_ORDINAL, [ - invalidDirectiveLocationErrorMessage(REQUIRES, OBJECT_UPPER), - ]), - ); - }); - - test('Should give errors when requires directive is applied to a interface', () => { - const { errors } = normalizeSubgraphFromString( - ` - interface User @requires(fields : "age") { - name: String! - age: Int! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(errors).toHaveLength(1); - expect(errors[0]).toStrictEqual( - invalidDirectiveError(REQUIRES, 'User', FIRST_ORDINAL, [ - invalidDirectiveLocationErrorMessage(REQUIRES, INTERFACE_UPPER), - ]), - ); - }); - - test('Should give errors when requires directive is applied to a enum', () => { - const { errors } = normalizeSubgraphFromString( - ` - enum User @requires(fields : "age") { - USER1 - USER2 - } - `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(errors).toHaveLength(1); - expect(errors[0]).toStrictEqual( - invalidDirectiveError(REQUIRES, 'User', FIRST_ORDINAL, [ - invalidDirectiveLocationErrorMessage(REQUIRES, ENUM_UPPER), - ]), ); - }); - - test('Should give errors when provides directive is applied to a input', () => { - const { errors } = normalizeSubgraphFromString( - ` - input User @requires(fields : "age") { - name: String! - age: Int! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( - invalidDirectiveError(REQUIRES, 'User', FIRST_ORDINAL, [ - invalidDirectiveLocationErrorMessage(REQUIRES, INPUT_OBJECT_UPPER), + invalidDirectiveError(REQUIRES, 'Product.shippingCost', FIRST_ORDINAL, [ + undefinedRequiredArgumentsErrorMessage(REQUIRES, [FIELDS], []), ]), ); }); // Shareable directive - test('Should normalize schemas with shareable directives applied to objects', () => { - const result = normalizeSubgraphFromString(` + test('that a @shareable directive declared on the Object level is normalized successfully', () => { + const { schema } = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` type User @key(fields: "email") @shareable { email: String name: String } - `); - expect(result.success).toBe(true); - }); - - test('Should normalize schemas with shareable directives applied to fields', () => { - const result = normalizeSubgraphFromString(` - type Product @key(fields: "id") { - id: ID! - name: String - description: String @shareable - } - `); - expect(result.success).toBe(true); - }); - - test('that providing @shareable directive with an argument returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` - type User @shareable(fields: "email") { - email: String - name: String - } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(errors).toHaveLength(1); - expect(errors[0]).toStrictEqual( - invalidDirectiveError(SHAREABLE, 'User', FIRST_ORDINAL, [ - unexpectedDirectiveArgumentErrorMessage(SHAREABLE, [FIELDS]), - ]), ); - }); - - test('that declaring @shareable on an interface returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` - interface User @shareable { - name: String! - age: Int! + expect(schemaToSortedNormalizedString(schema)).toBe( + normalizeString( + KEY_DIRECTIVE + + SHAREABLE_DIRECTIVE + + ` + type User @key(fields: "email") { + email: String @shareable + name: String @shareable } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(errors).toHaveLength(1); - expect(errors[0]).toStrictEqual( - invalidDirectiveError(SHAREABLE, 'User', FIRST_ORDINAL, [ - invalidDirectiveLocationErrorMessage(SHAREABLE, INTERFACE_UPPER), - ]), + ` + + OPENFED_FIELD_SET, + ), ); }); - test('that declaring @shareable on an enum returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` - enum User @shareable { - USER1 - USER2 + test('that an error is returned if an argument is defined on a @shareable directive', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` + type User @shareable(fields: "email") { + email: String + name: String } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; - expect(errors).toHaveLength(1); - expect(errors[0]).toStrictEqual( - invalidDirectiveError(SHAREABLE, 'User', FIRST_ORDINAL, [ - invalidDirectiveLocationErrorMessage(SHAREABLE, ENUM_UPPER), - ]), ); - }); - - test('that declaring @shareable on an input object returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` - input User @shareable { - name: String! - age: Int! - } - `, - true, - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(SHAREABLE, 'User', FIRST_ORDINAL, [ - invalidDirectiveLocationErrorMessage(SHAREABLE, INPUT_OBJECT_UPPER), + unexpectedDirectiveArgumentErrorMessage(SHAREABLE, [FIELDS]), ]), ); }); - // Inaccessible directive - test('Should normalize schemas with shareable directives applied to objects', () => { - const result = normalizeSubgraphFromString(` - type User @inaccessible { - email: String - name: String - } - `); - expect(result.success).toBe(true); - }); - - test('Should normalize schemas with shareable directives applied to interfaces', () => { - const result = normalizeSubgraphFromString(` - interface User @inaccessible { - email: String - name: String - } - `); - expect(result.success).toBe(true); - }); - - test('Should normalize schemas with shareable directives applied to input object', () => { - const result = normalizeSubgraphFromString(` - input User @inaccessible { - email: String - name: String - } - `); - expect(result.success).toBe(true); - }); - - test('Should normalize schemas with shareable directives applied to enums', () => { - const result = normalizeSubgraphFromString(` - enum User @inaccessible { - USER1 - USER2 - } - `); - expect(result.success).toBe(true); - }); - - test('that declaring the @inaccessible directive with an argument returns an error', () => { - const { errors } = normalizeSubgraphFromString( - ` + test('that an error is returned if @inaccessible is declared with an argument', () => { + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type User @inaccessible(fields: "name") { email: String name: String } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(INACCESSIBLE, 'User', FIRST_ORDINAL, [ @@ -1467,8 +1329,11 @@ describe('Normalization tests', () => { ); }); - test('that the composite keys are identified', () => { - const result = normalizeSubgraphFromString(` + test('that composite keys fields are identified', () => { + const result = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "id email") @key(fields: "id organization { id }") { id: ID! email: ID! @@ -1484,12 +1349,18 @@ describe('Normalization tests', () => { id: ID! name: String! } - `); + `, + ), + ROUTER_COMPATIBILITY_VERSION_ONE, + ); expect(result.success).toBe(true); }); test('that the nested composite keys are identified', () => { - const result = normalizeSubgraphFromString(` + const result = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "id email") @key(fields: "id organization { id details { id } }") { id: ID! email: ID! @@ -1505,13 +1376,18 @@ describe('Normalization tests', () => { id: ID! name: String! } - `); + `, + ), + ROUTER_COMPATIBILITY_VERSION_ONE, + ); expect(result.success).toBe(true); }); test('that invalid fields in composite keys return an error', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "id email") @key(fields: "id organization { id details { id age } }") { id: ID! email: ID! @@ -1528,9 +1404,9 @@ describe('Normalization tests', () => { name: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', numberToOrdinal(2), [ @@ -1540,8 +1416,10 @@ describe('Normalization tests', () => { }); test('that an empty selection set in a composite key returns a parse error', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "id email") @key(fields: "id organization { id details { } }") { id: ID! email: ID! @@ -1558,9 +1436,9 @@ describe('Normalization tests', () => { name: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', numberToOrdinal(2), [ @@ -1573,8 +1451,10 @@ describe('Normalization tests', () => { }); test('that an error is returned if a composite type selection does not define a selection set of its own #1.1', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "id email") @key(fields: "id organization { id details }") { id: ID! email: ID! @@ -1591,9 +1471,9 @@ describe('Normalization tests', () => { name: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', numberToOrdinal(2), [ @@ -1603,8 +1483,10 @@ describe('Normalization tests', () => { }); test('that an error is returned if a composite type selection does not define a selection set of its own #1.2', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "id email") @key(fields: "id organization { details id }") { id: ID! email: ID! @@ -1621,9 +1503,9 @@ describe('Normalization tests', () => { name: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toBeDefined(); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', '2nd', [ @@ -1633,8 +1515,10 @@ describe('Normalization tests', () => { }); test('that an error is returned if a composite type selection does not define a selection set of its own #2.1', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "id email") @key(fields: "id organization { uuid details }") { id: ID! email: ID! @@ -1651,9 +1535,9 @@ describe('Normalization tests', () => { name: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', numberToOrdinal(2), [ @@ -1668,8 +1552,10 @@ describe('Normalization tests', () => { }); test('that an error is returned if a composite type selection does not define a selection set of its own #2.2', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "id email") @key(fields: "id organization { details uuid }") { id: ID! email: ID! @@ -1686,9 +1572,9 @@ describe('Normalization tests', () => { name: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toBeDefined(); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', '2nd', [ @@ -1703,7 +1589,10 @@ describe('Normalization tests', () => { }); test('that if multiple nested objects passed in composite keys are identified', () => { - const result = normalizeSubgraphFromString(` + const result = normalizeSubgraphSuccess( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "id email") @key(fields: "id organization { details { id } somethingElse { id } }") { id: ID! email: ID! @@ -1725,12 +1614,17 @@ describe('Normalization tests', () => { id: ID! name: String! } - `); + `, + ), + ROUTER_COMPATIBILITY_VERSION_ONE, + ); }); test('that if multiple nested objects with invalid fields are passed in composite keys gives an error', () => { - const { errors } = normalizeSubgraphFromString( - ` + const { errors } = normalizeSubgraphFailure( + createSubgraph( + 'subgraph', + ` type Entity @key(fields: "id email") @key(fields: "id organization { details { id } somethingElse { id } }") { id: ID! email: ID! @@ -1752,9 +1646,9 @@ describe('Normalization tests', () => { name: String! } `, - true, + ), ROUTER_COMPATIBILITY_VERSION_ONE, - ) as NormalizationFailure; + ); expect(errors).toHaveLength(1); expect(errors[0]).toStrictEqual( invalidDirectiveError(KEY, 'Entity', numberToOrdinal(2), [ diff --git a/composition/tests/v1/resolvability.test.ts b/composition/tests/v1/resolvability.test.ts index a8d5d9a2af..35d12cb44b 100644 --- a/composition/tests/v1/resolvability.test.ts +++ b/composition/tests/v1/resolvability.test.ts @@ -1,19 +1,19 @@ import { - EntityAncestorCollection, - EntityAncestorData, + type EntityAncestorCollection, + type EntityAncestorData, federateSubgraphs, generateResolvabilityErrorReasons, generateSelectionSetSegments, generateSharedResolvabilityErrorReasons, - GraphFieldData, + type GraphFieldData, newRootFieldData, OBJECT, parse, QUERY, renderSelectionSet, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, - UnresolvableFieldData, + type Subgraph, + type UnresolvableFieldData, unresolvablePathError, } from '../../src'; import { describe, expect, test } from 'vitest'; @@ -1285,7 +1285,9 @@ describe('Field resolvability tests', () => { }); expect(resultOne.success).toBe(false); const resultTwo = federateSubgraphs({ - disableResolvabilityValidation: true, + options: { + disableResolvabilityValidation: true, + }, subgraphs: [subgraphBQ, subgraphBR], version: ROUTER_COMPATIBILITY_VERSION_ONE, }); @@ -1818,6 +1820,27 @@ describe('Field resolvability tests', () => { ]); }); + test('that @external entity keys are ignored if set in options', () => { + const { federatedGraphSchema } = federateSubgraphsSuccess([iaaa, iaab], ROUTER_COMPATIBILITY_VERSION_ONE, { + ignoreExternalKeys: true, + }); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( + normalizeString( + SCHEMA_QUERY_DEFINITION + + ` + type Entity { + id: ID! + name: String! + } + + type Query { + entities: [Entity!]! + } + `, + ), + ); + }); + test('that an @external key can still be a valid target', () => { const { federatedGraphSchema } = federateSubgraphsSuccess([jaaa, jaab], ROUTER_COMPATIBILITY_VERSION_ONE); expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( diff --git a/composition/tests/v1/router-configuration.test.ts b/composition/tests/v1/router-configuration.test.ts index 77cc991361..dbf449df97 100644 --- a/composition/tests/v1/router-configuration.test.ts +++ b/composition/tests/v1/router-configuration.test.ts @@ -1,11 +1,11 @@ import { describe, expect, test } from 'vitest'; import { - BatchNormalizationSuccess, + type BatchNormalizationSuccess, batchNormalize, - ConfigurationData, + type ConfigurationData, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, - TypeName, + type Subgraph, + type TypeName, } from '../../src'; import fs from 'node:fs'; import path, { join } from 'node:path'; @@ -675,10 +675,7 @@ describe('Router Configuration tests', () => { }); test('that the router configuration is correctly generated', () => { - const result = batchNormalize( - [monolith, reviews, users], - ROUTER_COMPATIBILITY_VERSION_ONE, - ) as BatchNormalizationSuccess; + const result = batchNormalize({ subgraphs: [monolith, reviews, users] }) as BatchNormalizationSuccess; expect(result.success).toBe(true); expect(result.internalSubgraphBySubgraphName.get('monolith')!.configurationDataByTypeName).toStrictEqual( new Map([ diff --git a/composition/tests/v1/type-merging.test.ts b/composition/tests/v1/type-merging.test.ts index 6376440124..57d45233de 100644 --- a/composition/tests/v1/type-merging.test.ts +++ b/composition/tests/v1/type-merging.test.ts @@ -1,12 +1,12 @@ import { getLeastRestrictiveMergedTypeNode, - GetMergedTypeFailure, - GetMergedTypeSuccess, + type GetMergedTypeFailure, + type GetMergedTypeSuccess, getMostRestrictiveMergedTypeNode, getMutableTypeNode, maximumTypeNestingExceededError, } from '../../src'; -import { Kind, TypeNode } from 'graphql'; +import { Kind, type TypeNode } from 'graphql'; import { describe, expect, test } from 'vitest'; import { stringToTypeNode } from './utils/utils'; diff --git a/composition/tests/v1/types/arguments.test.ts b/composition/tests/v1/types/arguments.test.ts index 98f663f311..906eee28be 100644 --- a/composition/tests/v1/types/arguments.test.ts +++ b/composition/tests/v1/types/arguments.test.ts @@ -6,17 +6,15 @@ import { incompatibleInputValueDefaultValuesError, incompatibleInputValueDefaultValueTypeError, incompatibleMergedTypesError, - InputValueData, - InterfaceDefinitionData, + type InputValueData, + type InterfaceDefinitionData, invalidNamedTypeError, - InvalidRequiredInputValueData, + type InvalidRequiredInputValueData, invalidRequiredInputValueError, - NormalizationFailure, - normalizeSubgraphFromString, parse, ROUTER_COMPATIBILITY_VERSION_ONE, STRING_SCALAR, - Subgraph, + type Subgraph, subgraphValidationError, } from '../../../src'; import { describe, expect, test } from 'vitest'; diff --git a/composition/tests/v1/types/enums.test.ts b/composition/tests/v1/types/enums.test.ts index de0720374c..c65067ef9d 100644 --- a/composition/tests/v1/types/enums.test.ts +++ b/composition/tests/v1/types/enums.test.ts @@ -1,13 +1,13 @@ import { duplicateEnumValueDefinitionError, ENUM, - EnumDefinitionData, + type EnumDefinitionData, incompatibleSharedEnumError, noBaseDefinitionForExtensionError, noDefinedEnumValuesError, parse, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, } from '../../../src'; import { describe, expect, test } from 'vitest'; import { INACCESSIBLE_DIRECTIVE, SCHEMA_QUERY_DEFINITION, TAG_DIRECTIVE } from '../utils/utils'; diff --git a/composition/tests/v1/types/inputs.test.ts b/composition/tests/v1/types/inputs.test.ts index 12cc1c679a..52eb6094ae 100644 --- a/composition/tests/v1/types/inputs.test.ts +++ b/composition/tests/v1/types/inputs.test.ts @@ -2,16 +2,14 @@ import { duplicateInputFieldDefinitionError, incompatibleInputValueDefaultValueTypeError, INPUT_OBJECT, - InputValueData, + type InputValueData, invalidNamedTypeError, invalidRequiredInputValueError, noInputValueDefinitionsError, - NormalizationSuccess, - normalizeSubgraph, - ObjectDefinitionData, + type ObjectDefinitionData, parse, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, subgraphValidationError, } from '../../../src'; import { describe, expect, test } from 'vitest'; diff --git a/composition/tests/v1/types/interfaces.test.ts b/composition/tests/v1/types/interfaces.test.ts index cd74d5af63..24a15065a0 100644 --- a/composition/tests/v1/types/interfaces.test.ts +++ b/composition/tests/v1/types/interfaces.test.ts @@ -1,9 +1,9 @@ import { duplicateFieldDefinitionError, - ImplementationErrors, + type ImplementationErrors, incompatibleFederatedFieldNamedTypeError, INTERFACE, - InvalidFieldImplementation, + type InvalidFieldImplementation, invalidImplementedTypeError, invalidInterfaceImplementationError, noBaseDefinitionForExtensionError, @@ -13,7 +13,7 @@ import { ROUTER_COMPATIBILITY_VERSION_ONE, SCALAR, selfImplementationError, - Subgraph, + type Subgraph, unimplementedInterfaceOutputTypeWarning, } from '../../../src'; import { describe, expect, test } from 'vitest'; diff --git a/composition/tests/v1/types/objects.test.ts b/composition/tests/v1/types/objects.test.ts index c15003107c..84968456d6 100644 --- a/composition/tests/v1/types/objects.test.ts +++ b/composition/tests/v1/types/objects.test.ts @@ -1,17 +1,17 @@ import { describe, expect, test } from 'vitest'; import { - ConfigurationData, + type ConfigurationData, duplicateFieldDefinitionError, - FieldData, - InputObjectDefinitionData, + type FieldData, + type InputObjectDefinitionData, invalidNamedTypeError, noBaseDefinitionForExtensionError, noFieldDefinitionsError, OBJECT, parse, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, - TypeName, + type Subgraph, + type TypeName, } from '../../../src'; import { SCHEMA_QUERY_DEFINITION, stringToTypeNode, TAG_DIRECTIVE } from '../utils/utils'; import { diff --git a/composition/tests/v1/types/scalars.test.ts b/composition/tests/v1/types/scalars.test.ts index f0cbefe00b..8dc0c4ed10 100644 --- a/composition/tests/v1/types/scalars.test.ts +++ b/composition/tests/v1/types/scalars.test.ts @@ -3,8 +3,8 @@ import { noBaseScalarDefinitionError, ROUTER_COMPATIBILITY_VERSION_ONE, SCALAR, - ScalarDefinitionData, - Subgraph, + type ScalarDefinitionData, + type Subgraph, } from '../../../src'; import { parse } from 'graphql'; import { SCHEMA_QUERY_DEFINITION, TAG_DIRECTIVE } from '../utils/utils'; diff --git a/composition/tests/v1/types/unions.test.ts b/composition/tests/v1/types/unions.test.ts index 6b68d2a926..5028d0621e 100644 --- a/composition/tests/v1/types/unions.test.ts +++ b/composition/tests/v1/types/unions.test.ts @@ -5,10 +5,10 @@ import { noDefinedUnionMembersError, OBJECT, ROUTER_COMPATIBILITY_VERSION_ONE, - Subgraph, + type Subgraph, subgraphValidationError, UNION, - UnionDefinitionData, + type UnionDefinitionData, } from '../../../src'; import { parse } from 'graphql'; import { describe, expect, test } from 'vitest'; diff --git a/composition/tests/v1/utils/utils.ts b/composition/tests/v1/utils/utils.ts index 75bb382a8d..259c5a6ee6 100644 --- a/composition/tests/v1/utils/utils.ts +++ b/composition/tests/v1/utils/utils.ts @@ -1,5 +1,5 @@ -import { MutableIntermediateTypeNode, MutableTypeNode } from '../../../src'; -import { Kind, TypeNode } from 'graphql'; +import { type MutableIntermediateTypeNode, type MutableTypeNode } from '../../../src'; +import { Kind, type TypeNode } from 'graphql'; export const AUTHENTICATED_DIRECTIVE = ` directive @authenticated on ENUM | FIELD_DEFINITION | INTERFACE | OBJECT | SCALAR diff --git a/composition/tsconfig.json b/composition/tsconfig.json index 24a34bb350..4a0e8d873a 100644 --- a/composition/tsconfig.json +++ b/composition/tsconfig.json @@ -2,9 +2,9 @@ "extends": "../tsconfig.base.json", "compilerOptions": { "declaration": true, - "outDir": "./dist", "module": "NodeNext", - "moduleResolution": "NodeNext" + "moduleResolution": "NodeNext", + "outDir": "./dist" }, "include": ["src/**/*"], "exclude": ["node_modules"] diff --git a/controlplane/package.json b/controlplane/package.json index 3699fc2740..bbba7479df 100644 --- a/controlplane/package.json +++ b/controlplane/package.json @@ -58,7 +58,7 @@ "@sentry/node-native": "^10.19.0", "@sentry/profiling-node": "^10.19.0", "@tiptap/core": "^2.1.13", - "@wundergraph/composition": "0.51.1", + "@wundergraph/composition": "workspace:*", "@wundergraph/cosmo-connect": "workspace:*", "@wundergraph/cosmo-shared": "workspace:*", "@wundergraph/protographic": "workspace:*", diff --git a/controlplane/src/core/bufservices/contract/createContract.ts b/controlplane/src/core/bufservices/contract/createContract.ts index ea7cb44888..e77ffb689c 100644 --- a/controlplane/src/core/bufservices/contract/createContract.ts +++ b/controlplane/src/core/bufservices/contract/createContract.ts @@ -9,6 +9,7 @@ import { DeploymentError, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; import { isValidUrl } from '@wundergraph/cosmo-shared'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { PublicError, UnauthorizedError } from '../../errors/errors.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { ContractRepository } from '../../repositories/ContractRepository.js'; @@ -16,14 +17,7 @@ import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepos import { DefaultNamespace, NamespaceRepository } from '../../repositories/NamespaceRepository.js'; import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import type { RouterOptions } from '../../routes.js'; -import { - enrichLogger, - getLogger, - handleError, - isValidGraphName, - isValidSchemaTags, - newCompositionOptions, -} from '../../util.js'; +import { enrichLogger, getLogger, handleError, isValidGraphName, isValidSchemaTags } from '../../util.js'; export function createContract( opts: RouterOptions, @@ -111,6 +105,10 @@ export function createContract( organizationId: authContext.organizationId, featureId: 'federated-graphs', }); + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); const limit = feature?.limit === -1 ? undefined : feature?.limit; @@ -204,7 +202,10 @@ export function createContract( }, blobStorage: opts.blobStorage, chClient: opts.chClient!, - compositionOptions: newCompositionOptions(req.disableResolvabilityValidation), + compositionOptions: { + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + disableResolvabilityValidation: req.disableResolvabilityValidation, + }, federatedGraphs: [{ ...contractGraph, contract }], }); diff --git a/controlplane/src/core/bufservices/contract/updateContract.ts b/controlplane/src/core/bufservices/contract/updateContract.ts index aa64ed6ef4..912035b4c4 100644 --- a/controlplane/src/core/bufservices/contract/updateContract.ts +++ b/controlplane/src/core/bufservices/contract/updateContract.ts @@ -9,12 +9,14 @@ import { UpdateContractRequest, UpdateContractResponse, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { ContractRepository } from '../../repositories/ContractRepository.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; import { DefaultNamespace } from '../../repositories/NamespaceRepository.js'; +import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import type { RouterOptions } from '../../routes.js'; -import { enrichLogger, getLogger, handleError, isValidSchemaTags, newCompositionOptions } from '../../util.js'; +import { enrichLogger, getLogger, handleError, isValidSchemaTags } from '../../util.js'; import { OrganizationWebhookService } from '../../webhooks/OrganizationWebhookService.js'; import { UnauthorizedError } from '../../errors/errors.js'; @@ -33,6 +35,7 @@ export function updateContract( const fedGraphRepo = new FederatedGraphRepository(logger, opts.db, authContext.organizationId); const contractRepo = new ContractRepository(logger, opts.db, authContext.organizationId); + const orgRepo = new OrganizationRepository(logger, opts.db, opts.billingDefaultPlanId); const auditLogRepo = new AuditLogRepository(opts.db); const orgWebhooks = new OrganizationWebhookService( opts.db, @@ -116,6 +119,14 @@ export function updateContract( }; } + const ignoreExternalKeys = + ( + await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }) + )?.enabled ?? false; + const updatedContractDetails = await contractRepo.update({ id: graph.contract.id, excludeTags: req.excludeTags, @@ -140,7 +151,10 @@ export function updateContract( }, labelMatchers: [], chClient: opts.chClient!, - compositionOptions: newCompositionOptions(req.disableResolvabilityValidation), + compositionOptions: { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys, + }, }); const compositionErrors: PlainMessage[] = []; @@ -155,7 +169,10 @@ export function updateContract( }, blobStorage: opts.blobStorage, chClient: opts.chClient!, - compositionOptions: newCompositionOptions(req.disableResolvabilityValidation), + compositionOptions: { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys, + }, federatedGraphs: [ { ...graph, diff --git a/controlplane/src/core/bufservices/feature-flag/createFeatureFlag.ts b/controlplane/src/core/bufservices/feature-flag/createFeatureFlag.ts index 3738f6db2b..0ac581eb53 100644 --- a/controlplane/src/core/bufservices/feature-flag/createFeatureFlag.ts +++ b/controlplane/src/core/bufservices/feature-flag/createFeatureFlag.ts @@ -9,13 +9,14 @@ import { CreateFeatureFlagResponse, DeploymentError, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { FeatureFlagRepository } from '../../repositories/FeatureFlagRepository.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; import { DefaultNamespace, NamespaceRepository } from '../../repositories/NamespaceRepository.js'; import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import type { RouterOptions } from '../../routes.js'; -import { enrichLogger, getLogger, handleError, isValidLabels, newCompositionOptions } from '../../util.js'; +import { enrichLogger, getLogger, handleError, isValidLabels } from '../../util.js'; import { OrganizationWebhookService } from '../../webhooks/OrganizationWebhookService.js'; import { UnauthorizedError } from '../../errors/errors.js'; @@ -189,6 +190,10 @@ export function createFeatureFlag( namespaceId: namespace.id, excludeDisabled: true, }); + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); const compositionErrors: PlainMessage[] = []; const deploymentErrors: PlainMessage[] = []; @@ -205,7 +210,10 @@ export function createFeatureFlag( }, blobStorage: opts.blobStorage, chClient: opts.chClient!, - compositionOptions: newCompositionOptions(req.disableResolvabilityValidation), + compositionOptions: { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, federatedGraphs, }); diff --git a/controlplane/src/core/bufservices/feature-flag/deleteFeatureFlag.ts b/controlplane/src/core/bufservices/feature-flag/deleteFeatureFlag.ts index baffe0b1ce..2312a4313a 100644 --- a/controlplane/src/core/bufservices/feature-flag/deleteFeatureFlag.ts +++ b/controlplane/src/core/bufservices/feature-flag/deleteFeatureFlag.ts @@ -9,12 +9,14 @@ import { DeleteFeatureFlagResponse, DeploymentError, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { FeatureFlagRepository } from '../../repositories/FeatureFlagRepository.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; import { DefaultNamespace, NamespaceRepository } from '../../repositories/NamespaceRepository.js'; +import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import type { RouterOptions } from '../../routes.js'; -import { enrichLogger, getLogger, handleError, newCompositionOptions } from '../../util.js'; +import { enrichLogger, getLogger, handleError } from '../../util.js'; import { OrganizationWebhookService } from '../../webhooks/OrganizationWebhookService.js'; import { UnauthorizedError } from '../../errors/errors.js'; @@ -31,6 +33,7 @@ export function deleteFeatureFlag( const featureFlagRepo = new FeatureFlagRepository(logger, opts.db, authContext.organizationId); const namespaceRepo = new NamespaceRepository(opts.db, authContext.organizationId); + const orgRepo = new OrganizationRepository(logger, opts.db, opts.billingDefaultPlanId); const orgWebhooks = new OrganizationWebhookService( opts.db, authContext.organizationId, @@ -102,6 +105,11 @@ export function deleteFeatureFlag( }); } + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); + const compositionErrors: PlainMessage[] = []; const deploymentErrors: PlainMessage[] = []; const compositionWarnings: PlainMessage[] = []; @@ -135,7 +143,10 @@ export function deleteFeatureFlag( }, blobStorage: opts.blobStorage, chClient: opts.chClient!, - compositionOptions: newCompositionOptions(req.disableResolvabilityValidation), + compositionOptions: { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, federatedGraphs, }); diff --git a/controlplane/src/core/bufservices/feature-flag/enableFeatureFlag.ts b/controlplane/src/core/bufservices/feature-flag/enableFeatureFlag.ts index 0720f81951..fa543dc05d 100644 --- a/controlplane/src/core/bufservices/feature-flag/enableFeatureFlag.ts +++ b/controlplane/src/core/bufservices/feature-flag/enableFeatureFlag.ts @@ -9,12 +9,14 @@ import { EnableFeatureFlagRequest, EnableFeatureFlagResponse, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { FeatureFlagRepository } from '../../repositories/FeatureFlagRepository.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; import { DefaultNamespace, NamespaceRepository } from '../../repositories/NamespaceRepository.js'; +import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import type { RouterOptions } from '../../routes.js'; -import { enrichLogger, getLogger, handleError, newCompositionOptions } from '../../util.js'; +import { enrichLogger, getLogger, handleError } from '../../util.js'; import { OrganizationWebhookService } from '../../webhooks/OrganizationWebhookService.js'; import { UnauthorizedError } from '../../errors/errors.js'; @@ -31,6 +33,7 @@ export function enableFeatureFlag( const featureFlagRepo = new FeatureFlagRepository(logger, opts.db, authContext.organizationId); const namespaceRepo = new NamespaceRepository(opts.db, authContext.organizationId); + const orgRepo = new OrganizationRepository(logger, opts.db, opts.billingDefaultPlanId); const auditLogRepo = new AuditLogRepository(opts.db); const orgWebhooks = new OrganizationWebhookService( opts.db, @@ -103,6 +106,10 @@ export function enableFeatureFlag( // fetch the federated graphs based on the state that has just been set for the feature flag above excludeDisabled: req.enabled, }); + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); const compositionErrors: PlainMessage[] = []; const deploymentErrors: PlainMessage[] = []; @@ -119,7 +126,10 @@ export function enableFeatureFlag( }, blobStorage: opts.blobStorage, chClient: opts.chClient!, - compositionOptions: newCompositionOptions(req.disableResolvabilityValidation), + compositionOptions: { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, federatedGraphs, }); diff --git a/controlplane/src/core/bufservices/feature-flag/updateFeatureFlag.ts b/controlplane/src/core/bufservices/feature-flag/updateFeatureFlag.ts index 314bf76d92..bb52d9b2b8 100644 --- a/controlplane/src/core/bufservices/feature-flag/updateFeatureFlag.ts +++ b/controlplane/src/core/bufservices/feature-flag/updateFeatureFlag.ts @@ -9,13 +9,14 @@ import { UpdateFeatureFlagRequest, UpdateFeatureFlagResponse, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; -import { FederatedGraphDTO } from '../../../types/index.js'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, FederatedGraphDTO } from '../../../types/index.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { FeatureFlagRepository } from '../../repositories/FeatureFlagRepository.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; import { DefaultNamespace, NamespaceRepository } from '../../repositories/NamespaceRepository.js'; +import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import type { RouterOptions } from '../../routes.js'; -import { enrichLogger, getLogger, handleError, isValidLabels, newCompositionOptions } from '../../util.js'; +import { enrichLogger, getLogger, handleError, isValidLabels } from '../../util.js'; import { OrganizationWebhookService } from '../../webhooks/OrganizationWebhookService.js'; import { UnauthorizedError } from '../../errors/errors.js'; @@ -32,6 +33,7 @@ export function updateFeatureFlag( const featureFlagRepo = new FeatureFlagRepository(logger, opts.db, authContext.organizationId); const namespaceRepo = new NamespaceRepository(opts.db, authContext.organizationId); + const orgRepo = new OrganizationRepository(logger, opts.db, opts.billingDefaultPlanId); const orgWebhooks = new OrganizationWebhookService( opts.db, authContext.organizationId, @@ -159,6 +161,11 @@ export function updateFeatureFlag( allFederatedGraphsToCompose.push(newFederatedGraph); } + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); + const compositionErrors: PlainMessage[] = []; const deploymentErrors: PlainMessage[] = []; const compositionWarnings: PlainMessage[] = []; @@ -174,7 +181,10 @@ export function updateFeatureFlag( }, blobStorage: opts.blobStorage, chClient: opts.chClient!, - compositionOptions: newCompositionOptions(req.disableResolvabilityValidation), + compositionOptions: { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, federatedGraphs: allFederatedGraphsToCompose, }); diff --git a/controlplane/src/core/bufservices/federated-graph/checkFederatedGraph.ts b/controlplane/src/core/bufservices/federated-graph/checkFederatedGraph.ts index eb028792ac..c94ea1f5b9 100644 --- a/controlplane/src/core/bufservices/federated-graph/checkFederatedGraph.ts +++ b/controlplane/src/core/bufservices/federated-graph/checkFederatedGraph.ts @@ -9,9 +9,11 @@ import { Subgraph, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; import { parse } from 'graphql'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { composeSubgraphs } from '../../composition/composition.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; import { DefaultNamespace } from '../../repositories/NamespaceRepository.js'; +import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import { SubgraphRepository } from '../../repositories/SubgraphRepository.js'; import type { RouterOptions } from '../../routes.js'; import { @@ -21,7 +23,6 @@ import { getLogger, handleError, isValidLabelMatchers, - newCompositionOptions, } from '../../util.js'; import { UnauthorizedError } from '../../errors/errors.js'; import { maxRowLimitForChecks } from '../../constants.js'; @@ -39,6 +40,7 @@ export function checkFederatedGraph( const fedGraphRepo = new FederatedGraphRepository(logger, opts.db, authContext.organizationId); const subgraphRepo = new SubgraphRepository(logger, opts.db, authContext.organizationId); + const orgRepo = new OrganizationRepository(logger, opts.db, opts.billingDefaultPlanId); req.namespace = req.namespace || DefaultNamespace; @@ -101,6 +103,11 @@ export function checkFederatedGraph( type: convertToSubgraphType(s.type), })); + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); + const result = composeSubgraphs( subgraphsUsedForComposition.map((s) => ({ id: s.id, @@ -109,7 +116,10 @@ export function checkFederatedGraph( definitions: parse(s.schemaSDL), })), federatedGraph.routerCompatibilityVersion, - newCompositionOptions(req.disableResolvabilityValidation), + { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, ); // If req.limit is not provided, we return all rows diff --git a/controlplane/src/core/bufservices/federated-graph/createFederatedGraph.ts b/controlplane/src/core/bufservices/federated-graph/createFederatedGraph.ts index 9ea483d09d..afed804970 100644 --- a/controlplane/src/core/bufservices/federated-graph/createFederatedGraph.ts +++ b/controlplane/src/core/bufservices/federated-graph/createFederatedGraph.ts @@ -10,20 +10,14 @@ import { DeploymentError, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; import { isValidUrl } from '@wundergraph/cosmo-shared'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; import { DefaultNamespace, NamespaceRepository } from '../../repositories/NamespaceRepository.js'; import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import { SubgraphRepository } from '../../repositories/SubgraphRepository.js'; import type { RouterOptions } from '../../routes.js'; -import { - enrichLogger, - getLogger, - handleError, - isValidGraphName, - isValidLabelMatchers, - newCompositionOptions, -} from '../../util.js'; +import { enrichLogger, getLogger, handleError, isValidGraphName, isValidLabelMatchers } from '../../util.js'; import { OrganizationWebhookService } from '../../webhooks/OrganizationWebhookService.js'; import { UnauthorizedError } from '../../errors/errors.js'; @@ -217,6 +211,11 @@ export function createFederatedGraph( }; } + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); + const compositionErrors: PlainMessage[] = []; const deploymentErrors: PlainMessage[] = []; const compositionWarnings: PlainMessage[] = []; @@ -232,7 +231,10 @@ export function createFederatedGraph( }, blobStorage: opts.blobStorage, chClient: opts.chClient!, - compositionOptions: newCompositionOptions(req.disableResolvabilityValidation), + compositionOptions: { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, federatedGraphs: [federatedGraph], }); diff --git a/controlplane/src/core/bufservices/federated-graph/migrateFromApollo.ts b/controlplane/src/core/bufservices/federated-graph/migrateFromApollo.ts index d9089182af..c800acffea 100644 --- a/controlplane/src/core/bufservices/federated-graph/migrateFromApollo.ts +++ b/controlplane/src/core/bufservices/federated-graph/migrateFromApollo.ts @@ -6,7 +6,7 @@ import { MigrateFromApolloRequest, MigrateFromApolloResponse, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; -import { GraphApiKeyJwtPayload } from '../../../types/index.js'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, GraphApiKeyJwtPayload } from '../../../types/index.js'; import { audiences, signJwtHS256 } from '../../crypto/jwt.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; @@ -131,6 +131,11 @@ export function migrateFromApollo( } } + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); + await opts.db.transaction(async (tx) => { const fedGraphRepo = new FederatedGraphRepository(logger, tx, authContext.organizationId); @@ -158,6 +163,7 @@ export function migrateFromApollo( chClient: opts.chClient!, compositionOptions: { disableResolvabilityValidation: true, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, }, }); }); diff --git a/controlplane/src/core/bufservices/federated-graph/updateFederatedGraph.ts b/controlplane/src/core/bufservices/federated-graph/updateFederatedGraph.ts index 5533403d16..baa1c5cf4e 100644 --- a/controlplane/src/core/bufservices/federated-graph/updateFederatedGraph.ts +++ b/controlplane/src/core/bufservices/federated-graph/updateFederatedGraph.ts @@ -10,11 +10,13 @@ import { UpdateFederatedGraphResponse, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; import { isValidUrl } from '@wundergraph/cosmo-shared'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; import { DefaultNamespace } from '../../repositories/NamespaceRepository.js'; +import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import type { RouterOptions } from '../../routes.js'; -import { enrichLogger, getLogger, handleError, isValidLabelMatchers, newCompositionOptions } from '../../util.js'; +import { enrichLogger, getLogger, handleError, isValidLabelMatchers } from '../../util.js'; import { OrganizationWebhookService } from '../../webhooks/OrganizationWebhookService.js'; import { UnauthorizedError } from '../../errors/errors.js'; @@ -30,6 +32,7 @@ export function updateFederatedGraph( logger = enrichLogger(ctx, logger, authContext); const fedGraphRepo = new FederatedGraphRepository(logger, opts.db, authContext.organizationId); + const orgRepo = new OrganizationRepository(logger, opts.db, opts.billingDefaultPlanId); const auditLogRepo = new AuditLogRepository(opts.db); const orgWebhooks = new OrganizationWebhookService( opts.db, @@ -106,6 +109,11 @@ export function updateFederatedGraph( }; } + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); + const deploymentErrors: PlainMessage[] = []; let compositionErrors: PlainMessage[] = []; const compositionWarnings: PlainMessage[] = []; @@ -119,7 +127,10 @@ export function updateFederatedGraph( admissionWebhookURL: req.admissionWebhookURL, blobStorage: opts.blobStorage, chClient: opts.chClient!, - compositionOptions: newCompositionOptions(req.disableResolvabilityValidation), + compositionOptions: { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, labelMatchers: req.labelMatchers, namespaceId: federatedGraph.namespaceId, readme: req.readme, diff --git a/controlplane/src/core/bufservices/graph/setGraphRouterCompatibilityVersion.ts b/controlplane/src/core/bufservices/graph/setGraphRouterCompatibilityVersion.ts index 4b995a3f99..27d42b0d57 100644 --- a/controlplane/src/core/bufservices/graph/setGraphRouterCompatibilityVersion.ts +++ b/controlplane/src/core/bufservices/graph/setGraphRouterCompatibilityVersion.ts @@ -6,10 +6,12 @@ import { SetGraphRouterCompatibilityVersionResponse, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; import { ROUTER_COMPATIBILITY_VERSIONS, SupportedRouterCompatibilityVersion } from '@wundergraph/composition'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; import { DefaultNamespace } from '../../repositories/NamespaceRepository.js'; +import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import type { RouterOptions } from '../../routes.js'; -import { enrichLogger, getLogger, handleError, newCompositionOptions } from '../../util.js'; +import { enrichLogger, getLogger, handleError } from '../../util.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { SubgraphRepository } from '../../repositories/SubgraphRepository.js'; import { UnauthorizedError } from '../../errors/errors.js'; @@ -30,6 +32,7 @@ export function setGraphRouterCompatibilityVersion( } const fedGraphRepo = new FederatedGraphRepository(logger, opts.db, authContext.organizationId); + const orgRepo = new OrganizationRepository(logger, opts.db, opts.billingDefaultPlanId); req.namespace = req.namespace || DefaultNamespace; @@ -110,6 +113,11 @@ export function setGraphRouterCompatibilityVersion( }; } + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); + await opts.db.transaction(async (tx) => { const fedGraphRepo = new FederatedGraphRepository(logger, tx, authContext.organizationId); @@ -140,7 +148,10 @@ export function setGraphRouterCompatibilityVersion( }, blobStorage: opts.blobStorage, chClient: opts.chClient!, - compositionOptions: newCompositionOptions(req.disableResolvabilityValidation), + compositionOptions: { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, federatedGraphs: [federatedGraph], }); diff --git a/controlplane/src/core/bufservices/monograph/publishMonograph.ts b/controlplane/src/core/bufservices/monograph/publishMonograph.ts index 9fd48dfeba..bb30418df7 100644 --- a/controlplane/src/core/bufservices/monograph/publishMonograph.ts +++ b/controlplane/src/core/bufservices/monograph/publishMonograph.ts @@ -7,7 +7,6 @@ import { PublishMonographResponse, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; import { buildSchema } from '../../composition/composition.js'; -import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; import { DefaultNamespace, NamespaceRepository } from '../../repositories/NamespaceRepository.js'; import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; @@ -34,7 +33,6 @@ export function publishMonograph( opts.logger, opts.billingDefaultPlanId, ); - const auditLogRepo = new AuditLogRepository(opts.db); const namespaceRepo = new NamespaceRepository(opts.db, authContext.organizationId); const subgraphRepo = new SubgraphRepository(logger, opts.db, authContext.organizationId); const federatedGraphRepo = new FederatedGraphRepository(logger, opts.db, authContext.organizationId); @@ -70,7 +68,12 @@ export function publishMonograph( let isV2Graph: boolean | undefined; try { - // Here we check if the schema is valid as a subgraph SDL + /* Here we check if the schema is valid as a subgraph SDL + * `buildSchema` only calls normalization in isolation. + * The `disableResolvabilityChecks` flag is only used in the federation step. + * The `ignoreExternalKeys` flag is propagated in normalization but only used in the federation step. + * Consequently, there is currently no reason to propagate the options within `buildSchema`. + */ const result = buildSchema(subgraphSchemaSDL, true, graph.routerCompatibilityVersion); if (!result.success) { return { diff --git a/controlplane/src/core/bufservices/subgraph/checkSubgraphSchema.ts b/controlplane/src/core/bufservices/subgraph/checkSubgraphSchema.ts index b37d3ae0cb..7807f22263 100644 --- a/controlplane/src/core/bufservices/subgraph/checkSubgraphSchema.ts +++ b/controlplane/src/core/bufservices/subgraph/checkSubgraphSchema.ts @@ -7,6 +7,7 @@ import { CheckSubgraphSchemaResponse, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; import { GraphQLSchema, parse } from 'graphql'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { buildSchema } from '../../composition/composition.js'; import { UnauthorizedError } from '../../errors/errors.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; @@ -189,6 +190,13 @@ export function checkSubgraphSchema( } const subgraphName = subgraph?.name || req.subgraphName; + const ignoreExternalKeys = + ( + await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }) + )?.enabled ?? false; const federatedGraphs = await fedGraphRepo.bySubgraphLabels({ labels: subgraph ? subgraph.labels : req.labels, @@ -205,7 +213,12 @@ export function checkSubgraphSchema( let newGraphQLSchema: GraphQLSchema | undefined; if (newSchemaSDL) { try { - // Here we check if the schema is valid as a subgraph SDL + /* Here we check if the schema is valid as a subgraph SDL + * `buildSchema` only calls normalization in isolation. + * The `disableResolvabilityChecks` flag is only used in the federation step. + * The `ignoreExternalKeys` flag is propagated in normalization but only used in the federation step. + * Consequently, there is currently no reason to propagate the options within `buildSchema`. + */ const result = buildSchema(newSchemaSDL, true, routerCompatibilityVersion); if (!result.success) { return { @@ -281,7 +294,10 @@ export function checkSubgraphSchema( limit, chClient: opts.chClient, newGraphQLSchema, - disableResolvabilityValidation: req.disableResolvabilityValidation, + compositionOptions: { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys, + }, webhookService, }); @@ -449,7 +465,10 @@ export function checkSubgraphSchema( limit: targetLimit, chClient: opts.chClient, newGraphQLSchema: targetNewGraphQLSchema, - disableResolvabilityValidation: req.disableResolvabilityValidation, + compositionOptions: { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys, + }, webhookService, }); diff --git a/controlplane/src/core/bufservices/subgraph/deleteFederatedSubgraph.ts b/controlplane/src/core/bufservices/subgraph/deleteFederatedSubgraph.ts index e32b6a2a02..bf115bc853 100644 --- a/controlplane/src/core/bufservices/subgraph/deleteFederatedSubgraph.ts +++ b/controlplane/src/core/bufservices/subgraph/deleteFederatedSubgraph.ts @@ -6,19 +6,15 @@ import { DeleteFederatedSubgraphRequest, DeleteFederatedSubgraphResponse, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { FeatureFlagRepository } from '../../repositories/FeatureFlagRepository.js'; import { FederatedGraphRepository } from '../../repositories/FederatedGraphRepository.js'; import { DefaultNamespace, NamespaceRepository } from '../../repositories/NamespaceRepository.js'; +import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import { SubgraphRepository } from '../../repositories/SubgraphRepository.js'; import type { RouterOptions } from '../../routes.js'; -import { - enrichLogger, - getFederatedGraphRouterCompatibilityVersion, - getLogger, - handleError, - newCompositionOptions, -} from '../../util.js'; +import { enrichLogger, getFederatedGraphRouterCompatibilityVersion, getLogger, handleError } from '../../util.js'; import { OrganizationWebhookService } from '../../webhooks/OrganizationWebhookService.js'; import { ProposalRepository } from '../../repositories/ProposalRepository.js'; import { UnauthorizedError } from '../../errors/errors.js'; @@ -38,6 +34,7 @@ export function deleteFederatedSubgraph( const proposalRepo = new ProposalRepository(opts.db, authContext.organizationId); const namespaceRepo = new NamespaceRepository(opts.db, authContext.organizationId); const fedGraphRepo = new FederatedGraphRepository(logger, opts.db, authContext.organizationId); + const orgRepo = new OrganizationRepository(logger, opts.db, opts.billingDefaultPlanId); const orgWebhooks = new OrganizationWebhookService( opts.db, authContext.organizationId, @@ -127,6 +124,11 @@ export function deleteFederatedSubgraph( } } + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); + const { affectedFederatedGraphs, compositionErrors, deploymentErrors, compositionWarnings } = await opts.db.transaction(async (tx) => { const fedGraphRepo = new FederatedGraphRepository(logger, tx, authContext.organizationId); @@ -182,7 +184,10 @@ export function deleteFederatedSubgraph( }, blobStorage: opts.blobStorage, chClient: opts.chClient!, - compositionOptions: newCompositionOptions(req.disableResolvabilityValidation), + compositionOptions: { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, federatedGraphs: affectedFederatedGraphs, }); diff --git a/controlplane/src/core/bufservices/subgraph/fixSubgraphSchema.ts b/controlplane/src/core/bufservices/subgraph/fixSubgraphSchema.ts index 78663cd491..fef57b1e57 100644 --- a/controlplane/src/core/bufservices/subgraph/fixSubgraphSchema.ts +++ b/controlplane/src/core/bufservices/subgraph/fixSubgraphSchema.ts @@ -6,6 +6,7 @@ import { FixSubgraphSchemaRequest, FixSubgraphSchemaResponse, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { Composer } from '../../composition/composer.js'; import { buildSchema } from '../../composition/composition.js'; import { OpenAIGraphql } from '../../openai-graphql/index.js'; @@ -16,13 +17,7 @@ import { DefaultNamespace, NamespaceRepository } from '../../repositories/Namesp import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import { SubgraphRepository } from '../../repositories/SubgraphRepository.js'; import type { RouterOptions } from '../../routes.js'; -import { - enrichLogger, - getFederatedGraphRouterCompatibilityVersion, - getLogger, - handleError, - newCompositionOptions, -} from '../../util.js'; +import { enrichLogger, getFederatedGraphRouterCompatibilityVersion, getLogger, handleError } from '../../util.js'; export function fixSubgraphSchema( opts: RouterOptions, @@ -116,6 +111,10 @@ export function fixSubgraphSchema( organizationId: authContext.organizationId, featureId: 'ai', }); + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); if (!feature?.enabled) { return { @@ -135,7 +134,12 @@ export function fixSubgraphSchema( labels: subgraph.labels, namespaceId: namespace.id, }); - // Here we check if the schema is valid as a subgraph + /* Here we check if the schema is valid as a subgraph SDL + * `buildSchema` only calls normalization in isolation. + * The `disableResolvabilityChecks` flag is only used in the federation step. + * The `ignoreExternalKeys` flag is propagated in normalization but only used in the federation step. + * Consequently, there is currently no reason to propagate the options within `buildSchema`. + */ const result = buildSchema( newSchemaSDL, true, @@ -174,7 +178,10 @@ export function fixSubgraphSchema( subgraph.name, subgraph.namespaceId, newSchemaSDL, - newCompositionOptions(req.disableResolvabilityValidation), + { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, ); const compositionErrors: PlainMessage[] = []; diff --git a/controlplane/src/core/bufservices/subgraph/moveSubgraph.ts b/controlplane/src/core/bufservices/subgraph/moveSubgraph.ts index 1784431735..64d26723d7 100644 --- a/controlplane/src/core/bufservices/subgraph/moveSubgraph.ts +++ b/controlplane/src/core/bufservices/subgraph/moveSubgraph.ts @@ -3,13 +3,15 @@ import { HandlerContext } from '@connectrpc/connect'; import { EnumStatusCode } from '@wundergraph/cosmo-connect/dist/common/common_pb'; import { OrganizationEventName } from '@wundergraph/cosmo-connect/dist/notifications/events_pb'; import { MoveGraphRequest, MoveGraphResponse } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { PublicError } from '../../errors/errors.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { FeatureFlagRepository } from '../../repositories/FeatureFlagRepository.js'; import { NamespaceRepository } from '../../repositories/NamespaceRepository.js'; +import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import { SubgraphRepository } from '../../repositories/SubgraphRepository.js'; import type { RouterOptions } from '../../routes.js'; -import { enrichLogger, getLogger, handleError, newCompositionOptions } from '../../util.js'; +import { enrichLogger, getLogger, handleError } from '../../util.js'; import { OrganizationWebhookService } from '../../webhooks/OrganizationWebhookService.js'; export function moveSubgraph( @@ -25,6 +27,7 @@ export function moveSubgraph( const subgraphRepo = new SubgraphRepository(logger, opts.db, authContext.organizationId); const featureFlagRepo = new FeatureFlagRepository(logger, opts.db, authContext.organizationId); + const orgRepo = new OrganizationRepository(logger, opts.db, opts.billingDefaultPlanId); const orgWebhooks = new OrganizationWebhookService( opts.db, authContext.organizationId, @@ -82,6 +85,11 @@ export function moveSubgraph( authContext, }); + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); + const { compositionErrors, updatedFederatedGraphs, deploymentErrors, compositionWarnings } = await opts.db.transaction(async (tx) => { const auditLogRepo = new AuditLogRepository(tx); @@ -117,7 +125,10 @@ export function moveSubgraph( jwtSecret: opts.admissionWebhookJWTSecret, }, opts.chClient!, - newCompositionOptions(req.disableResolvabilityValidation), + { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, ); await auditLogRepo.addAuditLog({ diff --git a/controlplane/src/core/bufservices/subgraph/publishFederatedSubgraph.ts b/controlplane/src/core/bufservices/subgraph/publishFederatedSubgraph.ts index e3748bb188..fb8aaf6861 100644 --- a/controlplane/src/core/bufservices/subgraph/publishFederatedSubgraph.ts +++ b/controlplane/src/core/bufservices/subgraph/publishFederatedSubgraph.ts @@ -8,6 +8,7 @@ import { SubgraphType, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; import { isValidUrl } from '@wundergraph/cosmo-shared'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { buildSchema } from '../../composition/composition.js'; import { UnauthorizedError } from '../../errors/errors.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; @@ -32,7 +33,6 @@ import { isValidGrpcNamingScheme, isValidLabels, isValidPluginVersion, - newCompositionOptions, } from '../../util.js'; import { OrganizationWebhookService } from '../../webhooks/OrganizationWebhookService.js'; @@ -69,6 +69,11 @@ export function publishFederatedSubgraph( throw new UnauthorizedError(); } + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); + const subgraphSchemaSDL = req.schema; const namespace = await namespaceRepo.byName(req.namespace); if (!namespace) { @@ -98,7 +103,12 @@ export function publishFederatedSubgraph( * If no federated graphs have yet been created, the subgraph will be validated against the latest router * compatibility version. */ - // Here we check if the schema is valid as a subgraph SDL + /* Here we check if the schema is valid as a subgraph SDL + * `buildSchema` only calls normalization in isolation. + * The `disableResolvabilityChecks` flag is only used in the federation step. + * The `ignoreExternalKeys` flag is propagated in normalization but only used in the federation step. + * Consequently, there is currently no reason to propagate the options within `buildSchema`. + */ const result = buildSchema(subgraphSchemaSDL, true, routerCompatibilityVersion); if (!result.success) { return { @@ -588,7 +598,10 @@ export function publishFederatedSubgraph( webhookJWTSecret: opts.admissionWebhookJWTSecret, }, opts.chClient!, - newCompositionOptions(req.disableResolvabilityValidation), + { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, ); // if this subgraph is part of a proposal, mark the proposal subgraph as published diff --git a/controlplane/src/core/bufservices/subgraph/updateSubgraph.ts b/controlplane/src/core/bufservices/subgraph/updateSubgraph.ts index 9b5fd7eab0..f27bf0366e 100644 --- a/controlplane/src/core/bufservices/subgraph/updateSubgraph.ts +++ b/controlplane/src/core/bufservices/subgraph/updateSubgraph.ts @@ -8,8 +8,10 @@ import { UpdateSubgraphResponse, } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; import { isValidUrl } from '@wundergraph/cosmo-shared'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../../../types/index.js'; import { AuditLogRepository } from '../../repositories/AuditLogRepository.js'; import { DefaultNamespace } from '../../repositories/NamespaceRepository.js'; +import { OrganizationRepository } from '../../repositories/OrganizationRepository.js'; import { SubgraphRepository } from '../../repositories/SubgraphRepository.js'; import type { RouterOptions } from '../../routes.js'; import { @@ -21,7 +23,6 @@ import { handleError, isValidGrpcNamingScheme, isValidLabels, - newCompositionOptions, } from '../../util.js'; import { OrganizationWebhookService } from '../../webhooks/OrganizationWebhookService.js'; import { UnauthorizedError } from '../../errors/errors.js'; @@ -38,6 +39,7 @@ export function updateSubgraph( logger = enrichLogger(ctx, logger, authContext); const subgraphRepo = new SubgraphRepository(logger, opts.db, authContext.organizationId); + const orgRepo = new OrganizationRepository(logger, opts.db, opts.billingDefaultPlanId); const auditLogRepo = new AuditLogRepository(opts.db); const orgWebhooks = new OrganizationWebhookService( opts.db, @@ -186,6 +188,11 @@ export function updateSubgraph( throw new UnauthorizedError(); } + const ignoreExternalKeysFeature = await orgRepo.getFeature({ + organizationId: authContext.organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }); + const { compositionErrors, updatedFederatedGraphs, deploymentErrors, compositionWarnings } = await subgraphRepo.update( { @@ -208,7 +215,10 @@ export function updateSubgraph( webhookJWTSecret: opts.admissionWebhookJWTSecret, }, opts.chClient!, - newCompositionOptions(req.disableResolvabilityValidation), + { + disableResolvabilityValidation: req.disableResolvabilityValidation, + ignoreExternalKeys: ignoreExternalKeysFeature?.enabled ?? false, + }, ); await auditLogRepo.addAuditLog({ diff --git a/controlplane/src/core/composition/composer.ts b/controlplane/src/core/composition/composer.ts index afc22b2237..e64af7f624 100644 --- a/controlplane/src/core/composition/composer.ts +++ b/controlplane/src/core/composition/composer.ts @@ -1,6 +1,7 @@ import type { UUID } from 'node:crypto'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; import { + CompositionOptions, ContractTagOptions, FederationResult, FieldConfiguration, @@ -28,7 +29,7 @@ import { RouterConfig, } from '@wundergraph/cosmo-connect/dist/node/v1/node_pb'; import { PostgresJsDatabase } from 'drizzle-orm/postgres-js'; -import { CompositionOptions, FederatedGraphDTO, Label, SubgraphDTO } from '../../types/index.js'; +import { FederatedGraphDTO, Label, SubgraphDTO } from '../../types/index.js'; import { BlobStorage } from '../blobstorage/index.js'; import { audiences, nowInSeconds, signJwtHS256 } from '../crypto/jwt.js'; import { ContractRepository } from '../repositories/ContractRepository.js'; diff --git a/controlplane/src/core/composition/composition.ts b/controlplane/src/core/composition/composition.ts index cf87b3c3c7..5eb508f041 100644 --- a/controlplane/src/core/composition/composition.ts +++ b/controlplane/src/core/composition/composition.ts @@ -1,4 +1,5 @@ import { + CompositionOptions, ContractTagOptions, federateSubgraphs, federateSubgraphsContract, @@ -10,7 +11,6 @@ import { Subgraph, SupportedRouterCompatibilityVersion, } from '@wundergraph/composition'; -import { CompositionOptions } from 'src/types/index.js'; /** * Composes a list of subgraphs and returns the result for the base graph and its contract graphs @@ -19,10 +19,10 @@ export function composeFederatedGraphWithPotentialContracts( subgraphs: Subgraph[], tagOptionsByContractName: Map, version: string, - compositionOptions?: CompositionOptions, + options?: CompositionOptions, ) { return federateSubgraphsWithContracts({ - disableResolvabilityValidation: compositionOptions?.disableResolvabilityValidation, + options, subgraphs, tagOptionsByContractName, version: validateRouterCompatibilityVersion(version), @@ -36,11 +36,11 @@ export function composeFederatedContract( subgraphs: Subgraph[], contractTagOptions: ContractTagOptions, version: string, - compositionOptions?: CompositionOptions, + options?: CompositionOptions, ) { return federateSubgraphsContract({ contractTagOptions, - disableResolvabilityValidation: compositionOptions?.disableResolvabilityValidation, + options, subgraphs, version: validateRouterCompatibilityVersion(version), }); @@ -52,10 +52,10 @@ export function composeFederatedContract( export function composeSubgraphs( subgraphs: Subgraph[], version: string, - compositionOptions?: CompositionOptions, + options?: CompositionOptions, ): FederationResult { return federateSubgraphs({ - disableResolvabilityValidation: compositionOptions?.disableResolvabilityValidation, + options, subgraphs, version: validateRouterCompatibilityVersion(version), }); @@ -64,8 +64,18 @@ export function composeSubgraphs( /** * Normalizes and builds a GraphQLSchema from a string. It is not the same as buildSchema from graphql-js. */ -export function buildSchema(schema: string, noLocation = true, version: string): NormalizationResult { - return normalizeSubgraphFromString(schema, noLocation, validateRouterCompatibilityVersion(version)); +export function buildSchema( + schema: string, + noLocation = true, + version: string, + options?: CompositionOptions, +): NormalizationResult { + return normalizeSubgraphFromString({ + noLocation, + options, + sdlString: schema, + version: validateRouterCompatibilityVersion(version), + }); } function validateRouterCompatibilityVersion(version: string): SupportedRouterCompatibilityVersion { diff --git a/controlplane/src/core/repositories/FederatedGraphRepository.ts b/controlplane/src/core/repositories/FederatedGraphRepository.ts index 239f72981f..bd9fe6f123 100644 --- a/controlplane/src/core/repositories/FederatedGraphRepository.ts +++ b/controlplane/src/core/repositories/FederatedGraphRepository.ts @@ -10,7 +10,6 @@ import { import { joinLabel, normalizeURL } from '@wundergraph/cosmo-shared'; import { and, - arrayContains, arrayOverlaps, asc, desc, @@ -33,6 +32,7 @@ import { parse } from 'graphql'; import { generateKeyPair, importPKCS8, SignJWT } from 'jose'; import { uid } from 'uid/secure'; import { + CompositionOptions, ContractTagOptions, FederationResult, FederationResultWithContracts, @@ -53,7 +53,6 @@ import { users, } from '../../db/schema.js'; import { - CompositionOptions, DateRange, FederatedGraphChangelogDTO, FederatedGraphDTO, diff --git a/controlplane/src/core/repositories/SchemaCheckRepository.ts b/controlplane/src/core/repositories/SchemaCheckRepository.ts index 81cdd0c234..77107956c8 100644 --- a/controlplane/src/core/repositories/SchemaCheckRepository.ts +++ b/controlplane/src/core/repositories/SchemaCheckRepository.ts @@ -27,6 +27,7 @@ import { } from '../../db/schema.js'; import { CheckedSubgraphDTO, + COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, FederatedGraphDTO, Label, NamespaceDTO, @@ -751,6 +752,13 @@ export class SchemaCheckRepository { organizationId, featureId: 'breaking-change-retention', }); + const ignoreExternalKeys = + ( + await orgRepo.getFeature({ + organizationId, + featureId: COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID, + }) + )?.enabled ?? false; const limit = changeRetention?.limit ?? defaultRetentionLimitInDays; @@ -819,7 +827,12 @@ export class SchemaCheckRepository { let newGraphQLSchema: GraphQLSchema | undefined; if (newSchemaSDL) { try { - // Here we check if the schema is valid as a subgraph SDL + /* Here we check if the schema is valid as a subgraph SDL + * `buildSchema` only calls normalization in isolation. + * The `disableResolvabilityChecks` flag is only used in the federation step. + * The `ignoreExternalKeys` flag is propagated in normalization but only used in the federation step. + * Consequently, there is currently no reason to propagate the options within `buildSchema`. + */ const result = buildSchema(newSchemaSDL, true, routerCompatibilityVersion); if (!result.success) { await this.update({ @@ -851,7 +864,7 @@ export class SchemaCheckRepository { } if (namespace.enableGraphPruning) { const parsedSchema = parse(newSchemaSDL); - // this new GraphQL schema conatins the location info + // this new GraphQL schema contains the location info newGraphQLSchema = buildASTSchema(parsedSchema, { assumeValid: true, assumeValidSDL: true }); } } catch (e: any) { @@ -1109,6 +1122,10 @@ export class SchemaCheckRepository { } const { composedGraphs } = await composer.composeWithProposedSchemas({ + compositionOptions: { + disableResolvabilityValidation: false, + ignoreExternalKeys, + }, inputSubgraphs: checkSubgraphs, graphs: federatedGraphs.filter((g) => !g.contract), }); @@ -1368,7 +1385,10 @@ export class SchemaCheckRepository { limit: targetLimit, chClient, newGraphQLSchema: targetNewGraphQLSchema, - disableResolvabilityValidation: false, + compositionOptions: { + disableResolvabilityValidation: false, + ignoreExternalKeys, + }, webhookService, }); diff --git a/controlplane/src/core/repositories/SubgraphRepository.ts b/controlplane/src/core/repositories/SubgraphRepository.ts index 3b8725b753..eaadcd5653 100644 --- a/controlplane/src/core/repositories/SubgraphRepository.ts +++ b/controlplane/src/core/repositories/SubgraphRepository.ts @@ -15,6 +15,7 @@ import { validate as isValidUuid } from 'uuid'; import { PostgresJsDatabase } from 'drizzle-orm/postgres-js'; import { FastifyBaseLogger } from 'fastify'; import { GraphQLSchema } from 'graphql'; +import { CompositionOptions } from '@wundergraph/composition'; import { DBSubgraphType, SchemaCheckChangeAction, WebsocketSubprotocol } from '../../db/models.js'; import * as schema from '../../db/schema.js'; import { @@ -32,7 +33,6 @@ import { users, } from '../../db/schema.js'; import { - CompositionOptions, FederatedGraphDTO, GetChecksResponse, Label, @@ -62,7 +62,6 @@ import { import { getFederatedGraphRouterCompatibilityVersion, hasLabelsChanged, - newCompositionOptions, normalizeLabels, sanitizeReadme, } from '../util.js'; @@ -1862,7 +1861,7 @@ export class SubgraphRepository { limit, chClient, newGraphQLSchema, - disableResolvabilityValidation, + compositionOptions, webhookService, }: { actorId: string; @@ -1886,7 +1885,7 @@ export class SubgraphRepository { limit: number; chClient?: ClickHouseClient; newGraphQLSchema?: GraphQLSchema; - disableResolvabilityValidation?: boolean; + compositionOptions?: CompositionOptions; webhookService: OrganizationWebhookService; }): Promise< PlainMessage & { @@ -2070,7 +2069,7 @@ export class SubgraphRepository { }); const { composedGraphs } = await composer.composeWithProposedSchemas({ - compositionOptions: newCompositionOptions(disableResolvabilityValidation), + compositionOptions, graphs: federatedGraphs.filter((g) => !g.contract), inputSubgraphs: checkSubgraphs, }); diff --git a/controlplane/src/core/util.ts b/controlplane/src/core/util.ts index 91c52f97d9..e45182361a 100644 --- a/controlplane/src/core/util.ts +++ b/controlplane/src/core/util.ts @@ -15,23 +15,16 @@ import { parse, visit } from 'graphql'; import { uid } from 'uid/secure'; import DOMPurify from 'isomorphic-dompurify'; import { + CompositionOptions, ContractTagOptions, FederationResult, FederationResultWithContracts, LATEST_ROUTER_COMPATIBILITY_VERSION, newContractTagOptionsFromArrays, } from '@wundergraph/composition'; -import { SubgraphType, ProposalOrigin } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; -import { MemberRole, WebsocketSubprotocol, ProposalOrigin as ProposalOriginEnum } from '../db/models.js'; -import { - AuthContext, - CompositionOptions, - DateRange, - FederatedGraphDTO, - Label, - ResponseMessage, - S3StorageOptions, -} from '../types/index.js'; +import { ProposalOrigin, SubgraphType } from '@wundergraph/cosmo-connect/dist/platform/v1/platform_pb'; +import { MemberRole, ProposalOrigin as ProposalOriginEnum, WebsocketSubprotocol } from '../db/models.js'; +import { AuthContext, DateRange, FederatedGraphDTO, Label, ResponseMessage, S3StorageOptions } from '../types/index.js'; import { isAuthenticationError, isAuthorizationError, isPublicError } from './errors/errors.js'; import { GraphKeyAuthContext } from './services/GraphApiTokenAuthenticator.js'; import { composeFederatedContract, composeFederatedGraphWithPotentialContracts } from './composition/composition.js'; @@ -665,15 +658,6 @@ export const convertToSubgraphType = (type: string) => { } }; -export function newCompositionOptions(disableResolvabilityValidation?: boolean): CompositionOptions | undefined { - if (!disableResolvabilityValidation) { - return; - } - return { - disableResolvabilityValidation, - }; -} - export function toProposalOriginEnum(value: ProposalOrigin): ProposalOriginEnum { switch (value) { case ProposalOrigin.EXTERNAL: { diff --git a/controlplane/src/types/index.ts b/controlplane/src/types/index.ts index b0c7cf96b2..3cf35cf690 100644 --- a/controlplane/src/types/index.ts +++ b/controlplane/src/types/index.ts @@ -804,7 +804,3 @@ export interface ProposalSubgraphDTO { isNew: boolean; labels: Label[]; } - -export type CompositionOptions = { - disableResolvabilityValidation: boolean; -}; diff --git a/controlplane/test/integrations.test.ts b/controlplane/test/integrations.test.ts index 440bf6f822..aeeaa84bf2 100644 --- a/controlplane/test/integrations.test.ts +++ b/controlplane/test/integrations.test.ts @@ -6,6 +6,7 @@ import { http, HttpResponse } from 'msw'; import { setupServer } from 'msw/node'; import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest'; import { afterAllSetup, beforeAllSetup, genID, genUniqueLabel } from '../src/core/test-util.js'; +import { COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID } from '../src/types/index.js'; import { createNamespace, resolvabilitySDLOne, resolvabilitySDLTwo, SetupTest } from './test-util.js'; let dbname = ''; @@ -265,4 +266,97 @@ describe('Federated Graph', (ctx) => { await server.close(); }); + + test('that true external entity key errors can be ignored with the composition feature flag', async () => { + const namespace = genID('namespace').toLowerCase(); + const label = genUniqueLabel(); + const graphName = genID('fedGraph'); + const externalKeySubgraphName = genID('external-key'); + const keySourceSubgraphName = genID('key-source'); + const externalKeySDL = ` + type Entity @key(fields: "id") { + id: ID! @external + } + + type Query { + entities: [Entity!]! + } + `; + const keySourceSDL = ` + type Entity @key(fields: "id") { + id: ID! + name: String! + } + `; + + const { client, server } = await SetupTest({ dbname }); + await createNamespace(client, namespace); + + const publishExternalKeySubgraph = await client.publishFederatedSubgraph({ + name: externalKeySubgraphName, + namespace, + labels: [label], + routingUrl: 'http://localhost:4001', + schema: externalKeySDL, + }); + expect(publishExternalKeySubgraph.response?.code).toBe(EnumStatusCode.OK); + + const publishKeySourceSubgraph = await client.publishFederatedSubgraph({ + name: keySourceSubgraphName, + namespace, + labels: [label], + routingUrl: 'http://localhost:4002', + schema: keySourceSDL, + }); + expect(publishKeySourceSubgraph.response?.code).toBe(EnumStatusCode.OK); + + const createGraphWithoutFeature = await client.createFederatedGraph({ + name: graphName, + namespace, + routingUrl: 'http://localhost:8080', + labelMatchers: [joinLabel(label)], + }); + expect(createGraphWithoutFeature.response?.code).toBe(EnumStatusCode.ERR_SUBGRAPH_COMPOSITION_FAILED); + expect(createGraphWithoutFeature.compositionErrors).toHaveLength(3); + + await server.close(); + + const { client: featureClient, server: featureServer } = await SetupTest({ + dbname, + enabledFeatures: [COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID], + }); + const featureNamespace = genID('namespace').toLowerCase(); + const featureLabel = genUniqueLabel(); + + await createNamespace(featureClient, featureNamespace); + + const featureExternalKeySubgraph = await featureClient.publishFederatedSubgraph({ + name: genID('external-key'), + namespace: featureNamespace, + labels: [featureLabel], + routingUrl: 'http://localhost:4001', + schema: externalKeySDL, + }); + expect(featureExternalKeySubgraph.response?.code).toBe(EnumStatusCode.OK); + + const featureKeySourceSubgraph = await featureClient.publishFederatedSubgraph({ + name: genID('key-source'), + namespace: featureNamespace, + labels: [featureLabel], + routingUrl: 'http://localhost:4002', + schema: keySourceSDL, + }); + expect(featureKeySourceSubgraph.response?.code).toBe(EnumStatusCode.OK); + + const createGraphWithFeature = await featureClient.createFederatedGraph({ + name: genID('fedGraph'), + namespace: featureNamespace, + routingUrl: 'http://localhost:8080', + labelMatchers: [joinLabel(featureLabel)], + }); + expect(createGraphWithFeature.response?.code).toBe(EnumStatusCode.OK); + expect(createGraphWithFeature.compositionErrors).toHaveLength(0); + + await featureServer.close(); + }); }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b535991dc..41666bb254 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -512,8 +512,8 @@ importers: specifier: ^2.1.13 version: 2.1.13(@tiptap/pm@2.1.13) '@wundergraph/composition': - specifier: 0.51.1 - version: 0.51.1 + specifier: workspace:* + version: link:../composition '@wundergraph/cosmo-connect': specifier: workspace:* version: link:../connect @@ -7952,9 +7952,6 @@ packages: resolution: {integrity: sha512-Nst5JdK47VIl9UcGwtv2Rcgyn5lWtZ0/mhRQ4G8NN2isxpq2TO30iqHzmwoJycjWuyUfg3GFXqP/gFHXeV57IA==} engines: {node: '>=16.0.0'} - '@wundergraph/composition@0.51.1': - resolution: {integrity: sha512-mBOWdhPAok0xRtj7omBb5jjFsb0F+m5Y5ImT60s7R8sWPP4K3ucROwcmLUBbCW4PvmzLEsLVKuMnJsVtUdtVIQ==} - '@xtuc/ieee754@1.2.0': resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} @@ -22819,16 +22816,6 @@ snapshots: dependencies: tslib: 2.8.1 - '@wundergraph/composition@0.51.1': - dependencies: - '@graphql-tools/merge': 9.0.0(graphql@16.9.0(patch_hash=hafdlc54qtxpqvetpefk646rly)) - '@graphql-tools/schema': 10.0.0(graphql@16.9.0(patch_hash=hafdlc54qtxpqvetpefk646rly)) - '@graphql-tools/utils': 11.0.0(graphql@16.9.0(patch_hash=hafdlc54qtxpqvetpefk646rly)) - core-js: 3.41.0 - graphql: 16.9.0(patch_hash=hafdlc54qtxpqvetpefk646rly) - lodash: 4.17.21 - pathe: 1.1.1 - '@xtuc/ieee754@1.2.0': {} '@xtuc/long@4.2.2': {} diff --git a/router-tests/modules/forbidden_handler_test.go b/router-tests/modules/forbidden_handler_test.go index 6907780b35..76c2b601e2 100644 --- a/router-tests/modules/forbidden_handler_test.go +++ b/router-tests/modules/forbidden_handler_test.go @@ -79,7 +79,7 @@ func TestForbiddenHandlerModule(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{ - RouterOptions: forbiddenModuleOpts(), + RouterOptions: forbiddenModuleOpts(), ModifySubgraphErrorPropagation: modifySubgraphErrorPropagation(), Subgraphs: testenv.SubgraphsConfig{ Employees: testenv.SubgraphConfig{ @@ -101,7 +101,7 @@ func TestForbiddenHandlerModule(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{ - RouterOptions: forbiddenModuleOpts(), + RouterOptions: forbiddenModuleOpts(), ModifySubgraphErrorPropagation: modifySubgraphErrorPropagation(), Subgraphs: testenv.SubgraphsConfig{ Employees: testenv.SubgraphConfig{ @@ -129,7 +129,7 @@ func TestForbiddenHandlerModule(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{ - RouterOptions: forbiddenModuleOpts(), + RouterOptions: forbiddenModuleOpts(), ModifySubgraphErrorPropagation: modifySubgraphErrorPropagation(), Subgraphs: testenv.SubgraphsConfig{ Employees: testenv.SubgraphConfig{ @@ -157,7 +157,7 @@ func TestForbiddenHandlerModule(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{ - RouterOptions: forbiddenModuleOpts(), + RouterOptions: forbiddenModuleOpts(), ModifySubgraphErrorPropagation: modifySubgraphErrorPropagation(), Subgraphs: testenv.SubgraphsConfig{ // Hobbies subgraph returns 403, employees subgraph works normally @@ -183,7 +183,7 @@ func TestForbiddenHandlerModule(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{ - RouterOptions: forbiddenModuleOpts(), + RouterOptions: forbiddenModuleOpts(), ModifySubgraphErrorPropagation: modifySubgraphErrorPropagation(), Subgraphs: testenv.SubgraphsConfig{ GlobalMiddleware: forbiddenMiddleware(), @@ -203,7 +203,7 @@ func TestForbiddenHandlerModule(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{ - RouterOptions: forbiddenModuleOpts(), + RouterOptions: forbiddenModuleOpts(), ModifySubgraphErrorPropagation: modifySubgraphErrorPropagation(), }, func(t *testing.T, xEnv *testenv.Environment) { res, err := xEnv.MakeGraphQLRequest(testenv.GraphQLRequest{ @@ -220,7 +220,7 @@ func TestForbiddenHandlerModule(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{ - RouterOptions: forbiddenModuleOpts(), + RouterOptions: forbiddenModuleOpts(), ModifySubgraphErrorPropagation: modifySubgraphErrorPropagation(), Subgraphs: testenv.SubgraphsConfig{ Employees: testenv.SubgraphConfig{ @@ -255,7 +255,7 @@ func TestForbiddenHandlerModule(t *testing.T) { var hobbiesCallCount atomic.Int32 testenv.Run(t, &testenv.Config{ - RouterOptions: forbiddenModuleOpts(), + RouterOptions: forbiddenModuleOpts(), ModifySubgraphErrorPropagation: modifySubgraphErrorPropagation(), Subgraphs: testenv.SubgraphsConfig{ // Employees is called first (root query) and returns 403. @@ -290,7 +290,7 @@ func TestForbiddenHandlerModule(t *testing.T) { // works correctly for errors that are NOT forbidden (and thus flow through // the normal pipeline without module interception). testenv.Run(t, &testenv.Config{ - RouterOptions: forbiddenModuleOpts(), + RouterOptions: forbiddenModuleOpts(), ModifySubgraphErrorPropagation: func(cfg *config.SubgraphErrorPropagationConfiguration) { cfg.Enabled = true cfg.Mode = config.SubgraphErrorPropagationModePassthrough @@ -335,7 +335,7 @@ func TestForbiddenHandlerModule(t *testing.T) { t.Parallel() testenv.Run(t, &testenv.Config{ - RouterOptions: forbiddenModuleOpts(), + RouterOptions: forbiddenModuleOpts(), ModifySubgraphErrorPropagation: modifySubgraphErrorPropagation(), Subgraphs: testenv.SubgraphsConfig{ // Hobbies subgraph returns HTTP 200 with a GraphQL error — diff --git a/router-tests/testenv/testenv.go b/router-tests/testenv/testenv.go index daf95e9e40..7fabc4a2b8 100644 --- a/router-tests/testenv/testenv.go +++ b/router-tests/testenv/testenv.go @@ -58,7 +58,6 @@ import ( "github.com/wundergraph/cosmo/demo/pkg/subgraphs/projects/src/service" "github.com/wundergraph/cosmo/router-tests/freeport" "github.com/wundergraph/cosmo/router/core" - rtrace "github.com/wundergraph/cosmo/router/pkg/trace" nodev1 "github.com/wundergraph/cosmo/router/gen/proto/wg/cosmo/node/v1" "github.com/wundergraph/cosmo/router/pkg/config" "github.com/wundergraph/cosmo/router/pkg/controlplane/configpoller" @@ -66,6 +65,7 @@ import ( rmetric "github.com/wundergraph/cosmo/router/pkg/metric" "github.com/wundergraph/cosmo/router/pkg/pubsub/datasource" pubsubNats "github.com/wundergraph/cosmo/router/pkg/pubsub/nats" + rtrace "github.com/wundergraph/cosmo/router/pkg/trace" ) var ErrEnvironmentClosed = errors.New("test environment closed") diff --git a/router/pkg/trace/config.go b/router/pkg/trace/config.go index fdf4fc35a1..0ba13389a6 100644 --- a/router/pkg/trace/config.go +++ b/router/pkg/trace/config.go @@ -72,7 +72,7 @@ type Config struct { TestMemoryExporter sdktrace.SpanExporter // TestErrorHandler is used for testing purposes. If set, the handler will be used to // handle exporter errors locally instead of relying on the global otel.SetErrorHandler. - TestErrorHandler func(error) + TestErrorHandler func(error) ResponseTraceHeader config.ResponseTraceHeader Attributes []config.CustomAttribute // SanitizeUTF8 configures sanitization of invalid UTF-8 sequences in span attribute values