@spritz-finance/api-client 0.0.3

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.
@@ -0,0 +1,163 @@
1
+ import Fn from"axios";class Vt{client;constructor(t){this.client=t}}function De(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?De=function(n){return typeof n}:De=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},De(e)}function W(e){return De(e)=="object"&&e!==null}var _n=typeof Symbol=="function"&&Symbol.iterator!=null?Symbol.iterator:"@@iterator",U=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";function on(e,t){for(var n=/\r\n|[\n\r]/g,i=1,r=t+1,a;(a=n.exec(e.body))&&a.index<t;)i+=1,r=t+1-(a.index+a[0].length);return{line:i,column:r}}function Mt(e){return Ln(e.source,on(e.source,e.start))}function Ln(e,t){var n=e.locationOffset.column-1,i=we(n)+e.body,r=t.line-1,a=e.locationOffset.line-1,s=t.line+a,o=t.line===1?n:0,u=t.column+o,c="".concat(e.name,":").concat(s,":").concat(u,`
2
+ `),p=i.split(/\r\n|[\n\r]/g),m=p[r];if(m.length>120){for(var y=Math.floor(u/80),d=u%80,v=[],T=0;T<m.length;T+=80)v.push(m.slice(T,T+80));return c+Rn([["".concat(s),v[0]]].concat(v.slice(1,y+1).map(function(E){return["",E]}),[[" ",we(d-1)+"^"],["",v[y+1]]]))}return c+Rn([["".concat(s-1),p[r-1]],["".concat(s),m],["",we(u-1)+"^"],["".concat(s+1),p[r+1]]])}function Rn(e){var t=e.filter(function(i){i[0];var r=i[1];return r!==void 0}),n=Math.max.apply(Math,t.map(function(i){var r=i[0];return r.length}));return t.map(function(i){var r=i[0],a=i[1];return Bt(n,r)+(a?" | "+a:" |")}).join(`
3
+ `)}function we(e){return Array(e+1).join(" ")}function Bt(e,t){return we(e-t.length)+t}function Fe(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fe=function(n){return typeof n}:Fe=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fe(e)}function xn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xn(Object(n),!0).forEach(function(i){Gt(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xn(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Un(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ct(e,t,n){return t&&Un(e.prototype,t),n&&Un(e,n),e}function Qt(e,t){if(typeof t!="function"&&t!==null)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&&ye(e,t)}function qt(e){var t=Mn();return function(){var i=ge(e),r;if(t){var a=ge(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return Vn(this,r)}}function Vn(e,t){return t&&(Fe(t)==="object"||typeof t=="function")?t:he(e)}function he(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sn(e){var t=typeof Map=="function"?new Map:void 0;return sn=function(i){if(i===null||!Jt(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(i))return t.get(i);t.set(i,r)}function r(){return _e(i,arguments,ge(this).constructor)}return r.prototype=Object.create(i.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ye(r,i)},sn(e)}function _e(e,t,n){return Mn()?_e=Reflect.construct:_e=function(r,a,s){var o=[null];o.push.apply(o,a);var u=Function.bind.apply(r,o),c=new u;return s&&ye(c,s.prototype),c},_e.apply(null,arguments)}function Mn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Jt(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function ye(e,t){return ye=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},ye(e,t)}function ge(e){return ge=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ge(e)}var b=function(e){Qt(n,e);var t=qt(n);function n(i,r,a,s,o,u,c){var p,m,y,d;jt(this,n),d=t.call(this,i),d.name="GraphQLError",d.originalError=u??void 0,d.nodes=Bn(Array.isArray(r)?r:r?[r]:void 0);for(var v=[],T=0,E=(N=d.nodes)!==null&&N!==void 0?N:[];T<E.length;T++){var N,R=E[T],w=R.loc;w!=null&&v.push(w)}v=Bn(v),d.source=a??((p=v)===null||p===void 0?void 0:p[0].source),d.positions=s??((m=v)===null||m===void 0?void 0:m.map(function(I){return I.start})),d.locations=s&&a?s.map(function(I){return on(a,I)}):(y=v)===null||y===void 0?void 0:y.map(function(I){return on(I.source,I.start)}),d.path=o??void 0;var _=u?.extensions;return c==null&&W(_)?d.extensions=Pt({},_):d.extensions=c??{},Object.defineProperties(he(d),{message:{enumerable:!0},locations:{enumerable:d.locations!=null},path:{enumerable:d.path!=null},extensions:{enumerable:d.extensions!=null&&Object.keys(d.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?(Object.defineProperty(he(d),"stack",{value:u.stack,writable:!0,configurable:!0}),Vn(d)):(Error.captureStackTrace?Error.captureStackTrace(he(d),n):Object.defineProperty(he(d),"stack",{value:Error().stack,writable:!0,configurable:!0}),d)}return Ct(n,[{key:"toString",value:function(){return $t(this)}},{key:U,get:function(){return"Object"}}]),n}(sn(Error));function Bn(e){return e===void 0||e.length===0?void 0:e}function $t(e){var t=e.message;if(e.nodes)for(var n=0,i=e.nodes;n<i.length;n++){var r=i[n];r.loc&&(t+=`
4
+
5
+ `+Mt(r.loc))}else if(e.source&&e.locations)for(var a=0,s=e.locations;a<s.length;a++){var o=s[a];t+=`
6
+
7
+ `+Ln(e.source,o)}return t}var l=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 Te(e,t){var n=!!e;if(!n)throw new Error(t??"Unexpected invariant triggered.")}var Yt=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0,un=Yt;function B(e){var t=e.prototype.toJSON;typeof t=="function"||Te(0),e.prototype.inspect=t,un&&(e.prototype[un]=t)}var zt=function(){function e(n,i,r){this.start=n.start,this.end=i.end,this.startToken=n,this.endToken=i,this.source=r}var t=e.prototype;return t.toJSON=function(){return{start:this.start,end:this.end}},e}();B(zt);var Xt=function(){function e(n,i,r,a,s,o,u){this.kind=n,this.start=i,this.end=r,this.line=a,this.column=s,this.value=u,this.prev=o,this.next=null}var t=e.prototype;return t.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();B(Xt);function cn(e){return e!=null&&typeof e.kind=="string"}function Le(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Le=function(n){return typeof n}:Le=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Le(e)}var Ht=10,Pn=2;function S(e){return Re(e,[])}function Re(e,t){switch(Le(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return e===null?"null":Kt(e,t);default:return String(e)}}function Kt(e,t){if(t.indexOf(e)!==-1)return"[Circular]";var n=[].concat(t,[e]),i=ei(e);if(i!==void 0){var r=i.call(e);if(r!==e)return typeof r=="string"?r:Re(r,n)}else if(Array.isArray(e))return Zt(e,n);return Wt(e,n)}function Wt(e,t){var n=Object.keys(e);if(n.length===0)return"{}";if(t.length>Pn)return"["+ni(e)+"]";var i=n.map(function(r){var a=Re(e[r],t);return r+": "+a});return"{ "+i.join(", ")+" }"}function Zt(e,t){if(e.length===0)return"[]";if(t.length>Pn)return"[Array]";for(var n=Math.min(Ht,e.length),i=e.length-n,r=[],a=0;a<n;++a)r.push(Re(e[a],t));return i===1?r.push("... 1 more item"):i>1&&r.push("... ".concat(i," more items")),"["+r.join(", ")+"]"}function ei(e){var t=e[String(un)];if(typeof t=="function")return t;if(typeof e.inspect=="function")return e.inspect}function ni(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){var n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}function g(e,t){var n=!!e;if(!n)throw new Error(t)}function xe(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xe=function(n){return typeof n}:xe=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xe(e)}var J=function(t,n){if(t instanceof n)return!0;if(xe(t)==="object"&&t!==null){var i,r=n.prototype[Symbol.toStringTag],a=Symbol.toStringTag in t?t[Symbol.toStringTag]:(i=t.constructor)===null||i===void 0?void 0:i.name;if(r===a){var s=S(t);throw new Error("Cannot use ".concat(r,' "').concat(s,`" from another module or realm.
8
+
9
+ Ensure that there is only one instance of "graphql" in the node_modules
10
+ directory. If different versions of "graphql" are the dependencies of other
11
+ relied on modules, use "resolutions" to ensure only one version is installed.
12
+
13
+ https://yarnpkg.com/en/docs/selective-version-resolutions
14
+
15
+ Duplicate "graphql" modules cannot be used at the same time since different
16
+ versions may have different capabilities and behavior. The data from one
17
+ version used in the function from another could produce confusing and
18
+ spurious results.`))}}return!1};function Gn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ti(e,t,n){return t&&Gn(e.prototype,t),n&&Gn(e,n),e}(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof t=="string"||g(0,"Body must be a string. Received: ".concat(S(t),".")),this.body=t,this.name=n,this.locationOffset=i,this.locationOffset.line>0||g(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||g(0,"column in locationOffset is 1-indexed and must be positive.")}return ti(e,[{key:U,get:function(){return"Source"}}]),e})();var k=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 ii(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=e.indexOf(`
19
+ `)===-1,r=e[0]===" "||e[0]===" ",a=e[e.length-1]==='"',s=e[e.length-1]==="\\",o=!i||a||s||n,u="";return o&&!(i&&r)&&(u+=`
20
+ `+t),u+=t?e.replace(/\n/g,`
21
+ `+t):e,o&&(u+=`
22
+ `),'"""'+u.replace(/"""/g,'\\"""')+'"""'}var ri={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"]},ai=Object.freeze({});function jn(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ri,i=void 0,r=Array.isArray(e),a=[e],s=-1,o=[],u=void 0,c=void 0,p=void 0,m=[],y=[],d=e;do{s++;var v=s===a.length,T=v&&o.length!==0;if(v){if(c=y.length===0?void 0:m[m.length-1],u=p,p=y.pop(),T){if(r)u=u.slice();else{for(var E={},N=0,R=Object.keys(u);N<R.length;N++){var w=R[N];E[w]=u[w]}u=E}for(var _=0,I=0;I<o.length;I++){var Q=o[I][0],Y=o[I][1];r&&(Q-=_),r&&Y===null?(u.splice(Q,1),_++):u[Q]=Y}}s=i.index,a=i.keys,o=i.edits,r=i.inArray,i=i.prev}else{if(c=p?r?s:a[s]:void 0,u=p?p[c]:d,u==null)continue;p&&m.push(c)}var L=void 0;if(!Array.isArray(u)){if(!cn(u))throw new Error("Invalid AST Node: ".concat(S(u),"."));var te=ln(t,u.kind,v);if(te){if(L=te.call(t,u,c,p,m,y),L===ai)break;if(L===!1){if(!v){m.pop();continue}}else if(L!==void 0&&(o.push([c,L]),!v))if(cn(L))u=L;else{m.pop();continue}}}if(L===void 0&&T&&o.push([c,u]),v)m.pop();else{var an;i={inArray:r,index:s,keys:a,edits:o,prev:i},r=Array.isArray(u),a=r?u:(an=n[u.kind])!==null&&an!==void 0?an:[],s=-1,o=[],p&&y.push(p),p=u}}while(i!==void 0);return o.length!==0&&(d=o[o.length-1][1]),d}function ln(e,t,n){var i=e[t];if(i){if(!n&&typeof i=="function")return i;var r=n?i.leave:i.enter;if(typeof r=="function")return r}else{var a=n?e.leave:e.enter;if(a){if(typeof a=="function")return a;var s=a[t];if(typeof s=="function")return s}}}var oi=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 i=e[n];if(t(i))return i}},Cn=oi,si=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Z=si,ui=Object.entries||function(e){return Object.keys(e).map(function(t){return[t,e[t]]})},Se=ui;function Qn(e,t){return e.reduce(function(n,i){return n[t(i)]=i,n},Object.create(null))}function Ue(e,t){for(var n=Object.create(null),i=0,r=Se(e);i<r.length;i++){var a=r[i],s=a[0],o=a[1];n[s]=t(o,s)}return n}function x(e){if(Object.getPrototypeOf(e)===null)return e;for(var t=Object.create(null),n=0,i=Se(e);n<i.length;n++){var r=i[n],a=r[0],s=r[1];t[a]=s}return t}function fn(e,t,n){return e.reduce(function(i,r){return i[t(r)]=n(r),i},Object.create(null))}var ci=5;function li(e,t){var n=typeof e=="string"?[e,t]:[void 0,e],i=n[0],r=n[1],a=" Did you mean ";i&&(a+=i+" ");var s=r.map(function(c){return'"'.concat(c,'"')});switch(s.length){case 0:return"";case 1:return a+s[0]+"?";case 2:return a+s[0]+" or "+s[1]+"?"}var o=s.slice(0,ci),u=o.pop();return a+o.join(", ")+", or "+u+"?"}function qn(e){return e}function fi(e,t){for(var n=0,i=0;n<e.length&&i<t.length;){var r=e.charCodeAt(n),a=t.charCodeAt(i);if(Ve(r)&&Ve(a)){var s=0;do++n,s=s*10+r-dn,r=e.charCodeAt(n);while(Ve(r)&&s>0);var o=0;do++i,o=o*10+a-dn,a=t.charCodeAt(i);while(Ve(a)&&o>0);if(s<o)return-1;if(s>o)return 1}else{if(r<a)return-1;if(r>a)return 1;++n,++i}}return e.length-t.length}var dn=48,di=57;function Ve(e){return!isNaN(e)&&dn<=e&&e<=di}function pi(e,t){for(var n=Object.create(null),i=new vi(e),r=Math.floor(e.length*.4)+1,a=0;a<t.length;a++){var s=t[a],o=i.measure(s,r);o!==void 0&&(n[s]=o)}return Object.keys(n).sort(function(u,c){var p=n[u]-n[c];return p!==0?p:fi(u,c)})}var vi=function(){function e(n){this._input=n,this._inputLowerCase=n.toLowerCase(),this._inputArray=Jn(this._inputLowerCase),this._rows=[new Array(n.length+1).fill(0),new Array(n.length+1).fill(0),new Array(n.length+1).fill(0)]}var t=e.prototype;return t.measure=function(i,r){if(this._input===i)return 0;var a=i.toLowerCase();if(this._inputLowerCase===a)return 1;var s=Jn(a),o=this._inputArray;if(s.length<o.length){var u=s;s=o,o=u}var c=s.length,p=o.length;if(!(c-p>r)){for(var m=this._rows,y=0;y<=p;y++)m[0][y]=y;for(var d=1;d<=c;d++){for(var v=m[(d-1)%3],T=m[d%3],E=T[0]=d,N=1;N<=p;N++){var R=s[d-1]===o[N-1]?0:1,w=Math.min(v[N]+1,T[N-1]+1,v[N-1]+R);if(d>1&&N>1&&s[d-1]===o[N-2]&&s[d-2]===o[N-1]){var _=m[(d-2)%3][N-2];w=Math.min(w,_+1)}w<E&&(E=w),T[N]=w}if(E>r)return}var I=m[c%3][p];return I<=r?I:void 0}},e}();function Jn(e){for(var t=e.length,n=new Array(t),i=0;i<t;++i)n[i]=e.charCodeAt(i);return n}function $(e){return jn(e,{leave:hi})}var mi=80,hi={Name:function(t){return t.value},Variable:function(t){return"$"+t.name},Document:function(t){return f(t.definitions,`
23
+
24
+ `)+`
25
+ `},OperationDefinition:function(t){var n=t.operation,i=t.name,r=A("(",f(t.variableDefinitions,", "),")"),a=f(t.directives," "),s=t.selectionSet;return!i&&!a&&!r&&n==="query"?s:f([n,f([i,r]),a,s]," ")},VariableDefinition:function(t){var n=t.variable,i=t.type,r=t.defaultValue,a=t.directives;return n+": "+i+A(" = ",r)+A(" ",f(a," "))},SelectionSet:function(t){var n=t.selections;return G(n)},Field:function(t){var n=t.alias,i=t.name,r=t.arguments,a=t.directives,s=t.selectionSet,o=A("",n,": ")+i,u=o+A("(",f(r,", "),")");return u.length>mi&&(u=o+A(`(
26
+ `,Me(f(r,`
27
+ `)),`
28
+ )`)),f([u,f(a," "),s]," ")},Argument:function(t){var n=t.name,i=t.value;return n+": "+i},FragmentSpread:function(t){var n=t.name,i=t.directives;return"..."+n+A(" ",f(i," "))},InlineFragment:function(t){var n=t.typeCondition,i=t.directives,r=t.selectionSet;return f(["...",A("on ",n),f(i," "),r]," ")},FragmentDefinition:function(t){var n=t.name,i=t.typeCondition,r=t.variableDefinitions,a=t.directives,s=t.selectionSet;return"fragment ".concat(n).concat(A("(",f(r,", "),")")," ")+"on ".concat(i," ").concat(A("",f(a," ")," "))+s},IntValue:function(t){var n=t.value;return n},FloatValue:function(t){var n=t.value;return n},StringValue:function(t,n){var i=t.value,r=t.block;return r?ii(i,n==="description"?"":" "):JSON.stringify(i)},BooleanValue:function(t){var n=t.value;return n?"true":"false"},NullValue:function(){return"null"},EnumValue:function(t){var n=t.value;return n},ListValue:function(t){var n=t.values;return"["+f(n,", ")+"]"},ObjectValue:function(t){var n=t.fields;return"{"+f(n,", ")+"}"},ObjectField:function(t){var n=t.name,i=t.value;return n+": "+i},Directive:function(t){var n=t.name,i=t.arguments;return"@"+n+A("(",f(i,", "),")")},NamedType:function(t){var n=t.name;return n},ListType:function(t){var n=t.type;return"["+n+"]"},NonNullType:function(t){var n=t.type;return n+"!"},SchemaDefinition:P(function(e){var t=e.directives,n=e.operationTypes;return f(["schema",f(t," "),G(n)]," ")}),OperationTypeDefinition:function(t){var n=t.operation,i=t.type;return n+": "+i},ScalarTypeDefinition:P(function(e){var t=e.name,n=e.directives;return f(["scalar",t,f(n," ")]," ")}),ObjectTypeDefinition:P(function(e){var t=e.name,n=e.interfaces,i=e.directives,r=e.fields;return f(["type",t,A("implements ",f(n," & ")),f(i," "),G(r)]," ")}),FieldDefinition:P(function(e){var t=e.name,n=e.arguments,i=e.type,r=e.directives;return t+($n(n)?A(`(
29
+ `,Me(f(n,`
30
+ `)),`
31
+ )`):A("(",f(n,", "),")"))+": "+i+A(" ",f(r," "))}),InputValueDefinition:P(function(e){var t=e.name,n=e.type,i=e.defaultValue,r=e.directives;return f([t+": "+n,A("= ",i),f(r," ")]," ")}),InterfaceTypeDefinition:P(function(e){var t=e.name,n=e.interfaces,i=e.directives,r=e.fields;return f(["interface",t,A("implements ",f(n," & ")),f(i," "),G(r)]," ")}),UnionTypeDefinition:P(function(e){var t=e.name,n=e.directives,i=e.types;return f(["union",t,f(n," "),i&&i.length!==0?"= "+f(i," | "):""]," ")}),EnumTypeDefinition:P(function(e){var t=e.name,n=e.directives,i=e.values;return f(["enum",t,f(n," "),G(i)]," ")}),EnumValueDefinition:P(function(e){var t=e.name,n=e.directives;return f([t,f(n," ")]," ")}),InputObjectTypeDefinition:P(function(e){var t=e.name,n=e.directives,i=e.fields;return f(["input",t,f(n," "),G(i)]," ")}),DirectiveDefinition:P(function(e){var t=e.name,n=e.arguments,i=e.repeatable,r=e.locations;return"directive @"+t+($n(n)?A(`(
32
+ `,Me(f(n,`
33
+ `)),`
34
+ )`):A("(",f(n,", "),")"))+(i?" repeatable":"")+" on "+f(r," | ")}),SchemaExtension:function(t){var n=t.directives,i=t.operationTypes;return f(["extend schema",f(n," "),G(i)]," ")},ScalarTypeExtension:function(t){var n=t.name,i=t.directives;return f(["extend scalar",n,f(i," ")]," ")},ObjectTypeExtension:function(t){var n=t.name,i=t.interfaces,r=t.directives,a=t.fields;return f(["extend type",n,A("implements ",f(i," & ")),f(r," "),G(a)]," ")},InterfaceTypeExtension:function(t){var n=t.name,i=t.interfaces,r=t.directives,a=t.fields;return f(["extend interface",n,A("implements ",f(i," & ")),f(r," "),G(a)]," ")},UnionTypeExtension:function(t){var n=t.name,i=t.directives,r=t.types;return f(["extend union",n,f(i," "),r&&r.length!==0?"= "+f(r," | "):""]," ")},EnumTypeExtension:function(t){var n=t.name,i=t.directives,r=t.values;return f(["extend enum",n,f(i," "),G(r)]," ")},InputObjectTypeExtension:function(t){var n=t.name,i=t.directives,r=t.fields;return f(["extend input",n,f(i," "),G(r)]," ")}};function P(e){return function(t){return f([t.description,e(t)],`
35
+ `)}}function f(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(t=e?.filter(function(i){return i}).join(n))!==null&&t!==void 0?t:""}function G(e){return A(`{
36
+ `,Me(f(e,`
37
+ `)),`
38
+ }`)}function A(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return t!=null&&t!==""?e+t+n:""}function Me(e){return A(" ",e.replace(/\n/g,`
39
+ `))}function yi(e){return e.indexOf(`
40
+ `)!==-1}function $n(e){return e!=null&&e.some(yi)}function pn(e,t){switch(e.kind){case l.NULL:return null;case l.INT:return parseInt(e.value,10);case l.FLOAT:return parseFloat(e.value);case l.STRING:case l.ENUM:case l.BOOLEAN:return e.value;case l.LIST:return e.values.map(function(n){return pn(n,t)});case l.OBJECT:return fn(e.fields,function(n){return n.name.value},function(n){return pn(n.value,t)});case l.VARIABLE:return t?.[e.name.value]}Te(0,"Unexpected value node: "+S(e))}function Yn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ie(e,t,n){return t&&Yn(e.prototype,t),n&&Yn(e,n),e}function zn(e){return Ne(e)||q(e)||V(e)||z(e)||X(e)||ee(e)||ke(e)||re(e)}function gi(e){if(!zn(e))throw new Error("Expected ".concat(S(e)," to be a GraphQL type."));return e}function Ne(e){return J(e,ne)}function q(e){return J(e,H)}function V(e){return J(e,Zn)}function z(e){return J(e,et)}function X(e){return J(e,Ge)}function ee(e){return J(e,nt)}function ke(e){return J(e,D)}function re(e){return J(e,h)}function ae(e){return Ne(e)||X(e)||ee(e)||mn(e)&&ae(e.ofType)}function Be(e){return Ne(e)||q(e)||V(e)||z(e)||X(e)||mn(e)&&Be(e.ofType)}function Ti(e){return Ne(e)||X(e)}function vn(e){return q(e)||V(e)||z(e)}function Si(e){return V(e)||z(e)}function D(e){if(this instanceof D)this.ofType=gi(e);else return new D(e)}D.prototype.toString=function(){return"["+String(this.ofType)+"]"},D.prototype.toJSON=function(){return this.toString()},Object.defineProperty(D.prototype,U,{get:function(){return"GraphQLList"}}),B(D);function h(e){if(this instanceof h)this.ofType=ki(e);else return new h(e)}h.prototype.toString=function(){return String(this.ofType)+"!"},h.prototype.toJSON=function(){return this.toString()},Object.defineProperty(h.prototype,U,{get:function(){return"GraphQLNonNull"}}),B(h);function mn(e){return ke(e)||re(e)}function Ni(e){return zn(e)&&!re(e)}function ki(e){if(!Ni(e))throw new Error("Expected ".concat(S(e)," to be a GraphQL nullable type."));return e}function Ei(e){if(e)return re(e)?e.ofType:e}function Ee(e){if(e){for(var t=e;mn(t);)t=t.ofType;return t}}function Pe(e){return typeof e=="function"?e():e}function oe(e){return e&&e.length>0?e:void 0}var ne=function(){function e(n){var i,r,a,s=(i=n.parseValue)!==null&&i!==void 0?i:qn;this.name=n.name,this.description=n.description,this.specifiedByUrl=n.specifiedByUrl,this.serialize=(r=n.serialize)!==null&&r!==void 0?r:qn,this.parseValue=s,this.parseLiteral=(a=n.parseLiteral)!==null&&a!==void 0?a:function(o,u){return s(pn(o,u))},this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=oe(n.extensionASTNodes),typeof n.name=="string"||g(0,"Must provide name."),n.specifiedByUrl==null||typeof n.specifiedByUrl=="string"||g(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(S(n.specifiedByUrl),".")),n.serialize==null||typeof n.serialize=="function"||g(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.')),n.parseLiteral&&(typeof n.parseValue=="function"&&typeof n.parseLiteral=="function"||g(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){var i;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:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ie(e,[{key:U,get:function(){return"GraphQLScalarType"}}]),e}();B(ne);var H=function(){function e(n){this.name=n.name,this.description=n.description,this.isTypeOf=n.isTypeOf,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=oe(n.extensionASTNodes),this._fields=Hn.bind(void 0,n),this._interfaces=Xn.bind(void 0,n),typeof n.name=="string"||g(0,"Must provide name."),n.isTypeOf==null||typeof n.isTypeOf=="function"||g(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(S(n.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Kn(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()},ie(e,[{key:U,get:function(){return"GraphQLObjectType"}}]),e}();B(H);function Xn(e){var t,n=(t=Pe(e.interfaces))!==null&&t!==void 0?t:[];return Array.isArray(n)||g(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),n}function Hn(e){var t=Pe(e.fields);return se(t)||g(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Ue(t,function(n,i){var r;se(n)||g(0,"".concat(e.name,".").concat(i," field config must be an object.")),!("isDeprecated"in n)||g(0,"".concat(e.name,".").concat(i,' should provide "deprecationReason" instead of "isDeprecated".')),n.resolve==null||typeof n.resolve=="function"||g(0,"".concat(e.name,".").concat(i," field resolver must be a function if ")+"provided, but got: ".concat(S(n.resolve),"."));var a=(r=n.args)!==null&&r!==void 0?r:{};se(a)||g(0,"".concat(e.name,".").concat(i," args must be an object with argument names as keys."));var s=Se(a).map(function(o){var u=o[0],c=o[1];return{name:u,description:c.description,type:c.type,defaultValue:c.defaultValue,deprecationReason:c.deprecationReason,extensions:c.extensions&&x(c.extensions),astNode:c.astNode}});return{name:i,description:n.description,type:n.type,args:s,resolve:n.resolve,subscribe:n.subscribe,isDeprecated:n.deprecationReason!=null,deprecationReason:n.deprecationReason,extensions:n.extensions&&x(n.extensions),astNode:n.astNode}})}function se(e){return W(e)&&!Array.isArray(e)}function Kn(e){return Ue(e,function(t){return{description:t.description,type:t.type,args:Wn(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}})}function Wn(e){return fn(e,function(t){return t.name},function(t){return{description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}})}var Zn=function(){function e(n){this.name=n.name,this.description=n.description,this.resolveType=n.resolveType,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=oe(n.extensionASTNodes),this._fields=Hn.bind(void 0,n),this._interfaces=Xn.bind(void 0,n),typeof n.name=="string"||g(0,"Must provide name."),n.resolveType==null||typeof n.resolveType=="function"||g(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(S(n.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){var i;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Kn(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ie(e,[{key:U,get:function(){return"GraphQLInterfaceType"}}]),e}();B(Zn);var et=function(){function e(n){this.name=n.name,this.description=n.description,this.resolveType=n.resolveType,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=oe(n.extensionASTNodes),this._types=Ii.bind(void 0,n),typeof n.name=="string"||g(0,"Must provide name."),n.resolveType==null||typeof n.resolveType=="function"||g(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(S(n.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return typeof this._types=="function"&&(this._types=this._types()),this._types},t.toConfig=function(){var i;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ie(e,[{key:U,get:function(){return"GraphQLUnionType"}}]),e}();B(et);function Ii(e){var t=Pe(e.types);return Array.isArray(t)||g(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}var Ge=function(){function e(n){this.name=n.name,this.description=n.description,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=oe(n.extensionASTNodes),this._values=bi(this.name,n.values),this._valueLookup=new Map(this._values.map(function(i){return[i.value,i]})),this._nameLookup=Qn(this._values,function(i){return i.name}),typeof n.name=="string"||g(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(i){return this._nameLookup[i]},t.serialize=function(i){var r=this._valueLookup.get(i);if(r===void 0)throw new b('Enum "'.concat(this.name,'" cannot represent value: ').concat(S(i)));return r.name},t.parseValue=function(i){if(typeof i!="string"){var r=S(i);throw new b('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(r,".")+je(this,r))}var a=this.getValue(i);if(a==null)throw new b('Value "'.concat(i,'" does not exist in "').concat(this.name,'" enum.')+je(this,i));return a.value},t.parseLiteral=function(i,r){if(i.kind!==l.ENUM){var a=$(i);throw new b('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(a,".")+je(this,a),i)}var s=this.getValue(i.value);if(s==null){var o=$(i);throw new b('Value "'.concat(o,'" does not exist in "').concat(this.name,'" enum.')+je(this,o),i)}return s.value},t.toConfig=function(){var i,r=fn(this.getValues(),function(a){return a.name},function(a){return{description:a.description,value:a.value,deprecationReason:a.deprecationReason,extensions:a.extensions,astNode:a.astNode}});return{name:this.name,description:this.description,values:r,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ie(e,[{key:U,get:function(){return"GraphQLEnumType"}}]),e}();B(Ge);function je(e,t){var n=e.getValues().map(function(r){return r.name}),i=pi(t,n);return li("the enum value",i)}function bi(e,t){return se(t)||g(0,"".concat(e," values must be an object with value names as keys.")),Se(t).map(function(n){var i=n[0],r=n[1];return se(r)||g(0,"".concat(e,".").concat(i,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(S(r),".")),!("isDeprecated"in r)||g(0,"".concat(e,".").concat(i,' should provide "deprecationReason" instead of "isDeprecated".')),{name:i,description:r.description,value:r.value!==void 0?r.value:i,isDeprecated:r.deprecationReason!=null,deprecationReason:r.deprecationReason,extensions:r.extensions&&x(r.extensions),astNode:r.astNode}})}var nt=function(){function e(n){this.name=n.name,this.description=n.description,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=oe(n.extensionASTNodes),this._fields=Ai.bind(void 0,n),typeof n.name=="string"||g(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var i,r=Ue(this.getFields(),function(a){return{description:a.description,type:a.type,defaultValue:a.defaultValue,deprecationReason:a.deprecationReason,extensions:a.extensions,astNode:a.astNode}});return{name:this.name,description:this.description,fields:r,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ie(e,[{key:U,get:function(){return"GraphQLInputObjectType"}}]),e}();B(nt);function Ai(e){var t=Pe(e.fields);return se(t)||g(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Ue(t,function(n,i){return!("resolve"in n)||g(0,"".concat(e.name,".").concat(i," field has a resolve property, but Input Types cannot define resolvers.")),{name:i,description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions&&x(n.extensions),astNode:n.astNode}})}var Oi=Array.from||function(e,t,n){if(e==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");var i=e[_n];if(typeof i=="function"){for(var r=i.call(e),a=[],s,o=0;!(s=r.next()).done;++o)if(a.push(t.call(n,s.value,o)),o>9999999)throw new TypeError("Near-infinite iteration.");return a}var u=e.length;if(typeof u=="number"&&u>=0&&u%1===0){for(var c=[],p=0;p<u;++p)Object.prototype.hasOwnProperty.call(e,p)&&c.push(t.call(n,e[p],p));return c}return[]},Di=Oi,wi=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Ie=wi;function Ce(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ce=function(n){return typeof n}:Ce=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ce(e)}function Fi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(p){return p};if(e==null||Ce(e)!=="object")return null;if(Array.isArray(e))return e.map(t);var n=e[_n];if(typeof n=="function"){for(var i=n.call(e),r=[],a,s=0;!(a=i.next()).done;++s)r.push(t(a.value,s));return r}var o=e.length;if(typeof o=="number"&&o>=0&&o%1===0){for(var u=[],c=0;c<o;++c){if(!Object.prototype.hasOwnProperty.call(e,c))return null;u.push(t(e[String(c)],c))}return u}return null}var _i=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},Qe=_i,hn=2147483647,yn=-2147483648;function Li(e){var t=be(e);if(typeof t=="boolean")return t?1:0;var n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),!Qe(n))throw new b("Int cannot represent non-integer value: ".concat(S(t)));if(n>hn||n<yn)throw new b("Int cannot represent non 32-bit signed integer value: "+S(t));return n}function Ri(e){if(!Qe(e))throw new b("Int cannot represent non-integer value: ".concat(S(e)));if(e>hn||e<yn)throw new b("Int cannot represent non 32-bit signed integer value: ".concat(e));return e}var xi=new ne({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:Li,parseValue:Ri,parseLiteral:function(t){if(t.kind!==l.INT)throw new b("Int cannot represent non-integer value: ".concat($(t)),t);var n=parseInt(t.value,10);if(n>hn||n<yn)throw new b("Int cannot represent non 32-bit signed integer value: ".concat(t.value),t);return n}});function Ui(e){var t=be(e);if(typeof t=="boolean")return t?1:0;var n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),!Ie(n))throw new b("Float cannot represent non numeric value: ".concat(S(t)));return n}function Vi(e){if(!Ie(e))throw new b("Float cannot represent non numeric value: ".concat(S(e)));return e}var Mi=new ne({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:Ui,parseValue:Vi,parseLiteral:function(t){if(t.kind!==l.FLOAT&&t.kind!==l.INT)throw new b("Float cannot represent non numeric value: ".concat($(t)),t);return parseFloat(t.value)}});function be(e){if(W(e)){if(typeof e.valueOf=="function"){var t=e.valueOf();if(!W(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function Bi(e){var t=be(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(Ie(t))return t.toString();throw new b("String cannot represent value: ".concat(S(e)))}function Pi(e){if(typeof e!="string")throw new b("String cannot represent a non string value: ".concat(S(e)));return e}var O=new ne({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:Bi,parseValue:Pi,parseLiteral:function(t){if(t.kind!==l.STRING)throw new b("String cannot represent a non string value: ".concat($(t)),t);return t.value}});function Gi(e){var t=be(e);if(typeof t=="boolean")return t;if(Ie(t))return t!==0;throw new b("Boolean cannot represent a non boolean value: ".concat(S(t)))}function ji(e){if(typeof e!="boolean")throw new b("Boolean cannot represent a non boolean value: ".concat(S(e)));return e}var M=new ne({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:Gi,parseValue:ji,parseLiteral:function(t){if(t.kind!==l.BOOLEAN)throw new b("Boolean cannot represent a non boolean value: ".concat($(t)),t);return t.value}});function Ci(e){var t=be(e);if(typeof t=="string")return t;if(Qe(t))return String(t);throw new b("ID cannot represent value: ".concat(S(e)))}function Qi(e){if(typeof e=="string")return e;if(Qe(e))return e.toString();throw new b("ID cannot represent value: ".concat(S(e)))}var tt=new ne({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:Ci,parseValue:Qi,parseLiteral:function(t){if(t.kind!==l.STRING&&t.kind!==l.INT)throw new b("ID cannot represent a non-string and non-integer value: "+$(t),t);return t.value}}),it=Object.freeze([O,xi,Mi,M,tt]);function Ae(e,t){if(re(t)){var n=Ae(e,t.ofType);return n?.kind===l.NULL?null:n}if(e===null)return{kind:l.NULL};if(e===void 0)return null;if(ke(t)){var i=t.ofType,r=Fi(e);if(r!=null){for(var a=[],s=0;s<r.length;s++){var o=r[s],u=Ae(o,i);u!=null&&a.push(u)}return{kind:l.LIST,values:a}}return Ae(e,i)}if(ee(t)){if(!W(e))return null;for(var c=[],p=0,m=Z(t.getFields());p<m.length;p++){var y=m[p],d=Ae(e[y.name],y.type);d&&c.push({kind:l.OBJECT_FIELD,name:{kind:l.NAME,value:y.name},value:d})}return{kind:l.OBJECT,fields:c}}if(Ti(t)){var v=t.serialize(e);if(v==null)return null;if(typeof v=="boolean")return{kind:l.BOOLEAN,value:v};if(typeof v=="number"&&Ie(v)){var T=String(v);return rt.test(T)?{kind:l.INT,value:T}:{kind:l.FLOAT,value:T}}if(typeof v=="string")return X(t)?{kind:l.ENUM,value:v}:t===tt&&rt.test(v)?{kind:l.INT,value:v}:{kind:l.STRING,value:v};throw new TypeError("Cannot convert value to AST: ".concat(S(v),"."))}Te(0,"Unexpected input type: "+S(t))}var rt=/^-?(?:0|[1-9][0-9]*)$/,gn=new H({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{description:{type:O,resolve:function(n){return n.description}},types:{description:"A list of all types supported by this server.",type:new h(new D(new h(j))),resolve:function(n){return Z(n.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new h(j),resolve:function(n){return n.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:j,resolve:function(n){return n.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:j,resolve:function(n){return n.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new h(new D(new h(at))),resolve:function(n){return n.getDirectives()}}}}}),at=new H({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
41
+
42
+ In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:function(){return{name:{type:new h(O),resolve:function(n){return n.name}},description:{type:O,resolve:function(n){return n.description}},isRepeatable:{type:new h(M),resolve:function(n){return n.isRepeatable}},locations:{type:new h(new D(new h(ot))),resolve:function(n){return n.locations}},args:{type:new h(new D(new h(qe))),args:{includeDeprecated:{type:M,defaultValue:!1}},resolve:function(n,i){var r=i.includeDeprecated;return r?n.args:n.args.filter(function(a){return a.deprecationReason==null})}}}}}),ot=new Ge({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:k.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:k.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:k.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:k.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:k.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:k.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:k.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:k.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:k.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:k.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:k.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:k.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:k.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:k.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:k.UNION,description:"Location adjacent to a union definition."},ENUM:{value:k.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:k.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:k.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:k.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),j=new H({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new h(ct),resolve:function(n){if(Ne(n))return F.SCALAR;if(q(n))return F.OBJECT;if(V(n))return F.INTERFACE;if(z(n))return F.UNION;if(X(n))return F.ENUM;if(ee(n))return F.INPUT_OBJECT;if(ke(n))return F.LIST;if(re(n))return F.NON_NULL;Te(0,'Unexpected type: "'.concat(S(n),'".'))}},name:{type:O,resolve:function(n){return n.name!==void 0?n.name:void 0}},description:{type:O,resolve:function(n){return n.description!==void 0?n.description:void 0}},specifiedByUrl:{type:O,resolve:function(n){return n.specifiedByUrl!==void 0?n.specifiedByUrl:void 0}},fields:{type:new D(new h(st)),args:{includeDeprecated:{type:M,defaultValue:!1}},resolve:function(n,i){var r=i.includeDeprecated;if(q(n)||V(n)){var a=Z(n.getFields());return r?a:a.filter(function(s){return s.deprecationReason==null})}}},interfaces:{type:new D(new h(j)),resolve:function(n){if(q(n)||V(n))return n.getInterfaces()}},possibleTypes:{type:new D(new h(j)),resolve:function(n,i,r,a){var s=a.schema;if(Si(n))return s.getPossibleTypes(n)}},enumValues:{type:new D(new h(ut)),args:{includeDeprecated:{type:M,defaultValue:!1}},resolve:function(n,i){var r=i.includeDeprecated;if(X(n)){var a=n.getValues();return r?a:a.filter(function(s){return s.deprecationReason==null})}}},inputFields:{type:new D(new h(qe)),args:{includeDeprecated:{type:M,defaultValue:!1}},resolve:function(n,i){var r=i.includeDeprecated;if(ee(n)){var a=Z(n.getFields());return r?a:a.filter(function(s){return s.deprecationReason==null})}}},ofType:{type:j,resolve:function(n){return n.ofType!==void 0?n.ofType:void 0}}}}}),st=new H({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new h(O),resolve:function(n){return n.name}},description:{type:O,resolve:function(n){return n.description}},args:{type:new h(new D(new h(qe))),args:{includeDeprecated:{type:M,defaultValue:!1}},resolve:function(n,i){var r=i.includeDeprecated;return r?n.args:n.args.filter(function(a){return a.deprecationReason==null})}},type:{type:new h(j),resolve:function(n){return n.type}},isDeprecated:{type:new h(M),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:O,resolve:function(n){return n.deprecationReason}}}}}),qe=new H({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new h(O),resolve:function(n){return n.name}},description:{type:O,resolve:function(n){return n.description}},type:{type:new h(j),resolve:function(n){return n.type}},defaultValue:{type:O,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(n){var i=n.type,r=n.defaultValue,a=Ae(r,i);return a?$(a):null}},isDeprecated:{type:new h(M),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:O,resolve:function(n){return n.deprecationReason}}}}}),ut=new H({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:new h(O),resolve:function(n){return n.name}},description:{type:O,resolve:function(n){return n.description}},isDeprecated:{type:new h(M),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:O,resolve:function(n){return n.deprecationReason}}}}}),F=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"}),ct=new Ge({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:F.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:F.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:F.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:F.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:F.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:F.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:F.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:F.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),lt={name:"__schema",type:new h(gn),description:"Access the current type schema of this server.",args:[],resolve:function(t,n,i,r){var a=r.schema;return a},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},ft={name:"__type",type:j,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new h(O),defaultValue:void 0,deprecationReason:void 0,extensions:void 0,astNode:void 0}],resolve:function(t,n,i,r){var a=n.name,s=r.schema;return s.getType(a)},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},dt={name:"__typename",type:new h(O),description:"The name of the current Object type at runtime.",args:[],resolve:function(t,n,i,r){var a=r.parentType;return a.name},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},pt=Object.freeze([gn,at,ot,j,st,qe,ut,ct]);function vt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function qi(e,t,n){return t&&vt(e.prototype,t),n&&vt(e,n),e}function Ji(e){return J(e,ue)}var ue=function(){function e(n){var i,r;this.name=n.name,this.description=n.description,this.locations=n.locations,this.isRepeatable=(i=n.isRepeatable)!==null&&i!==void 0?i:!1,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,n.name||g(0,"Directive must be named."),Array.isArray(n.locations)||g(0,"@".concat(n.name," locations must be an Array."));var a=(r=n.args)!==null&&r!==void 0?r:{};W(a)&&!Array.isArray(a)||g(0,"@".concat(n.name," args must be an object with argument names as keys.")),this.args=Se(a).map(function(s){var o=s[0],u=s[1];return{name:o,description:u.description,type:u.type,defaultValue:u.defaultValue,deprecationReason:u.deprecationReason,extensions:u.extensions&&x(u.extensions),astNode:u.astNode}})}var t=e.prototype;return t.toConfig=function(){return{name:this.name,description:this.description,locations:this.locations,args:Wn(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}},t.toString=function(){return"@"+this.name},t.toJSON=function(){return this.toString()},qi(e,[{key:U,get:function(){return"GraphQLDirective"}}]),e}();B(ue);var $i=new ue({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[k.FIELD,k.FRAGMENT_SPREAD,k.INLINE_FRAGMENT],args:{if:{type:new h(M),description:"Included when true."}}}),Yi=new ue({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[k.FIELD,k.FRAGMENT_SPREAD,k.INLINE_FRAGMENT],args:{if:{type:new h(M),description:"Skipped when true."}}}),zi="No longer supported",Xi=new ue({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[k.FIELD_DEFINITION,k.ARGUMENT_DEFINITION,k.INPUT_FIELD_DEFINITION,k.ENUM_VALUE],args:{reason:{type:O,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:zi}}}),Hi=new ue({name:"specifiedBy",description:"Exposes a URL that specifies the behaviour of this scalar.",locations:[k.SCALAR],args:{url:{type:new h(O),description:"The URL that specifies the behaviour of this scalar."}}}),Ki=Object.freeze([$i,Yi,Xi,Hi]);function mt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Wi(e,t,n){return t&&mt(e.prototype,t),n&&mt(e,n),e}(function(){function e(n){var i;this.__validationErrors=n.assumeValid===!0?[]:void 0,W(n)||g(0,"Must provide configuration object."),!n.types||Array.isArray(n.types)||g(0,'"types" must be Array if provided but got: '.concat(S(n.types),".")),!n.directives||Array.isArray(n.directives)||g(0,'"directives" must be Array if provided but got: '+"".concat(S(n.directives),".")),this.description=n.description,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=n.extensionASTNodes,this._queryType=n.query,this._mutationType=n.mutation,this._subscriptionType=n.subscription,this._directives=(i=n.directives)!==null&&i!==void 0?i:Ki;var r=new Set(n.types);if(n.types!=null)for(var a=0,s=n.types;a<s.length;a++){var o=s[a];r.delete(o),C(o,r)}this._queryType!=null&&C(this._queryType,r),this._mutationType!=null&&C(this._mutationType,r),this._subscriptionType!=null&&C(this._subscriptionType,r);for(var u=0,c=this._directives;u<c.length;u++){var p=c[u];if(Ji(p))for(var m=0,y=p.args;m<y.length;m++){var d=y[m];C(d.type,r)}}C(gn,r),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(var v=0,T=Di(r);v<T.length;v++){var E=T[v];if(E!=null){var N=E.name;if(N||g(0,"One of the provided types for building the Schema is missing a name."),this._typeMap[N]!==void 0)throw new Error('Schema must contain uniquely named types but contains multiple types named "'.concat(N,'".'));if(this._typeMap[N]=E,V(E))for(var R=0,w=E.getInterfaces();R<w.length;R++){var _=w[R];if(V(_)){var I=this._implementationsMap[_.name];I===void 0&&(I=this._implementationsMap[_.name]={objects:[],interfaces:[]}),I.interfaces.push(E)}}else if(q(E))for(var Q=0,Y=E.getInterfaces();Q<Y.length;Q++){var L=Y[Q];if(V(L)){var te=this._implementationsMap[L.name];te===void 0&&(te=this._implementationsMap[L.name]={objects:[],interfaces:[]}),te.objects.push(E)}}}}}var t=e.prototype;return t.getQueryType=function(){return this._queryType},t.getMutationType=function(){return this._mutationType},t.getSubscriptionType=function(){return this._subscriptionType},t.getTypeMap=function(){return this._typeMap},t.getType=function(i){return this.getTypeMap()[i]},t.getPossibleTypes=function(i){return z(i)?i.getTypes():this.getImplementations(i).objects},t.getImplementations=function(i){var r=this._implementationsMap[i.name];return r??{objects:[],interfaces:[]}},t.isPossibleType=function(i,r){return this.isSubType(i,r)},t.isSubType=function(i,r){var a=this._subTypeMap[i.name];if(a===void 0){if(a=Object.create(null),z(i))for(var s=0,o=i.getTypes();s<o.length;s++){var u=o[s];a[u.name]=!0}else{for(var c=this.getImplementations(i),p=0,m=c.objects;p<m.length;p++){var y=m[p];a[y.name]=!0}for(var d=0,v=c.interfaces;d<v.length;d++){var T=v[d];a[T.name]=!0}}this._subTypeMap[i.name]=a}return a[r.name]!==void 0},t.getDirectives=function(){return this._directives},t.getDirective=function(i){return Cn(this.getDirectives(),function(r){return r.name===i})},t.toConfig=function(){var i;return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Z(this.getTypeMap()),directives:this.getDirectives().slice(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[],assumeValid:this.__validationErrors!==void 0}},Wi(e,[{key:U,get:function(){return"GraphQLSchema"}}]),e})();function C(e,t){var n=Ee(e);if(!t.has(n)){if(t.add(n),z(n))for(var i=0,r=n.getTypes();i<r.length;i++){var a=r[i];C(a,t)}else if(q(n)||V(n)){for(var s=0,o=n.getInterfaces();s<o.length;s++){var u=o[s];C(u,t)}for(var c=0,p=Z(n.getFields());c<p.length;c++){var m=p[c];C(m.type,t);for(var y=0,d=m.args;y<d.length;y++){var v=d[y];C(v.type,t)}}}else if(ee(n))for(var T=0,E=Z(n.getFields());T<E.length;T++){var N=E[T];C(N.type,t)}}return t}function Je(e,t){var n;if(t.kind===l.LIST_TYPE)return n=Je(e,t.type),n&&new D(n);if(t.kind===l.NON_NULL_TYPE)return n=Je(e,t.type),n&&new h(n);if(t.kind===l.NAMED_TYPE)return e.getType(t.name.value);Te(0,"Unexpected type node: "+S(t))}var Zi=function(){function e(n,i,r){this._schema=n,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=i??er,r&&(ae(r)&&this._inputTypeStack.push(r),vn(r)&&this._parentTypeStack.push(r),Be(r)&&this._typeStack.push(r))}var t=e.prototype;return t.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},t.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},t.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},t.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},t.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},t.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},t.getDirective=function(){return this._directive},t.getArgument=function(){return this._argument},t.getEnumValue=function(){return this._enumValue},t.enter=function(i){var r=this._schema;switch(i.kind){case l.SELECTION_SET:{var a=Ee(this.getType());this._parentTypeStack.push(vn(a)?a:void 0);break}case l.FIELD:{var s=this.getParentType(),o,u;s&&(o=this._getFieldDef(r,s,i),o&&(u=o.type)),this._fieldDefStack.push(o),this._typeStack.push(Be(u)?u:void 0);break}case l.DIRECTIVE:this._directive=r.getDirective(i.name.value);break;case l.OPERATION_DEFINITION:{var c;switch(i.operation){case"query":c=r.getQueryType();break;case"mutation":c=r.getMutationType();break;case"subscription":c=r.getSubscriptionType();break}this._typeStack.push(q(c)?c:void 0);break}case l.INLINE_FRAGMENT:case l.FRAGMENT_DEFINITION:{var p=i.typeCondition,m=p?Je(r,p):Ee(this.getType());this._typeStack.push(Be(m)?m:void 0);break}case l.VARIABLE_DEFINITION:{var y=Je(r,i.type);this._inputTypeStack.push(ae(y)?y:void 0);break}case l.ARGUMENT:{var d,v,T,E=(d=this.getDirective())!==null&&d!==void 0?d:this.getFieldDef();E&&(v=Cn(E.args,function(L){return L.name===i.name.value}),v&&(T=v.type)),this._argument=v,this._defaultValueStack.push(v?v.defaultValue:void 0),this._inputTypeStack.push(ae(T)?T:void 0);break}case l.LIST:{var N=Ei(this.getInputType()),R=ke(N)?N.ofType:N;this._defaultValueStack.push(void 0),this._inputTypeStack.push(ae(R)?R:void 0);break}case l.OBJECT_FIELD:{var w=Ee(this.getInputType()),_,I;ee(w)&&(I=w.getFields()[i.name.value],I&&(_=I.type)),this._defaultValueStack.push(I?I.defaultValue:void 0),this._inputTypeStack.push(ae(_)?_:void 0);break}case l.ENUM:{var Q=Ee(this.getInputType()),Y;X(Q)&&(Y=Q.getValue(i.value)),this._enumValue=Y;break}}},t.leave=function(i){switch(i.kind){case l.SELECTION_SET:this._parentTypeStack.pop();break;case l.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case l.DIRECTIVE:this._directive=null;break;case l.OPERATION_DEFINITION:case l.INLINE_FRAGMENT:case l.FRAGMENT_DEFINITION:this._typeStack.pop();break;case l.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case l.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.LIST:case l.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.ENUM:this._enumValue=null;break}},e}();function er(e,t,n){var i=n.name.value;if(i===lt.name&&e.getQueryType()===t)return lt;if(i===ft.name&&e.getQueryType()===t)return ft;if(i===dt.name&&vn(t))return dt;if(q(t)||V(t))return t.getFields()[i]}function nr(e,t){return{enter:function(i){e.enter(i);var r=ln(t,i.kind,!1);if(r){var a=r.apply(t,arguments);return a!==void 0&&(e.leave(i),cn(a)&&e.enter(a)),a}},leave:function(i){var r=ln(t,i.kind,!0),a;return r&&(a=r.apply(t,arguments)),e.leave(i),a}}}[].concat(it,pt).map(function(e){return e.name});var K;function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}K={},ce(K,l.SCALAR_TYPE_DEFINITION,l.SCALAR_TYPE_EXTENSION),ce(K,l.OBJECT_TYPE_DEFINITION,l.OBJECT_TYPE_EXTENSION),ce(K,l.INTERFACE_TYPE_DEFINITION,l.INTERFACE_TYPE_EXTENSION),ce(K,l.UNION_TYPE_DEFINITION,l.UNION_TYPE_EXTENSION),ce(K,l.ENUM_TYPE_DEFINITION,l.ENUM_TYPE_EXTENSION),ce(K,l.INPUT_OBJECT_TYPE_DEFINITION,l.INPUT_OBJECT_TYPE_EXTENSION);function ht(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var yt=function(){function e(n,i){this._ast=n,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=i}var t=e.prototype;return t.reportError=function(i){this._onError(i)},t.getDocument=function(){return this._ast},t.getFragment=function(i){var r=this._fragments;return r||(this._fragments=r=this.getDocument().definitions.reduce(function(a,s){return s.kind===l.FRAGMENT_DEFINITION&&(a[s.name.value]=s),a},Object.create(null))),r[i]},t.getFragmentSpreads=function(i){var r=this._fragmentSpreads.get(i);if(!r){r=[];for(var a=[i];a.length!==0;)for(var s=a.pop(),o=0,u=s.selections;o<u.length;o++){var c=u[o];c.kind===l.FRAGMENT_SPREAD?r.push(c):c.selectionSet&&a.push(c.selectionSet)}this._fragmentSpreads.set(i,r)}return r},t.getRecursivelyReferencedFragments=function(i){var r=this._recursivelyReferencedFragments.get(i);if(!r){r=[];for(var a=Object.create(null),s=[i.selectionSet];s.length!==0;)for(var o=s.pop(),u=0,c=this.getFragmentSpreads(o);u<c.length;u++){var p=c[u],m=p.name.value;if(a[m]!==!0){a[m]=!0;var y=this.getFragment(m);y&&(r.push(y),s.push(y.selectionSet))}}this._recursivelyReferencedFragments.set(i,r)}return r},e}();(function(e){ht(t,e);function t(i,r,a){var s;return s=e.call(this,i,a)||this,s._schema=r,s}var n=t.prototype;return n.getSchema=function(){return this._schema},t})(yt),function(e){ht(t,e);function t(i,r,a,s){var o;return o=e.call(this,r,s)||this,o._schema=i,o._typeInfo=a,o._variableUsages=new Map,o._recursiveVariableUsages=new Map,o}var n=t.prototype;return n.getSchema=function(){return this._schema},n.getVariableUsages=function(r){var a=this._variableUsages.get(r);if(!a){var s=[],o=new Zi(this._schema);jn(r,nr(o,{VariableDefinition:function(){return!1},Variable:function(c){s.push({node:c,type:o.getInputType(),defaultValue:o.getDefaultValue()})}})),a=s,this._variableUsages.set(r,a)}return a},n.getRecursiveVariableUsages=function(r){var a=this._recursiveVariableUsages.get(r);if(!a){a=this.getVariableUsages(r);for(var s=0,o=this.getRecursivelyReferencedFragments(r);s<o.length;s++){var u=o[s];a=a.concat(this.getVariableUsages(u))}this._recursiveVariableUsages.set(r,a)}return a},n.getType=function(){return this._typeInfo.getType()},n.getParentType=function(){return this._typeInfo.getParentType()},n.getInputType=function(){return this._typeInfo.getInputType()},n.getParentInputType=function(){return this._typeInfo.getParentInputType()},n.getFieldDef=function(){return this._typeInfo.getFieldDef()},n.getDirective=function(){return this._typeInfo.getDirective()},n.getArgument=function(){return this._typeInfo.getArgument()},n.getEnumValue=function(){return this._typeInfo.getEnumValue()},t}(yt),Qn(it.concat(pt),function(e){return e.name});const tr={staging:{graphEndpoint:"https://api-staging.spritz.finance/graphql"},production:{graphEndpoint:"https://api.spritz.finance/graphql"}};class Oe extends Error{date;constructor(t,...n){super(...n),Error.captureStackTrace&&Error.captureStackTrace(this,Oe),this.name="SpritzApiError",this.message=t,this.date=new Date}}const ir=e=>Fn.create(e);class rr{client;constructor(t,n){this.client=ir({baseURL:tr[t].graphEndpoint,headers:{"Content-Type":"application/json",Authorization:"Bearer "+n}})}async query({query:t,variables:n}){try{const i=await this.client.post("",{query:$(t),variables:n,operationName:t?.definitions?.[0]?.name?.value});if(i.data.errors)throw new Oe(`Spritz GraphQL Error: ${i.data.errors[0].message}`);return i.data.data}catch(i){if(Fn.isAxiosError(i)){const r=i.response?.data.Message??i.response?.data.message;throw new Oe(`Spritz Request Error: ${r}`)}else throw new Oe(`Spritz Request Error: ${i.message}`)}}}var $e={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PayableAccountFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PayableAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accountNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountSubType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"holder"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountDetails"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"USBankAccountDetails"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"routingNumber"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"institution"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:501}};$e.loc.source={body:`fragment PayableAccountFragment on PayableAccount {
43
+ id
44
+ name
45
+ userId
46
+ country
47
+ currency
48
+ createdAt
49
+ type
50
+ ... on BankAccount {
51
+ accountNumber
52
+ bankAccountType
53
+ bankAccountSubType
54
+ holder
55
+ email
56
+ ownedByUser
57
+ bankAccountDetails {
58
+ ... on USBankAccountDetails {
59
+ routingNumber
60
+ }
61
+ }
62
+ }
63
+ institution {
64
+ id
65
+ name
66
+ logo
67
+ country
68
+ currency
69
+ }
70
+ }
71
+ `,name:"GraphQL request",locationOffset:{line:1,column:1}};function Ye(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){Ye(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){Ye(i,t)}),e.definitions&&e.definitions.forEach(function(i){Ye(i,t)})}var Tn={};(function(){$e.definitions.forEach(function(t){if(t.name){var n=new Set;Ye(t,n),Tn[t.name.value]=n}})})();function gt(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function ar(e,t){var n={kind:e.kind,definitions:[gt(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=Tn[t]||new Set,r=new Set,a=new Set;for(i.forEach(function(o){a.add(o)});a.size>0;){var s=a;a=new Set,s.forEach(function(o){if(!r.has(o)){r.add(o);var u=Tn[o]||new Set;u.forEach(function(c){a.add(c)})}})}return r.forEach(function(o){var u=gt(e,o);u&&n.definitions.push(u)}),n}ar($e,"PayableAccountFragment");var le={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateUSBankAccount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"createUSAccountInput"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"USBankAccountInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createUSBankAccount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"createUSAccountInput"},value:{kind:"Variable",name:{kind:"Name",value:"createUSAccountInput"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PayableAccountFragment"},directives:[]}]}}]}}],loc:{start:0,end:241}};le.loc.source={body:`#import "../queries/payableAccountFragment.graphql"
72
+
73
+ mutation CreateUSBankAccount($createUSAccountInput: USBankAccountInput!) {
74
+ createUSBankAccount(createUSAccountInput: $createUSAccountInput) {
75
+ ...PayableAccountFragment
76
+ }
77
+ }
78
+ `,name:"GraphQL request",locationOffset:{line:1,column:1}};var Tt={};function or(e){return e.filter(function(t){if(t.kind!=="FragmentDefinition")return!0;var n=t.name.value;return Tt[n]?!1:(Tt[n]=!0,!0)})}le.definitions=le.definitions.concat(or($e.definitions));function ze(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){ze(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){ze(i,t)}),e.definitions&&e.definitions.forEach(function(i){ze(i,t)})}var Sn={};(function(){le.definitions.forEach(function(t){if(t.name){var n=new Set;ze(t,n),Sn[t.name.value]=n}})})();function St(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function sr(e,t){var n={kind:e.kind,definitions:[St(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=Sn[t]||new Set,r=new Set,a=new Set;for(i.forEach(function(o){a.add(o)});a.size>0;){var s=a;a=new Set,s.forEach(function(o){if(!r.has(o)){r.add(o);var u=Sn[o]||new Set;u.forEach(function(c){a.add(c)})}})}return r.forEach(function(o){var u=St(e,o);u&&n.definitions.push(u)}),n}sr(le,"CreateUSBankAccount");var fe={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"BankAccountFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accountNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountSubType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"holder"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountDetails"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"USBankAccountDetails"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"routingNumber"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"institution"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:495}};fe.loc.source={body:`fragment BankAccountFragment on BankAccount {
79
+ id
80
+ name
81
+ userId
82
+ country
83
+ currency
84
+ createdAt
85
+ type
86
+ ... on BankAccount {
87
+ accountNumber
88
+ bankAccountType
89
+ bankAccountSubType
90
+ holder
91
+ email
92
+ ownedByUser
93
+ bankAccountDetails {
94
+ ... on USBankAccountDetails {
95
+ routingNumber
96
+ }
97
+ }
98
+ }
99
+ institution {
100
+ id
101
+ name
102
+ logo
103
+ country
104
+ currency
105
+ }
106
+ }
107
+ `,name:"GraphQL request",locationOffset:{line:1,column:1}};function Xe(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){Xe(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){Xe(i,t)}),e.definitions&&e.definitions.forEach(function(i){Xe(i,t)})}var Nn={};(function(){fe.definitions.forEach(function(t){if(t.name){var n=new Set;Xe(t,n),Nn[t.name.value]=n}})})();function Nt(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function ur(e,t){var n={kind:e.kind,definitions:[Nt(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=Nn[t]||new Set,r=new Set,a=new Set;for(i.forEach(function(o){a.add(o)});a.size>0;){var s=a;a=new Set,s.forEach(function(o){if(!r.has(o)){r.add(o);var u=Nn[o]||new Set;u.forEach(function(c){a.add(c)})}})}return r.forEach(function(o){var u=Nt(e,o);u&&n.definitions.push(u)}),n}ur(fe,"BankAccountFragment");var de={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameBankAccount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renamePayableAccount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"BankAccountFragment"},directives:[]}]}}]}}],loc:{start:0,end:218}};de.loc.source={body:`#import "../queries/bankAccountFragment.graphql"
108
+
109
+ mutation RenameBankAccount($accountId: String!, $name: String!) {
110
+ renamePayableAccount(accountId: $accountId, name: $name) {
111
+ ...BankAccountFragment
112
+ }
113
+ }
114
+ `,name:"GraphQL request",locationOffset:{line:1,column:1}};var kt={};function cr(e){return e.filter(function(t){if(t.kind!=="FragmentDefinition")return!0;var n=t.name.value;return kt[n]?!1:(kt[n]=!0,!0)})}de.definitions=de.definitions.concat(cr(fe.definitions));function He(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){He(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){He(i,t)}),e.definitions&&e.definitions.forEach(function(i){He(i,t)})}var kn={};(function(){de.definitions.forEach(function(t){if(t.name){var n=new Set;He(t,n),kn[t.name.value]=n}})})();function Et(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function lr(e,t){var n={kind:e.kind,definitions:[Et(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=kn[t]||new Set,r=new Set,a=new Set;for(i.forEach(function(o){a.add(o)});a.size>0;){var s=a;a=new Set,s.forEach(function(o){if(!r.has(o)){r.add(o);var u=kn[o]||new Set;u.forEach(function(c){a.add(c)})}})}return r.forEach(function(o){var u=Et(e,o);u&&n.definitions.push(u)}),n}lr(de,"RenameBankAccount");var pe={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteBankAccount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletePayableAccount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"BankAccountFragment"},directives:[]}]}}]}}],loc:{start:0,end:189}};pe.loc.source={body:`#import "../queries/bankAccountFragment.graphql"
115
+
116
+ mutation DeleteBankAccount($accountId: String!) {
117
+ deletePayableAccount(accountId: $accountId) {
118
+ ...BankAccountFragment
119
+ }
120
+ }
121
+ `,name:"GraphQL request",locationOffset:{line:1,column:1}};var It={};function fr(e){return e.filter(function(t){if(t.kind!=="FragmentDefinition")return!0;var n=t.name.value;return It[n]?!1:(It[n]=!0,!0)})}pe.definitions=pe.definitions.concat(fr(fe.definitions));function Ke(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){Ke(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){Ke(i,t)}),e.definitions&&e.definitions.forEach(function(i){Ke(i,t)})}var En={};(function(){pe.definitions.forEach(function(t){if(t.name){var n=new Set;Ke(t,n),En[t.name.value]=n}})})();function bt(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function dr(e,t){var n={kind:e.kind,definitions:[bt(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=En[t]||new Set,r=new Set,a=new Set;for(i.forEach(function(o){a.add(o)});a.size>0;){var s=a;a=new Set,s.forEach(function(o){if(!r.has(o)){r.add(o);var u=En[o]||new Set;u.forEach(function(c){a.add(c)})}})}return r.forEach(function(o){var u=bt(e,o);u&&n.definitions.push(u)}),n}dr(pe,"DeleteBankAccount");var ve={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserBankAccounts"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userBankAccounts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"BankAccountFragment"},directives:[]}]}}]}}],loc:{start:0,end:128}};ve.loc.source={body:`#import "./bankAccountFragment.graphql"
122
+
123
+ query UserBankAccounts {
124
+ userBankAccounts {
125
+ ...BankAccountFragment
126
+ }
127
+ }
128
+ `,name:"GraphQL request",locationOffset:{line:1,column:1}};var At={};function pr(e){return e.filter(function(t){if(t.kind!=="FragmentDefinition")return!0;var n=t.name.value;return At[n]?!1:(At[n]=!0,!0)})}ve.definitions=ve.definitions.concat(pr(fe.definitions));function We(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){We(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){We(i,t)}),e.definitions&&e.definitions.forEach(function(i){We(i,t)})}var In={};(function(){ve.definitions.forEach(function(t){if(t.name){var n=new Set;We(t,n),In[t.name.value]=n}})})();function Ot(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function vr(e,t){var n={kind:e.kind,definitions:[Ot(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=In[t]||new Set,r=new Set,a=new Set;for(i.forEach(function(o){a.add(o)});a.size>0;){var s=a;a=new Set,s.forEach(function(o){if(!r.has(o)){r.add(o);var u=In[o]||new Set;u.forEach(function(c){a.add(c)})}})}return r.forEach(function(o){var u=Ot(e,o);u&&n.definitions.push(u)}),n}vr(ve,"UserBankAccounts");var Dt=(e=>(e.Business="Business",e.Checking="Checking",e.Savings="Savings",e))(Dt||{}),bn=(e=>(e.USBankAccount="USBankAccount",e))(bn||{}),wt=(e=>(e.ACTIVE="ACTIVE",e.FAILED="FAILED",e.INITIALIZED="INITIALIZED",e.LOADING="LOADING",e.UNAVAILABLE="UNAVAILABLE",e.UNINITIALIZED="UNINITIALIZED",e))(wt||{}),Ft=(e=>(e.BankAccount="BankAccount",e.Bill="Bill",e.DebitCard="DebitCard",e))(Ft||{});const mr={[bn.USBankAccount]:e=>({query:le,variables:{createUSAccountInput:e},response:"createUSBankAccount"})},hr=(e,t)=>mr[e]?.(t)??null;class yr{client;constructor(t){this.client=t}async list(){return(await this.client.query({query:ve}))?.userBankAccounts??null}async rename(t,n){return(await this.client.query({query:de,variables:{accountId:t,name:n}}))?.renamePayableAccount??null}async delete(t){return(await this.client.query({query:pe,variables:{accountId:t}}))?.deletePayableAccount??null}async create(t,n){const i=hr(t,n);if(!i)throw new Error("Invalid bank account type");return(await this.client.query({query:i.query,variables:i.variables}))?.[i.response]??null}}var Ze={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"UserFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sub"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"picture"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"timezone"},arguments:[],directives:[]}]}}],loc:{start:0,end:135}};Ze.loc.source={body:`fragment UserFragment on User {
129
+ id
130
+ sub
131
+ email
132
+ firstName
133
+ lastName
134
+ picture
135
+ phone
136
+ createdAt
137
+ timezone
138
+ }
139
+ `,name:"GraphQL request",locationOffset:{line:1,column:1}};function en(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){en(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){en(i,t)}),e.definitions&&e.definitions.forEach(function(i){en(i,t)})}var An={};(function(){Ze.definitions.forEach(function(t){if(t.name){var n=new Set;en(t,n),An[t.name.value]=n}})})();function _t(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function gr(e,t){var n={kind:e.kind,definitions:[_t(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=An[t]||new Set,r=new Set,a=new Set;for(i.forEach(function(o){a.add(o)});a.size>0;){var s=a;a=new Set,s.forEach(function(o){if(!r.has(o)){r.add(o);var u=An[o]||new Set;u.forEach(function(c){a.add(c)})}})}return r.forEach(function(o){var u=_t(e,o);u&&n.definitions.push(u)}),n}gr(Ze,"UserFragment");var me={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CurrentUser"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"UserFragment"},directives:[]}]}}]}}],loc:{start:0,end:95}};me.loc.source={body:`#import "./userFragment.graphql"
140
+
141
+ query CurrentUser {
142
+ me {
143
+ ...UserFragment
144
+ }
145
+ }
146
+ `,name:"GraphQL request",locationOffset:{line:1,column:1}};var Lt={};function Tr(e){return e.filter(function(t){if(t.kind!=="FragmentDefinition")return!0;var n=t.name.value;return Lt[n]?!1:(Lt[n]=!0,!0)})}me.definitions=me.definitions.concat(Tr(Ze.definitions));function nn(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){nn(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){nn(i,t)}),e.definitions&&e.definitions.forEach(function(i){nn(i,t)})}var On={};(function(){me.definitions.forEach(function(t){if(t.name){var n=new Set;nn(t,n),On[t.name.value]=n}})})();function Rt(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function Sr(e,t){var n={kind:e.kind,definitions:[Rt(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=On[t]||new Set,r=new Set,a=new Set;for(i.forEach(function(o){a.add(o)});a.size>0;){var s=a;a=new Set,s.forEach(function(o){if(!r.has(o)){r.add(o);var u=On[o]||new Set;u.forEach(function(c){a.add(c)})}})}return r.forEach(function(o){var u=Rt(e,o);u&&n.definitions.push(u)}),n}Sr(me,"CurrentUser");var tn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserVerification"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"verification"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"identity"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"verificationUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:297}};tn.loc.source={body:`query UserVerification {
147
+ verification {
148
+ userId
149
+ identity {
150
+ status
151
+ country
152
+ verificationUrl
153
+ user {
154
+ firstName
155
+ lastName
156
+ email
157
+ completedAt
158
+ }
159
+ }
160
+ }
161
+ }
162
+ `,name:"GraphQL request",locationOffset:{line:1,column:1}};function rn(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){rn(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){rn(i,t)}),e.definitions&&e.definitions.forEach(function(i){rn(i,t)})}var Dn={};(function(){tn.definitions.forEach(function(t){if(t.name){var n=new Set;rn(t,n),Dn[t.name.value]=n}})})();function xt(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function Nr(e,t){var n={kind:e.kind,definitions:[xt(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=Dn[t]||new Set,r=new Set,a=new Set;for(i.forEach(function(o){a.add(o)});a.size>0;){var s=a;a=new Set,s.forEach(function(o){if(!r.has(o)){r.add(o);var u=Dn[o]||new Set;u.forEach(function(c){a.add(c)})}})}return r.forEach(function(o){var u=xt(e,o);u&&n.definitions.push(u)}),n}Nr(tn,"UserVerification");class kr{client;constructor(t){this.client=t}async getCurrentUser(){return(await this.client.query({query:me}))?.me??null}async getUserVerification(){return(await this.client.query({query:tn}))?.verification??null}}class wn{client;accounts;user;bankAccounts;static initialize(t,n){const i=new wn;return i.init(t,n),i}init(t,n){this.client=new rr(t,n),this.accounts=new Vt(this.client),this.user=new kr(this.client),this.bankAccounts=new yr(this.client)}}var Ut=(e=>(e.Staging="staging",e.Production="production",e))(Ut||{});export{Dt as BankAccountSubType,bn as BankAccountType,Ut as Environment,wt as ModuleStatus,Ft as PayableAccountType,wn as SpritzApiClient};
163
+ //# sourceMappingURL=spritz-api-client.mjs.map