quantum-component-library 1.4.45-qa.1 → 1.4.45-qa.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.
- package/dist/{babel-vendor-BOM86iTb.js → babel-vendor-Brd7V25k.js} +76 -71
- package/dist/babel-vendor-pl7onWh-.cjs +3 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +57 -57
- package/dist/{dnd-core-vendor-bgjKfDi6.cjs → dnd-core-vendor-B8SfRHAC.cjs} +1 -1
- package/dist/{dnd-core-vendor-q7mfiuVu.js → dnd-core-vendor-B9bDJoIO.js} +2 -2
- package/dist/framer-motion-vendor-BgJ2HqtS.cjs +1 -0
- package/dist/framer-motion-vendor-Cn84b4iY.js +3285 -0
- package/dist/{graphql-DiUes2Np.js → graphql-DZp5ePcc.js} +6 -6
- package/dist/graphql-vendor-2jHffeBc.cjs +19 -0
- package/dist/graphql-vendor-DZM4vSNi.js +1285 -0
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.js +11 -12
- package/dist/lodash-vendor-Dkc3o8vE.cjs +1 -0
- package/dist/lodash-vendor-KQku4vKh.js +1602 -0
- package/dist/providers.cjs +1 -1
- package/dist/providers.js +5 -5
- package/dist/{react-dnd-vendor-BWqlt2EC.cjs → react-dnd-vendor-CMnbNCdx.cjs} +1 -1
- package/dist/{react-dnd-vendor-BZs2igAJ.js → react-dnd-vendor-CrTWIfyP.js} +2 -2
- package/dist/{react-select-vendor-eBH7yy3O.js → react-select-vendor-Dt2A4G_u.js} +35 -35
- package/dist/{react-select-vendor-By3h6JjH.cjs → react-select-vendor-DwRVrD2f.cjs} +1 -1
- package/dist/services.cjs +1 -1
- package/dist/services.js +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.js +1 -1
- package/dist/ui-vendor-BAkBLewK.cjs +294 -0
- package/dist/ui-vendor-DLN2xOTj.js +10756 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +17 -17
- package/dist/vendor-Br-qBXqd.cjs +90 -0
- package/dist/vendor-BvxNWBst.js +11937 -0
- package/package.json +1 -1
- package/dist/babel-vendor-cKvSpnBp.cjs +0 -3
- package/dist/graphql-vendor-JsvuUrRs.cjs +0 -14
- package/dist/graphql-vendor-YnA_qhJA.js +0 -669
- package/dist/lodash-vendor-D5A6v3mw.cjs +0 -1
- package/dist/lodash-vendor-Dz4vW7Gd.js +0 -1120
- package/dist/vendor-BeqUcSbw.cjs +0 -45
- package/dist/vendor-DvX9OX-j.js +0 -7876
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";function i(e){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(e)}function g(e,t){if(i(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function d(e){var t=g(e,"string");return i(t)=="symbol"?t:t+""}function _(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w(e){if(Array.isArray(e))return e}function S(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,u,l,f=[],a=!0,b=!1;try{if(u=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=u.call(r)).done)&&(f.push(n.value),f.length!==t);a=!0);}catch(j){b=!0,o=j}finally{try{if(!a&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(b)throw o}}return f}}function s(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){if(e){if(typeof e=="string")return s(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function A(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(e,t){return w(e)||S(e,t)||v(e,t)||A()}function C(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function E(e,t){if(e==null)return{};var r,n,o=C(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y.apply(null,arguments)}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function R(e,t,r){return t&&O(e.prototype,t),r&&O(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},p(e,t)}function x(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(e)}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(h=function(){return!!e})()}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D(e,t){if(t&&(i(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function L(e){var t=h();return function(){var r,n=c(e);if(t){var o=c(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return D(this,r)}}function W(e){if(Array.isArray(e))return s(e)}function z(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function N(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B(e){return W(e)||z(e)||v(e)||N()}function H(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}exports._classCallCheck=I;exports._createClass=R;exports._createSuper=L;exports._defineProperty=_;exports._extends=y;exports._inherits=x;exports._objectSpread2=P;exports._objectWithoutProperties=E;exports._slicedToArray=T;exports._taggedTemplateLiteral=H;exports._toConsumableArray=B;exports._typeof=i;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";const A=require("./vendor-BeqUcSbw.cjs");var Z={OPERATION_DEFINITION:"OperationDefinition"};class J extends Error{constructor(t,n,a,c,l,s,f){super(t),this.name="GraphQLError",this.message=t,l&&(this.path=l),n&&(this.nodes=Array.isArray(n)?n:[n]),a&&(this.source=a),c&&(this.positions=c),s&&(this.originalError=s);var p=f;if(!p&&s){var v=s.extensions;v&&typeof v=="object"&&(p=v)}this.extensions=p||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}var i,r;function m(e){return new J(`Syntax Error: Unexpected token at ${r} in ${e}`)}function R(e){if(e.lastIndex=r,e.test(i))return i.slice(r,r=e.lastIndex)}var _=/ +(?=[^\s])/y;function ee(e){for(var t=e.split(`
|
|
2
|
-
`),n="",a=0,c=0,l=t.length-1,s=0;s<t.length;s++)_.lastIndex=0,_.test(t[s])&&(s&&(!a||_.lastIndex<a)&&(a=_.lastIndex),c=c||s,l=s);for(var f=c;f<=l;f++)f!==c&&(n+=`
|
|
3
|
-
`),n+=t[f].slice(a).replace(/\\"""/g,'"""');return n}function u(){for(var e=0|i.charCodeAt(r++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|i.charCodeAt(r++))if(e===35)for(;(e=0|i.charCodeAt(r++))&&e!==10&&e!==13;);r--}function M(){for(var e=r,t=0|i.charCodeAt(r++);t>=48&&t<=57||t>=65&&t<=90||t===95||t>=97&&t<=122;t=0|i.charCodeAt(r++));if(e===r-1)throw m("Name");var n=i.slice(e,--r);return u(),n}function k(){return{kind:"Name",value:M()}}var te=/(?:"""|(?:[\s\S]*?[^\\])""")/y,re=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function x(e){var t;switch(i.charCodeAt(r)){case 91:r++,u();for(var n=[];i.charCodeAt(r)!==93;)n.push(x(e));return r++,u(),{kind:"ListValue",values:n};case 123:r++,u();for(var a=[];i.charCodeAt(r)!==125;){var c=k();if(i.charCodeAt(r++)!==58)throw m("ObjectField");u(),a.push({kind:"ObjectField",name:c,value:x(e)})}return r++,u(),{kind:"ObjectValue",fields:a};case 36:if(e)throw m("Variable");return r++,{kind:"Variable",name:k()};case 34:if(i.charCodeAt(r+1)===34&&i.charCodeAt(r+2)===34){if(r+=3,(t=R(te))==null)throw m("StringValue");return u(),{kind:"StringValue",value:ee(t.slice(0,-3)),block:!0}}else{var l=r,s;r++;var f=!1;for(s=0|i.charCodeAt(r++);s===92&&(r++,f=!0)||s!==10&&s!==13&&s!==34&&s;s=0|i.charCodeAt(r++));if(s!==34)throw m("StringValue");return t=i.slice(l,r),u(),{kind:"StringValue",value:f?JSON.parse(t):t.slice(1,-1),block:!1}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var p=r++,v;(v=0|i.charCodeAt(r++))>=48&&v<=57;);var h=i.slice(p,--r);if((v=i.charCodeAt(r))===46||v===69||v===101){if((t=R(re))==null)throw m("FloatValue");return u(),{kind:"FloatValue",value:h+t}}else return u(),{kind:"IntValue",value:h};case 110:if(i.charCodeAt(r+1)===117&&i.charCodeAt(r+2)===108&&i.charCodeAt(r+3)===108)return r+=4,u(),{kind:"NullValue"};break;case 116:if(i.charCodeAt(r+1)===114&&i.charCodeAt(r+2)===117&&i.charCodeAt(r+3)===101)return r+=4,u(),{kind:"BooleanValue",value:!0};break;case 102:if(i.charCodeAt(r+1)===97&&i.charCodeAt(r+2)===108&&i.charCodeAt(r+3)===115&&i.charCodeAt(r+4)===101)return r+=5,u(),{kind:"BooleanValue",value:!1};break}return{kind:"EnumValue",value:M()}}function W(e){if(i.charCodeAt(r)===40){var t=[];r++,u();do{var n=k();if(i.charCodeAt(r++)!==58)throw m("Argument");u(),t.push({kind:"Argument",name:n,value:x(e)})}while(i.charCodeAt(r)!==41);return r++,u(),t}}function b(e){if(i.charCodeAt(r)===64){var t=[];do r++,t.push({kind:"Directive",name:k(),arguments:W(e)});while(i.charCodeAt(r)===64);return t}}function ne(){for(var e=0;i.charCodeAt(r)===91;)e++,r++,u();var t={kind:"NamedType",name:k()};do if(i.charCodeAt(r)===33&&(r++,u(),t={kind:"NonNullType",type:t}),e){if(i.charCodeAt(r++)!==93)throw m("NamedType");u(),t={kind:"ListType",type:t}}while(e--);return t}function j(){if(i.charCodeAt(r++)!==123)throw m("SelectionSet");return u(),L()}function L(){var e=[];do if(i.charCodeAt(r)===46){if(i.charCodeAt(++r)!==46||i.charCodeAt(++r)!==46)throw m("SelectionSet");switch(r++,u(),i.charCodeAt(r)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:b(!1),selectionSet:j()});break;case 111:i.charCodeAt(r+1)===110?(r+=2,u(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:k()},directives:b(!1),selectionSet:j()})):e.push({kind:"FragmentSpread",name:k(),directives:b(!1)});break;case 123:r++,u(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:L()});break;default:e.push({kind:"FragmentSpread",name:k(),directives:b(!1)})}}else{var t=k(),n=void 0;i.charCodeAt(r)===58&&(r++,u(),n=t,t=k());var a=W(!1),c=b(!1),l=void 0;i.charCodeAt(r)===123&&(r++,u(),l=L()),e.push({kind:"Field",alias:n,name:t,arguments:a,directives:c,selectionSet:l})}while(i.charCodeAt(r)!==125);return r++,u(),{kind:"SelectionSet",selections:e}}function ie(){if(u(),i.charCodeAt(r)===40){var e=[];r++,u();do{var t=void 0;if(i.charCodeAt(r)===34&&(t=x(!0)),i.charCodeAt(r++)!==36)throw m("Variable");var n=k();if(i.charCodeAt(r++)!==58)throw m("VariableDefinition");u();var a=ne(),c=void 0;i.charCodeAt(r)===61&&(r++,u(),c=x(!0)),u();var l={kind:"VariableDefinition",variable:{kind:"Variable",name:n},type:a,defaultValue:c,directives:b(!0)};t&&(l.description=t),e.push(l)}while(i.charCodeAt(r)!==41);return r++,u(),e}}function ae(e){var t=k();if(i.charCodeAt(r++)!==111||i.charCodeAt(r++)!==110)throw m("FragmentDefinition");u();var n={kind:"FragmentDefinition",name:t,typeCondition:{kind:"NamedType",name:k()},directives:b(!1),selectionSet:j()};return e&&(n.description=e),n}function B(){var e=[];do{var t=void 0;if(i.charCodeAt(r)===34&&(t=x(!0)),i.charCodeAt(r)===123){if(t)throw m("Document");r++,u(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:L()})}else{var n=M();switch(n){case"fragment":e.push(ae(t));break;case"query":case"mutation":case"subscription":var a,c=void 0;(a=i.charCodeAt(r))!==40&&a!==64&&a!==123&&(c=k());var l={kind:"OperationDefinition",operation:n,name:c,variableDefinitions:ie(),directives:b(!1),selectionSet:j()};t&&(l.description=t),e.push(l);break;default:throw m("Document")}}}while(r<i.length);return e}function oe(e,t){return i=e.body?e.body:e,r=0,u(),t&&t.noLocation?{kind:"Document",definitions:B()}:{kind:"Document",definitions:B(),loc:{start:0,end:i.length,startToken:void 0,endToken:void 0,source:{body:i,name:"graphql.web",locationOffset:{line:1,column:1}}}}}function g(e,t,n){for(var a="",c=0;c<e.length;c++)c&&(a+=t),a+=n(e[c]);return a}function se(e){return JSON.stringify(e)}function ce(e){return`"""
|
|
4
|
-
`+e.replace(/"""/g,'\\"""')+`
|
|
5
|
-
"""`}var S=`
|
|
6
|
-
`,d={OperationDefinition(e){var t="";e.description&&(t+=d.StringValue(e.description)+`
|
|
7
|
-
`),t+=e.operation,e.name&&(t+=" "+e.name.value),e.variableDefinitions&&e.variableDefinitions.length&&(e.name||(t+=" "),t+="("+g(e.variableDefinitions,", ",d.VariableDefinition)+")"),e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive));var n=d.SelectionSet(e.selectionSet);return t!=="query"?t+" "+n:n},VariableDefinition(e){var t="";return e.description&&(t+=d.StringValue(e.description)+" "),t+=d.Variable(e.variable)+": "+C(e.type),e.defaultValue&&(t+=" = "+C(e.defaultValue)),e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),t},Field(e){var t=e.alias?e.alias.value+": "+e.name.value:e.name.value;if(e.arguments&&e.arguments.length){var n=g(e.arguments,", ",d.Argument);t.length+n.length+2>80?t+="("+(S+=" ")+g(e.arguments,S,d.Argument)+(S=S.slice(0,-2))+")":t+="("+n+")"}return e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),e.selectionSet&&e.selectionSet.selections.length&&(t+=" "+d.SelectionSet(e.selectionSet)),t},StringValue(e){return e.block?ce(e.value).replace(/\n/g,S):se(e.value)},BooleanValue:e=>""+e.value,NullValue:e=>"null",IntValue:e=>e.value,FloatValue:e=>e.value,EnumValue:e=>e.value,Name:e=>e.value,Variable:e=>"$"+e.name.value,ListValue:e=>"["+g(e.values,", ",C)+"]",ObjectValue:e=>"{"+g(e.fields,", ",d.ObjectField)+"}",ObjectField:e=>e.name.value+": "+C(e.value),Document(e){return!e.definitions||!e.definitions.length?"":g(e.definitions,`
|
|
8
|
-
|
|
9
|
-
`,C)},SelectionSet:e=>"{"+(S+=" ")+g(e.selections,S,C)+(S=S.slice(0,-2))+"}",Argument:e=>e.name.value+": "+C(e.value),FragmentSpread(e){var t="..."+e.name.value;return e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),t},InlineFragment(e){var t="...";return e.typeCondition&&(t+=" on "+e.typeCondition.name.value),e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),t+=" "+d.SelectionSet(e.selectionSet)},FragmentDefinition(e){var t="";return e.description&&(t+=d.StringValue(e.description)+`
|
|
10
|
-
`),t+="fragment "+e.name.value,t+=" on "+e.typeCondition.name.value,e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),t+" "+d.SelectionSet(e.selectionSet)},Directive(e){var t="@"+e.name.value;return e.arguments&&e.arguments.length&&(t+="("+g(e.arguments,", ",d.Argument)+")"),t},NamedType:e=>e.name.value,ListType:e=>"["+C(e.type)+"]",NonNullType:e=>C(e.type)+"!"},C=e=>d[e.kind](e);function ue(e){return S=`
|
|
11
|
-
`,d[e.kind]?d[e.kind](e):""}var le=e=>e&&typeof e.message=="string"&&(e.extensions||e.name==="GraphQLError")?e:typeof e=="object"&&typeof e.message=="string"?new J(e.message,e.nodes,e.source,e.positions,e.path,e,e.extensions||{}):new J(e);class de extends Error{constructor(t){var n=(t.graphQLErrors||[]).map(le),a=((c,l)=>{var s="";if(c)return`[Network] ${c.message}`;if(l)for(var f=0,p=l.length;f<p;f++)s&&(s+=`
|
|
12
|
-
`),s+=`[GraphQL] ${l[f].message}`;return s})(t.networkError,n);super(a),this.name="CombinedError",this.message=a,this.graphQLErrors=n,this.networkError=t.networkError,this.response=t.response}toString(){return this.message}}var I=(e,t)=>{for(var n=0|(t||5381),a=0,c=0|e.length;a<c;a++)n=(n<<5)+n+e.charCodeAt(a);return n},F=new Set,P=new WeakMap,w=(e,t)=>{if(e===null||F.has(e))return"null";if(typeof e!="object")return JSON.stringify(e)||"";if(e.toJSON)return w(e.toJSON());if(Array.isArray(e)){for(var n="[",a=0,c=e.length;a<c;a++)n.length>1&&(n+=","),n+=w(e[a])||"null";return n+="]"}var l=Object.keys(e).sort();if(!l.length&&e.constructor&&Object.getPrototypeOf(e).constructor!==Object.prototype.constructor){var s=P.get(e)||Math.random().toString(36).slice(2);return P.set(e,s),w({__key:s})}F.add(e);for(var f="{",p=0,v=l.length;p<v;p++){var h=w(e[l[p]]);h&&(f.length>1&&(f+=","),f+=w(l[p])+":"+h)}return F.delete(e),f+="}"},fe=(e,t)=>(F.clear(),w(e)),ve=/("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g,he=/(?:#[^\n\r]+)?(?:[\r\n]+|$)/g,pe=(e,t)=>t%2==0?e.replace(he,`
|
|
13
|
-
`):e,z=e=>e.split(ve).map(pe).join("").trim(),U=new Map,T=new Map,K=e=>{var t;return typeof e=="string"?t=z(e):e.loc&&T.get(e.__key)===e?t=e.loc.source.body:(t=U.get(e)||z(ue(e)),U.set(e,t)),typeof e!="string"&&!e.loc&&(e.loc={start:0,end:t.length,source:{body:t,name:"gql",locationOffset:{line:1,column:1}}}),t},H=e=>{var t;if(e.documentId)t=I(e.documentId);else if(t=I(K(e)),e.definitions){var n=ke(e);n&&(t=I(`
|
|
14
|
-
# ${n}`,t))}return t},me=e=>{var t,n;return typeof e=="string"?(t=H(e),n=T.get(t)||oe(e,{noLocation:!0})):(t=e.__key||H(e),n=T.get(t)||e),n.loc||K(n),n.__key=t,T.set(t,n),n},ge=(e,t,n)=>{var a=t||{},c=me(e),l=fe(a),s=c.__key;return l!=="{}"&&(s=I(l,s)),{key:s,query:c,variables:a,extensions:n}},ke=e=>{for(var t=0,n=e.definitions.length;t<n;t++){var a=e.definitions[t];if(a.kind===Z.OPERATION_DEFINITION)return a.name?a.name.value:void 0}},Ae=(e,t,n)=>({operation:e,data:void 0,error:new de({networkError:t,response:n}),extensions:void 0,hasNext:!1,stale:!1});function X(e,t,n){return{...t,kind:e,context:t.context?{...t.context,...n}:n||t.context}}var $=(e,t)=>X(e.kind,e,{...e.context,authAttempt:t});function ye(e){return({client:t,forward:n})=>{var a=new Set,c=A.makeSubject(),l=A.makeSubject(),s=new Map;function f(){v=void 0;var O=s;s=new Map,O.forEach(c.next)}function p(O){v=void 0;var D=s;s=new Map,D.forEach((N=>{l.next(Ae(N,O))}))}var v,h=null;return O=>{function D(){v=Promise.resolve().then((()=>e({mutate(o,E,y){var q=t.createRequestOperation("mutation",ge(o,E),y);return A.toPromise(A.take(1)(A.filter((V=>V.operation.key===q.key&&q.context._instance===V.operation.context._instance))(A.onStart((()=>{var V=Q(q);a.add(V.context._instance),c.next(V)}))(G))))},appendHeaders(o,E){var y=typeof o.context.fetchOptions=="function"?o.context.fetchOptions():o.context.fetchOptions||{};return X(o.kind,o,{...o.context,fetchOptions:{...y,headers:{...y.headers,...E}}})}}))).then((o=>{o&&(h=o),f()})).catch((o=>{process.env.NODE_ENV!=="production"&&console.warn("authExchange()’s initialization function has failed, which is unexpected.\nIf your initialization function is expected to throw/reject, catch this error and handle it explicitly.\nUnless this error is handled it’ll be passed onto any `OperationResult` instantly and authExchange() will block further operations and retry.",o),p(o)}))}D();function N(o){s.set(o.key,$(o,!0)),h&&!v&&(v=h.refreshAuth().then(f).catch(p))}function Q(o){return h?h.addAuthToOperation(o):o}var Y=A.filter(Boolean)(A.map((o=>o.kind==="teardown"?(s.delete(o.key),o):o.context._instance&&a.has(o.context._instance)?o:o.context.authAttempt?Q(o):v||!h?(v||D(),s.has(o.key)||s.set(o.key,$(o,!1)),null):(function(y){return!y.context.authAttempt&&h&&h.willAuthError&&h.willAuthError(y)})(o)?(N(o),null):Q($(o,!1))))(A.merge([c.source,O]))),G=n(Y);return A.merge([l.source,A.filter((o=>!a.has(o.operation.context._instance)&&o.error&&(function(y){return h&&h.didAuthError&&h.didAuthError(y.error,y.operation)})(o)&&!o.operation.context.authAttempt?(N(o.operation),!1):(a.has(o.operation.context._instance)&&a.delete(o.operation.context._instance),!0)))(G)])}}}exports.authExchange=ye;
|