UNPKG

relay-runtime

Version:

A core runtime for building GraphQL-driven applications.

9 lines • 168 kB
/** * Relay v18.2.0 * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("invariant"),require("fbjs/lib/warning"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/createForOfIteratorHelper"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/toConsumableArray"),require("fbjs/lib/areEqual"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),require("@babel/runtime/helpers/toPropertyKey")):"function"==typeof define&&define.amd?define(["invariant","fbjs/lib/warning","@babel/runtime/helpers/interopRequireDefault","@babel/runtime/helpers/createForOfIteratorHelper","@babel/runtime/helpers/objectSpread2","@babel/runtime/helpers/toConsumableArray","fbjs/lib/areEqual","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/objectWithoutPropertiesLoose","@babel/runtime/helpers/toPropertyKey"],t):"object"==typeof exports?exports.RelayRuntime=t(require("invariant"),require("fbjs/lib/warning"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/createForOfIteratorHelper"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/toConsumableArray"),require("fbjs/lib/areEqual"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),require("@babel/runtime/helpers/toPropertyKey")):e.RelayRuntime=t(e.invariant,e["fbjs/lib/warning"],e["@babel/runtime/helpers/interopRequireDefault"],e["@babel/runtime/helpers/createForOfIteratorHelper"],e["@babel/runtime/helpers/objectSpread2"],e["@babel/runtime/helpers/toConsumableArray"],e["fbjs/lib/areEqual"],e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/helpers/defineProperty"],e["@babel/runtime/helpers/objectWithoutPropertiesLoose"],e["@babel/runtime/helpers/toPropertyKey"])}(self,((e,t,r,n,i,a,s,o,l,u,c)=>(()=>{"use strict";var d={7649:(e,t,r)=>{var n=r(1662),i=r(6696).observeFragment,a=r(8461).waitForFragmentData;e.exports={resolverDataInjector:n,isValueResult:function(e){return!0===e.ok},isErrorResult:function(e){return!1===e.ok},observeFragment:i,waitForFragmentData:a}},778:(e,t,r)=>{var n=r(9381),i=r(8159),a=r(5056);e.exports=function(e){switch(e){case"connection":return n;case"deleteRecord":return i.DeleteRecordHandler;case"deleteEdge":return i.DeleteEdgeHandler;case"appendEdge":return i.AppendEdgeHandler;case"prependEdge":return i.PrependEdgeHandler;case"appendNode":return i.AppendNodeHandler;case"prependNode":return i.PrependNodeHandler}a(!1)}},9381:(e,t,r)=>{var n=r(2997).generateClientID,i=r(5165).getStableStorageKey,a=r(6330),s=r(9776),o=r(5056),l=(r(4446),"connection"),u="__connection_next_edge_index";function c(e,t,r){if(null==r)return r;var i=s.get().EDGES,a=t.getValue(u);"number"!=typeof a&&o(!1);var l=n(t.getDataID(),i,a),c=e.create(l,r.getType());return c.copyFieldsFrom(r),null==c.getValue("cursor")&&c.setValue(null,"cursor"),t.setValue(a+1,u),c}function d(e,t,r){for(var n=s.get().NODE,i=0;i<e.length;i++){var a=e[i];if(a){var o=a.getLinkedRecord(n),l=o&&o.getDataID();if(l){if(r.has(l))continue;r.add(l)}t.push(a)}}}e.exports={buildConnectionEdge:c,createEdge:function(e,t,r,i){var a=s.get().NODE,o=n(t.getDataID(),r.getDataID()),l=e.get(o);return l||(l=e.create(o,i)),l.setLinkedRecord(r,a),null==l.getValue("cursor")&&l.setValue(null,"cursor"),l},deleteNode:function(e,t){var r=s.get(),n=r.EDGES,i=r.NODE,a=e.getLinkedRecords(n);if(a){for(var o,l=0;l<a.length;l++){var u=a[l],c=u&&u.getLinkedRecord(i);null!=c&&c.getDataID()===t?void 0===o&&(o=a.slice(0,l)):void 0!==o&&o.push(u)}void 0!==o&&e.setLinkedRecords(o,n)}},getConnection:function(e,t,r){var n=a(l,t,null);return e.getLinkedRecord(n,r)},getConnectionID:function(e,t,r){var s=a(l,t,null),o=i(s,r);return n(e,o)},insertEdgeAfter:function(e,t,r){var n=s.get(),i=n.CURSOR,a=n.EDGES,o=e.getLinkedRecords(a);if(o){var l;if(null==r)l=o.concat(t);else{l=[];for(var u=!1,c=0;c<o.length;c++){var d=o[c];l.push(d),null!=d&&r===d.getValue(i)&&(l.push(t),u=!0)}u||l.push(t)}e.setLinkedRecords(l,a)}else e.setLinkedRecords([t],a)},insertEdgeBefore:function(e,t,r){var n=s.get(),i=n.CURSOR,a=n.EDGES,o=e.getLinkedRecords(a);if(o){var l;if(null==r)l=[t].concat(o);else{l=[];for(var u=!1,c=0;c<o.length;c++){var d=o[c];null!=d&&r===d.getValue(i)&&(l.push(t),u=!0),l.push(d)}u||l.unshift(t)}e.setLinkedRecords(l,a)}else e.setLinkedRecords([t],a)},update:function(e,t){var r=e.get(t.dataID);if(r){var i=s.get(),a=i.EDGES,o=i.END_CURSOR,l=i.HAS_NEXT_PAGE,h=i.HAS_PREV_PAGE,f=i.PAGE_INFO,_=i.PAGE_INFO_TYPE,p=i.START_CURSOR,v=r.getLinkedRecord(t.fieldKey),g=v&&v.getLinkedRecord(f);if(v){var m=n(r.getDataID(),t.handleKey),y=r.getLinkedRecord(t.handleKey),R=null!=y?y:e.get(m),b=R&&R.getLinkedRecord(f);if(R){null==y&&r.setLinkedRecord(R,t.handleKey);var E=R,I=v.getLinkedRecords(a);I&&(I=I.map((function(t){return c(e,E,t)})));var S=E.getLinkedRecords(a),D=E.getLinkedRecord(f);E.copyFieldsFrom(v),S&&E.setLinkedRecords(S,a),D&&E.setLinkedRecord(D,f);var k=[],A=t.args;if(S&&I)if(null!=A.after){var F,T=null===(F=b)||void 0===F?void 0:F.getValue(o),O=null==g?void 0:g.getValue(o);if(!(b&&A.after===T||b&&T===O))return;var P=new Set;d(S,k,P),d(I,k,P)}else if(null!=A.before){if(!b||A.before!==b.getValue(p))return;var C=new Set;d(I,k,C),d(S,k,C)}else k=I;else k=I||S;if(null!=k&&k!==S&&E.setLinkedRecords(k,a),b&&g)if(null==A.after&&null==A.before)b.copyFieldsFrom(g);else if(null!=A.before||null==A.after&&A.last){b.setValue(!!g.getValue(h),h);var L=g.getValue(p);"string"==typeof L&&b.setValue(L,p)}else if(null!=A.after||null==A.before&&A.first){b.setValue(!!g.getValue(l),l);var N=g.getValue(o);"string"==typeof N&&b.setValue(N,o)}}else{var w=e.create(m,v.getType());w.setValue(0,u),w.copyFieldsFrom(v);var x=v.getLinkedRecords(a);x&&(x=x.map((function(t){return c(e,w,t)})),w.setLinkedRecords(x,a)),r.setLinkedRecord(w,t.handleKey),(b=e.create(n(w.getDataID(),f),_)).setValue(!1,l),b.setValue(!1,h),b.setValue(null,o),b.setValue(null,p),g&&b.copyFieldsFrom(g),w.setLinkedRecord(b,f)}}else r.setValue(null,t.handleKey,void 0,r.getErrors(t.fieldKey))}}}},9776:e=>{var t={after:!0,before:!0,find:!0,first:!0,last:!0,surrounds:!0},r={CURSOR:"cursor",EDGES:"edges",END_CURSOR:"endCursor",HAS_NEXT_PAGE:"hasNextPage",HAS_PREV_PAGE:"hasPreviousPage",NODE:"node",PAGE_INFO_TYPE:"PageInfo",PAGE_INFO:"pageInfo",START_CURSOR:"startCursor"},n={inject:function(e){r=e},get:function(){return r},isConnectionCall:function(e){return t.hasOwnProperty(e.name)}};e.exports=n},8159:(e,t,r)=>{var n=(0,r(5275).default)(r(5765)),i=r(9381),a=r(9776),s=r(5056),o=(r(4446),{update:function(e,t){var r=e.get(t.dataID);if(null!=r){var n=r.getValue(t.fieldKey);"string"==typeof n?e.delete(n):Array.isArray(n)&&n.forEach((function(t){"string"==typeof t&&e.delete(t)}))}}}),l={update:function(e,t){var r=e.get(t.dataID);if(null!=r){var a=t.handleArgs.connections;null==a&&s(!1);var o=r.getValue(t.fieldKey);(Array.isArray(o)?o:[o]).forEach((function(t){if("string"==typeof t){var r,s=(0,n.default)(a);try{for(s.s();!(r=s.n()).done;){var o=r.value,l=e.get(o);null!=l&&i.deleteNode(l,t)}}catch(e){s.e(e)}finally{s.f()}}}))}}},u={update:f(i.insertEdgeAfter)},c={update:f(i.insertEdgeBefore)},d={update:_(i.insertEdgeAfter)},h={update:_(i.insertEdgeBefore)};function f(e){return function(t,r){var o,l=t.get(r.dataID);if(null!=l){var u,c,d=r.handleArgs.connections;null==d&&s(!1);try{u=l.getLinkedRecord(r.fieldKey)}catch(e){}if(!u)try{c=l.getLinkedRecords(r.fieldKey)}catch(e){}if(null!=u||null!=c){var h,f=a.get(),_=f.NODE,p=f.EDGES,v=null!==(o=c)&&void 0!==o?o:[u],g=(0,n.default)(v);try{var m=function(){var r=h.value;if(null==r)return"continue";var a=r.getLinkedRecord("node");if(!a)return"continue";var o,l=a.getDataID(),u=(0,n.default)(d);try{for(u.s();!(o=u.n()).done;){var c=o.value,f=t.get(c);if(null!=f&&!(null===(y=f.getLinkedRecords(p))||void 0===y?void 0:y.some((function(e){var t;return(null==e||null===(t=e.getLinkedRecord(_))||void 0===t?void 0:t.getDataID())===l})))){var v=i.buildConnectionEdge(t,f,r);null==v&&s(!1),e(f,v)}}}catch(e){u.e(e)}finally{u.f()}};for(g.s();!(h=g.n()).done;){var y;m()}}catch(e){g.e(e)}finally{g.f()}}}}}function _(e){return function(t,r){var o,l=t.get(r.dataID);if(null!=l){var u,c,d=r.handleArgs,h=d.connections,f=d.edgeTypeName;null==h&&s(!1),null==f&&s(!1);try{u=l.getLinkedRecord(r.fieldKey)}catch(e){}if(!u)try{c=l.getLinkedRecords(r.fieldKey)}catch(e){}if(null!=u||null!=c){var _,p=a.get(),v=p.NODE,g=p.EDGES,m=null!==(o=c)&&void 0!==o?o:[u],y=(0,n.default)(m);try{var R=function(){var r=_.value;if(null==r)return"continue";var a,o=r.getDataID(),l=(0,n.default)(h);try{for(l.s();!(a=l.n()).done;){var u=a.value,c=t.get(u);if(null!=c&&!(null===(b=c.getLinkedRecords(g))||void 0===b?void 0:b.some((function(e){var t;return(null==e||null===(t=e.getLinkedRecord(v))||void 0===t?void 0:t.getDataID())===o})))){var d=i.createEdge(t,c,r,f);null==d&&s(!1),e(c,d)}}}catch(e){l.e(e)}finally{l.f()}};for(y.s();!(_=y.n()).done;){var b;R()}}catch(e){y.e(e)}finally{y.f()}}}}}e.exports={AppendEdgeHandler:u,DeleteRecordHandler:o,PrependEdgeHandler:c,AppendNodeHandler:d,PrependNodeHandler:h,DeleteEdgeHandler:l}},7128:(e,t,r)=>{var n=r(7649),i=n.isErrorResult,a=n.isValueResult,s=r(9381),o=r(9776),l=r(8159),u=r(778),c=r(4414),d=r(5182),h=r(1908),f=r(6626),_=r(7983),p=r(1060),v=r(534),g=r(1273),m=r(5622),y=r(7367),R=r(1634),b=r(4530),E=r(2997),I=E.generateClientID,S=E.generateUniqueClientID,D=E.isClientID,k=r(4819),A=r(4051),F=r(54),T=r(8941),O=T.isSuspenseSentinel,P=T.suspenseSentinel,C=r(5131),L=r(1596),N=r(129),w=r(8541),x=r(7258),M=r(7105),V=r(6256),U=r(4945),j=r(371),K=r(6938),q=r(5165),Y=r(890),B=r(9942),z=r(2924),H=r(4096),G=r(2729),Q=r(7858),W=r(8208),J=r(2279),X=r(5250),$=r(9514),Z=r(6330),ee=r(6900),te=r(3257),re=r(9222).handlePotentialSnapshotErrors,ne=r(1571),ie=r(2081),ae=r(5748),se=r(3775),oe=r(3204),le=r(4539),ue=r(6770),ce=r(8986),de=r(4153),he=r(1094),fe=he.hasCycle,_e=he.stableCopy,pe=r(489);e.exports={Environment:w,Network:_,Observable:p,QueryResponseCache:v,RecordSource:K,Record:M,ReplaySubject:de,Store:U,areEqualSelectors:V.areEqualSelectors,createFragmentSpecResolver:k,createNormalizationSelector:V.createNormalizationSelector,createOperationDescriptor:x.createOperationDescriptor,createReaderSelector:V.createReaderSelector,createRequestDescriptor:x.createRequestDescriptor,getArgumentValues:q.getArgumentValues,getDataIDsFromFragment:V.getDataIDsFromFragment,getDataIDsFromObject:V.getDataIDsFromObject,getNode:R.getNode,getFragment:R.getFragment,getInlineDataFragment:R.getInlineDataFragment,getModuleComponentKey:q.getModuleComponentKey,getModuleOperationKey:q.getModuleOperationKey,getPaginationFragment:R.getPaginationFragment,getPluralSelector:V.getPluralSelector,getRefetchableFragment:R.getRefetchableFragment,getRequest:R.getRequest,getRequestIdentifier:ee,getSelector:V.getSelector,getSelectorsFromObject:V.getSelectorsFromObject,getSingularSelector:V.getSingularSelector,getStorageKey:q.getStorageKey,getVariablesFromFragment:V.getVariablesFromFragment,getVariablesFromObject:V.getVariablesFromObject,getVariablesFromPluralFragment:V.getVariablesFromPluralFragment,getVariablesFromSingularFragment:V.getVariablesFromSingularFragment,handlePotentialSnapshotErrors:re,graphql:R.graphql,isErrorResult:i,isValueResult:a,isFragment:R.isFragment,isInlineDataFragment:R.isInlineDataFragment,isSuspenseSentinel:O,suspenseSentinel:P,isRequest:R.isRequest,readInlineData:L,MutationTypes:f.MutationTypes,RangeOperations:f.RangeOperations,DefaultHandlerProvider:u,ConnectionHandler:s,MutationHandlers:l,VIEWER_ID:B.VIEWER_ID,VIEWER_TYPE:B.VIEWER_TYPE,applyOptimisticMutation:c,commitLocalUpdate:d,commitMutation:h,fetchQuery:g,fetchQuery_DEPRECATED:m,isRelayModernEnvironment:F,requestSubscription:z,ConnectionInterface:o,PreloadableQueryRegistry:b,RelayProfiler:ce,createPayloadFor3DField:H,RelayConcreteNode:se,RelayError:le,RelayFeatureFlags:ue,DEFAULT_HANDLE_KEY:oe.DEFAULT_HANDLE_KEY,FRAGMENTS_KEY:q.FRAGMENTS_KEY,FRAGMENT_OWNER_KEY:q.FRAGMENT_OWNER_KEY,ID_KEY:q.ID_KEY,REF_KEY:q.REF_KEY,REFS_KEY:q.REFS_KEY,ROOT_ID:q.ROOT_ID,ROOT_TYPE:q.ROOT_TYPE,TYPENAME_KEY:q.TYPENAME_KEY,deepFreeze:G,generateClientID:I,generateUniqueClientID:S,getRelayHandleKey:Z,isClientID:D,isPromise:ne,isScalarAndEqual:ie,recycleNodesInto:ae,stableCopy:_e,hasCycle:fe,getFragmentIdentifier:Q,getRefetchMetadata:$,getPaginationMetadata:W,getPaginationVariables:J,getPendingOperationsForFragment:X,getValueAtPath:te,__internal:{ResolverFragments:Y,OperationTracker:j,createRelayContext:A,getOperationVariables:N.getOperationVariables,getLocalVariables:N.getLocalVariables,fetchQuery:y.fetchQuery,fetchQueryDeduped:y.fetchQueryDeduped,getPromiseForActiveRequest:y.getPromiseForActiveRequest,getObservableForActiveRequest:y.getObservableForActiveRequest,normalizeResponse:C,withProvidedVariables:pe}}},5568:(e,t,r)=>{var n=r(5056),i="INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE";e.exports={assertInternalActorIdentifier:function(e){e!==i&&n(!1)},getActorIdentifier:function(e){return e},getDefaultActorIdentifier:function(){throw new Error("Not Implemented")},INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE:i}},9336:(e,t,r)=>{var n="actor_key",i=r(5568).getActorIdentifier;e.exports={ACTOR_IDENTIFIER_FIELD_NAME:n,getActorIdentifierFromPayload:function(e){if(null!=e&&"object"==typeof e&&"string"==typeof e[n])return i(e[n])}}},6626:(e,t,r)=>{var n=(0,r(5275).default)(r(5765)),i=r(9381),a=(r(4446),Object.freeze({RANGE_ADD:"RANGE_ADD",RANGE_DELETE:"RANGE_DELETE",NODE_DELETE:"NODE_DELETE"})),s=Object.freeze({APPEND:"append",PREPEND:"prepend"});function o(e){return e.fragment.selections&&e.fragment.selections.length>0&&"LinkedField"===e.fragment.selections[0].kind?e.fragment.selections[0].name:null}e.exports={MutationTypes:a,RangeOperations:s,convert:function(e,t,r,a){var s=r?[r]:[],l=a?[a]:[];return e.forEach((function(e){switch(e.type){case"NODE_DELETE":var r=function(e,t){var r=e.deletedIDFieldName,n=o(t);return n?function(e,t){var i=e.getRootField(n);if(i){var a=i.getValue(r);(Array.isArray(a)?a:[a]).forEach((function(t){t&&"string"==typeof t&&e.delete(t)}))}}:null}(e,t);r&&(s.push(r),l.push(r));break;case"RANGE_ADD":var a=function(e,t){var r=e.parentID,a=e.connectionInfo,s=e.edgeName;if(!r)return null;var l=o(t);return a&&l?function(e,t){var o=e.get(r);if(o){var u=e.getRootField(l);if(u){var c,d=u.getLinkedRecord(s),h=(0,n.default)(a);try{for(h.s();!(c=h.n()).done;){var f=c.value;if(d){var _=i.getConnection(o,f.key,f.filters);if(_){var p=i.buildConnectionEdge(e,_,d);if(p)switch(f.rangeBehavior){case"append":i.insertEdgeAfter(_,p);break;case"prepend":i.insertEdgeBefore(_,p)}}}}}catch(e){h.e(e)}finally{h.f()}}}}:null}(e,t);a&&(s.push(a),l.push(a));break;case"RANGE_DELETE":var u=function(e,t){var r=e.parentID,a=e.connectionKeys,s=e.pathToConnection,l=e.deletedIDFieldName;if(!r)return null;var u=o(t);return u?function(e,t){if(t){var o=[],c=t[u];if(c&&Array.isArray(l)){var d,h=(0,n.default)(l);try{for(h.s();!(d=h.n()).done;){var f=d.value;c&&"object"==typeof c&&(c=c[f])}}catch(e){h.e(e)}finally{h.f()}Array.isArray(c)?c.forEach((function(e){e&&e.id&&"object"==typeof e&&"string"==typeof e.id&&o.push(e.id)})):c&&c.id&&"string"==typeof c.id&&o.push(c.id)}else c&&"string"==typeof l&&"object"==typeof c&&("string"==typeof(c=c[l])?o.push(c):Array.isArray(c)&&c.forEach((function(e){"string"==typeof e&&o.push(e)})));!function(e,t,r,a,s){var o=a.get(e);if(o&&!(r.length<2)){for(var l=o,u=1;u<r.length-1;u++)l&&(l=l.getLinkedRecord(r[u]));if(t&&l){var c,d=(0,n.default)(t);try{var h=function(){var e=c.value,t=i.getConnection(l,e.key,e.filters);t&&s.forEach((function(e){i.deleteNode(t,e)}))};for(d.s();!(c=d.n()).done;)h()}catch(e){d.e(e)}finally{d.f()}}}}(r,a,s,e,o)}}:null}(e,t);u&&(s.push(u),l.push(u))}})),{optimisticUpdater:function(e,t){s.forEach((function(r){r(e,t)}))},updater:function(e,t){l.forEach((function(r){r(e,t)}))}}}}},7494:(e,t,r)=>{var n=r(2997).generateClientID,i=r(5165).getStableStorageKey,a=r(5056),s=function(){function e(e,t,r){this._dataID=r,this._mutator=t,this._source=e}var t=e.prototype;return t.copyFieldsFrom=function(e){this._mutator.copyFields(e.getDataID(),this._dataID)},t.getDataID=function(){return this._dataID},t.getType=function(){var e=this._mutator.getType(this._dataID);return null==e&&a(!1),e},t.getValue=function(e,t){var r=i(e,t);return this._mutator.getValue(this._dataID,r)},t.setValue=function(e,t,r,n){return o(e)||a(!1),this.setValue__UNSAFE(e,t,r,n)},t.getErrors=function(e,t){var r=i(e,t);return this._mutator.getErrors(this._dataID,r)},t.setValue__UNSAFE=function(e,t,r,n){var a=i(t,r);return this._mutator.setValue(this._dataID,a,e),null!=n&&(0===n.length?this._mutator.setErrors(this._dataID,a):this._mutator.setErrors(this._dataID,a,n)),this},t.getLinkedRecord=function(e,t){var r=i(e,t),n=this._mutator.getLinkedRecordID(this._dataID,r);return null!=n?this._source.get(n):n},t.setLinkedRecord=function(t,r,n){t instanceof e||a(!1);var s=i(r,n),o=t.getDataID();return this._mutator.setLinkedRecordID(this._dataID,s,o),this},t.getOrCreateLinkedRecord=function(e,t,r){var a=this.getLinkedRecord(e,r);if(!a){var s,o=i(e,r),l=n(this.getDataID(),o);a=null!==(s=this._source.get(l))&&void 0!==s?s:this._source.create(l,t),this.setLinkedRecord(a,e,r)}return a},t.getLinkedRecords=function(e,t){var r=this,n=i(e,t),a=this._mutator.getLinkedRecordIDs(this._dataID,n);return null==a?a:a.map((function(e){return null!=e?r._source.get(e):e}))},t.setLinkedRecords=function(e,t,r){Array.isArray(e)||a(!1);var n=i(t,r),s=e.map((function(e){return e&&e.getDataID()}));return this._mutator.setLinkedRecordIDs(this._dataID,n,s),this},t.invalidateRecord=function(){this._source.markIDForInvalidation(this._dataID)},e}();function o(e){return null==e||"object"!=typeof e||Array.isArray(e)&&e.every(o)}e.exports=s},4503:(e,t,r)=>{var n=r(7105),i=r(7148).EXISTENT,a=r(5056),s=function(){function e(e,t){this.__sources=[t,e],this._base=e,this._sink=t}var t=e.prototype;return t.unstable_getRawRecordWithChanges=function(e){var t=this._base.get(e),r=this._sink.get(e);return void 0===r?null==t?t:n.clone(t):null===r?null:null!=t?n.update(t,r):n.clone(r)},t._getSinkRecord=function(e){var t=this._sink.get(e);if(!t){var r=this._base.get(e);r||a(!1),t=n.create(e,n.getType(r)),this._sink.set(e,t)}return t},t.copyFields=function(e,t){var r=this._sink.get(e),i=this._base.get(e);r||i||a(!1);var s=this._getSinkRecord(t);i&&n.copyFields(i,s),r&&n.copyFields(r,s)},t.copyFieldsFromRecord=function(e,t){var r=this._getSinkRecord(t);n.copyFields(e,r)},t.create=function(e,t){(this._base.getStatus(e)===i||this._sink.getStatus(e)===i)&&a(!1);var r=n.create(e,t);this._sink.set(e,r)},t.delete=function(e){this._sink.delete(e)},t.getStatus=function(e){return this._sink.has(e)?this._sink.getStatus(e):this._base.getStatus(e)},t.getType=function(e){for(var t=0;t<this.__sources.length;t++){var r=this.__sources[t].get(e);if(r)return n.getType(r);if(null===r)return null}},t.getValue=function(e,t){for(var r=0;r<this.__sources.length;r++){var i=this.__sources[r].get(e);if(i){var a=n.getValue(i,t);if(void 0!==a)return a}else if(null===i)return null}},t.setValue=function(e,t,r){var i=this._getSinkRecord(e);n.setValue(i,t,r)},t.getErrors=function(e,t){for(var r=0;r<this.__sources.length;r++){var i=this.__sources[r].get(e);if(i){var a=n.getErrors(i,t);if(void 0!==a)return a}else if(null===i)return null}},t.setErrors=function(e,t,r){var i=this._getSinkRecord(e);n.setErrors(i,t,r)},t.getLinkedRecordID=function(e,t){for(var r=0;r<this.__sources.length;r++){var i=this.__sources[r].get(e);if(i){var a=n.getLinkedRecordID(i,t);if(void 0!==a)return a}else if(null===i)return null}},t.setLinkedRecordID=function(e,t,r){var i=this._getSinkRecord(e);n.setLinkedRecordID(i,t,r)},t.getLinkedRecordIDs=function(e,t){for(var r=0;r<this.__sources.length;r++){var i=this.__sources[r].get(e);if(i){var a=n.getLinkedRecordIDs(i,t);if(void 0!==a)return a}else if(null===i)return null}},t.setLinkedRecordIDs=function(e,t,r){var i=this._getSinkRecord(e);n.setLinkedRecordIDs(i,t,r)},e}();e.exports=s},3838:(e,t,r)=>{var n=r(7105),i=r(7148),a=i.EXISTENT,s=i.NONEXISTENT,o=r(5165),l=o.ROOT_ID,u=o.ROOT_TYPE,c=r(7122).readUpdatableFragment,d=r(2402).readUpdatableQuery,h=r(7494),f=r(5056),_=function(){function e(e,t,r,n){this.__mutator=e,this._handlerProvider=r||null,this._proxies={},this._getDataID=t,this._invalidatedStore=!1,this._idsMarkedForInvalidation=new Set,this._missingFieldHandlers=n}var t=e.prototype;return t.publishSource=function(e,t){var r=this;e.getRecordIDs().forEach((function(t){var i=e.getStatus(t);if(i===a){var o=e.get(t);o&&(r.__mutator.getStatus(t)!==a&&r.create(t,n.getType(o)),r.__mutator.copyFieldsFromRecord(o,t))}else i===s&&r.delete(t)})),t&&t.length&&t.forEach((function(e){var t=r._handlerProvider&&r._handlerProvider(e.handle);t||f(!1),t.update(r,e)}))},t.create=function(e,t){this.__mutator.create(e,t),delete this._proxies[e];var r=this.get(e);return r||f(!1),r},t.delete=function(e){e===l&&f(!1),delete this._proxies[e],this.__mutator.delete(e)},t.get=function(e){if(!this._proxies.hasOwnProperty(e)){var t=this.__mutator.getStatus(e);this._proxies[e]=t===a?new h(this,this.__mutator,e):t===s?null:void 0}return this._proxies[e]},t.getRoot=function(){var e=this.get(l);return e||(e=this.create(l,u)),e&&e.getType()===u||f(!1),e},t.invalidateStore=function(){this._invalidatedStore=!0},t.isStoreMarkedForInvalidation=function(){return this._invalidatedStore},t.markIDForInvalidation=function(e){this._idsMarkedForInvalidation.add(e)},t.getIDsMarkedForInvalidation=function(){return this._idsMarkedForInvalidation},t.readUpdatableQuery=function(e,t){return d(e,t,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(e,t){return c(e,t,this,this._missingFieldHandlers)},e}();e.exports=_},6959:(e,t,r)=>{var n=r(5165),i=n.ROOT_TYPE,a=n.getStorageKey,s=r(7122).readUpdatableFragment,o=r(2402).readUpdatableQuery,l=r(5056),u=function(){function e(e,t,r,n){this.__mutator=e,this.__recordSource=t,this._readSelector=r,this._missingFieldHandlers=n}var t=e.prototype;return t.create=function(e,t){return this.__recordSource.create(e,t)},t.delete=function(e){this.__recordSource.delete(e)},t.get=function(e){return this.__recordSource.get(e)},t.getRoot=function(){return this.__recordSource.getRoot()},t.getOperationRoot=function(){var e=this.__recordSource.get(this._readSelector.dataID);return e||(e=this.__recordSource.create(this._readSelector.dataID,i)),e},t._getRootField=function(e,t,r){var n=e.node.selections.find((function(e){return"LinkedField"===e.kind&&e.name===t||"RequiredField"===e.kind&&e.field.name===t}));return n&&"RequiredField"===n.kind&&(n=n.field),n&&"LinkedField"===n.kind||l(!1),n.plural!==r&&l(!1),n},t.getRootField=function(e){var t=this._getRootField(this._readSelector,e,!1),r=a(t,this._readSelector.variables);return this.getOperationRoot().getLinkedRecord(r)},t.getPluralRootField=function(e){var t=this._getRootField(this._readSelector,e,!0),r=a(t,this._readSelector.variables);return this.getOperationRoot().getLinkedRecords(r)},t.invalidateStore=function(){this.__recordSource.invalidateStore()},t.readUpdatableQuery=function(e,t){return o(e,t,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(e,t){return s(e,t,this,this._missingFieldHandlers)},e}();e.exports=u},4414:(e,t,r)=>{var n=r(1634).getRequest,i=r(54),a=r(7258).createOperationDescriptor,s=r(6626),o=r(5056);e.exports=function(e,t){i(e)||o(!1);var r=n(t.mutation);if("mutation"!==r.params.operationKind)throw new Error("commitMutation: Expected mutation operation");var l=t.optimisticUpdater,u=t.configs,c=t.optimisticResponse,d=t.variables,h=a(r,d);return u&&(l=s.convert(u,r,l).optimisticUpdater),e.applyMutation({operation:h,response:c,updater:l})}},5182:e=>{e.exports=function(e,t){e.commitUpdate(t)}},1908:(e,t,r)=>{var n=(0,r(5275).default)(r(642)),i=r(1634).getRequest,a=r(2997).generateUniqueClientID,s=r(54),o=r(7258).createOperationDescriptor,l=r(6626),u=(r(1740),r(5056));r(4446),e.exports=function(e,t){s(e)||u(!1);var r=i(t.mutation);if("mutation"!==r.params.operationKind)throw new Error("commitMutation: Expected mutation operation");if("Request"!==r.kind)throw new Error("commitMutation: Expected mutation to be of type request");var c=t.optimisticResponse,d=t.optimisticUpdater,h=t.updater,f=t.configs,_=t.cacheConfig,p=t.onError,v=t.onUnsubscribe,g=t.variables,m=t.uploadables,y=o(r,g,_,a());if("function"==typeof c&&(c=c()),f){var R=l.convert(f,r,d,h);d=R.optimisticUpdater,h=R.updater}var b=[];return{dispose:e.executeMutation({operation:y,optimisticResponse:c,optimisticUpdater:d,updater:h,uploadables:m}).subscribe({next:function(e){var r;Array.isArray(e)?e.forEach((function(e){e.errors&&b.push.apply(b,(0,n.default)(e.errors))})):e.errors&&b.push.apply(b,(0,n.default)(e.errors)),null===(r=t.onNext)||void 0===r||r.call(t)},complete:function(){var r=t.onCompleted;r&&r(e.lookup(y.fragment).data,0!==b.length?b:null)},error:p,unsubscribe:v}).unsubscribe}}},9176:(e,t,r)=>{var n=(0,r(5275).default)(r(5765)),i=r(5165).getArgumentValues,a=["id","__id","__typename","js"];function s(e,t,r,d,h,f){var _,p,v=(0,n.default)(d);try{var g=function(){var d=p.value;switch(d.kind){case"LinkedField":d.plural?Object.defineProperty(e,null!==(m=d.alias)&&void 0!==m?m:d.name,{get:u(d,r,t,h,f),set:o(d,r,t,h)}):Object.defineProperty(e,null!==(y=d.alias)&&void 0!==y?y:d.name,{get:c(d,r,t,h,f),set:l(d,r,t,h)});break;case"ScalarField":var v=null!==(_=d.alias)&&void 0!==_?_:d.name;Object.defineProperty(e,v,{get:function(){var e,a=i(null!==(e=d.args)&&void 0!==e?e:[],r),s=t.getValue(d.name,a);return null==s&&(s=function(e,t,r,i,a){var s,o=(0,n.default)(a);try{for(o.s();!(s=o.n()).done;){var l=s.value;if("scalar"===l.kind){var u=l.handle(e,r,t,i);if(void 0!==u)return u}}}catch(e){o.e(e)}finally{o.f()}}(d,a,t,h,f)),s},set:a.includes(d.name)?void 0:function(e){var n,a=i(null!==(n=d.args)&&void 0!==n?n:[],r);t.setValue__UNSAFE(e,d.name,a)}});break;case"InlineFragment":t.getType()===d.type&&s(e,t,r,d.selections,h,f);break;case"ClientExtension":s(e,t,r,d.selections,h,f);break;case"FragmentSpread":break;case"Condition":case"ActorChange":case"InlineDataFragmentSpread":case"AliasedInlineFragmentSpread":case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":case"Defer":case"ModuleImport":case"RelayLiveResolver":case"RequiredField":case"CatchField":case"Stream":case"RelayResolver":throw new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.");default:throw d.kind,new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.")}};for(v.s();!(p=v.n()).done;){var m,y;g()}}catch(e){v.e(e)}finally{v.f()}}function o(e,t,r,n){return function(a){var s,o=i(null!==(s=e.args)&&void 0!==s?s:[],t);if(null==a)throw new Error("Do not assign null to plural linked fields; assign an empty array instead.");var l=a.map((function(e){if(null==e)throw new Error("When assigning an array of items, none of the items should be null or undefined.");var t=e.__id;if(null==t)throw new Error("The __id field must be present on each item passed to the setter. This indicates a bug in Relay.");var r=n.get(t);if(null==r)throw new Error("Did not find item with data id ".concat(t," in the store."));return r}));r.setLinkedRecords(l,e.name,o)}}function l(e,t,r,n){return function(a){var s,o=i(null!==(s=e.args)&&void 0!==s?s:[],t);if(null==a)r.setValue(a,e.name,o);else{var l=a.__id;if(null==l)throw new Error("The __id field must be present on the argument. This indicates a bug in Relay.");var u=n.get(l);if(null==u)throw new Error("Did not find item with data id ".concat(l," in the store."));r.setLinkedRecord(u,e.name,o)}}}function u(e,t,r,a,o){return function(){var l,u=i(null!==(l=e.args)&&void 0!==l?l:[],t),c=r.getLinkedRecords(e.name,u);return void 0===c&&(c=function(e,t,r,i,a){var s,o=(0,n.default)(a);try{for(o.s();!(s=o.n()).done;){var l=s.value;if("pluralLinked"===l.kind){var u=l.handle(e,r,t,i);if(null!=u)return u.map((function(e){if(null!=e)return i.get(e)}))}}}catch(e){o.e(e)}finally{o.f()}}(e,u,r,a,o)),null!=c?c.map((function(r){if(null!=r){var n={};return s(n,r,t,e.selections,a,o),n}return r})):c}}function c(e,t,r,a,o){return function(){var l,u=i(null!==(l=e.args)&&void 0!==l?l:[],t),c=r.getLinkedRecord(e.name,u);if(void 0===c&&(c=function(e,t,r,i,a){var s,o=(0,n.default)(a);try{for(o.s();!(s=o.n()).done;){var l=s.value;if("linked"===l.kind){var u=l.handle(e,r,t,i);if(null!=u)return i.get(u)}}}catch(e){o.e(e)}finally{o.f()}}(e,u,r,a,o)),null!=c){var d={};return s(d,c,t,e.selections,a,o),d}return c}}e.exports={createUpdatableProxy:function(e,t,r,n,i){var a={};return s(a,e,t,r,n,i),a}}},7122:(e,t,r)=>{var n=r(1634).getFragment,i=r(6256).getVariablesFromFragment,a=r(5165).ID_KEY,s=r(9176).createUpdatableProxy,o=r(5056);e.exports={readUpdatableFragment:function(e,t,r,l){var u=n(e),c=i(u,t),d=t[a],h=r.get(d);return null==h&&o(!1),{updatableData:s(h,c,u.selections,r,l)}}}},2402:(e,t,r)=>{var n=r(1634).getUpdatableQuery,i=r(9176).createUpdatableProxy;e.exports={readUpdatableQuery:function(e,t,r,a){var s=n(e);return{updatableData:i(r.getRoot(),t,s.fragment.selections,r,a)}}}},1740:(e,t,r)=>{(0,r(5275).default)(r(6175)),r(4446),Object.prototype.hasOwnProperty,e.exports=function(){}},5320:(e,t,r)=>{var n=r(1060);e.exports={convertFetch:function(e){return function(t,r,i,a,s){var o=e(t,r,i,a,s);return o instanceof Error?n.create((function(e){return e.error(o)})):n.from(o)}}}},7983:(e,t,r)=>{var n=r(489),i=r(5320).convertFetch,a=r(5056);e.exports={create:function(e,t){var r=i(e);return{execute:function(e,i,s,o,l){var u=n(i,e.providedVariables);if("subscription"===e.operationKind)return t||a(!1),o&&a(!1),t(e,u,s);var c=s.poll;return null!=c?(o&&a(!1),r(e,u,{force:!0}).poll(c)):r(e,u,s,o,l)}}}}},1060:(e,t,r)=>{var n=r(1571),i=function(e,t){},a=function(){function e(e){this._source=e}e.create=function(t){return new e(t)},e.onUnhandledError=function(e){i=e},e.from=function(e){return function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.subscribe}(e)?s(e):n(e)?o(e):l(e)};var t=e.prototype;return t.catch=function(t){var r=this;return e.create((function(e){var n;return r.subscribe({start:function(e){n=e},next:e.next,complete:e.complete,error:function(r){try{t(r).subscribe({start:function(e){n=e},next:e.next,complete:e.complete,error:e.error})}catch(t){e.error(t,!0)}}}),function(){return n.unsubscribe()}}))},t.concat=function(t){var r=this;return e.create((function(e){var n;return r.subscribe({start:function(e){n=e},next:e.next,error:e.error,complete:function(){n=t.subscribe(e)}}),function(){n&&n.unsubscribe()}}))},t.do=function(t){var r=this;return e.create((function(e){var n=function(r){return function(){try{t[r]&&t[r].apply(t,arguments)}catch(e){i(e,!0)}e[r]&&e[r].apply(e,arguments)}};return r.subscribe({start:n("start"),next:n("next"),error:n("error"),complete:n("complete"),unsubscribe:n("unsubscribe")})}))},t.finally=function(t){var r=this;return e.create((function(e){var n=r.subscribe(e);return function(){n.unsubscribe(),t()}}))},t.ifEmpty=function(t){var r=this;return e.create((function(e){var n,i=!1;return n=r.subscribe({next:function(t){i=!0,e.next(t)},error:e.error,complete:function(){i?e.complete():n=t.subscribe(e)}}),function(){n&&n.unsubscribe()}}))},t.subscribe=function(e){return function(e,t){var r,n=!1,a=function(e){return Object.defineProperty(e,"closed",{get:function(){return n}})};function s(){if(r){if(r.unsubscribe)r.unsubscribe();else try{r()}catch(e){i(e,!0)}r=void 0}}var o=a({unsubscribe:function(){if(!n){n=!0;try{t.unsubscribe&&t.unsubscribe(o)}catch(e){i(e,!0)}finally{s()}}}});try{t.start&&t.start(o)}catch(e){i(e,!0)}if(n)return o;var l=a({next:function(e){if(!n&&t.next)try{t.next(e)}catch(e){i(e,!0)}},error:function(e,r){if(n||!t.error)n=!0,i(e,r||!1),s();else{n=!0;try{t.error(e)}catch(e){i(e,!0)}finally{s()}}},complete:function(){if(!n){n=!0;try{t.complete&&t.complete()}catch(e){i(e,!0)}finally{s()}}}});try{r=e(l)}catch(e){l.error(e,!0)}return n&&s(),o}(this._source,e)},t.map=function(t){var r=this;return e.create((function(e){var n=r.subscribe({complete:e.complete,error:e.error,next:function(r){try{var n=t(r);e.next(n)}catch(t){e.error(t,!0)}}});return function(){n.unsubscribe()}}))},t.mergeMap=function(t){var r=this;return e.create((function(n){var i=[];function a(e){this._sub=e,i.push(e)}function s(){i.splice(i.indexOf(this._sub),1),0===i.length&&n.complete()}return r.subscribe({start:a,next:function(r){try{n.closed||e.from(t(r)).subscribe({start:a,next:n.next,error:n.error,complete:s})}catch(e){n.error(e,!0)}},error:n.error,complete:s}),function(){i.forEach((function(e){return e.unsubscribe()})),i.length=0}}))},t.poll=function(t){var r=this;return e.create((function(e){var n,i;return function a(){n=r.subscribe({next:e.next,error:e.error,complete:function(){i=setTimeout(a,t)}})}(),function(){clearTimeout(i),n.unsubscribe()}}))},t.toPromise=function(){var e=this;return new Promise((function(t,r){var n=!1;e.subscribe({next:function(e){n||(n=!0,t(e))},error:r,complete:t})}))},e}();function s(e){return e instanceof a?e:a.create((function(t){return e.subscribe(t)}))}function o(e){return a.create((function(t){e.then((function(e){t.next(e),t.complete()}),t.error)}))}function l(e){return a.create((function(t){t.next(e),t.complete()}))}e.exports=a},534:(e,t,r)=>{var n=(0,r(5275).default)(r(6175)),i=r(1094).stableCopy,a=r(5056),s=function(){function e(e){var t=e.size,r=e.ttl;t>0||a(!1),r>0||a(!1),this._responses=new Map,this._size=t,this._ttl=r}var t=e.prototype;return t.clear=function(){this._responses.clear()},t.get=function(e,t){var r=this,i=o(e,t);this._responses.forEach((function(e,t){e.fetchTime+r._ttl>=Date.now()||r._responses.delete(t)}));var a=this._responses.get(i);return null==a?null:Array.isArray(a.payload)?a.payload.map((function(e){return(0,n.default)((0,n.default)({},e),{},{extensions:(0,n.default)((0,n.default)({},e.extensions),{},{cacheTimestamp:a.fetchTime})})})):(0,n.default)((0,n.default)({},a.payload),{},{extensions:(0,n.default)((0,n.default)({},a.payload.extensions),{},{cacheTimestamp:a.fetchTime})})},t.set=function(e,t,r){var n=Date.now(),i=o(e,t);if(this._responses.delete(i),this._responses.set(i,{fetchTime:n,payload:r}),this._responses.size>this._size){var a=this._responses.keys().next();a.done||this._responses.delete(a.value)}},e}();function o(e,t){return JSON.stringify(i({queryID:e,variables:t}))}e.exports=s},1373:(e,t,r)=>{var n=r(1264);e.exports=function(e,t){return{execute:function(r,i,a,s){var o=n(),l={start:function(t){e.__log({name:"network.start",networkRequestId:o,params:r,variables:i,cacheConfig:a})},next:function(t){e.__log({name:"network.next",networkRequestId:o,response:t})},error:function(t){e.__log({name:"network.error",networkRequestId:o,error:t})},complete:function(){e.__log({name:"network.complete",networkRequestId:o})},unsubscribe:function(){e.__log({name:"network.unsubscribe",networkRequestId:o})}};return t.execute(r,i,a,s,(function(t){e.__log({name:"network.info",networkRequestId:o,info:t})})).do(l)}}}},1634:(e,t,r)=>{var n=r(3775),i=r(5056);function a(e){var t=e;return"function"==typeof t?t=t():t.default&&(t=t.default),t}function s(e){var t=a(e);return"object"==typeof t&&null!==t&&t.kind===n.FRAGMENT}function o(e){var t=a(e);return"object"==typeof t&&null!==t&&t.kind===n.REQUEST}function l(e){var t=a(e);return"object"==typeof t&&null!==t&&t.kind===n.UPDATABLE_QUERY}function u(e){var t=a(e);return"object"==typeof t&&null!==t&&t.kind===n.INLINE_DATA_FRAGMENT}function c(e){var t=a(e);return s(t)||i(!1),t}r(4446),e.exports={getFragment:c,getNode:a,getPaginationFragment:function(e){var t,r=c(e),n=null===(t=r.metadata)||void 0===t?void 0:t.refetch,i=null==n?void 0:n.connection;return null===n||"object"!=typeof n||null===i||"object"!=typeof i?null:r},getRefetchableFragment:function(e){var t,r=c(e),n=null===(t=r.metadata)||void 0===t?void 0:t.refetch;return null===n||"object"!=typeof n?null:r},getRequest:function(e){var t=a(e);return o(t)||i(!1),t},getUpdatableQuery:function(e){var t=a(e);return l(t)||i(!1),t},getInlineDataFragment:function(e){var t=a(e);return u(t)||i(!1),t},graphql:function(e){i(!1)},isFragment:s,isRequest:o,isUpdatableQuery:l,isInlineDataFragment:u}},4530:e=>{var t=new(function(){function e(){this._preloadableQueries=new Map,this._callbacks=new Map}var t=e.prototype;return t.set=function(e,t){this._preloadableQueries.set(e,t);var r=this._callbacks.get(e);null!=r&&r.forEach((function(e){try{e(t)}catch(e){setTimeout((function(){throw e}),0)}}))},t.get=function(e){return this._preloadableQueries.get(e)},t.onLoad=function(e,t){var r,n=null!==(r=this._callbacks.get(e))&&void 0!==r?r:new Set;return n.add(t),this._callbacks.set(e,n),{dispose:function(){n.delete(t)}}},t.clear=function(){this._preloadableQueries.clear()},e}());e.exports=t},1273:(e,t,r)=>{var n=(0,r(5275).default)(r(6175)),i=r(1060),a=r(7258).createOperationDescriptor,s=r(9222).handlePotentialSnapshotErrors,o=r(7367),l=r(1634).getRequest,u=r(5056);function c(e,t){return o.fetchQuery(e,t).map((function(){return e.lookup(t.fragment)}))}e.exports=function(e,t,r,o){var d,h=l(t);"query"!==h.params.operationKind&&u(!1);var f=(0,n.default)({force:!0},null==o?void 0:o.networkCacheConfig),_=a(h,r,f),p=null!==(d=null==o?void 0:o.fetchPolicy)&&void 0!==d?d:"network-only";function v(t){return s(e,t.errorResponseFields),t.data}switch(p){case"network-only":return c(e,_).map(v);case"store-or-network":return"available"===e.check(_).status?i.from(e.lookup(_.fragment)).map(v):c(e,_).map(v);default:throw new Error("fetchQuery: Invalid fetchPolicy "+p)}}},7367:(e,t,r)=>{var n=r(1060),i=r(4153),a=r(5056),s="function"==typeof WeakMap?new WeakMap:new Map;function o(e,t,r){return n.create((function(s){var o=u(e),l=o.get(t);return l||r().finally((function(){return o.delete(t)})).subscribe({start:function(e){l={identifier:t,subject:new i,subjectForInFlightStatus:new i,subscription:e,promise:null},o.set(t,l)},next:function(e){var r=c(o,t);r.subject.next(e),r.subjectForInFlightStatus.next(e)},error:function(e){var r=c(o,t);r.subject.error(e),r.subjectForInFlightStatus.error(e)},complete:function(){var e=c(o,t);e.subject.complete(),e.subjectForInFlightStatus.complete()},unsubscribe:function(e){var r=c(o,t);r.subject.unsubscribe(),r.subjectForInFlightStatus.unsubscribe()}}),null==l&&a(!1),function(e,t){return n.create((function(r){var n=t.subject.subscribe(r);return function(){n.unsubscribe();var r=e.get(t.identifier);if(r){var i=r.subscription;null!=i&&0===r.subject.getObserverCount()&&(i.unsubscribe(),e.delete(t.identifier))}}}))}(o,l).subscribe(s)}))}function l(e,t,r){return n.create((function(t){var n=r.subjectForInFlightStatus.subscribe({error:t.error,next:function(n){e.isRequestActive(r.identifier)?t.next():t.complete()},complete:t.complete,unsubscribe:t.complete});return function(){n.unsubscribe()}}))}function u(e){var t=s.get(e);if(null!=t)return t;var r=new Map;return s.set(e,r),r}function c(e,t){var r=e.get(t);return null==r&&a(!1),r}e.exports={fetchQuery:function(e,t){return o(e,t.request.identifier,(function(){return e.execute({operation:t})}))},fetchQueryDeduped:o,getPromiseForActiveRequest:function(e,t){var r=u(e).get(t.identifier);return r&&e.isRequestActive(r.identifier)?new Promise((function(t,n){var i=!1;l(e,0,r).subscribe({complete:t,error:n,next:function(e){i&&t(e)}}),i=!0})):null},getObservableForActiveRequest:function(e,t){var r=u(e).get(t.identifier);return r&&e.isRequestActive(r.identifier)?l(e,0,r):null}}},5622:(e,t,r)=>{var n=r(7258).createOperationDescriptor,i=r(1634).getRequest;e.exports=function(e,t,r,a){var s=i(t);if("query"!==s.params.operationKind)throw new Error("fetchQuery: Expected query operation");var o=n(s,r,a);return e.execute({operation:o}).map((function(){return e.lookup(o.fragment).data})).toPromise()}},2997:(e,t,r)=>{var n=r(6770),i=r(6982).intern,a="client:",s=0;e.exports={generateClientID:function(e,t,r){var s=(n.STRING_INTERN_LEVEL<=0?e:i(e,n.MAX_DATA_ID_LENGTH))+":"+t;return null!=r&&(s+=":"+r),0!==s.indexOf(a)&&(s=a+s),s},generateClientObjectClientID:function(e,t,r){var n="".concat(a).concat(e,":").concat(t);return null!=r&&(n+=":"+r),n},generateUniqueClientID:function(){return"".concat(a,"local:").concat(s++)},isClientID:function(e){return 0===e.indexOf(a)}}},847:(e,t,r)=>{var n=(0,r(5275).default)(r(5765)),i=r(4503),a=r(3838),s=r(2881),o=r(2997).isClientID,l=r(4293),u=r(6159),c=r(129).getLocalVariables,d=r(7105),h=r(7148),f=h.EXISTENT,_=h.UNKNOWN,p=r(5165),v=r(975),g=v.TYPE_SCHEMA_TYPE,m=v.generateTypeID,y=r(5056),R=p.getModuleOperationKey,b=p.getStorageKey,E=p.getArgumentValues,I=function(){function e(e,t,r,n,i,a,s,o){this._getSourceForActor=e,this._getTargetForActor=t,this._getDataID=s,this._source=e(r),this._mutatorRecordSourceProxyCache=new Map;var l=this._getMutatorAndRecordProxyForActor(r),u=l[0],c=l[1];this._mostRecentlyInvalidatedAt=null,this._handlers=i,this._mutator=u,this._operationLoader=null!=a?a:null,this._recordSourceProxy=c,this._recordWasMissing=!1,this._variables=n,this._shouldProcessClientComponents=o}var t=e.prototype;return t._getMutatorAndRecordProxyForActor=function(e){var t=this._mutatorRecordSourceProxyCache.get(e);if(null==t){var r=this._getTargetForActor(e),n=new i(this._getSourceForActor(e),r);t=[n,new a(n,this._getDataID,void 0,this._handlers)],this._mutatorRecordSourceProxyCache.set(e,t)}return t},t.check=function(e,t){return this._assignClientAbstractTypes(e),this._traverse(e,t),!0===this._recordWasMissing?{status:"missing",mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt}:{status:"available",mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt}},t._getVariableValue=function(e){return this._variables.hasOwnProperty(e)||y(!1),this._variables[e]},t._handleMissing=function(){this._recordWasMissing=!0},t._handleMissingScalarField=function(e,t){if("id"!==e.name||null!=e.alias||!o(t)){var r,i=null!=e.args?E(e.args,this._variables):{},a=(0,n.default)(this._handlers);try{for(a.s();!(r=a.n()).done;){var s=r.value;if("scalar"===s.kind){var l=s.handle(e,this._recordSourceProxy.get(t),i,this._recordSourceProxy);if(void 0!==l)return l}}}catch(e){a.e(e)}finally{a.f()}this._handleMissing()}},t._handleMissingLinkField=function(e,t){var r,i=null!=e.args?E(e.args,this._variables):{},a=(0,n.default)(this._handlers);try{for(a.s();!(r=a.n()).done;){var s=r.value;if("linked"===s.kind){var o=s.handle(e,this._recordSourceProxy.get(t),i,this._recordSourceProxy);if(void 0!==o&&(null===o||this._mutator.getStatus(o)===f))return o}}}catch(e){a.e(e)}finally{a.f()}this._handleMissing()},t._handleMissingPluralLinkField=function(e,t){var r,i=this,a=null!=e.args?E(e.args,this._variables):{},s=(0,n.default)(this._handlers);try{for(s.s();!(r=s.n()).done;){var o=r.value;if("pluralLinked"===o.kind){var l=o.handle(e,this._recordSourceProxy.get(t),a,this._recordSourceProxy);if(null!=l){if(l.every((function(e){return null!=e&&i._mutator.getStatus(e)===f})))return l}else if(null===l)return null}}}catch(e){s.e(e)}finally{s.f()}this._handleMissing()},t._traverse=function(e,t){var r=this._mutator.getStatus(t);if(r===_&&this._handleMissing(),r===f){var n=this._source.get(t),i=d.getInvalidationEpoch(n);null!=i&&(this._mostRecentlyInvalidatedAt=null!=this._mostRecentlyInvalidatedAt?Math.max(this._mostRecentlyInvalidatedAt,i):i),this._traverseSelections(e.selections,t)}},t._traverseSelections=function(e,t){var r=this;e.forEach((function(n){switch(n.kind){case"ScalarField":r._checkScalar(n,t);break;case"LinkedField":n.plural?r._checkPluralLink(n,t):r._checkLink(n,t);break;case"ActorChange":r._checkActorChange(n.linkedField,t);break;case"Condition":Boolean(r._getVariableValue(n.condition))===n.passingValue&&r._traverseSelections(n.selections,t);break;case"InlineFragment":var i=n.abstractKey;if(null==i)r._mutator.getType(t)===n.type&&r._traverseSelections(n.selections,t);else{var a=r._mutator.getType(t);null==a&&y(!1);var s=m(a),o=r._mutator.getValue(s,i);!0===o?r._traverseSelections(n.selections,t):null==o&&r._handleMissing()}break;case"LinkedHandle":var d=l(n,e,r._variables);d.plural?r._checkPluralLink(d,t):r._checkLink(d,t);break;case"ScalarHandle":var h=u(n,e,r._variables);r._checkScalar(h,t);break;case"ModuleImport":r._checkModuleImport(n,t);break;case"Defer":case"Stream":r._traverseSelections(n.selections,t);break;case"FragmentSpread":var f=r._variables;r._variables=c(r._variables,n.fragment.argumentDefinitions,n.args),r._traverseSelections(n.fragment.selections,t),r._variables=f;break;case"ClientExtension":var _=r._recordWasMissing;r._traverseSelections(n.selections,t),r._recordWasMissing=_;break;case"TypeDiscriminator":var p=n.abstractKey,v=r._mutator.getType(t);null==v&&y(!1);var g=m(v);null==r._mutator.getValue(g,p)&&r._handleMissing();break;case"ClientComponent":if(!1===r._shouldProcessClientComponents)break;r._traverseSelections(n.fragment.selections,t);break;case"RelayResolver":case"RelayLiveResolver":r._checkResolver(n,t);break;case"ClientEdgeToClientObject":r._checkResolver(n.backingField,t);break;default:y(!1)}}))},t._checkResolver=function(e,t){e.fragment&&this._traverseSelections([e.fragment],t)},t._checkModuleImport=function(e,t){var r=this._operationLoader;null===r&&y(!1);var n=R(e.documentName),i=this._mutator.getValue(t,n);if(null!=i){var a=r.get(i);if(null!=a){var o=s(a),l=this._variables;this._variables=c(this._variables,o.argumentDefinitions,e.args),this._traverse(o,t),this._variables=l}else this._handleMissing()}else void 0===i&&this._handleMissing()},t._checkScalar=function(e,t){var r=b(e,this._variables),n=this._mutator.getValue(t,r);void 0===n&&void 0!==(n=this._handleMissingScalarField(e,t))&&this._mutator.setValue(t,r,n)},t._checkLink=function(e,t){var r=b(e,this._variables),n=this._mutator.getLinkedRecordID(t,r);void 0===n&&(null!=(n=this._handleMissingLinkField(e,t))?this._mutator.setLinkedRecordID(t,r,n):null===n&&this._mutator.setValue(t,r,null)),null!=n&&this._traverse(e,n)},t._checkPluralLink=function(e,t){var r=this,n=b(e,this._variables),i=this._mutator.getLinkedRecordIDs(t,n);void 0===i&&(null!=(i=this._handleMissingPluralLinkField(e,t))?this._mutator.setLinkedRecordIDs(t,n,i):null===i&&this._mutator.setValue(t,n,null)),i&&i.forEach((function(t){null!=t&&r._traverse(e,t)}))},t._checkActorChange=function(e,t){var r=b(e,this._variables),n=this._source.get(t),i=null!=n?d.getActorLinkedRecordID(n,r):n;if(null==i)void 0===i&&this._handleMissing();else{var a=i[0],s=i[1],o=this._source,l=this._mutator,u=this._recordSourceProxy,c=this._getMutatorAndRecordProxyForActor(a),h=c[0],f=c[1];this._source=this._getSourceForActor(a),this._mutator=h,this._recordSourceProxy=f,this._assignClientAbstractTypes(e),this._traverse(e,s),this._source=o,this._mutator=l,this._recordSourceProxy=u}},t._assignClientAbstractTypes=function(e){var t=e.clientAbstractTypes;if(null!=t)for(var r=0,i=Object.keys(t);r<i.length;r++){var a,s=i[r],o=(0,n.default)(t[s]);try{for(o.s();!(a=o.n()).done;){var l=a.value,u=m(l);null==this._source.get(u)&&this._mutator.create(u,g),null==this._mutator.getValue(u,s)&&this._mutator.setValue(u,s,!0)}}catch(e){o.e(e)}finally{o.f()}}},e}();e.exports={check:function(e,t,r,n,i,a,s,o,l){null!=l&&l({name:"store.datachecker.start",selector:n});var u=n.dataID,c=n.node,d=n.variables,h=new I(e,t,r,d,i,a,s,o).check(c,u);return null!=l&&l({name:"store.datachecker.end",selector:n}),h}}},7206:(e,t,r)=>{var n=r(5275).default,i=n(r(5765)),a=n(r(642)),s=r(1060),o=r(1264),l=r(2881),u=r(4539),c=r(6770),d=r(1094).stableCopy,h=r(6326),f=r(2997),_=f.generateClientID,p=f.generateUniqueClientID,v=r(129).getLocalVariables,g=r(7105),m=r(6256),y=m.createNormalizationSelector,R=m.createReaderSelector,b=r(6938),E=r(5165),I=E.ROOT_TYPE,S=E.TYPENAME_KEY,D=E.getStorageKey,k=r(5056);r(4446);var A=function(){function e(e){var t=this,r=e.actorIdentifier,n=e.getDataID,i=e.getPublishQueue,a=e.getStore,s=e.isClientPayload,l=e.operation,u=e.operationExecutions,d=e.operationLoader,h=e.operationTracker,f=e.optimisticConfig,_=e.scheduler,p=e.shouldProcessClientComponents,v=e.sink,g=e.source,m=e.treatMissingFieldsAsNull,y=e.updater,R=e.log,b=e.normalizeResponse;this._actorIdentifier=r,this._getDataID=n,this._treatMissingFieldsAsNull=m,this._incrementalPayloadsPending=!1,this._incrementalResults=new Map,this._log=R,this._executeId=o(),this._nextSubscriptionId=0,this._operation=l,this._operationExecutions=u,this._operationLoader=d,this._operationTracker=h,this._operationUpdateEpochs=new Map,this._optimisticUpdates=null,this._pendingModulePayloadsCount=0,this._getPublishQueue=i,this._scheduler=_,this._sink=v,this._source=new Map,this._state="started",this._getStore=a,this._subscriptions=new Map,this._updater=y,this._isClientPayload=!0===s,this._isSubscriptionOperation="subscription"===this._operation.request.node.params.operationKind,this._shouldProcessClientComponents=p,this._retainDisposables=new Map,this._seenActors=new Set,this._completeFns=[],this._normalizeResponse=b;var E=this._nextSubscriptionId++;c.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&null!=f&&this._processOptimisticResponse(null!=f.response?{data:f.response}:null,f.updater,!1),g.subscribe({complete:function(){return t._complete(E)},error:function(e){return t._error(e)},next:function(e){try{t._next(E,e)}catch(e){v.error(e)}},start:function(e){var r;t._start(E,e),t._log({name:"execute.start",executeId:t._executeId,params:t._operation.request.node.params,variables:t._operation.r