From 43a7e8cd878d27d4a6e65b33b97d1e813af62552 Mon Sep 17 00:00:00 2001 From: Aenimus Date: Wed, 23 Oct 2024 16:07:17 +0100 Subject: [PATCH] chore: add contract tag options --- composition-go/index.global.js | 48 +-- .../src/federation/federation-factory.ts | 37 ++- composition/src/federation/utils.ts | 6 +- composition/tests/contracts.test.ts | 281 ++++++------------ 4 files changed, 143 insertions(+), 229 deletions(-) diff --git a/composition-go/index.global.js b/composition-go/index.global.js index 6b24d0dcfd..61e6310582 100644 --- a/composition-go/index.global.js +++ b/composition-go/index.global.js @@ -11,9 +11,9 @@ class URL { } } } -"use strict";var shim=(()=>{var p6=Object.create;var gf=Object.defineProperty,f6=Object.defineProperties,m6=Object.getOwnPropertyDescriptor,h6=Object.getOwnPropertyDescriptors,T6=Object.getOwnPropertyNames,rP=Object.getOwnPropertySymbols,y6=Object.getPrototypeOf,iP=Object.prototype.hasOwnProperty,N6=Object.prototype.propertyIsEnumerable;var Cn=Math.pow,Wv=(e,t,n)=>t in e?gf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,k=(e,t)=>{for(var n in t||(t={}))iP.call(t,n)&&Wv(e,n,t[n]);if(rP)for(var n of rP(t))N6.call(t,n)&&Wv(e,n,t[n]);return e},K=(e,t)=>f6(e,h6(t));var ue=(e,t)=>()=>(e&&(t=e(e=0)),t);var V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),If=(e,t)=>{for(var n in t)gf(e,n,{get:t[n],enumerable:!0})},sP=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of T6(t))!iP.call(e,i)&&i!==n&&gf(e,i,{get:()=>t[i],enumerable:!(r=m6(t,i))||r.enumerable});return e};var Xv=(e,t,n)=>(n=e!=null?p6(y6(e)):{},sP(t||!e||!e.__esModule?gf(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>sP(gf({},"__esModule",{value:!0}),e);var A=(e,t,n)=>(Wv(e,typeof t!="symbol"?t+"":t,n),n);var yr=(e,t,n)=>new Promise((r,i)=>{var s=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(s,o);u((n=n.apply(e,t)).next())});var m=ue(()=>{"use strict"});var O={};If(O,{_debugEnd:()=>YP,_debugProcess:()=>QP,_events:()=>ck,_eventsCount:()=>lk,_exiting:()=>DP,_fatalExceptions:()=>$P,_getActiveHandles:()=>wP,_getActiveRequests:()=>FP,_kill:()=>PP,_linkedBinding:()=>OP,_maxListeners:()=>uk,_preload_modules:()=>sk,_rawDebug:()=>_P,_startProfilerIdleNotifier:()=>JP,_stopProfilerIdleNotifier:()=>zP,_tickCallback:()=>GP,abort:()=>ZP,addListener:()=>dk,allowedNodeEnvironmentFlags:()=>BP,arch:()=>lP,argv:()=>fP,argv0:()=>ik,assert:()=>VP,binding:()=>NP,chdir:()=>IP,config:()=>AP,cpuUsage:()=>vy,cwd:()=>gP,debugPort:()=>rk,default:()=>gk,dlopen:()=>RP,domain:()=>SP,emit:()=>Tk,emitWarning:()=>yP,env:()=>pP,execArgv:()=>mP,execPath:()=>nk,exit:()=>UP,features:()=>jP,hasUncaughtExceptionCaptureCallback:()=>KP,hrtime:()=>Iy,kill:()=>CP,listeners:()=>Ek,memoryUsage:()=>xP,moduleLoadList:()=>bP,nextTick:()=>aP,off:()=>fk,on:()=>ba,once:()=>pk,openStdin:()=>MP,pid:()=>ek,platform:()=>dP,ppid:()=>tk,prependListener:()=>yk,prependOnceListener:()=>Nk,reallyExit:()=>LP,release:()=>vP,removeAllListeners:()=>hk,removeListener:()=>mk,resourceUsage:()=>kP,setSourceMapsEnabled:()=>ok,setUncaughtExceptionCaptureCallback:()=>qP,stderr:()=>WP,stdin:()=>XP,stdout:()=>HP,title:()=>cP,umask:()=>EP,uptime:()=>ak,version:()=>hP,versions:()=>TP});function t_(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function E6(){!Nd||!Qc||(Nd=!1,Qc.length?_a=Qc.concat(_a):gy=-1,_a.length&&oP())}function oP(){if(!Nd){var e=setTimeout(E6,0);Nd=!0;for(var t=_a.length;t;){for(Qc=_a,_a=[];++gy1)for(var n=1;n{"use strict";m();T();h();_a=[],Nd=!1,gy=-1;uP.prototype.run=function(){this.fun.apply(null,this.array)};cP="browser",lP="x64",dP="browser",pP={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},fP=["/usr/bin/node"],mP=[],hP="v16.8.0",TP={},yP=function(e,t){console.warn((t?t+": ":"")+e)},NP=function(e){t_("binding")},EP=function(e){return 0},gP=function(){return"/"},IP=function(e){},vP={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};_P=ti,bP=[];SP={},DP=!1,AP={};LP=ti,PP=ti,vy=function(){return{}},kP=vy,xP=vy,CP=ti,UP=ti,MP=ti,BP={};jP={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},$P=ti,qP=ti;GP=ti,QP=ti,YP=ti,JP=ti,zP=ti,HP=void 0,WP=void 0,XP=void 0,ZP=ti,ek=2,tk=1,nk="/bin/usr/node",rk=9229,ik="node",sk=[],ok=ti,ec={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};ec.now===void 0&&(Zv=Date.now(),ec.timing&&ec.timing.navigationStart&&(Zv=ec.timing.navigationStart),ec.now=()=>Date.now()-Zv);e_=1e9;Iy.bigint=function(e){var t=Iy(e);return typeof BigInt=="undefined"?t[0]*e_+t[1]:BigInt(t[0]*e_)+BigInt(t[1])};uk=10,ck={},lk=0;dk=ba,pk=ba,fk=ba,mk=ba,hk=ba,Tk=ti,yk=ba,Nk=ba;gk={version:hP,versions:TP,arch:lP,platform:dP,release:vP,_rawDebug:_P,moduleLoadList:bP,binding:NP,_linkedBinding:OP,_events:ck,_eventsCount:lk,_maxListeners:uk,on:ba,addListener:dk,once:pk,off:fk,removeListener:mk,removeAllListeners:hk,emit:Tk,prependListener:yk,prependOnceListener:Nk,listeners:Ek,domain:SP,_exiting:DP,config:AP,dlopen:RP,uptime:ak,_getActiveRequests:FP,_getActiveHandles:wP,reallyExit:LP,_kill:PP,cpuUsage:vy,resourceUsage:kP,memoryUsage:xP,kill:CP,exit:UP,openStdin:MP,allowedNodeEnvironmentFlags:BP,assert:VP,features:jP,_fatalExceptions:$P,setUncaughtExceptionCaptureCallback:qP,hasUncaughtExceptionCaptureCallback:KP,emitWarning:yP,nextTick:aP,_tickCallback:GP,_debugProcess:QP,_debugEnd:YP,_startProfilerIdleNotifier:JP,_stopProfilerIdleNotifier:zP,stdout:HP,stdin:XP,stderr:WP,abort:ZP,umask:EP,chdir:IP,cwd:gP,env:pP,title:cP,argv:fP,execArgv:mP,pid:ek,ppid:tk,execPath:nk,debugPort:rk,hrtime:Iy,argv0:ik,_preload_modules:sk,setSourceMapsEnabled:ok}});var h=ue(()=>{"use strict";Ik()});function g6(){if(vk)return vf;vk=!0,vf.byteLength=u,vf.toByteArray=d,vf.fromByteArray=N;for(var e=[],t=[],n=typeof Uint8Array!="undefined"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=r.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var x=I.indexOf("=");x===-1&&(x=b);var j=x===b?0:4-x%4;return[x,j]}function u(I){var b=o(I),x=b[0],j=b[1];return(x+j)*3/4-j}function l(I,b,x){return(b+x)*3/4-x}function d(I){var b,x=o(I),j=x[0],Q=x[1],re=new n(l(I,j,Q)),se=0,pe=Q>0?j-4:j,ye;for(ye=0;ye>16&255,re[se++]=b>>8&255,re[se++]=b&255;return Q===2&&(b=t[I.charCodeAt(ye)]<<2|t[I.charCodeAt(ye+1)]>>4,re[se++]=b&255),Q===1&&(b=t[I.charCodeAt(ye)]<<10|t[I.charCodeAt(ye+1)]<<4|t[I.charCodeAt(ye+2)]>>2,re[se++]=b>>8&255,re[se++]=b&255),re}function p(I){return e[I>>18&63]+e[I>>12&63]+e[I>>6&63]+e[I&63]}function y(I,b,x){for(var j,Q=[],re=b;repe?pe:se+re));return j===1?(b=I[x-1],Q.push(e[b>>2]+e[b<<4&63]+"==")):j===2&&(b=(I[x-2]<<8)+I[x-1],Q.push(e[b>>10]+e[b>>4&63]+e[b<<2&63]+"=")),Q.join("")}return vf}function I6(){if(_k)return _y;_k=!0;return _y.read=function(e,t,n,r,i){var s,o,u=i*8-r-1,l=(1<>1,p=-7,y=n?i-1:0,N=n?-1:1,I=e[t+y];for(y+=N,s=I&(1<<-p)-1,I>>=-p,p+=u;p>0;s=s*256+e[t+y],y+=N,p-=8);for(o=s&(1<<-p)-1,s>>=-p,p+=r;p>0;o=o*256+e[t+y],y+=N,p-=8);if(s===0)s=1-d;else{if(s===l)return o?NaN:(I?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-d}return(I?-1:1)*o*Math.pow(2,s-r)},_y.write=function(e,t,n,r,i,s){var o,u,l,d=s*8-i-1,p=(1<>1,N=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=r?0:s-1,b=r?1:-1,x=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+y>=1?t+=N/l:t+=N*Math.pow(2,1-y),t*l>=2&&(o++,l/=2),o+y>=p?(u=0,o=p):o+y>=1?(u=(t*l-1)*Math.pow(2,i),o=o+y):(u=t*Math.pow(2,y-1)*Math.pow(2,i),o=0));i>=8;e[n+I]=u&255,I+=b,u/=256,i-=8);for(o=o<0;e[n+I]=o&255,I+=b,o/=256,d-=8);e[n+I-b]|=x*128},_y}function v6(){if(bk)return Yc;bk=!0;let e=g6(),t=I6(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Yc.Buffer=o,Yc.SlowBuffer=Q,Yc.INSPECT_MAX_BYTES=50;let r=2147483647;Yc.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 F=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(F,g),F.foo()===42}catch(F){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 s(F){if(F>r)throw new RangeError('The value "'+F+'" is invalid for option "size"');let g=new Uint8Array(F);return Object.setPrototypeOf(g,o.prototype),g}function o(F,g,v){if(typeof F=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(F)}return u(F,g,v)}o.poolSize=8192;function u(F,g,v){if(typeof F=="string")return y(F,g);if(ArrayBuffer.isView(F))return I(F);if(F==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof F);if(cn(F,ArrayBuffer)||F&&cn(F.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(cn(F,SharedArrayBuffer)||F&&cn(F.buffer,SharedArrayBuffer)))return b(F,g,v);if(typeof F=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let C=F.valueOf&&F.valueOf();if(C!=null&&C!==F)return o.from(C,g,v);let J=x(F);if(J)return J;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof F[Symbol.toPrimitive]=="function")return o.from(F[Symbol.toPrimitive]("string"),g,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof F)}o.from=function(F,g,v){return u(F,g,v)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(F){if(typeof F!="number")throw new TypeError('"size" argument must be of type number');if(F<0)throw new RangeError('The value "'+F+'" is invalid for option "size"')}function d(F,g,v){return l(F),F<=0?s(F):g!==void 0?typeof v=="string"?s(F).fill(g,v):s(F).fill(g):s(F)}o.alloc=function(F,g,v){return d(F,g,v)};function p(F){return l(F),s(F<0?0:j(F)|0)}o.allocUnsafe=function(F){return p(F)},o.allocUnsafeSlow=function(F){return p(F)};function y(F,g){if((typeof g!="string"||g==="")&&(g="utf8"),!o.isEncoding(g))throw new TypeError("Unknown encoding: "+g);let v=re(F,g)|0,C=s(v),J=C.write(F,g);return J!==v&&(C=C.slice(0,J)),C}function N(F){let g=F.length<0?0:j(F.length)|0,v=s(g);for(let C=0;C=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return F|0}function Q(F){return+F!=F&&(F=0),o.alloc(+F)}o.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==o.prototype},o.compare=function(g,v){if(cn(g,Uint8Array)&&(g=o.from(g,g.offset,g.byteLength)),cn(v,Uint8Array)&&(v=o.from(v,v.offset,v.byteLength)),!o.isBuffer(g)||!o.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===v)return 0;let C=g.length,J=v.length;for(let ie=0,fe=Math.min(C,J);ieJ.length?(o.isBuffer(fe)||(fe=o.from(fe)),fe.copy(J,ie)):Uint8Array.prototype.set.call(J,fe,ie);else if(o.isBuffer(fe))fe.copy(J,ie);else throw new TypeError('"list" argument must be an Array of Buffers');ie+=fe.length}return J};function re(F,g){if(o.isBuffer(F))return F.length;if(ArrayBuffer.isView(F)||cn(F,ArrayBuffer))return F.byteLength;if(typeof F!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof F);let v=F.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&v===0)return 0;let J=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return fa(F).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return Gr(F).length;default:if(J)return C?-1:fa(F).length;g=(""+g).toLowerCase(),J=!0}}o.byteLength=re;function se(F,g,v){let C=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,g>>>=0,v<=g))return"";for(F||(F="utf8");;)switch(F){case"hex":return Xr(this,g,v);case"utf8":case"utf-8":return sn(this,g,v);case"ascii":return bn(this,g,v);case"latin1":case"binary":return mi(this,g,v);case"base64":return Ct(this,g,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pn(this,g,v);default:if(C)throw new TypeError("Unknown encoding: "+F);F=(F+"").toLowerCase(),C=!0}}o.prototype._isBuffer=!0;function pe(F,g,v){let C=F[g];F[g]=F[v],F[v]=C}o.prototype.swap16=function(){let g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;vv&&(g+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(g,v,C,J,ie){if(cn(g,Uint8Array)&&(g=o.from(g,g.offset,g.byteLength)),!o.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(v===void 0&&(v=0),C===void 0&&(C=g?g.length:0),J===void 0&&(J=0),ie===void 0&&(ie=this.length),v<0||C>g.length||J<0||ie>this.length)throw new RangeError("out of range index");if(J>=ie&&v>=C)return 0;if(J>=ie)return-1;if(v>=C)return 1;if(v>>>=0,C>>>=0,J>>>=0,ie>>>=0,this===g)return 0;let fe=ie-J,Rt=C-v,kn=Math.min(fe,Rt),Dn=this.slice(J,ie),qn=g.slice(v,C);for(let On=0;On2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,Qr(v)&&(v=J?0:F.length-1),v<0&&(v=F.length+v),v>=F.length){if(J)return-1;v=F.length-1}else if(v<0)if(J)v=0;else return-1;if(typeof g=="string"&&(g=o.from(g,C)),o.isBuffer(g))return g.length===0?-1:Ce(F,g,v,C,J);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?J?Uint8Array.prototype.indexOf.call(F,g,v):Uint8Array.prototype.lastIndexOf.call(F,g,v):Ce(F,[g],v,C,J);throw new TypeError("val must be string, number or Buffer")}function Ce(F,g,v,C,J){let ie=1,fe=F.length,Rt=g.length;if(C!==void 0&&(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if(F.length<2||g.length<2)return-1;ie=2,fe/=2,Rt/=2,v/=2}function kn(qn,On){return ie===1?qn[On]:qn.readUInt16BE(On*ie)}let Dn;if(J){let qn=-1;for(Dn=v;Dnfe&&(v=fe-Rt),Dn=v;Dn>=0;Dn--){let qn=!0;for(let On=0;OnJ&&(C=J)):C=J;let ie=g.length;C>ie/2&&(C=ie/2);let fe;for(fe=0;fe>>0,isFinite(C)?(C=C>>>0,J===void 0&&(J="utf8")):(J=C,C=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let ie=this.length-v;if((C===void 0||C>ie)&&(C=ie),g.length>0&&(C<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");let fe=!1;for(;;)switch(J){case"hex":return ht(this,g,v,C);case"utf8":case"utf-8":return xt(this,g,v,C);case"ascii":case"latin1":case"binary":return B(this,g,v,C);case"base64":return he(this,g,v,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nt(this,g,v,C);default:if(fe)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),fe=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ct(F,g,v){return g===0&&v===F.length?e.fromByteArray(F):e.fromByteArray(F.slice(g,v))}function sn(F,g,v){v=Math.min(F.length,v);let C=[],J=g;for(;J239?4:ie>223?3:ie>191?2:1;if(J+Rt<=v){let kn,Dn,qn,On;switch(Rt){case 1:ie<128&&(fe=ie);break;case 2:kn=F[J+1],(kn&192)===128&&(On=(ie&31)<<6|kn&63,On>127&&(fe=On));break;case 3:kn=F[J+1],Dn=F[J+2],(kn&192)===128&&(Dn&192)===128&&(On=(ie&15)<<12|(kn&63)<<6|Dn&63,On>2047&&(On<55296||On>57343)&&(fe=On));break;case 4:kn=F[J+1],Dn=F[J+2],qn=F[J+3],(kn&192)===128&&(Dn&192)===128&&(qn&192)===128&&(On=(ie&15)<<18|(kn&63)<<12|(Dn&63)<<6|qn&63,On>65535&&On<1114112&&(fe=On))}}fe===null?(fe=65533,Rt=1):fe>65535&&(fe-=65536,C.push(fe>>>10&1023|55296),fe=56320|fe&1023),C.push(fe),J+=Rt}return _n(C)}let Fn=4096;function _n(F){let g=F.length;if(g<=Fn)return String.fromCharCode.apply(String,F);let v="",C=0;for(;CC)&&(v=C);let J="";for(let ie=g;ieC&&(g=C),v<0?(v+=C,v<0&&(v=0)):v>C&&(v=C),vv)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(g,v,C){g=g>>>0,v=v>>>0,C||on(g,v,this.length);let J=this[g],ie=1,fe=0;for(;++fe>>0,v=v>>>0,C||on(g,v,this.length);let J=this[g+--v],ie=1;for(;v>0&&(ie*=256);)J+=this[g+--v]*ie;return J},o.prototype.readUint8=o.prototype.readUInt8=function(g,v){return g=g>>>0,v||on(g,1,this.length),this[g]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(g,v){return g=g>>>0,v||on(g,2,this.length),this[g]|this[g+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(g,v){return g=g>>>0,v||on(g,2,this.length),this[g]<<8|this[g+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(g,v){return g=g>>>0,v||on(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(g,v){return g=g>>>0,v||on(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},o.prototype.readBigUInt64LE=Ao(function(g){g=g>>>0,Je(g,"offset");let v=this[g],C=this[g+7];(v===void 0||C===void 0)&&Ht(g,this.length-8);let J=v+this[++g]*Cn(2,8)+this[++g]*Cn(2,16)+this[++g]*Cn(2,24),ie=this[++g]+this[++g]*Cn(2,8)+this[++g]*Cn(2,16)+C*Cn(2,24);return BigInt(J)+(BigInt(ie)<>>0,Je(g,"offset");let v=this[g],C=this[g+7];(v===void 0||C===void 0)&&Ht(g,this.length-8);let J=v*Cn(2,24)+this[++g]*Cn(2,16)+this[++g]*Cn(2,8)+this[++g],ie=this[++g]*Cn(2,24)+this[++g]*Cn(2,16)+this[++g]*Cn(2,8)+C;return(BigInt(J)<>>0,v=v>>>0,C||on(g,v,this.length);let J=this[g],ie=1,fe=0;for(;++fe=ie&&(J-=Math.pow(2,8*v)),J},o.prototype.readIntBE=function(g,v,C){g=g>>>0,v=v>>>0,C||on(g,v,this.length);let J=v,ie=1,fe=this[g+--J];for(;J>0&&(ie*=256);)fe+=this[g+--J]*ie;return ie*=128,fe>=ie&&(fe-=Math.pow(2,8*v)),fe},o.prototype.readInt8=function(g,v){return g=g>>>0,v||on(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},o.prototype.readInt16LE=function(g,v){g=g>>>0,v||on(g,2,this.length);let C=this[g]|this[g+1]<<8;return C&32768?C|4294901760:C},o.prototype.readInt16BE=function(g,v){g=g>>>0,v||on(g,2,this.length);let C=this[g+1]|this[g]<<8;return C&32768?C|4294901760:C},o.prototype.readInt32LE=function(g,v){return g=g>>>0,v||on(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},o.prototype.readInt32BE=function(g,v){return g=g>>>0,v||on(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},o.prototype.readBigInt64LE=Ao(function(g){g=g>>>0,Je(g,"offset");let v=this[g],C=this[g+7];(v===void 0||C===void 0)&&Ht(g,this.length-8);let J=this[g+4]+this[g+5]*Cn(2,8)+this[g+6]*Cn(2,16)+(C<<24);return(BigInt(J)<>>0,Je(g,"offset");let v=this[g],C=this[g+7];(v===void 0||C===void 0)&&Ht(g,this.length-8);let J=(v<<24)+this[++g]*Cn(2,16)+this[++g]*Cn(2,8)+this[++g];return(BigInt(J)<>>0,v||on(g,4,this.length),t.read(this,g,!0,23,4)},o.prototype.readFloatBE=function(g,v){return g=g>>>0,v||on(g,4,this.length),t.read(this,g,!1,23,4)},o.prototype.readDoubleLE=function(g,v){return g=g>>>0,v||on(g,8,this.length),t.read(this,g,!0,52,8)},o.prototype.readDoubleBE=function(g,v){return g=g>>>0,v||on(g,8,this.length),t.read(this,g,!1,52,8)};function $n(F,g,v,C,J,ie){if(!o.isBuffer(F))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>J||gF.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(g,v,C,J){if(g=+g,v=v>>>0,C=C>>>0,!J){let Rt=Math.pow(2,8*C)-1;$n(this,g,v,C,Rt,0)}let ie=1,fe=0;for(this[v]=g&255;++fe>>0,C=C>>>0,!J){let Rt=Math.pow(2,8*C)-1;$n(this,g,v,C,Rt,0)}let ie=C-1,fe=1;for(this[v+ie]=g&255;--ie>=0&&(fe*=256);)this[v+ie]=g/fe&255;return v+C},o.prototype.writeUint8=o.prototype.writeUInt8=function(g,v,C){return g=+g,v=v>>>0,C||$n(this,g,v,1,255,0),this[v]=g&255,v+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(g,v,C){return g=+g,v=v>>>0,C||$n(this,g,v,2,65535,0),this[v]=g&255,this[v+1]=g>>>8,v+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(g,v,C){return g=+g,v=v>>>0,C||$n(this,g,v,2,65535,0),this[v]=g>>>8,this[v+1]=g&255,v+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(g,v,C){return g=+g,v=v>>>0,C||$n(this,g,v,4,4294967295,0),this[v+3]=g>>>24,this[v+2]=g>>>16,this[v+1]=g>>>8,this[v]=g&255,v+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(g,v,C){return g=+g,v=v>>>0,C||$n(this,g,v,4,4294967295,0),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4};function U(F,g,v,C,J){jt(g,C,J,F,v,7);let ie=Number(g&BigInt(4294967295));F[v++]=ie,ie=ie>>8,F[v++]=ie,ie=ie>>8,F[v++]=ie,ie=ie>>8,F[v++]=ie;let fe=Number(g>>BigInt(32)&BigInt(4294967295));return F[v++]=fe,fe=fe>>8,F[v++]=fe,fe=fe>>8,F[v++]=fe,fe=fe>>8,F[v++]=fe,v}function ae(F,g,v,C,J){jt(g,C,J,F,v,7);let ie=Number(g&BigInt(4294967295));F[v+7]=ie,ie=ie>>8,F[v+6]=ie,ie=ie>>8,F[v+5]=ie,ie=ie>>8,F[v+4]=ie;let fe=Number(g>>BigInt(32)&BigInt(4294967295));return F[v+3]=fe,fe=fe>>8,F[v+2]=fe,fe=fe>>8,F[v+1]=fe,fe=fe>>8,F[v]=fe,v+8}o.prototype.writeBigUInt64LE=Ao(function(g,v=0){return U(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=Ao(function(g,v=0){return ae(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(g,v,C,J){if(g=+g,v=v>>>0,!J){let kn=Math.pow(2,8*C-1);$n(this,g,v,C,kn-1,-kn)}let ie=0,fe=1,Rt=0;for(this[v]=g&255;++ie>0)-Rt&255;return v+C},o.prototype.writeIntBE=function(g,v,C,J){if(g=+g,v=v>>>0,!J){let kn=Math.pow(2,8*C-1);$n(this,g,v,C,kn-1,-kn)}let ie=C-1,fe=1,Rt=0;for(this[v+ie]=g&255;--ie>=0&&(fe*=256);)g<0&&Rt===0&&this[v+ie+1]!==0&&(Rt=1),this[v+ie]=(g/fe>>0)-Rt&255;return v+C},o.prototype.writeInt8=function(g,v,C){return g=+g,v=v>>>0,C||$n(this,g,v,1,127,-128),g<0&&(g=255+g+1),this[v]=g&255,v+1},o.prototype.writeInt16LE=function(g,v,C){return g=+g,v=v>>>0,C||$n(this,g,v,2,32767,-32768),this[v]=g&255,this[v+1]=g>>>8,v+2},o.prototype.writeInt16BE=function(g,v,C){return g=+g,v=v>>>0,C||$n(this,g,v,2,32767,-32768),this[v]=g>>>8,this[v+1]=g&255,v+2},o.prototype.writeInt32LE=function(g,v,C){return g=+g,v=v>>>0,C||$n(this,g,v,4,2147483647,-2147483648),this[v]=g&255,this[v+1]=g>>>8,this[v+2]=g>>>16,this[v+3]=g>>>24,v+4},o.prototype.writeInt32BE=function(g,v,C){return g=+g,v=v>>>0,C||$n(this,g,v,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4},o.prototype.writeBigInt64LE=Ao(function(g,v=0){return U(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=Ao(function(g,v=0){return ae(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function te(F,g,v,C,J,ie){if(v+C>F.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function ce(F,g,v,C,J){return g=+g,v=v>>>0,J||te(F,g,v,4),t.write(F,g,v,C,23,4),v+4}o.prototype.writeFloatLE=function(g,v,C){return ce(this,g,v,!0,C)},o.prototype.writeFloatBE=function(g,v,C){return ce(this,g,v,!1,C)};function Ke(F,g,v,C,J){return g=+g,v=v>>>0,J||te(F,g,v,8),t.write(F,g,v,C,52,8),v+8}o.prototype.writeDoubleLE=function(g,v,C){return Ke(this,g,v,!0,C)},o.prototype.writeDoubleBE=function(g,v,C){return Ke(this,g,v,!1,C)},o.prototype.copy=function(g,v,C,J){if(!o.isBuffer(g))throw new TypeError("argument should be a Buffer");if(C||(C=0),!J&&J!==0&&(J=this.length),v>=g.length&&(v=g.length),v||(v=0),J>0&&J=this.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),g.length-v>>0,C=C===void 0?this.length:C>>>0,g||(g=0);let ie;if(typeof g=="number")for(ie=v;ieCn(2,32)?J=Ue(String(v)):typeof v=="bigint"&&(J=String(v),(v>Cn(BigInt(2),BigInt(32))||v<-Cn(BigInt(2),BigInt(32)))&&(J=Ue(J)),J+="n"),C+=` It must be ${g}. Received ${J}`,C},RangeError);function Ue(F){let g="",v=F.length,C=F[0]==="-"?1:0;for(;v>=C+4;v-=3)g=`_${F.slice(v-3,v)}${g}`;return`${F.slice(0,v)}${g}`}function Xe(F,g,v){Je(g,"offset"),(F[g]===void 0||F[g+v]===void 0)&&Ht(g,F.length-(v+1))}function jt(F,g,v,C,J,ie){if(F>v||F3?g===0||g===BigInt(0)?Rt=`>= 0${fe} and < 2${fe} ** ${(ie+1)*8}${fe}`:Rt=`>= -(2${fe} ** ${(ie+1)*8-1}${fe}) and < 2 ** ${(ie+1)*8-1}${fe}`:Rt=`>= ${g}${fe} and <= ${v}${fe}`,new G.ERR_OUT_OF_RANGE("value",Rt,F)}Xe(C,J,ie)}function Je(F,g){if(typeof F!="number")throw new G.ERR_INVALID_ARG_TYPE(g,"number",F)}function Ht(F,g,v){throw Math.floor(F)!==F?(Je(F,v),new G.ERR_OUT_OF_RANGE(v||"offset","an integer",F)):g<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${g}`,F)}let pa=/[^+/0-9A-Za-z-_]/g;function Li(F){if(F=F.split("=")[0],F=F.trim().replace(pa,""),F.length<2)return"";for(;F.length%4!==0;)F=F+"=";return F}function fa(F,g){g=g||1/0;let v,C=F.length,J=null,ie=[];for(let fe=0;fe55295&&v<57344){if(!J){if(v>56319){(g-=3)>-1&&ie.push(239,191,189);continue}else if(fe+1===C){(g-=3)>-1&&ie.push(239,191,189);continue}J=v;continue}if(v<56320){(g-=3)>-1&&ie.push(239,191,189),J=v;continue}v=(J-55296<<10|v-56320)+65536}else J&&(g-=3)>-1&&ie.push(239,191,189);if(J=null,v<128){if((g-=1)<0)break;ie.push(v)}else if(v<2048){if((g-=2)<0)break;ie.push(v>>6|192,v&63|128)}else if(v<65536){if((g-=3)<0)break;ie.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((g-=4)<0)break;ie.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return ie}function id(F){let g=[];for(let v=0;v>8,J=v%256,ie.push(J),ie.push(C);return ie}function Gr(F){return e.toByteArray(Li(F))}function Wi(F,g,v,C){let J;for(J=0;J=g.length||J>=F.length);++J)g[J+v]=F[J];return J}function cn(F,g){return F instanceof g||F!=null&&F.constructor!=null&&F.constructor.name!=null&&F.constructor.name===g.name}function Qr(F){return F!==F}let xc=function(){let F="0123456789abcdef",g=new Array(256);for(let v=0;v<16;++v){let C=v*16;for(let J=0;J<16;++J)g[C+J]=F[v]+F[J]}return g}();function Ao(F){return typeof BigInt=="undefined"?Cc:F}function Cc(){throw new Error("BigInt not supported")}return Yc}var vf,vk,_y,_k,Yc,bk,Jc,S,gpe,Ipe,Ok=ue(()=>{"use strict";m();T();h();vf={},vk=!1;_y={},_k=!1;Yc={},bk=!1;Jc=v6();Jc.Buffer;Jc.SlowBuffer;Jc.INSPECT_MAX_BYTES;Jc.kMaxLength;S=Jc.Buffer,gpe=Jc.INSPECT_MAX_BYTES,Ipe=Jc.kMaxLength});var T=ue(()=>{"use strict";Ok()});var Sk,Dk,Ak=ue(()=>{"use strict";m();T();h();Sk="16.9.0",Dk=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null})});function rt(e,t){if(!!!e)throw new Error(t)}var Ni=ue(()=>{"use strict";m();T();h()});function ni(e){return typeof(e==null?void 0:e.then)=="function"}var by=ue(()=>{"use strict";m();T();h()});function sr(e){return typeof e=="object"&&e!==null}var Lo=ue(()=>{"use strict";m();T();h()});function Qt(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}var ri=ue(()=>{"use strict";m();T();h()});function tc(e,t){let n=0,r=1;for(let i of e.body.matchAll(_6)){if(typeof i.index=="number"||Qt(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}var _6,Oy=ue(()=>{"use strict";m();T();h();ri();_6=/\r\n|[\n\r]/g});function _f(e){return Ed(e.source,tc(e.source,e.start))}function Ed(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,u=t.line===1?n:0,l=t.column+u,d=`${e.name}:${o}:${l} -`,p=r.split(/\r\n|[\n\r]/g),y=p[i];if(y.length>120){let N=Math.floor(l/80),I=l%80,b=[];for(let x=0;x["|",x]),["|","^".padStart(I)],["|",b[N+1]]])}return d+Rk([[`${o-1} |`,p[i-1]],[`${o} |`,y],["|","^".padStart(l)],[`${o+1} |`,p[i+1]]])}function Rk(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 n_=ue(()=>{"use strict";m();T();h();Oy()});function b6(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}function Fk(e){return e===void 0||e.length===0?void 0:e}function r_(e){return e.toString()}function i_(e){return e.toJSON()}var Y,st=ue(()=>{"use strict";m();T();h();Lo();Oy();n_();Y=class e extends Error{constructor(t,...n){var r,i,s;let{nodes:o,source:u,positions:l,path:d,originalError:p,extensions:y}=b6(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=p!=null?p:void 0,this.nodes=Fk(Array.isArray(o)?o:o?[o]:void 0);let N=Fk((r=this.nodes)===null||r===void 0?void 0:r.map(b=>b.loc).filter(b=>b!=null));this.source=u!=null?u:N==null||(i=N[0])===null||i===void 0?void 0:i.source,this.positions=l!=null?l:N==null?void 0:N.map(b=>b.start),this.locations=l&&u?l.map(b=>tc(u,b)):N==null?void 0:N.map(b=>tc(b.source,b.start));let I=sr(p==null?void 0:p.extensions)?p==null?void 0:p.extensions:void 0;this.extensions=(s=y!=null?y:I)!==null&&s!==void 0?s: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+=` +"use strict";var shim=(()=>{var p6=Object.create;var gf=Object.defineProperty,f6=Object.defineProperties,m6=Object.getOwnPropertyDescriptor,h6=Object.getOwnPropertyDescriptors,T6=Object.getOwnPropertyNames,rP=Object.getOwnPropertySymbols,y6=Object.getPrototypeOf,iP=Object.prototype.hasOwnProperty,N6=Object.prototype.propertyIsEnumerable;var Cn=Math.pow,Wv=(e,t,n)=>t in e?gf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,k=(e,t)=>{for(var n in t||(t={}))iP.call(t,n)&&Wv(e,n,t[n]);if(rP)for(var n of rP(t))N6.call(t,n)&&Wv(e,n,t[n]);return e},K=(e,t)=>f6(e,h6(t));var ue=(e,t)=>()=>(e&&(t=e(e=0)),t);var V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),If=(e,t)=>{for(var n in t)gf(e,n,{get:t[n],enumerable:!0})},sP=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of T6(t))!iP.call(e,i)&&i!==n&&gf(e,i,{get:()=>t[i],enumerable:!(r=m6(t,i))||r.enumerable});return e};var Xv=(e,t,n)=>(n=e!=null?p6(y6(e)):{},sP(t||!e||!e.__esModule?gf(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>sP(gf({},"__esModule",{value:!0}),e);var A=(e,t,n)=>(Wv(e,typeof t!="symbol"?t+"":t,n),n);var yr=(e,t,n)=>new Promise((r,i)=>{var s=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(s,o);u((n=n.apply(e,t)).next())});var m=ue(()=>{"use strict"});var O={};If(O,{_debugEnd:()=>YP,_debugProcess:()=>QP,_events:()=>ck,_eventsCount:()=>lk,_exiting:()=>DP,_fatalExceptions:()=>$P,_getActiveHandles:()=>wP,_getActiveRequests:()=>FP,_kill:()=>PP,_linkedBinding:()=>OP,_maxListeners:()=>uk,_preload_modules:()=>sk,_rawDebug:()=>_P,_startProfilerIdleNotifier:()=>JP,_stopProfilerIdleNotifier:()=>zP,_tickCallback:()=>GP,abort:()=>ZP,addListener:()=>dk,allowedNodeEnvironmentFlags:()=>BP,arch:()=>lP,argv:()=>fP,argv0:()=>ik,assert:()=>VP,binding:()=>NP,chdir:()=>IP,config:()=>AP,cpuUsage:()=>vy,cwd:()=>gP,debugPort:()=>rk,default:()=>gk,dlopen:()=>RP,domain:()=>SP,emit:()=>Tk,emitWarning:()=>yP,env:()=>pP,execArgv:()=>mP,execPath:()=>nk,exit:()=>UP,features:()=>jP,hasUncaughtExceptionCaptureCallback:()=>KP,hrtime:()=>Iy,kill:()=>CP,listeners:()=>Ek,memoryUsage:()=>xP,moduleLoadList:()=>bP,nextTick:()=>aP,off:()=>fk,on:()=>ba,once:()=>pk,openStdin:()=>MP,pid:()=>ek,platform:()=>dP,ppid:()=>tk,prependListener:()=>yk,prependOnceListener:()=>Nk,reallyExit:()=>LP,release:()=>vP,removeAllListeners:()=>hk,removeListener:()=>mk,resourceUsage:()=>kP,setSourceMapsEnabled:()=>ok,setUncaughtExceptionCaptureCallback:()=>qP,stderr:()=>WP,stdin:()=>XP,stdout:()=>HP,title:()=>cP,umask:()=>EP,uptime:()=>ak,version:()=>hP,versions:()=>TP});function t_(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function E6(){!Nd||!Qc||(Nd=!1,Qc.length?_a=Qc.concat(_a):gy=-1,_a.length&&oP())}function oP(){if(!Nd){var e=setTimeout(E6,0);Nd=!0;for(var t=_a.length;t;){for(Qc=_a,_a=[];++gy1)for(var n=1;n{"use strict";m();T();h();_a=[],Nd=!1,gy=-1;uP.prototype.run=function(){this.fun.apply(null,this.array)};cP="browser",lP="x64",dP="browser",pP={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},fP=["/usr/bin/node"],mP=[],hP="v16.8.0",TP={},yP=function(e,t){console.warn((t?t+": ":"")+e)},NP=function(e){t_("binding")},EP=function(e){return 0},gP=function(){return"/"},IP=function(e){},vP={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};_P=ti,bP=[];SP={},DP=!1,AP={};LP=ti,PP=ti,vy=function(){return{}},kP=vy,xP=vy,CP=ti,UP=ti,MP=ti,BP={};jP={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},$P=ti,qP=ti;GP=ti,QP=ti,YP=ti,JP=ti,zP=ti,HP=void 0,WP=void 0,XP=void 0,ZP=ti,ek=2,tk=1,nk="/bin/usr/node",rk=9229,ik="node",sk=[],ok=ti,ec={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};ec.now===void 0&&(Zv=Date.now(),ec.timing&&ec.timing.navigationStart&&(Zv=ec.timing.navigationStart),ec.now=()=>Date.now()-Zv);e_=1e9;Iy.bigint=function(e){var t=Iy(e);return typeof BigInt=="undefined"?t[0]*e_+t[1]:BigInt(t[0]*e_)+BigInt(t[1])};uk=10,ck={},lk=0;dk=ba,pk=ba,fk=ba,mk=ba,hk=ba,Tk=ti,yk=ba,Nk=ba;gk={version:hP,versions:TP,arch:lP,platform:dP,release:vP,_rawDebug:_P,moduleLoadList:bP,binding:NP,_linkedBinding:OP,_events:ck,_eventsCount:lk,_maxListeners:uk,on:ba,addListener:dk,once:pk,off:fk,removeListener:mk,removeAllListeners:hk,emit:Tk,prependListener:yk,prependOnceListener:Nk,listeners:Ek,domain:SP,_exiting:DP,config:AP,dlopen:RP,uptime:ak,_getActiveRequests:FP,_getActiveHandles:wP,reallyExit:LP,_kill:PP,cpuUsage:vy,resourceUsage:kP,memoryUsage:xP,kill:CP,exit:UP,openStdin:MP,allowedNodeEnvironmentFlags:BP,assert:VP,features:jP,_fatalExceptions:$P,setUncaughtExceptionCaptureCallback:qP,hasUncaughtExceptionCaptureCallback:KP,emitWarning:yP,nextTick:aP,_tickCallback:GP,_debugProcess:QP,_debugEnd:YP,_startProfilerIdleNotifier:JP,_stopProfilerIdleNotifier:zP,stdout:HP,stdin:XP,stderr:WP,abort:ZP,umask:EP,chdir:IP,cwd:gP,env:pP,title:cP,argv:fP,execArgv:mP,pid:ek,ppid:tk,execPath:nk,debugPort:rk,hrtime:Iy,argv0:ik,_preload_modules:sk,setSourceMapsEnabled:ok}});var h=ue(()=>{"use strict";Ik()});function g6(){if(vk)return vf;vk=!0,vf.byteLength=u,vf.toByteArray=d,vf.fromByteArray=N;for(var e=[],t=[],n=typeof Uint8Array!="undefined"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=r.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var C=I.indexOf("=");C===-1&&(C=_);var j=C===_?0:4-C%4;return[C,j]}function u(I){var _=o(I),C=_[0],j=_[1];return(C+j)*3/4-j}function l(I,_,C){return(_+C)*3/4-C}function d(I){var _,C=o(I),j=C[0],Q=C[1],re=new n(l(I,j,Q)),se=0,pe=Q>0?j-4:j,ye;for(ye=0;ye>16&255,re[se++]=_>>8&255,re[se++]=_&255;return Q===2&&(_=t[I.charCodeAt(ye)]<<2|t[I.charCodeAt(ye+1)]>>4,re[se++]=_&255),Q===1&&(_=t[I.charCodeAt(ye)]<<10|t[I.charCodeAt(ye+1)]<<4|t[I.charCodeAt(ye+2)]>>2,re[se++]=_>>8&255,re[se++]=_&255),re}function p(I){return e[I>>18&63]+e[I>>12&63]+e[I>>6&63]+e[I&63]}function y(I,_,C){for(var j,Q=[],re=_;repe?pe:se+re));return j===1?(_=I[C-1],Q.push(e[_>>2]+e[_<<4&63]+"==")):j===2&&(_=(I[C-2]<<8)+I[C-1],Q.push(e[_>>10]+e[_>>4&63]+e[_<<2&63]+"=")),Q.join("")}return vf}function I6(){if(_k)return _y;_k=!0;return _y.read=function(e,t,n,r,i){var s,o,u=i*8-r-1,l=(1<>1,p=-7,y=n?i-1:0,N=n?-1:1,I=e[t+y];for(y+=N,s=I&(1<<-p)-1,I>>=-p,p+=u;p>0;s=s*256+e[t+y],y+=N,p-=8);for(o=s&(1<<-p)-1,s>>=-p,p+=r;p>0;o=o*256+e[t+y],y+=N,p-=8);if(s===0)s=1-d;else{if(s===l)return o?NaN:(I?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-d}return(I?-1:1)*o*Math.pow(2,s-r)},_y.write=function(e,t,n,r,i,s){var o,u,l,d=s*8-i-1,p=(1<>1,N=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=r?0:s-1,_=r?1:-1,C=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+y>=1?t+=N/l:t+=N*Math.pow(2,1-y),t*l>=2&&(o++,l/=2),o+y>=p?(u=0,o=p):o+y>=1?(u=(t*l-1)*Math.pow(2,i),o=o+y):(u=t*Math.pow(2,y-1)*Math.pow(2,i),o=0));i>=8;e[n+I]=u&255,I+=_,u/=256,i-=8);for(o=o<0;e[n+I]=o&255,I+=_,o/=256,d-=8);e[n+I-_]|=C*128},_y}function v6(){if(bk)return Yc;bk=!0;let e=g6(),t=I6(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Yc.Buffer=o,Yc.SlowBuffer=Q,Yc.INSPECT_MAX_BYTES=50;let r=2147483647;Yc.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 F=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(F,g),F.foo()===42}catch(F){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 s(F){if(F>r)throw new RangeError('The value "'+F+'" is invalid for option "size"');let g=new Uint8Array(F);return Object.setPrototypeOf(g,o.prototype),g}function o(F,g,v){if(typeof F=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(F)}return u(F,g,v)}o.poolSize=8192;function u(F,g,v){if(typeof F=="string")return y(F,g);if(ArrayBuffer.isView(F))return I(F);if(F==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof F);if(cn(F,ArrayBuffer)||F&&cn(F.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(cn(F,SharedArrayBuffer)||F&&cn(F.buffer,SharedArrayBuffer)))return _(F,g,v);if(typeof F=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let x=F.valueOf&&F.valueOf();if(x!=null&&x!==F)return o.from(x,g,v);let J=C(F);if(J)return J;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof F[Symbol.toPrimitive]=="function")return o.from(F[Symbol.toPrimitive]("string"),g,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof F)}o.from=function(F,g,v){return u(F,g,v)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(F){if(typeof F!="number")throw new TypeError('"size" argument must be of type number');if(F<0)throw new RangeError('The value "'+F+'" is invalid for option "size"')}function d(F,g,v){return l(F),F<=0?s(F):g!==void 0?typeof v=="string"?s(F).fill(g,v):s(F).fill(g):s(F)}o.alloc=function(F,g,v){return d(F,g,v)};function p(F){return l(F),s(F<0?0:j(F)|0)}o.allocUnsafe=function(F){return p(F)},o.allocUnsafeSlow=function(F){return p(F)};function y(F,g){if((typeof g!="string"||g==="")&&(g="utf8"),!o.isEncoding(g))throw new TypeError("Unknown encoding: "+g);let v=re(F,g)|0,x=s(v),J=x.write(F,g);return J!==v&&(x=x.slice(0,J)),x}function N(F){let g=F.length<0?0:j(F.length)|0,v=s(g);for(let x=0;x=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return F|0}function Q(F){return+F!=F&&(F=0),o.alloc(+F)}o.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==o.prototype},o.compare=function(g,v){if(cn(g,Uint8Array)&&(g=o.from(g,g.offset,g.byteLength)),cn(v,Uint8Array)&&(v=o.from(v,v.offset,v.byteLength)),!o.isBuffer(g)||!o.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===v)return 0;let x=g.length,J=v.length;for(let ie=0,fe=Math.min(x,J);ieJ.length?(o.isBuffer(fe)||(fe=o.from(fe)),fe.copy(J,ie)):Uint8Array.prototype.set.call(J,fe,ie);else if(o.isBuffer(fe))fe.copy(J,ie);else throw new TypeError('"list" argument must be an Array of Buffers');ie+=fe.length}return J};function re(F,g){if(o.isBuffer(F))return F.length;if(ArrayBuffer.isView(F)||cn(F,ArrayBuffer))return F.byteLength;if(typeof F!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof F);let v=F.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&v===0)return 0;let J=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return fa(F).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return Gr(F).length;default:if(J)return x?-1:fa(F).length;g=(""+g).toLowerCase(),J=!0}}o.byteLength=re;function se(F,g,v){let x=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,g>>>=0,v<=g))return"";for(F||(F="utf8");;)switch(F){case"hex":return Xr(this,g,v);case"utf8":case"utf-8":return sn(this,g,v);case"ascii":return bn(this,g,v);case"latin1":case"binary":return mi(this,g,v);case"base64":return Ct(this,g,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pn(this,g,v);default:if(x)throw new TypeError("Unknown encoding: "+F);F=(F+"").toLowerCase(),x=!0}}o.prototype._isBuffer=!0;function pe(F,g,v){let x=F[g];F[g]=F[v],F[v]=x}o.prototype.swap16=function(){let g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;vv&&(g+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(g,v,x,J,ie){if(cn(g,Uint8Array)&&(g=o.from(g,g.offset,g.byteLength)),!o.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(v===void 0&&(v=0),x===void 0&&(x=g?g.length:0),J===void 0&&(J=0),ie===void 0&&(ie=this.length),v<0||x>g.length||J<0||ie>this.length)throw new RangeError("out of range index");if(J>=ie&&v>=x)return 0;if(J>=ie)return-1;if(v>=x)return 1;if(v>>>=0,x>>>=0,J>>>=0,ie>>>=0,this===g)return 0;let fe=ie-J,Rt=x-v,kn=Math.min(fe,Rt),Dn=this.slice(J,ie),qn=g.slice(v,x);for(let On=0;On2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,Qr(v)&&(v=J?0:F.length-1),v<0&&(v=F.length+v),v>=F.length){if(J)return-1;v=F.length-1}else if(v<0)if(J)v=0;else return-1;if(typeof g=="string"&&(g=o.from(g,x)),o.isBuffer(g))return g.length===0?-1:Ce(F,g,v,x,J);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?J?Uint8Array.prototype.indexOf.call(F,g,v):Uint8Array.prototype.lastIndexOf.call(F,g,v):Ce(F,[g],v,x,J);throw new TypeError("val must be string, number or Buffer")}function Ce(F,g,v,x,J){let ie=1,fe=F.length,Rt=g.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(F.length<2||g.length<2)return-1;ie=2,fe/=2,Rt/=2,v/=2}function kn(qn,On){return ie===1?qn[On]:qn.readUInt16BE(On*ie)}let Dn;if(J){let qn=-1;for(Dn=v;Dnfe&&(v=fe-Rt),Dn=v;Dn>=0;Dn--){let qn=!0;for(let On=0;OnJ&&(x=J)):x=J;let ie=g.length;x>ie/2&&(x=ie/2);let fe;for(fe=0;fe>>0,isFinite(x)?(x=x>>>0,J===void 0&&(J="utf8")):(J=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let ie=this.length-v;if((x===void 0||x>ie)&&(x=ie),g.length>0&&(x<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");let fe=!1;for(;;)switch(J){case"hex":return ht(this,g,v,x);case"utf8":case"utf-8":return xt(this,g,v,x);case"ascii":case"latin1":case"binary":return B(this,g,v,x);case"base64":return he(this,g,v,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nt(this,g,v,x);default:if(fe)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),fe=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ct(F,g,v){return g===0&&v===F.length?e.fromByteArray(F):e.fromByteArray(F.slice(g,v))}function sn(F,g,v){v=Math.min(F.length,v);let x=[],J=g;for(;J239?4:ie>223?3:ie>191?2:1;if(J+Rt<=v){let kn,Dn,qn,On;switch(Rt){case 1:ie<128&&(fe=ie);break;case 2:kn=F[J+1],(kn&192)===128&&(On=(ie&31)<<6|kn&63,On>127&&(fe=On));break;case 3:kn=F[J+1],Dn=F[J+2],(kn&192)===128&&(Dn&192)===128&&(On=(ie&15)<<12|(kn&63)<<6|Dn&63,On>2047&&(On<55296||On>57343)&&(fe=On));break;case 4:kn=F[J+1],Dn=F[J+2],qn=F[J+3],(kn&192)===128&&(Dn&192)===128&&(qn&192)===128&&(On=(ie&15)<<18|(kn&63)<<12|(Dn&63)<<6|qn&63,On>65535&&On<1114112&&(fe=On))}}fe===null?(fe=65533,Rt=1):fe>65535&&(fe-=65536,x.push(fe>>>10&1023|55296),fe=56320|fe&1023),x.push(fe),J+=Rt}return _n(x)}let Fn=4096;function _n(F){let g=F.length;if(g<=Fn)return String.fromCharCode.apply(String,F);let v="",x=0;for(;xx)&&(v=x);let J="";for(let ie=g;iex&&(g=x),v<0?(v+=x,v<0&&(v=0)):v>x&&(v=x),vv)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(g,v,x){g=g>>>0,v=v>>>0,x||on(g,v,this.length);let J=this[g],ie=1,fe=0;for(;++fe>>0,v=v>>>0,x||on(g,v,this.length);let J=this[g+--v],ie=1;for(;v>0&&(ie*=256);)J+=this[g+--v]*ie;return J},o.prototype.readUint8=o.prototype.readUInt8=function(g,v){return g=g>>>0,v||on(g,1,this.length),this[g]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(g,v){return g=g>>>0,v||on(g,2,this.length),this[g]|this[g+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(g,v){return g=g>>>0,v||on(g,2,this.length),this[g]<<8|this[g+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(g,v){return g=g>>>0,v||on(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(g,v){return g=g>>>0,v||on(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},o.prototype.readBigUInt64LE=Ao(function(g){g=g>>>0,Je(g,"offset");let v=this[g],x=this[g+7];(v===void 0||x===void 0)&&Ht(g,this.length-8);let J=v+this[++g]*Cn(2,8)+this[++g]*Cn(2,16)+this[++g]*Cn(2,24),ie=this[++g]+this[++g]*Cn(2,8)+this[++g]*Cn(2,16)+x*Cn(2,24);return BigInt(J)+(BigInt(ie)<>>0,Je(g,"offset");let v=this[g],x=this[g+7];(v===void 0||x===void 0)&&Ht(g,this.length-8);let J=v*Cn(2,24)+this[++g]*Cn(2,16)+this[++g]*Cn(2,8)+this[++g],ie=this[++g]*Cn(2,24)+this[++g]*Cn(2,16)+this[++g]*Cn(2,8)+x;return(BigInt(J)<>>0,v=v>>>0,x||on(g,v,this.length);let J=this[g],ie=1,fe=0;for(;++fe=ie&&(J-=Math.pow(2,8*v)),J},o.prototype.readIntBE=function(g,v,x){g=g>>>0,v=v>>>0,x||on(g,v,this.length);let J=v,ie=1,fe=this[g+--J];for(;J>0&&(ie*=256);)fe+=this[g+--J]*ie;return ie*=128,fe>=ie&&(fe-=Math.pow(2,8*v)),fe},o.prototype.readInt8=function(g,v){return g=g>>>0,v||on(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},o.prototype.readInt16LE=function(g,v){g=g>>>0,v||on(g,2,this.length);let x=this[g]|this[g+1]<<8;return x&32768?x|4294901760:x},o.prototype.readInt16BE=function(g,v){g=g>>>0,v||on(g,2,this.length);let x=this[g+1]|this[g]<<8;return x&32768?x|4294901760:x},o.prototype.readInt32LE=function(g,v){return g=g>>>0,v||on(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},o.prototype.readInt32BE=function(g,v){return g=g>>>0,v||on(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},o.prototype.readBigInt64LE=Ao(function(g){g=g>>>0,Je(g,"offset");let v=this[g],x=this[g+7];(v===void 0||x===void 0)&&Ht(g,this.length-8);let J=this[g+4]+this[g+5]*Cn(2,8)+this[g+6]*Cn(2,16)+(x<<24);return(BigInt(J)<>>0,Je(g,"offset");let v=this[g],x=this[g+7];(v===void 0||x===void 0)&&Ht(g,this.length-8);let J=(v<<24)+this[++g]*Cn(2,16)+this[++g]*Cn(2,8)+this[++g];return(BigInt(J)<>>0,v||on(g,4,this.length),t.read(this,g,!0,23,4)},o.prototype.readFloatBE=function(g,v){return g=g>>>0,v||on(g,4,this.length),t.read(this,g,!1,23,4)},o.prototype.readDoubleLE=function(g,v){return g=g>>>0,v||on(g,8,this.length),t.read(this,g,!0,52,8)},o.prototype.readDoubleBE=function(g,v){return g=g>>>0,v||on(g,8,this.length),t.read(this,g,!1,52,8)};function $n(F,g,v,x,J,ie){if(!o.isBuffer(F))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>J||gF.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(g,v,x,J){if(g=+g,v=v>>>0,x=x>>>0,!J){let Rt=Math.pow(2,8*x)-1;$n(this,g,v,x,Rt,0)}let ie=1,fe=0;for(this[v]=g&255;++fe>>0,x=x>>>0,!J){let Rt=Math.pow(2,8*x)-1;$n(this,g,v,x,Rt,0)}let ie=x-1,fe=1;for(this[v+ie]=g&255;--ie>=0&&(fe*=256);)this[v+ie]=g/fe&255;return v+x},o.prototype.writeUint8=o.prototype.writeUInt8=function(g,v,x){return g=+g,v=v>>>0,x||$n(this,g,v,1,255,0),this[v]=g&255,v+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(g,v,x){return g=+g,v=v>>>0,x||$n(this,g,v,2,65535,0),this[v]=g&255,this[v+1]=g>>>8,v+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(g,v,x){return g=+g,v=v>>>0,x||$n(this,g,v,2,65535,0),this[v]=g>>>8,this[v+1]=g&255,v+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(g,v,x){return g=+g,v=v>>>0,x||$n(this,g,v,4,4294967295,0),this[v+3]=g>>>24,this[v+2]=g>>>16,this[v+1]=g>>>8,this[v]=g&255,v+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(g,v,x){return g=+g,v=v>>>0,x||$n(this,g,v,4,4294967295,0),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4};function U(F,g,v,x,J){jt(g,x,J,F,v,7);let ie=Number(g&BigInt(4294967295));F[v++]=ie,ie=ie>>8,F[v++]=ie,ie=ie>>8,F[v++]=ie,ie=ie>>8,F[v++]=ie;let fe=Number(g>>BigInt(32)&BigInt(4294967295));return F[v++]=fe,fe=fe>>8,F[v++]=fe,fe=fe>>8,F[v++]=fe,fe=fe>>8,F[v++]=fe,v}function ae(F,g,v,x,J){jt(g,x,J,F,v,7);let ie=Number(g&BigInt(4294967295));F[v+7]=ie,ie=ie>>8,F[v+6]=ie,ie=ie>>8,F[v+5]=ie,ie=ie>>8,F[v+4]=ie;let fe=Number(g>>BigInt(32)&BigInt(4294967295));return F[v+3]=fe,fe=fe>>8,F[v+2]=fe,fe=fe>>8,F[v+1]=fe,fe=fe>>8,F[v]=fe,v+8}o.prototype.writeBigUInt64LE=Ao(function(g,v=0){return U(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=Ao(function(g,v=0){return ae(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(g,v,x,J){if(g=+g,v=v>>>0,!J){let kn=Math.pow(2,8*x-1);$n(this,g,v,x,kn-1,-kn)}let ie=0,fe=1,Rt=0;for(this[v]=g&255;++ie>0)-Rt&255;return v+x},o.prototype.writeIntBE=function(g,v,x,J){if(g=+g,v=v>>>0,!J){let kn=Math.pow(2,8*x-1);$n(this,g,v,x,kn-1,-kn)}let ie=x-1,fe=1,Rt=0;for(this[v+ie]=g&255;--ie>=0&&(fe*=256);)g<0&&Rt===0&&this[v+ie+1]!==0&&(Rt=1),this[v+ie]=(g/fe>>0)-Rt&255;return v+x},o.prototype.writeInt8=function(g,v,x){return g=+g,v=v>>>0,x||$n(this,g,v,1,127,-128),g<0&&(g=255+g+1),this[v]=g&255,v+1},o.prototype.writeInt16LE=function(g,v,x){return g=+g,v=v>>>0,x||$n(this,g,v,2,32767,-32768),this[v]=g&255,this[v+1]=g>>>8,v+2},o.prototype.writeInt16BE=function(g,v,x){return g=+g,v=v>>>0,x||$n(this,g,v,2,32767,-32768),this[v]=g>>>8,this[v+1]=g&255,v+2},o.prototype.writeInt32LE=function(g,v,x){return g=+g,v=v>>>0,x||$n(this,g,v,4,2147483647,-2147483648),this[v]=g&255,this[v+1]=g>>>8,this[v+2]=g>>>16,this[v+3]=g>>>24,v+4},o.prototype.writeInt32BE=function(g,v,x){return g=+g,v=v>>>0,x||$n(this,g,v,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4},o.prototype.writeBigInt64LE=Ao(function(g,v=0){return U(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=Ao(function(g,v=0){return ae(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function te(F,g,v,x,J,ie){if(v+x>F.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function ce(F,g,v,x,J){return g=+g,v=v>>>0,J||te(F,g,v,4),t.write(F,g,v,x,23,4),v+4}o.prototype.writeFloatLE=function(g,v,x){return ce(this,g,v,!0,x)},o.prototype.writeFloatBE=function(g,v,x){return ce(this,g,v,!1,x)};function Ke(F,g,v,x,J){return g=+g,v=v>>>0,J||te(F,g,v,8),t.write(F,g,v,x,52,8),v+8}o.prototype.writeDoubleLE=function(g,v,x){return Ke(this,g,v,!0,x)},o.prototype.writeDoubleBE=function(g,v,x){return Ke(this,g,v,!1,x)},o.prototype.copy=function(g,v,x,J){if(!o.isBuffer(g))throw new TypeError("argument should be a Buffer");if(x||(x=0),!J&&J!==0&&(J=this.length),v>=g.length&&(v=g.length),v||(v=0),J>0&&J=this.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),g.length-v>>0,x=x===void 0?this.length:x>>>0,g||(g=0);let ie;if(typeof g=="number")for(ie=v;ieCn(2,32)?J=Ue(String(v)):typeof v=="bigint"&&(J=String(v),(v>Cn(BigInt(2),BigInt(32))||v<-Cn(BigInt(2),BigInt(32)))&&(J=Ue(J)),J+="n"),x+=` It must be ${g}. Received ${J}`,x},RangeError);function Ue(F){let g="",v=F.length,x=F[0]==="-"?1:0;for(;v>=x+4;v-=3)g=`_${F.slice(v-3,v)}${g}`;return`${F.slice(0,v)}${g}`}function Xe(F,g,v){Je(g,"offset"),(F[g]===void 0||F[g+v]===void 0)&&Ht(g,F.length-(v+1))}function jt(F,g,v,x,J,ie){if(F>v||F3?g===0||g===BigInt(0)?Rt=`>= 0${fe} and < 2${fe} ** ${(ie+1)*8}${fe}`:Rt=`>= -(2${fe} ** ${(ie+1)*8-1}${fe}) and < 2 ** ${(ie+1)*8-1}${fe}`:Rt=`>= ${g}${fe} and <= ${v}${fe}`,new G.ERR_OUT_OF_RANGE("value",Rt,F)}Xe(x,J,ie)}function Je(F,g){if(typeof F!="number")throw new G.ERR_INVALID_ARG_TYPE(g,"number",F)}function Ht(F,g,v){throw Math.floor(F)!==F?(Je(F,v),new G.ERR_OUT_OF_RANGE(v||"offset","an integer",F)):g<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${g}`,F)}let pa=/[^+/0-9A-Za-z-_]/g;function Li(F){if(F=F.split("=")[0],F=F.trim().replace(pa,""),F.length<2)return"";for(;F.length%4!==0;)F=F+"=";return F}function fa(F,g){g=g||1/0;let v,x=F.length,J=null,ie=[];for(let fe=0;fe55295&&v<57344){if(!J){if(v>56319){(g-=3)>-1&&ie.push(239,191,189);continue}else if(fe+1===x){(g-=3)>-1&&ie.push(239,191,189);continue}J=v;continue}if(v<56320){(g-=3)>-1&&ie.push(239,191,189),J=v;continue}v=(J-55296<<10|v-56320)+65536}else J&&(g-=3)>-1&&ie.push(239,191,189);if(J=null,v<128){if((g-=1)<0)break;ie.push(v)}else if(v<2048){if((g-=2)<0)break;ie.push(v>>6|192,v&63|128)}else if(v<65536){if((g-=3)<0)break;ie.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((g-=4)<0)break;ie.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return ie}function id(F){let g=[];for(let v=0;v>8,J=v%256,ie.push(J),ie.push(x);return ie}function Gr(F){return e.toByteArray(Li(F))}function Wi(F,g,v,x){let J;for(J=0;J=g.length||J>=F.length);++J)g[J+v]=F[J];return J}function cn(F,g){return F instanceof g||F!=null&&F.constructor!=null&&F.constructor.name!=null&&F.constructor.name===g.name}function Qr(F){return F!==F}let xc=function(){let F="0123456789abcdef",g=new Array(256);for(let v=0;v<16;++v){let x=v*16;for(let J=0;J<16;++J)g[x+J]=F[v]+F[J]}return g}();function Ao(F){return typeof BigInt=="undefined"?Cc:F}function Cc(){throw new Error("BigInt not supported")}return Yc}var vf,vk,_y,_k,Yc,bk,Jc,S,gpe,Ipe,Ok=ue(()=>{"use strict";m();T();h();vf={},vk=!1;_y={},_k=!1;Yc={},bk=!1;Jc=v6();Jc.Buffer;Jc.SlowBuffer;Jc.INSPECT_MAX_BYTES;Jc.kMaxLength;S=Jc.Buffer,gpe=Jc.INSPECT_MAX_BYTES,Ipe=Jc.kMaxLength});var T=ue(()=>{"use strict";Ok()});var Sk,Dk,Ak=ue(()=>{"use strict";m();T();h();Sk="16.9.0",Dk=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null})});function rt(e,t){if(!!!e)throw new Error(t)}var Ni=ue(()=>{"use strict";m();T();h()});function ni(e){return typeof(e==null?void 0:e.then)=="function"}var by=ue(()=>{"use strict";m();T();h()});function sr(e){return typeof e=="object"&&e!==null}var Lo=ue(()=>{"use strict";m();T();h()});function Qt(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}var ri=ue(()=>{"use strict";m();T();h()});function tc(e,t){let n=0,r=1;for(let i of e.body.matchAll(_6)){if(typeof i.index=="number"||Qt(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}var _6,Oy=ue(()=>{"use strict";m();T();h();ri();_6=/\r\n|[\n\r]/g});function _f(e){return Ed(e.source,tc(e.source,e.start))}function Ed(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,u=t.line===1?n:0,l=t.column+u,d=`${e.name}:${o}:${l} +`,p=r.split(/\r\n|[\n\r]/g),y=p[i];if(y.length>120){let N=Math.floor(l/80),I=l%80,_=[];for(let C=0;C["|",C]),["|","^".padStart(I)],["|",_[N+1]]])}return d+Rk([[`${o-1} |`,p[i-1]],[`${o} |`,y],["|","^".padStart(l)],[`${o+1} |`,p[i+1]]])}function Rk(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 n_=ue(()=>{"use strict";m();T();h();Oy()});function b6(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}function Fk(e){return e===void 0||e.length===0?void 0:e}function r_(e){return e.toString()}function i_(e){return e.toJSON()}var Y,st=ue(()=>{"use strict";m();T();h();Lo();Oy();n_();Y=class e extends Error{constructor(t,...n){var r,i,s;let{nodes:o,source:u,positions:l,path:d,originalError:p,extensions:y}=b6(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=p!=null?p:void 0,this.nodes=Fk(Array.isArray(o)?o:o?[o]:void 0);let N=Fk((r=this.nodes)===null||r===void 0?void 0:r.map(_=>_.loc).filter(_=>_!=null));this.source=u!=null?u:N==null||(i=N[0])===null||i===void 0?void 0:i.source,this.positions=l!=null?l:N==null?void 0:N.map(_=>_.start),this.locations=l&&u?l.map(_=>tc(u,_)):N==null?void 0:N.map(_=>tc(_.source,_.start));let I=sr(p==null?void 0:p.extensions)?p==null?void 0:p.extensions:void 0;this.extensions=(s=y!=null?y:I)!==null&&s!==void 0?s: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+=` `+_f(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` @@ -32,7 +32,7 @@ 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}});function xy(e){return Ei(e,ko)}var ko,Cy=ue(()=>{"use strict";m();T();h();Ni();Nn();Rf();ko=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||rt(!1,`Body must be a string. Received: ${ne(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||rt(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||rt(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}});function io(e,t){return new _d(e,t).parseDocument()}function Ff(e,t){let n=new _d(e,t);n.expectToken(le.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(le.EOF),r}function a_(e,t){let n=new _d(e,t);n.expectToken(le.SOF);let r=n.parseConstValueLiteral();return n.expectToken(le.EOF),r}function u_(e,t){let n=new _d(e,t);n.expectToken(le.SOF);let r=n.parseTypeReference();return n.expectToken(le.EOF),r}function Uy(e){let t=e.value;return Uk(e.kind)+(t!=null?` "${t}"`:"")}function Uk(e){return wy(e)?`"${e}"`:e}var _d,bd=ue(()=>{"use strict";m();T();h();Sy();Po();gd();Xt();Py();Cy();Df();_d=class{constructor(t,n={}){let r=xy(t)?t:new ko(t);this._lexer=new Oa(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(le.NAME);return this.node(t,{kind:R.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:R.DOCUMENT,definitions:this.many(le.SOF,this.parseDefinition,le.EOF)})}parseDefinition(){if(this.peek(le.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===le.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 er(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(le.BRACE_L))return this.node(t,{kind:R.OPERATION_DEFINITION,operation:Un.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(le.NAME)&&(r=this.parseName()),this.node(t,{kind:R.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(le.NAME);switch(t.value){case"query":return Un.QUERY;case"mutation":return Un.MUTATION;case"subscription":return Un.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(le.PAREN_L,this.parseVariableDefinition,le.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:R.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(le.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(le.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(le.DOLLAR),this.node(t,{kind:R.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:R.SELECTION_SET,selections:this.many(le.BRACE_L,this.parseSelection,le.BRACE_R)})}parseSelection(){return this.peek(le.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(le.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:R.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(le.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(le.PAREN_L,n,le.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(le.COLON),this.node(n,{kind:R.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(le.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(le.NAME)?this.node(t,{kind:R.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:R.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:R.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:R.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 le.BRACKET_L:return this.parseList(t);case le.BRACE_L:return this.parseObject(t);case le.INT:return this.advanceLexer(),this.node(n,{kind:R.INT,value:n.value});case le.FLOAT:return this.advanceLexer(),this.node(n,{kind:R.FLOAT,value:n.value});case le.STRING:case le.BLOCK_STRING:return this.parseStringLiteral();case le.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:R.BOOLEAN,value:!0});case"false":return this.node(n,{kind:R.BOOLEAN,value:!1});case"null":return this.node(n,{kind:R.NULL});default:return this.node(n,{kind:R.ENUM,value:n.value})}case le.DOLLAR:if(t)if(this.expectToken(le.DOLLAR),this._lexer.token.kind===le.NAME){let r=this._lexer.token.value;throw er(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:R.STRING,value:t.value,block:t.kind===le.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:R.LIST,values:this.any(le.BRACKET_L,n,le.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:R.OBJECT,fields:this.any(le.BRACE_L,n,le.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(le.COLON),this.node(n,{kind:R.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(le.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(le.AT),this.node(n,{kind:R.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(le.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(le.BRACKET_R),n=this.node(t,{kind:R.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(le.BANG)?this.node(t,{kind:R.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:R.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(le.STRING)||this.peek(le.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(le.BRACE_L,this.parseOperationTypeDefinition,le.BRACE_R);return this.node(t,{kind:R.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(le.COLON);let r=this.parseNamedType();return this.node(t,{kind:R.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:R.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(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:R.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(le.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(le.BRACE_L,this.parseFieldDefinition,le.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(le.COLON);let s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:R.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(le.PAREN_L,this.parseInputValueDef,le.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(le.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(le.EQUALS)&&(s=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:R.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:R.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:R.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(le.EQUALS)?this.delimitedMany(le.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:R.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(le.BRACE_L,this.parseEnumValueDefinition,le.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:R.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 er(this._lexer.source,this._lexer.token.start,`${Uy(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(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:R.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(le.BRACE_L,this.parseInputValueDef,le.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===le.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(le.BRACE_L,this.parseOperationTypeDefinition,le.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:R.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:R.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(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:R.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:R.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}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:R.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:R.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:R.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(le.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:R.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(le.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(He,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new zc(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 er(this._lexer.source,n.start,`Expected ${Uk(t)}, found ${Uy(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===le.NAME&&n.value===t)this.advanceLexer();else throw er(this._lexer.source,n.start,`Expected "${t}", found ${Uy(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===le.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return er(this._lexer.source,n.start,`Unexpected ${Uy(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!==le.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw er(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}});function ii(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let s=r.map(l=>`"${l}"`);switch(s.length){case 0:return"";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}let o=s.slice(0,5),u=o.pop();return i+o.join(", ")+", or "+u+"?"}var rc=ue(()=>{"use strict";m();T();h()});function c_(e){return e}var Mk=ue(()=>{"use strict";m();T();h()});function si(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}var ic=ue(()=>{"use strict";m();T();h()});function Ss(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}var wf=ue(()=>{"use strict";m();T();h()});function so(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}var l_=ue(()=>{"use strict";m();T();h()});function Sa(e,t){let n=0,r=0;for(;n0);let u=0;do++r,u=u*10+s-d_,s=t.charCodeAt(r);while(My(s)&&u>0);if(ou)return 1}else{if(is)return 1;++n,++r}}return e.length-t.length}function My(e){return!isNaN(e)&&d_<=e&&e<=$6}var d_,$6,Lf=ue(()=>{"use strict";m();T();h();d_=48,$6=57});function gi(e,t){let n=Object.create(null),r=new p_(e),i=Math.floor(e.length*.4)+1;for(let s of t){let o=r.measure(s,i);o!==void 0&&(n[s]=o)}return Object.keys(n).sort((s,o)=>{let u=n[s]-n[o];return u!==0?u:Sa(s,o)})}function Bk(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();h();Lf();p_=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=Bk(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=Bk(r),s=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 y=l[(p-1)%3],N=l[p%3],I=N[0]=p;for(let b=1;b<=u;b++){let x=i[p-1]===s[b-1]?0:1,j=Math.min(y[b]+1,N[b-1]+1,y[b-1]+x);if(p>1&&b>1&&i[p-1]===s[b-2]&&i[p-2]===s[b-1]){let Q=l[(p-2)%3][b-2];j=Math.min(j,Q+1)}jn)return}let d=l[o%3][u];return d<=n?d:void 0}}});function Ii(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 By=ue(()=>{"use strict";m();T();h()});function Vk(e){return`"${e.replace(q6,K6)}"`}function K6(e){return G6[e.charCodeAt(0)]}var q6,G6,jk=ue(()=>{"use strict";m();T();h();q6=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;G6=["\\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"]});function Ds(e,t,n=s_){let r=new Map;for(let Q of Object.values(R))r.set(Q,Da(t,Q));let i,s=Array.isArray(e),o=[e],u=-1,l=[],d=e,p,y,N=[],I=[];do{u++;let Q=u===o.length,re=Q&&l.length!==0;if(Q){if(p=I.length===0?void 0:N[N.length-1],d=y,y=I.pop(),re)if(s){d=d.slice();let pe=0;for(let[ye,Ce]of l){let ht=ye-pe;Ce===null?(d.splice(ht,1),pe++):d[ht]=Ce}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[pe,ye]of l)d[pe]=ye}u=i.index,o=i.keys,l=i.edits,s=i.inArray,i=i.prev}else if(y){if(p=s?u:o[u],d=y[p],d==null)continue;N.push(p)}let se;if(!Array.isArray(d)){var b,x;bf(d)||rt(!1,`Invalid AST Node: ${ne(d)}.`);let pe=Q?(b=r.get(d.kind))===null||b===void 0?void 0:b.leave:(x=r.get(d.kind))===null||x===void 0?void 0:x.enter;if(se=pe==null?void 0:pe.call(t,d,p,y,N,I),se===oc)break;if(se===!1){if(!Q){N.pop();continue}}else if(se!==void 0&&(l.push([p,se]),!Q))if(bf(se))d=se;else{N.pop();continue}}if(se===void 0&&re&&l.push([p,d]),Q)N.pop();else{var j;i={inArray:s,index:u,keys:o,edits:l,prev:i},s=Array.isArray(d),o=s?d:(j=n[d.kind])!==null&&j!==void 0?j:[],u=-1,l=[],y&&I.push(y),y=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function Od(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(R)){let i=!1,s=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let l=0;l{"use strict";m();T();h();Ni();Nn();Po();Xt();oc=Object.freeze({})});function Ft(e){return Ds(e,Y6)}function Ge(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function oo(e){return Yt(`{ +spurious results.`)}}return!1}});function xy(e){return Ei(e,ko)}var ko,Cy=ue(()=>{"use strict";m();T();h();Ni();Nn();Rf();ko=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||rt(!1,`Body must be a string. Received: ${ne(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||rt(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||rt(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}});function io(e,t){return new _d(e,t).parseDocument()}function Ff(e,t){let n=new _d(e,t);n.expectToken(le.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(le.EOF),r}function a_(e,t){let n=new _d(e,t);n.expectToken(le.SOF);let r=n.parseConstValueLiteral();return n.expectToken(le.EOF),r}function u_(e,t){let n=new _d(e,t);n.expectToken(le.SOF);let r=n.parseTypeReference();return n.expectToken(le.EOF),r}function Uy(e){let t=e.value;return Uk(e.kind)+(t!=null?` "${t}"`:"")}function Uk(e){return wy(e)?`"${e}"`:e}var _d,bd=ue(()=>{"use strict";m();T();h();Sy();Po();gd();Xt();Py();Cy();Df();_d=class{constructor(t,n={}){let r=xy(t)?t:new ko(t);this._lexer=new Oa(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(le.NAME);return this.node(t,{kind:R.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:R.DOCUMENT,definitions:this.many(le.SOF,this.parseDefinition,le.EOF)})}parseDefinition(){if(this.peek(le.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===le.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 er(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(le.BRACE_L))return this.node(t,{kind:R.OPERATION_DEFINITION,operation:Un.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(le.NAME)&&(r=this.parseName()),this.node(t,{kind:R.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(le.NAME);switch(t.value){case"query":return Un.QUERY;case"mutation":return Un.MUTATION;case"subscription":return Un.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(le.PAREN_L,this.parseVariableDefinition,le.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:R.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(le.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(le.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(le.DOLLAR),this.node(t,{kind:R.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:R.SELECTION_SET,selections:this.many(le.BRACE_L,this.parseSelection,le.BRACE_R)})}parseSelection(){return this.peek(le.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(le.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:R.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(le.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(le.PAREN_L,n,le.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(le.COLON),this.node(n,{kind:R.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(le.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(le.NAME)?this.node(t,{kind:R.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:R.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:R.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:R.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 le.BRACKET_L:return this.parseList(t);case le.BRACE_L:return this.parseObject(t);case le.INT:return this.advanceLexer(),this.node(n,{kind:R.INT,value:n.value});case le.FLOAT:return this.advanceLexer(),this.node(n,{kind:R.FLOAT,value:n.value});case le.STRING:case le.BLOCK_STRING:return this.parseStringLiteral();case le.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:R.BOOLEAN,value:!0});case"false":return this.node(n,{kind:R.BOOLEAN,value:!1});case"null":return this.node(n,{kind:R.NULL});default:return this.node(n,{kind:R.ENUM,value:n.value})}case le.DOLLAR:if(t)if(this.expectToken(le.DOLLAR),this._lexer.token.kind===le.NAME){let r=this._lexer.token.value;throw er(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:R.STRING,value:t.value,block:t.kind===le.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:R.LIST,values:this.any(le.BRACKET_L,n,le.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:R.OBJECT,fields:this.any(le.BRACE_L,n,le.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(le.COLON),this.node(n,{kind:R.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(le.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(le.AT),this.node(n,{kind:R.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(le.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(le.BRACKET_R),n=this.node(t,{kind:R.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(le.BANG)?this.node(t,{kind:R.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:R.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(le.STRING)||this.peek(le.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(le.BRACE_L,this.parseOperationTypeDefinition,le.BRACE_R);return this.node(t,{kind:R.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(le.COLON);let r=this.parseNamedType();return this.node(t,{kind:R.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:R.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(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:R.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(le.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(le.BRACE_L,this.parseFieldDefinition,le.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(le.COLON);let s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:R.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(le.PAREN_L,this.parseInputValueDef,le.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(le.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(le.EQUALS)&&(s=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:R.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:R.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:R.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(le.EQUALS)?this.delimitedMany(le.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:R.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(le.BRACE_L,this.parseEnumValueDefinition,le.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:R.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 er(this._lexer.source,this._lexer.token.start,`${Uy(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(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:R.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(le.BRACE_L,this.parseInputValueDef,le.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===le.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(le.BRACE_L,this.parseOperationTypeDefinition,le.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:R.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:R.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(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:R.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:R.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}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:R.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:R.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:R.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(le.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:R.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(le.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(He,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new zc(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 er(this._lexer.source,n.start,`Expected ${Uk(t)}, found ${Uy(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===le.NAME&&n.value===t)this.advanceLexer();else throw er(this._lexer.source,n.start,`Expected "${t}", found ${Uy(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===le.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return er(this._lexer.source,n.start,`Unexpected ${Uy(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!==le.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw er(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}});function ii(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let s=r.map(l=>`"${l}"`);switch(s.length){case 0:return"";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}let o=s.slice(0,5),u=o.pop();return i+o.join(", ")+", or "+u+"?"}var rc=ue(()=>{"use strict";m();T();h()});function c_(e){return e}var Mk=ue(()=>{"use strict";m();T();h()});function si(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}var ic=ue(()=>{"use strict";m();T();h()});function Ss(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}var wf=ue(()=>{"use strict";m();T();h()});function so(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}var l_=ue(()=>{"use strict";m();T();h()});function Sa(e,t){let n=0,r=0;for(;n0);let u=0;do++r,u=u*10+s-d_,s=t.charCodeAt(r);while(My(s)&&u>0);if(ou)return 1}else{if(is)return 1;++n,++r}}return e.length-t.length}function My(e){return!isNaN(e)&&d_<=e&&e<=$6}var d_,$6,Lf=ue(()=>{"use strict";m();T();h();d_=48,$6=57});function gi(e,t){let n=Object.create(null),r=new p_(e),i=Math.floor(e.length*.4)+1;for(let s of t){let o=r.measure(s,i);o!==void 0&&(n[s]=o)}return Object.keys(n).sort((s,o)=>{let u=n[s]-n[o];return u!==0?u:Sa(s,o)})}function Bk(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();h();Lf();p_=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=Bk(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=Bk(r),s=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 y=l[(p-1)%3],N=l[p%3],I=N[0]=p;for(let _=1;_<=u;_++){let C=i[p-1]===s[_-1]?0:1,j=Math.min(y[_]+1,N[_-1]+1,y[_-1]+C);if(p>1&&_>1&&i[p-1]===s[_-2]&&i[p-2]===s[_-1]){let Q=l[(p-2)%3][_-2];j=Math.min(j,Q+1)}jn)return}let d=l[o%3][u];return d<=n?d:void 0}}});function Ii(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 By=ue(()=>{"use strict";m();T();h()});function Vk(e){return`"${e.replace(q6,K6)}"`}function K6(e){return G6[e.charCodeAt(0)]}var q6,G6,jk=ue(()=>{"use strict";m();T();h();q6=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;G6=["\\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"]});function Ds(e,t,n=s_){let r=new Map;for(let Q of Object.values(R))r.set(Q,Da(t,Q));let i,s=Array.isArray(e),o=[e],u=-1,l=[],d=e,p,y,N=[],I=[];do{u++;let Q=u===o.length,re=Q&&l.length!==0;if(Q){if(p=I.length===0?void 0:N[N.length-1],d=y,y=I.pop(),re)if(s){d=d.slice();let pe=0;for(let[ye,Ce]of l){let ht=ye-pe;Ce===null?(d.splice(ht,1),pe++):d[ht]=Ce}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[pe,ye]of l)d[pe]=ye}u=i.index,o=i.keys,l=i.edits,s=i.inArray,i=i.prev}else if(y){if(p=s?u:o[u],d=y[p],d==null)continue;N.push(p)}let se;if(!Array.isArray(d)){var _,C;bf(d)||rt(!1,`Invalid AST Node: ${ne(d)}.`);let pe=Q?(_=r.get(d.kind))===null||_===void 0?void 0:_.leave:(C=r.get(d.kind))===null||C===void 0?void 0:C.enter;if(se=pe==null?void 0:pe.call(t,d,p,y,N,I),se===oc)break;if(se===!1){if(!Q){N.pop();continue}}else if(se!==void 0&&(l.push([p,se]),!Q))if(bf(se))d=se;else{N.pop();continue}}if(se===void 0&&re&&l.push([p,d]),Q)N.pop();else{var j;i={inArray:s,index:u,keys:o,edits:l,prev:i},s=Array.isArray(d),o=s?d:(j=n[d.kind])!==null&&j!==void 0?j:[],u=-1,l=[],y&&I.push(y),y=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function Od(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(R)){let i=!1,s=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let l=0;l{"use strict";m();T();h();Ni();Nn();Po();Xt();oc=Object.freeze({})});function Ft(e){return Ds(e,Y6)}function Ge(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function oo(e){return Yt(`{ `,Vy(Ge(e,` `)),` }`)}function Yt(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Vy(e){return Yt(" ",e.replace(/\n/g,` @@ -63,11 +63,11 @@ spurious results.`)}}return!1}});function xy(e){return Ei(e,ko)}var ko,Cy=ue(()= 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 pt(Bn),resolve:e=>e.name},description:{type:Bn,resolve:e=>e.description},isRepeatable:{type:new pt(Br),resolve:e=>e.isRepeatable},locations:{type:new pt(new Mn(new pt(Gf))),resolve:e=>e.locations},args:{type:new pt(new Mn(new pt(rl))),args:{includeDeprecated:{type:Br,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),Gf=new oi({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:He.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:He.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:He.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:He.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:He.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:He.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:He.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:He.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:He.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:He.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:He.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:He.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:He.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:He.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:He.UNION,description:"Location adjacent to a union definition."},ENUM:{value:He.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:He.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:He.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:He.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),Mi=new _r({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 pt(Jf),resolve(e){if(tr(e))return mn.SCALAR;if(ot(e))return mn.OBJECT;if(Nt(e))return mn.INTERFACE;if(fn(e))return mn.UNION;if(rn(e))return mn.ENUM;if(It(e))return mn.INPUT_OBJECT;if(Pt(e))return mn.LIST;if(Qe(e))return mn.NON_NULL;Qt(!1,`Unexpected type: "${ne(e)}".`)}},name:{type:Bn,resolve:e=>"name"in e?e.name:void 0},description:{type:Bn,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Bn,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Mn(new pt(Qf)),args:{includeDeprecated:{type:Br,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(ot(e)||Nt(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new Mn(new pt(Mi)),resolve(e){if(ot(e)||Nt(e))return e.getInterfaces()}},possibleTypes:{type:new Mn(new pt(Mi)),resolve(e,t,n,{schema:r}){if(zr(e))return r.getPossibleTypes(e)}},enumValues:{type:new Mn(new pt(Yf)),args:{includeDeprecated:{type:Br,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(rn(e)){let n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new Mn(new pt(rl)),args:{includeDeprecated:{type:Br,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(It(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Mi,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:Br,resolve:e=>{if(It(e))return e.isOneOf}}})}),Qf=new _r({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 pt(Bn),resolve:e=>e.name},description:{type:Bn,resolve:e=>e.description},args:{type:new pt(new Mn(new pt(rl))),args:{includeDeprecated:{type:Br,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new pt(Mi),resolve:e=>e.type},isDeprecated:{type:new pt(Br),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Bn,resolve:e=>e.deprecationReason}})}),rl=new _r({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 pt(Bn),resolve:e=>e.name},description:{type:Bn,resolve:e=>e.description},type:{type:new pt(Mi),resolve:e=>e.type},defaultValue:{type:Bn,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=Hr(n,t);return r?Ft(r):null}},isDeprecated:{type:new pt(Br),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Bn,resolve:e=>e.deprecationReason}})}),Yf=new _r({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 pt(Bn),resolve:e=>e.name},description:{type:Bn,resolve:e=>e.description},isDeprecated:{type:new pt(Br),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Bn,resolve:e=>e.deprecationReason}})});(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"})(mn||(mn={}));Jf=new oi({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:mn.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:mn.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:mn.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:mn.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:mn.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:mn.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:mn.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:mn.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Fa={name:"__schema",type:new pt(nl),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},wa={name:"__type",type:Mi,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new pt(Bn),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},La={name:"__typename",type:new pt(Bn),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},Mo=Object.freeze([nl,Kf,Gf,Mi,Qf,rl,Yf,Jf])});function Gy(e){return Ei(e,Bi)}function il(e){if(!Gy(e))throw new Error(`Expected ${ne(e)} to be a GraphQL schema.`);return e}function co(e,t){let n=Gn(e);if(!t.has(n)){if(t.add(n),fn(n))for(let r of n.getTypes())co(r,t);else if(ot(n)||Nt(n)){for(let r of n.getInterfaces())co(r,t);for(let r of Object.values(n.getFields())){co(r.type,t);for(let i of r.args)co(i.type,t)}}else if(It(n))for(let r of Object.values(n.getFields()))co(r.type,t)}return t}var Bi,sl=ue(()=>{"use strict";m();T();h();Ni();Nn();Rf();Lo();By();Po();Zt();Ui();As();Bi=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,sr(t)||rt(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||rt(!1,`"types" must be Array if provided but got: ${ne(t.types)}.`),!t.directives||Array.isArray(t.directives)||rt(!1,`"directives" must be Array if provided but got: ${ne(t.directives)}.`),this.description=t.description,this.extensions=Ii(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:ai;let i=new Set(t.types);if(t.types!=null)for(let s of t.types)i.delete(s),co(s,i);this._queryType!=null&&co(this._queryType,i),this._mutationType!=null&&co(this._mutationType,i),this._subscriptionType!=null&&co(this._subscriptionType,i);for(let s of this._directives)if(uc(s))for(let o of s.args)co(o.type,i);co(nl,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let s of i){if(s==null)continue;let o=s.name;if(o||rt(!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]=s,Nt(s)){for(let u of s.getInterfaces())if(Nt(u)){let l=this._implementationsMap[u.name];l===void 0&&(l=this._implementationsMap[u.name]={objects:[],interfaces:[]}),l.interfaces.push(s)}}else if(ot(s)){for(let u of s.getInterfaces())if(Nt(u)){let l=this._implementationsMap[u.name];l===void 0&&(l=this._implementationsMap[u.name]={objects:[],interfaces:[]}),l.objects.push(s)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case Un.QUERY:return this.getQueryType();case Un.MUTATION:return this.getMutationType();case Un.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return fn(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),fn(t))for(let i of t.getTypes())r[i.name]=!0;else{let i=this.getImplementations(t);for(let s of i.objects)r[s.name]=!0;for(let s of i.interfaces)r[s.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}}}});function Ud(e){if(il(e),e.__validationErrors)return e.__validationErrors;let t=new P_(e);H6(t),W6(t),X6(t);let n=t.getErrors();return e.__validationErrors=n,n}function al(e){let t=Ud(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}function H6(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!ot(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${ne(n)}.`,(r=L_(t,Un.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!ot(i)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${ne(i)}.`,(s=L_(t,Un.MUTATION))!==null&&s!==void 0?s:i.astNode)}let o=t.getSubscriptionType();if(o&&!ot(o)){var u;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${ne(o)}.`,(u=L_(t,Un.SUBSCRIPTION))!==null&&u!==void 0?u:o.astNode)}}function L_(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 W6(e){for(let n of e.schema.getDirectives()){if(!uc(n)){e.reportError(`Expected directive but got: ${ne(n)}.`,n==null?void 0:n.astNode);continue}ol(e,n);for(let r of n.args)if(ol(e,r),Nr(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${ne(r.type)}.`,r.astNode),cs(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[k_(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function ol(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function X6(e){let t=sH(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!Aa(r)){e.reportError(`Expected GraphQL named type but got: ${ne(r)}.`,r.astNode);continue}ui(r)||ol(e,r),ot(r)||Nt(r)?(Jk(e,r),zk(e,r)):fn(r)?tH(e,r):rn(r)?nH(e,r):It(r)&&(rH(e,r),t(r))}}function Jk(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(ol(e,o),!us(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${ne(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(let u of o.args){let l=u.name;if(ol(e,u),!Nr(u.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${ne(u.type)}.`,(i=u.astNode)===null||i===void 0?void 0:i.type)}if(cs(u)&&u.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[k_(u.astNode),(s=u.astNode)===null||s===void 0?void 0:s.type])}}}}function zk(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!Nt(r)){e.reportError(`Type ${ne(t)} must only implement Interface types, it cannot implement ${ne(r)}.`,zf(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,zf(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,zf(t,r));continue}n[r.name]=!0,eH(e,t,r),Z6(e,t,r)}}function Z6(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(!ao(e.schema,p.type,l.type)){var i,s;e.reportError(`Interface field ${n.name}.${d} expects type ${ne(l.type)} but ${t.name}.${d} is type ${ne(p.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(s=p.astNode)===null||s===void 0?void 0:s.type])}for(let y of l.args){let N=y.name,I=p.args.find(b=>b.name===N);if(!I){e.reportError(`Interface field argument ${n.name}.${d}(${N}:) expected but ${t.name}.${d} does not provide it.`,[y.astNode,p.astNode]);continue}if(!tl(y.type,I.type)){var o,u;e.reportError(`Interface field argument ${n.name}.${d}(${N}:) expects type ${ne(y.type)} but ${t.name}.${d}(${N}:) is type ${ne(I.type)}.`,[(o=y.astNode)===null||o===void 0?void 0:o.type,(u=I.astNode)===null||u===void 0?void 0:u.type])}}for(let y of p.args){let N=y.name;!l.args.find(b=>b.name===N)&&cs(y)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${N} that is missing from the Interface field ${n.name}.${d}.`,[y.astNode,l.astNode])}}}function eH(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}.`,[...zf(n,i),...zf(t,n)])}function tH(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.`,Hk(t,i.name));continue}r[i.name]=!0,ot(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${ne(i)}.`,Hk(t,String(i)))}}function nH(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)ol(e,r)}function rH(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 s of n){if(ol(e,s),!Nr(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${ne(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type)}if(Ra(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[k_(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&iH(t,s,e)}}function iH(e,t,n){if(Qe(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 sH(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(s){if(t[s.name])return;t[s.name]=!0,r[s.name]=n.length;let o=Object.values(s.getFields());for(let u of o)if(Qe(u.type)&&It(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),y=p.map(N=>N.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${y}".`,p.map(N=>N.astNode))}n.pop()}r[s.name]=void 0}}function zf(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.interfaces)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t.name)}function Hk(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.types)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t)}function k_(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===Uo.name)}var P_,Hf=ue(()=>{"use strict";m();T();h();Nn();st();Po();jf();Zt();Ui();As();sl();P_=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new Y(t,{nodes:r}))}getErrors(){return this._errors}}});function Qn(e,t){switch(t.kind){case R.LIST_TYPE:{let n=Qn(e,t.type);return n&&new Mn(n)}case R.NON_NULL_TYPE:{let n=Qn(e,t.type);return n&&new pt(n)}case R.NAMED_TYPE:return e.getType(t.name.value)}}var Bo=ue(()=>{"use strict";m();T();h();Xt();Zt()});function oH(e,t,n){let r=n.name.value;if(r===Fa.name&&e.getQueryType()===t)return Fa;if(r===wa.name&&e.getQueryType()===t)return wa;if(r===La.name&&vi(t))return La;if(ot(t)||Nt(t))return t.getFields()[r]}function ul(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=Da(t,r.kind).enter;if(i){let s=i.apply(t,n);return s!==void 0&&(e.leave(r),bf(s)&&e.enter(s)),s}},leave(...n){let r=n[0],i=Da(t,r.kind).leave,s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}var Pa,Qy=ue(()=>{"use strict";m();T();h();Po();Xt();Wc();Zt();As();Bo();Pa=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:oH,n&&(Nr(n)&&this._inputTypeStack.push(n),vi(n)&&this._parentTypeStack.push(n),us(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 R.SELECTION_SET:{let i=Gn(this.getType());this._parentTypeStack.push(vi(i)?i:void 0);break}case R.FIELD:{let i=this.getParentType(),s,o;i&&(s=this._getFieldDef(n,i,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push(us(o)?o:void 0);break}case R.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case R.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push(ot(i)?i:void 0);break}case R.INLINE_FRAGMENT:case R.FRAGMENT_DEFINITION:{let i=t.typeCondition,s=i?Qn(n,i):Gn(this.getType());this._typeStack.push(us(s)?s:void 0);break}case R.VARIABLE_DEFINITION:{let i=Qn(n,t.type);this._inputTypeStack.push(Nr(i)?i:void 0);break}case R.ARGUMENT:{var r;let i,s,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(u=>u.name===t.name.value),i&&(s=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(Nr(s)?s:void 0);break}case R.LIST:{let i=el(this.getInputType()),s=Pt(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Nr(s)?s:void 0);break}case R.OBJECT_FIELD:{let i=Gn(this.getInputType()),s,o;It(i)&&(o=i.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(Nr(s)?s:void 0);break}case R.ENUM:{let i=Gn(this.getInputType()),s;rn(i)&&(s=i.getValue(t.value)),this._enumValue=s;break}default:}}leave(t){switch(t.kind){case R.SELECTION_SET:this._parentTypeStack.pop();break;case R.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case R.DIRECTIVE:this._directive=null;break;case R.OPERATION_DEFINITION:case R.INLINE_FRAGMENT:case R.FRAGMENT_DEFINITION:this._typeStack.pop();break;case R.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case R.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case R.LIST:case R.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case R.ENUM:this._enumValue=null;break;default:}}}});function x_(e){return Md(e)||Bd(e)||Vd(e)}function Md(e){return e.kind===R.OPERATION_DEFINITION||e.kind===R.FRAGMENT_DEFINITION}function C_(e){return e.kind===R.FIELD||e.kind===R.FRAGMENT_SPREAD||e.kind===R.INLINE_FRAGMENT}function Yy(e){return e.kind===R.VARIABLE||e.kind===R.INT||e.kind===R.FLOAT||e.kind===R.STRING||e.kind===R.BOOLEAN||e.kind===R.NULL||e.kind===R.ENUM||e.kind===R.LIST||e.kind===R.OBJECT}function Wf(e){return Yy(e)&&(e.kind===R.LIST?e.values.some(Wf):e.kind===R.OBJECT?e.fields.some(t=>Wf(t.value)):e.kind!==R.VARIABLE)}function U_(e){return e.kind===R.NAMED_TYPE||e.kind===R.LIST_TYPE||e.kind===R.NON_NULL_TYPE}function Bd(e){return e.kind===R.SCHEMA_DEFINITION||Rs(e)||e.kind===R.DIRECTIVE_DEFINITION}function Rs(e){return e.kind===R.SCALAR_TYPE_DEFINITION||e.kind===R.OBJECT_TYPE_DEFINITION||e.kind===R.INTERFACE_TYPE_DEFINITION||e.kind===R.UNION_TYPE_DEFINITION||e.kind===R.ENUM_TYPE_DEFINITION||e.kind===R.INPUT_OBJECT_TYPE_DEFINITION}function Vd(e){return e.kind===R.SCHEMA_EXTENSION||lc(e)}function lc(e){return e.kind===R.SCALAR_TYPE_EXTENSION||e.kind===R.OBJECT_TYPE_EXTENSION||e.kind===R.INTERFACE_TYPE_EXTENSION||e.kind===R.UNION_TYPE_EXTENSION||e.kind===R.ENUM_TYPE_EXTENSION||e.kind===R.INPUT_OBJECT_TYPE_EXTENSION}var cl=ue(()=>{"use strict";m();T();h();Xt()});function Xf(e){return{Document(t){for(let n of t.definitions)if(!Md(n)){let r=n.kind===R.SCHEMA_DEFINITION||n.kind===R.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new Y(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}var M_=ue(()=>{"use strict";m();T();h();st();Xt();cl()});function Zf(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),s=t.name.value,o=ii("to use an inline fragment on",aH(i,n,s));o===""&&(o=ii(uH(n,s))),e.reportError(new Y(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}))}}}}function aH(e,t,n){if(!zr(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 s;u.getFields()[n]&&(r.add(u),i[u.name]=((s=i[u.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((o,u)=>{let l=i[u.name]-i[o.name];return l!==0?l:Nt(o)&&e.isSubType(o,u)?-1:Nt(u)&&e.isSubType(u,o)?1:Sa(o.name,u.name)}).map(o=>o.name)}function uH(e,t){if(ot(e)||Nt(e)){let n=Object.keys(e.getFields());return gi(t,n)}return[]}var B_=ue(()=>{"use strict";m();T();h();rc();Lf();sc();st();Zt()});function em(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=Qn(e.getSchema(),n);if(r&&!vi(r)){let i=Ft(n);e.reportError(new Y(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=Qn(e.getSchema(),t.typeCondition);if(n&&!vi(n)){let r=Ft(t.typeCondition);e.reportError(new Y(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}var V_=ue(()=>{"use strict";m();T();h();st();is();Zt();Bo()});function tm(e){return K(k({},j_(e)),{Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let s=t.name.value,o=r.args.map(l=>l.name),u=gi(s,o);e.reportError(new Y(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+ii(u),{nodes:t}))}}})}function j_(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():ai;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===R.DIRECTIVE_DEFINITION){var s;let u=(s=o.arguments)!==null&&s!==void 0?s:[];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 y=gi(p,l);e.reportError(new Y(`Unknown argument "${p}" on directive "@${u}".`+ii(y),{nodes:d}))}}return!1}}}var $_=ue(()=>{"use strict";m();T();h();rc();sc();st();Xt();Ui()});function jd(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():ai;for(let s of r)t[s.name]=s.locations;let i=e.getDocument().definitions;for(let s of i)s.kind===R.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return{Directive(s,o,u,l,d){let p=s.name.value,y=t[p];if(!y){e.reportError(new Y(`Unknown directive "@${p}".`,{nodes:s}));return}let N=cH(d);N&&!y.includes(N)&&e.reportError(new Y(`Directive "@${p}" may not be used on ${N}.`,{nodes:s}))}}}function cH(e){let t=e[e.length-1];switch("kind"in t||Qt(!1),t.kind){case R.OPERATION_DEFINITION:return lH(t.operation);case R.FIELD:return He.FIELD;case R.FRAGMENT_SPREAD:return He.FRAGMENT_SPREAD;case R.INLINE_FRAGMENT:return He.INLINE_FRAGMENT;case R.FRAGMENT_DEFINITION:return He.FRAGMENT_DEFINITION;case R.VARIABLE_DEFINITION:return He.VARIABLE_DEFINITION;case R.SCHEMA_DEFINITION:case R.SCHEMA_EXTENSION:return He.SCHEMA;case R.SCALAR_TYPE_DEFINITION:case R.SCALAR_TYPE_EXTENSION:return He.SCALAR;case R.OBJECT_TYPE_DEFINITION:case R.OBJECT_TYPE_EXTENSION:return He.OBJECT;case R.FIELD_DEFINITION:return He.FIELD_DEFINITION;case R.INTERFACE_TYPE_DEFINITION:case R.INTERFACE_TYPE_EXTENSION:return He.INTERFACE;case R.UNION_TYPE_DEFINITION:case R.UNION_TYPE_EXTENSION:return He.UNION;case R.ENUM_TYPE_DEFINITION:case R.ENUM_TYPE_EXTENSION:return He.ENUM;case R.ENUM_VALUE_DEFINITION:return He.ENUM_VALUE;case R.INPUT_OBJECT_TYPE_DEFINITION:case R.INPUT_OBJECT_TYPE_EXTENSION:return He.INPUT_OBJECT;case R.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||Qt(!1),n.kind===R.INPUT_OBJECT_TYPE_DEFINITION?He.INPUT_FIELD_DEFINITION:He.ARGUMENT_DEFINITION}default:Qt(!1,"Unexpected kind: "+ne(t.kind))}}function lH(e){switch(e){case Un.QUERY:return He.QUERY;case Un.MUTATION:return He.MUTATION;case Un.SUBSCRIPTION:return He.SUBSCRIPTION}}var q_=ue(()=>{"use strict";m();T();h();Nn();ri();st();Po();gd();Xt();Ui()});function nm(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new Y(`Unknown fragment "${n}".`,{nodes:t.name}))}}}var K_=ue(()=>{"use strict";m();T();h();st()});function $d(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let s of e.getDocument().definitions)Rs(s)&&(r[s.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,o,u,l,d){let p=s.name.value;if(!n[p]&&!r[p]){var y;let N=(y=d[2])!==null&&y!==void 0?y:u,I=N!=null&&dH(N);if(I&&Wk.includes(p))return;let b=gi(p,I?Wk.concat(i):i);e.reportError(new Y(`Unknown type "${p}".`+ii(b),{nodes:s}))}}}}function dH(e){return"kind"in e&&(Bd(e)||Vd(e))}var Wk,G_=ue(()=>{"use strict";m();T();h();rc();sc();st();cl();As();Co();Wk=[...xo,...Mo].map(e=>e.name)});function rm(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===R.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new Y("This anonymous operation must be the only defined operation.",{nodes:n}))}}}var Q_=ue(()=>{"use strict";m();T();h();st();Xt()});function im(e){var t,n,r;let i=e.getSchema(),s=(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(s){e.reportError(new Y("Cannot define a new schema within a schema extension.",{nodes:u}));return}o>0&&e.reportError(new Y("Must provide only one schema definition.",{nodes:u})),++o}}}var Y_=ue(()=>{"use strict";m();T();h();st()});function sm(e){function t(n,r=Object.create(null),i=0){if(n.kind===R.FRAGMENT_SPREAD){let s=n.name.value;if(r[s]===!0)return!1;let o=e.getFragment(s);if(!o)return!1;try{return r[s]=!0,t(o,r,i)}finally{r[s]=void 0}}if(n.kind===R.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=pH))return!0;if("selectionSet"in n&&n.selectionSet){for(let s of n.selectionSet.selections)if(t(s,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new Y("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}var pH,J_=ue(()=>{"use strict";m();T();h();st();Xt();pH=3});function om(e){let t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;let o=s.name.value;t[o]=!0;let u=e.getFragmentSpreads(s.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 y=e.getFragment(d);y&&i(y)}else{let y=n.slice(p),N=y.slice(0,-1).map(I=>'"'+I.name.value+'"').join(", ");e.reportError(new Y(`Cannot spread fragment "${d}" within itself`+(N!==""?` via ${N}.`:"."),{nodes:y}))}n.pop()}r[o]=void 0}}}var z_=ue(()=>{"use strict";m();T();h();st()});function am(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 s=i.name.value;t[s]!==!0&&e.reportError(new Y(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}var H_=ue(()=>{"use strict";m();T();h();st()});function um(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 s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(let i of n){let s=i.name.value;r[s]!==!0&&e.reportError(new Y(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}var W_=ue(()=>{"use strict";m();T();h();st()});function cm(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:s}of i)r[s.name.value]=!0;for(let s of t){let o=s.variable.name.value;r[o]!==!0&&e.reportError(new Y(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}var X_=ue(()=>{"use strict";m();T();h();st()});function qd(e){switch(e.kind){case R.OBJECT:return K(k({},e),{fields:fH(e.fields)});case R.LIST:return K(k({},e),{values:e.values.map(qd)});case R.INT:case R.FLOAT:case R.STRING:case R.BOOLEAN:case R.NULL:case R.ENUM:case R.VARIABLE:return e}}function fH(e){return e.map(t=>K(k({},t),{value:qd(t.value)})).sort((t,n)=>Sa(t.name.value,n.name.value))}var Z_=ue(()=>{"use strict";m();T();h();Lf();Xt()});function Zk(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Zk(n)).join(" and "):e}function lm(e){let t=new nb,n=new Map;return{SelectionSet(r){let i=mH(e,n,t,e.getParentType(),r);for(let[[s,o],u,l]of i){let d=Zk(o);e.reportError(new Y(`Fields "${s}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:u.concat(l)}))}}}}function mH(e,t,n,r,i){let s=[],[o,u]=Hy(e,t,r,i);if(TH(e,s,t,n,o),u.length!==0)for(let l=0;l1)for(let u=0;u[s.value,o]));return n.every(s=>{let o=s.value,u=i.get(s.name.value);return u===void 0?!1:Xk(o)===Xk(u)})}function Xk(e){return Ft(qd(e))}function eb(e,t){return Pt(e)?Pt(t)?eb(e.ofType,t.ofType):!0:Pt(t)?!0:Qe(e)?Qe(t)?eb(e.ofType,t.ofType):!0:Qe(t)?!0:Rr(e)||Rr(t)?e!==t:!1}function Hy(e,t,n,r){let i=t.get(r);if(i)return i;let s=Object.create(null),o=Object.create(null);tx(e,n,r,s,o);let u=[s,Object.keys(o)];return t.set(r,u),u}function tb(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=Qn(e.getSchema(),n.typeCondition);return Hy(e,t,i,n.selectionSet)}function tx(e,t,n,r,i){for(let s of n.selections)switch(s.kind){case R.FIELD:{let o=s.name.value,u;(ot(t)||Nt(t))&&(u=t.getFields()[o]);let l=s.alias?s.alias.value:o;r[l]||(r[l]=[]),r[l].push([t,s,u]);break}case R.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case R.INLINE_FRAGMENT:{let o=s.typeCondition,u=o?Qn(e.getSchema(),o):t;tx(e,u,s.selectionSet,r,i);break}}}function NH(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 nb,ib=ue(()=>{"use strict";m();T();h();Nn();st();Xt();is();Zt();Z_();Bo();nb=class{constructor(){this._data=new Map}has(t,n,r){var i;let[s,o]=t{"use strict";m();T();h();Nn();st();Zt();jf();Bo()});function pm(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)Rs(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){let s=i.name.value,o=n[s],u=t==null?void 0:t.getType(s),l;if(o?l=gH[o.kind]:u&&(l=IH(u)),l){if(l!==i.kind){let d=vH(i.kind);e.reportError(new Y(`Cannot extend non-${d} type "${s}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(k(k({},n),t==null?void 0:t.getTypeMap())),p=gi(s,d);e.reportError(new Y(`Cannot extend type "${s}" because it is not defined.`+ii(p),{nodes:i.name}))}}}function IH(e){if(tr(e))return R.SCALAR_TYPE_EXTENSION;if(ot(e))return R.OBJECT_TYPE_EXTENSION;if(Nt(e))return R.INTERFACE_TYPE_EXTENSION;if(fn(e))return R.UNION_TYPE_EXTENSION;if(rn(e))return R.ENUM_TYPE_EXTENSION;if(It(e))return R.INPUT_OBJECT_TYPE_EXTENSION;Qt(!1,"Unexpected type: "+ne(e))}function vH(e){switch(e){case R.SCALAR_TYPE_EXTENSION:return"scalar";case R.OBJECT_TYPE_EXTENSION:return"object";case R.INTERFACE_TYPE_EXTENSION:return"interface";case R.UNION_TYPE_EXTENSION:return"union";case R.ENUM_TYPE_EXTENSION:return"enum";case R.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:Qt(!1,"Unexpected kind: "+ne(e))}}var gH,ob=ue(()=>{"use strict";m();T();h();rc();Nn();ri();sc();st();Xt();cl();Zt();gH={[R.SCALAR_TYPE_DEFINITION]:R.SCALAR_TYPE_EXTENSION,[R.OBJECT_TYPE_DEFINITION]:R.OBJECT_TYPE_EXTENSION,[R.INTERFACE_TYPE_DEFINITION]:R.INTERFACE_TYPE_EXTENSION,[R.UNION_TYPE_DEFINITION]:R.UNION_TYPE_EXTENSION,[R.ENUM_TYPE_DEFINITION]:R.ENUM_TYPE_EXTENSION,[R.INPUT_OBJECT_TYPE_DEFINITION]:R.INPUT_OBJECT_TYPE_EXTENSION}});function fm(e){return K(k({},ab(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(s=>s.name.value));for(let s of r.args)if(!i.has(s.name)&&cs(s)){let o=ne(s.type);e.reportError(new Y(`Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function ab(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:ai;for(let u of i)n[u.name]=si(u.args.filter(cs),l=>l.name);let s=e.getDocument().definitions;for(let u of s)if(u.kind===R.DIRECTIVE_DEFINITION){var o;let l=(o=u.arguments)!==null&&o!==void 0?o:[];n[u.name.value]=si(l.filter(_H),d=>d.name.value)}return{Directive:{leave(u){let l=u.name.value,d=n[l];if(d){var p;let y=(p=u.arguments)!==null&&p!==void 0?p:[],N=new Set(y.map(I=>I.name.value));for(let[I,b]of Object.entries(d))if(!N.has(I)){let x=ac(b.type)?ne(b.type):Ft(b.type);e.reportError(new Y(`Directive "@${l}" argument "${I}" of type "${x}" is required, but it was not provided.`,{nodes:u}))}}}}}}function _H(e){return e.type.kind===R.NON_NULL_TYPE&&e.defaultValue==null}var ub=ue(()=>{"use strict";m();T();h();Nn();ic();st();Xt();is();Zt();Ui()});function mm(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if(Rr(Gn(n))){if(r){let i=t.name.value,s=ne(n);e.reportError(new Y(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){let i=t.name.value,s=ne(n);e.reportError(new Y(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}var cb=ue(()=>{"use strict";m();T();h();Nn();st();Zt()});function Wy(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}var lb=ue(()=>{"use strict";m();T();h()});function ka(e,t,n){return{prev:e,key:t,typename:n}}function br(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}var hm=ue(()=>{"use strict";m();T();h()});function ym(e,t,n=bH){return Tm(e,t,n,void 0)}function bH(e,t,n){let r="Invalid value "+ne(t);throw e.length>0&&(r+=` at "value${Wy(e)}"`),n.message=r+": "+n.message,n}function Tm(e,t,n,r){if(Qe(t)){if(e!=null)return Tm(e,t.ofType,n,r);n(br(r),e,new Y(`Expected non-nullable type "${ne(t)}" not to be null.`));return}if(e==null)return null;if(Pt(t)){let i=t.ofType;return Cd(e)?Array.from(e,(s,o)=>{let u=ka(r,o,void 0);return Tm(s,i,n,u)}):[Tm(e,i,n,r)]}if(It(t)){if(!sr(e)){n(br(r),e,new Y(`Expected type "${t.name}" to be an object.`));return}let i={},s=t.getFields();for(let o of Object.values(s)){let u=e[o.name];if(u===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if(Qe(o.type)){let l=ne(o.type);n(br(r),e,new Y(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=Tm(u,o.type,n,ka(r,o.name,t.name))}for(let o of Object.keys(e))if(!s[o]){let u=gi(o,Object.keys(t.getFields()));n(br(r),e,new Y(`Field "${o}" is not defined by type "${t.name}".`+ii(u)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n(br(r),e,new Y(`Exactly one key must be specified for OneOf type "${t.name}".`));let u=o[0],l=i[u];l===null&&n(br(r).concat(u),l,new Y(`Field "${u}" must be non-null.`))}return i}if(Rr(t)){let i;try{i=t.parseValue(e)}catch(s){s instanceof Y?n(br(r),e,s):n(br(r),e,new Y(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return i===void 0&&n(br(r),e,new Y(`Expected type "${t.name}".`)),i}Qt(!1,"Unexpected input type: "+ne(t))}var db=ue(()=>{"use strict";m();T();h();rc();Nn();ri();Ky();Lo();hm();lb();sc();st();Zt()});function _i(e,t,n){if(e){if(e.kind===R.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&Qe(t)?void 0:i}if(Qe(t))return e.kind===R.NULL?void 0:_i(e,t.ofType,n);if(e.kind===R.NULL)return null;if(Pt(t)){let r=t.ofType;if(e.kind===R.LIST){let s=[];for(let o of e.values)if(nx(o,n)){if(Qe(r))return;s.push(null)}else{let u=_i(o,r,n);if(u===void 0)return;s.push(u)}return s}let i=_i(e,r,n);return i===void 0?void 0:[i]}if(It(t)){if(e.kind!==R.OBJECT)return;let r=Object.create(null),i=si(e.fields,s=>s.name.value);for(let s of Object.values(t.getFields())){let o=i[s.name];if(!o||nx(o.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if(Qe(s.type))return;continue}let u=_i(o.value,s.type,n);if(u===void 0)return;r[s.name]=u}if(t.isOneOf){let s=Object.keys(r);if(s.length!==1||r[s[0]]===null)return}return r}if(Rr(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}Qt(!1,"Unexpected input type: "+ne(t))}}function nx(e,t){return e.kind===R.VARIABLE&&(t==null||t[e.name.value]===void 0)}var Nm=ue(()=>{"use strict";m();T();h();Nn();ri();ic();Xt();Zt()});function Em(e,t,n,r){let i=[],s=r==null?void 0:r.maxErrors;try{let o=OH(e,t,n,u=>{if(s!=null&&i.length>=s)throw new Y("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 OH(e,t,n,r){let i={};for(let s of t){let o=s.variable.name.value,u=Qn(e,s.type);if(!Nr(u)){let d=Ft(s.type);r(new Y(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:s.type}));continue}if(!rx(n,o)){if(s.defaultValue)i[o]=_i(s.defaultValue,u);else if(Qe(u)){let d=ne(u);r(new Y(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:s}))}continue}let l=n[o];if(l===null&&Qe(u)){let d=ne(u);r(new Y(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:s}));continue}i[o]=ym(l,u,(d,p,y)=>{let N=`Variable "$${o}" got invalid value `+ne(p);d.length>0&&(N+=` at "${o}${Wy(d)}"`),r(new Y(N+"; "+y.message,{nodes:s,originalError:y}))})}return i}function dc(e,t,n){var r;let i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],o=si(s,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(Qe(d))throw new Y(`Argument "${l}" of required type "${ne(d)}" was not provided.`,{nodes:t});continue}let y=p.value,N=y.kind===R.NULL;if(y.kind===R.VARIABLE){let b=y.name.value;if(n==null||!rx(n,b)){if(u.defaultValue!==void 0)i[l]=u.defaultValue;else if(Qe(d))throw new Y(`Argument "${l}" of required type "${ne(d)}" was provided the variable "$${b}" which was not provided a runtime value.`,{nodes:y});continue}N=n[b]==null}if(N&&Qe(d))throw new Y(`Argument "${l}" of non-null type "${ne(d)}" must not be null.`,{nodes:y});let I=_i(y,d,n);if(I===void 0)throw new Y(`Argument "${l}" has invalid value ${Ft(y)}.`,{nodes:y});i[l]=I}return i}function Vo(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return dc(e,i,n)}function rx(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Kd=ue(()=>{"use strict";m();T();h();Nn();ic();lb();st();Xt();is();Zt();db();Bo();Nm()});function Gd(e,t,n,r,i){let s=new Map;return Xy(e,t,n,r,i,s,new Set),s}function sx(e,t,n,r,i){let s=new Map,o=new Set;for(let u of i)u.selectionSet&&Xy(e,t,n,r,u.selectionSet,s,o);return s}function Xy(e,t,n,r,i,s,o){for(let u of i.selections)switch(u.kind){case R.FIELD:{if(!pb(n,u))continue;let l=SH(u),d=s.get(l);d!==void 0?d.push(u):s.set(l,[u]);break}case R.INLINE_FRAGMENT:{if(!pb(n,u)||!ix(e,u,r))continue;Xy(e,t,n,r,u.selectionSet,s,o);break}case R.FRAGMENT_SPREAD:{let l=u.name.value;if(o.has(l)||!pb(n,u))continue;o.add(l);let d=t[l];if(!d||!ix(e,d,r))continue;Xy(e,t,n,r,d.selectionSet,s,o);break}}}function pb(e,t){let n=Vo(Ld,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=Vo(wd,t,e);return(r==null?void 0:r.if)!==!1}function ix(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=Qn(e,r);return i===n?!0:zr(i)?e.isSubType(i,n):!1}function SH(e){return e.alias?e.alias.value:e.name.value}var Zy=ue(()=>{"use strict";m();T();h();Xt();Zt();Ui();Bo();Kd()});function gm(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,s=Object.create(null),o=e.getDocument(),u=Object.create(null);for(let d of o.definitions)d.kind===R.FRAGMENT_DEFINITION&&(u[d.name.value]=d);let l=Gd(n,u,s,r,t.selectionSet);if(l.size>1){let y=[...l.values()].slice(1).flat();e.reportError(new Y(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:y}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new Y(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 fb=ue(()=>{"use strict";m();T();h();st();Xt();Zy()});function Qd(e,t){let n=new Map;for(let r of e){let i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}var eN=ue(()=>{"use strict";m();T();h()});function Im(e){return{DirectiveDefinition(r){var i;let s=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,s)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;let s=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(`${s}.${d}`,p)}return!1}function n(r,i){let s=Qd(i,o=>o.name.value);for(let[o,u]of s)u.length>1&&e.reportError(new Y(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:u.map(l=>l.name)}));return!1}}var mb=ue(()=>{"use strict";m();T();h();eN();st()});function Yd(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],s=Qd(i,o=>o.name.value);for(let[o,u]of s)u.length>1&&e.reportError(new Y(`There can be only one argument named "${o}".`,{nodes:u.map(l=>l.name)}))}}var hb=ue(()=>{"use strict";m();T();h();eN();st()});function vm(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 Y(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new Y(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}var Tb=ue(()=>{"use strict";m();T();h();st()});function Jd(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():ai;for(let u of r)t[u.name]=!u.isRepeatable;let i=e.getDocument().definitions;for(let u of i)u.kind===R.DIRECTIVE_DEFINITION&&(t[u.name.value]=!u.repeatable);let s=Object.create(null),o=Object.create(null);return{enter(u){if(!("directives"in u)||!u.directives)return;let l;if(u.kind===R.SCHEMA_DEFINITION||u.kind===R.SCHEMA_EXTENSION)l=s;else if(Rs(u)||lc(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 Y(`The directive "@${p}" can only be used once at this location.`,{nodes:[l[p],d]})):l[p]=d)}}}}var yb=ue(()=>{"use strict";m();T();h();st();Xt();cl();Ui()});function _m(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var o;let u=s.name.value;r[u]||(r[u]=Object.create(null));let l=(o=s.values)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let y=p.name.value,N=n[u];rn(N)&&N.getValue(y)?e.reportError(new Y(`Enum value "${u}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[y]?e.reportError(new Y(`Enum value "${u}.${y}" can only be defined once.`,{nodes:[d[y],p.name]})):d[y]=p.name}return!1}}var Nb=ue(()=>{"use strict";m();T();h();st();Zt()});function bm(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(s){var o;let u=s.name.value;r[u]||(r[u]=Object.create(null));let l=(o=s.fields)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let y=p.name.value;DH(n[u],y)?e.reportError(new Y(`Field "${u}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[y]?e.reportError(new Y(`Field "${u}.${y}" can only be defined once.`,{nodes:[d[y],p.name]})):d[y]=p.name}return!1}}function DH(e,t){return ot(e)||Nt(e)||It(e)?e.getFields()[t]!=null:!1}var Eb=ue(()=>{"use strict";m();T();h();st();Zt()});function Om(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new Y(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}var gb=ue(()=>{"use strict";m();T();h();st()});function zd(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||Qt(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new Y(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}var Ib=ue(()=>{"use strict";m();T();h();ri();st()});function Sm(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new Y(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}var vb=ue(()=>{"use strict";m();T();h();st()});function Dm(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(s){var o;let u=(o=s.operationTypes)!==null&&o!==void 0?o:[];for(let l of u){let d=l.operation,p=n[d];r[d]?e.reportError(new Y(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):p?e.reportError(new Y(`There can be only one ${d} type in schema.`,{nodes:[p,l]})):n[d]=l}return!1}}var _b=ue(()=>{"use strict";m();T();h();st()});function Am(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 s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new Y(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new Y(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}var bb=ue(()=>{"use strict";m();T();h();st()});function Rm(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=Qd(r,s=>s.variable.name.value);for(let[s,o]of i)o.length>1&&e.reportError(new Y(`There can be only one variable named "$${s}".`,{nodes:o.map(u=>u.variable.name)}))}}}var Ob=ue(()=>{"use strict";m();T();h();eN();st()});function Fm(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=el(e.getParentInputType());if(!Pt(r))return ll(e,n),!1},ObjectValue(n){let r=Gn(e.getInputType());if(!It(r))return ll(e,n),!1;let i=si(n.fields,s=>s.name.value);for(let s of Object.values(r.getFields()))if(!i[s.name]&&Ra(s)){let u=ne(s.type);e.reportError(new Y(`Field "${r.name}.${s.name}" of required type "${u}" was not provided.`,{nodes:n}))}r.isOneOf&&AH(e,n,r,i,t)},ObjectField(n){let r=Gn(e.getParentInputType());if(!e.getInputType()&&It(r)){let s=gi(n.name.value,Object.keys(r.getFields()));e.reportError(new Y(`Field "${n.name.value}" is not defined by type "${r.name}".`+ii(s),{nodes:n}))}},NullValue(n){let r=e.getInputType();Qe(r)&&e.reportError(new Y(`Expected value of type "${ne(r)}", found ${Ft(n)}.`,{nodes:n}))},EnumValue:n=>ll(e,n),IntValue:n=>ll(e,n),FloatValue:n=>ll(e,n),StringValue:n=>ll(e,n),BooleanValue:n=>ll(e,n)}}function ll(e,t){let n=e.getInputType();if(!n)return;let r=Gn(n);if(!Rr(r)){let i=ne(n);e.reportError(new Y(`Expected value of type "${i}", found ${Ft(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let s=ne(n);e.reportError(new Y(`Expected value of type "${s}", found ${Ft(t)}.`,{nodes:t}))}}catch(i){let s=ne(n);i instanceof Y?e.reportError(i):e.reportError(new Y(`Expected value of type "${s}", found ${Ft(t)}; `+i.message,{nodes:t,originalError:i}))}}function AH(e,t,n,r,i){var s;let o=Object.keys(r);if(o.length!==1){e.reportError(new Y(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let l=(s=r[o[0]])===null||s===void 0?void 0:s.value,d=!l||l.kind===R.NULL,p=(l==null?void 0:l.kind)===R.VARIABLE;if(d){e.reportError(new Y(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(p){let y=l.name.value;i[y].type.kind!==R.NON_NULL_TYPE&&e.reportError(new Y(`Variable "${y}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}var Sb=ue(()=>{"use strict";m();T();h();rc();Nn();ic();sc();st();Xt();is();Zt()});function wm(e){return{VariableDefinition(t){let n=Qn(e.getSchema(),t.type);if(n!==void 0&&!Nr(n)){let r=t.variable.name.value,i=Ft(t.type);e.reportError(new Y(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}var Db=ue(()=>{"use strict";m();T();h();st();is();Zt();Bo()});function Lm(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:s,defaultValue:o}of r){let u=i.name.value,l=t[u];if(l&&s){let d=e.getSchema(),p=Qn(d,l.type);if(p&&!RH(d,p,l.defaultValue,s,o)){let y=ne(p),N=ne(s);e.reportError(new Y(`Variable "$${u}" of type "${y}" used in position expecting type "${N}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function RH(e,t,n,r,i){if(Qe(r)&&!Qe(t)){if(!(n!=null&&n.kind!==R.NULL)&&!(i!==void 0))return!1;let u=r.ofType;return ao(e,t,u)}return ao(e,t,r)}var Ab=ue(()=>{"use strict";m();T();h();Nn();st();Xt();Zt();jf();Bo()});var tN,Pm,ox,Rb=ue(()=>{"use strict";m();T();h();M_();B_();V_();$_();q_();K_();G_();Q_();Y_();J_();z_();H_();W_();X_();ib();sb();ob();ub();cb();fb();mb();hb();Tb();yb();Nb();Eb();gb();Ib();vb();_b();bb();Ob();Sb();Db();Ab();tN=Object.freeze([sm]),Pm=Object.freeze([Xf,Sm,rm,gm,$d,em,wm,mm,Zf,Om,nm,um,dm,om,Rm,am,cm,jd,Jd,tm,Yd,Fm,fm,Lm,lm,zd,...tN]),ox=Object.freeze([im,Dm,Am,_m,bm,Im,vm,$d,jd,Jd,pm,j_,Yd,zd,ab])});var nN,rN,dl,Fb=ue(()=>{"use strict";m();T();h();Xt();Wc();Qy();nN=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===R.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 s of i.selections)s.kind===R.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.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],s;for(;s=i.pop();)for(let o of this.getFragmentSpreads(s)){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}},rN=class extends nN{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}},dl=class extends nN{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 Pa(this._schema);Ds(t,ul(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,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()}}});function km(e,t,n=Pm,r,i=new Pa(e)){var s;let o=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||rt(!1,"Must provide document."),al(e);let u=Object.freeze({}),l=[],d=new dl(e,t,i,y=>{if(l.length>=o)throw l.push(new Y("Too many validation errors, error limit reached. Validation aborted.")),u;l.push(y)}),p=Od(n.map(y=>y(d)));try{Ds(t,ul(i,p))}catch(y){if(y!==u)throw y}return l}function ax(e,t,n=ox){let r=[],i=new rN(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return Ds(e,Od(s)),r}function ux(e){let t=ax(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` +`))}function H6(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!ot(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${ne(n)}.`,(r=L_(t,Un.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!ot(i)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${ne(i)}.`,(s=L_(t,Un.MUTATION))!==null&&s!==void 0?s:i.astNode)}let o=t.getSubscriptionType();if(o&&!ot(o)){var u;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${ne(o)}.`,(u=L_(t,Un.SUBSCRIPTION))!==null&&u!==void 0?u:o.astNode)}}function L_(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 W6(e){for(let n of e.schema.getDirectives()){if(!uc(n)){e.reportError(`Expected directive but got: ${ne(n)}.`,n==null?void 0:n.astNode);continue}ol(e,n);for(let r of n.args)if(ol(e,r),Nr(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${ne(r.type)}.`,r.astNode),cs(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[k_(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function ol(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function X6(e){let t=sH(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!Aa(r)){e.reportError(`Expected GraphQL named type but got: ${ne(r)}.`,r.astNode);continue}ui(r)||ol(e,r),ot(r)||Nt(r)?(Jk(e,r),zk(e,r)):fn(r)?tH(e,r):rn(r)?nH(e,r):It(r)&&(rH(e,r),t(r))}}function Jk(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(ol(e,o),!us(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${ne(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(let u of o.args){let l=u.name;if(ol(e,u),!Nr(u.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${ne(u.type)}.`,(i=u.astNode)===null||i===void 0?void 0:i.type)}if(cs(u)&&u.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[k_(u.astNode),(s=u.astNode)===null||s===void 0?void 0:s.type])}}}}function zk(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!Nt(r)){e.reportError(`Type ${ne(t)} must only implement Interface types, it cannot implement ${ne(r)}.`,zf(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,zf(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,zf(t,r));continue}n[r.name]=!0,eH(e,t,r),Z6(e,t,r)}}function Z6(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(!ao(e.schema,p.type,l.type)){var i,s;e.reportError(`Interface field ${n.name}.${d} expects type ${ne(l.type)} but ${t.name}.${d} is type ${ne(p.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(s=p.astNode)===null||s===void 0?void 0:s.type])}for(let y of l.args){let N=y.name,I=p.args.find(_=>_.name===N);if(!I){e.reportError(`Interface field argument ${n.name}.${d}(${N}:) expected but ${t.name}.${d} does not provide it.`,[y.astNode,p.astNode]);continue}if(!tl(y.type,I.type)){var o,u;e.reportError(`Interface field argument ${n.name}.${d}(${N}:) expects type ${ne(y.type)} but ${t.name}.${d}(${N}:) is type ${ne(I.type)}.`,[(o=y.astNode)===null||o===void 0?void 0:o.type,(u=I.astNode)===null||u===void 0?void 0:u.type])}}for(let y of p.args){let N=y.name;!l.args.find(_=>_.name===N)&&cs(y)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${N} that is missing from the Interface field ${n.name}.${d}.`,[y.astNode,l.astNode])}}}function eH(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}.`,[...zf(n,i),...zf(t,n)])}function tH(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.`,Hk(t,i.name));continue}r[i.name]=!0,ot(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${ne(i)}.`,Hk(t,String(i)))}}function nH(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)ol(e,r)}function rH(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 s of n){if(ol(e,s),!Nr(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${ne(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type)}if(Ra(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[k_(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&iH(t,s,e)}}function iH(e,t,n){if(Qe(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 sH(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(s){if(t[s.name])return;t[s.name]=!0,r[s.name]=n.length;let o=Object.values(s.getFields());for(let u of o)if(Qe(u.type)&&It(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),y=p.map(N=>N.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${y}".`,p.map(N=>N.astNode))}n.pop()}r[s.name]=void 0}}function zf(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.interfaces)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t.name)}function Hk(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.types)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t)}function k_(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===Uo.name)}var P_,Hf=ue(()=>{"use strict";m();T();h();Nn();st();Po();jf();Zt();Ui();As();sl();P_=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new Y(t,{nodes:r}))}getErrors(){return this._errors}}});function Qn(e,t){switch(t.kind){case R.LIST_TYPE:{let n=Qn(e,t.type);return n&&new Mn(n)}case R.NON_NULL_TYPE:{let n=Qn(e,t.type);return n&&new pt(n)}case R.NAMED_TYPE:return e.getType(t.name.value)}}var Bo=ue(()=>{"use strict";m();T();h();Xt();Zt()});function oH(e,t,n){let r=n.name.value;if(r===Fa.name&&e.getQueryType()===t)return Fa;if(r===wa.name&&e.getQueryType()===t)return wa;if(r===La.name&&vi(t))return La;if(ot(t)||Nt(t))return t.getFields()[r]}function ul(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=Da(t,r.kind).enter;if(i){let s=i.apply(t,n);return s!==void 0&&(e.leave(r),bf(s)&&e.enter(s)),s}},leave(...n){let r=n[0],i=Da(t,r.kind).leave,s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}var Pa,Qy=ue(()=>{"use strict";m();T();h();Po();Xt();Wc();Zt();As();Bo();Pa=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:oH,n&&(Nr(n)&&this._inputTypeStack.push(n),vi(n)&&this._parentTypeStack.push(n),us(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 R.SELECTION_SET:{let i=Gn(this.getType());this._parentTypeStack.push(vi(i)?i:void 0);break}case R.FIELD:{let i=this.getParentType(),s,o;i&&(s=this._getFieldDef(n,i,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push(us(o)?o:void 0);break}case R.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case R.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push(ot(i)?i:void 0);break}case R.INLINE_FRAGMENT:case R.FRAGMENT_DEFINITION:{let i=t.typeCondition,s=i?Qn(n,i):Gn(this.getType());this._typeStack.push(us(s)?s:void 0);break}case R.VARIABLE_DEFINITION:{let i=Qn(n,t.type);this._inputTypeStack.push(Nr(i)?i:void 0);break}case R.ARGUMENT:{var r;let i,s,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(u=>u.name===t.name.value),i&&(s=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(Nr(s)?s:void 0);break}case R.LIST:{let i=el(this.getInputType()),s=Pt(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Nr(s)?s:void 0);break}case R.OBJECT_FIELD:{let i=Gn(this.getInputType()),s,o;It(i)&&(o=i.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(Nr(s)?s:void 0);break}case R.ENUM:{let i=Gn(this.getInputType()),s;rn(i)&&(s=i.getValue(t.value)),this._enumValue=s;break}default:}}leave(t){switch(t.kind){case R.SELECTION_SET:this._parentTypeStack.pop();break;case R.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case R.DIRECTIVE:this._directive=null;break;case R.OPERATION_DEFINITION:case R.INLINE_FRAGMENT:case R.FRAGMENT_DEFINITION:this._typeStack.pop();break;case R.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case R.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case R.LIST:case R.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case R.ENUM:this._enumValue=null;break;default:}}}});function x_(e){return Md(e)||Bd(e)||Vd(e)}function Md(e){return e.kind===R.OPERATION_DEFINITION||e.kind===R.FRAGMENT_DEFINITION}function C_(e){return e.kind===R.FIELD||e.kind===R.FRAGMENT_SPREAD||e.kind===R.INLINE_FRAGMENT}function Yy(e){return e.kind===R.VARIABLE||e.kind===R.INT||e.kind===R.FLOAT||e.kind===R.STRING||e.kind===R.BOOLEAN||e.kind===R.NULL||e.kind===R.ENUM||e.kind===R.LIST||e.kind===R.OBJECT}function Wf(e){return Yy(e)&&(e.kind===R.LIST?e.values.some(Wf):e.kind===R.OBJECT?e.fields.some(t=>Wf(t.value)):e.kind!==R.VARIABLE)}function U_(e){return e.kind===R.NAMED_TYPE||e.kind===R.LIST_TYPE||e.kind===R.NON_NULL_TYPE}function Bd(e){return e.kind===R.SCHEMA_DEFINITION||Rs(e)||e.kind===R.DIRECTIVE_DEFINITION}function Rs(e){return e.kind===R.SCALAR_TYPE_DEFINITION||e.kind===R.OBJECT_TYPE_DEFINITION||e.kind===R.INTERFACE_TYPE_DEFINITION||e.kind===R.UNION_TYPE_DEFINITION||e.kind===R.ENUM_TYPE_DEFINITION||e.kind===R.INPUT_OBJECT_TYPE_DEFINITION}function Vd(e){return e.kind===R.SCHEMA_EXTENSION||lc(e)}function lc(e){return e.kind===R.SCALAR_TYPE_EXTENSION||e.kind===R.OBJECT_TYPE_EXTENSION||e.kind===R.INTERFACE_TYPE_EXTENSION||e.kind===R.UNION_TYPE_EXTENSION||e.kind===R.ENUM_TYPE_EXTENSION||e.kind===R.INPUT_OBJECT_TYPE_EXTENSION}var cl=ue(()=>{"use strict";m();T();h();Xt()});function Xf(e){return{Document(t){for(let n of t.definitions)if(!Md(n)){let r=n.kind===R.SCHEMA_DEFINITION||n.kind===R.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new Y(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}var M_=ue(()=>{"use strict";m();T();h();st();Xt();cl()});function Zf(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),s=t.name.value,o=ii("to use an inline fragment on",aH(i,n,s));o===""&&(o=ii(uH(n,s))),e.reportError(new Y(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}))}}}}function aH(e,t,n){if(!zr(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 s;u.getFields()[n]&&(r.add(u),i[u.name]=((s=i[u.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((o,u)=>{let l=i[u.name]-i[o.name];return l!==0?l:Nt(o)&&e.isSubType(o,u)?-1:Nt(u)&&e.isSubType(u,o)?1:Sa(o.name,u.name)}).map(o=>o.name)}function uH(e,t){if(ot(e)||Nt(e)){let n=Object.keys(e.getFields());return gi(t,n)}return[]}var B_=ue(()=>{"use strict";m();T();h();rc();Lf();sc();st();Zt()});function em(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=Qn(e.getSchema(),n);if(r&&!vi(r)){let i=Ft(n);e.reportError(new Y(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=Qn(e.getSchema(),t.typeCondition);if(n&&!vi(n)){let r=Ft(t.typeCondition);e.reportError(new Y(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}var V_=ue(()=>{"use strict";m();T();h();st();is();Zt();Bo()});function tm(e){return K(k({},j_(e)),{Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let s=t.name.value,o=r.args.map(l=>l.name),u=gi(s,o);e.reportError(new Y(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+ii(u),{nodes:t}))}}})}function j_(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():ai;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===R.DIRECTIVE_DEFINITION){var s;let u=(s=o.arguments)!==null&&s!==void 0?s:[];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 y=gi(p,l);e.reportError(new Y(`Unknown argument "${p}" on directive "@${u}".`+ii(y),{nodes:d}))}}return!1}}}var $_=ue(()=>{"use strict";m();T();h();rc();sc();st();Xt();Ui()});function jd(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():ai;for(let s of r)t[s.name]=s.locations;let i=e.getDocument().definitions;for(let s of i)s.kind===R.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return{Directive(s,o,u,l,d){let p=s.name.value,y=t[p];if(!y){e.reportError(new Y(`Unknown directive "@${p}".`,{nodes:s}));return}let N=cH(d);N&&!y.includes(N)&&e.reportError(new Y(`Directive "@${p}" may not be used on ${N}.`,{nodes:s}))}}}function cH(e){let t=e[e.length-1];switch("kind"in t||Qt(!1),t.kind){case R.OPERATION_DEFINITION:return lH(t.operation);case R.FIELD:return He.FIELD;case R.FRAGMENT_SPREAD:return He.FRAGMENT_SPREAD;case R.INLINE_FRAGMENT:return He.INLINE_FRAGMENT;case R.FRAGMENT_DEFINITION:return He.FRAGMENT_DEFINITION;case R.VARIABLE_DEFINITION:return He.VARIABLE_DEFINITION;case R.SCHEMA_DEFINITION:case R.SCHEMA_EXTENSION:return He.SCHEMA;case R.SCALAR_TYPE_DEFINITION:case R.SCALAR_TYPE_EXTENSION:return He.SCALAR;case R.OBJECT_TYPE_DEFINITION:case R.OBJECT_TYPE_EXTENSION:return He.OBJECT;case R.FIELD_DEFINITION:return He.FIELD_DEFINITION;case R.INTERFACE_TYPE_DEFINITION:case R.INTERFACE_TYPE_EXTENSION:return He.INTERFACE;case R.UNION_TYPE_DEFINITION:case R.UNION_TYPE_EXTENSION:return He.UNION;case R.ENUM_TYPE_DEFINITION:case R.ENUM_TYPE_EXTENSION:return He.ENUM;case R.ENUM_VALUE_DEFINITION:return He.ENUM_VALUE;case R.INPUT_OBJECT_TYPE_DEFINITION:case R.INPUT_OBJECT_TYPE_EXTENSION:return He.INPUT_OBJECT;case R.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||Qt(!1),n.kind===R.INPUT_OBJECT_TYPE_DEFINITION?He.INPUT_FIELD_DEFINITION:He.ARGUMENT_DEFINITION}default:Qt(!1,"Unexpected kind: "+ne(t.kind))}}function lH(e){switch(e){case Un.QUERY:return He.QUERY;case Un.MUTATION:return He.MUTATION;case Un.SUBSCRIPTION:return He.SUBSCRIPTION}}var q_=ue(()=>{"use strict";m();T();h();Nn();ri();st();Po();gd();Xt();Ui()});function nm(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new Y(`Unknown fragment "${n}".`,{nodes:t.name}))}}}var K_=ue(()=>{"use strict";m();T();h();st()});function $d(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let s of e.getDocument().definitions)Rs(s)&&(r[s.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,o,u,l,d){let p=s.name.value;if(!n[p]&&!r[p]){var y;let N=(y=d[2])!==null&&y!==void 0?y:u,I=N!=null&&dH(N);if(I&&Wk.includes(p))return;let _=gi(p,I?Wk.concat(i):i);e.reportError(new Y(`Unknown type "${p}".`+ii(_),{nodes:s}))}}}}function dH(e){return"kind"in e&&(Bd(e)||Vd(e))}var Wk,G_=ue(()=>{"use strict";m();T();h();rc();sc();st();cl();As();Co();Wk=[...xo,...Mo].map(e=>e.name)});function rm(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===R.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new Y("This anonymous operation must be the only defined operation.",{nodes:n}))}}}var Q_=ue(()=>{"use strict";m();T();h();st();Xt()});function im(e){var t,n,r;let i=e.getSchema(),s=(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(s){e.reportError(new Y("Cannot define a new schema within a schema extension.",{nodes:u}));return}o>0&&e.reportError(new Y("Must provide only one schema definition.",{nodes:u})),++o}}}var Y_=ue(()=>{"use strict";m();T();h();st()});function sm(e){function t(n,r=Object.create(null),i=0){if(n.kind===R.FRAGMENT_SPREAD){let s=n.name.value;if(r[s]===!0)return!1;let o=e.getFragment(s);if(!o)return!1;try{return r[s]=!0,t(o,r,i)}finally{r[s]=void 0}}if(n.kind===R.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=pH))return!0;if("selectionSet"in n&&n.selectionSet){for(let s of n.selectionSet.selections)if(t(s,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new Y("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}var pH,J_=ue(()=>{"use strict";m();T();h();st();Xt();pH=3});function om(e){let t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;let o=s.name.value;t[o]=!0;let u=e.getFragmentSpreads(s.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 y=e.getFragment(d);y&&i(y)}else{let y=n.slice(p),N=y.slice(0,-1).map(I=>'"'+I.name.value+'"').join(", ");e.reportError(new Y(`Cannot spread fragment "${d}" within itself`+(N!==""?` via ${N}.`:"."),{nodes:y}))}n.pop()}r[o]=void 0}}}var z_=ue(()=>{"use strict";m();T();h();st()});function am(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 s=i.name.value;t[s]!==!0&&e.reportError(new Y(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}var H_=ue(()=>{"use strict";m();T();h();st()});function um(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 s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(let i of n){let s=i.name.value;r[s]!==!0&&e.reportError(new Y(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}var W_=ue(()=>{"use strict";m();T();h();st()});function cm(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:s}of i)r[s.name.value]=!0;for(let s of t){let o=s.variable.name.value;r[o]!==!0&&e.reportError(new Y(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}var X_=ue(()=>{"use strict";m();T();h();st()});function qd(e){switch(e.kind){case R.OBJECT:return K(k({},e),{fields:fH(e.fields)});case R.LIST:return K(k({},e),{values:e.values.map(qd)});case R.INT:case R.FLOAT:case R.STRING:case R.BOOLEAN:case R.NULL:case R.ENUM:case R.VARIABLE:return e}}function fH(e){return e.map(t=>K(k({},t),{value:qd(t.value)})).sort((t,n)=>Sa(t.name.value,n.name.value))}var Z_=ue(()=>{"use strict";m();T();h();Lf();Xt()});function Zk(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Zk(n)).join(" and "):e}function lm(e){let t=new nb,n=new Map;return{SelectionSet(r){let i=mH(e,n,t,e.getParentType(),r);for(let[[s,o],u,l]of i){let d=Zk(o);e.reportError(new Y(`Fields "${s}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:u.concat(l)}))}}}}function mH(e,t,n,r,i){let s=[],[o,u]=Hy(e,t,r,i);if(TH(e,s,t,n,o),u.length!==0)for(let l=0;l1)for(let u=0;u[s.value,o]));return n.every(s=>{let o=s.value,u=i.get(s.name.value);return u===void 0?!1:Xk(o)===Xk(u)})}function Xk(e){return Ft(qd(e))}function eb(e,t){return Pt(e)?Pt(t)?eb(e.ofType,t.ofType):!0:Pt(t)?!0:Qe(e)?Qe(t)?eb(e.ofType,t.ofType):!0:Qe(t)?!0:Rr(e)||Rr(t)?e!==t:!1}function Hy(e,t,n,r){let i=t.get(r);if(i)return i;let s=Object.create(null),o=Object.create(null);tx(e,n,r,s,o);let u=[s,Object.keys(o)];return t.set(r,u),u}function tb(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=Qn(e.getSchema(),n.typeCondition);return Hy(e,t,i,n.selectionSet)}function tx(e,t,n,r,i){for(let s of n.selections)switch(s.kind){case R.FIELD:{let o=s.name.value,u;(ot(t)||Nt(t))&&(u=t.getFields()[o]);let l=s.alias?s.alias.value:o;r[l]||(r[l]=[]),r[l].push([t,s,u]);break}case R.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case R.INLINE_FRAGMENT:{let o=s.typeCondition,u=o?Qn(e.getSchema(),o):t;tx(e,u,s.selectionSet,r,i);break}}}function NH(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 nb,ib=ue(()=>{"use strict";m();T();h();Nn();st();Xt();is();Zt();Z_();Bo();nb=class{constructor(){this._data=new Map}has(t,n,r){var i;let[s,o]=t{"use strict";m();T();h();Nn();st();Zt();jf();Bo()});function pm(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)Rs(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){let s=i.name.value,o=n[s],u=t==null?void 0:t.getType(s),l;if(o?l=gH[o.kind]:u&&(l=IH(u)),l){if(l!==i.kind){let d=vH(i.kind);e.reportError(new Y(`Cannot extend non-${d} type "${s}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(k(k({},n),t==null?void 0:t.getTypeMap())),p=gi(s,d);e.reportError(new Y(`Cannot extend type "${s}" because it is not defined.`+ii(p),{nodes:i.name}))}}}function IH(e){if(tr(e))return R.SCALAR_TYPE_EXTENSION;if(ot(e))return R.OBJECT_TYPE_EXTENSION;if(Nt(e))return R.INTERFACE_TYPE_EXTENSION;if(fn(e))return R.UNION_TYPE_EXTENSION;if(rn(e))return R.ENUM_TYPE_EXTENSION;if(It(e))return R.INPUT_OBJECT_TYPE_EXTENSION;Qt(!1,"Unexpected type: "+ne(e))}function vH(e){switch(e){case R.SCALAR_TYPE_EXTENSION:return"scalar";case R.OBJECT_TYPE_EXTENSION:return"object";case R.INTERFACE_TYPE_EXTENSION:return"interface";case R.UNION_TYPE_EXTENSION:return"union";case R.ENUM_TYPE_EXTENSION:return"enum";case R.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:Qt(!1,"Unexpected kind: "+ne(e))}}var gH,ob=ue(()=>{"use strict";m();T();h();rc();Nn();ri();sc();st();Xt();cl();Zt();gH={[R.SCALAR_TYPE_DEFINITION]:R.SCALAR_TYPE_EXTENSION,[R.OBJECT_TYPE_DEFINITION]:R.OBJECT_TYPE_EXTENSION,[R.INTERFACE_TYPE_DEFINITION]:R.INTERFACE_TYPE_EXTENSION,[R.UNION_TYPE_DEFINITION]:R.UNION_TYPE_EXTENSION,[R.ENUM_TYPE_DEFINITION]:R.ENUM_TYPE_EXTENSION,[R.INPUT_OBJECT_TYPE_DEFINITION]:R.INPUT_OBJECT_TYPE_EXTENSION}});function fm(e){return K(k({},ab(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(s=>s.name.value));for(let s of r.args)if(!i.has(s.name)&&cs(s)){let o=ne(s.type);e.reportError(new Y(`Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function ab(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:ai;for(let u of i)n[u.name]=si(u.args.filter(cs),l=>l.name);let s=e.getDocument().definitions;for(let u of s)if(u.kind===R.DIRECTIVE_DEFINITION){var o;let l=(o=u.arguments)!==null&&o!==void 0?o:[];n[u.name.value]=si(l.filter(_H),d=>d.name.value)}return{Directive:{leave(u){let l=u.name.value,d=n[l];if(d){var p;let y=(p=u.arguments)!==null&&p!==void 0?p:[],N=new Set(y.map(I=>I.name.value));for(let[I,_]of Object.entries(d))if(!N.has(I)){let C=ac(_.type)?ne(_.type):Ft(_.type);e.reportError(new Y(`Directive "@${l}" argument "${I}" of type "${C}" is required, but it was not provided.`,{nodes:u}))}}}}}}function _H(e){return e.type.kind===R.NON_NULL_TYPE&&e.defaultValue==null}var ub=ue(()=>{"use strict";m();T();h();Nn();ic();st();Xt();is();Zt();Ui()});function mm(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if(Rr(Gn(n))){if(r){let i=t.name.value,s=ne(n);e.reportError(new Y(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){let i=t.name.value,s=ne(n);e.reportError(new Y(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}var cb=ue(()=>{"use strict";m();T();h();Nn();st();Zt()});function Wy(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}var lb=ue(()=>{"use strict";m();T();h()});function ka(e,t,n){return{prev:e,key:t,typename:n}}function br(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}var hm=ue(()=>{"use strict";m();T();h()});function ym(e,t,n=bH){return Tm(e,t,n,void 0)}function bH(e,t,n){let r="Invalid value "+ne(t);throw e.length>0&&(r+=` at "value${Wy(e)}"`),n.message=r+": "+n.message,n}function Tm(e,t,n,r){if(Qe(t)){if(e!=null)return Tm(e,t.ofType,n,r);n(br(r),e,new Y(`Expected non-nullable type "${ne(t)}" not to be null.`));return}if(e==null)return null;if(Pt(t)){let i=t.ofType;return Cd(e)?Array.from(e,(s,o)=>{let u=ka(r,o,void 0);return Tm(s,i,n,u)}):[Tm(e,i,n,r)]}if(It(t)){if(!sr(e)){n(br(r),e,new Y(`Expected type "${t.name}" to be an object.`));return}let i={},s=t.getFields();for(let o of Object.values(s)){let u=e[o.name];if(u===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if(Qe(o.type)){let l=ne(o.type);n(br(r),e,new Y(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=Tm(u,o.type,n,ka(r,o.name,t.name))}for(let o of Object.keys(e))if(!s[o]){let u=gi(o,Object.keys(t.getFields()));n(br(r),e,new Y(`Field "${o}" is not defined by type "${t.name}".`+ii(u)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n(br(r),e,new Y(`Exactly one key must be specified for OneOf type "${t.name}".`));let u=o[0],l=i[u];l===null&&n(br(r).concat(u),l,new Y(`Field "${u}" must be non-null.`))}return i}if(Rr(t)){let i;try{i=t.parseValue(e)}catch(s){s instanceof Y?n(br(r),e,s):n(br(r),e,new Y(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return i===void 0&&n(br(r),e,new Y(`Expected type "${t.name}".`)),i}Qt(!1,"Unexpected input type: "+ne(t))}var db=ue(()=>{"use strict";m();T();h();rc();Nn();ri();Ky();Lo();hm();lb();sc();st();Zt()});function _i(e,t,n){if(e){if(e.kind===R.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&Qe(t)?void 0:i}if(Qe(t))return e.kind===R.NULL?void 0:_i(e,t.ofType,n);if(e.kind===R.NULL)return null;if(Pt(t)){let r=t.ofType;if(e.kind===R.LIST){let s=[];for(let o of e.values)if(nx(o,n)){if(Qe(r))return;s.push(null)}else{let u=_i(o,r,n);if(u===void 0)return;s.push(u)}return s}let i=_i(e,r,n);return i===void 0?void 0:[i]}if(It(t)){if(e.kind!==R.OBJECT)return;let r=Object.create(null),i=si(e.fields,s=>s.name.value);for(let s of Object.values(t.getFields())){let o=i[s.name];if(!o||nx(o.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if(Qe(s.type))return;continue}let u=_i(o.value,s.type,n);if(u===void 0)return;r[s.name]=u}if(t.isOneOf){let s=Object.keys(r);if(s.length!==1||r[s[0]]===null)return}return r}if(Rr(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}Qt(!1,"Unexpected input type: "+ne(t))}}function nx(e,t){return e.kind===R.VARIABLE&&(t==null||t[e.name.value]===void 0)}var Nm=ue(()=>{"use strict";m();T();h();Nn();ri();ic();Xt();Zt()});function Em(e,t,n,r){let i=[],s=r==null?void 0:r.maxErrors;try{let o=OH(e,t,n,u=>{if(s!=null&&i.length>=s)throw new Y("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 OH(e,t,n,r){let i={};for(let s of t){let o=s.variable.name.value,u=Qn(e,s.type);if(!Nr(u)){let d=Ft(s.type);r(new Y(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:s.type}));continue}if(!rx(n,o)){if(s.defaultValue)i[o]=_i(s.defaultValue,u);else if(Qe(u)){let d=ne(u);r(new Y(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:s}))}continue}let l=n[o];if(l===null&&Qe(u)){let d=ne(u);r(new Y(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:s}));continue}i[o]=ym(l,u,(d,p,y)=>{let N=`Variable "$${o}" got invalid value `+ne(p);d.length>0&&(N+=` at "${o}${Wy(d)}"`),r(new Y(N+"; "+y.message,{nodes:s,originalError:y}))})}return i}function dc(e,t,n){var r;let i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],o=si(s,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(Qe(d))throw new Y(`Argument "${l}" of required type "${ne(d)}" was not provided.`,{nodes:t});continue}let y=p.value,N=y.kind===R.NULL;if(y.kind===R.VARIABLE){let _=y.name.value;if(n==null||!rx(n,_)){if(u.defaultValue!==void 0)i[l]=u.defaultValue;else if(Qe(d))throw new Y(`Argument "${l}" of required type "${ne(d)}" was provided the variable "$${_}" which was not provided a runtime value.`,{nodes:y});continue}N=n[_]==null}if(N&&Qe(d))throw new Y(`Argument "${l}" of non-null type "${ne(d)}" must not be null.`,{nodes:y});let I=_i(y,d,n);if(I===void 0)throw new Y(`Argument "${l}" has invalid value ${Ft(y)}.`,{nodes:y});i[l]=I}return i}function Vo(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return dc(e,i,n)}function rx(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Kd=ue(()=>{"use strict";m();T();h();Nn();ic();lb();st();Xt();is();Zt();db();Bo();Nm()});function Gd(e,t,n,r,i){let s=new Map;return Xy(e,t,n,r,i,s,new Set),s}function sx(e,t,n,r,i){let s=new Map,o=new Set;for(let u of i)u.selectionSet&&Xy(e,t,n,r,u.selectionSet,s,o);return s}function Xy(e,t,n,r,i,s,o){for(let u of i.selections)switch(u.kind){case R.FIELD:{if(!pb(n,u))continue;let l=SH(u),d=s.get(l);d!==void 0?d.push(u):s.set(l,[u]);break}case R.INLINE_FRAGMENT:{if(!pb(n,u)||!ix(e,u,r))continue;Xy(e,t,n,r,u.selectionSet,s,o);break}case R.FRAGMENT_SPREAD:{let l=u.name.value;if(o.has(l)||!pb(n,u))continue;o.add(l);let d=t[l];if(!d||!ix(e,d,r))continue;Xy(e,t,n,r,d.selectionSet,s,o);break}}}function pb(e,t){let n=Vo(Ld,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=Vo(wd,t,e);return(r==null?void 0:r.if)!==!1}function ix(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=Qn(e,r);return i===n?!0:zr(i)?e.isSubType(i,n):!1}function SH(e){return e.alias?e.alias.value:e.name.value}var Zy=ue(()=>{"use strict";m();T();h();Xt();Zt();Ui();Bo();Kd()});function gm(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,s=Object.create(null),o=e.getDocument(),u=Object.create(null);for(let d of o.definitions)d.kind===R.FRAGMENT_DEFINITION&&(u[d.name.value]=d);let l=Gd(n,u,s,r,t.selectionSet);if(l.size>1){let y=[...l.values()].slice(1).flat();e.reportError(new Y(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:y}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new Y(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 fb=ue(()=>{"use strict";m();T();h();st();Xt();Zy()});function Qd(e,t){let n=new Map;for(let r of e){let i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}var eN=ue(()=>{"use strict";m();T();h()});function Im(e){return{DirectiveDefinition(r){var i;let s=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,s)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;let s=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(`${s}.${d}`,p)}return!1}function n(r,i){let s=Qd(i,o=>o.name.value);for(let[o,u]of s)u.length>1&&e.reportError(new Y(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:u.map(l=>l.name)}));return!1}}var mb=ue(()=>{"use strict";m();T();h();eN();st()});function Yd(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],s=Qd(i,o=>o.name.value);for(let[o,u]of s)u.length>1&&e.reportError(new Y(`There can be only one argument named "${o}".`,{nodes:u.map(l=>l.name)}))}}var hb=ue(()=>{"use strict";m();T();h();eN();st()});function vm(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 Y(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new Y(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}var Tb=ue(()=>{"use strict";m();T();h();st()});function Jd(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():ai;for(let u of r)t[u.name]=!u.isRepeatable;let i=e.getDocument().definitions;for(let u of i)u.kind===R.DIRECTIVE_DEFINITION&&(t[u.name.value]=!u.repeatable);let s=Object.create(null),o=Object.create(null);return{enter(u){if(!("directives"in u)||!u.directives)return;let l;if(u.kind===R.SCHEMA_DEFINITION||u.kind===R.SCHEMA_EXTENSION)l=s;else if(Rs(u)||lc(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 Y(`The directive "@${p}" can only be used once at this location.`,{nodes:[l[p],d]})):l[p]=d)}}}}var yb=ue(()=>{"use strict";m();T();h();st();Xt();cl();Ui()});function _m(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var o;let u=s.name.value;r[u]||(r[u]=Object.create(null));let l=(o=s.values)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let y=p.name.value,N=n[u];rn(N)&&N.getValue(y)?e.reportError(new Y(`Enum value "${u}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[y]?e.reportError(new Y(`Enum value "${u}.${y}" can only be defined once.`,{nodes:[d[y],p.name]})):d[y]=p.name}return!1}}var Nb=ue(()=>{"use strict";m();T();h();st();Zt()});function bm(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(s){var o;let u=s.name.value;r[u]||(r[u]=Object.create(null));let l=(o=s.fields)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let y=p.name.value;DH(n[u],y)?e.reportError(new Y(`Field "${u}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[y]?e.reportError(new Y(`Field "${u}.${y}" can only be defined once.`,{nodes:[d[y],p.name]})):d[y]=p.name}return!1}}function DH(e,t){return ot(e)||Nt(e)||It(e)?e.getFields()[t]!=null:!1}var Eb=ue(()=>{"use strict";m();T();h();st();Zt()});function Om(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new Y(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}var gb=ue(()=>{"use strict";m();T();h();st()});function zd(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||Qt(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new Y(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}var Ib=ue(()=>{"use strict";m();T();h();ri();st()});function Sm(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new Y(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}var vb=ue(()=>{"use strict";m();T();h();st()});function Dm(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(s){var o;let u=(o=s.operationTypes)!==null&&o!==void 0?o:[];for(let l of u){let d=l.operation,p=n[d];r[d]?e.reportError(new Y(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):p?e.reportError(new Y(`There can be only one ${d} type in schema.`,{nodes:[p,l]})):n[d]=l}return!1}}var _b=ue(()=>{"use strict";m();T();h();st()});function Am(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 s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new Y(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new Y(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}var bb=ue(()=>{"use strict";m();T();h();st()});function Rm(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=Qd(r,s=>s.variable.name.value);for(let[s,o]of i)o.length>1&&e.reportError(new Y(`There can be only one variable named "$${s}".`,{nodes:o.map(u=>u.variable.name)}))}}}var Ob=ue(()=>{"use strict";m();T();h();eN();st()});function Fm(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=el(e.getParentInputType());if(!Pt(r))return ll(e,n),!1},ObjectValue(n){let r=Gn(e.getInputType());if(!It(r))return ll(e,n),!1;let i=si(n.fields,s=>s.name.value);for(let s of Object.values(r.getFields()))if(!i[s.name]&&Ra(s)){let u=ne(s.type);e.reportError(new Y(`Field "${r.name}.${s.name}" of required type "${u}" was not provided.`,{nodes:n}))}r.isOneOf&&AH(e,n,r,i,t)},ObjectField(n){let r=Gn(e.getParentInputType());if(!e.getInputType()&&It(r)){let s=gi(n.name.value,Object.keys(r.getFields()));e.reportError(new Y(`Field "${n.name.value}" is not defined by type "${r.name}".`+ii(s),{nodes:n}))}},NullValue(n){let r=e.getInputType();Qe(r)&&e.reportError(new Y(`Expected value of type "${ne(r)}", found ${Ft(n)}.`,{nodes:n}))},EnumValue:n=>ll(e,n),IntValue:n=>ll(e,n),FloatValue:n=>ll(e,n),StringValue:n=>ll(e,n),BooleanValue:n=>ll(e,n)}}function ll(e,t){let n=e.getInputType();if(!n)return;let r=Gn(n);if(!Rr(r)){let i=ne(n);e.reportError(new Y(`Expected value of type "${i}", found ${Ft(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let s=ne(n);e.reportError(new Y(`Expected value of type "${s}", found ${Ft(t)}.`,{nodes:t}))}}catch(i){let s=ne(n);i instanceof Y?e.reportError(i):e.reportError(new Y(`Expected value of type "${s}", found ${Ft(t)}; `+i.message,{nodes:t,originalError:i}))}}function AH(e,t,n,r,i){var s;let o=Object.keys(r);if(o.length!==1){e.reportError(new Y(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let l=(s=r[o[0]])===null||s===void 0?void 0:s.value,d=!l||l.kind===R.NULL,p=(l==null?void 0:l.kind)===R.VARIABLE;if(d){e.reportError(new Y(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(p){let y=l.name.value;i[y].type.kind!==R.NON_NULL_TYPE&&e.reportError(new Y(`Variable "${y}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}var Sb=ue(()=>{"use strict";m();T();h();rc();Nn();ic();sc();st();Xt();is();Zt()});function wm(e){return{VariableDefinition(t){let n=Qn(e.getSchema(),t.type);if(n!==void 0&&!Nr(n)){let r=t.variable.name.value,i=Ft(t.type);e.reportError(new Y(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}var Db=ue(()=>{"use strict";m();T();h();st();is();Zt();Bo()});function Lm(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:s,defaultValue:o}of r){let u=i.name.value,l=t[u];if(l&&s){let d=e.getSchema(),p=Qn(d,l.type);if(p&&!RH(d,p,l.defaultValue,s,o)){let y=ne(p),N=ne(s);e.reportError(new Y(`Variable "$${u}" of type "${y}" used in position expecting type "${N}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function RH(e,t,n,r,i){if(Qe(r)&&!Qe(t)){if(!(n!=null&&n.kind!==R.NULL)&&!(i!==void 0))return!1;let u=r.ofType;return ao(e,t,u)}return ao(e,t,r)}var Ab=ue(()=>{"use strict";m();T();h();Nn();st();Xt();Zt();jf();Bo()});var tN,Pm,ox,Rb=ue(()=>{"use strict";m();T();h();M_();B_();V_();$_();q_();K_();G_();Q_();Y_();J_();z_();H_();W_();X_();ib();sb();ob();ub();cb();fb();mb();hb();Tb();yb();Nb();Eb();gb();Ib();vb();_b();bb();Ob();Sb();Db();Ab();tN=Object.freeze([sm]),Pm=Object.freeze([Xf,Sm,rm,gm,$d,em,wm,mm,Zf,Om,nm,um,dm,om,Rm,am,cm,jd,Jd,tm,Yd,Fm,fm,Lm,lm,zd,...tN]),ox=Object.freeze([im,Dm,Am,_m,bm,Im,vm,$d,jd,Jd,pm,j_,Yd,zd,ab])});var nN,rN,dl,Fb=ue(()=>{"use strict";m();T();h();Xt();Wc();Qy();nN=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===R.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 s of i.selections)s.kind===R.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.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],s;for(;s=i.pop();)for(let o of this.getFragmentSpreads(s)){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}},rN=class extends nN{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}},dl=class extends nN{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 Pa(this._schema);Ds(t,ul(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,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()}}});function km(e,t,n=Pm,r,i=new Pa(e)){var s;let o=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||rt(!1,"Must provide document."),al(e);let u=Object.freeze({}),l=[],d=new dl(e,t,i,y=>{if(l.length>=o)throw l.push(new Y("Too many validation errors, error limit reached. Validation aborted.")),u;l.push(y)}),p=Od(n.map(y=>y(d)));try{Ds(t,ul(i,p))}catch(y){if(y!==u)throw y}return l}function ax(e,t,n=ox){let r=[],i=new rN(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return Ds(e,Od(s)),r}function ux(e){let t=ax(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` `))}function cx(e,t){let n=ax(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(` -`))}var xm=ue(()=>{"use strict";m();T();h();Ni();st();Wc();Hf();Qy();Rb();Fb()});function lx(e){let t;return function(r,i,s){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(s);return l===void 0&&(l=e(r,i,s),u.set(s,l)),l}}var dx=ue(()=>{"use strict";m();T();h()});function wb(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 px=ue(()=>{"use strict";m();T();h()});function fx(e,t,n){let r=n;for(let i of e)r=ni(r)?r.then(s=>t(s,i)):t(r,i);return r}var mx=ue(()=>{"use strict";m();T();h();by()});function hx(e){return e instanceof Error?e:new Lb(e)}var Lb,Tx=ue(()=>{"use strict";m();T();h();Nn();Lb=class extends Error{constructor(t){super("Unexpected error value: "+ne(t)),this.name="NonErrorThrown",this.thrownValue=t}}});function jo(e,t,n){var r;let i=hx(e);return FH(i)?i:new Y(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function FH(e){return Array.isArray(e.path)}var iN=ue(()=>{"use strict";m();T();h();Tx();st()});function pc(e){arguments.length<2||rt(!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;kb(t,n,r);let s=xb(e);if(!("schema"in s))return{errors:s};try{let{operation:o}=s,u=LH(s,o,i);return ni(u)?u.then(l=>sN(l,s.errors),l=>(s.errors.push(l),sN(null,s.errors))):sN(u,s.errors)}catch(o){return s.errors.push(o),sN(null,s.errors)}}function Mm(e){let t=pc(e);if(ni(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function sN(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function kb(e,t,n){t||rt(!1,"Must provide document."),al(e),n==null||sr(n)||rt(!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 xb(e){var t,n;let{schema:r,document:i,rootValue:s,contextValue:o,variableValues:u,operationName:l,fieldResolver:d,typeResolver:p,subscribeFieldResolver:y}=e,N,I=Object.create(null);for(let j of i.definitions)switch(j.kind){case R.OPERATION_DEFINITION:if(l==null){if(N!==void 0)return[new Y("Must provide operation name if query contains multiple operations.")];N=j}else((t=j.name)===null||t===void 0?void 0:t.value)===l&&(N=j);break;case R.FRAGMENT_DEFINITION:I[j.name.value]=j;break;default:}if(!N)return l!=null?[new Y(`Unknown operation named "${l}".`)]:[new Y("Must provide an operation.")];let b=(n=N.variableDefinitions)!==null&&n!==void 0?n:[],x=Em(r,b,u!=null?u:{},{maxErrors:50});return x.errors?x.errors:{schema:r,fragments:I,rootValue:s,contextValue:o,operation:N,variableValues:x.coerced,fieldResolver:d!=null?d:Um,typeResolver:p!=null?p:uN,subscribeFieldResolver:y!=null?y:Um,errors:[]}}function LH(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new Y(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=Gd(e.schema,e.fragments,e.variableValues,r,t.selectionSet),s=void 0;switch(t.operation){case Un.QUERY:return oN(e,r,n,s,i);case Un.MUTATION:return PH(e,r,n,s,i);case Un.SUBSCRIPTION:return oN(e,r,n,s,i)}}function PH(e,t,n,r,i){return fx(i.entries(),(s,[o,u])=>{let l=ka(r,o,t.name),d=Ex(e,t,n,u,l);return d===void 0?s:ni(d)?d.then(p=>(s[o]=p,s)):(s[o]=d,s)},Object.create(null))}function oN(e,t,n,r,i){let s=Object.create(null),o=!1;try{for(let[u,l]of i.entries()){let d=ka(r,u,t.name),p=Ex(e,t,n,l,d);p!==void 0&&(s[u]=p,ni(p)&&(o=!0))}}catch(u){if(o)return wb(s).finally(()=>{throw u});throw u}return o?wb(s):s}function Ex(e,t,n,r,i){var s;let o=Ub(e.schema,t,r[0]);if(!o)return;let u=o.type,l=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,d=Cb(e,o,r,t,i);try{let p=dc(o,r[0],e.variableValues),y=e.contextValue,N=l(n,p,y,d),I;return ni(N)?I=N.then(b=>Cm(e,u,r,d,i,b)):I=Cm(e,u,r,d,i,N),ni(I)?I.then(void 0,b=>{let x=jo(b,r,br(i));return aN(x,u,e)}):I}catch(p){let y=jo(p,r,br(i));return aN(y,u,e)}}function Cb(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 aN(e,t,n){if(Qe(t))throw e;return n.errors.push(e),null}function Cm(e,t,n,r,i,s){if(s instanceof Error)throw s;if(Qe(t)){let o=Cm(e,t.ofType,n,r,i,s);if(o===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return o}if(s==null)return null;if(Pt(t))return kH(e,t,n,r,i,s);if(Rr(t))return xH(t,s);if(zr(t))return CH(e,t,n,r,i,s);if(ot(t))return Pb(e,t,n,r,i,s);Qt(!1,"Cannot complete value of unexpected output type: "+ne(t))}function kH(e,t,n,r,i,s){if(!Cd(s))throw new Y(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);let o=t.ofType,u=!1,l=Array.from(s,(d,p)=>{let y=ka(i,p,void 0);try{let N;return ni(d)?N=d.then(I=>Cm(e,o,n,r,y,I)):N=Cm(e,o,n,r,y,d),ni(N)?(u=!0,N.then(void 0,I=>{let b=jo(I,n,br(y));return aN(b,o,e)})):N}catch(N){let I=jo(N,n,br(y));return aN(I,o,e)}});return u?Promise.all(l):l}function xH(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${ne(e)}.serialize(${ne(t)})\` to return non-nullable value, returned: ${ne(n)}`);return n}function CH(e,t,n,r,i,s){var o;let u=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,l=e.contextValue,d=u(s,l,r,t);return ni(d)?d.then(p=>Pb(e,yx(p,e,t,n,r,s),n,r,i,s)):Pb(e,yx(d,e,t,n,r,s),n,r,i,s)}function yx(e,t,n,r,i,s){if(e==null)throw new Y(`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(ot(e))throw new Y("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 Y(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${ne(s)}, received "${ne(e)}".`);let o=t.schema.getType(e);if(o==null)throw new Y(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!ot(o))throw new Y(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new Y(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function Pb(e,t,n,r,i,s){let o=wH(e,t,n);if(t.isTypeOf){let u=t.isTypeOf(s,e.contextValue,r);if(ni(u))return u.then(l=>{if(!l)throw Nx(t,s,n);return oN(e,t,s,i,o)});if(!u)throw Nx(t,s,n)}return oN(e,t,s,i,o)}function Nx(e,t,n){return new Y(`Expected value of type "${e.name}" but got: ${ne(t)}.`,{nodes:n})}function Ub(e,t,n){let r=n.name.value;return r===Fa.name&&e.getQueryType()===t?Fa:r===wa.name&&e.getQueryType()===t?wa:r===La.name?La:t.getFields()[r]}var wH,uN,Um,Bm=ue(()=>{"use strict";m();T();h();Ni();Nn();ri();Ky();Lo();by();dx();hm();px();mx();st();iN();Po();Xt();Zt();As();Hf();Zy();Kd();wH=lx((e,t,n)=>sx(e.schema,e.fragments,e.variableValues,t,n));uN=function(e,t,n,r){if(sr(e)&&typeof e.__typename=="string")return e.__typename;let i=n.schema.getPossibleTypes(r),s=[];for(let o=0;o{for(let u=0;ut(vx(e)))}function Ix(e){let t=vx(e);if(ni(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function vx(e){arguments.length<2||rt(!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:s,operationName:o,fieldResolver:u,typeResolver:l}=e,d=Ud(t);if(d.length>0)return{errors:d};let p;try{p=io(n)}catch(N){return{errors:[N]}}let y=km(t,p);return y.length>0?{errors:y}:pc({schema:t,document:p,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:u,typeResolver:l})}var _x=ue(()=>{"use strict";m();T();h();Ni();by();bd();Hf();xm();Bm()});var bx=ue(()=>{"use strict";m();T();h();sl();Zt();Ui();Co();As();Hf();kf()});var Ox=ue(()=>{"use strict";m();T();h();Cy();Oy();n_();Xt();Df();Py();bd();is();Wc();Po();cl();gd()});function Mb(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}var Sx=ue(()=>{"use strict";m();T();h()});function Dx(e,t){let n=e[Symbol.asyncIterator]();function r(s){return yr(this,null,function*(){if(s.done)return s;try{return{value:yield t(s.value),done:!1}}catch(o){if(typeof n.return=="function")try{yield n.return()}catch(u){}throw o}})}return{next(){return yr(this,null,function*(){return r(yield n.next())})},return(){return yr(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(s){return yr(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(s));throw s})},[Symbol.asyncIterator](){return this}}}var Ax=ue(()=>{"use strict";m();T();h()});function Bb(t){return yr(this,arguments,function*(e){arguments.length<2||rt(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield cN(e);return Mb(n)?Dx(n,i=>pc(K(k({},e),{rootValue:i}))):n})}function UH(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 cN(...e){return yr(this,null,function*(){let t=UH(e),{schema:n,document:r,variableValues:i}=t;kb(n,r,i);let s=xb(t);if(!("schema"in s))return{errors:s};try{let o=yield MH(s);if(!Mb(o))throw new Error(`Subscription field must return Async Iterable. Received: ${ne(o)}.`);return o}catch(o){if(o instanceof Y)return{errors:[o]};throw o}})}function MH(e){return yr(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:s}=e,o=t.getSubscriptionType();if(o==null)throw new Y("Schema is not configured to execute subscription operation.",{nodes:r});let u=Gd(t,n,i,o,r.selectionSet),[l,d]=[...u.entries()][0],p=Ub(t,o,d[0]);if(!p){let b=d[0].name.value;throw new Y(`The subscription field "${b}" is not defined.`,{nodes:d})}let y=ka(void 0,l,o.name),N=Cb(e,p,d,o,y);try{var I;let b=dc(p,d[0],i),x=e.contextValue,Q=yield((I=p.subscribe)!==null&&I!==void 0?I:e.subscribeFieldResolver)(s,b,x,N);if(Q instanceof Error)throw Q;return Q}catch(b){throw jo(b,d,br(y))}})}var Rx=ue(()=>{"use strict";m();T();h();Ni();Nn();Sx();hm();st();iN();Zy();Bm();Ax();Kd()});var Fx=ue(()=>{"use strict";m();T();h();hm();Bm();Rx();Kd()});function Vb(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||Qt(!1),e.reportError(new Y(`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 Y(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{let s=e.getParentType(),o=e.getFieldDef();s!=null&&o!=null||Qt(!1),e.reportError(new Y(`Field "${s.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=Gn(e.getParentInputType());if(It(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new Y(`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=Gn(e.getInputType());i!=null||Qt(!1),e.reportError(new Y(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}var wx=ue(()=>{"use strict";m();T();h();ri();st();Zt()});function jb(e){return{Field(t){let n=Gn(e.getType());n&&ui(n)&&e.reportError(new Y(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}var Lx=ue(()=>{"use strict";m();T();h();st();Zt();As()});var Px=ue(()=>{"use strict";m();T();h();xm();Fb();Rb();M_();B_();V_();$_();q_();K_();G_();Q_();z_();H_();W_();X_();ib();sb();ub();cb();fb();hb();yb();gb();Ib();vb();Ob();Sb();Db();Ab();J_();Y_();_b();bb();Nb();Eb();mb();Tb();ob();wx();Lx()});var kx=ue(()=>{"use strict";m();T();h();st();Sy();iN()});function Vm(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":"",s=t.schemaDescription?n:"";function o(l){return t.inputValueDeprecation?l:""}let u=t.oneOf?"isOneOf":"";return` +`))}var xm=ue(()=>{"use strict";m();T();h();Ni();st();Wc();Hf();Qy();Rb();Fb()});function lx(e){let t;return function(r,i,s){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(s);return l===void 0&&(l=e(r,i,s),u.set(s,l)),l}}var dx=ue(()=>{"use strict";m();T();h()});function wb(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 px=ue(()=>{"use strict";m();T();h()});function fx(e,t,n){let r=n;for(let i of e)r=ni(r)?r.then(s=>t(s,i)):t(r,i);return r}var mx=ue(()=>{"use strict";m();T();h();by()});function hx(e){return e instanceof Error?e:new Lb(e)}var Lb,Tx=ue(()=>{"use strict";m();T();h();Nn();Lb=class extends Error{constructor(t){super("Unexpected error value: "+ne(t)),this.name="NonErrorThrown",this.thrownValue=t}}});function jo(e,t,n){var r;let i=hx(e);return FH(i)?i:new Y(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function FH(e){return Array.isArray(e.path)}var iN=ue(()=>{"use strict";m();T();h();Tx();st()});function pc(e){arguments.length<2||rt(!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;kb(t,n,r);let s=xb(e);if(!("schema"in s))return{errors:s};try{let{operation:o}=s,u=LH(s,o,i);return ni(u)?u.then(l=>sN(l,s.errors),l=>(s.errors.push(l),sN(null,s.errors))):sN(u,s.errors)}catch(o){return s.errors.push(o),sN(null,s.errors)}}function Mm(e){let t=pc(e);if(ni(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function sN(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function kb(e,t,n){t||rt(!1,"Must provide document."),al(e),n==null||sr(n)||rt(!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 xb(e){var t,n;let{schema:r,document:i,rootValue:s,contextValue:o,variableValues:u,operationName:l,fieldResolver:d,typeResolver:p,subscribeFieldResolver:y}=e,N,I=Object.create(null);for(let j of i.definitions)switch(j.kind){case R.OPERATION_DEFINITION:if(l==null){if(N!==void 0)return[new Y("Must provide operation name if query contains multiple operations.")];N=j}else((t=j.name)===null||t===void 0?void 0:t.value)===l&&(N=j);break;case R.FRAGMENT_DEFINITION:I[j.name.value]=j;break;default:}if(!N)return l!=null?[new Y(`Unknown operation named "${l}".`)]:[new Y("Must provide an operation.")];let _=(n=N.variableDefinitions)!==null&&n!==void 0?n:[],C=Em(r,_,u!=null?u:{},{maxErrors:50});return C.errors?C.errors:{schema:r,fragments:I,rootValue:s,contextValue:o,operation:N,variableValues:C.coerced,fieldResolver:d!=null?d:Um,typeResolver:p!=null?p:uN,subscribeFieldResolver:y!=null?y:Um,errors:[]}}function LH(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new Y(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=Gd(e.schema,e.fragments,e.variableValues,r,t.selectionSet),s=void 0;switch(t.operation){case Un.QUERY:return oN(e,r,n,s,i);case Un.MUTATION:return PH(e,r,n,s,i);case Un.SUBSCRIPTION:return oN(e,r,n,s,i)}}function PH(e,t,n,r,i){return fx(i.entries(),(s,[o,u])=>{let l=ka(r,o,t.name),d=Ex(e,t,n,u,l);return d===void 0?s:ni(d)?d.then(p=>(s[o]=p,s)):(s[o]=d,s)},Object.create(null))}function oN(e,t,n,r,i){let s=Object.create(null),o=!1;try{for(let[u,l]of i.entries()){let d=ka(r,u,t.name),p=Ex(e,t,n,l,d);p!==void 0&&(s[u]=p,ni(p)&&(o=!0))}}catch(u){if(o)return wb(s).finally(()=>{throw u});throw u}return o?wb(s):s}function Ex(e,t,n,r,i){var s;let o=Ub(e.schema,t,r[0]);if(!o)return;let u=o.type,l=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,d=Cb(e,o,r,t,i);try{let p=dc(o,r[0],e.variableValues),y=e.contextValue,N=l(n,p,y,d),I;return ni(N)?I=N.then(_=>Cm(e,u,r,d,i,_)):I=Cm(e,u,r,d,i,N),ni(I)?I.then(void 0,_=>{let C=jo(_,r,br(i));return aN(C,u,e)}):I}catch(p){let y=jo(p,r,br(i));return aN(y,u,e)}}function Cb(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 aN(e,t,n){if(Qe(t))throw e;return n.errors.push(e),null}function Cm(e,t,n,r,i,s){if(s instanceof Error)throw s;if(Qe(t)){let o=Cm(e,t.ofType,n,r,i,s);if(o===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return o}if(s==null)return null;if(Pt(t))return kH(e,t,n,r,i,s);if(Rr(t))return xH(t,s);if(zr(t))return CH(e,t,n,r,i,s);if(ot(t))return Pb(e,t,n,r,i,s);Qt(!1,"Cannot complete value of unexpected output type: "+ne(t))}function kH(e,t,n,r,i,s){if(!Cd(s))throw new Y(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);let o=t.ofType,u=!1,l=Array.from(s,(d,p)=>{let y=ka(i,p,void 0);try{let N;return ni(d)?N=d.then(I=>Cm(e,o,n,r,y,I)):N=Cm(e,o,n,r,y,d),ni(N)?(u=!0,N.then(void 0,I=>{let _=jo(I,n,br(y));return aN(_,o,e)})):N}catch(N){let I=jo(N,n,br(y));return aN(I,o,e)}});return u?Promise.all(l):l}function xH(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${ne(e)}.serialize(${ne(t)})\` to return non-nullable value, returned: ${ne(n)}`);return n}function CH(e,t,n,r,i,s){var o;let u=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,l=e.contextValue,d=u(s,l,r,t);return ni(d)?d.then(p=>Pb(e,yx(p,e,t,n,r,s),n,r,i,s)):Pb(e,yx(d,e,t,n,r,s),n,r,i,s)}function yx(e,t,n,r,i,s){if(e==null)throw new Y(`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(ot(e))throw new Y("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 Y(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${ne(s)}, received "${ne(e)}".`);let o=t.schema.getType(e);if(o==null)throw new Y(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!ot(o))throw new Y(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new Y(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function Pb(e,t,n,r,i,s){let o=wH(e,t,n);if(t.isTypeOf){let u=t.isTypeOf(s,e.contextValue,r);if(ni(u))return u.then(l=>{if(!l)throw Nx(t,s,n);return oN(e,t,s,i,o)});if(!u)throw Nx(t,s,n)}return oN(e,t,s,i,o)}function Nx(e,t,n){return new Y(`Expected value of type "${e.name}" but got: ${ne(t)}.`,{nodes:n})}function Ub(e,t,n){let r=n.name.value;return r===Fa.name&&e.getQueryType()===t?Fa:r===wa.name&&e.getQueryType()===t?wa:r===La.name?La:t.getFields()[r]}var wH,uN,Um,Bm=ue(()=>{"use strict";m();T();h();Ni();Nn();ri();Ky();Lo();by();dx();hm();px();mx();st();iN();Po();Xt();Zt();As();Hf();Zy();Kd();wH=lx((e,t,n)=>sx(e.schema,e.fragments,e.variableValues,t,n));uN=function(e,t,n,r){if(sr(e)&&typeof e.__typename=="string")return e.__typename;let i=n.schema.getPossibleTypes(r),s=[];for(let o=0;o{for(let u=0;ut(vx(e)))}function Ix(e){let t=vx(e);if(ni(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function vx(e){arguments.length<2||rt(!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:s,operationName:o,fieldResolver:u,typeResolver:l}=e,d=Ud(t);if(d.length>0)return{errors:d};let p;try{p=io(n)}catch(N){return{errors:[N]}}let y=km(t,p);return y.length>0?{errors:y}:pc({schema:t,document:p,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:u,typeResolver:l})}var _x=ue(()=>{"use strict";m();T();h();Ni();by();bd();Hf();xm();Bm()});var bx=ue(()=>{"use strict";m();T();h();sl();Zt();Ui();Co();As();Hf();kf()});var Ox=ue(()=>{"use strict";m();T();h();Cy();Oy();n_();Xt();Df();Py();bd();is();Wc();Po();cl();gd()});function Mb(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}var Sx=ue(()=>{"use strict";m();T();h()});function Dx(e,t){let n=e[Symbol.asyncIterator]();function r(s){return yr(this,null,function*(){if(s.done)return s;try{return{value:yield t(s.value),done:!1}}catch(o){if(typeof n.return=="function")try{yield n.return()}catch(u){}throw o}})}return{next(){return yr(this,null,function*(){return r(yield n.next())})},return(){return yr(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(s){return yr(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(s));throw s})},[Symbol.asyncIterator](){return this}}}var Ax=ue(()=>{"use strict";m();T();h()});function Bb(t){return yr(this,arguments,function*(e){arguments.length<2||rt(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield cN(e);return Mb(n)?Dx(n,i=>pc(K(k({},e),{rootValue:i}))):n})}function UH(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 cN(...e){return yr(this,null,function*(){let t=UH(e),{schema:n,document:r,variableValues:i}=t;kb(n,r,i);let s=xb(t);if(!("schema"in s))return{errors:s};try{let o=yield MH(s);if(!Mb(o))throw new Error(`Subscription field must return Async Iterable. Received: ${ne(o)}.`);return o}catch(o){if(o instanceof Y)return{errors:[o]};throw o}})}function MH(e){return yr(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:s}=e,o=t.getSubscriptionType();if(o==null)throw new Y("Schema is not configured to execute subscription operation.",{nodes:r});let u=Gd(t,n,i,o,r.selectionSet),[l,d]=[...u.entries()][0],p=Ub(t,o,d[0]);if(!p){let _=d[0].name.value;throw new Y(`The subscription field "${_}" is not defined.`,{nodes:d})}let y=ka(void 0,l,o.name),N=Cb(e,p,d,o,y);try{var I;let _=dc(p,d[0],i),C=e.contextValue,Q=yield((I=p.subscribe)!==null&&I!==void 0?I:e.subscribeFieldResolver)(s,_,C,N);if(Q instanceof Error)throw Q;return Q}catch(_){throw jo(_,d,br(y))}})}var Rx=ue(()=>{"use strict";m();T();h();Ni();Nn();Sx();hm();st();iN();Zy();Bm();Ax();Kd()});var Fx=ue(()=>{"use strict";m();T();h();hm();Bm();Rx();Kd()});function Vb(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||Qt(!1),e.reportError(new Y(`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 Y(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{let s=e.getParentType(),o=e.getFieldDef();s!=null&&o!=null||Qt(!1),e.reportError(new Y(`Field "${s.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=Gn(e.getParentInputType());if(It(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new Y(`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=Gn(e.getInputType());i!=null||Qt(!1),e.reportError(new Y(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}var wx=ue(()=>{"use strict";m();T();h();ri();st();Zt()});function jb(e){return{Field(t){let n=Gn(e.getType());n&&ui(n)&&e.reportError(new Y(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}var Lx=ue(()=>{"use strict";m();T();h();st();Zt();As()});var Px=ue(()=>{"use strict";m();T();h();xm();Fb();Rb();M_();B_();V_();$_();q_();K_();G_();Q_();z_();H_();W_();X_();ib();sb();ub();cb();fb();hb();yb();gb();Ib();vb();Ob();Sb();Db();Ab();J_();Y_();_b();bb();Nb();Eb();mb();Tb();ob();wx();Lx()});var kx=ue(()=>{"use strict";m();T();h();st();Sy();iN()});function Vm(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":"",s=t.schemaDescription?n:"";function o(l){return t.inputValueDeprecation?l:""}let u=t.oneOf?"isOneOf":"";return` query IntrospectionQuery { __schema { ${s} @@ -173,7 +173,7 @@ In some cases, you need to provide options to alter GraphQL's execution behavior } } } - `}var $b=ue(()=>{"use strict";m();T();h()});function qb(e,t){let n=null;for(let i of e.definitions)if(i.kind===R.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 xx=ue(()=>{"use strict";m();T();h();Xt()});function Kb(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new Y("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 Y("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new Y("Schema is not configured for subscriptions.",{nodes:t});return n}throw new Y("Can only have query, mutation and subscription operations.",{nodes:t})}var Cx=ue(()=>{"use strict";m();T();h();st()});function Gb(e,t){let n=k({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=io(Vm(n)),i=Mm({schema:e,document:r});return!i.errors&&i.data||Qt(!1),i.data}var Ux=ue(()=>{"use strict";m();T();h();ri();bd();Bm();$b()});function Qb(e,t){sr(e)&&sr(e.__schema)||rt(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${ne(e)}.`);let n=e.__schema,r=Ss(n.types,B=>B.name,B=>N(B));for(let B of[...xo,...Mo])r[B.name]&&(r[B.name]=B);let i=n.queryType?p(n.queryType):null,s=n.mutationType?p(n.mutationType):null,o=n.subscriptionType?p(n.subscriptionType):null,u=n.directives?n.directives.map(xt):[];return new Bi({description:n.description,query:i,mutation:s,subscription:o,types:Object.values(r),directives:u,assumeValid:t==null?void 0:t.assumeValid});function l(B){if(B.kind===mn.LIST){let he=B.ofType;if(!he)throw new Error("Decorated type deeper than introspection query.");return new Mn(l(he))}if(B.kind===mn.NON_NULL){let he=B.ofType;if(!he)throw new Error("Decorated type deeper than introspection query.");let nt=l(he);return new pt(Mf(nt))}return d(B)}function d(B){let he=B.name;if(!he)throw new Error(`Unknown type reference: ${ne(B)}.`);let nt=r[he];if(!nt)throw new Error(`Invalid or incomplete schema, unknown type: ${he}. Ensure that a full introspection query is used in order to build a client schema.`);return nt}function p(B){return xf(d(B))}function y(B){return Cf(d(B))}function N(B){if(B!=null&&B.name!=null&&B.kind!=null)switch(B.kind){case mn.SCALAR:return I(B);case mn.OBJECT:return x(B);case mn.INTERFACE:return j(B);case mn.UNION:return Q(B);case mn.ENUM:return re(B);case mn.INPUT_OBJECT:return se(B)}let he=ne(B);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${he}.`)}function I(B){return new Jr({name:B.name,description:B.description,specifiedByURL:B.specifiedByURL})}function b(B){if(B.interfaces===null&&B.kind===mn.INTERFACE)return[];if(!B.interfaces){let he=ne(B);throw new Error(`Introspection result missing interfaces: ${he}.`)}return B.interfaces.map(y)}function x(B){return new _r({name:B.name,description:B.description,interfaces:()=>b(B),fields:()=>pe(B)})}function j(B){return new ss({name:B.name,description:B.description,interfaces:()=>b(B),fields:()=>pe(B)})}function Q(B){if(!B.possibleTypes){let he=ne(B);throw new Error(`Introspection result missing possibleTypes: ${he}.`)}return new os({name:B.name,description:B.description,types:()=>B.possibleTypes.map(p)})}function re(B){if(!B.enumValues){let he=ne(B);throw new Error(`Introspection result missing enumValues: ${he}.`)}return new oi({name:B.name,description:B.description,values:Ss(B.enumValues,he=>he.name,he=>({description:he.description,deprecationReason:he.deprecationReason}))})}function se(B){if(!B.inputFields){let he=ne(B);throw new Error(`Introspection result missing inputFields: ${he}.`)}return new as({name:B.name,description:B.description,fields:()=>Ce(B.inputFields),isOneOf:B.isOneOf})}function pe(B){if(!B.fields)throw new Error(`Introspection result missing fields: ${ne(B)}.`);return Ss(B.fields,he=>he.name,ye)}function ye(B){let he=l(B.type);if(!us(he)){let nt=ne(he);throw new Error(`Introspection must provide output type for fields, but received: ${nt}.`)}if(!B.args){let nt=ne(B);throw new Error(`Introspection result missing field args: ${nt}.`)}return{description:B.description,deprecationReason:B.deprecationReason,type:he,args:Ce(B.args)}}function Ce(B){return Ss(B,he=>he.name,ht)}function ht(B){let he=l(B.type);if(!Nr(he)){let Ct=ne(he);throw new Error(`Introspection must provide input type for arguments, but received: ${Ct}.`)}let nt=B.defaultValue!=null?_i(Ff(B.defaultValue),he):void 0;return{description:B.description,type:he,defaultValue:nt,deprecationReason:B.deprecationReason}}function xt(B){if(!B.args){let he=ne(B);throw new Error(`Introspection result missing directive args: ${he}.`)}if(!B.locations){let he=ne(B);throw new Error(`Introspection result missing directive locations: ${he}.`)}return new Vr({name:B.name,description:B.description,isRepeatable:B.isRepeatable,locations:B.locations.slice(),args:Ce(B.args)})}}var Mx=ue(()=>{"use strict";m();T();h();Ni();Nn();Lo();wf();bd();Zt();Ui();As();Co();sl();Nm()});function Yb(e,t,n){il(e),t!=null&&t.kind===R.DOCUMENT||rt(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&cx(t,e);let r=e.toConfig(),i=Jb(r,t,n);return r===i?e:new Bi(i)}function Jb(e,t,n){var r,i,s,o;let u=[],l=Object.create(null),d=[],p,y=[];for(let U of t.definitions)if(U.kind===R.SCHEMA_DEFINITION)p=U;else if(U.kind===R.SCHEMA_EXTENSION)y.push(U);else if(Rs(U))u.push(U);else if(lc(U)){let ae=U.name.value,te=l[ae];l[ae]=te?te.concat([U]):[U]}else U.kind===R.DIRECTIVE_DEFINITION&&d.push(U);if(Object.keys(l).length===0&&u.length===0&&d.length===0&&y.length===0&&p==null)return e;let N=Object.create(null);for(let U of e.types)N[U.name]=re(U);for(let U of u){var I;let ae=U.name.value;N[ae]=(I=Bx[ae])!==null&&I!==void 0?I:$n(U)}let b=k(k({query:e.query&&j(e.query),mutation:e.mutation&&j(e.mutation),subscription:e.subscription&&j(e.subscription)},p&&nt([p])),nt(y));return K(k({description:(r=p)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},b),{types:Object.values(N),directives:[...e.directives.map(Q),...d.map(Fn)],extensions:Object.create(null),astNode:(s=p)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(y),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function x(U){return Pt(U)?new Mn(x(U.ofType)):Qe(U)?new pt(x(U.ofType)):j(U)}function j(U){return N[U.name]}function Q(U){let ae=U.toConfig();return new Vr(K(k({},ae),{args:so(ae.args,he)}))}function re(U){if(ui(U)||uo(U))return U;if(tr(U))return ye(U);if(ot(U))return Ce(U);if(Nt(U))return ht(U);if(fn(U))return xt(U);if(rn(U))return pe(U);if(It(U))return se(U);Qt(!1,"Unexpected type: "+ne(U))}function se(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new as(K(k({},te),{fields:()=>k(k({},so(te.fields,Ke=>K(k({},Ke),{type:x(Ke.type)}))),mi(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function pe(U){var ae;let te=U.toConfig(),ce=(ae=l[U.name])!==null&&ae!==void 0?ae:[];return new oi(K(k({},te),{values:k(k({},te.values),Xr(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function ye(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[],Ke=te.specifiedByURL;for(let ee of ce){var G;Ke=(G=Vx(ee))!==null&&G!==void 0?G:Ke}return new Jr(K(k({},te),{specifiedByURL:Ke,extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function Ce(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new _r(K(k({},te),{interfaces:()=>[...U.getInterfaces().map(j),...Pn(ce)],fields:()=>k(k({},so(te.fields,B)),_n(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function ht(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new ss(K(k({},te),{interfaces:()=>[...U.getInterfaces().map(j),...Pn(ce)],fields:()=>k(k({},so(te.fields,B)),_n(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function xt(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new os(K(k({},te),{types:()=>[...U.getTypes().map(j),...on(ce)],extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function B(U){return K(k({},U),{type:x(U.type),args:U.args&&so(U.args,he)})}function he(U){return K(k({},U),{type:x(U.type)})}function nt(U){let ae={};for(let ce of U){var te;let Ke=(te=ce.operationTypes)!==null&&te!==void 0?te:[];for(let G of Ke)ae[G.operation]=Ct(G.type)}return ae}function Ct(U){var ae;let te=U.name.value,ce=(ae=Bx[te])!==null&&ae!==void 0?ae:N[te];if(ce===void 0)throw new Error(`Unknown type: "${te}".`);return ce}function sn(U){return U.kind===R.LIST_TYPE?new Mn(sn(U.type)):U.kind===R.NON_NULL_TYPE?new pt(sn(U.type)):Ct(U)}function Fn(U){var ae;return new Vr({name:U.name.value,description:(ae=U.description)===null||ae===void 0?void 0:ae.value,locations:U.locations.map(({value:te})=>te),isRepeatable:U.repeatable,args:bn(U.arguments),astNode:U})}function _n(U){let ae=Object.create(null);for(let Ke of U){var te;let G=(te=Ke.fields)!==null&&te!==void 0?te:[];for(let ee of G){var ce;ae[ee.name.value]={type:sn(ee.type),description:(ce=ee.description)===null||ce===void 0?void 0:ce.value,args:bn(ee.arguments),deprecationReason:lN(ee),astNode:ee}}}return ae}function bn(U){let ae=U!=null?U:[],te=Object.create(null);for(let Ke of ae){var ce;let G=sn(Ke.type);te[Ke.name.value]={type:G,description:(ce=Ke.description)===null||ce===void 0?void 0:ce.value,defaultValue:_i(Ke.defaultValue,G),deprecationReason:lN(Ke),astNode:Ke}}return te}function mi(U){let ae=Object.create(null);for(let Ke of U){var te;let G=(te=Ke.fields)!==null&&te!==void 0?te:[];for(let ee of G){var ce;let Ue=sn(ee.type);ae[ee.name.value]={type:Ue,description:(ce=ee.description)===null||ce===void 0?void 0:ce.value,defaultValue:_i(ee.defaultValue,Ue),deprecationReason:lN(ee),astNode:ee}}}return ae}function Xr(U){let ae=Object.create(null);for(let Ke of U){var te;let G=(te=Ke.values)!==null&&te!==void 0?te:[];for(let ee of G){var ce;ae[ee.name.value]={description:(ce=ee.description)===null||ce===void 0?void 0:ce.value,deprecationReason:lN(ee),astNode:ee}}}return ae}function Pn(U){return U.flatMap(ae=>{var te,ce;return(te=(ce=ae.interfaces)===null||ce===void 0?void 0:ce.map(Ct))!==null&&te!==void 0?te:[]})}function on(U){return U.flatMap(ae=>{var te,ce;return(te=(ce=ae.types)===null||ce===void 0?void 0:ce.map(Ct))!==null&&te!==void 0?te:[]})}function $n(U){var ae;let te=U.name.value,ce=(ae=l[te])!==null&&ae!==void 0?ae:[];switch(U.kind){case R.OBJECT_TYPE_DEFINITION:{var Ke;let Je=[U,...ce];return new _r({name:te,description:(Ke=U.description)===null||Ke===void 0?void 0:Ke.value,interfaces:()=>Pn(Je),fields:()=>_n(Je),astNode:U,extensionASTNodes:ce})}case R.INTERFACE_TYPE_DEFINITION:{var G;let Je=[U,...ce];return new ss({name:te,description:(G=U.description)===null||G===void 0?void 0:G.value,interfaces:()=>Pn(Je),fields:()=>_n(Je),astNode:U,extensionASTNodes:ce})}case R.ENUM_TYPE_DEFINITION:{var ee;let Je=[U,...ce];return new oi({name:te,description:(ee=U.description)===null||ee===void 0?void 0:ee.value,values:Xr(Je),astNode:U,extensionASTNodes:ce})}case R.UNION_TYPE_DEFINITION:{var Ue;let Je=[U,...ce];return new os({name:te,description:(Ue=U.description)===null||Ue===void 0?void 0:Ue.value,types:()=>on(Je),astNode:U,extensionASTNodes:ce})}case R.SCALAR_TYPE_DEFINITION:{var Xe;return new Jr({name:te,description:(Xe=U.description)===null||Xe===void 0?void 0:Xe.value,specifiedByURL:Vx(U),astNode:U,extensionASTNodes:ce})}case R.INPUT_OBJECT_TYPE_DEFINITION:{var jt;let Je=[U,...ce];return new as({name:te,description:(jt=U.description)===null||jt===void 0?void 0:jt.value,fields:()=>mi(Je),astNode:U,extensionASTNodes:ce,isOneOf:BH(U)})}}}}function lN(e){let t=Vo(Uo,e);return t==null?void 0:t.reason}function Vx(e){let t=Vo(kd,e);return t==null?void 0:t.url}function BH(e){return!!Vo(xd,e)}var Bx,zb=ue(()=>{"use strict";m();T();h();Ni();Nn();ri();ic();l_();Xt();cl();Zt();Ui();As();Co();sl();xm();Kd();Nm();Bx=si([...xo,...Mo],e=>e.name)});function dN(e,t){e!=null&&e.kind===R.DOCUMENT||rt(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&ux(e);let r=Jb({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(let s of r.types)switch(s.name){case"Query":r.query=s;break;case"Mutation":r.mutation=s;break;case"Subscription":r.subscription=s;break}let i=[...r.directives,...ai.filter(s=>r.directives.every(o=>o.name!==s.name))];return new Bi(K(k({},r),{directives:i}))}function Hb(e,t){let n=io(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return dN(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}var jx=ue(()=>{"use strict";m();T();h();Ni();Xt();bd();Ui();sl();xm();zb()});function jm(e){let t=e.toConfig(),n=Ss(Wb(t.types),N=>N.name,y);return new Bi(K(k({},t),{types:Object.values(n),directives:Wb(t.directives).map(o),query:s(t.query),mutation:s(t.mutation),subscription:s(t.subscription)}));function r(N){return Pt(N)?new Mn(r(N.ofType)):Qe(N)?new pt(r(N.ofType)):i(N)}function i(N){return n[N.name]}function s(N){return N&&i(N)}function o(N){let I=N.toConfig();return new Vr(K(k({},I),{locations:$x(I.locations,b=>b),args:u(I.args)}))}function u(N){return pN(N,I=>K(k({},I),{type:r(I.type)}))}function l(N){return pN(N,I=>K(k({},I),{type:r(I.type),args:I.args&&u(I.args)}))}function d(N){return pN(N,I=>K(k({},I),{type:r(I.type)}))}function p(N){return Wb(N).map(i)}function y(N){if(tr(N)||ui(N))return N;if(ot(N)){let I=N.toConfig();return new _r(K(k({},I),{interfaces:()=>p(I.interfaces),fields:()=>l(I.fields)}))}if(Nt(N)){let I=N.toConfig();return new ss(K(k({},I),{interfaces:()=>p(I.interfaces),fields:()=>l(I.fields)}))}if(fn(N)){let I=N.toConfig();return new os(K(k({},I),{types:()=>p(I.types)}))}if(rn(N)){let I=N.toConfig();return new oi(K(k({},I),{values:pN(I.values,b=>b)}))}if(It(N)){let I=N.toConfig();return new as(K(k({},I),{fields:()=>d(I.fields)}))}Qt(!1,"Unexpected type: "+ne(N))}}function pN(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(Sa))n[r]=t(e[r]);return n}function Wb(e){return $x(e,t=>t.name)}function $x(e,t){return e.slice().sort((n,r)=>{let i=t(n),s=t(r);return Sa(i,s)})}var qx=ue(()=>{"use strict";m();T();h();Nn();ri();wf();Lf();Zt();Ui();As();sl()});function Hd(e){return Kx(e,t=>!cc(t),VH)}function Zb(e){return Kx(e,cc,ui)}function VH(e){return!uo(e)&&!ui(e)}function Kx(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[jH(e),...r.map(s=>zH(s)),...i.map(s=>fN(s))].filter(Boolean).join(` + `}var $b=ue(()=>{"use strict";m();T();h()});function qb(e,t){let n=null;for(let i of e.definitions)if(i.kind===R.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 xx=ue(()=>{"use strict";m();T();h();Xt()});function Kb(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new Y("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 Y("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new Y("Schema is not configured for subscriptions.",{nodes:t});return n}throw new Y("Can only have query, mutation and subscription operations.",{nodes:t})}var Cx=ue(()=>{"use strict";m();T();h();st()});function Gb(e,t){let n=k({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=io(Vm(n)),i=Mm({schema:e,document:r});return!i.errors&&i.data||Qt(!1),i.data}var Ux=ue(()=>{"use strict";m();T();h();ri();bd();Bm();$b()});function Qb(e,t){sr(e)&&sr(e.__schema)||rt(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${ne(e)}.`);let n=e.__schema,r=Ss(n.types,B=>B.name,B=>N(B));for(let B of[...xo,...Mo])r[B.name]&&(r[B.name]=B);let i=n.queryType?p(n.queryType):null,s=n.mutationType?p(n.mutationType):null,o=n.subscriptionType?p(n.subscriptionType):null,u=n.directives?n.directives.map(xt):[];return new Bi({description:n.description,query:i,mutation:s,subscription:o,types:Object.values(r),directives:u,assumeValid:t==null?void 0:t.assumeValid});function l(B){if(B.kind===mn.LIST){let he=B.ofType;if(!he)throw new Error("Decorated type deeper than introspection query.");return new Mn(l(he))}if(B.kind===mn.NON_NULL){let he=B.ofType;if(!he)throw new Error("Decorated type deeper than introspection query.");let nt=l(he);return new pt(Mf(nt))}return d(B)}function d(B){let he=B.name;if(!he)throw new Error(`Unknown type reference: ${ne(B)}.`);let nt=r[he];if(!nt)throw new Error(`Invalid or incomplete schema, unknown type: ${he}. Ensure that a full introspection query is used in order to build a client schema.`);return nt}function p(B){return xf(d(B))}function y(B){return Cf(d(B))}function N(B){if(B!=null&&B.name!=null&&B.kind!=null)switch(B.kind){case mn.SCALAR:return I(B);case mn.OBJECT:return C(B);case mn.INTERFACE:return j(B);case mn.UNION:return Q(B);case mn.ENUM:return re(B);case mn.INPUT_OBJECT:return se(B)}let he=ne(B);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${he}.`)}function I(B){return new Jr({name:B.name,description:B.description,specifiedByURL:B.specifiedByURL})}function _(B){if(B.interfaces===null&&B.kind===mn.INTERFACE)return[];if(!B.interfaces){let he=ne(B);throw new Error(`Introspection result missing interfaces: ${he}.`)}return B.interfaces.map(y)}function C(B){return new _r({name:B.name,description:B.description,interfaces:()=>_(B),fields:()=>pe(B)})}function j(B){return new ss({name:B.name,description:B.description,interfaces:()=>_(B),fields:()=>pe(B)})}function Q(B){if(!B.possibleTypes){let he=ne(B);throw new Error(`Introspection result missing possibleTypes: ${he}.`)}return new os({name:B.name,description:B.description,types:()=>B.possibleTypes.map(p)})}function re(B){if(!B.enumValues){let he=ne(B);throw new Error(`Introspection result missing enumValues: ${he}.`)}return new oi({name:B.name,description:B.description,values:Ss(B.enumValues,he=>he.name,he=>({description:he.description,deprecationReason:he.deprecationReason}))})}function se(B){if(!B.inputFields){let he=ne(B);throw new Error(`Introspection result missing inputFields: ${he}.`)}return new as({name:B.name,description:B.description,fields:()=>Ce(B.inputFields),isOneOf:B.isOneOf})}function pe(B){if(!B.fields)throw new Error(`Introspection result missing fields: ${ne(B)}.`);return Ss(B.fields,he=>he.name,ye)}function ye(B){let he=l(B.type);if(!us(he)){let nt=ne(he);throw new Error(`Introspection must provide output type for fields, but received: ${nt}.`)}if(!B.args){let nt=ne(B);throw new Error(`Introspection result missing field args: ${nt}.`)}return{description:B.description,deprecationReason:B.deprecationReason,type:he,args:Ce(B.args)}}function Ce(B){return Ss(B,he=>he.name,ht)}function ht(B){let he=l(B.type);if(!Nr(he)){let Ct=ne(he);throw new Error(`Introspection must provide input type for arguments, but received: ${Ct}.`)}let nt=B.defaultValue!=null?_i(Ff(B.defaultValue),he):void 0;return{description:B.description,type:he,defaultValue:nt,deprecationReason:B.deprecationReason}}function xt(B){if(!B.args){let he=ne(B);throw new Error(`Introspection result missing directive args: ${he}.`)}if(!B.locations){let he=ne(B);throw new Error(`Introspection result missing directive locations: ${he}.`)}return new Vr({name:B.name,description:B.description,isRepeatable:B.isRepeatable,locations:B.locations.slice(),args:Ce(B.args)})}}var Mx=ue(()=>{"use strict";m();T();h();Ni();Nn();Lo();wf();bd();Zt();Ui();As();Co();sl();Nm()});function Yb(e,t,n){il(e),t!=null&&t.kind===R.DOCUMENT||rt(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&cx(t,e);let r=e.toConfig(),i=Jb(r,t,n);return r===i?e:new Bi(i)}function Jb(e,t,n){var r,i,s,o;let u=[],l=Object.create(null),d=[],p,y=[];for(let U of t.definitions)if(U.kind===R.SCHEMA_DEFINITION)p=U;else if(U.kind===R.SCHEMA_EXTENSION)y.push(U);else if(Rs(U))u.push(U);else if(lc(U)){let ae=U.name.value,te=l[ae];l[ae]=te?te.concat([U]):[U]}else U.kind===R.DIRECTIVE_DEFINITION&&d.push(U);if(Object.keys(l).length===0&&u.length===0&&d.length===0&&y.length===0&&p==null)return e;let N=Object.create(null);for(let U of e.types)N[U.name]=re(U);for(let U of u){var I;let ae=U.name.value;N[ae]=(I=Bx[ae])!==null&&I!==void 0?I:$n(U)}let _=k(k({query:e.query&&j(e.query),mutation:e.mutation&&j(e.mutation),subscription:e.subscription&&j(e.subscription)},p&&nt([p])),nt(y));return K(k({description:(r=p)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},_),{types:Object.values(N),directives:[...e.directives.map(Q),...d.map(Fn)],extensions:Object.create(null),astNode:(s=p)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(y),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function C(U){return Pt(U)?new Mn(C(U.ofType)):Qe(U)?new pt(C(U.ofType)):j(U)}function j(U){return N[U.name]}function Q(U){let ae=U.toConfig();return new Vr(K(k({},ae),{args:so(ae.args,he)}))}function re(U){if(ui(U)||uo(U))return U;if(tr(U))return ye(U);if(ot(U))return Ce(U);if(Nt(U))return ht(U);if(fn(U))return xt(U);if(rn(U))return pe(U);if(It(U))return se(U);Qt(!1,"Unexpected type: "+ne(U))}function se(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new as(K(k({},te),{fields:()=>k(k({},so(te.fields,Ke=>K(k({},Ke),{type:C(Ke.type)}))),mi(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function pe(U){var ae;let te=U.toConfig(),ce=(ae=l[U.name])!==null&&ae!==void 0?ae:[];return new oi(K(k({},te),{values:k(k({},te.values),Xr(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function ye(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[],Ke=te.specifiedByURL;for(let ee of ce){var G;Ke=(G=Vx(ee))!==null&&G!==void 0?G:Ke}return new Jr(K(k({},te),{specifiedByURL:Ke,extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function Ce(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new _r(K(k({},te),{interfaces:()=>[...U.getInterfaces().map(j),...Pn(ce)],fields:()=>k(k({},so(te.fields,B)),_n(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function ht(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new ss(K(k({},te),{interfaces:()=>[...U.getInterfaces().map(j),...Pn(ce)],fields:()=>k(k({},so(te.fields,B)),_n(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function xt(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new os(K(k({},te),{types:()=>[...U.getTypes().map(j),...on(ce)],extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function B(U){return K(k({},U),{type:C(U.type),args:U.args&&so(U.args,he)})}function he(U){return K(k({},U),{type:C(U.type)})}function nt(U){let ae={};for(let ce of U){var te;let Ke=(te=ce.operationTypes)!==null&&te!==void 0?te:[];for(let G of Ke)ae[G.operation]=Ct(G.type)}return ae}function Ct(U){var ae;let te=U.name.value,ce=(ae=Bx[te])!==null&&ae!==void 0?ae:N[te];if(ce===void 0)throw new Error(`Unknown type: "${te}".`);return ce}function sn(U){return U.kind===R.LIST_TYPE?new Mn(sn(U.type)):U.kind===R.NON_NULL_TYPE?new pt(sn(U.type)):Ct(U)}function Fn(U){var ae;return new Vr({name:U.name.value,description:(ae=U.description)===null||ae===void 0?void 0:ae.value,locations:U.locations.map(({value:te})=>te),isRepeatable:U.repeatable,args:bn(U.arguments),astNode:U})}function _n(U){let ae=Object.create(null);for(let Ke of U){var te;let G=(te=Ke.fields)!==null&&te!==void 0?te:[];for(let ee of G){var ce;ae[ee.name.value]={type:sn(ee.type),description:(ce=ee.description)===null||ce===void 0?void 0:ce.value,args:bn(ee.arguments),deprecationReason:lN(ee),astNode:ee}}}return ae}function bn(U){let ae=U!=null?U:[],te=Object.create(null);for(let Ke of ae){var ce;let G=sn(Ke.type);te[Ke.name.value]={type:G,description:(ce=Ke.description)===null||ce===void 0?void 0:ce.value,defaultValue:_i(Ke.defaultValue,G),deprecationReason:lN(Ke),astNode:Ke}}return te}function mi(U){let ae=Object.create(null);for(let Ke of U){var te;let G=(te=Ke.fields)!==null&&te!==void 0?te:[];for(let ee of G){var ce;let Ue=sn(ee.type);ae[ee.name.value]={type:Ue,description:(ce=ee.description)===null||ce===void 0?void 0:ce.value,defaultValue:_i(ee.defaultValue,Ue),deprecationReason:lN(ee),astNode:ee}}}return ae}function Xr(U){let ae=Object.create(null);for(let Ke of U){var te;let G=(te=Ke.values)!==null&&te!==void 0?te:[];for(let ee of G){var ce;ae[ee.name.value]={description:(ce=ee.description)===null||ce===void 0?void 0:ce.value,deprecationReason:lN(ee),astNode:ee}}}return ae}function Pn(U){return U.flatMap(ae=>{var te,ce;return(te=(ce=ae.interfaces)===null||ce===void 0?void 0:ce.map(Ct))!==null&&te!==void 0?te:[]})}function on(U){return U.flatMap(ae=>{var te,ce;return(te=(ce=ae.types)===null||ce===void 0?void 0:ce.map(Ct))!==null&&te!==void 0?te:[]})}function $n(U){var ae;let te=U.name.value,ce=(ae=l[te])!==null&&ae!==void 0?ae:[];switch(U.kind){case R.OBJECT_TYPE_DEFINITION:{var Ke;let Je=[U,...ce];return new _r({name:te,description:(Ke=U.description)===null||Ke===void 0?void 0:Ke.value,interfaces:()=>Pn(Je),fields:()=>_n(Je),astNode:U,extensionASTNodes:ce})}case R.INTERFACE_TYPE_DEFINITION:{var G;let Je=[U,...ce];return new ss({name:te,description:(G=U.description)===null||G===void 0?void 0:G.value,interfaces:()=>Pn(Je),fields:()=>_n(Je),astNode:U,extensionASTNodes:ce})}case R.ENUM_TYPE_DEFINITION:{var ee;let Je=[U,...ce];return new oi({name:te,description:(ee=U.description)===null||ee===void 0?void 0:ee.value,values:Xr(Je),astNode:U,extensionASTNodes:ce})}case R.UNION_TYPE_DEFINITION:{var Ue;let Je=[U,...ce];return new os({name:te,description:(Ue=U.description)===null||Ue===void 0?void 0:Ue.value,types:()=>on(Je),astNode:U,extensionASTNodes:ce})}case R.SCALAR_TYPE_DEFINITION:{var Xe;return new Jr({name:te,description:(Xe=U.description)===null||Xe===void 0?void 0:Xe.value,specifiedByURL:Vx(U),astNode:U,extensionASTNodes:ce})}case R.INPUT_OBJECT_TYPE_DEFINITION:{var jt;let Je=[U,...ce];return new as({name:te,description:(jt=U.description)===null||jt===void 0?void 0:jt.value,fields:()=>mi(Je),astNode:U,extensionASTNodes:ce,isOneOf:BH(U)})}}}}function lN(e){let t=Vo(Uo,e);return t==null?void 0:t.reason}function Vx(e){let t=Vo(kd,e);return t==null?void 0:t.url}function BH(e){return!!Vo(xd,e)}var Bx,zb=ue(()=>{"use strict";m();T();h();Ni();Nn();ri();ic();l_();Xt();cl();Zt();Ui();As();Co();sl();xm();Kd();Nm();Bx=si([...xo,...Mo],e=>e.name)});function dN(e,t){e!=null&&e.kind===R.DOCUMENT||rt(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&ux(e);let r=Jb({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(let s of r.types)switch(s.name){case"Query":r.query=s;break;case"Mutation":r.mutation=s;break;case"Subscription":r.subscription=s;break}let i=[...r.directives,...ai.filter(s=>r.directives.every(o=>o.name!==s.name))];return new Bi(K(k({},r),{directives:i}))}function Hb(e,t){let n=io(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return dN(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}var jx=ue(()=>{"use strict";m();T();h();Ni();Xt();bd();Ui();sl();xm();zb()});function jm(e){let t=e.toConfig(),n=Ss(Wb(t.types),N=>N.name,y);return new Bi(K(k({},t),{types:Object.values(n),directives:Wb(t.directives).map(o),query:s(t.query),mutation:s(t.mutation),subscription:s(t.subscription)}));function r(N){return Pt(N)?new Mn(r(N.ofType)):Qe(N)?new pt(r(N.ofType)):i(N)}function i(N){return n[N.name]}function s(N){return N&&i(N)}function o(N){let I=N.toConfig();return new Vr(K(k({},I),{locations:$x(I.locations,_=>_),args:u(I.args)}))}function u(N){return pN(N,I=>K(k({},I),{type:r(I.type)}))}function l(N){return pN(N,I=>K(k({},I),{type:r(I.type),args:I.args&&u(I.args)}))}function d(N){return pN(N,I=>K(k({},I),{type:r(I.type)}))}function p(N){return Wb(N).map(i)}function y(N){if(tr(N)||ui(N))return N;if(ot(N)){let I=N.toConfig();return new _r(K(k({},I),{interfaces:()=>p(I.interfaces),fields:()=>l(I.fields)}))}if(Nt(N)){let I=N.toConfig();return new ss(K(k({},I),{interfaces:()=>p(I.interfaces),fields:()=>l(I.fields)}))}if(fn(N)){let I=N.toConfig();return new os(K(k({},I),{types:()=>p(I.types)}))}if(rn(N)){let I=N.toConfig();return new oi(K(k({},I),{values:pN(I.values,_=>_)}))}if(It(N)){let I=N.toConfig();return new as(K(k({},I),{fields:()=>d(I.fields)}))}Qt(!1,"Unexpected type: "+ne(N))}}function pN(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(Sa))n[r]=t(e[r]);return n}function Wb(e){return $x(e,t=>t.name)}function $x(e,t){return e.slice().sort((n,r)=>{let i=t(n),s=t(r);return Sa(i,s)})}var qx=ue(()=>{"use strict";m();T();h();Nn();ri();wf();Lf();Zt();Ui();As();sl()});function Hd(e){return Kx(e,t=>!cc(t),VH)}function Zb(e){return Kx(e,cc,ui)}function VH(e){return!uo(e)&&!ui(e)}function Kx(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[jH(e),...r.map(s=>zH(s)),...i.map(s=>fN(s))].filter(Boolean).join(` `)}function jH(e){if(e.description==null&&$H(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}`),Fs(e)+`schema { ${t.join(` @@ -191,12 +191,12 @@ ${t.join(` `;P.NUMBER="number";P.MUTATION="Mutation";P.MUTATION_UPPER="MUTATION";P.PROVIDER_TYPE_KAFKA="kafka";P.PROVIDER_TYPE_NATS="nats";P.N_A="N/A";P.NAME="name";P.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT="edfs__PublishResult!";P.NON_NULLABLE_BOOLEAN="Boolean!";P.NON_NULLABLE_STRING="String!";P.NOT_UPPER="NOT";P.NULL="Null";P.OPERATION_TO_DEFAULT="operationTypeNodeToDefaultType";P.OBJECT="Object";P.OBJECT_UPPER="OBJECT";P.OR_UPPER="OR";P.OVERRIDE="override";P.PARENT_DEFINITION_DATA="parentDefinitionDataByTypeName";P.PARENT_DEFINITION_DATA_MAP="parentDefinitionDataByParentTypeName";P.PARENT_EXTENSION_DATA_MAP="parentExtensionDataByParentTypeName";P.PERIOD=".";P.PROVIDER_ID="providerId";P.PROVIDES="provides";P.PUBLISH="publish";P.QUERY="Query";P.QUERY_UPPER="QUERY";P.QUOTATION_JOIN='", "';P.REASON="reason";P.REQUEST="request";P.REQUIRES="requires";P.REQUIRES_SCOPES="requiresScopes";P.RESOLVABLE="resolvable";P.SCALAR="Scalar";P.SCALAR_UPPER="SCALAR";P.SCHEMA="schema";P.SCHEMA_UPPER="SCHEMA";P.SCOPES="scopes";P.SCOPE_SCALAR="openfed__Scope";P.SELECTION_REPRESENTATION=" { ... }";P.SERVICE_OBJECT="_Service";P.SERVICE_FIELD="_service";P.SHAREABLE="shareable";P.SPECIFIED_BY="specifiedBy";P.STREAM_CONFIGURATION="streamConfiguration";P.STREAM_NAME="streamName";P.STRING="string";P.STRING_SCALAR="String";P.SUBJECT="subject";P.SUBJECTS="subjects";P.SUBSCRIPTION="Subscription";P.SUBSCRIPTION_FIELD_CONDITION="openfed__SubscriptionFieldCondition";P.SUBSCRIPTION_FILTER="openfed__subscriptionFilter";P.SUBSCRIPTION_FILTER_CONDITION="openfed__SubscriptionFilterCondition";P.SUBSCRIPTION_FILTER_VALUE="openfed__SubscriptionFilterValue";P.SUBSCRIBE="subscribe";P.SUBSCRIPTION_UPPER="SUBSCRIPTION";P.SUCCESS="success";P.TAG="tag";P.TOPIC="topic";P.TOPICS="topics";P.UNION="Union";P.UNION_UPPER="UNION";P.URL_LOWER="url";P.VALUES="values";P.VARIABLE_DEFINITION_UPPER="VARIABLE_DEFINITION";P.EXECUTABLE_DIRECTIVE_LOCATIONS=new Set([P.FIELD_UPPER,P.FRAGMENT_DEFINITION_UPPER,P.FRAGMENT_SPREAD_UPPER,P.INLINE_FRAGMENT_UPPER,P.MUTATION_UPPER,P.QUERY_UPPER,P.SUBSCRIPTION_UPPER]);P.IGNORED_PARENT_DIRECTIVES=new Set([P.AUTHENTICATED,P.REQUIRES_SCOPES]);P.ROOT_TYPE_NAMES=new Set([P.MUTATION,P.QUERY,P.SUBSCRIPTION]);P.EVENT_DIRECTIVE_NAMES=new Set([P.EDFS_KAFKA_PUBLISH,P.EDFS_KAFKA_SUBSCRIBE,P.EDFS_NATS_PUBLISH,P.EDFS_NATS_REQUEST,P.EDFS_NATS_SUBSCRIBE]);P.STREAM_CONFIGURATION_FIELD_NAMES=new Set([P.CONSUMER_NAME,P.STREAM_NAME]);P.PERSISTED_CLIENT_DIRECTIVES=new Set([P.AUTHENTICATED,P.DEPRECATED,P.REQUIRES_SCOPES]);P.SUBSCRIPTION_FILTER_INPUT_NAMES=new Set([P.AND_UPPER,P.IN_UPPER,P.NOT_UPPER,P.OR_UPPER]);P.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=new Set([P.AND_UPPER,P.OR_UPPER])});var Vi=V(or=>{"use strict";m();T();h();Object.defineProperty(or,"__esModule",{value:!0});or.operationTypeNodeToDefaultType=void 0;or.isObjectLikeNodeEntity=r4;or.isNodeInterfaceObject=i4;or.isNodeExtension=s4;or.areBaseAndExtensionKindsCompatible=o4;or.stringToNameNode=TN;or.stringArrayToNameNodeArray=a4;or.setToNameNodeArray=u4;or.stringToNamedTypeNode=uC;or.setToNamedTypeNodeArray=c4;or.nodeKindToDirectiveLocation=l4;or.isKindAbstract=d4;or.extractExecutableDirectiveLocations=p4;or.formatDescription=f4;or.lexicographicallySortArgumentNodes=cC;or.lexicographicallySortSelectionSetNode=hN;or.lexicographicallySortDocumentNode=m4;or.parse=lC;or.safeParse=h4;var vt=(we(),Me(je)),Jn=bi();function r4(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Jn.KEY)return!0;return!1}function i4(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Jn.INTERFACE_OBJECT)return!0;return!1}function s4(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Jn.EXTENDS)return!0;return!1}function o4(e,t,n){switch(e){case vt.Kind.ENUM_TYPE_DEFINITION:return t===vt.Kind.ENUM_TYPE_EXTENSION;case vt.Kind.INPUT_OBJECT_TYPE_DEFINITION:return t===vt.Kind.INPUT_OBJECT_TYPE_EXTENSION;case vt.Kind.INTERFACE_TYPE_DEFINITION:return t===vt.Kind.INTERFACE_TYPE_EXTENSION;case vt.Kind.OBJECT_TYPE_DEFINITION:return t===vt.Kind.OBJECT_TYPE_EXTENSION;case vt.Kind.SCALAR_TYPE_DEFINITION:return t===vt.Kind.SCALAR_TYPE_EXTENSION;case vt.Kind.UNION_TYPE_DEFINITION:return t===vt.Kind.UNION_TYPE_EXTENSION;default:return!1}}function TN(e){return{kind:vt.Kind.NAME,value:e}}function a4(e){let t=[];for(let n of e)t.push(TN(n));return t}function u4(e){let t=[];for(let n of e)t.push(TN(n));return t}function uC(e){return{kind:vt.Kind.NAMED_TYPE,name:TN(e)}}function c4(e){let t=[];for(let n of e)t.push(uC(n));return t}function l4(e){switch(e){case vt.Kind.ARGUMENT:return Jn.ARGUMENT_DEFINITION_UPPER;case vt.Kind.ENUM_TYPE_DEFINITION:case vt.Kind.ENUM_TYPE_EXTENSION:return Jn.ENUM_UPPER;case vt.Kind.ENUM_VALUE_DEFINITION:return Jn.ENUM_VALUE_UPPER;case vt.Kind.FIELD_DEFINITION:return Jn.FIELD_DEFINITION_UPPER;case vt.Kind.FRAGMENT_DEFINITION:return Jn.FRAGMENT_DEFINITION_UPPER;case vt.Kind.FRAGMENT_SPREAD:return Jn.FRAGMENT_SPREAD_UPPER;case vt.Kind.INLINE_FRAGMENT:return Jn.INLINE_FRAGMENT_UPPER;case vt.Kind.INPUT_VALUE_DEFINITION:return Jn.INPUT_FIELD_DEFINITION_UPPER;case vt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case vt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return Jn.INPUT_OBJECT_UPPER;case vt.Kind.INTERFACE_TYPE_DEFINITION:case vt.Kind.INTERFACE_TYPE_EXTENSION:return Jn.INTERFACE_UPPER;case vt.Kind.OBJECT_TYPE_DEFINITION:case vt.Kind.OBJECT_TYPE_EXTENSION:return Jn.OBJECT_UPPER;case vt.Kind.SCALAR_TYPE_DEFINITION:case vt.Kind.SCALAR_TYPE_EXTENSION:return Jn.SCALAR_UPPER;case vt.Kind.SCHEMA_DEFINITION:case vt.Kind.SCHEMA_EXTENSION:return Jn.SCHEMA_UPPER;case vt.Kind.UNION_TYPE_DEFINITION:case vt.Kind.UNION_TYPE_EXTENSION:return Jn.UNION_UPPER;default:return e}}or.operationTypeNodeToDefaultType=new Map([[vt.OperationTypeNode.MUTATION,Jn.MUTATION],[vt.OperationTypeNode.QUERY,Jn.QUERY],[vt.OperationTypeNode.SUBSCRIPTION,Jn.SUBSCRIPTION]]);function d4(e){return e===vt.Kind.INTERFACE_TYPE_DEFINITION||e===vt.Kind.UNION_TYPE_DEFINITION}function p4(e,t){for(let n of e){let r=n.value;Jn.EXECUTABLE_DIRECTIVE_LOCATIONS.has(r)&&t.add(r)}return t}function f4(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(k({},e),{value:t,block:!0})}function cC(e){return e.arguments?e.arguments.sort((n,r)=>n.name.value.localeCompare(r.name.value)):e.arguments}function hN(e){let t=e.selections;return K(k({},e),{selections:t.sort((n,r)=>{var s,o,u,l;return Jn.NAME in n?Jn.NAME in r?n.name.value.localeCompare(r.name.value):-1:Jn.NAME in r?1:((o=(s=n.typeCondition)==null?void 0:s.name.value)!=null?o:"").localeCompare((l=(u=r.typeCondition)==null?void 0:u.name.value)!=null?l:"")}).map(n=>{switch(n.kind){case vt.Kind.FIELD:return K(k({},n),{arguments:cC(n),selectionSet:n.selectionSet?hN(n.selectionSet):n.selectionSet});case vt.Kind.FRAGMENT_SPREAD:return n;case vt.Kind.INLINE_FRAGMENT:return K(k({},n),{selectionSet:hN(n.selectionSet)})}})})}function m4(e){return K(k({},e),{definitions:e.definitions.map(t=>t.kind!==vt.Kind.OPERATION_DEFINITION?t:K(k({},t),{selectionSet:hN(t.selectionSet)}))})}function lC(e,t=!0){return(0,vt.parse)(e,{noLocation:t})}function h4(e,t=!0){try{return{documentNode:lC(e,t)}}catch(n){return{error:n}}}});var Oi=V(uO=>{"use strict";m();T();h();Object.defineProperty(uO,"__esModule",{value:!0});uO.devAssert=T4;function T4(e,t){if(!!!e)throw new Error(t)}});var $o=V(cO=>{"use strict";m();T();h();Object.defineProperty(cO,"__esModule",{value:!0});cO.isObjectLike=y4;function y4(e){return typeof e=="object"&&e!==null}});var ci=V(lO=>{"use strict";m();T();h();Object.defineProperty(lO,"__esModule",{value:!0});lO.invariant=N4;function N4(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}});var yN=V(dO=>{"use strict";m();T();h();Object.defineProperty(dO,"__esModule",{value:!0});dO.getLocation=I4;var E4=ci(),g4=/\r\n|[\n\r]/g;function I4(e,t){let n=0,r=1;for(let i of e.body.matchAll(g4)){if(typeof i.index=="number"||(0,E4.invariant)(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}});var pO=V(NN=>{"use strict";m();T();h();Object.defineProperty(NN,"__esModule",{value:!0});NN.printLocation=_4;NN.printSourceLocation=pC;var v4=yN();function _4(e){return pC(e.source,(0,v4.getLocation)(e.source,e.start))}function pC(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,u=t.line===1?n:0,l=t.column+u,d=`${e.name}:${o}:${l} -`,p=r.split(/\r\n|[\n\r]/g),y=p[i];if(y.length>120){let N=Math.floor(l/80),I=l%80,b=[];for(let x=0;x["|",x]),["|","^".padStart(I)],["|",b[N+1]]])}return d+dC([[`${o-1} |`,p[i-1]],[`${o} |`,y],["|","^".padStart(l)],[`${o+1} |`,p[i+1]]])}function dC(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 at=V(Wd=>{"use strict";m();T();h();Object.defineProperty(Wd,"__esModule",{value:!0});Wd.GraphQLError=void 0;Wd.formatError=D4;Wd.printError=S4;var b4=$o(),fC=yN(),mC=pO();function O4(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 fO=class e extends Error{constructor(t,...n){var r,i,s;let{nodes:o,source:u,positions:l,path:d,originalError:p,extensions:y}=O4(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=p!=null?p:void 0,this.nodes=hC(Array.isArray(o)?o:o?[o]:void 0);let N=hC((r=this.nodes)===null||r===void 0?void 0:r.map(b=>b.loc).filter(b=>b!=null));this.source=u!=null?u:N==null||(i=N[0])===null||i===void 0?void 0:i.source,this.positions=l!=null?l:N==null?void 0:N.map(b=>b.start),this.locations=l&&u?l.map(b=>(0,fC.getLocation)(u,b)):N==null?void 0:N.map(b=>(0,fC.getLocation)(b.source,b.start));let I=(0,b4.isObjectLike)(p==null?void 0:p.extensions)?p==null?void 0:p.extensions:void 0;this.extensions=(s=y!=null?y:I)!==null&&s!==void 0?s: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+=` +`,p=r.split(/\r\n|[\n\r]/g),y=p[i];if(y.length>120){let N=Math.floor(l/80),I=l%80,_=[];for(let C=0;C["|",C]),["|","^".padStart(I)],["|",_[N+1]]])}return d+dC([[`${o-1} |`,p[i-1]],[`${o} |`,y],["|","^".padStart(l)],[`${o+1} |`,p[i+1]]])}function dC(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 at=V(Wd=>{"use strict";m();T();h();Object.defineProperty(Wd,"__esModule",{value:!0});Wd.GraphQLError=void 0;Wd.formatError=D4;Wd.printError=S4;var b4=$o(),fC=yN(),mC=pO();function O4(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 fO=class e extends Error{constructor(t,...n){var r,i,s;let{nodes:o,source:u,positions:l,path:d,originalError:p,extensions:y}=O4(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=p!=null?p:void 0,this.nodes=hC(Array.isArray(o)?o:o?[o]:void 0);let N=hC((r=this.nodes)===null||r===void 0?void 0:r.map(_=>_.loc).filter(_=>_!=null));this.source=u!=null?u:N==null||(i=N[0])===null||i===void 0?void 0:i.source,this.positions=l!=null?l:N==null?void 0:N.map(_=>_.start),this.locations=l&&u?l.map(_=>(0,fC.getLocation)(u,_)):N==null?void 0:N.map(_=>(0,fC.getLocation)(_.source,_.start));let I=(0,b4.isObjectLike)(p==null?void 0:p.extensions)?p==null?void 0:p.extensions:void 0;this.extensions=(s=y!=null?y:I)!==null&&s!==void 0?s: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,mC.printLocation)(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` -`+(0,mC.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}};Wd.GraphQLError=fO;function hC(e){return e===void 0||e.length===0?void 0:e}function S4(e){return e.toString()}function D4(e){return e.toJSON()}});var En=V(mO=>{"use strict";m();T();h();Object.defineProperty(mO,"__esModule",{value:!0});mO.inspect=R4;var A4=10,TC=2;function R4(e){return EN(e,[])}function EN(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return F4(e,t);default:return String(e)}}function F4(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(w4(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:EN(r,n)}else if(Array.isArray(e))return P4(e,n);return L4(e,n)}function w4(e){return typeof e.toJSON=="function"}function L4(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>TC?"["+k4(e)+"]":"{ "+n.map(([i,s])=>i+": "+EN(s,t)).join(", ")+" }"}function P4(e,t){if(e.length===0)return"[]";if(t.length>TC)return"[Array]";let n=Math.min(A4,e.length),r=e.length-n,i=[];for(let s=0;s1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function k4(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 qo=V(ws=>{"use strict";m();T();h();Object.defineProperty(ws,"__esModule",{value:!0});ws.Token=ws.QueryDocumentKeys=ws.OperationTypeNode=ws.Location=void 0;ws.isNode=C4;var hO=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}}};ws.Location=hO;var TO=class{constructor(t,n,r,i,s,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,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}}};ws.Token=TO;var yC={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"]};ws.QueryDocumentKeys=yC;var x4=new Set(Object.keys(yC));function C4(e){let t=e==null?void 0:e.kind;return typeof t=="string"&&x4.has(t)}var yO;ws.OperationTypeNode=yO;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(yO||(ws.OperationTypeNode=yO={}))});var en=V(Km=>{"use strict";m();T();h();Object.defineProperty(Km,"__esModule",{value:!0});Km.Kind=void 0;var NO;Km.Kind=NO;(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"})(NO||(Km.Kind=NO={}))});var pl=V(fc=>{"use strict";m();T();h();Object.defineProperty(fc,"__esModule",{value:!0});fc.BREAK=void 0;fc.getEnterLeaveForKind=gN;fc.getVisitFn=j4;fc.visit=B4;fc.visitInParallel=V4;var U4=Oi(),M4=En(),EO=qo(),NC=en(),Xd=Object.freeze({});fc.BREAK=Xd;function B4(e,t,n=EO.QueryDocumentKeys){let r=new Map;for(let Q of Object.values(NC.Kind))r.set(Q,gN(t,Q));let i,s=Array.isArray(e),o=[e],u=-1,l=[],d=e,p,y,N=[],I=[];do{u++;let Q=u===o.length,re=Q&&l.length!==0;if(Q){if(p=I.length===0?void 0:N[N.length-1],d=y,y=I.pop(),re)if(s){d=d.slice();let pe=0;for(let[ye,Ce]of l){let ht=ye-pe;Ce===null?(d.splice(ht,1),pe++):d[ht]=Ce}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[pe,ye]of l)d[pe]=ye}u=i.index,o=i.keys,l=i.edits,s=i.inArray,i=i.prev}else if(y){if(p=s?u:o[u],d=y[p],d==null)continue;N.push(p)}let se;if(!Array.isArray(d)){var b,x;(0,EO.isNode)(d)||(0,U4.devAssert)(!1,`Invalid AST Node: ${(0,M4.inspect)(d)}.`);let pe=Q?(b=r.get(d.kind))===null||b===void 0?void 0:b.leave:(x=r.get(d.kind))===null||x===void 0?void 0:x.enter;if(se=pe==null?void 0:pe.call(t,d,p,y,N,I),se===Xd)break;if(se===!1){if(!Q){N.pop();continue}}else if(se!==void 0&&(l.push([p,se]),!Q))if((0,EO.isNode)(se))d=se;else{N.pop();continue}}if(se===void 0&&re&&l.push([p,d]),Q)N.pop();else{var j;i={inArray:s,index:u,keys:o,edits:l,prev:i},s=Array.isArray(d),o=s?d:(j=n[d.kind])!==null&&j!==void 0?j:[],u=-1,l=[],y&&I.push(y),y=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function V4(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(NC.Kind)){let i=!1,s=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let l=0;l{"use strict";m();T();h();Object.defineProperty(gO,"__esModule",{value:!0});gO.didYouMean=q4;var $4=5;function q4(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let s=r.map(l=>`"${l}"`);switch(s.length){case 0:return"";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}let o=s.slice(0,$4),u=o.pop();return i+o.join(", ")+", or "+u+"?"}});var EC=V(IO=>{"use strict";m();T();h();Object.defineProperty(IO,"__esModule",{value:!0});IO.identityFunc=K4;function K4(e){return e}});var Gm=V(IN=>{"use strict";m();T();h();Object.defineProperty(IN,"__esModule",{value:!0});IN.instanceOf=void 0;var G4=En(),Q4=globalThis.process&&O.env.NODE_ENV==="production",Y4=Q4?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],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){let o=(0,G4.inspect)(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm. +`+(0,mC.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}};Wd.GraphQLError=fO;function hC(e){return e===void 0||e.length===0?void 0:e}function S4(e){return e.toString()}function D4(e){return e.toJSON()}});var En=V(mO=>{"use strict";m();T();h();Object.defineProperty(mO,"__esModule",{value:!0});mO.inspect=R4;var A4=10,TC=2;function R4(e){return EN(e,[])}function EN(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return F4(e,t);default:return String(e)}}function F4(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(w4(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:EN(r,n)}else if(Array.isArray(e))return P4(e,n);return L4(e,n)}function w4(e){return typeof e.toJSON=="function"}function L4(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>TC?"["+k4(e)+"]":"{ "+n.map(([i,s])=>i+": "+EN(s,t)).join(", ")+" }"}function P4(e,t){if(e.length===0)return"[]";if(t.length>TC)return"[Array]";let n=Math.min(A4,e.length),r=e.length-n,i=[];for(let s=0;s1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function k4(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 qo=V(ws=>{"use strict";m();T();h();Object.defineProperty(ws,"__esModule",{value:!0});ws.Token=ws.QueryDocumentKeys=ws.OperationTypeNode=ws.Location=void 0;ws.isNode=C4;var hO=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}}};ws.Location=hO;var TO=class{constructor(t,n,r,i,s,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,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}}};ws.Token=TO;var yC={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"]};ws.QueryDocumentKeys=yC;var x4=new Set(Object.keys(yC));function C4(e){let t=e==null?void 0:e.kind;return typeof t=="string"&&x4.has(t)}var yO;ws.OperationTypeNode=yO;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(yO||(ws.OperationTypeNode=yO={}))});var en=V(Km=>{"use strict";m();T();h();Object.defineProperty(Km,"__esModule",{value:!0});Km.Kind=void 0;var NO;Km.Kind=NO;(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"})(NO||(Km.Kind=NO={}))});var pl=V(fc=>{"use strict";m();T();h();Object.defineProperty(fc,"__esModule",{value:!0});fc.BREAK=void 0;fc.getEnterLeaveForKind=gN;fc.getVisitFn=j4;fc.visit=B4;fc.visitInParallel=V4;var U4=Oi(),M4=En(),EO=qo(),NC=en(),Xd=Object.freeze({});fc.BREAK=Xd;function B4(e,t,n=EO.QueryDocumentKeys){let r=new Map;for(let Q of Object.values(NC.Kind))r.set(Q,gN(t,Q));let i,s=Array.isArray(e),o=[e],u=-1,l=[],d=e,p,y,N=[],I=[];do{u++;let Q=u===o.length,re=Q&&l.length!==0;if(Q){if(p=I.length===0?void 0:N[N.length-1],d=y,y=I.pop(),re)if(s){d=d.slice();let pe=0;for(let[ye,Ce]of l){let ht=ye-pe;Ce===null?(d.splice(ht,1),pe++):d[ht]=Ce}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[pe,ye]of l)d[pe]=ye}u=i.index,o=i.keys,l=i.edits,s=i.inArray,i=i.prev}else if(y){if(p=s?u:o[u],d=y[p],d==null)continue;N.push(p)}let se;if(!Array.isArray(d)){var _,C;(0,EO.isNode)(d)||(0,U4.devAssert)(!1,`Invalid AST Node: ${(0,M4.inspect)(d)}.`);let pe=Q?(_=r.get(d.kind))===null||_===void 0?void 0:_.leave:(C=r.get(d.kind))===null||C===void 0?void 0:C.enter;if(se=pe==null?void 0:pe.call(t,d,p,y,N,I),se===Xd)break;if(se===!1){if(!Q){N.pop();continue}}else if(se!==void 0&&(l.push([p,se]),!Q))if((0,EO.isNode)(se))d=se;else{N.pop();continue}}if(se===void 0&&re&&l.push([p,d]),Q)N.pop();else{var j;i={inArray:s,index:u,keys:o,edits:l,prev:i},s=Array.isArray(d),o=s?d:(j=n[d.kind])!==null&&j!==void 0?j:[],u=-1,l=[],y&&I.push(y),y=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function V4(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(NC.Kind)){let i=!1,s=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let l=0;l{"use strict";m();T();h();Object.defineProperty(gO,"__esModule",{value:!0});gO.didYouMean=q4;var $4=5;function q4(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let s=r.map(l=>`"${l}"`);switch(s.length){case 0:return"";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}let o=s.slice(0,$4),u=o.pop();return i+o.join(", ")+", or "+u+"?"}});var EC=V(IO=>{"use strict";m();T();h();Object.defineProperty(IO,"__esModule",{value:!0});IO.identityFunc=K4;function K4(e){return e}});var Gm=V(IN=>{"use strict";m();T();h();Object.defineProperty(IN,"__esModule",{value:!0});IN.instanceOf=void 0;var G4=En(),Q4=globalThis.process&&O.env.NODE_ENV==="production",Y4=Q4?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],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){let o=(0,G4.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 @@ -207,7 +207,7 @@ 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=Y4});var hc=V(vO=>{"use strict";m();T();h();Object.defineProperty(vO,"__esModule",{value:!0});vO.keyMap=J4;function J4(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}});var Qm=V(_O=>{"use strict";m();T();h();Object.defineProperty(_O,"__esModule",{value:!0});_O.keyValMap=z4;function z4(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}});var OO=V(bO=>{"use strict";m();T();h();Object.defineProperty(bO,"__esModule",{value:!0});bO.mapValue=H4;function H4(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}});var Ym=V(DO=>{"use strict";m();T();h();Object.defineProperty(DO,"__esModule",{value:!0});DO.naturalCompare=W4;function W4(e,t){let n=0,r=0;for(;n0);let u=0;do++r,u=u*10+s-SO,s=t.charCodeAt(r);while(vN(s)&&u>0);if(ou)return 1}else{if(is)return 1;++n,++r}}return e.length-t.length}var SO=48,X4=57;function vN(e){return!isNaN(e)&&SO<=e&&e<=X4}});var Tc=V(RO=>{"use strict";m();T();h();Object.defineProperty(RO,"__esModule",{value:!0});RO.suggestionList=e8;var Z4=Ym();function e8(e,t){let n=Object.create(null),r=new AO(e),i=Math.floor(e.length*.4)+1;for(let s of t){let o=r.measure(s,i);o!==void 0&&(n[s]=o)}return Object.keys(n).sort((s,o)=>{let u=n[s]-n[o];return u!==0?u:(0,Z4.naturalCompare)(s,o)})}var AO=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=gC(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=gC(r),s=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 y=l[(p-1)%3],N=l[p%3],I=N[0]=p;for(let b=1;b<=u;b++){let x=i[p-1]===s[b-1]?0:1,j=Math.min(y[b]+1,N[b-1]+1,y[b-1]+x);if(p>1&&b>1&&i[p-1]===s[b-2]&&i[p-2]===s[b-1]){let Q=l[(p-2)%3][b-2];j=Math.min(j,Q+1)}jn)return}let d=l[o%3][u];return d<=n?d:void 0}};function gC(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();h();Object.defineProperty(FO,"__esModule",{value:!0});FO.toObjMap=t8;function t8(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 bN=V(fl=>{"use strict";m();T();h();Object.defineProperty(fl,"__esModule",{value:!0});fl.isDigit=IC;fl.isLetter=wO;fl.isNameContinue=i8;fl.isNameStart=r8;fl.isWhiteSpace=n8;function n8(e){return e===9||e===32}function IC(e){return e>=48&&e<=57}function wO(e){return e>=97&&e<=122||e>=65&&e<=90}function r8(e){return wO(e)||e===95}function i8(e){return wO(e)||IC(e)||e===95}});var zm=V(Jm=>{"use strict";m();T();h();Object.defineProperty(Jm,"__esModule",{value:!0});Jm.dedentBlockStringLines=s8;Jm.isPrintableAsBlockString=a8;Jm.printBlockString=u8;var LO=bN();function s8(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 o8(e){let t=0;for(;t1&&r.slice(1).every(I=>I.length===0||(0,LO.isWhiteSpace)(I.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||s||o),y="",N=i&&(0,LO.isWhiteSpace)(e.charCodeAt(0));return(p&&!N||s)&&(y+=` +spurious results.`)}}return!1};IN.instanceOf=Y4});var hc=V(vO=>{"use strict";m();T();h();Object.defineProperty(vO,"__esModule",{value:!0});vO.keyMap=J4;function J4(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}});var Qm=V(_O=>{"use strict";m();T();h();Object.defineProperty(_O,"__esModule",{value:!0});_O.keyValMap=z4;function z4(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}});var OO=V(bO=>{"use strict";m();T();h();Object.defineProperty(bO,"__esModule",{value:!0});bO.mapValue=H4;function H4(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}});var Ym=V(DO=>{"use strict";m();T();h();Object.defineProperty(DO,"__esModule",{value:!0});DO.naturalCompare=W4;function W4(e,t){let n=0,r=0;for(;n0);let u=0;do++r,u=u*10+s-SO,s=t.charCodeAt(r);while(vN(s)&&u>0);if(ou)return 1}else{if(is)return 1;++n,++r}}return e.length-t.length}var SO=48,X4=57;function vN(e){return!isNaN(e)&&SO<=e&&e<=X4}});var Tc=V(RO=>{"use strict";m();T();h();Object.defineProperty(RO,"__esModule",{value:!0});RO.suggestionList=e8;var Z4=Ym();function e8(e,t){let n=Object.create(null),r=new AO(e),i=Math.floor(e.length*.4)+1;for(let s of t){let o=r.measure(s,i);o!==void 0&&(n[s]=o)}return Object.keys(n).sort((s,o)=>{let u=n[s]-n[o];return u!==0?u:(0,Z4.naturalCompare)(s,o)})}var AO=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=gC(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=gC(r),s=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 y=l[(p-1)%3],N=l[p%3],I=N[0]=p;for(let _=1;_<=u;_++){let C=i[p-1]===s[_-1]?0:1,j=Math.min(y[_]+1,N[_-1]+1,y[_-1]+C);if(p>1&&_>1&&i[p-1]===s[_-2]&&i[p-2]===s[_-1]){let Q=l[(p-2)%3][_-2];j=Math.min(j,Q+1)}jn)return}let d=l[o%3][u];return d<=n?d:void 0}};function gC(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();h();Object.defineProperty(FO,"__esModule",{value:!0});FO.toObjMap=t8;function t8(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 bN=V(fl=>{"use strict";m();T();h();Object.defineProperty(fl,"__esModule",{value:!0});fl.isDigit=IC;fl.isLetter=wO;fl.isNameContinue=i8;fl.isNameStart=r8;fl.isWhiteSpace=n8;function n8(e){return e===9||e===32}function IC(e){return e>=48&&e<=57}function wO(e){return e>=97&&e<=122||e>=65&&e<=90}function r8(e){return wO(e)||e===95}function i8(e){return wO(e)||IC(e)||e===95}});var zm=V(Jm=>{"use strict";m();T();h();Object.defineProperty(Jm,"__esModule",{value:!0});Jm.dedentBlockStringLines=s8;Jm.isPrintableAsBlockString=a8;Jm.printBlockString=u8;var LO=bN();function s8(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 o8(e){let t=0;for(;t1&&r.slice(1).every(I=>I.length===0||(0,LO.isWhiteSpace)(I.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||s||o),y="",N=i&&(0,LO.isWhiteSpace)(e.charCodeAt(0));return(p&&!N||s)&&(y+=` `),y+=n,(p||d)&&(y+=` `),'"""'+y+'"""'}});var vC=V(PO=>{"use strict";m();T();h();Object.defineProperty(PO,"__esModule",{value:!0});PO.printString=c8;function c8(e){return`"${e.replace(l8,d8)}"`}var l8=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function d8(e){return p8[e.charCodeAt(0)]}var p8=["\\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 ds=V(kO=>{"use strict";m();T();h();Object.defineProperty(kO,"__esModule",{value:!0});kO.print=T8;var f8=zm(),m8=vC(),h8=pl();function T8(e){return(0,h8.visit)(e,N8)}var y8=80,N8={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Ye(e.definitions,` @@ -240,11 +240,11 @@ spurious results.`)}}return!1};IN.instanceOf=Y4});var hc=V(vO=>{"use strict";m() 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 $e.GraphQLNonNull(An.GraphQLString),resolve:e=>e.name},description:{type:An.GraphQLString,resolve:e=>e.description},isRepeatable:{type:new $e.GraphQLNonNull(An.GraphQLBoolean),resolve:e=>e.isRepeatable},locations:{type:new $e.GraphQLNonNull(new $e.GraphQLList(new $e.GraphQLNonNull(zO))),resolve:e=>e.locations},args:{type:new $e.GraphQLNonNull(new $e.GraphQLList(new $e.GraphQLNonNull(lh))),args:{includeDeprecated:{type:An.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})});gn.__Directive=JO;var zO=new $e.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:wr.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:wr.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:wr.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:wr.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:wr.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:wr.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:wr.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:wr.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:wr.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:wr.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:wr.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:wr.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:wr.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:wr.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:wr.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:wr.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:wr.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:wr.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:wr.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});gn.__DirectiveLocation=zO;var ks=new $e.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 $e.GraphQLNonNull(XO),resolve(e){if((0,$e.isScalarType)(e))return Lr.SCALAR;if((0,$e.isObjectType)(e))return Lr.OBJECT;if((0,$e.isInterfaceType)(e))return Lr.INTERFACE;if((0,$e.isUnionType)(e))return Lr.UNION;if((0,$e.isEnumType)(e))return Lr.ENUM;if((0,$e.isInputObjectType)(e))return Lr.INPUT_OBJECT;if((0,$e.isListType)(e))return Lr.LIST;if((0,$e.isNonNullType)(e))return Lr.NON_NULL;(0,dW.invariant)(!1,`Unexpected type: "${(0,lW.inspect)(e)}".`)}},name:{type:An.GraphQLString,resolve:e=>"name"in e?e.name:void 0},description:{type:An.GraphQLString,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:An.GraphQLString,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new $e.GraphQLList(new $e.GraphQLNonNull(HO)),args:{includeDeprecated:{type:An.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,$e.isObjectType)(e)||(0,$e.isInterfaceType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new $e.GraphQLList(new $e.GraphQLNonNull(ks)),resolve(e){if((0,$e.isObjectType)(e)||(0,$e.isInterfaceType)(e))return e.getInterfaces()}},possibleTypes:{type:new $e.GraphQLList(new $e.GraphQLNonNull(ks)),resolve(e,t,n,{schema:r}){if((0,$e.isAbstractType)(e))return r.getPossibleTypes(e)}},enumValues:{type:new $e.GraphQLList(new $e.GraphQLNonNull(WO)),args:{includeDeprecated:{type:An.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,$e.isEnumType)(e)){let n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new $e.GraphQLList(new $e.GraphQLNonNull(lh)),args:{includeDeprecated:{type:An.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,$e.isInputObjectType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:ks,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:An.GraphQLBoolean,resolve:e=>{if((0,$e.isInputObjectType)(e))return e.isOneOf}}})});gn.__Type=ks;var HO=new $e.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 $e.GraphQLNonNull(An.GraphQLString),resolve:e=>e.name},description:{type:An.GraphQLString,resolve:e=>e.description},args:{type:new $e.GraphQLNonNull(new $e.GraphQLList(new $e.GraphQLNonNull(lh))),args:{includeDeprecated:{type:An.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new $e.GraphQLNonNull(ks),resolve:e=>e.type},isDeprecated:{type:new $e.GraphQLNonNull(An.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:An.GraphQLString,resolve:e=>e.deprecationReason}})});gn.__Field=HO;var lh=new $e.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 $e.GraphQLNonNull(An.GraphQLString),resolve:e=>e.name},description:{type:An.GraphQLString,resolve:e=>e.description},type:{type:new $e.GraphQLNonNull(ks),resolve:e=>e.type},defaultValue:{type:An.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=(0,fW.astFromValue)(n,t);return r?(0,pW.print)(r):null}},isDeprecated:{type:new $e.GraphQLNonNull(An.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:An.GraphQLString,resolve:e=>e.deprecationReason}})});gn.__InputValue=lh;var WO=new $e.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 $e.GraphQLNonNull(An.GraphQLString),resolve:e=>e.name},description:{type:An.GraphQLString,resolve:e=>e.description},isDeprecated:{type:new $e.GraphQLNonNull(An.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:An.GraphQLString,resolve:e=>e.deprecationReason}})});gn.__EnumValue=WO;var Lr;gn.TypeKind=Lr;(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"})(Lr||(gn.TypeKind=Lr={}));var XO=new $e.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Lr.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Lr.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Lr.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Lr.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Lr.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Lr.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Lr.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Lr.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});gn.__TypeKind=XO;var mW={name:"__schema",type:new $e.GraphQLNonNull(YO),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};gn.SchemaMetaFieldDef=mW;var hW={name:"__type",type:ks,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new $e.GraphQLNonNull(An.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};gn.TypeMetaFieldDef=hW;var TW={name:"__typename",type:new $e.GraphQLNonNull(An.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};gn.TypeNameMetaFieldDef=TW;var iU=Object.freeze([YO,JO,zO,ks,HO,lh,WO,XO]);gn.introspectionTypes=iU;function yW(e){return iU.some(({name:t})=>e.name===t)}});var El=V(np=>{"use strict";m();T();h();Object.defineProperty(np,"__esModule",{value:!0});np.GraphQLSchema=void 0;np.assertSchema=vW;np.isSchema=oU;var GN=Oi(),eS=En(),NW=Gm(),EW=$o(),gW=_N(),ZO=qo(),fo=tn(),sU=ji(),IW=xs();function oU(e){return(0,NW.instanceOf)(e,QN)}function vW(e){if(!oU(e))throw new Error(`Expected ${(0,eS.inspect)(e)} to be a GraphQL schema.`);return e}var QN=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,(0,EW.isObjectLike)(t)||(0,GN.devAssert)(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||(0,GN.devAssert)(!1,`"types" must be Array if provided but got: ${(0,eS.inspect)(t.types)}.`),!t.directives||Array.isArray(t.directives)||(0,GN.devAssert)(!1,`"directives" must be Array if provided but got: ${(0,eS.inspect)(t.directives)}.`),this.description=t.description,this.extensions=(0,gW.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:sU.specifiedDirectives;let i=new Set(t.types);if(t.types!=null)for(let s of t.types)i.delete(s),mo(s,i);this._queryType!=null&&mo(this._queryType,i),this._mutationType!=null&&mo(this._mutationType,i),this._subscriptionType!=null&&mo(this._subscriptionType,i);for(let s of this._directives)if((0,sU.isDirective)(s))for(let o of s.args)mo(o.type,i);mo(IW.__Schema,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let s of i){if(s==null)continue;let o=s.name;if(o||(0,GN.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]=s,(0,fo.isInterfaceType)(s)){for(let u of s.getInterfaces())if((0,fo.isInterfaceType)(u)){let l=this._implementationsMap[u.name];l===void 0&&(l=this._implementationsMap[u.name]={objects:[],interfaces:[]}),l.interfaces.push(s)}}else if((0,fo.isObjectType)(s)){for(let u of s.getInterfaces())if((0,fo.isInterfaceType)(u)){let l=this._implementationsMap[u.name];l===void 0&&(l=this._implementationsMap[u.name]={objects:[],interfaces:[]}),l.objects.push(s)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case ZO.OperationTypeNode.QUERY:return this.getQueryType();case ZO.OperationTypeNode.MUTATION:return this.getMutationType();case ZO.OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return(0,fo.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,fo.isUnionType)(t))for(let i of t.getTypes())r[i.name]=!0;else{let i=this.getImplementations(t);for(let s of i.objects)r[s.name]=!0;for(let s of i.interfaces)r[s.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}}};np.GraphQLSchema=QN;function mo(e,t){let n=(0,fo.getNamedType)(e);if(!t.has(n)){if(t.add(n),(0,fo.isUnionType)(n))for(let r of n.getTypes())mo(r,t);else if((0,fo.isObjectType)(n)||(0,fo.isInterfaceType)(n)){for(let r of n.getInterfaces())mo(r,t);for(let r of Object.values(n.getFields())){mo(r.type,t);for(let i of r.args)mo(i.type,t)}}else if((0,fo.isInputObjectType)(n))for(let r of Object.values(n.getFields()))mo(r.type,t)}return t}});var ph=V(YN=>{"use strict";m();T();h();Object.defineProperty(YN,"__esModule",{value:!0});YN.assertValidSchema=SW;YN.validateSchema=pU;var di=En(),_W=at(),tS=qo(),aU=th(),ar=tn(),dU=ji(),bW=xs(),OW=El();function pU(e){if((0,OW.assertSchema)(e),e.__validationErrors)return e.__validationErrors;let t=new rS(e);DW(t),AW(t),RW(t);let n=t.getErrors();return e.__validationErrors=n,n}function SW(e){let t=pU(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}var rS=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new _W.GraphQLError(t,{nodes:r}))}getErrors(){return this._errors}};function DW(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,ar.isObjectType)(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${(0,di.inspect)(n)}.`,(r=nS(t,tS.OperationTypeNode.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!(0,ar.isObjectType)(i)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,di.inspect)(i)}.`,(s=nS(t,tS.OperationTypeNode.MUTATION))!==null&&s!==void 0?s:i.astNode)}let o=t.getSubscriptionType();if(o&&!(0,ar.isObjectType)(o)){var u;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,di.inspect)(o)}.`,(u=nS(t,tS.OperationTypeNode.SUBSCRIPTION))!==null&&u!==void 0?u:o.astNode)}}function nS(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 AW(e){for(let n of e.schema.getDirectives()){if(!(0,dU.isDirective)(n)){e.reportError(`Expected directive but got: ${(0,di.inspect)(n)}.`,n==null?void 0:n.astNode);continue}gl(e,n);for(let r of n.args)if(gl(e,r),(0,ar.isInputType)(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${(0,di.inspect)(r.type)}.`,r.astNode),(0,ar.isRequiredArgument)(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[iS(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function gl(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function RW(e){let t=CW(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!(0,ar.isNamedType)(r)){e.reportError(`Expected GraphQL named type but got: ${(0,di.inspect)(r)}.`,r.astNode);continue}(0,bW.isIntrospectionType)(r)||gl(e,r),(0,ar.isObjectType)(r)||(0,ar.isInterfaceType)(r)?(uU(e,r),cU(e,r)):(0,ar.isUnionType)(r)?LW(e,r):(0,ar.isEnumType)(r)?PW(e,r):(0,ar.isInputObjectType)(r)&&(kW(e,r),t(r))}}function uU(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(gl(e,o),!(0,ar.isOutputType)(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${(0,di.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(gl(e,u),!(0,ar.isInputType)(u.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${(0,di.inspect)(u.type)}.`,(i=u.astNode)===null||i===void 0?void 0:i.type)}if((0,ar.isRequiredArgument)(u)&&u.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[iS(u.astNode),(s=u.astNode)===null||s===void 0?void 0:s.type])}}}}function cU(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!(0,ar.isInterfaceType)(r)){e.reportError(`Type ${(0,di.inspect)(t)} must only implement Interface types, it cannot implement ${(0,di.inspect)(r)}.`,dh(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,dh(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,dh(t,r));continue}n[r.name]=!0,wW(e,t,r),FW(e,t,r)}}function FW(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,aU.isTypeSubTypeOf)(e.schema,p.type,l.type)){var i,s;e.reportError(`Interface field ${n.name}.${d} expects type ${(0,di.inspect)(l.type)} but ${t.name}.${d} is type ${(0,di.inspect)(p.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(s=p.astNode)===null||s===void 0?void 0:s.type])}for(let y of l.args){let N=y.name,I=p.args.find(b=>b.name===N);if(!I){e.reportError(`Interface field argument ${n.name}.${d}(${N}:) expected but ${t.name}.${d} does not provide it.`,[y.astNode,p.astNode]);continue}if(!(0,aU.isEqualType)(y.type,I.type)){var o,u;e.reportError(`Interface field argument ${n.name}.${d}(${N}:) expects type ${(0,di.inspect)(y.type)} but ${t.name}.${d}(${N}:) is type ${(0,di.inspect)(I.type)}.`,[(o=y.astNode)===null||o===void 0?void 0:o.type,(u=I.astNode)===null||u===void 0?void 0:u.type])}}for(let y of p.args){let N=y.name;!l.args.find(b=>b.name===N)&&(0,ar.isRequiredArgument)(y)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${N} that is missing from the Interface field ${n.name}.${d}.`,[y.astNode,l.astNode])}}}function wW(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}.`,[...dh(n,i),...dh(t,n)])}function LW(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.`,lU(t,i.name));continue}r[i.name]=!0,(0,ar.isObjectType)(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,di.inspect)(i)}.`,lU(t,String(i)))}}function PW(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)gl(e,r)}function kW(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 s of n){if(gl(e,s),!(0,ar.isInputType)(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${(0,di.inspect)(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type)}if((0,ar.isRequiredInputField)(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[iS(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&xW(t,s,e)}}function xW(e,t,n){if((0,ar.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 CW(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(s){if(t[s.name])return;t[s.name]=!0,r[s.name]=n.length;let o=Object.values(s.getFields());for(let u of o)if((0,ar.isNonNullType)(u.type)&&(0,ar.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),y=p.map(N=>N.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${y}".`,p.map(N=>N.astNode))}n.pop()}r[s.name]=void 0}}function dh(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.interfaces)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t.name)}function lU(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.types)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t)}function iS(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===dU.GraphQLDeprecatedDirective.name)}});var Yo=V(aS=>{"use strict";m();T();h();Object.defineProperty(aS,"__esModule",{value:!0});aS.typeFromAST=oS;var sS=en(),fU=tn();function oS(e,t){switch(t.kind){case sS.Kind.LIST_TYPE:{let n=oS(e,t.type);return n&&new fU.GraphQLList(n)}case sS.Kind.NON_NULL_TYPE:{let n=oS(e,t.type);return n&&new fU.GraphQLNonNull(n)}case sS.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var JN=V(fh=>{"use strict";m();T();h();Object.defineProperty(fh,"__esModule",{value:!0});fh.TypeInfo=void 0;fh.visitWithTypeInfo=BW;var UW=qo(),ur=en(),mU=pl(),cr=tn(),rp=xs(),hU=Yo(),uS=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:MW,n&&((0,cr.isInputType)(n)&&this._inputTypeStack.push(n),(0,cr.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,cr.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 ur.Kind.SELECTION_SET:{let i=(0,cr.getNamedType)(this.getType());this._parentTypeStack.push((0,cr.isCompositeType)(i)?i:void 0);break}case ur.Kind.FIELD:{let i=this.getParentType(),s,o;i&&(s=this._getFieldDef(n,i,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push((0,cr.isOutputType)(o)?o:void 0);break}case ur.Kind.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case ur.Kind.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push((0,cr.isObjectType)(i)?i:void 0);break}case ur.Kind.INLINE_FRAGMENT:case ur.Kind.FRAGMENT_DEFINITION:{let i=t.typeCondition,s=i?(0,hU.typeFromAST)(n,i):(0,cr.getNamedType)(this.getType());this._typeStack.push((0,cr.isOutputType)(s)?s:void 0);break}case ur.Kind.VARIABLE_DEFINITION:{let i=(0,hU.typeFromAST)(n,t.type);this._inputTypeStack.push((0,cr.isInputType)(i)?i:void 0);break}case ur.Kind.ARGUMENT:{var r;let i,s,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(u=>u.name===t.name.value),i&&(s=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push((0,cr.isInputType)(s)?s:void 0);break}case ur.Kind.LIST:{let i=(0,cr.getNullableType)(this.getInputType()),s=(0,cr.isListType)(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,cr.isInputType)(s)?s:void 0);break}case ur.Kind.OBJECT_FIELD:{let i=(0,cr.getNamedType)(this.getInputType()),s,o;(0,cr.isInputObjectType)(i)&&(o=i.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,cr.isInputType)(s)?s:void 0);break}case ur.Kind.ENUM:{let i=(0,cr.getNamedType)(this.getInputType()),s;(0,cr.isEnumType)(i)&&(s=i.getValue(t.value)),this._enumValue=s;break}default:}}leave(t){switch(t.kind){case ur.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case ur.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case ur.Kind.DIRECTIVE:this._directive=null;break;case ur.Kind.OPERATION_DEFINITION:case ur.Kind.INLINE_FRAGMENT:case ur.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case ur.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case ur.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case ur.Kind.LIST:case ur.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case ur.Kind.ENUM:this._enumValue=null;break;default:}}};fh.TypeInfo=uS;function MW(e,t,n){let r=n.name.value;if(r===rp.SchemaMetaFieldDef.name&&e.getQueryType()===t)return rp.SchemaMetaFieldDef;if(r===rp.TypeMetaFieldDef.name&&e.getQueryType()===t)return rp.TypeMetaFieldDef;if(r===rp.TypeNameMetaFieldDef.name&&(0,cr.isCompositeType)(t))return rp.TypeNameMetaFieldDef;if((0,cr.isObjectType)(t)||(0,cr.isInterfaceType)(t))return t.getFields()[r]}function BW(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=(0,mU.getEnterLeaveForKind)(t,r.kind).enter;if(i){let s=i.apply(t,n);return s!==void 0&&(e.leave(r),(0,UW.isNode)(s)&&e.enter(s)),s}},leave(...n){let r=n[0],i=(0,mU.getEnterLeaveForKind)(t,r.kind).leave,s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}});var Il=V(Cs=>{"use strict";m();T();h();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.isConstValueNode=cS;Cs.isDefinitionNode=VW;Cs.isExecutableDefinitionNode=TU;Cs.isSelectionNode=jW;Cs.isTypeDefinitionNode=EU;Cs.isTypeExtensionNode=IU;Cs.isTypeNode=$W;Cs.isTypeSystemDefinitionNode=NU;Cs.isTypeSystemExtensionNode=gU;Cs.isValueNode=yU;var nn=en();function VW(e){return TU(e)||NU(e)||gU(e)}function TU(e){return e.kind===nn.Kind.OPERATION_DEFINITION||e.kind===nn.Kind.FRAGMENT_DEFINITION}function jW(e){return e.kind===nn.Kind.FIELD||e.kind===nn.Kind.FRAGMENT_SPREAD||e.kind===nn.Kind.INLINE_FRAGMENT}function yU(e){return e.kind===nn.Kind.VARIABLE||e.kind===nn.Kind.INT||e.kind===nn.Kind.FLOAT||e.kind===nn.Kind.STRING||e.kind===nn.Kind.BOOLEAN||e.kind===nn.Kind.NULL||e.kind===nn.Kind.ENUM||e.kind===nn.Kind.LIST||e.kind===nn.Kind.OBJECT}function cS(e){return yU(e)&&(e.kind===nn.Kind.LIST?e.values.some(cS):e.kind===nn.Kind.OBJECT?e.fields.some(t=>cS(t.value)):e.kind!==nn.Kind.VARIABLE)}function $W(e){return e.kind===nn.Kind.NAMED_TYPE||e.kind===nn.Kind.LIST_TYPE||e.kind===nn.Kind.NON_NULL_TYPE}function NU(e){return e.kind===nn.Kind.SCHEMA_DEFINITION||EU(e)||e.kind===nn.Kind.DIRECTIVE_DEFINITION}function EU(e){return e.kind===nn.Kind.SCALAR_TYPE_DEFINITION||e.kind===nn.Kind.OBJECT_TYPE_DEFINITION||e.kind===nn.Kind.INTERFACE_TYPE_DEFINITION||e.kind===nn.Kind.UNION_TYPE_DEFINITION||e.kind===nn.Kind.ENUM_TYPE_DEFINITION||e.kind===nn.Kind.INPUT_OBJECT_TYPE_DEFINITION}function gU(e){return e.kind===nn.Kind.SCHEMA_EXTENSION||IU(e)}function IU(e){return e.kind===nn.Kind.SCALAR_TYPE_EXTENSION||e.kind===nn.Kind.OBJECT_TYPE_EXTENSION||e.kind===nn.Kind.INTERFACE_TYPE_EXTENSION||e.kind===nn.Kind.UNION_TYPE_EXTENSION||e.kind===nn.Kind.ENUM_TYPE_EXTENSION||e.kind===nn.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var dS=V(lS=>{"use strict";m();T();h();Object.defineProperty(lS,"__esModule",{value:!0});lS.ExecutableDefinitionsRule=GW;var qW=at(),vU=en(),KW=Il();function GW(e){return{Document(t){for(let n of t.definitions)if(!(0,KW.isExecutableDefinitionNode)(n)){let r=n.kind===vU.Kind.SCHEMA_DEFINITION||n.kind===vU.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new qW.GraphQLError(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}});var fS=V(pS=>{"use strict";m();T();h();Object.defineProperty(pS,"__esModule",{value:!0});pS.FieldsOnCorrectTypeRule=zW;var _U=mc(),QW=Ym(),YW=Tc(),JW=at(),mh=tn();function zW(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),s=t.name.value,o=(0,_U.didYouMean)("to use an inline fragment on",HW(i,n,s));o===""&&(o=(0,_U.didYouMean)(WW(n,s))),e.reportError(new JW.GraphQLError(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}))}}}}function HW(e,t,n){if(!(0,mh.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 s;u.getFields()[n]&&(r.add(u),i[u.name]=((s=i[u.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((o,u)=>{let l=i[u.name]-i[o.name];return l!==0?l:(0,mh.isInterfaceType)(o)&&e.isSubType(o,u)?-1:(0,mh.isInterfaceType)(u)&&e.isSubType(u,o)?1:(0,QW.naturalCompare)(o.name,u.name)}).map(o=>o.name)}function WW(e,t){if((0,mh.isObjectType)(e)||(0,mh.isInterfaceType)(e)){let n=Object.keys(e.getFields());return(0,YW.suggestionList)(t,n)}return[]}});var hS=V(mS=>{"use strict";m();T();h();Object.defineProperty(mS,"__esModule",{value:!0});mS.FragmentsOnCompositeTypesRule=XW;var bU=at(),OU=ds(),SU=tn(),DU=Yo();function XW(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=(0,DU.typeFromAST)(e.getSchema(),n);if(r&&!(0,SU.isCompositeType)(r)){let i=(0,OU.print)(n);e.reportError(new bU.GraphQLError(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=(0,DU.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,SU.isCompositeType)(n)){let r=(0,OU.print)(t.typeCondition);e.reportError(new bU.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}});var TS=V(zN=>{"use strict";m();T();h();Object.defineProperty(zN,"__esModule",{value:!0});zN.KnownArgumentNamesOnDirectivesRule=wU;zN.KnownArgumentNamesRule=tX;var AU=mc(),RU=Tc(),FU=at(),ZW=en(),eX=ji();function tX(e){return K(k({},wU(e)),{Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let s=t.name.value,o=r.args.map(l=>l.name),u=(0,RU.suggestionList)(s,o);e.reportError(new FU.GraphQLError(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+(0,AU.didYouMean)(u),{nodes:t}))}}})}function wU(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():eX.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===ZW.Kind.DIRECTIVE_DEFINITION){var s;let u=(s=o.arguments)!==null&&s!==void 0?s:[];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 y=(0,RU.suggestionList)(p,l);e.reportError(new FU.GraphQLError(`Unknown argument "${p}" on directive "@${u}".`+(0,AU.didYouMean)(y),{nodes:d}))}}return!1}}}});var gS=V(ES=>{"use strict";m();T();h();Object.defineProperty(ES,"__esModule",{value:!0});ES.KnownDirectivesRule=iX;var nX=En(),yS=ci(),LU=at(),NS=qo(),Pr=tp(),jn=en(),rX=ji();function iX(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():rX.specifiedDirectives;for(let s of r)t[s.name]=s.locations;let i=e.getDocument().definitions;for(let s of i)s.kind===jn.Kind.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return{Directive(s,o,u,l,d){let p=s.name.value,y=t[p];if(!y){e.reportError(new LU.GraphQLError(`Unknown directive "@${p}".`,{nodes:s}));return}let N=sX(d);N&&!y.includes(N)&&e.reportError(new LU.GraphQLError(`Directive "@${p}" may not be used on ${N}.`,{nodes:s}))}}}function sX(e){let t=e[e.length-1];switch("kind"in t||(0,yS.invariant)(!1),t.kind){case jn.Kind.OPERATION_DEFINITION:return oX(t.operation);case jn.Kind.FIELD:return Pr.DirectiveLocation.FIELD;case jn.Kind.FRAGMENT_SPREAD:return Pr.DirectiveLocation.FRAGMENT_SPREAD;case jn.Kind.INLINE_FRAGMENT:return Pr.DirectiveLocation.INLINE_FRAGMENT;case jn.Kind.FRAGMENT_DEFINITION:return Pr.DirectiveLocation.FRAGMENT_DEFINITION;case jn.Kind.VARIABLE_DEFINITION:return Pr.DirectiveLocation.VARIABLE_DEFINITION;case jn.Kind.SCHEMA_DEFINITION:case jn.Kind.SCHEMA_EXTENSION:return Pr.DirectiveLocation.SCHEMA;case jn.Kind.SCALAR_TYPE_DEFINITION:case jn.Kind.SCALAR_TYPE_EXTENSION:return Pr.DirectiveLocation.SCALAR;case jn.Kind.OBJECT_TYPE_DEFINITION:case jn.Kind.OBJECT_TYPE_EXTENSION:return Pr.DirectiveLocation.OBJECT;case jn.Kind.FIELD_DEFINITION:return Pr.DirectiveLocation.FIELD_DEFINITION;case jn.Kind.INTERFACE_TYPE_DEFINITION:case jn.Kind.INTERFACE_TYPE_EXTENSION:return Pr.DirectiveLocation.INTERFACE;case jn.Kind.UNION_TYPE_DEFINITION:case jn.Kind.UNION_TYPE_EXTENSION:return Pr.DirectiveLocation.UNION;case jn.Kind.ENUM_TYPE_DEFINITION:case jn.Kind.ENUM_TYPE_EXTENSION:return Pr.DirectiveLocation.ENUM;case jn.Kind.ENUM_VALUE_DEFINITION:return Pr.DirectiveLocation.ENUM_VALUE;case jn.Kind.INPUT_OBJECT_TYPE_DEFINITION:case jn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return Pr.DirectiveLocation.INPUT_OBJECT;case jn.Kind.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||(0,yS.invariant)(!1),n.kind===jn.Kind.INPUT_OBJECT_TYPE_DEFINITION?Pr.DirectiveLocation.INPUT_FIELD_DEFINITION:Pr.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,yS.invariant)(!1,"Unexpected kind: "+(0,nX.inspect)(t.kind))}}function oX(e){switch(e){case NS.OperationTypeNode.QUERY:return Pr.DirectiveLocation.QUERY;case NS.OperationTypeNode.MUTATION:return Pr.DirectiveLocation.MUTATION;case NS.OperationTypeNode.SUBSCRIPTION:return Pr.DirectiveLocation.SUBSCRIPTION}}});var vS=V(IS=>{"use strict";m();T();h();Object.defineProperty(IS,"__esModule",{value:!0});IS.KnownFragmentNamesRule=uX;var aX=at();function uX(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new aX.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}});var OS=V(bS=>{"use strict";m();T();h();Object.defineProperty(bS,"__esModule",{value:!0});bS.KnownTypeNamesRule=mX;var cX=mc(),lX=Tc(),dX=at(),_S=Il(),pX=xs(),fX=Qo();function mX(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let s of e.getDocument().definitions)(0,_S.isTypeDefinitionNode)(s)&&(r[s.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,o,u,l,d){let p=s.name.value;if(!n[p]&&!r[p]){var y;let N=(y=d[2])!==null&&y!==void 0?y:u,I=N!=null&&hX(N);if(I&&PU.includes(p))return;let b=(0,lX.suggestionList)(p,I?PU.concat(i):i);e.reportError(new dX.GraphQLError(`Unknown type "${p}".`+(0,cX.didYouMean)(b),{nodes:s}))}}}}var PU=[...fX.specifiedScalarTypes,...pX.introspectionTypes].map(e=>e.name);function hX(e){return"kind"in e&&((0,_S.isTypeSystemDefinitionNode)(e)||(0,_S.isTypeSystemExtensionNode)(e))}});var DS=V(SS=>{"use strict";m();T();h();Object.defineProperty(SS,"__esModule",{value:!0});SS.LoneAnonymousOperationRule=NX;var TX=at(),yX=en();function NX(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===yX.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new TX.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}});var RS=V(AS=>{"use strict";m();T();h();Object.defineProperty(AS,"__esModule",{value:!0});AS.LoneSchemaDefinitionRule=EX;var kU=at();function EX(e){var t,n,r;let i=e.getSchema(),s=(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(s){e.reportError(new kU.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:u}));return}o>0&&e.reportError(new kU.GraphQLError("Must provide only one schema definition.",{nodes:u})),++o}}}});var wS=V(FS=>{"use strict";m();T();h();Object.defineProperty(FS,"__esModule",{value:!0});FS.MaxIntrospectionDepthRule=vX;var gX=at(),xU=en(),IX=3;function vX(e){function t(n,r=Object.create(null),i=0){if(n.kind===xU.Kind.FRAGMENT_SPREAD){let s=n.name.value;if(r[s]===!0)return!1;let o=e.getFragment(s);if(!o)return!1;try{return r[s]=!0,t(o,r,i)}finally{r[s]=void 0}}if(n.kind===xU.Kind.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=IX))return!0;if("selectionSet"in n&&n.selectionSet){for(let s of n.selectionSet.selections)if(t(s,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new gX.GraphQLError("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}});var PS=V(LS=>{"use strict";m();T();h();Object.defineProperty(LS,"__esModule",{value:!0});LS.NoFragmentCyclesRule=bX;var _X=at();function bX(e){let t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;let o=s.name.value;t[o]=!0;let u=e.getFragmentSpreads(s.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 y=e.getFragment(d);y&&i(y)}else{let y=n.slice(p),N=y.slice(0,-1).map(I=>'"'+I.name.value+'"').join(", ");e.reportError(new _X.GraphQLError(`Cannot spread fragment "${d}" within itself`+(N!==""?` via ${N}.`:"."),{nodes:y}))}n.pop()}r[o]=void 0}}}});var xS=V(kS=>{"use strict";m();T();h();Object.defineProperty(kS,"__esModule",{value:!0});kS.NoUndefinedVariablesRule=SX;var OX=at();function SX(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 s=i.name.value;t[s]!==!0&&e.reportError(new OX.GraphQLError(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}});var US=V(CS=>{"use strict";m();T();h();Object.defineProperty(CS,"__esModule",{value:!0});CS.NoUnusedFragmentsRule=AX;var DX=at();function AX(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 s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(let i of n){let s=i.name.value;r[s]!==!0&&e.reportError(new DX.GraphQLError(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}});var BS=V(MS=>{"use strict";m();T();h();Object.defineProperty(MS,"__esModule",{value:!0});MS.NoUnusedVariablesRule=FX;var RX=at();function FX(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:s}of i)r[s.name.value]=!0;for(let s of t){let o=s.variable.name.value;r[o]!==!0&&e.reportError(new RX.GraphQLError(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}});var $S=V(jS=>{"use strict";m();T();h();Object.defineProperty(jS,"__esModule",{value:!0});jS.sortValueNode=VS;var wX=Ym(),Ma=en();function VS(e){switch(e.kind){case Ma.Kind.OBJECT:return K(k({},e),{fields:LX(e.fields)});case Ma.Kind.LIST:return K(k({},e),{values:e.values.map(VS)});case Ma.Kind.INT:case Ma.Kind.FLOAT:case Ma.Kind.STRING:case Ma.Kind.BOOLEAN:case Ma.Kind.NULL:case Ma.Kind.ENUM:case Ma.Kind.VARIABLE:return e}}function LX(e){return e.map(t=>K(k({},t),{value:VS(t.value)})).sort((t,n)=>(0,wX.naturalCompare)(t.name.value,n.name.value))}});var zS=V(JS=>{"use strict";m();T();h();Object.defineProperty(JS,"__esModule",{value:!0});JS.OverlappingFieldsCanBeMergedRule=CX;var CU=En(),PX=at(),qS=en(),kX=ds(),$i=tn(),xX=$S(),MU=Yo();function BU(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+BU(n)).join(" and "):e}function CX(e){let t=new QS,n=new Map;return{SelectionSet(r){let i=UX(e,n,t,e.getParentType(),r);for(let[[s,o],u,l]of i){let d=BU(o);e.reportError(new PX.GraphQLError(`Fields "${s}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:u.concat(l)}))}}}}function UX(e,t,n,r,i){let s=[],[o,u]=XN(e,t,r,i);if(BX(e,s,t,n,o),u.length!==0)for(let l=0;l1)for(let u=0;u[s.value,o]));return n.every(s=>{let o=s.value,u=i.get(s.name.value);return u===void 0?!1:UU(o)===UU(u)})}function UU(e){return(0,kX.print)((0,xX.sortValueNode)(e))}function KS(e,t){return(0,$i.isListType)(e)?(0,$i.isListType)(t)?KS(e.ofType,t.ofType):!0:(0,$i.isListType)(t)?!0:(0,$i.isNonNullType)(e)?(0,$i.isNonNullType)(t)?KS(e.ofType,t.ofType):!0:(0,$i.isNonNullType)(t)?!0:(0,$i.isLeafType)(e)||(0,$i.isLeafType)(t)?e!==t:!1}function XN(e,t,n,r){let i=t.get(r);if(i)return i;let s=Object.create(null),o=Object.create(null);jU(e,n,r,s,o);let u=[s,Object.keys(o)];return t.set(r,u),u}function GS(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=(0,MU.typeFromAST)(e.getSchema(),n.typeCondition);return XN(e,t,i,n.selectionSet)}function jU(e,t,n,r,i){for(let s of n.selections)switch(s.kind){case qS.Kind.FIELD:{let o=s.name.value,u;((0,$i.isObjectType)(t)||(0,$i.isInterfaceType)(t))&&(u=t.getFields()[o]);let l=s.alias?s.alias.value:o;r[l]||(r[l]=[]),r[l].push([t,s,u]);break}case qS.Kind.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case qS.Kind.INLINE_FRAGMENT:{let o=s.typeCondition,u=o?(0,MU.typeFromAST)(e.getSchema(),o):t;jU(e,u,s.selectionSet,r,i);break}}}function jX(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 QS=class{constructor(){this._data=new Map}has(t,n,r){var i;let[s,o]=t{"use strict";m();T();h();Object.defineProperty(WS,"__esModule",{value:!0});WS.PossibleFragmentSpreadsRule=qX;var ZN=En(),$U=at(),HS=tn(),qU=th(),$X=Yo();function qX(e){return{InlineFragment(t){let n=e.getType(),r=e.getParentType();if((0,HS.isCompositeType)(n)&&(0,HS.isCompositeType)(r)&&!(0,qU.doTypesOverlap)(e.getSchema(),n,r)){let i=(0,ZN.inspect)(r),s=(0,ZN.inspect)(n);e.reportError(new $U.GraphQLError(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${s}".`,{nodes:t}))}},FragmentSpread(t){let n=t.name.value,r=KX(e,n),i=e.getParentType();if(r&&i&&!(0,qU.doTypesOverlap)(e.getSchema(),r,i)){let s=(0,ZN.inspect)(i),o=(0,ZN.inspect)(r);e.reportError(new $U.GraphQLError(`Fragment "${n}" cannot be spread here as objects of type "${s}" can never be of type "${o}".`,{nodes:t}))}}}}function KX(e,t){let n=e.getFragment(t);if(n){let r=(0,$X.typeFromAST)(e.getSchema(),n.typeCondition);if((0,HS.isCompositeType)(r))return r}}});var e0=V(ZS=>{"use strict";m();T();h();Object.defineProperty(ZS,"__esModule",{value:!0});ZS.PossibleTypeExtensionsRule=JX;var GX=mc(),GU=En(),QU=ci(),QX=Tc(),KU=at(),zn=en(),YX=Il(),ip=tn();function JX(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)(0,YX.isTypeDefinitionNode)(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){let s=i.name.value,o=n[s],u=t==null?void 0:t.getType(s),l;if(o?l=zX[o.kind]:u&&(l=HX(u)),l){if(l!==i.kind){let d=WX(i.kind);e.reportError(new KU.GraphQLError(`Cannot extend non-${d} type "${s}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(k(k({},n),t==null?void 0:t.getTypeMap())),p=(0,QX.suggestionList)(s,d);e.reportError(new KU.GraphQLError(`Cannot extend type "${s}" because it is not defined.`+(0,GX.didYouMean)(p),{nodes:i.name}))}}}var zX={[zn.Kind.SCALAR_TYPE_DEFINITION]:zn.Kind.SCALAR_TYPE_EXTENSION,[zn.Kind.OBJECT_TYPE_DEFINITION]:zn.Kind.OBJECT_TYPE_EXTENSION,[zn.Kind.INTERFACE_TYPE_DEFINITION]:zn.Kind.INTERFACE_TYPE_EXTENSION,[zn.Kind.UNION_TYPE_DEFINITION]:zn.Kind.UNION_TYPE_EXTENSION,[zn.Kind.ENUM_TYPE_DEFINITION]:zn.Kind.ENUM_TYPE_EXTENSION,[zn.Kind.INPUT_OBJECT_TYPE_DEFINITION]:zn.Kind.INPUT_OBJECT_TYPE_EXTENSION};function HX(e){if((0,ip.isScalarType)(e))return zn.Kind.SCALAR_TYPE_EXTENSION;if((0,ip.isObjectType)(e))return zn.Kind.OBJECT_TYPE_EXTENSION;if((0,ip.isInterfaceType)(e))return zn.Kind.INTERFACE_TYPE_EXTENSION;if((0,ip.isUnionType)(e))return zn.Kind.UNION_TYPE_EXTENSION;if((0,ip.isEnumType)(e))return zn.Kind.ENUM_TYPE_EXTENSION;if((0,ip.isInputObjectType)(e))return zn.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,QU.invariant)(!1,"Unexpected type: "+(0,GU.inspect)(e))}function WX(e){switch(e){case zn.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case zn.Kind.OBJECT_TYPE_EXTENSION:return"object";case zn.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case zn.Kind.UNION_TYPE_EXTENSION:return"union";case zn.Kind.ENUM_TYPE_EXTENSION:return"enum";case zn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,QU.invariant)(!1,"Unexpected kind: "+(0,GU.inspect)(e))}}});var n0=V(eE=>{"use strict";m();T();h();Object.defineProperty(eE,"__esModule",{value:!0});eE.ProvidedRequiredArgumentsOnDirectivesRule=WU;eE.ProvidedRequiredArgumentsRule=e5;var JU=En(),YU=hc(),zU=at(),HU=en(),XX=ds(),t0=tn(),ZX=ji();function e5(e){return K(k({},WU(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(s=>s.name.value));for(let s of r.args)if(!i.has(s.name)&&(0,t0.isRequiredArgument)(s)){let o=(0,JU.inspect)(s.type);e.reportError(new zU.GraphQLError(`Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function WU(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:ZX.specifiedDirectives;for(let u of i)n[u.name]=(0,YU.keyMap)(u.args.filter(t0.isRequiredArgument),l=>l.name);let s=e.getDocument().definitions;for(let u of s)if(u.kind===HU.Kind.DIRECTIVE_DEFINITION){var o;let l=(o=u.arguments)!==null&&o!==void 0?o:[];n[u.name.value]=(0,YU.keyMap)(l.filter(t5),d=>d.name.value)}return{Directive:{leave(u){let l=u.name.value,d=n[l];if(d){var p;let y=(p=u.arguments)!==null&&p!==void 0?p:[],N=new Set(y.map(I=>I.name.value));for(let[I,b]of Object.entries(d))if(!N.has(I)){let x=(0,t0.isType)(b.type)?(0,JU.inspect)(b.type):(0,XX.print)(b.type);e.reportError(new zU.GraphQLError(`Directive "@${l}" argument "${I}" of type "${x}" is required, but it was not provided.`,{nodes:u}))}}}}}}function t5(e){return e.type.kind===HU.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var i0=V(r0=>{"use strict";m();T();h();Object.defineProperty(r0,"__esModule",{value:!0});r0.ScalarLeafsRule=n5;var XU=En(),ZU=at(),eM=tn();function n5(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if((0,eM.isLeafType)((0,eM.getNamedType)(n))){if(r){let i=t.name.value,s=(0,XU.inspect)(n);e.reportError(new ZU.GraphQLError(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){let i=t.name.value,s=(0,XU.inspect)(n);e.reportError(new ZU.GraphQLError(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}});var o0=V(s0=>{"use strict";m();T();h();Object.defineProperty(s0,"__esModule",{value:!0});s0.printPathArray=r5;function r5(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var hh=V(tE=>{"use strict";m();T();h();Object.defineProperty(tE,"__esModule",{value:!0});tE.addPath=i5;tE.pathToArray=s5;function i5(e,t,n){return{prev:e,key:t,typename:n}}function s5(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}});var u0=V(a0=>{"use strict";m();T();h();Object.defineProperty(a0,"__esModule",{value:!0});a0.coerceInputValue=p5;var o5=mc(),nE=En(),a5=ci(),u5=KN(),c5=$o(),ho=hh(),l5=o0(),d5=Tc(),Ba=at(),Th=tn();function p5(e,t,n=f5){return yh(e,t,n,void 0)}function f5(e,t,n){let r="Invalid value "+(0,nE.inspect)(t);throw e.length>0&&(r+=` at "value${(0,l5.printPathArray)(e)}"`),n.message=r+": "+n.message,n}function yh(e,t,n,r){if((0,Th.isNonNullType)(t)){if(e!=null)return yh(e,t.ofType,n,r);n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Expected non-nullable type "${(0,nE.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,Th.isListType)(t)){let i=t.ofType;return(0,u5.isIterableObject)(e)?Array.from(e,(s,o)=>{let u=(0,ho.addPath)(r,o,void 0);return yh(s,i,n,u)}):[yh(e,i,n,r)]}if((0,Th.isInputObjectType)(t)){if(!(0,c5.isObjectLike)(e)){n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Expected type "${t.name}" to be an object.`));return}let i={},s=t.getFields();for(let o of Object.values(s)){let u=e[o.name];if(u===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if((0,Th.isNonNullType)(o.type)){let l=(0,nE.inspect)(o.type);n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=yh(u,o.type,n,(0,ho.addPath)(r,o.name,t.name))}for(let o of Object.keys(e))if(!s[o]){let u=(0,d5.suggestionList)(o,Object.keys(t.getFields()));n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Field "${o}" is not defined by type "${t.name}".`+(0,o5.didYouMean)(u)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let u=o[0],l=i[u];l===null&&n((0,ho.pathToArray)(r).concat(u),l,new Ba.GraphQLError(`Field "${u}" must be non-null.`))}return i}if((0,Th.isLeafType)(t)){let i;try{i=t.parseValue(e)}catch(s){s instanceof Ba.GraphQLError?n((0,ho.pathToArray)(r),e,s):n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return i===void 0&&n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Expected type "${t.name}".`)),i}(0,a5.invariant)(!1,"Unexpected input type: "+(0,nE.inspect)(t))}});var Eh=V(c0=>{"use strict";m();T();h();Object.defineProperty(c0,"__esModule",{value:!0});c0.valueFromAST=Nh;var m5=En(),h5=ci(),T5=hc(),sp=en(),vl=tn();function Nh(e,t,n){if(e){if(e.kind===sp.Kind.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&(0,vl.isNonNullType)(t)?void 0:i}if((0,vl.isNonNullType)(t))return e.kind===sp.Kind.NULL?void 0:Nh(e,t.ofType,n);if(e.kind===sp.Kind.NULL)return null;if((0,vl.isListType)(t)){let r=t.ofType;if(e.kind===sp.Kind.LIST){let s=[];for(let o of e.values)if(tM(o,n)){if((0,vl.isNonNullType)(r))return;s.push(null)}else{let u=Nh(o,r,n);if(u===void 0)return;s.push(u)}return s}let i=Nh(e,r,n);return i===void 0?void 0:[i]}if((0,vl.isInputObjectType)(t)){if(e.kind!==sp.Kind.OBJECT)return;let r=Object.create(null),i=(0,T5.keyMap)(e.fields,s=>s.name.value);for(let s of Object.values(t.getFields())){let o=i[s.name];if(!o||tM(o.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if((0,vl.isNonNullType)(s.type))return;continue}let u=Nh(o.value,s.type,n);if(u===void 0)return;r[s.name]=u}if(t.isOneOf){let s=Object.keys(r);if(s.length!==1||r[s[0]]===null)return}return r}if((0,vl.isLeafType)(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}(0,h5.invariant)(!1,"Unexpected input type: "+(0,m5.inspect)(t))}}function tM(e,t){return e.kind===sp.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var up=V(gh=>{"use strict";m();T();h();Object.defineProperty(gh,"__esModule",{value:!0});gh.getArgumentValues=sM;gh.getDirectiveValues=_5;gh.getVariableValues=I5;var op=En(),y5=hc(),N5=o0(),Va=at(),nM=en(),rM=ds(),ap=tn(),E5=u0(),g5=Yo(),iM=Eh();function I5(e,t,n,r){let i=[],s=r==null?void 0:r.maxErrors;try{let o=v5(e,t,n,u=>{if(s!=null&&i.length>=s)throw new Va.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 v5(e,t,n,r){let i={};for(let s of t){let o=s.variable.name.value,u=(0,g5.typeFromAST)(e,s.type);if(!(0,ap.isInputType)(u)){let d=(0,rM.print)(s.type);r(new Va.GraphQLError(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:s.type}));continue}if(!oM(n,o)){if(s.defaultValue)i[o]=(0,iM.valueFromAST)(s.defaultValue,u);else if((0,ap.isNonNullType)(u)){let d=(0,op.inspect)(u);r(new Va.GraphQLError(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:s}))}continue}let l=n[o];if(l===null&&(0,ap.isNonNullType)(u)){let d=(0,op.inspect)(u);r(new Va.GraphQLError(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:s}));continue}i[o]=(0,E5.coerceInputValue)(l,u,(d,p,y)=>{let N=`Variable "$${o}" got invalid value `+(0,op.inspect)(p);d.length>0&&(N+=` at "${o}${(0,N5.printPathArray)(d)}"`),r(new Va.GraphQLError(N+"; "+y.message,{nodes:s,originalError:y}))})}return i}function sM(e,t,n){var r;let i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],o=(0,y5.keyMap)(s,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,ap.isNonNullType)(d))throw new Va.GraphQLError(`Argument "${l}" of required type "${(0,op.inspect)(d)}" was not provided.`,{nodes:t});continue}let y=p.value,N=y.kind===nM.Kind.NULL;if(y.kind===nM.Kind.VARIABLE){let b=y.name.value;if(n==null||!oM(n,b)){if(u.defaultValue!==void 0)i[l]=u.defaultValue;else if((0,ap.isNonNullType)(d))throw new Va.GraphQLError(`Argument "${l}" of required type "${(0,op.inspect)(d)}" was provided the variable "$${b}" which was not provided a runtime value.`,{nodes:y});continue}N=n[b]==null}if(N&&(0,ap.isNonNullType)(d))throw new Va.GraphQLError(`Argument "${l}" of non-null type "${(0,op.inspect)(d)}" must not be null.`,{nodes:y});let I=(0,iM.valueFromAST)(y,d,n);if(I===void 0)throw new Va.GraphQLError(`Argument "${l}" has invalid value ${(0,rM.print)(y)}.`,{nodes:y});i[l]=I}return i}function _5(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return sM(e,i,n)}function oM(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var sE=V(iE=>{"use strict";m();T();h();Object.defineProperty(iE,"__esModule",{value:!0});iE.collectFields=S5;iE.collectSubfields=D5;var l0=en(),b5=tn(),aM=ji(),O5=Yo(),uM=up();function S5(e,t,n,r,i){let s=new Map;return rE(e,t,n,r,i,s,new Set),s}function D5(e,t,n,r,i){let s=new Map,o=new Set;for(let u of i)u.selectionSet&&rE(e,t,n,r,u.selectionSet,s,o);return s}function rE(e,t,n,r,i,s,o){for(let u of i.selections)switch(u.kind){case l0.Kind.FIELD:{if(!d0(n,u))continue;let l=A5(u),d=s.get(l);d!==void 0?d.push(u):s.set(l,[u]);break}case l0.Kind.INLINE_FRAGMENT:{if(!d0(n,u)||!cM(e,u,r))continue;rE(e,t,n,r,u.selectionSet,s,o);break}case l0.Kind.FRAGMENT_SPREAD:{let l=u.name.value;if(o.has(l)||!d0(n,u))continue;o.add(l);let d=t[l];if(!d||!cM(e,d,r))continue;rE(e,t,n,r,d.selectionSet,s,o);break}}}function d0(e,t){let n=(0,uM.getDirectiveValues)(aM.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,uM.getDirectiveValues)(aM.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function cM(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,O5.typeFromAST)(e,r);return i===n?!0:(0,b5.isAbstractType)(i)?e.isSubType(i,n):!1}function A5(e){return e.alias?e.alias.value:e.name.value}});var f0=V(p0=>{"use strict";m();T();h();Object.defineProperty(p0,"__esModule",{value:!0});p0.SingleFieldSubscriptionsRule=w5;var lM=at(),R5=en(),F5=sE();function w5(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,s=Object.create(null),o=e.getDocument(),u=Object.create(null);for(let d of o.definitions)d.kind===R5.Kind.FRAGMENT_DEFINITION&&(u[d.name.value]=d);let l=(0,F5.collectFields)(n,u,s,r,t.selectionSet);if(l.size>1){let y=[...l.values()].slice(1).flat();e.reportError(new lM.GraphQLError(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:y}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new lM.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 oE=V(m0=>{"use strict";m();T();h();Object.defineProperty(m0,"__esModule",{value:!0});m0.groupBy=L5;function L5(e,t){let n=new Map;for(let r of e){let i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}});var T0=V(h0=>{"use strict";m();T();h();Object.defineProperty(h0,"__esModule",{value:!0});h0.UniqueArgumentDefinitionNamesRule=x5;var P5=oE(),k5=at();function x5(e){return{DirectiveDefinition(r){var i;let s=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,s)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;let s=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(`${s}.${d}`,p)}return!1}function n(r,i){let s=(0,P5.groupBy)(i,o=>o.name.value);for(let[o,u]of s)u.length>1&&e.reportError(new k5.GraphQLError(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:u.map(l=>l.name)}));return!1}}});var N0=V(y0=>{"use strict";m();T();h();Object.defineProperty(y0,"__esModule",{value:!0});y0.UniqueArgumentNamesRule=M5;var C5=oE(),U5=at();function M5(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],s=(0,C5.groupBy)(i,o=>o.name.value);for(let[o,u]of s)u.length>1&&e.reportError(new U5.GraphQLError(`There can be only one argument named "${o}".`,{nodes:u.map(l=>l.name)}))}}});var g0=V(E0=>{"use strict";m();T();h();Object.defineProperty(E0,"__esModule",{value:!0});E0.UniqueDirectiveNamesRule=B5;var dM=at();function B5(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 dM.GraphQLError(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new dM.GraphQLError(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}});var _0=V(v0=>{"use strict";m();T();h();Object.defineProperty(v0,"__esModule",{value:!0});v0.UniqueDirectivesPerLocationRule=$5;var V5=at(),I0=en(),pM=Il(),j5=ji();function $5(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():j5.specifiedDirectives;for(let u of r)t[u.name]=!u.isRepeatable;let i=e.getDocument().definitions;for(let u of i)u.kind===I0.Kind.DIRECTIVE_DEFINITION&&(t[u.name.value]=!u.repeatable);let s=Object.create(null),o=Object.create(null);return{enter(u){if(!("directives"in u)||!u.directives)return;let l;if(u.kind===I0.Kind.SCHEMA_DEFINITION||u.kind===I0.Kind.SCHEMA_EXTENSION)l=s;else if((0,pM.isTypeDefinitionNode)(u)||(0,pM.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 V5.GraphQLError(`The directive "@${p}" can only be used once at this location.`,{nodes:[l[p],d]})):l[p]=d)}}}}});var O0=V(b0=>{"use strict";m();T();h();Object.defineProperty(b0,"__esModule",{value:!0});b0.UniqueEnumValueNamesRule=K5;var fM=at(),q5=tn();function K5(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var o;let u=s.name.value;r[u]||(r[u]=Object.create(null));let l=(o=s.values)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let y=p.name.value,N=n[u];(0,q5.isEnumType)(N)&&N.getValue(y)?e.reportError(new fM.GraphQLError(`Enum value "${u}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[y]?e.reportError(new fM.GraphQLError(`Enum value "${u}.${y}" can only be defined once.`,{nodes:[d[y],p.name]})):d[y]=p.name}return!1}}});var A0=V(D0=>{"use strict";m();T();h();Object.defineProperty(D0,"__esModule",{value:!0});D0.UniqueFieldDefinitionNamesRule=G5;var mM=at(),S0=tn();function G5(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(s){var o;let u=s.name.value;r[u]||(r[u]=Object.create(null));let l=(o=s.fields)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let y=p.name.value;Q5(n[u],y)?e.reportError(new mM.GraphQLError(`Field "${u}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[y]?e.reportError(new mM.GraphQLError(`Field "${u}.${y}" can only be defined once.`,{nodes:[d[y],p.name]})):d[y]=p.name}return!1}}function Q5(e,t){return(0,S0.isObjectType)(e)||(0,S0.isInterfaceType)(e)||(0,S0.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var F0=V(R0=>{"use strict";m();T();h();Object.defineProperty(R0,"__esModule",{value:!0});R0.UniqueFragmentNamesRule=J5;var Y5=at();function J5(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new Y5.GraphQLError(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}});var L0=V(w0=>{"use strict";m();T();h();Object.defineProperty(w0,"__esModule",{value:!0});w0.UniqueInputFieldNamesRule=W5;var z5=ci(),H5=at();function W5(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||(0,z5.invariant)(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new H5.GraphQLError(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}});var k0=V(P0=>{"use strict";m();T();h();Object.defineProperty(P0,"__esModule",{value:!0});P0.UniqueOperationNamesRule=Z5;var X5=at();function Z5(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new X5.GraphQLError(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}});var C0=V(x0=>{"use strict";m();T();h();Object.defineProperty(x0,"__esModule",{value:!0});x0.UniqueOperationTypesRule=e9;var hM=at();function e9(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(s){var o;let u=(o=s.operationTypes)!==null&&o!==void 0?o:[];for(let l of u){let d=l.operation,p=n[d];r[d]?e.reportError(new hM.GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):p?e.reportError(new hM.GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[p,l]})):n[d]=l}return!1}}});var M0=V(U0=>{"use strict";m();T();h();Object.defineProperty(U0,"__esModule",{value:!0});U0.UniqueTypeNamesRule=t9;var TM=at();function t9(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 s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new TM.GraphQLError(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new TM.GraphQLError(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}});var V0=V(B0=>{"use strict";m();T();h();Object.defineProperty(B0,"__esModule",{value:!0});B0.UniqueVariableNamesRule=i9;var n9=oE(),r9=at();function i9(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=(0,n9.groupBy)(r,s=>s.variable.name.value);for(let[s,o]of i)o.length>1&&e.reportError(new r9.GraphQLError(`There can be only one variable named "$${s}".`,{nodes:o.map(u=>u.variable.name)}))}}}});var q0=V($0=>{"use strict";m();T();h();Object.defineProperty($0,"__esModule",{value:!0});$0.ValuesOfCorrectTypeRule=u9;var s9=mc(),Ih=En(),o9=hc(),a9=Tc(),zo=at(),j0=en(),aE=ds(),Jo=tn();function u9(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=(0,Jo.getNullableType)(e.getParentInputType());if(!(0,Jo.isListType)(r))return _l(e,n),!1},ObjectValue(n){let r=(0,Jo.getNamedType)(e.getInputType());if(!(0,Jo.isInputObjectType)(r))return _l(e,n),!1;let i=(0,o9.keyMap)(n.fields,s=>s.name.value);for(let s of Object.values(r.getFields()))if(!i[s.name]&&(0,Jo.isRequiredInputField)(s)){let u=(0,Ih.inspect)(s.type);e.reportError(new zo.GraphQLError(`Field "${r.name}.${s.name}" of required type "${u}" was not provided.`,{nodes:n}))}r.isOneOf&&c9(e,n,r,i,t)},ObjectField(n){let r=(0,Jo.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,Jo.isInputObjectType)(r)){let s=(0,a9.suggestionList)(n.name.value,Object.keys(r.getFields()));e.reportError(new zo.GraphQLError(`Field "${n.name.value}" is not defined by type "${r.name}".`+(0,s9.didYouMean)(s),{nodes:n}))}},NullValue(n){let r=e.getInputType();(0,Jo.isNonNullType)(r)&&e.reportError(new zo.GraphQLError(`Expected value of type "${(0,Ih.inspect)(r)}", found ${(0,aE.print)(n)}.`,{nodes:n}))},EnumValue:n=>_l(e,n),IntValue:n=>_l(e,n),FloatValue:n=>_l(e,n),StringValue:n=>_l(e,n),BooleanValue:n=>_l(e,n)}}function _l(e,t){let n=e.getInputType();if(!n)return;let r=(0,Jo.getNamedType)(n);if(!(0,Jo.isLeafType)(r)){let i=(0,Ih.inspect)(n);e.reportError(new zo.GraphQLError(`Expected value of type "${i}", found ${(0,aE.print)(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let s=(0,Ih.inspect)(n);e.reportError(new zo.GraphQLError(`Expected value of type "${s}", found ${(0,aE.print)(t)}.`,{nodes:t}))}}catch(i){let s=(0,Ih.inspect)(n);i instanceof zo.GraphQLError?e.reportError(i):e.reportError(new zo.GraphQLError(`Expected value of type "${s}", found ${(0,aE.print)(t)}; `+i.message,{nodes:t,originalError:i}))}}function c9(e,t,n,r,i){var s;let o=Object.keys(r);if(o.length!==1){e.reportError(new zo.GraphQLError(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let l=(s=r[o[0]])===null||s===void 0?void 0:s.value,d=!l||l.kind===j0.Kind.NULL,p=(l==null?void 0:l.kind)===j0.Kind.VARIABLE;if(d){e.reportError(new zo.GraphQLError(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(p){let y=l.name.value;i[y].type.kind!==j0.Kind.NON_NULL_TYPE&&e.reportError(new zo.GraphQLError(`Variable "${y}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}});var G0=V(K0=>{"use strict";m();T();h();Object.defineProperty(K0,"__esModule",{value:!0});K0.VariablesAreInputTypesRule=m9;var l9=at(),d9=ds(),p9=tn(),f9=Yo();function m9(e){return{VariableDefinition(t){let n=(0,f9.typeFromAST)(e.getSchema(),t.type);if(n!==void 0&&!(0,p9.isInputType)(n)){let r=t.variable.name.value,i=(0,d9.print)(t.type);e.reportError(new l9.GraphQLError(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}});var Y0=V(Q0=>{"use strict";m();T();h();Object.defineProperty(Q0,"__esModule",{value:!0});Q0.VariablesInAllowedPositionRule=N9;var yM=En(),h9=at(),T9=en(),NM=tn(),EM=th(),y9=Yo();function N9(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:s,defaultValue:o}of r){let u=i.name.value,l=t[u];if(l&&s){let d=e.getSchema(),p=(0,y9.typeFromAST)(d,l.type);if(p&&!E9(d,p,l.defaultValue,s,o)){let y=(0,yM.inspect)(p),N=(0,yM.inspect)(s);e.reportError(new h9.GraphQLError(`Variable "$${u}" of type "${y}" used in position expecting type "${N}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function E9(e,t,n,r,i){if((0,NM.isNonNullType)(r)&&!(0,NM.isNonNullType)(t)){if(!(n!=null&&n.kind!==T9.Kind.NULL)&&!(i!==void 0))return!1;let u=r.ofType;return(0,EM.isTypeSubTypeOf)(e,t,u)}return(0,EM.isTypeSubTypeOf)(e,t,r)}});var J0=V(Ec=>{"use strict";m();T();h();Object.defineProperty(Ec,"__esModule",{value:!0});Ec.specifiedSDLRules=Ec.specifiedRules=Ec.recommendedRules=void 0;var g9=dS(),I9=fS(),v9=hS(),gM=TS(),IM=gS(),_9=vS(),vM=OS(),b9=DS(),O9=RS(),S9=wS(),D9=PS(),A9=xS(),R9=US(),F9=BS(),w9=zS(),L9=XS(),P9=e0(),_M=n0(),k9=i0(),x9=f0(),C9=T0(),bM=N0(),U9=g0(),OM=_0(),M9=O0(),B9=A0(),V9=F0(),SM=L0(),j9=k0(),$9=C0(),q9=M0(),K9=V0(),G9=q0(),Q9=G0(),Y9=Y0(),DM=Object.freeze([S9.MaxIntrospectionDepthRule]);Ec.recommendedRules=DM;var J9=Object.freeze([g9.ExecutableDefinitionsRule,j9.UniqueOperationNamesRule,b9.LoneAnonymousOperationRule,x9.SingleFieldSubscriptionsRule,vM.KnownTypeNamesRule,v9.FragmentsOnCompositeTypesRule,Q9.VariablesAreInputTypesRule,k9.ScalarLeafsRule,I9.FieldsOnCorrectTypeRule,V9.UniqueFragmentNamesRule,_9.KnownFragmentNamesRule,R9.NoUnusedFragmentsRule,L9.PossibleFragmentSpreadsRule,D9.NoFragmentCyclesRule,K9.UniqueVariableNamesRule,A9.NoUndefinedVariablesRule,F9.NoUnusedVariablesRule,IM.KnownDirectivesRule,OM.UniqueDirectivesPerLocationRule,gM.KnownArgumentNamesRule,bM.UniqueArgumentNamesRule,G9.ValuesOfCorrectTypeRule,_M.ProvidedRequiredArgumentsRule,Y9.VariablesInAllowedPositionRule,w9.OverlappingFieldsCanBeMergedRule,SM.UniqueInputFieldNamesRule,...DM]);Ec.specifiedRules=J9;var z9=Object.freeze([O9.LoneSchemaDefinitionRule,$9.UniqueOperationTypesRule,q9.UniqueTypeNamesRule,M9.UniqueEnumValueNamesRule,B9.UniqueFieldDefinitionNamesRule,C9.UniqueArgumentDefinitionNamesRule,U9.UniqueDirectiveNamesRule,vM.KnownTypeNamesRule,IM.KnownDirectivesRule,OM.UniqueDirectivesPerLocationRule,P9.PossibleTypeExtensionsRule,gM.KnownArgumentNamesOnDirectivesRule,bM.UniqueArgumentNamesRule,SM.UniqueInputFieldNamesRule,_M.ProvidedRequiredArgumentsOnDirectivesRule]);Ec.specifiedSDLRules=z9});var W0=V(gc=>{"use strict";m();T();h();Object.defineProperty(gc,"__esModule",{value:!0});gc.ValidationContext=gc.SDLValidationContext=gc.ASTValidationContext=void 0;var AM=en(),H9=pl(),RM=JN(),vh=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===AM.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 s of i.selections)s.kind===AM.Kind.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.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],s;for(;s=i.pop();)for(let o of this.getFragmentSpreads(s)){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}};gc.ASTValidationContext=vh;var z0=class extends vh{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};gc.SDLValidationContext=z0;var H0=class extends vh{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 RM.TypeInfo(this._schema);(0,H9.visit)(t,(0,RM.visitWithTypeInfo)(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,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()}};gc.ValidationContext=H0});var lp=V(cp=>{"use strict";m();T();h();Object.defineProperty(cp,"__esModule",{value:!0});cp.assertValidSDL=t7;cp.assertValidSDLExtension=n7;cp.validate=e7;cp.validateSDL=X0;var W9=Oi(),X9=at(),uE=pl(),Z9=ph(),FM=JN(),wM=J0(),LM=W0();function e7(e,t,n=wM.specifiedRules,r,i=new FM.TypeInfo(e)){var s;let o=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||(0,W9.devAssert)(!1,"Must provide document."),(0,Z9.assertValidSchema)(e);let u=Object.freeze({}),l=[],d=new LM.ValidationContext(e,t,i,y=>{if(l.length>=o)throw l.push(new X9.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),u;l.push(y)}),p=(0,uE.visitInParallel)(n.map(y=>y(d)));try{(0,uE.visit)(t,(0,FM.visitWithTypeInfo)(i,p))}catch(y){if(y!==u)throw y}return l}function X0(e,t,n=wM.specifiedSDLRules){let r=[],i=new LM.SDLValidationContext(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return(0,uE.visit)(e,(0,uE.visitInParallel)(s)),r}function t7(e){let t=X0(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` +`))}var rS=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new _W.GraphQLError(t,{nodes:r}))}getErrors(){return this._errors}};function DW(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,ar.isObjectType)(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${(0,di.inspect)(n)}.`,(r=nS(t,tS.OperationTypeNode.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!(0,ar.isObjectType)(i)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,di.inspect)(i)}.`,(s=nS(t,tS.OperationTypeNode.MUTATION))!==null&&s!==void 0?s:i.astNode)}let o=t.getSubscriptionType();if(o&&!(0,ar.isObjectType)(o)){var u;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,di.inspect)(o)}.`,(u=nS(t,tS.OperationTypeNode.SUBSCRIPTION))!==null&&u!==void 0?u:o.astNode)}}function nS(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 AW(e){for(let n of e.schema.getDirectives()){if(!(0,dU.isDirective)(n)){e.reportError(`Expected directive but got: ${(0,di.inspect)(n)}.`,n==null?void 0:n.astNode);continue}gl(e,n);for(let r of n.args)if(gl(e,r),(0,ar.isInputType)(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${(0,di.inspect)(r.type)}.`,r.astNode),(0,ar.isRequiredArgument)(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[iS(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function gl(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function RW(e){let t=CW(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!(0,ar.isNamedType)(r)){e.reportError(`Expected GraphQL named type but got: ${(0,di.inspect)(r)}.`,r.astNode);continue}(0,bW.isIntrospectionType)(r)||gl(e,r),(0,ar.isObjectType)(r)||(0,ar.isInterfaceType)(r)?(uU(e,r),cU(e,r)):(0,ar.isUnionType)(r)?LW(e,r):(0,ar.isEnumType)(r)?PW(e,r):(0,ar.isInputObjectType)(r)&&(kW(e,r),t(r))}}function uU(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(gl(e,o),!(0,ar.isOutputType)(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${(0,di.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(gl(e,u),!(0,ar.isInputType)(u.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${(0,di.inspect)(u.type)}.`,(i=u.astNode)===null||i===void 0?void 0:i.type)}if((0,ar.isRequiredArgument)(u)&&u.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[iS(u.astNode),(s=u.astNode)===null||s===void 0?void 0:s.type])}}}}function cU(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!(0,ar.isInterfaceType)(r)){e.reportError(`Type ${(0,di.inspect)(t)} must only implement Interface types, it cannot implement ${(0,di.inspect)(r)}.`,dh(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,dh(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,dh(t,r));continue}n[r.name]=!0,wW(e,t,r),FW(e,t,r)}}function FW(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,aU.isTypeSubTypeOf)(e.schema,p.type,l.type)){var i,s;e.reportError(`Interface field ${n.name}.${d} expects type ${(0,di.inspect)(l.type)} but ${t.name}.${d} is type ${(0,di.inspect)(p.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(s=p.astNode)===null||s===void 0?void 0:s.type])}for(let y of l.args){let N=y.name,I=p.args.find(_=>_.name===N);if(!I){e.reportError(`Interface field argument ${n.name}.${d}(${N}:) expected but ${t.name}.${d} does not provide it.`,[y.astNode,p.astNode]);continue}if(!(0,aU.isEqualType)(y.type,I.type)){var o,u;e.reportError(`Interface field argument ${n.name}.${d}(${N}:) expects type ${(0,di.inspect)(y.type)} but ${t.name}.${d}(${N}:) is type ${(0,di.inspect)(I.type)}.`,[(o=y.astNode)===null||o===void 0?void 0:o.type,(u=I.astNode)===null||u===void 0?void 0:u.type])}}for(let y of p.args){let N=y.name;!l.args.find(_=>_.name===N)&&(0,ar.isRequiredArgument)(y)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${N} that is missing from the Interface field ${n.name}.${d}.`,[y.astNode,l.astNode])}}}function wW(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}.`,[...dh(n,i),...dh(t,n)])}function LW(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.`,lU(t,i.name));continue}r[i.name]=!0,(0,ar.isObjectType)(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,di.inspect)(i)}.`,lU(t,String(i)))}}function PW(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)gl(e,r)}function kW(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 s of n){if(gl(e,s),!(0,ar.isInputType)(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${(0,di.inspect)(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type)}if((0,ar.isRequiredInputField)(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[iS(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&xW(t,s,e)}}function xW(e,t,n){if((0,ar.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 CW(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(s){if(t[s.name])return;t[s.name]=!0,r[s.name]=n.length;let o=Object.values(s.getFields());for(let u of o)if((0,ar.isNonNullType)(u.type)&&(0,ar.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),y=p.map(N=>N.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${y}".`,p.map(N=>N.astNode))}n.pop()}r[s.name]=void 0}}function dh(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.interfaces)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t.name)}function lU(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.types)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t)}function iS(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===dU.GraphQLDeprecatedDirective.name)}});var Yo=V(aS=>{"use strict";m();T();h();Object.defineProperty(aS,"__esModule",{value:!0});aS.typeFromAST=oS;var sS=en(),fU=tn();function oS(e,t){switch(t.kind){case sS.Kind.LIST_TYPE:{let n=oS(e,t.type);return n&&new fU.GraphQLList(n)}case sS.Kind.NON_NULL_TYPE:{let n=oS(e,t.type);return n&&new fU.GraphQLNonNull(n)}case sS.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var JN=V(fh=>{"use strict";m();T();h();Object.defineProperty(fh,"__esModule",{value:!0});fh.TypeInfo=void 0;fh.visitWithTypeInfo=BW;var UW=qo(),ur=en(),mU=pl(),cr=tn(),rp=xs(),hU=Yo(),uS=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:MW,n&&((0,cr.isInputType)(n)&&this._inputTypeStack.push(n),(0,cr.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,cr.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 ur.Kind.SELECTION_SET:{let i=(0,cr.getNamedType)(this.getType());this._parentTypeStack.push((0,cr.isCompositeType)(i)?i:void 0);break}case ur.Kind.FIELD:{let i=this.getParentType(),s,o;i&&(s=this._getFieldDef(n,i,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push((0,cr.isOutputType)(o)?o:void 0);break}case ur.Kind.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case ur.Kind.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push((0,cr.isObjectType)(i)?i:void 0);break}case ur.Kind.INLINE_FRAGMENT:case ur.Kind.FRAGMENT_DEFINITION:{let i=t.typeCondition,s=i?(0,hU.typeFromAST)(n,i):(0,cr.getNamedType)(this.getType());this._typeStack.push((0,cr.isOutputType)(s)?s:void 0);break}case ur.Kind.VARIABLE_DEFINITION:{let i=(0,hU.typeFromAST)(n,t.type);this._inputTypeStack.push((0,cr.isInputType)(i)?i:void 0);break}case ur.Kind.ARGUMENT:{var r;let i,s,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(u=>u.name===t.name.value),i&&(s=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push((0,cr.isInputType)(s)?s:void 0);break}case ur.Kind.LIST:{let i=(0,cr.getNullableType)(this.getInputType()),s=(0,cr.isListType)(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,cr.isInputType)(s)?s:void 0);break}case ur.Kind.OBJECT_FIELD:{let i=(0,cr.getNamedType)(this.getInputType()),s,o;(0,cr.isInputObjectType)(i)&&(o=i.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,cr.isInputType)(s)?s:void 0);break}case ur.Kind.ENUM:{let i=(0,cr.getNamedType)(this.getInputType()),s;(0,cr.isEnumType)(i)&&(s=i.getValue(t.value)),this._enumValue=s;break}default:}}leave(t){switch(t.kind){case ur.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case ur.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case ur.Kind.DIRECTIVE:this._directive=null;break;case ur.Kind.OPERATION_DEFINITION:case ur.Kind.INLINE_FRAGMENT:case ur.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case ur.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case ur.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case ur.Kind.LIST:case ur.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case ur.Kind.ENUM:this._enumValue=null;break;default:}}};fh.TypeInfo=uS;function MW(e,t,n){let r=n.name.value;if(r===rp.SchemaMetaFieldDef.name&&e.getQueryType()===t)return rp.SchemaMetaFieldDef;if(r===rp.TypeMetaFieldDef.name&&e.getQueryType()===t)return rp.TypeMetaFieldDef;if(r===rp.TypeNameMetaFieldDef.name&&(0,cr.isCompositeType)(t))return rp.TypeNameMetaFieldDef;if((0,cr.isObjectType)(t)||(0,cr.isInterfaceType)(t))return t.getFields()[r]}function BW(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=(0,mU.getEnterLeaveForKind)(t,r.kind).enter;if(i){let s=i.apply(t,n);return s!==void 0&&(e.leave(r),(0,UW.isNode)(s)&&e.enter(s)),s}},leave(...n){let r=n[0],i=(0,mU.getEnterLeaveForKind)(t,r.kind).leave,s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}});var Il=V(Cs=>{"use strict";m();T();h();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.isConstValueNode=cS;Cs.isDefinitionNode=VW;Cs.isExecutableDefinitionNode=TU;Cs.isSelectionNode=jW;Cs.isTypeDefinitionNode=EU;Cs.isTypeExtensionNode=IU;Cs.isTypeNode=$W;Cs.isTypeSystemDefinitionNode=NU;Cs.isTypeSystemExtensionNode=gU;Cs.isValueNode=yU;var nn=en();function VW(e){return TU(e)||NU(e)||gU(e)}function TU(e){return e.kind===nn.Kind.OPERATION_DEFINITION||e.kind===nn.Kind.FRAGMENT_DEFINITION}function jW(e){return e.kind===nn.Kind.FIELD||e.kind===nn.Kind.FRAGMENT_SPREAD||e.kind===nn.Kind.INLINE_FRAGMENT}function yU(e){return e.kind===nn.Kind.VARIABLE||e.kind===nn.Kind.INT||e.kind===nn.Kind.FLOAT||e.kind===nn.Kind.STRING||e.kind===nn.Kind.BOOLEAN||e.kind===nn.Kind.NULL||e.kind===nn.Kind.ENUM||e.kind===nn.Kind.LIST||e.kind===nn.Kind.OBJECT}function cS(e){return yU(e)&&(e.kind===nn.Kind.LIST?e.values.some(cS):e.kind===nn.Kind.OBJECT?e.fields.some(t=>cS(t.value)):e.kind!==nn.Kind.VARIABLE)}function $W(e){return e.kind===nn.Kind.NAMED_TYPE||e.kind===nn.Kind.LIST_TYPE||e.kind===nn.Kind.NON_NULL_TYPE}function NU(e){return e.kind===nn.Kind.SCHEMA_DEFINITION||EU(e)||e.kind===nn.Kind.DIRECTIVE_DEFINITION}function EU(e){return e.kind===nn.Kind.SCALAR_TYPE_DEFINITION||e.kind===nn.Kind.OBJECT_TYPE_DEFINITION||e.kind===nn.Kind.INTERFACE_TYPE_DEFINITION||e.kind===nn.Kind.UNION_TYPE_DEFINITION||e.kind===nn.Kind.ENUM_TYPE_DEFINITION||e.kind===nn.Kind.INPUT_OBJECT_TYPE_DEFINITION}function gU(e){return e.kind===nn.Kind.SCHEMA_EXTENSION||IU(e)}function IU(e){return e.kind===nn.Kind.SCALAR_TYPE_EXTENSION||e.kind===nn.Kind.OBJECT_TYPE_EXTENSION||e.kind===nn.Kind.INTERFACE_TYPE_EXTENSION||e.kind===nn.Kind.UNION_TYPE_EXTENSION||e.kind===nn.Kind.ENUM_TYPE_EXTENSION||e.kind===nn.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var dS=V(lS=>{"use strict";m();T();h();Object.defineProperty(lS,"__esModule",{value:!0});lS.ExecutableDefinitionsRule=GW;var qW=at(),vU=en(),KW=Il();function GW(e){return{Document(t){for(let n of t.definitions)if(!(0,KW.isExecutableDefinitionNode)(n)){let r=n.kind===vU.Kind.SCHEMA_DEFINITION||n.kind===vU.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new qW.GraphQLError(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}});var fS=V(pS=>{"use strict";m();T();h();Object.defineProperty(pS,"__esModule",{value:!0});pS.FieldsOnCorrectTypeRule=zW;var _U=mc(),QW=Ym(),YW=Tc(),JW=at(),mh=tn();function zW(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),s=t.name.value,o=(0,_U.didYouMean)("to use an inline fragment on",HW(i,n,s));o===""&&(o=(0,_U.didYouMean)(WW(n,s))),e.reportError(new JW.GraphQLError(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}))}}}}function HW(e,t,n){if(!(0,mh.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 s;u.getFields()[n]&&(r.add(u),i[u.name]=((s=i[u.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((o,u)=>{let l=i[u.name]-i[o.name];return l!==0?l:(0,mh.isInterfaceType)(o)&&e.isSubType(o,u)?-1:(0,mh.isInterfaceType)(u)&&e.isSubType(u,o)?1:(0,QW.naturalCompare)(o.name,u.name)}).map(o=>o.name)}function WW(e,t){if((0,mh.isObjectType)(e)||(0,mh.isInterfaceType)(e)){let n=Object.keys(e.getFields());return(0,YW.suggestionList)(t,n)}return[]}});var hS=V(mS=>{"use strict";m();T();h();Object.defineProperty(mS,"__esModule",{value:!0});mS.FragmentsOnCompositeTypesRule=XW;var bU=at(),OU=ds(),SU=tn(),DU=Yo();function XW(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=(0,DU.typeFromAST)(e.getSchema(),n);if(r&&!(0,SU.isCompositeType)(r)){let i=(0,OU.print)(n);e.reportError(new bU.GraphQLError(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=(0,DU.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,SU.isCompositeType)(n)){let r=(0,OU.print)(t.typeCondition);e.reportError(new bU.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}});var TS=V(zN=>{"use strict";m();T();h();Object.defineProperty(zN,"__esModule",{value:!0});zN.KnownArgumentNamesOnDirectivesRule=wU;zN.KnownArgumentNamesRule=tX;var AU=mc(),RU=Tc(),FU=at(),ZW=en(),eX=ji();function tX(e){return K(k({},wU(e)),{Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let s=t.name.value,o=r.args.map(l=>l.name),u=(0,RU.suggestionList)(s,o);e.reportError(new FU.GraphQLError(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+(0,AU.didYouMean)(u),{nodes:t}))}}})}function wU(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():eX.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===ZW.Kind.DIRECTIVE_DEFINITION){var s;let u=(s=o.arguments)!==null&&s!==void 0?s:[];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 y=(0,RU.suggestionList)(p,l);e.reportError(new FU.GraphQLError(`Unknown argument "${p}" on directive "@${u}".`+(0,AU.didYouMean)(y),{nodes:d}))}}return!1}}}});var gS=V(ES=>{"use strict";m();T();h();Object.defineProperty(ES,"__esModule",{value:!0});ES.KnownDirectivesRule=iX;var nX=En(),yS=ci(),LU=at(),NS=qo(),Pr=tp(),jn=en(),rX=ji();function iX(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():rX.specifiedDirectives;for(let s of r)t[s.name]=s.locations;let i=e.getDocument().definitions;for(let s of i)s.kind===jn.Kind.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return{Directive(s,o,u,l,d){let p=s.name.value,y=t[p];if(!y){e.reportError(new LU.GraphQLError(`Unknown directive "@${p}".`,{nodes:s}));return}let N=sX(d);N&&!y.includes(N)&&e.reportError(new LU.GraphQLError(`Directive "@${p}" may not be used on ${N}.`,{nodes:s}))}}}function sX(e){let t=e[e.length-1];switch("kind"in t||(0,yS.invariant)(!1),t.kind){case jn.Kind.OPERATION_DEFINITION:return oX(t.operation);case jn.Kind.FIELD:return Pr.DirectiveLocation.FIELD;case jn.Kind.FRAGMENT_SPREAD:return Pr.DirectiveLocation.FRAGMENT_SPREAD;case jn.Kind.INLINE_FRAGMENT:return Pr.DirectiveLocation.INLINE_FRAGMENT;case jn.Kind.FRAGMENT_DEFINITION:return Pr.DirectiveLocation.FRAGMENT_DEFINITION;case jn.Kind.VARIABLE_DEFINITION:return Pr.DirectiveLocation.VARIABLE_DEFINITION;case jn.Kind.SCHEMA_DEFINITION:case jn.Kind.SCHEMA_EXTENSION:return Pr.DirectiveLocation.SCHEMA;case jn.Kind.SCALAR_TYPE_DEFINITION:case jn.Kind.SCALAR_TYPE_EXTENSION:return Pr.DirectiveLocation.SCALAR;case jn.Kind.OBJECT_TYPE_DEFINITION:case jn.Kind.OBJECT_TYPE_EXTENSION:return Pr.DirectiveLocation.OBJECT;case jn.Kind.FIELD_DEFINITION:return Pr.DirectiveLocation.FIELD_DEFINITION;case jn.Kind.INTERFACE_TYPE_DEFINITION:case jn.Kind.INTERFACE_TYPE_EXTENSION:return Pr.DirectiveLocation.INTERFACE;case jn.Kind.UNION_TYPE_DEFINITION:case jn.Kind.UNION_TYPE_EXTENSION:return Pr.DirectiveLocation.UNION;case jn.Kind.ENUM_TYPE_DEFINITION:case jn.Kind.ENUM_TYPE_EXTENSION:return Pr.DirectiveLocation.ENUM;case jn.Kind.ENUM_VALUE_DEFINITION:return Pr.DirectiveLocation.ENUM_VALUE;case jn.Kind.INPUT_OBJECT_TYPE_DEFINITION:case jn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return Pr.DirectiveLocation.INPUT_OBJECT;case jn.Kind.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||(0,yS.invariant)(!1),n.kind===jn.Kind.INPUT_OBJECT_TYPE_DEFINITION?Pr.DirectiveLocation.INPUT_FIELD_DEFINITION:Pr.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,yS.invariant)(!1,"Unexpected kind: "+(0,nX.inspect)(t.kind))}}function oX(e){switch(e){case NS.OperationTypeNode.QUERY:return Pr.DirectiveLocation.QUERY;case NS.OperationTypeNode.MUTATION:return Pr.DirectiveLocation.MUTATION;case NS.OperationTypeNode.SUBSCRIPTION:return Pr.DirectiveLocation.SUBSCRIPTION}}});var vS=V(IS=>{"use strict";m();T();h();Object.defineProperty(IS,"__esModule",{value:!0});IS.KnownFragmentNamesRule=uX;var aX=at();function uX(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new aX.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}});var OS=V(bS=>{"use strict";m();T();h();Object.defineProperty(bS,"__esModule",{value:!0});bS.KnownTypeNamesRule=mX;var cX=mc(),lX=Tc(),dX=at(),_S=Il(),pX=xs(),fX=Qo();function mX(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let s of e.getDocument().definitions)(0,_S.isTypeDefinitionNode)(s)&&(r[s.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,o,u,l,d){let p=s.name.value;if(!n[p]&&!r[p]){var y;let N=(y=d[2])!==null&&y!==void 0?y:u,I=N!=null&&hX(N);if(I&&PU.includes(p))return;let _=(0,lX.suggestionList)(p,I?PU.concat(i):i);e.reportError(new dX.GraphQLError(`Unknown type "${p}".`+(0,cX.didYouMean)(_),{nodes:s}))}}}}var PU=[...fX.specifiedScalarTypes,...pX.introspectionTypes].map(e=>e.name);function hX(e){return"kind"in e&&((0,_S.isTypeSystemDefinitionNode)(e)||(0,_S.isTypeSystemExtensionNode)(e))}});var DS=V(SS=>{"use strict";m();T();h();Object.defineProperty(SS,"__esModule",{value:!0});SS.LoneAnonymousOperationRule=NX;var TX=at(),yX=en();function NX(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===yX.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new TX.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}});var RS=V(AS=>{"use strict";m();T();h();Object.defineProperty(AS,"__esModule",{value:!0});AS.LoneSchemaDefinitionRule=EX;var kU=at();function EX(e){var t,n,r;let i=e.getSchema(),s=(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(s){e.reportError(new kU.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:u}));return}o>0&&e.reportError(new kU.GraphQLError("Must provide only one schema definition.",{nodes:u})),++o}}}});var wS=V(FS=>{"use strict";m();T();h();Object.defineProperty(FS,"__esModule",{value:!0});FS.MaxIntrospectionDepthRule=vX;var gX=at(),xU=en(),IX=3;function vX(e){function t(n,r=Object.create(null),i=0){if(n.kind===xU.Kind.FRAGMENT_SPREAD){let s=n.name.value;if(r[s]===!0)return!1;let o=e.getFragment(s);if(!o)return!1;try{return r[s]=!0,t(o,r,i)}finally{r[s]=void 0}}if(n.kind===xU.Kind.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=IX))return!0;if("selectionSet"in n&&n.selectionSet){for(let s of n.selectionSet.selections)if(t(s,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new gX.GraphQLError("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}});var PS=V(LS=>{"use strict";m();T();h();Object.defineProperty(LS,"__esModule",{value:!0});LS.NoFragmentCyclesRule=bX;var _X=at();function bX(e){let t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;let o=s.name.value;t[o]=!0;let u=e.getFragmentSpreads(s.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 y=e.getFragment(d);y&&i(y)}else{let y=n.slice(p),N=y.slice(0,-1).map(I=>'"'+I.name.value+'"').join(", ");e.reportError(new _X.GraphQLError(`Cannot spread fragment "${d}" within itself`+(N!==""?` via ${N}.`:"."),{nodes:y}))}n.pop()}r[o]=void 0}}}});var xS=V(kS=>{"use strict";m();T();h();Object.defineProperty(kS,"__esModule",{value:!0});kS.NoUndefinedVariablesRule=SX;var OX=at();function SX(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 s=i.name.value;t[s]!==!0&&e.reportError(new OX.GraphQLError(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}});var US=V(CS=>{"use strict";m();T();h();Object.defineProperty(CS,"__esModule",{value:!0});CS.NoUnusedFragmentsRule=AX;var DX=at();function AX(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 s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(let i of n){let s=i.name.value;r[s]!==!0&&e.reportError(new DX.GraphQLError(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}});var BS=V(MS=>{"use strict";m();T();h();Object.defineProperty(MS,"__esModule",{value:!0});MS.NoUnusedVariablesRule=FX;var RX=at();function FX(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:s}of i)r[s.name.value]=!0;for(let s of t){let o=s.variable.name.value;r[o]!==!0&&e.reportError(new RX.GraphQLError(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}});var $S=V(jS=>{"use strict";m();T();h();Object.defineProperty(jS,"__esModule",{value:!0});jS.sortValueNode=VS;var wX=Ym(),Ma=en();function VS(e){switch(e.kind){case Ma.Kind.OBJECT:return K(k({},e),{fields:LX(e.fields)});case Ma.Kind.LIST:return K(k({},e),{values:e.values.map(VS)});case Ma.Kind.INT:case Ma.Kind.FLOAT:case Ma.Kind.STRING:case Ma.Kind.BOOLEAN:case Ma.Kind.NULL:case Ma.Kind.ENUM:case Ma.Kind.VARIABLE:return e}}function LX(e){return e.map(t=>K(k({},t),{value:VS(t.value)})).sort((t,n)=>(0,wX.naturalCompare)(t.name.value,n.name.value))}});var zS=V(JS=>{"use strict";m();T();h();Object.defineProperty(JS,"__esModule",{value:!0});JS.OverlappingFieldsCanBeMergedRule=CX;var CU=En(),PX=at(),qS=en(),kX=ds(),$i=tn(),xX=$S(),MU=Yo();function BU(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+BU(n)).join(" and "):e}function CX(e){let t=new QS,n=new Map;return{SelectionSet(r){let i=UX(e,n,t,e.getParentType(),r);for(let[[s,o],u,l]of i){let d=BU(o);e.reportError(new PX.GraphQLError(`Fields "${s}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:u.concat(l)}))}}}}function UX(e,t,n,r,i){let s=[],[o,u]=XN(e,t,r,i);if(BX(e,s,t,n,o),u.length!==0)for(let l=0;l1)for(let u=0;u[s.value,o]));return n.every(s=>{let o=s.value,u=i.get(s.name.value);return u===void 0?!1:UU(o)===UU(u)})}function UU(e){return(0,kX.print)((0,xX.sortValueNode)(e))}function KS(e,t){return(0,$i.isListType)(e)?(0,$i.isListType)(t)?KS(e.ofType,t.ofType):!0:(0,$i.isListType)(t)?!0:(0,$i.isNonNullType)(e)?(0,$i.isNonNullType)(t)?KS(e.ofType,t.ofType):!0:(0,$i.isNonNullType)(t)?!0:(0,$i.isLeafType)(e)||(0,$i.isLeafType)(t)?e!==t:!1}function XN(e,t,n,r){let i=t.get(r);if(i)return i;let s=Object.create(null),o=Object.create(null);jU(e,n,r,s,o);let u=[s,Object.keys(o)];return t.set(r,u),u}function GS(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=(0,MU.typeFromAST)(e.getSchema(),n.typeCondition);return XN(e,t,i,n.selectionSet)}function jU(e,t,n,r,i){for(let s of n.selections)switch(s.kind){case qS.Kind.FIELD:{let o=s.name.value,u;((0,$i.isObjectType)(t)||(0,$i.isInterfaceType)(t))&&(u=t.getFields()[o]);let l=s.alias?s.alias.value:o;r[l]||(r[l]=[]),r[l].push([t,s,u]);break}case qS.Kind.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case qS.Kind.INLINE_FRAGMENT:{let o=s.typeCondition,u=o?(0,MU.typeFromAST)(e.getSchema(),o):t;jU(e,u,s.selectionSet,r,i);break}}}function jX(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 QS=class{constructor(){this._data=new Map}has(t,n,r){var i;let[s,o]=t{"use strict";m();T();h();Object.defineProperty(WS,"__esModule",{value:!0});WS.PossibleFragmentSpreadsRule=qX;var ZN=En(),$U=at(),HS=tn(),qU=th(),$X=Yo();function qX(e){return{InlineFragment(t){let n=e.getType(),r=e.getParentType();if((0,HS.isCompositeType)(n)&&(0,HS.isCompositeType)(r)&&!(0,qU.doTypesOverlap)(e.getSchema(),n,r)){let i=(0,ZN.inspect)(r),s=(0,ZN.inspect)(n);e.reportError(new $U.GraphQLError(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${s}".`,{nodes:t}))}},FragmentSpread(t){let n=t.name.value,r=KX(e,n),i=e.getParentType();if(r&&i&&!(0,qU.doTypesOverlap)(e.getSchema(),r,i)){let s=(0,ZN.inspect)(i),o=(0,ZN.inspect)(r);e.reportError(new $U.GraphQLError(`Fragment "${n}" cannot be spread here as objects of type "${s}" can never be of type "${o}".`,{nodes:t}))}}}}function KX(e,t){let n=e.getFragment(t);if(n){let r=(0,$X.typeFromAST)(e.getSchema(),n.typeCondition);if((0,HS.isCompositeType)(r))return r}}});var e0=V(ZS=>{"use strict";m();T();h();Object.defineProperty(ZS,"__esModule",{value:!0});ZS.PossibleTypeExtensionsRule=JX;var GX=mc(),GU=En(),QU=ci(),QX=Tc(),KU=at(),zn=en(),YX=Il(),ip=tn();function JX(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)(0,YX.isTypeDefinitionNode)(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){let s=i.name.value,o=n[s],u=t==null?void 0:t.getType(s),l;if(o?l=zX[o.kind]:u&&(l=HX(u)),l){if(l!==i.kind){let d=WX(i.kind);e.reportError(new KU.GraphQLError(`Cannot extend non-${d} type "${s}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(k(k({},n),t==null?void 0:t.getTypeMap())),p=(0,QX.suggestionList)(s,d);e.reportError(new KU.GraphQLError(`Cannot extend type "${s}" because it is not defined.`+(0,GX.didYouMean)(p),{nodes:i.name}))}}}var zX={[zn.Kind.SCALAR_TYPE_DEFINITION]:zn.Kind.SCALAR_TYPE_EXTENSION,[zn.Kind.OBJECT_TYPE_DEFINITION]:zn.Kind.OBJECT_TYPE_EXTENSION,[zn.Kind.INTERFACE_TYPE_DEFINITION]:zn.Kind.INTERFACE_TYPE_EXTENSION,[zn.Kind.UNION_TYPE_DEFINITION]:zn.Kind.UNION_TYPE_EXTENSION,[zn.Kind.ENUM_TYPE_DEFINITION]:zn.Kind.ENUM_TYPE_EXTENSION,[zn.Kind.INPUT_OBJECT_TYPE_DEFINITION]:zn.Kind.INPUT_OBJECT_TYPE_EXTENSION};function HX(e){if((0,ip.isScalarType)(e))return zn.Kind.SCALAR_TYPE_EXTENSION;if((0,ip.isObjectType)(e))return zn.Kind.OBJECT_TYPE_EXTENSION;if((0,ip.isInterfaceType)(e))return zn.Kind.INTERFACE_TYPE_EXTENSION;if((0,ip.isUnionType)(e))return zn.Kind.UNION_TYPE_EXTENSION;if((0,ip.isEnumType)(e))return zn.Kind.ENUM_TYPE_EXTENSION;if((0,ip.isInputObjectType)(e))return zn.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,QU.invariant)(!1,"Unexpected type: "+(0,GU.inspect)(e))}function WX(e){switch(e){case zn.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case zn.Kind.OBJECT_TYPE_EXTENSION:return"object";case zn.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case zn.Kind.UNION_TYPE_EXTENSION:return"union";case zn.Kind.ENUM_TYPE_EXTENSION:return"enum";case zn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,QU.invariant)(!1,"Unexpected kind: "+(0,GU.inspect)(e))}}});var n0=V(eE=>{"use strict";m();T();h();Object.defineProperty(eE,"__esModule",{value:!0});eE.ProvidedRequiredArgumentsOnDirectivesRule=WU;eE.ProvidedRequiredArgumentsRule=e5;var JU=En(),YU=hc(),zU=at(),HU=en(),XX=ds(),t0=tn(),ZX=ji();function e5(e){return K(k({},WU(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(s=>s.name.value));for(let s of r.args)if(!i.has(s.name)&&(0,t0.isRequiredArgument)(s)){let o=(0,JU.inspect)(s.type);e.reportError(new zU.GraphQLError(`Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function WU(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:ZX.specifiedDirectives;for(let u of i)n[u.name]=(0,YU.keyMap)(u.args.filter(t0.isRequiredArgument),l=>l.name);let s=e.getDocument().definitions;for(let u of s)if(u.kind===HU.Kind.DIRECTIVE_DEFINITION){var o;let l=(o=u.arguments)!==null&&o!==void 0?o:[];n[u.name.value]=(0,YU.keyMap)(l.filter(t5),d=>d.name.value)}return{Directive:{leave(u){let l=u.name.value,d=n[l];if(d){var p;let y=(p=u.arguments)!==null&&p!==void 0?p:[],N=new Set(y.map(I=>I.name.value));for(let[I,_]of Object.entries(d))if(!N.has(I)){let C=(0,t0.isType)(_.type)?(0,JU.inspect)(_.type):(0,XX.print)(_.type);e.reportError(new zU.GraphQLError(`Directive "@${l}" argument "${I}" of type "${C}" is required, but it was not provided.`,{nodes:u}))}}}}}}function t5(e){return e.type.kind===HU.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var i0=V(r0=>{"use strict";m();T();h();Object.defineProperty(r0,"__esModule",{value:!0});r0.ScalarLeafsRule=n5;var XU=En(),ZU=at(),eM=tn();function n5(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if((0,eM.isLeafType)((0,eM.getNamedType)(n))){if(r){let i=t.name.value,s=(0,XU.inspect)(n);e.reportError(new ZU.GraphQLError(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){let i=t.name.value,s=(0,XU.inspect)(n);e.reportError(new ZU.GraphQLError(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}});var o0=V(s0=>{"use strict";m();T();h();Object.defineProperty(s0,"__esModule",{value:!0});s0.printPathArray=r5;function r5(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var hh=V(tE=>{"use strict";m();T();h();Object.defineProperty(tE,"__esModule",{value:!0});tE.addPath=i5;tE.pathToArray=s5;function i5(e,t,n){return{prev:e,key:t,typename:n}}function s5(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}});var u0=V(a0=>{"use strict";m();T();h();Object.defineProperty(a0,"__esModule",{value:!0});a0.coerceInputValue=p5;var o5=mc(),nE=En(),a5=ci(),u5=KN(),c5=$o(),ho=hh(),l5=o0(),d5=Tc(),Ba=at(),Th=tn();function p5(e,t,n=f5){return yh(e,t,n,void 0)}function f5(e,t,n){let r="Invalid value "+(0,nE.inspect)(t);throw e.length>0&&(r+=` at "value${(0,l5.printPathArray)(e)}"`),n.message=r+": "+n.message,n}function yh(e,t,n,r){if((0,Th.isNonNullType)(t)){if(e!=null)return yh(e,t.ofType,n,r);n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Expected non-nullable type "${(0,nE.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,Th.isListType)(t)){let i=t.ofType;return(0,u5.isIterableObject)(e)?Array.from(e,(s,o)=>{let u=(0,ho.addPath)(r,o,void 0);return yh(s,i,n,u)}):[yh(e,i,n,r)]}if((0,Th.isInputObjectType)(t)){if(!(0,c5.isObjectLike)(e)){n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Expected type "${t.name}" to be an object.`));return}let i={},s=t.getFields();for(let o of Object.values(s)){let u=e[o.name];if(u===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if((0,Th.isNonNullType)(o.type)){let l=(0,nE.inspect)(o.type);n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=yh(u,o.type,n,(0,ho.addPath)(r,o.name,t.name))}for(let o of Object.keys(e))if(!s[o]){let u=(0,d5.suggestionList)(o,Object.keys(t.getFields()));n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Field "${o}" is not defined by type "${t.name}".`+(0,o5.didYouMean)(u)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let u=o[0],l=i[u];l===null&&n((0,ho.pathToArray)(r).concat(u),l,new Ba.GraphQLError(`Field "${u}" must be non-null.`))}return i}if((0,Th.isLeafType)(t)){let i;try{i=t.parseValue(e)}catch(s){s instanceof Ba.GraphQLError?n((0,ho.pathToArray)(r),e,s):n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return i===void 0&&n((0,ho.pathToArray)(r),e,new Ba.GraphQLError(`Expected type "${t.name}".`)),i}(0,a5.invariant)(!1,"Unexpected input type: "+(0,nE.inspect)(t))}});var Eh=V(c0=>{"use strict";m();T();h();Object.defineProperty(c0,"__esModule",{value:!0});c0.valueFromAST=Nh;var m5=En(),h5=ci(),T5=hc(),sp=en(),vl=tn();function Nh(e,t,n){if(e){if(e.kind===sp.Kind.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&(0,vl.isNonNullType)(t)?void 0:i}if((0,vl.isNonNullType)(t))return e.kind===sp.Kind.NULL?void 0:Nh(e,t.ofType,n);if(e.kind===sp.Kind.NULL)return null;if((0,vl.isListType)(t)){let r=t.ofType;if(e.kind===sp.Kind.LIST){let s=[];for(let o of e.values)if(tM(o,n)){if((0,vl.isNonNullType)(r))return;s.push(null)}else{let u=Nh(o,r,n);if(u===void 0)return;s.push(u)}return s}let i=Nh(e,r,n);return i===void 0?void 0:[i]}if((0,vl.isInputObjectType)(t)){if(e.kind!==sp.Kind.OBJECT)return;let r=Object.create(null),i=(0,T5.keyMap)(e.fields,s=>s.name.value);for(let s of Object.values(t.getFields())){let o=i[s.name];if(!o||tM(o.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if((0,vl.isNonNullType)(s.type))return;continue}let u=Nh(o.value,s.type,n);if(u===void 0)return;r[s.name]=u}if(t.isOneOf){let s=Object.keys(r);if(s.length!==1||r[s[0]]===null)return}return r}if((0,vl.isLeafType)(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}(0,h5.invariant)(!1,"Unexpected input type: "+(0,m5.inspect)(t))}}function tM(e,t){return e.kind===sp.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var up=V(gh=>{"use strict";m();T();h();Object.defineProperty(gh,"__esModule",{value:!0});gh.getArgumentValues=sM;gh.getDirectiveValues=_5;gh.getVariableValues=I5;var op=En(),y5=hc(),N5=o0(),Va=at(),nM=en(),rM=ds(),ap=tn(),E5=u0(),g5=Yo(),iM=Eh();function I5(e,t,n,r){let i=[],s=r==null?void 0:r.maxErrors;try{let o=v5(e,t,n,u=>{if(s!=null&&i.length>=s)throw new Va.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 v5(e,t,n,r){let i={};for(let s of t){let o=s.variable.name.value,u=(0,g5.typeFromAST)(e,s.type);if(!(0,ap.isInputType)(u)){let d=(0,rM.print)(s.type);r(new Va.GraphQLError(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:s.type}));continue}if(!oM(n,o)){if(s.defaultValue)i[o]=(0,iM.valueFromAST)(s.defaultValue,u);else if((0,ap.isNonNullType)(u)){let d=(0,op.inspect)(u);r(new Va.GraphQLError(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:s}))}continue}let l=n[o];if(l===null&&(0,ap.isNonNullType)(u)){let d=(0,op.inspect)(u);r(new Va.GraphQLError(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:s}));continue}i[o]=(0,E5.coerceInputValue)(l,u,(d,p,y)=>{let N=`Variable "$${o}" got invalid value `+(0,op.inspect)(p);d.length>0&&(N+=` at "${o}${(0,N5.printPathArray)(d)}"`),r(new Va.GraphQLError(N+"; "+y.message,{nodes:s,originalError:y}))})}return i}function sM(e,t,n){var r;let i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],o=(0,y5.keyMap)(s,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,ap.isNonNullType)(d))throw new Va.GraphQLError(`Argument "${l}" of required type "${(0,op.inspect)(d)}" was not provided.`,{nodes:t});continue}let y=p.value,N=y.kind===nM.Kind.NULL;if(y.kind===nM.Kind.VARIABLE){let _=y.name.value;if(n==null||!oM(n,_)){if(u.defaultValue!==void 0)i[l]=u.defaultValue;else if((0,ap.isNonNullType)(d))throw new Va.GraphQLError(`Argument "${l}" of required type "${(0,op.inspect)(d)}" was provided the variable "$${_}" which was not provided a runtime value.`,{nodes:y});continue}N=n[_]==null}if(N&&(0,ap.isNonNullType)(d))throw new Va.GraphQLError(`Argument "${l}" of non-null type "${(0,op.inspect)(d)}" must not be null.`,{nodes:y});let I=(0,iM.valueFromAST)(y,d,n);if(I===void 0)throw new Va.GraphQLError(`Argument "${l}" has invalid value ${(0,rM.print)(y)}.`,{nodes:y});i[l]=I}return i}function _5(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return sM(e,i,n)}function oM(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var sE=V(iE=>{"use strict";m();T();h();Object.defineProperty(iE,"__esModule",{value:!0});iE.collectFields=S5;iE.collectSubfields=D5;var l0=en(),b5=tn(),aM=ji(),O5=Yo(),uM=up();function S5(e,t,n,r,i){let s=new Map;return rE(e,t,n,r,i,s,new Set),s}function D5(e,t,n,r,i){let s=new Map,o=new Set;for(let u of i)u.selectionSet&&rE(e,t,n,r,u.selectionSet,s,o);return s}function rE(e,t,n,r,i,s,o){for(let u of i.selections)switch(u.kind){case l0.Kind.FIELD:{if(!d0(n,u))continue;let l=A5(u),d=s.get(l);d!==void 0?d.push(u):s.set(l,[u]);break}case l0.Kind.INLINE_FRAGMENT:{if(!d0(n,u)||!cM(e,u,r))continue;rE(e,t,n,r,u.selectionSet,s,o);break}case l0.Kind.FRAGMENT_SPREAD:{let l=u.name.value;if(o.has(l)||!d0(n,u))continue;o.add(l);let d=t[l];if(!d||!cM(e,d,r))continue;rE(e,t,n,r,d.selectionSet,s,o);break}}}function d0(e,t){let n=(0,uM.getDirectiveValues)(aM.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,uM.getDirectiveValues)(aM.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function cM(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,O5.typeFromAST)(e,r);return i===n?!0:(0,b5.isAbstractType)(i)?e.isSubType(i,n):!1}function A5(e){return e.alias?e.alias.value:e.name.value}});var f0=V(p0=>{"use strict";m();T();h();Object.defineProperty(p0,"__esModule",{value:!0});p0.SingleFieldSubscriptionsRule=w5;var lM=at(),R5=en(),F5=sE();function w5(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,s=Object.create(null),o=e.getDocument(),u=Object.create(null);for(let d of o.definitions)d.kind===R5.Kind.FRAGMENT_DEFINITION&&(u[d.name.value]=d);let l=(0,F5.collectFields)(n,u,s,r,t.selectionSet);if(l.size>1){let y=[...l.values()].slice(1).flat();e.reportError(new lM.GraphQLError(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:y}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new lM.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 oE=V(m0=>{"use strict";m();T();h();Object.defineProperty(m0,"__esModule",{value:!0});m0.groupBy=L5;function L5(e,t){let n=new Map;for(let r of e){let i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}});var T0=V(h0=>{"use strict";m();T();h();Object.defineProperty(h0,"__esModule",{value:!0});h0.UniqueArgumentDefinitionNamesRule=x5;var P5=oE(),k5=at();function x5(e){return{DirectiveDefinition(r){var i;let s=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,s)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;let s=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(`${s}.${d}`,p)}return!1}function n(r,i){let s=(0,P5.groupBy)(i,o=>o.name.value);for(let[o,u]of s)u.length>1&&e.reportError(new k5.GraphQLError(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:u.map(l=>l.name)}));return!1}}});var N0=V(y0=>{"use strict";m();T();h();Object.defineProperty(y0,"__esModule",{value:!0});y0.UniqueArgumentNamesRule=M5;var C5=oE(),U5=at();function M5(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],s=(0,C5.groupBy)(i,o=>o.name.value);for(let[o,u]of s)u.length>1&&e.reportError(new U5.GraphQLError(`There can be only one argument named "${o}".`,{nodes:u.map(l=>l.name)}))}}});var g0=V(E0=>{"use strict";m();T();h();Object.defineProperty(E0,"__esModule",{value:!0});E0.UniqueDirectiveNamesRule=B5;var dM=at();function B5(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 dM.GraphQLError(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new dM.GraphQLError(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}});var _0=V(v0=>{"use strict";m();T();h();Object.defineProperty(v0,"__esModule",{value:!0});v0.UniqueDirectivesPerLocationRule=$5;var V5=at(),I0=en(),pM=Il(),j5=ji();function $5(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():j5.specifiedDirectives;for(let u of r)t[u.name]=!u.isRepeatable;let i=e.getDocument().definitions;for(let u of i)u.kind===I0.Kind.DIRECTIVE_DEFINITION&&(t[u.name.value]=!u.repeatable);let s=Object.create(null),o=Object.create(null);return{enter(u){if(!("directives"in u)||!u.directives)return;let l;if(u.kind===I0.Kind.SCHEMA_DEFINITION||u.kind===I0.Kind.SCHEMA_EXTENSION)l=s;else if((0,pM.isTypeDefinitionNode)(u)||(0,pM.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 V5.GraphQLError(`The directive "@${p}" can only be used once at this location.`,{nodes:[l[p],d]})):l[p]=d)}}}}});var O0=V(b0=>{"use strict";m();T();h();Object.defineProperty(b0,"__esModule",{value:!0});b0.UniqueEnumValueNamesRule=K5;var fM=at(),q5=tn();function K5(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var o;let u=s.name.value;r[u]||(r[u]=Object.create(null));let l=(o=s.values)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let y=p.name.value,N=n[u];(0,q5.isEnumType)(N)&&N.getValue(y)?e.reportError(new fM.GraphQLError(`Enum value "${u}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[y]?e.reportError(new fM.GraphQLError(`Enum value "${u}.${y}" can only be defined once.`,{nodes:[d[y],p.name]})):d[y]=p.name}return!1}}});var A0=V(D0=>{"use strict";m();T();h();Object.defineProperty(D0,"__esModule",{value:!0});D0.UniqueFieldDefinitionNamesRule=G5;var mM=at(),S0=tn();function G5(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(s){var o;let u=s.name.value;r[u]||(r[u]=Object.create(null));let l=(o=s.fields)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let y=p.name.value;Q5(n[u],y)?e.reportError(new mM.GraphQLError(`Field "${u}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[y]?e.reportError(new mM.GraphQLError(`Field "${u}.${y}" can only be defined once.`,{nodes:[d[y],p.name]})):d[y]=p.name}return!1}}function Q5(e,t){return(0,S0.isObjectType)(e)||(0,S0.isInterfaceType)(e)||(0,S0.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var F0=V(R0=>{"use strict";m();T();h();Object.defineProperty(R0,"__esModule",{value:!0});R0.UniqueFragmentNamesRule=J5;var Y5=at();function J5(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new Y5.GraphQLError(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}});var L0=V(w0=>{"use strict";m();T();h();Object.defineProperty(w0,"__esModule",{value:!0});w0.UniqueInputFieldNamesRule=W5;var z5=ci(),H5=at();function W5(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||(0,z5.invariant)(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new H5.GraphQLError(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}});var k0=V(P0=>{"use strict";m();T();h();Object.defineProperty(P0,"__esModule",{value:!0});P0.UniqueOperationNamesRule=Z5;var X5=at();function Z5(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new X5.GraphQLError(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}});var C0=V(x0=>{"use strict";m();T();h();Object.defineProperty(x0,"__esModule",{value:!0});x0.UniqueOperationTypesRule=e9;var hM=at();function e9(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(s){var o;let u=(o=s.operationTypes)!==null&&o!==void 0?o:[];for(let l of u){let d=l.operation,p=n[d];r[d]?e.reportError(new hM.GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):p?e.reportError(new hM.GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[p,l]})):n[d]=l}return!1}}});var M0=V(U0=>{"use strict";m();T();h();Object.defineProperty(U0,"__esModule",{value:!0});U0.UniqueTypeNamesRule=t9;var TM=at();function t9(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 s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new TM.GraphQLError(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new TM.GraphQLError(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}});var V0=V(B0=>{"use strict";m();T();h();Object.defineProperty(B0,"__esModule",{value:!0});B0.UniqueVariableNamesRule=i9;var n9=oE(),r9=at();function i9(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=(0,n9.groupBy)(r,s=>s.variable.name.value);for(let[s,o]of i)o.length>1&&e.reportError(new r9.GraphQLError(`There can be only one variable named "$${s}".`,{nodes:o.map(u=>u.variable.name)}))}}}});var q0=V($0=>{"use strict";m();T();h();Object.defineProperty($0,"__esModule",{value:!0});$0.ValuesOfCorrectTypeRule=u9;var s9=mc(),Ih=En(),o9=hc(),a9=Tc(),zo=at(),j0=en(),aE=ds(),Jo=tn();function u9(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=(0,Jo.getNullableType)(e.getParentInputType());if(!(0,Jo.isListType)(r))return _l(e,n),!1},ObjectValue(n){let r=(0,Jo.getNamedType)(e.getInputType());if(!(0,Jo.isInputObjectType)(r))return _l(e,n),!1;let i=(0,o9.keyMap)(n.fields,s=>s.name.value);for(let s of Object.values(r.getFields()))if(!i[s.name]&&(0,Jo.isRequiredInputField)(s)){let u=(0,Ih.inspect)(s.type);e.reportError(new zo.GraphQLError(`Field "${r.name}.${s.name}" of required type "${u}" was not provided.`,{nodes:n}))}r.isOneOf&&c9(e,n,r,i,t)},ObjectField(n){let r=(0,Jo.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,Jo.isInputObjectType)(r)){let s=(0,a9.suggestionList)(n.name.value,Object.keys(r.getFields()));e.reportError(new zo.GraphQLError(`Field "${n.name.value}" is not defined by type "${r.name}".`+(0,s9.didYouMean)(s),{nodes:n}))}},NullValue(n){let r=e.getInputType();(0,Jo.isNonNullType)(r)&&e.reportError(new zo.GraphQLError(`Expected value of type "${(0,Ih.inspect)(r)}", found ${(0,aE.print)(n)}.`,{nodes:n}))},EnumValue:n=>_l(e,n),IntValue:n=>_l(e,n),FloatValue:n=>_l(e,n),StringValue:n=>_l(e,n),BooleanValue:n=>_l(e,n)}}function _l(e,t){let n=e.getInputType();if(!n)return;let r=(0,Jo.getNamedType)(n);if(!(0,Jo.isLeafType)(r)){let i=(0,Ih.inspect)(n);e.reportError(new zo.GraphQLError(`Expected value of type "${i}", found ${(0,aE.print)(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let s=(0,Ih.inspect)(n);e.reportError(new zo.GraphQLError(`Expected value of type "${s}", found ${(0,aE.print)(t)}.`,{nodes:t}))}}catch(i){let s=(0,Ih.inspect)(n);i instanceof zo.GraphQLError?e.reportError(i):e.reportError(new zo.GraphQLError(`Expected value of type "${s}", found ${(0,aE.print)(t)}; `+i.message,{nodes:t,originalError:i}))}}function c9(e,t,n,r,i){var s;let o=Object.keys(r);if(o.length!==1){e.reportError(new zo.GraphQLError(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let l=(s=r[o[0]])===null||s===void 0?void 0:s.value,d=!l||l.kind===j0.Kind.NULL,p=(l==null?void 0:l.kind)===j0.Kind.VARIABLE;if(d){e.reportError(new zo.GraphQLError(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(p){let y=l.name.value;i[y].type.kind!==j0.Kind.NON_NULL_TYPE&&e.reportError(new zo.GraphQLError(`Variable "${y}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}});var G0=V(K0=>{"use strict";m();T();h();Object.defineProperty(K0,"__esModule",{value:!0});K0.VariablesAreInputTypesRule=m9;var l9=at(),d9=ds(),p9=tn(),f9=Yo();function m9(e){return{VariableDefinition(t){let n=(0,f9.typeFromAST)(e.getSchema(),t.type);if(n!==void 0&&!(0,p9.isInputType)(n)){let r=t.variable.name.value,i=(0,d9.print)(t.type);e.reportError(new l9.GraphQLError(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}});var Y0=V(Q0=>{"use strict";m();T();h();Object.defineProperty(Q0,"__esModule",{value:!0});Q0.VariablesInAllowedPositionRule=N9;var yM=En(),h9=at(),T9=en(),NM=tn(),EM=th(),y9=Yo();function N9(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:s,defaultValue:o}of r){let u=i.name.value,l=t[u];if(l&&s){let d=e.getSchema(),p=(0,y9.typeFromAST)(d,l.type);if(p&&!E9(d,p,l.defaultValue,s,o)){let y=(0,yM.inspect)(p),N=(0,yM.inspect)(s);e.reportError(new h9.GraphQLError(`Variable "$${u}" of type "${y}" used in position expecting type "${N}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function E9(e,t,n,r,i){if((0,NM.isNonNullType)(r)&&!(0,NM.isNonNullType)(t)){if(!(n!=null&&n.kind!==T9.Kind.NULL)&&!(i!==void 0))return!1;let u=r.ofType;return(0,EM.isTypeSubTypeOf)(e,t,u)}return(0,EM.isTypeSubTypeOf)(e,t,r)}});var J0=V(Ec=>{"use strict";m();T();h();Object.defineProperty(Ec,"__esModule",{value:!0});Ec.specifiedSDLRules=Ec.specifiedRules=Ec.recommendedRules=void 0;var g9=dS(),I9=fS(),v9=hS(),gM=TS(),IM=gS(),_9=vS(),vM=OS(),b9=DS(),O9=RS(),S9=wS(),D9=PS(),A9=xS(),R9=US(),F9=BS(),w9=zS(),L9=XS(),P9=e0(),_M=n0(),k9=i0(),x9=f0(),C9=T0(),bM=N0(),U9=g0(),OM=_0(),M9=O0(),B9=A0(),V9=F0(),SM=L0(),j9=k0(),$9=C0(),q9=M0(),K9=V0(),G9=q0(),Q9=G0(),Y9=Y0(),DM=Object.freeze([S9.MaxIntrospectionDepthRule]);Ec.recommendedRules=DM;var J9=Object.freeze([g9.ExecutableDefinitionsRule,j9.UniqueOperationNamesRule,b9.LoneAnonymousOperationRule,x9.SingleFieldSubscriptionsRule,vM.KnownTypeNamesRule,v9.FragmentsOnCompositeTypesRule,Q9.VariablesAreInputTypesRule,k9.ScalarLeafsRule,I9.FieldsOnCorrectTypeRule,V9.UniqueFragmentNamesRule,_9.KnownFragmentNamesRule,R9.NoUnusedFragmentsRule,L9.PossibleFragmentSpreadsRule,D9.NoFragmentCyclesRule,K9.UniqueVariableNamesRule,A9.NoUndefinedVariablesRule,F9.NoUnusedVariablesRule,IM.KnownDirectivesRule,OM.UniqueDirectivesPerLocationRule,gM.KnownArgumentNamesRule,bM.UniqueArgumentNamesRule,G9.ValuesOfCorrectTypeRule,_M.ProvidedRequiredArgumentsRule,Y9.VariablesInAllowedPositionRule,w9.OverlappingFieldsCanBeMergedRule,SM.UniqueInputFieldNamesRule,...DM]);Ec.specifiedRules=J9;var z9=Object.freeze([O9.LoneSchemaDefinitionRule,$9.UniqueOperationTypesRule,q9.UniqueTypeNamesRule,M9.UniqueEnumValueNamesRule,B9.UniqueFieldDefinitionNamesRule,C9.UniqueArgumentDefinitionNamesRule,U9.UniqueDirectiveNamesRule,vM.KnownTypeNamesRule,IM.KnownDirectivesRule,OM.UniqueDirectivesPerLocationRule,P9.PossibleTypeExtensionsRule,gM.KnownArgumentNamesOnDirectivesRule,bM.UniqueArgumentNamesRule,SM.UniqueInputFieldNamesRule,_M.ProvidedRequiredArgumentsOnDirectivesRule]);Ec.specifiedSDLRules=z9});var W0=V(gc=>{"use strict";m();T();h();Object.defineProperty(gc,"__esModule",{value:!0});gc.ValidationContext=gc.SDLValidationContext=gc.ASTValidationContext=void 0;var AM=en(),H9=pl(),RM=JN(),vh=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===AM.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 s of i.selections)s.kind===AM.Kind.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.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],s;for(;s=i.pop();)for(let o of this.getFragmentSpreads(s)){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}};gc.ASTValidationContext=vh;var z0=class extends vh{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};gc.SDLValidationContext=z0;var H0=class extends vh{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 RM.TypeInfo(this._schema);(0,H9.visit)(t,(0,RM.visitWithTypeInfo)(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,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()}};gc.ValidationContext=H0});var lp=V(cp=>{"use strict";m();T();h();Object.defineProperty(cp,"__esModule",{value:!0});cp.assertValidSDL=t7;cp.assertValidSDLExtension=n7;cp.validate=e7;cp.validateSDL=X0;var W9=Oi(),X9=at(),uE=pl(),Z9=ph(),FM=JN(),wM=J0(),LM=W0();function e7(e,t,n=wM.specifiedRules,r,i=new FM.TypeInfo(e)){var s;let o=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||(0,W9.devAssert)(!1,"Must provide document."),(0,Z9.assertValidSchema)(e);let u=Object.freeze({}),l=[],d=new LM.ValidationContext(e,t,i,y=>{if(l.length>=o)throw l.push(new X9.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),u;l.push(y)}),p=(0,uE.visitInParallel)(n.map(y=>y(d)));try{(0,uE.visit)(t,(0,FM.visitWithTypeInfo)(i,p))}catch(y){if(y!==u)throw y}return l}function X0(e,t,n=wM.specifiedSDLRules){let r=[],i=new LM.SDLValidationContext(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return(0,uE.visit)(e,(0,uE.visitInParallel)(s)),r}function t7(e){let t=X0(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` `))}function n7(e,t){let n=X0(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(` -`))}});var xM=V(pp=>{"use strict";m();T();h();Object.defineProperty(pp,"__esModule",{value:!0});pp.AccumulatorMap=void 0;pp.mapValue=dp;pp.extendSchemaImpl=r7;var Ve=(we(),Me(je)),ja=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)}};pp.AccumulatorMap=ja;function dp(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function r7(e,t,n){var ae,te,ce,Ke;let r=[],i=new ja,s=new ja,o=new ja,u=new ja,l=new ja,d=new ja,p=[],y,N=[],I=!1;for(let G of t.definitions){switch(G.kind){case Ve.Kind.SCHEMA_DEFINITION:y=G;break;case Ve.Kind.SCHEMA_EXTENSION:N.push(G);break;case Ve.Kind.DIRECTIVE_DEFINITION:p.push(G);break;case Ve.Kind.SCALAR_TYPE_DEFINITION:case Ve.Kind.OBJECT_TYPE_DEFINITION:case Ve.Kind.INTERFACE_TYPE_DEFINITION:case Ve.Kind.UNION_TYPE_DEFINITION:case Ve.Kind.ENUM_TYPE_DEFINITION:case Ve.Kind.INPUT_OBJECT_TYPE_DEFINITION:r.push(G);break;case Ve.Kind.SCALAR_TYPE_EXTENSION:i.add(G.name.value,G);break;case Ve.Kind.OBJECT_TYPE_EXTENSION:s.add(G.name.value,G);break;case Ve.Kind.INTERFACE_TYPE_EXTENSION:o.add(G.name.value,G);break;case Ve.Kind.UNION_TYPE_EXTENSION:u.add(G.name.value,G);break;case Ve.Kind.ENUM_TYPE_EXTENSION:l.add(G.name.value,G);break;case Ve.Kind.INPUT_OBJECT_TYPE_EXTENSION:d.add(G.name.value,G);break;default:continue}I=!0}if(!I)return e;let b=new Map;for(let G of e.types){let ee=se(G);ee&&b.set(G.name,ee)}for(let G of r){let ee=G.name.value;b.set(ee,(ae=PM.get(ee))!=null?ae:U(G))}for(let[G,ee]of s)b.set(G,new Ve.GraphQLObjectType({name:G,interfaces:()=>on(ee),fields:()=>bn(ee),extensionASTNodes:ee}));if(n!=null&&n.addInvalidExtensionOrphans){for(let[G,ee]of o)b.set(G,new Ve.GraphQLInterfaceType({name:G,interfaces:()=>on(ee),fields:()=>bn(ee),extensionASTNodes:ee}));for(let[G,ee]of l)b.set(G,new Ve.GraphQLEnumType({name:G,values:Pn(ee),extensionASTNodes:ee}));for(let[G,ee]of u)b.set(G,new Ve.GraphQLUnionType({name:G,types:()=>$n(ee),extensionASTNodes:ee}));for(let[G,ee]of i)b.set(G,new Ve.GraphQLScalarType({name:G,extensionASTNodes:ee}));for(let[G,ee]of d)b.set(G,new Ve.GraphQLInputObjectType({name:G,fields:()=>Xr(ee),extensionASTNodes:ee}))}let x=k(k({query:e.query&&Q(e.query),mutation:e.mutation&&Q(e.mutation),subscription:e.subscription&&Q(e.subscription)},y&&Ct([y])),Ct(N));return K(k({description:(ce=(te=y==null?void 0:y.description)==null?void 0:te.value)!=null?ce:e.description},x),{types:Array.from(b.values()),directives:[...e.directives.map(re),...p.map(_n)],extensions:e.extensions,astNode:y!=null?y:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(N),assumeValid:(Ke=n==null?void 0:n.assumeValid)!=null?Ke:!1});function j(G){return(0,Ve.isListType)(G)?new Ve.GraphQLList(j(G.ofType)):(0,Ve.isNonNullType)(G)?new Ve.GraphQLNonNull(j(G.ofType)):Q(G)}function Q(G){return b.get(G.name)}function re(G){if((0,Ve.isSpecifiedDirective)(G))return G;let ee=G.toConfig();return new Ve.GraphQLDirective(K(k({},ee),{args:dp(ee.args,nt)}))}function se(G){if((0,Ve.isIntrospectionType)(G)||(0,Ve.isSpecifiedScalarType)(G))return G;if((0,Ve.isScalarType)(G))return Ce(G);if((0,Ve.isObjectType)(G))return ht(G);if((0,Ve.isInterfaceType)(G))return xt(G);if((0,Ve.isUnionType)(G))return B(G);if((0,Ve.isEnumType)(G))return ye(G);if((0,Ve.isInputObjectType)(G))return pe(G)}function pe(G){var Xe;let ee=G.toConfig(),Ue=(Xe=d.get(ee.name))!=null?Xe:[];return new Ve.GraphQLInputObjectType(K(k({},ee),{fields:()=>k(k({},dp(ee.fields,jt=>K(k({},jt),{type:j(jt.type)}))),Xr(Ue)),extensionASTNodes:ee.extensionASTNodes.concat(Ue)}))}function ye(G){var Xe;let ee=G.toConfig(),Ue=(Xe=l.get(G.name))!=null?Xe:[];return new Ve.GraphQLEnumType(K(k({},ee),{values:k(k({},ee.values),Pn(Ue)),extensionASTNodes:ee.extensionASTNodes.concat(Ue)}))}function Ce(G){var jt,Je;let ee=G.toConfig(),Ue=(jt=i.get(ee.name))!=null?jt:[],Xe=ee.specifiedByURL;for(let Ht of Ue)Xe=(Je=kM(Ht))!=null?Je:Xe;return new Ve.GraphQLScalarType(K(k({},ee),{specifiedByURL:Xe,extensionASTNodes:ee.extensionASTNodes.concat(Ue)}))}function ht(G){var Xe;let ee=G.toConfig(),Ue=(Xe=s.get(ee.name))!=null?Xe:[];return new Ve.GraphQLObjectType(K(k({},ee),{interfaces:()=>[...G.getInterfaces().map(Q),...on(Ue)],fields:()=>k(k({},dp(ee.fields,he)),bn(Ue)),extensionASTNodes:ee.extensionASTNodes.concat(Ue)}))}function xt(G){var Xe;let ee=G.toConfig(),Ue=(Xe=o.get(ee.name))!=null?Xe:[];return new Ve.GraphQLInterfaceType(K(k({},ee),{interfaces:()=>[...G.getInterfaces().map(Q),...on(Ue)],fields:()=>k(k({},dp(ee.fields,he)),bn(Ue)),extensionASTNodes:ee.extensionASTNodes.concat(Ue)}))}function B(G){var Xe;let ee=G.toConfig(),Ue=(Xe=u.get(ee.name))!=null?Xe:[];return new Ve.GraphQLUnionType(K(k({},ee),{types:()=>[...G.getTypes().map(Q),...$n(Ue)],extensionASTNodes:ee.extensionASTNodes.concat(Ue)}))}function he(G){return K(k({},G),{type:j(G.type),args:G.args&&dp(G.args,nt)})}function nt(G){return K(k({},G),{type:j(G.type)})}function Ct(G){var Ue;let ee={};for(let Xe of G){let jt=(Ue=Xe.operationTypes)!=null?Ue:[];for(let Je of jt)ee[Je.operation]=sn(Je.type)}return ee}function sn(G){var Xe;let ee=G.name.value,Ue=(Xe=PM.get(ee))!=null?Xe:b.get(ee);if(Ue===void 0)throw new Error(`Unknown type: "${ee}".`);return Ue}function Fn(G){return G.kind===Ve.Kind.LIST_TYPE?new Ve.GraphQLList(Fn(G.type)):G.kind===Ve.Kind.NON_NULL_TYPE?new Ve.GraphQLNonNull(Fn(G.type)):sn(G)}function _n(G){var ee;return new Ve.GraphQLDirective({name:G.name.value,description:(ee=G.description)==null?void 0:ee.value,locations:G.locations.map(({value:Ue})=>Ue),isRepeatable:G.repeatable,args:mi(G.arguments),astNode:G})}function bn(G){var Ue,Xe;let ee=Object.create(null);for(let jt of G){let Je=(Ue=jt.fields)!=null?Ue:[];for(let Ht of Je)ee[Ht.name.value]={type:Fn(Ht.type),description:(Xe=Ht.description)==null?void 0:Xe.value,args:mi(Ht.arguments),deprecationReason:cE(Ht),astNode:Ht}}return ee}function mi(G){var Xe;let ee=G!=null?G:[],Ue=Object.create(null);for(let jt of ee){let Je=Fn(jt.type);Ue[jt.name.value]={type:Je,description:(Xe=jt.description)==null?void 0:Xe.value,defaultValue:(0,Ve.valueFromAST)(jt.defaultValue,Je),deprecationReason:cE(jt),astNode:jt}}return Ue}function Xr(G){var Ue,Xe;let ee=Object.create(null);for(let jt of G){let Je=(Ue=jt.fields)!=null?Ue:[];for(let Ht of Je){let pa=Fn(Ht.type);ee[Ht.name.value]={type:pa,description:(Xe=Ht.description)==null?void 0:Xe.value,defaultValue:(0,Ve.valueFromAST)(Ht.defaultValue,pa),deprecationReason:cE(Ht),astNode:Ht}}}return ee}function Pn(G){var Ue,Xe;let ee=Object.create(null);for(let jt of G){let Je=(Ue=jt.values)!=null?Ue:[];for(let Ht of Je)ee[Ht.name.value]={description:(Xe=Ht.description)==null?void 0:Xe.value,deprecationReason:cE(Ht),astNode:Ht}}return ee}function on(G){return G.flatMap(ee=>{var Ue,Xe;return(Xe=(Ue=ee.interfaces)==null?void 0:Ue.map(sn))!=null?Xe:[]})}function $n(G){return G.flatMap(ee=>{var Ue,Xe;return(Xe=(Ue=ee.types)==null?void 0:Ue.map(sn))!=null?Xe:[]})}function U(G){var Ue,Xe,jt,Je,Ht,pa,Li,fa,id,Do,Gr,Wi;let ee=G.name.value;switch(G.kind){case Ve.Kind.OBJECT_TYPE_DEFINITION:{let cn=(Ue=s.get(ee))!=null?Ue:[],Qr=[G,...cn];return s.delete(ee),new Ve.GraphQLObjectType({name:ee,description:(Xe=G.description)==null?void 0:Xe.value,interfaces:()=>on(Qr),fields:()=>bn(Qr),astNode:G,extensionASTNodes:cn})}case Ve.Kind.INTERFACE_TYPE_DEFINITION:{let cn=(jt=o.get(ee))!=null?jt:[],Qr=[G,...cn];return o.delete(ee),new Ve.GraphQLInterfaceType({name:ee,description:(Je=G.description)==null?void 0:Je.value,interfaces:()=>on(Qr),fields:()=>bn(Qr),astNode:G,extensionASTNodes:cn})}case Ve.Kind.ENUM_TYPE_DEFINITION:{let cn=(Ht=l.get(ee))!=null?Ht:[],Qr=[G,...cn];return l.delete(ee),new Ve.GraphQLEnumType({name:ee,description:(pa=G.description)==null?void 0:pa.value,values:Pn(Qr),astNode:G,extensionASTNodes:cn})}case Ve.Kind.UNION_TYPE_DEFINITION:{let cn=(Li=u.get(ee))!=null?Li:[],Qr=[G,...cn];return u.delete(ee),new Ve.GraphQLUnionType({name:ee,description:(fa=G.description)==null?void 0:fa.value,types:()=>$n(Qr),astNode:G,extensionASTNodes:cn})}case Ve.Kind.SCALAR_TYPE_DEFINITION:{let cn=(id=i.get(ee))!=null?id:[];return i.delete(ee),new Ve.GraphQLScalarType({name:ee,description:(Do=G.description)==null?void 0:Do.value,specifiedByURL:kM(G),astNode:G,extensionASTNodes:cn})}case Ve.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let cn=(Gr=d.get(ee))!=null?Gr:[],Qr=[G,...cn];return d.delete(ee),new Ve.GraphQLInputObjectType({name:ee,description:(Wi=G.description)==null?void 0:Wi.value,fields:()=>Xr(Qr),astNode:G,extensionASTNodes:cn})}}}}var PM=new Map([...Ve.specifiedScalarTypes,...Ve.introspectionTypes].map(e=>[e.name,e]));function cE(e){let t=(0,Ve.getDirectiveValues)(Ve.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function kM(e){let t=(0,Ve.getDirectiveValues)(Ve.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}});var eD=V(Z0=>{"use strict";m();T();h();Object.defineProperty(Z0,"__esModule",{value:!0});Z0.buildASTSchema=o7;var CM=(we(),Me(je)),i7=lp(),s7=xM();function o7(e,t){(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,i7.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,s7.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let s of r.types)switch(s.name){case"Query":r.query=s;break;case"Mutation":r.mutation=s;break;case"Subscription":r.subscription=s;break}let i=[...r.directives,...CM.specifiedDirectives.filter(s=>r.directives.every(o=>o.name!==s.name))];return new CM.GraphQLSchema(K(k({},r),{directives:i}))}});var ps=V(Dt=>{"use strict";m();T();h();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.maxOrScopes=void 0;Dt.areSetsEqual=u7;Dt.getAllMutualEntries=c7;Dt.getOrThrowError=l7;Dt.getAllSetDisparities=d7;Dt.getEntriesNotInHashSet=p7;Dt.doSetsIntersect=f7;Dt.subtractSourceSetFromTargetSet=m7;Dt.mapToArrayOfValues=h7;Dt.numberToOrdinal=T7;Dt.addIterableValuesToSet=bl;Dt.addSetsAndReturnMutationBoolean=UM;Dt.kindToTypeString=y7;Dt.kindToConvertedTypeString=N7;Dt.fieldDatasToSimpleFieldDatas=E7;Dt.isNodeLeaf=g7;Dt.newEntityInterfaceFederationData=I7;Dt.upsertEntityInterfaceFederationData=v7;Dt.getValueOrDefault=MM;Dt.newEntityData=BM;Dt.upsertEntityDataProperties=_7;Dt.upsertEntityData=b7;Dt.newFieldAuthorizationData=nD;Dt.resetAuthorizationData=O7;Dt.getAuthorizationDataToUpdate=S7;Dt.newAuthorizationData=D7;Dt.mergeAuthorizationDataByAND=jM;Dt.upsertFieldAuthorizationData=$M;Dt.upsertAuthorizationData=A7;Dt.upsertAuthorizationConfiguration=R7;Dt.setAndGetValue=F7;Dt.generateSimpleDirective=w7;Dt.generateRequiresScopesDirective=L7;Dt.isNodeKindInterface=P7;Dt.addMapEntries=k7;Dt.getSingleSetEntry=x7;Dt.add=C7;var et=(we(),Me(je)),In=bi(),a7=To(),tD=Vi();function u7(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function c7(e,t){let n=new Set;for(let r of e)t.has(r)&&n.add(r);return n}function l7(e,t,n){let r=e.get(t);if(r===void 0)throw(0,a7.invalidKeyFatalError)(t,n);return r}function d7(e,t){let n=new Set(t),r=[];for(let i of e)n.delete(i)||r.push(i);for(let i of n)r.push(i);return r}function p7(e,t){let n=[];for(let r of e)t.has(r)||n.push(r);return n}function f7(e,t){for(let n of e)if(t.has(n))return!0;return!1}function m7(e,t){for(let n of e)t.delete(n)}function h7(e){let t=[];for(let n of e.values())t.push(n);return t}function T7(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 bl(e,t){for(let n of e)t.add(n)}function UM(e,t){let n=!1;for(let r of e)t.has(r)||(n=!0,t.add(r));return n}function y7(e){switch(e){case et.Kind.BOOLEAN:return In.BOOLEAN_SCALAR;case et.Kind.ENUM:case et.Kind.ENUM_TYPE_DEFINITION:return In.ENUM;case et.Kind.ENUM_TYPE_EXTENSION:return"Enum extension";case et.Kind.ENUM_VALUE_DEFINITION:return In.ENUM_VALUE;case et.Kind.FIELD_DEFINITION:return In.FIELD;case et.Kind.FLOAT:return In.FLOAT_SCALAR;case et.Kind.INPUT_OBJECT_TYPE_DEFINITION:return In.INPUT_OBJECT;case et.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"Input Object extension";case et.Kind.INPUT_VALUE_DEFINITION:return In.INPUT_VALUE;case et.Kind.INT:return In.INT_SCALAR;case et.Kind.INTERFACE_TYPE_DEFINITION:return In.INTERFACE;case et.Kind.INTERFACE_TYPE_EXTENSION:return"Interface extension";case et.Kind.NULL:return In.NULL;case et.Kind.OBJECT:case et.Kind.OBJECT_TYPE_DEFINITION:return In.OBJECT;case et.Kind.OBJECT_TYPE_EXTENSION:return"Object extension";case et.Kind.STRING:return In.STRING_SCALAR;case et.Kind.SCALAR_TYPE_DEFINITION:return In.SCALAR;case et.Kind.SCALAR_TYPE_EXTENSION:return"Scalar extension";case et.Kind.UNION_TYPE_DEFINITION:return In.UNION;case et.Kind.UNION_TYPE_EXTENSION:return"Union extension";default:return e}}function N7(e){switch(e){case et.Kind.BOOLEAN:return In.BOOLEAN_SCALAR;case et.Kind.ENUM:case et.Kind.ENUM_TYPE_DEFINITION:case et.Kind.ENUM_TYPE_EXTENSION:return In.ENUM;case et.Kind.ENUM_VALUE_DEFINITION:return In.ENUM_VALUE;case et.Kind.FIELD_DEFINITION:return In.FIELD;case et.Kind.FLOAT:return In.FLOAT_SCALAR;case et.Kind.INPUT_OBJECT_TYPE_DEFINITION:case et.Kind.INPUT_OBJECT_TYPE_EXTENSION:return In.INPUT_OBJECT;case et.Kind.INPUT_VALUE_DEFINITION:return In.INPUT_VALUE;case et.Kind.INT:return In.INT_SCALAR;case et.Kind.INTERFACE_TYPE_DEFINITION:case et.Kind.INTERFACE_TYPE_EXTENSION:return In.INTERFACE;case et.Kind.NULL:return In.NULL;case et.Kind.OBJECT:case et.Kind.OBJECT_TYPE_DEFINITION:case et.Kind.OBJECT_TYPE_EXTENSION:return In.OBJECT;case et.Kind.STRING:return In.STRING_SCALAR;case et.Kind.SCALAR_TYPE_DEFINITION:case et.Kind.SCALAR_TYPE_EXTENSION:return In.SCALAR;case et.Kind.UNION_TYPE_DEFINITION:case et.Kind.UNION_TYPE_EXTENSION:return In.UNION;default:return e}}function E7(e){let t=[];for(let{name:n,namedTypeName:r}of e)t.push({name:n,namedTypeName:r});return t}function g7(e){if(!e)return!0;switch(e){case et.Kind.OBJECT_TYPE_DEFINITION:case et.Kind.INTERFACE_TYPE_DEFINITION:case et.Kind.UNION_TYPE_DEFINITION:return!1;default:return!0}}function I7(e,t){return k({fieldDatasBySubgraphName:new Map().set(t,e.fieldDatas),interfaceFieldNames:new Set(e.interfaceFieldNames),interfaceObjectFieldNames:new Set(e.interfaceObjectFieldNames),interfaceObjectSubgraphs:new Set(e.isInterfaceObject?[t]:[]),typeName:e.typeName},e.isInterfaceObject?{}:{concreteTypeNames:new Set(e.concreteTypeNames)})}function v7(e,t,n){return e.fieldDatasBySubgraphName.set(n,t.fieldDatas),bl(t.interfaceFieldNames,e.interfaceFieldNames),bl(t.interfaceObjectFieldNames,e.interfaceObjectFieldNames),t.isInterfaceObject?(e.interfaceObjectSubgraphs.add(n),!1):e.concreteTypeNames?UM(t.concreteTypeNames||new Set,e.concreteTypeNames):(e.concreteTypeNames=new Set(t.concreteTypeNames),!1)}function MM(e,t,n){let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i}function BM(e){return{fieldNames:new Set(e.fieldNames),keyFieldSets:new Set(e.keyFieldSets),subgraphNames:new Set(e.subgraphNames),typeName:e.typeName}}function VM(e,t){bl(e.fieldNames||[],t.fieldNames),bl(e.keyFieldSets||[],t.keyFieldSets),bl(e.subgraphNames||[],t.subgraphNames)}function _7(e,t){let n=e.get(t.typeName);n?VM(t,n):e.set(t.typeName,BM(t))}function b7(e,t){let n=e.get(t.typeName);n?VM(t,n):e.set(t.typeName,t)}function nD(e){return{fieldName:e,requiresAuthentication:!1,requiredScopes:[]}}function O7(e){e&&(e.requiresAuthentication=!1,e.requiredScopes=[],e.hasParentLevelAuthorization=!1)}function S7(e,t,n){return t.kind===et.Kind.FIELD_DEFINITION?MM(e.fieldAuthorizationDataByFieldName,n,()=>nD(n)):(e.hasParentLevelAuthorization=!0,e)}function D7(e){return{fieldAuthorizationDataByFieldName:new Map,hasParentLevelAuthorization:!1,requiresAuthentication:!1,requiredScopes:[],typeName:e}}Dt.maxOrScopes=16;function jM(e,t){t.requiresAuthentication||(t.requiresAuthentication=e.requiresAuthentication);let n=e.requiredScopes.length;if(n<1)return!0;let r=t.requiredScopes.length;if(r<1){if(n>Dt.maxOrScopes)return!1;for(let s of e.requiredScopes)t.requiredScopes.push(new Set(s));return!0}if(n*r>Dt.maxOrScopes)return!1;let i=[];for(let s of t.requiredScopes)for(let o of e.requiredScopes){let u=new Set(s);bl(o,u),i.push(u)}return t.requiredScopes=i,!0}function $M(e,t){let n=t.fieldName,r=e.get(n);if(!r){if(t.requiredScopes.length>Dt.maxOrScopes)return!1;let i=nD(n);i.requiresAuthentication||(i.requiresAuthentication=t.requiresAuthentication);for(let s of t.requiredScopes)i.requiredScopes.push(new Set(s));return e.set(n,i),!0}return r.requiresAuthentication||(r.requiresAuthentication=t.requiresAuthentication),jM(t,r)}function A7(e,t,n){let r=e.get(t.typeName);if(!r){e.set(t.typeName,t);return}for(let[i,s]of t.fieldAuthorizationDataByFieldName)$M(r.fieldAuthorizationDataByFieldName,s)||n.add(`${t.typeName}.${i}`)}function R7(e,t){let n=t.typeName;for(let[r,i]of t.fieldAuthorizationDataByFieldName){let s=`${n}.${r}`,o=e.get(s);o?(o.requiresAuthentication=i.requiresAuthentication,o.requiredScopes=i.requiredScopes.map(u=>[...u])):e.set(s,{argumentNames:[],typeName:n,fieldName:r,requiresAuthentication:i.requiresAuthentication,requiredScopes:i.requiredScopes.map(u=>[...u])})}}function F7(e,t,n){return e.set(t,n),n}function w7(e){return{kind:et.Kind.DIRECTIVE,name:(0,tD.stringToNameNode)(e)}}function L7(e){let t=[];for(let n of e){let r=[];for(let i of n)r.push({kind:et.Kind.STRING,value:i});t.push({kind:et.Kind.LIST,values:r})}return{kind:et.Kind.DIRECTIVE,name:(0,tD.stringToNameNode)(In.REQUIRES_SCOPES),arguments:[{kind:et.Kind.ARGUMENT,name:(0,tD.stringToNameNode)(In.SCOPES),value:{kind:et.Kind.LIST,values:t}}]}}function P7(e){return e===et.Kind.INTERFACE_TYPE_DEFINITION||e===et.Kind.INTERFACE_TYPE_EXTENSION}function k7(e,t){for(let[n,r]of e)t.set(n,r)}function x7(e){for(let t of e)return t}function C7(e,t){return e.has(t)?!1:(e.add(t),!0)}});var _h=V(fp=>{"use strict";m();T();h();Object.defineProperty(fp,"__esModule",{value:!0});fp.MAX_SUBSCRIPTION_FILTER_DEPTH=fp.MAXIMUM_TYPE_NESTING=void 0;fp.MAXIMUM_TYPE_NESTING=30;fp.MAX_SUBSCRIPTION_FILTER_DEPTH=5});var To=V(Z=>{"use strict";m();T();h();Object.defineProperty(Z,"__esModule",{value:!0});Z.invalidEventProviderIdErrorMessage=Z.invalidNatsStreamConfigurationDefinitionErrorMessage=Z.undefinedNatsStreamConfigurationInputErrorMessage=Z.invalidEdfsPublishResultObjectErrorMessage=Z.invalidNatsStreamInputErrorMessage=Z.inlineFragmentInFieldSetErrorMessage=Z.inaccessibleQueryRootTypeError=Z.noQueryRootTypeError=Z.federationFactoryInitializationFatalError=Z.subgraphValidationFailureError=Z.minimumSubgraphRequirementError=void 0;Z.multipleNamedTypeDefinitionError=B7;Z.incompatibleExtensionError=V7;Z.incompatibleArgumentTypesError=j7;Z.incompatibleInputValueDefaultValueTypeError=$7;Z.incompatibleChildTypesError=q7;Z.incompatibleInputValueDefaultValuesError=K7;Z.incompatibleSharedEnumError=G7;Z.incompatibleExtensionKindsError=Q7;Z.invalidSubgraphNamesError=Y7;Z.duplicateDirectiveDefinitionError=J7;Z.duplicateEnumValueDefinitionError=z7;Z.duplicateFieldDefinitionError=H7;Z.duplicateInputFieldDefinitionError=W7;Z.duplicateImplementedInterfaceError=X7;Z.duplicateUnionMemberDefinitionError=Z7;Z.duplicateTypeDefinitionError=eZ;Z.duplicateOperationTypeDefinitionError=tZ;Z.noBaseDefinitionForExtensionError=nZ;Z.noBaseScalarDefinitionError=rZ;Z.noDefinedUnionMembersError=iZ;Z.noDefinedEnumValuesError=sZ;Z.operationDefinitionError=oZ;Z.invalidFieldShareabilityError=aZ;Z.undefinedDirectiveErrorMessage=uZ;Z.undefinedTypeError=cZ;Z.invalidRepeatedDirectiveErrorMessage=lZ;Z.invalidRepeatedFederatedDirectiveErrorMessage=dZ;Z.invalidDirectiveError=pZ;Z.invalidDirectiveLocationErrorMessage=fZ;Z.unexpectedDirectiveArgumentsErrorMessage=mZ;Z.undefinedRequiredArgumentsErrorMessage=hZ;Z.unexpectedDirectiveArgumentErrorMessage=TZ;Z.duplicateDirectiveArgumentDefinitionsErrorMessage=yZ;Z.invalidDirectiveArgumentTypeErrorMessage=NZ;Z.invalidKeyDirectiveArgumentErrorMessage=EZ;Z.invalidKeyDirectivesError=gZ;Z.maximumTypeNestingExceededError=IZ;Z.unexpectedKindFatalError=vZ;Z.incompatibleParentKindFatalError=_Z;Z.unexpectedEdgeFatalError=bZ;Z.incompatibleParentKindMergeError=OZ;Z.fieldTypeMergeFatalError=SZ;Z.unexpectedDirectiveLocationError=DZ;Z.unexpectedTypeNodeKindFatalError=AZ;Z.invalidKeyFatalError=RZ;Z.invalidConfigurationResultFatalError=FZ;Z.unexpectedParentKindErrorMessage=wZ;Z.unexpectedParentKindForChildError=LZ;Z.subgraphValidationError=PZ;Z.invalidSubgraphNameErrorMessage=kZ;Z.invalidOperationTypeDefinitionError=xZ;Z.invalidRootTypeDefinitionError=CZ;Z.subgraphInvalidSyntaxError=UZ;Z.invalidInterfaceImplementationError=MZ;Z.invalidRequiredInputValueError=BZ;Z.duplicateArgumentsError=VZ;Z.invalidArgumentsError=jZ;Z.expectedEntityError=$Z;Z.abstractTypeInKeyFieldSetErrorMessage=qZ;Z.unknownTypeInFieldSetErrorMessage=KZ;Z.invalidSelectionSetErrorMessage=GZ;Z.invalidSelectionSetDefinitionErrorMessage=QZ;Z.undefinedFieldInFieldSetErrorMessage=YZ;Z.unparsableFieldSetErrorMessage=JZ;Z.unparsableFieldSetSelectionErrorMessage=zZ;Z.undefinedObjectLikeParentError=HZ;Z.unexpectedArgumentErrorMessage=WZ;Z.argumentsInKeyFieldSetErrorMessage=XZ;Z.invalidProvidesOrRequiresDirectivesError=ZZ;Z.duplicateFieldInFieldSetErrorMessage=eee;Z.invalidConfigurationDataErrorMessage=tee;Z.incompatibleTypeWithProvidesErrorMessage=nee;Z.invalidInlineFragmentTypeErrorMessage=ree;Z.inlineFragmentWithoutTypeConditionErrorMessage=iee;Z.unknownInlineFragmentTypeConditionErrorMessage=see;Z.invalidInlineFragmentTypeConditionTypeErrorMessage=oee;Z.invalidInlineFragmentTypeConditionErrorMessage=aee;Z.invalidSelectionOnUnionErrorMessage=uee;Z.duplicateOverriddenFieldErrorMessage=cee;Z.duplicateOverriddenFieldsError=lee;Z.noFieldDefinitionsError=dee;Z.noInputValueDefinitionsError=pee;Z.allChildDefinitionsAreInaccessibleError=fee;Z.equivalentSourceAndTargetOverrideErrorMessage=mee;Z.undefinedEntityInterfaceImplementationsError=hee;Z.orScopesLimitError=Tee;Z.invalidEventDrivenGraphError=yee;Z.invalidRootTypeFieldEventsDirectivesErrorMessage=Nee;Z.invalidEventDrivenMutationResponseTypeErrorMessage=Eee;Z.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage=gee;Z.invalidNatsStreamInputFieldsErrorMessage=Iee;Z.invalidKeyFieldSetsEventDrivenErrorMessage=vee;Z.nonExternalKeyFieldNamesEventDrivenErrorMessage=_ee;Z.nonKeyFieldNamesEventDrivenErrorMessage=bee;Z.nonEntityObjectExtensionsEventDrivenErrorMessage=Oee;Z.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage=See;Z.invalidEdfsDirectiveName=Dee;Z.invalidImplementedTypeError=Aee;Z.selfImplementationError=Ree;Z.invalidEventSubjectErrorMessage=Fee;Z.invalidEventSubjectsErrorMessage=wee;Z.invalidEventSubjectsItemErrorMessage=Lee;Z.invalidEventDirectiveError=Pee;Z.invalidReferencesOfInaccessibleTypeError=kee;Z.inaccessibleRequiredArgumentError=xee;Z.invalidUnionMemberTypeError=Cee;Z.invalidRootTypeError=Uee;Z.invalidSubscriptionFilterLocationError=Mee;Z.invalidSubscriptionFilterDirectiveError=Bee;Z.subscriptionFilterNamedTypeErrorMessage=Vee;Z.subscriptionFilterConditionDepthExceededErrorMessage=jee;Z.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage=$ee;Z.subscriptionFilterConditionInvalidInputFieldErrorMessage=qee;Z.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage=Kee;Z.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage=Gee;Z.subscriptionFilterArrayConditionInvalidLengthErrorMessage=Qee;Z.invalidInputFieldTypeErrorMessage=Yee;Z.subscriptionFieldConditionInvalidInputFieldErrorMessage=Jee;Z.subscriptionFieldConditionInvalidValuesArrayErrorMessage=zee;Z.subscriptionFieldConditionEmptyValuesArrayErrorMessage=Hee;Z.unknownFieldSubgraphNameError=Wee;Z.invalidSubscriptionFieldConditionFieldPathErrorMessage=Xee;Z.invalidSubscriptionFieldConditionFieldPathParentErrorMessage=Zee;Z.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage=ete;Z.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage=tte;Z.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage=nte;Z.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage=rte;Z.unresolvablePathError=ite;Z.allExternalFieldInstancesError=ste;Z.externalInterfaceFieldsError=ote;Z.nonExternalConditionalFieldError=ate;Z.incompatibleFederatedFieldNamedTypeError=ute;Z.unknownNamedTypeErrorMessage=YM;Z.unknownNamedTypeError=cte;Z.unknownFieldDataError=lte;Z.unexpectedNonCompositeOutputTypeError=dte;Z.unimplementedInterfaceOutputTypeError=pte;var U7=Vi(),M7=(we(),Me(je)),bh=ps(),Et=bi(),qM=_h();Z.minimumSubgraphRequirementError=new Error("At least one subgraph is required for federation.");function B7(e,t,n){return new Error(`The named type "${e}" is defined as both types "${t}" and "${n}". +`))}});var xM=V(pp=>{"use strict";m();T();h();Object.defineProperty(pp,"__esModule",{value:!0});pp.AccumulatorMap=void 0;pp.mapValue=dp;pp.extendSchemaImpl=r7;var Ve=(we(),Me(je)),ja=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)}};pp.AccumulatorMap=ja;function dp(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function r7(e,t,n){var ae,te,ce,Ke;let r=[],i=new ja,s=new ja,o=new ja,u=new ja,l=new ja,d=new ja,p=[],y,N=[],I=!1;for(let G of t.definitions){switch(G.kind){case Ve.Kind.SCHEMA_DEFINITION:y=G;break;case Ve.Kind.SCHEMA_EXTENSION:N.push(G);break;case Ve.Kind.DIRECTIVE_DEFINITION:p.push(G);break;case Ve.Kind.SCALAR_TYPE_DEFINITION:case Ve.Kind.OBJECT_TYPE_DEFINITION:case Ve.Kind.INTERFACE_TYPE_DEFINITION:case Ve.Kind.UNION_TYPE_DEFINITION:case Ve.Kind.ENUM_TYPE_DEFINITION:case Ve.Kind.INPUT_OBJECT_TYPE_DEFINITION:r.push(G);break;case Ve.Kind.SCALAR_TYPE_EXTENSION:i.add(G.name.value,G);break;case Ve.Kind.OBJECT_TYPE_EXTENSION:s.add(G.name.value,G);break;case Ve.Kind.INTERFACE_TYPE_EXTENSION:o.add(G.name.value,G);break;case Ve.Kind.UNION_TYPE_EXTENSION:u.add(G.name.value,G);break;case Ve.Kind.ENUM_TYPE_EXTENSION:l.add(G.name.value,G);break;case Ve.Kind.INPUT_OBJECT_TYPE_EXTENSION:d.add(G.name.value,G);break;default:continue}I=!0}if(!I)return e;let _=new Map;for(let G of e.types){let ee=se(G);ee&&_.set(G.name,ee)}for(let G of r){let ee=G.name.value;_.set(ee,(ae=PM.get(ee))!=null?ae:U(G))}for(let[G,ee]of s)_.set(G,new Ve.GraphQLObjectType({name:G,interfaces:()=>on(ee),fields:()=>bn(ee),extensionASTNodes:ee}));if(n!=null&&n.addInvalidExtensionOrphans){for(let[G,ee]of o)_.set(G,new Ve.GraphQLInterfaceType({name:G,interfaces:()=>on(ee),fields:()=>bn(ee),extensionASTNodes:ee}));for(let[G,ee]of l)_.set(G,new Ve.GraphQLEnumType({name:G,values:Pn(ee),extensionASTNodes:ee}));for(let[G,ee]of u)_.set(G,new Ve.GraphQLUnionType({name:G,types:()=>$n(ee),extensionASTNodes:ee}));for(let[G,ee]of i)_.set(G,new Ve.GraphQLScalarType({name:G,extensionASTNodes:ee}));for(let[G,ee]of d)_.set(G,new Ve.GraphQLInputObjectType({name:G,fields:()=>Xr(ee),extensionASTNodes:ee}))}let C=k(k({query:e.query&&Q(e.query),mutation:e.mutation&&Q(e.mutation),subscription:e.subscription&&Q(e.subscription)},y&&Ct([y])),Ct(N));return K(k({description:(ce=(te=y==null?void 0:y.description)==null?void 0:te.value)!=null?ce:e.description},C),{types:Array.from(_.values()),directives:[...e.directives.map(re),...p.map(_n)],extensions:e.extensions,astNode:y!=null?y:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(N),assumeValid:(Ke=n==null?void 0:n.assumeValid)!=null?Ke:!1});function j(G){return(0,Ve.isListType)(G)?new Ve.GraphQLList(j(G.ofType)):(0,Ve.isNonNullType)(G)?new Ve.GraphQLNonNull(j(G.ofType)):Q(G)}function Q(G){return _.get(G.name)}function re(G){if((0,Ve.isSpecifiedDirective)(G))return G;let ee=G.toConfig();return new Ve.GraphQLDirective(K(k({},ee),{args:dp(ee.args,nt)}))}function se(G){if((0,Ve.isIntrospectionType)(G)||(0,Ve.isSpecifiedScalarType)(G))return G;if((0,Ve.isScalarType)(G))return Ce(G);if((0,Ve.isObjectType)(G))return ht(G);if((0,Ve.isInterfaceType)(G))return xt(G);if((0,Ve.isUnionType)(G))return B(G);if((0,Ve.isEnumType)(G))return ye(G);if((0,Ve.isInputObjectType)(G))return pe(G)}function pe(G){var Xe;let ee=G.toConfig(),Ue=(Xe=d.get(ee.name))!=null?Xe:[];return new Ve.GraphQLInputObjectType(K(k({},ee),{fields:()=>k(k({},dp(ee.fields,jt=>K(k({},jt),{type:j(jt.type)}))),Xr(Ue)),extensionASTNodes:ee.extensionASTNodes.concat(Ue)}))}function ye(G){var Xe;let ee=G.toConfig(),Ue=(Xe=l.get(G.name))!=null?Xe:[];return new Ve.GraphQLEnumType(K(k({},ee),{values:k(k({},ee.values),Pn(Ue)),extensionASTNodes:ee.extensionASTNodes.concat(Ue)}))}function Ce(G){var jt,Je;let ee=G.toConfig(),Ue=(jt=i.get(ee.name))!=null?jt:[],Xe=ee.specifiedByURL;for(let Ht of Ue)Xe=(Je=kM(Ht))!=null?Je:Xe;return new Ve.GraphQLScalarType(K(k({},ee),{specifiedByURL:Xe,extensionASTNodes:ee.extensionASTNodes.concat(Ue)}))}function ht(G){var Xe;let ee=G.toConfig(),Ue=(Xe=s.get(ee.name))!=null?Xe:[];return new Ve.GraphQLObjectType(K(k({},ee),{interfaces:()=>[...G.getInterfaces().map(Q),...on(Ue)],fields:()=>k(k({},dp(ee.fields,he)),bn(Ue)),extensionASTNodes:ee.extensionASTNodes.concat(Ue)}))}function xt(G){var Xe;let ee=G.toConfig(),Ue=(Xe=o.get(ee.name))!=null?Xe:[];return new Ve.GraphQLInterfaceType(K(k({},ee),{interfaces:()=>[...G.getInterfaces().map(Q),...on(Ue)],fields:()=>k(k({},dp(ee.fields,he)),bn(Ue)),extensionASTNodes:ee.extensionASTNodes.concat(Ue)}))}function B(G){var Xe;let ee=G.toConfig(),Ue=(Xe=u.get(ee.name))!=null?Xe:[];return new Ve.GraphQLUnionType(K(k({},ee),{types:()=>[...G.getTypes().map(Q),...$n(Ue)],extensionASTNodes:ee.extensionASTNodes.concat(Ue)}))}function he(G){return K(k({},G),{type:j(G.type),args:G.args&&dp(G.args,nt)})}function nt(G){return K(k({},G),{type:j(G.type)})}function Ct(G){var Ue;let ee={};for(let Xe of G){let jt=(Ue=Xe.operationTypes)!=null?Ue:[];for(let Je of jt)ee[Je.operation]=sn(Je.type)}return ee}function sn(G){var Xe;let ee=G.name.value,Ue=(Xe=PM.get(ee))!=null?Xe:_.get(ee);if(Ue===void 0)throw new Error(`Unknown type: "${ee}".`);return Ue}function Fn(G){return G.kind===Ve.Kind.LIST_TYPE?new Ve.GraphQLList(Fn(G.type)):G.kind===Ve.Kind.NON_NULL_TYPE?new Ve.GraphQLNonNull(Fn(G.type)):sn(G)}function _n(G){var ee;return new Ve.GraphQLDirective({name:G.name.value,description:(ee=G.description)==null?void 0:ee.value,locations:G.locations.map(({value:Ue})=>Ue),isRepeatable:G.repeatable,args:mi(G.arguments),astNode:G})}function bn(G){var Ue,Xe;let ee=Object.create(null);for(let jt of G){let Je=(Ue=jt.fields)!=null?Ue:[];for(let Ht of Je)ee[Ht.name.value]={type:Fn(Ht.type),description:(Xe=Ht.description)==null?void 0:Xe.value,args:mi(Ht.arguments),deprecationReason:cE(Ht),astNode:Ht}}return ee}function mi(G){var Xe;let ee=G!=null?G:[],Ue=Object.create(null);for(let jt of ee){let Je=Fn(jt.type);Ue[jt.name.value]={type:Je,description:(Xe=jt.description)==null?void 0:Xe.value,defaultValue:(0,Ve.valueFromAST)(jt.defaultValue,Je),deprecationReason:cE(jt),astNode:jt}}return Ue}function Xr(G){var Ue,Xe;let ee=Object.create(null);for(let jt of G){let Je=(Ue=jt.fields)!=null?Ue:[];for(let Ht of Je){let pa=Fn(Ht.type);ee[Ht.name.value]={type:pa,description:(Xe=Ht.description)==null?void 0:Xe.value,defaultValue:(0,Ve.valueFromAST)(Ht.defaultValue,pa),deprecationReason:cE(Ht),astNode:Ht}}}return ee}function Pn(G){var Ue,Xe;let ee=Object.create(null);for(let jt of G){let Je=(Ue=jt.values)!=null?Ue:[];for(let Ht of Je)ee[Ht.name.value]={description:(Xe=Ht.description)==null?void 0:Xe.value,deprecationReason:cE(Ht),astNode:Ht}}return ee}function on(G){return G.flatMap(ee=>{var Ue,Xe;return(Xe=(Ue=ee.interfaces)==null?void 0:Ue.map(sn))!=null?Xe:[]})}function $n(G){return G.flatMap(ee=>{var Ue,Xe;return(Xe=(Ue=ee.types)==null?void 0:Ue.map(sn))!=null?Xe:[]})}function U(G){var Ue,Xe,jt,Je,Ht,pa,Li,fa,id,Do,Gr,Wi;let ee=G.name.value;switch(G.kind){case Ve.Kind.OBJECT_TYPE_DEFINITION:{let cn=(Ue=s.get(ee))!=null?Ue:[],Qr=[G,...cn];return s.delete(ee),new Ve.GraphQLObjectType({name:ee,description:(Xe=G.description)==null?void 0:Xe.value,interfaces:()=>on(Qr),fields:()=>bn(Qr),astNode:G,extensionASTNodes:cn})}case Ve.Kind.INTERFACE_TYPE_DEFINITION:{let cn=(jt=o.get(ee))!=null?jt:[],Qr=[G,...cn];return o.delete(ee),new Ve.GraphQLInterfaceType({name:ee,description:(Je=G.description)==null?void 0:Je.value,interfaces:()=>on(Qr),fields:()=>bn(Qr),astNode:G,extensionASTNodes:cn})}case Ve.Kind.ENUM_TYPE_DEFINITION:{let cn=(Ht=l.get(ee))!=null?Ht:[],Qr=[G,...cn];return l.delete(ee),new Ve.GraphQLEnumType({name:ee,description:(pa=G.description)==null?void 0:pa.value,values:Pn(Qr),astNode:G,extensionASTNodes:cn})}case Ve.Kind.UNION_TYPE_DEFINITION:{let cn=(Li=u.get(ee))!=null?Li:[],Qr=[G,...cn];return u.delete(ee),new Ve.GraphQLUnionType({name:ee,description:(fa=G.description)==null?void 0:fa.value,types:()=>$n(Qr),astNode:G,extensionASTNodes:cn})}case Ve.Kind.SCALAR_TYPE_DEFINITION:{let cn=(id=i.get(ee))!=null?id:[];return i.delete(ee),new Ve.GraphQLScalarType({name:ee,description:(Do=G.description)==null?void 0:Do.value,specifiedByURL:kM(G),astNode:G,extensionASTNodes:cn})}case Ve.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let cn=(Gr=d.get(ee))!=null?Gr:[],Qr=[G,...cn];return d.delete(ee),new Ve.GraphQLInputObjectType({name:ee,description:(Wi=G.description)==null?void 0:Wi.value,fields:()=>Xr(Qr),astNode:G,extensionASTNodes:cn})}}}}var PM=new Map([...Ve.specifiedScalarTypes,...Ve.introspectionTypes].map(e=>[e.name,e]));function cE(e){let t=(0,Ve.getDirectiveValues)(Ve.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function kM(e){let t=(0,Ve.getDirectiveValues)(Ve.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}});var eD=V(Z0=>{"use strict";m();T();h();Object.defineProperty(Z0,"__esModule",{value:!0});Z0.buildASTSchema=o7;var CM=(we(),Me(je)),i7=lp(),s7=xM();function o7(e,t){(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,i7.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,s7.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let s of r.types)switch(s.name){case"Query":r.query=s;break;case"Mutation":r.mutation=s;break;case"Subscription":r.subscription=s;break}let i=[...r.directives,...CM.specifiedDirectives.filter(s=>r.directives.every(o=>o.name!==s.name))];return new CM.GraphQLSchema(K(k({},r),{directives:i}))}});var ps=V(Dt=>{"use strict";m();T();h();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.maxOrScopes=void 0;Dt.areSetsEqual=u7;Dt.getAllMutualEntries=c7;Dt.getOrThrowError=l7;Dt.getAllSetDisparities=d7;Dt.getEntriesNotInHashSet=p7;Dt.doSetsIntersect=f7;Dt.subtractSourceSetFromTargetSet=m7;Dt.mapToArrayOfValues=h7;Dt.numberToOrdinal=T7;Dt.addIterableValuesToSet=bl;Dt.addSetsAndReturnMutationBoolean=UM;Dt.kindToTypeString=y7;Dt.kindToConvertedTypeString=N7;Dt.fieldDatasToSimpleFieldDatas=E7;Dt.isNodeLeaf=g7;Dt.newEntityInterfaceFederationData=I7;Dt.upsertEntityInterfaceFederationData=v7;Dt.getValueOrDefault=MM;Dt.newEntityData=BM;Dt.upsertEntityDataProperties=_7;Dt.upsertEntityData=b7;Dt.newFieldAuthorizationData=nD;Dt.resetAuthorizationData=O7;Dt.getAuthorizationDataToUpdate=S7;Dt.newAuthorizationData=D7;Dt.mergeAuthorizationDataByAND=jM;Dt.upsertFieldAuthorizationData=$M;Dt.upsertAuthorizationData=A7;Dt.upsertAuthorizationConfiguration=R7;Dt.setAndGetValue=F7;Dt.generateSimpleDirective=w7;Dt.generateRequiresScopesDirective=L7;Dt.isNodeKindInterface=P7;Dt.addMapEntries=k7;Dt.getSingleSetEntry=x7;Dt.add=C7;var et=(we(),Me(je)),In=bi(),a7=To(),tD=Vi();function u7(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function c7(e,t){let n=new Set;for(let r of e)t.has(r)&&n.add(r);return n}function l7(e,t,n){let r=e.get(t);if(r===void 0)throw(0,a7.invalidKeyFatalError)(t,n);return r}function d7(e,t){let n=new Set(t),r=[];for(let i of e)n.delete(i)||r.push(i);for(let i of n)r.push(i);return r}function p7(e,t){let n=[];for(let r of e)t.has(r)||n.push(r);return n}function f7(e,t){for(let n of e)if(t.has(n))return!0;return!1}function m7(e,t){for(let n of e)t.delete(n)}function h7(e){let t=[];for(let n of e.values())t.push(n);return t}function T7(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 bl(e,t){for(let n of e)t.add(n)}function UM(e,t){let n=!1;for(let r of e)t.has(r)||(n=!0,t.add(r));return n}function y7(e){switch(e){case et.Kind.BOOLEAN:return In.BOOLEAN_SCALAR;case et.Kind.ENUM:case et.Kind.ENUM_TYPE_DEFINITION:return In.ENUM;case et.Kind.ENUM_TYPE_EXTENSION:return"Enum extension";case et.Kind.ENUM_VALUE_DEFINITION:return In.ENUM_VALUE;case et.Kind.FIELD_DEFINITION:return In.FIELD;case et.Kind.FLOAT:return In.FLOAT_SCALAR;case et.Kind.INPUT_OBJECT_TYPE_DEFINITION:return In.INPUT_OBJECT;case et.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"Input Object extension";case et.Kind.INPUT_VALUE_DEFINITION:return In.INPUT_VALUE;case et.Kind.INT:return In.INT_SCALAR;case et.Kind.INTERFACE_TYPE_DEFINITION:return In.INTERFACE;case et.Kind.INTERFACE_TYPE_EXTENSION:return"Interface extension";case et.Kind.NULL:return In.NULL;case et.Kind.OBJECT:case et.Kind.OBJECT_TYPE_DEFINITION:return In.OBJECT;case et.Kind.OBJECT_TYPE_EXTENSION:return"Object extension";case et.Kind.STRING:return In.STRING_SCALAR;case et.Kind.SCALAR_TYPE_DEFINITION:return In.SCALAR;case et.Kind.SCALAR_TYPE_EXTENSION:return"Scalar extension";case et.Kind.UNION_TYPE_DEFINITION:return In.UNION;case et.Kind.UNION_TYPE_EXTENSION:return"Union extension";default:return e}}function N7(e){switch(e){case et.Kind.BOOLEAN:return In.BOOLEAN_SCALAR;case et.Kind.ENUM:case et.Kind.ENUM_TYPE_DEFINITION:case et.Kind.ENUM_TYPE_EXTENSION:return In.ENUM;case et.Kind.ENUM_VALUE_DEFINITION:return In.ENUM_VALUE;case et.Kind.FIELD_DEFINITION:return In.FIELD;case et.Kind.FLOAT:return In.FLOAT_SCALAR;case et.Kind.INPUT_OBJECT_TYPE_DEFINITION:case et.Kind.INPUT_OBJECT_TYPE_EXTENSION:return In.INPUT_OBJECT;case et.Kind.INPUT_VALUE_DEFINITION:return In.INPUT_VALUE;case et.Kind.INT:return In.INT_SCALAR;case et.Kind.INTERFACE_TYPE_DEFINITION:case et.Kind.INTERFACE_TYPE_EXTENSION:return In.INTERFACE;case et.Kind.NULL:return In.NULL;case et.Kind.OBJECT:case et.Kind.OBJECT_TYPE_DEFINITION:case et.Kind.OBJECT_TYPE_EXTENSION:return In.OBJECT;case et.Kind.STRING:return In.STRING_SCALAR;case et.Kind.SCALAR_TYPE_DEFINITION:case et.Kind.SCALAR_TYPE_EXTENSION:return In.SCALAR;case et.Kind.UNION_TYPE_DEFINITION:case et.Kind.UNION_TYPE_EXTENSION:return In.UNION;default:return e}}function E7(e){let t=[];for(let{name:n,namedTypeName:r}of e)t.push({name:n,namedTypeName:r});return t}function g7(e){if(!e)return!0;switch(e){case et.Kind.OBJECT_TYPE_DEFINITION:case et.Kind.INTERFACE_TYPE_DEFINITION:case et.Kind.UNION_TYPE_DEFINITION:return!1;default:return!0}}function I7(e,t){return k({fieldDatasBySubgraphName:new Map().set(t,e.fieldDatas),interfaceFieldNames:new Set(e.interfaceFieldNames),interfaceObjectFieldNames:new Set(e.interfaceObjectFieldNames),interfaceObjectSubgraphs:new Set(e.isInterfaceObject?[t]:[]),typeName:e.typeName},e.isInterfaceObject?{}:{concreteTypeNames:new Set(e.concreteTypeNames)})}function v7(e,t,n){return e.fieldDatasBySubgraphName.set(n,t.fieldDatas),bl(t.interfaceFieldNames,e.interfaceFieldNames),bl(t.interfaceObjectFieldNames,e.interfaceObjectFieldNames),t.isInterfaceObject?(e.interfaceObjectSubgraphs.add(n),!1):e.concreteTypeNames?UM(t.concreteTypeNames||new Set,e.concreteTypeNames):(e.concreteTypeNames=new Set(t.concreteTypeNames),!1)}function MM(e,t,n){let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i}function BM(e){return{fieldNames:new Set(e.fieldNames),keyFieldSets:new Set(e.keyFieldSets),subgraphNames:new Set(e.subgraphNames),typeName:e.typeName}}function VM(e,t){bl(e.fieldNames||[],t.fieldNames),bl(e.keyFieldSets||[],t.keyFieldSets),bl(e.subgraphNames||[],t.subgraphNames)}function _7(e,t){let n=e.get(t.typeName);n?VM(t,n):e.set(t.typeName,BM(t))}function b7(e,t){let n=e.get(t.typeName);n?VM(t,n):e.set(t.typeName,t)}function nD(e){return{fieldName:e,requiresAuthentication:!1,requiredScopes:[]}}function O7(e){e&&(e.requiresAuthentication=!1,e.requiredScopes=[],e.hasParentLevelAuthorization=!1)}function S7(e,t,n){return t.kind===et.Kind.FIELD_DEFINITION?MM(e.fieldAuthorizationDataByFieldName,n,()=>nD(n)):(e.hasParentLevelAuthorization=!0,e)}function D7(e){return{fieldAuthorizationDataByFieldName:new Map,hasParentLevelAuthorization:!1,requiresAuthentication:!1,requiredScopes:[],typeName:e}}Dt.maxOrScopes=16;function jM(e,t){t.requiresAuthentication||(t.requiresAuthentication=e.requiresAuthentication);let n=e.requiredScopes.length;if(n<1)return!0;let r=t.requiredScopes.length;if(r<1){if(n>Dt.maxOrScopes)return!1;for(let s of e.requiredScopes)t.requiredScopes.push(new Set(s));return!0}if(n*r>Dt.maxOrScopes)return!1;let i=[];for(let s of t.requiredScopes)for(let o of e.requiredScopes){let u=new Set(s);bl(o,u),i.push(u)}return t.requiredScopes=i,!0}function $M(e,t){let n=t.fieldName,r=e.get(n);if(!r){if(t.requiredScopes.length>Dt.maxOrScopes)return!1;let i=nD(n);i.requiresAuthentication||(i.requiresAuthentication=t.requiresAuthentication);for(let s of t.requiredScopes)i.requiredScopes.push(new Set(s));return e.set(n,i),!0}return r.requiresAuthentication||(r.requiresAuthentication=t.requiresAuthentication),jM(t,r)}function A7(e,t,n){let r=e.get(t.typeName);if(!r){e.set(t.typeName,t);return}for(let[i,s]of t.fieldAuthorizationDataByFieldName)$M(r.fieldAuthorizationDataByFieldName,s)||n.add(`${t.typeName}.${i}`)}function R7(e,t){let n=t.typeName;for(let[r,i]of t.fieldAuthorizationDataByFieldName){let s=`${n}.${r}`,o=e.get(s);o?(o.requiresAuthentication=i.requiresAuthentication,o.requiredScopes=i.requiredScopes.map(u=>[...u])):e.set(s,{argumentNames:[],typeName:n,fieldName:r,requiresAuthentication:i.requiresAuthentication,requiredScopes:i.requiredScopes.map(u=>[...u])})}}function F7(e,t,n){return e.set(t,n),n}function w7(e){return{kind:et.Kind.DIRECTIVE,name:(0,tD.stringToNameNode)(e)}}function L7(e){let t=[];for(let n of e){let r=[];for(let i of n)r.push({kind:et.Kind.STRING,value:i});t.push({kind:et.Kind.LIST,values:r})}return{kind:et.Kind.DIRECTIVE,name:(0,tD.stringToNameNode)(In.REQUIRES_SCOPES),arguments:[{kind:et.Kind.ARGUMENT,name:(0,tD.stringToNameNode)(In.SCOPES),value:{kind:et.Kind.LIST,values:t}}]}}function P7(e){return e===et.Kind.INTERFACE_TYPE_DEFINITION||e===et.Kind.INTERFACE_TYPE_EXTENSION}function k7(e,t){for(let[n,r]of e)t.set(n,r)}function x7(e){for(let t of e)return t}function C7(e,t){return e.has(t)?!1:(e.add(t),!0)}});var _h=V(fp=>{"use strict";m();T();h();Object.defineProperty(fp,"__esModule",{value:!0});fp.MAX_SUBSCRIPTION_FILTER_DEPTH=fp.MAXIMUM_TYPE_NESTING=void 0;fp.MAXIMUM_TYPE_NESTING=30;fp.MAX_SUBSCRIPTION_FILTER_DEPTH=5});var To=V(Z=>{"use strict";m();T();h();Object.defineProperty(Z,"__esModule",{value:!0});Z.invalidEventProviderIdErrorMessage=Z.invalidNatsStreamConfigurationDefinitionErrorMessage=Z.undefinedNatsStreamConfigurationInputErrorMessage=Z.invalidEdfsPublishResultObjectErrorMessage=Z.invalidNatsStreamInputErrorMessage=Z.inlineFragmentInFieldSetErrorMessage=Z.inaccessibleQueryRootTypeError=Z.noQueryRootTypeError=Z.federationFactoryInitializationFatalError=Z.subgraphValidationFailureError=Z.minimumSubgraphRequirementError=void 0;Z.multipleNamedTypeDefinitionError=B7;Z.incompatibleExtensionError=V7;Z.incompatibleArgumentTypesError=j7;Z.incompatibleInputValueDefaultValueTypeError=$7;Z.incompatibleChildTypesError=q7;Z.incompatibleInputValueDefaultValuesError=K7;Z.incompatibleSharedEnumError=G7;Z.incompatibleExtensionKindsError=Q7;Z.invalidSubgraphNamesError=Y7;Z.duplicateDirectiveDefinitionError=J7;Z.duplicateEnumValueDefinitionError=z7;Z.duplicateFieldDefinitionError=H7;Z.duplicateInputFieldDefinitionError=W7;Z.duplicateImplementedInterfaceError=X7;Z.duplicateUnionMemberDefinitionError=Z7;Z.duplicateTypeDefinitionError=eZ;Z.duplicateOperationTypeDefinitionError=tZ;Z.noBaseDefinitionForExtensionError=nZ;Z.noBaseScalarDefinitionError=rZ;Z.noDefinedUnionMembersError=iZ;Z.noDefinedEnumValuesError=sZ;Z.operationDefinitionError=oZ;Z.invalidFieldShareabilityError=aZ;Z.undefinedDirectiveErrorMessage=uZ;Z.undefinedTypeError=cZ;Z.invalidRepeatedDirectiveErrorMessage=lZ;Z.invalidRepeatedFederatedDirectiveErrorMessage=dZ;Z.invalidDirectiveError=pZ;Z.invalidDirectiveLocationErrorMessage=fZ;Z.unexpectedDirectiveArgumentsErrorMessage=mZ;Z.undefinedRequiredArgumentsErrorMessage=hZ;Z.unexpectedDirectiveArgumentErrorMessage=TZ;Z.duplicateDirectiveArgumentDefinitionsErrorMessage=yZ;Z.invalidDirectiveArgumentTypeErrorMessage=NZ;Z.invalidKeyDirectiveArgumentErrorMessage=EZ;Z.invalidKeyDirectivesError=gZ;Z.maximumTypeNestingExceededError=IZ;Z.unexpectedKindFatalError=vZ;Z.incompatibleParentKindFatalError=_Z;Z.unexpectedEdgeFatalError=bZ;Z.incompatibleParentKindMergeError=OZ;Z.fieldTypeMergeFatalError=SZ;Z.unexpectedDirectiveLocationError=DZ;Z.unexpectedTypeNodeKindFatalError=AZ;Z.invalidKeyFatalError=RZ;Z.invalidConfigurationResultFatalError=FZ;Z.unexpectedParentKindErrorMessage=wZ;Z.unexpectedParentKindForChildError=LZ;Z.subgraphValidationError=PZ;Z.invalidSubgraphNameErrorMessage=kZ;Z.invalidOperationTypeDefinitionError=xZ;Z.invalidRootTypeDefinitionError=CZ;Z.subgraphInvalidSyntaxError=UZ;Z.invalidInterfaceImplementationError=MZ;Z.invalidRequiredInputValueError=BZ;Z.duplicateArgumentsError=VZ;Z.invalidArgumentsError=jZ;Z.expectedEntityError=$Z;Z.abstractTypeInKeyFieldSetErrorMessage=qZ;Z.unknownTypeInFieldSetErrorMessage=KZ;Z.invalidSelectionSetErrorMessage=GZ;Z.invalidSelectionSetDefinitionErrorMessage=QZ;Z.undefinedFieldInFieldSetErrorMessage=YZ;Z.unparsableFieldSetErrorMessage=JZ;Z.unparsableFieldSetSelectionErrorMessage=zZ;Z.undefinedObjectLikeParentError=HZ;Z.unexpectedArgumentErrorMessage=WZ;Z.argumentsInKeyFieldSetErrorMessage=XZ;Z.invalidProvidesOrRequiresDirectivesError=ZZ;Z.duplicateFieldInFieldSetErrorMessage=eee;Z.invalidConfigurationDataErrorMessage=tee;Z.incompatibleTypeWithProvidesErrorMessage=nee;Z.invalidInlineFragmentTypeErrorMessage=ree;Z.inlineFragmentWithoutTypeConditionErrorMessage=iee;Z.unknownInlineFragmentTypeConditionErrorMessage=see;Z.invalidInlineFragmentTypeConditionTypeErrorMessage=oee;Z.invalidInlineFragmentTypeConditionErrorMessage=aee;Z.invalidSelectionOnUnionErrorMessage=uee;Z.duplicateOverriddenFieldErrorMessage=cee;Z.duplicateOverriddenFieldsError=lee;Z.noFieldDefinitionsError=dee;Z.noInputValueDefinitionsError=pee;Z.allChildDefinitionsAreInaccessibleError=fee;Z.equivalentSourceAndTargetOverrideErrorMessage=mee;Z.undefinedEntityInterfaceImplementationsError=hee;Z.orScopesLimitError=Tee;Z.invalidEventDrivenGraphError=yee;Z.invalidRootTypeFieldEventsDirectivesErrorMessage=Nee;Z.invalidEventDrivenMutationResponseTypeErrorMessage=Eee;Z.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage=gee;Z.invalidNatsStreamInputFieldsErrorMessage=Iee;Z.invalidKeyFieldSetsEventDrivenErrorMessage=vee;Z.nonExternalKeyFieldNamesEventDrivenErrorMessage=_ee;Z.nonKeyFieldNamesEventDrivenErrorMessage=bee;Z.nonEntityObjectExtensionsEventDrivenErrorMessage=Oee;Z.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage=See;Z.invalidEdfsDirectiveName=Dee;Z.invalidImplementedTypeError=Aee;Z.selfImplementationError=Ree;Z.invalidEventSubjectErrorMessage=Fee;Z.invalidEventSubjectsErrorMessage=wee;Z.invalidEventSubjectsItemErrorMessage=Lee;Z.invalidEventDirectiveError=Pee;Z.invalidReferencesOfInaccessibleTypeError=kee;Z.inaccessibleRequiredArgumentError=xee;Z.invalidUnionMemberTypeError=Cee;Z.invalidRootTypeError=Uee;Z.invalidSubscriptionFilterLocationError=Mee;Z.invalidSubscriptionFilterDirectiveError=Bee;Z.subscriptionFilterNamedTypeErrorMessage=Vee;Z.subscriptionFilterConditionDepthExceededErrorMessage=jee;Z.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage=$ee;Z.subscriptionFilterConditionInvalidInputFieldErrorMessage=qee;Z.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage=Kee;Z.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage=Gee;Z.subscriptionFilterArrayConditionInvalidLengthErrorMessage=Qee;Z.invalidInputFieldTypeErrorMessage=Yee;Z.subscriptionFieldConditionInvalidInputFieldErrorMessage=Jee;Z.subscriptionFieldConditionInvalidValuesArrayErrorMessage=zee;Z.subscriptionFieldConditionEmptyValuesArrayErrorMessage=Hee;Z.unknownFieldSubgraphNameError=Wee;Z.invalidSubscriptionFieldConditionFieldPathErrorMessage=Xee;Z.invalidSubscriptionFieldConditionFieldPathParentErrorMessage=Zee;Z.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage=ete;Z.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage=tte;Z.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage=nte;Z.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage=rte;Z.unresolvablePathError=ite;Z.allExternalFieldInstancesError=ste;Z.externalInterfaceFieldsError=ote;Z.nonExternalConditionalFieldError=ate;Z.incompatibleFederatedFieldNamedTypeError=ute;Z.unknownNamedTypeErrorMessage=YM;Z.unknownNamedTypeError=cte;Z.unknownFieldDataError=lte;Z.unexpectedNonCompositeOutputTypeError=dte;Z.unimplementedInterfaceOutputTypeError=pte;var U7=Vi(),M7=(we(),Me(je)),bh=ps(),Et=bi(),qM=_h();Z.minimumSubgraphRequirementError=new Error("At least one subgraph is required for federation.");function B7(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 V7(e,t,n){return new Error(`Extension error: Incompatible types: "${e}" is type "${t}", but an extension of the same name is type "${n}.`)}function j7(e,t,n,r){return new Error(`Incompatible types when merging two instances of argument "${e}" on path "${t}": Expected type "${n}" but received "${r}"`)}function $7(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 q7(e,t,n){return new Error(`Incompatible types when merging two instances of "${e}": @@ -448,7 +448,7 @@ The discrepancies are as follows: .This should never happen. Please report this issue on GitHub.`)}function dte(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 pte(e){return new Error(`The Interface "${e}" is used as an output type without at least one Object type implementation defined in the schema.`)}});var zM=V(JM=>{"use strict";m();T();h();Object.defineProperty(JM,"__esModule",{value:!0})});var $a=V(Di=>{"use strict";m();T();h();Object.defineProperty(Di,"__esModule",{value:!0});Di.getMutableDirectiveDefinitionNode=mte;Di.getMutableEnumNode=hte;Di.getMutableEnumValueNode=Tte;Di.getMutableFieldNode=yte;Di.getMutableInputObjectNode=Nte;Di.getMutableInputValueNode=Ete;Di.getMutableInterfaceNode=gte;Di.getMutableObjectNode=Ite;Di.getMutableObjectExtensionNode=vte;Di.getMutableScalarNode=_te;Di.getMutableTypeNode=iD;Di.getMutableUnionNode=bte;Di.getTypeNodeNamedTypeName=sD;var Si=(we(),Me(je)),mp=Vi(),HM=To(),fte=_h();function mte(e){return{arguments:[],kind:e.kind,locations:[],name:k({},e.name),repeatable:e.repeatable,description:(0,mp.formatDescription)(e.description)}}function hte(e){return{kind:Si.Kind.ENUM_TYPE_DEFINITION,name:k({},e)}}function Tte(e){return{directives:[],kind:e.kind,name:k({},e.name),description:(0,mp.formatDescription)(e.description)}}function yte(e,t,n){return{arguments:[],directives:[],kind:e.kind,name:k({},e.name),type:iD(e.type,t,n),description:(0,mp.formatDescription)(e.description)}}function Nte(e){return{kind:Si.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:k({},e)}}function Ete(e,t,n){return{directives:[],kind:e.kind,name:k({},e.name),type:iD(e.type,t,n),defaultValue:e.defaultValue,description:(0,mp.formatDescription)(e.description)}}function gte(e){return{kind:Si.Kind.INTERFACE_TYPE_DEFINITION,name:k({},e)}}function Ite(e){return{kind:Si.Kind.OBJECT_TYPE_DEFINITION,name:k({},e)}}function vte(e){let t=e.kind===Si.Kind.OBJECT_TYPE_DEFINITION?e.description:void 0;return{kind:Si.Kind.OBJECT_TYPE_EXTENSION,name:k({},e.name),description:(0,mp.formatDescription)(t)}}function _te(e){return{kind:Si.Kind.SCALAR_TYPE_DEFINITION,name:k({},e)}}function iD(e,t,n){let r={kind:e.kind},i=r;for(let s=0;s{"use strict";m();T();h();Object.defineProperty(hp,"__esModule",{value:!0});hp.versionInfo=hp.version=void 0;var Ote="16.9.0";hp.version=Ote;var Ste=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});hp.versionInfo=Ste});var dE=V(oD=>{"use strict";m();T();h();Object.defineProperty(oD,"__esModule",{value:!0});oD.isPromise=Dte;function Dte(e){return typeof(e==null?void 0:e.then)=="function"}});var pE=V(aD=>{"use strict";m();T();h();Object.defineProperty(aD,"__esModule",{value:!0});aD.syntaxError=Rte;var Ate=at();function Rte(e,t,n){return new Ate.GraphQLError(`Syntax Error: ${n}`,{source:e,positions:[t]})}});var Sh=V(Oh=>{"use strict";m();T();h();Object.defineProperty(Oh,"__esModule",{value:!0});Oh.TokenKind=void 0;var uD;Oh.TokenKind=uD;(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"})(uD||(Oh.TokenKind=uD={}))});var mE=V(Ah=>{"use strict";m();T();h();Object.defineProperty(Ah,"__esModule",{value:!0});Ah.Lexer=void 0;Ah.isPunctuatorTokenKind=wte;var yo=pE(),ZM=qo(),Fte=zm(),Ol=bN(),Vt=Sh(),lD=class{constructor(t){let n=new ZM.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=Lte(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===Vt.TokenKind.COMMENT);return t}};Ah.Lexer=lD;function wte(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 Tp(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function fE(e,t){return eB(e.charCodeAt(t))&&tB(e.charCodeAt(t+1))}function eB(e){return e>=55296&&e<=56319}function tB(e){return e>=56320&&e<=57343}function Sl(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 Or(e,t,n,r,i){let s=e.line,o=1+n-e.lineStart;return new ZM.Token(t,n,r,s,o,i)}function Lte(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 Mte(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,yo.syntaxError)(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Bte(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,o=s,u="",l=[];for(;s{"use strict";m();T();h();Object.defineProperty(Rh,"__esModule",{value:!0});Rh.Source=void 0;Rh.isSource=qte;var dD=Oi(),jte=En(),$te=Gm(),hE=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||(0,dD.devAssert)(!1,`Body must be a string. Received: ${(0,jte.inspect)(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||(0,dD.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,dD.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};Rh.Source=hE;function qte(e){return(0,$te.instanceOf)(e,hE)}});var yp=V(Ic=>{"use strict";m();T();h();Object.defineProperty(Ic,"__esModule",{value:!0});Ic.Parser=void 0;Ic.parse=Gte;Ic.parseConstValue=Yte;Ic.parseType=Jte;Ic.parseValue=Qte;var Dl=pE(),Fh=qo(),Kte=tp(),gt=en(),rB=mE(),nB=TE(),Re=Sh();function Gte(e,t){return new Al(e,t).parseDocument()}function Qte(e,t){let n=new Al(e,t);n.expectToken(Re.TokenKind.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(Re.TokenKind.EOF),r}function Yte(e,t){let n=new Al(e,t);n.expectToken(Re.TokenKind.SOF);let r=n.parseConstValueLiteral();return n.expectToken(Re.TokenKind.EOF),r}function Jte(e,t){let n=new Al(e,t);n.expectToken(Re.TokenKind.SOF);let r=n.parseTypeReference();return n.expectToken(Re.TokenKind.EOF),r}var Al=class{constructor(t,n={}){let r=(0,nB.isSource)(t)?t:new nB.Source(t);this._lexer=new rB.Lexer(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(Re.TokenKind.NAME);return this.node(t,{kind:gt.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:gt.Kind.DOCUMENT,definitions:this.many(Re.TokenKind.SOF,this.parseDefinition,Re.TokenKind.EOF)})}parseDefinition(){if(this.peek(Re.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Re.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,Dl.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(Re.TokenKind.BRACE_L))return this.node(t,{kind:gt.Kind.OPERATION_DEFINITION,operation:Fh.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(Re.TokenKind.NAME)&&(r=this.parseName()),this.node(t,{kind:gt.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(Re.TokenKind.NAME);switch(t.value){case"query":return Fh.OperationTypeNode.QUERY;case"mutation":return Fh.OperationTypeNode.MUTATION;case"subscription":return Fh.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Re.TokenKind.PAREN_L,this.parseVariableDefinition,Re.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:gt.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Re.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Re.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(Re.TokenKind.DOLLAR),this.node(t,{kind:gt.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:gt.Kind.SELECTION_SET,selections:this.many(Re.TokenKind.BRACE_L,this.parseSelection,Re.TokenKind.BRACE_R)})}parseSelection(){return this.peek(Re.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(Re.TokenKind.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:gt.Kind.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Re.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Re.TokenKind.PAREN_L,n,Re.TokenKind.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(Re.TokenKind.COLON),this.node(n,{kind:gt.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(Re.TokenKind.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(Re.TokenKind.NAME)?this.node(t,{kind:gt.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:gt.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:gt.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:gt.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 Re.TokenKind.BRACKET_L:return this.parseList(t);case Re.TokenKind.BRACE_L:return this.parseObject(t);case Re.TokenKind.INT:return this.advanceLexer(),this.node(n,{kind:gt.Kind.INT,value:n.value});case Re.TokenKind.FLOAT:return this.advanceLexer(),this.node(n,{kind:gt.Kind.FLOAT,value:n.value});case Re.TokenKind.STRING:case Re.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case Re.TokenKind.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:gt.Kind.BOOLEAN,value:!0});case"false":return this.node(n,{kind:gt.Kind.BOOLEAN,value:!1});case"null":return this.node(n,{kind:gt.Kind.NULL});default:return this.node(n,{kind:gt.Kind.ENUM,value:n.value})}case Re.TokenKind.DOLLAR:if(t)if(this.expectToken(Re.TokenKind.DOLLAR),this._lexer.token.kind===Re.TokenKind.NAME){let r=this._lexer.token.value;throw(0,Dl.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:gt.Kind.STRING,value:t.value,block:t.kind===Re.TokenKind.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:gt.Kind.LIST,values:this.any(Re.TokenKind.BRACKET_L,n,Re.TokenKind.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:gt.Kind.OBJECT,fields:this.any(Re.TokenKind.BRACE_L,n,Re.TokenKind.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(Re.TokenKind.COLON),this.node(n,{kind:gt.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(Re.TokenKind.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(Re.TokenKind.AT),this.node(n,{kind:gt.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(Re.TokenKind.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(Re.TokenKind.BRACKET_R),n=this.node(t,{kind:gt.Kind.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Re.TokenKind.BANG)?this.node(t,{kind:gt.Kind.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:gt.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Re.TokenKind.STRING)||this.peek(Re.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(Re.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Re.TokenKind.BRACE_R);return this.node(t,{kind:gt.Kind.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(Re.TokenKind.COLON);let r=this.parseNamedType();return this.node(t,{kind:gt.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:gt.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(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:gt.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Re.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Re.TokenKind.BRACE_L,this.parseFieldDefinition,Re.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Re.TokenKind.COLON);let s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:gt.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(Re.TokenKind.PAREN_L,this.parseInputValueDef,Re.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Re.TokenKind.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(Re.TokenKind.EQUALS)&&(s=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:gt.Kind.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:gt.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:gt.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(Re.TokenKind.EQUALS)?this.delimitedMany(Re.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:gt.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(Re.TokenKind.BRACE_L,this.parseEnumValueDefinition,Re.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:gt.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,Dl.syntaxError)(this._lexer.source,this._lexer.token.start,`${yE(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(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:gt.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(Re.TokenKind.BRACE_L,this.parseInputValueDef,Re.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===Re.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(Re.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Re.TokenKind.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:gt.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:gt.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(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:gt.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:gt.Kind.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}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:gt.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:gt.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:gt.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(Re.TokenKind.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:gt.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Re.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(Kte.DirectiveLocation,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Fh.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,Dl.syntaxError)(this._lexer.source,n.start,`Expected ${iB(t)}, found ${yE(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===Re.TokenKind.NAME&&n.value===t)this.advanceLexer();else throw(0,Dl.syntaxError)(this._lexer.source,n.start,`Expected "${t}", found ${yE(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===Re.TokenKind.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return(0,Dl.syntaxError)(this._lexer.source,n.start,`Unexpected ${yE(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!==Re.TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw(0,Dl.syntaxError)(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};Ic.Parser=Al;function yE(e){let t=e.value;return iB(e.kind)+(t!=null?` "${t}"`:"")}function iB(e){return(0,rB.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var sB=V(pD=>{"use strict";m();T();h();Object.defineProperty(pD,"__esModule",{value:!0});pD.memoize3=zte;function zte(e){let t;return function(r,i,s){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(s);return l===void 0&&(l=e(r,i,s),u.set(s,l)),l}}});var oB=V(fD=>{"use strict";m();T();h();Object.defineProperty(fD,"__esModule",{value:!0});fD.promiseForObject=Hte;function Hte(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 aB=V(mD=>{"use strict";m();T();h();Object.defineProperty(mD,"__esModule",{value:!0});mD.promiseReduce=Xte;var Wte=dE();function Xte(e,t,n){let r=n;for(let i of e)r=(0,Wte.isPromise)(r)?r.then(s=>t(s,i)):t(r,i);return r}});var uB=V(TD=>{"use strict";m();T();h();Object.defineProperty(TD,"__esModule",{value:!0});TD.toError=ene;var Zte=En();function ene(e){return e instanceof Error?e:new hD(e)}var hD=class extends Error{constructor(t){super("Unexpected error value: "+(0,Zte.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var NE=V(yD=>{"use strict";m();T();h();Object.defineProperty(yD,"__esModule",{value:!0});yD.locatedError=rne;var tne=uB(),nne=at();function rne(e,t,n){var r;let i=(0,tne.toError)(e);return ine(i)?i:new nne.GraphQLError(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function ine(e){return Array.isArray(e.path)}});var Lh=V(Ms=>{"use strict";m();T();h();Object.defineProperty(Ms,"__esModule",{value:!0});Ms.assertValidExecutionArguments=TB;Ms.buildExecutionContext=yB;Ms.buildResolveInfo=EB;Ms.defaultTypeResolver=Ms.defaultFieldResolver=void 0;Ms.execute=hB;Ms.executeSync=dne;Ms.getFieldDef=IB;var ED=Oi(),Rl=En(),sne=ci(),one=KN(),vD=$o(),No=dE(),ane=sB(),Fl=hh(),cB=oB(),une=aB(),Us=at(),gE=NE(),ND=qo(),lB=en(),vc=tn(),Np=xs(),cne=ph(),fB=sE(),mB=up(),lne=(0,ane.memoize3)((e,t,n)=>(0,fB.collectSubfields)(e.schema,e.fragments,e.variableValues,t,n));function hB(e){arguments.length<2||(0,ED.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;TB(t,n,r);let s=yB(e);if(!("schema"in s))return{errors:s};try{let{operation:o}=s,u=pne(s,o,i);return(0,No.isPromise)(u)?u.then(l=>EE(l,s.errors),l=>(s.errors.push(l),EE(null,s.errors))):EE(u,s.errors)}catch(o){return s.errors.push(o),EE(null,s.errors)}}function dne(e){let t=hB(e);if((0,No.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function EE(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function TB(e,t,n){t||(0,ED.devAssert)(!1,"Must provide document."),(0,cne.assertValidSchema)(e),n==null||(0,vD.isObjectLike)(n)||(0,ED.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 yB(e){var t,n;let{schema:r,document:i,rootValue:s,contextValue:o,variableValues:u,operationName:l,fieldResolver:d,typeResolver:p,subscribeFieldResolver:y}=e,N,I=Object.create(null);for(let j of i.definitions)switch(j.kind){case lB.Kind.OPERATION_DEFINITION:if(l==null){if(N!==void 0)return[new Us.GraphQLError("Must provide operation name if query contains multiple operations.")];N=j}else((t=j.name)===null||t===void 0?void 0:t.value)===l&&(N=j);break;case lB.Kind.FRAGMENT_DEFINITION:I[j.name.value]=j;break;default:}if(!N)return l!=null?[new Us.GraphQLError(`Unknown operation named "${l}".`)]:[new Us.GraphQLError("Must provide an operation.")];let b=(n=N.variableDefinitions)!==null&&n!==void 0?n:[],x=(0,mB.getVariableValues)(r,b,u!=null?u:{},{maxErrors:50});return x.errors?x.errors:{schema:r,fragments:I,rootValue:s,contextValue:o,operation:N,variableValues:x.coerced,fieldResolver:d!=null?d:ID,typeResolver:p!=null?p:gB,subscribeFieldResolver:y!=null?y:ID,errors:[]}}function pne(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new Us.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=(0,fB.collectFields)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),s=void 0;switch(t.operation){case ND.OperationTypeNode.QUERY:return IE(e,r,n,s,i);case ND.OperationTypeNode.MUTATION:return fne(e,r,n,s,i);case ND.OperationTypeNode.SUBSCRIPTION:return IE(e,r,n,s,i)}}function fne(e,t,n,r,i){return(0,une.promiseReduce)(i.entries(),(s,[o,u])=>{let l=(0,Fl.addPath)(r,o,t.name),d=NB(e,t,n,u,l);return d===void 0?s:(0,No.isPromise)(d)?d.then(p=>(s[o]=p,s)):(s[o]=d,s)},Object.create(null))}function IE(e,t,n,r,i){let s=Object.create(null),o=!1;try{for(let[u,l]of i.entries()){let d=(0,Fl.addPath)(r,u,t.name),p=NB(e,t,n,l,d);p!==void 0&&(s[u]=p,(0,No.isPromise)(p)&&(o=!0))}}catch(u){if(o)return(0,cB.promiseForObject)(s).finally(()=>{throw u});throw u}return o?(0,cB.promiseForObject)(s):s}function NB(e,t,n,r,i){var s;let o=IB(e.schema,t,r[0]);if(!o)return;let u=o.type,l=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,d=EB(e,o,r,t,i);try{let p=(0,mB.getArgumentValues)(o,r[0],e.variableValues),y=e.contextValue,N=l(n,p,y,d),I;return(0,No.isPromise)(N)?I=N.then(b=>wh(e,u,r,d,i,b)):I=wh(e,u,r,d,i,N),(0,No.isPromise)(I)?I.then(void 0,b=>{let x=(0,gE.locatedError)(b,r,(0,Fl.pathToArray)(i));return vE(x,u,e)}):I}catch(p){let y=(0,gE.locatedError)(p,r,(0,Fl.pathToArray)(i));return vE(y,u,e)}}function EB(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 vE(e,t,n){if((0,vc.isNonNullType)(t))throw e;return n.errors.push(e),null}function wh(e,t,n,r,i,s){if(s instanceof Error)throw s;if((0,vc.isNonNullType)(t)){let o=wh(e,t.ofType,n,r,i,s);if(o===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return o}if(s==null)return null;if((0,vc.isListType)(t))return mne(e,t,n,r,i,s);if((0,vc.isLeafType)(t))return hne(t,s);if((0,vc.isAbstractType)(t))return Tne(e,t,n,r,i,s);if((0,vc.isObjectType)(t))return gD(e,t,n,r,i,s);(0,sne.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,Rl.inspect)(t))}function mne(e,t,n,r,i,s){if(!(0,one.isIterableObject)(s))throw new Us.GraphQLError(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);let o=t.ofType,u=!1,l=Array.from(s,(d,p)=>{let y=(0,Fl.addPath)(i,p,void 0);try{let N;return(0,No.isPromise)(d)?N=d.then(I=>wh(e,o,n,r,y,I)):N=wh(e,o,n,r,y,d),(0,No.isPromise)(N)?(u=!0,N.then(void 0,I=>{let b=(0,gE.locatedError)(I,n,(0,Fl.pathToArray)(y));return vE(b,o,e)})):N}catch(N){let I=(0,gE.locatedError)(N,n,(0,Fl.pathToArray)(y));return vE(I,o,e)}});return u?Promise.all(l):l}function hne(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${(0,Rl.inspect)(e)}.serialize(${(0,Rl.inspect)(t)})\` to return non-nullable value, returned: ${(0,Rl.inspect)(n)}`);return n}function Tne(e,t,n,r,i,s){var o;let u=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,l=e.contextValue,d=u(s,l,r,t);return(0,No.isPromise)(d)?d.then(p=>gD(e,dB(p,e,t,n,r,s),n,r,i,s)):gD(e,dB(d,e,t,n,r,s),n,r,i,s)}function dB(e,t,n,r,i,s){if(e==null)throw new Us.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,vc.isObjectType)(e))throw new Us.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 Us.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,Rl.inspect)(s)}, received "${(0,Rl.inspect)(e)}".`);let o=t.schema.getType(e);if(o==null)throw new Us.GraphQLError(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!(0,vc.isObjectType)(o))throw new Us.GraphQLError(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new Us.GraphQLError(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function gD(e,t,n,r,i,s){let o=lne(e,t,n);if(t.isTypeOf){let u=t.isTypeOf(s,e.contextValue,r);if((0,No.isPromise)(u))return u.then(l=>{if(!l)throw pB(t,s,n);return IE(e,t,s,i,o)});if(!u)throw pB(t,s,n)}return IE(e,t,s,i,o)}function pB(e,t,n){return new Us.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,Rl.inspect)(t)}.`,{nodes:n})}var gB=function(e,t,n,r){if((0,vD.isObjectLike)(e)&&typeof e.__typename=="string")return e.__typename;let i=n.schema.getPossibleTypes(r),s=[];for(let o=0;o{for(let u=0;u{"use strict";m();T();h();Object.defineProperty(_E,"__esModule",{value:!0});_E.graphql=_ne;_E.graphqlSync=bne;var yne=Oi(),Nne=dE(),Ene=yp(),gne=ph(),Ine=lp(),vne=Lh();function _ne(e){return new Promise(t=>t(vB(e)))}function bne(e){let t=vB(e);if((0,Nne.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function vB(e){arguments.length<2||(0,yne.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:s,operationName:o,fieldResolver:u,typeResolver:l}=e,d=(0,gne.validateSchema)(t);if(d.length>0)return{errors:d};let p;try{p=(0,Ene.parse)(n)}catch(N){return{errors:[N]}}let y=(0,Ine.validate)(t,p);return y.length>0?{errors:y}:(0,vne.execute)({schema:t,document:p,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:u,typeResolver:l})}});var SB=V(be=>{"use strict";m();T();h();Object.defineProperty(be,"__esModule",{value:!0});Object.defineProperty(be,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return Eo.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(be,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return qa.GRAPHQL_MAX_INT}});Object.defineProperty(be,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return qa.GRAPHQL_MIN_INT}});Object.defineProperty(be,"GraphQLBoolean",{enumerable:!0,get:function(){return qa.GraphQLBoolean}});Object.defineProperty(be,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return Eo.GraphQLDeprecatedDirective}});Object.defineProperty(be,"GraphQLDirective",{enumerable:!0,get:function(){return Eo.GraphQLDirective}});Object.defineProperty(be,"GraphQLEnumType",{enumerable:!0,get:function(){return Tt.GraphQLEnumType}});Object.defineProperty(be,"GraphQLFloat",{enumerable:!0,get:function(){return qa.GraphQLFloat}});Object.defineProperty(be,"GraphQLID",{enumerable:!0,get:function(){return qa.GraphQLID}});Object.defineProperty(be,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return Eo.GraphQLIncludeDirective}});Object.defineProperty(be,"GraphQLInputObjectType",{enumerable:!0,get:function(){return Tt.GraphQLInputObjectType}});Object.defineProperty(be,"GraphQLInt",{enumerable:!0,get:function(){return qa.GraphQLInt}});Object.defineProperty(be,"GraphQLInterfaceType",{enumerable:!0,get:function(){return Tt.GraphQLInterfaceType}});Object.defineProperty(be,"GraphQLList",{enumerable:!0,get:function(){return Tt.GraphQLList}});Object.defineProperty(be,"GraphQLNonNull",{enumerable:!0,get:function(){return Tt.GraphQLNonNull}});Object.defineProperty(be,"GraphQLObjectType",{enumerable:!0,get:function(){return Tt.GraphQLObjectType}});Object.defineProperty(be,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return Eo.GraphQLOneOfDirective}});Object.defineProperty(be,"GraphQLScalarType",{enumerable:!0,get:function(){return Tt.GraphQLScalarType}});Object.defineProperty(be,"GraphQLSchema",{enumerable:!0,get:function(){return _D.GraphQLSchema}});Object.defineProperty(be,"GraphQLSkipDirective",{enumerable:!0,get:function(){return Eo.GraphQLSkipDirective}});Object.defineProperty(be,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return Eo.GraphQLSpecifiedByDirective}});Object.defineProperty(be,"GraphQLString",{enumerable:!0,get:function(){return qa.GraphQLString}});Object.defineProperty(be,"GraphQLUnionType",{enumerable:!0,get:function(){return Tt.GraphQLUnionType}});Object.defineProperty(be,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return qi.SchemaMetaFieldDef}});Object.defineProperty(be,"TypeKind",{enumerable:!0,get:function(){return qi.TypeKind}});Object.defineProperty(be,"TypeMetaFieldDef",{enumerable:!0,get:function(){return qi.TypeMetaFieldDef}});Object.defineProperty(be,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return qi.TypeNameMetaFieldDef}});Object.defineProperty(be,"__Directive",{enumerable:!0,get:function(){return qi.__Directive}});Object.defineProperty(be,"__DirectiveLocation",{enumerable:!0,get:function(){return qi.__DirectiveLocation}});Object.defineProperty(be,"__EnumValue",{enumerable:!0,get:function(){return qi.__EnumValue}});Object.defineProperty(be,"__Field",{enumerable:!0,get:function(){return qi.__Field}});Object.defineProperty(be,"__InputValue",{enumerable:!0,get:function(){return qi.__InputValue}});Object.defineProperty(be,"__Schema",{enumerable:!0,get:function(){return qi.__Schema}});Object.defineProperty(be,"__Type",{enumerable:!0,get:function(){return qi.__Type}});Object.defineProperty(be,"__TypeKind",{enumerable:!0,get:function(){return qi.__TypeKind}});Object.defineProperty(be,"assertAbstractType",{enumerable:!0,get:function(){return Tt.assertAbstractType}});Object.defineProperty(be,"assertCompositeType",{enumerable:!0,get:function(){return Tt.assertCompositeType}});Object.defineProperty(be,"assertDirective",{enumerable:!0,get:function(){return Eo.assertDirective}});Object.defineProperty(be,"assertEnumType",{enumerable:!0,get:function(){return Tt.assertEnumType}});Object.defineProperty(be,"assertEnumValueName",{enumerable:!0,get:function(){return OB.assertEnumValueName}});Object.defineProperty(be,"assertInputObjectType",{enumerable:!0,get:function(){return Tt.assertInputObjectType}});Object.defineProperty(be,"assertInputType",{enumerable:!0,get:function(){return Tt.assertInputType}});Object.defineProperty(be,"assertInterfaceType",{enumerable:!0,get:function(){return Tt.assertInterfaceType}});Object.defineProperty(be,"assertLeafType",{enumerable:!0,get:function(){return Tt.assertLeafType}});Object.defineProperty(be,"assertListType",{enumerable:!0,get:function(){return Tt.assertListType}});Object.defineProperty(be,"assertName",{enumerable:!0,get:function(){return OB.assertName}});Object.defineProperty(be,"assertNamedType",{enumerable:!0,get:function(){return Tt.assertNamedType}});Object.defineProperty(be,"assertNonNullType",{enumerable:!0,get:function(){return Tt.assertNonNullType}});Object.defineProperty(be,"assertNullableType",{enumerable:!0,get:function(){return Tt.assertNullableType}});Object.defineProperty(be,"assertObjectType",{enumerable:!0,get:function(){return Tt.assertObjectType}});Object.defineProperty(be,"assertOutputType",{enumerable:!0,get:function(){return Tt.assertOutputType}});Object.defineProperty(be,"assertScalarType",{enumerable:!0,get:function(){return Tt.assertScalarType}});Object.defineProperty(be,"assertSchema",{enumerable:!0,get:function(){return _D.assertSchema}});Object.defineProperty(be,"assertType",{enumerable:!0,get:function(){return Tt.assertType}});Object.defineProperty(be,"assertUnionType",{enumerable:!0,get:function(){return Tt.assertUnionType}});Object.defineProperty(be,"assertValidSchema",{enumerable:!0,get:function(){return bB.assertValidSchema}});Object.defineProperty(be,"assertWrappingType",{enumerable:!0,get:function(){return Tt.assertWrappingType}});Object.defineProperty(be,"getNamedType",{enumerable:!0,get:function(){return Tt.getNamedType}});Object.defineProperty(be,"getNullableType",{enumerable:!0,get:function(){return Tt.getNullableType}});Object.defineProperty(be,"introspectionTypes",{enumerable:!0,get:function(){return qi.introspectionTypes}});Object.defineProperty(be,"isAbstractType",{enumerable:!0,get:function(){return Tt.isAbstractType}});Object.defineProperty(be,"isCompositeType",{enumerable:!0,get:function(){return Tt.isCompositeType}});Object.defineProperty(be,"isDirective",{enumerable:!0,get:function(){return Eo.isDirective}});Object.defineProperty(be,"isEnumType",{enumerable:!0,get:function(){return Tt.isEnumType}});Object.defineProperty(be,"isInputObjectType",{enumerable:!0,get:function(){return Tt.isInputObjectType}});Object.defineProperty(be,"isInputType",{enumerable:!0,get:function(){return Tt.isInputType}});Object.defineProperty(be,"isInterfaceType",{enumerable:!0,get:function(){return Tt.isInterfaceType}});Object.defineProperty(be,"isIntrospectionType",{enumerable:!0,get:function(){return qi.isIntrospectionType}});Object.defineProperty(be,"isLeafType",{enumerable:!0,get:function(){return Tt.isLeafType}});Object.defineProperty(be,"isListType",{enumerable:!0,get:function(){return Tt.isListType}});Object.defineProperty(be,"isNamedType",{enumerable:!0,get:function(){return Tt.isNamedType}});Object.defineProperty(be,"isNonNullType",{enumerable:!0,get:function(){return Tt.isNonNullType}});Object.defineProperty(be,"isNullableType",{enumerable:!0,get:function(){return Tt.isNullableType}});Object.defineProperty(be,"isObjectType",{enumerable:!0,get:function(){return Tt.isObjectType}});Object.defineProperty(be,"isOutputType",{enumerable:!0,get:function(){return Tt.isOutputType}});Object.defineProperty(be,"isRequiredArgument",{enumerable:!0,get:function(){return Tt.isRequiredArgument}});Object.defineProperty(be,"isRequiredInputField",{enumerable:!0,get:function(){return Tt.isRequiredInputField}});Object.defineProperty(be,"isScalarType",{enumerable:!0,get:function(){return Tt.isScalarType}});Object.defineProperty(be,"isSchema",{enumerable:!0,get:function(){return _D.isSchema}});Object.defineProperty(be,"isSpecifiedDirective",{enumerable:!0,get:function(){return Eo.isSpecifiedDirective}});Object.defineProperty(be,"isSpecifiedScalarType",{enumerable:!0,get:function(){return qa.isSpecifiedScalarType}});Object.defineProperty(be,"isType",{enumerable:!0,get:function(){return Tt.isType}});Object.defineProperty(be,"isUnionType",{enumerable:!0,get:function(){return Tt.isUnionType}});Object.defineProperty(be,"isWrappingType",{enumerable:!0,get:function(){return Tt.isWrappingType}});Object.defineProperty(be,"resolveObjMapThunk",{enumerable:!0,get:function(){return Tt.resolveObjMapThunk}});Object.defineProperty(be,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return Tt.resolveReadonlyArrayThunk}});Object.defineProperty(be,"specifiedDirectives",{enumerable:!0,get:function(){return Eo.specifiedDirectives}});Object.defineProperty(be,"specifiedScalarTypes",{enumerable:!0,get:function(){return qa.specifiedScalarTypes}});Object.defineProperty(be,"validateSchema",{enumerable:!0,get:function(){return bB.validateSchema}});var _D=El(),Tt=tn(),Eo=ji(),qa=Qo(),qi=xs(),bB=ph(),OB=Hm()});var AB=V(an=>{"use strict";m();T();h();Object.defineProperty(an,"__esModule",{value:!0});Object.defineProperty(an,"BREAK",{enumerable:!0,get:function(){return Ph.BREAK}});Object.defineProperty(an,"DirectiveLocation",{enumerable:!0,get:function(){return wne.DirectiveLocation}});Object.defineProperty(an,"Kind",{enumerable:!0,get:function(){return Dne.Kind}});Object.defineProperty(an,"Lexer",{enumerable:!0,get:function(){return Rne.Lexer}});Object.defineProperty(an,"Location",{enumerable:!0,get:function(){return bD.Location}});Object.defineProperty(an,"OperationTypeNode",{enumerable:!0,get:function(){return bD.OperationTypeNode}});Object.defineProperty(an,"Source",{enumerable:!0,get:function(){return One.Source}});Object.defineProperty(an,"Token",{enumerable:!0,get:function(){return bD.Token}});Object.defineProperty(an,"TokenKind",{enumerable:!0,get:function(){return Ane.TokenKind}});Object.defineProperty(an,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Ph.getEnterLeaveForKind}});Object.defineProperty(an,"getLocation",{enumerable:!0,get:function(){return Sne.getLocation}});Object.defineProperty(an,"getVisitFn",{enumerable:!0,get:function(){return Ph.getVisitFn}});Object.defineProperty(an,"isConstValueNode",{enumerable:!0,get:function(){return Ho.isConstValueNode}});Object.defineProperty(an,"isDefinitionNode",{enumerable:!0,get:function(){return Ho.isDefinitionNode}});Object.defineProperty(an,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Ho.isExecutableDefinitionNode}});Object.defineProperty(an,"isSelectionNode",{enumerable:!0,get:function(){return Ho.isSelectionNode}});Object.defineProperty(an,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Ho.isTypeDefinitionNode}});Object.defineProperty(an,"isTypeExtensionNode",{enumerable:!0,get:function(){return Ho.isTypeExtensionNode}});Object.defineProperty(an,"isTypeNode",{enumerable:!0,get:function(){return Ho.isTypeNode}});Object.defineProperty(an,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Ho.isTypeSystemDefinitionNode}});Object.defineProperty(an,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Ho.isTypeSystemExtensionNode}});Object.defineProperty(an,"isValueNode",{enumerable:!0,get:function(){return Ho.isValueNode}});Object.defineProperty(an,"parse",{enumerable:!0,get:function(){return bE.parse}});Object.defineProperty(an,"parseConstValue",{enumerable:!0,get:function(){return bE.parseConstValue}});Object.defineProperty(an,"parseType",{enumerable:!0,get:function(){return bE.parseType}});Object.defineProperty(an,"parseValue",{enumerable:!0,get:function(){return bE.parseValue}});Object.defineProperty(an,"print",{enumerable:!0,get:function(){return Fne.print}});Object.defineProperty(an,"printLocation",{enumerable:!0,get:function(){return DB.printLocation}});Object.defineProperty(an,"printSourceLocation",{enumerable:!0,get:function(){return DB.printSourceLocation}});Object.defineProperty(an,"visit",{enumerable:!0,get:function(){return Ph.visit}});Object.defineProperty(an,"visitInParallel",{enumerable:!0,get:function(){return Ph.visitInParallel}});var One=TE(),Sne=yN(),DB=pO(),Dne=en(),Ane=Sh(),Rne=mE(),bE=yp(),Fne=ds(),Ph=pl(),bD=qo(),Ho=Il(),wne=tp()});var RB=V(OD=>{"use strict";m();T();h();Object.defineProperty(OD,"__esModule",{value:!0});OD.isAsyncIterable=Lne;function Lne(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}});var FB=V(SD=>{"use strict";m();T();h();Object.defineProperty(SD,"__esModule",{value:!0});SD.mapAsyncIterator=Pne;function Pne(e,t){let n=e[Symbol.asyncIterator]();function r(s){return yr(this,null,function*(){if(s.done)return s;try{return{value:yield t(s.value),done:!1}}catch(o){if(typeof n.return=="function")try{yield n.return()}catch(u){}throw o}})}return{next(){return yr(this,null,function*(){return r(yield n.next())})},return(){return yr(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(s){return yr(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(s));throw s})},[Symbol.asyncIterator](){return this}}}});var kB=V(OE=>{"use strict";m();T();h();Object.defineProperty(OE,"__esModule",{value:!0});OE.createSourceEventStream=PB;OE.subscribe=Vne;var kne=Oi(),xne=En(),LB=RB(),wB=hh(),DD=at(),Cne=NE(),Une=sE(),kh=Lh(),Mne=FB(),Bne=up();function Vne(t){return yr(this,arguments,function*(e){arguments.length<2||(0,kne.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield PB(e);if(!(0,LB.isAsyncIterable)(n))return n;let r=i=>(0,kh.execute)(K(k({},e),{rootValue:i}));return(0,Mne.mapAsyncIterator)(n,r)})}function jne(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 PB(...e){return yr(this,null,function*(){let t=jne(e),{schema:n,document:r,variableValues:i}=t;(0,kh.assertValidExecutionArguments)(n,r,i);let s=(0,kh.buildExecutionContext)(t);if(!("schema"in s))return{errors:s};try{let o=yield $ne(s);if(!(0,LB.isAsyncIterable)(o))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,xne.inspect)(o)}.`);return o}catch(o){if(o instanceof DD.GraphQLError)return{errors:[o]};throw o}})}function $ne(e){return yr(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:s}=e,o=t.getSubscriptionType();if(o==null)throw new DD.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:r});let u=(0,Une.collectFields)(t,n,i,o,r.selectionSet),[l,d]=[...u.entries()][0],p=(0,kh.getFieldDef)(t,o,d[0]);if(!p){let b=d[0].name.value;throw new DD.GraphQLError(`The subscription field "${b}" is not defined.`,{nodes:d})}let y=(0,wB.addPath)(void 0,l,o.name),N=(0,kh.buildResolveInfo)(e,p,d,o,y);try{var I;let b=(0,Bne.getArgumentValues)(p,d[0],i),x=e.contextValue,Q=yield((I=p.subscribe)!==null&&I!==void 0?I:e.subscribeFieldResolver)(s,b,x,N);if(Q instanceof Error)throw Q;return Q}catch(b){throw(0,Cne.locatedError)(b,d,(0,wB.pathToArray)(y))}})}});var CB=V(Bs=>{"use strict";m();T();h();Object.defineProperty(Bs,"__esModule",{value:!0});Object.defineProperty(Bs,"createSourceEventStream",{enumerable:!0,get:function(){return xB.createSourceEventStream}});Object.defineProperty(Bs,"defaultFieldResolver",{enumerable:!0,get:function(){return SE.defaultFieldResolver}});Object.defineProperty(Bs,"defaultTypeResolver",{enumerable:!0,get:function(){return SE.defaultTypeResolver}});Object.defineProperty(Bs,"execute",{enumerable:!0,get:function(){return SE.execute}});Object.defineProperty(Bs,"executeSync",{enumerable:!0,get:function(){return SE.executeSync}});Object.defineProperty(Bs,"getArgumentValues",{enumerable:!0,get:function(){return AD.getArgumentValues}});Object.defineProperty(Bs,"getDirectiveValues",{enumerable:!0,get:function(){return AD.getDirectiveValues}});Object.defineProperty(Bs,"getVariableValues",{enumerable:!0,get:function(){return AD.getVariableValues}});Object.defineProperty(Bs,"responsePathAsArray",{enumerable:!0,get:function(){return qne.pathToArray}});Object.defineProperty(Bs,"subscribe",{enumerable:!0,get:function(){return xB.subscribe}});var qne=hh(),SE=Lh(),xB=kB(),AD=up()});var UB=V(wD=>{"use strict";m();T();h();Object.defineProperty(wD,"__esModule",{value:!0});wD.NoDeprecatedCustomRule=Kne;var RD=ci(),xh=at(),FD=tn();function Kne(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,RD.invariant)(!1),e.reportError(new xh.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 xh.GraphQLError(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{let s=e.getParentType(),o=e.getFieldDef();s!=null&&o!=null||(0,RD.invariant)(!1),e.reportError(new xh.GraphQLError(`Field "${s.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=(0,FD.getNamedType)(e.getParentInputType());if((0,FD.isInputObjectType)(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new xh.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,FD.getNamedType)(e.getInputType());i!=null||(0,RD.invariant)(!1),e.reportError(new xh.GraphQLError(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}});var MB=V(LD=>{"use strict";m();T();h();Object.defineProperty(LD,"__esModule",{value:!0});LD.NoSchemaIntrospectionCustomRule=Jne;var Gne=at(),Qne=tn(),Yne=xs();function Jne(e){return{Field(t){let n=(0,Qne.getNamedType)(e.getType());n&&(0,Yne.isIntrospectionType)(n)&&e.reportError(new Gne.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var VB=V(At=>{"use strict";m();T();h();Object.defineProperty(At,"__esModule",{value:!0});Object.defineProperty(At,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return Wne.ExecutableDefinitionsRule}});Object.defineProperty(At,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return Xne.FieldsOnCorrectTypeRule}});Object.defineProperty(At,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return Zne.FragmentsOnCompositeTypesRule}});Object.defineProperty(At,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return ere.KnownArgumentNamesRule}});Object.defineProperty(At,"KnownDirectivesRule",{enumerable:!0,get:function(){return tre.KnownDirectivesRule}});Object.defineProperty(At,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return nre.KnownFragmentNamesRule}});Object.defineProperty(At,"KnownTypeNamesRule",{enumerable:!0,get:function(){return rre.KnownTypeNamesRule}});Object.defineProperty(At,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return ire.LoneAnonymousOperationRule}});Object.defineProperty(At,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return bre.LoneSchemaDefinitionRule}});Object.defineProperty(At,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return _re.MaxIntrospectionDepthRule}});Object.defineProperty(At,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return Lre.NoDeprecatedCustomRule}});Object.defineProperty(At,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return sre.NoFragmentCyclesRule}});Object.defineProperty(At,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return Pre.NoSchemaIntrospectionCustomRule}});Object.defineProperty(At,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return ore.NoUndefinedVariablesRule}});Object.defineProperty(At,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return are.NoUnusedFragmentsRule}});Object.defineProperty(At,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return ure.NoUnusedVariablesRule}});Object.defineProperty(At,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return cre.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(At,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return lre.PossibleFragmentSpreadsRule}});Object.defineProperty(At,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return wre.PossibleTypeExtensionsRule}});Object.defineProperty(At,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return dre.ProvidedRequiredArgumentsRule}});Object.defineProperty(At,"ScalarLeafsRule",{enumerable:!0,get:function(){return pre.ScalarLeafsRule}});Object.defineProperty(At,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return fre.SingleFieldSubscriptionsRule}});Object.defineProperty(At,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return Rre.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(At,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return mre.UniqueArgumentNamesRule}});Object.defineProperty(At,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return Fre.UniqueDirectiveNamesRule}});Object.defineProperty(At,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return hre.UniqueDirectivesPerLocationRule}});Object.defineProperty(At,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return Dre.UniqueEnumValueNamesRule}});Object.defineProperty(At,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return Are.UniqueFieldDefinitionNamesRule}});Object.defineProperty(At,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return Tre.UniqueFragmentNamesRule}});Object.defineProperty(At,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return yre.UniqueInputFieldNamesRule}});Object.defineProperty(At,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return Nre.UniqueOperationNamesRule}});Object.defineProperty(At,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return Ore.UniqueOperationTypesRule}});Object.defineProperty(At,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return Sre.UniqueTypeNamesRule}});Object.defineProperty(At,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return Ere.UniqueVariableNamesRule}});Object.defineProperty(At,"ValidationContext",{enumerable:!0,get:function(){return Hne.ValidationContext}});Object.defineProperty(At,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return gre.ValuesOfCorrectTypeRule}});Object.defineProperty(At,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return Ire.VariablesAreInputTypesRule}});Object.defineProperty(At,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return vre.VariablesInAllowedPositionRule}});Object.defineProperty(At,"recommendedRules",{enumerable:!0,get:function(){return BB.recommendedRules}});Object.defineProperty(At,"specifiedRules",{enumerable:!0,get:function(){return BB.specifiedRules}});Object.defineProperty(At,"validate",{enumerable:!0,get:function(){return zne.validate}});var zne=lp(),Hne=W0(),BB=J0(),Wne=dS(),Xne=fS(),Zne=hS(),ere=TS(),tre=gS(),nre=vS(),rre=OS(),ire=DS(),sre=PS(),ore=xS(),are=US(),ure=BS(),cre=zS(),lre=XS(),dre=n0(),pre=i0(),fre=f0(),mre=N0(),hre=_0(),Tre=F0(),yre=L0(),Nre=k0(),Ere=V0(),gre=q0(),Ire=G0(),vre=Y0(),_re=wS(),bre=RS(),Ore=C0(),Sre=M0(),Dre=O0(),Are=A0(),Rre=T0(),Fre=g0(),wre=e0(),Lre=UB(),Pre=MB()});var jB=V(wl=>{"use strict";m();T();h();Object.defineProperty(wl,"__esModule",{value:!0});Object.defineProperty(wl,"GraphQLError",{enumerable:!0,get:function(){return PD.GraphQLError}});Object.defineProperty(wl,"formatError",{enumerable:!0,get:function(){return PD.formatError}});Object.defineProperty(wl,"locatedError",{enumerable:!0,get:function(){return xre.locatedError}});Object.defineProperty(wl,"printError",{enumerable:!0,get:function(){return PD.printError}});Object.defineProperty(wl,"syntaxError",{enumerable:!0,get:function(){return kre.syntaxError}});var PD=at(),kre=pE(),xre=NE()});var xD=V(kD=>{"use strict";m();T();h();Object.defineProperty(kD,"__esModule",{value:!0});kD.getIntrospectionQuery=Cre;function Cre(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":"",s=t.schemaDescription?n:"";function o(l){return t.inputValueDeprecation?l:""}let u=t.oneOf?"isOneOf":"";return` +`));return e.line+=l.length-1,e.lineStart=i,p}if(d===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){u+=n.slice(o,s),o=s+1,s+=4;continue}if(d===10||d===13){u+=n.slice(o,s),l.push(u),d===13&&n.charCodeAt(s+1)===10?s+=2:++s,u="",o=s,i=s;continue}if(Tp(d))++s;else if(fE(n,s))s+=2;else throw(0,yo.syntaxError)(e.source,s,`Invalid character within String: ${Sl(e,s)}.`)}throw(0,yo.syntaxError)(e.source,s,"Unterminated string.")}function Vte(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i{"use strict";m();T();h();Object.defineProperty(Rh,"__esModule",{value:!0});Rh.Source=void 0;Rh.isSource=qte;var dD=Oi(),jte=En(),$te=Gm(),hE=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||(0,dD.devAssert)(!1,`Body must be a string. Received: ${(0,jte.inspect)(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||(0,dD.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,dD.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};Rh.Source=hE;function qte(e){return(0,$te.instanceOf)(e,hE)}});var yp=V(Ic=>{"use strict";m();T();h();Object.defineProperty(Ic,"__esModule",{value:!0});Ic.Parser=void 0;Ic.parse=Gte;Ic.parseConstValue=Yte;Ic.parseType=Jte;Ic.parseValue=Qte;var Dl=pE(),Fh=qo(),Kte=tp(),gt=en(),rB=mE(),nB=TE(),Re=Sh();function Gte(e,t){return new Al(e,t).parseDocument()}function Qte(e,t){let n=new Al(e,t);n.expectToken(Re.TokenKind.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(Re.TokenKind.EOF),r}function Yte(e,t){let n=new Al(e,t);n.expectToken(Re.TokenKind.SOF);let r=n.parseConstValueLiteral();return n.expectToken(Re.TokenKind.EOF),r}function Jte(e,t){let n=new Al(e,t);n.expectToken(Re.TokenKind.SOF);let r=n.parseTypeReference();return n.expectToken(Re.TokenKind.EOF),r}var Al=class{constructor(t,n={}){let r=(0,nB.isSource)(t)?t:new nB.Source(t);this._lexer=new rB.Lexer(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(Re.TokenKind.NAME);return this.node(t,{kind:gt.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:gt.Kind.DOCUMENT,definitions:this.many(Re.TokenKind.SOF,this.parseDefinition,Re.TokenKind.EOF)})}parseDefinition(){if(this.peek(Re.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Re.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,Dl.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(Re.TokenKind.BRACE_L))return this.node(t,{kind:gt.Kind.OPERATION_DEFINITION,operation:Fh.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(Re.TokenKind.NAME)&&(r=this.parseName()),this.node(t,{kind:gt.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(Re.TokenKind.NAME);switch(t.value){case"query":return Fh.OperationTypeNode.QUERY;case"mutation":return Fh.OperationTypeNode.MUTATION;case"subscription":return Fh.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Re.TokenKind.PAREN_L,this.parseVariableDefinition,Re.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:gt.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Re.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Re.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(Re.TokenKind.DOLLAR),this.node(t,{kind:gt.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:gt.Kind.SELECTION_SET,selections:this.many(Re.TokenKind.BRACE_L,this.parseSelection,Re.TokenKind.BRACE_R)})}parseSelection(){return this.peek(Re.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(Re.TokenKind.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:gt.Kind.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Re.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Re.TokenKind.PAREN_L,n,Re.TokenKind.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(Re.TokenKind.COLON),this.node(n,{kind:gt.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(Re.TokenKind.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(Re.TokenKind.NAME)?this.node(t,{kind:gt.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:gt.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:gt.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:gt.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 Re.TokenKind.BRACKET_L:return this.parseList(t);case Re.TokenKind.BRACE_L:return this.parseObject(t);case Re.TokenKind.INT:return this.advanceLexer(),this.node(n,{kind:gt.Kind.INT,value:n.value});case Re.TokenKind.FLOAT:return this.advanceLexer(),this.node(n,{kind:gt.Kind.FLOAT,value:n.value});case Re.TokenKind.STRING:case Re.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case Re.TokenKind.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:gt.Kind.BOOLEAN,value:!0});case"false":return this.node(n,{kind:gt.Kind.BOOLEAN,value:!1});case"null":return this.node(n,{kind:gt.Kind.NULL});default:return this.node(n,{kind:gt.Kind.ENUM,value:n.value})}case Re.TokenKind.DOLLAR:if(t)if(this.expectToken(Re.TokenKind.DOLLAR),this._lexer.token.kind===Re.TokenKind.NAME){let r=this._lexer.token.value;throw(0,Dl.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:gt.Kind.STRING,value:t.value,block:t.kind===Re.TokenKind.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:gt.Kind.LIST,values:this.any(Re.TokenKind.BRACKET_L,n,Re.TokenKind.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:gt.Kind.OBJECT,fields:this.any(Re.TokenKind.BRACE_L,n,Re.TokenKind.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(Re.TokenKind.COLON),this.node(n,{kind:gt.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(Re.TokenKind.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(Re.TokenKind.AT),this.node(n,{kind:gt.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(Re.TokenKind.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(Re.TokenKind.BRACKET_R),n=this.node(t,{kind:gt.Kind.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Re.TokenKind.BANG)?this.node(t,{kind:gt.Kind.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:gt.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Re.TokenKind.STRING)||this.peek(Re.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(Re.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Re.TokenKind.BRACE_R);return this.node(t,{kind:gt.Kind.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(Re.TokenKind.COLON);let r=this.parseNamedType();return this.node(t,{kind:gt.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:gt.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(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:gt.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Re.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Re.TokenKind.BRACE_L,this.parseFieldDefinition,Re.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Re.TokenKind.COLON);let s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:gt.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(Re.TokenKind.PAREN_L,this.parseInputValueDef,Re.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Re.TokenKind.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(Re.TokenKind.EQUALS)&&(s=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:gt.Kind.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:gt.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:gt.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(Re.TokenKind.EQUALS)?this.delimitedMany(Re.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:gt.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(Re.TokenKind.BRACE_L,this.parseEnumValueDefinition,Re.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:gt.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,Dl.syntaxError)(this._lexer.source,this._lexer.token.start,`${yE(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(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:gt.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(Re.TokenKind.BRACE_L,this.parseInputValueDef,Re.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===Re.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(Re.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Re.TokenKind.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:gt.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:gt.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(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:gt.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:gt.Kind.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}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:gt.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:gt.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:gt.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(Re.TokenKind.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:gt.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Re.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(Kte.DirectiveLocation,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Fh.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,Dl.syntaxError)(this._lexer.source,n.start,`Expected ${iB(t)}, found ${yE(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===Re.TokenKind.NAME&&n.value===t)this.advanceLexer();else throw(0,Dl.syntaxError)(this._lexer.source,n.start,`Expected "${t}", found ${yE(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===Re.TokenKind.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return(0,Dl.syntaxError)(this._lexer.source,n.start,`Unexpected ${yE(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!==Re.TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw(0,Dl.syntaxError)(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};Ic.Parser=Al;function yE(e){let t=e.value;return iB(e.kind)+(t!=null?` "${t}"`:"")}function iB(e){return(0,rB.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var sB=V(pD=>{"use strict";m();T();h();Object.defineProperty(pD,"__esModule",{value:!0});pD.memoize3=zte;function zte(e){let t;return function(r,i,s){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(s);return l===void 0&&(l=e(r,i,s),u.set(s,l)),l}}});var oB=V(fD=>{"use strict";m();T();h();Object.defineProperty(fD,"__esModule",{value:!0});fD.promiseForObject=Hte;function Hte(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 aB=V(mD=>{"use strict";m();T();h();Object.defineProperty(mD,"__esModule",{value:!0});mD.promiseReduce=Xte;var Wte=dE();function Xte(e,t,n){let r=n;for(let i of e)r=(0,Wte.isPromise)(r)?r.then(s=>t(s,i)):t(r,i);return r}});var uB=V(TD=>{"use strict";m();T();h();Object.defineProperty(TD,"__esModule",{value:!0});TD.toError=ene;var Zte=En();function ene(e){return e instanceof Error?e:new hD(e)}var hD=class extends Error{constructor(t){super("Unexpected error value: "+(0,Zte.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var NE=V(yD=>{"use strict";m();T();h();Object.defineProperty(yD,"__esModule",{value:!0});yD.locatedError=rne;var tne=uB(),nne=at();function rne(e,t,n){var r;let i=(0,tne.toError)(e);return ine(i)?i:new nne.GraphQLError(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function ine(e){return Array.isArray(e.path)}});var Lh=V(Ms=>{"use strict";m();T();h();Object.defineProperty(Ms,"__esModule",{value:!0});Ms.assertValidExecutionArguments=TB;Ms.buildExecutionContext=yB;Ms.buildResolveInfo=EB;Ms.defaultTypeResolver=Ms.defaultFieldResolver=void 0;Ms.execute=hB;Ms.executeSync=dne;Ms.getFieldDef=IB;var ED=Oi(),Rl=En(),sne=ci(),one=KN(),vD=$o(),No=dE(),ane=sB(),Fl=hh(),cB=oB(),une=aB(),Us=at(),gE=NE(),ND=qo(),lB=en(),vc=tn(),Np=xs(),cne=ph(),fB=sE(),mB=up(),lne=(0,ane.memoize3)((e,t,n)=>(0,fB.collectSubfields)(e.schema,e.fragments,e.variableValues,t,n));function hB(e){arguments.length<2||(0,ED.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;TB(t,n,r);let s=yB(e);if(!("schema"in s))return{errors:s};try{let{operation:o}=s,u=pne(s,o,i);return(0,No.isPromise)(u)?u.then(l=>EE(l,s.errors),l=>(s.errors.push(l),EE(null,s.errors))):EE(u,s.errors)}catch(o){return s.errors.push(o),EE(null,s.errors)}}function dne(e){let t=hB(e);if((0,No.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function EE(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function TB(e,t,n){t||(0,ED.devAssert)(!1,"Must provide document."),(0,cne.assertValidSchema)(e),n==null||(0,vD.isObjectLike)(n)||(0,ED.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 yB(e){var t,n;let{schema:r,document:i,rootValue:s,contextValue:o,variableValues:u,operationName:l,fieldResolver:d,typeResolver:p,subscribeFieldResolver:y}=e,N,I=Object.create(null);for(let j of i.definitions)switch(j.kind){case lB.Kind.OPERATION_DEFINITION:if(l==null){if(N!==void 0)return[new Us.GraphQLError("Must provide operation name if query contains multiple operations.")];N=j}else((t=j.name)===null||t===void 0?void 0:t.value)===l&&(N=j);break;case lB.Kind.FRAGMENT_DEFINITION:I[j.name.value]=j;break;default:}if(!N)return l!=null?[new Us.GraphQLError(`Unknown operation named "${l}".`)]:[new Us.GraphQLError("Must provide an operation.")];let _=(n=N.variableDefinitions)!==null&&n!==void 0?n:[],C=(0,mB.getVariableValues)(r,_,u!=null?u:{},{maxErrors:50});return C.errors?C.errors:{schema:r,fragments:I,rootValue:s,contextValue:o,operation:N,variableValues:C.coerced,fieldResolver:d!=null?d:ID,typeResolver:p!=null?p:gB,subscribeFieldResolver:y!=null?y:ID,errors:[]}}function pne(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new Us.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=(0,fB.collectFields)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),s=void 0;switch(t.operation){case ND.OperationTypeNode.QUERY:return IE(e,r,n,s,i);case ND.OperationTypeNode.MUTATION:return fne(e,r,n,s,i);case ND.OperationTypeNode.SUBSCRIPTION:return IE(e,r,n,s,i)}}function fne(e,t,n,r,i){return(0,une.promiseReduce)(i.entries(),(s,[o,u])=>{let l=(0,Fl.addPath)(r,o,t.name),d=NB(e,t,n,u,l);return d===void 0?s:(0,No.isPromise)(d)?d.then(p=>(s[o]=p,s)):(s[o]=d,s)},Object.create(null))}function IE(e,t,n,r,i){let s=Object.create(null),o=!1;try{for(let[u,l]of i.entries()){let d=(0,Fl.addPath)(r,u,t.name),p=NB(e,t,n,l,d);p!==void 0&&(s[u]=p,(0,No.isPromise)(p)&&(o=!0))}}catch(u){if(o)return(0,cB.promiseForObject)(s).finally(()=>{throw u});throw u}return o?(0,cB.promiseForObject)(s):s}function NB(e,t,n,r,i){var s;let o=IB(e.schema,t,r[0]);if(!o)return;let u=o.type,l=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,d=EB(e,o,r,t,i);try{let p=(0,mB.getArgumentValues)(o,r[0],e.variableValues),y=e.contextValue,N=l(n,p,y,d),I;return(0,No.isPromise)(N)?I=N.then(_=>wh(e,u,r,d,i,_)):I=wh(e,u,r,d,i,N),(0,No.isPromise)(I)?I.then(void 0,_=>{let C=(0,gE.locatedError)(_,r,(0,Fl.pathToArray)(i));return vE(C,u,e)}):I}catch(p){let y=(0,gE.locatedError)(p,r,(0,Fl.pathToArray)(i));return vE(y,u,e)}}function EB(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 vE(e,t,n){if((0,vc.isNonNullType)(t))throw e;return n.errors.push(e),null}function wh(e,t,n,r,i,s){if(s instanceof Error)throw s;if((0,vc.isNonNullType)(t)){let o=wh(e,t.ofType,n,r,i,s);if(o===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return o}if(s==null)return null;if((0,vc.isListType)(t))return mne(e,t,n,r,i,s);if((0,vc.isLeafType)(t))return hne(t,s);if((0,vc.isAbstractType)(t))return Tne(e,t,n,r,i,s);if((0,vc.isObjectType)(t))return gD(e,t,n,r,i,s);(0,sne.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,Rl.inspect)(t))}function mne(e,t,n,r,i,s){if(!(0,one.isIterableObject)(s))throw new Us.GraphQLError(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);let o=t.ofType,u=!1,l=Array.from(s,(d,p)=>{let y=(0,Fl.addPath)(i,p,void 0);try{let N;return(0,No.isPromise)(d)?N=d.then(I=>wh(e,o,n,r,y,I)):N=wh(e,o,n,r,y,d),(0,No.isPromise)(N)?(u=!0,N.then(void 0,I=>{let _=(0,gE.locatedError)(I,n,(0,Fl.pathToArray)(y));return vE(_,o,e)})):N}catch(N){let I=(0,gE.locatedError)(N,n,(0,Fl.pathToArray)(y));return vE(I,o,e)}});return u?Promise.all(l):l}function hne(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${(0,Rl.inspect)(e)}.serialize(${(0,Rl.inspect)(t)})\` to return non-nullable value, returned: ${(0,Rl.inspect)(n)}`);return n}function Tne(e,t,n,r,i,s){var o;let u=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,l=e.contextValue,d=u(s,l,r,t);return(0,No.isPromise)(d)?d.then(p=>gD(e,dB(p,e,t,n,r,s),n,r,i,s)):gD(e,dB(d,e,t,n,r,s),n,r,i,s)}function dB(e,t,n,r,i,s){if(e==null)throw new Us.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,vc.isObjectType)(e))throw new Us.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 Us.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,Rl.inspect)(s)}, received "${(0,Rl.inspect)(e)}".`);let o=t.schema.getType(e);if(o==null)throw new Us.GraphQLError(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!(0,vc.isObjectType)(o))throw new Us.GraphQLError(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new Us.GraphQLError(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function gD(e,t,n,r,i,s){let o=lne(e,t,n);if(t.isTypeOf){let u=t.isTypeOf(s,e.contextValue,r);if((0,No.isPromise)(u))return u.then(l=>{if(!l)throw pB(t,s,n);return IE(e,t,s,i,o)});if(!u)throw pB(t,s,n)}return IE(e,t,s,i,o)}function pB(e,t,n){return new Us.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,Rl.inspect)(t)}.`,{nodes:n})}var gB=function(e,t,n,r){if((0,vD.isObjectLike)(e)&&typeof e.__typename=="string")return e.__typename;let i=n.schema.getPossibleTypes(r),s=[];for(let o=0;o{for(let u=0;u{"use strict";m();T();h();Object.defineProperty(_E,"__esModule",{value:!0});_E.graphql=_ne;_E.graphqlSync=bne;var yne=Oi(),Nne=dE(),Ene=yp(),gne=ph(),Ine=lp(),vne=Lh();function _ne(e){return new Promise(t=>t(vB(e)))}function bne(e){let t=vB(e);if((0,Nne.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function vB(e){arguments.length<2||(0,yne.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:s,operationName:o,fieldResolver:u,typeResolver:l}=e,d=(0,gne.validateSchema)(t);if(d.length>0)return{errors:d};let p;try{p=(0,Ene.parse)(n)}catch(N){return{errors:[N]}}let y=(0,Ine.validate)(t,p);return y.length>0?{errors:y}:(0,vne.execute)({schema:t,document:p,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:u,typeResolver:l})}});var SB=V(be=>{"use strict";m();T();h();Object.defineProperty(be,"__esModule",{value:!0});Object.defineProperty(be,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return Eo.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(be,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return qa.GRAPHQL_MAX_INT}});Object.defineProperty(be,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return qa.GRAPHQL_MIN_INT}});Object.defineProperty(be,"GraphQLBoolean",{enumerable:!0,get:function(){return qa.GraphQLBoolean}});Object.defineProperty(be,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return Eo.GraphQLDeprecatedDirective}});Object.defineProperty(be,"GraphQLDirective",{enumerable:!0,get:function(){return Eo.GraphQLDirective}});Object.defineProperty(be,"GraphQLEnumType",{enumerable:!0,get:function(){return Tt.GraphQLEnumType}});Object.defineProperty(be,"GraphQLFloat",{enumerable:!0,get:function(){return qa.GraphQLFloat}});Object.defineProperty(be,"GraphQLID",{enumerable:!0,get:function(){return qa.GraphQLID}});Object.defineProperty(be,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return Eo.GraphQLIncludeDirective}});Object.defineProperty(be,"GraphQLInputObjectType",{enumerable:!0,get:function(){return Tt.GraphQLInputObjectType}});Object.defineProperty(be,"GraphQLInt",{enumerable:!0,get:function(){return qa.GraphQLInt}});Object.defineProperty(be,"GraphQLInterfaceType",{enumerable:!0,get:function(){return Tt.GraphQLInterfaceType}});Object.defineProperty(be,"GraphQLList",{enumerable:!0,get:function(){return Tt.GraphQLList}});Object.defineProperty(be,"GraphQLNonNull",{enumerable:!0,get:function(){return Tt.GraphQLNonNull}});Object.defineProperty(be,"GraphQLObjectType",{enumerable:!0,get:function(){return Tt.GraphQLObjectType}});Object.defineProperty(be,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return Eo.GraphQLOneOfDirective}});Object.defineProperty(be,"GraphQLScalarType",{enumerable:!0,get:function(){return Tt.GraphQLScalarType}});Object.defineProperty(be,"GraphQLSchema",{enumerable:!0,get:function(){return _D.GraphQLSchema}});Object.defineProperty(be,"GraphQLSkipDirective",{enumerable:!0,get:function(){return Eo.GraphQLSkipDirective}});Object.defineProperty(be,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return Eo.GraphQLSpecifiedByDirective}});Object.defineProperty(be,"GraphQLString",{enumerable:!0,get:function(){return qa.GraphQLString}});Object.defineProperty(be,"GraphQLUnionType",{enumerable:!0,get:function(){return Tt.GraphQLUnionType}});Object.defineProperty(be,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return qi.SchemaMetaFieldDef}});Object.defineProperty(be,"TypeKind",{enumerable:!0,get:function(){return qi.TypeKind}});Object.defineProperty(be,"TypeMetaFieldDef",{enumerable:!0,get:function(){return qi.TypeMetaFieldDef}});Object.defineProperty(be,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return qi.TypeNameMetaFieldDef}});Object.defineProperty(be,"__Directive",{enumerable:!0,get:function(){return qi.__Directive}});Object.defineProperty(be,"__DirectiveLocation",{enumerable:!0,get:function(){return qi.__DirectiveLocation}});Object.defineProperty(be,"__EnumValue",{enumerable:!0,get:function(){return qi.__EnumValue}});Object.defineProperty(be,"__Field",{enumerable:!0,get:function(){return qi.__Field}});Object.defineProperty(be,"__InputValue",{enumerable:!0,get:function(){return qi.__InputValue}});Object.defineProperty(be,"__Schema",{enumerable:!0,get:function(){return qi.__Schema}});Object.defineProperty(be,"__Type",{enumerable:!0,get:function(){return qi.__Type}});Object.defineProperty(be,"__TypeKind",{enumerable:!0,get:function(){return qi.__TypeKind}});Object.defineProperty(be,"assertAbstractType",{enumerable:!0,get:function(){return Tt.assertAbstractType}});Object.defineProperty(be,"assertCompositeType",{enumerable:!0,get:function(){return Tt.assertCompositeType}});Object.defineProperty(be,"assertDirective",{enumerable:!0,get:function(){return Eo.assertDirective}});Object.defineProperty(be,"assertEnumType",{enumerable:!0,get:function(){return Tt.assertEnumType}});Object.defineProperty(be,"assertEnumValueName",{enumerable:!0,get:function(){return OB.assertEnumValueName}});Object.defineProperty(be,"assertInputObjectType",{enumerable:!0,get:function(){return Tt.assertInputObjectType}});Object.defineProperty(be,"assertInputType",{enumerable:!0,get:function(){return Tt.assertInputType}});Object.defineProperty(be,"assertInterfaceType",{enumerable:!0,get:function(){return Tt.assertInterfaceType}});Object.defineProperty(be,"assertLeafType",{enumerable:!0,get:function(){return Tt.assertLeafType}});Object.defineProperty(be,"assertListType",{enumerable:!0,get:function(){return Tt.assertListType}});Object.defineProperty(be,"assertName",{enumerable:!0,get:function(){return OB.assertName}});Object.defineProperty(be,"assertNamedType",{enumerable:!0,get:function(){return Tt.assertNamedType}});Object.defineProperty(be,"assertNonNullType",{enumerable:!0,get:function(){return Tt.assertNonNullType}});Object.defineProperty(be,"assertNullableType",{enumerable:!0,get:function(){return Tt.assertNullableType}});Object.defineProperty(be,"assertObjectType",{enumerable:!0,get:function(){return Tt.assertObjectType}});Object.defineProperty(be,"assertOutputType",{enumerable:!0,get:function(){return Tt.assertOutputType}});Object.defineProperty(be,"assertScalarType",{enumerable:!0,get:function(){return Tt.assertScalarType}});Object.defineProperty(be,"assertSchema",{enumerable:!0,get:function(){return _D.assertSchema}});Object.defineProperty(be,"assertType",{enumerable:!0,get:function(){return Tt.assertType}});Object.defineProperty(be,"assertUnionType",{enumerable:!0,get:function(){return Tt.assertUnionType}});Object.defineProperty(be,"assertValidSchema",{enumerable:!0,get:function(){return bB.assertValidSchema}});Object.defineProperty(be,"assertWrappingType",{enumerable:!0,get:function(){return Tt.assertWrappingType}});Object.defineProperty(be,"getNamedType",{enumerable:!0,get:function(){return Tt.getNamedType}});Object.defineProperty(be,"getNullableType",{enumerable:!0,get:function(){return Tt.getNullableType}});Object.defineProperty(be,"introspectionTypes",{enumerable:!0,get:function(){return qi.introspectionTypes}});Object.defineProperty(be,"isAbstractType",{enumerable:!0,get:function(){return Tt.isAbstractType}});Object.defineProperty(be,"isCompositeType",{enumerable:!0,get:function(){return Tt.isCompositeType}});Object.defineProperty(be,"isDirective",{enumerable:!0,get:function(){return Eo.isDirective}});Object.defineProperty(be,"isEnumType",{enumerable:!0,get:function(){return Tt.isEnumType}});Object.defineProperty(be,"isInputObjectType",{enumerable:!0,get:function(){return Tt.isInputObjectType}});Object.defineProperty(be,"isInputType",{enumerable:!0,get:function(){return Tt.isInputType}});Object.defineProperty(be,"isInterfaceType",{enumerable:!0,get:function(){return Tt.isInterfaceType}});Object.defineProperty(be,"isIntrospectionType",{enumerable:!0,get:function(){return qi.isIntrospectionType}});Object.defineProperty(be,"isLeafType",{enumerable:!0,get:function(){return Tt.isLeafType}});Object.defineProperty(be,"isListType",{enumerable:!0,get:function(){return Tt.isListType}});Object.defineProperty(be,"isNamedType",{enumerable:!0,get:function(){return Tt.isNamedType}});Object.defineProperty(be,"isNonNullType",{enumerable:!0,get:function(){return Tt.isNonNullType}});Object.defineProperty(be,"isNullableType",{enumerable:!0,get:function(){return Tt.isNullableType}});Object.defineProperty(be,"isObjectType",{enumerable:!0,get:function(){return Tt.isObjectType}});Object.defineProperty(be,"isOutputType",{enumerable:!0,get:function(){return Tt.isOutputType}});Object.defineProperty(be,"isRequiredArgument",{enumerable:!0,get:function(){return Tt.isRequiredArgument}});Object.defineProperty(be,"isRequiredInputField",{enumerable:!0,get:function(){return Tt.isRequiredInputField}});Object.defineProperty(be,"isScalarType",{enumerable:!0,get:function(){return Tt.isScalarType}});Object.defineProperty(be,"isSchema",{enumerable:!0,get:function(){return _D.isSchema}});Object.defineProperty(be,"isSpecifiedDirective",{enumerable:!0,get:function(){return Eo.isSpecifiedDirective}});Object.defineProperty(be,"isSpecifiedScalarType",{enumerable:!0,get:function(){return qa.isSpecifiedScalarType}});Object.defineProperty(be,"isType",{enumerable:!0,get:function(){return Tt.isType}});Object.defineProperty(be,"isUnionType",{enumerable:!0,get:function(){return Tt.isUnionType}});Object.defineProperty(be,"isWrappingType",{enumerable:!0,get:function(){return Tt.isWrappingType}});Object.defineProperty(be,"resolveObjMapThunk",{enumerable:!0,get:function(){return Tt.resolveObjMapThunk}});Object.defineProperty(be,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return Tt.resolveReadonlyArrayThunk}});Object.defineProperty(be,"specifiedDirectives",{enumerable:!0,get:function(){return Eo.specifiedDirectives}});Object.defineProperty(be,"specifiedScalarTypes",{enumerable:!0,get:function(){return qa.specifiedScalarTypes}});Object.defineProperty(be,"validateSchema",{enumerable:!0,get:function(){return bB.validateSchema}});var _D=El(),Tt=tn(),Eo=ji(),qa=Qo(),qi=xs(),bB=ph(),OB=Hm()});var AB=V(an=>{"use strict";m();T();h();Object.defineProperty(an,"__esModule",{value:!0});Object.defineProperty(an,"BREAK",{enumerable:!0,get:function(){return Ph.BREAK}});Object.defineProperty(an,"DirectiveLocation",{enumerable:!0,get:function(){return wne.DirectiveLocation}});Object.defineProperty(an,"Kind",{enumerable:!0,get:function(){return Dne.Kind}});Object.defineProperty(an,"Lexer",{enumerable:!0,get:function(){return Rne.Lexer}});Object.defineProperty(an,"Location",{enumerable:!0,get:function(){return bD.Location}});Object.defineProperty(an,"OperationTypeNode",{enumerable:!0,get:function(){return bD.OperationTypeNode}});Object.defineProperty(an,"Source",{enumerable:!0,get:function(){return One.Source}});Object.defineProperty(an,"Token",{enumerable:!0,get:function(){return bD.Token}});Object.defineProperty(an,"TokenKind",{enumerable:!0,get:function(){return Ane.TokenKind}});Object.defineProperty(an,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Ph.getEnterLeaveForKind}});Object.defineProperty(an,"getLocation",{enumerable:!0,get:function(){return Sne.getLocation}});Object.defineProperty(an,"getVisitFn",{enumerable:!0,get:function(){return Ph.getVisitFn}});Object.defineProperty(an,"isConstValueNode",{enumerable:!0,get:function(){return Ho.isConstValueNode}});Object.defineProperty(an,"isDefinitionNode",{enumerable:!0,get:function(){return Ho.isDefinitionNode}});Object.defineProperty(an,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Ho.isExecutableDefinitionNode}});Object.defineProperty(an,"isSelectionNode",{enumerable:!0,get:function(){return Ho.isSelectionNode}});Object.defineProperty(an,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Ho.isTypeDefinitionNode}});Object.defineProperty(an,"isTypeExtensionNode",{enumerable:!0,get:function(){return Ho.isTypeExtensionNode}});Object.defineProperty(an,"isTypeNode",{enumerable:!0,get:function(){return Ho.isTypeNode}});Object.defineProperty(an,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Ho.isTypeSystemDefinitionNode}});Object.defineProperty(an,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Ho.isTypeSystemExtensionNode}});Object.defineProperty(an,"isValueNode",{enumerable:!0,get:function(){return Ho.isValueNode}});Object.defineProperty(an,"parse",{enumerable:!0,get:function(){return bE.parse}});Object.defineProperty(an,"parseConstValue",{enumerable:!0,get:function(){return bE.parseConstValue}});Object.defineProperty(an,"parseType",{enumerable:!0,get:function(){return bE.parseType}});Object.defineProperty(an,"parseValue",{enumerable:!0,get:function(){return bE.parseValue}});Object.defineProperty(an,"print",{enumerable:!0,get:function(){return Fne.print}});Object.defineProperty(an,"printLocation",{enumerable:!0,get:function(){return DB.printLocation}});Object.defineProperty(an,"printSourceLocation",{enumerable:!0,get:function(){return DB.printSourceLocation}});Object.defineProperty(an,"visit",{enumerable:!0,get:function(){return Ph.visit}});Object.defineProperty(an,"visitInParallel",{enumerable:!0,get:function(){return Ph.visitInParallel}});var One=TE(),Sne=yN(),DB=pO(),Dne=en(),Ane=Sh(),Rne=mE(),bE=yp(),Fne=ds(),Ph=pl(),bD=qo(),Ho=Il(),wne=tp()});var RB=V(OD=>{"use strict";m();T();h();Object.defineProperty(OD,"__esModule",{value:!0});OD.isAsyncIterable=Lne;function Lne(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}});var FB=V(SD=>{"use strict";m();T();h();Object.defineProperty(SD,"__esModule",{value:!0});SD.mapAsyncIterator=Pne;function Pne(e,t){let n=e[Symbol.asyncIterator]();function r(s){return yr(this,null,function*(){if(s.done)return s;try{return{value:yield t(s.value),done:!1}}catch(o){if(typeof n.return=="function")try{yield n.return()}catch(u){}throw o}})}return{next(){return yr(this,null,function*(){return r(yield n.next())})},return(){return yr(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(s){return yr(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(s));throw s})},[Symbol.asyncIterator](){return this}}}});var kB=V(OE=>{"use strict";m();T();h();Object.defineProperty(OE,"__esModule",{value:!0});OE.createSourceEventStream=PB;OE.subscribe=Vne;var kne=Oi(),xne=En(),LB=RB(),wB=hh(),DD=at(),Cne=NE(),Une=sE(),kh=Lh(),Mne=FB(),Bne=up();function Vne(t){return yr(this,arguments,function*(e){arguments.length<2||(0,kne.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield PB(e);if(!(0,LB.isAsyncIterable)(n))return n;let r=i=>(0,kh.execute)(K(k({},e),{rootValue:i}));return(0,Mne.mapAsyncIterator)(n,r)})}function jne(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 PB(...e){return yr(this,null,function*(){let t=jne(e),{schema:n,document:r,variableValues:i}=t;(0,kh.assertValidExecutionArguments)(n,r,i);let s=(0,kh.buildExecutionContext)(t);if(!("schema"in s))return{errors:s};try{let o=yield $ne(s);if(!(0,LB.isAsyncIterable)(o))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,xne.inspect)(o)}.`);return o}catch(o){if(o instanceof DD.GraphQLError)return{errors:[o]};throw o}})}function $ne(e){return yr(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:s}=e,o=t.getSubscriptionType();if(o==null)throw new DD.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:r});let u=(0,Une.collectFields)(t,n,i,o,r.selectionSet),[l,d]=[...u.entries()][0],p=(0,kh.getFieldDef)(t,o,d[0]);if(!p){let _=d[0].name.value;throw new DD.GraphQLError(`The subscription field "${_}" is not defined.`,{nodes:d})}let y=(0,wB.addPath)(void 0,l,o.name),N=(0,kh.buildResolveInfo)(e,p,d,o,y);try{var I;let _=(0,Bne.getArgumentValues)(p,d[0],i),C=e.contextValue,Q=yield((I=p.subscribe)!==null&&I!==void 0?I:e.subscribeFieldResolver)(s,_,C,N);if(Q instanceof Error)throw Q;return Q}catch(_){throw(0,Cne.locatedError)(_,d,(0,wB.pathToArray)(y))}})}});var CB=V(Bs=>{"use strict";m();T();h();Object.defineProperty(Bs,"__esModule",{value:!0});Object.defineProperty(Bs,"createSourceEventStream",{enumerable:!0,get:function(){return xB.createSourceEventStream}});Object.defineProperty(Bs,"defaultFieldResolver",{enumerable:!0,get:function(){return SE.defaultFieldResolver}});Object.defineProperty(Bs,"defaultTypeResolver",{enumerable:!0,get:function(){return SE.defaultTypeResolver}});Object.defineProperty(Bs,"execute",{enumerable:!0,get:function(){return SE.execute}});Object.defineProperty(Bs,"executeSync",{enumerable:!0,get:function(){return SE.executeSync}});Object.defineProperty(Bs,"getArgumentValues",{enumerable:!0,get:function(){return AD.getArgumentValues}});Object.defineProperty(Bs,"getDirectiveValues",{enumerable:!0,get:function(){return AD.getDirectiveValues}});Object.defineProperty(Bs,"getVariableValues",{enumerable:!0,get:function(){return AD.getVariableValues}});Object.defineProperty(Bs,"responsePathAsArray",{enumerable:!0,get:function(){return qne.pathToArray}});Object.defineProperty(Bs,"subscribe",{enumerable:!0,get:function(){return xB.subscribe}});var qne=hh(),SE=Lh(),xB=kB(),AD=up()});var UB=V(wD=>{"use strict";m();T();h();Object.defineProperty(wD,"__esModule",{value:!0});wD.NoDeprecatedCustomRule=Kne;var RD=ci(),xh=at(),FD=tn();function Kne(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,RD.invariant)(!1),e.reportError(new xh.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 xh.GraphQLError(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{let s=e.getParentType(),o=e.getFieldDef();s!=null&&o!=null||(0,RD.invariant)(!1),e.reportError(new xh.GraphQLError(`Field "${s.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=(0,FD.getNamedType)(e.getParentInputType());if((0,FD.isInputObjectType)(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new xh.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,FD.getNamedType)(e.getInputType());i!=null||(0,RD.invariant)(!1),e.reportError(new xh.GraphQLError(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}});var MB=V(LD=>{"use strict";m();T();h();Object.defineProperty(LD,"__esModule",{value:!0});LD.NoSchemaIntrospectionCustomRule=Jne;var Gne=at(),Qne=tn(),Yne=xs();function Jne(e){return{Field(t){let n=(0,Qne.getNamedType)(e.getType());n&&(0,Yne.isIntrospectionType)(n)&&e.reportError(new Gne.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var VB=V(At=>{"use strict";m();T();h();Object.defineProperty(At,"__esModule",{value:!0});Object.defineProperty(At,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return Wne.ExecutableDefinitionsRule}});Object.defineProperty(At,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return Xne.FieldsOnCorrectTypeRule}});Object.defineProperty(At,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return Zne.FragmentsOnCompositeTypesRule}});Object.defineProperty(At,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return ere.KnownArgumentNamesRule}});Object.defineProperty(At,"KnownDirectivesRule",{enumerable:!0,get:function(){return tre.KnownDirectivesRule}});Object.defineProperty(At,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return nre.KnownFragmentNamesRule}});Object.defineProperty(At,"KnownTypeNamesRule",{enumerable:!0,get:function(){return rre.KnownTypeNamesRule}});Object.defineProperty(At,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return ire.LoneAnonymousOperationRule}});Object.defineProperty(At,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return bre.LoneSchemaDefinitionRule}});Object.defineProperty(At,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return _re.MaxIntrospectionDepthRule}});Object.defineProperty(At,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return Lre.NoDeprecatedCustomRule}});Object.defineProperty(At,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return sre.NoFragmentCyclesRule}});Object.defineProperty(At,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return Pre.NoSchemaIntrospectionCustomRule}});Object.defineProperty(At,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return ore.NoUndefinedVariablesRule}});Object.defineProperty(At,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return are.NoUnusedFragmentsRule}});Object.defineProperty(At,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return ure.NoUnusedVariablesRule}});Object.defineProperty(At,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return cre.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(At,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return lre.PossibleFragmentSpreadsRule}});Object.defineProperty(At,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return wre.PossibleTypeExtensionsRule}});Object.defineProperty(At,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return dre.ProvidedRequiredArgumentsRule}});Object.defineProperty(At,"ScalarLeafsRule",{enumerable:!0,get:function(){return pre.ScalarLeafsRule}});Object.defineProperty(At,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return fre.SingleFieldSubscriptionsRule}});Object.defineProperty(At,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return Rre.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(At,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return mre.UniqueArgumentNamesRule}});Object.defineProperty(At,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return Fre.UniqueDirectiveNamesRule}});Object.defineProperty(At,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return hre.UniqueDirectivesPerLocationRule}});Object.defineProperty(At,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return Dre.UniqueEnumValueNamesRule}});Object.defineProperty(At,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return Are.UniqueFieldDefinitionNamesRule}});Object.defineProperty(At,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return Tre.UniqueFragmentNamesRule}});Object.defineProperty(At,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return yre.UniqueInputFieldNamesRule}});Object.defineProperty(At,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return Nre.UniqueOperationNamesRule}});Object.defineProperty(At,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return Ore.UniqueOperationTypesRule}});Object.defineProperty(At,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return Sre.UniqueTypeNamesRule}});Object.defineProperty(At,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return Ere.UniqueVariableNamesRule}});Object.defineProperty(At,"ValidationContext",{enumerable:!0,get:function(){return Hne.ValidationContext}});Object.defineProperty(At,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return gre.ValuesOfCorrectTypeRule}});Object.defineProperty(At,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return Ire.VariablesAreInputTypesRule}});Object.defineProperty(At,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return vre.VariablesInAllowedPositionRule}});Object.defineProperty(At,"recommendedRules",{enumerable:!0,get:function(){return BB.recommendedRules}});Object.defineProperty(At,"specifiedRules",{enumerable:!0,get:function(){return BB.specifiedRules}});Object.defineProperty(At,"validate",{enumerable:!0,get:function(){return zne.validate}});var zne=lp(),Hne=W0(),BB=J0(),Wne=dS(),Xne=fS(),Zne=hS(),ere=TS(),tre=gS(),nre=vS(),rre=OS(),ire=DS(),sre=PS(),ore=xS(),are=US(),ure=BS(),cre=zS(),lre=XS(),dre=n0(),pre=i0(),fre=f0(),mre=N0(),hre=_0(),Tre=F0(),yre=L0(),Nre=k0(),Ere=V0(),gre=q0(),Ire=G0(),vre=Y0(),_re=wS(),bre=RS(),Ore=C0(),Sre=M0(),Dre=O0(),Are=A0(),Rre=T0(),Fre=g0(),wre=e0(),Lre=UB(),Pre=MB()});var jB=V(wl=>{"use strict";m();T();h();Object.defineProperty(wl,"__esModule",{value:!0});Object.defineProperty(wl,"GraphQLError",{enumerable:!0,get:function(){return PD.GraphQLError}});Object.defineProperty(wl,"formatError",{enumerable:!0,get:function(){return PD.formatError}});Object.defineProperty(wl,"locatedError",{enumerable:!0,get:function(){return xre.locatedError}});Object.defineProperty(wl,"printError",{enumerable:!0,get:function(){return PD.printError}});Object.defineProperty(wl,"syntaxError",{enumerable:!0,get:function(){return kre.syntaxError}});var PD=at(),kre=pE(),xre=NE()});var xD=V(kD=>{"use strict";m();T();h();Object.defineProperty(kD,"__esModule",{value:!0});kD.getIntrospectionQuery=Cre;function Cre(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":"",s=t.schemaDescription?n:"";function o(l){return t.inputValueDeprecation?l:""}let u=t.oneOf?"isOneOf":"";return` query IntrospectionQuery { __schema { ${s} @@ -554,7 +554,7 @@ This should never happen. Please report this issue on GitHub.`)}function pte(e){ } } } - `}});var $B=V(CD=>{"use strict";m();T();h();Object.defineProperty(CD,"__esModule",{value:!0});CD.getOperationAST=Mre;var Ure=en();function Mre(e,t){let n=null;for(let i of e.definitions)if(i.kind===Ure.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 qB=V(UD=>{"use strict";m();T();h();Object.defineProperty(UD,"__esModule",{value:!0});UD.getOperationRootType=Bre;var DE=at();function Bre(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new DE.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 DE.GraphQLError("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new DE.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return n}throw new DE.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var KB=V(MD=>{"use strict";m();T();h();Object.defineProperty(MD,"__esModule",{value:!0});MD.introspectionFromSchema=Kre;var Vre=ci(),jre=yp(),$re=Lh(),qre=xD();function Kre(e,t){let n=k({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=(0,jre.parse)((0,qre.getIntrospectionQuery)(n)),i=(0,$re.executeSync)({schema:e,document:r});return!i.errors&&i.data||(0,Vre.invariant)(!1),i.data}});var QB=V(BD=>{"use strict";m();T();h();Object.defineProperty(BD,"__esModule",{value:!0});BD.buildClientSchema=Wre;var Gre=Oi(),fs=En(),GB=$o(),AE=Qm(),Qre=yp(),ms=tn(),Yre=ji(),Wo=xs(),Jre=Qo(),zre=El(),Hre=Eh();function Wre(e,t){(0,GB.isObjectLike)(e)&&(0,GB.isObjectLike)(e.__schema)||(0,Gre.devAssert)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,fs.inspect)(e)}.`);let n=e.__schema,r=(0,AE.keyValMap)(n.types,B=>B.name,B=>N(B));for(let B of[...Jre.specifiedScalarTypes,...Wo.introspectionTypes])r[B.name]&&(r[B.name]=B);let i=n.queryType?p(n.queryType):null,s=n.mutationType?p(n.mutationType):null,o=n.subscriptionType?p(n.subscriptionType):null,u=n.directives?n.directives.map(xt):[];return new zre.GraphQLSchema({description:n.description,query:i,mutation:s,subscription:o,types:Object.values(r),directives:u,assumeValid:t==null?void 0:t.assumeValid});function l(B){if(B.kind===Wo.TypeKind.LIST){let he=B.ofType;if(!he)throw new Error("Decorated type deeper than introspection query.");return new ms.GraphQLList(l(he))}if(B.kind===Wo.TypeKind.NON_NULL){let he=B.ofType;if(!he)throw new Error("Decorated type deeper than introspection query.");let nt=l(he);return new ms.GraphQLNonNull((0,ms.assertNullableType)(nt))}return d(B)}function d(B){let he=B.name;if(!he)throw new Error(`Unknown type reference: ${(0,fs.inspect)(B)}.`);let nt=r[he];if(!nt)throw new Error(`Invalid or incomplete schema, unknown type: ${he}. Ensure that a full introspection query is used in order to build a client schema.`);return nt}function p(B){return(0,ms.assertObjectType)(d(B))}function y(B){return(0,ms.assertInterfaceType)(d(B))}function N(B){if(B!=null&&B.name!=null&&B.kind!=null)switch(B.kind){case Wo.TypeKind.SCALAR:return I(B);case Wo.TypeKind.OBJECT:return x(B);case Wo.TypeKind.INTERFACE:return j(B);case Wo.TypeKind.UNION:return Q(B);case Wo.TypeKind.ENUM:return re(B);case Wo.TypeKind.INPUT_OBJECT:return se(B)}let he=(0,fs.inspect)(B);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${he}.`)}function I(B){return new ms.GraphQLScalarType({name:B.name,description:B.description,specifiedByURL:B.specifiedByURL})}function b(B){if(B.interfaces===null&&B.kind===Wo.TypeKind.INTERFACE)return[];if(!B.interfaces){let he=(0,fs.inspect)(B);throw new Error(`Introspection result missing interfaces: ${he}.`)}return B.interfaces.map(y)}function x(B){return new ms.GraphQLObjectType({name:B.name,description:B.description,interfaces:()=>b(B),fields:()=>pe(B)})}function j(B){return new ms.GraphQLInterfaceType({name:B.name,description:B.description,interfaces:()=>b(B),fields:()=>pe(B)})}function Q(B){if(!B.possibleTypes){let he=(0,fs.inspect)(B);throw new Error(`Introspection result missing possibleTypes: ${he}.`)}return new ms.GraphQLUnionType({name:B.name,description:B.description,types:()=>B.possibleTypes.map(p)})}function re(B){if(!B.enumValues){let he=(0,fs.inspect)(B);throw new Error(`Introspection result missing enumValues: ${he}.`)}return new ms.GraphQLEnumType({name:B.name,description:B.description,values:(0,AE.keyValMap)(B.enumValues,he=>he.name,he=>({description:he.description,deprecationReason:he.deprecationReason}))})}function se(B){if(!B.inputFields){let he=(0,fs.inspect)(B);throw new Error(`Introspection result missing inputFields: ${he}.`)}return new ms.GraphQLInputObjectType({name:B.name,description:B.description,fields:()=>Ce(B.inputFields),isOneOf:B.isOneOf})}function pe(B){if(!B.fields)throw new Error(`Introspection result missing fields: ${(0,fs.inspect)(B)}.`);return(0,AE.keyValMap)(B.fields,he=>he.name,ye)}function ye(B){let he=l(B.type);if(!(0,ms.isOutputType)(he)){let nt=(0,fs.inspect)(he);throw new Error(`Introspection must provide output type for fields, but received: ${nt}.`)}if(!B.args){let nt=(0,fs.inspect)(B);throw new Error(`Introspection result missing field args: ${nt}.`)}return{description:B.description,deprecationReason:B.deprecationReason,type:he,args:Ce(B.args)}}function Ce(B){return(0,AE.keyValMap)(B,he=>he.name,ht)}function ht(B){let he=l(B.type);if(!(0,ms.isInputType)(he)){let Ct=(0,fs.inspect)(he);throw new Error(`Introspection must provide input type for arguments, but received: ${Ct}.`)}let nt=B.defaultValue!=null?(0,Hre.valueFromAST)((0,Qre.parseValue)(B.defaultValue),he):void 0;return{description:B.description,type:he,defaultValue:nt,deprecationReason:B.deprecationReason}}function xt(B){if(!B.args){let he=(0,fs.inspect)(B);throw new Error(`Introspection result missing directive args: ${he}.`)}if(!B.locations){let he=(0,fs.inspect)(B);throw new Error(`Introspection result missing directive locations: ${he}.`)}return new Yre.GraphQLDirective({name:B.name,description:B.description,isRepeatable:B.isRepeatable,locations:B.locations.slice(),args:Ce(B.args)})}}});var jD=V(FE=>{"use strict";m();T();h();Object.defineProperty(FE,"__esModule",{value:!0});FE.extendSchema=rie;FE.extendSchemaImpl=eV;var Xre=Oi(),Zre=En(),eie=ci(),tie=hc(),Ch=OO(),Vs=en(),YB=Il(),Hn=tn(),Uh=ji(),XB=xs(),ZB=Qo(),JB=El(),nie=lp(),VD=up(),zB=Eh();function rie(e,t,n){(0,JB.assertSchema)(e),t!=null&&t.kind===Vs.Kind.DOCUMENT||(0,Xre.devAssert)(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&(0,nie.assertValidSDLExtension)(t,e);let r=e.toConfig(),i=eV(r,t,n);return r===i?e:new JB.GraphQLSchema(i)}function eV(e,t,n){var r,i,s,o;let u=[],l=Object.create(null),d=[],p,y=[];for(let U of t.definitions)if(U.kind===Vs.Kind.SCHEMA_DEFINITION)p=U;else if(U.kind===Vs.Kind.SCHEMA_EXTENSION)y.push(U);else if((0,YB.isTypeDefinitionNode)(U))u.push(U);else if((0,YB.isTypeExtensionNode)(U)){let ae=U.name.value,te=l[ae];l[ae]=te?te.concat([U]):[U]}else U.kind===Vs.Kind.DIRECTIVE_DEFINITION&&d.push(U);if(Object.keys(l).length===0&&u.length===0&&d.length===0&&y.length===0&&p==null)return e;let N=Object.create(null);for(let U of e.types)N[U.name]=re(U);for(let U of u){var I;let ae=U.name.value;N[ae]=(I=HB[ae])!==null&&I!==void 0?I:$n(U)}let b=k(k({query:e.query&&j(e.query),mutation:e.mutation&&j(e.mutation),subscription:e.subscription&&j(e.subscription)},p&&nt([p])),nt(y));return K(k({description:(r=p)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},b),{types:Object.values(N),directives:[...e.directives.map(Q),...d.map(Fn)],extensions:Object.create(null),astNode:(s=p)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(y),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function x(U){return(0,Hn.isListType)(U)?new Hn.GraphQLList(x(U.ofType)):(0,Hn.isNonNullType)(U)?new Hn.GraphQLNonNull(x(U.ofType)):j(U)}function j(U){return N[U.name]}function Q(U){let ae=U.toConfig();return new Uh.GraphQLDirective(K(k({},ae),{args:(0,Ch.mapValue)(ae.args,he)}))}function re(U){if((0,XB.isIntrospectionType)(U)||(0,ZB.isSpecifiedScalarType)(U))return U;if((0,Hn.isScalarType)(U))return ye(U);if((0,Hn.isObjectType)(U))return Ce(U);if((0,Hn.isInterfaceType)(U))return ht(U);if((0,Hn.isUnionType)(U))return xt(U);if((0,Hn.isEnumType)(U))return pe(U);if((0,Hn.isInputObjectType)(U))return se(U);(0,eie.invariant)(!1,"Unexpected type: "+(0,Zre.inspect)(U))}function se(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new Hn.GraphQLInputObjectType(K(k({},te),{fields:()=>k(k({},(0,Ch.mapValue)(te.fields,Ke=>K(k({},Ke),{type:x(Ke.type)}))),mi(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function pe(U){var ae;let te=U.toConfig(),ce=(ae=l[U.name])!==null&&ae!==void 0?ae:[];return new Hn.GraphQLEnumType(K(k({},te),{values:k(k({},te.values),Xr(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function ye(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[],Ke=te.specifiedByURL;for(let ee of ce){var G;Ke=(G=WB(ee))!==null&&G!==void 0?G:Ke}return new Hn.GraphQLScalarType(K(k({},te),{specifiedByURL:Ke,extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function Ce(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new Hn.GraphQLObjectType(K(k({},te),{interfaces:()=>[...U.getInterfaces().map(j),...Pn(ce)],fields:()=>k(k({},(0,Ch.mapValue)(te.fields,B)),_n(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function ht(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new Hn.GraphQLInterfaceType(K(k({},te),{interfaces:()=>[...U.getInterfaces().map(j),...Pn(ce)],fields:()=>k(k({},(0,Ch.mapValue)(te.fields,B)),_n(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function xt(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new Hn.GraphQLUnionType(K(k({},te),{types:()=>[...U.getTypes().map(j),...on(ce)],extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function B(U){return K(k({},U),{type:x(U.type),args:U.args&&(0,Ch.mapValue)(U.args,he)})}function he(U){return K(k({},U),{type:x(U.type)})}function nt(U){let ae={};for(let ce of U){var te;let Ke=(te=ce.operationTypes)!==null&&te!==void 0?te:[];for(let G of Ke)ae[G.operation]=Ct(G.type)}return ae}function Ct(U){var ae;let te=U.name.value,ce=(ae=HB[te])!==null&&ae!==void 0?ae:N[te];if(ce===void 0)throw new Error(`Unknown type: "${te}".`);return ce}function sn(U){return U.kind===Vs.Kind.LIST_TYPE?new Hn.GraphQLList(sn(U.type)):U.kind===Vs.Kind.NON_NULL_TYPE?new Hn.GraphQLNonNull(sn(U.type)):Ct(U)}function Fn(U){var ae;return new Uh.GraphQLDirective({name:U.name.value,description:(ae=U.description)===null||ae===void 0?void 0:ae.value,locations:U.locations.map(({value:te})=>te),isRepeatable:U.repeatable,args:bn(U.arguments),astNode:U})}function _n(U){let ae=Object.create(null);for(let Ke of U){var te;let G=(te=Ke.fields)!==null&&te!==void 0?te:[];for(let ee of G){var ce;ae[ee.name.value]={type:sn(ee.type),description:(ce=ee.description)===null||ce===void 0?void 0:ce.value,args:bn(ee.arguments),deprecationReason:RE(ee),astNode:ee}}}return ae}function bn(U){let ae=U!=null?U:[],te=Object.create(null);for(let Ke of ae){var ce;let G=sn(Ke.type);te[Ke.name.value]={type:G,description:(ce=Ke.description)===null||ce===void 0?void 0:ce.value,defaultValue:(0,zB.valueFromAST)(Ke.defaultValue,G),deprecationReason:RE(Ke),astNode:Ke}}return te}function mi(U){let ae=Object.create(null);for(let Ke of U){var te;let G=(te=Ke.fields)!==null&&te!==void 0?te:[];for(let ee of G){var ce;let Ue=sn(ee.type);ae[ee.name.value]={type:Ue,description:(ce=ee.description)===null||ce===void 0?void 0:ce.value,defaultValue:(0,zB.valueFromAST)(ee.defaultValue,Ue),deprecationReason:RE(ee),astNode:ee}}}return ae}function Xr(U){let ae=Object.create(null);for(let Ke of U){var te;let G=(te=Ke.values)!==null&&te!==void 0?te:[];for(let ee of G){var ce;ae[ee.name.value]={description:(ce=ee.description)===null||ce===void 0?void 0:ce.value,deprecationReason:RE(ee),astNode:ee}}}return ae}function Pn(U){return U.flatMap(ae=>{var te,ce;return(te=(ce=ae.interfaces)===null||ce===void 0?void 0:ce.map(Ct))!==null&&te!==void 0?te:[]})}function on(U){return U.flatMap(ae=>{var te,ce;return(te=(ce=ae.types)===null||ce===void 0?void 0:ce.map(Ct))!==null&&te!==void 0?te:[]})}function $n(U){var ae;let te=U.name.value,ce=(ae=l[te])!==null&&ae!==void 0?ae:[];switch(U.kind){case Vs.Kind.OBJECT_TYPE_DEFINITION:{var Ke;let Je=[U,...ce];return new Hn.GraphQLObjectType({name:te,description:(Ke=U.description)===null||Ke===void 0?void 0:Ke.value,interfaces:()=>Pn(Je),fields:()=>_n(Je),astNode:U,extensionASTNodes:ce})}case Vs.Kind.INTERFACE_TYPE_DEFINITION:{var G;let Je=[U,...ce];return new Hn.GraphQLInterfaceType({name:te,description:(G=U.description)===null||G===void 0?void 0:G.value,interfaces:()=>Pn(Je),fields:()=>_n(Je),astNode:U,extensionASTNodes:ce})}case Vs.Kind.ENUM_TYPE_DEFINITION:{var ee;let Je=[U,...ce];return new Hn.GraphQLEnumType({name:te,description:(ee=U.description)===null||ee===void 0?void 0:ee.value,values:Xr(Je),astNode:U,extensionASTNodes:ce})}case Vs.Kind.UNION_TYPE_DEFINITION:{var Ue;let Je=[U,...ce];return new Hn.GraphQLUnionType({name:te,description:(Ue=U.description)===null||Ue===void 0?void 0:Ue.value,types:()=>on(Je),astNode:U,extensionASTNodes:ce})}case Vs.Kind.SCALAR_TYPE_DEFINITION:{var Xe;return new Hn.GraphQLScalarType({name:te,description:(Xe=U.description)===null||Xe===void 0?void 0:Xe.value,specifiedByURL:WB(U),astNode:U,extensionASTNodes:ce})}case Vs.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var jt;let Je=[U,...ce];return new Hn.GraphQLInputObjectType({name:te,description:(jt=U.description)===null||jt===void 0?void 0:jt.value,fields:()=>mi(Je),astNode:U,extensionASTNodes:ce,isOneOf:iie(U)})}}}}var HB=(0,tie.keyMap)([...ZB.specifiedScalarTypes,...XB.introspectionTypes],e=>e.name);function RE(e){let t=(0,VD.getDirectiveValues)(Uh.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function WB(e){let t=(0,VD.getDirectiveValues)(Uh.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}function iie(e){return!!(0,VD.getDirectiveValues)(Uh.GraphQLOneOfDirective,e)}});var nV=V(wE=>{"use strict";m();T();h();Object.defineProperty(wE,"__esModule",{value:!0});wE.buildASTSchema=tV;wE.buildSchema=pie;var sie=Oi(),oie=en(),aie=yp(),uie=ji(),cie=El(),lie=lp(),die=jD();function tV(e,t){e!=null&&e.kind===oie.Kind.DOCUMENT||(0,sie.devAssert)(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,lie.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,die.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let s of r.types)switch(s.name){case"Query":r.query=s;break;case"Mutation":r.mutation=s;break;case"Subscription":r.subscription=s;break}let i=[...r.directives,...uie.specifiedDirectives.filter(s=>r.directives.every(o=>o.name!==s.name))];return new cie.GraphQLSchema(K(k({},r),{directives:i}))}function pie(e,t){let n=(0,aie.parse)(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return tV(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}});var sV=V(qD=>{"use strict";m();T();h();Object.defineProperty(qD,"__esModule",{value:!0});qD.lexicographicSortSchema=Eie;var fie=En(),mie=ci(),hie=Qm(),rV=Ym(),Ai=tn(),Tie=ji(),yie=xs(),Nie=El();function Eie(e){let t=e.toConfig(),n=(0,hie.keyValMap)($D(t.types),N=>N.name,y);return new Nie.GraphQLSchema(K(k({},t),{types:Object.values(n),directives:$D(t.directives).map(o),query:s(t.query),mutation:s(t.mutation),subscription:s(t.subscription)}));function r(N){return(0,Ai.isListType)(N)?new Ai.GraphQLList(r(N.ofType)):(0,Ai.isNonNullType)(N)?new Ai.GraphQLNonNull(r(N.ofType)):i(N)}function i(N){return n[N.name]}function s(N){return N&&i(N)}function o(N){let I=N.toConfig();return new Tie.GraphQLDirective(K(k({},I),{locations:iV(I.locations,b=>b),args:u(I.args)}))}function u(N){return LE(N,I=>K(k({},I),{type:r(I.type)}))}function l(N){return LE(N,I=>K(k({},I),{type:r(I.type),args:I.args&&u(I.args)}))}function d(N){return LE(N,I=>K(k({},I),{type:r(I.type)}))}function p(N){return $D(N).map(i)}function y(N){if((0,Ai.isScalarType)(N)||(0,yie.isIntrospectionType)(N))return N;if((0,Ai.isObjectType)(N)){let I=N.toConfig();return new Ai.GraphQLObjectType(K(k({},I),{interfaces:()=>p(I.interfaces),fields:()=>l(I.fields)}))}if((0,Ai.isInterfaceType)(N)){let I=N.toConfig();return new Ai.GraphQLInterfaceType(K(k({},I),{interfaces:()=>p(I.interfaces),fields:()=>l(I.fields)}))}if((0,Ai.isUnionType)(N)){let I=N.toConfig();return new Ai.GraphQLUnionType(K(k({},I),{types:()=>p(I.types)}))}if((0,Ai.isEnumType)(N)){let I=N.toConfig();return new Ai.GraphQLEnumType(K(k({},I),{values:LE(I.values,b=>b)}))}if((0,Ai.isInputObjectType)(N)){let I=N.toConfig();return new Ai.GraphQLInputObjectType(K(k({},I),{fields:()=>d(I.fields)}))}(0,mie.invariant)(!1,"Unexpected type: "+(0,fie.inspect)(N))}}function LE(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(rV.naturalCompare))n[r]=t(e[r]);return n}function $D(e){return iV(e,t=>t.name)}function iV(e,t){return e.slice().sort((n,r)=>{let i=t(n),s=t(r);return(0,rV.naturalCompare)(i,s)})}});var pV=V(Mh=>{"use strict";m();T();h();Object.defineProperty(Mh,"__esModule",{value:!0});Mh.printIntrospectionSchema=Sie;Mh.printSchema=Oie;Mh.printType=uV;var gie=En(),Iie=ci(),vie=zm(),GD=en(),PE=ds(),Ep=tn(),QD=ji(),oV=xs(),_ie=Qo(),bie=ch();function Oie(e){return aV(e,t=>!(0,QD.isSpecifiedDirective)(t),Die)}function Sie(e){return aV(e,QD.isSpecifiedDirective,oV.isIntrospectionType)}function Die(e){return!(0,_ie.isSpecifiedScalarType)(e)&&!(0,oV.isIntrospectionType)(e)}function aV(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[Aie(e),...r.map(s=>Cie(s)),...i.map(s=>uV(s))].filter(Boolean).join(` + `}});var $B=V(CD=>{"use strict";m();T();h();Object.defineProperty(CD,"__esModule",{value:!0});CD.getOperationAST=Mre;var Ure=en();function Mre(e,t){let n=null;for(let i of e.definitions)if(i.kind===Ure.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 qB=V(UD=>{"use strict";m();T();h();Object.defineProperty(UD,"__esModule",{value:!0});UD.getOperationRootType=Bre;var DE=at();function Bre(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new DE.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 DE.GraphQLError("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new DE.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return n}throw new DE.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var KB=V(MD=>{"use strict";m();T();h();Object.defineProperty(MD,"__esModule",{value:!0});MD.introspectionFromSchema=Kre;var Vre=ci(),jre=yp(),$re=Lh(),qre=xD();function Kre(e,t){let n=k({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=(0,jre.parse)((0,qre.getIntrospectionQuery)(n)),i=(0,$re.executeSync)({schema:e,document:r});return!i.errors&&i.data||(0,Vre.invariant)(!1),i.data}});var QB=V(BD=>{"use strict";m();T();h();Object.defineProperty(BD,"__esModule",{value:!0});BD.buildClientSchema=Wre;var Gre=Oi(),fs=En(),GB=$o(),AE=Qm(),Qre=yp(),ms=tn(),Yre=ji(),Wo=xs(),Jre=Qo(),zre=El(),Hre=Eh();function Wre(e,t){(0,GB.isObjectLike)(e)&&(0,GB.isObjectLike)(e.__schema)||(0,Gre.devAssert)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,fs.inspect)(e)}.`);let n=e.__schema,r=(0,AE.keyValMap)(n.types,B=>B.name,B=>N(B));for(let B of[...Jre.specifiedScalarTypes,...Wo.introspectionTypes])r[B.name]&&(r[B.name]=B);let i=n.queryType?p(n.queryType):null,s=n.mutationType?p(n.mutationType):null,o=n.subscriptionType?p(n.subscriptionType):null,u=n.directives?n.directives.map(xt):[];return new zre.GraphQLSchema({description:n.description,query:i,mutation:s,subscription:o,types:Object.values(r),directives:u,assumeValid:t==null?void 0:t.assumeValid});function l(B){if(B.kind===Wo.TypeKind.LIST){let he=B.ofType;if(!he)throw new Error("Decorated type deeper than introspection query.");return new ms.GraphQLList(l(he))}if(B.kind===Wo.TypeKind.NON_NULL){let he=B.ofType;if(!he)throw new Error("Decorated type deeper than introspection query.");let nt=l(he);return new ms.GraphQLNonNull((0,ms.assertNullableType)(nt))}return d(B)}function d(B){let he=B.name;if(!he)throw new Error(`Unknown type reference: ${(0,fs.inspect)(B)}.`);let nt=r[he];if(!nt)throw new Error(`Invalid or incomplete schema, unknown type: ${he}. Ensure that a full introspection query is used in order to build a client schema.`);return nt}function p(B){return(0,ms.assertObjectType)(d(B))}function y(B){return(0,ms.assertInterfaceType)(d(B))}function N(B){if(B!=null&&B.name!=null&&B.kind!=null)switch(B.kind){case Wo.TypeKind.SCALAR:return I(B);case Wo.TypeKind.OBJECT:return C(B);case Wo.TypeKind.INTERFACE:return j(B);case Wo.TypeKind.UNION:return Q(B);case Wo.TypeKind.ENUM:return re(B);case Wo.TypeKind.INPUT_OBJECT:return se(B)}let he=(0,fs.inspect)(B);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${he}.`)}function I(B){return new ms.GraphQLScalarType({name:B.name,description:B.description,specifiedByURL:B.specifiedByURL})}function _(B){if(B.interfaces===null&&B.kind===Wo.TypeKind.INTERFACE)return[];if(!B.interfaces){let he=(0,fs.inspect)(B);throw new Error(`Introspection result missing interfaces: ${he}.`)}return B.interfaces.map(y)}function C(B){return new ms.GraphQLObjectType({name:B.name,description:B.description,interfaces:()=>_(B),fields:()=>pe(B)})}function j(B){return new ms.GraphQLInterfaceType({name:B.name,description:B.description,interfaces:()=>_(B),fields:()=>pe(B)})}function Q(B){if(!B.possibleTypes){let he=(0,fs.inspect)(B);throw new Error(`Introspection result missing possibleTypes: ${he}.`)}return new ms.GraphQLUnionType({name:B.name,description:B.description,types:()=>B.possibleTypes.map(p)})}function re(B){if(!B.enumValues){let he=(0,fs.inspect)(B);throw new Error(`Introspection result missing enumValues: ${he}.`)}return new ms.GraphQLEnumType({name:B.name,description:B.description,values:(0,AE.keyValMap)(B.enumValues,he=>he.name,he=>({description:he.description,deprecationReason:he.deprecationReason}))})}function se(B){if(!B.inputFields){let he=(0,fs.inspect)(B);throw new Error(`Introspection result missing inputFields: ${he}.`)}return new ms.GraphQLInputObjectType({name:B.name,description:B.description,fields:()=>Ce(B.inputFields),isOneOf:B.isOneOf})}function pe(B){if(!B.fields)throw new Error(`Introspection result missing fields: ${(0,fs.inspect)(B)}.`);return(0,AE.keyValMap)(B.fields,he=>he.name,ye)}function ye(B){let he=l(B.type);if(!(0,ms.isOutputType)(he)){let nt=(0,fs.inspect)(he);throw new Error(`Introspection must provide output type for fields, but received: ${nt}.`)}if(!B.args){let nt=(0,fs.inspect)(B);throw new Error(`Introspection result missing field args: ${nt}.`)}return{description:B.description,deprecationReason:B.deprecationReason,type:he,args:Ce(B.args)}}function Ce(B){return(0,AE.keyValMap)(B,he=>he.name,ht)}function ht(B){let he=l(B.type);if(!(0,ms.isInputType)(he)){let Ct=(0,fs.inspect)(he);throw new Error(`Introspection must provide input type for arguments, but received: ${Ct}.`)}let nt=B.defaultValue!=null?(0,Hre.valueFromAST)((0,Qre.parseValue)(B.defaultValue),he):void 0;return{description:B.description,type:he,defaultValue:nt,deprecationReason:B.deprecationReason}}function xt(B){if(!B.args){let he=(0,fs.inspect)(B);throw new Error(`Introspection result missing directive args: ${he}.`)}if(!B.locations){let he=(0,fs.inspect)(B);throw new Error(`Introspection result missing directive locations: ${he}.`)}return new Yre.GraphQLDirective({name:B.name,description:B.description,isRepeatable:B.isRepeatable,locations:B.locations.slice(),args:Ce(B.args)})}}});var jD=V(FE=>{"use strict";m();T();h();Object.defineProperty(FE,"__esModule",{value:!0});FE.extendSchema=rie;FE.extendSchemaImpl=eV;var Xre=Oi(),Zre=En(),eie=ci(),tie=hc(),Ch=OO(),Vs=en(),YB=Il(),Hn=tn(),Uh=ji(),XB=xs(),ZB=Qo(),JB=El(),nie=lp(),VD=up(),zB=Eh();function rie(e,t,n){(0,JB.assertSchema)(e),t!=null&&t.kind===Vs.Kind.DOCUMENT||(0,Xre.devAssert)(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&(0,nie.assertValidSDLExtension)(t,e);let r=e.toConfig(),i=eV(r,t,n);return r===i?e:new JB.GraphQLSchema(i)}function eV(e,t,n){var r,i,s,o;let u=[],l=Object.create(null),d=[],p,y=[];for(let U of t.definitions)if(U.kind===Vs.Kind.SCHEMA_DEFINITION)p=U;else if(U.kind===Vs.Kind.SCHEMA_EXTENSION)y.push(U);else if((0,YB.isTypeDefinitionNode)(U))u.push(U);else if((0,YB.isTypeExtensionNode)(U)){let ae=U.name.value,te=l[ae];l[ae]=te?te.concat([U]):[U]}else U.kind===Vs.Kind.DIRECTIVE_DEFINITION&&d.push(U);if(Object.keys(l).length===0&&u.length===0&&d.length===0&&y.length===0&&p==null)return e;let N=Object.create(null);for(let U of e.types)N[U.name]=re(U);for(let U of u){var I;let ae=U.name.value;N[ae]=(I=HB[ae])!==null&&I!==void 0?I:$n(U)}let _=k(k({query:e.query&&j(e.query),mutation:e.mutation&&j(e.mutation),subscription:e.subscription&&j(e.subscription)},p&&nt([p])),nt(y));return K(k({description:(r=p)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},_),{types:Object.values(N),directives:[...e.directives.map(Q),...d.map(Fn)],extensions:Object.create(null),astNode:(s=p)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(y),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function C(U){return(0,Hn.isListType)(U)?new Hn.GraphQLList(C(U.ofType)):(0,Hn.isNonNullType)(U)?new Hn.GraphQLNonNull(C(U.ofType)):j(U)}function j(U){return N[U.name]}function Q(U){let ae=U.toConfig();return new Uh.GraphQLDirective(K(k({},ae),{args:(0,Ch.mapValue)(ae.args,he)}))}function re(U){if((0,XB.isIntrospectionType)(U)||(0,ZB.isSpecifiedScalarType)(U))return U;if((0,Hn.isScalarType)(U))return ye(U);if((0,Hn.isObjectType)(U))return Ce(U);if((0,Hn.isInterfaceType)(U))return ht(U);if((0,Hn.isUnionType)(U))return xt(U);if((0,Hn.isEnumType)(U))return pe(U);if((0,Hn.isInputObjectType)(U))return se(U);(0,eie.invariant)(!1,"Unexpected type: "+(0,Zre.inspect)(U))}function se(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new Hn.GraphQLInputObjectType(K(k({},te),{fields:()=>k(k({},(0,Ch.mapValue)(te.fields,Ke=>K(k({},Ke),{type:C(Ke.type)}))),mi(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function pe(U){var ae;let te=U.toConfig(),ce=(ae=l[U.name])!==null&&ae!==void 0?ae:[];return new Hn.GraphQLEnumType(K(k({},te),{values:k(k({},te.values),Xr(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function ye(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[],Ke=te.specifiedByURL;for(let ee of ce){var G;Ke=(G=WB(ee))!==null&&G!==void 0?G:Ke}return new Hn.GraphQLScalarType(K(k({},te),{specifiedByURL:Ke,extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function Ce(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new Hn.GraphQLObjectType(K(k({},te),{interfaces:()=>[...U.getInterfaces().map(j),...Pn(ce)],fields:()=>k(k({},(0,Ch.mapValue)(te.fields,B)),_n(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function ht(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new Hn.GraphQLInterfaceType(K(k({},te),{interfaces:()=>[...U.getInterfaces().map(j),...Pn(ce)],fields:()=>k(k({},(0,Ch.mapValue)(te.fields,B)),_n(ce)),extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function xt(U){var ae;let te=U.toConfig(),ce=(ae=l[te.name])!==null&&ae!==void 0?ae:[];return new Hn.GraphQLUnionType(K(k({},te),{types:()=>[...U.getTypes().map(j),...on(ce)],extensionASTNodes:te.extensionASTNodes.concat(ce)}))}function B(U){return K(k({},U),{type:C(U.type),args:U.args&&(0,Ch.mapValue)(U.args,he)})}function he(U){return K(k({},U),{type:C(U.type)})}function nt(U){let ae={};for(let ce of U){var te;let Ke=(te=ce.operationTypes)!==null&&te!==void 0?te:[];for(let G of Ke)ae[G.operation]=Ct(G.type)}return ae}function Ct(U){var ae;let te=U.name.value,ce=(ae=HB[te])!==null&&ae!==void 0?ae:N[te];if(ce===void 0)throw new Error(`Unknown type: "${te}".`);return ce}function sn(U){return U.kind===Vs.Kind.LIST_TYPE?new Hn.GraphQLList(sn(U.type)):U.kind===Vs.Kind.NON_NULL_TYPE?new Hn.GraphQLNonNull(sn(U.type)):Ct(U)}function Fn(U){var ae;return new Uh.GraphQLDirective({name:U.name.value,description:(ae=U.description)===null||ae===void 0?void 0:ae.value,locations:U.locations.map(({value:te})=>te),isRepeatable:U.repeatable,args:bn(U.arguments),astNode:U})}function _n(U){let ae=Object.create(null);for(let Ke of U){var te;let G=(te=Ke.fields)!==null&&te!==void 0?te:[];for(let ee of G){var ce;ae[ee.name.value]={type:sn(ee.type),description:(ce=ee.description)===null||ce===void 0?void 0:ce.value,args:bn(ee.arguments),deprecationReason:RE(ee),astNode:ee}}}return ae}function bn(U){let ae=U!=null?U:[],te=Object.create(null);for(let Ke of ae){var ce;let G=sn(Ke.type);te[Ke.name.value]={type:G,description:(ce=Ke.description)===null||ce===void 0?void 0:ce.value,defaultValue:(0,zB.valueFromAST)(Ke.defaultValue,G),deprecationReason:RE(Ke),astNode:Ke}}return te}function mi(U){let ae=Object.create(null);for(let Ke of U){var te;let G=(te=Ke.fields)!==null&&te!==void 0?te:[];for(let ee of G){var ce;let Ue=sn(ee.type);ae[ee.name.value]={type:Ue,description:(ce=ee.description)===null||ce===void 0?void 0:ce.value,defaultValue:(0,zB.valueFromAST)(ee.defaultValue,Ue),deprecationReason:RE(ee),astNode:ee}}}return ae}function Xr(U){let ae=Object.create(null);for(let Ke of U){var te;let G=(te=Ke.values)!==null&&te!==void 0?te:[];for(let ee of G){var ce;ae[ee.name.value]={description:(ce=ee.description)===null||ce===void 0?void 0:ce.value,deprecationReason:RE(ee),astNode:ee}}}return ae}function Pn(U){return U.flatMap(ae=>{var te,ce;return(te=(ce=ae.interfaces)===null||ce===void 0?void 0:ce.map(Ct))!==null&&te!==void 0?te:[]})}function on(U){return U.flatMap(ae=>{var te,ce;return(te=(ce=ae.types)===null||ce===void 0?void 0:ce.map(Ct))!==null&&te!==void 0?te:[]})}function $n(U){var ae;let te=U.name.value,ce=(ae=l[te])!==null&&ae!==void 0?ae:[];switch(U.kind){case Vs.Kind.OBJECT_TYPE_DEFINITION:{var Ke;let Je=[U,...ce];return new Hn.GraphQLObjectType({name:te,description:(Ke=U.description)===null||Ke===void 0?void 0:Ke.value,interfaces:()=>Pn(Je),fields:()=>_n(Je),astNode:U,extensionASTNodes:ce})}case Vs.Kind.INTERFACE_TYPE_DEFINITION:{var G;let Je=[U,...ce];return new Hn.GraphQLInterfaceType({name:te,description:(G=U.description)===null||G===void 0?void 0:G.value,interfaces:()=>Pn(Je),fields:()=>_n(Je),astNode:U,extensionASTNodes:ce})}case Vs.Kind.ENUM_TYPE_DEFINITION:{var ee;let Je=[U,...ce];return new Hn.GraphQLEnumType({name:te,description:(ee=U.description)===null||ee===void 0?void 0:ee.value,values:Xr(Je),astNode:U,extensionASTNodes:ce})}case Vs.Kind.UNION_TYPE_DEFINITION:{var Ue;let Je=[U,...ce];return new Hn.GraphQLUnionType({name:te,description:(Ue=U.description)===null||Ue===void 0?void 0:Ue.value,types:()=>on(Je),astNode:U,extensionASTNodes:ce})}case Vs.Kind.SCALAR_TYPE_DEFINITION:{var Xe;return new Hn.GraphQLScalarType({name:te,description:(Xe=U.description)===null||Xe===void 0?void 0:Xe.value,specifiedByURL:WB(U),astNode:U,extensionASTNodes:ce})}case Vs.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var jt;let Je=[U,...ce];return new Hn.GraphQLInputObjectType({name:te,description:(jt=U.description)===null||jt===void 0?void 0:jt.value,fields:()=>mi(Je),astNode:U,extensionASTNodes:ce,isOneOf:iie(U)})}}}}var HB=(0,tie.keyMap)([...ZB.specifiedScalarTypes,...XB.introspectionTypes],e=>e.name);function RE(e){let t=(0,VD.getDirectiveValues)(Uh.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function WB(e){let t=(0,VD.getDirectiveValues)(Uh.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}function iie(e){return!!(0,VD.getDirectiveValues)(Uh.GraphQLOneOfDirective,e)}});var nV=V(wE=>{"use strict";m();T();h();Object.defineProperty(wE,"__esModule",{value:!0});wE.buildASTSchema=tV;wE.buildSchema=pie;var sie=Oi(),oie=en(),aie=yp(),uie=ji(),cie=El(),lie=lp(),die=jD();function tV(e,t){e!=null&&e.kind===oie.Kind.DOCUMENT||(0,sie.devAssert)(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,lie.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,die.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let s of r.types)switch(s.name){case"Query":r.query=s;break;case"Mutation":r.mutation=s;break;case"Subscription":r.subscription=s;break}let i=[...r.directives,...uie.specifiedDirectives.filter(s=>r.directives.every(o=>o.name!==s.name))];return new cie.GraphQLSchema(K(k({},r),{directives:i}))}function pie(e,t){let n=(0,aie.parse)(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return tV(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}});var sV=V(qD=>{"use strict";m();T();h();Object.defineProperty(qD,"__esModule",{value:!0});qD.lexicographicSortSchema=Eie;var fie=En(),mie=ci(),hie=Qm(),rV=Ym(),Ai=tn(),Tie=ji(),yie=xs(),Nie=El();function Eie(e){let t=e.toConfig(),n=(0,hie.keyValMap)($D(t.types),N=>N.name,y);return new Nie.GraphQLSchema(K(k({},t),{types:Object.values(n),directives:$D(t.directives).map(o),query:s(t.query),mutation:s(t.mutation),subscription:s(t.subscription)}));function r(N){return(0,Ai.isListType)(N)?new Ai.GraphQLList(r(N.ofType)):(0,Ai.isNonNullType)(N)?new Ai.GraphQLNonNull(r(N.ofType)):i(N)}function i(N){return n[N.name]}function s(N){return N&&i(N)}function o(N){let I=N.toConfig();return new Tie.GraphQLDirective(K(k({},I),{locations:iV(I.locations,_=>_),args:u(I.args)}))}function u(N){return LE(N,I=>K(k({},I),{type:r(I.type)}))}function l(N){return LE(N,I=>K(k({},I),{type:r(I.type),args:I.args&&u(I.args)}))}function d(N){return LE(N,I=>K(k({},I),{type:r(I.type)}))}function p(N){return $D(N).map(i)}function y(N){if((0,Ai.isScalarType)(N)||(0,yie.isIntrospectionType)(N))return N;if((0,Ai.isObjectType)(N)){let I=N.toConfig();return new Ai.GraphQLObjectType(K(k({},I),{interfaces:()=>p(I.interfaces),fields:()=>l(I.fields)}))}if((0,Ai.isInterfaceType)(N)){let I=N.toConfig();return new Ai.GraphQLInterfaceType(K(k({},I),{interfaces:()=>p(I.interfaces),fields:()=>l(I.fields)}))}if((0,Ai.isUnionType)(N)){let I=N.toConfig();return new Ai.GraphQLUnionType(K(k({},I),{types:()=>p(I.types)}))}if((0,Ai.isEnumType)(N)){let I=N.toConfig();return new Ai.GraphQLEnumType(K(k({},I),{values:LE(I.values,_=>_)}))}if((0,Ai.isInputObjectType)(N)){let I=N.toConfig();return new Ai.GraphQLInputObjectType(K(k({},I),{fields:()=>d(I.fields)}))}(0,mie.invariant)(!1,"Unexpected type: "+(0,fie.inspect)(N))}}function LE(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(rV.naturalCompare))n[r]=t(e[r]);return n}function $D(e){return iV(e,t=>t.name)}function iV(e,t){return e.slice().sort((n,r)=>{let i=t(n),s=t(r);return(0,rV.naturalCompare)(i,s)})}});var pV=V(Mh=>{"use strict";m();T();h();Object.defineProperty(Mh,"__esModule",{value:!0});Mh.printIntrospectionSchema=Sie;Mh.printSchema=Oie;Mh.printType=uV;var gie=En(),Iie=ci(),vie=zm(),GD=en(),PE=ds(),Ep=tn(),QD=ji(),oV=xs(),_ie=Qo(),bie=ch();function Oie(e){return aV(e,t=>!(0,QD.isSpecifiedDirective)(t),Die)}function Sie(e){return aV(e,QD.isSpecifiedDirective,oV.isIntrospectionType)}function Die(e){return!(0,_ie.isSpecifiedScalarType)(e)&&!(0,oV.isIntrospectionType)(e)}function aV(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[Aie(e),...r.map(s=>Cie(s)),...i.map(s=>uV(s))].filter(Boolean).join(` `)}function Aie(e){if(e.description==null&&Rie(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}`),js(e)+`schema { ${t.join(` @@ -596,9 +596,9 @@ ${t.join(` consumerName: String! streamName: String! } -`});var nA=V(tA=>{"use strict";m();T();h();Object.defineProperty(tA,"__esModule",{value:!0});tA.newFieldSetConditionData=vse;function vse({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}});var $h=V(UE=>{"use strict";m();T();h();Object.defineProperty(UE,"__esModule",{value:!0});UE.ExtensionType=void 0;var ZV;(function(e){e[e.EXTENDS=0]="EXTENDS",e[e.NONE=1]="NONE",e[e.REAL=2]="REAL"})(ZV||(UE.ExtensionType=ZV={}))});var sA={};If(sA,{__addDisposableResource:()=>gj,__assign:()=>ME,__asyncDelegator:()=>pj,__asyncGenerator:()=>dj,__asyncValues:()=>fj,__await:()=>gp,__awaiter:()=>sj,__classPrivateFieldGet:()=>yj,__classPrivateFieldIn:()=>Ej,__classPrivateFieldSet:()=>Nj,__createBinding:()=>VE,__decorate:()=>nj,__disposeResources:()=>Ij,__esDecorate:()=>_se,__exportStar:()=>aj,__extends:()=>ej,__generator:()=>oj,__importDefault:()=>Tj,__importStar:()=>hj,__makeTemplateObject:()=>mj,__metadata:()=>ij,__param:()=>rj,__propKey:()=>Ose,__read:()=>iA,__rest:()=>tj,__runInitializers:()=>bse,__setFunctionName:()=>Sse,__spread:()=>uj,__spreadArray:()=>lj,__spreadArrays:()=>cj,__values:()=>BE,default:()=>Rse});function ej(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");rA(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function tj(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])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function rj(e,t){return function(n,r){t(n,r,e)}}function _se(e,t,n,r,i,s){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):{}),y,N=!1,I=n.length-1;I>=0;I--){var b={};for(var x in r)b[x]=x==="access"?{}:r[x];for(var x in r.access)b.access[x]=r.access[x];b.addInitializer=function(Q){if(N)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(Q||null))};var j=(0,n[I])(u==="accessor"?{get:p.get,set:p.set}:p[l],b);if(u==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(y=o(j.get))&&(p.get=y),(y=o(j.set))&&(p.set=y),(y=o(j.init))&&i.unshift(y)}else(y=o(j))&&(u==="field"?i.unshift(y):p[l]=y)}d&&Object.defineProperty(d,r.name,p),N=!0}function bse(e,t,n){for(var r=arguments.length>2,i=0;i0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[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 iA(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.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 s}function uj(){for(var e=[],t=0;t1||u(N,I)})})}function u(N,I){try{l(r[N](I))}catch(b){y(s[0][3],b)}}function l(N){N.value instanceof gp?Promise.resolve(N.value.v).then(d,p):y(s[0][2],N)}function d(N){u("next",N)}function p(N){u("throw",N)}function y(N,I){N(I),s.shift(),s.length&&u(s[0][0],s[0][1])}}function pj(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,s){t[i]=e[i]?function(o){return(n=!n)?{value:gp(e[i](o)),done:!1}:s?s(o):o}:s}}function fj(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 BE=="function"?BE(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(o){return new Promise(function(u,l){o=e[s](o),i(u,l,o.done,o.value)})}}function i(s,o,u,l){Promise.resolve(l).then(function(d){s({value:d,done:u})},o)}}function mj(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function hj(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)&&VE(t,e,n);return Dse(t,e),t}function Tj(e){return e&&e.__esModule?e:{default:e}}function yj(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 Nj(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 Ej(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 gj(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 Ij(e){function t(r){e.error=e.hasError?new Ase(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(s){return t(s),n()})}catch(s){t(s)}}if(e.hasError)throw e.error}return n()}var rA,ME,VE,Dse,Ase,Rse,oA=ue(()=>{"use strict";m();T();h();rA=function(e,t){return rA=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])},rA(e,t)};ME=function(){return ME=Object.assign||function(t){for(var n,r=1,i=arguments.length;r$j,__assign:()=>jE,__asyncDelegator:()=>kj,__asyncGenerator:()=>Pj,__asyncValues:()=>xj,__await:()=>Ip,__awaiter:()=>Dj,__classPrivateFieldGet:()=>Bj,__classPrivateFieldIn:()=>jj,__classPrivateFieldSet:()=>Vj,__createBinding:()=>qE,__decorate:()=>bj,__disposeResources:()=>qj,__esDecorate:()=>Fse,__exportStar:()=>Rj,__extends:()=>vj,__generator:()=>Aj,__importDefault:()=>Mj,__importStar:()=>Uj,__makeTemplateObject:()=>Cj,__metadata:()=>Sj,__param:()=>Oj,__propKey:()=>Lse,__read:()=>uA,__rest:()=>_j,__runInitializers:()=>wse,__setFunctionName:()=>Pse,__spread:()=>Fj,__spreadArray:()=>Lj,__spreadArrays:()=>wj,__values:()=>$E,default:()=>Cse});function vj(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");aA(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function _j(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])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function Oj(e,t){return function(n,r){t(n,r,e)}}function Fse(e,t,n,r,i,s){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):{}),y,N=!1,I=n.length-1;I>=0;I--){var b={};for(var x in r)b[x]=x==="access"?{}:r[x];for(var x in r.access)b.access[x]=r.access[x];b.addInitializer=function(Q){if(N)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(Q||null))};var j=(0,n[I])(u==="accessor"?{get:p.get,set:p.set}:p[l],b);if(u==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(y=o(j.get))&&(p.get=y),(y=o(j.set))&&(p.set=y),(y=o(j.init))&&i.unshift(y)}else(y=o(j))&&(u==="field"?i.unshift(y):p[l]=y)}d&&Object.defineProperty(d,r.name,p),N=!0}function wse(e,t,n){for(var r=arguments.length>2,i=0;i0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[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 uA(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.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 s}function Fj(){for(var e=[],t=0;t1||u(N,I)})})}function u(N,I){try{l(r[N](I))}catch(b){y(s[0][3],b)}}function l(N){N.value instanceof Ip?Promise.resolve(N.value.v).then(d,p):y(s[0][2],N)}function d(N){u("next",N)}function p(N){u("throw",N)}function y(N,I){N(I),s.shift(),s.length&&u(s[0][0],s[0][1])}}function kj(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,s){t[i]=e[i]?function(o){return(n=!n)?{value:Ip(e[i](o)),done:!1}:s?s(o):o}:s}}function xj(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 $E=="function"?$E(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(o){return new Promise(function(u,l){o=e[s](o),i(u,l,o.done,o.value)})}}function i(s,o,u,l){Promise.resolve(l).then(function(d){s({value:d,done:u})},o)}}function Cj(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Uj(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)&&qE(t,e,n);return kse(t,e),t}function Mj(e){return e&&e.__esModule?e:{default:e}}function Bj(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 Vj(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 jj(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 $j(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 qj(e){function t(r){e.error=e.hasError?new xse(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(s){return t(s),n()})}catch(s){t(s)}}if(e.hasError)throw e.error}return n()}var aA,jE,qE,kse,xse,Cse,Gj=ue(()=>{"use strict";m();T();h();aA=function(e,t){return aA=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])},aA(e,t)};jE=function(){return jE=Object.assign||function(t){for(var n,r=1,i=arguments.length;r{"use strict";m();T();h()});var qh=V(qr=>{"use strict";m();T();h();Object.defineProperty(qr,"__esModule",{value:!0});qr.assertSome=qr.isSome=qr.compareNodes=qr.nodeToString=qr.compareStrings=qr.isValidPath=qr.isDocumentString=qr.asArray=void 0;var Use=(we(),Me(je)),Mse=e=>Array.isArray(e)?e:e?[e]:[];qr.asArray=Mse;var Bse=/\.[a-z0-9]+$/i;function Vse(e){if(typeof e!="string"||Bse.test(e))return!1;try{return(0,Use.parse)(e),!0}catch(t){}return!1}qr.isDocumentString=Vse;var jse=/[‘“!%^<>`]/;function $se(e){return typeof e=="string"&&!jse.test(e)}qr.isValidPath=$se;function Yj(e,t){return String(e)String(t)?1:0}qr.compareStrings=Yj;function cA(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}qr.nodeToString=cA;function qse(e,t,n){let r=cA(e),i=cA(t);return typeof n=="function"?n(r,i):Yj(r,i)}qr.compareNodes=qse;function Kse(e){return e!=null}qr.isSome=Kse;function Gse(e,t="Value should be something"){if(e==null)throw new Error(t)}qr.assertSome=Gse});var Kh=V(GE=>{"use strict";m();T();h();Object.defineProperty(GE,"__esModule",{value:!0});GE.inspect=void 0;var Hj=3;function Qse(e){return KE(e,[])}GE.inspect=Qse;function KE(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Yse(e,t);default:return String(e)}}function Jj(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; +`});var nA=V(tA=>{"use strict";m();T();h();Object.defineProperty(tA,"__esModule",{value:!0});tA.newFieldSetConditionData=vse;function vse({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}});var $h=V(UE=>{"use strict";m();T();h();Object.defineProperty(UE,"__esModule",{value:!0});UE.ExtensionType=void 0;var ZV;(function(e){e[e.EXTENDS=0]="EXTENDS",e[e.NONE=1]="NONE",e[e.REAL=2]="REAL"})(ZV||(UE.ExtensionType=ZV={}))});var sA={};If(sA,{__addDisposableResource:()=>gj,__assign:()=>ME,__asyncDelegator:()=>pj,__asyncGenerator:()=>dj,__asyncValues:()=>fj,__await:()=>gp,__awaiter:()=>sj,__classPrivateFieldGet:()=>yj,__classPrivateFieldIn:()=>Ej,__classPrivateFieldSet:()=>Nj,__createBinding:()=>VE,__decorate:()=>nj,__disposeResources:()=>Ij,__esDecorate:()=>_se,__exportStar:()=>aj,__extends:()=>ej,__generator:()=>oj,__importDefault:()=>Tj,__importStar:()=>hj,__makeTemplateObject:()=>mj,__metadata:()=>ij,__param:()=>rj,__propKey:()=>Ose,__read:()=>iA,__rest:()=>tj,__runInitializers:()=>bse,__setFunctionName:()=>Sse,__spread:()=>uj,__spreadArray:()=>lj,__spreadArrays:()=>cj,__values:()=>BE,default:()=>Rse});function ej(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");rA(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function tj(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])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function rj(e,t){return function(n,r){t(n,r,e)}}function _se(e,t,n,r,i,s){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):{}),y,N=!1,I=n.length-1;I>=0;I--){var _={};for(var C in r)_[C]=C==="access"?{}:r[C];for(var C in r.access)_.access[C]=r.access[C];_.addInitializer=function(Q){if(N)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(Q||null))};var j=(0,n[I])(u==="accessor"?{get:p.get,set:p.set}:p[l],_);if(u==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(y=o(j.get))&&(p.get=y),(y=o(j.set))&&(p.set=y),(y=o(j.init))&&i.unshift(y)}else(y=o(j))&&(u==="field"?i.unshift(y):p[l]=y)}d&&Object.defineProperty(d,r.name,p),N=!0}function bse(e,t,n){for(var r=arguments.length>2,i=0;i0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[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 iA(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.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 s}function uj(){for(var e=[],t=0;t1||u(N,I)})})}function u(N,I){try{l(r[N](I))}catch(_){y(s[0][3],_)}}function l(N){N.value instanceof gp?Promise.resolve(N.value.v).then(d,p):y(s[0][2],N)}function d(N){u("next",N)}function p(N){u("throw",N)}function y(N,I){N(I),s.shift(),s.length&&u(s[0][0],s[0][1])}}function pj(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,s){t[i]=e[i]?function(o){return(n=!n)?{value:gp(e[i](o)),done:!1}:s?s(o):o}:s}}function fj(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 BE=="function"?BE(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(o){return new Promise(function(u,l){o=e[s](o),i(u,l,o.done,o.value)})}}function i(s,o,u,l){Promise.resolve(l).then(function(d){s({value:d,done:u})},o)}}function mj(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function hj(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)&&VE(t,e,n);return Dse(t,e),t}function Tj(e){return e&&e.__esModule?e:{default:e}}function yj(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 Nj(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 Ej(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 gj(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 Ij(e){function t(r){e.error=e.hasError?new Ase(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(s){return t(s),n()})}catch(s){t(s)}}if(e.hasError)throw e.error}return n()}var rA,ME,VE,Dse,Ase,Rse,oA=ue(()=>{"use strict";m();T();h();rA=function(e,t){return rA=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])},rA(e,t)};ME=function(){return ME=Object.assign||function(t){for(var n,r=1,i=arguments.length;r$j,__assign:()=>jE,__asyncDelegator:()=>kj,__asyncGenerator:()=>Pj,__asyncValues:()=>xj,__await:()=>Ip,__awaiter:()=>Dj,__classPrivateFieldGet:()=>Bj,__classPrivateFieldIn:()=>jj,__classPrivateFieldSet:()=>Vj,__createBinding:()=>qE,__decorate:()=>bj,__disposeResources:()=>qj,__esDecorate:()=>Fse,__exportStar:()=>Rj,__extends:()=>vj,__generator:()=>Aj,__importDefault:()=>Mj,__importStar:()=>Uj,__makeTemplateObject:()=>Cj,__metadata:()=>Sj,__param:()=>Oj,__propKey:()=>Lse,__read:()=>uA,__rest:()=>_j,__runInitializers:()=>wse,__setFunctionName:()=>Pse,__spread:()=>Fj,__spreadArray:()=>Lj,__spreadArrays:()=>wj,__values:()=>$E,default:()=>Cse});function vj(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");aA(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function _j(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])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function Oj(e,t){return function(n,r){t(n,r,e)}}function Fse(e,t,n,r,i,s){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):{}),y,N=!1,I=n.length-1;I>=0;I--){var _={};for(var C in r)_[C]=C==="access"?{}:r[C];for(var C in r.access)_.access[C]=r.access[C];_.addInitializer=function(Q){if(N)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(Q||null))};var j=(0,n[I])(u==="accessor"?{get:p.get,set:p.set}:p[l],_);if(u==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(y=o(j.get))&&(p.get=y),(y=o(j.set))&&(p.set=y),(y=o(j.init))&&i.unshift(y)}else(y=o(j))&&(u==="field"?i.unshift(y):p[l]=y)}d&&Object.defineProperty(d,r.name,p),N=!0}function wse(e,t,n){for(var r=arguments.length>2,i=0;i0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[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 uA(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.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 s}function Fj(){for(var e=[],t=0;t1||u(N,I)})})}function u(N,I){try{l(r[N](I))}catch(_){y(s[0][3],_)}}function l(N){N.value instanceof Ip?Promise.resolve(N.value.v).then(d,p):y(s[0][2],N)}function d(N){u("next",N)}function p(N){u("throw",N)}function y(N,I){N(I),s.shift(),s.length&&u(s[0][0],s[0][1])}}function kj(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,s){t[i]=e[i]?function(o){return(n=!n)?{value:Ip(e[i](o)),done:!1}:s?s(o):o}:s}}function xj(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 $E=="function"?$E(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(o){return new Promise(function(u,l){o=e[s](o),i(u,l,o.done,o.value)})}}function i(s,o,u,l){Promise.resolve(l).then(function(d){s({value:d,done:u})},o)}}function Cj(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Uj(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)&&qE(t,e,n);return kse(t,e),t}function Mj(e){return e&&e.__esModule?e:{default:e}}function Bj(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 Vj(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 jj(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 $j(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 qj(e){function t(r){e.error=e.hasError?new xse(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(s){return t(s),n()})}catch(s){t(s)}}if(e.hasError)throw e.error}return n()}var aA,jE,qE,kse,xse,Cse,Gj=ue(()=>{"use strict";m();T();h();aA=function(e,t){return aA=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])},aA(e,t)};jE=function(){return jE=Object.assign||function(t){for(var n,r=1,i=arguments.length;r{"use strict";m();T();h()});var qh=V(qr=>{"use strict";m();T();h();Object.defineProperty(qr,"__esModule",{value:!0});qr.assertSome=qr.isSome=qr.compareNodes=qr.nodeToString=qr.compareStrings=qr.isValidPath=qr.isDocumentString=qr.asArray=void 0;var Use=(we(),Me(je)),Mse=e=>Array.isArray(e)?e:e?[e]:[];qr.asArray=Mse;var Bse=/\.[a-z0-9]+$/i;function Vse(e){if(typeof e!="string"||Bse.test(e))return!1;try{return(0,Use.parse)(e),!0}catch(t){}return!1}qr.isDocumentString=Vse;var jse=/[‘“!%^<>`]/;function $se(e){return typeof e=="string"&&!jse.test(e)}qr.isValidPath=$se;function Yj(e,t){return String(e)String(t)?1:0}qr.compareStrings=Yj;function cA(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}qr.nodeToString=cA;function qse(e,t,n){let r=cA(e),i=cA(t);return typeof n=="function"?n(r,i):Yj(r,i)}qr.compareNodes=qse;function Kse(e){return e!=null}qr.isSome=Kse;function Gse(e,t="Value should be something"){if(e==null)throw new Error(t)}qr.assertSome=Gse});var Kh=V(GE=>{"use strict";m();T();h();Object.defineProperty(GE,"__esModule",{value:!0});GE.inspect=void 0;var Hj=3;function Qse(e){return KE(e,[])}GE.inspect=Qse;function KE(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Yse(e,t);default:return String(e)}}function Jj(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; ${e.stack}`}function Yse(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?Jj(e)+` -`+zj(e.errors,t):Jj(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(Jse(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:KE(r,n)}else if(Array.isArray(e))return zj(e,n);return zse(e,n)}function Jse(e){return typeof e.toJSON=="function"}function zse(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>Hj?"["+Hse(e)+"]":"{ "+n.map(([i,s])=>i+": "+KE(s,t)).join(", ")+" }"}function zj(e,t){if(e.length===0)return"[]";if(t.length>Hj)return"[Array]";let n=e.length,r=[];for(let i=0;i{"use strict";m();T();h();Object.defineProperty(vp,"__esModule",{value:!0});vp.relocatedError=vp.createGraphQLError=void 0;var lA=(we(),Me(je)),Wse=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function Xse(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>Wse.includes(t))}function dA(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&Xse(t.originalError)&&(t.originalError=dA(t.originalError.message,t.originalError)),lA.versionInfo.major>=17?new lA.GraphQLError(e,t):new lA.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)}vp.createGraphQLError=dA;function Zse(e,t){return dA(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t==null?e.path:t,originalError:e,extensions:e.extensions})}vp.relocatedError=Zse});var Gh=V($s=>{"use strict";m();T();h();Object.defineProperty($s,"__esModule",{value:!0});$s.hasOwnProperty=$s.promiseReduce=$s.isPromise=$s.isObjectLike=$s.isIterableObject=void 0;function eoe(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}$s.isIterableObject=eoe;function toe(e){return typeof e=="object"&&e!==null}$s.isObjectLike=toe;function Wj(e){return(e==null?void 0:e.then)!=null}$s.isPromise=Wj;function noe(e,t,n){let r=n;for(let i of e)r=Wj(r)?r.then(s=>t(s,i)):t(r,i);return r}$s.promiseReduce=noe;function roe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}$s.hasOwnProperty=roe});var fA=V(JE=>{"use strict";m();T();h();Object.defineProperty(JE,"__esModule",{value:!0});JE.getArgumentValues=void 0;var pA=Kh(),Ll=(we(),Me(je)),YE=QE(),ioe=Gh();function soe(e,t,n={}){var o;let r={},s=((o=t.arguments)!=null?o:[]).reduce((u,l)=>K(k({},u),{[l.name.value]:l}),{});for(let{name:u,type:l,defaultValue:d}of e.args){let p=s[u];if(!p){if(d!==void 0)r[u]=d;else if((0,Ll.isNonNullType)(l))throw(0,YE.createGraphQLError)(`Argument "${u}" of required type "${(0,pA.inspect)(l)}" was not provided.`,{nodes:[t]});continue}let y=p.value,N=y.kind===Ll.Kind.NULL;if(y.kind===Ll.Kind.VARIABLE){let b=y.name.value;if(n==null||!(0,ioe.hasOwnProperty)(n,b)){if(d!==void 0)r[u]=d;else if((0,Ll.isNonNullType)(l))throw(0,YE.createGraphQLError)(`Argument "${u}" of required type "${(0,pA.inspect)(l)}" was provided the variable "$${b}" which was not provided a runtime value.`,{nodes:[y]});continue}N=n[b]==null}if(N&&(0,Ll.isNonNullType)(l))throw(0,YE.createGraphQLError)(`Argument "${u}" of non-null type "${(0,pA.inspect)(l)}" must not be null.`,{nodes:[y]});let I=(0,Ll.valueFromAST)(y,l,n);if(I===void 0)throw(0,YE.createGraphQLError)(`Argument "${u}" has invalid value ${(0,Ll.print)(y)}.`,{nodes:[y]});r[u]=I}return r}JE.getArgumentValues=soe});var mA=V(ea=>{"use strict";m();T();h();Object.defineProperty(ea,"__esModule",{value:!0});ea.getDirective=ea.getDirectives=ea.getDirectiveInExtensions=ea.getDirectivesInExtensions=void 0;var Zj=fA();function e1(e,t=["directives"]){return t.reduce((n,r)=>n==null?n:n[r],e==null?void 0:e.extensions)}ea.getDirectivesInExtensions=e1;function Xj(e,t){let n=e.filter(r=>r.name===t);if(n.length)return n.map(r=>{var i;return(i=r.args)!=null?i:{}})}function t1(e,t,n=["directives"]){let r=n.reduce((s,o)=>s==null?s:s[o],e==null?void 0:e.extensions);if(r===void 0)return;if(Array.isArray(r))return Xj(r,t);let i=[];for(let[s,o]of Object.entries(r))if(Array.isArray(o))for(let u of o)i.push({name:s,args:u});else i.push({name:s,args:o});return Xj(i,t)}ea.getDirectiveInExtensions=t1;function ooe(e,t,n=["directives"]){let r=e1(t,n);if(r!=null&&r.length>0)return r;let s=(e&&e.getDirectives?e.getDirectives():[]).reduce((l,d)=>(l[d.name]=d,l),{}),o=[];t.astNode&&o.push(t.astNode),"extensionASTNodes"in t&&t.extensionASTNodes&&(o=[...o,...t.extensionASTNodes]);let u=[];for(let l of o)if(l.directives)for(let d of l.directives){let p=s[d.name.value];p&&u.push({name:d.name.value,args:(0,Zj.getArgumentValues)(p,d)})}return u}ea.getDirectives=ooe;function aoe(e,t,n,r=["directives"]){let i=t1(t,n,r);if(i!=null)return i;let s=e&&e.getDirective?e.getDirective(n):void 0;if(s==null)return;let o=[];t.astNode&&o.push(t.astNode),"extensionASTNodes"in t&&t.extensionASTNodes&&(o=[...o,...t.extensionASTNodes]);let u=[];for(let l of o)if(l.directives)for(let d of l.directives)d.name.value===n&&u.push((0,Zj.getArgumentValues)(s,d));if(u.length)return u}ea.getDirective=aoe});var hA=V(zE=>{"use strict";m();T();h();Object.defineProperty(zE,"__esModule",{value:!0});zE.getFieldsWithDirectives=void 0;var uoe=(we(),Me(je));function coe(e,t={}){let n={},r=["ObjectTypeDefinition","ObjectTypeExtension"];t.includeInputTypes&&(r=[...r,"InputObjectTypeDefinition","InputObjectTypeExtension"]);let i=e.definitions.filter(s=>r.includes(s.kind));for(let s of i){let o=s.name.value;if(s.fields!=null){for(let u of s.fields)if(u.directives&&u.directives.length>0){let l=u.name.value,d=`${o}.${l}`,p=u.directives.map(y=>({name:y.name.value,args:(y.arguments||[]).reduce((N,I)=>K(k({},N),{[I.name.value]:(0,uoe.valueFromASTUntyped)(I.value)}),{})}));n[d]=p}}}return n}zE.getFieldsWithDirectives=coe});var n1=V(HE=>{"use strict";m();T();h();Object.defineProperty(HE,"__esModule",{value:!0});HE.getArgumentsWithDirectives=void 0;var TA=(we(),Me(je));function loe(e){return e.kind===TA.Kind.OBJECT_TYPE_DEFINITION||e.kind===TA.Kind.OBJECT_TYPE_EXTENSION}function doe(e){var r;let t={},n=e.definitions.filter(loe);for(let i of n)if(i.fields!=null)for(let s of i.fields){let o=(r=s.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}.${s.name.value}`]={};for(let l of o){let d=l.directives.map(p=>({name:p.name.value,args:(p.arguments||[]).reduce((y,N)=>K(k({},y),{[N.name.value]:(0,TA.valueFromASTUntyped)(N.value)}),{})}));u[l.name.value]=d}}return t}HE.getArgumentsWithDirectives=doe});var yA=V(WE=>{"use strict";m();T();h();Object.defineProperty(WE,"__esModule",{value:!0});WE.getImplementingTypes=void 0;var poe=(we(),Me(je));function foe(e,t){let n=t.getTypeMap(),r=[];for(let i in n){let s=n[i];(0,poe.isObjectType)(s)&&s.getInterfaces().find(u=>u.name===e)&&r.push(s.name)}return r}WE.getImplementingTypes=foe});var EA=V(XE=>{"use strict";m();T();h();Object.defineProperty(XE,"__esModule",{value:!0});XE.astFromType=void 0;var moe=Kh(),Pl=(we(),Me(je));function NA(e){if((0,Pl.isNonNullType)(e)){let t=NA(e.ofType);if(t.kind===Pl.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${(0,moe.inspect)(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:Pl.Kind.NON_NULL_TYPE,type:t}}else if((0,Pl.isListType)(e))return{kind:Pl.Kind.LIST_TYPE,type:NA(e.ofType)};return{kind:Pl.Kind.NAMED_TYPE,name:{kind:Pl.Kind.NAME,value:e.name}}}XE.astFromType=NA});var eg=V(ZE=>{"use strict";m();T();h();Object.defineProperty(ZE,"__esModule",{value:!0});ZE.astFromValueUntyped=void 0;var ta=(we(),Me(je));function gA(e){if(e===null)return{kind:ta.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=gA(n);r!=null&&t.push(r)}return{kind:ta.Kind.LIST,values:t}}if(typeof e=="object"){let t=[];for(let n in e){let r=e[n],i=gA(r);i&&t.push({kind:ta.Kind.OBJECT_FIELD,name:{kind:ta.Kind.NAME,value:n},value:i})}return{kind:ta.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:ta.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:ta.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return hoe.test(t)?{kind:ta.Kind.INT,value:t}:{kind:ta.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:ta.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}ZE.astFromValueUntyped=gA;var hoe=/^-?(?:0|[1-9][0-9]*)$/});var i1=V(tg=>{"use strict";m();T();h();Object.defineProperty(tg,"__esModule",{value:!0});tg.astFromValue=void 0;var Toe=Kh(),hs=(we(),Me(je)),yoe=eg(),r1=Gh();function Qh(e,t){if((0,hs.isNonNullType)(t)){let n=Qh(e,t.ofType);return(n==null?void 0:n.kind)===hs.Kind.NULL?null:n}if(e===null)return{kind:hs.Kind.NULL};if(e===void 0)return null;if((0,hs.isListType)(t)){let n=t.ofType;if((0,r1.isIterableObject)(e)){let r=[];for(let i of e){let s=Qh(i,n);s!=null&&r.push(s)}return{kind:hs.Kind.LIST,values:r}}return Qh(e,n)}if((0,hs.isInputObjectType)(t)){if(!(0,r1.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Qh(e[r.name],r.type);i&&n.push({kind:hs.Kind.OBJECT_FIELD,name:{kind:hs.Kind.NAME,value:r.name},value:i})}return{kind:hs.Kind.OBJECT,fields:n}}if((0,hs.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,hs.isEnumType)(t)?{kind:hs.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&Noe.test(n)?{kind:hs.Kind.INT,value:n}:(0,yoe.astFromValueUntyped)(n)}console.assert(!1,"Unexpected input type: "+(0,Toe.inspect)(t))}tg.astFromValue=Qh;var Noe=/^-?(?:0|[1-9][0-9]*)$/});var s1=V(ng=>{"use strict";m();T();h();Object.defineProperty(ng,"__esModule",{value:!0});ng.getDescriptionNode=void 0;var Eoe=(we(),Me(je));function goe(e){var t;if((t=e.astNode)!=null&&t.description)return K(k({},e.astNode.description),{block:!0});if(e.description)return{kind:Eoe.Kind.STRING,value:e.description,block:!0}}ng.getDescriptionNode=goe});var _p=V(pi=>{"use strict";m();T();h();Object.defineProperty(pi,"__esModule",{value:!0});pi.memoize2of5=pi.memoize2of4=pi.memoize5=pi.memoize4=pi.memoize3=pi.memoize2=pi.memoize1=void 0;function Ioe(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let s=e(r);return t.set(r,s),s}return i}}pi.memoize1=Ioe;function voe(e){let t=new WeakMap;return function(r,i){let s=t.get(r);if(!s){s=new WeakMap,t.set(r,s);let u=e(r,i);return s.set(i,u),u}let o=s.get(i);if(o===void 0){let u=e(r,i);return s.set(i,u),u}return o}}pi.memoize2=voe;function _oe(e){let t=new WeakMap;return function(r,i,s){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,s);return d.set(s,p),p}let u=o.get(i);if(!u){u=new WeakMap,o.set(i,u);let d=e(r,i,s);return u.set(s,d),d}let l=u.get(s);if(l===void 0){let d=e(r,i,s);return u.set(s,d),d}return l}}pi.memoize3=_oe;function boe(e){let t=new WeakMap;return function(r,i,s,o){let u=t.get(r);if(!u){u=new WeakMap,t.set(r,u);let y=new WeakMap;u.set(i,y);let N=new WeakMap;y.set(s,N);let I=e(r,i,s,o);return N.set(o,I),I}let l=u.get(i);if(!l){l=new WeakMap,u.set(i,l);let y=new WeakMap;l.set(s,y);let N=e(r,i,s,o);return y.set(o,N),N}let d=l.get(s);if(!d){let y=new WeakMap;l.set(s,y);let N=e(r,i,s,o);return y.set(o,N),N}let p=d.get(o);if(p===void 0){let y=e(r,i,s,o);return d.set(o,y),y}return p}}pi.memoize4=boe;function Ooe(e){let t=new WeakMap;return function(r,i,s,o,u){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let I=new WeakMap;l.set(i,I);let b=new WeakMap;I.set(s,b);let x=new WeakMap;b.set(o,x);let j=e(r,i,s,o,u);return x.set(u,j),j}let d=l.get(i);if(!d){d=new WeakMap,l.set(i,d);let I=new WeakMap;d.set(s,I);let b=new WeakMap;I.set(o,b);let x=e(r,i,s,o,u);return b.set(u,x),x}let p=d.get(s);if(!p){p=new WeakMap,d.set(s,p);let I=new WeakMap;p.set(o,I);let b=e(r,i,s,o,u);return I.set(u,b),b}let y=p.get(o);if(!y){y=new WeakMap,p.set(o,y);let I=e(r,i,s,o,u);return y.set(u,I),I}let N=y.get(u);if(N===void 0){let I=e(r,i,s,o,u);return y.set(u,I),I}return N}}pi.memoize5=Ooe;function Soe(e){let t=new WeakMap;return function(r,i,s,o){let u=t.get(r);if(!u){u=new WeakMap,t.set(r,u);let d=e(r,i,s,o);return u.set(i,d),d}let l=u.get(i);if(l===void 0){let d=e(r,i,s,o);return u.set(i,d),d}return l}}pi.memoize2of4=Soe;function Doe(e){let t=new WeakMap;return function(r,i,s,o,u){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let p=e(r,i,s,o,u);return l.set(i,p),p}let d=l.get(i);if(d===void 0){let p=e(r,i,s,o,u);return l.set(i,p),p}return d}}pi.memoize2of5=Doe});var Yh=V(Ts=>{"use strict";m();T();h();Object.defineProperty(Ts,"__esModule",{value:!0});Ts.getRootTypeMap=Ts.getRootTypes=Ts.getRootTypeNames=Ts.getDefinedRootType=void 0;var Aoe=QE(),IA=_p();function Roe(e,t,n){let i=(0,Ts.getRootTypeMap)(e).get(t);if(i==null)throw(0,Aoe.createGraphQLError)(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}Ts.getDefinedRootType=Roe;Ts.getRootTypeNames=(0,IA.memoize1)(function(t){let n=(0,Ts.getRootTypes)(t);return new Set([...n].map(r=>r.name))});Ts.getRootTypes=(0,IA.memoize1)(function(t){let n=(0,Ts.getRootTypeMap)(t);return new Set(n.values())});Ts.getRootTypeMap=(0,IA.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 s=t.getSubscriptionType();return s&&n.set("subscription",s),n})});var SA=V(Mt=>{"use strict";m();T();h();Object.defineProperty(Mt,"__esModule",{value:!0});Mt.makeDirectiveNodes=Mt.makeDirectiveNode=Mt.makeDeprecatedDirective=Mt.astFromEnumValue=Mt.astFromInputField=Mt.astFromField=Mt.astFromScalarType=Mt.astFromEnumType=Mt.astFromInputObjectType=Mt.astFromUnionType=Mt.astFromInterfaceType=Mt.astFromObjectType=Mt.astFromArg=Mt.getDeprecatableDirectiveNodes=Mt.getDirectiveNodes=Mt.astFromDirective=Mt.astFromSchema=Mt.printSchemaWithDirectives=Mt.getDocumentNodeFromSchema=void 0;var bt=(we(),Me(je)),kl=EA(),vA=i1(),Foe=eg(),qs=s1(),_A=mA(),woe=qh(),Loe=Yh();function o1(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=a1(e,n),s=i!=null?[i]:[],o=e.getDirectives();for(let u of o)(0,bt.isSpecifiedDirective)(u)||s.push(u1(u,e,n));for(let u in r){let l=r[u],d=(0,bt.isSpecifiedScalarType)(l),p=(0,bt.isIntrospectionType)(l);if(!(d||p))if((0,bt.isObjectType)(l))s.push(c1(l,e,n));else if((0,bt.isInterfaceType)(l))s.push(l1(l,e,n));else if((0,bt.isUnionType)(l))s.push(d1(l,e,n));else if((0,bt.isInputObjectType)(l))s.push(p1(l,e,n));else if((0,bt.isEnumType)(l))s.push(f1(l,e,n));else if((0,bt.isScalarType)(l))s.push(m1(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:bt.Kind.DOCUMENT,definitions:s}}Mt.getDocumentNodeFromSchema=o1;function Poe(e,t={}){let n=o1(e,t);return(0,bt.print)(n)}Mt.printSchemaWithDirectives=Poe;function a1(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,Loe.getRootTypeMap)(e);for(let[d,p]of n){let y=i.get(d);if(y!=null){let N=(0,kl.astFromType)(y);p!=null?p.type=N:n.set(d,{kind:bt.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:N})}}let s=[...n.values()].filter(woe.isSome),o=xl(e,e,t);if(!s.length&&!o.length)return null;let u={kind:s!=null?bt.Kind.SCHEMA_DEFINITION:bt.Kind.SCHEMA_EXTENSION,operationTypes:s,directives:o},l=(0,qs.getDescriptionNode)(e);return l&&(u.description=l),u}Mt.astFromSchema=a1;function u1(e,t,n){var r,i;return{kind:bt.Kind.DIRECTIVE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(s=>bA(s,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(s=>({kind:bt.Kind.NAME,value:s})))||[]}}Mt.astFromDirective=u1;function xl(e,t,n){let r=(0,_A.getDirectivesInExtensions)(e,n),i=[];e.astNode!=null&&i.push(e.astNode),"extensionASTNodes"in e&&e.extensionASTNodes!=null&&(i=i.concat(e.extensionASTNodes));let s;if(r!=null)s=rg(t,r);else{s=[];for(let o of i)o.directives&&s.push(...o.directives)}return s}Mt.getDirectiveNodes=xl;function zh(e,t,n){var u,l;let r=[],i=null,s=(0,_A.getDirectivesInExtensions)(e,n),o;return s!=null?o=rg(t,s):o=(u=e.astNode)==null?void 0:u.directives,o!=null&&(r=o.filter(d=>d.name.value!=="deprecated"),e.deprecationReason!=null&&(i=(l=o.filter(d=>d.name.value==="deprecated"))==null?void 0:l[0])),e.deprecationReason!=null&&i==null&&(i=y1(e.deprecationReason)),i==null?r:[i].concat(r)}Mt.getDeprecatableDirectiveNodes=zh;function bA(e,t,n){var r;return{kind:bt.Kind.INPUT_VALUE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},type:(0,kl.astFromType)(e.type),defaultValue:e.defaultValue!==void 0&&(r=(0,vA.astFromValue)(e.defaultValue,e.type))!=null?r:void 0,directives:zh(e,t,n)}}Mt.astFromArg=bA;function c1(e,t,n){return{kind:bt.Kind.OBJECT_TYPE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>OA(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>(0,kl.astFromType)(r)),directives:xl(e,t,n)}}Mt.astFromObjectType=c1;function l1(e,t,n){let r={kind:bt.Kind.INTERFACE_TYPE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>OA(i,t,n)),directives:xl(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>(0,kl.astFromType)(i))),r}Mt.astFromInterfaceType=l1;function d1(e,t,n){return{kind:bt.Kind.UNION_TYPE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},directives:xl(e,t,n),types:e.getTypes().map(r=>(0,kl.astFromType)(r))}}Mt.astFromUnionType=d1;function p1(e,t,n){return{kind:bt.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>h1(r,t,n)),directives:xl(e,t,n)}}Mt.astFromInputObjectType=p1;function f1(e,t,n){return{kind:bt.Kind.ENUM_TYPE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>T1(r,t,n)),directives:xl(e,t,n)}}Mt.astFromEnumType=f1;function m1(e,t,n){var o;let r=(0,_A.getDirectivesInExtensions)(e,n),i=r?rg(t,r):((o=e.astNode)==null?void 0:o.directives)||[],s=e.specifiedByUrl||e.specifiedByURL;if(s&&!i.some(u=>u.name.value==="specifiedBy")){let u={url:s};i.push(Jh("specifiedBy",u))}return{kind:bt.Kind.SCALAR_TYPE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},directives:i}}Mt.astFromScalarType=m1;function OA(e,t,n){return{kind:bt.Kind.FIELD_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},arguments:e.args.map(r=>bA(r,t,n)),type:(0,kl.astFromType)(e.type),directives:zh(e,t,n)}}Mt.astFromField=OA;function h1(e,t,n){var r;return{kind:bt.Kind.INPUT_VALUE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},type:(0,kl.astFromType)(e.type),directives:zh(e,t,n),defaultValue:(r=(0,vA.astFromValue)(e.defaultValue,e.type))!=null?r:void 0}}Mt.astFromInputField=h1;function T1(e,t,n){return{kind:bt.Kind.ENUM_VALUE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},directives:zh(e,t,n)}}Mt.astFromEnumValue=T1;function y1(e){return Jh("deprecated",{reason:e},bt.GraphQLDeprecatedDirective)}Mt.makeDeprecatedDirective=y1;function Jh(e,t,n){let r=[];if(n!=null)for(let i of n.args){let s=i.name,o=t[s];if(o!==void 0){let u=(0,vA.astFromValue)(o,i.type);u&&r.push({kind:bt.Kind.ARGUMENT,name:{kind:bt.Kind.NAME,value:s},value:u})}}else for(let i in t){let s=t[i],o=(0,Foe.astFromValueUntyped)(s);o&&r.push({kind:bt.Kind.ARGUMENT,name:{kind:bt.Kind.NAME,value:i},value:o})}return{kind:bt.Kind.DIRECTIVE,name:{kind:bt.Kind.NAME,value:e},arguments:r}}Mt.makeDirectiveNode=Jh;function rg(e,t){let n=[];for(let r in t){let i=t[r],s=e==null?void 0:e.getDirective(r);if(Array.isArray(i))for(let o of i)n.push(Jh(r,o,s));else n.push(Jh(r,i,s))}return n}Mt.makeDirectiveNodes=rg});var E1=V(bp=>{"use strict";m();T();h();Object.defineProperty(bp,"__esModule",{value:!0});bp.createDefaultRules=bp.validateGraphQlDocuments=void 0;var Hh=(we(),Me(je));function koe(e,t,n=N1()){var u;let r=new Set,i=new Map;for(let l of t)for(let d of l.definitions)d.kind===Hh.Kind.FRAGMENT_DEFINITION?i.set(d.name.value,d):r.add(d);let s={kind:Hh.Kind.DOCUMENT,definitions:Array.from([...r,...i.values()])},o=(0,Hh.validate)(e,s,n);for(let l of o)if(l.stack=l.message,l.locations)for(let d of l.locations)l.stack+=` +`+zj(e.errors,t):Jj(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(Jse(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:KE(r,n)}else if(Array.isArray(e))return zj(e,n);return zse(e,n)}function Jse(e){return typeof e.toJSON=="function"}function zse(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>Hj?"["+Hse(e)+"]":"{ "+n.map(([i,s])=>i+": "+KE(s,t)).join(", ")+" }"}function zj(e,t){if(e.length===0)return"[]";if(t.length>Hj)return"[Array]";let n=e.length,r=[];for(let i=0;i{"use strict";m();T();h();Object.defineProperty(vp,"__esModule",{value:!0});vp.relocatedError=vp.createGraphQLError=void 0;var lA=(we(),Me(je)),Wse=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function Xse(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>Wse.includes(t))}function dA(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&Xse(t.originalError)&&(t.originalError=dA(t.originalError.message,t.originalError)),lA.versionInfo.major>=17?new lA.GraphQLError(e,t):new lA.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)}vp.createGraphQLError=dA;function Zse(e,t){return dA(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t==null?e.path:t,originalError:e,extensions:e.extensions})}vp.relocatedError=Zse});var Gh=V($s=>{"use strict";m();T();h();Object.defineProperty($s,"__esModule",{value:!0});$s.hasOwnProperty=$s.promiseReduce=$s.isPromise=$s.isObjectLike=$s.isIterableObject=void 0;function eoe(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}$s.isIterableObject=eoe;function toe(e){return typeof e=="object"&&e!==null}$s.isObjectLike=toe;function Wj(e){return(e==null?void 0:e.then)!=null}$s.isPromise=Wj;function noe(e,t,n){let r=n;for(let i of e)r=Wj(r)?r.then(s=>t(s,i)):t(r,i);return r}$s.promiseReduce=noe;function roe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}$s.hasOwnProperty=roe});var fA=V(JE=>{"use strict";m();T();h();Object.defineProperty(JE,"__esModule",{value:!0});JE.getArgumentValues=void 0;var pA=Kh(),Ll=(we(),Me(je)),YE=QE(),ioe=Gh();function soe(e,t,n={}){var o;let r={},s=((o=t.arguments)!=null?o:[]).reduce((u,l)=>K(k({},u),{[l.name.value]:l}),{});for(let{name:u,type:l,defaultValue:d}of e.args){let p=s[u];if(!p){if(d!==void 0)r[u]=d;else if((0,Ll.isNonNullType)(l))throw(0,YE.createGraphQLError)(`Argument "${u}" of required type "${(0,pA.inspect)(l)}" was not provided.`,{nodes:[t]});continue}let y=p.value,N=y.kind===Ll.Kind.NULL;if(y.kind===Ll.Kind.VARIABLE){let _=y.name.value;if(n==null||!(0,ioe.hasOwnProperty)(n,_)){if(d!==void 0)r[u]=d;else if((0,Ll.isNonNullType)(l))throw(0,YE.createGraphQLError)(`Argument "${u}" of required type "${(0,pA.inspect)(l)}" was provided the variable "$${_}" which was not provided a runtime value.`,{nodes:[y]});continue}N=n[_]==null}if(N&&(0,Ll.isNonNullType)(l))throw(0,YE.createGraphQLError)(`Argument "${u}" of non-null type "${(0,pA.inspect)(l)}" must not be null.`,{nodes:[y]});let I=(0,Ll.valueFromAST)(y,l,n);if(I===void 0)throw(0,YE.createGraphQLError)(`Argument "${u}" has invalid value ${(0,Ll.print)(y)}.`,{nodes:[y]});r[u]=I}return r}JE.getArgumentValues=soe});var mA=V(ea=>{"use strict";m();T();h();Object.defineProperty(ea,"__esModule",{value:!0});ea.getDirective=ea.getDirectives=ea.getDirectiveInExtensions=ea.getDirectivesInExtensions=void 0;var Zj=fA();function e1(e,t=["directives"]){return t.reduce((n,r)=>n==null?n:n[r],e==null?void 0:e.extensions)}ea.getDirectivesInExtensions=e1;function Xj(e,t){let n=e.filter(r=>r.name===t);if(n.length)return n.map(r=>{var i;return(i=r.args)!=null?i:{}})}function t1(e,t,n=["directives"]){let r=n.reduce((s,o)=>s==null?s:s[o],e==null?void 0:e.extensions);if(r===void 0)return;if(Array.isArray(r))return Xj(r,t);let i=[];for(let[s,o]of Object.entries(r))if(Array.isArray(o))for(let u of o)i.push({name:s,args:u});else i.push({name:s,args:o});return Xj(i,t)}ea.getDirectiveInExtensions=t1;function ooe(e,t,n=["directives"]){let r=e1(t,n);if(r!=null&&r.length>0)return r;let s=(e&&e.getDirectives?e.getDirectives():[]).reduce((l,d)=>(l[d.name]=d,l),{}),o=[];t.astNode&&o.push(t.astNode),"extensionASTNodes"in t&&t.extensionASTNodes&&(o=[...o,...t.extensionASTNodes]);let u=[];for(let l of o)if(l.directives)for(let d of l.directives){let p=s[d.name.value];p&&u.push({name:d.name.value,args:(0,Zj.getArgumentValues)(p,d)})}return u}ea.getDirectives=ooe;function aoe(e,t,n,r=["directives"]){let i=t1(t,n,r);if(i!=null)return i;let s=e&&e.getDirective?e.getDirective(n):void 0;if(s==null)return;let o=[];t.astNode&&o.push(t.astNode),"extensionASTNodes"in t&&t.extensionASTNodes&&(o=[...o,...t.extensionASTNodes]);let u=[];for(let l of o)if(l.directives)for(let d of l.directives)d.name.value===n&&u.push((0,Zj.getArgumentValues)(s,d));if(u.length)return u}ea.getDirective=aoe});var hA=V(zE=>{"use strict";m();T();h();Object.defineProperty(zE,"__esModule",{value:!0});zE.getFieldsWithDirectives=void 0;var uoe=(we(),Me(je));function coe(e,t={}){let n={},r=["ObjectTypeDefinition","ObjectTypeExtension"];t.includeInputTypes&&(r=[...r,"InputObjectTypeDefinition","InputObjectTypeExtension"]);let i=e.definitions.filter(s=>r.includes(s.kind));for(let s of i){let o=s.name.value;if(s.fields!=null){for(let u of s.fields)if(u.directives&&u.directives.length>0){let l=u.name.value,d=`${o}.${l}`,p=u.directives.map(y=>({name:y.name.value,args:(y.arguments||[]).reduce((N,I)=>K(k({},N),{[I.name.value]:(0,uoe.valueFromASTUntyped)(I.value)}),{})}));n[d]=p}}}return n}zE.getFieldsWithDirectives=coe});var n1=V(HE=>{"use strict";m();T();h();Object.defineProperty(HE,"__esModule",{value:!0});HE.getArgumentsWithDirectives=void 0;var TA=(we(),Me(je));function loe(e){return e.kind===TA.Kind.OBJECT_TYPE_DEFINITION||e.kind===TA.Kind.OBJECT_TYPE_EXTENSION}function doe(e){var r;let t={},n=e.definitions.filter(loe);for(let i of n)if(i.fields!=null)for(let s of i.fields){let o=(r=s.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}.${s.name.value}`]={};for(let l of o){let d=l.directives.map(p=>({name:p.name.value,args:(p.arguments||[]).reduce((y,N)=>K(k({},y),{[N.name.value]:(0,TA.valueFromASTUntyped)(N.value)}),{})}));u[l.name.value]=d}}return t}HE.getArgumentsWithDirectives=doe});var yA=V(WE=>{"use strict";m();T();h();Object.defineProperty(WE,"__esModule",{value:!0});WE.getImplementingTypes=void 0;var poe=(we(),Me(je));function foe(e,t){let n=t.getTypeMap(),r=[];for(let i in n){let s=n[i];(0,poe.isObjectType)(s)&&s.getInterfaces().find(u=>u.name===e)&&r.push(s.name)}return r}WE.getImplementingTypes=foe});var EA=V(XE=>{"use strict";m();T();h();Object.defineProperty(XE,"__esModule",{value:!0});XE.astFromType=void 0;var moe=Kh(),Pl=(we(),Me(je));function NA(e){if((0,Pl.isNonNullType)(e)){let t=NA(e.ofType);if(t.kind===Pl.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${(0,moe.inspect)(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:Pl.Kind.NON_NULL_TYPE,type:t}}else if((0,Pl.isListType)(e))return{kind:Pl.Kind.LIST_TYPE,type:NA(e.ofType)};return{kind:Pl.Kind.NAMED_TYPE,name:{kind:Pl.Kind.NAME,value:e.name}}}XE.astFromType=NA});var eg=V(ZE=>{"use strict";m();T();h();Object.defineProperty(ZE,"__esModule",{value:!0});ZE.astFromValueUntyped=void 0;var ta=(we(),Me(je));function gA(e){if(e===null)return{kind:ta.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=gA(n);r!=null&&t.push(r)}return{kind:ta.Kind.LIST,values:t}}if(typeof e=="object"){let t=[];for(let n in e){let r=e[n],i=gA(r);i&&t.push({kind:ta.Kind.OBJECT_FIELD,name:{kind:ta.Kind.NAME,value:n},value:i})}return{kind:ta.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:ta.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:ta.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return hoe.test(t)?{kind:ta.Kind.INT,value:t}:{kind:ta.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:ta.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}ZE.astFromValueUntyped=gA;var hoe=/^-?(?:0|[1-9][0-9]*)$/});var i1=V(tg=>{"use strict";m();T();h();Object.defineProperty(tg,"__esModule",{value:!0});tg.astFromValue=void 0;var Toe=Kh(),hs=(we(),Me(je)),yoe=eg(),r1=Gh();function Qh(e,t){if((0,hs.isNonNullType)(t)){let n=Qh(e,t.ofType);return(n==null?void 0:n.kind)===hs.Kind.NULL?null:n}if(e===null)return{kind:hs.Kind.NULL};if(e===void 0)return null;if((0,hs.isListType)(t)){let n=t.ofType;if((0,r1.isIterableObject)(e)){let r=[];for(let i of e){let s=Qh(i,n);s!=null&&r.push(s)}return{kind:hs.Kind.LIST,values:r}}return Qh(e,n)}if((0,hs.isInputObjectType)(t)){if(!(0,r1.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Qh(e[r.name],r.type);i&&n.push({kind:hs.Kind.OBJECT_FIELD,name:{kind:hs.Kind.NAME,value:r.name},value:i})}return{kind:hs.Kind.OBJECT,fields:n}}if((0,hs.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,hs.isEnumType)(t)?{kind:hs.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&Noe.test(n)?{kind:hs.Kind.INT,value:n}:(0,yoe.astFromValueUntyped)(n)}console.assert(!1,"Unexpected input type: "+(0,Toe.inspect)(t))}tg.astFromValue=Qh;var Noe=/^-?(?:0|[1-9][0-9]*)$/});var s1=V(ng=>{"use strict";m();T();h();Object.defineProperty(ng,"__esModule",{value:!0});ng.getDescriptionNode=void 0;var Eoe=(we(),Me(je));function goe(e){var t;if((t=e.astNode)!=null&&t.description)return K(k({},e.astNode.description),{block:!0});if(e.description)return{kind:Eoe.Kind.STRING,value:e.description,block:!0}}ng.getDescriptionNode=goe});var _p=V(pi=>{"use strict";m();T();h();Object.defineProperty(pi,"__esModule",{value:!0});pi.memoize2of5=pi.memoize2of4=pi.memoize5=pi.memoize4=pi.memoize3=pi.memoize2=pi.memoize1=void 0;function Ioe(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let s=e(r);return t.set(r,s),s}return i}}pi.memoize1=Ioe;function voe(e){let t=new WeakMap;return function(r,i){let s=t.get(r);if(!s){s=new WeakMap,t.set(r,s);let u=e(r,i);return s.set(i,u),u}let o=s.get(i);if(o===void 0){let u=e(r,i);return s.set(i,u),u}return o}}pi.memoize2=voe;function _oe(e){let t=new WeakMap;return function(r,i,s){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,s);return d.set(s,p),p}let u=o.get(i);if(!u){u=new WeakMap,o.set(i,u);let d=e(r,i,s);return u.set(s,d),d}let l=u.get(s);if(l===void 0){let d=e(r,i,s);return u.set(s,d),d}return l}}pi.memoize3=_oe;function boe(e){let t=new WeakMap;return function(r,i,s,o){let u=t.get(r);if(!u){u=new WeakMap,t.set(r,u);let y=new WeakMap;u.set(i,y);let N=new WeakMap;y.set(s,N);let I=e(r,i,s,o);return N.set(o,I),I}let l=u.get(i);if(!l){l=new WeakMap,u.set(i,l);let y=new WeakMap;l.set(s,y);let N=e(r,i,s,o);return y.set(o,N),N}let d=l.get(s);if(!d){let y=new WeakMap;l.set(s,y);let N=e(r,i,s,o);return y.set(o,N),N}let p=d.get(o);if(p===void 0){let y=e(r,i,s,o);return d.set(o,y),y}return p}}pi.memoize4=boe;function Ooe(e){let t=new WeakMap;return function(r,i,s,o,u){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let I=new WeakMap;l.set(i,I);let _=new WeakMap;I.set(s,_);let C=new WeakMap;_.set(o,C);let j=e(r,i,s,o,u);return C.set(u,j),j}let d=l.get(i);if(!d){d=new WeakMap,l.set(i,d);let I=new WeakMap;d.set(s,I);let _=new WeakMap;I.set(o,_);let C=e(r,i,s,o,u);return _.set(u,C),C}let p=d.get(s);if(!p){p=new WeakMap,d.set(s,p);let I=new WeakMap;p.set(o,I);let _=e(r,i,s,o,u);return I.set(u,_),_}let y=p.get(o);if(!y){y=new WeakMap,p.set(o,y);let I=e(r,i,s,o,u);return y.set(u,I),I}let N=y.get(u);if(N===void 0){let I=e(r,i,s,o,u);return y.set(u,I),I}return N}}pi.memoize5=Ooe;function Soe(e){let t=new WeakMap;return function(r,i,s,o){let u=t.get(r);if(!u){u=new WeakMap,t.set(r,u);let d=e(r,i,s,o);return u.set(i,d),d}let l=u.get(i);if(l===void 0){let d=e(r,i,s,o);return u.set(i,d),d}return l}}pi.memoize2of4=Soe;function Doe(e){let t=new WeakMap;return function(r,i,s,o,u){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let p=e(r,i,s,o,u);return l.set(i,p),p}let d=l.get(i);if(d===void 0){let p=e(r,i,s,o,u);return l.set(i,p),p}return d}}pi.memoize2of5=Doe});var Yh=V(Ts=>{"use strict";m();T();h();Object.defineProperty(Ts,"__esModule",{value:!0});Ts.getRootTypeMap=Ts.getRootTypes=Ts.getRootTypeNames=Ts.getDefinedRootType=void 0;var Aoe=QE(),IA=_p();function Roe(e,t,n){let i=(0,Ts.getRootTypeMap)(e).get(t);if(i==null)throw(0,Aoe.createGraphQLError)(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}Ts.getDefinedRootType=Roe;Ts.getRootTypeNames=(0,IA.memoize1)(function(t){let n=(0,Ts.getRootTypes)(t);return new Set([...n].map(r=>r.name))});Ts.getRootTypes=(0,IA.memoize1)(function(t){let n=(0,Ts.getRootTypeMap)(t);return new Set(n.values())});Ts.getRootTypeMap=(0,IA.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 s=t.getSubscriptionType();return s&&n.set("subscription",s),n})});var SA=V(Mt=>{"use strict";m();T();h();Object.defineProperty(Mt,"__esModule",{value:!0});Mt.makeDirectiveNodes=Mt.makeDirectiveNode=Mt.makeDeprecatedDirective=Mt.astFromEnumValue=Mt.astFromInputField=Mt.astFromField=Mt.astFromScalarType=Mt.astFromEnumType=Mt.astFromInputObjectType=Mt.astFromUnionType=Mt.astFromInterfaceType=Mt.astFromObjectType=Mt.astFromArg=Mt.getDeprecatableDirectiveNodes=Mt.getDirectiveNodes=Mt.astFromDirective=Mt.astFromSchema=Mt.printSchemaWithDirectives=Mt.getDocumentNodeFromSchema=void 0;var bt=(we(),Me(je)),kl=EA(),vA=i1(),Foe=eg(),qs=s1(),_A=mA(),woe=qh(),Loe=Yh();function o1(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=a1(e,n),s=i!=null?[i]:[],o=e.getDirectives();for(let u of o)(0,bt.isSpecifiedDirective)(u)||s.push(u1(u,e,n));for(let u in r){let l=r[u],d=(0,bt.isSpecifiedScalarType)(l),p=(0,bt.isIntrospectionType)(l);if(!(d||p))if((0,bt.isObjectType)(l))s.push(c1(l,e,n));else if((0,bt.isInterfaceType)(l))s.push(l1(l,e,n));else if((0,bt.isUnionType)(l))s.push(d1(l,e,n));else if((0,bt.isInputObjectType)(l))s.push(p1(l,e,n));else if((0,bt.isEnumType)(l))s.push(f1(l,e,n));else if((0,bt.isScalarType)(l))s.push(m1(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:bt.Kind.DOCUMENT,definitions:s}}Mt.getDocumentNodeFromSchema=o1;function Poe(e,t={}){let n=o1(e,t);return(0,bt.print)(n)}Mt.printSchemaWithDirectives=Poe;function a1(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,Loe.getRootTypeMap)(e);for(let[d,p]of n){let y=i.get(d);if(y!=null){let N=(0,kl.astFromType)(y);p!=null?p.type=N:n.set(d,{kind:bt.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:N})}}let s=[...n.values()].filter(woe.isSome),o=xl(e,e,t);if(!s.length&&!o.length)return null;let u={kind:s!=null?bt.Kind.SCHEMA_DEFINITION:bt.Kind.SCHEMA_EXTENSION,operationTypes:s,directives:o},l=(0,qs.getDescriptionNode)(e);return l&&(u.description=l),u}Mt.astFromSchema=a1;function u1(e,t,n){var r,i;return{kind:bt.Kind.DIRECTIVE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(s=>bA(s,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(s=>({kind:bt.Kind.NAME,value:s})))||[]}}Mt.astFromDirective=u1;function xl(e,t,n){let r=(0,_A.getDirectivesInExtensions)(e,n),i=[];e.astNode!=null&&i.push(e.astNode),"extensionASTNodes"in e&&e.extensionASTNodes!=null&&(i=i.concat(e.extensionASTNodes));let s;if(r!=null)s=rg(t,r);else{s=[];for(let o of i)o.directives&&s.push(...o.directives)}return s}Mt.getDirectiveNodes=xl;function zh(e,t,n){var u,l;let r=[],i=null,s=(0,_A.getDirectivesInExtensions)(e,n),o;return s!=null?o=rg(t,s):o=(u=e.astNode)==null?void 0:u.directives,o!=null&&(r=o.filter(d=>d.name.value!=="deprecated"),e.deprecationReason!=null&&(i=(l=o.filter(d=>d.name.value==="deprecated"))==null?void 0:l[0])),e.deprecationReason!=null&&i==null&&(i=y1(e.deprecationReason)),i==null?r:[i].concat(r)}Mt.getDeprecatableDirectiveNodes=zh;function bA(e,t,n){var r;return{kind:bt.Kind.INPUT_VALUE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},type:(0,kl.astFromType)(e.type),defaultValue:e.defaultValue!==void 0&&(r=(0,vA.astFromValue)(e.defaultValue,e.type))!=null?r:void 0,directives:zh(e,t,n)}}Mt.astFromArg=bA;function c1(e,t,n){return{kind:bt.Kind.OBJECT_TYPE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>OA(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>(0,kl.astFromType)(r)),directives:xl(e,t,n)}}Mt.astFromObjectType=c1;function l1(e,t,n){let r={kind:bt.Kind.INTERFACE_TYPE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>OA(i,t,n)),directives:xl(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>(0,kl.astFromType)(i))),r}Mt.astFromInterfaceType=l1;function d1(e,t,n){return{kind:bt.Kind.UNION_TYPE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},directives:xl(e,t,n),types:e.getTypes().map(r=>(0,kl.astFromType)(r))}}Mt.astFromUnionType=d1;function p1(e,t,n){return{kind:bt.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>h1(r,t,n)),directives:xl(e,t,n)}}Mt.astFromInputObjectType=p1;function f1(e,t,n){return{kind:bt.Kind.ENUM_TYPE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>T1(r,t,n)),directives:xl(e,t,n)}}Mt.astFromEnumType=f1;function m1(e,t,n){var o;let r=(0,_A.getDirectivesInExtensions)(e,n),i=r?rg(t,r):((o=e.astNode)==null?void 0:o.directives)||[],s=e.specifiedByUrl||e.specifiedByURL;if(s&&!i.some(u=>u.name.value==="specifiedBy")){let u={url:s};i.push(Jh("specifiedBy",u))}return{kind:bt.Kind.SCALAR_TYPE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},directives:i}}Mt.astFromScalarType=m1;function OA(e,t,n){return{kind:bt.Kind.FIELD_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},arguments:e.args.map(r=>bA(r,t,n)),type:(0,kl.astFromType)(e.type),directives:zh(e,t,n)}}Mt.astFromField=OA;function h1(e,t,n){var r;return{kind:bt.Kind.INPUT_VALUE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},type:(0,kl.astFromType)(e.type),directives:zh(e,t,n),defaultValue:(r=(0,vA.astFromValue)(e.defaultValue,e.type))!=null?r:void 0}}Mt.astFromInputField=h1;function T1(e,t,n){return{kind:bt.Kind.ENUM_VALUE_DEFINITION,description:(0,qs.getDescriptionNode)(e),name:{kind:bt.Kind.NAME,value:e.name},directives:zh(e,t,n)}}Mt.astFromEnumValue=T1;function y1(e){return Jh("deprecated",{reason:e},bt.GraphQLDeprecatedDirective)}Mt.makeDeprecatedDirective=y1;function Jh(e,t,n){let r=[];if(n!=null)for(let i of n.args){let s=i.name,o=t[s];if(o!==void 0){let u=(0,vA.astFromValue)(o,i.type);u&&r.push({kind:bt.Kind.ARGUMENT,name:{kind:bt.Kind.NAME,value:s},value:u})}}else for(let i in t){let s=t[i],o=(0,Foe.astFromValueUntyped)(s);o&&r.push({kind:bt.Kind.ARGUMENT,name:{kind:bt.Kind.NAME,value:i},value:o})}return{kind:bt.Kind.DIRECTIVE,name:{kind:bt.Kind.NAME,value:e},arguments:r}}Mt.makeDirectiveNode=Jh;function rg(e,t){let n=[];for(let r in t){let i=t[r],s=e==null?void 0:e.getDirective(r);if(Array.isArray(i))for(let o of i)n.push(Jh(r,o,s));else n.push(Jh(r,i,s))}return n}Mt.makeDirectiveNodes=rg});var E1=V(bp=>{"use strict";m();T();h();Object.defineProperty(bp,"__esModule",{value:!0});bp.createDefaultRules=bp.validateGraphQlDocuments=void 0;var Hh=(we(),Me(je));function koe(e,t,n=N1()){var u;let r=new Set,i=new Map;for(let l of t)for(let d of l.definitions)d.kind===Hh.Kind.FRAGMENT_DEFINITION?i.set(d.name.value,d):r.add(d);let s={kind:Hh.Kind.DOCUMENT,definitions:Array.from([...r,...i.values()])},o=(0,Hh.validate)(e,s,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}bp.validateGraphQlDocuments=koe;function N1(){let e=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return Hh.versionInfo.major<15&&(e=e.map(t=>t.replace(/Rule$/,""))),Hh.specifiedRules.filter(t=>!e.includes(t.name))}bp.createDefaultRules=N1});var g1=V(ig=>{"use strict";m();T();h();Object.defineProperty(ig,"__esModule",{value:!0});ig.parseGraphQLJSON=void 0;var xoe=(we(),Me(je));function Coe(e){return e=e.toString(),e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function Uoe(e){return JSON.parse(Coe(e))}function Moe(e,t,n){let r=Uoe(t);if(r.data&&(r=r.data),r.kind==="Document")return{location:e,document:r};if(r.__schema){let i=(0,xoe.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")}ig.parseGraphQLJSON=Moe});var AA=V(dr=>{"use strict";m();T();h();Object.defineProperty(dr,"__esModule",{value:!0});dr.getBlockStringIndentation=dr.dedentBlockStringValue=dr.getLeadingCommentBlock=dr.getComment=dr.getDescription=dr.printWithComments=dr.printComment=dr.pushComment=dr.collectComment=dr.resetComments=void 0;var b1=(we(),Me(je)),Boe=80,Op={};function Voe(){Op={}}dr.resetComments=Voe;function joe(e){var n;let t=(n=e.name)==null?void 0:n.value;if(t!=null)switch(Wh(e,t),e.kind){case"EnumTypeDefinition":if(e.values)for(let r of e.values)Wh(r,t,r.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(let r of e.fields)if(Wh(r,t,r.name.value),Qoe(r)&&r.arguments)for(let i of r.arguments)Wh(i,t,r.name.value,i.name.value)}break}}dr.collectComment=joe;function Wh(e,t,n,r){let i=DA(e);if(typeof i!="string"||i.length===0)return;let s=[t];n&&(s.push(n),r&&s.push(r));let o=s.join(".");Op[o]||(Op[o]=[]),Op[o].push(i)}dr.pushComment=Wh;function O1(e){return` # `+e.replace(/\n/g,` # `)}dr.printComment=O1;function qe(e,t){return e?e.filter(n=>n).join(t||""):""}function I1(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` @@ -628,11 +628,11 @@ ${t}`)}dr.getComment=DA;function S1(e){let t=e.loc;if(!t)return;let n=[],r=t.sta `)}dr.dedentBlockStringValue=D1;function A1(e){let t=null;for(let n=1;n{"use strict";m();T();h();Object.defineProperty(bc,"__esModule",{value:!0});bc.isDescribable=bc.transformCommentsToDescriptions=bc.parseGraphQLSDL=void 0;var Ks=(we(),Me(je)),F1=AA();function Joe(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=w1(t,n),n.noLocation&&(r=(0,Ks.parse)((0,Ks.print)(r),n))):r=(0,Ks.parse)(new Ks.Source(t,e),n)}catch(i){if(i.message.includes("EOF")&&t.replace(/(\#[^*]*)/g,"").trim()==="")r={kind:Ks.Kind.DOCUMENT,definitions:[]};else throw i}return{location:e,document:r}}bc.parseGraphQLSDL=Joe;function w1(e,t={}){let n=(0,Ks.parse)(e,K(k({},t),{noLocation:!1}));return(0,Ks.visit)(n,{leave:i=>{if(L1(i)){let s=(0,F1.getLeadingCommentBlock)(i);if(s!==void 0){let o=(0,F1.dedentBlockStringValue)(` `+s),u=o.includes(` `);return i.description?K(k({},i),{description:K(k({},i.description),{value:i.description.value+` -`+o,block:!0})}):K(k({},i),{description:{kind:Ks.Kind.STRING,value:o,block:u}})}}}})}bc.transformCommentsToDescriptions=w1;function L1(e){return(0,Ks.isTypeSystemDefinitionNode)(e)||e.kind===Ks.Kind.FIELD_DEFINITION||e.kind===Ks.Kind.INPUT_VALUE_DEFINITION||e.kind===Ks.Kind.ENUM_VALUE_DEFINITION}bc.isDescribable=L1});var j1=V(og=>{"use strict";m();T();h();Object.defineProperty(og,"__esModule",{value:!0});og.buildOperationNodeForField=void 0;var Ot=(we(),Me(je)),U1=Yh(),wA=[],sg=new Map;function M1(e){wA.push(e)}function k1(){wA=[]}function x1(){sg=new Map}function zoe({schema:e,kind:t,field:n,models:r,ignore:i=[],depthLimit:s,circularReferenceDepth:o,argNames:u,selectedFields:l=!0}){k1(),x1();let d=(0,U1.getRootTypeNames)(e),p=Hoe({schema:e,fieldName:n,kind:t,models:r||[],ignore:i,depthLimit:s||1/0,circularReferenceDepth:o||1,argNames:u,selectedFields:l,rootTypeNames:d});return p.variableDefinitions=[...wA],k1(),x1(),p}og.buildOperationNodeForField=zoe;function Hoe({schema:e,fieldName:t,kind:n,models:r,ignore:i,depthLimit:s,circularReferenceDepth:o,argNames:u,selectedFields:l,rootTypeNames:d}){let p=(0,U1.getDefinedRootType)(e,n),y=p.getFields()[t],N=`${t}_${n}`;if(y.args)for(let I of y.args){let b=I.name;(!u||u.includes(b))&&M1(B1(I,b))}return{kind:Ot.Kind.OPERATION_DEFINITION,operation:n,name:{kind:Ot.Kind.NAME,value:N},variableDefinitions:[],selectionSet:{kind:Ot.Kind.SELECTION_SET,selections:[V1({type:p,field:y,models:r,firstCall:!0,path:[],ancestors:[],ignore:i,depthLimit:s,circularReferenceDepth:o,schema:e,depth:0,argNames:u,selectedFields:l,rootTypeNames:d})]}}}function FA({parent:e,type:t,models:n,firstCall:r,path:i,ancestors:s,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:y,selectedFields:N,rootTypeNames:I}){if(!(typeof N=="boolean"&&p>u)){if((0,Ot.isUnionType)(t)){let b=t.getTypes();return{kind:Ot.Kind.SELECTION_SET,selections:b.filter(x=>!RA([...s,x],{depth:l})).map(x=>({kind:Ot.Kind.INLINE_FRAGMENT,typeCondition:{kind:Ot.Kind.NAMED_TYPE,name:{kind:Ot.Kind.NAME,value:x.name}},selectionSet:FA({parent:t,type:x,models:n,path:i,ancestors:s,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:y,selectedFields:N,rootTypeNames:I})})).filter(x=>{var j,Q;return((Q=(j=x==null?void 0:x.selectionSet)==null?void 0:j.selections)==null?void 0:Q.length)>0})}}if((0,Ot.isInterfaceType)(t)){let b=Object.values(d.getTypeMap()).filter(x=>(0,Ot.isObjectType)(x)&&x.getInterfaces().includes(t));return{kind:Ot.Kind.SELECTION_SET,selections:b.filter(x=>!RA([...s,x],{depth:l})).map(x=>({kind:Ot.Kind.INLINE_FRAGMENT,typeCondition:{kind:Ot.Kind.NAMED_TYPE,name:{kind:Ot.Kind.NAME,value:x.name}},selectionSet:FA({parent:t,type:x,models:n,path:i,ancestors:s,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:y,selectedFields:N,rootTypeNames:I})})).filter(x=>{var j,Q;return((Q=(j=x==null?void 0:x.selectionSet)==null?void 0:j.selections)==null?void 0:Q.length)>0})}}if((0,Ot.isObjectType)(t)&&!I.has(t.name)){let b=o.includes(t.name)||o.includes(`${e.name}.${i[i.length-1]}`),x=n.includes(t.name);if(!r&&x&&!b)return{kind:Ot.Kind.SELECTION_SET,selections:[{kind:Ot.Kind.FIELD,name:{kind:Ot.Kind.NAME,value:"id"}}]};let j=t.getFields();return{kind:Ot.Kind.SELECTION_SET,selections:Object.keys(j).filter(Q=>!RA([...s,(0,Ot.getNamedType)(j[Q].type)],{depth:l})).map(Q=>{let re=typeof N=="object"?N[Q]:!0;return re?V1({type:t,field:j[Q],models:n,path:[...i,Q],ancestors:s,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:y,selectedFields:re,rootTypeNames:I}):null}).filter(Q=>{var re,se;return Q==null?!1:"selectionSet"in Q?!!((se=(re=Q.selectionSet)==null?void 0:re.selections)!=null&&se.length):!0})}}}}function B1(e,t){function n(r){return(0,Ot.isListType)(r)?{kind:Ot.Kind.LIST_TYPE,type:n(r.ofType)}:(0,Ot.isNonNullType)(r)?{kind:Ot.Kind.NON_NULL_TYPE,type:n(r.ofType)}:{kind:Ot.Kind.NAMED_TYPE,name:{kind:Ot.Kind.NAME,value:r.name}}}return{kind:Ot.Kind.VARIABLE_DEFINITION,variable:{kind:Ot.Kind.VARIABLE,name:{kind:Ot.Kind.NAME,value:t||e.name}},type:n(e.type)}}function C1(e,t){return[...t,e].join("_")}function V1({type:e,field:t,models:n,firstCall:r,path:i,ancestors:s,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:y,selectedFields:N,rootTypeNames:I}){let b=(0,Ot.getNamedType)(t.type),x=[],j=!1;if(t.args&&t.args.length&&(x=t.args.map(pe=>{let ye=C1(pe.name,i);return y&&!y.includes(ye)?((0,Ot.isNonNullType)(pe.type)&&(j=!0),null):(r||M1(B1(pe,ye)),{kind:Ot.Kind.ARGUMENT,name:{kind:Ot.Kind.NAME,value:pe.name},value:{kind:Ot.Kind.VARIABLE,name:{kind:Ot.Kind.NAME,value:C1(pe.name,i)}}})}).filter(Boolean)),j)return null;let Q=[...i,t.name],re=Q.join("."),se=t.name;return sg.has(re)&&sg.get(re)!==t.type.toString()&&(se+=t.type.toString().replace("!","NonNull").replace("[","List").replace("]","")),sg.set(re,t.type.toString()),!(0,Ot.isScalarType)(b)&&!(0,Ot.isEnumType)(b)?K(k({kind:Ot.Kind.FIELD,name:{kind:Ot.Kind.NAME,value:t.name}},se!==t.name&&{alias:{kind:Ot.Kind.NAME,value:se}}),{selectionSet:FA({parent:e,type:b,models:n,firstCall:r,path:Q,ancestors:[...s,e],ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p+1,argNames:y,selectedFields:N,rootTypeNames:I})||void 0,arguments:x}):K(k({kind:Ot.Kind.FIELD,name:{kind:Ot.Kind.NAME,value:t.name}},se!==t.name&&{alias:{kind:Ot.Kind.NAME,value:se}}),{arguments:x})}function RA(e,t={depth:1}){let n=e[e.length-1];return(0,Ot.isScalarType)(n)?!1:e.filter(i=>i.name===n.name).length>t.depth}});var q1=V(ag=>{"use strict";m();T();h();Object.defineProperty(ag,"__esModule",{value:!0});ag.DirectiveLocation=void 0;var $1;(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"})($1||(ag.DirectiveLocation=$1={}))});var Cl=V(ug=>{"use strict";m();T();h();Object.defineProperty(ug,"__esModule",{value:!0});ug.MapperKind=void 0;var K1;(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"})(K1||(ug.MapperKind=K1={}))});var LA=V(cg=>{"use strict";m();T();h();Object.defineProperty(cg,"__esModule",{value:!0});cg.getObjectTypeFromTypeMap=void 0;var Woe=(we(),Me(je));function Xoe(e,t){if(t){let n=e[t.name];if((0,Woe.isObjectType)(n))return n}}cg.getObjectTypeFromTypeMap=Xoe});var xA=V(na=>{"use strict";m();T();h();Object.defineProperty(na,"__esModule",{value:!0});na.getBuiltInForStub=na.isNamedStub=na.createStub=na.createNamedStub=void 0;var Kr=(we(),Me(je));function PA(e,t){let n;return t==="object"?n=Kr.GraphQLObjectType:t==="interface"?n=Kr.GraphQLInterfaceType:n=Kr.GraphQLInputObjectType,new n({name:e,fields:{_fake:{type:Kr.GraphQLString}}})}na.createNamedStub=PA;function kA(e,t){switch(e.kind){case Kr.Kind.LIST_TYPE:return new Kr.GraphQLList(kA(e.type,t));case Kr.Kind.NON_NULL_TYPE:return new Kr.GraphQLNonNull(kA(e.type,t));default:return t==="output"?PA(e.name.value,"object"):PA(e.name.value,"input")}}na.createStub=kA;function Zoe(e){if("getFields"in e){let t=e.getFields();for(let n in t)return t[n].name==="_fake"}return!1}na.isNamedStub=Zoe;function eae(e){switch(e.name){case Kr.GraphQLInt.name:return Kr.GraphQLInt;case Kr.GraphQLFloat.name:return Kr.GraphQLFloat;case Kr.GraphQLString.name:return Kr.GraphQLString;case Kr.GraphQLBoolean.name:return Kr.GraphQLBoolean;case Kr.GraphQLID.name:return Kr.GraphQLID;default:return e}}na.getBuiltInForStub=eae});var dg=V(lg=>{"use strict";m();T();h();Object.defineProperty(lg,"__esModule",{value:!0});lg.rewireTypes=void 0;var Sr=(we(),Me(je)),G1=xA();function tae(e,t){let n=Object.create(null);for(let N in e)n[N]=e[N];let r=Object.create(null);for(let N in n){let I=n[N];if(I==null||N.startsWith("__"))continue;let b=I.name;if(!b.startsWith("__")){if(r[b]!=null){console.warn(`Duplicate schema type name ${b} found; keeping the existing one found in the schema`);continue}r[b]=I}}for(let N in r)r[N]=u(r[N]);let i=t.map(N=>s(N));return{typeMap:r,directives:i};function s(N){if((0,Sr.isSpecifiedDirective)(N))return N;let I=N.toConfig();return I.args=o(I.args),new Sr.GraphQLDirective(I)}function o(N){let I={};for(let b in N){let x=N[b],j=y(x.type);j!=null&&(x.type=j,I[b]=x)}return I}function u(N){if((0,Sr.isObjectType)(N)){let I=N.toConfig(),b=K(k({},I),{fields:()=>l(I.fields),interfaces:()=>p(I.interfaces)});return new Sr.GraphQLObjectType(b)}else if((0,Sr.isInterfaceType)(N)){let I=N.toConfig(),b=K(k({},I),{fields:()=>l(I.fields)});return"interfaces"in b&&(b.interfaces=()=>p(I.interfaces)),new Sr.GraphQLInterfaceType(b)}else if((0,Sr.isUnionType)(N)){let I=N.toConfig(),b=K(k({},I),{types:()=>p(I.types)});return new Sr.GraphQLUnionType(b)}else if((0,Sr.isInputObjectType)(N)){let I=N.toConfig(),b=K(k({},I),{fields:()=>d(I.fields)});return new Sr.GraphQLInputObjectType(b)}else if((0,Sr.isEnumType)(N)){let I=N.toConfig();return new Sr.GraphQLEnumType(I)}else if((0,Sr.isScalarType)(N)){if((0,Sr.isSpecifiedScalarType)(N))return N;let I=N.toConfig();return new Sr.GraphQLScalarType(I)}throw new Error(`Unexpected schema type: ${N}`)}function l(N){let I={};for(let b in N){let x=N[b],j=y(x.type);j!=null&&x.args&&(x.type=j,x.args=o(x.args),I[b]=x)}return I}function d(N){let I={};for(let b in N){let x=N[b],j=y(x.type);j!=null&&(x.type=j,I[b]=x)}return I}function p(N){let I=[];for(let b of N){let x=y(b);x!=null&&I.push(x)}return I}function y(N){if((0,Sr.isListType)(N)){let I=y(N.ofType);return I!=null?new Sr.GraphQLList(I):null}else if((0,Sr.isNonNullType)(N)){let I=y(N.ofType);return I!=null?new Sr.GraphQLNonNull(I):null}else if((0,Sr.isNamedType)(N)){let I=n[N.name];return I===void 0&&(I=(0,G1.isNamedStub)(N)?(0,G1.getBuiltInForStub)(N):u(N),r[I.name]=n[N.name]=I),I!=null?r[I.name]:null}return null}}lg.rewireTypes=tae});var CA=V(ra=>{"use strict";m();T();h();Object.defineProperty(ra,"__esModule",{value:!0});ra.parseInputValueLiteral=ra.parseInputValue=ra.serializeInputValue=ra.transformInputValue=void 0;var pg=(we(),Me(je)),nae=qh();function Sp(e,t,n=null,r=null){if(t==null)return t;let i=(0,pg.getNullableType)(e);if((0,pg.isLeafType)(i))return n!=null?n(i,t):t;if((0,pg.isListType)(i))return(0,nae.asArray)(t).map(s=>Sp(i.ofType,s,n,r));if((0,pg.isInputObjectType)(i)){let s=i.getFields(),o={};for(let u in t){let l=s[u];l!=null&&(o[u]=Sp(l.type,t[u],n,r))}return r!=null?r(i,o):o}}ra.transformInputValue=Sp;function rae(e,t){return Sp(e,t,(n,r)=>{try{return n.serialize(r)}catch(i){return r}})}ra.serializeInputValue=rae;function iae(e,t){return Sp(e,t,(n,r)=>{try{return n.parseValue(r)}catch(i){return r}})}ra.parseInputValue=iae;function sae(e,t){return Sp(e,t,(n,r)=>n.parseLiteral(r,{}))}ra.parseInputValueLiteral=sae});var Rp=V(Ap=>{"use strict";m();T();h();Object.defineProperty(Ap,"__esModule",{value:!0});Ap.correctASTNodes=Ap.mapSchema=void 0;var yt=(we(),Me(je)),Dp=LA(),zt=Cl(),oae=dg(),Q1=CA();function aae(e,t={}){let n=z1(J1(UA(Y1(uae(UA(Y1(e.getTypeMap(),e,Q1.serializeInputValue),e,t,u=>(0,yt.isLeafType)(u)),e,t),e,Q1.parseInputValue),e,t,u=>!(0,yt.isLeafType)(u)),e,t),e,t),r=e.getDirectives(),i=cae(r,e,t),{typeMap:s,directives:o}=(0,oae.rewireTypes)(n,i);return new yt.GraphQLSchema(K(k({},e.toConfig()),{query:(0,Dp.getObjectTypeFromTypeMap)(s,(0,Dp.getObjectTypeFromTypeMap)(n,e.getQueryType())),mutation:(0,Dp.getObjectTypeFromTypeMap)(s,(0,Dp.getObjectTypeFromTypeMap)(n,e.getMutationType())),subscription:(0,Dp.getObjectTypeFromTypeMap)(s,(0,Dp.getObjectTypeFromTypeMap)(n,e.getSubscriptionType())),types:Object.values(s),directives:o}))}Ap.mapSchema=aae;function UA(e,t,n,r=()=>!0){let i={};for(let s in e)if(!s.startsWith("__")){let o=e[s];if(o==null||!r(o)){i[s]=o;continue}let u=dae(t,n,s);if(u==null){i[s]=o;continue}let l=u(o,t);if(l===void 0){i[s]=o;continue}i[s]=l}return i}function uae(e,t,n){let r=Tae(n);return r?UA(e,t,{[zt.MapperKind.ENUM_TYPE]:i=>{let s=i.toConfig(),o=s.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[y,N]=p;u[y]=N===void 0?d:N}else p!==null&&(u[l]=p)}return Zh(new yt.GraphQLEnumType(K(k({},s),{values:u})))}},i=>(0,yt.isEnumType)(i)):e}function Y1(e,t,n){let r=z1(e,t,{[zt.MapperKind.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;let s=fg(e,i.type);if(s!=null)return K(k({},i),{defaultValue:n(s,i.defaultValue)})}});return J1(r,t,{[zt.MapperKind.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;let s=fg(r,i.type);if(s!=null)return K(k({},i),{defaultValue:n(s,i.defaultValue)})}})}function fg(e,t){if((0,yt.isListType)(t)){let n=fg(e,t.ofType);return n!=null?new yt.GraphQLList(n):null}else if((0,yt.isNonNullType)(t)){let n=fg(e,t.ofType);return n!=null?new yt.GraphQLNonNull(n):null}else if((0,yt.isNamedType)(t)){let n=e[t.name];return n!=null?n:null}return null}function J1(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let s=e[i];if(!(0,yt.isObjectType)(s)&&!(0,yt.isInterfaceType)(s)&&!(0,yt.isInputObjectType)(s)){r[i]=s;continue}let o=fae(t,n,i);if(o==null){r[i]=s;continue}let u=s.toConfig(),l=u.fields,d={};for(let p in l){let y=l[p],N=o(y,p,i,t);if(N===void 0)d[p]=y;else if(Array.isArray(N)){let[I,b]=N;b.astNode!=null&&(b.astNode=K(k({},b.astNode),{name:K(k({},b.astNode.name),{value:I})})),d[I]=b===void 0?y:b}else N!==null&&(d[p]=N)}(0,yt.isObjectType)(s)?r[i]=Zh(new yt.GraphQLObjectType(K(k({},u),{fields:d}))):(0,yt.isInterfaceType)(s)?r[i]=Zh(new yt.GraphQLInterfaceType(K(k({},u),{fields:d}))):r[i]=Zh(new yt.GraphQLInputObjectType(K(k({},u),{fields:d})))}return r}function z1(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let s=e[i];if(!(0,yt.isObjectType)(s)&&!(0,yt.isInterfaceType)(s)){r[i]=s;continue}let o=mae(n);if(o==null){r[i]=s;continue}let u=s.toConfig(),l=u.fields,d={};for(let p in l){let y=l[p],N=y.args;if(N==null){d[p]=y;continue}let I=Object.keys(N);if(!I.length){d[p]=y;continue}let b={};for(let x of I){let j=N[x],Q=o(j,p,i,t);if(Q===void 0)b[x]=j;else if(Array.isArray(Q)){let[re,se]=Q;b[re]=se}else Q!==null&&(b[x]=Q)}d[p]=K(k({},y),{args:b})}(0,yt.isObjectType)(s)?r[i]=new yt.GraphQLObjectType(K(k({},u),{fields:d})):(0,yt.isInterfaceType)(s)?r[i]=new yt.GraphQLInterfaceType(K(k({},u),{fields:d})):r[i]=new yt.GraphQLInputObjectType(K(k({},u),{fields:d}))}return r}function cae(e,t,n){let r=hae(n);if(r==null)return e.slice();let i=[];for(let s of e){let o=r(s,t);o===void 0?i.push(s):o!==null&&i.push(o)}return i}function lae(e,t){var i,s,o;let n=e.getType(t),r=[zt.MapperKind.TYPE];return(0,yt.isObjectType)(n)?(r.push(zt.MapperKind.COMPOSITE_TYPE,zt.MapperKind.OBJECT_TYPE),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(zt.MapperKind.ROOT_OBJECT,zt.MapperKind.QUERY):t===((s=e.getMutationType())==null?void 0:s.name)?r.push(zt.MapperKind.ROOT_OBJECT,zt.MapperKind.MUTATION):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(zt.MapperKind.ROOT_OBJECT,zt.MapperKind.SUBSCRIPTION)):(0,yt.isInputObjectType)(n)?r.push(zt.MapperKind.INPUT_OBJECT_TYPE):(0,yt.isInterfaceType)(n)?r.push(zt.MapperKind.COMPOSITE_TYPE,zt.MapperKind.ABSTRACT_TYPE,zt.MapperKind.INTERFACE_TYPE):(0,yt.isUnionType)(n)?r.push(zt.MapperKind.COMPOSITE_TYPE,zt.MapperKind.ABSTRACT_TYPE,zt.MapperKind.UNION_TYPE):(0,yt.isEnumType)(n)?r.push(zt.MapperKind.ENUM_TYPE):(0,yt.isScalarType)(n)&&r.push(zt.MapperKind.SCALAR_TYPE),r}function dae(e,t,n){let r=lae(e,n),i,s=[...r];for(;!i&&s.length>0;){let o=s.pop();i=t[o]}return i!=null?i:null}function pae(e,t){var i,s,o;let n=e.getType(t),r=[zt.MapperKind.FIELD];return(0,yt.isObjectType)(n)?(r.push(zt.MapperKind.COMPOSITE_FIELD,zt.MapperKind.OBJECT_FIELD),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(zt.MapperKind.ROOT_FIELD,zt.MapperKind.QUERY_ROOT_FIELD):t===((s=e.getMutationType())==null?void 0:s.name)?r.push(zt.MapperKind.ROOT_FIELD,zt.MapperKind.MUTATION_ROOT_FIELD):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(zt.MapperKind.ROOT_FIELD,zt.MapperKind.SUBSCRIPTION_ROOT_FIELD)):(0,yt.isInterfaceType)(n)?r.push(zt.MapperKind.COMPOSITE_FIELD,zt.MapperKind.INTERFACE_FIELD):(0,yt.isInputObjectType)(n)&&r.push(zt.MapperKind.INPUT_OBJECT_FIELD),r}function fae(e,t,n){let r=pae(e,n),i,s=[...r];for(;!i&&s.length>0;){let o=s.pop();i=t[o]}return i!=null?i:null}function mae(e){let t=e[zt.MapperKind.ARGUMENT];return t!=null?t:null}function hae(e){let t=e[zt.MapperKind.DIRECTIVE];return t!=null?t:null}function Tae(e){let t=e[zt.MapperKind.ENUM_VALUE];return t!=null?t:null}function Zh(e){if((0,yt.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(k({},t.astNode),{kind:yt.Kind.OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>K(k({},n),{kind:yt.Kind.OBJECT_TYPE_EXTENSION,fields:void 0}))),new yt.GraphQLObjectType(t)}else if((0,yt.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(k({},t.astNode),{kind:yt.Kind.INTERFACE_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>K(k({},n),{kind:yt.Kind.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new yt.GraphQLInterfaceType(t)}else if((0,yt.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(k({},t.astNode),{kind:yt.Kind.INPUT_OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>K(k({},n),{kind:yt.Kind.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new yt.GraphQLInputObjectType(t)}else if((0,yt.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(k({},t.astNode),{values:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>K(k({},n),{values:void 0}))),new yt.GraphQLEnumType(t)}else return e}Ap.correctASTNodes=Zh});var H1=V(hg=>{"use strict";m();T();h();Object.defineProperty(hg,"__esModule",{value:!0});hg.filterSchema=void 0;var mg=(we(),Me(je)),Ga=Cl(),yae=Rp();function Nae({schema:e,typeFilter:t=()=>!0,fieldFilter:n=void 0,rootFieldFilter:r=void 0,objectFieldFilter:i=void 0,interfaceFieldFilter:s=void 0,inputObjectFieldFilter:o=void 0,argumentFilter:u=void 0}){return(0,yae.mapSchema)(e,{[Ga.MapperKind.QUERY]:d=>MA(d,"Query",r,u),[Ga.MapperKind.MUTATION]:d=>MA(d,"Mutation",r,u),[Ga.MapperKind.SUBSCRIPTION]:d=>MA(d,"Subscription",r,u),[Ga.MapperKind.OBJECT_TYPE]:d=>t(d.name,d)?BA(mg.GraphQLObjectType,d,i||n,u):null,[Ga.MapperKind.INTERFACE_TYPE]:d=>t(d.name,d)?BA(mg.GraphQLInterfaceType,d,s||n,u):null,[Ga.MapperKind.INPUT_OBJECT_TYPE]:d=>t(d.name,d)?BA(mg.GraphQLInputObjectType,d,o||n):null,[Ga.MapperKind.UNION_TYPE]:d=>t(d.name,d)?void 0:null,[Ga.MapperKind.ENUM_TYPE]:d=>t(d.name,d)?void 0:null,[Ga.MapperKind.SCALAR_TYPE]:d=>t(d.name,d)?void 0:null})}hg.filterSchema=Nae;function MA(e,t,n,r){if(n||r){let i=e.toConfig();for(let s in i.fields){let o=i.fields[s];if(n&&!n(t,s,i.fields[s]))delete i.fields[s];else if(r&&o.args)for(let u in o.args)r(t,s,u,o.args[u])||delete o.args[u]}return new mg.GraphQLObjectType(i)}return e}function BA(e,t,n,r){if(n||r){let i=t.toConfig();for(let s in i.fields){let o=i.fields[s];if(n&&!n(t.name,s,i.fields[s]))delete i.fields[s];else if(r&&"args"in o)for(let u in o.args)r(t.name,s,u,o.args[u])||delete o.args[u]}return new e(i)}}});var X1=V(Fp=>{"use strict";m();T();h();Object.defineProperty(Fp,"__esModule",{value:!0});Fp.healTypes=Fp.healSchema=void 0;var ia=(we(),Me(je));function Eae(e){return W1(e.getTypeMap(),e.getDirectives()),e}Fp.healSchema=Eae;function W1(e,t){let n=Object.create(null);for(let d in e){let p=e[d];if(p==null||d.startsWith("__"))continue;let y=p.name;if(!y.startsWith("__")){if(n[y]!=null){console.warn(`Duplicate schema type name ${y} found; keeping the existing one found in the schema`);continue}n[y]=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,ia.isObjectType)(d)){i(d),s(d);return}else if((0,ia.isInterfaceType)(d)){i(d),"getInterfaces"in d&&s(d);return}else if((0,ia.isUnionType)(d)){u(d);return}else if((0,ia.isInputObjectType)(d)){o(d);return}else if((0,ia.isLeafType)(d))return;throw new Error(`Unexpected schema type: ${d}`)}function i(d){let p=d.getFields();for(let[y,N]of Object.entries(p))N.args.map(I=>(I.type=l(I.type),I.type===null?null:I)).filter(Boolean),N.type=l(N.type),N.type===null&&delete p[y]}function s(d){if("getInterfaces"in d){let p=d.getInterfaces();p.push(...p.splice(0).map(y=>l(y)).filter(Boolean))}}function o(d){let p=d.getFields();for(let[y,N]of Object.entries(p))N.type=l(N.type),N.type===null&&delete p[y]}function u(d){let p=d.getTypes();p.push(...p.splice(0).map(y=>l(y)).filter(Boolean))}function l(d){if((0,ia.isListType)(d)){let p=l(d.ofType);return p!=null?new ia.GraphQLList(p):null}else if((0,ia.isNonNullType)(d)){let p=l(d.ofType);return p!=null?new ia.GraphQLNonNull(p):null}else if((0,ia.isNamedType)(d)){let p=e[d.name];if(p&&d!==p)return p}return d}}Fp.healTypes=W1});var Z1=V(Tg=>{"use strict";m();T();h();Object.defineProperty(Tg,"__esModule",{value:!0});Tg.getResolversFromSchema=void 0;var Ul=(we(),Me(je));function gae(e,t){var i,s;let n=Object.create(null),r=e.getTypeMap();for(let o in r)if(!o.startsWith("__")){let u=r[o];if((0,Ul.isScalarType)(u)){if(!(0,Ul.isSpecifiedScalarType)(u)){let l=u.toConfig();delete l.astNode,n[o]=new Ul.GraphQLScalarType(l)}}else if((0,Ul.isEnumType)(u)){n[o]={};let l=u.getValues();for(let d of l)n[o][d.name]=d.value}else if((0,Ul.isInterfaceType)(u))u.resolveType!=null&&(n[o]={__resolveType:u.resolveType});else if((0,Ul.isUnionType)(u))u.resolveType!=null&&(n[o]={__resolveType:u.resolveType});else if((0,Ul.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((s=p.resolve)==null?void 0:s.name){case"defaultMergedResolver":if(!t)continue;break;case"defaultFieldResolver":continue}n[o][d]=n[o][d]||{},n[o][d].resolve=p.resolve}}}}return n}Tg.getResolversFromSchema=gae});var t$=V(yg=>{"use strict";m();T();h();Object.defineProperty(yg,"__esModule",{value:!0});yg.forEachField=void 0;var e$=(we(),Me(je));function Iae(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,e$.getNamedType)(i).name.startsWith("__")&&(0,e$.isObjectType)(i)){let s=i.getFields();for(let o in s){let u=s[o];t(u,r,o)}}}}yg.forEachField=Iae});var n$=V(Ng=>{"use strict";m();T();h();Object.defineProperty(Ng,"__esModule",{value:!0});Ng.forEachDefaultValue=void 0;var VA=(we(),Me(je));function vae(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,VA.getNamedType)(i).name.startsWith("__")){if((0,VA.isObjectType)(i)){let s=i.getFields();for(let o in s){let u=s[o];for(let l of u.args)l.defaultValue=t(l.type,l.defaultValue)}}else if((0,VA.isInputObjectType)(i)){let s=i.getFields();for(let o in s){let u=s[o];u.defaultValue=t(u.type,u.defaultValue)}}}}}Ng.forEachDefaultValue=vae});var qA=V(Eg=>{"use strict";m();T();h();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.addTypes=void 0;var jA=(we(),Me(je)),$A=LA(),_ae=dg();function bae(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,jA.isNamedType)(u)?r[u.name]=u:(0,jA.isDirective)(u)&&(i[u.name]=u);let{typeMap:s,directives:o}=(0,_ae.rewireTypes)(r,Object.values(i));return new jA.GraphQLSchema(K(k({},n),{query:(0,$A.getObjectTypeFromTypeMap)(s,e.getQueryType()),mutation:(0,$A.getObjectTypeFromTypeMap)(s,e.getMutationType()),subscription:(0,$A.getObjectTypeFromTypeMap)(s,e.getSubscriptionType()),types:Object.values(s),directives:o}))}Eg.addTypes=bae});var i$=V(Ig=>{"use strict";m();T();h();Object.defineProperty(Ig,"__esModule",{value:!0});Ig.pruneSchema=void 0;var kr=(we(),Me(je)),Oae=yA(),Sae=Cl(),Dae=Rp(),Aae=Yh();function Rae(e,t={}){let{skipEmptyCompositeTypePruning:n,skipEmptyUnionPruning:r,skipPruning:i,skipUnimplementedInterfacesPruning:s,skipUnusedTypesPruning:o}=t,u=[],l=e;do{let d=Fae(l);if(i){let p=[];for(let y in l.getTypeMap()){if(y.startsWith("__"))continue;let N=l.getType(y);N&&i(N)&&p.push(y)}d=r$(p,l,d)}u=[],l=(0,Dae.mapSchema)(l,{[Sae.MapperKind.TYPE]:p=>!d.has(p.name)&&!(0,kr.isSpecifiedScalarType)(p)?((0,kr.isUnionType)(p)||(0,kr.isInputObjectType)(p)||(0,kr.isInterfaceType)(p)||(0,kr.isObjectType)(p)||(0,kr.isScalarType)(p))&&(o||(0,kr.isUnionType)(p)&&r&&!Object.keys(p.getTypes()).length||((0,kr.isInputObjectType)(p)||(0,kr.isInterfaceType)(p)||(0,kr.isObjectType)(p))&&n&&!Object.keys(p.getFields()).length||(0,kr.isInterfaceType)(p)&&s)?p:(u.push(p.name),d.delete(p.name),null):p})}while(u.length);return l}Ig.pruneSchema=Rae;function Fae(e){let t=[];for(let n of(0,Aae.getRootTypes)(e))t.push(n.name);return r$(t,e)}function r$(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 s=t.getType(i);if(s){if((0,kr.isUnionType)(s)&&e.push(...s.getTypes().map(o=>o.name)),(0,kr.isInterfaceType)(s)&&r[i]===!0&&(e.push(...(0,Oae.getImplementingTypes)(s.name,t)),r[i]=!1),(0,kr.isEnumType)(s)&&e.push(...s.getValues().flatMap(o=>o.astNode?gg(t,o.astNode):[])),"getInterfaces"in s&&e.push(...s.getInterfaces().map(o=>o.name)),"getFields"in s){let o=s.getFields(),u=Object.entries(o);if(!u.length)continue;for(let[,l]of u){(0,kr.isObjectType)(s)&&e.push(...l.args.flatMap(p=>{let y=[(0,kr.getNamedType)(p.type).name];return p.astNode&&y.push(...gg(t,p.astNode)),y}));let d=(0,kr.getNamedType)(l.type);e.push(d.name),l.astNode&&e.push(...gg(t,l.astNode)),(0,kr.isInterfaceType)(d)&&!(d.name in r)&&(r[d.name]=!0)}}s.astNode&&e.push(...gg(t,s.astNode)),n.add(i)}}return n}function gg(e,t){var n;return((n=t.directives)!=null?n:[]).flatMap(r=>{var i,s;return(s=(i=e.getDirective(r.name.value))==null?void 0:i.args.map(o=>(0,kr.getNamedType)(o.type).name))!=null?s:[]})}});var o$=V(vg=>{"use strict";m();T();h();Object.defineProperty(vg,"__esModule",{value:!0});vg.mergeDeep=void 0;var wae=qh();function s$(e,t=!1,n=!1){let r=e[0]||{},i={};t&&Object.setPrototypeOf(i,Object.create(Object.getPrototypeOf(r)));for(let s of e)if(KA(r)&&KA(s)){if(t){let o=Object.getPrototypeOf(i),u=Object.getPrototypeOf(s);if(u)for(let l of Object.getOwnPropertyNames(u)){let d=Object.getOwnPropertyDescriptor(u,l);(0,wae.isSome)(d)&&Object.defineProperty(o,l,d)}}for(let o in s)KA(s[o])?o in i?i[o]=s$([i[o],s[o]],t,n):Object.assign(i,{[o]:s[o]}):n&&Array.isArray(i[o])?Array.isArray(s[o])?i[o].push(...s[o]):i[o].push(s[o]):Object.assign(i,{[o]:s[o]})}else if(n&&Array.isArray(r))Array.isArray(s)?r.push(...s):r.push(s);else if(n&&Array.isArray(s))return[r,...s];return i}vg.mergeDeep=s$;function KA(e){return e&&typeof e=="object"&&!Array.isArray(e)}});var a$=V(_g=>{"use strict";m();T();h();Object.defineProperty(_g,"__esModule",{value:!0});_g.parseSelectionSet=void 0;var Lae=(we(),Me(je));function Pae(e,t){return(0,Lae.parse)(e,t).definitions[0].selectionSet}_g.parseSelectionSet=Pae});var u$=V(bg=>{"use strict";m();T();h();Object.defineProperty(bg,"__esModule",{value:!0});bg.getResponseKeyFromInfo=void 0;function kae(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}bg.getResponseKeyFromInfo=kae});var c$=V(sa=>{"use strict";m();T();h();Object.defineProperty(sa,"__esModule",{value:!0});sa.modifyObjectFields=sa.selectObjectFields=sa.removeObjectFields=sa.appendObjectFields=void 0;var Og=(we(),Me(je)),xae=qA(),Sg=Cl(),Ml=Rp();function Cae(e,t,n){return e.getType(t)==null?(0,xae.addTypes)(e,[new Og.GraphQLObjectType({name:t,fields:n})]):(0,Ml.mapSchema)(e,{[Sg.MapperKind.OBJECT_TYPE]:r=>{if(r.name===t){let i=r.toConfig(),s=i.fields,o={};for(let u in s)o[u]=s[u];for(let u in n)o[u]=n[u];return(0,Ml.correctASTNodes)(new Og.GraphQLObjectType(K(k({},i),{fields:o})))}}})}sa.appendObjectFields=Cae;function Uae(e,t,n){let r={};return[(0,Ml.mapSchema)(e,{[Sg.MapperKind.OBJECT_TYPE]:s=>{if(s.name===t){let o=s.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,Ml.correctASTNodes)(new Og.GraphQLObjectType(K(k({},o),{fields:l})))}}}),r]}sa.removeObjectFields=Uae;function Mae(e,t,n){let r={};return(0,Ml.mapSchema)(e,{[Sg.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}sa.selectObjectFields=Mae;function Bae(e,t,n,r){let i={};return[(0,Ml.mapSchema)(e,{[Sg.MapperKind.OBJECT_TYPE]:o=>{if(o.name===t){let u=o.toConfig(),l=u.fields,d={};for(let p in l){let y=l[p];n(p,y)?i[p]=y:d[p]=y}for(let p in r){let y=r[p];d[p]=y}return(0,Ml.correctASTNodes)(new Og.GraphQLObjectType(K(k({},u),{fields:d})))}}}),i]}sa.modifyObjectFields=Bae});var l$=V(Dg=>{"use strict";m();T();h();Object.defineProperty(Dg,"__esModule",{value:!0});Dg.renameType=void 0;var Gs=(we(),Me(je));function Vae(e,t){if((0,Gs.isObjectType)(e))return new Gs.GraphQLObjectType(K(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:K(k({},e.astNode),{name:K(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>K(k({},n),{name:K(k({},n.name),{value:t})}))}));if((0,Gs.isInterfaceType)(e))return new Gs.GraphQLInterfaceType(K(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:K(k({},e.astNode),{name:K(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>K(k({},n),{name:K(k({},n.name),{value:t})}))}));if((0,Gs.isUnionType)(e))return new Gs.GraphQLUnionType(K(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:K(k({},e.astNode),{name:K(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>K(k({},n),{name:K(k({},n.name),{value:t})}))}));if((0,Gs.isInputObjectType)(e))return new Gs.GraphQLInputObjectType(K(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:K(k({},e.astNode),{name:K(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>K(k({},n),{name:K(k({},n.name),{value:t})}))}));if((0,Gs.isEnumType)(e))return new Gs.GraphQLEnumType(K(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:K(k({},e.astNode),{name:K(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>K(k({},n),{name:K(k({},n.name),{value:t})}))}));if((0,Gs.isScalarType)(e))return new Gs.GraphQLScalarType(K(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:K(k({},e.astNode),{name:K(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>K(k({},n),{name:K(k({},n.name),{value:t})}))}));throw new Error(`Unknown type ${e}.`)}Dg.renameType=Vae});var f$=V(Ag=>{"use strict";m();T();h();Object.defineProperty(Ag,"__esModule",{value:!0});Ag.mapAsyncIterator=void 0;var jae=Gh();function $ae(e,t,n,r){let i,s,o;r&&(o=d=>{let p=r();return(0,jae.isPromise)(p)?p.then(()=>d):d}),typeof e.return=="function"&&(i=e.return,s=d=>{let p=()=>Promise.reject(d);return i.call(e).then(p,p)});function u(d){return d.done?o?o(d):d:d$(d.value,t).then(p$,s)}let l;if(n){let d=n;l=p=>d$(p,d).then(p$,s)}return{next(){return e.next().then(u,l)},return(){let d=i?i.call(e).then(u,l):Promise.resolve({value:void 0,done:!0});return o?d.then(o):d},throw(d){return typeof e.throw=="function"?e.throw(d).then(u,l):Promise.reject(d).catch(s)},[Symbol.asyncIterator](){return this}}}Ag.mapAsyncIterator=$ae;function d$(e,t){return new Promise(n=>n(t(e)))}function p$(e){return{value:e,done:!1}}});var m$=V(wp=>{"use strict";m();T();h();Object.defineProperty(wp,"__esModule",{value:!0});wp.createVariableNameGenerator=wp.updateArgument=void 0;var Bl=(we(),Me(je)),qae=EA();function Kae(e,t,n,r,i,s,o){if(e[r]={kind:Bl.Kind.ARGUMENT,name:{kind:Bl.Kind.NAME,value:r},value:{kind:Bl.Kind.VARIABLE,name:{kind:Bl.Kind.NAME,value:i}}},t[i]={kind:Bl.Kind.VARIABLE_DEFINITION,variable:{kind:Bl.Kind.VARIABLE,name:{kind:Bl.Kind.NAME,value:i}},type:(0,qae.astFromType)(s)},o!==void 0){n[i]=o;return}i in n&&delete n[i]}wp.updateArgument=Kae;function Gae(e){let t=0;return n=>{let r;do r=`_v${(t++).toString()}_${n}`;while(r in e);return r}}wp.createVariableNameGenerator=Gae});var h$=V(Rg=>{"use strict";m();T();h();Object.defineProperty(Rg,"__esModule",{value:!0});Rg.implementsAbstractType=void 0;var GA=(we(),Me(je));function Qae(e,t,n){return n==null||t==null?!1:t===n?!0:(0,GA.isCompositeType)(t)&&(0,GA.isCompositeType)(n)?(0,GA.doTypesOverlap)(e,t,n):!1}Rg.implementsAbstractType=Qae});var T$=V(Fg=>{"use strict";m();T();h();Object.defineProperty(Fg,"__esModule",{value:!0});Fg.observableToAsyncIterable=void 0;function Yae(e){let t=[],n=[],r=!0,i=p=>{t.length!==0?t.shift()({value:p,done:!1}):n.push({value:p,done:!1})},s=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 y=n.shift();p(y)}else t.push(p)}),l=e.subscribe({next(p){i(p)},error(p){s(p)},complete(){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(),Promise.resolve({value:void 0,done:!0})},throw(p){return d(),Promise.reject(p)},[Symbol.asyncIterator](){return this}}}Fg.observableToAsyncIterable=Yae});var y$=V(wg=>{"use strict";m();T();h();Object.defineProperty(wg,"__esModule",{value:!0});wg.AccumulatorMap=void 0;var QA=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)}};wg.AccumulatorMap=QA});var YA=V(Lp=>{"use strict";m();T();h();Object.defineProperty(Lp,"__esModule",{value:!0});Lp.GraphQLStreamDirective=Lp.GraphQLDeferDirective=void 0;var Qs=(we(),Me(je));Lp.GraphQLDeferDirective=new Qs.GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Qs.DirectiveLocation.FRAGMENT_SPREAD,Qs.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Qs.GraphQLNonNull(Qs.GraphQLBoolean),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Qs.GraphQLString,description:"Unique name"}}});Lp.GraphQLStreamDirective=new Qs.GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Qs.DirectiveLocation.FIELD],args:{if:{type:new Qs.GraphQLNonNull(Qs.GraphQLBoolean),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Qs.GraphQLString,description:"Unique name"},initialCount:{defaultValue:0,type:Qs.GraphQLInt,description:"Number of items to return immediately"}}})});var HA=V(Ki=>{"use strict";m();T();h();Object.defineProperty(Ki,"__esModule",{value:!0});Ki.collectSubFields=Ki.getDeferValues=Ki.getFieldEntryKey=Ki.doesFragmentConditionMatch=Ki.shouldIncludeNode=Ki.collectFields=void 0;var oa=(we(),Me(je)),Pg=y$(),Jae=YA(),zae=_p();function Pp(e,t,n,r,i,s,o,u){for(let l of i.selections)switch(l.kind){case oa.Kind.FIELD:{if(!Lg(n,l))continue;s.add(N$(l),l);break}case oa.Kind.INLINE_FRAGMENT:{if(!Lg(n,l)||!JA(e,l,r))continue;let d=zA(n,l);if(d){let p=new Pg.AccumulatorMap;Pp(e,t,n,r,l.selectionSet,p,o,u),o.push({label:d.label,fields:p})}else Pp(e,t,n,r,l.selectionSet,s,o,u);break}case oa.Kind.FRAGMENT_SPREAD:{let d=l.name.value;if(!Lg(n,l))continue;let p=zA(n,l);if(u.has(d)&&!p)continue;let y=t[d];if(!y||!JA(e,y,r))continue;if(p||u.add(d),p){let N=new Pg.AccumulatorMap;Pp(e,t,n,r,y.selectionSet,N,o,u),o.push({label:p.label,fields:N})}else Pp(e,t,n,r,y.selectionSet,s,o,u);break}}}function Hae(e,t,n,r,i){let s=new Pg.AccumulatorMap,o=[];return Pp(e,t,n,r,i,s,o,new Set),{fields:s,patches:o}}Ki.collectFields=Hae;function Lg(e,t){let n=(0,oa.getDirectiveValues)(oa.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,oa.getDirectiveValues)(oa.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}Ki.shouldIncludeNode=Lg;function JA(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,oa.typeFromAST)(e,r);return i===n?!0:(0,oa.isAbstractType)(i)?e.getPossibleTypes(i).includes(n):!1}Ki.doesFragmentConditionMatch=JA;function N$(e){return e.alias?e.alias.value:e.name.value}Ki.getFieldEntryKey=N$;function zA(e,t){let n=(0,oa.getDirectiveValues)(Jae.GraphQLDeferDirective,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}Ki.getDeferValues=zA;Ki.collectSubFields=(0,zae.memoize5)(function(t,n,r,i,s){let o=new Pg.AccumulatorMap,u=new Set,l=[],d={fields:o,patches:l};for(let p of s)p.selectionSet&&Pp(t,n,r,i,p.selectionSet,o,l,u);return d})});var WA=V(kp=>{"use strict";m();T();h();Object.defineProperty(kp,"__esModule",{value:!0});kp.getOperationASTFromRequest=kp.getOperationASTFromDocument=void 0;var Wae=(we(),Me(je)),Xae=_p();function E$(e,t){let n=(0,Wae.getOperationAST)(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}kp.getOperationASTFromDocument=E$;kp.getOperationASTFromRequest=(0,Xae.memoize1)(function(t){return E$(t.document,t.operationName)})});var v$=V(Sc=>{"use strict";m();T();h();Object.defineProperty(Sc,"__esModule",{value:!0});Sc.visitResult=Sc.visitErrors=Sc.visitData=void 0;var Oc=(we(),Me(je)),XA=HA(),Zae=WA();function ZA(e,t,n){if(Array.isArray(e))return e.map(r=>ZA(r,t,n));if(typeof e=="object"){let r=t!=null?t(e):e;if(r!=null)for(let i in r){let s=r[i];Object.defineProperty(r,i,{value:ZA(s,t,n)})}return n!=null?n(r):r}return e}Sc.visitData=ZA;function eue(e,t){return e.map(n=>t(n))}Sc.visitErrors=eue;function tue(e,t,n,r,i){let s=t.document.definitions.reduce((N,I)=>(I.kind===Oc.Kind.FRAGMENT_DEFINITION&&(N[I.name.value]=I),N),{}),o=t.variables||{},u={segmentInfoMap:new Map,unpathedErrors:new Set},l=e.data,d=e.errors,p=d!=null&&i!=null,y=(0,Zae.getOperationASTFromRequest)(t);return l!=null&&y!=null&&(e.data=iue(l,y,n,s,o,r,p?d:void 0,u)),d!=null&&i&&(e.errors=nue(d,i,u)),e}Sc.visitResult=tue;function nue(e,t,n){let r=n.segmentInfoMap,i=n.unpathedErrors,s=t.__unpathed;return e.map(o=>{let u=r.get(o),l=u==null?o:u.reduceRight((d,p)=>{let y=p.type.name,N=t[y];if(N==null)return d;let I=N[p.fieldName];return I==null?d:I(d,p.pathIndex)},o);return s&&i.has(o)?s(l):l})}function rue(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":return e.getMutationType();case"subscription":return e.getSubscriptionType()}}function iue(e,t,n,r,i,s,o,u){let l=rue(n,t),{fields:d}=(0,XA.collectFields)(n,r,i,l,t.selectionSet);return eR(e,l,d,n,r,i,s,0,o,u)}function eR(e,t,n,r,i,s,o,u,l,d){var re;let p=t.getFields(),y=o==null?void 0:o[t.name],N=y==null?void 0:y.__enter,I=N!=null?N(e):e,b,x=null;if(l!=null){b=oue(l,u),x=b.errorMap;for(let se of b.unpathedErrors)d.unpathedErrors.add(se)}for(let[se,pe]of n){let ye=pe[0].name.value,Ce=(re=p[ye])==null?void 0:re.type;if(Ce==null)switch(ye){case"__typename":Ce=Oc.TypeNameMetaFieldDef.type;break;case"__schema":Ce=Oc.SchemaMetaFieldDef.type;break;case"__type":Ce=Oc.TypeMetaFieldDef.type;break}let ht=u+1,xt;x&&(xt=x[se],xt!=null&&delete x[se],aue(t,ye,ht,xt,d));let B=I$(e[se],Ce,pe,r,i,s,o,ht,xt,d);g$(I,se,B,y,ye)}let j=I.__typename;if(j!=null&&g$(I,"__typename",j,y,"__typename"),x)for(let se in x){let pe=x[se];for(let ye of pe)d.unpathedErrors.add(ye)}let Q=y==null?void 0:y.__leave;return Q!=null?Q(I):I}function g$(e,t,n,r,i){if(r==null){e[t]=n;return}let s=r[i];if(s==null){e[t]=n;return}let o=s(n);if(o===void 0){delete e[t];return}e[t]=o}function sue(e,t,n,r,i,s,o,u,l,d){return e.map(p=>I$(p,t,n,r,i,s,o,u+1,l,d))}function I$(e,t,n,r,i,s,o,u,l=[],d){if(e==null)return e;let p=(0,Oc.getNullableType)(t);if((0,Oc.isListType)(p))return sue(e,p.ofType,n,r,i,s,o,u,l,d);if((0,Oc.isAbstractType)(p)){let I=r.getType(e.__typename),{fields:b}=(0,XA.collectSubFields)(r,i,s,I,n);return eR(e,I,b,r,i,s,o,u,l,d)}else if((0,Oc.isObjectType)(p)){let{fields:I}=(0,XA.collectSubFields)(r,i,s,p,n);return eR(e,p,I,r,i,s,o,u,l,d)}let y=o==null?void 0:o[p.name];if(y==null)return e;let N=y(e);return N===void 0?e:N}function oue(e,t){var i;let n=Object.create(null),r=new Set;for(let s of e){let o=(i=s.path)==null?void 0:i[t];if(o==null){r.add(s);continue}o in n?n[o].push(s):n[o]=[s]}return{errorMap:n,unpathedErrors:r}}function aue(e,t,n,r=[],i){for(let s of r){let o={type:e,fieldName:t,pathIndex:n},u=i.segmentInfoMap.get(s);u==null?i.segmentInfoMap.set(s,[o]):u.push(o)}}});var _$=V(kg=>{"use strict";m();T();h();Object.defineProperty(kg,"__esModule",{value:!0});kg.valueMatchesCriteria=void 0;function tR(e,t){return e==null?e===t:Array.isArray(e)?Array.isArray(t)&&e.every((n,r)=>tR(n,t[r])):typeof e=="object"?typeof t=="object"&&t&&Object.keys(t).every(n=>tR(e[n],t[n])):t instanceof RegExp?t.test(e):e===t}kg.valueMatchesCriteria=tR});var b$=V(xg=>{"use strict";m();T();h();Object.defineProperty(xg,"__esModule",{value:!0});xg.isAsyncIterable=void 0;function uue(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}xg.isAsyncIterable=uue});var O$=V(Cg=>{"use strict";m();T();h();Object.defineProperty(Cg,"__esModule",{value:!0});Cg.isDocumentNode=void 0;var cue=(we(),Me(je));function lue(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===cue.Kind.DOCUMENT}Cg.isDocumentNode=lue});var S$=V(()=>{"use strict";m();T();h()});var F$=V(Dc=>{"use strict";m();T();h();Object.defineProperty(Dc,"__esModule",{value:!0});Dc.withCancel=Dc.getAsyncIterableWithCancel=Dc.getAsyncIteratorWithCancel=void 0;var due=_p();function pue(e){return yr(this,null,function*(){return{value:e,done:!0}})}var D$=(0,due.memoize2)(function(t,n){return function(...i){return Reflect.apply(n,t,i)}});function A$(e,t){return new Proxy(e,{has(n,r){return r==="return"?!0:Reflect.has(n,r)},get(n,r,i){let s=Reflect.get(n,r,i);if(r==="return"){let o=s||pue;return function(l){return yr(this,null,function*(){let d=yield t(l);return Reflect.apply(o,n,[d])})}}else if(typeof s=="function")return D$(n,s);return s}})}Dc.getAsyncIteratorWithCancel=A$;function R$(e,t){return new Proxy(e,{get(n,r,i){let s=Reflect.get(n,r,i);return Symbol.asyncIterator===r?function(){let u=Reflect.apply(s,n,[]);return A$(u,t)}:typeof s=="function"?D$(n,s):s}})}Dc.getAsyncIterableWithCancel=R$;Dc.withCancel=R$});var w$=V(Ug=>{"use strict";m();T();h();Object.defineProperty(Ug,"__esModule",{value:!0});Ug.fixSchemaAst=void 0;var fue=(we(),Me(je)),mue=SA();function hue(e,t){let n=(0,mue.getDocumentNodeFromSchema)(e);return(0,fue.buildASTSchema)(n,k({},t||{}))}function Tue(e,t){let n;return(!e.astNode||!e.extensionASTNodes)&&(n=hue(e,t)),!e.astNode&&(n!=null&&n.astNode)&&(e.astNode=n.astNode),!e.extensionASTNodes&&(n!=null&&n.astNode)&&(e.extensionASTNodes=n.extensionASTNodes),e}Ug.fixSchemaAst=Tue});var L$=V(Mg=>{"use strict";m();T();h();Object.defineProperty(Mg,"__esModule",{value:!0});Mg.extractExtensionsFromSchema=void 0;var Qa=Cl(),yue=Rp();function vo(e={}){let t=k({},e),n=t.directives;if(n!=null)for(let r in n){let i=n[r];Array.isArray(i)||(n[r]=[i])}return t}function Nue(e){let t={schemaExtensions:vo(e.extensions),types:{}};return(0,yue.mapSchema)(e,{[Qa.MapperKind.OBJECT_TYPE]:n=>(t.types[n.name]={fields:{},type:"object",extensions:vo(n.extensions)},n),[Qa.MapperKind.INTERFACE_TYPE]:n=>(t.types[n.name]={fields:{},type:"interface",extensions:vo(n.extensions)},n),[Qa.MapperKind.FIELD]:(n,r,i)=>{t.types[i].fields[r]={arguments:{},extensions:vo(n.extensions)};let s=n.args;if(s!=null)for(let o in s)t.types[i].fields[r].arguments[o]=vo(s[o].extensions);return n},[Qa.MapperKind.ENUM_TYPE]:n=>(t.types[n.name]={values:{},type:"enum",extensions:vo(n.extensions)},n),[Qa.MapperKind.ENUM_VALUE]:(n,r,i,s)=>(t.types[r].values[s]=vo(n.extensions),n),[Qa.MapperKind.SCALAR_TYPE]:n=>(t.types[n.name]={type:"scalar",extensions:vo(n.extensions)},n),[Qa.MapperKind.UNION_TYPE]:n=>(t.types[n.name]={type:"union",extensions:vo(n.extensions)},n),[Qa.MapperKind.INPUT_OBJECT_TYPE]:n=>(t.types[n.name]={fields:{},type:"input",extensions:vo(n.extensions)},n),[Qa.MapperKind.INPUT_OBJECT_FIELD]:(n,r,i)=>(t.types[i].fields[r]={extensions:vo(n.extensions)},n)}),t}Mg.extractExtensionsFromSchema=Nue});var P$=V(Ac=>{"use strict";m();T();h();Object.defineProperty(Ac,"__esModule",{value:!0});Ac.printPathArray=Ac.pathToArray=Ac.addPath=void 0;function Eue(e,t,n){return{prev:e,key:t,typename:n}}Ac.addPath=Eue;function gue(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}Ac.pathToArray=gue;function Iue(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}Ac.printPathArray=Iue});var k$=V(nR=>{"use strict";m();T();h();function Bg(e,t,n){if(typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t))for(n=0;n{"use strict";m();T();h();Object.defineProperty(Vg,"__esModule",{value:!0});Vg.mergeIncrementalResult=void 0;var rR=k$();function x$({incrementalResult:e,executionResult:t}){var r;let n=["data",...(r=e.path)!=null?r:[]];if(e.items)for(let i of e.items)(0,rR.dset)(t,n,i),n[n.length-1]++;e.data&&(0,rR.dset)(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&(0,rR.dset)(t,"extensions",e.extensions),e.incremental&&e.incremental.forEach(i=>{x$({incrementalResult:i,executionResult:t})})}Vg.mergeIncrementalResult=x$});var M$=V(xp=>{"use strict";m();T();h();Object.defineProperty(xp,"__esModule",{value:!0});xp.debugTimerEnd=xp.debugTimerStart=void 0;var U$=new Set;function _ue(e){let t=(globalThis==null?void 0:globalThis.process.env.DEBUG)||globalThis.DEBUG;(t==="1"||t!=null&&t.includes(e))&&(U$.add(e),console.time(e))}xp.debugTimerStart=_ue;function bue(e){U$.has(e)&&console.timeEnd(e)}xp.debugTimerEnd=bue});var _o=V(Ze=>{"use strict";m();T();h();Object.defineProperty(Ze,"__esModule",{value:!0});Ze.inspect=void 0;var tt=(Gj(),Me(Kj));tt.__exportStar(Qj(),Ze);tt.__exportStar(qh(),Ze);tt.__exportStar(mA(),Ze);tt.__exportStar(hA(),Ze);tt.__exportStar(n1(),Ze);tt.__exportStar(yA(),Ze);tt.__exportStar(SA(),Ze);tt.__exportStar(hA(),Ze);tt.__exportStar(E1(),Ze);tt.__exportStar(g1(),Ze);tt.__exportStar(P1(),Ze);tt.__exportStar(j1(),Ze);tt.__exportStar(q1(),Ze);tt.__exportStar(H1(),Ze);tt.__exportStar(X1(),Ze);tt.__exportStar(Z1(),Ze);tt.__exportStar(t$(),Ze);tt.__exportStar(n$(),Ze);tt.__exportStar(Rp(),Ze);tt.__exportStar(qA(),Ze);tt.__exportStar(dg(),Ze);tt.__exportStar(i$(),Ze);tt.__exportStar(o$(),Ze);tt.__exportStar(Cl(),Ze);tt.__exportStar(xA(),Ze);tt.__exportStar(a$(),Ze);tt.__exportStar(u$(),Ze);tt.__exportStar(c$(),Ze);tt.__exportStar(l$(),Ze);tt.__exportStar(CA(),Ze);tt.__exportStar(f$(),Ze);tt.__exportStar(m$(),Ze);tt.__exportStar(h$(),Ze);tt.__exportStar(QE(),Ze);tt.__exportStar(T$(),Ze);tt.__exportStar(v$(),Ze);tt.__exportStar(fA(),Ze);tt.__exportStar(_$(),Ze);tt.__exportStar(b$(),Ze);tt.__exportStar(O$(),Ze);tt.__exportStar(eg(),Ze);tt.__exportStar(S$(),Ze);tt.__exportStar(F$(),Ze);tt.__exportStar(Yh(),Ze);tt.__exportStar(AA(),Ze);tt.__exportStar(HA(),Ze);var Oue=Kh();Object.defineProperty(Ze,"inspect",{enumerable:!0,get:function(){return Oue.inspect}});tt.__exportStar(_p(),Ze);tt.__exportStar(w$(),Ze);tt.__exportStar(WA(),Ze);tt.__exportStar(L$(),Ze);tt.__exportStar(P$(),Ze);tt.__exportStar(Gh(),Ze);tt.__exportStar(YA(),Ze);tt.__exportStar(C$(),Ze);tt.__exportStar(M$(),Ze)});var V$=V(jg=>{"use strict";m();T();h();Object.defineProperty(jg,"__esModule",{value:!0});jg.mergeResolvers=void 0;var Sue=_o();function B$(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=B$(i)),typeof i=="object"&&i&&n.push(i);let r=(0,Sue.mergeDeep)(n,!0);if(t!=null&&t.exclusions)for(let i of t.exclusions){let[s,o]=i.split(".");!o||o==="*"?delete r[s]:r[s]&&delete r[s][o]}return r}jg.mergeResolvers=B$});var iR=V($g=>{"use strict";m();T();h();Object.defineProperty($g,"__esModule",{value:!0});$g.mergeArguments=void 0;var j$=_o();function Due(e,t,n){let r=Aue([...t,...e].filter(j$.isSome),n);return n&&n.sort&&r.sort(j$.compareNodes),r}$g.mergeArguments=Due;function Aue(e,t){return e.reduce((n,r)=>{let i=n.findIndex(s=>s.name.value===r.name.value);return i===-1?n.concat([r]):(t!=null&&t.reverseArguments||(n[i]=r),n)},[])}});var Ys=V(Cp=>{"use strict";m();T();h();Object.defineProperty(Cp,"__esModule",{value:!0});Cp.mergeDirective=Cp.mergeDirectives=void 0;var $$=(we(),Me(je)),Rue=_o();function Fue(e,t){return!!e.find(n=>n.name.value===t.name.value)}function q$(e,t){var n;return!!((n=t==null?void 0:t[e.name.value])!=null&&n.repeatable)}function wue(e,t){return t.some(({value:n})=>n===e.value)}function K$(e,t){let n=[...t];for(let r of e){let i=n.findIndex(s=>s.name.value===r.name.value);if(i>-1){let s=n[i];if(s.value.kind==="ListValue"){let o=s.value.values,u=r.value.values;s.value.values=Cue(o,u,(l,d)=>{let p=l.value;return!p||!d.some(y=>y.value===p)})}else s.value=r.value}else n.push(r)}return n}function Lue(e,t){return e.map((n,r,i)=>{let s=i.findIndex(o=>o.name.value===n.name.value);if(s!==r&&!q$(n,t)){let o=i[s];return n.arguments=K$(n.arguments,o.arguments),null}return n}).filter(Rue.isSome)}function Pue(e=[],t=[],n,r){let i=n&&n.reverseDirectives,s=i?e:t,o=i?t:e,u=Lue([...s],r);for(let l of o)if(Fue(u,l)&&!q$(l,r)){let d=u.findIndex(y=>y.name.value===l.name.value),p=u[d];u[d].arguments=K$(l.arguments||[],p.arguments||[])}else u.push(l);return u}Cp.mergeDirectives=Pue;function kue(e,t){let n=(0,$$.print)(K(k({},e),{description:void 0})),r=(0,$$.print)(K(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(k({},i),{description:{kind:Ks.Kind.STRING,value:o,block:u}})}}}})}bc.transformCommentsToDescriptions=w1;function L1(e){return(0,Ks.isTypeSystemDefinitionNode)(e)||e.kind===Ks.Kind.FIELD_DEFINITION||e.kind===Ks.Kind.INPUT_VALUE_DEFINITION||e.kind===Ks.Kind.ENUM_VALUE_DEFINITION}bc.isDescribable=L1});var j1=V(og=>{"use strict";m();T();h();Object.defineProperty(og,"__esModule",{value:!0});og.buildOperationNodeForField=void 0;var Ot=(we(),Me(je)),U1=Yh(),wA=[],sg=new Map;function M1(e){wA.push(e)}function k1(){wA=[]}function x1(){sg=new Map}function zoe({schema:e,kind:t,field:n,models:r,ignore:i=[],depthLimit:s,circularReferenceDepth:o,argNames:u,selectedFields:l=!0}){k1(),x1();let d=(0,U1.getRootTypeNames)(e),p=Hoe({schema:e,fieldName:n,kind:t,models:r||[],ignore:i,depthLimit:s||1/0,circularReferenceDepth:o||1,argNames:u,selectedFields:l,rootTypeNames:d});return p.variableDefinitions=[...wA],k1(),x1(),p}og.buildOperationNodeForField=zoe;function Hoe({schema:e,fieldName:t,kind:n,models:r,ignore:i,depthLimit:s,circularReferenceDepth:o,argNames:u,selectedFields:l,rootTypeNames:d}){let p=(0,U1.getDefinedRootType)(e,n),y=p.getFields()[t],N=`${t}_${n}`;if(y.args)for(let I of y.args){let _=I.name;(!u||u.includes(_))&&M1(B1(I,_))}return{kind:Ot.Kind.OPERATION_DEFINITION,operation:n,name:{kind:Ot.Kind.NAME,value:N},variableDefinitions:[],selectionSet:{kind:Ot.Kind.SELECTION_SET,selections:[V1({type:p,field:y,models:r,firstCall:!0,path:[],ancestors:[],ignore:i,depthLimit:s,circularReferenceDepth:o,schema:e,depth:0,argNames:u,selectedFields:l,rootTypeNames:d})]}}}function FA({parent:e,type:t,models:n,firstCall:r,path:i,ancestors:s,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:y,selectedFields:N,rootTypeNames:I}){if(!(typeof N=="boolean"&&p>u)){if((0,Ot.isUnionType)(t)){let _=t.getTypes();return{kind:Ot.Kind.SELECTION_SET,selections:_.filter(C=>!RA([...s,C],{depth:l})).map(C=>({kind:Ot.Kind.INLINE_FRAGMENT,typeCondition:{kind:Ot.Kind.NAMED_TYPE,name:{kind:Ot.Kind.NAME,value:C.name}},selectionSet:FA({parent:t,type:C,models:n,path:i,ancestors:s,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:y,selectedFields:N,rootTypeNames:I})})).filter(C=>{var j,Q;return((Q=(j=C==null?void 0:C.selectionSet)==null?void 0:j.selections)==null?void 0:Q.length)>0})}}if((0,Ot.isInterfaceType)(t)){let _=Object.values(d.getTypeMap()).filter(C=>(0,Ot.isObjectType)(C)&&C.getInterfaces().includes(t));return{kind:Ot.Kind.SELECTION_SET,selections:_.filter(C=>!RA([...s,C],{depth:l})).map(C=>({kind:Ot.Kind.INLINE_FRAGMENT,typeCondition:{kind:Ot.Kind.NAMED_TYPE,name:{kind:Ot.Kind.NAME,value:C.name}},selectionSet:FA({parent:t,type:C,models:n,path:i,ancestors:s,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:y,selectedFields:N,rootTypeNames:I})})).filter(C=>{var j,Q;return((Q=(j=C==null?void 0:C.selectionSet)==null?void 0:j.selections)==null?void 0:Q.length)>0})}}if((0,Ot.isObjectType)(t)&&!I.has(t.name)){let _=o.includes(t.name)||o.includes(`${e.name}.${i[i.length-1]}`),C=n.includes(t.name);if(!r&&C&&!_)return{kind:Ot.Kind.SELECTION_SET,selections:[{kind:Ot.Kind.FIELD,name:{kind:Ot.Kind.NAME,value:"id"}}]};let j=t.getFields();return{kind:Ot.Kind.SELECTION_SET,selections:Object.keys(j).filter(Q=>!RA([...s,(0,Ot.getNamedType)(j[Q].type)],{depth:l})).map(Q=>{let re=typeof N=="object"?N[Q]:!0;return re?V1({type:t,field:j[Q],models:n,path:[...i,Q],ancestors:s,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:y,selectedFields:re,rootTypeNames:I}):null}).filter(Q=>{var re,se;return Q==null?!1:"selectionSet"in Q?!!((se=(re=Q.selectionSet)==null?void 0:re.selections)!=null&&se.length):!0})}}}}function B1(e,t){function n(r){return(0,Ot.isListType)(r)?{kind:Ot.Kind.LIST_TYPE,type:n(r.ofType)}:(0,Ot.isNonNullType)(r)?{kind:Ot.Kind.NON_NULL_TYPE,type:n(r.ofType)}:{kind:Ot.Kind.NAMED_TYPE,name:{kind:Ot.Kind.NAME,value:r.name}}}return{kind:Ot.Kind.VARIABLE_DEFINITION,variable:{kind:Ot.Kind.VARIABLE,name:{kind:Ot.Kind.NAME,value:t||e.name}},type:n(e.type)}}function C1(e,t){return[...t,e].join("_")}function V1({type:e,field:t,models:n,firstCall:r,path:i,ancestors:s,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:y,selectedFields:N,rootTypeNames:I}){let _=(0,Ot.getNamedType)(t.type),C=[],j=!1;if(t.args&&t.args.length&&(C=t.args.map(pe=>{let ye=C1(pe.name,i);return y&&!y.includes(ye)?((0,Ot.isNonNullType)(pe.type)&&(j=!0),null):(r||M1(B1(pe,ye)),{kind:Ot.Kind.ARGUMENT,name:{kind:Ot.Kind.NAME,value:pe.name},value:{kind:Ot.Kind.VARIABLE,name:{kind:Ot.Kind.NAME,value:C1(pe.name,i)}}})}).filter(Boolean)),j)return null;let Q=[...i,t.name],re=Q.join("."),se=t.name;return sg.has(re)&&sg.get(re)!==t.type.toString()&&(se+=t.type.toString().replace("!","NonNull").replace("[","List").replace("]","")),sg.set(re,t.type.toString()),!(0,Ot.isScalarType)(_)&&!(0,Ot.isEnumType)(_)?K(k({kind:Ot.Kind.FIELD,name:{kind:Ot.Kind.NAME,value:t.name}},se!==t.name&&{alias:{kind:Ot.Kind.NAME,value:se}}),{selectionSet:FA({parent:e,type:_,models:n,firstCall:r,path:Q,ancestors:[...s,e],ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p+1,argNames:y,selectedFields:N,rootTypeNames:I})||void 0,arguments:C}):K(k({kind:Ot.Kind.FIELD,name:{kind:Ot.Kind.NAME,value:t.name}},se!==t.name&&{alias:{kind:Ot.Kind.NAME,value:se}}),{arguments:C})}function RA(e,t={depth:1}){let n=e[e.length-1];return(0,Ot.isScalarType)(n)?!1:e.filter(i=>i.name===n.name).length>t.depth}});var q1=V(ag=>{"use strict";m();T();h();Object.defineProperty(ag,"__esModule",{value:!0});ag.DirectiveLocation=void 0;var $1;(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"})($1||(ag.DirectiveLocation=$1={}))});var Cl=V(ug=>{"use strict";m();T();h();Object.defineProperty(ug,"__esModule",{value:!0});ug.MapperKind=void 0;var K1;(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"})(K1||(ug.MapperKind=K1={}))});var LA=V(cg=>{"use strict";m();T();h();Object.defineProperty(cg,"__esModule",{value:!0});cg.getObjectTypeFromTypeMap=void 0;var Woe=(we(),Me(je));function Xoe(e,t){if(t){let n=e[t.name];if((0,Woe.isObjectType)(n))return n}}cg.getObjectTypeFromTypeMap=Xoe});var xA=V(na=>{"use strict";m();T();h();Object.defineProperty(na,"__esModule",{value:!0});na.getBuiltInForStub=na.isNamedStub=na.createStub=na.createNamedStub=void 0;var Kr=(we(),Me(je));function PA(e,t){let n;return t==="object"?n=Kr.GraphQLObjectType:t==="interface"?n=Kr.GraphQLInterfaceType:n=Kr.GraphQLInputObjectType,new n({name:e,fields:{_fake:{type:Kr.GraphQLString}}})}na.createNamedStub=PA;function kA(e,t){switch(e.kind){case Kr.Kind.LIST_TYPE:return new Kr.GraphQLList(kA(e.type,t));case Kr.Kind.NON_NULL_TYPE:return new Kr.GraphQLNonNull(kA(e.type,t));default:return t==="output"?PA(e.name.value,"object"):PA(e.name.value,"input")}}na.createStub=kA;function Zoe(e){if("getFields"in e){let t=e.getFields();for(let n in t)return t[n].name==="_fake"}return!1}na.isNamedStub=Zoe;function eae(e){switch(e.name){case Kr.GraphQLInt.name:return Kr.GraphQLInt;case Kr.GraphQLFloat.name:return Kr.GraphQLFloat;case Kr.GraphQLString.name:return Kr.GraphQLString;case Kr.GraphQLBoolean.name:return Kr.GraphQLBoolean;case Kr.GraphQLID.name:return Kr.GraphQLID;default:return e}}na.getBuiltInForStub=eae});var dg=V(lg=>{"use strict";m();T();h();Object.defineProperty(lg,"__esModule",{value:!0});lg.rewireTypes=void 0;var Sr=(we(),Me(je)),G1=xA();function tae(e,t){let n=Object.create(null);for(let N in e)n[N]=e[N];let r=Object.create(null);for(let N in n){let I=n[N];if(I==null||N.startsWith("__"))continue;let _=I.name;if(!_.startsWith("__")){if(r[_]!=null){console.warn(`Duplicate schema type name ${_} found; keeping the existing one found in the schema`);continue}r[_]=I}}for(let N in r)r[N]=u(r[N]);let i=t.map(N=>s(N));return{typeMap:r,directives:i};function s(N){if((0,Sr.isSpecifiedDirective)(N))return N;let I=N.toConfig();return I.args=o(I.args),new Sr.GraphQLDirective(I)}function o(N){let I={};for(let _ in N){let C=N[_],j=y(C.type);j!=null&&(C.type=j,I[_]=C)}return I}function u(N){if((0,Sr.isObjectType)(N)){let I=N.toConfig(),_=K(k({},I),{fields:()=>l(I.fields),interfaces:()=>p(I.interfaces)});return new Sr.GraphQLObjectType(_)}else if((0,Sr.isInterfaceType)(N)){let I=N.toConfig(),_=K(k({},I),{fields:()=>l(I.fields)});return"interfaces"in _&&(_.interfaces=()=>p(I.interfaces)),new Sr.GraphQLInterfaceType(_)}else if((0,Sr.isUnionType)(N)){let I=N.toConfig(),_=K(k({},I),{types:()=>p(I.types)});return new Sr.GraphQLUnionType(_)}else if((0,Sr.isInputObjectType)(N)){let I=N.toConfig(),_=K(k({},I),{fields:()=>d(I.fields)});return new Sr.GraphQLInputObjectType(_)}else if((0,Sr.isEnumType)(N)){let I=N.toConfig();return new Sr.GraphQLEnumType(I)}else if((0,Sr.isScalarType)(N)){if((0,Sr.isSpecifiedScalarType)(N))return N;let I=N.toConfig();return new Sr.GraphQLScalarType(I)}throw new Error(`Unexpected schema type: ${N}`)}function l(N){let I={};for(let _ in N){let C=N[_],j=y(C.type);j!=null&&C.args&&(C.type=j,C.args=o(C.args),I[_]=C)}return I}function d(N){let I={};for(let _ in N){let C=N[_],j=y(C.type);j!=null&&(C.type=j,I[_]=C)}return I}function p(N){let I=[];for(let _ of N){let C=y(_);C!=null&&I.push(C)}return I}function y(N){if((0,Sr.isListType)(N)){let I=y(N.ofType);return I!=null?new Sr.GraphQLList(I):null}else if((0,Sr.isNonNullType)(N)){let I=y(N.ofType);return I!=null?new Sr.GraphQLNonNull(I):null}else if((0,Sr.isNamedType)(N)){let I=n[N.name];return I===void 0&&(I=(0,G1.isNamedStub)(N)?(0,G1.getBuiltInForStub)(N):u(N),r[I.name]=n[N.name]=I),I!=null?r[I.name]:null}return null}}lg.rewireTypes=tae});var CA=V(ra=>{"use strict";m();T();h();Object.defineProperty(ra,"__esModule",{value:!0});ra.parseInputValueLiteral=ra.parseInputValue=ra.serializeInputValue=ra.transformInputValue=void 0;var pg=(we(),Me(je)),nae=qh();function Sp(e,t,n=null,r=null){if(t==null)return t;let i=(0,pg.getNullableType)(e);if((0,pg.isLeafType)(i))return n!=null?n(i,t):t;if((0,pg.isListType)(i))return(0,nae.asArray)(t).map(s=>Sp(i.ofType,s,n,r));if((0,pg.isInputObjectType)(i)){let s=i.getFields(),o={};for(let u in t){let l=s[u];l!=null&&(o[u]=Sp(l.type,t[u],n,r))}return r!=null?r(i,o):o}}ra.transformInputValue=Sp;function rae(e,t){return Sp(e,t,(n,r)=>{try{return n.serialize(r)}catch(i){return r}})}ra.serializeInputValue=rae;function iae(e,t){return Sp(e,t,(n,r)=>{try{return n.parseValue(r)}catch(i){return r}})}ra.parseInputValue=iae;function sae(e,t){return Sp(e,t,(n,r)=>n.parseLiteral(r,{}))}ra.parseInputValueLiteral=sae});var Rp=V(Ap=>{"use strict";m();T();h();Object.defineProperty(Ap,"__esModule",{value:!0});Ap.correctASTNodes=Ap.mapSchema=void 0;var yt=(we(),Me(je)),Dp=LA(),zt=Cl(),oae=dg(),Q1=CA();function aae(e,t={}){let n=z1(J1(UA(Y1(uae(UA(Y1(e.getTypeMap(),e,Q1.serializeInputValue),e,t,u=>(0,yt.isLeafType)(u)),e,t),e,Q1.parseInputValue),e,t,u=>!(0,yt.isLeafType)(u)),e,t),e,t),r=e.getDirectives(),i=cae(r,e,t),{typeMap:s,directives:o}=(0,oae.rewireTypes)(n,i);return new yt.GraphQLSchema(K(k({},e.toConfig()),{query:(0,Dp.getObjectTypeFromTypeMap)(s,(0,Dp.getObjectTypeFromTypeMap)(n,e.getQueryType())),mutation:(0,Dp.getObjectTypeFromTypeMap)(s,(0,Dp.getObjectTypeFromTypeMap)(n,e.getMutationType())),subscription:(0,Dp.getObjectTypeFromTypeMap)(s,(0,Dp.getObjectTypeFromTypeMap)(n,e.getSubscriptionType())),types:Object.values(s),directives:o}))}Ap.mapSchema=aae;function UA(e,t,n,r=()=>!0){let i={};for(let s in e)if(!s.startsWith("__")){let o=e[s];if(o==null||!r(o)){i[s]=o;continue}let u=dae(t,n,s);if(u==null){i[s]=o;continue}let l=u(o,t);if(l===void 0){i[s]=o;continue}i[s]=l}return i}function uae(e,t,n){let r=Tae(n);return r?UA(e,t,{[zt.MapperKind.ENUM_TYPE]:i=>{let s=i.toConfig(),o=s.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[y,N]=p;u[y]=N===void 0?d:N}else p!==null&&(u[l]=p)}return Zh(new yt.GraphQLEnumType(K(k({},s),{values:u})))}},i=>(0,yt.isEnumType)(i)):e}function Y1(e,t,n){let r=z1(e,t,{[zt.MapperKind.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;let s=fg(e,i.type);if(s!=null)return K(k({},i),{defaultValue:n(s,i.defaultValue)})}});return J1(r,t,{[zt.MapperKind.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;let s=fg(r,i.type);if(s!=null)return K(k({},i),{defaultValue:n(s,i.defaultValue)})}})}function fg(e,t){if((0,yt.isListType)(t)){let n=fg(e,t.ofType);return n!=null?new yt.GraphQLList(n):null}else if((0,yt.isNonNullType)(t)){let n=fg(e,t.ofType);return n!=null?new yt.GraphQLNonNull(n):null}else if((0,yt.isNamedType)(t)){let n=e[t.name];return n!=null?n:null}return null}function J1(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let s=e[i];if(!(0,yt.isObjectType)(s)&&!(0,yt.isInterfaceType)(s)&&!(0,yt.isInputObjectType)(s)){r[i]=s;continue}let o=fae(t,n,i);if(o==null){r[i]=s;continue}let u=s.toConfig(),l=u.fields,d={};for(let p in l){let y=l[p],N=o(y,p,i,t);if(N===void 0)d[p]=y;else if(Array.isArray(N)){let[I,_]=N;_.astNode!=null&&(_.astNode=K(k({},_.astNode),{name:K(k({},_.astNode.name),{value:I})})),d[I]=_===void 0?y:_}else N!==null&&(d[p]=N)}(0,yt.isObjectType)(s)?r[i]=Zh(new yt.GraphQLObjectType(K(k({},u),{fields:d}))):(0,yt.isInterfaceType)(s)?r[i]=Zh(new yt.GraphQLInterfaceType(K(k({},u),{fields:d}))):r[i]=Zh(new yt.GraphQLInputObjectType(K(k({},u),{fields:d})))}return r}function z1(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let s=e[i];if(!(0,yt.isObjectType)(s)&&!(0,yt.isInterfaceType)(s)){r[i]=s;continue}let o=mae(n);if(o==null){r[i]=s;continue}let u=s.toConfig(),l=u.fields,d={};for(let p in l){let y=l[p],N=y.args;if(N==null){d[p]=y;continue}let I=Object.keys(N);if(!I.length){d[p]=y;continue}let _={};for(let C of I){let j=N[C],Q=o(j,p,i,t);if(Q===void 0)_[C]=j;else if(Array.isArray(Q)){let[re,se]=Q;_[re]=se}else Q!==null&&(_[C]=Q)}d[p]=K(k({},y),{args:_})}(0,yt.isObjectType)(s)?r[i]=new yt.GraphQLObjectType(K(k({},u),{fields:d})):(0,yt.isInterfaceType)(s)?r[i]=new yt.GraphQLInterfaceType(K(k({},u),{fields:d})):r[i]=new yt.GraphQLInputObjectType(K(k({},u),{fields:d}))}return r}function cae(e,t,n){let r=hae(n);if(r==null)return e.slice();let i=[];for(let s of e){let o=r(s,t);o===void 0?i.push(s):o!==null&&i.push(o)}return i}function lae(e,t){var i,s,o;let n=e.getType(t),r=[zt.MapperKind.TYPE];return(0,yt.isObjectType)(n)?(r.push(zt.MapperKind.COMPOSITE_TYPE,zt.MapperKind.OBJECT_TYPE),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(zt.MapperKind.ROOT_OBJECT,zt.MapperKind.QUERY):t===((s=e.getMutationType())==null?void 0:s.name)?r.push(zt.MapperKind.ROOT_OBJECT,zt.MapperKind.MUTATION):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(zt.MapperKind.ROOT_OBJECT,zt.MapperKind.SUBSCRIPTION)):(0,yt.isInputObjectType)(n)?r.push(zt.MapperKind.INPUT_OBJECT_TYPE):(0,yt.isInterfaceType)(n)?r.push(zt.MapperKind.COMPOSITE_TYPE,zt.MapperKind.ABSTRACT_TYPE,zt.MapperKind.INTERFACE_TYPE):(0,yt.isUnionType)(n)?r.push(zt.MapperKind.COMPOSITE_TYPE,zt.MapperKind.ABSTRACT_TYPE,zt.MapperKind.UNION_TYPE):(0,yt.isEnumType)(n)?r.push(zt.MapperKind.ENUM_TYPE):(0,yt.isScalarType)(n)&&r.push(zt.MapperKind.SCALAR_TYPE),r}function dae(e,t,n){let r=lae(e,n),i,s=[...r];for(;!i&&s.length>0;){let o=s.pop();i=t[o]}return i!=null?i:null}function pae(e,t){var i,s,o;let n=e.getType(t),r=[zt.MapperKind.FIELD];return(0,yt.isObjectType)(n)?(r.push(zt.MapperKind.COMPOSITE_FIELD,zt.MapperKind.OBJECT_FIELD),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(zt.MapperKind.ROOT_FIELD,zt.MapperKind.QUERY_ROOT_FIELD):t===((s=e.getMutationType())==null?void 0:s.name)?r.push(zt.MapperKind.ROOT_FIELD,zt.MapperKind.MUTATION_ROOT_FIELD):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(zt.MapperKind.ROOT_FIELD,zt.MapperKind.SUBSCRIPTION_ROOT_FIELD)):(0,yt.isInterfaceType)(n)?r.push(zt.MapperKind.COMPOSITE_FIELD,zt.MapperKind.INTERFACE_FIELD):(0,yt.isInputObjectType)(n)&&r.push(zt.MapperKind.INPUT_OBJECT_FIELD),r}function fae(e,t,n){let r=pae(e,n),i,s=[...r];for(;!i&&s.length>0;){let o=s.pop();i=t[o]}return i!=null?i:null}function mae(e){let t=e[zt.MapperKind.ARGUMENT];return t!=null?t:null}function hae(e){let t=e[zt.MapperKind.DIRECTIVE];return t!=null?t:null}function Tae(e){let t=e[zt.MapperKind.ENUM_VALUE];return t!=null?t:null}function Zh(e){if((0,yt.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(k({},t.astNode),{kind:yt.Kind.OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>K(k({},n),{kind:yt.Kind.OBJECT_TYPE_EXTENSION,fields:void 0}))),new yt.GraphQLObjectType(t)}else if((0,yt.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(k({},t.astNode),{kind:yt.Kind.INTERFACE_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>K(k({},n),{kind:yt.Kind.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new yt.GraphQLInterfaceType(t)}else if((0,yt.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(k({},t.astNode),{kind:yt.Kind.INPUT_OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>K(k({},n),{kind:yt.Kind.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new yt.GraphQLInputObjectType(t)}else if((0,yt.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(k({},t.astNode),{values:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>K(k({},n),{values:void 0}))),new yt.GraphQLEnumType(t)}else return e}Ap.correctASTNodes=Zh});var H1=V(hg=>{"use strict";m();T();h();Object.defineProperty(hg,"__esModule",{value:!0});hg.filterSchema=void 0;var mg=(we(),Me(je)),Ga=Cl(),yae=Rp();function Nae({schema:e,typeFilter:t=()=>!0,fieldFilter:n=void 0,rootFieldFilter:r=void 0,objectFieldFilter:i=void 0,interfaceFieldFilter:s=void 0,inputObjectFieldFilter:o=void 0,argumentFilter:u=void 0}){return(0,yae.mapSchema)(e,{[Ga.MapperKind.QUERY]:d=>MA(d,"Query",r,u),[Ga.MapperKind.MUTATION]:d=>MA(d,"Mutation",r,u),[Ga.MapperKind.SUBSCRIPTION]:d=>MA(d,"Subscription",r,u),[Ga.MapperKind.OBJECT_TYPE]:d=>t(d.name,d)?BA(mg.GraphQLObjectType,d,i||n,u):null,[Ga.MapperKind.INTERFACE_TYPE]:d=>t(d.name,d)?BA(mg.GraphQLInterfaceType,d,s||n,u):null,[Ga.MapperKind.INPUT_OBJECT_TYPE]:d=>t(d.name,d)?BA(mg.GraphQLInputObjectType,d,o||n):null,[Ga.MapperKind.UNION_TYPE]:d=>t(d.name,d)?void 0:null,[Ga.MapperKind.ENUM_TYPE]:d=>t(d.name,d)?void 0:null,[Ga.MapperKind.SCALAR_TYPE]:d=>t(d.name,d)?void 0:null})}hg.filterSchema=Nae;function MA(e,t,n,r){if(n||r){let i=e.toConfig();for(let s in i.fields){let o=i.fields[s];if(n&&!n(t,s,i.fields[s]))delete i.fields[s];else if(r&&o.args)for(let u in o.args)r(t,s,u,o.args[u])||delete o.args[u]}return new mg.GraphQLObjectType(i)}return e}function BA(e,t,n,r){if(n||r){let i=t.toConfig();for(let s in i.fields){let o=i.fields[s];if(n&&!n(t.name,s,i.fields[s]))delete i.fields[s];else if(r&&"args"in o)for(let u in o.args)r(t.name,s,u,o.args[u])||delete o.args[u]}return new e(i)}}});var X1=V(Fp=>{"use strict";m();T();h();Object.defineProperty(Fp,"__esModule",{value:!0});Fp.healTypes=Fp.healSchema=void 0;var ia=(we(),Me(je));function Eae(e){return W1(e.getTypeMap(),e.getDirectives()),e}Fp.healSchema=Eae;function W1(e,t){let n=Object.create(null);for(let d in e){let p=e[d];if(p==null||d.startsWith("__"))continue;let y=p.name;if(!y.startsWith("__")){if(n[y]!=null){console.warn(`Duplicate schema type name ${y} found; keeping the existing one found in the schema`);continue}n[y]=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,ia.isObjectType)(d)){i(d),s(d);return}else if((0,ia.isInterfaceType)(d)){i(d),"getInterfaces"in d&&s(d);return}else if((0,ia.isUnionType)(d)){u(d);return}else if((0,ia.isInputObjectType)(d)){o(d);return}else if((0,ia.isLeafType)(d))return;throw new Error(`Unexpected schema type: ${d}`)}function i(d){let p=d.getFields();for(let[y,N]of Object.entries(p))N.args.map(I=>(I.type=l(I.type),I.type===null?null:I)).filter(Boolean),N.type=l(N.type),N.type===null&&delete p[y]}function s(d){if("getInterfaces"in d){let p=d.getInterfaces();p.push(...p.splice(0).map(y=>l(y)).filter(Boolean))}}function o(d){let p=d.getFields();for(let[y,N]of Object.entries(p))N.type=l(N.type),N.type===null&&delete p[y]}function u(d){let p=d.getTypes();p.push(...p.splice(0).map(y=>l(y)).filter(Boolean))}function l(d){if((0,ia.isListType)(d)){let p=l(d.ofType);return p!=null?new ia.GraphQLList(p):null}else if((0,ia.isNonNullType)(d)){let p=l(d.ofType);return p!=null?new ia.GraphQLNonNull(p):null}else if((0,ia.isNamedType)(d)){let p=e[d.name];if(p&&d!==p)return p}return d}}Fp.healTypes=W1});var Z1=V(Tg=>{"use strict";m();T();h();Object.defineProperty(Tg,"__esModule",{value:!0});Tg.getResolversFromSchema=void 0;var Ul=(we(),Me(je));function gae(e,t){var i,s;let n=Object.create(null),r=e.getTypeMap();for(let o in r)if(!o.startsWith("__")){let u=r[o];if((0,Ul.isScalarType)(u)){if(!(0,Ul.isSpecifiedScalarType)(u)){let l=u.toConfig();delete l.astNode,n[o]=new Ul.GraphQLScalarType(l)}}else if((0,Ul.isEnumType)(u)){n[o]={};let l=u.getValues();for(let d of l)n[o][d.name]=d.value}else if((0,Ul.isInterfaceType)(u))u.resolveType!=null&&(n[o]={__resolveType:u.resolveType});else if((0,Ul.isUnionType)(u))u.resolveType!=null&&(n[o]={__resolveType:u.resolveType});else if((0,Ul.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((s=p.resolve)==null?void 0:s.name){case"defaultMergedResolver":if(!t)continue;break;case"defaultFieldResolver":continue}n[o][d]=n[o][d]||{},n[o][d].resolve=p.resolve}}}}return n}Tg.getResolversFromSchema=gae});var t$=V(yg=>{"use strict";m();T();h();Object.defineProperty(yg,"__esModule",{value:!0});yg.forEachField=void 0;var e$=(we(),Me(je));function Iae(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,e$.getNamedType)(i).name.startsWith("__")&&(0,e$.isObjectType)(i)){let s=i.getFields();for(let o in s){let u=s[o];t(u,r,o)}}}}yg.forEachField=Iae});var n$=V(Ng=>{"use strict";m();T();h();Object.defineProperty(Ng,"__esModule",{value:!0});Ng.forEachDefaultValue=void 0;var VA=(we(),Me(je));function vae(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,VA.getNamedType)(i).name.startsWith("__")){if((0,VA.isObjectType)(i)){let s=i.getFields();for(let o in s){let u=s[o];for(let l of u.args)l.defaultValue=t(l.type,l.defaultValue)}}else if((0,VA.isInputObjectType)(i)){let s=i.getFields();for(let o in s){let u=s[o];u.defaultValue=t(u.type,u.defaultValue)}}}}}Ng.forEachDefaultValue=vae});var qA=V(Eg=>{"use strict";m();T();h();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.addTypes=void 0;var jA=(we(),Me(je)),$A=LA(),_ae=dg();function bae(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,jA.isNamedType)(u)?r[u.name]=u:(0,jA.isDirective)(u)&&(i[u.name]=u);let{typeMap:s,directives:o}=(0,_ae.rewireTypes)(r,Object.values(i));return new jA.GraphQLSchema(K(k({},n),{query:(0,$A.getObjectTypeFromTypeMap)(s,e.getQueryType()),mutation:(0,$A.getObjectTypeFromTypeMap)(s,e.getMutationType()),subscription:(0,$A.getObjectTypeFromTypeMap)(s,e.getSubscriptionType()),types:Object.values(s),directives:o}))}Eg.addTypes=bae});var i$=V(Ig=>{"use strict";m();T();h();Object.defineProperty(Ig,"__esModule",{value:!0});Ig.pruneSchema=void 0;var kr=(we(),Me(je)),Oae=yA(),Sae=Cl(),Dae=Rp(),Aae=Yh();function Rae(e,t={}){let{skipEmptyCompositeTypePruning:n,skipEmptyUnionPruning:r,skipPruning:i,skipUnimplementedInterfacesPruning:s,skipUnusedTypesPruning:o}=t,u=[],l=e;do{let d=Fae(l);if(i){let p=[];for(let y in l.getTypeMap()){if(y.startsWith("__"))continue;let N=l.getType(y);N&&i(N)&&p.push(y)}d=r$(p,l,d)}u=[],l=(0,Dae.mapSchema)(l,{[Sae.MapperKind.TYPE]:p=>!d.has(p.name)&&!(0,kr.isSpecifiedScalarType)(p)?((0,kr.isUnionType)(p)||(0,kr.isInputObjectType)(p)||(0,kr.isInterfaceType)(p)||(0,kr.isObjectType)(p)||(0,kr.isScalarType)(p))&&(o||(0,kr.isUnionType)(p)&&r&&!Object.keys(p.getTypes()).length||((0,kr.isInputObjectType)(p)||(0,kr.isInterfaceType)(p)||(0,kr.isObjectType)(p))&&n&&!Object.keys(p.getFields()).length||(0,kr.isInterfaceType)(p)&&s)?p:(u.push(p.name),d.delete(p.name),null):p})}while(u.length);return l}Ig.pruneSchema=Rae;function Fae(e){let t=[];for(let n of(0,Aae.getRootTypes)(e))t.push(n.name);return r$(t,e)}function r$(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 s=t.getType(i);if(s){if((0,kr.isUnionType)(s)&&e.push(...s.getTypes().map(o=>o.name)),(0,kr.isInterfaceType)(s)&&r[i]===!0&&(e.push(...(0,Oae.getImplementingTypes)(s.name,t)),r[i]=!1),(0,kr.isEnumType)(s)&&e.push(...s.getValues().flatMap(o=>o.astNode?gg(t,o.astNode):[])),"getInterfaces"in s&&e.push(...s.getInterfaces().map(o=>o.name)),"getFields"in s){let o=s.getFields(),u=Object.entries(o);if(!u.length)continue;for(let[,l]of u){(0,kr.isObjectType)(s)&&e.push(...l.args.flatMap(p=>{let y=[(0,kr.getNamedType)(p.type).name];return p.astNode&&y.push(...gg(t,p.astNode)),y}));let d=(0,kr.getNamedType)(l.type);e.push(d.name),l.astNode&&e.push(...gg(t,l.astNode)),(0,kr.isInterfaceType)(d)&&!(d.name in r)&&(r[d.name]=!0)}}s.astNode&&e.push(...gg(t,s.astNode)),n.add(i)}}return n}function gg(e,t){var n;return((n=t.directives)!=null?n:[]).flatMap(r=>{var i,s;return(s=(i=e.getDirective(r.name.value))==null?void 0:i.args.map(o=>(0,kr.getNamedType)(o.type).name))!=null?s:[]})}});var o$=V(vg=>{"use strict";m();T();h();Object.defineProperty(vg,"__esModule",{value:!0});vg.mergeDeep=void 0;var wae=qh();function s$(e,t=!1,n=!1){let r=e[0]||{},i={};t&&Object.setPrototypeOf(i,Object.create(Object.getPrototypeOf(r)));for(let s of e)if(KA(r)&&KA(s)){if(t){let o=Object.getPrototypeOf(i),u=Object.getPrototypeOf(s);if(u)for(let l of Object.getOwnPropertyNames(u)){let d=Object.getOwnPropertyDescriptor(u,l);(0,wae.isSome)(d)&&Object.defineProperty(o,l,d)}}for(let o in s)KA(s[o])?o in i?i[o]=s$([i[o],s[o]],t,n):Object.assign(i,{[o]:s[o]}):n&&Array.isArray(i[o])?Array.isArray(s[o])?i[o].push(...s[o]):i[o].push(s[o]):Object.assign(i,{[o]:s[o]})}else if(n&&Array.isArray(r))Array.isArray(s)?r.push(...s):r.push(s);else if(n&&Array.isArray(s))return[r,...s];return i}vg.mergeDeep=s$;function KA(e){return e&&typeof e=="object"&&!Array.isArray(e)}});var a$=V(_g=>{"use strict";m();T();h();Object.defineProperty(_g,"__esModule",{value:!0});_g.parseSelectionSet=void 0;var Lae=(we(),Me(je));function Pae(e,t){return(0,Lae.parse)(e,t).definitions[0].selectionSet}_g.parseSelectionSet=Pae});var u$=V(bg=>{"use strict";m();T();h();Object.defineProperty(bg,"__esModule",{value:!0});bg.getResponseKeyFromInfo=void 0;function kae(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}bg.getResponseKeyFromInfo=kae});var c$=V(sa=>{"use strict";m();T();h();Object.defineProperty(sa,"__esModule",{value:!0});sa.modifyObjectFields=sa.selectObjectFields=sa.removeObjectFields=sa.appendObjectFields=void 0;var Og=(we(),Me(je)),xae=qA(),Sg=Cl(),Ml=Rp();function Cae(e,t,n){return e.getType(t)==null?(0,xae.addTypes)(e,[new Og.GraphQLObjectType({name:t,fields:n})]):(0,Ml.mapSchema)(e,{[Sg.MapperKind.OBJECT_TYPE]:r=>{if(r.name===t){let i=r.toConfig(),s=i.fields,o={};for(let u in s)o[u]=s[u];for(let u in n)o[u]=n[u];return(0,Ml.correctASTNodes)(new Og.GraphQLObjectType(K(k({},i),{fields:o})))}}})}sa.appendObjectFields=Cae;function Uae(e,t,n){let r={};return[(0,Ml.mapSchema)(e,{[Sg.MapperKind.OBJECT_TYPE]:s=>{if(s.name===t){let o=s.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,Ml.correctASTNodes)(new Og.GraphQLObjectType(K(k({},o),{fields:l})))}}}),r]}sa.removeObjectFields=Uae;function Mae(e,t,n){let r={};return(0,Ml.mapSchema)(e,{[Sg.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}sa.selectObjectFields=Mae;function Bae(e,t,n,r){let i={};return[(0,Ml.mapSchema)(e,{[Sg.MapperKind.OBJECT_TYPE]:o=>{if(o.name===t){let u=o.toConfig(),l=u.fields,d={};for(let p in l){let y=l[p];n(p,y)?i[p]=y:d[p]=y}for(let p in r){let y=r[p];d[p]=y}return(0,Ml.correctASTNodes)(new Og.GraphQLObjectType(K(k({},u),{fields:d})))}}}),i]}sa.modifyObjectFields=Bae});var l$=V(Dg=>{"use strict";m();T();h();Object.defineProperty(Dg,"__esModule",{value:!0});Dg.renameType=void 0;var Gs=(we(),Me(je));function Vae(e,t){if((0,Gs.isObjectType)(e))return new Gs.GraphQLObjectType(K(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:K(k({},e.astNode),{name:K(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>K(k({},n),{name:K(k({},n.name),{value:t})}))}));if((0,Gs.isInterfaceType)(e))return new Gs.GraphQLInterfaceType(K(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:K(k({},e.astNode),{name:K(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>K(k({},n),{name:K(k({},n.name),{value:t})}))}));if((0,Gs.isUnionType)(e))return new Gs.GraphQLUnionType(K(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:K(k({},e.astNode),{name:K(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>K(k({},n),{name:K(k({},n.name),{value:t})}))}));if((0,Gs.isInputObjectType)(e))return new Gs.GraphQLInputObjectType(K(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:K(k({},e.astNode),{name:K(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>K(k({},n),{name:K(k({},n.name),{value:t})}))}));if((0,Gs.isEnumType)(e))return new Gs.GraphQLEnumType(K(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:K(k({},e.astNode),{name:K(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>K(k({},n),{name:K(k({},n.name),{value:t})}))}));if((0,Gs.isScalarType)(e))return new Gs.GraphQLScalarType(K(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:K(k({},e.astNode),{name:K(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>K(k({},n),{name:K(k({},n.name),{value:t})}))}));throw new Error(`Unknown type ${e}.`)}Dg.renameType=Vae});var f$=V(Ag=>{"use strict";m();T();h();Object.defineProperty(Ag,"__esModule",{value:!0});Ag.mapAsyncIterator=void 0;var jae=Gh();function $ae(e,t,n,r){let i,s,o;r&&(o=d=>{let p=r();return(0,jae.isPromise)(p)?p.then(()=>d):d}),typeof e.return=="function"&&(i=e.return,s=d=>{let p=()=>Promise.reject(d);return i.call(e).then(p,p)});function u(d){return d.done?o?o(d):d:d$(d.value,t).then(p$,s)}let l;if(n){let d=n;l=p=>d$(p,d).then(p$,s)}return{next(){return e.next().then(u,l)},return(){let d=i?i.call(e).then(u,l):Promise.resolve({value:void 0,done:!0});return o?d.then(o):d},throw(d){return typeof e.throw=="function"?e.throw(d).then(u,l):Promise.reject(d).catch(s)},[Symbol.asyncIterator](){return this}}}Ag.mapAsyncIterator=$ae;function d$(e,t){return new Promise(n=>n(t(e)))}function p$(e){return{value:e,done:!1}}});var m$=V(wp=>{"use strict";m();T();h();Object.defineProperty(wp,"__esModule",{value:!0});wp.createVariableNameGenerator=wp.updateArgument=void 0;var Bl=(we(),Me(je)),qae=EA();function Kae(e,t,n,r,i,s,o){if(e[r]={kind:Bl.Kind.ARGUMENT,name:{kind:Bl.Kind.NAME,value:r},value:{kind:Bl.Kind.VARIABLE,name:{kind:Bl.Kind.NAME,value:i}}},t[i]={kind:Bl.Kind.VARIABLE_DEFINITION,variable:{kind:Bl.Kind.VARIABLE,name:{kind:Bl.Kind.NAME,value:i}},type:(0,qae.astFromType)(s)},o!==void 0){n[i]=o;return}i in n&&delete n[i]}wp.updateArgument=Kae;function Gae(e){let t=0;return n=>{let r;do r=`_v${(t++).toString()}_${n}`;while(r in e);return r}}wp.createVariableNameGenerator=Gae});var h$=V(Rg=>{"use strict";m();T();h();Object.defineProperty(Rg,"__esModule",{value:!0});Rg.implementsAbstractType=void 0;var GA=(we(),Me(je));function Qae(e,t,n){return n==null||t==null?!1:t===n?!0:(0,GA.isCompositeType)(t)&&(0,GA.isCompositeType)(n)?(0,GA.doTypesOverlap)(e,t,n):!1}Rg.implementsAbstractType=Qae});var T$=V(Fg=>{"use strict";m();T();h();Object.defineProperty(Fg,"__esModule",{value:!0});Fg.observableToAsyncIterable=void 0;function Yae(e){let t=[],n=[],r=!0,i=p=>{t.length!==0?t.shift()({value:p,done:!1}):n.push({value:p,done:!1})},s=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 y=n.shift();p(y)}else t.push(p)}),l=e.subscribe({next(p){i(p)},error(p){s(p)},complete(){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(),Promise.resolve({value:void 0,done:!0})},throw(p){return d(),Promise.reject(p)},[Symbol.asyncIterator](){return this}}}Fg.observableToAsyncIterable=Yae});var y$=V(wg=>{"use strict";m();T();h();Object.defineProperty(wg,"__esModule",{value:!0});wg.AccumulatorMap=void 0;var QA=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)}};wg.AccumulatorMap=QA});var YA=V(Lp=>{"use strict";m();T();h();Object.defineProperty(Lp,"__esModule",{value:!0});Lp.GraphQLStreamDirective=Lp.GraphQLDeferDirective=void 0;var Qs=(we(),Me(je));Lp.GraphQLDeferDirective=new Qs.GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Qs.DirectiveLocation.FRAGMENT_SPREAD,Qs.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Qs.GraphQLNonNull(Qs.GraphQLBoolean),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Qs.GraphQLString,description:"Unique name"}}});Lp.GraphQLStreamDirective=new Qs.GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Qs.DirectiveLocation.FIELD],args:{if:{type:new Qs.GraphQLNonNull(Qs.GraphQLBoolean),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Qs.GraphQLString,description:"Unique name"},initialCount:{defaultValue:0,type:Qs.GraphQLInt,description:"Number of items to return immediately"}}})});var HA=V(Ki=>{"use strict";m();T();h();Object.defineProperty(Ki,"__esModule",{value:!0});Ki.collectSubFields=Ki.getDeferValues=Ki.getFieldEntryKey=Ki.doesFragmentConditionMatch=Ki.shouldIncludeNode=Ki.collectFields=void 0;var oa=(we(),Me(je)),Pg=y$(),Jae=YA(),zae=_p();function Pp(e,t,n,r,i,s,o,u){for(let l of i.selections)switch(l.kind){case oa.Kind.FIELD:{if(!Lg(n,l))continue;s.add(N$(l),l);break}case oa.Kind.INLINE_FRAGMENT:{if(!Lg(n,l)||!JA(e,l,r))continue;let d=zA(n,l);if(d){let p=new Pg.AccumulatorMap;Pp(e,t,n,r,l.selectionSet,p,o,u),o.push({label:d.label,fields:p})}else Pp(e,t,n,r,l.selectionSet,s,o,u);break}case oa.Kind.FRAGMENT_SPREAD:{let d=l.name.value;if(!Lg(n,l))continue;let p=zA(n,l);if(u.has(d)&&!p)continue;let y=t[d];if(!y||!JA(e,y,r))continue;if(p||u.add(d),p){let N=new Pg.AccumulatorMap;Pp(e,t,n,r,y.selectionSet,N,o,u),o.push({label:p.label,fields:N})}else Pp(e,t,n,r,y.selectionSet,s,o,u);break}}}function Hae(e,t,n,r,i){let s=new Pg.AccumulatorMap,o=[];return Pp(e,t,n,r,i,s,o,new Set),{fields:s,patches:o}}Ki.collectFields=Hae;function Lg(e,t){let n=(0,oa.getDirectiveValues)(oa.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,oa.getDirectiveValues)(oa.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}Ki.shouldIncludeNode=Lg;function JA(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,oa.typeFromAST)(e,r);return i===n?!0:(0,oa.isAbstractType)(i)?e.getPossibleTypes(i).includes(n):!1}Ki.doesFragmentConditionMatch=JA;function N$(e){return e.alias?e.alias.value:e.name.value}Ki.getFieldEntryKey=N$;function zA(e,t){let n=(0,oa.getDirectiveValues)(Jae.GraphQLDeferDirective,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}Ki.getDeferValues=zA;Ki.collectSubFields=(0,zae.memoize5)(function(t,n,r,i,s){let o=new Pg.AccumulatorMap,u=new Set,l=[],d={fields:o,patches:l};for(let p of s)p.selectionSet&&Pp(t,n,r,i,p.selectionSet,o,l,u);return d})});var WA=V(kp=>{"use strict";m();T();h();Object.defineProperty(kp,"__esModule",{value:!0});kp.getOperationASTFromRequest=kp.getOperationASTFromDocument=void 0;var Wae=(we(),Me(je)),Xae=_p();function E$(e,t){let n=(0,Wae.getOperationAST)(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}kp.getOperationASTFromDocument=E$;kp.getOperationASTFromRequest=(0,Xae.memoize1)(function(t){return E$(t.document,t.operationName)})});var v$=V(Sc=>{"use strict";m();T();h();Object.defineProperty(Sc,"__esModule",{value:!0});Sc.visitResult=Sc.visitErrors=Sc.visitData=void 0;var Oc=(we(),Me(je)),XA=HA(),Zae=WA();function ZA(e,t,n){if(Array.isArray(e))return e.map(r=>ZA(r,t,n));if(typeof e=="object"){let r=t!=null?t(e):e;if(r!=null)for(let i in r){let s=r[i];Object.defineProperty(r,i,{value:ZA(s,t,n)})}return n!=null?n(r):r}return e}Sc.visitData=ZA;function eue(e,t){return e.map(n=>t(n))}Sc.visitErrors=eue;function tue(e,t,n,r,i){let s=t.document.definitions.reduce((N,I)=>(I.kind===Oc.Kind.FRAGMENT_DEFINITION&&(N[I.name.value]=I),N),{}),o=t.variables||{},u={segmentInfoMap:new Map,unpathedErrors:new Set},l=e.data,d=e.errors,p=d!=null&&i!=null,y=(0,Zae.getOperationASTFromRequest)(t);return l!=null&&y!=null&&(e.data=iue(l,y,n,s,o,r,p?d:void 0,u)),d!=null&&i&&(e.errors=nue(d,i,u)),e}Sc.visitResult=tue;function nue(e,t,n){let r=n.segmentInfoMap,i=n.unpathedErrors,s=t.__unpathed;return e.map(o=>{let u=r.get(o),l=u==null?o:u.reduceRight((d,p)=>{let y=p.type.name,N=t[y];if(N==null)return d;let I=N[p.fieldName];return I==null?d:I(d,p.pathIndex)},o);return s&&i.has(o)?s(l):l})}function rue(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":return e.getMutationType();case"subscription":return e.getSubscriptionType()}}function iue(e,t,n,r,i,s,o,u){let l=rue(n,t),{fields:d}=(0,XA.collectFields)(n,r,i,l,t.selectionSet);return eR(e,l,d,n,r,i,s,0,o,u)}function eR(e,t,n,r,i,s,o,u,l,d){var re;let p=t.getFields(),y=o==null?void 0:o[t.name],N=y==null?void 0:y.__enter,I=N!=null?N(e):e,_,C=null;if(l!=null){_=oue(l,u),C=_.errorMap;for(let se of _.unpathedErrors)d.unpathedErrors.add(se)}for(let[se,pe]of n){let ye=pe[0].name.value,Ce=(re=p[ye])==null?void 0:re.type;if(Ce==null)switch(ye){case"__typename":Ce=Oc.TypeNameMetaFieldDef.type;break;case"__schema":Ce=Oc.SchemaMetaFieldDef.type;break;case"__type":Ce=Oc.TypeMetaFieldDef.type;break}let ht=u+1,xt;C&&(xt=C[se],xt!=null&&delete C[se],aue(t,ye,ht,xt,d));let B=I$(e[se],Ce,pe,r,i,s,o,ht,xt,d);g$(I,se,B,y,ye)}let j=I.__typename;if(j!=null&&g$(I,"__typename",j,y,"__typename"),C)for(let se in C){let pe=C[se];for(let ye of pe)d.unpathedErrors.add(ye)}let Q=y==null?void 0:y.__leave;return Q!=null?Q(I):I}function g$(e,t,n,r,i){if(r==null){e[t]=n;return}let s=r[i];if(s==null){e[t]=n;return}let o=s(n);if(o===void 0){delete e[t];return}e[t]=o}function sue(e,t,n,r,i,s,o,u,l,d){return e.map(p=>I$(p,t,n,r,i,s,o,u+1,l,d))}function I$(e,t,n,r,i,s,o,u,l=[],d){if(e==null)return e;let p=(0,Oc.getNullableType)(t);if((0,Oc.isListType)(p))return sue(e,p.ofType,n,r,i,s,o,u,l,d);if((0,Oc.isAbstractType)(p)){let I=r.getType(e.__typename),{fields:_}=(0,XA.collectSubFields)(r,i,s,I,n);return eR(e,I,_,r,i,s,o,u,l,d)}else if((0,Oc.isObjectType)(p)){let{fields:I}=(0,XA.collectSubFields)(r,i,s,p,n);return eR(e,p,I,r,i,s,o,u,l,d)}let y=o==null?void 0:o[p.name];if(y==null)return e;let N=y(e);return N===void 0?e:N}function oue(e,t){var i;let n=Object.create(null),r=new Set;for(let s of e){let o=(i=s.path)==null?void 0:i[t];if(o==null){r.add(s);continue}o in n?n[o].push(s):n[o]=[s]}return{errorMap:n,unpathedErrors:r}}function aue(e,t,n,r=[],i){for(let s of r){let o={type:e,fieldName:t,pathIndex:n},u=i.segmentInfoMap.get(s);u==null?i.segmentInfoMap.set(s,[o]):u.push(o)}}});var _$=V(kg=>{"use strict";m();T();h();Object.defineProperty(kg,"__esModule",{value:!0});kg.valueMatchesCriteria=void 0;function tR(e,t){return e==null?e===t:Array.isArray(e)?Array.isArray(t)&&e.every((n,r)=>tR(n,t[r])):typeof e=="object"?typeof t=="object"&&t&&Object.keys(t).every(n=>tR(e[n],t[n])):t instanceof RegExp?t.test(e):e===t}kg.valueMatchesCriteria=tR});var b$=V(xg=>{"use strict";m();T();h();Object.defineProperty(xg,"__esModule",{value:!0});xg.isAsyncIterable=void 0;function uue(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}xg.isAsyncIterable=uue});var O$=V(Cg=>{"use strict";m();T();h();Object.defineProperty(Cg,"__esModule",{value:!0});Cg.isDocumentNode=void 0;var cue=(we(),Me(je));function lue(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===cue.Kind.DOCUMENT}Cg.isDocumentNode=lue});var S$=V(()=>{"use strict";m();T();h()});var F$=V(Dc=>{"use strict";m();T();h();Object.defineProperty(Dc,"__esModule",{value:!0});Dc.withCancel=Dc.getAsyncIterableWithCancel=Dc.getAsyncIteratorWithCancel=void 0;var due=_p();function pue(e){return yr(this,null,function*(){return{value:e,done:!0}})}var D$=(0,due.memoize2)(function(t,n){return function(...i){return Reflect.apply(n,t,i)}});function A$(e,t){return new Proxy(e,{has(n,r){return r==="return"?!0:Reflect.has(n,r)},get(n,r,i){let s=Reflect.get(n,r,i);if(r==="return"){let o=s||pue;return function(l){return yr(this,null,function*(){let d=yield t(l);return Reflect.apply(o,n,[d])})}}else if(typeof s=="function")return D$(n,s);return s}})}Dc.getAsyncIteratorWithCancel=A$;function R$(e,t){return new Proxy(e,{get(n,r,i){let s=Reflect.get(n,r,i);return Symbol.asyncIterator===r?function(){let u=Reflect.apply(s,n,[]);return A$(u,t)}:typeof s=="function"?D$(n,s):s}})}Dc.getAsyncIterableWithCancel=R$;Dc.withCancel=R$});var w$=V(Ug=>{"use strict";m();T();h();Object.defineProperty(Ug,"__esModule",{value:!0});Ug.fixSchemaAst=void 0;var fue=(we(),Me(je)),mue=SA();function hue(e,t){let n=(0,mue.getDocumentNodeFromSchema)(e);return(0,fue.buildASTSchema)(n,k({},t||{}))}function Tue(e,t){let n;return(!e.astNode||!e.extensionASTNodes)&&(n=hue(e,t)),!e.astNode&&(n!=null&&n.astNode)&&(e.astNode=n.astNode),!e.extensionASTNodes&&(n!=null&&n.astNode)&&(e.extensionASTNodes=n.extensionASTNodes),e}Ug.fixSchemaAst=Tue});var L$=V(Mg=>{"use strict";m();T();h();Object.defineProperty(Mg,"__esModule",{value:!0});Mg.extractExtensionsFromSchema=void 0;var Qa=Cl(),yue=Rp();function vo(e={}){let t=k({},e),n=t.directives;if(n!=null)for(let r in n){let i=n[r];Array.isArray(i)||(n[r]=[i])}return t}function Nue(e){let t={schemaExtensions:vo(e.extensions),types:{}};return(0,yue.mapSchema)(e,{[Qa.MapperKind.OBJECT_TYPE]:n=>(t.types[n.name]={fields:{},type:"object",extensions:vo(n.extensions)},n),[Qa.MapperKind.INTERFACE_TYPE]:n=>(t.types[n.name]={fields:{},type:"interface",extensions:vo(n.extensions)},n),[Qa.MapperKind.FIELD]:(n,r,i)=>{t.types[i].fields[r]={arguments:{},extensions:vo(n.extensions)};let s=n.args;if(s!=null)for(let o in s)t.types[i].fields[r].arguments[o]=vo(s[o].extensions);return n},[Qa.MapperKind.ENUM_TYPE]:n=>(t.types[n.name]={values:{},type:"enum",extensions:vo(n.extensions)},n),[Qa.MapperKind.ENUM_VALUE]:(n,r,i,s)=>(t.types[r].values[s]=vo(n.extensions),n),[Qa.MapperKind.SCALAR_TYPE]:n=>(t.types[n.name]={type:"scalar",extensions:vo(n.extensions)},n),[Qa.MapperKind.UNION_TYPE]:n=>(t.types[n.name]={type:"union",extensions:vo(n.extensions)},n),[Qa.MapperKind.INPUT_OBJECT_TYPE]:n=>(t.types[n.name]={fields:{},type:"input",extensions:vo(n.extensions)},n),[Qa.MapperKind.INPUT_OBJECT_FIELD]:(n,r,i)=>(t.types[i].fields[r]={extensions:vo(n.extensions)},n)}),t}Mg.extractExtensionsFromSchema=Nue});var P$=V(Ac=>{"use strict";m();T();h();Object.defineProperty(Ac,"__esModule",{value:!0});Ac.printPathArray=Ac.pathToArray=Ac.addPath=void 0;function Eue(e,t,n){return{prev:e,key:t,typename:n}}Ac.addPath=Eue;function gue(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}Ac.pathToArray=gue;function Iue(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}Ac.printPathArray=Iue});var k$=V(nR=>{"use strict";m();T();h();function Bg(e,t,n){if(typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t))for(n=0;n{"use strict";m();T();h();Object.defineProperty(Vg,"__esModule",{value:!0});Vg.mergeIncrementalResult=void 0;var rR=k$();function x$({incrementalResult:e,executionResult:t}){var r;let n=["data",...(r=e.path)!=null?r:[]];if(e.items)for(let i of e.items)(0,rR.dset)(t,n,i),n[n.length-1]++;e.data&&(0,rR.dset)(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&(0,rR.dset)(t,"extensions",e.extensions),e.incremental&&e.incremental.forEach(i=>{x$({incrementalResult:i,executionResult:t})})}Vg.mergeIncrementalResult=x$});var M$=V(xp=>{"use strict";m();T();h();Object.defineProperty(xp,"__esModule",{value:!0});xp.debugTimerEnd=xp.debugTimerStart=void 0;var U$=new Set;function _ue(e){let t=(globalThis==null?void 0:globalThis.process.env.DEBUG)||globalThis.DEBUG;(t==="1"||t!=null&&t.includes(e))&&(U$.add(e),console.time(e))}xp.debugTimerStart=_ue;function bue(e){U$.has(e)&&console.timeEnd(e)}xp.debugTimerEnd=bue});var _o=V(Ze=>{"use strict";m();T();h();Object.defineProperty(Ze,"__esModule",{value:!0});Ze.inspect=void 0;var tt=(Gj(),Me(Kj));tt.__exportStar(Qj(),Ze);tt.__exportStar(qh(),Ze);tt.__exportStar(mA(),Ze);tt.__exportStar(hA(),Ze);tt.__exportStar(n1(),Ze);tt.__exportStar(yA(),Ze);tt.__exportStar(SA(),Ze);tt.__exportStar(hA(),Ze);tt.__exportStar(E1(),Ze);tt.__exportStar(g1(),Ze);tt.__exportStar(P1(),Ze);tt.__exportStar(j1(),Ze);tt.__exportStar(q1(),Ze);tt.__exportStar(H1(),Ze);tt.__exportStar(X1(),Ze);tt.__exportStar(Z1(),Ze);tt.__exportStar(t$(),Ze);tt.__exportStar(n$(),Ze);tt.__exportStar(Rp(),Ze);tt.__exportStar(qA(),Ze);tt.__exportStar(dg(),Ze);tt.__exportStar(i$(),Ze);tt.__exportStar(o$(),Ze);tt.__exportStar(Cl(),Ze);tt.__exportStar(xA(),Ze);tt.__exportStar(a$(),Ze);tt.__exportStar(u$(),Ze);tt.__exportStar(c$(),Ze);tt.__exportStar(l$(),Ze);tt.__exportStar(CA(),Ze);tt.__exportStar(f$(),Ze);tt.__exportStar(m$(),Ze);tt.__exportStar(h$(),Ze);tt.__exportStar(QE(),Ze);tt.__exportStar(T$(),Ze);tt.__exportStar(v$(),Ze);tt.__exportStar(fA(),Ze);tt.__exportStar(_$(),Ze);tt.__exportStar(b$(),Ze);tt.__exportStar(O$(),Ze);tt.__exportStar(eg(),Ze);tt.__exportStar(S$(),Ze);tt.__exportStar(F$(),Ze);tt.__exportStar(Yh(),Ze);tt.__exportStar(AA(),Ze);tt.__exportStar(HA(),Ze);var Oue=Kh();Object.defineProperty(Ze,"inspect",{enumerable:!0,get:function(){return Oue.inspect}});tt.__exportStar(_p(),Ze);tt.__exportStar(w$(),Ze);tt.__exportStar(WA(),Ze);tt.__exportStar(L$(),Ze);tt.__exportStar(P$(),Ze);tt.__exportStar(Gh(),Ze);tt.__exportStar(YA(),Ze);tt.__exportStar(C$(),Ze);tt.__exportStar(M$(),Ze)});var V$=V(jg=>{"use strict";m();T();h();Object.defineProperty(jg,"__esModule",{value:!0});jg.mergeResolvers=void 0;var Sue=_o();function B$(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=B$(i)),typeof i=="object"&&i&&n.push(i);let r=(0,Sue.mergeDeep)(n,!0);if(t!=null&&t.exclusions)for(let i of t.exclusions){let[s,o]=i.split(".");!o||o==="*"?delete r[s]:r[s]&&delete r[s][o]}return r}jg.mergeResolvers=B$});var iR=V($g=>{"use strict";m();T();h();Object.defineProperty($g,"__esModule",{value:!0});$g.mergeArguments=void 0;var j$=_o();function Due(e,t,n){let r=Aue([...t,...e].filter(j$.isSome),n);return n&&n.sort&&r.sort(j$.compareNodes),r}$g.mergeArguments=Due;function Aue(e,t){return e.reduce((n,r)=>{let i=n.findIndex(s=>s.name.value===r.name.value);return i===-1?n.concat([r]):(t!=null&&t.reverseArguments||(n[i]=r),n)},[])}});var Ys=V(Cp=>{"use strict";m();T();h();Object.defineProperty(Cp,"__esModule",{value:!0});Cp.mergeDirective=Cp.mergeDirectives=void 0;var $$=(we(),Me(je)),Rue=_o();function Fue(e,t){return!!e.find(n=>n.name.value===t.name.value)}function q$(e,t){var n;return!!((n=t==null?void 0:t[e.name.value])!=null&&n.repeatable)}function wue(e,t){return t.some(({value:n})=>n===e.value)}function K$(e,t){let n=[...t];for(let r of e){let i=n.findIndex(s=>s.name.value===r.name.value);if(i>-1){let s=n[i];if(s.value.kind==="ListValue"){let o=s.value.values,u=r.value.values;s.value.values=Cue(o,u,(l,d)=>{let p=l.value;return!p||!d.some(y=>y.value===p)})}else s.value=r.value}else n.push(r)}return n}function Lue(e,t){return e.map((n,r,i)=>{let s=i.findIndex(o=>o.name.value===n.name.value);if(s!==r&&!q$(n,t)){let o=i[s];return n.arguments=K$(n.arguments,o.arguments),null}return n}).filter(Rue.isSome)}function Pue(e=[],t=[],n,r){let i=n&&n.reverseDirectives,s=i?e:t,o=i?t:e,u=Lue([...s],r);for(let l of o)if(Fue(u,l)&&!q$(l,r)){let d=u.findIndex(y=>y.name.value===l.name.value),p=u[d];u[d].arguments=K$(l.arguments||[],p.arguments||[])}else u.push(l);return u}Cp.mergeDirectives=Pue;function kue(e,t){let n=(0,$$.print)(K(k({},e),{description:void 0})),r=(0,$$.print)(K(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 xue(e,t){return t?(kue(e,t),K(k({},e),{locations:[...t.locations,...e.locations.filter(n=>!wue(n,t.locations))]})):e}Cp.mergeDirective=xue;function Cue(e,t,n){return e.concat(t.filter(r=>n(r,e)))}});var sR=V(qg=>{"use strict";m();T();h();Object.defineProperty(qg,"__esModule",{value:!0});qg.mergeEnumValues=void 0;var Uue=Ys(),Mue=_o();function Bue(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,Uue.mergeDirectives)(o.directives,l.directives,r)}else i.set(u,o)}let s=[...i.values()];return n&&n.sort&&s.sort(Mue.compareNodes),s}qg.mergeEnumValues=Bue});var oR=V(Kg=>{"use strict";m();T();h();Object.defineProperty(Kg,"__esModule",{value:!0});Kg.mergeEnum=void 0;var Vue=(we(),Me(je)),jue=Ys(),$ue=sR();function que(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,jue.mergeDirectives)(e.directives,t.directives,n,r),values:(0,$ue.mergeEnumValues)(e.values,t.values,n)}:n!=null&&n.convertExtensions?K(k({},e),{kind:Vue.Kind.ENUM_TYPE_DEFINITION}):e}Kg.mergeEnum=que});var Gg=V(gr=>{"use strict";m();T();h();Object.defineProperty(gr,"__esModule",{value:!0});gr.defaultStringComparator=gr.CompareVal=gr.printTypeNode=gr.isNonNullTypeNode=gr.isListTypeNode=gr.isWrappingTypeNode=gr.extractType=gr.isSourceTypes=gr.isStringTypes=void 0;var eT=(we(),Me(je));function Kue(e){return typeof e=="string"}gr.isStringTypes=Kue;function Gue(e){return e instanceof eT.Source}gr.isSourceTypes=Gue;function Que(e){let t=e;for(;t.kind===eT.Kind.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}gr.extractType=Que;function Yue(e){return e.kind!==eT.Kind.NAMED_TYPE}gr.isWrappingTypeNode=Yue;function G$(e){return e.kind===eT.Kind.LIST_TYPE}gr.isListTypeNode=G$;function Q$(e){return e.kind===eT.Kind.NON_NULL_TYPE}gr.isNonNullTypeNode=Q$;function aR(e){return G$(e)?`[${aR(e.type)}]`:Q$(e)?`${aR(e.type)}!`:e.name.value}gr.printTypeNode=aR;var Vl;(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"})(Vl=gr.CompareVal||(gr.CompareVal={}));function Jue(e,t){return e==null&&t==null?Vl.A_EQUALS_B:e==null?Vl.A_SMALLER_THAN_B:t==null?Vl.A_GREATER_THAN_B:et?Vl.A_GREATER_THAN_B:Vl.A_EQUALS_B}gr.defaultStringComparator=Jue});var nT=V(Qg=>{"use strict";m();T();h();Object.defineProperty(Qg,"__esModule",{value:!0});Qg.mergeFields=void 0;var Gi=Gg(),zue=Ys(),Hue=_o(),Wue=iR();function Xue(e,t){let n=e.findIndex(r=>r.name.value===t.name.value);return[n>-1?e[n]:null,n]}function Zue(e,t,n,r,i){let s=[];if(n!=null&&s.push(...n),t!=null)for(let o of t){let[u,l]=Xue(s,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)||ece(e,u,o,r==null?void 0:r.throwOnConflict);d.arguments=(0,Wue.mergeArguments)(o.arguments||[],u.arguments||[],r),d.directives=(0,zue.mergeDirectives)(o.directives,u.directives,r,i),d.description=o.description||u.description,s[l]=d}else s.push(o)}if(r&&r.sort&&s.sort(Hue.compareNodes),r&&r.exclusions){let o=r.exclusions;return s.filter(u=>!o.includes(`${e.name.value}.${u.name.value}`))}return s}Qg.mergeFields=Zue;function ece(e,t,n,r=!1){let i=(0,Gi.printTypeNode)(t.type),s=(0,Gi.printTypeNode)(n.type);if(i!==s){let o=(0,Gi.extractType)(t.type),u=(0,Gi.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(!tT(t.type,n.type,!r))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${i}' to '${s}'`)}return(0,Gi.isNonNullTypeNode)(n.type)&&!(0,Gi.isNonNullTypeNode)(t.type)&&(t.type=n.type),t}function tT(e,t,n=!1){if(!(0,Gi.isWrappingTypeNode)(e)&&!(0,Gi.isWrappingTypeNode)(t))return e.toString()===t.toString();if((0,Gi.isNonNullTypeNode)(t)){let r=(0,Gi.isNonNullTypeNode)(e)?e.type:e;return tT(r,t.type)}return(0,Gi.isNonNullTypeNode)(e)?tT(t,e,n):(0,Gi.isListTypeNode)(e)?(0,Gi.isListTypeNode)(t)&&tT(e.type,t.type)||(0,Gi.isNonNullTypeNode)(t)&&tT(e,t.type):!1}});var uR=V(Yg=>{"use strict";m();T();h();Object.defineProperty(Yg,"__esModule",{value:!0});Yg.mergeInputType=void 0;var tce=(we(),Me(je)),nce=nT(),rce=Ys();function ice(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,nce.mergeFields)(e,e.fields,t.fields,n),directives:(0,rce.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(k({},e),{kind:tce.Kind.INPUT_OBJECT_TYPE_DEFINITION}):e}Yg.mergeInputType=ice});var rT=V(Jg=>{"use strict";m();T();h();Object.defineProperty(Jg,"__esModule",{value:!0});Jg.mergeNamedTypeArray=void 0;var sce=_o();function oce(e,t){return!!e.find(n=>n.name.value===t.name.value)}function ace(e=[],t=[],n={}){let r=[...t,...e.filter(i=>!oce(t,i))];return n&&n.sort&&r.sort(sce.compareNodes),r}Jg.mergeNamedTypeArray=ace});var cR=V(zg=>{"use strict";m();T();h();Object.defineProperty(zg,"__esModule",{value:!0});zg.mergeInterface=void 0;var uce=(we(),Me(je)),cce=nT(),lce=Ys(),dce=rT();function pce(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,cce.mergeFields)(e,e.fields,t.fields,n),directives:(0,lce.mergeDirectives)(e.directives,t.directives,n,r),interfaces:e.interfaces?(0,dce.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(k({},e),{kind:uce.Kind.INTERFACE_TYPE_DEFINITION}):e}zg.mergeInterface=pce});var lR=V(Hg=>{"use strict";m();T();h();Object.defineProperty(Hg,"__esModule",{value:!0});Hg.mergeType=void 0;var fce=(we(),Me(je)),mce=nT(),hce=Ys(),Tce=rT();function yce(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,mce.mergeFields)(e,e.fields,t.fields,n),directives:(0,hce.mergeDirectives)(e.directives,t.directives,n,r),interfaces:(0,Tce.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(k({},e),{kind:fce.Kind.OBJECT_TYPE_DEFINITION}):e}Hg.mergeType=yce});var dR=V(Wg=>{"use strict";m();T();h();Object.defineProperty(Wg,"__esModule",{value:!0});Wg.mergeScalar=void 0;var Nce=(we(),Me(je)),Ece=Ys();function gce(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,Ece.mergeDirectives)(e.directives,t.directives,n,r)}:n!=null&&n.convertExtensions?K(k({},e),{kind:Nce.Kind.SCALAR_TYPE_DEFINITION}):e}Wg.mergeScalar=gce});var fR=V(Xg=>{"use strict";m();T();h();Object.defineProperty(Xg,"__esModule",{value:!0});Xg.mergeUnion=void 0;var pR=(we(),Me(je)),Ice=Ys(),vce=rT();function _ce(e,t,n,r){return t?{name:e.name,description:e.description||t.description,directives:(0,Ice.mergeDirectives)(e.directives,t.directives,n,r),kind:n!=null&&n.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?pR.Kind.UNION_TYPE_DEFINITION:pR.Kind.UNION_TYPE_EXTENSION,loc:e.loc,types:(0,vce.mergeNamedTypeArray)(e.types,t.types,n)}:n!=null&&n.convertExtensions?K(k({},e),{kind:pR.Kind.UNION_TYPE_DEFINITION}):e}Xg.mergeUnion=_ce});var mR=V(jl=>{"use strict";m();T();h();Object.defineProperty(jl,"__esModule",{value:!0});jl.mergeSchemaDefs=jl.DEFAULT_OPERATION_TYPE_NAME_MAP=void 0;var iT=(we(),Me(je)),bce=Ys();jl.DEFAULT_OPERATION_TYPE_NAME_MAP={query:"Query",mutation:"Mutation",subscription:"Subscription"};function Oce(e=[],t=[]){let n=[];for(let r in jl.DEFAULT_OPERATION_TYPE_NAME_MAP){let i=e.find(s=>s.operation===r)||t.find(s=>s.operation===r);i&&n.push(i)}return n}function Sce(e,t,n,r){return t?{kind:e.kind===iT.Kind.SCHEMA_DEFINITION||t.kind===iT.Kind.SCHEMA_DEFINITION?iT.Kind.SCHEMA_DEFINITION:iT.Kind.SCHEMA_EXTENSION,description:e.description||t.description,directives:(0,bce.mergeDirectives)(e.directives,t.directives,n,r),operationTypes:Oce(e.operationTypes,t.operationTypes)}:n!=null&&n.convertExtensions?K(k({},e),{kind:iT.Kind.SCHEMA_DEFINITION}):e}jl.mergeSchemaDefs=Sce});var hR=V(aa=>{"use strict";m();T();h();Object.defineProperty(aa,"__esModule",{value:!0});aa.mergeGraphQLNodes=aa.isNamedDefinitionNode=aa.schemaDefSymbol=void 0;var Ri=(we(),Me(je)),Dce=lR(),Ace=oR(),Rce=dR(),Fce=fR(),wce=uR(),Lce=cR(),Pce=Ys(),kce=mR(),xce=_o();aa.schemaDefSymbol="SCHEMA_DEF_SYMBOL";function Y$(e){return"name"in e}aa.isNamedDefinitionNode=Y$;function Cce(e,t,n={}){var i,s,o;let r=n;for(let u of e)if(Y$(u)){let l=(i=u.name)==null?void 0:i.value;if(t!=null&&t.commentDescriptions&&(0,xce.collectComment)(u),l==null)continue;if((s=t==null?void 0:t.exclusions)!=null&&s.includes(l+".*")||(o=t==null?void 0:t.exclusions)!=null&&o.includes(l))delete r[l];else switch(u.kind){case Ri.Kind.OBJECT_TYPE_DEFINITION:case Ri.Kind.OBJECT_TYPE_EXTENSION:r[l]=(0,Dce.mergeType)(u,r[l],t,n);break;case Ri.Kind.ENUM_TYPE_DEFINITION:case Ri.Kind.ENUM_TYPE_EXTENSION:r[l]=(0,Ace.mergeEnum)(u,r[l],t,n);break;case Ri.Kind.UNION_TYPE_DEFINITION:case Ri.Kind.UNION_TYPE_EXTENSION:r[l]=(0,Fce.mergeUnion)(u,r[l],t,n);break;case Ri.Kind.SCALAR_TYPE_DEFINITION:case Ri.Kind.SCALAR_TYPE_EXTENSION:r[l]=(0,Rce.mergeScalar)(u,r[l],t,n);break;case Ri.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Ri.Kind.INPUT_OBJECT_TYPE_EXTENSION:r[l]=(0,wce.mergeInputType)(u,r[l],t,n);break;case Ri.Kind.INTERFACE_TYPE_DEFINITION:case Ri.Kind.INTERFACE_TYPE_EXTENSION:r[l]=(0,Lce.mergeInterface)(u,r[l],t,n);break;case Ri.Kind.DIRECTIVE_DEFINITION:r[l]=(0,Pce.mergeDirective)(u,r[l]);break}}else(u.kind===Ri.Kind.SCHEMA_DEFINITION||u.kind===Ri.Kind.SCHEMA_EXTENSION)&&(r[aa.schemaDefSymbol]=(0,kce.mergeSchemaDefs)(u,r[aa.schemaDefSymbol],t));return r}aa.mergeGraphQLNodes=Cce});var H$=V(Vp=>{"use strict";m();T();h();Object.defineProperty(Vp,"__esModule",{value:!0});Vp.mergeGraphQLTypes=Vp.mergeTypeDefs=void 0;var Js=(we(),Me(je)),TR=Gg(),Up=hR(),Bp=_o(),J$=mR();function Uce(e,t){(0,Bp.resetComments)();let n={kind:Js.Kind.DOCUMENT,definitions:z$(e,k({useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1},t))},r;return t!=null&&t.commentDescriptions?r=(0,Bp.printWithComments)(n):r=n,(0,Bp.resetComments)(),r}Vp.mergeTypeDefs=Uce;function Mp(e,t,n=[],r=[],i=new Set){if(e&&!i.has(e))if(i.add(e),typeof e=="function")Mp(e(),t,n,r,i);else if(Array.isArray(e))for(let s of e)Mp(s,t,n,r,i);else if((0,Js.isSchema)(e)){let s=(0,Bp.getDocumentNodeFromSchema)(e,t);Mp(s.definitions,t,n,r,i)}else if((0,TR.isStringTypes)(e)||(0,TR.isSourceTypes)(e)){let s=(0,Js.parse)(e,t);Mp(s.definitions,t,n,r,i)}else if(typeof e=="object"&&(0,Js.isDefinitionNode)(e))e.kind===Js.Kind.DIRECTIVE_DEFINITION?n.push(e):r.push(e);else if((0,Bp.isDocumentNode)(e))Mp(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 z$(e,t){var u,l,d;(0,Bp.resetComments)();let{allDirectives:n,allNodes:r}=Mp(e,t),i=(0,Up.mergeGraphQLNodes)(n,t),s=(0,Up.mergeGraphQLNodes)(r,t,i);if(t!=null&&t.useSchemaDefinition){let p=s[Up.schemaDefSymbol]||{kind:Js.Kind.SCHEMA_DEFINITION,operationTypes:[]},y=p.operationTypes;for(let N in J$.DEFAULT_OPERATION_TYPE_NAME_MAP)if(!y.find(b=>b.operation===N)){let b=J$.DEFAULT_OPERATION_TYPE_NAME_MAP[N],x=s[b];x!=null&&x.name!=null&&y.push({kind:Js.Kind.OPERATION_TYPE_DEFINITION,type:{kind:Js.Kind.NAMED_TYPE,name:x.name},operation:N})}((u=p==null?void 0:p.operationTypes)==null?void 0:u.length)!=null&&p.operationTypes.length>0&&(s[Up.schemaDefSymbol]=p)}t!=null&&t.forceSchemaDefinition&&!((d=(l=s[Up.schemaDefSymbol])==null?void 0:l.operationTypes)!=null&&d.length)&&(s[Up.schemaDefSymbol]={kind:Js.Kind.SCHEMA_DEFINITION,operationTypes:[{kind:Js.Kind.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:Js.Kind.NAMED_TYPE,name:{kind:Js.Kind.NAME,value:"Query"}}}]});let o=Object.values(s);if(t!=null&&t.sort){let p=typeof t.sort=="function"?t.sort:TR.defaultStringComparator;o.sort((y,N)=>{var I,b;return p((I=y.name)==null?void 0:I.value,(b=N.name)==null?void 0:b.value)})}return o}Vp.mergeGraphQLTypes=z$});var W$=V(fi=>{"use strict";m();T();h();Object.defineProperty(fi,"__esModule",{value:!0});var Qi=(oA(),Me(sA));Qi.__exportStar(iR(),fi);Qi.__exportStar(Ys(),fi);Qi.__exportStar(sR(),fi);Qi.__exportStar(oR(),fi);Qi.__exportStar(nT(),fi);Qi.__exportStar(uR(),fi);Qi.__exportStar(cR(),fi);Qi.__exportStar(rT(),fi);Qi.__exportStar(hR(),fi);Qi.__exportStar(H$(),fi);Qi.__exportStar(dR(),fi);Qi.__exportStar(lR(),fi);Qi.__exportStar(fR(),fi);Qi.__exportStar(Gg(),fi)});var Z$=V(Rc=>{"use strict";m();T();h();Object.defineProperty(Rc,"__esModule",{value:!0});Rc.applyExtensions=Rc.mergeExtensions=Rc.extractExtensionsFromSchema=void 0;var X$=_o(),Mce=_o();Object.defineProperty(Rc,"extractExtensionsFromSchema",{enumerable:!0,get:function(){return Mce.extractExtensionsFromSchema}});function Bce(e){return(0,X$.mergeDeep)(e)}Rc.mergeExtensions=Bce;function jp(e,t){e&&(e.extensions=(0,X$.mergeDeep)([e.extensions||{},t||{}]))}function Vce(e,t){jp(e,t.schemaExtensions);for(let[n,r]of Object.entries(t.types||{})){let i=e.getType(n);if(i){if(jp(i,r.extensions),r.type==="object"||r.type==="interface")for(let[s,o]of Object.entries(r.fields)){let u=i.getFields()[s];if(u){jp(u,o.extensions);for(let[l,d]of Object.entries(o.arguments))jp(u.args.find(p=>p.name===l),d)}}else if(r.type==="input")for(let[s,o]of Object.entries(r.fields)){let u=i.getFields()[s];jp(u,o.extensions)}else if(r.type==="enum")for(let[s,o]of Object.entries(r.values)){let u=i.getValue(s);jp(u,o)}}}return e}Rc.applyExtensions=Vce});var Zg=V(sT=>{"use strict";m();T();h();Object.defineProperty(sT,"__esModule",{value:!0});var yR=(oA(),Me(sA));yR.__exportStar(V$(),sT);yR.__exportStar(W$(),sT);yR.__exportStar(Z$(),sT)});var Kp=V(mt=>{"use strict";m();T();h();Object.defineProperty(mt,"__esModule",{value:!0});mt.FieldSetDirective=mt.MergeMethod=void 0;mt.newPersistedDirectivesData=nI;mt.isNodeExternalOrShareable=rq;mt.getDefinedArgumentsForDirective=iq;mt.getDirectiveValidationErrors=sq;mt.extractDirectives=gR;mt.extractArguments=$ce;mt.isTypeRequired=IR;mt.compareAndValidateInputValueDefaultValues=qce;mt.addEnumValueDataByNode=Kce;mt.addInheritedDirectivesToFieldData=Gce;mt.addFieldDataByNode=Qce;mt.addInputValueDataByNode=vR;mt.addPersistedDirectiveDefinitionDataByNode=Yce;mt.setMutualExecutableLocations=Jce;mt.isTypeNameRootType=zce;mt.getRenamedRootTypeName=Hce;mt.getEnumNodeByData=Zce;mt.getInputObjectNodeByData=ele;mt.getCompositeOutputNodeByData=tle;mt.getScalarNodeByData=nle;mt.getSchemaNodeByData=rle;mt.getUnionNodeByData=ile;mt.removeInheritableDirectivesFromParentWithFieldsData=sle;mt.setLongestDescription=ole;mt.isParentDataRootType=aq;mt.setParentDataExtensionType=ale;mt.extractPersistedDirectives=lle;mt.pushAuthorizationDirectives=dle;mt.getClientPersistedDirectiveNodes=ER;mt.getNodeForRouterSchemaByData=fle;mt.getNodeWithPersistedDirectivesByFieldData=mle;mt.getClientSchemaFieldNodeByFieldData=hle;mt.getNodeWithPersistedDirectivesByInputValueData=OR;mt.getValidFieldArgumentNodes=Tle;mt.addValidPersistedDirectiveDefinitionNodeByData=Nle;mt.newInvalidFieldNames=Ele;mt.validateExternalAndShareable=gle;mt.isTypeValidImplementation=eI;mt.isNodeDataInaccessible=cq;mt.isLeafKind=Ile;mt.getSubscriptionFilterValue=vle;mt.getParentTypeName=_le;mt.newConditionalFieldData=ble;var wt=(we(),Me(je)),NR=$h(),$p=$a(),zs=Vi(),xr=To(),qt=bi(),eq=$l(),ys=ps(),tI=_c(),jce=Zg();function nI(){return{deprecatedReason:"",directives:new Map,isDeprecated:!1,tags:new Map}}function rq(e,t,n){var i;let r={isExternal:n.has(qt.EXTERNAL),isShareable:t||n.has(qt.SHAREABLE)};if(!((i=e.directives)!=null&&i.length))return r;for(let s of e.directives){let o=s.name.value;if(o===qt.EXTERNAL){r.isExternal=!0;continue}o===qt.SHAREABLE&&(r.isShareable=!0)}return r}function iq(e,t,n,r,i){let s=e.arguments||[],o=e.name.value,u=new Set,l=new Set,d=new Set;for(let p of s){let y=p.name.value;if(u.has(y)){l.add(y);continue}if(!t.get(y)){d.add(y);continue}u.add(y)}return l.size>0&&i.push((0,xr.duplicateDirectiveArgumentDefinitionsErrorMessage)(o,r,[...l])),d.size>0&&i.push((0,xr.unexpectedDirectiveArgumentErrorMessage)(o,[...d])),u}function sq(e,t,n,r,i,s,o=!1){var b,x,j;let u=e.name.value,l=r.get(u)||tI.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.get(u),d=[];if(!l)return d.push((0,xr.undefinedDirectiveErrorMessage)(u,s)),d;let p=new Map,y=new Set;if((0,eq.getDirectiveDefinitionArgumentSets)(l.arguments||[],p,y),(0,eq.areNodeKindAndDirectiveLocationCompatible)(t,l,o)||d.push((0,xr.invalidDirectiveLocationErrorMessage)(s,o?wt.Kind.ARGUMENT:t,u)),!l.repeatable&&n.get(u)){let Q=(0,ys.getValueOrDefault)(i,s,()=>new Set);Q.has(u)||(Q.add(u),d.push((0,xr.invalidRepeatedDirectiveErrorMessage)(u,s)))}if(!((b=l.arguments)!=null&&b.length))return(x=e.arguments)!=null&&x.length&&d.push((0,xr.unexpectedDirectiveArgumentsErrorMessage)(e,s)),d;if(!((j=e.arguments)!=null&&j.length))return y.size>0&&d.push((0,xr.undefinedRequiredArgumentsErrorMessage)(u,s,[...y])),d;let N=iq(e,p,y,s,d),I=(0,ys.getEntriesNotInHashSet)(y,N);return I.length>0&&d.push((0,xr.undefinedRequiredArgumentsErrorMessage)(u,s,[...y],I)),d}function gR(e,t,n,r,i,s,o=!1){if(!e.directives)return t;let u=new Set;for(let l of e.directives){let d=sq(l,e.kind,t,r,i,s,o),p=l.name.value;if(d.length>0){n.push((0,xr.invalidDirectiveError)(p,s,d));continue}if(qt.IGNORED_PARENT_DIRECTIVES.has(p))continue;if(p===qt.KEY){let N=l.arguments[0].value.value;if(u.has(N))continue;u.add(N)}let y=t.get(p);y?y.push(l):t.set(p,[l])}return t}function $ce(e,t,n,r,i,s,o,u,l){var I;if(!((I=t.arguments)!=null&&I.length))return e;let d=t.name.value,p=`${o}.${d}`,y=`${u}.${d}`;s.add(o);let N=new Set;for(let b of t.arguments){let x=b.name.value;if(e.has(x)){N.add(x);continue}vR(e,b,r,i,`${p}(${x}: ...)`,l,n,`${y}(${x}: ...)`)}return N.size>0&&n.push((0,xr.duplicateArgumentsError)(p,[...N])),e}function IR(e){return e.kind===wt.Kind.NON_NULL_TYPE}function oq(e,t){switch(e.kind){case wt.Kind.LIST_TYPE:return t.kind===wt.Kind.LIST||t.kind===wt.Kind.NULL;case wt.Kind.NAMED_TYPE:if(t.kind===wt.Kind.NULL)return!0;switch(e.name.value){case qt.BOOLEAN_SCALAR:return t.kind===wt.Kind.BOOLEAN;case qt.FLOAT_SCALAR:return t.kind===wt.Kind.INT||t.kind===wt.Kind.FLOAT;case qt.INT_SCALAR:return t.kind===wt.Kind.INT;case qt.STRING_SCALAR:return t.kind===wt.Kind.STRING;default:return!0}case wt.Kind.NON_NULL_TYPE:return t.kind===wt.Kind.NULL?!1:oq(e.type,t)}}function qce(e,t,n){if(!e.defaultValue)return;if(!t.defaultValue){e.includeDefaultValue=!1;return}let r=(0,wt.print)(e.defaultValue),i=(0,wt.print)(t.defaultValue);if(r!==i){n.push((0,xr.incompatibleInputValueDefaultValuesError)(`${e.isArgument?qt.ARGUMENT:qt.INPUT_FIELD} "${e.name}"`,e.originalPath,[...t.subgraphNames],r,i));return}}function Kce(e,t,n,r,i,s){let o=t.name.value;e.set(o,{appearances:1,directivesByDirectiveName:gR(t,new Map,n,r,i,`${s}.${o}`),name:o,node:(0,$p.getMutableEnumValueNode)(t),parentTypeName:s,persistedDirectivesData:nI(),description:(0,zs.formatDescription)(t.description)})}function Gce(e,t){for(let n of tI.INHERITABLE_DIRECTIVE_NAMES)e.get(n)&&(0,ys.getValueOrDefault)(t,n,()=>[(0,ys.generateSimpleDirective)(n)]);return t}function Qce(e,t,n,r,i,s,o,u,l){let d=t.name.value,p=`${i}.${d}`,y=rq(t,!u,r),N={argumentDataByArgumentName:n,isExternalBySubgraphName:new Map([[o,y.isExternal]]),isInaccessible:r.has(qt.INACCESSIBLE),isShareableBySubgraphName:new Map([[o,y.isShareable]]),node:(0,$p.getMutableFieldNode)(t,p,l),name:d,namedTypeName:(0,$p.getTypeNodeNamedTypeName)(t.type),originalParentTypeName:i,persistedDirectivesData:nI(),renamedParentTypeName:s,subgraphNames:new Set([o]),type:(0,$p.getMutableTypeNode)(t.type,p,l),directivesByDirectiveName:r,description:(0,zs.formatDescription)(t.description)};return e.set(d,N),N}function vR(e,t,n,r,i,s,o,u){let l=t.name.value,d=!!u;t.defaultValue&&!oq(t.type,t.defaultValue)&&o.push((0,xr.incompatibleInputValueDefaultValueTypeError)((d?qt.ARGUMENT:qt.INPUT_FIELD)+` "${l}"`,i,(0,jce.printTypeNode)(t.type),(0,wt.print)(t.defaultValue))),e.set(l,{directivesByDirectiveName:gR(t,new Map,o,n,r,i,d),includeDefaultValue:!!t.defaultValue,isArgument:d,name:l,node:(0,$p.getMutableInputValueNode)(t,i,o),originalPath:i,persistedDirectivesData:nI(),renamedPath:u||i,requiredSubgraphNames:new Set(IR(t.type)?[s]:[]),subgraphNames:new Set([s]),type:(0,$p.getMutableTypeNode)(t.type,i,o),defaultValue:t.defaultValue,description:(0,zs.formatDescription)(t.description)})}function Yce(e,t,n,r,i,s,o){let u=t.name.value,l=new Map;for(let d of t.arguments||[]){let p=`@${u}(${d.name.value}: ...)`;vR(l,d,r,i,p,o,n,p)}e.set(u,{argumentDataByArgumentName:l,executableLocations:s,name:u,repeatable:t.repeatable,subgraphNames:new Set([o]),description:(0,zs.formatDescription)(t.description)})}function Jce(e,t){let n=new Set;for(let r of t)e.executableLocations.has(r)&&n.add(r);e.executableLocations=n}function zce(e,t){return qt.ROOT_TYPE_NAMES.has(e)||t.has(e)}function Hce(e,t){let n=t.get(e);if(!n)return e;switch(n){case wt.OperationTypeNode.MUTATION:return qt.MUTATION;case wt.OperationTypeNode.SUBSCRIPTION:return qt.SUBSCRIPTION;default:return qt.QUERY}}function Wce(e,t){let n=e.get(t.originalParentTypeName);if(!n)return;let r=n.fieldAuthorizationDataByFieldName.get(t.name);if(r){if(r.requiresAuthentication){let i=(0,ys.generateSimpleDirective)(qt.AUTHENTICATED);t.directivesByDirectiveName.set(qt.AUTHENTICATED,[i])}if(r.requiredScopes.length>0){let i=(0,ys.generateRequiresScopesDirective)(r.requiredScopes);t.directivesByDirectiveName.set(qt.REQUIRES_SCOPES,[i])}}}function Xce(e){for(let t of e.argumentDataByArgumentName.values()){for(let n of t.directivesByDirectiveName.values())t.node.directives.push(...n);e.node.arguments.push(t.node)}}function _R(e,t){let n=[];for(let r of e.values()){if(r.node.kind===wt.Kind.FIELD_DEFINITION){let i=r;Wce(t,i),Xce(i)}for(let i of r.directivesByDirectiveName.values())r.node.directives.push(...i);n.push(r.node)}return n}function qp(e,t,n,r){let i=[];for(let[s,o]of e){let u=n.get(s)||tI.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.get(s);if(!u)continue;if(!u.repeatable&&o.length>1){t.push((0,xr.invalidDirectiveError)(s,r,[(0,xr.invalidRepeatedDirectiveErrorMessage)(s,r)]));continue}if(s!==qt.KEY){i.push(...o);continue}let l=[],d=new Set,p=[];for(let y of o){let N=y.arguments[0].value;if(N.kind!==wt.Kind.STRING){p.push((0,xr.invalidKeyDirectiveArgumentErrorMessage)(N.kind));continue}let I=N.value;d.has(I)||(d.add(I),i.push(y),l.push(y))}e.set(s,l),p.length>0&&t.push((0,xr.invalidDirectiveError)(s,r,p))}return i}function Zce(e,t,n,r){return e.node.description=e.description,e.node.directives=qp(e.directivesByDirectiveName,t,n,e.name),e.node.values=_R(e.enumValueDataByValueName,r),e.node}function ele(e,t,n,r){return e.node.description=e.description,e.node.directives=qp(e.directivesByDirectiveName,t,n,e.name),e.node.fields=_R(e.inputValueDataByValueName,r),e.node}function tle(e,t,n,r){return e.node.description=e.description,e.node.directives=qp(e.directivesByDirectiveName,t,n,e.name),e.node.fields=_R(e.fieldDataByFieldName,r),e.node.interfaces=(0,zs.setToNamedTypeNodeArray)(e.implementedInterfaceTypeNames),e.node}function nle(e,t,n){return e.node.description=e.description,e.node.directives=qp(e.directivesByDirectiveName,t,n,e.name),e.node}function rle(e,t,n){return{description:e.description,directives:qp(e.directivesByDirectiveName,t,n,e.typeName),kind:e.kind,operationTypes:(0,ys.mapToArrayOfValues)(e.operationTypes)}}function ile(e,t,n){return e.node.description=e.description,e.node.directives=qp(e.directivesByDirectiveName,t,n,e.name),e.node.types=(0,ys.mapToArrayOfValues)(e.memberByMemberTypeName),e.node}function sle(e){for(let t of tI.INHERITABLE_DIRECTIVE_NAMES)e.directivesByDirectiveName.delete(t)}function ole(e,t){t.description&&(!e.description||e.description.value.length0&&e.persistedDirectivesData.directives.set(qt.REQUIRES_SCOPES,[(0,ys.generateRequiresScopesDirective)(n.requiredScopes)]))}function uq(e){return{kind:wt.Kind.DIRECTIVE,name:(0,zs.stringToNameNode)(qt.DEPRECATED),arguments:[{kind:wt.Kind.ARGUMENT,name:(0,zs.stringToNameNode)(qt.REASON),value:{kind:wt.Kind.STRING,value:e||qt.DEPRECATED_DEFAULT_ARGUMENT_VALUE}}]}}function ple(e,t,n,r){let i=[];for(let[s,o]of e){let u=t.get(s);if(u){if(o.length<2){i.push(...o);continue}if(!u.repeatable){r.push((0,xr.invalidRepeatedFederatedDirectiveErrorMessage)(s,n));continue}i.push(...o)}}return i}function bR(e,t,n){let r=[...e.persistedDirectivesData.tags.values()];return e.persistedDirectivesData.isDeprecated&&r.push(uq(e.persistedDirectivesData.deprecatedReason)),r.push(...ple(e.persistedDirectivesData.directives,t,e.name,n)),r}function ER(e){let t=[];e.persistedDirectivesData.isDeprecated&&t.push(uq(e.persistedDirectivesData.deprecatedReason));for(let[n,r]of e.persistedDirectivesData.directives)qt.PERSISTED_CLIENT_DIRECTIVES.has(n)&&t.push(r[0]);return t}function fle(e,t,n){return e.node.name=(0,zs.stringToNameNode)(e.name),e.node.description=e.description,e.node.directives=bR(e,t,n),e.node}function mle(e,t,n,r){return e.node.arguments=n,e.node.name=(0,zs.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=bR(e,t,r),e.node}function hle(e){let t=ER(e),n=[];for(let r of e.argumentDataByArgumentName.values())cq(r)||n.push(K(k({},r.node),{directives:ER(r)}));return K(k({},e.node),{directives:t,arguments:n})}function OR(e,t,n){return e.node.name=(0,zs.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=bR(e,t,n),e.includeDefaultValue&&(e.node.defaultValue=e.defaultValue),e.node}function Tle(e,t,n,r){let i=[],s=[],o=[],u=`${e.renamedParentTypeName}.${e.name}`;for(let[l,d]of e.argumentDataByArgumentName)e.subgraphNames.size===d.subgraphNames.size?(s.push(l),i.push(OR(d,t,r))):IR(d.type)&&o.push({inputValueName:l,missingSubgraphs:(0,ys.getEntriesNotInHashSet)(e.subgraphNames,d.subgraphNames),requiredSubgraphs:[...d.requiredSubgraphNames]});return o.length>0?r.push((0,xr.invalidRequiredInputValueError)(qt.FIELD,u,o)):s.length>0&&((0,ys.getValueOrDefault)(n,u,()=>({argumentNames:s,fieldName:e.name,typeName:e.renamedParentTypeName})).argumentNames=s),i}function yle(e,t,n,r,i){let s=[];for(let[o,u]of t.argumentDataByArgumentName){let l=(0,ys.getEntriesNotInHashSet)(t.subgraphNames,u.subgraphNames);if(l.length>0){u.requiredSubgraphNames.size>0&&s.push({inputValueName:o,missingSubgraphs:l,requiredSubgraphs:[...u.requiredSubgraphNames]});continue}e.push(OR(u,n,r)),i&&i.add(o)}return s.length>0?(r.push((0,xr.invalidRequiredInputValueError)(qt.DIRECTIVE_DEFINITION,`@${t.name}`,s)),!1):!0}function Nle(e,t,n,r){let i=[];yle(i,t,n,r)&&e.push({arguments:i,kind:wt.Kind.DIRECTIVE_DEFINITION,locations:(0,zs.setToNameNodeArray)(t.executableLocations),name:(0,zs.stringToNameNode)(t.name),repeatable:t.repeatable,description:t.description})}function Ele(){return{byShareable:new Set,subgraphNamesByExternalFieldName:new Map}}function gle(e,t){let n=e.isShareableBySubgraphName.size,r=[],i=0;for(let[s,o]of e.isShareableBySubgraphName){if(e.isExternalBySubgraphName.get(s)){r.push(s);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 tq;(function(e){e[e.UNION=0]="UNION",e[e.INTERSECTION=1]="INTERSECTION",e[e.CONSISTENT=2]="CONSISTENT"})(tq||(mt.MergeMethod=tq={}));function eI(e,t,n){if(e.kind===wt.Kind.NON_NULL_TYPE)return t.kind!==wt.Kind.NON_NULL_TYPE?!1:eI(e.type,t.type,n);if(t.kind===wt.Kind.NON_NULL_TYPE)return eI(e,t.type,n);switch(e.kind){case wt.Kind.NAMED_TYPE:if(t.kind===wt.Kind.NAMED_TYPE){let r=e.name.value,i=t.name.value;if(r===i)return!0;let s=n.get(r);return s?s.has(i):!1}return!1;default:return t.kind===wt.Kind.LIST_TYPE?eI(e.type,t.type,n):!1}}function cq(e){return e.persistedDirectivesData.directives.has(qt.INACCESSIBLE)||e.directivesByDirectiveName.has(qt.INACCESSIBLE)}function Ile(e){return e===wt.Kind.SCALAR_TYPE_DEFINITION||e===wt.Kind.ENUM_TYPE_DEFINITION}function vle(e){switch(e.kind){case wt.Kind.BOOLEAN:return e.value;case wt.Kind.ENUM:case wt.Kind.STRING:return e.value;case wt.Kind.FLOAT:case wt.Kind.INT:try{return parseFloat(e.value)}catch(t){return"NaN"}case wt.Kind.NULL:return null}}function _le(e){switch(e.kind){case wt.Kind.OBJECT_TYPE_DEFINITION:case wt.Kind.OBJECT_TYPE_EXTENSION:return e.renamedTypeName;default:return e.name}}var nq;(function(e){e.PROVIDES="provides",e.REQUIRES="requires"})(nq||(mt.FieldSetDirective=nq={}));function ble(){return{providedBy:[],requiredBy:[]}}});var rI=V(ql=>{"use strict";m();T();h();Object.defineProperty(ql,"__esModule",{value:!0});ql.Warning=void 0;ql.invalidOverrideTargetSubgraphNameWarning=Ole;ql.externalInterfaceFieldsWarning=Sle;ql.nonExternalConditionalFieldWarning=Dle;var lq=bi(),Gp=class extends Error{constructor(t){super(t),this.name="Warning"}};ql.Warning=Gp;function Ole(e,t,n){return new Gp(`The object type "${t}" defines the directive "@override(from: "${e})" on the following field`+(n.length>1?"s":"")+': "'+n.join(lq.QUOTATION_JOIN)+`". + ${n}`)}function xue(e,t){return t?(kue(e,t),K(k({},e),{locations:[...t.locations,...e.locations.filter(n=>!wue(n,t.locations))]})):e}Cp.mergeDirective=xue;function Cue(e,t,n){return e.concat(t.filter(r=>n(r,e)))}});var sR=V(qg=>{"use strict";m();T();h();Object.defineProperty(qg,"__esModule",{value:!0});qg.mergeEnumValues=void 0;var Uue=Ys(),Mue=_o();function Bue(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,Uue.mergeDirectives)(o.directives,l.directives,r)}else i.set(u,o)}let s=[...i.values()];return n&&n.sort&&s.sort(Mue.compareNodes),s}qg.mergeEnumValues=Bue});var oR=V(Kg=>{"use strict";m();T();h();Object.defineProperty(Kg,"__esModule",{value:!0});Kg.mergeEnum=void 0;var Vue=(we(),Me(je)),jue=Ys(),$ue=sR();function que(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,jue.mergeDirectives)(e.directives,t.directives,n,r),values:(0,$ue.mergeEnumValues)(e.values,t.values,n)}:n!=null&&n.convertExtensions?K(k({},e),{kind:Vue.Kind.ENUM_TYPE_DEFINITION}):e}Kg.mergeEnum=que});var Gg=V(gr=>{"use strict";m();T();h();Object.defineProperty(gr,"__esModule",{value:!0});gr.defaultStringComparator=gr.CompareVal=gr.printTypeNode=gr.isNonNullTypeNode=gr.isListTypeNode=gr.isWrappingTypeNode=gr.extractType=gr.isSourceTypes=gr.isStringTypes=void 0;var eT=(we(),Me(je));function Kue(e){return typeof e=="string"}gr.isStringTypes=Kue;function Gue(e){return e instanceof eT.Source}gr.isSourceTypes=Gue;function Que(e){let t=e;for(;t.kind===eT.Kind.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}gr.extractType=Que;function Yue(e){return e.kind!==eT.Kind.NAMED_TYPE}gr.isWrappingTypeNode=Yue;function G$(e){return e.kind===eT.Kind.LIST_TYPE}gr.isListTypeNode=G$;function Q$(e){return e.kind===eT.Kind.NON_NULL_TYPE}gr.isNonNullTypeNode=Q$;function aR(e){return G$(e)?`[${aR(e.type)}]`:Q$(e)?`${aR(e.type)}!`:e.name.value}gr.printTypeNode=aR;var Vl;(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"})(Vl=gr.CompareVal||(gr.CompareVal={}));function Jue(e,t){return e==null&&t==null?Vl.A_EQUALS_B:e==null?Vl.A_SMALLER_THAN_B:t==null?Vl.A_GREATER_THAN_B:et?Vl.A_GREATER_THAN_B:Vl.A_EQUALS_B}gr.defaultStringComparator=Jue});var nT=V(Qg=>{"use strict";m();T();h();Object.defineProperty(Qg,"__esModule",{value:!0});Qg.mergeFields=void 0;var Gi=Gg(),zue=Ys(),Hue=_o(),Wue=iR();function Xue(e,t){let n=e.findIndex(r=>r.name.value===t.name.value);return[n>-1?e[n]:null,n]}function Zue(e,t,n,r,i){let s=[];if(n!=null&&s.push(...n),t!=null)for(let o of t){let[u,l]=Xue(s,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)||ece(e,u,o,r==null?void 0:r.throwOnConflict);d.arguments=(0,Wue.mergeArguments)(o.arguments||[],u.arguments||[],r),d.directives=(0,zue.mergeDirectives)(o.directives,u.directives,r,i),d.description=o.description||u.description,s[l]=d}else s.push(o)}if(r&&r.sort&&s.sort(Hue.compareNodes),r&&r.exclusions){let o=r.exclusions;return s.filter(u=>!o.includes(`${e.name.value}.${u.name.value}`))}return s}Qg.mergeFields=Zue;function ece(e,t,n,r=!1){let i=(0,Gi.printTypeNode)(t.type),s=(0,Gi.printTypeNode)(n.type);if(i!==s){let o=(0,Gi.extractType)(t.type),u=(0,Gi.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(!tT(t.type,n.type,!r))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${i}' to '${s}'`)}return(0,Gi.isNonNullTypeNode)(n.type)&&!(0,Gi.isNonNullTypeNode)(t.type)&&(t.type=n.type),t}function tT(e,t,n=!1){if(!(0,Gi.isWrappingTypeNode)(e)&&!(0,Gi.isWrappingTypeNode)(t))return e.toString()===t.toString();if((0,Gi.isNonNullTypeNode)(t)){let r=(0,Gi.isNonNullTypeNode)(e)?e.type:e;return tT(r,t.type)}return(0,Gi.isNonNullTypeNode)(e)?tT(t,e,n):(0,Gi.isListTypeNode)(e)?(0,Gi.isListTypeNode)(t)&&tT(e.type,t.type)||(0,Gi.isNonNullTypeNode)(t)&&tT(e,t.type):!1}});var uR=V(Yg=>{"use strict";m();T();h();Object.defineProperty(Yg,"__esModule",{value:!0});Yg.mergeInputType=void 0;var tce=(we(),Me(je)),nce=nT(),rce=Ys();function ice(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,nce.mergeFields)(e,e.fields,t.fields,n),directives:(0,rce.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(k({},e),{kind:tce.Kind.INPUT_OBJECT_TYPE_DEFINITION}):e}Yg.mergeInputType=ice});var rT=V(Jg=>{"use strict";m();T();h();Object.defineProperty(Jg,"__esModule",{value:!0});Jg.mergeNamedTypeArray=void 0;var sce=_o();function oce(e,t){return!!e.find(n=>n.name.value===t.name.value)}function ace(e=[],t=[],n={}){let r=[...t,...e.filter(i=>!oce(t,i))];return n&&n.sort&&r.sort(sce.compareNodes),r}Jg.mergeNamedTypeArray=ace});var cR=V(zg=>{"use strict";m();T();h();Object.defineProperty(zg,"__esModule",{value:!0});zg.mergeInterface=void 0;var uce=(we(),Me(je)),cce=nT(),lce=Ys(),dce=rT();function pce(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,cce.mergeFields)(e,e.fields,t.fields,n),directives:(0,lce.mergeDirectives)(e.directives,t.directives,n,r),interfaces:e.interfaces?(0,dce.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(k({},e),{kind:uce.Kind.INTERFACE_TYPE_DEFINITION}):e}zg.mergeInterface=pce});var lR=V(Hg=>{"use strict";m();T();h();Object.defineProperty(Hg,"__esModule",{value:!0});Hg.mergeType=void 0;var fce=(we(),Me(je)),mce=nT(),hce=Ys(),Tce=rT();function yce(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,mce.mergeFields)(e,e.fields,t.fields,n),directives:(0,hce.mergeDirectives)(e.directives,t.directives,n,r),interfaces:(0,Tce.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(k({},e),{kind:fce.Kind.OBJECT_TYPE_DEFINITION}):e}Hg.mergeType=yce});var dR=V(Wg=>{"use strict";m();T();h();Object.defineProperty(Wg,"__esModule",{value:!0});Wg.mergeScalar=void 0;var Nce=(we(),Me(je)),Ece=Ys();function gce(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,Ece.mergeDirectives)(e.directives,t.directives,n,r)}:n!=null&&n.convertExtensions?K(k({},e),{kind:Nce.Kind.SCALAR_TYPE_DEFINITION}):e}Wg.mergeScalar=gce});var fR=V(Xg=>{"use strict";m();T();h();Object.defineProperty(Xg,"__esModule",{value:!0});Xg.mergeUnion=void 0;var pR=(we(),Me(je)),Ice=Ys(),vce=rT();function _ce(e,t,n,r){return t?{name:e.name,description:e.description||t.description,directives:(0,Ice.mergeDirectives)(e.directives,t.directives,n,r),kind:n!=null&&n.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?pR.Kind.UNION_TYPE_DEFINITION:pR.Kind.UNION_TYPE_EXTENSION,loc:e.loc,types:(0,vce.mergeNamedTypeArray)(e.types,t.types,n)}:n!=null&&n.convertExtensions?K(k({},e),{kind:pR.Kind.UNION_TYPE_DEFINITION}):e}Xg.mergeUnion=_ce});var mR=V(jl=>{"use strict";m();T();h();Object.defineProperty(jl,"__esModule",{value:!0});jl.mergeSchemaDefs=jl.DEFAULT_OPERATION_TYPE_NAME_MAP=void 0;var iT=(we(),Me(je)),bce=Ys();jl.DEFAULT_OPERATION_TYPE_NAME_MAP={query:"Query",mutation:"Mutation",subscription:"Subscription"};function Oce(e=[],t=[]){let n=[];for(let r in jl.DEFAULT_OPERATION_TYPE_NAME_MAP){let i=e.find(s=>s.operation===r)||t.find(s=>s.operation===r);i&&n.push(i)}return n}function Sce(e,t,n,r){return t?{kind:e.kind===iT.Kind.SCHEMA_DEFINITION||t.kind===iT.Kind.SCHEMA_DEFINITION?iT.Kind.SCHEMA_DEFINITION:iT.Kind.SCHEMA_EXTENSION,description:e.description||t.description,directives:(0,bce.mergeDirectives)(e.directives,t.directives,n,r),operationTypes:Oce(e.operationTypes,t.operationTypes)}:n!=null&&n.convertExtensions?K(k({},e),{kind:iT.Kind.SCHEMA_DEFINITION}):e}jl.mergeSchemaDefs=Sce});var hR=V(aa=>{"use strict";m();T();h();Object.defineProperty(aa,"__esModule",{value:!0});aa.mergeGraphQLNodes=aa.isNamedDefinitionNode=aa.schemaDefSymbol=void 0;var Ri=(we(),Me(je)),Dce=lR(),Ace=oR(),Rce=dR(),Fce=fR(),wce=uR(),Lce=cR(),Pce=Ys(),kce=mR(),xce=_o();aa.schemaDefSymbol="SCHEMA_DEF_SYMBOL";function Y$(e){return"name"in e}aa.isNamedDefinitionNode=Y$;function Cce(e,t,n={}){var i,s,o;let r=n;for(let u of e)if(Y$(u)){let l=(i=u.name)==null?void 0:i.value;if(t!=null&&t.commentDescriptions&&(0,xce.collectComment)(u),l==null)continue;if((s=t==null?void 0:t.exclusions)!=null&&s.includes(l+".*")||(o=t==null?void 0:t.exclusions)!=null&&o.includes(l))delete r[l];else switch(u.kind){case Ri.Kind.OBJECT_TYPE_DEFINITION:case Ri.Kind.OBJECT_TYPE_EXTENSION:r[l]=(0,Dce.mergeType)(u,r[l],t,n);break;case Ri.Kind.ENUM_TYPE_DEFINITION:case Ri.Kind.ENUM_TYPE_EXTENSION:r[l]=(0,Ace.mergeEnum)(u,r[l],t,n);break;case Ri.Kind.UNION_TYPE_DEFINITION:case Ri.Kind.UNION_TYPE_EXTENSION:r[l]=(0,Fce.mergeUnion)(u,r[l],t,n);break;case Ri.Kind.SCALAR_TYPE_DEFINITION:case Ri.Kind.SCALAR_TYPE_EXTENSION:r[l]=(0,Rce.mergeScalar)(u,r[l],t,n);break;case Ri.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Ri.Kind.INPUT_OBJECT_TYPE_EXTENSION:r[l]=(0,wce.mergeInputType)(u,r[l],t,n);break;case Ri.Kind.INTERFACE_TYPE_DEFINITION:case Ri.Kind.INTERFACE_TYPE_EXTENSION:r[l]=(0,Lce.mergeInterface)(u,r[l],t,n);break;case Ri.Kind.DIRECTIVE_DEFINITION:r[l]=(0,Pce.mergeDirective)(u,r[l]);break}}else(u.kind===Ri.Kind.SCHEMA_DEFINITION||u.kind===Ri.Kind.SCHEMA_EXTENSION)&&(r[aa.schemaDefSymbol]=(0,kce.mergeSchemaDefs)(u,r[aa.schemaDefSymbol],t));return r}aa.mergeGraphQLNodes=Cce});var H$=V(Vp=>{"use strict";m();T();h();Object.defineProperty(Vp,"__esModule",{value:!0});Vp.mergeGraphQLTypes=Vp.mergeTypeDefs=void 0;var Js=(we(),Me(je)),TR=Gg(),Up=hR(),Bp=_o(),J$=mR();function Uce(e,t){(0,Bp.resetComments)();let n={kind:Js.Kind.DOCUMENT,definitions:z$(e,k({useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1},t))},r;return t!=null&&t.commentDescriptions?r=(0,Bp.printWithComments)(n):r=n,(0,Bp.resetComments)(),r}Vp.mergeTypeDefs=Uce;function Mp(e,t,n=[],r=[],i=new Set){if(e&&!i.has(e))if(i.add(e),typeof e=="function")Mp(e(),t,n,r,i);else if(Array.isArray(e))for(let s of e)Mp(s,t,n,r,i);else if((0,Js.isSchema)(e)){let s=(0,Bp.getDocumentNodeFromSchema)(e,t);Mp(s.definitions,t,n,r,i)}else if((0,TR.isStringTypes)(e)||(0,TR.isSourceTypes)(e)){let s=(0,Js.parse)(e,t);Mp(s.definitions,t,n,r,i)}else if(typeof e=="object"&&(0,Js.isDefinitionNode)(e))e.kind===Js.Kind.DIRECTIVE_DEFINITION?n.push(e):r.push(e);else if((0,Bp.isDocumentNode)(e))Mp(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 z$(e,t){var u,l,d;(0,Bp.resetComments)();let{allDirectives:n,allNodes:r}=Mp(e,t),i=(0,Up.mergeGraphQLNodes)(n,t),s=(0,Up.mergeGraphQLNodes)(r,t,i);if(t!=null&&t.useSchemaDefinition){let p=s[Up.schemaDefSymbol]||{kind:Js.Kind.SCHEMA_DEFINITION,operationTypes:[]},y=p.operationTypes;for(let N in J$.DEFAULT_OPERATION_TYPE_NAME_MAP)if(!y.find(_=>_.operation===N)){let _=J$.DEFAULT_OPERATION_TYPE_NAME_MAP[N],C=s[_];C!=null&&C.name!=null&&y.push({kind:Js.Kind.OPERATION_TYPE_DEFINITION,type:{kind:Js.Kind.NAMED_TYPE,name:C.name},operation:N})}((u=p==null?void 0:p.operationTypes)==null?void 0:u.length)!=null&&p.operationTypes.length>0&&(s[Up.schemaDefSymbol]=p)}t!=null&&t.forceSchemaDefinition&&!((d=(l=s[Up.schemaDefSymbol])==null?void 0:l.operationTypes)!=null&&d.length)&&(s[Up.schemaDefSymbol]={kind:Js.Kind.SCHEMA_DEFINITION,operationTypes:[{kind:Js.Kind.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:Js.Kind.NAMED_TYPE,name:{kind:Js.Kind.NAME,value:"Query"}}}]});let o=Object.values(s);if(t!=null&&t.sort){let p=typeof t.sort=="function"?t.sort:TR.defaultStringComparator;o.sort((y,N)=>{var I,_;return p((I=y.name)==null?void 0:I.value,(_=N.name)==null?void 0:_.value)})}return o}Vp.mergeGraphQLTypes=z$});var W$=V(fi=>{"use strict";m();T();h();Object.defineProperty(fi,"__esModule",{value:!0});var Qi=(oA(),Me(sA));Qi.__exportStar(iR(),fi);Qi.__exportStar(Ys(),fi);Qi.__exportStar(sR(),fi);Qi.__exportStar(oR(),fi);Qi.__exportStar(nT(),fi);Qi.__exportStar(uR(),fi);Qi.__exportStar(cR(),fi);Qi.__exportStar(rT(),fi);Qi.__exportStar(hR(),fi);Qi.__exportStar(H$(),fi);Qi.__exportStar(dR(),fi);Qi.__exportStar(lR(),fi);Qi.__exportStar(fR(),fi);Qi.__exportStar(Gg(),fi)});var Z$=V(Rc=>{"use strict";m();T();h();Object.defineProperty(Rc,"__esModule",{value:!0});Rc.applyExtensions=Rc.mergeExtensions=Rc.extractExtensionsFromSchema=void 0;var X$=_o(),Mce=_o();Object.defineProperty(Rc,"extractExtensionsFromSchema",{enumerable:!0,get:function(){return Mce.extractExtensionsFromSchema}});function Bce(e){return(0,X$.mergeDeep)(e)}Rc.mergeExtensions=Bce;function jp(e,t){e&&(e.extensions=(0,X$.mergeDeep)([e.extensions||{},t||{}]))}function Vce(e,t){jp(e,t.schemaExtensions);for(let[n,r]of Object.entries(t.types||{})){let i=e.getType(n);if(i){if(jp(i,r.extensions),r.type==="object"||r.type==="interface")for(let[s,o]of Object.entries(r.fields)){let u=i.getFields()[s];if(u){jp(u,o.extensions);for(let[l,d]of Object.entries(o.arguments))jp(u.args.find(p=>p.name===l),d)}}else if(r.type==="input")for(let[s,o]of Object.entries(r.fields)){let u=i.getFields()[s];jp(u,o.extensions)}else if(r.type==="enum")for(let[s,o]of Object.entries(r.values)){let u=i.getValue(s);jp(u,o)}}}return e}Rc.applyExtensions=Vce});var Zg=V(sT=>{"use strict";m();T();h();Object.defineProperty(sT,"__esModule",{value:!0});var yR=(oA(),Me(sA));yR.__exportStar(V$(),sT);yR.__exportStar(W$(),sT);yR.__exportStar(Z$(),sT)});var Kp=V(mt=>{"use strict";m();T();h();Object.defineProperty(mt,"__esModule",{value:!0});mt.FieldSetDirective=mt.MergeMethod=void 0;mt.newPersistedDirectivesData=nI;mt.isNodeExternalOrShareable=rq;mt.getDefinedArgumentsForDirective=iq;mt.getDirectiveValidationErrors=sq;mt.extractDirectives=gR;mt.extractArguments=$ce;mt.isTypeRequired=IR;mt.compareAndValidateInputValueDefaultValues=qce;mt.addEnumValueDataByNode=Kce;mt.addInheritedDirectivesToFieldData=Gce;mt.addFieldDataByNode=Qce;mt.addInputValueDataByNode=vR;mt.addPersistedDirectiveDefinitionDataByNode=Yce;mt.setMutualExecutableLocations=Jce;mt.isTypeNameRootType=zce;mt.getRenamedRootTypeName=Hce;mt.getEnumNodeByData=Zce;mt.getInputObjectNodeByData=ele;mt.getCompositeOutputNodeByData=tle;mt.getScalarNodeByData=nle;mt.getSchemaNodeByData=rle;mt.getUnionNodeByData=ile;mt.removeInheritableDirectivesFromParentWithFieldsData=sle;mt.setLongestDescription=ole;mt.isParentDataRootType=aq;mt.setParentDataExtensionType=ale;mt.extractPersistedDirectives=lle;mt.pushAuthorizationDirectives=dle;mt.getClientPersistedDirectiveNodes=ER;mt.getNodeForRouterSchemaByData=fle;mt.getNodeWithPersistedDirectivesByFieldData=mle;mt.getClientSchemaFieldNodeByFieldData=hle;mt.getNodeWithPersistedDirectivesByInputValueData=OR;mt.getValidFieldArgumentNodes=Tle;mt.addValidPersistedDirectiveDefinitionNodeByData=Nle;mt.newInvalidFieldNames=Ele;mt.validateExternalAndShareable=gle;mt.isTypeValidImplementation=eI;mt.isNodeDataInaccessible=cq;mt.isLeafKind=Ile;mt.getSubscriptionFilterValue=vle;mt.getParentTypeName=_le;mt.newConditionalFieldData=ble;var wt=(we(),Me(je)),NR=$h(),$p=$a(),zs=Vi(),xr=To(),qt=bi(),eq=$l(),ys=ps(),tI=_c(),jce=Zg();function nI(){return{deprecatedReason:"",directives:new Map,isDeprecated:!1,tags:new Map}}function rq(e,t,n){var i;let r={isExternal:n.has(qt.EXTERNAL),isShareable:t||n.has(qt.SHAREABLE)};if(!((i=e.directives)!=null&&i.length))return r;for(let s of e.directives){let o=s.name.value;if(o===qt.EXTERNAL){r.isExternal=!0;continue}o===qt.SHAREABLE&&(r.isShareable=!0)}return r}function iq(e,t,n,r,i){let s=e.arguments||[],o=e.name.value,u=new Set,l=new Set,d=new Set;for(let p of s){let y=p.name.value;if(u.has(y)){l.add(y);continue}if(!t.get(y)){d.add(y);continue}u.add(y)}return l.size>0&&i.push((0,xr.duplicateDirectiveArgumentDefinitionsErrorMessage)(o,r,[...l])),d.size>0&&i.push((0,xr.unexpectedDirectiveArgumentErrorMessage)(o,[...d])),u}function sq(e,t,n,r,i,s,o=!1){var _,C,j;let u=e.name.value,l=r.get(u)||tI.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.get(u),d=[];if(!l)return d.push((0,xr.undefinedDirectiveErrorMessage)(u,s)),d;let p=new Map,y=new Set;if((0,eq.getDirectiveDefinitionArgumentSets)(l.arguments||[],p,y),(0,eq.areNodeKindAndDirectiveLocationCompatible)(t,l,o)||d.push((0,xr.invalidDirectiveLocationErrorMessage)(s,o?wt.Kind.ARGUMENT:t,u)),!l.repeatable&&n.get(u)){let Q=(0,ys.getValueOrDefault)(i,s,()=>new Set);Q.has(u)||(Q.add(u),d.push((0,xr.invalidRepeatedDirectiveErrorMessage)(u,s)))}if(!((_=l.arguments)!=null&&_.length))return(C=e.arguments)!=null&&C.length&&d.push((0,xr.unexpectedDirectiveArgumentsErrorMessage)(e,s)),d;if(!((j=e.arguments)!=null&&j.length))return y.size>0&&d.push((0,xr.undefinedRequiredArgumentsErrorMessage)(u,s,[...y])),d;let N=iq(e,p,y,s,d),I=(0,ys.getEntriesNotInHashSet)(y,N);return I.length>0&&d.push((0,xr.undefinedRequiredArgumentsErrorMessage)(u,s,[...y],I)),d}function gR(e,t,n,r,i,s,o=!1){if(!e.directives)return t;let u=new Set;for(let l of e.directives){let d=sq(l,e.kind,t,r,i,s,o),p=l.name.value;if(d.length>0){n.push((0,xr.invalidDirectiveError)(p,s,d));continue}if(qt.IGNORED_PARENT_DIRECTIVES.has(p))continue;if(p===qt.KEY){let N=l.arguments[0].value.value;if(u.has(N))continue;u.add(N)}let y=t.get(p);y?y.push(l):t.set(p,[l])}return t}function $ce(e,t,n,r,i,s,o,u,l){var I;if(!((I=t.arguments)!=null&&I.length))return e;let d=t.name.value,p=`${o}.${d}`,y=`${u}.${d}`;s.add(o);let N=new Set;for(let _ of t.arguments){let C=_.name.value;if(e.has(C)){N.add(C);continue}vR(e,_,r,i,`${p}(${C}: ...)`,l,n,`${y}(${C}: ...)`)}return N.size>0&&n.push((0,xr.duplicateArgumentsError)(p,[...N])),e}function IR(e){return e.kind===wt.Kind.NON_NULL_TYPE}function oq(e,t){switch(e.kind){case wt.Kind.LIST_TYPE:return t.kind===wt.Kind.LIST||t.kind===wt.Kind.NULL;case wt.Kind.NAMED_TYPE:if(t.kind===wt.Kind.NULL)return!0;switch(e.name.value){case qt.BOOLEAN_SCALAR:return t.kind===wt.Kind.BOOLEAN;case qt.FLOAT_SCALAR:return t.kind===wt.Kind.INT||t.kind===wt.Kind.FLOAT;case qt.INT_SCALAR:return t.kind===wt.Kind.INT;case qt.STRING_SCALAR:return t.kind===wt.Kind.STRING;default:return!0}case wt.Kind.NON_NULL_TYPE:return t.kind===wt.Kind.NULL?!1:oq(e.type,t)}}function qce(e,t,n){if(!e.defaultValue)return;if(!t.defaultValue){e.includeDefaultValue=!1;return}let r=(0,wt.print)(e.defaultValue),i=(0,wt.print)(t.defaultValue);if(r!==i){n.push((0,xr.incompatibleInputValueDefaultValuesError)(`${e.isArgument?qt.ARGUMENT:qt.INPUT_FIELD} "${e.name}"`,e.originalPath,[...t.subgraphNames],r,i));return}}function Kce(e,t,n,r,i,s){let o=t.name.value;e.set(o,{appearances:1,directivesByDirectiveName:gR(t,new Map,n,r,i,`${s}.${o}`),name:o,node:(0,$p.getMutableEnumValueNode)(t),parentTypeName:s,persistedDirectivesData:nI(),description:(0,zs.formatDescription)(t.description)})}function Gce(e,t){for(let n of tI.INHERITABLE_DIRECTIVE_NAMES)e.get(n)&&(0,ys.getValueOrDefault)(t,n,()=>[(0,ys.generateSimpleDirective)(n)]);return t}function Qce(e,t,n,r,i,s,o,u,l){let d=t.name.value,p=`${i}.${d}`,y=rq(t,!u,r),N={argumentDataByArgumentName:n,isExternalBySubgraphName:new Map([[o,y.isExternal]]),isInaccessible:r.has(qt.INACCESSIBLE),isShareableBySubgraphName:new Map([[o,y.isShareable]]),node:(0,$p.getMutableFieldNode)(t,p,l),name:d,namedTypeName:(0,$p.getTypeNodeNamedTypeName)(t.type),originalParentTypeName:i,persistedDirectivesData:nI(),renamedParentTypeName:s,subgraphNames:new Set([o]),type:(0,$p.getMutableTypeNode)(t.type,p,l),directivesByDirectiveName:r,description:(0,zs.formatDescription)(t.description)};return e.set(d,N),N}function vR(e,t,n,r,i,s,o,u){let l=t.name.value,d=!!u;t.defaultValue&&!oq(t.type,t.defaultValue)&&o.push((0,xr.incompatibleInputValueDefaultValueTypeError)((d?qt.ARGUMENT:qt.INPUT_FIELD)+` "${l}"`,i,(0,jce.printTypeNode)(t.type),(0,wt.print)(t.defaultValue))),e.set(l,{directivesByDirectiveName:gR(t,new Map,o,n,r,i,d),includeDefaultValue:!!t.defaultValue,isArgument:d,name:l,node:(0,$p.getMutableInputValueNode)(t,i,o),originalPath:i,persistedDirectivesData:nI(),renamedPath:u||i,requiredSubgraphNames:new Set(IR(t.type)?[s]:[]),subgraphNames:new Set([s]),type:(0,$p.getMutableTypeNode)(t.type,i,o),defaultValue:t.defaultValue,description:(0,zs.formatDescription)(t.description)})}function Yce(e,t,n,r,i,s,o){let u=t.name.value,l=new Map;for(let d of t.arguments||[]){let p=`@${u}(${d.name.value}: ...)`;vR(l,d,r,i,p,o,n,p)}e.set(u,{argumentDataByArgumentName:l,executableLocations:s,name:u,repeatable:t.repeatable,subgraphNames:new Set([o]),description:(0,zs.formatDescription)(t.description)})}function Jce(e,t){let n=new Set;for(let r of t)e.executableLocations.has(r)&&n.add(r);e.executableLocations=n}function zce(e,t){return qt.ROOT_TYPE_NAMES.has(e)||t.has(e)}function Hce(e,t){let n=t.get(e);if(!n)return e;switch(n){case wt.OperationTypeNode.MUTATION:return qt.MUTATION;case wt.OperationTypeNode.SUBSCRIPTION:return qt.SUBSCRIPTION;default:return qt.QUERY}}function Wce(e,t){let n=e.get(t.originalParentTypeName);if(!n)return;let r=n.fieldAuthorizationDataByFieldName.get(t.name);if(r){if(r.requiresAuthentication){let i=(0,ys.generateSimpleDirective)(qt.AUTHENTICATED);t.directivesByDirectiveName.set(qt.AUTHENTICATED,[i])}if(r.requiredScopes.length>0){let i=(0,ys.generateRequiresScopesDirective)(r.requiredScopes);t.directivesByDirectiveName.set(qt.REQUIRES_SCOPES,[i])}}}function Xce(e){for(let t of e.argumentDataByArgumentName.values()){for(let n of t.directivesByDirectiveName.values())t.node.directives.push(...n);e.node.arguments.push(t.node)}}function _R(e,t){let n=[];for(let r of e.values()){if(r.node.kind===wt.Kind.FIELD_DEFINITION){let i=r;Wce(t,i),Xce(i)}for(let i of r.directivesByDirectiveName.values())r.node.directives.push(...i);n.push(r.node)}return n}function qp(e,t,n,r){let i=[];for(let[s,o]of e){let u=n.get(s)||tI.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.get(s);if(!u)continue;if(!u.repeatable&&o.length>1){t.push((0,xr.invalidDirectiveError)(s,r,[(0,xr.invalidRepeatedDirectiveErrorMessage)(s,r)]));continue}if(s!==qt.KEY){i.push(...o);continue}let l=[],d=new Set,p=[];for(let y of o){let N=y.arguments[0].value;if(N.kind!==wt.Kind.STRING){p.push((0,xr.invalidKeyDirectiveArgumentErrorMessage)(N.kind));continue}let I=N.value;d.has(I)||(d.add(I),i.push(y),l.push(y))}e.set(s,l),p.length>0&&t.push((0,xr.invalidDirectiveError)(s,r,p))}return i}function Zce(e,t,n,r){return e.node.description=e.description,e.node.directives=qp(e.directivesByDirectiveName,t,n,e.name),e.node.values=_R(e.enumValueDataByValueName,r),e.node}function ele(e,t,n,r){return e.node.description=e.description,e.node.directives=qp(e.directivesByDirectiveName,t,n,e.name),e.node.fields=_R(e.inputValueDataByValueName,r),e.node}function tle(e,t,n,r){return e.node.description=e.description,e.node.directives=qp(e.directivesByDirectiveName,t,n,e.name),e.node.fields=_R(e.fieldDataByFieldName,r),e.node.interfaces=(0,zs.setToNamedTypeNodeArray)(e.implementedInterfaceTypeNames),e.node}function nle(e,t,n){return e.node.description=e.description,e.node.directives=qp(e.directivesByDirectiveName,t,n,e.name),e.node}function rle(e,t,n){return{description:e.description,directives:qp(e.directivesByDirectiveName,t,n,e.typeName),kind:e.kind,operationTypes:(0,ys.mapToArrayOfValues)(e.operationTypes)}}function ile(e,t,n){return e.node.description=e.description,e.node.directives=qp(e.directivesByDirectiveName,t,n,e.name),e.node.types=(0,ys.mapToArrayOfValues)(e.memberByMemberTypeName),e.node}function sle(e){for(let t of tI.INHERITABLE_DIRECTIVE_NAMES)e.directivesByDirectiveName.delete(t)}function ole(e,t){t.description&&(!e.description||e.description.value.length0&&e.persistedDirectivesData.directives.set(qt.REQUIRES_SCOPES,[(0,ys.generateRequiresScopesDirective)(n.requiredScopes)]))}function uq(e){return{kind:wt.Kind.DIRECTIVE,name:(0,zs.stringToNameNode)(qt.DEPRECATED),arguments:[{kind:wt.Kind.ARGUMENT,name:(0,zs.stringToNameNode)(qt.REASON),value:{kind:wt.Kind.STRING,value:e||qt.DEPRECATED_DEFAULT_ARGUMENT_VALUE}}]}}function ple(e,t,n,r){let i=[];for(let[s,o]of e){let u=t.get(s);if(u){if(o.length<2){i.push(...o);continue}if(!u.repeatable){r.push((0,xr.invalidRepeatedFederatedDirectiveErrorMessage)(s,n));continue}i.push(...o)}}return i}function bR(e,t,n){let r=[...e.persistedDirectivesData.tags.values()];return e.persistedDirectivesData.isDeprecated&&r.push(uq(e.persistedDirectivesData.deprecatedReason)),r.push(...ple(e.persistedDirectivesData.directives,t,e.name,n)),r}function ER(e){let t=[];e.persistedDirectivesData.isDeprecated&&t.push(uq(e.persistedDirectivesData.deprecatedReason));for(let[n,r]of e.persistedDirectivesData.directives)qt.PERSISTED_CLIENT_DIRECTIVES.has(n)&&t.push(r[0]);return t}function fle(e,t,n){return e.node.name=(0,zs.stringToNameNode)(e.name),e.node.description=e.description,e.node.directives=bR(e,t,n),e.node}function mle(e,t,n,r){return e.node.arguments=n,e.node.name=(0,zs.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=bR(e,t,r),e.node}function hle(e){let t=ER(e),n=[];for(let r of e.argumentDataByArgumentName.values())cq(r)||n.push(K(k({},r.node),{directives:ER(r)}));return K(k({},e.node),{directives:t,arguments:n})}function OR(e,t,n){return e.node.name=(0,zs.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=bR(e,t,n),e.includeDefaultValue&&(e.node.defaultValue=e.defaultValue),e.node}function Tle(e,t,n,r){let i=[],s=[],o=[],u=`${e.renamedParentTypeName}.${e.name}`;for(let[l,d]of e.argumentDataByArgumentName)e.subgraphNames.size===d.subgraphNames.size?(s.push(l),i.push(OR(d,t,r))):IR(d.type)&&o.push({inputValueName:l,missingSubgraphs:(0,ys.getEntriesNotInHashSet)(e.subgraphNames,d.subgraphNames),requiredSubgraphs:[...d.requiredSubgraphNames]});return o.length>0?r.push((0,xr.invalidRequiredInputValueError)(qt.FIELD,u,o)):s.length>0&&((0,ys.getValueOrDefault)(n,u,()=>({argumentNames:s,fieldName:e.name,typeName:e.renamedParentTypeName})).argumentNames=s),i}function yle(e,t,n,r,i){let s=[];for(let[o,u]of t.argumentDataByArgumentName){let l=(0,ys.getEntriesNotInHashSet)(t.subgraphNames,u.subgraphNames);if(l.length>0){u.requiredSubgraphNames.size>0&&s.push({inputValueName:o,missingSubgraphs:l,requiredSubgraphs:[...u.requiredSubgraphNames]});continue}e.push(OR(u,n,r)),i&&i.add(o)}return s.length>0?(r.push((0,xr.invalidRequiredInputValueError)(qt.DIRECTIVE_DEFINITION,`@${t.name}`,s)),!1):!0}function Nle(e,t,n,r){let i=[];yle(i,t,n,r)&&e.push({arguments:i,kind:wt.Kind.DIRECTIVE_DEFINITION,locations:(0,zs.setToNameNodeArray)(t.executableLocations),name:(0,zs.stringToNameNode)(t.name),repeatable:t.repeatable,description:t.description})}function Ele(){return{byShareable:new Set,subgraphNamesByExternalFieldName:new Map}}function gle(e,t){let n=e.isShareableBySubgraphName.size,r=[],i=0;for(let[s,o]of e.isShareableBySubgraphName){if(e.isExternalBySubgraphName.get(s)){r.push(s);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 tq;(function(e){e[e.UNION=0]="UNION",e[e.INTERSECTION=1]="INTERSECTION",e[e.CONSISTENT=2]="CONSISTENT"})(tq||(mt.MergeMethod=tq={}));function eI(e,t,n){if(e.kind===wt.Kind.NON_NULL_TYPE)return t.kind!==wt.Kind.NON_NULL_TYPE?!1:eI(e.type,t.type,n);if(t.kind===wt.Kind.NON_NULL_TYPE)return eI(e,t.type,n);switch(e.kind){case wt.Kind.NAMED_TYPE:if(t.kind===wt.Kind.NAMED_TYPE){let r=e.name.value,i=t.name.value;if(r===i)return!0;let s=n.get(r);return s?s.has(i):!1}return!1;default:return t.kind===wt.Kind.LIST_TYPE?eI(e.type,t.type,n):!1}}function cq(e){return e.persistedDirectivesData.directives.has(qt.INACCESSIBLE)||e.directivesByDirectiveName.has(qt.INACCESSIBLE)}function Ile(e){return e===wt.Kind.SCALAR_TYPE_DEFINITION||e===wt.Kind.ENUM_TYPE_DEFINITION}function vle(e){switch(e.kind){case wt.Kind.BOOLEAN:return e.value;case wt.Kind.ENUM:case wt.Kind.STRING:return e.value;case wt.Kind.FLOAT:case wt.Kind.INT:try{return parseFloat(e.value)}catch(t){return"NaN"}case wt.Kind.NULL:return null}}function _le(e){switch(e.kind){case wt.Kind.OBJECT_TYPE_DEFINITION:case wt.Kind.OBJECT_TYPE_EXTENSION:return e.renamedTypeName;default:return e.name}}var nq;(function(e){e.PROVIDES="provides",e.REQUIRES="requires"})(nq||(mt.FieldSetDirective=nq={}));function ble(){return{providedBy:[],requiredBy:[]}}});var rI=V(ql=>{"use strict";m();T();h();Object.defineProperty(ql,"__esModule",{value:!0});ql.Warning=void 0;ql.invalidOverrideTargetSubgraphNameWarning=Ole;ql.externalInterfaceFieldsWarning=Sle;ql.nonExternalConditionalFieldWarning=Dle;var lq=bi(),Gp=class extends Error{constructor(t){super(t),this.name="Warning"}};ql.Warning=Gp;function Ole(e,t,n){return new Gp(`The object type "${t}" defines the directive "@override(from: "${e})" on the following field`+(n.length>1?"s":"")+': "'+n.join(lq.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.`)}function dq(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: @@ -641,15 +641,15 @@ If this subgraph has been recently deleted, remember to clean up unused @overrid 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 Dle(e,t,n,r,i){return new Gp(dq(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.`)}});var $l=V(Hs=>{"use strict";m();T();h();Object.defineProperty(Hs,"__esModule",{value:!0});Hs.newKeyFieldSetData=Rle;Hs.newFieldSetData=Fle;Hs.areNodeKindAndDirectiveLocationCompatible=wle;Hs.getDirectiveDefinitionArgumentSets=Lle;Hs.addFieldNamesToConfigurationData=Ple;Hs.extractFieldSetValue=kle;Hs.getNormalizedFieldSet=SR;Hs.validateKeyFieldSets=Ule;Hs.validateAndAddConditionalFieldSetsToConfiguration=Ble;Hs.isNodeQuery=Vle;var Le=(we(),Me(je)),Yi=ps(),oT=Vi(),Wn=bi(),Kt=To(),mq=_c(),pq=nA(),aT=$a(),ua=Kp(),Ale=rI();function Rle(){return{isUnresolvableByKeyFieldSet:new Map}}function Fle(){return{provides:new Map,requires:new Map}}function wle(e,t,n=!1){for(let r of t.locations){let i=r.value.toUpperCase();switch(i){case Wn.ARGUMENT_DEFINITION_UPPER:if(!n)break;if(e===Le.Kind.INPUT_VALUE_DEFINITION)return!0;break;case Wn.ENUM_UPPER:if(e===Le.Kind.ENUM_TYPE_DEFINITION||e===Le.Kind.ENUM_TYPE_EXTENSION)return!0;break;case Wn.ENUM_VALUE_UPPER:if(e===Le.Kind.ENUM_VALUE_DEFINITION)return!0;break;case Wn.FIELD_UPPER:if(e===Le.Kind.FIELD)return!0;break;case Wn.FIELD_DEFINITION_UPPER:if(e===Le.Kind.FIELD_DEFINITION)return!0;break;case Wn.INLINE_FRAGMENT_UPPER:if(e===Le.Kind.INLINE_FRAGMENT)return!0;break;case Wn.INPUT_FIELD_DEFINITION_UPPER:if(e===Le.Kind.INPUT_VALUE_DEFINITION)return!0;break;case Wn.INPUT_OBJECT_UPPER:if(e===Le.Kind.INPUT_OBJECT_TYPE_DEFINITION||e===Le.Kind.INPUT_OBJECT_TYPE_EXTENSION)return!0;break;case Wn.INTERFACE_UPPER:if(e===Le.Kind.INTERFACE_TYPE_DEFINITION||e===Le.Kind.INTERFACE_TYPE_EXTENSION)return!0;break;case Wn.OBJECT_UPPER:if(e===Le.Kind.OBJECT_TYPE_DEFINITION||e===Le.Kind.OBJECT_TYPE_EXTENSION)return!0;break;case Wn.FRAGMENT_DEFINITION_UPPER:if(e===Le.Kind.FRAGMENT_DEFINITION)return!0;break;case Wn.FRAGMENT_SPREAD_UPPER:if(e===Le.Kind.FRAGMENT_SPREAD)return!0;break;case Wn.SCALAR_UPPER:if(e===Le.Kind.SCALAR_TYPE_DEFINITION||e===Le.Kind.SCALAR_TYPE_EXTENSION)return!0;break;case Wn.SCHEMA_UPPER:if(e===Le.Kind.SCHEMA_DEFINITION||e===Le.Kind.SCHEMA_EXTENSION)return!0;break;case Wn.UNION_UPPER:if(e===Le.Kind.UNION_TYPE_DEFINITION||e===Le.Kind.UNION_TYPE_EXTENSION)return!0;break;case Wn.VARIABLE_DEFINITION_UPPER:if(e===Le.Kind.VARIABLE_DEFINITION)return!0;break;case Wn.QUERY_UPPER:case Wn.MUTATION_UPPER:case Wn.SUBSCRIPTION_UPPER:if(e===Le.Kind.OPERATION_DEFINITION)return!0;break;default:throw(0,Kt.unexpectedDirectiveLocationError)(i)}}return!1}function Lle(e,t,n){for(let r of e){let i=r.name.value;t.set(i,r.type),r.type.kind===Le.Kind.NON_NULL_TYPE&&!r.defaultValue&&n.add(i)}}function Ple(e,t){let n=new Set;for(let[r,i]of e)i.directivesByDirectiveName.has(Wn.EXTERNAL)?t.externalFieldNames?t.externalFieldNames.add(r):n.add(r):t.fieldNames.add(r);n.size>0&&(t.externalFieldNames=n)}function kle(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!==Wn.FIELDS||i.value.kind!==Le.Kind.STRING||t.set(e,i.value.value)}function SR(e){return(0,Le.print)((0,oT.lexicographicallySortDocumentNode)(e)).replaceAll(/\s+/g," ").slice(2,-2)}function xle(e,t,n){switch(e){case ua.FieldSetDirective.PROVIDES:return[`${t}.${n}`];default:return[]}}function Cle(e,t,n,r,i,s){let{error:o,documentNode:u}=(0,oT.safeParse)("{"+n+"}");if(o||!u)return{errorMessage:(0,Kt.unparsableFieldSetErrorMessage)(n,o)};let l=[t],d=[],p=xle(i,s,r),y=[r],N=new Set,I,b=-1,x=!0,j=r;return(0,Le.visit)(u,{Argument:{enter(){return!1}},Field:{enter(Q){let re=l[b],se=re.name;if(re.kind===Le.Kind.UNION_TYPE_DEFINITION)return I=(0,Kt.invalidSelectionOnUnionErrorMessage)(n,p,se),Le.BREAK;if(x)return I=(0,Kt.invalidSelectionSetErrorMessage)(n,p,se,(0,Yi.kindToTypeString)(re.kind)),Le.BREAK;let pe=Q.name.value,ye=`${se}.${pe}`;p.push(ye),y.push(pe),j=pe;let Ce=re.fieldDataByFieldName.get(pe);if(!Ce)return I=(0,Kt.undefinedFieldInFieldSetErrorMessage)(n,se,pe),Le.BREAK;if(d[b].has(pe))return I=(0,Kt.duplicateFieldInFieldSetErrorMessage)(n,ye),Le.BREAK;d[b].add(pe);let ht=Ce.isExternalBySubgraphName.get(e.subgraphName),xt=(0,aT.getTypeNodeNamedTypeName)(Ce.node.type),B=e.parentDefinitionDataByTypeName.get(xt);if(mq.BASE_SCALARS.has(xt)||(B==null?void 0:B.kind)===Le.Kind.SCALAR_TYPE_DEFINITION||(B==null?void 0:B.kind)===Le.Kind.ENUM_TYPE_DEFINITION){if(N.size<1&&!ht){e.isSubgraphVersionTwo?e.errors.push((0,Kt.nonExternalConditionalFieldError)(`${s}.${r}`,e.subgraphName,ye,n,i)):e.warnings.push((0,Ale.nonExternalConditionalFieldWarning)(`${s}.${r}`,e.subgraphName,ye,n,i));return}let he=(0,Yi.getValueOrDefault)(e.conditionalFieldDataByCoordinates,ye,ua.newConditionalFieldData),nt=(0,pq.newFieldSetConditionData)({fieldCoordinatesPath:[...p],fieldPath:[...y]});i===ua.FieldSetDirective.PROVIDES?he.providedBy.push(nt):he.requiredBy.push(nt);return}if(!B)return I=(0,Kt.unknownTypeInFieldSetErrorMessage)(n,ye,xt),Le.BREAK;if(ht){let he=(0,Yi.getValueOrDefault)(e.conditionalFieldDataByCoordinates,ye,ua.newConditionalFieldData);switch(i){case ua.FieldSetDirective.PROVIDES:he.providedBy.push((0,pq.newFieldSetConditionData)({fieldCoordinatesPath:[...p],fieldPath:[...y]}));break;default:break}N.add(ye)}if(B.kind===Le.Kind.OBJECT_TYPE_DEFINITION||B.kind===Le.Kind.INTERFACE_TYPE_DEFINITION||B.kind===Le.Kind.UNION_TYPE_DEFINITION){x=!0,l.push(B);return}},leave(){N.delete(p.pop()||""),y.pop()}},InlineFragment:{enter(Q){let re=l[b],se=re.name,pe=p.length<1?t.name:p[p.length-1];if(!Q.typeCondition)return I=(0,Kt.inlineFragmentWithoutTypeConditionErrorMessage)(n,pe),Le.BREAK;let ye=Q.typeCondition.name.value;if(ye===se){l.push(re),x=!0;return}if(!(0,oT.isKindAbstract)(re.kind))return I=(0,Kt.invalidInlineFragmentTypeErrorMessage)(n,p,ye,se),Le.BREAK;let Ce=e.parentDefinitionDataByTypeName.get(ye);if(!Ce)return I=(0,Kt.unknownInlineFragmentTypeConditionErrorMessage)(n,p,se,ye),Le.BREAK;switch(x=!0,Ce.kind){case Le.Kind.INTERFACE_TYPE_DEFINITION:{if(!Ce.implementedInterfaceTypeNames.has(se))break;l.push(Ce);return}case Le.Kind.OBJECT_TYPE_DEFINITION:{let ht=e.concreteTypeNamesByAbstractTypeName.get(se);if(!ht||!ht.has(ye))break;l.push(Ce);return}case Le.Kind.UNION_TYPE_DEFINITION:{l.push(Ce);return}default:return I=(0,Kt.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,p,se,ye,(0,Yi.kindToTypeString)(Ce.kind)),Le.BREAK}return I=(0,Kt.invalidInlineFragmentTypeConditionErrorMessage)(n,p,ye,(0,Yi.kindToTypeString)(re.kind),se),Le.BREAK}},SelectionSet:{enter(){if(!x){let Q=l[b];if(Q.kind===Le.Kind.UNION_TYPE_DEFINITION)return I=(0,Kt.unparsableFieldSetSelectionErrorMessage)(n,j),Le.BREAK;let re=Q.fieldDataByFieldName.get(j);if(!re)return I=(0,Kt.undefinedFieldInFieldSetErrorMessage)(n,Q.name,j),Le.BREAK;let se=(0,aT.getTypeNodeNamedTypeName)(re.node.type),pe=e.parentDefinitionDataByTypeName.get(se),ye=pe?pe.kind:Le.Kind.SCALAR_TYPE_DEFINITION;return I=(0,Kt.invalidSelectionSetDefinitionErrorMessage)(n,p,se,(0,Yi.kindToTypeString)(ye)),Le.BREAK}if(b+=1,x=!1,b<0||b>=l.length)return I=(0,Kt.unparsableFieldSetSelectionErrorMessage)(n,j),Le.BREAK;d.push(new Set)},leave(){if(x){let Q=l[b+1];I=(0,Kt.invalidSelectionSetErrorMessage)(n,p,Q.name,(0,Yi.kindToTypeString)(Q.kind)),x=!1}b-=1,l.pop(),d.pop()}}}),I?{errorMessage:I}:{configuration:{fieldName:r,selectionSet:SR(u)}}}function Ule(e,t,n,r){let i=e.entityInterfaceDataByTypeName.has(t.name),s=t.name,o=[],u=[],l=new Set,d=[],p=i?void 0:e.internalGraph.addEntityDataNode(t.name),y=e.internalGraph.addOrUpdateNode(t.name);for(let[N,I]of n){let{error:b,documentNode:x}=(0,oT.safeParse)("{"+N+"}");if(b||!x){o.push((0,Kt.unparsableFieldSetErrorMessage)(N,b));continue}let j=[t],Q=[],re=[],se=new Set,pe=-1,ye=!0,Ce="";if((0,Le.visit)(x,{Argument:{enter(xt){return o.push((0,Kt.unexpectedArgumentErrorMessage)(N,`${j[pe].name}.${Ce}`,xt.name.value)),Le.BREAK}},Field:{enter(xt){let B=j[pe-1],he=j[pe],nt=he.name;if(ye)return o.push((0,Kt.invalidSelectionSetErrorMessage)(N,[`${B.name}.${Ce}`],nt,(0,Yi.kindToTypeString)(he.kind))),Le.BREAK;let Ct=xt.name.value,sn=`${nt}.${Ct}`;Ce=Ct;let Fn=he.fieldDataByFieldName.get(Ct);if(!Fn)return o.push((0,Kt.undefinedFieldInFieldSetErrorMessage)(N,nt,Ct)),Le.BREAK;if(Fn.argumentDataByArgumentName.size)return o.push((0,Kt.argumentsInKeyFieldSetErrorMessage)(N,sn)),Le.BREAK;if(Q[pe].has(Ct))return o.push((0,Kt.duplicateFieldInFieldSetErrorMessage)(N,sn)),Le.BREAK;if(re.push(Ct),Fn.isShareableBySubgraphName.set(e.subgraphName,!0),Q[pe].add(Ct),pe===0)l.add(Ct),r.add(Ct);else{let mi=e.configurationDataByParentTypeName.get(nt);if(!mi)return o.push((0,Kt.invalidConfigurationDataErrorMessage)(nt,Ct,N)),Le.BREAK;mi.fieldNames.add(Ct)}(0,Yi.getValueOrDefault)(e.keyFieldNamesByParentTypeName,nt,()=>new Set).add(Ct);let _n=(0,aT.getTypeNodeNamedTypeName)(Fn.node.type);if(mq.BASE_SCALARS.has(_n)){se.add(re.join(Wn.PERIOD)),re.pop();return}let bn=e.parentDefinitionDataByTypeName.get(_n);if(!bn)return o.push((0,Kt.unknownTypeInFieldSetErrorMessage)(N,sn,_n)),Le.BREAK;if(bn.kind===Le.Kind.OBJECT_TYPE_DEFINITION){ye=!0,j.push(bn);return}if((0,oT.isKindAbstract)(bn.kind))return o.push((0,Kt.abstractTypeInKeyFieldSetErrorMessage)(N,sn,_n,(0,Yi.kindToTypeString)(bn.kind))),Le.BREAK;se.add(re.join(Wn.PERIOD)),re.pop()}},InlineFragment:{enter(){return o.push(Kt.inlineFragmentInFieldSetErrorMessage),Le.BREAK}},SelectionSet:{enter(){if(!ye){let xt=j[pe],he=`${xt.name}.${Ce}`,nt=xt.fieldDataByFieldName.get(Ce);if(!nt)return o.push((0,Kt.undefinedFieldInFieldSetErrorMessage)(N,he,Ce)),Le.BREAK;let Ct=(0,aT.getTypeNodeNamedTypeName)(nt.node.type),sn=e.parentDefinitionDataByTypeName.get(Ct),Fn=sn?sn.kind:Le.Kind.SCALAR_TYPE_DEFINITION;return o.push((0,Kt.invalidSelectionSetDefinitionErrorMessage)(N,[he],Ct,(0,Yi.kindToTypeString)(Fn))),Le.BREAK}if(pe+=1,ye=!1,pe<0||pe>=j.length)return o.push((0,Kt.unparsableFieldSetSelectionErrorMessage)(N,Ce)),Le.BREAK;Q.push(new Set)},leave(){if(ye){let B=j[pe].name,he=j[pe+1],nt=`${B}.${Ce}`;o.push((0,Kt.invalidSelectionSetErrorMessage)(N,[nt],he.name,(0,Yi.kindToTypeString)(he.kind))),ye=!1}pe-=1,j.pop(),Q.pop()}}}),o.length>0)continue;let ht=SR(x);u.push(k({fieldName:"",selectionSet:ht},I?{disableEntityResolver:!0}:{})),y.satisfiedFieldSets.add(ht),!I&&(p==null||p.addTargetSubgraphByFieldSet(ht,e.subgraphName),d.push(se))}if(o.length){e.errors.push((0,Kt.invalidKeyDirectivesError)(s,o));return}if(u.length)return u}function Mle(e,t,n,r,i){if(t!==ua.FieldSetDirective.PROVIDES)return e.entityDataByTypeName.has(i)?{fieldSetParentData:n}:{};let s=(0,Yi.getOrThrowError)(n.fieldDataByFieldName,r,`${i}.fieldDataByFieldName`),o=(0,aT.getTypeNodeNamedTypeName)(s.node.type),u=e.parentDefinitionDataByTypeName.get(o);return u?u.kind!==Le.Kind.INTERFACE_TYPE_DEFINITION&&u.kind!==Le.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,Kt.incompatibleTypeWithProvidesErrorMessage)(`${i}.${r}`,o)}:{fieldSetParentData:u}:{errorString:(0,Kt.unknownNamedTypeErrorMessage)(`${i}.${r}`,o)}}function fq(e,t,n,r){let i=[],s=[],o=(0,ua.getParentTypeName)(t);for(let[u,l]of n){let{fieldSetParentData:d,errorString:p}=Mle(e,r,t,u,o),y=`${o}.${u}`;if(p){i.push(p);continue}if(!d)continue;let{errorMessage:N,configuration:I}=Cle(e,d,l,u,r,o);if(N){i.push(` On "${o}.${u}" \u2014`+N);continue}if(I){s.push(I);continue}throw(0,Kt.invalidConfigurationResultFatalError)(y)}if(i.length>0){e.errors.push((0,Kt.invalidProvidesOrRequiresDirectivesError)(r,i));return}if(s.length>0)return s}function Ble(e,t,n){let r=(0,Yi.getOrThrowError)(e.configurationDataByParentTypeName,(0,ua.getParentTypeName)(t),"configurationDataByParentTypeName"),i=fq(e,t,n.provides,ua.FieldSetDirective.PROVIDES);i&&(r.provides=i);let s=fq(e,t,n.requires,ua.FieldSetDirective.REQUIRES);s&&(r.requires=s)}function Vle(e,t){return e===Wn.QUERY||t===Le.OperationTypeNode.QUERY}});var DR=V(uT=>{"use strict";m();T();h();Object.defineProperty(uT,"__esModule",{value:!0});uT.newParentTagData=Gle;uT.newChildTagData=Qle;uT.validateImplicitFieldSets=Yle;var jle=ps(),$le=$a(),Ws=CV(),qle=_c(),hq=Vi(),Kle=$l();function Gle(e){return{childTagDataByChildName:new Map,tagNames:new Set,typeName:e}}function Qle(e){return{name:e,tagNames:new Set,tagNamesByArgumentName:new Map}}function Yle({conditionalFieldDataByCoordinates:e,configurationData:t,fieldSets:n,implicitKeys:r,objectData:i,parentDefinitionDataByTypeName:s,graphNode:o}){for(let u of n){let{error:l,documentNode:d}=(0,hq.safeParse)("{"+u+"}");if(l||!d)continue;let p=[i],y=[],N=new Set,I=[],b=-1,x=!0,j=!0;if((0,Ws.visit)(d,{Argument:{enter(){return j=!1,Ws.BREAK}},Field:{enter(re){let se=p[b];if(x)return j=!1,Ws.BREAK;let pe=re.name.value,ye=se.fieldDataByFieldName.get(pe);if(!ye||ye.argumentDataByArgumentName.size||y[b].has(pe))return j=!1,Ws.BREAK;let Ce=e.get(`${ye.renamedParentTypeName}.${pe}`);if(Ce){if(Ce.providedBy.length>0)I.push(...Ce.providedBy);else if(Ce.requiredBy.length>0)return j=!1,Ws.BREAK}y[b].add(pe),b===0&&N.add(pe);let ht=(0,$le.getTypeNodeNamedTypeName)(ye.node.type);if(qle.BASE_SCALARS.has(ht))return;let xt=s.get(ht);if(!xt)return j=!1,Ws.BREAK;if(xt.kind===Ws.Kind.OBJECT_TYPE_DEFINITION){x=!0,p.push(xt);return}if((0,hq.isKindAbstract)(xt.kind))return j=!1,Ws.BREAK}},InlineFragment:{enter(){return j=!1,Ws.BREAK}},SelectionSet:{enter(){if(!x||(b+=1,x=!1,b<0||b>=p.length))return j=!1,Ws.BREAK;y.push(new Set)},leave(){if(x)return j=!1,Ws.BREAK;b-=1,p.pop(),y.pop()}}}),!j)continue;(0,jle.addIterableValuesToSet)(N,t.fieldNames);let Q=(0,Kle.getNormalizedFieldSet)(d);r.push(K(k({fieldName:"",selectionSet:Q},I.length>0?{conditions:I}:{}),{disableEntityResolver:!0})),o&&o.satisfiedFieldSets.add(Q)}}});var RR=V(AR=>{"use strict";m();T();h();Object.defineProperty(AR,"__esModule",{value:!0});AR.recordSubgraphName=Jle;function Jle(e,t,n){if(!t.has(e)){t.add(e);return}n.add(e)}});var FR=V(dT=>{"use strict";m();T();h();Object.defineProperty(dT,"__esModule",{value:!0});dT.upsertDirectiveSchemaAndEntityDefinitions=zle;dT.upsertParentsAndChildren=Hle;dT.consolidateAuthorizationDirectives=Wle;var rr=(we(),Me(je)),Ya=To(),Kl=_c(),dn=ps(),cT=Vi(),Ja=$l(),pr=bi(),Ji=Kp(),lT=$a();function zle(e,t){let n=new Set,r=[];(0,rr.visit)(t,{Directive:{enter(i){let s=i.name.value;if(pr.EVENT_DIRECTIVE_NAMES.has(s)&&e.edfsDirectiveReferences.add(s),Kl.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(s))return e.isSubgraphVersionTwo=!0,!1;if(Kl.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(s))return!1;s===pr.SUBSCRIPTION_FILTER&&e.directiveDefinitionByDirectiveName.set(pr.SUBSCRIPTION_FILTER,Kl.SUBSCRIPTION_FILTER_DEFINITION),e.referencedDirectiveNames.add(s)}},DirectiveDefinition:{enter(i){let s=i.name.value;return n.has(s)?(e.errors.push((0,Ya.duplicateDirectiveDefinitionError)(s)),!1):(n.add(s),Kl.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(s)?(e.isSubgraphVersionTwo=!0,!1):(Kl.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(s)||s===pr.SUBSCRIPTION_FILTER||(e.directiveDefinitionByDirectiveName.set(s,i),e.customDirectiveDefinitions.set(s,i)),!1))}},InterfaceTypeDefinition:{enter(i){let s=i.name.value;if(e.internalGraph.addOrUpdateNode(s,{isAbstract:!0}),!(0,cT.isObjectLikeNodeEntity)(i))return;let o=(0,dn.getValueOrDefault)(e.keyFieldSetDataByTypeName,s,Ja.newKeyFieldSetData);e.extractKeyFieldSets(i,o),(0,dn.upsertEntityDataProperties)(e.entityDataByTypeName,k({typeName:s,keyFieldSets:o.isUnresolvableByKeyFieldSet.keys()},e.subgraphName?{subgraphNames:[e.subgraphName]}:{})),(0,dn.getValueOrDefault)(e.entityInterfaceDataByTypeName,s,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,typeName:s}))}},InterfaceTypeExtension:{enter(i){let s=i.name.value;if(e.internalGraph.addOrUpdateNode(s,{isAbstract:!0}),!(0,cT.isObjectLikeNodeEntity)(i))return;let o=(0,dn.getValueOrDefault)(e.keyFieldSetDataByTypeName,s,Ja.newKeyFieldSetData);e.extractKeyFieldSets(i,o),(0,dn.upsertEntityDataProperties)(e.entityDataByTypeName,k({typeName:s,keyFieldSets:o.isUnresolvableByKeyFieldSet.keys()},e.subgraphName?{subgraphNames:[e.subgraphName]}:{}))}},ObjectTypeDefinition:{enter(i){if(!(0,cT.isObjectLikeNodeEntity)(i))return;let s=i.name.value;(0,cT.isNodeInterfaceObject)(i)&&(e.entityInterfaceDataByTypeName.set(s,{fieldDatas:[],interfaceObjectFieldNames:new Set,interfaceFieldNames:new Set,isInterfaceObject:!0,typeName:s}),e.internalGraph.addOrUpdateNode(s,{isAbstract:!0}));let o=(0,dn.getValueOrDefault)(e.keyFieldSetDataByTypeName,s,Ja.newKeyFieldSetData);e.extractKeyFieldSets(i,o),(0,dn.upsertEntityDataProperties)(e.entityDataByTypeName,k({typeName:s,keyFieldSets:o.isUnresolvableByKeyFieldSet.keys()},e.subgraphName?{subgraphNames:[e.subgraphName]}:{}))}},ObjectTypeExtension:{enter(i){if(!(0,cT.isObjectLikeNodeEntity)(i))return;let s=i.name.value,o=(0,dn.getValueOrDefault)(e.keyFieldSetDataByTypeName,s,Ja.newKeyFieldSetData);e.extractKeyFieldSets(i,o),(0,dn.upsertEntityDataProperties)(e.entityDataByTypeName,k({typeName:s,keyFieldSets:o.isUnresolvableByKeyFieldSet.keys()},e.subgraphName?{subgraphNames:[e.subgraphName]}:{}))}},OperationTypeDefinition:{enter(i){let s=i.operation,o=e.schemaDefinition.operationTypes.get(s),u=(0,lT.getTypeNodeNamedTypeName)(i.type);if(o)return(0,Ya.duplicateOperationTypeDefinitionError)(s,u,(0,lT.getTypeNodeNamedTypeName)(o.type)),!1;let l=e.operationTypeNodeByTypeName.get(u);return l?(e.errors.push((0,Ya.invalidOperationTypeDefinitionError)(l,u,s)),!1):(e.operationTypeNodeByTypeName.set(u,s),e.schemaDefinition.operationTypes.set(s,i),!1)}},SchemaDefinition:{enter(i){r.push(i),e.schemaDefinition.description=i.description}},SchemaExtension:{enter(i){r.push(i)}},UnionTypeDefinition:{enter(i){i.name.value!==pr.ENTITY_UNION&&e.upsertUnionByNode(i)}},UnionTypeExtension:{enter(i){if(i.name.value===pr.ENTITY_UNION)return!1;e.upsertUnionByNode(i,!0)}}});for(let i of r)(0,Ji.extractDirectives)(i,e.schemaDefinition.directivesByDirectiveName,e.errors,e.directiveDefinitionByDirectiveName,e.handledRepeatedDirectivesByHostPath,pr.SCHEMA)}function Hle(e,t){let n=!1,r;(0,rr.visit)(t,{EnumTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},EnumTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},EnumValueDefinition:{enter(i){e.childName=i.name.value,e.lastChildNodeKind=i.kind;let s=(0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA);if(s.kind!==rr.Kind.ENUM_TYPE_DEFINITION){e.errors.push((0,Ya.unexpectedParentKindForChildError)(e.originalParentTypeName,"enum or enum extension",(0,dn.kindToTypeString)(s.kind),e.childName,(0,dn.kindToTypeString)(i.kind)));return}if(s.enumValueDataByValueName.has(e.childName)){e.errors.push((0,Ya.duplicateEnumValueDefinitionError)(e.originalParentTypeName,e.childName));return}(0,Ji.addEnumValueDataByNode)(s.enumValueDataByValueName,i,e.errors,e.directiveDefinitionByDirectiveName,e.handledRepeatedDirectivesByHostPath,e.originalParentTypeName)},leave(){e.childName="",e.lastChildNodeKind=rr.Kind.NULL}},FieldDefinition:{enter(i){if(e.childName=i.name.value,n){if(e.childName===pr.SERVICE_FIELD||e.childName===pr.ENTITIES_FIELD)return!1;e.extractEventDirectivesToConfiguration(i)}e.edfsDirectiveReferences.size>0&&e.validateSubscriptionFilterDirectiveLocation(i),e.lastChildNodeKind=i.kind;let s=(0,lT.getTypeNodeNamedTypeName)(i.type);r&&!r.isAbstract&&e.internalGraph.addEdge(r,e.internalGraph.addOrUpdateNode(s),e.childName),Kl.BASE_SCALARS.has(s)||e.referencedTypeNames.add(s);let o=(0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA);if(o.kind!==rr.Kind.OBJECT_TYPE_DEFINITION&&o.kind!==rr.Kind.INTERFACE_TYPE_DEFINITION){e.errors.push((0,Ya.unexpectedParentKindForChildError)(e.originalParentTypeName,'"Object" or "Interface"',(0,dn.kindToTypeString)(o.kind),e.childName,(0,dn.kindToTypeString)(i.kind)));return}if(o.fieldDataByFieldName.has(e.childName)){e.errors.push((0,Ya.duplicateFieldDefinitionError)((0,dn.kindToTypeString)(o.kind),o.name,e.childName));return}let u=(0,Ji.extractArguments)(new Map,i,e.errors,e.directiveDefinitionByDirectiveName,e.handledRepeatedDirectivesByHostPath,e.parentsWithChildArguments,e.originalParentTypeName,e.renamedParentTypeName||e.originalParentTypeName,e.subgraphName),l=e.extractDirectivesAndAuthorization(i,new Map);(0,Ji.addInheritedDirectivesToFieldData)(o.directivesByDirectiveName,l);let d=(0,Ji.addFieldDataByNode)(o.fieldDataByFieldName,i,u,l,e.originalParentTypeName,e.renamedParentTypeName||e.originalParentTypeName,e.subgraphName,e.isSubgraphVersionTwo,e.errors),p=d.directivesByDirectiveName.get(pr.PROVIDES),y=d.directivesByDirectiveName.get(pr.REQUIRES);if(!y&&!p)return;let N=e.entityDataByTypeName.get(e.originalParentTypeName);if(N){N.fieldNames.add(e.childName);let b=(0,dn.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,Ja.newFieldSetData);(0,Ja.extractFieldSetValue)(e.childName,b.requires,y),(0,Ja.extractFieldSetValue)(e.childName,b.provides,p);return}if(!p)return;let I=(0,dn.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,Ja.newFieldSetData);(0,Ja.extractFieldSetValue)(e.childName,I.provides,p)},leave(){e.childName="",e.lastChildNodeKind=rr.Kind.NULL}},InputObjectTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i)},leave(){e.lastParentNodeKind=rr.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=rr.Kind.NULL}},InputValueDefinition:{enter(i){let s=i.name.value;if(e.lastParentNodeKind!==rr.Kind.INPUT_OBJECT_TYPE_DEFINITION&&e.lastParentNodeKind!==rr.Kind.INPUT_OBJECT_TYPE_EXTENSION){e.argumentName=s;return}e.childName=s,e.lastChildNodeKind=i.kind;let o=`${e.originalParentTypeName}.${s}`,u=(0,lT.getTypeNodeNamedTypeName)(i.type);Kl.BASE_SCALARS.has(u)||e.referencedTypeNames.add(u);let l=(0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA);if(l.kind!==rr.Kind.INPUT_OBJECT_TYPE_DEFINITION)return e.errors.push((0,Ya.unexpectedParentKindForChildError)(e.originalParentTypeName,"input object or input object extension",(0,dn.kindToTypeString)(l.kind),e.childName,(0,dn.kindToTypeString)(i.kind))),!1;if(l.inputValueDataByValueName.has(s)){e.errors.push((0,Ya.duplicateInputFieldDefinitionError)(e.originalParentTypeName,s));return}(0,Ji.addInputValueDataByNode)(l.inputValueDataByValueName,i,e.directiveDefinitionByDirectiveName,e.handledRepeatedDirectivesByHostPath,o,e.subgraphName,e.errors)},leave(){e.argumentName="",e.lastChildNodeKind===rr.Kind.INPUT_VALUE_DEFINITION&&(e.childName="",e.lastChildNodeKind=rr.Kind.NULL)}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i)},leave(){(0,Ji.removeInheritableDirectivesFromParentWithFieldsData)((0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA)),e.originalParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i,!0)},leave(){(0,Ji.removeInheritableDirectivesFromParentWithFieldsData)((0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA)),e.originalParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},ObjectTypeDefinition:{enter(i){if(i.name.value===pr.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,Ji.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,Ji.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(){(0,Ji.removeInheritableDirectivesFromParentWithFieldsData)((0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA)),r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},ObjectTypeExtension:{enter(i){if(i.name.value===pr.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,Ji.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,Ji.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(){(0,Ji.removeInheritableDirectivesFromParentWithFieldsData)((0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA)),r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},ScalarTypeDefinition:{enter(i){if(i.name.value===pr.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},ScalarTypeExtension:{enter(i){if(i.name.value===pr.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}}})}function Wle(e,t){let n,r=!1;(0,rr.visit)(t,{FieldDefinition:{enter(i){e.childName=i.name.value;let s=(0,lT.getTypeNodeNamedTypeName)(i.type),o=e.leafTypeNamesWithAuthorizationDirectives.has(s);if((!n||!n.hasParentLevelAuthorization)&&!o)return!1;let u=e.renamedParentTypeName||e.originalParentTypeName;n||(n=(0,dn.setAndGetValue)(e.authorizationDataByParentTypeName,u,(0,dn.newAuthorizationData)(u)));let l=(0,dn.getValueOrDefault)(n.fieldAuthorizationDataByFieldName,e.childName,()=>(0,dn.newFieldAuthorizationData)(e.childName));if(!(0,dn.mergeAuthorizationDataByAND)(n,l))return e.invalidOrScopesHostPaths.add(`${e.originalParentTypeName}.${e.childName}`),!1;if(!o)return!1;if(r)return(0,dn.getValueOrDefault)(e.heirFieldAuthorizationDataByTypeName,s,()=>[]).push(l),!1;let d=e.authorizationDataByParentTypeName.get(s);return d&&d.hasParentLevelAuthorization&&!(0,dn.mergeAuthorizationDataByAND)(d,l)&&e.invalidOrScopesHostPaths.add(`${e.originalParentTypeName}.${e.childName}`),!1},leave(){e.childName=""}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,n=e.getAuthorizationData(i),r=!0},leave(){e.originalParentTypeName="",n=void 0,r=!1}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,n=e.getAuthorizationData(i),r=!0},leave(){e.originalParentTypeName="",n=void 0,r=!1}},ObjectTypeDefinition:{enter(i){let s=e.parentDefinitionDataByTypeName.get(i.name.value);if(!s)return!1;e.originalParentTypeName=s.name,e.renamedParentTypeName=s.renamedTypeName,n=e.getAuthorizationData(i)},leave(){e.originalParentTypeName="",e.renamedParentTypeName="",n=void 0}},ObjectTypeExtension:{enter(i){let s=e.parentDefinitionDataByTypeName.get(i.name.value);if(!s)return!1;e.originalParentTypeName=s.name,e.renamedParentTypeName=s.renamedTypeName,n=e.getAuthorizationData(i)},leave(){e.originalParentTypeName="",e.renamedParentTypeName="",n=void 0}}})}});var xR=V(ca=>{"use strict";m();T();h();Object.defineProperty(ca,"__esModule",{value:!0});ca.EntityDataNode=ca.RootNode=ca.GraphNode=ca.Edge=void 0;var iI=ps(),wR=class{constructor(t,n,r,i=!1){A(this,"edgeName");A(this,"id");A(this,"isAbstractEdge");A(this,"isInaccessible",!1);A(this,"node");A(this,"visitedIndices",new Set);this.edgeName=i?`... on ${r}`:r,this.id=t,this.isAbstractEdge=i,this.node=n}};ca.Edge=wR;var LR=class{constructor(t,n,r){A(this,"fieldDataByFieldName",new Map);A(this,"headToTailEdges",new Map);A(this,"entityEdges",[]);A(this,"nodeName");A(this,"hasEntitySiblings",!1);A(this,"isAbstract");A(this,"isInaccessible",!1);A(this,"isLeaf",!1);A(this,"isRootNode",!1);A(this,"satisfiedFieldSets",new Set);A(this,"subgraphName");A(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,iI.getEntriesNotInHashSet)(this.headToTailEdges.keys(),this.fieldDataByFieldName);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,iI.add)(n,r.node.nodeName)&&this.getAccessibleEntityNodeNames(r.node,n)}};ca.GraphNode=LR;var PR=class{constructor(t){A(this,"fieldDataByFieldName",new Map);A(this,"headToShareableTailEdges",new Map);A(this,"isAbstract",!1);A(this,"isRootNode",!0);A(this,"typeName");this.typeName=t}removeInaccessibleEdges(t){for(let[n,r]of this.headToShareableTailEdges)if(!t.has(n))for(let i of r)i.isInaccessible=!0}};ca.RootNode=PR;var kR=class{constructor(t){A(this,"fieldSetsByTargetSubgraphName",new Map);A(this,"targetSubgraphNamesByFieldSet",new Map);A(this,"typeName");this.typeName=t}addTargetSubgraphByFieldSet(t,n){(0,iI.getValueOrDefault)(this.targetSubgraphNamesByFieldSet,t,()=>new Set).add(n),(0,iI.getValueOrDefault)(this.fieldSetsByTargetSubgraphName,n,()=>new Set).add(t)}};ca.EntityDataNode=kR});var UR=V(za=>{"use strict";m();T();h();Object.defineProperty(za,"__esModule",{value:!0});za.NodeResolutionData=void 0;za.newRootFieldData=Xle;za.generateResolvabilityErrorReasons=Nq;za.generateSelectionSetSegments=Eq;za.renderSelectionSet=gq;za.generateResolvabilityErrors=tde;var Tq=ps(),Gl=bi(),yq=To(),CR=class{constructor(t,n){A(this,"fieldDataByFieldName");A(this,"isResolved",!1);A(this,"resolvedFieldNames",new Set);A(this,"typeName");this.fieldDataByFieldName=n,this.typeName=t}add(t){if(this.resolvedFieldNames.add(t),this.resolvedFieldNames.size>this.fieldDataByFieldName.size){let n=(0,Tq.getEntriesNotInHashSet)(this.resolvedFieldNames,this.fieldDataByFieldName);throw(0,yq.unexpectedEdgeFatalError)(this.typeName,n)}return this.isResolved=this.resolvedFieldNames.size===this.fieldDataByFieldName.size,this.isResolved}};za.NodeResolutionData=CR;function Xle(e,t,n){return{coordinate:`${e}.${t}`,message:`The root type field "${e}.${t}" is defined in the following subgraph`+(n.size>1?"s":"")+`: "${[...n].join(Gl.QUOTATION_JOIN)}".`,subgraphNames:n}}function Zle(e,t){return e.isLeaf?e.name+` <-- +Consequently, "${n}" is already provided by subgraph "${t}" and should not form part of a "@${i}" directive field set.`)}});var $l=V(Hs=>{"use strict";m();T();h();Object.defineProperty(Hs,"__esModule",{value:!0});Hs.newKeyFieldSetData=Rle;Hs.newFieldSetData=Fle;Hs.areNodeKindAndDirectiveLocationCompatible=wle;Hs.getDirectiveDefinitionArgumentSets=Lle;Hs.addFieldNamesToConfigurationData=Ple;Hs.extractFieldSetValue=kle;Hs.getNormalizedFieldSet=SR;Hs.validateKeyFieldSets=Ule;Hs.validateAndAddConditionalFieldSetsToConfiguration=Ble;Hs.isNodeQuery=Vle;var Le=(we(),Me(je)),Yi=ps(),oT=Vi(),Wn=bi(),Kt=To(),mq=_c(),pq=nA(),aT=$a(),ua=Kp(),Ale=rI();function Rle(){return{isUnresolvableByKeyFieldSet:new Map}}function Fle(){return{provides:new Map,requires:new Map}}function wle(e,t,n=!1){for(let r of t.locations){let i=r.value.toUpperCase();switch(i){case Wn.ARGUMENT_DEFINITION_UPPER:if(!n)break;if(e===Le.Kind.INPUT_VALUE_DEFINITION)return!0;break;case Wn.ENUM_UPPER:if(e===Le.Kind.ENUM_TYPE_DEFINITION||e===Le.Kind.ENUM_TYPE_EXTENSION)return!0;break;case Wn.ENUM_VALUE_UPPER:if(e===Le.Kind.ENUM_VALUE_DEFINITION)return!0;break;case Wn.FIELD_UPPER:if(e===Le.Kind.FIELD)return!0;break;case Wn.FIELD_DEFINITION_UPPER:if(e===Le.Kind.FIELD_DEFINITION)return!0;break;case Wn.INLINE_FRAGMENT_UPPER:if(e===Le.Kind.INLINE_FRAGMENT)return!0;break;case Wn.INPUT_FIELD_DEFINITION_UPPER:if(e===Le.Kind.INPUT_VALUE_DEFINITION)return!0;break;case Wn.INPUT_OBJECT_UPPER:if(e===Le.Kind.INPUT_OBJECT_TYPE_DEFINITION||e===Le.Kind.INPUT_OBJECT_TYPE_EXTENSION)return!0;break;case Wn.INTERFACE_UPPER:if(e===Le.Kind.INTERFACE_TYPE_DEFINITION||e===Le.Kind.INTERFACE_TYPE_EXTENSION)return!0;break;case Wn.OBJECT_UPPER:if(e===Le.Kind.OBJECT_TYPE_DEFINITION||e===Le.Kind.OBJECT_TYPE_EXTENSION)return!0;break;case Wn.FRAGMENT_DEFINITION_UPPER:if(e===Le.Kind.FRAGMENT_DEFINITION)return!0;break;case Wn.FRAGMENT_SPREAD_UPPER:if(e===Le.Kind.FRAGMENT_SPREAD)return!0;break;case Wn.SCALAR_UPPER:if(e===Le.Kind.SCALAR_TYPE_DEFINITION||e===Le.Kind.SCALAR_TYPE_EXTENSION)return!0;break;case Wn.SCHEMA_UPPER:if(e===Le.Kind.SCHEMA_DEFINITION||e===Le.Kind.SCHEMA_EXTENSION)return!0;break;case Wn.UNION_UPPER:if(e===Le.Kind.UNION_TYPE_DEFINITION||e===Le.Kind.UNION_TYPE_EXTENSION)return!0;break;case Wn.VARIABLE_DEFINITION_UPPER:if(e===Le.Kind.VARIABLE_DEFINITION)return!0;break;case Wn.QUERY_UPPER:case Wn.MUTATION_UPPER:case Wn.SUBSCRIPTION_UPPER:if(e===Le.Kind.OPERATION_DEFINITION)return!0;break;default:throw(0,Kt.unexpectedDirectiveLocationError)(i)}}return!1}function Lle(e,t,n){for(let r of e){let i=r.name.value;t.set(i,r.type),r.type.kind===Le.Kind.NON_NULL_TYPE&&!r.defaultValue&&n.add(i)}}function Ple(e,t){let n=new Set;for(let[r,i]of e)i.directivesByDirectiveName.has(Wn.EXTERNAL)?t.externalFieldNames?t.externalFieldNames.add(r):n.add(r):t.fieldNames.add(r);n.size>0&&(t.externalFieldNames=n)}function kle(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!==Wn.FIELDS||i.value.kind!==Le.Kind.STRING||t.set(e,i.value.value)}function SR(e){return(0,Le.print)((0,oT.lexicographicallySortDocumentNode)(e)).replaceAll(/\s+/g," ").slice(2,-2)}function xle(e,t,n){switch(e){case ua.FieldSetDirective.PROVIDES:return[`${t}.${n}`];default:return[]}}function Cle(e,t,n,r,i,s){let{error:o,documentNode:u}=(0,oT.safeParse)("{"+n+"}");if(o||!u)return{errorMessage:(0,Kt.unparsableFieldSetErrorMessage)(n,o)};let l=[t],d=[],p=xle(i,s,r),y=[r],N=new Set,I,_=-1,C=!0,j=r;return(0,Le.visit)(u,{Argument:{enter(){return!1}},Field:{enter(Q){let re=l[_],se=re.name;if(re.kind===Le.Kind.UNION_TYPE_DEFINITION)return I=(0,Kt.invalidSelectionOnUnionErrorMessage)(n,p,se),Le.BREAK;if(C)return I=(0,Kt.invalidSelectionSetErrorMessage)(n,p,se,(0,Yi.kindToTypeString)(re.kind)),Le.BREAK;let pe=Q.name.value,ye=`${se}.${pe}`;p.push(ye),y.push(pe),j=pe;let Ce=re.fieldDataByFieldName.get(pe);if(!Ce)return I=(0,Kt.undefinedFieldInFieldSetErrorMessage)(n,se,pe),Le.BREAK;if(d[_].has(pe))return I=(0,Kt.duplicateFieldInFieldSetErrorMessage)(n,ye),Le.BREAK;d[_].add(pe);let ht=Ce.isExternalBySubgraphName.get(e.subgraphName),xt=(0,aT.getTypeNodeNamedTypeName)(Ce.node.type),B=e.parentDefinitionDataByTypeName.get(xt);if(mq.BASE_SCALARS.has(xt)||(B==null?void 0:B.kind)===Le.Kind.SCALAR_TYPE_DEFINITION||(B==null?void 0:B.kind)===Le.Kind.ENUM_TYPE_DEFINITION){if(N.size<1&&!ht){e.isSubgraphVersionTwo?e.errors.push((0,Kt.nonExternalConditionalFieldError)(`${s}.${r}`,e.subgraphName,ye,n,i)):e.warnings.push((0,Ale.nonExternalConditionalFieldWarning)(`${s}.${r}`,e.subgraphName,ye,n,i));return}let he=(0,Yi.getValueOrDefault)(e.conditionalFieldDataByCoordinates,ye,ua.newConditionalFieldData),nt=(0,pq.newFieldSetConditionData)({fieldCoordinatesPath:[...p],fieldPath:[...y]});i===ua.FieldSetDirective.PROVIDES?he.providedBy.push(nt):he.requiredBy.push(nt);return}if(!B)return I=(0,Kt.unknownTypeInFieldSetErrorMessage)(n,ye,xt),Le.BREAK;if(ht){let he=(0,Yi.getValueOrDefault)(e.conditionalFieldDataByCoordinates,ye,ua.newConditionalFieldData);switch(i){case ua.FieldSetDirective.PROVIDES:he.providedBy.push((0,pq.newFieldSetConditionData)({fieldCoordinatesPath:[...p],fieldPath:[...y]}));break;default:break}N.add(ye)}if(B.kind===Le.Kind.OBJECT_TYPE_DEFINITION||B.kind===Le.Kind.INTERFACE_TYPE_DEFINITION||B.kind===Le.Kind.UNION_TYPE_DEFINITION){C=!0,l.push(B);return}},leave(){N.delete(p.pop()||""),y.pop()}},InlineFragment:{enter(Q){let re=l[_],se=re.name,pe=p.length<1?t.name:p[p.length-1];if(!Q.typeCondition)return I=(0,Kt.inlineFragmentWithoutTypeConditionErrorMessage)(n,pe),Le.BREAK;let ye=Q.typeCondition.name.value;if(ye===se){l.push(re),C=!0;return}if(!(0,oT.isKindAbstract)(re.kind))return I=(0,Kt.invalidInlineFragmentTypeErrorMessage)(n,p,ye,se),Le.BREAK;let Ce=e.parentDefinitionDataByTypeName.get(ye);if(!Ce)return I=(0,Kt.unknownInlineFragmentTypeConditionErrorMessage)(n,p,se,ye),Le.BREAK;switch(C=!0,Ce.kind){case Le.Kind.INTERFACE_TYPE_DEFINITION:{if(!Ce.implementedInterfaceTypeNames.has(se))break;l.push(Ce);return}case Le.Kind.OBJECT_TYPE_DEFINITION:{let ht=e.concreteTypeNamesByAbstractTypeName.get(se);if(!ht||!ht.has(ye))break;l.push(Ce);return}case Le.Kind.UNION_TYPE_DEFINITION:{l.push(Ce);return}default:return I=(0,Kt.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,p,se,ye,(0,Yi.kindToTypeString)(Ce.kind)),Le.BREAK}return I=(0,Kt.invalidInlineFragmentTypeConditionErrorMessage)(n,p,ye,(0,Yi.kindToTypeString)(re.kind),se),Le.BREAK}},SelectionSet:{enter(){if(!C){let Q=l[_];if(Q.kind===Le.Kind.UNION_TYPE_DEFINITION)return I=(0,Kt.unparsableFieldSetSelectionErrorMessage)(n,j),Le.BREAK;let re=Q.fieldDataByFieldName.get(j);if(!re)return I=(0,Kt.undefinedFieldInFieldSetErrorMessage)(n,Q.name,j),Le.BREAK;let se=(0,aT.getTypeNodeNamedTypeName)(re.node.type),pe=e.parentDefinitionDataByTypeName.get(se),ye=pe?pe.kind:Le.Kind.SCALAR_TYPE_DEFINITION;return I=(0,Kt.invalidSelectionSetDefinitionErrorMessage)(n,p,se,(0,Yi.kindToTypeString)(ye)),Le.BREAK}if(_+=1,C=!1,_<0||_>=l.length)return I=(0,Kt.unparsableFieldSetSelectionErrorMessage)(n,j),Le.BREAK;d.push(new Set)},leave(){if(C){let Q=l[_+1];I=(0,Kt.invalidSelectionSetErrorMessage)(n,p,Q.name,(0,Yi.kindToTypeString)(Q.kind)),C=!1}_-=1,l.pop(),d.pop()}}}),I?{errorMessage:I}:{configuration:{fieldName:r,selectionSet:SR(u)}}}function Ule(e,t,n,r){let i=e.entityInterfaceDataByTypeName.has(t.name),s=t.name,o=[],u=[],l=new Set,d=[],p=i?void 0:e.internalGraph.addEntityDataNode(t.name),y=e.internalGraph.addOrUpdateNode(t.name);for(let[N,I]of n){let{error:_,documentNode:C}=(0,oT.safeParse)("{"+N+"}");if(_||!C){o.push((0,Kt.unparsableFieldSetErrorMessage)(N,_));continue}let j=[t],Q=[],re=[],se=new Set,pe=-1,ye=!0,Ce="";if((0,Le.visit)(C,{Argument:{enter(xt){return o.push((0,Kt.unexpectedArgumentErrorMessage)(N,`${j[pe].name}.${Ce}`,xt.name.value)),Le.BREAK}},Field:{enter(xt){let B=j[pe-1],he=j[pe],nt=he.name;if(ye)return o.push((0,Kt.invalidSelectionSetErrorMessage)(N,[`${B.name}.${Ce}`],nt,(0,Yi.kindToTypeString)(he.kind))),Le.BREAK;let Ct=xt.name.value,sn=`${nt}.${Ct}`;Ce=Ct;let Fn=he.fieldDataByFieldName.get(Ct);if(!Fn)return o.push((0,Kt.undefinedFieldInFieldSetErrorMessage)(N,nt,Ct)),Le.BREAK;if(Fn.argumentDataByArgumentName.size)return o.push((0,Kt.argumentsInKeyFieldSetErrorMessage)(N,sn)),Le.BREAK;if(Q[pe].has(Ct))return o.push((0,Kt.duplicateFieldInFieldSetErrorMessage)(N,sn)),Le.BREAK;if(re.push(Ct),Fn.isShareableBySubgraphName.set(e.subgraphName,!0),Q[pe].add(Ct),pe===0)l.add(Ct),r.add(Ct);else{let mi=e.configurationDataByParentTypeName.get(nt);if(!mi)return o.push((0,Kt.invalidConfigurationDataErrorMessage)(nt,Ct,N)),Le.BREAK;mi.fieldNames.add(Ct)}(0,Yi.getValueOrDefault)(e.keyFieldNamesByParentTypeName,nt,()=>new Set).add(Ct);let _n=(0,aT.getTypeNodeNamedTypeName)(Fn.node.type);if(mq.BASE_SCALARS.has(_n)){se.add(re.join(Wn.PERIOD)),re.pop();return}let bn=e.parentDefinitionDataByTypeName.get(_n);if(!bn)return o.push((0,Kt.unknownTypeInFieldSetErrorMessage)(N,sn,_n)),Le.BREAK;if(bn.kind===Le.Kind.OBJECT_TYPE_DEFINITION){ye=!0,j.push(bn);return}if((0,oT.isKindAbstract)(bn.kind))return o.push((0,Kt.abstractTypeInKeyFieldSetErrorMessage)(N,sn,_n,(0,Yi.kindToTypeString)(bn.kind))),Le.BREAK;se.add(re.join(Wn.PERIOD)),re.pop()}},InlineFragment:{enter(){return o.push(Kt.inlineFragmentInFieldSetErrorMessage),Le.BREAK}},SelectionSet:{enter(){if(!ye){let xt=j[pe],he=`${xt.name}.${Ce}`,nt=xt.fieldDataByFieldName.get(Ce);if(!nt)return o.push((0,Kt.undefinedFieldInFieldSetErrorMessage)(N,he,Ce)),Le.BREAK;let Ct=(0,aT.getTypeNodeNamedTypeName)(nt.node.type),sn=e.parentDefinitionDataByTypeName.get(Ct),Fn=sn?sn.kind:Le.Kind.SCALAR_TYPE_DEFINITION;return o.push((0,Kt.invalidSelectionSetDefinitionErrorMessage)(N,[he],Ct,(0,Yi.kindToTypeString)(Fn))),Le.BREAK}if(pe+=1,ye=!1,pe<0||pe>=j.length)return o.push((0,Kt.unparsableFieldSetSelectionErrorMessage)(N,Ce)),Le.BREAK;Q.push(new Set)},leave(){if(ye){let B=j[pe].name,he=j[pe+1],nt=`${B}.${Ce}`;o.push((0,Kt.invalidSelectionSetErrorMessage)(N,[nt],he.name,(0,Yi.kindToTypeString)(he.kind))),ye=!1}pe-=1,j.pop(),Q.pop()}}}),o.length>0)continue;let ht=SR(C);u.push(k({fieldName:"",selectionSet:ht},I?{disableEntityResolver:!0}:{})),y.satisfiedFieldSets.add(ht),!I&&(p==null||p.addTargetSubgraphByFieldSet(ht,e.subgraphName),d.push(se))}if(o.length){e.errors.push((0,Kt.invalidKeyDirectivesError)(s,o));return}if(u.length)return u}function Mle(e,t,n,r,i){if(t!==ua.FieldSetDirective.PROVIDES)return e.entityDataByTypeName.has(i)?{fieldSetParentData:n}:{};let s=(0,Yi.getOrThrowError)(n.fieldDataByFieldName,r,`${i}.fieldDataByFieldName`),o=(0,aT.getTypeNodeNamedTypeName)(s.node.type),u=e.parentDefinitionDataByTypeName.get(o);return u?u.kind!==Le.Kind.INTERFACE_TYPE_DEFINITION&&u.kind!==Le.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,Kt.incompatibleTypeWithProvidesErrorMessage)(`${i}.${r}`,o)}:{fieldSetParentData:u}:{errorString:(0,Kt.unknownNamedTypeErrorMessage)(`${i}.${r}`,o)}}function fq(e,t,n,r){let i=[],s=[],o=(0,ua.getParentTypeName)(t);for(let[u,l]of n){let{fieldSetParentData:d,errorString:p}=Mle(e,r,t,u,o),y=`${o}.${u}`;if(p){i.push(p);continue}if(!d)continue;let{errorMessage:N,configuration:I}=Cle(e,d,l,u,r,o);if(N){i.push(` On "${o}.${u}" \u2014`+N);continue}if(I){s.push(I);continue}throw(0,Kt.invalidConfigurationResultFatalError)(y)}if(i.length>0){e.errors.push((0,Kt.invalidProvidesOrRequiresDirectivesError)(r,i));return}if(s.length>0)return s}function Ble(e,t,n){let r=(0,Yi.getOrThrowError)(e.configurationDataByParentTypeName,(0,ua.getParentTypeName)(t),"configurationDataByParentTypeName"),i=fq(e,t,n.provides,ua.FieldSetDirective.PROVIDES);i&&(r.provides=i);let s=fq(e,t,n.requires,ua.FieldSetDirective.REQUIRES);s&&(r.requires=s)}function Vle(e,t){return e===Wn.QUERY||t===Le.OperationTypeNode.QUERY}});var DR=V(uT=>{"use strict";m();T();h();Object.defineProperty(uT,"__esModule",{value:!0});uT.newParentTagData=Gle;uT.newChildTagData=Qle;uT.validateImplicitFieldSets=Yle;var jle=ps(),$le=$a(),Ws=CV(),qle=_c(),hq=Vi(),Kle=$l();function Gle(e){return{childTagDataByChildName:new Map,tagNames:new Set,typeName:e}}function Qle(e){return{name:e,tagNames:new Set,tagNamesByArgumentName:new Map}}function Yle({conditionalFieldDataByCoordinates:e,configurationData:t,fieldSets:n,implicitKeys:r,objectData:i,parentDefinitionDataByTypeName:s,graphNode:o}){for(let u of n){let{error:l,documentNode:d}=(0,hq.safeParse)("{"+u+"}");if(l||!d)continue;let p=[i],y=[],N=new Set,I=[],_=-1,C=!0,j=!0;if((0,Ws.visit)(d,{Argument:{enter(){return j=!1,Ws.BREAK}},Field:{enter(re){let se=p[_];if(C)return j=!1,Ws.BREAK;let pe=re.name.value,ye=se.fieldDataByFieldName.get(pe);if(!ye||ye.argumentDataByArgumentName.size||y[_].has(pe))return j=!1,Ws.BREAK;let Ce=e.get(`${ye.renamedParentTypeName}.${pe}`);if(Ce){if(Ce.providedBy.length>0)I.push(...Ce.providedBy);else if(Ce.requiredBy.length>0)return j=!1,Ws.BREAK}y[_].add(pe),_===0&&N.add(pe);let ht=(0,$le.getTypeNodeNamedTypeName)(ye.node.type);if(qle.BASE_SCALARS.has(ht))return;let xt=s.get(ht);if(!xt)return j=!1,Ws.BREAK;if(xt.kind===Ws.Kind.OBJECT_TYPE_DEFINITION){C=!0,p.push(xt);return}if((0,hq.isKindAbstract)(xt.kind))return j=!1,Ws.BREAK}},InlineFragment:{enter(){return j=!1,Ws.BREAK}},SelectionSet:{enter(){if(!C||(_+=1,C=!1,_<0||_>=p.length))return j=!1,Ws.BREAK;y.push(new Set)},leave(){if(C)return j=!1,Ws.BREAK;_-=1,p.pop(),y.pop()}}}),!j)continue;(0,jle.addIterableValuesToSet)(N,t.fieldNames);let Q=(0,Kle.getNormalizedFieldSet)(d);r.push(K(k({fieldName:"",selectionSet:Q},I.length>0?{conditions:I}:{}),{disableEntityResolver:!0})),o&&o.satisfiedFieldSets.add(Q)}}});var RR=V(AR=>{"use strict";m();T();h();Object.defineProperty(AR,"__esModule",{value:!0});AR.recordSubgraphName=Jle;function Jle(e,t,n){if(!t.has(e)){t.add(e);return}n.add(e)}});var FR=V(dT=>{"use strict";m();T();h();Object.defineProperty(dT,"__esModule",{value:!0});dT.upsertDirectiveSchemaAndEntityDefinitions=zle;dT.upsertParentsAndChildren=Hle;dT.consolidateAuthorizationDirectives=Wle;var rr=(we(),Me(je)),Ya=To(),Kl=_c(),dn=ps(),cT=Vi(),Ja=$l(),pr=bi(),Ji=Kp(),lT=$a();function zle(e,t){let n=new Set,r=[];(0,rr.visit)(t,{Directive:{enter(i){let s=i.name.value;if(pr.EVENT_DIRECTIVE_NAMES.has(s)&&e.edfsDirectiveReferences.add(s),Kl.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(s))return e.isSubgraphVersionTwo=!0,!1;if(Kl.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(s))return!1;s===pr.SUBSCRIPTION_FILTER&&e.directiveDefinitionByDirectiveName.set(pr.SUBSCRIPTION_FILTER,Kl.SUBSCRIPTION_FILTER_DEFINITION),e.referencedDirectiveNames.add(s)}},DirectiveDefinition:{enter(i){let s=i.name.value;return n.has(s)?(e.errors.push((0,Ya.duplicateDirectiveDefinitionError)(s)),!1):(n.add(s),Kl.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(s)?(e.isSubgraphVersionTwo=!0,!1):(Kl.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(s)||s===pr.SUBSCRIPTION_FILTER||(e.directiveDefinitionByDirectiveName.set(s,i),e.customDirectiveDefinitions.set(s,i)),!1))}},InterfaceTypeDefinition:{enter(i){let s=i.name.value;if(e.internalGraph.addOrUpdateNode(s,{isAbstract:!0}),!(0,cT.isObjectLikeNodeEntity)(i))return;let o=(0,dn.getValueOrDefault)(e.keyFieldSetDataByTypeName,s,Ja.newKeyFieldSetData);e.extractKeyFieldSets(i,o),(0,dn.upsertEntityDataProperties)(e.entityDataByTypeName,k({typeName:s,keyFieldSets:o.isUnresolvableByKeyFieldSet.keys()},e.subgraphName?{subgraphNames:[e.subgraphName]}:{})),(0,dn.getValueOrDefault)(e.entityInterfaceDataByTypeName,s,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,typeName:s}))}},InterfaceTypeExtension:{enter(i){let s=i.name.value;if(e.internalGraph.addOrUpdateNode(s,{isAbstract:!0}),!(0,cT.isObjectLikeNodeEntity)(i))return;let o=(0,dn.getValueOrDefault)(e.keyFieldSetDataByTypeName,s,Ja.newKeyFieldSetData);e.extractKeyFieldSets(i,o),(0,dn.upsertEntityDataProperties)(e.entityDataByTypeName,k({typeName:s,keyFieldSets:o.isUnresolvableByKeyFieldSet.keys()},e.subgraphName?{subgraphNames:[e.subgraphName]}:{}))}},ObjectTypeDefinition:{enter(i){if(!(0,cT.isObjectLikeNodeEntity)(i))return;let s=i.name.value;(0,cT.isNodeInterfaceObject)(i)&&(e.entityInterfaceDataByTypeName.set(s,{fieldDatas:[],interfaceObjectFieldNames:new Set,interfaceFieldNames:new Set,isInterfaceObject:!0,typeName:s}),e.internalGraph.addOrUpdateNode(s,{isAbstract:!0}));let o=(0,dn.getValueOrDefault)(e.keyFieldSetDataByTypeName,s,Ja.newKeyFieldSetData);e.extractKeyFieldSets(i,o),(0,dn.upsertEntityDataProperties)(e.entityDataByTypeName,k({typeName:s,keyFieldSets:o.isUnresolvableByKeyFieldSet.keys()},e.subgraphName?{subgraphNames:[e.subgraphName]}:{}))}},ObjectTypeExtension:{enter(i){if(!(0,cT.isObjectLikeNodeEntity)(i))return;let s=i.name.value,o=(0,dn.getValueOrDefault)(e.keyFieldSetDataByTypeName,s,Ja.newKeyFieldSetData);e.extractKeyFieldSets(i,o),(0,dn.upsertEntityDataProperties)(e.entityDataByTypeName,k({typeName:s,keyFieldSets:o.isUnresolvableByKeyFieldSet.keys()},e.subgraphName?{subgraphNames:[e.subgraphName]}:{}))}},OperationTypeDefinition:{enter(i){let s=i.operation,o=e.schemaDefinition.operationTypes.get(s),u=(0,lT.getTypeNodeNamedTypeName)(i.type);if(o)return(0,Ya.duplicateOperationTypeDefinitionError)(s,u,(0,lT.getTypeNodeNamedTypeName)(o.type)),!1;let l=e.operationTypeNodeByTypeName.get(u);return l?(e.errors.push((0,Ya.invalidOperationTypeDefinitionError)(l,u,s)),!1):(e.operationTypeNodeByTypeName.set(u,s),e.schemaDefinition.operationTypes.set(s,i),!1)}},SchemaDefinition:{enter(i){r.push(i),e.schemaDefinition.description=i.description}},SchemaExtension:{enter(i){r.push(i)}},UnionTypeDefinition:{enter(i){i.name.value!==pr.ENTITY_UNION&&e.upsertUnionByNode(i)}},UnionTypeExtension:{enter(i){if(i.name.value===pr.ENTITY_UNION)return!1;e.upsertUnionByNode(i,!0)}}});for(let i of r)(0,Ji.extractDirectives)(i,e.schemaDefinition.directivesByDirectiveName,e.errors,e.directiveDefinitionByDirectiveName,e.handledRepeatedDirectivesByHostPath,pr.SCHEMA)}function Hle(e,t){let n=!1,r;(0,rr.visit)(t,{EnumTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},EnumTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},EnumValueDefinition:{enter(i){e.childName=i.name.value,e.lastChildNodeKind=i.kind;let s=(0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA);if(s.kind!==rr.Kind.ENUM_TYPE_DEFINITION){e.errors.push((0,Ya.unexpectedParentKindForChildError)(e.originalParentTypeName,"enum or enum extension",(0,dn.kindToTypeString)(s.kind),e.childName,(0,dn.kindToTypeString)(i.kind)));return}if(s.enumValueDataByValueName.has(e.childName)){e.errors.push((0,Ya.duplicateEnumValueDefinitionError)(e.originalParentTypeName,e.childName));return}(0,Ji.addEnumValueDataByNode)(s.enumValueDataByValueName,i,e.errors,e.directiveDefinitionByDirectiveName,e.handledRepeatedDirectivesByHostPath,e.originalParentTypeName)},leave(){e.childName="",e.lastChildNodeKind=rr.Kind.NULL}},FieldDefinition:{enter(i){if(e.childName=i.name.value,n){if(e.childName===pr.SERVICE_FIELD||e.childName===pr.ENTITIES_FIELD)return!1;e.extractEventDirectivesToConfiguration(i)}e.edfsDirectiveReferences.size>0&&e.validateSubscriptionFilterDirectiveLocation(i),e.lastChildNodeKind=i.kind;let s=(0,lT.getTypeNodeNamedTypeName)(i.type);r&&!r.isAbstract&&e.internalGraph.addEdge(r,e.internalGraph.addOrUpdateNode(s),e.childName),Kl.BASE_SCALARS.has(s)||e.referencedTypeNames.add(s);let o=(0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA);if(o.kind!==rr.Kind.OBJECT_TYPE_DEFINITION&&o.kind!==rr.Kind.INTERFACE_TYPE_DEFINITION){e.errors.push((0,Ya.unexpectedParentKindForChildError)(e.originalParentTypeName,'"Object" or "Interface"',(0,dn.kindToTypeString)(o.kind),e.childName,(0,dn.kindToTypeString)(i.kind)));return}if(o.fieldDataByFieldName.has(e.childName)){e.errors.push((0,Ya.duplicateFieldDefinitionError)((0,dn.kindToTypeString)(o.kind),o.name,e.childName));return}let u=(0,Ji.extractArguments)(new Map,i,e.errors,e.directiveDefinitionByDirectiveName,e.handledRepeatedDirectivesByHostPath,e.parentsWithChildArguments,e.originalParentTypeName,e.renamedParentTypeName||e.originalParentTypeName,e.subgraphName),l=e.extractDirectivesAndAuthorization(i,new Map);(0,Ji.addInheritedDirectivesToFieldData)(o.directivesByDirectiveName,l);let d=(0,Ji.addFieldDataByNode)(o.fieldDataByFieldName,i,u,l,e.originalParentTypeName,e.renamedParentTypeName||e.originalParentTypeName,e.subgraphName,e.isSubgraphVersionTwo,e.errors),p=d.directivesByDirectiveName.get(pr.PROVIDES),y=d.directivesByDirectiveName.get(pr.REQUIRES);if(!y&&!p)return;let N=e.entityDataByTypeName.get(e.originalParentTypeName);if(N){N.fieldNames.add(e.childName);let _=(0,dn.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,Ja.newFieldSetData);(0,Ja.extractFieldSetValue)(e.childName,_.requires,y),(0,Ja.extractFieldSetValue)(e.childName,_.provides,p);return}if(!p)return;let I=(0,dn.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,Ja.newFieldSetData);(0,Ja.extractFieldSetValue)(e.childName,I.provides,p)},leave(){e.childName="",e.lastChildNodeKind=rr.Kind.NULL}},InputObjectTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i)},leave(){e.lastParentNodeKind=rr.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=rr.Kind.NULL}},InputValueDefinition:{enter(i){let s=i.name.value;if(e.lastParentNodeKind!==rr.Kind.INPUT_OBJECT_TYPE_DEFINITION&&e.lastParentNodeKind!==rr.Kind.INPUT_OBJECT_TYPE_EXTENSION){e.argumentName=s;return}e.childName=s,e.lastChildNodeKind=i.kind;let o=`${e.originalParentTypeName}.${s}`,u=(0,lT.getTypeNodeNamedTypeName)(i.type);Kl.BASE_SCALARS.has(u)||e.referencedTypeNames.add(u);let l=(0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA);if(l.kind!==rr.Kind.INPUT_OBJECT_TYPE_DEFINITION)return e.errors.push((0,Ya.unexpectedParentKindForChildError)(e.originalParentTypeName,"input object or input object extension",(0,dn.kindToTypeString)(l.kind),e.childName,(0,dn.kindToTypeString)(i.kind))),!1;if(l.inputValueDataByValueName.has(s)){e.errors.push((0,Ya.duplicateInputFieldDefinitionError)(e.originalParentTypeName,s));return}(0,Ji.addInputValueDataByNode)(l.inputValueDataByValueName,i,e.directiveDefinitionByDirectiveName,e.handledRepeatedDirectivesByHostPath,o,e.subgraphName,e.errors)},leave(){e.argumentName="",e.lastChildNodeKind===rr.Kind.INPUT_VALUE_DEFINITION&&(e.childName="",e.lastChildNodeKind=rr.Kind.NULL)}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i)},leave(){(0,Ji.removeInheritableDirectivesFromParentWithFieldsData)((0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA)),e.originalParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i,!0)},leave(){(0,Ji.removeInheritableDirectivesFromParentWithFieldsData)((0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA)),e.originalParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},ObjectTypeDefinition:{enter(i){if(i.name.value===pr.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,Ji.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,Ji.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(){(0,Ji.removeInheritableDirectivesFromParentWithFieldsData)((0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA)),r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},ObjectTypeExtension:{enter(i){if(i.name.value===pr.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,Ji.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,Ji.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(){(0,Ji.removeInheritableDirectivesFromParentWithFieldsData)((0,dn.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,pr.PARENT_DEFINITION_DATA)),r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},ScalarTypeDefinition:{enter(i){if(i.name.value===pr.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}},ScalarTypeExtension:{enter(i){if(i.name.value===pr.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=rr.Kind.NULL}}})}function Wle(e,t){let n,r=!1;(0,rr.visit)(t,{FieldDefinition:{enter(i){e.childName=i.name.value;let s=(0,lT.getTypeNodeNamedTypeName)(i.type),o=e.leafTypeNamesWithAuthorizationDirectives.has(s);if((!n||!n.hasParentLevelAuthorization)&&!o)return!1;let u=e.renamedParentTypeName||e.originalParentTypeName;n||(n=(0,dn.setAndGetValue)(e.authorizationDataByParentTypeName,u,(0,dn.newAuthorizationData)(u)));let l=(0,dn.getValueOrDefault)(n.fieldAuthorizationDataByFieldName,e.childName,()=>(0,dn.newFieldAuthorizationData)(e.childName));if(!(0,dn.mergeAuthorizationDataByAND)(n,l))return e.invalidOrScopesHostPaths.add(`${e.originalParentTypeName}.${e.childName}`),!1;if(!o)return!1;if(r)return(0,dn.getValueOrDefault)(e.heirFieldAuthorizationDataByTypeName,s,()=>[]).push(l),!1;let d=e.authorizationDataByParentTypeName.get(s);return d&&d.hasParentLevelAuthorization&&!(0,dn.mergeAuthorizationDataByAND)(d,l)&&e.invalidOrScopesHostPaths.add(`${e.originalParentTypeName}.${e.childName}`),!1},leave(){e.childName=""}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,n=e.getAuthorizationData(i),r=!0},leave(){e.originalParentTypeName="",n=void 0,r=!1}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,n=e.getAuthorizationData(i),r=!0},leave(){e.originalParentTypeName="",n=void 0,r=!1}},ObjectTypeDefinition:{enter(i){let s=e.parentDefinitionDataByTypeName.get(i.name.value);if(!s)return!1;e.originalParentTypeName=s.name,e.renamedParentTypeName=s.renamedTypeName,n=e.getAuthorizationData(i)},leave(){e.originalParentTypeName="",e.renamedParentTypeName="",n=void 0}},ObjectTypeExtension:{enter(i){let s=e.parentDefinitionDataByTypeName.get(i.name.value);if(!s)return!1;e.originalParentTypeName=s.name,e.renamedParentTypeName=s.renamedTypeName,n=e.getAuthorizationData(i)},leave(){e.originalParentTypeName="",e.renamedParentTypeName="",n=void 0}}})}});var xR=V(ca=>{"use strict";m();T();h();Object.defineProperty(ca,"__esModule",{value:!0});ca.EntityDataNode=ca.RootNode=ca.GraphNode=ca.Edge=void 0;var iI=ps(),wR=class{constructor(t,n,r,i=!1){A(this,"edgeName");A(this,"id");A(this,"isAbstractEdge");A(this,"isInaccessible",!1);A(this,"node");A(this,"visitedIndices",new Set);this.edgeName=i?`... on ${r}`:r,this.id=t,this.isAbstractEdge=i,this.node=n}};ca.Edge=wR;var LR=class{constructor(t,n,r){A(this,"fieldDataByFieldName",new Map);A(this,"headToTailEdges",new Map);A(this,"entityEdges",[]);A(this,"nodeName");A(this,"hasEntitySiblings",!1);A(this,"isAbstract");A(this,"isInaccessible",!1);A(this,"isLeaf",!1);A(this,"isRootNode",!1);A(this,"satisfiedFieldSets",new Set);A(this,"subgraphName");A(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,iI.getEntriesNotInHashSet)(this.headToTailEdges.keys(),this.fieldDataByFieldName);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,iI.add)(n,r.node.nodeName)&&this.getAccessibleEntityNodeNames(r.node,n)}};ca.GraphNode=LR;var PR=class{constructor(t){A(this,"fieldDataByFieldName",new Map);A(this,"headToShareableTailEdges",new Map);A(this,"isAbstract",!1);A(this,"isRootNode",!0);A(this,"typeName");this.typeName=t}removeInaccessibleEdges(t){for(let[n,r]of this.headToShareableTailEdges)if(!t.has(n))for(let i of r)i.isInaccessible=!0}};ca.RootNode=PR;var kR=class{constructor(t){A(this,"fieldSetsByTargetSubgraphName",new Map);A(this,"targetSubgraphNamesByFieldSet",new Map);A(this,"typeName");this.typeName=t}addTargetSubgraphByFieldSet(t,n){(0,iI.getValueOrDefault)(this.targetSubgraphNamesByFieldSet,t,()=>new Set).add(n),(0,iI.getValueOrDefault)(this.fieldSetsByTargetSubgraphName,n,()=>new Set).add(t)}};ca.EntityDataNode=kR});var UR=V(za=>{"use strict";m();T();h();Object.defineProperty(za,"__esModule",{value:!0});za.NodeResolutionData=void 0;za.newRootFieldData=Xle;za.generateResolvabilityErrorReasons=Nq;za.generateSelectionSetSegments=Eq;za.renderSelectionSet=gq;za.generateResolvabilityErrors=tde;var Tq=ps(),Gl=bi(),yq=To(),CR=class{constructor(t,n){A(this,"fieldDataByFieldName");A(this,"isResolved",!1);A(this,"resolvedFieldNames",new Set);A(this,"typeName");this.fieldDataByFieldName=n,this.typeName=t}add(t){if(this.resolvedFieldNames.add(t),this.resolvedFieldNames.size>this.fieldDataByFieldName.size){let n=(0,Tq.getEntriesNotInHashSet)(this.resolvedFieldNames,this.fieldDataByFieldName);throw(0,yq.unexpectedEdgeFatalError)(this.typeName,n)}return this.isResolved=this.resolvedFieldNames.size===this.fieldDataByFieldName.size,this.isResolved}};za.NodeResolutionData=CR;function Xle(e,t,n){return{coordinate:`${e}.${t}`,message:`The root type field "${e}.${t}" is defined in the following subgraph`+(n.size>1?"s":"")+`: "${[...n].join(Gl.QUOTATION_JOIN)}".`,subgraphNames:n}}function Zle(e,t){return e.isLeaf?e.name+` <-- `:e.name+` { <-- `+Gl.LITERAL_SPACE.repeat(t+3)+`... `+Gl.LITERAL_SPACE.repeat(t+2)+`} `}function Nq({entityAncestorData:e,rootFieldData:t,unresolvableFieldData:n}){let{fieldName:r,typeName:i,subgraphNames:s}=n,o=[t.message,`The field "${i}.${r}" is defined in the following subgraph`+(s.size>1?"s":"")+`: "${[...s].join(Gl.QUOTATION_JOIN)}".`];if(e){let u=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName)if(s.has(l)){u=!0;for(let p of d)o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" does not satisfy the key field set "${p}" to access subgraph "${l}".`)}u||o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" has no accessible target entities (resolvable @key directives) in the subgraphs where "${i}.${r}" is defined.`),o.push(`The type "${i}" is not a descendent of any other entity ancestors that can provide a shared route to access "${r}".`)}else t.subgraphNames.size>1&&o.push(`None of the subgraphs that share the same root type field "${t.coordinate}" can provide a route to access "${r}".`),o.push(`The type "${i}" is not a descendent of an entity ancestor that can provide a shared route to access "${r}".`);return i!==(e==null?void 0:e.typeName)&&o.push(`The type "${i}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),o}function Eq(e){let t=e.split(new RegExp("(?<=\\w)\\.")),n="",r="";for(let i=0;i{"use strict";m();T();h();Object.defineProperty(sI,"__esModule",{value:!0});sI.Graph=void 0;var Fi=ps(),Iq=bi(),Qp=xR(),Yp=UR(),MR=class{constructor(){A(this,"edgeId",-1);A(this,"entityDataNodes",new Map);A(this,"entityNodeNamesBySharedFieldPath",new Map);A(this,"nodeByNodeName",new Map);A(this,"nodesByTypeName",new Map);A(this,"rootNodeByRootTypeName",new Map);A(this,"subgraphName",Iq.N_A);A(this,"resolvableFieldNamesByRelativeFieldPathByEntityNodeName",new Map);A(this,"nodeResolutionDataByFieldPath",new Map);A(this,"unresolvableFieldPaths",new Set);A(this,"failureResultByEntityNodeName",new Map);A(this,"walkerIndex",-1)}getRootNode(t){return(0,Fi.getValueOrDefault)(this.rootNodeByRootTypeName,t,()=>new Qp.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 s=new Qp.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,s),(0,Fi.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(s),s}addEdge(t,n,r,i=!1){if(t.isRootNode){let u=new Qp.Edge(this.getNextEdgeId(),n,r);return(0,Fi.getValueOrDefault)(t.headToShareableTailEdges,r,()=>[]).push(u),u}let s=t,o=new Qp.Edge(this.getNextEdgeId(),n,i?n.typeName:r,i);return s.headToTailEdges.set(r,o),o}addEntityDataNode(t){let n=this.entityDataNodes.get(t);if(n)return n;let r=new Qp.EntityDataNode(t);return this.entityDataNodes.set(t,r),r}getNextEdgeId(){return this.edgeId+=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.entityDataNodes.get(t);if(Iq.ROOT_TYPE_NAMES.has(t)){let s=this.getRootNode(t);s.removeInaccessibleEdges(n),s.fieldDataByFieldName=n;return}let i=this.nodesByTypeName.get(t);if(i){for(let s of i)if(s.fieldDataByFieldName=n,s.handleInaccessibleEdges(),s.isLeaf=!1,!!r){s.hasEntitySiblings=!0;for(let o of s.satisfiedFieldSets){let u=r.targetSubgraphNamesByFieldSet.get(o);for(let l of u||[]){if(l===s.subgraphName)continue;let d=this.nodeByNodeName.get(`${l}.${s.typeName}`);d&&s.entityEdges.push(new Qp.Edge(this.getNextEdgeId(),d,""))}}}}}setSubgraphName(t){this.subgraphName=t}validateEntities(t,n){let r=new Map;for(let[i,s]of t){let o=s.size>1,u,l=o?new Map:void 0,d=new Set,p=new Map;for(let y of s){let N=this.nodeByNodeName.get(y);if(!N)throw new Error(`Fatal: Could not find entity node for "${y}".`);if(this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName.get(y)){let Q=this.failureResultByEntityNodeName.get(y);if(!Q){u=void 0;break}if(!o)return Q}let b=this.nodesByTypeName.get(N.typeName)||[],x=(0,Fi.getValueOrDefault)(r,y,()=>o?p:new Map),j=new BR({interSubgraphNodes:b,entityNodeNamesBySharedFieldPath:x,originNode:N,resolvableFieldNamesByRelativeFieldPathByEntityNodeName:this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName,walkerIndex:this.walkerIndex+=1,sharedResolvableFieldNamesByRelativeFieldPath:l,unresolvableSharedFieldPaths:d});if(j.visitEntityNode(N),j.unresolvableFieldPaths.size>0){if(o&&d.size<1){u=void 0;break}u={entityAncestorData:{fieldSetsByTargetSubgraphName:(0,Fi.getOrThrowError)(this.entityDataNodes,N.typeName,"entityDataNodes").fieldSetsByTargetSubgraphName,subgraphName:N.subgraphName,typeName:N.typeName},nodeName:y,parentFieldPathForEntityReference:[i],success:!1,typeName:N.typeName,unresolvableFieldPaths:o?d:j.unresolvableFieldPaths},this.failureResultByEntityNodeName.set(y,u);continue}u=void 0;break}if(u)return o&&l&&this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName.set(u.nodeName,l),u}if(r.size>0)for(let[i,s]of r){let o=this.validateEntities(s,n);if(!o.success){for(let[u,l]of t)if(l.has(i)){o.parentFieldPathForEntityReference.push(u);break}return o}}return{success:!0}}validate(){let t=[];for(let n of this.rootNodeByRootTypeName.values())e:for(let[r,i]of n.headToShareableTailEdges){for(let u of i){if(u.isInaccessible)continue e;this.walkerIndex+=1,this.visitEdge(u,`${n.typeName.toLowerCase()}`)}let s=(0,Fi.getOrThrowError)(n.fieldDataByFieldName,r,"fieldDataByFieldName"),o=(0,Yp.newRootFieldData)(n.typeName,r,s.subgraphNames);if(this.unresolvableFieldPaths.size>0&&(0,Yp.generateResolvabilityErrors)({unresolvableFieldPaths:this.unresolvableFieldPaths,nodeResolutionDataByFieldPath:this.nodeResolutionDataByFieldPath,rootFieldData:o,errors:t}),this.entityNodeNamesBySharedFieldPath.size>0){let u=this.validateEntities(this.entityNodeNamesBySharedFieldPath,o);u.success||this.generateEntityResolvabilityErrors(u,o,t)}if(t.length>0)return t;this.entityNodeNamesBySharedFieldPath=new Map}return[]}visitEdge(t,n){return t.isInaccessible||t.node.isInaccessible?!1:(!(0,Fi.add)(t.visitedIndices,this.walkerIndex)||t.node.isLeaf||(t.node.isAbstract?this.validateAbstractNode(t.node,`${n}.${t.edgeName}`):this.validateConcreteNode(t.node,`${n}.${t.edgeName}`)),!0)}validateConcreteNode(t,n){if(t.headToTailEdges.size<1)return;if(t.hasEntitySiblings){(0,Fi.getValueOrDefault)(this.entityNodeNamesBySharedFieldPath,n,()=>new Set).add(t.nodeName);return}let r=(0,Fi.getValueOrDefault)(this.nodeResolutionDataByFieldPath,n,()=>new Yp.NodeResolutionData(t.typeName,t.fieldDataByFieldName));for(let[i,s]of t.headToTailEdges)this.visitEdge(s,n)&&r.add(i);r.isResolved?this.unresolvableFieldPaths.delete(n):this.unresolvableFieldPaths.add(n)}validateAbstractNode(t,n){if(!(t.headToTailEdges.size<1))for(let r of t.headToTailEdges.values())this.visitEdge(r,n)}generateEntityResolvabilityErrors(t,n,r){let i=(0,Fi.getOrThrowError)(this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName,t.nodeName,"resolvableFieldNamesByRelativeFieldPathByEntityNodeName"),s="";for(let o of t.parentFieldPathForEntityReference)s=o+s;(0,Yp.generateResolvabilityErrors)({unresolvableFieldPaths:t.unresolvableFieldPaths,nodeResolutionDataByFieldPath:i,rootFieldData:n,errors:r,pathFromRoot:s,entityAncestorData:t.entityAncestorData})}};sI.Graph=MR;var BR=class{constructor({entityNodeNamesBySharedFieldPath:t,interSubgraphNodes:n,originNode:r,resolvableFieldNamesByRelativeFieldPathByEntityNodeName:i,unresolvableSharedFieldPaths:s,walkerIndex:o,sharedResolvableFieldNamesByRelativeFieldPath:u}){A(this,"entityNodeNamesBySharedFieldPath");A(this,"interSubgraphNodes");A(this,"originNode");A(this,"resolvableFieldNamesByRelativeFieldPath");A(this,"resolvableFieldNamesByRelativeFieldPathByEntityNodeName");A(this,"unresolvableFieldPaths",new Set);A(this,"unresolvableSharedFieldPaths");A(this,"walkerIndex");A(this,"sharedResolvableFieldNamesByRelativeFieldPath");this.entityNodeNamesBySharedFieldPath=t,this.interSubgraphNodes=n,this.originNode=r,this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName=i,this.resolvableFieldNamesByRelativeFieldPath=(0,Fi.getValueOrDefault)(this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName,r.nodeName,()=>new Map),this.unresolvableSharedFieldPaths=s,this.walkerIndex=o,this.sharedResolvableFieldNamesByRelativeFieldPath=u}visitEntityNode(t){this.validateEntityRelatedConcreteNode(t,"");let n=t.getAllAccessibleEntityNodeNames();for(let r of this.interSubgraphNodes){if(this.unresolvableFieldPaths.size<0)return;n.has(r.nodeName)&&this.validateEntityRelatedConcreteNode(r,"")}}visitEntityRelatedEdge(t,n){return t.isInaccessible||t.node.isInaccessible?!1:!(0,Fi.add)(t.visitedIndices,this.walkerIndex)||t.node.isLeaf?!0:t.node.hasEntitySiblings?((0,Fi.getValueOrDefault)(this.entityNodeNamesBySharedFieldPath,`${n}.${t.edgeName}`,()=>new Set).add(t.node.nodeName),!0):(t.node.isAbstract?this.validateEntityRelatedAbstractNode(t.node,`${n}.${t.edgeName}`):this.validateEntityRelatedConcreteNode(t.node,`${n}.${t.edgeName}`),!0)}validateEntityRelatedConcreteNode(t,n){if(t.headToTailEdges.size<1)return;let r=(0,Fi.getValueOrDefault)(this.resolvableFieldNamesByRelativeFieldPath,n,()=>new Yp.NodeResolutionData(t.typeName,t.fieldDataByFieldName)),i=this.sharedResolvableFieldNamesByRelativeFieldPath?(0,Fi.getValueOrDefault)(this.sharedResolvableFieldNamesByRelativeFieldPath,n,()=>new Yp.NodeResolutionData(t.typeName,t.fieldDataByFieldName)):void 0;for(let[s,o]of t.headToTailEdges)this.visitEntityRelatedEdge(o,n)&&(r.add(s),i==null||i.add(s));r.isResolved?this.unresolvableFieldPaths.delete(n):this.unresolvableFieldPaths.add(n),i&&(i.isResolved?this.unresolvableSharedFieldPaths.delete(n):this.unresolvableSharedFieldPaths.add(n))}validateEntityRelatedAbstractNode(t,n){if(!(t.headToTailEdges.size<1))for(let r of t.headToTailEdges.values())this.visitEntityRelatedEdge(r,n)}}});var qR=V(Yl=>{"use strict";m();T();h();Object.defineProperty(Yl,"__esModule",{value:!0});Yl.NormalizationFactory=void 0;Yl.normalizeSubgraphFromString=ide;Yl.normalizeSubgraph=_q;Yl.batchNormalize=sde;var Pe=(we(),Me(je)),Hi=Vi(),oI=$l(),zi=_c(),it=ps(),De=To(),_e=bi(),nde=eD(),Ha=Zg(),rde=RR(),vq=rI(),jR=FR(),Ql=$h(),Wr=Kp(),Wa=$a(),$R=VR();function ide(e,t=!0){let{error:n,documentNode:r}=(0,Hi.safeParse)(e,t);return n||!r?{errors:[(0,De.subgraphInvalidSyntaxError)(n)],warnings:[]}:new pT(new $R.Graph).normalize(r)}function _q(e,t,n){return new pT(n||new $R.Graph,t).normalize(e)}var pT=class{constructor(t,n){A(this,"argumentName","");A(this,"authorizationDataByParentTypeName",new Map);A(this,"childName","");A(this,"concreteTypeNamesByAbstractTypeName",new Map);A(this,"conditionalFieldDataByCoordinates",new Map);A(this,"configurationDataByParentTypeName",new Map);A(this,"customDirectiveDefinitions",new Map);A(this,"directiveDefinitionByDirectiveName",new Map);A(this,"edfsDirectiveReferences",new Set);A(this,"errors",[]);A(this,"entityDataByTypeName",new Map);A(this,"entityInterfaceDataByTypeName",new Map);A(this,"eventsConfigurations",new Map);A(this,"interfaceTypeNamesWithAuthorizationDirectives",new Set);A(this,"internalGraph");A(this,"isCurrentParentExtension",!1);A(this,"isSubgraphEventDrivenGraph",!1);A(this,"isSubgraphVersionTwo",!1);A(this,"fieldSetDataByTypeName",new Map);A(this,"heirFieldAuthorizationDataByTypeName",new Map);A(this,"handledRepeatedDirectivesByHostPath",new Map);A(this,"lastParentNodeKind",Pe.Kind.NULL);A(this,"lastChildNodeKind",Pe.Kind.NULL);A(this,"leafTypeNamesWithAuthorizationDirectives",new Set);A(this,"keyFieldSetDataByTypeName",new Map);A(this,"keyFieldNamesByParentTypeName",new Map);A(this,"operationTypeNodeByTypeName",new Map);A(this,"originalTypeNameByRenamedTypeName",new Map);A(this,"parentDefinitionDataByTypeName",new Map);A(this,"originalParentTypeName","");A(this,"parentsWithChildArguments",new Set);A(this,"overridesByTargetSubgraphName",new Map);A(this,"invalidOrScopesHostPaths",new Set);A(this,"schemaDefinition");A(this,"referencedDirectiveNames",new Set);A(this,"referencedTypeNames",new Set);A(this,"renamedParentTypeName","");A(this,"subgraphName");A(this,"warnings",[]);for(let[r,i]of zi.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME)this.directiveDefinitionByDirectiveName.set(r,i);this.subgraphName=n||_e.N_A,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaDefinition={directivesByDirectiveName:new Map,kind:Pe.Kind.SCHEMA_DEFINITION,typeName:_e.SCHEMA,operationTypes:new Map}}validateInputNamedType(t){if(zi.BASE_SCALARS.has(t))return{hasUnhandledError:!1,typeString:""};let n=this.parentDefinitionDataByTypeName.get(t);if(!n)return this.errors.push((0,De.undefinedTypeError)(t)),{hasUnhandledError:!1,typeString:""};switch(n.kind){case Pe.Kind.ENUM_TYPE_DEFINITION:case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Pe.Kind.SCALAR_TYPE_DEFINITION:return{hasUnhandledError:!1,typeString:""};default:return{hasUnhandledError:!0,typeString:(0,it.kindToTypeString)(n.kind)}}}validateArguments(t,n){let r=[];for(let[i,s]of t.argumentDataByArgumentName){let o=(0,Wa.getTypeNodeNamedTypeName)(s.type),{hasUnhandledError:u,typeString:l}=this.validateInputNamedType(o);u&&r.push({argumentName:i,namedType:o,typeString:l,typeName:(0,Ha.printTypeNode)(s.type)})}r.length>0&&this.errors.push((0,De.invalidArgumentsError)(n,r))}getAuthorizationData(t){let n=this.renamedParentTypeName||this.originalParentTypeName,r=this.authorizationDataByParentTypeName.get(n);if((0,it.resetAuthorizationData)(r),!t.directives)return r;let i=!1,s=[];for(let d of t.directives){let p=d.name.value;if(p===_e.AUTHENTICATED){if(i)return;i=!0;continue}if(p===_e.REQUIRES_SCOPES){if(s.length>0)return;s.push(d)}}if(!i&&s.length<1||((0,it.isNodeKindInterface)(t.kind)&&this.interfaceTypeNamesWithAuthorizationDirectives.add(n),r||(r=(0,it.setAndGetValue)(this.authorizationDataByParentTypeName,this.renamedParentTypeName||this.originalParentTypeName,(0,it.newAuthorizationData)(n))),r.hasParentLevelAuthorization=!0,r.requiresAuthentication=i,s.length!==1))return r;let o=s[0];if(!o.arguments||o.arguments.length!==1)return;let u=o.arguments[0];if(u.name.value!==_e.SCOPES||u.value.kind!==Pe.Kind.LIST)return;let l=u.value.values;if(l.length<1)return r;if(l.length>it.maxOrScopes){this.invalidOrScopesHostPaths.add(this.originalParentTypeName);return}for(let d of l){if(d.kind!==Pe.Kind.LIST)return;let p=new Set;for(let y of d.values){if(y.kind!==Pe.Kind.STRING)return;p.add(y.value)}p.size&&r.requiredScopes.push(p)}return r}extractDirectivesAndAuthorization(t,n){if(!t.directives)return n;let r=this.childName?`${this.originalParentTypeName}.${this.childName}`:this.originalParentTypeName,i=[];for(let l of t.directives){let d=(0,Wr.getDirectiveValidationErrors)(l,t.kind,n,this.directiveDefinitionByDirectiveName,this.handledRepeatedDirectivesByHostPath,r),p=l.name.value;if(d.length>0){this.errors.push((0,De.invalidDirectiveError)(p,r,d));continue}if(p===_e.EXTENDS)continue;if(p===_e.OVERRIDE){this.handleOverrideDeclaration(l,r,d),d.length>0&&this.errors.push((0,De.invalidDirectiveError)(p,r,d));continue}if(p===_e.AUTHENTICATED||p===_e.REQUIRES_SCOPES){i.push(l);continue}let y=n.get(p);if(y){y.push(l);continue}n.set(p,[l])}if(i.length<1)return n;let s=this.renamedParentTypeName||this.originalParentTypeName;t.kind!==Pe.Kind.FIELD_DEFINITION&&this.leafTypeNamesWithAuthorizationDirectives.add(s);let o=(0,it.getValueOrDefault)(this.authorizationDataByParentTypeName,s,()=>(0,it.newAuthorizationData)(s)),u=(0,it.getAuthorizationDataToUpdate)(o,t,this.childName);for(let l of i){if(l.name.value===_e.AUTHENTICATED){u.requiresAuthentication=!0;continue}let p=l.arguments[0].value.values;if(p.length>it.maxOrScopes){this.invalidOrScopesHostPaths.add(r);continue}for(let y of p){let N=new Set;for(let I of y.values)N.add(I.value);N.size&&u.requiredScopes.push(N)}}return n}isTypeNameRootType(t){return _e.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}extractDirectives(t,n,r,i=!1){if(!t.directives)return n;let s=new Set;for(let o of t.directives){let u=(0,Wr.getDirectiveValidationErrors)(o,t.kind,n,this.directiveDefinitionByDirectiveName,this.handledRepeatedDirectivesByHostPath,r,i),l=o.name.value;if(u.length>0){this.errors.push((0,De.invalidDirectiveError)(l,r,u));continue}if(_e.IGNORED_PARENT_DIRECTIVES.has(l))continue;if(l===_e.KEY){let p=o.arguments[0].value.value;if(s.has(p))continue;s.add(p)}let d=n.get(l);d?d.push(o):n.set(l,[o])}return n}getNodeExtensionType(t,n,r=!1){return t?Ql.ExtensionType.REAL:r||this.isSubgraphVersionTwo||!n.has(_e.EXTENDS)?Ql.ExtensionType.NONE:Ql.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case Ql.ExtensionType.EXTENDS:case Ql.ExtensionType.NONE:{if(n===Ql.ExtensionType.REAL)return;this.errors.push((0,De.duplicateTypeDefinitionError)((0,it.kindToTypeString)(t.kind),t.name));return}default:t.extensionType=n}}extractImplementedInterfaceTypeNames(t,n){if(!t.interfaces)return n;let r=t.name.value;for(let i of t.interfaces){let s=i.name.value;if(n.has(s)){this.errors.push((0,De.duplicateImplementedInterfaceError)((0,it.kindToConvertedTypeString)(t.kind),r,s));continue}n.add(s)}return n}updateCompositeOutputDataByNode(t,n,r,i){this.setParentDataExtensionType(n,i),this.extractImplementedInterfaceTypeNames(t,n.implementedInterfaceTypeNames),n.isEntity||(n.isEntity=r.has(_e.KEY)),n.isInaccessible||(n.isInaccessible=r.has(_e.INACCESSIBLE)),n.subgraphNames.add(this.subgraphName),n.description||(n.description=(0,Hi.formatDescription)("description"in t?t.description:void 0))}addConcreteTypeNamesForImplementedInterfaces(t,n){for(let r of t)(0,it.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(n),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(n),n,!0)}upsertInterfaceDataByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),s=this.extractDirectives(t,(i==null?void 0:i.directivesByDirectiveName)||new Map,r),o=this.getNodeExtensionType(n,s),u=this.entityInterfaceDataByTypeName.get(r);if(u&&t.fields)for(let l of t.fields)u.interfaceFieldNames.add(l.name.value);if(i){if(i.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,De.multipleNamedTypeDefinitionError)(r,(0,it.kindToTypeString)(i.kind),(0,it.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,s,o);return}this.parentDefinitionDataByTypeName.set(r,{directivesByDirectiveName:s,extensionType:o,fieldDataByFieldName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:s.has(_e.KEY),isInaccessible:s.has(_e.INACCESSIBLE),kind:Pe.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,Wa.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,Wr.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Hi.formatDescription)("description"in t?t.description:void 0)})}getRenamedRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(!n)return t;switch(n){case Pe.OperationTypeNode.MUTATION:return _e.MUTATION;case Pe.OperationTypeNode.SUBSCRIPTION:return _e.SUBSCRIPTION;default:return _e.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){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),s=this.extractDirectives(t,(i==null?void 0:i.directivesByDirectiveName)||new Map,r),o=this.isTypeNameRootType(r),u=this.getNodeExtensionType(n,s,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,De.multipleNamedTypeDefinitionError)(r,(0,it.kindToTypeString)(i.kind),(0,it.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,s,u),this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);this.addConcreteTypeNamesForImplementedInterfaces(l,r),this.parentDefinitionDataByTypeName.set(r,{directivesByDirectiveName:s,extensionType:u,fieldDataByFieldName:new Map,implementedInterfaceTypeNames:l,isEntity:s.has(_e.KEY),isInaccessible:s.has(_e.INACCESSIBLE),isRootType:o,kind:Pe.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,Wa.getMutableObjectNode)(t.name),persistedDirectivesData:(0,Wr.newPersistedDirectivesData)(),renamedTypeName:this.getRenamedRootTypeName(r),subgraphNames:new Set([this.subgraphName]),description:(0,Hi.formatDescription)("description"in t?t.description:void 0)})}upsertEnumDataByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),s=this.extractDirectivesAndAuthorization(t,(i==null?void 0:i.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,s);if(i){if(i.kind!==Pe.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,De.multipleNamedTypeDefinitionError)(r,(0,it.kindToTypeString)(i.kind),(0,it.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.description||(i.description=(0,Hi.formatDescription)("description"in t?t.description:void 0));return}this.parentDefinitionDataByTypeName.set(r,{appearances:1,directivesByDirectiveName:s,extensionType:o,enumValueDataByValueName:new Map,kind:Pe.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,Wa.getMutableEnumNode)(t.name),persistedDirectivesData:(0,Wr.newPersistedDirectivesData)(),description:(0,Hi.formatDescription)("description"in t?t.description:void 0)})}upsertInputObjectByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),s=this.extractDirectives(t,(i==null?void 0:i.directivesByDirectiveName)||new Map,r),o=this.getNodeExtensionType(n,s);if(i){if(i.kind!==Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION){this.errors.push((0,De.multipleNamedTypeDefinitionError)(r,(0,it.kindToTypeString)(i.kind),(0,it.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=s.has(_e.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,Hi.formatDescription)("description"in t?t.description:void 0));return}this.parentDefinitionDataByTypeName.set(r,{directivesByDirectiveName:s,extensionType:o,inputValueDataByValueName:new Map,isInaccessible:s.has(_e.INACCESSIBLE),kind:Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,Wa.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,Wr.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Hi.formatDescription)("description"in t?t.description:void 0)})}upsertScalarByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),s=this.extractDirectivesAndAuthorization(t,(i==null?void 0:i.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,s);if(i){if(i.kind!==Pe.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,De.multipleNamedTypeDefinitionError)(r,(0,it.kindToTypeString)(i.kind),(0,it.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.description||(i.description=(0,Hi.formatDescription)("description"in t?t.description:void 0));return}this.parentDefinitionDataByTypeName.set(r,{directivesByDirectiveName:s,extensionType:o,kind:Pe.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,Wa.getMutableScalarNode)(t.name),persistedDirectivesData:(0,Wr.newPersistedDirectivesData)(),description:(0,Hi.formatDescription)("description"in t?t.description:void 0)})}extractUnionMembers(t,n){if(!t.types)return n;let r=t.name.value;for(let i of t.types){let s=i.name.value;if(n.has(s)){this.errors.push((0,De.duplicateUnionMemberDefinitionError)(r,s));continue}(0,it.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(s),zi.BASE_SCALARS.has(s)||this.referencedTypeNames.add(s),n.set(s,i)}return n}upsertUnionByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),s=this.extractDirectives(t,(i==null?void 0:i.directivesByDirectiveName)||new Map,r),o=this.getNodeExtensionType(n,s);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==Pe.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,De.multipleNamedTypeDefinitionError)(r,(0,it.kindToTypeString)(i.kind),(0,it.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),this.extractUnionMembers(t,i.memberByMemberTypeName),i.description||(i.description=(0,Hi.formatDescription)("description"in t?t.description:void 0));return}this.parentDefinitionDataByTypeName.set(r,{directivesByDirectiveName:s,extensionType:o,kind:Pe.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,Wa.getMutableUnionNode)(t.name),persistedDirectivesData:(0,Wr.newPersistedDirectivesData)(),description:(0,Hi.formatDescription)("description"in t?t.description:void 0)})}extractKeyFieldSets(t,n){var o;let r=n.isUnresolvableByKeyFieldSet,i=t.name.value;if(!((o=t.directives)!=null&&o.length)){this.errors.push((0,De.expectedEntityError)(i));return}let s=[];for(let u of t.directives){if(u.name.value!==_e.KEY)continue;if(!u.arguments||u.arguments.length<1){s.push((0,De.undefinedRequiredArgumentsErrorMessage)(_e.KEY,i,[_e.FIELDS]));continue}let l,d=!1;for(let p of u.arguments){if(p.name.value===_e.RESOLVABLE){p.value.kind===Pe.Kind.BOOLEAN&&!p.value.value&&(d=!0);continue}if(p.name.value!==_e.FIELDS){l=void 0;break}if(p.value.kind!==Pe.Kind.STRING){l=void 0,s.push((0,De.invalidKeyDirectiveArgumentErrorMessage)(p.value.kind));break}l=p.value.value}l!==void 0&&r.set(l,d)}s.length&&this.errors.push((0,De.invalidKeyDirectivesError)(i,s))}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByDirectiveName.has(_e.INACCESSIBLE),r=new Map,i=new Map,s=!1;for(let o of t.implementedInterfaceTypeNames){let u=this.parentDefinitionDataByTypeName.get(o);if(!u){this.errors.push((0,De.undefinedTypeError)(o));continue}if(u.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION){i.set(u.name,(0,it.kindToTypeString)(u.kind));continue}if(t.name===u.name){s=!0;continue}let l={invalidFieldImplementations:new Map,unimplementedFields:[]},d=!1;for(let[p,y]of u.fieldDataByFieldName){let N=!1,I=t.fieldDataByFieldName.get(p);if(!I){d=!0,l.unimplementedFields.push(p);continue}let b={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,Ha.printTypeNode)(y.node.type),unimplementedArguments:new Set};(0,Wr.isTypeValidImplementation)(y.node.type,I.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,N=!0,b.implementedResponseType=(0,Ha.printTypeNode)(I.node.type));let x=new Set;for(let[j,Q]of y.argumentDataByArgumentName){x.add(j);let re=I.argumentDataByArgumentName.get(j);if(!re){d=!0,N=!0,b.unimplementedArguments.add(j);continue}let se=(0,Ha.printTypeNode)(re.type),pe=(0,Ha.printTypeNode)(Q.type);pe!==se&&(d=!0,N=!0,b.invalidImplementedArguments.push({actualType:se,argumentName:j,expectedType:pe}))}for(let[j,Q]of I.argumentDataByArgumentName)x.has(j)||Q.type.kind===Pe.Kind.NON_NULL_TYPE&&(d=!0,N=!0,b.invalidAdditionalArguments.add(j));!n&&I.isInaccessible&&!y.isInaccessible&&(d=!0,N=!0,b.isInaccessible=!0),N&&l.invalidFieldImplementations.set(p,b)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,De.invalidImplementedTypeError)(t.name,i)),s&&this.errors.push((0,De.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,De.invalidInterfaceImplementationError)(t.name,(0,it.kindToTypeString)(t.kind),r))}handleOverrideDeclaration(t,n,r){let i=t.arguments[0];if(i.value.kind!==Pe.Kind.STRING){r.push((0,De.invalidDirectiveArgumentTypeErrorMessage)(!0,_e.FROM,Pe.Kind.STRING,i.value.kind));return}let s=i.value.value;if(s===this.subgraphName){r.push((0,De.equivalentSourceAndTargetOverrideErrorMessage)(s,n));return}let o=(0,it.getValueOrDefault)(this.overridesByTargetSubgraphName,s,()=>new Map);(0,it.getValueOrDefault)(o,this.renamedParentTypeName||this.originalParentTypeName,()=>new Set).add(this.childName)}getKafkaPublishConfiguration(t,n){let r=[],i=_e.DEFAULT_EDFS_PROVIDER_ID;for(let s of t.arguments||[])switch(s.name.value){case _e.TOPIC:{if(s.value.kind!==Pe.Kind.STRING||s.value.value.length<1){n.push((0,De.invalidEventSubjectErrorMessage)(_e.TOPIC));continue}r.push(s.value.value);break}case _e.PROVIDER_ID:{if(s.value.kind!==Pe.Kind.STRING||s.value.value.length<1){n.push(De.invalidEventProviderIdErrorMessage);continue}i=s.value.value;break}}if(!(n.length>0))return{fieldName:this.childName,providerId:i,providerType:_e.PROVIDER_TYPE_KAFKA,topics:r,type:_e.PUBLISH}}getKafkaSubscribeConfiguration(t,n){let r=[],i=_e.DEFAULT_EDFS_PROVIDER_ID;for(let s of t.arguments||[])switch(s.name.value){case _e.TOPICS:{if(s.value.kind!==Pe.Kind.LIST){n.push((0,De.invalidEventSubjectsErrorMessage)(_e.TOPICS));continue}for(let o of s.value.values){if(o.kind!==Pe.Kind.STRING||o.value.length<1){n.push((0,De.invalidEventSubjectsItemErrorMessage)(_e.TOPICS));break}r.push(o.value)}break}case _e.PROVIDER_ID:{if(s.value.kind!==Pe.Kind.STRING||s.value.value.length<1){n.push(De.invalidEventProviderIdErrorMessage);continue}i=s.value.value;break}}if(!(n.length>0))return{fieldName:this.childName,providerId:i,providerType:_e.PROVIDER_TYPE_KAFKA,topics:r,type:_e.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r){let i=[],s=_e.DEFAULT_EDFS_PROVIDER_ID;for(let o of n.arguments||[])switch(o.name.value){case _e.SUBJECT:{if(o.value.kind!==Pe.Kind.STRING||o.value.value.length<1){r.push((0,De.invalidEventSubjectErrorMessage)(_e.SUBJECT));continue}i.push(o.value.value);break}case _e.PROVIDER_ID:{if(o.value.kind!==Pe.Kind.STRING||o.value.value.length<1){r.push(De.invalidEventProviderIdErrorMessage);continue}s=o.value.value;break}}if(!(r.length>0))return{fieldName:this.childName,providerId:s,providerType:_e.PROVIDER_TYPE_NATS,subjects:i,type:t}}getNatsSubscribeConfiguration(t,n){let r=[],i=_e.DEFAULT_EDFS_PROVIDER_ID,s="",o="";for(let u of t.arguments||[])switch(u.name.value){case _e.SUBJECTS:{if(u.value.kind!==Pe.Kind.LIST){n.push((0,De.invalidEventSubjectsErrorMessage)(_e.SUBJECTS));continue}for(let l of u.value.values){if(l.kind!==Pe.Kind.STRING||l.value.length<1){n.push((0,De.invalidEventSubjectsItemErrorMessage)(_e.SUBJECTS));break}r.push(l.value)}break}case _e.PROVIDER_ID:{if(u.value.kind!==Pe.Kind.STRING||u.value.value.length<1){n.push(De.invalidEventProviderIdErrorMessage);continue}i=u.value.value;break}case _e.STREAM_CONFIGURATION:{if(u.value.kind!==Pe.Kind.OBJECT||u.value.fields.length<1){n.push(De.invalidNatsStreamInputErrorMessage);continue}let l=!0,d=new Set,p=new Set([_e.CONSUMER_NAME,_e.STREAM_NAME]),y=new Set,N=new Set;for(let I of u.value.fields){let b=I.name.value;if(!_e.STREAM_CONFIGURATION_FIELD_NAMES.has(b)){d.add(b),l=!1;continue}if(p.has(b))p.delete(b);else{y.add(b),l=!1;continue}if(I.value.kind!==Pe.Kind.STRING||I.value.value.length<1){N.add(b),l=!1;continue}switch(b){case _e.CONSUMER_NAME:s=I.value.value;break;case _e.STREAM_NAME:o=I.value.value;break}}(!l||p.size>0)&&n.push((0,De.invalidNatsStreamInputFieldsErrorMessage)([...p],[...y],[...N],[...d]))}}if(!(n.length>0))return k({fieldName:this.childName,providerId:i,providerType:_e.PROVIDER_TYPE_NATS,subjects:r,type:_e.SUBSCRIBE},s&&o?{streamConfiguration:{consumerName:s,streamName:o}}:{})}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===Pe.OperationTypeNode.SUBSCRIPTION;for(let s of t.directives)if(s.name.value===_e.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,De.invalidSubscriptionFilterLocationError)(r));return}}extractEventDirectivesToConfiguration(t){if(!t.directives)return;let n=`${this.renamedParentTypeName||this.originalParentTypeName}.${this.childName}`;for(let r of t.directives){let i=[],s;switch(r.name.value){case _e.EDFS_KAFKA_PUBLISH:s=this.getKafkaPublishConfiguration(r,i);break;case _e.EDFS_KAFKA_SUBSCRIBE:s=this.getKafkaSubscribeConfiguration(r,i);break;case _e.EDFS_NATS_PUBLISH:{s=this.getNatsPublishAndRequestConfiguration(_e.PUBLISH,r,i);break}case _e.EDFS_NATS_REQUEST:{s=this.getNatsPublishAndRequestConfiguration(_e.REQUEST,r,i);break}case _e.EDFS_NATS_SUBSCRIBE:{s=this.getNatsSubscribeConfiguration(r,i);break}default:continue}if(i.length>0){this.errors.push((0,De.invalidEventDirectiveError)(r.name.value,n,i));continue}s&&(0,it.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(s)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case Pe.OperationTypeNode.MUTATION:return new Set([_e.EDFS_KAFKA_PUBLISH,_e.EDFS_NATS_PUBLISH,_e.EDFS_NATS_REQUEST]);case Pe.OperationTypeNode.QUERY:return new Set([_e.EDFS_NATS_REQUEST]);case Pe.OperationTypeNode.SUBSCRIPTION:return new Set([_e.EDFS_KAFKA_SUBSCRIBE,_e.EDFS_NATS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case _e.MUTATION:return Pe.OperationTypeNode.MUTATION;case _e.QUERY:return Pe.OperationTypeNode.QUERY;case _e.SUBSCRIPTION:return Pe.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let s=this.getOperationTypeNodeForRootTypeName(t.name);if(!s){this.errors.push((0,De.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(s);for(let[u,l]of t.fieldDataByFieldName){let d=`${l.originalParentTypeName}.${u}`,p=new Set;for(let j of _e.EVENT_DIRECTIVE_NAMES)l.directivesByDirectiveName.has(j)&&p.add(j);let y=new Set;for(let j of p)o.has(j)||y.add(j);if((p.size<1||y.size>0)&&n.set(d,{definesDirectives:p.size>0,invalidDirectiveNames:[...y]}),s===Pe.OperationTypeNode.MUTATION){let j=(0,Ha.printTypeNode)(l.type);j!==_e.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,j);continue}let N=(0,Ha.printTypeNode)(l.type),I=l.namedTypeName+"!",b=!1,x=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let j of x)if(b||(b=this.entityDataByTypeName.has(j)),b)break;(!b||N!==I)&&r.set(d,N)}}validateEventDrivenKeyDefinition(t,n){let r=this.keyFieldSetDataByTypeName.get(t);if(r)for(let[i,s]of r.isUnresolvableByKeyFieldSet)s||(0,it.getValueOrDefault)(n,t,()=>[]).push(i)}validateEventDrivenObjectFields(t,n,r,i){for(let[s,o]of t){let u=`${o.originalParentTypeName}.${s}`;if(n.has(s)){o.isExternalBySubgraphName.get(this.subgraphName)||r.set(u,s);continue}i.set(u,s)}}isEdfsPublishResultValid(){let t=this.parentDefinitionDataByTypeName.get(_e.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByFieldName.size!=1)return!1;for(let[n,r]of t.fieldDataByFieldName)if(r.argumentDataByArgumentName.size>0||n!==_e.SUCCESS||(0,Ha.printTypeNode)(r.type)!==_e.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(t.kind!==Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION||t.inputValueDataByValueName.size!=2)return!1;let n=new Set([_e.CONSUMER_NAME,_e.STREAM_NAME]);for(let[r,i]of t.inputValueDataByValueName)if(!n.has(r)||(n.delete(r),(0,Ha.printTypeNode)(i.type)!==_e.NON_NULLABLE_STRING))return!1;return n.size<1}validateEventDrivenSubgraph(){let t=[],n=new Map,r=new Map,i=new Map,s=new Map,o=new Map,u=new Map,l=new Set,d=new Set;for(let[p,y]of this.parentDefinitionDataByTypeName){if(p===_e.EDFS_PUBLISH_RESULT||p===_e.EDFS_NATS_STREAM_CONFIGURATION||y.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION)continue;if(y.isRootType){this.validateEventDrivenRootType(y,n,r,i);continue}let N=this.keyFieldNamesByParentTypeName.get(p);if(!N){d.add(p);continue}this.validateEventDrivenKeyDefinition(p,s),this.validateEventDrivenObjectFields(y.fieldDataByFieldName,N,o,u)}if(this.isEdfsPublishResultValid()||t.push(De.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(_e.EDFS_NATS_SUBSCRIBE)){let p=this.parentDefinitionDataByTypeName.get(_e.EDFS_NATS_STREAM_CONFIGURATION);p?this.isNatsStreamConfigurationInputObjectValid(p)||t.push(De.invalidNatsStreamConfigurationDefinitionErrorMessage):t.push(De.undefinedNatsStreamConfigurationInputErrorMessage)}n.size>0&&t.push((0,De.invalidRootTypeFieldEventsDirectivesErrorMessage)(n)),i.size>0&&t.push((0,De.invalidEventDrivenMutationResponseTypeErrorMessage)(i)),r.size>0&&t.push((0,De.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(r)),s.size>0&&t.push((0,De.invalidKeyFieldSetsEventDrivenErrorMessage)(s)),o.size>0&&t.push((0,De.nonExternalKeyFieldNamesEventDrivenErrorMessage)(o)),u.size>0&&t.push((0,De.nonKeyFieldNamesEventDrivenErrorMessage)(u)),l.size>0&&t.push((0,De.nonEntityObjectExtensionsEventDrivenErrorMessage)([...l])),d.size>0&&t.push((0,De.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...d])),t.length>0&&this.errors.push((0,De.invalidEventDrivenGraphError)(t))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,De.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,it.kindToTypeString)(i.kind)}"`)}n.length>0&&this.errors.push((0,De.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,it.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,n,()=>new Set).add(i),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(n,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(i),i,!0)}}validateAndAddKeyToConfiguration(t,n){let r=(0,it.getOrThrowError)(this.configurationDataByParentTypeName,(0,Wr.getParentTypeName)(t),"configurationDataByParentTypeName"),i=(0,oI.validateKeyFieldSets)(this,t,n.isUnresolvableByKeyFieldSet,r.fieldNames);i&&(r.keys=i)}validateAndAddKeysToConfiguration(){for(let[t,n]of this.keyFieldSetDataByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,De.undefinedObjectLikeParentError)(t));continue}this.validateAndAddKeyToConfiguration(r,n)}}normalize(t){(0,jR.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,jR.upsertParentsAndChildren)(this,t),(0,jR.consolidateAuthorizationDirectives)(this,t);for(let s of this.interfaceTypeNamesWithAuthorizationDirectives){let o=this.authorizationDataByParentTypeName.get(s);if(!o)continue;let u=this.concreteTypeNamesByAbstractTypeName.get(s);for(let l of u||[]){let d=(0,it.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,it.newAuthorizationData)(l));for(let[p,y]of o.fieldAuthorizationDataByFieldName)(0,it.upsertFieldAuthorizationData)(d.fieldAuthorizationDataByFieldName,y)||this.invalidOrScopesHostPaths.add(`${l}.${p}`)}}for(let[s,o]of this.heirFieldAuthorizationDataByTypeName){let u=this.authorizationDataByParentTypeName.get(s);if(u)for(let l of o)(0,it.mergeAuthorizationDataByAND)(u,l)||this.invalidOrScopesHostPaths.add(`${s}.${l.fieldName}`)}this.invalidOrScopesHostPaths.size>0&&this.errors.push((0,De.orScopesLimitError)(it.maxOrScopes,[...this.invalidOrScopesHostPaths]));let n=[];for(let s of zi.BASE_DIRECTIVE_DEFINITIONS)n.push(s);if(n.push(zi.FIELD_SET_SCALAR_DEFINITION),this.isSubgraphVersionTwo){for(let s of zi.VERSION_TWO_DIRECTIVE_DEFINITIONS)n.push(s),this.directiveDefinitionByDirectiveName.set(s.name.value,s);n.push(zi.SCOPE_SCALAR_DEFINITION)}for(let s of this.edfsDirectiveReferences){let o=zi.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME.get(s);if(!o){this.errors.push((0,De.invalidEdfsDirectiveName)(s));continue}n.push(o)}this.edfsDirectiveReferences.size>0&&this.referencedDirectiveNames.has(_e.SUBSCRIPTION_FILTER)&&(this.directiveDefinitionByDirectiveName.set(_e.SUBSCRIPTION_FILTER,zi.SUBSCRIPTION_FILTER_DEFINITION),n.push(zi.SUBSCRIPTION_FILTER_DEFINITION),n.push(zi.SUBSCRIPTION_FILTER_CONDITION_DEFINITION),n.push(zi.SUBSCRIPTION_FIELD_CONDITION_DEFINITION),n.push(zi.SUBSCRIPTION_FILTER_VALUE_DEFINITION));for(let s of this.customDirectiveDefinitions.values())n.push(s);this.schemaDefinition.operationTypes.size>0&&n.push((0,Wr.getSchemaNodeByData)(this.schemaDefinition,this.errors,this.directiveDefinitionByDirectiveName));for(let[s,o]of this.parentDefinitionDataByTypeName)switch(o.kind){case Pe.Kind.ENUM_TYPE_DEFINITION:if(o.enumValueDataByValueName.size<1){this.errors.push((0,De.noDefinedEnumValuesError)(s));break}n.push((0,Wr.getEnumNodeByData)(o,this.errors,this.directiveDefinitionByDirectiveName,this.authorizationDataByParentTypeName));break;case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:if(o.inputValueDataByValueName.size<1){this.errors.push((0,De.noInputValueDefinitionsError)(s));break}n.push((0,Wr.getInputObjectNodeByData)(o,this.errors,this.directiveDefinitionByDirectiveName,this.authorizationDataByParentTypeName));break;case Pe.Kind.INTERFACE_TYPE_DEFINITION:case Pe.Kind.OBJECT_TYPE_DEFINITION:let u=this.entityDataByTypeName.has(s),l=this.operationTypeNodeByTypeName.get(s),d=o.kind===Pe.Kind.OBJECT_TYPE_DEFINITION;if(l&&(o.fieldDataByFieldName.delete(_e.SERVICE_FIELD),o.fieldDataByFieldName.delete(_e.ENTITIES_FIELD)),this.parentsWithChildArguments.has(s)||!d){let b=[];for(let[x,j]of o.fieldDataByFieldName)!d&&j.isExternalBySubgraphName.get(this.subgraphName)&&b.push(x),this.validateArguments(j,`${s}.${x}`);b.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,De.externalInterfaceFieldsError)(s,b)):this.warnings.push((0,vq.externalInterfaceFieldsWarning)(this.subgraphName,s,b)))}let p=o.kind===Pe.Kind.OBJECT_TYPE_DEFINITION&&o.renamedTypeName||s,y={fieldNames:new Set,isRootNode:u,typeName:p},N=this.entityInterfaceDataByTypeName.get(s);N&&(N.fieldDatas=(0,it.fieldDatasToSimpleFieldDatas)(o.fieldDataByFieldName.values()),N.concreteTypeNames=(0,it.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,s,()=>new Set),y.isInterfaceObject=N.isInterfaceObject,y.entityInterfaceConcreteTypeNames=N.concreteTypeNames);let I=this.eventsConfigurations.get(p);I&&(y.events=I),this.configurationDataByParentTypeName.set(p,y),(0,oI.addFieldNamesToConfigurationData)(o.fieldDataByFieldName,y),this.validateInterfaceImplementations(o),n.push((0,Wr.getCompositeOutputNodeByData)(o,this.errors,this.directiveDefinitionByDirectiveName,this.authorizationDataByParentTypeName)),o.fieldDataByFieldName.size<1&&!(0,oI.isNodeQuery)(s,l)&&this.errors.push((0,De.noFieldDefinitionsError)((0,it.kindToTypeString)(o.kind),s));break;case Pe.Kind.SCALAR_TYPE_DEFINITION:if(o.extensionType===Ql.ExtensionType.REAL){this.errors.push((0,De.noBaseScalarDefinitionError)(s));break}n.push((0,Wr.getScalarNodeByData)(o,this.errors,this.directiveDefinitionByDirectiveName));break;case Pe.Kind.UNION_TYPE_DEFINITION:n.push((0,Wr.getUnionNodeByData)(o,this.errors,this.directiveDefinitionByDirectiveName)),this.validateUnionMembers(o);break;default:throw(0,De.unexpectedKindFatalError)(s)}for(let s of Object.values(Pe.OperationTypeNode)){let o=this.schemaDefinition.operationTypes.get(s),u=(0,it.getOrThrowError)(Hi.operationTypeNodeToDefaultType,s,_e.OPERATION_TO_DEFAULT),l=o?(0,Wa.getTypeNodeNamedTypeName)(o.type):u;if(l!==u&&this.parentDefinitionDataByTypeName.has(u)){this.errors.push((0,De.invalidRootTypeDefinitionError)(s,l,u));continue}let d=this.parentDefinitionDataByTypeName.get(l);if(o){if(!d){this.errors.push((0,De.undefinedTypeError)(l));continue}this.operationTypeNodeByTypeName.set(l,s)}if(!d)continue;let p=this.configurationDataByParentTypeName.get(u);if(p&&(p.isRootNode=!0,p.typeName=u),d.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,De.operationDefinitionError)(l,s,d.kind));continue}for(let y of d.fieldDataByFieldName.values()){let N=(0,Wa.getTypeNodeNamedTypeName)(y.node.type);!zi.BASE_SCALARS.has(N)&&!this.parentDefinitionDataByTypeName.has(N)&&this.errors.push((0,De.undefinedTypeError)(N))}}for(let s of this.referencedTypeNames){let o=this.parentDefinitionDataByTypeName.get(s);if(o){if(o.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION)continue;let u=this.concreteTypeNamesByAbstractTypeName.get(s);(!u||u.size<0)&&this.warnings.push((0,De.unimplementedInterfaceOutputTypeError)(s));continue}this.entityDataByTypeName.has(s)||this.errors.push((0,De.undefinedTypeError)(s))}this.validateAndAddKeysToConfiguration();for(let[s,o]of this.fieldSetDataByTypeName){let u=this.parentDefinitionDataByTypeName.get(s);if(!u||u.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION&&u.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,De.undefinedObjectLikeParentError)(s));continue}(0,oI.validateAndAddConditionalFieldSetsToConfiguration)(this,u,o)}let r=new Map;for(let s of this.directiveDefinitionByDirectiveName.values()){let o=(0,Hi.extractExecutableDirectiveLocations)(s.locations,new Set);o.size<1||(0,Wr.addPersistedDirectiveDefinitionDataByNode)(r,s,this.errors,this.directiveDefinitionByDirectiveName,this.handledRepeatedDirectivesByHostPath,o,this.subgraphName)}if(this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph(),this.errors.length>0)return{errors:this.errors,warnings:this.warnings};let i={kind:Pe.Kind.DOCUMENT,definitions:n};return{normalizationResult:{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoordinates,configurationDataByTypeName:this.configurationDataByParentTypeName,entityDataByTypeName:this.entityDataByTypeName,entityInterfaces:this.entityInterfaceDataByTypeName,isEventDrivenGraph:this.isSubgraphEventDrivenGraph,isVersionTwo:this.isSubgraphVersionTwo,keyFieldNamesByParentTypeName:this.keyFieldNamesByParentTypeName,operationTypes:this.operationTypeNodeByTypeName,originalTypeNameByRenamedTypeName:this.originalTypeNameByRenamedTypeName,overridesByTargetSubgraphName:this.overridesByTargetSubgraphName,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:r,subgraphAST:i,subgraphString:(0,Pe.print)(i),schema:(0,nde.buildASTSchema)(i,{assumeValid:!0,assumeValidSDL:!0})},warnings:this.warnings}}};Yl.NormalizationFactory=pT;function sde(e){let t=new Map,n=new Map,r=new Map,i=new Map,s=new Map,o=new Map,u=new Set,l=new Map,d=new Set,p=new Set,y=[],N=new Set,I=[],b=[];for(let Q of e)Q.name&&(0,rde.recordSubgraphName)(Q.name,d,p);let x=new $R.Graph;for(let Q=0;Q0&&I.push(...Ce),pe){b.push((0,De.subgraphValidationError)(se,pe));continue}if(!ye){b.push((0,De.subgraphValidationError)(se,[De.subgraphValidationFailureError]));continue}l.set(se,ye.parentDefinitionDataByTypeName);for(let ht of ye.authorizationDataByParentTypeName.values())(0,it.upsertAuthorizationData)(t,ht,N);for(let[ht,xt]of ye.concreteTypeNamesByAbstractTypeName){let B=n.get(ht);if(!B){n.set(ht,new Set(xt));continue}(0,it.addIterableValuesToSet)(xt,B)}for(let ht of ye.entityDataByTypeName.values())(0,it.upsertEntityData)(r,ht);if(re.name&&i.set(se,{conditionalFieldDataByCoordinates:ye.conditionalFieldDataByCoordinates,configurationDataByTypeName:ye.configurationDataByTypeName,definitions:ye.subgraphAST,entityInterfaces:ye.entityInterfaces,isVersionTwo:ye.isVersionTwo,keyFieldNamesByParentTypeName:ye.keyFieldNamesByParentTypeName,name:se,operationTypes:ye.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:ye.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:ye.persistedDirectiveDefinitionDataByDirectiveName,schema:ye.schema,url:re.url}),!(ye.overridesByTargetSubgraphName.size<1))for(let[ht,xt]of ye.overridesByTargetSubgraphName){let B=d.has(ht);for(let[he,nt]of xt){let Ct=ye.originalTypeNameByRenamedTypeName.get(he)||he;if(!B)I.push((0,vq.invalidOverrideTargetSubgraphNameWarning)(ht,Ct,[...nt]));else{let sn=(0,it.getValueOrDefault)(s,ht,()=>new Map),Fn=(0,it.getValueOrDefault)(sn,he,()=>new Set(nt));(0,it.addIterableValuesToSet)(nt,Fn)}for(let sn of nt){let Fn=`${Ct}.${sn}`,_n=o.get(Fn);if(!_n){o.set(Fn,[se]);continue}_n.push(se),u.add(Fn)}}}}let j=[];if(N.size>0&&j.push((0,De.orScopesLimitError)(it.maxOrScopes,[...N])),(y.length>0||p.size>0)&&j.push((0,De.invalidSubgraphNamesError)([...p],y)),u.size>0){let Q=[];for(let re of u){let se=(0,it.getOrThrowError)(o,re,"overrideSourceSubgraphNamesByFieldPath");Q.push((0,De.duplicateOverriddenFieldErrorMessage)(re,se))}j.push((0,De.duplicateOverriddenFieldsError)(Q))}if(j.push(...b),j.length>0)return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,errors:j,internalSubgraphBySubgraphName:i,internalGraph:x,warnings:I};for(let[Q,re]of s){let se=(0,it.getOrThrowError)(i,Q,"internalSubgraphBySubgraphName");se.overriddenFieldNamesByParentTypeName=re;for(let[pe,ye]of re){let Ce=se.configurationDataByTypeName.get(pe);Ce&&((0,it.subtractSourceSetFromTargetSet)(ye,Ce.fieldNames),Ce.fieldNames.size<1&&se.configurationDataByTypeName.delete(pe))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,internalSubgraphBySubgraphName:i,internalGraph:x,warnings:I}}});var aI=V(Hl=>{"use strict";m();T();h();Object.defineProperty(Hl,"__esModule",{value:!0});Hl.DivergentType=void 0;Hl.getLeastRestrictiveMergedTypeNode=ade;Hl.getMostRestrictiveMergedTypeNode=ude;Hl.renameNamedTypeName=cde;var Jl=(we(),Me(je)),Oq=To(),ode=$a(),bq=Vi(),Sq=_h(),zl;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(zl||(Hl.DivergentType=zl={}));function Dq(e,t,n,r,i){t=(0,ode.getMutableTypeNode)(t,n,i);let s={kind:e.kind},o=zl.NONE,u=s;for(let l=0;l{"use strict";m();T();h();Object.defineProperty(GR,"__esModule",{value:!0});GR.renameRootTypes=pde;var lde=(we(),Me(je)),Fc=bi(),Wl=ps(),KR=Vi(),dde=aI();function pde(e,t){let n,r=!1,i;(0,lde.visit)(t.definitions,{FieldDefinition:{enter(s){let o=s.name.value;if(r&&(o===Fc.SERVICE_FIELD||o===Fc.ENTITIES_FIELD))return n.fieldDataByFieldName.delete(o),!1;let u=n.name,l=(0,Wl.getOrThrowError)(n.fieldDataByFieldName,o,`${u}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let p=(0,Wl.getOrThrowError)(KR.operationTypeNodeToDefaultType,d,Fc.OPERATION_TO_DEFAULT);l.namedTypeName!==p&&(0,dde.renameNamedTypeName)(l,p,e.errors)}return i!=null&&i.has(o)&&l.isShareableBySubgraphName.delete(t.name),!1}},InterfaceTypeDefinition:{enter(s){let o=s.name.value;if(!e.entityInterfaceFederationDataByTypeName.get(o))return!1;n=(0,Wl.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Fc.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(s){let o=s.name.value,u=t.operationTypes.get(o),l=u?(0,Wl.getOrThrowError)(KR.operationTypeNodeToDefaultType,u,Fc.OPERATION_TO_DEFAULT):o;n=(0,Wl.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Fc.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(s){let o=s.name.value,u=t.operationTypes.get(o),l=u?(0,Wl.getOrThrowError)(KR.operationTypeNodeToDefaultType,u,Fc.OPERATION_TO_DEFAULT):o;n=(0,Wl.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Fc.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 Aq=V((Jp,fT)=>{"use strict";m();T();h();(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",s="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",u=500,l="__lodash_placeholder__",d=1,p=2,y=4,N=1,I=2,b=1,x=2,j=4,Q=8,re=16,se=32,pe=64,ye=128,Ce=256,ht=512,xt=30,B="...",he=800,nt=16,Ct=1,sn=2,Fn=3,_n=1/0,bn=9007199254740991,mi=17976931348623157e292,Xr=NaN,Pn=4294967295,on=Pn-1,$n=Pn>>>1,U=[["ary",ye],["bind",b],["bindKey",x],["curry",Q],["curryRight",re],["flip",ht],["partial",se],["partialRight",pe],["rearg",Ce]],ae="[object Arguments]",te="[object Array]",ce="[object AsyncFunction]",Ke="[object Boolean]",G="[object Date]",ee="[object DOMException]",Ue="[object Error]",Xe="[object Function]",jt="[object GeneratorFunction]",Je="[object Map]",Ht="[object Number]",pa="[object Null]",Li="[object Object]",fa="[object Promise]",id="[object Proxy]",Do="[object RegExp]",Gr="[object Set]",Wi="[object String]",cn="[object Symbol]",Qr="[object Undefined]",xc="[object WeakMap]",Ao="[object WeakSet]",Cc="[object ArrayBuffer]",F="[object DataView]",g="[object Float32Array]",v="[object Float64Array]",C="[object Int8Array]",J="[object Int16Array]",ie="[object Int32Array]",fe="[object Uint8Array]",Rt="[object Uint8ClampedArray]",kn="[object Uint16Array]",Dn="[object Uint32Array]",qn=/\b__p \+= '';/g,On=/\b(__p \+=) '' \+/g,xK=/(__e\(.*?\)|\b__t\)) \+\n'';/g,AF=/&(?:amp|lt|gt|quot|#39);/g,RF=/[&<>"']/g,CK=RegExp(AF.source),UK=RegExp(RF.source),MK=/<%-([\s\S]+?)%>/g,BK=/<%([\s\S]+?)%>/g,FF=/<%=([\s\S]+?)%>/g,VK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jK=/^\w*$/,$K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,BI=/[\\^$.*+?()[\]{}|]/g,qK=RegExp(BI.source),VI=/^\s+/,KK=/\s/,GK=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,QK=/\{\n\/\* \[wrapped with (.+)\] \*/,YK=/,? & /,JK=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zK=/[()=,{}\[\]\/\s]/,HK=/\\(\\)?/g,WK=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,wF=/\w*$/,XK=/^[-+]0x[0-9a-f]+$/i,ZK=/^0b[01]+$/i,eG=/^\[object .+?Constructor\]$/,tG=/^0o[0-7]+$/i,nG=/^(?:0|[1-9]\d*)$/,rG=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,LT=/($^)/,iG=/['\n\r\u2028\u2029\\]/g,PT="\\ud800-\\udfff",sG="\\u0300-\\u036f",oG="\\ufe20-\\ufe2f",aG="\\u20d0-\\u20ff",LF=sG+oG+aG,PF="\\u2700-\\u27bf",kF="a-z\\xdf-\\xf6\\xf8-\\xff",uG="\\xac\\xb1\\xd7\\xf7",cG="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",lG="\\u2000-\\u206f",dG=" \\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",xF="A-Z\\xc0-\\xd6\\xd8-\\xde",CF="\\ufe0e\\ufe0f",UF=uG+cG+lG+dG,jI="['\u2019]",pG="["+PT+"]",MF="["+UF+"]",kT="["+LF+"]",BF="\\d+",fG="["+PF+"]",VF="["+kF+"]",jF="[^"+PT+UF+BF+PF+kF+xF+"]",$I="\\ud83c[\\udffb-\\udfff]",mG="(?:"+kT+"|"+$I+")",$F="[^"+PT+"]",qI="(?:\\ud83c[\\udde6-\\uddff]){2}",KI="[\\ud800-\\udbff][\\udc00-\\udfff]",sd="["+xF+"]",qF="\\u200d",KF="(?:"+VF+"|"+jF+")",hG="(?:"+sd+"|"+jF+")",GF="(?:"+jI+"(?:d|ll|m|re|s|t|ve))?",QF="(?:"+jI+"(?:D|LL|M|RE|S|T|VE))?",YF=mG+"?",JF="["+CF+"]?",TG="(?:"+qF+"(?:"+[$F,qI,KI].join("|")+")"+JF+YF+")*",yG="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",NG="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",zF=JF+YF+TG,EG="(?:"+[fG,qI,KI].join("|")+")"+zF,gG="(?:"+[$F+kT+"?",kT,qI,KI,pG].join("|")+")",IG=RegExp(jI,"g"),vG=RegExp(kT,"g"),GI=RegExp($I+"(?="+$I+")|"+gG+zF,"g"),_G=RegExp([sd+"?"+VF+"+"+GF+"(?="+[MF,sd,"$"].join("|")+")",hG+"+"+QF+"(?="+[MF,sd+KF,"$"].join("|")+")",sd+"?"+KF+"+"+GF,sd+"+"+QF,NG,yG,BF,EG].join("|"),"g"),bG=RegExp("["+qF+PT+LF+CF+"]"),OG=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,SG=["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"],DG=-1,Vn={};Vn[g]=Vn[v]=Vn[C]=Vn[J]=Vn[ie]=Vn[fe]=Vn[Rt]=Vn[kn]=Vn[Dn]=!0,Vn[ae]=Vn[te]=Vn[Cc]=Vn[Ke]=Vn[F]=Vn[G]=Vn[Ue]=Vn[Xe]=Vn[Je]=Vn[Ht]=Vn[Li]=Vn[Do]=Vn[Gr]=Vn[Wi]=Vn[xc]=!1;var xn={};xn[ae]=xn[te]=xn[Cc]=xn[F]=xn[Ke]=xn[G]=xn[g]=xn[v]=xn[C]=xn[J]=xn[ie]=xn[Je]=xn[Ht]=xn[Li]=xn[Do]=xn[Gr]=xn[Wi]=xn[cn]=xn[fe]=xn[Rt]=xn[kn]=xn[Dn]=!0,xn[Ue]=xn[Xe]=xn[xc]=!1;var AG={\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"},RG={"&":"&","<":"<",">":">",'"':""","'":"'"},FG={"&":"&","<":"<",">":">",""":'"',"'":"'"},wG={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},LG=parseFloat,PG=parseInt,HF=typeof global=="object"&&global&&global.Object===Object&&global,kG=typeof self=="object"&&self&&self.Object===Object&&self,Cr=HF||kG||Function("return this")(),QI=typeof Jp=="object"&&Jp&&!Jp.nodeType&&Jp,Uc=QI&&typeof fT=="object"&&fT&&!fT.nodeType&&fT,WF=Uc&&Uc.exports===QI,YI=WF&&HF.process,Ns=function(){try{var H=Uc&&Uc.require&&Uc.require("util").types;return H||YI&&YI.binding&&YI.binding("util")}catch(de){}}(),XF=Ns&&Ns.isArrayBuffer,ZF=Ns&&Ns.isDate,ew=Ns&&Ns.isMap,tw=Ns&&Ns.isRegExp,nw=Ns&&Ns.isSet,rw=Ns&&Ns.isTypedArray;function Xi(H,de,oe){switch(oe.length){case 0:return H.call(de);case 1:return H.call(de,oe[0]);case 2:return H.call(de,oe[0],oe[1]);case 3:return H.call(de,oe[0],oe[1],oe[2])}return H.apply(de,oe)}function xG(H,de,oe,Be){for(var _t=-1,pn=H==null?0:H.length;++_t-1}function JI(H,de,oe){for(var Be=-1,_t=H==null?0:H.length;++Be<_t;)if(oe(de,H[Be]))return!0;return!1}function Kn(H,de){for(var oe=-1,Be=H==null?0:H.length,_t=Array(Be);++oe-1;);return oe}function dw(H,de){for(var oe=H.length;oe--&&od(de,H[oe],0)>-1;);return oe}function KG(H,de){for(var oe=H.length,Be=0;oe--;)H[oe]===de&&++Be;return Be}var GG=XI(AG),QG=XI(RG);function YG(H){return"\\"+wG[H]}function JG(H,de){return H==null?e:H[de]}function ad(H){return bG.test(H)}function zG(H){return OG.test(H)}function HG(H){for(var de,oe=[];!(de=H.next()).done;)oe.push(de.value);return oe}function nv(H){var de=-1,oe=Array(H.size);return H.forEach(function(Be,_t){oe[++de]=[_t,Be]}),oe}function pw(H,de){return function(oe){return H(de(oe))}}function Qu(H,de){for(var oe=-1,Be=H.length,_t=0,pn=[];++oe-1}function UQ(a,c){var f=this.__data__,E=XT(f,a);return E<0?(++this.size,f.push([a,c])):f[E][1]=c,this}ma.prototype.clear=PQ,ma.prototype.delete=kQ,ma.prototype.get=xQ,ma.prototype.has=CQ,ma.prototype.set=UQ;function ha(a){var c=-1,f=a==null?0:a.length;for(this.clear();++c=c?a:c)),a}function vs(a,c,f,E,_,L){var M,q=c&d,X=c&p,Te=c&y;if(f&&(M=_?f(a,E,_,L):f(a)),M!==e)return M;if(!Zn(a))return a;var Ne=St(a);if(Ne){if(M=j2(a),!q)return Pi(a,M)}else{var Ie=ei(a),Fe=Ie==Xe||Ie==jt;if(Zu(a))return Jw(a,q);if(Ie==Li||Ie==ae||Fe&&!_){if(M=X||Fe?{}:fL(a),!q)return X?F2(a,ZQ(M,a)):R2(a,bw(M,a))}else{if(!xn[Ie])return _?a:{};M=$2(a,Ie,q)}}L||(L=new to);var ze=L.get(a);if(ze)return ze;L.set(a,M),$L(a)?a.forEach(function(dt){M.add(vs(dt,c,f,dt,a,L))}):VL(a)&&a.forEach(function(dt,$t){M.set($t,vs(dt,c,f,$t,a,L))});var lt=Te?X?Av:Dv:X?xi:Ur,Ut=Ne?e:lt(a);return Es(Ut||a,function(dt,$t){Ut&&($t=dt,dt=a[$t]),df(M,$t,vs(dt,c,f,$t,a,L))}),M}function e2(a){var c=Ur(a);return function(f){return Ow(f,a,c)}}function Ow(a,c,f){var E=f.length;if(a==null)return!E;for(a=wn(a);E--;){var _=f[E],L=c[_],M=a[_];if(M===e&&!(_ in a)||!L(M))return!1}return!0}function Sw(a,c,f){if(typeof a!="function")throw new gs(i);return Nf(function(){a.apply(e,f)},c)}function pf(a,c,f,E){var _=-1,L=xT,M=!0,q=a.length,X=[],Te=c.length;if(!q)return X;f&&(c=Kn(c,Zi(f))),E?(L=JI,M=!1):c.length>=n&&(L=sf,M=!1,c=new Vc(c));e:for(;++__?0:_+f),E=E===e||E>_?_:Lt(E),E<0&&(E+=_),E=f>E?0:KL(E);f0&&f(q)?c>1?Yr(q,c-1,f,E,_):Gu(_,q):E||(_[_.length]=q)}return _}var cv=eL(),Rw=eL(!0);function Ro(a,c){return a&&cv(a,c,Ur)}function lv(a,c){return a&&Rw(a,c,Ur)}function ey(a,c){return Ku(c,function(f){return ga(a[f])})}function $c(a,c){c=Wu(c,a);for(var f=0,E=c.length;a!=null&&fc}function r2(a,c){return a!=null&&Sn.call(a,c)}function i2(a,c){return a!=null&&c in wn(a)}function s2(a,c,f){return a>=Zr(c,f)&&a=120&&Ne.length>=120)?new Vc(M&&Ne):e}Ne=a[0];var Ie=-1,Fe=q[0];e:for(;++Ie<_&&Te.length-1;)q!==a&>.call(q,X,1),GT.call(a,X,1);return a}function Vw(a,c){for(var f=a?c.length:0,E=f-1;f--;){var _=c[f];if(f==E||_!==L){var L=_;Ea(_)?GT.call(a,_,1):gv(a,_)}}return a}function yv(a,c){return a+JT(gw()*(c-a+1))}function N2(a,c,f,E){for(var _=-1,L=Ar(YT((c-a)/(f||1)),0),M=oe(L);L--;)M[E?L:++_]=a,a+=f;return M}function Nv(a,c){var f="";if(!a||c<1||c>bn)return f;do c%2&&(f+=a),c=JT(c/2),c&&(a+=a);while(c);return f}function Bt(a,c){return xv(TL(a,c,Ci),a+"")}function E2(a){return _w(yd(a))}function g2(a,c){var f=yd(a);return dy(f,jc(c,0,f.length))}function hf(a,c,f,E){if(!Zn(a))return a;c=Wu(c,a);for(var _=-1,L=c.length,M=L-1,q=a;q!=null&&++__?0:_+c),f=f>_?_:f,f<0&&(f+=_),_=c>f?0:f-c>>>0,c>>>=0;for(var L=oe(_);++E<_;)L[E]=a[E+c];return L}function _2(a,c){var f;return zu(a,function(E,_,L){return f=c(E,_,L),!f}),!!f}function ny(a,c,f){var E=0,_=a==null?E:a.length;if(typeof c=="number"&&c===c&&_<=$n){for(;E<_;){var L=E+_>>>1,M=a[L];M!==null&&!ts(M)&&(f?M<=c:M=n){var Te=c?null:k2(a);if(Te)return UT(Te);M=!1,_=sf,X=new Vc}else X=c?[]:q;e:for(;++E=E?a:_s(a,c,f)}var Yw=dQ||function(a){return Cr.clearTimeout(a)};function Jw(a,c){if(c)return a.slice();var f=a.length,E=hw?hw(f):new a.constructor(f);return a.copy(E),E}function bv(a){var c=new a.constructor(a.byteLength);return new qT(c).set(new qT(a)),c}function O2(a,c){var f=c?bv(a.buffer):a.buffer;return new a.constructor(f,a.byteOffset,a.byteLength)}function S2(a){var c=new a.constructor(a.source,wF.exec(a));return c.lastIndex=a.lastIndex,c}function D2(a){return lf?wn(lf.call(a)):{}}function zw(a,c){var f=c?bv(a.buffer):a.buffer;return new a.constructor(f,a.byteOffset,a.length)}function Hw(a,c){if(a!==c){var f=a!==e,E=a===null,_=a===a,L=ts(a),M=c!==e,q=c===null,X=c===c,Te=ts(c);if(!q&&!Te&&!L&&a>c||L&&M&&X&&!q&&!Te||E&&M&&X||!f&&X||!_)return 1;if(!E&&!L&&!Te&&a=q)return X;var Te=f[E];return X*(Te=="desc"?-1:1)}}return a.index-c.index}function Ww(a,c,f,E){for(var _=-1,L=a.length,M=f.length,q=-1,X=c.length,Te=Ar(L-M,0),Ne=oe(X+Te),Ie=!E;++q1?f[_-1]:e,M=_>2?f[2]:e;for(L=a.length>3&&typeof L=="function"?(_--,L):e,M&&Ti(f[0],f[1],M)&&(L=_<3?e:L,_=1),c=wn(c);++E<_;){var q=f[E];q&&a(c,q,E,L)}return c})}function Zw(a,c){return function(f,E){if(f==null)return f;if(!ki(f))return a(f,E);for(var _=f.length,L=c?_:-1,M=wn(f);(c?L--:++L<_)&&E(M[L],L,M)!==!1;);return f}}function eL(a){return function(c,f,E){for(var _=-1,L=wn(c),M=E(c),q=M.length;q--;){var X=M[a?q:++_];if(f(L[X],X,L)===!1)break}return c}}function w2(a,c,f){var E=c&b,_=Tf(a);function L(){var M=this&&this!==Cr&&this instanceof L?_:a;return M.apply(E?f:this,arguments)}return L}function tL(a){return function(c){c=yn(c);var f=ad(c)?eo(c):e,E=f?f[0]:c.charAt(0),_=f?Xu(f,1).join(""):c.slice(1);return E[a]()+_}}function md(a){return function(c){return zI(ZL(XL(c).replace(IG,"")),a,"")}}function Tf(a){return function(){var c=arguments;switch(c.length){case 0:return new a;case 1:return new a(c[0]);case 2:return new a(c[0],c[1]);case 3:return new a(c[0],c[1],c[2]);case 4:return new a(c[0],c[1],c[2],c[3]);case 5:return new a(c[0],c[1],c[2],c[3],c[4]);case 6:return new a(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new a(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var f=pd(a.prototype),E=a.apply(f,c);return Zn(E)?E:f}}function L2(a,c,f){var E=Tf(a);function _(){for(var L=arguments.length,M=oe(L),q=L,X=hd(_);q--;)M[q]=arguments[q];var Te=L<3&&M[0]!==X&&M[L-1]!==X?[]:Qu(M,X);if(L-=Te.length,L-1?_[L?c[M]:M]:e}}function rL(a){return Na(function(c){var f=c.length,E=f,_=Is.prototype.thru;for(a&&c.reverse();E--;){var L=c[E];if(typeof L!="function")throw new gs(i);if(_&&!M&&cy(L)=="wrapper")var M=new Is([],!0)}for(E=M?E:f;++E1&&Wt.reverse(),Ne&&X<$t&&(Wt.length=X),this&&this!==Cr&&this instanceof dt&&(va=Ut||Tf(va)),va.apply(ro,Wt)}return dt}function iL(a,c){return function(f,E){return o2(f,a,c(E),{})}}function oy(a,c){return function(f,E){var _;if(f===e&&E===e)return c;if(f!==e&&(_=f),E!==e){if(_===e)return E;typeof f=="string"||typeof E=="string"?(f=es(f),E=es(E)):(f=qw(f),E=qw(E)),_=a(f,E)}return _}}function Ov(a){return Na(function(c){return c=Kn(c,Zi(ct())),Bt(function(f){var E=this;return a(c,function(_){return Xi(_,E,f)})})})}function ay(a,c){c=c===e?" ":es(c);var f=c.length;if(f<2)return f?Nv(c,a):c;var E=Nv(c,YT(a/ud(c)));return ad(c)?Xu(eo(E),0,a).join(""):E.slice(0,a)}function P2(a,c,f,E){var _=c&b,L=Tf(a);function M(){for(var q=-1,X=arguments.length,Te=-1,Ne=E.length,Ie=oe(Ne+X),Fe=this&&this!==Cr&&this instanceof M?L:a;++Teq))return!1;var Te=L.get(a),Ne=L.get(c);if(Te&&Ne)return Te==c&&Ne==a;var Ie=-1,Fe=!0,ze=f&I?new Vc:e;for(L.set(a,c),L.set(c,a);++Ie1?"& ":"")+c[E],c=c.join(f>2?", ":" "),a.replace(GK,`{ +`+r;return{outputEnd:r,outputStart:n,pathNodes:t}}function gq({outputEnd:e,outputStart:t,pathNodes:n},r){return t+Gl.LITERAL_SPACE.repeat(n.length+1)+Zle(r,n.length)+e}function ede(e,t){return t?e?`${t}${e}`:t:e}function tde({entityAncestorData:e,errors:t,nodeResolutionDataByFieldPath:n,pathFromRoot:r,rootFieldData:i,unresolvableFieldPaths:s}){let o=[];for(let u of s){let l=(0,Tq.getOrThrowError)(n,u,"nodeResolutionDataByFieldPath"),d=new Map;for(let[N,I]of l.fieldDataByFieldName)l.resolvedFieldNames.has(N)||d.set(N,I);let p=ede(u,r),y=Eq(p);for(let[N,I]of d)o.push({fieldName:N,selectionSet:gq(y,I),subgraphNames:I.subgraphNames,typeName:l.typeName})}for(let u of o)t.push((0,yq.unresolvablePathError)(u,Nq({rootFieldData:i,unresolvableFieldData:u,entityAncestorData:e})))}});var VR=V(sI=>{"use strict";m();T();h();Object.defineProperty(sI,"__esModule",{value:!0});sI.Graph=void 0;var Fi=ps(),Iq=bi(),Qp=xR(),Yp=UR(),MR=class{constructor(){A(this,"edgeId",-1);A(this,"entityDataNodes",new Map);A(this,"entityNodeNamesBySharedFieldPath",new Map);A(this,"nodeByNodeName",new Map);A(this,"nodesByTypeName",new Map);A(this,"rootNodeByRootTypeName",new Map);A(this,"subgraphName",Iq.N_A);A(this,"resolvableFieldNamesByRelativeFieldPathByEntityNodeName",new Map);A(this,"nodeResolutionDataByFieldPath",new Map);A(this,"unresolvableFieldPaths",new Set);A(this,"failureResultByEntityNodeName",new Map);A(this,"walkerIndex",-1)}getRootNode(t){return(0,Fi.getValueOrDefault)(this.rootNodeByRootTypeName,t,()=>new Qp.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 s=new Qp.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,s),(0,Fi.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(s),s}addEdge(t,n,r,i=!1){if(t.isRootNode){let u=new Qp.Edge(this.getNextEdgeId(),n,r);return(0,Fi.getValueOrDefault)(t.headToShareableTailEdges,r,()=>[]).push(u),u}let s=t,o=new Qp.Edge(this.getNextEdgeId(),n,i?n.typeName:r,i);return s.headToTailEdges.set(r,o),o}addEntityDataNode(t){let n=this.entityDataNodes.get(t);if(n)return n;let r=new Qp.EntityDataNode(t);return this.entityDataNodes.set(t,r),r}getNextEdgeId(){return this.edgeId+=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.entityDataNodes.get(t);if(Iq.ROOT_TYPE_NAMES.has(t)){let s=this.getRootNode(t);s.removeInaccessibleEdges(n),s.fieldDataByFieldName=n;return}let i=this.nodesByTypeName.get(t);if(i){for(let s of i)if(s.fieldDataByFieldName=n,s.handleInaccessibleEdges(),s.isLeaf=!1,!!r){s.hasEntitySiblings=!0;for(let o of s.satisfiedFieldSets){let u=r.targetSubgraphNamesByFieldSet.get(o);for(let l of u||[]){if(l===s.subgraphName)continue;let d=this.nodeByNodeName.get(`${l}.${s.typeName}`);d&&s.entityEdges.push(new Qp.Edge(this.getNextEdgeId(),d,""))}}}}}setSubgraphName(t){this.subgraphName=t}validateEntities(t,n){let r=new Map;for(let[i,s]of t){let o=s.size>1,u,l=o?new Map:void 0,d=new Set,p=new Map;for(let y of s){let N=this.nodeByNodeName.get(y);if(!N)throw new Error(`Fatal: Could not find entity node for "${y}".`);if(this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName.get(y)){let Q=this.failureResultByEntityNodeName.get(y);if(!Q){u=void 0;break}if(!o)return Q}let _=this.nodesByTypeName.get(N.typeName)||[],C=(0,Fi.getValueOrDefault)(r,y,()=>o?p:new Map),j=new BR({interSubgraphNodes:_,entityNodeNamesBySharedFieldPath:C,originNode:N,resolvableFieldNamesByRelativeFieldPathByEntityNodeName:this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName,walkerIndex:this.walkerIndex+=1,sharedResolvableFieldNamesByRelativeFieldPath:l,unresolvableSharedFieldPaths:d});if(j.visitEntityNode(N),j.unresolvableFieldPaths.size>0){if(o&&d.size<1){u=void 0;break}u={entityAncestorData:{fieldSetsByTargetSubgraphName:(0,Fi.getOrThrowError)(this.entityDataNodes,N.typeName,"entityDataNodes").fieldSetsByTargetSubgraphName,subgraphName:N.subgraphName,typeName:N.typeName},nodeName:y,parentFieldPathForEntityReference:[i],success:!1,typeName:N.typeName,unresolvableFieldPaths:o?d:j.unresolvableFieldPaths},this.failureResultByEntityNodeName.set(y,u);continue}u=void 0;break}if(u)return o&&l&&this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName.set(u.nodeName,l),u}if(r.size>0)for(let[i,s]of r){let o=this.validateEntities(s,n);if(!o.success){for(let[u,l]of t)if(l.has(i)){o.parentFieldPathForEntityReference.push(u);break}return o}}return{success:!0}}validate(){let t=[];for(let n of this.rootNodeByRootTypeName.values())e:for(let[r,i]of n.headToShareableTailEdges){for(let u of i){if(u.isInaccessible)continue e;this.walkerIndex+=1,this.visitEdge(u,`${n.typeName.toLowerCase()}`)}let s=(0,Fi.getOrThrowError)(n.fieldDataByFieldName,r,"fieldDataByFieldName"),o=(0,Yp.newRootFieldData)(n.typeName,r,s.subgraphNames);if(this.unresolvableFieldPaths.size>0&&(0,Yp.generateResolvabilityErrors)({unresolvableFieldPaths:this.unresolvableFieldPaths,nodeResolutionDataByFieldPath:this.nodeResolutionDataByFieldPath,rootFieldData:o,errors:t}),this.entityNodeNamesBySharedFieldPath.size>0){let u=this.validateEntities(this.entityNodeNamesBySharedFieldPath,o);u.success||this.generateEntityResolvabilityErrors(u,o,t)}if(t.length>0)return t;this.entityNodeNamesBySharedFieldPath=new Map}return[]}visitEdge(t,n){return t.isInaccessible||t.node.isInaccessible?!1:(!(0,Fi.add)(t.visitedIndices,this.walkerIndex)||t.node.isLeaf||(t.node.isAbstract?this.validateAbstractNode(t.node,`${n}.${t.edgeName}`):this.validateConcreteNode(t.node,`${n}.${t.edgeName}`)),!0)}validateConcreteNode(t,n){if(t.headToTailEdges.size<1)return;if(t.hasEntitySiblings){(0,Fi.getValueOrDefault)(this.entityNodeNamesBySharedFieldPath,n,()=>new Set).add(t.nodeName);return}let r=(0,Fi.getValueOrDefault)(this.nodeResolutionDataByFieldPath,n,()=>new Yp.NodeResolutionData(t.typeName,t.fieldDataByFieldName));for(let[i,s]of t.headToTailEdges)this.visitEdge(s,n)&&r.add(i);r.isResolved?this.unresolvableFieldPaths.delete(n):this.unresolvableFieldPaths.add(n)}validateAbstractNode(t,n){if(!(t.headToTailEdges.size<1))for(let r of t.headToTailEdges.values())this.visitEdge(r,n)}generateEntityResolvabilityErrors(t,n,r){let i=(0,Fi.getOrThrowError)(this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName,t.nodeName,"resolvableFieldNamesByRelativeFieldPathByEntityNodeName"),s="";for(let o of t.parentFieldPathForEntityReference)s=o+s;(0,Yp.generateResolvabilityErrors)({unresolvableFieldPaths:t.unresolvableFieldPaths,nodeResolutionDataByFieldPath:i,rootFieldData:n,errors:r,pathFromRoot:s,entityAncestorData:t.entityAncestorData})}};sI.Graph=MR;var BR=class{constructor({entityNodeNamesBySharedFieldPath:t,interSubgraphNodes:n,originNode:r,resolvableFieldNamesByRelativeFieldPathByEntityNodeName:i,unresolvableSharedFieldPaths:s,walkerIndex:o,sharedResolvableFieldNamesByRelativeFieldPath:u}){A(this,"entityNodeNamesBySharedFieldPath");A(this,"interSubgraphNodes");A(this,"originNode");A(this,"resolvableFieldNamesByRelativeFieldPath");A(this,"resolvableFieldNamesByRelativeFieldPathByEntityNodeName");A(this,"unresolvableFieldPaths",new Set);A(this,"unresolvableSharedFieldPaths");A(this,"walkerIndex");A(this,"sharedResolvableFieldNamesByRelativeFieldPath");this.entityNodeNamesBySharedFieldPath=t,this.interSubgraphNodes=n,this.originNode=r,this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName=i,this.resolvableFieldNamesByRelativeFieldPath=(0,Fi.getValueOrDefault)(this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName,r.nodeName,()=>new Map),this.unresolvableSharedFieldPaths=s,this.walkerIndex=o,this.sharedResolvableFieldNamesByRelativeFieldPath=u}visitEntityNode(t){this.validateEntityRelatedConcreteNode(t,"");let n=t.getAllAccessibleEntityNodeNames();for(let r of this.interSubgraphNodes){if(this.unresolvableFieldPaths.size<0)return;n.has(r.nodeName)&&this.validateEntityRelatedConcreteNode(r,"")}}visitEntityRelatedEdge(t,n){return t.isInaccessible||t.node.isInaccessible?!1:!(0,Fi.add)(t.visitedIndices,this.walkerIndex)||t.node.isLeaf?!0:t.node.hasEntitySiblings?((0,Fi.getValueOrDefault)(this.entityNodeNamesBySharedFieldPath,`${n}.${t.edgeName}`,()=>new Set).add(t.node.nodeName),!0):(t.node.isAbstract?this.validateEntityRelatedAbstractNode(t.node,`${n}.${t.edgeName}`):this.validateEntityRelatedConcreteNode(t.node,`${n}.${t.edgeName}`),!0)}validateEntityRelatedConcreteNode(t,n){if(t.headToTailEdges.size<1)return;let r=(0,Fi.getValueOrDefault)(this.resolvableFieldNamesByRelativeFieldPath,n,()=>new Yp.NodeResolutionData(t.typeName,t.fieldDataByFieldName)),i=this.sharedResolvableFieldNamesByRelativeFieldPath?(0,Fi.getValueOrDefault)(this.sharedResolvableFieldNamesByRelativeFieldPath,n,()=>new Yp.NodeResolutionData(t.typeName,t.fieldDataByFieldName)):void 0;for(let[s,o]of t.headToTailEdges)this.visitEntityRelatedEdge(o,n)&&(r.add(s),i==null||i.add(s));r.isResolved?this.unresolvableFieldPaths.delete(n):this.unresolvableFieldPaths.add(n),i&&(i.isResolved?this.unresolvableSharedFieldPaths.delete(n):this.unresolvableSharedFieldPaths.add(n))}validateEntityRelatedAbstractNode(t,n){if(!(t.headToTailEdges.size<1))for(let r of t.headToTailEdges.values())this.visitEntityRelatedEdge(r,n)}}});var qR=V(Yl=>{"use strict";m();T();h();Object.defineProperty(Yl,"__esModule",{value:!0});Yl.NormalizationFactory=void 0;Yl.normalizeSubgraphFromString=ide;Yl.normalizeSubgraph=_q;Yl.batchNormalize=sde;var Pe=(we(),Me(je)),Hi=Vi(),oI=$l(),zi=_c(),it=ps(),De=To(),_e=bi(),nde=eD(),Ha=Zg(),rde=RR(),vq=rI(),jR=FR(),Ql=$h(),Wr=Kp(),Wa=$a(),$R=VR();function ide(e,t=!0){let{error:n,documentNode:r}=(0,Hi.safeParse)(e,t);return n||!r?{errors:[(0,De.subgraphInvalidSyntaxError)(n)],warnings:[]}:new pT(new $R.Graph).normalize(r)}function _q(e,t,n){return new pT(n||new $R.Graph,t).normalize(e)}var pT=class{constructor(t,n){A(this,"argumentName","");A(this,"authorizationDataByParentTypeName",new Map);A(this,"childName","");A(this,"concreteTypeNamesByAbstractTypeName",new Map);A(this,"conditionalFieldDataByCoordinates",new Map);A(this,"configurationDataByParentTypeName",new Map);A(this,"customDirectiveDefinitions",new Map);A(this,"directiveDefinitionByDirectiveName",new Map);A(this,"edfsDirectiveReferences",new Set);A(this,"errors",[]);A(this,"entityDataByTypeName",new Map);A(this,"entityInterfaceDataByTypeName",new Map);A(this,"eventsConfigurations",new Map);A(this,"interfaceTypeNamesWithAuthorizationDirectives",new Set);A(this,"internalGraph");A(this,"isCurrentParentExtension",!1);A(this,"isSubgraphEventDrivenGraph",!1);A(this,"isSubgraphVersionTwo",!1);A(this,"fieldSetDataByTypeName",new Map);A(this,"heirFieldAuthorizationDataByTypeName",new Map);A(this,"handledRepeatedDirectivesByHostPath",new Map);A(this,"lastParentNodeKind",Pe.Kind.NULL);A(this,"lastChildNodeKind",Pe.Kind.NULL);A(this,"leafTypeNamesWithAuthorizationDirectives",new Set);A(this,"keyFieldSetDataByTypeName",new Map);A(this,"keyFieldNamesByParentTypeName",new Map);A(this,"operationTypeNodeByTypeName",new Map);A(this,"originalTypeNameByRenamedTypeName",new Map);A(this,"parentDefinitionDataByTypeName",new Map);A(this,"originalParentTypeName","");A(this,"parentsWithChildArguments",new Set);A(this,"overridesByTargetSubgraphName",new Map);A(this,"invalidOrScopesHostPaths",new Set);A(this,"schemaDefinition");A(this,"referencedDirectiveNames",new Set);A(this,"referencedTypeNames",new Set);A(this,"renamedParentTypeName","");A(this,"subgraphName");A(this,"warnings",[]);for(let[r,i]of zi.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME)this.directiveDefinitionByDirectiveName.set(r,i);this.subgraphName=n||_e.N_A,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaDefinition={directivesByDirectiveName:new Map,kind:Pe.Kind.SCHEMA_DEFINITION,typeName:_e.SCHEMA,operationTypes:new Map}}validateInputNamedType(t){if(zi.BASE_SCALARS.has(t))return{hasUnhandledError:!1,typeString:""};let n=this.parentDefinitionDataByTypeName.get(t);if(!n)return this.errors.push((0,De.undefinedTypeError)(t)),{hasUnhandledError:!1,typeString:""};switch(n.kind){case Pe.Kind.ENUM_TYPE_DEFINITION:case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Pe.Kind.SCALAR_TYPE_DEFINITION:return{hasUnhandledError:!1,typeString:""};default:return{hasUnhandledError:!0,typeString:(0,it.kindToTypeString)(n.kind)}}}validateArguments(t,n){let r=[];for(let[i,s]of t.argumentDataByArgumentName){let o=(0,Wa.getTypeNodeNamedTypeName)(s.type),{hasUnhandledError:u,typeString:l}=this.validateInputNamedType(o);u&&r.push({argumentName:i,namedType:o,typeString:l,typeName:(0,Ha.printTypeNode)(s.type)})}r.length>0&&this.errors.push((0,De.invalidArgumentsError)(n,r))}getAuthorizationData(t){let n=this.renamedParentTypeName||this.originalParentTypeName,r=this.authorizationDataByParentTypeName.get(n);if((0,it.resetAuthorizationData)(r),!t.directives)return r;let i=!1,s=[];for(let d of t.directives){let p=d.name.value;if(p===_e.AUTHENTICATED){if(i)return;i=!0;continue}if(p===_e.REQUIRES_SCOPES){if(s.length>0)return;s.push(d)}}if(!i&&s.length<1||((0,it.isNodeKindInterface)(t.kind)&&this.interfaceTypeNamesWithAuthorizationDirectives.add(n),r||(r=(0,it.setAndGetValue)(this.authorizationDataByParentTypeName,this.renamedParentTypeName||this.originalParentTypeName,(0,it.newAuthorizationData)(n))),r.hasParentLevelAuthorization=!0,r.requiresAuthentication=i,s.length!==1))return r;let o=s[0];if(!o.arguments||o.arguments.length!==1)return;let u=o.arguments[0];if(u.name.value!==_e.SCOPES||u.value.kind!==Pe.Kind.LIST)return;let l=u.value.values;if(l.length<1)return r;if(l.length>it.maxOrScopes){this.invalidOrScopesHostPaths.add(this.originalParentTypeName);return}for(let d of l){if(d.kind!==Pe.Kind.LIST)return;let p=new Set;for(let y of d.values){if(y.kind!==Pe.Kind.STRING)return;p.add(y.value)}p.size&&r.requiredScopes.push(p)}return r}extractDirectivesAndAuthorization(t,n){if(!t.directives)return n;let r=this.childName?`${this.originalParentTypeName}.${this.childName}`:this.originalParentTypeName,i=[];for(let l of t.directives){let d=(0,Wr.getDirectiveValidationErrors)(l,t.kind,n,this.directiveDefinitionByDirectiveName,this.handledRepeatedDirectivesByHostPath,r),p=l.name.value;if(d.length>0){this.errors.push((0,De.invalidDirectiveError)(p,r,d));continue}if(p===_e.EXTENDS)continue;if(p===_e.OVERRIDE){this.handleOverrideDeclaration(l,r,d),d.length>0&&this.errors.push((0,De.invalidDirectiveError)(p,r,d));continue}if(p===_e.AUTHENTICATED||p===_e.REQUIRES_SCOPES){i.push(l);continue}let y=n.get(p);if(y){y.push(l);continue}n.set(p,[l])}if(i.length<1)return n;let s=this.renamedParentTypeName||this.originalParentTypeName;t.kind!==Pe.Kind.FIELD_DEFINITION&&this.leafTypeNamesWithAuthorizationDirectives.add(s);let o=(0,it.getValueOrDefault)(this.authorizationDataByParentTypeName,s,()=>(0,it.newAuthorizationData)(s)),u=(0,it.getAuthorizationDataToUpdate)(o,t,this.childName);for(let l of i){if(l.name.value===_e.AUTHENTICATED){u.requiresAuthentication=!0;continue}let p=l.arguments[0].value.values;if(p.length>it.maxOrScopes){this.invalidOrScopesHostPaths.add(r);continue}for(let y of p){let N=new Set;for(let I of y.values)N.add(I.value);N.size&&u.requiredScopes.push(N)}}return n}isTypeNameRootType(t){return _e.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}extractDirectives(t,n,r,i=!1){if(!t.directives)return n;let s=new Set;for(let o of t.directives){let u=(0,Wr.getDirectiveValidationErrors)(o,t.kind,n,this.directiveDefinitionByDirectiveName,this.handledRepeatedDirectivesByHostPath,r,i),l=o.name.value;if(u.length>0){this.errors.push((0,De.invalidDirectiveError)(l,r,u));continue}if(_e.IGNORED_PARENT_DIRECTIVES.has(l))continue;if(l===_e.KEY){let p=o.arguments[0].value.value;if(s.has(p))continue;s.add(p)}let d=n.get(l);d?d.push(o):n.set(l,[o])}return n}getNodeExtensionType(t,n,r=!1){return t?Ql.ExtensionType.REAL:r||this.isSubgraphVersionTwo||!n.has(_e.EXTENDS)?Ql.ExtensionType.NONE:Ql.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case Ql.ExtensionType.EXTENDS:case Ql.ExtensionType.NONE:{if(n===Ql.ExtensionType.REAL)return;this.errors.push((0,De.duplicateTypeDefinitionError)((0,it.kindToTypeString)(t.kind),t.name));return}default:t.extensionType=n}}extractImplementedInterfaceTypeNames(t,n){if(!t.interfaces)return n;let r=t.name.value;for(let i of t.interfaces){let s=i.name.value;if(n.has(s)){this.errors.push((0,De.duplicateImplementedInterfaceError)((0,it.kindToConvertedTypeString)(t.kind),r,s));continue}n.add(s)}return n}updateCompositeOutputDataByNode(t,n,r,i){this.setParentDataExtensionType(n,i),this.extractImplementedInterfaceTypeNames(t,n.implementedInterfaceTypeNames),n.isEntity||(n.isEntity=r.has(_e.KEY)),n.isInaccessible||(n.isInaccessible=r.has(_e.INACCESSIBLE)),n.subgraphNames.add(this.subgraphName),n.description||(n.description=(0,Hi.formatDescription)("description"in t?t.description:void 0))}addConcreteTypeNamesForImplementedInterfaces(t,n){for(let r of t)(0,it.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(n),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(n),n,!0)}upsertInterfaceDataByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),s=this.extractDirectives(t,(i==null?void 0:i.directivesByDirectiveName)||new Map,r),o=this.getNodeExtensionType(n,s),u=this.entityInterfaceDataByTypeName.get(r);if(u&&t.fields)for(let l of t.fields)u.interfaceFieldNames.add(l.name.value);if(i){if(i.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,De.multipleNamedTypeDefinitionError)(r,(0,it.kindToTypeString)(i.kind),(0,it.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,s,o);return}this.parentDefinitionDataByTypeName.set(r,{directivesByDirectiveName:s,extensionType:o,fieldDataByFieldName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:s.has(_e.KEY),isInaccessible:s.has(_e.INACCESSIBLE),kind:Pe.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,Wa.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,Wr.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Hi.formatDescription)("description"in t?t.description:void 0)})}getRenamedRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(!n)return t;switch(n){case Pe.OperationTypeNode.MUTATION:return _e.MUTATION;case Pe.OperationTypeNode.SUBSCRIPTION:return _e.SUBSCRIPTION;default:return _e.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){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),s=this.extractDirectives(t,(i==null?void 0:i.directivesByDirectiveName)||new Map,r),o=this.isTypeNameRootType(r),u=this.getNodeExtensionType(n,s,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,De.multipleNamedTypeDefinitionError)(r,(0,it.kindToTypeString)(i.kind),(0,it.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,s,u),this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);this.addConcreteTypeNamesForImplementedInterfaces(l,r),this.parentDefinitionDataByTypeName.set(r,{directivesByDirectiveName:s,extensionType:u,fieldDataByFieldName:new Map,implementedInterfaceTypeNames:l,isEntity:s.has(_e.KEY),isInaccessible:s.has(_e.INACCESSIBLE),isRootType:o,kind:Pe.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,Wa.getMutableObjectNode)(t.name),persistedDirectivesData:(0,Wr.newPersistedDirectivesData)(),renamedTypeName:this.getRenamedRootTypeName(r),subgraphNames:new Set([this.subgraphName]),description:(0,Hi.formatDescription)("description"in t?t.description:void 0)})}upsertEnumDataByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),s=this.extractDirectivesAndAuthorization(t,(i==null?void 0:i.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,s);if(i){if(i.kind!==Pe.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,De.multipleNamedTypeDefinitionError)(r,(0,it.kindToTypeString)(i.kind),(0,it.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.description||(i.description=(0,Hi.formatDescription)("description"in t?t.description:void 0));return}this.parentDefinitionDataByTypeName.set(r,{appearances:1,directivesByDirectiveName:s,extensionType:o,enumValueDataByValueName:new Map,kind:Pe.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,Wa.getMutableEnumNode)(t.name),persistedDirectivesData:(0,Wr.newPersistedDirectivesData)(),description:(0,Hi.formatDescription)("description"in t?t.description:void 0)})}upsertInputObjectByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),s=this.extractDirectives(t,(i==null?void 0:i.directivesByDirectiveName)||new Map,r),o=this.getNodeExtensionType(n,s);if(i){if(i.kind!==Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION){this.errors.push((0,De.multipleNamedTypeDefinitionError)(r,(0,it.kindToTypeString)(i.kind),(0,it.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=s.has(_e.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,Hi.formatDescription)("description"in t?t.description:void 0));return}this.parentDefinitionDataByTypeName.set(r,{directivesByDirectiveName:s,extensionType:o,inputValueDataByValueName:new Map,isInaccessible:s.has(_e.INACCESSIBLE),kind:Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,Wa.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,Wr.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Hi.formatDescription)("description"in t?t.description:void 0)})}upsertScalarByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),s=this.extractDirectivesAndAuthorization(t,(i==null?void 0:i.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,s);if(i){if(i.kind!==Pe.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,De.multipleNamedTypeDefinitionError)(r,(0,it.kindToTypeString)(i.kind),(0,it.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.description||(i.description=(0,Hi.formatDescription)("description"in t?t.description:void 0));return}this.parentDefinitionDataByTypeName.set(r,{directivesByDirectiveName:s,extensionType:o,kind:Pe.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,Wa.getMutableScalarNode)(t.name),persistedDirectivesData:(0,Wr.newPersistedDirectivesData)(),description:(0,Hi.formatDescription)("description"in t?t.description:void 0)})}extractUnionMembers(t,n){if(!t.types)return n;let r=t.name.value;for(let i of t.types){let s=i.name.value;if(n.has(s)){this.errors.push((0,De.duplicateUnionMemberDefinitionError)(r,s));continue}(0,it.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(s),zi.BASE_SCALARS.has(s)||this.referencedTypeNames.add(s),n.set(s,i)}return n}upsertUnionByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),s=this.extractDirectives(t,(i==null?void 0:i.directivesByDirectiveName)||new Map,r),o=this.getNodeExtensionType(n,s);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==Pe.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,De.multipleNamedTypeDefinitionError)(r,(0,it.kindToTypeString)(i.kind),(0,it.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),this.extractUnionMembers(t,i.memberByMemberTypeName),i.description||(i.description=(0,Hi.formatDescription)("description"in t?t.description:void 0));return}this.parentDefinitionDataByTypeName.set(r,{directivesByDirectiveName:s,extensionType:o,kind:Pe.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,Wa.getMutableUnionNode)(t.name),persistedDirectivesData:(0,Wr.newPersistedDirectivesData)(),description:(0,Hi.formatDescription)("description"in t?t.description:void 0)})}extractKeyFieldSets(t,n){var o;let r=n.isUnresolvableByKeyFieldSet,i=t.name.value;if(!((o=t.directives)!=null&&o.length)){this.errors.push((0,De.expectedEntityError)(i));return}let s=[];for(let u of t.directives){if(u.name.value!==_e.KEY)continue;if(!u.arguments||u.arguments.length<1){s.push((0,De.undefinedRequiredArgumentsErrorMessage)(_e.KEY,i,[_e.FIELDS]));continue}let l,d=!1;for(let p of u.arguments){if(p.name.value===_e.RESOLVABLE){p.value.kind===Pe.Kind.BOOLEAN&&!p.value.value&&(d=!0);continue}if(p.name.value!==_e.FIELDS){l=void 0;break}if(p.value.kind!==Pe.Kind.STRING){l=void 0,s.push((0,De.invalidKeyDirectiveArgumentErrorMessage)(p.value.kind));break}l=p.value.value}l!==void 0&&r.set(l,d)}s.length&&this.errors.push((0,De.invalidKeyDirectivesError)(i,s))}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByDirectiveName.has(_e.INACCESSIBLE),r=new Map,i=new Map,s=!1;for(let o of t.implementedInterfaceTypeNames){let u=this.parentDefinitionDataByTypeName.get(o);if(!u){this.errors.push((0,De.undefinedTypeError)(o));continue}if(u.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION){i.set(u.name,(0,it.kindToTypeString)(u.kind));continue}if(t.name===u.name){s=!0;continue}let l={invalidFieldImplementations:new Map,unimplementedFields:[]},d=!1;for(let[p,y]of u.fieldDataByFieldName){let N=!1,I=t.fieldDataByFieldName.get(p);if(!I){d=!0,l.unimplementedFields.push(p);continue}let _={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,Ha.printTypeNode)(y.node.type),unimplementedArguments:new Set};(0,Wr.isTypeValidImplementation)(y.node.type,I.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,N=!0,_.implementedResponseType=(0,Ha.printTypeNode)(I.node.type));let C=new Set;for(let[j,Q]of y.argumentDataByArgumentName){C.add(j);let re=I.argumentDataByArgumentName.get(j);if(!re){d=!0,N=!0,_.unimplementedArguments.add(j);continue}let se=(0,Ha.printTypeNode)(re.type),pe=(0,Ha.printTypeNode)(Q.type);pe!==se&&(d=!0,N=!0,_.invalidImplementedArguments.push({actualType:se,argumentName:j,expectedType:pe}))}for(let[j,Q]of I.argumentDataByArgumentName)C.has(j)||Q.type.kind===Pe.Kind.NON_NULL_TYPE&&(d=!0,N=!0,_.invalidAdditionalArguments.add(j));!n&&I.isInaccessible&&!y.isInaccessible&&(d=!0,N=!0,_.isInaccessible=!0),N&&l.invalidFieldImplementations.set(p,_)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,De.invalidImplementedTypeError)(t.name,i)),s&&this.errors.push((0,De.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,De.invalidInterfaceImplementationError)(t.name,(0,it.kindToTypeString)(t.kind),r))}handleOverrideDeclaration(t,n,r){let i=t.arguments[0];if(i.value.kind!==Pe.Kind.STRING){r.push((0,De.invalidDirectiveArgumentTypeErrorMessage)(!0,_e.FROM,Pe.Kind.STRING,i.value.kind));return}let s=i.value.value;if(s===this.subgraphName){r.push((0,De.equivalentSourceAndTargetOverrideErrorMessage)(s,n));return}let o=(0,it.getValueOrDefault)(this.overridesByTargetSubgraphName,s,()=>new Map);(0,it.getValueOrDefault)(o,this.renamedParentTypeName||this.originalParentTypeName,()=>new Set).add(this.childName)}getKafkaPublishConfiguration(t,n){let r=[],i=_e.DEFAULT_EDFS_PROVIDER_ID;for(let s of t.arguments||[])switch(s.name.value){case _e.TOPIC:{if(s.value.kind!==Pe.Kind.STRING||s.value.value.length<1){n.push((0,De.invalidEventSubjectErrorMessage)(_e.TOPIC));continue}r.push(s.value.value);break}case _e.PROVIDER_ID:{if(s.value.kind!==Pe.Kind.STRING||s.value.value.length<1){n.push(De.invalidEventProviderIdErrorMessage);continue}i=s.value.value;break}}if(!(n.length>0))return{fieldName:this.childName,providerId:i,providerType:_e.PROVIDER_TYPE_KAFKA,topics:r,type:_e.PUBLISH}}getKafkaSubscribeConfiguration(t,n){let r=[],i=_e.DEFAULT_EDFS_PROVIDER_ID;for(let s of t.arguments||[])switch(s.name.value){case _e.TOPICS:{if(s.value.kind!==Pe.Kind.LIST){n.push((0,De.invalidEventSubjectsErrorMessage)(_e.TOPICS));continue}for(let o of s.value.values){if(o.kind!==Pe.Kind.STRING||o.value.length<1){n.push((0,De.invalidEventSubjectsItemErrorMessage)(_e.TOPICS));break}r.push(o.value)}break}case _e.PROVIDER_ID:{if(s.value.kind!==Pe.Kind.STRING||s.value.value.length<1){n.push(De.invalidEventProviderIdErrorMessage);continue}i=s.value.value;break}}if(!(n.length>0))return{fieldName:this.childName,providerId:i,providerType:_e.PROVIDER_TYPE_KAFKA,topics:r,type:_e.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r){let i=[],s=_e.DEFAULT_EDFS_PROVIDER_ID;for(let o of n.arguments||[])switch(o.name.value){case _e.SUBJECT:{if(o.value.kind!==Pe.Kind.STRING||o.value.value.length<1){r.push((0,De.invalidEventSubjectErrorMessage)(_e.SUBJECT));continue}i.push(o.value.value);break}case _e.PROVIDER_ID:{if(o.value.kind!==Pe.Kind.STRING||o.value.value.length<1){r.push(De.invalidEventProviderIdErrorMessage);continue}s=o.value.value;break}}if(!(r.length>0))return{fieldName:this.childName,providerId:s,providerType:_e.PROVIDER_TYPE_NATS,subjects:i,type:t}}getNatsSubscribeConfiguration(t,n){let r=[],i=_e.DEFAULT_EDFS_PROVIDER_ID,s="",o="";for(let u of t.arguments||[])switch(u.name.value){case _e.SUBJECTS:{if(u.value.kind!==Pe.Kind.LIST){n.push((0,De.invalidEventSubjectsErrorMessage)(_e.SUBJECTS));continue}for(let l of u.value.values){if(l.kind!==Pe.Kind.STRING||l.value.length<1){n.push((0,De.invalidEventSubjectsItemErrorMessage)(_e.SUBJECTS));break}r.push(l.value)}break}case _e.PROVIDER_ID:{if(u.value.kind!==Pe.Kind.STRING||u.value.value.length<1){n.push(De.invalidEventProviderIdErrorMessage);continue}i=u.value.value;break}case _e.STREAM_CONFIGURATION:{if(u.value.kind!==Pe.Kind.OBJECT||u.value.fields.length<1){n.push(De.invalidNatsStreamInputErrorMessage);continue}let l=!0,d=new Set,p=new Set([_e.CONSUMER_NAME,_e.STREAM_NAME]),y=new Set,N=new Set;for(let I of u.value.fields){let _=I.name.value;if(!_e.STREAM_CONFIGURATION_FIELD_NAMES.has(_)){d.add(_),l=!1;continue}if(p.has(_))p.delete(_);else{y.add(_),l=!1;continue}if(I.value.kind!==Pe.Kind.STRING||I.value.value.length<1){N.add(_),l=!1;continue}switch(_){case _e.CONSUMER_NAME:s=I.value.value;break;case _e.STREAM_NAME:o=I.value.value;break}}(!l||p.size>0)&&n.push((0,De.invalidNatsStreamInputFieldsErrorMessage)([...p],[...y],[...N],[...d]))}}if(!(n.length>0))return k({fieldName:this.childName,providerId:i,providerType:_e.PROVIDER_TYPE_NATS,subjects:r,type:_e.SUBSCRIBE},s&&o?{streamConfiguration:{consumerName:s,streamName:o}}:{})}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===Pe.OperationTypeNode.SUBSCRIPTION;for(let s of t.directives)if(s.name.value===_e.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,De.invalidSubscriptionFilterLocationError)(r));return}}extractEventDirectivesToConfiguration(t){if(!t.directives)return;let n=`${this.renamedParentTypeName||this.originalParentTypeName}.${this.childName}`;for(let r of t.directives){let i=[],s;switch(r.name.value){case _e.EDFS_KAFKA_PUBLISH:s=this.getKafkaPublishConfiguration(r,i);break;case _e.EDFS_KAFKA_SUBSCRIBE:s=this.getKafkaSubscribeConfiguration(r,i);break;case _e.EDFS_NATS_PUBLISH:{s=this.getNatsPublishAndRequestConfiguration(_e.PUBLISH,r,i);break}case _e.EDFS_NATS_REQUEST:{s=this.getNatsPublishAndRequestConfiguration(_e.REQUEST,r,i);break}case _e.EDFS_NATS_SUBSCRIBE:{s=this.getNatsSubscribeConfiguration(r,i);break}default:continue}if(i.length>0){this.errors.push((0,De.invalidEventDirectiveError)(r.name.value,n,i));continue}s&&(0,it.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(s)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case Pe.OperationTypeNode.MUTATION:return new Set([_e.EDFS_KAFKA_PUBLISH,_e.EDFS_NATS_PUBLISH,_e.EDFS_NATS_REQUEST]);case Pe.OperationTypeNode.QUERY:return new Set([_e.EDFS_NATS_REQUEST]);case Pe.OperationTypeNode.SUBSCRIPTION:return new Set([_e.EDFS_KAFKA_SUBSCRIBE,_e.EDFS_NATS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case _e.MUTATION:return Pe.OperationTypeNode.MUTATION;case _e.QUERY:return Pe.OperationTypeNode.QUERY;case _e.SUBSCRIPTION:return Pe.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let s=this.getOperationTypeNodeForRootTypeName(t.name);if(!s){this.errors.push((0,De.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(s);for(let[u,l]of t.fieldDataByFieldName){let d=`${l.originalParentTypeName}.${u}`,p=new Set;for(let j of _e.EVENT_DIRECTIVE_NAMES)l.directivesByDirectiveName.has(j)&&p.add(j);let y=new Set;for(let j of p)o.has(j)||y.add(j);if((p.size<1||y.size>0)&&n.set(d,{definesDirectives:p.size>0,invalidDirectiveNames:[...y]}),s===Pe.OperationTypeNode.MUTATION){let j=(0,Ha.printTypeNode)(l.type);j!==_e.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,j);continue}let N=(0,Ha.printTypeNode)(l.type),I=l.namedTypeName+"!",_=!1,C=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let j of C)if(_||(_=this.entityDataByTypeName.has(j)),_)break;(!_||N!==I)&&r.set(d,N)}}validateEventDrivenKeyDefinition(t,n){let r=this.keyFieldSetDataByTypeName.get(t);if(r)for(let[i,s]of r.isUnresolvableByKeyFieldSet)s||(0,it.getValueOrDefault)(n,t,()=>[]).push(i)}validateEventDrivenObjectFields(t,n,r,i){for(let[s,o]of t){let u=`${o.originalParentTypeName}.${s}`;if(n.has(s)){o.isExternalBySubgraphName.get(this.subgraphName)||r.set(u,s);continue}i.set(u,s)}}isEdfsPublishResultValid(){let t=this.parentDefinitionDataByTypeName.get(_e.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByFieldName.size!=1)return!1;for(let[n,r]of t.fieldDataByFieldName)if(r.argumentDataByArgumentName.size>0||n!==_e.SUCCESS||(0,Ha.printTypeNode)(r.type)!==_e.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(t.kind!==Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION||t.inputValueDataByValueName.size!=2)return!1;let n=new Set([_e.CONSUMER_NAME,_e.STREAM_NAME]);for(let[r,i]of t.inputValueDataByValueName)if(!n.has(r)||(n.delete(r),(0,Ha.printTypeNode)(i.type)!==_e.NON_NULLABLE_STRING))return!1;return n.size<1}validateEventDrivenSubgraph(){let t=[],n=new Map,r=new Map,i=new Map,s=new Map,o=new Map,u=new Map,l=new Set,d=new Set;for(let[p,y]of this.parentDefinitionDataByTypeName){if(p===_e.EDFS_PUBLISH_RESULT||p===_e.EDFS_NATS_STREAM_CONFIGURATION||y.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION)continue;if(y.isRootType){this.validateEventDrivenRootType(y,n,r,i);continue}let N=this.keyFieldNamesByParentTypeName.get(p);if(!N){d.add(p);continue}this.validateEventDrivenKeyDefinition(p,s),this.validateEventDrivenObjectFields(y.fieldDataByFieldName,N,o,u)}if(this.isEdfsPublishResultValid()||t.push(De.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(_e.EDFS_NATS_SUBSCRIBE)){let p=this.parentDefinitionDataByTypeName.get(_e.EDFS_NATS_STREAM_CONFIGURATION);p?this.isNatsStreamConfigurationInputObjectValid(p)||t.push(De.invalidNatsStreamConfigurationDefinitionErrorMessage):t.push(De.undefinedNatsStreamConfigurationInputErrorMessage)}n.size>0&&t.push((0,De.invalidRootTypeFieldEventsDirectivesErrorMessage)(n)),i.size>0&&t.push((0,De.invalidEventDrivenMutationResponseTypeErrorMessage)(i)),r.size>0&&t.push((0,De.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(r)),s.size>0&&t.push((0,De.invalidKeyFieldSetsEventDrivenErrorMessage)(s)),o.size>0&&t.push((0,De.nonExternalKeyFieldNamesEventDrivenErrorMessage)(o)),u.size>0&&t.push((0,De.nonKeyFieldNamesEventDrivenErrorMessage)(u)),l.size>0&&t.push((0,De.nonEntityObjectExtensionsEventDrivenErrorMessage)([...l])),d.size>0&&t.push((0,De.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...d])),t.length>0&&this.errors.push((0,De.invalidEventDrivenGraphError)(t))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,De.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,it.kindToTypeString)(i.kind)}"`)}n.length>0&&this.errors.push((0,De.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,it.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,n,()=>new Set).add(i),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(n,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(i),i,!0)}}validateAndAddKeyToConfiguration(t,n){let r=(0,it.getOrThrowError)(this.configurationDataByParentTypeName,(0,Wr.getParentTypeName)(t),"configurationDataByParentTypeName"),i=(0,oI.validateKeyFieldSets)(this,t,n.isUnresolvableByKeyFieldSet,r.fieldNames);i&&(r.keys=i)}validateAndAddKeysToConfiguration(){for(let[t,n]of this.keyFieldSetDataByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,De.undefinedObjectLikeParentError)(t));continue}this.validateAndAddKeyToConfiguration(r,n)}}normalize(t){(0,jR.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,jR.upsertParentsAndChildren)(this,t),(0,jR.consolidateAuthorizationDirectives)(this,t);for(let s of this.interfaceTypeNamesWithAuthorizationDirectives){let o=this.authorizationDataByParentTypeName.get(s);if(!o)continue;let u=this.concreteTypeNamesByAbstractTypeName.get(s);for(let l of u||[]){let d=(0,it.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,it.newAuthorizationData)(l));for(let[p,y]of o.fieldAuthorizationDataByFieldName)(0,it.upsertFieldAuthorizationData)(d.fieldAuthorizationDataByFieldName,y)||this.invalidOrScopesHostPaths.add(`${l}.${p}`)}}for(let[s,o]of this.heirFieldAuthorizationDataByTypeName){let u=this.authorizationDataByParentTypeName.get(s);if(u)for(let l of o)(0,it.mergeAuthorizationDataByAND)(u,l)||this.invalidOrScopesHostPaths.add(`${s}.${l.fieldName}`)}this.invalidOrScopesHostPaths.size>0&&this.errors.push((0,De.orScopesLimitError)(it.maxOrScopes,[...this.invalidOrScopesHostPaths]));let n=[];for(let s of zi.BASE_DIRECTIVE_DEFINITIONS)n.push(s);if(n.push(zi.FIELD_SET_SCALAR_DEFINITION),this.isSubgraphVersionTwo){for(let s of zi.VERSION_TWO_DIRECTIVE_DEFINITIONS)n.push(s),this.directiveDefinitionByDirectiveName.set(s.name.value,s);n.push(zi.SCOPE_SCALAR_DEFINITION)}for(let s of this.edfsDirectiveReferences){let o=zi.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME.get(s);if(!o){this.errors.push((0,De.invalidEdfsDirectiveName)(s));continue}n.push(o)}this.edfsDirectiveReferences.size>0&&this.referencedDirectiveNames.has(_e.SUBSCRIPTION_FILTER)&&(this.directiveDefinitionByDirectiveName.set(_e.SUBSCRIPTION_FILTER,zi.SUBSCRIPTION_FILTER_DEFINITION),n.push(zi.SUBSCRIPTION_FILTER_DEFINITION),n.push(zi.SUBSCRIPTION_FILTER_CONDITION_DEFINITION),n.push(zi.SUBSCRIPTION_FIELD_CONDITION_DEFINITION),n.push(zi.SUBSCRIPTION_FILTER_VALUE_DEFINITION));for(let s of this.customDirectiveDefinitions.values())n.push(s);this.schemaDefinition.operationTypes.size>0&&n.push((0,Wr.getSchemaNodeByData)(this.schemaDefinition,this.errors,this.directiveDefinitionByDirectiveName));for(let[s,o]of this.parentDefinitionDataByTypeName)switch(o.kind){case Pe.Kind.ENUM_TYPE_DEFINITION:if(o.enumValueDataByValueName.size<1){this.errors.push((0,De.noDefinedEnumValuesError)(s));break}n.push((0,Wr.getEnumNodeByData)(o,this.errors,this.directiveDefinitionByDirectiveName,this.authorizationDataByParentTypeName));break;case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:if(o.inputValueDataByValueName.size<1){this.errors.push((0,De.noInputValueDefinitionsError)(s));break}n.push((0,Wr.getInputObjectNodeByData)(o,this.errors,this.directiveDefinitionByDirectiveName,this.authorizationDataByParentTypeName));break;case Pe.Kind.INTERFACE_TYPE_DEFINITION:case Pe.Kind.OBJECT_TYPE_DEFINITION:let u=this.entityDataByTypeName.has(s),l=this.operationTypeNodeByTypeName.get(s),d=o.kind===Pe.Kind.OBJECT_TYPE_DEFINITION;if(l&&(o.fieldDataByFieldName.delete(_e.SERVICE_FIELD),o.fieldDataByFieldName.delete(_e.ENTITIES_FIELD)),this.parentsWithChildArguments.has(s)||!d){let _=[];for(let[C,j]of o.fieldDataByFieldName)!d&&j.isExternalBySubgraphName.get(this.subgraphName)&&_.push(C),this.validateArguments(j,`${s}.${C}`);_.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,De.externalInterfaceFieldsError)(s,_)):this.warnings.push((0,vq.externalInterfaceFieldsWarning)(this.subgraphName,s,_)))}let p=o.kind===Pe.Kind.OBJECT_TYPE_DEFINITION&&o.renamedTypeName||s,y={fieldNames:new Set,isRootNode:u,typeName:p},N=this.entityInterfaceDataByTypeName.get(s);N&&(N.fieldDatas=(0,it.fieldDatasToSimpleFieldDatas)(o.fieldDataByFieldName.values()),N.concreteTypeNames=(0,it.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,s,()=>new Set),y.isInterfaceObject=N.isInterfaceObject,y.entityInterfaceConcreteTypeNames=N.concreteTypeNames);let I=this.eventsConfigurations.get(p);I&&(y.events=I),this.configurationDataByParentTypeName.set(p,y),(0,oI.addFieldNamesToConfigurationData)(o.fieldDataByFieldName,y),this.validateInterfaceImplementations(o),n.push((0,Wr.getCompositeOutputNodeByData)(o,this.errors,this.directiveDefinitionByDirectiveName,this.authorizationDataByParentTypeName)),o.fieldDataByFieldName.size<1&&!(0,oI.isNodeQuery)(s,l)&&this.errors.push((0,De.noFieldDefinitionsError)((0,it.kindToTypeString)(o.kind),s));break;case Pe.Kind.SCALAR_TYPE_DEFINITION:if(o.extensionType===Ql.ExtensionType.REAL){this.errors.push((0,De.noBaseScalarDefinitionError)(s));break}n.push((0,Wr.getScalarNodeByData)(o,this.errors,this.directiveDefinitionByDirectiveName));break;case Pe.Kind.UNION_TYPE_DEFINITION:n.push((0,Wr.getUnionNodeByData)(o,this.errors,this.directiveDefinitionByDirectiveName)),this.validateUnionMembers(o);break;default:throw(0,De.unexpectedKindFatalError)(s)}for(let s of Object.values(Pe.OperationTypeNode)){let o=this.schemaDefinition.operationTypes.get(s),u=(0,it.getOrThrowError)(Hi.operationTypeNodeToDefaultType,s,_e.OPERATION_TO_DEFAULT),l=o?(0,Wa.getTypeNodeNamedTypeName)(o.type):u;if(l!==u&&this.parentDefinitionDataByTypeName.has(u)){this.errors.push((0,De.invalidRootTypeDefinitionError)(s,l,u));continue}let d=this.parentDefinitionDataByTypeName.get(l);if(o){if(!d){this.errors.push((0,De.undefinedTypeError)(l));continue}this.operationTypeNodeByTypeName.set(l,s)}if(!d)continue;let p=this.configurationDataByParentTypeName.get(u);if(p&&(p.isRootNode=!0,p.typeName=u),d.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,De.operationDefinitionError)(l,s,d.kind));continue}for(let y of d.fieldDataByFieldName.values()){let N=(0,Wa.getTypeNodeNamedTypeName)(y.node.type);!zi.BASE_SCALARS.has(N)&&!this.parentDefinitionDataByTypeName.has(N)&&this.errors.push((0,De.undefinedTypeError)(N))}}for(let s of this.referencedTypeNames){let o=this.parentDefinitionDataByTypeName.get(s);if(o){if(o.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION)continue;let u=this.concreteTypeNamesByAbstractTypeName.get(s);(!u||u.size<0)&&this.warnings.push((0,De.unimplementedInterfaceOutputTypeError)(s));continue}this.entityDataByTypeName.has(s)||this.errors.push((0,De.undefinedTypeError)(s))}this.validateAndAddKeysToConfiguration();for(let[s,o]of this.fieldSetDataByTypeName){let u=this.parentDefinitionDataByTypeName.get(s);if(!u||u.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION&&u.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,De.undefinedObjectLikeParentError)(s));continue}(0,oI.validateAndAddConditionalFieldSetsToConfiguration)(this,u,o)}let r=new Map;for(let s of this.directiveDefinitionByDirectiveName.values()){let o=(0,Hi.extractExecutableDirectiveLocations)(s.locations,new Set);o.size<1||(0,Wr.addPersistedDirectiveDefinitionDataByNode)(r,s,this.errors,this.directiveDefinitionByDirectiveName,this.handledRepeatedDirectivesByHostPath,o,this.subgraphName)}if(this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph(),this.errors.length>0)return{errors:this.errors,warnings:this.warnings};let i={kind:Pe.Kind.DOCUMENT,definitions:n};return{normalizationResult:{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoordinates,configurationDataByTypeName:this.configurationDataByParentTypeName,entityDataByTypeName:this.entityDataByTypeName,entityInterfaces:this.entityInterfaceDataByTypeName,isEventDrivenGraph:this.isSubgraphEventDrivenGraph,isVersionTwo:this.isSubgraphVersionTwo,keyFieldNamesByParentTypeName:this.keyFieldNamesByParentTypeName,operationTypes:this.operationTypeNodeByTypeName,originalTypeNameByRenamedTypeName:this.originalTypeNameByRenamedTypeName,overridesByTargetSubgraphName:this.overridesByTargetSubgraphName,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:r,subgraphAST:i,subgraphString:(0,Pe.print)(i),schema:(0,nde.buildASTSchema)(i,{assumeValid:!0,assumeValidSDL:!0})},warnings:this.warnings}}};Yl.NormalizationFactory=pT;function sde(e){let t=new Map,n=new Map,r=new Map,i=new Map,s=new Map,o=new Map,u=new Set,l=new Map,d=new Set,p=new Set,y=[],N=new Set,I=[],_=[];for(let Q of e)Q.name&&(0,rde.recordSubgraphName)(Q.name,d,p);let C=new $R.Graph;for(let Q=0;Q0&&I.push(...Ce),pe){_.push((0,De.subgraphValidationError)(se,pe));continue}if(!ye){_.push((0,De.subgraphValidationError)(se,[De.subgraphValidationFailureError]));continue}l.set(se,ye.parentDefinitionDataByTypeName);for(let ht of ye.authorizationDataByParentTypeName.values())(0,it.upsertAuthorizationData)(t,ht,N);for(let[ht,xt]of ye.concreteTypeNamesByAbstractTypeName){let B=n.get(ht);if(!B){n.set(ht,new Set(xt));continue}(0,it.addIterableValuesToSet)(xt,B)}for(let ht of ye.entityDataByTypeName.values())(0,it.upsertEntityData)(r,ht);if(re.name&&i.set(se,{conditionalFieldDataByCoordinates:ye.conditionalFieldDataByCoordinates,configurationDataByTypeName:ye.configurationDataByTypeName,definitions:ye.subgraphAST,entityInterfaces:ye.entityInterfaces,isVersionTwo:ye.isVersionTwo,keyFieldNamesByParentTypeName:ye.keyFieldNamesByParentTypeName,name:se,operationTypes:ye.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:ye.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:ye.persistedDirectiveDefinitionDataByDirectiveName,schema:ye.schema,url:re.url}),!(ye.overridesByTargetSubgraphName.size<1))for(let[ht,xt]of ye.overridesByTargetSubgraphName){let B=d.has(ht);for(let[he,nt]of xt){let Ct=ye.originalTypeNameByRenamedTypeName.get(he)||he;if(!B)I.push((0,vq.invalidOverrideTargetSubgraphNameWarning)(ht,Ct,[...nt]));else{let sn=(0,it.getValueOrDefault)(s,ht,()=>new Map),Fn=(0,it.getValueOrDefault)(sn,he,()=>new Set(nt));(0,it.addIterableValuesToSet)(nt,Fn)}for(let sn of nt){let Fn=`${Ct}.${sn}`,_n=o.get(Fn);if(!_n){o.set(Fn,[se]);continue}_n.push(se),u.add(Fn)}}}}let j=[];if(N.size>0&&j.push((0,De.orScopesLimitError)(it.maxOrScopes,[...N])),(y.length>0||p.size>0)&&j.push((0,De.invalidSubgraphNamesError)([...p],y)),u.size>0){let Q=[];for(let re of u){let se=(0,it.getOrThrowError)(o,re,"overrideSourceSubgraphNamesByFieldPath");Q.push((0,De.duplicateOverriddenFieldErrorMessage)(re,se))}j.push((0,De.duplicateOverriddenFieldsError)(Q))}if(j.push(..._),j.length>0)return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,errors:j,internalSubgraphBySubgraphName:i,internalGraph:C,warnings:I};for(let[Q,re]of s){let se=(0,it.getOrThrowError)(i,Q,"internalSubgraphBySubgraphName");se.overriddenFieldNamesByParentTypeName=re;for(let[pe,ye]of re){let Ce=se.configurationDataByTypeName.get(pe);Ce&&((0,it.subtractSourceSetFromTargetSet)(ye,Ce.fieldNames),Ce.fieldNames.size<1&&se.configurationDataByTypeName.delete(pe))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,internalSubgraphBySubgraphName:i,internalGraph:C,warnings:I}}});var aI=V(Hl=>{"use strict";m();T();h();Object.defineProperty(Hl,"__esModule",{value:!0});Hl.DivergentType=void 0;Hl.getLeastRestrictiveMergedTypeNode=ade;Hl.getMostRestrictiveMergedTypeNode=ude;Hl.renameNamedTypeName=cde;var Jl=(we(),Me(je)),Oq=To(),ode=$a(),bq=Vi(),Sq=_h(),zl;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(zl||(Hl.DivergentType=zl={}));function Dq(e,t,n,r,i){t=(0,ode.getMutableTypeNode)(t,n,i);let s={kind:e.kind},o=zl.NONE,u=s;for(let l=0;l{"use strict";m();T();h();Object.defineProperty(GR,"__esModule",{value:!0});GR.renameRootTypes=pde;var lde=(we(),Me(je)),Fc=bi(),Wl=ps(),KR=Vi(),dde=aI();function pde(e,t){let n,r=!1,i;(0,lde.visit)(t.definitions,{FieldDefinition:{enter(s){let o=s.name.value;if(r&&(o===Fc.SERVICE_FIELD||o===Fc.ENTITIES_FIELD))return n.fieldDataByFieldName.delete(o),!1;let u=n.name,l=(0,Wl.getOrThrowError)(n.fieldDataByFieldName,o,`${u}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let p=(0,Wl.getOrThrowError)(KR.operationTypeNodeToDefaultType,d,Fc.OPERATION_TO_DEFAULT);l.namedTypeName!==p&&(0,dde.renameNamedTypeName)(l,p,e.errors)}return i!=null&&i.has(o)&&l.isShareableBySubgraphName.delete(t.name),!1}},InterfaceTypeDefinition:{enter(s){let o=s.name.value;if(!e.entityInterfaceFederationDataByTypeName.get(o))return!1;n=(0,Wl.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Fc.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(s){let o=s.name.value,u=t.operationTypes.get(o),l=u?(0,Wl.getOrThrowError)(KR.operationTypeNodeToDefaultType,u,Fc.OPERATION_TO_DEFAULT):o;n=(0,Wl.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Fc.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(s){let o=s.name.value,u=t.operationTypes.get(o),l=u?(0,Wl.getOrThrowError)(KR.operationTypeNodeToDefaultType,u,Fc.OPERATION_TO_DEFAULT):o;n=(0,Wl.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Fc.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 Aq=V((Jp,fT)=>{"use strict";m();T();h();(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",s="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",u=500,l="__lodash_placeholder__",d=1,p=2,y=4,N=1,I=2,_=1,C=2,j=4,Q=8,re=16,se=32,pe=64,ye=128,Ce=256,ht=512,xt=30,B="...",he=800,nt=16,Ct=1,sn=2,Fn=3,_n=1/0,bn=9007199254740991,mi=17976931348623157e292,Xr=NaN,Pn=4294967295,on=Pn-1,$n=Pn>>>1,U=[["ary",ye],["bind",_],["bindKey",C],["curry",Q],["curryRight",re],["flip",ht],["partial",se],["partialRight",pe],["rearg",Ce]],ae="[object Arguments]",te="[object Array]",ce="[object AsyncFunction]",Ke="[object Boolean]",G="[object Date]",ee="[object DOMException]",Ue="[object Error]",Xe="[object Function]",jt="[object GeneratorFunction]",Je="[object Map]",Ht="[object Number]",pa="[object Null]",Li="[object Object]",fa="[object Promise]",id="[object Proxy]",Do="[object RegExp]",Gr="[object Set]",Wi="[object String]",cn="[object Symbol]",Qr="[object Undefined]",xc="[object WeakMap]",Ao="[object WeakSet]",Cc="[object ArrayBuffer]",F="[object DataView]",g="[object Float32Array]",v="[object Float64Array]",x="[object Int8Array]",J="[object Int16Array]",ie="[object Int32Array]",fe="[object Uint8Array]",Rt="[object Uint8ClampedArray]",kn="[object Uint16Array]",Dn="[object Uint32Array]",qn=/\b__p \+= '';/g,On=/\b(__p \+=) '' \+/g,xK=/(__e\(.*?\)|\b__t\)) \+\n'';/g,AF=/&(?:amp|lt|gt|quot|#39);/g,RF=/[&<>"']/g,CK=RegExp(AF.source),UK=RegExp(RF.source),MK=/<%-([\s\S]+?)%>/g,BK=/<%([\s\S]+?)%>/g,FF=/<%=([\s\S]+?)%>/g,VK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jK=/^\w*$/,$K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,BI=/[\\^$.*+?()[\]{}|]/g,qK=RegExp(BI.source),VI=/^\s+/,KK=/\s/,GK=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,QK=/\{\n\/\* \[wrapped with (.+)\] \*/,YK=/,? & /,JK=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zK=/[()=,{}\[\]\/\s]/,HK=/\\(\\)?/g,WK=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,wF=/\w*$/,XK=/^[-+]0x[0-9a-f]+$/i,ZK=/^0b[01]+$/i,eG=/^\[object .+?Constructor\]$/,tG=/^0o[0-7]+$/i,nG=/^(?:0|[1-9]\d*)$/,rG=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,LT=/($^)/,iG=/['\n\r\u2028\u2029\\]/g,PT="\\ud800-\\udfff",sG="\\u0300-\\u036f",oG="\\ufe20-\\ufe2f",aG="\\u20d0-\\u20ff",LF=sG+oG+aG,PF="\\u2700-\\u27bf",kF="a-z\\xdf-\\xf6\\xf8-\\xff",uG="\\xac\\xb1\\xd7\\xf7",cG="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",lG="\\u2000-\\u206f",dG=" \\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",xF="A-Z\\xc0-\\xd6\\xd8-\\xde",CF="\\ufe0e\\ufe0f",UF=uG+cG+lG+dG,jI="['\u2019]",pG="["+PT+"]",MF="["+UF+"]",kT="["+LF+"]",BF="\\d+",fG="["+PF+"]",VF="["+kF+"]",jF="[^"+PT+UF+BF+PF+kF+xF+"]",$I="\\ud83c[\\udffb-\\udfff]",mG="(?:"+kT+"|"+$I+")",$F="[^"+PT+"]",qI="(?:\\ud83c[\\udde6-\\uddff]){2}",KI="[\\ud800-\\udbff][\\udc00-\\udfff]",sd="["+xF+"]",qF="\\u200d",KF="(?:"+VF+"|"+jF+")",hG="(?:"+sd+"|"+jF+")",GF="(?:"+jI+"(?:d|ll|m|re|s|t|ve))?",QF="(?:"+jI+"(?:D|LL|M|RE|S|T|VE))?",YF=mG+"?",JF="["+CF+"]?",TG="(?:"+qF+"(?:"+[$F,qI,KI].join("|")+")"+JF+YF+")*",yG="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",NG="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",zF=JF+YF+TG,EG="(?:"+[fG,qI,KI].join("|")+")"+zF,gG="(?:"+[$F+kT+"?",kT,qI,KI,pG].join("|")+")",IG=RegExp(jI,"g"),vG=RegExp(kT,"g"),GI=RegExp($I+"(?="+$I+")|"+gG+zF,"g"),_G=RegExp([sd+"?"+VF+"+"+GF+"(?="+[MF,sd,"$"].join("|")+")",hG+"+"+QF+"(?="+[MF,sd+KF,"$"].join("|")+")",sd+"?"+KF+"+"+GF,sd+"+"+QF,NG,yG,BF,EG].join("|"),"g"),bG=RegExp("["+qF+PT+LF+CF+"]"),OG=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,SG=["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"],DG=-1,Vn={};Vn[g]=Vn[v]=Vn[x]=Vn[J]=Vn[ie]=Vn[fe]=Vn[Rt]=Vn[kn]=Vn[Dn]=!0,Vn[ae]=Vn[te]=Vn[Cc]=Vn[Ke]=Vn[F]=Vn[G]=Vn[Ue]=Vn[Xe]=Vn[Je]=Vn[Ht]=Vn[Li]=Vn[Do]=Vn[Gr]=Vn[Wi]=Vn[xc]=!1;var xn={};xn[ae]=xn[te]=xn[Cc]=xn[F]=xn[Ke]=xn[G]=xn[g]=xn[v]=xn[x]=xn[J]=xn[ie]=xn[Je]=xn[Ht]=xn[Li]=xn[Do]=xn[Gr]=xn[Wi]=xn[cn]=xn[fe]=xn[Rt]=xn[kn]=xn[Dn]=!0,xn[Ue]=xn[Xe]=xn[xc]=!1;var AG={\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"},RG={"&":"&","<":"<",">":">",'"':""","'":"'"},FG={"&":"&","<":"<",">":">",""":'"',"'":"'"},wG={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},LG=parseFloat,PG=parseInt,HF=typeof global=="object"&&global&&global.Object===Object&&global,kG=typeof self=="object"&&self&&self.Object===Object&&self,Cr=HF||kG||Function("return this")(),QI=typeof Jp=="object"&&Jp&&!Jp.nodeType&&Jp,Uc=QI&&typeof fT=="object"&&fT&&!fT.nodeType&&fT,WF=Uc&&Uc.exports===QI,YI=WF&&HF.process,Ns=function(){try{var H=Uc&&Uc.require&&Uc.require("util").types;return H||YI&&YI.binding&&YI.binding("util")}catch(de){}}(),XF=Ns&&Ns.isArrayBuffer,ZF=Ns&&Ns.isDate,ew=Ns&&Ns.isMap,tw=Ns&&Ns.isRegExp,nw=Ns&&Ns.isSet,rw=Ns&&Ns.isTypedArray;function Xi(H,de,oe){switch(oe.length){case 0:return H.call(de);case 1:return H.call(de,oe[0]);case 2:return H.call(de,oe[0],oe[1]);case 3:return H.call(de,oe[0],oe[1],oe[2])}return H.apply(de,oe)}function xG(H,de,oe,Be){for(var _t=-1,pn=H==null?0:H.length;++_t-1}function JI(H,de,oe){for(var Be=-1,_t=H==null?0:H.length;++Be<_t;)if(oe(de,H[Be]))return!0;return!1}function Kn(H,de){for(var oe=-1,Be=H==null?0:H.length,_t=Array(Be);++oe-1;);return oe}function dw(H,de){for(var oe=H.length;oe--&&od(de,H[oe],0)>-1;);return oe}function KG(H,de){for(var oe=H.length,Be=0;oe--;)H[oe]===de&&++Be;return Be}var GG=XI(AG),QG=XI(RG);function YG(H){return"\\"+wG[H]}function JG(H,de){return H==null?e:H[de]}function ad(H){return bG.test(H)}function zG(H){return OG.test(H)}function HG(H){for(var de,oe=[];!(de=H.next()).done;)oe.push(de.value);return oe}function nv(H){var de=-1,oe=Array(H.size);return H.forEach(function(Be,_t){oe[++de]=[_t,Be]}),oe}function pw(H,de){return function(oe){return H(de(oe))}}function Qu(H,de){for(var oe=-1,Be=H.length,_t=0,pn=[];++oe-1}function UQ(a,c){var f=this.__data__,E=XT(f,a);return E<0?(++this.size,f.push([a,c])):f[E][1]=c,this}ma.prototype.clear=PQ,ma.prototype.delete=kQ,ma.prototype.get=xQ,ma.prototype.has=CQ,ma.prototype.set=UQ;function ha(a){var c=-1,f=a==null?0:a.length;for(this.clear();++c=c?a:c)),a}function vs(a,c,f,E,b,L){var M,q=c&d,X=c&p,Te=c&y;if(f&&(M=b?f(a,E,b,L):f(a)),M!==e)return M;if(!Zn(a))return a;var Ne=St(a);if(Ne){if(M=j2(a),!q)return Pi(a,M)}else{var Ie=ei(a),Fe=Ie==Xe||Ie==jt;if(Zu(a))return Jw(a,q);if(Ie==Li||Ie==ae||Fe&&!b){if(M=X||Fe?{}:fL(a),!q)return X?F2(a,ZQ(M,a)):R2(a,bw(M,a))}else{if(!xn[Ie])return b?a:{};M=$2(a,Ie,q)}}L||(L=new to);var ze=L.get(a);if(ze)return ze;L.set(a,M),$L(a)?a.forEach(function(dt){M.add(vs(dt,c,f,dt,a,L))}):VL(a)&&a.forEach(function(dt,$t){M.set($t,vs(dt,c,f,$t,a,L))});var lt=Te?X?Av:Dv:X?xi:Ur,Ut=Ne?e:lt(a);return Es(Ut||a,function(dt,$t){Ut&&($t=dt,dt=a[$t]),df(M,$t,vs(dt,c,f,$t,a,L))}),M}function e2(a){var c=Ur(a);return function(f){return Ow(f,a,c)}}function Ow(a,c,f){var E=f.length;if(a==null)return!E;for(a=wn(a);E--;){var b=f[E],L=c[b],M=a[b];if(M===e&&!(b in a)||!L(M))return!1}return!0}function Sw(a,c,f){if(typeof a!="function")throw new gs(i);return Nf(function(){a.apply(e,f)},c)}function pf(a,c,f,E){var b=-1,L=xT,M=!0,q=a.length,X=[],Te=c.length;if(!q)return X;f&&(c=Kn(c,Zi(f))),E?(L=JI,M=!1):c.length>=n&&(L=sf,M=!1,c=new Vc(c));e:for(;++bb?0:b+f),E=E===e||E>b?b:Lt(E),E<0&&(E+=b),E=f>E?0:KL(E);f0&&f(q)?c>1?Yr(q,c-1,f,E,b):Gu(b,q):E||(b[b.length]=q)}return b}var cv=eL(),Rw=eL(!0);function Ro(a,c){return a&&cv(a,c,Ur)}function lv(a,c){return a&&Rw(a,c,Ur)}function ey(a,c){return Ku(c,function(f){return ga(a[f])})}function $c(a,c){c=Wu(c,a);for(var f=0,E=c.length;a!=null&&fc}function r2(a,c){return a!=null&&Sn.call(a,c)}function i2(a,c){return a!=null&&c in wn(a)}function s2(a,c,f){return a>=Zr(c,f)&&a=120&&Ne.length>=120)?new Vc(M&&Ne):e}Ne=a[0];var Ie=-1,Fe=q[0];e:for(;++Ie-1;)q!==a&>.call(q,X,1),GT.call(a,X,1);return a}function Vw(a,c){for(var f=a?c.length:0,E=f-1;f--;){var b=c[f];if(f==E||b!==L){var L=b;Ea(b)?GT.call(a,b,1):gv(a,b)}}return a}function yv(a,c){return a+JT(gw()*(c-a+1))}function N2(a,c,f,E){for(var b=-1,L=Ar(YT((c-a)/(f||1)),0),M=oe(L);L--;)M[E?L:++b]=a,a+=f;return M}function Nv(a,c){var f="";if(!a||c<1||c>bn)return f;do c%2&&(f+=a),c=JT(c/2),c&&(a+=a);while(c);return f}function Bt(a,c){return xv(TL(a,c,Ci),a+"")}function E2(a){return _w(yd(a))}function g2(a,c){var f=yd(a);return dy(f,jc(c,0,f.length))}function hf(a,c,f,E){if(!Zn(a))return a;c=Wu(c,a);for(var b=-1,L=c.length,M=L-1,q=a;q!=null&&++bb?0:b+c),f=f>b?b:f,f<0&&(f+=b),b=c>f?0:f-c>>>0,c>>>=0;for(var L=oe(b);++E>>1,M=a[L];M!==null&&!ts(M)&&(f?M<=c:M=n){var Te=c?null:k2(a);if(Te)return UT(Te);M=!1,b=sf,X=new Vc}else X=c?[]:q;e:for(;++E=E?a:_s(a,c,f)}var Yw=dQ||function(a){return Cr.clearTimeout(a)};function Jw(a,c){if(c)return a.slice();var f=a.length,E=hw?hw(f):new a.constructor(f);return a.copy(E),E}function bv(a){var c=new a.constructor(a.byteLength);return new qT(c).set(new qT(a)),c}function O2(a,c){var f=c?bv(a.buffer):a.buffer;return new a.constructor(f,a.byteOffset,a.byteLength)}function S2(a){var c=new a.constructor(a.source,wF.exec(a));return c.lastIndex=a.lastIndex,c}function D2(a){return lf?wn(lf.call(a)):{}}function zw(a,c){var f=c?bv(a.buffer):a.buffer;return new a.constructor(f,a.byteOffset,a.length)}function Hw(a,c){if(a!==c){var f=a!==e,E=a===null,b=a===a,L=ts(a),M=c!==e,q=c===null,X=c===c,Te=ts(c);if(!q&&!Te&&!L&&a>c||L&&M&&X&&!q&&!Te||E&&M&&X||!f&&X||!b)return 1;if(!E&&!L&&!Te&&a=q)return X;var Te=f[E];return X*(Te=="desc"?-1:1)}}return a.index-c.index}function Ww(a,c,f,E){for(var b=-1,L=a.length,M=f.length,q=-1,X=c.length,Te=Ar(L-M,0),Ne=oe(X+Te),Ie=!E;++q1?f[b-1]:e,M=b>2?f[2]:e;for(L=a.length>3&&typeof L=="function"?(b--,L):e,M&&Ti(f[0],f[1],M)&&(L=b<3?e:L,b=1),c=wn(c);++E-1?b[L?c[M]:M]:e}}function rL(a){return Na(function(c){var f=c.length,E=f,b=Is.prototype.thru;for(a&&c.reverse();E--;){var L=c[E];if(typeof L!="function")throw new gs(i);if(b&&!M&&cy(L)=="wrapper")var M=new Is([],!0)}for(E=M?E:f;++E1&&Wt.reverse(),Ne&&X<$t&&(Wt.length=X),this&&this!==Cr&&this instanceof dt&&(va=Ut||Tf(va)),va.apply(ro,Wt)}return dt}function iL(a,c){return function(f,E){return o2(f,a,c(E),{})}}function oy(a,c){return function(f,E){var b;if(f===e&&E===e)return c;if(f!==e&&(b=f),E!==e){if(b===e)return E;typeof f=="string"||typeof E=="string"?(f=es(f),E=es(E)):(f=qw(f),E=qw(E)),b=a(f,E)}return b}}function Ov(a){return Na(function(c){return c=Kn(c,Zi(ct())),Bt(function(f){var E=this;return a(c,function(b){return Xi(b,E,f)})})})}function ay(a,c){c=c===e?" ":es(c);var f=c.length;if(f<2)return f?Nv(c,a):c;var E=Nv(c,YT(a/ud(c)));return ad(c)?Xu(eo(E),0,a).join(""):E.slice(0,a)}function P2(a,c,f,E){var b=c&_,L=Tf(a);function M(){for(var q=-1,X=arguments.length,Te=-1,Ne=E.length,Ie=oe(Ne+X),Fe=this&&this!==Cr&&this instanceof M?L:a;++Teq))return!1;var Te=L.get(a),Ne=L.get(c);if(Te&&Ne)return Te==c&&Ne==a;var Ie=-1,Fe=!0,ze=f&I?new Vc:e;for(L.set(a,c),L.set(c,a);++Ie1?"& ":"")+c[E],c=c.join(f>2?", ":" "),a.replace(GK,`{ /* [wrapped with `+c+`] */ -`)}function K2(a){return St(a)||Gc(a)||!!(Nw&&a&&a[Nw])}function Ea(a,c){var f=typeof a;return c=c==null?bn:c,!!c&&(f=="number"||f!="symbol"&&nG.test(a))&&a>-1&&a%1==0&&a0){if(++c>=he)return arguments[0]}else c=0;return a.apply(e,arguments)}}function dy(a,c){var f=-1,E=a.length,_=E-1;for(c=c===e?E:c;++f1?a[c-1]:e;return f=typeof f=="function"?(a.pop(),f):e,AL(a,f)});function RL(a){var c=w(a);return c.__chain__=!0,c}function tJ(a,c){return c(a),a}function py(a,c){return c(a)}var nJ=Na(function(a){var c=a.length,f=c?a[0]:0,E=this.__wrapped__,_=function(L){return uv(L,a)};return c>1||this.__actions__.length||!(E instanceof Gt)||!Ea(f)?this.thru(_):(E=E.slice(f,+f+(c?1:0)),E.__actions__.push({func:py,args:[_],thisArg:e}),new Is(E,this.__chain__).thru(function(L){return c&&!L.length&&L.push(e),L}))});function rJ(){return RL(this)}function iJ(){return new Is(this.value(),this.__chain__)}function sJ(){this.__values__===e&&(this.__values__=qL(this.value()));var a=this.__index__>=this.__values__.length,c=a?e:this.__values__[this.__index__++];return{done:a,value:c}}function oJ(){return this}function aJ(a){for(var c,f=this;f instanceof WT;){var E=vL(f);E.__index__=0,E.__values__=e,c?_.__wrapped__=E:c=E;var _=E;f=f.__wrapped__}return _.__wrapped__=a,c}function uJ(){var a=this.__wrapped__;if(a instanceof Gt){var c=a;return this.__actions__.length&&(c=new Gt(this)),c=c.reverse(),c.__actions__.push({func:py,args:[Cv],thisArg:e}),new Is(c,this.__chain__)}return this.thru(Cv)}function cJ(){return Gw(this.__wrapped__,this.__actions__)}var lJ=iy(function(a,c,f){Sn.call(a,f)?++a[f]:Ta(a,f,1)});function dJ(a,c,f){var E=St(a)?iw:t2;return f&&Ti(a,c,f)&&(c=e),E(a,ct(c,3))}function pJ(a,c){var f=St(a)?Ku:Aw;return f(a,ct(c,3))}var fJ=nL(_L),mJ=nL(bL);function hJ(a,c){return Yr(fy(a,c),1)}function TJ(a,c){return Yr(fy(a,c),_n)}function yJ(a,c,f){return f=f===e?1:Lt(f),Yr(fy(a,c),f)}function FL(a,c){var f=St(a)?Es:zu;return f(a,ct(c,3))}function wL(a,c){var f=St(a)?CG:Dw;return f(a,ct(c,3))}var NJ=iy(function(a,c,f){Sn.call(a,f)?a[f].push(c):Ta(a,f,[c])});function EJ(a,c,f,E){a=ki(a)?a:yd(a),f=f&&!E?Lt(f):0;var _=a.length;return f<0&&(f=Ar(_+f,0)),Ny(a)?f<=_&&a.indexOf(c,f)>-1:!!_&&od(a,c,f)>-1}var gJ=Bt(function(a,c,f){var E=-1,_=typeof c=="function",L=ki(a)?oe(a.length):[];return zu(a,function(M){L[++E]=_?Xi(c,M,f):ff(M,c,f)}),L}),IJ=iy(function(a,c,f){Ta(a,f,c)});function fy(a,c){var f=St(a)?Kn:kw;return f(a,ct(c,3))}function vJ(a,c,f,E){return a==null?[]:(St(c)||(c=c==null?[]:[c]),f=E?e:f,St(f)||(f=f==null?[]:[f]),Mw(a,c,f))}var _J=iy(function(a,c,f){a[f?0:1].push(c)},function(){return[[],[]]});function bJ(a,c,f){var E=St(a)?zI:uw,_=arguments.length<3;return E(a,ct(c,4),f,_,zu)}function OJ(a,c,f){var E=St(a)?UG:uw,_=arguments.length<3;return E(a,ct(c,4),f,_,Dw)}function SJ(a,c){var f=St(a)?Ku:Aw;return f(a,Ty(ct(c,3)))}function DJ(a){var c=St(a)?_w:E2;return c(a)}function AJ(a,c,f){(f?Ti(a,c,f):c===e)?c=1:c=Lt(c);var E=St(a)?HQ:g2;return E(a,c)}function RJ(a){var c=St(a)?WQ:v2;return c(a)}function FJ(a){if(a==null)return 0;if(ki(a))return Ny(a)?ud(a):a.length;var c=ei(a);return c==Je||c==Gr?a.size:mv(a).length}function wJ(a,c,f){var E=St(a)?HI:_2;return f&&Ti(a,c,f)&&(c=e),E(a,ct(c,3))}var LJ=Bt(function(a,c){if(a==null)return[];var f=c.length;return f>1&&Ti(a,c[0],c[1])?c=[]:f>2&&Ti(c[0],c[1],c[2])&&(c=[c[0]]),Mw(a,Yr(c,1),[])}),my=pQ||function(){return Cr.Date.now()};function PJ(a,c){if(typeof c!="function")throw new gs(i);return a=Lt(a),function(){if(--a<1)return c.apply(this,arguments)}}function LL(a,c,f){return c=f?e:c,c=a&&c==null?a.length:c,ya(a,ye,e,e,e,e,c)}function PL(a,c){var f;if(typeof c!="function")throw new gs(i);return a=Lt(a),function(){return--a>0&&(f=c.apply(this,arguments)),a<=1&&(c=e),f}}var Mv=Bt(function(a,c,f){var E=b;if(f.length){var _=Qu(f,hd(Mv));E|=se}return ya(a,E,c,f,_)}),kL=Bt(function(a,c,f){var E=b|x;if(f.length){var _=Qu(f,hd(kL));E|=se}return ya(c,E,a,f,_)});function xL(a,c,f){c=f?e:c;var E=ya(a,Q,e,e,e,e,e,c);return E.placeholder=xL.placeholder,E}function CL(a,c,f){c=f?e:c;var E=ya(a,re,e,e,e,e,e,c);return E.placeholder=CL.placeholder,E}function UL(a,c,f){var E,_,L,M,q,X,Te=0,Ne=!1,Ie=!1,Fe=!0;if(typeof a!="function")throw new gs(i);c=Os(c)||0,Zn(f)&&(Ne=!!f.leading,Ie="maxWait"in f,L=Ie?Ar(Os(f.maxWait)||0,c):L,Fe="trailing"in f?!!f.trailing:Fe);function ze(Tr){var ro=E,va=_;return E=_=e,Te=Tr,M=a.apply(va,ro),M}function lt(Tr){return Te=Tr,q=Nf($t,c),Ne?ze(Tr):M}function Ut(Tr){var ro=Tr-X,va=Tr-Te,nP=c-ro;return Ie?Zr(nP,L-va):nP}function dt(Tr){var ro=Tr-X,va=Tr-Te;return X===e||ro>=c||ro<0||Ie&&va>=L}function $t(){var Tr=my();if(dt(Tr))return Wt(Tr);q=Nf($t,Ut(Tr))}function Wt(Tr){return q=e,Fe&&E?ze(Tr):(E=_=e,M)}function ns(){q!==e&&Yw(q),Te=0,E=X=_=q=e}function yi(){return q===e?M:Wt(my())}function rs(){var Tr=my(),ro=dt(Tr);if(E=arguments,_=this,X=Tr,ro){if(q===e)return lt(X);if(Ie)return Yw(q),q=Nf($t,c),ze(X)}return q===e&&(q=Nf($t,c)),M}return rs.cancel=ns,rs.flush=yi,rs}var kJ=Bt(function(a,c){return Sw(a,1,c)}),xJ=Bt(function(a,c,f){return Sw(a,Os(c)||0,f)});function CJ(a){return ya(a,ht)}function hy(a,c){if(typeof a!="function"||c!=null&&typeof c!="function")throw new gs(i);var f=function(){var E=arguments,_=c?c.apply(this,E):E[0],L=f.cache;if(L.has(_))return L.get(_);var M=a.apply(this,E);return f.cache=L.set(_,M)||L,M};return f.cache=new(hy.Cache||ha),f}hy.Cache=ha;function Ty(a){if(typeof a!="function")throw new gs(i);return function(){var c=arguments;switch(c.length){case 0:return!a.call(this);case 1:return!a.call(this,c[0]);case 2:return!a.call(this,c[0],c[1]);case 3:return!a.call(this,c[0],c[1],c[2])}return!a.apply(this,c)}}function UJ(a){return PL(2,a)}var MJ=b2(function(a,c){c=c.length==1&&St(c[0])?Kn(c[0],Zi(ct())):Kn(Yr(c,1),Zi(ct()));var f=c.length;return Bt(function(E){for(var _=-1,L=Zr(E.length,f);++_=c}),Gc=ww(function(){return arguments}())?ww:function(a){return ir(a)&&Sn.call(a,"callee")&&!yw.call(a,"callee")},St=oe.isArray,ZJ=XF?Zi(XF):a2;function ki(a){return a!=null&&yy(a.length)&&!ga(a)}function hr(a){return ir(a)&&ki(a)}function e3(a){return a===!0||a===!1||ir(a)&&hi(a)==Ke}var Zu=mQ||Hv,t3=ZF?Zi(ZF):u2;function n3(a){return ir(a)&&a.nodeType===1&&!Ef(a)}function r3(a){if(a==null)return!0;if(ki(a)&&(St(a)||typeof a=="string"||typeof a.splice=="function"||Zu(a)||Td(a)||Gc(a)))return!a.length;var c=ei(a);if(c==Je||c==Gr)return!a.size;if(yf(a))return!mv(a).length;for(var f in a)if(Sn.call(a,f))return!1;return!0}function i3(a,c){return mf(a,c)}function s3(a,c,f){f=typeof f=="function"?f:e;var E=f?f(a,c):e;return E===e?mf(a,c,e,f):!!E}function Vv(a){if(!ir(a))return!1;var c=hi(a);return c==Ue||c==ee||typeof a.message=="string"&&typeof a.name=="string"&&!Ef(a)}function o3(a){return typeof a=="number"&&Ew(a)}function ga(a){if(!Zn(a))return!1;var c=hi(a);return c==Xe||c==jt||c==ce||c==id}function BL(a){return typeof a=="number"&&a==Lt(a)}function yy(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=bn}function Zn(a){var c=typeof a;return a!=null&&(c=="object"||c=="function")}function ir(a){return a!=null&&typeof a=="object"}var VL=ew?Zi(ew):l2;function a3(a,c){return a===c||fv(a,c,Fv(c))}function u3(a,c,f){return f=typeof f=="function"?f:e,fv(a,c,Fv(c),f)}function c3(a){return jL(a)&&a!=+a}function l3(a){if(Y2(a))throw new _t(r);return Lw(a)}function d3(a){return a===null}function p3(a){return a==null}function jL(a){return typeof a=="number"||ir(a)&&hi(a)==Ht}function Ef(a){if(!ir(a)||hi(a)!=Li)return!1;var c=KT(a);if(c===null)return!0;var f=Sn.call(c,"constructor")&&c.constructor;return typeof f=="function"&&f instanceof f&&VT.call(f)==uQ}var jv=tw?Zi(tw):d2;function f3(a){return BL(a)&&a>=-bn&&a<=bn}var $L=nw?Zi(nw):p2;function Ny(a){return typeof a=="string"||!St(a)&&ir(a)&&hi(a)==Wi}function ts(a){return typeof a=="symbol"||ir(a)&&hi(a)==cn}var Td=rw?Zi(rw):f2;function m3(a){return a===e}function h3(a){return ir(a)&&ei(a)==xc}function T3(a){return ir(a)&&hi(a)==Ao}var y3=uy(hv),N3=uy(function(a,c){return a<=c});function qL(a){if(!a)return[];if(ki(a))return Ny(a)?eo(a):Pi(a);if(of&&a[of])return HG(a[of]());var c=ei(a),f=c==Je?nv:c==Gr?UT:yd;return f(a)}function Ia(a){if(!a)return a===0?a:0;if(a=Os(a),a===_n||a===-_n){var c=a<0?-1:1;return c*mi}return a===a?a:0}function Lt(a){var c=Ia(a),f=c%1;return c===c?f?c-f:c:0}function KL(a){return a?jc(Lt(a),0,Pn):0}function Os(a){if(typeof a=="number")return a;if(ts(a))return Xr;if(Zn(a)){var c=typeof a.valueOf=="function"?a.valueOf():a;a=Zn(c)?c+"":c}if(typeof a!="string")return a===0?a:+a;a=cw(a);var f=ZK.test(a);return f||tG.test(a)?PG(a.slice(2),f?2:8):XK.test(a)?Xr:+a}function GL(a){return Fo(a,xi(a))}function E3(a){return a?jc(Lt(a),-bn,bn):a===0?a:0}function yn(a){return a==null?"":es(a)}var g3=fd(function(a,c){if(yf(c)||ki(c)){Fo(c,Ur(c),a);return}for(var f in c)Sn.call(c,f)&&df(a,f,c[f])}),QL=fd(function(a,c){Fo(c,xi(c),a)}),Ey=fd(function(a,c,f,E){Fo(c,xi(c),a,E)}),I3=fd(function(a,c,f,E){Fo(c,Ur(c),a,E)}),v3=Na(uv);function _3(a,c){var f=pd(a);return c==null?f:bw(f,c)}var b3=Bt(function(a,c){a=wn(a);var f=-1,E=c.length,_=E>2?c[2]:e;for(_&&Ti(c[0],c[1],_)&&(E=1);++f1),L}),Fo(a,Av(a),f),E&&(f=vs(f,d|p|y,x2));for(var _=c.length;_--;)gv(f,c[_]);return f});function $3(a,c){return JL(a,Ty(ct(c)))}var q3=Na(function(a,c){return a==null?{}:T2(a,c)});function JL(a,c){if(a==null)return{};var f=Kn(Av(a),function(E){return[E]});return c=ct(c),Bw(a,f,function(E,_){return c(E,_[0])})}function K3(a,c,f){c=Wu(c,a);var E=-1,_=c.length;for(_||(_=1,a=e);++E<_;){var L=a==null?e:a[wo(c[E])];L===e&&(E=_,L=f),a=ga(L)?L.call(a):L}return a}function G3(a,c,f){return a==null?a:hf(a,c,f)}function Q3(a,c,f,E){return E=typeof E=="function"?E:e,a==null?a:hf(a,c,f,E)}var zL=aL(Ur),HL=aL(xi);function Y3(a,c,f){var E=St(a),_=E||Zu(a)||Td(a);if(c=ct(c,4),f==null){var L=a&&a.constructor;_?f=E?new L:[]:Zn(a)?f=ga(L)?pd(KT(a)):{}:f={}}return(_?Es:Ro)(a,function(M,q,X){return c(f,M,q,X)}),f}function J3(a,c){return a==null?!0:gv(a,c)}function z3(a,c,f){return a==null?a:Kw(a,c,_v(f))}function H3(a,c,f,E){return E=typeof E=="function"?E:e,a==null?a:Kw(a,c,_v(f),E)}function yd(a){return a==null?[]:tv(a,Ur(a))}function W3(a){return a==null?[]:tv(a,xi(a))}function X3(a,c,f){return f===e&&(f=c,c=e),f!==e&&(f=Os(f),f=f===f?f:0),c!==e&&(c=Os(c),c=c===c?c:0),jc(Os(a),c,f)}function Z3(a,c,f){return c=Ia(c),f===e?(f=c,c=0):f=Ia(f),a=Os(a),s2(a,c,f)}function ez(a,c,f){if(f&&typeof f!="boolean"&&Ti(a,c,f)&&(c=f=e),f===e&&(typeof c=="boolean"?(f=c,c=e):typeof a=="boolean"&&(f=a,a=e)),a===e&&c===e?(a=0,c=1):(a=Ia(a),c===e?(c=a,a=0):c=Ia(c)),a>c){var E=a;a=c,c=E}if(f||a%1||c%1){var _=gw();return Zr(a+_*(c-a+LG("1e-"+((_+"").length-1))),c)}return yv(a,c)}var tz=md(function(a,c,f){return c=c.toLowerCase(),a+(f?WL(c):c)});function WL(a){return Kv(yn(a).toLowerCase())}function XL(a){return a=yn(a),a&&a.replace(rG,GG).replace(vG,"")}function nz(a,c,f){a=yn(a),c=es(c);var E=a.length;f=f===e?E:jc(Lt(f),0,E);var _=f;return f-=c.length,f>=0&&a.slice(f,_)==c}function rz(a){return a=yn(a),a&&UK.test(a)?a.replace(RF,QG):a}function iz(a){return a=yn(a),a&&qK.test(a)?a.replace(BI,"\\$&"):a}var sz=md(function(a,c,f){return a+(f?"-":"")+c.toLowerCase()}),oz=md(function(a,c,f){return a+(f?" ":"")+c.toLowerCase()}),az=tL("toLowerCase");function uz(a,c,f){a=yn(a),c=Lt(c);var E=c?ud(a):0;if(!c||E>=c)return a;var _=(c-E)/2;return ay(JT(_),f)+a+ay(YT(_),f)}function cz(a,c,f){a=yn(a),c=Lt(c);var E=c?ud(a):0;return c&&E>>0,f?(a=yn(a),a&&(typeof c=="string"||c!=null&&!jv(c))&&(c=es(c),!c&&ad(a))?Xu(eo(a),0,f):a.split(c,f)):[]}var Tz=md(function(a,c,f){return a+(f?" ":"")+Kv(c)});function yz(a,c,f){return a=yn(a),f=f==null?0:jc(Lt(f),0,a.length),c=es(c),a.slice(f,f+c.length)==c}function Nz(a,c,f){var E=w.templateSettings;f&&Ti(a,c,f)&&(c=e),a=yn(a),c=Ey({},c,E,uL);var _=Ey({},c.imports,E.imports,uL),L=Ur(_),M=tv(_,L),q,X,Te=0,Ne=c.interpolate||LT,Ie="__p += '",Fe=rv((c.escape||LT).source+"|"+Ne.source+"|"+(Ne===FF?WK:LT).source+"|"+(c.evaluate||LT).source+"|$","g"),ze="//# sourceURL="+(Sn.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++DG+"]")+` +`)}function K2(a){return St(a)||Gc(a)||!!(Nw&&a&&a[Nw])}function Ea(a,c){var f=typeof a;return c=c==null?bn:c,!!c&&(f=="number"||f!="symbol"&&nG.test(a))&&a>-1&&a%1==0&&a0){if(++c>=he)return arguments[0]}else c=0;return a.apply(e,arguments)}}function dy(a,c){var f=-1,E=a.length,b=E-1;for(c=c===e?E:c;++f1?a[c-1]:e;return f=typeof f=="function"?(a.pop(),f):e,AL(a,f)});function RL(a){var c=w(a);return c.__chain__=!0,c}function tJ(a,c){return c(a),a}function py(a,c){return c(a)}var nJ=Na(function(a){var c=a.length,f=c?a[0]:0,E=this.__wrapped__,b=function(L){return uv(L,a)};return c>1||this.__actions__.length||!(E instanceof Gt)||!Ea(f)?this.thru(b):(E=E.slice(f,+f+(c?1:0)),E.__actions__.push({func:py,args:[b],thisArg:e}),new Is(E,this.__chain__).thru(function(L){return c&&!L.length&&L.push(e),L}))});function rJ(){return RL(this)}function iJ(){return new Is(this.value(),this.__chain__)}function sJ(){this.__values__===e&&(this.__values__=qL(this.value()));var a=this.__index__>=this.__values__.length,c=a?e:this.__values__[this.__index__++];return{done:a,value:c}}function oJ(){return this}function aJ(a){for(var c,f=this;f instanceof WT;){var E=vL(f);E.__index__=0,E.__values__=e,c?b.__wrapped__=E:c=E;var b=E;f=f.__wrapped__}return b.__wrapped__=a,c}function uJ(){var a=this.__wrapped__;if(a instanceof Gt){var c=a;return this.__actions__.length&&(c=new Gt(this)),c=c.reverse(),c.__actions__.push({func:py,args:[Cv],thisArg:e}),new Is(c,this.__chain__)}return this.thru(Cv)}function cJ(){return Gw(this.__wrapped__,this.__actions__)}var lJ=iy(function(a,c,f){Sn.call(a,f)?++a[f]:Ta(a,f,1)});function dJ(a,c,f){var E=St(a)?iw:t2;return f&&Ti(a,c,f)&&(c=e),E(a,ct(c,3))}function pJ(a,c){var f=St(a)?Ku:Aw;return f(a,ct(c,3))}var fJ=nL(_L),mJ=nL(bL);function hJ(a,c){return Yr(fy(a,c),1)}function TJ(a,c){return Yr(fy(a,c),_n)}function yJ(a,c,f){return f=f===e?1:Lt(f),Yr(fy(a,c),f)}function FL(a,c){var f=St(a)?Es:zu;return f(a,ct(c,3))}function wL(a,c){var f=St(a)?CG:Dw;return f(a,ct(c,3))}var NJ=iy(function(a,c,f){Sn.call(a,f)?a[f].push(c):Ta(a,f,[c])});function EJ(a,c,f,E){a=ki(a)?a:yd(a),f=f&&!E?Lt(f):0;var b=a.length;return f<0&&(f=Ar(b+f,0)),Ny(a)?f<=b&&a.indexOf(c,f)>-1:!!b&&od(a,c,f)>-1}var gJ=Bt(function(a,c,f){var E=-1,b=typeof c=="function",L=ki(a)?oe(a.length):[];return zu(a,function(M){L[++E]=b?Xi(c,M,f):ff(M,c,f)}),L}),IJ=iy(function(a,c,f){Ta(a,f,c)});function fy(a,c){var f=St(a)?Kn:kw;return f(a,ct(c,3))}function vJ(a,c,f,E){return a==null?[]:(St(c)||(c=c==null?[]:[c]),f=E?e:f,St(f)||(f=f==null?[]:[f]),Mw(a,c,f))}var _J=iy(function(a,c,f){a[f?0:1].push(c)},function(){return[[],[]]});function bJ(a,c,f){var E=St(a)?zI:uw,b=arguments.length<3;return E(a,ct(c,4),f,b,zu)}function OJ(a,c,f){var E=St(a)?UG:uw,b=arguments.length<3;return E(a,ct(c,4),f,b,Dw)}function SJ(a,c){var f=St(a)?Ku:Aw;return f(a,Ty(ct(c,3)))}function DJ(a){var c=St(a)?_w:E2;return c(a)}function AJ(a,c,f){(f?Ti(a,c,f):c===e)?c=1:c=Lt(c);var E=St(a)?HQ:g2;return E(a,c)}function RJ(a){var c=St(a)?WQ:v2;return c(a)}function FJ(a){if(a==null)return 0;if(ki(a))return Ny(a)?ud(a):a.length;var c=ei(a);return c==Je||c==Gr?a.size:mv(a).length}function wJ(a,c,f){var E=St(a)?HI:_2;return f&&Ti(a,c,f)&&(c=e),E(a,ct(c,3))}var LJ=Bt(function(a,c){if(a==null)return[];var f=c.length;return f>1&&Ti(a,c[0],c[1])?c=[]:f>2&&Ti(c[0],c[1],c[2])&&(c=[c[0]]),Mw(a,Yr(c,1),[])}),my=pQ||function(){return Cr.Date.now()};function PJ(a,c){if(typeof c!="function")throw new gs(i);return a=Lt(a),function(){if(--a<1)return c.apply(this,arguments)}}function LL(a,c,f){return c=f?e:c,c=a&&c==null?a.length:c,ya(a,ye,e,e,e,e,c)}function PL(a,c){var f;if(typeof c!="function")throw new gs(i);return a=Lt(a),function(){return--a>0&&(f=c.apply(this,arguments)),a<=1&&(c=e),f}}var Mv=Bt(function(a,c,f){var E=_;if(f.length){var b=Qu(f,hd(Mv));E|=se}return ya(a,E,c,f,b)}),kL=Bt(function(a,c,f){var E=_|C;if(f.length){var b=Qu(f,hd(kL));E|=se}return ya(c,E,a,f,b)});function xL(a,c,f){c=f?e:c;var E=ya(a,Q,e,e,e,e,e,c);return E.placeholder=xL.placeholder,E}function CL(a,c,f){c=f?e:c;var E=ya(a,re,e,e,e,e,e,c);return E.placeholder=CL.placeholder,E}function UL(a,c,f){var E,b,L,M,q,X,Te=0,Ne=!1,Ie=!1,Fe=!0;if(typeof a!="function")throw new gs(i);c=Os(c)||0,Zn(f)&&(Ne=!!f.leading,Ie="maxWait"in f,L=Ie?Ar(Os(f.maxWait)||0,c):L,Fe="trailing"in f?!!f.trailing:Fe);function ze(Tr){var ro=E,va=b;return E=b=e,Te=Tr,M=a.apply(va,ro),M}function lt(Tr){return Te=Tr,q=Nf($t,c),Ne?ze(Tr):M}function Ut(Tr){var ro=Tr-X,va=Tr-Te,nP=c-ro;return Ie?Zr(nP,L-va):nP}function dt(Tr){var ro=Tr-X,va=Tr-Te;return X===e||ro>=c||ro<0||Ie&&va>=L}function $t(){var Tr=my();if(dt(Tr))return Wt(Tr);q=Nf($t,Ut(Tr))}function Wt(Tr){return q=e,Fe&&E?ze(Tr):(E=b=e,M)}function ns(){q!==e&&Yw(q),Te=0,E=X=b=q=e}function yi(){return q===e?M:Wt(my())}function rs(){var Tr=my(),ro=dt(Tr);if(E=arguments,b=this,X=Tr,ro){if(q===e)return lt(X);if(Ie)return Yw(q),q=Nf($t,c),ze(X)}return q===e&&(q=Nf($t,c)),M}return rs.cancel=ns,rs.flush=yi,rs}var kJ=Bt(function(a,c){return Sw(a,1,c)}),xJ=Bt(function(a,c,f){return Sw(a,Os(c)||0,f)});function CJ(a){return ya(a,ht)}function hy(a,c){if(typeof a!="function"||c!=null&&typeof c!="function")throw new gs(i);var f=function(){var E=arguments,b=c?c.apply(this,E):E[0],L=f.cache;if(L.has(b))return L.get(b);var M=a.apply(this,E);return f.cache=L.set(b,M)||L,M};return f.cache=new(hy.Cache||ha),f}hy.Cache=ha;function Ty(a){if(typeof a!="function")throw new gs(i);return function(){var c=arguments;switch(c.length){case 0:return!a.call(this);case 1:return!a.call(this,c[0]);case 2:return!a.call(this,c[0],c[1]);case 3:return!a.call(this,c[0],c[1],c[2])}return!a.apply(this,c)}}function UJ(a){return PL(2,a)}var MJ=b2(function(a,c){c=c.length==1&&St(c[0])?Kn(c[0],Zi(ct())):Kn(Yr(c,1),Zi(ct()));var f=c.length;return Bt(function(E){for(var b=-1,L=Zr(E.length,f);++b=c}),Gc=ww(function(){return arguments}())?ww:function(a){return ir(a)&&Sn.call(a,"callee")&&!yw.call(a,"callee")},St=oe.isArray,ZJ=XF?Zi(XF):a2;function ki(a){return a!=null&&yy(a.length)&&!ga(a)}function hr(a){return ir(a)&&ki(a)}function e3(a){return a===!0||a===!1||ir(a)&&hi(a)==Ke}var Zu=mQ||Hv,t3=ZF?Zi(ZF):u2;function n3(a){return ir(a)&&a.nodeType===1&&!Ef(a)}function r3(a){if(a==null)return!0;if(ki(a)&&(St(a)||typeof a=="string"||typeof a.splice=="function"||Zu(a)||Td(a)||Gc(a)))return!a.length;var c=ei(a);if(c==Je||c==Gr)return!a.size;if(yf(a))return!mv(a).length;for(var f in a)if(Sn.call(a,f))return!1;return!0}function i3(a,c){return mf(a,c)}function s3(a,c,f){f=typeof f=="function"?f:e;var E=f?f(a,c):e;return E===e?mf(a,c,e,f):!!E}function Vv(a){if(!ir(a))return!1;var c=hi(a);return c==Ue||c==ee||typeof a.message=="string"&&typeof a.name=="string"&&!Ef(a)}function o3(a){return typeof a=="number"&&Ew(a)}function ga(a){if(!Zn(a))return!1;var c=hi(a);return c==Xe||c==jt||c==ce||c==id}function BL(a){return typeof a=="number"&&a==Lt(a)}function yy(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=bn}function Zn(a){var c=typeof a;return a!=null&&(c=="object"||c=="function")}function ir(a){return a!=null&&typeof a=="object"}var VL=ew?Zi(ew):l2;function a3(a,c){return a===c||fv(a,c,Fv(c))}function u3(a,c,f){return f=typeof f=="function"?f:e,fv(a,c,Fv(c),f)}function c3(a){return jL(a)&&a!=+a}function l3(a){if(Y2(a))throw new _t(r);return Lw(a)}function d3(a){return a===null}function p3(a){return a==null}function jL(a){return typeof a=="number"||ir(a)&&hi(a)==Ht}function Ef(a){if(!ir(a)||hi(a)!=Li)return!1;var c=KT(a);if(c===null)return!0;var f=Sn.call(c,"constructor")&&c.constructor;return typeof f=="function"&&f instanceof f&&VT.call(f)==uQ}var jv=tw?Zi(tw):d2;function f3(a){return BL(a)&&a>=-bn&&a<=bn}var $L=nw?Zi(nw):p2;function Ny(a){return typeof a=="string"||!St(a)&&ir(a)&&hi(a)==Wi}function ts(a){return typeof a=="symbol"||ir(a)&&hi(a)==cn}var Td=rw?Zi(rw):f2;function m3(a){return a===e}function h3(a){return ir(a)&&ei(a)==xc}function T3(a){return ir(a)&&hi(a)==Ao}var y3=uy(hv),N3=uy(function(a,c){return a<=c});function qL(a){if(!a)return[];if(ki(a))return Ny(a)?eo(a):Pi(a);if(of&&a[of])return HG(a[of]());var c=ei(a),f=c==Je?nv:c==Gr?UT:yd;return f(a)}function Ia(a){if(!a)return a===0?a:0;if(a=Os(a),a===_n||a===-_n){var c=a<0?-1:1;return c*mi}return a===a?a:0}function Lt(a){var c=Ia(a),f=c%1;return c===c?f?c-f:c:0}function KL(a){return a?jc(Lt(a),0,Pn):0}function Os(a){if(typeof a=="number")return a;if(ts(a))return Xr;if(Zn(a)){var c=typeof a.valueOf=="function"?a.valueOf():a;a=Zn(c)?c+"":c}if(typeof a!="string")return a===0?a:+a;a=cw(a);var f=ZK.test(a);return f||tG.test(a)?PG(a.slice(2),f?2:8):XK.test(a)?Xr:+a}function GL(a){return Fo(a,xi(a))}function E3(a){return a?jc(Lt(a),-bn,bn):a===0?a:0}function yn(a){return a==null?"":es(a)}var g3=fd(function(a,c){if(yf(c)||ki(c)){Fo(c,Ur(c),a);return}for(var f in c)Sn.call(c,f)&&df(a,f,c[f])}),QL=fd(function(a,c){Fo(c,xi(c),a)}),Ey=fd(function(a,c,f,E){Fo(c,xi(c),a,E)}),I3=fd(function(a,c,f,E){Fo(c,Ur(c),a,E)}),v3=Na(uv);function _3(a,c){var f=pd(a);return c==null?f:bw(f,c)}var b3=Bt(function(a,c){a=wn(a);var f=-1,E=c.length,b=E>2?c[2]:e;for(b&&Ti(c[0],c[1],b)&&(E=1);++f1),L}),Fo(a,Av(a),f),E&&(f=vs(f,d|p|y,x2));for(var b=c.length;b--;)gv(f,c[b]);return f});function $3(a,c){return JL(a,Ty(ct(c)))}var q3=Na(function(a,c){return a==null?{}:T2(a,c)});function JL(a,c){if(a==null)return{};var f=Kn(Av(a),function(E){return[E]});return c=ct(c),Bw(a,f,function(E,b){return c(E,b[0])})}function K3(a,c,f){c=Wu(c,a);var E=-1,b=c.length;for(b||(b=1,a=e);++Ec){var E=a;a=c,c=E}if(f||a%1||c%1){var b=gw();return Zr(a+b*(c-a+LG("1e-"+((b+"").length-1))),c)}return yv(a,c)}var tz=md(function(a,c,f){return c=c.toLowerCase(),a+(f?WL(c):c)});function WL(a){return Kv(yn(a).toLowerCase())}function XL(a){return a=yn(a),a&&a.replace(rG,GG).replace(vG,"")}function nz(a,c,f){a=yn(a),c=es(c);var E=a.length;f=f===e?E:jc(Lt(f),0,E);var b=f;return f-=c.length,f>=0&&a.slice(f,b)==c}function rz(a){return a=yn(a),a&&UK.test(a)?a.replace(RF,QG):a}function iz(a){return a=yn(a),a&&qK.test(a)?a.replace(BI,"\\$&"):a}var sz=md(function(a,c,f){return a+(f?"-":"")+c.toLowerCase()}),oz=md(function(a,c,f){return a+(f?" ":"")+c.toLowerCase()}),az=tL("toLowerCase");function uz(a,c,f){a=yn(a),c=Lt(c);var E=c?ud(a):0;if(!c||E>=c)return a;var b=(c-E)/2;return ay(JT(b),f)+a+ay(YT(b),f)}function cz(a,c,f){a=yn(a),c=Lt(c);var E=c?ud(a):0;return c&&E>>0,f?(a=yn(a),a&&(typeof c=="string"||c!=null&&!jv(c))&&(c=es(c),!c&&ad(a))?Xu(eo(a),0,f):a.split(c,f)):[]}var Tz=md(function(a,c,f){return a+(f?" ":"")+Kv(c)});function yz(a,c,f){return a=yn(a),f=f==null?0:jc(Lt(f),0,a.length),c=es(c),a.slice(f,f+c.length)==c}function Nz(a,c,f){var E=w.templateSettings;f&&Ti(a,c,f)&&(c=e),a=yn(a),c=Ey({},c,E,uL);var b=Ey({},c.imports,E.imports,uL),L=Ur(b),M=tv(b,L),q,X,Te=0,Ne=c.interpolate||LT,Ie="__p += '",Fe=rv((c.escape||LT).source+"|"+Ne.source+"|"+(Ne===FF?WK:LT).source+"|"+(c.evaluate||LT).source+"|$","g"),ze="//# sourceURL="+(Sn.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++DG+"]")+` `;a.replace(Fe,function(dt,$t,Wt,ns,yi,rs){return Wt||(Wt=ns),Ie+=a.slice(Te,rs).replace(iG,YG),$t&&(q=!0,Ie+=`' + __e(`+$t+`) + '`),yi&&(X=!0,Ie+=`'; @@ -666,10 +666,10 @@ __p += '`),Wt&&(Ie+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Ie+`return __p -}`;var Ut=eP(function(){return pn(L,ze+"return "+Ie).apply(e,M)});if(Ut.source=Ie,Vv(Ut))throw Ut;return Ut}function Ez(a){return yn(a).toLowerCase()}function gz(a){return yn(a).toUpperCase()}function Iz(a,c,f){if(a=yn(a),a&&(f||c===e))return cw(a);if(!a||!(c=es(c)))return a;var E=eo(a),_=eo(c),L=lw(E,_),M=dw(E,_)+1;return Xu(E,L,M).join("")}function vz(a,c,f){if(a=yn(a),a&&(f||c===e))return a.slice(0,fw(a)+1);if(!a||!(c=es(c)))return a;var E=eo(a),_=dw(E,eo(c))+1;return Xu(E,0,_).join("")}function _z(a,c,f){if(a=yn(a),a&&(f||c===e))return a.replace(VI,"");if(!a||!(c=es(c)))return a;var E=eo(a),_=lw(E,eo(c));return Xu(E,_).join("")}function bz(a,c){var f=xt,E=B;if(Zn(c)){var _="separator"in c?c.separator:_;f="length"in c?Lt(c.length):f,E="omission"in c?es(c.omission):E}a=yn(a);var L=a.length;if(ad(a)){var M=eo(a);L=M.length}if(f>=L)return a;var q=f-ud(E);if(q<1)return E;var X=M?Xu(M,0,q).join(""):a.slice(0,q);if(_===e)return X+E;if(M&&(q+=X.length-q),jv(_)){if(a.slice(q).search(_)){var Te,Ne=X;for(_.global||(_=rv(_.source,yn(wF.exec(_))+"g")),_.lastIndex=0;Te=_.exec(Ne);)var Ie=Te.index;X=X.slice(0,Ie===e?q:Ie)}}else if(a.indexOf(es(_),q)!=q){var Fe=X.lastIndexOf(_);Fe>-1&&(X=X.slice(0,Fe))}return X+E}function Oz(a){return a=yn(a),a&&CK.test(a)?a.replace(AF,eQ):a}var Sz=md(function(a,c,f){return a+(f?" ":"")+c.toUpperCase()}),Kv=tL("toUpperCase");function ZL(a,c,f){return a=yn(a),c=f?e:c,c===e?zG(a)?rQ(a):VG(a):a.match(c)||[]}var eP=Bt(function(a,c){try{return Xi(a,e,c)}catch(f){return Vv(f)?f:new _t(f)}}),Dz=Na(function(a,c){return Es(c,function(f){f=wo(f),Ta(a,f,Mv(a[f],a))}),a});function Az(a){var c=a==null?0:a.length,f=ct();return a=c?Kn(a,function(E){if(typeof E[1]!="function")throw new gs(i);return[f(E[0]),E[1]]}):[],Bt(function(E){for(var _=-1;++_bn)return[];var f=Pn,E=Zr(a,Pn);c=ct(c),a-=Pn;for(var _=ev(E,c);++f0||c<0)?new Gt(f):(a<0?f=f.takeRight(-a):a&&(f=f.drop(a)),c!==e&&(c=Lt(c),f=c<0?f.dropRight(-c):f.take(c-a)),f)},Gt.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Gt.prototype.toArray=function(){return this.take(Pn)},Ro(Gt.prototype,function(a,c){var f=/^(?:filter|find|map|reject)|While$/.test(c),E=/^(?:head|last)$/.test(c),_=w[E?"take"+(c=="last"?"Right":""):c],L=E||/^find/.test(c);_&&(w.prototype[c]=function(){var M=this.__wrapped__,q=E?[1]:arguments,X=M instanceof Gt,Te=q[0],Ne=X||St(M),Ie=function($t){var Wt=_.apply(w,Gu([$t],q));return E&&Fe?Wt[0]:Wt};Ne&&f&&typeof Te=="function"&&Te.length!=1&&(X=Ne=!1);var Fe=this.__chain__,ze=!!this.__actions__.length,lt=L&&!Fe,Ut=X&&!ze;if(!L&&Ne){M=Ut?M:new Gt(this);var dt=a.apply(M,q);return dt.__actions__.push({func:py,args:[Ie],thisArg:e}),new Is(dt,Fe)}return lt&&Ut?a.apply(this,q):(dt=this.thru(Ie),lt?E?dt.value()[0]:dt.value():dt)})}),Es(["pop","push","shift","sort","splice","unshift"],function(a){var c=MT[a],f=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",E=/^(?:pop|shift)$/.test(a);w.prototype[a]=function(){var _=arguments;if(E&&!this.__chain__){var L=this.value();return c.apply(St(L)?L:[],_)}return this[f](function(M){return c.apply(St(M)?M:[],_)})}}),Ro(Gt.prototype,function(a,c){var f=w[c];if(f){var E=f.name+"";Sn.call(dd,E)||(dd[E]=[]),dd[E].push({name:c,func:f})}}),dd[sy(e,x).name]=[{name:"wrapper",func:e}],Gt.prototype.clone=OQ,Gt.prototype.reverse=SQ,Gt.prototype.value=DQ,w.prototype.at=nJ,w.prototype.chain=rJ,w.prototype.commit=iJ,w.prototype.next=sJ,w.prototype.plant=aJ,w.prototype.reverse=uJ,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=cJ,w.prototype.first=w.prototype.head,of&&(w.prototype[of]=oJ),w},Yu=iQ();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Cr._=Yu,define(function(){return Yu})):Uc?((Uc.exports=Yu)._=Yu,QI._=Yu):Cr._=Yu}).call(Jp)});var wq=V(Xl=>{"use strict";m();T();h();Object.defineProperty(Xl,"__esModule",{value:!0});Xl.FederationFactory=void 0;Xl.federateSubgraphs=Tde;Xl.federateSubgraphsWithContracts=yde;Xl.federateSubgraphsContract=Nde;var ke=(we(),Me(je)),wc=$a(),Xs=Vi(),xe=To(),zp=DR(),Ae=bi(),ve=ps(),uI=Zg(),fr=_c(),fde=qR(),mde=$l(),Rq=$h(),Se=Kp(),hde=QR(),Fq=Aq(),Hp=aI(),cI=_h(),lI=class{constructor(t){A(this,"authorizationDataByParentTypeName");A(this,"concreteTypeNamesByAbstractTypeName");A(this,"clientDefinitions",[fr.DEPRECATED_DEFINITION]);A(this,"currentSubgraphName","");A(this,"subgraphNamesByNamedTypeNameByFieldCoordinates",new Map);A(this,"entityDataByTypeName");A(this,"entityInterfaceFederationDataByTypeName");A(this,"errors",[]);A(this,"fieldConfigurationByFieldPath",new Map);A(this,"inaccessiblePaths",new Set);A(this,"isMaxDepth",!1);A(this,"internalGraph");A(this,"internalSubgraphBySubgraphName");A(this,"invalidOrScopesHostPaths",new Set);A(this,"isVersionTwo",!1);A(this,"namedInputValueTypeNames",new Set);A(this,"namedOutputTypeNames",new Set);A(this,"parentDefinitionDataByTypeName",new Map);A(this,"parentTagDataByTypeName",new Map);A(this,"pathsByNamedTypeName",new Map);A(this,"persistedDirectiveDefinitionByDirectiveName",new Map([[Ae.AUTHENTICATED,fr.AUTHENTICATED_DEFINITION],[Ae.DEPRECATED,fr.DEPRECATED_DEFINITION],[Ae.INACCESSIBLE,fr.INACCESSIBLE_DEFINITION],[Ae.REQUIRES_SCOPES,fr.REQUIRES_SCOPES_DEFINITION],[Ae.TAG,fr.TAG_DEFINITION]]));A(this,"persistedDirectiveDefinitions",new Set([Ae.AUTHENTICATED,Ae.DEPRECATED,Ae.INACCESSIBLE,Ae.TAG,Ae.REQUIRES_SCOPES]));A(this,"potentialPersistedDirectiveDefinitionDataByDirectiveName",new Map);A(this,"routerDefinitions",[fr.DEPRECATED_DEFINITION,fr.TAG_DEFINITION]);A(this,"shareableErrorTypeNames",new Map);A(this,"subscriptionFilterDataByFieldPath",new Map);A(this,"tagNamesByPath",new Map);A(this,"warnings");this.authorizationDataByParentTypeName=t.authorizationDataByParentTypeName,this.concreteTypeNamesByAbstractTypeName=t.concreteTypeNamesByAbstractTypeName,this.entityDataByTypeName=t.entityDataByTypeName,this.entityInterfaceFederationDataByTypeName=t.entityInterfaceFederationDataByTypeName,this.internalSubgraphBySubgraphName=t.internalSubgraphBySubgraphName,this.internalGraph=t.internalGraph,this.warnings=t.warnings}getValidImplementedInterfaces(t){var o;let n=[];if(t.implementedInterfaceTypeNames.size<1)return n;let r=(0,Se.isNodeDataInaccessible)(t),i=new Map,s=new Map;for(let u of t.implementedInterfaceTypeNames){n.push((0,Xs.stringToNamedTypeNode)(u));let l=(0,ve.getOrThrowError)(this.parentDefinitionDataByTypeName,u,Ae.PARENT_DEFINITION_DATA);if(l.kind!==ke.Kind.INTERFACE_TYPE_DEFINITION){s.set(l.name,(0,ve.kindToTypeString)(l.kind));continue}let d={invalidFieldImplementations:new Map,unimplementedFields:[]},p=!1;for(let[y,N]of l.fieldDataByFieldName){let I=!1,b=t.fieldDataByFieldName.get(y);if(!b){p=!0,d.unimplementedFields.push(y);continue}let x={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,uI.printTypeNode)(N.node.type),unimplementedArguments:new Set};(0,Se.isTypeValidImplementation)(N.node.type,b.node.type,this.concreteTypeNamesByAbstractTypeName)||(p=!0,I=!0,x.implementedResponseType=(0,uI.printTypeNode)(b.node.type));let j=new Set;for(let[Q,re]of N.argumentDataByArgumentName){let se=re.node;j.add(Q);let pe=(o=b.argumentDataByArgumentName.get(Q))==null?void 0:o.node;if(!pe){p=!0,I=!0,x.unimplementedArguments.add(Q);continue}let ye=(0,uI.printTypeNode)(pe.type),Ce=(0,uI.printTypeNode)(se.type);Ce!==ye&&(p=!0,I=!0,x.invalidImplementedArguments.push({actualType:ye,argumentName:Q,expectedType:Ce}))}for(let[Q,re]of b.argumentDataByArgumentName){let se=re.node;j.has(Q)||se.type.kind===ke.Kind.NON_NULL_TYPE&&(p=!0,I=!0,x.invalidAdditionalArguments.add(Q))}!r&&b.isInaccessible&&!N.isInaccessible&&(p=!0,I=!0,x.isInaccessible=!0),I&&d.invalidFieldImplementations.set(y,x)}p&&i.set(u,d)}return s.size>0&&this.errors.push((0,xe.invalidImplementedTypeError)(t.name,s)),i.size&&this.errors.push((0,xe.invalidInterfaceImplementationError)(t.node.name.value,(0,ve.kindToTypeString)(t.kind),i)),n}addValidPrimaryKeyTargetsToEntityData(t){var p;let n=this.entityDataByTypeName.get(t);if(!n)return;let r=(0,ve.getOrThrowError)(this.internalSubgraphBySubgraphName,this.currentSubgraphName,"internalSubgraphBySubgraphName"),i=r.parentDefinitionDataByTypeName,s=i.get(n.typeName);if(!s||s.kind!==ke.Kind.OBJECT_TYPE_DEFINITION)throw(0,xe.incompatibleParentKindFatalError)(n.typeName,ke.Kind.OBJECT_TYPE_DEFINITION,(s==null?void 0:s.kind)||ke.Kind.NULL);let o=(0,ve.getOrThrowError)(r.configurationDataByTypeName,n.typeName,"internalSubgraph.configurationDataByParentTypeName"),u=[],l=this.internalGraph.nodeByNodeName.get(`${this.currentSubgraphName}.${n.typeName}`);(0,zp.validateImplicitFieldSets)({conditionalFieldDataByCoordinates:r.conditionalFieldDataByCoordinates,configurationData:o,fieldSets:n.keyFieldSets,graphNode:l,implicitKeys:u,objectData:s,parentDefinitionDataByTypeName:i});for(let[y,N]of this.entityInterfaceFederationDataByTypeName){if(!((p=N.concreteTypeNames)!=null&&p.has(n.typeName)))continue;let I=this.entityDataByTypeName.get(y);I&&(0,zp.validateImplicitFieldSets)({conditionalFieldDataByCoordinates:r.conditionalFieldDataByCoordinates,configurationData:o,fieldSets:I.keyFieldSets,implicitKeys:u,objectData:s,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(y=>y.selectionSet));for(let y of u)d.has(y.selectionSet)||(o.keys.push(y),d.add(y.selectionSet))}addValidPrimaryKeyTargetsFromInterfaceObject(t,n,r,i){let s=t.parentDefinitionDataByTypeName,o=s.get(n);if(!o||o.kind!==ke.Kind.INTERFACE_TYPE_DEFINITION)throw(0,xe.incompatibleParentKindFatalError)(n,ke.Kind.INTERFACE_TYPE_DEFINITION,(o==null?void 0:o.kind)||ke.Kind.NULL);let u=(0,ve.getOrThrowError)(t.configurationDataByTypeName,r.typeName,"internalSubgraph.configurationDataByParentTypeName"),l=[];if((0,zp.validateImplicitFieldSets)({conditionalFieldDataByCoordinates:t.conditionalFieldDataByCoordinates,configurationData:u,fieldSets:r.keyFieldSets,implicitKeys:l,objectData:o,parentDefinitionDataByTypeName:s,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)?Se.MergeMethod.CONSISTENT:Se.MergeMethod.INTERSECTION:Se.MergeMethod.UNION}generateTagData(){for(let[t,n]of this.tagNamesByPath){let r=t.split(".");if(r.length<1)continue;let i=(0,ve.getValueOrDefault)(this.parentTagDataByTypeName,r[0],()=>(0,zp.newParentTagData)(r[0]));switch(r.length){case 1:for(let l of n)i.tagNames.add(l);break;case 2:let s=(0,ve.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,zp.newChildTagData)(r[1]));for(let l of n)s.tagNames.add(l);break;case 3:let o=(0,ve.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,zp.newChildTagData)(r[1])),u=(0,ve.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),s=i||n,o=`${n.parentTypeName}.${n.name}`;(0,Se.extractPersistedDirectives)(s.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName);let u=(0,Se.isNodeDataInaccessible)(n);if((r||u)&&this.inaccessiblePaths.add(o),this.recordTagNamesByPath(s,o),!i){n.node={directives:[],kind:n.node.kind,name:(0,Xs.stringToNameNode)(n.name)},t.set(n.name,n);return}i.appearances+=1,(0,Se.setLongestDescription)(i,n)}upsertInputValueData(t,n,r){let i=t.get(n.name),s=i||n;if((0,Se.extractPersistedDirectives)(s.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByPath(s,r||s.renamedPath),!i){n.node={directives:[],kind:n.node.kind,name:(0,Xs.stringToNameNode)(n.name),type:n.type},t.set(n.name,n);return}(0,Se.setLongestDescription)(i,n),(0,ve.addIterableValuesToSet)(n.requiredSubgraphNames,i.requiredSubgraphNames),(0,ve.addIterableValuesToSet)(n.subgraphNames,i.subgraphNames);let{typeErrors:o,typeNode:u}=(0,Hp.getMostRestrictiveMergedTypeNode)(i.type,n.type,i.originalPath,this.errors);if(u)i.type=u;else{if(!o||o.length<2)throw(0,xe.fieldTypeMergeFatalError)(i.name);i.isArgument?this.errors.push((0,xe.incompatibleArgumentTypesError)(i.name,i.renamedPath,o[0],o[1])):this.errors.push((0,xe.incompatibleChildTypesError)(i.renamedPath,o[0],o[1]))}(0,Se.compareAndValidateInputValueDefaultValues)(i,n,this.errors)}handleArgumentInaccessibility(t,n,r,i){if(t){this.inaccessiblePaths.add(r);return}(0,Se.isNodeDataInaccessible)(n)&&((0,Se.isTypeRequired)(n.type)?this.errors.push((0,xe.inaccessibleRequiredArgumentError)(n.name,r,i)):this.inaccessiblePaths.add(r))}handleSubscriptionFilterDirective(t,n,r){let i=t.directivesByDirectiveName.get(Ae.SUBSCRIPTION_FILTER);if(i){let s=(0,ve.getSingleSetEntry)(t.subgraphNames);if(s===void 0){this.errors.push((0,xe.unknownFieldSubgraphNameError)(n));return}this.subscriptionFilterDataByFieldPath.set(n,{directive:i[0],fieldData:r||t,directiveSubgraphName:s})}}federateOutputType({current:t,other:n,hostPath:r,mostRestrictive:i}){n=(0,wc.getMutableTypeNode)(n,r,this.errors);let s={kind:t.kind},o=Hp.DivergentType.NONE,u=s;for(let l=0;lnew Set))}upsertFieldData(t,n,r){let i=`${n.renamedParentTypeName}.${n.name}`;(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,n.namedTypeName,()=>new Set).add(i),this.namedOutputTypeNames.add(n.namedTypeName);let s=t.get(n.name),o=s||n;this.handleSubscriptionFilterDirective(n,i,o),(0,Se.extractPersistedDirectives)(o.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName);let u=(0,Se.isNodeDataInaccessible)(n);if((r||u)&&this.inaccessiblePaths.add(i),this.recordTagNamesByPath(o,i),!s){t.set(n.name,n),n.node={arguments:[],directives:[],kind:n.node.kind,name:(0,Xs.stringToNameNode)(n.name),type:n.type};for(let[d,p]of n.argumentDataByArgumentName){p.node={directives:[],kind:p.node.kind,name:(0,Xs.stringToNameNode)(p.name),type:p.type};let y=(0,wc.getTypeNodeNamedTypeName)(p.type);(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,y,()=>new Set).add(p.renamedPath),this.namedInputValueTypeNames.add(y),(0,Se.extractPersistedDirectives)(p.persistedDirectivesData,p.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.handleArgumentInaccessibility(r||u,p,p.renamedPath,i),this.recordTagNamesByPath(p,`${i}.${d}`)}return}let l=this.federateOutputType({current:s.type,other:n.type,hostPath:i,mostRestrictive:!1});if(l.success)if(s.type=l.typeNode,s.namedTypeName!==n.namedTypeName){let d=(0,ve.getValueOrDefault)(this.subgraphNamesByNamedTypeNameByFieldCoordinates,`${s.renamedParentTypeName}.${s.name}`,()=>new Map),p=(0,ve.getValueOrDefault)(d,s.namedTypeName,()=>new Set);if(p.size<1)for(let y of s.subgraphNames)n.subgraphNames.has(y)||p.add(y);(0,ve.addIterableValuesToSet)(n.subgraphNames,(0,ve.getValueOrDefault)(d,n.namedTypeName,()=>new Set))}else this.addSubgraphNameToExistingFieldNamedTypeDisparity(n);for(let[d,p]of n.argumentDataByArgumentName){let y=(0,wc.getTypeNodeNamedTypeName)(p.type);(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,y,()=>new Set).add(p.renamedPath),this.namedInputValueTypeNames.add(y),this.handleArgumentInaccessibility(r||u,p,p.renamedPath,i),this.upsertInputValueData(s.argumentDataByArgumentName,p,`${i}.${d}`)}(0,Se.setLongestDescription)(s,n),s.isInaccessible||(s.isInaccessible=n.isInaccessible),(0,ve.addMapEntries)(n.isExternalBySubgraphName,s.isExternalBySubgraphName),(0,ve.addMapEntries)(n.isShareableBySubgraphName,s.isShareableBySubgraphName),(0,ve.addIterableValuesToSet)(n.subgraphNames,s.subgraphNames)}getClientSchemaUnionMembers(t){let n=[];for(let[r,i]of t.memberByMemberTypeName)this.inaccessiblePaths.has(r)||n.push(i);return n}recordTagNamesByPath(t,n){let r=n||t.name;if(t.persistedDirectivesData.tags.size>0){let i=(0,ve.getValueOrDefault)(this.tagNamesByPath,r,()=>new Set);for(let s of t.persistedDirectivesData.tags.keys())i.add(s)}}upsertParentDefinitionData(t,n){let r=this.entityInterfaceFederationDataByTypeName.get(t.name),i=this.parentDefinitionDataByTypeName.get(t.name),s=i||t;(0,Se.extractPersistedDirectives)(s.persistedDirectivesData,t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByPath(s);let o=(0,Se.isNodeDataInaccessible)(s);if(o&&this.inaccessiblePaths.add(t.name),r&&r.interfaceObjectSubgraphs.has(n)&&(t.kind=ke.Kind.INTERFACE_TYPE_DEFINITION),!i)switch(t.node={kind:t.kind,name:(0,Xs.stringToNameNode)(t.name)},this.parentDefinitionDataByTypeName.set(t.name,t),t.kind){case ke.Kind.ENUM_TYPE_DEFINITION:for(let[u,l]of t.enumValueDataByValueName){let d=`${t.name}.${u}`;l.node={directives:[],kind:l.node.kind,name:(0,Xs.stringToNameNode)(l.name)},(0,Se.extractPersistedDirectives)(l.persistedDirectivesData,l.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByPath(l,d),(0,Se.isNodeDataInaccessible)(l)&&this.inaccessiblePaths.add(d)}return;case ke.Kind.INPUT_OBJECT_TYPE_DEFINITION:for(let[u,l]of t.inputValueDataByValueName){l.node={directives:[],kind:l.node.kind,name:(0,Xs.stringToNameNode)(l.name),type:l.type};let d=(0,wc.getTypeNodeNamedTypeName)(l.type);(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,d,()=>new Set).add(l.renamedPath),this.namedInputValueTypeNames.add(d),(0,Se.extractPersistedDirectives)(l.persistedDirectivesData,l.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByPath(l,`${t.name}.${u}`),(o||(0,Se.isNodeDataInaccessible)(l))&&this.inaccessiblePaths.add(l.renamedPath)}return;case ke.Kind.INTERFACE_TYPE_DEFINITION:case ke.Kind.OBJECT_TYPE_DEFINITION:(0,Se.isParentDataRootType)(t)&&(t.extensionType=Rq.ExtensionType.NONE);for(let u of t.fieldDataByFieldName.values()){u.node={arguments:[],directives:[],kind:u.node.kind,name:(0,Xs.stringToNameNode)(u.name),type:u.type};let l=`${u.renamedParentTypeName}.${u.name}`;this.handleSubscriptionFilterDirective(u,l),(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,u.namedTypeName,()=>new Set).add(l),this.namedOutputTypeNames.add(u.namedTypeName),(0,Se.extractPersistedDirectives)(u.persistedDirectivesData,u.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByPath(u,l);let d=(0,Se.isNodeDataInaccessible)(u);(o||d)&&this.inaccessiblePaths.add(l);for(let[p,y]of u.argumentDataByArgumentName){y.node={directives:[],kind:y.node.kind,name:(0,Xs.stringToNameNode)(y.name),type:y.type};let N=(0,wc.getTypeNodeNamedTypeName)(y.type);(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,N,()=>new Set).add(y.renamedPath),this.namedInputValueTypeNames.add(N),(0,Se.extractPersistedDirectives)(y.persistedDirectivesData,y.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByPath(y,`${l}.${p}`),this.handleArgumentInaccessibility(o||d,y,y.renamedPath,l)}}return;default:return}if(i.kind!==t.kind&&(!r||!r.interfaceObjectSubgraphs.has(n)||i.kind!==ke.Kind.INTERFACE_TYPE_DEFINITION||t.kind!==ke.Kind.OBJECT_TYPE_DEFINITION)){this.errors.push((0,xe.incompatibleParentKindMergeError)(i.name,(0,ve.kindToTypeString)(i.kind),(0,ve.kindToTypeString)(t.kind)));return}switch((0,Se.setLongestDescription)(i,t),(0,Se.setParentDataExtensionType)(i,t),i.kind){case ke.Kind.ENUM_TYPE_DEFINITION:i.appearances+=1;for(let l of t.enumValueDataByValueName.values())this.upsertEnumValueData(i.enumValueDataByValueName,l,o);return;case ke.Kind.INPUT_OBJECT_TYPE_DEFINITION:o&&!i.isInaccessible&&this.propagateInaccessibilityToExistingChildren(i),(0,ve.addIterableValuesToSet)(t.subgraphNames,i.subgraphNames);for(let[l,d]of t.inputValueDataByValueName){let p=`${t.name}.${l}`,y=(0,wc.getTypeNodeNamedTypeName)(d.type);(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,y,()=>new Set).add(p),this.namedInputValueTypeNames.add(y),this.upsertInputValueData(i.inputValueDataByValueName,d),this.recordTagNamesByPath(d,p),(o||(0,Se.isNodeDataInaccessible)(d))&&this.inaccessiblePaths.add(p)}return;case ke.Kind.INTERFACE_TYPE_DEFINITION:case ke.Kind.OBJECT_TYPE_DEFINITION:o&&!i.isInaccessible&&this.propagateInaccessibilityToExistingChildren(i);let u=t;(0,ve.addIterableValuesToSet)(u.implementedInterfaceTypeNames,i.implementedInterfaceTypeNames),(0,ve.addIterableValuesToSet)(u.subgraphNames,i.subgraphNames);for(let l of u.fieldDataByFieldName.values())this.upsertFieldData(i.fieldDataByFieldName,l,o||i.isInaccessible);return;case ke.Kind.UNION_TYPE_DEFINITION:(0,ve.addMapEntries)(t.memberByMemberTypeName,i.memberByMemberTypeName);return;default:return}}propagateInaccessibilityToExistingChildren(t){switch(t.isInaccessible=!0,t.kind){case ke.Kind.INPUT_OBJECT_TYPE_DEFINITION:for(let n of t.inputValueDataByValueName.keys())this.inaccessiblePaths.add(`${t.name}.${n}`);break;default:for(let[n,r]of t.fieldDataByFieldName){let i=`${r.renamedParentTypeName}.${n}`;this.inaccessiblePaths.add(i);for(let s of r.argumentDataByArgumentName.values())this.inaccessiblePaths.add(s.renamedPath)}}}upsertPersistedDirectiveDefinitionData(t,n){let r=t.name,i=this.potentialPersistedDirectiveDefinitionDataByDirectiveName.get(r);if(!i){if(n>1)return;let s=new Map;for(let o of t.argumentDataByArgumentName.values())this.namedInputValueTypeNames.add((0,wc.getTypeNodeNamedTypeName)(o.type)),this.upsertInputValueData(s,o);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.set(r,{argumentDataByArgumentName:s,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,Se.setMutualExecutableLocations)(i,t.executableLocations),i.executableLocations.size<1){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}for(let s of t.argumentDataByArgumentName.values())this.namedInputValueTypeNames.add((0,wc.getTypeNodeNamedTypeName)(s.type)),this.upsertInputValueData(i.argumentDataByArgumentName,s);(0,Se.setLongestDescription)(i,t),i.repeatable&&(i.repeatable=t.repeatable),(0,ve.addIterableValuesToSet)(t.subgraphNames,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,xe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}break}case ke.Kind.UNION_TYPE_DEFINITION:{if(l){this.errors.push((0,xe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}l=p;break}default:{this.errors.push((0,xe.incompatibleFederatedFieldNamedTypeError)(t,n));break}}}if(o.size<0&&!l){this.errors.push((0,xe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}let d=l;if(o.size>0){if(l){this.errors.push((0,xe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}for(let p of o.keys()){d=p;for(let[y,N]of o)if(p!==y&&!N.implementedInterfaceTypeNames.has(p)){d="";break}if(d)break}}if(!this.shouldUpdateFederatedFieldAbstractNamedType(d,u)){this.errors.push((0,xe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}s.namedTypeName=d,this.updateTypeNodeNamedType(s.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,hde.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:s,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),s.has(p)&&l.addTargetSubgraphByFieldSet(p,o);let d=r.fieldDatasBySubgraphName.get(o);for(let{name:p,namedTypeName:y}of d||[])this.internalGraph.addEdge(u,this.internalGraph.addOrUpdateNode(y),p);this.internalGraph.addEdge(i,u,t.typeName,!0),this.addValidPrimaryKeyTargetsFromInterfaceObject(n,i.typeName,t,u)}handleEntityInterfaces(){for(let[t,n]of this.entityInterfaceFederationDataByTypeName){(0,ve.subtractSourceSetFromTargetSet)(n.interfaceFieldNames,n.interfaceObjectFieldNames);let r=(0,ve.getOrThrowError)(this.parentDefinitionDataByTypeName,t,Ae.PARENT_DEFINITION_DATA);if(r.kind===ke.Kind.INTERFACE_TYPE_DEFINITION)for(let i of n.interfaceObjectSubgraphs){let s=(0,ve.getOrThrowError)(this.internalSubgraphBySubgraphName,i,"internalSubgraphBySubgraphName"),o=s.configurationDataByTypeName,u=this.concreteTypeNamesByAbstractTypeName.get(t);if(!u)continue;let l=(0,ve.getOrThrowError)(o,t,"configurationDataMap"),d=l.keys;if(!d)continue;l.entityInterfaceConcreteTypeNames=n.concreteTypeNames;let p=l.fieldNames,y=this.authorizationDataByParentTypeName.get(n.typeName);this.internalGraph.setSubgraphName(i);let N=this.internalGraph.addOrUpdateNode(t,{isAbstract:!0});for(let I of u){if(o.has(I))continue;if(y){let re=(0,ve.getValueOrDefault)(this.authorizationDataByParentTypeName,I,()=>(0,ve.newAuthorizationData)(I));for(let se of y.fieldAuthorizationDataByFieldName.values())(0,ve.upsertFieldAuthorizationData)(re.fieldAuthorizationDataByFieldName,se)||this.invalidOrScopesHostPaths.add(`${I}.${se.fieldName}`)}let b=(0,ve.getOrThrowError)(this.parentDefinitionDataByTypeName,I,Ae.PARENT_DEFINITION_DATA);if(b.kind!==ke.Kind.OBJECT_TYPE_DEFINITION)continue;let x=(0,ve.getOrThrowError)(this.entityDataByTypeName,I,"entityDataByTypeName");x.subgraphNames.add(i);let j={fieldNames:p,isRootNode:!0,keys:d,typeName:I},Q=new Set;for(let re of d.filter(se=>!se.disableEntityResolver))Q.add(re.selectionSet);for(let re of n.interfaceObjectFieldNames){if(b.fieldDataByFieldName.get(re))continue;let pe=(0,ve.getOrThrowError)(r.fieldDataByFieldName,re,`${t}.fieldDataByFieldName`);b.fieldDataByFieldName.set(re,k({},pe))}o.set(I,j),this.handleInterfaceObjectForInternalGraph({internalSubgraph:s,subgraphName:i,interfaceObjectData:n,interfaceObjectNode:N,resolvableKeyFieldSets:Q,entityData:x})}}}}fieldDataToGraphFieldData(t){var n;return{name:t.name,namedTypeName:t.namedTypeName,isLeaf:(0,ve.isNodeLeaf)((n=this.parentDefinitionDataByTypeName.get(t.namedTypeName))==null?void 0:n.kind),subgraphNames:t.subgraphNames}}pushParentDefinitionDataToDocumentDefinitions(t){for(let[n,r]of this.parentDefinitionDataByTypeName)switch(r.extensionType!==Rq.ExtensionType.NONE&&this.errors.push((0,xe.noBaseDefinitionForExtensionError)((0,ve.kindToTypeString)(r.kind),n)),r.kind){case ke.Kind.ENUM_TYPE_DEFINITION:let i=[],s=[],o=this.getEnumValueMergeMethod(n);for(let Q of r.enumValueDataByValueName.values()){let re=(0,Se.getNodeForRouterSchemaByData)(Q,this.persistedDirectiveDefinitionByDirectiveName,this.errors),se=(0,Se.isNodeDataInaccessible)(Q),pe=K(k({},Q.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(Q)});switch(o){case Se.MergeMethod.CONSISTENT:!se&&r.appearances>Q.appearances&&this.errors.push((0,xe.incompatibleSharedEnumError)(n)),i.push(re),se||s.push(pe);break;case Se.MergeMethod.INTERSECTION:r.appearances===Q.appearances&&(i.push(re),se||s.push(pe));break;default:i.push(re),se||s.push(pe);break}}if(r.node.values=i,this.routerDefinitions.push((0,Se.getNodeForRouterSchemaByData)(r,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Se.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(s.length<1){this.errors.push((0,xe.allChildDefinitionsAreInaccessibleError)((0,ve.kindToTypeString)(r.kind),n,Ae.ENUM_VALUE));break}this.clientDefinitions.push(K(k({},r.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(r),values:s}));break;case ke.Kind.INPUT_OBJECT_TYPE_DEFINITION:let u=[],l=[],d=[];for(let[Q,re]of r.inputValueDataByValueName)if(r.subgraphNames.size===re.subgraphNames.size){if(l.push((0,Se.getNodeWithPersistedDirectivesByInputValueData)(re,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Se.isNodeDataInaccessible)(re))continue;d.push(K(k({},re.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(re)}))}else(0,Se.isTypeRequired)(re.type)&&u.push({inputValueName:Q,missingSubgraphs:(0,ve.getEntriesNotInHashSet)(r.subgraphNames,re.subgraphNames),requiredSubgraphs:[...re.requiredSubgraphNames]});if(u.length>0){this.errors.push((0,xe.invalidRequiredInputValueError)(Ae.INPUT_OBJECT,n,u,!1));break}if(r.node.fields=l,this.routerDefinitions.push((0,Se.getNodeForRouterSchemaByData)(r,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Se.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r);break}if(d.length<1){this.errors.push((0,xe.allChildDefinitionsAreInaccessibleError)((0,ve.kindToTypeString)(r.kind),n,"input field"));break}this.clientDefinitions.push(K(k({},r.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(r),fields:d}));break;case ke.Kind.INTERFACE_TYPE_DEFINITION:case ke.Kind.OBJECT_TYPE_DEFINITION:let p=[],y=[],N=new Map,I=(0,Se.newInvalidFieldNames)(),b=r.kind===ke.Kind.OBJECT_TYPE_DEFINITION;for(let[Q,re]of r.fieldDataByFieldName){(0,Se.pushAuthorizationDirectives)(re,this.authorizationDataByParentTypeName.get(n));let se=(0,Se.getValidFieldArgumentNodes)(re,this.persistedDirectiveDefinitionByDirectiveName,this.fieldConfigurationByFieldPath,this.errors);b&&(0,Se.validateExternalAndShareable)(re,I),p.push((0,Se.getNodeWithPersistedDirectivesByFieldData)(re,this.persistedDirectiveDefinitionByDirectiveName,se,this.errors)),!(0,Se.isNodeDataInaccessible)(re)&&(y.push((0,Se.getClientSchemaFieldNodeByFieldData)(re)),N.set(Q,this.fieldDataToGraphFieldData(re)))}if(b&&(I.byShareable.size>0&&this.errors.push((0,xe.invalidFieldShareabilityError)(r,I.byShareable)),I.subgraphNamesByExternalFieldName.size>0&&this.errors.push((0,xe.allExternalFieldInstancesError)(n,I.subgraphNamesByExternalFieldName))),r.node.fields=p,this.internalGraph.initializeNode(n,N),r.implementedInterfaceTypeNames.size>0){t.push({data:r,clientSchemaFieldNodes:y});break}this.routerDefinitions.push((0,Se.getNodeForRouterSchemaByData)(r,this.persistedDirectiveDefinitionByDirectiveName,this.errors));let x=(0,mde.isNodeQuery)(n);if((0,Se.isNodeDataInaccessible)(r)){if(x){this.errors.push(xe.inaccessibleQueryRootTypeError);break}this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(y.length<1){let Q=x?xe.noQueryRootTypeError:(0,xe.allChildDefinitionsAreInaccessibleError)((0,ve.kindToTypeString)(r.kind),n,Ae.FIELD);this.errors.push(Q);break}this.clientDefinitions.push(K(k({},r.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(r),fields:y}));break;case ke.Kind.SCALAR_TYPE_DEFINITION:if(fr.BASE_SCALARS.has(n))break;if(this.routerDefinitions.push((0,Se.getNodeForRouterSchemaByData)(r,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Se.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}this.clientDefinitions.push(K(k({},r.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(r)}));break;case ke.Kind.UNION_TYPE_DEFINITION:if(r.node.types=(0,ve.mapToArrayOfValues)(r.memberByMemberTypeName),this.routerDefinitions.push((0,Se.getNodeForRouterSchemaByData)(r,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Se.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}let j=this.getClientSchemaUnionMembers(r);if(j.length<1){this.errors.push((0,xe.allChildDefinitionsAreInaccessibleError)(Ae.UNION,n,"union member type"));break}this.clientDefinitions.push(K(k({},r.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(r),types:j}));break}}federateSubgraphData(){this.federateInternalSubgraphData(),this.handleEntityInterfaces(),this.generateTagData(),this.pushVersionTwoDirectiveDefinitionsToDocumentDefinitions()}validateInterfaceImplementationsAndPushToDocumentDefinitions(t){for(let{data:n,clientSchemaFieldNodes:r}of t){if(n.node.interfaces=this.getValidImplementedInterfaces(n),this.routerDefinitions.push((0,Se.getNodeForRouterSchemaByData)(n,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Se.isNodeDataInaccessible)(n)){this.validateReferencesOfInaccessibleType(n),this.internalGraph.setNodeInaccessible(n.name);continue}let i=[];for(let s of n.implementedInterfaceTypeNames)this.inaccessiblePaths.has(s)||i.push((0,Xs.stringToNamedTypeNode)(s));this.clientDefinitions.push(K(k({},n.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(n),fields:r,interfaces:i}))}}pushVersionTwoDirectiveDefinitionsToDocumentDefinitions(){this.isVersionTwo&&(this.routerDefinitions=[fr.AUTHENTICATED_DEFINITION,fr.DEPRECATED_DEFINITION,fr.INACCESSIBLE_DEFINITION,fr.REQUIRES_SCOPES_DEFINITION,fr.TAG_DEFINITION,fr.SCOPE_SCALAR_DEFINITION],this.clientDefinitions=[fr.AUTHENTICATED_DEFINITION,fr.DEPRECATED_DEFINITION,fr.REQUIRES_SCOPES_DEFINITION,fr.SCOPE_SCALAR_DEFINITION])}validatePathSegmentInaccessibility(t){if(!t)return!1;let r=t.split(Ae.LEFT_PARENTHESIS)[0].split(Ae.PERIOD),i=r[0];for(let s=0;s0&&this.errors.push((0,xe.invalidReferencesOfInaccessibleTypeError)((0,ve.kindToTypeString)(t.kind),t.name,r))}validateQueryRootType(){let t=this.parentDefinitionDataByTypeName.get(Ae.QUERY);if(!t||t.kind!==ke.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByFieldName.size<1){this.errors.push(xe.noQueryRootTypeError);return}for(let n of t.fieldDataByFieldName.values())if(!(0,Se.isNodeDataInaccessible)(n))return;this.errors.push(xe.noQueryRootTypeError)}validateSubscriptionFieldConditionFieldPath(t,n,r,i,s){let o=t.split(Ae.PERIOD);if(o.length<1)return s.push((0,xe.invalidSubscriptionFieldConditionFieldPathErrorMessage)(r,t)),[];let u=n;if(this.inaccessiblePaths.has(u.renamedTypeName))return s.push((0,xe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,o[0],u.renamedTypeName)),[];let l="";for(let d=0;d0?`.${p}`:p,u.kind!==ke.Kind.OBJECT_TYPE_DEFINITION)return s.push((0,xe.invalidSubscriptionFieldConditionFieldPathParentErrorMessage)(r,t,l)),[];let y=u.fieldDataByFieldName.get(p);if(!y)return s.push((0,xe.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,p,u.renamedTypeName)),[];let N=`${u.renamedTypeName}.${p}`;if(!y.subgraphNames.has(i))return s.push((0,xe.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,N,i)),[];if(this.inaccessiblePaths.has(N))return s.push((0,xe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,N)),[];if(fr.BASE_SCALARS.has(y.namedTypeName)){u={kind:ke.Kind.SCALAR_TYPE_DEFINITION,name:y.namedTypeName};continue}u=(0,ve.getOrThrowError)(this.parentDefinitionDataByTypeName,y.namedTypeName,Ae.PARENT_DEFINITION_DATA)}return(0,Se.isLeafKind)(u.kind)?o:(s.push((0,xe.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage)(r,t,o[o.length-1],(0,ve.kindToTypeString)(u.kind),u.name)),[])}validateSubscriptionFieldCondition(t,n,r,i,s,o,u){if(i>cI.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return u.push((0,xe.subscriptionFilterConditionDepthExceededErrorMessage)(s)),this.isMaxDepth=!0,!1;let l=!1,d=new Set([Ae.FIELD_PATH,Ae.VALUES]),p=new Set,y=new Set,N=[];for(let I of t.fields){let b=I.name.value,x=s+`.${b}`;switch(b){case Ae.FIELD_PATH:{if(d.has(Ae.FIELD_PATH))d.delete(Ae.FIELD_PATH);else{l=!0,p.add(Ae.FIELD_PATH);break}if(I.value.kind!==ke.Kind.STRING){N.push((0,xe.invalidInputFieldTypeErrorMessage)(x,Ae.STRING,(0,ve.kindToTypeString)(I.value.kind))),l=!0;break}let j=this.validateSubscriptionFieldConditionFieldPath(I.value.value,r,x,o,N);if(j.length<1){l=!0;break}n.fieldPath=j;break}case Ae.VALUES:{if(d.has(Ae.VALUES))d.delete(Ae.VALUES);else{l=!0,p.add(Ae.VALUES);break}let j=I.value.kind;if(j==ke.Kind.NULL||j==ke.Kind.OBJECT){N.push((0,xe.invalidInputFieldTypeErrorMessage)(x,Ae.LIST,(0,ve.kindToTypeString)(I.value.kind))),l=!0;break}if(j!==ke.Kind.LIST){n.values=[(0,Se.getSubscriptionFilterValue)(I.value)];break}let Q=new Set,re=[];for(let se=0;se0){N.push((0,xe.subscriptionFieldConditionInvalidValuesArrayErrorMessage)(x,re));continue}if(Q.size<1){l=!0,N.push((0,xe.subscriptionFieldConditionEmptyValuesArrayErrorMessage)(x));continue}n.values=[...Q];break}default:l=!0,y.add(b)}}return l?(u.push((0,xe.subscriptionFieldConditionInvalidInputFieldErrorMessage)(s,[...d],[...p],[...y],N)),!1):!0}validateSubscriptionFilterCondition(t,n,r,i,s,o,u){if(i>cI.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return u.push((0,xe.subscriptionFilterConditionDepthExceededErrorMessage)(s)),this.isMaxDepth=!0,!1;if(i+=1,t.fields.length!==1)return u.push((0,xe.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage)(s,t.fields.length)),!1;let l=t.fields[0],d=l.name.value;if(!Ae.SUBSCRIPTION_FILTER_INPUT_NAMES.has(d))return u.push((0,xe.subscriptionFilterConditionInvalidInputFieldErrorMessage)(s,d)),!1;let p=s+`.${d}`;switch(l.value.kind){case ke.Kind.OBJECT:switch(d){case Ae.IN_UPPER:return n.in={fieldPath:[],values:[]},this.validateSubscriptionFieldCondition(l.value,n.in,r,i,s+".IN",o,u);case Ae.NOT_UPPER:return n.not={},this.validateSubscriptionFilterCondition(l.value,n.not,r,i,s+".NOT",o,u);default:return u.push((0,xe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,Ae.LIST,Ae.OBJECT)),!1}case ke.Kind.LIST:{let y=[];switch(d){case Ae.AND_UPPER:{n.and=y;break}case Ae.OR_UPPER:{n.or=y;break}default:return u.push((0,xe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,Ae.OBJECT,Ae.LIST)),!1}let N=l.value.values.length;if(N<1||N>5)return u.push((0,xe.subscriptionFilterArrayConditionInvalidLengthErrorMessage)(p,N)),!1;let I=!0,b=[];for(let x=0;x0?(u.push((0,xe.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage)(p,b)),!1):I}default:{let y=Ae.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES.has(d)?Ae.LIST:Ae.OBJECT;return u.push((0,xe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,y,(0,ve.kindToTypeString)(l.value.kind))),!1}}}validateSubscriptionFilterAndGenerateConfiguration(t,n,r,i,s,o){if(!t.arguments||t.arguments.length!==1)return;let u=t.arguments[0];if(u.value.kind!==ke.Kind.OBJECT){this.errors.push((0,xe.invalidSubscriptionFilterDirectiveError)(r,[(0,xe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(Ae.CONDITION,Ae.OBJECT,(0,ve.kindToTypeString)(u.value.kind))]));return}let l={},d=[];if(!this.validateSubscriptionFilterCondition(u.value,l,n,0,Ae.CONDITION,o,d)){this.errors.push((0,xe.invalidSubscriptionFilterDirectiveError)(r,d)),this.isMaxDepth=!1;return}(0,ve.getValueOrDefault)(this.fieldConfigurationByFieldPath,r,()=>({argumentNames:[],fieldName:i,typeName:s})).subscriptionFilterCondition=l}validateSubscriptionFiltersAndGenerateConfiguration(){for(let[t,n]of this.subscriptionFilterDataByFieldPath){if(this.inaccessiblePaths.has(t))continue;let r=this.parentDefinitionDataByTypeName.get(n.fieldData.namedTypeName);if(!r){this.errors.push((0,xe.invalidSubscriptionFilterDirectiveError)(t,[(0,xe.subscriptionFilterNamedTypeErrorMessage)(n.fieldData.namedTypeName)]));continue}(0,Se.isNodeDataInaccessible)(r)||r.kind===ke.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.invalidOrScopesHostPaths.size>0&&this.errors.push((0,xe.orScopesLimitError)(ve.maxOrScopes,[...this.invalidOrScopesHostPaths]));for(let s of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,Se.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,s,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let t=[];if(this.pushParentDefinitionDataToDocumentDefinitions(t),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(t),this.validateQueryRootType(),this.errors.length>0)return{errors:this.errors,warnings:this.warnings};if(this.internalSubgraphBySubgraphName.size>1){let s=this.internalGraph.validate();if(s.length>0)return{errors:s,warnings:this.warnings}}if(this.errors.length>0)return{errors:this.errors,warnings:this.warnings};let n={kind:ke.Kind.DOCUMENT,definitions:this.routerDefinitions},r=(0,ke.buildASTSchema)({kind:ke.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),i=new Map;for(let s of this.internalSubgraphBySubgraphName.values())i.set(s.name,{configurationDataByTypeName:s.configurationDataByTypeName,schema:s.schema});for(let s of this.authorizationDataByParentTypeName.values())(0,ve.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldPath,s);return{federationResult:k({fieldConfigurations:Array.from(this.fieldConfigurationByFieldPath.values()),subgraphConfigBySubgraphName:i,federatedGraphAST:n,federatedGraphSchema:(0,ke.buildASTSchema)(n,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:r},this.getClientSchemaObjectBoolean()),warnings:this.warnings}}getClientSchemaObjectBoolean(){return this.inaccessiblePaths.size<1&&this.tagNamesByPath.size<1?{}:{shouldIncludeClientSchema:!0}}handleChildTagExclusions(t,n,r,i){let s=n.size;for(let[o,u]of r){let l=(0,ve.getOrThrowError)(n,o,`${t.name}.childDataByChildName`);if((0,Se.isNodeDataInaccessible)(l)){s-=1;continue}(0,ve.doSetsIntersect)(i,u.tagNames)&&((0,ve.getValueOrDefault)(l.persistedDirectivesData.directives,Ae.INACCESSIBLE,()=>[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(`${t.name}.${o}`),s-=1)}s<1&&(t.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(t.name))}handleChildTagInclusions(t,n,r,i){let s=n.size;for(let[o,u]of n){if((0,Se.isNodeDataInaccessible)(u)){s-=1;continue}let l=r.get(o);(!l||!(0,ve.doSetsIntersect)(i,l.tagNames))&&((0,ve.getValueOrDefault)(u.persistedDirectivesData.directives,Ae.INACCESSIBLE,()=>[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(`${t.name}.${o}`),s-=1)}s<1&&(t.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(t.name))}buildFederationContractResult(t,n){if(this.isVersionTwo||this.routerDefinitions.push(fr.INACCESSIBLE_DEFINITION),n)for(let[u,l]of this.parentTagDataByTypeName){let d=(0,ve.getOrThrowError)(this.parentDefinitionDataByTypeName,u,Ae.PARENT_DEFINITION_DATA);if(!(0,Se.isNodeDataInaccessible)(d)){if((0,ve.doSetsIntersect)(t,l.tagNames)){d.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(u);continue}if(!(l.childTagDataByChildName.size<1))switch(d.kind){case ke.Kind.SCALAR_TYPE_DEFINITION:case ke.Kind.UNION_TYPE_DEFINITION:continue;case ke.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagExclusions(d,d.enumValueDataByValueName,l.childTagDataByChildName,t);break;case ke.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagExclusions(d,d.inputValueDataByValueName,l.childTagDataByChildName,t);break;default:let p=d.fieldDataByFieldName.size;for(let[y,N]of l.childTagDataByChildName){let I=(0,ve.getOrThrowError)(d.fieldDataByFieldName,y,`${u}.fieldDataByFieldName`);if((0,Se.isNodeDataInaccessible)(I)){p-=1;continue}if((0,ve.doSetsIntersect)(t,N.tagNames)){(0,ve.getValueOrDefault)(I.persistedDirectivesData.directives,Ae.INACCESSIBLE,()=>[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(`${u}.${y}`),p-=1;continue}for(let[b,x]of N.tagNamesByArgumentName){let j=(0,ve.getOrThrowError)(I.argumentDataByArgumentName,b,`${y}.argumentDataByArgumentName`);(0,Se.isNodeDataInaccessible)(j)||(0,ve.doSetsIntersect)(x,x)&&((0,ve.getValueOrDefault)(j.persistedDirectivesData.directives,Ae.INACCESSIBLE,()=>[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(j.renamedPath))}}p<1&&(d.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(u))}}}else for(let[u,l]of this.parentDefinitionDataByTypeName){if((0,Se.isNodeDataInaccessible)(l))continue;let d=this.parentTagDataByTypeName.get(u);if(!d){l.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(u);continue}if(!(0,ve.doSetsIntersect)(t,d.tagNames)){if(d.childTagDataByChildName.size<1){l.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(u);continue}switch(l.kind){case ke.Kind.SCALAR_TYPE_DEFINITION:case ke.Kind.UNION_TYPE_DEFINITION:continue;case ke.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagInclusions(l,l.enumValueDataByValueName,d.childTagDataByChildName,t);break;case ke.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagInclusions(l,l.inputValueDataByValueName,d.childTagDataByChildName,t);break;default:let p=l.fieldDataByFieldName.size;for(let[y,N]of l.fieldDataByFieldName){if((0,Se.isNodeDataInaccessible)(N)){p-=1;continue}let I=d.childTagDataByChildName.get(y);if(!I||!(0,ve.doSetsIntersect)(t,I.tagNames)){(0,ve.getValueOrDefault)(N.persistedDirectivesData.directives,Ae.INACCESSIBLE,()=>[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(`${u}.${y}`),p-=1;continue}for(let[b,x]of N.argumentDataByArgumentName){if((0,Se.isNodeDataInaccessible)(x))continue;let j=I.tagNamesByArgumentName.get(b);(!j||!(0,ve.doSetsIntersect)(j,j))&&((0,ve.getValueOrDefault)(x.persistedDirectivesData.directives,Ae.INACCESSIBLE,()=>[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(x.renamedPath))}}p<1&&(l.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(u))}}}this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration();for(let u of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,Se.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,u,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let r=[];if(this.pushParentDefinitionDataToDocumentDefinitions(r),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(r),this.validateQueryRootType(),this.errors.length>0)return{errors:this.errors,warnings:this.warnings};let i={kind:ke.Kind.DOCUMENT,definitions:this.routerDefinitions},s=(0,ke.buildASTSchema)({kind:ke.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),o=new Map;for(let u of this.internalSubgraphBySubgraphName.values())o.set(u.name,{configurationDataByTypeName:u.configurationDataByTypeName,schema:u.schema});for(let u of this.authorizationDataByParentTypeName.values())(0,ve.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldPath,u);return{federationResult:k({fieldConfigurations:Array.from(this.fieldConfigurationByFieldPath.values()),subgraphConfigBySubgraphName:o,federatedGraphAST:i,federatedGraphSchema:(0,ke.buildASTSchema)(i,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:s},this.getClientSchemaObjectBoolean()),warnings:this.warnings}}federateSubgraphsInternal(){return this.federateSubgraphData(),this.buildFederationResult()}};Xl.FederationFactory=lI;function YR(e){if(e.length<1)return{errors:[xe.minimumSubgraphRequirementError],warnings:[]};let{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,errors:i,internalSubgraphBySubgraphName:s,internalGraph:o,warnings:u}=(0,fde.batchNormalize)(e);if(i)return{errors:i,warnings:u};let l=new Map,d=new Map,p=new Set;for(let[y,N]of s)for(let[I,b]of N.entityInterfaces){(0,ve.getValueOrDefault)(d,I,()=>[]).push({subgraphName:y,concreteTypeNames:b.concreteTypeNames||new Set});let x=l.get(I);if(!x){p.add(I),l.set(I,(0,ve.newEntityInterfaceFederationData)(b,y));continue}(0,ve.upsertEntityInterfaceFederationData)(x,b,y)&&p.delete(I)}for(let y of p)d.delete(y);return d.size>0?{errors:[(0,xe.undefinedEntityInterfaceImplementationsError)(d,l)],warnings:u}:{federationFactory:new lI({authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,entityInterfaceFederationDataByTypeName:l,internalSubgraphBySubgraphName:s,internalGraph:o,warnings:u}),warnings:u}}function Tde(e){let{errors:t,federationFactory:n,warnings:r}=YR(e);return t||!n?{errors:t||[xe.federationFactoryInitializationFatalError],warnings:r}:n.federateSubgraphsInternal()}function yde(e,t,n){let{errors:r,federationFactory:i,warnings:s}=YR(e);if(r||!i)return{errors:r||[xe.federationFactoryInitializationFatalError],warnings:s};i.federateSubgraphData();let o=[(0,Fq.cloneDeep)(i)],{errors:u,federationResult:l,warnings:d}=i.buildFederationResult();if(u)return{errors:u,warnings:d};let p=t.size-1,y=new Map,N=0;for(let[I,b]of t){N!==p&&o.push((0,Fq.cloneDeep)(o[N]));let x=o[N].buildFederationContractResult(b,n);y.set(I,x),N++}return{federationResult:l,federationResultContainerByContractName:y,warnings:d}}function Nde(e,t,n){let{errors:r,federationFactory:i,warnings:s}=YR(e);return r||!i?{errors:r||[xe.federationFactoryInitializationFatalError],warnings:s}:(i.federateSubgraphData(),i.buildFederationContractResult(t,n))}});var Pq=V(Lq=>{"use strict";m();T();h();Object.defineProperty(Lq,"__esModule",{value:!0})});var dI=V(vn=>{"use strict";m();T();h();var Ede=vn&&vn.__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]}),Xn=vn&&vn.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Ede(t,e,n)};Object.defineProperty(vn,"__esModule",{value:!0});Xn(Vi(),vn);Xn(eD(),vn);Xn(To(),vn);Xn(zM(),vn);Xn(wq(),vn);Xn(DR(),vn);Xn(QR(),vn);Xn(qR(),vn);Xn($l(),vn);Xn(FR(),vn);Xn(nA(),vn);Xn(VR(),vn);Xn(xR(),vn);Xn(UR(),vn);Xn($a(),vn);Xn($h(),vn);Xn(Pq(),vn);Xn(aI(),vn);Xn(Kp(),vn);Xn(RR(),vn);Xn(ps(),vn);Xn(_c(),vn);Xn(bi(),vn);Xn(rI(),vn)});var ppe={};If(ppe,{buildRouterConfiguration:()=>dpe,federateSubgraphs:()=>lpe});m();T();h();var DF=Xv(dI());m();T();h();m();T();h();function JR(e){if(!e)return e;let t=new URL(e),n=t.pathname;n.endsWith("/")&&(n=n.slice(0,-1));let r=t.port?`:${t.port}`:"";return`${t.protocol}//${t.hostname}${r}${n}`}m();T();h();m();T();h();var kq={};m();T();h();function xq(e){return e!=null}m();T();h();m();T();h();we();m();T();h();var Cq;if(typeof AggregateError=="undefined"){class e extends Error{constructor(n,r=""){super(r),this.errors=n,this.name="AggregateError",Error.captureStackTrace(this,e)}}Cq=function(t,n){return new e(t,n)}}else Cq=AggregateError;function Uq(e){return"errors"in e&&Array.isArray(e.errors)}var Vq=3;function jq(e){return pI(e,[])}function pI(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return gde(e,t);default:return String(e)}}function Mq(e){return e instanceof Y?e.toString():`${e.name}: ${e.message}; +}`;var Ut=eP(function(){return pn(L,ze+"return "+Ie).apply(e,M)});if(Ut.source=Ie,Vv(Ut))throw Ut;return Ut}function Ez(a){return yn(a).toLowerCase()}function gz(a){return yn(a).toUpperCase()}function Iz(a,c,f){if(a=yn(a),a&&(f||c===e))return cw(a);if(!a||!(c=es(c)))return a;var E=eo(a),b=eo(c),L=lw(E,b),M=dw(E,b)+1;return Xu(E,L,M).join("")}function vz(a,c,f){if(a=yn(a),a&&(f||c===e))return a.slice(0,fw(a)+1);if(!a||!(c=es(c)))return a;var E=eo(a),b=dw(E,eo(c))+1;return Xu(E,0,b).join("")}function _z(a,c,f){if(a=yn(a),a&&(f||c===e))return a.replace(VI,"");if(!a||!(c=es(c)))return a;var E=eo(a),b=lw(E,eo(c));return Xu(E,b).join("")}function bz(a,c){var f=xt,E=B;if(Zn(c)){var b="separator"in c?c.separator:b;f="length"in c?Lt(c.length):f,E="omission"in c?es(c.omission):E}a=yn(a);var L=a.length;if(ad(a)){var M=eo(a);L=M.length}if(f>=L)return a;var q=f-ud(E);if(q<1)return E;var X=M?Xu(M,0,q).join(""):a.slice(0,q);if(b===e)return X+E;if(M&&(q+=X.length-q),jv(b)){if(a.slice(q).search(b)){var Te,Ne=X;for(b.global||(b=rv(b.source,yn(wF.exec(b))+"g")),b.lastIndex=0;Te=b.exec(Ne);)var Ie=Te.index;X=X.slice(0,Ie===e?q:Ie)}}else if(a.indexOf(es(b),q)!=q){var Fe=X.lastIndexOf(b);Fe>-1&&(X=X.slice(0,Fe))}return X+E}function Oz(a){return a=yn(a),a&&CK.test(a)?a.replace(AF,eQ):a}var Sz=md(function(a,c,f){return a+(f?" ":"")+c.toUpperCase()}),Kv=tL("toUpperCase");function ZL(a,c,f){return a=yn(a),c=f?e:c,c===e?zG(a)?rQ(a):VG(a):a.match(c)||[]}var eP=Bt(function(a,c){try{return Xi(a,e,c)}catch(f){return Vv(f)?f:new _t(f)}}),Dz=Na(function(a,c){return Es(c,function(f){f=wo(f),Ta(a,f,Mv(a[f],a))}),a});function Az(a){var c=a==null?0:a.length,f=ct();return a=c?Kn(a,function(E){if(typeof E[1]!="function")throw new gs(i);return[f(E[0]),E[1]]}):[],Bt(function(E){for(var b=-1;++bbn)return[];var f=Pn,E=Zr(a,Pn);c=ct(c),a-=Pn;for(var b=ev(E,c);++f0||c<0)?new Gt(f):(a<0?f=f.takeRight(-a):a&&(f=f.drop(a)),c!==e&&(c=Lt(c),f=c<0?f.dropRight(-c):f.take(c-a)),f)},Gt.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Gt.prototype.toArray=function(){return this.take(Pn)},Ro(Gt.prototype,function(a,c){var f=/^(?:filter|find|map|reject)|While$/.test(c),E=/^(?:head|last)$/.test(c),b=w[E?"take"+(c=="last"?"Right":""):c],L=E||/^find/.test(c);b&&(w.prototype[c]=function(){var M=this.__wrapped__,q=E?[1]:arguments,X=M instanceof Gt,Te=q[0],Ne=X||St(M),Ie=function($t){var Wt=b.apply(w,Gu([$t],q));return E&&Fe?Wt[0]:Wt};Ne&&f&&typeof Te=="function"&&Te.length!=1&&(X=Ne=!1);var Fe=this.__chain__,ze=!!this.__actions__.length,lt=L&&!Fe,Ut=X&&!ze;if(!L&&Ne){M=Ut?M:new Gt(this);var dt=a.apply(M,q);return dt.__actions__.push({func:py,args:[Ie],thisArg:e}),new Is(dt,Fe)}return lt&&Ut?a.apply(this,q):(dt=this.thru(Ie),lt?E?dt.value()[0]:dt.value():dt)})}),Es(["pop","push","shift","sort","splice","unshift"],function(a){var c=MT[a],f=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",E=/^(?:pop|shift)$/.test(a);w.prototype[a]=function(){var b=arguments;if(E&&!this.__chain__){var L=this.value();return c.apply(St(L)?L:[],b)}return this[f](function(M){return c.apply(St(M)?M:[],b)})}}),Ro(Gt.prototype,function(a,c){var f=w[c];if(f){var E=f.name+"";Sn.call(dd,E)||(dd[E]=[]),dd[E].push({name:c,func:f})}}),dd[sy(e,C).name]=[{name:"wrapper",func:e}],Gt.prototype.clone=OQ,Gt.prototype.reverse=SQ,Gt.prototype.value=DQ,w.prototype.at=nJ,w.prototype.chain=rJ,w.prototype.commit=iJ,w.prototype.next=sJ,w.prototype.plant=aJ,w.prototype.reverse=uJ,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=cJ,w.prototype.first=w.prototype.head,of&&(w.prototype[of]=oJ),w},Yu=iQ();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Cr._=Yu,define(function(){return Yu})):Uc?((Uc.exports=Yu)._=Yu,QI._=Yu):Cr._=Yu}).call(Jp)});var wq=V(Xl=>{"use strict";m();T();h();Object.defineProperty(Xl,"__esModule",{value:!0});Xl.FederationFactory=void 0;Xl.federateSubgraphs=Tde;Xl.federateSubgraphsWithContracts=yde;Xl.federateSubgraphsContract=Nde;var ke=(we(),Me(je)),wc=$a(),Xs=Vi(),xe=To(),zp=DR(),Ae=bi(),ve=ps(),uI=Zg(),fr=_c(),fde=qR(),mde=$l(),Rq=$h(),Se=Kp(),hde=QR(),Fq=Aq(),Hp=aI(),cI=_h(),lI=class{constructor(t){A(this,"authorizationDataByParentTypeName");A(this,"concreteTypeNamesByAbstractTypeName");A(this,"clientDefinitions",[fr.DEPRECATED_DEFINITION]);A(this,"currentSubgraphName","");A(this,"subgraphNamesByNamedTypeNameByFieldCoordinates",new Map);A(this,"entityDataByTypeName");A(this,"entityInterfaceFederationDataByTypeName");A(this,"errors",[]);A(this,"fieldConfigurationByFieldPath",new Map);A(this,"inaccessiblePaths",new Set);A(this,"isMaxDepth",!1);A(this,"internalGraph");A(this,"internalSubgraphBySubgraphName");A(this,"invalidOrScopesHostPaths",new Set);A(this,"isVersionTwo",!1);A(this,"namedInputValueTypeNames",new Set);A(this,"namedOutputTypeNames",new Set);A(this,"parentDefinitionDataByTypeName",new Map);A(this,"parentTagDataByTypeName",new Map);A(this,"pathsByNamedTypeName",new Map);A(this,"persistedDirectiveDefinitionByDirectiveName",new Map([[Ae.AUTHENTICATED,fr.AUTHENTICATED_DEFINITION],[Ae.DEPRECATED,fr.DEPRECATED_DEFINITION],[Ae.INACCESSIBLE,fr.INACCESSIBLE_DEFINITION],[Ae.REQUIRES_SCOPES,fr.REQUIRES_SCOPES_DEFINITION],[Ae.TAG,fr.TAG_DEFINITION]]));A(this,"persistedDirectiveDefinitions",new Set([Ae.AUTHENTICATED,Ae.DEPRECATED,Ae.INACCESSIBLE,Ae.TAG,Ae.REQUIRES_SCOPES]));A(this,"potentialPersistedDirectiveDefinitionDataByDirectiveName",new Map);A(this,"routerDefinitions",[fr.DEPRECATED_DEFINITION,fr.TAG_DEFINITION]);A(this,"shareableErrorTypeNames",new Map);A(this,"subscriptionFilterDataByFieldPath",new Map);A(this,"tagNamesByPath",new Map);A(this,"warnings");this.authorizationDataByParentTypeName=t.authorizationDataByParentTypeName,this.concreteTypeNamesByAbstractTypeName=t.concreteTypeNamesByAbstractTypeName,this.entityDataByTypeName=t.entityDataByTypeName,this.entityInterfaceFederationDataByTypeName=t.entityInterfaceFederationDataByTypeName,this.internalSubgraphBySubgraphName=t.internalSubgraphBySubgraphName,this.internalGraph=t.internalGraph,this.warnings=t.warnings}getValidImplementedInterfaces(t){var o;let n=[];if(t.implementedInterfaceTypeNames.size<1)return n;let r=(0,Se.isNodeDataInaccessible)(t),i=new Map,s=new Map;for(let u of t.implementedInterfaceTypeNames){n.push((0,Xs.stringToNamedTypeNode)(u));let l=(0,ve.getOrThrowError)(this.parentDefinitionDataByTypeName,u,Ae.PARENT_DEFINITION_DATA);if(l.kind!==ke.Kind.INTERFACE_TYPE_DEFINITION){s.set(l.name,(0,ve.kindToTypeString)(l.kind));continue}let d={invalidFieldImplementations:new Map,unimplementedFields:[]},p=!1;for(let[y,N]of l.fieldDataByFieldName){let I=!1,_=t.fieldDataByFieldName.get(y);if(!_){p=!0,d.unimplementedFields.push(y);continue}let C={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,uI.printTypeNode)(N.node.type),unimplementedArguments:new Set};(0,Se.isTypeValidImplementation)(N.node.type,_.node.type,this.concreteTypeNamesByAbstractTypeName)||(p=!0,I=!0,C.implementedResponseType=(0,uI.printTypeNode)(_.node.type));let j=new Set;for(let[Q,re]of N.argumentDataByArgumentName){let se=re.node;j.add(Q);let pe=(o=_.argumentDataByArgumentName.get(Q))==null?void 0:o.node;if(!pe){p=!0,I=!0,C.unimplementedArguments.add(Q);continue}let ye=(0,uI.printTypeNode)(pe.type),Ce=(0,uI.printTypeNode)(se.type);Ce!==ye&&(p=!0,I=!0,C.invalidImplementedArguments.push({actualType:ye,argumentName:Q,expectedType:Ce}))}for(let[Q,re]of _.argumentDataByArgumentName){let se=re.node;j.has(Q)||se.type.kind===ke.Kind.NON_NULL_TYPE&&(p=!0,I=!0,C.invalidAdditionalArguments.add(Q))}!r&&_.isInaccessible&&!N.isInaccessible&&(p=!0,I=!0,C.isInaccessible=!0),I&&d.invalidFieldImplementations.set(y,C)}p&&i.set(u,d)}return s.size>0&&this.errors.push((0,xe.invalidImplementedTypeError)(t.name,s)),i.size&&this.errors.push((0,xe.invalidInterfaceImplementationError)(t.node.name.value,(0,ve.kindToTypeString)(t.kind),i)),n}addValidPrimaryKeyTargetsToEntityData(t){var p;let n=this.entityDataByTypeName.get(t);if(!n)return;let r=(0,ve.getOrThrowError)(this.internalSubgraphBySubgraphName,this.currentSubgraphName,"internalSubgraphBySubgraphName"),i=r.parentDefinitionDataByTypeName,s=i.get(n.typeName);if(!s||s.kind!==ke.Kind.OBJECT_TYPE_DEFINITION)throw(0,xe.incompatibleParentKindFatalError)(n.typeName,ke.Kind.OBJECT_TYPE_DEFINITION,(s==null?void 0:s.kind)||ke.Kind.NULL);let o=(0,ve.getOrThrowError)(r.configurationDataByTypeName,n.typeName,"internalSubgraph.configurationDataByParentTypeName"),u=[],l=this.internalGraph.nodeByNodeName.get(`${this.currentSubgraphName}.${n.typeName}`);(0,zp.validateImplicitFieldSets)({conditionalFieldDataByCoordinates:r.conditionalFieldDataByCoordinates,configurationData:o,fieldSets:n.keyFieldSets,graphNode:l,implicitKeys:u,objectData:s,parentDefinitionDataByTypeName:i});for(let[y,N]of this.entityInterfaceFederationDataByTypeName){if(!((p=N.concreteTypeNames)!=null&&p.has(n.typeName)))continue;let I=this.entityDataByTypeName.get(y);I&&(0,zp.validateImplicitFieldSets)({conditionalFieldDataByCoordinates:r.conditionalFieldDataByCoordinates,configurationData:o,fieldSets:I.keyFieldSets,implicitKeys:u,objectData:s,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(y=>y.selectionSet));for(let y of u)d.has(y.selectionSet)||(o.keys.push(y),d.add(y.selectionSet))}addValidPrimaryKeyTargetsFromInterfaceObject(t,n,r,i){let s=t.parentDefinitionDataByTypeName,o=s.get(n);if(!o||o.kind!==ke.Kind.INTERFACE_TYPE_DEFINITION)throw(0,xe.incompatibleParentKindFatalError)(n,ke.Kind.INTERFACE_TYPE_DEFINITION,(o==null?void 0:o.kind)||ke.Kind.NULL);let u=(0,ve.getOrThrowError)(t.configurationDataByTypeName,r.typeName,"internalSubgraph.configurationDataByParentTypeName"),l=[];if((0,zp.validateImplicitFieldSets)({conditionalFieldDataByCoordinates:t.conditionalFieldDataByCoordinates,configurationData:u,fieldSets:r.keyFieldSets,implicitKeys:l,objectData:o,parentDefinitionDataByTypeName:s,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)?Se.MergeMethod.CONSISTENT:Se.MergeMethod.INTERSECTION:Se.MergeMethod.UNION}generateTagData(){for(let[t,n]of this.tagNamesByPath){let r=t.split(".");if(r.length<1)continue;let i=(0,ve.getValueOrDefault)(this.parentTagDataByTypeName,r[0],()=>(0,zp.newParentTagData)(r[0]));switch(r.length){case 1:for(let l of n)i.tagNames.add(l);break;case 2:let s=(0,ve.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,zp.newChildTagData)(r[1]));for(let l of n)s.tagNames.add(l);break;case 3:let o=(0,ve.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,zp.newChildTagData)(r[1])),u=(0,ve.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),s=i||n,o=`${n.parentTypeName}.${n.name}`;(0,Se.extractPersistedDirectives)(s.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName);let u=(0,Se.isNodeDataInaccessible)(n);if((r||u)&&this.inaccessiblePaths.add(o),this.recordTagNamesByPath(s,o),!i){n.node={directives:[],kind:n.node.kind,name:(0,Xs.stringToNameNode)(n.name)},t.set(n.name,n);return}i.appearances+=1,(0,Se.setLongestDescription)(i,n)}upsertInputValueData(t,n,r){let i=t.get(n.name),s=i||n;if((0,Se.extractPersistedDirectives)(s.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByPath(s,r||s.renamedPath),!i){n.node={directives:[],kind:n.node.kind,name:(0,Xs.stringToNameNode)(n.name),type:n.type},t.set(n.name,n);return}(0,Se.setLongestDescription)(i,n),(0,ve.addIterableValuesToSet)(n.requiredSubgraphNames,i.requiredSubgraphNames),(0,ve.addIterableValuesToSet)(n.subgraphNames,i.subgraphNames);let{typeErrors:o,typeNode:u}=(0,Hp.getMostRestrictiveMergedTypeNode)(i.type,n.type,i.originalPath,this.errors);if(u)i.type=u;else{if(!o||o.length<2)throw(0,xe.fieldTypeMergeFatalError)(i.name);i.isArgument?this.errors.push((0,xe.incompatibleArgumentTypesError)(i.name,i.renamedPath,o[0],o[1])):this.errors.push((0,xe.incompatibleChildTypesError)(i.renamedPath,o[0],o[1]))}(0,Se.compareAndValidateInputValueDefaultValues)(i,n,this.errors)}handleArgumentInaccessibility(t,n,r,i){if(t){this.inaccessiblePaths.add(r);return}(0,Se.isNodeDataInaccessible)(n)&&((0,Se.isTypeRequired)(n.type)?this.errors.push((0,xe.inaccessibleRequiredArgumentError)(n.name,r,i)):this.inaccessiblePaths.add(r))}handleSubscriptionFilterDirective(t,n,r){let i=t.directivesByDirectiveName.get(Ae.SUBSCRIPTION_FILTER);if(i){let s=(0,ve.getSingleSetEntry)(t.subgraphNames);if(s===void 0){this.errors.push((0,xe.unknownFieldSubgraphNameError)(n));return}this.subscriptionFilterDataByFieldPath.set(n,{directive:i[0],fieldData:r||t,directiveSubgraphName:s})}}federateOutputType({current:t,other:n,hostPath:r,mostRestrictive:i}){n=(0,wc.getMutableTypeNode)(n,r,this.errors);let s={kind:t.kind},o=Hp.DivergentType.NONE,u=s;for(let l=0;lnew Set))}upsertFieldData(t,n,r){let i=`${n.renamedParentTypeName}.${n.name}`;(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,n.namedTypeName,()=>new Set).add(i),this.namedOutputTypeNames.add(n.namedTypeName);let s=t.get(n.name),o=s||n;this.handleSubscriptionFilterDirective(n,i,o),(0,Se.extractPersistedDirectives)(o.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName);let u=(0,Se.isNodeDataInaccessible)(n);if((r||u)&&this.inaccessiblePaths.add(i),this.recordTagNamesByPath(o,i),!s){t.set(n.name,n),n.node={arguments:[],directives:[],kind:n.node.kind,name:(0,Xs.stringToNameNode)(n.name),type:n.type};for(let[d,p]of n.argumentDataByArgumentName){p.node={directives:[],kind:p.node.kind,name:(0,Xs.stringToNameNode)(p.name),type:p.type};let y=(0,wc.getTypeNodeNamedTypeName)(p.type);(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,y,()=>new Set).add(p.renamedPath),this.namedInputValueTypeNames.add(y),(0,Se.extractPersistedDirectives)(p.persistedDirectivesData,p.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.handleArgumentInaccessibility(r||u,p,p.renamedPath,i),this.recordTagNamesByPath(p,`${i}.${d}`)}return}let l=this.federateOutputType({current:s.type,other:n.type,hostPath:i,mostRestrictive:!1});if(l.success)if(s.type=l.typeNode,s.namedTypeName!==n.namedTypeName){let d=(0,ve.getValueOrDefault)(this.subgraphNamesByNamedTypeNameByFieldCoordinates,`${s.renamedParentTypeName}.${s.name}`,()=>new Map),p=(0,ve.getValueOrDefault)(d,s.namedTypeName,()=>new Set);if(p.size<1)for(let y of s.subgraphNames)n.subgraphNames.has(y)||p.add(y);(0,ve.addIterableValuesToSet)(n.subgraphNames,(0,ve.getValueOrDefault)(d,n.namedTypeName,()=>new Set))}else this.addSubgraphNameToExistingFieldNamedTypeDisparity(n);for(let[d,p]of n.argumentDataByArgumentName){let y=(0,wc.getTypeNodeNamedTypeName)(p.type);(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,y,()=>new Set).add(p.renamedPath),this.namedInputValueTypeNames.add(y),this.handleArgumentInaccessibility(r||u,p,p.renamedPath,i),this.upsertInputValueData(s.argumentDataByArgumentName,p,`${i}.${d}`)}(0,Se.setLongestDescription)(s,n),s.isInaccessible||(s.isInaccessible=n.isInaccessible),(0,ve.addMapEntries)(n.isExternalBySubgraphName,s.isExternalBySubgraphName),(0,ve.addMapEntries)(n.isShareableBySubgraphName,s.isShareableBySubgraphName),(0,ve.addIterableValuesToSet)(n.subgraphNames,s.subgraphNames)}getClientSchemaUnionMembers(t){let n=[];for(let[r,i]of t.memberByMemberTypeName)this.inaccessiblePaths.has(r)||n.push(i);return n}recordTagNamesByPath(t,n){let r=n||t.name;if(t.persistedDirectivesData.tags.size>0){let i=(0,ve.getValueOrDefault)(this.tagNamesByPath,r,()=>new Set);for(let s of t.persistedDirectivesData.tags.keys())i.add(s)}}upsertParentDefinitionData(t,n){let r=this.entityInterfaceFederationDataByTypeName.get(t.name),i=this.parentDefinitionDataByTypeName.get(t.name),s=i||t;(0,Se.extractPersistedDirectives)(s.persistedDirectivesData,t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByPath(s);let o=(0,Se.isNodeDataInaccessible)(s);if(o&&this.inaccessiblePaths.add(t.name),r&&r.interfaceObjectSubgraphs.has(n)&&(t.kind=ke.Kind.INTERFACE_TYPE_DEFINITION),!i)switch(t.node={kind:t.kind,name:(0,Xs.stringToNameNode)(t.name)},this.parentDefinitionDataByTypeName.set(t.name,t),t.kind){case ke.Kind.ENUM_TYPE_DEFINITION:for(let[u,l]of t.enumValueDataByValueName){let d=`${t.name}.${u}`;l.node={directives:[],kind:l.node.kind,name:(0,Xs.stringToNameNode)(l.name)},(0,Se.extractPersistedDirectives)(l.persistedDirectivesData,l.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByPath(l,d),(0,Se.isNodeDataInaccessible)(l)&&this.inaccessiblePaths.add(d)}return;case ke.Kind.INPUT_OBJECT_TYPE_DEFINITION:for(let[u,l]of t.inputValueDataByValueName){l.node={directives:[],kind:l.node.kind,name:(0,Xs.stringToNameNode)(l.name),type:l.type};let d=(0,wc.getTypeNodeNamedTypeName)(l.type);(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,d,()=>new Set).add(l.renamedPath),this.namedInputValueTypeNames.add(d),(0,Se.extractPersistedDirectives)(l.persistedDirectivesData,l.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByPath(l,`${t.name}.${u}`),(o||(0,Se.isNodeDataInaccessible)(l))&&this.inaccessiblePaths.add(l.renamedPath)}return;case ke.Kind.INTERFACE_TYPE_DEFINITION:case ke.Kind.OBJECT_TYPE_DEFINITION:(0,Se.isParentDataRootType)(t)&&(t.extensionType=Rq.ExtensionType.NONE);for(let u of t.fieldDataByFieldName.values()){u.node={arguments:[],directives:[],kind:u.node.kind,name:(0,Xs.stringToNameNode)(u.name),type:u.type};let l=`${u.renamedParentTypeName}.${u.name}`;this.handleSubscriptionFilterDirective(u,l),(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,u.namedTypeName,()=>new Set).add(l),this.namedOutputTypeNames.add(u.namedTypeName),(0,Se.extractPersistedDirectives)(u.persistedDirectivesData,u.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByPath(u,l);let d=(0,Se.isNodeDataInaccessible)(u);(o||d)&&this.inaccessiblePaths.add(l);for(let[p,y]of u.argumentDataByArgumentName){y.node={directives:[],kind:y.node.kind,name:(0,Xs.stringToNameNode)(y.name),type:y.type};let N=(0,wc.getTypeNodeNamedTypeName)(y.type);(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,N,()=>new Set).add(y.renamedPath),this.namedInputValueTypeNames.add(N),(0,Se.extractPersistedDirectives)(y.persistedDirectivesData,y.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByPath(y,`${l}.${p}`),this.handleArgumentInaccessibility(o||d,y,y.renamedPath,l)}}return;default:return}if(i.kind!==t.kind&&(!r||!r.interfaceObjectSubgraphs.has(n)||i.kind!==ke.Kind.INTERFACE_TYPE_DEFINITION||t.kind!==ke.Kind.OBJECT_TYPE_DEFINITION)){this.errors.push((0,xe.incompatibleParentKindMergeError)(i.name,(0,ve.kindToTypeString)(i.kind),(0,ve.kindToTypeString)(t.kind)));return}switch((0,Se.setLongestDescription)(i,t),(0,Se.setParentDataExtensionType)(i,t),i.kind){case ke.Kind.ENUM_TYPE_DEFINITION:i.appearances+=1;for(let l of t.enumValueDataByValueName.values())this.upsertEnumValueData(i.enumValueDataByValueName,l,o);return;case ke.Kind.INPUT_OBJECT_TYPE_DEFINITION:o&&!i.isInaccessible&&this.propagateInaccessibilityToExistingChildren(i),(0,ve.addIterableValuesToSet)(t.subgraphNames,i.subgraphNames);for(let[l,d]of t.inputValueDataByValueName){let p=`${t.name}.${l}`,y=(0,wc.getTypeNodeNamedTypeName)(d.type);(0,ve.getValueOrDefault)(this.pathsByNamedTypeName,y,()=>new Set).add(p),this.namedInputValueTypeNames.add(y),this.upsertInputValueData(i.inputValueDataByValueName,d),this.recordTagNamesByPath(d,p),(o||(0,Se.isNodeDataInaccessible)(d))&&this.inaccessiblePaths.add(p)}return;case ke.Kind.INTERFACE_TYPE_DEFINITION:case ke.Kind.OBJECT_TYPE_DEFINITION:o&&!i.isInaccessible&&this.propagateInaccessibilityToExistingChildren(i);let u=t;(0,ve.addIterableValuesToSet)(u.implementedInterfaceTypeNames,i.implementedInterfaceTypeNames),(0,ve.addIterableValuesToSet)(u.subgraphNames,i.subgraphNames);for(let l of u.fieldDataByFieldName.values())this.upsertFieldData(i.fieldDataByFieldName,l,o||i.isInaccessible);return;case ke.Kind.UNION_TYPE_DEFINITION:(0,ve.addMapEntries)(t.memberByMemberTypeName,i.memberByMemberTypeName);return;default:return}}propagateInaccessibilityToExistingChildren(t){switch(t.isInaccessible=!0,t.kind){case ke.Kind.INPUT_OBJECT_TYPE_DEFINITION:for(let n of t.inputValueDataByValueName.keys())this.inaccessiblePaths.add(`${t.name}.${n}`);break;default:for(let[n,r]of t.fieldDataByFieldName){let i=`${r.renamedParentTypeName}.${n}`;this.inaccessiblePaths.add(i);for(let s of r.argumentDataByArgumentName.values())this.inaccessiblePaths.add(s.renamedPath)}}}upsertPersistedDirectiveDefinitionData(t,n){let r=t.name,i=this.potentialPersistedDirectiveDefinitionDataByDirectiveName.get(r);if(!i){if(n>1)return;let s=new Map;for(let o of t.argumentDataByArgumentName.values())this.namedInputValueTypeNames.add((0,wc.getTypeNodeNamedTypeName)(o.type)),this.upsertInputValueData(s,o);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.set(r,{argumentDataByArgumentName:s,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,Se.setMutualExecutableLocations)(i,t.executableLocations),i.executableLocations.size<1){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}for(let s of t.argumentDataByArgumentName.values())this.namedInputValueTypeNames.add((0,wc.getTypeNodeNamedTypeName)(s.type)),this.upsertInputValueData(i.argumentDataByArgumentName,s);(0,Se.setLongestDescription)(i,t),i.repeatable&&(i.repeatable=t.repeatable),(0,ve.addIterableValuesToSet)(t.subgraphNames,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,xe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}break}case ke.Kind.UNION_TYPE_DEFINITION:{if(l){this.errors.push((0,xe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}l=p;break}default:{this.errors.push((0,xe.incompatibleFederatedFieldNamedTypeError)(t,n));break}}}if(o.size<0&&!l){this.errors.push((0,xe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}let d=l;if(o.size>0){if(l){this.errors.push((0,xe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}for(let p of o.keys()){d=p;for(let[y,N]of o)if(p!==y&&!N.implementedInterfaceTypeNames.has(p)){d="";break}if(d)break}}if(!this.shouldUpdateFederatedFieldAbstractNamedType(d,u)){this.errors.push((0,xe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}s.namedTypeName=d,this.updateTypeNodeNamedType(s.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,hde.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:s,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),s.has(p)&&l.addTargetSubgraphByFieldSet(p,o);let d=r.fieldDatasBySubgraphName.get(o);for(let{name:p,namedTypeName:y}of d||[])this.internalGraph.addEdge(u,this.internalGraph.addOrUpdateNode(y),p);this.internalGraph.addEdge(i,u,t.typeName,!0),this.addValidPrimaryKeyTargetsFromInterfaceObject(n,i.typeName,t,u)}handleEntityInterfaces(){for(let[t,n]of this.entityInterfaceFederationDataByTypeName){(0,ve.subtractSourceSetFromTargetSet)(n.interfaceFieldNames,n.interfaceObjectFieldNames);let r=(0,ve.getOrThrowError)(this.parentDefinitionDataByTypeName,t,Ae.PARENT_DEFINITION_DATA);if(r.kind===ke.Kind.INTERFACE_TYPE_DEFINITION)for(let i of n.interfaceObjectSubgraphs){let s=(0,ve.getOrThrowError)(this.internalSubgraphBySubgraphName,i,"internalSubgraphBySubgraphName"),o=s.configurationDataByTypeName,u=this.concreteTypeNamesByAbstractTypeName.get(t);if(!u)continue;let l=(0,ve.getOrThrowError)(o,t,"configurationDataMap"),d=l.keys;if(!d)continue;l.entityInterfaceConcreteTypeNames=n.concreteTypeNames;let p=l.fieldNames,y=this.authorizationDataByParentTypeName.get(n.typeName);this.internalGraph.setSubgraphName(i);let N=this.internalGraph.addOrUpdateNode(t,{isAbstract:!0});for(let I of u){if(o.has(I))continue;if(y){let re=(0,ve.getValueOrDefault)(this.authorizationDataByParentTypeName,I,()=>(0,ve.newAuthorizationData)(I));for(let se of y.fieldAuthorizationDataByFieldName.values())(0,ve.upsertFieldAuthorizationData)(re.fieldAuthorizationDataByFieldName,se)||this.invalidOrScopesHostPaths.add(`${I}.${se.fieldName}`)}let _=(0,ve.getOrThrowError)(this.parentDefinitionDataByTypeName,I,Ae.PARENT_DEFINITION_DATA);if(_.kind!==ke.Kind.OBJECT_TYPE_DEFINITION)continue;let C=(0,ve.getOrThrowError)(this.entityDataByTypeName,I,"entityDataByTypeName");C.subgraphNames.add(i);let j={fieldNames:p,isRootNode:!0,keys:d,typeName:I},Q=new Set;for(let re of d.filter(se=>!se.disableEntityResolver))Q.add(re.selectionSet);for(let re of n.interfaceObjectFieldNames){if(_.fieldDataByFieldName.get(re))continue;let pe=(0,ve.getOrThrowError)(r.fieldDataByFieldName,re,`${t}.fieldDataByFieldName`);_.fieldDataByFieldName.set(re,k({},pe))}o.set(I,j),this.handleInterfaceObjectForInternalGraph({internalSubgraph:s,subgraphName:i,interfaceObjectData:n,interfaceObjectNode:N,resolvableKeyFieldSets:Q,entityData:C})}}}}fieldDataToGraphFieldData(t){var n;return{name:t.name,namedTypeName:t.namedTypeName,isLeaf:(0,ve.isNodeLeaf)((n=this.parentDefinitionDataByTypeName.get(t.namedTypeName))==null?void 0:n.kind),subgraphNames:t.subgraphNames}}pushParentDefinitionDataToDocumentDefinitions(t){for(let[n,r]of this.parentDefinitionDataByTypeName)switch(r.extensionType!==Rq.ExtensionType.NONE&&this.errors.push((0,xe.noBaseDefinitionForExtensionError)((0,ve.kindToTypeString)(r.kind),n)),r.kind){case ke.Kind.ENUM_TYPE_DEFINITION:let i=[],s=[],o=this.getEnumValueMergeMethod(n);for(let Q of r.enumValueDataByValueName.values()){let re=(0,Se.getNodeForRouterSchemaByData)(Q,this.persistedDirectiveDefinitionByDirectiveName,this.errors),se=(0,Se.isNodeDataInaccessible)(Q),pe=K(k({},Q.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(Q)});switch(o){case Se.MergeMethod.CONSISTENT:!se&&r.appearances>Q.appearances&&this.errors.push((0,xe.incompatibleSharedEnumError)(n)),i.push(re),se||s.push(pe);break;case Se.MergeMethod.INTERSECTION:r.appearances===Q.appearances&&(i.push(re),se||s.push(pe));break;default:i.push(re),se||s.push(pe);break}}if(r.node.values=i,this.routerDefinitions.push((0,Se.getNodeForRouterSchemaByData)(r,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Se.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(s.length<1){this.errors.push((0,xe.allChildDefinitionsAreInaccessibleError)((0,ve.kindToTypeString)(r.kind),n,Ae.ENUM_VALUE));break}this.clientDefinitions.push(K(k({},r.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(r),values:s}));break;case ke.Kind.INPUT_OBJECT_TYPE_DEFINITION:let u=[],l=[],d=[];for(let[Q,re]of r.inputValueDataByValueName)if(r.subgraphNames.size===re.subgraphNames.size){if(l.push((0,Se.getNodeWithPersistedDirectivesByInputValueData)(re,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Se.isNodeDataInaccessible)(re))continue;d.push(K(k({},re.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(re)}))}else(0,Se.isTypeRequired)(re.type)&&u.push({inputValueName:Q,missingSubgraphs:(0,ve.getEntriesNotInHashSet)(r.subgraphNames,re.subgraphNames),requiredSubgraphs:[...re.requiredSubgraphNames]});if(u.length>0){this.errors.push((0,xe.invalidRequiredInputValueError)(Ae.INPUT_OBJECT,n,u,!1));break}if(r.node.fields=l,this.routerDefinitions.push((0,Se.getNodeForRouterSchemaByData)(r,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Se.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r);break}if(d.length<1){this.errors.push((0,xe.allChildDefinitionsAreInaccessibleError)((0,ve.kindToTypeString)(r.kind),n,"input field"));break}this.clientDefinitions.push(K(k({},r.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(r),fields:d}));break;case ke.Kind.INTERFACE_TYPE_DEFINITION:case ke.Kind.OBJECT_TYPE_DEFINITION:let p=[],y=[],N=new Map,I=(0,Se.newInvalidFieldNames)(),_=r.kind===ke.Kind.OBJECT_TYPE_DEFINITION;for(let[Q,re]of r.fieldDataByFieldName){(0,Se.pushAuthorizationDirectives)(re,this.authorizationDataByParentTypeName.get(n));let se=(0,Se.getValidFieldArgumentNodes)(re,this.persistedDirectiveDefinitionByDirectiveName,this.fieldConfigurationByFieldPath,this.errors);_&&(0,Se.validateExternalAndShareable)(re,I),p.push((0,Se.getNodeWithPersistedDirectivesByFieldData)(re,this.persistedDirectiveDefinitionByDirectiveName,se,this.errors)),!(0,Se.isNodeDataInaccessible)(re)&&(y.push((0,Se.getClientSchemaFieldNodeByFieldData)(re)),N.set(Q,this.fieldDataToGraphFieldData(re)))}if(_&&(I.byShareable.size>0&&this.errors.push((0,xe.invalidFieldShareabilityError)(r,I.byShareable)),I.subgraphNamesByExternalFieldName.size>0&&this.errors.push((0,xe.allExternalFieldInstancesError)(n,I.subgraphNamesByExternalFieldName))),r.node.fields=p,this.internalGraph.initializeNode(n,N),r.implementedInterfaceTypeNames.size>0){t.push({data:r,clientSchemaFieldNodes:y});break}this.routerDefinitions.push((0,Se.getNodeForRouterSchemaByData)(r,this.persistedDirectiveDefinitionByDirectiveName,this.errors));let C=(0,mde.isNodeQuery)(n);if((0,Se.isNodeDataInaccessible)(r)){if(C){this.errors.push(xe.inaccessibleQueryRootTypeError);break}this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(y.length<1){let Q=C?xe.noQueryRootTypeError:(0,xe.allChildDefinitionsAreInaccessibleError)((0,ve.kindToTypeString)(r.kind),n,Ae.FIELD);this.errors.push(Q);break}this.clientDefinitions.push(K(k({},r.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(r),fields:y}));break;case ke.Kind.SCALAR_TYPE_DEFINITION:if(fr.BASE_SCALARS.has(n))break;if(this.routerDefinitions.push((0,Se.getNodeForRouterSchemaByData)(r,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Se.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}this.clientDefinitions.push(K(k({},r.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(r)}));break;case ke.Kind.UNION_TYPE_DEFINITION:if(r.node.types=(0,ve.mapToArrayOfValues)(r.memberByMemberTypeName),this.routerDefinitions.push((0,Se.getNodeForRouterSchemaByData)(r,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Se.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}let j=this.getClientSchemaUnionMembers(r);if(j.length<1){this.errors.push((0,xe.allChildDefinitionsAreInaccessibleError)(Ae.UNION,n,"union member type"));break}this.clientDefinitions.push(K(k({},r.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(r),types:j}));break}}federateSubgraphData(){this.federateInternalSubgraphData(),this.handleEntityInterfaces(),this.generateTagData(),this.pushVersionTwoDirectiveDefinitionsToDocumentDefinitions()}validateInterfaceImplementationsAndPushToDocumentDefinitions(t){for(let{data:n,clientSchemaFieldNodes:r}of t){if(n.node.interfaces=this.getValidImplementedInterfaces(n),this.routerDefinitions.push((0,Se.getNodeForRouterSchemaByData)(n,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Se.isNodeDataInaccessible)(n)){this.validateReferencesOfInaccessibleType(n),this.internalGraph.setNodeInaccessible(n.name);continue}let i=[];for(let s of n.implementedInterfaceTypeNames)this.inaccessiblePaths.has(s)||i.push((0,Xs.stringToNamedTypeNode)(s));this.clientDefinitions.push(K(k({},n.node),{directives:(0,Se.getClientPersistedDirectiveNodes)(n),fields:r,interfaces:i}))}}pushVersionTwoDirectiveDefinitionsToDocumentDefinitions(){this.isVersionTwo&&(this.routerDefinitions=[fr.AUTHENTICATED_DEFINITION,fr.DEPRECATED_DEFINITION,fr.INACCESSIBLE_DEFINITION,fr.REQUIRES_SCOPES_DEFINITION,fr.TAG_DEFINITION,fr.SCOPE_SCALAR_DEFINITION],this.clientDefinitions=[fr.AUTHENTICATED_DEFINITION,fr.DEPRECATED_DEFINITION,fr.REQUIRES_SCOPES_DEFINITION,fr.SCOPE_SCALAR_DEFINITION])}validatePathSegmentInaccessibility(t){if(!t)return!1;let r=t.split(Ae.LEFT_PARENTHESIS)[0].split(Ae.PERIOD),i=r[0];for(let s=0;s0&&this.errors.push((0,xe.invalidReferencesOfInaccessibleTypeError)((0,ve.kindToTypeString)(t.kind),t.name,r))}validateQueryRootType(){let t=this.parentDefinitionDataByTypeName.get(Ae.QUERY);if(!t||t.kind!==ke.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByFieldName.size<1){this.errors.push(xe.noQueryRootTypeError);return}for(let n of t.fieldDataByFieldName.values())if(!(0,Se.isNodeDataInaccessible)(n))return;this.errors.push(xe.noQueryRootTypeError)}validateSubscriptionFieldConditionFieldPath(t,n,r,i,s){let o=t.split(Ae.PERIOD);if(o.length<1)return s.push((0,xe.invalidSubscriptionFieldConditionFieldPathErrorMessage)(r,t)),[];let u=n;if(this.inaccessiblePaths.has(u.renamedTypeName))return s.push((0,xe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,o[0],u.renamedTypeName)),[];let l="";for(let d=0;d0?`.${p}`:p,u.kind!==ke.Kind.OBJECT_TYPE_DEFINITION)return s.push((0,xe.invalidSubscriptionFieldConditionFieldPathParentErrorMessage)(r,t,l)),[];let y=u.fieldDataByFieldName.get(p);if(!y)return s.push((0,xe.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,p,u.renamedTypeName)),[];let N=`${u.renamedTypeName}.${p}`;if(!y.subgraphNames.has(i))return s.push((0,xe.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,N,i)),[];if(this.inaccessiblePaths.has(N))return s.push((0,xe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,N)),[];if(fr.BASE_SCALARS.has(y.namedTypeName)){u={kind:ke.Kind.SCALAR_TYPE_DEFINITION,name:y.namedTypeName};continue}u=(0,ve.getOrThrowError)(this.parentDefinitionDataByTypeName,y.namedTypeName,Ae.PARENT_DEFINITION_DATA)}return(0,Se.isLeafKind)(u.kind)?o:(s.push((0,xe.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage)(r,t,o[o.length-1],(0,ve.kindToTypeString)(u.kind),u.name)),[])}validateSubscriptionFieldCondition(t,n,r,i,s,o,u){if(i>cI.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return u.push((0,xe.subscriptionFilterConditionDepthExceededErrorMessage)(s)),this.isMaxDepth=!0,!1;let l=!1,d=new Set([Ae.FIELD_PATH,Ae.VALUES]),p=new Set,y=new Set,N=[];for(let I of t.fields){let _=I.name.value,C=s+`.${_}`;switch(_){case Ae.FIELD_PATH:{if(d.has(Ae.FIELD_PATH))d.delete(Ae.FIELD_PATH);else{l=!0,p.add(Ae.FIELD_PATH);break}if(I.value.kind!==ke.Kind.STRING){N.push((0,xe.invalidInputFieldTypeErrorMessage)(C,Ae.STRING,(0,ve.kindToTypeString)(I.value.kind))),l=!0;break}let j=this.validateSubscriptionFieldConditionFieldPath(I.value.value,r,C,o,N);if(j.length<1){l=!0;break}n.fieldPath=j;break}case Ae.VALUES:{if(d.has(Ae.VALUES))d.delete(Ae.VALUES);else{l=!0,p.add(Ae.VALUES);break}let j=I.value.kind;if(j==ke.Kind.NULL||j==ke.Kind.OBJECT){N.push((0,xe.invalidInputFieldTypeErrorMessage)(C,Ae.LIST,(0,ve.kindToTypeString)(I.value.kind))),l=!0;break}if(j!==ke.Kind.LIST){n.values=[(0,Se.getSubscriptionFilterValue)(I.value)];break}let Q=new Set,re=[];for(let se=0;se0){N.push((0,xe.subscriptionFieldConditionInvalidValuesArrayErrorMessage)(C,re));continue}if(Q.size<1){l=!0,N.push((0,xe.subscriptionFieldConditionEmptyValuesArrayErrorMessage)(C));continue}n.values=[...Q];break}default:l=!0,y.add(_)}}return l?(u.push((0,xe.subscriptionFieldConditionInvalidInputFieldErrorMessage)(s,[...d],[...p],[...y],N)),!1):!0}validateSubscriptionFilterCondition(t,n,r,i,s,o,u){if(i>cI.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return u.push((0,xe.subscriptionFilterConditionDepthExceededErrorMessage)(s)),this.isMaxDepth=!0,!1;if(i+=1,t.fields.length!==1)return u.push((0,xe.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage)(s,t.fields.length)),!1;let l=t.fields[0],d=l.name.value;if(!Ae.SUBSCRIPTION_FILTER_INPUT_NAMES.has(d))return u.push((0,xe.subscriptionFilterConditionInvalidInputFieldErrorMessage)(s,d)),!1;let p=s+`.${d}`;switch(l.value.kind){case ke.Kind.OBJECT:switch(d){case Ae.IN_UPPER:return n.in={fieldPath:[],values:[]},this.validateSubscriptionFieldCondition(l.value,n.in,r,i,s+".IN",o,u);case Ae.NOT_UPPER:return n.not={},this.validateSubscriptionFilterCondition(l.value,n.not,r,i,s+".NOT",o,u);default:return u.push((0,xe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,Ae.LIST,Ae.OBJECT)),!1}case ke.Kind.LIST:{let y=[];switch(d){case Ae.AND_UPPER:{n.and=y;break}case Ae.OR_UPPER:{n.or=y;break}default:return u.push((0,xe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,Ae.OBJECT,Ae.LIST)),!1}let N=l.value.values.length;if(N<1||N>5)return u.push((0,xe.subscriptionFilterArrayConditionInvalidLengthErrorMessage)(p,N)),!1;let I=!0,_=[];for(let C=0;C0?(u.push((0,xe.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage)(p,_)),!1):I}default:{let y=Ae.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES.has(d)?Ae.LIST:Ae.OBJECT;return u.push((0,xe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,y,(0,ve.kindToTypeString)(l.value.kind))),!1}}}validateSubscriptionFilterAndGenerateConfiguration(t,n,r,i,s,o){if(!t.arguments||t.arguments.length!==1)return;let u=t.arguments[0];if(u.value.kind!==ke.Kind.OBJECT){this.errors.push((0,xe.invalidSubscriptionFilterDirectiveError)(r,[(0,xe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(Ae.CONDITION,Ae.OBJECT,(0,ve.kindToTypeString)(u.value.kind))]));return}let l={},d=[];if(!this.validateSubscriptionFilterCondition(u.value,l,n,0,Ae.CONDITION,o,d)){this.errors.push((0,xe.invalidSubscriptionFilterDirectiveError)(r,d)),this.isMaxDepth=!1;return}(0,ve.getValueOrDefault)(this.fieldConfigurationByFieldPath,r,()=>({argumentNames:[],fieldName:i,typeName:s})).subscriptionFilterCondition=l}validateSubscriptionFiltersAndGenerateConfiguration(){for(let[t,n]of this.subscriptionFilterDataByFieldPath){if(this.inaccessiblePaths.has(t))continue;let r=this.parentDefinitionDataByTypeName.get(n.fieldData.namedTypeName);if(!r){this.errors.push((0,xe.invalidSubscriptionFilterDirectiveError)(t,[(0,xe.subscriptionFilterNamedTypeErrorMessage)(n.fieldData.namedTypeName)]));continue}(0,Se.isNodeDataInaccessible)(r)||r.kind===ke.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.invalidOrScopesHostPaths.size>0&&this.errors.push((0,xe.orScopesLimitError)(ve.maxOrScopes,[...this.invalidOrScopesHostPaths]));for(let s of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,Se.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,s,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let t=[];if(this.pushParentDefinitionDataToDocumentDefinitions(t),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(t),this.validateQueryRootType(),this.errors.length>0)return{errors:this.errors,warnings:this.warnings};if(this.internalSubgraphBySubgraphName.size>1){let s=this.internalGraph.validate();if(s.length>0)return{errors:s,warnings:this.warnings}}if(this.errors.length>0)return{errors:this.errors,warnings:this.warnings};let n={kind:ke.Kind.DOCUMENT,definitions:this.routerDefinitions},r=(0,ke.buildASTSchema)({kind:ke.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),i=new Map;for(let s of this.internalSubgraphBySubgraphName.values())i.set(s.name,{configurationDataByTypeName:s.configurationDataByTypeName,schema:s.schema});for(let s of this.authorizationDataByParentTypeName.values())(0,ve.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldPath,s);return{federationResult:k({fieldConfigurations:Array.from(this.fieldConfigurationByFieldPath.values()),subgraphConfigBySubgraphName:i,federatedGraphAST:n,federatedGraphSchema:(0,ke.buildASTSchema)(n,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:r},this.getClientSchemaObjectBoolean()),warnings:this.warnings}}getClientSchemaObjectBoolean(){return this.inaccessiblePaths.size<1&&this.tagNamesByPath.size<1?{}:{shouldIncludeClientSchema:!0}}handleChildTagExclusions(t,n,r,i){let s=n.size;for(let[o,u]of r){let l=(0,ve.getOrThrowError)(n,o,`${t.name}.childDataByChildName`);if((0,Se.isNodeDataInaccessible)(l)){s-=1;continue}(0,ve.doSetsIntersect)(i,u.tagNames)&&((0,ve.getValueOrDefault)(l.persistedDirectivesData.directives,Ae.INACCESSIBLE,()=>[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(`${t.name}.${o}`),s-=1)}s<1&&(t.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(t.name))}handleChildTagInclusions(t,n,r,i){let s=n.size;for(let[o,u]of n){if((0,Se.isNodeDataInaccessible)(u)){s-=1;continue}let l=r.get(o);(!l||!(0,ve.doSetsIntersect)(i,l.tagNames))&&((0,ve.getValueOrDefault)(u.persistedDirectivesData.directives,Ae.INACCESSIBLE,()=>[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(`${t.name}.${o}`),s-=1)}s<1&&(t.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(t.name))}buildFederationContractResult(t){if(this.isVersionTwo||this.routerDefinitions.push(fr.INACCESSIBLE_DEFINITION),t.excludedTagNames.size>0)for(let[o,u]of this.parentTagDataByTypeName){let l=(0,ve.getOrThrowError)(this.parentDefinitionDataByTypeName,o,Ae.PARENT_DEFINITION_DATA);if(!(0,Se.isNodeDataInaccessible)(l)){if((0,ve.doSetsIntersect)(t.excludedTagNames,u.tagNames)){l.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(o);continue}if(!(u.childTagDataByChildName.size<1))switch(l.kind){case ke.Kind.SCALAR_TYPE_DEFINITION:case ke.Kind.UNION_TYPE_DEFINITION:continue;case ke.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagExclusions(l,l.enumValueDataByValueName,u.childTagDataByChildName,t.excludedTagNames);break;case ke.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagExclusions(l,l.inputValueDataByValueName,u.childTagDataByChildName,t.excludedTagNames);break;default:let d=l.fieldDataByFieldName.size;for(let[p,y]of u.childTagDataByChildName){let N=(0,ve.getOrThrowError)(l.fieldDataByFieldName,p,`${o}.fieldDataByFieldName`);if((0,Se.isNodeDataInaccessible)(N)){d-=1;continue}if((0,ve.doSetsIntersect)(t.excludedTagNames,y.tagNames)){(0,ve.getValueOrDefault)(N.persistedDirectivesData.directives,Ae.INACCESSIBLE,()=>[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(`${o}.${p}`),d-=1;continue}for(let[I,_]of y.tagNamesByArgumentName){let C=(0,ve.getOrThrowError)(N.argumentDataByArgumentName,I,`${p}.argumentDataByArgumentName`);(0,Se.isNodeDataInaccessible)(C)||(0,ve.doSetsIntersect)(_,_)&&((0,ve.getValueOrDefault)(C.persistedDirectivesData.directives,Ae.INACCESSIBLE,()=>[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(C.renamedPath))}}d<1&&(l.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(o))}}}else if(t.includedTagNames.size>0)for(let[o,u]of this.parentDefinitionDataByTypeName){if((0,Se.isNodeDataInaccessible)(u))continue;let l=this.parentTagDataByTypeName.get(o);if(!l){u.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(o);continue}if(!(0,ve.doSetsIntersect)(t.includedTagNames,l.tagNames)){if(l.childTagDataByChildName.size<1){u.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(o);continue}switch(u.kind){case ke.Kind.SCALAR_TYPE_DEFINITION:case ke.Kind.UNION_TYPE_DEFINITION:continue;case ke.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagInclusions(u,u.enumValueDataByValueName,l.childTagDataByChildName,t.includedTagNames);break;case ke.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagInclusions(u,u.inputValueDataByValueName,l.childTagDataByChildName,t.includedTagNames);break;default:let d=u.fieldDataByFieldName.size;for(let[p,y]of u.fieldDataByFieldName){if((0,Se.isNodeDataInaccessible)(y)){d-=1;continue}let N=l.childTagDataByChildName.get(p);if(!N||!(0,ve.doSetsIntersect)(t.includedTagNames,N.tagNames)){(0,ve.getValueOrDefault)(y.persistedDirectivesData.directives,Ae.INACCESSIBLE,()=>[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(`${o}.${p}`),d-=1;continue}for(let[I,_]of y.argumentDataByArgumentName){if((0,Se.isNodeDataInaccessible)(_))continue;let C=N.tagNamesByArgumentName.get(I);(!C||!(0,ve.doSetsIntersect)(C,C))&&((0,ve.getValueOrDefault)(_.persistedDirectivesData.directives,Ae.INACCESSIBLE,()=>[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(_.renamedPath))}}d<1&&(u.persistedDirectivesData.directives.set(Ae.INACCESSIBLE,[(0,ve.generateSimpleDirective)(Ae.INACCESSIBLE)]),this.inaccessiblePaths.add(o))}}}this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration();for(let o of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,Se.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,warnings:this.warnings};let r={kind:ke.Kind.DOCUMENT,definitions:this.routerDefinitions},i=(0,ke.buildASTSchema)({kind:ke.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),s=new Map;for(let o of this.internalSubgraphBySubgraphName.values())s.set(o.name,{configurationDataByTypeName:o.configurationDataByTypeName,schema:o.schema});for(let o of this.authorizationDataByParentTypeName.values())(0,ve.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldPath,o);return{federationResult:k({fieldConfigurations:Array.from(this.fieldConfigurationByFieldPath.values()),subgraphConfigBySubgraphName:s,federatedGraphAST:r,federatedGraphSchema:(0,ke.buildASTSchema)(r,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:i},this.getClientSchemaObjectBoolean()),warnings:this.warnings}}federateSubgraphsInternal(){return this.federateSubgraphData(),this.buildFederationResult()}};Xl.FederationFactory=lI;function YR(e){if(e.length<1)return{errors:[xe.minimumSubgraphRequirementError],warnings:[]};let{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,errors:i,internalSubgraphBySubgraphName:s,internalGraph:o,warnings:u}=(0,fde.batchNormalize)(e);if(i)return{errors:i,warnings:u};let l=new Map,d=new Map,p=new Set;for(let[y,N]of s)for(let[I,_]of N.entityInterfaces){(0,ve.getValueOrDefault)(d,I,()=>[]).push({subgraphName:y,concreteTypeNames:_.concreteTypeNames||new Set});let C=l.get(I);if(!C){p.add(I),l.set(I,(0,ve.newEntityInterfaceFederationData)(_,y));continue}(0,ve.upsertEntityInterfaceFederationData)(C,_,y)&&p.delete(I)}for(let y of p)d.delete(y);return d.size>0?{errors:[(0,xe.undefinedEntityInterfaceImplementationsError)(d,l)],warnings:u}:{federationFactory:new lI({authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,entityInterfaceFederationDataByTypeName:l,internalSubgraphBySubgraphName:s,internalGraph:o,warnings:u}),warnings:u}}function Tde(e){let{errors:t,federationFactory:n,warnings:r}=YR(e);return t||!n?{errors:t||[xe.federationFactoryInitializationFatalError],warnings:r}:n.federateSubgraphsInternal()}function yde(e,t){let{errors:n,federationFactory:r,warnings:i}=YR(e);if(n||!r)return{errors:n||[xe.federationFactoryInitializationFatalError],warnings:i};r.federateSubgraphData();let s=[(0,Fq.cloneDeep)(r)],{errors:o,federationResult:u,warnings:l}=r.buildFederationResult();if(o)return{errors:o,warnings:l};let d=t.size-1,p=new Map,y=0;for(let[N,I]of t){y!==d&&s.push((0,Fq.cloneDeep)(s[y]));let _=s[y].buildFederationContractResult(I);p.set(N,_),y++}return{federationResult:u,federationResultContainerByContractName:p,warnings:l}}function Nde(e,t){let{errors:n,federationFactory:r,warnings:i}=YR(e);return n||!r?{errors:n||[xe.federationFactoryInitializationFatalError],warnings:i}:(r.federateSubgraphData(),r.buildFederationContractResult(t))}});var Pq=V(Lq=>{"use strict";m();T();h();Object.defineProperty(Lq,"__esModule",{value:!0})});var dI=V(vn=>{"use strict";m();T();h();var Ede=vn&&vn.__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]}),Xn=vn&&vn.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Ede(t,e,n)};Object.defineProperty(vn,"__esModule",{value:!0});Xn(Vi(),vn);Xn(eD(),vn);Xn(To(),vn);Xn(zM(),vn);Xn(wq(),vn);Xn(DR(),vn);Xn(QR(),vn);Xn(qR(),vn);Xn($l(),vn);Xn(FR(),vn);Xn(nA(),vn);Xn(VR(),vn);Xn(xR(),vn);Xn(UR(),vn);Xn($a(),vn);Xn($h(),vn);Xn(Pq(),vn);Xn(aI(),vn);Xn(Kp(),vn);Xn(RR(),vn);Xn(ps(),vn);Xn(_c(),vn);Xn(bi(),vn);Xn(rI(),vn)});var ppe={};If(ppe,{buildRouterConfiguration:()=>dpe,federateSubgraphs:()=>lpe});m();T();h();var DF=Xv(dI());m();T();h();m();T();h();function JR(e){if(!e)return e;let t=new URL(e),n=t.pathname;n.endsWith("/")&&(n=n.slice(0,-1));let r=t.port?`:${t.port}`:"";return`${t.protocol}//${t.hostname}${r}${n}`}m();T();h();m();T();h();var kq={};m();T();h();function xq(e){return e!=null}m();T();h();m();T();h();we();m();T();h();var Cq;if(typeof AggregateError=="undefined"){class e extends Error{constructor(n,r=""){super(r),this.errors=n,this.name="AggregateError",Error.captureStackTrace(this,e)}}Cq=function(t,n){return new e(t,n)}}else Cq=AggregateError;function Uq(e){return"errors"in e&&Array.isArray(e.errors)}var Vq=3;function jq(e){return pI(e,[])}function pI(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return gde(e,t);default:return String(e)}}function Mq(e){return e instanceof Y?e.toString():`${e.name}: ${e.message}; ${e.stack}`}function gde(e,t){if(e===null)return"null";if(e instanceof Error)return Uq(e)?Mq(e)+` `+Bq(e.errors,t):Mq(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(Ide(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:pI(r,n)}else if(Array.isArray(e))return Bq(e,n);return vde(e,n)}function Ide(e){return typeof e.toJSON=="function"}function vde(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>Vq?"["+_de(e)+"]":"{ "+n.map(([i,s])=>i+": "+pI(s,t)).join(", ")+" }"}function Bq(e,t){if(e.length===0)return"[]";if(t.length>Vq)return"[Array]";let n=e.length,r=[];for(let i=0;in==null?n:n[r],e==null?void 0:e.extensions)}m();T();h();we();m();T();h();we();function la(e){if(Qe(e)){let t=la(e.ofType);if(t.kind===R.NON_NULL_TYPE)throw new Error(`Invalid type node ${jq(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:R.NON_NULL_TYPE,type:t}}else if(Pt(e))return{kind:R.LIST_TYPE,type:la(e.ofType)};return{kind:R.NAMED_TYPE,name:{kind:R.NAME,value:e.name}}}m();T();h();we();function mI(e){if(e===null)return{kind:R.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=mI(n);r!=null&&t.push(r)}return{kind:R.LIST,values:t}}if(typeof e=="object"){let t=[];for(let n in e){let r=e[n],i=mI(r);i&&t.push({kind:R.OBJECT_FIELD,name:{kind:R.NAME,value:n},value:i})}return{kind:R.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:R.BOOLEAN,value:e};if(typeof e=="number"&&isFinite(e)){let t=String(e);return bde.test(t)?{kind:R.INT,value:t}:{kind:R.FLOAT,value:t}}if(typeof e=="string")return{kind:R.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var bde=/^-?(?:0|[1-9][0-9]*)$/;m();T();h();m();T();h();function hI(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let s=e(r);return t.set(r,s),s}return i}}var OYe=hI(function(t){let n=Ode(t);return new Set([...n].map(r=>r.name))}),Ode=hI(function(t){let n=zR(t);return new Set(n.values())}),zR=hI(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let s=t.getSubscriptionType();return s&&n.set("subscription",s),n});function Sde(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=Dde(e,n),s=i!=null?[i]:[],o=e.getDirectives();for(let u of o)cc(u)||s.push(Ade(u,e,n));for(let u in r){let l=r[u],d=uo(l),p=ui(l);if(!(d||p))if(ot(l))s.push(Rde(l,e,n));else if(Nt(l))s.push(Fde(l,e,n));else if(fn(l))s.push(wde(l,e,n));else if(It(l))s.push(Lde(l,e,n));else if(rn(l))s.push(Pde(l,e,n));else if(tr(l))s.push(kde(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:R.DOCUMENT,definitions:s}}function $q(e,t={}){let n=Sde(e,t);return Ft(n)}function Dde(e,t){var n,r;let i=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),s=[];if(e.astNode!=null&&s.push(e.astNode),e.extensionASTNodes!=null)for(let p of e.extensionASTNodes)s.push(p);for(let p of s)if(p.operationTypes)for(let y of p.operationTypes)i.set(y.operation,y);let o=zR(e);for(let[p,y]of i){let N=o.get(p);if(N!=null){let I=la(N);y!=null?y.type=I:i.set(p,{kind:R.OPERATION_TYPE_DEFINITION,operation:p,type:I})}}let u=[...i.values()].filter(xq),l=Wp(e,e,t);if(!u.length&&!l.length)return null;let d={kind:u!=null?R.SCHEMA_DEFINITION:R.SCHEMA_EXTENSION,operationTypes:u,directives:l};return d.description=((r=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&r!==void 0?r:e.description!=null)?{kind:R.STRING,value:e.description,block:!0}:void 0,d}function Ade(e,t,n){var r,i,s,o;return{kind:R.DIRECTIVE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:R.STRING,value:e.description}:void 0,name:{kind:R.NAME,value:e.name},arguments:(s=e.args)===null||s===void 0?void 0:s.map(u=>qq(u,t,n)),repeatable:e.isRepeatable,locations:((o=e.locations)===null||o===void 0?void 0:o.map(u=>({kind:R.NAME,value:u})))||[]}}function Wp(e,t,n){let r=fI(e,n),i=[];e.astNode!=null&&i.push(e.astNode),"extensionASTNodes"in e&&e.extensionASTNodes!=null&&(i=i.concat(e.extensionASTNodes));let s;if(r!=null)s=HR(t,r);else{s=[];for(let o of i)o.directives&&s.push(...o.directives)}return s}function yI(e,t,n){var r,i;let s=[],o=null,u=fI(e,n),l;return u!=null?l=HR(t,u):l=(r=e.astNode)===null||r===void 0?void 0:r.directives,l!=null&&(s=l.filter(d=>d.name.value!=="deprecated"),e.deprecationReason!=null&&(o=(i=l.filter(d=>d.name.value==="deprecated"))===null||i===void 0?void 0:i[0])),e.deprecationReason!=null&&o==null&&(o=Ude(e.deprecationReason)),o==null?s:[o].concat(s)}function qq(e,t,n){var r,i,s;return{kind:R.INPUT_VALUE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:R.STRING,value:e.description,block:!0}:void 0,name:{kind:R.NAME,value:e.name},type:la(e.type),defaultValue:e.defaultValue!==void 0&&(s=Hr(e.defaultValue,e.type))!==null&&s!==void 0?s:void 0,directives:yI(e,t,n)}}function Rde(e,t,n){var r,i;return{kind:R.OBJECT_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:R.STRING,value:e.description,block:!0}:void 0,name:{kind:R.NAME,value:e.name},fields:Object.values(e.getFields()).map(s=>Kq(s,t,n)),interfaces:Object.values(e.getInterfaces()).map(s=>la(s)),directives:Wp(e,t,n)}}function Fde(e,t,n){var r,i;let s={kind:R.INTERFACE_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:R.STRING,value:e.description,block:!0}:void 0,name:{kind:R.NAME,value:e.name},fields:Object.values(e.getFields()).map(o=>Kq(o,t,n)),directives:Wp(e,t,n)};return"getInterfaces"in e&&(s.interfaces=Object.values(e.getInterfaces()).map(o=>la(o))),s}function wde(e,t,n){var r,i;return{kind:R.UNION_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:R.STRING,value:e.description,block:!0}:void 0,name:{kind:R.NAME,value:e.name},directives:Wp(e,t,n),types:e.getTypes().map(s=>la(s))}}function Lde(e,t,n){var r,i;return{kind:R.INPUT_OBJECT_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:R.STRING,value:e.description,block:!0}:void 0,name:{kind:R.NAME,value:e.name},fields:Object.values(e.getFields()).map(s=>xde(s,t,n)),directives:Wp(e,t,n)}}function Pde(e,t,n){var r,i;return{kind:R.ENUM_TYPE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:R.STRING,value:e.description,block:!0}:void 0,name:{kind:R.NAME,value:e.name},values:Object.values(e.getValues()).map(s=>Cde(s,t,n)),directives:Wp(e,t,n)}}function kde(e,t,n){var r,i,s;let o=fI(e,n),u=o?HR(t,o):((r=e.astNode)===null||r===void 0?void 0:r.directives)||[],l=e.specifiedByUrl||e.specifiedByURL;if(l&&!u.some(d=>d.name.value==="specifiedBy")){let d={url:l};u.push(TI("specifiedBy",d))}return{kind:R.SCALAR_TYPE_DEFINITION,description:(s=(i=e.astNode)===null||i===void 0?void 0:i.description)!==null&&s!==void 0?s:e.description?{kind:R.STRING,value:e.description,block:!0}:void 0,name:{kind:R.NAME,value:e.name},directives:u}}function Kq(e,t,n){var r,i;return{kind:R.FIELD_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:R.STRING,value:e.description,block:!0}:void 0,name:{kind:R.NAME,value:e.name},arguments:e.args.map(s=>qq(s,t,n)),type:la(e.type),directives:yI(e,t,n)}}function xde(e,t,n){var r,i,s;return{kind:R.INPUT_VALUE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:R.STRING,value:e.description,block:!0}:void 0,name:{kind:R.NAME,value:e.name},type:la(e.type),directives:yI(e,t,n),defaultValue:(s=Hr(e.defaultValue,e.type))!==null&&s!==void 0?s:void 0}}function Cde(e,t,n){var r,i;return{kind:R.ENUM_VALUE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:R.STRING,value:e.description,block:!0}:void 0,name:{kind:R.NAME,value:e.name},directives:yI(e,t,n)}}function Ude(e){return TI("deprecated",{reason:e},Uo)}function TI(e,t,n){let r=[];if(n!=null)for(let i of n.args){let s=i.name,o=t[s];if(o!==void 0){let u=Hr(o,i.type);u&&r.push({kind:R.ARGUMENT,name:{kind:R.NAME,value:s},value:u})}}else for(let i in t){let s=t[i],o=mI(s);o&&r.push({kind:R.ARGUMENT,name:{kind:R.NAME,value:i},value:o})}return{kind:R.DIRECTIVE,name:{kind:R.NAME,value:e},arguments:r}}function HR(e,t){let n=[];for(let r in t){let i=t[r],s=e==null?void 0:e.getDirective(r);if(Array.isArray(i))for(let o of i)n.push(TI(r,o,s));else n.push(TI(r,i,s))}return n}var LK=Xv(dI(),1);we();m();T();h();m();T();h();m();T();h();m();T();h();m();T();h();m();T();h();function Rn(e,t){if(!e)throw new Error(t)}var Mde=34028234663852886e22,Bde=-34028234663852886e22,Vde=4294967295,jde=2147483647,$de=-2147483648;function Xp(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>jde||e<$de)throw new Error("invalid int 32: "+e)}function mT(e){if(typeof e!="number")throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>Vde||e<0)throw new Error("invalid uint 32: "+e)}function NI(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>Mde||e({no:i.no,name:i.name,localName:e[i.no]})),r)}function XR(e,t,n){let r=Object.create(null),i=Object.create(null),s=[];for(let o of t){let u=Jq(o);s.push(u),r[o.name]=u,i[o.no]=u}return{typeName:e,values:s,findName(o){return r[o]},findNumber(o){return i[o]}}}function Yq(e,t,n){let r={};for(let i of t){let s=Jq(i);r[s.localName]=s.no,r[s.no]=s.localName}return WR(r,e,t,n),r}function Jq(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}m();T();h();m();T();h();var ft=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,s=i.makeReadOptions(n);return i.readMessage(this,s.readerFactory(t),t.byteLength,s),this}fromJson(t,n){let r=this.getType(),i=r.runtime.json,s=i.makeReadOptions(n);return i.readMessage(r,t,s,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),s=i.writerFactory();return r.writeMessage(this,s,i),s.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 zq(e,t,n,r){var i;let s=(i=r==null?void 0:r.localName)!==null&&i!==void 0?i:t.substring(t.lastIndexOf(".")+1),o={[s]:function(u){e.util.initFields(this),e.util.initPartial(u,this)}}[s];return Object.setPrototypeOf(o.prototype,new ft),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();h();m();T();h();m();T();h();m();T();h();function Wq(){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)<>>s,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 s=3;s<31;s=s+7){let o=t>>>s,u=!!(o>>>7),l=(u?o|128:o)&255;if(n.push(l),!u)return}n.push(t>>>31&1)}}var EI=4294967296;function ZR(e){let t=e[0]==="-";t&&(e=e.slice(1));let n=1e6,r=0,i=0;function s(o,u){let l=Number(e.slice(o,u));i*=n,r=r*n+l,r>=EI&&(i=i+(r/EI|0),r=r%EI)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),t?Zq(r,i):tF(r,i)}function Xq(e,t){let n=tF(e,t),r=n.hi&2147483648;r&&(n=Zq(n.lo,n.hi));let i=eF(n.lo,n.hi);return r?"-"+i:i}function eF(e,t){if({lo:e,hi:t}=qde(e,t),t<=2097151)return String(EI*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,s=n+r*6777216+i*6710656,o=r+i*8147497,u=i*2,l=1e7;return s>=l&&(o+=Math.floor(s/l),s%=l),o>=l&&(u+=Math.floor(o/l),o%=l),u.toString()+Hq(o)+Hq(s)}function qde(e,t){return{lo:e>>>0,hi:t>>>0}}function tF(e,t){return{lo:e|0,hi:t|0}}function Zq(e,t){return t=~t,e?e=~e+1:t+=1,tF(e,t)}var Hq=e=>{let t=String(e);return"0000000".slice(t.length)+t};function nF(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 eK(){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 Kde(){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 O!="object"||typeof O.env!="object"||O.env.BUF_BIGINT_DISABLE!=="1")){let i=BigInt("-9223372036854775808"),s=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>s||du||dRn(/^-?[0-9]+$/.test(i),`int64 invalid: ${i}`),r=i=>Rn(/^[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),ZR(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),r(i),ZR(i)},dec(i,s){return Xq(i,s)},uDec(i,s){return eF(i,s)}}}var Ir=Kde();m();T();h();var Ee;(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"})(Ee||(Ee={}));var bo;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(bo||(bo={}));function Xa(e,t,n){if(t===n)return!0;if(e==Ee.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(mT(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return Xp(t),nF(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){NI(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){mT(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){Xp(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return Xp(t),t=(t<<1^t>>31)>>>0,nF(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Ir.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=Ir.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=Ir.enc(t);return gI(n.lo,n.hi,this.buf),this}sint64(t){let n=Ir.enc(t),r=n.hi>>31,i=n.lo<<1^r,s=(n.hi<<1|n.lo>>>31)^r;return gI(i,s,this.buf),this}uint64(t){let n=Ir.uEnc(t);return gI(n.lo,n.hi,this.buf),this}},_I=class{constructor(t,n){this.varint64=Wq,this.uint32=eK,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 mr.Varint:for(;this.buf[this.pos++]&128;);break;case mr.Bit64:this.pos+=4;case mr.Bit32:this.pos+=4;break;case mr.LengthDelimited:let r=this.uint32();this.pos+=r;break;case mr.StartGroup:let i;for(;(i=this.tag()[1])!==mr.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 Ir.dec(...this.varint64())}uint64(){return Ir.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,Ir.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 Ir.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Ir.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 tK(e,t,n,r){let i;return{typeName:t,extendee:n,get field(){if(!i){let s=typeof r=="function"?r():r;s.name=t.split(".").pop(),s.jsonName=`[${t}]`,i=e.util.newFieldList([s]).list()[0]}return i},runtime:e}}function bI(e){let t=e.field.localName,n=Object.create(null);return n[t]=Gde(e),[n,()=>n[t]]}function Gde(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 Oo(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 nK(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();h();m();T();h();var Za="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),OI=[];for(let e=0;e>4,o=s,i=2;break;case 2:n[r++]=(o&15)<<4|(s&60)>>2,o=s,i=3;break;case 3:n[r++]=(o&3)<<6|s,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 s=0;s>2],i=(r&3)<<4,n=1;break;case 1:t+=Za[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=Za[i|r>>6],t+=Za[r&63],n=0;break}return n&&(t+=Za[i],t+="=",n==1&&(t+="=")),t}};m();T();h();function rK(e,t,n){sK(t,e);let r=t.runtime.bin.makeReadOptions(n),i=nK(e.getType().runtime.bin.listUnknownFields(e),t.field),[s,o]=bI(t);for(let u of i)t.runtime.bin.readField(s,r.readerFactory(u.data),t.field,u.wireType,r);return o()}function iK(e,t,n,r){sK(t,e);let i=t.runtime.bin.makeReadOptions(r),s=t.runtime.bin.makeWriteOptions(r);if(iF(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=s.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,s);let l=i.readerFactory(o.finish());for(;l.posr.no==t.field.no)}function sK(e,t){Rn(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}m();T();h();function SI(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:!II(e.T,t[n]);case"message":return t[n]!==void 0;case"map":return Object.keys(t[n]).length>0}}function sF(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?Oo(e.T,e.L):void 0;break;case"message":t[n]=void 0;break}}m();T();h();m();T();h();function So(e,t){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(ft.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 DI(e,t){return So(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}var s3e={"google.protobuf.DoubleValue":Ee.DOUBLE,"google.protobuf.FloatValue":Ee.FLOAT,"google.protobuf.Int64Value":Ee.INT64,"google.protobuf.UInt64Value":Ee.UINT64,"google.protobuf.Int32Value":Ee.INT32,"google.protobuf.UInt32Value":Ee.UINT32,"google.protobuf.BoolValue":Ee.BOOL,"google.protobuf.StringValue":Ee.STRING,"google.protobuf.BytesValue":Ee.BYTES};var oK={ignoreUnknownFields:!1},aK={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function Qde(e){return e?Object.assign(Object.assign({},oK),e):oK}function Yde(e){return e?Object.assign(Object.assign({},aK),e):aK}var FI=Symbol(),AI=Symbol();function lK(){return{makeReadOptions:Qde,makeWriteOptions:Yde,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.typeName} from JSON: ${da(t)}`);r=r!=null?r:new e;let i=new Map,s=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)}uK(r,u,l,n,e)}else{let d=!1;if(s!=null&&s.findExtension&&o.startsWith("[")&&o.endsWith("]")){let p=s.findExtension(o.substring(1,o.length-1));if(p&&p.extendee.typeName==e.typeName){d=!0;let[y,N]=bI(p);uK(y,u,p.field,n,p),iK(r,p,N(),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(!SI(i,e)){if(i.req)throw"required field not set";if(!t.emitDefaultValues||!zde(i))continue}let o=i.oneof?e[i.oneof.localName].value:e[i.localName],u=cK(i,o,t);u!==void 0&&(r[t.useProtoFieldName?i.name:i.jsonName]=u)}let s=t.typeRegistry;if(s!=null&&s.findExtensionFor)for(let o of n.runtime.bin.listUnknownFields(e)){let u=s.findExtensionFor(n.typeName,o.no);if(u&&iF(e,u)){let l=rK(e,u,t),d=cK(u.field,l,t);d!==void 0&&(r[u.field.jsonName]=d)}}}catch(s){let o=i?`cannot encode field ${n.typeName}.${i.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,u=s instanceof Error?s.message:String(s);throw new Error(o+(u.length>0?`: ${u}`:""))}return r},readScalar(e,t,n){return hT(e,t,n!=null?n:bo.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||II(e,t)))return RI(e,t)},debug:da}}function da(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 uK(e,t,n,r,i){let s=n.localName;if(n.repeated){if(Rn(n.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${da(t)}`);let o=e[s];for(let u of t){if(u===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${da(u)}`);switch(n.kind){case"message":o.push(n.T.fromJson(u,r));break;case"enum":let l=oF(n.T,u,r.ignoreUnknownFields,!0);l!==AI&&o.push(l);break;case"scalar":try{o.push(hT(n.T,u,n.L,!0))}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${da(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: ${da(t)}`);let o=e[s];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=Jde(n.K,u)}catch(p){let y=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${da(t)}`;throw p instanceof Error&&p.message.length>0&&(y+=`: ${p.message}`),new Error(y)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(l,r);break;case"enum":let p=oF(n.V.T,l,r.ignoreUnknownFields,!0);p!==AI&&(o[d]=p);break;case"scalar":try{o[d]=hT(n.V.T,l,bo.BIGINT,!0)}catch(y){let N=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${da(t)}`;throw y instanceof Error&&y.message.length>0&&(N+=`: ${y.message}`),new Error(N)}break}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:s},s="value"),n.kind){case"message":let o=n.T;if(t===null&&o.typeName!="google.protobuf.Value")return;let u=e[s];So(u)?u.fromJson(t,r):(e[s]=u=o.fromJson(t,r),o.fieldWrapper&&!n.oneof&&(e[s]=o.fieldWrapper.unwrapField(u)));break;case"enum":let l=oF(n.T,t,r.ignoreUnknownFields,!1);switch(l){case FI:sF(n,e);break;case AI:break;default:e[s]=l;break}break;case"scalar":try{let d=hT(n.T,t,n.L,!1);switch(d){case FI:sF(n,e);break;default:e[s]=d;break}}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${da(t)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}function Jde(e,t){if(e===Ee.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return hT(e,t,bo.BIGINT,!0).toString()}function hT(e,t,n,r){if(t===null)return r?Oo(e,n):FI;switch(e){case Ee.DOUBLE:case Ee.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==Ee.FLOAT&&NI(i),i;case Ee.INT32:case Ee.FIXED32:case Ee.SFIXED32:case Ee.SINT32:case Ee.UINT32:let s;if(typeof t=="number"?s=t:typeof t=="string"&&t.length>0&&t.trim().length===t.length&&(s=Number(t)),s===void 0)break;return e==Ee.UINT32||e==Ee.FIXED32?mT(s):Xp(s),s;case Ee.INT64:case Ee.SFIXED64:case Ee.SINT64:if(typeof t!="number"&&typeof t!="string")break;let o=Ir.parse(t);return n?o.toString():o;case Ee.FIXED64:case Ee.UINT64:if(typeof t!="number"&&typeof t!="string")break;let u=Ir.uParse(t);return n?u.toString():u;case Ee.BOOL:if(typeof t!="boolean")break;return t;case Ee.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch(l){throw new Error("invalid UTF8")}return t;case Ee.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return rF.dec(t)}throw new Error}function oF(e,t,n,r){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:r?e.values[0].no:FI;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 AI;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${da(t)}`)}function zde(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function cK(e,t,n){if(e.kind=="map"){Rn(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()]=RI(e.V.T,u);break;case"message":for(let[o,u]of i)r[o.toString()]=u.toJson(n);break;case"enum":let s=e.V.T;for(let[o,u]of i)r[o.toString()]=aF(s,u,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){Rn(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let i=0;i0?r:void 0}switch(e.kind){case"scalar":return RI(e.T,t);case"enum":return aF(e.T,t,n.enumAsInteger);case"message":return DI(e.T,t).toJson(n)}}function aF(e,t,n){var r;if(Rn(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 RI(e,t){switch(e){case Ee.INT32:case Ee.SFIXED32:case Ee.SINT32:case Ee.FIXED32:case Ee.UINT32:return Rn(typeof t=="number"),t;case Ee.FLOAT:case Ee.DOUBLE:return Rn(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case Ee.STRING:return Rn(typeof t=="string"),t;case Ee.BOOL:return Rn(typeof t=="boolean"),t;case Ee.UINT64:case Ee.FIXED64:case Ee.INT64:case Ee.SFIXED64:case Ee.SINT64:return Rn(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case Ee.BYTES:return Rn(t instanceof Uint8Array),rF.enc(t)}}m();T();h();var Zp=Symbol("@bufbuild/protobuf/unknown-fields"),dK={readUnknownFields:!0,readerFactory:e=>new _I(e)},pK={writeUnknownFields:!0,writerFactory:()=>new vI};function Hde(e){return e?Object.assign(Object.assign({},dK),e):dK}function Wde(e){return e?Object.assign(Object.assign({},pK),e):pK}function TK(){return{makeReadOptions:Hde,makeWriteOptions:Wde,listUnknownFields(e){var t;return(t=e[Zp])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[Zp]},writeUnknownFields(e,t){let r=e[Zp];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[Zp])||(i[Zp]=[]),i[Zp].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let s=e.getType(),o=i?t.len:t.pos+n,u,l;for(;t.pos0&&(l=Zde),s){let N=e[o];if(r==mr.LengthDelimited&&u!=Ee.STRING&&u!=Ee.BYTES){let b=t.uint32()+t.pos;for(;t.posSo(N,y)?N:new y(N));else{let N=o[i];y.fieldWrapper?y.typeName==="google.protobuf.BytesValue"?s[i]=yT(N):s[i]=N:s[i]=So(N,y)?N:new y(N)}break}}},equals(e,t,n){return t===n?!0:!t||!n?!1:e.fields.byMember().every(r=>{let i=t[r.localName],s=n[r.localName];if(r.repeated){if(i.length!==s.length)return!1;switch(r.kind){case"message":return i.every((o,u)=>r.T.equals(o,s[u]));case"scalar":return i.every((o,u)=>Xa(r.T,o,s[u]));case"enum":return i.every((o,u)=>Xa(Ee.INT32,o,s[u]))}throw new Error(`repeated cannot contain ${r.kind}`)}switch(r.kind){case"message":return r.T.equals(i,s);case"enum":return Xa(Ee.INT32,i,s);case"scalar":return Xa(r.T,i,s);case"oneof":if(i.case!==s.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,s.value);case"enum":return Xa(Ee.INT32,i.value,s.value);case"scalar":return Xa(o.T,i.value,s.value)}throw new Error(`oneof cannot contain ${o.kind}`);case"map":let u=Object.keys(i).concat(Object.keys(s));switch(r.V.kind){case"message":let l=r.V.T;return u.every(p=>l.equals(i[p],s[p]));case"enum":return u.every(p=>Xa(Ee.INT32,i[p],s[p]));case"scalar":let d=r.V.T;return u.every(p=>Xa(d,i[p],s[p]))}break}})},clone(e){let t=e.getType(),n=new t,r=n;for(let i of t.fields.byMember()){let s=e[i.localName],o;if(i.repeated)o=s.map(PI);else if(i.kind=="map"){o=r[i.localName];for(let[u,l]of Object.entries(s))o[u]=PI(l)}else i.kind=="oneof"?o=i.findField(s.case)?{case:s.case,value:PI(s.value)}:{case:void 0}:o=PI(s);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 PI(e){if(e===void 0)return e;if(So(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function yT(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function EK(e,t,n){return{syntax:e,json:lK(),bin:TK(),util:Object.assign(Object.assign({},NK()),{newFieldList:t,initFields:n}),makeMessageType(r,i,s){return zq(this,r,i,s)},makeEnum:Yq,makeEnumType:XR,getEnumType:Qq,makeExtension(r,i,s){return tK(this,r,i,s)}}}m();T();h();var kI=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();h();m();T();h();m();T();h();function uF(e,t){let n=vK(e);return t?n:spe(ipe(n))}function gK(e){return uF(e,!1)}var IK=vK;function vK(e){let t=!1,n=[];for(let r=0;r`${e}$`,ipe=e=>rpe.has(e)?_K(e):e,spe=e=>npe.has(e)?_K(e):e;var xI=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=gK(t)}addField(t){Rn(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 kI(e,t=>bK(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]=Oo(t.T,t.L);break;case"message":break}}});var ef;(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"})(ef||(ef={}));z.util.setEnumType(ef,"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"}]);var eu;(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"})(eu||(eu={}));z.util.setEnumType(eu,"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 tu;(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"})(tu||(tu={}));z.util.setEnumType(tu,"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"}]);m();T();h();var cF;(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"})(cF||(cF={}));z.util.setEnumType(cF,"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 ed;(function(e){e[e.OBJECT_FIELD=0]="OBJECT_FIELD",e[e.FIELD_ARGUMENT=1]="FIELD_ARGUMENT"})(ed||(ed={}));z.util.setEnumType(ed,"wg.cosmo.node.v1.ArgumentSource",[{no:0,name:"OBJECT_FIELD"},{no:1,name:"FIELD_ARGUMENT"}]);var Lc;(function(e){e[e.STATIC=0]="STATIC",e[e.GRAPHQL=1]="GRAPHQL",e[e.PUBSUB=2]="PUBSUB"})(Lc||(Lc={}));z.util.setEnumType(Lc,"wg.cosmo.node.v1.DataSourceKind",[{no:0,name:"STATIC"},{no:1,name:"GRAPHQL"},{no:2,name:"PUBSUB"}]);var qu;(function(e){e[e.PUBLISH=0]="PUBLISH",e[e.REQUEST=1]="REQUEST",e[e.SUBSCRIBE=2]="SUBSCRIBE"})(qu||(qu={}));z.util.setEnumType(qu,"wg.cosmo.node.v1.EventType",[{no:0,name:"PUBLISH"},{no:1,name:"REQUEST"},{no:2,name:"SUBSCRIBE"}]);var Pc;(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"})(Pc||(Pc={}));z.util.setEnumType(Pc,"wg.cosmo.node.v1.ConfigurationVariableKind",[{no:0,name:"STATIC_CONFIGURATION_VARIABLE"},{no:1,name:"ENV_CONFIGURATION_VARIABLE"},{no:2,name:"PLACEHOLDER_CONFIGURATION_VARIABLE"}]);var td;(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"})(td||(td={}));z.util.setEnumType(td,"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 nu=class nu extends ft{constructor(n){super();A(this,"id","");A(this,"name","");A(this,"routingUrl","");z.util.initPartial(n,this)}static fromBinary(n,r){return new nu().fromBinary(n,r)}static fromJson(n,r){return new nu().fromJson(n,r)}static fromJsonString(n,r){return new nu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(nu,n,r)}};A(nu,"runtime",z),A(nu,"typeName","wg.cosmo.node.v1.Subgraph"),A(nu,"fields",z.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 CI=nu,ru=class ru extends ft{constructor(n){super();A(this,"configByFeatureFlagName",{});z.util.initPartial(n,this)}static fromBinary(n,r){return new ru().fromBinary(n,r)}static fromJson(n,r){return new ru().fromJson(n,r)}static fromJsonString(n,r){return new ru().fromJsonString(n,r)}static equals(n,r){return z.util.equals(ru,n,r)}};A(ru,"runtime",z),A(ru,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs"),A(ru,"fields",z.util.newFieldList(()=>[{no:1,name:"config_by_feature_flag_name",kind:"map",K:9,V:{kind:"message",T:dF}}]));var lF=ru,iu=class iu extends ft{constructor(n){super();A(this,"engineConfig");A(this,"version","");A(this,"subgraphs",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new iu().fromBinary(n,r)}static fromJson(n,r){return new iu().fromJson(n,r)}static fromJsonString(n,r){return new iu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(iu,n,r)}};A(iu,"runtime",z),A(iu,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig"),A(iu,"fields",z.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:tf},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:CI,repeated:!0}]));var dF=iu,su=class su extends ft{constructor(n){super();A(this,"engineConfig");A(this,"version","");A(this,"subgraphs",[]);A(this,"featureFlagConfigs");z.util.initPartial(n,this)}static fromBinary(n,r){return new su().fromBinary(n,r)}static fromJson(n,r){return new su().fromJson(n,r)}static fromJsonString(n,r){return new su().fromJsonString(n,r)}static equals(n,r){return z.util.equals(su,n,r)}};A(su,"runtime",z),A(su,"typeName","wg.cosmo.node.v1.RouterConfig"),A(su,"fields",z.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:tf},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:CI,repeated:!0},{no:4,name:"feature_flag_configs",kind:"message",T:lF,opt:!0}]));var NT=su,ou=class ou extends ft{constructor(n){super();A(this,"code",ef.OK);A(this,"details");z.util.initPartial(n,this)}static fromBinary(n,r){return new ou().fromBinary(n,r)}static fromJson(n,r){return new ou().fromJson(n,r)}static fromJsonString(n,r){return new ou().fromJsonString(n,r)}static equals(n,r){return z.util.equals(ou,n,r)}};A(ou,"runtime",z),A(ou,"typeName","wg.cosmo.node.v1.Response"),A(ou,"fields",z.util.newFieldList(()=>[{no:1,name:"code",kind:"enum",T:z.getEnumType(ef)},{no:2,name:"details",kind:"scalar",T:9,opt:!0}]));var pF=ou,au=class au extends ft{constructor(n){super();A(this,"code",0);A(this,"message","");z.util.initPartial(n,this)}static fromBinary(n,r){return new au().fromBinary(n,r)}static fromJson(n,r){return new au().fromJson(n,r)}static fromJsonString(n,r){return new au().fromJsonString(n,r)}static equals(n,r){return z.util.equals(au,n,r)}};A(au,"runtime",z),A(au,"typeName","wg.cosmo.node.v1.ResponseStatus"),A(au,"fields",z.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}]));var OK=au,uu=class uu extends ft{constructor(n){super();A(this,"accountLimits");A(this,"graphPublicKey","");z.util.initPartial(n,this)}static fromBinary(n,r){return new uu().fromBinary(n,r)}static fromJson(n,r){return new uu().fromJson(n,r)}static fromJsonString(n,r){return new uu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(uu,n,r)}};A(uu,"runtime",z),A(uu,"typeName","wg.cosmo.node.v1.RegistrationInfo"),A(uu,"fields",z.util.newFieldList(()=>[{no:1,name:"account_limits",kind:"message",T:mF},{no:2,name:"graph_public_key",kind:"scalar",T:9}]));var fF=uu,cu=class cu extends ft{constructor(n){super();A(this,"traceSamplingRate",0);z.util.initPartial(n,this)}static fromBinary(n,r){return new cu().fromBinary(n,r)}static fromJson(n,r){return new cu().fromJson(n,r)}static fromJsonString(n,r){return new cu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(cu,n,r)}};A(cu,"runtime",z),A(cu,"typeName","wg.cosmo.node.v1.AccountLimits"),A(cu,"fields",z.util.newFieldList(()=>[{no:1,name:"trace_sampling_rate",kind:"scalar",T:2}]));var mF=cu,lu=class lu extends ft{constructor(t){super(),z.util.initPartial(t,this)}static fromBinary(t,n){return new lu().fromBinary(t,n)}static fromJson(t,n){return new lu().fromJson(t,n)}static fromJsonString(t,n){return new lu().fromJsonString(t,n)}static equals(t,n){return z.util.equals(lu,t,n)}};A(lu,"runtime",z),A(lu,"typeName","wg.cosmo.node.v1.SelfRegisterRequest"),A(lu,"fields",z.util.newFieldList(()=>[]));var SK=lu,du=class du extends ft{constructor(n){super();A(this,"response");A(this,"registrationInfo");z.util.initPartial(n,this)}static fromBinary(n,r){return new du().fromBinary(n,r)}static fromJson(n,r){return new du().fromJson(n,r)}static fromJsonString(n,r){return new du().fromJsonString(n,r)}static equals(n,r){return z.util.equals(du,n,r)}};A(du,"runtime",z),A(du,"typeName","wg.cosmo.node.v1.SelfRegisterResponse"),A(du,"fields",z.util.newFieldList(()=>[{no:1,name:"response",kind:"message",T:pF},{no:2,name:"registrationInfo",kind:"message",T:fF,opt:!0}]));var DK=du,pu=class pu extends ft{constructor(n){super();A(this,"defaultFlushInterval",Ir.zero);A(this,"datasourceConfigurations",[]);A(this,"fieldConfigurations",[]);A(this,"graphqlSchema","");A(this,"typeConfigurations",[]);A(this,"stringStorage",{});A(this,"graphqlClientSchema");z.util.initPartial(n,this)}static fromBinary(n,r){return new pu().fromBinary(n,r)}static fromJson(n,r){return new pu().fromJson(n,r)}static fromJsonString(n,r){return new pu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(pu,n,r)}};A(pu,"runtime",z),A(pu,"typeName","wg.cosmo.node.v1.EngineConfiguration"),A(pu,"fields",z.util.newFieldList(()=>[{no:1,name:"defaultFlushInterval",kind:"scalar",T:3},{no:2,name:"datasource_configurations",kind:"message",T:ET,repeated:!0},{no:3,name:"field_configurations",kind:"message",T:_T,repeated:!0},{no:4,name:"graphqlSchema",kind:"scalar",T:9},{no:5,name:"type_configurations",kind:"message",T:hF,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 tf=pu,fu=class fu extends ft{constructor(n){super();A(this,"kind",Lc.STATIC);A(this,"rootNodes",[]);A(this,"childNodes",[]);A(this,"overrideFieldPathFromAlias",!1);A(this,"customGraphql");A(this,"customStatic");A(this,"directives",[]);A(this,"requestTimeoutSeconds",Ir.zero);A(this,"id","");A(this,"keys",[]);A(this,"provides",[]);A(this,"requires",[]);A(this,"customEvents");A(this,"entityInterfaces",[]);A(this,"interfaceObjects",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new fu().fromBinary(n,r)}static fromJson(n,r){return new fu().fromJson(n,r)}static fromJsonString(n,r){return new fu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(fu,n,r)}};A(fu,"runtime",z),A(fu,"typeName","wg.cosmo.node.v1.DataSourceConfiguration"),A(fu,"fields",z.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:z.getEnumType(Lc)},{no:2,name:"root_nodes",kind:"message",T:nf,repeated:!0},{no:3,name:"child_nodes",kind:"message",T:nf,repeated:!0},{no:4,name:"override_field_path_from_alias",kind:"scalar",T:8},{no:5,name:"custom_graphql",kind:"message",T:ST},{no:6,name:"custom_static",kind:"message",T:yF},{no:7,name:"directives",kind:"message",T:NF,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:Zl,repeated:!0},{no:11,name:"provides",kind:"message",T:Zl,repeated:!0},{no:12,name:"requires",kind:"message",T:Zl,repeated:!0},{no:13,name:"custom_events",kind:"message",T:rd},{no:14,name:"entity_interfaces",kind:"message",T:rf,repeated:!0},{no:15,name:"interface_objects",kind:"message",T:rf,repeated:!0}]));var ET=fu,mu=class mu extends ft{constructor(n){super();A(this,"name","");A(this,"sourceType",ed.OBJECT_FIELD);z.util.initPartial(n,this)}static fromBinary(n,r){return new mu().fromBinary(n,r)}static fromJson(n,r){return new mu().fromJson(n,r)}static fromJsonString(n,r){return new mu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(mu,n,r)}};A(mu,"runtime",z),A(mu,"typeName","wg.cosmo.node.v1.ArgumentConfiguration"),A(mu,"fields",z.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source_type",kind:"enum",T:z.getEnumType(ed)}]));var gT=mu,hu=class hu extends ft{constructor(n){super();A(this,"requiredAndScopes",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new hu().fromBinary(n,r)}static fromJson(n,r){return new hu().fromJson(n,r)}static fromJsonString(n,r){return new hu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(hu,n,r)}};A(hu,"runtime",z),A(hu,"typeName","wg.cosmo.node.v1.Scopes"),A(hu,"fields",z.util.newFieldList(()=>[{no:1,name:"required_and_scopes",kind:"scalar",T:9,repeated:!0}]));var IT=hu,Tu=class Tu extends ft{constructor(n){super();A(this,"requiresAuthentication",!1);A(this,"requiredOrScopes",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new Tu().fromBinary(n,r)}static fromJson(n,r){return new Tu().fromJson(n,r)}static fromJsonString(n,r){return new Tu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Tu,n,r)}};A(Tu,"runtime",z),A(Tu,"typeName","wg.cosmo.node.v1.AuthorizationConfiguration"),A(Tu,"fields",z.util.newFieldList(()=>[{no:1,name:"requires_authentication",kind:"scalar",T:8},{no:2,name:"required_or_scopes",kind:"message",T:IT,repeated:!0}]));var vT=Tu,yu=class yu extends ft{constructor(n){super();A(this,"typeName","");A(this,"fieldName","");A(this,"argumentsConfiguration",[]);A(this,"authorizationConfiguration");A(this,"subscriptionFilterCondition");z.util.initPartial(n,this)}static fromBinary(n,r){return new yu().fromBinary(n,r)}static fromJson(n,r){return new yu().fromJson(n,r)}static fromJsonString(n,r){return new yu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(yu,n,r)}};A(yu,"runtime",z),A(yu,"typeName","wg.cosmo.node.v1.FieldConfiguration"),A(yu,"fields",z.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:gT,repeated:!0},{no:4,name:"authorization_configuration",kind:"message",T:vT},{no:5,name:"subscription_filter_condition",kind:"message",T:kc,opt:!0}]));var _T=yu,Nu=class Nu extends ft{constructor(n){super();A(this,"typeName","");A(this,"renameTo","");z.util.initPartial(n,this)}static fromBinary(n,r){return new Nu().fromBinary(n,r)}static fromJson(n,r){return new Nu().fromJson(n,r)}static fromJsonString(n,r){return new Nu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Nu,n,r)}};A(Nu,"runtime",z),A(Nu,"typeName","wg.cosmo.node.v1.TypeConfiguration"),A(Nu,"fields",z.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var hF=Nu,Eu=class Eu extends ft{constructor(n){super();A(this,"typeName","");A(this,"fieldNames",[]);A(this,"externalFieldNames",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new Eu().fromBinary(n,r)}static fromJson(n,r){return new Eu().fromJson(n,r)}static fromJsonString(n,r){return new Eu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Eu,n,r)}};A(Eu,"runtime",z),A(Eu,"typeName","wg.cosmo.node.v1.TypeField"),A(Eu,"fields",z.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}]));var nf=Eu,gu=class gu extends ft{constructor(n){super();A(this,"fieldName","");A(this,"typeName","");z.util.initPartial(n,this)}static fromBinary(n,r){return new gu().fromBinary(n,r)}static fromJson(n,r){return new gu().fromJson(n,r)}static fromJsonString(n,r){return new gu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(gu,n,r)}};A(gu,"runtime",z),A(gu,"typeName","wg.cosmo.node.v1.FieldCoordinates"),A(gu,"fields",z.util.newFieldList(()=>[{no:1,name:"field_name",kind:"scalar",T:9},{no:2,name:"type_name",kind:"scalar",T:9}]));var bT=gu,Iu=class Iu extends ft{constructor(n){super();A(this,"fieldCoordinatesPath",[]);A(this,"fieldPath",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new Iu().fromBinary(n,r)}static fromJson(n,r){return new Iu().fromJson(n,r)}static fromJsonString(n,r){return new Iu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Iu,n,r)}};A(Iu,"runtime",z),A(Iu,"typeName","wg.cosmo.node.v1.FieldSetCondition"),A(Iu,"fields",z.util.newFieldList(()=>[{no:1,name:"field_coordinates_path",kind:"message",T:bT,repeated:!0},{no:2,name:"field_path",kind:"scalar",T:9,repeated:!0}]));var OT=Iu,vu=class vu extends ft{constructor(n){super();A(this,"typeName","");A(this,"fieldName","");A(this,"selectionSet","");A(this,"disableEntityResolver",!1);A(this,"conditions",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new vu().fromBinary(n,r)}static fromJson(n,r){return new vu().fromJson(n,r)}static fromJsonString(n,r){return new vu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(vu,n,r)}};A(vu,"runtime",z),A(vu,"typeName","wg.cosmo.node.v1.RequiredField"),A(vu,"fields",z.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:OT,repeated:!0}]));var Zl=vu,_u=class _u extends ft{constructor(n){super();A(this,"interfaceTypeName","");A(this,"concreteTypeNames",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new _u().fromBinary(n,r)}static fromJson(n,r){return new _u().fromJson(n,r)}static fromJsonString(n,r){return new _u().fromJsonString(n,r)}static equals(n,r){return z.util.equals(_u,n,r)}};A(_u,"runtime",z),A(_u,"typeName","wg.cosmo.node.v1.EntityInterfaceConfiguration"),A(_u,"fields",z.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 rf=_u,bu=class bu extends ft{constructor(n){super();A(this,"url");A(this,"method",td.GET);A(this,"header",{});A(this,"body");A(this,"query",[]);A(this,"urlEncodeBody",!1);A(this,"mtls");A(this,"baseUrl");A(this,"path");A(this,"httpProxyUrl");z.util.initPartial(n,this)}static fromBinary(n,r){return new bu().fromBinary(n,r)}static fromJson(n,r){return new bu().fromJson(n,r)}static fromJsonString(n,r){return new bu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(bu,n,r)}};A(bu,"runtime",z),A(bu,"typeName","wg.cosmo.node.v1.FetchConfiguration"),A(bu,"fields",z.util.newFieldList(()=>[{no:1,name:"url",kind:"message",T:wi},{no:2,name:"method",kind:"enum",T:z.getEnumType(td)},{no:3,name:"header",kind:"map",K:9,V:{kind:"message",T:gF}},{no:4,name:"body",kind:"message",T:wi},{no:5,name:"query",kind:"message",T:EF,repeated:!0},{no:7,name:"url_encode_body",kind:"scalar",T:8},{no:8,name:"mtls",kind:"message",T:IF},{no:9,name:"base_url",kind:"message",T:wi},{no:10,name:"path",kind:"message",T:wi},{no:11,name:"http_proxy_url",kind:"message",T:wi,opt:!0}]));var TF=bu,Ou=class Ou extends ft{constructor(n){super();A(this,"statusCode",Ir.zero);A(this,"typeName","");A(this,"injectStatusCodeIntoBody",!1);z.util.initPartial(n,this)}static fromBinary(n,r){return new Ou().fromBinary(n,r)}static fromJson(n,r){return new Ou().fromJson(n,r)}static fromJsonString(n,r){return new Ou().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Ou,n,r)}};A(Ou,"runtime",z),A(Ou,"typeName","wg.cosmo.node.v1.StatusCodeTypeMapping"),A(Ou,"fields",z.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 AK=Ou,Su=class Su extends ft{constructor(n){super();A(this,"fetch");A(this,"subscription");A(this,"federation");A(this,"upstreamSchema");A(this,"customScalarTypeFields",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new Su().fromBinary(n,r)}static fromJson(n,r){return new Su().fromJson(n,r)}static fromJsonString(n,r){return new Su().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Su,n,r)}};A(Su,"runtime",z),A(Su,"typeName","wg.cosmo.node.v1.DataSourceCustom_GraphQL"),A(Su,"fields",z.util.newFieldList(()=>[{no:1,name:"fetch",kind:"message",T:TF},{no:2,name:"subscription",kind:"message",T:vF},{no:3,name:"federation",kind:"message",T:_F},{no:4,name:"upstream_schema",kind:"message",T:FT},{no:6,name:"custom_scalar_type_fields",kind:"message",T:bF,repeated:!0}]));var ST=Su,Du=class Du extends ft{constructor(n){super();A(this,"consumerName","");A(this,"streamName","");z.util.initPartial(n,this)}static fromBinary(n,r){return new Du().fromBinary(n,r)}static fromJson(n,r){return new Du().fromJson(n,r)}static fromJsonString(n,r){return new Du().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Du,n,r)}};A(Du,"runtime",z),A(Du,"typeName","wg.cosmo.node.v1.NatsStreamConfiguration"),A(Du,"fields",z.util.newFieldList(()=>[{no:1,name:"consumer_name",kind:"scalar",T:9},{no:2,name:"stream_name",kind:"scalar",T:9}]));var DT=Du,Au=class Au extends ft{constructor(n){super();A(this,"engineEventConfiguration");A(this,"subjects",[]);A(this,"streamConfiguration");z.util.initPartial(n,this)}static fromBinary(n,r){return new Au().fromBinary(n,r)}static fromJson(n,r){return new Au().fromJson(n,r)}static fromJsonString(n,r){return new Au().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Au,n,r)}};A(Au,"runtime",z),A(Au,"typeName","wg.cosmo.node.v1.NatsEventConfiguration"),A(Au,"fields",z.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:nd},{no:2,name:"subjects",kind:"scalar",T:9,repeated:!0},{no:3,name:"stream_configuration",kind:"message",T:DT}]));var AT=Au,Ru=class Ru extends ft{constructor(n){super();A(this,"engineEventConfiguration");A(this,"topics",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new Ru().fromBinary(n,r)}static fromJson(n,r){return new Ru().fromJson(n,r)}static fromJsonString(n,r){return new Ru().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Ru,n,r)}};A(Ru,"runtime",z),A(Ru,"typeName","wg.cosmo.node.v1.KafkaEventConfiguration"),A(Ru,"fields",z.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:nd},{no:2,name:"topics",kind:"scalar",T:9,repeated:!0}]));var RT=Ru,Fu=class Fu extends ft{constructor(n){super();A(this,"providerId","");A(this,"type",qu.PUBLISH);A(this,"typeName","");A(this,"fieldName","");z.util.initPartial(n,this)}static fromBinary(n,r){return new Fu().fromBinary(n,r)}static fromJson(n,r){return new Fu().fromJson(n,r)}static fromJsonString(n,r){return new Fu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Fu,n,r)}};A(Fu,"runtime",z),A(Fu,"typeName","wg.cosmo.node.v1.EngineEventConfiguration"),A(Fu,"fields",z.util.newFieldList(()=>[{no:1,name:"provider_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:z.getEnumType(qu)},{no:3,name:"type_name",kind:"scalar",T:9},{no:4,name:"field_name",kind:"scalar",T:9}]));var nd=Fu,wu=class wu extends ft{constructor(n){super();A(this,"nats",[]);A(this,"kafka",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new wu().fromBinary(n,r)}static fromJson(n,r){return new wu().fromJson(n,r)}static fromJsonString(n,r){return new wu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(wu,n,r)}};A(wu,"runtime",z),A(wu,"typeName","wg.cosmo.node.v1.DataSourceCustomEvents"),A(wu,"fields",z.util.newFieldList(()=>[{no:1,name:"nats",kind:"message",T:AT,repeated:!0},{no:2,name:"kafka",kind:"message",T:RT,repeated:!0}]));var rd=wu,Lu=class Lu extends ft{constructor(n){super();A(this,"data");z.util.initPartial(n,this)}static fromBinary(n,r){return new Lu().fromBinary(n,r)}static fromJson(n,r){return new Lu().fromJson(n,r)}static fromJsonString(n,r){return new Lu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Lu,n,r)}};A(Lu,"runtime",z),A(Lu,"typeName","wg.cosmo.node.v1.DataSourceCustom_Static"),A(Lu,"fields",z.util.newFieldList(()=>[{no:1,name:"data",kind:"message",T:wi}]));var yF=Lu,Pu=class Pu extends ft{constructor(n){super();A(this,"kind",Pc.STATIC_CONFIGURATION_VARIABLE);A(this,"staticVariableContent","");A(this,"environmentVariableName","");A(this,"environmentVariableDefaultValue","");A(this,"placeholderVariableName","");z.util.initPartial(n,this)}static fromBinary(n,r){return new Pu().fromBinary(n,r)}static fromJson(n,r){return new Pu().fromJson(n,r)}static fromJsonString(n,r){return new Pu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Pu,n,r)}};A(Pu,"runtime",z),A(Pu,"typeName","wg.cosmo.node.v1.ConfigurationVariable"),A(Pu,"fields",z.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:z.getEnumType(Pc)},{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 wi=Pu,ku=class ku extends ft{constructor(n){super();A(this,"directiveName","");A(this,"renameTo","");z.util.initPartial(n,this)}static fromBinary(n,r){return new ku().fromBinary(n,r)}static fromJson(n,r){return new ku().fromJson(n,r)}static fromJsonString(n,r){return new ku().fromJsonString(n,r)}static equals(n,r){return z.util.equals(ku,n,r)}};A(ku,"runtime",z),A(ku,"typeName","wg.cosmo.node.v1.DirectiveConfiguration"),A(ku,"fields",z.util.newFieldList(()=>[{no:1,name:"directive_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var NF=ku,xu=class xu extends ft{constructor(n){super();A(this,"name","");A(this,"value","");z.util.initPartial(n,this)}static fromBinary(n,r){return new xu().fromBinary(n,r)}static fromJson(n,r){return new xu().fromJson(n,r)}static fromJsonString(n,r){return new xu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(xu,n,r)}};A(xu,"runtime",z),A(xu,"typeName","wg.cosmo.node.v1.URLQueryConfiguration"),A(xu,"fields",z.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]));var EF=xu,Cu=class Cu extends ft{constructor(n){super();A(this,"values",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new Cu().fromBinary(n,r)}static fromJson(n,r){return new Cu().fromJson(n,r)}static fromJsonString(n,r){return new Cu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Cu,n,r)}};A(Cu,"runtime",z),A(Cu,"typeName","wg.cosmo.node.v1.HTTPHeader"),A(Cu,"fields",z.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:wi,repeated:!0}]));var gF=Cu,Uu=class Uu extends ft{constructor(n){super();A(this,"key");A(this,"cert");A(this,"insecureSkipVerify",!1);z.util.initPartial(n,this)}static fromBinary(n,r){return new Uu().fromBinary(n,r)}static fromJson(n,r){return new Uu().fromJson(n,r)}static fromJsonString(n,r){return new Uu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Uu,n,r)}};A(Uu,"runtime",z),A(Uu,"typeName","wg.cosmo.node.v1.MTLSConfiguration"),A(Uu,"fields",z.util.newFieldList(()=>[{no:1,name:"key",kind:"message",T:wi},{no:2,name:"cert",kind:"message",T:wi},{no:3,name:"insecureSkipVerify",kind:"scalar",T:8}]));var IF=Uu,Mu=class Mu extends ft{constructor(n){super();A(this,"enabled",!1);A(this,"url");A(this,"useSSE");A(this,"protocol");A(this,"websocketSubprotocol");z.util.initPartial(n,this)}static fromBinary(n,r){return new Mu().fromBinary(n,r)}static fromJson(n,r){return new Mu().fromJson(n,r)}static fromJsonString(n,r){return new Mu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Mu,n,r)}};A(Mu,"runtime",z),A(Mu,"typeName","wg.cosmo.node.v1.GraphQLSubscriptionConfiguration"),A(Mu,"fields",z.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"url",kind:"message",T:wi},{no:3,name:"useSSE",kind:"scalar",T:8,opt:!0},{no:4,name:"protocol",kind:"enum",T:z.getEnumType(eu),opt:!0},{no:5,name:"websocketSubprotocol",kind:"enum",T:z.getEnumType(tu),opt:!0}]));var vF=Mu,Bu=class Bu extends ft{constructor(n){super();A(this,"enabled",!1);A(this,"serviceSdl","");z.util.initPartial(n,this)}static fromBinary(n,r){return new Bu().fromBinary(n,r)}static fromJson(n,r){return new Bu().fromJson(n,r)}static fromJsonString(n,r){return new Bu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Bu,n,r)}};A(Bu,"runtime",z),A(Bu,"typeName","wg.cosmo.node.v1.GraphQLFederationConfiguration"),A(Bu,"fields",z.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"serviceSdl",kind:"scalar",T:9}]));var _F=Bu,Vu=class Vu extends ft{constructor(n){super();A(this,"key","");z.util.initPartial(n,this)}static fromBinary(n,r){return new Vu().fromBinary(n,r)}static fromJson(n,r){return new Vu().fromJson(n,r)}static fromJsonString(n,r){return new Vu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Vu,n,r)}};A(Vu,"runtime",z),A(Vu,"typeName","wg.cosmo.node.v1.InternedString"),A(Vu,"fields",z.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9}]));var FT=Vu,ju=class ju extends ft{constructor(n){super();A(this,"typeName","");A(this,"fieldName","");z.util.initPartial(n,this)}static fromBinary(n,r){return new ju().fromBinary(n,r)}static fromJson(n,r){return new ju().fromJson(n,r)}static fromJsonString(n,r){return new ju().fromJsonString(n,r)}static equals(n,r){return z.util.equals(ju,n,r)}};A(ju,"runtime",z),A(ju,"typeName","wg.cosmo.node.v1.SingleTypeField"),A(ju,"fields",z.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9}]));var bF=ju,$u=class $u extends ft{constructor(n){super();A(this,"fieldPath",[]);A(this,"json","");z.util.initPartial(n,this)}static fromBinary(n,r){return new $u().fromBinary(n,r)}static fromJson(n,r){return new $u().fromJson(n,r)}static fromJsonString(n,r){return new $u().fromJsonString(n,r)}static equals(n,r){return z.util.equals($u,n,r)}};A($u,"runtime",z),A($u,"typeName","wg.cosmo.node.v1.SubscriptionFieldCondition"),A($u,"fields",z.util.newFieldList(()=>[{no:1,name:"field_path",kind:"scalar",T:9,repeated:!0},{no:2,name:"json",kind:"scalar",T:9}]));var wT=$u,Zs=class Zs extends ft{constructor(n){super();A(this,"and",[]);A(this,"in");A(this,"not");A(this,"or",[]);z.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 z.util.equals(Zs,n,r)}};A(Zs,"runtime",z),A(Zs,"typeName","wg.cosmo.node.v1.SubscriptionFilterCondition"),A(Zs,"fields",z.util.newFieldList(()=>[{no:1,name:"and",kind:"message",T:Zs,repeated:!0},{no:2,name:"in",kind:"message",T:wT,opt:!0},{no:3,name:"not",kind:"message",T:Zs,opt:!0},{no:4,name:"or",kind:"message",T:Zs,repeated:!0}]));var kc=Zs;m();T();h();var MI=Xv(dI(),1);function ope(e){if(!e.conditions)return;let t=[];for(let n of e.conditions){let r=[];for(let i of n.fieldCoordinatesPath){let s=i.split(".");if(s.length!==2)throw new Error(`fatal: malformed conditional field coordinates "${i}" for field set "${e.selectionSet}".`);r.push(new bT({fieldName:s[1],typeName:s[0]}))}t.push(new OT({fieldCoordinatesPath:r,fieldPath:n.fieldPath}))}return t}function OF(e,t,n){if(e)for(let r of e){let i=ope(r);t.push(new Zl(k(k({typeName:n,fieldName:r.fieldName,selectionSet:r.selectionSet},r.disableEntityResolver?{disableEntityResolver:!0}:{}),i?{conditions:i}:{})))}}function RK(e){switch(e){case"publish":return qu.PUBLISH;case"request":return qu.REQUEST;case"subscribe":return qu.SUBSCRIBE}}function FK(e){var n;let t={rootNodes:[],childNodes:[],keys:[],provides:[],events:new rd({nats:[],kafka:[]}),requires:[],entityInterfaces:[],interfaceObjects:[]};for(let r of e.values()){let i=r.typeName,s=[...r.fieldNames],o=new nf({typeName:i,fieldNames:s});if(r.externalFieldNames&&r.externalFieldNames.size>0&&(o.externalFieldNames=[...r.externalFieldNames]),r.isRootNode?t.rootNodes.push(o):t.childNodes.push(o),r.entityInterfaceConcreteTypeNames){let d=new rf({interfaceTypeName:i,concreteTypeNames:[...r.entityInterfaceConcreteTypeNames]});r.isInterfaceObject?t.interfaceObjects.push(d):t.entityInterfaces.push(d)}OF(r.keys,t.keys,i),OF(r.provides,t.provides,i),OF(r.requires,t.requires,i);let u=[],l=[];for(let d of(n=r.events)!=null?n:[])switch(d.providerType){case MI.PROVIDER_TYPE_KAFKA:{l.push(new RT({engineEventConfiguration:new nd({fieldName:d.fieldName,providerId:d.providerId,type:RK(d.type),typeName:i}),topics:d.topics}));break}case MI.PROVIDER_TYPE_NATS:{u.push(new AT(k({engineEventConfiguration:new nd({fieldName:d.fieldName,providerId:d.providerId,type:RK(d.type),typeName:i}),subjects:d.subjects},d.streamConfiguration?{streamConfiguration:new DT({consumerName:d.streamConfiguration.consumerName,streamName:d.streamConfiguration.streamName})}:{})));break}default:throw new Error("Fatal: Unknown event provider.")}t.events.nats.push(...u),t.events.kafka.push(...l)}return t}function wK(e){var n;let t=[];for(let r of e){let i=r.argumentNames.map(l=>new gT({name:l,sourceType:ed.FIELD_ARGUMENT})),s=new _T({argumentsConfiguration:i,fieldName:r.fieldName,typeName:r.typeName}),o=((n=r.requiredScopes)==null?void 0:n.map(l=>new IT({requiredAndScopes:l})))||[],u=o.length>0;if((r.requiresAuthentication||u)&&(s.authorizationConfiguration=new vT({requiresAuthentication:r.requiresAuthentication||u,requiredOrScopes:o})),r.subscriptionFilterCondition){let l=new kc;UI(l,r.subscriptionFilterCondition),s.subscriptionFilterCondition=l}t.push(s)}return t}function UI(e,t){if(t.and!==void 0){let n=[];for(let r of t.and){let i=new kc;UI(i,r),n.push(i)}e.and=n;return}if(t.in!==void 0){e.in=new wT({fieldPath:t.in.fieldPath,json:JSON.stringify(t.in.values)});return}if(t.not!==void 0){e.not=new kc,UI(e.not,t.not);return}if(t.or!==void 0){let n=[];for(let r of t.or){let i=new kc;UI(i,r),n.push(i)}e.or=n;return}throw new Error("Fatal: Incoming SubscriptionCondition object was malformed.")}m();T();h();function SF(e){return new Error(`Normalization failed to return a ${e}.`)}var ape=(e,t)=>{let n=stringHash(t);return e.stringStorage[n]=t,new FT({key:n})},upe=e=>{switch(e){case"ws":return eu.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS;case"sse":return eu.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE;case"sse_post":return eu.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST}throw new Error(`Unsupported subscription protocol '${e}'`)},cpe=e=>{switch(e){case"auto":return tu.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO;case"graphql-ws":return tu.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS;case"graphql-transport-ws":return tu.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS}throw new Error(`Unsupported websocket subprotocol '${e}'`)},PK=function(e){let t=new tf({defaultFlushInterval:BigInt(500),datasourceConfigurations:[],fieldConfigurations:[],graphqlSchema:"",stringStorage:{},typeConfigurations:[]});for(let n of e.subgraphs){if(!n.configurationDataByTypeName)throw SF("ConfigurationDataByTypeName");if(!n.schema)throw SF("GraphQLSchema");let r=ape(t,$q(jm(n.schema))),{childNodes:i,entityInterfaces:s,events:o,interfaceObjects:u,keys:l,provides:d,requires:p,rootNodes:y}=FK(n.configurationDataByTypeName),N=upe(n.subscriptionProtocol||"ws"),I=cpe(n.websocketSubprotocol||"auto"),b,x,j;if(o.kafka.length>0||o.nats.length>0){b=Lc.PUBSUB,j=new rd({kafka:o.kafka,nats:o.nats});let re=ye=>LK.ROOT_TYPE_NAMES.has(ye.typeName),se=0,pe=0;for(;se({id:n.id,name:n.name,routingUrl:n.url}))})};m();T();h();we();function kK(e){let t;try{t=io(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 lpe(e){let{federationResult:t,errors:n}=(0,DF.federateSubgraphs)(e.map(kK));if(n&&n.length>0)throw new Error(`could not federate schema: ${n.map(r=>r.message).join(", ")}`);return{fieldConfigurations:t.fieldConfigurations,sdl:Ft(t.federatedGraphAST)}}function dpe(e){let t=(0,DF.federateSubgraphs)(e.map(kK));if(t.errors&&t.errors.length>0)throw new Error(`could not federate schema: ${t.errors.map(r=>r.message).join(", ")}`);if(t.federationResult===void 0)throw new Error("could not federate subgraphs");return PK({federatedClientSDL:Hd(t.federationResult.federatedGraphClientSchema),federatedSDL:Hd(t.federationResult.federatedGraphSchema),fieldConfigurations:t.federationResult.fieldConfigurations,schemaVersionId:"",subgraphs:e.map((r,i)=>{var l,d;let s=t.federationResult.subgraphConfigBySubgraphName.get(r.name),o=s==null?void 0:s.schema,u=s==null?void 0:s.configurationDataByTypeName;return{id:`${i}`,name:r.name,url:JR(r.url),sdl:r.schema,subscriptionUrl:JR((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 Me(ppe);})(); +`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:o=s,i=1;break;case 1:n[r++]=o<<2|(s&48)>>4,o=s,i=2;break;case 2:n[r++]=(o&15)<<4|(s&60)>>2,o=s,i=3;break;case 3:n[r++]=(o&3)<<6|s,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 s=0;s>2],i=(r&3)<<4,n=1;break;case 1:t+=Za[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=Za[i|r>>6],t+=Za[r&63],n=0;break}return n&&(t+=Za[i],t+="=",n==1&&(t+="=")),t}};m();T();h();function rK(e,t,n){sK(t,e);let r=t.runtime.bin.makeReadOptions(n),i=nK(e.getType().runtime.bin.listUnknownFields(e),t.field),[s,o]=bI(t);for(let u of i)t.runtime.bin.readField(s,r.readerFactory(u.data),t.field,u.wireType,r);return o()}function iK(e,t,n,r){sK(t,e);let i=t.runtime.bin.makeReadOptions(r),s=t.runtime.bin.makeWriteOptions(r);if(iF(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=s.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,s);let l=i.readerFactory(o.finish());for(;l.posr.no==t.field.no)}function sK(e,t){Rn(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}m();T();h();function SI(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:!II(e.T,t[n]);case"message":return t[n]!==void 0;case"map":return Object.keys(t[n]).length>0}}function sF(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?Oo(e.T,e.L):void 0;break;case"message":t[n]=void 0;break}}m();T();h();m();T();h();function So(e,t){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(ft.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 DI(e,t){return So(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}var s3e={"google.protobuf.DoubleValue":Ee.DOUBLE,"google.protobuf.FloatValue":Ee.FLOAT,"google.protobuf.Int64Value":Ee.INT64,"google.protobuf.UInt64Value":Ee.UINT64,"google.protobuf.Int32Value":Ee.INT32,"google.protobuf.UInt32Value":Ee.UINT32,"google.protobuf.BoolValue":Ee.BOOL,"google.protobuf.StringValue":Ee.STRING,"google.protobuf.BytesValue":Ee.BYTES};var oK={ignoreUnknownFields:!1},aK={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function Qde(e){return e?Object.assign(Object.assign({},oK),e):oK}function Yde(e){return e?Object.assign(Object.assign({},aK),e):aK}var FI=Symbol(),AI=Symbol();function lK(){return{makeReadOptions:Qde,makeWriteOptions:Yde,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.typeName} from JSON: ${da(t)}`);r=r!=null?r:new e;let i=new Map,s=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)}uK(r,u,l,n,e)}else{let d=!1;if(s!=null&&s.findExtension&&o.startsWith("[")&&o.endsWith("]")){let p=s.findExtension(o.substring(1,o.length-1));if(p&&p.extendee.typeName==e.typeName){d=!0;let[y,N]=bI(p);uK(y,u,p.field,n,p),iK(r,p,N(),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(!SI(i,e)){if(i.req)throw"required field not set";if(!t.emitDefaultValues||!zde(i))continue}let o=i.oneof?e[i.oneof.localName].value:e[i.localName],u=cK(i,o,t);u!==void 0&&(r[t.useProtoFieldName?i.name:i.jsonName]=u)}let s=t.typeRegistry;if(s!=null&&s.findExtensionFor)for(let o of n.runtime.bin.listUnknownFields(e)){let u=s.findExtensionFor(n.typeName,o.no);if(u&&iF(e,u)){let l=rK(e,u,t),d=cK(u.field,l,t);d!==void 0&&(r[u.field.jsonName]=d)}}}catch(s){let o=i?`cannot encode field ${n.typeName}.${i.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,u=s instanceof Error?s.message:String(s);throw new Error(o+(u.length>0?`: ${u}`:""))}return r},readScalar(e,t,n){return hT(e,t,n!=null?n:bo.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||II(e,t)))return RI(e,t)},debug:da}}function da(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 uK(e,t,n,r,i){let s=n.localName;if(n.repeated){if(Rn(n.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${da(t)}`);let o=e[s];for(let u of t){if(u===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${da(u)}`);switch(n.kind){case"message":o.push(n.T.fromJson(u,r));break;case"enum":let l=oF(n.T,u,r.ignoreUnknownFields,!0);l!==AI&&o.push(l);break;case"scalar":try{o.push(hT(n.T,u,n.L,!0))}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${da(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: ${da(t)}`);let o=e[s];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=Jde(n.K,u)}catch(p){let y=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${da(t)}`;throw p instanceof Error&&p.message.length>0&&(y+=`: ${p.message}`),new Error(y)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(l,r);break;case"enum":let p=oF(n.V.T,l,r.ignoreUnknownFields,!0);p!==AI&&(o[d]=p);break;case"scalar":try{o[d]=hT(n.V.T,l,bo.BIGINT,!0)}catch(y){let N=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${da(t)}`;throw y instanceof Error&&y.message.length>0&&(N+=`: ${y.message}`),new Error(N)}break}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:s},s="value"),n.kind){case"message":let o=n.T;if(t===null&&o.typeName!="google.protobuf.Value")return;let u=e[s];So(u)?u.fromJson(t,r):(e[s]=u=o.fromJson(t,r),o.fieldWrapper&&!n.oneof&&(e[s]=o.fieldWrapper.unwrapField(u)));break;case"enum":let l=oF(n.T,t,r.ignoreUnknownFields,!1);switch(l){case FI:sF(n,e);break;case AI:break;default:e[s]=l;break}break;case"scalar":try{let d=hT(n.T,t,n.L,!1);switch(d){case FI:sF(n,e);break;default:e[s]=d;break}}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${da(t)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}function Jde(e,t){if(e===Ee.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return hT(e,t,bo.BIGINT,!0).toString()}function hT(e,t,n,r){if(t===null)return r?Oo(e,n):FI;switch(e){case Ee.DOUBLE:case Ee.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==Ee.FLOAT&&NI(i),i;case Ee.INT32:case Ee.FIXED32:case Ee.SFIXED32:case Ee.SINT32:case Ee.UINT32:let s;if(typeof t=="number"?s=t:typeof t=="string"&&t.length>0&&t.trim().length===t.length&&(s=Number(t)),s===void 0)break;return e==Ee.UINT32||e==Ee.FIXED32?mT(s):Xp(s),s;case Ee.INT64:case Ee.SFIXED64:case Ee.SINT64:if(typeof t!="number"&&typeof t!="string")break;let o=Ir.parse(t);return n?o.toString():o;case Ee.FIXED64:case Ee.UINT64:if(typeof t!="number"&&typeof t!="string")break;let u=Ir.uParse(t);return n?u.toString():u;case Ee.BOOL:if(typeof t!="boolean")break;return t;case Ee.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch(l){throw new Error("invalid UTF8")}return t;case Ee.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return rF.dec(t)}throw new Error}function oF(e,t,n,r){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:r?e.values[0].no:FI;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 AI;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${da(t)}`)}function zde(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function cK(e,t,n){if(e.kind=="map"){Rn(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()]=RI(e.V.T,u);break;case"message":for(let[o,u]of i)r[o.toString()]=u.toJson(n);break;case"enum":let s=e.V.T;for(let[o,u]of i)r[o.toString()]=aF(s,u,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){Rn(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let i=0;i0?r:void 0}switch(e.kind){case"scalar":return RI(e.T,t);case"enum":return aF(e.T,t,n.enumAsInteger);case"message":return DI(e.T,t).toJson(n)}}function aF(e,t,n){var r;if(Rn(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 RI(e,t){switch(e){case Ee.INT32:case Ee.SFIXED32:case Ee.SINT32:case Ee.FIXED32:case Ee.UINT32:return Rn(typeof t=="number"),t;case Ee.FLOAT:case Ee.DOUBLE:return Rn(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case Ee.STRING:return Rn(typeof t=="string"),t;case Ee.BOOL:return Rn(typeof t=="boolean"),t;case Ee.UINT64:case Ee.FIXED64:case Ee.INT64:case Ee.SFIXED64:case Ee.SINT64:return Rn(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case Ee.BYTES:return Rn(t instanceof Uint8Array),rF.enc(t)}}m();T();h();var Zp=Symbol("@bufbuild/protobuf/unknown-fields"),dK={readUnknownFields:!0,readerFactory:e=>new _I(e)},pK={writeUnknownFields:!0,writerFactory:()=>new vI};function Hde(e){return e?Object.assign(Object.assign({},dK),e):dK}function Wde(e){return e?Object.assign(Object.assign({},pK),e):pK}function TK(){return{makeReadOptions:Hde,makeWriteOptions:Wde,listUnknownFields(e){var t;return(t=e[Zp])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[Zp]},writeUnknownFields(e,t){let r=e[Zp];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[Zp])||(i[Zp]=[]),i[Zp].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let s=e.getType(),o=i?t.len:t.pos+n,u,l;for(;t.pos0&&(l=Zde),s){let N=e[o];if(r==mr.LengthDelimited&&u!=Ee.STRING&&u!=Ee.BYTES){let _=t.uint32()+t.pos;for(;t.pos<_;)N.push(l(t,u))}else N.push(l(t,u))}else e[o]=l(t,u);break;case"message":let d=n.T;s?e[o].push(wI(t,new d,i,n)):So(e[o])?wI(t,e[o],i,n):(e[o]=wI(t,new d,i,n),d.fieldWrapper&&!n.oneof&&!n.repeated&&(e[o]=d.fieldWrapper.unwrapField(e[o])));break;case"map":let[p,y]=Xde(n,t,i);e[o][p]=y;break}}function wI(e,t,n,r){let i=t.getType().runtime.bin,s=r==null?void 0:r.delimited;return i.readMessage(t,e,s?r.no:e.uint32(),n,s),t}function Xde(e,t,n){let r=t.uint32(),i=t.pos+r,s,o;for(;t.posSo(N,y)?N:new y(N));else{let N=o[i];y.fieldWrapper?y.typeName==="google.protobuf.BytesValue"?s[i]=yT(N):s[i]=N:s[i]=So(N,y)?N:new y(N)}break}}},equals(e,t,n){return t===n?!0:!t||!n?!1:e.fields.byMember().every(r=>{let i=t[r.localName],s=n[r.localName];if(r.repeated){if(i.length!==s.length)return!1;switch(r.kind){case"message":return i.every((o,u)=>r.T.equals(o,s[u]));case"scalar":return i.every((o,u)=>Xa(r.T,o,s[u]));case"enum":return i.every((o,u)=>Xa(Ee.INT32,o,s[u]))}throw new Error(`repeated cannot contain ${r.kind}`)}switch(r.kind){case"message":return r.T.equals(i,s);case"enum":return Xa(Ee.INT32,i,s);case"scalar":return Xa(r.T,i,s);case"oneof":if(i.case!==s.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,s.value);case"enum":return Xa(Ee.INT32,i.value,s.value);case"scalar":return Xa(o.T,i.value,s.value)}throw new Error(`oneof cannot contain ${o.kind}`);case"map":let u=Object.keys(i).concat(Object.keys(s));switch(r.V.kind){case"message":let l=r.V.T;return u.every(p=>l.equals(i[p],s[p]));case"enum":return u.every(p=>Xa(Ee.INT32,i[p],s[p]));case"scalar":let d=r.V.T;return u.every(p=>Xa(d,i[p],s[p]))}break}})},clone(e){let t=e.getType(),n=new t,r=n;for(let i of t.fields.byMember()){let s=e[i.localName],o;if(i.repeated)o=s.map(PI);else if(i.kind=="map"){o=r[i.localName];for(let[u,l]of Object.entries(s))o[u]=PI(l)}else i.kind=="oneof"?o=i.findField(s.case)?{case:s.case,value:PI(s.value)}:{case:void 0}:o=PI(s);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 PI(e){if(e===void 0)return e;if(So(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function yT(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function EK(e,t,n){return{syntax:e,json:lK(),bin:TK(),util:Object.assign(Object.assign({},NK()),{newFieldList:t,initFields:n}),makeMessageType(r,i,s){return zq(this,r,i,s)},makeEnum:Yq,makeEnumType:XR,getEnumType:Qq,makeExtension(r,i,s){return tK(this,r,i,s)}}}m();T();h();var kI=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();h();m();T();h();m();T();h();function uF(e,t){let n=vK(e);return t?n:spe(ipe(n))}function gK(e){return uF(e,!1)}var IK=vK;function vK(e){let t=!1,n=[];for(let r=0;r`${e}$`,ipe=e=>rpe.has(e)?_K(e):e,spe=e=>npe.has(e)?_K(e):e;var xI=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=gK(t)}addField(t){Rn(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 kI(e,t=>bK(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]=Oo(t.T,t.L);break;case"message":break}}});var ef;(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"})(ef||(ef={}));z.util.setEnumType(ef,"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"}]);var eu;(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"})(eu||(eu={}));z.util.setEnumType(eu,"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 tu;(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"})(tu||(tu={}));z.util.setEnumType(tu,"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"}]);m();T();h();var cF;(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"})(cF||(cF={}));z.util.setEnumType(cF,"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 ed;(function(e){e[e.OBJECT_FIELD=0]="OBJECT_FIELD",e[e.FIELD_ARGUMENT=1]="FIELD_ARGUMENT"})(ed||(ed={}));z.util.setEnumType(ed,"wg.cosmo.node.v1.ArgumentSource",[{no:0,name:"OBJECT_FIELD"},{no:1,name:"FIELD_ARGUMENT"}]);var Lc;(function(e){e[e.STATIC=0]="STATIC",e[e.GRAPHQL=1]="GRAPHQL",e[e.PUBSUB=2]="PUBSUB"})(Lc||(Lc={}));z.util.setEnumType(Lc,"wg.cosmo.node.v1.DataSourceKind",[{no:0,name:"STATIC"},{no:1,name:"GRAPHQL"},{no:2,name:"PUBSUB"}]);var qu;(function(e){e[e.PUBLISH=0]="PUBLISH",e[e.REQUEST=1]="REQUEST",e[e.SUBSCRIBE=2]="SUBSCRIBE"})(qu||(qu={}));z.util.setEnumType(qu,"wg.cosmo.node.v1.EventType",[{no:0,name:"PUBLISH"},{no:1,name:"REQUEST"},{no:2,name:"SUBSCRIBE"}]);var Pc;(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"})(Pc||(Pc={}));z.util.setEnumType(Pc,"wg.cosmo.node.v1.ConfigurationVariableKind",[{no:0,name:"STATIC_CONFIGURATION_VARIABLE"},{no:1,name:"ENV_CONFIGURATION_VARIABLE"},{no:2,name:"PLACEHOLDER_CONFIGURATION_VARIABLE"}]);var td;(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"})(td||(td={}));z.util.setEnumType(td,"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 nu=class nu extends ft{constructor(n){super();A(this,"id","");A(this,"name","");A(this,"routingUrl","");z.util.initPartial(n,this)}static fromBinary(n,r){return new nu().fromBinary(n,r)}static fromJson(n,r){return new nu().fromJson(n,r)}static fromJsonString(n,r){return new nu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(nu,n,r)}};A(nu,"runtime",z),A(nu,"typeName","wg.cosmo.node.v1.Subgraph"),A(nu,"fields",z.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 CI=nu,ru=class ru extends ft{constructor(n){super();A(this,"configByFeatureFlagName",{});z.util.initPartial(n,this)}static fromBinary(n,r){return new ru().fromBinary(n,r)}static fromJson(n,r){return new ru().fromJson(n,r)}static fromJsonString(n,r){return new ru().fromJsonString(n,r)}static equals(n,r){return z.util.equals(ru,n,r)}};A(ru,"runtime",z),A(ru,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs"),A(ru,"fields",z.util.newFieldList(()=>[{no:1,name:"config_by_feature_flag_name",kind:"map",K:9,V:{kind:"message",T:dF}}]));var lF=ru,iu=class iu extends ft{constructor(n){super();A(this,"engineConfig");A(this,"version","");A(this,"subgraphs",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new iu().fromBinary(n,r)}static fromJson(n,r){return new iu().fromJson(n,r)}static fromJsonString(n,r){return new iu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(iu,n,r)}};A(iu,"runtime",z),A(iu,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig"),A(iu,"fields",z.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:tf},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:CI,repeated:!0}]));var dF=iu,su=class su extends ft{constructor(n){super();A(this,"engineConfig");A(this,"version","");A(this,"subgraphs",[]);A(this,"featureFlagConfigs");z.util.initPartial(n,this)}static fromBinary(n,r){return new su().fromBinary(n,r)}static fromJson(n,r){return new su().fromJson(n,r)}static fromJsonString(n,r){return new su().fromJsonString(n,r)}static equals(n,r){return z.util.equals(su,n,r)}};A(su,"runtime",z),A(su,"typeName","wg.cosmo.node.v1.RouterConfig"),A(su,"fields",z.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:tf},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:CI,repeated:!0},{no:4,name:"feature_flag_configs",kind:"message",T:lF,opt:!0}]));var NT=su,ou=class ou extends ft{constructor(n){super();A(this,"code",ef.OK);A(this,"details");z.util.initPartial(n,this)}static fromBinary(n,r){return new ou().fromBinary(n,r)}static fromJson(n,r){return new ou().fromJson(n,r)}static fromJsonString(n,r){return new ou().fromJsonString(n,r)}static equals(n,r){return z.util.equals(ou,n,r)}};A(ou,"runtime",z),A(ou,"typeName","wg.cosmo.node.v1.Response"),A(ou,"fields",z.util.newFieldList(()=>[{no:1,name:"code",kind:"enum",T:z.getEnumType(ef)},{no:2,name:"details",kind:"scalar",T:9,opt:!0}]));var pF=ou,au=class au extends ft{constructor(n){super();A(this,"code",0);A(this,"message","");z.util.initPartial(n,this)}static fromBinary(n,r){return new au().fromBinary(n,r)}static fromJson(n,r){return new au().fromJson(n,r)}static fromJsonString(n,r){return new au().fromJsonString(n,r)}static equals(n,r){return z.util.equals(au,n,r)}};A(au,"runtime",z),A(au,"typeName","wg.cosmo.node.v1.ResponseStatus"),A(au,"fields",z.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}]));var OK=au,uu=class uu extends ft{constructor(n){super();A(this,"accountLimits");A(this,"graphPublicKey","");z.util.initPartial(n,this)}static fromBinary(n,r){return new uu().fromBinary(n,r)}static fromJson(n,r){return new uu().fromJson(n,r)}static fromJsonString(n,r){return new uu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(uu,n,r)}};A(uu,"runtime",z),A(uu,"typeName","wg.cosmo.node.v1.RegistrationInfo"),A(uu,"fields",z.util.newFieldList(()=>[{no:1,name:"account_limits",kind:"message",T:mF},{no:2,name:"graph_public_key",kind:"scalar",T:9}]));var fF=uu,cu=class cu extends ft{constructor(n){super();A(this,"traceSamplingRate",0);z.util.initPartial(n,this)}static fromBinary(n,r){return new cu().fromBinary(n,r)}static fromJson(n,r){return new cu().fromJson(n,r)}static fromJsonString(n,r){return new cu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(cu,n,r)}};A(cu,"runtime",z),A(cu,"typeName","wg.cosmo.node.v1.AccountLimits"),A(cu,"fields",z.util.newFieldList(()=>[{no:1,name:"trace_sampling_rate",kind:"scalar",T:2}]));var mF=cu,lu=class lu extends ft{constructor(t){super(),z.util.initPartial(t,this)}static fromBinary(t,n){return new lu().fromBinary(t,n)}static fromJson(t,n){return new lu().fromJson(t,n)}static fromJsonString(t,n){return new lu().fromJsonString(t,n)}static equals(t,n){return z.util.equals(lu,t,n)}};A(lu,"runtime",z),A(lu,"typeName","wg.cosmo.node.v1.SelfRegisterRequest"),A(lu,"fields",z.util.newFieldList(()=>[]));var SK=lu,du=class du extends ft{constructor(n){super();A(this,"response");A(this,"registrationInfo");z.util.initPartial(n,this)}static fromBinary(n,r){return new du().fromBinary(n,r)}static fromJson(n,r){return new du().fromJson(n,r)}static fromJsonString(n,r){return new du().fromJsonString(n,r)}static equals(n,r){return z.util.equals(du,n,r)}};A(du,"runtime",z),A(du,"typeName","wg.cosmo.node.v1.SelfRegisterResponse"),A(du,"fields",z.util.newFieldList(()=>[{no:1,name:"response",kind:"message",T:pF},{no:2,name:"registrationInfo",kind:"message",T:fF,opt:!0}]));var DK=du,pu=class pu extends ft{constructor(n){super();A(this,"defaultFlushInterval",Ir.zero);A(this,"datasourceConfigurations",[]);A(this,"fieldConfigurations",[]);A(this,"graphqlSchema","");A(this,"typeConfigurations",[]);A(this,"stringStorage",{});A(this,"graphqlClientSchema");z.util.initPartial(n,this)}static fromBinary(n,r){return new pu().fromBinary(n,r)}static fromJson(n,r){return new pu().fromJson(n,r)}static fromJsonString(n,r){return new pu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(pu,n,r)}};A(pu,"runtime",z),A(pu,"typeName","wg.cosmo.node.v1.EngineConfiguration"),A(pu,"fields",z.util.newFieldList(()=>[{no:1,name:"defaultFlushInterval",kind:"scalar",T:3},{no:2,name:"datasource_configurations",kind:"message",T:ET,repeated:!0},{no:3,name:"field_configurations",kind:"message",T:_T,repeated:!0},{no:4,name:"graphqlSchema",kind:"scalar",T:9},{no:5,name:"type_configurations",kind:"message",T:hF,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 tf=pu,fu=class fu extends ft{constructor(n){super();A(this,"kind",Lc.STATIC);A(this,"rootNodes",[]);A(this,"childNodes",[]);A(this,"overrideFieldPathFromAlias",!1);A(this,"customGraphql");A(this,"customStatic");A(this,"directives",[]);A(this,"requestTimeoutSeconds",Ir.zero);A(this,"id","");A(this,"keys",[]);A(this,"provides",[]);A(this,"requires",[]);A(this,"customEvents");A(this,"entityInterfaces",[]);A(this,"interfaceObjects",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new fu().fromBinary(n,r)}static fromJson(n,r){return new fu().fromJson(n,r)}static fromJsonString(n,r){return new fu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(fu,n,r)}};A(fu,"runtime",z),A(fu,"typeName","wg.cosmo.node.v1.DataSourceConfiguration"),A(fu,"fields",z.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:z.getEnumType(Lc)},{no:2,name:"root_nodes",kind:"message",T:nf,repeated:!0},{no:3,name:"child_nodes",kind:"message",T:nf,repeated:!0},{no:4,name:"override_field_path_from_alias",kind:"scalar",T:8},{no:5,name:"custom_graphql",kind:"message",T:ST},{no:6,name:"custom_static",kind:"message",T:yF},{no:7,name:"directives",kind:"message",T:NF,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:Zl,repeated:!0},{no:11,name:"provides",kind:"message",T:Zl,repeated:!0},{no:12,name:"requires",kind:"message",T:Zl,repeated:!0},{no:13,name:"custom_events",kind:"message",T:rd},{no:14,name:"entity_interfaces",kind:"message",T:rf,repeated:!0},{no:15,name:"interface_objects",kind:"message",T:rf,repeated:!0}]));var ET=fu,mu=class mu extends ft{constructor(n){super();A(this,"name","");A(this,"sourceType",ed.OBJECT_FIELD);z.util.initPartial(n,this)}static fromBinary(n,r){return new mu().fromBinary(n,r)}static fromJson(n,r){return new mu().fromJson(n,r)}static fromJsonString(n,r){return new mu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(mu,n,r)}};A(mu,"runtime",z),A(mu,"typeName","wg.cosmo.node.v1.ArgumentConfiguration"),A(mu,"fields",z.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source_type",kind:"enum",T:z.getEnumType(ed)}]));var gT=mu,hu=class hu extends ft{constructor(n){super();A(this,"requiredAndScopes",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new hu().fromBinary(n,r)}static fromJson(n,r){return new hu().fromJson(n,r)}static fromJsonString(n,r){return new hu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(hu,n,r)}};A(hu,"runtime",z),A(hu,"typeName","wg.cosmo.node.v1.Scopes"),A(hu,"fields",z.util.newFieldList(()=>[{no:1,name:"required_and_scopes",kind:"scalar",T:9,repeated:!0}]));var IT=hu,Tu=class Tu extends ft{constructor(n){super();A(this,"requiresAuthentication",!1);A(this,"requiredOrScopes",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new Tu().fromBinary(n,r)}static fromJson(n,r){return new Tu().fromJson(n,r)}static fromJsonString(n,r){return new Tu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Tu,n,r)}};A(Tu,"runtime",z),A(Tu,"typeName","wg.cosmo.node.v1.AuthorizationConfiguration"),A(Tu,"fields",z.util.newFieldList(()=>[{no:1,name:"requires_authentication",kind:"scalar",T:8},{no:2,name:"required_or_scopes",kind:"message",T:IT,repeated:!0}]));var vT=Tu,yu=class yu extends ft{constructor(n){super();A(this,"typeName","");A(this,"fieldName","");A(this,"argumentsConfiguration",[]);A(this,"authorizationConfiguration");A(this,"subscriptionFilterCondition");z.util.initPartial(n,this)}static fromBinary(n,r){return new yu().fromBinary(n,r)}static fromJson(n,r){return new yu().fromJson(n,r)}static fromJsonString(n,r){return new yu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(yu,n,r)}};A(yu,"runtime",z),A(yu,"typeName","wg.cosmo.node.v1.FieldConfiguration"),A(yu,"fields",z.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:gT,repeated:!0},{no:4,name:"authorization_configuration",kind:"message",T:vT},{no:5,name:"subscription_filter_condition",kind:"message",T:kc,opt:!0}]));var _T=yu,Nu=class Nu extends ft{constructor(n){super();A(this,"typeName","");A(this,"renameTo","");z.util.initPartial(n,this)}static fromBinary(n,r){return new Nu().fromBinary(n,r)}static fromJson(n,r){return new Nu().fromJson(n,r)}static fromJsonString(n,r){return new Nu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Nu,n,r)}};A(Nu,"runtime",z),A(Nu,"typeName","wg.cosmo.node.v1.TypeConfiguration"),A(Nu,"fields",z.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var hF=Nu,Eu=class Eu extends ft{constructor(n){super();A(this,"typeName","");A(this,"fieldNames",[]);A(this,"externalFieldNames",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new Eu().fromBinary(n,r)}static fromJson(n,r){return new Eu().fromJson(n,r)}static fromJsonString(n,r){return new Eu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Eu,n,r)}};A(Eu,"runtime",z),A(Eu,"typeName","wg.cosmo.node.v1.TypeField"),A(Eu,"fields",z.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}]));var nf=Eu,gu=class gu extends ft{constructor(n){super();A(this,"fieldName","");A(this,"typeName","");z.util.initPartial(n,this)}static fromBinary(n,r){return new gu().fromBinary(n,r)}static fromJson(n,r){return new gu().fromJson(n,r)}static fromJsonString(n,r){return new gu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(gu,n,r)}};A(gu,"runtime",z),A(gu,"typeName","wg.cosmo.node.v1.FieldCoordinates"),A(gu,"fields",z.util.newFieldList(()=>[{no:1,name:"field_name",kind:"scalar",T:9},{no:2,name:"type_name",kind:"scalar",T:9}]));var bT=gu,Iu=class Iu extends ft{constructor(n){super();A(this,"fieldCoordinatesPath",[]);A(this,"fieldPath",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new Iu().fromBinary(n,r)}static fromJson(n,r){return new Iu().fromJson(n,r)}static fromJsonString(n,r){return new Iu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Iu,n,r)}};A(Iu,"runtime",z),A(Iu,"typeName","wg.cosmo.node.v1.FieldSetCondition"),A(Iu,"fields",z.util.newFieldList(()=>[{no:1,name:"field_coordinates_path",kind:"message",T:bT,repeated:!0},{no:2,name:"field_path",kind:"scalar",T:9,repeated:!0}]));var OT=Iu,vu=class vu extends ft{constructor(n){super();A(this,"typeName","");A(this,"fieldName","");A(this,"selectionSet","");A(this,"disableEntityResolver",!1);A(this,"conditions",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new vu().fromBinary(n,r)}static fromJson(n,r){return new vu().fromJson(n,r)}static fromJsonString(n,r){return new vu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(vu,n,r)}};A(vu,"runtime",z),A(vu,"typeName","wg.cosmo.node.v1.RequiredField"),A(vu,"fields",z.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:OT,repeated:!0}]));var Zl=vu,_u=class _u extends ft{constructor(n){super();A(this,"interfaceTypeName","");A(this,"concreteTypeNames",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new _u().fromBinary(n,r)}static fromJson(n,r){return new _u().fromJson(n,r)}static fromJsonString(n,r){return new _u().fromJsonString(n,r)}static equals(n,r){return z.util.equals(_u,n,r)}};A(_u,"runtime",z),A(_u,"typeName","wg.cosmo.node.v1.EntityInterfaceConfiguration"),A(_u,"fields",z.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 rf=_u,bu=class bu extends ft{constructor(n){super();A(this,"url");A(this,"method",td.GET);A(this,"header",{});A(this,"body");A(this,"query",[]);A(this,"urlEncodeBody",!1);A(this,"mtls");A(this,"baseUrl");A(this,"path");A(this,"httpProxyUrl");z.util.initPartial(n,this)}static fromBinary(n,r){return new bu().fromBinary(n,r)}static fromJson(n,r){return new bu().fromJson(n,r)}static fromJsonString(n,r){return new bu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(bu,n,r)}};A(bu,"runtime",z),A(bu,"typeName","wg.cosmo.node.v1.FetchConfiguration"),A(bu,"fields",z.util.newFieldList(()=>[{no:1,name:"url",kind:"message",T:wi},{no:2,name:"method",kind:"enum",T:z.getEnumType(td)},{no:3,name:"header",kind:"map",K:9,V:{kind:"message",T:gF}},{no:4,name:"body",kind:"message",T:wi},{no:5,name:"query",kind:"message",T:EF,repeated:!0},{no:7,name:"url_encode_body",kind:"scalar",T:8},{no:8,name:"mtls",kind:"message",T:IF},{no:9,name:"base_url",kind:"message",T:wi},{no:10,name:"path",kind:"message",T:wi},{no:11,name:"http_proxy_url",kind:"message",T:wi,opt:!0}]));var TF=bu,Ou=class Ou extends ft{constructor(n){super();A(this,"statusCode",Ir.zero);A(this,"typeName","");A(this,"injectStatusCodeIntoBody",!1);z.util.initPartial(n,this)}static fromBinary(n,r){return new Ou().fromBinary(n,r)}static fromJson(n,r){return new Ou().fromJson(n,r)}static fromJsonString(n,r){return new Ou().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Ou,n,r)}};A(Ou,"runtime",z),A(Ou,"typeName","wg.cosmo.node.v1.StatusCodeTypeMapping"),A(Ou,"fields",z.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 AK=Ou,Su=class Su extends ft{constructor(n){super();A(this,"fetch");A(this,"subscription");A(this,"federation");A(this,"upstreamSchema");A(this,"customScalarTypeFields",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new Su().fromBinary(n,r)}static fromJson(n,r){return new Su().fromJson(n,r)}static fromJsonString(n,r){return new Su().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Su,n,r)}};A(Su,"runtime",z),A(Su,"typeName","wg.cosmo.node.v1.DataSourceCustom_GraphQL"),A(Su,"fields",z.util.newFieldList(()=>[{no:1,name:"fetch",kind:"message",T:TF},{no:2,name:"subscription",kind:"message",T:vF},{no:3,name:"federation",kind:"message",T:_F},{no:4,name:"upstream_schema",kind:"message",T:FT},{no:6,name:"custom_scalar_type_fields",kind:"message",T:bF,repeated:!0}]));var ST=Su,Du=class Du extends ft{constructor(n){super();A(this,"consumerName","");A(this,"streamName","");z.util.initPartial(n,this)}static fromBinary(n,r){return new Du().fromBinary(n,r)}static fromJson(n,r){return new Du().fromJson(n,r)}static fromJsonString(n,r){return new Du().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Du,n,r)}};A(Du,"runtime",z),A(Du,"typeName","wg.cosmo.node.v1.NatsStreamConfiguration"),A(Du,"fields",z.util.newFieldList(()=>[{no:1,name:"consumer_name",kind:"scalar",T:9},{no:2,name:"stream_name",kind:"scalar",T:9}]));var DT=Du,Au=class Au extends ft{constructor(n){super();A(this,"engineEventConfiguration");A(this,"subjects",[]);A(this,"streamConfiguration");z.util.initPartial(n,this)}static fromBinary(n,r){return new Au().fromBinary(n,r)}static fromJson(n,r){return new Au().fromJson(n,r)}static fromJsonString(n,r){return new Au().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Au,n,r)}};A(Au,"runtime",z),A(Au,"typeName","wg.cosmo.node.v1.NatsEventConfiguration"),A(Au,"fields",z.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:nd},{no:2,name:"subjects",kind:"scalar",T:9,repeated:!0},{no:3,name:"stream_configuration",kind:"message",T:DT}]));var AT=Au,Ru=class Ru extends ft{constructor(n){super();A(this,"engineEventConfiguration");A(this,"topics",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new Ru().fromBinary(n,r)}static fromJson(n,r){return new Ru().fromJson(n,r)}static fromJsonString(n,r){return new Ru().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Ru,n,r)}};A(Ru,"runtime",z),A(Ru,"typeName","wg.cosmo.node.v1.KafkaEventConfiguration"),A(Ru,"fields",z.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:nd},{no:2,name:"topics",kind:"scalar",T:9,repeated:!0}]));var RT=Ru,Fu=class Fu extends ft{constructor(n){super();A(this,"providerId","");A(this,"type",qu.PUBLISH);A(this,"typeName","");A(this,"fieldName","");z.util.initPartial(n,this)}static fromBinary(n,r){return new Fu().fromBinary(n,r)}static fromJson(n,r){return new Fu().fromJson(n,r)}static fromJsonString(n,r){return new Fu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Fu,n,r)}};A(Fu,"runtime",z),A(Fu,"typeName","wg.cosmo.node.v1.EngineEventConfiguration"),A(Fu,"fields",z.util.newFieldList(()=>[{no:1,name:"provider_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:z.getEnumType(qu)},{no:3,name:"type_name",kind:"scalar",T:9},{no:4,name:"field_name",kind:"scalar",T:9}]));var nd=Fu,wu=class wu extends ft{constructor(n){super();A(this,"nats",[]);A(this,"kafka",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new wu().fromBinary(n,r)}static fromJson(n,r){return new wu().fromJson(n,r)}static fromJsonString(n,r){return new wu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(wu,n,r)}};A(wu,"runtime",z),A(wu,"typeName","wg.cosmo.node.v1.DataSourceCustomEvents"),A(wu,"fields",z.util.newFieldList(()=>[{no:1,name:"nats",kind:"message",T:AT,repeated:!0},{no:2,name:"kafka",kind:"message",T:RT,repeated:!0}]));var rd=wu,Lu=class Lu extends ft{constructor(n){super();A(this,"data");z.util.initPartial(n,this)}static fromBinary(n,r){return new Lu().fromBinary(n,r)}static fromJson(n,r){return new Lu().fromJson(n,r)}static fromJsonString(n,r){return new Lu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Lu,n,r)}};A(Lu,"runtime",z),A(Lu,"typeName","wg.cosmo.node.v1.DataSourceCustom_Static"),A(Lu,"fields",z.util.newFieldList(()=>[{no:1,name:"data",kind:"message",T:wi}]));var yF=Lu,Pu=class Pu extends ft{constructor(n){super();A(this,"kind",Pc.STATIC_CONFIGURATION_VARIABLE);A(this,"staticVariableContent","");A(this,"environmentVariableName","");A(this,"environmentVariableDefaultValue","");A(this,"placeholderVariableName","");z.util.initPartial(n,this)}static fromBinary(n,r){return new Pu().fromBinary(n,r)}static fromJson(n,r){return new Pu().fromJson(n,r)}static fromJsonString(n,r){return new Pu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Pu,n,r)}};A(Pu,"runtime",z),A(Pu,"typeName","wg.cosmo.node.v1.ConfigurationVariable"),A(Pu,"fields",z.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:z.getEnumType(Pc)},{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 wi=Pu,ku=class ku extends ft{constructor(n){super();A(this,"directiveName","");A(this,"renameTo","");z.util.initPartial(n,this)}static fromBinary(n,r){return new ku().fromBinary(n,r)}static fromJson(n,r){return new ku().fromJson(n,r)}static fromJsonString(n,r){return new ku().fromJsonString(n,r)}static equals(n,r){return z.util.equals(ku,n,r)}};A(ku,"runtime",z),A(ku,"typeName","wg.cosmo.node.v1.DirectiveConfiguration"),A(ku,"fields",z.util.newFieldList(()=>[{no:1,name:"directive_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var NF=ku,xu=class xu extends ft{constructor(n){super();A(this,"name","");A(this,"value","");z.util.initPartial(n,this)}static fromBinary(n,r){return new xu().fromBinary(n,r)}static fromJson(n,r){return new xu().fromJson(n,r)}static fromJsonString(n,r){return new xu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(xu,n,r)}};A(xu,"runtime",z),A(xu,"typeName","wg.cosmo.node.v1.URLQueryConfiguration"),A(xu,"fields",z.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]));var EF=xu,Cu=class Cu extends ft{constructor(n){super();A(this,"values",[]);z.util.initPartial(n,this)}static fromBinary(n,r){return new Cu().fromBinary(n,r)}static fromJson(n,r){return new Cu().fromJson(n,r)}static fromJsonString(n,r){return new Cu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Cu,n,r)}};A(Cu,"runtime",z),A(Cu,"typeName","wg.cosmo.node.v1.HTTPHeader"),A(Cu,"fields",z.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:wi,repeated:!0}]));var gF=Cu,Uu=class Uu extends ft{constructor(n){super();A(this,"key");A(this,"cert");A(this,"insecureSkipVerify",!1);z.util.initPartial(n,this)}static fromBinary(n,r){return new Uu().fromBinary(n,r)}static fromJson(n,r){return new Uu().fromJson(n,r)}static fromJsonString(n,r){return new Uu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Uu,n,r)}};A(Uu,"runtime",z),A(Uu,"typeName","wg.cosmo.node.v1.MTLSConfiguration"),A(Uu,"fields",z.util.newFieldList(()=>[{no:1,name:"key",kind:"message",T:wi},{no:2,name:"cert",kind:"message",T:wi},{no:3,name:"insecureSkipVerify",kind:"scalar",T:8}]));var IF=Uu,Mu=class Mu extends ft{constructor(n){super();A(this,"enabled",!1);A(this,"url");A(this,"useSSE");A(this,"protocol");A(this,"websocketSubprotocol");z.util.initPartial(n,this)}static fromBinary(n,r){return new Mu().fromBinary(n,r)}static fromJson(n,r){return new Mu().fromJson(n,r)}static fromJsonString(n,r){return new Mu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Mu,n,r)}};A(Mu,"runtime",z),A(Mu,"typeName","wg.cosmo.node.v1.GraphQLSubscriptionConfiguration"),A(Mu,"fields",z.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"url",kind:"message",T:wi},{no:3,name:"useSSE",kind:"scalar",T:8,opt:!0},{no:4,name:"protocol",kind:"enum",T:z.getEnumType(eu),opt:!0},{no:5,name:"websocketSubprotocol",kind:"enum",T:z.getEnumType(tu),opt:!0}]));var vF=Mu,Bu=class Bu extends ft{constructor(n){super();A(this,"enabled",!1);A(this,"serviceSdl","");z.util.initPartial(n,this)}static fromBinary(n,r){return new Bu().fromBinary(n,r)}static fromJson(n,r){return new Bu().fromJson(n,r)}static fromJsonString(n,r){return new Bu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Bu,n,r)}};A(Bu,"runtime",z),A(Bu,"typeName","wg.cosmo.node.v1.GraphQLFederationConfiguration"),A(Bu,"fields",z.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"serviceSdl",kind:"scalar",T:9}]));var _F=Bu,Vu=class Vu extends ft{constructor(n){super();A(this,"key","");z.util.initPartial(n,this)}static fromBinary(n,r){return new Vu().fromBinary(n,r)}static fromJson(n,r){return new Vu().fromJson(n,r)}static fromJsonString(n,r){return new Vu().fromJsonString(n,r)}static equals(n,r){return z.util.equals(Vu,n,r)}};A(Vu,"runtime",z),A(Vu,"typeName","wg.cosmo.node.v1.InternedString"),A(Vu,"fields",z.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9}]));var FT=Vu,ju=class ju extends ft{constructor(n){super();A(this,"typeName","");A(this,"fieldName","");z.util.initPartial(n,this)}static fromBinary(n,r){return new ju().fromBinary(n,r)}static fromJson(n,r){return new ju().fromJson(n,r)}static fromJsonString(n,r){return new ju().fromJsonString(n,r)}static equals(n,r){return z.util.equals(ju,n,r)}};A(ju,"runtime",z),A(ju,"typeName","wg.cosmo.node.v1.SingleTypeField"),A(ju,"fields",z.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9}]));var bF=ju,$u=class $u extends ft{constructor(n){super();A(this,"fieldPath",[]);A(this,"json","");z.util.initPartial(n,this)}static fromBinary(n,r){return new $u().fromBinary(n,r)}static fromJson(n,r){return new $u().fromJson(n,r)}static fromJsonString(n,r){return new $u().fromJsonString(n,r)}static equals(n,r){return z.util.equals($u,n,r)}};A($u,"runtime",z),A($u,"typeName","wg.cosmo.node.v1.SubscriptionFieldCondition"),A($u,"fields",z.util.newFieldList(()=>[{no:1,name:"field_path",kind:"scalar",T:9,repeated:!0},{no:2,name:"json",kind:"scalar",T:9}]));var wT=$u,Zs=class Zs extends ft{constructor(n){super();A(this,"and",[]);A(this,"in");A(this,"not");A(this,"or",[]);z.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 z.util.equals(Zs,n,r)}};A(Zs,"runtime",z),A(Zs,"typeName","wg.cosmo.node.v1.SubscriptionFilterCondition"),A(Zs,"fields",z.util.newFieldList(()=>[{no:1,name:"and",kind:"message",T:Zs,repeated:!0},{no:2,name:"in",kind:"message",T:wT,opt:!0},{no:3,name:"not",kind:"message",T:Zs,opt:!0},{no:4,name:"or",kind:"message",T:Zs,repeated:!0}]));var kc=Zs;m();T();h();var MI=Xv(dI(),1);function ope(e){if(!e.conditions)return;let t=[];for(let n of e.conditions){let r=[];for(let i of n.fieldCoordinatesPath){let s=i.split(".");if(s.length!==2)throw new Error(`fatal: malformed conditional field coordinates "${i}" for field set "${e.selectionSet}".`);r.push(new bT({fieldName:s[1],typeName:s[0]}))}t.push(new OT({fieldCoordinatesPath:r,fieldPath:n.fieldPath}))}return t}function OF(e,t,n){if(e)for(let r of e){let i=ope(r);t.push(new Zl(k(k({typeName:n,fieldName:r.fieldName,selectionSet:r.selectionSet},r.disableEntityResolver?{disableEntityResolver:!0}:{}),i?{conditions:i}:{})))}}function RK(e){switch(e){case"publish":return qu.PUBLISH;case"request":return qu.REQUEST;case"subscribe":return qu.SUBSCRIBE}}function FK(e){var n;let t={rootNodes:[],childNodes:[],keys:[],provides:[],events:new rd({nats:[],kafka:[]}),requires:[],entityInterfaces:[],interfaceObjects:[]};for(let r of e.values()){let i=r.typeName,s=[...r.fieldNames],o=new nf({typeName:i,fieldNames:s});if(r.externalFieldNames&&r.externalFieldNames.size>0&&(o.externalFieldNames=[...r.externalFieldNames]),r.isRootNode?t.rootNodes.push(o):t.childNodes.push(o),r.entityInterfaceConcreteTypeNames){let d=new rf({interfaceTypeName:i,concreteTypeNames:[...r.entityInterfaceConcreteTypeNames]});r.isInterfaceObject?t.interfaceObjects.push(d):t.entityInterfaces.push(d)}OF(r.keys,t.keys,i),OF(r.provides,t.provides,i),OF(r.requires,t.requires,i);let u=[],l=[];for(let d of(n=r.events)!=null?n:[])switch(d.providerType){case MI.PROVIDER_TYPE_KAFKA:{l.push(new RT({engineEventConfiguration:new nd({fieldName:d.fieldName,providerId:d.providerId,type:RK(d.type),typeName:i}),topics:d.topics}));break}case MI.PROVIDER_TYPE_NATS:{u.push(new AT(k({engineEventConfiguration:new nd({fieldName:d.fieldName,providerId:d.providerId,type:RK(d.type),typeName:i}),subjects:d.subjects},d.streamConfiguration?{streamConfiguration:new DT({consumerName:d.streamConfiguration.consumerName,streamName:d.streamConfiguration.streamName})}:{})));break}default:throw new Error("Fatal: Unknown event provider.")}t.events.nats.push(...u),t.events.kafka.push(...l)}return t}function wK(e){var n;let t=[];for(let r of e){let i=r.argumentNames.map(l=>new gT({name:l,sourceType:ed.FIELD_ARGUMENT})),s=new _T({argumentsConfiguration:i,fieldName:r.fieldName,typeName:r.typeName}),o=((n=r.requiredScopes)==null?void 0:n.map(l=>new IT({requiredAndScopes:l})))||[],u=o.length>0;if((r.requiresAuthentication||u)&&(s.authorizationConfiguration=new vT({requiresAuthentication:r.requiresAuthentication||u,requiredOrScopes:o})),r.subscriptionFilterCondition){let l=new kc;UI(l,r.subscriptionFilterCondition),s.subscriptionFilterCondition=l}t.push(s)}return t}function UI(e,t){if(t.and!==void 0){let n=[];for(let r of t.and){let i=new kc;UI(i,r),n.push(i)}e.and=n;return}if(t.in!==void 0){e.in=new wT({fieldPath:t.in.fieldPath,json:JSON.stringify(t.in.values)});return}if(t.not!==void 0){e.not=new kc,UI(e.not,t.not);return}if(t.or!==void 0){let n=[];for(let r of t.or){let i=new kc;UI(i,r),n.push(i)}e.or=n;return}throw new Error("Fatal: Incoming SubscriptionCondition object was malformed.")}m();T();h();function SF(e){return new Error(`Normalization failed to return a ${e}.`)}var ape=(e,t)=>{let n=stringHash(t);return e.stringStorage[n]=t,new FT({key:n})},upe=e=>{switch(e){case"ws":return eu.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS;case"sse":return eu.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE;case"sse_post":return eu.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST}throw new Error(`Unsupported subscription protocol '${e}'`)},cpe=e=>{switch(e){case"auto":return tu.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO;case"graphql-ws":return tu.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS;case"graphql-transport-ws":return tu.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS}throw new Error(`Unsupported websocket subprotocol '${e}'`)},PK=function(e){let t=new tf({defaultFlushInterval:BigInt(500),datasourceConfigurations:[],fieldConfigurations:[],graphqlSchema:"",stringStorage:{},typeConfigurations:[]});for(let n of e.subgraphs){if(!n.configurationDataByTypeName)throw SF("ConfigurationDataByTypeName");if(!n.schema)throw SF("GraphQLSchema");let r=ape(t,$q(jm(n.schema))),{childNodes:i,entityInterfaces:s,events:o,interfaceObjects:u,keys:l,provides:d,requires:p,rootNodes:y}=FK(n.configurationDataByTypeName),N=upe(n.subscriptionProtocol||"ws"),I=cpe(n.websocketSubprotocol||"auto"),_,C,j;if(o.kafka.length>0||o.nats.length>0){_=Lc.PUBSUB,j=new rd({kafka:o.kafka,nats:o.nats});let re=ye=>LK.ROOT_TYPE_NAMES.has(ye.typeName),se=0,pe=0;for(;se({id:n.id,name:n.name,routingUrl:n.url}))})};m();T();h();we();function kK(e){let t;try{t=io(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 lpe(e){let{federationResult:t,errors:n}=(0,DF.federateSubgraphs)(e.map(kK));if(n&&n.length>0)throw new Error(`could not federate schema: ${n.map(r=>r.message).join(", ")}`);return{fieldConfigurations:t.fieldConfigurations,sdl:Ft(t.federatedGraphAST)}}function dpe(e){let t=(0,DF.federateSubgraphs)(e.map(kK));if(t.errors&&t.errors.length>0)throw new Error(`could not federate schema: ${t.errors.map(r=>r.message).join(", ")}`);if(t.federationResult===void 0)throw new Error("could not federate subgraphs");return PK({federatedClientSDL:Hd(t.federationResult.federatedGraphClientSchema),federatedSDL:Hd(t.federationResult.federatedGraphSchema),fieldConfigurations:t.federationResult.fieldConfigurations,schemaVersionId:"",subgraphs:e.map((r,i)=>{var l,d;let s=t.federationResult.subgraphConfigBySubgraphName.get(r.name),o=s==null?void 0:s.schema,u=s==null?void 0:s.configurationDataByTypeName;return{id:`${i}`,name:r.name,url:JR(r.url),sdl:r.schema,subscriptionUrl:JR((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 Me(ppe);})(); /*! Bundled license information: @jspm/core/nodelibs/browser/buffer.js: diff --git a/composition/src/federation/federation-factory.ts b/composition/src/federation/federation-factory.ts index 2a1426167a..fba5b38b67 100644 --- a/composition/src/federation/federation-factory.ts +++ b/composition/src/federation/federation-factory.ts @@ -60,6 +60,7 @@ import { } from '../errors/errors'; import { ChildTagData, + ContractTagOptions, FederationFactoryOptions, FederationResultContainer, FederationResultContainerWithContracts, @@ -2461,13 +2462,13 @@ export class FederationFactory { } } - buildFederationContractResult(tagNames: Set, areTagsExcluded: boolean): FederationResultContainer { + buildFederationContractResult(contractTagOptions: ContractTagOptions): FederationResultContainer { if (!this.isVersionTwo) { /* If all the subgraphs are version one, the @inaccessible directive won't be present. ** However, contracts require @inaccessible to exclude applicable tagged types. */ this.routerDefinitions.push(INACCESSIBLE_DEFINITION); } - if (areTagsExcluded) { + if (contractTagOptions.excludedTagNames.size > 0) { for (const [parentTypeName, parentTagData] of this.parentTagDataByTypeName) { const parentDefinitionData = getOrThrowError( this.parentDefinitionDataByTypeName, @@ -2477,7 +2478,7 @@ export class FederationFactory { if (isNodeDataInaccessible(parentDefinitionData)) { continue; } - if (doSetsIntersect(tagNames, parentTagData.tagNames)) { + if (doSetsIntersect(contractTagOptions.excludedTagNames, parentTagData.tagNames)) { parentDefinitionData.persistedDirectivesData.directives.set(INACCESSIBLE, [ generateSimpleDirective(INACCESSIBLE), ]); @@ -2498,7 +2499,7 @@ export class FederationFactory { parentDefinitionData, parentDefinitionData.enumValueDataByValueName, parentTagData.childTagDataByChildName, - tagNames, + contractTagOptions.excludedTagNames, ); break; case Kind.INPUT_OBJECT_TYPE_DEFINITION: @@ -2506,7 +2507,7 @@ export class FederationFactory { parentDefinitionData, parentDefinitionData.inputValueDataByValueName, parentTagData.childTagDataByChildName, - tagNames, + contractTagOptions.excludedTagNames, ); break; default: @@ -2521,7 +2522,7 @@ export class FederationFactory { accessibleFields -= 1; continue; } - if (doSetsIntersect(tagNames, childTagData.tagNames)) { + if (doSetsIntersect(contractTagOptions.excludedTagNames, childTagData.tagNames)) { getValueOrDefault(fieldData.persistedDirectivesData.directives, INACCESSIBLE, () => [ generateSimpleDirective(INACCESSIBLE), ]); @@ -2554,7 +2555,7 @@ export class FederationFactory { } } } - } else { + } else if (contractTagOptions.includedTagNames.size > 0) { for (const [parentTypeName, parentDefinitionData] of this.parentDefinitionDataByTypeName) { if (isNodeDataInaccessible(parentDefinitionData)) { continue; @@ -2568,7 +2569,7 @@ export class FederationFactory { // If the parent is inaccessible, there is no need to assess further continue; } - if (doSetsIntersect(tagNames, parentTagData.tagNames)) { + if (doSetsIntersect(contractTagOptions.includedTagNames, parentTagData.tagNames)) { continue; } if (parentTagData.childTagDataByChildName.size < 1) { @@ -2589,7 +2590,7 @@ export class FederationFactory { parentDefinitionData, parentDefinitionData.enumValueDataByValueName, parentTagData.childTagDataByChildName, - tagNames, + contractTagOptions.includedTagNames, ); break; case Kind.INPUT_OBJECT_TYPE_DEFINITION: @@ -2597,7 +2598,7 @@ export class FederationFactory { parentDefinitionData, parentDefinitionData.inputValueDataByValueName, parentTagData.childTagDataByChildName, - tagNames, + contractTagOptions.includedTagNames, ); break; default: @@ -2608,7 +2609,7 @@ export class FederationFactory { continue; } const childTagData = parentTagData.childTagDataByChildName.get(fieldName); - if (!childTagData || !doSetsIntersect(tagNames, childTagData.tagNames)) { + if (!childTagData || !doSetsIntersect(contractTagOptions.includedTagNames, childTagData.tagNames)) { getValueOrDefault(fieldData.persistedDirectivesData.directives, INACCESSIBLE, () => [ generateSimpleDirective(INACCESSIBLE), ]); @@ -2789,8 +2790,7 @@ export function federateSubgraphs(subgraphs: Subgraph[]): FederationResultContai // the flow when publishing a subgraph that also has contracts export function federateSubgraphsWithContracts( subgraphs: Subgraph[], - tagNamesByContractName: Map>, - areTagsExcluded: boolean, + contractTagOptionsByContractName: Map, ): FederationResultContainerWithContracts { const { errors: normalizationErrors, @@ -2810,19 +2810,19 @@ export function federateSubgraphsWithContracts( if (errors) { return { errors, warnings }; } - const lastContractIndex = tagNamesByContractName.size - 1; + const lastContractIndex = contractTagOptionsByContractName.size - 1; const federationResultContainerByContractName: Map = new Map< string, FederationResultContainer >(); let i = 0; - for (const [contractName, tagNames] of tagNamesByContractName) { + for (const [contractName, tagOptions] of contractTagOptionsByContractName) { // deep copy the current FederationFactory before it is mutated if it is not the last one required if (i !== lastContractIndex) { federationFactories.push(cloneDeep(federationFactories[i])); } // note that any one contract could have its own errors - const federationResultContainer = federationFactories[i].buildFederationContractResult(tagNames, areTagsExcluded); + const federationResultContainer = federationFactories[i].buildFederationContractResult(tagOptions); federationResultContainerByContractName.set(contractName, federationResultContainer); i++; } @@ -2832,13 +2832,12 @@ export function federateSubgraphsWithContracts( // the flow when adding a completely new contract export function federateSubgraphsContract( subgraphs: Subgraph[], - tagNames: Set, - areTagsExcluded: boolean, + contractTagOptions: ContractTagOptions, ): FederationResultContainer { const { errors, federationFactory, warnings } = initializeFederationFactory(subgraphs); if (errors || !federationFactory) { return { errors: errors || [federationFactoryInitializationFatalError], warnings }; } federationFactory.federateSubgraphData(); - return federationFactory.buildFederationContractResult(tagNames, areTagsExcluded); + return federationFactory.buildFederationContractResult(contractTagOptions); } diff --git a/composition/src/federation/utils.ts b/composition/src/federation/utils.ts index ec97ffb1ad..ca02a3d0f1 100644 --- a/composition/src/federation/utils.ts +++ b/composition/src/federation/utils.ts @@ -20,7 +20,6 @@ import { getTypeNodeNamedTypeName, MutableFieldNode } from '../schema-building/a import { BREAK, Kind, visit } from 'graphql/index'; import { BASE_SCALARS } from '../utils/constants'; import { isKindAbstract, safeParse } from '../ast/utils'; -import { ObjectExtensionData, ParentExtensionData } from '../schema-building/type-extension-data'; import { getNormalizedFieldSet } from '../normalization/utils'; import { GraphNode } from '../resolvability-graph/graph-nodes'; import { ConditionalFieldData } from '../schema-building/utils'; @@ -252,3 +251,8 @@ export function validateImplicitFieldSets({ } } } + +export type ContractTagOptions = { + excludedTagNames: Set; + includedTagNames: Set; +}; diff --git a/composition/tests/contracts.test.ts b/composition/tests/contracts.test.ts index 6b6b29c949..45e31f4e13 100644 --- a/composition/tests/contracts.test.ts +++ b/composition/tests/contracts.test.ts @@ -1,4 +1,11 @@ -import { federateSubgraphs, federateSubgraphsContract, federateSubgraphsWithContracts, parse, Subgraph } from '../src'; +import { + ContractTagOptions, + federateSubgraphs, + federateSubgraphsContract, + federateSubgraphsWithContracts, + parse, + Subgraph, +} from '../src'; import { describe, expect, test } from 'vitest'; import { normalizeString, @@ -9,17 +16,30 @@ import { } from './utils/utils'; describe('Contract tests', () => { - const tagNamesByContractName = new Map>([ - ['one', new Set(['tagOne', 'includeMe'])], - ['two', new Set(['tagTwo', 'includeMe'])], - ]); - describe('Exclude tags', () => { + const excludedTagsOne = { + excludedTagNames: new Set(['one', 'includeMe']), + includedTagNames: new Set(), + }; + + const excludedTagsTwo = { + excludedTagNames: new Set(['one']), + includedTagNames: new Set(), + }; + test('that Objects are removed by tag', () => { const { federationResultContainerByContractName } = federateSubgraphsWithContracts( [subgraphOne, subgraphA], - tagNamesByContractName, - true, + new Map([ + ['one', excludedTagsOne], + [ + 'two', + { + excludedTagNames: new Set(['two', 'includeMe']), + includedTagNames: new Set(), + }, + ], + ]), ); expect(federationResultContainerByContractName).toBeDefined(); const contractOne = federationResultContainerByContractName!.get('one'); @@ -34,11 +54,11 @@ describe('Contract tests', () => { normalizeString( versionOneRouterContractDefinitions + ` - type Object @tag(name: "tagOne") @inaccessible { + type Object @tag(name: "one") @inaccessible { name: String! } - type ObjectTwo @tag(name: "tagTwo") { + type ObjectTwo @tag(name: "two") { name: String! } @@ -66,11 +86,11 @@ describe('Contract tests', () => { normalizeString( versionOneRouterContractDefinitions + ` - type Object @tag(name: "tagOne") { + type Object @tag(name: "one") { name: String! } - type ObjectTwo @tag(name: "tagTwo") @inaccessible { + type ObjectTwo @tag(name: "two") @inaccessible { name: String! } @@ -97,11 +117,7 @@ describe('Contract tests', () => { }); test('that Object Fields are removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphB, subgraphD], - new Set(['one', 'includeMe']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphB, subgraphD], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -120,11 +136,7 @@ describe('Contract tests', () => { }); test('that an Object is removed if its only Field is removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphA, subgraphD], - new Set(['one', 'includeMe']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphA, subgraphD], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -139,11 +151,7 @@ describe('Contract tests', () => { }); test('that Interfaces are removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphJ, subgraphK], - new Set(['one', 'includeMe']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphJ, subgraphK], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -158,11 +166,7 @@ describe('Contract tests', () => { }); test('that Interface Fields are removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphJ, subgraphL], - new Set(['one', 'includeMe']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphJ, subgraphL], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -181,11 +185,7 @@ describe('Contract tests', () => { }); test('that an Interface is removed if its only Field is removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphA, subgraphL], - new Set(['one', 'includeMe']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphA, subgraphL], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -200,11 +200,7 @@ describe('Contract tests', () => { }); test('that if an Interface is removed by tag, it is removed from its implementations', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphA, subgraphAE], - new Set(['one']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphA, subgraphAE], excludedTagsTwo); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -223,11 +219,7 @@ describe('Contract tests', () => { }); test('that Input Objects are removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphN, subgraphO], - new Set(['one']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphN, subgraphO], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -242,11 +234,7 @@ describe('Contract tests', () => { }); test('that nullable Input Object fields are removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphAA, subgraphAK], - new Set(['one']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphAA, subgraphAK], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -265,11 +253,7 @@ describe('Contract tests', () => { }); test('that an Input Object is removed if its only Field is removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphA, subgraphP], - new Set(['one', 'includeMe']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphA, subgraphP], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -284,11 +268,7 @@ describe('Contract tests', () => { }); test('that an Argument can be removed by tag #1.1', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphA, subgraphAF], - new Set(['one']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphA, subgraphAF], excludedTagsTwo); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -307,11 +287,7 @@ describe('Contract tests', () => { }); test('that an Argument can be removed by tag #1.2', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphA, subgraphAG], - new Set(['one']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphA, subgraphAG], excludedTagsTwo); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -330,11 +306,7 @@ describe('Contract tests', () => { }); test('that an Argument can be removed by tag #1.3', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphA, subgraphAH], - new Set(['one']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphA, subgraphAH], excludedTagsTwo); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -349,11 +321,7 @@ describe('Contract tests', () => { }); test('that a Scalar is removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphQ, subgraphR], - new Set(['one']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphQ, subgraphR], excludedTagsTwo); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -368,11 +336,7 @@ describe('Contract tests', () => { }); test('that a Union is removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphS, subgraphT], - new Set(['one']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphS, subgraphT], excludedTagsTwo); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -394,11 +358,7 @@ describe('Contract tests', () => { // TODO test.skip('that a Union is removed if all its members are removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphS, subgraphG], - new Set(['one']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphS, subgraphG], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -413,11 +373,7 @@ describe('Contract tests', () => { }); test('that an Enum is removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphAB, subgraphAC], - new Set(['one']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphAB, subgraphAC], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -432,11 +388,7 @@ describe('Contract tests', () => { }); test('that an Enum value is removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphAB, subgraphAD], - new Set(['one']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphAB, subgraphAD], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -455,11 +407,7 @@ describe('Contract tests', () => { }); test('that an Enum is removed if its only Value is removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphA, subgraphAD], - new Set(['one', 'includeMe']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphA, subgraphAD], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -474,11 +422,7 @@ describe('Contract tests', () => { }); test('that a nested Field can be removed by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphA, subgraphAI], - new Set(['one']), - true, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphA, subgraphAI], excludedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -494,11 +438,28 @@ describe('Contract tests', () => { }); describe('Include tags', () => { + const includedTagsOne = { + excludedTagNames: new Set(), + includedTagNames: new Set(['one', 'includeMe']), + }; + + const includedTagsTwo = { + excludedTagNames: new Set(), + includedTagNames: new Set(['two', 'includeMe']), + }; + + const includedTagsThree = { + excludedTagNames: new Set(), + includedTagNames: new Set(['includeMe']), + }; + test('that Objects are included by tag', () => { const { federationResultContainerByContractName } = federateSubgraphsWithContracts( [subgraphOne, subgraphInclude], - tagNamesByContractName, - false, + new Map([ + ['one', includedTagsOne], + ['two', includedTagsTwo], + ]), ); expect(federationResultContainerByContractName).toBeDefined(); const contractOne = federationResultContainerByContractName!.get('one'); @@ -513,11 +474,11 @@ describe('Contract tests', () => { normalizeString( versionOneRouterContractDefinitions + ` - type Object @tag(name: "tagOne") { + type Object @tag(name: "one") { name: String! } - type ObjectTwo @tag(name: "tagTwo") @inaccessible { + type ObjectTwo @tag(name: "two") @inaccessible { name: String! } @@ -546,11 +507,11 @@ describe('Contract tests', () => { normalizeString( versionOneRouterContractDefinitions + ` - type Object @tag(name: "tagOne") @inaccessible { + type Object @tag(name: "one") @inaccessible { name: String! } - type ObjectTwo @tag(name: "tagTwo") { + type ObjectTwo @tag(name: "two") { name: String! } @@ -580,8 +541,7 @@ describe('Contract tests', () => { test('that Object Fields are included by tag', () => { const { errors, federationResult } = federateSubgraphsContract( [subgraphB, subgraphD, subgraphInclude], - new Set(['one', 'includeMe']), - false, + includedTagsOne, ); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( @@ -601,11 +561,7 @@ describe('Contract tests', () => { }); test('that an Object is removed if its only Field is not included by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphInclude, subgraphD], - new Set(['two', 'includeMe']), - false, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphInclude, subgraphD], includedTagsTwo); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -622,8 +578,7 @@ describe('Contract tests', () => { test('that Interfaces are included by tag', () => { const { errors, federationResult } = federateSubgraphsContract( [subgraphJ, subgraphK, subgraphInclude], - new Set(['one', 'includeMe']), - false, + includedTagsOne, ); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( @@ -646,8 +601,7 @@ describe('Contract tests', () => { test('that Interface Fields are removed if not included by tag', () => { const { errors, federationResult } = federateSubgraphsContract( [subgraphJ, subgraphL, subgraphInclude], - new Set(['one', 'includeMe']), - false, + includedTagsOne, ); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( @@ -667,11 +621,7 @@ describe('Contract tests', () => { }); test('that an Interface is removed if its only Field is not included by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphInclude, subgraphL], - new Set(['two', 'includeMe']), - false, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphInclude, subgraphL], includedTagsTwo); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -686,11 +636,7 @@ describe('Contract tests', () => { }); test('that if an Interface is not included by tag, it is removed from its implementations', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphInclude, subgraphAE], - new Set(['two', 'includeMe']), - false, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphInclude, subgraphAE], includedTagsTwo); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -711,8 +657,7 @@ describe('Contract tests', () => { test('that Input Objects are included by tag', () => { const { errors, federationResult } = federateSubgraphsContract( [subgraphN, subgraphO, subgraphInclude], - new Set(['one', 'includeMe']), - false, + includedTagsOne, ); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( @@ -734,8 +679,7 @@ describe('Contract tests', () => { test('that nullable Input Object Fields are removed if not included by tag', () => { const { errors, federationResult } = federateSubgraphsContract( [subgraphAA, subgraphAK, subgraphInclude], - new Set(['one', 'includeMe']), - false, + includedTagsOne, ); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( @@ -755,11 +699,7 @@ describe('Contract tests', () => { }); test('that an Input Object is removed if its only Field is not included by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphInclude, subgraphP], - new Set(['includeMe']), - false, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphInclude, subgraphP], includedTagsThree); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -774,11 +714,7 @@ describe('Contract tests', () => { }); test('that an Argument can be included by tag #1.1', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphInclude, subgraphAF], - new Set(['one', 'includeMe']), - false, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphInclude, subgraphAF], includedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -801,11 +737,7 @@ describe('Contract tests', () => { }); test('that an Argument can be included by tag #1.2', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphInclude, subgraphAG], - new Set(['one', 'includeMe']), - false, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphInclude, subgraphAG], includedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -828,11 +760,7 @@ describe('Contract tests', () => { }); test('that an Argument can be included by tag #1.3', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphInclude, subgraphAH], - new Set(['one', 'includeMe']), - false, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphInclude, subgraphAH], includedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -855,11 +783,7 @@ describe('Contract tests', () => { }); test('that an Argument can be included by tag #1.4', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphInclude, subgraphAJ], - new Set(['one', 'includeMe']), - false, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphInclude, subgraphAJ], includedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -881,8 +805,7 @@ describe('Contract tests', () => { test('that a Scalar is included by tag', () => { const { errors, federationResult } = federateSubgraphsContract( [subgraphInclude, subgraphQ, subgraphR], - new Set(['one', 'includeMe']), - false, + includedTagsOne, ); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( @@ -902,8 +825,7 @@ describe('Contract tests', () => { test('that a Union is included by tag', () => { const { errors, federationResult } = federateSubgraphsContract( [subgraphInclude, subgraphS, subgraphT], - new Set(['one', 'includeMe']), - false, + includedTagsOne, ); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( @@ -930,8 +852,7 @@ describe('Contract tests', () => { test.skip('that a Union is removed if none of its members are included by tag', () => { const { errors, federationResult } = federateSubgraphsContract( [subgraphInclude, subgraphS, subgraphG], - new Set(['one']), - false, + includedTagsOne, ); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( @@ -949,8 +870,7 @@ describe('Contract tests', () => { test('that an Enum is included by tag', () => { const { errors, federationResult } = federateSubgraphsContract( [subgraphInclude, subgraphAB, subgraphAC], - new Set(['one', 'includeMe']), - false, + includedTagsOne, ); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( @@ -973,8 +893,7 @@ describe('Contract tests', () => { test('that an Enum Value is included by tag', () => { const { errors, federationResult } = federateSubgraphsContract( [subgraphInclude, subgraphAB, subgraphAD], - new Set(['one', 'includeMe']), - false, + includedTagsOne, ); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( @@ -994,11 +913,7 @@ describe('Contract tests', () => { }); test('that an Enum is removed if its only value is not included by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphInclude, subgraphAD], - new Set(['includeMe']), - false, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphInclude, subgraphAD], includedTagsThree); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -1013,11 +928,7 @@ describe('Contract tests', () => { }); test('that a nested Field can be included by tag', () => { - const { errors, federationResult } = federateSubgraphsContract( - [subgraphInclude, subgraphAI], - new Set(['one', 'includeMe']), - false, - ); + const { errors, federationResult } = federateSubgraphsContract([subgraphInclude, subgraphAI], includedTagsOne); expect(errors).toBeUndefined(); expect(schemaToSortedNormalizedString(federationResult!.federatedGraphClientSchema)).toBe( normalizeString( @@ -2480,11 +2391,11 @@ const subgraphOne: Subgraph = { name: 'subgraph-one', url: '', definitions: parse(` - type Object @tag(name: "tagOne") { + type Object @tag(name: "one") { name: String! } - type ObjectTwo @tag(name: "tagTwo") { + type ObjectTwo @tag(name: "two") { name: String! } `),