decidim-bulletin_board 0.12.1 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db1bf70113c0ede5921ae167212222572836800e42b85f9bd59f1ed5e7bec382
4
- data.tar.gz: aacb92f2ae6e70178cf2b7aac9637b1a7a77a04647c0b44260c3f840711f763f
3
+ metadata.gz: fb79323b9830b1adcef840dc563fc66acf62ebd28900cb3ab42ce5f491dd0923
4
+ data.tar.gz: '069e90e60db8c7e822101918e375de9c720b127cdc1d9608c532870a88784330'
5
5
  SHA512:
6
- metadata.gz: 76c8c175dad275f70ee3fd1fc2900691ecf8e6757aeb02243e523ffa1e9b0c5493e6bbe142481b767ee5eb3ca5299e36b3f216b8d3c9467a7f2bee23ef3a2021
7
- data.tar.gz: f01257df14fb0066c27b1655309d4f454eeb08d1d50c0e244e1684432fb992a5cd0eac905ef34b3a57f7f6f81391a8a429f69f2242f43b951da11d13ff770f6b
6
+ metadata.gz: 50d43477ce172a95f7122d962a461a192a2ebaff3c569b78e4a466934e2ddf0a642ec38e41aa421a4400be0345f83cab405cfb16cfd34e73c62221844d12563f
7
+ data.tar.gz: 4357ce606febe6c34800caad080d1a26ca9a06aa0e8d98b5541169c14cb2e1de255d00f87732301644f40df0f8cef43d83134b0d24cec540511640a8eba10c00
data/CHANGELOG.md CHANGED
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## [0.13.0] - 2021-02-23
11
+
10
12
  ## [0.12.1] - 2021-02-22
11
13
 
12
14
  ### Changed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- decidim-bulletin_board (0.12.1)
4
+ decidim-bulletin_board (0.13.0)
5
5
  byebug (~> 11.0)
6
6
  graphlient (~> 0.4.0)
7
7
  jwt (~> 2.2.2)
@@ -1,4 +1,4 @@
1
- window.decidimBulletinBoard=function(){var e={735:function(e,t,r){"use strict";r.r(t),r.d(t,{Client:function(){return y},Election:function(){return b},IdentificationKeys:function(){return ee},KeyCeremonyComponent:function(){return te},MESSAGE_PROCESSED:function(){return Q},MESSAGE_RECEIVED:function(){return G},MessageIdentifier:function(){return m},TallyComponent:function(){return re},Trustee:function(){return X},VoteComponent:function(){return ne},Voter:function(){return $}});var n=r(1439),i=r(9312),a=r.n(i),o=r(9953),s=r.n(o),u=r(3718),c=r.n(u),l=r(6890),f=r.n(l),h=r(5313),p=r.n(h);class d{constructor({apiEndpointUrl:e,headers:t}){const r=new n.HttpLink({uri:e,headers:t});this.apolloClient=new n.fe({link:r,cache:new n.h4})}async getLogEntry({electionUniqueId:e,contentHash:t}){return(await this.apolloClient.query({query:f(),variables:{electionUniqueId:e,contentHash:t}})).data.logEntry}async getElectionLogEntries({electionUniqueId:e,after:t,types:r}){return(await this.apolloClient.query({query:a(),variables:{electionUniqueId:e,after:t,types:r},fetchPolicy:"no-cache"})).data.election.logEntries}async processKeyCeremonyStep({messageId:e,signedData:t}){const r=await this.apolloClient.mutate({mutation:s(),variables:{messageId:e,signedData:t}});if(r.data.processKeyCeremonyStep.error)throw new Error(r.data.processKeyCeremonyStep.error);return r.data.processKeyCeremonyStep.pendingMessage}async getPendingMessageByMessageId({messageId:e}){return(await this.apolloClient.query({query:p(),variables:{messageId:e}})).data.pendingMessage}async processTallyStep({messageId:e,signedData:t}){const r=await this.apolloClient.mutate({mutation:c(),variables:{messageId:e,signedData:t}});if(r.data.processTallyStep.error)throw new Error(r.data.processTallyStep.error);return r.data.processTallyStep.pendingMessage}}class y{constructor(e){this.apiClient=new d(e)}getLogEntry({electionUniqueId:e,contentHash:t}){return this.apiClient.getLogEntry({electionUniqueId:e,contentHash:t})}getElectionLogEntries(e){return this.apiClient.getElectionLogEntries(e)}processKeyCeremonyStep(e){return this.apiClient.processKeyCeremonyStep(e)}processTallyStep(e){return this.apiClient.processTallyStep(e)}waitForPendingMessageToBeProcessed(e,t=1e3){return new Promise((r=>{const n=setInterval((()=>{this.apiClient.getPendingMessageByMessageId({messageId:e}).then((e=>{"enqueued"!==e.status&&(clearInterval(n),r(e))}))}),t)}))}}const v="t",g=["a","b","v",v];class m{static parse(e){const[t,r]=e.split("+"),[n,i,a,o]=t.split(".",4),[s,u]=r.split(".",2),c=o?`.${o}`:"";if(!g.includes(s))throw new Error("Invalid message identifier format");return{electionId:`${n}.${i}`,type:a,subtype:o,typeSubtype:`${a}${c}`,author:{type:s,id:u}}}static format(e,t,r,n){return`${e}.${t}+${r}.${n}`}}class b{constructor({uniqueId:e,bulletinBoardClient:t,typesFilter:r,options:n}){this.uniqueId=e,this.bulletinBoardClient=t,this.logEntries=[],this.typesFilter=r,this.subscriptionId=null,this.options=n||{waitUntilNextCheck:2e3}}async subscribeToLogEntriesChanges(){this.unsubscribeToLogEntriesChanges(),await this.getLogEntries(),this.subscriptionId=setInterval((()=>{this.getLogEntries()}),this.options.waitUntilNextCheck)}unsubscribeToLogEntriesChanges(){null!==this.subscriptionId&&(clearInterval(this.subscriptionId),this.subscriptionId=null)}getLastMessageFromTrustee(e){for(let t=this.logEntries.length-1;t>=0;t--){const r=this.logEntries[t],n=m.parse(r.messageId);if(n.author.type===v&&n.author.id===e)return r}return null}getLogEntries(){const e=this.logEntries[this.logEntries.length-1],t=e&&e.id||null;return new Promise((e=>{this.bulletinBoardClient.getElectionLogEntries({electionUniqueId:this.uniqueId,after:t,types:this.typesFilter}).then((t=>{t.length&&(this.logEntries=[...this.logEntries,...t]),e()}))}))}}var E=r(655);function S(e){return"function"==typeof e}var C=!1,w={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack;C=e},get useDeprecatedSynchronousErrorHandling(){return C}};function T(e){setTimeout((function(){throw e}),0)}var A={closed:!0,next:function(e){},error:function(e){if(w.useDeprecatedSynchronousErrorHandling)throw e;T(e)},complete:function(){}},I=function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}();var k=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),_=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var r,n=this,i=n._parentOrParents,a=n._ctorUnsubscribe,o=n._unsubscribe,s=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof e)i.remove(this);else if(null!==i)for(var u=0;u<i.length;++u){i[u].remove(this)}if(S(o)){a&&(this._unsubscribe=void 0);try{o.call(this)}catch(e){t=e instanceof k?B(e.errors):[e]}}if(I(s)){u=-1;for(var c=s.length;++u<c;){var l=s[u];if(null!==(r=l)&&"object"==typeof r)try{l.unsubscribe()}catch(e){t=t||[],e instanceof k?t=t.concat(B(e.errors)):t.push(e)}}}if(t)throw new k(t)}},e.prototype.add=function(t){var r=t;if(!t)return e.EMPTY;switch(typeof t){case"function":r=new e(t);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof e)){var n=r;(r=new e)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var i=r._parentOrParents;if(null===i)r._parentOrParents=this;else if(i instanceof e){if(i===this)return r;r._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return r;i.push(this)}var a=this._subscriptions;return null===a?this._subscriptions=[r]:a.push(r),r},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function B(e){return e.reduce((function(e,t){return e.concat(t instanceof k?t.errors:t)}),[])}var N=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),O=function(e){function t(r,n,i){var a=e.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=A;break;case 1:if(!r){a.destination=A;break}if("object"==typeof r){r instanceof t?(a.syncErrorThrowable=r.syncErrorThrowable,a.destination=r,r.add(a)):(a.syncErrorThrowable=!0,a.destination=new R(a,r));break}default:a.syncErrorThrowable=!0,a.destination=new R(a,r,n,i)}return a}return E.ZT(t,e),t.prototype[N]=function(){return this},t.create=function(e,r,n){var i=new t(e,r,n);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(_),R=function(e){function t(t,r,n,i){var a,o=e.call(this)||this;o._parentSubscriber=t;var s=o;return S(r)?a=r:r&&(a=r.next,n=r.error,i=r.complete,r!==A&&(S((s=Object.create(r)).unsubscribe)&&o.add(s.unsubscribe.bind(s)),s.unsubscribe=o.unsubscribe.bind(o))),o._context=s,o._next=a,o._error=n,o._complete=i,o}return E.ZT(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;w.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=w.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):T(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;T(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};w.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),w.useDeprecatedSynchronousErrorHandling)throw e;T(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!w.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(t){return w.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(T(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(O);var x=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function P(e){return e}function F(e){return 0===e.length?P:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var D=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,i=function(e,t,r){if(e){if(e instanceof O)return e;if(e[N])return e[N]()}return e||t||r?new O(e,t,r):new O(A)}(e,t,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||w.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),w.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){w.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),!function(e){for(;e;){var t=e,r=t.closed,n=t.destination,i=t.isStopped;if(r||i)return!1;e=n&&n instanceof O?n:null}return!0}(e)?console.warn(t):e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=L(t))((function(t,n){var i;i=r.subscribe((function(t){try{e(t)}catch(e){n(e),i&&i.unsubscribe()}}),n,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[x]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:F(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=L(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function L(e){if(e||(e=w.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var U=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),j=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return E.ZT(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(_),V=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return E.ZT(t,e),t}(O),K=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return E.ZT(t,e),t.prototype[N]=function(){return new V(this)},t.prototype.lift=function(e){var t=new M(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new U;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),i=0;i<r;i++)n[i].next(e)},t.prototype.error=function(e){if(this.closed)throw new U;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),i=0;i<r;i++)n[i].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new U;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new U;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new U;return this.hasError?(e.error(this.thrownError),_.EMPTY):this.isStopped?(e.complete(),_.EMPTY):(this.observers.push(e),new j(this,e))},t.prototype.asObservable=function(){var e=new D;return e.source=this,e},t.create=function(e,t){return new M(e,t)},t}(D),M=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return E.ZT(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):_.EMPTY},t}(K);function q(){}var z=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}return e.prototype.call=function(e,t){return t.subscribe(new H(e,this.nextOrObserver,this.error,this.complete))},e}(),H=function(e){function t(t,r,n,i){var a=e.call(this,t)||this;return a._tapNext=q,a._tapError=q,a._tapComplete=q,a._tapError=n||q,a._tapComplete=i||q,S(r)?(a._context=a,a._tapNext=r):r&&(a._context=r,a._tapNext=r.next||q,a._tapError=r.error||q,a._tapComplete=r.complete||q),a}return E.ZT(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},t}(O);const G="[Message] Received",Q="[Message] Processed";class W{constructor(){this.events=new K}subscribe(e){return this.events.pipe((t=e,function(e){return e.lift(new z(t,r,n))})).subscribe();var t,r,n}broadcastMessageReceived(e){this.events.next({type:G,message:e})}broadcastMessageProcessed(e,t){this.events.next({type:Q,message:e,result:t})}}var Y=r(1217);function Z(e,t){const r="string"==typeof e?JSON.parse(e):e,n="string"==typeof t?JSON.parse(t):t;if(r&&n){const{n:e,e:t,kty:i}=r,{n:a,e:o,kty:s}=n;return e===a&&t===o&&i===s}return!1}class J{constructor({authorityPublicKeyJSON:e}){this.authorityPublicKeyJSON=e,this.authorityPublicKey=Y.JWK.asKey(e,"json"),this.keys=null}async parse({messageId:e,signedData:t}){const r=m.parse(e),n=await(this.keys?this.keys[r.author.type][r.author.id]:this.authorityPublicKey);if(!t)return{messageIdentifier:r,decodedData:null};const i=await Y.JWS.createVerify(n).verify(t,{algorithms:["RS256"]}),a=JSON.parse(new TextDecoder("utf-8").decode(i.payload));return this.keys||(this.keys=await this.parseCreateElection(a)),{messageIdentifier:r,decodedData:a}}async parseCreateElection({authority:e,bulletin_board:t,trustees:r}){if(!Z(e.public_key,this.authorityPublicKeyJSON))throw new Error("The authority public key doesn't match the election's authority public key.");const n={a:{[e.name]:this.authorityPublicKey},b:{},[v]:{}},i=[];i.push(this.loadKey(t).then((e=>{n.b[t.name]=e})));for(const e of r)i.push(this.loadKey(e).then((t=>{n.t[e.name]=t})));return await Promise.all(i),n}loadKey(e){return Y.JWK.asKey(e.public_key,"json")}}class X{constructor({uniqueId:e,bulletinBoardClient:t,authorityPublicKeyJSON:r,identificationKeys:n,election:i,wrapperAdapter:a,options:o}){this.uniqueId=e,this.bulletinBoardClient=t,this.identificationKeys=n,this.election=i,this.options=o||{waitUntilNextCheck:100},this.wrapperAdapter=a,this.parser=new J({authorityPublicKeyJSON:r}),this.events=new W,this.nextLogEntryIndexToProcess=0,this.lastMessageProcessedWithResult=null,this.hasSetupKeyCeremony=!1}setup(){return this.election.subscribeToLogEntriesChanges()}tearDown(){this.election.unsubscribeToLogEntriesChanges()}async*setupKeyCeremony(){let e;for(;!e;)e=await this.waitForNextLogEntryResult();return yield await this.wrapperAdapter.backup(),await this.processKeyCeremonyStep(e),this.hasSetupKeyCeremony=!0,this.hasSetupKeyCeremony}async runKeyCeremony(){if(!this.hasSetupKeyCeremony)throw new Error("The key ceremony has not been setup yet");if(await this.needsToBeRestored())throw new Error("You need to restore the wrapper state to continue");return this.waitForNextLogEntryResult().then((async e=>(await this.processKeyCeremonyStep(e),await this.wrapperAdapter.isKeyCeremonyDone()?this.tearDown():this.runKeyCeremony())))}async runTally(){if(await this.needsToBeRestored())throw new Error("You need to restore the wrapper state to continue");return this.waitForNextLogEntryResult().then((async e=>(await this.processTallyStep(e),await this.wrapperAdapter.isTallyDone()?this.tearDown():this.runTally())))}async needsToBeRestored(){return this.election.getLastMessageFromTrustee(this.uniqueId)&&await this.wrapperAdapter.isFresh()}async restore(e){const t=this.election.getLastMessageFromTrustee(this.uniqueId);return this.hasSetupKeyCeremony=t&&await this.wrapperAdapter.restore(e,t.messageId),this.hasSetupKeyCeremony}async waitForNextLogEntryResult(){return await new Promise((e=>{const t=setInterval((async()=>{const{logEntries:r}=this.election;r.length>this.nextLogEntryIndexToProcess&&(clearInterval(t),e())}),this.options.waitUntilNextCheck)})),this.processNextLogEntry()}async processNextLogEntry(){const{logEntries:e}=this.election,t=e[this.nextLogEntryIndexToProcess];this.events.broadcastMessageReceived(t);const{messageIdentifier:r,decodedData:n}=await this.parser.parse(t),i=await this.wrapperAdapter.processMessage(r.typeSubtype,n);if(this.events.broadcastMessageProcessed(t,i),this.nextLogEntryIndexToProcess+=1,i){const{messageType:e,content:t}=i;return{message_id:m.format(this.election.uniqueId,e,v,this.uniqueId),content:t}}return i}async processKeyCeremonyStep(e){if(e&&!this.isMessageAlreadyLogged(e)){const t=await this.signMessage(e);return this.bulletinBoardClient.processKeyCeremonyStep({messageId:e.message_id,signedData:t})}}async processTallyStep(e){if(e&&!this.isMessageAlreadyLogged(e)){const t=await this.signMessage(e);return this.bulletinBoardClient.processTallyStep({messageId:e.message_id,signedData:t})}}isMessageAlreadyLogged({message_id:e}){const{logEntries:t}=this.election;return t.find((t=>t.messageId===e))}signMessage(e){return this.identificationKeys.sign({iat:Math.floor(new Date/1e3),...e})}}class ${constructor({bulletinBoardClient:e,authorityPublicKeyJSON:t,election:r,uniqueId:n,wrapperAdapter:i}){this.uniqueId=n,this.election=r,this.bulletinBoardClient=e,this.wrapperAdapter=i,this.parser=new J({authorityPublicKeyJSON:t})}setup(){return this.bulletinBoardClient.getElectionLogEntries({electionUniqueId:this.election.uniqueId,types:["create_election","end_key_ceremony"]}).then((async e=>{for(const t of e){const{messageIdentifier:e,decodedData:r}=await this.parser.parse(t);await this.wrapperAdapter.processMessage(e.typeSubtype,r)}}))}async encrypt(e){const{encryptedData:t,auditableData:r}=await this.wrapperAdapter.encrypt(e);return{encryptedData:t,encryptedDataHash:await this.hash(t),auditableData:r}}async hash(e){return window.crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e)).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}verifyVote(e){const{uniqueId:t}=this.election;return this.bulletinBoardClient.getLogEntry({electionUniqueId:t,contentHash:e})}}class ee{constructor(e,t){this.format="jwk",this.algorithm={name:"RSASSA-PKCS1-v1_5",modulusLength:4096,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},this.usages=["sign"],this.publicKeyAttrs=["alg","e","kty","n"],this.jwtHeader=this._encode64(JSON.stringify({alg:"RS256",typ:"JWT"})),this.trusteeUniqueId=e,this.privateKey=null,this.publicKey=null,this.storedPublicKey=JSON.parse(t||null),this.keyIdentifier=`${e}-private-key`,this.browserSupport=this._checkBrowserSupport(),this.textEncoder=new TextEncoder("utf-8"),this.dbName="identification_keys",this.dbVersion=1,this.presentPromise=this._read()}present(e){this.presentPromise.then((()=>{this._matchesStoredPublicKey(this.publicKey)?e(this.browserSupport&&null!==this.privateKey):this.reset().then(e(!1))}))}async generate(){return!(!this.browserSupport||this.storedPublicKey)&&new Promise(((e,t)=>{try{return this.crypto.subtle.generateKey(this.algorithm,!0,this.usages).then((t=>this.crypto.subtle.exportKey(this.format,t.privateKey).then((t=>{this.publicKey=this._publicKeyFromPrivateKey(t);const r=document.createElement("a");return r.setAttribute("href",`data:text/plain;charset=utf-8,${encodeURIComponent(JSON.stringify(t))}`),r.setAttribute("download",`${this.keyIdentifier}.jwk`),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),e()})).catch(this._handleErrors)))}catch(e){return t(e)}}))}async upload(e){return!(!this.browserSupport||null!==this.privateKey)&&new Promise(((t,r)=>{if(e)this.onUploadInputChange(e,t,r);else{const e=document.createElement("input");e.setAttribute("type","file"),e.setAttribute("accept",".jwk"),e.style.display="none",document.body.appendChild(e),e.addEventListener("change",(n=>{document.body.removeChild(e),this.onUploadInputChange(n,t,r)})),e.click()}}))}onUploadInputChange(e,t,r){const n=new FileReader;n.readAsText(e.target.files[0]),n.onload=e=>{let n="";try{n=JSON.parse(e.target.result)}catch(e){return r("invalid_format")}return this.crypto.subtle.importKey(this.format,n,this.algorithm,!1,this.usages).then((e=>{const i=this._publicKeyFromPrivateKey(n);this._matchesStoredPublicKey(i)?(this.publicKey=i,this.privateKey=e,this._save().then((()=>t(!0))).catch((()=>{r("could not be saved")}))):r("invalid_public_key")})).catch((()=>{r("invalid_key")}))}}reset(){return this.privateKey=this.publicKey=null,this._clear()}async sign(e){if(!this.browserSupport||null===this.privateKey)return!1;const t=`${this.jwtHeader}.${this._encode64(JSON.stringify(e))}`,r=await this.crypto.subtle.sign(this.algorithm,this.privateKey,this.textEncoder.encode(t));return`${t}.${btoa(Reflect.apply(String.fromCharCode,null,new Uint8Array(r))).replace(/[=]/g,"").replace(/\+/g,"-").replace(/\//g,"_")}`}_checkBrowserSupport(){return this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,this.crypto=window.crypto||window.msCrypto,window.indexedDB&&window.crypto}_handleErrors(e){throw e}_publicKeyFromPrivateKey(e){return Object.keys(e).filter((e=>this.publicKeyAttrs.includes(e))).reduce(((t,r)=>(t[r]=e[r],t)),{})}_matchesStoredPublicKey(e){return Z(e,this.storedPublicKey)}_encode64(e){return btoa(unescape(encodeURIComponent(e))).replace(/[=]/g,"").replace(/\+/g,"-").replace(/\//g,"_")}async _read(){return this._useDb("readonly",(e=>{e.get(this.keyIdentifier).onsuccess=e=>{e.target.result&&(this.privateKey=e.target.result.privateKey,this.publicKey=e.target.result.publicKey)}}))}async _save(){return this._useDb("readwrite",(e=>{e.add({privateKey:this.privateKey,publicKey:this.publicKey},this.keyIdentifier)}))}async _clear(){return this._useDb("readwrite",(e=>{e.delete(this.keyIdentifier)}))}async _useDb(e,t){return new Promise(((r,n)=>{let i=null;const a=this.indexedDB.open(this.dbName,this.dbVersion);a.onerror=e=>{i=null,n(e)},a.onupgradeneeded=()=>{i=a.result,i.createObjectStore("IdentificationKeys")},a.onsuccess=()=>{i=a.result;const n=i.transaction(["IdentificationKeys"],e);t(n.objectStore("IdentificationKeys")),n.oncomplete=()=>{i.close(),r()}}}))}}class te{constructor({bulletinBoardClientParams:e,authorityPublicKeyJSON:t,electionUniqueId:r,trusteeUniqueId:n,trusteeIdentificationKeys:i,trusteeWrapperAdapter:a}){const o=new y(e);this.election=new b({uniqueId:r,bulletinBoardClient:o,typesFilter:["create_election","start_key_ceremony","key_ceremony","end_key_ceremony"]}),this.trustee=new X({uniqueId:n,bulletinBoardClient:o,authorityPublicKeyJSON:t,identificationKeys:i,election:this.election,wrapperAdapter:a})}async bindEvents({onSetup:e,onEvent:t,onBindRestoreButton:r,onBindStartButton:n,onRestore:i,onComplete:a,onStart:o,onTrusteeNeedsToBeRestored:s,onBackupNeeded:u,onBindBackupButton:c,onBackupStarted:l}){this.trustee.events.subscribe(t),r((e=>{const t=e.target.files[0],r=new FileReader;r.onload=async({target:e})=>{const t=e.result;await this.trustee.restore(t)&&(i(),await this.trustee.runKeyCeremony(),a())},r.readAsText(t)})),n((async e=>{if(e.preventDefault(),o(),await this.trustee.needsToBeRestored())s();else{const e=this.trustee.setupKeyCeremony(),{value:t}=await e.next();u(),c(t,`${this.trustee.uniqueId}-election-${this.election.uniqueId}.bak`,(async()=>{l(),await e.next(),await this.trustee.runKeyCeremony(),a()}))}})),await this.trustee.setup(),e()}}class re{constructor({bulletinBoardClientParams:e,authorityPublicKeyJSON:t,electionUniqueId:r,trusteeUniqueId:n,trusteeIdentificationKeys:i,trusteeWrapperAdapter:a}){const o=new y(e);this.election=new b({uniqueId:r,bulletinBoardClient:o,typesFilter:["create_election","start_key_ceremony","key_ceremony","end_key_ceremony","start_tally","tally","end_tally"]}),this.trustee=new X({uniqueId:n,bulletinBoardClient:o,authorityPublicKeyJSON:t,identificationKeys:i,election:this.election,wrapperAdapter:a})}async bindEvents({onSetup:e,onEvent:t,onBindRestoreButton:r,onBindStartButton:n,onRestore:i,onComplete:a,onStart:o,onTrusteeNeedsToBeRestored:s}){this.trustee.events.subscribe(t),n((async e=>{e.preventDefault(),o(),await this.trustee.needsToBeRestored()?s():(await this.trustee.runTally(),a())})),r((e=>{const t=e.target.files[0],r=new FileReader;r.onload=async({target:e})=>{const t=e.result;await this.trustee.restore(t)&&(i(),await this.trustee.runTally(),a())},r.readAsText(t)})),await this.trustee.setup(),e()}}class ne{constructor({bulletinBoardClientParams:e,authorityPublicKeyJSON:t,electionUniqueId:r,voterUniqueId:n,voterWrapperAdapter:i}){this.bulletinBoardClient=new y(e);const a=new b({uniqueId:r,bulletinBoardClient:this.bulletinBoardClient});this.voter=new $({bulletinBoardClient:this.bulletinBoardClient,authorityPublicKeyJSON:t,election:a,uniqueId:n,wrapperAdapter:i})}async bindEvents({onSetup:e,onBindEncryptButton:t,onStart:r,onVoteEncryption:n,castOrAuditBallot:i,onBindAuditBallotButton:a,onBindCastBallotButton:o,onAuditBallot:s,onCastBallot:u,onAuditComplete:c,onCastComplete:l,onInvalid:f}){t((()=>{r(),n((e=>{this.voter.encrypt(e).then((e=>{i(e),a((()=>{s(e,`${this.voter.uniqueId}-election-${this.voter.election.uniqueId}.txt`),c()})),o((()=>{u(e),l()}))}))}),(()=>{f()}))})),await this.voter.setup(),e()}}},2634:function(e,t,r){"use strict";r.d(t,{h4:function(){return Be},ab:function(){return ce}});var n=function(){return Object.create(null)},i=Array.prototype,a=i.forEach,o=i.slice,s=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=n),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return a.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(o.call(e)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}();var u=null,c={},l=1,f="@wry/context:Slot",h=Array,p=h[f]||function(){var e=function(){function e(){this.id=["slot",l++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=u;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===c)break;return e!==u&&(u.slots[this.id]=t),!0}return u&&(u.slots[this.id]=c),!1},e.prototype.getValue=function(){if(this.hasValue())return u.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,a=((i={__proto__:null})[this.id]=e,i),o=u;u={parent:o,slots:a};try{return t.apply(n,r)}finally{u=o}},e.bind=function(e){var t=u;return function(){var r=u;try{return u=t,e.apply(this,arguments)}finally{u=r}}},e.noContext=function(e,t,r){if(!u)return e.apply(r,t);var n=u;try{return u=null,e.apply(r,t)}finally{u=n}},e}();try{Object.defineProperty(h,f,{value:h[f]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();p.bind,p.noContext;function d(){}var y=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=d),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getEntry(e);return t&&t.value},e.prototype.getEntry=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getEntry(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),v=new p;function g(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var m=[];function b(e,t){if(!e)throw new Error(t||"assertion failure")}function E(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var S=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!w(this))return this.value[0]},e.prototype.recompute=function(e){return b(!this.recomputing,"already recomputing"),function(e){var t=v.getValue();if(t)e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),w(e)?I(t,e):k(t,e)}(this),w(this)?function(e,t){B(e),v.withValue(e,C,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{g(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){if(e.dirty=!1,w(e))return;A(e)}(e);return E(e.value)}(this,e):E(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,T(this),B(this),g(this))},e.prototype.dispose=function(){var e=this;B(this),g(this),this.parents.forEach((function(t){t.setDirty(),N(t,e)}))},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=m.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(this.deps.forEach((function(t){return t.delete(e)})),this.deps.clear(),m.push(this.deps),this.deps=null)},e.count=0,e}();function C(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function w(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function T(e){e.parents.forEach((function(t){return I(t,e)}))}function A(e){e.parents.forEach((function(t){return k(t,e)}))}function I(e,t){if(b(e.childValues.has(t)),b(w(t)),e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=m.pop()||new Set;e.dirtyChildren.add(t),T(e)}function k(e,t){b(e.childValues.has(t)),b(!w(t));var r,n,i,a=e.childValues.get(t);0===a.length?e.childValues.set(t,t.value.slice(0)):(r=a,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),_(e,t),w(e)||A(e)}function _(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(m.length<100&&m.push(r),e.dirtyChildren=null))}function B(e){e.childValues.size>0&&e.childValues.forEach((function(t,r){N(e,r)})),e.forgetDeps(),b(null===e.dirtyChildren)}function N(e,t){t.parents.delete(e),e.childValues.delete(t),_(e,t)}function O(e){var t=new Map,r=e&&e.subscribe;function n(e){var n=v.getValue();if(n){var i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(g(i),i.unsubscribe=r(e))}}return n.dirty=function(e){var r=t.get(e);r&&(r.forEach((function(e){return e.setDirty()})),t.delete(e),g(r))},n}var R=new s("function"==typeof WeakMap);function x(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return R.lookupArray(e)}var P=new Set;function F(e,t){void 0===t&&(t=Object.create(null));var r=new y(t.max||Math.pow(2,16),(function(e){return e.dispose()})),n=t.keyArgs||function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e},i=t.makeCacheKey||x;function a(){var a=i.apply(null,n.apply(null,arguments));if(void 0===a)return e.apply(null,arguments);var o=r.get(a);o||(r.set(a,o=new S(e)),o.subscribe=t.subscribe);var s=o.recompute(Array.prototype.slice.call(arguments));return r.set(a,o),P.add(r),v.hasValue()||(P.forEach((function(e){return e.clean()})),P.clear()),s}function o(){var e=i.apply(null,arguments);if(void 0!==e)return r.get(e)}return a.dirty=function(){var e=o.apply(null,arguments);e&&e.setDirty()},a.peek=function(){var e=o.apply(null,arguments);if(e)return e.peek()},a.forget=function(){var e=i.apply(null,arguments);return void 0!==e&&r.delete(e)},a}var D,L=r(496),U=function(){function e(){this.getFragmentDoc=F(L.Yk)}return e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read({rootId:e.id||"ROOT_QUERY",query:e.query,variables:e.variables,returnPartialData:e.returnPartialData,optimistic:t})},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read({query:this.getFragmentDoc(e.fragment,e.fragmentName),variables:e.variables,rootId:e.id,returnPartialData:e.returnPartialData,optimistic:t})},e.prototype.writeQuery=function(e){return this.write({dataId:e.id||"ROOT_QUERY",result:e.data,query:e.query,variables:e.variables,broadcast:e.broadcast})},e.prototype.writeFragment=function(e){return this.write({dataId:e.id,result:e.data,variables:e.variables,query:this.getFragmentDoc(e.fragment,e.fragmentName),broadcast:e.broadcast})},e}();D||(D={});var j=function(e,t,r,n,i){this.message=e,this.path=t,this.query=r,this.clientOnly=n,this.variables=i},V=r(655),K=r(2924),M=r(2152),q=Object.prototype.hasOwnProperty;var z=/^[_a-z][_0-9a-z]*/i;function H(e){var t=e.match(z);return t?t[0]:e}function G(e,t,r){return!(!t||"object"!=typeof t)&&(Array.isArray(t)?t.every((function(t){return G(e,t,r)})):e.selections.every((function(e){if((0,L.My)(e)&&(0,L.LZ)(e,r)){var n=(0,L.u2)(e);return q.call(t,n)&&(!e.selectionSet||G(e.selectionSet,t[n],r))}return!0})))}function Q(e){return null!==e&&"object"==typeof e&&!(0,L.hh)(e)&&!Array.isArray(e)}var W=Object.create(null),Y=function(){return W},Z=Object.create(null),J=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return(0,L.Jv)((0,L.hh)(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return(0,L.hh)(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return(0,L.kQ)(e);if((0,L.hh)(e))return e;var n=r.policies.identify(e)[0];if(n){var i=(0,L.kQ)(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,V.pi)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),q.call(this.data,e)){var r=this.data[e];if(r&&q.call(r,t))return r[t]}return"__typename"===t&&q.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof ee?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),q.call(this.data,e)?this.data[e]:this instanceof ee?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r=this,n=this.lookup(e),i=new L.w0(te).merge(n,t);if(this.data[e]=i,i!==n&&(delete this.refs[e],this.group.caching)){var a=Object.create(null);n||(a.__exists=1),Object.keys(t).forEach((function(e){if(!n||n[e]!==i[e]){a[e]=1;var t=H(e);t===e||r.policies.hasKeyArgs(i.__typename,t)||(a[t]=1),void 0!==i[e]||r instanceof ee||delete i[e]}})),Object.keys(a).forEach((function(t){return r.group.dirty(e,t)}))}},e.prototype.modify=function(e,t){var r=this,n=this.lookup(e);if(n){var i=Object.create(null),a=!1,o=!0,s={DELETE:W,INVALIDATE:Z,isReference:L.hh,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||(0,L.kQ)(e)}:t,{store:r})}};if(Object.keys(n).forEach((function(u){var c=H(u),l=n[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var h=f===Y?W:f((0,L.Jv)(l),(0,V.pi)((0,V.pi)({},s),{fieldName:c,storeFieldName:u,storage:r.getStorage(e,u)}));h===Z?r.group.dirty(e,u):(h===W&&(h=void 0),h!==l&&(i[u]=h,a=!0,l=h))}void 0!==l&&(o=!1)}})),a)return this.merge(e,i),o&&(this instanceof ee?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,r){var n,i=this.lookup(e);if(i){var a=this.getFieldValue(i,"__typename"),o=t&&r?this.policies.getStoreFieldName({typename:a,fieldName:t,args:r}):t;return this.modify(e,o?((n={})[o]=Y,n):Y)}return!1},e.prototype.evict=function(e){var t=!1;return e.id&&(q.call(this.data,e.id)&&(t=this.delete(e.id,e.fieldName,e.args)),this instanceof ee&&(t=this.parent.evict(e)||t),(e.fieldName||t)&&this.group.dirty(e.id,e.fieldName||"__exists")),t},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),r=[];return this.getRootIdSet().forEach((function(t){q.call(e.policies.rootTypenamesById,t)||r.push(t)})),r.length&&(t.__META={extraRootIds:r.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(r){e&&q.call(e,r)||t.delete(r)})),e){var r=e.__META,n=(0,V._T)(e,["__META"]);Object.keys(n).forEach((function(e){t.merge(e,n[e])})),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof ee?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach((function(n){q.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])}));var n=Object.keys(r);if(n.length){for(var i=this;i instanceof ee;)i=i.parent;n.forEach((function(e){return i.delete(e)}))}return n},e.prototype.findChildRefIds=function(e){if(!q.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=new Set([this.data[e]]),n=function(e){return null!==e&&"object"==typeof e};r.forEach((function(e){(0,L.hh)(e)?t[e.__ref]=!0:n(e)&&Object.values(e).filter(n).forEach(r.add,r)}))}return this.refs[e]},e.prototype.makeCacheKey=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.group.keyMaker.lookupArray(e)},e}(),X=function(){function e(e){this.caching=e,this.d=null,this.keyMaker=new s(L.mr),this.d=e?O():null}return e.prototype.depend=function(e,t){if(this.d){this.d($(e,t));var r=H(t);r!==t&&this.d($(e,r))}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty($(e,t))},e}();function $(e,t){return t+"#"+e}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,a=t.seed,o=e.call(this,r,new X(i))||this;return o.storageTrie=new s(L.mr),o.sharedLayerGroup=new X(i),a&&o.replace(a),o}return(0,V.ZT)(t,e),t.prototype.addLayer=function(e,t){return new ee(e,this,t,this.sharedLayerGroup)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(J||(J={}));var ee=function(e){function t(t,r,n,i){var a=e.call(this,r.policies,i)||this;return a.id=t,a.parent=r,a.replay=n,a.group=i,n(a),a}return(0,V.ZT)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){t.data[e]!==r.lookup(e)&&t.delete(e)})),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,V.pi)((0,V.pi)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return q.call(this.data,t)?(0,V.pi)((0,V.pi)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(J);function te(e,t,r){var n=e[r],i=t[r];return(0,M.D)(n,i)?n:i}function re(e){return!!(e instanceof J&&e.group.caching)}function ne(e,t){return new j(e.message,t.path.slice(),t.query,t.clientOnly,t.variables)}var ie=function(){function e(e){var t=this;this.config=e,this.executeSelectionSet=F((function(e){return t.execSelectionSetImpl(e)}),{keyArgs:function(e){return[e.selectionSet,e.objectOrReference,e.context]},makeCacheKey:function(e,t,r){if(re(r.store))return r.store.makeCacheKey(e,(0,L.hh)(t)?t.__ref:t,r.varString)}}),this.knownResults=new WeakMap,this.executeSubSelectedArray=F((function(e){return t.execSubSelectedArrayImpl(e)}),{makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(re(n.store))return n.store.makeCacheKey(t,r,n.varString)}}),this.config=(0,V.pi)({addTypename:!0},e)}return e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,n=e.rootId,i=void 0===n?"ROOT_QUERY":n,a=e.variables,o=e.returnPartialData,s=void 0===o||o,u=this.config.cache.policies;a=(0,V.pi)((0,V.pi)({},(0,L.O4)((0,L.iW)(r))),a);var c=this.executeSelectionSet({selectionSet:(0,L.p$)(r).selectionSet,objectOrReference:(0,L.kQ)(i),context:{store:t,query:r,policies:u,variables:a,varString:JSON.stringify(a),fragmentMap:(0,L.F)((0,L.kU)(r)),path:[],clientOnly:!1}}),l=c.missing&&c.missing.length>0;if(l&&!s)throw c.missing[0];return{result:c.result,missing:c.missing,complete:!l}},e.prototype.isFresh=function(e,t,r,n){if(re(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n);if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,r=e.selectionSet,n=e.objectOrReference,i=e.context;if((0,L.hh)(n)&&!i.policies.rootTypenamesById[n.__ref]&&!i.store.has(n.__ref))return{result:{},missing:[ne(new K.ej(4),i)]};var a=i.variables,o=i.policies,s=i.store,u=[],c={result:null},l=s.getFieldValue(n,"__typename");function f(){return c.missing||(c.missing=[])}function h(e){var t;return e.missing&&(t=f()).push.apply(t,e.missing),e.result}this.config.addTypename&&"string"==typeof l&&!o.rootIdsByTypename[l]&&u.push({__typename:l});var p=new Set(r.selections);return p.forEach((function(e){var r;if((0,L.LZ)(e,a))if((0,L.My)(e)){var s=o.readField({fieldName:e.name.value,field:e,variables:i.variables,from:n},i),c=(0,L.u2)(e);i.path.push(c);var d=i.clientOnly;i.clientOnly=d||!(!e.directives||!e.directives.some((function(e){return"client"===e.name.value}))),void 0===s?L.Gw.added(e)||f().push(ne(new K.ej(5),i)):Array.isArray(s)?s=h(t.executeSubSelectedArray({field:e,array:s,context:i})):e.selectionSet&&null!=s&&(s=h(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:s,context:i}))),void 0!==s&&u.push(((r={})[c]=s,r)),i.clientOnly=d,(0,K.kG)(i.path.pop()===c)}else{var y=(0,L.hi)(e,i.fragmentMap);y&&o.fragmentMatches(y,l)&&y.selectionSet.selections.forEach(p.add,p)}})),c.result=(0,L.bw)(u),this.knownResults.set(c.result,r),c},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,a=e.context;function o(e,r){return e.missing&&(t=t||[]).push.apply(t,e.missing),(0,K.kG)(a.path.pop()===r),e.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),{result:i=i.map((function(e,t){return null===e?null:(a.path.push(t),Array.isArray(e)?o(r.executeSubSelectedArray({field:n,array:e,context:a}),t):n.selectionSet?o(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,context:a}),t):((0,K.kG)(a.path.pop()===t),e))})),missing:t}},e}();var ae=function(){function e(e,t){this.cache=e,this.reader=t}return e.prototype.writeToStore=function(e){var t=e.query,r=e.result,n=e.dataId,i=e.store,a=e.variables,o=(0,L.$H)(t),s=new L.w0;a=(0,V.pi)((0,V.pi)({},(0,L.O4)(o)),a);var u=this.processSelectionSet({result:r||Object.create(null),dataId:n,selectionSet:o.selectionSet,mergeTree:{map:new Map},context:{store:i,written:Object.create(null),merge:function(e,t){return s.merge(e,t)},variables:a,varString:JSON.stringify(a),fragmentMap:(0,L.F)((0,L.kU)(t))}});if(!(0,L.hh)(u))throw new K.ej(7);return i.retain(u.__ref),u},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,n=e.result,i=e.selectionSet,a=e.context,o=e.mergeTree,s=this.cache.policies,u=s.identify(n,i,a.fragmentMap),c=u[0],l=u[1];if("string"==typeof(r=r||c)){var f=a.written[r]||(a.written[r]=[]),h=(0,L.kQ)(r);if(f.indexOf(i)>=0)return h;if(f.push(i),this.reader&&this.reader.isFresh(n,h,i,a))return h}var p=Object.create(null);l&&(p=a.merge(p,l));var d=r&&s.rootTypenamesById[r]||(0,L.qw)(n,i,a.fragmentMap)||r&&a.store.get(r,"__typename");"string"==typeof d&&(p.__typename=d);var y=new Set(i.selections);if(y.forEach((function(e){var r;if((0,L.LZ)(e,a.variables))if((0,L.My)(e)){var i=(0,L.u2)(e),u=n[i];if(void 0!==u){var c=s.getStoreFieldName({typename:d,fieldName:e.name.value,field:e,variables:a.variables}),l=se(o,c),f=t.processFieldValue(u,e,a,l),h=e.selectionSet&&a.store.getFieldValue(f,"__typename")||void 0,v=s.getMergeFunction(d,e.name.value,h);v?l.info={field:e,typename:d,merge:v}:ue(o,c),p=a.merge(p,((r={})[c]=f,r))}else if(s.usingPossibleTypes&&!(0,L.FS)(["defer","client"],e))throw new K.ej(8)}else{var g=(0,L.hi)(e,a.fragmentMap);g&&s.fragmentMatches(g,d,n,a.variables)&&g.selectionSet.selections.forEach(y.add,y)}})),"string"==typeof r){var v=(0,L.kQ)(r);return o.map.size&&(p=this.applyMerges(o,v,p,a)),a.store.merge(r,p),v}return p},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?Array.isArray(e)?e.map((function(e,a){var o=i.processFieldValue(e,t,r,se(n,a));return ue(n,a),o})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):e},e.prototype.applyMerges=function(e,t,r,n,i){var a,o=this;if(e.map.size&&!(0,L.hh)(r)){var s,u=Array.isArray(r)||!(0,L.hh)(t)&&!Q(t)?void 0:t,c=r;u&&!i&&(i=[(0,L.hh)(u)?u.__ref:u]);var l=function(e,t){return Array.isArray(e)?"number"==typeof t?e[t]:void 0:n.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){i&&i.push(t);var r=l(u,t),a=l(c,t),f=o.applyMerges(e,r,a,n,i);f!==a&&(s=s||new Map).set(t,f),i&&(0,K.kG)(i.pop()===t)})),s&&(r=Array.isArray(c)?c.slice(0):(0,V.pi)({},c),s.forEach((function(e,t){r[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,n,i&&(a=n.store).getStorage.apply(a,i)):r},e}(),oe=[];function se(e,t){var r=e.map;return r.has(t)||r.set(t,oe.pop()||{map:new Map}),r.get(t)}function ue(e,t){var r=e.map,n=r.get(t);!n||n.info||n.map.size||(oe.push(n),r.delete(t))}new Set;var ce=new p;function le(e,t){if(e.size){var r=[];e.forEach((function(e){return r.push(e)})),e.clear(),r.forEach(t)}}var fe=new WeakMap;function he(e){var t=fe.get(e);return t||fe.set(e,t={vars:new Set,dep:O()}),t}function pe(e){var t=new Set,r=new Set,n=function(a){if(arguments.length>0)e!==a&&(e=a,t.forEach((function(e){he(e).dep.dirty(n),de(e)})),le(r,(function(t){return t(e)})));else{var o=ce.getValue();o&&(i(o),he(o).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){return t.add(e),he(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}function de(e){e.broadcastWatches&&e.broadcastWatches()}function ye(e){return void 0!==e.args?e.args:e.field?(0,L.NC)(e.field,e.variables):null}var ve=function(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=void 0!==n?{id:n}:void 0!==i?{_id:i}:void 0),void 0===n&&(n=i),void 0!==n))return r+":"+("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))},ge=function(){},me=function(e,t){return t.fieldName},be=function(e,t,r){return(0,r.mergeObjects)(e,t)},Ee=function(e,t){return t},Se=function(){function e(e){this.config=e,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,V.pi)({dataIdFromObject:ve},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t,r){var n=t&&r?(0,L.qw)(e,t,r):e.__typename;if(n===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var i,a={typename:n,selectionSet:t,fragmentMap:r},o=n&&this.getTypePolicy(n),s=o&&o.keyFn||this.config.dataIdFromObject;s;){var u=s(e,a);if(!Array.isArray(u)){i=u;break}s=Ae(u)}return i=i&&String(i),a.keyObject?[i,a.keyObject]:[i]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(r){var n=e[r],i=n.queryType,a=n.mutationType,o=n.subscriptionType,s=(0,V._T)(n,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",r),a&&t.setRootTypename("Mutation",r),o&&t.setRootTypename("Subscription",r),q.call(t.toBeAdded,r)?t.toBeAdded[r].push(s):t.toBeAdded[r]=[s]}))},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,a=t.fields;function o(e,t){e.merge="function"==typeof t?t:!0===t?be:!1===t?Ee:e.merge}o(n,t.merge),n.keyFn=!1===i?ge:Array.isArray(i)?Ae(i):"function"==typeof i?i:n.keyFn,a&&Object.keys(a).forEach((function(t){var n=r.getFieldPolicy(e,t,!0),i=a[t];if("function"==typeof i)n.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;n.keyFn=!1===s?me:Array.isArray(s)?Te(s):"function"==typeof s?s:n.keyFn,"function"==typeof u&&(n.read=u),o(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||me)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&((0,K.kG)(!n||n===e,1),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(r){t.getSupertypeSet(r,!0),e[r].forEach((function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match(z);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!q.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var n=this.supertypeMap.get(e);n&&n.size&&n.forEach((function(e){var n=t.getTypePolicy(e),i=n.fields,a=(0,V._T)(n,["fields"]);Object.assign(r,a),Object.assign(r.fields,i)}))}var i=this.toBeAdded[e];return i&&i.length&&this.updateTypePolicy(e,L.oA.apply(void 0,i.splice(0))),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var a=e.typeCondition.name.value;if(t===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var o=this.getSupertypeSet(t,!0),s=[o],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},c=!(!r||!this.fuzzySubtypes.size),l=0;l<s.length;++l){var f=s[l];if(f.has(a))return o.has(a)||o.add(a),!0;f.forEach(u),c&&l===s.length-1&&G(e.selectionSet,r,n)&&(c=!1,!0,this.fuzzySubtypes.forEach((function(e,r){var n=t.match(e);n&&n[0]===t&&u(r)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var r=this.getFieldPolicy(e,t,!1);return!(!r||!r.keyFn)},e.prototype.getStoreFieldName=function(e){var t,r=e.typename,n=e.fieldName,i=this.getFieldPolicy(r,n,!1),a=i&&i.keyFn;if(a&&r)for(var o={typename:r,fieldName:n,field:e.field||null,variables:e.variables},s=ye(e);a;){var u=a(s,o);if(!Array.isArray(u)){t=u||n;break}a=Te(u)}return void 0===t&&(t=e.field?(0,L.vf)(e.field,e.variables):(0,L.PT)(n,ye(e))),n===H(t)?t:n+":"+t},e.prototype.readField=function(e,t){var r=e.from;if(r&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}var i=this.getStoreFieldName(e),a=H(i),o=t.store.getFieldValue(r,i),s=this.getFieldPolicy(e.typename,a,!1),u=s&&s.read;if(u){var c=Ce(this,r,e,t,t.store.getStorage((0,L.hh)(r)?r.__ref:r,i));return ce.withValue(this.cache,u,[o,c])}return o}},e.prototype.getMergeFunction=function(e,t,r){var n=this.getFieldPolicy(e,t,!1),i=n&&n.merge;return!i&&r&&(i=(n=this.getTypePolicy(r))&&n.merge),i},e.prototype.runMergeFunction=function(e,t,r,n,i){var a=r.field,o=r.typename,s=r.merge;return s===be?we(n.store.getFieldValue)(e,t):s===Ee?t:s(e,t,Ce(this,void 0,{typename:o,fieldName:a.name.value,field:a,variables:n.variables},n,i||Object.create(null)))},e}();function Ce(e,t,r,n,i){var a=e.getStoreFieldName(r),o=H(a),s=r.variables||n.variables,u=n.store,c=u.getFieldValue,l=u.toReference,f=u.canRead;return{args:ye(r),field:r.field||null,fieldName:o,storeFieldName:a,variables:s,isReference:L.hh,toReference:l,storage:i,cache:e.cache,canRead:f,readField:function(r,i){var a="string"==typeof r?{fieldName:r,from:i}:(0,V.pi)({},r);return void 0===a.from&&(a.from=t),void 0===a.variables&&(a.variables=s),e.readField(a,n)},mergeObjects:we(c)}}function we(e){return function(t,r){if(Array.isArray(t)||Array.isArray(r))throw new K.ej(2);if(t&&"object"==typeof t&&r&&"object"==typeof r){var n=e(t,"__typename"),i=e(r,"__typename");return!(n&&i&&n!==i)&&Q(t)&&Q(r)?(0,V.pi)((0,V.pi)({},t),r):r}return r}}function Te(e){return function(t,r){return t?r.fieldName+":"+JSON.stringify(ke(t,e,!1)):r.fieldName}}function Ae(e){var t=new s(L.mr);return function(r,n){var i;if(n.selectionSet&&n.fragmentMap){var a=t.lookupArray([n.selectionSet,n.fragmentMap]);i=a.aliasMap||(a.aliasMap=Ie(n.selectionSet,n.fragmentMap))}var o=n.keyObject=ke(r,e,!0,i);return n.typename+":"+JSON.stringify(o)}}function Ie(e,t){var r=Object.create(null),n=new Set([e]);return n.forEach((function(e){e.selections.forEach((function(e){if((0,L.My)(e)){if(e.alias){var i=e.alias.value,a=e.name.value;if(a!==i)(r.aliases||(r.aliases=Object.create(null)))[a]=i}if(e.selectionSet)(r.subsets||(r.subsets=Object.create(null)))[e.name.value]=Ie(e.selectionSet,t)}else{var o=(0,L.hi)(e,t);o&&n.add(o.selectionSet)}}))})),r}function ke(e,t,r,n){var i,a=Object.create(null);return t.forEach((function(t){if(Array.isArray(t)){if("string"==typeof i){var o=n&&n.subsets,s=o&&o[i];a[i]=ke(e[i],t,r,s)}}else{var u=n&&n.aliases,c=u&&u[t]||t;q.call(e,c)?a[i=t]=e[c]:((0,K.kG)(!r,3),i=void 0)}})),a}var _e={dataIdFromObject:ve,addTypename:!0,resultCaching:!0,typePolicies:{}},Be=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.typenameDocumentCache=new Map,r.makeVar=pe,r.txCount=0,r.maybeBroadcastWatch=F((function(e,t){return r.broadcastWatch.call(r,e,!!t)}),{makeCacheKey:function(e){var t=e.optimistic?r.optimisticData:r.data;if(re(t)){var n=e.optimistic,i=e.rootId,a=e.variables;return t.makeCacheKey(e.query,e.callback,JSON.stringify({optimistic:n,rootId:i,variables:a}))}}}),r.watchDep=O(),r.config=(0,V.pi)((0,V.pi)({},_e),t),r.addTypename=!!r.config.addTypename,r.policies=new Se({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.data=new J.Root({policies:r.policies,resultCaching:r.config.resultCaching}),r.optimisticData=r.data,r.storeWriter=new ae(r,r.storeReader=new ie({cache:r,addTypename:r.addTypename})),r}return(0,V.ZT)(t,e),t.prototype.restore=function(e){return e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,query:e.query,variables:e.variables,rootId:e.rootId,config:this.config,returnPartialData:r}).result||null}catch(e){if(e instanceof j)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore({store:this.data,query:e.query,result:e.result,dataId:e.dataId,variables:e.variables})}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(q.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",query:e.query,variables:e.variables,returnPartialData:e.returnPartialData,config:this.config})},t.prototype.watch=function(e){var t,r=this;return this.watches.size||he(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){r.watches.delete(e)&&!r.watches.size&&function(e){he(e).vars.forEach((function(t){return t.forgetCache(e)}))}(r),r.watchDep.dirty(e),r.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(){return this.optimisticData.gc()},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){return(0,L.hh)(e)?e.__ref:this.policies.identify(e)[0]},t.prototype.evict=function(e){if(!e.id){if(q.call(e,"id"))return!1;e=(0,V.pi)((0,V.pi)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(){return this.data.clear(),this.optimisticData=this.data,this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.performTransaction=function(e,t){var r=this,n=function(t){var n=r,i=n.data,a=n.optimisticData;++r.txCount,t&&(r.data=r.optimisticData=t);try{e(r)}finally{--r.txCount,r.data=i,r.optimisticData=a}},i=!1;"string"==typeof t?(this.optimisticData=this.optimisticData.addLayer(t,n),i=!0):null===t?n(this.data):n(),this.broadcastWatches(i)},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=(0,L.Gw)(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(r){return t.maybeBroadcastWatch(r,e)}))},t.prototype.broadcastWatch=function(e,t){this.watchDep.dirty(e),this.watchDep(e);var r=this.diff({query:e.query,variables:e.variables,optimistic:e.optimistic});e.optimistic&&t&&(r.fromOptimisticTransaction=!0),e.callback(r)},t}(U)},5367:function(){},5765:function(e,t,r){"use strict";r.d(t,{f:function(){return w}});var n=r(655),i=r(2924),a=r(1707),o=r(496),s=r(9950),u=r(2152),c=r(1498),l=r(6282),f=r(5942),h=r(7636),p=r(2634),d=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=(0,o.Ee)(t.resolvers,e)})):this.resolvers=(0,o.Ee)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,i=e.context,a=e.variables,o=e.onlyRunForcedResolvers,s=void 0!==o&&o;return(0,n.mG)(this,void 0,void 0,(function(){return(0,n.Jh)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,i,a,this.fragmentMatcher,s).then((function(e){return(0,n.pi)((0,n.pi)({},r),{data:e.result})}))]:[2,r]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return(0,o.FS)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return(0,o.ob)(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.pi)((0,n.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,n.mG)(this,void 0,void 0,(function(){return(0,n.Jh)(this,(function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return(0,n.pi)((0,n.pi)({},t),e.exportedVariables)}))]:[2,(0,n.pi)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,h.Vn)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return h.$_}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,o.aL)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,i,a,s){return void 0===r&&(r={}),void 0===i&&(i={}),void 0===a&&(a=function(){return!0}),void 0===s&&(s=!1),(0,n.mG)(this,void 0,void 0,(function(){var u,c,l,f,h,p,d,y,v;return(0,n.Jh)(this,(function(g){return u=(0,o.p$)(e),c=(0,o.kU)(e),l=(0,o.F)(c),f=u.operation,h=f?f.charAt(0).toUpperCase()+f.slice(1):"Query",d=(p=this).cache,y=p.client,v={fragmentMap:l,context:(0,n.pi)((0,n.pi)({},r),{cache:d,client:y}),variables:i,fragmentMatcher:a,defaultOperationType:h,exportedVariables:{},onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(u.selectionSet,t,v).then((function(e){return{result:e,exportedVariables:v.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r){return(0,n.mG)(this,void 0,void 0,(function(){var a,s,u,c,l,f=this;return(0,n.Jh)(this,(function(h){return a=r.fragmentMap,s=r.context,u=r.variables,c=[t],l=function(e){return(0,n.mG)(f,void 0,void 0,(function(){var l,f;return(0,n.Jh)(this,(function(n){return(0,o.LZ)(e,u)?(0,o.My)(e)?[2,this.resolveField(e,t,r).then((function(t){var r;void 0!==t&&c.push(((r={})[(0,o.u2)(e)]=t,r))}))]:((0,o.Ao)(e)?l=e:(l=a[e.name.value],(0,i.kG)(l,11)),l&&l.typeCondition&&(f=l.typeCondition.name.value,r.fragmentMatcher(t,f,s))?[2,this.resolveSelectionSet(l.selectionSet,t,r).then((function(e){c.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(l)).then((function(){return(0,o.bw)(c)}))]}))}))},e.prototype.resolveField=function(e,t,r){return(0,n.mG)(this,void 0,void 0,(function(){var i,a,s,u,c,l,f,h,d,y=this;return(0,n.Jh)(this,(function(n){return i=r.variables,a=e.name.value,s=(0,o.u2)(e),u=a!==s,c=t[s]||t[a],l=Promise.resolve(c),r.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(f=t.__typename||r.defaultOperationType,(h=this.resolvers&&this.resolvers[f])&&(d=h[u?a:s])&&(l=Promise.resolve(p.ab.withValue(this.cache,d,[t,(0,o.NC)(e,i),r.context,{field:e,fragmentMap:r.fragmentMap}])))),[2,l.then((function(t){return void 0===t&&(t=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(r.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?y.resolveSubSelectedArray(e,t,r):e.selectionSet?y.resolveSelectionSet(e.selectionSet,t,r):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,r){var n=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?n.resolveSubSelectedArray(e,t,r):e.selectionSet?n.resolveSelectionSet(e.selectionSet,t,r):void 0})))},e}(),y=new(o.mr?WeakMap:Map);function v(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return y.set(e,(y.get(e)+1)%1e15),r.apply(this,arguments)})}function g(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var m=function(){function e(e){this.cache=e,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,y.has(e)||(y.set(e,0),v(e,"evict"),v(e,"modify"),v(e,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||f.I.loading;return this.variables&&this.networkStatus!==f.I.loading&&!(0,u.D)(this.variables,e.variables)&&(t=f.I.setVariables),(0,u.D)(e.variables,this.variables)||(this.diff=null),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.getDiff=function(e){return void 0===e&&(e=this.variables),this.diff&&(0,u.D)(e,this.variables)?this.diff:(this.updateWatch(this.variables=e),this.diff=this.cache.diff({query:this.document,variables:e,returnPartialData:!0,optimistic:!0}))},e.prototype.setDiff=function(e){var t=this,r=this.diff;this.diff=e,this.dirty||(e&&e.result)===(r&&r.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e.reobserve()})):delete this.oqListener)},e.prototype.notify=function(){var e=this;g(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,f.O)(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.cancel(),delete this.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var e=this.observableQuery;e&&e.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;r&&"no-cache"===r.options.fetchPolicy||this.lastWatch&&this.lastWatch.query===this.document&&(0,u.D)(e,this.lastWatch.variables)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch={query:this.document,variables:e,optimistic:!0,callback:function(e){return t.setDiff(e)}}))},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===y.get(this.cache)&&(0,u.D)(t,r.variables)&&(0,u.D)(e.data,r.result.data))},e.prototype.markResult=function(e,t,r){var n=this;this.graphQLErrors=(0,o.Of)(e.errors)?e.errors:[],g(this),"no-cache"===t.fetchPolicy?this.diff={result:e.data,complete:!0}:!this.stopped&&r&&(b(e,t.errorPolicy)?this.cache.performTransaction((function(r){if(n.shouldWrite(e,t.variables))r.writeQuery({query:n.document,data:e.data,variables:t.variables}),n.lastWrite={result:e,variables:t.variables,dmCount:y.get(n.cache)};else if(n.diff&&n.diff.complete)return void(e.data=n.diff.result);var i=r.diff({query:n.document,variables:t.variables,returnPartialData:!0,optimistic:!0});n.stopped||n.updateWatch(t.variables),n.diff=i,i.complete&&(e.data=i.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=f.I.ready},e.prototype.markError=function(e){return this.networkStatus=f.I.error,this.lastWrite=void 0,g(this),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function b(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!(0,o.d2)(e);return!n&&r&&e.data&&(n=!0),n}var E=Object.prototype.hasOwnProperty,S=function(){function e(e){var t=e.cache,r=e.link,n=e.queryDeduplication,i=void 0!==n&&n,a=e.onBroadcast,s=e.ssrMode,u=void 0!==s&&s,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,h=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(o.mr?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.queryDeduplication=i,this.clientAwareness=l,this.localState=f||new d({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!h,(this.onBroadcast=a)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches(new i.ej(12))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t=e.mutation,r=e.variables,a=e.optimisticResponse,s=e.updateQueries,u=e.refetchQueries,l=void 0===u?[]:u,f=e.awaitRefetchQueries,h=void 0!==f&&f,p=e.update,d=e.errorPolicy,y=void 0===d?"none":d,v=e.fetchPolicy,g=e.context,m=void 0===g?{}:g;return(0,n.mG)(this,void 0,void 0,(function(){var e,u,f;return(0,n.Jh)(this,(function(d){switch(d.label){case 0:return(0,i.kG)(t,13),(0,i.kG)(!v||"no-cache"===v,14),e=this.generateMutationId(),t=this.transform(t).document,r=this.getVariables(t,r),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,r,m)]:[3,2];case 1:r=d.sent(),d.label=2;case 2:return u=this.mutationStore&&(this.mutationStore[e]={mutation:t,variables:r,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:e,document:t,variables:r,errorPolicy:y,updateQueries:s,update:p}),this.broadcastQueries(),f=this,[2,new Promise((function(i,d){var g,b;f.getObservableFromLink(t,(0,n.pi)((0,n.pi)({},m),{optimisticResponse:a}),r,!1).subscribe({next:function(n){if((0,o.d2)(n)&&"none"===y)b=new c.c({graphQLErrors:n.errors});else{if(u&&(u.loading=!1,u.error=null),"no-cache"!==v)try{f.markMutationResult({mutationId:e,result:n,document:t,variables:r,errorPolicy:y,updateQueries:s,update:p})}catch(e){return void(b=new c.c({networkError:e}))}g=n}},error:function(t){u&&(u.loading=!1,u.error=t),a&&f.cache.removeOptimistic(e),f.broadcastQueries(),d(new c.c({networkError:t}))},complete:function(){if(b&&u&&(u.loading=!1,u.error=b),a&&f.cache.removeOptimistic(e),f.broadcastQueries(),b)d(b);else{"function"==typeof l&&(l=l(g));var t=[];(0,o.Of)(l)&&l.forEach((function(e){if("string"==typeof e)f.queries.forEach((function(r){var n=r.observableQuery;n&&n.queryName===e&&t.push(n.refetch())}));else{var r={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(r.context=e.context),t.push(f.query(r))}})),Promise.all(h?t:[]).then((function(){"ignore"===y&&g&&(0,o.d2)(g)&&delete g.errors,i(g)}),d)}}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var r=this;if(void 0===t&&(t=this.cache),b(e.result,e.errorPolicy)){var n=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],i=e.updateQueries;i&&this.queries.forEach((function(a,s){var u=a.observableQuery,c=u&&u.queryName;if(c&&E.call(i,c)){var l=i[c],f=r.queries.get(s),h=f.document,p=f.variables,d=t.diff({query:h,variables:p,returnPartialData:!0,optimistic:!1}),y=d.result;if(d.complete&&y){var v=l(y,{mutationResult:e.result,queryName:h&&(0,o.rY)(h)||void 0,queryVariables:p});v&&n.push({result:v,dataId:"ROOT_QUERY",query:h,variables:p})}}})),t.performTransaction((function(t){n.forEach((function(e){return t.write(e)}));var r=e.update;r&&r(t,e.result)}),null)}},e.prototype.markMutationOptimistic=function(e,t){var r=this,i="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{r.markMutationResult((0,n.pi)((0,n.pi)({},t),{result:{data:i}}),e)}catch(e){}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),n=(0,o.Fo)(this.cache.transformForLink(r)),i=this.localState.clientQuery(r),a=n&&this.localState.serverQuery(n),s={document:r,hasClientExports:(0,o.mj)(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:i,serverQuery:a,defaultVars:(0,o.O4)((0,o.$H)(r))},u=function(e){e&&!t.has(e)&&t.set(e,s)};u(e),u(r),u(i),u(a)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.pi)((0,n.pi)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,n.pi)((0,n.pi)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new m(this.cache),r=new l.u({queryManager:this,queryInfo:t,options:e});return this.queries.set(r.queryId,t),t.init({document:e.query,observableQuery:r,variables:e.variables}),r},e.prototype.query=function(e){var t=this;(0,i.kG)(e.query,15),(0,i.kG)("Document"===e.query.kind,16),(0,i.kG)(!e.returnPartialData,17),(0,i.kG)(!e.pollInterval,18);var r=this.generateQueryId();return this.fetchQuery(r,e).finally((function(){return t.stopQuery(r)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(){return this.cancelPendingFetches(new i.ej(19)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=f.I.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then((function(){return e.reFetchObservableQueries()}))},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.queries.forEach((function(n,i){var a=n.observableQuery;if(a&&a.hasObservers()){var o=a.options.fetchPolicy;a.resetLastResults(),"cache-only"===o||!e&&"standby"===o||r.push(a.refetch()),t.getQuery(i).setDiff(null)}})),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,a=e.variables,s=e.context,u=void 0===s?{}:s;r=this.transform(r).document,a=this.getVariables(r,a);var l=function(e){return t.getObservableFromLink(r,u,e,!1).map((function(a){if("no-cache"!==n&&(b(a,i)&&t.cache.write({query:r,result:a.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),(0,o.d2)(a))throw new c.c({graphQLErrors:a.errors});return a}))};if(this.transform(r).hasClientExports){var f=this.localState.addExportedVariables(r,a,u).then(l);return new o.y$((function(e){var t=null;return f.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return l(a)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,i){var s,u,c=this;void 0===i&&(i=null!==(s=null==t?void 0:t.queryDeduplication)&&void 0!==s?s:this.queryDeduplication);var l=this.transform(e).serverQuery;if(l){var f=this.inFlightLinkObservables,h=this.link,p={query:l,variables:r,operationName:(0,o.rY)(l)||void 0,context:this.prepareContext((0,n.pi)((0,n.pi)({},t),{forceFetch:!i}))};if(t=p.context,i){var d=f.get(l)||new Map;f.set(l,d);var y=JSON.stringify(r);if(!(u=d.get(y))){var v=new o.X_([(0,a.ht)(h,p)]);d.set(y,u=v),v.cleanup((function(){d.delete(y)&&d.size<1&&f.delete(l)}))}}else u=new o.X_([(0,a.ht)(h,p)])}else u=new o.X_([o.y$.of({data:{}})]),t=this.prepareContext(t);var g=this.transform(e).clientQuery;return g&&(u=(0,o.sz)(u,(function(e){return c.localState.runResolvers({document:g,remoteResult:e,context:t,variables:r})}))),u},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId;return(0,o.sz)(this.getObservableFromLink(e.document,r.context,r.variables),(function(i){var a=(0,o.Of)(i.errors);if(n>=e.lastRequestId){if(a&&"none"===r.errorPolicy)throw e.markError(new c.c({graphQLErrors:i.errors}));e.markResult(i,r,t),e.markReady()}var s={data:i.data,loading:!1,networkStatus:e.networkStatus||f.I.ready};return a&&"ignore"!==r.errorPolicy&&(s.errors=i.errors),s}),(function(t){var r=(0,c.M)(t)?t:new c.c({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r}))},e.prototype.fetchQueryObservable=function(e,t,r){var n=this;void 0===r&&(r=f.I.loading);var i=this.transform(t.query).document,a=this.getVariables(i,t.variables),s=this.getQuery(e),u=s.networkStatus,c=t.fetchPolicy,l=void 0===c?"cache-first":c,h=t.errorPolicy,p=void 0===h?"none":h,d=t.returnPartialData,y=void 0!==d&&d,v=t.notifyOnNetworkStatusChange,g=void 0!==v&&v,m=t.context,b=void 0===m?{}:m;("cache-first"===l||"cache-and-network"===l||"network-only"===l||"no-cache"===l)&&g&&"number"==typeof u&&u!==r&&(0,f.O)(r)&&("cache-first"!==l&&(l="cache-and-network"),y=!0);var E=Object.assign({},t,{query:i,variables:a,fetchPolicy:l,errorPolicy:p,returnPartialData:y,notifyOnNetworkStatusChange:g,context:b}),S=function(e){return E.variables=e,n.fetchQueryByPolicy(s,E,r)};this.fetchCancelFns.set(e,(function(e){Promise.resolve().then((function(){return C.cancel(e)}))}));var C=new o.X_(this.transform(E.query).hasClientExports?this.localState.addExportedVariables(E.query,E.variables,E.context).then(S):S(E.variables));return C.cleanup((function(){n.fetchCancelFns.delete(e);var r=t.nextFetchPolicy;r&&(t.nextFetchPolicy=void 0,t.fetchPolicy="function"==typeof r?r.call(t,t.fetchPolicy||"cache-first"):r)})),C},e.prototype.fetchQueryByPolicy=function(e,t,r){var i=this,a=t.query,s=t.variables,u=t.fetchPolicy,c=t.errorPolicy,l=t.returnPartialData,h=t.context;e.init({document:a,variables:s,lastRequestId:this.generateRequestId(),networkStatus:r});var p=function(){return e.getDiff(s)},d=function(t,r){void 0===r&&(r=e.networkStatus||f.I.loading);var u=t.result;var c=function(e){return o.y$.of((0,n.pi)({data:e,loading:(0,f.O)(r),networkStatus:r},t.complete?null:{partial:!0}))};return i.transform(a).hasForcedResolvers?i.localState.runResolvers({document:a,remoteResult:{data:u},context:h,variables:s,onlyRunForcedResolvers:!0}).then((function(e){return c(e.data)})):c(u)},y=function(t){return i.getResultsFromLink(e,t,{variables:s,context:h,fetchPolicy:u,errorPolicy:c})};switch(u){default:case"cache-first":return(v=p()).complete?[d(v,e.markReady())]:l?[d(v),y(!0)]:[y(!0)];case"cache-and-network":var v;return(v=p()).complete||l?[d(v),y(!0)]:[y(!0)];case"cache-only":return[d(p(),e.markReady())];case"network-only":return[y(!0)];case"no-cache":return[y(!1)];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new m(this.cache)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.pi)((0,n.pi)({},t),{clientAwareness:this.clientAwareness})},e}();function C(e,t){return(0,o.oA)(e,t,t.variables&&{variables:(0,n.pi)((0,n.pi)({},e.variables),t.variables)})}var w=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.uri,n=e.credentials,o=e.headers,u=e.cache,c=e.ssrMode,l=void 0!==c&&c,f=e.ssrForceFetchDelay,h=void 0===f?0:f,p=e.connectToDevTools,y=void 0===p?"object"==typeof window&&!window.__APOLLO_CLIENT__&&!1:p,v=e.queryDeduplication,g=void 0===v||v,m=e.defaultOptions,b=e.assumeImmutableResults,E=void 0!==b&&b,C=e.resolvers,w=e.typeDefs,T=e.fragmentMatcher,A=e.name,I=e.version,k=e.link;if(k||(k=r?new s.uG({uri:r,credentials:n,headers:o}):a.i0.empty()),!u)throw new i.ej(9);this.link=k,this.cache=u,this.disableNetworkFetches=l||h>0,this.queryDeduplication=g,this.defaultOptions=m||{},this.typeDefs=w,h&&setTimeout((function(){return t.disableNetworkFetches=!1}),h),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),y&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),this.version="3.3.9",this.localState=new d({cache:u,client:this,resolvers:C,fragmentMatcher:T}),this.queryManager=new S({cache:this.cache,link:this.link,queryDeduplication:g,ssrMode:l,clientAwareness:{name:A,version:I},localState:this.localState,assumeImmutableResults:E,onBroadcast:y?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=C(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,n.pi)((0,n.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=C(this.defaultOptions.query,e)),(0,i.kG)("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.pi)((0,n.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=C(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return(0,a.ht)(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}()},6282:function(e,t,r){"use strict";r.d(t,{u:function(){return c}});var n=r(655),i=r(2924),a=r(2152),o=r(5942),s=r(496),u=function(){function e(e,t,r,n){this.observer=e,this.options=t,this.fetch=r,this.shouldFetch=n}return e.prototype.reobserve=function(e,t){e?this.updateOptions(e):this.updatePolling();var r=this.fetch(this.options,t);return this.concast&&this.concast.removeObserver(this.observer,!0),r.addObserver(this.observer),(this.concast=r).promise},e.prototype.updateOptions=function(e){return Object.assign(this.options,(0,s.oA)(e)),this.updatePolling(),this},e.prototype.stop=function(){this.concast&&(this.concast.removeObserver(this.observer),delete this.concast),this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),this.options.pollInterval=0,this.updatePolling())},e.prototype.updatePolling=function(){var e=this,t=this.pollingInfo,r=this.options.pollInterval;if(r){if((!t||t.interval!==r)&&((0,i.kG)(r,20),!1!==this.shouldFetch)){(t||(this.pollingInfo={})).interval=r;var n=function(){e.pollingInfo&&(e.shouldFetch&&e.shouldFetch()?e.reobserve({fetchPolicy:"network-only",nextFetchPolicy:e.options.fetchPolicy||"cache-first"},o.I.poll).then(a,a):a())},a=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};a()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)},e}(),c=function(e){function t(t){var r=t.queryManager,i=t.queryInfo,a=t.options,u=e.call(this,(function(e){return u.onSubscribe(e)}))||this;u.observers=new Set,u.subscriptions=new Set,u.observer={next:function(e){(u.lastError||u.isDifferentFromLastResult(e))&&(u.updateLastResult(e),(0,s.pM)(u.observers,"next",e))},error:function(e){u.updateLastResult((0,n.pi)((0,n.pi)({},u.lastResult),{error:e,errors:e.graphQLErrors,networkStatus:o.I.error,loading:!1})),(0,s.pM)(u.observers,"error",u.lastError=e)}},u.isTornDown=!1,u.options=a,u.queryId=r.generateQueryId();var c=(0,s.$H)(a.query);return u.queryName=c&&c.name&&c.name.value,u.queryManager=r,u.queryInfo=i,u}return(0,n.ZT)(t,e),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:r},i=e.subscribe(n)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.lastResult,r=this.queryInfo.networkStatus||t&&t.networkStatus||o.I.ready,i=(0,n.pi)((0,n.pi)({},t),{loading:(0,o.O)(r),networkStatus:r});if(this.isTornDown)return i;var a=this.options.fetchPolicy,s=void 0===a?"cache-first":a;if("no-cache"===s||"network-only"===s)delete i.partial;else if(!i.data||!this.queryManager.transform(this.options.query).hasForcedResolvers){var u=this.queryInfo.getDiff();i.data=u.complete||this.options.returnPartialData?u.result:void 0,u.complete?(i.networkStatus!==o.I.loading||"cache-first"!==s&&"cache-only"!==s||(i.networkStatus=o.I.ready,i.loading=!1),delete i.partial):i.partial=!0}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e){return!(0,a.D)(this.lastResultSnapshot,e)},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t={pollInterval:0},r=this.options.fetchPolicy;return"no-cache"!==r&&"cache-and-network"!==r&&(t.fetchPolicy="network-only",t.nextFetchPolicy=r||"cache-first"),e&&!(0,a.D)(this.options.variables,e)&&(t.variables=this.options.variables=(0,n.pi)((0,n.pi)({},this.options.variables),e)),this.newReobserver(!1).reobserve(t,o.I.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,n.pi)((0,n.pi)({},e.query?e:(0,n.pi)((0,n.pi)((0,n.pi)({},this.options),e),{variables:(0,n.pi)((0,n.pi)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId();return r.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=o.I.fetchMore,this.observe()),this.queryManager.fetchQuery(i,r,o.I.fetchMore).then((function(n){var i=n.data,a=e.updateQuery;return a?t.updateQuery((function(e){return a(e,{fetchMoreResult:i,variables:r.variables})})):t.queryManager.cache.writeQuery({query:r.query,variables:r.variables,data:i}),n})).finally((function(){t.queryManager.stopQuery(i),t.reobserve()}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery((function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})}))},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){if((0,a.D)(this.variables,e))return this.observers.size?this.result():Promise.resolve();if(this.options.variables=e,!this.observers.size)return Promise.resolve();var t=this.options.fetchPolicy,r=void 0===t?"cache-first":t,n={fetchPolicy:r,variables:e};return"cache-first"!==r&&"no-cache"!==r&&"network-only"!==r&&(n.fetchPolicy="cache-and-network",n.nextFetchPolicy=r),this.reobserve(n,o.I.setVariables)},t.prototype.updateQuery=function(e){var t,r=this.queryManager,n=e(r.cache.diff({query:this.options.query,variables:this.variables,previousResult:null===(t=this.lastResult)||void 0===t?void 0:t.data,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(r.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),r.broadcastQueries())},t.prototype.startPolling=function(e){this.getReobserver().updateOptions({pollInterval:e})},t.prototype.stopPolling=function(){this.reobserver&&this.reobserver.updateOptions({pollInterval:0})},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:(0,s.Xh)(e),(0,s.Of)(e.errors)||delete this.lastError,t},t.prototype.onSubscribe=function(e){var t=this;if(e===this.observer)return function(){};try{var r=e._subscription._observer;r&&!r.error&&(r.error=l)}catch(e){}var n=!this.observers.size;return this.observers.add(e),this.lastError?e.error&&e.error(this.lastError):this.lastResult&&e.next&&e.next(this.lastResult),n&&this.reobserve().catch((function(e){})),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.getReobserver=function(){return this.reobserver||(this.reobserver=this.newReobserver(!0))},t.prototype.newReobserver=function(e){var t=this,r=this.queryManager,i=this.queryId;return r.setObservableQuery(this),new u(this.observer,e?this.options:(0,n.pi)({},this.options),(function(e,n){return r.setObservableQuery(t),r.fetchQueryObservable(i,e,n)}),!r.ssrMode&&function(){return!(0,o.O)(t.queryInfo.networkStatus)})},t.prototype.reobserve=function(e,t){return this.isTornDown=!1,this.getReobserver().reobserve(e,t)},t.prototype.observe=function(){this.observer.next(this.getCurrentResult(!1))},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.reobserver&&(this.reobserver.stop(),delete this.reobserver),delete this.options.context,this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(s.y$);function l(e){}(0,s.Dy)(c)},1439:function(e,t,r){"use strict";r.d(t,{fe:function(){return n.f},h4:function(){return a.h4},HttpLink:function(){return u.uG}});var n=r(5765),i=(r(6282),r(5942),r(2191));r.o(i,"HttpLink")&&r.d(t,{HttpLink:function(){return i.HttpLink}});r(1498);var a=r(2634),o=r(5367);r.o(o,"HttpLink")&&r.d(t,{HttpLink:function(){return o.HttpLink}});var s=r(1707);r.o(s,"HttpLink")&&r.d(t,{HttpLink:function(){return s.HttpLink}});var u=r(9950),c=(r(4913),r(496),r(2924)),l=r(1466);(0,c.U6)("log");l.ZP.resetCaches,l.ZP.disableFragmentWarnings,l.ZP.enableExperimentalFragmentVariables,l.ZP.disableExperimentalFragmentVariables},5942:function(e,t,r){"use strict";var n;function i(e){return!!e&&e<7}r.d(t,{I:function(){return n},O:function(){return i}}),function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(n||(n={}))},2191:function(){},1498:function(e,t,r){"use strict";r.d(t,{M:function(){return a},c:function(){return o}});var n=r(655),i=r(496);function a(e){return e.hasOwnProperty("graphQLErrors")}var o=function(e){function t(r){var n,a,o=r.graphQLErrors,s=r.networkError,u=r.errorMessage,c=r.extraInfo,l=e.call(this,u)||this;return l.graphQLErrors=o||[],l.networkError=s||null,l.message=u||(n=l,a="",(0,i.Of)(n.graphQLErrors)&&n.graphQLErrors.forEach((function(e){var t=e?e.message:"Error message not found.";a+=t+"\n"})),n.networkError&&(a+=n.networkError.message+"\n"),a=a.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,n.ZT)(t,e),t}(Error)},7222:function(e,t,r){"use strict";r.d(t,{i:function(){return l}});var n=r(655),i=r(2924),a=r(496),o=r(4913);function s(e,t){return t?t(e):a.y$.of()}function u(e){return"function"==typeof e?new l(e):e}function c(e){return e.request.length<=1}!function(e){function t(t,r){var n=e.call(this,t)||this;return n.link=r,n}(0,n.ZT)(t,e)}(Error);var l=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return a.y$.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(u).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,r,n){var i=u(r),o=u(n||new e(s));return c(i)&&c(o)?new e((function(e){return t(e)?i.request(e)||a.y$.of():o.request(e)||a.y$.of()})):new e((function(e,r){return t(e)?i.request(e,r)||a.y$.of():o.request(e,r)||a.y$.of()}))},e.execute=function(e,t){return e.request((0,o.zi)(t.context,(0,o.DQ)((0,o.Ak)(t))))||a.y$.of()},e.concat=function(t,r){var n=u(t);if(c(n))return n;var i=u(r);return c(i)?new e((function(e){return n.request(e,(function(e){return i.request(e)||a.y$.of()}))||a.y$.of()})):new e((function(e,t){return n.request(e,(function(e){return i.request(e,t)||a.y$.of()}))||a.y$.of()}))},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(s)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw new i.ej(21)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}()},4957:function(e,t,r){"use strict";r(7222).i.concat},7325:function(e,t,r){"use strict";r(7222).i.empty},2550:function(e,t,r){"use strict";r.d(t,{h:function(){return n}});var n=r(7222).i.execute},4674:function(e,t,r){"use strict";r(7222).i.from},1707:function(e,t,r){"use strict";r.d(t,{ht:function(){return n.h},i0:function(){return i.i}});r(7325),r(4674),r(4738),r(4957);var n=r(2550),i=r(7222),a=r(9875);r.o(a,"HttpLink")&&r.d(t,{HttpLink:function(){return a.HttpLink}})},4738:function(e,t,r){"use strict";r(7222).i.split},9875:function(){},9950:function(e,t,r){"use strict";r.d(t,{uG:function(){return T}});var n=r(4913),i=Object.prototype.hasOwnProperty;var a=r(2924),o=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=new a.ej(23);throw n.parseError=e,n}return r},s=r(655),u=r(7636),c=r(7420);function l(e){return(0,u.Vn)(e,{leave:f})}var f={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return p(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=y("(",p(e.variableDefinitions,", "),")"),i=p(e.directives," "),a=e.selectionSet;return r||i||n||"query"!==t?p([t,p([r,n]),i,a]," "):a},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+y(" = ",n)+y(" ",p(i," "))},SelectionSet:function(e){return d(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,a=e.selectionSet,o=y("",t,": ")+r,s=o+y("(",p(n,", "),")");return s.length>80&&(s=o+y("(\n",v(p(n,"\n")),"\n)")),p([s,p(i," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+y(" ",p(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return p(["...",y("on ",t),p(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(y("(",p(n,", "),")")," ")+"on ".concat(r," ").concat(y("",p(i," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?(0,c.LZ)(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+p(e.values,", ")+"]"},ObjectValue:function(e){return"{"+p(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+y("(",p(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:h((function(e){var t=e.directives,r=e.operationTypes;return p(["schema",p(t," "),d(r)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:h((function(e){return p(["scalar",e.name,p(e.directives," ")]," ")})),ObjectTypeDefinition:h((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return p(["type",t,y("implements ",p(r," & ")),p(n," "),d(i)]," ")})),FieldDefinition:h((function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(m(r)?y("(\n",v(p(r,"\n")),"\n)"):y("(",p(r,", "),")"))+": "+n+y(" ",p(i," "))})),InputValueDefinition:h((function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return p([t+": "+r,y("= ",n),p(i," ")]," ")})),InterfaceTypeDefinition:h((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return p(["interface",t,y("implements ",p(r," & ")),p(n," "),d(i)]," ")})),UnionTypeDefinition:h((function(e){var t=e.name,r=e.directives,n=e.types;return p(["union",t,p(r," "),n&&0!==n.length?"= "+p(n," | "):""]," ")})),EnumTypeDefinition:h((function(e){var t=e.name,r=e.directives,n=e.values;return p(["enum",t,p(r," "),d(n)]," ")})),EnumValueDefinition:h((function(e){return p([e.name,p(e.directives," ")]," ")})),InputObjectTypeDefinition:h((function(e){var t=e.name,r=e.directives,n=e.fields;return p(["input",t,p(r," "),d(n)]," ")})),DirectiveDefinition:h((function(e){var t=e.name,r=e.arguments,n=e.repeatable,i=e.locations;return"directive @"+t+(m(r)?y("(\n",v(p(r,"\n")),"\n)"):y("(",p(r,", "),")"))+(n?" repeatable":"")+" on "+p(i," | ")})),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return p(["extend schema",p(t," "),d(r)]," ")},ScalarTypeExtension:function(e){return p(["extend scalar",e.name,p(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return p(["extend type",t,y("implements ",p(r," & ")),p(n," "),d(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return p(["extend interface",t,y("implements ",p(r," & ")),p(n," "),d(i)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return p(["extend union",t,p(r," "),n&&0!==n.length?"= "+p(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return p(["extend enum",t,p(r," "),d(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return p(["extend input",t,p(r," "),d(n)]," ")}};function h(e){return function(t){return p([t.description,e(t)],"\n")}}function p(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(r))&&void 0!==t?t:""}function d(e){return y("{\n",v(p(e,"\n")),"\n}")}function y(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+r:""}function v(e){return y(" ",e.replace(/\n/g,"\n "))}function g(e){return-1!==e.indexOf("\n")}function m(e){return null!=e&&e.some(g)}var b={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},E=r(285),S=r(1707),C=r(496);var w=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,u=e.fetch,c=e.includeExtensions,f=e.useGETForQueries,h=e.includeUnusedVariables,p=void 0!==h&&h,d=(0,s._T)(e,["uri","fetch","includeExtensions","useGETForQueries","includeUnusedVariables"]);!function(e){if(!e&&"undefined"==typeof fetch)throw new a.ej(22)}(u),u||(u=fetch);var y={http:{includeExtensions:c},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};return new S.i0((function(e){var t=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")}(e,r),a=e.getContext(),c={};if(a.clientAwareness){var h=a.clientAwareness,d=h.name,v=h.version;d&&(c["apollographql-client-name"]=d),v&&(c["apollographql-client-version"]=v)}var g,m=(0,s.pi)((0,s.pi)({},c),a.headers),S={http:a.http,options:a.fetchOptions,credentials:a.credentials,headers:m},w=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=(0,s.pi)((0,s.pi)({},t.options),{headers:t.headers,credentials:t.credentials}),a=t.http||{};r.forEach((function(e){i=(0,s.pi)((0,s.pi)((0,s.pi)({},i),e.options),{headers:(0,s.pi)((0,s.pi)({},i.headers),e.headers)}),e.credentials&&(i.credentials=e.credentials),a=(0,s.pi)((0,s.pi)({},a),e.http)}));var o=e.operationName,u=e.extensions,c=e.variables,f=e.query,h={operationName:o,variables:c};return a.includeExtensions&&(h.extensions=u),a.includeQuery&&(h.query=l(f)),{options:i,body:h}}(e,b,y,S),T=w.options,A=w.body;if(A.variables&&!p){var I=new Set(Object.keys(A.variables));(0,E.Vn)(e.query,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&I.delete(e.name.value)}}),I.size&&(A.variables=(0,s.pi)({},A.variables),I.forEach((function(e){delete A.variables[e]})))}if(!T.signal){var k=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}}(),_=k.controller,B=k.signal;(g=_)&&(T.signal=B)}if(f&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(T.method="GET"),"GET"===T.method){var N=function(e,t){var r=[],n=function(e,t){r.push(e+"="+encodeURIComponent(t))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=o(t.variables)}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var a=void 0;try{a=o(t.extensions)}catch(e){return{parseError:e}}n("extensions",a)}var s="",u=e,c=e.indexOf("#");-1!==c&&(s=e.substr(c),u=e.substr(0,c));var l=-1===u.indexOf("?")?"?":"&";return{newURI:u+l+r.join("&")+s}}(t,A),O=N.newURI,R=N.parseError;if(R)return(0,n.Qc)(R);t=O}else try{T.body=o(A)}catch(R){return(0,n.Qc)(R)}return new C.y$((function(r){var a;return u(t,T).then((function(t){return e.setContext({response:t}),t})).then((a=e,function(e){return e.text().then((function(t){try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}})).then((function(t){return e.status>=300&&(0,n.PW)(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||i.call(t,"data")||i.call(t,"errors")||(0,n.PW)(e,t,"Server response was missing for query '"+(Array.isArray(a)?a.map((function(e){return e.operationName})):a.operationName)+"'."),t}))})).then((function(e){return r.next(e),r.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&r.next(e.result),r.error(e))})),function(){g&&g.abort()}}))}))},T=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,w(t).request)||this;return r.options=t,r}return(0,s.ZT)(t,e),t}(S.i0)},4913:function(e,t,r){"use strict";r.d(t,{zi:function(){return c},Qc:function(){return i},PW:function(){return o},DQ:function(){return l},Ak:function(){return s}});var n=r(496);function i(e){return new n.y$((function(t){t.error(e)}))}var a=r(2924);var o=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n};function s(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw new a.ej(26)}return e}var u=r(655);function c(e,t){var r=(0,u.pi)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r="function"==typeof e?(0,u.pi)((0,u.pi)({},r),e(r)):(0,u.pi)((0,u.pi)({},r),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,u.pi)({},r)}}),t}function l(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?(0,n.rY)(t.query)||void 0:""),t}},1466:function(e,t,r){"use strict";r.d(t,{ZP:function(){return ee}});var n=r(655);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var a="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function o(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,a=t+1;(r=n.exec(e.body))&&r.index<t;)i+=1,a=t+1-(r.index+r[0].length);return{line:i,column:a}}function s(e){return u(e.source,o(e.source,e.start))}function u(e,t){var r=e.locationOffset.column-1,n=l(r)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?r:0,u=t.column+s,f="".concat(e.name,":").concat(o,":").concat(u,"\n"),h=n.split(/\r\n|[\n\r]/g),p=h[i];if(p.length>120){for(var d=Math.floor(u/80),y=u%80,v=[],g=0;g<p.length;g+=80)v.push(p.slice(g,g+80));return f+c([["".concat(o),v[0]]].concat(v.slice(1,d+1).map((function(e){return["",e]})),[[" ",l(y-1)+"^"],["",v[d+1]]]))}return f+c([["".concat(o-1),h[i-1]],["".concat(o),p],["",l(u-1)+"^"],["".concat(o+1),h[i+1]]])}function c(e){var t=e.filter((function(e){e[0];return void 0!==e[1]})),r=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,n=e[0],i=e[1];return l(r-(t=n).length)+t+(i?" | "+i:" |")})).join("\n")}function l(e){return Array(e+1).join(" ")}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(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,n.key,n)}}function p(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?d(e):t}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){var t="function"==typeof Map?new Map:void 0;return(y=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return v(e,arguments,b(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),m(n,e)})(e)}function v(e,t,r){return(v=g()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&m(i,r.prototype),i}).apply(null,arguments)}function g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(y,e);var t,r,n,c,l,f=(t=y,r=g(),function(){var e,n=b(t);if(r){var i=b(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return p(this,e)});function y(e,t,r,n,a,s,u){var c,l,h,v,g;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),g=f.call(this,e);var m,b=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,E=r;!E&&b&&(E=null===(m=b[0].loc)||void 0===m?void 0:m.source);var S,C=n;!C&&b&&(C=b.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),C&&0===C.length&&(C=void 0),n&&r?S=n.map((function(e){return o(r,e)})):b&&(S=b.reduce((function(e,t){return t.loc&&e.push(o(t.loc.source,t.loc.start)),e}),[]));var w,T=u;if(null==T&&null!=s){var A=s.extensions;"object"==i(w=A)&&null!==w&&(T=A)}return Object.defineProperties(d(g),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(c=S)&&void 0!==c?c:void 0,enumerable:null!=S},path:{value:null!=a?a:void 0,enumerable:null!=a},nodes:{value:null!=b?b:void 0},source:{value:null!==(l=E)&&void 0!==l?l:void 0},positions:{value:null!==(h=C)&&void 0!==h?h:void 0},originalError:{value:s},extensions:{value:null!==(v=T)&&void 0!==v?v:void 0,enumerable:null!=T}}),null!=s&&s.stack?(Object.defineProperty(d(g),"stack",{value:s.stack,writable:!0,configurable:!0}),p(g)):(Error.captureStackTrace?Error.captureStackTrace(d(g),y):Object.defineProperty(d(g),"stack",{value:Error().stack,writable:!0,configurable:!0}),g)}return n=y,(c=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r<n.length;r++){var i=n[r];i.loc&&(t+="\n\n"+s(i.loc))}else if(e.source&&e.locations)for(var a=0,o=e.locations;a<o.length;a++){var c=o[a];t+="\n\n"+u(e.source,c)}return t}(this)}},{key:a,get:function(){return"Object"}}])&&h(n.prototype,c),l&&h(n,l),y}(y(Error));function S(e,t,r){return new E("Syntax Error: ".concat(r),void 0,e,[t])}var C=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"}),w=r(3059),T=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),A=r(6589);function I(e,t){if(!Boolean(e))throw new Error(t)}var k=function(e,t){return e instanceof t};function _(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,n.key,n)}}var B=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||I(0,"Body must be a string. Received: ".concat((0,A.Z)(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||I(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||I(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r,n;return t=e,(r=[{key:a,get:function(){return"Source"}}])&&_(t.prototype,r),n&&_(t,n),e}();var N=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"}),O=r(7420),R=function(){function e(e){var t=new w.WU(T.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==T.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=P(this,e)}while(e.kind===T.COMMENT);return e},e}();function x(e){return isNaN(e)?T.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function P(e,t){for(var r=e.source,n=r.body,i=n.length,a=t.end;a<i;){var o=n.charCodeAt(a),s=e.line,u=1+a-e.lineStart;switch(o){case 65279:case 9:case 32:case 44:++a;continue;case 10:++a,++e.line,e.lineStart=a;continue;case 13:10===n.charCodeAt(a+1)?a+=2:++a,++e.line,e.lineStart=a;continue;case 33:return new w.WU(T.BANG,a,a+1,s,u,t);case 35:return D(r,a,s,u,t);case 36:return new w.WU(T.DOLLAR,a,a+1,s,u,t);case 38:return new w.WU(T.AMP,a,a+1,s,u,t);case 40:return new w.WU(T.PAREN_L,a,a+1,s,u,t);case 41:return new w.WU(T.PAREN_R,a,a+1,s,u,t);case 46:if(46===n.charCodeAt(a+1)&&46===n.charCodeAt(a+2))return new w.WU(T.SPREAD,a,a+3,s,u,t);break;case 58:return new w.WU(T.COLON,a,a+1,s,u,t);case 61:return new w.WU(T.EQUALS,a,a+1,s,u,t);case 64:return new w.WU(T.AT,a,a+1,s,u,t);case 91:return new w.WU(T.BRACKET_L,a,a+1,s,u,t);case 93:return new w.WU(T.BRACKET_R,a,a+1,s,u,t);case 123:return new w.WU(T.BRACE_L,a,a+1,s,u,t);case 124:return new w.WU(T.PIPE,a,a+1,s,u,t);case 125:return new w.WU(T.BRACE_R,a,a+1,s,u,t);case 34:return 34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2)?V(r,a,s,u,t,e):j(r,a,s,u,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return L(r,a,o,s,u,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return M(r,a,s,u,t)}throw S(r,a,F(o))}var c=e.line,l=1+a-e.lineStart;return new w.WU(T.EOF,i,i,c,l,t)}function F(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(x(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(x(e),".")}function D(e,t,r,n,i){var a,o=e.body,s=t;do{a=o.charCodeAt(++s)}while(!isNaN(a)&&(a>31||9===a));return new w.WU(T.COMMENT,t,s,r,n,i,o.slice(t+1,s))}function L(e,t,r,n,i,a){var o=e.body,s=r,u=t,c=!1;if(45===s&&(s=o.charCodeAt(++u)),48===s){if((s=o.charCodeAt(++u))>=48&&s<=57)throw S(e,u,"Invalid number, unexpected digit after 0: ".concat(x(s),"."))}else u=U(e,u,s),s=o.charCodeAt(u);if(46===s&&(c=!0,s=o.charCodeAt(++u),u=U(e,u,s),s=o.charCodeAt(u)),69!==s&&101!==s||(c=!0,43!==(s=o.charCodeAt(++u))&&45!==s||(s=o.charCodeAt(++u)),u=U(e,u,s),s=o.charCodeAt(u)),46===s||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(s))throw S(e,u,"Invalid number, expected digit but got: ".concat(x(s),"."));return new w.WU(c?T.FLOAT:T.INT,t,u,n,i,a,o.slice(t,u))}function U(e,t,r){var n=e.body,i=t,a=r;if(a>=48&&a<=57){do{a=n.charCodeAt(++i)}while(a>=48&&a<=57);return i}throw S(e,i,"Invalid number, expected digit but got: ".concat(x(a),"."))}function j(e,t,r,n,i){for(var a,o,s,u,c=e.body,l=t+1,f=l,h=0,p="";l<c.length&&!isNaN(h=c.charCodeAt(l))&&10!==h&&13!==h;){if(34===h)return p+=c.slice(f,l),new w.WU(T.STRING,t,l+1,r,n,i,p);if(h<32&&9!==h)throw S(e,l,"Invalid character within String: ".concat(x(h),"."));if(++l,92===h){switch(p+=c.slice(f,l-1),h=c.charCodeAt(l)){case 34:p+='"';break;case 47:p+="/";break;case 92:p+="\\";break;case 98:p+="\b";break;case 102:p+="\f";break;case 110:p+="\n";break;case 114:p+="\r";break;case 116:p+="\t";break;case 117:var d=(a=c.charCodeAt(l+1),o=c.charCodeAt(l+2),s=c.charCodeAt(l+3),u=c.charCodeAt(l+4),K(a)<<12|K(o)<<8|K(s)<<4|K(u));if(d<0){var y=c.slice(l+1,l+5);throw S(e,l,"Invalid character escape sequence: \\u".concat(y,"."))}p+=String.fromCharCode(d),l+=4;break;default:throw S(e,l,"Invalid character escape sequence: \\".concat(String.fromCharCode(h),"."))}f=++l}}throw S(e,l,"Unterminated string.")}function V(e,t,r,n,i,a){for(var o=e.body,s=t+3,u=s,c=0,l="";s<o.length&&!isNaN(c=o.charCodeAt(s));){if(34===c&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2))return l+=o.slice(u,s),new w.WU(T.BLOCK_STRING,t,s+3,r,n,i,(0,O.W7)(l));if(c<32&&9!==c&&10!==c&&13!==c)throw S(e,s,"Invalid character within String: ".concat(x(c),"."));10===c?(++s,++a.line,a.lineStart=s):13===c?(10===o.charCodeAt(s+1)?s+=2:++s,++a.line,a.lineStart=s):92===c&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2)&&34===o.charCodeAt(s+3)?(l+=o.slice(u,s)+'"""',u=s+=4):++s}throw S(e,s,"Unterminated string.")}function K(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function M(e,t,r,n,i){for(var a=e.body,o=a.length,s=t+1,u=0;s!==o&&!isNaN(u=a.charCodeAt(s))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new w.WU(T.NAME,t,s,r,n,i,a.slice(t,s))}var q=function(){function e(e,t){var r=function(e){return k(e,B)}(e)?e:new B(e);this._lexer=new R(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(T.NAME);return{kind:C.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:C.DOCUMENT,definitions:this.many(T.SOF,this.parseDefinition,T.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(T.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(T.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(T.BRACE_L))return{kind:C.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(T.NAME)&&(t=this.parseName()),{kind:C.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(T.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(T.PAREN_L,this.parseVariableDefinition,T.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:C.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(T.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(T.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(T.DOLLAR),{kind:C.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:C.SELECTION_SET,selections:this.many(T.BRACE_L,this.parseSelection,T.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(T.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(T.COLON)?(e=n,t=this.parseName()):t=n,{kind:C.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(T.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(T.PAREN_L,t,T.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(T.COLON),{kind:C.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:C.ARGUMENT,name:this.parseName(),value:(this.expectToken(T.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(T.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(T.NAME)?{kind:C.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:C.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:C.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:C.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case T.BRACKET_L:return this.parseList(e);case T.BRACE_L:return this.parseObject(e);case T.INT:return this._lexer.advance(),{kind:C.INT,value:t.value,loc:this.loc(t)};case T.FLOAT:return this._lexer.advance(),{kind:C.FLOAT,value:t.value,loc:this.loc(t)};case T.STRING:case T.BLOCK_STRING:return this.parseStringLiteral();case T.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:C.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:C.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:C.NULL,loc:this.loc(t)};default:return{kind:C.ENUM,value:t.value,loc:this.loc(t)}}case T.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:C.STRING,value:e.value,block:e.kind===T.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:C.LIST,values:this.any(T.BRACKET_L,(function(){return t.parseValueLiteral(e)}),T.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:C.OBJECT,fields:this.any(T.BRACE_L,(function(){return t.parseObjectField(e)}),T.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(T.COLON),{kind:C.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(T.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(T.AT),{kind:C.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(T.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(T.BRACKET_R),e={kind:C.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(T.BANG)?{kind:C.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:C.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===T.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(T.STRING)||this.peek(T.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(T.BRACE_L,this.parseOperationTypeDefinition,T.BRACE_R);return{kind:C.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(T.COLON);var r=this.parseNamedType();return{kind:C.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:C.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:C.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:a,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(T.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(T.AMP)||this.peek(T.NAME));return t}return this.delimitedMany(T.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(T.BRACE_L)&&this._lexer.lookahead().kind===T.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(T.BRACE_L,this.parseFieldDefinition,T.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(T.COLON);var i=this.parseTypeReference(),a=this.parseDirectives(!0);return{kind:C.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:a,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(T.PAREN_L,this.parseInputValueDef,T.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(T.COLON);var n,i=this.parseTypeReference();this.expectOptionalToken(T.EQUALS)&&(n=this.parseValueLiteral(!0));var a=this.parseDirectives(!0);return{kind:C.INPUT_VALUE_DEFINITION,description:t,name:r,type:i,defaultValue:n,directives:a,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:C.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:a,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:C.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(T.EQUALS)?this.delimitedMany(T.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:C.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(T.BRACE_L,this.parseEnumValueDefinition,T.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:C.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:C.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(T.BRACE_L,this.parseInputValueDef,T.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===T.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(T.BRACE_L,this.parseOperationTypeDefinition,T.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:C.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:C.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:C.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:C.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:C.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:C.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:C.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(T.AT);var r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var a=this.parseDirectiveLocations();return{kind:C.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:a,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(T.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==N[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new w.Ye(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw S(this._lexer.source,t.start,"Expected ".concat(H(e),", found ").concat(z(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==T.NAME||t.value!==e)throw S(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(z(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===T.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return S(this._lexer.source,t.start,"Unexpected ".concat(z(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r},e}();function z(e){var t=e.value;return H(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function H(e){return function(e){return e===T.BANG||e===T.DOLLAR||e===T.AMP||e===T.PAREN_L||e===T.PAREN_R||e===T.SPREAD||e===T.COLON||e===T.EQUALS||e===T.AT||e===T.BRACKET_L||e===T.BRACKET_R||e===T.BRACE_L||e===T.PIPE||e===T.BRACE_R}(e)?'"'.concat(e,'"'):e}var G=new Map,Q=new Map,W=!0,Y=!1;function Z(e){return e.replace(/[\s,]+/g," ").trim()}function J(e){var t=new Set,r=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,i=Z((o=e.loc).source.body.substring(o.start,o.end)),a=Q.get(n);a&&!a.has(i)?W&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):a||Q.set(n,a=new Set),a.add(i),t.has(i)||(t.add(i),r.push(e))}else r.push(e);var o})),(0,n.pi)((0,n.pi)({},e),{definitions:r})}function X(e){var t=Z(e);if(!G.has(t)){var r=function(e,t){return new q(e,t).parseDocument()}(e,{experimentalFragmentVariables:Y});if(!r||"Document"!==r.kind)throw new Error("Not a valid GraphQL document.");G.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)}))}));var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}(J(r)))}return G.get(t)}function $(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach((function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]})),X(n)}var ee=Object.assign($,{gql:$,default:$,resetCaches:function(){G.clear(),Q.clear()},disableFragmentWarnings:function(){W=!1},enableExperimentalFragmentVariables:function(){Y=!0},disableExperimentalFragmentVariables:function(){Y=!1}})},1494:function(e,t,r){"use strict";e=r.hmd(e);!function(e){var t,r=e.Symbol;if("function"==typeof r)if(r.observable)t=r.observable;else{t=r.for("https://github.com/benlesh/symbol-observable");try{r.observable=t}catch(e){}}else t="@@observable"}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:e)},496:function(e,t,r){"use strict";r.d(t,{X_:function(){return oe},w0:function(){return Y},y$:function(){return J()},Gw:function(){return U},NC:function(){return E},sz:function(){return ne},aL:function(){return M},mr:function(){return ce},Xh:function(){return $},oA:function(){return le},F:function(){return l},Dy:function(){return ie},O4:function(){return O},kU:function(){return _},hi:function(){return f},Yk:function(){return c},p$:function(){return N},$H:function(){return I},rY:function(){return k},iW:function(){return B},PT:function(){return b},qw:function(){return C},d2:function(){return ue},mj:function(){return s},FS:function(){return o},My:function(){return w},Ao:function(){return T},Of:function(){return se},hh:function(){return y},pM:function(){return re},kQ:function(){return d},Jv:function(){return te},Ee:function(){return H},bw:function(){return G},ob:function(){return q},Fo:function(){return V},u2:function(){return S},LZ:function(){return a},vf:function(){return g}});var n=r(7636),i=r(2924);function a(e,t){var r=e.directives;return!r||!r.length||function(e){var t=[];e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var r=e.arguments;e.name.value;(0,i.kG)(r&&1===r.length,39);var n=r[0];(0,i.kG)(n.name&&"if"===n.name.value,40);var a=n.value;(0,i.kG)(a&&("Variable"===a.kind||"BooleanValue"===a.kind),41),t.push({directive:e,ifArgument:n})}}));return t}(r).every((function(e){var r=e.directive,n=e.ifArgument,a=!1;return"Variable"===n.value.kind?(a=t&&t[n.value.name.value],(0,i.kG)(void 0!==a,38)):a=n.value.value,"skip"===r.name.value?!a:a}))}function o(e,t){return function(e){var t=[];return(0,n.Vn)(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function s(e){return e&&o(["client"],e)&&o(["export"],e)}var u=r(655);function c(e,t){var r=t,n=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new i.ej(42);"FragmentDefinition"===e.kind&&n.push(e)})),void 0===r&&((0,i.kG)(1===n.length,43),r=n[0].name.value),(0,u.pi)((0,u.pi)({},e),{definitions:(0,u.pr)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions)})}function l(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function f(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=t&&t[e.name.value];return(0,i.kG)(r,44),r;default:return null}}var h=r(5035),p=r.n(h);function d(e){return{__ref:String(e)}}function y(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function v(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var a={};r.fields.map((function(e){return v(a,e.name,e.value,n)})),e[t.value]=a}else if(function(e){return"Variable"===e.kind}(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return v(r,t,e,n),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw new i.ej(53);e[t.value]=null}}function g(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var i=n.name,a=n.value;return v(r[e.name.value],i,a,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return v(n,r,i,t)}))),b(e.name.value,n,r)}var m=["connection","include","skip","client","rest","export"];function b(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach((function(e){i[e]=t[e]})),r.connection.key+"("+JSON.stringify(i)+")"}return r.connection.key}var a=e;if(t){var o=p()(t);a+="("+o+")"}return r&&Object.keys(r).forEach((function(e){-1===m.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?a+="@"+e+"("+JSON.stringify(r[e])+")":a+="@"+e)})),a}function E(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return v(r,n,i,t)})),r}return null}function S(e){return e.alias?e.alias.value:e.name.value}function C(e,t,r){if("string"==typeof e.__typename)return e.__typename;for(var n=0,i=t.selections;n<i.length;n++){var a=i[n];if(w(a)){if("__typename"===a.name.value)return e[S(a)]}else{var o=C(e,f(a,r).selectionSet,r);if("string"==typeof o)return o}}}function w(e){return"Field"===e.kind}function T(e){return"InlineFragment"===e.kind}function A(e){(0,i.kG)(e&&"Document"===e.kind,45);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw new i.ej(46);return e}));return(0,i.kG)(t.length<=1,47),e}function I(e){return A(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function k(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function _(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function B(e){var t=I(e);return(0,i.kG)(t&&"query"===t.operation,48),t}function N(e){var t;A(e);for(var r=0,n=e.definitions;r<n.length;r++){var a=n[r];if("OperationDefinition"===a.kind){var o=a.operation;if("query"===o||"mutation"===o||"subscription"===o)return a}"FragmentDefinition"!==a.kind||t||(t=a)}if(t)return t;throw new i.ej(52)}function O(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach((function(e){e.defaultValue&&v(t,e.variable.name,e.defaultValue)})),t}function R(e,t,r){var n=0;return e.forEach((function(r,i){t.call(this,r,i,e)&&(e[n++]=r)}),r),e.length=n,e}var x={kind:"Field",name:{kind:"Name",value:"__typename"}};function P(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&P(t[e.name.value],t)}))}function F(e){return P(I(e)||function(e){(0,i.kG)("Document"===e.kind,49),(0,i.kG)(e.definitions.length<=1,50);var t=e.definitions[0];return(0,i.kG)("FragmentDefinition"===t.kind,51),t}(e),l(_(e)))?null:e}function D(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function L(e,t){var r=Object.create(null),i=[],a=Object.create(null),o=[],s=F((0,n.Vn)(t,{Variable:{enter:function(e,t,n){"VariableDefinition"!==n.kind&&(r[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&(e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(D(e))))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&i.push({name:e.value.name.value})})),t.selectionSet&&K(t.selectionSet).forEach((function(e){o.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){a[e.name.value]=!0}},Directive:{enter:function(t){if(D(e)(t))return null}}}));return s&&R(i,(function(e){return!!e.name&&!r[e.name]})).length&&(s=function(e,t){var r=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return F((0,n.Vn)(t,{OperationDefinition:{enter:function(t){return(0,u.pi)((0,u.pi)({},t),{variableDefinitions:t.variableDefinitions?t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))})):[]})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var n=0;if(t.arguments&&t.arguments.forEach((function(e){r(e)&&(n+=1)})),1===n)return null}}},Argument:{enter:function(e){if(r(e))return null}}}))}(i,s)),s&&R(o,(function(e){return!!e.name&&!a[e.name]})).length&&(s=function(e,t){function r(t){if(e.some((function(e){return e.name===t.name.value})))return null}return F((0,n.Vn)(t,{FragmentSpread:{enter:r},FragmentDefinition:{enter:r}}))}(o,s)),s}function U(e){return(0,n.Vn)(A(e),{SelectionSet:{enter:function(e,t,r){if(!r||"OperationDefinition"!==r.kind){var n=e.selections;if(n)if(!n.some((function(e){return w(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=r;if(!(w(i)&&i.directives&&i.directives.some((function(e){return"export"===e.name.value}))))return(0,u.pi)((0,u.pi)({},e),{selections:(0,u.pr)(n,[x])})}}}}})}U.added=function(e){return e===x};var j={test:function(e){var t="connection"===e.name.value;return t&&(!e.arguments||e.arguments.some((function(e){return"key"===e.name.value}))),t}};function V(e){return L([j],A(e))}function K(e){var t=[];return e.selections.forEach((function(e){(w(e)||T(e))&&e.selectionSet?K(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function M(e){return"query"===N(e).operation?e:(0,n.Vn)(e,{OperationDefinition:{enter:function(e){return(0,u.pi)((0,u.pi)({},e),{operation:"query"})}}})}function q(e){A(e);var t=L([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=(0,n.Vn)(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return w(e)&&"__typename"===e.name.value})))return null}}})),t}var z=Object.prototype.hasOwnProperty;function H(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return G(e)}function G(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new Y,i=1;i<r;++i)t=n.merge(t,e[i]);return t}function Q(e){return null!==e&&"object"==typeof e}var W=function(e,t,r){return this.merge(e[r],t[r])},Y=function(){function e(e){void 0===e&&(e=W),this.reconciler=e,this.isObject=Q,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var r=this,n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return Q(t)&&Q(e)?(Object.keys(t).forEach((function(i){if(z.call(e,i)){var a=e[i];if(t[i]!==a){var o=r.reconciler.apply(r,(0,u.pr)([e,t,i],n));o!==a&&((e=r.shallowCopyForMerge(e))[i]=o)}}else(e=r.shallowCopyForMerge(e))[i]=t[i]})),e):t},e.prototype.shallowCopyForMerge=function(e){return Q(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):(0,u.pi)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}();var Z=r(9329),J=r.n(Z);r(1494);J().prototype["@@observable"]=function(){return this};var X=Object.prototype.toString;function $(e){return ee(e)}function ee(e,t){switch(X.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach((function(e,n){r[n]=ee(e,t)})),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach((function(r){n[r]=ee(e[r],t)})),n;default:return e}}function te(e){return e}function re(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function ne(e,t,r){return new(J())((function(n){var i=n.next,a=n.error,o=n.complete,s=0,u=!1;function c(e,t){return e?function(t){++s,new Promise((function(r){return r(e(t))})).then((function(e){--s,i&&i.call(n,e),u&&l.complete()}),(function(e){--s,a&&a.call(n,e)}))}:function(e){return t&&t.call(n,e)}}var l={next:c(t,i),error:c(r,a),complete:function(){u=!0,s||o&&o.call(n)}},f=e.subscribe(l);return function(){return f.unsubscribe()}}))}function ie(e){function t(t){Object.defineProperty(e,t,{value:J()})}return"function"==typeof Symbol&&Symbol.species&&t(Symbol.species),t("@@species"),e}function ae(e){return e&&"function"==typeof e.then}var oe=function(e){function t(t){var r=e.call(this,(function(e){return r.addObserver(e),function(){return r.removeObserver(e)}}))||this;return r.observers=new Set,r.addCount=0,r.promise=new Promise((function(e,t){r.resolve=e,r.reject=t})),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],re(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&Promise.resolve().then((function(){return t.unsubscribe()})),r.sub=null,r.latest=["error",e],r.reject(e),re(r.observers,"error",e))},complete:function(){if(null!==r.sub){var e=r.sources.shift();e?ae(e)?e.then((function(e){return r.sub=e.subscribe(r.handlers)})):r.sub=e.subscribe(r.handlers):(r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),re(r.observers,"complete"))}}},r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.complete()},r.promise.catch((function(e){})),"function"==typeof t&&(t=[new(J())(t)]),ae(t)?t.then((function(e){return r.start(e)}),r.handlers.error):r.start(t),r}return(0,u.ZT)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e),++this.addCount)},t.prototype.removeObserver=function(e,t){this.observers.delete(e)&&--this.addCount<1&&!t&&this.handlers.error(new Error("Observable cancelled prematurely"))},t.prototype.cleanup=function(e){var t=this,r=!1,n=function(){r||(r=!0,t.observers.delete(i),e())},i={next:n,error:n,complete:n},a=this.addCount;this.addObserver(i),this.addCount=a},t}(J());function se(e){return Array.isArray(e)&&e.length>0}function ue(e){return e.errors&&e.errors.length>0||!1}ie(oe);var ce="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product);function le(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];void 0!==n&&(r[t]=n)}))})),r}},2152:function(e,t,r){"use strict";r.d(t,{D:function(){return u}});var n=Object.prototype,i=n.toString,a=n.hasOwnProperty,o=Function.prototype.toString,s=new Map;function u(e,t){try{return c(e,t)}finally{s.clear()}}function c(e,t){if(e===t)return!0;var r,n,s,u=i.call(e);if(u!==i.call(t))return!1;switch(u){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(p(e,t))return!0;var f=l(e),d=l(t),y=f.length;if(y!==d.length)return!1;for(var v=0;v<y;++v)if(!a.call(t,f[v]))return!1;for(v=0;v<y;++v){var g=f[v];if(!c(e[g],t[g]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==""+t;case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(p(e,t))return!0;for(var m=e.entries(),b="[object Map]"===u;;){var E=m.next();if(E.done)break;var S=E.value,C=S[0],w=S[1];if(!t.has(C))return!1;if(b&&!c(w,t.get(C)))return!1}return!0;case"[object Function]":var T=o.call(e);return T===o.call(t)&&(n=h,!((s=(r=T).length-n.length)>=0&&r.indexOf(n,s)===s))}return!1}function l(e){return Object.keys(e).filter(f,e)}function f(e){return void 0!==this[e]}var h="{ [native code] }";function p(e,t){var r=s.get(e);if(r){if(r.has(t))return!0}else s.set(e,r=new Set);return r.add(t),!1}},9742:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,a=u(e),o=a[0],s=a[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,s)),l=0,f=s>0?o-4:o;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;s<u;s+=o)a.push(c(e,s,s+o>u?u:s+o));1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o<s;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,a,o=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},2240:function(e,t,r){"use strict";var n=r(1518);function i(e,t){return void 0===t&&(t="utf8"),Buffer.isBuffer(e)?o(e.toString("base64")):o(Buffer.from(e,t).toString("base64"))}function a(e){return e=e.toString(),n.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function o(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var s=i;s.encode=i,s.decode=function(e,t){return void 0===t&&(t="utf8"),Buffer.from(a(e),"base64").toString(t)},s.toBase64=a,s.fromBase64=o,s.toBuffer=function(e){return Buffer.from(a(e),"base64")},t.default=s},1518:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.length,r=t%4;if(!r)return e;var n=t,i=4-r,a=t+i,o=Buffer.alloc(a);for(o.write(e);i--;)o.write("=",n++);return o.toString()}},5772:function(e,t,r){e.exports=r(2240).default,e.exports.default=e.exports},8764:function(e,t,r){"use strict";var n=r(9742),i=r(645),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;
1
+ window.decidimBulletinBoard=function(){var e={735:function(e,t,r){"use strict";r.r(t),r.d(t,{Client:function(){return y},Election:function(){return b},IdentificationKeys:function(){return ee},KeyCeremonyComponent:function(){return te},MESSAGE_PROCESSED:function(){return Q},MESSAGE_RECEIVED:function(){return G},MessageIdentifier:function(){return m},TallyComponent:function(){return re},Trustee:function(){return X},VoteComponent:function(){return ne},Voter:function(){return $}});var n=r(1439),i=r(9312),a=r.n(i),o=r(9953),s=r.n(o),u=r(3718),c=r.n(u),l=r(6890),f=r.n(l),h=r(5313),p=r.n(h);class d{constructor({apiEndpointUrl:e,headers:t}){const r=new n.HttpLink({uri:e,headers:t});this.apolloClient=new n.fe({link:r,cache:new n.h4})}async getLogEntry({electionUniqueId:e,contentHash:t}){return(await this.apolloClient.query({query:f(),variables:{electionUniqueId:e,contentHash:t}})).data.logEntry}async getElectionLogEntries({electionUniqueId:e,after:t,types:r}){return(await this.apolloClient.query({query:a(),variables:{electionUniqueId:e,after:t,types:r},fetchPolicy:"no-cache"})).data.election.logEntries}async processKeyCeremonyStep({messageId:e,signedData:t}){const r=await this.apolloClient.mutate({mutation:s(),variables:{messageId:e,signedData:t}});if(r.data.processKeyCeremonyStep.error)throw new Error(r.data.processKeyCeremonyStep.error);return r.data.processKeyCeremonyStep.pendingMessage}async getPendingMessageByMessageId({messageId:e}){return(await this.apolloClient.query({query:p(),variables:{messageId:e}})).data.pendingMessage}async processTallyStep({messageId:e,signedData:t}){const r=await this.apolloClient.mutate({mutation:c(),variables:{messageId:e,signedData:t}});if(r.data.processTallyStep.error)throw new Error(r.data.processTallyStep.error);return r.data.processTallyStep.pendingMessage}}class y{constructor(e){this.apiClient=new d(e)}getLogEntry({electionUniqueId:e,contentHash:t}){return this.apiClient.getLogEntry({electionUniqueId:e,contentHash:t})}getElectionLogEntries(e){return this.apiClient.getElectionLogEntries(e)}processKeyCeremonyStep(e){return this.apiClient.processKeyCeremonyStep(e)}processTallyStep(e){return this.apiClient.processTallyStep(e)}waitForPendingMessageToBeProcessed(e,t=1e3){return new Promise((r=>{const n=setInterval((()=>{this.apiClient.getPendingMessageByMessageId({messageId:e}).then((e=>{"enqueued"!==e.status&&(clearInterval(n),r(e))}))}),t)}))}}const v="t",g=["a","b","v",v];class m{static parse(e){const[t,r]=e.split("+"),[n,i,a,o]=t.split(".",4),[s,u]=r.split(".",2),c=o?`.${o}`:"";if(!g.includes(s))throw new Error("Invalid message identifier format");return{electionId:`${n}.${i}`,type:a,subtype:o,typeSubtype:`${a}${c}`,author:{type:s,id:u}}}static format(e,t,r,n){return`${e}.${t}+${r}.${n}`}}class b{constructor({uniqueId:e,bulletinBoardClient:t,typesFilter:r,options:n}){this.uniqueId=e,this.bulletinBoardClient=t,this.logEntries=[],this.typesFilter=r,this.subscriptionId=null,this.options=n||{waitUntilNextCheck:2e3}}async subscribeToLogEntriesChanges(){this.unsubscribeToLogEntriesChanges(),await this.getLogEntries(),this.subscriptionId=setInterval((()=>{this.getLogEntries()}),this.options.waitUntilNextCheck)}unsubscribeToLogEntriesChanges(){null!==this.subscriptionId&&(clearInterval(this.subscriptionId),this.subscriptionId=null)}getLastMessageFromTrustee(e){for(let t=this.logEntries.length-1;t>=0;t--){const r=this.logEntries[t],n=m.parse(r.messageId);if(n.author.type===v&&n.author.id===e)return r}return null}getLogEntries(){const e=this.logEntries[this.logEntries.length-1],t=e&&e.id||null;return new Promise((e=>{this.bulletinBoardClient.getElectionLogEntries({electionUniqueId:this.uniqueId,after:t,types:this.typesFilter}).then((t=>{t.length&&(this.logEntries=[...this.logEntries,...t]),e()}))}))}}var E=r(655);function S(e){return"function"==typeof e}var C=!1,w={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack;C=e},get useDeprecatedSynchronousErrorHandling(){return C}};function T(e){setTimeout((function(){throw e}),0)}var A={closed:!0,next:function(e){},error:function(e){if(w.useDeprecatedSynchronousErrorHandling)throw e;T(e)},complete:function(){}},I=function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}();var k=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),_=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var r,n=this,i=n._parentOrParents,a=n._ctorUnsubscribe,o=n._unsubscribe,s=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof e)i.remove(this);else if(null!==i)for(var u=0;u<i.length;++u){i[u].remove(this)}if(S(o)){a&&(this._unsubscribe=void 0);try{o.call(this)}catch(e){t=e instanceof k?B(e.errors):[e]}}if(I(s)){u=-1;for(var c=s.length;++u<c;){var l=s[u];if(null!==(r=l)&&"object"==typeof r)try{l.unsubscribe()}catch(e){t=t||[],e instanceof k?t=t.concat(B(e.errors)):t.push(e)}}}if(t)throw new k(t)}},e.prototype.add=function(t){var r=t;if(!t)return e.EMPTY;switch(typeof t){case"function":r=new e(t);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof e)){var n=r;(r=new e)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var i=r._parentOrParents;if(null===i)r._parentOrParents=this;else if(i instanceof e){if(i===this)return r;r._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return r;i.push(this)}var a=this._subscriptions;return null===a?this._subscriptions=[r]:a.push(r),r},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function B(e){return e.reduce((function(e,t){return e.concat(t instanceof k?t.errors:t)}),[])}var N=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),O=function(e){function t(r,n,i){var a=e.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=A;break;case 1:if(!r){a.destination=A;break}if("object"==typeof r){r instanceof t?(a.syncErrorThrowable=r.syncErrorThrowable,a.destination=r,r.add(a)):(a.syncErrorThrowable=!0,a.destination=new R(a,r));break}default:a.syncErrorThrowable=!0,a.destination=new R(a,r,n,i)}return a}return E.ZT(t,e),t.prototype[N]=function(){return this},t.create=function(e,r,n){var i=new t(e,r,n);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(_),R=function(e){function t(t,r,n,i){var a,o=e.call(this)||this;o._parentSubscriber=t;var s=o;return S(r)?a=r:r&&(a=r.next,n=r.error,i=r.complete,r!==A&&(S((s=Object.create(r)).unsubscribe)&&o.add(s.unsubscribe.bind(s)),s.unsubscribe=o.unsubscribe.bind(o))),o._context=s,o._next=a,o._error=n,o._complete=i,o}return E.ZT(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;w.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=w.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):T(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;T(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};w.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),w.useDeprecatedSynchronousErrorHandling)throw e;T(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!w.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(t){return w.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(T(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(O);var x=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function P(e){return e}function F(e){return 0===e.length?P:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var D=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,i=function(e,t,r){if(e){if(e instanceof O)return e;if(e[N])return e[N]()}return e||t||r?new O(e,t,r):new O(A)}(e,t,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||w.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),w.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){w.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),!function(e){for(;e;){var t=e,r=t.closed,n=t.destination,i=t.isStopped;if(r||i)return!1;e=n&&n instanceof O?n:null}return!0}(e)?console.warn(t):e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=L(t))((function(t,n){var i;i=r.subscribe((function(t){try{e(t)}catch(e){n(e),i&&i.unsubscribe()}}),n,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[x]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:F(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=L(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function L(e){if(e||(e=w.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var U=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),j=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return E.ZT(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(_),V=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return E.ZT(t,e),t}(O),K=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return E.ZT(t,e),t.prototype[N]=function(){return new V(this)},t.prototype.lift=function(e){var t=new M(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new U;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),i=0;i<r;i++)n[i].next(e)},t.prototype.error=function(e){if(this.closed)throw new U;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),i=0;i<r;i++)n[i].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new U;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new U;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new U;return this.hasError?(e.error(this.thrownError),_.EMPTY):this.isStopped?(e.complete(),_.EMPTY):(this.observers.push(e),new j(this,e))},t.prototype.asObservable=function(){var e=new D;return e.source=this,e},t.create=function(e,t){return new M(e,t)},t}(D),M=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return E.ZT(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):_.EMPTY},t}(K);function q(){}var z=function(){function e(e,t,r){this.nextOrObserver=e,this.error=t,this.complete=r}return e.prototype.call=function(e,t){return t.subscribe(new H(e,this.nextOrObserver,this.error,this.complete))},e}(),H=function(e){function t(t,r,n,i){var a=e.call(this,t)||this;return a._tapNext=q,a._tapError=q,a._tapComplete=q,a._tapError=n||q,a._tapComplete=i||q,S(r)?(a._context=a,a._tapNext=r):r&&(a._context=r,a._tapNext=r.next||q,a._tapError=r.error||q,a._tapComplete=r.complete||q),a}return E.ZT(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},t}(O);const G="[Message] Received",Q="[Message] Processed";class W{constructor(){this.events=new K}subscribe(e){return this.events.pipe((t=e,function(e){return e.lift(new z(t,r,n))})).subscribe();var t,r,n}broadcastMessageReceived(e){this.events.next({type:G,message:e})}broadcastMessageProcessed(e,t){this.events.next({type:Q,message:e,result:t})}}var Y=r(1217);function Z(e,t){const r="string"==typeof e?JSON.parse(e):e,n="string"==typeof t?JSON.parse(t):t;if(r&&n){const{n:e,e:t,kty:i}=r,{n:a,e:o,kty:s}=n;return e===a&&t===o&&i===s}return!1}class J{constructor({authorityPublicKeyJSON:e}){this.authorityPublicKeyJSON=e,this.authorityPublicKey=Y.JWK.asKey(e,"json"),this.keys=null}async parse({messageId:e,signedData:t}){const r=m.parse(e),n=await(this.keys?this.keys[r.author.type][r.author.id]:this.authorityPublicKey);if(!t)return{messageIdentifier:r,decodedData:null};const i=await Y.JWS.createVerify(n).verify(t,{algorithms:["RS256"]}),a=JSON.parse(new TextDecoder("utf-8").decode(i.payload));return this.keys||(this.keys=await this.parseCreateElection(a)),{messageIdentifier:r,decodedData:a}}async parseCreateElection({authority:e,bulletin_board:t,trustees:r}){if(!Z(e.public_key,this.authorityPublicKeyJSON))throw new Error("The authority public key doesn't match the election's authority public key.");const n={a:{[e.name]:this.authorityPublicKey},b:{},[v]:{}},i=[];i.push(this.loadKey(t).then((e=>{n.b[t.name]=e})));for(const e of r)i.push(this.loadKey(e).then((t=>{n.t[e.name]=t})));return await Promise.all(i),n}loadKey(e){return Y.JWK.asKey(e.public_key,"json")}}class X{constructor({uniqueId:e,bulletinBoardClient:t,authorityPublicKeyJSON:r,identificationKeys:n,election:i,wrapperAdapter:a,options:o}){this.uniqueId=e,this.bulletinBoardClient=t,this.identificationKeys=n,this.election=i,this.options=o||{waitUntilNextCheck:100},this.wrapperAdapter=a,this.parser=new J({authorityPublicKeyJSON:r}),this.events=new W,this.nextLogEntryIndexToProcess=0,this.lastMessageProcessedWithResult=null,this.hasSetupKeyCeremony=!1}setup(){return this.election.subscribeToLogEntriesChanges()}tearDown(){this.election.unsubscribeToLogEntriesChanges()}async*setupKeyCeremony(){let e;for(;!e;)e=await this.waitForNextLogEntryResult();return yield await this.wrapperAdapter.backup(),await this.processKeyCeremonyStep(e),this.hasSetupKeyCeremony=!0,this.hasSetupKeyCeremony}async runKeyCeremony(){if(!this.hasSetupKeyCeremony)throw new Error("The key ceremony has not been setup yet");if(await this.needsToBeRestored())throw new Error("You need to restore the wrapper state to continue");return this.waitForNextLogEntryResult().then((async e=>(await this.processKeyCeremonyStep(e),await this.wrapperAdapter.isKeyCeremonyDone()?this.tearDown():this.runKeyCeremony())))}async runTally(){if(await this.needsToBeRestored())throw new Error("You need to restore the wrapper state to continue");return this.waitForNextLogEntryResult().then((async e=>(await this.processTallyStep(e),await this.wrapperAdapter.isTallyDone()?this.tearDown():this.runTally())))}async needsToBeRestored(){return this.election.getLastMessageFromTrustee(this.uniqueId)&&await this.wrapperAdapter.isFresh()}async restore(e){const t=this.election.getLastMessageFromTrustee(this.uniqueId);return this.hasSetupKeyCeremony=t&&await this.wrapperAdapter.restore(e),this.hasSetupKeyCeremony}async waitForNextLogEntryResult(){return await new Promise((e=>{const t=setInterval((async()=>{const{logEntries:r}=this.election;r.length>this.nextLogEntryIndexToProcess&&(clearInterval(t),e())}),this.options.waitUntilNextCheck)})),this.processNextLogEntry()}async processNextLogEntry(){const{logEntries:e}=this.election,t=e[this.nextLogEntryIndexToProcess];this.events.broadcastMessageReceived(t);const{messageIdentifier:r,decodedData:n}=await this.parser.parse(t),i=await this.wrapperAdapter.processMessage(r.typeSubtype,n);if(this.events.broadcastMessageProcessed(t,i),this.nextLogEntryIndexToProcess+=1,i){const{messageType:e,content:t}=i;return{message_id:m.format(this.election.uniqueId,e,v,this.uniqueId),content:t}}return i}async processKeyCeremonyStep(e){if(e&&!this.isMessageAlreadyLogged(e)){const t=await this.signMessage(e);return this.bulletinBoardClient.processKeyCeremonyStep({messageId:e.message_id,signedData:t})}}async processTallyStep(e){if(e&&!this.isMessageAlreadyLogged(e)){const t=await this.signMessage(e);return this.bulletinBoardClient.processTallyStep({messageId:e.message_id,signedData:t})}}isMessageAlreadyLogged({message_id:e}){const{logEntries:t}=this.election;return t.find((t=>t.messageId===e))}signMessage(e){return this.identificationKeys.sign({iat:Math.floor(new Date/1e3),...e})}}class ${constructor({bulletinBoardClient:e,authorityPublicKeyJSON:t,election:r,uniqueId:n,wrapperAdapter:i}){this.uniqueId=n,this.election=r,this.bulletinBoardClient=e,this.wrapperAdapter=i,this.parser=new J({authorityPublicKeyJSON:t})}setup(){return this.bulletinBoardClient.getElectionLogEntries({electionUniqueId:this.election.uniqueId,types:["create_election","end_key_ceremony"]}).then((async e=>{for(const t of e){const{messageIdentifier:e,decodedData:r}=await this.parser.parse(t);await this.wrapperAdapter.processMessage(e.typeSubtype,r)}}))}async encrypt(e){const{encryptedData:t,auditableData:r}=await this.wrapperAdapter.encrypt(e);return{encryptedData:t,encryptedDataHash:await this.hash(t),auditableData:r}}async hash(e){return window.crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e)).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}verifyVote(e){const{uniqueId:t}=this.election;return this.bulletinBoardClient.getLogEntry({electionUniqueId:t,contentHash:e})}}class ee{constructor(e,t){this.format="jwk",this.algorithm={name:"RSASSA-PKCS1-v1_5",modulusLength:4096,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},this.usages=["sign"],this.publicKeyAttrs=["alg","e","kty","n"],this.jwtHeader=this._encode64(JSON.stringify({alg:"RS256",typ:"JWT"})),this.trusteeUniqueId=e,this.privateKey=null,this.publicKey=null,this.storedPublicKey=JSON.parse(t||null),this.keyIdentifier=`${e}-private-key`,this.browserSupport=this._checkBrowserSupport(),this.textEncoder=new TextEncoder("utf-8"),this.dbName="identification_keys",this.dbVersion=1,this.presentPromise=this._read()}present(e){this.presentPromise.then((()=>{this._matchesStoredPublicKey(this.publicKey)?e(this.browserSupport&&null!==this.privateKey):this.reset().then(e(!1))}))}async generate(){return!(!this.browserSupport||this.storedPublicKey)&&new Promise(((e,t)=>{try{return this.crypto.subtle.generateKey(this.algorithm,!0,this.usages).then((t=>this.crypto.subtle.exportKey(this.format,t.privateKey).then((t=>{this.publicKey=this._publicKeyFromPrivateKey(t);const r=document.createElement("a");return r.setAttribute("href",`data:text/plain;charset=utf-8,${encodeURIComponent(JSON.stringify(t))}`),r.setAttribute("download",`${this.keyIdentifier}.jwk`),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),e()})).catch(this._handleErrors)))}catch(e){return t(e)}}))}async upload(e){return!(!this.browserSupport||null!==this.privateKey)&&new Promise(((t,r)=>{if(e)this.onUploadInputChange(e,t,r);else{const e=document.createElement("input");e.setAttribute("type","file"),e.setAttribute("accept",".jwk"),e.style.display="none",document.body.appendChild(e),e.addEventListener("change",(n=>{document.body.removeChild(e),this.onUploadInputChange(n,t,r)})),e.click()}}))}onUploadInputChange(e,t,r){const n=new FileReader;n.readAsText(e.target.files[0]),n.onload=e=>{let n="";try{n=JSON.parse(e.target.result)}catch(e){return r("invalid_format")}return this.crypto.subtle.importKey(this.format,n,this.algorithm,!1,this.usages).then((e=>{const i=this._publicKeyFromPrivateKey(n);this._matchesStoredPublicKey(i)?(this.publicKey=i,this.privateKey=e,this._save().then((()=>t(!0))).catch((()=>{r("could not be saved")}))):r("invalid_public_key")})).catch((()=>{r("invalid_key")}))}}reset(){return this.privateKey=this.publicKey=null,this._clear()}async sign(e){if(!this.browserSupport||null===this.privateKey)return!1;const t=`${this.jwtHeader}.${this._encode64(JSON.stringify(e))}`,r=await this.crypto.subtle.sign(this.algorithm,this.privateKey,this.textEncoder.encode(t));return`${t}.${btoa(Reflect.apply(String.fromCharCode,null,new Uint8Array(r))).replace(/[=]/g,"").replace(/\+/g,"-").replace(/\//g,"_")}`}_checkBrowserSupport(){return this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,this.crypto=window.crypto||window.msCrypto,window.indexedDB&&window.crypto}_handleErrors(e){throw e}_publicKeyFromPrivateKey(e){return Object.keys(e).filter((e=>this.publicKeyAttrs.includes(e))).reduce(((t,r)=>(t[r]=e[r],t)),{})}_matchesStoredPublicKey(e){return Z(e,this.storedPublicKey)}_encode64(e){return btoa(unescape(encodeURIComponent(e))).replace(/[=]/g,"").replace(/\+/g,"-").replace(/\//g,"_")}async _read(){return this._useDb("readonly",(e=>{e.get(this.keyIdentifier).onsuccess=e=>{e.target.result&&(this.privateKey=e.target.result.privateKey,this.publicKey=e.target.result.publicKey)}}))}async _save(){return this._useDb("readwrite",(e=>{e.add({privateKey:this.privateKey,publicKey:this.publicKey},this.keyIdentifier)}))}async _clear(){return this._useDb("readwrite",(e=>{e.delete(this.keyIdentifier)}))}async _useDb(e,t){return new Promise(((r,n)=>{let i=null;const a=this.indexedDB.open(this.dbName,this.dbVersion);a.onerror=e=>{i=null,n(e)},a.onupgradeneeded=()=>{i=a.result,i.createObjectStore("IdentificationKeys")},a.onsuccess=()=>{i=a.result;const n=i.transaction(["IdentificationKeys"],e);t(n.objectStore("IdentificationKeys")),n.oncomplete=()=>{i.close(),r()}}}))}}class te{constructor({bulletinBoardClientParams:e,authorityPublicKeyJSON:t,electionUniqueId:r,trusteeUniqueId:n,trusteeIdentificationKeys:i,trusteeWrapperAdapter:a}){const o=new y(e);this.election=new b({uniqueId:r,bulletinBoardClient:o,typesFilter:["create_election","start_key_ceremony","key_ceremony","end_key_ceremony"]}),this.trustee=new X({uniqueId:n,bulletinBoardClient:o,authorityPublicKeyJSON:t,identificationKeys:i,election:this.election,wrapperAdapter:a})}async bindEvents({onSetup:e,onEvent:t,onBindRestoreButton:r,onBindStartButton:n,onRestore:i,onComplete:a,onStart:o,onTrusteeNeedsToBeRestored:s,onBackupNeeded:u,onBindBackupButton:c,onBackupStarted:l}){this.trustee.events.subscribe(t),r((e=>{const t=e.target.files[0],r=new FileReader;r.onload=async({target:e})=>{const t=e.result;await this.trustee.restore(t)&&(i(),await this.trustee.runKeyCeremony(),a())},r.readAsText(t)})),n((async e=>{if(e.preventDefault(),o(),await this.trustee.needsToBeRestored())s();else{const e=this.trustee.setupKeyCeremony(),{value:t}=await e.next();u(),c(t,`${this.trustee.uniqueId}-election-${this.election.uniqueId}.bak`,(async()=>{l(),await e.next(),await this.trustee.runKeyCeremony(),a()}))}})),await this.trustee.setup(),e()}}class re{constructor({bulletinBoardClientParams:e,authorityPublicKeyJSON:t,electionUniqueId:r,trusteeUniqueId:n,trusteeIdentificationKeys:i,trusteeWrapperAdapter:a}){const o=new y(e);this.election=new b({uniqueId:r,bulletinBoardClient:o,typesFilter:["create_election","start_key_ceremony","key_ceremony","end_key_ceremony","start_tally","tally","end_tally"]}),this.trustee=new X({uniqueId:n,bulletinBoardClient:o,authorityPublicKeyJSON:t,identificationKeys:i,election:this.election,wrapperAdapter:a})}async bindEvents({onSetup:e,onEvent:t,onBindRestoreButton:r,onBindStartButton:n,onRestore:i,onComplete:a,onStart:o,onTrusteeNeedsToBeRestored:s}){this.trustee.events.subscribe(t),n((async e=>{e.preventDefault(),o(),await this.trustee.needsToBeRestored()?s():(await this.trustee.runTally(),a())})),r((e=>{const t=e.target.files[0],r=new FileReader;r.onload=async({target:e})=>{const t=e.result;await this.trustee.restore(t)&&(i(),await this.trustee.runTally(),a())},r.readAsText(t)})),await this.trustee.setup(),e()}}class ne{constructor({bulletinBoardClientParams:e,authorityPublicKeyJSON:t,electionUniqueId:r,voterUniqueId:n,voterWrapperAdapter:i}){this.bulletinBoardClient=new y(e);const a=new b({uniqueId:r,bulletinBoardClient:this.bulletinBoardClient});this.voter=new $({bulletinBoardClient:this.bulletinBoardClient,authorityPublicKeyJSON:t,election:a,uniqueId:n,wrapperAdapter:i})}async bindEvents({onSetup:e,onBindEncryptButton:t,onStart:r,onVoteEncryption:n,castOrAuditBallot:i,onBindAuditBallotButton:a,onBindCastBallotButton:o,onAuditBallot:s,onCastBallot:u,onAuditComplete:c,onCastComplete:l,onInvalid:f}){t((()=>{r(),n((e=>{this.voter.encrypt(e).then((e=>{i(e),a((()=>{s(e,`${this.voter.uniqueId}-election-${this.voter.election.uniqueId}.txt`),c()})),o((()=>{u(e),l()}))}))}),(()=>{f()}))})),await this.voter.setup(),e()}}},2634:function(e,t,r){"use strict";r.d(t,{h4:function(){return Be},ab:function(){return ce}});var n=function(){return Object.create(null)},i=Array.prototype,a=i.forEach,o=i.slice,s=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=n),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return a.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(o.call(e)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}();var u=null,c={},l=1,f="@wry/context:Slot",h=Array,p=h[f]||function(){var e=function(){function e(){this.id=["slot",l++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=u;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===c)break;return e!==u&&(u.slots[this.id]=t),!0}return u&&(u.slots[this.id]=c),!1},e.prototype.getValue=function(){if(this.hasValue())return u.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,a=((i={__proto__:null})[this.id]=e,i),o=u;u={parent:o,slots:a};try{return t.apply(n,r)}finally{u=o}},e.bind=function(e){var t=u;return function(){var r=u;try{return u=t,e.apply(this,arguments)}finally{u=r}}},e.noContext=function(e,t,r){if(!u)return e.apply(r,t);var n=u;try{return u=null,e.apply(r,t)}finally{u=n}},e}();try{Object.defineProperty(h,f,{value:h[f]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();p.bind,p.noContext;function d(){}var y=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=d),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getEntry(e);return t&&t.value},e.prototype.getEntry=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getEntry(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),v=new p;function g(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var m=[];function b(e,t){if(!e)throw new Error(t||"assertion failure")}function E(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var S=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!w(this))return this.value[0]},e.prototype.recompute=function(e){return b(!this.recomputing,"already recomputing"),function(e){var t=v.getValue();if(t)e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),w(e)?I(t,e):k(t,e)}(this),w(this)?function(e,t){B(e),v.withValue(e,C,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{g(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){if(e.dirty=!1,w(e))return;A(e)}(e);return E(e.value)}(this,e):E(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,T(this),B(this),g(this))},e.prototype.dispose=function(){var e=this;B(this),g(this),this.parents.forEach((function(t){t.setDirty(),N(t,e)}))},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=m.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(this.deps.forEach((function(t){return t.delete(e)})),this.deps.clear(),m.push(this.deps),this.deps=null)},e.count=0,e}();function C(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function w(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function T(e){e.parents.forEach((function(t){return I(t,e)}))}function A(e){e.parents.forEach((function(t){return k(t,e)}))}function I(e,t){if(b(e.childValues.has(t)),b(w(t)),e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=m.pop()||new Set;e.dirtyChildren.add(t),T(e)}function k(e,t){b(e.childValues.has(t)),b(!w(t));var r,n,i,a=e.childValues.get(t);0===a.length?e.childValues.set(t,t.value.slice(0)):(r=a,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),_(e,t),w(e)||A(e)}function _(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(m.length<100&&m.push(r),e.dirtyChildren=null))}function B(e){e.childValues.size>0&&e.childValues.forEach((function(t,r){N(e,r)})),e.forgetDeps(),b(null===e.dirtyChildren)}function N(e,t){t.parents.delete(e),e.childValues.delete(t),_(e,t)}function O(e){var t=new Map,r=e&&e.subscribe;function n(e){var n=v.getValue();if(n){var i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(g(i),i.unsubscribe=r(e))}}return n.dirty=function(e){var r=t.get(e);r&&(r.forEach((function(e){return e.setDirty()})),t.delete(e),g(r))},n}var R=new s("function"==typeof WeakMap);function x(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return R.lookupArray(e)}var P=new Set;function F(e,t){void 0===t&&(t=Object.create(null));var r=new y(t.max||Math.pow(2,16),(function(e){return e.dispose()})),n=t.keyArgs||function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e},i=t.makeCacheKey||x;function a(){var a=i.apply(null,n.apply(null,arguments));if(void 0===a)return e.apply(null,arguments);var o=r.get(a);o||(r.set(a,o=new S(e)),o.subscribe=t.subscribe);var s=o.recompute(Array.prototype.slice.call(arguments));return r.set(a,o),P.add(r),v.hasValue()||(P.forEach((function(e){return e.clean()})),P.clear()),s}function o(){var e=i.apply(null,arguments);if(void 0!==e)return r.get(e)}return a.dirty=function(){var e=o.apply(null,arguments);e&&e.setDirty()},a.peek=function(){var e=o.apply(null,arguments);if(e)return e.peek()},a.forget=function(){var e=i.apply(null,arguments);return void 0!==e&&r.delete(e)},a}var D,L=r(496),U=function(){function e(){this.getFragmentDoc=F(L.Yk)}return e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read({rootId:e.id||"ROOT_QUERY",query:e.query,variables:e.variables,returnPartialData:e.returnPartialData,optimistic:t})},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read({query:this.getFragmentDoc(e.fragment,e.fragmentName),variables:e.variables,rootId:e.id,returnPartialData:e.returnPartialData,optimistic:t})},e.prototype.writeQuery=function(e){return this.write({dataId:e.id||"ROOT_QUERY",result:e.data,query:e.query,variables:e.variables,broadcast:e.broadcast})},e.prototype.writeFragment=function(e){return this.write({dataId:e.id,result:e.data,variables:e.variables,query:this.getFragmentDoc(e.fragment,e.fragmentName),broadcast:e.broadcast})},e}();D||(D={});var j=function(e,t,r,n,i){this.message=e,this.path=t,this.query=r,this.clientOnly=n,this.variables=i},V=r(655),K=r(2924),M=r(2152),q=Object.prototype.hasOwnProperty;var z=/^[_a-z][_0-9a-z]*/i;function H(e){var t=e.match(z);return t?t[0]:e}function G(e,t,r){return!(!t||"object"!=typeof t)&&(Array.isArray(t)?t.every((function(t){return G(e,t,r)})):e.selections.every((function(e){if((0,L.My)(e)&&(0,L.LZ)(e,r)){var n=(0,L.u2)(e);return q.call(t,n)&&(!e.selectionSet||G(e.selectionSet,t[n],r))}return!0})))}function Q(e){return null!==e&&"object"==typeof e&&!(0,L.hh)(e)&&!Array.isArray(e)}var W=Object.create(null),Y=function(){return W},Z=Object.create(null),J=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return(0,L.Jv)((0,L.hh)(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return(0,L.hh)(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return(0,L.kQ)(e);if((0,L.hh)(e))return e;var n=r.policies.identify(e)[0];if(n){var i=(0,L.kQ)(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,V.pi)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),q.call(this.data,e)){var r=this.data[e];if(r&&q.call(r,t))return r[t]}return"__typename"===t&&q.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof ee?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),q.call(this.data,e)?this.data[e]:this instanceof ee?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r=this,n=this.lookup(e),i=new L.w0(te).merge(n,t);if(this.data[e]=i,i!==n&&(delete this.refs[e],this.group.caching)){var a=Object.create(null);n||(a.__exists=1),Object.keys(t).forEach((function(e){if(!n||n[e]!==i[e]){a[e]=1;var t=H(e);t===e||r.policies.hasKeyArgs(i.__typename,t)||(a[t]=1),void 0!==i[e]||r instanceof ee||delete i[e]}})),Object.keys(a).forEach((function(t){return r.group.dirty(e,t)}))}},e.prototype.modify=function(e,t){var r=this,n=this.lookup(e);if(n){var i=Object.create(null),a=!1,o=!0,s={DELETE:W,INVALIDATE:Z,isReference:L.hh,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||(0,L.kQ)(e)}:t,{store:r})}};if(Object.keys(n).forEach((function(u){var c=H(u),l=n[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var h=f===Y?W:f((0,L.Jv)(l),(0,V.pi)((0,V.pi)({},s),{fieldName:c,storeFieldName:u,storage:r.getStorage(e,u)}));h===Z?r.group.dirty(e,u):(h===W&&(h=void 0),h!==l&&(i[u]=h,a=!0,l=h))}void 0!==l&&(o=!1)}})),a)return this.merge(e,i),o&&(this instanceof ee?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,r){var n,i=this.lookup(e);if(i){var a=this.getFieldValue(i,"__typename"),o=t&&r?this.policies.getStoreFieldName({typename:a,fieldName:t,args:r}):t;return this.modify(e,o?((n={})[o]=Y,n):Y)}return!1},e.prototype.evict=function(e){var t=!1;return e.id&&(q.call(this.data,e.id)&&(t=this.delete(e.id,e.fieldName,e.args)),this instanceof ee&&(t=this.parent.evict(e)||t),(e.fieldName||t)&&this.group.dirty(e.id,e.fieldName||"__exists")),t},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),r=[];return this.getRootIdSet().forEach((function(t){q.call(e.policies.rootTypenamesById,t)||r.push(t)})),r.length&&(t.__META={extraRootIds:r.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(r){e&&q.call(e,r)||t.delete(r)})),e){var r=e.__META,n=(0,V._T)(e,["__META"]);Object.keys(n).forEach((function(e){t.merge(e,n[e])})),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof ee?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach((function(n){q.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])}));var n=Object.keys(r);if(n.length){for(var i=this;i instanceof ee;)i=i.parent;n.forEach((function(e){return i.delete(e)}))}return n},e.prototype.findChildRefIds=function(e){if(!q.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=new Set([this.data[e]]),n=function(e){return null!==e&&"object"==typeof e};r.forEach((function(e){(0,L.hh)(e)?t[e.__ref]=!0:n(e)&&Object.values(e).filter(n).forEach(r.add,r)}))}return this.refs[e]},e.prototype.makeCacheKey=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.group.keyMaker.lookupArray(e)},e}(),X=function(){function e(e){this.caching=e,this.d=null,this.keyMaker=new s(L.mr),this.d=e?O():null}return e.prototype.depend=function(e,t){if(this.d){this.d($(e,t));var r=H(t);r!==t&&this.d($(e,r))}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty($(e,t))},e}();function $(e,t){return t+"#"+e}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,a=t.seed,o=e.call(this,r,new X(i))||this;return o.storageTrie=new s(L.mr),o.sharedLayerGroup=new X(i),a&&o.replace(a),o}return(0,V.ZT)(t,e),t.prototype.addLayer=function(e,t){return new ee(e,this,t,this.sharedLayerGroup)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(J||(J={}));var ee=function(e){function t(t,r,n,i){var a=e.call(this,r.policies,i)||this;return a.id=t,a.parent=r,a.replay=n,a.group=i,n(a),a}return(0,V.ZT)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){t.data[e]!==r.lookup(e)&&t.delete(e)})),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,V.pi)((0,V.pi)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return q.call(this.data,t)?(0,V.pi)((0,V.pi)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(J);function te(e,t,r){var n=e[r],i=t[r];return(0,M.D)(n,i)?n:i}function re(e){return!!(e instanceof J&&e.group.caching)}function ne(e,t){return new j(e.message,t.path.slice(),t.query,t.clientOnly,t.variables)}var ie=function(){function e(e){var t=this;this.config=e,this.executeSelectionSet=F((function(e){return t.execSelectionSetImpl(e)}),{keyArgs:function(e){return[e.selectionSet,e.objectOrReference,e.context]},makeCacheKey:function(e,t,r){if(re(r.store))return r.store.makeCacheKey(e,(0,L.hh)(t)?t.__ref:t,r.varString)}}),this.knownResults=new WeakMap,this.executeSubSelectedArray=F((function(e){return t.execSubSelectedArrayImpl(e)}),{makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(re(n.store))return n.store.makeCacheKey(t,r,n.varString)}}),this.config=(0,V.pi)({addTypename:!0},e)}return e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,n=e.rootId,i=void 0===n?"ROOT_QUERY":n,a=e.variables,o=e.returnPartialData,s=void 0===o||o,u=this.config.cache.policies;a=(0,V.pi)((0,V.pi)({},(0,L.O4)((0,L.iW)(r))),a);var c=this.executeSelectionSet({selectionSet:(0,L.p$)(r).selectionSet,objectOrReference:(0,L.kQ)(i),context:{store:t,query:r,policies:u,variables:a,varString:JSON.stringify(a),fragmentMap:(0,L.F)((0,L.kU)(r)),path:[],clientOnly:!1}}),l=c.missing&&c.missing.length>0;if(l&&!s)throw c.missing[0];return{result:c.result,missing:c.missing,complete:!l}},e.prototype.isFresh=function(e,t,r,n){if(re(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n);if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,r=e.selectionSet,n=e.objectOrReference,i=e.context;if((0,L.hh)(n)&&!i.policies.rootTypenamesById[n.__ref]&&!i.store.has(n.__ref))return{result:{},missing:[ne(new K.ej(4),i)]};var a=i.variables,o=i.policies,s=i.store,u=[],c={result:null},l=s.getFieldValue(n,"__typename");function f(){return c.missing||(c.missing=[])}function h(e){var t;return e.missing&&(t=f()).push.apply(t,e.missing),e.result}this.config.addTypename&&"string"==typeof l&&!o.rootIdsByTypename[l]&&u.push({__typename:l});var p=new Set(r.selections);return p.forEach((function(e){var r;if((0,L.LZ)(e,a))if((0,L.My)(e)){var s=o.readField({fieldName:e.name.value,field:e,variables:i.variables,from:n},i),c=(0,L.u2)(e);i.path.push(c);var d=i.clientOnly;i.clientOnly=d||!(!e.directives||!e.directives.some((function(e){return"client"===e.name.value}))),void 0===s?L.Gw.added(e)||f().push(ne(new K.ej(5),i)):Array.isArray(s)?s=h(t.executeSubSelectedArray({field:e,array:s,context:i})):e.selectionSet&&null!=s&&(s=h(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:s,context:i}))),void 0!==s&&u.push(((r={})[c]=s,r)),i.clientOnly=d,(0,K.kG)(i.path.pop()===c)}else{var y=(0,L.hi)(e,i.fragmentMap);y&&o.fragmentMatches(y,l)&&y.selectionSet.selections.forEach(p.add,p)}})),c.result=(0,L.bw)(u),this.knownResults.set(c.result,r),c},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,a=e.context;function o(e,r){return e.missing&&(t=t||[]).push.apply(t,e.missing),(0,K.kG)(a.path.pop()===r),e.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),{result:i=i.map((function(e,t){return null===e?null:(a.path.push(t),Array.isArray(e)?o(r.executeSubSelectedArray({field:n,array:e,context:a}),t):n.selectionSet?o(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,context:a}),t):((0,K.kG)(a.path.pop()===t),e))})),missing:t}},e}();var ae=function(){function e(e,t){this.cache=e,this.reader=t}return e.prototype.writeToStore=function(e){var t=e.query,r=e.result,n=e.dataId,i=e.store,a=e.variables,o=(0,L.$H)(t),s=new L.w0;a=(0,V.pi)((0,V.pi)({},(0,L.O4)(o)),a);var u=this.processSelectionSet({result:r||Object.create(null),dataId:n,selectionSet:o.selectionSet,mergeTree:{map:new Map},context:{store:i,written:Object.create(null),merge:function(e,t){return s.merge(e,t)},variables:a,varString:JSON.stringify(a),fragmentMap:(0,L.F)((0,L.kU)(t))}});if(!(0,L.hh)(u))throw new K.ej(7);return i.retain(u.__ref),u},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,n=e.result,i=e.selectionSet,a=e.context,o=e.mergeTree,s=this.cache.policies,u=s.identify(n,i,a.fragmentMap),c=u[0],l=u[1];if("string"==typeof(r=r||c)){var f=a.written[r]||(a.written[r]=[]),h=(0,L.kQ)(r);if(f.indexOf(i)>=0)return h;if(f.push(i),this.reader&&this.reader.isFresh(n,h,i,a))return h}var p=Object.create(null);l&&(p=a.merge(p,l));var d=r&&s.rootTypenamesById[r]||(0,L.qw)(n,i,a.fragmentMap)||r&&a.store.get(r,"__typename");"string"==typeof d&&(p.__typename=d);var y=new Set(i.selections);if(y.forEach((function(e){var r;if((0,L.LZ)(e,a.variables))if((0,L.My)(e)){var i=(0,L.u2)(e),u=n[i];if(void 0!==u){var c=s.getStoreFieldName({typename:d,fieldName:e.name.value,field:e,variables:a.variables}),l=se(o,c),f=t.processFieldValue(u,e,a,l),h=e.selectionSet&&a.store.getFieldValue(f,"__typename")||void 0,v=s.getMergeFunction(d,e.name.value,h);v?l.info={field:e,typename:d,merge:v}:ue(o,c),p=a.merge(p,((r={})[c]=f,r))}else if(s.usingPossibleTypes&&!(0,L.FS)(["defer","client"],e))throw new K.ej(8)}else{var g=(0,L.hi)(e,a.fragmentMap);g&&s.fragmentMatches(g,d,n,a.variables)&&g.selectionSet.selections.forEach(y.add,y)}})),"string"==typeof r){var v=(0,L.kQ)(r);return o.map.size&&(p=this.applyMerges(o,v,p,a)),a.store.merge(r,p),v}return p},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?Array.isArray(e)?e.map((function(e,a){var o=i.processFieldValue(e,t,r,se(n,a));return ue(n,a),o})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):e},e.prototype.applyMerges=function(e,t,r,n,i){var a,o=this;if(e.map.size&&!(0,L.hh)(r)){var s,u=Array.isArray(r)||!(0,L.hh)(t)&&!Q(t)?void 0:t,c=r;u&&!i&&(i=[(0,L.hh)(u)?u.__ref:u]);var l=function(e,t){return Array.isArray(e)?"number"==typeof t?e[t]:void 0:n.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){i&&i.push(t);var r=l(u,t),a=l(c,t),f=o.applyMerges(e,r,a,n,i);f!==a&&(s=s||new Map).set(t,f),i&&(0,K.kG)(i.pop()===t)})),s&&(r=Array.isArray(c)?c.slice(0):(0,V.pi)({},c),s.forEach((function(e,t){r[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,n,i&&(a=n.store).getStorage.apply(a,i)):r},e}(),oe=[];function se(e,t){var r=e.map;return r.has(t)||r.set(t,oe.pop()||{map:new Map}),r.get(t)}function ue(e,t){var r=e.map,n=r.get(t);!n||n.info||n.map.size||(oe.push(n),r.delete(t))}new Set;var ce=new p;function le(e,t){if(e.size){var r=[];e.forEach((function(e){return r.push(e)})),e.clear(),r.forEach(t)}}var fe=new WeakMap;function he(e){var t=fe.get(e);return t||fe.set(e,t={vars:new Set,dep:O()}),t}function pe(e){var t=new Set,r=new Set,n=function(a){if(arguments.length>0)e!==a&&(e=a,t.forEach((function(e){he(e).dep.dirty(n),de(e)})),le(r,(function(t){return t(e)})));else{var o=ce.getValue();o&&(i(o),he(o).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){return t.add(e),he(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}function de(e){e.broadcastWatches&&e.broadcastWatches()}function ye(e){return void 0!==e.args?e.args:e.field?(0,L.NC)(e.field,e.variables):null}var ve=function(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=void 0!==n?{id:n}:void 0!==i?{_id:i}:void 0),void 0===n&&(n=i),void 0!==n))return r+":"+("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))},ge=function(){},me=function(e,t){return t.fieldName},be=function(e,t,r){return(0,r.mergeObjects)(e,t)},Ee=function(e,t){return t},Se=function(){function e(e){this.config=e,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,V.pi)({dataIdFromObject:ve},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t,r){var n=t&&r?(0,L.qw)(e,t,r):e.__typename;if(n===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var i,a={typename:n,selectionSet:t,fragmentMap:r},o=n&&this.getTypePolicy(n),s=o&&o.keyFn||this.config.dataIdFromObject;s;){var u=s(e,a);if(!Array.isArray(u)){i=u;break}s=Ae(u)}return i=i&&String(i),a.keyObject?[i,a.keyObject]:[i]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(r){var n=e[r],i=n.queryType,a=n.mutationType,o=n.subscriptionType,s=(0,V._T)(n,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",r),a&&t.setRootTypename("Mutation",r),o&&t.setRootTypename("Subscription",r),q.call(t.toBeAdded,r)?t.toBeAdded[r].push(s):t.toBeAdded[r]=[s]}))},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,a=t.fields;function o(e,t){e.merge="function"==typeof t?t:!0===t?be:!1===t?Ee:e.merge}o(n,t.merge),n.keyFn=!1===i?ge:Array.isArray(i)?Ae(i):"function"==typeof i?i:n.keyFn,a&&Object.keys(a).forEach((function(t){var n=r.getFieldPolicy(e,t,!0),i=a[t];if("function"==typeof i)n.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;n.keyFn=!1===s?me:Array.isArray(s)?Te(s):"function"==typeof s?s:n.keyFn,"function"==typeof u&&(n.read=u),o(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||me)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&((0,K.kG)(!n||n===e,1),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(r){t.getSupertypeSet(r,!0),e[r].forEach((function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match(z);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!q.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var n=this.supertypeMap.get(e);n&&n.size&&n.forEach((function(e){var n=t.getTypePolicy(e),i=n.fields,a=(0,V._T)(n,["fields"]);Object.assign(r,a),Object.assign(r.fields,i)}))}var i=this.toBeAdded[e];return i&&i.length&&this.updateTypePolicy(e,L.oA.apply(void 0,i.splice(0))),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var a=e.typeCondition.name.value;if(t===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var o=this.getSupertypeSet(t,!0),s=[o],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},c=!(!r||!this.fuzzySubtypes.size),l=0;l<s.length;++l){var f=s[l];if(f.has(a))return o.has(a)||o.add(a),!0;f.forEach(u),c&&l===s.length-1&&G(e.selectionSet,r,n)&&(c=!1,!0,this.fuzzySubtypes.forEach((function(e,r){var n=t.match(e);n&&n[0]===t&&u(r)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var r=this.getFieldPolicy(e,t,!1);return!(!r||!r.keyFn)},e.prototype.getStoreFieldName=function(e){var t,r=e.typename,n=e.fieldName,i=this.getFieldPolicy(r,n,!1),a=i&&i.keyFn;if(a&&r)for(var o={typename:r,fieldName:n,field:e.field||null,variables:e.variables},s=ye(e);a;){var u=a(s,o);if(!Array.isArray(u)){t=u||n;break}a=Te(u)}return void 0===t&&(t=e.field?(0,L.vf)(e.field,e.variables):(0,L.PT)(n,ye(e))),n===H(t)?t:n+":"+t},e.prototype.readField=function(e,t){var r=e.from;if(r&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}var i=this.getStoreFieldName(e),a=H(i),o=t.store.getFieldValue(r,i),s=this.getFieldPolicy(e.typename,a,!1),u=s&&s.read;if(u){var c=Ce(this,r,e,t,t.store.getStorage((0,L.hh)(r)?r.__ref:r,i));return ce.withValue(this.cache,u,[o,c])}return o}},e.prototype.getMergeFunction=function(e,t,r){var n=this.getFieldPolicy(e,t,!1),i=n&&n.merge;return!i&&r&&(i=(n=this.getTypePolicy(r))&&n.merge),i},e.prototype.runMergeFunction=function(e,t,r,n,i){var a=r.field,o=r.typename,s=r.merge;return s===be?we(n.store.getFieldValue)(e,t):s===Ee?t:s(e,t,Ce(this,void 0,{typename:o,fieldName:a.name.value,field:a,variables:n.variables},n,i||Object.create(null)))},e}();function Ce(e,t,r,n,i){var a=e.getStoreFieldName(r),o=H(a),s=r.variables||n.variables,u=n.store,c=u.getFieldValue,l=u.toReference,f=u.canRead;return{args:ye(r),field:r.field||null,fieldName:o,storeFieldName:a,variables:s,isReference:L.hh,toReference:l,storage:i,cache:e.cache,canRead:f,readField:function(r,i){var a="string"==typeof r?{fieldName:r,from:i}:(0,V.pi)({},r);return void 0===a.from&&(a.from=t),void 0===a.variables&&(a.variables=s),e.readField(a,n)},mergeObjects:we(c)}}function we(e){return function(t,r){if(Array.isArray(t)||Array.isArray(r))throw new K.ej(2);if(t&&"object"==typeof t&&r&&"object"==typeof r){var n=e(t,"__typename"),i=e(r,"__typename");return!(n&&i&&n!==i)&&Q(t)&&Q(r)?(0,V.pi)((0,V.pi)({},t),r):r}return r}}function Te(e){return function(t,r){return t?r.fieldName+":"+JSON.stringify(ke(t,e,!1)):r.fieldName}}function Ae(e){var t=new s(L.mr);return function(r,n){var i;if(n.selectionSet&&n.fragmentMap){var a=t.lookupArray([n.selectionSet,n.fragmentMap]);i=a.aliasMap||(a.aliasMap=Ie(n.selectionSet,n.fragmentMap))}var o=n.keyObject=ke(r,e,!0,i);return n.typename+":"+JSON.stringify(o)}}function Ie(e,t){var r=Object.create(null),n=new Set([e]);return n.forEach((function(e){e.selections.forEach((function(e){if((0,L.My)(e)){if(e.alias){var i=e.alias.value,a=e.name.value;if(a!==i)(r.aliases||(r.aliases=Object.create(null)))[a]=i}if(e.selectionSet)(r.subsets||(r.subsets=Object.create(null)))[e.name.value]=Ie(e.selectionSet,t)}else{var o=(0,L.hi)(e,t);o&&n.add(o.selectionSet)}}))})),r}function ke(e,t,r,n){var i,a=Object.create(null);return t.forEach((function(t){if(Array.isArray(t)){if("string"==typeof i){var o=n&&n.subsets,s=o&&o[i];a[i]=ke(e[i],t,r,s)}}else{var u=n&&n.aliases,c=u&&u[t]||t;q.call(e,c)?a[i=t]=e[c]:((0,K.kG)(!r,3),i=void 0)}})),a}var _e={dataIdFromObject:ve,addTypename:!0,resultCaching:!0,typePolicies:{}},Be=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.typenameDocumentCache=new Map,r.makeVar=pe,r.txCount=0,r.maybeBroadcastWatch=F((function(e,t){return r.broadcastWatch.call(r,e,!!t)}),{makeCacheKey:function(e){var t=e.optimistic?r.optimisticData:r.data;if(re(t)){var n=e.optimistic,i=e.rootId,a=e.variables;return t.makeCacheKey(e.query,e.callback,JSON.stringify({optimistic:n,rootId:i,variables:a}))}}}),r.watchDep=O(),r.config=(0,V.pi)((0,V.pi)({},_e),t),r.addTypename=!!r.config.addTypename,r.policies=new Se({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.data=new J.Root({policies:r.policies,resultCaching:r.config.resultCaching}),r.optimisticData=r.data,r.storeWriter=new ae(r,r.storeReader=new ie({cache:r,addTypename:r.addTypename})),r}return(0,V.ZT)(t,e),t.prototype.restore=function(e){return e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,query:e.query,variables:e.variables,rootId:e.rootId,config:this.config,returnPartialData:r}).result||null}catch(e){if(e instanceof j)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore({store:this.data,query:e.query,result:e.result,dataId:e.dataId,variables:e.variables})}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(q.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",query:e.query,variables:e.variables,returnPartialData:e.returnPartialData,config:this.config})},t.prototype.watch=function(e){var t,r=this;return this.watches.size||he(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){r.watches.delete(e)&&!r.watches.size&&function(e){he(e).vars.forEach((function(t){return t.forgetCache(e)}))}(r),r.watchDep.dirty(e),r.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(){return this.optimisticData.gc()},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){return(0,L.hh)(e)?e.__ref:this.policies.identify(e)[0]},t.prototype.evict=function(e){if(!e.id){if(q.call(e,"id"))return!1;e=(0,V.pi)((0,V.pi)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(){return this.data.clear(),this.optimisticData=this.data,this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.performTransaction=function(e,t){var r=this,n=function(t){var n=r,i=n.data,a=n.optimisticData;++r.txCount,t&&(r.data=r.optimisticData=t);try{e(r)}finally{--r.txCount,r.data=i,r.optimisticData=a}},i=!1;"string"==typeof t?(this.optimisticData=this.optimisticData.addLayer(t,n),i=!0):null===t?n(this.data):n(),this.broadcastWatches(i)},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=(0,L.Gw)(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(r){return t.maybeBroadcastWatch(r,e)}))},t.prototype.broadcastWatch=function(e,t){this.watchDep.dirty(e),this.watchDep(e);var r=this.diff({query:e.query,variables:e.variables,optimistic:e.optimistic});e.optimistic&&t&&(r.fromOptimisticTransaction=!0),e.callback(r)},t}(U)},5367:function(){},5765:function(e,t,r){"use strict";r.d(t,{f:function(){return w}});var n=r(655),i=r(2924),a=r(1707),o=r(496),s=r(9950),u=r(2152),c=r(1498),l=r(6282),f=r(5942),h=r(7636),p=r(2634),d=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=(0,o.Ee)(t.resolvers,e)})):this.resolvers=(0,o.Ee)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,i=e.context,a=e.variables,o=e.onlyRunForcedResolvers,s=void 0!==o&&o;return(0,n.mG)(this,void 0,void 0,(function(){return(0,n.Jh)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,i,a,this.fragmentMatcher,s).then((function(e){return(0,n.pi)((0,n.pi)({},r),{data:e.result})}))]:[2,r]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return(0,o.FS)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return(0,o.ob)(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.pi)((0,n.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,n.mG)(this,void 0,void 0,(function(){return(0,n.Jh)(this,(function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return(0,n.pi)((0,n.pi)({},t),e.exportedVariables)}))]:[2,(0,n.pi)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,h.Vn)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return h.$_}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,o.aL)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,i,a,s){return void 0===r&&(r={}),void 0===i&&(i={}),void 0===a&&(a=function(){return!0}),void 0===s&&(s=!1),(0,n.mG)(this,void 0,void 0,(function(){var u,c,l,f,h,p,d,y,v;return(0,n.Jh)(this,(function(g){return u=(0,o.p$)(e),c=(0,o.kU)(e),l=(0,o.F)(c),f=u.operation,h=f?f.charAt(0).toUpperCase()+f.slice(1):"Query",d=(p=this).cache,y=p.client,v={fragmentMap:l,context:(0,n.pi)((0,n.pi)({},r),{cache:d,client:y}),variables:i,fragmentMatcher:a,defaultOperationType:h,exportedVariables:{},onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(u.selectionSet,t,v).then((function(e){return{result:e,exportedVariables:v.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r){return(0,n.mG)(this,void 0,void 0,(function(){var a,s,u,c,l,f=this;return(0,n.Jh)(this,(function(h){return a=r.fragmentMap,s=r.context,u=r.variables,c=[t],l=function(e){return(0,n.mG)(f,void 0,void 0,(function(){var l,f;return(0,n.Jh)(this,(function(n){return(0,o.LZ)(e,u)?(0,o.My)(e)?[2,this.resolveField(e,t,r).then((function(t){var r;void 0!==t&&c.push(((r={})[(0,o.u2)(e)]=t,r))}))]:((0,o.Ao)(e)?l=e:(l=a[e.name.value],(0,i.kG)(l,11)),l&&l.typeCondition&&(f=l.typeCondition.name.value,r.fragmentMatcher(t,f,s))?[2,this.resolveSelectionSet(l.selectionSet,t,r).then((function(e){c.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(l)).then((function(){return(0,o.bw)(c)}))]}))}))},e.prototype.resolveField=function(e,t,r){return(0,n.mG)(this,void 0,void 0,(function(){var i,a,s,u,c,l,f,h,d,y=this;return(0,n.Jh)(this,(function(n){return i=r.variables,a=e.name.value,s=(0,o.u2)(e),u=a!==s,c=t[s]||t[a],l=Promise.resolve(c),r.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(f=t.__typename||r.defaultOperationType,(h=this.resolvers&&this.resolvers[f])&&(d=h[u?a:s])&&(l=Promise.resolve(p.ab.withValue(this.cache,d,[t,(0,o.NC)(e,i),r.context,{field:e,fragmentMap:r.fragmentMap}])))),[2,l.then((function(t){return void 0===t&&(t=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(r.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?y.resolveSubSelectedArray(e,t,r):e.selectionSet?y.resolveSelectionSet(e.selectionSet,t,r):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,r){var n=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?n.resolveSubSelectedArray(e,t,r):e.selectionSet?n.resolveSelectionSet(e.selectionSet,t,r):void 0})))},e}(),y=new(o.mr?WeakMap:Map);function v(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return y.set(e,(y.get(e)+1)%1e15),r.apply(this,arguments)})}function g(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var m=function(){function e(e){this.cache=e,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,y.has(e)||(y.set(e,0),v(e,"evict"),v(e,"modify"),v(e,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||f.I.loading;return this.variables&&this.networkStatus!==f.I.loading&&!(0,u.D)(this.variables,e.variables)&&(t=f.I.setVariables),(0,u.D)(e.variables,this.variables)||(this.diff=null),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.getDiff=function(e){return void 0===e&&(e=this.variables),this.diff&&(0,u.D)(e,this.variables)?this.diff:(this.updateWatch(this.variables=e),this.diff=this.cache.diff({query:this.document,variables:e,returnPartialData:!0,optimistic:!0}))},e.prototype.setDiff=function(e){var t=this,r=this.diff;this.diff=e,this.dirty||(e&&e.result)===(r&&r.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e.reobserve()})):delete this.oqListener)},e.prototype.notify=function(){var e=this;g(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,f.O)(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.cancel(),delete this.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var e=this.observableQuery;e&&e.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;r&&"no-cache"===r.options.fetchPolicy||this.lastWatch&&this.lastWatch.query===this.document&&(0,u.D)(e,this.lastWatch.variables)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch={query:this.document,variables:e,optimistic:!0,callback:function(e){return t.setDiff(e)}}))},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===y.get(this.cache)&&(0,u.D)(t,r.variables)&&(0,u.D)(e.data,r.result.data))},e.prototype.markResult=function(e,t,r){var n=this;this.graphQLErrors=(0,o.Of)(e.errors)?e.errors:[],g(this),"no-cache"===t.fetchPolicy?this.diff={result:e.data,complete:!0}:!this.stopped&&r&&(b(e,t.errorPolicy)?this.cache.performTransaction((function(r){if(n.shouldWrite(e,t.variables))r.writeQuery({query:n.document,data:e.data,variables:t.variables}),n.lastWrite={result:e,variables:t.variables,dmCount:y.get(n.cache)};else if(n.diff&&n.diff.complete)return void(e.data=n.diff.result);var i=r.diff({query:n.document,variables:t.variables,returnPartialData:!0,optimistic:!0});n.stopped||n.updateWatch(t.variables),n.diff=i,i.complete&&(e.data=i.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=f.I.ready},e.prototype.markError=function(e){return this.networkStatus=f.I.error,this.lastWrite=void 0,g(this),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function b(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!(0,o.d2)(e);return!n&&r&&e.data&&(n=!0),n}var E=Object.prototype.hasOwnProperty,S=function(){function e(e){var t=e.cache,r=e.link,n=e.queryDeduplication,i=void 0!==n&&n,a=e.onBroadcast,s=e.ssrMode,u=void 0!==s&&s,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,h=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(o.mr?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.queryDeduplication=i,this.clientAwareness=l,this.localState=f||new d({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!h,(this.onBroadcast=a)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches(new i.ej(12))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t=e.mutation,r=e.variables,a=e.optimisticResponse,s=e.updateQueries,u=e.refetchQueries,l=void 0===u?[]:u,f=e.awaitRefetchQueries,h=void 0!==f&&f,p=e.update,d=e.errorPolicy,y=void 0===d?"none":d,v=e.fetchPolicy,g=e.context,m=void 0===g?{}:g;return(0,n.mG)(this,void 0,void 0,(function(){var e,u,f;return(0,n.Jh)(this,(function(d){switch(d.label){case 0:return(0,i.kG)(t,13),(0,i.kG)(!v||"no-cache"===v,14),e=this.generateMutationId(),t=this.transform(t).document,r=this.getVariables(t,r),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,r,m)]:[3,2];case 1:r=d.sent(),d.label=2;case 2:return u=this.mutationStore&&(this.mutationStore[e]={mutation:t,variables:r,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:e,document:t,variables:r,errorPolicy:y,updateQueries:s,update:p}),this.broadcastQueries(),f=this,[2,new Promise((function(i,d){var g,b;f.getObservableFromLink(t,(0,n.pi)((0,n.pi)({},m),{optimisticResponse:a}),r,!1).subscribe({next:function(n){if((0,o.d2)(n)&&"none"===y)b=new c.c({graphQLErrors:n.errors});else{if(u&&(u.loading=!1,u.error=null),"no-cache"!==v)try{f.markMutationResult({mutationId:e,result:n,document:t,variables:r,errorPolicy:y,updateQueries:s,update:p})}catch(e){return void(b=new c.c({networkError:e}))}g=n}},error:function(t){u&&(u.loading=!1,u.error=t),a&&f.cache.removeOptimistic(e),f.broadcastQueries(),d(new c.c({networkError:t}))},complete:function(){if(b&&u&&(u.loading=!1,u.error=b),a&&f.cache.removeOptimistic(e),f.broadcastQueries(),b)d(b);else{"function"==typeof l&&(l=l(g));var t=[];(0,o.Of)(l)&&l.forEach((function(e){if("string"==typeof e)f.queries.forEach((function(r){var n=r.observableQuery;n&&n.queryName===e&&t.push(n.refetch())}));else{var r={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(r.context=e.context),t.push(f.query(r))}})),Promise.all(h?t:[]).then((function(){"ignore"===y&&g&&(0,o.d2)(g)&&delete g.errors,i(g)}),d)}}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var r=this;if(void 0===t&&(t=this.cache),b(e.result,e.errorPolicy)){var n=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],i=e.updateQueries;i&&this.queries.forEach((function(a,s){var u=a.observableQuery,c=u&&u.queryName;if(c&&E.call(i,c)){var l=i[c],f=r.queries.get(s),h=f.document,p=f.variables,d=t.diff({query:h,variables:p,returnPartialData:!0,optimistic:!1}),y=d.result;if(d.complete&&y){var v=l(y,{mutationResult:e.result,queryName:h&&(0,o.rY)(h)||void 0,queryVariables:p});v&&n.push({result:v,dataId:"ROOT_QUERY",query:h,variables:p})}}})),t.performTransaction((function(t){n.forEach((function(e){return t.write(e)}));var r=e.update;r&&r(t,e.result)}),null)}},e.prototype.markMutationOptimistic=function(e,t){var r=this,i="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{r.markMutationResult((0,n.pi)((0,n.pi)({},t),{result:{data:i}}),e)}catch(e){}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),n=(0,o.Fo)(this.cache.transformForLink(r)),i=this.localState.clientQuery(r),a=n&&this.localState.serverQuery(n),s={document:r,hasClientExports:(0,o.mj)(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:i,serverQuery:a,defaultVars:(0,o.O4)((0,o.$H)(r))},u=function(e){e&&!t.has(e)&&t.set(e,s)};u(e),u(r),u(i),u(a)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.pi)((0,n.pi)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,n.pi)((0,n.pi)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new m(this.cache),r=new l.u({queryManager:this,queryInfo:t,options:e});return this.queries.set(r.queryId,t),t.init({document:e.query,observableQuery:r,variables:e.variables}),r},e.prototype.query=function(e){var t=this;(0,i.kG)(e.query,15),(0,i.kG)("Document"===e.query.kind,16),(0,i.kG)(!e.returnPartialData,17),(0,i.kG)(!e.pollInterval,18);var r=this.generateQueryId();return this.fetchQuery(r,e).finally((function(){return t.stopQuery(r)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(){return this.cancelPendingFetches(new i.ej(19)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=f.I.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then((function(){return e.reFetchObservableQueries()}))},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.queries.forEach((function(n,i){var a=n.observableQuery;if(a&&a.hasObservers()){var o=a.options.fetchPolicy;a.resetLastResults(),"cache-only"===o||!e&&"standby"===o||r.push(a.refetch()),t.getQuery(i).setDiff(null)}})),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,a=e.variables,s=e.context,u=void 0===s?{}:s;r=this.transform(r).document,a=this.getVariables(r,a);var l=function(e){return t.getObservableFromLink(r,u,e,!1).map((function(a){if("no-cache"!==n&&(b(a,i)&&t.cache.write({query:r,result:a.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),(0,o.d2)(a))throw new c.c({graphQLErrors:a.errors});return a}))};if(this.transform(r).hasClientExports){var f=this.localState.addExportedVariables(r,a,u).then(l);return new o.y$((function(e){var t=null;return f.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return l(a)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,i){var s,u,c=this;void 0===i&&(i=null!==(s=null==t?void 0:t.queryDeduplication)&&void 0!==s?s:this.queryDeduplication);var l=this.transform(e).serverQuery;if(l){var f=this.inFlightLinkObservables,h=this.link,p={query:l,variables:r,operationName:(0,o.rY)(l)||void 0,context:this.prepareContext((0,n.pi)((0,n.pi)({},t),{forceFetch:!i}))};if(t=p.context,i){var d=f.get(l)||new Map;f.set(l,d);var y=JSON.stringify(r);if(!(u=d.get(y))){var v=new o.X_([(0,a.ht)(h,p)]);d.set(y,u=v),v.cleanup((function(){d.delete(y)&&d.size<1&&f.delete(l)}))}}else u=new o.X_([(0,a.ht)(h,p)])}else u=new o.X_([o.y$.of({data:{}})]),t=this.prepareContext(t);var g=this.transform(e).clientQuery;return g&&(u=(0,o.sz)(u,(function(e){return c.localState.runResolvers({document:g,remoteResult:e,context:t,variables:r})}))),u},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId;return(0,o.sz)(this.getObservableFromLink(e.document,r.context,r.variables),(function(i){var a=(0,o.Of)(i.errors);if(n>=e.lastRequestId){if(a&&"none"===r.errorPolicy)throw e.markError(new c.c({graphQLErrors:i.errors}));e.markResult(i,r,t),e.markReady()}var s={data:i.data,loading:!1,networkStatus:e.networkStatus||f.I.ready};return a&&"ignore"!==r.errorPolicy&&(s.errors=i.errors),s}),(function(t){var r=(0,c.M)(t)?t:new c.c({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r}))},e.prototype.fetchQueryObservable=function(e,t,r){var n=this;void 0===r&&(r=f.I.loading);var i=this.transform(t.query).document,a=this.getVariables(i,t.variables),s=this.getQuery(e),u=s.networkStatus,c=t.fetchPolicy,l=void 0===c?"cache-first":c,h=t.errorPolicy,p=void 0===h?"none":h,d=t.returnPartialData,y=void 0!==d&&d,v=t.notifyOnNetworkStatusChange,g=void 0!==v&&v,m=t.context,b=void 0===m?{}:m;("cache-first"===l||"cache-and-network"===l||"network-only"===l||"no-cache"===l)&&g&&"number"==typeof u&&u!==r&&(0,f.O)(r)&&("cache-first"!==l&&(l="cache-and-network"),y=!0);var E=Object.assign({},t,{query:i,variables:a,fetchPolicy:l,errorPolicy:p,returnPartialData:y,notifyOnNetworkStatusChange:g,context:b}),S=function(e){return E.variables=e,n.fetchQueryByPolicy(s,E,r)};this.fetchCancelFns.set(e,(function(e){Promise.resolve().then((function(){return C.cancel(e)}))}));var C=new o.X_(this.transform(E.query).hasClientExports?this.localState.addExportedVariables(E.query,E.variables,E.context).then(S):S(E.variables));return C.cleanup((function(){n.fetchCancelFns.delete(e);var r=t.nextFetchPolicy;r&&(t.nextFetchPolicy=void 0,t.fetchPolicy="function"==typeof r?r.call(t,t.fetchPolicy||"cache-first"):r)})),C},e.prototype.fetchQueryByPolicy=function(e,t,r){var i=this,a=t.query,s=t.variables,u=t.fetchPolicy,c=t.errorPolicy,l=t.returnPartialData,h=t.context;e.init({document:a,variables:s,lastRequestId:this.generateRequestId(),networkStatus:r});var p=function(){return e.getDiff(s)},d=function(t,r){void 0===r&&(r=e.networkStatus||f.I.loading);var u=t.result;var c=function(e){return o.y$.of((0,n.pi)({data:e,loading:(0,f.O)(r),networkStatus:r},t.complete?null:{partial:!0}))};return i.transform(a).hasForcedResolvers?i.localState.runResolvers({document:a,remoteResult:{data:u},context:h,variables:s,onlyRunForcedResolvers:!0}).then((function(e){return c(e.data)})):c(u)},y=function(t){return i.getResultsFromLink(e,t,{variables:s,context:h,fetchPolicy:u,errorPolicy:c})};switch(u){default:case"cache-first":return(v=p()).complete?[d(v,e.markReady())]:l?[d(v),y(!0)]:[y(!0)];case"cache-and-network":var v;return(v=p()).complete||l?[d(v),y(!0)]:[y(!0)];case"cache-only":return[d(p(),e.markReady())];case"network-only":return[y(!0)];case"no-cache":return[y(!1)];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new m(this.cache)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.pi)((0,n.pi)({},t),{clientAwareness:this.clientAwareness})},e}();function C(e,t){return(0,o.oA)(e,t,t.variables&&{variables:(0,n.pi)((0,n.pi)({},e.variables),t.variables)})}var w=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.uri,n=e.credentials,o=e.headers,u=e.cache,c=e.ssrMode,l=void 0!==c&&c,f=e.ssrForceFetchDelay,h=void 0===f?0:f,p=e.connectToDevTools,y=void 0===p?"object"==typeof window&&!window.__APOLLO_CLIENT__&&!1:p,v=e.queryDeduplication,g=void 0===v||v,m=e.defaultOptions,b=e.assumeImmutableResults,E=void 0!==b&&b,C=e.resolvers,w=e.typeDefs,T=e.fragmentMatcher,A=e.name,I=e.version,k=e.link;if(k||(k=r?new s.uG({uri:r,credentials:n,headers:o}):a.i0.empty()),!u)throw new i.ej(9);this.link=k,this.cache=u,this.disableNetworkFetches=l||h>0,this.queryDeduplication=g,this.defaultOptions=m||{},this.typeDefs=w,h&&setTimeout((function(){return t.disableNetworkFetches=!1}),h),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),y&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),this.version="3.3.9",this.localState=new d({cache:u,client:this,resolvers:C,fragmentMatcher:T}),this.queryManager=new S({cache:this.cache,link:this.link,queryDeduplication:g,ssrMode:l,clientAwareness:{name:A,version:I},localState:this.localState,assumeImmutableResults:E,onBroadcast:y?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=C(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,n.pi)((0,n.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=C(this.defaultOptions.query,e)),(0,i.kG)("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.pi)((0,n.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=C(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return(0,a.ht)(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}()},6282:function(e,t,r){"use strict";r.d(t,{u:function(){return c}});var n=r(655),i=r(2924),a=r(2152),o=r(5942),s=r(496),u=function(){function e(e,t,r,n){this.observer=e,this.options=t,this.fetch=r,this.shouldFetch=n}return e.prototype.reobserve=function(e,t){e?this.updateOptions(e):this.updatePolling();var r=this.fetch(this.options,t);return this.concast&&this.concast.removeObserver(this.observer,!0),r.addObserver(this.observer),(this.concast=r).promise},e.prototype.updateOptions=function(e){return Object.assign(this.options,(0,s.oA)(e)),this.updatePolling(),this},e.prototype.stop=function(){this.concast&&(this.concast.removeObserver(this.observer),delete this.concast),this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),this.options.pollInterval=0,this.updatePolling())},e.prototype.updatePolling=function(){var e=this,t=this.pollingInfo,r=this.options.pollInterval;if(r){if((!t||t.interval!==r)&&((0,i.kG)(r,20),!1!==this.shouldFetch)){(t||(this.pollingInfo={})).interval=r;var n=function(){e.pollingInfo&&(e.shouldFetch&&e.shouldFetch()?e.reobserve({fetchPolicy:"network-only",nextFetchPolicy:e.options.fetchPolicy||"cache-first"},o.I.poll).then(a,a):a())},a=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};a()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)},e}(),c=function(e){function t(t){var r=t.queryManager,i=t.queryInfo,a=t.options,u=e.call(this,(function(e){return u.onSubscribe(e)}))||this;u.observers=new Set,u.subscriptions=new Set,u.observer={next:function(e){(u.lastError||u.isDifferentFromLastResult(e))&&(u.updateLastResult(e),(0,s.pM)(u.observers,"next",e))},error:function(e){u.updateLastResult((0,n.pi)((0,n.pi)({},u.lastResult),{error:e,errors:e.graphQLErrors,networkStatus:o.I.error,loading:!1})),(0,s.pM)(u.observers,"error",u.lastError=e)}},u.isTornDown=!1,u.options=a,u.queryId=r.generateQueryId();var c=(0,s.$H)(a.query);return u.queryName=c&&c.name&&c.name.value,u.queryManager=r,u.queryInfo=i,u}return(0,n.ZT)(t,e),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:r},i=e.subscribe(n)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.lastResult,r=this.queryInfo.networkStatus||t&&t.networkStatus||o.I.ready,i=(0,n.pi)((0,n.pi)({},t),{loading:(0,o.O)(r),networkStatus:r});if(this.isTornDown)return i;var a=this.options.fetchPolicy,s=void 0===a?"cache-first":a;if("no-cache"===s||"network-only"===s)delete i.partial;else if(!i.data||!this.queryManager.transform(this.options.query).hasForcedResolvers){var u=this.queryInfo.getDiff();i.data=u.complete||this.options.returnPartialData?u.result:void 0,u.complete?(i.networkStatus!==o.I.loading||"cache-first"!==s&&"cache-only"!==s||(i.networkStatus=o.I.ready,i.loading=!1),delete i.partial):i.partial=!0}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e){return!(0,a.D)(this.lastResultSnapshot,e)},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t={pollInterval:0},r=this.options.fetchPolicy;return"no-cache"!==r&&"cache-and-network"!==r&&(t.fetchPolicy="network-only",t.nextFetchPolicy=r||"cache-first"),e&&!(0,a.D)(this.options.variables,e)&&(t.variables=this.options.variables=(0,n.pi)((0,n.pi)({},this.options.variables),e)),this.newReobserver(!1).reobserve(t,o.I.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,n.pi)((0,n.pi)({},e.query?e:(0,n.pi)((0,n.pi)((0,n.pi)({},this.options),e),{variables:(0,n.pi)((0,n.pi)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId();return r.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=o.I.fetchMore,this.observe()),this.queryManager.fetchQuery(i,r,o.I.fetchMore).then((function(n){var i=n.data,a=e.updateQuery;return a?t.updateQuery((function(e){return a(e,{fetchMoreResult:i,variables:r.variables})})):t.queryManager.cache.writeQuery({query:r.query,variables:r.variables,data:i}),n})).finally((function(){t.queryManager.stopQuery(i),t.reobserve()}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery((function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})}))},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){if((0,a.D)(this.variables,e))return this.observers.size?this.result():Promise.resolve();if(this.options.variables=e,!this.observers.size)return Promise.resolve();var t=this.options.fetchPolicy,r=void 0===t?"cache-first":t,n={fetchPolicy:r,variables:e};return"cache-first"!==r&&"no-cache"!==r&&"network-only"!==r&&(n.fetchPolicy="cache-and-network",n.nextFetchPolicy=r),this.reobserve(n,o.I.setVariables)},t.prototype.updateQuery=function(e){var t,r=this.queryManager,n=e(r.cache.diff({query:this.options.query,variables:this.variables,previousResult:null===(t=this.lastResult)||void 0===t?void 0:t.data,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(r.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),r.broadcastQueries())},t.prototype.startPolling=function(e){this.getReobserver().updateOptions({pollInterval:e})},t.prototype.stopPolling=function(){this.reobserver&&this.reobserver.updateOptions({pollInterval:0})},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:(0,s.Xh)(e),(0,s.Of)(e.errors)||delete this.lastError,t},t.prototype.onSubscribe=function(e){var t=this;if(e===this.observer)return function(){};try{var r=e._subscription._observer;r&&!r.error&&(r.error=l)}catch(e){}var n=!this.observers.size;return this.observers.add(e),this.lastError?e.error&&e.error(this.lastError):this.lastResult&&e.next&&e.next(this.lastResult),n&&this.reobserve().catch((function(e){})),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.getReobserver=function(){return this.reobserver||(this.reobserver=this.newReobserver(!0))},t.prototype.newReobserver=function(e){var t=this,r=this.queryManager,i=this.queryId;return r.setObservableQuery(this),new u(this.observer,e?this.options:(0,n.pi)({},this.options),(function(e,n){return r.setObservableQuery(t),r.fetchQueryObservable(i,e,n)}),!r.ssrMode&&function(){return!(0,o.O)(t.queryInfo.networkStatus)})},t.prototype.reobserve=function(e,t){return this.isTornDown=!1,this.getReobserver().reobserve(e,t)},t.prototype.observe=function(){this.observer.next(this.getCurrentResult(!1))},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.reobserver&&(this.reobserver.stop(),delete this.reobserver),delete this.options.context,this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(s.y$);function l(e){}(0,s.Dy)(c)},1439:function(e,t,r){"use strict";r.d(t,{fe:function(){return n.f},h4:function(){return a.h4},HttpLink:function(){return u.uG}});var n=r(5765),i=(r(6282),r(5942),r(2191));r.o(i,"HttpLink")&&r.d(t,{HttpLink:function(){return i.HttpLink}});r(1498);var a=r(2634),o=r(5367);r.o(o,"HttpLink")&&r.d(t,{HttpLink:function(){return o.HttpLink}});var s=r(1707);r.o(s,"HttpLink")&&r.d(t,{HttpLink:function(){return s.HttpLink}});var u=r(9950),c=(r(4913),r(496),r(2924)),l=r(1466);(0,c.U6)("log");l.ZP.resetCaches,l.ZP.disableFragmentWarnings,l.ZP.enableExperimentalFragmentVariables,l.ZP.disableExperimentalFragmentVariables},5942:function(e,t,r){"use strict";var n;function i(e){return!!e&&e<7}r.d(t,{I:function(){return n},O:function(){return i}}),function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(n||(n={}))},2191:function(){},1498:function(e,t,r){"use strict";r.d(t,{M:function(){return a},c:function(){return o}});var n=r(655),i=r(496);function a(e){return e.hasOwnProperty("graphQLErrors")}var o=function(e){function t(r){var n,a,o=r.graphQLErrors,s=r.networkError,u=r.errorMessage,c=r.extraInfo,l=e.call(this,u)||this;return l.graphQLErrors=o||[],l.networkError=s||null,l.message=u||(n=l,a="",(0,i.Of)(n.graphQLErrors)&&n.graphQLErrors.forEach((function(e){var t=e?e.message:"Error message not found.";a+=t+"\n"})),n.networkError&&(a+=n.networkError.message+"\n"),a=a.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,n.ZT)(t,e),t}(Error)},7222:function(e,t,r){"use strict";r.d(t,{i:function(){return l}});var n=r(655),i=r(2924),a=r(496),o=r(4913);function s(e,t){return t?t(e):a.y$.of()}function u(e){return"function"==typeof e?new l(e):e}function c(e){return e.request.length<=1}!function(e){function t(t,r){var n=e.call(this,t)||this;return n.link=r,n}(0,n.ZT)(t,e)}(Error);var l=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return a.y$.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(u).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,r,n){var i=u(r),o=u(n||new e(s));return c(i)&&c(o)?new e((function(e){return t(e)?i.request(e)||a.y$.of():o.request(e)||a.y$.of()})):new e((function(e,r){return t(e)?i.request(e,r)||a.y$.of():o.request(e,r)||a.y$.of()}))},e.execute=function(e,t){return e.request((0,o.zi)(t.context,(0,o.DQ)((0,o.Ak)(t))))||a.y$.of()},e.concat=function(t,r){var n=u(t);if(c(n))return n;var i=u(r);return c(i)?new e((function(e){return n.request(e,(function(e){return i.request(e)||a.y$.of()}))||a.y$.of()})):new e((function(e,t){return n.request(e,(function(e){return i.request(e,t)||a.y$.of()}))||a.y$.of()}))},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(s)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw new i.ej(21)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}()},4957:function(e,t,r){"use strict";r(7222).i.concat},7325:function(e,t,r){"use strict";r(7222).i.empty},2550:function(e,t,r){"use strict";r.d(t,{h:function(){return n}});var n=r(7222).i.execute},4674:function(e,t,r){"use strict";r(7222).i.from},1707:function(e,t,r){"use strict";r.d(t,{ht:function(){return n.h},i0:function(){return i.i}});r(7325),r(4674),r(4738),r(4957);var n=r(2550),i=r(7222),a=r(9875);r.o(a,"HttpLink")&&r.d(t,{HttpLink:function(){return a.HttpLink}})},4738:function(e,t,r){"use strict";r(7222).i.split},9875:function(){},9950:function(e,t,r){"use strict";r.d(t,{uG:function(){return T}});var n=r(4913),i=Object.prototype.hasOwnProperty;var a=r(2924),o=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=new a.ej(23);throw n.parseError=e,n}return r},s=r(655),u=r(7636),c=r(7420);function l(e){return(0,u.Vn)(e,{leave:f})}var f={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return p(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=y("(",p(e.variableDefinitions,", "),")"),i=p(e.directives," "),a=e.selectionSet;return r||i||n||"query"!==t?p([t,p([r,n]),i,a]," "):a},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+y(" = ",n)+y(" ",p(i," "))},SelectionSet:function(e){return d(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,a=e.selectionSet,o=y("",t,": ")+r,s=o+y("(",p(n,", "),")");return s.length>80&&(s=o+y("(\n",v(p(n,"\n")),"\n)")),p([s,p(i," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+y(" ",p(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return p(["...",y("on ",t),p(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(y("(",p(n,", "),")")," ")+"on ".concat(r," ").concat(y("",p(i," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?(0,c.LZ)(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+p(e.values,", ")+"]"},ObjectValue:function(e){return"{"+p(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+y("(",p(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:h((function(e){var t=e.directives,r=e.operationTypes;return p(["schema",p(t," "),d(r)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:h((function(e){return p(["scalar",e.name,p(e.directives," ")]," ")})),ObjectTypeDefinition:h((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return p(["type",t,y("implements ",p(r," & ")),p(n," "),d(i)]," ")})),FieldDefinition:h((function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(m(r)?y("(\n",v(p(r,"\n")),"\n)"):y("(",p(r,", "),")"))+": "+n+y(" ",p(i," "))})),InputValueDefinition:h((function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return p([t+": "+r,y("= ",n),p(i," ")]," ")})),InterfaceTypeDefinition:h((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return p(["interface",t,y("implements ",p(r," & ")),p(n," "),d(i)]," ")})),UnionTypeDefinition:h((function(e){var t=e.name,r=e.directives,n=e.types;return p(["union",t,p(r," "),n&&0!==n.length?"= "+p(n," | "):""]," ")})),EnumTypeDefinition:h((function(e){var t=e.name,r=e.directives,n=e.values;return p(["enum",t,p(r," "),d(n)]," ")})),EnumValueDefinition:h((function(e){return p([e.name,p(e.directives," ")]," ")})),InputObjectTypeDefinition:h((function(e){var t=e.name,r=e.directives,n=e.fields;return p(["input",t,p(r," "),d(n)]," ")})),DirectiveDefinition:h((function(e){var t=e.name,r=e.arguments,n=e.repeatable,i=e.locations;return"directive @"+t+(m(r)?y("(\n",v(p(r,"\n")),"\n)"):y("(",p(r,", "),")"))+(n?" repeatable":"")+" on "+p(i," | ")})),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return p(["extend schema",p(t," "),d(r)]," ")},ScalarTypeExtension:function(e){return p(["extend scalar",e.name,p(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return p(["extend type",t,y("implements ",p(r," & ")),p(n," "),d(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return p(["extend interface",t,y("implements ",p(r," & ")),p(n," "),d(i)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return p(["extend union",t,p(r," "),n&&0!==n.length?"= "+p(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return p(["extend enum",t,p(r," "),d(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return p(["extend input",t,p(r," "),d(n)]," ")}};function h(e){return function(t){return p([t.description,e(t)],"\n")}}function p(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(r))&&void 0!==t?t:""}function d(e){return y("{\n",v(p(e,"\n")),"\n}")}function y(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+r:""}function v(e){return y(" ",e.replace(/\n/g,"\n "))}function g(e){return-1!==e.indexOf("\n")}function m(e){return null!=e&&e.some(g)}var b={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},E=r(285),S=r(1707),C=r(496);var w=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,u=e.fetch,c=e.includeExtensions,f=e.useGETForQueries,h=e.includeUnusedVariables,p=void 0!==h&&h,d=(0,s._T)(e,["uri","fetch","includeExtensions","useGETForQueries","includeUnusedVariables"]);!function(e){if(!e&&"undefined"==typeof fetch)throw new a.ej(22)}(u),u||(u=fetch);var y={http:{includeExtensions:c},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};return new S.i0((function(e){var t=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")}(e,r),a=e.getContext(),c={};if(a.clientAwareness){var h=a.clientAwareness,d=h.name,v=h.version;d&&(c["apollographql-client-name"]=d),v&&(c["apollographql-client-version"]=v)}var g,m=(0,s.pi)((0,s.pi)({},c),a.headers),S={http:a.http,options:a.fetchOptions,credentials:a.credentials,headers:m},w=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=(0,s.pi)((0,s.pi)({},t.options),{headers:t.headers,credentials:t.credentials}),a=t.http||{};r.forEach((function(e){i=(0,s.pi)((0,s.pi)((0,s.pi)({},i),e.options),{headers:(0,s.pi)((0,s.pi)({},i.headers),e.headers)}),e.credentials&&(i.credentials=e.credentials),a=(0,s.pi)((0,s.pi)({},a),e.http)}));var o=e.operationName,u=e.extensions,c=e.variables,f=e.query,h={operationName:o,variables:c};return a.includeExtensions&&(h.extensions=u),a.includeQuery&&(h.query=l(f)),{options:i,body:h}}(e,b,y,S),T=w.options,A=w.body;if(A.variables&&!p){var I=new Set(Object.keys(A.variables));(0,E.Vn)(e.query,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&I.delete(e.name.value)}}),I.size&&(A.variables=(0,s.pi)({},A.variables),I.forEach((function(e){delete A.variables[e]})))}if(!T.signal){var k=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}}(),_=k.controller,B=k.signal;(g=_)&&(T.signal=B)}if(f&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(T.method="GET"),"GET"===T.method){var N=function(e,t){var r=[],n=function(e,t){r.push(e+"="+encodeURIComponent(t))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=o(t.variables)}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var a=void 0;try{a=o(t.extensions)}catch(e){return{parseError:e}}n("extensions",a)}var s="",u=e,c=e.indexOf("#");-1!==c&&(s=e.substr(c),u=e.substr(0,c));var l=-1===u.indexOf("?")?"?":"&";return{newURI:u+l+r.join("&")+s}}(t,A),O=N.newURI,R=N.parseError;if(R)return(0,n.Qc)(R);t=O}else try{T.body=o(A)}catch(R){return(0,n.Qc)(R)}return new C.y$((function(r){var a;return u(t,T).then((function(t){return e.setContext({response:t}),t})).then((a=e,function(e){return e.text().then((function(t){try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}})).then((function(t){return e.status>=300&&(0,n.PW)(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||i.call(t,"data")||i.call(t,"errors")||(0,n.PW)(e,t,"Server response was missing for query '"+(Array.isArray(a)?a.map((function(e){return e.operationName})):a.operationName)+"'."),t}))})).then((function(e){return r.next(e),r.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&r.next(e.result),r.error(e))})),function(){g&&g.abort()}}))}))},T=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,w(t).request)||this;return r.options=t,r}return(0,s.ZT)(t,e),t}(S.i0)},4913:function(e,t,r){"use strict";r.d(t,{zi:function(){return c},Qc:function(){return i},PW:function(){return o},DQ:function(){return l},Ak:function(){return s}});var n=r(496);function i(e){return new n.y$((function(t){t.error(e)}))}var a=r(2924);var o=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n};function s(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw new a.ej(26)}return e}var u=r(655);function c(e,t){var r=(0,u.pi)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r="function"==typeof e?(0,u.pi)((0,u.pi)({},r),e(r)):(0,u.pi)((0,u.pi)({},r),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,u.pi)({},r)}}),t}function l(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?(0,n.rY)(t.query)||void 0:""),t}},1466:function(e,t,r){"use strict";r.d(t,{ZP:function(){return ee}});var n=r(655);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var a="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function o(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,a=t+1;(r=n.exec(e.body))&&r.index<t;)i+=1,a=t+1-(r.index+r[0].length);return{line:i,column:a}}function s(e){return u(e.source,o(e.source,e.start))}function u(e,t){var r=e.locationOffset.column-1,n=l(r)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?r:0,u=t.column+s,f="".concat(e.name,":").concat(o,":").concat(u,"\n"),h=n.split(/\r\n|[\n\r]/g),p=h[i];if(p.length>120){for(var d=Math.floor(u/80),y=u%80,v=[],g=0;g<p.length;g+=80)v.push(p.slice(g,g+80));return f+c([["".concat(o),v[0]]].concat(v.slice(1,d+1).map((function(e){return["",e]})),[[" ",l(y-1)+"^"],["",v[d+1]]]))}return f+c([["".concat(o-1),h[i-1]],["".concat(o),p],["",l(u-1)+"^"],["".concat(o+1),h[i+1]]])}function c(e){var t=e.filter((function(e){e[0];return void 0!==e[1]})),r=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,n=e[0],i=e[1];return l(r-(t=n).length)+t+(i?" | "+i:" |")})).join("\n")}function l(e){return Array(e+1).join(" ")}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(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,n.key,n)}}function p(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?d(e):t}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){var t="function"==typeof Map?new Map:void 0;return(y=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return v(e,arguments,b(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),m(n,e)})(e)}function v(e,t,r){return(v=g()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&m(i,r.prototype),i}).apply(null,arguments)}function g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(y,e);var t,r,n,c,l,f=(t=y,r=g(),function(){var e,n=b(t);if(r){var i=b(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return p(this,e)});function y(e,t,r,n,a,s,u){var c,l,h,v,g;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),g=f.call(this,e);var m,b=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,E=r;!E&&b&&(E=null===(m=b[0].loc)||void 0===m?void 0:m.source);var S,C=n;!C&&b&&(C=b.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),C&&0===C.length&&(C=void 0),n&&r?S=n.map((function(e){return o(r,e)})):b&&(S=b.reduce((function(e,t){return t.loc&&e.push(o(t.loc.source,t.loc.start)),e}),[]));var w,T=u;if(null==T&&null!=s){var A=s.extensions;"object"==i(w=A)&&null!==w&&(T=A)}return Object.defineProperties(d(g),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(c=S)&&void 0!==c?c:void 0,enumerable:null!=S},path:{value:null!=a?a:void 0,enumerable:null!=a},nodes:{value:null!=b?b:void 0},source:{value:null!==(l=E)&&void 0!==l?l:void 0},positions:{value:null!==(h=C)&&void 0!==h?h:void 0},originalError:{value:s},extensions:{value:null!==(v=T)&&void 0!==v?v:void 0,enumerable:null!=T}}),null!=s&&s.stack?(Object.defineProperty(d(g),"stack",{value:s.stack,writable:!0,configurable:!0}),p(g)):(Error.captureStackTrace?Error.captureStackTrace(d(g),y):Object.defineProperty(d(g),"stack",{value:Error().stack,writable:!0,configurable:!0}),g)}return n=y,(c=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r<n.length;r++){var i=n[r];i.loc&&(t+="\n\n"+s(i.loc))}else if(e.source&&e.locations)for(var a=0,o=e.locations;a<o.length;a++){var c=o[a];t+="\n\n"+u(e.source,c)}return t}(this)}},{key:a,get:function(){return"Object"}}])&&h(n.prototype,c),l&&h(n,l),y}(y(Error));function S(e,t,r){return new E("Syntax Error: ".concat(r),void 0,e,[t])}var C=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"}),w=r(3059),T=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),A=r(6589);function I(e,t){if(!Boolean(e))throw new Error(t)}var k=function(e,t){return e instanceof t};function _(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,n.key,n)}}var B=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||I(0,"Body must be a string. Received: ".concat((0,A.Z)(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||I(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||I(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r,n;return t=e,(r=[{key:a,get:function(){return"Source"}}])&&_(t.prototype,r),n&&_(t,n),e}();var N=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"}),O=r(7420),R=function(){function e(e){var t=new w.WU(T.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==T.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=P(this,e)}while(e.kind===T.COMMENT);return e},e}();function x(e){return isNaN(e)?T.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function P(e,t){for(var r=e.source,n=r.body,i=n.length,a=t.end;a<i;){var o=n.charCodeAt(a),s=e.line,u=1+a-e.lineStart;switch(o){case 65279:case 9:case 32:case 44:++a;continue;case 10:++a,++e.line,e.lineStart=a;continue;case 13:10===n.charCodeAt(a+1)?a+=2:++a,++e.line,e.lineStart=a;continue;case 33:return new w.WU(T.BANG,a,a+1,s,u,t);case 35:return D(r,a,s,u,t);case 36:return new w.WU(T.DOLLAR,a,a+1,s,u,t);case 38:return new w.WU(T.AMP,a,a+1,s,u,t);case 40:return new w.WU(T.PAREN_L,a,a+1,s,u,t);case 41:return new w.WU(T.PAREN_R,a,a+1,s,u,t);case 46:if(46===n.charCodeAt(a+1)&&46===n.charCodeAt(a+2))return new w.WU(T.SPREAD,a,a+3,s,u,t);break;case 58:return new w.WU(T.COLON,a,a+1,s,u,t);case 61:return new w.WU(T.EQUALS,a,a+1,s,u,t);case 64:return new w.WU(T.AT,a,a+1,s,u,t);case 91:return new w.WU(T.BRACKET_L,a,a+1,s,u,t);case 93:return new w.WU(T.BRACKET_R,a,a+1,s,u,t);case 123:return new w.WU(T.BRACE_L,a,a+1,s,u,t);case 124:return new w.WU(T.PIPE,a,a+1,s,u,t);case 125:return new w.WU(T.BRACE_R,a,a+1,s,u,t);case 34:return 34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2)?V(r,a,s,u,t,e):j(r,a,s,u,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return L(r,a,o,s,u,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return M(r,a,s,u,t)}throw S(r,a,F(o))}var c=e.line,l=1+a-e.lineStart;return new w.WU(T.EOF,i,i,c,l,t)}function F(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(x(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(x(e),".")}function D(e,t,r,n,i){var a,o=e.body,s=t;do{a=o.charCodeAt(++s)}while(!isNaN(a)&&(a>31||9===a));return new w.WU(T.COMMENT,t,s,r,n,i,o.slice(t+1,s))}function L(e,t,r,n,i,a){var o=e.body,s=r,u=t,c=!1;if(45===s&&(s=o.charCodeAt(++u)),48===s){if((s=o.charCodeAt(++u))>=48&&s<=57)throw S(e,u,"Invalid number, unexpected digit after 0: ".concat(x(s),"."))}else u=U(e,u,s),s=o.charCodeAt(u);if(46===s&&(c=!0,s=o.charCodeAt(++u),u=U(e,u,s),s=o.charCodeAt(u)),69!==s&&101!==s||(c=!0,43!==(s=o.charCodeAt(++u))&&45!==s||(s=o.charCodeAt(++u)),u=U(e,u,s),s=o.charCodeAt(u)),46===s||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(s))throw S(e,u,"Invalid number, expected digit but got: ".concat(x(s),"."));return new w.WU(c?T.FLOAT:T.INT,t,u,n,i,a,o.slice(t,u))}function U(e,t,r){var n=e.body,i=t,a=r;if(a>=48&&a<=57){do{a=n.charCodeAt(++i)}while(a>=48&&a<=57);return i}throw S(e,i,"Invalid number, expected digit but got: ".concat(x(a),"."))}function j(e,t,r,n,i){for(var a,o,s,u,c=e.body,l=t+1,f=l,h=0,p="";l<c.length&&!isNaN(h=c.charCodeAt(l))&&10!==h&&13!==h;){if(34===h)return p+=c.slice(f,l),new w.WU(T.STRING,t,l+1,r,n,i,p);if(h<32&&9!==h)throw S(e,l,"Invalid character within String: ".concat(x(h),"."));if(++l,92===h){switch(p+=c.slice(f,l-1),h=c.charCodeAt(l)){case 34:p+='"';break;case 47:p+="/";break;case 92:p+="\\";break;case 98:p+="\b";break;case 102:p+="\f";break;case 110:p+="\n";break;case 114:p+="\r";break;case 116:p+="\t";break;case 117:var d=(a=c.charCodeAt(l+1),o=c.charCodeAt(l+2),s=c.charCodeAt(l+3),u=c.charCodeAt(l+4),K(a)<<12|K(o)<<8|K(s)<<4|K(u));if(d<0){var y=c.slice(l+1,l+5);throw S(e,l,"Invalid character escape sequence: \\u".concat(y,"."))}p+=String.fromCharCode(d),l+=4;break;default:throw S(e,l,"Invalid character escape sequence: \\".concat(String.fromCharCode(h),"."))}f=++l}}throw S(e,l,"Unterminated string.")}function V(e,t,r,n,i,a){for(var o=e.body,s=t+3,u=s,c=0,l="";s<o.length&&!isNaN(c=o.charCodeAt(s));){if(34===c&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2))return l+=o.slice(u,s),new w.WU(T.BLOCK_STRING,t,s+3,r,n,i,(0,O.W7)(l));if(c<32&&9!==c&&10!==c&&13!==c)throw S(e,s,"Invalid character within String: ".concat(x(c),"."));10===c?(++s,++a.line,a.lineStart=s):13===c?(10===o.charCodeAt(s+1)?s+=2:++s,++a.line,a.lineStart=s):92===c&&34===o.charCodeAt(s+1)&&34===o.charCodeAt(s+2)&&34===o.charCodeAt(s+3)?(l+=o.slice(u,s)+'"""',u=s+=4):++s}throw S(e,s,"Unterminated string.")}function K(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function M(e,t,r,n,i){for(var a=e.body,o=a.length,s=t+1,u=0;s!==o&&!isNaN(u=a.charCodeAt(s))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new w.WU(T.NAME,t,s,r,n,i,a.slice(t,s))}var q=function(){function e(e,t){var r=function(e){return k(e,B)}(e)?e:new B(e);this._lexer=new R(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(T.NAME);return{kind:C.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:C.DOCUMENT,definitions:this.many(T.SOF,this.parseDefinition,T.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(T.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(T.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(T.BRACE_L))return{kind:C.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(T.NAME)&&(t=this.parseName()),{kind:C.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(T.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(T.PAREN_L,this.parseVariableDefinition,T.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:C.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(T.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(T.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(T.DOLLAR),{kind:C.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:C.SELECTION_SET,selections:this.many(T.BRACE_L,this.parseSelection,T.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(T.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(T.COLON)?(e=n,t=this.parseName()):t=n,{kind:C.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(T.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(T.PAREN_L,t,T.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(T.COLON),{kind:C.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:C.ARGUMENT,name:this.parseName(),value:(this.expectToken(T.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(T.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(T.NAME)?{kind:C.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:C.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:C.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:C.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case T.BRACKET_L:return this.parseList(e);case T.BRACE_L:return this.parseObject(e);case T.INT:return this._lexer.advance(),{kind:C.INT,value:t.value,loc:this.loc(t)};case T.FLOAT:return this._lexer.advance(),{kind:C.FLOAT,value:t.value,loc:this.loc(t)};case T.STRING:case T.BLOCK_STRING:return this.parseStringLiteral();case T.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:C.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:C.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:C.NULL,loc:this.loc(t)};default:return{kind:C.ENUM,value:t.value,loc:this.loc(t)}}case T.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:C.STRING,value:e.value,block:e.kind===T.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:C.LIST,values:this.any(T.BRACKET_L,(function(){return t.parseValueLiteral(e)}),T.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:C.OBJECT,fields:this.any(T.BRACE_L,(function(){return t.parseObjectField(e)}),T.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(T.COLON),{kind:C.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(T.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(T.AT),{kind:C.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(T.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(T.BRACKET_R),e={kind:C.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(T.BANG)?{kind:C.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:C.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===T.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(T.STRING)||this.peek(T.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(T.BRACE_L,this.parseOperationTypeDefinition,T.BRACE_R);return{kind:C.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(T.COLON);var r=this.parseNamedType();return{kind:C.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:C.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:C.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:a,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(T.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(T.AMP)||this.peek(T.NAME));return t}return this.delimitedMany(T.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(T.BRACE_L)&&this._lexer.lookahead().kind===T.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(T.BRACE_L,this.parseFieldDefinition,T.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(T.COLON);var i=this.parseTypeReference(),a=this.parseDirectives(!0);return{kind:C.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:a,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(T.PAREN_L,this.parseInputValueDef,T.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(T.COLON);var n,i=this.parseTypeReference();this.expectOptionalToken(T.EQUALS)&&(n=this.parseValueLiteral(!0));var a=this.parseDirectives(!0);return{kind:C.INPUT_VALUE_DEFINITION,description:t,name:r,type:i,defaultValue:n,directives:a,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:C.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:a,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:C.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(T.EQUALS)?this.delimitedMany(T.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:C.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(T.BRACE_L,this.parseEnumValueDefinition,T.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:C.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:C.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(T.BRACE_L,this.parseInputValueDef,T.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===T.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(T.BRACE_L,this.parseOperationTypeDefinition,T.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:C.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:C.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:C.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:C.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:C.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:C.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:C.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(T.AT);var r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var a=this.parseDirectiveLocations();return{kind:C.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:a,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(T.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==N[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new w.Ye(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw S(this._lexer.source,t.start,"Expected ".concat(H(e),", found ").concat(z(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==T.NAME||t.value!==e)throw S(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(z(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===T.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return S(this._lexer.source,t.start,"Unexpected ".concat(z(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r},e}();function z(e){var t=e.value;return H(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function H(e){return function(e){return e===T.BANG||e===T.DOLLAR||e===T.AMP||e===T.PAREN_L||e===T.PAREN_R||e===T.SPREAD||e===T.COLON||e===T.EQUALS||e===T.AT||e===T.BRACKET_L||e===T.BRACKET_R||e===T.BRACE_L||e===T.PIPE||e===T.BRACE_R}(e)?'"'.concat(e,'"'):e}var G=new Map,Q=new Map,W=!0,Y=!1;function Z(e){return e.replace(/[\s,]+/g," ").trim()}function J(e){var t=new Set,r=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,i=Z((o=e.loc).source.body.substring(o.start,o.end)),a=Q.get(n);a&&!a.has(i)?W&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):a||Q.set(n,a=new Set),a.add(i),t.has(i)||(t.add(i),r.push(e))}else r.push(e);var o})),(0,n.pi)((0,n.pi)({},e),{definitions:r})}function X(e){var t=Z(e);if(!G.has(t)){var r=function(e,t){return new q(e,t).parseDocument()}(e,{experimentalFragmentVariables:Y});if(!r||"Document"!==r.kind)throw new Error("Not a valid GraphQL document.");G.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)}))}));var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}(J(r)))}return G.get(t)}function $(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach((function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]})),X(n)}var ee=Object.assign($,{gql:$,default:$,resetCaches:function(){G.clear(),Q.clear()},disableFragmentWarnings:function(){W=!1},enableExperimentalFragmentVariables:function(){Y=!0},disableExperimentalFragmentVariables:function(){Y=!1}})},1494:function(e,t,r){"use strict";e=r.hmd(e);!function(e){var t,r=e.Symbol;if("function"==typeof r)if(r.observable)t=r.observable;else{t=r.for("https://github.com/benlesh/symbol-observable");try{r.observable=t}catch(e){}}else t="@@observable"}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:e)},496:function(e,t,r){"use strict";r.d(t,{X_:function(){return oe},w0:function(){return Y},y$:function(){return J()},Gw:function(){return U},NC:function(){return E},sz:function(){return ne},aL:function(){return M},mr:function(){return ce},Xh:function(){return $},oA:function(){return le},F:function(){return l},Dy:function(){return ie},O4:function(){return O},kU:function(){return _},hi:function(){return f},Yk:function(){return c},p$:function(){return N},$H:function(){return I},rY:function(){return k},iW:function(){return B},PT:function(){return b},qw:function(){return C},d2:function(){return ue},mj:function(){return s},FS:function(){return o},My:function(){return w},Ao:function(){return T},Of:function(){return se},hh:function(){return y},pM:function(){return re},kQ:function(){return d},Jv:function(){return te},Ee:function(){return H},bw:function(){return G},ob:function(){return q},Fo:function(){return V},u2:function(){return S},LZ:function(){return a},vf:function(){return g}});var n=r(7636),i=r(2924);function a(e,t){var r=e.directives;return!r||!r.length||function(e){var t=[];e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var r=e.arguments;e.name.value;(0,i.kG)(r&&1===r.length,39);var n=r[0];(0,i.kG)(n.name&&"if"===n.name.value,40);var a=n.value;(0,i.kG)(a&&("Variable"===a.kind||"BooleanValue"===a.kind),41),t.push({directive:e,ifArgument:n})}}));return t}(r).every((function(e){var r=e.directive,n=e.ifArgument,a=!1;return"Variable"===n.value.kind?(a=t&&t[n.value.name.value],(0,i.kG)(void 0!==a,38)):a=n.value.value,"skip"===r.name.value?!a:a}))}function o(e,t){return function(e){var t=[];return(0,n.Vn)(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function s(e){return e&&o(["client"],e)&&o(["export"],e)}var u=r(655);function c(e,t){var r=t,n=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new i.ej(42);"FragmentDefinition"===e.kind&&n.push(e)})),void 0===r&&((0,i.kG)(1===n.length,43),r=n[0].name.value),(0,u.pi)((0,u.pi)({},e),{definitions:(0,u.pr)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions)})}function l(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function f(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=t&&t[e.name.value];return(0,i.kG)(r,44),r;default:return null}}var h=r(5035),p=r.n(h);function d(e){return{__ref:String(e)}}function y(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function v(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var a={};r.fields.map((function(e){return v(a,e.name,e.value,n)})),e[t.value]=a}else if(function(e){return"Variable"===e.kind}(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return v(r,t,e,n),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw new i.ej(53);e[t.value]=null}}function g(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var i=n.name,a=n.value;return v(r[e.name.value],i,a,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return v(n,r,i,t)}))),b(e.name.value,n,r)}var m=["connection","include","skip","client","rest","export"];function b(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach((function(e){i[e]=t[e]})),r.connection.key+"("+JSON.stringify(i)+")"}return r.connection.key}var a=e;if(t){var o=p()(t);a+="("+o+")"}return r&&Object.keys(r).forEach((function(e){-1===m.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?a+="@"+e+"("+JSON.stringify(r[e])+")":a+="@"+e)})),a}function E(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return v(r,n,i,t)})),r}return null}function S(e){return e.alias?e.alias.value:e.name.value}function C(e,t,r){if("string"==typeof e.__typename)return e.__typename;for(var n=0,i=t.selections;n<i.length;n++){var a=i[n];if(w(a)){if("__typename"===a.name.value)return e[S(a)]}else{var o=C(e,f(a,r).selectionSet,r);if("string"==typeof o)return o}}}function w(e){return"Field"===e.kind}function T(e){return"InlineFragment"===e.kind}function A(e){(0,i.kG)(e&&"Document"===e.kind,45);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw new i.ej(46);return e}));return(0,i.kG)(t.length<=1,47),e}function I(e){return A(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function k(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function _(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function B(e){var t=I(e);return(0,i.kG)(t&&"query"===t.operation,48),t}function N(e){var t;A(e);for(var r=0,n=e.definitions;r<n.length;r++){var a=n[r];if("OperationDefinition"===a.kind){var o=a.operation;if("query"===o||"mutation"===o||"subscription"===o)return a}"FragmentDefinition"!==a.kind||t||(t=a)}if(t)return t;throw new i.ej(52)}function O(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach((function(e){e.defaultValue&&v(t,e.variable.name,e.defaultValue)})),t}function R(e,t,r){var n=0;return e.forEach((function(r,i){t.call(this,r,i,e)&&(e[n++]=r)}),r),e.length=n,e}var x={kind:"Field",name:{kind:"Name",value:"__typename"}};function P(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&P(t[e.name.value],t)}))}function F(e){return P(I(e)||function(e){(0,i.kG)("Document"===e.kind,49),(0,i.kG)(e.definitions.length<=1,50);var t=e.definitions[0];return(0,i.kG)("FragmentDefinition"===t.kind,51),t}(e),l(_(e)))?null:e}function D(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function L(e,t){var r=Object.create(null),i=[],a=Object.create(null),o=[],s=F((0,n.Vn)(t,{Variable:{enter:function(e,t,n){"VariableDefinition"!==n.kind&&(r[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&(e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(D(e))))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&i.push({name:e.value.name.value})})),t.selectionSet&&K(t.selectionSet).forEach((function(e){o.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){a[e.name.value]=!0}},Directive:{enter:function(t){if(D(e)(t))return null}}}));return s&&R(i,(function(e){return!!e.name&&!r[e.name]})).length&&(s=function(e,t){var r=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return F((0,n.Vn)(t,{OperationDefinition:{enter:function(t){return(0,u.pi)((0,u.pi)({},t),{variableDefinitions:t.variableDefinitions?t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))})):[]})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var n=0;if(t.arguments&&t.arguments.forEach((function(e){r(e)&&(n+=1)})),1===n)return null}}},Argument:{enter:function(e){if(r(e))return null}}}))}(i,s)),s&&R(o,(function(e){return!!e.name&&!a[e.name]})).length&&(s=function(e,t){function r(t){if(e.some((function(e){return e.name===t.name.value})))return null}return F((0,n.Vn)(t,{FragmentSpread:{enter:r},FragmentDefinition:{enter:r}}))}(o,s)),s}function U(e){return(0,n.Vn)(A(e),{SelectionSet:{enter:function(e,t,r){if(!r||"OperationDefinition"!==r.kind){var n=e.selections;if(n)if(!n.some((function(e){return w(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=r;if(!(w(i)&&i.directives&&i.directives.some((function(e){return"export"===e.name.value}))))return(0,u.pi)((0,u.pi)({},e),{selections:(0,u.pr)(n,[x])})}}}}})}U.added=function(e){return e===x};var j={test:function(e){var t="connection"===e.name.value;return t&&(!e.arguments||e.arguments.some((function(e){return"key"===e.name.value}))),t}};function V(e){return L([j],A(e))}function K(e){var t=[];return e.selections.forEach((function(e){(w(e)||T(e))&&e.selectionSet?K(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function M(e){return"query"===N(e).operation?e:(0,n.Vn)(e,{OperationDefinition:{enter:function(e){return(0,u.pi)((0,u.pi)({},e),{operation:"query"})}}})}function q(e){A(e);var t=L([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=(0,n.Vn)(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return w(e)&&"__typename"===e.name.value})))return null}}})),t}var z=Object.prototype.hasOwnProperty;function H(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return G(e)}function G(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new Y,i=1;i<r;++i)t=n.merge(t,e[i]);return t}function Q(e){return null!==e&&"object"==typeof e}var W=function(e,t,r){return this.merge(e[r],t[r])},Y=function(){function e(e){void 0===e&&(e=W),this.reconciler=e,this.isObject=Q,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var r=this,n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return Q(t)&&Q(e)?(Object.keys(t).forEach((function(i){if(z.call(e,i)){var a=e[i];if(t[i]!==a){var o=r.reconciler.apply(r,(0,u.pr)([e,t,i],n));o!==a&&((e=r.shallowCopyForMerge(e))[i]=o)}}else(e=r.shallowCopyForMerge(e))[i]=t[i]})),e):t},e.prototype.shallowCopyForMerge=function(e){return Q(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):(0,u.pi)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}();var Z=r(9329),J=r.n(Z);r(1494);J().prototype["@@observable"]=function(){return this};var X=Object.prototype.toString;function $(e){return ee(e)}function ee(e,t){switch(X.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach((function(e,n){r[n]=ee(e,t)})),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach((function(r){n[r]=ee(e[r],t)})),n;default:return e}}function te(e){return e}function re(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function ne(e,t,r){return new(J())((function(n){var i=n.next,a=n.error,o=n.complete,s=0,u=!1;function c(e,t){return e?function(t){++s,new Promise((function(r){return r(e(t))})).then((function(e){--s,i&&i.call(n,e),u&&l.complete()}),(function(e){--s,a&&a.call(n,e)}))}:function(e){return t&&t.call(n,e)}}var l={next:c(t,i),error:c(r,a),complete:function(){u=!0,s||o&&o.call(n)}},f=e.subscribe(l);return function(){return f.unsubscribe()}}))}function ie(e){function t(t){Object.defineProperty(e,t,{value:J()})}return"function"==typeof Symbol&&Symbol.species&&t(Symbol.species),t("@@species"),e}function ae(e){return e&&"function"==typeof e.then}var oe=function(e){function t(t){var r=e.call(this,(function(e){return r.addObserver(e),function(){return r.removeObserver(e)}}))||this;return r.observers=new Set,r.addCount=0,r.promise=new Promise((function(e,t){r.resolve=e,r.reject=t})),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],re(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&Promise.resolve().then((function(){return t.unsubscribe()})),r.sub=null,r.latest=["error",e],r.reject(e),re(r.observers,"error",e))},complete:function(){if(null!==r.sub){var e=r.sources.shift();e?ae(e)?e.then((function(e){return r.sub=e.subscribe(r.handlers)})):r.sub=e.subscribe(r.handlers):(r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),re(r.observers,"complete"))}}},r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.complete()},r.promise.catch((function(e){})),"function"==typeof t&&(t=[new(J())(t)]),ae(t)?t.then((function(e){return r.start(e)}),r.handlers.error):r.start(t),r}return(0,u.ZT)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e),++this.addCount)},t.prototype.removeObserver=function(e,t){this.observers.delete(e)&&--this.addCount<1&&!t&&this.handlers.error(new Error("Observable cancelled prematurely"))},t.prototype.cleanup=function(e){var t=this,r=!1,n=function(){r||(r=!0,t.observers.delete(i),e())},i={next:n,error:n,complete:n},a=this.addCount;this.addObserver(i),this.addCount=a},t}(J());function se(e){return Array.isArray(e)&&e.length>0}function ue(e){return e.errors&&e.errors.length>0||!1}ie(oe);var ce="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product);function le(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];void 0!==n&&(r[t]=n)}))})),r}},2152:function(e,t,r){"use strict";r.d(t,{D:function(){return u}});var n=Object.prototype,i=n.toString,a=n.hasOwnProperty,o=Function.prototype.toString,s=new Map;function u(e,t){try{return c(e,t)}finally{s.clear()}}function c(e,t){if(e===t)return!0;var r,n,s,u=i.call(e);if(u!==i.call(t))return!1;switch(u){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(p(e,t))return!0;var f=l(e),d=l(t),y=f.length;if(y!==d.length)return!1;for(var v=0;v<y;++v)if(!a.call(t,f[v]))return!1;for(v=0;v<y;++v){var g=f[v];if(!c(e[g],t[g]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==""+t;case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(p(e,t))return!0;for(var m=e.entries(),b="[object Map]"===u;;){var E=m.next();if(E.done)break;var S=E.value,C=S[0],w=S[1];if(!t.has(C))return!1;if(b&&!c(w,t.get(C)))return!1}return!0;case"[object Function]":var T=o.call(e);return T===o.call(t)&&(n=h,!((s=(r=T).length-n.length)>=0&&r.indexOf(n,s)===s))}return!1}function l(e){return Object.keys(e).filter(f,e)}function f(e){return void 0!==this[e]}var h="{ [native code] }";function p(e,t){var r=s.get(e);if(r){if(r.has(t))return!0}else s.set(e,r=new Set);return r.add(t),!1}},9742:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,a=u(e),o=a[0],s=a[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,s)),l=0,f=s>0?o-4:o;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;s<u;s+=o)a.push(c(e,s,s+o>u?u:s+o));1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o<s;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,a,o=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},2240:function(e,t,r){"use strict";var n=r(1518);function i(e,t){return void 0===t&&(t="utf8"),Buffer.isBuffer(e)?o(e.toString("base64")):o(Buffer.from(e,t).toString("base64"))}function a(e){return e=e.toString(),n.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function o(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var s=i;s.encode=i,s.decode=function(e,t){return void 0===t&&(t="utf8"),Buffer.from(a(e),"base64").toString(t)},s.toBase64=a,s.fromBase64=o,s.toBuffer=function(e){return Buffer.from(a(e),"base64")},t.default=s},1518:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.length,r=t%4;if(!r)return e;var n=t,i=4-r,a=t+i,o=Buffer.alloc(a);for(o.write(e);i--;)o.write("=",n++);return o.toString()}},5772:function(e,t,r){e.exports=r(2240).default,e.exports.default=e.exports},8764:function(e,t,r){"use strict";var n=r(9742),i=r(645),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
data/bin/release CHANGED
@@ -6,5 +6,5 @@ npm run release && \
6
6
  cd ../decidim-bulletin_board-ruby && \
7
7
  bundle install && \
8
8
  git add .. && \
9
- git commit --amend && \
9
+ git commit --amend --no-edit && \
10
10
  bundle exec rake release
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Decidim
4
4
  module BulletinBoard
5
- VERSION = "0.12.1"
5
+ VERSION = "0.13.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-bulletin_board
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Morcillo
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2021-02-22 00:00:00.000000000 Z
14
+ date: 2021-02-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails