UNPKG

altair-static

Version:

Static package for altair graphql client

3 lines (2 loc) 129 kB
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="48aaefa5-5f10-575f-9c26-1051bd8d9d8f")}catch(e){}}(); (()=>{"use strict";var _,dt={31866:(_,W,P)=>{const Le=Symbol("Comlink.proxy"),$=Symbol("Comlink.endpoint"),ee=Symbol("Comlink.releaseProxy"),ve=Symbol("Comlink.thrown"),Fe=e=>"object"==typeof e&&null!==e||"function"==typeof e,mt=new Map([["proxy",{canHandle:e=>Fe(e)&&e[Le],serialize(e){const{port1:n,port2:t}=new MessageChannel;return jn(e,n),[t,[t]]},deserialize:e=>(e.start(),function Bn(e,n){return Gn(e,[],n)}(e))}],["throw",{canHandle:e=>Fe(e)&&ve in e,serialize({value:e}){let n;return n=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[n,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}}]]);function jn(e,n=self){n.addEventListener("message",function t(r){if(!r||!r.data)return;const{id:i,type:a,path:s}=Object.assign({path:[]},r.data),o=(r.data.argumentList||[]).map(Ve);let u;try{const c=s.slice(0,-1).reduce((p,v)=>p[v],e),l=s.reduce((p,v)=>p[v],e);switch(a){case 0:u=l;break;case 1:c[s.slice(-1)[0]]=Ve(r.data.value),u=!0;break;case 2:u=l.apply(c,o);break;case 3:u=function ni(e){return Object.assign(e,{[Le]:!0})}(new l(...o));break;case 4:{const{port1:p,port2:v}=new MessageChannel;jn(e,v),u=function ei(e,n){return Et.set(e,n),e}(p,[p])}break;case 5:u=void 0}}catch(c){u={value:c,[ve]:0}}Promise.resolve(u).catch(c=>({value:c,[ve]:0})).then(c=>{const[l,p]=Kn(c);n.postMessage(Object.assign(Object.assign({},l),{id:i}),p),5===a&&(n.removeEventListener("message",t),yt(n))})}),n.start&&n.start()}function yt(e){(function Zr(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function hn(e){if(e)throw new Error("Proxy has been released and is not useable")}function Gn(e,n=[],t=function(){}){let r=!1;const i=new Proxy(t,{get(a,s){if(hn(r),s===ee)return()=>qe(e,{type:5,path:n.map(o=>o.toString())}).then(()=>{yt(e),r=!0});if("then"===s){if(0===n.length)return{then:()=>i};const o=qe(e,{type:0,path:n.map(u=>u.toString())}).then(Ve);return o.then.bind(o)}return Gn(e,[...n,s])},set(a,s,o){hn(r);const[u,c]=Kn(o);return qe(e,{type:1,path:[...n,s].map(l=>l.toString()),value:u},c).then(Ve)},apply(a,s,o){hn(r);const u=n[n.length-1];if(u===$)return qe(e,{type:4}).then(Ve);if("bind"===u)return Gn(e,n.slice(0,-1));const[c,l]=Tt(o);return qe(e,{type:2,path:n.map(p=>p.toString()),argumentList:c},l).then(Ve)},construct(a,s){hn(r);const[o,u]=Tt(s);return qe(e,{type:3,path:n.map(c=>c.toString()),argumentList:o},u).then(Ve)}});return i}function $r(e){return Array.prototype.concat.apply([],e)}function Tt(e){const n=e.map(Kn);return[n.map(t=>t[0]),$r(n.map(t=>t[1]))]}const Et=new WeakMap;function Kn(e){for(const[n,t]of mt)if(t.canHandle(e)){const[r,i]=t.serialize(e);return[{type:3,name:n,value:r},i]}return[{type:0,value:e},Et.get(e)||[]]}function Ve(e){switch(e.type){case 3:return mt.get(e.name).deserialize(e.value);case 0:return e.value}}function qe(e,n,t){return new Promise(r=>{const i=function ti(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}();e.addEventListener("message",function a(s){!s.data||!s.data.id||s.data.id!==i||(e.removeEventListener("message",a),r(s.data))}),e.start&&e.start(),e.postMessage(Object.assign({id:i},n),t)})}var Yn=P(35121),ri=P(49015);function x(e,n){if(!e)throw new Error(n)}var f=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function mn(e){return(mn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Ue(e){return"object"==mn(e)&&null!==e}var gt="function"==typeof Symbol&&null!=Symbol.iterator?Symbol.iterator:"@@iterator",oe=("function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol,"function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag");function Qn(e,n){for(var a,t=/\r\n|[\n\r]/g,r=1,i=n+1;(a=t.exec(e.body))&&a.index<n;)r+=1,i=n+1-(a.index+a[0].length);return{line:r,column:i}}function ii(e){return Nt(e.source,Qn(e.source,e.start))}function Nt(e,n){var t=e.locationOffset.column-1,r=yn(t)+e.body,i=n.line-1,s=n.line+(e.locationOffset.line-1),u=n.column+(1===n.line?t:0),c="".concat(e.name,":").concat(s,":").concat(u,"\n"),l=r.split(/\r\n|[\n\r]/g),p=l[i];if(p.length>120){for(var v=Math.floor(u/80),h=u%80,m=[],T=0;T<p.length;T+=80)m.push(p.slice(T,T+80));return c+It([["".concat(s),m[0]]].concat(m.slice(1,v+1).map(function(N){return["",N]}),[[" ",yn(h-1)+"^"],["",m[v+1]]]))}return c+It([["".concat(s-1),l[i-1]],["".concat(s),p],["",yn(u-1)+"^"],["".concat(s+1),l[i+1]]])}function It(e){var n=e.filter(function(r){return void 0!==r[1]}),t=Math.max.apply(Math,n.map(function(r){return r[0].length}));return n.map(function(r){var a=r[1];return function ai(e,n){return yn(e-n.length)+n}(t,r[0])+(a?" | "+a:" |")}).join("\n")}function yn(e){return Array(e+1).join(" ")}function Tn(e){return(Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Ot(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bt(e,n){return!n||"object"!==Tn(n)&&"function"!=typeof n?nn(e):n}function nn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jn(e){var n="function"==typeof Map?new Map:void 0;return Jn=function(r){if(null===r||!function li(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(r))return r;if("function"!=typeof r)throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(r))return n.get(r);n.set(r,i)}function i(){return En(r,arguments,rn(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),tn(i,r)},Jn(e)}function En(e,n,t){return(En=St()?Reflect.construct:function(i,a,s){var o=[null];o.push.apply(o,a);var c=new(Function.bind.apply(i,o));return s&&tn(c,s.prototype),c}).apply(null,arguments)}function St(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function tn(e,n){return(tn=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r})(e,n)}function rn(e){return(rn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var E=function(e){!function ui(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&tn(e,n)}(t,e);var n=function ci(e){var n=St();return function(){var i,r=rn(e);if(n){var a=rn(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return bt(this,i)}}(t);function t(r,i,a,s,o,u,c){var l,p,v,h,m;(function si(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")})(this,t),m=n.call(this,r);var O,T=Array.isArray(i)?0!==i.length?i:void 0:i?[i]:void 0,N=a;!N&&T&&(N=null===(O=T[0].loc)||void 0===O?void 0:O.source);var R,w=s;!w&&T&&(w=T.reduce(function(K,H){return H.loc&&K.push(H.loc.start),K},[])),w&&0===w.length&&(w=void 0),s&&a?R=s.map(function(K){return Qn(a,K)}):T&&(R=T.reduce(function(K,H){return H.loc&&K.push(Qn(H.loc.source,H.loc.start)),K},[]));var C=c;if(null==C&&null!=u){var G=u.extensions;Ue(G)&&(C=G)}return Object.defineProperties(nn(m),{name:{value:"GraphQLError"},message:{value:r,enumerable:!0,writable:!0},locations:{value:null!==(l=R)&&void 0!==l?l:void 0,enumerable:null!=R},path:{value:o??void 0,enumerable:null!=o},nodes:{value:T??void 0},source:{value:null!==(p=N)&&void 0!==p?p:void 0},positions:{value:null!==(v=w)&&void 0!==v?v:void 0},originalError:{value:u},extensions:{value:null!==(h=C)&&void 0!==h?h:void 0,enumerable:null!=C}}),null!=u&&u.stack?(Object.defineProperty(nn(m),"stack",{value:u.stack,writable:!0,configurable:!0}),bt(m)):(Error.captureStackTrace?Error.captureStackTrace(nn(m),t):Object.defineProperty(nn(m),"stack",{value:Error().stack,writable:!0,configurable:!0}),m)}return function oi(e,n,t){n&&Ot(e.prototype,n),t&&Ot(e,t)}(t,[{key:"toString",value:function(){return function fi(e){var n=e.message;if(e.nodes)for(var t=0,r=e.nodes;t<r.length;t++){var i=r[t];i.loc&&(n+="\n\n"+ii(i.loc))}else if(e.source&&e.locations)for(var a=0,s=e.locations;a<s.length;a++)n+="\n\n"+Nt(e.source,s[a]);return n}(this)}},{key:oe,get:function(){return"Object"}}]),t}(Jn(Error));function ae(e,n,t){return new E("Syntax Error: ".concat(t),void 0,e,[n])}function ue(e,n){if(!e)throw new Error(n??"Unexpected invariant triggered.")}const qn="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function de(e){var n=e.prototype.toJSON;"function"==typeof n||ue(0),e.prototype.inspect=n,qn&&(e.prototype[qn]=n)}var Dt=function(){function e(t,r,i){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=i}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();de(Dt);var Q=function(){function e(t,r,i,a,s,o,u){this.kind=t,this.start=r,this.end=i,this.line=a,this.column=s,this.value=u,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function At(e){return null!=e&&"string"==typeof e.kind}de(Q);var d=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function gn(e){return(gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var vi=10,wt=2;function D(e){return Nn(e,[])}function Nn(e,n){switch(gn(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function di(e,n){if(-1!==n.indexOf(e))return"[Circular]";var t=[].concat(n,[e]),r=function yi(e){var n=e[String(qn)];return"function"==typeof n?n:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:Nn(i,t)}else if(Array.isArray(e))return function mi(e,n){if(0===e.length)return"[]";if(n.length>wt)return"[Array]";for(var t=Math.min(vi,e.length),r=e.length-t,i=[],a=0;a<t;++a)i.push(Nn(e[a],n));return 1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}(e,t);return function hi(e,n){var t=Object.keys(e);if(0===t.length)return"{}";if(n.length>wt)return"["+function Ti(e){var n=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===n&&"function"==typeof e.constructor){var t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return n}(e)+"]";var r=t.map(function(i){return i+": "+Nn(e[i],n)});return"{ "+r.join(", ")+" }"}(e,t)}(e,n);default:return String(e)}}const ge=function(n,t){return n instanceof t};function _t(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Lt=function(){function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof n||x(0,"Body must be a string. Received: ".concat(D(n),".")),this.body=n,this.name=t,this.locationOffset=r,this.locationOffset.line>0||x(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||x(0,"column in locationOffset is 1-indexed and must be positive.")}return function Ei(e,n,t){n&&_t(e.prototype,n),t&&_t(e,t)}(e,[{key:oe,get:function(){return"Source"}}]),e}(),A=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function Ft(e){var n=e.split(/\r\n|[\n\r]/g),t=function Ni(e){for(var n,t=!0,r=!0,i=0,a=null,s=0;s<e.length;++s)switch(e.charCodeAt(s)){case 13:10===e.charCodeAt(s+1)&&++s;case 10:t=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!t&&(null===a||i<a)&&(a=i),r=!1}return null!==(n=a)&&void 0!==n?n:0}(e);if(0!==t)for(var r=1;r<n.length;r++)n[r]=n[r].slice(t);for(var i=0;i<n.length&&xt(n[i]);)++i;for(var a=n.length;a>i&&xt(n[a-1]);)--a;return n.slice(i,a).join("\n")}function xt(e){for(var n=0;n<e.length;++n)if(" "!==e[n]&&"\t"!==e[n])return!1;return!0}var Oi=function(){function e(t){var r=new Q(d.SOF,0,0,0,0,null);this.source=t,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}var n=e.prototype;return n.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},n.lookahead=function(){var r=this.token;if(r.kind!==d.EOF)do{var i;r=null!==(i=r.next)&&void 0!==i?i:r.next=Si(this,r)}while(r.kind===d.COMMENT);return r},e}();function je(e){return isNaN(e)?d.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function Si(e,n){for(var t=e.source,r=t.body,i=r.length,a=n.end;a<i;){var s=r.charCodeAt(a),o=e.line,u=1+a-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++a;continue;case 10:++a,++e.line,e.lineStart=a;continue;case 13:10===r.charCodeAt(a+1)?a+=2:++a,++e.line,e.lineStart=a;continue;case 33:return new Q(d.BANG,a,a+1,o,u,n);case 35:return Ai(t,a,o,u,n);case 36:return new Q(d.DOLLAR,a,a+1,o,u,n);case 38:return new Q(d.AMP,a,a+1,o,u,n);case 40:return new Q(d.PAREN_L,a,a+1,o,u,n);case 41:return new Q(d.PAREN_R,a,a+1,o,u,n);case 46:if(46===r.charCodeAt(a+1)&&46===r.charCodeAt(a+2))return new Q(d.SPREAD,a,a+3,o,u,n);break;case 58:return new Q(d.COLON,a,a+1,o,u,n);case 61:return new Q(d.EQUALS,a,a+1,o,u,n);case 64:return new Q(d.AT,a,a+1,o,u,n);case 91:return new Q(d.BRACKET_L,a,a+1,o,u,n);case 93:return new Q(d.BRACKET_R,a,a+1,o,u,n);case 123:return new Q(d.BRACE_L,a,a+1,o,u,n);case 124:return new Q(d.PIPE,a,a+1,o,u,n);case 125:return new Q(d.BRACE_R,a,a+1,o,u,n);case 34:return 34===r.charCodeAt(a+1)&&34===r.charCodeAt(a+2)?Li(t,a,o,u,n,e):_i(t,a,o,u,n);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return wi(t,a,s,o,u,n);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return xi(t,a,o,u,n)}throw ae(t,a,Di(s))}return new Q(d.EOF,i,i,e.line,1+a-e.lineStart,n)}function Di(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(je(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(je(e),".")}function Ai(e,n,t,r,i){var s,a=e.body,o=n;do{s=a.charCodeAt(++o)}while(!isNaN(s)&&(s>31||9===s));return new Q(d.COMMENT,n,o,t,r,i,a.slice(n+1,o))}function wi(e,n,t,r,i,a){var s=e.body,o=t,u=n,c=!1;if(45===o&&(o=s.charCodeAt(++u)),48===o){if((o=s.charCodeAt(++u))>=48&&o<=57)throw ae(e,u,"Invalid number, unexpected digit after 0: ".concat(je(o),"."))}else u=zn(e,u,o),o=s.charCodeAt(u);if(46===o&&(c=!0,o=s.charCodeAt(++u),u=zn(e,u,o),o=s.charCodeAt(u)),(69===o||101===o)&&(c=!0,(43===(o=s.charCodeAt(++u))||45===o)&&(o=s.charCodeAt(++u)),u=zn(e,u,o),o=s.charCodeAt(u)),46===o||function ki(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(o))throw ae(e,u,"Invalid number, expected digit but got: ".concat(je(o),"."));return new Q(c?d.FLOAT:d.INT,n,u,r,i,a,s.slice(n,u))}function zn(e,n,t){var r=e.body,i=n,a=t;if(a>=48&&a<=57){do{a=r.charCodeAt(++i)}while(a>=48&&a<=57);return i}throw ae(e,i,"Invalid number, expected digit but got: ".concat(je(a),"."))}function _i(e,n,t,r,i){for(var a=e.body,s=n+1,o=s,u=0,c="";s<a.length&&!isNaN(u=a.charCodeAt(s))&&10!==u&&13!==u;){if(34===u)return c+=a.slice(o,s),new Q(d.STRING,n,s+1,t,r,i,c);if(u<32&&9!==u)throw ae(e,s,"Invalid character within String: ".concat(je(u),"."));if(++s,92===u){switch(c+=a.slice(o,s-1),u=a.charCodeAt(s)){case 34:c+='"';break;case 47:c+="/";break;case 92:c+="\\";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+="\n";break;case 114:c+="\r";break;case 116:c+="\t";break;case 117:var l=Fi(a.charCodeAt(s+1),a.charCodeAt(s+2),a.charCodeAt(s+3),a.charCodeAt(s+4));if(l<0){var p=a.slice(s+1,s+5);throw ae(e,s,"Invalid character escape sequence: \\u".concat(p,"."))}c+=String.fromCharCode(l),s+=4;break;default:throw ae(e,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(u),"."))}o=++s}}throw ae(e,s,"Unterminated string.")}function Li(e,n,t,r,i,a){for(var s=e.body,o=n+3,u=o,c=0,l="";o<s.length&&!isNaN(c=s.charCodeAt(o));){if(34===c&&34===s.charCodeAt(o+1)&&34===s.charCodeAt(o+2))return l+=s.slice(u,o),new Q(d.BLOCK_STRING,n,o+3,t,r,i,Ft(l));if(c<32&&9!==c&&10!==c&&13!==c)throw ae(e,o,"Invalid character within String: ".concat(je(c),"."));10===c?(++o,++a.line,a.lineStart=o):13===c?(10===s.charCodeAt(o+1)?o+=2:++o,++a.line,a.lineStart=o):92===c&&34===s.charCodeAt(o+1)&&34===s.charCodeAt(o+2)&&34===s.charCodeAt(o+3)?(l+=s.slice(u,o)+'"""',u=o+=4):++o}throw ae(e,o,"Unterminated string.")}function Fi(e,n,t,r){return In(e)<<12|In(n)<<8|In(t)<<4|In(r)}function In(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function xi(e,n,t,r,i){for(var a=e.body,s=a.length,o=n+1,u=0;o!==s&&!isNaN(u=a.charCodeAt(o))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++o;return new Q(d.NAME,n,o,t,r,i,a.slice(n,o))}var Hn=function(){function e(t,r){var i=function gi(e){return ge(e,Lt)}(t)?t:new Lt(t);this._lexer=new Oi(i),this._options=r}var n=e.prototype;return n.parseName=function(){var r=this.expectToken(d.NAME);return{kind:f.NAME,value:r.value,loc:this.loc(r)}},n.parseDocument=function(){var r=this._lexer.token;return{kind:f.DOCUMENT,definitions:this.many(d.SOF,this.parseDefinition,d.EOF),loc:this.loc(r)}},n.parseDefinition=function(){if(this.peek(d.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(d.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},n.parseOperationDefinition=function(){var r=this._lexer.token;if(this.peek(d.BRACE_L))return{kind:f.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(r)};var a,i=this.parseOperationType();return this.peek(d.NAME)&&(a=this.parseName()),{kind:f.OPERATION_DEFINITION,operation:i,name:a,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},n.parseOperationType=function(){var r=this.expectToken(d.NAME);switch(r.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(r)},n.parseVariableDefinitions=function(){return this.optionalMany(d.PAREN_L,this.parseVariableDefinition,d.PAREN_R)},n.parseVariableDefinition=function(){var r=this._lexer.token;return{kind:f.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(d.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(d.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(r)}},n.parseVariable=function(){var r=this._lexer.token;return this.expectToken(d.DOLLAR),{kind:f.VARIABLE,name:this.parseName(),loc:this.loc(r)}},n.parseSelectionSet=function(){var r=this._lexer.token;return{kind:f.SELECTION_SET,selections:this.many(d.BRACE_L,this.parseSelection,d.BRACE_R),loc:this.loc(r)}},n.parseSelection=function(){return this.peek(d.SPREAD)?this.parseFragment():this.parseField()},n.parseField=function(){var a,s,r=this._lexer.token,i=this.parseName();return this.expectOptionalToken(d.COLON)?(a=i,s=this.parseName()):s=i,{kind:f.FIELD,alias:a,name:s,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(d.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},n.parseArguments=function(r){return this.optionalMany(d.PAREN_L,r?this.parseConstArgument:this.parseArgument,d.PAREN_R)},n.parseArgument=function(){var r=this._lexer.token,i=this.parseName();return this.expectToken(d.COLON),{kind:f.ARGUMENT,name:i,value:this.parseValueLiteral(!1),loc:this.loc(r)}},n.parseConstArgument=function(){var r=this._lexer.token;return{kind:f.ARGUMENT,name:this.parseName(),value:(this.expectToken(d.COLON),this.parseValueLiteral(!0)),loc:this.loc(r)}},n.parseFragment=function(){var r=this._lexer.token;this.expectToken(d.SPREAD);var i=this.expectOptionalKeyword("on");return!i&&this.peek(d.NAME)?{kind:f.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(r)}:{kind:f.INLINE_FRAGMENT,typeCondition:i?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},n.parseFragmentDefinition=function(){var r,i=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(r=this._options)||void 0===r?void 0:r.experimentalFragmentVariables)?{kind:f.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(i)}:{kind:f.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(i)}},n.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},n.parseValueLiteral=function(r){var i=this._lexer.token;switch(i.kind){case d.BRACKET_L:return this.parseList(r);case d.BRACE_L:return this.parseObject(r);case d.INT:return this._lexer.advance(),{kind:f.INT,value:i.value,loc:this.loc(i)};case d.FLOAT:return this._lexer.advance(),{kind:f.FLOAT,value:i.value,loc:this.loc(i)};case d.STRING:case d.BLOCK_STRING:return this.parseStringLiteral();case d.NAME:switch(this._lexer.advance(),i.value){case"true":return{kind:f.BOOLEAN,value:!0,loc:this.loc(i)};case"false":return{kind:f.BOOLEAN,value:!1,loc:this.loc(i)};case"null":return{kind:f.NULL,loc:this.loc(i)};default:return{kind:f.ENUM,value:i.value,loc:this.loc(i)}}case d.DOLLAR:if(!r)return this.parseVariable()}throw this.unexpected()},n.parseStringLiteral=function(){var r=this._lexer.token;return this._lexer.advance(),{kind:f.STRING,value:r.value,block:r.kind===d.BLOCK_STRING,loc:this.loc(r)}},n.parseList=function(r){var i=this,a=this._lexer.token;return{kind:f.LIST,values:this.any(d.BRACKET_L,function(){return i.parseValueLiteral(r)},d.BRACKET_R),loc:this.loc(a)}},n.parseObject=function(r){var i=this,a=this._lexer.token;return{kind:f.OBJECT,fields:this.any(d.BRACE_L,function(){return i.parseObjectField(r)},d.BRACE_R),loc:this.loc(a)}},n.parseObjectField=function(r){var i=this._lexer.token,a=this.parseName();return this.expectToken(d.COLON),{kind:f.OBJECT_FIELD,name:a,value:this.parseValueLiteral(r),loc:this.loc(i)}},n.parseDirectives=function(r){for(var i=[];this.peek(d.AT);)i.push(this.parseDirective(r));return i},n.parseDirective=function(r){var i=this._lexer.token;return this.expectToken(d.AT),{kind:f.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(r),loc:this.loc(i)}},n.parseTypeReference=function(){var i,r=this._lexer.token;return this.expectOptionalToken(d.BRACKET_L)?(i=this.parseTypeReference(),this.expectToken(d.BRACKET_R),i={kind:f.LIST_TYPE,type:i,loc:this.loc(r)}):i=this.parseNamedType(),this.expectOptionalToken(d.BANG)?{kind:f.NON_NULL_TYPE,type:i,loc:this.loc(r)}:i},n.parseNamedType=function(){var r=this._lexer.token;return{kind:f.NAMED_TYPE,name:this.parseName(),loc:this.loc(r)}},n.parseTypeSystemDefinition=function(){var r=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(r.kind===d.NAME)switch(r.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()}throw this.unexpected(r)},n.peekDescription=function(){return this.peek(d.STRING)||this.peek(d.BLOCK_STRING)},n.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},n.parseSchemaDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("schema");var a=this.parseDirectives(!0),s=this.many(d.BRACE_L,this.parseOperationTypeDefinition,d.BRACE_R);return{kind:f.SCHEMA_DEFINITION,description:i,directives:a,operationTypes:s,loc:this.loc(r)}},n.parseOperationTypeDefinition=function(){var r=this._lexer.token,i=this.parseOperationType();this.expectToken(d.COLON);var a=this.parseNamedType();return{kind:f.OPERATION_TYPE_DEFINITION,operation:i,type:a,loc:this.loc(r)}},n.parseScalarTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("scalar");var a=this.parseName(),s=this.parseDirectives(!0);return{kind:f.SCALAR_TYPE_DEFINITION,description:i,name:a,directives:s,loc:this.loc(r)}},n.parseObjectTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("type");var a=this.parseName(),s=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),u=this.parseFieldsDefinition();return{kind:f.OBJECT_TYPE_DEFINITION,description:i,name:a,interfaces:s,directives:o,fields:u,loc:this.loc(r)}},n.parseImplementsInterfaces=function(){var r;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(r=this._options)||void 0===r?void 0:r.allowLegacySDLImplementsInterfaces)){var i=[];this.expectOptionalToken(d.AMP);do{i.push(this.parseNamedType())}while(this.expectOptionalToken(d.AMP)||this.peek(d.NAME));return i}return this.delimitedMany(d.AMP,this.parseNamedType)},n.parseFieldsDefinition=function(){var r;return!0===(null===(r=this._options)||void 0===r?void 0:r.allowLegacySDLEmptyFields)&&this.peek(d.BRACE_L)&&this._lexer.lookahead().kind===d.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(d.BRACE_L,this.parseFieldDefinition,d.BRACE_R)},n.parseFieldDefinition=function(){var r=this._lexer.token,i=this.parseDescription(),a=this.parseName(),s=this.parseArgumentDefs();this.expectToken(d.COLON);var o=this.parseTypeReference(),u=this.parseDirectives(!0);return{kind:f.FIELD_DEFINITION,description:i,name:a,arguments:s,type:o,directives:u,loc:this.loc(r)}},n.parseArgumentDefs=function(){return this.optionalMany(d.PAREN_L,this.parseInputValueDef,d.PAREN_R)},n.parseInputValueDef=function(){var r=this._lexer.token,i=this.parseDescription(),a=this.parseName();this.expectToken(d.COLON);var o,s=this.parseTypeReference();this.expectOptionalToken(d.EQUALS)&&(o=this.parseValueLiteral(!0));var u=this.parseDirectives(!0);return{kind:f.INPUT_VALUE_DEFINITION,description:i,name:a,type:s,defaultValue:o,directives:u,loc:this.loc(r)}},n.parseInterfaceTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("interface");var a=this.parseName(),s=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),u=this.parseFieldsDefinition();return{kind:f.INTERFACE_TYPE_DEFINITION,description:i,name:a,interfaces:s,directives:o,fields:u,loc:this.loc(r)}},n.parseUnionTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("union");var a=this.parseName(),s=this.parseDirectives(!0),o=this.parseUnionMemberTypes();return{kind:f.UNION_TYPE_DEFINITION,description:i,name:a,directives:s,types:o,loc:this.loc(r)}},n.parseUnionMemberTypes=function(){return this.expectOptionalToken(d.EQUALS)?this.delimitedMany(d.PIPE,this.parseNamedType):[]},n.parseEnumTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("enum");var a=this.parseName(),s=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();return{kind:f.ENUM_TYPE_DEFINITION,description:i,name:a,directives:s,values:o,loc:this.loc(r)}},n.parseEnumValuesDefinition=function(){return this.optionalMany(d.BRACE_L,this.parseEnumValueDefinition,d.BRACE_R)},n.parseEnumValueDefinition=function(){var r=this._lexer.token,i=this.parseDescription(),a=this.parseName(),s=this.parseDirectives(!0);return{kind:f.ENUM_VALUE_DEFINITION,description:i,name:a,directives:s,loc:this.loc(r)}},n.parseInputObjectTypeDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("input");var a=this.parseName(),s=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();return{kind:f.INPUT_OBJECT_TYPE_DEFINITION,description:i,name:a,directives:s,fields:o,loc:this.loc(r)}},n.parseInputFieldsDefinition=function(){return this.optionalMany(d.BRACE_L,this.parseInputValueDef,d.BRACE_R)},n.parseTypeSystemExtension=function(){var r=this._lexer.lookahead();if(r.kind===d.NAME)switch(r.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(r)},n.parseSchemaExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var i=this.parseDirectives(!0),a=this.optionalMany(d.BRACE_L,this.parseOperationTypeDefinition,d.BRACE_R);if(0===i.length&&0===a.length)throw this.unexpected();return{kind:f.SCHEMA_EXTENSION,directives:i,operationTypes:a,loc:this.loc(r)}},n.parseScalarTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var i=this.parseName(),a=this.parseDirectives(!0);if(0===a.length)throw this.unexpected();return{kind:f.SCALAR_TYPE_EXTENSION,name:i,directives:a,loc:this.loc(r)}},n.parseObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var i=this.parseName(),a=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===a.length&&0===s.length&&0===o.length)throw this.unexpected();return{kind:f.OBJECT_TYPE_EXTENSION,name:i,interfaces:a,directives:s,fields:o,loc:this.loc(r)}},n.parseInterfaceTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var i=this.parseName(),a=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===a.length&&0===s.length&&0===o.length)throw this.unexpected();return{kind:f.INTERFACE_TYPE_EXTENSION,name:i,interfaces:a,directives:s,fields:o,loc:this.loc(r)}},n.parseUnionTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var i=this.parseName(),a=this.parseDirectives(!0),s=this.parseUnionMemberTypes();if(0===a.length&&0===s.length)throw this.unexpected();return{kind:f.UNION_TYPE_EXTENSION,name:i,directives:a,types:s,loc:this.loc(r)}},n.parseEnumTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var i=this.parseName(),a=this.parseDirectives(!0),s=this.parseEnumValuesDefinition();if(0===a.length&&0===s.length)throw this.unexpected();return{kind:f.ENUM_TYPE_EXTENSION,name:i,directives:a,values:s,loc:this.loc(r)}},n.parseInputObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var i=this.parseName(),a=this.parseDirectives(!0),s=this.parseInputFieldsDefinition();if(0===a.length&&0===s.length)throw this.unexpected();return{kind:f.INPUT_OBJECT_TYPE_EXTENSION,name:i,directives:a,fields:s,loc:this.loc(r)}},n.parseDirectiveDefinition=function(){var r=this._lexer.token,i=this.parseDescription();this.expectKeyword("directive"),this.expectToken(d.AT);var a=this.parseName(),s=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var u=this.parseDirectiveLocations();return{kind:f.DIRECTIVE_DEFINITION,description:i,name:a,arguments:s,repeatable:o,locations:u,loc:this.loc(r)}},n.parseDirectiveLocations=function(){return this.delimitedMany(d.PIPE,this.parseDirectiveLocation)},n.parseDirectiveLocation=function(){var r=this._lexer.token,i=this.parseName();if(void 0!==A[i.value])return i;throw this.unexpected(r)},n.loc=function(r){var i;if(!0!==(null===(i=this._options)||void 0===i?void 0:i.noLocation))return new Dt(r,this._lexer.lastToken,this._lexer.source)},n.peek=function(r){return this._lexer.token.kind===r},n.expectToken=function(r){var i=this._lexer.token;if(i.kind===r)return this._lexer.advance(),i;throw ae(this._lexer.source,i.start,"Expected ".concat(kt(r),", found ").concat(Wn(i),"."))},n.expectOptionalToken=function(r){var i=this._lexer.token;if(i.kind===r)return this._lexer.advance(),i},n.expectKeyword=function(r){var i=this._lexer.token;if(i.kind!==d.NAME||i.value!==r)throw ae(this._lexer.source,i.start,'Expected "'.concat(r,'", found ').concat(Wn(i),"."));this._lexer.advance()},n.expectOptionalKeyword=function(r){var i=this._lexer.token;return i.kind===d.NAME&&i.value===r&&(this._lexer.advance(),!0)},n.unexpected=function(r){var i=r??this._lexer.token;return ae(this._lexer.source,i.start,"Unexpected ".concat(Wn(i),"."))},n.any=function(r,i,a){this.expectToken(r);for(var s=[];!this.expectOptionalToken(a);)s.push(i.call(this));return s},n.optionalMany=function(r,i,a){if(this.expectOptionalToken(r)){var s=[];do{s.push(i.call(this))}while(!this.expectOptionalToken(a));return s}return[]},n.many=function(r,i,a){this.expectToken(r);var s=[];do{s.push(i.call(this))}while(!this.expectOptionalToken(a));return s},n.delimitedMany=function(r,i){this.expectOptionalToken(r);var a=[];do{a.push(i.call(this))}while(this.expectOptionalToken(r));return a},e}();function Wn(e){var n=e.value;return kt(e.kind)+(null!=n?' "'.concat(n,'"'):"")}function kt(e){return function bi(e){return e===d.BANG||e===d.DOLLAR||e===d.AMP||e===d.PAREN_L||e===d.PAREN_R||e===d.SPREAD||e===d.COLON||e===d.EQUALS||e===d.AT||e===d.BRACKET_L||e===d.BRACKET_R||e===d.BRACE_L||e===d.PIPE||e===d.BRACE_R}(e)?'"'.concat(e,'"'):e}var Mi={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"]},an=Object.freeze({});function Rt(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Mi,r=void 0,i=Array.isArray(e),a=[e],s=-1,o=[],u=void 0,c=void 0,l=void 0,p=[],v=[],h=e;do{var m=++s===a.length,T=m&&0!==o.length;if(m){if(c=0===v.length?void 0:p[p.length-1],u=l,l=v.pop(),T){if(i)u=u.slice();else{for(var N={},O=0,w=Object.keys(u);O<w.length;O++){var R=w[O];N[R]=u[R]}u=N}for(var C=0,G=0;G<o.length;G++){var K=o[G][0],H=o[G][1];i&&(K-=C),i&&null===H?(u.splice(K,1),C++):u[K]=H}}s=r.index,a=r.keys,o=r.edits,i=r.inArray,r=r.prev}else{if(c=l?i?s:a[s]:void 0,null==(u=l?l[c]:h))continue;l&&p.push(c)}var _e,ne=void 0;if(!Array.isArray(u)){if(!At(u))throw new Error("Invalid AST Node: ".concat(D(u),"."));var Pe=Zn(n,u.kind,m);if(Pe){if((ne=Pe.call(n,u,c,l,p,v))===an)break;if(!1===ne){if(!m){p.pop();continue}}else if(void 0!==ne&&(o.push([c,ne]),!m)){if(!At(ne)){p.pop();continue}u=ne}}}void 0===ne&&T&&o.push([c,u]),m?p.pop():(r={inArray:i,index:s,keys:a,edits:o,prev:r},a=(i=Array.isArray(u))?u:null!==(_e=t[u.kind])&&void 0!==_e?_e:[],s=-1,o=[],l&&v.push(l),l=u)}while(void 0!==r);return 0!==o.length&&(h=o[o.length-1][1]),h}function Zn(e,n,t){var r=e[n];if(r){if(!t&&"function"==typeof r)return r;var i=t?r.leave:r.enter;if("function"==typeof i)return i}else{var a=t?e.leave:e.enter;if(a){if("function"==typeof a)return a;var s=a[n];if("function"==typeof s)return s}}}function Mt(e){return e.kind===f.OPERATION_DEFINITION||e.kind===f.FRAGMENT_DEFINITION}function sn(e){return e.kind===f.SCALAR_TYPE_DEFINITION||e.kind===f.OBJECT_TYPE_DEFINITION||e.kind===f.INTERFACE_TYPE_DEFINITION||e.kind===f.UNION_TYPE_DEFINITION||e.kind===f.ENUM_TYPE_DEFINITION||e.kind===f.INPUT_OBJECT_TYPE_DEFINITION}function $n(e){return e.kind===f.SCALAR_TYPE_EXTENSION||e.kind===f.OBJECT_TYPE_EXTENSION||e.kind===f.INTERFACE_TYPE_EXTENSION||e.kind===f.UNION_TYPE_EXTENSION||e.kind===f.ENUM_TYPE_EXTENSION||e.kind===f.INPUT_OBJECT_TYPE_EXTENSION}var Bi=5;function xe(e,n){var t="string"==typeof e?[e,n]:[void 0,e],r=t[0],a=" Did you mean ";r&&(a+=r+" ");var s=t[1].map(function(c){return'"'.concat(c,'"')});switch(s.length){case 0:return"";case 1:return a+s[0]+"?";case 2:return a+s[0]+" or "+s[1]+"?"}var o=s.slice(0,Bi),u=o.pop();return a+o.join(", ")+", or "+u+"?"}function Vt(e,n){for(var t=0,r=0;t<e.length&&r<n.length;){var i=e.charCodeAt(t),a=n.charCodeAt(r);if(On(i)&&On(a)){var s=0;do{++t,s=10*s+i-et,i=e.charCodeAt(t)}while(On(i)&&s>0);var o=0;do{++r,o=10*o+a-et,a=n.charCodeAt(r)}while(On(a)&&o>0);if(s<o)return-1;if(s>o)return 1}else{if(i<a)return-1;if(i>a)return 1;++t,++r}}return e.length-n.length}var et=48,Gi=57;function On(e){return!isNaN(e)&&et<=e&&e<=Gi}function Be(e,n){for(var t=Object.create(null),r=new Ki(e),i=Math.floor(.4*e.length)+1,a=0;a<n.length;a++){var s=n[a],o=r.measure(s,i);void 0!==o&&(t[s]=o)}return Object.keys(t).sort(function(u,c){var l=t[u]-t[c];return 0!==l?l:Vt(u,c)})}var Ki=function(){function e(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=Ut(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)]}return e.prototype.measure=function(r,i){if(this._input===r)return 0;var a=r.toLowerCase();if(this._inputLowerCase===a)return 1;var s=Ut(a),o=this._inputArray;if(s.length<o.length){var u=s;s=o,o=u}var c=s.length,l=o.length;if(!(c-l>i)){for(var p=this._rows,v=0;v<=l;v++)p[0][v]=v;for(var h=1;h<=c;h++){for(var m=p[(h-1)%3],T=p[h%3],N=T[0]=h,O=1;O<=l;O++){var R=Math.min(m[O]+1,T[O-1]+1,m[O-1]+(s[h-1]===o[O-1]?0:1));h>1&&O>1&&s[h-1]===o[O-2]&&s[h-2]===o[O-1]&&(R=Math.min(R,p[(h-2)%3][O-2]+1)),R<N&&(N=R),T[O]=R}if(N>i)return}var G=p[c%3][l];return G<=i?G:void 0}},e}();function Ut(e){for(var n=e.length,t=new Array(n),r=0;r<n;++r)t[r]=e.charCodeAt(r);return t}const on=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},bn=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function X(e){return Rt(e,{leave:qi})}var qi={Name:function(n){return n.value},Variable:function(n){return"$"+n.name},Document:function(n){return I(n.definitions,"\n\n")+"\n"},OperationDefinition:function(n){var t=n.operation,r=n.name,i=Y("(",I(n.variableDefinitions,", "),")"),a=I(n.directives," "),s=n.selectionSet;return r||a||i||"query"!==t?I([t,I([r,i]),a,s]," "):s},VariableDefinition:function(n){var a=n.directives;return n.variable+": "+n.type+Y(" = ",n.defaultValue)+Y(" ",I(a," "))},SelectionSet:function(n){return me(n.selections)},Field:function(n){var r=n.name,i=n.arguments,a=n.directives,s=n.selectionSet,o=Y("",n.alias,": ")+r,u=o+Y("(",I(i,", "),")");return u.length>80&&(u=o+Y("(\n",Sn(I(i,"\n")),"\n)")),I([u,I(a," "),s]," ")},Argument:function(n){return n.name+": "+n.value},FragmentSpread:function(n){return"..."+n.name+Y(" ",I(n.directives," "))},InlineFragment:function(n){var r=n.directives,i=n.selectionSet;return I(["...",Y("on ",n.typeCondition),I(r," "),i]," ")},FragmentDefinition:function(n){var r=n.typeCondition,i=n.variableDefinitions,a=n.directives,s=n.selectionSet;return"fragment ".concat(n.name).concat(Y("(",I(i,", "),")")," ")+"on ".concat(r," ").concat(Y("",I(a," ")," "))+s},IntValue:function(n){return n.value},FloatValue:function(n){return n.value},StringValue:function(n,t){var r=n.value;return n.block?function Ii(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),o=!r||'"'===e[e.length-1]||"\\"===e[e.length-1]||t,u="";return o&&!(r&&(" "===e[0]||"\t"===e[0]))&&(u+="\n"+n),u+=n?e.replace(/\n/g,"\n"+n):e,o&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(n){return n.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(n){return n.value},ListValue:function(n){return"["+I(n.values,", ")+"]"},ObjectValue:function(n){return"{"+I(n.fields,", ")+"}"},ObjectField:function(n){return n.name+": "+n.value},Directive:function(n){return"@"+n.name+Y("(",I(n.arguments,", "),")")},NamedType:function(n){return n.name},ListType:function(n){return"["+n.type+"]"},NonNullType:function(n){return n.type+"!"},SchemaDefinition:he(function(e){var t=e.operationTypes;return I(["schema",I(e.directives," "),me(t)]," ")}),OperationTypeDefinition:function(n){return n.operation+": "+n.type},ScalarTypeDefinition:he(function(e){return I(["scalar",e.name,I(e.directives," ")]," ")}),ObjectTypeDefinition:he(function(e){var r=e.directives,i=e.fields;return I(["type",e.name,Y("implements ",I(e.interfaces," & ")),I(r," "),me(i)]," ")}),FieldDefinition:he(function(e){var t=e.arguments,r=e.type,i=e.directives;return e.name+(jt(t)?Y("(\n",Sn(I(t,"\n")),"\n)"):Y("(",I(t,", "),")"))+": "+r+Y(" ",I(i," "))}),InputValueDefinition:he(function(e){var i=e.directives;return I([e.name+": "+e.type,Y("= ",e.defaultValue),I(i," ")]," ")}),InterfaceTypeDefinition:he(function(e){var r=e.directives,i=e.fields;return I(["interface",e.name,Y("implements ",I(e.interfaces," & ")),I(r," "),me(i)]," ")}),UnionTypeDefinition:he(function(e){var r=e.types;return I(["union",e.name,I(e.directives," "),r&&0!==r.length?"= "+I(r," | "):""]," ")}),EnumTypeDefinition:he(function(e){var r=e.values;return I(["enum",e.name,I(e.directives," "),me(r)]," ")}),EnumValueDefinition:he(function(e){return I([e.name,I(e.directives," ")]," ")}),InputObjectTypeDefinition:he(function(e){var r=e.fields;return I(["input",e.name,I(e.directives," "),me(r)]," ")}),DirectiveDefinition:he(function(e){var t=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+e.name+(jt(t)?Y("(\n",Sn(I(t,"\n")),"\n)"):Y("(",I(t,", "),")"))+(r?" repeatable":"")+" on "+I(i," | ")}),SchemaExtension:function(n){var r=n.operationTypes;return I(["extend schema",I(n.directives," "),me(r)]," ")},ScalarTypeExtension:function(n){return I(["extend scalar",n.name,I(n.directives," ")]," ")},ObjectTypeExtension:function(n){var i=n.directives,a=n.fields;return I(["extend type",n.name,Y("implements ",I(n.interfaces," & ")),I(i," "),me(a)]," ")},InterfaceTypeExtension:function(n){var i=n.directives,a=n.fields;return I(["extend interface",n.name,Y("implements ",I(n.interfaces," & ")),I(i," "),me(a)]," ")},UnionTypeExtension:function(n){var i=n.types;return I(["extend union",n.name,I(n.directives," "),i&&0!==i.length?"= "+I(i," | "):""]," ")},EnumTypeExtension:function(n){var i=n.values;return I(["extend enum",n.name,I(n.directives," "),me(i)]," ")},InputObjectTypeExtension:function(n){var i=n.fields;return I(["extend input",n.name,I(n.directives," "),me(i)]," ")}};function he(e){return function(n){return I([n.description,e(n)],"\n")}}function I(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(n=e?.filter(function(r){return r}).join(t))&&void 0!==n?n:""}function me(e){return Y("{\n",Sn(I(e,"\n")),"\n}")}function Y(e,n){return null!=n&&""!==n?e+n+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function Sn(e){return Y(" ",e.replace(/\n/g,"\n "))}function Xi(e){return-1!==e.indexOf("\n")}function jt(e){return null!=e&&e.some(Xi)}const Xe=Object.entries||function(e){return Object.keys(e).map(function(n){return[n,e[n]]})};function Oe(e,n){return e.reduce(function(t,r){return t[n(r)]=r,t},Object.create(null))}function be(e,n){for(var t=Object.create(null),r=0,i=Xe(e);r<i.length;r++){var a=i[r],s=a[0];t[s]=n(a[1],s)}return t}function se(e){if(null===Object.getPrototypeOf(e))return e;for(var n=Object.create(null),t=0,r=Xe(e);t<r.length;t++){var i=r[t];n[i[0]]=i[1]}return n}function nt(e,n,t){return e.reduce(function(r,i){return r[n(i)]=t(i),r},Object.create(null))}function Bt(e){return e}function tt(e,n){switch(e.kind){case f.NULL:return null;case f.INT:return parseInt(e.value,10);case f.FLOAT:return parseFloat(e.value);case f.STRING:case f.ENUM:case f.BOOLEAN:return e.value;case f.LIST:return e.values.map(function(t){return tt(t,n)});case f.OBJECT:return nt(e.fields,function(t){return t.name.value},function(t){return tt(t.value,n)});case f.VARIABLE:return n?.[e.name.value]}ue(0,"Unexpected value node: "+D(e))}function Gt(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ze(e,n,t){return n&&Gt(e.prototype,n),t&&Gt(e,t),e}function rt(e){return Se(e)||Z(e)||q(e)||ce(e)||le(e)||re(e)||ie(e)||B(e)}function Se(e){return ge(e,Ae)}function Z(e){return ge(e,fe)}function q(e){return ge