@zuplo/cli 7.15.13 → 7.15.16

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.
Files changed (96) hide show
  1. package/node_modules/@posthog/core/dist/featureFlagUtils.d.ts.map +1 -1
  2. package/node_modules/@posthog/core/dist/featureFlagUtils.js +10 -3
  3. package/node_modules/@posthog/core/dist/featureFlagUtils.mjs +10 -3
  4. package/node_modules/@posthog/core/dist/posthog-core.d.ts.map +1 -1
  5. package/node_modules/@posthog/core/dist/posthog-core.js +7 -4
  6. package/node_modules/@posthog/core/dist/posthog-core.mjs +7 -4
  7. package/node_modules/@posthog/core/dist/types.d.ts +2 -0
  8. package/node_modules/@posthog/core/dist/types.d.ts.map +1 -1
  9. package/node_modules/@posthog/core/dist/types.js +1 -0
  10. package/node_modules/@posthog/core/dist/types.mjs +1 -0
  11. package/node_modules/@posthog/core/package.json +2 -2
  12. package/node_modules/@posthog/core/src/featureFlagUtils.ts +17 -12
  13. package/node_modules/@posthog/core/src/posthog-core.ts +19 -4
  14. package/node_modules/@posthog/core/src/types.ts +2 -0
  15. package/node_modules/@zuplo/core/customer.cli.minified.js +305 -305
  16. package/node_modules/@zuplo/core/index.minified.js +312 -312
  17. package/node_modules/@zuplo/core/package.json +1 -1
  18. package/node_modules/@zuplo/graphql/package.json +1 -1
  19. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  20. package/node_modules/@zuplo/otel/package.json +1 -1
  21. package/node_modules/@zuplo/runtime/out/esm/{chunk-AJ3MMWJS.js → chunk-5XXEIH5B.js} +2 -2
  22. package/node_modules/@zuplo/runtime/out/esm/{chunk-T2WKOG7J.js → chunk-APWLPHXH.js} +2 -2
  23. package/node_modules/@zuplo/runtime/out/esm/chunk-HMKEMARF.js +276 -0
  24. package/node_modules/@zuplo/runtime/out/esm/chunk-HMKEMARF.js.map +1 -0
  25. package/node_modules/@zuplo/runtime/out/esm/chunk-I65Y62VQ.js +24 -0
  26. package/node_modules/@zuplo/runtime/out/esm/{chunk-G42UYZ6V.js.map → chunk-I65Y62VQ.js.map} +1 -1
  27. package/node_modules/@zuplo/runtime/out/esm/chunk-KZBZ5KM5.js +188 -0
  28. package/node_modules/@zuplo/runtime/out/esm/chunk-KZBZ5KM5.js.map +1 -0
  29. package/node_modules/@zuplo/runtime/out/esm/{chunk-TOJD4RET.js → chunk-MWNVPFFM.js} +2 -2
  30. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  31. package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
  32. package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
  33. package/node_modules/@zuplo/runtime/out/esm/mcp/messages/index.js +1 -1
  34. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  35. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
  36. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
  37. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
  38. package/node_modules/@zuplo/runtime/out/types/index.d.ts +32 -0
  39. package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +220 -0
  40. package/node_modules/@zuplo/runtime/package.json +1 -1
  41. package/node_modules/hono/dist/adapter/bun/websocket.js +19 -4
  42. package/node_modules/hono/dist/adapter/lambda-edge/handler.js +4 -0
  43. package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +19 -4
  44. package/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +4 -0
  45. package/node_modules/hono/dist/cjs/helper/accepts/accepts.js +5 -0
  46. package/node_modules/hono/dist/cjs/helper/proxy/index.js +2 -0
  47. package/node_modules/hono/dist/cjs/jsx/dom/components.js +1 -1
  48. package/node_modules/hono/dist/cjs/jsx/dom/hooks/index.js +5 -2
  49. package/node_modules/hono/dist/cjs/jsx/dom/intrinsic-element/components.js +8 -5
  50. package/node_modules/hono/dist/cjs/jsx/dom/render.js +9 -3
  51. package/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +1 -0
  52. package/node_modules/hono/dist/cjs/middleware/combine/index.js +4 -0
  53. package/node_modules/hono/dist/cjs/middleware/language/language.js +1 -1
  54. package/node_modules/hono/dist/cjs/middleware/method-override/index.js +35 -12
  55. package/node_modules/hono/dist/cjs/middleware/request-id/request-id.js +3 -3
  56. package/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +6 -3
  57. package/node_modules/hono/dist/cjs/utils/body.js +1 -0
  58. package/node_modules/hono/dist/cjs/utils/html.js +5 -0
  59. package/node_modules/hono/dist/cjs/utils/jwt/jwt.js +7 -5
  60. package/node_modules/hono/dist/helper/accepts/accepts.js +5 -0
  61. package/node_modules/hono/dist/helper/proxy/index.js +2 -0
  62. package/node_modules/hono/dist/jsx/dom/components.js +2 -2
  63. package/node_modules/hono/dist/jsx/dom/hooks/index.js +5 -2
  64. package/node_modules/hono/dist/jsx/dom/intrinsic-element/components.js +8 -5
  65. package/node_modules/hono/dist/jsx/dom/render.js +9 -3
  66. package/node_modules/hono/dist/middleware/basic-auth/index.js +1 -0
  67. package/node_modules/hono/dist/middleware/combine/index.js +4 -0
  68. package/node_modules/hono/dist/middleware/language/language.js +1 -1
  69. package/node_modules/hono/dist/middleware/method-override/index.js +35 -12
  70. package/node_modules/hono/dist/middleware/request-id/request-id.js +3 -3
  71. package/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +6 -3
  72. package/node_modules/hono/dist/types/helper/accepts/accepts.d.ts +5 -0
  73. package/node_modules/hono/dist/types/jsx/base.d.ts +2 -1
  74. package/node_modules/hono/dist/types/middleware/basic-auth/index.d.ts +1 -0
  75. package/node_modules/hono/dist/types/middleware/request-id/request-id.d.ts +3 -3
  76. package/node_modules/hono/dist/types/middleware/secure-headers/secure-headers.d.ts +2 -0
  77. package/node_modules/hono/dist/types/utils/jwt/jwt.d.ts +4 -2
  78. package/node_modules/hono/dist/types/utils/types.d.ts +12 -2
  79. package/node_modules/hono/dist/utils/body.js +1 -0
  80. package/node_modules/hono/dist/utils/html.js +5 -0
  81. package/node_modules/hono/dist/utils/jwt/jwt.js +7 -5
  82. package/node_modules/hono/package.json +1 -1
  83. package/node_modules/strip-json-comments/index.d.ts +3 -1
  84. package/node_modules/strip-json-comments/index.js +9 -22
  85. package/node_modules/strip-json-comments/package.json +23 -19
  86. package/package.json +11 -11
  87. package/node_modules/@zuplo/runtime/out/esm/chunk-24DRL32G.js +0 -431
  88. package/node_modules/@zuplo/runtime/out/esm/chunk-24DRL32G.js.map +0 -1
  89. package/node_modules/@zuplo/runtime/out/esm/chunk-BH4DKEES.js +0 -13
  90. package/node_modules/@zuplo/runtime/out/esm/chunk-BH4DKEES.js.map +0 -1
  91. package/node_modules/@zuplo/runtime/out/esm/chunk-G42UYZ6V.js +0 -24
  92. /package/node_modules/@zuplo/runtime/out/esm/{chunk-AJ3MMWJS.js.map → chunk-5XXEIH5B.js.map} +0 -0
  93. /package/node_modules/@zuplo/runtime/out/esm/{chunk-T2WKOG7J.js.map → chunk-APWLPHXH.js.map} +0 -0
  94. /package/node_modules/@zuplo/runtime/out/esm/{chunk-24DRL32G.js.LEGAL.txt → chunk-HMKEMARF.js.LEGAL.txt} +0 -0
  95. /package/node_modules/@zuplo/runtime/out/esm/{chunk-G42UYZ6V.js.LEGAL.txt → chunk-I65Y62VQ.js.LEGAL.txt} +0 -0
  96. /package/node_modules/@zuplo/runtime/out/esm/{chunk-TOJD4RET.js.map → chunk-MWNVPFFM.js.map} +0 -0
@@ -0,0 +1,188 @@
1
+
2
+ /*!
3
+ * Copyright (c) Zuplo, Inc. All rights reserved.
4
+ *
5
+ * Use of this software is governed by the Zuplo Terms of Service at
6
+ * https://zuplo.com/legal/terms, or by a separate agreement your company has
7
+ * signed with Zuplo.
8
+ *
9
+ * See https://zuplo.com/legal/eula for more information.
10
+ */
11
+
12
+ import{a as Gn}from"./chunk-R6UNMRUU.js";import{a as Mn}from"./chunk-5JGLAPFA.js";import{a as s,h as ht}from"./chunk-VXPFMOL5.js";var Xr=["ZUPLO_USER_LOGGER_DATA_DOG_API_KEY","ZUPLO_USER_LOGGER_DATA_DOG_URL","ZUPLO_LOG_LEVEL","ZUPLO_HANDLER_WRITE_LOG_LEVEL"];function vo(e){return e.startsWith("__ZUPLO")||e.startsWith("ZUPLO_")?!Xr.includes(e)&&!e.startsWith("ZUPLO_PUBLIC_"):e.startsWith("ZUDOKU_")?!e.startsWith("ZUDOKU_PUBLIC_"):!1}s(vo,"isRestrictedEnvVariableName");function wo(e){return!!e.startsWith("ZUPLO_")}s(wo,"isZuploReadableEnvVariableName");var mt=new Set,Un=new Set;function rn(e){Un.has(e)||(Un.add(e),mt.add(e))}s(rn,"trackFeature");function ko(){let e=[...mt];return mt.clear(),e}s(ko,"getUnsentFeatures");function Co(e){for(let t of e)mt.add(t)}s(Co,"restoreFeatures");var{toString:ei}=Object.prototype,{propertyIsEnumerable:ti}=Object.prototype;function ni(e){return ei.call(e)}s(ni,"toString");function ri(e){return typeof e=="string"}s(ri,"isString");function jo(e){return ri(e)&&e!==""}s(jo,"isNonEmptyString");function Mo(e){return ni(e)==="[object RegExp]"}s(Mo,"isRegexp");function Go(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>ti.call(e,t))]}s(Go,"getOwnEnumerableKeys");function Uo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}s(Uo,"isObject");function Po(e){return typeof e=="number"&&!Number.isNaN(e)}s(Po,"isNumber");function Vo(e){return e===!0||e===!1}s(Vo,"isBoolean");function ii(e){return typeof e>"u"}s(ii,"isUndefined");function Qo(e){return ii(e)||e===null}s(Qo,"isUndefinedOrNull");function Pn(e){return!!e&&typeof e=="object"&&"name"in e&&"message"in e&&"stack"in e}s(Pn,"isErrorLike");var yt="[REDACTION_FAILED]",si=20,Vn=16,Tt=32*1024,oi=1e4,ai=2048,ci=256,me=new Map,oe="[Truncated]",ui="[Circular]",pi=6e4,Je=[],on=!1,Be=!1,sn=new Map,Jn=0,gt;function Yo(e){if(typeof e!="function")throw new ht(`runtime.addTelemetryRedactor expects a function. Received ${e===null?"null":typeof e}.`);if(on)throw new ht("runtime.addTelemetryRedactor can only be called in runtimeInit, while the gateway starts. Register redactors there, not in a request handler or hook.");if(Je.length>=Vn)throw new ht(`runtime.addTelemetryRedactor: at most ${Vn} redactors can be registered. Combine rules into fewer redactors.`);Je.push(e),me.clear(),rn("runtime.telemetry-redactor")}s(Yo,"registerTelemetryRedactor");function Wo(){on=!0}s(Wo,"sealTelemetryRedactors");function zo(){return Be}s(zo,"isInsideTelemetryRedactor");function Zo(){return Je.length>0}s(Zo,"hasTelemetryRedactors");function Xo(e){gt=e}s(Xo,"setRedactionFailureListener");function ea(){Je.length=0,on=!1,Be=!1,me.clear(),sn.clear(),Jn=0,gt=void 0}s(ea,"resetRedactorsForTesting");function Qn(e){if(Jn++,rn("runtime.telemetry-redactor.failure"),!gt)return;let t=Date.now(),n=sn.get(e);if(!(n!==void 0&&t-n<pi)){sn.set(e,t);try{gt(e)}catch{}}}s(Qn,"reportFailure");function Re(){return{remaining:oi}}s(Re,"createRedactionBudget");function Se(e){return e.remaining-- >0}s(Se,"spend");function an(e,t){return e===""?t:`${e}.${t}`}s(an,"childField");function xe(e,t,n,r,i=r===void 0?[]:[r]){let o=e.length<=ci,a=o?JSON.stringify([t,n,r??null,i,e]):"";if(o){let u=me.get(a);if(u!==void 0)return me.delete(a),me.set(a,u),u}let c=fi(e.length>Tt?`${e.slice(0,Tt)}${oe}`:e,{kind:t,field:n,key:r,keys:i});if(o&&c!==yt){if(me.size>=ai){let u=me.keys().next().value;u!==void 0&&me.delete(u)}me.set(a,c)}return c}s(xe,"redactString");function li(e){if((typeof e=="object"||typeof e=="function")&&e!==null)try{let t=e.then;typeof t=="function"&&t.call(e,void 0,()=>{})}catch{}}s(li,"swallowRejection");function fi(e,t){if(Be)return yt;Be=!0;try{let n=e;for(let r of Je){let i;try{i=r(n,t)}catch{return Qn(t.kind),yt}if(typeof i!="string")return li(i),Qn(t.kind),yt;n=i.length>Tt?`${i.slice(0,Tt)}${oe}`:i}return n}finally{Be=!1}}s(fi,"runRedactors");function ta(e,t,n,r=Re()){return e===void 0||!Se(r)?void 0:xe(e,t,n,n)===e?e:void 0}s(ta,"redactFixedFormat");function na(e,t,n,r,i={}){let{keepParseable:o=!1,budget:a=Re()}=i;if(!Se(a))return o?Bn(e):oe;let c=xe(e,t,n,r);return!o||c===e||URL.canParse(c)?c:Bn(e,"[REDACTED]")}s(na,"redactUrl");function Bn(e,t=oe){try{return`${new URL(e).origin}/${t}`}catch{return"http://redacted.invalid/"}}s(Bn,"truncatedUrl");function di(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}s(di,"isPlainObject");function ra(e,t,n,r,i=Re()){return qe(e,t,n,r,r===void 0?[]:[r],0,{seen:new WeakSet,budget:i})}s(ra,"redactUnknown");function xt(e,t,n,r,i){let o=e.toString(),a=xe(o,t,n,r,i);return a===o?e:a}s(xt,"redactNumber");function qe(e,t,n,r,i,o,a){if((typeof e=="string"||typeof e=="number"||typeof e=="bigint")&&!Se(a.budget))return oe;let{seen:c}=a;switch(typeof e){case"string":return xe(e,t,n,r,i);case"number":case"bigint":return xt(e,t,n,r,i);case"object":break;default:return e}if(e===null)return e;if(e instanceof Date){let u=e.toJSON();if(typeof u!="string")return e;let p=qe(u,t,n,r,i,o,a);return p===u?e:p}if(o>=si)return oe;if(c.has(e))return ui;c.add(e);try{if(Array.isArray(e))return e.map((p,d)=>qe(p,t,`${n}[${d}]`,void 0,i,o+1,a));let u=e.toJSON;if(typeof u=="function"){let p=u.call(e);if(p!==e)return qe(p,t,n,r,i,o+1,a)}return Pn(e)&&!di(e)?qn(mi(e),t,n,i,o,a):qn(Object.entries(e),t,n,i,o,a)}finally{c.delete(e)}}s(qe,"walk");var hi=new Set(["name","message","stack","cause"]);function mi(e){let t=e,n=[];for(let r of["name","message","stack"])t[r]!==void 0&&n.push([r,t[r]]);for(let r of Object.entries(e))hi.has(r[0])||n.push(r);return Array.isArray(t.errors)&&!Object.prototype.propertyIsEnumerable.call(e,"errors")&&n.push(["errors",t.errors]),t.cause!==void 0&&n.push(["cause",t.cause]),n}s(mi,"errorEntries");function cn(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0,configurable:!0})}s(cn,"setOwn");function qn(e,t,n,r,i,o){let a={};for(let[c,u]of e){let p=String(c);cn(a,p,qe(u,t,an(n,p),p,[...r,p],i+1,o))}return a}s(qn,"walkEntries");function ia(e,t,n,r=Re()){let i={};for(let[o,a]of Object.entries(e)){let c=an(n,o),u;(typeof a=="string"||typeof a=="number")&&!Se(r)?u=oe:typeof a=="string"?u=xe(a,t,c,o):typeof a=="number"?u=xt(a,t,c,o):u=a,cn(i,o,u)}return i}s(ia,"redactFlatRecord");function yi(e,t,n,r){if((typeof e=="string"||typeof e=="number")&&!Se(r))return oe;if(typeof e=="string")return xe(e,"span",t,n);if(typeof e=="number")return xt(e,"span",t,n);if(!Array.isArray(e))return e;let i=!1,o=e.map((a,c)=>{if(typeof a!="string"&&typeof a!="number")return a;if(!Se(r))return i=!0,oe;let u=typeof a=="string"?xe(a,"span",`${t}[${c}]`,void 0,[n]):xt(a,"span",`${t}[${c}]`,void 0,[n]);return u!==a&&(i=!0),u});return i?o.map(a=>a==null?a:String(a)):e}s(yi,"redactAttributeValue");function sa(e,t,n=Re()){let r={};for(let[i,o]of Object.entries(e))cn(r,i,yi(o,an(t,i),i,n));return r}s(sa,"redactTelemetryAttributes");function oa(e,t,n=Re()){return Se(n)?xe(e,"span",t):oe}s(oa,"redactTelemetryString");var un;function ua(e){un=e}s(ua,"setGlobalZuploEventContext");function pa(){if(un===void 0)throw new Error("global ZuploEventContext has not been defined - invalid runtime state");return un}s(pa,"getGlobalZuploEventContext");var pn=new Mn(Symbol("ai-gateway-app-configuration")),Ti={set(e,t){let n=t!==null&&typeof t=="object"&&!Object.isFrozen(t)?Gn(t):t;pn.set(e,{configuration:n})},has(e){return pn.get(e)!==void 0},get(e){return pn.get(e)?.configuration},getId(e){let t=Ti.get(e);if(t===null||typeof t!="object")return;let n=Reflect.get(t,"id");return typeof n=="string"&&n!==""?n:void 0}};var Et="#/$defs/",F=s(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObject"),hn=new Set(["const","enum","default","example","examples"]),gi=new Set(["additionalProperties","additionalItems","contains","contentSchema","else","if","items","not","propertyNames","then","unevaluatedItems","unevaluatedProperties"]),xi=new Set(["allOf","anyOf","oneOf","prefixItems"]),mn=new Set(["$defs","definitions","dependencies","dependentSchemas","patternProperties","properties"]),Ei=new Set(["title","description","summary","example","examples","deprecated","readOnly","writeOnly","$comment"]),fn=s((e,t)=>{let n=e.$ref;if(typeof n!="string"||!n.startsWith(Et))return;let r=n.slice(Et.length);return Object.hasOwn(t,r)?r:void 0},"refName"),ae=s((e,t,n)=>{Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0,configurable:!0})},"setOwn"),Ni=s((e,t,n)=>{if(!(!F(e)||!F(e.mapping)))for(let r of Object.values(e.mapping)){if(typeof r!="string"||!r.startsWith(Et))continue;let i=r.slice(Et.length);Object.hasOwn(t,i)&&n.add(i)}},"collectMappingRefs"),De=s((e,t,n,r=!1)=>{if(Array.isArray(e)){for(let i of e)De(i,t,n,r);return}if(F(e)){for(let[i,o]of Object.entries(e))if(!hn.has(i))if(mn.has(i)&&F(o))for(let a of Object.values(o))De(a,t,n,r);else if(i==="$ref"){let a=fn(e,t);a!==void 0&&n.add(a)}else i==="discriminator"&&r?Ni(o,t,n):De(o,t,n,r)}},"collectRefs"),dn=class{constructor(t,n){this.tables=t;this.mode=n}tables;mode;static{s(this,"SchemaAssembler")}parsed=new Map;refs=new Map;recursive=new Map;bodies=new Map;needs=new Map;assembled=new WeakMap;assemble(t,n){let r=this.assembled.get(t);if(!r){let i=n==="output"?"output":"input",o=t.defs&&this.tables[t.defs]||{},a=this.replaceRootRef(JSON.parse(t.schema),n,t.defs??"",o),c=this.mode==="defs"?this.withDefs(a,t.defs??"",o):this.inline(a,t.defs??"",o,i);r=t.dialect===void 0?c:bi(c,t.dialect),this.assembled.set(t,r)}return r}replaceRootRef(t,n,r,i){let o=s(u=>F(u)&&Object.keys(u).length===1?fn(u,i):void 0,"pureRef");if(n==="output"){let u=o(t);return u===void 0?t:this.parse(r,i,u)}if(n!=="input"||!F(t)||!F(t.properties))return t;let a=o(t.properties.body);if(a===void 0)return t;let c={...t.properties};return ae(c,"body",this.parse(r,i,a)),{...t,properties:c}}memo(t,n){let r=t.get(n);return r||(r=new Map,t.set(n,r)),r}parse(t,n,r){let i=this.memo(this.parsed,t);return i.has(r)||i.set(r,JSON.parse(n[r])),i.get(r)}refsOf(t,n,r){let i=this.memo(this.refs,t),o=i.get(r);return o||(o=new Set,De(this.parse(t,n,r),n,o),i.set(r,o)),o}withDefs(t,n,r){let i=new Set,o=new Set;De(t,r,o,!0);let a=[...o];for(;a.length>0;){let u=a.pop();if(i.has(u))continue;i.add(u);for(let d of this.refsOf(n,r,u))a.push(d);let p=new Set;De(this.parse(n,r,u),r,p,!0);for(let d of p)a.push(d)}if(i.size===0)return t;let c={};for(let u of[...i].sort())ae(c,u,this.parse(n,r,u));return F(t)?{...t,$defs:{...F(t.$defs)?t.$defs:{},...c}}:{allOf:[t],$defs:c}}markRecursion(t,n,r){let i=this.memo(this.recursive,t),o=new Map,a=new Map,c=new Set,u=[],p=0,d=s(x=>{let g=[],I=s(y=>{o.set(y,p),a.set(y,p),p++,u.push(y),c.add(y),g.push({name:y,next:[...this.refsOf(t,n,y)]})},"open");for(I(x);g.length>0;){let y=g[g.length-1],E=y.next.pop();if(E!==void 0){if(i.has(E))continue;o.has(E)?c.has(E)&&a.set(y.name,Math.min(a.get(y.name),o.get(E))):I(E);continue}g.pop();let $=g[g.length-1];if($&&a.set($.name,Math.min(a.get($.name),a.get(y.name))),a.get(y.name)===o.get(y.name)){let w=[],k;do k=u.pop(),c.delete(k),w.push(k);while(k!==y.name);let B=w.length>1||this.refsOf(t,n,y.name).has(y.name);for(let R of w)i.set(R,B)}}},"visit");for(let x of r)!i.has(x)&&!o.has(x)&&d(x)}isRecursive(t,n,r){return this.memo(this.recursive,t).has(r)||this.markRecursion(t,n,[r]),this.memo(this.recursive,t).get(r)===!0}inline(t,n,r,i){let o=new Set,a=this.walk(t,n,r,i,o),c=new Set,u=[...o];for(;u.length>0;){let d=u.pop();if(!c.has(d)){c.add(d);for(let x of this.needsOf(n,r,d,i))u.push(x)}}if(c.size===0)return a;let p={};for(let d of[...c].sort())ae(p,d,this.body(n,r,d,i));return F(a)?{...a,$defs:{...F(a.$defs)?a.$defs:{},...p}}:{allOf:[a],$defs:p}}body(t,n,r,i){let o=this.memo(this.bodies,t+i);if(!o.has(r)){let a=new Set;o.set(r,this.walk(this.parse(t,n,r),t,n,i,a,r)),this.memo(this.needs,t+i).set(r,a)}return o.get(r)}needsOf(t,n,r,i){return this.body(t,n,r,i),this.memo(this.needs,t+i).get(r)}walk(t,n,r,i,o,a){if(Array.isArray(t))return this.walkList(t,n,r,i,o,a);if(!F(t))return t;let c=fn(t,r);if(c!==void 0){if(this.isRecursive(n,r,c))return o.add(c),this.walkSiblings(t,n,r,i,o,a);let u=this.body(n,r,c,i);for(let g of this.needsOf(n,r,c,i))o.add(g);let p={};for(let[g,I]of Object.entries(t))g!=="$ref"&&(p[g]=I);if(Object.keys(p).length===0)return u;let d=this.walkSiblings(p,n,r,i,o,a);if(u===!0)return{...d};if(u===!1)return{not:{},...d};if(F(u)&&Object.keys(d).every(g=>Ei.has(g)))return{...u,...d};let x=Array.isArray(d.allOf)?d.allOf:[];return{...d,allOf:[...x,u]}}return this.walkSiblings(t,n,r,i,o,a)}walkList(t,n,r,i,o,a){let c;return t.forEach((u,p)=>{let d=this.walk(u,n,r,i,o,a);d!==u&&!c&&(c=t.slice(0,p)),c?.push(d)}),c??t}walkSiblings(t,n,r,i,o,a){let c,u=s((p,d,x)=>{d===x&&!c||(c||(c={...t}),d===void 0?delete c[p]:ae(c,p,d))},"change");for(let[p,d]of Object.entries(t))if(!hn.has(p)){if(p==="discriminator")u(p,this.discriminator(d,i),d);else if(gi.has(p))u(p,this.walk(d,n,r,i,o,a),d);else if(xi.has(p)&&Array.isArray(d))u(p,this.walkList(d,n,r,i,o,a),d);else if(mn.has(p)&&F(d)){let x;for(let[g,I]of Object.entries(d)){let y=this.walk(I,n,r,i,o,a);y!==I&&!x&&(x={...d}),x&&y!==I&&ae(x,g,y)}u(p,x??d,d)}}return c??t}discriminator(t,n){if(n==="input")return;if(!F(t)||!("mapping"in t))return t;let{mapping:r,...i}=t;return i}},bi=s((e,t)=>F(e)?{$schema:t,...e}:{$schema:t,allOf:[e]},"withDialect");function ln(e){if(Array.isArray(e))return e.map(ln);if(!F(e))return e;let t={};for(let[n,r]of Object.entries(e))if(hn.has(n))ae(t,n,r);else if(n==="discriminator"&&F(r)){let{mapping:i,...o}=r;ae(t,n,o)}else if(mn.has(n)&&F(r)){let i={};for(let[o,a]of Object.entries(r))ae(i,o,ln(a));ae(t,n,i)}else ae(t,n,ln(r));return t}s(ln,"withoutDiscriminatorMappings");var Kn=new WeakMap;function ya(e,t){let n=e??Oi,r=Kn.get(n);r||(r=new Map,Kn.set(n,r));let i=r.get(t);return i||(i=new dn(n,t),r.set(t,i)),i}s(ya,"getSchemaAssembler");var Oi={};function xa(e){return e.improvedSchemaValidation===!0}s(xa,"usesImprovedSchemaValidation");var Ke=class{constructor(t,n){this.schemaSource=t;this.validateFn=n}schemaSource;validateFn;static{s(this,"CustomValidator")}schemaValue;get schema(){let t=this.schemaValue??(typeof this.schemaSource=="function"?this.schemaSource():this.schemaSource);return this.schemaValue=t,t}validate(t){return this.validateFn(t)}};function O(e,t){if(!!!e)throw new Error(t)}s(O,"devAssert");function V(e){return typeof e=="object"&&e!==null}s(V,"isObjectLike");function ce(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}s(ce,"invariant");var Si=/\r\n|[\n\r]/g;function ke(e,t){let n=0,r=1;for(let i of e.body.matchAll(Si)){if(typeof i.index=="number"||ce(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}s(ke,"getLocation");function yn(e){return Nt(e.source,ke(e.source,e.start))}s(yn,"printLocation");function Nt(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,c=t.line===1?n:0,u=t.column+c,p=`${e.name}:${a}:${u}
13
+ `,d=r.split(/\r\n|[\n\r]/g),x=d[i];if(x.length>120){let g=Math.floor(u/80),I=u%80,y=[];for(let E=0;E<x.length;E+=80)y.push(x.slice(E,E+80));return p+Hn([[`${a} |`,y[0]],...y.slice(1,g+1).map(E=>["|",E]),["|","^".padStart(I)],["|",y[g+1]]])}return p+Hn([[`${a-1} |`,d[i-1]],[`${a} |`,x],["|","^".padStart(u)],[`${a+1} |`,d[i+1]]])}s(Nt,"printSourceLocation");function Hn(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
14
+ `)}s(Hn,"printPrefixedLines");function Ai(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}s(Ai,"toNormalizedOptions");var S=class e extends Error{static{s(this,"GraphQLError")}constructor(t,...n){var r,i,o;let{nodes:a,source:c,positions:u,path:p,originalError:d,extensions:x}=Ai(n);super(t),this.name="GraphQLError",this.path=p??void 0,this.originalError=d??void 0,this.nodes=Yn(Array.isArray(a)?a:a?[a]:void 0);let g=Yn((r=this.nodes)===null||r===void 0?void 0:r.map(y=>y.loc).filter(y=>y!=null));this.source=c??(g==null||(i=g[0])===null||i===void 0?void 0:i.source),this.positions=u??g?.map(y=>y.start),this.locations=u&&c?u.map(y=>ke(c,y)):g?.map(y=>ke(y.source,y.start));let I=V(d?.extensions)?d?.extensions:void 0;this.extensions=(o=x??I)!==null&&o!==void 0?o: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}}),d!=null&&d.stack?Object.defineProperty(this,"stack",{value:d.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
15
+
16
+ `+yn(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
17
+
18
+ `+Nt(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Yn(e){return e===void 0||e.length===0?void 0:e}s(Yn,"undefinedIfEmpty");function D(e,t,n){return new S(`Syntax Error: ${n}`,{source:e,positions:[t]})}s(D,"syntaxError");var He=class{static{s(this,"Location")}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}}},Ce=class{static{s(this,"Token")}constructor(t,n,r,i,o,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=o,this.value=a,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}}},Tn={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"]},_i=new Set(Object.keys(Tn));function gn(e){let t=e?.kind;return typeof t=="string"&&_i.has(t)}s(gn,"isNode");var ne;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(ne||(ne={}));var A;(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"})(A||(A={}));var h;(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"})(h||(h={}));function bt(e){return e===9||e===32}s(bt,"isWhiteSpace");function $e(e){return e>=48&&e<=57}s($e,"isDigit");function Wn(e){return e>=97&&e<=122||e>=65&&e<=90}s(Wn,"isLetter");function Ye(e){return Wn(e)||e===95}s(Ye,"isNameStart");function Ot(e){return Wn(e)||$e(e)||e===95}s(Ot,"isNameContinue");function zn(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;a<e.length;++a){var o;let c=e[a],u=Li(c);u!==c.length&&(r=(o=r)!==null&&o!==void 0?o:a,i=a,a!==0&&u<n&&(n=u))}return e.map((a,c)=>c===0?a:a.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}s(zn,"dedentBlockStringLines");function Li(e){let t=0;for(;t<e.length&&bt(e.charCodeAt(t));)++t;return t}s(Li,"leadingWhitespace");function Zn(e){if(e==="")return!0;let t=!0,n=!1,r=!0,i=!1;for(let o=0;o<e.length;++o)switch(e.codePointAt(o)){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)}s(Zn,"isPrintableAsBlockString");function Xn(e,t){let n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(I=>I.length===0||bt(I.charCodeAt(0))),a=n.endsWith('\\"""'),c=e.endsWith('"')&&!a,u=e.endsWith("\\"),p=c||u,d=!(t!=null&&t.minimize)&&(!i||e.length>70||p||o||a),x="",g=i&&bt(e.charCodeAt(0));return(d&&!g||o)&&(x+=`
19
+ `),x+=n,(d||p)&&(x+=`
20
+ `),'"""'+x+'"""'}s(Xn,"printBlockString");var f;(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"})(f||(f={}));var ze=class{static{s(this,"Lexer")}constructor(t){let n=new Ce(f.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!==f.EOF)do if(t.next)t=t.next;else{let n=Ii(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===f.COMMENT);return t}};function tr(e){return e===f.BANG||e===f.DOLLAR||e===f.AMP||e===f.PAREN_L||e===f.PAREN_R||e===f.SPREAD||e===f.COLON||e===f.EQUALS||e===f.AT||e===f.BRACKET_L||e===f.BRACKET_R||e===f.BRACE_L||e===f.PIPE||e===f.BRACE_R}s(tr,"isPunctuatorTokenKind");function Fe(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}s(Fe,"isUnicodeScalarValue");function St(e,t){return nr(e.charCodeAt(t))&&rr(e.charCodeAt(t+1))}s(St,"isSupplementaryCodePoint");function nr(e){return e>=55296&&e<=56319}s(nr,"isLeadingSurrogate");function rr(e){return e>=56320&&e<=57343}s(rr,"isTrailingSurrogate");function Ae(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return f.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}s(Ae,"printCodePointAt");function C(e,t,n,r,i){let o=e.line,a=1+n-e.lineStart;return new Ce(t,n,r,o,a,i)}s(C,"createToken");function Ii(e,t){let n=e.source.body,r=n.length,i=t;for(;i<r;){let o=n.charCodeAt(i);switch(o){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 vi(e,i);case 33:return C(e,f.BANG,i,i+1);case 36:return C(e,f.DOLLAR,i,i+1);case 38:return C(e,f.AMP,i,i+1);case 40:return C(e,f.PAREN_L,i,i+1);case 41:return C(e,f.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return C(e,f.SPREAD,i,i+3);break;case 58:return C(e,f.COLON,i,i+1);case 61:return C(e,f.EQUALS,i,i+1);case 64:return C(e,f.AT,i,i+1);case 91:return C(e,f.BRACKET_L,i,i+1);case 93:return C(e,f.BRACKET_R,i,i+1);case 123:return C(e,f.BRACE_L,i,i+1);case 124:return C(e,f.PIPE,i,i+1);case 125:return C(e,f.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?$i(e,i):Ri(e,i)}if($e(o)||o===45)return wi(e,i,o);if(Ye(o))return Fi(e,i);throw D(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Fe(o)||St(n,i)?`Unexpected character: ${Ae(e,i)}.`:`Invalid character: ${Ae(e,i)}.`)}return C(e,f.EOF,r,r)}s(Ii,"readNextToken");function vi(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(Fe(o))++i;else if(St(n,i))i+=2;else break}return C(e,f.COMMENT,t,i,n.slice(t+1,i))}s(vi,"readComment");function wi(e,t,n){let r=e.source.body,i=t,o=n,a=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),$e(o))throw D(e.source,i,`Invalid number, unexpected digit after 0: ${Ae(e,i)}.`)}else i=xn(e,i,o),o=r.charCodeAt(i);if(o===46&&(a=!0,o=r.charCodeAt(++i),i=xn(e,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=xn(e,i,o),o=r.charCodeAt(i)),o===46||Ye(o))throw D(e.source,i,`Invalid number, expected digit but got: ${Ae(e,i)}.`);return C(e,a?f.FLOAT:f.INT,t,i,r.slice(t,i))}s(wi,"readNumber");function xn(e,t,n){if(!$e(n))throw D(e.source,t,`Invalid number, expected digit but got: ${Ae(e,t)}.`);let r=e.source.body,i=t+1;for(;$e(r.charCodeAt(i));)++i;return i}s(xn,"readDigits");function Ri(e,t){let n=e.source.body,r=n.length,i=t+1,o=i,a="";for(;i<r;){let c=n.charCodeAt(i);if(c===34)return a+=n.slice(o,i),C(e,f.STRING,t,i+1,a);if(c===92){a+=n.slice(o,i);let u=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Di(e,i):ki(e,i):Ci(e,i);a+=u.value,i+=u.size,o=i;continue}if(c===10||c===13)break;if(Fe(c))++i;else if(St(n,i))i+=2;else throw D(e.source,i,`Invalid character within String: ${Ae(e,i)}.`)}throw D(e.source,i,"Unterminated string.")}s(Ri,"readString");function Di(e,t){let n=e.source.body,r=0,i=3;for(;i<12;){let o=n.charCodeAt(t+i++);if(o===125){if(i<5||!Fe(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|We(o),r<0)break}throw D(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}s(Di,"readEscapedUnicodeVariableWidth");function ki(e,t){let n=e.source.body,r=er(n,t+2);if(Fe(r))return{value:String.fromCodePoint(r),size:6};if(nr(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let i=er(n,t+8);if(rr(i))return{value:String.fromCodePoint(r,i),size:12}}throw D(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}s(ki,"readEscapedUnicodeFixedWidth");function er(e,t){return We(e.charCodeAt(t))<<12|We(e.charCodeAt(t+1))<<8|We(e.charCodeAt(t+2))<<4|We(e.charCodeAt(t+3))}s(er,"read16BitHexCode");function We(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}s(We,"readHexDigit");function Ci(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
21
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw D(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}s(Ci,"readEscapedCharacter");function $i(e,t){let n=e.source.body,r=n.length,i=e.lineStart,o=t+3,a=o,c="",u=[];for(;o<r;){let p=n.charCodeAt(o);if(p===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){c+=n.slice(a,o),u.push(c);let d=C(e,f.BLOCK_STRING,t,o+3,zn(u).join(`
22
+ `));return e.line+=u.length-1,e.lineStart=i,d}if(p===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){c+=n.slice(a,o),a=o+1,o+=4;continue}if(p===10||p===13){c+=n.slice(a,o),u.push(c),p===13&&n.charCodeAt(o+1)===10?o+=2:++o,c="",a=o,i=o;continue}if(Fe(p))++o;else if(St(n,o))o+=2;else throw D(e.source,o,`Invalid character within String: ${Ae(e,o)}.`)}throw D(e.source,o,"Unterminated string.")}s($i,"readBlockString");function Fi(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let o=n.charCodeAt(i);if(Ot(o))++i;else break}return C(e,f.NAME,t,i,n.slice(t,i))}s(Fi,"readName");function T(e){return At(e,[])}s(T,"inspect");function At(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return ji(e,t);default:return String(e)}}s(At,"formatValue");function ji(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(Mi(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:At(r,n)}else if(Array.isArray(e))return Ui(e,n);return Gi(e,n)}s(ji,"formatObjectValue");function Mi(e){return typeof e.toJSON=="function"}s(Mi,"isJSONable");function Gi(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+Pi(e)+"]":"{ "+n.map(([i,o])=>i+": "+At(o,t)).join(", ")+" }"}s(Gi,"formatObject");function Ui(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let o=0;o<n;++o)i.push(At(e[o],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}s(Ui,"formatArray");function Pi(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}s(Pi,"getObjectTag");var Vi=globalThis.process&&!0,Z=s(Vi?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],o=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===o){let a=T(t);throw new Error(`Cannot use ${i} "${a}" from another module or realm.
23
+
24
+ Ensure that there is only one instance of "graphql" in the node_modules
25
+ directory. If different versions of "graphql" are the dependencies of other
26
+ relied on modules, use "resolutions" to ensure only one version is installed.
27
+
28
+ https://yarnpkg.com/en/docs/selective-version-resolutions
29
+
30
+ Duplicate "graphql" modules cannot be used at the same time since different
31
+ versions may have different capabilities and behavior. The data from one
32
+ version used in the function from another could produce confusing and
33
+ spurious results.`)}}return!1},"instanceOf");var je=class{static{s(this,"Source")}constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||O(!1,`Body must be a string. Received: ${T(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||O(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||O(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ir(e){return Z(e,je)}s(ir,"isSource");function It(e,t){let n=new Lt(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}s(It,"parse");function vt(e,t){let n=new Lt(e,t);n.expectToken(f.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(f.EOF),r}s(vt,"parseValue");var Lt=class{static{s(this,"Parser")}constructor(t,n={}){let r=ir(t)?t:new je(t);this._lexer=new ze(r),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(f.NAME);return this.node(t,{kind:h.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:h.DOCUMENT,definitions:this.many(f.SOF,this.parseDefinition,f.EOF)})}parseDefinition(){if(this.peek(f.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===f.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 D(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(f.BRACE_L))return this.node(t,{kind:h.OPERATION_DEFINITION,operation:ne.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(f.NAME)&&(r=this.parseName()),this.node(t,{kind:h.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(f.NAME);switch(t.value){case"query":return ne.QUERY;case"mutation":return ne.MUTATION;case"subscription":return ne.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(f.PAREN_L,this.parseVariableDefinition,f.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:h.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(f.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(f.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(f.DOLLAR),this.node(t,{kind:h.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:h.SELECTION_SET,selections:this.many(f.BRACE_L,this.parseSelection,f.BRACE_R)})}parseSelection(){return this.peek(f.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(f.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:h.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(f.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(f.PAREN_L,n,f.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(f.COLON),this.node(n,{kind:h.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(f.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(f.NAME)?this.node(t,{kind:h.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:h.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:h.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:h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case f.BRACKET_L:return this.parseList(t);case f.BRACE_L:return this.parseObject(t);case f.INT:return this.advanceLexer(),this.node(n,{kind:h.INT,value:n.value});case f.FLOAT:return this.advanceLexer(),this.node(n,{kind:h.FLOAT,value:n.value});case f.STRING:case f.BLOCK_STRING:return this.parseStringLiteral();case f.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:h.BOOLEAN,value:!0});case"false":return this.node(n,{kind:h.BOOLEAN,value:!1});case"null":return this.node(n,{kind:h.NULL});default:return this.node(n,{kind:h.ENUM,value:n.value})}case f.DOLLAR:if(t)if(this.expectToken(f.DOLLAR),this._lexer.token.kind===f.NAME){let r=this._lexer.token.value;throw D(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:h.STRING,value:t.value,block:t.kind===f.BLOCK_STRING})}parseList(t){let n=s(()=>this.parseValueLiteral(t),"item");return this.node(this._lexer.token,{kind:h.LIST,values:this.any(f.BRACKET_L,n,f.BRACKET_R)})}parseObject(t){let n=s(()=>this.parseObjectField(t),"item");return this.node(this._lexer.token,{kind:h.OBJECT,fields:this.any(f.BRACE_L,n,f.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(f.COLON),this.node(n,{kind:h.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(f.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(f.AT),this.node(n,{kind:h.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(f.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(f.BRACKET_R),n=this.node(t,{kind:h.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(f.BANG)?this.node(t,{kind:h.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:h.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(f.STRING)||this.peek(f.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(f.BRACE_L,this.parseOperationTypeDefinition,f.BRACE_R);return this.node(t,{kind:h.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(f.COLON);let r=this.parseNamedType();return this.node(t,{kind:h.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:h.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:h.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(f.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(f.BRACE_L,this.parseFieldDefinition,f.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(f.COLON);let o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:h.FIELD_DEFINITION,description:n,name:r,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(f.PAREN_L,this.parseInputValueDef,f.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(f.COLON);let i=this.parseTypeReference(),o;this.expectOptionalToken(f.EQUALS)&&(o=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:h.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:h.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:h.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(f.EQUALS)?this.delimitedMany(f.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:h.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(f.BRACE_L,this.parseEnumValueDefinition,f.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:h.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 D(this._lexer.source,this._lexer.token.start,`${_t(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:h.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(f.BRACE_L,this.parseInputValueDef,f.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===f.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(f.BRACE_L,this.parseOperationTypeDefinition,f.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:h.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:h.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:h.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:h.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:h.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:h.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:h.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(f.AT);let r=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:h.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(f.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(A,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new He(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw D(this._lexer.source,n.start,`Expected ${sr(t)}, found ${_t(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===f.NAME&&n.value===t)this.advanceLexer();else throw D(this._lexer.source,n.start,`Expected "${t}", found ${_t(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===f.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return D(this._lexer.source,n.start,`Unexpected ${_t(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==f.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw D(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function _t(e){let t=e.value;return sr(e.kind)+(t!=null?` "${t}"`:"")}s(_t,"getTokenDesc");function sr(e){return tr(e)?`"${e}"`:e}s(sr,"getTokenKindDesc");function or(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let o=r.map(u=>`"${u}"`);switch(o.length){case 0:return"";case 1:return i+o[0]+"?";case 2:return i+o[0]+" or "+o[1]+"?"}let a=o.slice(0,5),c=a.pop();return i+a.join(", ")+", or "+c+"?"}s(or,"didYouMean");function En(e){return e}s(En,"identityFunc");function wt(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}s(wt,"keyMap");function ue(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}s(ue,"keyValMap");function Ze(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}s(Ze,"mapValue");function ar(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),o=t.charCodeAt(r);if(Rt(i)&&Rt(o)){let a=0;do++n,a=a*10+i-Nn,i=e.charCodeAt(n);while(Rt(i)&&a>0);let c=0;do++r,c=c*10+o-Nn,o=t.charCodeAt(r);while(Rt(o)&&c>0);if(a<c)return-1;if(a>c)return 1}else{if(i<o)return-1;if(i>o)return 1;++n,++r}}return e.length-t.length}s(ar,"naturalCompare");var Nn=48,Qi=57;function Rt(e){return!isNaN(e)&&Nn<=e&&e<=Qi}s(Rt,"isDigit");function ur(e,t){let n=Object.create(null),r=new bn(e),i=Math.floor(e.length*.4)+1;for(let o of t){let a=r.measure(o,i);a!==void 0&&(n[o]=a)}return Object.keys(n).sort((o,a)=>{let c=n[o]-n[a];return c!==0?c:ar(o,a)})}s(ur,"suggestionList");var bn=class{static{s(this,"LexicalDistance")}constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=cr(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;let r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=cr(r),o=this._inputArray;if(i.length<o.length){let d=i;i=o,o=d}let a=i.length,c=o.length;if(a-c>n)return;let u=this._rows;for(let d=0;d<=c;d++)u[0][d]=d;for(let d=1;d<=a;d++){let x=u[(d-1)%3],g=u[d%3],I=g[0]=d;for(let y=1;y<=c;y++){let E=i[d-1]===o[y-1]?0:1,$=Math.min(x[y]+1,g[y-1]+1,x[y-1]+E);if(d>1&&y>1&&i[d-1]===o[y-2]&&i[d-2]===o[y-1]){let w=u[(d-2)%3][y-2];$=Math.min($,w+1)}$<I&&(I=$),g[y]=$}if(I>n)return}let p=u[a%3][c];return p<=n?p:void 0}};function cr(e){let t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}s(cr,"stringToArray");function q(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;let t=Object.create(null);for(let[n,r]of Object.entries(e))t[n]=r;return t}s(q,"toObjMap");function pr(e){return`"${e.replace(Bi,qi)}"`}s(pr,"printString");var Bi=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function qi(e){return Ji[e.charCodeAt(0)]}s(qi,"escapedReplacer");var Ji=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];var On=Object.freeze({});function Dt(e,t,n=Tn){let r=new Map;for(let w of Object.values(h))r.set(w,Sn(t,w));let i,o=Array.isArray(e),a=[e],c=-1,u=[],p=e,d,x,g=[],I=[];do{c++;let w=c===a.length,k=w&&u.length!==0;if(w){if(d=I.length===0?void 0:g[g.length-1],p=x,x=I.pop(),k)if(o){p=p.slice();let R=0;for(let[Te,ge]of u){let we=Te-R;ge===null?(p.splice(we,1),R++):p[we]=ge}}else{p=Object.defineProperties({},Object.getOwnPropertyDescriptors(p));for(let[R,Te]of u)p[R]=Te}c=i.index,a=i.keys,u=i.edits,o=i.inArray,i=i.prev}else if(x){if(d=o?c:a[c],p=x[d],p==null)continue;g.push(d)}let B;if(!Array.isArray(p)){var y,E;gn(p)||O(!1,`Invalid AST Node: ${T(p)}.`);let R=w?(y=r.get(p.kind))===null||y===void 0?void 0:y.leave:(E=r.get(p.kind))===null||E===void 0?void 0:E.enter;if(B=R?.call(t,p,d,x,g,I),B===On)break;if(B===!1){if(!w){g.pop();continue}}else if(B!==void 0&&(u.push([d,B]),!w))if(gn(B))p=B;else{g.pop();continue}}if(B===void 0&&k&&u.push([d,p]),w)g.pop();else{var $;i={inArray:o,index:c,keys:a,edits:u,prev:i},o=Array.isArray(p),a=o?p:($=n[p.kind])!==null&&$!==void 0?$:[],c=-1,u=[],x&&I.push(x),x=p}}while(i!==void 0);return u.length!==0?u[u.length-1][1]:e}s(Dt,"visit");function Sn(e,t){let n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}s(Sn,"getEnterLeaveForKind");function M(e){return Dt(e,Hi)}s(M,"print");var Ki=80,Hi={Name:{leave:s(e=>e.value,"leave")},Variable:{leave:s(e=>"$"+e.name,"leave")},Document:{leave:s(e=>m(e.definitions,`
34
+
35
+ `),"leave")},OperationDefinition:{leave(e){let t=_("(",m(e.variableDefinitions,", "),")"),n=m([e.operation,m([e.name,t]),m(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:s(({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+_(" = ",n)+_(" ",m(r," ")),"leave")},SelectionSet:{leave:s(({selections:e})=>re(e),"leave")},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let o=_("",e,": ")+t,a=o+_("(",m(n,", "),")");return a.length>Ki&&(a=o+_(`(
36
+ `,kt(m(n,`
37
+ `)),`
38
+ )`)),m([a,m(r," "),i]," ")}},Argument:{leave:s(({name:e,value:t})=>e+": "+t,"leave")},FragmentSpread:{leave:s(({name:e,directives:t})=>"..."+e+_(" ",m(t," ")),"leave")},InlineFragment:{leave:s(({typeCondition:e,directives:t,selectionSet:n})=>m(["...",_("on ",e),m(t," "),n]," "),"leave")},FragmentDefinition:{leave:s(({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${_("(",m(n,", "),")")} on ${t} ${_("",m(r," ")," ")}`+i,"leave")},IntValue:{leave:s(({value:e})=>e,"leave")},FloatValue:{leave:s(({value:e})=>e,"leave")},StringValue:{leave:s(({value:e,block:t})=>t?Xn(e):pr(e),"leave")},BooleanValue:{leave:s(({value:e})=>e?"true":"false","leave")},NullValue:{leave:s(()=>"null","leave")},EnumValue:{leave:s(({value:e})=>e,"leave")},ListValue:{leave:s(({values:e})=>"["+m(e,", ")+"]","leave")},ObjectValue:{leave:s(({fields:e})=>"{"+m(e,", ")+"}","leave")},ObjectField:{leave:s(({name:e,value:t})=>e+": "+t,"leave")},Directive:{leave:s(({name:e,arguments:t})=>"@"+e+_("(",m(t,", "),")"),"leave")},NamedType:{leave:s(({name:e})=>e,"leave")},ListType:{leave:s(({type:e})=>"["+e+"]","leave")},NonNullType:{leave:s(({type:e})=>e+"!","leave")},SchemaDefinition:{leave:s(({description:e,directives:t,operationTypes:n})=>_("",e,`
39
+ `)+m(["schema",m(t," "),re(n)]," "),"leave")},OperationTypeDefinition:{leave:s(({operation:e,type:t})=>e+": "+t,"leave")},ScalarTypeDefinition:{leave:s(({description:e,name:t,directives:n})=>_("",e,`
40
+ `)+m(["scalar",t,m(n," ")]," "),"leave")},ObjectTypeDefinition:{leave:s(({description:e,name:t,interfaces:n,directives:r,fields:i})=>_("",e,`
41
+ `)+m(["type",t,_("implements ",m(n," & ")),m(r," "),re(i)]," "),"leave")},FieldDefinition:{leave:s(({description:e,name:t,arguments:n,type:r,directives:i})=>_("",e,`
42
+ `)+t+(lr(n)?_(`(
43
+ `,kt(m(n,`
44
+ `)),`
45
+ )`):_("(",m(n,", "),")"))+": "+r+_(" ",m(i," ")),"leave")},InputValueDefinition:{leave:s(({description:e,name:t,type:n,defaultValue:r,directives:i})=>_("",e,`
46
+ `)+m([t+": "+n,_("= ",r),m(i," ")]," "),"leave")},InterfaceTypeDefinition:{leave:s(({description:e,name:t,interfaces:n,directives:r,fields:i})=>_("",e,`
47
+ `)+m(["interface",t,_("implements ",m(n," & ")),m(r," "),re(i)]," "),"leave")},UnionTypeDefinition:{leave:s(({description:e,name:t,directives:n,types:r})=>_("",e,`
48
+ `)+m(["union",t,m(n," "),_("= ",m(r," | "))]," "),"leave")},EnumTypeDefinition:{leave:s(({description:e,name:t,directives:n,values:r})=>_("",e,`
49
+ `)+m(["enum",t,m(n," "),re(r)]," "),"leave")},EnumValueDefinition:{leave:s(({description:e,name:t,directives:n})=>_("",e,`
50
+ `)+m([t,m(n," ")]," "),"leave")},InputObjectTypeDefinition:{leave:s(({description:e,name:t,directives:n,fields:r})=>_("",e,`
51
+ `)+m(["input",t,m(n," "),re(r)]," "),"leave")},DirectiveDefinition:{leave:s(({description:e,name:t,arguments:n,repeatable:r,locations:i})=>_("",e,`
52
+ `)+"directive @"+t+(lr(n)?_(`(
53
+ `,kt(m(n,`
54
+ `)),`
55
+ )`):_("(",m(n,", "),")"))+(r?" repeatable":"")+" on "+m(i," | "),"leave")},SchemaExtension:{leave:s(({directives:e,operationTypes:t})=>m(["extend schema",m(e," "),re(t)]," "),"leave")},ScalarTypeExtension:{leave:s(({name:e,directives:t})=>m(["extend scalar",e,m(t," ")]," "),"leave")},ObjectTypeExtension:{leave:s(({name:e,interfaces:t,directives:n,fields:r})=>m(["extend type",e,_("implements ",m(t," & ")),m(n," "),re(r)]," "),"leave")},InterfaceTypeExtension:{leave:s(({name:e,interfaces:t,directives:n,fields:r})=>m(["extend interface",e,_("implements ",m(t," & ")),m(n," "),re(r)]," "),"leave")},UnionTypeExtension:{leave:s(({name:e,directives:t,types:n})=>m(["extend union",e,m(t," "),_("= ",m(n," | "))]," "),"leave")},EnumTypeExtension:{leave:s(({name:e,directives:t,values:n})=>m(["extend enum",e,m(t," "),re(n)]," "),"leave")},InputObjectTypeExtension:{leave:s(({name:e,directives:t,fields:n})=>m(["extend input",e,m(t," "),re(n)]," "),"leave")}};function m(e,t=""){var n;return(n=e?.filter(r=>r).join(t))!==null&&n!==void 0?n:""}s(m,"join");function re(e){return _(`{
56
+ `,kt(m(e,`
57
+ `)),`
58
+ }`)}s(re,"block");function _(e,t,n=""){return t!=null&&t!==""?e+t+n:""}s(_,"wrap");function kt(e){return _(" ",e.replace(/\n/g,`
59
+ `))}s(kt,"indent");function lr(e){var t;return(t=e?.some(n=>n.includes(`
60
+ `)))!==null&&t!==void 0?t:!1}s(lr,"hasMultilineItems");function Xe(e,t){switch(e.kind){case h.NULL:return null;case h.INT:return parseInt(e.value,10);case h.FLOAT:return parseFloat(e.value);case h.STRING:case h.ENUM:case h.BOOLEAN:return e.value;case h.LIST:return e.values.map(n=>Xe(n,t));case h.OBJECT:return ue(e.fields,n=>n.name.value,n=>Xe(n.value,t));case h.VARIABLE:return t?.[e.name.value]}}s(Xe,"valueFromASTUntyped");function K(e){if(e!=null||O(!1,"Must provide name."),typeof e=="string"||O(!1,"Expected name to be a string."),e.length===0)throw new S("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!Ot(e.charCodeAt(t)))throw new S(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!Ye(e.charCodeAt(0)))throw new S(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}s(K,"assertName");function An(e){if(e==="true"||e==="false"||e==="null")throw new S(`Enum values cannot be named: ${e}`);return K(e)}s(An,"assertEnumValueName");function $t(e){return le(e)||Q(e)||j(e)||J(e)||ee(e)||U(e)||fe(e)||Y(e)}s($t,"isType");function le(e){return Z(e,X)}s(le,"isScalarType");function Q(e){return Z(e,H)}s(Q,"isObjectType");function Ft(e){if(!Q(e))throw new Error(`Expected ${T(e)} to be a GraphQL Object type.`);return e}s(Ft,"assertObjectType");function j(e){return Z(e,_e)}s(j,"isInterfaceType");function jt(e){if(!j(e))throw new Error(`Expected ${T(e)} to be a GraphQL Interface type.`);return e}s(jt,"assertInterfaceType");function J(e){return Z(e,Le)}s(J,"isUnionType");function ee(e){return Z(e,pe)}s(ee,"isEnumType");function U(e){return Z(e,Ie)}s(U,"isInputObjectType");function fe(e){return Z(e,G)}s(fe,"isListType");function Y(e){return Z(e,b)}s(Y,"isNonNullType");function et(e){return le(e)||ee(e)||U(e)||nt(e)&&et(e.ofType)}s(et,"isInputType");function tt(e){return le(e)||Q(e)||j(e)||J(e)||ee(e)||nt(e)&&tt(e.ofType)}s(tt,"isOutputType");function Ge(e){return le(e)||ee(e)}s(Ge,"isLeafType");function Mt(e){return j(e)||J(e)}s(Mt,"isAbstractType");var G=class{static{s(this,"GraphQLList")}constructor(t){$t(t)||O(!1,`Expected ${T(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}},b=class{static{s(this,"GraphQLNonNull")}constructor(t){Gt(t)||O(!1,`Expected ${T(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 nt(e){return fe(e)||Y(e)}s(nt,"isWrappingType");function Gt(e){return $t(e)&&!Y(e)}s(Gt,"isNullableType");function Ut(e){if(!Gt(e))throw new Error(`Expected ${T(e)} to be a GraphQL nullable type.`);return e}s(Ut,"assertNullableType");function Ee(e){if(e){let t=e;for(;nt(t);)t=t.ofType;return t}}s(Ee,"getNamedType");function Pt(e){return typeof e=="function"?e():e}s(Pt,"resolveReadonlyArrayThunk");function Vt(e){return typeof e=="function"?e():e}s(Vt,"resolveObjMapThunk");var X=class{static{s(this,"GraphQLScalarType")}constructor(t){var n,r,i,o;let a=(n=t.parseValue)!==null&&n!==void 0?n:En;this.name=K(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:En,this.parseValue=a,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(c,u)=>a(Xe(c,u)),this.extensions=q(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(o=t.extensionASTNodes)!==null&&o!==void 0?o:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||O(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${T(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||O(!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"||O(!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()}},H=class{static{s(this,"GraphQLObjectType")}constructor(t){var n;this.name=K(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=q(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>hr(t),this._interfaces=()=>dr(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||O(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${T(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:mr(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};function dr(e){var t;let n=Pt((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||O(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}s(dr,"defineInterfaces");function hr(e){let t=Vt(e.fields);return Me(t)||O(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Ze(t,(n,r)=>{var i;Me(n)||O(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||O(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${T(n.resolve)}.`);let o=(i=n.args)!==null&&i!==void 0?i:{};return Me(o)||O(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:K(r),description:n.description,type:n.type,args:_n(o),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:q(n.extensions),astNode:n.astNode}})}s(hr,"defineFieldMap");function _n(e){return Object.entries(e).map(([t,n])=>({name:K(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:q(n.extensions),astNode:n.astNode}))}s(_n,"defineArguments");function Me(e){return V(e)&&!Array.isArray(e)}s(Me,"isPlainObj");function mr(e){return Ze(e,t=>({description:t.description,type:t.type,args:Ln(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}s(mr,"fieldsToFieldsConfig");function Ln(e){return ue(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}s(Ln,"argsToArgsConfig");var _e=class{static{s(this,"GraphQLInterfaceType")}constructor(t){var n;this.name=K(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=q(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=hr.bind(void 0,t),this._interfaces=dr.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||O(!1,`${this.name} must provide "resolveType" as a function, but got: ${T(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:mr(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}},Le=class{static{s(this,"GraphQLUnionType")}constructor(t){var n;this.name=K(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=q(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=Yi.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||O(!1,`${this.name} must provide "resolveType" as a function, but got: ${T(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 Yi(e){let t=Pt(e.types);return Array.isArray(t)||O(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}s(Yi,"defineTypes");var pe=class{static{s(this,"GraphQLEnumType")}constructor(t){var n;this.name=K(t.name),this.description=t.description,this.extensions=q(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:fr(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=fr(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=wt(this.getValues(),n=>n.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(r=>[r.value,r])));let n=this._valueLookup.get(t);if(n===void 0)throw new S(`Enum "${this.name}" cannot represent value: ${T(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=T(t);throw new S(`Enum "${this.name}" cannot represent non-string value: ${r}.`+Ct(this,r))}let n=this.getValue(t);if(n==null)throw new S(`Value "${t}" does not exist in "${this.name}" enum.`+Ct(this,t));return n.value}parseLiteral(t,n){if(t.kind!==h.ENUM){let i=M(t);throw new S(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+Ct(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=M(t);throw new S(`Value "${i}" does not exist in "${this.name}" enum.`+Ct(this,i),{nodes:t})}return r.value}toConfig(){let t=ue(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 Ct(e,t){let n=e.getValues().map(i=>i.name),r=ur(t,n);return or("the enum value",r)}s(Ct,"didYouMeanEnumValue");function fr(e,t){return Me(t)||O(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(Me(r)||O(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${T(r)}.`),{name:An(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:q(r.extensions),astNode:r.astNode}))}s(fr,"defineEnumValues");var Ie=class{static{s(this,"GraphQLInputObjectType")}constructor(t){var n,r;this.name=K(t.name),this.description=t.description,this.extensions=q(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this.isOneOf=(r=t.isOneOf)!==null&&r!==void 0?r:!1,this._fields=Wi.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){let t=Ze(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}};function Wi(e){let t=Vt(e.fields);return Me(t)||O(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Ze(t,(n,r)=>(!("resolve"in n)||O(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:K(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:q(n.extensions),astNode:n.astNode}))}s(Wi,"defineInputFieldMap");var rt=2147483647,it=-2147483648,In=new X({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){let t=at(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 S(`Int cannot represent non-integer value: ${T(t)}`);if(n>rt||n<it)throw new S("Int cannot represent non 32-bit signed integer value: "+T(t));return n},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new S(`Int cannot represent non-integer value: ${T(e)}`);if(e>rt||e<it)throw new S(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==h.INT)throw new S(`Int cannot represent non-integer value: ${M(e)}`,{nodes:e});let t=parseInt(e.value,10);if(t>rt||t<it)throw new S(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),vn=new X({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){let t=at(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 S(`Float cannot represent non numeric value: ${T(t)}`);return n},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new S(`Float cannot represent non numeric value: ${T(e)}`);return e},parseLiteral(e){if(e.kind!==h.FLOAT&&e.kind!==h.INT)throw new S(`Float cannot represent non numeric value: ${M(e)}`,e);return parseFloat(e.value)}}),v=new X({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){let t=at(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 S(`String cannot represent value: ${T(e)}`)},parseValue(e){if(typeof e!="string")throw new S(`String cannot represent a non string value: ${T(e)}`);return e},parseLiteral(e){if(e.kind!==h.STRING)throw new S(`String cannot represent a non string value: ${M(e)}`,{nodes:e});return e.value}}),P=new X({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){let t=at(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new S(`Boolean cannot represent a non boolean value: ${T(t)}`)},parseValue(e){if(typeof e!="boolean")throw new S(`Boolean cannot represent a non boolean value: ${T(e)}`);return e},parseLiteral(e){if(e.kind!==h.BOOLEAN)throw new S(`Boolean cannot represent a non boolean value: ${M(e)}`,{nodes:e});return e.value}}),st=new X({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){let t=at(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new S(`ID cannot represent value: ${T(e)}`)},parseValue(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isInteger(e))return e.toString();throw new S(`ID cannot represent value: ${T(e)}`)},parseLiteral(e){if(e.kind!==h.STRING&&e.kind!==h.INT)throw new S("ID cannot represent a non-string and non-integer value: "+M(e),{nodes:e});return e.value}}),ot=Object.freeze([v,In,vn,P,st]);function Qt(e){return ot.some(({name:t})=>e.name===t)}s(Qt,"isSpecifiedScalarType");function at(e){if(V(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!V(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}s(at,"serializeObject");function wn(e){return Z(e,ie)}s(wn,"isDirective");var ie=class{static{s(this,"GraphQLDirective")}constructor(t){var n,r;this.name=K(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=q(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||O(!1,`@${t.name} locations must be an Array.`);let i=(r=t.args)!==null&&r!==void 0?r:{};V(i)&&!Array.isArray(i)||O(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=_n(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:Ln(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}},yr=new ie({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[A.FIELD,A.FRAGMENT_SPREAD,A.INLINE_FRAGMENT],args:{if:{type:new b(P),description:"Included when true."}}}),Tr=new ie({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[A.FIELD,A.FRAGMENT_SPREAD,A.INLINE_FRAGMENT],args:{if:{type:new b(P),description:"Skipped when true."}}}),Bt="No longer supported",gr=new ie({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[A.FIELD_DEFINITION,A.ARGUMENT_DEFINITION,A.INPUT_FIELD_DEFINITION,A.ENUM_VALUE],args:{reason:{type:v,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:Bt}}}),xr=new ie({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[A.SCALAR],args:{url:{type:new b(v),description:"The URL that specifies the behavior of this scalar."}}}),Er=new ie({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[A.INPUT_OBJECT],args:{}}),Rn=Object.freeze([yr,Tr,gr,xr,Er]);function Nr(e){return typeof e=="object"&&typeof e?.[Symbol.iterator]=="function"}s(Nr,"isIterableObject");function ye(e,t){if(Y(t)){let n=ye(e,t.ofType);return n?.kind===h.NULL?null:n}if(e===null)return{kind:h.NULL};if(e===void 0)return null;if(fe(t)){let n=t.ofType;if(Nr(e)){let r=[];for(let i of e){let o=ye(i,n);o!=null&&r.push(o)}return{kind:h.LIST,values:r}}return ye(e,n)}if(U(t)){if(!V(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=ye(e[r.name],r.type);i&&n.push({kind:h.OBJECT_FIELD,name:{kind:h.NAME,value:r.name},value:i})}return{kind:h.OBJECT,fields:n}}if(Ge(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:h.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return br.test(r)?{kind:h.INT,value:r}:{kind:h.FLOAT,value:r}}if(typeof n=="string")return ee(t)?{kind:h.ENUM,value:n}:t===st&&br.test(n)?{kind:h.INT,value:n}:{kind:h.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${T(n)}.`)}ce(!1,"Unexpected input type: "+T(t))}s(ye,"astFromValue");var br=/^-?(?:0|[1-9][0-9]*)$/;var Ue=new H({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:s(()=>({description:{type:v,resolve:s(e=>e.description,"resolve")},types:{description:"A list of all types supported by this server.",type:new b(new G(new b(te))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new b(te),resolve:s(e=>e.getQueryType(),"resolve")},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:te,resolve:s(e=>e.getMutationType(),"resolve")},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:te,resolve:s(e=>e.getSubscriptionType(),"resolve")},directives:{description:"A list of all directives supported by this server.",type:new b(new G(new b(qt))),resolve:s(e=>e.getDirectives(),"resolve")}}),"fields")}),qt=new H({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
61
+
62
+ 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:s(()=>({name:{type:new b(v),resolve:s(e=>e.name,"resolve")},description:{type:v,resolve:s(e=>e.description,"resolve")},isRepeatable:{type:new b(P),resolve:s(e=>e.isRepeatable,"resolve")},locations:{type:new b(new G(new b(Jt))),resolve:s(e=>e.locations,"resolve")},args:{type:new b(new G(new b(Pe))),args:{includeDeprecated:{type:P,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}}),"fields")}),Jt=new pe({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:A.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:A.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:A.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:A.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:A.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:A.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:A.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:A.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:A.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:A.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:A.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:A.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:A.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:A.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:A.UNION,description:"Location adjacent to a union definition."},ENUM:{value:A.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:A.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:A.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:A.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),te=new H({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:s(()=>({kind:{type:new b(Yt),resolve(e){if(le(e))return L.SCALAR;if(Q(e))return L.OBJECT;if(j(e))return L.INTERFACE;if(J(e))return L.UNION;if(ee(e))return L.ENUM;if(U(e))return L.INPUT_OBJECT;if(fe(e))return L.LIST;if(Y(e))return L.NON_NULL;ce(!1,`Unexpected type: "${T(e)}".`)}},name:{type:v,resolve:s(e=>"name"in e?e.name:void 0,"resolve")},description:{type:v,resolve:s(e=>"description"in e?e.description:void 0,"resolve")},specifiedByURL:{type:v,resolve:s(e=>"specifiedByURL"in e?e.specifiedByURL:void 0,"resolve")},fields:{type:new G(new b(Kt)),args:{includeDeprecated:{type:P,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Q(e)||j(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new G(new b(te)),resolve(e){if(Q(e)||j(e))return e.getInterfaces()}},possibleTypes:{type:new G(new b(te)),resolve(e,t,n,{schema:r}){if(Mt(e))return r.getPossibleTypes(e)}},enumValues:{type:new G(new b(Ht)),args:{includeDeprecated:{type:P,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(ee(e)){let n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new G(new b(Pe)),args:{includeDeprecated:{type:P,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(U(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:te,resolve:s(e=>"ofType"in e?e.ofType:void 0,"resolve")},isOneOf:{type:P,resolve:s(e=>{if(U(e))return e.isOneOf},"resolve")}}),"fields")}),Kt=new H({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:s(()=>({name:{type:new b(v),resolve:s(e=>e.name,"resolve")},description:{type:v,resolve:s(e=>e.description,"resolve")},args:{type:new b(new G(new b(Pe))),args:{includeDeprecated:{type:P,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new b(te),resolve:s(e=>e.type,"resolve")},isDeprecated:{type:new b(P),resolve:s(e=>e.deprecationReason!=null,"resolve")},deprecationReason:{type:v,resolve:s(e=>e.deprecationReason,"resolve")}}),"fields")}),Pe=new H({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:s(()=>({name:{type:new b(v),resolve:s(e=>e.name,"resolve")},description:{type:v,resolve:s(e=>e.description,"resolve")},type:{type:new b(te),resolve:s(e=>e.type,"resolve")},defaultValue:{type:v,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=ye(n,t);return r?M(r):null}},isDeprecated:{type:new b(P),resolve:s(e=>e.deprecationReason!=null,"resolve")},deprecationReason:{type:v,resolve:s(e=>e.deprecationReason,"resolve")}}),"fields")}),Ht=new H({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:s(()=>({name:{type:new b(v),resolve:s(e=>e.name,"resolve")},description:{type:v,resolve:s(e=>e.description,"resolve")},isDeprecated:{type:new b(P),resolve:s(e=>e.deprecationReason!=null,"resolve")},deprecationReason:{type:v,resolve:s(e=>e.deprecationReason,"resolve")}}),"fields")}),L;(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"})(L||(L={}));var Yt=new pe({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:L.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:L.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:L.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:L.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:L.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:L.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:L.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:L.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Or={name:"__schema",type:new b(Ue),description:"Access the current type schema of this server.",args:[],resolve:s((e,t,n,{schema:r})=>r,"resolve"),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Sr={name:"__type",type:te,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new b(v),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:s((e,{name:t},n,{schema:r})=>r.getType(t),"resolve"),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Ar={name:"__typename",type:new b(v),description:"The name of the current Object type at runtime.",args:[],resolve:s((e,t,n,{parentType:r})=>r.name,"resolve"),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ct=Object.freeze([Ue,qt,Jt,te,Kt,Pe,Ht,Yt]);function Wt(e){return ct.some(({name:t})=>e.name===t)}s(Wt,"isIntrospectionType");var ut=class{static{s(this,"GraphQLSchema")}constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,V(t)||O(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||O(!1,`"types" must be Array if provided but got: ${T(t.types)}.`),!t.directives||Array.isArray(t.directives)||O(!1,`"directives" must be Array if provided but got: ${T(t.directives)}.`),this.description=t.description,this.extensions=q(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:Rn;let i=new Set(t.types);if(t.types!=null)for(let o of t.types)i.delete(o),se(o,i);this._queryType!=null&&se(this._queryType,i),this._mutationType!=null&&se(this._mutationType,i),this._subscriptionType!=null&&se(this._subscriptionType,i);for(let o of this._directives)if(wn(o))for(let a of o.args)se(a.type,i);se(Ue,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let o of i){if(o==null)continue;let a=o.name;if(a||O(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[a]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${a}".`);if(this._typeMap[a]=o,j(o)){for(let c of o.getInterfaces())if(j(c)){let u=this._implementationsMap[c.name];u===void 0&&(u=this._implementationsMap[c.name]={objects:[],interfaces:[]}),u.interfaces.push(o)}}else if(Q(o)){for(let c of o.getInterfaces())if(j(c)){let u=this._implementationsMap[c.name];u===void 0&&(u=this._implementationsMap[c.name]={objects:[],interfaces:[]}),u.objects.push(o)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case ne.QUERY:return this.getQueryType();case ne.MUTATION:return this.getMutationType();case ne.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return J(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){let 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),J(t))for(let i of t.getTypes())r[i.name]=!0;else{let i=this.getImplementations(t);for(let o of i.objects)r[o.name]=!0;for(let o of i.interfaces)r[o.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 se(e,t){let n=Ee(e);if(!t.has(n)){if(t.add(n),J(n))for(let r of n.getTypes())se(r,t);else if(Q(n)||j(n)){for(let r of n.getInterfaces())se(r,t);for(let r of Object.values(n.getFields())){se(r.type,t);for(let i of r.args)se(i.type,t)}}else if(U(n))for(let r of Object.values(n.getFields()))se(r.type,t)}return t}s(se,"collectReferencedTypes");function ve(e,t,n){if(e){if(e.kind===h.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&Y(t)?void 0:i}if(Y(t))return e.kind===h.NULL?void 0:ve(e,t.ofType,n);if(e.kind===h.NULL)return null;if(fe(t)){let r=t.ofType;if(e.kind===h.LIST){let o=[];for(let a of e.values)if(_r(a,n)){if(Y(r))return;o.push(null)}else{let c=ve(a,r,n);if(c===void 0)return;o.push(c)}return o}let i=ve(e,r,n);return i===void 0?void 0:[i]}if(U(t)){if(e.kind!==h.OBJECT)return;let r=Object.create(null),i=wt(e.fields,o=>o.name.value);for(let o of Object.values(t.getFields())){let a=i[o.name];if(!a||_r(a.value,n)){if(o.defaultValue!==void 0)r[o.name]=o.defaultValue;else if(Y(o.type))return;continue}let c=ve(a.value,o.type,n);if(c===void 0)return;r[o.name]=c}if(t.isOneOf){let o=Object.keys(r);if(o.length!==1||r[o[0]]===null)return}return r}if(Ge(t)){let r;try{r=t.parseLiteral(e,n)}catch{return}return r===void 0?void 0:r}ce(!1,"Unexpected input type: "+T(t))}}s(ve,"valueFromAST");function _r(e,t){return e.kind===h.VARIABLE&&(t==null||t[e.name.value]===void 0)}s(_r,"isMissingVariable");function Lr(e){let t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1,...e},n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",o=t.schemaDescription?n:"";function a(u){return t.inputValueDeprecation?u:""}s(a,"inputDeprecation");let c=t.oneOf?"isOneOf":"";return`
63
+ query IntrospectionQuery {
64
+ __schema {
65
+ ${o}
66
+ queryType { name kind }
67
+ mutationType { name kind }
68
+ subscriptionType { name kind }
69
+ types {
70
+ ...FullType
71
+ }
72
+ directives {
73
+ name
74
+ ${n}
75
+ ${i}
76
+ locations
77
+ args${a("(includeDeprecated: true)")} {
78
+ ...InputValue
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ fragment FullType on __Type {
85
+ kind
86
+ name
87
+ ${n}
88
+ ${r}
89
+ ${c}
90
+ fields(includeDeprecated: true) {
91
+ name
92
+ ${n}
93
+ args${a("(includeDeprecated: true)")} {
94
+ ...InputValue
95
+ }
96
+ type {
97
+ ...TypeRef
98
+ }
99
+ isDeprecated
100
+ deprecationReason
101
+ }
102
+ inputFields${a("(includeDeprecated: true)")} {
103
+ ...InputValue
104
+ }
105
+ interfaces {
106
+ ...TypeRef
107
+ }
108
+ enumValues(includeDeprecated: true) {
109
+ name
110
+ ${n}
111
+ isDeprecated
112
+ deprecationReason
113
+ }
114
+ possibleTypes {
115
+ ...TypeRef
116
+ }
117
+ }
118
+
119
+ fragment InputValue on __InputValue {
120
+ name
121
+ ${n}
122
+ type { ...TypeRef }
123
+ defaultValue
124
+ ${a("isDeprecated")}
125
+ ${a("deprecationReason")}
126
+ }
127
+
128
+ fragment TypeRef on __Type {
129
+ kind
130
+ name
131
+ ofType {
132
+ kind
133
+ name
134
+ ofType {
135
+ kind
136
+ name
137
+ ofType {
138
+ kind
139
+ name
140
+ ofType {
141
+ kind
142
+ name
143
+ ofType {
144
+ kind
145
+ name
146
+ ofType {
147
+ kind
148
+ name
149
+ ofType {
150
+ kind
151
+ name
152
+ ofType {
153
+ kind
154
+ name
155
+ ofType {
156
+ kind
157
+ name
158
+ }
159
+ }
160
+ }
161
+ }
162
+ }
163
+ }
164
+ }
165
+ }
166
+ }
167
+ }
168
+ `}s(Lr,"getIntrospectionQuery");function zt(e,t){V(e)&&V(e.__schema)||O(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${T(e)}.`);let n=e.__schema,r=ue(n.types,l=>l.name,l=>g(l));for(let l of[...ot,...ct])r[l.name]&&(r[l.name]=l);let i=n.queryType?d(n.queryType):null,o=n.mutationType?d(n.mutationType):null,a=n.subscriptionType?d(n.subscriptionType):null,c=n.directives?n.directives.map(Qe):[];return new ut({description:n.description,query:i,mutation:o,subscription:a,types:Object.values(r),directives:c,assumeValid:t?.assumeValid});function u(l){if(l.kind===L.LIST){let N=l.ofType;if(!N)throw new Error("Decorated type deeper than introspection query.");return new G(u(N))}if(l.kind===L.NON_NULL){let N=l.ofType;if(!N)throw new Error("Decorated type deeper than introspection query.");let z=u(N);return new b(Ut(z))}return p(l)}function p(l){let N=l.name;if(!N)throw new Error(`Unknown type reference: ${T(l)}.`);let z=r[N];if(!z)throw new Error(`Invalid or incomplete schema, unknown type: ${N}. Ensure that a full introspection query is used in order to build a client schema.`);return z}function d(l){return Ft(p(l))}function x(l){return jt(p(l))}function g(l){if(l!=null&&l.name!=null&&l.kind!=null)switch(l.kind){case L.SCALAR:return I(l);case L.OBJECT:return E(l);case L.INTERFACE:return $(l);case L.UNION:return w(l);case L.ENUM:return k(l);case L.INPUT_OBJECT:return B(l)}let N=T(l);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${N}.`)}function I(l){return new X({name:l.name,description:l.description,specifiedByURL:l.specifiedByURL})}function y(l){if(l.interfaces===null&&l.kind===L.INTERFACE)return[];if(!l.interfaces){let N=T(l);throw new Error(`Introspection result missing interfaces: ${N}.`)}return l.interfaces.map(x)}function E(l){return new H({name:l.name,description:l.description,interfaces:s(()=>y(l),"interfaces"),fields:s(()=>R(l),"fields")})}function $(l){return new _e({name:l.name,description:l.description,interfaces:s(()=>y(l),"interfaces"),fields:s(()=>R(l),"fields")})}function w(l){if(!l.possibleTypes){let N=T(l);throw new Error(`Introspection result missing possibleTypes: ${N}.`)}return new Le({name:l.name,description:l.description,types:s(()=>l.possibleTypes.map(d),"types")})}function k(l){if(!l.enumValues){let N=T(l);throw new Error(`Introspection result missing enumValues: ${N}.`)}return new pe({name:l.name,description:l.description,values:ue(l.enumValues,N=>N.name,N=>({description:N.description,deprecationReason:N.deprecationReason}))})}function B(l){if(!l.inputFields){let N=T(l);throw new Error(`Introspection result missing inputFields: ${N}.`)}return new Ie({name:l.name,description:l.description,fields:s(()=>ge(l.inputFields),"fields"),isOneOf:l.isOneOf})}function R(l){if(!l.fields)throw new Error(`Introspection result missing fields: ${T(l)}.`);return ue(l.fields,N=>N.name,Te)}function Te(l){let N=u(l.type);if(!tt(N)){let z=T(N);throw new Error(`Introspection must provide output type for fields, but received: ${z}.`)}if(!l.args){let z=T(l);throw new Error(`Introspection result missing field args: ${z}.`)}return{description:l.description,deprecationReason:l.deprecationReason,type:N,args:ge(l.args)}}function ge(l){return ue(l,N=>N.name,we)}function we(l){let N=u(l.type);if(!et(N)){let Zr=T(N);throw new Error(`Introspection must provide input type for arguments, but received: ${Zr}.`)}let z=l.defaultValue!=null?ve(vt(l.defaultValue),N):void 0;return{description:l.description,type:N,defaultValue:z,deprecationReason:l.deprecationReason}}function Qe(l){if(!l.args){let N=T(l);throw new Error(`Introspection result missing directive args: ${N}.`)}if(!l.locations){let N=T(l);throw new Error(`Introspection result missing directive locations: ${N}.`)}return new ie({name:l.name,description:l.description,isRepeatable:l.isRepeatable,locations:l.locations.slice(),args:ge(l.args)})}}s(zt,"buildClientSchema");function pt(e){if(le(e))return Os(e);if(Q(e))return Ss(e);if(j(e))return As(e);if(J(e))return _s(e);if(ee(e))return Ls(e);if(U(e))return Is(e);ce(!1,"Unexpected type: "+T(e))}s(pt,"printType");function Os(e){return de(e)+`scalar ${e.name}`+ws(e)}s(Os,"printScalar");function Ir(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}s(Ir,"printImplementedInterfaces");function Ss(e){return de(e)+`type ${e.name}`+Ir(e)+vr(e)}s(Ss,"printObject");function As(e){return de(e)+`interface ${e.name}`+Ir(e)+vr(e)}s(As,"printInterface");function _s(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return de(e)+"union "+e.name+n}s(_s,"printUnion");function Ls(e){let t=e.getValues().map((n,r)=>de(n," ",!r)+" "+n.name+Cn(n.deprecationReason));return de(e)+`enum ${e.name}`+kn(t)}s(Ls,"printEnum");function Is(e){let t=Object.values(e.getFields()).map((n,r)=>de(n," ",!r)+" "+Dn(n));return de(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+kn(t)}s(Is,"printInputObject");function vr(e){let t=Object.values(e.getFields()).map((n,r)=>de(n," ",!r)+" "+n.name+vs(n.args," ")+": "+String(n.type)+Cn(n.deprecationReason));return kn(t)}s(vr,"printFields");function kn(e){return e.length!==0?` {
169
+ `+e.join(`
170
+ `)+`
171
+ }`:""}s(kn,"printBlock");function vs(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(Dn).join(", ")+")":`(
172
+ `+e.map((n,r)=>de(n," "+t,!r)+" "+t+Dn(n)).join(`
173
+ `)+`
174
+ `+t+")"}s(vs,"printArgs");function Dn(e){let t=ye(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=` = ${M(t)}`),n+Cn(e.deprecationReason)}s(Dn,"printInputValue");function Cn(e){return e==null?"":e!==Bt?` @deprecated(reason: ${M({kind:h.STRING,value:e})})`:" @deprecated"}s(Cn,"printDeprecated");function ws(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${M({kind:h.STRING,value:e.specifiedByURL})})`}s(ws,"printSpecifiedByURL");function de(e,t="",n=!0){let{description:r}=e;if(r==null)return"";let i=M({kind:h.STRING,value:r,block:Zn(r)});return(t&&!n?`
175
+ `+t:t)+i.replace(/\n/g,`
176
+ `+t)+`
177
+ `}s(de,"printDescription");var ks="2026-07-28";function af(e){return e!==null&&e>=ks?-32602:-32002}s(af,"resourceNotFoundCode");var cf={tool:s(e=>({code:-32602,message:`Tool ${e} not found`}),"tool"),prompt:s(e=>({code:-32602,message:`Prompt ${e} not found`}),"prompt"),resource:s(e=>({code:-32602,message:`Resource not found: ${e}`,data:{uri:e}}),"resource"),resourceTemplate:s(e=>({code:-32602,message:`Resource template ${e} not found`}),"resourceTemplate")},uf=200,Cs=64,pf=1024,$s=new Set(["\r",`
178
+ `,"\u2028","\u2029"]),wr=new Set([" "," "]);function Zt(e){let t=[],n=!1;for(let r of e){if($s.has(r)){for(;t.length>0&&wr.has(t[t.length-1]);)t.pop();n=!0;continue}if(n){if(wr.has(r))continue;t.length>0&&t.push(" "),n=!1}t.push(r)}return t.join("")}s(Zt,"singleLine");function Xt(e,t){if(e.length<=t)return e;let n="";for(let r of e){if(n.length+r.length+1>t)break;n+=r}return`${n}\u2026`}s(Xt,"truncate");function Ne(e){return Xt(Zt(e),Cs)}s(Ne,"echo");var Fs="(anonymous)";function js(e){return e.name?.value??Fs}s(js,"operationLabel");function Ms(e){let t=e.locations?.[0];return t?`${e.message} At line ${t.line}, column ${t.column}.`:e.message}s(Ms,"syntaxErrorMessage");function Gs(e,t){if(e.length===0)return"The document has no operation. Send one query or mutation operation in query.";let n=e.map(js).join(", ");if(t!==void 0){let r=e.filter(i=>i.name?.value===t);return r.length>1?`The document has ${r.length} operations named "${Ne(t)}". Operation names must be unique: rename or remove the others.`:r[0]??`The document has no operation named "${Ne(t)}". Its operations: ${n}. Set operationName to one of them.`}return e.length>1?`The document has ${e.length} operations (${n}). Set operationName to the one to run.`:e[0]}s(Gs,"pickOperation");function Rr(e,t,n,r){let i;try{i=It(e,{noLocation:!0}).definitions.filter(u=>u.kind===h.OPERATION_DEFINITION)}catch(u){if(u instanceof S)return{ok:!1,message:Ms(u)};throw u}let o=Gs(i,t);if(typeof o=="string")return{ok:!1,message:o};let a=o.operation;if(a===n)return{ok:!0};let c=o.name?`Operation "${o.name.value}"`:"Operation";switch(a){case"mutation":return{ok:!1,message:r.mutation?`${c} is a mutation. Use the ${r.mutation} tool.`:`${c} is a mutation. Mutations are disabled on this server.`};case"query":return{ok:!1,message:r.query?`${c} is a query. Use the ${r.query} tool.`:`${c} is a query. Queries are disabled on this server.`};default:return{ok:!1,message:`${c} is a subscription. Subscriptions are not supported over MCP.`}}}s(Rr,"checkGraphQLOperation");var lt=2,Us=10,Ps=10,kr=500;function Cr(e){return`The ${e} tool needs GraphQL introspection allowed on this route.`}s(Cr,"introspectionNeeded");function Vs(e,t){let n;try{n=JSON.parse(e)}catch{n=void 0}let r=n!==null&&typeof n=="object"?n:void 0,i=r?.data;if(!i?.__schema){let o=Array.isArray(r?.errors)?r.errors.map(c=>c!==null&&typeof c=="object"&&"message"in c?String(c.message):void 0).filter(c=>c!==void 0):[],a=o.length>0?` The API answered: ${Xt(Zt(o.join("; ")),kr)}`:"";return{isError:!0,text:`The GraphQL API returned no schema: the introspection response has no data.__schema. ${Cr(t)}${a}`}}try{return zt(i)}catch(o){return{isError:!0,text:`The GraphQL API returned an introspection result that can't be read: ${o instanceof Error?o.message:String(o)}`}}}s(Vs,"readSchema");function Dr(e,t){let n=e.toLowerCase(),r=t.toLowerCase(),i=Array.from({length:r.length+1},(o,a)=>a);for(let o=1;o<=n.length;o++){let a=[o];for(let c=1;c<=r.length;c++)a[c]=Math.min(i[c]+1,a[c-1]+1,i[c-1]+(n[o-1]===r[c-1]?0:1));i=a}return i[r.length]}s(Dr,"distance");function Qs(e,t){let n=Math.floor(e.length*.4)+1;return t.flatMap(r=>{if(e.length-r.length>n)return[];let i=Dr(e,r),o=Dr(e,r.slice(0,e.length));return[{candidate:r,whole:i,score:Math.min(i,o+.5)}]}).filter(({score:r})=>r<=n).sort((r,i)=>r.score-i.score||r.whole-i.whole||r.candidate.localeCompare(i.candidate)).slice(0,Us).map(({candidate:r})=>r)}s(Qs,"suggestTypeNames");function $r(e){return Qt(e)||Wt(e)}s($r,"isBuiltIn");function Bs(e){let t=[];if(Q(e)||j(e)){t.push(...e.getInterfaces());for(let n of Object.values(e.getFields())){t.push(Ee(n.type));for(let r of n.args)t.push(Ee(r.type))}}else if(J(e))t.push(...e.getTypes());else if(U(e))for(let n of Object.values(e.getFields()))t.push(Ee(n.type));return t}s(Bs,"referencedTypes");function Fr(e,t){let n=new Set,r=[],i=[];for(let o of e)n.has(o.name)||(n.add(o.name),r.push(o),i.push(o));for(let o=0;o<t;o++){let a=[];for(let c of i)for(let u of Bs(c))!$r(u)&&!n.has(u.name)&&(n.add(u.name),r.push(u),a.push(u));i=a}return r}s(Fr,"collectTypes");function jr(e,t){let n=Object.keys(e.getTypeMap()).filter(o=>!o.startsWith("__")),r=[],i=[];for(let o of t){let a=e.getType(o);if(a)r.push(a);else{let c=i.length<Ps?Qs(o,n):[];i.push(c.length>0?`Unknown type "${Ne(o)}". Did you mean: ${c.join(", ")}?`:`Unknown type "${Ne(o)}".`)}}return{found:r,unknown:i}}s(jr,"findTypes");function qs(e,t,n,r){let{found:i,unknown:o}=jr(e,t);return o.length>0?{isError:!0,text:`${o.join(`
179
+ `)}
180
+ Type names are case-sensitive. Call ${r} without typeNames to list every type.`}:{isError:!1,text:Fr(i,n).map(a=>pt(a)).join(`
181
+
182
+ `)}}s(qs,"printRequestedTypes");function Js(e,t){return[e.getQueryType(),t?e.getMutationType():void 0].filter(r=>r!=null)}s(Js,"runnableRootTypes");function Ks(e,t){let n;if(t.defaultTypeNames===void 0)n=Js(e,t.mutationTool);else{let{found:u,unknown:p}=jr(e,t.defaultTypeNames);if(p.length>0)return{isError:!0,text:`The route's x-zuplo-route.mcp.schemaTool.defaultTypeNames names types the schema doesn't have:
183
+ ${p.join(`
184
+ `)}
185
+ Call ${t.toolName} with typeNames to get types by name.`};n=u}let r=Fr(n,t.depth),i=new Set(r.map(u=>u.name)),o=[e.getSubscriptionType(),t.mutationTool?void 0:e.getMutationType()].flatMap(u=>u?[u.name]:[]),a=Object.values(e.getTypeMap()).filter(u=>!$r(u)&&!i.has(u.name)&&!o.includes(u.name)).map(u=>u.name).sort(),c=r.map(u=>pt(u));return a.length>0&&c.push(`# Other types: ${a.join(", ")}`),{isError:!1,text:c.join(`
186
+
187
+ `)}}s(Ks,"printDefaultTypes");function xf(e){if(!e.ok){let n=Xt(Zt(e.text),kr);return{isError:!0,text:`The GraphQL introspection request failed with HTTP ${e.status}. ${Cr(e.toolName)}`+(n?` Response: ${n}`:"")}}let t=Vs(e.text,e.toolName);return"isError"in t?t:e.typeNames===void 0?Ks(t,e):qs(t,e.typeNames,e.depth,e.toolName)}s(xf,"graphQLSchemaToolOutput");var Hs=["schema","query","mutation"],Mr={schema:"schemaTool",query:"queryTool",mutation:"mutationTool"},ft="2026-11-06",$n={introspectExecute:["introspectionTool","executeTool"],schemaQueryMutation:["schemaTool","queryTool","mutationTool","documentationUrl"]},Ys=/^[_A-Za-z][_0-9A-Za-z]*$/,Ws={schema:{readOnlyHint:!0,idempotentHint:!0,openWorldHint:!1},query:{readOnlyHint:!0,idempotentHint:!0,openWorldHint:!1},mutation:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1,openWorldHint:!1}};function Oe(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}s(Oe,"isPlainObject");function be(e){return typeof e=="string"&&e.trim()!==""?e.trim():void 0}s(be,"optionalString");function en(e,t){let n=e[Mr[t]];return Oe(n)?n:{}}s(en,"toolConfig");function zs(e,t){let n=e[t];return n===void 0?!1:!$n.introspectExecute.includes(t)||!Oe(n)?!0:be(n.name)!==void 0||be(n.description)!==void 0||Oe(n.annotations)&&Object.keys(n.annotations).length>0}s(zs,"isSet");function _f(e,t){return(t?$n.introspectExecute:$n.schemaQueryMutation).filter(r=>zs(e,r))}s(_f,"misplacedGraphQLToolKeys");function Lf(e,t,n){return n?{summary:`which only applies before compatibility date ${ft}`,detail:`Operation "${e}" sets x-zuplo-route.mcp.${t}, which only applies to the introspection and execute tools. From compatibility date ${ft} (mcpGraphQLToolsV2), a GraphQL route gets schema, query and mutation tools instead: configure them with schemaTool, queryTool and mutationTool, and remove ${t}.`}:{summary:`which only applies from compatibility date ${ft}`,detail:`Operation "${e}" sets x-zuplo-route.mcp.${t}, which only applies to the schema, query and mutation tools. A GraphQL route gets them from compatibility date ${ft}: set compatibilityDate to ${ft} or later, or add "mcpGraphQLToolsV2": true to compatibilityFlags. Otherwise remove ${t}.`}}s(Lf,"misplacedGraphQLToolKeyMessage");function Zs(e,t){return t.enabled===!1?[]:Hs.filter(n=>en(t,n).enabled!==!1).map(n=>({kind:n,name:be(en(t,n).name)??`${e}_${n}`,setting:`x-zuplo-route.mcp.${Mr[n]}.name`}))}s(Zs,"graphQLSplitToolNames");function If(e,t){let n=t.schemaTool?.defaultDepth;if(n===void 0)return 0;if(typeof n=="number"&&Number.isInteger(n)&&n>=0&&n<=lt)return n;throw new Error(`MCP GraphQL tool configuration error: operation "${e}" sets x-zuplo-route.mcp.schemaTool.defaultDepth to ${JSON.stringify(n)}. Use 0, 1 or 2: how many levels of referenced types the schema tool adds when it is called without depth.`)}s(If,"graphQLSchemaDefaultDepth");function Xs(e,t){let n=t.schemaTool?.defaultTypeNames;if(n!==void 0){if(Array.isArray(n)&&n.length>0&&n.every(r=>typeof r=="string"&&Ys.test(r)))return n;throw new Error(`MCP GraphQL tool configuration error: operation "${e}" sets x-zuplo-route.mcp.schemaTool.defaultTypeNames to ${JSON.stringify(n)}. Use a list of one or more type names, such as ["Query"]: the types the schema tool returns when it is called without typeNames.`)}}s(Xs,"graphQLSchemaDefaultTypeNames");function eo(e){return en(e,"mutation").enabled!==!1}s(eo,"graphQLMutationToolEnabled");function to(e){return e.length===1?e[0]:`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}s(to,"listTypeNames");function no(e,t){return`${e===void 0?t?"the root query and mutation types":"the root query type":`the ${to(e)} type${e.length===1?"":"s"}`} and the names of the other types`}s(no,"graphQLSchemaDefaultTypesText");function ro(e,t,n,r){switch(e){case"schema":return`Returns types of the GraphQL schema of ${t} as SDL. Without typeNames, returns ${no(Xs(r,n),eo(n))}.`;case"query":return`Runs a read-only GraphQL query against ${t}. Mutations are rejected.`;default:return`Runs a GraphQL mutation against ${t}. Queries are rejected.`}}s(ro,"defaultDescription");function vf(e,t,n){let r=be(t)??e,i=be(n.documentationUrl);return Zs(e,n).map(o=>{let a=en(n,o.kind),c=Oe(a.annotations)?a.annotations:{},{title:u,...p}=c,d=be(a.title)??be(u)??`${r} ${o.kind}`,x=be(a.description),g=x??ro(o.kind,r,n,e);return x===void 0&&o.kind!=="schema"&&i!==void 0&&(g=`${g} API reference: ${i}`),{...o,title:d,description:g,annotations:{title:d,...Ws[o.kind],...p}}})}s(vf,"resolveGraphQLSplitTools");function wf(e){return Oe(e)&&Array.isArray(e.errors)&&e.errors.length>0}s(wf,"hasGraphQLErrors");function he(e){return{success:!1,data:null,errorMessage:e,errorData:null}}s(he,"reject");function Gr(e,t){let n=Object.keys(e).find(r=>!t.includes(r));return n===void 0?void 0:`Unknown argument "${Ne(n)}". This tool takes ${t.join(", ")}.`}s(Gr,"unknownArgument");var io=["query","variables","operationName"];function Rf(e,t){return new Ke({type:"object",properties:{query:{type:"string",description:`A GraphQL document with one ${e} operation`},variables:{type:"object",description:"Variables for the operation"},operationName:{type:"string",description:"Which operation to run when the document has several"}},required:["query"],additionalProperties:!1},n=>{if(!Oe(n))return he("arguments must be an object.");let r=Gr(n,io);if(r)return he(r);let{query:i,variables:o,operationName:a}=n;if(typeof i!="string")return he("query is required and must be a string that holds a GraphQL document.");if(o!=null&&!Oe(o))return he("variables must be an object.");if(a!=null&&typeof a!="string")return he("operationName must be a string.");let c=Rr(i,a??void 0,e,t());return c.ok?{success:!0,data:{query:i,...o!=null&&{variables:o},...a!=null&&{operationName:a}},errorData:null}:he(c.message)})}s(Rf,"createGraphQLOperationValidator");var so=["typeNames","depth"];function Df(e,t){return new Ke({type:"object",properties:{typeNames:{type:"array",items:{type:"string"},description:`Return only these types. Omit for ${t}.`},depth:{type:"integer",minimum:0,maximum:lt,description:"Also return types these types reference, this many levels deep"}},additionalProperties:!1},n=>{if(!Oe(n))return he("arguments must be an object.");let r=Gr(n,so);if(r)return he(r);let{typeNames:i,depth:o}=n;if(i!==void 0&&(!Array.isArray(i)||i.length===0||!i.every(c=>typeof c=="string"&&c!=="")))return he(`typeNames must be a list of one or more type names, such as ["Query"]. Omit it for ${t}.`);if(o!==void 0&&(typeof o!="number"||!Number.isInteger(o)||o<0||o>lt))return he(`depth must be an integer from 0 to ${lt}.`);let a=o??e;return{success:!0,data:i===void 0?{depth:a}:{typeNames:i,depth:a},errorData:null}})}s(Df,"createGraphQLSchemaValidator");function $f(e,t=!1){let n=new Map,r=new Set,i=new Set,o=s((a,c)=>{if(!a||typeof a!="object"||Array.isArray(a)||i.has(a))return;i.add(a);let u=a;if(typeof u.$id=="string"&&(c=a),t&&typeof u.$ref=="string"&&u.$ref.startsWith("#")){let p=c,d=decodeURIComponent(u.$ref.slice(1));if(!d||d.startsWith("/")){for(let x of d?d.slice(1).split("/"):[]){let g=x.replace(/~1/g,"/").replace(/~0/g,"~");p=p&&typeof p=="object"&&Object.hasOwn(p,g)?Reflect.get(p,g):void 0}o(p,c)}}if(t&&Array.isArray(u.allOf))for(let p of u.allOf)o(p,c);if(Array.isArray(u.required))for(let p of u.required)typeof p=="string"&&r.add(p);if(u.properties&&typeof u.properties=="object")for(let[p,d]of Object.entries(u.properties))n.set(p,d?.description??`Prompt for ${p}`)},"visit");return o(e,e),[...n].map(([a,c])=>({name:a,description:c,required:r.has(a)}))}s($f,"jsonSchemaToPromptArguments");var oo=["oneOf","anyOf","allOf","not","if","then","else","minProperties","maxProperties","dependentRequired","dependentSchemas","patternProperties","propertyNames","unevaluatedProperties"],Pr=["title","description","examples","$comment","deprecated"],ao=new Set(["type","properties","required",...Pr]),co=new Set(["allOf","type","unevaluatedProperties",...Pr]),Vr=new Set(["dependentRequired"]),uo=["pathParams","queryParams","body","headers"],W=s(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isRecord"),Qr=s((e,t)=>{let n=e;for(let r=0;r<4;r++){if(!W(n))return;let i=n.$ref;if(i===void 0)return n;if(typeof i!="string"||Object.keys(n).length>1)return;let o="#/$defs/";if(!i.startsWith(o))return;let a=i.slice(o.length);if(a===""||a.includes("/")||a.includes("~"))return;let c=t.$defs;if(!W(c))return;n=c[a]}},"resolveLocalRef"),Br=s(e=>Array.isArray(e.required)?e.required.filter(t=>typeof t=="string"):[],"requiredNames"),Mf=s((e,t,n=!1)=>{let r=e.properties;if(!W(r))return{ok:!1,reason:"the generated composite input schema has no `properties` object to flatten"};let i=n?Object.create(null):{},o=[],a=new Map,c=[],u=new Map,p=[],d,x=!1,g=!1,I={};for(let E of uo){if(!t.includes(E))continue;let $=r[E],w=n&&E==="body"&&W($)?$:Qr($,e);if(!w)return{ok:!1,reason:`the \`${E}\` schema could not be resolved to a plain object schema`};let k=w,B=!1,R,Te=n&&E==="body"?mo(w,e):void 0;if(Te)R={ok:!1,reason:Te};else if(n&&E==="body"&&w.allOf!==void 0){let l=po(w,e);l.ok?(k=l.node,B=!0,R=Ur(E,k,n)):R=l}else R=Ur(E,k,n);if(!R.ok){if(E!=="body")return R;let l=u.get(E);if(l)return{ok:!1,reason:`\`${E}\` is declared as a parameter by \`${l}\` and is also where this operation's request body has to go, because the body is not a plain object schema. This tool keeps the nested input schema despite \`toolInputStyle: "flat"\`; rename the \`${E}\` parameter to flatten it.`};p.push(R.reason),i[E]=r[E],o.push(E),a.set(E,E),u.set(E,E),c.push({component:E,mode:"wrapped",keys:[E]});continue}let ge=W(k.properties)?k.properties:{},we=new Set(Br(k)),Qe=[];for(let[l,N]of Object.entries(ge)){let z=u.get(l);if(z)return{ok:!1,reason:`\`${l}\` is declared by both \`${z}\` and \`${E}\`, so the two cannot share one flat argument. This tool keeps the nested input schema despite \`toolInputStyle: "flat"\`; rename one of them to flatten it.`};u.set(l,E),a.set(l,E),i[l]=N,Qe.push(l),we.has(l)&&o.push(l)}if(E==="body"){g=B;for(let l of Vr)n&&k[l]!==void 0&&(I[l]=k[l],g=!0)}E==="body"&&k.additionalProperties!==!1?(d=E,x=k.additionalProperties,c.push({component:E,mode:"spread",keys:Qe})):c.push({component:E,mode:"properties",keys:Qe})}let y={type:"object",properties:i,required:o,...I};return x!==void 0&&(y.additionalProperties=x),e.$defs!==void 0&&(y.$defs=e.$defs),e.$schema!==void 0&&(y.$schema=e.$schema),{ok:!0,schema:y,warnings:p,components:c,routes:a,spread:d,reshapedBody:g}},"planFlatInput"),Fn=s((e,t)=>{if(e===t)return!0;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((n,r)=>Fn(n,t[r]));if(W(e)&&W(t)){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(r=>Object.hasOwn(t,r)&&Fn(e[r],t[r]))}return!1},"sameJson"),po=s((e,t)=>{let n=s(a=>({ok:!1,reason:`the \`body\` schema is a root \`allOf\` that cannot be merged into one object: ${a}. Only branches that are plain object schemas (\`type: object\`, \`properties\`, \`required\` and annotations), with at most \`unevaluatedProperties: false\` beside the \`allOf\`, are flattened.`}),"refuse");for(let a of Object.keys(e))if(!co.has(a))return n(a==="additionalProperties"?"`additionalProperties` beside an `allOf` only sees the root's own `properties`, not the branches', so it does not close the merged object. Use `unevaluatedProperties: false` to close a composed body":`\`${a}\` beside the \`allOf\` constrains the object as a whole`);if(e.type!==void 0&&e.type!=="object")return n(`the root \`type\` is ${JSON.stringify(e.type)}`);if(e.unevaluatedProperties!==void 0&&e.unevaluatedProperties!==!1)return n("`unevaluatedProperties` is not `false`, and only `false` has a flat equivalent");let r=e.allOf;if(!Array.isArray(r)||r.length===0)return n("`allOf` is not a non-empty array");let i=Object.create(null),o=[];for(let[a,c]of r.entries()){let u=Qr(c,t);if(!u)return n(`branch ${a} is not a schema object or a \`$ref\` to a root \`$defs\` entry`);for(let p of Object.keys(u))if(!ao.has(p))return n(`branch ${a} uses \`${p}\``);if(u.type!=="object")return n(`branch ${a} has \`type\` ${JSON.stringify(u.type)}, not "object"`);if(u.properties!==void 0&&!W(u.properties))return n(`branch ${a} has a malformed \`properties\` value`);for(let[p,d]of Object.entries(u.properties??{})){if(Object.hasOwn(i,p)){if(!Fn(i[p],d))return n(`\`${p}\` is declared by more than one branch with different schemas`);continue}i[p]=d}if(u.required!==void 0){if(!Array.isArray(u.required)||u.required.some(p=>typeof p!="string"))return n(`branch ${a} has a malformed \`required\` value`);for(let p of u.required)o.includes(p)||o.push(p)}}return{ok:!0,node:{type:"object",properties:i,required:o,...e.unevaluatedProperties===!1&&{additionalProperties:!1}}}},"mergeAllOfBody"),lo=new Set(["const","enum","default","example","examples"]),fo=new Set(["properties","patternProperties","dependentSchemas","$defs","definitions"]),dt=s((e,t,n,r=!1)=>{if(Array.isArray(e))return e.some(o=>dt(o,t,n));if(!W(e))return!1;let i=!1;for(let[o,a]of Object.entries(e))if(r)i=dt(a,t,n)||i;else if(o===t.keyword)i=a===t.target||i;else if(o==="$ref"){let c="#/$defs/";typeof a=="string"&&a.startsWith(c)&&!a.slice(c.length).includes("/")&&n.add(a.slice(c.length))}else lo.has(o)||(i=dt(a,t,n,fo.has(o))||i);return i},"hasRecursiveRefTo"),ho=s(e=>{let t=[];return typeof e.$dynamicAnchor=="string"&&t.push({anchor:`$dynamicAnchor: ${JSON.stringify(e.$dynamicAnchor)}`,keyword:"$dynamicRef",target:`#${e.$dynamicAnchor}`}),e.$recursiveAnchor===!0&&t.push({anchor:"$recursiveAnchor: true",keyword:"$recursiveRef",target:"#"}),t},"rootRecursiveReferences"),mo=s((e,t)=>{let n=W(t.$defs)?t.$defs:{};for(let r of ho(e)){let i=new Set,o=dt(e,r,i),a=new Set;for(let c of i){if(o)break;a.has(c)||!Object.hasOwn(n,c)||(a.add(c),o=dt(n[c],r,i))}if(o)return`the \`body\` schema declares \`${r.anchor}\` and recurses to it with \`${r.keyword}\`, which cannot be applied to hoisted properties: the recursion would re-enter the flat root, parameters included`}},"dynamicRecursionProblem"),yo=s(e=>{let t=e.dependentRequired;if(t===void 0)return;let n="the `body` schema has a malformed `dependentRequired` value";if(!W(t))return n;let r=W(e.properties)?e.properties:{};for(let[i,o]of Object.entries(t)){if(!Array.isArray(o)||o.some(a=>typeof a!="string"))return n;for(let a of[i,...o])if(!Object.hasOwn(r,a))return`the \`body\` schema's \`dependentRequired\` names \`${a}\`, which is not one of its \`properties\`, so the rule cannot be applied to hoisted properties. Declare \`${a}\` in the body's \`properties\` to flatten it.`}},"checkDependentRequired"),Ur=s((e,t,n)=>{for(let r of[...oo,...n?["const","enum","dependencies","$ref","$dynamicRef","$recursiveRef","$id","$defs","definitions"]:[]]){if(n&&e==="body"&&Vr.has(r)){if(t[r]!==void 0){let i=yo(t);if(i)return{ok:!1,reason:i}}continue}if(t[r]!==void 0)return{ok:!1,reason:`the \`${e}\` schema uses \`${r}\`, which constrains the object as a whole and cannot be applied to hoisted properties`}}return n&&Br(t).some(r=>!W(t.properties)||!Object.hasOwn(t.properties,r))?{ok:!1,reason:`the \`${e}\` schema requires undeclared properties and must remain nested`}:t.type!=="object"?{ok:!1,reason:`the \`${e}\` schema is not an object schema (\`type\` is ${JSON.stringify(t.type)}), so it has no properties to hoist. Declare the request body as an object with \`properties\` to have its fields become top-level tool arguments.`}:t.properties!==void 0&&!W(t.properties)?{ok:!1,reason:`the \`${e}\` schema has a malformed \`properties\` value`}:{ok:!0}},"isFlattenable");var qr=class extends Error{constructor(n,r,i){super(`Resource '${n}' (${r}) could not be read: its route answered ${i}`);this.uri=r;this.status=i;this.name="McpResourceRouteStatusError"}uri;status;static{s(this,"McpResourceRouteStatusError")}},jn="%[0-9A-Fa-f]{2}",tn="A-Za-z0-9\\-._~",nn="!$&'()*+,;=",Yr=`(?:[${tn}${nn}:@]|${jn})`,To=/^[A-Za-z][A-Za-z0-9+.-]*$/,go=new RegExp(`^${Yr}*$`),Jr=new RegExp(`^(?:${Yr}|[/?])*$`),xo=new RegExp(`^(?:[${tn}${nn}:]|${jn})*$`),Eo=new RegExp(`^(?:[${tn}${nn}]|${jn})*$`),Kr=/^[0-9]*$/,No=new RegExp(`^[vV][0-9A-Fa-f]+\\.[${tn}${nn}:]+$`),Hr="(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])",bo=new RegExp(`^${Hr}(?:\\.${Hr}){3}$`),Oo=/^[0-9A-Fa-f]{1,4}$/;function So(e){let t=e.split("::");if(t.length>2)return!1;let n=s(u=>u===""?[]:u.split(":"),"groupsOf"),r=n(t[0]),i=t.length===2?n(t[1]):[],o=[...r,...i],a=o.length,c=o[o.length-1];if(c?.includes(".")){if(!bo.test(c)||t.length===2&&i.length===0)return!1;o.pop(),a+=1}return o.every(u=>Oo.test(u))?t.length===2?a<=7:a===8:!1}s(So,"isIpv6");function Ao(e){let t=e,n=e.indexOf("@");if(n>=0){if(!xo.test(e.slice(0,n)))return!1;t=e.slice(n+1)}if(t.startsWith("[")){let i=t.indexOf("]");if(i<0)return!1;let o=t.slice(1,i);if(!So(o)&&!No.test(o))return!1;let a=t.slice(i+1);return a===""||a.startsWith(":")&&Kr.test(a.slice(1))}let r=t.lastIndexOf(":");if(r>=0){if(!Kr.test(t.slice(r+1)))return!1;t=t.slice(0,r)}return Eo.test(t)}s(Ao,"isAuthority");function Pf(e){let t=e.indexOf(":");if(t<1||!To.test(e.slice(0,t)))return!1;let n=e.slice(t+1),r=n.indexOf("#");if(r>=0){if(!Jr.test(n.slice(r+1)))return!1;n=n.slice(0,r)}let i=n.indexOf("?");if(i>=0){if(!Jr.test(n.slice(i+1)))return!1;n=n.slice(0,i)}let o=n;if(n.startsWith("//")){let a=n.indexOf("/",2),c=a<0?n.slice(2):n.slice(2,a);if(!Ao(c))return!1;o=a<0?"":n.slice(a)}return o.split("/").every(a=>go.test(a))}s(Pf,"isValidMcpResourceUri");function Vf(e,t,n){let r=n==="operations"?t?.name?.trim()||e:t?.name?.trim()||e.trim()||"",i=t?.uri?.trim();return{name:r,uri:i||`mcp://resources/${encodeURIComponent(r)}`,configured:!!i}}s(Vf,"resolveMcpResourceIdentity");var _o=/^[A-Za-z0-9_.-]{1,128}$/,Wr=/[^A-Za-z0-9_.-]/gu,Lo="tool";function zr(e){return _o.test(e)}s(zr,"isConformingMcpToolName");function qf(e){if(zr(e))return;let t=[];e.length===0&&t.push("is empty"),e.length>128&&t.push(`is ${e.length} characters long (at most 128)`);let n=Array.from(new Set(e.match(Wr)??[]));return n.length>0&&t.push(`contains ${n.map(r=>JSON.stringify(r)).join(", ")}`),t.join(" and ")}s(qf,"describeMcpToolNameProblem");function Io(e){return(e.replace(Wr,"_")||Lo).slice(0,128)}s(Io,"sanitizeMcpToolName");function Jf(e){let t=new Set,n=e.map(r=>{if(zr(r)&&!t.has(r))return t.add(r),r});return e.map((r,i)=>{let o=n[i];if(o!==void 0)return o;let a=Io(r),c=a;for(let u=2;t.has(c);u++){let p=`_${u}`;c=a.slice(0,128-p.length)+p}return t.add(c),c})}s(Jf,"assignMcpToolNames");function Yf(e,t,n){return`_${Ve(`${e}_${t}_${n}`)}`}s(Yf,"getRawOperationDataIdentifierName");function Wf(e,t,n,r){return`_${Ve(e.toLowerCase())}_${t.toLowerCase()}_${n.toLowerCase()}_${r.toLowerCase()}`}s(Wf,"getIdForParameterSchema");function zf(e,t,n){return`_${Ve(e.toLowerCase())}_${t.toLowerCase()}_rb_${Ve(n.toLowerCase())}`}s(zf,"getIdForRequestBodySchema");function Zf(e,t){return`_${Ve(e)}_${Ve(t)}`}s(Zf,"getIdForRefSchema");function Ve(e){let t=e.replace(/\[/g,"_LBRACKET_").replace(/\]/g,"_RBRACKET_").replace(/\{/g,"_LCURLY_").replace(/\}/g,"_RCURLY_").replace(/\//g,"_SLASH_").replace(/-/g,"_DASH_").replace(/\./g,"_DOT_").replace(/\+/g,"_PLUS_").replace(/:/g,"_COLON_").replace(/@/g,"_AT_").replace(/\$/g,"_DOLLAR_").replace(/[^a-zA-Z0-9_]/g,"_");return/^[a-zA-Z_]/.test(t)||(t=`_${t}`),t}s(Ve,"sanitizedIdentifierName");export{vo as a,wo as b,rn as c,ko as d,Co as e,ni as f,ri as g,jo as h,Mo as i,Go as j,Uo as k,Po as l,Vo as m,Qo as n,Pn as o,yt as p,Yo as q,Wo as r,zo as s,Zo as t,Xo as u,ea as v,Re as w,ta as x,na as y,ra as z,ia as A,sa as B,oa as C,S as D,h as E,It as F,Dt as G,M as H,Lr as I,ua as J,pa as K,Ti as L,af as M,cf as N,uf as O,pf as P,Zt as Q,Xt as R,Ne as S,Ke as T,ln as U,ya as V,xa as W,xf as X,_f as Y,Lf as Z,Zs as _,If as $,Xs as aa,eo as ba,no as ca,vf as da,wf as ea,Rf as fa,Df as ga,$f as ha,Mf as ia,qr as ja,Pf as ka,Vf as la,qf as ma,Jf as na,Yf as oa,Wf as pa,zf as qa,Zf as ra,Ve as sa};
188
+ //# sourceMappingURL=chunk-KZBZ5KM5.js.map