@betarena/ad-engine 0.0.24 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,53 +1,53 @@
1
- var Ta=Object.defineProperty;var ba=(e,t,n)=>t in e?Ta(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var hr=(e,t,n)=>(ba(e,typeof t!="symbol"?t+"":t,n),n);function Ce(){}const fs=e=>e;function ds(e){return e()}function Si(){return Object.create(null)}function Pt(e){e.forEach(ds)}function Xn(e){return typeof e=="function"}function Wn(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let In;function Xe(e,t){return e===t?!0:(In||(In=document.createElement("a")),In.href=t,e===In.href)}function _a(e){return Object.keys(e).length===0}function Na(e,...t){if(e==null){for(const r of t)r(void 0);return Ce}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Ia(e,t,n){e.$$.on_destroy.push(Na(t,n))}function Ri(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}const ps=typeof window<"u";let hs=ps?()=>window.performance.now():()=>Date.now(),Cr=ps?e=>requestAnimationFrame(e):Ce;const Lt=new Set;function ms(e){Lt.forEach(t=>{t.c(e)||(Lt.delete(t),t.f())}),Lt.size!==0&&Cr(ms)}function ys(e){let t;return Lt.size===0&&Cr(ms),{promise:new Promise(n=>{Lt.add(t={c:e,f:n})}),abort(){Lt.delete(t)}}}function ue(e,t){e.appendChild(t)}function vs(e,t,n){const r=Mr(e);if(!r.getElementById(t)){const i=ce("style");i.id=t,i.textContent=n,Es(r,i)}}function Mr(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function wa(e){const t=ce("style");return t.textContent="/* empty */",Es(Mr(e),t),t.sheet}function Es(e,t){return ue(e.head||e,t),t.sheet}function Le(e,t,n){e.insertBefore(t,n||null)}function Oe(e){e.parentNode&&e.parentNode.removeChild(e)}function ce(e){return document.createElement(e)}function bt(e){return document.createTextNode(e)}function Je(){return bt(" ")}function Oa(){return bt("")}function gs(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function j(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Da(e){return Array.from(e.childNodes)}function sn(e,t){t=""+t,e.data!==t&&(e.data=t)}function Cn(e,t,n,r){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,r?"important":"")}function Aa(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}const Mn=new Map;let jn=0;function Sa(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}function Ra(e,t){const n={stylesheet:wa(t),rules:{}};return Mn.set(e,n),n}function Ts(e,t,n,r,i,s,o,a=0){const u=16.666/r;let c=`{
2
- `;for(let M=0;M<=1;M+=u){const P=t+(n-t)*s(M);c+=M*100+`%{${o(P,1-P)}}
1
+ var _a=Object.defineProperty;var Na=(e,t,n)=>t in e?_a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pr=(e,t,n)=>(Na(e,typeof t!="symbol"?t+"":t,n),n);function Qe(){}const fs=e=>e;function ds(e){return e()}function Ri(){return Object.create(null)}function Pt(e){e.forEach(ds)}function zn(e){return typeof e=="function"}function Xn(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let In;function Je(e,t){return e===t?!0:(In||(In=document.createElement("a")),In.href=t,e===In.href)}function Ia(e){return Object.keys(e).length===0}function wa(e,...t){if(e==null){for(const r of t)r(void 0);return Qe}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Oa(e,t,n){e.$$.on_destroy.push(wa(t,n))}function Li(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}const ps=typeof window<"u";let hs=ps?()=>window.performance.now():()=>Date.now(),Mr=ps?e=>requestAnimationFrame(e):Qe;const Rt=new Set;function ms(e){Rt.forEach(t=>{t.c(e)||(Rt.delete(t),t.f())}),Rt.size!==0&&Mr(ms)}function ys(e){let t;return Rt.size===0&&Mr(ms),{promise:new Promise(n=>{Rt.add(t={c:e,f:n})}),abort(){Rt.delete(t)}}}function de(e,t){e.appendChild(t)}function vs(e,t,n){const r=Vr(e);if(!r.getElementById(t)){const i=Ee("style");i.id=t,i.textContent=n,Es(r,i)}}function Vr(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Aa(e){const t=Ee("style");return t.textContent="/* empty */",Es(Vr(e),t),t.sheet}function Es(e,t){return de(e.head||e,t),t.sheet}function at(e,t,n){e.insertBefore(t,n||null)}function He(e){e.parentNode&&e.parentNode.removeChild(e)}function Ee(e){return document.createElement(e)}function sn(e){return document.createTextNode(e)}function gt(){return sn(" ")}function gs(){return sn("")}function Ts(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function U(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Da(e){return Array.from(e.childNodes)}function br(e,t){t=""+t,e.data!==t&&(e.data=t)}function Sa(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}const Cn=new Map;let Mn=0;function Ra(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}function La(e,t){const n={stylesheet:Aa(t),rules:{}};return Cn.set(e,n),n}function bs(e,t,n,r,i,s,o,a=0){const u=16.666/r;let c=`{
2
+ `;for(let V=0;V<=1;V+=u){const B=t+(n-t)*s(V);c+=V*100+`%{${o(B,1-B)}}
3
3
  `}const f=c+`100% {${o(n,1-n)}}
4
- }`,d=`__svelte_${Sa(f)}_${a}`,p=Mr(e),{stylesheet:y,rules:E}=Mn.get(p)||Ra(p,e);E[d]||(E[d]=!0,y.insertRule(`@keyframes ${d} ${f}`,y.cssRules.length));const $=e.style.animation||"";return e.style.animation=`${$?`${$}, `:""}${d} ${r}ms linear ${i}ms 1 both`,jn+=1,d}function _r(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),i=n.length-r.length;i&&(e.style.animation=r.join(", "),jn-=i,jn||La())}function La(){Cr(()=>{jn||(Mn.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&Oe(t)}),Mn.clear())})}let on;function tn(e){on=e}function Fa(){if(!on)throw new Error("Function called outside component initialization");return on}function bs(e){Fa().$$.on_mount.push(e)}const St=[],Li=[];let Ft=[];const Fi=[],ka=Promise.resolve();let Nr=!1;function xa(){Nr||(Nr=!0,ka.then(_s))}function _t(e){Ft.push(e)}const mr=new Set;let Dt=0;function _s(){if(Dt!==0)return;const e=on;do{try{for(;Dt<St.length;){const t=St[Dt];Dt++,tn(t),$a(t.$$)}}catch(t){throw St.length=0,Dt=0,t}for(tn(null),St.length=0,Dt=0;Li.length;)Li.pop()();for(let t=0;t<Ft.length;t+=1){const n=Ft[t];mr.has(n)||(mr.add(n),n())}Ft.length=0}while(St.length);for(;Fi.length;)Fi.pop()();Nr=!1,mr.clear(),tn(e)}function $a(e){if(e.fragment!==null){e.update(),Pt(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(_t)}}function Ca(e){const t=[],n=[];Ft.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Ft=t}let Xt;function Ns(){return Xt||(Xt=Promise.resolve(),Xt.then(()=>{Xt=null})),Xt}function Vn(e,t,n){e.dispatchEvent(Aa(`${t?"intro":"outro"}${n}`))}const Ln=new Set;let lt;function Ma(){lt={r:0,c:[],p:lt}}function ja(){lt.r||Pt(lt.c),lt=lt.p}function Fn(e,t){e&&e.i&&(Ln.delete(e),e.i(t))}function ki(e,t,n,r){if(e&&e.o){if(Ln.has(e))return;Ln.add(e),lt.c.push(()=>{Ln.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}const Is={duration:0};function ws(e,t,n){const r={direction:"in"};let i=t(e,n,r),s=!1,o,a,u=0;function c(){o&&_r(e,o)}function f(){const{delay:p=0,duration:y=300,easing:E=fs,tick:$=Ce,css:M}=i||Is;M&&(o=Ts(e,0,1,y,p,E,M,u++)),$(0,1);const P=hs()+p,Z=P+y;a&&a.abort(),s=!0,_t(()=>Vn(e,!0,"start")),a=ys(J=>{if(s){if(J>=Z)return $(1,0),Vn(e,!0,"end"),c(),s=!1;if(J>=P){const B=E((J-P)/y);$(B,1-B)}}return s})}let d=!1;return{start(){d||(d=!0,_r(e),Xn(i)?(i=i(r),Ns().then(f)):f())},invalidate(){d=!1},end(){s&&(c(),s=!1)}}}function Os(e,t,n){const r={direction:"out"};let i=t(e,n,r),s=!0,o;const a=lt;a.r+=1;let u;function c(){const{delay:f=0,duration:d=300,easing:p=fs,tick:y=Ce,css:E}=i||Is;E&&(o=Ts(e,1,0,d,f,p,E));const $=hs()+f,M=$+d;_t(()=>Vn(e,!1,"start")),"inert"in e&&(u=e.inert,e.inert=!0),ys(P=>{if(s){if(P>=M)return y(0,1),Vn(e,!1,"end"),--a.r||Pt(a.c),!1;if(P>=$){const Z=p((P-$)/d);y(1-Z,Z)}}return s})}return Xn(i)?Ns().then(()=>{i=i(r),c()}):c(),{end(f){f&&"inert"in e&&(e.inert=u),f&&i.tick&&i.tick(1,0),s&&(o&&_r(e,o),s=!1)}}}function Va(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),_t(()=>{const s=e.$$.on_mount.map(ds).filter(Xn);e.$$.on_destroy?e.$$.on_destroy.push(...s):Pt(s),e.$$.on_mount=[]}),i.forEach(_t)}function Ua(e,t){const n=e.$$;n.fragment!==null&&(Ca(n.after_update),Pt(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Pa(e,t){e.$$.dirty[0]===-1&&(St.push(e),xa(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function jr(e,t,n,r,i,s,o=null,a=[-1]){const u=on;tn(e);const c=e.$$={fragment:null,ctx:[],props:s,update:Ce,not_equal:i,bound:Si(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Si(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};o&&o(c.root);let f=!1;if(c.ctx=n?n(e,t.props||{},(d,p,...y)=>{const E=y.length?y[0]:p;return c.ctx&&i(c.ctx[d],c.ctx[d]=E)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](E),f&&Pa(e,d)),p}):[],c.update(),f=!0,Pt(c.before_update),c.fragment=r?r(c.ctx):!1,t.target){if(t.hydrate){const d=Da(t.target);c.fragment&&c.fragment.l(d),d.forEach(Oe)}else c.fragment&&c.fragment.c();t.intro&&Fn(e.$$.fragment),Va(e,t.target,t.anchor),_s()}tn(u)}class Vr{constructor(){hr(this,"$$");hr(this,"$$set")}$destroy(){Ua(this,1),this.$destroy=Ce}$on(t,n){if(!Xn(n))return Ce;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!_a(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ba="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ba);const qa="http://localhost:58749",At=[];function Ga(e,t=Ce){let n;const r=new Set;function i(a){if(Wn(e,a)&&(e=a,n)){const u=!At.length;for(const c of r)c[1](),At.push(c,e);if(u){for(let c=0;c<At.length;c+=2)At[c][0](At[c+1]);At.length=0}}}function s(a){i(a(e))}function o(a,u=Ce){const c=[a,u];return r.add(c),r.size===1&&(n=t(i,s)||Ce),a(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:o}}const Qa={isBetarenaAdShownForToday:!1,advertDateLastShown:null};function Ya(e){const{subscribe:t,set:n,update:r}=Ga(Qa),i={useLocalStorage:()=>{let s=i.parseLocalStorage();s==null&&(s={isBetarenaAdShownForToday:!1,advertDateLastShown:null}),s.isBetarenaAdShownForToday&&new Date(s.advertDateLastShown).getDate()!=new Date().getDate()&&i.updateData([["toggleAdShownState",void 0]]),i.setLocalStorage(s)},parseLocalStorage:()=>{const s=localStorage.getItem(e);return s?JSON.parse(s):null},setLocalStorage:s=>{localStorage.setItem(e,JSON.stringify(s)),n(s)},updateData:s=>{const o=i.parseLocalStorage();if(o){for(const a of s){const u=a[0];a[1],u=="toggleAdShownState"&&(o.isBetarenaAdShownForToday=!o.isBetarenaAdShownForToday,o.isBetarenaAdShownForToday?o.advertDateLastShown=new Date:o.advertDateLastShown=null)}i.setLocalStorage(o)}}};return{subscribe:t,set:n,update:r,...i}}const Ir=Ya("betarena-ad-engine");var se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function za(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ie=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global||{},Se={searchParams:"URLSearchParams"in Ie,iterable:"Symbol"in Ie&&"iterator"in Symbol,blob:"FileReader"in Ie&&"Blob"in Ie&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in Ie,arrayBuffer:"ArrayBuffer"in Ie};function Ja(e){return e&&DataView.prototype.isPrototypeOf(e)}if(Se.arrayBuffer)var Ha=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Xa=ArrayBuffer.isView||function(e){return e&&Ha.indexOf(Object.prototype.toString.call(e))>-1};function Bt(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function Ur(e){return typeof e!="string"&&(e=String(e)),e}function Pr(e){var t={next:function(){var n=e.shift();return{done:n===void 0,value:n}}};return Se.iterable&&(t[Symbol.iterator]=function(){return t}),t}function _e(e){this.map={},e instanceof _e?e.forEach(function(t,n){this.append(n,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}_e.prototype.append=function(e,t){e=Bt(e),t=Ur(t);var n=this.map[e];this.map[e]=n?n+", "+t:t};_e.prototype.delete=function(e){delete this.map[Bt(e)]};_e.prototype.get=function(e){return e=Bt(e),this.has(e)?this.map[e]:null};_e.prototype.has=function(e){return this.map.hasOwnProperty(Bt(e))};_e.prototype.set=function(e,t){this.map[Bt(e)]=Ur(t)};_e.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)};_e.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),Pr(e)};_e.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),Pr(e)};_e.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),Pr(e)};Se.iterable&&(_e.prototype[Symbol.iterator]=_e.prototype.entries);function yr(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function Ds(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function Wa(e){var t=new FileReader,n=Ds(t);return t.readAsArrayBuffer(e),n}function Ka(e){var t=new FileReader,n=Ds(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),n}function Za(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function xi(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function As(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:Se.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Se.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Se.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Se.arrayBuffer&&Se.blob&&Ja(e)?(this._bodyArrayBuffer=xi(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Se.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Xa(e))?this._bodyArrayBuffer=xi(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Se.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Se.blob&&(this.blob=function(){var e=yr(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=yr(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(Se.blob)return this.blob().then(Wa);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=yr(this);if(e)return e;if(this._bodyBlob)return Ka(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Za(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Se.formData&&(this.formData=function(){return this.text().then(nu)}),this.json=function(){return this.text().then(JSON.parse)},this}var eu=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function tu(e){var t=e.toUpperCase();return eu.indexOf(t)>-1?t:e}function Nt(e,t){if(!(this instanceof Nt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var n=t.body;if(e instanceof Nt){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new _e(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&e._bodyInit!=null&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new _e(t.headers)),this.method=tu(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in Ie){var s=new AbortController;return s.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Nt.prototype.clone=function(){return new Nt(this,{body:this._bodyInit})};function nu(e){var t=new FormData;return e.trim().split("&").forEach(function(n){if(n){var r=n.split("="),i=r.shift().replace(/\+/g," "),s=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(s))}}),t}function ru(e){var t=new _e,n=e.replace(/\r?\n[\t ]+/g," ");return n.split("\r").map(function(r){return r.indexOf(`
5
- `)===0?r.substr(1,r.length):r}).forEach(function(r){var i=r.split(":"),s=i.shift().trim();if(s){var o=i.join(":").trim();try{t.append(s,o)}catch(a){console.warn("Response "+a.message)}}}),t}As.call(Nt.prototype);function et(e,t){if(!(this instanceof et))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new _e(t.headers),this.url=t.url||"",this._initBody(e)}As.call(et.prototype);et.prototype.clone=function(){return new et(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _e(this.headers),url:this.url})};et.error=function(){var e=new et(null,{status:200,statusText:""});return e.status=0,e.type="error",e};var iu=[301,302,303,307,308];et.redirect=function(e,t){if(iu.indexOf(t)===-1)throw new RangeError("Invalid status code");return new et(null,{status:t,headers:{location:e}})};var gt=Ie.DOMException;try{new gt}catch{gt=function(t,n){this.message=t,this.name=n;var r=Error(t);this.stack=r.stack},gt.prototype=Object.create(Error.prototype),gt.prototype.constructor=gt}function Ss(e,t){return new Promise(function(n,r){var i=new Nt(e,t);if(i.signal&&i.signal.aborted)return r(new gt("Aborted","AbortError"));var s=new XMLHttpRequest;function o(){s.abort()}s.onload=function(){var c={statusText:s.statusText,headers:ru(s.getAllResponseHeaders()||"")};i.url.startsWith("file://")&&(s.status<200||s.status>599)?c.status=200:c.status=s.status,c.url="responseURL"in s?s.responseURL:c.headers.get("X-Request-URL");var f="response"in s?s.response:s.responseText;setTimeout(function(){n(new et(f,c))},0)},s.onerror=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},s.ontimeout=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},s.onabort=function(){setTimeout(function(){r(new gt("Aborted","AbortError"))},0)};function a(c){try{return c===""&&Ie.location.href?Ie.location.href:c}catch{return c}}if(s.open(i.method,a(i.url),!0),i.credentials==="include"?s.withCredentials=!0:i.credentials==="omit"&&(s.withCredentials=!1),"responseType"in s&&(Se.blob?s.responseType="blob":Se.arrayBuffer&&(s.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof _e||Ie.Headers&&t.headers instanceof Ie.Headers)){var u=[];Object.getOwnPropertyNames(t.headers).forEach(function(c){u.push(Bt(c)),s.setRequestHeader(c,Ur(t.headers[c]))}),i.headers.forEach(function(c,f){u.indexOf(f)===-1&&s.setRequestHeader(f,c)})}else i.headers.forEach(function(c,f){s.setRequestHeader(f,c)});i.signal&&(i.signal.addEventListener("abort",o),s.onreadystatechange=function(){s.readyState===4&&i.signal.removeEventListener("abort",o)}),s.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}Ss.polyfill=!0;Ie.fetch||(Ie.fetch=Ss,Ie.Headers=_e,Ie.Request=Nt,Ie.Response=et);self.fetch.bind(self);const su=async(e,t)=>{try{return await e()}catch(n){return t!=null?t(n):(console.error(`🚏 checkpoint ➤ tryCatchAsync(..) error :: ❌ ${JSON.stringify(n)}`),null)}};async function ou(e,t){return console.log("path",e),console.log("data",t),await su(async()=>{const n=await fetch(e,{method:"POST",credentials:"include",body:JSON.stringify(t),mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json"}}),r=await n.json();if(!n.ok)throw new Error(JSON.stringify(r)??"network response was not ok");return r},n=>(console.error(`💀 Unhandled :: ${n}`),{error:!0,errorLogs:n}))}function $i(){const e=navigator.userAgent.toLowerCase(),t=e.includes("mobile"),n=/tablet|ipad/.test(e);return t?"mobile":n?"tablet":"desktop"}async function au(){return await(await fetch("https://get.geojs.io/v1/ip/geo.json",{method:"GET"})).json()}var qt={},wr={exports:{}};(function(e,t){var n=typeof self<"u"?self:se,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function u(m){return m&&DataView.prototype.isPrototypeOf(m)}if(a.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(m){return m&&c.indexOf(Object.prototype.toString.call(m))>-1};function d(m){if(typeof m!="string"&&(m=String(m)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(m))throw new TypeError("Invalid character in header field name");return m.toLowerCase()}function p(m){return typeof m!="string"&&(m=String(m)),m}function y(m){var A={next:function(){var q=m.shift();return{done:q===void 0,value:q}}};return a.iterable&&(A[Symbol.iterator]=function(){return A}),A}function E(m){this.map={},m instanceof E?m.forEach(function(A,q){this.append(q,A)},this):Array.isArray(m)?m.forEach(function(A){this.append(A[0],A[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(A){this.append(A,m[A])},this)}E.prototype.append=function(m,A){m=d(m),A=p(A);var q=this.map[m];this.map[m]=q?q+", "+A:A},E.prototype.delete=function(m){delete this.map[d(m)]},E.prototype.get=function(m){return m=d(m),this.has(m)?this.map[m]:null},E.prototype.has=function(m){return this.map.hasOwnProperty(d(m))},E.prototype.set=function(m,A){this.map[d(m)]=p(A)},E.prototype.forEach=function(m,A){for(var q in this.map)this.map.hasOwnProperty(q)&&m.call(A,this.map[q],q,this)},E.prototype.keys=function(){var m=[];return this.forEach(function(A,q){m.push(q)}),y(m)},E.prototype.values=function(){var m=[];return this.forEach(function(A){m.push(A)}),y(m)},E.prototype.entries=function(){var m=[];return this.forEach(function(A,q){m.push([q,A])}),y(m)},a.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function $(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}function M(m){return new Promise(function(A,q){m.onload=function(){A(m.result)},m.onerror=function(){q(m.error)}})}function P(m){var A=new FileReader,q=M(A);return A.readAsArrayBuffer(m),q}function Z(m){var A=new FileReader,q=M(A);return A.readAsText(m),q}function J(m){for(var A=new Uint8Array(m),q=new Array(A.length),T=0;T<A.length;T++)q[T]=String.fromCharCode(A[T]);return q.join("")}function B(m){if(m.slice)return m.slice(0);var A=new Uint8Array(m.byteLength);return A.set(new Uint8Array(m)),A.buffer}function U(){return this.bodyUsed=!1,this._initBody=function(m){this._bodyInit=m,m?typeof m=="string"?this._bodyText=m:a.blob&&Blob.prototype.isPrototypeOf(m)?this._bodyBlob=m:a.formData&&FormData.prototype.isPrototypeOf(m)?this._bodyFormData=m:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)?this._bodyText=m.toString():a.arrayBuffer&&a.blob&&u(m)?(this._bodyArrayBuffer=B(m.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(m)||f(m))?this._bodyArrayBuffer=B(m):this._bodyText=m=Object.prototype.toString.call(m):this._bodyText="",this.headers.get("content-type")||(typeof m=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var m=$(this);if(m)return m;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?$(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(P)}),this.text=function(){var m=$(this);if(m)return m;if(this._bodyBlob)return Z(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(J(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}var F=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function D(m){var A=m.toUpperCase();return F.indexOf(A)>-1?A:m}function Q(m,A){A=A||{};var q=A.body;if(m instanceof Q){if(m.bodyUsed)throw new TypeError("Already read");this.url=m.url,this.credentials=m.credentials,A.headers||(this.headers=new E(m.headers)),this.method=m.method,this.mode=m.mode,this.signal=m.signal,!q&&m._bodyInit!=null&&(q=m._bodyInit,m.bodyUsed=!0)}else this.url=String(m);if(this.credentials=A.credentials||this.credentials||"same-origin",(A.headers||!this.headers)&&(this.headers=new E(A.headers)),this.method=D(A.method||this.method||"GET"),this.mode=A.mode||this.mode||null,this.signal=A.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&q)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(q)}Q.prototype.clone=function(){return new Q(this,{body:this._bodyInit})};function g(m){var A=new FormData;return m.trim().split("&").forEach(function(q){if(q){var T=q.split("="),w=T.shift().replace(/\+/g," "),b=T.join("=").replace(/\+/g," ");A.append(decodeURIComponent(w),decodeURIComponent(b))}}),A}function v(m){var A=new E,q=m.replace(/\r?\n[\t ]+/g," ");return q.split(/\r?\n/).forEach(function(T){var w=T.split(":"),b=w.shift().trim();if(b){var S=w.join(":").trim();A.append(b,S)}}),A}U.call(Q.prototype);function C(m,A){A||(A={}),this.type="default",this.status=A.status===void 0?200:A.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in A?A.statusText:"OK",this.headers=new E(A.headers),this.url=A.url||"",this._initBody(m)}U.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},C.error=function(){var m=new C(null,{status:0,statusText:""});return m.type="error",m};var H=[301,302,303,307,308];C.redirect=function(m,A){if(H.indexOf(A)===-1)throw new RangeError("Invalid status code");return new C(null,{status:A,headers:{location:m}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(A,q){this.message=A,this.name=q;var T=Error(A);this.stack=T.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function ie(m,A){return new Promise(function(q,T){var w=new Q(m,A);if(w.signal&&w.signal.aborted)return T(new o.DOMException("Aborted","AbortError"));var b=new XMLHttpRequest;function S(){b.abort()}b.onload=function(){var L={status:b.status,statusText:b.statusText,headers:v(b.getAllResponseHeaders()||"")};L.url="responseURL"in b?b.responseURL:L.headers.get("X-Request-URL");var h="response"in b?b.response:b.responseText;q(new C(h,L))},b.onerror=function(){T(new TypeError("Network request failed"))},b.ontimeout=function(){T(new TypeError("Network request failed"))},b.onabort=function(){T(new o.DOMException("Aborted","AbortError"))},b.open(w.method,w.url,!0),w.credentials==="include"?b.withCredentials=!0:w.credentials==="omit"&&(b.withCredentials=!1),"responseType"in b&&a.blob&&(b.responseType="blob"),w.headers.forEach(function(L,h){b.setRequestHeader(h,L)}),w.signal&&(w.signal.addEventListener("abort",S),b.onreadystatechange=function(){b.readyState===4&&w.signal.removeEventListener("abort",S)}),b.send(typeof w._bodyInit>"u"?null:w._bodyInit)})}return ie.polyfill=!0,s.fetch||(s.fetch=ie,s.Headers=E,s.Request=Q,s.Response=C),o.Headers=E,o.Request=Q,o.Response=C,o.fetch=ie,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(wr,wr.exports);var uu=wr.exports,Br={},Kn={},Rs=function(t){var n=t.uri,r=t.name,i=t.type;this.uri=n,this.name=r,this.type=i},cu=Rs,Ls=function(t){return typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||t instanceof cu},lu=Ls,fu=function e(t,n,r){n===void 0&&(n=""),r===void 0&&(r=lu);var i,s=new Map;function o(f,d){var p=s.get(d);p?p.push.apply(p,f):s.set(d,f)}if(r(t))i=null,o([n],t);else{var a=n?n+".":"";if(typeof FileList<"u"&&t instanceof FileList)i=Array.prototype.map.call(t,function(f,d){return o([""+a+d],f),null});else if(Array.isArray(t))i=t.map(function(f,d){var p=e(f,""+a+d,r);return p.files.forEach(o),p.clone});else if(t&&t.constructor===Object){i={};for(var u in t){var c=e(t[u],""+a+u,r);c.files.forEach(o),i[u]=c.clone}}else i=t}return{clone:i,files:s}};Kn.ReactNativeFile=Rs;Kn.extractFiles=fu;Kn.isExtractableFile=Ls;var du=typeof self=="object"?self.FormData:window.FormData,pn={};Object.defineProperty(pn,"__esModule",{value:!0});pn.defaultJsonSerializer=void 0;pn.defaultJsonSerializer={parse:JSON.parse,stringify:JSON.stringify};var pu=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Br,"__esModule",{value:!0});var Fs=Kn,hu=pu(du),mu=pn,yu=function(e){return(0,Fs.isExtractableFile)(e)||e!==null&&typeof e=="object"&&typeof e.pipe=="function"};function vu(e,t,n,r){r===void 0&&(r=mu.defaultJsonSerializer);var i=(0,Fs.extractFiles)({query:e,variables:t,operationName:n},"",yu),s=i.clone,o=i.files;if(o.size===0){if(!Array.isArray(e))return r.stringify(s);if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");var a=e.reduce(function(p,y,E){return p.push({query:y,variables:t?t[E]:void 0}),p},[]);return r.stringify(a)}var u=typeof FormData>"u"?hu.default:FormData,c=new u;c.append("operations",r.stringify(s));var f={},d=0;return o.forEach(function(p){f[++d]=p}),c.append("map",r.stringify(f)),d=0,o.forEach(function(p,y){c.append("".concat(++d),y)}),c}Br.default=vu;var Fe={};Object.defineProperty(Fe,"__esModule",{value:!0});Fe.parseBatchRequestsExtendedArgs=Fe.parseRawRequestExtendedArgs=Fe.parseRequestExtendedArgs=Fe.parseBatchRequestArgs=Fe.parseRawRequestArgs=Fe.parseRequestArgs=void 0;function Eu(e,t,n){return e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0}}Fe.parseRequestArgs=Eu;function gu(e,t,n){return e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0}}Fe.parseRawRequestArgs=gu;function Tu(e,t){return e.documents?e:{documents:e,requestHeaders:t,signal:void 0}}Fe.parseBatchRequestArgs=Tu;function bu(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1];return e.document?e:{url:e,document:t,variables:i,requestHeaders:s,signal:void 0}}Fe.parseRequestExtendedArgs=bu;function _u(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1];return e.query?e:{url:e,query:t,variables:i,requestHeaders:s,signal:void 0}}Fe.parseRawRequestExtendedArgs=_u;function Nu(e,t,n){return e.documents?e:{url:e,documents:t,requestHeaders:n,signal:void 0}}Fe.parseBatchRequestsExtendedArgs=Nu;var hn={},Iu=se&&se.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(hn,"__esModule",{value:!0});hn.ClientError=void 0;var wu=function(e){Iu(t,e);function t(n,r){var i=this,s="".concat(t.extractMessage(n),": ").concat(JSON.stringify({response:n,request:r}));return i=e.call(this,s)||this,Object.setPrototypeOf(i,t.prototype),i.response=n,i.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,t),i}return t.extractMessage=function(n){try{return n.errors[0].message}catch{return"GraphQL Error (Code: ".concat(n.status,")")}},t}(Error);hn.ClientError=wu;var xt={};const Ou="16.6.0",Du=Object.freeze({major:16,minor:6,patch:0,preReleaseTag:null});function K(e,t){if(!!!e)throw new Error(t)}function je(e){return typeof(e==null?void 0:e.then)=="function"}function Ve(e){return typeof e=="object"&&e!==null}function ye(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const Au=/\r\n|[\n\r]/g;function Un(e,t){let n=0,r=1;for(const i of e.body.matchAll(Au)){if(typeof i.index=="number"||ye(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function ks(e){return qr(e.source,Un(e.source,e.start))}function qr(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,u=t.column+a,c=`${e.name}:${o}:${u}
6
- `,f=r.split(/\r\n|[\n\r]/g),d=f[i];if(d.length>120){const p=Math.floor(u/80),y=u%80,E=[];for(let $=0;$<d.length;$+=80)E.push(d.slice($,$+80));return c+Ci([[`${o} |`,E[0]],...E.slice(1,p+1).map($=>["|",$]),["|","^".padStart(y)],["|",E[p+1]]])}return c+Ci([[`${o-1} |`,f[i-1]],[`${o} |`,d],["|","^".padStart(u)],[`${o+1} |`,f[i+1]]])}function Ci(e){const 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(`
7
- `)}function Su(e){const 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}class _ extends Error{constructor(t,...n){var r,i,s;const{nodes:o,source:a,positions:u,path:c,originalError:f,extensions:d}=Su(n);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=f??void 0,this.nodes=Mi(Array.isArray(o)?o:o?[o]:void 0);const p=Mi((r=this.nodes)===null||r===void 0?void 0:r.map(E=>E.loc).filter(E=>E!=null));this.source=a??(p==null||(i=p[0])===null||i===void 0?void 0:i.source),this.positions=u??(p==null?void 0:p.map(E=>E.start)),this.locations=u&&a?u.map(E=>Un(a,E)):p==null?void 0:p.map(E=>Un(E.source,E.start));const y=Ve(f==null?void 0:f.extensions)?f==null?void 0:f.extensions:void 0;this.extensions=(s=d??y)!==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}}),f!=null&&f.stack?Object.defineProperty(this,"stack",{value:f.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,_):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(const n of this.nodes)n.loc&&(t+=`
4
+ }`,d=`__svelte_${Ra(f)}_${a}`,h=Vr(e),{stylesheet:y,rules:E}=Cn.get(h)||La(h,e);E[d]||(E[d]=!0,y.insertRule(`@keyframes ${d} ${f}`,y.cssRules.length));const $=e.style.animation||"";return e.style.animation=`${$?`${$}, `:""}${d} ${r}ms linear ${i}ms 1 both`,Mn+=1,d}function _r(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),i=n.length-r.length;i&&(e.style.animation=r.join(", "),Mn-=i,Mn||ka())}function ka(){Mr(()=>{Mn||(Cn.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&He(t)}),Cn.clear())})}let on;function en(e){on=e}function Fa(){if(!on)throw new Error("Function called outside component initialization");return on}function _s(e){Fa().$$.on_mount.push(e)}const Dt=[],ki=[];let Lt=[];const Fi=[],xa=Promise.resolve();let Nr=!1;function $a(){Nr||(Nr=!0,xa.then(Ns))}function bt(e){Lt.push(e)}const hr=new Set;let Ot=0;function Ns(){if(Ot!==0)return;const e=on;do{try{for(;Ot<Dt.length;){const t=Dt[Ot];Ot++,en(t),Ca(t.$$)}}catch(t){throw Dt.length=0,Ot=0,t}for(en(null),Dt.length=0,Ot=0;ki.length;)ki.pop()();for(let t=0;t<Lt.length;t+=1){const n=Lt[t];hr.has(n)||(hr.add(n),n())}Lt.length=0}while(Dt.length);for(;Fi.length;)Fi.pop()();Nr=!1,hr.clear(),en(e)}function Ca(e){if(e.fragment!==null){e.update(),Pt(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(bt)}}function Ma(e){const t=[],n=[];Lt.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Lt=t}let zt;function Is(){return zt||(zt=Promise.resolve(),zt.then(()=>{zt=null})),zt}function Vn(e,t,n){e.dispatchEvent(Sa(`${t?"intro":"outro"}${n}`))}const kn=new Set;let ct;function Va(){ct={r:0,c:[],p:ct}}function Ua(){ct.r||Pt(ct.c),ct=ct.p}function tn(e,t){e&&e.i&&(kn.delete(e),e.i(t))}function Ir(e,t,n,r){if(e&&e.o){if(kn.has(e))return;kn.add(e),ct.c.push(()=>{kn.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}const ws={duration:0};function Os(e,t,n){const r={direction:"in"};let i=t(e,n,r),s=!1,o,a,u=0;function c(){o&&_r(e,o)}function f(){const{delay:h=0,duration:y=300,easing:E=fs,tick:$=Qe,css:V}=i||ws;V&&(o=bs(e,0,1,y,h,E,V,u++)),$(0,1);const B=hs()+h,X=B+y;a&&a.abort(),s=!0,bt(()=>Vn(e,!0,"start")),a=ys(z=>{if(s){if(z>=X)return $(1,0),Vn(e,!0,"end"),c(),s=!1;if(z>=B){const Q=E((z-B)/y);$(Q,1-Q)}}return s})}let d=!1;return{start(){d||(d=!0,_r(e),zn(i)?(i=i(r),Is().then(f)):f())},invalidate(){d=!1},end(){s&&(c(),s=!1)}}}function As(e,t,n){const r={direction:"out"};let i=t(e,n,r),s=!0,o;const a=ct;a.r+=1;let u;function c(){const{delay:f=0,duration:d=300,easing:h=fs,tick:y=Qe,css:E}=i||ws;E&&(o=bs(e,1,0,d,f,h,E));const $=hs()+f,V=$+d;bt(()=>Vn(e,!1,"start")),"inert"in e&&(u=e.inert,e.inert=!0),ys(B=>{if(s){if(B>=V)return y(0,1),Vn(e,!1,"end"),--a.r||Pt(a.c),!1;if(B>=$){const X=h((B-$)/d);y(1-X,X)}}return s})}return zn(i)?Is().then(()=>{i=i(r),c()}):c(),{end(f){f&&"inert"in e&&(e.inert=u),f&&i.tick&&i.tick(1,0),s&&(o&&_r(e,o),s=!1)}}}function Pa(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),bt(()=>{const s=e.$$.on_mount.map(ds).filter(zn);e.$$.on_destroy?e.$$.on_destroy.push(...s):Pt(s),e.$$.on_mount=[]}),i.forEach(bt)}function ja(e,t){const n=e.$$;n.fragment!==null&&(Ma(n.after_update),Pt(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ba(e,t){e.$$.dirty[0]===-1&&(Dt.push(e),$a(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ur(e,t,n,r,i,s,o=null,a=[-1]){const u=on;en(e);const c=e.$$={fragment:null,ctx:[],props:s,update:Qe,not_equal:i,bound:Ri(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Ri(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};o&&o(c.root);let f=!1;if(c.ctx=n?n(e,t.props||{},(d,h,...y)=>{const E=y.length?y[0]:h;return c.ctx&&i(c.ctx[d],c.ctx[d]=E)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](E),f&&Ba(e,d)),h}):[],c.update(),f=!0,Pt(c.before_update),c.fragment=r?r(c.ctx):!1,t.target){if(t.hydrate){const d=Da(t.target);c.fragment&&c.fragment.l(d),d.forEach(He)}else c.fragment&&c.fragment.c();t.intro&&tn(e.$$.fragment),Pa(e,t.target,t.anchor),Ns()}en(u)}class Pr{constructor(){pr(this,"$$");pr(this,"$$set")}$destroy(){ja(this,1),this.$destroy=Qe}$on(t,n){if(!zn(n))return Qe;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!Ia(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const qa="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(qa);const Ga="https://betarena-test-e2748dab12f5.herokuapp.com",At=[];function Ds(e,t=Qe){let n;const r=new Set;function i(a){if(Xn(e,a)&&(e=a,n)){const u=!At.length;for(const c of r)c[1](),At.push(c,e);if(u){for(let c=0;c<At.length;c+=2)At[c][0](At[c+1]);At.length=0}}}function s(a){i(a(e))}function o(a,u=Qe){const c=[a,u];return r.add(c),r.size===1&&(n=t(i,s)||Qe),a(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:o}}const Qa={isBetarenaAdShownForToday:!1,advertDateLastShown:null};function Ya(e){const{subscribe:t,set:n,update:r}=Ds(Qa),i={useLocalStorage:()=>{let s=i.parseLocalStorage();s==null&&(s={isBetarenaAdShownForToday:!1,advertDateLastShown:null}),s.isBetarenaAdShownForToday&&new Date(s.advertDateLastShown).getDate()!=new Date().getDate()&&i.updateData([["toggleAdShownState",void 0]]),i.setLocalStorage(s)},parseLocalStorage:()=>{const s=localStorage.getItem(e);return s?JSON.parse(s):null},setLocalStorage:s=>{localStorage.setItem(e,JSON.stringify(s)),n(s)},updateData:s=>{const o=i.parseLocalStorage();if(o){for(const a of s){const u=a[0];a[1],u=="toggleAdShownState"&&(o.isBetarenaAdShownForToday=!o.isBetarenaAdShownForToday,o.isBetarenaAdShownForToday?o.advertDateLastShown=new Date:o.advertDateLastShown=null)}i.setLocalStorage(o)}}};return{subscribe:t,set:n,update:r,...i}}const wr=Ya("betarena-ad-engine");var ie=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ja(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ie=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global||{},De={searchParams:"URLSearchParams"in Ie,iterable:"Symbol"in Ie&&"iterator"in Symbol,blob:"FileReader"in Ie&&"Blob"in Ie&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in Ie,arrayBuffer:"ArrayBuffer"in Ie};function Ha(e){return e&&DataView.prototype.isPrototypeOf(e)}if(De.arrayBuffer)var za=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Xa=ArrayBuffer.isView||function(e){return e&&za.indexOf(Object.prototype.toString.call(e))>-1};function jt(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function jr(e){return typeof e!="string"&&(e=String(e)),e}function Br(e){var t={next:function(){var n=e.shift();return{done:n===void 0,value:n}}};return De.iterable&&(t[Symbol.iterator]=function(){return t}),t}function _e(e){this.map={},e instanceof _e?e.forEach(function(t,n){this.append(n,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}_e.prototype.append=function(e,t){e=jt(e),t=jr(t);var n=this.map[e];this.map[e]=n?n+", "+t:t};_e.prototype.delete=function(e){delete this.map[jt(e)]};_e.prototype.get=function(e){return e=jt(e),this.has(e)?this.map[e]:null};_e.prototype.has=function(e){return this.map.hasOwnProperty(jt(e))};_e.prototype.set=function(e,t){this.map[jt(e)]=jr(t)};_e.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)};_e.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),Br(e)};_e.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),Br(e)};_e.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),Br(e)};De.iterable&&(_e.prototype[Symbol.iterator]=_e.prototype.entries);function mr(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function Ss(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function Wa(e){var t=new FileReader,n=Ss(t);return t.readAsArrayBuffer(e),n}function Ka(e){var t=new FileReader,n=Ss(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),n}function Za(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function xi(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Rs(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:De.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:De.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:De.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():De.arrayBuffer&&De.blob&&Ha(e)?(this._bodyArrayBuffer=xi(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):De.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Xa(e))?this._bodyArrayBuffer=xi(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):De.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},De.blob&&(this.blob=function(){var e=mr(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=mr(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(De.blob)return this.blob().then(Wa);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=mr(this);if(e)return e;if(this._bodyBlob)return Ka(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Za(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},De.formData&&(this.formData=function(){return this.text().then(nu)}),this.json=function(){return this.text().then(JSON.parse)},this}var eu=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function tu(e){var t=e.toUpperCase();return eu.indexOf(t)>-1?t:e}function _t(e,t){if(!(this instanceof _t))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var n=t.body;if(e instanceof _t){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new _e(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&e._bodyInit!=null&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new _e(t.headers)),this.method=tu(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in Ie){var s=new AbortController;return s.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}_t.prototype.clone=function(){return new _t(this,{body:this._bodyInit})};function nu(e){var t=new FormData;return e.trim().split("&").forEach(function(n){if(n){var r=n.split("="),i=r.shift().replace(/\+/g," "),s=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(s))}}),t}function ru(e){var t=new _e,n=e.replace(/\r?\n[\t ]+/g," ");return n.split("\r").map(function(r){return r.indexOf(`
5
+ `)===0?r.substr(1,r.length):r}).forEach(function(r){var i=r.split(":"),s=i.shift().trim();if(s){var o=i.join(":").trim();try{t.append(s,o)}catch(a){console.warn("Response "+a.message)}}}),t}Rs.call(_t.prototype);function Ke(e,t){if(!(this instanceof Ke))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new _e(t.headers),this.url=t.url||"",this._initBody(e)}Rs.call(Ke.prototype);Ke.prototype.clone=function(){return new Ke(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _e(this.headers),url:this.url})};Ke.error=function(){var e=new Ke(null,{status:200,statusText:""});return e.status=0,e.type="error",e};var iu=[301,302,303,307,308];Ke.redirect=function(e,t){if(iu.indexOf(t)===-1)throw new RangeError("Invalid status code");return new Ke(null,{status:t,headers:{location:e}})};var Et=Ie.DOMException;try{new Et}catch{Et=function(t,n){this.message=t,this.name=n;var r=Error(t);this.stack=r.stack},Et.prototype=Object.create(Error.prototype),Et.prototype.constructor=Et}function Ls(e,t){return new Promise(function(n,r){var i=new _t(e,t);if(i.signal&&i.signal.aborted)return r(new Et("Aborted","AbortError"));var s=new XMLHttpRequest;function o(){s.abort()}s.onload=function(){var c={statusText:s.statusText,headers:ru(s.getAllResponseHeaders()||"")};i.url.startsWith("file://")&&(s.status<200||s.status>599)?c.status=200:c.status=s.status,c.url="responseURL"in s?s.responseURL:c.headers.get("X-Request-URL");var f="response"in s?s.response:s.responseText;setTimeout(function(){n(new Ke(f,c))},0)},s.onerror=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},s.ontimeout=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},s.onabort=function(){setTimeout(function(){r(new Et("Aborted","AbortError"))},0)};function a(c){try{return c===""&&Ie.location.href?Ie.location.href:c}catch{return c}}if(s.open(i.method,a(i.url),!0),i.credentials==="include"?s.withCredentials=!0:i.credentials==="omit"&&(s.withCredentials=!1),"responseType"in s&&(De.blob?s.responseType="blob":De.arrayBuffer&&(s.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof _e||Ie.Headers&&t.headers instanceof Ie.Headers)){var u=[];Object.getOwnPropertyNames(t.headers).forEach(function(c){u.push(jt(c)),s.setRequestHeader(c,jr(t.headers[c]))}),i.headers.forEach(function(c,f){u.indexOf(f)===-1&&s.setRequestHeader(f,c)})}else i.headers.forEach(function(c,f){s.setRequestHeader(f,c)});i.signal&&(i.signal.addEventListener("abort",o),s.onreadystatechange=function(){s.readyState===4&&i.signal.removeEventListener("abort",o)}),s.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}Ls.polyfill=!0;Ie.fetch||(Ie.fetch=Ls,Ie.Headers=_e,Ie.Request=_t,Ie.Response=Ke);self.fetch.bind(self);const su=async(e,t)=>{try{return await e()}catch(n){return t!=null?t(n):(console.error(`🚏 checkpoint ➤ tryCatchAsync(..) error :: ❌ ${JSON.stringify(n)}`),null)}};async function ou(e,t){return console.log("path",e),console.log("data",t),await su(async()=>{const n=await fetch(e,{method:"POST",credentials:"include",body:JSON.stringify(t),mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json"}}),r=await n.json();if(!n.ok)throw new Error(JSON.stringify(r)??"network response was not ok");return r},n=>(console.error(`💀 Unhandled :: ${n}`),{error:!0,errorLogs:n}))}function $i(){const e=navigator.userAgent.toLowerCase(),t=e.includes("mobile"),n=/tablet|ipad/.test(e);return t?"mobile":n?"tablet":"desktop"}async function au(){return await(await fetch("https://get.geojs.io/v1/ip/geo.json",{method:"GET"})).json()}var Bt={},Or={exports:{}};(function(e,t){var n=typeof self<"u"?self:ie,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function u(m){return m&&DataView.prototype.isPrototypeOf(m)}if(a.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(m){return m&&c.indexOf(Object.prototype.toString.call(m))>-1};function d(m){if(typeof m!="string"&&(m=String(m)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(m))throw new TypeError("Invalid character in header field name");return m.toLowerCase()}function h(m){return typeof m!="string"&&(m=String(m)),m}function y(m){var A={next:function(){var q=m.shift();return{done:q===void 0,value:q}}};return a.iterable&&(A[Symbol.iterator]=function(){return A}),A}function E(m){this.map={},m instanceof E?m.forEach(function(A,q){this.append(q,A)},this):Array.isArray(m)?m.forEach(function(A){this.append(A[0],A[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(A){this.append(A,m[A])},this)}E.prototype.append=function(m,A){m=d(m),A=h(A);var q=this.map[m];this.map[m]=q?q+", "+A:A},E.prototype.delete=function(m){delete this.map[d(m)]},E.prototype.get=function(m){return m=d(m),this.has(m)?this.map[m]:null},E.prototype.has=function(m){return this.map.hasOwnProperty(d(m))},E.prototype.set=function(m,A){this.map[d(m)]=h(A)},E.prototype.forEach=function(m,A){for(var q in this.map)this.map.hasOwnProperty(q)&&m.call(A,this.map[q],q,this)},E.prototype.keys=function(){var m=[];return this.forEach(function(A,q){m.push(q)}),y(m)},E.prototype.values=function(){var m=[];return this.forEach(function(A){m.push(A)}),y(m)},E.prototype.entries=function(){var m=[];return this.forEach(function(A,q){m.push([q,A])}),y(m)},a.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function $(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}function V(m){return new Promise(function(A,q){m.onload=function(){A(m.result)},m.onerror=function(){q(m.error)}})}function B(m){var A=new FileReader,q=V(A);return A.readAsArrayBuffer(m),q}function X(m){var A=new FileReader,q=V(A);return A.readAsText(m),q}function z(m){for(var A=new Uint8Array(m),q=new Array(A.length),g=0;g<A.length;g++)q[g]=String.fromCharCode(A[g]);return q.join("")}function Q(m){if(m.slice)return m.slice(0);var A=new Uint8Array(m.byteLength);return A.set(new Uint8Array(m)),A.buffer}function C(){return this.bodyUsed=!1,this._initBody=function(m){this._bodyInit=m,m?typeof m=="string"?this._bodyText=m:a.blob&&Blob.prototype.isPrototypeOf(m)?this._bodyBlob=m:a.formData&&FormData.prototype.isPrototypeOf(m)?this._bodyFormData=m:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)?this._bodyText=m.toString():a.arrayBuffer&&a.blob&&u(m)?(this._bodyArrayBuffer=Q(m.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(m)||f(m))?this._bodyArrayBuffer=Q(m):this._bodyText=m=Object.prototype.toString.call(m):this._bodyText="",this.headers.get("content-type")||(typeof m=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var m=$(this);if(m)return m;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?$(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(B)}),this.text=function(){var m=$(this);if(m)return m;if(this._bodyBlob)return X(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(z(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function R(m){var A=m.toUpperCase();return x.indexOf(A)>-1?A:m}function M(m,A){A=A||{};var q=A.body;if(m instanceof M){if(m.bodyUsed)throw new TypeError("Already read");this.url=m.url,this.credentials=m.credentials,A.headers||(this.headers=new E(m.headers)),this.method=m.method,this.mode=m.mode,this.signal=m.signal,!q&&m._bodyInit!=null&&(q=m._bodyInit,m.bodyUsed=!0)}else this.url=String(m);if(this.credentials=A.credentials||this.credentials||"same-origin",(A.headers||!this.headers)&&(this.headers=new E(A.headers)),this.method=R(A.method||this.method||"GET"),this.mode=A.mode||this.mode||null,this.signal=A.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&q)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(q)}M.prototype.clone=function(){return new M(this,{body:this._bodyInit})};function v(m){var A=new FormData;return m.trim().split("&").forEach(function(q){if(q){var g=q.split("="),w=g.shift().replace(/\+/g," "),T=g.join("=").replace(/\+/g," ");A.append(decodeURIComponent(w),decodeURIComponent(T))}}),A}function b(m){var A=new E,q=m.replace(/\r?\n[\t ]+/g," ");return q.split(/\r?\n/).forEach(function(g){var w=g.split(":"),T=w.shift().trim();if(T){var D=w.join(":").trim();A.append(T,D)}}),A}C.call(M.prototype);function P(m,A){A||(A={}),this.type="default",this.status=A.status===void 0?200:A.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in A?A.statusText:"OK",this.headers=new E(A.headers),this.url=A.url||"",this._initBody(m)}C.call(P.prototype),P.prototype.clone=function(){return new P(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},P.error=function(){var m=new P(null,{status:0,statusText:""});return m.type="error",m};var W=[301,302,303,307,308];P.redirect=function(m,A){if(W.indexOf(A)===-1)throw new RangeError("Invalid status code");return new P(null,{status:A,headers:{location:m}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(A,q){this.message=A,this.name=q;var g=Error(A);this.stack=g.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function oe(m,A){return new Promise(function(q,g){var w=new M(m,A);if(w.signal&&w.signal.aborted)return g(new o.DOMException("Aborted","AbortError"));var T=new XMLHttpRequest;function D(){T.abort()}T.onload=function(){var L={status:T.status,statusText:T.statusText,headers:b(T.getAllResponseHeaders()||"")};L.url="responseURL"in T?T.responseURL:L.headers.get("X-Request-URL");var p="response"in T?T.response:T.responseText;q(new P(p,L))},T.onerror=function(){g(new TypeError("Network request failed"))},T.ontimeout=function(){g(new TypeError("Network request failed"))},T.onabort=function(){g(new o.DOMException("Aborted","AbortError"))},T.open(w.method,w.url,!0),w.credentials==="include"?T.withCredentials=!0:w.credentials==="omit"&&(T.withCredentials=!1),"responseType"in T&&a.blob&&(T.responseType="blob"),w.headers.forEach(function(L,p){T.setRequestHeader(p,L)}),w.signal&&(w.signal.addEventListener("abort",D),T.onreadystatechange=function(){T.readyState===4&&w.signal.removeEventListener("abort",D)}),T.send(typeof w._bodyInit>"u"?null:w._bodyInit)})}return oe.polyfill=!0,s.fetch||(s.fetch=oe,s.Headers=E,s.Request=M,s.Response=P),o.Headers=E,o.Request=M,o.Response=P,o.fetch=oe,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(Or,Or.exports);var uu=Or.exports,qr={},Wn={},ks=function(t){var n=t.uri,r=t.name,i=t.type;this.uri=n,this.name=r,this.type=i},cu=ks,Fs=function(t){return typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||t instanceof cu},lu=Fs,fu=function e(t,n,r){n===void 0&&(n=""),r===void 0&&(r=lu);var i,s=new Map;function o(f,d){var h=s.get(d);h?h.push.apply(h,f):s.set(d,f)}if(r(t))i=null,o([n],t);else{var a=n?n+".":"";if(typeof FileList<"u"&&t instanceof FileList)i=Array.prototype.map.call(t,function(f,d){return o([""+a+d],f),null});else if(Array.isArray(t))i=t.map(function(f,d){var h=e(f,""+a+d,r);return h.files.forEach(o),h.clone});else if(t&&t.constructor===Object){i={};for(var u in t){var c=e(t[u],""+a+u,r);c.files.forEach(o),i[u]=c.clone}}else i=t}return{clone:i,files:s}};Wn.ReactNativeFile=ks;Wn.extractFiles=fu;Wn.isExtractableFile=Fs;var du=typeof self=="object"?self.FormData:window.FormData,pn={};Object.defineProperty(pn,"__esModule",{value:!0});pn.defaultJsonSerializer=void 0;pn.defaultJsonSerializer={parse:JSON.parse,stringify:JSON.stringify};var pu=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qr,"__esModule",{value:!0});var xs=Wn,hu=pu(du),mu=pn,yu=function(e){return(0,xs.isExtractableFile)(e)||e!==null&&typeof e=="object"&&typeof e.pipe=="function"};function vu(e,t,n,r){r===void 0&&(r=mu.defaultJsonSerializer);var i=(0,xs.extractFiles)({query:e,variables:t,operationName:n},"",yu),s=i.clone,o=i.files;if(o.size===0){if(!Array.isArray(e))return r.stringify(s);if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");var a=e.reduce(function(h,y,E){return h.push({query:y,variables:t?t[E]:void 0}),h},[]);return r.stringify(a)}var u=typeof FormData>"u"?hu.default:FormData,c=new u;c.append("operations",r.stringify(s));var f={},d=0;return o.forEach(function(h){f[++d]=h}),c.append("map",r.stringify(f)),d=0,o.forEach(function(h,y){c.append("".concat(++d),y)}),c}qr.default=vu;var Re={};Object.defineProperty(Re,"__esModule",{value:!0});Re.parseBatchRequestsExtendedArgs=Re.parseRawRequestExtendedArgs=Re.parseRequestExtendedArgs=Re.parseBatchRequestArgs=Re.parseRawRequestArgs=Re.parseRequestArgs=void 0;function Eu(e,t,n){return e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0}}Re.parseRequestArgs=Eu;function gu(e,t,n){return e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0}}Re.parseRawRequestArgs=gu;function Tu(e,t){return e.documents?e:{documents:e,requestHeaders:t,signal:void 0}}Re.parseBatchRequestArgs=Tu;function bu(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1];return e.document?e:{url:e,document:t,variables:i,requestHeaders:s,signal:void 0}}Re.parseRequestExtendedArgs=bu;function _u(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1];return e.query?e:{url:e,query:t,variables:i,requestHeaders:s,signal:void 0}}Re.parseRawRequestExtendedArgs=_u;function Nu(e,t,n){return e.documents?e:{url:e,documents:t,requestHeaders:n,signal:void 0}}Re.parseBatchRequestsExtendedArgs=Nu;var hn={},Iu=ie&&ie.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(hn,"__esModule",{value:!0});hn.ClientError=void 0;var wu=function(e){Iu(t,e);function t(n,r){var i=this,s="".concat(t.extractMessage(n),": ").concat(JSON.stringify({response:n,request:r}));return i=e.call(this,s)||this,Object.setPrototypeOf(i,t.prototype),i.response=n,i.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,t),i}return t.extractMessage=function(n){try{return n.errors[0].message}catch{return"GraphQL Error (Code: ".concat(n.status,")")}},t}(Error);hn.ClientError=wu;var Ft={};const Ou="16.6.0",Au=Object.freeze({major:16,minor:6,patch:0,preReleaseTag:null});function Z(e,t){if(!!!e)throw new Error(t)}function $e(e){return typeof(e==null?void 0:e.then)=="function"}function Ce(e){return typeof e=="object"&&e!==null}function me(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const Du=/\r\n|[\n\r]/g;function Un(e,t){let n=0,r=1;for(const i of e.body.matchAll(Du)){if(typeof i.index=="number"||me(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function $s(e){return Gr(e.source,Un(e.source,e.start))}function Gr(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,u=t.column+a,c=`${e.name}:${o}:${u}
6
+ `,f=r.split(/\r\n|[\n\r]/g),d=f[i];if(d.length>120){const h=Math.floor(u/80),y=u%80,E=[];for(let $=0;$<d.length;$+=80)E.push(d.slice($,$+80));return c+Ci([[`${o} |`,E[0]],...E.slice(1,h+1).map($=>["|",$]),["|","^".padStart(y)],["|",E[h+1]]])}return c+Ci([[`${o-1} |`,f[i-1]],[`${o} |`,d],["|","^".padStart(u)],[`${o+1} |`,f[i+1]]])}function Ci(e){const 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(`
7
+ `)}function Su(e){const 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}class _ extends Error{constructor(t,...n){var r,i,s;const{nodes:o,source:a,positions:u,path:c,originalError:f,extensions:d}=Su(n);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=f??void 0,this.nodes=Mi(Array.isArray(o)?o:o?[o]:void 0);const h=Mi((r=this.nodes)===null||r===void 0?void 0:r.map(E=>E.loc).filter(E=>E!=null));this.source=a??(h==null||(i=h[0])===null||i===void 0?void 0:i.source),this.positions=u??(h==null?void 0:h.map(E=>E.start)),this.locations=u&&a?u.map(E=>Un(a,E)):h==null?void 0:h.map(E=>Un(E.source,E.start));const y=Ce(f==null?void 0:f.extensions)?f==null?void 0:f.extensions:void 0;this.extensions=(s=d??y)!==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}}),f!=null&&f.stack?Object.defineProperty(this,"stack",{value:f.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,_):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(const n of this.nodes)n.loc&&(t+=`
8
8
 
9
- `+ks(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
9
+ `+$s(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
10
10
 
11
- `+qr(this.source,n);return t}toJSON(){const 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}}function Mi(e){return e===void 0||e.length===0?void 0:e}function Ru(e){return e.toString()}function Lu(e){return e.toJSON()}function Te(e,t,n){return new _(`Syntax Error: ${n}`,{source:e,positions:[t]})}class xs{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}}}class Gr{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}}}const $s={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"]},Fu=new Set(Object.keys($s));function Or(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&Fu.has(t)}var be;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(be||(be={}));var G;(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"})(G||(G={}));var l;(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"})(l||(l={}));function Dr(e){return e===9||e===32}function an(e){return e>=48&&e<=57}function Cs(e){return e>=97&&e<=122||e>=65&&e<=90}function Qr(e){return Cs(e)||e===95}function Ms(e){return Cs(e)||an(e)||e===95}function ku(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;o<e.length;++o){var s;const a=e[o],u=xu(a);u!==a.length&&(r=(s=r)!==null&&s!==void 0?s:o,i=o,o!==0&&u<n&&(n=u))}return e.map((o,a)=>a===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function xu(e){let t=0;for(;t<e.length&&Dr(e.charCodeAt(t));)++t;return t}function $u(e){if(e==="")return!0;let t=!0,n=!1,r=!0,i=!1;for(let s=0;s<e.length;++s)switch(e.codePointAt(s)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:return!1;case 13:return!1;case 10:if(t&&!i)return!1;i=!0,t=!0,n=!1;break;case 9:case 32:n||(n=t);break;default:r&&(r=n),t=!1}return!(t||r&&i)}function js(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,s=r.length>1&&r.slice(1).every(y=>y.length===0||Dr(y.charCodeAt(0))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,u=e.endsWith("\\"),c=a||u,f=!(t!=null&&t.minimize)&&(!i||e.length>70||c||s||o);let d="";const p=i&&Dr(e.charCodeAt(0));return(f&&!p||s)&&(d+=`
11
+ `+Gr(this.source,n);return t}toJSON(){const 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}}function Mi(e){return e===void 0||e.length===0?void 0:e}function Ru(e){return e.toString()}function Lu(e){return e.toJSON()}function Te(e,t,n){return new _(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Cs{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}}}class Qr{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}}}const Ms={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"]},ku=new Set(Object.keys(Ms));function Ar(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&ku.has(t)}var be;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(be||(be={}));var G;(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"})(G||(G={}));var l;(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"})(l||(l={}));function Dr(e){return e===9||e===32}function an(e){return e>=48&&e<=57}function Vs(e){return e>=97&&e<=122||e>=65&&e<=90}function Yr(e){return Vs(e)||e===95}function Us(e){return Vs(e)||an(e)||e===95}function Fu(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;o<e.length;++o){var s;const a=e[o],u=xu(a);u!==a.length&&(r=(s=r)!==null&&s!==void 0?s:o,i=o,o!==0&&u<n&&(n=u))}return e.map((o,a)=>a===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function xu(e){let t=0;for(;t<e.length&&Dr(e.charCodeAt(t));)++t;return t}function $u(e){if(e==="")return!0;let t=!0,n=!1,r=!0,i=!1;for(let s=0;s<e.length;++s)switch(e.codePointAt(s)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:return!1;case 13:return!1;case 10:if(t&&!i)return!1;i=!0,t=!0,n=!1;break;case 9:case 32:n||(n=t);break;default:r&&(r=n),t=!1}return!(t||r&&i)}function Ps(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,s=r.length>1&&r.slice(1).every(y=>y.length===0||Dr(y.charCodeAt(0))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,u=e.endsWith("\\"),c=a||u,f=!(t!=null&&t.minimize)&&(!i||e.length>70||c||s||o);let d="";const h=i&&Dr(e.charCodeAt(0));return(f&&!h||s)&&(d+=`
12
12
  `),d+=n,(f||c)&&(d+=`
13
- `),'"""'+d+'"""'}var N;(function(e){e.SOF="<SOF>",e.EOF="<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"})(N||(N={}));class Yr{constructor(t){const n=new Gr(N.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!==N.EOF)do if(t.next)t=t.next;else{const n=Cu(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===N.COMMENT);return t}}function Vs(e){return e===N.BANG||e===N.DOLLAR||e===N.AMP||e===N.PAREN_L||e===N.PAREN_R||e===N.SPREAD||e===N.COLON||e===N.EQUALS||e===N.AT||e===N.BRACKET_L||e===N.BRACKET_R||e===N.BRACE_L||e===N.PIPE||e===N.BRACE_R}function Gt(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Zn(e,t){return Us(e.charCodeAt(t))&&Ps(e.charCodeAt(t+1))}function Us(e){return e>=55296&&e<=56319}function Ps(e){return e>=56320&&e<=57343}function It(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return N.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Ee(e,t,n,r,i){const s=e.line,o=1+n-e.lineStart;return new Gr(t,n,r,s,o,i)}function Cu(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Mu(e,i);case 33:return Ee(e,N.BANG,i,i+1);case 36:return Ee(e,N.DOLLAR,i,i+1);case 38:return Ee(e,N.AMP,i,i+1);case 40:return Ee(e,N.PAREN_L,i,i+1);case 41:return Ee(e,N.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Ee(e,N.SPREAD,i,i+3);break;case 58:return Ee(e,N.COLON,i,i+1);case 61:return Ee(e,N.EQUALS,i,i+1);case 64:return Ee(e,N.AT,i,i+1);case 91:return Ee(e,N.BRACKET_L,i,i+1);case 93:return Ee(e,N.BRACKET_R,i,i+1);case 123:return Ee(e,N.BRACE_L,i,i+1);case 124:return Ee(e,N.PIPE,i,i+1);case 125:return Ee(e,N.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?qu(e,i):Vu(e,i)}if(an(s)||s===45)return ju(e,i,s);if(Qr(s))return Gu(e,i);throw Te(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Gt(s)||Zn(n,i)?`Unexpected character: ${It(e,i)}.`:`Invalid character: ${It(e,i)}.`)}return Ee(e,N.EOF,r,r)}function Mu(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(s===10||s===13)break;if(Gt(s))++i;else if(Zn(n,i))i+=2;else break}return Ee(e,N.COMMENT,t,i,n.slice(t+1,i))}function ju(e,t,n){const r=e.source.body;let i=t,s=n,o=!1;if(s===45&&(s=r.charCodeAt(++i)),s===48){if(s=r.charCodeAt(++i),an(s))throw Te(e.source,i,`Invalid number, unexpected digit after 0: ${It(e,i)}.`)}else i=vr(e,i,s),s=r.charCodeAt(i);if(s===46&&(o=!0,s=r.charCodeAt(++i),i=vr(e,i,s),s=r.charCodeAt(i)),(s===69||s===101)&&(o=!0,s=r.charCodeAt(++i),(s===43||s===45)&&(s=r.charCodeAt(++i)),i=vr(e,i,s),s=r.charCodeAt(i)),s===46||Qr(s))throw Te(e.source,i,`Invalid number, expected digit but got: ${It(e,i)}.`);return Ee(e,o?N.FLOAT:N.INT,t,i,r.slice(t,i))}function vr(e,t,n){if(!an(n))throw Te(e.source,t,`Invalid number, expected digit but got: ${It(e,t)}.`);const r=e.source.body;let i=t+1;for(;an(r.charCodeAt(i));)++i;return i}function Vu(e,t){const n=e.source.body,r=n.length;let i=t+1,s=i,o="";for(;i<r;){const a=n.charCodeAt(i);if(a===34)return o+=n.slice(s,i),Ee(e,N.STRING,t,i+1,o);if(a===92){o+=n.slice(s,i);const u=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Uu(e,i):Pu(e,i):Bu(e,i);o+=u.value,i+=u.size,s=i;continue}if(a===10||a===13)break;if(Gt(a))++i;else if(Zn(n,i))i+=2;else throw Te(e.source,i,`Invalid character within String: ${It(e,i)}.`)}throw Te(e.source,i,"Unterminated string.")}function Uu(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const s=n.charCodeAt(t+i++);if(s===125){if(i<5||!Gt(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Kt(s),r<0)break}throw Te(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Pu(e,t){const n=e.source.body,r=ji(n,t+2);if(Gt(r))return{value:String.fromCodePoint(r),size:6};if(Us(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=ji(n,t+8);if(Ps(i))return{value:String.fromCodePoint(r,i),size:12}}throw Te(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function ji(e,t){return Kt(e.charCodeAt(t))<<12|Kt(e.charCodeAt(t+1))<<8|Kt(e.charCodeAt(t+2))<<4|Kt(e.charCodeAt(t+3))}function Kt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Bu(e,t){const 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:`
14
- `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Te(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function qu(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,s=t+3,o=s,a="";const u=[];for(;s<r;){const c=n.charCodeAt(s);if(c===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){a+=n.slice(o,s),u.push(a);const f=Ee(e,N.BLOCK_STRING,t,s+3,ku(u).join(`
15
- `));return e.line+=u.length-1,e.lineStart=i,f}if(c===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){a+=n.slice(o,s),o=s+1,s+=4;continue}if(c===10||c===13){a+=n.slice(o,s),u.push(a),c===13&&n.charCodeAt(s+1)===10?s+=2:++s,a="",o=s,i=s;continue}if(Gt(c))++s;else if(Zn(n,s))s+=2;else throw Te(e.source,s,`Invalid character within String: ${It(e,s)}.`)}throw Te(e.source,s,"Unterminated string.")}function Gu(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(Ms(s))++i;else break}return Ee(e,N.NAME,t,i,n.slice(t,i))}const Qu=10,Bs=2;function I(e){return er(e,[])}function er(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Yu(e,t);default:return String(e)}}function Yu(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(zu(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:er(r,n)}else if(Array.isArray(e))return Hu(e,n);return Ju(e,n)}function zu(e){return typeof e.toJSON=="function"}function Ju(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Bs?"["+Xu(e)+"]":"{ "+n.map(([i,s])=>i+": "+er(s,t)).join(", ")+" }"}function Hu(e,t){if(e.length===0)return"[]";if(t.length>Bs)return"[Array]";const n=Math.min(Qu,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(er(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function Xu(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const We=function(t,n){return t instanceof n};class tr{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||K(!1,`Body must be a string. Received: ${I(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||K(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||K(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function qs(e){return We(e,tr)}function nr(e,t){return new rr(e,t).parseDocument()}function Gs(e,t){const n=new rr(e,t);n.expectToken(N.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(N.EOF),r}function Wu(e,t){const n=new rr(e,t);n.expectToken(N.SOF);const r=n.parseConstValueLiteral();return n.expectToken(N.EOF),r}function Ku(e,t){const n=new rr(e,t);n.expectToken(N.SOF);const r=n.parseTypeReference();return n.expectToken(N.EOF),r}class rr{constructor(t,n={}){const r=qs(t)?t:new tr(t);this._lexer=new Yr(r),this._options=n,this._tokenCounter=0}parseName(){const t=this.expectToken(N.NAME);return this.node(t,{kind:l.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:l.DOCUMENT,definitions:this.many(N.SOF,this.parseDefinition,N.EOF)})}parseDefinition(){if(this.peek(N.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===N.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 Te(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(){const t=this._lexer.token;if(this.peek(N.BRACE_L))return this.node(t,{kind:l.OPERATION_DEFINITION,operation:be.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(N.NAME)&&(r=this.parseName()),this.node(t,{kind:l.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(N.NAME);switch(t.value){case"query":return be.QUERY;case"mutation":return be.MUTATION;case"subscription":return be.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(N.PAREN_L,this.parseVariableDefinition,N.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:l.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(N.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(N.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(N.DOLLAR),this.node(t,{kind:l.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:l.SELECTION_SET,selections:this.many(N.BRACE_L,this.parseSelection,N.BRACE_R)})}parseSelection(){return this.peek(N.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(N.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:l.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(N.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(N.PAREN_L,n,N.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(N.COLON),this.node(n,{kind:l.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(N.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(N.NAME)?this.node(t,{kind:l.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:l.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:l.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:l.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){const n=this._lexer.token;switch(n.kind){case N.BRACKET_L:return this.parseList(t);case N.BRACE_L:return this.parseObject(t);case N.INT:return this.advanceLexer(),this.node(n,{kind:l.INT,value:n.value});case N.FLOAT:return this.advanceLexer(),this.node(n,{kind:l.FLOAT,value:n.value});case N.STRING:case N.BLOCK_STRING:return this.parseStringLiteral();case N.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:l.BOOLEAN,value:!0});case"false":return this.node(n,{kind:l.BOOLEAN,value:!1});case"null":return this.node(n,{kind:l.NULL});default:return this.node(n,{kind:l.ENUM,value:n.value})}case N.DOLLAR:if(t)if(this.expectToken(N.DOLLAR),this._lexer.token.kind===N.NAME){const r=this._lexer.token.value;throw Te(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(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:l.STRING,value:t.value,block:t.kind===N.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:l.LIST,values:this.any(N.BRACKET_L,n,N.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:l.OBJECT,fields:this.any(N.BRACE_L,n,N.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(N.COLON),this.node(n,{kind:l.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(N.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(N.AT),this.node(n,{kind:l.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(N.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(N.BRACKET_R),n=this.node(t,{kind:l.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(N.BANG)?this.node(t,{kind:l.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:l.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(N.STRING)||this.peek(N.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);return this.node(t,{kind:l.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(N.COLON);const r=this.parseNamedType();return this.node(t,{kind:l.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:l.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:l.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(N.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseFieldDefinition,N.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(N.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:l.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(N.PAREN_L,this.parseInputValueDef,N.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(N.COLON);const i=this.parseTypeReference();let s;this.expectOptionalToken(N.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:l.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:l.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:l.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(N.EQUALS)?this.delimitedMany(N.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:l.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(N.BRACE_L,this.parseEnumValueDefinition,N.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:l.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 Te(this._lexer.source,this._lexer.token.start,`${wn(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:l.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseInputValueDef,N.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===N.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(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:l.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:l.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const 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:l.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const 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:l.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:l.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:l.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:l.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(N.AT);const r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:l.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(N.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(G,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new xs(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw Te(this._lexer.source,n.start,`Expected ${Qs(t)}, found ${wn(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===N.NAME&&n.value===t)this.advanceLexer();else throw Te(this._lexer.source,n.start,`Expected "${t}", found ${wn(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===N.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return Te(this._lexer.source,n.start,`Unexpected ${wn(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==N.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw Te(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function wn(e){const t=e.value;return Qs(e.kind)+(t!=null?` "${t}"`:"")}function Qs(e){return Vs(e)?`"${e}"`:e}const Zu=5;function ot(e,t){const[n,r]=t?[e,t]:[void 0,e];let i=" Did you mean ";n&&(i+=n+" ");const s=r.map(u=>`"${u}"`);switch(s.length){case 0:return"";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}const o=s.slice(0,Zu),a=o.pop();return i+o.join(", ")+", or "+a+"?"}function Vi(e){return e}function at(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}function ft(e,t,n){const r=Object.create(null);for(const i of e)r[t(i)]=n(i);return r}function st(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function mn(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),s=t.charCodeAt(r);if(On(i)&&On(s)){let o=0;do++n,o=o*10+i-Ar,i=e.charCodeAt(n);while(On(i)&&o>0);let a=0;do++r,a=a*10+s-Ar,s=t.charCodeAt(r);while(On(s)&&a>0);if(o<a)return-1;if(o>a)return 1}else{if(i<s)return-1;if(i>s)return 1;++n,++r}}return e.length-t.length}const Ar=48,ec=57;function On(e){return!isNaN(e)&&Ar<=e&&e<=ec}function mt(e,t){const n=Object.create(null),r=new tc(e),i=Math.floor(e.length*.4)+1;for(const s of t){const o=r.measure(s,i);o!==void 0&&(n[s]=o)}return Object.keys(n).sort((s,o)=>{const a=n[s]-n[o];return a!==0?a:mn(s,o)})}class tc{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=Ui(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;const r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=Ui(r),s=this._inputArray;if(i.length<s.length){const f=i;i=s,s=f}const o=i.length,a=s.length;if(o-a>n)return;const u=this._rows;for(let f=0;f<=a;f++)u[0][f]=f;for(let f=1;f<=o;f++){const d=u[(f-1)%3],p=u[f%3];let y=p[0]=f;for(let E=1;E<=a;E++){const $=i[f-1]===s[E-1]?0:1;let M=Math.min(d[E]+1,p[E-1]+1,d[E-1]+$);if(f>1&&E>1&&i[f-1]===s[E-2]&&i[f-2]===s[E-1]){const P=u[(f-2)%3][E-2];M=Math.min(M,P+1)}M<y&&(y=M),p[E]=M}if(y>n)return}const c=u[o%3][a];return c<=n?c:void 0}}function Ui(e){const t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}function Qe(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;const t=Object.create(null);for(const[n,r]of Object.entries(e))t[n]=r;return t}function nc(e){return`"${e.replace(rc,ic)}"`}const rc=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function ic(e){return sc[e.charCodeAt(0)]}const sc=["\\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"],Rt=Object.freeze({});function Qt(e,t,n=$s){const r=new Map;for(const P of Object.values(l))r.set(P,$t(t,P));let i,s=Array.isArray(e),o=[e],a=-1,u=[],c=e,f,d;const p=[],y=[];do{a++;const P=a===o.length,Z=P&&u.length!==0;if(P){if(f=y.length===0?void 0:p[p.length-1],c=d,d=y.pop(),Z)if(s){c=c.slice();let B=0;for(const[U,F]of u){const D=U-B;F===null?(c.splice(D,1),B++):c[D]=F}}else{c=Object.defineProperties({},Object.getOwnPropertyDescriptors(c));for(const[B,U]of u)c[B]=U}a=i.index,o=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(d){if(f=s?a:o[a],c=d[f],c==null)continue;p.push(f)}let J;if(!Array.isArray(c)){var E,$;Or(c)||K(!1,`Invalid AST Node: ${I(c)}.`);const B=P?(E=r.get(c.kind))===null||E===void 0?void 0:E.leave:($=r.get(c.kind))===null||$===void 0?void 0:$.enter;if(J=B==null?void 0:B.call(t,c,f,d,p,y),J===Rt)break;if(J===!1){if(!P){p.pop();continue}}else if(J!==void 0&&(u.push([f,J]),!P))if(Or(J))c=J;else{p.pop();continue}}if(J===void 0&&Z&&u.push([f,c]),P)p.pop();else{var M;i={inArray:s,index:a,keys:o,edits:u,prev:i},s=Array.isArray(c),o=s?c:(M=n[c.kind])!==null&&M!==void 0?M:[],a=-1,u=[],d&&y.push(d),d=c}}while(i!==void 0);return u.length!==0?u[u.length-1][1]:e}function zr(e){const t=new Array(e.length).fill(null),n=Object.create(null);for(const r of Object.values(l)){let i=!1;const s=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let u=0;u<e.length;++u){const{enter:c,leave:f}=$t(e[u],r);i||(i=c!=null||f!=null),s[u]=c,o[u]=f}if(!i)continue;const a={enter(...u){const c=u[0];for(let d=0;d<e.length;d++)if(t[d]===null){var f;const p=(f=s[d])===null||f===void 0?void 0:f.apply(e[d],u);if(p===!1)t[d]=c;else if(p===Rt)t[d]=Rt;else if(p!==void 0)return p}},leave(...u){const c=u[0];for(let d=0;d<e.length;d++)if(t[d]===null){var f;const p=(f=o[d])===null||f===void 0?void 0:f.apply(e[d],u);if(p===Rt)t[d]=Rt;else if(p!==void 0&&p!==!1)return p}else t[d]===c&&(t[d]=null)}};n[r]=a}return n}function $t(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function oc(e,t,n){const{enter:r,leave:i}=$t(e,t);return n?i:r}function le(e){return Qt(e,uc)}const ac=80,uc={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>V(e.definitions,`
13
+ `),'"""'+d+'"""'}var N;(function(e){e.SOF="<SOF>",e.EOF="<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"})(N||(N={}));class Jr{constructor(t){const n=new Qr(N.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!==N.EOF)do if(t.next)t=t.next;else{const n=Cu(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===N.COMMENT);return t}}function js(e){return e===N.BANG||e===N.DOLLAR||e===N.AMP||e===N.PAREN_L||e===N.PAREN_R||e===N.SPREAD||e===N.COLON||e===N.EQUALS||e===N.AT||e===N.BRACKET_L||e===N.BRACKET_R||e===N.BRACE_L||e===N.PIPE||e===N.BRACE_R}function qt(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Kn(e,t){return Bs(e.charCodeAt(t))&&qs(e.charCodeAt(t+1))}function Bs(e){return e>=55296&&e<=56319}function qs(e){return e>=56320&&e<=57343}function Nt(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return N.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function ve(e,t,n,r,i){const s=e.line,o=1+n-e.lineStart;return new Qr(t,n,r,s,o,i)}function Cu(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Mu(e,i);case 33:return ve(e,N.BANG,i,i+1);case 36:return ve(e,N.DOLLAR,i,i+1);case 38:return ve(e,N.AMP,i,i+1);case 40:return ve(e,N.PAREN_L,i,i+1);case 41:return ve(e,N.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return ve(e,N.SPREAD,i,i+3);break;case 58:return ve(e,N.COLON,i,i+1);case 61:return ve(e,N.EQUALS,i,i+1);case 64:return ve(e,N.AT,i,i+1);case 91:return ve(e,N.BRACKET_L,i,i+1);case 93:return ve(e,N.BRACKET_R,i,i+1);case 123:return ve(e,N.BRACE_L,i,i+1);case 124:return ve(e,N.PIPE,i,i+1);case 125:return ve(e,N.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?qu(e,i):Uu(e,i)}if(an(s)||s===45)return Vu(e,i,s);if(Yr(s))return Gu(e,i);throw Te(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:qt(s)||Kn(n,i)?`Unexpected character: ${Nt(e,i)}.`:`Invalid character: ${Nt(e,i)}.`)}return ve(e,N.EOF,r,r)}function Mu(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(s===10||s===13)break;if(qt(s))++i;else if(Kn(n,i))i+=2;else break}return ve(e,N.COMMENT,t,i,n.slice(t+1,i))}function Vu(e,t,n){const r=e.source.body;let i=t,s=n,o=!1;if(s===45&&(s=r.charCodeAt(++i)),s===48){if(s=r.charCodeAt(++i),an(s))throw Te(e.source,i,`Invalid number, unexpected digit after 0: ${Nt(e,i)}.`)}else i=yr(e,i,s),s=r.charCodeAt(i);if(s===46&&(o=!0,s=r.charCodeAt(++i),i=yr(e,i,s),s=r.charCodeAt(i)),(s===69||s===101)&&(o=!0,s=r.charCodeAt(++i),(s===43||s===45)&&(s=r.charCodeAt(++i)),i=yr(e,i,s),s=r.charCodeAt(i)),s===46||Yr(s))throw Te(e.source,i,`Invalid number, expected digit but got: ${Nt(e,i)}.`);return ve(e,o?N.FLOAT:N.INT,t,i,r.slice(t,i))}function yr(e,t,n){if(!an(n))throw Te(e.source,t,`Invalid number, expected digit but got: ${Nt(e,t)}.`);const r=e.source.body;let i=t+1;for(;an(r.charCodeAt(i));)++i;return i}function Uu(e,t){const n=e.source.body,r=n.length;let i=t+1,s=i,o="";for(;i<r;){const a=n.charCodeAt(i);if(a===34)return o+=n.slice(s,i),ve(e,N.STRING,t,i+1,o);if(a===92){o+=n.slice(s,i);const u=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Pu(e,i):ju(e,i):Bu(e,i);o+=u.value,i+=u.size,s=i;continue}if(a===10||a===13)break;if(qt(a))++i;else if(Kn(n,i))i+=2;else throw Te(e.source,i,`Invalid character within String: ${Nt(e,i)}.`)}throw Te(e.source,i,"Unterminated string.")}function Pu(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const s=n.charCodeAt(t+i++);if(s===125){if(i<5||!qt(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Wt(s),r<0)break}throw Te(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function ju(e,t){const n=e.source.body,r=Vi(n,t+2);if(qt(r))return{value:String.fromCodePoint(r),size:6};if(Bs(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=Vi(n,t+8);if(qs(i))return{value:String.fromCodePoint(r,i),size:12}}throw Te(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Vi(e,t){return Wt(e.charCodeAt(t))<<12|Wt(e.charCodeAt(t+1))<<8|Wt(e.charCodeAt(t+2))<<4|Wt(e.charCodeAt(t+3))}function Wt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Bu(e,t){const 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:`
14
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Te(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function qu(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,s=t+3,o=s,a="";const u=[];for(;s<r;){const c=n.charCodeAt(s);if(c===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){a+=n.slice(o,s),u.push(a);const f=ve(e,N.BLOCK_STRING,t,s+3,Fu(u).join(`
15
+ `));return e.line+=u.length-1,e.lineStart=i,f}if(c===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){a+=n.slice(o,s),o=s+1,s+=4;continue}if(c===10||c===13){a+=n.slice(o,s),u.push(a),c===13&&n.charCodeAt(s+1)===10?s+=2:++s,a="",o=s,i=s;continue}if(qt(c))++s;else if(Kn(n,s))s+=2;else throw Te(e.source,s,`Invalid character within String: ${Nt(e,s)}.`)}throw Te(e.source,s,"Unterminated string.")}function Gu(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(Us(s))++i;else break}return ve(e,N.NAME,t,i,n.slice(t,i))}const Qu=10,Gs=2;function I(e){return Zn(e,[])}function Zn(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Yu(e,t);default:return String(e)}}function Yu(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(Ju(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:Zn(r,n)}else if(Array.isArray(e))return zu(e,n);return Hu(e,n)}function Ju(e){return typeof e.toJSON=="function"}function Hu(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Gs?"["+Xu(e)+"]":"{ "+n.map(([i,s])=>i+": "+Zn(s,t)).join(", ")+" }"}function zu(e,t){if(e.length===0)return"[]";if(t.length>Gs)return"[Array]";const n=Math.min(Qu,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(Zn(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function Xu(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const ze=function(t,n){return t instanceof n};class er{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${I(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Qs(e){return ze(e,er)}function tr(e,t){return new nr(e,t).parseDocument()}function Ys(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(N.EOF),r}function Wu(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseConstValueLiteral();return n.expectToken(N.EOF),r}function Ku(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseTypeReference();return n.expectToken(N.EOF),r}class nr{constructor(t,n={}){const r=Qs(t)?t:new er(t);this._lexer=new Jr(r),this._options=n,this._tokenCounter=0}parseName(){const t=this.expectToken(N.NAME);return this.node(t,{kind:l.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:l.DOCUMENT,definitions:this.many(N.SOF,this.parseDefinition,N.EOF)})}parseDefinition(){if(this.peek(N.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===N.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 Te(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(){const t=this._lexer.token;if(this.peek(N.BRACE_L))return this.node(t,{kind:l.OPERATION_DEFINITION,operation:be.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(N.NAME)&&(r=this.parseName()),this.node(t,{kind:l.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(N.NAME);switch(t.value){case"query":return be.QUERY;case"mutation":return be.MUTATION;case"subscription":return be.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(N.PAREN_L,this.parseVariableDefinition,N.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:l.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(N.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(N.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(N.DOLLAR),this.node(t,{kind:l.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:l.SELECTION_SET,selections:this.many(N.BRACE_L,this.parseSelection,N.BRACE_R)})}parseSelection(){return this.peek(N.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(N.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:l.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(N.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(N.PAREN_L,n,N.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(N.COLON),this.node(n,{kind:l.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(N.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(N.NAME)?this.node(t,{kind:l.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:l.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:l.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:l.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){const n=this._lexer.token;switch(n.kind){case N.BRACKET_L:return this.parseList(t);case N.BRACE_L:return this.parseObject(t);case N.INT:return this.advanceLexer(),this.node(n,{kind:l.INT,value:n.value});case N.FLOAT:return this.advanceLexer(),this.node(n,{kind:l.FLOAT,value:n.value});case N.STRING:case N.BLOCK_STRING:return this.parseStringLiteral();case N.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:l.BOOLEAN,value:!0});case"false":return this.node(n,{kind:l.BOOLEAN,value:!1});case"null":return this.node(n,{kind:l.NULL});default:return this.node(n,{kind:l.ENUM,value:n.value})}case N.DOLLAR:if(t)if(this.expectToken(N.DOLLAR),this._lexer.token.kind===N.NAME){const r=this._lexer.token.value;throw Te(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(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:l.STRING,value:t.value,block:t.kind===N.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:l.LIST,values:this.any(N.BRACKET_L,n,N.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:l.OBJECT,fields:this.any(N.BRACE_L,n,N.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(N.COLON),this.node(n,{kind:l.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(N.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(N.AT),this.node(n,{kind:l.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(N.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(N.BRACKET_R),n=this.node(t,{kind:l.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(N.BANG)?this.node(t,{kind:l.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:l.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(N.STRING)||this.peek(N.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);return this.node(t,{kind:l.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(N.COLON);const r=this.parseNamedType();return this.node(t,{kind:l.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:l.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:l.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(N.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseFieldDefinition,N.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(N.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:l.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(N.PAREN_L,this.parseInputValueDef,N.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(N.COLON);const i=this.parseTypeReference();let s;this.expectOptionalToken(N.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:l.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:l.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:l.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(N.EQUALS)?this.delimitedMany(N.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:l.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(N.BRACE_L,this.parseEnumValueDefinition,N.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:l.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 Te(this._lexer.source,this._lexer.token.start,`${wn(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:l.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseInputValueDef,N.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===N.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(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:l.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:l.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const 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:l.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const 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:l.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:l.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:l.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:l.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(N.AT);const r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:l.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(N.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(G,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Cs(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw Te(this._lexer.source,n.start,`Expected ${Js(t)}, found ${wn(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===N.NAME&&n.value===t)this.advanceLexer();else throw Te(this._lexer.source,n.start,`Expected "${t}", found ${wn(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===N.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return Te(this._lexer.source,n.start,`Unexpected ${wn(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==N.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw Te(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function wn(e){const t=e.value;return Js(e.kind)+(t!=null?` "${t}"`:"")}function Js(e){return js(e)?`"${e}"`:e}const Zu=5;function it(e,t){const[n,r]=t?[e,t]:[void 0,e];let i=" Did you mean ";n&&(i+=n+" ");const s=r.map(u=>`"${u}"`);switch(s.length){case 0:return"";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}const o=s.slice(0,Zu),a=o.pop();return i+o.join(", ")+", or "+a+"?"}function Ui(e){return e}function st(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}function lt(e,t,n){const r=Object.create(null);for(const i of e)r[t(i)]=n(i);return r}function rt(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function mn(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),s=t.charCodeAt(r);if(On(i)&&On(s)){let o=0;do++n,o=o*10+i-Sr,i=e.charCodeAt(n);while(On(i)&&o>0);let a=0;do++r,a=a*10+s-Sr,s=t.charCodeAt(r);while(On(s)&&a>0);if(o<a)return-1;if(o>a)return 1}else{if(i<s)return-1;if(i>s)return 1;++n,++r}}return e.length-t.length}const Sr=48,ec=57;function On(e){return!isNaN(e)&&Sr<=e&&e<=ec}function ht(e,t){const n=Object.create(null),r=new tc(e),i=Math.floor(e.length*.4)+1;for(const s of t){const o=r.measure(s,i);o!==void 0&&(n[s]=o)}return Object.keys(n).sort((s,o)=>{const a=n[s]-n[o];return a!==0?a:mn(s,o)})}class tc{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=Pi(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;const r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=Pi(r),s=this._inputArray;if(i.length<s.length){const f=i;i=s,s=f}const o=i.length,a=s.length;if(o-a>n)return;const u=this._rows;for(let f=0;f<=a;f++)u[0][f]=f;for(let f=1;f<=o;f++){const d=u[(f-1)%3],h=u[f%3];let y=h[0]=f;for(let E=1;E<=a;E++){const $=i[f-1]===s[E-1]?0:1;let V=Math.min(d[E]+1,h[E-1]+1,d[E-1]+$);if(f>1&&E>1&&i[f-1]===s[E-2]&&i[f-2]===s[E-1]){const B=u[(f-2)%3][E-2];V=Math.min(V,B+1)}V<y&&(y=V),h[E]=V}if(y>n)return}const c=u[o%3][a];return c<=n?c:void 0}}function Pi(e){const t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}function Be(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;const t=Object.create(null);for(const[n,r]of Object.entries(e))t[n]=r;return t}function nc(e){return`"${e.replace(rc,ic)}"`}const rc=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function ic(e){return sc[e.charCodeAt(0)]}const sc=["\\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"],St=Object.freeze({});function Gt(e,t,n=Ms){const r=new Map;for(const B of Object.values(l))r.set(B,xt(t,B));let i,s=Array.isArray(e),o=[e],a=-1,u=[],c=e,f,d;const h=[],y=[];do{a++;const B=a===o.length,X=B&&u.length!==0;if(B){if(f=y.length===0?void 0:h[h.length-1],c=d,d=y.pop(),X)if(s){c=c.slice();let Q=0;for(const[C,x]of u){const R=C-Q;x===null?(c.splice(R,1),Q++):c[R]=x}}else{c=Object.defineProperties({},Object.getOwnPropertyDescriptors(c));for(const[Q,C]of u)c[Q]=C}a=i.index,o=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(d){if(f=s?a:o[a],c=d[f],c==null)continue;h.push(f)}let z;if(!Array.isArray(c)){var E,$;Ar(c)||Z(!1,`Invalid AST Node: ${I(c)}.`);const Q=B?(E=r.get(c.kind))===null||E===void 0?void 0:E.leave:($=r.get(c.kind))===null||$===void 0?void 0:$.enter;if(z=Q==null?void 0:Q.call(t,c,f,d,h,y),z===St)break;if(z===!1){if(!B){h.pop();continue}}else if(z!==void 0&&(u.push([f,z]),!B))if(Ar(z))c=z;else{h.pop();continue}}if(z===void 0&&X&&u.push([f,c]),B)h.pop();else{var V;i={inArray:s,index:a,keys:o,edits:u,prev:i},s=Array.isArray(c),o=s?c:(V=n[c.kind])!==null&&V!==void 0?V:[],a=-1,u=[],d&&y.push(d),d=c}}while(i!==void 0);return u.length!==0?u[u.length-1][1]:e}function Hr(e){const t=new Array(e.length).fill(null),n=Object.create(null);for(const r of Object.values(l)){let i=!1;const s=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let u=0;u<e.length;++u){const{enter:c,leave:f}=xt(e[u],r);i||(i=c!=null||f!=null),s[u]=c,o[u]=f}if(!i)continue;const a={enter(...u){const c=u[0];for(let d=0;d<e.length;d++)if(t[d]===null){var f;const h=(f=s[d])===null||f===void 0?void 0:f.apply(e[d],u);if(h===!1)t[d]=c;else if(h===St)t[d]=St;else if(h!==void 0)return h}},leave(...u){const c=u[0];for(let d=0;d<e.length;d++)if(t[d]===null){var f;const h=(f=o[d])===null||f===void 0?void 0:f.apply(e[d],u);if(h===St)t[d]=St;else if(h!==void 0&&h!==!1)return h}else t[d]===c&&(t[d]=null)}};n[r]=a}return n}function xt(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function oc(e,t,n){const{enter:r,leave:i}=xt(e,t);return n?i:r}function ue(e){return Gt(e,uc)}const ac=80,uc={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>j(e.definitions,`
16
16
 
17
- `)},OperationDefinition:{leave(e){const t=ee("(",V(e.variableDefinitions,", "),")"),n=V([e.operation,V([e.name,t]),V(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+ee(" = ",n)+ee(" ",V(r," "))},SelectionSet:{leave:({selections:e})=>Ye(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const s=ee("",e,": ")+t;let o=s+ee("(",V(n,", "),")");return o.length>ac&&(o=s+ee(`(
18
- `,kn(V(n,`
17
+ `)},OperationDefinition:{leave(e){const t=ee("(",j(e.variableDefinitions,", "),")"),n=j([e.operation,j([e.name,t]),j(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+ee(" = ",n)+ee(" ",j(r," "))},SelectionSet:{leave:({selections:e})=>qe(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const s=ee("",e,": ")+t;let o=s+ee("(",j(n,", "),")");return o.length>ac&&(o=s+ee(`(
18
+ `,Fn(j(n,`
19
19
  `)),`
20
- )`)),V([o,V(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ee(" ",V(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>V(["...",ee("on ",e),V(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${ee("(",V(n,", "),")")} on ${t} ${ee("",V(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?js(e):nc(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+V(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+V(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ee("(",V(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>ee("",e,`
21
- `)+V(["schema",V(t," "),Ye(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>ee("",e,`
22
- `)+V(["scalar",t,V(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ee("",e,`
23
- `)+V(["type",t,ee("implements ",V(n," & ")),V(r," "),Ye(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>ee("",e,`
24
- `)+t+(Pi(n)?ee(`(
25
- `,kn(V(n,`
20
+ )`)),j([o,j(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ee(" ",j(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>j(["...",ee("on ",e),j(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${ee("(",j(n,", "),")")} on ${t} ${ee("",j(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Ps(e):nc(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+j(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+j(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ee("(",j(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>ee("",e,`
21
+ `)+j(["schema",j(t," "),qe(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>ee("",e,`
22
+ `)+j(["scalar",t,j(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ee("",e,`
23
+ `)+j(["type",t,ee("implements ",j(n," & ")),j(r," "),qe(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>ee("",e,`
24
+ `)+t+(ji(n)?ee(`(
25
+ `,Fn(j(n,`
26
26
  `)),`
27
- )`):ee("(",V(n,", "),")"))+": "+r+ee(" ",V(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>ee("",e,`
28
- `)+V([t+": "+n,ee("= ",r),V(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ee("",e,`
29
- `)+V(["interface",t,ee("implements ",V(n," & ")),V(r," "),Ye(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>ee("",e,`
30
- `)+V(["union",t,V(n," "),ee("= ",V(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>ee("",e,`
31
- `)+V(["enum",t,V(n," "),Ye(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>ee("",e,`
32
- `)+V([t,V(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>ee("",e,`
33
- `)+V(["input",t,V(n," "),Ye(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>ee("",e,`
34
- `)+"directive @"+t+(Pi(n)?ee(`(
35
- `,kn(V(n,`
27
+ )`):ee("(",j(n,", "),")"))+": "+r+ee(" ",j(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>ee("",e,`
28
+ `)+j([t+": "+n,ee("= ",r),j(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ee("",e,`
29
+ `)+j(["interface",t,ee("implements ",j(n," & ")),j(r," "),qe(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>ee("",e,`
30
+ `)+j(["union",t,j(n," "),ee("= ",j(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>ee("",e,`
31
+ `)+j(["enum",t,j(n," "),qe(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>ee("",e,`
32
+ `)+j([t,j(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>ee("",e,`
33
+ `)+j(["input",t,j(n," "),qe(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>ee("",e,`
34
+ `)+"directive @"+t+(ji(n)?ee(`(
35
+ `,Fn(j(n,`
36
36
  `)),`
37
- )`):ee("(",V(n,", "),")"))+(r?" repeatable":"")+" on "+V(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>V(["extend schema",V(e," "),Ye(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>V(["extend scalar",e,V(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>V(["extend type",e,ee("implements ",V(t," & ")),V(n," "),Ye(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>V(["extend interface",e,ee("implements ",V(t," & ")),V(n," "),Ye(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>V(["extend union",e,V(t," "),ee("= ",V(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>V(["extend enum",e,V(t," "),Ye(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>V(["extend input",e,V(t," "),Ye(n)]," ")}};function V(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function Ye(e){return ee(`{
38
- `,kn(V(e,`
37
+ )`):ee("(",j(n,", "),")"))+(r?" repeatable":"")+" on "+j(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>j(["extend schema",j(e," "),qe(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>j(["extend scalar",e,j(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>j(["extend type",e,ee("implements ",j(t," & ")),j(n," "),qe(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>j(["extend interface",e,ee("implements ",j(t," & ")),j(n," "),qe(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>j(["extend union",e,j(t," "),ee("= ",j(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>j(["extend enum",e,j(t," "),qe(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>j(["extend input",e,j(t," "),qe(n)]," ")}};function j(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function qe(e){return ee(`{
38
+ `,Fn(j(e,`
39
39
  `)),`
40
- }`)}function ee(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function kn(e){return ee(" ",e.replace(/\n/g,`
41
- `))}function Pi(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(`
42
- `)))!==null&&t!==void 0?t:!1}function Pn(e,t){switch(e.kind){case l.NULL:return null;case l.INT:return parseInt(e.value,10);case l.FLOAT:return parseFloat(e.value);case l.STRING:case l.ENUM:case l.BOOLEAN:return e.value;case l.LIST:return e.values.map(n=>Pn(n,t));case l.OBJECT:return ft(e.fields,n=>n.name.value,n=>Pn(n.value,t));case l.VARIABLE:return t==null?void 0:t[e.name.value]}}function Ue(e){if(e!=null||K(!1,"Must provide name."),typeof e=="string"||K(!1,"Expected name to be a string."),e.length===0)throw new _("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!Ms(e.charCodeAt(t)))throw new _(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!Qr(e.charCodeAt(0)))throw new _(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function Ys(e){if(e==="true"||e==="false"||e==="null")throw new _(`Enum values cannot be named: ${e}`);return Ue(e)}function yn(e){return Pe(e)||te(e)||re(e)||Ne(e)||ge(e)||de(e)||fe(e)||X(e)}function cc(e){if(!yn(e))throw new Error(`Expected ${I(e)} to be a GraphQL type.`);return e}function Pe(e){return We(e,rt)}function lc(e){if(!Pe(e))throw new Error(`Expected ${I(e)} to be a GraphQL Scalar type.`);return e}function te(e){return We(e,qe)}function zs(e){if(!te(e))throw new Error(`Expected ${I(e)} to be a GraphQL Object type.`);return e}function re(e){return We(e,Ct)}function Js(e){if(!re(e))throw new Error(`Expected ${I(e)} to be a GraphQL Interface type.`);return e}function Ne(e){return We(e,Mt)}function fc(e){if(!Ne(e))throw new Error(`Expected ${I(e)} to be a GraphQL Union type.`);return e}function ge(e){return We(e,ht)}function dc(e){if(!ge(e))throw new Error(`Expected ${I(e)} to be a GraphQL Enum type.`);return e}function de(e){return We(e,jt)}function pc(e){if(!de(e))throw new Error(`Expected ${I(e)} to be a GraphQL Input Object type.`);return e}function fe(e){return We(e,we)}function hc(e){if(!fe(e))throw new Error(`Expected ${I(e)} to be a GraphQL List type.`);return e}function X(e){return We(e,W)}function mc(e){if(!X(e))throw new Error(`Expected ${I(e)} to be a GraphQL Non-Null type.`);return e}function ke(e){return Pe(e)||ge(e)||de(e)||vn(e)&&ke(e.ofType)}function yc(e){if(!ke(e))throw new Error(`Expected ${I(e)} to be a GraphQL input type.`);return e}function pt(e){return Pe(e)||te(e)||re(e)||Ne(e)||ge(e)||vn(e)&&pt(e.ofType)}function vc(e){if(!pt(e))throw new Error(`Expected ${I(e)} to be a GraphQL output type.`);return e}function tt(e){return Pe(e)||ge(e)}function Ec(e){if(!tt(e))throw new Error(`Expected ${I(e)} to be a GraphQL leaf type.`);return e}function nt(e){return te(e)||re(e)||Ne(e)}function gc(e){if(!nt(e))throw new Error(`Expected ${I(e)} to be a GraphQL composite type.`);return e}function Ze(e){return re(e)||Ne(e)}function Tc(e){if(!Ze(e))throw new Error(`Expected ${I(e)} to be a GraphQL abstract type.`);return e}class we{constructor(t){yn(t)||K(!1,`Expected ${I(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class W{constructor(t){Jr(t)||K(!1,`Expected ${I(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function vn(e){return fe(e)||X(e)}function bc(e){if(!vn(e))throw new Error(`Expected ${I(e)} to be a GraphQL wrapping type.`);return e}function Jr(e){return yn(e)&&!X(e)}function Hs(e){if(!Jr(e))throw new Error(`Expected ${I(e)} to be a GraphQL nullable type.`);return e}function Hr(e){if(e)return X(e)?e.ofType:e}function En(e){return Pe(e)||te(e)||re(e)||Ne(e)||ge(e)||de(e)}function _c(e){if(!En(e))throw new Error(`Expected ${I(e)} to be a GraphQL named type.`);return e}function Re(e){if(e){let t=e;for(;vn(t);)t=t.ofType;return t}}function Xr(e){return typeof e=="function"?e():e}function Wr(e){return typeof e=="function"?e():e}class rt{constructor(t){var n,r,i,s;const o=(n=t.parseValue)!==null&&n!==void 0?n:Vi;this.name=Ue(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:Vi,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(a,u)=>o(Pn(a,u)),this.extensions=Qe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(s=t.extensionASTNodes)!==null&&s!==void 0?s:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||K(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${I(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||K(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||K(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class qe{constructor(t){var n;this.name=Ue(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=Qe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>Ws(t),this._interfaces=()=>Xs(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||K(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${I(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Zs(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Xs(e){var t;const n=Xr((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||K(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function Ws(e){const t=Wr(e.fields);return kt(t)||K(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),st(t,(n,r)=>{var i;kt(n)||K(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||K(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${I(n.resolve)}.`);const s=(i=n.args)!==null&&i!==void 0?i:{};return kt(s)||K(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:Ue(r),description:n.description,type:n.type,args:Ks(s),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:Qe(n.extensions),astNode:n.astNode}})}function Ks(e){return Object.entries(e).map(([t,n])=>({name:Ue(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:Qe(n.extensions),astNode:n.astNode}))}function kt(e){return Ve(e)&&!Array.isArray(e)}function Zs(e){return st(e,t=>({description:t.description,type:t.type,args:eo(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function eo(e){return ft(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function yt(e){return X(e.type)&&e.defaultValue===void 0}class Ct{constructor(t){var n;this.name=Ue(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Qe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=Ws.bind(void 0,t),this._interfaces=Xs.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||K(!1,`${this.name} must provide "resolveType" as a function, but got: ${I(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Zs(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Mt{constructor(t){var n;this.name=Ue(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Qe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=Nc.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||K(!1,`${this.name} must provide "resolveType" as a function, but got: ${I(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Nc(e){const t=Xr(e.types);return Array.isArray(t)||K(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class ht{constructor(t){var n;this.name=Ue(t.name),this.description=t.description,this.extensions=Qe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=Ic(this.name,t.values),this._valueLookup=new Map(this._values.map(r=>[r.value,r])),this._nameLookup=at(this._values,r=>r.name)}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(t){return this._nameLookup[t]}serialize(t){const n=this._valueLookup.get(t);if(n===void 0)throw new _(`Enum "${this.name}" cannot represent value: ${I(t)}`);return n.name}parseValue(t){if(typeof t!="string"){const r=I(t);throw new _(`Enum "${this.name}" cannot represent non-string value: ${r}.`+Dn(this,r))}const n=this.getValue(t);if(n==null)throw new _(`Value "${t}" does not exist in "${this.name}" enum.`+Dn(this,t));return n.value}parseLiteral(t,n){if(t.kind!==l.ENUM){const i=le(t);throw new _(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+Dn(this,i),{nodes:t})}const r=this.getValue(t.value);if(r==null){const i=le(t);throw new _(`Value "${i}" does not exist in "${this.name}" enum.`+Dn(this,i),{nodes:t})}return r.value}toConfig(){const t=ft(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Dn(e,t){const n=e.getValues().map(i=>i.name),r=mt(t,n);return ot("the enum value",r)}function Ic(e,t){return kt(t)||K(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(kt(r)||K(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${I(r)}.`),{name:Ys(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:Qe(r.extensions),astNode:r.astNode}))}class jt{constructor(t){var n;this.name=Ue(t.name),this.description=t.description,this.extensions=Qe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=wc.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=st(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function wc(e){const t=Wr(e.fields);return kt(t)||K(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),st(t,(n,r)=>(!("resolve"in n)||K(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:Ue(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:Qe(n.extensions),astNode:n.astNode}))}function ir(e){return X(e.type)&&e.defaultValue===void 0}function Bn(e,t){return e===t?!0:X(e)&&X(t)||fe(e)&&fe(t)?Bn(e.ofType,t.ofType):!1}function Tt(e,t,n){return t===n?!0:X(n)?X(t)?Tt(e,t.ofType,n.ofType):!1:X(t)?Tt(e,t.ofType,n):fe(n)?fe(t)?Tt(e,t.ofType,n.ofType):!1:fe(t)?!1:Ze(n)&&(re(t)||te(t))&&e.isSubType(n,t)}function Sr(e,t,n){return t===n?!0:Ze(t)?Ze(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):Ze(n)?e.isSubType(n,t):!1}const xn=2147483647,$n=-2147483648,to=new rt({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=Tn(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new _(`Int cannot represent non-integer value: ${I(t)}`);if(n>xn||n<$n)throw new _("Int cannot represent non 32-bit signed integer value: "+I(t));return n},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new _(`Int cannot represent non-integer value: ${I(e)}`);if(e>xn||e<$n)throw new _(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==l.INT)throw new _(`Int cannot represent non-integer value: ${le(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>xn||t<$n)throw new _(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),no=new rt({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){const t=Tn(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isFinite(n))throw new _(`Float cannot represent non numeric value: ${I(t)}`);return n},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new _(`Float cannot represent non numeric value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.FLOAT&&e.kind!==l.INT)throw new _(`Float cannot represent non numeric value: ${le(e)}`,e);return parseFloat(e.value)}}),me=new rt({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){const t=Tn(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number"&&Number.isFinite(t))return t.toString();throw new _(`String cannot represent value: ${I(e)}`)},parseValue(e){if(typeof e!="string")throw new _(`String cannot represent a non string value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.STRING)throw new _(`String cannot represent a non string value: ${le(e)}`,{nodes:e});return e.value}}),Me=new rt({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=Tn(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new _(`Boolean cannot represent a non boolean value: ${I(t)}`)},parseValue(e){if(typeof e!="boolean")throw new _(`Boolean cannot represent a non boolean value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.BOOLEAN)throw new _(`Boolean cannot represent a non boolean value: ${le(e)}`,{nodes:e});return e.value}}),Kr=new rt({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){const t=Tn(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new _(`ID cannot represent value: ${I(e)}`)},parseValue(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isInteger(e))return e.toString();throw new _(`ID cannot represent value: ${I(e)}`)},parseLiteral(e){if(e.kind!==l.STRING&&e.kind!==l.INT)throw new _("ID cannot represent a non-string and non-integer value: "+le(e),{nodes:e});return e.value}}),gn=Object.freeze([me,to,no,Me,Kr]);function sr(e){return gn.some(({name:t})=>e.name===t)}function Tn(e){if(Ve(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!Ve(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function or(e){return We(e,it)}function Oc(e){if(!or(e))throw new Error(`Expected ${I(e)} to be a GraphQL directive.`);return e}class it{constructor(t){var n,r;this.name=Ue(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=Qe(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||K(!1,`@${t.name} locations must be an Array.`);const i=(r=t.args)!==null&&r!==void 0?r:{};Ve(i)&&!Array.isArray(i)||K(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=Ks(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:eo(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const Zr=new it({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[G.FIELD,G.FRAGMENT_SPREAD,G.INLINE_FRAGMENT],args:{if:{type:new W(Me),description:"Included when true."}}}),ei=new it({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[G.FIELD,G.FRAGMENT_SPREAD,G.INLINE_FRAGMENT],args:{if:{type:new W(Me),description:"Skipped when true."}}}),ti="No longer supported",ar=new it({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[G.FIELD_DEFINITION,G.ARGUMENT_DEFINITION,G.INPUT_FIELD_DEFINITION,G.ENUM_VALUE],args:{reason:{type:me,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:ti}}}),ni=new it({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[G.SCALAR],args:{url:{type:new W(me),description:"The URL that specifies the behavior of this scalar."}}}),vt=Object.freeze([Zr,ei,ar,ni]);function ri(e){return vt.some(({name:t})=>t===e.name)}function ii(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}function dt(e,t){if(X(t)){const n=dt(e,t.ofType);return(n==null?void 0:n.kind)===l.NULL?null:n}if(e===null)return{kind:l.NULL};if(e===void 0)return null;if(fe(t)){const n=t.ofType;if(ii(e)){const r=[];for(const i of e){const s=dt(i,n);s!=null&&r.push(s)}return{kind:l.LIST,values:r}}return dt(e,n)}if(de(t)){if(!Ve(e))return null;const n=[];for(const r of Object.values(t.getFields())){const i=dt(e[r.name],r.type);i&&n.push({kind:l.OBJECT_FIELD,name:{kind:l.NAME,value:r.name},value:i})}return{kind:l.OBJECT,fields:n}}if(tt(t)){const n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:l.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){const r=String(n);return Bi.test(r)?{kind:l.INT,value:r}:{kind:l.FLOAT,value:r}}if(typeof n=="string")return ge(t)?{kind:l.ENUM,value:n}:t===Kr&&Bi.test(n)?{kind:l.INT,value:n}:{kind:l.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${I(n)}.`)}ye(!1,"Unexpected input type: "+I(t))}const Bi=/^-?(?:0|[1-9][0-9]*)$/,ur=new qe({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:me,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new W(new we(new W(Be))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new W(Be),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Be,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Be,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new W(new we(new W(si))),resolve:e=>e.getDirectives()}})}),si=new qe({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
40
+ }`)}function ee(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Fn(e){return ee(" ",e.replace(/\n/g,`
41
+ `))}function ji(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(`
42
+ `)))!==null&&t!==void 0?t:!1}function Pn(e,t){switch(e.kind){case l.NULL:return null;case l.INT:return parseInt(e.value,10);case l.FLOAT:return parseFloat(e.value);case l.STRING:case l.ENUM:case l.BOOLEAN:return e.value;case l.LIST:return e.values.map(n=>Pn(n,t));case l.OBJECT:return lt(e.fields,n=>n.name.value,n=>Pn(n.value,t));case l.VARIABLE:return t==null?void 0:t[e.name.value]}}function Me(e){if(e!=null||Z(!1,"Must provide name."),typeof e=="string"||Z(!1,"Expected name to be a string."),e.length===0)throw new _("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!Us(e.charCodeAt(t)))throw new _(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!Yr(e.charCodeAt(0)))throw new _(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function Hs(e){if(e==="true"||e==="false"||e==="null")throw new _(`Enum values cannot be named: ${e}`);return Me(e)}function yn(e){return Ve(e)||te(e)||re(e)||Ne(e)||ge(e)||le(e)||ce(e)||H(e)}function cc(e){if(!yn(e))throw new Error(`Expected ${I(e)} to be a GraphQL type.`);return e}function Ve(e){return ze(e,tt)}function lc(e){if(!Ve(e))throw new Error(`Expected ${I(e)} to be a GraphQL Scalar type.`);return e}function te(e){return ze(e,Pe)}function zs(e){if(!te(e))throw new Error(`Expected ${I(e)} to be a GraphQL Object type.`);return e}function re(e){return ze(e,$t)}function Xs(e){if(!re(e))throw new Error(`Expected ${I(e)} to be a GraphQL Interface type.`);return e}function Ne(e){return ze(e,Ct)}function fc(e){if(!Ne(e))throw new Error(`Expected ${I(e)} to be a GraphQL Union type.`);return e}function ge(e){return ze(e,pt)}function dc(e){if(!ge(e))throw new Error(`Expected ${I(e)} to be a GraphQL Enum type.`);return e}function le(e){return ze(e,Mt)}function pc(e){if(!le(e))throw new Error(`Expected ${I(e)} to be a GraphQL Input Object type.`);return e}function ce(e){return ze(e,we)}function hc(e){if(!ce(e))throw new Error(`Expected ${I(e)} to be a GraphQL List type.`);return e}function H(e){return ze(e,K)}function mc(e){if(!H(e))throw new Error(`Expected ${I(e)} to be a GraphQL Non-Null type.`);return e}function Le(e){return Ve(e)||ge(e)||le(e)||vn(e)&&Le(e.ofType)}function yc(e){if(!Le(e))throw new Error(`Expected ${I(e)} to be a GraphQL input type.`);return e}function dt(e){return Ve(e)||te(e)||re(e)||Ne(e)||ge(e)||vn(e)&&dt(e.ofType)}function vc(e){if(!dt(e))throw new Error(`Expected ${I(e)} to be a GraphQL output type.`);return e}function Ze(e){return Ve(e)||ge(e)}function Ec(e){if(!Ze(e))throw new Error(`Expected ${I(e)} to be a GraphQL leaf type.`);return e}function et(e){return te(e)||re(e)||Ne(e)}function gc(e){if(!et(e))throw new Error(`Expected ${I(e)} to be a GraphQL composite type.`);return e}function We(e){return re(e)||Ne(e)}function Tc(e){if(!We(e))throw new Error(`Expected ${I(e)} to be a GraphQL abstract type.`);return e}class we{constructor(t){yn(t)||Z(!1,`Expected ${I(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class K{constructor(t){zr(t)||Z(!1,`Expected ${I(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function vn(e){return ce(e)||H(e)}function bc(e){if(!vn(e))throw new Error(`Expected ${I(e)} to be a GraphQL wrapping type.`);return e}function zr(e){return yn(e)&&!H(e)}function Ws(e){if(!zr(e))throw new Error(`Expected ${I(e)} to be a GraphQL nullable type.`);return e}function Xr(e){if(e)return H(e)?e.ofType:e}function En(e){return Ve(e)||te(e)||re(e)||Ne(e)||ge(e)||le(e)}function _c(e){if(!En(e))throw new Error(`Expected ${I(e)} to be a GraphQL named type.`);return e}function Se(e){if(e){let t=e;for(;vn(t);)t=t.ofType;return t}}function Wr(e){return typeof e=="function"?e():e}function Kr(e){return typeof e=="function"?e():e}class tt{constructor(t){var n,r,i,s;const o=(n=t.parseValue)!==null&&n!==void 0?n:Ui;this.name=Me(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:Ui,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(a,u)=>o(Pn(a,u)),this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(s=t.extensionASTNodes)!==null&&s!==void 0?s:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||Z(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${I(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||Z(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||Z(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Pe{constructor(t){var n;this.name=Me(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>Zs(t),this._interfaces=()=>Ks(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||Z(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${I(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:to(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Ks(e){var t;const n=Wr((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||Z(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function Zs(e){const t=Kr(e.fields);return kt(t)||Z(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),rt(t,(n,r)=>{var i;kt(n)||Z(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||Z(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${I(n.resolve)}.`);const s=(i=n.args)!==null&&i!==void 0?i:{};return kt(s)||Z(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:Me(r),description:n.description,type:n.type,args:eo(s),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:Be(n.extensions),astNode:n.astNode}})}function eo(e){return Object.entries(e).map(([t,n])=>({name:Me(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:Be(n.extensions),astNode:n.astNode}))}function kt(e){return Ce(e)&&!Array.isArray(e)}function to(e){return rt(e,t=>({description:t.description,type:t.type,args:no(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function no(e){return lt(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function mt(e){return H(e.type)&&e.defaultValue===void 0}class $t{constructor(t){var n;this.name=Me(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=Zs.bind(void 0,t),this._interfaces=Ks.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||Z(!1,`${this.name} must provide "resolveType" as a function, but got: ${I(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:to(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Ct{constructor(t){var n;this.name=Me(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=Nc.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||Z(!1,`${this.name} must provide "resolveType" as a function, but got: ${I(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Nc(e){const t=Wr(e.types);return Array.isArray(t)||Z(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class pt{constructor(t){var n;this.name=Me(t.name),this.description=t.description,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=Ic(this.name,t.values),this._valueLookup=new Map(this._values.map(r=>[r.value,r])),this._nameLookup=st(this._values,r=>r.name)}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(t){return this._nameLookup[t]}serialize(t){const n=this._valueLookup.get(t);if(n===void 0)throw new _(`Enum "${this.name}" cannot represent value: ${I(t)}`);return n.name}parseValue(t){if(typeof t!="string"){const r=I(t);throw new _(`Enum "${this.name}" cannot represent non-string value: ${r}.`+An(this,r))}const n=this.getValue(t);if(n==null)throw new _(`Value "${t}" does not exist in "${this.name}" enum.`+An(this,t));return n.value}parseLiteral(t,n){if(t.kind!==l.ENUM){const i=ue(t);throw new _(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+An(this,i),{nodes:t})}const r=this.getValue(t.value);if(r==null){const i=ue(t);throw new _(`Value "${i}" does not exist in "${this.name}" enum.`+An(this,i),{nodes:t})}return r.value}toConfig(){const t=lt(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function An(e,t){const n=e.getValues().map(i=>i.name),r=ht(t,n);return it("the enum value",r)}function Ic(e,t){return kt(t)||Z(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(kt(r)||Z(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${I(r)}.`),{name:Hs(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:Be(r.extensions),astNode:r.astNode}))}class Mt{constructor(t){var n;this.name=Me(t.name),this.description=t.description,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=wc.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=rt(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function wc(e){const t=Kr(e.fields);return kt(t)||Z(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),rt(t,(n,r)=>(!("resolve"in n)||Z(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:Me(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:Be(n.extensions),astNode:n.astNode}))}function rr(e){return H(e.type)&&e.defaultValue===void 0}function jn(e,t){return e===t?!0:H(e)&&H(t)||ce(e)&&ce(t)?jn(e.ofType,t.ofType):!1}function Tt(e,t,n){return t===n?!0:H(n)?H(t)?Tt(e,t.ofType,n.ofType):!1:H(t)?Tt(e,t.ofType,n):ce(n)?ce(t)?Tt(e,t.ofType,n.ofType):!1:ce(t)?!1:We(n)&&(re(t)||te(t))&&e.isSubType(n,t)}function Rr(e,t,n){return t===n?!0:We(t)?We(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):We(n)?e.isSubType(n,t):!1}const xn=2147483647,$n=-2147483648,ro=new tt({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=Tn(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new _(`Int cannot represent non-integer value: ${I(t)}`);if(n>xn||n<$n)throw new _("Int cannot represent non 32-bit signed integer value: "+I(t));return n},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new _(`Int cannot represent non-integer value: ${I(e)}`);if(e>xn||e<$n)throw new _(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==l.INT)throw new _(`Int cannot represent non-integer value: ${ue(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>xn||t<$n)throw new _(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),io=new tt({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){const t=Tn(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isFinite(n))throw new _(`Float cannot represent non numeric value: ${I(t)}`);return n},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new _(`Float cannot represent non numeric value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.FLOAT&&e.kind!==l.INT)throw new _(`Float cannot represent non numeric value: ${ue(e)}`,e);return parseFloat(e.value)}}),he=new tt({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){const t=Tn(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number"&&Number.isFinite(t))return t.toString();throw new _(`String cannot represent value: ${I(e)}`)},parseValue(e){if(typeof e!="string")throw new _(`String cannot represent a non string value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.STRING)throw new _(`String cannot represent a non string value: ${ue(e)}`,{nodes:e});return e.value}}),xe=new tt({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=Tn(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new _(`Boolean cannot represent a non boolean value: ${I(t)}`)},parseValue(e){if(typeof e!="boolean")throw new _(`Boolean cannot represent a non boolean value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.BOOLEAN)throw new _(`Boolean cannot represent a non boolean value: ${ue(e)}`,{nodes:e});return e.value}}),Zr=new tt({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){const t=Tn(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new _(`ID cannot represent value: ${I(e)}`)},parseValue(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isInteger(e))return e.toString();throw new _(`ID cannot represent value: ${I(e)}`)},parseLiteral(e){if(e.kind!==l.STRING&&e.kind!==l.INT)throw new _("ID cannot represent a non-string and non-integer value: "+ue(e),{nodes:e});return e.value}}),gn=Object.freeze([he,ro,io,xe,Zr]);function ir(e){return gn.some(({name:t})=>e.name===t)}function Tn(e){if(Ce(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!Ce(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function sr(e){return ze(e,nt)}function Oc(e){if(!sr(e))throw new Error(`Expected ${I(e)} to be a GraphQL directive.`);return e}class nt{constructor(t){var n,r;this.name=Me(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=Be(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||Z(!1,`@${t.name} locations must be an Array.`);const i=(r=t.args)!==null&&r!==void 0?r:{};Ce(i)&&!Array.isArray(i)||Z(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=eo(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:no(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const ei=new nt({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[G.FIELD,G.FRAGMENT_SPREAD,G.INLINE_FRAGMENT],args:{if:{type:new K(xe),description:"Included when true."}}}),ti=new nt({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[G.FIELD,G.FRAGMENT_SPREAD,G.INLINE_FRAGMENT],args:{if:{type:new K(xe),description:"Skipped when true."}}}),ni="No longer supported",or=new nt({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[G.FIELD_DEFINITION,G.ARGUMENT_DEFINITION,G.INPUT_FIELD_DEFINITION,G.ENUM_VALUE],args:{reason:{type:he,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:ni}}}),ri=new nt({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[G.SCALAR],args:{url:{type:new K(he),description:"The URL that specifies the behavior of this scalar."}}}),yt=Object.freeze([ei,ti,or,ri]);function ii(e){return yt.some(({name:t})=>t===e.name)}function si(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}function ft(e,t){if(H(t)){const n=ft(e,t.ofType);return(n==null?void 0:n.kind)===l.NULL?null:n}if(e===null)return{kind:l.NULL};if(e===void 0)return null;if(ce(t)){const n=t.ofType;if(si(e)){const r=[];for(const i of e){const s=ft(i,n);s!=null&&r.push(s)}return{kind:l.LIST,values:r}}return ft(e,n)}if(le(t)){if(!Ce(e))return null;const n=[];for(const r of Object.values(t.getFields())){const i=ft(e[r.name],r.type);i&&n.push({kind:l.OBJECT_FIELD,name:{kind:l.NAME,value:r.name},value:i})}return{kind:l.OBJECT,fields:n}}if(Ze(t)){const n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:l.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){const r=String(n);return Bi.test(r)?{kind:l.INT,value:r}:{kind:l.FLOAT,value:r}}if(typeof n=="string")return ge(t)?{kind:l.ENUM,value:n}:t===Zr&&Bi.test(n)?{kind:l.INT,value:n}:{kind:l.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${I(n)}.`)}me(!1,"Unexpected input type: "+I(t))}const Bi=/^-?(?:0|[1-9][0-9]*)$/,ar=new Pe({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:he,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new K(new we(new K(Ue))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new K(Ue),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Ue,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Ue,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new K(new we(new K(oi))),resolve:e=>e.getDirectives()}})}),oi=new Pe({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
43
43
 
44
- 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 W(me),resolve:e=>e.name},description:{type:me,resolve:e=>e.description},isRepeatable:{type:new W(Me),resolve:e=>e.isRepeatable},locations:{type:new W(new we(new W(oi))),resolve:e=>e.locations},args:{type:new W(new we(new W(bn))),args:{includeDeprecated:{type:Me,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),oi=new ht({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:G.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:G.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:G.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:G.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:G.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:G.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:G.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:G.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:G.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:G.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:G.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:G.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:G.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:G.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:G.UNION,description:"Location adjacent to a union definition."},ENUM:{value:G.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:G.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:G.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:G.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),Be=new qe({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 W(ci),resolve(e){if(Pe(e))return oe.SCALAR;if(te(e))return oe.OBJECT;if(re(e))return oe.INTERFACE;if(Ne(e))return oe.UNION;if(ge(e))return oe.ENUM;if(de(e))return oe.INPUT_OBJECT;if(fe(e))return oe.LIST;if(X(e))return oe.NON_NULL;ye(!1,`Unexpected type: "${I(e)}".`)}},name:{type:me,resolve:e=>"name"in e?e.name:void 0},description:{type:me,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:me,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new we(new W(ai)),args:{includeDeprecated:{type:Me,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(te(e)||re(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new we(new W(Be)),resolve(e){if(te(e)||re(e))return e.getInterfaces()}},possibleTypes:{type:new we(new W(Be)),resolve(e,t,n,{schema:r}){if(Ze(e))return r.getPossibleTypes(e)}},enumValues:{type:new we(new W(ui)),args:{includeDeprecated:{type:Me,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(ge(e)){const n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new we(new W(bn)),args:{includeDeprecated:{type:Me,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(de(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Be,resolve:e=>"ofType"in e?e.ofType:void 0}})}),ai=new qe({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 W(me),resolve:e=>e.name},description:{type:me,resolve:e=>e.description},args:{type:new W(new we(new W(bn))),args:{includeDeprecated:{type:Me,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new W(Be),resolve:e=>e.type},isDeprecated:{type:new W(Me),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:me,resolve:e=>e.deprecationReason}})}),bn=new qe({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 W(me),resolve:e=>e.name},description:{type:me,resolve:e=>e.description},type:{type:new W(Be),resolve:e=>e.type},defaultValue:{type:me,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,r=dt(n,t);return r?le(r):null}},isDeprecated:{type:new W(Me),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:me,resolve:e=>e.deprecationReason}})}),ui=new qe({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 W(me),resolve:e=>e.name},description:{type:me,resolve:e=>e.description},isDeprecated:{type:new W(Me),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:me,resolve:e=>e.deprecationReason}})});var oe;(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"})(oe||(oe={}));const ci=new ht({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:oe.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:oe.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:oe.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:oe.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:oe.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:oe.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:oe.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:oe.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),un={name:"__schema",type:new W(ur),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},cn={name:"__type",type:Be,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new W(me),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},ln={name:"__typename",type:new W(me),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},_n=Object.freeze([ur,si,oi,Be,ai,bn,ui,ci]);function Ot(e){return _n.some(({name:t})=>e.name===t)}function ro(e){return We(e,Yt)}function li(e){if(!ro(e))throw new Error(`Expected ${I(e)} to be a GraphQL schema.`);return e}class Yt{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,Ve(t)||K(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||K(!1,`"types" must be Array if provided but got: ${I(t.types)}.`),!t.directives||Array.isArray(t.directives)||K(!1,`"directives" must be Array if provided but got: ${I(t.directives)}.`),this.description=t.description,this.extensions=Qe(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:vt;const i=new Set(t.types);if(t.types!=null)for(const s of t.types)i.delete(s),ze(s,i);this._queryType!=null&&ze(this._queryType,i),this._mutationType!=null&&ze(this._mutationType,i),this._subscriptionType!=null&&ze(this._subscriptionType,i);for(const s of this._directives)if(or(s))for(const o of s.args)ze(o.type,i);ze(ur,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const s of i){if(s==null)continue;const o=s.name;if(o||K(!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,re(s)){for(const a of s.getInterfaces())if(re(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.interfaces.push(s)}}else if(te(s)){for(const a of s.getInterfaces())if(re(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.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 be.QUERY:return this.getQueryType();case be.MUTATION:return this.getMutationType();case be.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return Ne(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){const n=this._implementationsMap[t.name];return n??{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),Ne(t))for(const i of t.getTypes())r[i.name]=!0;else{const i=this.getImplementations(t);for(const s of i.objects)r[s.name]=!0;for(const 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 ze(e,t){const n=Re(e);if(!t.has(n)){if(t.add(n),Ne(n))for(const r of n.getTypes())ze(r,t);else if(te(n)||re(n)){for(const r of n.getInterfaces())ze(r,t);for(const r of Object.values(n.getFields())){ze(r.type,t);for(const i of r.args)ze(i.type,t)}}else if(de(n))for(const r of Object.values(n.getFields()))ze(r.type,t)}return t}function fi(e){if(li(e),e.__validationErrors)return e.__validationErrors;const t=new Dc(e);Ac(t),Sc(t),Rc(t);const n=t.getErrors();return e.__validationErrors=n,n}function di(e){const t=fi(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
44
+ 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 K(he),resolve:e=>e.name},description:{type:he,resolve:e=>e.description},isRepeatable:{type:new K(xe),resolve:e=>e.isRepeatable},locations:{type:new K(new we(new K(ai))),resolve:e=>e.locations},args:{type:new K(new we(new K(bn))),args:{includeDeprecated:{type:xe,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),ai=new pt({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:G.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:G.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:G.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:G.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:G.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:G.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:G.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:G.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:G.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:G.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:G.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:G.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:G.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:G.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:G.UNION,description:"Location adjacent to a union definition."},ENUM:{value:G.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:G.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:G.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:G.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),Ue=new Pe({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 K(li),resolve(e){if(Ve(e))return se.SCALAR;if(te(e))return se.OBJECT;if(re(e))return se.INTERFACE;if(Ne(e))return se.UNION;if(ge(e))return se.ENUM;if(le(e))return se.INPUT_OBJECT;if(ce(e))return se.LIST;if(H(e))return se.NON_NULL;me(!1,`Unexpected type: "${I(e)}".`)}},name:{type:he,resolve:e=>"name"in e?e.name:void 0},description:{type:he,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:he,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new we(new K(ui)),args:{includeDeprecated:{type:xe,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(te(e)||re(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new we(new K(Ue)),resolve(e){if(te(e)||re(e))return e.getInterfaces()}},possibleTypes:{type:new we(new K(Ue)),resolve(e,t,n,{schema:r}){if(We(e))return r.getPossibleTypes(e)}},enumValues:{type:new we(new K(ci)),args:{includeDeprecated:{type:xe,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(ge(e)){const n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new we(new K(bn)),args:{includeDeprecated:{type:xe,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(le(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Ue,resolve:e=>"ofType"in e?e.ofType:void 0}})}),ui=new Pe({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 K(he),resolve:e=>e.name},description:{type:he,resolve:e=>e.description},args:{type:new K(new we(new K(bn))),args:{includeDeprecated:{type:xe,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new K(Ue),resolve:e=>e.type},isDeprecated:{type:new K(xe),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:he,resolve:e=>e.deprecationReason}})}),bn=new Pe({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 K(he),resolve:e=>e.name},description:{type:he,resolve:e=>e.description},type:{type:new K(Ue),resolve:e=>e.type},defaultValue:{type:he,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,r=ft(n,t);return r?ue(r):null}},isDeprecated:{type:new K(xe),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:he,resolve:e=>e.deprecationReason}})}),ci=new Pe({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 K(he),resolve:e=>e.name},description:{type:he,resolve:e=>e.description},isDeprecated:{type:new K(xe),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:he,resolve:e=>e.deprecationReason}})});var se;(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"})(se||(se={}));const li=new pt({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:se.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:se.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:se.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:se.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:se.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:se.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:se.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:se.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),un={name:"__schema",type:new K(ar),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},cn={name:"__type",type:Ue,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new K(he),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},ln={name:"__typename",type:new K(he),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},_n=Object.freeze([ar,oi,ai,Ue,ui,bn,ci,li]);function wt(e){return _n.some(({name:t})=>e.name===t)}function so(e){return ze(e,Qt)}function fi(e){if(!so(e))throw new Error(`Expected ${I(e)} to be a GraphQL schema.`);return e}class Qt{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,Ce(t)||Z(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||Z(!1,`"types" must be Array if provided but got: ${I(t.types)}.`),!t.directives||Array.isArray(t.directives)||Z(!1,`"directives" must be Array if provided but got: ${I(t.directives)}.`),this.description=t.description,this.extensions=Be(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:yt;const i=new Set(t.types);if(t.types!=null)for(const s of t.types)i.delete(s),Ge(s,i);this._queryType!=null&&Ge(this._queryType,i),this._mutationType!=null&&Ge(this._mutationType,i),this._subscriptionType!=null&&Ge(this._subscriptionType,i);for(const s of this._directives)if(sr(s))for(const o of s.args)Ge(o.type,i);Ge(ar,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const s of i){if(s==null)continue;const o=s.name;if(o||Z(!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,re(s)){for(const a of s.getInterfaces())if(re(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.interfaces.push(s)}}else if(te(s)){for(const a of s.getInterfaces())if(re(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.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 be.QUERY:return this.getQueryType();case be.MUTATION:return this.getMutationType();case be.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return Ne(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){const n=this._implementationsMap[t.name];return n??{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),Ne(t))for(const i of t.getTypes())r[i.name]=!0;else{const i=this.getImplementations(t);for(const s of i.objects)r[s.name]=!0;for(const 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 Ge(e,t){const n=Se(e);if(!t.has(n)){if(t.add(n),Ne(n))for(const r of n.getTypes())Ge(r,t);else if(te(n)||re(n)){for(const r of n.getInterfaces())Ge(r,t);for(const r of Object.values(n.getFields())){Ge(r.type,t);for(const i of r.args)Ge(i.type,t)}}else if(le(n))for(const r of Object.values(n.getFields()))Ge(r.type,t)}return t}function di(e){if(fi(e),e.__validationErrors)return e.__validationErrors;const t=new Ac(e);Dc(t),Sc(t),Rc(t);const n=t.getErrors();return e.__validationErrors=n,n}function pi(e){const t=di(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
45
45
 
46
- `))}class Dc{constructor(t){this._errors=[],this.schema=t}reportError(t,n){const r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new _(t,{nodes:r}))}getErrors(){return this._errors}}function Ac(e){const t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!te(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${I(n)}.`,(r=Er(t,be.QUERY))!==null&&r!==void 0?r:n.astNode)}const i=t.getMutationType();if(i&&!te(i)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${I(i)}.`,(s=Er(t,be.MUTATION))!==null&&s!==void 0?s:i.astNode)}const o=t.getSubscriptionType();if(o&&!te(o)){var a;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${I(o)}.`,(a=Er(t,be.SUBSCRIPTION))!==null&&a!==void 0?a:o.astNode)}}function Er(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 Sc(e){for(const n of e.schema.getDirectives()){if(!or(n)){e.reportError(`Expected directive but got: ${I(n)}.`,n==null?void 0:n.astNode);continue}wt(e,n);for(const r of n.args)if(wt(e,r),ke(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${I(r.type)}.`,r.astNode),yt(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[pi(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function wt(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function Rc(e){const t=Cc(e),n=e.schema.getTypeMap();for(const r of Object.values(n)){if(!En(r)){e.reportError(`Expected GraphQL named type but got: ${I(r)}.`,r.astNode);continue}Ot(r)||wt(e,r),te(r)||re(r)?(qi(e,r),Gi(e,r)):Ne(r)?kc(e,r):ge(r)?xc(e,r):de(r)&&($c(e,r),t(r))}}function qi(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const o of n){if(wt(e,o),!pt(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${I(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(const a of o.args){const u=a.name;if(wt(e,a),!ke(a.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${u}:) must be Input Type but got: ${I(a.type)}.`,(i=a.astNode)===null||i===void 0?void 0:i.type)}if(yt(a)&&a.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${u}:) cannot be deprecated.`,[pi(a.astNode),(s=a.astNode)===null||s===void 0?void 0:s.type])}}}}function Gi(e,t){const n=Object.create(null);for(const r of t.getInterfaces()){if(!re(r)){e.reportError(`Type ${I(t)} must only implement Interface types, it cannot implement ${I(r)}.`,nn(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,nn(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,nn(t,r));continue}n[r.name]=!0,Fc(e,t,r),Lc(e,t,r)}}function Lc(e,t,n){const r=t.getFields();for(const u of Object.values(n.getFields())){const c=u.name,f=r[c];if(!f){e.reportError(`Interface field ${n.name}.${c} expected but ${t.name} does not provide it.`,[u.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!Tt(e.schema,f.type,u.type)){var i,s;e.reportError(`Interface field ${n.name}.${c} expects type ${I(u.type)} but ${t.name}.${c} is type ${I(f.type)}.`,[(i=u.astNode)===null||i===void 0?void 0:i.type,(s=f.astNode)===null||s===void 0?void 0:s.type])}for(const d of u.args){const p=d.name,y=f.args.find(E=>E.name===p);if(!y){e.reportError(`Interface field argument ${n.name}.${c}(${p}:) expected but ${t.name}.${c} does not provide it.`,[d.astNode,f.astNode]);continue}if(!Bn(d.type,y.type)){var o,a;e.reportError(`Interface field argument ${n.name}.${c}(${p}:) expects type ${I(d.type)} but ${t.name}.${c}(${p}:) is type ${I(y.type)}.`,[(o=d.astNode)===null||o===void 0?void 0:o.type,(a=y.astNode)===null||a===void 0?void 0:a.type])}}for(const d of f.args){const p=d.name;!u.args.find(E=>E.name===p)&&yt(d)&&e.reportError(`Object field ${t.name}.${c} includes required argument ${p} that is missing from the Interface field ${n.name}.${c}.`,[d.astNode,u.astNode])}}}function Fc(e,t,n){const r=t.getInterfaces();for(const 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}.`,[...nn(n,i),...nn(t,n)])}function kc(e,t){const n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const r=Object.create(null);for(const i of n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,Qi(t,i.name));continue}r[i.name]=!0,te(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${I(i)}.`,Qi(t,String(i)))}}function xc(e,t){const n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const r of n)wt(e,r)}function $c(e,t){const 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(const s of n){if(wt(e,s),!ke(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${I(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type)}if(ir(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[pi(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}}}function Cc(e){const 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;const o=Object.values(s.getFields());for(const a of o)if(X(a.type)&&de(a.type.ofType)){const u=a.type.ofType,c=r[u.name];if(n.push(a),c===void 0)i(u);else{const f=n.slice(c),d=f.map(p=>p.name).join(".");e.reportError(`Cannot reference Input Object "${u.name}" within itself through a series of non-null fields: "${d}".`,f.map(p=>p.astNode))}n.pop()}r[s.name]=void 0}}function nn(e,t){const{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 Qi(e,t){const{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 pi(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===ar.name)}function xe(e,t){switch(t.kind){case l.LIST_TYPE:{const n=xe(e,t.type);return n&&new we(n)}case l.NON_NULL_TYPE:{const n=xe(e,t.type);return n&&new W(n)}case l.NAMED_TYPE:return e.getType(t.name.value)}}class hi{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??Mc,n&&(ke(n)&&this._inputTypeStack.push(n),nt(n)&&this._parentTypeStack.push(n),pt(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){const n=this._schema;switch(t.kind){case l.SELECTION_SET:{const i=Re(this.getType());this._parentTypeStack.push(nt(i)?i:void 0);break}case l.FIELD:{const i=this.getParentType();let s,o;i&&(s=this._getFieldDef(n,i,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push(pt(o)?o:void 0);break}case l.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case l.OPERATION_DEFINITION:{const i=n.getRootType(t.operation);this._typeStack.push(te(i)?i:void 0);break}case l.INLINE_FRAGMENT:case l.FRAGMENT_DEFINITION:{const i=t.typeCondition,s=i?xe(n,i):Re(this.getType());this._typeStack.push(pt(s)?s:void 0);break}case l.VARIABLE_DEFINITION:{const i=xe(n,t.type);this._inputTypeStack.push(ke(i)?i:void 0);break}case l.ARGUMENT:{var r;let i,s;const o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(a=>a.name===t.name.value),i&&(s=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(ke(s)?s:void 0);break}case l.LIST:{const i=Hr(this.getInputType()),s=fe(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(ke(s)?s:void 0);break}case l.OBJECT_FIELD:{const i=Re(this.getInputType());let s,o;de(i)&&(o=i.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(ke(s)?s:void 0);break}case l.ENUM:{const i=Re(this.getInputType());let s;ge(i)&&(s=i.getValue(t.value)),this._enumValue=s;break}}}leave(t){switch(t.kind){case l.SELECTION_SET:this._parentTypeStack.pop();break;case l.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case l.DIRECTIVE:this._directive=null;break;case l.OPERATION_DEFINITION:case l.INLINE_FRAGMENT:case l.FRAGMENT_DEFINITION:this._typeStack.pop();break;case l.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case l.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.LIST:case l.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.ENUM:this._enumValue=null;break}}}function Mc(e,t,n){const r=n.name.value;if(r===un.name&&e.getQueryType()===t)return un;if(r===cn.name&&e.getQueryType()===t)return cn;if(r===ln.name&&nt(t))return ln;if(te(t)||re(t))return t.getFields()[r]}function mi(e,t){return{enter(...n){const r=n[0];e.enter(r);const i=$t(t,r.kind).enter;if(i){const s=i.apply(t,n);return s!==void 0&&(e.leave(r),Or(s)&&e.enter(s)),s}},leave(...n){const r=n[0],i=$t(t,r.kind).leave;let s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}function jc(e){return yi(e)||vi(e)||Ei(e)}function yi(e){return e.kind===l.OPERATION_DEFINITION||e.kind===l.FRAGMENT_DEFINITION}function Vc(e){return e.kind===l.FIELD||e.kind===l.FRAGMENT_SPREAD||e.kind===l.INLINE_FRAGMENT}function io(e){return e.kind===l.VARIABLE||e.kind===l.INT||e.kind===l.FLOAT||e.kind===l.STRING||e.kind===l.BOOLEAN||e.kind===l.NULL||e.kind===l.ENUM||e.kind===l.LIST||e.kind===l.OBJECT}function Rr(e){return io(e)&&(e.kind===l.LIST?e.values.some(Rr):e.kind===l.OBJECT?e.fields.some(t=>Rr(t.value)):e.kind!==l.VARIABLE)}function Uc(e){return e.kind===l.NAMED_TYPE||e.kind===l.LIST_TYPE||e.kind===l.NON_NULL_TYPE}function vi(e){return e.kind===l.SCHEMA_DEFINITION||zt(e)||e.kind===l.DIRECTIVE_DEFINITION}function zt(e){return e.kind===l.SCALAR_TYPE_DEFINITION||e.kind===l.OBJECT_TYPE_DEFINITION||e.kind===l.INTERFACE_TYPE_DEFINITION||e.kind===l.UNION_TYPE_DEFINITION||e.kind===l.ENUM_TYPE_DEFINITION||e.kind===l.INPUT_OBJECT_TYPE_DEFINITION}function Ei(e){return e.kind===l.SCHEMA_EXTENSION||cr(e)}function cr(e){return e.kind===l.SCALAR_TYPE_EXTENSION||e.kind===l.OBJECT_TYPE_EXTENSION||e.kind===l.INTERFACE_TYPE_EXTENSION||e.kind===l.UNION_TYPE_EXTENSION||e.kind===l.ENUM_TYPE_EXTENSION||e.kind===l.INPUT_OBJECT_TYPE_EXTENSION}function so(e){return{Document(t){for(const n of t.definitions)if(!yi(n)){const r=n.kind===l.SCHEMA_DEFINITION||n.kind===l.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new _(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function oo(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),s=t.name.value;let o=ot("to use an inline fragment on",Pc(i,n,s));o===""&&(o=ot(Bc(n,s))),e.reportError(new _(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}))}}}}function Pc(e,t,n){if(!Ze(t))return[];const r=new Set,i=Object.create(null);for(const o of e.getPossibleTypes(t))if(o.getFields()[n]){r.add(o),i[o.name]=1;for(const a of o.getInterfaces()){var s;a.getFields()[n]&&(r.add(a),i[a.name]=((s=i[a.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((o,a)=>{const u=i[a.name]-i[o.name];return u!==0?u:re(o)&&e.isSubType(o,a)?-1:re(a)&&e.isSubType(a,o)?1:mn(o.name,a.name)}).map(o=>o.name)}function Bc(e,t){if(te(e)||re(e)){const n=Object.keys(e.getFields());return mt(t,n)}return[]}function ao(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=xe(e.getSchema(),n);if(r&&!nt(r)){const i=le(n);e.reportError(new _(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=xe(e.getSchema(),t.typeCondition);if(n&&!nt(n)){const r=le(t.typeCondition);e.reportError(new _(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function uo(e){return{...co(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const s=t.name.value,o=r.args.map(u=>u.name),a=mt(s,o);e.reportError(new _(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+ot(a),{nodes:t}))}}}}function co(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():vt;for(const o of r)t[o.name]=o.args.map(a=>a.name);const i=e.getDocument().definitions;for(const o of i)if(o.kind===l.DIRECTIVE_DEFINITION){var s;const a=(s=o.arguments)!==null&&s!==void 0?s:[];t[o.name.value]=a.map(u=>u.name.value)}return{Directive(o){const a=o.name.value,u=t[a];if(o.arguments&&u)for(const c of o.arguments){const f=c.name.value;if(!u.includes(f)){const d=mt(f,u);e.reportError(new _(`Unknown argument "${f}" on directive "@${a}".`+ot(d),{nodes:c}))}}return!1}}}function gi(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():vt;for(const s of r)t[s.name]=s.locations;const i=e.getDocument().definitions;for(const s of i)s.kind===l.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return{Directive(s,o,a,u,c){const f=s.name.value,d=t[f];if(!d){e.reportError(new _(`Unknown directive "@${f}".`,{nodes:s}));return}const p=qc(c);p&&!d.includes(p)&&e.reportError(new _(`Directive "@${f}" may not be used on ${p}.`,{nodes:s}))}}}function qc(e){const t=e[e.length-1];switch("kind"in t||ye(!1),t.kind){case l.OPERATION_DEFINITION:return Gc(t.operation);case l.FIELD:return G.FIELD;case l.FRAGMENT_SPREAD:return G.FRAGMENT_SPREAD;case l.INLINE_FRAGMENT:return G.INLINE_FRAGMENT;case l.FRAGMENT_DEFINITION:return G.FRAGMENT_DEFINITION;case l.VARIABLE_DEFINITION:return G.VARIABLE_DEFINITION;case l.SCHEMA_DEFINITION:case l.SCHEMA_EXTENSION:return G.SCHEMA;case l.SCALAR_TYPE_DEFINITION:case l.SCALAR_TYPE_EXTENSION:return G.SCALAR;case l.OBJECT_TYPE_DEFINITION:case l.OBJECT_TYPE_EXTENSION:return G.OBJECT;case l.FIELD_DEFINITION:return G.FIELD_DEFINITION;case l.INTERFACE_TYPE_DEFINITION:case l.INTERFACE_TYPE_EXTENSION:return G.INTERFACE;case l.UNION_TYPE_DEFINITION:case l.UNION_TYPE_EXTENSION:return G.UNION;case l.ENUM_TYPE_DEFINITION:case l.ENUM_TYPE_EXTENSION:return G.ENUM;case l.ENUM_VALUE_DEFINITION:return G.ENUM_VALUE;case l.INPUT_OBJECT_TYPE_DEFINITION:case l.INPUT_OBJECT_TYPE_EXTENSION:return G.INPUT_OBJECT;case l.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||ye(!1),n.kind===l.INPUT_OBJECT_TYPE_DEFINITION?G.INPUT_FIELD_DEFINITION:G.ARGUMENT_DEFINITION}default:ye(!1,"Unexpected kind: "+I(t.kind))}}function Gc(e){switch(e){case be.QUERY:return G.QUERY;case be.MUTATION:return G.MUTATION;case be.SUBSCRIPTION:return G.SUBSCRIPTION}}function lo(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new _(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function Ti(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const s of e.getDocument().definitions)zt(s)&&(r[s.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,o,a,u,c){const f=s.name.value;if(!n[f]&&!r[f]){var d;const p=(d=c[2])!==null&&d!==void 0?d:a,y=p!=null&&Qc(p);if(y&&Yi.includes(f))return;const E=mt(f,y?Yi.concat(i):i);e.reportError(new _(`Unknown type "${f}".`+ot(E),{nodes:s}))}}}}const Yi=[...gn,..._n].map(e=>e.name);function Qc(e){return"kind"in e&&(vi(e)||Ei(e))}function fo(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===l.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new _("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function po(e){var t,n,r;const 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();let o=0;return{SchemaDefinition(a){if(s){e.reportError(new _("Cannot define a new schema within a schema extension.",{nodes:a}));return}o>0&&e.reportError(new _("Must provide only one schema definition.",{nodes:a})),++o}}}function ho(e){const 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;const o=s.name.value;t[o]=!0;const a=e.getFragmentSpreads(s.selectionSet);if(a.length!==0){r[o]=n.length;for(const u of a){const c=u.name.value,f=r[c];if(n.push(u),f===void 0){const d=e.getFragment(c);d&&i(d)}else{const d=n.slice(f),p=d.slice(0,-1).map(y=>'"'+y.name.value+'"').join(", ");e.reportError(new _(`Cannot spread fragment "${c}" within itself`+(p!==""?` via ${p}.`:"."),{nodes:d}))}n.pop()}r[o]=void 0}}}function mo(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const s=i.name.value;t[s]!==!0&&e.reportError(new _(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}}}function yo(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of t)for(const s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(const i of n){const s=i.name.value;r[s]!==!0&&e.reportError(new _(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function vo(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:s}of i)r[s.name.value]=!0;for(const s of t){const o=s.variable.name.value;r[o]!==!0&&e.reportError(new _(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}function lr(e){switch(e.kind){case l.OBJECT:return{...e,fields:Yc(e.fields)};case l.LIST:return{...e,values:e.values.map(lr)};case l.INT:case l.FLOAT:case l.STRING:case l.BOOLEAN:case l.NULL:case l.ENUM:case l.VARIABLE:return e}}function Yc(e){return e.map(t=>({...t,value:lr(t.value)})).sort((t,n)=>mn(t.name.value,n.name.value))}function Eo(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Eo(n)).join(" and "):e}function go(e){const t=new Wc,n=new Map;return{SelectionSet(r){const i=zc(e,n,t,e.getParentType(),r);for(const[[s,o],a,u]of i){const c=Eo(o);e.reportError(new _(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:a.concat(u)}))}}}}function zc(e,t,n,r,i){const s=[],[o,a]=Qn(e,t,r,i);if(Hc(e,s,t,n,o),a.length!==0)for(let u=0;u<a.length;u++){qn(e,s,t,n,!1,o,a[u]);for(let c=u+1;c<a.length;c++)Gn(e,s,t,n,!1,a[u],a[c])}return s}function qn(e,t,n,r,i,s,o){const a=e.getFragment(o);if(!a)return;const[u,c]=Fr(e,n,a);if(s!==u){bi(e,t,n,r,i,s,u);for(const f of c)r.has(f,o,i)||(r.add(f,o,i),qn(e,t,n,r,i,s,f))}}function Gn(e,t,n,r,i,s,o){if(s===o||r.has(s,o,i))return;r.add(s,o,i);const a=e.getFragment(s),u=e.getFragment(o);if(!a||!u)return;const[c,f]=Fr(e,n,a),[d,p]=Fr(e,n,u);bi(e,t,n,r,i,c,d);for(const y of p)Gn(e,t,n,r,i,s,y);for(const y of f)Gn(e,t,n,r,i,y,o)}function Jc(e,t,n,r,i,s,o,a){const u=[],[c,f]=Qn(e,t,i,s),[d,p]=Qn(e,t,o,a);bi(e,u,t,n,r,c,d);for(const y of p)qn(e,u,t,n,r,c,y);for(const y of f)qn(e,u,t,n,r,d,y);for(const y of f)for(const E of p)Gn(e,u,t,n,r,y,E);return u}function Hc(e,t,n,r,i){for(const[s,o]of Object.entries(i))if(o.length>1)for(let a=0;a<o.length;a++)for(let u=a+1;u<o.length;u++){const c=To(e,n,r,!1,s,o[a],o[u]);c&&t.push(c)}}function bi(e,t,n,r,i,s,o){for(const[a,u]of Object.entries(s)){const c=o[a];if(c)for(const f of u)for(const d of c){const p=To(e,n,r,i,a,f,d);p&&t.push(p)}}}function To(e,t,n,r,i,s,o){const[a,u,c]=s,[f,d,p]=o,y=r||a!==f&&te(a)&&te(f);if(!y){const Z=u.name.value,J=d.name.value;if(Z!==J)return[[i,`"${Z}" and "${J}" are different fields`],[u],[d]];if(zi(u)!==zi(d))return[[i,"they have differing arguments"],[u],[d]]}const E=c==null?void 0:c.type,$=p==null?void 0:p.type;if(E&&$&&Lr(E,$))return[[i,`they return conflicting types "${I(E)}" and "${I($)}"`],[u],[d]];const M=u.selectionSet,P=d.selectionSet;if(M&&P){const Z=Jc(e,t,n,y,Re(E),M,Re($),P);return Xc(Z,i,u,d)}}function zi(e){var t;const n=(t=e.arguments)!==null&&t!==void 0?t:[],r={kind:l.OBJECT,fields:n.map(i=>({kind:l.OBJECT_FIELD,name:i.name,value:i.value}))};return le(lr(r))}function Lr(e,t){return fe(e)?fe(t)?Lr(e.ofType,t.ofType):!0:fe(t)?!0:X(e)?X(t)?Lr(e.ofType,t.ofType):!0:X(t)?!0:tt(e)||tt(t)?e!==t:!1}function Qn(e,t,n,r){const i=t.get(r);if(i)return i;const s=Object.create(null),o=Object.create(null);bo(e,n,r,s,o);const a=[s,Object.keys(o)];return t.set(r,a),a}function Fr(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=xe(e.getSchema(),n.typeCondition);return Qn(e,t,i,n.selectionSet)}function bo(e,t,n,r,i){for(const s of n.selections)switch(s.kind){case l.FIELD:{const o=s.name.value;let a;(te(t)||re(t))&&(a=t.getFields()[o]);const u=s.alias?s.alias.value:o;r[u]||(r[u]=[]),r[u].push([t,s,a]);break}case l.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case l.INLINE_FRAGMENT:{const o=s.typeCondition,a=o?xe(e.getSchema(),o):t;bo(e,a,s.selectionSet,r,i);break}}}function Xc(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()]]}class Wc{constructor(){this._data=new Map}has(t,n,r){var i;const[s,o]=t<n?[t,n]:[n,t],a=(i=this._data.get(s))===null||i===void 0?void 0:i.get(o);return a===void 0?!1:r?!0:r===a}add(t,n,r){const[i,s]=t<n?[t,n]:[n,t],o=this._data.get(i);o===void 0?this._data.set(i,new Map([[s,r]])):o.set(s,r)}}function _o(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(nt(n)&&nt(r)&&!Sr(e.getSchema(),n,r)){const i=I(r),s=I(n);e.reportError(new _(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${s}".`,{nodes:t}))}},FragmentSpread(t){const n=t.name.value,r=Kc(e,n),i=e.getParentType();if(r&&i&&!Sr(e.getSchema(),r,i)){const s=I(i),o=I(r);e.reportError(new _(`Fragment "${n}" cannot be spread here as objects of type "${s}" can never be of type "${o}".`,{nodes:t}))}}}}function Kc(e,t){const n=e.getFragment(t);if(n){const r=xe(e.getSchema(),n.typeCondition);if(nt(r))return r}}function No(e){const t=e.getSchema(),n=Object.create(null);for(const i of e.getDocument().definitions)zt(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){const s=i.name.value,o=n[s],a=t==null?void 0:t.getType(s);let u;if(o?u=Zc[o.kind]:a&&(u=el(a)),u){if(u!==i.kind){const c=tl(i.kind);e.reportError(new _(`Cannot extend non-${c} type "${s}".`,{nodes:o?[o,i]:i}))}}else{const c=Object.keys({...n,...t==null?void 0:t.getTypeMap()}),f=mt(s,c);e.reportError(new _(`Cannot extend type "${s}" because it is not defined.`+ot(f),{nodes:i.name}))}}}const Zc={[l.SCALAR_TYPE_DEFINITION]:l.SCALAR_TYPE_EXTENSION,[l.OBJECT_TYPE_DEFINITION]:l.OBJECT_TYPE_EXTENSION,[l.INTERFACE_TYPE_DEFINITION]:l.INTERFACE_TYPE_EXTENSION,[l.UNION_TYPE_DEFINITION]:l.UNION_TYPE_EXTENSION,[l.ENUM_TYPE_DEFINITION]:l.ENUM_TYPE_EXTENSION,[l.INPUT_OBJECT_TYPE_DEFINITION]:l.INPUT_OBJECT_TYPE_EXTENSION};function el(e){if(Pe(e))return l.SCALAR_TYPE_EXTENSION;if(te(e))return l.OBJECT_TYPE_EXTENSION;if(re(e))return l.INTERFACE_TYPE_EXTENSION;if(Ne(e))return l.UNION_TYPE_EXTENSION;if(ge(e))return l.ENUM_TYPE_EXTENSION;if(de(e))return l.INPUT_OBJECT_TYPE_EXTENSION;ye(!1,"Unexpected type: "+I(e))}function tl(e){switch(e){case l.SCALAR_TYPE_EXTENSION:return"scalar";case l.OBJECT_TYPE_EXTENSION:return"object";case l.INTERFACE_TYPE_EXTENSION:return"interface";case l.UNION_TYPE_EXTENSION:return"union";case l.ENUM_TYPE_EXTENSION:return"enum";case l.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:ye(!1,"Unexpected kind: "+I(e))}}function Io(e){return{...wo(e),Field:{leave(t){var n;const r=e.getFieldDef();if(!r)return!1;const i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(s=>s.name.value));for(const s of r.args)if(!i.has(s.name)&&yt(s)){const o=I(s.type);e.reportError(new _(`Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}}}function wo(e){var t;const n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:vt;for(const a of i)n[a.name]=at(a.args.filter(yt),u=>u.name);const s=e.getDocument().definitions;for(const a of s)if(a.kind===l.DIRECTIVE_DEFINITION){var o;const u=(o=a.arguments)!==null&&o!==void 0?o:[];n[a.name.value]=at(u.filter(nl),c=>c.name.value)}return{Directive:{leave(a){const u=a.name.value,c=n[u];if(c){var f;const d=(f=a.arguments)!==null&&f!==void 0?f:[],p=new Set(d.map(y=>y.name.value));for(const[y,E]of Object.entries(c))if(!p.has(y)){const $=yn(E.type)?I(E.type):le(E.type);e.reportError(new _(`Directive "@${u}" argument "${y}" of type "${$}" is required, but it was not provided.`,{nodes:a}))}}}}}}function nl(e){return e.type.kind===l.NON_NULL_TYPE&&e.defaultValue==null}function Oo(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(tt(Re(n))){if(r){const i=t.name.value,s=I(n);e.reportError(new _(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){const i=t.name.value,s=I(n);e.reportError(new _(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}function Do(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function Vt(e,t,n){return{prev:e,key:t,typename:n}}function $e(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function Ao(e,t,n=rl){return Zt(e,t,n,void 0)}function rl(e,t,n){let r="Invalid value "+I(t);throw e.length>0&&(r+=` at "value${Do(e)}"`),n.message=r+": "+n.message,n}function Zt(e,t,n,r){if(X(t)){if(e!=null)return Zt(e,t.ofType,n,r);n($e(r),e,new _(`Expected non-nullable type "${I(t)}" not to be null.`));return}if(e==null)return null;if(fe(t)){const i=t.ofType;return ii(e)?Array.from(e,(s,o)=>{const a=Vt(r,o,void 0);return Zt(s,i,n,a)}):[Zt(e,i,n,r)]}if(de(t)){if(!Ve(e)){n($e(r),e,new _(`Expected type "${t.name}" to be an object.`));return}const i={},s=t.getFields();for(const o of Object.values(s)){const a=e[o.name];if(a===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if(X(o.type)){const u=I(o.type);n($e(r),e,new _(`Field "${o.name}" of required type "${u}" was not provided.`))}continue}i[o.name]=Zt(a,o.type,n,Vt(r,o.name,t.name))}for(const o of Object.keys(e))if(!s[o]){const a=mt(o,Object.keys(t.getFields()));n($e(r),e,new _(`Field "${o}" is not defined by type "${t.name}".`+ot(a)))}return i}if(tt(t)){let i;try{i=t.parseValue(e)}catch(s){s instanceof _?n($e(r),e,s):n($e(r),e,new _(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return i===void 0&&n($e(r),e,new _(`Expected type "${t.name}".`)),i}ye(!1,"Unexpected input type: "+I(t))}function Ke(e,t,n){if(e){if(e.kind===l.VARIABLE){const r=e.name.value;if(n==null||n[r]===void 0)return;const i=n[r];return i===null&&X(t)?void 0:i}if(X(t))return e.kind===l.NULL?void 0:Ke(e,t.ofType,n);if(e.kind===l.NULL)return null;if(fe(t)){const r=t.ofType;if(e.kind===l.LIST){const s=[];for(const o of e.values)if(Ji(o,n)){if(X(r))return;s.push(null)}else{const a=Ke(o,r,n);if(a===void 0)return;s.push(a)}return s}const i=Ke(e,r,n);return i===void 0?void 0:[i]}if(de(t)){if(e.kind!==l.OBJECT)return;const r=Object.create(null),i=at(e.fields,s=>s.name.value);for(const s of Object.values(t.getFields())){const o=i[s.name];if(!o||Ji(o.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if(X(s.type))return;continue}const a=Ke(o.value,s.type,n);if(a===void 0)return;r[s.name]=a}return r}if(tt(t)){let r;try{r=t.parseLiteral(e,n)}catch{return}return r===void 0?void 0:r}ye(!1,"Unexpected input type: "+I(t))}}function Ji(e,t){return e.kind===l.VARIABLE&&(t==null||t[e.name.value]===void 0)}function So(e,t,n,r){const i=[],s=r==null?void 0:r.maxErrors;try{const o=il(e,t,n,a=>{if(s!=null&&i.length>=s)throw new _("Too many errors processing variables, error limit reached. Execution aborted.");i.push(a)});if(i.length===0)return{coerced:o}}catch(o){i.push(o)}return{errors:i}}function il(e,t,n,r){const i={};for(const s of t){const o=s.variable.name.value,a=xe(e,s.type);if(!ke(a)){const c=le(s.type);r(new _(`Variable "$${o}" expected value of type "${c}" which cannot be used as an input type.`,{nodes:s.type}));continue}if(!Ro(n,o)){if(s.defaultValue)i[o]=Ke(s.defaultValue,a);else if(X(a)){const c=I(a);r(new _(`Variable "$${o}" of required type "${c}" was not provided.`,{nodes:s}))}continue}const u=n[o];if(u===null&&X(a)){const c=I(a);r(new _(`Variable "$${o}" of non-null type "${c}" must not be null.`,{nodes:s}));continue}i[o]=Ao(u,a,(c,f,d)=>{let p=`Variable "$${o}" got invalid value `+I(f);c.length>0&&(p+=` at "${o}${Do(c)}"`),r(new _(p+"; "+d.message,{nodes:s,originalError:d.originalError}))})}return i}function fr(e,t,n){var r;const i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],o=at(s,a=>a.name.value);for(const a of e.args){const u=a.name,c=a.type,f=o[u];if(!f){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(X(c))throw new _(`Argument "${u}" of required type "${I(c)}" was not provided.`,{nodes:t});continue}const d=f.value;let p=d.kind===l.NULL;if(d.kind===l.VARIABLE){const E=d.name.value;if(n==null||!Ro(n,E)){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(X(c))throw new _(`Argument "${u}" of required type "${I(c)}" was provided the variable "$${E}" which was not provided a runtime value.`,{nodes:d});continue}p=n[E]==null}if(p&&X(c))throw new _(`Argument "${u}" of non-null type "${I(c)}" must not be null.`,{nodes:d});const y=Ke(d,c,n);if(y===void 0)throw new _(`Argument "${u}" has invalid value ${le(d)}.`,{nodes:d});i[u]=y}return i}function fn(e,t,n){var r;const i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return fr(e,i,n)}function Ro(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _i(e,t,n,r,i){const s=new Map;return Yn(e,t,n,r,i,s,new Set),s}function sl(e,t,n,r,i){const s=new Map,o=new Set;for(const a of i)a.selectionSet&&Yn(e,t,n,r,a.selectionSet,s,o);return s}function Yn(e,t,n,r,i,s,o){for(const a of i.selections)switch(a.kind){case l.FIELD:{if(!gr(n,a))continue;const u=ol(a),c=s.get(u);c!==void 0?c.push(a):s.set(u,[a]);break}case l.INLINE_FRAGMENT:{if(!gr(n,a)||!Hi(e,a,r))continue;Yn(e,t,n,r,a.selectionSet,s,o);break}case l.FRAGMENT_SPREAD:{const u=a.name.value;if(o.has(u)||!gr(n,a))continue;o.add(u);const c=t[u];if(!c||!Hi(e,c,r))continue;Yn(e,t,n,r,c.selectionSet,s,o);break}}}function gr(e,t){const n=fn(ei,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=fn(Zr,t,e);return(r==null?void 0:r.if)!==!1}function Hi(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=xe(e,r);return i===n?!0:Ze(i)?e.isSubType(i,n):!1}function ol(e){return e.alias?e.alias.value:e.name.value}function Lo(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,s=Object.create(null),o=e.getDocument(),a=Object.create(null);for(const c of o.definitions)c.kind===l.FRAGMENT_DEFINITION&&(a[c.name.value]=c);const u=_i(n,a,s,r,t.selectionSet);if(u.size>1){const d=[...u.values()].slice(1).flat();e.reportError(new _(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}))}for(const c of u.values())c[0].name.value.startsWith("__")&&e.reportError(new _(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}))}}}}}function Ni(e,t){const n=new Map;for(const r of e){const i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}function Fo(e){return{DirectiveDefinition(r){var i;const 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;const s=r.name.value,o=(i=r.fields)!==null&&i!==void 0?i:[];for(const u of o){var a;const c=u.name.value,f=(a=u.arguments)!==null&&a!==void 0?a:[];n(`${s}.${c}`,f)}return!1}function n(r,i){const s=Ni(i,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new _(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:a.map(u=>u.name)}));return!1}}function Ii(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],s=Ni(i,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new _(`There can be only one argument named "${o}".`,{nodes:a.map(u=>u.name)}))}}function ko(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new _(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new _(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function wi(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():vt;for(const a of r)t[a.name]=!a.isRepeatable;const i=e.getDocument().definitions;for(const a of i)a.kind===l.DIRECTIVE_DEFINITION&&(t[a.name.value]=!a.repeatable);const s=Object.create(null),o=Object.create(null);return{enter(a){if(!("directives"in a)||!a.directives)return;let u;if(a.kind===l.SCHEMA_DEFINITION||a.kind===l.SCHEMA_EXTENSION)u=s;else if(zt(a)||cr(a)){const c=a.name.value;u=o[c],u===void 0&&(o[c]=u=Object.create(null))}else u=Object.create(null);for(const c of a.directives){const f=c.name.value;t[f]&&(u[f]?e.reportError(new _(`The directive "@${f}" can only be used once at this location.`,{nodes:[u[f],c]})):u[f]=c)}}}}function xo(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var o;const a=s.name.value;r[a]||(r[a]=Object.create(null));const u=(o=s.values)!==null&&o!==void 0?o:[],c=r[a];for(const f of u){const d=f.name.value,p=n[a];ge(p)&&p.getValue(d)?e.reportError(new _(`Enum value "${a}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new _(`Enum value "${a}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function $o(e){const 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;const a=s.name.value;r[a]||(r[a]=Object.create(null));const u=(o=s.fields)!==null&&o!==void 0?o:[],c=r[a];for(const f of u){const d=f.name.value;al(n[a],d)?e.reportError(new _(`Field "${a}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new _(`Field "${a}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function al(e,t){return te(e)||re(e)||de(e)?e.getFields()[t]!=null:!1}function Co(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new _(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function Oi(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||ye(!1),n=r}},ObjectField(r){const i=r.name.value;n[i]?e.reportError(new _(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function Mo(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new _(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function jo(e){const 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;const a=(o=s.operationTypes)!==null&&o!==void 0?o:[];for(const u of a){const c=u.operation,f=n[c];r[c]?e.reportError(new _(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:u})):f?e.reportError(new _(`There can be only one ${c} type in schema.`,{nodes:[f,u]})):n[c]=u}return!1}}function Vo(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new _(`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 _(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}function Uo(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=Ni(r,s=>s.variable.name.value);for(const[s,o]of i)o.length>1&&e.reportError(new _(`There can be only one variable named "$${s}".`,{nodes:o.map(a=>a.variable.name)}))}}}function Po(e){return{ListValue(t){const n=Hr(e.getParentInputType());if(!fe(n))return Et(e,t),!1},ObjectValue(t){const n=Re(e.getInputType());if(!de(n))return Et(e,t),!1;const r=at(t.fields,i=>i.name.value);for(const i of Object.values(n.getFields()))if(!r[i.name]&&ir(i)){const o=I(i.type);e.reportError(new _(`Field "${n.name}.${i.name}" of required type "${o}" was not provided.`,{nodes:t}))}},ObjectField(t){const n=Re(e.getParentInputType());if(!e.getInputType()&&de(n)){const i=mt(t.name.value,Object.keys(n.getFields()));e.reportError(new _(`Field "${t.name.value}" is not defined by type "${n.name}".`+ot(i),{nodes:t}))}},NullValue(t){const n=e.getInputType();X(n)&&e.reportError(new _(`Expected value of type "${I(n)}", found ${le(t)}.`,{nodes:t}))},EnumValue:t=>Et(e,t),IntValue:t=>Et(e,t),FloatValue:t=>Et(e,t),StringValue:t=>Et(e,t),BooleanValue:t=>Et(e,t)}}function Et(e,t){const n=e.getInputType();if(!n)return;const r=Re(n);if(!tt(r)){const i=I(n);e.reportError(new _(`Expected value of type "${i}", found ${le(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const s=I(n);e.reportError(new _(`Expected value of type "${s}", found ${le(t)}.`,{nodes:t}))}}catch(i){const s=I(n);i instanceof _?e.reportError(i):e.reportError(new _(`Expected value of type "${s}", found ${le(t)}; `+i.message,{nodes:t,originalError:i}))}}function Bo(e){return{VariableDefinition(t){const n=xe(e.getSchema(),t.type);if(n!==void 0&&!ke(n)){const r=t.variable.name.value,i=le(t.type);e.reportError(new _(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function qo(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:s,defaultValue:o}of r){const a=i.name.value,u=t[a];if(u&&s){const c=e.getSchema(),f=xe(c,u.type);if(f&&!ul(c,f,u.defaultValue,s,o)){const d=I(f),p=I(s);e.reportError(new _(`Variable "$${a}" of type "${d}" used in position expecting type "${p}".`,{nodes:[u,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function ul(e,t,n,r,i){if(X(r)&&!X(t)){if(!(n!=null&&n.kind!==l.NULL)&&!(i!==void 0))return!1;const a=r.ofType;return Tt(e,t,a)}return Tt(e,t,r)}const Go=Object.freeze([so,Mo,fo,Lo,Ti,ao,Bo,Oo,oo,Co,lo,yo,_o,ho,Uo,mo,vo,gi,wi,uo,Ii,Po,Io,qo,go,Oi]),cl=Object.freeze([po,jo,Vo,xo,$o,Fo,ko,Ti,gi,wi,No,co,Ii,Oi,wo]);class Qo{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(const r of this.getDocument().definitions)r.kind===l.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const r=[t];let i;for(;i=r.pop();)for(const s of i.selections)s.kind===l.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=[];const r=Object.create(null),i=[t.selectionSet];let s;for(;s=i.pop();)for(const o of this.getFragmentSpreads(s)){const a=o.name.value;if(r[a]!==!0){r[a]=!0;const u=this.getFragment(a);u&&(n.push(u),i.push(u.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class ll extends Qo{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class Yo extends Qo{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){const r=[],i=new hi(this._schema);Qt(t,mi(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(const 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 zo(e,t,n=Go,r,i=new hi(e)){var s;const o=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||K(!1,"Must provide document."),di(e);const a=Object.freeze({}),u=[],c=new Yo(e,t,i,d=>{if(u.length>=o)throw u.push(new _("Too many validation errors, error limit reached. Validation aborted.")),a;u.push(d)}),f=zr(n.map(d=>d(c)));try{Qt(t,mi(i,f))}catch(d){if(d!==a)throw d}return u}function Jo(e,t,n=cl){const r=[],i=new ll(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return Qt(e,zr(s)),r}function fl(e){const t=Jo(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
46
+ `))}class Ac{constructor(t){this._errors=[],this.schema=t}reportError(t,n){const r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new _(t,{nodes:r}))}getErrors(){return this._errors}}function Dc(e){const t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!te(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${I(n)}.`,(r=vr(t,be.QUERY))!==null&&r!==void 0?r:n.astNode)}const i=t.getMutationType();if(i&&!te(i)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${I(i)}.`,(s=vr(t,be.MUTATION))!==null&&s!==void 0?s:i.astNode)}const o=t.getSubscriptionType();if(o&&!te(o)){var a;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${I(o)}.`,(a=vr(t,be.SUBSCRIPTION))!==null&&a!==void 0?a:o.astNode)}}function vr(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 Sc(e){for(const n of e.schema.getDirectives()){if(!sr(n)){e.reportError(`Expected directive but got: ${I(n)}.`,n==null?void 0:n.astNode);continue}It(e,n);for(const r of n.args)if(It(e,r),Le(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${I(r.type)}.`,r.astNode),mt(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[hi(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function It(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function Rc(e){const t=Cc(e),n=e.schema.getTypeMap();for(const r of Object.values(n)){if(!En(r)){e.reportError(`Expected GraphQL named type but got: ${I(r)}.`,r.astNode);continue}wt(r)||It(e,r),te(r)||re(r)?(qi(e,r),Gi(e,r)):Ne(r)?Fc(e,r):ge(r)?xc(e,r):le(r)&&($c(e,r),t(r))}}function qi(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const o of n){if(It(e,o),!dt(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${I(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(const a of o.args){const u=a.name;if(It(e,a),!Le(a.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${u}:) must be Input Type but got: ${I(a.type)}.`,(i=a.astNode)===null||i===void 0?void 0:i.type)}if(mt(a)&&a.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${u}:) cannot be deprecated.`,[hi(a.astNode),(s=a.astNode)===null||s===void 0?void 0:s.type])}}}}function Gi(e,t){const n=Object.create(null);for(const r of t.getInterfaces()){if(!re(r)){e.reportError(`Type ${I(t)} must only implement Interface types, it cannot implement ${I(r)}.`,nn(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,nn(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,nn(t,r));continue}n[r.name]=!0,kc(e,t,r),Lc(e,t,r)}}function Lc(e,t,n){const r=t.getFields();for(const u of Object.values(n.getFields())){const c=u.name,f=r[c];if(!f){e.reportError(`Interface field ${n.name}.${c} expected but ${t.name} does not provide it.`,[u.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!Tt(e.schema,f.type,u.type)){var i,s;e.reportError(`Interface field ${n.name}.${c} expects type ${I(u.type)} but ${t.name}.${c} is type ${I(f.type)}.`,[(i=u.astNode)===null||i===void 0?void 0:i.type,(s=f.astNode)===null||s===void 0?void 0:s.type])}for(const d of u.args){const h=d.name,y=f.args.find(E=>E.name===h);if(!y){e.reportError(`Interface field argument ${n.name}.${c}(${h}:) expected but ${t.name}.${c} does not provide it.`,[d.astNode,f.astNode]);continue}if(!jn(d.type,y.type)){var o,a;e.reportError(`Interface field argument ${n.name}.${c}(${h}:) expects type ${I(d.type)} but ${t.name}.${c}(${h}:) is type ${I(y.type)}.`,[(o=d.astNode)===null||o===void 0?void 0:o.type,(a=y.astNode)===null||a===void 0?void 0:a.type])}}for(const d of f.args){const h=d.name;!u.args.find(E=>E.name===h)&&mt(d)&&e.reportError(`Object field ${t.name}.${c} includes required argument ${h} that is missing from the Interface field ${n.name}.${c}.`,[d.astNode,u.astNode])}}}function kc(e,t,n){const r=t.getInterfaces();for(const 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}.`,[...nn(n,i),...nn(t,n)])}function Fc(e,t){const n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const r=Object.create(null);for(const i of n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,Qi(t,i.name));continue}r[i.name]=!0,te(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${I(i)}.`,Qi(t,String(i)))}}function xc(e,t){const n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const r of n)It(e,r)}function $c(e,t){const 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(const s of n){if(It(e,s),!Le(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${I(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type)}if(rr(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[hi(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}}}function Cc(e){const 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;const o=Object.values(s.getFields());for(const a of o)if(H(a.type)&&le(a.type.ofType)){const u=a.type.ofType,c=r[u.name];if(n.push(a),c===void 0)i(u);else{const f=n.slice(c),d=f.map(h=>h.name).join(".");e.reportError(`Cannot reference Input Object "${u.name}" within itself through a series of non-null fields: "${d}".`,f.map(h=>h.astNode))}n.pop()}r[s.name]=void 0}}function nn(e,t){const{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 Qi(e,t){const{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 hi(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===or.name)}function ke(e,t){switch(t.kind){case l.LIST_TYPE:{const n=ke(e,t.type);return n&&new we(n)}case l.NON_NULL_TYPE:{const n=ke(e,t.type);return n&&new K(n)}case l.NAMED_TYPE:return e.getType(t.name.value)}}class mi{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??Mc,n&&(Le(n)&&this._inputTypeStack.push(n),et(n)&&this._parentTypeStack.push(n),dt(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){const n=this._schema;switch(t.kind){case l.SELECTION_SET:{const i=Se(this.getType());this._parentTypeStack.push(et(i)?i:void 0);break}case l.FIELD:{const i=this.getParentType();let s,o;i&&(s=this._getFieldDef(n,i,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push(dt(o)?o:void 0);break}case l.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case l.OPERATION_DEFINITION:{const i=n.getRootType(t.operation);this._typeStack.push(te(i)?i:void 0);break}case l.INLINE_FRAGMENT:case l.FRAGMENT_DEFINITION:{const i=t.typeCondition,s=i?ke(n,i):Se(this.getType());this._typeStack.push(dt(s)?s:void 0);break}case l.VARIABLE_DEFINITION:{const i=ke(n,t.type);this._inputTypeStack.push(Le(i)?i:void 0);break}case l.ARGUMENT:{var r;let i,s;const o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(a=>a.name===t.name.value),i&&(s=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(Le(s)?s:void 0);break}case l.LIST:{const i=Xr(this.getInputType()),s=ce(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Le(s)?s:void 0);break}case l.OBJECT_FIELD:{const i=Se(this.getInputType());let s,o;le(i)&&(o=i.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(Le(s)?s:void 0);break}case l.ENUM:{const i=Se(this.getInputType());let s;ge(i)&&(s=i.getValue(t.value)),this._enumValue=s;break}}}leave(t){switch(t.kind){case l.SELECTION_SET:this._parentTypeStack.pop();break;case l.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case l.DIRECTIVE:this._directive=null;break;case l.OPERATION_DEFINITION:case l.INLINE_FRAGMENT:case l.FRAGMENT_DEFINITION:this._typeStack.pop();break;case l.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case l.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.LIST:case l.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.ENUM:this._enumValue=null;break}}}function Mc(e,t,n){const r=n.name.value;if(r===un.name&&e.getQueryType()===t)return un;if(r===cn.name&&e.getQueryType()===t)return cn;if(r===ln.name&&et(t))return ln;if(te(t)||re(t))return t.getFields()[r]}function yi(e,t){return{enter(...n){const r=n[0];e.enter(r);const i=xt(t,r.kind).enter;if(i){const s=i.apply(t,n);return s!==void 0&&(e.leave(r),Ar(s)&&e.enter(s)),s}},leave(...n){const r=n[0],i=xt(t,r.kind).leave;let s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}function Vc(e){return vi(e)||Ei(e)||gi(e)}function vi(e){return e.kind===l.OPERATION_DEFINITION||e.kind===l.FRAGMENT_DEFINITION}function Uc(e){return e.kind===l.FIELD||e.kind===l.FRAGMENT_SPREAD||e.kind===l.INLINE_FRAGMENT}function oo(e){return e.kind===l.VARIABLE||e.kind===l.INT||e.kind===l.FLOAT||e.kind===l.STRING||e.kind===l.BOOLEAN||e.kind===l.NULL||e.kind===l.ENUM||e.kind===l.LIST||e.kind===l.OBJECT}function Lr(e){return oo(e)&&(e.kind===l.LIST?e.values.some(Lr):e.kind===l.OBJECT?e.fields.some(t=>Lr(t.value)):e.kind!==l.VARIABLE)}function Pc(e){return e.kind===l.NAMED_TYPE||e.kind===l.LIST_TYPE||e.kind===l.NON_NULL_TYPE}function Ei(e){return e.kind===l.SCHEMA_DEFINITION||Yt(e)||e.kind===l.DIRECTIVE_DEFINITION}function Yt(e){return e.kind===l.SCALAR_TYPE_DEFINITION||e.kind===l.OBJECT_TYPE_DEFINITION||e.kind===l.INTERFACE_TYPE_DEFINITION||e.kind===l.UNION_TYPE_DEFINITION||e.kind===l.ENUM_TYPE_DEFINITION||e.kind===l.INPUT_OBJECT_TYPE_DEFINITION}function gi(e){return e.kind===l.SCHEMA_EXTENSION||ur(e)}function ur(e){return e.kind===l.SCALAR_TYPE_EXTENSION||e.kind===l.OBJECT_TYPE_EXTENSION||e.kind===l.INTERFACE_TYPE_EXTENSION||e.kind===l.UNION_TYPE_EXTENSION||e.kind===l.ENUM_TYPE_EXTENSION||e.kind===l.INPUT_OBJECT_TYPE_EXTENSION}function ao(e){return{Document(t){for(const n of t.definitions)if(!vi(n)){const r=n.kind===l.SCHEMA_DEFINITION||n.kind===l.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new _(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function uo(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),s=t.name.value;let o=it("to use an inline fragment on",jc(i,n,s));o===""&&(o=it(Bc(n,s))),e.reportError(new _(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}))}}}}function jc(e,t,n){if(!We(t))return[];const r=new Set,i=Object.create(null);for(const o of e.getPossibleTypes(t))if(o.getFields()[n]){r.add(o),i[o.name]=1;for(const a of o.getInterfaces()){var s;a.getFields()[n]&&(r.add(a),i[a.name]=((s=i[a.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((o,a)=>{const u=i[a.name]-i[o.name];return u!==0?u:re(o)&&e.isSubType(o,a)?-1:re(a)&&e.isSubType(a,o)?1:mn(o.name,a.name)}).map(o=>o.name)}function Bc(e,t){if(te(e)||re(e)){const n=Object.keys(e.getFields());return ht(t,n)}return[]}function co(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=ke(e.getSchema(),n);if(r&&!et(r)){const i=ue(n);e.reportError(new _(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=ke(e.getSchema(),t.typeCondition);if(n&&!et(n)){const r=ue(t.typeCondition);e.reportError(new _(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function lo(e){return{...fo(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const s=t.name.value,o=r.args.map(u=>u.name),a=ht(s,o);e.reportError(new _(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+it(a),{nodes:t}))}}}}function fo(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():yt;for(const o of r)t[o.name]=o.args.map(a=>a.name);const i=e.getDocument().definitions;for(const o of i)if(o.kind===l.DIRECTIVE_DEFINITION){var s;const a=(s=o.arguments)!==null&&s!==void 0?s:[];t[o.name.value]=a.map(u=>u.name.value)}return{Directive(o){const a=o.name.value,u=t[a];if(o.arguments&&u)for(const c of o.arguments){const f=c.name.value;if(!u.includes(f)){const d=ht(f,u);e.reportError(new _(`Unknown argument "${f}" on directive "@${a}".`+it(d),{nodes:c}))}}return!1}}}function Ti(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():yt;for(const s of r)t[s.name]=s.locations;const i=e.getDocument().definitions;for(const s of i)s.kind===l.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return{Directive(s,o,a,u,c){const f=s.name.value,d=t[f];if(!d){e.reportError(new _(`Unknown directive "@${f}".`,{nodes:s}));return}const h=qc(c);h&&!d.includes(h)&&e.reportError(new _(`Directive "@${f}" may not be used on ${h}.`,{nodes:s}))}}}function qc(e){const t=e[e.length-1];switch("kind"in t||me(!1),t.kind){case l.OPERATION_DEFINITION:return Gc(t.operation);case l.FIELD:return G.FIELD;case l.FRAGMENT_SPREAD:return G.FRAGMENT_SPREAD;case l.INLINE_FRAGMENT:return G.INLINE_FRAGMENT;case l.FRAGMENT_DEFINITION:return G.FRAGMENT_DEFINITION;case l.VARIABLE_DEFINITION:return G.VARIABLE_DEFINITION;case l.SCHEMA_DEFINITION:case l.SCHEMA_EXTENSION:return G.SCHEMA;case l.SCALAR_TYPE_DEFINITION:case l.SCALAR_TYPE_EXTENSION:return G.SCALAR;case l.OBJECT_TYPE_DEFINITION:case l.OBJECT_TYPE_EXTENSION:return G.OBJECT;case l.FIELD_DEFINITION:return G.FIELD_DEFINITION;case l.INTERFACE_TYPE_DEFINITION:case l.INTERFACE_TYPE_EXTENSION:return G.INTERFACE;case l.UNION_TYPE_DEFINITION:case l.UNION_TYPE_EXTENSION:return G.UNION;case l.ENUM_TYPE_DEFINITION:case l.ENUM_TYPE_EXTENSION:return G.ENUM;case l.ENUM_VALUE_DEFINITION:return G.ENUM_VALUE;case l.INPUT_OBJECT_TYPE_DEFINITION:case l.INPUT_OBJECT_TYPE_EXTENSION:return G.INPUT_OBJECT;case l.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||me(!1),n.kind===l.INPUT_OBJECT_TYPE_DEFINITION?G.INPUT_FIELD_DEFINITION:G.ARGUMENT_DEFINITION}default:me(!1,"Unexpected kind: "+I(t.kind))}}function Gc(e){switch(e){case be.QUERY:return G.QUERY;case be.MUTATION:return G.MUTATION;case be.SUBSCRIPTION:return G.SUBSCRIPTION}}function po(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new _(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function bi(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const s of e.getDocument().definitions)Yt(s)&&(r[s.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,o,a,u,c){const f=s.name.value;if(!n[f]&&!r[f]){var d;const h=(d=c[2])!==null&&d!==void 0?d:a,y=h!=null&&Qc(h);if(y&&Yi.includes(f))return;const E=ht(f,y?Yi.concat(i):i);e.reportError(new _(`Unknown type "${f}".`+it(E),{nodes:s}))}}}}const Yi=[...gn,..._n].map(e=>e.name);function Qc(e){return"kind"in e&&(Ei(e)||gi(e))}function ho(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===l.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new _("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function mo(e){var t,n,r;const 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();let o=0;return{SchemaDefinition(a){if(s){e.reportError(new _("Cannot define a new schema within a schema extension.",{nodes:a}));return}o>0&&e.reportError(new _("Must provide only one schema definition.",{nodes:a})),++o}}}function yo(e){const 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;const o=s.name.value;t[o]=!0;const a=e.getFragmentSpreads(s.selectionSet);if(a.length!==0){r[o]=n.length;for(const u of a){const c=u.name.value,f=r[c];if(n.push(u),f===void 0){const d=e.getFragment(c);d&&i(d)}else{const d=n.slice(f),h=d.slice(0,-1).map(y=>'"'+y.name.value+'"').join(", ");e.reportError(new _(`Cannot spread fragment "${c}" within itself`+(h!==""?` via ${h}.`:"."),{nodes:d}))}n.pop()}r[o]=void 0}}}function vo(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const s=i.name.value;t[s]!==!0&&e.reportError(new _(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}}}function Eo(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of t)for(const s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(const i of n){const s=i.name.value;r[s]!==!0&&e.reportError(new _(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function go(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:s}of i)r[s.name.value]=!0;for(const s of t){const o=s.variable.name.value;r[o]!==!0&&e.reportError(new _(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}function cr(e){switch(e.kind){case l.OBJECT:return{...e,fields:Yc(e.fields)};case l.LIST:return{...e,values:e.values.map(cr)};case l.INT:case l.FLOAT:case l.STRING:case l.BOOLEAN:case l.NULL:case l.ENUM:case l.VARIABLE:return e}}function Yc(e){return e.map(t=>({...t,value:cr(t.value)})).sort((t,n)=>mn(t.name.value,n.name.value))}function To(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+To(n)).join(" and "):e}function bo(e){const t=new Wc,n=new Map;return{SelectionSet(r){const i=Jc(e,n,t,e.getParentType(),r);for(const[[s,o],a,u]of i){const c=To(o);e.reportError(new _(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:a.concat(u)}))}}}}function Jc(e,t,n,r,i){const s=[],[o,a]=Gn(e,t,r,i);if(zc(e,s,t,n,o),a.length!==0)for(let u=0;u<a.length;u++){Bn(e,s,t,n,!1,o,a[u]);for(let c=u+1;c<a.length;c++)qn(e,s,t,n,!1,a[u],a[c])}return s}function Bn(e,t,n,r,i,s,o){const a=e.getFragment(o);if(!a)return;const[u,c]=Fr(e,n,a);if(s!==u){_i(e,t,n,r,i,s,u);for(const f of c)r.has(f,o,i)||(r.add(f,o,i),Bn(e,t,n,r,i,s,f))}}function qn(e,t,n,r,i,s,o){if(s===o||r.has(s,o,i))return;r.add(s,o,i);const a=e.getFragment(s),u=e.getFragment(o);if(!a||!u)return;const[c,f]=Fr(e,n,a),[d,h]=Fr(e,n,u);_i(e,t,n,r,i,c,d);for(const y of h)qn(e,t,n,r,i,s,y);for(const y of f)qn(e,t,n,r,i,y,o)}function Hc(e,t,n,r,i,s,o,a){const u=[],[c,f]=Gn(e,t,i,s),[d,h]=Gn(e,t,o,a);_i(e,u,t,n,r,c,d);for(const y of h)Bn(e,u,t,n,r,c,y);for(const y of f)Bn(e,u,t,n,r,d,y);for(const y of f)for(const E of h)qn(e,u,t,n,r,y,E);return u}function zc(e,t,n,r,i){for(const[s,o]of Object.entries(i))if(o.length>1)for(let a=0;a<o.length;a++)for(let u=a+1;u<o.length;u++){const c=_o(e,n,r,!1,s,o[a],o[u]);c&&t.push(c)}}function _i(e,t,n,r,i,s,o){for(const[a,u]of Object.entries(s)){const c=o[a];if(c)for(const f of u)for(const d of c){const h=_o(e,n,r,i,a,f,d);h&&t.push(h)}}}function _o(e,t,n,r,i,s,o){const[a,u,c]=s,[f,d,h]=o,y=r||a!==f&&te(a)&&te(f);if(!y){const X=u.name.value,z=d.name.value;if(X!==z)return[[i,`"${X}" and "${z}" are different fields`],[u],[d]];if(Ji(u)!==Ji(d))return[[i,"they have differing arguments"],[u],[d]]}const E=c==null?void 0:c.type,$=h==null?void 0:h.type;if(E&&$&&kr(E,$))return[[i,`they return conflicting types "${I(E)}" and "${I($)}"`],[u],[d]];const V=u.selectionSet,B=d.selectionSet;if(V&&B){const X=Hc(e,t,n,y,Se(E),V,Se($),B);return Xc(X,i,u,d)}}function Ji(e){var t;const n=(t=e.arguments)!==null&&t!==void 0?t:[],r={kind:l.OBJECT,fields:n.map(i=>({kind:l.OBJECT_FIELD,name:i.name,value:i.value}))};return ue(cr(r))}function kr(e,t){return ce(e)?ce(t)?kr(e.ofType,t.ofType):!0:ce(t)?!0:H(e)?H(t)?kr(e.ofType,t.ofType):!0:H(t)?!0:Ze(e)||Ze(t)?e!==t:!1}function Gn(e,t,n,r){const i=t.get(r);if(i)return i;const s=Object.create(null),o=Object.create(null);No(e,n,r,s,o);const a=[s,Object.keys(o)];return t.set(r,a),a}function Fr(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=ke(e.getSchema(),n.typeCondition);return Gn(e,t,i,n.selectionSet)}function No(e,t,n,r,i){for(const s of n.selections)switch(s.kind){case l.FIELD:{const o=s.name.value;let a;(te(t)||re(t))&&(a=t.getFields()[o]);const u=s.alias?s.alias.value:o;r[u]||(r[u]=[]),r[u].push([t,s,a]);break}case l.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case l.INLINE_FRAGMENT:{const o=s.typeCondition,a=o?ke(e.getSchema(),o):t;No(e,a,s.selectionSet,r,i);break}}}function Xc(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()]]}class Wc{constructor(){this._data=new Map}has(t,n,r){var i;const[s,o]=t<n?[t,n]:[n,t],a=(i=this._data.get(s))===null||i===void 0?void 0:i.get(o);return a===void 0?!1:r?!0:r===a}add(t,n,r){const[i,s]=t<n?[t,n]:[n,t],o=this._data.get(i);o===void 0?this._data.set(i,new Map([[s,r]])):o.set(s,r)}}function Io(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(et(n)&&et(r)&&!Rr(e.getSchema(),n,r)){const i=I(r),s=I(n);e.reportError(new _(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${s}".`,{nodes:t}))}},FragmentSpread(t){const n=t.name.value,r=Kc(e,n),i=e.getParentType();if(r&&i&&!Rr(e.getSchema(),r,i)){const s=I(i),o=I(r);e.reportError(new _(`Fragment "${n}" cannot be spread here as objects of type "${s}" can never be of type "${o}".`,{nodes:t}))}}}}function Kc(e,t){const n=e.getFragment(t);if(n){const r=ke(e.getSchema(),n.typeCondition);if(et(r))return r}}function wo(e){const t=e.getSchema(),n=Object.create(null);for(const i of e.getDocument().definitions)Yt(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){const s=i.name.value,o=n[s],a=t==null?void 0:t.getType(s);let u;if(o?u=Zc[o.kind]:a&&(u=el(a)),u){if(u!==i.kind){const c=tl(i.kind);e.reportError(new _(`Cannot extend non-${c} type "${s}".`,{nodes:o?[o,i]:i}))}}else{const c=Object.keys({...n,...t==null?void 0:t.getTypeMap()}),f=ht(s,c);e.reportError(new _(`Cannot extend type "${s}" because it is not defined.`+it(f),{nodes:i.name}))}}}const Zc={[l.SCALAR_TYPE_DEFINITION]:l.SCALAR_TYPE_EXTENSION,[l.OBJECT_TYPE_DEFINITION]:l.OBJECT_TYPE_EXTENSION,[l.INTERFACE_TYPE_DEFINITION]:l.INTERFACE_TYPE_EXTENSION,[l.UNION_TYPE_DEFINITION]:l.UNION_TYPE_EXTENSION,[l.ENUM_TYPE_DEFINITION]:l.ENUM_TYPE_EXTENSION,[l.INPUT_OBJECT_TYPE_DEFINITION]:l.INPUT_OBJECT_TYPE_EXTENSION};function el(e){if(Ve(e))return l.SCALAR_TYPE_EXTENSION;if(te(e))return l.OBJECT_TYPE_EXTENSION;if(re(e))return l.INTERFACE_TYPE_EXTENSION;if(Ne(e))return l.UNION_TYPE_EXTENSION;if(ge(e))return l.ENUM_TYPE_EXTENSION;if(le(e))return l.INPUT_OBJECT_TYPE_EXTENSION;me(!1,"Unexpected type: "+I(e))}function tl(e){switch(e){case l.SCALAR_TYPE_EXTENSION:return"scalar";case l.OBJECT_TYPE_EXTENSION:return"object";case l.INTERFACE_TYPE_EXTENSION:return"interface";case l.UNION_TYPE_EXTENSION:return"union";case l.ENUM_TYPE_EXTENSION:return"enum";case l.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:me(!1,"Unexpected kind: "+I(e))}}function Oo(e){return{...Ao(e),Field:{leave(t){var n;const r=e.getFieldDef();if(!r)return!1;const i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(s=>s.name.value));for(const s of r.args)if(!i.has(s.name)&&mt(s)){const o=I(s.type);e.reportError(new _(`Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}}}function Ao(e){var t;const n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:yt;for(const a of i)n[a.name]=st(a.args.filter(mt),u=>u.name);const s=e.getDocument().definitions;for(const a of s)if(a.kind===l.DIRECTIVE_DEFINITION){var o;const u=(o=a.arguments)!==null&&o!==void 0?o:[];n[a.name.value]=st(u.filter(nl),c=>c.name.value)}return{Directive:{leave(a){const u=a.name.value,c=n[u];if(c){var f;const d=(f=a.arguments)!==null&&f!==void 0?f:[],h=new Set(d.map(y=>y.name.value));for(const[y,E]of Object.entries(c))if(!h.has(y)){const $=yn(E.type)?I(E.type):ue(E.type);e.reportError(new _(`Directive "@${u}" argument "${y}" of type "${$}" is required, but it was not provided.`,{nodes:a}))}}}}}}function nl(e){return e.type.kind===l.NON_NULL_TYPE&&e.defaultValue==null}function Do(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(Ze(Se(n))){if(r){const i=t.name.value,s=I(n);e.reportError(new _(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){const i=t.name.value,s=I(n);e.reportError(new _(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}function So(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function Vt(e,t,n){return{prev:e,key:t,typename:n}}function Fe(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function Ro(e,t,n=rl){return Kt(e,t,n,void 0)}function rl(e,t,n){let r="Invalid value "+I(t);throw e.length>0&&(r+=` at "value${So(e)}"`),n.message=r+": "+n.message,n}function Kt(e,t,n,r){if(H(t)){if(e!=null)return Kt(e,t.ofType,n,r);n(Fe(r),e,new _(`Expected non-nullable type "${I(t)}" not to be null.`));return}if(e==null)return null;if(ce(t)){const i=t.ofType;return si(e)?Array.from(e,(s,o)=>{const a=Vt(r,o,void 0);return Kt(s,i,n,a)}):[Kt(e,i,n,r)]}if(le(t)){if(!Ce(e)){n(Fe(r),e,new _(`Expected type "${t.name}" to be an object.`));return}const i={},s=t.getFields();for(const o of Object.values(s)){const a=e[o.name];if(a===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if(H(o.type)){const u=I(o.type);n(Fe(r),e,new _(`Field "${o.name}" of required type "${u}" was not provided.`))}continue}i[o.name]=Kt(a,o.type,n,Vt(r,o.name,t.name))}for(const o of Object.keys(e))if(!s[o]){const a=ht(o,Object.keys(t.getFields()));n(Fe(r),e,new _(`Field "${o}" is not defined by type "${t.name}".`+it(a)))}return i}if(Ze(t)){let i;try{i=t.parseValue(e)}catch(s){s instanceof _?n(Fe(r),e,s):n(Fe(r),e,new _(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return i===void 0&&n(Fe(r),e,new _(`Expected type "${t.name}".`)),i}me(!1,"Unexpected input type: "+I(t))}function Xe(e,t,n){if(e){if(e.kind===l.VARIABLE){const r=e.name.value;if(n==null||n[r]===void 0)return;const i=n[r];return i===null&&H(t)?void 0:i}if(H(t))return e.kind===l.NULL?void 0:Xe(e,t.ofType,n);if(e.kind===l.NULL)return null;if(ce(t)){const r=t.ofType;if(e.kind===l.LIST){const s=[];for(const o of e.values)if(Hi(o,n)){if(H(r))return;s.push(null)}else{const a=Xe(o,r,n);if(a===void 0)return;s.push(a)}return s}const i=Xe(e,r,n);return i===void 0?void 0:[i]}if(le(t)){if(e.kind!==l.OBJECT)return;const r=Object.create(null),i=st(e.fields,s=>s.name.value);for(const s of Object.values(t.getFields())){const o=i[s.name];if(!o||Hi(o.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if(H(s.type))return;continue}const a=Xe(o.value,s.type,n);if(a===void 0)return;r[s.name]=a}return r}if(Ze(t)){let r;try{r=t.parseLiteral(e,n)}catch{return}return r===void 0?void 0:r}me(!1,"Unexpected input type: "+I(t))}}function Hi(e,t){return e.kind===l.VARIABLE&&(t==null||t[e.name.value]===void 0)}function Lo(e,t,n,r){const i=[],s=r==null?void 0:r.maxErrors;try{const o=il(e,t,n,a=>{if(s!=null&&i.length>=s)throw new _("Too many errors processing variables, error limit reached. Execution aborted.");i.push(a)});if(i.length===0)return{coerced:o}}catch(o){i.push(o)}return{errors:i}}function il(e,t,n,r){const i={};for(const s of t){const o=s.variable.name.value,a=ke(e,s.type);if(!Le(a)){const c=ue(s.type);r(new _(`Variable "$${o}" expected value of type "${c}" which cannot be used as an input type.`,{nodes:s.type}));continue}if(!ko(n,o)){if(s.defaultValue)i[o]=Xe(s.defaultValue,a);else if(H(a)){const c=I(a);r(new _(`Variable "$${o}" of required type "${c}" was not provided.`,{nodes:s}))}continue}const u=n[o];if(u===null&&H(a)){const c=I(a);r(new _(`Variable "$${o}" of non-null type "${c}" must not be null.`,{nodes:s}));continue}i[o]=Ro(u,a,(c,f,d)=>{let h=`Variable "$${o}" got invalid value `+I(f);c.length>0&&(h+=` at "${o}${So(c)}"`),r(new _(h+"; "+d.message,{nodes:s,originalError:d.originalError}))})}return i}function lr(e,t,n){var r;const i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],o=st(s,a=>a.name.value);for(const a of e.args){const u=a.name,c=a.type,f=o[u];if(!f){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(H(c))throw new _(`Argument "${u}" of required type "${I(c)}" was not provided.`,{nodes:t});continue}const d=f.value;let h=d.kind===l.NULL;if(d.kind===l.VARIABLE){const E=d.name.value;if(n==null||!ko(n,E)){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(H(c))throw new _(`Argument "${u}" of required type "${I(c)}" was provided the variable "$${E}" which was not provided a runtime value.`,{nodes:d});continue}h=n[E]==null}if(h&&H(c))throw new _(`Argument "${u}" of non-null type "${I(c)}" must not be null.`,{nodes:d});const y=Xe(d,c,n);if(y===void 0)throw new _(`Argument "${u}" has invalid value ${ue(d)}.`,{nodes:d});i[u]=y}return i}function fn(e,t,n){var r;const i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return lr(e,i,n)}function ko(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ni(e,t,n,r,i){const s=new Map;return Qn(e,t,n,r,i,s,new Set),s}function sl(e,t,n,r,i){const s=new Map,o=new Set;for(const a of i)a.selectionSet&&Qn(e,t,n,r,a.selectionSet,s,o);return s}function Qn(e,t,n,r,i,s,o){for(const a of i.selections)switch(a.kind){case l.FIELD:{if(!Er(n,a))continue;const u=ol(a),c=s.get(u);c!==void 0?c.push(a):s.set(u,[a]);break}case l.INLINE_FRAGMENT:{if(!Er(n,a)||!zi(e,a,r))continue;Qn(e,t,n,r,a.selectionSet,s,o);break}case l.FRAGMENT_SPREAD:{const u=a.name.value;if(o.has(u)||!Er(n,a))continue;o.add(u);const c=t[u];if(!c||!zi(e,c,r))continue;Qn(e,t,n,r,c.selectionSet,s,o);break}}}function Er(e,t){const n=fn(ti,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=fn(ei,t,e);return(r==null?void 0:r.if)!==!1}function zi(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=ke(e,r);return i===n?!0:We(i)?e.isSubType(i,n):!1}function ol(e){return e.alias?e.alias.value:e.name.value}function Fo(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,s=Object.create(null),o=e.getDocument(),a=Object.create(null);for(const c of o.definitions)c.kind===l.FRAGMENT_DEFINITION&&(a[c.name.value]=c);const u=Ni(n,a,s,r,t.selectionSet);if(u.size>1){const d=[...u.values()].slice(1).flat();e.reportError(new _(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}))}for(const c of u.values())c[0].name.value.startsWith("__")&&e.reportError(new _(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}))}}}}}function Ii(e,t){const n=new Map;for(const r of e){const i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}function xo(e){return{DirectiveDefinition(r){var i;const 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;const s=r.name.value,o=(i=r.fields)!==null&&i!==void 0?i:[];for(const u of o){var a;const c=u.name.value,f=(a=u.arguments)!==null&&a!==void 0?a:[];n(`${s}.${c}`,f)}return!1}function n(r,i){const s=Ii(i,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new _(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:a.map(u=>u.name)}));return!1}}function wi(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],s=Ii(i,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new _(`There can be only one argument named "${o}".`,{nodes:a.map(u=>u.name)}))}}function $o(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new _(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new _(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function Oi(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():yt;for(const a of r)t[a.name]=!a.isRepeatable;const i=e.getDocument().definitions;for(const a of i)a.kind===l.DIRECTIVE_DEFINITION&&(t[a.name.value]=!a.repeatable);const s=Object.create(null),o=Object.create(null);return{enter(a){if(!("directives"in a)||!a.directives)return;let u;if(a.kind===l.SCHEMA_DEFINITION||a.kind===l.SCHEMA_EXTENSION)u=s;else if(Yt(a)||ur(a)){const c=a.name.value;u=o[c],u===void 0&&(o[c]=u=Object.create(null))}else u=Object.create(null);for(const c of a.directives){const f=c.name.value;t[f]&&(u[f]?e.reportError(new _(`The directive "@${f}" can only be used once at this location.`,{nodes:[u[f],c]})):u[f]=c)}}}}function Co(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var o;const a=s.name.value;r[a]||(r[a]=Object.create(null));const u=(o=s.values)!==null&&o!==void 0?o:[],c=r[a];for(const f of u){const d=f.name.value,h=n[a];ge(h)&&h.getValue(d)?e.reportError(new _(`Enum value "${a}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new _(`Enum value "${a}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Mo(e){const 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;const a=s.name.value;r[a]||(r[a]=Object.create(null));const u=(o=s.fields)!==null&&o!==void 0?o:[],c=r[a];for(const f of u){const d=f.name.value;al(n[a],d)?e.reportError(new _(`Field "${a}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new _(`Field "${a}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function al(e,t){return te(e)||re(e)||le(e)?e.getFields()[t]!=null:!1}function Vo(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new _(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function Ai(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||me(!1),n=r}},ObjectField(r){const i=r.name.value;n[i]?e.reportError(new _(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function Uo(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new _(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function Po(e){const 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;const a=(o=s.operationTypes)!==null&&o!==void 0?o:[];for(const u of a){const c=u.operation,f=n[c];r[c]?e.reportError(new _(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:u})):f?e.reportError(new _(`There can be only one ${c} type in schema.`,{nodes:[f,u]})):n[c]=u}return!1}}function jo(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new _(`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 _(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}function Bo(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=Ii(r,s=>s.variable.name.value);for(const[s,o]of i)o.length>1&&e.reportError(new _(`There can be only one variable named "$${s}".`,{nodes:o.map(a=>a.variable.name)}))}}}function qo(e){return{ListValue(t){const n=Xr(e.getParentInputType());if(!ce(n))return vt(e,t),!1},ObjectValue(t){const n=Se(e.getInputType());if(!le(n))return vt(e,t),!1;const r=st(t.fields,i=>i.name.value);for(const i of Object.values(n.getFields()))if(!r[i.name]&&rr(i)){const o=I(i.type);e.reportError(new _(`Field "${n.name}.${i.name}" of required type "${o}" was not provided.`,{nodes:t}))}},ObjectField(t){const n=Se(e.getParentInputType());if(!e.getInputType()&&le(n)){const i=ht(t.name.value,Object.keys(n.getFields()));e.reportError(new _(`Field "${t.name.value}" is not defined by type "${n.name}".`+it(i),{nodes:t}))}},NullValue(t){const n=e.getInputType();H(n)&&e.reportError(new _(`Expected value of type "${I(n)}", found ${ue(t)}.`,{nodes:t}))},EnumValue:t=>vt(e,t),IntValue:t=>vt(e,t),FloatValue:t=>vt(e,t),StringValue:t=>vt(e,t),BooleanValue:t=>vt(e,t)}}function vt(e,t){const n=e.getInputType();if(!n)return;const r=Se(n);if(!Ze(r)){const i=I(n);e.reportError(new _(`Expected value of type "${i}", found ${ue(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const s=I(n);e.reportError(new _(`Expected value of type "${s}", found ${ue(t)}.`,{nodes:t}))}}catch(i){const s=I(n);i instanceof _?e.reportError(i):e.reportError(new _(`Expected value of type "${s}", found ${ue(t)}; `+i.message,{nodes:t,originalError:i}))}}function Go(e){return{VariableDefinition(t){const n=ke(e.getSchema(),t.type);if(n!==void 0&&!Le(n)){const r=t.variable.name.value,i=ue(t.type);e.reportError(new _(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function Qo(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:s,defaultValue:o}of r){const a=i.name.value,u=t[a];if(u&&s){const c=e.getSchema(),f=ke(c,u.type);if(f&&!ul(c,f,u.defaultValue,s,o)){const d=I(f),h=I(s);e.reportError(new _(`Variable "$${a}" of type "${d}" used in position expecting type "${h}".`,{nodes:[u,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function ul(e,t,n,r,i){if(H(r)&&!H(t)){if(!(n!=null&&n.kind!==l.NULL)&&!(i!==void 0))return!1;const a=r.ofType;return Tt(e,t,a)}return Tt(e,t,r)}const Yo=Object.freeze([ao,Uo,ho,Fo,bi,co,Go,Do,uo,Vo,po,Eo,Io,yo,Bo,vo,go,Ti,Oi,lo,wi,qo,Oo,Qo,bo,Ai]),cl=Object.freeze([mo,Po,jo,Co,Mo,xo,$o,bi,Ti,Oi,wo,fo,wi,Ai,Ao]);class Jo{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(const r of this.getDocument().definitions)r.kind===l.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const r=[t];let i;for(;i=r.pop();)for(const s of i.selections)s.kind===l.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=[];const r=Object.create(null),i=[t.selectionSet];let s;for(;s=i.pop();)for(const o of this.getFragmentSpreads(s)){const a=o.name.value;if(r[a]!==!0){r[a]=!0;const u=this.getFragment(a);u&&(n.push(u),i.push(u.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class ll extends Jo{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class Ho extends Jo{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){const r=[],i=new mi(this._schema);Gt(t,yi(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(const 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 zo(e,t,n=Yo,r,i=new mi(e)){var s;const o=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||Z(!1,"Must provide document."),pi(e);const a=Object.freeze({}),u=[],c=new Ho(e,t,i,d=>{if(u.length>=o)throw u.push(new _("Too many validation errors, error limit reached. Validation aborted.")),a;u.push(d)}),f=Hr(n.map(d=>d(c)));try{Gt(t,yi(i,f))}catch(d){if(d!==a)throw d}return u}function Xo(e,t,n=cl){const r=[],i=new ll(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return Gt(e,Hr(s)),r}function fl(e){const t=Xo(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
47
47
 
48
- `))}function dl(e,t){const n=Jo(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(`
48
+ `))}function dl(e,t){const n=Xo(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(`
49
49
 
50
- `))}function pl(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 a=o.get(i);a===void 0&&(a=new WeakMap,o.set(i,a));let u=a.get(s);return u===void 0&&(u=e(r,i,s),a.set(s,u)),u}}function hl(e){return Promise.all(Object.values(e)).then(t=>{const n=Object.create(null);for(const[r,i]of Object.keys(e).entries())n[i]=t[r];return n})}function ml(e,t,n){let r=n;for(const i of e)r=je(r)?r.then(s=>t(s,i)):t(r,i);return r}function yl(e){return e instanceof Error?e:new vl(e)}class vl extends Error{constructor(t){super("Unexpected error value: "+I(t)),this.name="NonErrorThrown",this.thrownValue=t}}function Ut(e,t,n){var r;const i=yl(e);return El(i)?i:new _(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function El(e){return Array.isArray(e.path)}const gl=pl((e,t,n)=>sl(e.schema,e.fragments,e.variableValues,t,n));function dr(e){arguments.length<2||K(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:n,variableValues:r,rootValue:i}=e;Xo(t,n,r);const s=Wo(e);if(!("schema"in s))return{errors:s};try{const{operation:o}=s,a=Tl(s,o,i);return je(a)?a.then(u=>An(u,s.errors),u=>(s.errors.push(u),An(null,s.errors))):An(a,s.errors)}catch(o){return s.errors.push(o),An(null,s.errors)}}function Ho(e){const t=dr(e);if(je(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function An(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function Xo(e,t,n){t||K(!1,"Must provide document."),di(e),n==null||Ve(n)||K(!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 Wo(e){var t,n;const{schema:r,document:i,rootValue:s,contextValue:o,variableValues:a,operationName:u,fieldResolver:c,typeResolver:f,subscribeFieldResolver:d}=e;let p;const y=Object.create(null);for(const M of i.definitions)switch(M.kind){case l.OPERATION_DEFINITION:if(u==null){if(p!==void 0)return[new _("Must provide operation name if query contains multiple operations.")];p=M}else((t=M.name)===null||t===void 0?void 0:t.value)===u&&(p=M);break;case l.FRAGMENT_DEFINITION:y[M.name.value]=M;break}if(!p)return u!=null?[new _(`Unknown operation named "${u}".`)]:[new _("Must provide an operation.")];const E=(n=p.variableDefinitions)!==null&&n!==void 0?n:[],$=So(r,E,a??{},{maxErrors:50});return $.errors?$.errors:{schema:r,fragments:y,rootValue:s,contextValue:o,operation:p,variableValues:$.coerced,fieldResolver:c??xr,typeResolver:f??ea,subscribeFieldResolver:d??xr,errors:[]}}function Tl(e,t,n){const r=e.schema.getRootType(t.operation);if(r==null)throw new _(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const i=_i(e.schema,e.fragments,e.variableValues,r,t.selectionSet),s=void 0;switch(t.operation){case be.QUERY:return zn(e,r,n,s,i);case be.MUTATION:return bl(e,r,n,s,i);case be.SUBSCRIPTION:return zn(e,r,n,s,i)}}function bl(e,t,n,r,i){return ml(i.entries(),(s,[o,a])=>{const u=Vt(r,o,t.name),c=Ko(e,t,n,a,u);return c===void 0?s:je(c)?c.then(f=>(s[o]=f,s)):(s[o]=c,s)},Object.create(null))}function zn(e,t,n,r,i){const s=Object.create(null);let o=!1;for(const[a,u]of i.entries()){const c=Vt(r,a,t.name),f=Ko(e,t,n,u,c);f!==void 0&&(s[a]=f,je(f)&&(o=!0))}return o?hl(s):s}function Ko(e,t,n,r,i){var s;const o=ta(e.schema,t,r[0]);if(!o)return;const a=o.type,u=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,c=Zo(e,o,r,t,i);try{const f=fr(o,r[0],e.variableValues),d=e.contextValue,p=u(n,f,d,c);let y;return je(p)?y=p.then(E=>dn(e,a,r,c,i,E)):y=dn(e,a,r,c,i,p),je(y)?y.then(void 0,E=>{const $=Ut(E,r,$e(i));return Jn($,a,e)}):y}catch(f){const d=Ut(f,r,$e(i));return Jn(d,a,e)}}function Zo(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 Jn(e,t,n){if(X(t))throw e;return n.errors.push(e),null}function dn(e,t,n,r,i,s){if(s instanceof Error)throw s;if(X(t)){const o=dn(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(fe(t))return _l(e,t,n,r,i,s);if(tt(t))return Nl(t,s);if(Ze(t))return Il(e,t,n,r,i,s);if(te(t))return kr(e,t,n,r,i,s);ye(!1,"Cannot complete value of unexpected output type: "+I(t))}function _l(e,t,n,r,i,s){if(!ii(s))throw new _(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const o=t.ofType;let a=!1;const u=Array.from(s,(c,f)=>{const d=Vt(i,f,void 0);try{let p;return je(c)?p=c.then(y=>dn(e,o,n,r,d,y)):p=dn(e,o,n,r,d,c),je(p)?(a=!0,p.then(void 0,y=>{const E=Ut(y,n,$e(d));return Jn(E,o,e)})):p}catch(p){const y=Ut(p,n,$e(d));return Jn(y,o,e)}});return a?Promise.all(u):u}function Nl(e,t){const n=e.serialize(t);if(n==null)throw new Error(`Expected \`${I(e)}.serialize(${I(t)})\` to return non-nullable value, returned: ${I(n)}`);return n}function Il(e,t,n,r,i,s){var o;const a=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,u=e.contextValue,c=a(s,u,r,t);return je(c)?c.then(f=>kr(e,Xi(f,e,t,n,r,s),n,r,i,s)):kr(e,Xi(c,e,t,n,r,s),n,r,i,s)}function Xi(e,t,n,r,i,s){if(e==null)throw new _(`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(te(e))throw new _("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 _(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${I(s)}, received "${I(e)}".`);const o=t.schema.getType(e);if(o==null)throw new _(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!te(o))throw new _(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new _(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function kr(e,t,n,r,i,s){const o=gl(e,t,n);if(t.isTypeOf){const a=t.isTypeOf(s,e.contextValue,r);if(je(a))return a.then(u=>{if(!u)throw Wi(t,s,n);return zn(e,t,s,i,o)});if(!a)throw Wi(t,s,n)}return zn(e,t,s,i,o)}function Wi(e,t,n){return new _(`Expected value of type "${e.name}" but got: ${I(t)}.`,{nodes:n})}const ea=function(e,t,n,r){if(Ve(e)&&typeof e.__typename=="string")return e.__typename;const i=n.schema.getPossibleTypes(r),s=[];for(let o=0;o<i.length;o++){const a=i[o];if(a.isTypeOf){const u=a.isTypeOf(e,t,n);if(je(u))s[o]=u;else if(u)return a.name}}if(s.length)return Promise.all(s).then(o=>{for(let a=0;a<o.length;a++)if(o[a])return i[a].name})},xr=function(e,t,n,r){if(Ve(e)||typeof e=="function"){const i=e[r.fieldName];return typeof i=="function"?e[r.fieldName](t,n,r):i}};function ta(e,t,n){const r=n.name.value;return r===un.name&&e.getQueryType()===t?un:r===cn.name&&e.getQueryType()===t?cn:r===ln.name?ln:t.getFields()[r]}function wl(e){return new Promise(t=>t(na(e)))}function Ol(e){const t=na(e);if(je(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function na(e){arguments.length<2||K(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:n,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:a,typeResolver:u}=e,c=fi(t);if(c.length>0)return{errors:c};let f;try{f=nr(n)}catch(p){return{errors:[p]}}const d=zo(t,f);return d.length>0?{errors:d}:dr({schema:t,document:f,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:a,typeResolver:u})}function ra(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}function Dl(e,t){const n=e[Symbol.asyncIterator]();async function r(i){if(i.done)return i;try{return{value:await t(i.value),done:!1}}catch(s){if(typeof n.return=="function")try{await n.return()}catch{}throw s}}return{async next(){return r(await n.next())},async return(){return typeof n.return=="function"?r(await n.return()):{value:void 0,done:!0}},async throw(i){if(typeof n.throw=="function")return r(await n.throw(i));throw i},[Symbol.asyncIterator](){return this}}}async function Al(e){arguments.length<2||K(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await ia(e);return ra(t)?Dl(t,r=>dr({...e,rootValue:r})):t}function Sl(e){const 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]}}async function ia(...e){const t=Sl(e),{schema:n,document:r,variableValues:i}=t;Xo(n,r,i);const s=Wo(t);if(!("schema"in s))return{errors:s};try{const o=await Rl(s);if(!ra(o))throw new Error(`Subscription field must return Async Iterable. Received: ${I(o)}.`);return o}catch(o){if(o instanceof _)return{errors:[o]};throw o}}async function Rl(e){const{schema:t,fragments:n,operation:r,variableValues:i,rootValue:s}=e,o=t.getSubscriptionType();if(o==null)throw new _("Schema is not configured to execute subscription operation.",{nodes:r});const a=_i(t,n,i,o,r.selectionSet),[u,c]=[...a.entries()][0],f=ta(t,o,c[0]);if(!f){const E=c[0].name.value;throw new _(`The subscription field "${E}" is not defined.`,{nodes:c})}const d=Vt(void 0,u,o.name),p=Zo(e,f,c,o,d);try{var y;const E=fr(f,c[0],i),$=e.contextValue,P=await((y=f.subscribe)!==null&&y!==void 0?y:e.subscribeFieldResolver)(s,E,$,p);if(P instanceof Error)throw P;return P}catch(E){throw Ut(E,c,$e(d))}}function Ll(e){return{Field(t){const n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getParentType();i!=null||ye(!1),e.reportError(new _(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new _(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const s=e.getParentType(),o=e.getFieldDef();s!=null&&o!=null||ye(!1),e.reportError(new _(`Field "${s.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=Re(e.getParentInputType());if(de(n)){const r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new _(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=Re(e.getInputType());i!=null||ye(!1),e.reportError(new _(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function Fl(e){return{Field(t){const n=Re(e.getType());n&&Ot(n)&&e.reportError(new _(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}function sa(e){const t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,...e},n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",s=t.schemaDescription?n:"";function o(a){return t.inputValueDeprecation?a:""}return`
50
+ `))}function pl(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 a=o.get(i);a===void 0&&(a=new WeakMap,o.set(i,a));let u=a.get(s);return u===void 0&&(u=e(r,i,s),a.set(s,u)),u}}function hl(e){return Promise.all(Object.values(e)).then(t=>{const n=Object.create(null);for(const[r,i]of Object.keys(e).entries())n[i]=t[r];return n})}function ml(e,t,n){let r=n;for(const i of e)r=$e(r)?r.then(s=>t(s,i)):t(r,i);return r}function yl(e){return e instanceof Error?e:new vl(e)}class vl extends Error{constructor(t){super("Unexpected error value: "+I(t)),this.name="NonErrorThrown",this.thrownValue=t}}function Ut(e,t,n){var r;const i=yl(e);return El(i)?i:new _(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function El(e){return Array.isArray(e.path)}const gl=pl((e,t,n)=>sl(e.schema,e.fragments,e.variableValues,t,n));function fr(e){arguments.length<2||Z(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:n,variableValues:r,rootValue:i}=e;Ko(t,n,r);const s=Zo(e);if(!("schema"in s))return{errors:s};try{const{operation:o}=s,a=Tl(s,o,i);return $e(a)?a.then(u=>Dn(u,s.errors),u=>(s.errors.push(u),Dn(null,s.errors))):Dn(a,s.errors)}catch(o){return s.errors.push(o),Dn(null,s.errors)}}function Wo(e){const t=fr(e);if($e(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function Dn(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function Ko(e,t,n){t||Z(!1,"Must provide document."),pi(e),n==null||Ce(n)||Z(!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 Zo(e){var t,n;const{schema:r,document:i,rootValue:s,contextValue:o,variableValues:a,operationName:u,fieldResolver:c,typeResolver:f,subscribeFieldResolver:d}=e;let h;const y=Object.create(null);for(const V of i.definitions)switch(V.kind){case l.OPERATION_DEFINITION:if(u==null){if(h!==void 0)return[new _("Must provide operation name if query contains multiple operations.")];h=V}else((t=V.name)===null||t===void 0?void 0:t.value)===u&&(h=V);break;case l.FRAGMENT_DEFINITION:y[V.name.value]=V;break}if(!h)return u!=null?[new _(`Unknown operation named "${u}".`)]:[new _("Must provide an operation.")];const E=(n=h.variableDefinitions)!==null&&n!==void 0?n:[],$=Lo(r,E,a??{},{maxErrors:50});return $.errors?$.errors:{schema:r,fragments:y,rootValue:s,contextValue:o,operation:h,variableValues:$.coerced,fieldResolver:c??$r,typeResolver:f??na,subscribeFieldResolver:d??$r,errors:[]}}function Tl(e,t,n){const r=e.schema.getRootType(t.operation);if(r==null)throw new _(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const i=Ni(e.schema,e.fragments,e.variableValues,r,t.selectionSet),s=void 0;switch(t.operation){case be.QUERY:return Yn(e,r,n,s,i);case be.MUTATION:return bl(e,r,n,s,i);case be.SUBSCRIPTION:return Yn(e,r,n,s,i)}}function bl(e,t,n,r,i){return ml(i.entries(),(s,[o,a])=>{const u=Vt(r,o,t.name),c=ea(e,t,n,a,u);return c===void 0?s:$e(c)?c.then(f=>(s[o]=f,s)):(s[o]=c,s)},Object.create(null))}function Yn(e,t,n,r,i){const s=Object.create(null);let o=!1;for(const[a,u]of i.entries()){const c=Vt(r,a,t.name),f=ea(e,t,n,u,c);f!==void 0&&(s[a]=f,$e(f)&&(o=!0))}return o?hl(s):s}function ea(e,t,n,r,i){var s;const o=ra(e.schema,t,r[0]);if(!o)return;const a=o.type,u=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,c=ta(e,o,r,t,i);try{const f=lr(o,r[0],e.variableValues),d=e.contextValue,h=u(n,f,d,c);let y;return $e(h)?y=h.then(E=>dn(e,a,r,c,i,E)):y=dn(e,a,r,c,i,h),$e(y)?y.then(void 0,E=>{const $=Ut(E,r,Fe(i));return Jn($,a,e)}):y}catch(f){const d=Ut(f,r,Fe(i));return Jn(d,a,e)}}function ta(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 Jn(e,t,n){if(H(t))throw e;return n.errors.push(e),null}function dn(e,t,n,r,i,s){if(s instanceof Error)throw s;if(H(t)){const o=dn(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(ce(t))return _l(e,t,n,r,i,s);if(Ze(t))return Nl(t,s);if(We(t))return Il(e,t,n,r,i,s);if(te(t))return xr(e,t,n,r,i,s);me(!1,"Cannot complete value of unexpected output type: "+I(t))}function _l(e,t,n,r,i,s){if(!si(s))throw new _(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const o=t.ofType;let a=!1;const u=Array.from(s,(c,f)=>{const d=Vt(i,f,void 0);try{let h;return $e(c)?h=c.then(y=>dn(e,o,n,r,d,y)):h=dn(e,o,n,r,d,c),$e(h)?(a=!0,h.then(void 0,y=>{const E=Ut(y,n,Fe(d));return Jn(E,o,e)})):h}catch(h){const y=Ut(h,n,Fe(d));return Jn(y,o,e)}});return a?Promise.all(u):u}function Nl(e,t){const n=e.serialize(t);if(n==null)throw new Error(`Expected \`${I(e)}.serialize(${I(t)})\` to return non-nullable value, returned: ${I(n)}`);return n}function Il(e,t,n,r,i,s){var o;const a=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,u=e.contextValue,c=a(s,u,r,t);return $e(c)?c.then(f=>xr(e,Xi(f,e,t,n,r,s),n,r,i,s)):xr(e,Xi(c,e,t,n,r,s),n,r,i,s)}function Xi(e,t,n,r,i,s){if(e==null)throw new _(`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(te(e))throw new _("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 _(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${I(s)}, received "${I(e)}".`);const o=t.schema.getType(e);if(o==null)throw new _(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!te(o))throw new _(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new _(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function xr(e,t,n,r,i,s){const o=gl(e,t,n);if(t.isTypeOf){const a=t.isTypeOf(s,e.contextValue,r);if($e(a))return a.then(u=>{if(!u)throw Wi(t,s,n);return Yn(e,t,s,i,o)});if(!a)throw Wi(t,s,n)}return Yn(e,t,s,i,o)}function Wi(e,t,n){return new _(`Expected value of type "${e.name}" but got: ${I(t)}.`,{nodes:n})}const na=function(e,t,n,r){if(Ce(e)&&typeof e.__typename=="string")return e.__typename;const i=n.schema.getPossibleTypes(r),s=[];for(let o=0;o<i.length;o++){const a=i[o];if(a.isTypeOf){const u=a.isTypeOf(e,t,n);if($e(u))s[o]=u;else if(u)return a.name}}if(s.length)return Promise.all(s).then(o=>{for(let a=0;a<o.length;a++)if(o[a])return i[a].name})},$r=function(e,t,n,r){if(Ce(e)||typeof e=="function"){const i=e[r.fieldName];return typeof i=="function"?e[r.fieldName](t,n,r):i}};function ra(e,t,n){const r=n.name.value;return r===un.name&&e.getQueryType()===t?un:r===cn.name&&e.getQueryType()===t?cn:r===ln.name?ln:t.getFields()[r]}function wl(e){return new Promise(t=>t(ia(e)))}function Ol(e){const t=ia(e);if($e(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function ia(e){arguments.length<2||Z(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:n,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:a,typeResolver:u}=e,c=di(t);if(c.length>0)return{errors:c};let f;try{f=tr(n)}catch(h){return{errors:[h]}}const d=zo(t,f);return d.length>0?{errors:d}:fr({schema:t,document:f,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:a,typeResolver:u})}function sa(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}function Al(e,t){const n=e[Symbol.asyncIterator]();async function r(i){if(i.done)return i;try{return{value:await t(i.value),done:!1}}catch(s){if(typeof n.return=="function")try{await n.return()}catch{}throw s}}return{async next(){return r(await n.next())},async return(){return typeof n.return=="function"?r(await n.return()):{value:void 0,done:!0}},async throw(i){if(typeof n.throw=="function")return r(await n.throw(i));throw i},[Symbol.asyncIterator](){return this}}}async function Dl(e){arguments.length<2||Z(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await oa(e);return sa(t)?Al(t,r=>fr({...e,rootValue:r})):t}function Sl(e){const 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]}}async function oa(...e){const t=Sl(e),{schema:n,document:r,variableValues:i}=t;Ko(n,r,i);const s=Zo(t);if(!("schema"in s))return{errors:s};try{const o=await Rl(s);if(!sa(o))throw new Error(`Subscription field must return Async Iterable. Received: ${I(o)}.`);return o}catch(o){if(o instanceof _)return{errors:[o]};throw o}}async function Rl(e){const{schema:t,fragments:n,operation:r,variableValues:i,rootValue:s}=e,o=t.getSubscriptionType();if(o==null)throw new _("Schema is not configured to execute subscription operation.",{nodes:r});const a=Ni(t,n,i,o,r.selectionSet),[u,c]=[...a.entries()][0],f=ra(t,o,c[0]);if(!f){const E=c[0].name.value;throw new _(`The subscription field "${E}" is not defined.`,{nodes:c})}const d=Vt(void 0,u,o.name),h=ta(e,f,c,o,d);try{var y;const E=lr(f,c[0],i),$=e.contextValue,B=await((y=f.subscribe)!==null&&y!==void 0?y:e.subscribeFieldResolver)(s,E,$,h);if(B instanceof Error)throw B;return B}catch(E){throw Ut(E,c,Fe(d))}}function Ll(e){return{Field(t){const n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getParentType();i!=null||me(!1),e.reportError(new _(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new _(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const s=e.getParentType(),o=e.getFieldDef();s!=null&&o!=null||me(!1),e.reportError(new _(`Field "${s.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=Se(e.getParentInputType());if(le(n)){const r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new _(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=Se(e.getInputType());i!=null||me(!1),e.reportError(new _(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function kl(e){return{Field(t){const n=Se(e.getType());n&&wt(n)&&e.reportError(new _(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}function aa(e){const t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,...e},n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",s=t.schemaDescription?n:"";function o(a){return t.inputValueDeprecation?a:""}return`
51
51
  query IntrospectionQuery {
52
52
  __schema {
53
53
  ${s}
@@ -144,21 +144,21 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
144
144
  }
145
145
  }
146
146
  }
147
- `}function kl(e,t){let n=null;for(const i of e.definitions)if(i.kind===l.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}function xl(e,t){if(t.operation==="query"){const n=e.getQueryType();if(!n)throw new _("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){const n=e.getMutationType();if(!n)throw new _("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){const n=e.getSubscriptionType();if(!n)throw new _("Schema is not configured for subscriptions.",{nodes:t});return n}throw new _("Can only have query, mutation and subscription operations.",{nodes:t})}function $l(e,t){const n={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,...t},r=nr(sa(n)),i=Ho({schema:e,document:r});return!i.errors&&i.data||ye(!1),i.data}function Cl(e,t){Ve(e)&&Ve(e.__schema)||K(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${I(e)}.`);const n=e.__schema,r=ft(n.types,g=>g.name,g=>p(g));for(const g of[...gn,..._n])r[g.name]&&(r[g.name]=g);const i=n.queryType?f(n.queryType):null,s=n.mutationType?f(n.mutationType):null,o=n.subscriptionType?f(n.subscriptionType):null,a=n.directives?n.directives.map(Q):[];return new Yt({description:n.description,query:i,mutation:s,subscription:o,types:Object.values(r),directives:a,assumeValid:t==null?void 0:t.assumeValid});function u(g){if(g.kind===oe.LIST){const v=g.ofType;if(!v)throw new Error("Decorated type deeper than introspection query.");return new we(u(v))}if(g.kind===oe.NON_NULL){const v=g.ofType;if(!v)throw new Error("Decorated type deeper than introspection query.");const C=u(v);return new W(Hs(C))}return c(g)}function c(g){const v=g.name;if(!v)throw new Error(`Unknown type reference: ${I(g)}.`);const C=r[v];if(!C)throw new Error(`Invalid or incomplete schema, unknown type: ${v}. Ensure that a full introspection query is used in order to build a client schema.`);return C}function f(g){return zs(c(g))}function d(g){return Js(c(g))}function p(g){if(g!=null&&g.name!=null&&g.kind!=null)switch(g.kind){case oe.SCALAR:return y(g);case oe.OBJECT:return $(g);case oe.INTERFACE:return M(g);case oe.UNION:return P(g);case oe.ENUM:return Z(g);case oe.INPUT_OBJECT:return J(g)}const v=I(g);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${v}.`)}function y(g){return new rt({name:g.name,description:g.description,specifiedByURL:g.specifiedByURL})}function E(g){if(g.interfaces===null&&g.kind===oe.INTERFACE)return[];if(!g.interfaces){const v=I(g);throw new Error(`Introspection result missing interfaces: ${v}.`)}return g.interfaces.map(d)}function $(g){return new qe({name:g.name,description:g.description,interfaces:()=>E(g),fields:()=>B(g)})}function M(g){return new Ct({name:g.name,description:g.description,interfaces:()=>E(g),fields:()=>B(g)})}function P(g){if(!g.possibleTypes){const v=I(g);throw new Error(`Introspection result missing possibleTypes: ${v}.`)}return new Mt({name:g.name,description:g.description,types:()=>g.possibleTypes.map(f)})}function Z(g){if(!g.enumValues){const v=I(g);throw new Error(`Introspection result missing enumValues: ${v}.`)}return new ht({name:g.name,description:g.description,values:ft(g.enumValues,v=>v.name,v=>({description:v.description,deprecationReason:v.deprecationReason}))})}function J(g){if(!g.inputFields){const v=I(g);throw new Error(`Introspection result missing inputFields: ${v}.`)}return new jt({name:g.name,description:g.description,fields:()=>F(g.inputFields)})}function B(g){if(!g.fields)throw new Error(`Introspection result missing fields: ${I(g)}.`);return ft(g.fields,v=>v.name,U)}function U(g){const v=u(g.type);if(!pt(v)){const C=I(v);throw new Error(`Introspection must provide output type for fields, but received: ${C}.`)}if(!g.args){const C=I(g);throw new Error(`Introspection result missing field args: ${C}.`)}return{description:g.description,deprecationReason:g.deprecationReason,type:v,args:F(g.args)}}function F(g){return ft(g,v=>v.name,D)}function D(g){const v=u(g.type);if(!ke(v)){const H=I(v);throw new Error(`Introspection must provide input type for arguments, but received: ${H}.`)}const C=g.defaultValue!=null?Ke(Gs(g.defaultValue),v):void 0;return{description:g.description,type:v,defaultValue:C,deprecationReason:g.deprecationReason}}function Q(g){if(!g.args){const v=I(g);throw new Error(`Introspection result missing directive args: ${v}.`)}if(!g.locations){const v=I(g);throw new Error(`Introspection result missing directive locations: ${v}.`)}return new it({name:g.name,description:g.description,isRepeatable:g.isRepeatable,locations:g.locations.slice(),args:F(g.args)})}}function Ml(e,t,n){li(e),t!=null&&t.kind===l.DOCUMENT||K(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&dl(t,e);const r=e.toConfig(),i=oa(r,t,n);return r===i?e:new Yt(i)}function oa(e,t,n){var r,i,s,o;const a=[],u=Object.create(null),c=[];let f;const d=[];for(const h of t.definitions)if(h.kind===l.SCHEMA_DEFINITION)f=h;else if(h.kind===l.SCHEMA_EXTENSION)d.push(h);else if(zt(h))a.push(h);else if(cr(h)){const R=h.name.value,O=u[R];u[R]=O?O.concat([h]):[h]}else h.kind===l.DIRECTIVE_DEFINITION&&c.push(h);if(Object.keys(u).length===0&&a.length===0&&c.length===0&&d.length===0&&f==null)return e;const p=Object.create(null);for(const h of e.types)p[h.name]=Z(h);for(const h of a){var y;const R=h.name.value;p[R]=(y=Ki[R])!==null&&y!==void 0?y:L(h)}const E={query:e.query&&M(e.query),mutation:e.mutation&&M(e.mutation),subscription:e.subscription&&M(e.subscription),...f&&C([f]),...C(d)};return{description:(r=f)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value,...E,types:Object.values(p),directives:[...e.directives.map(P),...c.map(m)],extensions:Object.create(null),astNode:(s=f)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(d),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1};function $(h){return fe(h)?new we($(h.ofType)):X(h)?new W($(h.ofType)):M(h)}function M(h){return p[h.name]}function P(h){const R=h.toConfig();return new it({...R,args:st(R.args,v)})}function Z(h){if(Ot(h)||sr(h))return h;if(Pe(h))return U(h);if(te(h))return F(h);if(re(h))return D(h);if(Ne(h))return Q(h);if(ge(h))return B(h);if(de(h))return J(h);ye(!1,"Unexpected type: "+I(h))}function J(h){var R;const O=h.toConfig(),k=(R=u[O.name])!==null&&R!==void 0?R:[];return new jt({...O,fields:()=>({...st(O.fields,x=>({...x,type:$(x.type)})),...T(k)}),extensionASTNodes:O.extensionASTNodes.concat(k)})}function B(h){var R;const O=h.toConfig(),k=(R=u[h.name])!==null&&R!==void 0?R:[];return new ht({...O,values:{...O.values,...w(k)},extensionASTNodes:O.extensionASTNodes.concat(k)})}function U(h){var R;const O=h.toConfig(),k=(R=u[O.name])!==null&&R!==void 0?R:[];let x=O.specifiedByURL;for(const z of k){var Y;x=(Y=Zi(z))!==null&&Y!==void 0?Y:x}return new rt({...O,specifiedByURL:x,extensionASTNodes:O.extensionASTNodes.concat(k)})}function F(h){var R;const O=h.toConfig(),k=(R=u[O.name])!==null&&R!==void 0?R:[];return new qe({...O,interfaces:()=>[...h.getInterfaces().map(M),...b(k)],fields:()=>({...st(O.fields,g),...A(k)}),extensionASTNodes:O.extensionASTNodes.concat(k)})}function D(h){var R;const O=h.toConfig(),k=(R=u[O.name])!==null&&R!==void 0?R:[];return new Ct({...O,interfaces:()=>[...h.getInterfaces().map(M),...b(k)],fields:()=>({...st(O.fields,g),...A(k)}),extensionASTNodes:O.extensionASTNodes.concat(k)})}function Q(h){var R;const O=h.toConfig(),k=(R=u[O.name])!==null&&R!==void 0?R:[];return new Mt({...O,types:()=>[...h.getTypes().map(M),...S(k)],extensionASTNodes:O.extensionASTNodes.concat(k)})}function g(h){return{...h,type:$(h.type),args:h.args&&st(h.args,v)}}function v(h){return{...h,type:$(h.type)}}function C(h){const R={};for(const k of h){var O;const x=(O=k.operationTypes)!==null&&O!==void 0?O:[];for(const Y of x)R[Y.operation]=H(Y.type)}return R}function H(h){var R;const O=h.name.value,k=(R=Ki[O])!==null&&R!==void 0?R:p[O];if(k===void 0)throw new Error(`Unknown type: "${O}".`);return k}function ie(h){return h.kind===l.LIST_TYPE?new we(ie(h.type)):h.kind===l.NON_NULL_TYPE?new W(ie(h.type)):H(h)}function m(h){var R;return new it({name:h.name.value,description:(R=h.description)===null||R===void 0?void 0:R.value,locations:h.locations.map(({value:O})=>O),isRepeatable:h.repeatable,args:q(h.arguments),astNode:h})}function A(h){const R=Object.create(null);for(const x of h){var O;const Y=(O=x.fields)!==null&&O!==void 0?O:[];for(const z of Y){var k;R[z.name.value]={type:ie(z.type),description:(k=z.description)===null||k===void 0?void 0:k.value,args:q(z.arguments),deprecationReason:Sn(z),astNode:z}}}return R}function q(h){const R=h??[],O=Object.create(null);for(const x of R){var k;const Y=ie(x.type);O[x.name.value]={type:Y,description:(k=x.description)===null||k===void 0?void 0:k.value,defaultValue:Ke(x.defaultValue,Y),deprecationReason:Sn(x),astNode:x}}return O}function T(h){const R=Object.create(null);for(const x of h){var O;const Y=(O=x.fields)!==null&&O!==void 0?O:[];for(const z of Y){var k;const ne=ie(z.type);R[z.name.value]={type:ne,description:(k=z.description)===null||k===void 0?void 0:k.value,defaultValue:Ke(z.defaultValue,ne),deprecationReason:Sn(z),astNode:z}}}return R}function w(h){const R=Object.create(null);for(const x of h){var O;const Y=(O=x.values)!==null&&O!==void 0?O:[];for(const z of Y){var k;R[z.name.value]={description:(k=z.description)===null||k===void 0?void 0:k.value,deprecationReason:Sn(z),astNode:z}}}return R}function b(h){return h.flatMap(R=>{var O,k;return(O=(k=R.interfaces)===null||k===void 0?void 0:k.map(H))!==null&&O!==void 0?O:[]})}function S(h){return h.flatMap(R=>{var O,k;return(O=(k=R.types)===null||k===void 0?void 0:k.map(H))!==null&&O!==void 0?O:[]})}function L(h){var R;const O=h.name.value,k=(R=u[O])!==null&&R!==void 0?R:[];switch(h.kind){case l.OBJECT_TYPE_DEFINITION:{var x;const pe=[h,...k];return new qe({name:O,description:(x=h.description)===null||x===void 0?void 0:x.value,interfaces:()=>b(pe),fields:()=>A(pe),astNode:h,extensionASTNodes:k})}case l.INTERFACE_TYPE_DEFINITION:{var Y;const pe=[h,...k];return new Ct({name:O,description:(Y=h.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>b(pe),fields:()=>A(pe),astNode:h,extensionASTNodes:k})}case l.ENUM_TYPE_DEFINITION:{var z;const pe=[h,...k];return new ht({name:O,description:(z=h.description)===null||z===void 0?void 0:z.value,values:w(pe),astNode:h,extensionASTNodes:k})}case l.UNION_TYPE_DEFINITION:{var ne;const pe=[h,...k];return new Mt({name:O,description:(ne=h.description)===null||ne===void 0?void 0:ne.value,types:()=>S(pe),astNode:h,extensionASTNodes:k})}case l.SCALAR_TYPE_DEFINITION:{var ve;return new rt({name:O,description:(ve=h.description)===null||ve===void 0?void 0:ve.value,specifiedByURL:Zi(h),astNode:h,extensionASTNodes:k})}case l.INPUT_OBJECT_TYPE_DEFINITION:{var ae;const pe=[h,...k];return new jt({name:O,description:(ae=h.description)===null||ae===void 0?void 0:ae.value,fields:()=>T(pe),astNode:h,extensionASTNodes:k})}}}}const Ki=at([...gn,..._n],e=>e.name);function Sn(e){const t=fn(ar,e);return t==null?void 0:t.reason}function Zi(e){const t=fn(ni,e);return t==null?void 0:t.url}function aa(e,t){e!=null&&e.kind===l.DOCUMENT||K(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&fl(e);const r=oa({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(const 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}const i=[...r.directives,...vt.filter(s=>r.directives.every(o=>o.name!==s.name))];return new Yt({...r,directives:i})}function jl(e,t){const n=nr(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return aa(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}function Vl(e){const t=e.toConfig(),n=ft(Tr(t.types),p=>p.name,d);return new Yt({...t,types:Object.values(n),directives:Tr(t.directives).map(o),query:s(t.query),mutation:s(t.mutation),subscription:s(t.subscription)});function r(p){return fe(p)?new we(r(p.ofType)):X(p)?new W(r(p.ofType)):i(p)}function i(p){return n[p.name]}function s(p){return p&&i(p)}function o(p){const y=p.toConfig();return new it({...y,locations:ua(y.locations,E=>E),args:a(y.args)})}function a(p){return Rn(p,y=>({...y,type:r(y.type)}))}function u(p){return Rn(p,y=>({...y,type:r(y.type),args:y.args&&a(y.args)}))}function c(p){return Rn(p,y=>({...y,type:r(y.type)}))}function f(p){return Tr(p).map(i)}function d(p){if(Pe(p)||Ot(p))return p;if(te(p)){const y=p.toConfig();return new qe({...y,interfaces:()=>f(y.interfaces),fields:()=>u(y.fields)})}if(re(p)){const y=p.toConfig();return new Ct({...y,interfaces:()=>f(y.interfaces),fields:()=>u(y.fields)})}if(Ne(p)){const y=p.toConfig();return new Mt({...y,types:()=>f(y.types)})}if(ge(p)){const y=p.toConfig();return new ht({...y,values:Rn(y.values,E=>E)})}if(de(p)){const y=p.toConfig();return new jt({...y,fields:()=>c(y.fields)})}ye(!1,"Unexpected type: "+I(p))}}function Rn(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(mn))n[r]=t(e[r]);return n}function Tr(e){return ua(e,t=>t.name)}function ua(e,t){return e.slice().sort((n,r)=>{const i=t(n),s=t(r);return mn(i,s)})}function Ul(e){return ca(e,t=>!ri(t),Bl)}function Pl(e){return ca(e,ri,Ot)}function Bl(e){return!sr(e)&&!Ot(e)}function ca(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[ql(e),...r.map(s=>Wl(s)),...i.map(s=>la(s))].filter(Boolean).join(`
147
+ `}function Fl(e,t){let n=null;for(const i of e.definitions)if(i.kind===l.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}function xl(e,t){if(t.operation==="query"){const n=e.getQueryType();if(!n)throw new _("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){const n=e.getMutationType();if(!n)throw new _("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){const n=e.getSubscriptionType();if(!n)throw new _("Schema is not configured for subscriptions.",{nodes:t});return n}throw new _("Can only have query, mutation and subscription operations.",{nodes:t})}function $l(e,t){const n={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,...t},r=tr(aa(n)),i=Wo({schema:e,document:r});return!i.errors&&i.data||me(!1),i.data}function Cl(e,t){Ce(e)&&Ce(e.__schema)||Z(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${I(e)}.`);const n=e.__schema,r=lt(n.types,v=>v.name,v=>h(v));for(const v of[...gn,..._n])r[v.name]&&(r[v.name]=v);const i=n.queryType?f(n.queryType):null,s=n.mutationType?f(n.mutationType):null,o=n.subscriptionType?f(n.subscriptionType):null,a=n.directives?n.directives.map(M):[];return new Qt({description:n.description,query:i,mutation:s,subscription:o,types:Object.values(r),directives:a,assumeValid:t==null?void 0:t.assumeValid});function u(v){if(v.kind===se.LIST){const b=v.ofType;if(!b)throw new Error("Decorated type deeper than introspection query.");return new we(u(b))}if(v.kind===se.NON_NULL){const b=v.ofType;if(!b)throw new Error("Decorated type deeper than introspection query.");const P=u(b);return new K(Ws(P))}return c(v)}function c(v){const b=v.name;if(!b)throw new Error(`Unknown type reference: ${I(v)}.`);const P=r[b];if(!P)throw new Error(`Invalid or incomplete schema, unknown type: ${b}. Ensure that a full introspection query is used in order to build a client schema.`);return P}function f(v){return zs(c(v))}function d(v){return Xs(c(v))}function h(v){if(v!=null&&v.name!=null&&v.kind!=null)switch(v.kind){case se.SCALAR:return y(v);case se.OBJECT:return $(v);case se.INTERFACE:return V(v);case se.UNION:return B(v);case se.ENUM:return X(v);case se.INPUT_OBJECT:return z(v)}const b=I(v);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${b}.`)}function y(v){return new tt({name:v.name,description:v.description,specifiedByURL:v.specifiedByURL})}function E(v){if(v.interfaces===null&&v.kind===se.INTERFACE)return[];if(!v.interfaces){const b=I(v);throw new Error(`Introspection result missing interfaces: ${b}.`)}return v.interfaces.map(d)}function $(v){return new Pe({name:v.name,description:v.description,interfaces:()=>E(v),fields:()=>Q(v)})}function V(v){return new $t({name:v.name,description:v.description,interfaces:()=>E(v),fields:()=>Q(v)})}function B(v){if(!v.possibleTypes){const b=I(v);throw new Error(`Introspection result missing possibleTypes: ${b}.`)}return new Ct({name:v.name,description:v.description,types:()=>v.possibleTypes.map(f)})}function X(v){if(!v.enumValues){const b=I(v);throw new Error(`Introspection result missing enumValues: ${b}.`)}return new pt({name:v.name,description:v.description,values:lt(v.enumValues,b=>b.name,b=>({description:b.description,deprecationReason:b.deprecationReason}))})}function z(v){if(!v.inputFields){const b=I(v);throw new Error(`Introspection result missing inputFields: ${b}.`)}return new Mt({name:v.name,description:v.description,fields:()=>x(v.inputFields)})}function Q(v){if(!v.fields)throw new Error(`Introspection result missing fields: ${I(v)}.`);return lt(v.fields,b=>b.name,C)}function C(v){const b=u(v.type);if(!dt(b)){const P=I(b);throw new Error(`Introspection must provide output type for fields, but received: ${P}.`)}if(!v.args){const P=I(v);throw new Error(`Introspection result missing field args: ${P}.`)}return{description:v.description,deprecationReason:v.deprecationReason,type:b,args:x(v.args)}}function x(v){return lt(v,b=>b.name,R)}function R(v){const b=u(v.type);if(!Le(b)){const W=I(b);throw new Error(`Introspection must provide input type for arguments, but received: ${W}.`)}const P=v.defaultValue!=null?Xe(Ys(v.defaultValue),b):void 0;return{description:v.description,type:b,defaultValue:P,deprecationReason:v.deprecationReason}}function M(v){if(!v.args){const b=I(v);throw new Error(`Introspection result missing directive args: ${b}.`)}if(!v.locations){const b=I(v);throw new Error(`Introspection result missing directive locations: ${b}.`)}return new nt({name:v.name,description:v.description,isRepeatable:v.isRepeatable,locations:v.locations.slice(),args:x(v.args)})}}function Ml(e,t,n){fi(e),t!=null&&t.kind===l.DOCUMENT||Z(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&dl(t,e);const r=e.toConfig(),i=ua(r,t,n);return r===i?e:new Qt(i)}function ua(e,t,n){var r,i,s,o;const a=[],u=Object.create(null),c=[];let f;const d=[];for(const p of t.definitions)if(p.kind===l.SCHEMA_DEFINITION)f=p;else if(p.kind===l.SCHEMA_EXTENSION)d.push(p);else if(Yt(p))a.push(p);else if(ur(p)){const S=p.name.value,O=u[S];u[S]=O?O.concat([p]):[p]}else p.kind===l.DIRECTIVE_DEFINITION&&c.push(p);if(Object.keys(u).length===0&&a.length===0&&c.length===0&&d.length===0&&f==null)return e;const h=Object.create(null);for(const p of e.types)h[p.name]=X(p);for(const p of a){var y;const S=p.name.value;h[S]=(y=Ki[S])!==null&&y!==void 0?y:L(p)}const E={query:e.query&&V(e.query),mutation:e.mutation&&V(e.mutation),subscription:e.subscription&&V(e.subscription),...f&&P([f]),...P(d)};return{description:(r=f)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value,...E,types:Object.values(h),directives:[...e.directives.map(B),...c.map(m)],extensions:Object.create(null),astNode:(s=f)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(d),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1};function $(p){return ce(p)?new we($(p.ofType)):H(p)?new K($(p.ofType)):V(p)}function V(p){return h[p.name]}function B(p){const S=p.toConfig();return new nt({...S,args:rt(S.args,b)})}function X(p){if(wt(p)||ir(p))return p;if(Ve(p))return C(p);if(te(p))return x(p);if(re(p))return R(p);if(Ne(p))return M(p);if(ge(p))return Q(p);if(le(p))return z(p);me(!1,"Unexpected type: "+I(p))}function z(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];return new Mt({...O,fields:()=>({...rt(O.fields,F=>({...F,type:$(F.type)})),...g(k)}),extensionASTNodes:O.extensionASTNodes.concat(k)})}function Q(p){var S;const O=p.toConfig(),k=(S=u[p.name])!==null&&S!==void 0?S:[];return new pt({...O,values:{...O.values,...w(k)},extensionASTNodes:O.extensionASTNodes.concat(k)})}function C(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];let F=O.specifiedByURL;for(const J of k){var Y;F=(Y=Zi(J))!==null&&Y!==void 0?Y:F}return new tt({...O,specifiedByURL:F,extensionASTNodes:O.extensionASTNodes.concat(k)})}function x(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];return new Pe({...O,interfaces:()=>[...p.getInterfaces().map(V),...T(k)],fields:()=>({...rt(O.fields,v),...A(k)}),extensionASTNodes:O.extensionASTNodes.concat(k)})}function R(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];return new $t({...O,interfaces:()=>[...p.getInterfaces().map(V),...T(k)],fields:()=>({...rt(O.fields,v),...A(k)}),extensionASTNodes:O.extensionASTNodes.concat(k)})}function M(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];return new Ct({...O,types:()=>[...p.getTypes().map(V),...D(k)],extensionASTNodes:O.extensionASTNodes.concat(k)})}function v(p){return{...p,type:$(p.type),args:p.args&&rt(p.args,b)}}function b(p){return{...p,type:$(p.type)}}function P(p){const S={};for(const k of p){var O;const F=(O=k.operationTypes)!==null&&O!==void 0?O:[];for(const Y of F)S[Y.operation]=W(Y.type)}return S}function W(p){var S;const O=p.name.value,k=(S=Ki[O])!==null&&S!==void 0?S:h[O];if(k===void 0)throw new Error(`Unknown type: "${O}".`);return k}function oe(p){return p.kind===l.LIST_TYPE?new we(oe(p.type)):p.kind===l.NON_NULL_TYPE?new K(oe(p.type)):W(p)}function m(p){var S;return new nt({name:p.name.value,description:(S=p.description)===null||S===void 0?void 0:S.value,locations:p.locations.map(({value:O})=>O),isRepeatable:p.repeatable,args:q(p.arguments),astNode:p})}function A(p){const S=Object.create(null);for(const F of p){var O;const Y=(O=F.fields)!==null&&O!==void 0?O:[];for(const J of Y){var k;S[J.name.value]={type:oe(J.type),description:(k=J.description)===null||k===void 0?void 0:k.value,args:q(J.arguments),deprecationReason:Sn(J),astNode:J}}}return S}function q(p){const S=p??[],O=Object.create(null);for(const F of S){var k;const Y=oe(F.type);O[F.name.value]={type:Y,description:(k=F.description)===null||k===void 0?void 0:k.value,defaultValue:Xe(F.defaultValue,Y),deprecationReason:Sn(F),astNode:F}}return O}function g(p){const S=Object.create(null);for(const F of p){var O;const Y=(O=F.fields)!==null&&O!==void 0?O:[];for(const J of Y){var k;const ne=oe(J.type);S[J.name.value]={type:ne,description:(k=J.description)===null||k===void 0?void 0:k.value,defaultValue:Xe(J.defaultValue,ne),deprecationReason:Sn(J),astNode:J}}}return S}function w(p){const S=Object.create(null);for(const F of p){var O;const Y=(O=F.values)!==null&&O!==void 0?O:[];for(const J of Y){var k;S[J.name.value]={description:(k=J.description)===null||k===void 0?void 0:k.value,deprecationReason:Sn(J),astNode:J}}}return S}function T(p){return p.flatMap(S=>{var O,k;return(O=(k=S.interfaces)===null||k===void 0?void 0:k.map(W))!==null&&O!==void 0?O:[]})}function D(p){return p.flatMap(S=>{var O,k;return(O=(k=S.types)===null||k===void 0?void 0:k.map(W))!==null&&O!==void 0?O:[]})}function L(p){var S;const O=p.name.value,k=(S=u[O])!==null&&S!==void 0?S:[];switch(p.kind){case l.OBJECT_TYPE_DEFINITION:{var F;const fe=[p,...k];return new Pe({name:O,description:(F=p.description)===null||F===void 0?void 0:F.value,interfaces:()=>T(fe),fields:()=>A(fe),astNode:p,extensionASTNodes:k})}case l.INTERFACE_TYPE_DEFINITION:{var Y;const fe=[p,...k];return new $t({name:O,description:(Y=p.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>T(fe),fields:()=>A(fe),astNode:p,extensionASTNodes:k})}case l.ENUM_TYPE_DEFINITION:{var J;const fe=[p,...k];return new pt({name:O,description:(J=p.description)===null||J===void 0?void 0:J.value,values:w(fe),astNode:p,extensionASTNodes:k})}case l.UNION_TYPE_DEFINITION:{var ne;const fe=[p,...k];return new Ct({name:O,description:(ne=p.description)===null||ne===void 0?void 0:ne.value,types:()=>D(fe),astNode:p,extensionASTNodes:k})}case l.SCALAR_TYPE_DEFINITION:{var ye;return new tt({name:O,description:(ye=p.description)===null||ye===void 0?void 0:ye.value,specifiedByURL:Zi(p),astNode:p,extensionASTNodes:k})}case l.INPUT_OBJECT_TYPE_DEFINITION:{var ae;const fe=[p,...k];return new Mt({name:O,description:(ae=p.description)===null||ae===void 0?void 0:ae.value,fields:()=>g(fe),astNode:p,extensionASTNodes:k})}}}}const Ki=st([...gn,..._n],e=>e.name);function Sn(e){const t=fn(or,e);return t==null?void 0:t.reason}function Zi(e){const t=fn(ri,e);return t==null?void 0:t.url}function ca(e,t){e!=null&&e.kind===l.DOCUMENT||Z(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&fl(e);const r=ua({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(const 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}const i=[...r.directives,...yt.filter(s=>r.directives.every(o=>o.name!==s.name))];return new Qt({...r,directives:i})}function Vl(e,t){const n=tr(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return ca(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}function Ul(e){const t=e.toConfig(),n=lt(gr(t.types),h=>h.name,d);return new Qt({...t,types:Object.values(n),directives:gr(t.directives).map(o),query:s(t.query),mutation:s(t.mutation),subscription:s(t.subscription)});function r(h){return ce(h)?new we(r(h.ofType)):H(h)?new K(r(h.ofType)):i(h)}function i(h){return n[h.name]}function s(h){return h&&i(h)}function o(h){const y=h.toConfig();return new nt({...y,locations:la(y.locations,E=>E),args:a(y.args)})}function a(h){return Rn(h,y=>({...y,type:r(y.type)}))}function u(h){return Rn(h,y=>({...y,type:r(y.type),args:y.args&&a(y.args)}))}function c(h){return Rn(h,y=>({...y,type:r(y.type)}))}function f(h){return gr(h).map(i)}function d(h){if(Ve(h)||wt(h))return h;if(te(h)){const y=h.toConfig();return new Pe({...y,interfaces:()=>f(y.interfaces),fields:()=>u(y.fields)})}if(re(h)){const y=h.toConfig();return new $t({...y,interfaces:()=>f(y.interfaces),fields:()=>u(y.fields)})}if(Ne(h)){const y=h.toConfig();return new Ct({...y,types:()=>f(y.types)})}if(ge(h)){const y=h.toConfig();return new pt({...y,values:Rn(y.values,E=>E)})}if(le(h)){const y=h.toConfig();return new Mt({...y,fields:()=>c(y.fields)})}me(!1,"Unexpected type: "+I(h))}}function Rn(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(mn))n[r]=t(e[r]);return n}function gr(e){return la(e,t=>t.name)}function la(e,t){return e.slice().sort((n,r)=>{const i=t(n),s=t(r);return mn(i,s)})}function Pl(e){return fa(e,t=>!ii(t),Bl)}function jl(e){return fa(e,ii,wt)}function Bl(e){return!ir(e)&&!wt(e)}function fa(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[ql(e),...r.map(s=>Wl(s)),...i.map(s=>da(s))].filter(Boolean).join(`
148
148
 
149
- `)}function ql(e){if(e.description==null&&Gl(e))return;const t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);const r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);const i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),Ge(e)+`schema {
149
+ `)}function ql(e){if(e.description==null&&Gl(e))return;const t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);const r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);const i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),je(e)+`schema {
150
150
  ${t.join(`
151
151
  `)}
152
- }`}function Gl(e){const t=e.getQueryType();if(t&&t.name!=="Query")return!1;const n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;const r=e.getSubscriptionType();return!(r&&r.name!=="Subscription")}function la(e){if(Pe(e))return Ql(e);if(te(e))return Yl(e);if(re(e))return zl(e);if(Ne(e))return Jl(e);if(ge(e))return Hl(e);if(de(e))return Xl(e);ye(!1,"Unexpected type: "+I(e))}function Ql(e){return Ge(e)+`scalar ${e.name}`+Kl(e)}function fa(e){const t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function Yl(e){return Ge(e)+`type ${e.name}`+fa(e)+da(e)}function zl(e){return Ge(e)+`interface ${e.name}`+fa(e)+da(e)}function Jl(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return Ge(e)+"union "+e.name+n}function Hl(e){const t=e.getValues().map((n,r)=>Ge(n," ",!r)+" "+n.name+Ai(n.deprecationReason));return Ge(e)+`enum ${e.name}`+Di(t)}function Xl(e){const t=Object.values(e.getFields()).map((n,r)=>Ge(n," ",!r)+" "+$r(n));return Ge(e)+`input ${e.name}`+Di(t)}function da(e){const t=Object.values(e.getFields()).map((n,r)=>Ge(n," ",!r)+" "+n.name+pa(n.args," ")+": "+String(n.type)+Ai(n.deprecationReason));return Di(t)}function Di(e){return e.length!==0?` {
152
+ }`}function Gl(e){const t=e.getQueryType();if(t&&t.name!=="Query")return!1;const n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;const r=e.getSubscriptionType();return!(r&&r.name!=="Subscription")}function da(e){if(Ve(e))return Ql(e);if(te(e))return Yl(e);if(re(e))return Jl(e);if(Ne(e))return Hl(e);if(ge(e))return zl(e);if(le(e))return Xl(e);me(!1,"Unexpected type: "+I(e))}function Ql(e){return je(e)+`scalar ${e.name}`+Kl(e)}function pa(e){const t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function Yl(e){return je(e)+`type ${e.name}`+pa(e)+ha(e)}function Jl(e){return je(e)+`interface ${e.name}`+pa(e)+ha(e)}function Hl(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return je(e)+"union "+e.name+n}function zl(e){const t=e.getValues().map((n,r)=>je(n," ",!r)+" "+n.name+Si(n.deprecationReason));return je(e)+`enum ${e.name}`+Di(t)}function Xl(e){const t=Object.values(e.getFields()).map((n,r)=>je(n," ",!r)+" "+Cr(n));return je(e)+`input ${e.name}`+Di(t)}function ha(e){const t=Object.values(e.getFields()).map((n,r)=>je(n," ",!r)+" "+n.name+ma(n.args," ")+": "+String(n.type)+Si(n.deprecationReason));return Di(t)}function Di(e){return e.length!==0?` {
153
153
  `+e.join(`
154
154
  `)+`
155
- }`:""}function pa(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map($r).join(", ")+")":`(
156
- `+e.map((n,r)=>Ge(n," "+t,!r)+" "+t+$r(n)).join(`
155
+ }`:""}function ma(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(Cr).join(", ")+")":`(
156
+ `+e.map((n,r)=>je(n," "+t,!r)+" "+t+Cr(n)).join(`
157
157
  `)+`
158
- `+t+")"}function $r(e){const t=dt(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${le(t)}`),n+Ai(e.deprecationReason)}function Wl(e){return Ge(e)+"directive @"+e.name+pa(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Ai(e){return e==null?"":e!==ti?` @deprecated(reason: ${le({kind:l.STRING,value:e})})`:" @deprecated"}function Kl(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${le({kind:l.STRING,value:e.specifiedByURL})})`}function Ge(e,t="",n=!0){const{description:r}=e;if(r==null)return"";const i=le({kind:l.STRING,value:r,block:$u(r)});return(t&&!n?`
158
+ `+t+")"}function Cr(e){const t=ft(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${ue(t)}`),n+Si(e.deprecationReason)}function Wl(e){return je(e)+"directive @"+e.name+ma(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Si(e){return e==null?"":e!==ni?` @deprecated(reason: ${ue({kind:l.STRING,value:e})})`:" @deprecated"}function Kl(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${ue({kind:l.STRING,value:e.specifiedByURL})})`}function je(e,t="",n=!0){const{description:r}=e;if(r==null)return"";const i=ue({kind:l.STRING,value:r,block:$u(r)});return(t&&!n?`
159
159
  `+t:t)+i.replace(/\n/g,`
160
160
  `+t)+`
161
- `}function Zl(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:l.DOCUMENT,definitions:t}}function ef(e){const t=[],n=Object.create(null);for(const i of e.definitions)switch(i.kind){case l.OPERATION_DEFINITION:t.push(i);break;case l.FRAGMENT_DEFINITION:n[i.name.value]=es(i.selectionSet);break}const r=Object.create(null);for(const i of t){const s=new Set;for(const a of es(i.selectionSet))ha(s,n,a);const o=i.name?i.name.value:"";r[o]={kind:l.DOCUMENT,definitions:e.definitions.filter(a=>a===i||a.kind===l.FRAGMENT_DEFINITION&&s.has(a.name.value))}}return r}function ha(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(r!==void 0)for(const i of r)ha(e,t,i)}}function es(e){const t=[];return Qt(e,{FragmentSpread(n){t.push(n.name.value)}}),t}function tf(e){const t=qs(e)?e:new tr(e),n=t.body,r=new Yr(t);let i="",s=!1;for(;r.advance().kind!==N.EOF;){const o=r.token,a=o.kind,u=!Vs(o.kind);s&&(u||o.kind===N.SPREAD)&&(i+=" ");const c=n.slice(o.start,o.end);a===N.BLOCK_STRING?i+=js(o.value,{minimize:!0}):i+=c,s=u}return i}function nf(e){const t=ma(e);if(t)throw t;return e}function ma(e){if(typeof e=="string"||K(!1,"Expected name to be a string."),e.startsWith("__"))return new _(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{Ue(e)}catch(t){return t}}var he;(function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(he||(he={}));var He;(function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(He||(He={}));function rf(e,t){return ya(e,t).filter(n=>n.type in he)}function sf(e,t){return ya(e,t).filter(n=>n.type in He)}function ya(e,t){return[...af(e,t),...of(e,t)]}function of(e,t){const n=[],r=ut(e.getDirectives(),t.getDirectives());for(const i of r.removed)n.push({type:he.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(const[i,s]of r.persisted){const o=ut(i.args,s.args);for(const a of o.added)yt(a)&&n.push({type:he.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${a.name} on directive ${i.name} was added.`});for(const a of o.removed)n.push({type:he.DIRECTIVE_ARG_REMOVED,description:`${a.name} was removed from ${i.name}.`});i.isRepeatable&&!s.isRepeatable&&n.push({type:he.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(const a of i.locations)s.locations.includes(a)||n.push({type:he.DIRECTIVE_LOCATION_REMOVED,description:`${a} was removed from ${i.name}.`})}return n}function af(e,t){const n=[],r=ut(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const i of r.removed)n.push({type:he.TYPE_REMOVED,description:sr(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(const[i,s]of r.persisted)ge(i)&&ge(s)?n.push(...lf(i,s)):Ne(i)&&Ne(s)?n.push(...cf(i,s)):de(i)&&de(s)?n.push(...uf(i,s)):te(i)&&te(s)?n.push(...ns(i,s),...ts(i,s)):re(i)&&re(s)?n.push(...ns(i,s),...ts(i,s)):i.constructor!==s.constructor&&n.push({type:he.TYPE_CHANGED_KIND,description:`${i.name} changed from ${rs(i)} to ${rs(s)}.`});return n}function uf(e,t){const n=[],r=ut(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.added)ir(i)?n.push({type:he.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:He.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(const i of r.removed)n.push({type:he.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,s]of r.persisted)rn(i.type,s.type)||n.push({type:he.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(s.type)}.`});return n}function cf(e,t){const n=[],r=ut(e.getTypes(),t.getTypes());for(const i of r.added)n.push({type:He.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(const i of r.removed)n.push({type:he.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function lf(e,t){const n=[],r=ut(e.getValues(),t.getValues());for(const i of r.added)n.push({type:He.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(const i of r.removed)n.push({type:he.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function ts(e,t){const n=[],r=ut(e.getInterfaces(),t.getInterfaces());for(const i of r.added)n.push({type:He.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(const i of r.removed)n.push({type:he.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function ns(e,t){const n=[],r=ut(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.removed)n.push({type:he.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,s]of r.persisted)n.push(...ff(e,i,s)),en(i.type,s.type)||n.push({type:he.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(s.type)}.`});return n}function ff(e,t,n){const r=[],i=ut(t.args,n.args);for(const s of i.removed)r.push({type:he.ARG_REMOVED,description:`${e.name}.${t.name} arg ${s.name} was removed.`});for(const[s,o]of i.persisted)if(!rn(s.type,o.type))r.push({type:he.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${s.name} has changed type from ${String(s.type)} to ${String(o.type)}.`});else if(s.defaultValue!==void 0)if(o.defaultValue===void 0)r.push({type:He.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${s.name} defaultValue was removed.`});else{const u=is(s.defaultValue,s.type),c=is(o.defaultValue,o.type);u!==c&&r.push({type:He.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${s.name} has changed defaultValue from ${u} to ${c}.`})}for(const s of i.added)yt(s)?r.push({type:he.REQUIRED_ARG_ADDED,description:`A required arg ${s.name} on ${e.name}.${t.name} was added.`}):r.push({type:He.OPTIONAL_ARG_ADDED,description:`An optional arg ${s.name} on ${e.name}.${t.name} was added.`});return r}function en(e,t){return fe(e)?fe(t)&&en(e.ofType,t.ofType)||X(t)&&en(e,t.ofType):X(e)?X(t)&&en(e.ofType,t.ofType):En(t)&&e.name===t.name||X(t)&&en(e,t.ofType)}function rn(e,t){return fe(e)?fe(t)&&rn(e.ofType,t.ofType):X(e)?X(t)&&rn(e.ofType,t.ofType)||!X(t)&&rn(e.ofType,t):En(t)&&e.name===t.name}function rs(e){if(Pe(e))return"a Scalar type";if(te(e))return"an Object type";if(re(e))return"an Interface type";if(Ne(e))return"a Union type";if(ge(e))return"an Enum type";if(de(e))return"an Input type";ye(!1,"Unexpected type: "+I(e))}function is(e,t){const n=dt(e,t);return n!=null||ye(!1),le(lr(n))}function ut(e,t){const n=[],r=[],i=[],s=at(e,({name:a})=>a),o=at(t,({name:a})=>a);for(const a of e){const u=o[a.name];u===void 0?r.push(a):i.push([a,u])}for(const a of t)s[a.name]===void 0&&n.push(a);return{added:n,persisted:i,removed:r}}const df=Object.freeze(Object.defineProperty({__proto__:null,BREAK:Rt,get BreakingChangeType(){return he},DEFAULT_DEPRECATION_REASON:ti,get DangerousChangeType(){return He},get DirectiveLocation(){return G},ExecutableDefinitionsRule:so,FieldsOnCorrectTypeRule:oo,FragmentsOnCompositeTypesRule:ao,GRAPHQL_MAX_INT:xn,GRAPHQL_MIN_INT:$n,GraphQLBoolean:Me,GraphQLDeprecatedDirective:ar,GraphQLDirective:it,GraphQLEnumType:ht,GraphQLError:_,GraphQLFloat:no,GraphQLID:Kr,GraphQLIncludeDirective:Zr,GraphQLInputObjectType:jt,GraphQLInt:to,GraphQLInterfaceType:Ct,GraphQLList:we,GraphQLNonNull:W,GraphQLObjectType:qe,GraphQLScalarType:rt,GraphQLSchema:Yt,GraphQLSkipDirective:ei,GraphQLSpecifiedByDirective:ni,GraphQLString:me,GraphQLUnionType:Mt,get Kind(){return l},KnownArgumentNamesRule:uo,KnownDirectivesRule:gi,KnownFragmentNamesRule:lo,KnownTypeNamesRule:Ti,Lexer:Yr,Location:xs,LoneAnonymousOperationRule:fo,LoneSchemaDefinitionRule:po,NoDeprecatedCustomRule:Ll,NoFragmentCyclesRule:ho,NoSchemaIntrospectionCustomRule:Fl,NoUndefinedVariablesRule:mo,NoUnusedFragmentsRule:yo,NoUnusedVariablesRule:vo,get OperationTypeNode(){return be},OverlappingFieldsCanBeMergedRule:go,PossibleFragmentSpreadsRule:_o,PossibleTypeExtensionsRule:No,ProvidedRequiredArgumentsRule:Io,ScalarLeafsRule:Oo,SchemaMetaFieldDef:un,SingleFieldSubscriptionsRule:Lo,Source:tr,Token:Gr,get TokenKind(){return N},TypeInfo:hi,get TypeKind(){return oe},TypeMetaFieldDef:cn,TypeNameMetaFieldDef:ln,UniqueArgumentDefinitionNamesRule:Fo,UniqueArgumentNamesRule:Ii,UniqueDirectiveNamesRule:ko,UniqueDirectivesPerLocationRule:wi,UniqueEnumValueNamesRule:xo,UniqueFieldDefinitionNamesRule:$o,UniqueFragmentNamesRule:Co,UniqueInputFieldNamesRule:Oi,UniqueOperationNamesRule:Mo,UniqueOperationTypesRule:jo,UniqueTypeNamesRule:Vo,UniqueVariableNamesRule:Uo,ValidationContext:Yo,ValuesOfCorrectTypeRule:Po,VariablesAreInputTypesRule:Bo,VariablesInAllowedPositionRule:qo,__Directive:si,__DirectiveLocation:oi,__EnumValue:ui,__Field:ai,__InputValue:bn,__Schema:ur,__Type:Be,__TypeKind:ci,assertAbstractType:Tc,assertCompositeType:gc,assertDirective:Oc,assertEnumType:dc,assertEnumValueName:Ys,assertInputObjectType:pc,assertInputType:yc,assertInterfaceType:Js,assertLeafType:Ec,assertListType:hc,assertName:Ue,assertNamedType:_c,assertNonNullType:mc,assertNullableType:Hs,assertObjectType:zs,assertOutputType:vc,assertScalarType:lc,assertSchema:li,assertType:cc,assertUnionType:fc,assertValidName:nf,assertValidSchema:di,assertWrappingType:bc,astFromValue:dt,buildASTSchema:aa,buildClientSchema:Cl,buildSchema:jl,coerceInputValue:Ao,concatAST:Zl,createSourceEventStream:ia,defaultFieldResolver:xr,defaultTypeResolver:ea,doTypesOverlap:Sr,execute:dr,executeSync:Ho,extendSchema:Ml,findBreakingChanges:rf,findDangerousChanges:sf,formatError:Lu,getArgumentValues:fr,getDirectiveValues:fn,getEnterLeaveForKind:$t,getIntrospectionQuery:sa,getLocation:Un,getNamedType:Re,getNullableType:Hr,getOperationAST:kl,getOperationRootType:xl,getVariableValues:So,getVisitFn:oc,graphql:wl,graphqlSync:Ol,introspectionFromSchema:$l,introspectionTypes:_n,isAbstractType:Ze,isCompositeType:nt,isConstValueNode:Rr,isDefinitionNode:jc,isDirective:or,isEnumType:ge,isEqualType:Bn,isExecutableDefinitionNode:yi,isInputObjectType:de,isInputType:ke,isInterfaceType:re,isIntrospectionType:Ot,isLeafType:tt,isListType:fe,isNamedType:En,isNonNullType:X,isNullableType:Jr,isObjectType:te,isOutputType:pt,isRequiredArgument:yt,isRequiredInputField:ir,isScalarType:Pe,isSchema:ro,isSelectionNode:Vc,isSpecifiedDirective:ri,isSpecifiedScalarType:sr,isType:yn,isTypeDefinitionNode:zt,isTypeExtensionNode:cr,isTypeNode:Uc,isTypeSubTypeOf:Tt,isTypeSystemDefinitionNode:vi,isTypeSystemExtensionNode:Ei,isUnionType:Ne,isValidNameError:ma,isValueNode:io,isWrappingType:vn,lexicographicSortSchema:Vl,locatedError:Ut,parse:nr,parseConstValue:Wu,parseType:Ku,parseValue:Gs,print:le,printError:Ru,printIntrospectionSchema:Pl,printLocation:ks,printSchema:Ul,printSourceLocation:qr,printType:la,resolveObjMapThunk:Wr,resolveReadonlyArrayThunk:Xr,responsePathAsArray:$e,separateOperations:ef,specifiedDirectives:vt,specifiedRules:Go,specifiedScalarTypes:gn,stripIgnoredCharacters:tf,subscribe:Al,syntaxError:Te,typeFromAST:xe,validate:zo,validateSchema:fi,valueFromAST:Ke,valueFromASTUntyped:Pn,version:Ou,versionInfo:Du,visit:Qt,visitInParallel:zr,visitWithTypeInfo:mi},Symbol.toStringTag,{value:"Module"})),pf=za(df);Object.defineProperty(xt,"__esModule",{value:!0});xt.resolveRequestDocument=void 0;var ss=pf;function os(e){var t,n=void 0,r=e.definitions.filter(function(i){return i.kind==="OperationDefinition"});return r.length===1&&(n=(t=r[0].name)===null||t===void 0?void 0:t.value),n}function hf(e){if(typeof e=="string"){var t=void 0;try{var n=(0,ss.parse)(e);t=os(n)}catch{}return{query:e,operationName:t}}var r=os(e);return{query:(0,ss.print)(e),operationName:r}}xt.resolveRequestDocument=hf;var Wt={},as;function mf(){if(as)return Wt;as=1;var e=se&&se.__assign||function(){return e=Object.assign||function(U){for(var F,D=1,Q=arguments.length;D<Q;D++){F=arguments[D];for(var g in F)Object.prototype.hasOwnProperty.call(F,g)&&(U[g]=F[g])}return U},e.apply(this,arguments)},t=se&&se.__awaiter||function(U,F,D,Q){function g(v){return v instanceof D?v:new D(function(C){C(v)})}return new(D||(D=Promise))(function(v,C){function H(A){try{m(Q.next(A))}catch(q){C(q)}}function ie(A){try{m(Q.throw(A))}catch(q){C(q)}}function m(A){A.done?v(A.value):g(A.value).then(H,ie)}m((Q=Q.apply(U,F||[])).next())})},n=se&&se.__generator||function(U,F){var D={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},Q,g,v,C;return C={next:H(0),throw:H(1),return:H(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function H(m){return function(A){return ie([m,A])}}function ie(m){if(Q)throw new TypeError("Generator is already executing.");for(;D;)try{if(Q=1,g&&(v=m[0]&2?g.return:m[0]?g.throw||((v=g.return)&&v.call(g),0):g.next)&&!(v=v.call(g,m[1])).done)return v;switch(g=0,v&&(m=[m[0]&2,v.value]),m[0]){case 0:case 1:v=m;break;case 4:return D.label++,{value:m[1],done:!1};case 5:D.label++,g=m[1],m=[0];continue;case 7:m=D.ops.pop(),D.trys.pop();continue;default:if(v=D.trys,!(v=v.length>0&&v[v.length-1])&&(m[0]===6||m[0]===2)){D=0;continue}if(m[0]===3&&(!v||m[1]>v[0]&&m[1]<v[3])){D.label=m[1];break}if(m[0]===6&&D.label<v[1]){D.label=v[1],v=m;break}if(v&&D.label<v[2]){D.label=v[2],D.ops.push(m);break}v[2]&&D.ops.pop(),D.trys.pop();continue}m=F.call(U,D)}catch(A){m=[6,A],g=0}finally{Q=v=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.GraphQLWebSocketClient=void 0;var r=hn,i=xt,s="connection_init",o="connection_ack",a="ping",u="pong",c="subscribe",f="next",d="error",p="complete",y=function(){function U(F,D,Q){this._type=F,this._payload=D,this._id=Q}return Object.defineProperty(U.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"text",{get:function(){var F={type:this.type};return this.id!=null&&this.id!=null&&(F.id=this.id),this.payload!=null&&this.payload!=null&&(F.payload=this.payload),JSON.stringify(F)},enumerable:!1,configurable:!0}),U.parse=function(F,D){var Q=JSON.parse(F),g=Q.type,v=Q.payload,C=Q.id;return new U(g,D(v),C)},U}(),E=function(){function U(F,D){var Q=D.onInit,g=D.onAcknowledged,v=D.onPing,C=D.onPong,H=this;this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=F,F.onopen=function(ie){return t(H,void 0,void 0,function(){var m,A,q,T;return n(this,function(w){switch(w.label){case 0:return this.socketState.acknowledged=!1,this.socketState.subscriptions={},A=(m=F).send,q=M,Q?[4,Q()]:[3,2];case 1:return T=w.sent(),[3,3];case 2:T=null,w.label=3;case 3:return A.apply(m,[q.apply(void 0,[T]).text]),[2]}})})},F.onclose=function(ie){H.socketState.acknowledged=!1,H.socketState.subscriptions={}},F.onerror=function(ie){console.error(ie)},F.onmessage=function(ie){try{var m=$(ie.data);switch(m.type){case o:{H.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(H.socketState.acknowledged=!0,g&&g(m.payload));return}case a:{v?v(m.payload).then(function(b){return F.send(Z(b).text)}):F.send(Z(null).text);return}case u:{C&&C(m.payload);return}}if(!H.socketState.acknowledged||m.id===void 0||m.id===null||!H.socketState.subscriptions[m.id])return;var A=H.socketState.subscriptions[m.id],q=A.query,T=A.variables,w=A.subscriber;switch(m.type){case f:{!m.payload.errors&&m.payload.data&&w.next&&w.next(m.payload.data),m.payload.errors&&w.error&&w.error(new r.ClientError(e(e({},m.payload),{status:200}),{query:q,variables:T}));return}case d:{w.error&&w.error(new r.ClientError({errors:m.payload,status:200},{query:q,variables:T}));return}case p:{w.complete&&w.complete(),delete H.socketState.subscriptions[m.id];return}}}catch(b){console.error(b),F.close(1006)}F.close(4400,"Unknown graphql-ws message.")}}return U.prototype.makeSubscribe=function(F,D,Q,g){var v=this,C=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[C]={query:F,variables:g,subscriber:Q},this.socket.send(J(C,{query:F,operationName:D,variables:g}).text),function(){v.socket.send(B(C).text),delete v.socketState.subscriptions[C]}},U.prototype.rawRequest=function(F,D){var Q=this;return new Promise(function(g,v){var C;Q.rawSubscribe(F,{next:function(H,ie){return C={data:H,extensions:ie}},error:v,complete:function(){return g(C)}},D)})},U.prototype.request=function(F,D){var Q=this;return new Promise(function(g,v){var C;Q.subscribe(F,{next:function(H){return C=H},error:v,complete:function(){return g(C)}},D)})},U.prototype.subscribe=function(F,D,Q){var g=(0,i.resolveRequestDocument)(F),v=g.query,C=g.operationName;return this.makeSubscribe(v,C,D,Q)},U.prototype.rawSubscribe=function(F,D,Q){return this.makeSubscribe(F,void 0,D,Q)},U.prototype.ping=function(F){this.socket.send(P(F).text)},U.prototype.close=function(){this.socket.close(1e3)},U.PROTOCOL="graphql-transport-ws",U}();Wt.GraphQLWebSocketClient=E;function $(U,F){F===void 0&&(F=function(Q){return Q});var D=y.parse(U,F);return D}function M(U){return new y(s,U)}function P(U){return new y(a,U,void 0)}function Z(U){return new y(u,U,void 0)}function J(U,F){return new y(c,F,U)}function B(U){return new y(p,void 0,U)}return Wt}(function(e){var t=se&&se.__assign||function(){return t=Object.assign||function(T){for(var w,b=1,S=arguments.length;b<S;b++){w=arguments[b];for(var L in w)Object.prototype.hasOwnProperty.call(w,L)&&(T[L]=w[L])}return T},t.apply(this,arguments)},n=se&&se.__createBinding||(Object.create?function(T,w,b,S){S===void 0&&(S=b);var L=Object.getOwnPropertyDescriptor(w,b);(!L||("get"in L?!w.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return w[b]}}),Object.defineProperty(T,S,L)}:function(T,w,b,S){S===void 0&&(S=b),T[S]=w[b]}),r=se&&se.__setModuleDefault||(Object.create?function(T,w){Object.defineProperty(T,"default",{enumerable:!0,value:w})}:function(T,w){T.default=w}),i=se&&se.__importStar||function(T){if(T&&T.__esModule)return T;var w={};if(T!=null)for(var b in T)b!=="default"&&Object.prototype.hasOwnProperty.call(T,b)&&n(w,T,b);return r(w,T),w},s=se&&se.__awaiter||function(T,w,b,S){function L(h){return h instanceof b?h:new b(function(R){R(h)})}return new(b||(b=Promise))(function(h,R){function O(Y){try{x(S.next(Y))}catch(z){R(z)}}function k(Y){try{x(S.throw(Y))}catch(z){R(z)}}function x(Y){Y.done?h(Y.value):L(Y.value).then(O,k)}x((S=S.apply(T,w||[])).next())})},o=se&&se.__generator||function(T,w){var b={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},S,L,h,R;return R={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(R[Symbol.iterator]=function(){return this}),R;function O(x){return function(Y){return k([x,Y])}}function k(x){if(S)throw new TypeError("Generator is already executing.");for(;b;)try{if(S=1,L&&(h=x[0]&2?L.return:x[0]?L.throw||((h=L.return)&&h.call(L),0):L.next)&&!(h=h.call(L,x[1])).done)return h;switch(L=0,h&&(x=[x[0]&2,h.value]),x[0]){case 0:case 1:h=x;break;case 4:return b.label++,{value:x[1],done:!1};case 5:b.label++,L=x[1],x=[0];continue;case 7:x=b.ops.pop(),b.trys.pop();continue;default:if(h=b.trys,!(h=h.length>0&&h[h.length-1])&&(x[0]===6||x[0]===2)){b=0;continue}if(x[0]===3&&(!h||x[1]>h[0]&&x[1]<h[3])){b.label=x[1];break}if(x[0]===6&&b.label<h[1]){b.label=h[1],h=x;break}if(h&&b.label<h[2]){b.label=h[2],b.ops.push(x);break}h[2]&&b.ops.pop(),b.trys.pop();continue}x=w.call(T,b)}catch(Y){x=[6,Y],L=0}finally{S=h=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}},a=se&&se.__rest||function(T,w){var b={};for(var S in T)Object.prototype.hasOwnProperty.call(T,S)&&w.indexOf(S)<0&&(b[S]=T[S]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,S=Object.getOwnPropertySymbols(T);L<S.length;L++)w.indexOf(S[L])<0&&Object.prototype.propertyIsEnumerable.call(T,S[L])&&(b[S[L]]=T[S[L]]);return b},u=se&&se.__spreadArray||function(T,w,b){if(b||arguments.length===2)for(var S=0,L=w.length,h;S<L;S++)(h||!(S in w))&&(h||(h=Array.prototype.slice.call(w,0,S)),h[S]=w[S]);return T.concat(h||Array.prototype.slice.call(w))},c=se&&se.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveRequestDocument=e.GraphQLWebSocketClient=e.gql=e.batchRequests=e.request=e.rawRequest=e.GraphQLClient=e.ClientError=void 0;var f=i(uu),d=f,p=c(Br),y=pn,E=Fe,$=hn;Object.defineProperty(e,"ClientError",{enumerable:!0,get:function(){return $.ClientError}});var M=xt,P=function(T){var w={};return T&&(typeof Headers<"u"&&T instanceof Headers||d&&d.Headers&&T instanceof d.Headers?w=m(T):Array.isArray(T)?T.forEach(function(b){var S=b[0],L=b[1];w[S]=L}):w=T),w},Z=function(T){return T.replace(/([\s,]|#[^\n\r]+)+/g," ").trim()},J=function(T){var w=T.query,b=T.variables,S=T.operationName,L=T.jsonSerializer;if(!Array.isArray(w)){var h=["query=".concat(encodeURIComponent(Z(w)))];return b&&h.push("variables=".concat(encodeURIComponent(L.stringify(b)))),S&&h.push("operationName=".concat(encodeURIComponent(S))),h.join("&")}if(typeof b<"u"&&!Array.isArray(b))throw new Error("Cannot create query with given variable type, array expected");var R=w.reduce(function(O,k,x){return O.push({query:Z(k),variables:b?L.stringify(b[x]):void 0}),O},[]);return"query=".concat(encodeURIComponent(L.stringify(R)))},B=function(T){var w=T.url,b=T.query,S=T.variables,L=T.operationName,h=T.headers,R=T.fetch,O=T.fetchOptions,k=T.middleware;return s(void 0,void 0,void 0,function(){var x,Y,z;return o(this,function(ne){switch(ne.label){case 0:return x=(0,p.default)(b,S,L,O.jsonSerializer),Y=t({method:"POST",headers:t(t({},typeof x=="string"?{"Content-Type":"application/json"}:{}),h),body:x},O),k?[4,Promise.resolve(k(t(t({},Y),{url:w,operationName:L,variables:S})))]:[3,2];case 1:z=ne.sent(),w=z.url,Y=a(z,["url"]),ne.label=2;case 2:return[4,R(w,Y)];case 3:return[2,ne.sent()]}})})},U=function(T){var w=T.url,b=T.query,S=T.variables,L=T.operationName,h=T.headers,R=T.fetch,O=T.fetchOptions,k=T.middleware;return s(void 0,void 0,void 0,function(){var x,Y,z;return o(this,function(ne){switch(ne.label){case 0:return x=J({query:b,variables:S,operationName:L,jsonSerializer:O.jsonSerializer}),Y=t({method:"GET",headers:h},O),k?[4,Promise.resolve(k(t(t({},Y),{url:w,operationName:L,variables:S})))]:[3,2];case 1:z=ne.sent(),w=z.url,Y=a(z,["url"]),ne.label=2;case 2:return[4,R("".concat(w,"?").concat(x),Y)];case 3:return[2,ne.sent()]}})})},F=function(){function T(w,b){b===void 0&&(b={}),this.url=w,this.options=b}return T.prototype.rawRequest=function(w,b,S){return s(this,void 0,void 0,function(){var L,h,R,O,k,x,Y,z,ne,ve,ae,pe;return o(this,function(De){return L=(0,E.parseRawRequestArgs)(w,b,S),h=this.options,R=h.headers,O=h.fetch,k=O===void 0?f.default:O,x=h.method,Y=x===void 0?"POST":x,z=h.requestMiddleware,ne=h.responseMiddleware,ve=a(h,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ae=this.url,L.signal!==void 0&&(ve.signal=L.signal),pe=(0,M.resolveRequestDocument)(L.query).operationName,[2,D({url:ae,query:L.query,variables:L.variables,headers:t(t({},P(H(R))),P(L.requestHeaders)),operationName:pe,fetch:k,method:Y,fetchOptions:ve,middleware:z}).then(function(Ae){return ne&&ne(Ae),Ae}).catch(function(Ae){throw ne&&ne(Ae),Ae})]})})},T.prototype.request=function(w){for(var b=[],S=1;S<arguments.length;S++)b[S-1]=arguments[S];return s(this,void 0,void 0,function(){var L,h,R,O,k,x,Y,z,ne,ve,ae,pe,De,Ae,Jt,Ht;return o(this,function(Nn){return L=b[0],h=b[1],R=(0,E.parseRequestArgs)(w,L,h),O=this.options,k=O.headers,x=O.fetch,Y=x===void 0?f.default:x,z=O.method,ne=z===void 0?"POST":z,ve=O.requestMiddleware,ae=O.responseMiddleware,pe=a(O,["headers","fetch","method","requestMiddleware","responseMiddleware"]),De=this.url,R.signal!==void 0&&(pe.signal=R.signal),Ae=(0,M.resolveRequestDocument)(R.document),Jt=Ae.query,Ht=Ae.operationName,[2,D({url:De,query:Jt,variables:R.variables,headers:t(t({},P(H(k))),P(R.requestHeaders)),operationName:Ht,fetch:Y,method:ne,fetchOptions:pe,middleware:ve}).then(function(ct){return ae&&ae(ct),ct.data}).catch(function(ct){throw ae&&ae(ct),ct})]})})},T.prototype.batchRequests=function(w,b){var S=(0,E.parseBatchRequestArgs)(w,b),L=this.options,h=L.headers,R=L.fetch,O=R===void 0?f.default:R,k=L.method,x=k===void 0?"POST":k,Y=L.requestMiddleware,z=L.responseMiddleware,ne=a(L,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ve=this.url;S.signal!==void 0&&(ne.signal=S.signal);var ae=S.documents.map(function(De){var Ae=De.document;return(0,M.resolveRequestDocument)(Ae).query}),pe=S.documents.map(function(De){var Ae=De.variables;return Ae});return D({url:ve,query:ae,variables:pe,headers:t(t({},P(H(h))),P(S.requestHeaders)),operationName:void 0,fetch:O,method:x,fetchOptions:ne,middleware:Y}).then(function(De){return z&&z(De),De.data}).catch(function(De){throw z&&z(De),De})},T.prototype.setHeaders=function(w){return this.options.headers=w,this},T.prototype.setHeader=function(w,b){var S,L=this.options.headers;return L?L[w]=b:this.options.headers=(S={},S[w]=b,S),this},T.prototype.setEndpoint=function(w){return this.url=w,this},T}();e.GraphQLClient=F;function D(T){var w=T.url,b=T.query,S=T.variables,L=T.headers,h=T.operationName,R=T.fetch,O=T.method,k=O===void 0?"POST":O,x=T.fetchOptions,Y=T.middleware;return s(this,void 0,void 0,function(){var z,ne,ve,ae,pe,De,Ae,Jt,Ht,Nn,ct;return o(this,function(pr){switch(pr.label){case 0:return z=k.toUpperCase()==="POST"?B:U,ne=Array.isArray(b),[4,z({url:w,query:b,variables:S,operationName:h,headers:L,fetch:R,fetchOptions:x,middleware:Y})];case 1:return ve=pr.sent(),[4,C(ve,x.jsonSerializer)];case 2:if(ae=pr.sent(),pe=ne&&Array.isArray(ae)?!ae.some(function(Ea){var ga=Ea.data;return!ga}):!!ae.data,De=!ae.errors||x.errorPolicy==="all"||x.errorPolicy==="ignore",ve.ok&&De&&pe)return Ae=ve.headers,Jt=ve.status,ae.errors,Ht=a(ae,["errors"]),Nn=x.errorPolicy==="ignore"?Ht:ae,[2,t(t({},ne?{data:Nn}:Nn),{headers:Ae,status:Jt})];throw ct=typeof ae=="string"?{error:ae}:ae,new $.ClientError(t(t({},ct),{status:ve.status,headers:ve.headers}),{query:b,variables:S})}})})}function Q(T,w){for(var b=[],S=2;S<arguments.length;S++)b[S-2]=arguments[S];return s(this,void 0,void 0,function(){var L,h;return o(this,function(R){return L=E.parseRawRequestExtendedArgs.apply(void 0,u([T,w],b,!1)),h=new F(L.url),[2,h.rawRequest(t({},L))]})})}e.rawRequest=Q;function g(T,w){for(var b=[],S=2;S<arguments.length;S++)b[S-2]=arguments[S];return s(this,void 0,void 0,function(){var L,h;return o(this,function(R){return L=E.parseRequestExtendedArgs.apply(void 0,u([T,w],b,!1)),h=new F(L.url),[2,h.request(t({},L))]})})}e.request=g;function v(T,w,b){return s(this,void 0,void 0,function(){var S,L;return o(this,function(h){return S=(0,E.parseBatchRequestsExtendedArgs)(T,w,b),L=new F(S.url),[2,L.batchRequests(t({},S))]})})}e.batchRequests=v,e.default=g;function C(T,w){return w===void 0&&(w=y.defaultJsonSerializer),s(this,void 0,void 0,function(){var b,S,L;return o(this,function(h){switch(h.label){case 0:return T.headers.forEach(function(R,O){O.toLowerCase()==="content-type"&&(b=R)}),b&&(b.toLowerCase().startsWith("application/json")||b.toLowerCase().startsWith("application/graphql+json")||b.toLowerCase().startsWith("application/graphql-response+json"))?(L=(S=w).parse,[4,T.text()]):[3,2];case 1:return[2,L.apply(S,[h.sent()])];case 2:return[2,T.text()]}})})}function H(T){return typeof T=="function"?T():T}function ie(T){for(var w=[],b=1;b<arguments.length;b++)w[b-1]=arguments[b];return T.reduce(function(S,L,h){return"".concat(S).concat(L).concat(h in w?w[h]:"")},"")}e.gql=ie;function m(T){var w={};return T.forEach(function(b,S){w[S]=b}),w}var A=mf();Object.defineProperty(e,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return A.GraphQLWebSocketClient}});var q=xt;Object.defineProperty(e,"resolveRequestDocument",{enumerable:!0,get:function(){return q.resolveRequestDocument}})})(qt);qt.gql`
161
+ `}function Zl(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:l.DOCUMENT,definitions:t}}function ef(e){const t=[],n=Object.create(null);for(const i of e.definitions)switch(i.kind){case l.OPERATION_DEFINITION:t.push(i);break;case l.FRAGMENT_DEFINITION:n[i.name.value]=es(i.selectionSet);break}const r=Object.create(null);for(const i of t){const s=new Set;for(const a of es(i.selectionSet))ya(s,n,a);const o=i.name?i.name.value:"";r[o]={kind:l.DOCUMENT,definitions:e.definitions.filter(a=>a===i||a.kind===l.FRAGMENT_DEFINITION&&s.has(a.name.value))}}return r}function ya(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(r!==void 0)for(const i of r)ya(e,t,i)}}function es(e){const t=[];return Gt(e,{FragmentSpread(n){t.push(n.name.value)}}),t}function tf(e){const t=Qs(e)?e:new er(e),n=t.body,r=new Jr(t);let i="",s=!1;for(;r.advance().kind!==N.EOF;){const o=r.token,a=o.kind,u=!js(o.kind);s&&(u||o.kind===N.SPREAD)&&(i+=" ");const c=n.slice(o.start,o.end);a===N.BLOCK_STRING?i+=Ps(o.value,{minimize:!0}):i+=c,s=u}return i}function nf(e){const t=va(e);if(t)throw t;return e}function va(e){if(typeof e=="string"||Z(!1,"Expected name to be a string."),e.startsWith("__"))return new _(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{Me(e)}catch(t){return t}}var pe;(function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(pe||(pe={}));var Ye;(function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(Ye||(Ye={}));function rf(e,t){return Ea(e,t).filter(n=>n.type in pe)}function sf(e,t){return Ea(e,t).filter(n=>n.type in Ye)}function Ea(e,t){return[...af(e,t),...of(e,t)]}function of(e,t){const n=[],r=ot(e.getDirectives(),t.getDirectives());for(const i of r.removed)n.push({type:pe.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(const[i,s]of r.persisted){const o=ot(i.args,s.args);for(const a of o.added)mt(a)&&n.push({type:pe.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${a.name} on directive ${i.name} was added.`});for(const a of o.removed)n.push({type:pe.DIRECTIVE_ARG_REMOVED,description:`${a.name} was removed from ${i.name}.`});i.isRepeatable&&!s.isRepeatable&&n.push({type:pe.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(const a of i.locations)s.locations.includes(a)||n.push({type:pe.DIRECTIVE_LOCATION_REMOVED,description:`${a} was removed from ${i.name}.`})}return n}function af(e,t){const n=[],r=ot(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const i of r.removed)n.push({type:pe.TYPE_REMOVED,description:ir(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(const[i,s]of r.persisted)ge(i)&&ge(s)?n.push(...lf(i,s)):Ne(i)&&Ne(s)?n.push(...cf(i,s)):le(i)&&le(s)?n.push(...uf(i,s)):te(i)&&te(s)?n.push(...ns(i,s),...ts(i,s)):re(i)&&re(s)?n.push(...ns(i,s),...ts(i,s)):i.constructor!==s.constructor&&n.push({type:pe.TYPE_CHANGED_KIND,description:`${i.name} changed from ${rs(i)} to ${rs(s)}.`});return n}function uf(e,t){const n=[],r=ot(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.added)rr(i)?n.push({type:pe.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:Ye.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(const i of r.removed)n.push({type:pe.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,s]of r.persisted)rn(i.type,s.type)||n.push({type:pe.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(s.type)}.`});return n}function cf(e,t){const n=[],r=ot(e.getTypes(),t.getTypes());for(const i of r.added)n.push({type:Ye.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(const i of r.removed)n.push({type:pe.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function lf(e,t){const n=[],r=ot(e.getValues(),t.getValues());for(const i of r.added)n.push({type:Ye.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(const i of r.removed)n.push({type:pe.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function ts(e,t){const n=[],r=ot(e.getInterfaces(),t.getInterfaces());for(const i of r.added)n.push({type:Ye.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(const i of r.removed)n.push({type:pe.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function ns(e,t){const n=[],r=ot(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.removed)n.push({type:pe.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,s]of r.persisted)n.push(...ff(e,i,s)),Zt(i.type,s.type)||n.push({type:pe.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(s.type)}.`});return n}function ff(e,t,n){const r=[],i=ot(t.args,n.args);for(const s of i.removed)r.push({type:pe.ARG_REMOVED,description:`${e.name}.${t.name} arg ${s.name} was removed.`});for(const[s,o]of i.persisted)if(!rn(s.type,o.type))r.push({type:pe.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${s.name} has changed type from ${String(s.type)} to ${String(o.type)}.`});else if(s.defaultValue!==void 0)if(o.defaultValue===void 0)r.push({type:Ye.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${s.name} defaultValue was removed.`});else{const u=is(s.defaultValue,s.type),c=is(o.defaultValue,o.type);u!==c&&r.push({type:Ye.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${s.name} has changed defaultValue from ${u} to ${c}.`})}for(const s of i.added)mt(s)?r.push({type:pe.REQUIRED_ARG_ADDED,description:`A required arg ${s.name} on ${e.name}.${t.name} was added.`}):r.push({type:Ye.OPTIONAL_ARG_ADDED,description:`An optional arg ${s.name} on ${e.name}.${t.name} was added.`});return r}function Zt(e,t){return ce(e)?ce(t)&&Zt(e.ofType,t.ofType)||H(t)&&Zt(e,t.ofType):H(e)?H(t)&&Zt(e.ofType,t.ofType):En(t)&&e.name===t.name||H(t)&&Zt(e,t.ofType)}function rn(e,t){return ce(e)?ce(t)&&rn(e.ofType,t.ofType):H(e)?H(t)&&rn(e.ofType,t.ofType)||!H(t)&&rn(e.ofType,t):En(t)&&e.name===t.name}function rs(e){if(Ve(e))return"a Scalar type";if(te(e))return"an Object type";if(re(e))return"an Interface type";if(Ne(e))return"a Union type";if(ge(e))return"an Enum type";if(le(e))return"an Input type";me(!1,"Unexpected type: "+I(e))}function is(e,t){const n=ft(e,t);return n!=null||me(!1),ue(cr(n))}function ot(e,t){const n=[],r=[],i=[],s=st(e,({name:a})=>a),o=st(t,({name:a})=>a);for(const a of e){const u=o[a.name];u===void 0?r.push(a):i.push([a,u])}for(const a of t)s[a.name]===void 0&&n.push(a);return{added:n,persisted:i,removed:r}}const df=Object.freeze(Object.defineProperty({__proto__:null,BREAK:St,get BreakingChangeType(){return pe},DEFAULT_DEPRECATION_REASON:ni,get DangerousChangeType(){return Ye},get DirectiveLocation(){return G},ExecutableDefinitionsRule:ao,FieldsOnCorrectTypeRule:uo,FragmentsOnCompositeTypesRule:co,GRAPHQL_MAX_INT:xn,GRAPHQL_MIN_INT:$n,GraphQLBoolean:xe,GraphQLDeprecatedDirective:or,GraphQLDirective:nt,GraphQLEnumType:pt,GraphQLError:_,GraphQLFloat:io,GraphQLID:Zr,GraphQLIncludeDirective:ei,GraphQLInputObjectType:Mt,GraphQLInt:ro,GraphQLInterfaceType:$t,GraphQLList:we,GraphQLNonNull:K,GraphQLObjectType:Pe,GraphQLScalarType:tt,GraphQLSchema:Qt,GraphQLSkipDirective:ti,GraphQLSpecifiedByDirective:ri,GraphQLString:he,GraphQLUnionType:Ct,get Kind(){return l},KnownArgumentNamesRule:lo,KnownDirectivesRule:Ti,KnownFragmentNamesRule:po,KnownTypeNamesRule:bi,Lexer:Jr,Location:Cs,LoneAnonymousOperationRule:ho,LoneSchemaDefinitionRule:mo,NoDeprecatedCustomRule:Ll,NoFragmentCyclesRule:yo,NoSchemaIntrospectionCustomRule:kl,NoUndefinedVariablesRule:vo,NoUnusedFragmentsRule:Eo,NoUnusedVariablesRule:go,get OperationTypeNode(){return be},OverlappingFieldsCanBeMergedRule:bo,PossibleFragmentSpreadsRule:Io,PossibleTypeExtensionsRule:wo,ProvidedRequiredArgumentsRule:Oo,ScalarLeafsRule:Do,SchemaMetaFieldDef:un,SingleFieldSubscriptionsRule:Fo,Source:er,Token:Qr,get TokenKind(){return N},TypeInfo:mi,get TypeKind(){return se},TypeMetaFieldDef:cn,TypeNameMetaFieldDef:ln,UniqueArgumentDefinitionNamesRule:xo,UniqueArgumentNamesRule:wi,UniqueDirectiveNamesRule:$o,UniqueDirectivesPerLocationRule:Oi,UniqueEnumValueNamesRule:Co,UniqueFieldDefinitionNamesRule:Mo,UniqueFragmentNamesRule:Vo,UniqueInputFieldNamesRule:Ai,UniqueOperationNamesRule:Uo,UniqueOperationTypesRule:Po,UniqueTypeNamesRule:jo,UniqueVariableNamesRule:Bo,ValidationContext:Ho,ValuesOfCorrectTypeRule:qo,VariablesAreInputTypesRule:Go,VariablesInAllowedPositionRule:Qo,__Directive:oi,__DirectiveLocation:ai,__EnumValue:ci,__Field:ui,__InputValue:bn,__Schema:ar,__Type:Ue,__TypeKind:li,assertAbstractType:Tc,assertCompositeType:gc,assertDirective:Oc,assertEnumType:dc,assertEnumValueName:Hs,assertInputObjectType:pc,assertInputType:yc,assertInterfaceType:Xs,assertLeafType:Ec,assertListType:hc,assertName:Me,assertNamedType:_c,assertNonNullType:mc,assertNullableType:Ws,assertObjectType:zs,assertOutputType:vc,assertScalarType:lc,assertSchema:fi,assertType:cc,assertUnionType:fc,assertValidName:nf,assertValidSchema:pi,assertWrappingType:bc,astFromValue:ft,buildASTSchema:ca,buildClientSchema:Cl,buildSchema:Vl,coerceInputValue:Ro,concatAST:Zl,createSourceEventStream:oa,defaultFieldResolver:$r,defaultTypeResolver:na,doTypesOverlap:Rr,execute:fr,executeSync:Wo,extendSchema:Ml,findBreakingChanges:rf,findDangerousChanges:sf,formatError:Lu,getArgumentValues:lr,getDirectiveValues:fn,getEnterLeaveForKind:xt,getIntrospectionQuery:aa,getLocation:Un,getNamedType:Se,getNullableType:Xr,getOperationAST:Fl,getOperationRootType:xl,getVariableValues:Lo,getVisitFn:oc,graphql:wl,graphqlSync:Ol,introspectionFromSchema:$l,introspectionTypes:_n,isAbstractType:We,isCompositeType:et,isConstValueNode:Lr,isDefinitionNode:Vc,isDirective:sr,isEnumType:ge,isEqualType:jn,isExecutableDefinitionNode:vi,isInputObjectType:le,isInputType:Le,isInterfaceType:re,isIntrospectionType:wt,isLeafType:Ze,isListType:ce,isNamedType:En,isNonNullType:H,isNullableType:zr,isObjectType:te,isOutputType:dt,isRequiredArgument:mt,isRequiredInputField:rr,isScalarType:Ve,isSchema:so,isSelectionNode:Uc,isSpecifiedDirective:ii,isSpecifiedScalarType:ir,isType:yn,isTypeDefinitionNode:Yt,isTypeExtensionNode:ur,isTypeNode:Pc,isTypeSubTypeOf:Tt,isTypeSystemDefinitionNode:Ei,isTypeSystemExtensionNode:gi,isUnionType:Ne,isValidNameError:va,isValueNode:oo,isWrappingType:vn,lexicographicSortSchema:Ul,locatedError:Ut,parse:tr,parseConstValue:Wu,parseType:Ku,parseValue:Ys,print:ue,printError:Ru,printIntrospectionSchema:jl,printLocation:$s,printSchema:Pl,printSourceLocation:Gr,printType:da,resolveObjMapThunk:Kr,resolveReadonlyArrayThunk:Wr,responsePathAsArray:Fe,separateOperations:ef,specifiedDirectives:yt,specifiedRules:Yo,specifiedScalarTypes:gn,stripIgnoredCharacters:tf,subscribe:Dl,syntaxError:Te,typeFromAST:ke,validate:zo,validateSchema:di,valueFromAST:Xe,valueFromASTUntyped:Pn,version:Ou,versionInfo:Au,visit:Gt,visitInParallel:Hr,visitWithTypeInfo:yi},Symbol.toStringTag,{value:"Module"})),pf=Ja(df);Object.defineProperty(Ft,"__esModule",{value:!0});Ft.resolveRequestDocument=void 0;var ss=pf;function os(e){var t,n=void 0,r=e.definitions.filter(function(i){return i.kind==="OperationDefinition"});return r.length===1&&(n=(t=r[0].name)===null||t===void 0?void 0:t.value),n}function hf(e){if(typeof e=="string"){var t=void 0;try{var n=(0,ss.parse)(e);t=os(n)}catch{}return{query:e,operationName:t}}var r=os(e);return{query:(0,ss.print)(e),operationName:r}}Ft.resolveRequestDocument=hf;var Xt={},as;function mf(){if(as)return Xt;as=1;var e=ie&&ie.__assign||function(){return e=Object.assign||function(C){for(var x,R=1,M=arguments.length;R<M;R++){x=arguments[R];for(var v in x)Object.prototype.hasOwnProperty.call(x,v)&&(C[v]=x[v])}return C},e.apply(this,arguments)},t=ie&&ie.__awaiter||function(C,x,R,M){function v(b){return b instanceof R?b:new R(function(P){P(b)})}return new(R||(R=Promise))(function(b,P){function W(A){try{m(M.next(A))}catch(q){P(q)}}function oe(A){try{m(M.throw(A))}catch(q){P(q)}}function m(A){A.done?b(A.value):v(A.value).then(W,oe)}m((M=M.apply(C,x||[])).next())})},n=ie&&ie.__generator||function(C,x){var R={label:0,sent:function(){if(b[0]&1)throw b[1];return b[1]},trys:[],ops:[]},M,v,b,P;return P={next:W(0),throw:W(1),return:W(2)},typeof Symbol=="function"&&(P[Symbol.iterator]=function(){return this}),P;function W(m){return function(A){return oe([m,A])}}function oe(m){if(M)throw new TypeError("Generator is already executing.");for(;R;)try{if(M=1,v&&(b=m[0]&2?v.return:m[0]?v.throw||((b=v.return)&&b.call(v),0):v.next)&&!(b=b.call(v,m[1])).done)return b;switch(v=0,b&&(m=[m[0]&2,b.value]),m[0]){case 0:case 1:b=m;break;case 4:return R.label++,{value:m[1],done:!1};case 5:R.label++,v=m[1],m=[0];continue;case 7:m=R.ops.pop(),R.trys.pop();continue;default:if(b=R.trys,!(b=b.length>0&&b[b.length-1])&&(m[0]===6||m[0]===2)){R=0;continue}if(m[0]===3&&(!b||m[1]>b[0]&&m[1]<b[3])){R.label=m[1];break}if(m[0]===6&&R.label<b[1]){R.label=b[1],b=m;break}if(b&&R.label<b[2]){R.label=b[2],R.ops.push(m);break}b[2]&&R.ops.pop(),R.trys.pop();continue}m=x.call(C,R)}catch(A){m=[6,A],v=0}finally{M=b=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.GraphQLWebSocketClient=void 0;var r=hn,i=Ft,s="connection_init",o="connection_ack",a="ping",u="pong",c="subscribe",f="next",d="error",h="complete",y=function(){function C(x,R,M){this._type=x,this._payload=R,this._id=M}return Object.defineProperty(C.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"text",{get:function(){var x={type:this.type};return this.id!=null&&this.id!=null&&(x.id=this.id),this.payload!=null&&this.payload!=null&&(x.payload=this.payload),JSON.stringify(x)},enumerable:!1,configurable:!0}),C.parse=function(x,R){var M=JSON.parse(x),v=M.type,b=M.payload,P=M.id;return new C(v,R(b),P)},C}(),E=function(){function C(x,R){var M=R.onInit,v=R.onAcknowledged,b=R.onPing,P=R.onPong,W=this;this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=x,x.onopen=function(oe){return t(W,void 0,void 0,function(){var m,A,q,g;return n(this,function(w){switch(w.label){case 0:return this.socketState.acknowledged=!1,this.socketState.subscriptions={},A=(m=x).send,q=V,M?[4,M()]:[3,2];case 1:return g=w.sent(),[3,3];case 2:g=null,w.label=3;case 3:return A.apply(m,[q.apply(void 0,[g]).text]),[2]}})})},x.onclose=function(oe){W.socketState.acknowledged=!1,W.socketState.subscriptions={}},x.onerror=function(oe){console.error(oe)},x.onmessage=function(oe){try{var m=$(oe.data);switch(m.type){case o:{W.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(W.socketState.acknowledged=!0,v&&v(m.payload));return}case a:{b?b(m.payload).then(function(T){return x.send(X(T).text)}):x.send(X(null).text);return}case u:{P&&P(m.payload);return}}if(!W.socketState.acknowledged||m.id===void 0||m.id===null||!W.socketState.subscriptions[m.id])return;var A=W.socketState.subscriptions[m.id],q=A.query,g=A.variables,w=A.subscriber;switch(m.type){case f:{!m.payload.errors&&m.payload.data&&w.next&&w.next(m.payload.data),m.payload.errors&&w.error&&w.error(new r.ClientError(e(e({},m.payload),{status:200}),{query:q,variables:g}));return}case d:{w.error&&w.error(new r.ClientError({errors:m.payload,status:200},{query:q,variables:g}));return}case h:{w.complete&&w.complete(),delete W.socketState.subscriptions[m.id];return}}}catch(T){console.error(T),x.close(1006)}x.close(4400,"Unknown graphql-ws message.")}}return C.prototype.makeSubscribe=function(x,R,M,v){var b=this,P=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[P]={query:x,variables:v,subscriber:M},this.socket.send(z(P,{query:x,operationName:R,variables:v}).text),function(){b.socket.send(Q(P).text),delete b.socketState.subscriptions[P]}},C.prototype.rawRequest=function(x,R){var M=this;return new Promise(function(v,b){var P;M.rawSubscribe(x,{next:function(W,oe){return P={data:W,extensions:oe}},error:b,complete:function(){return v(P)}},R)})},C.prototype.request=function(x,R){var M=this;return new Promise(function(v,b){var P;M.subscribe(x,{next:function(W){return P=W},error:b,complete:function(){return v(P)}},R)})},C.prototype.subscribe=function(x,R,M){var v=(0,i.resolveRequestDocument)(x),b=v.query,P=v.operationName;return this.makeSubscribe(b,P,R,M)},C.prototype.rawSubscribe=function(x,R,M){return this.makeSubscribe(x,void 0,R,M)},C.prototype.ping=function(x){this.socket.send(B(x).text)},C.prototype.close=function(){this.socket.close(1e3)},C.PROTOCOL="graphql-transport-ws",C}();Xt.GraphQLWebSocketClient=E;function $(C,x){x===void 0&&(x=function(M){return M});var R=y.parse(C,x);return R}function V(C){return new y(s,C)}function B(C){return new y(a,C,void 0)}function X(C){return new y(u,C,void 0)}function z(C,x){return new y(c,x,C)}function Q(C){return new y(h,void 0,C)}return Xt}(function(e){var t=ie&&ie.__assign||function(){return t=Object.assign||function(g){for(var w,T=1,D=arguments.length;T<D;T++){w=arguments[T];for(var L in w)Object.prototype.hasOwnProperty.call(w,L)&&(g[L]=w[L])}return g},t.apply(this,arguments)},n=ie&&ie.__createBinding||(Object.create?function(g,w,T,D){D===void 0&&(D=T);var L=Object.getOwnPropertyDescriptor(w,T);(!L||("get"in L?!w.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return w[T]}}),Object.defineProperty(g,D,L)}:function(g,w,T,D){D===void 0&&(D=T),g[D]=w[T]}),r=ie&&ie.__setModuleDefault||(Object.create?function(g,w){Object.defineProperty(g,"default",{enumerable:!0,value:w})}:function(g,w){g.default=w}),i=ie&&ie.__importStar||function(g){if(g&&g.__esModule)return g;var w={};if(g!=null)for(var T in g)T!=="default"&&Object.prototype.hasOwnProperty.call(g,T)&&n(w,g,T);return r(w,g),w},s=ie&&ie.__awaiter||function(g,w,T,D){function L(p){return p instanceof T?p:new T(function(S){S(p)})}return new(T||(T=Promise))(function(p,S){function O(Y){try{F(D.next(Y))}catch(J){S(J)}}function k(Y){try{F(D.throw(Y))}catch(J){S(J)}}function F(Y){Y.done?p(Y.value):L(Y.value).then(O,k)}F((D=D.apply(g,w||[])).next())})},o=ie&&ie.__generator||function(g,w){var T={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},D,L,p,S;return S={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function O(F){return function(Y){return k([F,Y])}}function k(F){if(D)throw new TypeError("Generator is already executing.");for(;T;)try{if(D=1,L&&(p=F[0]&2?L.return:F[0]?L.throw||((p=L.return)&&p.call(L),0):L.next)&&!(p=p.call(L,F[1])).done)return p;switch(L=0,p&&(F=[F[0]&2,p.value]),F[0]){case 0:case 1:p=F;break;case 4:return T.label++,{value:F[1],done:!1};case 5:T.label++,L=F[1],F=[0];continue;case 7:F=T.ops.pop(),T.trys.pop();continue;default:if(p=T.trys,!(p=p.length>0&&p[p.length-1])&&(F[0]===6||F[0]===2)){T=0;continue}if(F[0]===3&&(!p||F[1]>p[0]&&F[1]<p[3])){T.label=F[1];break}if(F[0]===6&&T.label<p[1]){T.label=p[1],p=F;break}if(p&&T.label<p[2]){T.label=p[2],T.ops.push(F);break}p[2]&&T.ops.pop(),T.trys.pop();continue}F=w.call(g,T)}catch(Y){F=[6,Y],L=0}finally{D=p=0}if(F[0]&5)throw F[1];return{value:F[0]?F[1]:void 0,done:!0}}},a=ie&&ie.__rest||function(g,w){var T={};for(var D in g)Object.prototype.hasOwnProperty.call(g,D)&&w.indexOf(D)<0&&(T[D]=g[D]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,D=Object.getOwnPropertySymbols(g);L<D.length;L++)w.indexOf(D[L])<0&&Object.prototype.propertyIsEnumerable.call(g,D[L])&&(T[D[L]]=g[D[L]]);return T},u=ie&&ie.__spreadArray||function(g,w,T){if(T||arguments.length===2)for(var D=0,L=w.length,p;D<L;D++)(p||!(D in w))&&(p||(p=Array.prototype.slice.call(w,0,D)),p[D]=w[D]);return g.concat(p||Array.prototype.slice.call(w))},c=ie&&ie.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveRequestDocument=e.GraphQLWebSocketClient=e.gql=e.batchRequests=e.request=e.rawRequest=e.GraphQLClient=e.ClientError=void 0;var f=i(uu),d=f,h=c(qr),y=pn,E=Re,$=hn;Object.defineProperty(e,"ClientError",{enumerable:!0,get:function(){return $.ClientError}});var V=Ft,B=function(g){var w={};return g&&(typeof Headers<"u"&&g instanceof Headers||d&&d.Headers&&g instanceof d.Headers?w=m(g):Array.isArray(g)?g.forEach(function(T){var D=T[0],L=T[1];w[D]=L}):w=g),w},X=function(g){return g.replace(/([\s,]|#[^\n\r]+)+/g," ").trim()},z=function(g){var w=g.query,T=g.variables,D=g.operationName,L=g.jsonSerializer;if(!Array.isArray(w)){var p=["query=".concat(encodeURIComponent(X(w)))];return T&&p.push("variables=".concat(encodeURIComponent(L.stringify(T)))),D&&p.push("operationName=".concat(encodeURIComponent(D))),p.join("&")}if(typeof T<"u"&&!Array.isArray(T))throw new Error("Cannot create query with given variable type, array expected");var S=w.reduce(function(O,k,F){return O.push({query:X(k),variables:T?L.stringify(T[F]):void 0}),O},[]);return"query=".concat(encodeURIComponent(L.stringify(S)))},Q=function(g){var w=g.url,T=g.query,D=g.variables,L=g.operationName,p=g.headers,S=g.fetch,O=g.fetchOptions,k=g.middleware;return s(void 0,void 0,void 0,function(){var F,Y,J;return o(this,function(ne){switch(ne.label){case 0:return F=(0,h.default)(T,D,L,O.jsonSerializer),Y=t({method:"POST",headers:t(t({},typeof F=="string"?{"Content-Type":"application/json"}:{}),p),body:F},O),k?[4,Promise.resolve(k(t(t({},Y),{url:w,operationName:L,variables:D})))]:[3,2];case 1:J=ne.sent(),w=J.url,Y=a(J,["url"]),ne.label=2;case 2:return[4,S(w,Y)];case 3:return[2,ne.sent()]}})})},C=function(g){var w=g.url,T=g.query,D=g.variables,L=g.operationName,p=g.headers,S=g.fetch,O=g.fetchOptions,k=g.middleware;return s(void 0,void 0,void 0,function(){var F,Y,J;return o(this,function(ne){switch(ne.label){case 0:return F=z({query:T,variables:D,operationName:L,jsonSerializer:O.jsonSerializer}),Y=t({method:"GET",headers:p},O),k?[4,Promise.resolve(k(t(t({},Y),{url:w,operationName:L,variables:D})))]:[3,2];case 1:J=ne.sent(),w=J.url,Y=a(J,["url"]),ne.label=2;case 2:return[4,S("".concat(w,"?").concat(F),Y)];case 3:return[2,ne.sent()]}})})},x=function(){function g(w,T){T===void 0&&(T={}),this.url=w,this.options=T}return g.prototype.rawRequest=function(w,T,D){return s(this,void 0,void 0,function(){var L,p,S,O,k,F,Y,J,ne,ye,ae,fe;return o(this,function(Oe){return L=(0,E.parseRawRequestArgs)(w,T,D),p=this.options,S=p.headers,O=p.fetch,k=O===void 0?f.default:O,F=p.method,Y=F===void 0?"POST":F,J=p.requestMiddleware,ne=p.responseMiddleware,ye=a(p,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ae=this.url,L.signal!==void 0&&(ye.signal=L.signal),fe=(0,V.resolveRequestDocument)(L.query).operationName,[2,R({url:ae,query:L.query,variables:L.variables,headers:t(t({},B(W(S))),B(L.requestHeaders)),operationName:fe,fetch:k,method:Y,fetchOptions:ye,middleware:J}).then(function(Ae){return ne&&ne(Ae),Ae}).catch(function(Ae){throw ne&&ne(Ae),Ae})]})})},g.prototype.request=function(w){for(var T=[],D=1;D<arguments.length;D++)T[D-1]=arguments[D];return s(this,void 0,void 0,function(){var L,p,S,O,k,F,Y,J,ne,ye,ae,fe,Oe,Ae,Jt,Ht;return o(this,function(Nn){return L=T[0],p=T[1],S=(0,E.parseRequestArgs)(w,L,p),O=this.options,k=O.headers,F=O.fetch,Y=F===void 0?f.default:F,J=O.method,ne=J===void 0?"POST":J,ye=O.requestMiddleware,ae=O.responseMiddleware,fe=a(O,["headers","fetch","method","requestMiddleware","responseMiddleware"]),Oe=this.url,S.signal!==void 0&&(fe.signal=S.signal),Ae=(0,V.resolveRequestDocument)(S.document),Jt=Ae.query,Ht=Ae.operationName,[2,R({url:Oe,query:Jt,variables:S.variables,headers:t(t({},B(W(k))),B(S.requestHeaders)),operationName:Ht,fetch:Y,method:ne,fetchOptions:fe,middleware:ye}).then(function(ut){return ae&&ae(ut),ut.data}).catch(function(ut){throw ae&&ae(ut),ut})]})})},g.prototype.batchRequests=function(w,T){var D=(0,E.parseBatchRequestArgs)(w,T),L=this.options,p=L.headers,S=L.fetch,O=S===void 0?f.default:S,k=L.method,F=k===void 0?"POST":k,Y=L.requestMiddleware,J=L.responseMiddleware,ne=a(L,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ye=this.url;D.signal!==void 0&&(ne.signal=D.signal);var ae=D.documents.map(function(Oe){var Ae=Oe.document;return(0,V.resolveRequestDocument)(Ae).query}),fe=D.documents.map(function(Oe){var Ae=Oe.variables;return Ae});return R({url:ye,query:ae,variables:fe,headers:t(t({},B(W(p))),B(D.requestHeaders)),operationName:void 0,fetch:O,method:F,fetchOptions:ne,middleware:Y}).then(function(Oe){return J&&J(Oe),Oe.data}).catch(function(Oe){throw J&&J(Oe),Oe})},g.prototype.setHeaders=function(w){return this.options.headers=w,this},g.prototype.setHeader=function(w,T){var D,L=this.options.headers;return L?L[w]=T:this.options.headers=(D={},D[w]=T,D),this},g.prototype.setEndpoint=function(w){return this.url=w,this},g}();e.GraphQLClient=x;function R(g){var w=g.url,T=g.query,D=g.variables,L=g.headers,p=g.operationName,S=g.fetch,O=g.method,k=O===void 0?"POST":O,F=g.fetchOptions,Y=g.middleware;return s(this,void 0,void 0,function(){var J,ne,ye,ae,fe,Oe,Ae,Jt,Ht,Nn,ut;return o(this,function(dr){switch(dr.label){case 0:return J=k.toUpperCase()==="POST"?Q:C,ne=Array.isArray(T),[4,J({url:w,query:T,variables:D,operationName:p,headers:L,fetch:S,fetchOptions:F,middleware:Y})];case 1:return ye=dr.sent(),[4,P(ye,F.jsonSerializer)];case 2:if(ae=dr.sent(),fe=ne&&Array.isArray(ae)?!ae.some(function(Ta){var ba=Ta.data;return!ba}):!!ae.data,Oe=!ae.errors||F.errorPolicy==="all"||F.errorPolicy==="ignore",ye.ok&&Oe&&fe)return Ae=ye.headers,Jt=ye.status,ae.errors,Ht=a(ae,["errors"]),Nn=F.errorPolicy==="ignore"?Ht:ae,[2,t(t({},ne?{data:Nn}:Nn),{headers:Ae,status:Jt})];throw ut=typeof ae=="string"?{error:ae}:ae,new $.ClientError(t(t({},ut),{status:ye.status,headers:ye.headers}),{query:T,variables:D})}})})}function M(g,w){for(var T=[],D=2;D<arguments.length;D++)T[D-2]=arguments[D];return s(this,void 0,void 0,function(){var L,p;return o(this,function(S){return L=E.parseRawRequestExtendedArgs.apply(void 0,u([g,w],T,!1)),p=new x(L.url),[2,p.rawRequest(t({},L))]})})}e.rawRequest=M;function v(g,w){for(var T=[],D=2;D<arguments.length;D++)T[D-2]=arguments[D];return s(this,void 0,void 0,function(){var L,p;return o(this,function(S){return L=E.parseRequestExtendedArgs.apply(void 0,u([g,w],T,!1)),p=new x(L.url),[2,p.request(t({},L))]})})}e.request=v;function b(g,w,T){return s(this,void 0,void 0,function(){var D,L;return o(this,function(p){return D=(0,E.parseBatchRequestsExtendedArgs)(g,w,T),L=new x(D.url),[2,L.batchRequests(t({},D))]})})}e.batchRequests=b,e.default=v;function P(g,w){return w===void 0&&(w=y.defaultJsonSerializer),s(this,void 0,void 0,function(){var T,D,L;return o(this,function(p){switch(p.label){case 0:return g.headers.forEach(function(S,O){O.toLowerCase()==="content-type"&&(T=S)}),T&&(T.toLowerCase().startsWith("application/json")||T.toLowerCase().startsWith("application/graphql+json")||T.toLowerCase().startsWith("application/graphql-response+json"))?(L=(D=w).parse,[4,g.text()]):[3,2];case 1:return[2,L.apply(D,[p.sent()])];case 2:return[2,g.text()]}})})}function W(g){return typeof g=="function"?g():g}function oe(g){for(var w=[],T=1;T<arguments.length;T++)w[T-1]=arguments[T];return g.reduce(function(D,L,p){return"".concat(D).concat(L).concat(p in w?w[p]:"")},"")}e.gql=oe;function m(g){var w={};return g.forEach(function(T,D){w[D]=T}),w}var A=mf();Object.defineProperty(e,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return A.GraphQLWebSocketClient}});var q=Ft;Object.defineProperty(e,"resolveRequestDocument",{enumerable:!0,get:function(){return q.resolveRequestDocument}})})(Bt);Bt.gql`
162
162
  query GET_HREFLANG_DATA
163
163
  @cached
164
164
  (ttl: 300)
@@ -169,7 +169,7 @@ ${t.join(`
169
169
  link
170
170
  }
171
171
  }
172
- `;qt.gql`
172
+ `;Bt.gql`
173
173
  query B_CC_Q_D_0
174
174
  (
175
175
  $leagueIds: [numeric!]
@@ -197,7 +197,7 @@ ${t.join(`
197
197
  }
198
198
 
199
199
  }
200
- `;qt.gql`
200
+ `;Bt.gql`
201
201
  query CURRENT_SEASON_IDS
202
202
  @cached
203
203
  (ttl: 300)
@@ -216,7 +216,7 @@ ${t.join(`
216
216
  id
217
217
  }
218
218
  }
219
- `;qt.gql`
219
+ `;Bt.gql`
220
220
  query ALL_LEAGUE_IDS
221
221
  @cached
222
222
  (ttl: 300)
@@ -226,7 +226,7 @@ ${t.join(`
226
226
  id
227
227
  }
228
228
  }
229
- `;qt.gql`
229
+ `;Bt.gql`
230
230
  query ALL_TARGET_SEASON_FIXTURE_IDS
231
231
  (
232
232
  $limit: Int,
@@ -275,10 +275,12 @@ ${t.join(`
275
275
  season_id
276
276
  }
277
277
  }
278
- `;function br(e){return e==null?void 0:e.filter(t=>t!=null)}function yf(e){const t=e-1;return t*t*t+1}function Hn(e,{delay:t=0,duration:n=400,easing:r=yf,x:i=0,y:s=0,opacity:o=0}={}){const a=getComputedStyle(e),u=+a.opacity,c=a.transform==="none"?"":a.transform,f=u*(1-o),[d,p]=Ri(i),[y,E]=Ri(s);return{delay:t,duration:n,easing:r,css:($,M)=>`
279
- transform: ${c} translate(${(1-$)*d}${p}, ${(1-$)*y}${E});
280
- opacity: ${u-f*M}`}}const vf="/icon-close.svg",va="data:image/svg+xml,%3csvg%20width='15'%20height='14'%20viewBox='0%200%2015%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.1215%201.08392L1.64569%2012.5597'%20stroke='white'%20stroke-width='1.73876'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.06506%201.02606L13.1213%201.08286L13.1793%209.14027'%20stroke='white'%20stroke-width='1.73876'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";function Ef(e){vs(e,"svelte-zpfjus",'@charset "UTF-8";div#global⮕widget⮕betarenaAdEngine⮕main.svelte-zpfjus.svelte-zpfjus{position:fixed;z-index:10000;bottom:0;right:0;left:0;overflow:hidden;border-radius:40px 40px 0px 0px;background-color:#383838}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-zpfjus button.svelte-zpfjus{outline:none !important;border:none !important;opacity:1;cursor:pointer;transition:all 0.3s ease;align-items:center;white-space:nowrap;display:flex;justify-content:center}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-zpfjus p.svelte-zpfjus{font-family:"Roboto"}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-zpfjus img#close.svelte-zpfjus{position:absolute;top:10px;right:10px}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-zpfjus img#banner.svelte-zpfjus{height:355px;width:100%}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-zpfjus iframe.svelte-zpfjus{width:100%}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-zpfjus div#main-box.svelte-zpfjus{text-align:center;padding:20px 20px 35px 20px}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-zpfjus div#main-box p.svelte-zpfjus{margin:0;margin-bottom:25px}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-zpfjus div#main-box p#title.svelte-zpfjus{color:#FFFFFF}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-zpfjus div#main-box button.svelte-zpfjus{border-radius:7.57px;height:50px;width:100%;padding:10px;background:radial-gradient(97.9% 290.93% at 11.52% 99.71%, #2E6514 0%, #66BE3C 100%);color:#FFFFFF}')}function us(e){var Q,g;let t,n,r,i,s,o=((Q=e[0].data)==null?void 0:Q.title)+"",a,u,c,f,d=(((g=e[0].data)==null?void 0:g.cta_title)??"Recieve Bonus")+"",p,y,E,$,M,P,Z,J,B=e[2]&&cs(e);function U(v,C){var H;if((v[0].type==1||v[0].type==4)&&((H=v[0].data)!=null&&H.media))return Tf;if(v[0].type==2)return gf}let F=U(e),D=F&&F(e);return{c(){var v;t=ce("div"),B&&B.c(),n=Je(),D&&D.c(),r=Je(),i=ce("div"),s=ce("p"),a=bt(o),u=Je(),c=ce("a"),f=ce("button"),p=bt(d),y=Je(),E=ce("img"),j(s,"id","title"),j(s,"class","svelte-zpfjus"),j(E,"id",""),Xe(E.src,$=va)||j(E,"src",$),j(E,"alt","icon-arrow"),j(E,"title","icon-arrow"),j(E,"loading","lazy"),Cn(E,"margin-left","10px"),j(f,"class","svelte-zpfjus"),j(c,"href",M=(v=e[0].data)==null?void 0:v.cta_link),j(c,"target","_blank"),j(c,"rel",`
278
+ `;function Tr(e){return e==null?void 0:e.filter(t=>t!=null)}function yf(e){const t=e-1;return t*t*t+1}function Hn(e,{delay:t=0,duration:n=400,easing:r=yf,x:i=0,y:s=0,opacity:o=0}={}){const a=getComputedStyle(e),u=+a.opacity,c=a.transform==="none"?"":a.transform,f=u*(1-o),[d,h]=Li(i),[y,E]=Li(s);return{delay:t,duration:n,easing:r,css:($,V)=>`
279
+ transform: ${c} translate(${(1-$)*d}${h}, ${(1-$)*y}${E});
280
+ opacity: ${u-f*V}`}}const Ln={admin:!1,numberOfAdvertsActive:0};function vf(){const{subscribe:e,set:t,update:n}=Ds(Ln);return{subscribe:e,set:t,update:n,...{updateData:i=>{for(const s of i){const o=s[0],a=s[1];o=="admin"?Ln.admin=a:o=="numberOfAdvertsActive"&&(Ln.numberOfAdvertsActive+=1)}t(Ln)}}}}const Ef=vf(),gf="/icon-close.svg",ga="data:image/svg+xml,%3csvg%20width='15'%20height='14'%20viewBox='0%200%2015%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.1215%201.08392L1.64569%2012.5597'%20stroke='white'%20stroke-width='1.73876'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.06506%201.02606L13.1213%201.08286L13.1793%209.14027'%20stroke='white'%20stroke-width='1.73876'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";function Tf(e){vs(e,"svelte-1tas0dh",'@charset "UTF-8";div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1tas0dh.svelte-1tas0dh{position:fixed;z-index:10000;bottom:0;right:0;left:0;overflow:hidden;border-radius:40px 40px 0px 0px;background-color:var(--dark-theme-1-4-shade)}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1tas0dh img#close.svelte-1tas0dh{position:absolute;top:10px;right:10px;z-index:1}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1tas0dh img#banner.svelte-1tas0dh{height:355px;width:100%}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1tas0dh video.svelte-1tas0dh{width:100%;object-fit:cover}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1tas0dh div#main-box.svelte-1tas0dh{padding:20px 20px 35px 20px}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1tas0dh div#main-box p#title.svelte-1tas0dh{color:var(--white)}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1tas0dh div#main-box button.svelte-1tas0dh{border-radius:7.57px;max-height:50px;width:100%;padding:10px;background:radial-gradient(97.9% 290.93% at 11.52% 99.71%, #2E6514 0%, #66BE3C 100%);color:var(--white)}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1tas0dh span.custom-betarena-advert-x1{color:var(--primary) !important}')}function us(e){var M,v;let t,n,r,i,s,o=((M=e[0].data)==null?void 0:M.title)+"",a,u,c,f,d=(((v=e[0].data)==null?void 0:v.cta_title)??"Recieve Bonus")+"",h,y,E,$,V,B,X,z,Q=e[2]&&cs(e);function C(b,P){var W;if((b[0].type==1||b[0].type==4)&&((W=b[0].data)!=null&&W.media))return _f;if(b[0].type==2)return bf}let x=C(e),R=x&&x(e);return{c(){var b;t=Ee("div"),Q&&Q.c(),n=gt(),R&&R.c(),r=gt(),i=Ee("div"),s=Ee("p"),a=gt(),u=Ee("a"),c=Ee("button"),f=Ee("span"),h=sn(d),y=gt(),E=Ee("img"),U(s,"id","title"),U(s,"class","s-20 w-600 m-0 m-b-20 text-center svelte-1tas0dh"),U(f,"class","s-18 w-500 "),U(E,"id",""),Je(E.src,$=ga)||U(E,"src",$),U(E,"alt","icon-arrow"),U(E,"title","icon-arrow"),U(E,"loading","lazy"),U(E,"class","m-l-10 "),U(E,"width","12"),U(E,"height","12"),U(c,"class","svelte-1tas0dh"),U(u,"href",V=(b=e[0].data)==null?void 0:b.cta_link),U(u,"target","_blank"),U(u,"rel",`
281
281
  noopener
282
282
  noreferrer
283
- `),j(i,"id","main-box"),j(i,"class","svelte-zpfjus"),j(t,"id",_f),j(t,"class","svelte-zpfjus")},m(v,C){Le(v,t,C),B&&B.m(t,null),ue(t,n),D&&D.m(t,null),ue(t,r),ue(t,i),ue(i,s),ue(s,a),ue(i,u),ue(i,c),ue(c,f),ue(f,p),ue(f,y),ue(f,E),J=!0},p(v,C){var H,ie,m;v[2]?B?B.p(v,C):(B=cs(v),B.c(),B.m(t,n)):B&&(B.d(1),B=null),F===(F=U(v))&&D?D.p(v,C):(D&&D.d(1),D=F&&F(v),D&&(D.c(),D.m(t,r))),(!J||C&1)&&o!==(o=((H=v[0].data)==null?void 0:H.title)+"")&&sn(a,o),(!J||C&1)&&d!==(d=(((ie=v[0].data)==null?void 0:ie.cta_title)??"Recieve Bonus")+"")&&sn(p,d),(!J||C&1&&M!==(M=(m=v[0].data)==null?void 0:m.cta_link))&&j(c,"href",M)},i(v){J||(v&&_t(()=>{J&&(Z&&Z.end(1),P=ws(t,Hn,{y:500,duration:500}),P.start())}),J=!0)},o(v){P&&P.invalidate(),v&&(Z=Os(t,Hn,{y:500,duration:500})),J=!1},d(v){v&&Oe(t),B&&B.d(),D&&D.d(),v&&Z&&Z.end()}}}function cs(e){let t,n,r,i;return{c(){t=ce("img"),j(t,"id","close"),Xe(t.src,n=vf)||j(t,"src",n),j(t,"alt","icon-close"),j(t,"title","icon-close"),j(t,"loading","lazy"),j(t,"class","svelte-zpfjus")},m(s,o){Le(s,t,o),r||(i=gs(t,"click",e[5]),r=!0)},p:Ce,d(s){s&&Oe(t),r=!1,i()}}}function gf(e){let t,n;return{c(){var r;t=ce("img"),j(t,"id","banner"),Xe(t.src,n=(r=e[0].data)==null?void 0:r.media)||j(t,"src",n),j(t,"alt",""),j(t,"title",""),j(t,"loading","lazy"),j(t,"class","svelte-zpfjus")},m(r,i){Le(r,t,i)},p(r,i){var s;i&1&&!Xe(t.src,n=(s=r[0].data)==null?void 0:s.media)&&j(t,"src",n)},d(r){r&&Oe(t)}}}function Tf(e){let t,n;return{c(){var r;t=ce("iframe"),j(t,"width","250"),j(t,"height","250"),Xe(t.src,n=(r=e[0].data)==null?void 0:r.media)||j(t,"src",n),j(t,"class","svelte-zpfjus")},m(r,i){Le(r,t,i)},p(r,i){var s;i&1&&!Xe(t.src,n=(s=r[0].data)==null?void 0:s.media)&&j(t,"src",n)},d(r){r&&Oe(t)}}}function bf(e){let t,n,r,i=e[1]&&!e[3]&&us(e);return{c(){t=ce("p"),t.textContent="Global Advert Sample is Triggered",n=Je(),i&&i.c(),r=Oa(),Cn(t,"color","blueviolet")},m(s,o){Le(s,t,o),Le(s,n,o),i&&i.m(s,o),Le(s,r,o)},p(s,[o]){s[1]&&!s[3]?i?(i.p(s,o),o&10&&Fn(i,1)):(i=us(s),i.c(),Fn(i,1),i.m(r.parentNode,r)):i&&(Ma(),ki(i,1,1,()=>{i=null}),ja())},i(s){Fn(i)},o(s){ki(i)},d(s){s&&(Oe(t),Oe(n),Oe(r)),i&&i.d(s)}}}const _f="global⮕widget⮕betarenaAdEngine⮕main";function Nf(e,t,n){let r,i;Ia(e,Ir,c=>n(4,i=c));let{adData:s}=t,o=!1,a=!1;bs(()=>{setTimeout(()=>{n(1,o=!0)},0),setTimeout(()=>{n(2,a=!0)},0)});const u=()=>{Ir.updateData([["toggleAdShownState",void 0]])};return e.$$set=c=>{"adData"in c&&n(0,s=c.adData)},e.$$.update=()=>{e.$$.dirty&16&&n(3,{isBetarenaAdShownForToday:r}={...i},r)},[s,o,a,r,i,u]}class ls extends Vr{constructor(t){super(),jr(this,t,Nf,bf,Wn,{adData:0},Ef)}}function If(e){vs(e,"svelte-166eewm",'@charset "UTF-8";div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-166eewm.svelte-166eewm{overflow:hidden;border-radius:40px 40px 0px 0px;background-color:#383838}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-166eewm a.svelte-166eewm{text-decoration:none !important;color:inherit;display:flex}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-166eewm button.svelte-166eewm{outline:none !important;border:none !important;opacity:1;cursor:pointer;transition:all 0.3s ease;align-items:center;white-space:nowrap;display:flex;justify-content:center}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-166eewm p.svelte-166eewm{font-family:"Roboto"}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-166eewm img#banner.svelte-166eewm{height:355px;width:100%}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-166eewm iframe.svelte-166eewm{width:100%}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-166eewm div#main-box.svelte-166eewm{text-align:center;padding:20px 20px 35px 20px}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-166eewm div#main-box p.svelte-166eewm{margin:0;margin-bottom:25px}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-166eewm div#main-box p#title.svelte-166eewm{color:#FFFFFF}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-166eewm div#main-box button.svelte-166eewm{border-radius:7.57px;height:50px;width:100%;padding:10px;background:radial-gradient(97.9% 290.93% at 11.52% 99.71%, #2E6514 0%, #66BE3C 100%);color:#FFFFFF}')}function wf(e){let t,n;return{c(){var r;t=ce("img"),j(t,"id","banner"),Xe(t.src,n=(r=e[0].data)==null?void 0:r.media)||j(t,"src",n),j(t,"alt",""),j(t,"title",""),j(t,"loading","lazy"),j(t,"class","svelte-166eewm")},m(r,i){Le(r,t,i)},p(r,i){var s;i&1&&!Xe(t.src,n=(s=r[0].data)==null?void 0:s.media)&&j(t,"src",n)},d(r){r&&Oe(t)}}}function Of(e){let t,n;return{c(){var r;t=ce("iframe"),j(t,"width","250"),j(t,"height","250"),Xe(t.src,n=(r=e[0].data)==null?void 0:r.media)||j(t,"src",n),j(t,"class","svelte-166eewm")},m(r,i){Le(r,t,i)},p(r,i){var s;i&1&&!Xe(t.src,n=(s=r[0].data)==null?void 0:s.media)&&j(t,"src",n)},d(r){r&&Oe(t)}}}function Df(e){var Q,g;let t,n,r,i,s,o,a=((Q=e[0].data)==null?void 0:Q.title)+"",u,c,f,d,p=(((g=e[0].data)==null?void 0:g.cta_title)??"Recieve Bonus")+"",y,E,$,M,P,Z,J,B;function U(v,C){var H;if((v[0].type==1||v[0].type==4)&&((H=v[0].data)!=null&&H.media))return Of;if(v[0].type==2)return wf}let F=U(e),D=F&&F(e);return{c(){var v;t=ce("p"),t.textContent="General Advert Sample is Triggered",n=Je(),r=ce("div"),D&&D.c(),i=Je(),s=ce("div"),o=ce("p"),u=bt(a),c=Je(),f=ce("a"),d=ce("button"),y=bt(p),E=Je(),$=ce("img"),Cn(t,"color","violet"),j(o,"id","title"),j(o,"class","svelte-166eewm"),j($,"id",""),Xe($.src,M=va)||j($,"src",M),j($,"alt","icon-arrow"),j($,"title","icon-arrow"),j($,"loading","lazy"),Cn($,"margin-left","10px"),j(d,"class","svelte-166eewm"),j(f,"href",P=(v=e[0].data)==null?void 0:v.cta_link),j(f,"target","_blank"),j(f,"rel",`noopener
284
- noreferrer`),j(f,"class","svelte-166eewm"),j(s,"id","main-box"),j(s,"class","svelte-166eewm"),j(r,"id",Af),j(r,"class","svelte-166eewm")},m(v,C){Le(v,t,C),Le(v,n,C),Le(v,r,C),D&&D.m(r,null),ue(r,i),ue(r,s),ue(s,o),ue(o,u),ue(s,c),ue(s,f),ue(f,d),ue(d,y),ue(d,E),ue(d,$),B=!0},p(v,[C]){var H,ie,m;F===(F=U(v))&&D?D.p(v,C):(D&&D.d(1),D=F&&F(v),D&&(D.c(),D.m(r,i))),(!B||C&1)&&a!==(a=((H=v[0].data)==null?void 0:H.title)+"")&&sn(u,a),(!B||C&1)&&p!==(p=(((ie=v[0].data)==null?void 0:ie.cta_title)??"Recieve Bonus")+"")&&sn(y,p),(!B||C&1&&P!==(P=(m=v[0].data)==null?void 0:m.cta_link))&&j(f,"href",P)},i(v){B||(v&&_t(()=>{B&&(J&&J.end(1),Z=ws(r,Hn,{y:500,duration:500}),Z.start())}),B=!0)},o(v){Z&&Z.invalidate(),v&&(J=Os(r,Hn,{y:500,duration:500})),B=!1},d(v){v&&(Oe(t),Oe(n),Oe(r)),D&&D.d(),v&&J&&J.end()}}}const Af="global⮕widget⮕betarenaAdEngineX1⮕main";function Sf(e,t,n){let{adData:r}=t;return e.$$set=i=>{"adData"in i&&n(0,r=i.adData)},[r]}class Rf extends Vr{constructor(t){super(),jr(this,t,Sf,Df,Wn,{adData:0},If)}}function Lf(e){var d;let t,n,r,i,s=((d=e[0])==null?void 0:d.country_code)+"",o,a,u,c,f;return{c(){t=ce("div"),n=ce("p"),n.textContent=`Device Type: ${e[1]}`,r=Je(),i=ce("p"),o=bt(s),a=Je(),u=ce("div"),u.innerHTML="",j(u,"data-betarena-zone-id","1")},m(p,y){Le(p,t,y),ue(t,n),ue(t,r),ue(t,i),ue(i,o),Le(p,a,y),Le(p,u,y),c||(f=gs(window,"resize",e[5]),c=!0)},p(p,[y]){var E;y&1&&s!==(s=((E=p[0])==null?void 0:E.country_code)+"")&&sn(o,s)},i:Ce,o:Ce,d(p){p&&(Oe(t),Oe(a),Oe(u)),c=!1,f()}}}function Ff(e,t,n){let{deviceWidthList:r=[768,1024],authorId:i=null,authorArticleTagIds:s=[]}=t,o="desktop",a=null,u=new Map;function c(){var E;const y=document.querySelectorAll("[data-betarena-zone-id]");for(const $ of y){const M=(E=$.attributes.getNamedItem("data-betarena-zone-id"))==null?void 0:E.value;M&&u.set(parseInt(M),$)}}async function f(y){if(!document)return;const E=await ou(`${qa}/ads`,y);console.log("response",E);const $=new Map(E.ads??[]),M=new Map(E.mapZoneIdToCampaignId);new Map(E.mapCampaignIdToCreativeId);const P=new Map(E.mapZoneIdToAuthorIds),Z=new Map(E.mapZoneIdToTagIds);for(const[J,B]of u){if(!a)continue;const U=M.get(J)??[],F=br(U.map(D=>{if($.has(D))return $.get(D)}));for(const D of F??[])new Rf({target:B,props:{adData:D}})}if(i||s.length>0){for(const[J,B]of P){if(i&&!B.includes(i))continue;const U=M.get(J)??[],F=br(U.map(D=>{if($.has(D))return $.get(D)}));console.log("creativeAdData",F);for(const D of F)new ls({target:document.body,props:{adData:D}})}for(const[J,B]of Z){if(i&&!B.includes(i))continue;const U=M.get(J)??[],F=br(U.map(D=>{if($.has(D))return $.get(D)}));for(const D of F)new ls({target:document.body,props:{adData:D}})}}}async function d(){$i(),n(0,a=await au()),c(),f({deviceType:o,isoCountryCode:(a==null?void 0:a.country_code)??"EB",authorId:i,tagIds:s,zoneIds:[...u.keys()]})}bs(async()=>{Ir.useLocalStorage(),await d()});const p=()=>{$i()};return e.$$set=y=>{"deviceWidthList"in y&&n(2,r=y.deviceWidthList),"authorId"in y&&n(3,i=y.authorId),"authorArticleTagIds"in y&&n(4,s=y.authorArticleTagIds)},[a,o,r,i,s,p]}class kf extends Vr{constructor(t){super(),jr(this,t,Ff,Lf,Wn,{deviceWidthList:2,authorId:3,authorArticleTagIds:4})}}typeof document<"u"&&new kf({target:document.body});
283
+ `),U(i,"id","main-box"),U(i,"class","svelte-1tas0dh"),U(t,"id",If),U(t,"class","svelte-1tas0dh")},m(b,P){at(b,t,P),Q&&Q.m(t,null),de(t,n),R&&R.m(t,null),de(t,r),de(t,i),de(i,s),s.innerHTML=o,de(i,a),de(i,u),de(u,c),de(c,f),de(f,h),de(c,y),de(c,E),z=!0},p(b,P){var W,oe,m;b[2]?Q?Q.p(b,P):(Q=cs(b),Q.c(),Q.m(t,n)):Q&&(Q.d(1),Q=null),x===(x=C(b))&&R?R.p(b,P):(R&&R.d(1),R=x&&x(b),R&&(R.c(),R.m(t,r))),(!z||P&1)&&o!==(o=((W=b[0].data)==null?void 0:W.title)+"")&&(s.innerHTML=o),(!z||P&1)&&d!==(d=(((oe=b[0].data)==null?void 0:oe.cta_title)??"Recieve Bonus")+"")&&br(h,d),(!z||P&1&&V!==(V=(m=b[0].data)==null?void 0:m.cta_link))&&U(u,"href",V)},i(b){z||(b&&bt(()=>{z&&(X&&X.end(1),B=Os(t,Hn,{y:500,duration:500}),B.start())}),z=!0)},o(b){B&&B.invalidate(),b&&(X=As(t,Hn,{y:500,duration:500})),z=!1},d(b){b&&He(t),Q&&Q.d(),R&&R.d(),b&&X&&X.end()}}}function cs(e){let t,n,r,i;return{c(){t=Ee("img"),U(t,"id","close"),Je(t.src,n=gf)||U(t,"src",n),U(t,"alt","icon-close"),U(t,"title","icon-close"),U(t,"loading","lazy"),U(t,"class","cursor-pointer svelte-1tas0dh")},m(s,o){at(s,t,o),r||(i=Ts(t,"click",e[5]),r=!0)},p:Qe,d(s){s&&He(t),r=!1,i()}}}function bf(e){let t,n;return{c(){var r;t=Ee("img"),U(t,"id","banner"),Je(t.src,n=(r=e[0].data)==null?void 0:r.media)||U(t,"src",n),U(t,"alt",""),U(t,"title",""),U(t,"loading","lazy"),U(t,"class","svelte-1tas0dh")},m(r,i){at(r,t,i)},p(r,i){var s;i&1&&!Je(t.src,n=(s=r[0].data)==null?void 0:s.media)&&U(t,"src",n)},d(r){r&&He(t)}}}function _f(e){let t,n;return{c(){var r;t=Ee("video"),U(t,"id","banner"),U(t,"width","250"),U(t,"height","250"),Je(t.src,n=(r=e[0].data)==null?void 0:r.media)||U(t,"src",n),t.controls=!1,t.autoplay=!0,U(t,"class","svelte-1tas0dh")},m(r,i){at(r,t,i)},p(r,i){var s;i&1&&!Je(t.src,n=(s=r[0].data)==null?void 0:s.media)&&U(t,"src",n)},d(r){r&&He(t)}}}function Nf(e){let t,n=e[1]&&!e[3]&&us(e);return{c(){n&&n.c(),t=gs()},m(r,i){n&&n.m(r,i),at(r,t,i)},p(r,[i]){r[1]&&!r[3]?n?(n.p(r,i),i&10&&tn(n,1)):(n=us(r),n.c(),tn(n,1),n.m(t.parentNode,t)):n&&(Va(),Ir(n,1,1,()=>{n=null}),Ua())},i(r){tn(n)},o(r){Ir(n)},d(r){r&&He(t),n&&n.d(r)}}}const If="global⮕widget⮕betarenaAdEngine⮕main",wf=0,Of=0;function Af(e,t,n){let r,i;Oa(e,wr,c=>n(4,i=c));let{adData:s}=t,o=!1,a=!1;_s(()=>{r||(setTimeout(()=>{n(1,o=!0),setTimeout(()=>{n(2,a=!0)},Of)},wf),Ef.updateData([["numberOfAdvertsActive",null]]))});const u=()=>{wr.updateData([["toggleAdShownState",void 0]])};return e.$$set=c=>{"adData"in c&&n(0,s=c.adData)},e.$$.update=()=>{e.$$.dirty&16&&n(3,{isBetarenaAdShownForToday:r}={...i},r)},[s,o,a,r,i,u]}class ls extends Pr{constructor(t){super(),Ur(this,t,Af,Nf,Xn,{adData:0},Tf)}}function Df(e){vs(e,"svelte-58lxu1",'@charset "UTF-8";div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1.svelte-58lxu1{overflow:hidden;border-radius:10px 10px 10px 10px;background-color:#383838}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1 p.svelte-58lxu1{font-family:"Roboto"}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1 img#banner.svelte-58lxu1{height:355px;width:100%}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1 iframe.svelte-58lxu1{width:100%}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1 div#main-box.svelte-58lxu1{padding:20px 20px 35px 20px}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1 div#main-box p#title.svelte-58lxu1{color:var(--white)}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1 div#main-box button.svelte-58lxu1{border-radius:7.57px;max-height:50px;width:100%;padding:10px;background:radial-gradient(97.9% 290.93% at 11.52% 99.71%, #2E6514 0%, #66BE3C 100%);color:var(--white)}')}function Sf(e){let t,n;return{c(){var r;t=Ee("img"),U(t,"id","banner"),Je(t.src,n=(r=e[0].data)==null?void 0:r.media)||U(t,"src",n),U(t,"alt",""),U(t,"title",""),U(t,"loading","lazy"),U(t,"class","svelte-58lxu1")},m(r,i){at(r,t,i)},p(r,i){var s;i&1&&!Je(t.src,n=(s=r[0].data)==null?void 0:s.media)&&U(t,"src",n)},d(r){r&&He(t)}}}function Rf(e){let t,n;return{c(){var r;t=Ee("iframe"),U(t,"width","250"),U(t,"height","250"),Je(t.src,n=(r=e[0].data)==null?void 0:r.media)||U(t,"src",n),U(t,"class","svelte-58lxu1")},m(r,i){at(r,t,i)},p(r,i){var s;i&1&&!Je(t.src,n=(s=r[0].data)==null?void 0:s.media)&&U(t,"src",n)},d(r){r&&He(t)}}}function Lf(e){var x,R;let t,n,r,i,s=((x=e[0].data)==null?void 0:x.title)+"",o,a,u,c,f=(((R=e[0].data)==null?void 0:R.cta_title)??"Recieve Bonus")+"",d,h,y,E,$,V,B,X;function z(M,v){var b;if((M[0].type==1||M[0].type==4)&&((b=M[0].data)!=null&&b.media))return Rf;if(M[0].type==2)return Sf}let Q=z(e),C=Q&&Q(e);return{c(){var M;t=Ee("div"),C&&C.c(),n=gt(),r=Ee("div"),i=Ee("p"),o=sn(s),a=gt(),u=Ee("a"),c=Ee("button"),d=sn(f),h=gt(),y=Ee("img"),U(i,"id","title"),U(i,"class","svelte-58lxu1"),U(y,"id",""),Je(y.src,E=ga)||U(y,"src",E),U(y,"alt","icon-arrow"),U(y,"title","icon-arrow"),U(y,"loading","lazy"),U(y,"class","m-l-10 "),U(c,"class","svelte-58lxu1"),U(u,"href",$=(M=e[0].data)==null?void 0:M.cta_link),U(u,"target","_blank"),U(u,"rel",`
284
+ noopener
285
+ noreferrer
286
+ `),U(r,"id","main-box"),U(r,"class","svelte-58lxu1"),U(t,"id",kf),U(t,"class","svelte-58lxu1")},m(M,v){at(M,t,v),C&&C.m(t,null),de(t,n),de(t,r),de(r,i),de(i,o),de(r,a),de(r,u),de(u,c),de(c,d),de(c,h),de(c,y),X=!0},p(M,[v]){var b,P,W;Q===(Q=z(M))&&C?C.p(M,v):(C&&C.d(1),C=Q&&Q(M),C&&(C.c(),C.m(t,n))),(!X||v&1)&&s!==(s=((b=M[0].data)==null?void 0:b.title)+"")&&br(o,s),(!X||v&1)&&f!==(f=(((P=M[0].data)==null?void 0:P.cta_title)??"Recieve Bonus")+"")&&br(d,f),(!X||v&1&&$!==($=(W=M[0].data)==null?void 0:W.cta_link))&&U(u,"href",$)},i(M){X||(M&&bt(()=>{X&&(B&&B.end(1),V=Os(t,Hn,{y:500,duration:500}),V.start())}),X=!0)},o(M){V&&V.invalidate(),M&&(B=As(t,Hn,{y:500,duration:500})),X=!1},d(M){M&&He(t),C&&C.d(),M&&B&&B.end()}}}const kf="global⮕widget⮕betarenaAdEngineX1⮕main";function Ff(e,t,n){let{adData:r}=t;return e.$$set=i=>{"adData"in i&&n(0,r=i.adData)},[r]}class xf extends Pr{constructor(t){super(),Ur(this,t,Ff,Lf,Xn,{adData:0},Df)}}function $f(e){let t,n,r,i,s=!1;return{c(){t=gs()},m(o,a){at(o,t,a),n=!0,r||(i=Ts(window,"resize",e[6]),r=!0)},p(o,[a]){},i(o){n||(tn(s),n=!0)},o(o){Ir(s),n=!1},d(o){o&&He(t),r=!1,i()}}}function Cf(e,t,n){let{deviceWidthList:r=[768,1024],authorId:i=null,authorArticleTagIds:s=[]}=t,o="desktop",a=null,u=new Map;function c(){var E;const y=document.querySelectorAll("[data-betarena-zone-id]");for(const $ of y){const V=(E=$.attributes.getNamedItem("data-betarena-zone-id"))==null?void 0:E.value;V&&u.set(parseInt(V),$)}}async function f(y){if(!document)return;const E=await ou(`${Ga}/ads`,y);console.log("response",E);const $=new Map(E.ads??[]),V=new Map(E.mapZoneIdToCampaignId);new Map(E.mapCampaignIdToCreativeId);const B=new Map(E.mapZoneIdToAuthorIds),X=new Map(E.mapZoneIdToTagIds);for(const[z,Q]of u){if(!a)continue;const C=V.get(z)??[],x=Tr(C.map(R=>{if($.has(R))return $.get(R)}));for(const R of x??[])new xf({target:Q,props:{adData:R}})}if(i||s.length>0){for(const[z,Q]of B){if(i&&!Q.includes(i))continue;const C=V.get(z)??[],x=Tr(C.map(R=>{if($.has(R))return $.get(R)}));console.log("creativeAdData",x);for(const R of x)new ls({target:document.body,props:{adData:R}})}for(const[z,Q]of X){if(i&&!Q.includes(i))continue;const C=V.get(z)??[],x=Tr(C.map(R=>{if($.has(R))return $.get(R)}));for(const R of x)new ls({target:document.body,props:{adData:R}})}}}async function d(){n(0,o=$i()),n(1,a=await au()),c(),f({deviceType:o,isoCountryCode:(a==null?void 0:a.country_code)??"EB",authorId:i,tagIds:s,zoneIds:[...u.keys()]})}_s(async()=>{wr.useLocalStorage(),await d()});const h=()=>{$i()};return e.$$set=y=>{"deviceWidthList"in y&&n(3,r=y.deviceWidthList),"authorId"in y&&n(4,i=y.authorId),"authorArticleTagIds"in y&&n(5,s=y.authorArticleTagIds)},[o,a,u,r,i,s,h]}class Mf extends Pr{constructor(t){super(),Ur(this,t,Cf,$f,Xn,{deviceWidthList:3,authorId:4,authorArticleTagIds:5})}}typeof document<"u"&&new Mf({target:document.body,props:{authorArticleTagIds:[1]}});