UNPKG

altair-static

Version:

Static package for altair graphql client

3 lines (2 loc) 536 kB
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8ebbb19f-a97a-57a9-a2d7-e7f544957d6b")}catch(e){}}(); (self.webpackChunkaltair=self.webpackChunkaltair||[]).push([[635],{15510:(W,w,c)=>{"use strict";c.d(w,{k:()=>l});var a=c(31092),g=c(91779),l=function(){function t(){this.getFragmentDoc=(0,a.LV)(g.ct)}return t.prototype.recordOptimisticTransaction=function(r,i){this.performTransaction(r,i)},t.prototype.transformDocument=function(r){return r},t.prototype.identify=function(r){},t.prototype.gc=function(){return[]},t.prototype.modify=function(r){return!1},t.prototype.transformForLink=function(r){return r},t.prototype.readQuery=function(r,i){return void 0===i&&(i=!!r.optimistic),this.read({rootId:r.id||"ROOT_QUERY",query:r.query,variables:r.variables,returnPartialData:r.returnPartialData,optimistic:i})},t.prototype.readFragment=function(r,i){return void 0===i&&(i=!!r.optimistic),this.read({query:this.getFragmentDoc(r.fragment,r.fragmentName),variables:r.variables,rootId:r.id,returnPartialData:r.returnPartialData,optimistic:i})},t.prototype.writeQuery=function(r){return this.write({dataId:r.id||"ROOT_QUERY",result:r.data,query:r.query,variables:r.variables,broadcast:r.broadcast})},t.prototype.writeFragment=function(r){return this.write({dataId:r.id,result:r.data,variables:r.variables,query:this.getFragmentDoc(r.fragment,r.fragmentName),broadcast:r.broadcast})},t}()},28240:(W,w,c)=>{"use strict";var a;c.d(w,{l:()=>a}),a||(a={})},48833:(W,w,c)=>{"use strict";c.d(w,{Z:()=>a});var a=function(){return function g(l,t,r,i,s){this.message=l,this.path=t,this.query=r,this.clientOnly=i,this.variables=s}}()},40054:(W,w,c)=>{"use strict";c.d(w,{$3:()=>t,T9:()=>e,d1:()=>n,gk:()=>i,iJ:()=>s,mv:()=>o});var a=c(23718),g=c(30310),l=c(71318),t=Object.prototype.hasOwnProperty,i=/^[_a-z][_0-9a-z]*/i;function s(u){var p=u.match(i);return p?p[0]:u}function e(u,p,f){return!(!p||"object"!=typeof p)&&(Array.isArray(p)?p.every(function(E){return e(u,E,f)}):u.selections.every(function(E){if((0,a.dt)(E)&&(0,g.MS)(E,f)){var b=(0,a.ue)(E);return t.call(p,b)&&(!E.selectionSet||e(E.selectionSet,p[b],f))}return!0}))}function n(u){return null!==u&&"object"==typeof u&&!(0,a.A_)(u)&&!Array.isArray(u)}function o(){return new l.ZI}},18111:(W,w,c)=>{"use strict";c.d(w,{D:()=>$});var X,M,a=c(40909),g=c(31092),l=c(15510),t=c(48833),r=c(23718),i=c(20794),s=c(9685),e=c(47436),n=c(91779),o=c(30310),u=c(71318),p=c(11618),y=c(77919),d=c(40054),m=Object.create(null),x=function(){return m},I=Object.create(null),L=function(){function X(M,S){var T=this;this.policies=M,this.group=S,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(k,K){return(0,r.A_)(k)?T.get(k.__ref,K):k&&k[K]},this.canRead=function(k){return(0,r.A_)(k)?T.has(k.__ref):"object"==typeof k},this.toReference=function(k,K){if("string"==typeof k)return(0,r.WU)(k);if((0,r.A_)(k))return k;var ee=T.policies.identify(k)[0];if(ee){var ne=(0,r.WU)(ee);return K&&T.merge(ee,k),ne}}}return X.prototype.toObject=function(){return(0,a.__assign)({},this.data)},X.prototype.has=function(M){return void 0!==this.lookup(M,!0)},X.prototype.get=function(M,S){if(this.group.depend(M,S),d.$3.call(this.data,M)){var T=this.data[M];if(T&&d.$3.call(T,S))return T[S]}return"__typename"===S&&d.$3.call(this.policies.rootTypenamesById,M)?this.policies.rootTypenamesById[M]:this instanceof O?this.parent.get(M,S):void 0},X.prototype.lookup=function(M,S){return S&&this.group.depend(M,"__exists"),d.$3.call(this.data,M)?this.data[M]:this instanceof O?this.parent.lookup(M,S):this.policies.rootTypenamesById[M]?Object.create(null):void 0},X.prototype.merge=function(M,S){var T=this,k=this.lookup(M),K=new u.ZI(h).merge(k,S);if(this.data[M]=K,K!==k&&(delete this.refs[M],this.group.caching)){var ee=Object.create(null);k||(ee.__exists=1),Object.keys(S).forEach(function(ne){if(!k||k[ne]!==K[ne]){ee[ne]=1;var se=(0,d.iJ)(ne);se!==ne&&!T.policies.hasKeyArgs(K.__typename,se)&&(ee[se]=1),void 0===K[ne]&&!(T instanceof O)&&delete K[ne]}}),Object.keys(ee).forEach(function(ne){return T.group.dirty(M,ne)})}},X.prototype.modify=function(M,S){var T=this,k=this.lookup(M);if(k){var K=Object.create(null),ee=!1,ne=!0,se={DELETE:m,INVALIDATE:I,isReference:r.A_,toReference:this.toReference,canRead:this.canRead,readField:function(ce,ve){return T.policies.readField("string"==typeof ce?{fieldName:ce,from:ve||(0,r.WU)(M)}:ce,{store:T})}};if(Object.keys(k).forEach(function(ce){var ve=(0,d.iJ)(ce),de=k[ce];if(void 0!==de){var pe="function"==typeof S?S:S[ce]||S[ve];if(pe){var me=pe===x?m:pe(de,(0,a.__assign)((0,a.__assign)({},se),{fieldName:ve,storeFieldName:ce,storage:T.getStorage(M,ce)}));me===I?T.group.dirty(M,ce):(me===m&&(me=void 0),me!==de&&(K[ce]=me,ee=!0,de=me))}void 0!==de&&(ne=!1)}}),ee)return this.merge(M,K),ne&&(this instanceof O?this.data[M]=void 0:delete this.data[M],this.group.dirty(M,"__exists")),!0}return!1},X.prototype.delete=function(M,S,T){var k,K=this.lookup(M);if(K){var ee=this.getFieldValue(K,"__typename"),ne=S&&T?this.policies.getStoreFieldName({typename:ee,fieldName:S,args:T}):S;return this.modify(M,ne?((k={})[ne]=x,k):x)}return!1},X.prototype.evict=function(M){var S=!1;return M.id&&(d.$3.call(this.data,M.id)&&(S=this.delete(M.id,M.fieldName,M.args)),this instanceof O&&(S=this.parent.evict(M)||S),(M.fieldName||S)&&this.group.dirty(M.id,M.fieldName||"__exists")),S},X.prototype.clear=function(){this.replace(null)},X.prototype.extract=function(){var M=this,S=this.toObject(),T=[];return this.getRootIdSet().forEach(function(k){d.$3.call(M.policies.rootTypenamesById,k)||T.push(k)}),T.length&&(S.__META={extraRootIds:T.sort()}),S},X.prototype.replace=function(M){var S=this;if(Object.keys(this.data).forEach(function(K){M&&d.$3.call(M,K)||S.delete(K)}),M){var T=M.__META,k=(0,a.__rest)(M,["__META"]);Object.keys(k).forEach(function(K){S.merge(K,k[K])}),T&&T.extraRootIds.forEach(this.retain,this)}},X.prototype.retain=function(M){return this.rootIds[M]=(this.rootIds[M]||0)+1},X.prototype.release=function(M){if(this.rootIds[M]>0){var S=--this.rootIds[M];return S||delete this.rootIds[M],S}return 0},X.prototype.getRootIdSet=function(M){return void 0===M&&(M=new Set),Object.keys(this.rootIds).forEach(M.add,M),this instanceof O?this.parent.getRootIdSet(M):Object.keys(this.policies.rootTypenamesById).forEach(M.add,M),M},X.prototype.gc=function(){var M=this,S=this.getRootIdSet(),T=this.toObject();S.forEach(function(ee){d.$3.call(T,ee)&&(Object.keys(M.findChildRefIds(ee)).forEach(S.add,S),delete T[ee])});var k=Object.keys(T);if(k.length){for(var K=this;K instanceof O;)K=K.parent;k.forEach(function(ee){return K.delete(ee)})}return k},X.prototype.findChildRefIds=function(M){if(!d.$3.call(this.refs,M)){var S=this.refs[M]=Object.create(null),T=new Set([this.data[M]]),k=function(K){return null!==K&&"object"==typeof K};T.forEach(function(K){(0,r.A_)(K)?S[K.__ref]=!0:k(K)&&Object.values(K).filter(k).forEach(T.add,T)})}return this.refs[M]},X.prototype.makeCacheKey=function(){for(var M=[],S=0;S<arguments.length;S++)M[S]=arguments[S];return this.group.keyMaker.lookupArray(M)},X}(),R=function(){function X(M){this.caching=M,this.d=null,this.keyMaker=new g.oZ(y.e),this.d=M?(0,g.yN)():null}return X.prototype.depend=function(M,S){if(this.d){this.d(_(M,S));var T=(0,d.iJ)(S);T!==S&&this.d(_(M,T))}},X.prototype.dirty=function(M,S){this.d&&this.d.dirty(_(M,S))},X}();function _(X,M){return M+"#"+X}M=function(S){function T(k){var ee=k.resultCaching,ne=void 0===ee||ee,se=k.seed,ce=S.call(this,k.policies,new R(ne))||this;return ce.storageTrie=new g.oZ(y.e),ce.sharedLayerGroup=new R(ne),se&&ce.replace(se),ce}return(0,a.__extends)(T,S),T.prototype.addLayer=function(k,K){return new O(k,this,K,this.sharedLayerGroup)},T.prototype.removeLayer=function(){return this},T.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},T}(X=L||(L={})),X.Root=M;var O=function(X){function M(S,T,k,K){var ee=X.call(this,T.policies,K)||this;return ee.id=S,ee.parent=T,ee.replay=k,ee.group=K,k(ee),ee}return(0,a.__extends)(M,X),M.prototype.addLayer=function(S,T){return new M(S,this,T,this.group)},M.prototype.removeLayer=function(S){var T=this,k=this.parent.removeLayer(S);return S===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(K){T.data[K]!==k.lookup(K)&&T.delete(K)}),k):k===this.parent?this:k.addLayer(this.id,this.replay)},M.prototype.toObject=function(){return(0,a.__assign)((0,a.__assign)({},this.parent.toObject()),this.data)},M.prototype.findChildRefIds=function(S){var T=this.parent.findChildRefIds(S);return d.$3.call(this.data,S)?(0,a.__assign)((0,a.__assign)({},T),X.prototype.findChildRefIds.call(this,S)):T},M.prototype.getStorage=function(){for(var S=this.parent;S.parent;)S=S.parent;return S.getStorage.apply(S,arguments)},M}(L);function h(X,M,S){var T=X[S],k=M[S];return(0,p.L)(T,k)?T:k}function A(X){return!!(X instanceof L&&X.group.caching)}function v(X,M){return new t.Z(X.message,M.path.slice(),M.query,M.clientOnly,M.variables)}var C=function(){function X(M){var S=this;this.config=M,this.executeSelectionSet=(0,g.LV)(function(T){return S.execSelectionSetImpl(T)},{keyArgs:function(T){return[T.selectionSet,T.objectOrReference,T.context]},makeCacheKey:function(T,k,K){if(A(K.store))return K.store.makeCacheKey(T,(0,r.A_)(k)?k.__ref:k,K.varString)}}),this.knownResults=new WeakMap,this.executeSubSelectedArray=(0,g.LV)(function(T){return S.execSubSelectedArrayImpl(T)},{makeCacheKey:function(T){var k=T.field,K=T.array,ee=T.context;if(A(ee.store))return ee.store.makeCacheKey(k,K,ee.varString)}}),this.config=(0,a.__assign)({addTypename:!0},M)}return X.prototype.diffQueryAgainstStore=function(M){var S=M.store,T=M.query,k=M.rootId,K=void 0===k?"ROOT_QUERY":k,ee=M.variables,ne=M.returnPartialData,se=void 0===ne||ne,ce=this.config.cache.policies;ee=(0,a.__assign)((0,a.__assign)({},(0,e.wY)((0,e.AT)(T))),ee);var ve=this.executeSelectionSet({selectionSet:(0,e.Vn)(T).selectionSet,objectOrReference:(0,r.WU)(K),context:{store:S,query:T,policies:ce,variables:ee,varString:JSON.stringify(ee),fragmentMap:(0,n.JG)((0,e.zK)(T)),path:[],clientOnly:!1}}),de=ve.missing&&ve.missing.length>0;if(de&&!se)throw ve.missing[0];return{result:ve.result,missing:ve.missing,complete:!de}},X.prototype.isFresh=function(M,S,T,k){if(A(k.store)&&this.knownResults.get(M)===T){var K=this.executeSelectionSet.peek(T,S,k);if(K&&M===K.result)return!0}return!1},X.prototype.execSelectionSetImpl=function(M){var S=this,T=M.selectionSet,k=M.objectOrReference,K=M.context;if((0,r.A_)(k)&&!K.policies.rootTypenamesById[k.__ref]&&!K.store.has(k.__ref))return{result:{},missing:[v(new s.zU(4),K)]};var ee=K.variables,ne=K.policies,ce=[],ve={result:null},de=K.store.getFieldValue(k,"__typename");function pe(){return ve.missing||(ve.missing=[])}function me(F){var P;return F.missing&&(P=pe()).push.apply(P,F.missing),F.result}this.config.addTypename&&"string"==typeof de&&!ne.rootIdsByTypename[de]&&ce.push({__typename:de});var ge=new Set(T.selections);return ge.forEach(function(F){var P;if((0,o.MS)(F,ee))if((0,r.dt)(F)){var D=ne.readField({fieldName:F.name.value,field:F,variables:K.variables,from:k},K),G=(0,r.ue)(F);K.path.push(G);var ae=K.clientOnly;K.clientOnly=ae||!(!F.directives||!F.directives.some(function(le){return"client"===le.name.value})),void 0===D?i.XY.added(F)||pe().push(v(new s.zU(5),K)):Array.isArray(D)?D=me(S.executeSubSelectedArray({field:F,array:D,context:K})):F.selectionSet&&null!=D&&(D=me(S.executeSelectionSet({selectionSet:F.selectionSet,objectOrReference:D,context:K}))),void 0!==D&&ce.push(((P={})[G]=D,P)),K.clientOnly=ae,(0,s.V1)(K.path.pop()===G)}else{var he=(0,n.HQ)(F,K.fragmentMap);he&&ne.fragmentMatches(he,de)&&he.selectionSet.selections.forEach(ge.add,ge)}}),ve.result=(0,u.IM)(ce),this.knownResults.set(ve.result,T),ve},X.prototype.execSubSelectedArrayImpl=function(M){var ee,S=this,T=M.field,k=M.array,K=M.context;function ne(se,ce){return se.missing&&(ee=ee||[]).push.apply(ee,se.missing),(0,s.V1)(K.path.pop()===ce),se.result}return T.selectionSet&&(k=k.filter(K.store.canRead)),{result:k=k.map(function(se,ce){return null===se?null:(K.path.push(ce),Array.isArray(se)?ne(S.executeSubSelectedArray({field:T,array:se,context:K}),ce):T.selectionSet?ne(S.executeSelectionSet({selectionSet:T.selectionSet,objectOrReference:se,context:K}),ce):((0,s.V1)(K.path.pop()===ce),se))}),missing:ee}},X}(),N=function(){function X(M,S){this.cache=M,this.reader=S}return X.prototype.writeToStore=function(M){var S=M.query,T=M.result,k=M.dataId,K=M.store,ee=M.variables,ne=(0,e.Vu)(S),se=(0,d.mv)();ee=(0,a.__assign)((0,a.__assign)({},(0,e.wY)(ne)),ee);var ce=this.processSelectionSet({result:T||Object.create(null),dataId:k,selectionSet:ne.selectionSet,mergeTree:{map:new Map},context:{store:K,written:Object.create(null),merge:function(ve,de){return se.merge(ve,de)},variables:ee,varString:JSON.stringify(ee),fragmentMap:(0,n.JG)((0,e.zK)(S))}});if(!(0,r.A_)(ce))throw new s.zU(7);return K.retain(ce.__ref),ce},X.prototype.processSelectionSet=function(M){var S=this,T=M.dataId,k=M.result,K=M.selectionSet,ee=M.context,ne=M.mergeTree,se=this.cache.policies,ce=se.identify(k,K,ee.fragmentMap),de=ce[1];if("string"==typeof(T=T||ce[0])){var pe=ee.written[T]||(ee.written[T]=[]),me=(0,r.WU)(T);if(pe.indexOf(K)>=0||(pe.push(K),this.reader&&this.reader.isFresh(k,me,K,ee)))return me}var ge=Object.create(null);de&&(ge=ee.merge(ge,de));var F=T&&se.rootTypenamesById[T]||(0,r.D$)(k,K,ee.fragmentMap)||T&&ee.store.get(T,"__typename");"string"==typeof F&&(ge.__typename=F);var P=new Set(K.selections);if(P.forEach(function(le){var V;if((0,o.MS)(le,ee.variables))if((0,r.dt)(le)){var Z=(0,r.ue)(le),te=k[Z];if(typeof te<"u"){var oe=se.getStoreFieldName({typename:F,fieldName:le.name.value,field:le,variables:ee.variables}),fe=Y(ne,oe),be=S.processFieldValue(te,le,ee,fe),Se=le.selectionSet&&ee.store.getFieldValue(be,"__typename")||void 0,we=se.getMergeFunction(F,le.name.value,Se);we?fe.info={field:le,typename:F,merge:we}:re(ne,oe),ge=ee.merge(ge,((V={})[oe]=be,V))}else if(se.usingPossibleTypes&&!(0,o.d8)(["defer","client"],le))throw new s.zU(8)}else{var Ce=(0,n.HQ)(le,ee.fragmentMap);Ce&&se.fragmentMatches(Ce,F,k,ee.variables)&&Ce.selectionSet.selections.forEach(P.add,P)}}),"string"==typeof T){var D=(0,r.WU)(T);return ne.map.size&&(ge=this.applyMerges(ne,D,ge,ee)),ee.store.merge(T,ge),D}return ge},X.prototype.processFieldValue=function(M,S,T,k){var K=this;return S.selectionSet&&null!==M?Array.isArray(M)?M.map(function(ee,ne){var se=K.processFieldValue(ee,S,T,Y(k,ne));return re(k,ne),se}):this.processSelectionSet({result:M,selectionSet:S.selectionSet,context:T,mergeTree:k}):M},X.prototype.applyMerges=function(M,S,T,k,K){var ee,ne=this;if(M.map.size&&!(0,r.A_)(T)){var se=Array.isArray(T)||!(0,r.A_)(S)&&!(0,d.d1)(S)?void 0:S,ce=T;se&&!K&&(K=[(0,r.A_)(se)?se.__ref:se]);var ve,de=function(pe,me){return Array.isArray(pe)?"number"==typeof me?pe[me]:void 0:k.store.getFieldValue(pe,String(me))};M.map.forEach(function(pe,me){K&&K.push(me);var ge=de(se,me),F=de(ce,me),P=ne.applyMerges(pe,ge,F,k,K);P!==F&&(ve=ve||new Map).set(me,P),K&&(0,s.V1)(K.pop()===me)}),ve&&(T=Array.isArray(ce)?ce.slice(0):(0,a.__assign)({},ce),ve.forEach(function(pe,me){T[me]=pe}))}return M.info?this.cache.policies.runMergeFunction(S,T,M.info,k,K&&(ee=k.store).getStorage.apply(ee,K)):T},X}(),j=[];function Y(X,M){var S=X.map;return S.has(M)||S.set(M,j.pop()||{map:new Map}),S.get(M)}function re(X,M){var S=X.map,T=S.get(M);T&&!T.info&&!T.map.size&&(j.push(T),S.delete(M))}var Q=c(81734),H=c(4049),z={dataIdFromObject:H.o,addTypename:!0,resultCaching:!0,typePolicies:{}},$=function(X){function M(S){void 0===S&&(S={});var T=X.call(this)||this;return T.watches=new Set,T.typenameDocumentCache=new Map,T.makeVar=Q.UT,T.txCount=0,T.maybeBroadcastWatch=(0,g.LV)(function(k,K){return T.broadcastWatch.call(T,k,!!K)},{makeCacheKey:function(k){var K=k.optimistic?T.optimisticData:T.data;if(A(K))return K.makeCacheKey(k.query,k.callback,JSON.stringify({optimistic:k.optimistic,rootId:k.rootId,variables:k.variables}))}}),T.watchDep=(0,g.yN)(),T.config=(0,a.__assign)((0,a.__assign)({},z),S),T.addTypename=!!T.config.addTypename,T.policies=new H.l({cache:T,dataIdFromObject:T.config.dataIdFromObject,possibleTypes:T.config.possibleTypes,typePolicies:T.config.typePolicies}),T.data=new L.Root({policies:T.policies,resultCaching:T.config.resultCaching}),T.optimisticData=T.data,T.storeWriter=new N(T,T.storeReader=new C({cache:T,addTypename:T.addTypename})),T}return(0,a.__extends)(M,X),M.prototype.restore=function(S){return S&&this.data.replace(S),this},M.prototype.extract=function(S){return void 0===S&&(S=!1),(S?this.optimisticData:this.data).extract()},M.prototype.read=function(S){var T=S.returnPartialData,k=void 0!==T&&T;try{return this.storeReader.diffQueryAgainstStore({store:S.optimistic?this.optimisticData:this.data,query:S.query,variables:S.variables,rootId:S.rootId,config:this.config,returnPartialData:k}).result||null}catch(K){if(K instanceof t.Z)return null;throw K}},M.prototype.write=function(S){try{return++this.txCount,this.storeWriter.writeToStore({store:this.data,query:S.query,result:S.result,dataId:S.dataId,variables:S.variables})}finally{! --this.txCount&&!1!==S.broadcast&&this.broadcastWatches()}},M.prototype.modify=function(S){if(d.$3.call(S,"id")&&!S.id)return!1;var T=S.optimistic?this.optimisticData:this.data;try{return++this.txCount,T.modify(S.id||"ROOT_QUERY",S.fields)}finally{! --this.txCount&&!1!==S.broadcast&&this.broadcastWatches()}},M.prototype.diff=function(S){return this.storeReader.diffQueryAgainstStore({store:S.optimistic?this.optimisticData:this.data,rootId:S.id||"ROOT_QUERY",query:S.query,variables:S.variables,returnPartialData:S.returnPartialData,config:this.config})},M.prototype.watch=function(S){var T=this;return this.watches.size||(0,Q.MS)(this),this.watches.add(S),S.immediate&&this.maybeBroadcastWatch(S),function(){T.watches.delete(S)&&!T.watches.size&&(0,Q.WR)(T),T.watchDep.dirty(S),T.maybeBroadcastWatch.forget(S)}},M.prototype.gc=function(){return this.optimisticData.gc()},M.prototype.retain=function(S,T){return(T?this.optimisticData:this.data).retain(S)},M.prototype.release=function(S,T){return(T?this.optimisticData:this.data).release(S)},M.prototype.identify=function(S){return(0,r.A_)(S)?S.__ref:this.policies.identify(S)[0]},M.prototype.evict=function(S){if(!S.id){if(d.$3.call(S,"id"))return!1;S=(0,a.__assign)((0,a.__assign)({},S),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(S)}finally{! --this.txCount&&!1!==S.broadcast&&this.broadcastWatches()}},M.prototype.reset=function(){return this.data.clear(),this.optimisticData=this.data,this.broadcastWatches(),Promise.resolve()},M.prototype.removeOptimistic=function(S){var T=this.optimisticData.removeLayer(S);T!==this.optimisticData&&(this.optimisticData=T,this.broadcastWatches())},M.prototype.performTransaction=function(S,T){var k=this,K=function(ne){var ce=k.data,ve=k.optimisticData;++k.txCount,ne&&(k.data=k.optimisticData=ne);try{S(k)}finally{--k.txCount,k.data=ce,k.optimisticData=ve}},ee=!1;"string"==typeof T?(this.optimisticData=this.optimisticData.addLayer(T,K),ee=!0):null===T?K(this.data):K(),this.broadcastWatches(ee)},M.prototype.transformDocument=function(S){if(this.addTypename){var T=this.typenameDocumentCache.get(S);return T||(T=(0,i.XY)(S),this.typenameDocumentCache.set(S,T),this.typenameDocumentCache.set(T,T)),T}return S},M.prototype.broadcastWatches=function(S){var T=this;this.txCount||this.watches.forEach(function(k){return T.maybeBroadcastWatch(k,S)})},M.prototype.broadcastWatch=function(S,T){this.watchDep.dirty(S),this.watchDep(S);var k=this.diff({query:S.query,variables:S.variables,optimistic:S.optimistic});S.optimistic&&T&&(k.fromOptimisticTransaction=!0),S.callback(k)},M}(l.k)},4049:(W,w,c)=>{"use strict";c.d(w,{l:()=>b,o:()=>o});var a=c(40909),g=c(31092),l=c(9685),t=c(23718),r=c(77919),i=c(91779),s=c(40054),e=c(81734);function n(R){return void 0!==R.args?R.args:R.field?(0,t.MB)(R.field,R.variables):null}var o=function(R,_){var O=R.__typename,h=R.id,A=R._id;if("string"==typeof O&&(_&&(_.keyObject=void 0!==h?{id:h}:void 0!==A?{_id:A}:void 0),void 0===h&&(h=A),void 0!==h))return O+":"+("number"==typeof h||"string"==typeof h?h:JSON.stringify(h))},u=function(){},p=function(R,_){return _.fieldName},f=function(R,_,O){return(0,O.mergeObjects)(R,_)},E=function(R,_){return _},b=function(){function R(_){this.config=_,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,a.__assign)({dataIdFromObject:o},_),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),_.possibleTypes&&this.addPossibleTypes(_.possibleTypes),_.typePolicies&&this.addTypePolicies(_.typePolicies)}return R.prototype.identify=function(_,O,h){var A=O&&h?(0,t.D$)(_,O,h):_.__typename;if(A===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var C,v={typename:A,selectionSet:O,fragmentMap:h},U=A&&this.getTypePolicy(A),N=U&&U.keyFn||this.config.dataIdFromObject;N;){var j=N(_,v);if(!Array.isArray(j)){C=j;break}N=x(j)}return C=C?String(C):void 0,v.keyObject?[C,v.keyObject]:[C]},R.prototype.addTypePolicies=function(_){var O=this;Object.keys(_).forEach(function(h){var A=_[h],v=A.queryType,C=A.mutationType,U=A.subscriptionType,N=(0,a.__rest)(A,["queryType","mutationType","subscriptionType"]);v&&O.setRootTypename("Query",h),C&&O.setRootTypename("Mutation",h),U&&O.setRootTypename("Subscription",h),s.$3.call(O.toBeAdded,h)?O.toBeAdded[h].push(N):O.toBeAdded[h]=[N]})},R.prototype.updateTypePolicy=function(_,O){var h=this,A=this.getTypePolicy(_),v=O.keyFields,C=O.fields;function U(N,j){N.merge="function"==typeof j?j:!0===j?f:!1===j?E:N.merge}U(A,O.merge),A.keyFn=!1===v?u:Array.isArray(v)?x(v):"function"==typeof v?v:A.keyFn,C&&Object.keys(C).forEach(function(N){var j=h.getFieldPolicy(_,N,!0),Y=C[N];if("function"==typeof Y)j.read=Y;else{var re=Y.keyArgs,B=Y.read,J=Y.merge;j.keyFn=!1===re?p:Array.isArray(re)?m(re):"function"==typeof re?re:j.keyFn,"function"==typeof B&&(j.read=B),U(j,J)}j.read&&j.merge&&(j.keyFn=j.keyFn||p)})},R.prototype.setRootTypename=function(_,O){void 0===O&&(O=_);var h="ROOT_"+_.toUpperCase(),A=this.rootTypenamesById[h];O!==A&&((0,l.V1)(!A||A===_,1),A&&delete this.rootIdsByTypename[A],this.rootIdsByTypename[O]=h,this.rootTypenamesById[h]=O)},R.prototype.addPossibleTypes=function(_){var O=this;this.usingPossibleTypes=!0,Object.keys(_).forEach(function(h){O.getSupertypeSet(h,!0),_[h].forEach(function(A){O.getSupertypeSet(A,!0).add(h);var v=A.match(s.gk);(!v||v[0]!==A)&&O.fuzzySubtypes.set(A,new RegExp(A))})})},R.prototype.getTypePolicy=function(_){var O=this;if(!s.$3.call(this.typePolicies,_)){var h=this.typePolicies[_]=Object.create(null);h.fields=Object.create(null);var A=this.supertypeMap.get(_);A&&A.size&&A.forEach(function(C){var U=O.getTypePolicy(C),N=U.fields,j=(0,a.__rest)(U,["fields"]);Object.assign(h,j),Object.assign(h.fields,N)})}var v=this.toBeAdded[_];return v&&v.length&&v.splice(0).forEach(function(C){O.updateTypePolicy(_,C)}),this.typePolicies[_]},R.prototype.getFieldPolicy=function(_,O,h){if(_){var A=this.getTypePolicy(_).fields;return A[O]||h&&(A[O]=Object.create(null))}},R.prototype.getSupertypeSet=function(_,O){var h=this.supertypeMap.get(_);return!h&&O&&this.supertypeMap.set(_,h=new Set),h},R.prototype.fragmentMatches=function(_,O,h,A){var v=this;if(!_.typeCondition)return!0;if(!O)return!1;var C=_.typeCondition.name.value;if(O===C)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(C))for(var U=this.getSupertypeSet(O,!0),N=[U],j=function(Q){var H=v.getSupertypeSet(Q,!1);H&&H.size&&N.indexOf(H)<0&&N.push(H)},Y=!(!h||!this.fuzzySubtypes.size),B=0;B<N.length;++B){var J=N[B];if(J.has(C))return U.has(C)||U.add(C),!0;J.forEach(j),Y&&B===N.length-1&&(0,s.T9)(_.selectionSet,h,A)&&(Y=!1,this.fuzzySubtypes.forEach(function(Q,H){var z=O.match(Q);z&&z[0]===O&&j(H)}))}return!1},R.prototype.hasKeyArgs=function(_,O){var h=this.getFieldPolicy(_,O,!1);return!(!h||!h.keyFn)},R.prototype.getStoreFieldName=function(_){var v,O=_.typename,h=_.fieldName,A=this.getFieldPolicy(O,h,!1),C=A&&A.keyFn;if(C&&O)for(var U={typename:O,fieldName:h,field:_.field||null,variables:_.variables},N=n(_);C;){var j=C(N,U);if(!Array.isArray(j)){v=j||h;break}C=m(j)}return void 0===v&&(v=_.field?(0,t.Ii)(_.field,_.variables):(0,t.o5)(h,n(_))),!1===v?h:h===(0,s.iJ)(v)?v:h+":"+v},R.prototype.readField=function(_,O){var h=_.from;if(h&&(_.field||_.fieldName)){if(void 0===_.typename){var v=O.store.getFieldValue(h,"__typename");v&&(_.typename=v)}var C=this.getStoreFieldName(_),U=(0,s.iJ)(C),N=O.store.getFieldValue(h,C),j=this.getFieldPolicy(_.typename,U,!1),Y=j&&j.read;if(Y){var re=y(this,h,_,O,O.store.getStorage((0,t.A_)(h)?h.__ref:h,C));return e.bl.withValue(this.cache,Y,[N,re])}return N}},R.prototype.getMergeFunction=function(_,O,h){var A=this.getFieldPolicy(_,O,!1),v=A&&A.merge;return!v&&h&&(v=(A=this.getTypePolicy(h))&&A.merge),v},R.prototype.runMergeFunction=function(_,O,h,A,v){var C=h.field,U=h.typename,N=h.merge;return N===f?d(A.store.getFieldValue)(_,O):N===E?O:N(_,O,y(this,void 0,{typename:U,fieldName:C.name.value,field:C,variables:A.variables},A,v||Object.create(null)))},R}();function y(R,_,O,h,A){var v=R.getStoreFieldName(O),C=(0,s.iJ)(v),U=O.variables||h.variables,N=h.store,j=N.getFieldValue,Y=N.toReference,re=N.canRead;return{args:n(O),field:O.field||null,fieldName:C,storeFieldName:v,variables:U,isReference:t.A_,toReference:Y,storage:A,cache:R.cache,canRead:re,readField:function(B,J){var Q="string"==typeof B?{fieldName:B,from:J}:(0,a.__assign)({},B);return void 0===Q.from&&(Q.from=_),void 0===Q.variables&&(Q.variables=U),R.readField(Q,h)},mergeObjects:d(j)}}function d(R){return function(O,h){if(Array.isArray(O)||Array.isArray(h))throw new l.zU(2);if(O&&"object"==typeof O&&h&&"object"==typeof h){var A=R(O,"__typename"),v=R(h,"__typename");return A&&v&&A!==v||!(0,s.d1)(O)||!(0,s.d1)(h)?h:(0,a.__assign)((0,a.__assign)({},O),h)}return h}}function m(R){return function(_,O){return _?O.fieldName+":"+JSON.stringify(L(_,R,!1)):O.fieldName}}function x(R){var _=new g.oZ(r.e);return function(O,h){var A;if(h.selectionSet&&h.fragmentMap){var v=_.lookupArray([h.selectionSet,h.fragmentMap]);A=v.aliasMap||(v.aliasMap=I(h.selectionSet,h.fragmentMap))}var C=h.keyObject=L(O,R,!0,A);return h.typename+":"+JSON.stringify(C)}}function I(R,_){var O=Object.create(null),h=new Set([R]);return h.forEach(function(A){A.selections.forEach(function(v){if((0,t.dt)(v)){if(v.alias){var C=v.alias.value,U=v.name.value;U!==C&&((O.aliases||(O.aliases=Object.create(null)))[U]=C)}v.selectionSet&&((O.subsets||(O.subsets=Object.create(null)))[v.name.value]=I(v.selectionSet,_))}else{var Y=(0,i.HQ)(v,_);Y&&h.add(Y.selectionSet)}})}),O}function L(R,_,O,h){var v,A=Object.create(null);return _.forEach(function(C){if(Array.isArray(C)){if("string"==typeof v){var U=h&&h.subsets;A[v]=L(R[v],C,O,U&&U[v])}}else{var j=h&&h.aliases,Y=j&&j[C]||C;s.$3.call(R,Y)?A[v=C]=R[Y]:((0,l.V1)(!O,3),v=void 0)}}),A}},81734:(W,w,c)=>{"use strict";c.d(w,{MS:()=>s,UT:()=>e,WR:()=>i,bl:()=>l});var a=c(31092),l=new(c(35365).DX),t=new WeakMap;function r(o){var u=t.get(o);return u||t.set(o,u={vars:new Set,dep:(0,a.yN)()}),u}function i(o){r(o).vars.forEach(function(u){return u.forgetCache(o)})}function s(o){r(o).vars.forEach(function(u){return u.attachCache(o)})}function e(o){var u=new Set,p=new Set,f=function(b){if(arguments.length>0){if(o!==b){o=b,u.forEach(function(m){r(m).dep.dirty(f),function n(o){o.broadcastWatches&&o.broadcastWatches()}(m)});var y=Array.from(p);p.clear(),y.forEach(function(m){return m(o)})}}else{var d=l.getValue();d&&(E(d),r(d).dep(f))}return o};f.onNextChange=function(b){return p.add(b),function(){p.delete(b)}};var E=f.attachCache=function(b){return u.add(b),r(b).vars.add(f),f};return f.forgetCache=function(b){return u.delete(b)},f}},80462:()=>{},24060:(W,w,c)=>{"use strict";c.d(w,{R:()=>X,l:()=>$});var a=c(40909),g=c(9685),l=c(8347),t=c(70069),r=c(86421),s=c(26253),e=c(11618),n=c(77919);function o(M){return M.errors&&M.errors.length>0||!1}var u=c(26576),p=c(47436),f=c(20794),E=c(30310),b=c(70822),y=c.n(b),d=c(36490),m=c(26071);function x(M){return M&&"function"==typeof M.then}var I=function(M){function S(T){var k=M.call(this,function(K){return k.addObserver(K),function(){return k.removeObserver(K)}})||this;return k.observers=new Set,k.addCount=0,k.promise=new Promise(function(K,ee){k.resolve=K,k.reject=ee}),k.handlers={next:function(K){null!==k.sub&&(k.latest=["next",K],(0,d.w)(k.observers,"next",K))},error:function(K){var ee=k.sub;null!==ee&&(ee&&Promise.resolve().then(function(){return ee.unsubscribe()}),k.sub=null,k.latest=["error",K],k.reject(K),(0,d.w)(k.observers,"error",K))},complete:function(){if(null!==k.sub){var K=k.sources.shift();K?x(K)?K.then(function(ee){return k.sub=ee.subscribe(k.handlers)}):k.sub=K.subscribe(k.handlers):(k.sub=null,k.latest&&"next"===k.latest[0]?k.resolve(k.latest[1]):k.resolve(),(0,d.w)(k.observers,"complete"))}}},k.cancel=function(K){k.reject(K),k.sources=[],k.handlers.complete()},k.promise.catch(function(K){}),"function"==typeof T&&(T=[new(y())(T)]),x(T)?T.then(function(K){return k.start(K)},k.handlers.error):k.start(T),k}return(0,a.__extends)(S,M),S.prototype.start=function(T){void 0===this.sub&&(this.sources=Array.from(T),this.handlers.complete())},S.prototype.deliverLastMessage=function(T){if(this.latest){var k=this.latest[0],K=T[k];K&&K.call(T,this.latest[1]),null===this.sub&&"next"===k&&T.complete&&T.complete()}},S.prototype.addObserver=function(T){this.observers.has(T)||(this.deliverLastMessage(T),this.observers.add(T),++this.addCount)},S.prototype.removeObserver=function(T,k){this.observers.delete(T)&&--this.addCount<1&&!k&&this.handlers.error(new Error("Observable cancelled prematurely"))},S.prototype.cleanup=function(T){var k=this,K=!1,ee=function(){K||(K=!0,k.observers.delete(ne),T())},ne={next:ee,error:ee,complete:ee},se=this.addCount;this.addObserver(ne),this.addCount=se},S}(y());function L(M,S,T){return new(y())(function(k){var K=k.next,ee=k.error,ne=k.complete,se=0,ce=!1,ve={then:function(ge){return new Promise(function(F){return F(ge())})}};function de(ge,F){return ge?function(P){++se;var D=function(){return ge(P)};ve=ve.then(D,D).then(function(G){--se,K&&K.call(k,G),ce&&pe.complete()},function(G){throw--se,G}).catch(function(G){ee&&ee.call(k,G)})}:function(P){return F&&F.call(k,P)}}var pe={next:de(S,K),error:de(T,ee),complete:function(){ce=!0,se||ne&&ne.call(k)}},me=M.subscribe(pe);return function(){return me.unsubscribe()}})}(0,m.r)(I);var R=c(12943),_=c(45688),O=c(74083),h=c(16651),A=c(71318),v=c(91779),C=c(23718),U=c(81734),N=function(){function M(S){var k=S.client,K=S.resolvers,ee=S.fragmentMatcher;this.cache=S.cache,k&&(this.client=k),K&&this.addResolvers(K),ee&&this.setFragmentMatcher(ee)}return M.prototype.addResolvers=function(S){var T=this;this.resolvers=this.resolvers||{},Array.isArray(S)?S.forEach(function(k){T.resolvers=(0,A.D9)(T.resolvers,k)}):this.resolvers=(0,A.D9)(this.resolvers,S)},M.prototype.setResolvers=function(S){this.resolvers={},this.addResolvers(S)},M.prototype.getResolvers=function(){return this.resolvers||{}},M.prototype.runResolvers=function(S){var T=S.document,k=S.remoteResult,K=S.context,ee=S.variables,ne=S.onlyRunForcedResolvers,se=void 0!==ne&&ne;return(0,a.__awaiter)(this,void 0,void 0,function(){return(0,a.__generator)(this,function(ce){return T?[2,this.resolveDocument(T,k.data,K,ee,this.fragmentMatcher,se).then(function(ve){return(0,a.__assign)((0,a.__assign)({},k),{data:ve.result})})]:[2,k]})})},M.prototype.setFragmentMatcher=function(S){this.fragmentMatcher=S},M.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},M.prototype.clientQuery=function(S){return(0,E.d8)(["client"],S)&&this.resolvers?S:null},M.prototype.serverQuery=function(S){return(0,f.er)(S)},M.prototype.prepareContext=function(S){var T=this.cache;return(0,a.__assign)((0,a.__assign)({},S),{cache:T,getCacheKey:function(k){return T.identify(k)}})},M.prototype.addExportedVariables=function(S,T,k){return void 0===T&&(T={}),void 0===k&&(k={}),(0,a.__awaiter)(this,void 0,void 0,function(){return(0,a.__generator)(this,function(K){return S?[2,this.resolveDocument(S,this.buildRootValueFromCache(S,T)||{},this.prepareContext(k),T).then(function(ee){return(0,a.__assign)((0,a.__assign)({},T),ee.exportedVariables)})]:[2,(0,a.__assign)({},T)]})})},M.prototype.shouldForceResolvers=function(S){var T=!1;return(0,h.YR)(S,{Directive:{enter:function(k){if("client"===k.name.value&&k.arguments&&(T=k.arguments.some(function(K){return"always"===K.name.value&&"BooleanValue"===K.value.kind&&!0===K.value.value})))return h.sP}}}),T},M.prototype.buildRootValueFromCache=function(S,T){return this.cache.diff({query:(0,f.zc)(S),variables:T,returnPartialData:!0,optimistic:!1}).result},M.prototype.resolveDocument=function(S,T,k,K,ee,ne){return void 0===k&&(k={}),void 0===K&&(K={}),void 0===ee&&(ee=function(){return!0}),void 0===ne&&(ne=!1),(0,a.__awaiter)(this,void 0,void 0,function(){var se,ce,ve,de,pe,me,ge,F,P;return(0,a.__generator)(this,function(D){return se=(0,p.Vn)(S),ce=(0,p.zK)(S),ve=(0,v.JG)(ce),pe=(de=se.operation)?de.charAt(0).toUpperCase()+de.slice(1):"Query",ge=(me=this).cache,F=me.client,P={fragmentMap:ve,context:(0,a.__assign)((0,a.__assign)({},k),{cache:ge,client:F}),variables:K,fragmentMatcher:ee,defaultOperationType:pe,exportedVariables:{},onlyRunForcedResolvers:ne},[2,this.resolveSelectionSet(se.selectionSet,T,P).then(function(G){return{result:G,exportedVariables:P.exportedVariables}})]})})},M.prototype.resolveSelectionSet=function(S,T,k){return(0,a.__awaiter)(this,void 0,void 0,function(){var K,ee,ne,se,ve=this;return(0,a.__generator)(this,function(de){return K=k.fragmentMap,ee=k.context,ne=k.variables,se=[T],[2,Promise.all(S.selections.map(function(pe){return(0,a.__awaiter)(ve,void 0,void 0,function(){var me;return(0,a.__generator)(this,function(F){return(0,E.MS)(pe,ne)?(0,C.dt)(pe)?[2,this.resolveField(pe,T,k).then(function(P){var D;typeof P<"u"&&se.push(((D={})[(0,C.ue)(pe)]=P,D))})]:((0,C.kd)(pe)?me=pe:(0,g.V1)(me=K[pe.name.value],11),me&&me.typeCondition&&k.fragmentMatcher(T,me.typeCondition.name.value,ee)?[2,this.resolveSelectionSet(me.selectionSet,T,k).then(function(P){se.push(P)})]:[2]):[2]})})})).then(function(){return(0,A.IM)(se)})]})})},M.prototype.resolveField=function(S,T,k){return(0,a.__awaiter)(this,void 0,void 0,function(){var K,ee,ne,se,ce,ve,de,pe,me,ge=this;return(0,a.__generator)(this,function(F){return K=k.variables,ee=S.name.value,ne=(0,C.ue)(S),se=ee!==ne,ce=T[ne]||T[ee],ve=Promise.resolve(ce),(!k.onlyRunForcedResolvers||this.shouldForceResolvers(S))&&(de=T.__typename||k.defaultOperationType,(pe=this.resolvers&&this.resolvers[de])&&(me=pe[se?ee:ne])&&(ve=Promise.resolve(U.bl.withValue(this.cache,me,[T,(0,C.MB)(S,K),k.context,{field:S,fragmentMap:k.fragmentMap}])))),[2,ve.then(function(P){return void 0===P&&(P=ce),S.directives&&S.directives.forEach(function(D){"export"===D.name.value&&D.arguments&&D.arguments.forEach(function(G){"as"===G.name.value&&"StringValue"===G.value.kind&&(k.exportedVariables[G.value.value]=P)})}),S.selectionSet&&null!=P?Array.isArray(P)?ge.resolveSubSelectedArray(S,P,k):S.selectionSet?ge.resolveSelectionSet(S.selectionSet,P,k):void 0:P})]})})},M.prototype.resolveSubSelectedArray=function(S,T,k){var K=this;return Promise.all(T.map(function(ee){return null===ee?null:Array.isArray(ee)?K.resolveSubSelectedArray(S,ee,k):S.selectionSet?K.resolveSelectionSet(S.selectionSet,ee,k):void 0}))},M}(),j=new(n.e?WeakMap:Map);function Y(M,S){var T=M[S];"function"==typeof T&&(M[S]=function(){return j.set(M,(j.get(M)+1)%1e15),T.apply(this,arguments)})}function re(M){M.notifyTimeout&&(clearTimeout(M.notifyTimeout),M.notifyTimeout=void 0)}var B=function(){function M(S){this.cache=S,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.diff=null,this.observableQuery=null,j.has(S)||(j.set(S,0),Y(S,"evict"),Y(S,"modify"),Y(S,"reset"))}return M.prototype.init=function(S){var T=S.networkStatus||O.p.loading;return this.variables&&this.networkStatus!==O.p.loading&&!(0,e.L)(this.variables,S.variables)&&(T=O.p.setVariables),(0,e.L)(S.variables,this.variables)||(this.diff=null),Object.assign(this,{document:S.document,variables:S.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:T}),S.observableQuery&&this.setObservableQuery(S.observableQuery),S.lastRequestId&&(this.lastRequestId=S.lastRequestId),this},M.prototype.reset=function(){re(this),this.diff=null,this.dirty=!1},M.prototype.getDiff=function(S){return void 0===S&&(S=this.variables),this.diff&&(0,e.L)(S,this.variables)?this.diff:(this.updateWatch(this.variables=S),this.diff=this.cache.diff({query:this.document,variables:S,returnPartialData:!0,optimistic:!0}))},M.prototype.setDiff=function(S){var T=this,k=this.diff;this.diff=S,!this.dirty&&(S&&S.result)!==(k&&k.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return T.notify()},0)))},M.prototype.setObservableQuery=function(S){var T=this;S!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=S,S?(S.queryInfo=this,this.listeners.add(this.oqListener=function(){T.getDiff().fromOptimisticTransaction?S.observe():S.reobserve()})):delete this.oqListener)},M.prototype.notify=function(){var S=this;re(this),this.shouldNotify()&&this.listeners.forEach(function(T){return T(S)}),this.dirty=!1},M.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,O.b)(this.networkStatus)&&this.observableQuery){var S=this.observableQuery.options.fetchPolicy;if("cache-only"!==S&&"cache-and-network"!==S)return!1}return!0},M.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),delete this.cancel,this.subscriptions.forEach(function(T){return T.unsubscribe()});var S=this.observableQuery;S&&S.stopPolling()}},M.prototype.cancel=function(){},M.prototype.updateWatch=function(S){var T=this;void 0===S&&(S=this.variables);var k=this.observableQuery;k&&"no-cache"===k.options.fetchPolicy||(!this.lastWatch||this.lastWatch.query!==this.document||!(0,e.L)(S,this.lastWatch.variables))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch={query:this.document,variables:S,optimistic:!0,callback:function(K){return T.setDiff(K)}}))},M.prototype.shouldWrite=function(S,T){var k=this.lastWrite;return!(k&&k.dmCount===j.get(this.cache)&&(0,e.L)(T,k.variables)&&(0,e.L)(S.data,k.result.data))},M.prototype.markResult=function(S,T,k){var K=this;this.graphQLErrors=(0,u.E)(S.errors)?S.errors:[],this.reset(),"no-cache"===T.fetchPolicy?this.diff={result:S.data,complete:!0}:!this.stopped&&k&&(J(S,T.errorPolicy)?this.cache.performTransaction(function(ee){if(K.shouldWrite(S,T.variables))ee.writeQuery({query:K.document,data:S.data,variables:T.variables}),K.lastWrite={result:S,variables:T.variables,dmCount:j.get(K.cache)};else if(K.diff&&K.diff.complete)return void(S.data=K.diff.result);var ne=ee.diff({query:K.document,variables:T.variables,returnPartialData:!0,optimistic:!0});K.stopped||K.updateWatch(T.variables),K.diff=ne,ne.complete&&(S.data=ne.result)}):this.lastWrite=void 0)},M.prototype.markReady=function(){return this.networkError=null,this.networkStatus=O.p.ready},M.prototype.markError=function(S){return this.networkStatus=O.p.error,this.lastWrite=void 0,this.reset(),S.graphQLErrors&&(this.graphQLErrors=S.graphQLErrors),S.networkError&&(this.networkError=S.networkError),S},M}();function J(M,S){void 0===S&&(S="none");var T="ignore"===S||"all"===S,k=!o(M);return!k&&T&&M.data&&(k=!0),k}var Q=Object.prototype.hasOwnProperty,H=function(){function M(S){var T=S.cache,k=S.link,K=S.queryDeduplication,ee=void 0!==K&&K,ne=S.onBroadcast,se=S.ssrMode,ce=void 0!==se&&se,ve=S.clientAwareness,de=void 0===ve?{}:ve,pe=S.localState,me=S.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(n.e?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=T,this.link=k,this.queryDeduplication=ee,this.clientAwareness=de,this.localState=pe||new N({cache:T}),this.ssrMode=ce,this.assumeImmutableResults=!!me,(this.onBroadcast=ne)&&(this.mutationStore=Object.create(null))}return M.prototype.stop=function(){var S=this;this.queries.forEach(function(T,k){S.stopQueryNoBroadcast(k)}),this.cancelPendingFetches(new g.zU(12))},M.prototype.cancelPendingFetches=function(S){this.fetchCancelFns.forEach(function(T){return T(S)}),this.fetchCancelFns.clear()},M.prototype.mutate=function(S){var T=S.mutation,k=S.variables,K=S.optimisticResponse,ee=S.updateQueries,ne=S.refetchQueries,se=void 0===ne?[]:ne,ce=S.awaitRefetchQueries,ve=void 0!==ce&&ce,de=S.update,pe=S.errorPolicy,me=void 0===pe?"none":pe,ge=S.fetchPolicy,F=S.context,P=void 0===F?{}:F;return(0,a.__awaiter)(this,void 0,void 0,function(){var D,G,ae;return(0,a.__generator)(this,function(he){switch(he.label){case 0:return(0,g.V1)(T,13),(0,g.V1)(!ge||"no-cache"===ge,14),D=this.generateMutationId(),T=this.transform(T).document,k=this.getVariables(T,k),this.transform(T).hasClientExports?[4,this.localState.addExportedVariables(T,k,P)]:[3,2];case 1:k=he.sent(),he.label=2;case 2:return G=this.mutationStore&&(this.mutationStore[D]={mutation:T,variables:k,loading:!0,error:null}),K&&this.markMutationOptimistic(K,{mutationId:D,document:T,variables:k,errorPolicy:me,updateQueries:ee,update:de}),this.broadcastQueries(),ae=this,[2,new Promise(function(le,V){var Z,te;ae.getObservableFromLink(T,(0,a.__assign)((0,a.__assign)({},P),{optimisticResponse:K}),k,!1).subscribe({next:function(oe){if(o(oe)&&"none"===me)te=new R.K({graphQLErrors:oe.errors});else{if(G&&(G.loading=!1,G.error=null),"no-cache"!==ge)try{ae.markMutationResult({mutationId:D,result:oe,document:T,variables:k,errorPolicy:me,updateQueries:ee,update:de})}catch(fe){return void(te=new R.K({networkError:fe}))}Z=oe}},error:function(oe){G&&(G.loading=!1,G.error=oe),K&&ae.cache.removeOptimistic(D),ae.broadcastQueries(),V(new R.K({networkError:oe}))},complete:function(){if(te&&G&&(G.loading=!1,G.error=te),K&&ae.cache.removeOptimistic(D),ae.broadcastQueries(),te)V(te);else{"function"==typeof se&&(se=se(Z));var oe=[];(0,u.E)(se)&&se.forEach(function(fe){if("string"==typeof fe)ae.queries.forEach(function(Se){var we=Se.observableQuery;we&&we.hasObservers()&&we.queryName===fe&&oe.push(we.refetch())});else{var be={query:fe.query,variables:fe.variables,fetchPolicy:"network-only"};fe.context&&(be.context=fe.context),oe.push(ae.query(be))}}),Promise.all(ve?oe:[]).then(function(){"ignore"===me&&Z&&o(Z)&&delete Z.errors,le(Z)},V)}}})})]}})})},M.prototype.markMutationResult=function(S,T){var k=this;if(void 0===T&&(T=this.cache),J(S.result,S.errorPolicy)){var K=[{result:S.result.data,dataId:"ROOT_MUTATION",query:S.document,variables:S.variables}],ee=S.updateQueries;ee&&this.queries.forEach(function(ne,se){var ce=ne.observableQuery,ve=ce&&ce.queryName;if(ve&&Q.call(ee,ve)){var de=ee[ve],pe=k.queries.get(se),me=pe.document,ge=pe.variables,F=T.diff({query:me,variables:ge,returnPartialData:!0,optimistic:!1}),P=F.result;if(F.complete&&P){var G=de(P,{mutationResult:S.result,queryName:me&&(0,p.n4)(me)||void 0,queryVariables:ge});G&&K.push({result:G,dataId:"ROOT_QUERY",query:me,variables:ge})}}}),T.performTransaction(function(ne){K.forEach(function(ce){return ne.write(ce)});var se=S.update;se&&se(ne,S.result)},null)}},M.prototype.markMutationOptimistic=function(S,T){var k=this,K="function"==typeof S?S(T.variables):S;return this.cache.recordOptimisticTransaction(function(ee){try{k.markMutationResult((0,a.__assign)((0,a.__assign)({},T),{result:{data:K}}),ee)}catch{}},T.mutationId)},M.prototype.fetchQuery=function(S,T,k){return this.fetchQueryObservable(S,T,k).promise},M.prototype.getQueryStore=function(){var S=Object.create(null);return this.queries.forEach(function(T,k){S[k]={variables:T.variables,networkStatus:T.networkStatus,networkError:T.networkError,graphQLErrors:T.graphQLErrors}}),S},M.prototype.resetErrors=function(S){var T=this.queries.get(S);T&&(T.networkError=void 0,T.graphQLErrors=[])},M.prototype.transform=function(S){var T=this.transformCache;if(!T.has(S)){var k=this.cache.transformDocument(S),K=(0,f.hX)(this.cache.transformForLink(k)),ee=this.localState.clientQuery(k),ne=K&&this.localState.serverQuery(K),se={document:k,hasClientExports:(0,E.f2)(k),hasForcedResolvers:this.localState.shouldForceResolvers(k),clientQuery:ee,serverQuery:ne,defaultVars:(0,p.wY)((0,p.Vu)(k))},ce=function(ve){ve&&!T.has(ve)&&T.set(ve,se)};ce(S),ce(k),ce(ee),ce(ne)}return T.get(S)},M.prototype.getVariables=function(S,T){return(0,a.__assign)((0,a.__assign)({},this.transform(S).defaultVars),T)},M.prototype.watchQuery=function(S){typeof(S=(0,a.__assign)((0,a.__assign)({},S),{variables:this.getVariables(S.query,S.variables)})).notifyOnNetworkStatusChange>"u"&&(S.notifyOnNetworkStatusChange=!1);var T=new B(this.cache),k=new _.U({queryManager:this,queryInfo:T,options:S});return this.queries.set(k.queryId,T),T.init({document:S.query,observableQuery:k,variables:S.variables}),k},M.prototype.query=function(S){var T=this;(0,g.V1)(S.query,15),(0,g.V1)("Document"===S.query.kind,16),(0,g.V1)(!S.returnPartialData,17),(0,g.V1)(!S.pollInterval,18);var k=this.generateQueryId();return this.fetchQuery(k,S).finally(function(){return T.stopQuery(k)})},M.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},M.prototype.generateRequestId=function(){return this.requestIdCounter++},M.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},M.prototype.stopQueryInStore=function(S){this.stopQueryInStoreNoBroadcast(S),this.broadcastQueries()},M.prototype.stopQueryInStoreNoBroadcast=function(S){var T=this.queries.get(S);T&&T.stop()},M.prototype.clearStore=function(){return this.cancelPendingFetches(new g.zU(19)),this.queries.forEach(function(S){S.observableQuery?S.networkStatus=O.p.loading:S.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset()},M.prototype.resetStore=function(){var S=this;return this.clearStore().then(function(){return S.reFetchObservableQueries()})},M.prototype.reFetchObservableQueries=function(S){var T=this;void 0===S&&(S=!1);var k=[];return this.queries.forEach(function(K,ee){var ne=K.observableQuery;if(ne&&ne.hasObservers()){var se=ne.options.fetchPolicy;ne.resetLastResults(),"cache-only"!==se&&(S||"standby"!==se)&&k.push(ne.refetch()),T.getQuery(ee).setDiff(null)}}),this.broadcastQueries(),Promise.all(k)},M.prototype.setObservableQuery=function(S){this.getQuery(S.queryId).setObservableQuery(S)},M.prototype.startGraphQLSubscription=function(S){var T=this,k=S.query,K=S.fetchPolicy,ee=S.errorPolicy,ne=S.variables,se=S.context,ce=void 0===se?{}:se;k=this.transform(k).document,ne=this.getVariables(k,ne);var ve=function(pe){return T.getObservableFromLink(k,ce,pe,!1).map(function(me){if("no-cache"!==K&&(J(me,ee)&&T.cache.write({query:k,result:me.data,dataId:"ROOT_SUBSCRIPTION",variables:pe}),T.broadcastQueries()),o(me))throw new R.K({graphQLErrors:me.errors});return me})};if(this.transform(k).hasClientExports){var de=this.localState.addExportedVariables(k,ne,ce).then(ve);return new(y())(function(pe){var me=null;return de.then(function(ge){return me=ge.subscribe(pe)},pe.error),function(){return me&&me.unsubscribe()}})}return ve(ne)},M.prototype.stopQuery=function(S){this.stopQueryNoBroadcast(S),this.broadcastQueries()},M.prototype.stopQueryNoBroadcast=function(S){this.stopQueryInStoreNoBroadcast(S),this.removeQuery(S)},M.prototype.removeQuery=function(S){this.fetchCancelFns.delete(S),this.getQuery(S).stop(),this.queries.delete(S)},M.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(S){return S.notify()})},M.prototype.getLocalState=function(){return this.localState},M.prototype.getObservableFromLink=function(S,T,k,K){var ne,ee=this;void 0===K&&(K=null!==(ne=T?.queryDeduplication)&&void 0!==ne?ne:this.queryDeduplication);var se,ce=this.transform(S).serverQuery;if(ce){var de=this.inFlightLinkObservables,pe=this.link,me={query:ce,variables:k,operationName:(0,p.n4)(ce)||void 0,context:this.prepareContext((0,a.__assign)((0,a.__assign)({},T),{forceFetch:!K}))};if(T=me.context,K){var ge=de.get(ce)||new Map;de.set(ce,ge);var F=JSON.stringify(k);if(!(se=ge.get(F))){var P=new I([(0,t.g)(pe,me)]);ge.set(F,se=P),P.cleanup(function(){ge.delete(F)&&ge.size<1&&de.delete(ce)})}}else se=new I([(0,t.g)(pe,me)])}else se=new I([y().of({data:{}})]),T=this.prepareContext(T);var D=this.transform(S).clientQuery;return D&&(se=L(se,function(G){return ee.localState.runResolvers({document:D,remoteResult:G,context:T,variables:k})})),se},M.prototype.getResultsFromLink=function(S,T,k){var K=S.lastRequestId=this.generateRequestId();return L(this.getObservableFromLink(S.document,k.context,k.variables),function(ee){var ne=(0,u.E)(ee.errors);if(K>=S.lastRequestId){if(ne&&"none"===k.errorPolicy)throw S.markError(new R.K({graphQLErrors:ee.errors}));S.markResult(ee,k,T),S.markReady()}var se={data:ee.data,loading:!1,networkStatus:S.networkStatus||O.p.ready};return ne&&"ignore"!==k.errorPolicy&&(se.errors=ee.errors),se},function(ee){var ne=(0,R.M)(ee)?ee:new R.K({networkError:ee});throw K>=S.lastRequestId&&S.markError(ne),ne})},M.prototype.fetchQueryObservable=function(S,T,k){var K=this;void 0===k&&(k=O.p.loading);var ee=this.transform(T.qu