@betarena/ad-engine 0.0.49 → 0.0.51

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,64 @@
1
- var Na=Object.defineProperty;var Ia=(e,t,n)=>t in e?Na(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pr=(e,t,n)=>(Ia(e,typeof t!="symbol"?t+"":t,n),n);function Ye(){}const ds=e=>e;function ps(e){return e()}function Li(){return Object.create(null)}function Pt(e){e.forEach(ps)}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 He(e,t){return e===t?!0:(In||(In=document.createElement("a")),In.href=t,e===In.href)}function wa(e){return Object.keys(e).length===0}function Oa(e,...t){if(e==null){for(const r of t)r(void 0);return Ye}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Aa(e,t,n){e.$$.on_destroy.push(Oa(t,n))}function ki(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}const hs=typeof window<"u";let ms=hs?()=>window.performance.now():()=>Date.now(),Vr=hs?e=>requestAnimationFrame(e):Ye;const Rt=new Set;function ys(e){Rt.forEach(t=>{t.c(e)||(Rt.delete(t),t.f())}),Rt.size!==0&&Vr(ys)}function vs(e){let t;return Rt.size===0&&Vr(ys),{promise:new Promise(n=>{Rt.add(t={c:e,f:n})}),abort(){Rt.delete(t)}}}const Da=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function ue(e,t){e.appendChild(t)}function Es(e,t,n){const r=Ur(e);if(!r.getElementById(t)){const i=de("style");i.id=t,i.textContent=n,gs(r,i)}}function Ur(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Sa(e){const t=de("style");return t.textContent="/* empty */",gs(Ur(e),t),t.sheet}function gs(e,t){return ue(e.head||e,t),t.sheet}function Ke(e,t,n){e.insertBefore(t,n||null)}function Se(e){e.parentNode&&e.parentNode.removeChild(e)}function de(e){return document.createElement(e)}function sn(e){return document.createTextNode(e)}function ct(){return sn(" ")}function Ts(){return sn("")}function bs(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function $(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Ra(e){return Array.from(e.childNodes)}function _r(e,t){t=""+t,e.data!==t&&(e.data=t)}function La(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 ka(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}function Fa(e,t){const n={stylesheet:Sa(t),rules:{}};return Cn.set(e,n),n}function _s(e,t,n,r,i,s,o,a=0){const u=16.666/r;let c=`{
2
- `;for(let U=0;U<=1;U+=u){const P=t+(n-t)*s(U);c+=U*100+`%{${o(P,1-P)}}
1
+ var Ra=Object.defineProperty;var ka=(e,t,n)=>t in e?Ra(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var mr=(e,t,n)=>(ka(e,typeof t!="symbol"?t+"":t,n),n);function Fe(){}const bs=e=>e;function _s(e){return e()}function Vi(){return Object.create(null)}function Pt(e){e.forEach(_s)}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 Nn;function He(e,t){return e===t?!0:(Nn||(Nn=document.createElement("a")),Nn.href=t,e===Nn.href)}function La(e){return Object.keys(e).length===0}function Fa(e,...t){if(e==null){for(const r of t)r(void 0);return Fe}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function wr(e,t,n){e.$$.on_destroy.push(Fa(t,n))}function xa(e,t,n){return e.set(n),t}function Ui(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}const Ns=typeof window<"u";let Is=Ns?()=>window.performance.now():()=>Date.now(),Gr=Ns?e=>requestAnimationFrame(e):Fe;const Rt=new Set;function ws(e){Rt.forEach(t=>{t.c(e)||(Rt.delete(t),t.f())}),Rt.size!==0&&Gr(ws)}function Os(e){let t;return Rt.size===0&&Gr(ws),{promise:new Promise(n=>{Rt.add(t={c:e,f:n})}),abort(){Rt.delete(t)}}}const $a=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function ue(e,t){e.appendChild(t)}function Ds(e,t,n){const r=Qr(e);if(!r.getElementById(t)){const i=de("style");i.id=t,i.textContent=n,As(r,i)}}function Qr(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Ca(e){const t=de("style");return t.textContent="/* empty */",As(Qr(e),t),t.sheet}function As(e,t){return ue(e.head||e,t),t.sheet}function Ke(e,t,n){e.insertBefore(t,n||null)}function Se(e){e.parentNode&&e.parentNode.removeChild(e)}function de(e){return document.createElement(e)}function rn(e){return document.createTextNode(e)}function ct(){return rn(" ")}function Ss(){return rn("")}function Kn(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function $(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Ma(e){return Array.from(e.childNodes)}function Or(e,t){t=""+t,e.data!==t&&(e.data=t)}function Pi(e,t,n){e.classList.toggle(t,!!n)}function Va(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}const Mn=new Map;let Vn=0;function Ua(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}function Pa(e,t){const n={stylesheet:Ca(t),rules:{}};return Mn.set(e,n),n}function Rs(e,t,n,r,i,s,o,a=0){const u=16.666/r;let c=`{
2
+ `;for(let C=0;C<=1;C+=u){const j=t+(n-t)*s(C);c+=C*100+`%{${o(j,1-j)}}
3
3
  `}const f=c+`100% {${o(n,1-n)}}
4
- }`,d=`__svelte_${ka(f)}_${a}`,h=Ur(e),{stylesheet:v,rules:E}=Cn.get(h)||Fa(h,e);E[d]||(E[d]=!0,v.insertRule(`@keyframes ${d} ${f}`,v.cssRules.length));const M=e.style.animation||"";return e.style.animation=`${M?`${M}, `:""}${d} ${r}ms linear ${i}ms 1 both`,Mn+=1,d}function Nr(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||xa())}function xa(){Vr(()=>{Mn||(Cn.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&Se(t)}),Cn.clear())})}let on;function en(e){on=e}function $a(){if(!on)throw new Error("Function called outside component initialization");return on}function Ns(e){$a().$$.on_mount.push(e)}const Dt=[],Fi=[];let Lt=[];const xi=[],Ca=Promise.resolve();let Ir=!1;function Ma(){Ir||(Ir=!0,Ca.then(Is))}function bt(e){Lt.push(e)}const hr=new Set;let Ot=0;function Is(){if(Ot!==0)return;const e=on;do{try{for(;Ot<Dt.length;){const t=Dt[Ot];Ot++,en(t),Va(t.$$)}}catch(t){throw Dt.length=0,Ot=0,t}for(en(null),Dt.length=0,Ot=0;Fi.length;)Fi.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(;xi.length;)xi.pop()();Ir=!1,hr.clear(),en(e)}function Va(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 Ua(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 ws(){return zt||(zt=Promise.resolve(),zt.then(()=>{zt=null})),zt}function Vn(e,t,n){e.dispatchEvent(La(`${t?"intro":"outro"}${n}`))}const kn=new Set;let lt;function Pa(){lt={r:0,c:[],p:lt}}function ja(){lt.r||Pt(lt.c),lt=lt.p}function tn(e,t){e&&e.i&&(kn.delete(e),e.i(t))}function wr(e,t,n,r){if(e&&e.o){if(kn.has(e))return;kn.add(e),lt.c.push(()=>{kn.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}const Os={duration:0};function As(e,t,n){const r={direction:"in"};let i=t(e,n,r),s=!1,o,a,u=0;function c(){o&&Nr(e,o)}function f(){const{delay:h=0,duration:v=300,easing:E=ds,tick:M=Ye,css:U}=i||Os;U&&(o=_s(e,0,1,v,h,E,U,u++)),M(0,1);const P=ms()+h,z=P+v;a&&a.abort(),s=!0,bt(()=>Vn(e,!0,"start")),a=vs(Z=>{if(s){if(Z>=z)return M(1,0),Vn(e,!0,"end"),c(),s=!1;if(Z>=P){const Q=E((Z-P)/v);M(Q,1-Q)}}return s})}let d=!1;return{start(){d||(d=!0,Nr(e),zn(i)?(i=i(r),ws().then(f)):f())},invalidate(){d=!1},end(){s&&(c(),s=!1)}}}function Ds(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:h=ds,tick:v=Ye,css:E}=i||Os;E&&(o=_s(e,1,0,d,f,h,E));const M=ms()+f,U=M+d;bt(()=>Vn(e,!1,"start")),"inert"in e&&(u=e.inert,e.inert=!0),vs(P=>{if(s){if(P>=U)return v(0,1),Vn(e,!1,"end"),--a.r||Pt(a.c),!1;if(P>=M){const z=h((P-M)/d);v(1-z,z)}}return s})}return zn(i)?ws().then(()=>{i=i(r),c()}):c(),{end(f){f&&"inert"in e&&(e.inert=u),f&&i.tick&&i.tick(1,0),s&&(o&&Nr(e,o),s=!1)}}}function qa(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),bt(()=>{const s=e.$$.on_mount.map(ps).filter(zn);e.$$.on_destroy?e.$$.on_destroy.push(...s):Pt(s),e.$$.on_mount=[]}),i.forEach(bt)}function Ba(e,t){const n=e.$$;n.fragment!==null&&(Ua(n.after_update),Pt(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ga(e,t){e.$$.dirty[0]===-1&&(Dt.push(e),Ma(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Pr(e,t,n,r,i,s,o=null,a=[-1]){const u=on;en(e);const c=e.$$={fragment:null,ctx:[],props:s,update:Ye,not_equal:i,bound:Li(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Li(),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,...v)=>{const E=v.length?v[0]:h;return c.ctx&&i(c.ctx[d],c.ctx[d]=E)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](E),f&&Ga(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=Ra(t.target);c.fragment&&c.fragment.l(d),d.forEach(Se)}else c.fragment&&c.fragment.c();t.intro&&tn(e.$$.fragment),qa(e,t.target,t.anchor),Is()}en(u)}class jr{constructor(){pr(this,"$$");pr(this,"$$set")}$destroy(){Ba(this,1),this.$destroy=Ye}$on(t,n){if(!zn(n))return Ye;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&&!wa(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 Ya="https://betarena-test-e2748dab12f5.herokuapp.com",At=[];function Ss(e,t=Ye){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=Ye){const c=[a,u];return r.add(c),r.size===1&&(n=t(i,s)||Ye),a(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:o}}const Ja={isBetarenaAdShownForToday:!1,advertDateLastShown:null};function Ha(e){const{subscribe:t,set:n,update:r}=Ss(Ja),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 Or=Ha("betarena-ad-engine");var ie=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||{},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 Xa(e){return e&&DataView.prototype.isPrototypeOf(e)}if(De.arrayBuffer)var Wa=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Ka=ArrayBuffer.isView||function(e){return e&&Wa.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 qr(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=qr(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)]=qr(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 Rs(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function Za(e){var t=new FileReader,n=Rs(t);return t.readAsArrayBuffer(e),n}function eu(e){var t=new FileReader,n=Rs(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),n}function tu(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 $i(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Ls(){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&&Xa(e)?(this._bodyArrayBuffer=$i(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):De.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Ka(e))?this._bodyArrayBuffer=$i(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(Za);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=mr(this);if(e)return e;if(this._bodyBlob)return eu(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(tu(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(iu)}),this.json=function(){return this.text().then(JSON.parse)},this}var nu=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function ru(e){var t=e.toUpperCase();return nu.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=ru(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 iu(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 su(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}Ls.call(_t.prototype);function Ze(e,t){if(!(this instanceof Ze))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)}Ls.call(Ze.prototype);Ze.prototype.clone=function(){return new Ze(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _e(this.headers),url:this.url})};Ze.error=function(){var e=new Ze(null,{status:200,statusText:""});return e.status=0,e.type="error",e};var ou=[301,302,303,307,308];Ze.redirect=function(e,t){if(ou.indexOf(t)===-1)throw new RangeError("Invalid status code");return new Ze(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 ks(e,t){return new Promise(function(n,r){var i=new _t(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:su(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 Ze(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&&(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,qr(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)})}ks.polyfill=!0;Ie.fetch||(Ie.fetch=ks,Ie.Headers=_e,Ie.Request=_t,Ie.Response=Ze);self.fetch.bind(self);const au=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 uu(e,t){return console.log("path",e),console.log("data",t),await au(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 Ci(){const e=navigator.userAgent.toLowerCase(),t=e.includes("mobile"),n=/tablet|ipad/.test(e);return t?"mobile":n?"tablet":"desktop"}async function cu(){return await(await fetch("https://get.geojs.io/v1/ip/geo.json",{method:"GET"})).json()}var qt={},Ar={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 v(m){var A={next:function(){var B=m.shift();return{done:B===void 0,value:B}}};return a.iterable&&(A[Symbol.iterator]=function(){return A}),A}function E(m){this.map={},m instanceof E?m.forEach(function(A,B){this.append(B,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 B=this.map[m];this.map[m]=B?B+", "+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 B in this.map)this.map.hasOwnProperty(B)&&m.call(A,this.map[B],B,this)},E.prototype.keys=function(){var m=[];return this.forEach(function(A,B){m.push(B)}),v(m)},E.prototype.values=function(){var m=[];return this.forEach(function(A){m.push(A)}),v(m)},E.prototype.entries=function(){var m=[];return this.forEach(function(A,B){m.push([B,A])}),v(m)},a.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function M(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}function U(m){return new Promise(function(A,B){m.onload=function(){A(m.result)},m.onerror=function(){B(m.error)}})}function P(m){var A=new FileReader,B=U(A);return A.readAsArrayBuffer(m),B}function z(m){var A=new FileReader,B=U(A);return A.readAsText(m),B}function Z(m){for(var A=new Uint8Array(m),B=new Array(A.length),T=0;T<A.length;T++)B[T]=String.fromCharCode(A[T]);return B.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 V(){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=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?M(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(P)}),this.text=function(){var m=M(this);if(m)return m;if(this._bodyBlob)return z(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(y)}),this.json=function(){return this.text().then(JSON.parse)},this}var C=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function k(m){var A=m.toUpperCase();return C.indexOf(A)>-1?A:m}function L(m,A){A=A||{};var B=A.body;if(m instanceof L){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,!B&&m._bodyInit!=null&&(B=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=k(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")&&B)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(B)}L.prototype.clone=function(){return new L(this,{body:this._bodyInit})};function y(m){var A=new FormData;return m.trim().split("&").forEach(function(B){if(B){var T=B.split("="),w=T.shift().replace(/\+/g," "),b=T.join("=").replace(/\+/g," ");A.append(decodeURIComponent(w),decodeURIComponent(b))}}),A}function g(m){var A=new E,B=m.replace(/\r?\n[\t ]+/g," ");return B.split(/\r?\n/).forEach(function(T){var w=T.split(":"),b=w.shift().trim();if(b){var D=w.join(":").trim();A.append(b,D)}}),A}V.call(L.prototype);function j(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)}V.call(j.prototype),j.prototype.clone=function(){return new j(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},j.error=function(){var m=new j(null,{status:0,statusText:""});return m.type="error",m};var X=[301,302,303,307,308];j.redirect=function(m,A){if(X.indexOf(A)===-1)throw new RangeError("Invalid status code");return new j(null,{status:A,headers:{location:m}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(A,B){this.message=A,this.name=B;var T=Error(A);this.stack=T.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function oe(m,A){return new Promise(function(B,T){var w=new L(m,A);if(w.signal&&w.signal.aborted)return T(new o.DOMException("Aborted","AbortError"));var b=new XMLHttpRequest;function D(){b.abort()}b.onload=function(){var R={status:b.status,statusText:b.statusText,headers:g(b.getAllResponseHeaders()||"")};R.url="responseURL"in b?b.responseURL:R.headers.get("X-Request-URL");var p="response"in b?b.response:b.responseText;B(new j(p,R))},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(R,p){b.setRequestHeader(p,R)}),w.signal&&(w.signal.addEventListener("abort",D),b.onreadystatechange=function(){b.readyState===4&&w.signal.removeEventListener("abort",D)}),b.send(typeof w._bodyInit>"u"?null:w._bodyInit)})}return oe.polyfill=!0,s.fetch||(s.fetch=oe,s.Headers=E,s.Request=L,s.Response=j),o.Headers=E,o.Request=L,o.Response=j,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})(Ar,Ar.exports);var lu=Ar.exports,Gr={},Wn={},Fs=function(t){var n=t.uri,r=t.name,i=t.type;this.uri=n,this.name=r,this.type=i},fu=Fs,xs=function(t){return typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||t instanceof fu},du=xs,pu=function e(t,n,r){n===void 0&&(n=""),r===void 0&&(r=du);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=Fs;Wn.extractFiles=pu;Wn.isExtractableFile=xs;var hu=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 mu=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gr,"__esModule",{value:!0});var $s=Wn,yu=mu(hu),vu=pn,Eu=function(e){return(0,$s.isExtractableFile)(e)||e!==null&&typeof e=="object"&&typeof e.pipe=="function"};function gu(e,t,n,r){r===void 0&&(r=vu.defaultJsonSerializer);var i=(0,$s.extractFiles)({query:e,variables:t,operationName:n},"",Eu),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,v,E){return h.push({query:v,variables:t?t[E]:void 0}),h},[]);return r.stringify(a)}var u=typeof FormData>"u"?yu.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,v){c.append("".concat(++d),v)}),c}Gr.default=gu;var Le={};Object.defineProperty(Le,"__esModule",{value:!0});Le.parseBatchRequestsExtendedArgs=Le.parseRawRequestExtendedArgs=Le.parseRequestExtendedArgs=Le.parseBatchRequestArgs=Le.parseRawRequestArgs=Le.parseRequestArgs=void 0;function Tu(e,t,n){return e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0}}Le.parseRequestArgs=Tu;function bu(e,t,n){return e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0}}Le.parseRawRequestArgs=bu;function _u(e,t){return e.documents?e:{documents:e,requestHeaders:t,signal:void 0}}Le.parseBatchRequestArgs=_u;function Nu(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}}Le.parseRequestExtendedArgs=Nu;function Iu(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}}Le.parseRawRequestExtendedArgs=Iu;function wu(e,t,n){return e.documents?e:{url:e,documents:t,requestHeaders:n,signal:void 0}}Le.parseBatchRequestsExtendedArgs=wu;var hn={},Ou=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 Au=function(e){Ou(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=Au;var Ft={};const Du="16.6.0",Su=Object.freeze({major:16,minor:6,patch:0,preReleaseTag:null});function K(e,t){if(!!!e)throw new Error(t)}function Ce(e){return typeof(e==null?void 0:e.then)=="function"}function Me(e){return typeof e=="object"&&e!==null}function ye(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const Ru=/\r\n|[\n\r]/g;function Un(e,t){let n=0,r=1;for(const i of e.body.matchAll(Ru)){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 Cs(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 h=Math.floor(u/80),v=u%80,E=[];for(let M=0;M<d.length;M+=80)E.push(d.slice(M,M+80));return c+Mi([[`${o} |`,E[0]],...E.slice(1,h+1).map(M=>["|",M]),["|","^".padStart(v)],["|",E[h+1]]])}return c+Mi([[`${o-1} |`,f[i-1]],[`${o} |`,d],["|","^".padStart(u)],[`${o+1} |`,f[i+1]]])}function Mi(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 Lu(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}=Lu(n);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=f??void 0,this.nodes=Vi(Array.isArray(o)?o:o?[o]:void 0);const h=Vi((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 v=Me(f==null?void 0:f.extensions)?f==null?void 0:f.extensions:void 0;this.extensions=(s=d??v)!==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_${Ua(f)}_${a}`,h=Qr(e),{stylesheet:v,rules:g}=Mn.get(h)||Pa(h,e);g[d]||(g[d]=!0,v.insertRule(`@keyframes ${d} ${f}`,v.cssRules.length));const P=e.style.animation||"";return e.style.animation=`${P?`${P}, `:""}${d} ${r}ms linear ${i}ms 1 both`,Vn+=1,d}function Dr(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(", "),Vn-=i,Vn||ja())}function ja(){Gr(()=>{Vn||(Mn.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&Se(t)}),Mn.clear())})}let sn;function en(e){sn=e}function Ba(){if(!sn)throw new Error("Function called outside component initialization");return sn}function ks(e){Ba().$$.on_mount.push(e)}const At=[],ji=[];let kt=[];const Bi=[],qa=Promise.resolve();let Ar=!1;function Ga(){Ar||(Ar=!0,qa.then(Ls))}function bt(e){kt.push(e)}const yr=new Set;let Ot=0;function Ls(){if(Ot!==0)return;const e=sn;do{try{for(;Ot<At.length;){const t=At[Ot];Ot++,en(t),Qa(t.$$)}}catch(t){throw At.length=0,Ot=0,t}for(en(null),At.length=0,Ot=0;ji.length;)ji.pop()();for(let t=0;t<kt.length;t+=1){const n=kt[t];yr.has(n)||(yr.add(n),n())}kt.length=0}while(At.length);for(;Bi.length;)Bi.pop()();Ar=!1,yr.clear(),en(e)}function Qa(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 Ya(e){const t=[],n=[];kt.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),kt=t}let zt;function Fs(){return zt||(zt=Promise.resolve(),zt.then(()=>{zt=null})),zt}function Un(e,t,n){e.dispatchEvent(Va(`${t?"intro":"outro"}${n}`))}const Ln=new Set;let lt;function Ja(){lt={r:0,c:[],p:lt}}function Ha(){lt.r||Pt(lt.c),lt=lt.p}function Fn(e,t){e&&e.i&&(Ln.delete(e),e.i(t))}function qi(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 xs={duration:0};function $s(e,t,n){const r={direction:"in"};let i=t(e,n,r),s=!1,o,a,u=0;function c(){o&&Dr(e,o)}function f(){const{delay:h=0,duration:v=300,easing:g=bs,tick:P=Fe,css:C}=i||xs;C&&(o=Rs(e,0,1,v,h,g,C,u++)),P(0,1);const j=Is()+h,z=j+v;a&&a.abort(),s=!0,bt(()=>Un(e,!0,"start")),a=Os(H=>{if(s){if(H>=z)return P(1,0),Un(e,!0,"end"),c(),s=!1;if(H>=j){const Z=g((H-j)/v);P(Z,1-Z)}}return s})}let d=!1;return{start(){d||(d=!0,Dr(e),Xn(i)?(i=i(r),Fs().then(f)):f())},invalidate(){d=!1},end(){s&&(c(),s=!1)}}}function Cs(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:h=bs,tick:v=Fe,css:g}=i||xs;g&&(o=Rs(e,1,0,d,f,h,g));const P=Is()+f,C=P+d;bt(()=>Un(e,!1,"start")),"inert"in e&&(u=e.inert,e.inert=!0),Os(j=>{if(s){if(j>=C)return v(0,1),Un(e,!1,"end"),--a.r||Pt(a.c),!1;if(j>=P){const z=h((j-P)/d);v(1-z,z)}}return s})}return Xn(i)?Fs().then(()=>{i=i(r),c()}):c(),{end(f){f&&"inert"in e&&(e.inert=u),f&&i.tick&&i.tick(1,0),s&&(o&&Dr(e,o),s=!1)}}}function za(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),bt(()=>{const s=e.$$.on_mount.map(_s).filter(Xn);e.$$.on_destroy?e.$$.on_destroy.push(...s):Pt(s),e.$$.on_mount=[]}),i.forEach(bt)}function Xa(e,t){const n=e.$$;n.fragment!==null&&(Ya(n.after_update),Pt(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Wa(e,t){e.$$.dirty[0]===-1&&(At.push(e),Ga(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Yr(e,t,n,r,i,s,o=null,a=[-1]){const u=sn;en(e);const c=e.$$={fragment:null,ctx:[],props:s,update:Fe,not_equal:i,bound:Vi(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Vi(),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,...v)=>{const g=v.length?v[0]:h;return c.ctx&&i(c.ctx[d],c.ctx[d]=g)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](g),f&&Wa(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=Ma(t.target);c.fragment&&c.fragment.l(d),d.forEach(Se)}else c.fragment&&c.fragment.c();t.intro&&Fn(e.$$.fragment),za(e,t.target,t.anchor),Ls()}en(u)}class Jr{constructor(){mr(this,"$$");mr(this,"$$set")}$destroy(){Xa(this,1),this.$destroy=Fe}$on(t,n){if(!Xn(n))return Fe;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&&!La(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ka="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ka);const Sr="https://ads.betarena.com",Dt=[];function Hr(e,t=Fe){let n;const r=new Set;function i(a){if(Wn(e,a)&&(e=a,n)){const u=!Dt.length;for(const c of r)c[1](),Dt.push(c,e);if(u){for(let c=0;c<Dt.length;c+=2)Dt[c][0](Dt[c+1]);Dt.length=0}}}function s(a){i(a(e))}function o(a,u=Fe){const c=[a,u];return r.add(c),r.size===1&&(n=t(i,s)||Fe),a(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:o}}const Za={isBetarenaAdShownForToday:!1,advertDateLastShown:null};function eu(e){const{subscribe:t,set:n,update:r}=Hr(Za),i={useLocalStorage:()=>{let s=i.parseLocalStorage();s==null&&(s={isBetarenaAdShownForToday:!1,advertDateLastShown:null}),i.setLocalStorage(s),s.isBetarenaAdShownForToday&&new Date(s.advertDateLastShown).getDate()!=new Date().getDate()&&i.updateData([["toggleAdShownState",void 0]])},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 Rr=eu("betarena-ad-engine");var se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tu(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||{},Ae={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 nu(e){return e&&DataView.prototype.isPrototypeOf(e)}if(Ae.arrayBuffer)var ru=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],iu=ArrayBuffer.isView||function(e){return e&&ru.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 zr(e){return typeof e!="string"&&(e=String(e)),e}function Xr(e){var t={next:function(){var n=e.shift();return{done:n===void 0,value:n}}};return Ae.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=zr(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)]=zr(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)}),Xr(e)};_e.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),Xr(e)};_e.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),Xr(e)};Ae.iterable&&(_e.prototype[Symbol.iterator]=_e.prototype.entries);function vr(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function Ms(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function su(e){var t=new FileReader,n=Ms(t);return t.readAsArrayBuffer(e),n}function ou(e){var t=new FileReader,n=Ms(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),n}function au(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 Gi(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Vs(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:Ae.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Ae.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Ae.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Ae.arrayBuffer&&Ae.blob&&nu(e)?(this._bodyArrayBuffer=Gi(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Ae.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||iu(e))?this._bodyArrayBuffer=Gi(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):Ae.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Ae.blob&&(this.blob=function(){var e=vr(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=vr(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(Ae.blob)return this.blob().then(su);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=vr(this);if(e)return e;if(this._bodyBlob)return ou(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(au(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Ae.formData&&(this.formData=function(){return this.text().then(lu)}),this.json=function(){return this.text().then(JSON.parse)},this}var uu=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function cu(e){var t=e.toUpperCase();return uu.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=cu(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 lu(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 fu(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}Vs.call(_t.prototype);function Ze(e,t){if(!(this instanceof Ze))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)}Vs.call(Ze.prototype);Ze.prototype.clone=function(){return new Ze(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _e(this.headers),url:this.url})};Ze.error=function(){var e=new Ze(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var du=[301,302,303,307,308];Ze.redirect=function(e,t){if(du.indexOf(t)===-1)throw new RangeError("Invalid status code");return new Ze(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 Us(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:fu(s.getAllResponseHeaders()||"")};i.url.indexOf("file://")===0&&(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 Ze(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 timed out"))},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&&(Ae.blob?s.responseType="blob":Ae.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,zr(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)})}Us.polyfill=!0;Ie.fetch||(Ie.fetch=Us,Ie.Headers=_e,Ie.Request=_t,Ie.Response=Ze);self.fetch.bind(self);const pu=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 kr(e,t){return console.log("path",e),console.log("data",t),await pu(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 Qi(){const e=navigator.userAgent.toLowerCase(),t=e.includes("mobile"),n=/tablet|ipad/.test(e);return t?"mobile":n?"tablet":"desktop"}async function hu(){return await(await fetch("https://get.geojs.io/v1/ip/geo.json",{method:"GET"})).json()}var Bt={},Lr={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 h(m){return typeof m!="string"&&(m=String(m)),m}function v(m){var O={next:function(){var G=m.shift();return{done:G===void 0,value:G}}};return a.iterable&&(O[Symbol.iterator]=function(){return O}),O}function g(m){this.map={},m instanceof g?m.forEach(function(O,G){this.append(G,O)},this):Array.isArray(m)?m.forEach(function(O){this.append(O[0],O[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(O){this.append(O,m[O])},this)}g.prototype.append=function(m,O){m=d(m),O=h(O);var G=this.map[m];this.map[m]=G?G+", "+O:O},g.prototype.delete=function(m){delete this.map[d(m)]},g.prototype.get=function(m){return m=d(m),this.has(m)?this.map[m]:null},g.prototype.has=function(m){return this.map.hasOwnProperty(d(m))},g.prototype.set=function(m,O){this.map[d(m)]=h(O)},g.prototype.forEach=function(m,O){for(var G in this.map)this.map.hasOwnProperty(G)&&m.call(O,this.map[G],G,this)},g.prototype.keys=function(){var m=[];return this.forEach(function(O,G){m.push(G)}),v(m)},g.prototype.values=function(){var m=[];return this.forEach(function(O){m.push(O)}),v(m)},g.prototype.entries=function(){var m=[];return this.forEach(function(O,G){m.push([G,O])}),v(m)},a.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function P(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}function C(m){return new Promise(function(O,G){m.onload=function(){O(m.result)},m.onerror=function(){G(m.error)}})}function j(m){var O=new FileReader,G=C(O);return O.readAsArrayBuffer(m),G}function z(m){var O=new FileReader,G=C(O);return O.readAsText(m),G}function H(m){for(var O=new Uint8Array(m),G=new Array(O.length),E=0;E<O.length;E++)G[E]=String.fromCharCode(O[E]);return G.join("")}function Z(m){if(m.slice)return m.slice(0);var O=new Uint8Array(m.byteLength);return O.set(new Uint8Array(m)),O.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=Z(m.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(m)||f(m))?this._bodyArrayBuffer=Z(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=P(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?P(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(j)}),this.text=function(){var m=P(this);if(m)return m;if(this._bodyBlob)return z(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(H(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(y)}),this.json=function(){return this.text().then(JSON.parse)},this}var k=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function M(m){var O=m.toUpperCase();return k.indexOf(O)>-1?O:m}function x(m,O){O=O||{};var G=O.body;if(m instanceof x){if(m.bodyUsed)throw new TypeError("Already read");this.url=m.url,this.credentials=m.credentials,O.headers||(this.headers=new g(m.headers)),this.method=m.method,this.mode=m.mode,this.signal=m.signal,!G&&m._bodyInit!=null&&(G=m._bodyInit,m.bodyUsed=!0)}else this.url=String(m);if(this.credentials=O.credentials||this.credentials||"same-origin",(O.headers||!this.headers)&&(this.headers=new g(O.headers)),this.method=M(O.method||this.method||"GET"),this.mode=O.mode||this.mode||null,this.signal=O.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&G)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(G)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})};function y(m){var O=new FormData;return m.trim().split("&").forEach(function(G){if(G){var E=G.split("="),w=E.shift().replace(/\+/g," "),T=E.join("=").replace(/\+/g," ");O.append(decodeURIComponent(w),decodeURIComponent(T))}}),O}function _(m){var O=new g,G=m.replace(/\r?\n[\t ]+/g," ");return G.split(/\r?\n/).forEach(function(E){var w=E.split(":"),T=w.shift().trim();if(T){var A=w.join(":").trim();O.append(T,A)}}),O}U.call(x.prototype);function B(m,O){O||(O={}),this.type="default",this.status=O.status===void 0?200:O.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in O?O.statusText:"OK",this.headers=new g(O.headers),this.url=O.url||"",this._initBody(m)}U.call(B.prototype),B.prototype.clone=function(){return new B(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},B.error=function(){var m=new B(null,{status:0,statusText:""});return m.type="error",m};var V=[301,302,303,307,308];B.redirect=function(m,O){if(V.indexOf(O)===-1)throw new RangeError("Invalid status code");return new B(null,{status:O,headers:{location:m}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(O,G){this.message=O,this.name=G;var E=Error(O);this.stack=E.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function ne(m,O){return new Promise(function(G,E){var w=new x(m,O);if(w.signal&&w.signal.aborted)return E(new o.DOMException("Aborted","AbortError"));var T=new XMLHttpRequest;function A(){T.abort()}T.onload=function(){var R={status:T.status,statusText:T.statusText,headers:_(T.getAllResponseHeaders()||"")};R.url="responseURL"in T?T.responseURL:R.headers.get("X-Request-URL");var p="response"in T?T.response:T.responseText;G(new B(p,R))},T.onerror=function(){E(new TypeError("Network request failed"))},T.ontimeout=function(){E(new TypeError("Network request failed"))},T.onabort=function(){E(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(R,p){T.setRequestHeader(p,R)}),w.signal&&(w.signal.addEventListener("abort",A),T.onreadystatechange=function(){T.readyState===4&&w.signal.removeEventListener("abort",A)}),T.send(typeof w._bodyInit>"u"?null:w._bodyInit)})}return ne.polyfill=!0,s.fetch||(s.fetch=ne,s.Headers=g,s.Request=x,s.Response=B),o.Headers=g,o.Request=x,o.Response=B,o.fetch=ne,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})(Lr,Lr.exports);var mu=Lr.exports,Wr={},Zn={},Ps=function(t){var n=t.uri,r=t.name,i=t.type;this.uri=n,this.name=r,this.type=i},yu=Ps,js=function(t){return typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||t instanceof yu},vu=js,gu=function e(t,n,r){n===void 0&&(n=""),r===void 0&&(r=vu);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}};Zn.ReactNativeFile=Ps;Zn.extractFiles=gu;Zn.isExtractableFile=js;var Eu=typeof self=="object"?self.FormData:window.FormData,dn={};Object.defineProperty(dn,"__esModule",{value:!0});dn.defaultJsonSerializer=void 0;dn.defaultJsonSerializer={parse:JSON.parse,stringify:JSON.stringify};var Tu=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wr,"__esModule",{value:!0});var Bs=Zn,bu=Tu(Eu),_u=dn,Nu=function(e){return(0,Bs.isExtractableFile)(e)||e!==null&&typeof e=="object"&&typeof e.pipe=="function"};function Iu(e,t,n,r){r===void 0&&(r=_u.defaultJsonSerializer);var i=(0,Bs.extractFiles)({query:e,variables:t,operationName:n},"",Nu),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,v,g){return h.push({query:v,variables:t?t[g]:void 0}),h},[]);return r.stringify(a)}var u=typeof FormData>"u"?bu.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,v){c.append("".concat(++d),v)}),c}Wr.default=Iu;var ke={};Object.defineProperty(ke,"__esModule",{value:!0});ke.parseBatchRequestsExtendedArgs=ke.parseRawRequestExtendedArgs=ke.parseRequestExtendedArgs=ke.parseBatchRequestArgs=ke.parseRawRequestArgs=ke.parseRequestArgs=void 0;function wu(e,t,n){return e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0}}ke.parseRequestArgs=wu;function Ou(e,t,n){return e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0}}ke.parseRawRequestArgs=Ou;function Du(e,t){return e.documents?e:{documents:e,requestHeaders:t,signal:void 0}}ke.parseBatchRequestArgs=Du;function Au(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}}ke.parseRequestExtendedArgs=Au;function Su(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}}ke.parseRawRequestExtendedArgs=Su;function Ru(e,t,n){return e.documents?e:{url:e,documents:t,requestHeaders:n,signal:void 0}}ke.parseBatchRequestsExtendedArgs=Ru;var pn={},ku=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(pn,"__esModule",{value:!0});pn.ClientError=void 0;var Lu=function(e){ku(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);pn.ClientError=Lu;var Ft={};const Fu="16.8.1",xu=Object.freeze({major:16,minor:8,patch:1,preReleaseTag:null});function K(e,t){if(!!!e)throw new Error(t)}function Me(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 $u=/\r\n|[\n\r]/g;function Pn(e,t){let n=0,r=1;for(const i of e.body.matchAll($u)){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 qs(e){return Kr(e.source,Pn(e.source,e.start))}function Kr(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),v=u%80,g=[];for(let P=0;P<d.length;P+=80)g.push(d.slice(P,P+80));return c+Yi([[`${o} |`,g[0]],...g.slice(1,h+1).map(P=>["|",P]),["|","^".padStart(v)],["|",g[h+1]]])}return c+Yi([[`${o-1} |`,f[i-1]],[`${o} |`,d],["|","^".padStart(u)],[`${o+1} |`,f[i+1]]])}function Yi(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 Cu(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 b extends Error{constructor(t,...n){var r,i,s;const{nodes:o,source:a,positions:u,path:c,originalError:f,extensions:d}=Cu(n);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=f??void 0,this.nodes=Ji(Array.isArray(o)?o:o?[o]:void 0);const h=Ji((r=this.nodes)===null||r===void 0?void 0:r.map(g=>g.loc).filter(g=>g!=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(g=>g.start)),this.locations=u&&a?u.map(g=>Pn(a,g)):h==null?void 0:h.map(g=>Pn(g.source,g.start));const v=Ve(f==null?void 0:f.extensions)?f==null?void 0:f.extensions:void 0;this.extensions=(s=d??v)!==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,b):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
- `+Cs(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
9
+ `+qs(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 Vi(e){return e===void 0||e.length===0?void 0:e}function ku(e){return e.toString()}function Fu(e){return e.toJSON()}function Te(e,t,n){return new _(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Ms{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 Yr{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 Vs={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"]},xu=new Set(Object.keys(Vs));function Dr(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&xu.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 Sr(e){return e===9||e===32}function an(e){return e>=48&&e<=57}function Us(e){return e>=97&&e<=122||e>=65&&e<=90}function Jr(e){return Us(e)||e===95}function Ps(e){return Us(e)||an(e)||e===95}function $u(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=Cu(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 Cu(e){let t=0;for(;t<e.length&&Sr(e.charCodeAt(t));)++t;return t}function Mu(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(v=>v.length===0||Sr(v.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&&Sr(e.charCodeAt(0));return(f&&!h||s)&&(d+=`
11
+ `+Kr(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 Ji(e){return e===void 0||e.length===0?void 0:e}function Mu(e){return e.toString()}function Vu(e){return e.toJSON()}function Te(e,t,n){return new b(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Gs{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 Zr{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 Qs={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"]},Uu=new Set(Object.keys(Qs));function Fr(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&Uu.has(t)}var be;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(be||(be={}));var Q;(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"})(Q||(Q={}));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 xr(e){return e===9||e===32}function on(e){return e>=48&&e<=57}function Ys(e){return e>=97&&e<=122||e>=65&&e<=90}function ei(e){return Ys(e)||e===95}function Js(e){return Ys(e)||on(e)||e===95}function Pu(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=ju(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 ju(e){let t=0;for(;t<e.length&&xr(e.charCodeAt(t));)++t;return t}function Bu(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 Hs(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(v=>v.length===0||xr(v.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&&xr(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 Hr{constructor(t){const n=new Yr(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=Vu(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===N.COMMENT);return t}}function qs(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 Bt(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Kn(e,t){return Bs(e.charCodeAt(t))&&Gs(e.charCodeAt(t+1))}function Bs(e){return e>=55296&&e<=56319}function Gs(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 Ee(e,t,n,r,i){const s=e.line,o=1+n-e.lineStart;return new Yr(t,n,r,s,o,i)}function Vu(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 Uu(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):ju(e,i)}if(an(s)||s===45)return Pu(e,i,s);if(Jr(s))return Yu(e,i);throw Te(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Bt(s)||Kn(n,i)?`Unexpected character: ${Nt(e,i)}.`:`Invalid character: ${Nt(e,i)}.`)}return Ee(e,N.EOF,r,r)}function Uu(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(Bt(s))++i;else if(Kn(n,i))i+=2;else break}return Ee(e,N.COMMENT,t,i,n.slice(t+1,i))}function Pu(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||Jr(s))throw Te(e.source,i,`Invalid number, expected digit but got: ${Nt(e,i)}.`);return Ee(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 ju(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?qu(e,i):Bu(e,i):Gu(e,i);o+=u.value,i+=u.size,s=i;continue}if(a===10||a===13)break;if(Bt(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 qu(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||!Bt(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 Bu(e,t){const n=e.source.body,r=Ui(n,t+2);if(Bt(r))return{value:String.fromCodePoint(r),size:6};if(Bs(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=Ui(n,t+8);if(Gs(i))return{value:String.fromCodePoint(r,i),size:12}}throw Te(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Ui(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 Gu(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,$u(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(Bt(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 Yu(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(Ps(s))++i;else break}return Ee(e,N.NAME,t,i,n.slice(t,i))}const Ju=10,Qs=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 Hu(e,t);default:return String(e)}}function Hu(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:Zn(r,n)}else if(Array.isArray(e))return Wu(e,n);return Xu(e,n)}function zu(e){return typeof e.toJSON=="function"}function Xu(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Qs?"["+Ku(e)+"]":"{ "+n.map(([i,s])=>i+": "+Zn(s,t)).join(", ")+" }"}function Wu(e,t){if(e.length===0)return"[]";if(t.length>Qs)return"[Array]";const n=Math.min(Ju,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 Ku(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"||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 Ys(e){return ze(e,er)}function tr(e,t){return new nr(e,t).parseDocument()}function Js(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(N.EOF),r}function Zu(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseConstValueLiteral();return n.expectToken(N.EOF),r}function ec(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=Ys(t)?t:new er(t);this._lexer=new Hr(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 Ms(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 ${Hs(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 Hs(e.kind)+(t!=null?` "${t}"`:"")}function Hs(e){return qs(e)?`"${e}"`:e}const tc=5;function st(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,tc),a=o.pop();return i+o.join(", ")+", or "+a+"?"}function Pi(e){return e}function ot(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 it(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-Rr,i=e.charCodeAt(n);while(On(i)&&o>0);let a=0;do++r,a=a*10+s-Rr,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 Rr=48,nc=57;function On(e){return!isNaN(e)&&Rr<=e&&e<=nc}function mt(e,t){const n=Object.create(null),r=new rc(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 rc{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=ji(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=ji(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 v=h[0]=f;for(let E=1;E<=a;E++){const M=i[f-1]===s[E-1]?0:1;let U=Math.min(d[E]+1,h[E-1]+1,d[E-1]+M);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];U=Math.min(U,P+1)}U<v&&(v=U),h[E]=U}if(v>n)return}const c=u[o%3][a];return c<=n?c:void 0}}function ji(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 ic(e){return`"${e.replace(sc,oc)}"`}const sc=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function oc(e){return ac[e.charCodeAt(0)]}const ac=["\\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=Vs){const r=new Map;for(const P of Object.values(l))r.set(P,xt(t,P));let i,s=Array.isArray(e),o=[e],a=-1,u=[],c=e,f,d;const h=[],v=[];do{a++;const P=a===o.length,z=P&&u.length!==0;if(P){if(f=v.length===0?void 0:h[h.length-1],c=d,d=v.pop(),z)if(s){c=c.slice();let Q=0;for(const[V,C]of u){const k=V-Q;C===null?(c.splice(k,1),Q++):c[k]=C}}else{c=Object.defineProperties({},Object.getOwnPropertyDescriptors(c));for(const[Q,V]of u)c[Q]=V}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,M;Dr(c)||K(!1,`Invalid AST Node: ${I(c)}.`);const Q=P?(E=r.get(c.kind))===null||E===void 0?void 0:E.leave:(M=r.get(c.kind))===null||M===void 0?void 0:M.enter;if(Z=Q==null?void 0:Q.call(t,c,f,d,h,v),Z===St)break;if(Z===!1){if(!P){h.pop();continue}}else if(Z!==void 0&&(u.push([f,Z]),!P))if(Dr(Z))c=Z;else{h.pop();continue}}if(Z===void 0&&z&&u.push([f,c]),P)h.pop();else{var U;i={inArray:s,index:a,keys:o,edits:u,prev:i},s=Array.isArray(c),o=s?c:(U=n[c.kind])!==null&&U!==void 0?U:[],a=-1,u=[],d&&v.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}=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 uc(e,t,n){const{enter:r,leave:i}=xt(e,t);return n?i:r}function ce(e){return Gt(e,lc)}const cc=80,lc={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>q(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 ti{constructor(t){const n=new Zr(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=qu(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===N.COMMENT);return t}}function zs(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 er(e,t){return Xs(e.charCodeAt(t))&&Ws(e.charCodeAt(t+1))}function Xs(e){return e>=55296&&e<=56319}function Ws(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 ge(e,t,n,r,i){const s=e.line,o=1+n-e.lineStart;return new Zr(t,n,r,s,o,i)}function qu(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 Gu(e,i);case 33:return ge(e,N.BANG,i,i+1);case 36:return ge(e,N.DOLLAR,i,i+1);case 38:return ge(e,N.AMP,i,i+1);case 40:return ge(e,N.PAREN_L,i,i+1);case 41:return ge(e,N.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return ge(e,N.SPREAD,i,i+3);break;case 58:return ge(e,N.COLON,i,i+1);case 61:return ge(e,N.EQUALS,i,i+1);case 64:return ge(e,N.AT,i,i+1);case 91:return ge(e,N.BRACKET_L,i,i+1);case 93:return ge(e,N.BRACKET_R,i,i+1);case 123:return ge(e,N.BRACE_L,i,i+1);case 124:return ge(e,N.PIPE,i,i+1);case 125:return ge(e,N.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?Xu(e,i):Yu(e,i)}if(on(s)||s===45)return Qu(e,i,s);if(ei(s))return Wu(e,i);throw Te(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:qt(s)||er(n,i)?`Unexpected character: ${Nt(e,i)}.`:`Invalid character: ${Nt(e,i)}.`)}return ge(e,N.EOF,r,r)}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(s===10||s===13)break;if(qt(s))++i;else if(er(n,i))i+=2;else break}return ge(e,N.COMMENT,t,i,n.slice(t+1,i))}function Qu(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),on(s))throw Te(e.source,i,`Invalid number, unexpected digit after 0: ${Nt(e,i)}.`)}else i=gr(e,i,s),s=r.charCodeAt(i);if(s===46&&(o=!0,s=r.charCodeAt(++i),i=gr(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=gr(e,i,s),s=r.charCodeAt(i)),s===46||ei(s))throw Te(e.source,i,`Invalid number, expected digit but got: ${Nt(e,i)}.`);return ge(e,o?N.FLOAT:N.INT,t,i,r.slice(t,i))}function gr(e,t,n){if(!on(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(;on(r.charCodeAt(i));)++i;return i}function Yu(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),ge(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?Ju(e,i):Hu(e,i):zu(e,i);o+=u.value,i+=u.size,s=i;continue}if(a===10||a===13)break;if(qt(a))++i;else if(er(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 Ju(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 Hu(e,t){const n=e.source.body,r=Hi(n,t+2);if(qt(r))return{value:String.fromCodePoint(r),size:6};if(Xs(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=Hi(n,t+8);if(Ws(i))return{value:String.fromCodePoint(r,i),size:12}}throw Te(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Hi(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 zu(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 Xu(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=ge(e,N.BLOCK_STRING,t,s+3,Pu(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(er(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 Wu(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(Js(s))++i;else break}return ge(e,N.NAME,t,i,n.slice(t,i))}const Ku=10,Ks=2;function I(e){return tr(e,[])}function tr(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Zu(e,t);default:return String(e)}}function Zu(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(ec(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:tr(r,n)}else if(Array.isArray(e))return nc(e,n);return tc(e,n)}function ec(e){return typeof e.toJSON=="function"}function tc(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Ks?"["+rc(e)+"]":"{ "+n.map(([i,s])=>i+": "+tr(s,t)).join(", ")+" }"}function nc(e,t){if(e.length===0)return"[]";if(t.length>Ks)return"[Array]";const n=Math.min(Ku,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(tr(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function rc(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=globalThis.process?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;const i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){const o=I(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm.
16
16
 
17
- `)},OperationDefinition:{leave(e){const t=ee("(",q(e.variableDefinitions,", "),")"),n=q([e.operation,q([e.name,t]),q(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+ee(" = ",n)+ee(" ",q(r," "))},SelectionSet:{leave:({selections:e})=>Ge(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const s=ee("",e,": ")+t;let o=s+ee("(",q(n,", "),")");return o.length>cc&&(o=s+ee(`(
18
- `,Fn(q(n,`
17
+ Ensure that there is only one instance of "graphql" in the node_modules
18
+ directory. If different versions of "graphql" are the dependencies of other
19
+ relied on modules, use "resolutions" to ensure only one version is installed.
20
+
21
+ https://yarnpkg.com/en/docs/selective-version-resolutions
22
+
23
+ Duplicate "graphql" modules cannot be used at the same time since different
24
+ versions may have different capabilities and behavior. The data from one
25
+ version used in the function from another could produce confusing and
26
+ spurious results.`)}}return!1};class nr{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 Zs(e){return ze(e,nr)}function rr(e,t){return new ir(e,t).parseDocument()}function eo(e,t){const n=new ir(e,t);n.expectToken(N.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(N.EOF),r}function ic(e,t){const n=new ir(e,t);n.expectToken(N.SOF);const r=n.parseConstValueLiteral();return n.expectToken(N.EOF),r}function sc(e,t){const n=new ir(e,t);n.expectToken(N.SOF);const r=n.parseTypeReference();return n.expectToken(N.EOF),r}class ir{constructor(t,n={}){const r=Zs(t)?t:new nr(t);this._lexer=new ti(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,`${In(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(Q,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Gs(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 ${to(t)}, found ${In(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 ${In(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 ${In(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 In(e){const t=e.value;return to(e.kind)+(t!=null?` "${t}"`:"")}function to(e){return zs(e)?`"${e}"`:e}const oc=5;function st(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,oc),a=o.pop();return i+o.join(", ")+", or "+a+"?"}function zi(e){return e}function ot(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 it(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function hn(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),s=t.charCodeAt(r);if(wn(i)&&wn(s)){let o=0;do++n,o=o*10+i-$r,i=e.charCodeAt(n);while(wn(i)&&o>0);let a=0;do++r,a=a*10+s-$r,s=t.charCodeAt(r);while(wn(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 $r=48,ac=57;function wn(e){return!isNaN(e)&&$r<=e&&e<=ac}function mt(e,t){const n=Object.create(null),r=new uc(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:hn(s,o)})}class uc{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=Xi(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=Xi(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 v=h[0]=f;for(let g=1;g<=a;g++){const P=i[f-1]===s[g-1]?0:1;let C=Math.min(d[g]+1,h[g-1]+1,d[g-1]+P);if(f>1&&g>1&&i[f-1]===s[g-2]&&i[f-2]===s[g-1]){const j=u[(f-2)%3][g-2];C=Math.min(C,j+1)}C<v&&(v=C),h[g]=C}if(v>n)return}const c=u[o%3][a];return c<=n?c:void 0}}function Xi(e){const t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}function Ge(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 cc(e){return`"${e.replace(lc,fc)}"`}const lc=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function fc(e){return dc[e.charCodeAt(0)]}const dc=["\\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=Qs){const r=new Map;for(const j of Object.values(l))r.set(j,xt(t,j));let i,s=Array.isArray(e),o=[e],a=-1,u=[],c=e,f,d;const h=[],v=[];do{a++;const j=a===o.length,z=j&&u.length!==0;if(j){if(f=v.length===0?void 0:h[h.length-1],c=d,d=v.pop(),z)if(s){c=c.slice();let Z=0;for(const[U,k]of u){const M=U-Z;k===null?(c.splice(M,1),Z++):c[M]=k}}else{c=Object.defineProperties({},Object.getOwnPropertyDescriptors(c));for(const[Z,U]of u)c[Z]=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;h.push(f)}let H;if(!Array.isArray(c)){var g,P;Fr(c)||K(!1,`Invalid AST Node: ${I(c)}.`);const Z=j?(g=r.get(c.kind))===null||g===void 0?void 0:g.leave:(P=r.get(c.kind))===null||P===void 0?void 0:P.enter;if(H=Z==null?void 0:Z.call(t,c,f,d,h,v),H===St)break;if(H===!1){if(!j){h.pop();continue}}else if(H!==void 0&&(u.push([f,H]),!j))if(Fr(H))c=H;else{h.pop();continue}}if(H===void 0&&z&&u.push([f,c]),j)h.pop();else{var C;i={inArray:s,index:a,keys:o,edits:u,prev:i},s=Array.isArray(c),o=s?c:(C=n[c.kind])!==null&&C!==void 0?C:[],a=-1,u=[],d&&v.push(d),d=c}}while(i!==void 0);return u.length!==0?u[u.length-1][1]:e}function ni(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 pc(e,t,n){const{enter:r,leave:i}=xt(e,t);return n?i:r}function ce(e){return Gt(e,mc)}const hc=80,mc={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>q(e.definitions,`
27
+
28
+ `)},OperationDefinition:{leave(e){const t=ee("(",q(e.variableDefinitions,", "),")"),n=q([e.operation,q([e.name,t]),q(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+ee(" = ",n)+ee(" ",q(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("(",q(n,", "),")");return o.length>hc&&(o=s+ee(`(
29
+ `,xn(q(n,`
19
30
  `)),`
20
- )`)),q([o,q(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ee(" ",q(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>q(["...",ee("on ",e),q(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${ee("(",q(n,", "),")")} on ${t} ${ee("",q(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?js(e):ic(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+q(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+q(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ee("(",q(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
- `)+q(["schema",q(t," "),Ge(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>ee("",e,`
31
+ )`)),q([o,q(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ee(" ",q(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>q(["...",ee("on ",e),q(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${ee("(",q(n,", "),")")} on ${t} ${ee("",q(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Hs(e):cc(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+q(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+q(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ee("(",q(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,`
32
+ `)+q(["schema",q(t," "),Qe(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>ee("",e,`
22
33
  `)+q(["scalar",t,q(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ee("",e,`
23
- `)+q(["type",t,ee("implements ",q(n," & ")),q(r," "),Ge(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>ee("",e,`
24
- `)+t+(qi(n)?ee(`(
25
- `,Fn(q(n,`
34
+ `)+q(["type",t,ee("implements ",q(n," & ")),q(r," "),Qe(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>ee("",e,`
35
+ `)+t+(Wi(n)?ee(`(
36
+ `,xn(q(n,`
26
37
  `)),`
27
38
  )`):ee("(",q(n,", "),")"))+": "+r+ee(" ",q(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>ee("",e,`
28
39
  `)+q([t+": "+n,ee("= ",r),q(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ee("",e,`
29
- `)+q(["interface",t,ee("implements ",q(n," & ")),q(r," "),Ge(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>ee("",e,`
40
+ `)+q(["interface",t,ee("implements ",q(n," & ")),q(r," "),Qe(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>ee("",e,`
30
41
  `)+q(["union",t,q(n," "),ee("= ",q(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>ee("",e,`
31
- `)+q(["enum",t,q(n," "),Ge(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>ee("",e,`
42
+ `)+q(["enum",t,q(n," "),Qe(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>ee("",e,`
32
43
  `)+q([t,q(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>ee("",e,`
33
- `)+q(["input",t,q(n," "),Ge(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>ee("",e,`
34
- `)+"directive @"+t+(qi(n)?ee(`(
35
- `,Fn(q(n,`
44
+ `)+q(["input",t,q(n," "),Qe(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>ee("",e,`
45
+ `)+"directive @"+t+(Wi(n)?ee(`(
46
+ `,xn(q(n,`
36
47
  `)),`
37
- )`):ee("(",q(n,", "),")"))+(r?" repeatable":"")+" on "+q(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>q(["extend schema",q(e," "),Ge(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>q(["extend scalar",e,q(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>q(["extend type",e,ee("implements ",q(t," & ")),q(n," "),Ge(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>q(["extend interface",e,ee("implements ",q(t," & ")),q(n," "),Ge(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>q(["extend union",e,q(t," "),ee("= ",q(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>q(["extend enum",e,q(t," "),Ge(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>q(["extend input",e,q(t," "),Ge(n)]," ")}};function q(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function Ge(e){return ee(`{
38
- `,Fn(q(e,`
48
+ )`):ee("(",q(n,", "),")"))+(r?" repeatable":"")+" on "+q(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>q(["extend schema",q(e," "),Qe(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>q(["extend scalar",e,q(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>q(["extend type",e,ee("implements ",q(t," & ")),q(n," "),Qe(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>q(["extend interface",e,ee("implements ",q(t," & ")),q(n," "),Qe(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>q(["extend union",e,q(t," "),ee("= ",q(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>q(["extend enum",e,q(t," "),Qe(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>q(["extend input",e,q(t," "),Qe(n)]," ")}};function q(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(`{
49
+ `,xn(q(e,`
39
50
  `)),`
40
- }`)}function ee(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Fn(e){return ee(" ",e.replace(/\n/g,`
41
- `))}function qi(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 Ve(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(!Ps(e.charCodeAt(t)))throw new _(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!Jr(e.charCodeAt(0)))throw new _(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function zs(e){if(e==="true"||e==="false"||e==="null")throw new _(`Enum values cannot be named: ${e}`);return Ve(e)}function yn(e){return Ue(e)||te(e)||re(e)||Ne(e)||ge(e)||fe(e)||le(e)||H(e)}function fc(e){if(!yn(e))throw new Error(`Expected ${I(e)} to be a GraphQL type.`);return e}function Ue(e){return ze(e,nt)}function dc(e){if(!Ue(e))throw new Error(`Expected ${I(e)} to be a GraphQL Scalar type.`);return e}function te(e){return ze(e,je)}function Xs(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 Ws(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 pc(e){if(!Ne(e))throw new Error(`Expected ${I(e)} to be a GraphQL Union type.`);return e}function ge(e){return ze(e,ht)}function hc(e){if(!ge(e))throw new Error(`Expected ${I(e)} to be a GraphQL Enum type.`);return e}function fe(e){return ze(e,Mt)}function mc(e){if(!fe(e))throw new Error(`Expected ${I(e)} to be a GraphQL Input Object type.`);return e}function le(e){return ze(e,we)}function yc(e){if(!le(e))throw new Error(`Expected ${I(e)} to be a GraphQL List type.`);return e}function H(e){return ze(e,W)}function vc(e){if(!H(e))throw new Error(`Expected ${I(e)} to be a GraphQL Non-Null type.`);return e}function ke(e){return Ue(e)||ge(e)||fe(e)||vn(e)&&ke(e.ofType)}function Ec(e){if(!ke(e))throw new Error(`Expected ${I(e)} to be a GraphQL input type.`);return e}function pt(e){return Ue(e)||te(e)||re(e)||Ne(e)||ge(e)||vn(e)&&pt(e.ofType)}function gc(e){if(!pt(e))throw new Error(`Expected ${I(e)} to be a GraphQL output type.`);return e}function et(e){return Ue(e)||ge(e)}function Tc(e){if(!et(e))throw new Error(`Expected ${I(e)} to be a GraphQL leaf type.`);return e}function tt(e){return te(e)||re(e)||Ne(e)}function bc(e){if(!tt(e))throw new Error(`Expected ${I(e)} to be a GraphQL composite type.`);return e}function We(e){return re(e)||Ne(e)}function _c(e){if(!We(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){Xr(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 le(e)||H(e)}function Nc(e){if(!vn(e))throw new Error(`Expected ${I(e)} to be a GraphQL wrapping type.`);return e}function Xr(e){return yn(e)&&!H(e)}function Ks(e){if(!Xr(e))throw new Error(`Expected ${I(e)} to be a GraphQL nullable type.`);return e}function Wr(e){if(e)return H(e)?e.ofType:e}function En(e){return Ue(e)||te(e)||re(e)||Ne(e)||ge(e)||fe(e)}function Ic(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 Kr(e){return typeof e=="function"?e():e}function Zr(e){return typeof e=="function"?e():e}class nt{constructor(t){var n,r,i,s;const o=(n=t.parseValue)!==null&&n!==void 0?n:Pi;this.name=Ve(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:Pi,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"||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 je{constructor(t){var n;this.name=Ve(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=()=>eo(t),this._interfaces=()=>Zs(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:no(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Zs(e){var t;const n=Kr((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 eo(e){const t=Zr(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.`),it(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:Ve(r),description:n.description,type:n.type,args:to(s),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:Be(n.extensions),astNode:n.astNode}})}function to(e){return Object.entries(e).map(([t,n])=>({name:Ve(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:Be(n.extensions),astNode:n.astNode}))}function kt(e){return Me(e)&&!Array.isArray(e)}function no(e){return it(e,t=>({description:t.description,type:t.type,args:ro(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function ro(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 H(e.type)&&e.defaultValue===void 0}class $t{constructor(t){var n;this.name=Ve(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=eo.bind(void 0,t),this._interfaces=Zs.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:no(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=Ve(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=wc.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 wc(e){const t=Kr(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=Ve(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=Oc(this.name,t.values),this._valueLookup=new Map(this._values.map(r=>[r.value,r])),this._nameLookup=ot(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=ce(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=ce(t);throw new _(`Value "${i}" does not exist in "${this.name}" enum.`+An(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 An(e,t){const n=e.getValues().map(i=>i.name),r=mt(t,n);return st("the enum value",r)}function Oc(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:zs(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=Ve(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=Ac.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=it(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 Ac(e){const t=Zr(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.`),it(t,(n,r)=>(!("resolve"in n)||K(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:Ve(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)||le(e)&&le(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):le(n)?le(t)?Tt(e,t.ofType,n.ofType):!1:le(t)?!1:We(n)&&(re(t)||te(t))&&e.isSubType(n,t)}function Lr(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,io=new nt({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: ${ce(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}}),so=new nt({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: ${ce(e)}`,e);return parseFloat(e.value)}}),me=new nt({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: ${ce(e)}`,{nodes:e});return e.value}}),$e=new nt({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: ${ce(e)}`,{nodes:e});return e.value}}),ei=new nt({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: "+ce(e),{nodes:e});return e.value}}),gn=Object.freeze([me,io,so,$e,ei]);function ir(e){return gn.some(({name:t})=>e.name===t)}function Tn(e){if(Me(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!Me(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function sr(e){return ze(e,rt)}function Dc(e){if(!sr(e))throw new Error(`Expected ${I(e)} to be a GraphQL directive.`);return e}class rt{constructor(t){var n,r;this.name=Ve(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)||K(!1,`@${t.name} locations must be an Array.`);const i=(r=t.args)!==null&&r!==void 0?r:{};Me(i)&&!Array.isArray(i)||K(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=to(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:ro(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const ti=new rt({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($e),description:"Included when true."}}}),ni=new rt({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($e),description:"Skipped when true."}}}),ri="No longer supported",or=new rt({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:ri}}}),ii=new rt({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([ti,ni,or,ii]);function si(e){return vt.some(({name:t})=>t===e.name)}function oi(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}function dt(e,t){if(H(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(le(t)){const n=t.ofType;if(oi(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(fe(t)){if(!Me(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(et(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===ei&&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]*)$/,ar=new je({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(Pe))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new W(Pe),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Pe,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Pe,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new W(new we(new W(ai))),resolve:e=>e.getDirectives()}})}),ai=new je({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
51
+ }`)}function ee(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function xn(e){return ee(" ",e.replace(/\n/g,`
52
+ `))}function Wi(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(`
53
+ `)))!==null&&t!==void 0?t:!1}function jn(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=>jn(n,t));case l.OBJECT:return ft(e.fields,n=>n.name.value,n=>jn(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 b("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!Js(e.charCodeAt(t)))throw new b(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!ei(e.charCodeAt(0)))throw new b(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function no(e){if(e==="true"||e==="false"||e==="null")throw new b(`Enum values cannot be named: ${e}`);return Ue(e)}function mn(e){return Pe(e)||te(e)||ie(e)||Ne(e)||Ee(e)||fe(e)||le(e)||X(e)}function yc(e){if(!mn(e))throw new Error(`Expected ${I(e)} to be a GraphQL type.`);return e}function Pe(e){return ze(e,nt)}function vc(e){if(!Pe(e))throw new Error(`Expected ${I(e)} to be a GraphQL Scalar type.`);return e}function te(e){return ze(e,Be)}function ro(e){if(!te(e))throw new Error(`Expected ${I(e)} to be a GraphQL Object type.`);return e}function ie(e){return ze(e,$t)}function io(e){if(!ie(e))throw new Error(`Expected ${I(e)} to be a GraphQL Interface type.`);return e}function Ne(e){return ze(e,Ct)}function gc(e){if(!Ne(e))throw new Error(`Expected ${I(e)} to be a GraphQL Union type.`);return e}function Ee(e){return ze(e,ht)}function Ec(e){if(!Ee(e))throw new Error(`Expected ${I(e)} to be a GraphQL Enum type.`);return e}function fe(e){return ze(e,Mt)}function Tc(e){if(!fe(e))throw new Error(`Expected ${I(e)} to be a GraphQL Input Object type.`);return e}function le(e){return ze(e,we)}function bc(e){if(!le(e))throw new Error(`Expected ${I(e)} to be a GraphQL List type.`);return e}function X(e){return ze(e,W)}function _c(e){if(!X(e))throw new Error(`Expected ${I(e)} to be a GraphQL Non-Null type.`);return e}function Le(e){return Pe(e)||Ee(e)||fe(e)||yn(e)&&Le(e.ofType)}function Nc(e){if(!Le(e))throw new Error(`Expected ${I(e)} to be a GraphQL input type.`);return e}function pt(e){return Pe(e)||te(e)||ie(e)||Ne(e)||Ee(e)||yn(e)&&pt(e.ofType)}function Ic(e){if(!pt(e))throw new Error(`Expected ${I(e)} to be a GraphQL output type.`);return e}function et(e){return Pe(e)||Ee(e)}function wc(e){if(!et(e))throw new Error(`Expected ${I(e)} to be a GraphQL leaf type.`);return e}function tt(e){return te(e)||ie(e)||Ne(e)}function Oc(e){if(!tt(e))throw new Error(`Expected ${I(e)} to be a GraphQL composite type.`);return e}function We(e){return ie(e)||Ne(e)}function Dc(e){if(!We(e))throw new Error(`Expected ${I(e)} to be a GraphQL abstract type.`);return e}class we{constructor(t){mn(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){ri(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 yn(e){return le(e)||X(e)}function Ac(e){if(!yn(e))throw new Error(`Expected ${I(e)} to be a GraphQL wrapping type.`);return e}function ri(e){return mn(e)&&!X(e)}function so(e){if(!ri(e))throw new Error(`Expected ${I(e)} to be a GraphQL nullable type.`);return e}function ii(e){if(e)return X(e)?e.ofType:e}function vn(e){return Pe(e)||te(e)||ie(e)||Ne(e)||Ee(e)||fe(e)}function Sc(e){if(!vn(e))throw new Error(`Expected ${I(e)} to be a GraphQL named type.`);return e}function Re(e){if(e){let t=e;for(;yn(t);)t=t.ofType;return t}}function si(e){return typeof e=="function"?e():e}function oi(e){return typeof e=="function"?e():e}class nt{constructor(t){var n,r,i,s;const o=(n=t.parseValue)!==null&&n!==void 0?n:zi;this.name=Ue(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:zi,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(a,u)=>o(jn(a,u)),this.extensions=Ge(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 Be{constructor(t){var n;this.name=Ue(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=Ge(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>ao(t),this._interfaces=()=>oo(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:co(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function oo(e){var t;const n=si((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 ao(e){const t=oi(e.fields);return Lt(t)||K(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),it(t,(n,r)=>{var i;Lt(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 Lt(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:uo(s),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:Ge(n.extensions),astNode:n.astNode}})}function uo(e){return Object.entries(e).map(([t,n])=>({name:Ue(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:Ge(n.extensions),astNode:n.astNode}))}function Lt(e){return Ve(e)&&!Array.isArray(e)}function co(e){return it(e,t=>({description:t.description,type:t.type,args:lo(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function lo(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 $t{constructor(t){var n;this.name=Ue(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Ge(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=ao.bind(void 0,t),this._interfaces=oo.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:co(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=Ue(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Ge(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=Rc.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 Rc(e){const t=si(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=Ge(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=kc(this.name,t.values),this._valueLookup=new Map(this._values.map(r=>[r.value,r])),this._nameLookup=ot(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 b(`Enum "${this.name}" cannot represent value: ${I(t)}`);return n.name}parseValue(t){if(typeof t!="string"){const r=I(t);throw new b(`Enum "${this.name}" cannot represent non-string value: ${r}.`+On(this,r))}const n=this.getValue(t);if(n==null)throw new b(`Value "${t}" does not exist in "${this.name}" enum.`+On(this,t));return n.value}parseLiteral(t,n){if(t.kind!==l.ENUM){const i=ce(t);throw new b(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+On(this,i),{nodes:t})}const r=this.getValue(t.value);if(r==null){const i=ce(t);throw new b(`Value "${i}" does not exist in "${this.name}" enum.`+On(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 On(e,t){const n=e.getValues().map(i=>i.name),r=mt(t,n);return st("the enum value",r)}function kc(e,t){return Lt(t)||K(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(Lt(r)||K(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${I(r)}.`),{name:no(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:Ge(r.extensions),astNode:r.astNode}))}class Mt{constructor(t){var n;this.name=Ue(t.name),this.description=t.description,this.extensions=Ge(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=Lc.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=it(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 Lc(e){const t=oi(e.fields);return Lt(t)||K(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),it(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:Ge(n.extensions),astNode:n.astNode}))}function sr(e){return X(e.type)&&e.defaultValue===void 0}function Bn(e,t){return e===t?!0:X(e)&&X(t)||le(e)&&le(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):le(n)?le(t)?Tt(e,t.ofType,n.ofType):!1:le(t)?!1:We(n)&&(ie(t)||te(t))&&e.isSubType(n,t)}function Cr(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 $n=2147483647,Cn=-2147483648,fo=new nt({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=En(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 b(`Int cannot represent non-integer value: ${I(t)}`);if(n>$n||n<Cn)throw new b("Int cannot represent non 32-bit signed integer value: "+I(t));return n},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new b(`Int cannot represent non-integer value: ${I(e)}`);if(e>$n||e<Cn)throw new b(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==l.INT)throw new b(`Int cannot represent non-integer value: ${ce(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>$n||t<Cn)throw new b(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),po=new nt({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=En(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 b(`Float cannot represent non numeric value: ${I(t)}`);return n},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new b(`Float cannot represent non numeric value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.FLOAT&&e.kind!==l.INT)throw new b(`Float cannot represent non numeric value: ${ce(e)}`,e);return parseFloat(e.value)}}),me=new nt({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=En(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 b(`String cannot represent value: ${I(e)}`)},parseValue(e){if(typeof e!="string")throw new b(`String cannot represent a non string value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.STRING)throw new b(`String cannot represent a non string value: ${ce(e)}`,{nodes:e});return e.value}}),Ce=new nt({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=En(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new b(`Boolean cannot represent a non boolean value: ${I(t)}`)},parseValue(e){if(typeof e!="boolean")throw new b(`Boolean cannot represent a non boolean value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.BOOLEAN)throw new b(`Boolean cannot represent a non boolean value: ${ce(e)}`,{nodes:e});return e.value}}),ai=new nt({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=En(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new b(`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 b(`ID cannot represent value: ${I(e)}`)},parseLiteral(e){if(e.kind!==l.STRING&&e.kind!==l.INT)throw new b("ID cannot represent a non-string and non-integer value: "+ce(e),{nodes:e});return e.value}}),gn=Object.freeze([me,fo,po,Ce,ai]);function or(e){return gn.some(({name:t})=>e.name===t)}function En(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 ar(e){return ze(e,rt)}function Fc(e){if(!ar(e))throw new Error(`Expected ${I(e)} to be a GraphQL directive.`);return e}class rt{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=Ge(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=uo(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:lo(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const ui=new rt({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Q.FIELD,Q.FRAGMENT_SPREAD,Q.INLINE_FRAGMENT],args:{if:{type:new W(Ce),description:"Included when true."}}}),ci=new rt({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Q.FIELD,Q.FRAGMENT_SPREAD,Q.INLINE_FRAGMENT],args:{if:{type:new W(Ce),description:"Skipped when true."}}}),li="No longer supported",ur=new rt({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Q.FIELD_DEFINITION,Q.ARGUMENT_DEFINITION,Q.INPUT_FIELD_DEFINITION,Q.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:li}}}),fi=new rt({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Q.SCALAR],args:{url:{type:new W(me),description:"The URL that specifies the behavior of this scalar."}}}),vt=Object.freeze([ui,ci,ur,fi]);function di(e){return vt.some(({name:t})=>t===e.name)}function pi(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(le(t)){const n=t.ofType;if(pi(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(fe(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(et(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 Ki.test(r)?{kind:l.INT,value:r}:{kind:l.FLOAT,value:r}}if(typeof n=="string")return Ee(t)?{kind:l.ENUM,value:n}:t===ai&&Ki.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 Ki=/^-?(?:0|[1-9][0-9]*)$/,cr=new Be({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(je))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new W(je),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:je,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:je,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new W(new we(new W(hi))),resolve:e=>e.getDirectives()}})}),hi=new Be({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
43
54
 
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($e),resolve:e=>e.isRepeatable},locations:{type:new W(new we(new W(ui))),resolve:e=>e.locations},args:{type:new W(new we(new W(bn))),args:{includeDeprecated:{type:$e,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),ui=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."}}}),Pe=new je({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(fi),resolve(e){if(Ue(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(fe(e))return se.INPUT_OBJECT;if(le(e))return se.LIST;if(H(e))return se.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(ci)),args:{includeDeprecated:{type:$e,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(Pe)),resolve(e){if(te(e)||re(e))return e.getInterfaces()}},possibleTypes:{type:new we(new W(Pe)),resolve(e,t,n,{schema:r}){if(We(e))return r.getPossibleTypes(e)}},enumValues:{type:new we(new W(li)),args:{includeDeprecated:{type:$e,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:$e,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(fe(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Pe,resolve:e=>"ofType"in e?e.ofType:void 0}})}),ci=new je({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:$e,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new W(Pe),resolve:e=>e.type},isDeprecated:{type:new W($e),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:me,resolve:e=>e.deprecationReason}})}),bn=new je({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(Pe),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?ce(r):null}},isDeprecated:{type:new W($e),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:me,resolve:e=>e.deprecationReason}})}),li=new je({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($e),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:me,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 fi=new ht({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 W(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:Pe,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([ar,ai,ui,Pe,ci,bn,li,fi]);function wt(e){return _n.some(({name:t})=>e.name===t)}function oo(e){return ze(e,Qt)}function di(e){if(!oo(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,Me(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=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:vt;const i=new Set(t.types);if(t.types!=null)for(const s of t.types)i.delete(s),Qe(s,i);this._queryType!=null&&Qe(this._queryType,i),this._mutationType!=null&&Qe(this._mutationType,i),this._subscriptionType!=null&&Qe(this._subscriptionType,i);for(const s of this._directives)if(sr(s))for(const o of s.args)Qe(o.type,i);Qe(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||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 Qe(e,t){const n=Re(e);if(!t.has(n)){if(t.add(n),Ne(n))for(const r of n.getTypes())Qe(r,t);else if(te(n)||re(n)){for(const r of n.getInterfaces())Qe(r,t);for(const r of Object.values(n.getFields())){Qe(r.type,t);for(const i of r.args)Qe(i.type,t)}}else if(fe(n))for(const r of Object.values(n.getFields()))Qe(r.type,t)}return t}function pi(e){if(di(e),e.__validationErrors)return e.__validationErrors;const t=new Sc(e);Rc(t),Lc(t),kc(t);const n=t.getErrors();return e.__validationErrors=n,n}function hi(e){const t=pi(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
55
+ 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(Ce),resolve:e=>e.isRepeatable},locations:{type:new W(new we(new W(mi))),resolve:e=>e.locations},args:{type:new W(new we(new W(Tn))),args:{includeDeprecated:{type:Ce,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),mi=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:Q.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:Q.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:Q.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:Q.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:Q.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:Q.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:Q.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:Q.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:Q.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:Q.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:Q.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:Q.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:Q.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:Q.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:Q.UNION,description:"Location adjacent to a union definition."},ENUM:{value:Q.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:Q.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:Q.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:Q.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),je=new Be({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(gi),resolve(e){if(Pe(e))return oe.SCALAR;if(te(e))return oe.OBJECT;if(ie(e))return oe.INTERFACE;if(Ne(e))return oe.UNION;if(Ee(e))return oe.ENUM;if(fe(e))return oe.INPUT_OBJECT;if(le(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(yi)),args:{includeDeprecated:{type:Ce,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(te(e)||ie(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new we(new W(je)),resolve(e){if(te(e)||ie(e))return e.getInterfaces()}},possibleTypes:{type:new we(new W(je)),resolve(e,t,n,{schema:r}){if(We(e))return r.getPossibleTypes(e)}},enumValues:{type:new we(new W(vi)),args:{includeDeprecated:{type:Ce,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Ee(e)){const n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new we(new W(Tn)),args:{includeDeprecated:{type:Ce,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(fe(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:je,resolve:e=>"ofType"in e?e.ofType:void 0}})}),yi=new Be({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(Tn))),args:{includeDeprecated:{type:Ce,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new W(je),resolve:e=>e.type},isDeprecated:{type:new W(Ce),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:me,resolve:e=>e.deprecationReason}})}),Tn=new Be({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(je),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?ce(r):null}},isDeprecated:{type:new W(Ce),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:me,resolve:e=>e.deprecationReason}})}),vi=new Be({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(Ce),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 gi=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."}}}),an={name:"__schema",type:new W(cr),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},un={name:"__type",type:je,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},cn={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},bn=Object.freeze([cr,hi,mi,je,yi,Tn,vi,gi]);function wt(e){return bn.some(({name:t})=>e.name===t)}function ho(e){return ze(e,Qt)}function Ei(e){if(!ho(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,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=Ge(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),Ye(s,i);this._queryType!=null&&Ye(this._queryType,i),this._mutationType!=null&&Ye(this._mutationType,i),this._subscriptionType!=null&&Ye(this._subscriptionType,i);for(const s of this._directives)if(ar(s))for(const o of s.args)Ye(o.type,i);Ye(cr,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,ie(s)){for(const a of s.getInterfaces())if(ie(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(ie(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 Ye(e,t){const n=Re(e);if(!t.has(n)){if(t.add(n),Ne(n))for(const r of n.getTypes())Ye(r,t);else if(te(n)||ie(n)){for(const r of n.getInterfaces())Ye(r,t);for(const r of Object.values(n.getFields())){Ye(r.type,t);for(const i of r.args)Ye(i.type,t)}}else if(fe(n))for(const r of Object.values(n.getFields()))Ye(r.type,t)}return t}function Ti(e){if(Ei(e),e.__validationErrors)return e.__validationErrors;const t=new xc(e);$c(t),Cc(t),Mc(t);const n=t.getErrors();return e.__validationErrors=n,n}function bi(e){const t=Ti(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
45
56
 
46
- `))}class Sc{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 Rc(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 Lc(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),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.`,[mi(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 kc(e){const t=Vc(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)?(Gi(e,r),Qi(e,r)):Ne(r)?$c(e,r):ge(r)?Cc(e,r):fe(r)&&(Mc(e,r),t(r))}}function Gi(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),!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(It(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.`,[mi(a.astNode),(s=a.astNode)===null||s===void 0?void 0:s.type])}}}}function Qi(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,xc(e,t,r),Fc(e,t,r)}}function Fc(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,v=f.args.find(E=>E.name===h);if(!v){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,v.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(v.type)}.`,[(o=d.astNode)===null||o===void 0?void 0:o.type,(a=v.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)&&yt(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 xc(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 $c(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.`,Yi(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)}.`,Yi(t,String(i)))}}function Cc(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 Mc(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),!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(rr(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[mi(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}}}function Vc(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)&&fe(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 Yi(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 mi(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===or.name)}function Fe(e,t){switch(t.kind){case l.LIST_TYPE:{const n=Fe(e,t.type);return n&&new we(n)}case l.NON_NULL_TYPE:{const n=Fe(e,t.type);return n&&new W(n)}case l.NAMED_TYPE:return e.getType(t.name.value)}}class yi{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??Uc,n&&(ke(n)&&this._inputTypeStack.push(n),tt(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(tt(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?Fe(n,i):Re(this.getType());this._typeStack.push(pt(s)?s:void 0);break}case l.VARIABLE_DEFINITION:{const i=Fe(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=Wr(this.getInputType()),s=le(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;fe(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 Uc(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&&tt(t))return ln;if(te(t)||re(t))return t.getFields()[r]}function vi(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),Dr(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 Pc(e){return Ei(e)||gi(e)||Ti(e)}function Ei(e){return e.kind===l.OPERATION_DEFINITION||e.kind===l.FRAGMENT_DEFINITION}function jc(e){return e.kind===l.FIELD||e.kind===l.FRAGMENT_SPREAD||e.kind===l.INLINE_FRAGMENT}function ao(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 kr(e){return ao(e)&&(e.kind===l.LIST?e.values.some(kr):e.kind===l.OBJECT?e.fields.some(t=>kr(t.value)):e.kind!==l.VARIABLE)}function qc(e){return e.kind===l.NAMED_TYPE||e.kind===l.LIST_TYPE||e.kind===l.NON_NULL_TYPE}function gi(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 Ti(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 uo(e){return{Document(t){for(const n of t.definitions)if(!Ei(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 co(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),s=t.name.value;let o=st("to use an inline fragment on",Bc(i,n,s));o===""&&(o=st(Gc(n,s))),e.reportError(new _(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}))}}}}function Bc(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 Gc(e,t){if(te(e)||re(e)){const n=Object.keys(e.getFields());return mt(t,n)}return[]}function lo(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=Fe(e.getSchema(),n);if(r&&!tt(r)){const i=ce(n);e.reportError(new _(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=Fe(e.getSchema(),t.typeCondition);if(n&&!tt(n)){const r=ce(t.typeCondition);e.reportError(new _(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function fo(e){return{...po(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}".`+st(a),{nodes:t}))}}}}function po(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}".`+st(d),{nodes:c}))}}return!1}}}function bi(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 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||ye(!1),t.kind){case l.OPERATION_DEFINITION:return Yc(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 Yc(e){switch(e){case be.QUERY:return G.QUERY;case be.MUTATION:return G.MUTATION;case be.SUBSCRIPTION:return G.SUBSCRIPTION}}function ho(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new _(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function _i(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,v=h!=null&&Jc(h);if(v&&Ji.includes(f))return;const E=mt(f,v?Ji.concat(i):i);e.reportError(new _(`Unknown type "${f}".`+st(E),{nodes:s}))}}}}const Ji=[...gn,..._n].map(e=>e.name);function Jc(e){return"kind"in e&&(gi(e)||Ti(e))}function mo(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 yo(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 vo(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(v=>'"'+v.name.value+'"').join(", ");e.reportError(new _(`Cannot spread fragment "${c}" within itself`+(h!==""?` via ${h}.`:"."),{nodes:d}))}n.pop()}r[o]=void 0}}}function Eo(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 go(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 To(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:Hc(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 Hc(e){return e.map(t=>({...t,value:cr(t.value)})).sort((t,n)=>mn(t.name.value,n.name.value))}function bo(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+bo(n)).join(" and "):e}function _o(e){const t=new Zc,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=bo(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]=Gn(e,t,r,i);if(Wc(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++)Bn(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]=xr(e,n,a);if(s!==u){Ni(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 Bn(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]=xr(e,n,a),[d,h]=xr(e,n,u);Ni(e,t,n,r,i,c,d);for(const v of h)Bn(e,t,n,r,i,s,v);for(const v of f)Bn(e,t,n,r,i,v,o)}function Xc(e,t,n,r,i,s,o,a){const u=[],[c,f]=Gn(e,t,i,s),[d,h]=Gn(e,t,o,a);Ni(e,u,t,n,r,c,d);for(const v of h)qn(e,u,t,n,r,c,v);for(const v of f)qn(e,u,t,n,r,d,v);for(const v of f)for(const E of h)Bn(e,u,t,n,r,v,E);return u}function Wc(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=No(e,n,r,!1,s,o[a],o[u]);c&&t.push(c)}}function Ni(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=No(e,n,r,i,a,f,d);h&&t.push(h)}}}function No(e,t,n,r,i,s,o){const[a,u,c]=s,[f,d,h]=o,v=r||a!==f&&te(a)&&te(f);if(!v){const z=u.name.value,Z=d.name.value;if(z!==Z)return[[i,`"${z}" and "${Z}" are different fields`],[u],[d]];if(Hi(u)!==Hi(d))return[[i,"they have differing arguments"],[u],[d]]}const E=c==null?void 0:c.type,M=h==null?void 0:h.type;if(E&&M&&Fr(E,M))return[[i,`they return conflicting types "${I(E)}" and "${I(M)}"`],[u],[d]];const U=u.selectionSet,P=d.selectionSet;if(U&&P){const z=Xc(e,t,n,v,Re(E),U,Re(M),P);return Kc(z,i,u,d)}}function Hi(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 ce(cr(r))}function Fr(e,t){return le(e)?le(t)?Fr(e.ofType,t.ofType):!0:le(t)?!0:H(e)?H(t)?Fr(e.ofType,t.ofType):!0:H(t)?!0:et(e)||et(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);Io(e,n,r,s,o);const a=[s,Object.keys(o)];return t.set(r,a),a}function xr(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=Fe(e.getSchema(),n.typeCondition);return Gn(e,t,i,n.selectionSet)}function Io(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?Fe(e.getSchema(),o):t;Io(e,a,s.selectionSet,r,i);break}}}function Kc(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 Zc{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 wo(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(tt(n)&&tt(r)&&!Lr(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=el(e,n),i=e.getParentType();if(r&&i&&!Lr(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 el(e,t){const n=e.getFragment(t);if(n){const r=Fe(e.getSchema(),n.typeCondition);if(tt(r))return r}}function Oo(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=tl[o.kind]:a&&(u=nl(a)),u){if(u!==i.kind){const c=rl(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.`+st(f),{nodes:i.name}))}}}const tl={[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 nl(e){if(Ue(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(fe(e))return l.INPUT_OBJECT_TYPE_EXTENSION;ye(!1,"Unexpected type: "+I(e))}function rl(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 Ao(e){return{...Do(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 Do(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]=ot(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]=ot(u.filter(il),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(v=>v.name.value));for(const[v,E]of Object.entries(c))if(!h.has(v)){const M=yn(E.type)?I(E.type):ce(E.type);e.reportError(new _(`Directive "@${u}" argument "${v}" of type "${M}" is required, but it was not provided.`,{nodes:a}))}}}}}}function il(e){return e.type.kind===l.NON_NULL_TYPE&&e.defaultValue==null}function So(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(et(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 Ro(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 xe(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function Lo(e,t,n=sl){return Kt(e,t,n,void 0)}function sl(e,t,n){let r="Invalid value "+I(t);throw e.length>0&&(r+=` at "value${Ro(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(xe(r),e,new _(`Expected non-nullable type "${I(t)}" not to be null.`));return}if(e==null)return null;if(le(t)){const i=t.ofType;return oi(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(fe(t)){if(!Me(e)){n(xe(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(xe(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=mt(o,Object.keys(t.getFields()));n(xe(r),e,new _(`Field "${o}" is not defined by type "${t.name}".`+st(a)))}return i}if(et(t)){let i;try{i=t.parseValue(e)}catch(s){s instanceof _?n(xe(r),e,s):n(xe(r),e,new _(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return i===void 0&&n(xe(r),e,new _(`Expected type "${t.name}".`)),i}ye(!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(le(t)){const r=t.ofType;if(e.kind===l.LIST){const s=[];for(const o of e.values)if(zi(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(fe(t)){if(e.kind!==l.OBJECT)return;const r=Object.create(null),i=ot(e.fields,s=>s.name.value);for(const s of Object.values(t.getFields())){const o=i[s.name];if(!o||zi(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(et(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 zi(e,t){return e.kind===l.VARIABLE&&(t==null||t[e.name.value]===void 0)}function ko(e,t,n,r){const i=[],s=r==null?void 0:r.maxErrors;try{const o=ol(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 ol(e,t,n,r){const i={};for(const s of t){const o=s.variable.name.value,a=Fe(e,s.type);if(!ke(a)){const c=ce(s.type);r(new _(`Variable "$${o}" expected value of type "${c}" which cannot be used as an input type.`,{nodes:s.type}));continue}if(!Fo(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]=Lo(u,a,(c,f,d)=>{let h=`Variable "$${o}" got invalid value `+I(f);c.length>0&&(h+=` at "${o}${Ro(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=ot(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||!Fo(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 v=Xe(d,c,n);if(v===void 0)throw new _(`Argument "${u}" has invalid value ${ce(d)}.`,{nodes:d});i[u]=v}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 Fo(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ii(e,t,n,r,i){const s=new Map;return Qn(e,t,n,r,i,s,new Set),s}function al(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=ul(a),c=s.get(u);c!==void 0?c.push(a):s.set(u,[a]);break}case l.INLINE_FRAGMENT:{if(!Er(n,a)||!Xi(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||!Xi(e,c,r))continue;Qn(e,t,n,r,c.selectionSet,s,o);break}}}function Er(e,t){const n=fn(ni,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=fn(ti,t,e);return(r==null?void 0:r.if)!==!1}function Xi(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=Fe(e,r);return i===n?!0:We(i)?e.isSubType(i,n):!1}function ul(e){return e.alias?e.alias.value:e.name.value}function xo(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=Ii(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 wi(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 $o(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=wi(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 Oi(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],s=wi(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 Co(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 Ai(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(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 Mo(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 Vo(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;cl(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 cl(e,t){return te(e)||re(e)||fe(e)?e.getFields()[t]!=null:!1}function Uo(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 Di(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 Po(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 qo(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=wi(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 Go(e){return{ListValue(t){const n=Wr(e.getParentInputType());if(!le(n))return Et(e,t),!1},ObjectValue(t){const n=Re(e.getInputType());if(!fe(n))return Et(e,t),!1;const r=ot(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=Re(e.getParentInputType());if(!e.getInputType()&&fe(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}".`+st(i),{nodes:t}))}},NullValue(t){const n=e.getInputType();H(n)&&e.reportError(new _(`Expected value of type "${I(n)}", found ${ce(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(!et(r)){const i=I(n);e.reportError(new _(`Expected value of type "${i}", found ${ce(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 ${ce(t)}.`,{nodes:t}))}}catch(i){const s=I(n);i instanceof _?e.reportError(i):e.reportError(new _(`Expected value of type "${s}", found ${ce(t)}; `+i.message,{nodes:t,originalError:i}))}}function Qo(e){return{VariableDefinition(t){const n=Fe(e.getSchema(),t.type);if(n!==void 0&&!ke(n)){const r=t.variable.name.value,i=ce(t.type);e.reportError(new _(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function Yo(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=Fe(c,u.type);if(f&&!ll(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 ll(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 Jo=Object.freeze([uo,Po,mo,xo,_i,lo,Qo,So,co,Uo,ho,go,wo,vo,Bo,Eo,To,bi,Ai,fo,Oi,Go,Ao,Yo,_o,Di]),fl=Object.freeze([yo,jo,qo,Mo,Vo,$o,Co,_i,bi,Ai,Oo,po,Oi,Di,Do]);class Ho{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 dl extends Ho{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class zo extends Ho{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 yi(this._schema);Gt(t,vi(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 Xo(e,t,n=Jo,r,i=new yi(e)){var s;const o=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||K(!1,"Must provide document."),hi(e);const a=Object.freeze({}),u=[],c=new zo(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{Gt(t,vi(i,f))}catch(d){if(d!==a)throw d}return u}function Wo(e,t,n=fl){const r=[],i=new dl(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return Gt(e,zr(s)),r}function pl(e){const t=Wo(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
57
+ `))}class xc{constructor(t){this._errors=[],this.schema=t}reportError(t,n){const r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new b(t,{nodes:r}))}getErrors(){return this._errors}}function $c(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 Cc(e){for(const n of e.schema.getDirectives()){if(!ar(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),yt(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[_i(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 Mc(e){const t=qc(e),n=e.schema.getTypeMap();for(const r of Object.values(n)){if(!vn(r)){e.reportError(`Expected GraphQL named type but got: ${I(r)}.`,r.astNode);continue}wt(r)||It(e,r),te(r)||ie(r)?(Zi(e,r),es(e,r)):Ne(r)?Pc(e,r):Ee(r)?jc(e,r):fe(r)&&(Bc(e,r),t(r))}}function Zi(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),!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(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(yt(a)&&a.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${u}:) cannot be deprecated.`,[_i(a.astNode),(s=a.astNode)===null||s===void 0?void 0:s.type])}}}}function es(e,t){const n=Object.create(null);for(const r of t.getInterfaces()){if(!ie(r)){e.reportError(`Type ${I(t)} must only implement Interface types, it cannot implement ${I(r)}.`,tn(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,tn(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,tn(t,r));continue}n[r.name]=!0,Uc(e,t,r),Vc(e,t,r)}}function Vc(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,v=f.args.find(g=>g.name===h);if(!v){e.reportError(`Interface field argument ${n.name}.${c}(${h}:) expected but ${t.name}.${c} does not provide it.`,[d.astNode,f.astNode]);continue}if(!Bn(d.type,v.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(v.type)}.`,[(o=d.astNode)===null||o===void 0?void 0:o.type,(a=v.astNode)===null||a===void 0?void 0:a.type])}}for(const d of f.args){const h=d.name;!u.args.find(g=>g.name===h)&&yt(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 Uc(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}.`,[...tn(n,i),...tn(t,n)])}function Pc(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.`,ts(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)}.`,ts(t,String(i)))}}function jc(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 Bc(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(sr(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[_i(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}}}function qc(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)&&fe(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 tn(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 ts(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 _i(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===ur.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 Ni{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??Gc,n&&(Le(n)&&this._inputTypeStack.push(n),tt(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(tt(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(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=ii(this.getInputType()),s=le(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Le(s)?s:void 0);break}case l.OBJECT_FIELD:{const i=Re(this.getInputType());let s,o;fe(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=Re(this.getInputType());let s;Ee(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 Gc(e,t,n){const r=n.name.value;if(r===an.name&&e.getQueryType()===t)return an;if(r===un.name&&e.getQueryType()===t)return un;if(r===cn.name&&tt(t))return cn;if(te(t)||ie(t))return t.getFields()[r]}function Ii(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),Fr(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 Qc(e){return wi(e)||Oi(e)||Di(e)}function wi(e){return e.kind===l.OPERATION_DEFINITION||e.kind===l.FRAGMENT_DEFINITION}function Yc(e){return e.kind===l.FIELD||e.kind===l.FRAGMENT_SPREAD||e.kind===l.INLINE_FRAGMENT}function mo(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 Mr(e){return mo(e)&&(e.kind===l.LIST?e.values.some(Mr):e.kind===l.OBJECT?e.fields.some(t=>Mr(t.value)):e.kind!==l.VARIABLE)}function Jc(e){return e.kind===l.NAMED_TYPE||e.kind===l.LIST_TYPE||e.kind===l.NON_NULL_TYPE}function Oi(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 Di(e){return e.kind===l.SCHEMA_EXTENSION||lr(e)}function lr(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 yo(e){return{Document(t){for(const n of t.definitions)if(!wi(n)){const r=n.kind===l.SCHEMA_DEFINITION||n.kind===l.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new b(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function vo(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),s=t.name.value;let o=st("to use an inline fragment on",Hc(i,n,s));o===""&&(o=st(zc(n,s))),e.reportError(new b(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}))}}}}function Hc(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:ie(o)&&e.isSubType(o,a)?-1:ie(a)&&e.isSubType(a,o)?1:hn(o.name,a.name)}).map(o=>o.name)}function zc(e,t){if(te(e)||ie(e)){const n=Object.keys(e.getFields());return mt(t,n)}return[]}function go(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=xe(e.getSchema(),n);if(r&&!tt(r)){const i=ce(n);e.reportError(new b(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=xe(e.getSchema(),t.typeCondition);if(n&&!tt(n)){const r=ce(t.typeCondition);e.reportError(new b(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function Eo(e){return{...To(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 b(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+st(a),{nodes:t}))}}}}function To(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 b(`Unknown argument "${f}" on directive "@${a}".`+st(d),{nodes:c}))}}return!1}}}function Ai(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 b(`Unknown directive "@${f}".`,{nodes:s}));return}const h=Xc(c);h&&!d.includes(h)&&e.reportError(new b(`Directive "@${f}" may not be used on ${h}.`,{nodes:s}))}}}function Xc(e){const t=e[e.length-1];switch("kind"in t||ye(!1),t.kind){case l.OPERATION_DEFINITION:return Wc(t.operation);case l.FIELD:return Q.FIELD;case l.FRAGMENT_SPREAD:return Q.FRAGMENT_SPREAD;case l.INLINE_FRAGMENT:return Q.INLINE_FRAGMENT;case l.FRAGMENT_DEFINITION:return Q.FRAGMENT_DEFINITION;case l.VARIABLE_DEFINITION:return Q.VARIABLE_DEFINITION;case l.SCHEMA_DEFINITION:case l.SCHEMA_EXTENSION:return Q.SCHEMA;case l.SCALAR_TYPE_DEFINITION:case l.SCALAR_TYPE_EXTENSION:return Q.SCALAR;case l.OBJECT_TYPE_DEFINITION:case l.OBJECT_TYPE_EXTENSION:return Q.OBJECT;case l.FIELD_DEFINITION:return Q.FIELD_DEFINITION;case l.INTERFACE_TYPE_DEFINITION:case l.INTERFACE_TYPE_EXTENSION:return Q.INTERFACE;case l.UNION_TYPE_DEFINITION:case l.UNION_TYPE_EXTENSION:return Q.UNION;case l.ENUM_TYPE_DEFINITION:case l.ENUM_TYPE_EXTENSION:return Q.ENUM;case l.ENUM_VALUE_DEFINITION:return Q.ENUM_VALUE;case l.INPUT_OBJECT_TYPE_DEFINITION:case l.INPUT_OBJECT_TYPE_EXTENSION:return Q.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?Q.INPUT_FIELD_DEFINITION:Q.ARGUMENT_DEFINITION}default:ye(!1,"Unexpected kind: "+I(t.kind))}}function Wc(e){switch(e){case be.QUERY:return Q.QUERY;case be.MUTATION:return Q.MUTATION;case be.SUBSCRIPTION:return Q.SUBSCRIPTION}}function bo(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new b(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function Si(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,v=h!=null&&Kc(h);if(v&&ns.includes(f))return;const g=mt(f,v?ns.concat(i):i);e.reportError(new b(`Unknown type "${f}".`+st(g),{nodes:s}))}}}}const ns=[...gn,...bn].map(e=>e.name);function Kc(e){return"kind"in e&&(Oi(e)||Di(e))}function _o(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 b("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function No(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 b("Cannot define a new schema within a schema extension.",{nodes:a}));return}o>0&&e.reportError(new b("Must provide only one schema definition.",{nodes:a})),++o}}}function Io(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(v=>'"'+v.name.value+'"').join(", ");e.reportError(new b(`Cannot spread fragment "${c}" within itself`+(h!==""?` via ${h}.`:"."),{nodes:d}))}n.pop()}r[o]=void 0}}}function wo(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 b(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 Oo(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 b(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function Do(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 b(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 fr(e){switch(e.kind){case l.OBJECT:return{...e,fields:Zc(e.fields)};case l.LIST:return{...e,values:e.values.map(fr)};case l.INT:case l.FLOAT:case l.STRING:case l.BOOLEAN:case l.NULL:case l.ENUM:case l.VARIABLE:return e}}function Zc(e){return e.map(t=>({...t,value:fr(t.value)})).sort((t,n)=>hn(t.name.value,n.name.value))}function Ao(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Ao(n)).join(" and "):e}function So(e){const t=new sl,n=new Map;return{SelectionSet(r){const i=el(e,n,t,e.getParentType(),r);for(const[[s,o],a,u]of i){const c=Ao(o);e.reportError(new b(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:a.concat(u)}))}}}}function el(e,t,n,r,i){const s=[],[o,a]=Qn(e,t,r,i);if(nl(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]=Ur(e,n,a);if(s!==u){Ri(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]=Ur(e,n,a),[d,h]=Ur(e,n,u);Ri(e,t,n,r,i,c,d);for(const v of h)Gn(e,t,n,r,i,s,v);for(const v of f)Gn(e,t,n,r,i,v,o)}function tl(e,t,n,r,i,s,o,a){const u=[],[c,f]=Qn(e,t,i,s),[d,h]=Qn(e,t,o,a);Ri(e,u,t,n,r,c,d);for(const v of h)qn(e,u,t,n,r,c,v);for(const v of f)qn(e,u,t,n,r,d,v);for(const v of f)for(const g of h)Gn(e,u,t,n,r,v,g);return u}function nl(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=Ro(e,n,r,!1,s,o[a],o[u]);c&&t.push(c)}}function Ri(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=Ro(e,n,r,i,a,f,d);h&&t.push(h)}}}function Ro(e,t,n,r,i,s,o){const[a,u,c]=s,[f,d,h]=o,v=r||a!==f&&te(a)&&te(f);if(!v){const z=u.name.value,H=d.name.value;if(z!==H)return[[i,`"${z}" and "${H}" are different fields`],[u],[d]];if(!rl(u,d))return[[i,"they have differing arguments"],[u],[d]]}const g=c==null?void 0:c.type,P=h==null?void 0:h.type;if(g&&P&&Vr(g,P))return[[i,`they return conflicting types "${I(g)}" and "${I(P)}"`],[u],[d]];const C=u.selectionSet,j=d.selectionSet;if(C&&j){const z=tl(e,t,n,v,Re(g),C,Re(P),j);return il(z,i,u,d)}}function rl(e,t){const n=e.arguments,r=t.arguments;if(n===void 0||n.length===0)return r===void 0||r.length===0;if(r===void 0||r.length===0||n.length!==r.length)return!1;const i=new Map(r.map(({name:s,value:o})=>[s.value,o]));return n.every(s=>{const o=s.value,a=i.get(s.name.value);return a===void 0?!1:rs(o)===rs(a)})}function rs(e){return ce(fr(e))}function Vr(e,t){return le(e)?le(t)?Vr(e.ofType,t.ofType):!0:le(t)?!0:X(e)?X(t)?Vr(e.ofType,t.ofType):!0:X(t)?!0:et(e)||et(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);ko(e,n,r,s,o);const a=[s,Object.keys(o)];return t.set(r,a),a}function Ur(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 ko(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)||ie(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;ko(e,a,s.selectionSet,r,i);break}}}function il(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 sl{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 Lo(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(tt(n)&&tt(r)&&!Cr(e.getSchema(),n,r)){const i=I(r),s=I(n);e.reportError(new b(`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=ol(e,n),i=e.getParentType();if(r&&i&&!Cr(e.getSchema(),r,i)){const s=I(i),o=I(r);e.reportError(new b(`Fragment "${n}" cannot be spread here as objects of type "${s}" can never be of type "${o}".`,{nodes:t}))}}}}function ol(e,t){const n=e.getFragment(t);if(n){const r=xe(e.getSchema(),n.typeCondition);if(tt(r))return r}}function Fo(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=al[o.kind]:a&&(u=ul(a)),u){if(u!==i.kind){const c=cl(i.kind);e.reportError(new b(`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 b(`Cannot extend type "${s}" because it is not defined.`+st(f),{nodes:i.name}))}}}const al={[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 ul(e){if(Pe(e))return l.SCALAR_TYPE_EXTENSION;if(te(e))return l.OBJECT_TYPE_EXTENSION;if(ie(e))return l.INTERFACE_TYPE_EXTENSION;if(Ne(e))return l.UNION_TYPE_EXTENSION;if(Ee(e))return l.ENUM_TYPE_EXTENSION;if(fe(e))return l.INPUT_OBJECT_TYPE_EXTENSION;ye(!1,"Unexpected type: "+I(e))}function cl(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 xo(e){return{...$o(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 b(`Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}}}function $o(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]=ot(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]=ot(u.filter(ll),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(v=>v.name.value));for(const[v,g]of Object.entries(c))if(!h.has(v)){const P=mn(g.type)?I(g.type):ce(g.type);e.reportError(new b(`Directive "@${u}" argument "${v}" of type "${P}" is required, but it was not provided.`,{nodes:a}))}}}}}}function ll(e){return e.type.kind===l.NON_NULL_TYPE&&e.defaultValue==null}function Co(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(et(Re(n))){if(r){const i=t.name.value,s=I(n);e.reportError(new b(`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 b(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}function Mo(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 Vo(e,t,n=fl){return Kt(e,t,n,void 0)}function fl(e,t,n){let r="Invalid value "+I(t);throw e.length>0&&(r+=` at "value${Mo(e)}"`),n.message=r+": "+n.message,n}function Kt(e,t,n,r){if(X(t)){if(e!=null)return Kt(e,t.ofType,n,r);n($e(r),e,new b(`Expected non-nullable type "${I(t)}" not to be null.`));return}if(e==null)return null;if(le(t)){const i=t.ofType;return pi(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(fe(t)){if(!Ve(e)){n($e(r),e,new b(`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 b(`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=mt(o,Object.keys(t.getFields()));n($e(r),e,new b(`Field "${o}" is not defined by type "${t.name}".`+st(a)))}return i}if(et(t)){let i;try{i=t.parseValue(e)}catch(s){s instanceof b?n($e(r),e,s):n($e(r),e,new b(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return i===void 0&&n($e(r),e,new b(`Expected type "${t.name}".`)),i}ye(!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&&X(t)?void 0:i}if(X(t))return e.kind===l.NULL?void 0:Xe(e,t.ofType,n);if(e.kind===l.NULL)return null;if(le(t)){const r=t.ofType;if(e.kind===l.LIST){const s=[];for(const o of e.values)if(is(o,n)){if(X(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(fe(t)){if(e.kind!==l.OBJECT)return;const r=Object.create(null),i=ot(e.fields,s=>s.name.value);for(const s of Object.values(t.getFields())){const o=i[s.name];if(!o||is(o.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if(X(s.type))return;continue}const a=Xe(o.value,s.type,n);if(a===void 0)return;r[s.name]=a}return r}if(et(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 is(e,t){return e.kind===l.VARIABLE&&(t==null||t[e.name.value]===void 0)}function Uo(e,t,n,r){const i=[],s=r==null?void 0:r.maxErrors;try{const o=dl(e,t,n,a=>{if(s!=null&&i.length>=s)throw new b("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 dl(e,t,n,r){const i={};for(const s of t){const o=s.variable.name.value,a=xe(e,s.type);if(!Le(a)){const c=ce(s.type);r(new b(`Variable "$${o}" expected value of type "${c}" which cannot be used as an input type.`,{nodes:s.type}));continue}if(!Po(n,o)){if(s.defaultValue)i[o]=Xe(s.defaultValue,a);else if(X(a)){const c=I(a);r(new b(`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 b(`Variable "$${o}" of non-null type "${c}" must not be null.`,{nodes:s}));continue}i[o]=Vo(u,a,(c,f,d)=>{let h=`Variable "$${o}" got invalid value `+I(f);c.length>0&&(h+=` at "${o}${Mo(c)}"`),r(new b(h+"; "+d.message,{nodes:s,originalError:d}))})}return i}function dr(e,t,n){var r;const i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],o=ot(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 b(`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 g=d.name.value;if(n==null||!Po(n,g)){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(X(c))throw new b(`Argument "${u}" of required type "${I(c)}" was provided the variable "$${g}" which was not provided a runtime value.`,{nodes:d});continue}h=n[g]==null}if(h&&X(c))throw new b(`Argument "${u}" of non-null type "${I(c)}" must not be null.`,{nodes:d});const v=Xe(d,c,n);if(v===void 0)throw new b(`Argument "${u}" has invalid value ${ce(d)}.`,{nodes:d});i[u]=v}return i}function ln(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 dr(e,i,n)}function Po(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ki(e,t,n,r,i){const s=new Map;return Yn(e,t,n,r,i,s,new Set),s}function pl(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(!Tr(n,a))continue;const u=hl(a),c=s.get(u);c!==void 0?c.push(a):s.set(u,[a]);break}case l.INLINE_FRAGMENT:{if(!Tr(n,a)||!ss(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)||!Tr(n,a))continue;o.add(u);const c=t[u];if(!c||!ss(e,c,r))continue;Yn(e,t,n,r,c.selectionSet,s,o);break}}}function Tr(e,t){const n=ln(ci,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=ln(ui,t,e);return(r==null?void 0:r.if)!==!1}function ss(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=xe(e,r);return i===n?!0:We(i)?e.isSubType(i,n):!1}function hl(e){return e.alias?e.alias.value:e.name.value}function jo(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=ki(n,a,s,r,t.selectionSet);if(u.size>1){const d=[...u.values()].slice(1).flat();e.reportError(new b(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 b(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 Li(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 Bo(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=Li(i,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new b(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:a.map(u=>u.name)}));return!1}}function Fi(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],s=Li(i,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new b(`There can be only one argument named "${o}".`,{nodes:a.map(u=>u.name)}))}}function qo(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 b(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new b(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function xi(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(Yt(a)||lr(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 b(`The directive "@${f}" can only be used once at this location.`,{nodes:[u[f],c]})):u[f]=c)}}}}function Go(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];Ee(h)&&h.getValue(d)?e.reportError(new b(`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 b(`Enum value "${a}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Qo(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;ml(n[a],d)?e.reportError(new b(`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 b(`Field "${a}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function ml(e,t){return te(e)||ie(e)||fe(e)?e.getFields()[t]!=null:!1}function Yo(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new b(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function $i(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 b(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function Jo(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new b(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function Ho(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 b(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:u})):f?e.reportError(new b(`There can be only one ${c} type in schema.`,{nodes:[f,u]})):n[c]=u}return!1}}function zo(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 b(`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 b(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}function Xo(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=Li(r,s=>s.variable.name.value);for(const[s,o]of i)o.length>1&&e.reportError(new b(`There can be only one variable named "$${s}".`,{nodes:o.map(a=>a.variable.name)}))}}}function Wo(e){return{ListValue(t){const n=ii(e.getParentInputType());if(!le(n))return gt(e,t),!1},ObjectValue(t){const n=Re(e.getInputType());if(!fe(n))return gt(e,t),!1;const r=ot(t.fields,i=>i.name.value);for(const i of Object.values(n.getFields()))if(!r[i.name]&&sr(i)){const o=I(i.type);e.reportError(new b(`Field "${n.name}.${i.name}" of required type "${o}" was not provided.`,{nodes:t}))}},ObjectField(t){const n=Re(e.getParentInputType());if(!e.getInputType()&&fe(n)){const i=mt(t.name.value,Object.keys(n.getFields()));e.reportError(new b(`Field "${t.name.value}" is not defined by type "${n.name}".`+st(i),{nodes:t}))}},NullValue(t){const n=e.getInputType();X(n)&&e.reportError(new b(`Expected value of type "${I(n)}", found ${ce(t)}.`,{nodes:t}))},EnumValue:t=>gt(e,t),IntValue:t=>gt(e,t),FloatValue:t=>gt(e,t),StringValue:t=>gt(e,t),BooleanValue:t=>gt(e,t)}}function gt(e,t){const n=e.getInputType();if(!n)return;const r=Re(n);if(!et(r)){const i=I(n);e.reportError(new b(`Expected value of type "${i}", found ${ce(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const s=I(n);e.reportError(new b(`Expected value of type "${s}", found ${ce(t)}.`,{nodes:t}))}}catch(i){const s=I(n);i instanceof b?e.reportError(i):e.reportError(new b(`Expected value of type "${s}", found ${ce(t)}; `+i.message,{nodes:t,originalError:i}))}}function Ko(e){return{VariableDefinition(t){const n=xe(e.getSchema(),t.type);if(n!==void 0&&!Le(n)){const r=t.variable.name.value,i=ce(t.type);e.reportError(new b(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function Zo(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&&!yl(c,f,u.defaultValue,s,o)){const d=I(f),h=I(s);e.reportError(new b(`Variable "$${a}" of type "${d}" used in position expecting type "${h}".`,{nodes:[u,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function yl(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 ea=Object.freeze([yo,Jo,_o,jo,Si,go,Ko,Co,vo,Yo,bo,Oo,Lo,Io,Xo,wo,Do,Ai,xi,Eo,Fi,Wo,xo,Zo,So,$i]),vl=Object.freeze([No,Ho,zo,Go,Qo,Bo,qo,Si,Ai,xi,Fo,To,Fi,$i,$o]);class ta{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 gl extends ta{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class na extends ta{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 Ni(this._schema);Gt(t,Ii(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 ra(e,t,n=ea,r,i=new Ni(e)){var s;const o=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||K(!1,"Must provide document."),bi(e);const a=Object.freeze({}),u=[],c=new na(e,t,i,d=>{if(u.length>=o)throw u.push(new b("Too many validation errors, error limit reached. Validation aborted.")),a;u.push(d)}),f=ni(n.map(d=>d(c)));try{Gt(t,Ii(i,f))}catch(d){if(d!==a)throw d}return u}function ia(e,t,n=vl){const r=[],i=new gl(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return Gt(e,ni(s)),r}function El(e){const t=ia(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
47
58
 
48
- `))}function hl(e,t){const n=Wo(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(`
59
+ `))}function Tl(e,t){const n=ia(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(`
49
60
 
50
- `))}function ml(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 yl(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 vl(e,t,n){let r=n;for(const i of e)r=Ce(r)?r.then(s=>t(s,i)):t(r,i);return r}function El(e){return e instanceof Error?e:new gl(e)}class gl 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=El(e);return Tl(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 Tl(e){return Array.isArray(e.path)}const bl=ml((e,t,n)=>al(e.schema,e.fragments,e.variableValues,t,n));function fr(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;Zo(t,n,r);const s=ea(e);if(!("schema"in s))return{errors:s};try{const{operation:o}=s,a=_l(s,o,i);return Ce(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 Ko(e){const t=fr(e);if(Ce(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 Zo(e,t,n){t||K(!1,"Must provide document."),hi(e),n==null||Me(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 ea(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 v=Object.create(null);for(const U of i.definitions)switch(U.kind){case l.OPERATION_DEFINITION:if(u==null){if(h!==void 0)return[new _("Must provide operation name if query contains multiple operations.")];h=U}else((t=U.name)===null||t===void 0?void 0:t.value)===u&&(h=U);break;case l.FRAGMENT_DEFINITION:v[U.name.value]=U;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:[],M=ko(r,E,a??{},{maxErrors:50});return M.errors?M.errors:{schema:r,fragments:v,rootValue:s,contextValue:o,operation:h,variableValues:M.coerced,fieldResolver:c??Cr,typeResolver:f??ra,subscribeFieldResolver:d??Cr,errors:[]}}function _l(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=Ii(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 Nl(e,r,n,s,i);case be.SUBSCRIPTION:return Yn(e,r,n,s,i)}}function Nl(e,t,n,r,i){return vl(i.entries(),(s,[o,a])=>{const u=Vt(r,o,t.name),c=ta(e,t,n,a,u);return c===void 0?s:Ce(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=ta(e,t,n,u,c);f!==void 0&&(s[a]=f,Ce(f)&&(o=!0))}return o?yl(s):s}function ta(e,t,n,r,i){var s;const o=ia(e.schema,t,r[0]);if(!o)return;const a=o.type,u=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,c=na(e,o,r,t,i);try{const f=lr(o,r[0],e.variableValues),d=e.contextValue,h=u(n,f,d,c);let v;return Ce(h)?v=h.then(E=>dn(e,a,r,c,i,E)):v=dn(e,a,r,c,i,h),Ce(v)?v.then(void 0,E=>{const M=Ut(E,r,xe(i));return Jn(M,a,e)}):v}catch(f){const d=Ut(f,r,xe(i));return Jn(d,a,e)}}function na(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(le(t))return Il(e,t,n,r,i,s);if(et(t))return wl(t,s);if(We(t))return Ol(e,t,n,r,i,s);if(te(t))return $r(e,t,n,r,i,s);ye(!1,"Cannot complete value of unexpected output type: "+I(t))}function Il(e,t,n,r,i,s){if(!oi(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 Ce(c)?h=c.then(v=>dn(e,o,n,r,d,v)):h=dn(e,o,n,r,d,c),Ce(h)?(a=!0,h.then(void 0,v=>{const E=Ut(v,n,xe(d));return Jn(E,o,e)})):h}catch(h){const v=Ut(h,n,xe(d));return Jn(v,o,e)}});return a?Promise.all(u):u}function wl(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 Ol(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 Ce(c)?c.then(f=>$r(e,Wi(f,e,t,n,r,s),n,r,i,s)):$r(e,Wi(c,e,t,n,r,s),n,r,i,s)}function Wi(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 $r(e,t,n,r,i,s){const o=bl(e,t,n);if(t.isTypeOf){const a=t.isTypeOf(s,e.contextValue,r);if(Ce(a))return a.then(u=>{if(!u)throw Ki(t,s,n);return Yn(e,t,s,i,o)});if(!a)throw Ki(t,s,n)}return Yn(e,t,s,i,o)}function Ki(e,t,n){return new _(`Expected value of type "${e.name}" but got: ${I(t)}.`,{nodes:n})}const ra=function(e,t,n,r){if(Me(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(Ce(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})},Cr=function(e,t,n,r){if(Me(e)||typeof e=="function"){const i=e[r.fieldName];return typeof i=="function"?e[r.fieldName](t,n,r):i}};function ia(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 Al(e){return new Promise(t=>t(sa(e)))}function Dl(e){const t=sa(e);if(Ce(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function sa(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=pi(t);if(c.length>0)return{errors:c};let f;try{f=tr(n)}catch(h){return{errors:[h]}}const d=Xo(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 oa(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}function Sl(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 Rl(e){arguments.length<2||K(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await aa(e);return oa(t)?Sl(t,r=>fr({...e,rootValue:r})):t}function Ll(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 aa(...e){const t=Ll(e),{schema:n,document:r,variableValues:i}=t;Zo(n,r,i);const s=ea(t);if(!("schema"in s))return{errors:s};try{const o=await kl(s);if(!oa(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 kl(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=Ii(t,n,i,o,r.selectionSet),[u,c]=[...a.entries()][0],f=ia(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=na(e,f,c,o,d);try{var v;const E=lr(f,c[0],i),M=e.contextValue,P=await((v=f.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(s,E,M,h);if(P instanceof Error)throw P;return P}catch(E){throw Ut(E,c,xe(d))}}function Fl(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(fe(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 xl(e){return{Field(t){const n=Re(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 ua(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`
61
+ `))}function bl(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 os(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 _l(e,t,n){let r=n;for(const i of e)r=Me(r)?r.then(s=>t(s,i)):t(r,i);return r}function Nl(e){return e instanceof Error?e:new Il(e)}class Il 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=Nl(e);return wl(i)?i:new b(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function wl(e){return Array.isArray(e.path)}const Ol=bl((e,t,n)=>pl(e.schema,e.fragments,e.variableValues,t,n));function pr(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;oa(t,n,r);const s=aa(e);if(!("schema"in s))return{errors:s};try{const{operation:o}=s,a=Dl(s,o,i);return Me(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 sa(e){const t=pr(e);if(Me(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 oa(e,t,n){t||K(!1,"Must provide document."),bi(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 aa(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 v=Object.create(null);for(const C of i.definitions)switch(C.kind){case l.OPERATION_DEFINITION:if(u==null){if(h!==void 0)return[new b("Must provide operation name if query contains multiple operations.")];h=C}else((t=C.name)===null||t===void 0?void 0:t.value)===u&&(h=C);break;case l.FRAGMENT_DEFINITION:v[C.name.value]=C;break}if(!h)return u!=null?[new b(`Unknown operation named "${u}".`)]:[new b("Must provide an operation.")];const g=(n=h.variableDefinitions)!==null&&n!==void 0?n:[],P=Uo(r,g,a??{},{maxErrors:50});return P.errors?P.errors:{schema:r,fragments:v,rootValue:s,contextValue:o,operation:h,variableValues:P.coerced,fieldResolver:c??jr,typeResolver:f??la,subscribeFieldResolver:d??jr,errors:[]}}function Dl(e,t,n){const r=e.schema.getRootType(t.operation);if(r==null)throw new b(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const i=ki(e.schema,e.fragments,e.variableValues,r,t.selectionSet),s=void 0;switch(t.operation){case be.QUERY:return Jn(e,r,n,s,i);case be.MUTATION:return Al(e,r,n,s,i);case be.SUBSCRIPTION:return Jn(e,r,n,s,i)}}function Al(e,t,n,r,i){return _l(i.entries(),(s,[o,a])=>{const u=Vt(r,o,t.name),c=ua(e,t,n,a,u);return c===void 0?s:Me(c)?c.then(f=>(s[o]=f,s)):(s[o]=c,s)},Object.create(null))}function Jn(e,t,n,r,i){const s=Object.create(null);let o=!1;try{for(const[a,u]of i.entries()){const c=Vt(r,a,t.name),f=ua(e,t,n,u,c);f!==void 0&&(s[a]=f,Me(f)&&(o=!0))}}catch(a){if(o)return os(s).finally(()=>{throw a});throw a}return o?os(s):s}function ua(e,t,n,r,i){var s;const o=fa(e.schema,t,r[0]);if(!o)return;const a=o.type,u=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,c=ca(e,o,r,t,i);try{const f=dr(o,r[0],e.variableValues),d=e.contextValue,h=u(n,f,d,c);let v;return Me(h)?v=h.then(g=>fn(e,a,r,c,i,g)):v=fn(e,a,r,c,i,h),Me(v)?v.then(void 0,g=>{const P=Ut(g,r,$e(i));return Hn(P,a,e)}):v}catch(f){const d=Ut(f,r,$e(i));return Hn(d,a,e)}}function ca(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 Hn(e,t,n){if(X(t))throw e;return n.errors.push(e),null}function fn(e,t,n,r,i,s){if(s instanceof Error)throw s;if(X(t)){const o=fn(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(le(t))return Sl(e,t,n,r,i,s);if(et(t))return Rl(t,s);if(We(t))return kl(e,t,n,r,i,s);if(te(t))return Pr(e,t,n,r,i,s);ye(!1,"Cannot complete value of unexpected output type: "+I(t))}function Sl(e,t,n,r,i,s){if(!pi(s))throw new b(`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 Me(c)?h=c.then(v=>fn(e,o,n,r,d,v)):h=fn(e,o,n,r,d,c),Me(h)?(a=!0,h.then(void 0,v=>{const g=Ut(v,n,$e(d));return Hn(g,o,e)})):h}catch(h){const v=Ut(h,n,$e(d));return Hn(v,o,e)}});return a?Promise.all(u):u}function Rl(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 kl(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 Me(c)?c.then(f=>Pr(e,as(f,e,t,n,r,s),n,r,i,s)):Pr(e,as(c,e,t,n,r,s),n,r,i,s)}function as(e,t,n,r,i,s){if(e==null)throw new b(`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 b("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 b(`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 b(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!te(o))throw new b(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new b(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function Pr(e,t,n,r,i,s){const o=Ol(e,t,n);if(t.isTypeOf){const a=t.isTypeOf(s,e.contextValue,r);if(Me(a))return a.then(u=>{if(!u)throw us(t,s,n);return Jn(e,t,s,i,o)});if(!a)throw us(t,s,n)}return Jn(e,t,s,i,o)}function us(e,t,n){return new b(`Expected value of type "${e.name}" but got: ${I(t)}.`,{nodes:n})}const la=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(Me(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})},jr=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 fa(e,t,n){const r=n.name.value;return r===an.name&&e.getQueryType()===t?an:r===un.name&&e.getQueryType()===t?un:r===cn.name?cn:t.getFields()[r]}function Ll(e){return new Promise(t=>t(da(e)))}function Fl(e){const t=da(e);if(Me(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function da(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=Ti(t);if(c.length>0)return{errors:c};let f;try{f=rr(n)}catch(h){return{errors:[h]}}const d=ra(t,f);return d.length>0?{errors:d}:pr({schema:t,document:f,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:a,typeResolver:u})}function pa(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}function xl(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 $l(e){arguments.length<2||K(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await ha(e);return pa(t)?xl(t,r=>pr({...e,rootValue:r})):t}function Cl(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 ha(...e){const t=Cl(e),{schema:n,document:r,variableValues:i}=t;oa(n,r,i);const s=aa(t);if(!("schema"in s))return{errors:s};try{const o=await Ml(s);if(!pa(o))throw new Error(`Subscription field must return Async Iterable. Received: ${I(o)}.`);return o}catch(o){if(o instanceof b)return{errors:[o]};throw o}}async function Ml(e){const{schema:t,fragments:n,operation:r,variableValues:i,rootValue:s}=e,o=t.getSubscriptionType();if(o==null)throw new b("Schema is not configured to execute subscription operation.",{nodes:r});const a=ki(t,n,i,o,r.selectionSet),[u,c]=[...a.entries()][0],f=fa(t,o,c[0]);if(!f){const g=c[0].name.value;throw new b(`The subscription field "${g}" is not defined.`,{nodes:c})}const d=Vt(void 0,u,o.name),h=ca(e,f,c,o,d);try{var v;const g=dr(f,c[0],i),P=e.contextValue,j=await((v=f.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(s,g,P,h);if(j instanceof Error)throw j;return j}catch(g){throw Ut(g,c,$e(d))}}function Vl(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 b(`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 b(`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 b(`Field "${s.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=Re(e.getParentInputType());if(fe(n)){const r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new b(`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 b(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function Ul(e){return{Field(t){const n=Re(e.getType());n&&wt(n)&&e.reportError(new b(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}function ma(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
62
  query IntrospectionQuery {
52
63
  __schema {
53
64
  ${s}
@@ -136,6 +147,14 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
136
147
  ofType {
137
148
  kind
138
149
  name
150
+ ofType {
151
+ kind
152
+ name
153
+ ofType {
154
+ kind
155
+ name
156
+ }
157
+ }
139
158
  }
140
159
  }
141
160
  }
@@ -144,21 +163,21 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
144
163
  }
145
164
  }
146
165
  }
147
- `}function $l(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 Cl(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 Ml(e,t){const n={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,...t},r=tr(ua(n)),i=Ko({schema:e,document:r});return!i.errors&&i.data||ye(!1),i.data}function Vl(e,t){Me(e)&&Me(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,y=>y.name,y=>h(y));for(const y of[...gn,..._n])r[y.name]&&(r[y.name]=y);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(L):[];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(y){if(y.kind===se.LIST){const g=y.ofType;if(!g)throw new Error("Decorated type deeper than introspection query.");return new we(u(g))}if(y.kind===se.NON_NULL){const g=y.ofType;if(!g)throw new Error("Decorated type deeper than introspection query.");const j=u(g);return new W(Ks(j))}return c(y)}function c(y){const g=y.name;if(!g)throw new Error(`Unknown type reference: ${I(y)}.`);const j=r[g];if(!j)throw new Error(`Invalid or incomplete schema, unknown type: ${g}. Ensure that a full introspection query is used in order to build a client schema.`);return j}function f(y){return Xs(c(y))}function d(y){return Ws(c(y))}function h(y){if(y!=null&&y.name!=null&&y.kind!=null)switch(y.kind){case se.SCALAR:return v(y);case se.OBJECT:return M(y);case se.INTERFACE:return U(y);case se.UNION:return P(y);case se.ENUM:return z(y);case se.INPUT_OBJECT:return Z(y)}const g=I(y);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${g}.`)}function v(y){return new nt({name:y.name,description:y.description,specifiedByURL:y.specifiedByURL})}function E(y){if(y.interfaces===null&&y.kind===se.INTERFACE)return[];if(!y.interfaces){const g=I(y);throw new Error(`Introspection result missing interfaces: ${g}.`)}return y.interfaces.map(d)}function M(y){return new je({name:y.name,description:y.description,interfaces:()=>E(y),fields:()=>Q(y)})}function U(y){return new $t({name:y.name,description:y.description,interfaces:()=>E(y),fields:()=>Q(y)})}function P(y){if(!y.possibleTypes){const g=I(y);throw new Error(`Introspection result missing possibleTypes: ${g}.`)}return new Ct({name:y.name,description:y.description,types:()=>y.possibleTypes.map(f)})}function z(y){if(!y.enumValues){const g=I(y);throw new Error(`Introspection result missing enumValues: ${g}.`)}return new ht({name:y.name,description:y.description,values:ft(y.enumValues,g=>g.name,g=>({description:g.description,deprecationReason:g.deprecationReason}))})}function Z(y){if(!y.inputFields){const g=I(y);throw new Error(`Introspection result missing inputFields: ${g}.`)}return new Mt({name:y.name,description:y.description,fields:()=>C(y.inputFields)})}function Q(y){if(!y.fields)throw new Error(`Introspection result missing fields: ${I(y)}.`);return ft(y.fields,g=>g.name,V)}function V(y){const g=u(y.type);if(!pt(g)){const j=I(g);throw new Error(`Introspection must provide output type for fields, but received: ${j}.`)}if(!y.args){const j=I(y);throw new Error(`Introspection result missing field args: ${j}.`)}return{description:y.description,deprecationReason:y.deprecationReason,type:g,args:C(y.args)}}function C(y){return ft(y,g=>g.name,k)}function k(y){const g=u(y.type);if(!ke(g)){const X=I(g);throw new Error(`Introspection must provide input type for arguments, but received: ${X}.`)}const j=y.defaultValue!=null?Xe(Js(y.defaultValue),g):void 0;return{description:y.description,type:g,defaultValue:j,deprecationReason:y.deprecationReason}}function L(y){if(!y.args){const g=I(y);throw new Error(`Introspection result missing directive args: ${g}.`)}if(!y.locations){const g=I(y);throw new Error(`Introspection result missing directive locations: ${g}.`)}return new rt({name:y.name,description:y.description,isRepeatable:y.isRepeatable,locations:y.locations.slice(),args:C(y.args)})}}function Ul(e,t,n){di(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&&hl(t,e);const r=e.toConfig(),i=ca(r,t,n);return r===i?e:new Qt(i)}function ca(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]=z(p);for(const p of a){var v;const S=p.name.value;h[S]=(v=Zi[S])!==null&&v!==void 0?v:R(p)}const E={query:e.query&&U(e.query),mutation:e.mutation&&U(e.mutation),subscription:e.subscription&&U(e.subscription),...f&&j([f]),...j(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(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 M(p){return le(p)?new we(M(p.ofType)):H(p)?new W(M(p.ofType)):U(p)}function U(p){return h[p.name]}function P(p){const S=p.toConfig();return new rt({...S,args:it(S.args,g)})}function z(p){if(wt(p)||ir(p))return p;if(Ue(p))return V(p);if(te(p))return C(p);if(re(p))return k(p);if(Ne(p))return L(p);if(ge(p))return Q(p);if(fe(p))return Z(p);ye(!1,"Unexpected type: "+I(p))}function Z(p){var S;const O=p.toConfig(),F=(S=u[O.name])!==null&&S!==void 0?S:[];return new Mt({...O,fields:()=>({...it(O.fields,x=>({...x,type:M(x.type)})),...T(F)}),extensionASTNodes:O.extensionASTNodes.concat(F)})}function Q(p){var S;const O=p.toConfig(),F=(S=u[p.name])!==null&&S!==void 0?S:[];return new ht({...O,values:{...O.values,...w(F)},extensionASTNodes:O.extensionASTNodes.concat(F)})}function V(p){var S;const O=p.toConfig(),F=(S=u[O.name])!==null&&S!==void 0?S:[];let x=O.specifiedByURL;for(const J of F){var Y;x=(Y=es(J))!==null&&Y!==void 0?Y:x}return new nt({...O,specifiedByURL:x,extensionASTNodes:O.extensionASTNodes.concat(F)})}function C(p){var S;const O=p.toConfig(),F=(S=u[O.name])!==null&&S!==void 0?S:[];return new je({...O,interfaces:()=>[...p.getInterfaces().map(U),...b(F)],fields:()=>({...it(O.fields,y),...A(F)}),extensionASTNodes:O.extensionASTNodes.concat(F)})}function k(p){var S;const O=p.toConfig(),F=(S=u[O.name])!==null&&S!==void 0?S:[];return new $t({...O,interfaces:()=>[...p.getInterfaces().map(U),...b(F)],fields:()=>({...it(O.fields,y),...A(F)}),extensionASTNodes:O.extensionASTNodes.concat(F)})}function L(p){var S;const O=p.toConfig(),F=(S=u[O.name])!==null&&S!==void 0?S:[];return new Ct({...O,types:()=>[...p.getTypes().map(U),...D(F)],extensionASTNodes:O.extensionASTNodes.concat(F)})}function y(p){return{...p,type:M(p.type),args:p.args&&it(p.args,g)}}function g(p){return{...p,type:M(p.type)}}function j(p){const S={};for(const F of p){var O;const x=(O=F.operationTypes)!==null&&O!==void 0?O:[];for(const Y of x)S[Y.operation]=X(Y.type)}return S}function X(p){var S;const O=p.name.value,F=(S=Zi[O])!==null&&S!==void 0?S:h[O];if(F===void 0)throw new Error(`Unknown type: "${O}".`);return F}function oe(p){return p.kind===l.LIST_TYPE?new we(oe(p.type)):p.kind===l.NON_NULL_TYPE?new W(oe(p.type)):X(p)}function m(p){var S;return new rt({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:B(p.arguments),astNode:p})}function A(p){const S=Object.create(null);for(const x of p){var O;const Y=(O=x.fields)!==null&&O!==void 0?O:[];for(const J of Y){var F;S[J.name.value]={type:oe(J.type),description:(F=J.description)===null||F===void 0?void 0:F.value,args:B(J.arguments),deprecationReason:Sn(J),astNode:J}}}return S}function B(p){const S=p??[],O=Object.create(null);for(const x of S){var F;const Y=oe(x.type);O[x.name.value]={type:Y,description:(F=x.description)===null||F===void 0?void 0:F.value,defaultValue:Xe(x.defaultValue,Y),deprecationReason:Sn(x),astNode:x}}return O}function T(p){const S=Object.create(null);for(const x of p){var O;const Y=(O=x.fields)!==null&&O!==void 0?O:[];for(const J of Y){var F;const ne=oe(J.type);S[J.name.value]={type:ne,description:(F=J.description)===null||F===void 0?void 0:F.value,defaultValue:Xe(J.defaultValue,ne),deprecationReason:Sn(J),astNode:J}}}return S}function w(p){const S=Object.create(null);for(const x of p){var O;const Y=(O=x.values)!==null&&O!==void 0?O:[];for(const J of Y){var F;S[J.name.value]={description:(F=J.description)===null||F===void 0?void 0:F.value,deprecationReason:Sn(J),astNode:J}}}return S}function b(p){return p.flatMap(S=>{var O,F;return(O=(F=S.interfaces)===null||F===void 0?void 0:F.map(X))!==null&&O!==void 0?O:[]})}function D(p){return p.flatMap(S=>{var O,F;return(O=(F=S.types)===null||F===void 0?void 0:F.map(X))!==null&&O!==void 0?O:[]})}function R(p){var S;const O=p.name.value,F=(S=u[O])!==null&&S!==void 0?S:[];switch(p.kind){case l.OBJECT_TYPE_DEFINITION:{var x;const pe=[p,...F];return new je({name:O,description:(x=p.description)===null||x===void 0?void 0:x.value,interfaces:()=>b(pe),fields:()=>A(pe),astNode:p,extensionASTNodes:F})}case l.INTERFACE_TYPE_DEFINITION:{var Y;const pe=[p,...F];return new $t({name:O,description:(Y=p.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>b(pe),fields:()=>A(pe),astNode:p,extensionASTNodes:F})}case l.ENUM_TYPE_DEFINITION:{var J;const pe=[p,...F];return new ht({name:O,description:(J=p.description)===null||J===void 0?void 0:J.value,values:w(pe),astNode:p,extensionASTNodes:F})}case l.UNION_TYPE_DEFINITION:{var ne;const pe=[p,...F];return new Ct({name:O,description:(ne=p.description)===null||ne===void 0?void 0:ne.value,types:()=>D(pe),astNode:p,extensionASTNodes:F})}case l.SCALAR_TYPE_DEFINITION:{var ve;return new nt({name:O,description:(ve=p.description)===null||ve===void 0?void 0:ve.value,specifiedByURL:es(p),astNode:p,extensionASTNodes:F})}case l.INPUT_OBJECT_TYPE_DEFINITION:{var ae;const pe=[p,...F];return new Mt({name:O,description:(ae=p.description)===null||ae===void 0?void 0:ae.value,fields:()=>T(pe),astNode:p,extensionASTNodes:F})}}}}const Zi=ot([...gn,..._n],e=>e.name);function Sn(e){const t=fn(or,e);return t==null?void 0:t.reason}function es(e){const t=fn(ii,e);return t==null?void 0:t.url}function la(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&&pl(e);const r=ca({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 Qt({...r,directives:i})}function Pl(e,t){const n=tr(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return la(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}function jl(e){const t=e.toConfig(),n=ft(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 le(h)?new we(r(h.ofType)):H(h)?new W(r(h.ofType)):i(h)}function i(h){return n[h.name]}function s(h){return h&&i(h)}function o(h){const v=h.toConfig();return new rt({...v,locations:fa(v.locations,E=>E),args:a(v.args)})}function a(h){return Rn(h,v=>({...v,type:r(v.type)}))}function u(h){return Rn(h,v=>({...v,type:r(v.type),args:v.args&&a(v.args)}))}function c(h){return Rn(h,v=>({...v,type:r(v.type)}))}function f(h){return gr(h).map(i)}function d(h){if(Ue(h)||wt(h))return h;if(te(h)){const v=h.toConfig();return new je({...v,interfaces:()=>f(v.interfaces),fields:()=>u(v.fields)})}if(re(h)){const v=h.toConfig();return new $t({...v,interfaces:()=>f(v.interfaces),fields:()=>u(v.fields)})}if(Ne(h)){const v=h.toConfig();return new Ct({...v,types:()=>f(v.types)})}if(ge(h)){const v=h.toConfig();return new ht({...v,values:Rn(v.values,E=>E)})}if(fe(h)){const v=h.toConfig();return new Mt({...v,fields:()=>c(v.fields)})}ye(!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 fa(e,t=>t.name)}function fa(e,t){return e.slice().sort((n,r)=>{const i=t(n),s=t(r);return mn(i,s)})}function ql(e){return da(e,t=>!si(t),Gl)}function Bl(e){return da(e,si,wt)}function Gl(e){return!ir(e)&&!wt(e)}function da(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[Ql(e),...r.map(s=>Zl(s)),...i.map(s=>pa(s))].filter(Boolean).join(`
166
+ `}function Pl(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 jl(e,t){if(t.operation==="query"){const n=e.getQueryType();if(!n)throw new b("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 b("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){const n=e.getSubscriptionType();if(!n)throw new b("Schema is not configured for subscriptions.",{nodes:t});return n}throw new b("Can only have query, mutation and subscription operations.",{nodes:t})}function Bl(e,t){const n={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,...t},r=rr(ma(n)),i=sa({schema:e,document:r});return!i.errors&&i.data||ye(!1),i.data}function ql(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,y=>y.name,y=>h(y));for(const y of[...gn,...bn])r[y.name]&&(r[y.name]=y);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(x):[];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(y){if(y.kind===oe.LIST){const _=y.ofType;if(!_)throw new Error("Decorated type deeper than introspection query.");return new we(u(_))}if(y.kind===oe.NON_NULL){const _=y.ofType;if(!_)throw new Error("Decorated type deeper than introspection query.");const B=u(_);return new W(so(B))}return c(y)}function c(y){const _=y.name;if(!_)throw new Error(`Unknown type reference: ${I(y)}.`);const B=r[_];if(!B)throw new Error(`Invalid or incomplete schema, unknown type: ${_}. Ensure that a full introspection query is used in order to build a client schema.`);return B}function f(y){return ro(c(y))}function d(y){return io(c(y))}function h(y){if(y!=null&&y.name!=null&&y.kind!=null)switch(y.kind){case oe.SCALAR:return v(y);case oe.OBJECT:return P(y);case oe.INTERFACE:return C(y);case oe.UNION:return j(y);case oe.ENUM:return z(y);case oe.INPUT_OBJECT:return H(y)}const _=I(y);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${_}.`)}function v(y){return new nt({name:y.name,description:y.description,specifiedByURL:y.specifiedByURL})}function g(y){if(y.interfaces===null&&y.kind===oe.INTERFACE)return[];if(!y.interfaces){const _=I(y);throw new Error(`Introspection result missing interfaces: ${_}.`)}return y.interfaces.map(d)}function P(y){return new Be({name:y.name,description:y.description,interfaces:()=>g(y),fields:()=>Z(y)})}function C(y){return new $t({name:y.name,description:y.description,interfaces:()=>g(y),fields:()=>Z(y)})}function j(y){if(!y.possibleTypes){const _=I(y);throw new Error(`Introspection result missing possibleTypes: ${_}.`)}return new Ct({name:y.name,description:y.description,types:()=>y.possibleTypes.map(f)})}function z(y){if(!y.enumValues){const _=I(y);throw new Error(`Introspection result missing enumValues: ${_}.`)}return new ht({name:y.name,description:y.description,values:ft(y.enumValues,_=>_.name,_=>({description:_.description,deprecationReason:_.deprecationReason}))})}function H(y){if(!y.inputFields){const _=I(y);throw new Error(`Introspection result missing inputFields: ${_}.`)}return new Mt({name:y.name,description:y.description,fields:()=>k(y.inputFields)})}function Z(y){if(!y.fields)throw new Error(`Introspection result missing fields: ${I(y)}.`);return ft(y.fields,_=>_.name,U)}function U(y){const _=u(y.type);if(!pt(_)){const B=I(_);throw new Error(`Introspection must provide output type for fields, but received: ${B}.`)}if(!y.args){const B=I(y);throw new Error(`Introspection result missing field args: ${B}.`)}return{description:y.description,deprecationReason:y.deprecationReason,type:_,args:k(y.args)}}function k(y){return ft(y,_=>_.name,M)}function M(y){const _=u(y.type);if(!Le(_)){const V=I(_);throw new Error(`Introspection must provide input type for arguments, but received: ${V}.`)}const B=y.defaultValue!=null?Xe(eo(y.defaultValue),_):void 0;return{description:y.description,type:_,defaultValue:B,deprecationReason:y.deprecationReason}}function x(y){if(!y.args){const _=I(y);throw new Error(`Introspection result missing directive args: ${_}.`)}if(!y.locations){const _=I(y);throw new Error(`Introspection result missing directive locations: ${_}.`)}return new rt({name:y.name,description:y.description,isRepeatable:y.isRepeatable,locations:y.locations.slice(),args:k(y.args)})}}function Gl(e,t,n){Ei(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&&Tl(t,e);const r=e.toConfig(),i=ya(r,t,n);return r===i?e:new Qt(i)}function ya(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(lr(p)){const S=p.name.value,D=u[S];u[S]=D?D.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]=z(p);for(const p of a){var v;const S=p.name.value;h[S]=(v=cs[S])!==null&&v!==void 0?v:R(p)}const g={query:e.query&&C(e.query),mutation:e.mutation&&C(e.mutation),subscription:e.subscription&&C(e.subscription),...f&&B([f]),...B(d)};return{description:(r=f)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value,...g,types:Object.values(h),directives:[...e.directives.map(j),...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(p){return le(p)?new we(P(p.ofType)):X(p)?new W(P(p.ofType)):C(p)}function C(p){return h[p.name]}function j(p){const S=p.toConfig();return new rt({...S,args:it(S.args,_)})}function z(p){if(wt(p)||or(p))return p;if(Pe(p))return U(p);if(te(p))return k(p);if(ie(p))return M(p);if(Ne(p))return x(p);if(Ee(p))return Z(p);if(fe(p))return H(p);ye(!1,"Unexpected type: "+I(p))}function H(p){var S;const D=p.toConfig(),L=(S=u[D.name])!==null&&S!==void 0?S:[];return new Mt({...D,fields:()=>({...it(D.fields,F=>({...F,type:P(F.type)})),...E(L)}),extensionASTNodes:D.extensionASTNodes.concat(L)})}function Z(p){var S;const D=p.toConfig(),L=(S=u[p.name])!==null&&S!==void 0?S:[];return new ht({...D,values:{...D.values,...w(L)},extensionASTNodes:D.extensionASTNodes.concat(L)})}function U(p){var S;const D=p.toConfig(),L=(S=u[D.name])!==null&&S!==void 0?S:[];let F=D.specifiedByURL;for(const J of L){var Y;F=(Y=ls(J))!==null&&Y!==void 0?Y:F}return new nt({...D,specifiedByURL:F,extensionASTNodes:D.extensionASTNodes.concat(L)})}function k(p){var S;const D=p.toConfig(),L=(S=u[D.name])!==null&&S!==void 0?S:[];return new Be({...D,interfaces:()=>[...p.getInterfaces().map(C),...T(L)],fields:()=>({...it(D.fields,y),...O(L)}),extensionASTNodes:D.extensionASTNodes.concat(L)})}function M(p){var S;const D=p.toConfig(),L=(S=u[D.name])!==null&&S!==void 0?S:[];return new $t({...D,interfaces:()=>[...p.getInterfaces().map(C),...T(L)],fields:()=>({...it(D.fields,y),...O(L)}),extensionASTNodes:D.extensionASTNodes.concat(L)})}function x(p){var S;const D=p.toConfig(),L=(S=u[D.name])!==null&&S!==void 0?S:[];return new Ct({...D,types:()=>[...p.getTypes().map(C),...A(L)],extensionASTNodes:D.extensionASTNodes.concat(L)})}function y(p){return{...p,type:P(p.type),args:p.args&&it(p.args,_)}}function _(p){return{...p,type:P(p.type)}}function B(p){const S={};for(const L of p){var D;const F=(D=L.operationTypes)!==null&&D!==void 0?D:[];for(const Y of F)S[Y.operation]=V(Y.type)}return S}function V(p){var S;const D=p.name.value,L=(S=cs[D])!==null&&S!==void 0?S:h[D];if(L===void 0)throw new Error(`Unknown type: "${D}".`);return L}function ne(p){return p.kind===l.LIST_TYPE?new we(ne(p.type)):p.kind===l.NON_NULL_TYPE?new W(ne(p.type)):V(p)}function m(p){var S;return new rt({name:p.name.value,description:(S=p.description)===null||S===void 0?void 0:S.value,locations:p.locations.map(({value:D})=>D),isRepeatable:p.repeatable,args:G(p.arguments),astNode:p})}function O(p){const S=Object.create(null);for(const F of p){var D;const Y=(D=F.fields)!==null&&D!==void 0?D:[];for(const J of Y){var L;S[J.name.value]={type:ne(J.type),description:(L=J.description)===null||L===void 0?void 0:L.value,args:G(J.arguments),deprecationReason:An(J),astNode:J}}}return S}function G(p){const S=p??[],D=Object.create(null);for(const F of S){var L;const Y=ne(F.type);D[F.name.value]={type:Y,description:(L=F.description)===null||L===void 0?void 0:L.value,defaultValue:Xe(F.defaultValue,Y),deprecationReason:An(F),astNode:F}}return D}function E(p){const S=Object.create(null);for(const F of p){var D;const Y=(D=F.fields)!==null&&D!==void 0?D:[];for(const J of Y){var L;const re=ne(J.type);S[J.name.value]={type:re,description:(L=J.description)===null||L===void 0?void 0:L.value,defaultValue:Xe(J.defaultValue,re),deprecationReason:An(J),astNode:J}}}return S}function w(p){const S=Object.create(null);for(const F of p){var D;const Y=(D=F.values)!==null&&D!==void 0?D:[];for(const J of Y){var L;S[J.name.value]={description:(L=J.description)===null||L===void 0?void 0:L.value,deprecationReason:An(J),astNode:J}}}return S}function T(p){return p.flatMap(S=>{var D,L;return(D=(L=S.interfaces)===null||L===void 0?void 0:L.map(V))!==null&&D!==void 0?D:[]})}function A(p){return p.flatMap(S=>{var D,L;return(D=(L=S.types)===null||L===void 0?void 0:L.map(V))!==null&&D!==void 0?D:[]})}function R(p){var S;const D=p.name.value,L=(S=u[D])!==null&&S!==void 0?S:[];switch(p.kind){case l.OBJECT_TYPE_DEFINITION:{var F;const pe=[p,...L];return new Be({name:D,description:(F=p.description)===null||F===void 0?void 0:F.value,interfaces:()=>T(pe),fields:()=>O(pe),astNode:p,extensionASTNodes:L})}case l.INTERFACE_TYPE_DEFINITION:{var Y;const pe=[p,...L];return new $t({name:D,description:(Y=p.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>T(pe),fields:()=>O(pe),astNode:p,extensionASTNodes:L})}case l.ENUM_TYPE_DEFINITION:{var J;const pe=[p,...L];return new ht({name:D,description:(J=p.description)===null||J===void 0?void 0:J.value,values:w(pe),astNode:p,extensionASTNodes:L})}case l.UNION_TYPE_DEFINITION:{var re;const pe=[p,...L];return new Ct({name:D,description:(re=p.description)===null||re===void 0?void 0:re.value,types:()=>A(pe),astNode:p,extensionASTNodes:L})}case l.SCALAR_TYPE_DEFINITION:{var ve;return new nt({name:D,description:(ve=p.description)===null||ve===void 0?void 0:ve.value,specifiedByURL:ls(p),astNode:p,extensionASTNodes:L})}case l.INPUT_OBJECT_TYPE_DEFINITION:{var ae;const pe=[p,...L];return new Mt({name:D,description:(ae=p.description)===null||ae===void 0?void 0:ae.value,fields:()=>E(pe),astNode:p,extensionASTNodes:L})}}}}const cs=ot([...gn,...bn],e=>e.name);function An(e){const t=ln(ur,e);return t==null?void 0:t.reason}function ls(e){const t=ln(fi,e);return t==null?void 0:t.url}function va(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&&El(e);const r=ya({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 Qt({...r,directives:i})}function Ql(e,t){const n=rr(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return va(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}function Yl(e){const t=e.toConfig(),n=ft(br(t.types),h=>h.name,d);return new Qt({...t,types:Object.values(n),directives:br(t.directives).map(o),query:s(t.query),mutation:s(t.mutation),subscription:s(t.subscription)});function r(h){return le(h)?new we(r(h.ofType)):X(h)?new W(r(h.ofType)):i(h)}function i(h){return n[h.name]}function s(h){return h&&i(h)}function o(h){const v=h.toConfig();return new rt({...v,locations:ga(v.locations,g=>g),args:a(v.args)})}function a(h){return Sn(h,v=>({...v,type:r(v.type)}))}function u(h){return Sn(h,v=>({...v,type:r(v.type),args:v.args&&a(v.args)}))}function c(h){return Sn(h,v=>({...v,type:r(v.type)}))}function f(h){return br(h).map(i)}function d(h){if(Pe(h)||wt(h))return h;if(te(h)){const v=h.toConfig();return new Be({...v,interfaces:()=>f(v.interfaces),fields:()=>u(v.fields)})}if(ie(h)){const v=h.toConfig();return new $t({...v,interfaces:()=>f(v.interfaces),fields:()=>u(v.fields)})}if(Ne(h)){const v=h.toConfig();return new Ct({...v,types:()=>f(v.types)})}if(Ee(h)){const v=h.toConfig();return new ht({...v,values:Sn(v.values,g=>g)})}if(fe(h)){const v=h.toConfig();return new Mt({...v,fields:()=>c(v.fields)})}ye(!1,"Unexpected type: "+I(h))}}function Sn(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(hn))n[r]=t(e[r]);return n}function br(e){return ga(e,t=>t.name)}function ga(e,t){return e.slice().sort((n,r)=>{const i=t(n),s=t(r);return hn(i,s)})}function Jl(e){return Ea(e,t=>!di(t),zl)}function Hl(e){return Ea(e,di,wt)}function zl(e){return!or(e)&&!wt(e)}function Ea(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[Xl(e),...r.map(s=>sf(s)),...i.map(s=>Ta(s))].filter(Boolean).join(`
148
167
 
149
- `)}function Ql(e){if(e.description==null&&Yl(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}`),qe(e)+`schema {
168
+ `)}function Xl(e){if(e.description==null&&Wl(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}`),qe(e)+`schema {
150
169
  ${t.join(`
151
170
  `)}
152
- }`}function Yl(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 pa(e){if(Ue(e))return Jl(e);if(te(e))return Hl(e);if(re(e))return zl(e);if(Ne(e))return Xl(e);if(ge(e))return Wl(e);if(fe(e))return Kl(e);ye(!1,"Unexpected type: "+I(e))}function Jl(e){return qe(e)+`scalar ${e.name}`+ef(e)}function ha(e){const t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function Hl(e){return qe(e)+`type ${e.name}`+ha(e)+ma(e)}function zl(e){return qe(e)+`interface ${e.name}`+ha(e)+ma(e)}function Xl(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return qe(e)+"union "+e.name+n}function Wl(e){const t=e.getValues().map((n,r)=>qe(n," ",!r)+" "+n.name+Ri(n.deprecationReason));return qe(e)+`enum ${e.name}`+Si(t)}function Kl(e){const t=Object.values(e.getFields()).map((n,r)=>qe(n," ",!r)+" "+Mr(n));return qe(e)+`input ${e.name}`+Si(t)}function ma(e){const t=Object.values(e.getFields()).map((n,r)=>qe(n," ",!r)+" "+n.name+ya(n.args," ")+": "+String(n.type)+Ri(n.deprecationReason));return Si(t)}function Si(e){return e.length!==0?` {
171
+ }`}function Wl(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 Ta(e){if(Pe(e))return Kl(e);if(te(e))return Zl(e);if(ie(e))return ef(e);if(Ne(e))return tf(e);if(Ee(e))return nf(e);if(fe(e))return rf(e);ye(!1,"Unexpected type: "+I(e))}function Kl(e){return qe(e)+`scalar ${e.name}`+of(e)}function ba(e){const t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function Zl(e){return qe(e)+`type ${e.name}`+ba(e)+_a(e)}function ef(e){return qe(e)+`interface ${e.name}`+ba(e)+_a(e)}function tf(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return qe(e)+"union "+e.name+n}function nf(e){const t=e.getValues().map((n,r)=>qe(n," ",!r)+" "+n.name+Mi(n.deprecationReason));return qe(e)+`enum ${e.name}`+Ci(t)}function rf(e){const t=Object.values(e.getFields()).map((n,r)=>qe(n," ",!r)+" "+Br(n));return qe(e)+`input ${e.name}`+Ci(t)}function _a(e){const t=Object.values(e.getFields()).map((n,r)=>qe(n," ",!r)+" "+n.name+Na(n.args," ")+": "+String(n.type)+Mi(n.deprecationReason));return Ci(t)}function Ci(e){return e.length!==0?` {
153
172
  `+e.join(`
154
173
  `)+`
155
- }`:""}function ya(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(Mr).join(", ")+")":`(
156
- `+e.map((n,r)=>qe(n," "+t,!r)+" "+t+Mr(n)).join(`
174
+ }`:""}function Na(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(Br).join(", ")+")":`(
175
+ `+e.map((n,r)=>qe(n," "+t,!r)+" "+t+Br(n)).join(`
157
176
  `)+`
158
- `+t+")"}function Mr(e){const t=dt(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${ce(t)}`),n+Ri(e.deprecationReason)}function Zl(e){return qe(e)+"directive @"+e.name+ya(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Ri(e){return e==null?"":e!==ri?` @deprecated(reason: ${ce({kind:l.STRING,value:e})})`:" @deprecated"}function ef(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${ce({kind:l.STRING,value:e.specifiedByURL})})`}function qe(e,t="",n=!0){const{description:r}=e;if(r==null)return"";const i=ce({kind:l.STRING,value:r,block:Mu(r)});return(t&&!n?`
177
+ `+t+")"}function Br(e){const t=dt(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${ce(t)}`),n+Mi(e.deprecationReason)}function sf(e){return qe(e)+"directive @"+e.name+Na(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Mi(e){return e==null?"":e!==li?` @deprecated(reason: ${ce({kind:l.STRING,value:e})})`:" @deprecated"}function of(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${ce({kind:l.STRING,value:e.specifiedByURL})})`}function qe(e,t="",n=!0){const{description:r}=e;if(r==null)return"";const i=ce({kind:l.STRING,value:r,block:Bu(r)});return(t&&!n?`
159
178
  `+t:t)+i.replace(/\n/g,`
160
179
  `+t)+`
161
- `}function tf(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:l.DOCUMENT,definitions:t}}function nf(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]=ts(i.selectionSet);break}const r=Object.create(null);for(const i of t){const s=new Set;for(const a of ts(i.selectionSet))va(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 va(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(r!==void 0)for(const i of r)va(e,t,i)}}function ts(e){const t=[];return Gt(e,{FragmentSpread(n){t.push(n.name.value)}}),t}function rf(e){const t=Ys(e)?e:new er(e),n=t.body,r=new Hr(t);let i="",s=!1;for(;r.advance().kind!==N.EOF;){const o=r.token,a=o.kind,u=!qs(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 sf(e){const t=Ea(e);if(t)throw t;return e}function Ea(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{Ve(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 Je;(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"})(Je||(Je={}));function of(e,t){return ga(e,t).filter(n=>n.type in he)}function af(e,t){return ga(e,t).filter(n=>n.type in Je)}function ga(e,t){return[...cf(e,t),...uf(e,t)]}function uf(e,t){const n=[],r=at(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=at(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 cf(e,t){const n=[],r=at(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const i of r.removed)n.push({type:he.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(...df(i,s)):Ne(i)&&Ne(s)?n.push(...ff(i,s)):fe(i)&&fe(s)?n.push(...lf(i,s)):te(i)&&te(s)?n.push(...rs(i,s),...ns(i,s)):re(i)&&re(s)?n.push(...rs(i,s),...ns(i,s)):i.constructor!==s.constructor&&n.push({type:he.TYPE_CHANGED_KIND,description:`${i.name} changed from ${is(i)} to ${is(s)}.`});return n}function lf(e,t){const n=[],r=at(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.added)rr(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:Je.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 ff(e,t){const n=[],r=at(e.getTypes(),t.getTypes());for(const i of r.added)n.push({type:Je.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 df(e,t){const n=[],r=at(e.getValues(),t.getValues());for(const i of r.added)n.push({type:Je.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 ns(e,t){const n=[],r=at(e.getInterfaces(),t.getInterfaces());for(const i of r.added)n.push({type:Je.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 rs(e,t){const n=[],r=at(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(...pf(e,i,s)),Zt(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 pf(e,t,n){const r=[],i=at(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:Je.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${s.name} defaultValue was removed.`});else{const u=ss(s.defaultValue,s.type),c=ss(o.defaultValue,o.type);u!==c&&r.push({type:Je.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:Je.OPTIONAL_ARG_ADDED,description:`An optional arg ${s.name} on ${e.name}.${t.name} was added.`});return r}function Zt(e,t){return le(e)?le(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 le(e)?le(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 is(e){if(Ue(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(fe(e))return"an Input type";ye(!1,"Unexpected type: "+I(e))}function ss(e,t){const n=dt(e,t);return n!=null||ye(!1),ce(cr(n))}function at(e,t){const n=[],r=[],i=[],s=ot(e,({name:a})=>a),o=ot(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 hf=Object.freeze(Object.defineProperty({__proto__:null,BREAK:St,get BreakingChangeType(){return he},DEFAULT_DEPRECATION_REASON:ri,get DangerousChangeType(){return Je},get DirectiveLocation(){return G},ExecutableDefinitionsRule:uo,FieldsOnCorrectTypeRule:co,FragmentsOnCompositeTypesRule:lo,GRAPHQL_MAX_INT:xn,GRAPHQL_MIN_INT:$n,GraphQLBoolean:$e,GraphQLDeprecatedDirective:or,GraphQLDirective:rt,GraphQLEnumType:ht,GraphQLError:_,GraphQLFloat:so,GraphQLID:ei,GraphQLIncludeDirective:ti,GraphQLInputObjectType:Mt,GraphQLInt:io,GraphQLInterfaceType:$t,GraphQLList:we,GraphQLNonNull:W,GraphQLObjectType:je,GraphQLScalarType:nt,GraphQLSchema:Qt,GraphQLSkipDirective:ni,GraphQLSpecifiedByDirective:ii,GraphQLString:me,GraphQLUnionType:Ct,get Kind(){return l},KnownArgumentNamesRule:fo,KnownDirectivesRule:bi,KnownFragmentNamesRule:ho,KnownTypeNamesRule:_i,Lexer:Hr,Location:Ms,LoneAnonymousOperationRule:mo,LoneSchemaDefinitionRule:yo,NoDeprecatedCustomRule:Fl,NoFragmentCyclesRule:vo,NoSchemaIntrospectionCustomRule:xl,NoUndefinedVariablesRule:Eo,NoUnusedFragmentsRule:go,NoUnusedVariablesRule:To,get OperationTypeNode(){return be},OverlappingFieldsCanBeMergedRule:_o,PossibleFragmentSpreadsRule:wo,PossibleTypeExtensionsRule:Oo,ProvidedRequiredArgumentsRule:Ao,ScalarLeafsRule:So,SchemaMetaFieldDef:un,SingleFieldSubscriptionsRule:xo,Source:er,Token:Yr,get TokenKind(){return N},TypeInfo:yi,get TypeKind(){return se},TypeMetaFieldDef:cn,TypeNameMetaFieldDef:ln,UniqueArgumentDefinitionNamesRule:$o,UniqueArgumentNamesRule:Oi,UniqueDirectiveNamesRule:Co,UniqueDirectivesPerLocationRule:Ai,UniqueEnumValueNamesRule:Mo,UniqueFieldDefinitionNamesRule:Vo,UniqueFragmentNamesRule:Uo,UniqueInputFieldNamesRule:Di,UniqueOperationNamesRule:Po,UniqueOperationTypesRule:jo,UniqueTypeNamesRule:qo,UniqueVariableNamesRule:Bo,ValidationContext:zo,ValuesOfCorrectTypeRule:Go,VariablesAreInputTypesRule:Qo,VariablesInAllowedPositionRule:Yo,__Directive:ai,__DirectiveLocation:ui,__EnumValue:li,__Field:ci,__InputValue:bn,__Schema:ar,__Type:Pe,__TypeKind:fi,assertAbstractType:_c,assertCompositeType:bc,assertDirective:Dc,assertEnumType:hc,assertEnumValueName:zs,assertInputObjectType:mc,assertInputType:Ec,assertInterfaceType:Ws,assertLeafType:Tc,assertListType:yc,assertName:Ve,assertNamedType:Ic,assertNonNullType:vc,assertNullableType:Ks,assertObjectType:Xs,assertOutputType:gc,assertScalarType:dc,assertSchema:di,assertType:fc,assertUnionType:pc,assertValidName:sf,assertValidSchema:hi,assertWrappingType:Nc,astFromValue:dt,buildASTSchema:la,buildClientSchema:Vl,buildSchema:Pl,coerceInputValue:Lo,concatAST:tf,createSourceEventStream:aa,defaultFieldResolver:Cr,defaultTypeResolver:ra,doTypesOverlap:Lr,execute:fr,executeSync:Ko,extendSchema:Ul,findBreakingChanges:of,findDangerousChanges:af,formatError:Fu,getArgumentValues:lr,getDirectiveValues:fn,getEnterLeaveForKind:xt,getIntrospectionQuery:ua,getLocation:Un,getNamedType:Re,getNullableType:Wr,getOperationAST:$l,getOperationRootType:Cl,getVariableValues:ko,getVisitFn:uc,graphql:Al,graphqlSync:Dl,introspectionFromSchema:Ml,introspectionTypes:_n,isAbstractType:We,isCompositeType:tt,isConstValueNode:kr,isDefinitionNode:Pc,isDirective:sr,isEnumType:ge,isEqualType:jn,isExecutableDefinitionNode:Ei,isInputObjectType:fe,isInputType:ke,isInterfaceType:re,isIntrospectionType:wt,isLeafType:et,isListType:le,isNamedType:En,isNonNullType:H,isNullableType:Xr,isObjectType:te,isOutputType:pt,isRequiredArgument:yt,isRequiredInputField:rr,isScalarType:Ue,isSchema:oo,isSelectionNode:jc,isSpecifiedDirective:si,isSpecifiedScalarType:ir,isType:yn,isTypeDefinitionNode:Yt,isTypeExtensionNode:ur,isTypeNode:qc,isTypeSubTypeOf:Tt,isTypeSystemDefinitionNode:gi,isTypeSystemExtensionNode:Ti,isUnionType:Ne,isValidNameError:Ea,isValueNode:ao,isWrappingType:vn,lexicographicSortSchema:jl,locatedError:Ut,parse:tr,parseConstValue:Zu,parseType:ec,parseValue:Js,print:ce,printError:ku,printIntrospectionSchema:Bl,printLocation:Cs,printSchema:ql,printSourceLocation:Qr,printType:pa,resolveObjMapThunk:Zr,resolveReadonlyArrayThunk:Kr,responsePathAsArray:xe,separateOperations:nf,specifiedDirectives:vt,specifiedRules:Jo,specifiedScalarTypes:gn,stripIgnoredCharacters:rf,subscribe:Rl,syntaxError:Te,typeFromAST:Fe,validate:Xo,validateSchema:pi,valueFromAST:Xe,valueFromASTUntyped:Pn,version:Du,versionInfo:Su,visit:Gt,visitInParallel:zr,visitWithTypeInfo:vi},Symbol.toStringTag,{value:"Module"})),mf=za(hf);Object.defineProperty(Ft,"__esModule",{value:!0});Ft.resolveRequestDocument=void 0;var os=mf;function as(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 yf(e){if(typeof e=="string"){var t=void 0;try{var n=(0,os.parse)(e);t=as(n)}catch{}return{query:e,operationName:t}}var r=as(e);return{query:(0,os.print)(e),operationName:r}}Ft.resolveRequestDocument=yf;var Xt={},us;function vf(){if(us)return Xt;us=1;var e=ie&&ie.__assign||function(){return e=Object.assign||function(V){for(var C,k=1,L=arguments.length;k<L;k++){C=arguments[k];for(var y in C)Object.prototype.hasOwnProperty.call(C,y)&&(V[y]=C[y])}return V},e.apply(this,arguments)},t=ie&&ie.__awaiter||function(V,C,k,L){function y(g){return g instanceof k?g:new k(function(j){j(g)})}return new(k||(k=Promise))(function(g,j){function X(A){try{m(L.next(A))}catch(B){j(B)}}function oe(A){try{m(L.throw(A))}catch(B){j(B)}}function m(A){A.done?g(A.value):y(A.value).then(X,oe)}m((L=L.apply(V,C||[])).next())})},n=ie&&ie.__generator||function(V,C){var k={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},L,y,g,j;return j={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(j[Symbol.iterator]=function(){return this}),j;function X(m){return function(A){return oe([m,A])}}function oe(m){if(L)throw new TypeError("Generator is already executing.");for(;k;)try{if(L=1,y&&(g=m[0]&2?y.return:m[0]?y.throw||((g=y.return)&&g.call(y),0):y.next)&&!(g=g.call(y,m[1])).done)return g;switch(y=0,g&&(m=[m[0]&2,g.value]),m[0]){case 0:case 1:g=m;break;case 4:return k.label++,{value:m[1],done:!1};case 5:k.label++,y=m[1],m=[0];continue;case 7:m=k.ops.pop(),k.trys.pop();continue;default:if(g=k.trys,!(g=g.length>0&&g[g.length-1])&&(m[0]===6||m[0]===2)){k=0;continue}if(m[0]===3&&(!g||m[1]>g[0]&&m[1]<g[3])){k.label=m[1];break}if(m[0]===6&&k.label<g[1]){k.label=g[1],g=m;break}if(g&&k.label<g[2]){k.label=g[2],k.ops.push(m);break}g[2]&&k.ops.pop(),k.trys.pop();continue}m=C.call(V,k)}catch(A){m=[6,A],y=0}finally{L=g=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",v=function(){function V(C,k,L){this._type=C,this._payload=k,this._id=L}return Object.defineProperty(V.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"text",{get:function(){var C={type:this.type};return this.id!=null&&this.id!=null&&(C.id=this.id),this.payload!=null&&this.payload!=null&&(C.payload=this.payload),JSON.stringify(C)},enumerable:!1,configurable:!0}),V.parse=function(C,k){var L=JSON.parse(C),y=L.type,g=L.payload,j=L.id;return new V(y,k(g),j)},V}(),E=function(){function V(C,k){var L=k.onInit,y=k.onAcknowledged,g=k.onPing,j=k.onPong,X=this;this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=C,C.onopen=function(oe){return t(X,void 0,void 0,function(){var m,A,B,T;return n(this,function(w){switch(w.label){case 0:return this.socketState.acknowledged=!1,this.socketState.subscriptions={},A=(m=C).send,B=U,L?[4,L()]:[3,2];case 1:return T=w.sent(),[3,3];case 2:T=null,w.label=3;case 3:return A.apply(m,[B.apply(void 0,[T]).text]),[2]}})})},C.onclose=function(oe){X.socketState.acknowledged=!1,X.socketState.subscriptions={}},C.onerror=function(oe){console.error(oe)},C.onmessage=function(oe){try{var m=M(oe.data);switch(m.type){case o:{X.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(X.socketState.acknowledged=!0,y&&y(m.payload));return}case a:{g?g(m.payload).then(function(b){return C.send(z(b).text)}):C.send(z(null).text);return}case u:{j&&j(m.payload);return}}if(!X.socketState.acknowledged||m.id===void 0||m.id===null||!X.socketState.subscriptions[m.id])return;var A=X.socketState.subscriptions[m.id],B=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:B,variables:T}));return}case d:{w.error&&w.error(new r.ClientError({errors:m.payload,status:200},{query:B,variables:T}));return}case h:{w.complete&&w.complete(),delete X.socketState.subscriptions[m.id];return}}}catch(b){console.error(b),C.close(1006)}C.close(4400,"Unknown graphql-ws message.")}}return V.prototype.makeSubscribe=function(C,k,L,y){var g=this,j=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[j]={query:C,variables:y,subscriber:L},this.socket.send(Z(j,{query:C,operationName:k,variables:y}).text),function(){g.socket.send(Q(j).text),delete g.socketState.subscriptions[j]}},V.prototype.rawRequest=function(C,k){var L=this;return new Promise(function(y,g){var j;L.rawSubscribe(C,{next:function(X,oe){return j={data:X,extensions:oe}},error:g,complete:function(){return y(j)}},k)})},V.prototype.request=function(C,k){var L=this;return new Promise(function(y,g){var j;L.subscribe(C,{next:function(X){return j=X},error:g,complete:function(){return y(j)}},k)})},V.prototype.subscribe=function(C,k,L){var y=(0,i.resolveRequestDocument)(C),g=y.query,j=y.operationName;return this.makeSubscribe(g,j,k,L)},V.prototype.rawSubscribe=function(C,k,L){return this.makeSubscribe(C,void 0,k,L)},V.prototype.ping=function(C){this.socket.send(P(C).text)},V.prototype.close=function(){this.socket.close(1e3)},V.PROTOCOL="graphql-transport-ws",V}();Xt.GraphQLWebSocketClient=E;function M(V,C){C===void 0&&(C=function(L){return L});var k=v.parse(V,C);return k}function U(V){return new v(s,V)}function P(V){return new v(a,V,void 0)}function z(V){return new v(u,V,void 0)}function Z(V,C){return new v(c,C,V)}function Q(V){return new v(h,void 0,V)}return Xt}(function(e){var t=ie&&ie.__assign||function(){return t=Object.assign||function(T){for(var w,b=1,D=arguments.length;b<D;b++){w=arguments[b];for(var R in w)Object.prototype.hasOwnProperty.call(w,R)&&(T[R]=w[R])}return T},t.apply(this,arguments)},n=ie&&ie.__createBinding||(Object.create?function(T,w,b,D){D===void 0&&(D=b);var R=Object.getOwnPropertyDescriptor(w,b);(!R||("get"in R?!w.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return w[b]}}),Object.defineProperty(T,D,R)}:function(T,w,b,D){D===void 0&&(D=b),T[D]=w[b]}),r=ie&&ie.__setModuleDefault||(Object.create?function(T,w){Object.defineProperty(T,"default",{enumerable:!0,value:w})}:function(T,w){T.default=w}),i=ie&&ie.__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=ie&&ie.__awaiter||function(T,w,b,D){function R(p){return p instanceof b?p:new b(function(S){S(p)})}return new(b||(b=Promise))(function(p,S){function O(Y){try{x(D.next(Y))}catch(J){S(J)}}function F(Y){try{x(D.throw(Y))}catch(J){S(J)}}function x(Y){Y.done?p(Y.value):R(Y.value).then(O,F)}x((D=D.apply(T,w||[])).next())})},o=ie&&ie.__generator||function(T,w){var b={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},D,R,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(x){return function(Y){return F([x,Y])}}function F(x){if(D)throw new TypeError("Generator is already executing.");for(;b;)try{if(D=1,R&&(p=x[0]&2?R.return:x[0]?R.throw||((p=R.return)&&p.call(R),0):R.next)&&!(p=p.call(R,x[1])).done)return p;switch(R=0,p&&(x=[x[0]&2,p.value]),x[0]){case 0:case 1:p=x;break;case 4:return b.label++,{value:x[1],done:!1};case 5:b.label++,R=x[1],x=[0];continue;case 7:x=b.ops.pop(),b.trys.pop();continue;default:if(p=b.trys,!(p=p.length>0&&p[p.length-1])&&(x[0]===6||x[0]===2)){b=0;continue}if(x[0]===3&&(!p||x[1]>p[0]&&x[1]<p[3])){b.label=x[1];break}if(x[0]===6&&b.label<p[1]){b.label=p[1],p=x;break}if(p&&b.label<p[2]){b.label=p[2],b.ops.push(x);break}p[2]&&b.ops.pop(),b.trys.pop();continue}x=w.call(T,b)}catch(Y){x=[6,Y],R=0}finally{D=p=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}},a=ie&&ie.__rest||function(T,w){var b={};for(var D in T)Object.prototype.hasOwnProperty.call(T,D)&&w.indexOf(D)<0&&(b[D]=T[D]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,D=Object.getOwnPropertySymbols(T);R<D.length;R++)w.indexOf(D[R])<0&&Object.prototype.propertyIsEnumerable.call(T,D[R])&&(b[D[R]]=T[D[R]]);return b},u=ie&&ie.__spreadArray||function(T,w,b){if(b||arguments.length===2)for(var D=0,R=w.length,p;D<R;D++)(p||!(D in w))&&(p||(p=Array.prototype.slice.call(w,0,D)),p[D]=w[D]);return T.concat(p||Array.prototype.slice.call(w))},c=ie&&ie.__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(lu),d=f,h=c(Gr),v=pn,E=Le,M=hn;Object.defineProperty(e,"ClientError",{enumerable:!0,get:function(){return M.ClientError}});var U=Ft,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 D=b[0],R=b[1];w[D]=R}):w=T),w},z=function(T){return T.replace(/([\s,]|#[^\n\r]+)+/g," ").trim()},Z=function(T){var w=T.query,b=T.variables,D=T.operationName,R=T.jsonSerializer;if(!Array.isArray(w)){var p=["query=".concat(encodeURIComponent(z(w)))];return b&&p.push("variables=".concat(encodeURIComponent(R.stringify(b)))),D&&p.push("operationName=".concat(encodeURIComponent(D))),p.join("&")}if(typeof b<"u"&&!Array.isArray(b))throw new Error("Cannot create query with given variable type, array expected");var S=w.reduce(function(O,F,x){return O.push({query:z(F),variables:b?R.stringify(b[x]):void 0}),O},[]);return"query=".concat(encodeURIComponent(R.stringify(S)))},Q=function(T){var w=T.url,b=T.query,D=T.variables,R=T.operationName,p=T.headers,S=T.fetch,O=T.fetchOptions,F=T.middleware;return s(void 0,void 0,void 0,function(){var x,Y,J;return o(this,function(ne){switch(ne.label){case 0:return x=(0,h.default)(b,D,R,O.jsonSerializer),Y=t({method:"POST",headers:t(t({},typeof x=="string"?{"Content-Type":"application/json"}:{}),p),body:x},O),F?[4,Promise.resolve(F(t(t({},Y),{url:w,operationName:R,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()]}})})},V=function(T){var w=T.url,b=T.query,D=T.variables,R=T.operationName,p=T.headers,S=T.fetch,O=T.fetchOptions,F=T.middleware;return s(void 0,void 0,void 0,function(){var x,Y,J;return o(this,function(ne){switch(ne.label){case 0:return x=Z({query:b,variables:D,operationName:R,jsonSerializer:O.jsonSerializer}),Y=t({method:"GET",headers:p},O),F?[4,Promise.resolve(F(t(t({},Y),{url:w,operationName:R,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(x),Y)];case 3:return[2,ne.sent()]}})})},C=function(){function T(w,b){b===void 0&&(b={}),this.url=w,this.options=b}return T.prototype.rawRequest=function(w,b,D){return s(this,void 0,void 0,function(){var R,p,S,O,F,x,Y,J,ne,ve,ae,pe;return o(this,function(Oe){return R=(0,E.parseRawRequestArgs)(w,b,D),p=this.options,S=p.headers,O=p.fetch,F=O===void 0?f.default:O,x=p.method,Y=x===void 0?"POST":x,J=p.requestMiddleware,ne=p.responseMiddleware,ve=a(p,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ae=this.url,R.signal!==void 0&&(ve.signal=R.signal),pe=(0,U.resolveRequestDocument)(R.query).operationName,[2,k({url:ae,query:R.query,variables:R.variables,headers:t(t({},P(X(S))),P(R.requestHeaders)),operationName:pe,fetch:F,method:Y,fetchOptions:ve,middleware:J}).then(function(Ae){return ne&&ne(Ae),Ae}).catch(function(Ae){throw ne&&ne(Ae),Ae})]})})},T.prototype.request=function(w){for(var b=[],D=1;D<arguments.length;D++)b[D-1]=arguments[D];return s(this,void 0,void 0,function(){var R,p,S,O,F,x,Y,J,ne,ve,ae,pe,Oe,Ae,Jt,Ht;return o(this,function(Nn){return R=b[0],p=b[1],S=(0,E.parseRequestArgs)(w,R,p),O=this.options,F=O.headers,x=O.fetch,Y=x===void 0?f.default:x,J=O.method,ne=J===void 0?"POST":J,ve=O.requestMiddleware,ae=O.responseMiddleware,pe=a(O,["headers","fetch","method","requestMiddleware","responseMiddleware"]),Oe=this.url,S.signal!==void 0&&(pe.signal=S.signal),Ae=(0,U.resolveRequestDocument)(S.document),Jt=Ae.query,Ht=Ae.operationName,[2,k({url:Oe,query:Jt,variables:S.variables,headers:t(t({},P(X(F))),P(S.requestHeaders)),operationName:Ht,fetch:Y,method:ne,fetchOptions:pe,middleware:ve}).then(function(ut){return ae&&ae(ut),ut.data}).catch(function(ut){throw ae&&ae(ut),ut})]})})},T.prototype.batchRequests=function(w,b){var D=(0,E.parseBatchRequestArgs)(w,b),R=this.options,p=R.headers,S=R.fetch,O=S===void 0?f.default:S,F=R.method,x=F===void 0?"POST":F,Y=R.requestMiddleware,J=R.responseMiddleware,ne=a(R,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ve=this.url;D.signal!==void 0&&(ne.signal=D.signal);var ae=D.documents.map(function(Oe){var Ae=Oe.document;return(0,U.resolveRequestDocument)(Ae).query}),pe=D.documents.map(function(Oe){var Ae=Oe.variables;return Ae});return k({url:ve,query:ae,variables:pe,headers:t(t({},P(X(p))),P(D.requestHeaders)),operationName:void 0,fetch:O,method:x,fetchOptions:ne,middleware:Y}).then(function(Oe){return J&&J(Oe),Oe.data}).catch(function(Oe){throw J&&J(Oe),Oe})},T.prototype.setHeaders=function(w){return this.options.headers=w,this},T.prototype.setHeader=function(w,b){var D,R=this.options.headers;return R?R[w]=b:this.options.headers=(D={},D[w]=b,D),this},T.prototype.setEndpoint=function(w){return this.url=w,this},T}();e.GraphQLClient=C;function k(T){var w=T.url,b=T.query,D=T.variables,R=T.headers,p=T.operationName,S=T.fetch,O=T.method,F=O===void 0?"POST":O,x=T.fetchOptions,Y=T.middleware;return s(this,void 0,void 0,function(){var J,ne,ve,ae,pe,Oe,Ae,Jt,Ht,Nn,ut;return o(this,function(dr){switch(dr.label){case 0:return J=F.toUpperCase()==="POST"?Q:V,ne=Array.isArray(b),[4,J({url:w,query:b,variables:D,operationName:p,headers:R,fetch:S,fetchOptions:x,middleware:Y})];case 1:return ve=dr.sent(),[4,j(ve,x.jsonSerializer)];case 2:if(ae=dr.sent(),pe=ne&&Array.isArray(ae)?!ae.some(function(ba){var _a=ba.data;return!_a}):!!ae.data,Oe=!ae.errors||x.errorPolicy==="all"||x.errorPolicy==="ignore",ve.ok&&Oe&&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 ut=typeof ae=="string"?{error:ae}:ae,new M.ClientError(t(t({},ut),{status:ve.status,headers:ve.headers}),{query:b,variables:D})}})})}function L(T,w){for(var b=[],D=2;D<arguments.length;D++)b[D-2]=arguments[D];return s(this,void 0,void 0,function(){var R,p;return o(this,function(S){return R=E.parseRawRequestExtendedArgs.apply(void 0,u([T,w],b,!1)),p=new C(R.url),[2,p.rawRequest(t({},R))]})})}e.rawRequest=L;function y(T,w){for(var b=[],D=2;D<arguments.length;D++)b[D-2]=arguments[D];return s(this,void 0,void 0,function(){var R,p;return o(this,function(S){return R=E.parseRequestExtendedArgs.apply(void 0,u([T,w],b,!1)),p=new C(R.url),[2,p.request(t({},R))]})})}e.request=y;function g(T,w,b){return s(this,void 0,void 0,function(){var D,R;return o(this,function(p){return D=(0,E.parseBatchRequestsExtendedArgs)(T,w,b),R=new C(D.url),[2,R.batchRequests(t({},D))]})})}e.batchRequests=g,e.default=y;function j(T,w){return w===void 0&&(w=v.defaultJsonSerializer),s(this,void 0,void 0,function(){var b,D,R;return o(this,function(p){switch(p.label){case 0:return T.headers.forEach(function(S,O){O.toLowerCase()==="content-type"&&(b=S)}),b&&(b.toLowerCase().startsWith("application/json")||b.toLowerCase().startsWith("application/graphql+json")||b.toLowerCase().startsWith("application/graphql-response+json"))?(R=(D=w).parse,[4,T.text()]):[3,2];case 1:return[2,R.apply(D,[p.sent()])];case 2:return[2,T.text()]}})})}function X(T){return typeof T=="function"?T():T}function oe(T){for(var w=[],b=1;b<arguments.length;b++)w[b-1]=arguments[b];return T.reduce(function(D,R,p){return"".concat(D).concat(R).concat(p in w?w[p]:"")},"")}e.gql=oe;function m(T){var w={};return T.forEach(function(b,D){w[D]=b}),w}var A=vf();Object.defineProperty(e,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return A.GraphQLWebSocketClient}});var B=Ft;Object.defineProperty(e,"resolveRequestDocument",{enumerable:!0,get:function(){return B.resolveRequestDocument}})})(qt);qt.gql`
180
+ `}function af(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:l.DOCUMENT,definitions:t}}function uf(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]=fs(i.selectionSet);break}const r=Object.create(null);for(const i of t){const s=new Set;for(const a of fs(i.selectionSet))Ia(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 Ia(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(r!==void 0)for(const i of r)Ia(e,t,i)}}function fs(e){const t=[];return Gt(e,{FragmentSpread(n){t.push(n.name.value)}}),t}function cf(e){const t=Zs(e)?e:new nr(e),n=t.body,r=new ti(t);let i="",s=!1;for(;r.advance().kind!==N.EOF;){const o=r.token,a=o.kind,u=!zs(o.kind);s&&(u||o.kind===N.SPREAD)&&(i+=" ");const c=n.slice(o.start,o.end);a===N.BLOCK_STRING?i+=Hs(o.value,{minimize:!0}):i+=c,s=u}return i}function lf(e){const t=wa(e);if(t)throw t;return e}function wa(e){if(typeof e=="string"||K(!1,"Expected name to be a string."),e.startsWith("__"))return new b(`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 Je;(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"})(Je||(Je={}));function ff(e,t){return Oa(e,t).filter(n=>n.type in he)}function df(e,t){return Oa(e,t).filter(n=>n.type in Je)}function Oa(e,t){return[...hf(e,t),...pf(e,t)]}function pf(e,t){const n=[],r=at(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=at(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 hf(e,t){const n=[],r=at(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const i of r.removed)n.push({type:he.TYPE_REMOVED,description:or(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(const[i,s]of r.persisted)Ee(i)&&Ee(s)?n.push(...vf(i,s)):Ne(i)&&Ne(s)?n.push(...yf(i,s)):fe(i)&&fe(s)?n.push(...mf(i,s)):te(i)&&te(s)?n.push(...ps(i,s),...ds(i,s)):ie(i)&&ie(s)?n.push(...ps(i,s),...ds(i,s)):i.constructor!==s.constructor&&n.push({type:he.TYPE_CHANGED_KIND,description:`${i.name} changed from ${hs(i)} to ${hs(s)}.`});return n}function mf(e,t){const n=[],r=at(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.added)sr(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:Je.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)nn(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 yf(e,t){const n=[],r=at(e.getTypes(),t.getTypes());for(const i of r.added)n.push({type:Je.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 vf(e,t){const n=[],r=at(e.getValues(),t.getValues());for(const i of r.added)n.push({type:Je.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 ds(e,t){const n=[],r=at(e.getInterfaces(),t.getInterfaces());for(const i of r.added)n.push({type:Je.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 ps(e,t){const n=[],r=at(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(...gf(e,i,s)),Zt(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 gf(e,t,n){const r=[],i=at(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(!nn(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:Je.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${s.name} defaultValue was removed.`});else{const u=ms(s.defaultValue,s.type),c=ms(o.defaultValue,o.type);u!==c&&r.push({type:Je.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:Je.OPTIONAL_ARG_ADDED,description:`An optional arg ${s.name} on ${e.name}.${t.name} was added.`});return r}function Zt(e,t){return le(e)?le(t)&&Zt(e.ofType,t.ofType)||X(t)&&Zt(e,t.ofType):X(e)?X(t)&&Zt(e.ofType,t.ofType):vn(t)&&e.name===t.name||X(t)&&Zt(e,t.ofType)}function nn(e,t){return le(e)?le(t)&&nn(e.ofType,t.ofType):X(e)?X(t)&&nn(e.ofType,t.ofType)||!X(t)&&nn(e.ofType,t):vn(t)&&e.name===t.name}function hs(e){if(Pe(e))return"a Scalar type";if(te(e))return"an Object type";if(ie(e))return"an Interface type";if(Ne(e))return"a Union type";if(Ee(e))return"an Enum type";if(fe(e))return"an Input type";ye(!1,"Unexpected type: "+I(e))}function ms(e,t){const n=dt(e,t);return n!=null||ye(!1),ce(fr(n))}function at(e,t){const n=[],r=[],i=[],s=ot(e,({name:a})=>a),o=ot(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 Ef=Object.freeze(Object.defineProperty({__proto__:null,BREAK:St,get BreakingChangeType(){return he},DEFAULT_DEPRECATION_REASON:li,get DangerousChangeType(){return Je},get DirectiveLocation(){return Q},ExecutableDefinitionsRule:yo,FieldsOnCorrectTypeRule:vo,FragmentsOnCompositeTypesRule:go,GRAPHQL_MAX_INT:$n,GRAPHQL_MIN_INT:Cn,GraphQLBoolean:Ce,GraphQLDeprecatedDirective:ur,GraphQLDirective:rt,GraphQLEnumType:ht,GraphQLError:b,GraphQLFloat:po,GraphQLID:ai,GraphQLIncludeDirective:ui,GraphQLInputObjectType:Mt,GraphQLInt:fo,GraphQLInterfaceType:$t,GraphQLList:we,GraphQLNonNull:W,GraphQLObjectType:Be,GraphQLScalarType:nt,GraphQLSchema:Qt,GraphQLSkipDirective:ci,GraphQLSpecifiedByDirective:fi,GraphQLString:me,GraphQLUnionType:Ct,get Kind(){return l},KnownArgumentNamesRule:Eo,KnownDirectivesRule:Ai,KnownFragmentNamesRule:bo,KnownTypeNamesRule:Si,Lexer:ti,Location:Gs,LoneAnonymousOperationRule:_o,LoneSchemaDefinitionRule:No,NoDeprecatedCustomRule:Vl,NoFragmentCyclesRule:Io,NoSchemaIntrospectionCustomRule:Ul,NoUndefinedVariablesRule:wo,NoUnusedFragmentsRule:Oo,NoUnusedVariablesRule:Do,get OperationTypeNode(){return be},OverlappingFieldsCanBeMergedRule:So,PossibleFragmentSpreadsRule:Lo,PossibleTypeExtensionsRule:Fo,ProvidedRequiredArgumentsRule:xo,ScalarLeafsRule:Co,SchemaMetaFieldDef:an,SingleFieldSubscriptionsRule:jo,Source:nr,Token:Zr,get TokenKind(){return N},TypeInfo:Ni,get TypeKind(){return oe},TypeMetaFieldDef:un,TypeNameMetaFieldDef:cn,UniqueArgumentDefinitionNamesRule:Bo,UniqueArgumentNamesRule:Fi,UniqueDirectiveNamesRule:qo,UniqueDirectivesPerLocationRule:xi,UniqueEnumValueNamesRule:Go,UniqueFieldDefinitionNamesRule:Qo,UniqueFragmentNamesRule:Yo,UniqueInputFieldNamesRule:$i,UniqueOperationNamesRule:Jo,UniqueOperationTypesRule:Ho,UniqueTypeNamesRule:zo,UniqueVariableNamesRule:Xo,ValidationContext:na,ValuesOfCorrectTypeRule:Wo,VariablesAreInputTypesRule:Ko,VariablesInAllowedPositionRule:Zo,__Directive:hi,__DirectiveLocation:mi,__EnumValue:vi,__Field:yi,__InputValue:Tn,__Schema:cr,__Type:je,__TypeKind:gi,assertAbstractType:Dc,assertCompositeType:Oc,assertDirective:Fc,assertEnumType:Ec,assertEnumValueName:no,assertInputObjectType:Tc,assertInputType:Nc,assertInterfaceType:io,assertLeafType:wc,assertListType:bc,assertName:Ue,assertNamedType:Sc,assertNonNullType:_c,assertNullableType:so,assertObjectType:ro,assertOutputType:Ic,assertScalarType:vc,assertSchema:Ei,assertType:yc,assertUnionType:gc,assertValidName:lf,assertValidSchema:bi,assertWrappingType:Ac,astFromValue:dt,buildASTSchema:va,buildClientSchema:ql,buildSchema:Ql,coerceInputValue:Vo,concatAST:af,createSourceEventStream:ha,defaultFieldResolver:jr,defaultTypeResolver:la,doTypesOverlap:Cr,execute:pr,executeSync:sa,extendSchema:Gl,findBreakingChanges:ff,findDangerousChanges:df,formatError:Vu,getArgumentValues:dr,getDirectiveValues:ln,getEnterLeaveForKind:xt,getIntrospectionQuery:ma,getLocation:Pn,getNamedType:Re,getNullableType:ii,getOperationAST:Pl,getOperationRootType:jl,getVariableValues:Uo,getVisitFn:pc,graphql:Ll,graphqlSync:Fl,introspectionFromSchema:Bl,introspectionTypes:bn,isAbstractType:We,isCompositeType:tt,isConstValueNode:Mr,isDefinitionNode:Qc,isDirective:ar,isEnumType:Ee,isEqualType:Bn,isExecutableDefinitionNode:wi,isInputObjectType:fe,isInputType:Le,isInterfaceType:ie,isIntrospectionType:wt,isLeafType:et,isListType:le,isNamedType:vn,isNonNullType:X,isNullableType:ri,isObjectType:te,isOutputType:pt,isRequiredArgument:yt,isRequiredInputField:sr,isScalarType:Pe,isSchema:ho,isSelectionNode:Yc,isSpecifiedDirective:di,isSpecifiedScalarType:or,isType:mn,isTypeDefinitionNode:Yt,isTypeExtensionNode:lr,isTypeNode:Jc,isTypeSubTypeOf:Tt,isTypeSystemDefinitionNode:Oi,isTypeSystemExtensionNode:Di,isUnionType:Ne,isValidNameError:wa,isValueNode:mo,isWrappingType:yn,lexicographicSortSchema:Yl,locatedError:Ut,parse:rr,parseConstValue:ic,parseType:sc,parseValue:eo,print:ce,printError:Mu,printIntrospectionSchema:Hl,printLocation:qs,printSchema:Jl,printSourceLocation:Kr,printType:Ta,resolveObjMapThunk:oi,resolveReadonlyArrayThunk:si,responsePathAsArray:$e,separateOperations:uf,specifiedDirectives:vt,specifiedRules:ea,specifiedScalarTypes:gn,stripIgnoredCharacters:cf,subscribe:$l,syntaxError:Te,typeFromAST:xe,validate:ra,validateSchema:Ti,valueFromAST:Xe,valueFromASTUntyped:jn,version:Fu,versionInfo:xu,visit:Gt,visitInParallel:ni,visitWithTypeInfo:Ii},Symbol.toStringTag,{value:"Module"})),Tf=tu(Ef);Object.defineProperty(Ft,"__esModule",{value:!0});Ft.resolveRequestDocument=void 0;var ys=Tf;function vs(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 bf(e){if(typeof e=="string"){var t=void 0;try{var n=(0,ys.parse)(e);t=vs(n)}catch{}return{query:e,operationName:t}}var r=vs(e);return{query:(0,ys.print)(e),operationName:r}}Ft.resolveRequestDocument=bf;var Xt={},gs;function _f(){if(gs)return Xt;gs=1;var e=se&&se.__assign||function(){return e=Object.assign||function(U){for(var k,M=1,x=arguments.length;M<x;M++){k=arguments[M];for(var y in k)Object.prototype.hasOwnProperty.call(k,y)&&(U[y]=k[y])}return U},e.apply(this,arguments)},t=se&&se.__awaiter||function(U,k,M,x){function y(_){return _ instanceof M?_:new M(function(B){B(_)})}return new(M||(M=Promise))(function(_,B){function V(O){try{m(x.next(O))}catch(G){B(G)}}function ne(O){try{m(x.throw(O))}catch(G){B(G)}}function m(O){O.done?_(O.value):y(O.value).then(V,ne)}m((x=x.apply(U,k||[])).next())})},n=se&&se.__generator||function(U,k){var M={label:0,sent:function(){if(_[0]&1)throw _[1];return _[1]},trys:[],ops:[]},x,y,_,B;return B={next:V(0),throw:V(1),return:V(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function V(m){return function(O){return ne([m,O])}}function ne(m){if(x)throw new TypeError("Generator is already executing.");for(;M;)try{if(x=1,y&&(_=m[0]&2?y.return:m[0]?y.throw||((_=y.return)&&_.call(y),0):y.next)&&!(_=_.call(y,m[1])).done)return _;switch(y=0,_&&(m=[m[0]&2,_.value]),m[0]){case 0:case 1:_=m;break;case 4:return M.label++,{value:m[1],done:!1};case 5:M.label++,y=m[1],m=[0];continue;case 7:m=M.ops.pop(),M.trys.pop();continue;default:if(_=M.trys,!(_=_.length>0&&_[_.length-1])&&(m[0]===6||m[0]===2)){M=0;continue}if(m[0]===3&&(!_||m[1]>_[0]&&m[1]<_[3])){M.label=m[1];break}if(m[0]===6&&M.label<_[1]){M.label=_[1],_=m;break}if(_&&M.label<_[2]){M.label=_[2],M.ops.push(m);break}_[2]&&M.ops.pop(),M.trys.pop();continue}m=k.call(U,M)}catch(O){m=[6,O],y=0}finally{x=_=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=pn,i=Ft,s="connection_init",o="connection_ack",a="ping",u="pong",c="subscribe",f="next",d="error",h="complete",v=function(){function U(k,M,x){this._type=k,this._payload=M,this._id=x}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 k={type:this.type};return this.id!=null&&this.id!=null&&(k.id=this.id),this.payload!=null&&this.payload!=null&&(k.payload=this.payload),JSON.stringify(k)},enumerable:!1,configurable:!0}),U.parse=function(k,M){var x=JSON.parse(k),y=x.type,_=x.payload,B=x.id;return new U(y,M(_),B)},U}(),g=function(){function U(k,M){var x=M.onInit,y=M.onAcknowledged,_=M.onPing,B=M.onPong,V=this;this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=k,k.onopen=function(ne){return t(V,void 0,void 0,function(){var m,O,G,E;return n(this,function(w){switch(w.label){case 0:return this.socketState.acknowledged=!1,this.socketState.subscriptions={},O=(m=k).send,G=C,x?[4,x()]:[3,2];case 1:return E=w.sent(),[3,3];case 2:E=null,w.label=3;case 3:return O.apply(m,[G.apply(void 0,[E]).text]),[2]}})})},k.onclose=function(ne){V.socketState.acknowledged=!1,V.socketState.subscriptions={}},k.onerror=function(ne){console.error(ne)},k.onmessage=function(ne){try{var m=P(ne.data);switch(m.type){case o:{V.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(V.socketState.acknowledged=!0,y&&y(m.payload));return}case a:{_?_(m.payload).then(function(T){return k.send(z(T).text)}):k.send(z(null).text);return}case u:{B&&B(m.payload);return}}if(!V.socketState.acknowledged||m.id===void 0||m.id===null||!V.socketState.subscriptions[m.id])return;var O=V.socketState.subscriptions[m.id],G=O.query,E=O.variables,w=O.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:G,variables:E}));return}case d:{w.error&&w.error(new r.ClientError({errors:m.payload,status:200},{query:G,variables:E}));return}case h:{w.complete&&w.complete(),delete V.socketState.subscriptions[m.id];return}}}catch(T){console.error(T),k.close(1006)}k.close(4400,"Unknown graphql-ws message.")}}return U.prototype.makeSubscribe=function(k,M,x,y){var _=this,B=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[B]={query:k,variables:y,subscriber:x},this.socket.send(H(B,{query:k,operationName:M,variables:y}).text),function(){_.socket.send(Z(B).text),delete _.socketState.subscriptions[B]}},U.prototype.rawRequest=function(k,M){var x=this;return new Promise(function(y,_){var B;x.rawSubscribe(k,{next:function(V,ne){return B={data:V,extensions:ne}},error:_,complete:function(){return y(B)}},M)})},U.prototype.request=function(k,M){var x=this;return new Promise(function(y,_){var B;x.subscribe(k,{next:function(V){return B=V},error:_,complete:function(){return y(B)}},M)})},U.prototype.subscribe=function(k,M,x){var y=(0,i.resolveRequestDocument)(k),_=y.query,B=y.operationName;return this.makeSubscribe(_,B,M,x)},U.prototype.rawSubscribe=function(k,M,x){return this.makeSubscribe(k,void 0,M,x)},U.prototype.ping=function(k){this.socket.send(j(k).text)},U.prototype.close=function(){this.socket.close(1e3)},U.PROTOCOL="graphql-transport-ws",U}();Xt.GraphQLWebSocketClient=g;function P(U,k){k===void 0&&(k=function(x){return x});var M=v.parse(U,k);return M}function C(U){return new v(s,U)}function j(U){return new v(a,U,void 0)}function z(U){return new v(u,U,void 0)}function H(U,k){return new v(c,k,U)}function Z(U){return new v(h,void 0,U)}return Xt}(function(e){var t=se&&se.__assign||function(){return t=Object.assign||function(E){for(var w,T=1,A=arguments.length;T<A;T++){w=arguments[T];for(var R in w)Object.prototype.hasOwnProperty.call(w,R)&&(E[R]=w[R])}return E},t.apply(this,arguments)},n=se&&se.__createBinding||(Object.create?function(E,w,T,A){A===void 0&&(A=T);var R=Object.getOwnPropertyDescriptor(w,T);(!R||("get"in R?!w.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return w[T]}}),Object.defineProperty(E,A,R)}:function(E,w,T,A){A===void 0&&(A=T),E[A]=w[T]}),r=se&&se.__setModuleDefault||(Object.create?function(E,w){Object.defineProperty(E,"default",{enumerable:!0,value:w})}:function(E,w){E.default=w}),i=se&&se.__importStar||function(E){if(E&&E.__esModule)return E;var w={};if(E!=null)for(var T in E)T!=="default"&&Object.prototype.hasOwnProperty.call(E,T)&&n(w,E,T);return r(w,E),w},s=se&&se.__awaiter||function(E,w,T,A){function R(p){return p instanceof T?p:new T(function(S){S(p)})}return new(T||(T=Promise))(function(p,S){function D(Y){try{F(A.next(Y))}catch(J){S(J)}}function L(Y){try{F(A.throw(Y))}catch(J){S(J)}}function F(Y){Y.done?p(Y.value):R(Y.value).then(D,L)}F((A=A.apply(E,w||[])).next())})},o=se&&se.__generator||function(E,w){var T={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},A,R,p,S;return S={next:D(0),throw:D(1),return:D(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function D(F){return function(Y){return L([F,Y])}}function L(F){if(A)throw new TypeError("Generator is already executing.");for(;T;)try{if(A=1,R&&(p=F[0]&2?R.return:F[0]?R.throw||((p=R.return)&&p.call(R),0):R.next)&&!(p=p.call(R,F[1])).done)return p;switch(R=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++,R=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(E,T)}catch(Y){F=[6,Y],R=0}finally{A=p=0}if(F[0]&5)throw F[1];return{value:F[0]?F[1]:void 0,done:!0}}},a=se&&se.__rest||function(E,w){var T={};for(var A in E)Object.prototype.hasOwnProperty.call(E,A)&&w.indexOf(A)<0&&(T[A]=E[A]);if(E!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,A=Object.getOwnPropertySymbols(E);R<A.length;R++)w.indexOf(A[R])<0&&Object.prototype.propertyIsEnumerable.call(E,A[R])&&(T[A[R]]=E[A[R]]);return T},u=se&&se.__spreadArray||function(E,w,T){if(T||arguments.length===2)for(var A=0,R=w.length,p;A<R;A++)(p||!(A in w))&&(p||(p=Array.prototype.slice.call(w,0,A)),p[A]=w[A]);return E.concat(p||Array.prototype.slice.call(w))},c=se&&se.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};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(mu),d=f,h=c(Wr),v=dn,g=ke,P=pn;Object.defineProperty(e,"ClientError",{enumerable:!0,get:function(){return P.ClientError}});var C=Ft,j=function(E){var w={};return E&&(typeof Headers<"u"&&E instanceof Headers||d&&d.Headers&&E instanceof d.Headers?w=m(E):Array.isArray(E)?E.forEach(function(T){var A=T[0],R=T[1];w[A]=R}):w=E),w},z=function(E){return E.replace(/([\s,]|#[^\n\r]+)+/g," ").trim()},H=function(E){var w=E.query,T=E.variables,A=E.operationName,R=E.jsonSerializer;if(!Array.isArray(w)){var p=["query=".concat(encodeURIComponent(z(w)))];return T&&p.push("variables=".concat(encodeURIComponent(R.stringify(T)))),A&&p.push("operationName=".concat(encodeURIComponent(A))),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(D,L,F){return D.push({query:z(L),variables:T?R.stringify(T[F]):void 0}),D},[]);return"query=".concat(encodeURIComponent(R.stringify(S)))},Z=function(E){var w=E.url,T=E.query,A=E.variables,R=E.operationName,p=E.headers,S=E.fetch,D=E.fetchOptions,L=E.middleware;return s(void 0,void 0,void 0,function(){var F,Y,J;return o(this,function(re){switch(re.label){case 0:return F=(0,h.default)(T,A,R,D.jsonSerializer),Y=t({method:"POST",headers:t(t({},typeof F=="string"?{"Content-Type":"application/json"}:{}),p),body:F},D),L?[4,Promise.resolve(L(t(t({},Y),{url:w,operationName:R,variables:A})))]:[3,2];case 1:J=re.sent(),w=J.url,Y=a(J,["url"]),re.label=2;case 2:return[4,S(w,Y)];case 3:return[2,re.sent()]}})})},U=function(E){var w=E.url,T=E.query,A=E.variables,R=E.operationName,p=E.headers,S=E.fetch,D=E.fetchOptions,L=E.middleware;return s(void 0,void 0,void 0,function(){var F,Y,J;return o(this,function(re){switch(re.label){case 0:return F=H({query:T,variables:A,operationName:R,jsonSerializer:D.jsonSerializer}),Y=t({method:"GET",headers:p},D),L?[4,Promise.resolve(L(t(t({},Y),{url:w,operationName:R,variables:A})))]:[3,2];case 1:J=re.sent(),w=J.url,Y=a(J,["url"]),re.label=2;case 2:return[4,S("".concat(w,"?").concat(F),Y)];case 3:return[2,re.sent()]}})})},k=function(){function E(w,T){T===void 0&&(T={}),this.url=w,this.options=T}return E.prototype.rawRequest=function(w,T,A){return s(this,void 0,void 0,function(){var R,p,S,D,L,F,Y,J,re,ve,ae,pe;return o(this,function(Oe){return R=(0,g.parseRawRequestArgs)(w,T,A),p=this.options,S=p.headers,D=p.fetch,L=D===void 0?f.default:D,F=p.method,Y=F===void 0?"POST":F,J=p.requestMiddleware,re=p.responseMiddleware,ve=a(p,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ae=this.url,R.signal!==void 0&&(ve.signal=R.signal),pe=(0,C.resolveRequestDocument)(R.query).operationName,[2,M({url:ae,query:R.query,variables:R.variables,headers:t(t({},j(V(S))),j(R.requestHeaders)),operationName:pe,fetch:L,method:Y,fetchOptions:ve,middleware:J}).then(function(De){return re&&re(De),De}).catch(function(De){throw re&&re(De),De})]})})},E.prototype.request=function(w){for(var T=[],A=1;A<arguments.length;A++)T[A-1]=arguments[A];return s(this,void 0,void 0,function(){var R,p,S,D,L,F,Y,J,re,ve,ae,pe,Oe,De,Jt,Ht;return o(this,function(_n){return R=T[0],p=T[1],S=(0,g.parseRequestArgs)(w,R,p),D=this.options,L=D.headers,F=D.fetch,Y=F===void 0?f.default:F,J=D.method,re=J===void 0?"POST":J,ve=D.requestMiddleware,ae=D.responseMiddleware,pe=a(D,["headers","fetch","method","requestMiddleware","responseMiddleware"]),Oe=this.url,S.signal!==void 0&&(pe.signal=S.signal),De=(0,C.resolveRequestDocument)(S.document),Jt=De.query,Ht=De.operationName,[2,M({url:Oe,query:Jt,variables:S.variables,headers:t(t({},j(V(L))),j(S.requestHeaders)),operationName:Ht,fetch:Y,method:re,fetchOptions:pe,middleware:ve}).then(function(ut){return ae&&ae(ut),ut.data}).catch(function(ut){throw ae&&ae(ut),ut})]})})},E.prototype.batchRequests=function(w,T){var A=(0,g.parseBatchRequestArgs)(w,T),R=this.options,p=R.headers,S=R.fetch,D=S===void 0?f.default:S,L=R.method,F=L===void 0?"POST":L,Y=R.requestMiddleware,J=R.responseMiddleware,re=a(R,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ve=this.url;A.signal!==void 0&&(re.signal=A.signal);var ae=A.documents.map(function(Oe){var De=Oe.document;return(0,C.resolveRequestDocument)(De).query}),pe=A.documents.map(function(Oe){var De=Oe.variables;return De});return M({url:ve,query:ae,variables:pe,headers:t(t({},j(V(p))),j(A.requestHeaders)),operationName:void 0,fetch:D,method:F,fetchOptions:re,middleware:Y}).then(function(Oe){return J&&J(Oe),Oe.data}).catch(function(Oe){throw J&&J(Oe),Oe})},E.prototype.setHeaders=function(w){return this.options.headers=w,this},E.prototype.setHeader=function(w,T){var A,R=this.options.headers;return R?R[w]=T:this.options.headers=(A={},A[w]=T,A),this},E.prototype.setEndpoint=function(w){return this.url=w,this},E}();e.GraphQLClient=k;function M(E){var w=E.url,T=E.query,A=E.variables,R=E.headers,p=E.operationName,S=E.fetch,D=E.method,L=D===void 0?"POST":D,F=E.fetchOptions,Y=E.middleware;return s(this,void 0,void 0,function(){var J,re,ve,ae,pe,Oe,De,Jt,Ht,_n,ut;return o(this,function(hr){switch(hr.label){case 0:return J=L.toUpperCase()==="POST"?Z:U,re=Array.isArray(T),[4,J({url:w,query:T,variables:A,operationName:p,headers:R,fetch:S,fetchOptions:F,middleware:Y})];case 1:return ve=hr.sent(),[4,B(ve,F.jsonSerializer)];case 2:if(ae=hr.sent(),pe=re&&Array.isArray(ae)?!ae.some(function(Aa){var Sa=Aa.data;return!Sa}):!!ae.data,Oe=!ae.errors||F.errorPolicy==="all"||F.errorPolicy==="ignore",ve.ok&&Oe&&pe)return De=ve.headers,Jt=ve.status,ae.errors,Ht=a(ae,["errors"]),_n=F.errorPolicy==="ignore"?Ht:ae,[2,t(t({},re?{data:_n}:_n),{headers:De,status:Jt})];throw ut=typeof ae=="string"?{error:ae}:ae,new P.ClientError(t(t({},ut),{status:ve.status,headers:ve.headers}),{query:T,variables:A})}})})}function x(E,w){for(var T=[],A=2;A<arguments.length;A++)T[A-2]=arguments[A];return s(this,void 0,void 0,function(){var R,p;return o(this,function(S){return R=g.parseRawRequestExtendedArgs.apply(void 0,u([E,w],T,!1)),p=new k(R.url),[2,p.rawRequest(t({},R))]})})}e.rawRequest=x;function y(E,w){for(var T=[],A=2;A<arguments.length;A++)T[A-2]=arguments[A];return s(this,void 0,void 0,function(){var R,p;return o(this,function(S){return R=g.parseRequestExtendedArgs.apply(void 0,u([E,w],T,!1)),p=new k(R.url),[2,p.request(t({},R))]})})}e.request=y;function _(E,w,T){return s(this,void 0,void 0,function(){var A,R;return o(this,function(p){return A=(0,g.parseBatchRequestsExtendedArgs)(E,w,T),R=new k(A.url),[2,R.batchRequests(t({},A))]})})}e.batchRequests=_,e.default=y;function B(E,w){return w===void 0&&(w=v.defaultJsonSerializer),s(this,void 0,void 0,function(){var T,A,R;return o(this,function(p){switch(p.label){case 0:return E.headers.forEach(function(S,D){D.toLowerCase()==="content-type"&&(T=S)}),T&&(T.toLowerCase().startsWith("application/json")||T.toLowerCase().startsWith("application/graphql+json")||T.toLowerCase().startsWith("application/graphql-response+json"))?(R=(A=w).parse,[4,E.text()]):[3,2];case 1:return[2,R.apply(A,[p.sent()])];case 2:return[2,E.text()]}})})}function V(E){return typeof E=="function"?E():E}function ne(E){for(var w=[],T=1;T<arguments.length;T++)w[T-1]=arguments[T];return E.reduce(function(A,R,p){return"".concat(A).concat(R).concat(p in w?w[p]:"")},"")}e.gql=ne;function m(E){var w={};return E.forEach(function(T,A){w[A]=T}),w}var O=_f();Object.defineProperty(e,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return O.GraphQLWebSocketClient}});var G=Ft;Object.defineProperty(e,"resolveRequestDocument",{enumerable:!0,get:function(){return G.resolveRequestDocument}})})(Bt);Bt.gql`
162
181
  query GET_HREFLANG_DATA
163
182
  @cached
164
183
  (ttl: 300)
@@ -169,7 +188,7 @@ ${t.join(`
169
188
  link
170
189
  }
171
190
  }
172
- `;qt.gql`
191
+ `;Bt.gql`
173
192
  query B_CC_Q_D_0
174
193
  (
175
194
  $leagueIds: [numeric!]
@@ -197,7 +216,7 @@ ${t.join(`
197
216
  }
198
217
 
199
218
  }
200
- `;qt.gql`
219
+ `;Bt.gql`
201
220
  query CURRENT_SEASON_IDS
202
221
  @cached
203
222
  (ttl: 300)
@@ -216,7 +235,7 @@ ${t.join(`
216
235
  id
217
236
  }
218
237
  }
219
- `;qt.gql`
238
+ `;Bt.gql`
220
239
  query ALL_LEAGUE_IDS
221
240
  @cached
222
241
  (ttl: 300)
@@ -226,7 +245,7 @@ ${t.join(`
226
245
  id
227
246
  }
228
247
  }
229
- `;qt.gql`
248
+ `;Bt.gql`
230
249
  query ALL_TARGET_SEASON_FIXTURE_IDS
231
250
  (
232
251
  $limit: Int,
@@ -275,15 +294,15 @@ ${t.join(`
275
294
  season_id
276
295
  }
277
296
  }
278
- `;function Tr(e){return e==null?void 0:e.filter(t=>t!=null)}function Ef(e){const t=e-1;return t*t*t+1}function Hn(e,{delay:t=0,duration:n=400,easing:r=Ef,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]=ki(i),[v,E]=ki(s);return{delay:t,duration:n,easing:r,css:(M,U)=>`
279
- transform: ${c} translate(${(1-M)*d}${h}, ${(1-M)*v}${E});
280
- opacity: ${u-f*U}`}}const Ln={admin:!1,numberOfAdvertsActive:0};function gf(){const{subscribe:e,set:t,update:n}=Ss(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 Tf=gf(),bf="/icon-close.svg",Ta="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 _f(e){Es(e,"svelte-1pquetq",'@charset "UTF-8";div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq.svelte-1pquetq{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-1pquetq img#close.svelte-1pquetq{position:absolute;top:10px;right:10px;z-index:1}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq img#banner.svelte-1pquetq{max-height:355px;min-height:355px;width:100%;object-fit:cover}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq video.svelte-1pquetq{max-height:355px;min-height:355px;width:100%;object-fit:cover}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq div#main-box.svelte-1pquetq{padding:20px 20px 35px 20px}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq div#main-box p#title.svelte-1pquetq{color:var(--white)}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq div#main-box button.svelte-1pquetq{border-radius:7.57px;max-height:50px;min-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-1pquetq span.custom-betarena-advert-x1{color:var(--primary) !important}')}function cs(e){var L,y;let t,n,r,i,s,o=((L=e[0].data)==null?void 0:L.title)+"",a,u,c,f,d=(((y=e[0].data)==null?void 0:y.cta_title)??"Recieve Bonus")+"",h,v,E,M,U,P,z,Z,Q=e[2]&&ls(e);function V(g,j){var X;if((g[0].type==1||g[0].type==4)&&((X=g[0].data)!=null&&X.media))return If;if(g[0].type==2)return Nf}let C=V(e),k=C&&C(e);return{c(){var g;t=de("div"),Q&&Q.c(),n=ct(),k&&k.c(),r=ct(),i=de("div"),s=de("p"),a=ct(),u=de("a"),c=de("button"),f=de("span"),h=sn(d),v=ct(),E=de("img"),$(s,"id","title"),$(s,"class","s-20 w-600 m-0 m-b-20 text-center svelte-1pquetq"),$(f,"class","s-18 w-500 "),$(E,"id",""),He(E.src,M=Ta)||$(E,"src",M),$(E,"alt","icon-arrow"),$(E,"title","icon-arrow"),$(E,"loading","lazy"),$(E,"class","m-l-10 "),$(E,"width","12"),$(E,"height","12"),$(c,"class","svelte-1pquetq"),$(u,"href",U=(g=e[0].data)==null?void 0:g.cta_link),$(u,"target","_blank"),$(u,"rel",`
297
+ `;function _r(e){return e==null?void 0:e.filter(t=>t!=null)}const Rn={isDarkTheme:!1};function Nf(){const{subscribe:e,set:t,update:n}=Hr(Rn);return{subscribe:e,set:t,update:n,...{updateData:i=>{for(const s of i){const o=s[0];s[1],o=="darkTheme"&&(Rn.isDarkTheme=!Rn.isDarkTheme)}t(Rn)}}}}const qr=Nf();function If(e){const t=e-1;return t*t*t+1}function zn(e,{delay:t=0,duration:n=400,easing:r=If,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]=Ui(i),[v,g]=Ui(s);return{delay:t,duration:n,easing:r,css:(P,C)=>`
298
+ transform: ${c} translate(${(1-P)*d}${h}, ${(1-P)*v}${g});
299
+ opacity: ${u-f*C}`}}const kn={admin:!1,numberOfAdvertsActive:0};function wf(){const{subscribe:e,set:t,update:n}=Hr(kn);return{subscribe:e,set:t,update:n,...{updateData:i=>{for(const s of i){const o=s[0],a=s[1];o=="admin"?kn.admin=a:o=="numberOfAdvertsActive"&&(kn.numberOfAdvertsActive+=1)}t(kn)}}}}const Of=wf(),Df="/icon-close.svg",Da="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 Af(e){Ds(e,"svelte-11ggc2y",'@charset "UTF-8";div#global⮕widget⮕betarenaAdEngine⮕main.svelte-11ggc2y.svelte-11ggc2y{position:fixed;z-index:10000;bottom:0;right:0;left:0;overflow:hidden;border-radius:40px 40px 0px 0px;background-color:var(--white)}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-11ggc2y img#close.svelte-11ggc2y{position:absolute;top:14px;right:20px;z-index:1}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-11ggc2y img#banner.svelte-11ggc2y{max-height:355px;min-height:355px;width:100%;background-color:black;object-fit:cover}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-11ggc2y video.svelte-11ggc2y{max-height:355px;min-height:355px;width:100%;background-color:black;object-fit:cover}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-11ggc2y div#main-box.svelte-11ggc2y{padding:20px 20px 35px 20px}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-11ggc2y div#main-box p#title.svelte-11ggc2y{color:var(--dark-theme)}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-11ggc2y div#main-box button.svelte-11ggc2y{border-radius:7.57px;max-height:50px;min-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-11ggc2y span.custom-betarena-advert-x1{color:var(--primary) !important}div#global⮕widget⮕betarenaAdEngine⮕main.dark-theme.svelte-11ggc2y.svelte-11ggc2y{background-color:var(--dark-theme-1-4-shade)}div#global⮕widget⮕betarenaAdEngine⮕main.dark-theme.svelte-11ggc2y p.svelte-11ggc2y{color:var(--white) !important}')}function Es(e){var _,B;let t,n,r,i,s,o=((_=e[0].data)==null?void 0:_.title)+"",a,u,c,f,d=(((B=e[0].data)==null?void 0:B.cta_title)??"Recieve Bonus")+"",h,v,g,P,C,j,z,H,Z,U,k=e[2]&&Ts(e);function M(V,ne){var m;if((V[0].type==1||V[0].type==4)&&((m=V[0].data)!=null&&m.media))return Rf;if(V[0].type==2)return Sf}let x=M(e),y=x&&x(e);return{c(){var V;t=de("div"),k&&k.c(),n=ct(),y&&y.c(),r=ct(),i=de("div"),s=de("p"),a=ct(),u=de("a"),c=de("button"),f=de("span"),h=rn(d),v=ct(),g=de("img"),$(s,"id","title"),$(s,"class","s-20 w-600 m-0 m-b-20 text-center svelte-11ggc2y"),$(f,"class","s-18 w-500 "),$(g,"id",""),He(g.src,P=Da)||$(g,"src",P),$(g,"alt","icon-arrow"),$(g,"title","icon-arrow"),$(g,"loading","lazy"),$(g,"class","m-l-10 "),$(g,"width","12"),$(g,"height","12"),$(c,"class","svelte-11ggc2y"),$(u,"href",C=(V=e[0].data)==null?void 0:V.cta_link),$(u,"target","_blank"),$(u,"rel",`
281
300
  noopener
282
301
  noreferrer
283
- `),$(i,"id","main-box"),$(i,"class","svelte-1pquetq"),$(t,"id",Of),$(t,"class","svelte-1pquetq")},m(g,j){Ke(g,t,j),Q&&Q.m(t,null),ue(t,n),k&&k.m(t,null),ue(t,r),ue(t,i),ue(i,s),s.innerHTML=o,ue(i,a),ue(i,u),ue(u,c),ue(c,f),ue(f,h),ue(c,v),ue(c,E),Z=!0},p(g,j){var X,oe,m;g[2]?Q?Q.p(g,j):(Q=ls(g),Q.c(),Q.m(t,n)):Q&&(Q.d(1),Q=null),C===(C=V(g))&&k?k.p(g,j):(k&&k.d(1),k=C&&C(g),k&&(k.c(),k.m(t,r))),(!Z||j&1)&&o!==(o=((X=g[0].data)==null?void 0:X.title)+"")&&(s.innerHTML=o),(!Z||j&1)&&d!==(d=(((oe=g[0].data)==null?void 0:oe.cta_title)??"Recieve Bonus")+"")&&_r(h,d),(!Z||j&1&&U!==(U=(m=g[0].data)==null?void 0:m.cta_link))&&$(u,"href",U)},i(g){Z||(g&&bt(()=>{Z&&(z&&z.end(1),P=As(t,Hn,{y:500,duration:500}),P.start())}),Z=!0)},o(g){P&&P.invalidate(),g&&(z=Ds(t,Hn,{y:500,duration:500})),Z=!1},d(g){g&&Se(t),Q&&Q.d(),k&&k.d(),g&&z&&z.end()}}}function ls(e){let t,n,r,i;return{c(){t=de("img"),$(t,"id","close"),He(t.src,n=bf)||$(t,"src",n),$(t,"alt","icon-close"),$(t,"title","icon-close"),$(t,"loading","lazy"),$(t,"class","cursor-pointer svelte-1pquetq")},m(s,o){Ke(s,t,o),r||(i=bs(t,"click",e[5]),r=!0)},p:Ye,d(s){s&&Se(t),r=!1,i()}}}function Nf(e){let t,n;return{c(){var r;t=de("img"),$(t,"id","banner"),He(t.src,n=(r=e[0].data)==null?void 0:r.media)||$(t,"src",n),$(t,"alt",""),$(t,"title",""),$(t,"loading","lazy"),$(t,"class","svelte-1pquetq")},m(r,i){Ke(r,t,i)},p(r,i){var s;i&1&&!He(t.src,n=(s=r[0].data)==null?void 0:s.media)&&$(t,"src",n)},d(r){r&&Se(t)}}}function If(e){let t,n,r,i;return{c(){var s,o;t=de("a"),n=de("video"),$(n,"id","banner"),$(n,"width","250"),$(n,"height","250"),He(n.src,r=(s=e[0].data)==null?void 0:s.media)||$(n,"src",r),n.autoplay=!0,n.muted=!0,n.playsInline=!0,n.loop=!0,$(n,"class","svelte-1pquetq"),$(t,"href",i=(o=e[0].data)==null?void 0:o.video_link),$(t,"target","_blank"),$(t,"rel",`
302
+ `),$(i,"id","main-box"),$(i,"class","svelte-11ggc2y"),$(t,"id",Lf),$(t,"class","svelte-11ggc2y"),Pi(t,"dark-theme",e[4])},m(V,ne){Ke(V,t,ne),k&&k.m(t,null),ue(t,n),y&&y.m(t,null),ue(t,r),ue(t,i),ue(i,s),s.innerHTML=o,ue(i,a),ue(i,u),ue(u,c),ue(c,f),ue(f,h),ue(c,v),ue(c,g),H=!0,Z||(U=Kn(u,"click",e[9]),Z=!0)},p(V,ne){var m,O,G;V[2]?k?k.p(V,ne):(k=Ts(V),k.c(),k.m(t,n)):k&&(k.d(1),k=null),x===(x=M(V))&&y?y.p(V,ne):(y&&y.d(1),y=x&&x(V),y&&(y.c(),y.m(t,r))),(!H||ne&1)&&o!==(o=((m=V[0].data)==null?void 0:m.title)+"")&&(s.innerHTML=o),(!H||ne&1)&&d!==(d=(((O=V[0].data)==null?void 0:O.cta_title)??"Recieve Bonus")+"")&&Or(h,d),(!H||ne&1&&C!==(C=(G=V[0].data)==null?void 0:G.cta_link))&&$(u,"href",C),(!H||ne&16)&&Pi(t,"dark-theme",V[4])},i(V){H||(V&&bt(()=>{H&&(z&&z.end(1),j=$s(t,zn,{y:500,duration:500}),j.start())}),H=!0)},o(V){j&&j.invalidate(),V&&(z=Cs(t,zn,{y:500,duration:500})),H=!1},d(V){V&&Se(t),k&&k.d(),y&&y.d(),V&&z&&z.end(),Z=!1,U()}}}function Ts(e){let t,n,r,i;return{c(){t=de("img"),$(t,"id","close"),He(t.src,n=Df)||$(t,"src",n),$(t,"alt","icon-close"),$(t,"title","icon-close"),$(t,"loading","lazy"),$(t,"class","cursor-pointer svelte-11ggc2y")},m(s,o){Ke(s,t,o),r||(i=Kn(t,"click",e[7]),r=!0)},p:Fe,d(s){s&&Se(t),r=!1,i()}}}function Sf(e){let t,n;return{c(){var r;t=de("img"),$(t,"id","banner"),He(t.src,n=(r=e[0].data)==null?void 0:r.media)||$(t,"src",n),$(t,"alt",""),$(t,"title",""),$(t,"loading","lazy"),$(t,"class","svelte-11ggc2y")},m(r,i){Ke(r,t,i)},p(r,i){var s;i&1&&!He(t.src,n=(s=r[0].data)==null?void 0:s.media)&&$(t,"src",n)},d(r){r&&Se(t)}}}function Rf(e){let t,n,r,i,s,o;return{c(){var a,u;t=de("a"),n=de("video"),$(n,"id","banner"),$(n,"width","250"),$(n,"height","250"),He(n.src,r=(a=e[0].data)==null?void 0:a.media)||$(n,"src",r),n.autoplay=!0,n.muted=!0,n.playsInline=!0,n.loop=!0,$(n,"class","svelte-11ggc2y"),$(t,"href",i=(u=e[0].data)==null?void 0:u.video_link),$(t,"target","_blank"),$(t,"rel",`
284
303
  noopener
285
304
  noreferrer
286
- `)},m(s,o){Ke(s,t,o),ue(t,n)},p(s,o){var a,u;o&1&&!He(n.src,r=(a=s[0].data)==null?void 0:a.media)&&$(n,"src",r),o&1&&i!==(i=(u=s[0].data)==null?void 0:u.video_link)&&$(t,"href",i)},d(s){s&&Se(t)}}}function wf(e){let t,n=e[1]&&!e[3]&&cs(e);return{c(){n&&n.c(),t=Ts()},m(r,i){n&&n.m(r,i),Ke(r,t,i)},p(r,[i]){r[1]&&!r[3]?n?(n.p(r,i),i&10&&tn(n,1)):(n=cs(r),n.c(),tn(n,1),n.m(t.parentNode,t)):n&&(Pa(),wr(n,1,1,()=>{n=null}),ja())},i(r){tn(n)},o(r){wr(n)},d(r){r&&Se(t),n&&n.d(r)}}}const Of="global⮕widget⮕betarenaAdEngine⮕main",Af=1e4,Df=5e3;function Sf(e,t,n){let r,i;Aa(e,Or,c=>n(4,i=c));let{adData:s}=t,o=!1,a=!1;Ns(()=>{r||(setTimeout(()=>{n(1,o=!0),setTimeout(()=>{n(2,a=!0)},Df)},Af),Tf.updateData([["numberOfAdvertsActive",null]]))});const u=()=>{Or.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 fs extends jr{constructor(t){super(),Pr(this,t,Sf,wf,Xn,{adData:0},_f)}}function Rf(e){Es(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 Lf(e){let t,n;return{c(){var r;t=de("img"),$(t,"id","banner"),He(t.src,n=(r=e[0].data)==null?void 0:r.media)||$(t,"src",n),$(t,"alt",""),$(t,"title",""),$(t,"loading","lazy"),$(t,"class","svelte-58lxu1")},m(r,i){Ke(r,t,i)},p(r,i){var s;i&1&&!He(t.src,n=(s=r[0].data)==null?void 0:s.media)&&$(t,"src",n)},d(r){r&&Se(t)}}}function kf(e){let t,n;return{c(){var r;t=de("iframe"),$(t,"width","250"),$(t,"height","250"),He(t.src,n=(r=e[0].data)==null?void 0:r.media)||$(t,"src",n),$(t,"class","svelte-58lxu1")},m(r,i){Ke(r,t,i)},p(r,i){var s;i&1&&!He(t.src,n=(s=r[0].data)==null?void 0:s.media)&&$(t,"src",n)},d(r){r&&Se(t)}}}function Ff(e){var C,k;let t,n,r,i,s=((C=e[0].data)==null?void 0:C.title)+"",o,a,u,c,f=(((k=e[0].data)==null?void 0:k.cta_title)??"Recieve Bonus")+"",d,h,v,E,M,U,P,z;function Z(L,y){var g;if((L[0].type==1||L[0].type==4)&&((g=L[0].data)!=null&&g.media))return kf;if(L[0].type==2)return Lf}let Q=Z(e),V=Q&&Q(e);return{c(){var L;t=de("div"),V&&V.c(),n=ct(),r=de("div"),i=de("p"),o=sn(s),a=ct(),u=de("a"),c=de("button"),d=sn(f),h=ct(),v=de("img"),$(i,"id","title"),$(i,"class","svelte-58lxu1"),$(v,"id",""),He(v.src,E=Ta)||$(v,"src",E),$(v,"alt","icon-arrow"),$(v,"title","icon-arrow"),$(v,"loading","lazy"),$(v,"class","m-l-10 "),$(c,"class","svelte-58lxu1"),$(u,"href",M=(L=e[0].data)==null?void 0:L.cta_link),$(u,"target","_blank"),$(u,"rel",`
305
+ `)},m(a,u){Ke(a,t,u),ue(t,n),s||(o=Kn(t,"click",e[8]),s=!0)},p(a,u){var c,f;u&1&&!He(n.src,r=(c=a[0].data)==null?void 0:c.media)&&$(n,"src",r),u&1&&i!==(i=(f=a[0].data)==null?void 0:f.video_link)&&$(t,"href",i)},d(a){a&&Se(t),s=!1,o()}}}function kf(e){let t,n=e[1]&&!e[3]&&Es(e);return{c(){n&&n.c(),t=Ss()},m(r,i){n&&n.m(r,i),Ke(r,t,i)},p(r,[i]){r[1]&&!r[3]?n?(n.p(r,i),i&10&&Fn(n,1)):(n=Es(r),n.c(),Fn(n,1),n.m(t.parentNode,t)):n&&(Ja(),qi(n,1,1,()=>{n=null}),Ha())},i(r){Fn(n)},o(r){qi(n)},d(r){r&&Se(t),n&&n.d(r)}}}const Lf="global⮕widget⮕betarenaAdEngine⮕main",Ff=1e4,xf=5e3;function $f(e,t,n){let r,i,s,o;wr(e,qr,v=>n(5,s=v)),wr(e,Rr,v=>n(6,o=v));let{adData:a}=t,u=!1,c=!1;ks(()=>{r||(setTimeout(()=>{n(1,u=!0),document.body.classList.add("disable-scroll"),setTimeout(()=>{n(2,c=!0)},xf)},Ff),Of.updateData([["numberOfAdvertsActive",null]]))});const f=()=>{Rr.updateData([["toggleAdShownState",void 0]]),document.body.classList.remove("disable-scroll")},d=()=>{kr(`${Sr}/ad/update/click`,{creativeId:a.id})},h=()=>{kr(`${Sr}/ad/update/click`,{creativeId:a.id})};return e.$$set=v=>{"adData"in v&&n(0,a=v.adData)},e.$$.update=()=>{e.$$.dirty&64&&n(3,{isBetarenaAdShownForToday:r}={...o},r),e.$$.dirty&32&&n(4,{isDarkTheme:i}={...s},i)},[a,u,c,r,i,s,o,f,d,h]}class Nr extends Jr{constructor(t){super(),Yr(this,t,$f,kf,Wn,{adData:0},Af)}}function Cf(e){Ds(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 Mf(e){let t,n;return{c(){var r;t=de("img"),$(t,"id","banner"),He(t.src,n=(r=e[0].data)==null?void 0:r.media)||$(t,"src",n),$(t,"alt",""),$(t,"title",""),$(t,"loading","lazy"),$(t,"class","svelte-58lxu1")},m(r,i){Ke(r,t,i)},p(r,i){var s;i&1&&!He(t.src,n=(s=r[0].data)==null?void 0:s.media)&&$(t,"src",n)},d(r){r&&Se(t)}}}function Vf(e){let t,n;return{c(){var r;t=de("iframe"),$(t,"width","250"),$(t,"height","250"),He(t.src,n=(r=e[0].data)==null?void 0:r.media)||$(t,"src",n),$(t,"class","svelte-58lxu1")},m(r,i){Ke(r,t,i)},p(r,i){var s;i&1&&!He(t.src,n=(s=r[0].data)==null?void 0:s.media)&&$(t,"src",n)},d(r){r&&Se(t)}}}function Uf(e){var k,M;let t,n,r,i,s=((k=e[0].data)==null?void 0:k.title)+"",o,a,u,c,f=(((M=e[0].data)==null?void 0:M.cta_title)??"Recieve Bonus")+"",d,h,v,g,P,C,j,z;function H(x,y){var _;if((x[0].type==1||x[0].type==4)&&((_=x[0].data)!=null&&_.media))return Vf;if(x[0].type==2)return Mf}let Z=H(e),U=Z&&Z(e);return{c(){var x;t=de("div"),U&&U.c(),n=ct(),r=de("div"),i=de("p"),o=rn(s),a=ct(),u=de("a"),c=de("button"),d=rn(f),h=ct(),v=de("img"),$(i,"id","title"),$(i,"class","svelte-58lxu1"),$(v,"id",""),He(v.src,g=Da)||$(v,"src",g),$(v,"alt","icon-arrow"),$(v,"title","icon-arrow"),$(v,"loading","lazy"),$(v,"class","m-l-10 "),$(c,"class","svelte-58lxu1"),$(u,"href",P=(x=e[0].data)==null?void 0:x.cta_link),$(u,"target","_blank"),$(u,"rel",`
287
306
  noopener
288
307
  noreferrer
289
- `),$(r,"id","main-box"),$(r,"class","svelte-58lxu1"),$(t,"id",xf),$(t,"class","svelte-58lxu1")},m(L,y){Ke(L,t,y),V&&V.m(t,null),ue(t,n),ue(t,r),ue(r,i),ue(i,o),ue(r,a),ue(r,u),ue(u,c),ue(c,d),ue(c,h),ue(c,v),z=!0},p(L,[y]){var g,j,X;Q===(Q=Z(L))&&V?V.p(L,y):(V&&V.d(1),V=Q&&Q(L),V&&(V.c(),V.m(t,n))),(!z||y&1)&&s!==(s=((g=L[0].data)==null?void 0:g.title)+"")&&_r(o,s),(!z||y&1)&&f!==(f=(((j=L[0].data)==null?void 0:j.cta_title)??"Recieve Bonus")+"")&&_r(d,f),(!z||y&1&&M!==(M=(X=L[0].data)==null?void 0:X.cta_link))&&$(u,"href",M)},i(L){z||(L&&bt(()=>{z&&(P&&P.end(1),U=As(t,Hn,{y:500,duration:500}),U.start())}),z=!0)},o(L){U&&U.invalidate(),L&&(P=Ds(t,Hn,{y:500,duration:500})),z=!1},d(L){L&&Se(t),V&&V.d(),L&&P&&P.end()}}}const xf="global⮕widget⮕betarenaAdEngineX1⮕main";function $f(e,t,n){let{adData:r}=t;return e.$$set=i=>{"adData"in i&&n(0,r=i.adData)},[r]}class Cf extends jr{constructor(t){super(),Pr(this,t,$f,Ff,Xn,{adData:0},Rf)}}const{document:br}=Da;function Mf(e){let t,n,r,i,s,o,a,u,c=!1;return{c(){t=de("link"),n=de("link"),r=de("link"),i=ct(),s=Ts(),$(t,"rel","preconnect"),$(t,"href","https://fonts.googleapis.com"),$(n,"rel","preconnect"),$(n,"href","https://fonts.gstatic.com"),$(n,"crossorigin",""),$(r,"href","https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"),$(r,"rel","stylesheet")},m(f,d){ue(br.head,t),ue(br.head,n),ue(br.head,r),Ke(f,i,d),Ke(f,s,d),o=!0,a||(u=bs(window,"resize",e[7]),a=!0)},p(f,[d]){},i(f){o||(tn(c),o=!0)},o(f){wr(c),o=!1},d(f){f&&(Se(i),Se(s)),Se(t),Se(n),Se(r),a=!1,u()}}}function Vf(e,t,n){let{deviceWidthList:r=[768,1024],authorId:i=null,authorArticleTagIds:s=[]}=t,o="desktop",a=null,u=new Map,c=new Map;function f(){var M;const E=document.querySelectorAll("[data-betarena-zone-id]");for(const U of E){const P=(M=U.attributes.getNamedItem("data-betarena-zone-id"))==null?void 0:M.value;P&&u.set(parseInt(P),U)}}async function d(E){if(!document)return;const M=await uu(`${Ya}/ads`,E);console.log("response",M),n(4,c=new Map(M.ads??[]));const U=new Map(M.mapZoneIdToCampaignId),P=new Map(M.mapCampaignIdToCreativeId),z=new Map(M.mapZoneIdToAuthorIds),Z=new Map(M.mapZoneIdToTagIds);for(const[Q,V]of u){if(!a)continue;const C=U.get(Q)??[],k=Tr(C.map(L=>{if(P.has(L)){const y=P.get(L);for(const g of y)if(c.has(g))return c.get(g)}}));for(const L of k??[])new Cf({target:V,props:{adData:L}})}if(i||s.length>0){for(const[Q,V]of z){if(!i||!V.includes(i))continue;const C=U.get(Q)??[],k=Tr(C.map(L=>{if(P.has(L)){const y=P.get(L);for(const g of y)if(c.has(g))return c.get(g)}}));for(const L of k)new fs({target:document.body,props:{adData:L}})}for(const[Q,V]of Z){if(s.filter(L=>V.includes(L)).length==0)continue;const C=U.get(Q)??[],k=Tr(C.map(L=>{if(P.has(L)){const y=P.get(L);for(const g of y)if(c.has(g))return c.get(g)}}));for(const L of k)new fs({target:document.body,props:{adData:L}})}}}async function h(){n(2,o=Ci()),n(3,a=await cu()),f(),d({deviceType:o,isoCountryCode:"PT",authorId:i,tagIds:s,zoneIds:[...u.keys()]})}Ns(async()=>{Or.useLocalStorage(),await h()});const v=()=>{Ci()};return e.$$set=E=>{"deviceWidthList"in E&&n(6,r=E.deviceWidthList),"authorId"in E&&n(0,i=E.authorId),"authorArticleTagIds"in E&&n(1,s=E.authorArticleTagIds)},[i,s,o,a,c,u,r,v]}class Uf extends jr{constructor(t){super(),Pr(this,t,Vf,Mf,Xn,{deviceWidthList:6,authorId:0,authorArticleTagIds:1})}}typeof document<"u"&&new Uf({target:document.body,props:{authorArticleTagIds:[1]}});
308
+ `),$(r,"id","main-box"),$(r,"class","svelte-58lxu1"),$(t,"id",Pf),$(t,"class","svelte-58lxu1")},m(x,y){Ke(x,t,y),U&&U.m(t,null),ue(t,n),ue(t,r),ue(r,i),ue(i,o),ue(r,a),ue(r,u),ue(u,c),ue(c,d),ue(c,h),ue(c,v),z=!0},p(x,[y]){var _,B,V;Z===(Z=H(x))&&U?U.p(x,y):(U&&U.d(1),U=Z&&Z(x),U&&(U.c(),U.m(t,n))),(!z||y&1)&&s!==(s=((_=x[0].data)==null?void 0:_.title)+"")&&Or(o,s),(!z||y&1)&&f!==(f=(((B=x[0].data)==null?void 0:B.cta_title)??"Recieve Bonus")+"")&&Or(d,f),(!z||y&1&&P!==(P=(V=x[0].data)==null?void 0:V.cta_link))&&$(u,"href",P)},i(x){z||(x&&bt(()=>{z&&(j&&j.end(1),C=$s(t,zn,{y:500,duration:500}),C.start())}),z=!0)},o(x){C&&C.invalidate(),x&&(j=Cs(t,zn,{y:500,duration:500})),z=!1},d(x){x&&Se(t),U&&U.d(),x&&j&&j.end()}}}const Pf="global⮕widget⮕betarenaAdEngineX1⮕main";function jf(e,t,n){let{adData:r}=t;return e.$$set=i=>{"adData"in i&&n(0,r=i.adData)},[r]}class Bf extends Jr{constructor(t){super(),Yr(this,t,jf,Uf,Wn,{adData:0},Cf)}}const{document:Ir}=$a;function qf(e){let t,n,r,i,s,o,a;return{c(){t=de("link"),n=de("link"),r=de("link"),i=ct(),s=Ss(),$(t,"rel","preconnect"),$(t,"href","https://fonts.googleapis.com"),$(n,"rel","preconnect"),$(n,"href","https://fonts.gstatic.com"),$(n,"crossorigin",""),$(r,"href","https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"),$(r,"rel","stylesheet")},m(u,c){ue(Ir.head,t),ue(Ir.head,n),ue(Ir.head,r),Ke(u,i,c),Ke(u,s,c),o||(a=Kn(window,"resize",e[4]),o=!0)},p:Fe,i:Fe,o:Fe,d(u){u&&(Se(i),Se(s)),Se(t),Se(n),Se(r),o=!1,a()}}}function Gf(e,t,n){let r;wr(e,qr,C=>n(8,r=C));let{deviceWidthList:i=[768,1024],authorId:s=null,authorArticleTagIds:o=[],isDarkTheme:a=!1}=t,u="desktop",c=null,f=new Map,d=new Map;function h(){var j;const C=document.querySelectorAll("[data-betarena-zone-id]");for(const z of C){const H=(j=z.attributes.getNamedItem("data-betarena-zone-id"))==null?void 0:j.value;H&&f.set(parseInt(H),z)}}async function v(C){if(!document)return;const j=await kr(`${Sr}/ads`,C);console.log("response",j),d=new Map(j.ads??[]);const z=new Map(j.mapZoneIdToCampaignId),H=new Map(j.mapCampaignIdToCreativeId),Z=new Map(j.mapZoneIdToAuthorIds),U=new Map(j.mapZoneIdToTagIds);for(const[k,M]of f){if(!c)continue;const x=z.get(k)??[],y=_r(x.map(_=>{if(H.has(_)){const B=H.get(_);for(const V of B)if(d.has(V))return d.get(V)}}));for(const _ of y??[])new Bf({target:M,props:{adData:_}})}if(s||o.length>0){for(const[k,M]of Z){if(!s||M.length>0&&!M.includes(s))continue;const x=z.get(k)??[],y=_r(x.map(_=>{if(H.has(_)){const B=H.get(_);for(const V of B)if(d.has(V))return d.get(V)}}));console.log("creativeAdData-HERE1",y);for(const _ of y)new Nr({target:document.body,props:{adData:_}})}for(const[k,M]of U){if(M.length>0&&o.filter(_=>M.includes(_)).length==0)continue;const x=z.get(k)??[],y=_r(x.map(_=>{if(H.has(_)){const B=H.get(_);for(const V of B)if(d.has(V))return d.get(V)}}));console.log("creativeAdData-HERE2",y);for(const _ of y)new Nr({target:document.body,props:{adData:_}})}}else for(const[k,M]of d)new Nr({target:document.body,props:{adData:M}})}async function g(){u=Qi(),c=await hu(),h(),v({deviceType:u,isoCountryCode:(c==null?void 0:c.country_code)??"EN",authorId:s,tagIds:o,zoneIds:[...f.keys()]})}ks(async()=>{Rr.useLocalStorage(),await g()});const P=()=>{Qi()};return e.$$set=C=>{"deviceWidthList"in C&&n(0,i=C.deviceWidthList),"authorId"in C&&n(1,s=C.authorId),"authorArticleTagIds"in C&&n(2,o=C.authorArticleTagIds),"isDarkTheme"in C&&n(3,a=C.isDarkTheme)},e.$$.update=()=>{e.$$.dirty&8&&xa(qr,r.isDarkTheme=a,r)},[i,s,o,a,P]}class Qf extends Jr{constructor(t){super(),Yr(this,t,Gf,qf,Wn,{deviceWidthList:0,authorId:1,authorArticleTagIds:2,isDarkTheme:3})}}typeof document<"u"&&new Qf({target:document.body,props:{authorArticleTagIds:[1]}});