altair-static 4.0.9 → 4.2.0

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 (88) hide show
  1. package/build/dist/108.js +1 -0
  2. package/build/dist/283.js +1 -0
  3. package/build/dist/379.js +1 -0
  4. package/build/dist/3rdpartylicenses.txt +52 -156
  5. package/build/dist/471.js +1 -0
  6. package/build/dist/527.js +1 -0
  7. package/build/dist/604.js +1 -0
  8. package/build/dist/672.js +1 -0
  9. package/build/dist/709.js +1 -0
  10. package/build/dist/729.js +1 -0
  11. package/build/dist/747.js +1 -0
  12. package/build/dist/790.js +1 -0
  13. package/build/dist/794.js +1 -0
  14. package/build/dist/866.js +1 -0
  15. package/build/dist/873.js +1 -0
  16. package/build/dist/934.js +1 -0
  17. package/build/dist/assets/i18n/ach-UG.json +157 -153
  18. package/build/dist/assets/i18n/cs-CZ.json +4 -0
  19. package/build/dist/assets/i18n/da-DK.json +4 -0
  20. package/build/dist/assets/i18n/de-DE.json +4 -0
  21. package/build/dist/assets/i18n/default.json +4 -0
  22. package/build/dist/assets/i18n/en-US.json +4 -0
  23. package/build/dist/assets/i18n/es-ES.json +4 -0
  24. package/build/dist/assets/i18n/fi-FI.json +4 -0
  25. package/build/dist/assets/i18n/fr-FR.json +4 -0
  26. package/build/dist/assets/i18n/hu-HU.json +4 -0
  27. package/build/dist/assets/i18n/it-IT.json +4 -0
  28. package/build/dist/assets/i18n/ja-JP.json +4 -0
  29. package/build/dist/assets/i18n/ko-KR.json +4 -0
  30. package/build/dist/assets/i18n/nl-NL.json +4 -0
  31. package/build/dist/assets/i18n/no-NO.json +4 -0
  32. package/build/dist/assets/i18n/pl-PL.json +4 -0
  33. package/build/dist/assets/i18n/pt-BR.json +4 -0
  34. package/build/dist/assets/i18n/pt-PT.json +4 -0
  35. package/build/dist/assets/i18n/ro-RO.json +4 -0
  36. package/build/dist/assets/i18n/ru-RU.json +30 -26
  37. package/build/dist/assets/i18n/sr-SP.json +4 -0
  38. package/build/dist/assets/i18n/sv-SE.json +4 -0
  39. package/build/dist/assets/i18n/tr-TR.json +4 -0
  40. package/build/dist/assets/i18n/uk-UA.json +4 -0
  41. package/build/dist/assets/i18n/vi-VN.json +4 -0
  42. package/build/dist/assets/i18n/zh-CN.json +12 -8
  43. package/build/dist/assets/i18n/zh-TW.json +4 -0
  44. package/build/dist/index.html +3 -3
  45. package/build/dist/main.js +1 -0
  46. package/build/dist/polyfills.js +1 -0
  47. package/build/dist/runtime.js +1 -0
  48. package/build/dist/styles.css +2 -2
  49. package/build/index.js +21 -28
  50. package/build/index.js.map +1 -1
  51. package/build/index.test.js +23 -13
  52. package/build/index.test.js.map +1 -1
  53. package/build/utils/get-altair-html.js +3 -3
  54. package/build/utils/get-altair-html.js.map +1 -1
  55. package/build/utils/get-dist.js +2 -2
  56. package/build/utils/get-dist.js.map +1 -1
  57. package/package.json +4 -4
  58. package/tsconfig.json +1 -1
  59. package/build/dist/0-es2018.worker.js +0 -1
  60. package/build/dist/0-es5.worker.js +0 -1
  61. package/build/dist/1-es2018.js +0 -1
  62. package/build/dist/1-es5.js +0 -1
  63. package/build/dist/10-es2018.js +0 -1
  64. package/build/dist/10-es5.js +0 -1
  65. package/build/dist/11-es2018.js +0 -1
  66. package/build/dist/11-es5.js +0 -1
  67. package/build/dist/12-es2018.js +0 -1
  68. package/build/dist/12-es5.js +0 -1
  69. package/build/dist/13-es2018.js +0 -1
  70. package/build/dist/13-es5.js +0 -1
  71. package/build/dist/14-es2018.js +0 -1
  72. package/build/dist/14-es5.js +0 -1
  73. package/build/dist/15-es2018.js +0 -1
  74. package/build/dist/15-es5.js +0 -1
  75. package/build/dist/2-es2018.js +0 -1
  76. package/build/dist/2-es5.js +0 -1
  77. package/build/dist/7-es2018.js +0 -1
  78. package/build/dist/7-es5.js +0 -1
  79. package/build/dist/8-es2018.js +0 -1
  80. package/build/dist/8-es5.js +0 -1
  81. package/build/dist/9-es2018.js +0 -1
  82. package/build/dist/9-es5.js +0 -1
  83. package/build/dist/main-es2018.js +0 -1
  84. package/build/dist/main-es5.js +0 -1
  85. package/build/dist/polyfills-es2018.js +0 -1
  86. package/build/dist/polyfills-es5.js +0 -1
  87. package/build/dist/runtime-es2018.js +0 -1
  88. package/build/dist/runtime-es5.js +0 -1
@@ -1 +0,0 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,(function(t){return e[t]}).bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="ZGvS")}({ZGvS:function(e,t,n){"use strict";n.r(t);const r=Symbol("Comlink.proxy"),i=Symbol("Comlink.endpoint"),a=Symbol("Comlink.releaseProxy"),o=Symbol("Comlink.thrown"),s=e=>"object"==typeof e&&null!==e||"function"==typeof e,c=new Map([["proxy",{canHandle:e=>s(e)&&e[r],serialize(e){const{port1:t,port2:n}=new MessageChannel;return u(e,t),[n,[n]]},deserialize:e=>(e.start(),f(e,[],void 0))}],["throw",{canHandle:e=>s(e)&&o in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function u(e,t=self){t.addEventListener("message",function n(i){if(!i||!i.data)return;const{id:a,type:s,path:c}=Object.assign({path:[]},i.data),p=(i.data.argumentList||[]).map(y);let f;try{const t=c.slice(0,-1).reduce((e,t)=>e[t],e),n=c.reduce((e,t)=>e[t],e);switch(s){case 0:f=n;break;case 1:t[c.slice(-1)[0]]=y(i.data.value),f=!0;break;case 2:f=n.apply(t,p);break;case 3:f=function(e){return Object.assign(e,{[r]:!0})}(new n(...p));break;case 4:{const{port1:t,port2:n}=new MessageChannel;u(e,n),f=function(e,t){return h.set(e,t),e}(t,[t])}break;case 5:f=void 0}}catch(d){f={value:d,[o]:0}}Promise.resolve(f).catch(e=>({value:e,[o]:0})).then(e=>{const[r,i]=v(e);t.postMessage(Object.assign(Object.assign({},r),{id:a}),i),5===s&&(t.removeEventListener("message",n),l(t))})}),t.start&&t.start()}function l(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function p(e){if(e)throw new Error("Proxy has been released and is not useable")}function f(e,t=[],n=function(){}){let r=!1;const o=new Proxy(n,{get(n,i){if(p(r),i===a)return()=>m(e,{type:5,path:t.map(e=>e.toString())}).then(()=>{l(e),r=!0});if("then"===i){if(0===t.length)return{then:()=>o};const n=m(e,{type:0,path:t.map(e=>e.toString())}).then(y);return n.then.bind(n)}return f(e,[...t,i])},set(n,i,a){p(r);const[o,s]=v(a);return m(e,{type:1,path:[...t,i].map(e=>e.toString()),value:o},s).then(y)},apply(n,a,o){p(r);const s=t[t.length-1];if(s===i)return m(e,{type:4}).then(y);if("bind"===s)return f(e,t.slice(0,-1));const[c,u]=d(o);return m(e,{type:2,path:t.map(e=>e.toString()),argumentList:c},u).then(y)},construct(n,i){p(r);const[a,o]=d(i);return m(e,{type:3,path:t.map(e=>e.toString()),argumentList:a},o).then(y)}});return o}function d(e){const t=e.map(v);return[t.map(e=>e[0]),(n=t.map(e=>e[1]),Array.prototype.concat.apply([],n))];var n}const h=new WeakMap;function v(e){for(const[t,n]of c)if(n.canHandle(e)){const[r,i]=n.serialize(e);return[{type:3,name:t,value:r},i]}return[{type:0,value:e},h.get(e)||[]]}function y(e){switch(e.type){case 3:return c.get(e.name).deserialize(e.value);case 0:return e.value}}function m(e,t,n){return new Promise(r=>{const i=new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");e.addEventListener("message",function t(n){n.data&&n.data.id&&n.data.id===i&&(e.removeEventListener("message",t),r(n.data))}),e.start&&e.start(),e.postMessage(Object.assign({id:i},t),n)})}function g(e){return Array.isArray?Array.isArray(e):"[object Array]"===O(e)}function E(e){return"string"==typeof e}function T(e){return"number"==typeof e}function N(e){return"object"==typeof e}function I(e){return null!=e}function b(e){return!e.trim().length}function O(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const _=Object.prototype.hasOwnProperty;class S{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=A(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function A(e){let t=null,n=null,r=null,i=1;if(E(e)||g(e))r=e,t=w(e),n=x(e);else{if(!_.call(e,"name"))throw new Error("Missing name property in key");const a=e.name;if(r=a,_.call(e,"weight")&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(a));t=w(a),n=x(a)}return{path:t,id:n,weight:i,src:r}}function w(e){return g(e)?e:e.split(".")}function x(e){return g(e)?e.join("."):e}var D={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(e,t){let n=[],r=!1;const i=(e,t,a)=>{if(I(e))if(t[a]){const o=e[t[a]];if(!I(o))return;if(a===t.length-1&&(E(o)||T(o)||function(e){return!0===e||!1===e||function(e){return N(e)&&null!==e}(e)&&"[object Boolean]"==O(e)}(o)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(o));else if(g(o)){r=!0;for(let e=0,n=o.length;e<n;e+=1)i(o[e],t,a+1)}else t.length&&i(o,t,a+1)}else n.push(e)};return i(e,E(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1};const k=/[^ ]+/g;class L{constructor({getFn:e=D.getFn}={}){this.norm=function(e=3){const t=new Map,n=Math.pow(10,e);return{get(e){const r=e.match(k).length;if(t.has(r))return t.get(r);const i=1/Math.sqrt(r),a=parseFloat(Math.round(i*n)/n);return t.set(r,a),a},clear(){t.clear()}}}(3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,E(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();E(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!I(e)||b(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=this.getFn(e,t.path);if(I(i))if(g(i)){let e=[];const t=[{nestedArrIndex:-1,value:i}];for(;t.length;){const{nestedArrIndex:n,value:r}=t.pop();if(I(r))if(E(r)&&!b(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else g(r)&&r.forEach((e,n)=>{t.push({nestedArrIndex:n,value:e})})}n.$[r]=e}else if(!b(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function F(e,t,{getFn:n=D.getFn}={}){const r=new L({getFn:n});return r.setKeys(e.map(A)),r.setSources(t),r.create(),r}function R(e,{getFn:t=D.getFn}={}){const{keys:n,records:r}=e,i=new L({getFn:t});return i.setKeys(n),i.setIndexRecords(r),i}function C(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=D.distance,ignoreLocation:a=D.ignoreLocation}={}){const o=t/e.length;if(a)return o;const s=Math.abs(r-n);return i?o+s/i:s?1:o}function M(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}class j{constructor(e,{location:t=D.location,threshold:n=D.threshold,distance:r=D.distance,includeMatches:i=D.includeMatches,findAllMatches:a=D.findAllMatches,minMatchCharLength:o=D.minMatchCharLength,isCaseSensitive:s=D.isCaseSensitive,ignoreLocation:c=D.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreLocation:c},this.pattern=s?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const u=(e,t)=>{this.chunks.push({pattern:e,alphabet:M(e),startIndex:t})},l=this.pattern.length;if(l>32){let e=0;const t=l%32,n=l-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){const e=l-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:n}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}const{location:r,distance:i,threshold:a,findAllMatches:o,minMatchCharLength:s,ignoreLocation:c}=this.options;let u=[],l=0,p=!1;this.chunks.forEach(({pattern:t,alphabet:f,startIndex:d})=>{const{isMatch:h,score:v,indices:y}=function(e,t,n,{location:r=D.location,distance:i=D.distance,threshold:a=D.threshold,findAllMatches:o=D.findAllMatches,minMatchCharLength:s=D.minMatchCharLength,includeMatches:c=D.includeMatches,ignoreLocation:u=D.ignoreLocation}={}){if(t.length>32)throw new Error("Pattern length exceeds max of 32.");const l=t.length,p=e.length,f=Math.max(0,Math.min(r,p));let d=a,h=f;const v=s>1||c,y=v?Array(p):[];let m;for(;(m=e.indexOf(t,h))>-1;){let e=C(t,{currentLocation:m,expectedLocation:f,distance:i,ignoreLocation:u});if(d=Math.min(e,d),h=m+l,v){let e=0;for(;e<l;)y[m+e]=1,e+=1}}h=-1;let g=[],E=1,T=l+p;const N=1<<l-1;for(let b=0;b<l;b+=1){let r=0,a=T;for(;r<a;)C(t,{errors:b,currentLocation:f+a,expectedLocation:f,distance:i,ignoreLocation:u})<=d?r=a:T=a,a=Math.floor((T-r)/2+r);T=a;let s=Math.max(1,f-a+1),c=o?p:Math.min(f+a,p)+l,m=Array(c+2);m[c+1]=(1<<b)-1;for(let o=c;o>=s;o-=1){let r=o-1,a=n[e.charAt(r)];if(v&&(y[r]=+!!a),m[o]=(m[o+1]<<1|1)&a,b&&(m[o]|=(g[o+1]|g[o])<<1|1|g[o+1]),m[o]&N&&(E=C(t,{errors:b,currentLocation:r,expectedLocation:f,distance:i,ignoreLocation:u}),E<=d)){if(d=E,h=r,h<=f)break;s=Math.max(1,2*f-h)}}if(C(t,{errors:b+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:u})>d)break;g=m}const I={isMatch:h>=0,score:Math.max(.001,E)};if(v){const e=function(e=[],t=D.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&-1===r?r=a:o||-1===r||(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}(y,s);e.length?c&&(I.indices=e):I.isMatch=!1}return I}(e,t,f,{location:r+d,distance:i,threshold:a,findAllMatches:o,minMatchCharLength:s,includeMatches:n,ignoreLocation:c});h&&(p=!0),l+=v,h&&y&&(u=[...u,...y])});let f={isMatch:p,score:p?l/this.chunks.length:1};return p&&n&&(f.indices=u),f}}class P{constructor(e){this.pattern=e}static isMultiMatch(e){return U(e,this.multiRegex)}static isSingleMatch(e){return U(e,this.singleRegex)}search(){}}function U(e,t){const n=e.match(t);return n?n[1]:null}class V extends P{constructor(e,{location:t=D.location,threshold:n=D.threshold,distance:r=D.distance,includeMatches:i=D.includeMatches,findAllMatches:a=D.findAllMatches,minMatchCharLength:o=D.minMatchCharLength,isCaseSensitive:s=D.isCaseSensitive,ignoreLocation:c=D.ignoreLocation}={}){super(e),this._bitapSearch=new j(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class B extends P{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const r=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);const a=!!r.length;return{isMatch:a,score:a?0:1,indices:r}}}const Y=[class extends P{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},B,class extends P{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends P{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends P{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends P{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends P{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},V],G=Y.length,J=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/,K=new Set([V.type,B.type]),$=[];function q(e,t){for(let n=0,r=$.length;n<r;n+=1){let r=$[n];if(r.condition(e,t))return new r(e,t)}return new j(e,t)}const X=e=>!(!e.$and&&!e.$or),Q=e=>({$and:Object.keys(e).map(t=>({[t]:e[t]}))});function z(e,t,{auto:n=!0}={}){const r=e=>{let i=Object.keys(e);const a=(e=>!!e.$path)(e);if(!a&&i.length>1&&!X(e))return r(Q(e));if((e=>!g(e)&&N(e)&&!X(e))(e)){const r=a?e.$path:i[0],o=a?e.$val:e[r];if(!E(o))throw new Error((e=>`Invalid value for key ${e}`)(r));const s={keyId:x(r),pattern:o};return n&&(s.searcher=q(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{const n=e[t];g(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return X(e)||(e=Q(e)),r(e)}function H(e,t){const n=e.matches;t.matches=[],I(n)&&n.forEach(e=>{if(!I(e.indices)||!e.indices.length)return;const{indices:n,value:r}=e;let i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function W(e,t){t.score=e.score}let Z=(()=>{class e{constructor(e,t={},n){this.options={...D,...t},this._keyStore=new S(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof L))throw new Error("Incorrect 'index' type");this._myIndex=t||F(this.options.keys,this._docs,{getFn:this.options.getFn})}add(e){I(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let n=0,r=this._docs.length;n<r;n+=1){const i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:i,sortFn:a,ignoreFieldNorm:o}=this.options;let s=E(e)?E(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=D.ignoreFieldNorm}){e.forEach(e=>{let n=1;e.matches.forEach(({key:e,norm:r,score:i})=>{const a=e?e.weight:null;n*=Math.pow(0===i&&a?Number.EPSILON:i,(a||1)*(t?1:r))}),e.score=n})}(s,{ignoreFieldNorm:o}),i&&s.sort(a),T(t)&&t>-1&&(s=s.slice(0,t)),function(e,t,{includeMatches:n=D.includeMatches,includeScore:r=D.includeScore}={}){const i=[];return n&&i.push(H),r&&i.push(W),e.map(e=>{const{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}(s,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){const t=q(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:e,i:n,n:i})=>{if(!I(e))return;const{isMatch:a,score:o,indices:s}=t.searchIn(e);a&&r.push({item:e,idx:n,matches:[{score:o,value:e,norm:i,indices:s}]})}),r}_searchLogical(e){const t=z(e,this.options),n=(e,t,r)=>{if(!e.children){const{keyId:n,searcher:i}=e,a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return a&&a.length?[{idx:r,item:t,matches:a}]:[]}switch(e.operator){case"$and":{const i=[];for(let a=0,o=e.children.length;a<o;a+=1){const o=n(e.children[a],t,r);if(!o.length)return[];i.push(...o)}return i}case"$or":{const i=[];for(let a=0,o=e.children.length;a<o;a+=1){const o=n(e.children[a],t,r);if(o.length){i.push(...o);break}}return i}}},r={},i=[];return this._myIndex.records.forEach(({$:e,i:a})=>{if(I(e)){let o=n(t,e,a);o.length&&(r[a]||(r[a]={idx:a,item:e,matches:[]},i.push(r[a])),o.forEach(({matches:e})=>{r[a].matches.push(...e)}))}}),i}_searchObjectList(e){const t=q(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:e,i:r})=>{if(!I(e))return;let a=[];n.forEach((n,r)=>{a.push(...this._findMatches({key:n,value:e[r],searcher:t}))}),a.length&&i.push({idx:r,item:e,matches:a})}),i}_findMatches({key:e,value:t,searcher:n}){if(!I(t))return[];let r=[];if(g(t))t.forEach(({v:t,i,n:a})=>{if(!I(t))return;const{isMatch:o,score:s,indices:c}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c})});else{const{v:i,n:a}=t,{isMatch:o,score:s,indices:c}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c})}return r}}return e.version="6.4.6",e.createIndex=F,e.parseIndex=R,e.config=D,e})();Z.parseQuery=z,function(...e){$.push(...e)}(class{constructor(e,{isCaseSensitive:t=D.isCaseSensitive,includeMatches:n=D.includeMatches,minMatchCharLength:r=D.minMatchCharLength,ignoreLocation:i=D.ignoreLocation,findAllMatches:a=D.findAllMatches,location:o=D.location,threshold:s=D.threshold,distance:c=D.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:n,minMatchCharLength:r,findAllMatches:a,ignoreLocation:i,location:o,threshold:s,distance:c},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map(e=>{let n=e.trim().split(J).filter(e=>e&&!!e.trim()),r=[];for(let i=0,a=n.length;i<a;i+=1){const e=n[i];let a=!1,o=-1;for(;!a&&++o<G;){const n=Y[o];let i=n.isMultiMatch(e);i&&(r.push(new n(i,t)),a=!0)}if(!a)for(o=-1;++o<G;){const n=Y[o];let i=n.isSingleMatch(e);if(i){r.push(new n(i,t));break}}}return r})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r}=this.options;e=r?e:e.toLowerCase();let i=0,a=[],o=0;for(let s=0,c=t.length;s<c;s+=1){const r=t[s];a.length=0,i=0;for(let t=0,s=r.length;t<s;t+=1){const s=r[t],{isMatch:c,indices:u,score:l}=s.search(e);if(!c){o=0,i=0,a.length=0;break}i+=1,o+=l,n&&(K.has(s.constructor.type)?a=[...a,...u]:a.push(u))}if(i){let e={isMatch:!0,score:o/i};return n&&(e.indices=a),e}}return{isMatch:!1,score:1}}});var ee=Z;function te(e,t){if(!Boolean(e))throw new Error(t)}var ne=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 re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ie(e){return"object"==re(e)&&null!==e}var ae="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 se(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,a=t+1;(n=r.exec(e.body))&&n.index<t;)i+=1,a=t+1-(n.index+n[0].length);return{line:i,column:a}}function ce(e,t){var n=e.locationOffset.column-1,r=le(n)+e.body,i=t.line-1,a=t.line+(e.locationOffset.line-1),o=t.column+(1===t.line?n:0),s="".concat(e.name,":").concat(a,":").concat(o,"\n"),c=r.split(/\r\n|[\n\r]/g),u=c[i];if(u.length>120){for(var l=Math.floor(o/80),p=o%80,f=[],d=0;d<u.length;d+=80)f.push(u.slice(d,d+80));return s+ue([["".concat(a),f[0]]].concat(f.slice(1,l+1).map(function(e){return["",e]}),[[" ",le(p-1)+"^"],["",f[l+1]]]))}return s+ue([["".concat(a-1),c[i-1]],["".concat(a),u],["",le(o-1)+"^"],["".concat(a+1),c[i+1]]])}function ue(e){var t=e.filter(function(e){return void 0!==e[1]}),n=Math.max.apply(Math,t.map(function(e){return e[0].length}));return t.map(function(e){var t,r=e[1];return le(n-(t=e[0]).length)+t+(r?" | "+r:" |")}).join("\n")}function le(e){return Array(e+1).join(" ")}function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fe(e,t){return!t||"object"!==pe(t)&&"function"!=typeof t?de(e):t}function de(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function he(e){var t="function"==typeof Map?new Map:void 0;return(he=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return ve(e,arguments,ge(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),me(n,e)})(e)}function ve(e,t,n){return(ve=ye()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&me(i,n.prototype),i}).apply(null,arguments)}function ye(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function me(e,t){return(me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&me(e,t)}(a,e);var t,n,r,i=(t=a,n=ye(),function(){var e,r=ge(t);if(n){var i=ge(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return fe(this,e)});function a(e,t,n,r,o,s,c){var u,l,p,f,d;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),d=i.call(this,e);var h,v=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,y=n;!y&&v&&(y=null===(h=v[0].loc)||void 0===h?void 0:h.source);var m,g=r;!g&&v&&(g=v.reduce(function(e,t){return t.loc&&e.push(t.loc.start),e},[])),g&&0===g.length&&(g=void 0),r&&n?m=r.map(function(e){return se(n,e)}):v&&(m=v.reduce(function(e,t){return t.loc&&e.push(se(t.loc.source,t.loc.start)),e},[]));var E=c;if(null==E&&null!=s){var T=s.extensions;ie(T)&&(E=T)}return Object.defineProperties(de(d),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(u=m)&&void 0!==u?u:void 0,enumerable:null!=m},path:{value:null!=o?o:void 0,enumerable:null!=o},nodes:{value:null!=v?v:void 0},source:{value:null!==(l=y)&&void 0!==l?l:void 0},positions:{value:null!==(p=g)&&void 0!==p?p:void 0},originalError:{value:s},extensions:{value:null!==(f=E)&&void 0!==f?f:void 0,enumerable:null!=E}}),null!=s&&s.stack?(Object.defineProperty(de(d),"stack",{value:s.stack,writable:!0,configurable:!0}),fe(d)):(Error.captureStackTrace?Error.captureStackTrace(de(d),a):Object.defineProperty(de(d),"stack",{value:Error().stack,writable:!0,configurable:!0}),d)}return(r=[{key:"toString",value:function(){return function(e){var t,n=e.message;if(e.nodes)for(var r=0,i=e.nodes;r<i.length;r++){var a=i[r];a.loc&&(n+="\n\n"+ce((t=a.loc).source,se(t.source,t.start)))}else if(e.source&&e.locations)for(var o=0,s=e.locations;o<s.length;o++)n+="\n\n"+ce(e.source,s[o]);return n}(this)}},{key:oe,get:function(){return"Object"}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,r),a}(he(Error));function Te(e,t,n){return new Ee("Syntax Error: ".concat(n),void 0,e,[t])}function Ne(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}var Ie="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function be(e){var t=e.prototype.toJSON;"function"==typeof t||Ne(0),e.prototype.inspect=t,Ie&&(e.prototype[Ie]=t)}var Oe=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();be(Oe);var _e=function(){function e(e,t,n,r,i,a,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=a,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function Se(e){return null!=e&&"string"==typeof e.kind}be(_e);var Ae=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 we(e){return(we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xe(e){return De(e,[])}function De(e,t){switch(we(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(Ie)];return"function"==typeof t?t:"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:De(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],a=0;a<n;++a)i.push(De(e[a],t));return 1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map(function(n){return n+": "+De(e[n],t)}).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}var ke=function(e,t){return e instanceof t};var Le=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||te(0,"Body must be a string. Received: ".concat(xe(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||te(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||te(0,"column in locationOffset is 1-indexed and must be positive.")}var t;return(t=[{key:oe,get:function(){return"Source"}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),Fe=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 Re(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,i=0,a=null,o=0;o<e.length;++o)switch(e.charCodeAt(o)){case 13:10===e.charCodeAt(o+1)&&++o;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===a||i<a)&&(a=i),r=!1}return null!==(t=a)&&void 0!==t?t:0}(e);if(0!==n)for(var r=1;r<t.length;r++)t[r]=t[r].slice(n);for(var i=0;i<t.length&&Ce(t[i]);)++i;for(var a=t.length;a>i&&Ce(t[a-1]);)--a;return t.slice(i,a).join("\n")}function Ce(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}var Me=function(){function e(e){var t=new _e(Ae.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==Ae.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=Pe(this,e)}while(e.kind===Ae.COMMENT);return e},e}();function je(e){return isNaN(e)?Ae.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function Pe(e,t){for(var n=e.source,r=n.body,i=r.length,a=t.end;a<i;){var o=r.charCodeAt(a),s=e.line,c=1+a-e.lineStart;switch(o){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 _e(Ae.BANG,a,a+1,s,c,t);case 35:return Ve(n,a,s,c,t);case 36:return new _e(Ae.DOLLAR,a,a+1,s,c,t);case 38:return new _e(Ae.AMP,a,a+1,s,c,t);case 40:return new _e(Ae.PAREN_L,a,a+1,s,c,t);case 41:return new _e(Ae.PAREN_R,a,a+1,s,c,t);case 46:if(46===r.charCodeAt(a+1)&&46===r.charCodeAt(a+2))return new _e(Ae.SPREAD,a,a+3,s,c,t);break;case 58:return new _e(Ae.COLON,a,a+1,s,c,t);case 61:return new _e(Ae.EQUALS,a,a+1,s,c,t);case 64:return new _e(Ae.AT,a,a+1,s,c,t);case 91:return new _e(Ae.BRACKET_L,a,a+1,s,c,t);case 93:return new _e(Ae.BRACKET_R,a,a+1,s,c,t);case 123:return new _e(Ae.BRACE_L,a,a+1,s,c,t);case 124:return new _e(Ae.PIPE,a,a+1,s,c,t);case 125:return new _e(Ae.BRACE_R,a,a+1,s,c,t);case 34:return 34===r.charCodeAt(a+1)&&34===r.charCodeAt(a+2)?Je(n,a,s,c,t,e):Ge(n,a,s,c,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Be(n,a,o,s,c,t);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 $e(n,a,s,c,t)}throw Te(n,a,Ue(o))}return new _e(Ae.EOF,i,i,e.line,1+a-e.lineStart,t)}function Ue(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 Ve(e,t,n,r,i){var a,o=e.body,s=t;do{a=o.charCodeAt(++s)}while(!isNaN(a)&&(a>31||9===a));return new _e(Ae.COMMENT,t,s,n,r,i,o.slice(t+1,s))}function Be(e,t,n,r,i,a){var o=e.body,s=n,c=t,u=!1;if(45===s&&(s=o.charCodeAt(++c)),48===s){if((s=o.charCodeAt(++c))>=48&&s<=57)throw Te(e,c,"Invalid number, unexpected digit after 0: ".concat(je(s),"."))}else c=Ye(e,c,s),s=o.charCodeAt(c);if(46===s&&(u=!0,s=o.charCodeAt(++c),c=Ye(e,c,s),s=o.charCodeAt(c)),69!==s&&101!==s||(u=!0,43!==(s=o.charCodeAt(++c))&&45!==s||(s=o.charCodeAt(++c)),c=Ye(e,c,s),s=o.charCodeAt(c)),46===s||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(s))throw Te(e,c,"Invalid number, expected digit but got: ".concat(je(s),"."));return new _e(u?Ae.FLOAT:Ae.INT,t,c,r,i,a,o.slice(t,c))}function Ye(e,t,n){var r=e.body,i=t,a=n;if(a>=48&&a<=57){do{a=r.charCodeAt(++i)}while(a>=48&&a<=57);return i}throw Te(e,i,"Invalid number, expected digit but got: ".concat(je(a),"."))}function Ge(e,t,n,r,i){for(var a,o,s,c,u=e.body,l=t+1,p=l,f=0,d="";l<u.length&&!isNaN(f=u.charCodeAt(l))&&10!==f&&13!==f;){if(34===f)return d+=u.slice(p,l),new _e(Ae.STRING,t,l+1,n,r,i,d);if(f<32&&9!==f)throw Te(e,l,"Invalid character within String: ".concat(je(f),"."));if(++l,92===f){switch(d+=u.slice(p,l-1),f=u.charCodeAt(l)){case 34:d+='"';break;case 47:d+="/";break;case 92:d+="\\";break;case 98:d+="\b";break;case 102:d+="\f";break;case 110:d+="\n";break;case 114:d+="\r";break;case 116:d+="\t";break;case 117:var h=(a=u.charCodeAt(l+1),o=u.charCodeAt(l+2),s=u.charCodeAt(l+3),c=u.charCodeAt(l+4),Ke(a)<<12|Ke(o)<<8|Ke(s)<<4|Ke(c));if(h<0){var v=u.slice(l+1,l+5);throw Te(e,l,"Invalid character escape sequence: \\u".concat(v,"."))}d+=String.fromCharCode(h),l+=4;break;default:throw Te(e,l,"Invalid character escape sequence: \\".concat(String.fromCharCode(f),"."))}p=++l}}throw Te(e,l,"Unterminated string.")}function Je(e,t,n,r,i,a){for(var o=e.body,s=t+3,c=s,u=0,l="";s<o.length&&!isNaN(u=o.charCodeAt(s));){if(34===u&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2))return l+=o.slice(c,s),new _e(Ae.BLOCK_STRING,t,s+3,n,r,i,Re(l));if(u<32&&9!==u&&10!==u&&13!==u)throw Te(e,s,"Invalid character within String: ".concat(je(u),"."));10===u?(++s,++a.line,a.lineStart=s):13===u?(10===o.charCodeAt(s+1)?s+=2:++s,++a.line,a.lineStart=s):92===u&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2)&&34===o.charCodeAt(s+3)?(l+=o.slice(c,s)+'"""',c=s+=4):++s}throw Te(e,s,"Unterminated string.")}function Ke(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function $e(e,t,n,r,i){for(var a=e.body,o=a.length,s=t+1,c=0;s!==o&&!isNaN(c=a.charCodeAt(s))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++s;return new _e(Ae.NAME,t,s,n,r,i,a.slice(t,s))}var qe=function(){function e(e,t){var n=function(e){return ke(e,Le)}(e)?e:new Le(e);this._lexer=new Me(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(Ae.NAME);return{kind:ne.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:ne.DOCUMENT,definitions:this.many(Ae.SOF,this.parseDefinition,Ae.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(Ae.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(Ae.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(Ae.BRACE_L))return{kind:ne.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(Ae.NAME)&&(t=this.parseName()),{kind:ne.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(Ae.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(Ae.PAREN_L,this.parseVariableDefinition,Ae.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:ne.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Ae.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ae.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(Ae.DOLLAR),{kind:ne.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:ne.SELECTION_SET,selections:this.many(Ae.BRACE_L,this.parseSelection,Ae.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(Ae.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(Ae.COLON)?(e=r,t=this.parseName()):t=r,{kind:ne.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Ae.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){return this.optionalMany(Ae.PAREN_L,e?this.parseConstArgument:this.parseArgument,Ae.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(Ae.COLON),{kind:ne.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:ne.ARGUMENT,name:this.parseName(),value:(this.expectToken(Ae.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(Ae.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(Ae.NAME)?{kind:ne.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:ne.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:ne.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:ne.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case Ae.BRACKET_L:return this.parseList(e);case Ae.BRACE_L:return this.parseObject(e);case Ae.INT:return this._lexer.advance(),{kind:ne.INT,value:t.value,loc:this.loc(t)};case Ae.FLOAT:return this._lexer.advance(),{kind:ne.FLOAT,value:t.value,loc:this.loc(t)};case Ae.STRING:case Ae.BLOCK_STRING:return this.parseStringLiteral();case Ae.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:ne.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:ne.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:ne.NULL,loc:this.loc(t)};default:return{kind:ne.ENUM,value:t.value,loc:this.loc(t)}}case Ae.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:ne.STRING,value:e.value,block:e.kind===Ae.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:ne.LIST,values:this.any(Ae.BRACKET_L,function(){return t.parseValueLiteral(e)},Ae.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:ne.OBJECT,fields:this.any(Ae.BRACE_L,function(){return t.parseObjectField(e)},Ae.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(Ae.COLON),{kind:ne.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(Ae.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(Ae.AT),{kind:ne.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(Ae.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(Ae.BRACKET_R),e={kind:ne.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(Ae.BANG)?{kind:ne.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:ne.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===Ae.NAME)switch(e.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(e)},t.peekDescription=function(){return this.peek(Ae.STRING)||this.peek(Ae.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(Ae.BRACE_L,this.parseOperationTypeDefinition,Ae.BRACE_R);return{kind:ne.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(Ae.COLON);var n=this.parseNamedType();return{kind:ne.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:ne.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:ne.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(Ae.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(Ae.AMP)||this.peek(Ae.NAME));return t}return this.delimitedMany(Ae.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(Ae.BRACE_L)&&this._lexer.lookahead().kind===Ae.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(Ae.BRACE_L,this.parseFieldDefinition,Ae.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Ae.COLON);var i=this.parseTypeReference(),a=this.parseDirectives(!0);return{kind:ne.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:a,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(Ae.PAREN_L,this.parseInputValueDef,Ae.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(Ae.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(Ae.EQUALS)&&(r=this.parseValueLiteral(!0));var a=this.parseDirectives(!0);return{kind:ne.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:a,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:ne.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:ne.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(Ae.EQUALS)?this.delimitedMany(Ae.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:ne.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(Ae.BRACE_L,this.parseEnumValueDefinition,Ae.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:ne.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:ne.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(Ae.BRACE_L,this.parseInputValueDef,Ae.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===Ae.NAME)switch(e.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(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(Ae.BRACE_L,this.parseOperationTypeDefinition,Ae.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:ne.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:ne.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:ne.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:ne.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:ne.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:ne.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:ne.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Ae.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var a=this.parseDirectiveLocations();return{kind:ne.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:a,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(Ae.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==Fe[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new Oe(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw Te(this._lexer.source,t.start,"Expected ".concat(Qe(e),", found ").concat(Xe(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==Ae.NAME||t.value!==e)throw Te(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(Xe(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===Ae.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return Te(this._lexer.source,t.start,"Unexpected ".concat(Xe(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function Xe(e){var t=e.value;return Qe(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function Qe(e){return function(e){return e===Ae.BANG||e===Ae.DOLLAR||e===Ae.AMP||e===Ae.PAREN_L||e===Ae.PAREN_R||e===Ae.SPREAD||e===Ae.COLON||e===Ae.EQUALS||e===Ae.AT||e===Ae.BRACKET_L||e===Ae.BRACKET_R||e===Ae.BRACE_L||e===Ae.PIPE||e===Ae.BRACE_R}(e)?'"'.concat(e,'"'):e}var ze={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"]},He=Object.freeze({});function We(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ze,r=void 0,i=Array.isArray(e),a=[e],o=-1,s=[],c=void 0,u=void 0,l=void 0,p=[],f=[],d=e;do{var h=++o===a.length,v=h&&0!==s.length;if(h){if(u=0===f.length?void 0:p[p.length-1],c=l,l=f.pop(),v){if(i)c=c.slice();else{for(var y={},m=0,g=Object.keys(c);m<g.length;m++){var E=g[m];y[E]=c[E]}c=y}for(var T=0,N=0;N<s.length;N++){var I=s[N][0],b=s[N][1];i&&(I-=T),i&&null===b?(c.splice(I,1),T++):c[I]=b}}o=r.index,a=r.keys,s=r.edits,i=r.inArray,r=r.prev}else{if(u=l?i?o:a[o]:void 0,null==(c=l?l[u]:d))continue;l&&p.push(u)}var O,_=void 0;if(!Array.isArray(c)){if(!Se(c))throw new Error("Invalid AST Node: ".concat(xe(c),"."));var S=et(t,c.kind,h);if(S){if((_=S.call(t,c,u,l,p,f))===He)break;if(!1===_){if(!h){p.pop();continue}}else if(void 0!==_&&(s.push([u,_]),!h)){if(!Se(_)){p.pop();continue}c=_}}}void 0===_&&v&&s.push([u,c]),h?p.pop():(r={inArray:i,index:o,keys:a,edits:s,prev:r},a=(i=Array.isArray(c))?c:null!==(O=n[c.kind])&&void 0!==O?O:[],o=-1,s=[],l&&f.push(l),l=c)}while(void 0!==r);return 0!==s.length&&(d=s[s.length-1][1]),d}function Ze(e){var t=new Array(e.length);return{enter:function(n){for(var r=0;r<e.length;r++)if(null==t[r]){var i=et(e[r],n.kind,!1);if(i){var a=i.apply(e[r],arguments);if(!1===a)t[r]=n;else if(a===He)t[r]=He;else if(void 0!==a)return a}}},leave:function(n){for(var r=0;r<e.length;r++)if(null==t[r]){var i=et(e[r],n.kind,!0);if(i){var a=i.apply(e[r],arguments);if(a===He)t[r]=He;else if(void 0!==a&&!1!==a)return a}}else t[r]===n&&(t[r]=null)}}}function et(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var a=n?e.leave:e.enter;if(a){if("function"==typeof a)return a;var o=a[t];if("function"==typeof o)return o}}}var tt=Array.prototype.find?function(e,t){return Array.prototype.find.call(e,t)}:function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(t(r))return r}},nt=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},rt=Object.entries||function(e){return Object.keys(e).map(function(t){return[t,e[t]]})};function it(e,t){return e.reduce(function(e,n){return e[t(n)]=n,e},Object.create(null))}function at(e,t){for(var n=Object.create(null),r=0,i=rt(e);r<i.length;r++){var a=i[r],o=a[0];n[o]=t(a[1],o)}return n}function ot(e){if(null===Object.getPrototypeOf(e))return e;for(var t=Object.create(null),n=0,r=rt(e);n<r.length;n++){var i=r[n];t[i[0]]=i[1]}return t}function st(e,t,n){return e.reduce(function(e,r){return e[t(r)]=n(r),e},Object.create(null))}function ct(e,t){var n="string"==typeof e?[e,t]:[void 0,e],r=n[0],i=" Did you mean ";r&&(i+=r+" ");var a=n[1].map(function(e){return'"'.concat(e,'"')});switch(a.length){case 0:return"";case 1:return i+a[0]+"?";case 2:return i+a[0]+" or "+a[1]+"?"}var o=a.slice(0,5),s=o.pop();return i+o.join(", ")+", or "+s+"?"}function ut(e){return e}function lt(e,t){for(var n=0,r=0;n<e.length&&r<t.length;){var i=e.charCodeAt(n),a=t.charCodeAt(r);if(ft(i)&&ft(a)){var o=0;do{++n,o=10*o+i-pt,i=e.charCodeAt(n)}while(ft(i)&&o>0);var s=0;do{++r,s=10*s+a-pt,a=t.charCodeAt(r)}while(ft(a)&&s>0);if(o<s)return-1;if(o>s)return 1}else{if(i<a)return-1;if(i>a)return 1;++n,++r}}return e.length-t.length}var pt=48;function ft(e){return!isNaN(e)&&pt<=e&&e<=57}function dt(e,t){for(var n=Object.create(null),r=new ht(e),i=Math.floor(.4*e.length)+1,a=0;a<t.length;a++){var o=t[a],s=r.measure(o,i);void 0!==s&&(n[o]=s)}return Object.keys(n).sort(function(e,t){var r=n[e]-n[t];return 0!==r?r:lt(e,t)})}var ht=function(){function e(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=vt(this._inputLowerCase),this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}return e.prototype.measure=function(e,t){if(this._input===e)return 0;var n=e.toLowerCase();if(this._inputLowerCase===n)return 1;var r=vt(n),i=this._inputArray;if(r.length<i.length){var a=r;r=i,i=a}var o=r.length,s=i.length;if(!(o-s>t)){for(var c=this._rows,u=0;u<=s;u++)c[0][u]=u;for(var l=1;l<=o;l++){for(var p=c[(l-1)%3],f=c[l%3],d=f[0]=l,h=1;h<=s;h++){var v=Math.min(p[h]+1,f[h-1]+1,p[h-1]+(r[l-1]===i[h-1]?0:1));l>1&&h>1&&r[l-1]===i[h-2]&&r[l-2]===i[h-1]&&(v=Math.min(v,c[(l-2)%3][h-2]+1)),v<d&&(d=v),f[h]=v}if(d>t)return}var y=c[o%3][s];return y<=t?y:void 0}},e}();function vt(e){for(var t=e.length,n=new Array(t),r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}function yt(e){return We(e,{leave:mt})}var mt={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return Et(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=Nt("(",Et(e.variableDefinitions,", "),")"),i=Et(e.directives," "),a=e.selectionSet;return n||i||r||"query"!==t?Et([t,Et([n,r]),i,a]," "):a},VariableDefinition:function(e){var t=e.directives;return e.variable+": "+e.type+Nt(" = ",e.defaultValue)+Nt(" ",Et(t," "))},SelectionSet:function(e){return Tt(e.selections)},Field:function(e){var t=e.name,n=e.arguments,r=e.directives,i=e.selectionSet,a=Nt("",e.alias,": ")+t,o=a+Nt("(",Et(n,", "),")");return o.length>80&&(o=a+Nt("(\n",It(Et(n,"\n")),"\n)")),Et([o,Et(r," "),i]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+Nt(" ",Et(e.directives," "))},InlineFragment:function(e){var t=e.directives,n=e.selectionSet;return Et(["...",Nt("on ",e.typeCondition),Et(t," "),n]," ")},FragmentDefinition:function(e){var t=e.typeCondition,n=e.variableDefinitions,r=e.directives,i=e.selectionSet;return"fragment ".concat(e.name).concat(Nt("(",Et(n,", "),")")," ")+"on ".concat(t," ").concat(Nt("",Et(r," ")," "))+i},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],a='"'===e[e.length-1],o="\\"===e[e.length-1],s=!r||a||o||n,c="";return!s||r&&i||(c+="\n"+t),c+=t?e.replace(/\n/g,"\n"+t):e,s&&(c+="\n"),'"""'+c.replace(/"""/g,'\\"""')+'"""'}(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+Et(e.values,", ")+"]"},ObjectValue:function(e){return"{"+Et(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+Nt("(",Et(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:gt(function(e){var t=e.operationTypes;return Et(["schema",Et(e.directives," "),Tt(t)]," ")}),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:gt(function(e){return Et(["scalar",e.name,Et(e.directives," ")]," ")}),ObjectTypeDefinition:gt(function(e){var t=e.directives,n=e.fields;return Et(["type",e.name,Nt("implements ",Et(e.interfaces," & ")),Et(t," "),Tt(n)]," ")}),FieldDefinition:gt(function(e){var t=e.arguments,n=e.type,r=e.directives;return e.name+(Ot(t)?Nt("(\n",It(Et(t,"\n")),"\n)"):Nt("(",Et(t,", "),")"))+": "+n+Nt(" ",Et(r," "))}),InputValueDefinition:gt(function(e){var t=e.directives;return Et([e.name+": "+e.type,Nt("= ",e.defaultValue),Et(t," ")]," ")}),InterfaceTypeDefinition:gt(function(e){var t=e.directives,n=e.fields;return Et(["interface",e.name,Nt("implements ",Et(e.interfaces," & ")),Et(t," "),Tt(n)]," ")}),UnionTypeDefinition:gt(function(e){var t=e.types;return Et(["union",e.name,Et(e.directives," "),t&&0!==t.length?"= "+Et(t," | "):""]," ")}),EnumTypeDefinition:gt(function(e){var t=e.values;return Et(["enum",e.name,Et(e.directives," "),Tt(t)]," ")}),EnumValueDefinition:gt(function(e){return Et([e.name,Et(e.directives," ")]," ")}),InputObjectTypeDefinition:gt(function(e){var t=e.fields;return Et(["input",e.name,Et(e.directives," "),Tt(t)]," ")}),DirectiveDefinition:gt(function(e){var t=e.arguments,n=e.repeatable,r=e.locations;return"directive @"+e.name+(Ot(t)?Nt("(\n",It(Et(t,"\n")),"\n)"):Nt("(",Et(t,", "),")"))+(n?" repeatable":"")+" on "+Et(r," | ")}),SchemaExtension:function(e){var t=e.operationTypes;return Et(["extend schema",Et(e.directives," "),Tt(t)]," ")},ScalarTypeExtension:function(e){return Et(["extend scalar",e.name,Et(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.directives,n=e.fields;return Et(["extend type",e.name,Nt("implements ",Et(e.interfaces," & ")),Et(t," "),Tt(n)]," ")},InterfaceTypeExtension:function(e){var t=e.directives,n=e.fields;return Et(["extend interface",e.name,Nt("implements ",Et(e.interfaces," & ")),Et(t," "),Tt(n)]," ")},UnionTypeExtension:function(e){var t=e.types;return Et(["extend union",e.name,Et(e.directives," "),t&&0!==t.length?"= "+Et(t," | "):""]," ")},EnumTypeExtension:function(e){var t=e.values;return Et(["extend enum",e.name,Et(e.directives," "),Tt(t)]," ")},InputObjectTypeExtension:function(e){var t=e.fields;return Et(["extend input",e.name,Et(e.directives," "),Tt(t)]," ")}};function gt(e){return function(t){return Et([t.description,e(t)],"\n")}}function Et(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(function(e){return e}).join(n))&&void 0!==t?t:""}function Tt(e){return Nt("{\n",It(Et(e,"\n")),"\n}")}function Nt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function It(e){return Nt(" ",e.replace(/\n/g,"\n "))}function bt(e){return-1!==e.indexOf("\n")}function Ot(e){return null!=e&&e.some(bt)}function _t(e,t){switch(e.kind){case ne.NULL:return null;case ne.INT:return parseInt(e.value,10);case ne.FLOAT:return parseFloat(e.value);case ne.STRING:case ne.ENUM:case ne.BOOLEAN:return e.value;case ne.LIST:return e.values.map(function(e){return _t(e,t)});case ne.OBJECT:return st(e.fields,function(e){return e.name.value},function(e){return _t(e.value,t)});case ne.VARIABLE:return null==t?void 0:t[e.name.value]}Ne(0,"Unexpected value node: "+xe(e))}function St(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function At(e,t,n){return t&&St(e.prototype,t),n&&St(e,n),e}function wt(e){return xt(e)||Dt(e)||kt(e)||Lt(e)||Ft(e)||Rt(e)||Ct(e)||Mt(e)}function xt(e){return ke(e,qt)}function Dt(e){return ke(e,Xt)}function kt(e){return ke(e,tn)}function Lt(e){return ke(e,nn)}function Ft(e){return ke(e,an)}function Rt(e){return ke(e,sn)}function Ct(e){return ke(e,Bt)}function Mt(e){return ke(e,Yt)}function jt(e){return xt(e)||Ft(e)||Rt(e)||Gt(e)&&jt(e.ofType)}function Pt(e){return xt(e)||Ft(e)}function Ut(e){return Dt(e)||kt(e)||Lt(e)}function Vt(e){return kt(e)||Lt(e)}function Bt(e){if(!(this instanceof Bt))return new Bt(e);this.ofType=function(e){if(!wt(e))throw new Error("Expected ".concat(xe(e)," to be a GraphQL type."));return e}(e)}function Yt(e){if(!(this instanceof Yt))return new Yt(e);this.ofType=function(e){if(!function(e){return wt(e)&&!Mt(e)}(e))throw new Error("Expected ".concat(xe(e)," to be a GraphQL nullable type."));return e}(e)}function Gt(e){return Ct(e)||Mt(e)}function Jt(e){if(e){for(var t=e;Gt(t);)t=t.ofType;return t}}function Kt(e){return"function"==typeof e?e():e}function $t(e){return e&&e.length>0?e:void 0}Bt.prototype.toString=function(){return"["+String(this.ofType)+"]"},Bt.prototype.toJSON=function(){return this.toString()},Object.defineProperty(Bt.prototype,oe,{get:function(){return"GraphQLList"}}),be(Bt),Yt.prototype.toString=function(){return String(this.ofType)+"!"},Yt.prototype.toJSON=function(){return this.toString()},Object.defineProperty(Yt.prototype,oe,{get:function(){return"GraphQLNonNull"}}),be(Yt);var qt=function(){function e(e){var t,n,r,i=null!==(t=e.parseValue)&&void 0!==t?t:ut;this.name=e.name,this.description=e.description,this.specifiedByUrl=e.specifiedByUrl,this.serialize=null!==(n=e.serialize)&&void 0!==n?n:ut,this.parseValue=i,this.parseLiteral=null!==(r=e.parseLiteral)&&void 0!==r?r:function(e,t){return i(_t(e,t))},this.extensions=e.extensions&&ot(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=$t(e.extensionASTNodes),"string"==typeof e.name||te(0,"Must provide name."),null==e.specifiedByUrl||"string"==typeof e.specifiedByUrl||te(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(xe(e.specifiedByUrl),".")),null==e.serialize||"function"==typeof e.serialize||te(0,"".concat(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.')),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||te(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){var e;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:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},At(e,[{key:oe,get:function(){return"GraphQLScalarType"}}]),e}();be(qt);var Xt=function(){function e(e){this.name=e.name,this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=e.extensions&&ot(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=$t(e.extensionASTNodes),this._fields=zt.bind(void 0,e),this._interfaces=Qt.bind(void 0,e),"string"==typeof e.name||te(0,"Must provide name."),null==e.isTypeOf||"function"==typeof e.isTypeOf||te(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(xe(e.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Wt(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},At(e,[{key:oe,get:function(){return"GraphQLObjectType"}}]),e}();function Qt(e){var t,n=null!==(t=Kt(e.interfaces))&&void 0!==t?t:[];return Array.isArray(n)||te(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),n}function zt(e){var t=Kt(e.fields);return Ht(t)||te(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),at(t,function(t,n){var r;Ht(t)||te(0,"".concat(e.name,".").concat(n," field config must be an object.")),!("isDeprecated"in t)||te(0,"".concat(e.name,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),null==t.resolve||"function"==typeof t.resolve||te(0,"".concat(e.name,".").concat(n," field resolver must be a function if ")+"provided, but got: ".concat(xe(t.resolve),"."));var i=null!==(r=t.args)&&void 0!==r?r:{};Ht(i)||te(0,"".concat(e.name,".").concat(n," args must be an object with argument names as keys."));var a=rt(i).map(function(e){var t=e[1];return{name:e[0],description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions&&ot(t.extensions),astNode:t.astNode}});return{name:n,description:t.description,type:t.type,args:a,resolve:t.resolve,subscribe:t.subscribe,isDeprecated:null!=t.deprecationReason,deprecationReason:t.deprecationReason,extensions:t.extensions&&ot(t.extensions),astNode:t.astNode}})}function Ht(e){return ie(e)&&!Array.isArray(e)}function Wt(e){return at(e,function(e){return{description:e.description,type:e.type,args:Zt(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}})}function Zt(e){return st(e,function(e){return e.name},function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}})}function en(e){return Mt(e.type)&&void 0===e.defaultValue}be(Xt);var tn=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&ot(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=$t(e.extensionASTNodes),this._fields=zt.bind(void 0,e),this._interfaces=Qt.bind(void 0,e),"string"==typeof e.name||te(0,"Must provide name."),null==e.resolveType||"function"==typeof e.resolveType||te(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(xe(e.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){var e;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Wt(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},At(e,[{key:oe,get:function(){return"GraphQLInterfaceType"}}]),e}();be(tn);var nn=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&ot(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=$t(e.extensionASTNodes),this._types=rn.bind(void 0,e),"string"==typeof e.name||te(0,"Must provide name."),null==e.resolveType||"function"==typeof e.resolveType||te(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(xe(e.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return"function"==typeof this._types&&(this._types=this._types()),this._types},t.toConfig=function(){var e;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},At(e,[{key:oe,get:function(){return"GraphQLUnionType"}}]),e}();function rn(e){var t=Kt(e.types);return Array.isArray(t)||te(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}be(nn);var an=function(){function e(e){var t,n;this.name=e.name,this.description=e.description,this.extensions=e.extensions&&ot(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=$t(e.extensionASTNodes),this._values=(t=this.name,Ht(n=e.values)||te(0,"".concat(t," values must be an object with value names as keys.")),rt(n).map(function(e){var n=e[0],r=e[1];return Ht(r)||te(0,"".concat(t,".").concat(n,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(xe(r),".")),!("isDeprecated"in r)||te(0,"".concat(t,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),{name:n,description:r.description,value:void 0!==r.value?r.value:n,isDeprecated:null!=r.deprecationReason,deprecationReason:r.deprecationReason,extensions:r.extensions&&ot(r.extensions),astNode:r.astNode}})),this._valueLookup=new Map(this._values.map(function(e){return[e.value,e]})),this._nameLookup=it(this._values,function(e){return e.name}),"string"==typeof e.name||te(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(e){return this._nameLookup[e]},t.serialize=function(e){var t=this._valueLookup.get(e);if(void 0===t)throw new Ee('Enum "'.concat(this.name,'" cannot represent value: ').concat(xe(e)));return t.name},t.parseValue=function(e){if("string"!=typeof e){var t=xe(e);throw new Ee('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(t,".")+on(this,t))}var n=this.getValue(e);if(null==n)throw new Ee('Value "'.concat(e,'" does not exist in "').concat(this.name,'" enum.')+on(this,e));return n.value},t.parseLiteral=function(e,t){if(e.kind!==ne.ENUM){var n=yt(e);throw new Ee('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(n,".")+on(this,n),e)}var r=this.getValue(e.value);if(null==r){var i=yt(e);throw new Ee('Value "'.concat(i,'" does not exist in "').concat(this.name,'" enum.')+on(this,i),e)}return r.value},t.toConfig=function(){var e,t=st(this.getValues(),function(e){return e.name},function(e){return{description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}});return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},At(e,[{key:oe,get:function(){return"GraphQLEnumType"}}]),e}();function on(e,t){return ct("the enum value",dt(t,e.getValues().map(function(e){return e.name})))}be(an);var sn=function(){function e(e){this.name=e.name,this.description=e.description,this.extensions=e.extensions&&ot(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=$t(e.extensionASTNodes),this._fields=cn.bind(void 0,e),"string"==typeof e.name||te(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var e,t=at(this.getFields(),function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,extensions:e.extensions,astNode:e.astNode}});return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},At(e,[{key:oe,get:function(){return"GraphQLInputObjectType"}}]),e}();function cn(e){var t=Kt(e.fields);return Ht(t)||te(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),at(t,function(t,n){return!("resolve"in t)||te(0,"".concat(e.name,".").concat(n," field has a resolve property, but Input Types cannot define resolvers.")),{name:n,description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions&&ot(t.extensions),astNode:t.astNode}})}function un(e,t,n){return t===n||(Mt(n)?!!Mt(t)&&un(e,t.ofType,n.ofType):Mt(t)?un(e,t.ofType,n):Ct(n)?!!Ct(t)&&un(e,t.ofType,n.ofType):!Ct(t)&&Vt(n)&&(kt(t)||Dt(t))&&e.isSubType(n,t))}function ln(e,t,n){return t===n||(Vt(t)?Vt(n)?e.getPossibleTypes(t).some(function(t){return e.isSubType(n,t)}):e.isSubType(t,n):!!Vt(n)&&e.isSubType(n,t))}be(sn);var pn=Array.from||function(e,t,n){if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var r=e[ae];if("function"==typeof r){for(var i,a=r.call(e),o=[],s=0;!(i=a.next()).done;++s)if(o.push(t.call(n,i.value,s)),s>9999999)throw new TypeError("Near-infinite iteration.");return o}var c=e.length;if("number"==typeof c&&c>=0&&c%1==0){for(var u=[],l=0;l<c;++l)Object.prototype.hasOwnProperty.call(e,l)&&u.push(t.call(n,e[l],l));return u}return[]},fn=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)};function dn(e){return(dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var hn=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},vn=new qt({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:function(e){var t=mn(e);if("boolean"==typeof t)return t?1:0;var n=t;if("string"==typeof t&&""!==t&&(n=Number(t)),!hn(n))throw new Ee("Int cannot represent non-integer value: ".concat(xe(t)));if(n>2147483647||n<-2147483648)throw new Ee("Int cannot represent non 32-bit signed integer value: "+xe(t));return n},parseValue:function(e){if(!hn(e))throw new Ee("Int cannot represent non-integer value: ".concat(xe(e)));if(e>2147483647||e<-2147483648)throw new Ee("Int cannot represent non 32-bit signed integer value: ".concat(e));return e},parseLiteral:function(e){if(e.kind!==ne.INT)throw new Ee("Int cannot represent non-integer value: ".concat(yt(e)),e);var t=parseInt(e.value,10);if(t>2147483647||t<-2147483648)throw new Ee("Int cannot represent non 32-bit signed integer value: ".concat(e.value),e);return t}}),yn=new qt({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:function(e){var t=mn(e);if("boolean"==typeof t)return t?1:0;var n=t;if("string"==typeof t&&""!==t&&(n=Number(t)),!fn(n))throw new Ee("Float cannot represent non numeric value: ".concat(xe(t)));return n},parseValue:function(e){if(!fn(e))throw new Ee("Float cannot represent non numeric value: ".concat(xe(e)));return e},parseLiteral:function(e){if(e.kind!==ne.FLOAT&&e.kind!==ne.INT)throw new Ee("Float cannot represent non numeric value: ".concat(yt(e)),e);return parseFloat(e.value)}});function mn(e){if(ie(e)){if("function"==typeof e.valueOf){var t=e.valueOf();if(!ie(t))return t}if("function"==typeof e.toJSON)return e.toJSON()}return e}var gn=new qt({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:function(e){var t=mn(e);if("string"==typeof t)return t;if("boolean"==typeof t)return t?"true":"false";if(fn(t))return t.toString();throw new Ee("String cannot represent value: ".concat(xe(e)))},parseValue:function(e){if("string"!=typeof e)throw new Ee("String cannot represent a non string value: ".concat(xe(e)));return e},parseLiteral:function(e){if(e.kind!==ne.STRING)throw new Ee("String cannot represent a non string value: ".concat(yt(e)),e);return e.value}}),En=new qt({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:function(e){var t=mn(e);if("boolean"==typeof t)return t;if(fn(t))return 0!==t;throw new Ee("Boolean cannot represent a non boolean value: ".concat(xe(t)))},parseValue:function(e){if("boolean"!=typeof e)throw new Ee("Boolean cannot represent a non boolean value: ".concat(xe(e)));return e},parseLiteral:function(e){if(e.kind!==ne.BOOLEAN)throw new Ee("Boolean cannot represent a non boolean value: ".concat(yt(e)),e);return e.value}}),Tn=new qt({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:function(e){var t=mn(e);if("string"==typeof t)return t;if(hn(t))return String(t);throw new Ee("ID cannot represent value: ".concat(xe(e)))},parseValue:function(e){if("string"==typeof e)return e;if(hn(e))return e.toString();throw new Ee("ID cannot represent value: ".concat(xe(e)))},parseLiteral:function(e){if(e.kind!==ne.STRING&&e.kind!==ne.INT)throw new Ee("ID cannot represent a non-string and non-integer value: "+yt(e),e);return e.value}}),Nn=Object.freeze([gn,vn,yn,En,Tn]);function In(e,t){if(Mt(t)){var n=In(e,t.ofType);return(null==n?void 0:n.kind)===ne.NULL?null:n}if(null===e)return{kind:ne.NULL};if(void 0===e)return null;if(Ct(t)){var r=t.ofType,i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};if(null==e||"object"!==dn(e))return null;if(Array.isArray(e))return e.map(t);var n=e[ae];if("function"==typeof n){for(var r,i=n.call(e),a=[],o=0;!(r=i.next()).done;++o)a.push(t(r.value,o));return a}var s=e.length;if("number"==typeof s&&s>=0&&s%1==0){for(var c=[],u=0;u<s;++u){if(!Object.prototype.hasOwnProperty.call(e,u))return null;c.push(t(e[String(u)],u))}return c}return null}(e);if(null!=i){for(var a=[],o=0;o<i.length;o++){var s=In(i[o],r);null!=s&&a.push(s)}return{kind:ne.LIST,values:a}}return In(e,r)}if(Rt(t)){if(!ie(e))return null;for(var c=[],u=0,l=nt(t.getFields());u<l.length;u++){var p=l[u],f=In(e[p.name],p.type);f&&c.push({kind:ne.OBJECT_FIELD,name:{kind:ne.NAME,value:p.name},value:f})}return{kind:ne.OBJECT,fields:c}}if(Pt(t)){var d=t.serialize(e);if(null==d)return null;if("boolean"==typeof d)return{kind:ne.BOOLEAN,value:d};if("number"==typeof d&&fn(d)){var h=String(d);return bn.test(h)?{kind:ne.INT,value:h}:{kind:ne.FLOAT,value:h}}if("string"==typeof d)return Ft(t)?{kind:ne.ENUM,value:d}:t===Tn&&bn.test(d)?{kind:ne.INT,value:d}:{kind:ne.STRING,value:d};throw new TypeError("Cannot convert value to AST: ".concat(xe(d),"."))}Ne(0,"Unexpected input type: "+xe(t))}var bn=/^-?(?:0|[1-9][0-9]*)$/,On=new Xt({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:function(){return{description:{type:gn,resolve:function(e){return e.description}},types:{description:"A list of all types supported by this server.",type:new Yt(new Bt(new Yt(An))),resolve:function(e){return nt(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new Yt(An),resolve:function(e){return e.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:An,resolve:function(e){return e.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:An,resolve:function(e){return e.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new Yt(new Bt(new Yt(_n))),resolve:function(e){return e.getDirectives()}}}}}),_n=new Xt({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn 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:function(){return{name:{type:new Yt(gn),resolve:function(e){return e.name}},description:{type:gn,resolve:function(e){return e.description}},isRepeatable:{type:new Yt(En),resolve:function(e){return e.isRepeatable}},locations:{type:new Yt(new Bt(new Yt(Sn))),resolve:function(e){return e.locations}},args:{type:new Yt(new Bt(new Yt(xn))),resolve:function(e){return e.args}}}}}),Sn=new an({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:Fe.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:Fe.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:Fe.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:Fe.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:Fe.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:Fe.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:Fe.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:Fe.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:Fe.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:Fe.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:Fe.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:Fe.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:Fe.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:Fe.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:Fe.UNION,description:"Location adjacent to a union definition."},ENUM:{value:Fe.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:Fe.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:Fe.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:Fe.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),An=new Xt({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:function(){return{kind:{type:new Yt(Ln),resolve:function(e){return xt(e)?kn.SCALAR:Dt(e)?kn.OBJECT:kt(e)?kn.INTERFACE:Lt(e)?kn.UNION:Ft(e)?kn.ENUM:Rt(e)?kn.INPUT_OBJECT:Ct(e)?kn.LIST:Mt(e)?kn.NON_NULL:void Ne(0,'Unexpected type: "'.concat(xe(e),'".'))}},name:{type:gn,resolve:function(e){return void 0!==e.name?e.name:void 0}},description:{type:gn,resolve:function(e){return void 0!==e.description?e.description:void 0}},specifiedByUrl:{type:gn,resolve:function(e){return void 0!==e.specifiedByUrl?e.specifiedByUrl:void 0}},fields:{type:new Bt(new Yt(wn)),args:{includeDeprecated:{type:En,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if(Dt(e)||kt(e)){var r=nt(e.getFields());return n?r:r.filter(function(e){return null==e.deprecationReason})}}},interfaces:{type:new Bt(new Yt(An)),resolve:function(e){if(Dt(e)||kt(e))return e.getInterfaces()}},possibleTypes:{type:new Bt(new Yt(An)),resolve:function(e,t,n,r){var i=r.schema;if(Vt(e))return i.getPossibleTypes(e)}},enumValues:{type:new Bt(new Yt(Dn)),args:{includeDeprecated:{type:En,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if(Ft(e)){var r=e.getValues();return n?r:r.filter(function(e){return null==e.deprecationReason})}}},inputFields:{type:new Bt(new Yt(xn)),args:{includeDeprecated:{type:En,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if(Rt(e)){var r=nt(e.getFields());return n?r:r.filter(function(e){return null==e.deprecationReason})}}},ofType:{type:An,resolve:function(e){return void 0!==e.ofType?e.ofType:void 0}}}}}),wn=new Xt({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:function(){return{name:{type:new Yt(gn),resolve:function(e){return e.name}},description:{type:gn,resolve:function(e){return e.description}},args:{type:new Yt(new Bt(new Yt(xn))),args:{includeDeprecated:{type:En,defaultValue:!1}},resolve:function(e,t){return t.includeDeprecated?e.args:e.args.filter(function(e){return null==e.deprecationReason})}},type:{type:new Yt(An),resolve:function(e){return e.type}},isDeprecated:{type:new Yt(En),resolve:function(e){return null!=e.deprecationReason}},deprecationReason:{type:gn,resolve:function(e){return e.deprecationReason}}}}}),xn=new Xt({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:function(){return{name:{type:new Yt(gn),resolve:function(e){return e.name}},description:{type:gn,resolve:function(e){return e.description}},type:{type:new Yt(An),resolve:function(e){return e.type}},defaultValue:{type:gn,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(e){var t=In(e.defaultValue,e.type);return t?yt(t):null}},isDeprecated:{type:new Yt(En),resolve:function(e){return null!=e.deprecationReason}},deprecationReason:{type:gn,resolve:function(e){return e.deprecationReason}}}}}),Dn=new Xt({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:function(){return{name:{type:new Yt(gn),resolve:function(e){return e.name}},description:{type:gn,resolve:function(e){return e.description}},isDeprecated:{type:new Yt(En),resolve:function(e){return null!=e.deprecationReason}},deprecationReason:{type:gn,resolve:function(e){return e.deprecationReason}}}}}),kn=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"}),Ln=new an({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:kn.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:kn.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:kn.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:kn.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:kn.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:kn.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:kn.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:kn.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Fn=(new Yt(On),new Yt(gn),new Yt(gn),Object.freeze([On,_n,Sn,An,wn,xn,Dn,Ln]));function Rn(e){return ke(e,Cn)}var Cn=function(){function e(e){var t,n;this.name=e.name,this.description=e.description,this.locations=e.locations,this.isRepeatable=null!==(t=e.isRepeatable)&&void 0!==t&&t,this.extensions=e.extensions&&ot(e.extensions),this.astNode=e.astNode,e.name||te(0,"Directive must be named."),Array.isArray(e.locations)||te(0,"@".concat(e.name," locations must be an Array."));var r=null!==(n=e.args)&&void 0!==n?n:{};ie(r)&&!Array.isArray(r)||te(0,"@".concat(e.name," args must be an object with argument names as keys.")),this.args=rt(r).map(function(e){var t=e[1];return{name:e[0],description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions&&ot(t.extensions),astNode:t.astNode}})}var t,n=e.prototype;return n.toConfig=function(){return{name:this.name,description:this.description,locations:this.locations,args:Zt(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}},n.toString=function(){return"@"+this.name},n.toJSON=function(){return this.toString()},(t=[{key:oe,get:function(){return"GraphQLDirective"}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();be(Cn);var Mn=new Cn({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Fe.FIELD,Fe.FRAGMENT_SPREAD,Fe.INLINE_FRAGMENT],args:{if:{type:new Yt(En),description:"Included when true."}}}),jn=new Cn({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Fe.FIELD,Fe.FRAGMENT_SPREAD,Fe.INLINE_FRAGMENT],args:{if:{type:new Yt(En),description:"Skipped when true."}}}),Pn=new Cn({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Fe.FIELD_DEFINITION,Fe.ARGUMENT_DEFINITION,Fe.INPUT_FIELD_DEFINITION,Fe.ENUM_VALUE],args:{reason:{type:gn,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:"No longer supported"}}}),Un=new Cn({name:"specifiedBy",description:"Exposes a URL that specifies the behaviour of this scalar.",locations:[Fe.SCALAR],args:{url:{type:new Yt(gn),description:"The URL that specifies the behaviour of this scalar."}}}),Vn=Object.freeze([Mn,jn,Pn,Un]);var Bn=function(){function e(e){var t;this.__validationErrors=!0===e.assumeValid?[]:void 0,ie(e)||te(0,"Must provide configuration object."),!e.types||Array.isArray(e.types)||te(0,'"types" must be Array if provided but got: '.concat(xe(e.types),".")),!e.directives||Array.isArray(e.directives)||te(0,'"directives" must be Array if provided but got: '+"".concat(xe(e.directives),".")),this.description=e.description,this.extensions=e.extensions&&ot(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes,this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=null!==(t=e.directives)&&void 0!==t?t:Vn;var n=new Set(e.types);if(null!=e.types)for(var r=0,i=e.types;r<i.length;r++){var a=i[r];n.delete(a),Yn(a,n)}null!=this._queryType&&Yn(this._queryType,n),null!=this._mutationType&&Yn(this._mutationType,n),null!=this._subscriptionType&&Yn(this._subscriptionType,n);for(var o=0,s=this._directives;o<s.length;o++){var c=s[o];if(Rn(c))for(var u=0,l=c.args;u<l.length;u++)Yn(l[u].type,n)}Yn(On,n),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(var p=0,f=pn(n);p<f.length;p++){var d=f[p];if(null!=d){var h=d.name;if(h||te(0,"One of the provided types for building the Schema is missing a name."),void 0!==this._typeMap[h])throw new Error('Schema must contain uniquely named types but contains multiple types named "'.concat(h,'".'));if(this._typeMap[h]=d,kt(d))for(var v=0,y=d.getInterfaces();v<y.length;v++){var m=y[v];if(kt(m)){var g=this._implementationsMap[m.name];void 0===g&&(g=this._implementationsMap[m.name]={objects:[],interfaces:[]}),g.interfaces.push(d)}}else if(Dt(d))for(var E=0,T=d.getInterfaces();E<T.length;E++){var N=T[E];if(kt(N)){var I=this._implementationsMap[N.name];void 0===I&&(I=this._implementationsMap[N.name]={objects:[],interfaces:[]}),I.objects.push(d)}}}}}var t,n=e.prototype;return n.getQueryType=function(){return this._queryType},n.getMutationType=function(){return this._mutationType},n.getSubscriptionType=function(){return this._subscriptionType},n.getTypeMap=function(){return this._typeMap},n.getType=function(e){return this.getTypeMap()[e]},n.getPossibleTypes=function(e){return Lt(e)?e.getTypes():this.getImplementations(e).objects},n.getImplementations=function(e){var t=this._implementationsMap[e.name];return null!=t?t:{objects:[],interfaces:[]}},n.isPossibleType=function(e,t){return this.isSubType(e,t)},n.isSubType=function(e,t){var n=this._subTypeMap[e.name];if(void 0===n){if(n=Object.create(null),Lt(e))for(var r=0,i=e.getTypes();r<i.length;r++)n[i[r].name]=!0;else{for(var a=this.getImplementations(e),o=0,s=a.objects;o<s.length;o++)n[s[o].name]=!0;for(var c=0,u=a.interfaces;c<u.length;c++)n[u[c].name]=!0}this._subTypeMap[e.name]=n}return void 0!==n[t.name]},n.getDirectives=function(){return this._directives},n.getDirective=function(e){return tt(this.getDirectives(),function(t){return t.name===e})},n.toConfig=function(){var e;return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:nt(this.getTypeMap()),directives:this.getDirectives().slice(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[],assumeValid:void 0!==this.__validationErrors}},(t=[{key:oe,get:function(){return"GraphQLSchema"}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();function Yn(e,t){var n=Jt(e);if(!t.has(n))if(t.add(n),Lt(n))for(var r=0,i=n.getTypes();r<i.length;r++)Yn(i[r],t);else if(Dt(n)||kt(n)){for(var a=0,o=n.getInterfaces();a<o.length;a++)Yn(o[a],t);for(var s=0,c=nt(n.getFields());s<c.length;s++){var u=c[s];Yn(u.type,t);for(var l=0,p=u.args;l<p.length;l++)Yn(p[l].type,t)}}else if(Rt(n))for(var f=0,d=nt(n.getFields());f<d.length;f++)Yn(d[f].type,t);return t}function Gn(e,t){var n;return t.kind===ne.LIST_TYPE?(n=Gn(e,t.type))&&new Bt(n):t.kind===ne.NON_NULL_TYPE?(n=Gn(e,t.type))&&new Yt(n):t.kind===ne.NAMED_TYPE?e.getType(t.name.value):void Ne(0,"Unexpected type node: "+xe(t))}function Jn(e){return e.kind===ne.OPERATION_DEFINITION||e.kind===ne.FRAGMENT_DEFINITION}function Kn(e){return e.kind===ne.SCALAR_TYPE_DEFINITION||e.kind===ne.OBJECT_TYPE_DEFINITION||e.kind===ne.INTERFACE_TYPE_DEFINITION||e.kind===ne.UNION_TYPE_DEFINITION||e.kind===ne.ENUM_TYPE_DEFINITION||e.kind===ne.INPUT_OBJECT_TYPE_DEFINITION}function $n(e){return e.kind===ne.SCALAR_TYPE_EXTENSION||e.kind===ne.OBJECT_TYPE_EXTENSION||e.kind===ne.INTERFACE_TYPE_EXTENSION||e.kind===ne.UNION_TYPE_EXTENSION||e.kind===ne.ENUM_TYPE_EXTENSION||e.kind===ne.INPUT_OBJECT_TYPE_EXTENSION}function qn(e){for(var t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null),i=0,a=e.getDocument().definitions;i<a.length;i++){var o=a[i];Kn(o)&&(r[o.name.value]=!0)}var s=Object.keys(n).concat(Object.keys(r));return{NamedType:function(t,i,a,o,c){var u,l=t.name.value;if(!n[l]&&!r[l]){var p,f=null!==(p=c[2])&&void 0!==p?p:a,d=null!=f&&(u=f,!Array.isArray(u)&&(function(e){return e.kind===ne.SCHEMA_DEFINITION||Kn(e)||e.kind===ne.DIRECTIVE_DEFINITION}(u)||function(e){return e.kind===ne.SCHEMA_EXTENSION||$n(e)}(u)));if(d&&function(e){return-1!==Xn.indexOf(e)}(l))return;var h=dt(l,d?Xn.concat(s):s);e.reportError(new Ee('Unknown type "'.concat(l,'".')+ct(h),t))}}}}var Xn=[].concat(Nn,Fn).map(function(e){return e.name});function Qn(e){for(var t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Vn,i=0;i<r.length;i++){var a=r[i];t[a.name]=a.locations}for(var o=e.getDocument().definitions,s=0;s<o.length;s++){var c=o[s];c.kind===ne.DIRECTIVE_DEFINITION&&(t[c.name.value]=c.locations.map(function(e){return e.value}))}return{Directive:function(n,r,i,a,o){var s=n.name.value,c=t[s];if(c){var u=function(e){var t=e[e.length-1];switch(!Array.isArray(t)||Ne(0),t.kind){case ne.OPERATION_DEFINITION:return function(e){switch(e){case"query":return Fe.QUERY;case"mutation":return Fe.MUTATION;case"subscription":return Fe.SUBSCRIPTION}Ne(0,"Unexpected operation: "+xe(e))}(t.operation);case ne.FIELD:return Fe.FIELD;case ne.FRAGMENT_SPREAD:return Fe.FRAGMENT_SPREAD;case ne.INLINE_FRAGMENT:return Fe.INLINE_FRAGMENT;case ne.FRAGMENT_DEFINITION:return Fe.FRAGMENT_DEFINITION;case ne.VARIABLE_DEFINITION:return Fe.VARIABLE_DEFINITION;case ne.SCHEMA_DEFINITION:case ne.SCHEMA_EXTENSION:return Fe.SCHEMA;case ne.SCALAR_TYPE_DEFINITION:case ne.SCALAR_TYPE_EXTENSION:return Fe.SCALAR;case ne.OBJECT_TYPE_DEFINITION:case ne.OBJECT_TYPE_EXTENSION:return Fe.OBJECT;case ne.FIELD_DEFINITION:return Fe.FIELD_DEFINITION;case ne.INTERFACE_TYPE_DEFINITION:case ne.INTERFACE_TYPE_EXTENSION:return Fe.INTERFACE;case ne.UNION_TYPE_DEFINITION:case ne.UNION_TYPE_EXTENSION:return Fe.UNION;case ne.ENUM_TYPE_DEFINITION:case ne.ENUM_TYPE_EXTENSION:return Fe.ENUM;case ne.ENUM_VALUE_DEFINITION:return Fe.ENUM_VALUE;case ne.INPUT_OBJECT_TYPE_DEFINITION:case ne.INPUT_OBJECT_TYPE_EXTENSION:return Fe.INPUT_OBJECT;case ne.INPUT_VALUE_DEFINITION:return e[e.length-3].kind===ne.INPUT_OBJECT_TYPE_DEFINITION?Fe.INPUT_FIELD_DEFINITION:Fe.ARGUMENT_DEFINITION}}(o);u&&-1===c.indexOf(u)&&e.reportError(new Ee('Directive "@'.concat(s,'" may not be used on ').concat(u,"."),n))}else e.reportError(new Ee('Unknown directive "@'.concat(s,'".'),n))}}}function zn(e){for(var t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Vn,i=0;i<r.length;i++){var a=r[i];t[a.name]=!a.isRepeatable}for(var o=e.getDocument().definitions,s=0;s<o.length;s++){var c=o[s];c.kind===ne.DIRECTIVE_DEFINITION&&(t[c.name.value]=!c.repeatable)}var u=Object.create(null),l=Object.create(null);return{enter:function(n){if(null!=n.directives){var r;if(n.kind===ne.SCHEMA_DEFINITION||n.kind===ne.SCHEMA_EXTENSION)r=u;else if(Kn(n)||$n(n)){var i=n.name.value;void 0===(r=l[i])&&(l[i]=r=Object.create(null))}else r=Object.create(null);for(var a=0,o=n.directives;a<o.length;a++){var s=o[a],c=s.name.value;t[c]&&(r[c]?e.reportError(new Ee('The directive "@'.concat(c,'" can only be used once at this location.'),[r[c],s])):r[c]=s)}}}}}function Hn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hn(Object(n),!0).forEach(function(t){Zn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function er(e){for(var t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Vn,i=0;i<r.length;i++){var a=r[i];t[a.name]=a.args.map(function(e){return e.name})}for(var o=e.getDocument().definitions,s=0;s<o.length;s++){var c=o[s];if(c.kind===ne.DIRECTIVE_DEFINITION){var u,l=null!==(u=c.arguments)&&void 0!==u?u:[];t[c.name.value]=l.map(function(e){return e.name.value})}}return{Directive:function(n){var r=n.name.value,i=t[r];if(n.arguments&&i)for(var a=0,o=n.arguments;a<o.length;a++){var s=o[a],c=s.name.value;if(-1===i.indexOf(c)){var u=dt(c,i);e.reportError(new Ee('Unknown argument "'.concat(c,'" on directive "@').concat(r,'".')+ct(u),s))}}return!1}}}function tr(e){var t=Object.create(null);return{Field:function(){t=Object.create(null)},Directive:function(){t=Object.create(null)},Argument:function(n){var r=n.name.value;return t[r]?e.reportError(new Ee('There can be only one argument named "'.concat(r,'".'),[t[r],n.name])):t[r]=n.name,!1}}}function nr(e,t){var n=e.getInputType();if(n){var r=Jt(n);if(Pt(r))try{if(void 0===r.parseLiteral(t,void 0)){var i=xe(n);e.reportError(new Ee('Expected value of type "'.concat(i,'", found ').concat(yt(t),"."),t))}}catch(s){var a=xe(n);e.reportError(s instanceof Ee?s:new Ee('Expected value of type "'.concat(a,'", found ').concat(yt(t),"; ")+s.message,t,void 0,void 0,void 0,s))}else{var o=xe(n);e.reportError(new Ee('Expected value of type "'.concat(o,'", found ').concat(yt(t),"."),t))}}}function rr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ir(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rr(Object(n),!0).forEach(function(t){ar(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ar(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function or(e){for(var t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Vn,i=0;i<r.length;i++){var a=r[i];t[a.name]=it(a.args.filter(en),function(e){return e.name})}for(var o=e.getDocument().definitions,s=0;s<o.length;s++){var c=o[s];if(c.kind===ne.DIRECTIVE_DEFINITION){var u,l=null!==(u=c.arguments)&&void 0!==u?u:[];t[c.name.value]=it(l.filter(sr),function(e){return e.name.value})}}return{Directive:{leave:function(n){var r=n.name.value,i=t[r];if(i)for(var a,o=it(null!==(a=n.arguments)&&void 0!==a?a:[],function(e){return e.name.value}),s=0,c=Object.keys(i);s<c.length;s++){var u=c[s];if(!o[u]){var l=i[u].type,p=wt(l)?xe(l):yt(l);e.reportError(new Ee('Directive "@'.concat(r,'" argument "').concat(u,'" of type "').concat(p,'" is required, but it was not provided.'),n))}}}}}}function sr(e){return e.type.kind===ne.NON_NULL_TYPE&&null==e.defaultValue}function cr(e,t,n,r,i){return Mt(r)&&!Mt(t)?(null!=n&&n.kind!==ne.NULL||void 0!==i)&&un(e,t,r.ofType):un(e,t,r)}function ur(e){return Array.isArray(e)?e.map(function(e){var t=e[1];return'subfields "'.concat(e[0],'" conflict because ')+ur(t)}).join(" and "):e}function lr(e,t,n,r,i,a,o){var s=e.getFragment(o);if(s){var c=yr(e,n,s),u=c[0],l=c[1];if(a!==u){fr(e,t,n,r,i,a,u);for(var p=0;p<l.length;p++)lr(e,t,n,r,i,a,l[p])}}}function pr(e,t,n,r,i,a,o){if(a!==o&&!r.has(a,o,i)){r.add(a,o,i);var s=e.getFragment(a),c=e.getFragment(o);if(s&&c){var u=yr(e,n,s),l=u[0],p=u[1],f=yr(e,n,c),d=f[1];fr(e,t,n,r,i,l,f[0]);for(var h=0;h<d.length;h++)pr(e,t,n,r,i,a,d[h]);for(var v=0;v<p.length;v++)pr(e,t,n,r,i,p[v],o)}}}function fr(e,t,n,r,i,a,o){for(var s=0,c=Object.keys(a);s<c.length;s++){var u=c[s],l=o[u];if(l)for(var p=a[u],f=0;f<p.length;f++)for(var d=0;d<l.length;d++){var h=dr(e,n,r,i,u,p[f],l[d]);h&&t.push(h)}}}function dr(e,t,n,r,i,a,o){var s,c,u=a[0],l=a[1],p=a[2],f=o[0],d=o[1],h=o[2],v=r||u!==f&&Dt(u)&&Dt(f);if(!v){var y,m,g=l.name.value,E=d.name.value;if(g!==E)return[[i,'"'.concat(g,'" and "').concat(E,'" are different fields')],[l],[d]];if(s=null!==(y=l.arguments)&&void 0!==y?y:[],c=null!==(m=d.arguments)&&void 0!==m?m:[],s.length!==c.length||!s.every(function(e){var t,n=tt(c,function(t){return t.name.value===e.name.value});return!!n&&(t=n.value,yt(e.value)===yt(t))}))return[[i,"they have differing arguments"],[l],[d]]}var T=null==p?void 0:p.type,N=null==h?void 0:h.type;if(T&&N&&hr(T,N))return[[i,'they return conflicting types "'.concat(xe(T),'" and "').concat(xe(N),'"')],[l],[d]];var I=l.selectionSet,b=d.selectionSet;return I&&b?function(e,t,n,r){if(e.length>0)return[[t,e.map(function(e){return e[0]})],e.reduce(function(e,t){return e.concat(t[1])},[n]),e.reduce(function(e,t){return e.concat(t[2])},[r])]}(function(e,t,n,r,i,a,o,s){var c=[],u=vr(e,t,i,a),l=u[0],p=u[1],f=vr(e,t,o,s),d=f[0],h=f[1];if(fr(e,c,t,n,r,l,d),0!==h.length)for(var v=0;v<h.length;v++)lr(e,c,t,n,r,l,h[v]);if(0!==p.length)for(var y=0;y<p.length;y++)lr(e,c,t,n,r,d,p[y]);for(var m=0;m<p.length;m++)for(var g=0;g<h.length;g++)pr(e,c,t,n,r,p[m],h[g]);return c}(e,t,n,v,Jt(T),I,Jt(N),b),i,l,d):void 0}function hr(e,t){return Ct(e)?!Ct(t)||hr(e.ofType,t.ofType):!!Ct(t)||(Mt(e)?!Mt(t)||hr(e.ofType,t.ofType):!!Mt(t)||!(!Pt(e)&&!Pt(t))&&e!==t)}function vr(e,t,n,r){var i=t.get(r);if(!i){var a=Object.create(null),o=Object.create(null);mr(e,n,r,a,o),i=[a,Object.keys(o)],t.set(r,i)}return i}function yr(e,t,n){var r=t.get(n.selectionSet);if(r)return r;var i=Gn(e.getSchema(),n.typeCondition);return vr(e,t,i,n.selectionSet)}function mr(e,t,n,r,i){for(var a=0,o=n.selections;a<o.length;a++){var s=o[a];switch(s.kind){case ne.FIELD:var c=s.name.value,u=void 0;(Dt(t)||kt(t))&&(u=t.getFields()[c]);var l=s.alias?s.alias.value:c;r[l]||(r[l]=[]),r[l].push([t,s,u]);break;case ne.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case ne.INLINE_FRAGMENT:var p=s.typeCondition,f=p?Gn(e.getSchema(),p):t;mr(e,f,s.selectionSet,r,i)}}}var gr,Er=function(){function e(){this._data=Object.create(null)}var t=e.prototype;return t.has=function(e,t,n){var r=this._data[e],i=r&&r[t];return void 0!==i&&(!1!==n||!1===i)},t.add=function(e,t,n){this._pairSetAdd(e,t,n),this._pairSetAdd(t,e,n)},t._pairSetAdd=function(e,t,n){var r=this._data[e];r||(r=Object.create(null),this._data[e]=r),r[t]=n},e}();function Tr(e){var t=[],n=Object.create(null);return{ObjectValue:{enter:function(){t.push(n),n=Object.create(null)},leave:function(){n=t.pop()}},ObjectField:function(t){var r=t.name.value;n[r]?e.reportError(new Ee('There can be only one input field named "'.concat(r,'".'),[n[r],t.name])):n[r]=t.name}}}function Nr(e,t){return!!(Dt(e)||kt(e)||Rt(e))&&null!=e.getFields()[t]}function Ir(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var br=(Ir(gr={},ne.SCALAR_TYPE_DEFINITION,ne.SCALAR_TYPE_EXTENSION),Ir(gr,ne.OBJECT_TYPE_DEFINITION,ne.OBJECT_TYPE_EXTENSION),Ir(gr,ne.INTERFACE_TYPE_DEFINITION,ne.INTERFACE_TYPE_EXTENSION),Ir(gr,ne.UNION_TYPE_DEFINITION,ne.UNION_TYPE_EXTENSION),Ir(gr,ne.ENUM_TYPE_DEFINITION,ne.ENUM_TYPE_EXTENSION),Ir(gr,ne.INPUT_OBJECT_TYPE_DEFINITION,ne.INPUT_OBJECT_TYPE_EXTENSION),gr);Object.freeze([function(e){return{Document:function(t){for(var n=0,r=t.definitions;n<r.length;n++){var i=r[n];Jn(i)||e.reportError(new Ee("The ".concat(i.kind===ne.SCHEMA_DEFINITION||i.kind===ne.SCHEMA_EXTENSION?"schema":'"'+i.name.value+'"'," definition is not executable."),i))}return!1}}},function(e){var t=Object.create(null);return{OperationDefinition:function(n){var r=n.name;return r&&(t[r.value]?e.reportError(new Ee('There can be only one operation named "'.concat(r.value,'".'),[t[r.value],r])):t[r.value]=r),!1},FragmentDefinition:function(){return!1}}},function(e){var t=0;return{Document:function(e){t=e.definitions.filter(function(e){return e.kind===ne.OPERATION_DEFINITION}).length},OperationDefinition:function(n){!n.name&&t>1&&e.reportError(new Ee("This anonymous operation must be the only defined operation.",n))}}},function(e){return{OperationDefinition:function(t){"subscription"===t.operation&&1!==t.selectionSet.selections.length&&e.reportError(new Ee(t.name?'Subscription "'.concat(t.name.value,'" must select only one top level field.'):"Anonymous Subscription must select only one top level field.",t.selectionSet.selections.slice(1)))}}},qn,function(e){return{InlineFragment:function(t){var n=t.typeCondition;if(n){var r=Gn(e.getSchema(),n);if(r&&!Ut(r)){var i=yt(n);e.reportError(new Ee('Fragment cannot condition on non composite type "'.concat(i,'".'),n))}}},FragmentDefinition:function(t){var n=Gn(e.getSchema(),t.typeCondition);if(n&&!Ut(n)){var r=yt(t.typeCondition);e.reportError(new Ee('Fragment "'.concat(t.name.value,'" cannot condition on non composite type "').concat(r,'".'),t.typeCondition))}}}},function(e){return{VariableDefinition:function(t){var n=Gn(e.getSchema(),t.type);if(n&&!jt(n)){var r=t.variable.name.value,i=yt(t.type);e.reportError(new Ee('Variable "$'.concat(r,'" cannot be non-input type "').concat(i,'".'),t.type))}}}},function(e){return{Field:function(t){var n=e.getType(),r=t.selectionSet;if(n)if(Pt(Jt(n))){if(r){var i=t.name.value,a=xe(n);e.reportError(new Ee('Field "'.concat(i,'" must not have a selection since type "').concat(a,'" has no subfields.'),r))}}else if(!r){var o=t.name.value,s=xe(n);e.reportError(new Ee('Field "'.concat(o,'" of type "').concat(s,'" must have a selection of subfields. Did you mean "').concat(o,' { ... }"?'),t))}}}},function(e){return{Field:function(t){var n=e.getParentType();if(n&&!e.getFieldDef()){var r=e.getSchema(),i=t.name.value,a=ct("to use an inline fragment on",function(e,t,n){if(!Vt(t))return[];for(var r=new Set,i=Object.create(null),a=0,o=e.getPossibleTypes(t);a<o.length;a++){var s=o[a];if(s.getFields()[n]){r.add(s),i[s.name]=1;for(var c=0,u=s.getInterfaces();c<u.length;c++){var l,p=u[c];p.getFields()[n]&&(r.add(p),i[p.name]=(null!==(l=i[p.name])&&void 0!==l?l:0)+1)}}}return pn(r).sort(function(t,n){var r=i[n.name]-i[t.name];return 0!==r?r:kt(t)&&e.isSubType(t,n)?-1:kt(n)&&e.isSubType(n,t)?1:lt(t.name,n.name)}).map(function(e){return e.name})}(r,n,i));""===a&&(a=ct(function(e,t){return Dt(e)||kt(e)?dt(t,Object.keys(e.getFields())):[]}(n,i))),e.reportError(new Ee('Cannot query field "'.concat(i,'" on type "').concat(n.name,'".')+a,t))}}}},function(e){var t=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(n){var r=n.name.value;return t[r]?e.reportError(new Ee('There can be only one fragment named "'.concat(r,'".'),[t[r],n.name])):t[r]=n.name,!1}}},function(e){return{FragmentSpread:function(t){var n=t.name.value;e.getFragment(n)||e.reportError(new Ee('Unknown fragment "'.concat(n,'".'),t.name))}}},function(e){var t=[],n=[];return{OperationDefinition:function(e){return t.push(e),!1},FragmentDefinition:function(e){return n.push(e),!1},Document:{leave:function(){for(var r=Object.create(null),i=0;i<t.length;i++)for(var a=0,o=e.getRecursivelyReferencedFragments(t[i]);a<o.length;a++)r[o[a].name.value]=!0;for(var s=0;s<n.length;s++){var c=n[s],u=c.name.value;!0!==r[u]&&e.reportError(new Ee('Fragment "'.concat(u,'" is never used.'),c))}}}}},function(e){return{InlineFragment:function(t){var n=e.getType(),r=e.getParentType();if(Ut(n)&&Ut(r)&&!ln(e.getSchema(),n,r)){var i=xe(r),a=xe(n);e.reportError(new Ee('Fragment cannot be spread here as objects of type "'.concat(i,'" can never be of type "').concat(a,'".'),t))}},FragmentSpread:function(t){var n=t.name.value,r=function(e,t){var n=e.getFragment(t);if(n){var r=Gn(e.getSchema(),n.typeCondition);if(Ut(r))return r}}(e,n),i=e.getParentType();if(r&&i&&!ln(e.getSchema(),r,i)){var a=xe(i),o=xe(r);e.reportError(new Ee('Fragment "'.concat(n,'" cannot be spread here as objects of type "').concat(a,'" can never be of type "').concat(o,'".'),t))}}}},function(e){var t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(e){return i(e),!1}};function i(a){if(!t[a.name.value]){var o=a.name.value;t[o]=!0;var s=e.getFragmentSpreads(a.selectionSet);if(0!==s.length){r[o]=n.length;for(var c=0;c<s.length;c++){var u=s[c],l=u.name.value,p=r[l];if(n.push(u),void 0===p){var f=e.getFragment(l);f&&i(f)}else{var d=n.slice(p),h=d.slice(0,-1).map(function(e){return'"'+e.name.value+'"'}).join(", ");e.reportError(new Ee('Cannot spread fragment "'.concat(l,'" within itself')+(""!==h?" via ".concat(h,"."):"."),d))}n.pop()}r[o]=void 0}}}},function(e){var t=Object.create(null);return{OperationDefinition:function(){t=Object.create(null)},VariableDefinition:function(n){var r=n.variable.name.value;t[r]?e.reportError(new Ee('There can be only one variable named "$'.concat(r,'".'),[t[r],n.variable.name])):t[r]=n.variable.name}}},function(e){var t=Object.create(null);return{OperationDefinition:{enter:function(){t=Object.create(null)},leave:function(n){for(var r=e.getRecursiveVariableUsages(n),i=0;i<r.length;i++){var a=r[i].node,o=a.name.value;!0!==t[o]&&e.reportError(new Ee(n.name?'Variable "$'.concat(o,'" is not defined by operation "').concat(n.name.value,'".'):'Variable "$'.concat(o,'" is not defined.'),[a,n]))}}},VariableDefinition:function(e){t[e.variable.name.value]=!0}}},function(e){var t=[];return{OperationDefinition:{enter:function(){t=[]},leave:function(n){for(var r=Object.create(null),i=e.getRecursiveVariableUsages(n),a=0;a<i.length;a++)r[i[a].node.name.value]=!0;for(var o=0,s=t;o<s.length;o++){var c=s[o],u=c.variable.name.value;!0!==r[u]&&e.reportError(new Ee(n.name?'Variable "$'.concat(u,'" is never used in operation "').concat(n.name.value,'".'):'Variable "$'.concat(u,'" is never used.'),c))}}},VariableDefinition:function(e){t.push(e)}}},Qn,zn,function(e){return Wn(Wn({},er(e)),{},{Argument:function(t){var n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){var a=t.name.value,o=dt(a,r.args.map(function(e){return e.name}));e.reportError(new Ee('Unknown argument "'.concat(a,'" on field "').concat(i.name,".").concat(r.name,'".')+ct(o),t))}}})},tr,function(e){return{ListValue:function(t){if(!Ct(function(e){if(e)return Mt(e)?e.ofType:e}(e.getParentInputType())))return nr(e,t),!1},ObjectValue:function(t){var n,r=Jt(e.getInputType());if(!Rt(r))return nr(e,t),!1;for(var i=it(t.fields,function(e){return e.name.value}),a=0,o=nt(r.getFields());a<o.length;a++){var s=o[a];if(!i[s.name]&&Mt((n=s).type)&&void 0===n.defaultValue){var c=xe(s.type);e.reportError(new Ee('Field "'.concat(r.name,".").concat(s.name,'" of required type "').concat(c,'" was not provided.'),t))}}},ObjectField:function(t){var n=Jt(e.getParentInputType());if(!e.getInputType()&&Rt(n)){var r=dt(t.name.value,Object.keys(n.getFields()));e.reportError(new Ee('Field "'.concat(t.name.value,'" is not defined by type "').concat(n.name,'".')+ct(r),t))}},NullValue:function(t){var n=e.getInputType();Mt(n)&&e.reportError(new Ee('Expected value of type "'.concat(xe(n),'", found ').concat(yt(t),"."),t))},EnumValue:function(t){return nr(e,t)},IntValue:function(t){return nr(e,t)},FloatValue:function(t){return nr(e,t)},StringValue:function(t){return nr(e,t)},BooleanValue:function(t){return nr(e,t)}}},function(e){return ir(ir({},or(e)),{},{Field:{leave:function(t){var n,r=e.getFieldDef();if(!r)return!1;for(var i=it(null!==(n=t.arguments)&&void 0!==n?n:[],function(e){return e.name.value}),a=0,o=r.args;a<o.length;a++){var s=o[a];if(!i[s.name]&&en(s)){var c=xe(s.type);e.reportError(new Ee('Field "'.concat(r.name,'" argument "').concat(s.name,'" of type "').concat(c,'" is required, but it was not provided.'),t))}}}}})},function(e){var t=Object.create(null);return{OperationDefinition:{enter:function(){t=Object.create(null)},leave:function(n){for(var r=e.getRecursiveVariableUsages(n),i=0;i<r.length;i++){var a=r[i],o=a.node,s=a.type,c=a.defaultValue,u=o.name.value,l=t[u];if(l&&s){var p=e.getSchema(),f=Gn(p,l.type);if(f&&!cr(p,f,l.defaultValue,s,c)){var d=xe(f),h=xe(s);e.reportError(new Ee('Variable "$'.concat(u,'" of type "').concat(d,'" used in position expecting type "').concat(h,'".'),[l,o]))}}}}},VariableDefinition:function(e){t[e.variable.name.value]=e}}},function(e){var t=new Er,n=new Map;return{SelectionSet:function(r){for(var i=function(e,t,n,r,i){var a=[],o=vr(e,t,r,i),s=o[0],c=o[1];if(function(e,t,n,r,i){for(var a=0,o=rt(i);a<o.length;a++){var s=o[a],c=s[0],u=s[1];if(u.length>1)for(var l=0;l<u.length;l++)for(var p=l+1;p<u.length;p++){var f=dr(e,n,r,!1,c,u[l],u[p]);f&&t.push(f)}}}(e,a,t,n,s),0!==c.length)for(var u=0;u<c.length;u++){lr(e,a,t,n,!1,s,c[u]);for(var l=u+1;l<c.length;l++)pr(e,a,t,n,!1,c[u],c[l])}return a}(e,n,t,e.getParentType(),r),a=0;a<i.length;a++){var o=i[a],s=o[0],c=s[0],u=o[1],l=o[2],p=ur(s[1]);e.reportError(new Ee('Fields "'.concat(c,'" conflict because ').concat(p,". Use different aliases on the fields to fetch both if this was intentional."),u.concat(l)))}}}},Tr]);var Or=Object.freeze([function(e){var t,n,r,i=e.getSchema(),a=null!==(t=null!==(n=null!==(r=null==i?void 0:i.astNode)&&void 0!==r?r:null==i?void 0:i.getQueryType())&&void 0!==n?n:null==i?void 0:i.getMutationType())&&void 0!==t?t:null==i?void 0:i.getSubscriptionType(),o=0;return{SchemaDefinition:function(t){a?e.reportError(new Ee("Cannot define a new schema within a schema extension.",t)):(o>0&&e.reportError(new Ee("Must provide only one schema definition.",t)),++o)}}},function(e){var t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(t){for(var i,a=null!==(i=t.operationTypes)&&void 0!==i?i:[],o=0;o<a.length;o++){var s=a[o],c=s.operation,u=n[c];r[c]?e.reportError(new Ee("Type for ".concat(c," already defined in the schema. It cannot be redefined."),s)):u?e.reportError(new Ee("There can be only one ".concat(c," type in schema."),[u,s])):n[c]=s}return!1}},function(e){var t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(r){var i=r.name.value;if(null==n||!n.getType(i))return t[i]?e.reportError(new Ee('There can be only one type named "'.concat(i,'".'),[t[i],r.name])):t[i]=r.name,!1;e.reportError(new Ee('Type "'.concat(i,'" already exists in the schema. It cannot also be defined in this type definition.'),r.name))}},function(e){var t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(t){var i,a=t.name.value;r[a]||(r[a]=Object.create(null));for(var o=null!==(i=t.values)&&void 0!==i?i:[],s=r[a],c=0;c<o.length;c++){var u=o[c],l=u.name.value,p=n[a];Ft(p)&&p.getValue(l)?e.reportError(new Ee('Enum value "'.concat(a,".").concat(l,'" already exists in the schema. It cannot also be defined in this type extension.'),u.name)):s[l]?e.reportError(new Ee('Enum value "'.concat(a,".").concat(l,'" can only be defined once.'),[s[l],u.name])):s[l]=u.name}return!1}},function(e){var t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(t){var i,a=t.name.value;r[a]||(r[a]=Object.create(null));for(var o=null!==(i=t.fields)&&void 0!==i?i:[],s=r[a],c=0;c<o.length;c++){var u=o[c],l=u.name.value;Nr(n[a],l)?e.reportError(new Ee('Field "'.concat(a,".").concat(l,'" already exists in the schema. It cannot also be defined in this type extension.'),u.name)):s[l]?e.reportError(new Ee('Field "'.concat(a,".").concat(l,'" can only be defined once.'),[s[l],u.name])):s[l]=u.name}return!1}},function(e){var t=Object.create(null),n=e.getSchema();return{DirectiveDefinition:function(r){var i=r.name.value;if(null==n||!n.getDirective(i))return t[i]?e.reportError(new Ee('There can be only one directive named "@'.concat(i,'".'),[t[i],r.name])):t[i]=r.name,!1;e.reportError(new Ee('Directive "@'.concat(i,'" already exists in the schema. It cannot be redefined.'),r.name))}}},qn,Qn,zn,function(e){for(var t=e.getSchema(),n=Object.create(null),r=0,i=e.getDocument().definitions;r<i.length;r++){var a=i[r];Kn(a)&&(n[a.name.value]=a)}return{ScalarTypeExtension:o,ObjectTypeExtension:o,InterfaceTypeExtension:o,UnionTypeExtension:o,EnumTypeExtension:o,InputObjectTypeExtension:o};function o(r){var i,a,o=r.name.value,s=n[o],c=null==t?void 0:t.getType(o);if(s?i=br[s.kind]:c&&(i=xt(a=c)?ne.SCALAR_TYPE_EXTENSION:Dt(a)?ne.OBJECT_TYPE_EXTENSION:kt(a)?ne.INTERFACE_TYPE_EXTENSION:Lt(a)?ne.UNION_TYPE_EXTENSION:Ft(a)?ne.ENUM_TYPE_EXTENSION:Rt(a)?ne.INPUT_OBJECT_TYPE_EXTENSION:void Ne(0,"Unexpected type: "+xe(a))),i){if(i!==r.kind){var u=function(e){switch(e){case ne.SCALAR_TYPE_EXTENSION:return"scalar";case ne.OBJECT_TYPE_EXTENSION:return"object";case ne.INTERFACE_TYPE_EXTENSION:return"interface";case ne.UNION_TYPE_EXTENSION:return"union";case ne.ENUM_TYPE_EXTENSION:return"enum";case ne.INPUT_OBJECT_TYPE_EXTENSION:return"input object"}Ne(0,"Unexpected kind: "+xe(e))}(r.kind);e.reportError(new Ee("Cannot extend non-".concat(u,' type "').concat(o,'".'),s?[s,r]:r))}}else{var l=Object.keys(n);t&&(l=l.concat(Object.keys(t.getTypeMap())));var p=dt(o,l);e.reportError(new Ee('Cannot extend type "'.concat(o,'" because it is not defined.')+ct(p),r.name))}}},er,tr,Tr,or]),_r=function(e){function t(t,n,r){var i;return(i=e.call(this,t,r)||this)._schema=n,i}return r=e,(n=t).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,t.prototype.getSchema=function(){return this._schema},t;var n,r}(function(){function e(e,t){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=t}var t=e.prototype;return t.reportError=function(e){this._onError(e)},t.getDocument=function(){return this._ast},t.getFragment=function(e){var t=this._fragments;return t||(this._fragments=t=this.getDocument().definitions.reduce(function(e,t){return t.kind===ne.FRAGMENT_DEFINITION&&(e[t.name.value]=t),e},Object.create(null))),t[e]},t.getFragmentSpreads=function(e){var t=this._fragmentSpreads.get(e);if(!t){t=[];for(var n=[e];0!==n.length;)for(var r=0,i=n.pop().selections;r<i.length;r++){var a=i[r];a.kind===ne.FRAGMENT_SPREAD?t.push(a):a.selectionSet&&n.push(a.selectionSet)}this._fragmentSpreads.set(e,t)}return t},t.getRecursivelyReferencedFragments=function(e){var t=this._recursivelyReferencedFragments.get(e);if(!t){t=[];for(var n=Object.create(null),r=[e.selectionSet];0!==r.length;)for(var i=r.pop(),a=0,o=this.getFragmentSpreads(i);a<o.length;a++){var s=o[a].name.value;if(!0!==n[s]){n[s]=!0;var c=this.getFragment(s);c&&(t.push(c),r.push(c.selectionSet))}}this._recursivelyReferencedFragments.set(e,t)}return t},e}());function Sr(e,t,n){if(e){if(e.kind===ne.VARIABLE){var r=e.name.value;if(null==n||void 0===n[r])return;var i=n[r];if(null===i&&Mt(t))return;return i}if(Mt(t)){if(e.kind===ne.NULL)return;return Sr(e,t.ofType,n)}if(e.kind===ne.NULL)return null;if(Ct(t)){var a=t.ofType;if(e.kind===ne.LIST){for(var o=[],s=0,c=e.values;s<c.length;s++){var u=c[s];if(Ar(u,n)){if(Mt(a))return;o.push(null)}else{var l=Sr(u,a,n);if(void 0===l)return;o.push(l)}}return o}var p=Sr(e,a,n);if(void 0===p)return;return[p]}if(Rt(t)){if(e.kind!==ne.OBJECT)return;for(var f=Object.create(null),d=it(e.fields,function(e){return e.name.value}),h=0,v=nt(t.getFields());h<v.length;h++){var y=v[h],m=d[y.name];if(m&&!Ar(m.value,n)){var g=Sr(m.value,y.type,n);if(void 0===g)return;f[y.name]=g}else if(void 0!==y.defaultValue)f[y.name]=y.defaultValue;else if(Mt(y.type))return}return f}if(Pt(t)){var E;try{E=t.parseLiteral(e,n)}catch(T){return}if(void 0===E)return;return E}Ne(0,"Unexpected input type: "+xe(t))}}function Ar(e,t){return e.kind===ne.VARIABLE&&(null==t||void 0===t[e.name.value])}function wr(e,t,n){var r=t.directives&&tt(t.directives,function(t){return t.name.value===e.name});if(r)return function(e,t,n){for(var r,i={},a=it(null!==(r=t.arguments)&&void 0!==r?r:[],function(e){return e.name.value}),o=0,s=e.args;o<s.length;o++){var c=s[o],u=c.name,l=c.type,p=a[u];if(p){var f=p.value,d=f.kind===ne.NULL;if(f.kind===ne.VARIABLE){var h=f.name.value;if(null==n||!Object.prototype.hasOwnProperty.call(n,h)){if(void 0!==c.defaultValue)i[u]=c.defaultValue;else if(Mt(l))throw new Ee('Argument "'.concat(u,'" of required type "').concat(xe(l),'" ')+'was provided the variable "$'.concat(h,'" which was not provided a runtime value.'),f);continue}d=null==n[h]}if(d&&Mt(l))throw new Ee('Argument "'.concat(u,'" of non-null type "').concat(xe(l),'" ')+"must not be null.",f);var v=Sr(f,l,n);if(void 0===v)throw new Ee('Argument "'.concat(u,'" has invalid value ').concat(yt(f),"."),f);i[u]=v}else if(void 0!==c.defaultValue)i[u]=c.defaultValue;else if(Mt(l))throw new Ee('Argument "'.concat(u,'" of required type "').concat(xe(l),'" ')+"was not provided.",t)}return i}(e,r,n)}function xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(n),!0).forEach(function(t){kr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lr=it(Nn.concat(Fn),function(e){return e.name});function Fr(e){var t=wr(Pn,e);return null==t?void 0:t.reason}function Rr(e){var t=wr(Un,e);return null==t?void 0:t.url}function Cr(e,t){if(e.description)return e.description.value;if(!0===(null==t?void 0:t.commentDescriptions)){var n=function(e){var t=e.loc;if(t){for(var n=[],r=t.startToken.prev;null!=r&&r.kind===Ae.COMMENT&&r.next&&r.prev&&r.line+1===r.next.line&&r.line!==r.prev.line;){var i=String(r.value);n.push(i),r=r.prev}return n.length>0?n.reverse().join("\n"):void 0}}(e);if(void 0!==n)return Re("\n"+n)}}function Mr(e,t){null!=e&&e.kind===ne.DOCUMENT||te(0,"Must provide valid Document AST."),!0!==(null==t?void 0:t.assumeValid)&&!0!==(null==t?void 0:t.assumeValidSDL)&&function(e){var t=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Or,r=[],i=new _r(e,t,function(e){r.push(e)}),a=n.map(function(e){return e(i)});return We(e,Ze(a)),r}(e);if(0!==t.length)throw new Error(t.map(function(e){return e.message}).join("\n\n"))}(e);var n=function(e,t,n){for(var r,i,a,o,s,c=[],u=Object.create(null),l=[],p=[],f=0,d=t.definitions;f<d.length;f++){var h=d[f];if(h.kind===ne.SCHEMA_DEFINITION)s=h;else if(h.kind===ne.SCHEMA_EXTENSION)p.push(h);else if(Kn(h))c.push(h);else if($n(h)){var v=h.name.value,y=u[v];u[v]=y?y.concat([h]):[h]}else h.kind===ne.DIRECTIVE_DEFINITION&&l.push(h)}if(0===Object.keys(u).length&&0===c.length&&0===l.length&&0===p.length&&null==s)return e;for(var m=Object.create(null),g=0,E=e.types;g<E.length;g++){var T=E[g];m[T.name]=function(e){return Fn.some(function(t){return e.name===t.name})}(N=T)||function(e){return Nn.some(function(t){return e.name===t.name})}(N)?N:xt(N)?function(e){for(var t,n=e.toConfig(),r=null!==(t=u[n.name])&&void 0!==t?t:[],i=n.specifiedByUrl,a=0;a<r.length;a++){var o;i=null!==(o=Rr(r[a]))&&void 0!==o?o:i}return new qt(Dr(Dr({},n),{},{specifiedByUrl:i,extensionASTNodes:n.extensionASTNodes.concat(r)}))}(N):Dt(N)?function(e){var t,n=e.toConfig(),r=null!==(t=u[n.name])&&void 0!==t?t:[];return new Xt(Dr(Dr({},n),{},{interfaces:function(){return[].concat(e.getInterfaces().map(w),P(r))},fields:function(){return Dr(Dr({},at(n.fields,x)),R(r))},extensionASTNodes:n.extensionASTNodes.concat(r)}))}(N):kt(N)?function(e){var t,n=e.toConfig(),r=null!==(t=u[n.name])&&void 0!==t?t:[];return new tn(Dr(Dr({},n),{},{interfaces:function(){return[].concat(e.getInterfaces().map(w),P(r))},fields:function(){return Dr(Dr({},at(n.fields,x)),R(r))},extensionASTNodes:n.extensionASTNodes.concat(r)}))}(N):Lt(N)?function(e){var t,n=e.toConfig(),r=null!==(t=u[n.name])&&void 0!==t?t:[];return new nn(Dr(Dr({},n),{},{types:function(){return[].concat(e.getTypes().map(w),U(r))},extensionASTNodes:n.extensionASTNodes.concat(r)}))}(N):Ft(N)?function(e){var t,n=e.toConfig(),r=null!==(t=u[e.name])&&void 0!==t?t:[];return new an(Dr(Dr({},n),{},{values:Dr(Dr({},n.values),j(r)),extensionASTNodes:n.extensionASTNodes.concat(r)}))}(N):Rt(N)?function(e){var t,n=e.toConfig(),r=null!==(t=u[n.name])&&void 0!==t?t:[];return new sn(Dr(Dr({},n),{},{fields:function(){return Dr(Dr({},at(n.fields,function(e){return Dr(Dr({},e),{},{type:A(e.type)})})),M(r))},extensionASTNodes:n.extensionASTNodes.concat(r)}))}(N):void Ne(0,"Unexpected type: "+xe(N))}for(var N,I=0;I<c.length;I++){var b,O=c[I],_=O.name.value;m[_]=null!==(b=Lr[_])&&void 0!==b?b:V(O)}var S=Dr(Dr({query:e.query&&w(e.query),mutation:e.mutation&&w(e.mutation),subscription:e.subscription&&w(e.subscription)},s&&k([s])),k(p));return Dr(Dr({description:null===(r=s)||void 0===r||null===(i=r.description)||void 0===i?void 0:i.value},S),{},{types:nt(m),directives:[].concat(e.directives.map(function(e){var t=e.toConfig();return new Cn(Dr(Dr({},t),{},{args:at(t.args,D)}))}),l.map(function(e){var t=e.locations.map(function(e){return e.value});return new Cn({name:e.name.value,description:Cr(e,n),locations:t,isRepeatable:e.repeatable,args:C(e.arguments),astNode:e})})),extensions:void 0,astNode:null!==(a=s)&&void 0!==a?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(p),assumeValid:null!==(o=null==n?void 0:n.assumeValid)&&void 0!==o&&o});function A(e){return Ct(e)?new Bt(A(e.ofType)):Mt(e)?new Yt(A(e.ofType)):w(e)}function w(e){return m[e.name]}function x(e){return Dr(Dr({},e),{},{type:A(e.type),args:at(e.args,D)})}function D(e){return Dr(Dr({},e),{},{type:A(e.type)})}function k(e){for(var t={},n=0;n<e.length;n++)for(var r,i=null!==(r=e[n].operationTypes)&&void 0!==r?r:[],a=0;a<i.length;a++){var o=i[a];t[o.operation]=L(o.type)}return t}function L(e){var t,n=e.name.value,r=null!==(t=Lr[n])&&void 0!==t?t:m[n];if(void 0===r)throw new Error('Unknown type: "'.concat(n,'".'));return r}function F(e){return e.kind===ne.LIST_TYPE?new Bt(F(e.type)):e.kind===ne.NON_NULL_TYPE?new Yt(F(e.type)):L(e)}function R(e){for(var t=Object.create(null),r=0;r<e.length;r++)for(var i,a=null!==(i=e[r].fields)&&void 0!==i?i:[],o=0;o<a.length;o++){var s=a[o];t[s.name.value]={type:F(s.type),description:Cr(s,n),args:C(s.arguments),deprecationReason:Fr(s),astNode:s}}return t}function C(e){for(var t=null!=e?e:[],r=Object.create(null),i=0;i<t.length;i++){var a=t[i],o=F(a.type);r[a.name.value]={type:o,description:Cr(a,n),defaultValue:Sr(a.defaultValue,o),deprecationReason:Fr(a),astNode:a}}return r}function M(e){for(var t=Object.create(null),r=0;r<e.length;r++)for(var i,a=null!==(i=e[r].fields)&&void 0!==i?i:[],o=0;o<a.length;o++){var s=a[o],c=F(s.type);t[s.name.value]={type:c,description:Cr(s,n),defaultValue:Sr(s.defaultValue,c),deprecationReason:Fr(s),astNode:s}}return t}function j(e){for(var t=Object.create(null),r=0;r<e.length;r++)for(var i,a=null!==(i=e[r].values)&&void 0!==i?i:[],o=0;o<a.length;o++){var s=a[o];t[s.name.value]={description:Cr(s,n),deprecationReason:Fr(s),astNode:s}}return t}function P(e){for(var t=[],n=0;n<e.length;n++)for(var r,i=null!==(r=e[n].interfaces)&&void 0!==r?r:[],a=0;a<i.length;a++)t.push(L(i[a]));return t}function U(e){for(var t=[],n=0;n<e.length;n++)for(var r,i=null!==(r=e[n].types)&&void 0!==r?r:[],a=0;a<i.length;a++)t.push(L(i[a]));return t}function V(e){var t,r=e.name.value,i=Cr(e,n),a=null!==(t=u[r])&&void 0!==t?t:[];switch(e.kind){case ne.OBJECT_TYPE_DEFINITION:var o=a,s=[e].concat(o);return new Xt({name:r,description:i,interfaces:function(){return P(s)},fields:function(){return R(s)},astNode:e,extensionASTNodes:o});case ne.INTERFACE_TYPE_DEFINITION:var c=a,l=[e].concat(c);return new tn({name:r,description:i,interfaces:function(){return P(l)},fields:function(){return R(l)},astNode:e,extensionASTNodes:c});case ne.ENUM_TYPE_DEFINITION:var p=a,f=[e].concat(p);return new an({name:r,description:i,values:j(f),astNode:e,extensionASTNodes:p});case ne.UNION_TYPE_DEFINITION:var d=a,h=[e].concat(d);return new nn({name:r,description:i,types:function(){return U(h)},astNode:e,extensionASTNodes:d});case ne.SCALAR_TYPE_DEFINITION:var v=a;return new qt({name:r,description:i,specifiedByUrl:Rr(e),astNode:e,extensionASTNodes:v});case ne.INPUT_OBJECT_TYPE_DEFINITION:var y=a,m=[e].concat(y);return new sn({name:r,description:i,fields:function(){return M(m)},astNode:e,extensionASTNodes:y})}Ne(0,"Unexpected type definition node: "+xe(e))}}({description:void 0,types:[],directives:[],extensions:void 0,extensionASTNodes:[],assumeValid:!1},e,t);if(null==n.astNode)for(var r=0,i=n.types;r<i.length;r++){var a=i[r];switch(a.name){case"Query":n.query=a;break;case"Mutation":n.mutation=a;break;case"Subscription":n.subscription=a}}for(var o=n.directives,s=function(e){var t=Vn[e];o.every(function(e){return e.name!==t.name})&&o.push(t)},c=0;c<Vn.length;c++)s(c);return new Bn(n)}u(class{constructor(e){this.searchIndex=[],e&&this.updateSchema(e)}updateSchema(e){this.schema=Mr(function(e,t){return new qe(e,t).parseDocument()}(e,{noLocation:void 0,allowLegacySDLEmptyFields:void 0,allowLegacySDLImplementsInterfaces:void 0,experimentalFragmentVariables:void 0}),{commentDescriptions:void 0,assumeValidSDL:void 0,assumeValid:void 0})}generateSearchIndex(){if(!this.schema)return[];let e=[];var t;[(t=this.schema).getQueryType(),t.getMutationType(),t.getSubscriptionType()].filter(Boolean).forEach(t=>{e=[...e,...this.getTypeIndices(t,!0,e)]});const n=this.schema.getTypeMap();return Object.keys(n).forEach(t=>{/^__/.test(t)||(e=[...e,...this.getTypeIndices(n[t],!1,e)])}),this.searchIndex=e,e}getFieldsIndices(e,t,n,r){let i=[];return Object.keys(e).forEach(a=>{const o=e[a],s={search:o.name,name:o.name,description:o.description?o.description:"",args:o.args?o.args.map(e=>({name:e.name,description:e.description})):[],cat:"field",type:t.name,isQuery:n,highlight:"field"};i=[...i,s],o.args&&o.args.length&&o.args.forEach(e=>{i=[...i,{...s,search:e.name,highlight:"argument"}]}),o.type&&(i=[...i,...this.getTypeIndices(o.type,!1,[...r,...i]).filter(e=>!!e)])}),i}getTypeIndices(e,t,n){let r=null;if(!e.name)return[];if(n.some(t=>t.name===e.name&&"type"===t.cat))return[];e.getFields&&(r=e.getFields());const i=[{search:e.name,name:e.name,cat:"type",description:e.description?e.description:"",isRoot:t,highlight:"type"}];return r?[...i,...this.getFieldsIndices(r,e,t,[...n,...i]).filter(e=>!!e)]:i}searchDocs(e){return this.searchIndex.length?new ee(this.searchIndex,{keys:["search"],threshold:.4}).search(e).map(e=>e.item):[]}generateQuery(e,t,n){let r="",i=!1;if(!this.schema)return;switch(t){case this.schema.getQueryType()&&this.schema.getQueryType().name:r+="query";break;case this.schema.getMutationType()&&this.schema.getMutationType().name:r+="mutation";break;case this.schema.getSubscriptionType()&&this.schema.getSubscriptionType().name:r+="subscription";break;default:r+=`fragment _____ on ${t}`,i=!0}const a=this.generateFieldData(e,t,[],1,n);if(!a)return;r+=`{\n${a.query}\n}`;const o={...a.meta};return o.hasArgs=i||o.hasArgs,{query:r,meta:o}}cleanName(e){return e.replace(/[\[\]!]/g,"")}generateFieldData(e,t,n,r,i={}){if(!(e&&t&&n&&this.schema))return{query:"",meta:{}};const a=i.tabSize||2,o=this.schema.getType(t),s=o&&o.getFields()[e];if(!s)return{query:"",meta:{}};const c={hasArgs:!1};let u=" ".repeat(r*a)+s.name;s.args&&s.args.length&&(c.hasArgs=!0,u+=`(${s.args.reduce((e,t)=>e+", "+t.name+": ______","").substring(2)})`);const l=this.cleanName(s.type.inspect()),p=this.schema.getType(l);if(n.filter(e=>e.type===l).length)return{query:"",meta:{}};if(r>=(i.addQueryDepthLimit||0))return{query:"",meta:{}};const f=p&&p.getFields&&p.getFields();let d="";return f&&(d=Object.keys(f).reduce((t,a)=>{if(n.filter(e=>e.name===a&&e.type===l).length)return"";const o=this.generateFieldData(a,l,[...n,{name:e,type:l}],r+1,i);if(!o)return t;const s=o.query;return c.hasArgs=c.hasArgs||o.meta.hasArgs||!1,s?t+"\n"+s:t},"").substring(1)),d&&(u+=`{\n${d}\n`,u+=" ".repeat(r*a)+"}"),{query:u,meta:c}}})}});