{"version":3,"sources":["webpack://_N_E/./node_modules/relay-runtime/lib/util/isEmptyObject.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayStoreReactFlightUtils.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayStoreSubscriptions.js","webpack://_N_E/./src/NextPageTracking.tsx","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayModernRecord.js","webpack://_N_E/./node_modules/relay-runtime/lib/query/fetchQueryInternal.js","webpack://_N_E/./node_modules/fbjs/lib/warning.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/getFragmentIdentifier.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/objectSpread2.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/createPayloadFor3DField.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayRecordSource.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/RelayReplaySubject.js","webpack://_N_E/./node_modules/relay-runtime/lib/mutations/commitMutation.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/toPrimitive.js","webpack://_N_E/./node_modules/relay-runtime/lib/mutations/commitLocalUpdate.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/cloneRelayHandleSourceField.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/createRelayContext.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayModernSelector.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/recycleNodesInto.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayModernStore.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayModernEnvironment.js","webpack://_N_E/./node_modules/relay-runtime/lib/query/PreloadableQueryRegistry.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/generateID.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/RelayProfiler.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/hasOverlappingIDs.js","webpack://_N_E/./node_modules/relay-runtime/lib/handlers/connection/ConnectionHandler.js","webpack://_N_E/./node_modules/relay-runtime/lib/mutations/RelayDeclarativeMutationConfig.js","webpack://_N_E/./node_modules/relay-runtime/lib/query/fetchQuery_DEPRECATED.js","webpack://_N_E/./node_modules/relay-runtime/lib/mutations/RelayRecordProxy.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayConcreteVariables.js","webpack://_N_E/./node_modules/relay-runtime/lib/handlers/RelayDefaultHandlerProvider.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/DataChecker.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://_N_E/./node_modules/relay-runtime/lib/mutations/RelayRecordSourceMutator.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/RelayDefaultHandleKey.js","webpack://_N_E/./node_modules/relay-runtime/lib/network/ConvertToExecuteFunction.js","webpack://_N_E//codebuild/output/src112981716/src/MyLifetime/node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?7e7d","webpack://_N_E/./node_modules/fbjs/lib/areEqual.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/ViewerPattern.js","webpack://_N_E/./node_modules/relay-runtime/lib/mutations/validateMutation.js","webpack://_N_E/./node_modules/relay-runtime/lib/query/fetchQuery.js","webpack://_N_E/./node_modules/invariant/browser.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/ClientID.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayReader.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/defaultGetDataID.js","webpack://_N_E/./node_modules/relay-runtime/lib/handlers/connection/MutationHandlers.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/resolveImmediate.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/reportMissingRequiredFields.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayOperationTracker.js","webpack://_N_E/./node_modules/relay-runtime/lib/query/GraphQLTag.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayPublishQueue.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/isRelayModernEnvironment.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/typeof.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/TypeID.js","webpack://_N_E/./node_modules/relay-runtime/index.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/getRequestIdentifier.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/RelayError.js","webpack://_N_E/./node_modules/relay-runtime/lib/handlers/connection/ConnectionInterface.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayOptimisticRecordSource.js","webpack://_N_E/./src/relay/createEnvironment/fetchGraphQL.tsx","webpack://_N_E/./src/relay/createEnvironment/index.ts","webpack://_N_E/./src/relay/createEnvironment/client.ts","webpack://_N_E/./src/theme/index.ts","webpack://_N_E/./src/theme/styles.ts","webpack://_N_E/./src/theme/colors.ts","webpack://_N_E/./src/theme/fonts.ts","webpack://_N_E/./src/theme/components/button.ts","webpack://_N_E/./src/theme/components/text.ts","webpack://_N_E/./src/theme/components/checkbox.ts","webpack://_N_E/./src/pages/_app.tsx","webpack://_N_E/./src/styles/font-face.ts","webpack://_N_E/./node_modules/relay-runtime/lib/store/createFragmentSpecResolver.js","webpack://_N_E/./node_modules/relay-runtime/lib/mutations/RelayRecordSourceProxy.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/OperationExecutor.js","webpack://_N_E/./node_modules/relay-runtime/lib/mutations/applyOptimisticMutation.js","webpack://_N_E/./node_modules/relay-runtime/lib/network/RelayQueryResponseCache.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/RelayFeatureFlags.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/toPropertyKey.js","webpack://_N_E/./node_modules/fbjs/lib/emptyFunction.js","webpack://_N_E/./node_modules/relay-runtime/lib/network/RelayNetwork.js","webpack://_N_E/./node_modules/relay-runtime/lib/network/RelayObservable.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayModernOperationDescriptor.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayRecordState.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayStoreSubscriptionsUsingMapByID.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/ResolverFragments.js","webpack://_N_E/./node_modules/relay-runtime/lib/subscription/requestSubscription.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/getRelayHandleKey.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/getOperation.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayModernFragmentSpecResolver.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/RelayConcreteNode.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayStoreUtils.js","webpack://_N_E/./node_modules/relay-runtime/lib/mutations/RelayRecordSourceSelectorProxy.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayResponseNormalizer.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/defaultRequiredFieldLogger.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/isScalarAndEqual.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/isPromise.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/cloneRelayScalarHandleSourceField.js","webpack://_N_E/./node_modules/relay-runtime/lib/index.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayReferenceMarker.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/RelayRecordSourceMapImpl.js","webpack://_N_E/./node_modules/relay-runtime/lib/store/readInlineData.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/stableCopy.js","webpack://_N_E/./node_modules/relay-runtime/lib/util/deepFreeze.js"],"names":["hasOwnProperty","Object","prototype","module","exports","obj","_key","call","invariant","getType","REACT_FLIGHT_TREE_STORAGE_KEY","REACT_FLIGHT_TYPE_NAME","REACT_FLIGHT_EXECUTABLE_DEFINITIONS_STORAGE_KEY","getReactFlightClientResponse","record","response","refineToReactFlightPayloadData","payload","status","Array","isArray","tree","queries","fragments","errors","RelayFeatureFlags","RelayReader","hasOverlappingIDs","recycleNodesInto","RelayStoreSubscriptions","log","this","_subscriptions","Set","__log","_proto","subscribe","snapshot","callback","_this","subscription","backup","stale","add","dispose","snapshotSubscriptions","source","forEach","read","selector","nextData","data","restoreSubscriptions","isMissingData","seenRecords","missingRequiredFields","updateSubscriptions","updatedRecordIDs","updatedOwners","sourceOperation","_this2","hasUpdatedRecords","size","owner","_updateSubscription","push","hasOverlappingUpdates","nextSnapshot","ENABLE_NOTIFY_SUBSCRIPTION","name","NextPageTracking","router","useRouter","handleRouteChange","url","page","getPageFromUrl","URL","pathname","TRACKING_ENABLED","global","analytics","useEffect","events","on","off","_objectSpread2","_interopRequireDefault","areEqual","deepFreeze","_require2","isClientID","ID_KEY","REF_KEY","REFS_KEY","TYPENAME_KEY","INVALIDATED_AT_KEY","ROOT_ID","clone","copyFields","sink","key","create","dataID","typeName","freeze","getDataID","getInvalidationEpoch","invalidatedAt","getLinkedRecordID","storageKey","link","getLinkedRecordIDs","links","getValue","value","merge","record1","record2","assign","setValue","setLinkedRecordID","linkedID","setLinkedRecordIDs","linkedIDs","update","prevRecord","nextRecord","updated","keys","ii","length","Observable","RelayReplaySubject","requestCachesByEnvironment","WeakMap","Map","fetchQueryDeduped","environment","identifier","fetchFn","requestCache","getRequestCache","cachedRequest","get","start","subject","subjectForInFlightStatus","set","next","cachedReq","getCachedRequest","error","_error","complete","unsubscribe","cachedRequestInstance","requestSubscription","getObserverCount","getObservableForCachedRequest","getActiveStatusObservableForCachedRequest","isRequestActive","cached","fetchQuery","operation","request","execute","getPromiseForActiveRequest","Promise","resolve","reject","resolveOnNext","getObservableForActiveRequest","warning","isEmptyObject","stableCopy","_require","getDataIDsFromFragment","getVariablesFromFragment","getSelector","fragmentNode","fragmentRef","_JSON$stringify","fragmentOwnerIdentifier","kind","selectors","map","sel","join","fragmentVariables","dataIDs","ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION","JSON","stringify","defineProperty","ownKeys","e","r","t","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","apply","arguments","getOwnPropertyDescriptors","defineProperties","__esModule","getModuleComponentKey","getModuleOperationKey","component","RelayRecordSourceMapImpl","RelayRecordSource","records","_defineProperty2","RelayObservable","_observable","_sinks","_events","i","closed","event","_complete","observer","_subscription","_toConsumableArray2","RelayDeclarativeMutationConfig","isRelayModernEnvironment","getRequest","generateUniqueClientID","createOperationDescriptor","config","mutation","params","operationKind","Error","optimisticResponse","optimisticUpdater","updater","configs","cacheConfig","onError","onUnsubscribe","variables","uploadables","_RelayDeclarativeMuta","convert","executeMutation","item","onCompleted","lookup","fragment","_typeof","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","String","Number","commitUpdate","LINKED_FIELD","getHandleStorageKey","handleField","selections","sourceField","find","alias","args","handleKey","concreteType","plural","relayContext","firstReact","react","createContext","getFragmentVariables","FRAGMENT_OWNER_KEY","FRAGMENTS_KEY","IS_WITHIN_UNMATCHED_TYPE_REFINEMENT","getSingularSelector","mixedOwner","isWithinUnmatchedTypeRefinement","argumentVariables","createReaderSelector","getPluralSelector","items","metadata","ids","id","getDataIDs","_fragment$metadata","getVariablesFromPluralFragment","getVariablesFromSingularFragment","itemVariables","node","areEqualSelectors","thisSelector","thatSelector","createNormalizationSelector","getDataIDsFromObject","object","_key2","getSelectorsFromObject","getVariablesFromObject","_key3","hasWeakSetDefined","WeakSet","hasWeakMapDefined","prevData","canRecycle","prevArray","nextArray","reduce","wasEqual","nextItem","nextValue","prevObject","nextObject","prevKeys","nextKeys","_createForOfIteratorHelper2","DataChecker","RelayModernRecord","RelayOptimisticRecordSource","RelayReferenceMarker","RelayStoreReactFlightUtils","RelayStoreSubscriptionsUsingMapByID","RelayStoreUtils","defaultGetDataID","resolveImmediate","ROOT_TYPE","RelayModernStore","options","_options$gcReleaseBuf","_options$gcScheduler","_options$getDataID","_options$log","_options$operationLoa","_gcRun","done","_gcScheduler","_gcStep","_currentWriteEpoch","_gcHoldCounter","_gcReleaseBufferSize","gcReleaseBufferSize","gcScheduler","_getDataID","_globalInvalidationEpoch","_invalidationSubscriptions","_invalidatedRecordIDs","_queryCacheExpirationTime","queryCacheExpirationTime","_operationLoader","operationLoader","_optimisticSource","_recordSource","_releaseBuffer","_roots","_shouldScheduleGC","_storeSubscriptions","ENABLE_STORE_SUBSCRIPTIONS_REFACTOR","_updatedRecordIDs","_shouldProcessClientComponents","shouldProcessClientComponents","target","has","rootRecord","initializeRecordSource","getSource","_this$_optimisticSour","check","_this$_optimisticSour2","_options$target","_options$handlers","root","globalInvalidationEpoch","rootEntry","operationLastWrittenAt","epoch","handlers","operationAvailability","operationFetchTime","mostRecentlyInvalidatedAt","Date","now","fetchTime","getAvailabilityStatus","retain","disposed","refCount","_id","scheduleGC","shift","notify","invalidateStore","_this3","_updateInvalidationSubscription","invalidatedRecordIDs","clear","temporaryRootEntry","publish","idsMarkedForInvalidation","_this$_optimisticSour3","currentWriteEpoch","targetRecord","sourceRecord","getRecordIDs","updateTargetFromSource","optimistic","holdGC","_this4","toJSON","__getUpdatedRecordIDs","lookupInvalidationState","_this5","invalidations","_RelayModernRecord$ge","checkInvalidationState","prevInvalidationState","currentInvalidations","prevInvalidations","_step","_iterator","s","n","err","f","subscribeToInvalidationState","invalidationState","_this6","invalidatedStore","_this7","some","restore","_collect","__gc","gcRun","top","_step2","startEpoch","references","_iterator2","values","mark","storeIDs","remove","OperationExecutor","RelayDefaultHandlerProvider","RelayOperationTracker","RelayPublishQueue","defaultRequiredFieldLogger","generateID","RelayModernEnvironment","_config$log","_config$requiredField","_config$UNSTABLE_defa","_config$getDataID","_config$handlerProvid","_config$scheduler","_config$isServer","_config$operationTrac","configName","_treatMissingFieldsAsNull","treatMissingFieldsAsNull","reactFlightPayloadDeserializer","reactFlightServerErrorHandler","emptyFunction","requiredFieldLogger","_defaultRenderPolicy","UNSTABLE_defaultRenderPolicy","ENABLE_PARTIAL_RENDERING_DEFAULT","_operationExecutions","_network","__wrapNetworkWithLogObserver","network","_publishQueue","store","handlerProvider","_scheduler","scheduler","_store","_isServer","isServer","__setNet","newNet","_global","window","devToolsHook","__RELAY_DEVTOOLS_HOOK__","registerEnvironment","_missingFieldHandlers","missingFieldHandlers","_operationTracker","operationTracker","_reactFlightPayloadDeserializer","_reactFlightServerErrorHandler","getStore","getNetwork","getOperationTracker","requestIdentifier","UNSTABLE_getDefaultRenderPolicy","applyUpdate","optimisticUpdate","_scheduleUpdates","run","revertUpdate","replaceUpdate","newUpdate","applyMutation","optimisticConfig","_execute","createSource","_sink","isClientPayload","_checkSelectorAndHandleMissingFields","commitPayload","from","readSelector","result","commitSource","task","schedule","_ref","_ref2","_this8","force","executeWithSource","_ref3","_this$configName","concat","_ref4","_this9","executor","operationExecutions","publishQueue","cancel","that","transactionID","logObserver","info","preloadableQueryRegistry","PreloadableQueryRegistry","_preloadableQueries","_callbacks","callbacks","cb","setTimeout","onLoad","_this$_callbacks$get","iter","iterator","profileHandlersByName","defaultProfiler","stop","RelayProfiler","profile","state","stopHandlers","stopHandler","unshift","attachProfileHandler","handler","detachProfileHandler","array","element","index","indexOf","splice","removeFromArray","ITERATOR_KEY","ConnectionInterface","getRelayHandleKey","generateClientID","getStableStorageKey","CONNECTION","NEXT_EDGE_INDEX","buildConnectionEdge","connection","edge","EDGES","edgeIndex","edgeID","connectionEdge","copyFieldsFrom","mergeEdges","sourceEdges","targetEdges","nodeIDs","NODE","getLinkedRecord","nodeID","createEdge","edgeType","setLinkedRecord","deleteNode","_ConnectionInterface$5","edges","getLinkedRecords","nextEdges","slice","setLinkedRecords","getConnection","filters","getConnectionID","recordID","insertEdgeAfter","newEdge","cursor","_ConnectionInterface$2","CURSOR","foundCursor","insertEdgeBefore","_ConnectionInterface$4","_ConnectionInterface$","END_CURSOR","HAS_NEXT_PAGE","HAS_PREV_PAGE","PAGE_INFO","PAGE_INFO_TYPE","START_CURSOR","serverConnection","fieldKey","serverPageInfo","clientConnectionID","clientConnectionField","clientConnection","clientPageInfo","_connection","_serverEdges","prevEdges","prevPageInfo","after","before","_nodeIDs","last","startCursor","first","endCursor","serverEdges","ConnectionHandler","MutationTypes","RANGE_ADD","RANGE_DELETE","NODE_DELETE","RangeOperations","APPEND","PREPEND","getRootField","configOptimisticUpdates","configUpdates","type","nodeDeleteResult","deletedIDFieldName","rootField","deleteID","nodeDelete","rangeAddResult","parentID","connectionInfo","edgeName","parent","serverEdge","clientEdge","rangeBehavior","rangeAdd","rangeDeleteResult","connectionKeys","pathToConnection","deleteIDs","deletedIDField","eachField","idObject","recordProxy","_step3","_iterator3","_loop","rangeDelete","eachOptimisticUpdater","eachUpdater","taggedNode","query","toPromise","RelayRecordProxy","mutator","_dataID","_mutator","_source","isValidLeafValue","getOrCreateLinkedRecord","linkedRecord","_this$_source$get","clientID","invalidateRecord","markIDForInvalidation","every","rootVariables","argumentDefinitions","definition","defaultValue","getOperationVariables","operationVariables","def","MutationHandlers","handle","DeleteRecordHandler","DeleteEdgeHandler","AppendEdgeHandler","PrependEdgeHandler","AppendNodeHandler","PrependNodeHandler","RelayConcreteNode","RelayRecordSourceMutator","RelayRecordSourceProxy","cloneRelayHandleSourceField","cloneRelayScalarHandleSourceField","getOperation","EXISTENT","UNKNOWN","generateTypeID","CONDITION","CLIENT_COMPONENT","CLIENT_EXTENSION","DEFER","FLIGHT_FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT","LINKED_HANDLE","MODULE_IMPORT","SCALAR_FIELD","SCALAR_HANDLE","STREAM","TYPE_DISCRIMINATOR","getStorageKey","getArgumentValues","_mostRecentlyInvalidatedAt","_handlers","_recordSourceProxy","_recordWasMissing","_variables","_traverse","_getVariableValue","_handleMissing","_getDataForHandlers","field","_handleMissingScalarField","_this$_getDataForHand","newValue","_handleMissingLinkField","_this$_getDataForHand2","getStatus","_handleMissingPluralLinkField","_this$_getDataForHand3","Math","max","_traverseSelections","selection","_checkScalar","_checkPluralLink","_checkLink","condition","passingValue","abstractKey","ENABLE_PRECISE_TYPE_REFINEMENT","recordType","typeID","implementsInterface","_handleField","_checkModuleImport","recordWasMissing","_abstractKey","_recordType","_typeID","ENABLE_REACT_FLIGHT_COMPONENT_FIELD","_checkFlightField","moduleImport","operationKey","documentName","operationReference","normalizationRootNode","fieldValue","reachableExecutableDefinitions","_step4","prevVariables","_iterator4","arrayLikeToArray","arr","base","__sources","_base","unstable_getRawRecordWithChanges","baseRecord","sinkRecord","_getSinkRecord","sourceID","sinkID","sinkSource","baseSource","copyFieldsFromRecord","DEFAULT_HANDLE_KEY","convertFetch","fn","logRequestInfo","__NEXT_P","aStackPool","bStackPool","eq","a","b","aStack","bStack","objToStr","toString","className","isNaN","multiline","ignoreCase","constructor","valueOf","pop","VIEWER_ID","VIEWER_TYPE","fetchQueryInternal","reportMissingRequiredFields","getNetworkObservable","_options$fetchPolicy","queryNode","networkCacheConfig","fetchPolicy","readData","format","c","d","argIndex","replace","framesToPop","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","PREFIX","localID","INLINE_DATA_FRAGMENT_SPREAD","REQUIRED_FIELD","RELAY_RESOLVER","_require3","FRAGMENT_PROP_NAME_KEY","MODULE_COMPONENT_KEY","withResolverContext","recordSource","_isMissingData","_isWithinUnmatchedTypeRefinement","_missingRequiredFields","_owner","_seenRecords","_selector","_this$_selector","isDataExpectedToBePresent","typeRecord","_maybeReportUnexpectedNull","fieldPath","action","_this$_missingRequire","path","fields","ENABLE_REQUIRED_DIRECTIVES","_readRequiredField","_readScalar","_readPluralLink","_readLink","parentIsMissingData","parentIsWithinUnmatchedTypeRefinement","_typeName","ENABLE_RELAY_RESOLVERS","_readResolverField","_createFragmentPointer","_readModuleImport","_createInlineDataOrResolverFragmentPointer","_hasExpectedData2","_readFlightField","resolverModule","__id","__fragmentOwner","__fragments","resolverResult","getDataForResolverFragment","singularReaderSelector","_resolverFragmentData","resolverFragmentData","answer","_field$alias","applicationName","reactFlightClientResponseRecordID","reactFlightClientResponseRecord","clientResponse","_field$alias2","_field$alias3","_field$alias4","linkedArray","nextIndex","prevItem","componentKey","fragmentName","fragmentPropName","fragmentSpread","fragmentPointers","fragmentSpreadOrFragment","inlineData","idOrIds","connections","handleArgs","connectionID","edgeUpdater","nodeUpdater","insertFn","singleServerEdge","_unused","_unused2","serverEdgeList","serverNode","serverNodeId","_connection$getLinked","_edge$getLinkedRecord","_serverNodes","singleServerNode","serverNodes","_payload$handleArgs","edgeTypeName","_unused3","_unused4","serverNodeList","_loop2","_step5","_iterator5","_connection$getLinked2","_edge$getLinkedRecord2","resolvedPromise","throwNext","then","len","arr2","allowArrayLike","it","F","_e","normalCompletion","didErr","step","_e2","_missingRequiredField","_ownersToPendingOperationsIdentifier","_pendingOperationsToOwnersIdentifier","_ownersIdentifierToPromise","pendingOperation","affectedOwners","pendingOperationIdentifier","newlyAffectedOwnersIdentifier","ownerIdentifier","pendingOperationsAffectingOwner","ownersAffectedByOperationIdentifier","_ownerIdentifier","_resolveOwnerResolvers","affectedOwnersIdentifier","completedOwnersIdentifier","updatedOwnersIdentifier","_ownerIdentifier2","_ownerIdentifier3","promiseEntry","getPromiseForPendingOperationsAffectingOwner","cachedPromiseEntry","promise","getNode","isFragment","FRAGMENT","isRequest","REQUEST","isInlineDataFragment","INLINE_DATA_FRAGMENT","getFragment","getPaginationFragment","refetch","getRefetchableFragment","_fragment$metadata2","getInlineDataFragment","graphql","strings","_global$ErrorUtils$ap","_global$ErrorUtils","RelayRecordSourceSelectorProxy","applyWithGuard","ErrorUtils","context","_hasStoreSnapshot","_handlerProvider","_pendingBackupRebase","_pendingData","_pendingOptimisticUpdates","_appliedOptimisticUpdates","_gcHold","revertAll","_commitData","_applyUpdates","_publishSourceFromPayload","pendingPayload","fieldPayloads","recordSourceProxy","fieldPayload","lookupSelector","getIDsMarkedForInvalidation","isStoreMarkedForInvalidation","payloadInvalidatedStore","processUpdate","storeUpdater","selectorData","recordSourceSelectorProxy","publishSource","minLen","test","Boolean","isTypeID","TYPE_SCHEMA_TYPE","parameters","requestID","cacheID","createError","messageFormat","_len","messageParams","message","taalOpcodes","stack","_len2","createWarning","_len3","CONNECTION_CALLS","surrounds","CLIENT_MUTATION_ID","inject","newConfig","isConnectionCall","UNPUBLISH_RECORD_SENTINEL","__UNPUBLISH_RECORD_SENTINEL","merged","fetchGraphQL","fetch","getUrl","method","credentials","headers","Accept","body","text","json","createEnvironment","Network","Environment","Store","RecordSource","overrides","styles","bg","color","minWidth","_hover","textDecoration","colors","transparent","black","white","grey","50","100","300","400","900","red","blue","200","500","800","orange","yellow","green","teal","fonts","heading","mono","digit","components","Button","baseStyle","fontWeight","sizes","md","fontSize","variants","defaultProps","colorScheme","Text","Checkbox","control","padding","_checked","extendTheme","init","App","children","MyLifetimeContainer","Component","pageProps","theme","flex","display","flexDirection","maxW","p","bgColor","RelayModernFragmentSpecResolver","containerName","props","rootIsQueryRenderer","NONEXISTENT","__mutator","_proxies","_invalidatedStore","_idsMarkedForInvalidation","getRoot","toPropertyKey","configurable","writable","RelayError","RelayResponseNormalizer","Executor","_incrementalPayloadsPending","_incrementalResults","_nextSubscriptionId","_operation","_operationUpdateEpochs","_optimisticUpdates","_pendingModulePayloadsCount","_state","_updater","_isClientPayload","_isSubscriptionOperation","_error2","_next","_start","_processOptimisticResponse","sub","optimisticUpdates","_completeOperationTracker","_retainDisposable","_updateActiveState","activeState","_schedule","_id2","cancellationToken","_error3","_handleNext","_maybeCompleteSubscriptionOperationTracking","_handleErrorResponse","responses","results","extensions","messages","responseWithData","_handleOptimisticResponses","_response$extensions","responsePart","_responsePart$extensi","isOptimistic","responsesWithData","x","_x$extensions","is_final","_partitionGraphQLResp","nonIncrementalResponses","incrementalResponses","label","partitionGraphQLResponses","hasNonIncrementalResponses","payloadFollowups","_processResponses","ENABLE_BATCHED_STORE_UPDATES","_updateOperationTracker","_processPayloadFollowups","_payloadFollowups","_processIncrementalResponses","_updatedOwners","ENABLE_UNIQUE_SUBSCRIPTION_ROOT","__relay_subscription_root_id","_updatedOwners2","normalizeResponse","validateOptimisticResponsePayload","_processOptimisticFollowups","incrementalPlaceholders","moduleImportPayloads","isFinal","moduleImportPayload","_processAsyncOptimisticModuleImport","moduleImportOptimisticUpdates","_processOptimisticModuleImport","_normalizeModuleImport","modulePayload","load","_this$_optimisticUpda","payloadPart","relayPayload","payloads","_processModuleImportPayload","incrementalPlaceholder","_processIncrementalPlaceholder","relayPayloads","placeholder","_processDeferResponse","nextID","_this10","_handleModuleImportPayload","_id3","decrementPendingCount","_error4","_relayPayload$fieldPa","pathKey","resultForLabel","resultForPath","pendingResponses","nextParentRecord","nextParentPayloads","parentRecord","parentPayloads","fieldID","previousParentEntry","handlePayloads","dedupePayload","stableStringify","_this11","incrementalResponse","_pathKey","_resultForPath","_placeholder","_processStreamResponse","parentEntry","_response$extensions2","handleFieldsRelayPayload","_this$_normalizeStrea","_normalizeStreamItem","itemID","itemIndex","prevIDs","currentParentRecord","currentItems","currentItem","nextItems","normalizationPath","_field$concreteType","_this$_getDataID","responseKey","finalPathEntry","parseInt","nextIDs","_response$extensions3","normalize","RelayQueryResponseCache","ttl","_responses","_size","_ttl","queryID","cacheKey","getCacheKey","cacheTimestamp","firstKey","ENABLE_VARIABLE_CONNECTION_KEY","ENABLE_RELAY_CONTAINERS_SUSPENSE","ENABLE_FRIENDLY_QUERY_NAME_GQL_URL","ENABLE_LOAD_QUERY_REQUEST_DEDUPING","ENABLE_DO_NOT_WRAP_LIVE_QUERY","arg","makeEmptyFunction","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","thatReturnsArgument","observeFetch","pollInterval","poll","isPromise","hostReportError","_isUncaughtThrownError","onUnhandledError","isObservable","fromObservable","fromPromise","fromValue","error2","current","both","ifEmpty","alternate","hasValue","cleanup","withClosed","doCleanup","isUncaughtThrownError","_subscribe","mapValue","mergeMap","subscriptions","_sub","timeout","clearTimeout","resolved","val","getRequestIdentifier","createRequestDescriptor","requestDescriptor","operationDescriptor","_notifiedRevision","_snapshotRevision","_subscriptionsByDataId","_staleSubscriptions","notifiedRevision","snapshotRevision","dataId","subscriptionsForDataId","prevSeenRecords","_updateSubscriptionsMap","updatedRecordId","subcriptionsForDataId","_dataId","_subscriptionsForDataId","contextStack","readFragment","fragmentInput","fragmentSelector","onNext","_responses$","_responses$$extension","_responses$extensions","handleName","fieldName","SPLIT_OPERATION","isScalarAndEqual","_stale","_callback","_context","_data","_fragments","_props","_resolvers","_rootIsQueryRenderer","setProps","disposeCallback","resolver","prop","_nextItem","setCallback","ownedSelectors","ownedSelector","SelectorListResolver","_onChange","setSelector","SelectorResolver","setVariables","_key4","_snapshot","_environment","_proto2","_getPromiseForActiveR","_proto3","disposable","LITERAL","LIST_VALUE","LOCAL_ARGUMENT","OBJECT_VALUE","OPERATION","ROOT_ARGUMENT","VARIABLE","getArgumentValue","getStableVariableValue","variableName","_value","formatStorageKey","argValues","argName","dynamicKey","filterArgs","__recordSource","_readSelector","getOperationRoot","_getRootField","getPluralRootField","_require4","_require5","_require6","_getDataId","_handleFieldPayloads","_incrementalPlaceholders","_isClientExtension","_isUnmatchedAbstractType","_moduleImportPayloads","_path","_getRecordType","_normalizeField","_typeName2","_implementsInterface","parentIsUnmatchedAbstractType","_implementsInterface2","_typeName3","_typeRecord","_normalizeDefer","_normalizeStream","isClientExtension","_normalizeFlightField","defer","stream","componentReference","_normalizePluralLink","_normalizeLink","reactFlightPayload","reactFlightID","reactFlightClientResponse","__typename","_typeName4","_field$concreteType2","_typeName5","_validateRecordType","_field$concreteType3","_validateConflictingFieldsWithIdenticalId","_validateConflictingLinkedFieldsWithIdenticalId","prevID","valueA","valueB","GraphQLTag","RelayConcreteVariables","RelayDefaultHandleKey","RelayModernOperationDescriptor","RelayModernSelector","RelayNetwork","ViewerPattern","applyOptimisticMutation","commitLocalUpdate","commitMutation","createFragmentSpecResolver","createPayloadFor3DField","createRelayContext","fetchQuery_DEPRECATED","getFragmentIdentifier","readInlineData","QueryResponseCache","Record","ReplaySubject","DefaultHandlerProvider","__internal","OperationTracker","_operationName","_references","_traversePluralLink","_traverseLink","_traverseModuleImport","_traverseFlightField","RelayRecordState","RelayMapRecordSourceMapImpl","_records","_step$value","_fragmentRef$FRAGMENT","inlineDataFragment","sort","stable","getOwnPropertyNames","property","isFrozen"],"mappings":"2GAYA,IAAIA,EAAiBC,OAAOC,UAAUF,eAYtCG,EAAOC,QAVP,SAAuBC,GACrB,IAAK,IAAIC,KAAQD,EACf,GAAIL,EAAeO,KAAKF,EAAKC,GAC3B,OAAO,EAIX,OAAO,I,oCCTT,IAAIE,EAAY,EAAQ,QAGpBC,EADW,EAAQ,QACAA,QAKnBC,EAAgC,OAChCC,EAAyB,uBAqB7BR,EAAOC,QAAU,CACfQ,gDAxBoD,wBAyBpDF,8BAA+BA,EAC/BC,uBAAwBA,EACxBE,6BAfF,SAAsCC,GAClCL,EAAQK,KAAYH,GAAoLH,GAAU,GACpN,IAAIO,EAAWD,EAAoC,KAEnD,OAAgB,MAAZC,EACKA,EAGF,MAQPC,+BAxBF,SAAwCC,GACtC,OAAe,MAAXA,GAAsC,kBAAZA,GAAkD,kBAAnBA,EAAQC,SAAwBC,MAAMC,QAAQH,EAAQI,OAA0B,OAAjBJ,EAAQI,OAAkBF,MAAMC,QAAQH,EAAQK,UAAaH,MAAMC,QAAQH,EAAQM,YAAeJ,MAAMC,QAAQH,EAAQO,QAI7OP,EAHE,Q,oCCbX,IAAIQ,EAAoB,EAAQ,QAE5BC,EAAc,EAAQ,QAItBC,GAFa,EAAQ,QAED,EAAQ,SAE5BC,EAAmB,EAAQ,QAE3BC,EAAuC,WACzC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AAQ,QACMA,cAkB9BvR,EAAOC,QAhBP,SAAwBwP,EAAUvE,GAChC,IAAI2wC,EAEAC,EAAqBre,EAAsBhuB,GAE/C,GAAmB,MAAfvE,EACF,OAAOA,EAGgB,kBAAhBA,GAA8J7K,GAAU,GAEjL,IAAIw4B,EAAsE,QAAxDgjB,EAAwB3wC,EAAYqG,UAAsD,IAA1BsqC,OAAmC,EAASA,EAAsBC,EAAmB53C,MAEvK,OADgB,MAAd20B,GAAgMx4B,GAAU,GACrMw4B,I,kCCGT74B,EAAOC,QAnBP,SAAS2K,EAAW5D,GAClB,IAAKA,GAA0B,kBAAVA,EACnB,OAAOA,EAGT,GAAIhG,MAAMC,QAAQ+F,GAChB,OAAOA,EAAMuE,IAAIX,GAMnB,IAHA,IAAI9C,EAAOhI,OAAOgI,KAAKd,GAAO+0C,OAC1BC,EAAS,GAEJvuC,EAAI,EAAGA,EAAI3F,EAAKE,OAAQyF,IAC/BuuC,EAAOl0C,EAAK2F,IAAM7C,EAAW5D,EAAMc,EAAK2F,KAG1C,OAAOuuC,I,yDCFTh8C,EAAOC,QAbP,SAASqF,EAAWwN,GAUlB,OATAhT,OAAOwG,OAAOwM,GACdhT,OAAOm8C,oBAAoBnpC,GAAQlQ,SAAQ,SAAUsB,GAEnD,IAAIg4C,EAAWppC,EAAO5O,GAElBg4C,GAAgC,kBAAbA,IAA0Bp8C,OAAOq8C,SAASD,IAC/D52C,EAAW42C,MAGRppC,K","file":"static/chunks/pages/_app-60c1a61c3639b8ed56d2.js","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n * @emails oncall+relay\n */\n'use strict';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction isEmptyObject(obj) {\n for (var _key in obj) {\n if (hasOwnProperty.call(obj, _key)) {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = isEmptyObject;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar invariant = require('invariant');\n\nvar _require = require('./RelayModernRecord'),\n getType = _require.getType;\n\n// Reachable (client) executable definitions encountered while server component\n// rendering\nvar REACT_FLIGHT_EXECUTABLE_DEFINITIONS_STORAGE_KEY = 'executableDefinitions';\nvar REACT_FLIGHT_TREE_STORAGE_KEY = 'tree';\nvar REACT_FLIGHT_TYPE_NAME = 'ReactFlightComponent';\n\nfunction refineToReactFlightPayloadData(payload) {\n if (payload == null || typeof payload !== 'object' || typeof payload.status !== 'string' || !Array.isArray(payload.tree) && payload.tree !== null || !Array.isArray(payload.queries) || !Array.isArray(payload.fragments) || !Array.isArray(payload.errors)) {\n return null;\n }\n\n return payload;\n}\n\nfunction getReactFlightClientResponse(record) {\n !(getType(record) === REACT_FLIGHT_TYPE_NAME) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'getReactFlightClientResponse(): Expected a ReactFlightComponentRecord, ' + 'got %s.', record) : invariant(false) : void 0;\n var response = record[REACT_FLIGHT_TREE_STORAGE_KEY];\n\n if (response != null) {\n return response;\n }\n\n return null;\n}\n\nmodule.exports = {\n REACT_FLIGHT_EXECUTABLE_DEFINITIONS_STORAGE_KEY: REACT_FLIGHT_EXECUTABLE_DEFINITIONS_STORAGE_KEY,\n REACT_FLIGHT_TREE_STORAGE_KEY: REACT_FLIGHT_TREE_STORAGE_KEY,\n REACT_FLIGHT_TYPE_NAME: REACT_FLIGHT_TYPE_NAME,\n getReactFlightClientResponse: getReactFlightClientResponse,\n refineToReactFlightPayloadData: refineToReactFlightPayloadData\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar RelayFeatureFlags = require('../util/RelayFeatureFlags');\n\nvar RelayReader = require('./RelayReader');\n\nvar deepFreeze = require('../util/deepFreeze');\n\nvar hasOverlappingIDs = require('./hasOverlappingIDs');\n\nvar recycleNodesInto = require('../util/recycleNodesInto');\n\nvar RelayStoreSubscriptions = /*#__PURE__*/function () {\n function RelayStoreSubscriptions(log) {\n this._subscriptions = new Set();\n this.__log = log;\n }\n\n var _proto = RelayStoreSubscriptions.prototype;\n\n _proto.subscribe = function subscribe(snapshot, callback) {\n var _this = this;\n\n var subscription = {\n backup: null,\n callback: callback,\n snapshot: snapshot,\n stale: false\n };\n\n var dispose = function dispose() {\n _this._subscriptions[\"delete\"](subscription);\n };\n\n this._subscriptions.add(subscription);\n\n return {\n dispose: dispose\n };\n };\n\n _proto.snapshotSubscriptions = function snapshotSubscriptions(source) {\n this._subscriptions.forEach(function (subscription) {\n // Backup occurs after writing a new \"final\" payload(s) and before (re)applying\n // optimistic changes. Each subscription's `snapshot` represents what was *last\n // published to the subscriber*, which notably may include previous optimistic\n // updates. Therefore a subscription can be in any of the following states:\n // - stale=true: This subscription was restored to a different value than\n // `snapshot`. That means this subscription has changes relative to its base,\n // but its base has changed (we just applied a final payload): recompute\n // a backup so that we can later restore to the state the subscription\n // should be in.\n // - stale=false: This subscription was restored to the same value as\n // `snapshot`. That means this subscription does *not* have changes relative\n // to its base, so the current `snapshot` is valid to use as a backup.\n if (!subscription.stale) {\n subscription.backup = subscription.snapshot;\n return;\n }\n\n var snapshot = subscription.snapshot;\n var backup = RelayReader.read(source, snapshot.selector);\n var nextData = recycleNodesInto(snapshot.data, backup.data);\n backup.data = nextData; // backup owns the snapshot and can safely mutate\n\n subscription.backup = backup;\n });\n };\n\n _proto.restoreSubscriptions = function restoreSubscriptions() {\n this._subscriptions.forEach(function (subscription) {\n var backup = subscription.backup;\n subscription.backup = null;\n\n if (backup) {\n if (backup.data !== subscription.snapshot.data) {\n subscription.stale = true;\n }\n\n subscription.snapshot = {\n data: subscription.snapshot.data,\n isMissingData: backup.isMissingData,\n seenRecords: backup.seenRecords,\n selector: backup.selector,\n missingRequiredFields: backup.missingRequiredFields\n };\n } else {\n subscription.stale = true;\n }\n });\n };\n\n _proto.updateSubscriptions = function updateSubscriptions(source, updatedRecordIDs, updatedOwners, sourceOperation) {\n var _this2 = this;\n\n var hasUpdatedRecords = updatedRecordIDs.size !== 0;\n\n this._subscriptions.forEach(function (subscription) {\n var owner = _this2._updateSubscription(source, subscription, updatedRecordIDs, hasUpdatedRecords, sourceOperation);\n\n if (owner != null) {\n updatedOwners.push(owner);\n }\n });\n }\n /**\n * Notifies the callback for the subscription if the data for the associated\n * snapshot has changed.\n * Additionally, updates the subscription snapshot with the latest snapshot,\n * and marks it as not stale.\n * Returns the owner (RequestDescriptor) if the subscription was affected by the\n * latest update, or null if it was not affected.\n */\n ;\n\n _proto._updateSubscription = function _updateSubscription(source, subscription, updatedRecordIDs, hasUpdatedRecords, sourceOperation) {\n var backup = subscription.backup,\n callback = subscription.callback,\n snapshot = subscription.snapshot,\n stale = subscription.stale;\n var hasOverlappingUpdates = hasUpdatedRecords && hasOverlappingIDs(snapshot.seenRecords, updatedRecordIDs);\n\n if (!stale && !hasOverlappingUpdates) {\n return;\n }\n\n var nextSnapshot = hasOverlappingUpdates || !backup ? RelayReader.read(source, snapshot.selector) : backup;\n var nextData = recycleNodesInto(snapshot.data, nextSnapshot.data);\n nextSnapshot = {\n data: nextData,\n isMissingData: nextSnapshot.isMissingData,\n seenRecords: nextSnapshot.seenRecords,\n selector: nextSnapshot.selector,\n missingRequiredFields: nextSnapshot.missingRequiredFields\n };\n\n if (process.env.NODE_ENV !== \"production\") {\n deepFreeze(nextSnapshot);\n }\n\n subscription.snapshot = nextSnapshot;\n subscription.stale = false;\n\n if (nextSnapshot.data !== snapshot.data) {\n if (this.__log && RelayFeatureFlags.ENABLE_NOTIFY_SUBSCRIPTION) {\n this.__log({\n name: 'store.notify.subscription',\n sourceOperation: sourceOperation,\n snapshot: snapshot,\n nextSnapshot: nextSnapshot\n });\n }\n\n callback(nextSnapshot);\n return snapshot.selector.owner;\n }\n };\n\n return RelayStoreSubscriptions;\n}();\n\nmodule.exports = RelayStoreSubscriptions;","import { useEffect } from 'react'\nimport { useRouter } from 'next/router'\nimport { getPageFromUrl } from '@/routes'\nimport { TRACKING_ENABLED } from '@/constant'\n\nconst NextPageTracking = () => {\n const router = useRouter()\n const handleRouteChange = (url: string) => {\n // have this here as needed to form url\n // we never use the base url\n const page = getPageFromUrl(new URL(url, 'https://www.mylifetime.co.nz').pathname)\n if (TRACKING_ENABLED) {\n global.analytics.page(page)\n }\n }\n useEffect(() => {\n handleRouteChange(router.pathname)\n }, [])\n\n useEffect(() => {\n router.events.on('routeChangeComplete', handleRouteChange)\n return () => {\n router.events.off('routeChangeComplete', handleRouteChange)\n }\n }, [router.events])\n return null\n}\nexport default NextPageTracking\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar areEqual = require(\"fbjs/lib/areEqual\");\n\nvar deepFreeze = require('../util/deepFreeze');\n\nvar invariant = require('invariant');\n\nvar warning = require(\"fbjs/lib/warning\");\n\nvar _require = require('./ClientID'),\n isClientID = _require.isClientID;\n\nvar _require2 = require('./RelayStoreUtils'),\n ID_KEY = _require2.ID_KEY,\n REF_KEY = _require2.REF_KEY,\n REFS_KEY = _require2.REFS_KEY,\n TYPENAME_KEY = _require2.TYPENAME_KEY,\n INVALIDATED_AT_KEY = _require2.INVALIDATED_AT_KEY,\n ROOT_ID = _require2.ROOT_ID;\n\n/**\n * @public\n *\n * Low-level record manipulation methods.\n *\n * A note about perf: we use long-hand property access rather than computed\n * properties in this file for speed ie.\n *\n * const object = {};\n * object[KEY] = value;\n * record[storageKey] = object;\n *\n * instead of:\n *\n * record[storageKey] = {\n * [KEY]: value,\n * };\n *\n * The latter gets transformed by Babel into something like:\n *\n * function _defineProperty(obj, key, value) {\n * if (key in obj) {\n * Object.defineProperty(obj, key, {\n * value: value,\n * enumerable: true,\n * configurable: true,\n * writable: true,\n * });\n * } else {\n * obj[key] = value;\n * }\n * return obj;\n * }\n *\n * record[storageKey] = _defineProperty({}, KEY, value);\n *\n * A quick benchmark shows that computed property access is an order of\n * magnitude slower (times in seconds for 100,000 iterations):\n *\n * best avg sd\n * computed 0.02175 0.02292 0.00113\n * manual 0.00110 0.00123 0.00008\n */\n\n/**\n * @public\n *\n * Clone a record.\n */\nfunction clone(record) {\n return (0, _objectSpread2[\"default\"])({}, record);\n}\n/**\n * @public\n *\n * Copies all fields from `source` to `sink`, excluding `__id` and `__typename`.\n *\n * NOTE: This function does not treat `id` specially. To preserve the id,\n * manually reset it after calling this function. Also note that values are\n * copied by reference and not value; callers should ensure that values are\n * copied on write.\n */\n\n\nfunction copyFields(source, sink) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n if (key !== ID_KEY && key !== TYPENAME_KEY) {\n sink[key] = source[key];\n }\n }\n }\n}\n/**\n * @public\n *\n * Create a new record.\n */\n\n\nfunction create(dataID, typeName) {\n // See perf note above for why we aren't using computed property access.\n var record = {};\n record[ID_KEY] = dataID;\n record[TYPENAME_KEY] = typeName;\n return record;\n}\n/**\n * @public\n *\n * Get the record's `id` if available or the client-generated identifier.\n */\n\n\nfunction getDataID(record) {\n return record[ID_KEY];\n}\n/**\n * @public\n *\n * Get the concrete type of the record.\n */\n\n\nfunction getType(record) {\n return record[TYPENAME_KEY];\n}\n/**\n * @public\n *\n * Get a scalar (non-link) field value.\n */\n\n\nfunction getValue(record, storageKey) {\n var value = record[storageKey];\n\n if (value && typeof value === 'object') {\n !(!value.hasOwnProperty(REF_KEY) && !value.hasOwnProperty(REFS_KEY)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernRecord.getValue(): Expected a scalar (non-link) value for `%s.%s` ' + 'but found %s.', record[ID_KEY], storageKey, value.hasOwnProperty(REF_KEY) ? 'a linked record' : 'plural linked records') : invariant(false) : void 0;\n }\n\n return value;\n}\n/**\n * @public\n *\n * Get the value of a field as a reference to another record. Throws if the\n * field has a different type.\n */\n\n\nfunction getLinkedRecordID(record, storageKey) {\n var link = record[storageKey];\n\n if (link == null) {\n return link;\n }\n\n !(typeof link === 'object' && link && typeof link[REF_KEY] === 'string') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernRecord.getLinkedRecordID(): Expected `%s.%s` to be a linked ID, ' + 'was `%s`.', record[ID_KEY], storageKey, JSON.stringify(link)) : invariant(false) : void 0;\n return link[REF_KEY];\n}\n/**\n * @public\n *\n * Get the value of a field as a list of references to other records. Throws if\n * the field has a different type.\n */\n\n\nfunction getLinkedRecordIDs(record, storageKey) {\n var links = record[storageKey];\n\n if (links == null) {\n return links;\n }\n\n !(typeof links === 'object' && Array.isArray(links[REFS_KEY])) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernRecord.getLinkedRecordIDs(): Expected `%s.%s` to contain an array ' + 'of linked IDs, got `%s`.', record[ID_KEY], storageKey, JSON.stringify(links)) : invariant(false) : void 0; // assume items of the array are ids\n\n return links[REFS_KEY];\n}\n/**\n * @public\n *\n * Returns the epoch at which the record was invalidated, if it\n * ever was; otherwise returns null;\n */\n\n\nfunction getInvalidationEpoch(record) {\n if (record == null) {\n return null;\n }\n\n var invalidatedAt = record[INVALIDATED_AT_KEY];\n\n if (typeof invalidatedAt !== 'number') {\n // If the record has never been invalidated, it isn't stale.\n return null;\n }\n\n return invalidatedAt;\n}\n/**\n * @public\n *\n * Compares the fields of a previous and new record, returning either the\n * previous record if all fields are equal or a new record (with merged fields)\n * if any fields have changed.\n */\n\n\nfunction update(prevRecord, nextRecord) {\n if (process.env.NODE_ENV !== \"production\") {\n var _getType, _getType2;\n\n var prevID = getDataID(prevRecord);\n var nextID = getDataID(nextRecord);\n process.env.NODE_ENV !== \"production\" ? warning(prevID === nextID, 'RelayModernRecord: Invalid record update, expected both versions of ' + 'the record to have the same id, got `%s` and `%s`.', prevID, nextID) : void 0; // note: coalesce null/undefined to null\n\n var prevType = (_getType = getType(prevRecord)) !== null && _getType !== void 0 ? _getType : null;\n var nextType = (_getType2 = getType(nextRecord)) !== null && _getType2 !== void 0 ? _getType2 : null;\n process.env.NODE_ENV !== \"production\" ? warning(isClientID(nextID) && nextID !== ROOT_ID || prevType === nextType, 'RelayModernRecord: Invalid record update, expected both versions of ' + 'record `%s` to have the same `%s` but got conflicting types `%s` ' + 'and `%s`. The GraphQL server likely violated the globally unique ' + 'id requirement by returning the same id for different objects.', prevID, TYPENAME_KEY, prevType, nextType) : void 0;\n }\n\n var updated = null;\n var keys = Object.keys(nextRecord);\n\n for (var ii = 0; ii < keys.length; ii++) {\n var key = keys[ii];\n\n if (updated || !areEqual(prevRecord[key], nextRecord[key])) {\n updated = updated !== null ? updated : (0, _objectSpread2[\"default\"])({}, prevRecord);\n updated[key] = nextRecord[key];\n }\n }\n\n return updated !== null ? updated : prevRecord;\n}\n/**\n * @public\n *\n * Returns a new record with the contents of the given records. Fields in the\n * second record will overwrite identical fields in the first record.\n */\n\n\nfunction merge(record1, record2) {\n if (process.env.NODE_ENV !== \"production\") {\n var _getType3, _getType4;\n\n var prevID = getDataID(record1);\n var nextID = getDataID(record2);\n process.env.NODE_ENV !== \"production\" ? warning(prevID === nextID, 'RelayModernRecord: Invalid record merge, expected both versions of ' + 'the record to have the same id, got `%s` and `%s`.', prevID, nextID) : void 0; // note: coalesce null/undefined to null\n\n var prevType = (_getType3 = getType(record1)) !== null && _getType3 !== void 0 ? _getType3 : null;\n var nextType = (_getType4 = getType(record2)) !== null && _getType4 !== void 0 ? _getType4 : null;\n process.env.NODE_ENV !== \"production\" ? warning(isClientID(nextID) && nextID !== ROOT_ID || prevType === nextType, 'RelayModernRecord: Invalid record merge, expected both versions of ' + 'record `%s` to have the same `%s` but got conflicting types `%s` ' + 'and `%s`. The GraphQL server likely violated the globally unique ' + 'id requirement by returning the same id for different objects.', prevID, TYPENAME_KEY, prevType, nextType) : void 0;\n }\n\n return Object.assign({}, record1, record2);\n}\n/**\n * @public\n *\n * Prevent modifications to the record. Attempts to call `set*` functions on a\n * frozen record will fatal at runtime.\n */\n\n\nfunction freeze(record) {\n deepFreeze(record);\n}\n/**\n * @public\n *\n * Set the value of a storageKey to a scalar.\n */\n\n\nfunction setValue(record, storageKey, value) {\n if (process.env.NODE_ENV !== \"production\") {\n var prevID = getDataID(record);\n\n if (storageKey === ID_KEY) {\n process.env.NODE_ENV !== \"production\" ? warning(prevID === value, 'RelayModernRecord: Invalid field update, expected both versions of ' + 'the record to have the same id, got `%s` and `%s`.', prevID, value) : void 0;\n } else if (storageKey === TYPENAME_KEY) {\n var _getType5;\n\n // note: coalesce null/undefined to null\n var prevType = (_getType5 = getType(record)) !== null && _getType5 !== void 0 ? _getType5 : null;\n var nextType = value !== null && value !== void 0 ? value : null;\n process.env.NODE_ENV !== \"production\" ? warning(isClientID(getDataID(record)) && getDataID(record) !== ROOT_ID || prevType === nextType, 'RelayModernRecord: Invalid field update, expected both versions of ' + 'record `%s` to have the same `%s` but got conflicting types `%s` ' + 'and `%s`. The GraphQL server likely violated the globally unique ' + 'id requirement by returning the same id for different objects.', prevID, TYPENAME_KEY, prevType, nextType) : void 0;\n }\n }\n\n record[storageKey] = value;\n}\n/**\n * @public\n *\n * Set the value of a field to a reference to another record.\n */\n\n\nfunction setLinkedRecordID(record, storageKey, linkedID) {\n // See perf note above for why we aren't using computed property access.\n var link = {};\n link[REF_KEY] = linkedID;\n record[storageKey] = link;\n}\n/**\n * @public\n *\n * Set the value of a field to a list of references other records.\n */\n\n\nfunction setLinkedRecordIDs(record, storageKey, linkedIDs) {\n // See perf note above for why we aren't using computed property access.\n var links = {};\n links[REFS_KEY] = linkedIDs;\n record[storageKey] = links;\n}\n\nmodule.exports = {\n clone: clone,\n copyFields: copyFields,\n create: create,\n freeze: freeze,\n getDataID: getDataID,\n getInvalidationEpoch: getInvalidationEpoch,\n getLinkedRecordID: getLinkedRecordID,\n getLinkedRecordIDs: getLinkedRecordIDs,\n getType: getType,\n getValue: getValue,\n merge: merge,\n setValue: setValue,\n setLinkedRecordID: setLinkedRecordID,\n setLinkedRecordIDs: setLinkedRecordIDs,\n update: update\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar Observable = require('../network/RelayObservable');\n\nvar RelayReplaySubject = require('../util/RelayReplaySubject');\n\nvar invariant = require('invariant');\n\nvar WEAKMAP_SUPPORTED = typeof WeakMap === 'function';\nvar requestCachesByEnvironment = WEAKMAP_SUPPORTED ? new WeakMap() : new Map();\n/**\n * Fetches the given query and variables on the provided environment,\n * and de-dupes identical in-flight requests.\n *\n * Observing a request:\n * ====================\n * fetchQuery returns an Observable which you can call .subscribe()\n * on. subscribe() takes an Observer, which you can provide to\n * observe network events:\n *\n * ```\n * fetchQuery(environment, query, variables).subscribe({\n * // Called when network requests starts\n * start: (subscription) => {},\n *\n * // Called after a payload is received and written to the local store\n * next: (payload) => {},\n *\n * // Called when network requests errors\n * error: (error) => {},\n *\n * // Called when network requests fully completes\n * complete: () => {},\n *\n * // Called when network request is unsubscribed\n * unsubscribe: (subscription) => {},\n * });\n * ```\n *\n * In-flight request de-duping:\n * ============================\n * By default, calling fetchQuery multiple times with the same\n * environment, query and variables will not initiate a new request if a request\n * for those same parameters is already in flight.\n *\n * A request is marked in-flight from the moment it starts until the moment it\n * fully completes, regardless of error or successful completion.\n *\n * NOTE: If the request completes _synchronously_, calling fetchQuery\n * a second time with the same arguments in the same tick will _NOT_ de-dupe\n * the request given that it will no longer be in-flight.\n *\n *\n * Data Retention:\n * ===============\n * This function will not retain any query data outside the scope of the\n * request, which means it is not guaranteed that it won't be garbage\n * collected after the request completes.\n * If you need to retain data, you can do so manually with environment.retain().\n *\n * Cancelling requests:\n * ====================\n * If the subscription returned by subscribe is called while the\n * request is in-flight, the request will be cancelled.\n *\n * ```\n * const subscription = fetchQuery(...).subscribe(...);\n *\n * // This will cancel the request if it is in-flight.\n * subscription.unsubscribe();\n * ```\n */\n\nfunction fetchQuery(environment, operation) {\n return fetchQueryDeduped(environment, operation.request.identifier, function () {\n return environment.execute({\n operation: operation\n });\n });\n}\n/**\n * Low-level implementation details of `fetchQuery`.\n *\n * `fetchQueryDeduped` can also be used to share a single cache for\n * requests that aren't using `fetchQuery` directly (e.g. because they don't\n * have an `OperationDescriptor` when they are called).\n */\n\n\nfunction fetchQueryDeduped(environment, identifier, fetchFn) {\n return Observable.create(function (sink) {\n var requestCache = getRequestCache(environment);\n var cachedRequest = requestCache.get(identifier);\n\n if (!cachedRequest) {\n fetchFn()[\"finally\"](function () {\n return requestCache[\"delete\"](identifier);\n }).subscribe({\n start: function start(subscription) {\n cachedRequest = {\n identifier: identifier,\n subject: new RelayReplaySubject(),\n subjectForInFlightStatus: new RelayReplaySubject(),\n subscription: subscription\n };\n requestCache.set(identifier, cachedRequest);\n },\n next: function next(response) {\n var cachedReq = getCachedRequest(requestCache, identifier);\n cachedReq.subject.next(response);\n cachedReq.subjectForInFlightStatus.next(response);\n },\n error: function error(_error) {\n var cachedReq = getCachedRequest(requestCache, identifier);\n cachedReq.subject.error(_error);\n cachedReq.subjectForInFlightStatus.error(_error);\n },\n complete: function complete() {\n var cachedReq = getCachedRequest(requestCache, identifier);\n cachedReq.subject.complete();\n cachedReq.subjectForInFlightStatus.complete();\n },\n unsubscribe: function unsubscribe(subscription) {\n var cachedReq = getCachedRequest(requestCache, identifier);\n cachedReq.subject.unsubscribe();\n cachedReq.subjectForInFlightStatus.unsubscribe();\n }\n });\n }\n\n !(cachedRequest != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, '[fetchQueryInternal] fetchQueryDeduped: Expected `start` to be ' + 'called synchronously') : invariant(false) : void 0;\n return getObservableForCachedRequest(requestCache, cachedRequest).subscribe(sink);\n });\n}\n/**\n * @private\n */\n\n\nfunction getObservableForCachedRequest(requestCache, cachedRequest) {\n return Observable.create(function (sink) {\n var subscription = cachedRequest.subject.subscribe(sink);\n return function () {\n subscription.unsubscribe();\n var cachedRequestInstance = requestCache.get(cachedRequest.identifier);\n\n if (cachedRequestInstance) {\n var requestSubscription = cachedRequestInstance.subscription;\n\n if (requestSubscription != null && cachedRequestInstance.subject.getObserverCount() === 0) {\n requestSubscription.unsubscribe();\n requestCache[\"delete\"](cachedRequest.identifier);\n }\n }\n };\n });\n}\n/**\n * @private\n */\n\n\nfunction getActiveStatusObservableForCachedRequest(environment, requestCache, cachedRequest) {\n return Observable.create(function (sink) {\n var subscription = cachedRequest.subjectForInFlightStatus.subscribe({\n error: sink.error,\n next: function next(response) {\n if (!environment.isRequestActive(cachedRequest.identifier)) {\n sink.complete();\n return;\n }\n\n sink.next();\n },\n complete: sink.complete,\n unsubscribe: sink.complete\n });\n return function () {\n subscription.unsubscribe();\n };\n });\n}\n/**\n * If a request is active for the given query, variables and environment,\n * this function will return a Promise that will resolve when that request\n * stops being active (receives a final payload), and the data has been saved\n * to the store.\n * If no request is active, null will be returned\n */\n\n\nfunction getPromiseForActiveRequest(environment, request) {\n var requestCache = getRequestCache(environment);\n var cachedRequest = requestCache.get(request.identifier);\n\n if (!cachedRequest) {\n return null;\n }\n\n if (!environment.isRequestActive(cachedRequest.identifier)) {\n return null;\n }\n\n return new Promise(function (resolve, reject) {\n var resolveOnNext = false;\n getActiveStatusObservableForCachedRequest(environment, requestCache, cachedRequest).subscribe({\n complete: resolve,\n error: reject,\n next: function next(response) {\n /*\n * The underlying `RelayReplaySubject` will synchronously replay events\n * as soon as we subscribe, but since we want the *next* asynchronous\n * one, we'll ignore them until the replay finishes.\n */\n if (resolveOnNext) {\n resolve(response);\n }\n }\n });\n resolveOnNext = true;\n });\n}\n/**\n * If there is a pending request for the given query, returns an Observable of\n * *all* its responses. Existing responses are published synchronously and\n * subsequent responses are published asynchronously. Returns null if there is\n * no pending request. This is similar to fetchQuery() except that it will not\n * issue a fetch if there isn't already one pending.\n */\n\n\nfunction getObservableForActiveRequest(environment, request) {\n var requestCache = getRequestCache(environment);\n var cachedRequest = requestCache.get(request.identifier);\n\n if (!cachedRequest) {\n return null;\n }\n\n if (!environment.isRequestActive(cachedRequest.identifier)) {\n return null;\n }\n\n return getActiveStatusObservableForCachedRequest(environment, requestCache, cachedRequest);\n}\n/**\n * @private\n */\n\n\nfunction getRequestCache(environment) {\n var cached = requestCachesByEnvironment.get(environment);\n\n if (cached != null) {\n return cached;\n }\n\n var requestCache = new Map();\n requestCachesByEnvironment.set(environment, requestCache);\n return requestCache;\n}\n/**\n * @private\n */\n\n\nfunction getCachedRequest(requestCache, identifier) {\n var cached = requestCache.get(identifier);\n !(cached != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, '[fetchQueryInternal] getCachedRequest: Expected request to be cached') : invariant(false) : void 0;\n return cached;\n}\n\nmodule.exports = {\n fetchQuery: fetchQuery,\n fetchQueryDeduped: fetchQueryDeduped,\n getPromiseForActiveRequest: getPromiseForActiveRequest,\n getObservableForActiveRequest: getObservableForActiveRequest\n};","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar emptyFunction = require(\"./emptyFunction\");\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\nfunction printWarning(format) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n}\n\nvar warning = process.env.NODE_ENV !== \"production\" ? function (condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(void 0, [format].concat(args));\n }\n} : emptyFunction;\nmodule.exports = warning;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n * @emails oncall+relay\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar RelayFeatureFlags = require('./RelayFeatureFlags');\n\nvar isEmptyObject = require('./isEmptyObject');\n\nvar stableCopy = require('./stableCopy');\n\nvar _require = require('../store/RelayModernSelector'),\n getDataIDsFromFragment = _require.getDataIDsFromFragment,\n getVariablesFromFragment = _require.getVariablesFromFragment,\n getSelector = _require.getSelector;\n\nfunction getFragmentIdentifier(fragmentNode, fragmentRef) {\n var selector = getSelector(fragmentNode, fragmentRef);\n var fragmentOwnerIdentifier = selector == null ? 'null' : selector.kind === 'SingularReaderSelector' ? selector.owner.identifier : '[' + selector.selectors.map(function (sel) {\n return sel.owner.identifier;\n }).join(',') + ']';\n var fragmentVariables = getVariablesFromFragment(fragmentNode, fragmentRef);\n var dataIDs = getDataIDsFromFragment(fragmentNode, fragmentRef);\n\n if (RelayFeatureFlags.ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION) {\n return fragmentOwnerIdentifier + '/' + fragmentNode.name + '/' + (fragmentVariables == null || isEmptyObject(fragmentVariables) ? '{}' : JSON.stringify(stableCopy(fragmentVariables))) + '/' + (typeof dataIDs === 'undefined' ? 'missing' : dataIDs == null ? 'null' : Array.isArray(dataIDs) ? '[' + dataIDs.join(',') + ']' : dataIDs);\n } else {\n var _JSON$stringify;\n\n return fragmentOwnerIdentifier + '/' + fragmentNode.name + '/' + JSON.stringify(stableCopy(fragmentVariables)) + '/' + ((_JSON$stringify = JSON.stringify(dataIDs)) !== null && _JSON$stringify !== void 0 ? _JSON$stringify : 'missing');\n }\n}\n\nmodule.exports = getFragmentIdentifier;","var defineProperty = require(\"./defineProperty.js\");\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nmodule.exports = _objectSpread2, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @emails oncall+relay\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar _require = require('../store/RelayStoreUtils'),\n getModuleComponentKey = _require.getModuleComponentKey,\n getModuleOperationKey = _require.getModuleOperationKey;\n\nfunction createPayloadFor3DField(name, operation, component, response) {\n var data = (0, _objectSpread2[\"default\"])({}, response);\n data[getModuleComponentKey(name)] = component;\n data[getModuleOperationKey(name)] = operation;\n return data;\n}\n\nmodule.exports = createPayloadFor3DField;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar RelayRecordSourceMapImpl = require('./RelayRecordSourceMapImpl');\n\nvar RelayRecordSource = /*#__PURE__*/function () {\n function RelayRecordSource(records) {\n return RelayRecordSource.create(records);\n }\n\n RelayRecordSource.create = function create(records) {\n return new RelayRecordSourceMapImpl(records);\n };\n\n return RelayRecordSource;\n}();\n\nmodule.exports = RelayRecordSource;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar RelayObservable = require('../network/RelayObservable');\n\nvar invariant = require('invariant');\n\n/**\n * An implementation of a `ReplaySubject` for Relay Observables.\n *\n * Records events provided and synchronously plays them back to new subscribers,\n * as well as forwarding new asynchronous events.\n */\nvar RelayReplaySubject = /*#__PURE__*/function () {\n function RelayReplaySubject() {\n var _this = this;\n\n (0, _defineProperty2[\"default\"])(this, \"_complete\", false);\n (0, _defineProperty2[\"default\"])(this, \"_events\", []);\n (0, _defineProperty2[\"default\"])(this, \"_sinks\", new Set());\n (0, _defineProperty2[\"default\"])(this, \"_subscription\", null);\n this._observable = RelayObservable.create(function (sink) {\n _this._sinks.add(sink);\n\n var events = _this._events;\n\n for (var i = 0; i < events.length; i++) {\n if (sink.closed) {\n // Bail if an event made the observer unsubscribe.\n break;\n }\n\n var event = events[i];\n\n switch (event.kind) {\n case 'complete':\n sink.complete();\n break;\n\n case 'error':\n sink.error(event.error);\n break;\n\n case 'next':\n sink.next(event.data);\n break;\n\n default:\n event.kind;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReplaySubject: Unknown event kind `%s`.', event.kind) : invariant(false) : void 0;\n }\n }\n\n return function () {\n _this._sinks[\"delete\"](sink);\n };\n });\n }\n\n var _proto = RelayReplaySubject.prototype;\n\n _proto.complete = function complete() {\n if (this._complete === true) {\n return;\n }\n\n this._complete = true;\n\n this._events.push({\n kind: 'complete'\n });\n\n this._sinks.forEach(function (sink) {\n return sink.complete();\n });\n };\n\n _proto.error = function error(_error) {\n if (this._complete === true) {\n return;\n }\n\n this._complete = true;\n\n this._events.push({\n kind: 'error',\n error: _error\n });\n\n this._sinks.forEach(function (sink) {\n return sink.error(_error);\n });\n };\n\n _proto.next = function next(data) {\n if (this._complete === true) {\n return;\n }\n\n this._events.push({\n kind: 'next',\n data: data\n });\n\n this._sinks.forEach(function (sink) {\n return sink.next(data);\n });\n };\n\n _proto.subscribe = function subscribe(observer) {\n this._subscription = this._observable.subscribe(observer);\n return this._subscription;\n };\n\n _proto.unsubscribe = function unsubscribe() {\n if (this._subscription) {\n this._subscription.unsubscribe();\n\n this._subscription = null;\n }\n };\n\n _proto.getObserverCount = function getObserverCount() {\n return this._sinks.size;\n };\n\n return RelayReplaySubject;\n}();\n\nmodule.exports = RelayReplaySubject;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\nvar RelayDeclarativeMutationConfig = require('./RelayDeclarativeMutationConfig');\n\nvar invariant = require('invariant');\n\nvar isRelayModernEnvironment = require('../store/isRelayModernEnvironment');\n\nvar validateMutation = require('./validateMutation');\n\nvar warning = require(\"fbjs/lib/warning\");\n\nvar _require = require('../query/GraphQLTag'),\n getRequest = _require.getRequest;\n\nvar _require2 = require('../store/ClientID'),\n generateUniqueClientID = _require2.generateUniqueClientID;\n\nvar _require3 = require('../store/RelayModernOperationDescriptor'),\n createOperationDescriptor = _require3.createOperationDescriptor;\n\n/**\n * Higher-level helper function to execute a mutation against a specific\n * environment.\n */\nfunction commitMutation(environment, config) {\n !isRelayModernEnvironment(environment) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'commitMutation: expected `environment` to be an instance of ' + '`RelayModernEnvironment`.') : invariant(false) : void 0;\n var mutation = getRequest(config.mutation);\n\n if (mutation.params.operationKind !== 'mutation') {\n throw new Error('commitMutation: Expected mutation operation');\n }\n\n if (mutation.kind !== 'Request') {\n throw new Error('commitMutation: Expected mutation to be of type request');\n }\n\n var optimisticResponse = config.optimisticResponse,\n optimisticUpdater = config.optimisticUpdater,\n updater = config.updater;\n var configs = config.configs,\n cacheConfig = config.cacheConfig,\n onError = config.onError,\n onUnsubscribe = config.onUnsubscribe,\n variables = config.variables,\n uploadables = config.uploadables;\n var operation = createOperationDescriptor(mutation, variables, cacheConfig, generateUniqueClientID()); // TODO: remove this check after we fix flow.\n\n if (typeof optimisticResponse === 'function') {\n optimisticResponse = optimisticResponse();\n process.env.NODE_ENV !== \"production\" ? warning(false, 'commitMutation: Expected `optimisticResponse` to be an object, ' + 'received a function.') : void 0;\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (optimisticResponse instanceof Object) {\n validateMutation(optimisticResponse, mutation, variables);\n }\n }\n\n if (configs) {\n var _RelayDeclarativeMuta = RelayDeclarativeMutationConfig.convert(configs, mutation, optimisticUpdater, updater);\n\n optimisticUpdater = _RelayDeclarativeMuta.optimisticUpdater;\n updater = _RelayDeclarativeMuta.updater;\n }\n\n var errors = [];\n var subscription = environment.executeMutation({\n operation: operation,\n optimisticResponse: optimisticResponse,\n optimisticUpdater: optimisticUpdater,\n updater: updater,\n uploadables: uploadables\n }).subscribe({\n next: function next(payload) {\n if (Array.isArray(payload)) {\n payload.forEach(function (item) {\n if (item.errors) {\n errors.push.apply(errors, (0, _toConsumableArray2[\"default\"])(item.errors));\n }\n });\n } else {\n if (payload.errors) {\n errors.push.apply(errors, (0, _toConsumableArray2[\"default\"])(payload.errors));\n }\n }\n },\n complete: function complete() {\n var onCompleted = config.onCompleted;\n\n if (onCompleted) {\n var snapshot = environment.lookup(operation.fragment);\n onCompleted(snapshot.data, errors.length !== 0 ? errors : null);\n }\n },\n error: onError,\n unsubscribe: onUnsubscribe\n });\n return {\n dispose: subscription.unsubscribe\n };\n}\n\nmodule.exports = commitMutation;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nfunction commitLocalUpdate(environment, updater) {\n environment.commitUpdate(updater);\n}\n\nmodule.exports = commitLocalUpdate;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar areEqual = require(\"fbjs/lib/areEqual\");\n\nvar invariant = require('invariant');\n\nvar _require = require('../util/RelayConcreteNode'),\n LINKED_FIELD = _require.LINKED_FIELD;\n\nvar _require2 = require('./RelayStoreUtils'),\n getHandleStorageKey = _require2.getHandleStorageKey;\n\n/**\n * @private\n *\n * Creates a clone of the supplied `handleField` by finding the original linked\n * field (on which the handle was declared) among the sibling `selections`, and\n * copying its selections into the clone.\n */\nfunction cloneRelayHandleSourceField(handleField, selections, variables) {\n var sourceField = selections.find(function (source) {\n return source.kind === LINKED_FIELD && source.name === handleField.name && source.alias === handleField.alias && areEqual(source.args, handleField.args);\n });\n !(sourceField && sourceField.kind === LINKED_FIELD) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'cloneRelayHandleSourceField: Expected a corresponding source field for ' + 'handle `%s`.', handleField.handle) : invariant(false) : void 0;\n var handleKey = getHandleStorageKey(handleField, variables);\n return {\n kind: 'LinkedField',\n alias: sourceField.alias,\n name: handleKey,\n storageKey: handleKey,\n args: null,\n concreteType: sourceField.concreteType,\n plural: sourceField.plural,\n selections: sourceField.selections\n };\n}\n\nmodule.exports = cloneRelayHandleSourceField;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar invariant = require('invariant');\n\nvar relayContext;\nvar firstReact;\n\nfunction createRelayContext(react) {\n if (!relayContext) {\n relayContext = react.createContext(null);\n\n if (process.env.NODE_ENV !== \"production\") {\n relayContext.displayName = 'RelayContext';\n }\n\n firstReact = react;\n }\n\n !(react === firstReact) ? process.env.NODE_ENV !== \"production\" ? invariant(false, '[createRelayContext]: You passing a different instance of React', react.version) : invariant(false) : void 0;\n return relayContext;\n}\n\nmodule.exports = createRelayContext;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar areEqual = require(\"fbjs/lib/areEqual\");\n\nvar invariant = require('invariant');\n\nvar warning = require(\"fbjs/lib/warning\");\n\nvar _require = require('./RelayConcreteVariables'),\n getFragmentVariables = _require.getFragmentVariables;\n\nvar _require2 = require('./RelayStoreUtils'),\n FRAGMENT_OWNER_KEY = _require2.FRAGMENT_OWNER_KEY,\n FRAGMENTS_KEY = _require2.FRAGMENTS_KEY,\n ID_KEY = _require2.ID_KEY,\n IS_WITHIN_UNMATCHED_TYPE_REFINEMENT = _require2.IS_WITHIN_UNMATCHED_TYPE_REFINEMENT;\n\n/**\n * @public\n *\n * Given the result `item` from a parent that fetched `fragment`, creates a\n * selector that can be used to read the results of that fragment for that item.\n *\n * Example:\n *\n * Given two fragments as follows:\n *\n * ```\n * fragment Parent on User {\n * id\n * ...Child\n * }\n * fragment Child on User {\n * name\n * }\n * ```\n *\n * And given some object `parent` that is the results of `Parent` for id \"4\",\n * the results of `Child` can be accessed by first getting a selector and then\n * using that selector to `lookup()` the results against the environment:\n *\n * ```\n * const childSelector = getSingularSelector(queryVariables, Child, parent);\n * const childData = environment.lookup(childSelector).data;\n * ```\n */\nfunction getSingularSelector(fragment, item) {\n !(typeof item === 'object' && item !== null && !Array.isArray(item)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernSelector: Expected value for fragment `%s` to be an object, got ' + '`%s`.', fragment.name, JSON.stringify(item)) : invariant(false) : void 0;\n var dataID = item[ID_KEY];\n var fragments = item[FRAGMENTS_KEY];\n var mixedOwner = item[FRAGMENT_OWNER_KEY];\n var isWithinUnmatchedTypeRefinement = item[IS_WITHIN_UNMATCHED_TYPE_REFINEMENT] === true;\n\n if (typeof dataID === 'string' && typeof fragments === 'object' && fragments !== null && typeof fragments[fragment.name] === 'object' && fragments[fragment.name] !== null && typeof mixedOwner === 'object' && mixedOwner !== null) {\n var owner = mixedOwner;\n var argumentVariables = fragments[fragment.name];\n var fragmentVariables = getFragmentVariables(fragment, owner.variables, argumentVariables);\n return createReaderSelector(fragment, dataID, fragmentVariables, owner, isWithinUnmatchedTypeRefinement);\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n var stringifiedItem = JSON.stringify(item);\n\n if (stringifiedItem.length > 499) {\n stringifiedItem = stringifiedItem.substr(0, 498) + \"\\u2026\";\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, 'RelayModernSelector: Expected object to contain data for fragment `%s`, got ' + '`%s`. Make sure that the parent operation/fragment included fragment ' + '`...%s` without `@relay(mask: false)`.', fragment.name, stringifiedItem, fragment.name) : void 0;\n }\n\n return null;\n}\n/**\n * @public\n *\n * Given the result `items` from a parent that fetched `fragment`, creates a\n * selector that can be used to read the results of that fragment on those\n * items. This is similar to `getSingularSelector` but for \"plural\" fragments that\n * expect an array of results and therefore return an array of selectors.\n */\n\n\nfunction getPluralSelector(fragment, items) {\n var selectors = null;\n items.forEach(function (item, ii) {\n var selector = item != null ? getSingularSelector(fragment, item) : null;\n\n if (selector != null) {\n selectors = selectors || [];\n selectors.push(selector);\n }\n });\n\n if (selectors == null) {\n return null;\n } else {\n return {\n kind: 'PluralReaderSelector',\n selectors: selectors\n };\n }\n}\n\nfunction getSelector(fragment, item) {\n if (item == null) {\n return item;\n } else if (fragment.metadata && fragment.metadata.plural === true) {\n !Array.isArray(item) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernSelector: Expected value for fragment `%s` to be an array, got `%s`. ' + 'Remove `@relay(plural: true)` from fragment `%s` to allow the prop to be an object.', fragment.name, JSON.stringify(item), fragment.name) : invariant(false) : void 0;\n return getPluralSelector(fragment, item);\n } else {\n !!Array.isArray(item) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernSelector: Expected value for fragment `%s` to be an object, got `%s`. ' + 'Add `@relay(plural: true)` to fragment `%s` to allow the prop to be an array of items.', fragment.name, JSON.stringify(item), fragment.name) : invariant(false) : void 0;\n return getSingularSelector(fragment, item);\n }\n}\n/**\n * @public\n *\n * Given a mapping of keys -> results and a mapping of keys -> fragments,\n * extracts the selectors for those fragments from the results.\n *\n * The canonical use-case for this function is ReactRelayFragmentContainer, which\n * uses this function to convert (props, fragments) into selectors so that it\n * can read the results to pass to the inner component.\n */\n\n\nfunction getSelectorsFromObject(fragments, object) {\n var selectors = {};\n\n for (var _key in fragments) {\n if (fragments.hasOwnProperty(_key)) {\n var fragment = fragments[_key];\n var item = object[_key];\n selectors[_key] = getSelector(fragment, item);\n }\n }\n\n return selectors;\n}\n/**\n * @public\n *\n * Given a mapping of keys -> results and a mapping of keys -> fragments,\n * extracts a mapping of keys -> id(s) of the results.\n *\n * Similar to `getSelectorsFromObject()`, this function can be useful in\n * determining the \"identity\" of the props passed to a component.\n */\n\n\nfunction getDataIDsFromObject(fragments, object) {\n var ids = {};\n\n for (var _key2 in fragments) {\n if (fragments.hasOwnProperty(_key2)) {\n var fragment = fragments[_key2];\n var item = object[_key2];\n ids[_key2] = getDataIDsFromFragment(fragment, item);\n }\n }\n\n return ids;\n}\n\nfunction getDataIDsFromFragment(fragment, item) {\n if (item == null) {\n return item;\n } else if (fragment.metadata && fragment.metadata.plural === true) {\n !Array.isArray(item) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernSelector: Expected value for fragment `%s` to be an array, got `%s`. ' + 'Remove `@relay(plural: true)` from fragment `%s` to allow the prop to be an object.', fragment.name, JSON.stringify(item), fragment.name) : invariant(false) : void 0;\n return getDataIDs(fragment, item);\n } else {\n !!Array.isArray(item) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernFragmentSpecResolver: Expected value for fragment `%s` to be an object, got `%s`. ' + 'Add `@relay(plural: true)` to fragment `%s` to allow the prop to be an array of items.', fragment.name, JSON.stringify(item), fragment.name) : invariant(false) : void 0;\n return getDataID(fragment, item);\n }\n}\n/**\n * @internal\n */\n\n\nfunction getDataIDs(fragment, items) {\n var ids = null;\n items.forEach(function (item) {\n var id = item != null ? getDataID(fragment, item) : null;\n\n if (id != null) {\n ids = ids || [];\n ids.push(id);\n }\n });\n return ids;\n}\n/**\n * @internal\n */\n\n\nfunction getDataID(fragment, item) {\n !(typeof item === 'object' && item !== null && !Array.isArray(item)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernSelector: Expected value for fragment `%s` to be an object, got ' + '`%s`.', fragment.name, JSON.stringify(item)) : invariant(false) : void 0;\n var dataID = item[ID_KEY];\n\n if (typeof dataID === 'string') {\n return dataID;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, 'RelayModernSelector: Expected object to contain data for fragment `%s`, got ' + '`%s`. Make sure that the parent operation/fragment included fragment ' + '`...%s` without `@relay(mask: false)`, or `null` is passed as the fragment ' + \"reference for `%s` if it's conditonally included and the condition isn't met.\", fragment.name, JSON.stringify(item), fragment.name, fragment.name) : void 0;\n return null;\n}\n/**\n * @public\n *\n * Given a mapping of keys -> results and a mapping of keys -> fragments,\n * extracts the merged variables that would be in scope for those\n * fragments/results.\n *\n * This can be useful in determing what varaibles were used to fetch the data\n * for a Relay container, for example.\n */\n\n\nfunction getVariablesFromObject(fragments, object) {\n var variables = {};\n\n for (var _key3 in fragments) {\n if (fragments.hasOwnProperty(_key3)) {\n var fragment = fragments[_key3];\n var item = object[_key3];\n var itemVariables = getVariablesFromFragment(fragment, item);\n Object.assign(variables, itemVariables);\n }\n }\n\n return variables;\n}\n\nfunction getVariablesFromFragment(fragment, item) {\n var _fragment$metadata;\n\n if (item == null) {\n return {};\n } else if (((_fragment$metadata = fragment.metadata) === null || _fragment$metadata === void 0 ? void 0 : _fragment$metadata.plural) === true) {\n !Array.isArray(item) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernSelector: Expected value for fragment `%s` to be an array, got `%s`. ' + 'Remove `@relay(plural: true)` from fragment `%s` to allow the prop to be an object.', fragment.name, JSON.stringify(item), fragment.name) : invariant(false) : void 0;\n return getVariablesFromPluralFragment(fragment, item);\n } else {\n !!Array.isArray(item) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernFragmentSpecResolver: Expected value for fragment `%s` to be an object, got `%s`. ' + 'Add `@relay(plural: true)` to fragment `%s` to allow the prop to be an array of items.', fragment.name, JSON.stringify(item), fragment.name) : invariant(false) : void 0;\n return getVariablesFromSingularFragment(fragment, item) || {};\n }\n}\n\nfunction getVariablesFromSingularFragment(fragment, item) {\n var selector = getSingularSelector(fragment, item);\n\n if (!selector) {\n return null;\n }\n\n return selector.variables;\n}\n\nfunction getVariablesFromPluralFragment(fragment, items) {\n var variables = {};\n items.forEach(function (value, ii) {\n if (value != null) {\n var itemVariables = getVariablesFromSingularFragment(fragment, value);\n\n if (itemVariables != null) {\n Object.assign(variables, itemVariables);\n }\n }\n });\n return variables;\n}\n/**\n * @public\n *\n * Determine if two selectors are equal (represent the same selection). Note\n * that this function returns `false` when the two queries/fragments are\n * different objects, even if they select the same fields.\n */\n\n\nfunction areEqualSelectors(thisSelector, thatSelector) {\n return thisSelector.owner === thatSelector.owner && thisSelector.dataID === thatSelector.dataID && thisSelector.node === thatSelector.node && areEqual(thisSelector.variables, thatSelector.variables);\n}\n\nfunction createReaderSelector(fragment, dataID, variables, request) {\n var isWithinUnmatchedTypeRefinement = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n return {\n kind: 'SingularReaderSelector',\n dataID: dataID,\n isWithinUnmatchedTypeRefinement: isWithinUnmatchedTypeRefinement,\n node: fragment,\n variables: variables,\n owner: request\n };\n}\n\nfunction createNormalizationSelector(node, dataID, variables) {\n return {\n dataID: dataID,\n node: node,\n variables: variables\n };\n}\n\nmodule.exports = {\n areEqualSelectors: areEqualSelectors,\n createReaderSelector: createReaderSelector,\n createNormalizationSelector: createNormalizationSelector,\n getDataIDsFromFragment: getDataIDsFromFragment,\n getDataIDsFromObject: getDataIDsFromObject,\n getSingularSelector: getSingularSelector,\n getPluralSelector: getPluralSelector,\n getSelector: getSelector,\n getSelectorsFromObject: getSelectorsFromObject,\n getVariablesFromSingularFragment: getVariablesFromSingularFragment,\n getVariablesFromPluralFragment: getVariablesFromPluralFragment,\n getVariablesFromFragment: getVariablesFromFragment,\n getVariablesFromObject: getVariablesFromObject\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar hasWeakSetDefined = typeof WeakSet !== 'undefined';\nvar hasWeakMapDefined = typeof WeakMap !== 'undefined';\n/**\n * Recycles subtrees from `prevData` by replacing equal subtrees in `nextData`.\n */\n\nfunction recycleNodesInto(prevData, nextData) {\n if (prevData === nextData || typeof prevData !== 'object' || prevData instanceof Set || prevData instanceof Map || hasWeakSetDefined && prevData instanceof WeakSet || hasWeakMapDefined && prevData instanceof WeakMap || !prevData || typeof nextData !== 'object' || nextData instanceof Set || nextData instanceof Map || hasWeakSetDefined && nextData instanceof WeakSet || hasWeakMapDefined && nextData instanceof WeakMap || !nextData) {\n return nextData;\n }\n\n var canRecycle = false; // Assign local variables to preserve Flow type refinement.\n\n var prevArray = Array.isArray(prevData) ? prevData : null;\n var nextArray = Array.isArray(nextData) ? nextData : null;\n\n if (prevArray && nextArray) {\n canRecycle = nextArray.reduce(function (wasEqual, nextItem, ii) {\n var prevValue = prevArray[ii];\n var nextValue = recycleNodesInto(prevValue, nextItem);\n\n if (nextValue !== nextArray[ii]) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!Object.isFrozen(nextArray)) {\n nextArray[ii] = nextValue;\n }\n } else {\n nextArray[ii] = nextValue;\n }\n }\n\n return wasEqual && nextValue === prevArray[ii];\n }, true) && prevArray.length === nextArray.length;\n } else if (!prevArray && !nextArray) {\n // Assign local variables to preserve Flow type refinement.\n var prevObject = prevData;\n var nextObject = nextData;\n var prevKeys = Object.keys(prevObject);\n var nextKeys = Object.keys(nextObject);\n canRecycle = nextKeys.reduce(function (wasEqual, key) {\n var prevValue = prevObject[key];\n var nextValue = recycleNodesInto(prevValue, nextObject[key]);\n\n if (nextValue !== nextObject[key]) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!Object.isFrozen(nextObject)) {\n // $FlowFixMe[cannot-write]\n nextObject[key] = nextValue;\n }\n } else {\n // $FlowFixMe[cannot-write]\n nextObject[key] = nextValue;\n }\n }\n\n return wasEqual && nextValue === prevObject[key];\n }, true) && prevKeys.length === nextKeys.length;\n }\n\n return canRecycle ? prevData : nextData;\n}\n\nmodule.exports = recycleNodesInto;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _createForOfIteratorHelper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createForOfIteratorHelper\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar DataChecker = require('./DataChecker');\n\nvar RelayFeatureFlags = require('../util/RelayFeatureFlags');\n\nvar RelayModernRecord = require('./RelayModernRecord');\n\nvar RelayOptimisticRecordSource = require('./RelayOptimisticRecordSource');\n\nvar RelayReader = require('./RelayReader');\n\nvar RelayReferenceMarker = require('./RelayReferenceMarker');\n\nvar RelayStoreReactFlightUtils = require('./RelayStoreReactFlightUtils');\n\nvar RelayStoreSubscriptions = require('./RelayStoreSubscriptions');\n\nvar RelayStoreSubscriptionsUsingMapByID = require('./RelayStoreSubscriptionsUsingMapByID');\n\nvar RelayStoreUtils = require('./RelayStoreUtils');\n\nvar deepFreeze = require('../util/deepFreeze');\n\nvar defaultGetDataID = require('./defaultGetDataID');\n\nvar invariant = require('invariant');\n\nvar resolveImmediate = require('../util/resolveImmediate');\n\nvar _require = require('./RelayStoreUtils'),\n ROOT_ID = _require.ROOT_ID,\n ROOT_TYPE = _require.ROOT_TYPE;\n\nvar DEFAULT_RELEASE_BUFFER_SIZE = 10;\n/**\n * @public\n *\n * An implementation of the `Store` interface defined in `RelayStoreTypes`.\n *\n * Note that a Store takes ownership of all records provided to it: other\n * objects may continue to hold a reference to such records but may not mutate\n * them. The static Relay core is architected to avoid mutating records that may have been\n * passed to a store: operations that mutate records will either create fresh\n * records or clone existing records and modify the clones. Record immutability\n * is also enforced in development mode by freezing all records passed to a store.\n */\n\nvar RelayModernStore = /*#__PURE__*/function () {\n function RelayModernStore(source, options) {\n var _this = this;\n\n var _options$gcReleaseBuf, _options$gcScheduler, _options$getDataID, _options$log, _options$operationLoa;\n\n (0, _defineProperty2[\"default\"])(this, \"_gcStep\", function () {\n if (_this._gcRun) {\n if (_this._gcRun.next().done) {\n _this._gcRun = null;\n } else {\n _this._gcScheduler(_this._gcStep);\n }\n }\n });\n\n // Prevent mutation of a record from outside the store.\n if (process.env.NODE_ENV !== \"production\") {\n var storeIDs = source.getRecordIDs();\n\n for (var ii = 0; ii < storeIDs.length; ii++) {\n var record = source.get(storeIDs[ii]);\n\n if (record) {\n RelayModernRecord.freeze(record);\n }\n }\n }\n\n this._currentWriteEpoch = 0;\n this._gcHoldCounter = 0;\n this._gcReleaseBufferSize = (_options$gcReleaseBuf = options === null || options === void 0 ? void 0 : options.gcReleaseBufferSize) !== null && _options$gcReleaseBuf !== void 0 ? _options$gcReleaseBuf : DEFAULT_RELEASE_BUFFER_SIZE;\n this._gcRun = null;\n this._gcScheduler = (_options$gcScheduler = options === null || options === void 0 ? void 0 : options.gcScheduler) !== null && _options$gcScheduler !== void 0 ? _options$gcScheduler : resolveImmediate;\n this._getDataID = (_options$getDataID = options === null || options === void 0 ? void 0 : options.getDataID) !== null && _options$getDataID !== void 0 ? _options$getDataID : defaultGetDataID;\n this._globalInvalidationEpoch = null;\n this._invalidationSubscriptions = new Set();\n this._invalidatedRecordIDs = new Set();\n this.__log = (_options$log = options === null || options === void 0 ? void 0 : options.log) !== null && _options$log !== void 0 ? _options$log : null;\n this._queryCacheExpirationTime = options === null || options === void 0 ? void 0 : options.queryCacheExpirationTime;\n this._operationLoader = (_options$operationLoa = options === null || options === void 0 ? void 0 : options.operationLoader) !== null && _options$operationLoa !== void 0 ? _options$operationLoa : null;\n this._optimisticSource = null;\n this._recordSource = source;\n this._releaseBuffer = [];\n this._roots = new Map();\n this._shouldScheduleGC = false;\n this._storeSubscriptions = RelayFeatureFlags.ENABLE_STORE_SUBSCRIPTIONS_REFACTOR === true ? new RelayStoreSubscriptionsUsingMapByID(options === null || options === void 0 ? void 0 : options.log) : new RelayStoreSubscriptions(options === null || options === void 0 ? void 0 : options.log);\n this._updatedRecordIDs = new Set();\n this._shouldProcessClientComponents = options === null || options === void 0 ? void 0 : options.shouldProcessClientComponents;\n initializeRecordSource(this._recordSource);\n }\n\n var _proto = RelayModernStore.prototype;\n\n _proto.getSource = function getSource() {\n var _this$_optimisticSour;\n\n return (_this$_optimisticSour = this._optimisticSource) !== null && _this$_optimisticSour !== void 0 ? _this$_optimisticSour : this._recordSource;\n };\n\n _proto.check = function check(operation, options) {\n var _this$_optimisticSour2, _options$target, _options$handlers;\n\n var selector = operation.root;\n var source = (_this$_optimisticSour2 = this._optimisticSource) !== null && _this$_optimisticSour2 !== void 0 ? _this$_optimisticSour2 : this._recordSource;\n var globalInvalidationEpoch = this._globalInvalidationEpoch;\n\n var rootEntry = this._roots.get(operation.request.identifier);\n\n var operationLastWrittenAt = rootEntry != null ? rootEntry.epoch : null; // Check if store has been globally invalidated\n\n if (globalInvalidationEpoch != null) {\n // If so, check if the operation we're checking was last written\n // before or after invalidation occured.\n if (operationLastWrittenAt == null || operationLastWrittenAt <= globalInvalidationEpoch) {\n // If the operation was written /before/ global invalidation occurred,\n // or if this operation has never been written to the store before,\n // we will consider the data for this operation to be stale\n // (i.e. not resolvable from the store).\n return {\n status: 'stale'\n };\n }\n }\n\n var target = (_options$target = options === null || options === void 0 ? void 0 : options.target) !== null && _options$target !== void 0 ? _options$target : source;\n var handlers = (_options$handlers = options === null || options === void 0 ? void 0 : options.handlers) !== null && _options$handlers !== void 0 ? _options$handlers : [];\n var operationAvailability = DataChecker.check(source, target, selector, handlers, this._operationLoader, this._getDataID, this._shouldProcessClientComponents);\n return getAvailabilityStatus(operationAvailability, operationLastWrittenAt, rootEntry === null || rootEntry === void 0 ? void 0 : rootEntry.fetchTime, this._queryCacheExpirationTime);\n };\n\n _proto.retain = function retain(operation) {\n var _this2 = this;\n\n var id = operation.request.identifier;\n var disposed = false;\n\n var dispose = function dispose() {\n // Ensure each retain can only dispose once\n if (disposed) {\n return;\n }\n\n disposed = true; // For Flow: guard against the entry somehow not existing\n\n var rootEntry = _this2._roots.get(id);\n\n if (rootEntry == null) {\n return;\n } // Decrement the ref count: if it becomes zero it is eligible\n // for release.\n\n\n rootEntry.refCount--;\n\n if (rootEntry.refCount === 0) {\n var _queryCacheExpirationTime = _this2._queryCacheExpirationTime;\n\n var rootEntryIsStale = rootEntry.fetchTime != null && _queryCacheExpirationTime != null && rootEntry.fetchTime <= Date.now() - _queryCacheExpirationTime;\n\n if (rootEntryIsStale) {\n _this2._roots[\"delete\"](id);\n\n _this2.scheduleGC();\n } else {\n _this2._releaseBuffer.push(id); // If the release buffer is now over-full, remove the least-recently\n // added entry and schedule a GC. Note that all items in the release\n // buffer have a refCount of 0.\n\n\n if (_this2._releaseBuffer.length > _this2._gcReleaseBufferSize) {\n var _id = _this2._releaseBuffer.shift();\n\n _this2._roots[\"delete\"](_id);\n\n _this2.scheduleGC();\n }\n }\n }\n };\n\n var rootEntry = this._roots.get(id);\n\n if (rootEntry != null) {\n if (rootEntry.refCount === 0) {\n // This entry should be in the release buffer, but it no longer belongs\n // there since it's retained. Remove it to maintain the invariant that\n // all release buffer entries have a refCount of 0.\n this._releaseBuffer = this._releaseBuffer.filter(function (_id) {\n return _id !== id;\n });\n } // If we've previously retained this operation, increment the refCount\n\n\n rootEntry.refCount += 1;\n } else {\n // Otherwise create a new entry for the operation\n this._roots.set(id, {\n operation: operation,\n refCount: 1,\n epoch: null,\n fetchTime: null\n });\n }\n\n return {\n dispose: dispose\n };\n };\n\n _proto.lookup = function lookup(selector) {\n var source = this.getSource();\n var snapshot = RelayReader.read(source, selector);\n\n if (process.env.NODE_ENV !== \"production\") {\n deepFreeze(snapshot);\n }\n\n return snapshot;\n } // This method will return a list of updated owners from the subscriptions\n ;\n\n _proto.notify = function notify(sourceOperation, invalidateStore) {\n var _this3 = this;\n\n var log = this.__log;\n\n if (log != null) {\n log({\n name: 'store.notify.start',\n sourceOperation: sourceOperation\n });\n } // Increment the current write when notifying after executing\n // a set of changes to the store.\n\n\n this._currentWriteEpoch++;\n\n if (invalidateStore === true) {\n this._globalInvalidationEpoch = this._currentWriteEpoch;\n }\n\n var source = this.getSource();\n var updatedOwners = [];\n\n this._storeSubscriptions.updateSubscriptions(source, this._updatedRecordIDs, updatedOwners, sourceOperation);\n\n this._invalidationSubscriptions.forEach(function (subscription) {\n _this3._updateInvalidationSubscription(subscription, invalidateStore === true);\n });\n\n if (log != null) {\n log({\n name: 'store.notify.complete',\n sourceOperation: sourceOperation,\n updatedRecordIDs: this._updatedRecordIDs,\n invalidatedRecordIDs: this._invalidatedRecordIDs\n });\n }\n\n this._updatedRecordIDs.clear();\n\n this._invalidatedRecordIDs.clear(); // If a source operation was provided (indicating the operation\n // that produced this update to the store), record the current epoch\n // at which this operation was written.\n\n\n if (sourceOperation != null) {\n // We only track the epoch at which the operation was written if\n // it was previously retained, to keep the size of our operation\n // epoch map bounded. If a query wasn't retained, we assume it can\n // may be deleted at any moment and thus is not relevant for us to track\n // for the purposes of invalidation.\n var id = sourceOperation.request.identifier;\n\n var rootEntry = this._roots.get(id);\n\n if (rootEntry != null) {\n rootEntry.epoch = this._currentWriteEpoch;\n rootEntry.fetchTime = Date.now();\n } else if (sourceOperation.request.node.params.operationKind === 'query' && this._gcReleaseBufferSize > 0 && this._releaseBuffer.length < this._gcReleaseBufferSize) {\n // The operation isn't retained but there is space in the release buffer:\n // temporarily track this operation in case the data can be reused soon.\n var temporaryRootEntry = {\n operation: sourceOperation,\n refCount: 0,\n epoch: this._currentWriteEpoch,\n fetchTime: Date.now()\n };\n\n this._releaseBuffer.push(id);\n\n this._roots.set(id, temporaryRootEntry);\n }\n }\n\n return updatedOwners;\n };\n\n _proto.publish = function publish(source, idsMarkedForInvalidation) {\n var _this$_optimisticSour3;\n\n var target = (_this$_optimisticSour3 = this._optimisticSource) !== null && _this$_optimisticSour3 !== void 0 ? _this$_optimisticSour3 : this._recordSource;\n updateTargetFromSource(target, source, // We increment the current epoch at the end of the set of updates,\n // in notify(). Here, we pass what will be the incremented value of\n // the epoch to use to write to invalidated records.\n this._currentWriteEpoch + 1, idsMarkedForInvalidation, this._updatedRecordIDs, this._invalidatedRecordIDs); // NOTE: log *after* processing the source so that even if a bad log function\n // mutates the source, it doesn't affect Relay processing of it.\n\n var log = this.__log;\n\n if (log != null) {\n log({\n name: 'store.publish',\n source: source,\n optimistic: target === this._optimisticSource\n });\n }\n };\n\n _proto.subscribe = function subscribe(snapshot, callback) {\n return this._storeSubscriptions.subscribe(snapshot, callback);\n };\n\n _proto.holdGC = function holdGC() {\n var _this4 = this;\n\n if (this._gcRun) {\n this._gcRun = null;\n this._shouldScheduleGC = true;\n }\n\n this._gcHoldCounter++;\n\n var dispose = function dispose() {\n if (_this4._gcHoldCounter > 0) {\n _this4._gcHoldCounter--;\n\n if (_this4._gcHoldCounter === 0 && _this4._shouldScheduleGC) {\n _this4.scheduleGC();\n\n _this4._shouldScheduleGC = false;\n }\n }\n };\n\n return {\n dispose: dispose\n };\n };\n\n _proto.toJSON = function toJSON() {\n return 'RelayModernStore()';\n } // Internal API\n ;\n\n _proto.__getUpdatedRecordIDs = function __getUpdatedRecordIDs() {\n return this._updatedRecordIDs;\n };\n\n _proto.lookupInvalidationState = function lookupInvalidationState(dataIDs) {\n var _this5 = this;\n\n var invalidations = new Map();\n dataIDs.forEach(function (dataID) {\n var _RelayModernRecord$ge;\n\n var record = _this5.getSource().get(dataID);\n\n invalidations.set(dataID, (_RelayModernRecord$ge = RelayModernRecord.getInvalidationEpoch(record)) !== null && _RelayModernRecord$ge !== void 0 ? _RelayModernRecord$ge : null);\n });\n invalidations.set('global', this._globalInvalidationEpoch);\n return {\n dataIDs: dataIDs,\n invalidations: invalidations\n };\n };\n\n _proto.checkInvalidationState = function checkInvalidationState(prevInvalidationState) {\n var latestInvalidationState = this.lookupInvalidationState(prevInvalidationState.dataIDs);\n var currentInvalidations = latestInvalidationState.invalidations;\n var prevInvalidations = prevInvalidationState.invalidations; // Check if global invalidation has changed\n\n if (currentInvalidations.get('global') !== prevInvalidations.get('global')) {\n return true;\n } // Check if the invalidation state for any of the ids has changed.\n\n\n var _iterator = (0, _createForOfIteratorHelper2[\"default\"])(prevInvalidationState.dataIDs),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var dataID = _step.value;\n\n if (currentInvalidations.get(dataID) !== prevInvalidations.get(dataID)) {\n return true;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return false;\n };\n\n _proto.subscribeToInvalidationState = function subscribeToInvalidationState(invalidationState, callback) {\n var _this6 = this;\n\n var subscription = {\n callback: callback,\n invalidationState: invalidationState\n };\n\n var dispose = function dispose() {\n _this6._invalidationSubscriptions[\"delete\"](subscription);\n };\n\n this._invalidationSubscriptions.add(subscription);\n\n return {\n dispose: dispose\n };\n };\n\n _proto._updateInvalidationSubscription = function _updateInvalidationSubscription(subscription, invalidatedStore) {\n var _this7 = this;\n\n var callback = subscription.callback,\n invalidationState = subscription.invalidationState;\n var dataIDs = invalidationState.dataIDs;\n var isSubscribedToInvalidatedIDs = invalidatedStore || dataIDs.some(function (dataID) {\n return _this7._invalidatedRecordIDs.has(dataID);\n });\n\n if (!isSubscribedToInvalidatedIDs) {\n return;\n }\n\n callback();\n };\n\n _proto.snapshot = function snapshot() {\n !(this._optimisticSource == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernStore: Unexpected call to snapshot() while a previous ' + 'snapshot exists.') : invariant(false) : void 0;\n var log = this.__log;\n\n if (log != null) {\n log({\n name: 'store.snapshot'\n });\n }\n\n this._storeSubscriptions.snapshotSubscriptions(this.getSource());\n\n if (this._gcRun) {\n this._gcRun = null;\n this._shouldScheduleGC = true;\n }\n\n this._optimisticSource = RelayOptimisticRecordSource.create(this.getSource());\n };\n\n _proto.restore = function restore() {\n !(this._optimisticSource != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernStore: Unexpected call to restore(), expected a snapshot ' + 'to exist (make sure to call snapshot()).') : invariant(false) : void 0;\n var log = this.__log;\n\n if (log != null) {\n log({\n name: 'store.restore'\n });\n }\n\n this._optimisticSource = null;\n\n if (this._shouldScheduleGC) {\n this.scheduleGC();\n }\n\n this._storeSubscriptions.restoreSubscriptions();\n };\n\n _proto.scheduleGC = function scheduleGC() {\n if (this._gcHoldCounter > 0) {\n this._shouldScheduleGC = true;\n return;\n }\n\n if (this._gcRun) {\n return;\n }\n\n this._gcRun = this._collect();\n\n this._gcScheduler(this._gcStep);\n }\n /**\n * Run a full GC synchronously.\n */\n ;\n\n _proto.__gc = function __gc() {\n // Don't run GC while there are optimistic updates applied\n if (this._optimisticSource != null) {\n return;\n }\n\n var gcRun = this._collect();\n\n while (!gcRun.next().done) {}\n };\n\n _proto._collect = function* _collect() {\n /* eslint-disable no-labels */\n top: while (true) {\n var startEpoch = this._currentWriteEpoch;\n var references = new Set(); // Mark all records that are traversable from a root\n\n var _iterator2 = (0, _createForOfIteratorHelper2[\"default\"])(this._roots.values()),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var operation = _step2.value.operation;\n var selector = operation.root;\n RelayReferenceMarker.mark(this._recordSource, selector, references, this._operationLoader, this._shouldProcessClientComponents); // Yield for other work after each operation\n\n yield; // If the store was updated, restart\n\n if (startEpoch !== this._currentWriteEpoch) {\n continue top;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n var log = this.__log;\n\n if (log != null) {\n log({\n name: 'store.gc',\n references: references\n });\n } // Sweep records without references\n\n\n if (references.size === 0) {\n // Short-circuit if *nothing* is referenced\n this._recordSource.clear();\n } else {\n // Evict any unreferenced nodes\n var storeIDs = this._recordSource.getRecordIDs();\n\n for (var ii = 0; ii < storeIDs.length; ii++) {\n var dataID = storeIDs[ii];\n\n if (!references.has(dataID)) {\n this._recordSource.remove(dataID);\n }\n }\n }\n\n return;\n }\n };\n\n return RelayModernStore;\n}();\n\nfunction initializeRecordSource(target) {\n if (!target.has(ROOT_ID)) {\n var rootRecord = RelayModernRecord.create(ROOT_ID, ROOT_TYPE);\n target.set(ROOT_ID, rootRecord);\n }\n}\n/**\n * Updates the target with information from source, also updating a mapping of\n * which records in the target were changed as a result.\n * Additionally, will mark records as invalidated at the current write epoch\n * given the set of record ids marked as stale in this update.\n */\n\n\nfunction updateTargetFromSource(target, source, currentWriteEpoch, idsMarkedForInvalidation, updatedRecordIDs, invalidatedRecordIDs) {\n // First, update any records that were marked for invalidation.\n // For each provided dataID that was invalidated, we write the\n // INVALIDATED_AT_KEY on the record, indicating\n // the epoch at which the record was invalidated.\n if (idsMarkedForInvalidation) {\n idsMarkedForInvalidation.forEach(function (dataID) {\n var targetRecord = target.get(dataID);\n var sourceRecord = source.get(dataID); // If record was deleted during the update (and also invalidated),\n // we don't need to count it as an invalidated id\n\n if (sourceRecord === null) {\n return;\n }\n\n var nextRecord;\n\n if (targetRecord != null) {\n // If the target record exists, use it to set the epoch\n // at which it was invalidated. This record will be updated with\n // any changes from source in the section below\n // where we update the target records based on the source.\n nextRecord = RelayModernRecord.clone(targetRecord);\n } else {\n // If the target record doesn't exist, it means that a new record\n // in the source was created (and also invalidated), so we use that\n // record to set the epoch at which it was invalidated. This record\n // will be updated with any changes from source in the section below\n // where we update the target records based on the source.\n nextRecord = sourceRecord != null ? RelayModernRecord.clone(sourceRecord) : null;\n }\n\n if (!nextRecord) {\n return;\n }\n\n RelayModernRecord.setValue(nextRecord, RelayStoreUtils.INVALIDATED_AT_KEY, currentWriteEpoch);\n invalidatedRecordIDs.add(dataID); // $FlowFixMe[incompatible-call]\n\n target.set(dataID, nextRecord);\n });\n } // Update the target based on the changes present in source\n\n\n var dataIDs = source.getRecordIDs();\n\n for (var ii = 0; ii < dataIDs.length; ii++) {\n var dataID = dataIDs[ii];\n var sourceRecord = source.get(dataID);\n var targetRecord = target.get(dataID); // Prevent mutation of a record from outside the store.\n\n if (process.env.NODE_ENV !== \"production\") {\n if (sourceRecord) {\n RelayModernRecord.freeze(sourceRecord);\n }\n }\n\n if (sourceRecord && targetRecord) {\n // ReactFlightClientResponses are lazy and only materialize when readRoot\n // is called when we read the field, so if the record is a Flight field\n // we always use the new record's data regardless of whether\n // it actually changed. Let React take care of reconciliation instead.\n var nextRecord = RelayModernRecord.getType(targetRecord) === RelayStoreReactFlightUtils.REACT_FLIGHT_TYPE_NAME ? sourceRecord : RelayModernRecord.update(targetRecord, sourceRecord);\n\n if (nextRecord !== targetRecord) {\n // Prevent mutation of a record from outside the store.\n if (process.env.NODE_ENV !== \"production\") {\n RelayModernRecord.freeze(nextRecord);\n }\n\n updatedRecordIDs.add(dataID);\n target.set(dataID, nextRecord);\n }\n } else if (sourceRecord === null) {\n target[\"delete\"](dataID);\n\n if (targetRecord !== null) {\n updatedRecordIDs.add(dataID);\n }\n } else if (sourceRecord) {\n target.set(dataID, sourceRecord);\n updatedRecordIDs.add(dataID);\n } // don't add explicit undefined\n\n }\n}\n/**\n * Returns an OperationAvailability given the Availability returned\n * by checking an operation, and when that operation was last written to the store.\n * Specifically, the provided Availability of an operation will contain the\n * value of when a record referenced by the operation was most recently\n * invalidated; given that value, and given when this operation was last\n * written to the store, this function will return the overall\n * OperationAvailability for the operation.\n */\n\n\nfunction getAvailabilityStatus(operationAvailability, operationLastWrittenAt, operationFetchTime, queryCacheExpirationTime) {\n var mostRecentlyInvalidatedAt = operationAvailability.mostRecentlyInvalidatedAt,\n status = operationAvailability.status;\n\n if (typeof mostRecentlyInvalidatedAt === 'number') {\n // If some record referenced by this operation is stale, then the operation itself is stale\n // if either the operation itself was never written *or* the operation was last written\n // before the most recent invalidation of its reachable records.\n if (operationLastWrittenAt == null || mostRecentlyInvalidatedAt > operationLastWrittenAt) {\n return {\n status: 'stale'\n };\n }\n }\n\n if (status === 'missing') {\n return {\n status: 'missing'\n };\n }\n\n if (operationFetchTime != null && queryCacheExpirationTime != null) {\n var isStale = operationFetchTime <= Date.now() - queryCacheExpirationTime;\n\n if (isStale) {\n return {\n status: 'stale'\n };\n }\n } // There were no invalidations of any reachable records *or* the operation is known to have\n // been fetched after the most recent record invalidation.\n\n\n return {\n status: 'available',\n fetchTime: operationFetchTime !== null && operationFetchTime !== void 0 ? operationFetchTime : null\n };\n}\n\nmodule.exports = RelayModernStore;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @emails oncall+relay\n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar OperationExecutor = require('./OperationExecutor');\n\nvar RelayDefaultHandlerProvider = require('../handlers/RelayDefaultHandlerProvider');\n\nvar RelayFeatureFlags = require('../util/RelayFeatureFlags');\n\nvar RelayObservable = require('../network/RelayObservable');\n\nvar RelayOperationTracker = require('../store/RelayOperationTracker');\n\nvar RelayPublishQueue = require('./RelayPublishQueue');\n\nvar RelayRecordSource = require('./RelayRecordSource');\n\nvar defaultGetDataID = require('./defaultGetDataID');\n\nvar defaultRequiredFieldLogger = require('./defaultRequiredFieldLogger');\n\nvar generateID = require('../util/generateID');\n\nvar invariant = require('invariant');\n\nvar RelayModernEnvironment = /*#__PURE__*/function () {\n function RelayModernEnvironment(config) {\n var _this = this;\n\n var _config$log, _config$requiredField, _config$UNSTABLE_defa, _config$getDataID, _config$handlerProvid, _config$scheduler, _config$isServer, _config$operationTrac;\n\n this.configName = config.configName;\n this._treatMissingFieldsAsNull = config.treatMissingFieldsAsNull === true;\n var operationLoader = config.operationLoader;\n var reactFlightPayloadDeserializer = config.reactFlightPayloadDeserializer;\n var reactFlightServerErrorHandler = config.reactFlightServerErrorHandler;\n\n if (process.env.NODE_ENV !== \"production\") {\n if (operationLoader != null) {\n !(typeof operationLoader === 'object' && typeof operationLoader.get === 'function' && typeof operationLoader.load === 'function') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected `operationLoader` to be an object ' + 'with get() and load() functions, got `%s`.', operationLoader) : invariant(false) : void 0;\n }\n\n if (reactFlightPayloadDeserializer != null) {\n !(typeof reactFlightPayloadDeserializer === 'function') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected `reactFlightPayloadDeserializer` ' + ' to be a function, got `%s`.', reactFlightPayloadDeserializer) : invariant(false) : void 0;\n }\n }\n\n this.__log = (_config$log = config.log) !== null && _config$log !== void 0 ? _config$log : emptyFunction;\n this.requiredFieldLogger = (_config$requiredField = config.requiredFieldLogger) !== null && _config$requiredField !== void 0 ? _config$requiredField : defaultRequiredFieldLogger;\n this._defaultRenderPolicy = ((_config$UNSTABLE_defa = config.UNSTABLE_defaultRenderPolicy) !== null && _config$UNSTABLE_defa !== void 0 ? _config$UNSTABLE_defa : RelayFeatureFlags.ENABLE_PARTIAL_RENDERING_DEFAULT === true) ? 'partial' : 'full';\n this._operationLoader = operationLoader;\n this._operationExecutions = new Map();\n this._network = this.__wrapNetworkWithLogObserver(config.network);\n this._getDataID = (_config$getDataID = config.getDataID) !== null && _config$getDataID !== void 0 ? _config$getDataID : defaultGetDataID;\n this._publishQueue = new RelayPublishQueue(config.store, (_config$handlerProvid = config.handlerProvider) !== null && _config$handlerProvid !== void 0 ? _config$handlerProvid : RelayDefaultHandlerProvider, this._getDataID);\n this._scheduler = (_config$scheduler = config.scheduler) !== null && _config$scheduler !== void 0 ? _config$scheduler : null;\n this._store = config.store;\n this.options = config.options;\n this._isServer = (_config$isServer = config.isServer) !== null && _config$isServer !== void 0 ? _config$isServer : false;\n\n this.__setNet = function (newNet) {\n return _this._network = _this.__wrapNetworkWithLogObserver(newNet);\n };\n\n if (process.env.NODE_ENV !== \"production\") {\n var _require = require('./StoreInspector'),\n inspect = _require.inspect;\n\n this.DEBUG_inspect = function (dataID) {\n return inspect(_this, dataID);\n };\n } // Register this Relay Environment with Relay DevTools if it exists.\n // Note: this must always be the last step in the constructor.\n\n\n var _global = typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : undefined;\n\n var devToolsHook = _global && _global.__RELAY_DEVTOOLS_HOOK__;\n\n if (devToolsHook) {\n devToolsHook.registerEnvironment(this);\n }\n\n this._missingFieldHandlers = config.missingFieldHandlers;\n this._operationTracker = (_config$operationTrac = config.operationTracker) !== null && _config$operationTrac !== void 0 ? _config$operationTrac : new RelayOperationTracker();\n this._reactFlightPayloadDeserializer = reactFlightPayloadDeserializer;\n this._reactFlightServerErrorHandler = reactFlightServerErrorHandler;\n this._shouldProcessClientComponents = config.shouldProcessClientComponents;\n }\n\n var _proto = RelayModernEnvironment.prototype;\n\n _proto.getStore = function getStore() {\n return this._store;\n };\n\n _proto.getNetwork = function getNetwork() {\n return this._network;\n };\n\n _proto.getOperationTracker = function getOperationTracker() {\n return this._operationTracker;\n };\n\n _proto.isRequestActive = function isRequestActive(requestIdentifier) {\n var activeState = this._operationExecutions.get(requestIdentifier);\n\n return activeState === 'active';\n };\n\n _proto.UNSTABLE_getDefaultRenderPolicy = function UNSTABLE_getDefaultRenderPolicy() {\n return this._defaultRenderPolicy;\n };\n\n _proto.applyUpdate = function applyUpdate(optimisticUpdate) {\n var _this2 = this;\n\n var dispose = function dispose() {\n _this2._scheduleUpdates(function () {\n _this2._publishQueue.revertUpdate(optimisticUpdate);\n\n _this2._publishQueue.run();\n });\n };\n\n this._scheduleUpdates(function () {\n _this2._publishQueue.applyUpdate(optimisticUpdate);\n\n _this2._publishQueue.run();\n });\n\n return {\n dispose: dispose\n };\n };\n\n _proto.revertUpdate = function revertUpdate(update) {\n var _this3 = this;\n\n this._scheduleUpdates(function () {\n _this3._publishQueue.revertUpdate(update);\n\n _this3._publishQueue.run();\n });\n };\n\n _proto.replaceUpdate = function replaceUpdate(update, newUpdate) {\n var _this4 = this;\n\n this._scheduleUpdates(function () {\n _this4._publishQueue.revertUpdate(update);\n\n _this4._publishQueue.applyUpdate(newUpdate);\n\n _this4._publishQueue.run();\n });\n };\n\n _proto.applyMutation = function applyMutation(optimisticConfig) {\n var subscription = this._execute({\n createSource: function createSource() {\n return RelayObservable.create(function (_sink) {});\n },\n isClientPayload: false,\n operation: optimisticConfig.operation,\n optimisticConfig: optimisticConfig,\n updater: null\n }).subscribe({});\n\n return {\n dispose: function dispose() {\n return subscription.unsubscribe();\n }\n };\n };\n\n _proto.check = function check(operation) {\n if (this._missingFieldHandlers == null || this._missingFieldHandlers.length === 0) {\n return this._store.check(operation);\n }\n\n return this._checkSelectorAndHandleMissingFields(operation, this._missingFieldHandlers);\n };\n\n _proto.commitPayload = function commitPayload(operation, payload) {\n this._execute({\n createSource: function createSource() {\n return RelayObservable.from({\n data: payload\n });\n },\n isClientPayload: true,\n operation: operation,\n optimisticConfig: null,\n updater: null\n }).subscribe({});\n };\n\n _proto.commitUpdate = function commitUpdate(updater) {\n var _this5 = this;\n\n this._scheduleUpdates(function () {\n _this5._publishQueue.commitUpdate(updater);\n\n _this5._publishQueue.run();\n });\n };\n\n _proto.lookup = function lookup(readSelector) {\n return this._store.lookup(readSelector);\n };\n\n _proto.subscribe = function subscribe(snapshot, callback) {\n return this._store.subscribe(snapshot, callback);\n };\n\n _proto.retain = function retain(operation) {\n return this._store.retain(operation);\n };\n\n _proto.isServer = function isServer() {\n return this._isServer;\n };\n\n _proto._checkSelectorAndHandleMissingFields = function _checkSelectorAndHandleMissingFields(operation, handlers) {\n var _this6 = this;\n\n var target = RelayRecordSource.create();\n\n var result = this._store.check(operation, {\n target: target,\n handlers: handlers\n });\n\n if (target.size() > 0) {\n this._scheduleUpdates(function () {\n _this6._publishQueue.commitSource(target);\n\n _this6._publishQueue.run();\n });\n }\n\n return result;\n };\n\n _proto._scheduleUpdates = function _scheduleUpdates(task) {\n var scheduler = this._scheduler;\n\n if (scheduler != null) {\n scheduler.schedule(task);\n } else {\n task();\n }\n }\n /**\n * Returns an Observable of GraphQLResponse resulting from executing the\n * provided Query or Subscription operation, each result of which is then\n * normalized and committed to the publish queue.\n *\n * Note: Observables are lazy, so calling this method will do nothing until\n * the result is subscribed to: environment.execute({...}).subscribe({...}).\n */\n ;\n\n _proto.execute = function execute(_ref) {\n var _this7 = this;\n\n var operation = _ref.operation,\n updater = _ref.updater;\n return this._execute({\n createSource: function createSource() {\n return _this7._network.execute(operation.request.node.params, operation.request.variables, operation.request.cacheConfig || {}, null);\n },\n isClientPayload: false,\n operation: operation,\n optimisticConfig: null,\n updater: updater\n });\n }\n /**\n * Returns an Observable of GraphQLResponse resulting from executing the\n * provided Mutation operation, the result of which is then normalized and\n * committed to the publish queue along with an optional optimistic response\n * or updater.\n *\n * Note: Observables are lazy, so calling this method will do nothing until\n * the result is subscribed to:\n * environment.executeMutation({...}).subscribe({...}).\n */\n ;\n\n _proto.executeMutation = function executeMutation(_ref2) {\n var _this8 = this;\n\n var operation = _ref2.operation,\n optimisticResponse = _ref2.optimisticResponse,\n optimisticUpdater = _ref2.optimisticUpdater,\n updater = _ref2.updater,\n uploadables = _ref2.uploadables;\n var optimisticConfig;\n\n if (optimisticResponse || optimisticUpdater) {\n optimisticConfig = {\n operation: operation,\n response: optimisticResponse,\n updater: optimisticUpdater\n };\n }\n\n return this._execute({\n createSource: function createSource() {\n return _this8._network.execute(operation.request.node.params, operation.request.variables, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, operation.request.cacheConfig), {}, {\n force: true\n }), uploadables);\n },\n isClientPayload: false,\n operation: operation,\n optimisticConfig: optimisticConfig,\n updater: updater\n });\n }\n /**\n * Returns an Observable of GraphQLResponse resulting from executing the\n * provided Query or Subscription operation responses, the result of which is\n * then normalized and comitted to the publish queue.\n *\n * Note: Observables are lazy, so calling this method will do nothing until\n * the result is subscribed to:\n * environment.executeWithSource({...}).subscribe({...}).\n */\n ;\n\n _proto.executeWithSource = function executeWithSource(_ref3) {\n var operation = _ref3.operation,\n source = _ref3.source;\n return this._execute({\n createSource: function createSource() {\n return source;\n },\n isClientPayload: false,\n operation: operation,\n optimisticConfig: null,\n updater: null\n });\n };\n\n _proto.toJSON = function toJSON() {\n var _this$configName;\n\n return \"RelayModernEnvironment(\".concat((_this$configName = this.configName) !== null && _this$configName !== void 0 ? _this$configName : '', \")\");\n };\n\n _proto._execute = function _execute(_ref4) {\n var _this9 = this;\n\n var createSource = _ref4.createSource,\n isClientPayload = _ref4.isClientPayload,\n operation = _ref4.operation,\n optimisticConfig = _ref4.optimisticConfig,\n updater = _ref4.updater;\n return RelayObservable.create(function (sink) {\n var executor = OperationExecutor.execute({\n getDataID: _this9._getDataID,\n isClientPayload: isClientPayload,\n operation: operation,\n operationExecutions: _this9._operationExecutions,\n operationLoader: _this9._operationLoader,\n operationTracker: _this9._operationTracker,\n optimisticConfig: optimisticConfig,\n publishQueue: _this9._publishQueue,\n reactFlightPayloadDeserializer: _this9._reactFlightPayloadDeserializer,\n reactFlightServerErrorHandler: _this9._reactFlightServerErrorHandler,\n scheduler: _this9._scheduler,\n shouldProcessClientComponents: _this9._shouldProcessClientComponents,\n sink: sink,\n // NOTE: Some product tests expect `Network.execute` to be called only\n // when the Observable is executed.\n source: createSource(),\n store: _this9._store,\n treatMissingFieldsAsNull: _this9._treatMissingFieldsAsNull,\n updater: updater\n });\n return function () {\n return executor.cancel();\n };\n });\n }\n /**\n * Wraps the network with logging to ensure that network requests are\n * always logged. Relying on each network callsite to be wrapped is\n * untenable and will eventually lead to holes in the logging.\n */\n ;\n\n _proto.__wrapNetworkWithLogObserver = function __wrapNetworkWithLogObserver(network) {\n var that = this;\n return {\n execute: function execute(params, variables, cacheConfig, uploadables) {\n var transactionID = generateID();\n var log = that.__log;\n var logObserver = {\n start: function start(subscription) {\n log({\n name: 'network.start',\n transactionID: transactionID,\n params: params,\n variables: variables,\n cacheConfig: cacheConfig\n });\n },\n next: function next(response) {\n log({\n name: 'network.next',\n transactionID: transactionID,\n response: response\n });\n },\n error: function error(_error) {\n log({\n name: 'network.error',\n transactionID: transactionID,\n error: _error\n });\n },\n complete: function complete() {\n log({\n name: 'network.complete',\n transactionID: transactionID\n });\n },\n unsubscribe: function unsubscribe() {\n log({\n name: 'network.unsubscribe',\n transactionID: transactionID\n });\n }\n };\n\n var logRequestInfo = function logRequestInfo(info) {\n log({\n name: 'network.info',\n transactionID: transactionID,\n info: info\n });\n };\n\n return network.execute(params, variables, cacheConfig, uploadables, logRequestInfo)[\"do\"](logObserver);\n }\n };\n };\n\n return RelayModernEnvironment;\n}(); // Add a sigil for detection by `isRelayModernEnvironment()` to avoid a\n// realm-specific instanceof check, and to aid in module tree-shaking to\n// avoid requiring all of RelayRuntime just to detect its environment.\n\n\nRelayModernEnvironment.prototype['@@RelayModernEnvironment'] = true;\n\nfunction emptyFunction() {}\n\nmodule.exports = RelayModernEnvironment;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @emails oncall+relay\n * \n * @format\n */\n'use strict';\n\nvar PreloadableQueryRegistry = /*#__PURE__*/function () {\n function PreloadableQueryRegistry() {\n this._preloadableQueries = new Map();\n this._callbacks = new Map();\n }\n\n var _proto = PreloadableQueryRegistry.prototype;\n\n _proto.set = function set(key, value) {\n this._preloadableQueries.set(key, value);\n\n var callbacks = this._callbacks.get(key);\n\n if (callbacks != null) {\n callbacks.forEach(function (cb) {\n try {\n cb(value);\n } catch (e) {\n // We do *not* want to throw in this tick, as this callback is executed\n // while a query is required for the very first time.\n setTimeout(function () {\n throw e;\n }, 0);\n }\n });\n }\n };\n\n _proto.get = function get(key) {\n return this._preloadableQueries.get(key);\n };\n\n _proto.onLoad = function onLoad(key, callback) {\n var _this$_callbacks$get;\n\n var callbacks = (_this$_callbacks$get = this._callbacks.get(key)) !== null && _this$_callbacks$get !== void 0 ? _this$_callbacks$get : new Set();\n callbacks.add(callback);\n\n var dispose = function dispose() {\n callbacks[\"delete\"](callback);\n };\n\n this._callbacks.set(key, callbacks);\n\n return {\n dispose: dispose\n };\n };\n\n _proto.clear = function clear() {\n this._preloadableQueries.clear();\n };\n\n return PreloadableQueryRegistry;\n}();\n\nvar preloadableQueryRegistry = new PreloadableQueryRegistry();\nmodule.exports = preloadableQueryRegistry;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar id = 100000;\n\nfunction generateID() {\n return id++;\n}\n\nmodule.exports = generateID;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar profileHandlersByName = {};\nvar defaultProfiler = {\n stop: function stop() {}\n};\n/**\n * @public\n *\n * Instruments methods to allow profiling various parts of Relay. Profiling code\n * in Relay consists of three steps:\n *\n * - Instrument the function to be profiled.\n * - Attach handlers to the instrumented function.\n * - Run the code which triggers the handlers.\n *\n * Handlers attached to instrumented methods are called with an instrumentation\n * name and a callback that must be synchronously executed:\n *\n * instrumentedMethod.attachHandler(function(name, callback) {\n * const start = performance.now();\n * callback();\n * console.log('Duration', performance.now() - start);\n * });\n *\n * Handlers for profiles are callbacks that return a stop method:\n *\n * RelayProfiler.attachProfileHandler('profileName', (name, state) => {\n * const start = performance.now();\n * return function stop(name, state) {\n * console.log(`Duration (${name})`, performance.now() - start);\n * }\n * });\n */\n\nvar RelayProfiler = {\n /**\n * Instruments profiling for arbitrarily asynchronous code by a name.\n *\n * const timerProfiler = RelayProfiler.profile('timeout');\n * setTimeout(function() {\n * timerProfiler.stop();\n * }, 1000);\n *\n * RelayProfiler.attachProfileHandler('timeout', ...);\n *\n * Arbitrary state can also be passed into `profile` as a second argument. The\n * attached profile handlers will receive this as the second argument.\n */\n profile: function profile(name, state) {\n var handlers = profileHandlersByName[name];\n\n if (handlers && handlers.length > 0) {\n var stopHandlers = [];\n\n for (var ii = handlers.length - 1; ii >= 0; ii--) {\n var stopHandler = handlers[ii](name, state);\n stopHandlers.unshift(stopHandler);\n }\n\n return {\n stop: function stop(error) {\n stopHandlers.forEach(function (stopHandler) {\n return stopHandler(error);\n });\n }\n };\n }\n\n return defaultProfiler;\n },\n\n /**\n * Attaches a handler to profiles with the supplied name.\n */\n attachProfileHandler: function attachProfileHandler(name, handler) {\n if (!profileHandlersByName.hasOwnProperty(name)) {\n profileHandlersByName[name] = [];\n }\n\n profileHandlersByName[name].push(handler);\n },\n\n /**\n * Detaches a handler attached via `attachProfileHandler`.\n */\n detachProfileHandler: function detachProfileHandler(name, handler) {\n if (profileHandlersByName.hasOwnProperty(name)) {\n removeFromArray(profileHandlersByName[name], handler);\n }\n }\n};\n\nfunction removeFromArray(array, element) {\n var index = array.indexOf(element);\n\n if (index !== -1) {\n array.splice(index, 1);\n }\n}\n\nmodule.exports = RelayProfiler;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar ITERATOR_KEY = Symbol.iterator;\n\nfunction hasOverlappingIDs(seenRecords, updatedRecordIDs) {\n // $FlowFixMe: Set is an iterable type, accessing its iterator is allowed.\n var iterator = seenRecords[ITERATOR_KEY]();\n var next = iterator.next();\n\n while (!next.done) {\n var key = next.value;\n\n if (updatedRecordIDs.has(key)) {\n return true;\n }\n\n next = iterator.next();\n }\n\n return false;\n}\n\nmodule.exports = hasOverlappingIDs;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar ConnectionInterface = require('./ConnectionInterface');\n\nvar getRelayHandleKey = require('../../util/getRelayHandleKey');\n\nvar invariant = require('invariant');\n\nvar warning = require(\"fbjs/lib/warning\");\n\nvar _require = require('../../store/ClientID'),\n generateClientID = _require.generateClientID;\n\nvar _require2 = require('../../store/RelayStoreUtils'),\n getStableStorageKey = _require2.getStableStorageKey;\n\nvar CONNECTION = 'connection'; // Per-instance incrementing index used to generate unique edge IDs\n\nvar NEXT_EDGE_INDEX = '__connection_next_edge_index';\n/**\n * @public\n *\n * A default runtime handler for connection fields that appends newly fetched\n * edges onto the end of a connection, regardless of the arguments used to fetch\n * those edges.\n */\n\nfunction update(store, payload) {\n var record = store.get(payload.dataID);\n\n if (!record) {\n return;\n }\n\n var _ConnectionInterface$ = ConnectionInterface.get(),\n EDGES = _ConnectionInterface$.EDGES,\n END_CURSOR = _ConnectionInterface$.END_CURSOR,\n HAS_NEXT_PAGE = _ConnectionInterface$.HAS_NEXT_PAGE,\n HAS_PREV_PAGE = _ConnectionInterface$.HAS_PREV_PAGE,\n PAGE_INFO = _ConnectionInterface$.PAGE_INFO,\n PAGE_INFO_TYPE = _ConnectionInterface$.PAGE_INFO_TYPE,\n START_CURSOR = _ConnectionInterface$.START_CURSOR;\n\n var serverConnection = record.getLinkedRecord(payload.fieldKey);\n var serverPageInfo = serverConnection && serverConnection.getLinkedRecord(PAGE_INFO);\n\n if (!serverConnection) {\n record.setValue(null, payload.handleKey);\n return;\n } // In rare cases the handleKey field may be unset even though the client\n // connection record exists, in this case new edges should still be merged\n // into the existing client connection record (and the field reset to point\n // to that record).\n\n\n var clientConnectionID = generateClientID(record.getDataID(), payload.handleKey);\n var clientConnectionField = record.getLinkedRecord(payload.handleKey);\n var clientConnection = clientConnectionField !== null && clientConnectionField !== void 0 ? clientConnectionField : store.get(clientConnectionID);\n var clientPageInfo = clientConnection && clientConnection.getLinkedRecord(PAGE_INFO);\n\n if (!clientConnection) {\n // Initial fetch with data: copy fields from the server record\n var connection = store.create(clientConnectionID, serverConnection.getType());\n connection.setValue(0, NEXT_EDGE_INDEX);\n connection.copyFieldsFrom(serverConnection);\n var serverEdges = serverConnection.getLinkedRecords(EDGES);\n\n if (serverEdges) {\n serverEdges = serverEdges.map(function (edge) {\n return buildConnectionEdge(store, connection, edge);\n });\n connection.setLinkedRecords(serverEdges, EDGES);\n }\n\n record.setLinkedRecord(connection, payload.handleKey);\n clientPageInfo = store.create(generateClientID(connection.getDataID(), PAGE_INFO), PAGE_INFO_TYPE);\n clientPageInfo.setValue(false, HAS_NEXT_PAGE);\n clientPageInfo.setValue(false, HAS_PREV_PAGE);\n clientPageInfo.setValue(null, END_CURSOR);\n clientPageInfo.setValue(null, START_CURSOR);\n\n if (serverPageInfo) {\n clientPageInfo.copyFieldsFrom(serverPageInfo);\n }\n\n connection.setLinkedRecord(clientPageInfo, PAGE_INFO);\n } else {\n if (clientConnectionField == null) {\n // If the handleKey field was unset but the client connection record\n // existed, update the field to point to the record\n record.setLinkedRecord(clientConnection, payload.handleKey);\n }\n\n var _connection = clientConnection; // Subsequent fetches:\n // - updated fields on the connection\n // - merge prev/next edges, de-duplicating by node id\n // - synthesize page info fields\n\n var _serverEdges = serverConnection.getLinkedRecords(EDGES);\n\n if (_serverEdges) {\n _serverEdges = _serverEdges.map(function (edge) {\n return buildConnectionEdge(store, _connection, edge);\n });\n }\n\n var prevEdges = _connection.getLinkedRecords(EDGES);\n\n var prevPageInfo = _connection.getLinkedRecord(PAGE_INFO);\n\n _connection.copyFieldsFrom(serverConnection); // Reset EDGES and PAGE_INFO fields\n\n\n if (prevEdges) {\n _connection.setLinkedRecords(prevEdges, EDGES);\n }\n\n if (prevPageInfo) {\n _connection.setLinkedRecord(prevPageInfo, PAGE_INFO);\n }\n\n var nextEdges = [];\n var args = payload.args;\n\n if (prevEdges && _serverEdges) {\n // $FlowFixMe[prop-missing]\n if (args.after != null) {\n // Forward pagination from the end of the connection: append edges\n if (clientPageInfo && // $FlowFixMe[prop-missing]\n args.after === clientPageInfo.getValue(END_CURSOR)) {\n var nodeIDs = new Set();\n mergeEdges(prevEdges, nextEdges, nodeIDs);\n mergeEdges(_serverEdges, nextEdges, nodeIDs);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Relay: Unexpected after cursor `%s`, edges must ' + 'be fetched from the end of the list (`%s`).', args.after, clientPageInfo && clientPageInfo.getValue(END_CURSOR)) : void 0;\n return;\n } // $FlowFixMe[prop-missing]\n\n } else if (args.before != null) {\n // Backward pagination from the start of the connection: prepend edges\n if (clientPageInfo && // $FlowFixMe[prop-missing]\n args.before === clientPageInfo.getValue(START_CURSOR)) {\n var _nodeIDs = new Set();\n\n mergeEdges(_serverEdges, nextEdges, _nodeIDs);\n mergeEdges(prevEdges, nextEdges, _nodeIDs);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Relay: Unexpected before cursor `%s`, edges must ' + 'be fetched from the beginning of the list (`%s`).', args.before, clientPageInfo && clientPageInfo.getValue(START_CURSOR)) : void 0;\n return;\n }\n } else {\n // The connection was refetched from the beginning/end: replace edges\n nextEdges = _serverEdges;\n }\n } else if (_serverEdges) {\n nextEdges = _serverEdges;\n } else {\n nextEdges = prevEdges;\n } // Update edges only if they were updated, the null check is\n // for Flow (prevEdges could be null).\n\n\n if (nextEdges != null && nextEdges !== prevEdges) {\n _connection.setLinkedRecords(nextEdges, EDGES);\n } // Page info should be updated even if no new edge were returned.\n\n\n if (clientPageInfo && serverPageInfo) {\n // $FlowFixMe[prop-missing]\n if (args.after == null && args.before == null) {\n // The connection was refetched from the beginning/end: replace\n // page_info\n clientPageInfo.copyFieldsFrom(serverPageInfo); // $FlowFixMe[prop-missing]\n } else if (args.before != null || args.after == null && args.last) {\n clientPageInfo.setValue(!!serverPageInfo.getValue(HAS_PREV_PAGE), HAS_PREV_PAGE);\n var startCursor = serverPageInfo.getValue(START_CURSOR);\n\n if (typeof startCursor === 'string') {\n clientPageInfo.setValue(startCursor, START_CURSOR);\n } // $FlowFixMe[prop-missing]\n\n } else if (args.after != null || args.before == null && args.first) {\n clientPageInfo.setValue(!!serverPageInfo.getValue(HAS_NEXT_PAGE), HAS_NEXT_PAGE);\n var endCursor = serverPageInfo.getValue(END_CURSOR);\n\n if (typeof endCursor === 'string') {\n clientPageInfo.setValue(endCursor, END_CURSOR);\n }\n }\n }\n }\n}\n/**\n * @public\n *\n * Given a record and the name of the schema field for which a connection was\n * fetched, returns the linked connection record.\n *\n * Example:\n *\n * Given that data has already been fetched on some user `` on the `friends`\n * field:\n *\n * ```\n * fragment FriendsFragment on User {\n * friends(first: 10) @connection(key: \"FriendsFragment_friends\") {\n * edges {\n * node {\n * id\n * }\n * }\n * }\n * }\n * ```\n *\n * The `friends` connection record can be accessed with:\n *\n * ```\n * store => {\n * const user = store.get('');\n * const friends = ConnectionHandler.getConnection(user, 'FriendsFragment_friends');\n * // Access fields on the connection:\n * const edges = friends.getLinkedRecords('edges');\n * }\n * ```\n *\n * TODO: t15733312\n * Currently we haven't run into this case yet, but we need to add a `getConnections`\n * that returns an array of the connections under the same `key` regardless of the variables.\n */\n\n\nfunction getConnection(record, key, filters) {\n var handleKey = getRelayHandleKey(CONNECTION, key, null);\n return record.getLinkedRecord(handleKey, filters);\n}\n/**\n * @public\n *\n * Given a record ID, the key of a connection field, and optional filters used\n * to identify the connection, returns the connection ID.\n *\n * Example:\n *\n * Given that data has already been fetched on some user `` on the `friends`\n * field:\n *\n * ```\n * fragment FriendsFragment on User {\n * friends(first: 10) @connection(key: \"FriendsFragment_friends\") {\n * edges {\n * node {\n * id\n * }\n * }\n * }\n * }\n * ```\n *\n * The ID of the `friends` connection record can be accessed with:\n *\n * ```\n * store => {\n * const connectionID = ConnectionHandler.getConnectionID('', 'FriendsFragment_friends');\n * }\n * ```\n */\n\n\nfunction getConnectionID(recordID, key, filters) {\n var handleKey = getRelayHandleKey(CONNECTION, key, null);\n var storageKey = getStableStorageKey(handleKey, filters);\n return generateClientID(recordID, storageKey);\n}\n/**\n * @public\n *\n * Inserts an edge after the given cursor, or at the end of the list if no\n * cursor is provided.\n *\n * Example:\n *\n * Given that data has already been fetched on some user `` on the `friends`\n * field:\n *\n * ```\n * fragment FriendsFragment on User {\n * friends(first: 10) @connection(key: \"FriendsFragment_friends\") {\n * edges {\n * node {\n * id\n * }\n * }\n * }\n * }\n * ```\n *\n * An edge can be appended with:\n *\n * ```\n * store => {\n * const user = store.get('');\n * const friends = ConnectionHandler.getConnection(user, 'FriendsFragment_friends');\n * const edge = store.create('', 'FriendsEdge');\n * ConnectionHandler.insertEdgeAfter(friends, edge);\n * }\n * ```\n */\n\n\nfunction insertEdgeAfter(record, newEdge, cursor) {\n var _ConnectionInterface$2 = ConnectionInterface.get(),\n CURSOR = _ConnectionInterface$2.CURSOR,\n EDGES = _ConnectionInterface$2.EDGES;\n\n var edges = record.getLinkedRecords(EDGES);\n\n if (!edges) {\n record.setLinkedRecords([newEdge], EDGES);\n return;\n }\n\n var nextEdges;\n\n if (cursor == null) {\n nextEdges = edges.concat(newEdge);\n } else {\n nextEdges = [];\n var foundCursor = false;\n\n for (var ii = 0; ii < edges.length; ii++) {\n var edge = edges[ii];\n nextEdges.push(edge);\n\n if (edge == null) {\n continue;\n }\n\n var edgeCursor = edge.getValue(CURSOR);\n\n if (cursor === edgeCursor) {\n nextEdges.push(newEdge);\n foundCursor = true;\n }\n }\n\n if (!foundCursor) {\n nextEdges.push(newEdge);\n }\n }\n\n record.setLinkedRecords(nextEdges, EDGES);\n}\n/**\n * @public\n *\n * Creates an edge for a connection record, given a node and edge type.\n */\n\n\nfunction createEdge(store, record, node, edgeType) {\n var _ConnectionInterface$3 = ConnectionInterface.get(),\n NODE = _ConnectionInterface$3.NODE; // An index-based client ID could easily conflict (unless it was\n // auto-incrementing, but there is nowhere to the store the id)\n // Instead, construct a client ID based on the connection ID and node ID,\n // which will only conflict if the same node is added to the same connection\n // twice. This is acceptable since the `insertEdge*` functions ignore\n // duplicates.\n\n\n var edgeID = generateClientID(record.getDataID(), node.getDataID());\n var edge = store.get(edgeID);\n\n if (!edge) {\n edge = store.create(edgeID, edgeType);\n }\n\n edge.setLinkedRecord(node, NODE);\n\n if (edge.getValue('cursor') == null) {\n // Always use null instead of undefined value for cursor\n // to avoid considering it as missing data\n edge.setValue(null, 'cursor');\n }\n\n return edge;\n}\n/**\n * @public\n *\n * Inserts an edge before the given cursor, or at the beginning of the list if\n * no cursor is provided.\n *\n * Example:\n *\n * Given that data has already been fetched on some user `` on the `friends`\n * field:\n *\n * ```\n * fragment FriendsFragment on User {\n * friends(first: 10) @connection(key: \"FriendsFragment_friends\") {\n * edges {\n * node {\n * id\n * }\n * }\n * }\n * }\n * ```\n *\n * An edge can be prepended with:\n *\n * ```\n * store => {\n * const user = store.get('');\n * const friends = ConnectionHandler.getConnection(user, 'FriendsFragment_friends');\n * const edge = store.create('', 'FriendsEdge');\n * ConnectionHandler.insertEdgeBefore(friends, edge);\n * }\n * ```\n */\n\n\nfunction insertEdgeBefore(record, newEdge, cursor) {\n var _ConnectionInterface$4 = ConnectionInterface.get(),\n CURSOR = _ConnectionInterface$4.CURSOR,\n EDGES = _ConnectionInterface$4.EDGES;\n\n var edges = record.getLinkedRecords(EDGES);\n\n if (!edges) {\n record.setLinkedRecords([newEdge], EDGES);\n return;\n }\n\n var nextEdges;\n\n if (cursor == null) {\n nextEdges = [newEdge].concat(edges);\n } else {\n nextEdges = [];\n var foundCursor = false;\n\n for (var ii = 0; ii < edges.length; ii++) {\n var edge = edges[ii];\n\n if (edge != null) {\n var edgeCursor = edge.getValue(CURSOR);\n\n if (cursor === edgeCursor) {\n nextEdges.push(newEdge);\n foundCursor = true;\n }\n }\n\n nextEdges.push(edge);\n }\n\n if (!foundCursor) {\n nextEdges.unshift(newEdge);\n }\n }\n\n record.setLinkedRecords(nextEdges, EDGES);\n}\n/**\n * @public\n *\n * Remove any edges whose `node.id` matches the given id.\n */\n\n\nfunction deleteNode(record, nodeID) {\n var _ConnectionInterface$5 = ConnectionInterface.get(),\n EDGES = _ConnectionInterface$5.EDGES,\n NODE = _ConnectionInterface$5.NODE;\n\n var edges = record.getLinkedRecords(EDGES);\n\n if (!edges) {\n return;\n }\n\n var nextEdges;\n\n for (var ii = 0; ii < edges.length; ii++) {\n var edge = edges[ii];\n var node = edge && edge.getLinkedRecord(NODE);\n\n if (node != null && node.getDataID() === nodeID) {\n if (nextEdges === undefined) {\n nextEdges = edges.slice(0, ii);\n }\n } else if (nextEdges !== undefined) {\n nextEdges.push(edge);\n }\n }\n\n if (nextEdges !== undefined) {\n record.setLinkedRecords(nextEdges, EDGES);\n }\n}\n/**\n * @internal\n *\n * Creates a copy of an edge with a unique ID based on per-connection-instance\n * incrementing edge index. This is necessary to avoid collisions between edges,\n * which can occur because (edge) client IDs are assigned deterministically\n * based on the path from the nearest node with an id.\n *\n * Example: if the first N edges of the same connection are refetched, the edges\n * from the second fetch will be assigned the same IDs as the first fetch, even\n * though the nodes they point to may be different (or the same and in different\n * order).\n */\n\n\nfunction buildConnectionEdge(store, connection, edge) {\n if (edge == null) {\n return edge;\n }\n\n var _ConnectionInterface$6 = ConnectionInterface.get(),\n EDGES = _ConnectionInterface$6.EDGES;\n\n var edgeIndex = connection.getValue(NEXT_EDGE_INDEX);\n !(typeof edgeIndex === 'number') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'ConnectionHandler: Expected %s to be a number, got `%s`.', NEXT_EDGE_INDEX, edgeIndex) : invariant(false) : void 0;\n var edgeID = generateClientID(connection.getDataID(), EDGES, edgeIndex);\n var connectionEdge = store.create(edgeID, edge.getType());\n connectionEdge.copyFieldsFrom(edge);\n\n if (connectionEdge.getValue('cursor') == null) {\n // Always use null instead of undefined value for cursor\n // to avoid considering it as missing data\n connectionEdge.setValue(null, 'cursor');\n }\n\n connection.setValue(edgeIndex + 1, NEXT_EDGE_INDEX);\n return connectionEdge;\n}\n/**\n * @internal\n *\n * Adds the source edges to the target edges, skipping edges with\n * duplicate node ids.\n */\n\n\nfunction mergeEdges(sourceEdges, targetEdges, nodeIDs) {\n var _ConnectionInterface$7 = ConnectionInterface.get(),\n NODE = _ConnectionInterface$7.NODE;\n\n for (var ii = 0; ii < sourceEdges.length; ii++) {\n var edge = sourceEdges[ii];\n\n if (!edge) {\n continue;\n }\n\n var node = edge.getLinkedRecord(NODE);\n var nodeID = node && node.getDataID();\n\n if (nodeID) {\n if (nodeIDs.has(nodeID)) {\n continue;\n }\n\n nodeIDs.add(nodeID);\n }\n\n targetEdges.push(edge);\n }\n}\n\nmodule.exports = {\n buildConnectionEdge: buildConnectionEdge,\n createEdge: createEdge,\n deleteNode: deleteNode,\n getConnection: getConnection,\n getConnectionID: getConnectionID,\n insertEdgeAfter: insertEdgeAfter,\n insertEdgeBefore: insertEdgeBefore,\n update: update\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _createForOfIteratorHelper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createForOfIteratorHelper\"));\n\nvar ConnectionHandler = require('../handlers/connection/ConnectionHandler');\n\nvar warning = require(\"fbjs/lib/warning\");\n\nvar MutationTypes = Object.freeze({\n RANGE_ADD: 'RANGE_ADD',\n RANGE_DELETE: 'RANGE_DELETE',\n NODE_DELETE: 'NODE_DELETE'\n});\nvar RangeOperations = Object.freeze({\n APPEND: 'append',\n PREPEND: 'prepend'\n});\n\nfunction convert(configs, request, optimisticUpdater, updater) {\n var configOptimisticUpdates = optimisticUpdater ? [optimisticUpdater] : [];\n var configUpdates = updater ? [updater] : [];\n configs.forEach(function (config) {\n switch (config.type) {\n case 'NODE_DELETE':\n var nodeDeleteResult = nodeDelete(config, request);\n\n if (nodeDeleteResult) {\n configOptimisticUpdates.push(nodeDeleteResult);\n configUpdates.push(nodeDeleteResult);\n }\n\n break;\n\n case 'RANGE_ADD':\n var rangeAddResult = rangeAdd(config, request);\n\n if (rangeAddResult) {\n configOptimisticUpdates.push(rangeAddResult);\n configUpdates.push(rangeAddResult);\n }\n\n break;\n\n case 'RANGE_DELETE':\n var rangeDeleteResult = rangeDelete(config, request);\n\n if (rangeDeleteResult) {\n configOptimisticUpdates.push(rangeDeleteResult);\n configUpdates.push(rangeDeleteResult);\n }\n\n break;\n }\n });\n return {\n optimisticUpdater: function optimisticUpdater(store, data) {\n configOptimisticUpdates.forEach(function (eachOptimisticUpdater) {\n eachOptimisticUpdater(store, data);\n });\n },\n updater: function updater(store, data) {\n configUpdates.forEach(function (eachUpdater) {\n eachUpdater(store, data);\n });\n }\n };\n}\n\nfunction nodeDelete(config, request) {\n var deletedIDFieldName = config.deletedIDFieldName;\n var rootField = getRootField(request);\n\n if (!rootField) {\n return null;\n }\n\n return function (store, data) {\n var payload = store.getRootField(rootField);\n\n if (!payload) {\n return;\n }\n\n var deleteID = payload.getValue(deletedIDFieldName);\n var deleteIDs = Array.isArray(deleteID) ? deleteID : [deleteID];\n deleteIDs.forEach(function (id) {\n if (id && typeof id === 'string') {\n store[\"delete\"](id);\n }\n });\n };\n}\n\nfunction rangeAdd(config, request) {\n var parentID = config.parentID,\n connectionInfo = config.connectionInfo,\n edgeName = config.edgeName;\n\n if (!parentID) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'RelayDeclarativeMutationConfig: For mutation config RANGE_ADD ' + 'to work you must include a parentID') : void 0;\n return null;\n }\n\n var rootField = getRootField(request);\n\n if (!connectionInfo || !rootField) {\n return null;\n }\n\n return function (store, data) {\n var parent = store.get(parentID);\n\n if (!parent) {\n return;\n }\n\n var payload = store.getRootField(rootField);\n\n if (!payload) {\n return;\n }\n\n var serverEdge = payload.getLinkedRecord(edgeName);\n\n var _iterator = (0, _createForOfIteratorHelper2[\"default\"])(connectionInfo),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var info = _step.value;\n\n if (!serverEdge) {\n continue;\n }\n\n var connection = ConnectionHandler.getConnection(parent, info.key, info.filters);\n\n if (!connection) {\n continue;\n }\n\n var clientEdge = ConnectionHandler.buildConnectionEdge(store, connection, serverEdge);\n\n if (!clientEdge) {\n continue;\n }\n\n switch (info.rangeBehavior) {\n case 'append':\n ConnectionHandler.insertEdgeAfter(connection, clientEdge);\n break;\n\n case 'prepend':\n ConnectionHandler.insertEdgeBefore(connection, clientEdge);\n break;\n\n default:\n process.env.NODE_ENV !== \"production\" ? warning(false, 'RelayDeclarativeMutationConfig: RANGE_ADD range behavior `%s` ' + 'will not work as expected in RelayModern, supported range ' + \"behaviors are 'append', 'prepend'.\", info.rangeBehavior) : void 0;\n break;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n };\n}\n\nfunction rangeDelete(config, request) {\n var parentID = config.parentID,\n connectionKeys = config.connectionKeys,\n pathToConnection = config.pathToConnection,\n deletedIDFieldName = config.deletedIDFieldName;\n\n if (!parentID) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'RelayDeclarativeMutationConfig: For mutation config RANGE_DELETE ' + 'to work you must include a parentID') : void 0;\n return null;\n }\n\n var rootField = getRootField(request);\n\n if (!rootField) {\n return null;\n }\n\n return function (store, data) {\n if (!data) {\n return;\n }\n\n var deleteIDs = [];\n var deletedIDField = data[rootField];\n\n if (deletedIDField && Array.isArray(deletedIDFieldName)) {\n var _iterator2 = (0, _createForOfIteratorHelper2[\"default\"])(deletedIDFieldName),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var eachField = _step2.value;\n\n if (deletedIDField && typeof deletedIDField === 'object') {\n deletedIDField = deletedIDField[eachField];\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n if (Array.isArray(deletedIDField)) {\n deletedIDField.forEach(function (idObject) {\n if (idObject && idObject.id && typeof idObject === 'object' && typeof idObject.id === 'string') {\n deleteIDs.push(idObject.id);\n }\n });\n } else if (deletedIDField && deletedIDField.id && typeof deletedIDField.id === 'string') {\n deleteIDs.push(deletedIDField.id);\n }\n } else if (deletedIDField && typeof deletedIDFieldName === 'string' && typeof deletedIDField === 'object') {\n deletedIDField = deletedIDField[deletedIDFieldName];\n\n if (typeof deletedIDField === 'string') {\n deleteIDs.push(deletedIDField);\n } else if (Array.isArray(deletedIDField)) {\n deletedIDField.forEach(function (id) {\n if (typeof id === 'string') {\n deleteIDs.push(id);\n }\n });\n }\n }\n\n deleteNode(parentID, connectionKeys, pathToConnection, store, deleteIDs);\n };\n}\n\nfunction deleteNode(parentID, connectionKeys, pathToConnection, store, deleteIDs) {\n process.env.NODE_ENV !== \"production\" ? warning(connectionKeys != null, 'RelayDeclarativeMutationConfig: RANGE_DELETE must provide a ' + 'connectionKeys') : void 0;\n var parent = store.get(parentID);\n\n if (!parent) {\n return;\n }\n\n if (pathToConnection.length < 2) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'RelayDeclarativeMutationConfig: RANGE_DELETE ' + 'pathToConnection must include at least parent and connection') : void 0;\n return;\n }\n\n var recordProxy = parent;\n\n for (var i = 1; i < pathToConnection.length - 1; i++) {\n if (recordProxy) {\n recordProxy = recordProxy.getLinkedRecord(pathToConnection[i]);\n }\n } // Should never enter loop except edge cases\n\n\n if (!connectionKeys || !recordProxy) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'RelayDeclarativeMutationConfig: RANGE_DELETE ' + 'pathToConnection is incorrect. Unable to find connection with ' + 'parentID: %s and path: %s', parentID, pathToConnection.toString()) : void 0;\n return;\n }\n\n var _iterator3 = (0, _createForOfIteratorHelper2[\"default\"])(connectionKeys),\n _step3;\n\n try {\n var _loop = function _loop() {\n var key = _step3.value;\n var connection = ConnectionHandler.getConnection(recordProxy, key.key, key.filters);\n\n if (connection) {\n deleteIDs.forEach(function (deleteID) {\n ConnectionHandler.deleteNode(connection, deleteID);\n });\n }\n };\n\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n _loop();\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n}\n\nfunction getRootField(request) {\n if (request.fragment.selections && request.fragment.selections.length > 0 && request.fragment.selections[0].kind === 'LinkedField') {\n return request.fragment.selections[0].name;\n }\n\n return null;\n}\n\nmodule.exports = {\n MutationTypes: MutationTypes,\n RangeOperations: RangeOperations,\n convert: convert\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _require = require('../store/RelayModernOperationDescriptor'),\n createOperationDescriptor = _require.createOperationDescriptor;\n\nvar _require2 = require('./GraphQLTag'),\n getRequest = _require2.getRequest;\n\n/**\n * A helper function to fetch the results of a query. Note that results for\n * fragment spreads are masked: fields must be explicitly listed in the query in\n * order to be accessible in the result object.\n */\nfunction fetchQuery_DEPRECATED(environment, taggedNode, variables, cacheConfig) {\n var query = getRequest(taggedNode);\n\n if (query.params.operationKind !== 'query') {\n throw new Error('fetchQuery: Expected query operation');\n }\n\n var operation = createOperationDescriptor(query, variables, cacheConfig);\n return environment.execute({\n operation: operation\n }).map(function () {\n return environment.lookup(operation.fragment).data;\n }).toPromise();\n}\n\nmodule.exports = fetchQuery_DEPRECATED;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar invariant = require('invariant');\n\nvar _require = require('../store/ClientID'),\n generateClientID = _require.generateClientID;\n\nvar _require2 = require('../store/RelayStoreUtils'),\n getStableStorageKey = _require2.getStableStorageKey;\n\n/**\n * @internal\n *\n * A helper class for manipulating a given record from a record source via an\n * imperative/OO-style API.\n */\nvar RelayRecordProxy = /*#__PURE__*/function () {\n function RelayRecordProxy(source, mutator, dataID) {\n this._dataID = dataID;\n this._mutator = mutator;\n this._source = source;\n }\n\n var _proto = RelayRecordProxy.prototype;\n\n _proto.copyFieldsFrom = function copyFieldsFrom(source) {\n this._mutator.copyFields(source.getDataID(), this._dataID);\n };\n\n _proto.getDataID = function getDataID() {\n return this._dataID;\n };\n\n _proto.getType = function getType() {\n var type = this._mutator.getType(this._dataID);\n\n !(type != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayRecordProxy: Cannot get the type of deleted record `%s`.', this._dataID) : invariant(false) : void 0;\n return type;\n };\n\n _proto.getValue = function getValue(name, args) {\n var storageKey = getStableStorageKey(name, args);\n return this._mutator.getValue(this._dataID, storageKey);\n };\n\n _proto.setValue = function setValue(value, name, args) {\n !isValidLeafValue(value) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayRecordProxy#setValue(): Expected a scalar or array of scalars, ' + 'got `%s`.', JSON.stringify(value)) : invariant(false) : void 0;\n var storageKey = getStableStorageKey(name, args);\n\n this._mutator.setValue(this._dataID, storageKey, value);\n\n return this;\n };\n\n _proto.getLinkedRecord = function getLinkedRecord(name, args) {\n var storageKey = getStableStorageKey(name, args);\n\n var linkedID = this._mutator.getLinkedRecordID(this._dataID, storageKey);\n\n return linkedID != null ? this._source.get(linkedID) : linkedID;\n };\n\n _proto.setLinkedRecord = function setLinkedRecord(record, name, args) {\n !(record instanceof RelayRecordProxy) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayRecordProxy#setLinkedRecord(): Expected a record, got `%s`.', record) : invariant(false) : void 0;\n var storageKey = getStableStorageKey(name, args);\n var linkedID = record.getDataID();\n\n this._mutator.setLinkedRecordID(this._dataID, storageKey, linkedID);\n\n return this;\n };\n\n _proto.getOrCreateLinkedRecord = function getOrCreateLinkedRecord(name, typeName, args) {\n var linkedRecord = this.getLinkedRecord(name, args);\n\n if (!linkedRecord) {\n var _this$_source$get;\n\n var storageKey = getStableStorageKey(name, args);\n var clientID = generateClientID(this.getDataID(), storageKey); // NOTE: it's possible that a client record for this field exists\n // but the field itself was unset.\n\n linkedRecord = (_this$_source$get = this._source.get(clientID)) !== null && _this$_source$get !== void 0 ? _this$_source$get : this._source.create(clientID, typeName);\n this.setLinkedRecord(linkedRecord, name, args);\n }\n\n return linkedRecord;\n };\n\n _proto.getLinkedRecords = function getLinkedRecords(name, args) {\n var _this = this;\n\n var storageKey = getStableStorageKey(name, args);\n\n var linkedIDs = this._mutator.getLinkedRecordIDs(this._dataID, storageKey);\n\n if (linkedIDs == null) {\n return linkedIDs;\n }\n\n return linkedIDs.map(function (linkedID) {\n return linkedID != null ? _this._source.get(linkedID) : linkedID;\n });\n };\n\n _proto.setLinkedRecords = function setLinkedRecords(records, name, args) {\n !Array.isArray(records) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayRecordProxy#setLinkedRecords(): Expected records to be an array, got `%s`.', records) : invariant(false) : void 0;\n var storageKey = getStableStorageKey(name, args);\n var linkedIDs = records.map(function (record) {\n return record && record.getDataID();\n });\n\n this._mutator.setLinkedRecordIDs(this._dataID, storageKey, linkedIDs);\n\n return this;\n };\n\n _proto.invalidateRecord = function invalidateRecord() {\n this._source.markIDForInvalidation(this._dataID);\n };\n\n return RelayRecordProxy;\n}();\n\nfunction isValidLeafValue(value) {\n return value == null || typeof value !== 'object' || Array.isArray(value) && value.every(isValidLeafValue);\n}\n\nmodule.exports = RelayRecordProxy;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar invariant = require('invariant');\n\n/**\n * Determines the variables that are in scope for a fragment given the variables\n * in scope at the root query as well as any arguments applied at the fragment\n * spread via `@arguments`.\n *\n * Note that this is analagous to determining function arguments given a function call.\n */\nfunction getFragmentVariables(fragment, rootVariables, argumentVariables) {\n var variables;\n fragment.argumentDefinitions.forEach(function (definition) {\n if (argumentVariables.hasOwnProperty(definition.name)) {\n return;\n } // $FlowFixMe[cannot-spread-interface]\n\n\n variables = variables || (0, _objectSpread2[\"default\"])({}, argumentVariables);\n\n switch (definition.kind) {\n case 'LocalArgument':\n variables[definition.name] = definition.defaultValue;\n break;\n\n case 'RootArgument':\n if (!rootVariables.hasOwnProperty(definition.name)) {\n /*\n * Global variables passed as values of @arguments are not required to\n * be declared unless they are used by the callee fragment or a\n * descendant. In this case, the root variable may not be defined when\n * resolving the callee's variables. The value is explicitly set to\n * undefined to conform to the check in\n * RelayStoreUtils.getStableVariableValue() that variable keys are all\n * present.\n */\n // $FlowFixMe[incompatible-use]\n variables[definition.name] = undefined;\n break;\n } // $FlowFixMe[incompatible-use]\n // $FlowFixMe[cannot-write]\n\n\n variables[definition.name] = rootVariables[definition.name];\n break;\n\n default:\n definition;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayConcreteVariables: Unexpected node kind `%s` in fragment `%s`.', definition.kind, fragment.name) : invariant(false) : void 0;\n }\n });\n return variables || argumentVariables;\n}\n/**\n * Determines the variables that are in scope for a given operation given values\n * for some/all of its arguments. Extraneous input variables are filtered from\n * the output, and missing variables are set to default values (if given in the\n * operation's definition).\n */\n\n\nfunction getOperationVariables(operation, variables) {\n var operationVariables = {};\n operation.argumentDefinitions.forEach(function (def) {\n var value = def.defaultValue; // $FlowFixMe[cannot-write]\n\n if (variables[def.name] != null) {\n value = variables[def.name];\n }\n\n operationVariables[def.name] = value;\n });\n return operationVariables;\n}\n\nmodule.exports = {\n getFragmentVariables: getFragmentVariables,\n getOperationVariables: getOperationVariables\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar ConnectionHandler = require('./connection/ConnectionHandler');\n\nvar MutationHandlers = require('./connection/MutationHandlers');\n\nvar invariant = require('invariant');\n\nfunction RelayDefaultHandlerProvider(handle) {\n switch (handle) {\n case 'connection':\n return ConnectionHandler;\n\n case 'deleteRecord':\n return MutationHandlers.DeleteRecordHandler;\n\n case 'deleteEdge':\n return MutationHandlers.DeleteEdgeHandler;\n\n case 'appendEdge':\n return MutationHandlers.AppendEdgeHandler;\n\n case 'prependEdge':\n return MutationHandlers.PrependEdgeHandler;\n\n case 'appendNode':\n return MutationHandlers.AppendNodeHandler;\n\n case 'prependNode':\n return MutationHandlers.PrependNodeHandler;\n }\n\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayDefaultHandlerProvider: No handler provided for `%s`.', handle) : invariant(false) : void 0;\n}\n\nmodule.exports = RelayDefaultHandlerProvider;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n * @emails oncall+relay\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _createForOfIteratorHelper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createForOfIteratorHelper\"));\n\nvar RelayConcreteNode = require('../util/RelayConcreteNode');\n\nvar RelayFeatureFlags = require('../util/RelayFeatureFlags');\n\nvar RelayModernRecord = require('./RelayModernRecord');\n\nvar RelayRecordSourceMutator = require('../mutations/RelayRecordSourceMutator');\n\nvar RelayRecordSourceProxy = require('../mutations/RelayRecordSourceProxy');\n\nvar RelayStoreReactFlightUtils = require('./RelayStoreReactFlightUtils');\n\nvar RelayStoreUtils = require('./RelayStoreUtils');\n\nvar cloneRelayHandleSourceField = require('./cloneRelayHandleSourceField');\n\nvar cloneRelayScalarHandleSourceField = require('./cloneRelayScalarHandleSourceField');\n\nvar getOperation = require('../util/getOperation');\n\nvar invariant = require('invariant');\n\nvar _require = require('./ClientID'),\n isClientID = _require.isClientID;\n\nvar _require2 = require('./RelayRecordState'),\n EXISTENT = _require2.EXISTENT,\n UNKNOWN = _require2.UNKNOWN;\n\nvar _require3 = require('./TypeID'),\n generateTypeID = _require3.generateTypeID;\n\nvar CONDITION = RelayConcreteNode.CONDITION,\n CLIENT_COMPONENT = RelayConcreteNode.CLIENT_COMPONENT,\n CLIENT_EXTENSION = RelayConcreteNode.CLIENT_EXTENSION,\n DEFER = RelayConcreteNode.DEFER,\n FLIGHT_FIELD = RelayConcreteNode.FLIGHT_FIELD,\n FRAGMENT_SPREAD = RelayConcreteNode.FRAGMENT_SPREAD,\n INLINE_FRAGMENT = RelayConcreteNode.INLINE_FRAGMENT,\n LINKED_FIELD = RelayConcreteNode.LINKED_FIELD,\n LINKED_HANDLE = RelayConcreteNode.LINKED_HANDLE,\n MODULE_IMPORT = RelayConcreteNode.MODULE_IMPORT,\n SCALAR_FIELD = RelayConcreteNode.SCALAR_FIELD,\n SCALAR_HANDLE = RelayConcreteNode.SCALAR_HANDLE,\n STREAM = RelayConcreteNode.STREAM,\n TYPE_DISCRIMINATOR = RelayConcreteNode.TYPE_DISCRIMINATOR;\nvar ROOT_ID = RelayStoreUtils.ROOT_ID,\n getModuleOperationKey = RelayStoreUtils.getModuleOperationKey,\n getStorageKey = RelayStoreUtils.getStorageKey,\n getArgumentValues = RelayStoreUtils.getArgumentValues;\n/**\n * Synchronously check whether the records required to fulfill the given\n * `selector` are present in `source`.\n *\n * If a field is missing, it uses the provided handlers to attempt to substitute\n * data. The `target` will store all records that are modified because of a\n * successful substitution.\n *\n * If all records are present, returns `true`, otherwise `false`.\n */\n\nfunction check(source, target, selector, handlers, operationLoader, getDataID, shouldProcessClientComponents) {\n var dataID = selector.dataID,\n node = selector.node,\n variables = selector.variables;\n var checker = new DataChecker(source, target, variables, handlers, operationLoader, getDataID, shouldProcessClientComponents);\n return checker.check(node, dataID);\n}\n/**\n * @private\n */\n\n\nvar DataChecker = /*#__PURE__*/function () {\n function DataChecker(source, target, variables, handlers, operationLoader, getDataID, shouldProcessClientComponents) {\n var mutator = new RelayRecordSourceMutator(source, target);\n this._mostRecentlyInvalidatedAt = null;\n this._handlers = handlers;\n this._mutator = mutator;\n this._operationLoader = operationLoader !== null && operationLoader !== void 0 ? operationLoader : null;\n this._recordSourceProxy = new RelayRecordSourceProxy(mutator, getDataID);\n this._recordWasMissing = false;\n this._source = source;\n this._variables = variables;\n this._shouldProcessClientComponents = shouldProcessClientComponents;\n }\n\n var _proto = DataChecker.prototype;\n\n _proto.check = function check(node, dataID) {\n this._traverse(node, dataID);\n\n return this._recordWasMissing === true ? {\n status: 'missing',\n mostRecentlyInvalidatedAt: this._mostRecentlyInvalidatedAt\n } : {\n status: 'available',\n mostRecentlyInvalidatedAt: this._mostRecentlyInvalidatedAt\n };\n };\n\n _proto._getVariableValue = function _getVariableValue(name) {\n !this._variables.hasOwnProperty(name) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayAsyncLoader(): Undefined variable `%s`.', name) : invariant(false) : void 0; // $FlowFixMe[cannot-write]\n\n return this._variables[name];\n };\n\n _proto._handleMissing = function _handleMissing() {\n this._recordWasMissing = true;\n };\n\n _proto._getDataForHandlers = function _getDataForHandlers(field, dataID) {\n return {\n args: field.args ? getArgumentValues(field.args, this._variables) : {},\n // Getting a snapshot of the record state is potentially expensive since\n // we will need to merge the sink and source records. Since we do not create\n // any new records in this process, it is probably reasonable to provide\n // handlers with a copy of the source record.\n // The only thing that the provided record will not contain is fields\n // added by previous handlers.\n record: this._source.get(dataID)\n };\n };\n\n _proto._handleMissingScalarField = function _handleMissingScalarField(field, dataID) {\n if (field.name === 'id' && field.alias == null && isClientID(dataID)) {\n return undefined;\n }\n\n var _this$_getDataForHand = this._getDataForHandlers(field, dataID),\n args = _this$_getDataForHand.args,\n record = _this$_getDataForHand.record;\n\n var _iterator = (0, _createForOfIteratorHelper2[\"default\"])(this._handlers),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var handler = _step.value;\n\n if (handler.kind === 'scalar') {\n var newValue = handler.handle(field, record, args, this._recordSourceProxy);\n\n if (newValue !== undefined) {\n return newValue;\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n this._handleMissing();\n };\n\n _proto._handleMissingLinkField = function _handleMissingLinkField(field, dataID) {\n var _this$_getDataForHand2 = this._getDataForHandlers(field, dataID),\n args = _this$_getDataForHand2.args,\n record = _this$_getDataForHand2.record;\n\n var _iterator2 = (0, _createForOfIteratorHelper2[\"default\"])(this._handlers),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var handler = _step2.value;\n\n if (handler.kind === 'linked') {\n var newValue = handler.handle(field, record, args, this._recordSourceProxy);\n\n if (newValue !== undefined && (newValue === null || this._mutator.getStatus(newValue) === EXISTENT)) {\n return newValue;\n }\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n this._handleMissing();\n };\n\n _proto._handleMissingPluralLinkField = function _handleMissingPluralLinkField(field, dataID) {\n var _this = this;\n\n var _this$_getDataForHand3 = this._getDataForHandlers(field, dataID),\n args = _this$_getDataForHand3.args,\n record = _this$_getDataForHand3.record;\n\n var _iterator3 = (0, _createForOfIteratorHelper2[\"default\"])(this._handlers),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var handler = _step3.value;\n\n if (handler.kind === 'pluralLinked') {\n var newValue = handler.handle(field, record, args, this._recordSourceProxy);\n\n if (newValue != null) {\n var allItemsKnown = newValue.every(function (linkedID) {\n return linkedID != null && _this._mutator.getStatus(linkedID) === EXISTENT;\n });\n\n if (allItemsKnown) {\n return newValue;\n }\n } else if (newValue === null) {\n return null;\n }\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n this._handleMissing();\n };\n\n _proto._traverse = function _traverse(node, dataID) {\n var status = this._mutator.getStatus(dataID);\n\n if (status === UNKNOWN) {\n this._handleMissing();\n }\n\n if (status === EXISTENT) {\n var record = this._source.get(dataID);\n\n var invalidatedAt = RelayModernRecord.getInvalidationEpoch(record);\n\n if (invalidatedAt != null) {\n this._mostRecentlyInvalidatedAt = this._mostRecentlyInvalidatedAt != null ? Math.max(this._mostRecentlyInvalidatedAt, invalidatedAt) : invalidatedAt;\n }\n\n this._traverseSelections(node.selections, dataID);\n }\n };\n\n _proto._traverseSelections = function _traverseSelections(selections, dataID) {\n var _this2 = this;\n\n selections.forEach(function (selection) {\n switch (selection.kind) {\n case SCALAR_FIELD:\n _this2._checkScalar(selection, dataID);\n\n break;\n\n case LINKED_FIELD:\n if (selection.plural) {\n _this2._checkPluralLink(selection, dataID);\n } else {\n _this2._checkLink(selection, dataID);\n }\n\n break;\n\n case CONDITION:\n var conditionValue = _this2._getVariableValue(selection.condition);\n\n if (conditionValue === selection.passingValue) {\n _this2._traverseSelections(selection.selections, dataID);\n }\n\n break;\n\n case INLINE_FRAGMENT:\n {\n var abstractKey = selection.abstractKey;\n\n if (abstractKey == null) {\n // concrete type refinement: only check data if the type exactly matches\n var typeName = _this2._mutator.getType(dataID);\n\n if (typeName === selection.type) {\n _this2._traverseSelections(selection.selections, dataID);\n }\n } else if (RelayFeatureFlags.ENABLE_PRECISE_TYPE_REFINEMENT) {\n // Abstract refinement: check data depending on whether the type\n // conforms to the interface/union or not:\n // - Type known to _not_ implement the interface: don't check the selections.\n // - Type is known _to_ implement the interface: check selections.\n // - Unknown whether the type implements the interface: don't check the selections\n // and treat the data as missing; we do this because the Relay Compiler\n // guarantees that the type discriminator will always be fetched.\n var recordType = _this2._mutator.getType(dataID);\n\n !(recordType != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'DataChecker: Expected record `%s` to have a known type', dataID) : invariant(false) : void 0;\n var typeID = generateTypeID(recordType);\n\n var implementsInterface = _this2._mutator.getValue(typeID, abstractKey);\n\n if (implementsInterface === true) {\n _this2._traverseSelections(selection.selections, dataID);\n } else if (implementsInterface == null) {\n // unsure if the type implements the interface: data is\n // missing so don't bother reading the fragment\n _this2._handleMissing();\n } // else false: known to not implement the interface\n\n } else {\n // legacy behavior for abstract refinements: always check even\n // if the type doesn't conform\n _this2._traverseSelections(selection.selections, dataID);\n }\n\n break;\n }\n\n case LINKED_HANDLE:\n {\n // Handles have no selections themselves; traverse the original field\n // where the handle was set-up instead.\n var handleField = cloneRelayHandleSourceField(selection, selections, _this2._variables);\n\n if (handleField.plural) {\n _this2._checkPluralLink(handleField, dataID);\n } else {\n _this2._checkLink(handleField, dataID);\n }\n\n break;\n }\n\n case SCALAR_HANDLE:\n {\n var _handleField = cloneRelayScalarHandleSourceField(selection, selections, _this2._variables);\n\n _this2._checkScalar(_handleField, dataID);\n\n break;\n }\n\n case MODULE_IMPORT:\n _this2._checkModuleImport(selection, dataID);\n\n break;\n\n case DEFER:\n case STREAM:\n _this2._traverseSelections(selection.selections, dataID);\n\n break;\n // $FlowFixMe[incompatible-type]\n\n case FRAGMENT_SPREAD:\n _this2._traverseSelections(selection.fragment.selections, dataID);\n\n break;\n\n case CLIENT_EXTENSION:\n var recordWasMissing = _this2._recordWasMissing;\n\n _this2._traverseSelections(selection.selections, dataID);\n\n _this2._recordWasMissing = recordWasMissing;\n break;\n\n case TYPE_DISCRIMINATOR:\n if (RelayFeatureFlags.ENABLE_PRECISE_TYPE_REFINEMENT) {\n var _abstractKey = selection.abstractKey;\n\n var _recordType = _this2._mutator.getType(dataID);\n\n !(_recordType != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'DataChecker: Expected record `%s` to have a known type', dataID) : invariant(false) : void 0;\n\n var _typeID = generateTypeID(_recordType);\n\n var _implementsInterface = _this2._mutator.getValue(_typeID, _abstractKey);\n\n if (_implementsInterface == null) {\n // unsure if the type implements the interface: data is\n // missing\n _this2._handleMissing();\n } // else: if it does or doesn't implement, we don't need to check or skip anything else\n\n }\n\n break;\n\n case FLIGHT_FIELD:\n if (RelayFeatureFlags.ENABLE_REACT_FLIGHT_COMPONENT_FIELD) {\n _this2._checkFlightField(selection, dataID);\n } else {\n throw new Error('Flight fields are not yet supported.');\n }\n\n break;\n\n case CLIENT_COMPONENT:\n if (_this2._shouldProcessClientComponents === false) {\n break;\n }\n\n _this2._traverseSelections(selection.fragment.selections, dataID);\n\n break;\n\n default:\n selection;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayAsyncLoader(): Unexpected ast kind `%s`.', selection.kind) : invariant(false) : void 0;\n }\n });\n };\n\n _proto._checkModuleImport = function _checkModuleImport(moduleImport, dataID) {\n var operationLoader = this._operationLoader;\n !(operationLoader !== null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'DataChecker: Expected an operationLoader to be configured when using `@module`.') : invariant(false) : void 0;\n var operationKey = getModuleOperationKey(moduleImport.documentName);\n\n var operationReference = this._mutator.getValue(dataID, operationKey);\n\n if (operationReference == null) {\n if (operationReference === undefined) {\n this._handleMissing();\n }\n\n return;\n }\n\n var normalizationRootNode = operationLoader.get(operationReference);\n\n if (normalizationRootNode != null) {\n var operation = getOperation(normalizationRootNode);\n\n this._traverse(operation, dataID);\n } else {\n // If the fragment is not available, we assume that the data cannot have been\n // processed yet and must therefore be missing.\n this._handleMissing();\n }\n };\n\n _proto._checkScalar = function _checkScalar(field, dataID) {\n var storageKey = getStorageKey(field, this._variables);\n\n var fieldValue = this._mutator.getValue(dataID, storageKey);\n\n if (fieldValue === undefined) {\n fieldValue = this._handleMissingScalarField(field, dataID);\n\n if (fieldValue !== undefined) {\n this._mutator.setValue(dataID, storageKey, fieldValue);\n }\n }\n };\n\n _proto._checkLink = function _checkLink(field, dataID) {\n var storageKey = getStorageKey(field, this._variables);\n\n var linkedID = this._mutator.getLinkedRecordID(dataID, storageKey);\n\n if (linkedID === undefined) {\n linkedID = this._handleMissingLinkField(field, dataID);\n\n if (linkedID != null) {\n this._mutator.setLinkedRecordID(dataID, storageKey, linkedID);\n } else if (linkedID === null) {\n this._mutator.setValue(dataID, storageKey, null);\n }\n }\n\n if (linkedID != null) {\n this._traverse(field, linkedID);\n }\n };\n\n _proto._checkPluralLink = function _checkPluralLink(field, dataID) {\n var _this3 = this;\n\n var storageKey = getStorageKey(field, this._variables);\n\n var linkedIDs = this._mutator.getLinkedRecordIDs(dataID, storageKey);\n\n if (linkedIDs === undefined) {\n linkedIDs = this._handleMissingPluralLinkField(field, dataID);\n\n if (linkedIDs != null) {\n this._mutator.setLinkedRecordIDs(dataID, storageKey, linkedIDs);\n } else if (linkedIDs === null) {\n this._mutator.setValue(dataID, storageKey, null);\n }\n }\n\n if (linkedIDs) {\n linkedIDs.forEach(function (linkedID) {\n if (linkedID != null) {\n _this3._traverse(field, linkedID);\n }\n });\n }\n };\n\n _proto._checkFlightField = function _checkFlightField(field, dataID) {\n var storageKey = getStorageKey(field, this._variables);\n\n var linkedID = this._mutator.getLinkedRecordID(dataID, storageKey);\n\n if (linkedID == null) {\n if (linkedID === undefined) {\n this._handleMissing();\n\n return;\n }\n\n return;\n }\n\n var tree = this._mutator.getValue(linkedID, RelayStoreReactFlightUtils.REACT_FLIGHT_TREE_STORAGE_KEY);\n\n var reachableExecutableDefinitions = this._mutator.getValue(linkedID, RelayStoreReactFlightUtils.REACT_FLIGHT_EXECUTABLE_DEFINITIONS_STORAGE_KEY);\n\n if (tree == null || !Array.isArray(reachableExecutableDefinitions)) {\n this._handleMissing();\n\n return;\n }\n\n var operationLoader = this._operationLoader;\n !(operationLoader !== null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'DataChecker: Expected an operationLoader to be configured when using ' + 'React Flight.') : invariant(false) : void 0; // In Flight, the variables that are in scope for reachable executable\n // definitions aren't the same as what's in scope for the outer query.\n\n var prevVariables = this._variables; // $FlowFixMe[incompatible-cast]\n\n var _iterator4 = (0, _createForOfIteratorHelper2[\"default\"])(reachableExecutableDefinitions),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var definition = _step4.value;\n this._variables = definition.variables;\n var normalizationRootNode = operationLoader.get(definition.module);\n\n if (normalizationRootNode != null) {\n var operation = getOperation(normalizationRootNode);\n\n this._traverseSelections(operation.selections, ROOT_ID);\n } else {\n // If the fragment is not available, we assume that the data cannot have\n // been processed yet and must therefore be missing.\n this._handleMissing();\n }\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n\n this._variables = prevVariables;\n };\n\n return DataChecker;\n}();\n\nmodule.exports = {\n check: check\n};","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar RelayModernRecord = require('../store/RelayModernRecord');\n\nvar invariant = require('invariant');\n\nvar _require = require('../store/RelayRecordState'),\n EXISTENT = _require.EXISTENT;\n\n/**\n * @internal\n *\n * Wrapper API that is an amalgam of the `RelayModernRecord` API and\n * `MutableRecordSource` interface, implementing copy-on-write semantics for records\n * in a record source.\n *\n * Modifications are applied to fresh copies of records:\n * - Records in `base` are never modified.\n * - Modifications cause a fresh version of a record to be created in `sink`.\n * These sink records contain only modified fields.\n */\nvar RelayRecordSourceMutator = /*#__PURE__*/function () {\n function RelayRecordSourceMutator(base, sink) {\n this.__sources = [sink, base];\n this._base = base;\n this._sink = sink;\n }\n /**\n * **UNSTABLE**\n * This method is likely to be removed in an upcoming release\n * and should not be relied upon.\n * TODO T41593196: Remove unstable_getRawRecordWithChanges\n */\n\n\n var _proto = RelayRecordSourceMutator.prototype;\n\n _proto.unstable_getRawRecordWithChanges = function unstable_getRawRecordWithChanges(dataID) {\n var baseRecord = this._base.get(dataID);\n\n var sinkRecord = this._sink.get(dataID);\n\n if (sinkRecord === undefined) {\n if (baseRecord == null) {\n return baseRecord;\n }\n\n var nextRecord = RelayModernRecord.clone(baseRecord);\n\n if (process.env.NODE_ENV !== \"production\") {\n // Prevent mutation of a record from outside the store.\n RelayModernRecord.freeze(nextRecord);\n }\n\n return nextRecord;\n } else if (sinkRecord === null) {\n return null;\n } else if (baseRecord != null) {\n var _nextRecord = RelayModernRecord.update(baseRecord, sinkRecord);\n\n if (process.env.NODE_ENV !== \"production\") {\n if (_nextRecord !== baseRecord) {\n // Prevent mutation of a record from outside the store.\n RelayModernRecord.freeze(_nextRecord);\n }\n }\n\n return _nextRecord;\n } else {\n var _nextRecord2 = RelayModernRecord.clone(sinkRecord);\n\n if (process.env.NODE_ENV !== \"production\") {\n // Prevent mutation of a record from outside the store.\n RelayModernRecord.freeze(_nextRecord2);\n }\n\n return _nextRecord2;\n }\n };\n\n _proto._getSinkRecord = function _getSinkRecord(dataID) {\n var sinkRecord = this._sink.get(dataID);\n\n if (!sinkRecord) {\n var baseRecord = this._base.get(dataID);\n\n !baseRecord ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayRecordSourceMutator: Cannot modify non-existent record `%s`.', dataID) : invariant(false) : void 0;\n sinkRecord = RelayModernRecord.create(dataID, RelayModernRecord.getType(baseRecord));\n\n this._sink.set(dataID, sinkRecord);\n }\n\n return sinkRecord;\n };\n\n _proto.copyFields = function copyFields(sourceID, sinkID) {\n var sinkSource = this._sink.get(sourceID);\n\n var baseSource = this._base.get(sourceID);\n\n !(sinkSource || baseSource) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayRecordSourceMutator#copyFields(): Cannot copy fields from ' + 'non-existent record `%s`.', sourceID) : invariant(false) : void 0;\n\n var sink = this._getSinkRecord(sinkID);\n\n if (baseSource) {\n RelayModernRecord.copyFields(baseSource, sink);\n }\n\n if (sinkSource) {\n RelayModernRecord.copyFields(sinkSource, sink);\n }\n };\n\n _proto.copyFieldsFromRecord = function copyFieldsFromRecord(record, sinkID) {\n var sink = this._getSinkRecord(sinkID);\n\n RelayModernRecord.copyFields(record, sink);\n };\n\n _proto.create = function create(dataID, typeName) {\n !(this._base.getStatus(dataID) !== EXISTENT && this._sink.getStatus(dataID) !== EXISTENT) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayRecordSourceMutator#create(): Cannot create a record with id ' + '`%s`, this record already exists.', dataID) : invariant(false) : void 0;\n var record = RelayModernRecord.create(dataID, typeName);\n\n this._sink.set(dataID, record);\n };\n\n _proto[\"delete\"] = function _delete(dataID) {\n this._sink[\"delete\"](dataID);\n };\n\n _proto.getStatus = function getStatus(dataID) {\n return this._sink.has(dataID) ? this._sink.getStatus(dataID) : this._base.getStatus(dataID);\n };\n\n _proto.getType = function getType(dataID) {\n for (var ii = 0; ii < this.__sources.length; ii++) {\n var record = this.__sources[ii].get(dataID);\n\n if (record) {\n return RelayModernRecord.getType(record);\n } else if (record === null) {\n return null;\n }\n }\n };\n\n _proto.getValue = function getValue(dataID, storageKey) {\n for (var ii = 0; ii < this.__sources.length; ii++) {\n var record = this.__sources[ii].get(dataID);\n\n if (record) {\n var value = RelayModernRecord.getValue(record, storageKey);\n\n if (value !== undefined) {\n return value;\n }\n } else if (record === null) {\n return null;\n }\n }\n };\n\n _proto.setValue = function setValue(dataID, storageKey, value) {\n var sinkRecord = this._getSinkRecord(dataID);\n\n RelayModernRecord.setValue(sinkRecord, storageKey, value);\n };\n\n _proto.getLinkedRecordID = function getLinkedRecordID(dataID, storageKey) {\n for (var ii = 0; ii < this.__sources.length; ii++) {\n var record = this.__sources[ii].get(dataID);\n\n if (record) {\n var linkedID = RelayModernRecord.getLinkedRecordID(record, storageKey);\n\n if (linkedID !== undefined) {\n return linkedID;\n }\n } else if (record === null) {\n return null;\n }\n }\n };\n\n _proto.setLinkedRecordID = function setLinkedRecordID(dataID, storageKey, linkedID) {\n var sinkRecord = this._getSinkRecord(dataID);\n\n RelayModernRecord.setLinkedRecordID(sinkRecord, storageKey, linkedID);\n };\n\n _proto.getLinkedRecordIDs = function getLinkedRecordIDs(dataID, storageKey) {\n for (var ii = 0; ii < this.__sources.length; ii++) {\n var record = this.__sources[ii].get(dataID);\n\n if (record) {\n var linkedIDs = RelayModernRecord.getLinkedRecordIDs(record, storageKey);\n\n if (linkedIDs !== undefined) {\n return linkedIDs;\n }\n } else if (record === null) {\n return null;\n }\n }\n };\n\n _proto.setLinkedRecordIDs = function setLinkedRecordIDs(dataID, storageKey, linkedIDs) {\n var sinkRecord = this._getSinkRecord(dataID);\n\n RelayModernRecord.setLinkedRecordIDs(sinkRecord, storageKey, linkedIDs);\n };\n\n return RelayRecordSourceMutator;\n}();\n\nmodule.exports = RelayRecordSourceMutator;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nmodule.exports = {\n DEFAULT_HANDLE_KEY: ''\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar RelayObservable = require('./RelayObservable');\n\n/**\n * Converts a FetchFunction into an ExecuteFunction for use by RelayNetwork.\n */\nfunction convertFetch(fn) {\n return function fetch(request, variables, cacheConfig, uploadables, logRequestInfo) {\n var result = fn(request, variables, cacheConfig, uploadables, logRequestInfo); // Note: We allow FetchFunction to directly return Error to indicate\n // a failure to fetch. To avoid handling this special case throughout the\n // Relay codebase, it is explicitly handled here.\n\n if (result instanceof Error) {\n return RelayObservable.create(function (sink) {\n return sink.error(result);\n });\n }\n\n return RelayObservable.from(result);\n };\n}\n\nmodule.exports = {\n convertFetch: convertFetch\n};","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/_app\",\n function () {\n return require(\"private-next-pages/_app.tsx\");\n }\n ]);\n ","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar aStackPool = [];\nvar bStackPool = [];\n/**\n * Checks if two values are equal. Values may be primitives, arrays, or objects.\n * Returns true if both arguments have the same keys and values.\n *\n * @see http://underscorejs.org\n * @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.\n * @license MIT\n */\n\nfunction areEqual(a, b) {\n var aStack = aStackPool.length ? aStackPool.pop() : [];\n var bStack = bStackPool.length ? bStackPool.pop() : [];\n var result = eq(a, b, aStack, bStack);\n aStack.length = 0;\n bStack.length = 0;\n aStackPool.push(aStack);\n bStackPool.push(bStack);\n return result;\n}\n\nfunction eq(a, b, aStack, bStack) {\n if (a === b) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n return a !== 0 || 1 / a == 1 / b;\n }\n\n if (a == null || b == null) {\n // a or b can be `null` or `undefined`\n return false;\n }\n\n if (typeof a != 'object' || typeof b != 'object') {\n return false;\n }\n\n var objToStr = Object.prototype.toString;\n var className = objToStr.call(a);\n\n if (className != objToStr.call(b)) {\n return false;\n }\n\n switch (className) {\n case '[object String]':\n return a == String(b);\n\n case '[object Number]':\n return isNaN(a) || isNaN(b) ? false : a == Number(b);\n\n case '[object Date]':\n case '[object Boolean]':\n return +a == +b;\n\n case '[object RegExp]':\n return a.source == b.source && a.global == b.global && a.multiline == b.multiline && a.ignoreCase == b.ignoreCase;\n } // Assume equality for cyclic structures.\n\n\n var length = aStack.length;\n\n while (length--) {\n if (aStack[length] == a) {\n return bStack[length] == b;\n }\n }\n\n aStack.push(a);\n bStack.push(b);\n var size = 0; // Recursively compare objects and arrays.\n\n if (className === '[object Array]') {\n size = a.length;\n\n if (size !== b.length) {\n return false;\n } // Deep compare the contents, ignoring non-numeric properties.\n\n\n while (size--) {\n if (!eq(a[size], b[size], aStack, bStack)) {\n return false;\n }\n }\n } else {\n if (a.constructor !== b.constructor) {\n return false;\n }\n\n if (a.hasOwnProperty('valueOf') && b.hasOwnProperty('valueOf')) {\n return a.valueOf() == b.valueOf();\n }\n\n var keys = Object.keys(a);\n\n if (keys.length != Object.keys(b).length) {\n return false;\n }\n\n for (var i = 0; i < keys.length; i++) {\n if (!eq(a[keys[i]], b[keys[i]], aStack, bStack)) {\n return false;\n }\n }\n }\n\n aStack.pop();\n bStack.pop();\n return true;\n}\n\nmodule.exports = areEqual;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _require = require('./ClientID'),\n generateClientID = _require.generateClientID;\n\nvar _require2 = require('./RelayStoreUtils'),\n ROOT_ID = _require2.ROOT_ID;\n\nvar VIEWER_ID = generateClientID(ROOT_ID, 'viewer');\nvar VIEWER_TYPE = 'Viewer';\nmodule.exports = {\n VIEWER_ID: VIEWER_ID,\n VIEWER_TYPE: VIEWER_TYPE\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar warning = require(\"fbjs/lib/warning\");\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar _require = require('../util/RelayConcreteNode'),\n CONDITION = _require.CONDITION,\n CLIENT_COMPONENT = _require.CLIENT_COMPONENT,\n CLIENT_EXTENSION = _require.CLIENT_EXTENSION,\n DEFER = _require.DEFER,\n FLIGHT_FIELD = _require.FLIGHT_FIELD,\n FRAGMENT_SPREAD = _require.FRAGMENT_SPREAD,\n INLINE_FRAGMENT = _require.INLINE_FRAGMENT,\n LINKED_FIELD = _require.LINKED_FIELD,\n LINKED_HANDLE = _require.LINKED_HANDLE,\n MODULE_IMPORT = _require.MODULE_IMPORT,\n SCALAR_FIELD = _require.SCALAR_FIELD,\n SCALAR_HANDLE = _require.SCALAR_HANDLE,\n STREAM = _require.STREAM,\n TYPE_DISCRIMINATOR = _require.TYPE_DISCRIMINATOR;\n\nvar validateMutation = function validateMutation() {};\n\nif (process.env.NODE_ENV !== \"production\") {\n var addFieldToDiff = function addFieldToDiff(path, diff, isScalar) {\n var deepLoc = diff;\n path.split('.').forEach(function (key, index, arr) {\n if (deepLoc[key] == null) {\n deepLoc[key] = {};\n }\n\n if (isScalar && index === arr.length - 1) {\n deepLoc[key] = '';\n }\n\n deepLoc = deepLoc[key];\n });\n };\n\n validateMutation = function validateMutation(optimisticResponse, mutation, variables) {\n var operationName = mutation.operation.name;\n var context = {\n path: 'ROOT',\n visitedPaths: new Set(),\n variables: variables || {},\n missingDiff: {},\n extraDiff: {},\n moduleImportPaths: new Set()\n };\n validateSelections(optimisticResponse, mutation.operation.selections, context);\n validateOptimisticResponse(optimisticResponse, context);\n process.env.NODE_ENV !== \"production\" ? warning(context.missingDiff.ROOT == null, 'Expected `optimisticResponse` to match structure of server response for mutation `%s`, please define fields for all of\\n%s', operationName, JSON.stringify(context.missingDiff.ROOT, null, 2)) : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(context.extraDiff.ROOT == null, 'Expected `optimisticResponse` to match structure of server response for mutation `%s`, please remove all fields of\\n%s', operationName, JSON.stringify(context.extraDiff.ROOT, null, 2)) : void 0;\n };\n\n var validateSelections = function validateSelections(optimisticResponse, selections, context) {\n selections.forEach(function (selection) {\n return validateSelection(optimisticResponse, selection, context);\n });\n };\n\n var validateSelection = function validateSelection(optimisticResponse, selection, context) {\n switch (selection.kind) {\n case CONDITION:\n validateSelections(optimisticResponse, selection.selections, context);\n return;\n\n case CLIENT_COMPONENT:\n case FRAGMENT_SPREAD:\n validateSelections(optimisticResponse, selection.fragment.selections, context);\n return;\n\n case SCALAR_FIELD:\n case LINKED_FIELD:\n case FLIGHT_FIELD:\n return validateField(optimisticResponse, selection, context);\n\n case INLINE_FRAGMENT:\n var type = selection.type;\n var isConcreteType = selection.abstractKey == null;\n selection.selections.forEach(function (subselection) {\n if (isConcreteType && optimisticResponse.__typename !== type) {\n return;\n }\n\n validateSelection(optimisticResponse, subselection, context);\n });\n return;\n\n case CLIENT_EXTENSION:\n selection.selections.forEach(function (subselection) {\n validateSelection(optimisticResponse, subselection, context);\n });\n return;\n\n case MODULE_IMPORT:\n return validateModuleImport(context);\n\n case LINKED_HANDLE:\n case SCALAR_HANDLE:\n case DEFER:\n case STREAM:\n case TYPE_DISCRIMINATOR:\n {\n // TODO(T35864292) - Add missing validations for these types\n return;\n }\n\n default:\n selection;\n return;\n }\n };\n\n var validateModuleImport = function validateModuleImport(context) {\n context.moduleImportPaths.add(context.path);\n };\n\n var validateField = function validateField(optimisticResponse, field, context) {\n var fieldName = field.alias || field.name;\n var path = \"\".concat(context.path, \".\").concat(fieldName);\n context.visitedPaths.add(path);\n\n switch (field.kind) {\n case SCALAR_FIELD:\n if (hasOwnProperty.call(optimisticResponse, fieldName) === false) {\n addFieldToDiff(path, context.missingDiff, true);\n }\n\n return;\n\n case LINKED_FIELD:\n var selections = field.selections;\n\n if (optimisticResponse[fieldName] === null || hasOwnProperty.call(optimisticResponse, fieldName) && optimisticResponse[fieldName] === undefined) {\n return;\n }\n\n if (field.plural) {\n if (Array.isArray(optimisticResponse[fieldName])) {\n optimisticResponse[fieldName].forEach(function (r) {\n if (r !== null) {\n validateSelections(r, selections, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, context), {}, {\n path: path\n }));\n }\n });\n return;\n } else {\n addFieldToDiff(path, context.missingDiff);\n return;\n }\n } else {\n if (optimisticResponse[fieldName] instanceof Object) {\n validateSelections(optimisticResponse[fieldName], selections, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, context), {}, {\n path: path\n }));\n return;\n } else {\n addFieldToDiff(path, context.missingDiff);\n return;\n }\n }\n\n case FLIGHT_FIELD:\n if (optimisticResponse[fieldName] === null || hasOwnProperty.call(optimisticResponse, fieldName) && optimisticResponse[fieldName] === undefined) {\n return;\n }\n\n throw new Error('validateMutation: Flight fields are not compatible with ' + 'optimistic updates, as React does not have the component code ' + 'necessary to process new data on the client. Instead, you ' + 'should update your code to require a full refetch of the Flight ' + 'field so your UI can be updated.');\n }\n };\n\n var validateOptimisticResponse = function validateOptimisticResponse(optimisticResponse, context) {\n if (Array.isArray(optimisticResponse)) {\n optimisticResponse.forEach(function (r) {\n if (r instanceof Object) {\n validateOptimisticResponse(r, context);\n }\n });\n return;\n }\n\n Object.keys(optimisticResponse).forEach(function (key) {\n var value = optimisticResponse[key];\n var path = \"\".concat(context.path, \".\").concat(key); // if it's a module import path we don't have an ast so we cannot validate it\n\n if (context.moduleImportPaths.has(path)) {\n return;\n }\n\n if (!context.visitedPaths.has(path)) {\n addFieldToDiff(path, context.extraDiff);\n return;\n }\n\n if (value instanceof Object) {\n validateOptimisticResponse(value, (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, context), {}, {\n path: path\n }));\n }\n });\n };\n}\n\nmodule.exports = validateMutation;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @emails oncall+relay\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar RelayObservable = require('../network/RelayObservable');\n\nvar fetchQueryInternal = require('./fetchQueryInternal');\n\nvar invariant = require('invariant');\n\nvar reportMissingRequiredFields = require('../util/reportMissingRequiredFields');\n\nvar _require = require('../store/RelayModernOperationDescriptor'),\n createOperationDescriptor = _require.createOperationDescriptor;\n\nvar _require2 = require('./GraphQLTag'),\n getRequest = _require2.getRequest;\n\n/**\n * Fetches the given query and variables on the provided environment,\n * and de-dupes identical in-flight requests.\n *\n * Observing a request:\n * ====================\n * fetchQuery returns an Observable which you can call .subscribe()\n * on. Subscribe optionally takes an Observer, which you can provide to\n * observe network events:\n *\n * ```\n * fetchQuery(environment, query, variables).subscribe({\n * // Called when network requests starts\n * start: (subsctiption) => {},\n *\n * // Called after a payload is received and written to the local store\n * next: (payload) => {},\n *\n * // Called when network requests errors\n * error: (error) => {},\n *\n * // Called when network requests fully completes\n * complete: () => {},\n *\n * // Called when network request is unsubscribed\n * unsubscribe: (subscription) => {},\n * });\n * ```\n *\n * Request Promise:\n * ================\n * The obervable can be converted to a Promise with .toPromise(), which will\n * resolve to a snapshot of the query data when the first response is received\n * from the server.\n *\n * ```\n * fetchQuery(environment, query, variables).toPromise().then((data) => {\n * // ...\n * });\n * ```\n *\n * In-flight request de-duping:\n * ============================\n * By default, calling fetchQuery multiple times with the same\n * environment, query and variables will not initiate a new request if a request\n * for those same parameters is already in flight.\n *\n * A request is marked in-flight from the moment it starts until the moment it\n * fully completes, regardless of error or successful completion.\n *\n * NOTE: If the request completes _synchronously_, calling fetchQuery\n * a second time with the same arguments in the same tick will _NOT_ de-dupe\n * the request given that it will no longer be in-flight.\n *\n *\n * Data Retention:\n * ===============\n * This function will NOT retain query data, meaning that it is not guaranteed\n * that the fetched data will remain in the Relay store after the request has\n * completed.\n * If you need to retain the query data outside of the network request,\n * you need to use `environment.retain()`.\n *\n *\n * Cancelling requests:\n * ====================\n * If the disposable returned by subscribe is called while the\n * request is in-flight, the request will be cancelled.\n *\n * ```\n * const disposable = fetchQuery(...).subscribe(...);\n *\n * // This will cancel the request if it is in-flight.\n * disposable.dispose();\n * ```\n * NOTE: When using .toPromise(), the request cannot be cancelled.\n */\nfunction fetchQuery(environment, query, variables, options) {\n var _options$fetchPolicy;\n\n var queryNode = getRequest(query);\n !(queryNode.params.operationKind === 'query') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'fetchQuery: Expected query operation') : invariant(false) : void 0;\n var networkCacheConfig = (0, _objectSpread2[\"default\"])({\n force: true\n }, options === null || options === void 0 ? void 0 : options.networkCacheConfig);\n var operation = createOperationDescriptor(queryNode, variables, networkCacheConfig);\n var fetchPolicy = (_options$fetchPolicy = options === null || options === void 0 ? void 0 : options.fetchPolicy) !== null && _options$fetchPolicy !== void 0 ? _options$fetchPolicy : 'network-only';\n\n function readData(snapshot) {\n if (snapshot.missingRequiredFields != null) {\n reportMissingRequiredFields(environment, snapshot.missingRequiredFields);\n }\n\n return snapshot.data;\n }\n\n switch (fetchPolicy) {\n case 'network-only':\n {\n return getNetworkObservable(environment, operation).map(readData);\n }\n\n case 'store-or-network':\n {\n if (environment.check(operation).status === 'available') {\n return RelayObservable.from(environment.lookup(operation.fragment)).map(readData);\n }\n\n return getNetworkObservable(environment, operation).map(readData);\n }\n\n default:\n fetchPolicy;\n throw new Error('fetchQuery: Invalid fetchPolicy ' + fetchPolicy);\n }\n}\n\nfunction getNetworkObservable(environment, operation) {\n return fetchQueryInternal.fetchQuery(environment, operation).map(function () {\n return environment.lookup(operation.fragment);\n });\n}\n\nmodule.exports = fetchQuery;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\nvar iterableToArray = require(\"./iterableToArray.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar PREFIX = 'client:';\n\nfunction generateClientID(id, storageKey, index) {\n var key = id + ':' + storageKey;\n\n if (index != null) {\n key += ':' + index;\n }\n\n if (key.indexOf(PREFIX) !== 0) {\n key = PREFIX + key;\n }\n\n return key;\n}\n\nfunction isClientID(id) {\n return id.indexOf(PREFIX) === 0;\n}\n\nvar localID = 0;\n\nfunction generateUniqueClientID() {\n return \"\".concat(PREFIX, \"local:\").concat(localID++);\n}\n\nmodule.exports = {\n generateClientID: generateClientID,\n generateUniqueClientID: generateUniqueClientID,\n isClientID: isClientID\n};","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar RelayFeatureFlags = require('../util/RelayFeatureFlags');\n\nvar RelayModernRecord = require('./RelayModernRecord');\n\nvar invariant = require('invariant');\n\nvar _require = require('../util/RelayConcreteNode'),\n CLIENT_EXTENSION = _require.CLIENT_EXTENSION,\n CONDITION = _require.CONDITION,\n DEFER = _require.DEFER,\n FLIGHT_FIELD = _require.FLIGHT_FIELD,\n FRAGMENT_SPREAD = _require.FRAGMENT_SPREAD,\n INLINE_DATA_FRAGMENT_SPREAD = _require.INLINE_DATA_FRAGMENT_SPREAD,\n INLINE_FRAGMENT = _require.INLINE_FRAGMENT,\n LINKED_FIELD = _require.LINKED_FIELD,\n MODULE_IMPORT = _require.MODULE_IMPORT,\n REQUIRED_FIELD = _require.REQUIRED_FIELD,\n RELAY_RESOLVER = _require.RELAY_RESOLVER,\n SCALAR_FIELD = _require.SCALAR_FIELD,\n STREAM = _require.STREAM;\n\nvar _require2 = require('./RelayStoreReactFlightUtils'),\n getReactFlightClientResponse = _require2.getReactFlightClientResponse;\n\nvar _require3 = require('./RelayStoreUtils'),\n FRAGMENTS_KEY = _require3.FRAGMENTS_KEY,\n FRAGMENT_OWNER_KEY = _require3.FRAGMENT_OWNER_KEY,\n FRAGMENT_PROP_NAME_KEY = _require3.FRAGMENT_PROP_NAME_KEY,\n ID_KEY = _require3.ID_KEY,\n IS_WITHIN_UNMATCHED_TYPE_REFINEMENT = _require3.IS_WITHIN_UNMATCHED_TYPE_REFINEMENT,\n MODULE_COMPONENT_KEY = _require3.MODULE_COMPONENT_KEY,\n ROOT_ID = _require3.ROOT_ID,\n getArgumentValues = _require3.getArgumentValues,\n getStorageKey = _require3.getStorageKey,\n getModuleComponentKey = _require3.getModuleComponentKey;\n\nvar _require4 = require('./ResolverFragments'),\n withResolverContext = _require4.withResolverContext;\n\nvar _require5 = require('./TypeID'),\n generateTypeID = _require5.generateTypeID;\n\nfunction read(recordSource, selector) {\n var reader = new RelayReader(recordSource, selector);\n return reader.read();\n}\n/**\n * @private\n */\n\n\nvar RelayReader = /*#__PURE__*/function () {\n function RelayReader(recordSource, selector) {\n this._isMissingData = false;\n this._isWithinUnmatchedTypeRefinement = false;\n this._missingRequiredFields = null;\n this._owner = selector.owner;\n this._recordSource = recordSource;\n this._seenRecords = new Set();\n this._selector = selector;\n this._variables = selector.variables;\n }\n\n var _proto = RelayReader.prototype;\n\n _proto.read = function read() {\n var _this$_selector = this._selector,\n node = _this$_selector.node,\n dataID = _this$_selector.dataID,\n isWithinUnmatchedTypeRefinement = _this$_selector.isWithinUnmatchedTypeRefinement;\n var abstractKey = node.abstractKey;\n\n var record = this._recordSource.get(dataID); // Relay historically allowed child fragments to be read even if the root object\n // did not match the type of the fragment: either the root object has a different\n // concrete type than the fragment (for concrete fragments) or the root object does\n // not conform to the interface/union for abstract fragments.\n // For suspense purposes, however, we want to accurately compute whether any data\n // is missing: but if the fragment type doesn't match (or a parent type didn't\n // match), then no data is expected to be present.\n // By default data is expected to be present unless this selector was read out\n // from within a non-matching type refinement in a parent fragment:\n\n\n var isDataExpectedToBePresent = !isWithinUnmatchedTypeRefinement; // If this is a concrete fragment and the concrete type of the record does not\n // match, then no data is expected to be present.\n\n if (isDataExpectedToBePresent && abstractKey == null && record != null) {\n var recordType = RelayModernRecord.getType(record);\n\n if (recordType !== node.type && dataID !== ROOT_ID) {\n isDataExpectedToBePresent = false;\n }\n } // If this is an abstract fragment (and the precise refinement GK is enabled)\n // then data is only expected to be present if the record type is known to\n // implement the interface. If we aren't sure whether the record implements\n // the interface, that itself constitutes \"expected\" data being missing.\n\n\n if (isDataExpectedToBePresent && abstractKey != null && record != null && RelayFeatureFlags.ENABLE_PRECISE_TYPE_REFINEMENT) {\n var _recordType = RelayModernRecord.getType(record);\n\n var typeID = generateTypeID(_recordType);\n\n var typeRecord = this._recordSource.get(typeID);\n\n var implementsInterface = typeRecord != null ? RelayModernRecord.getValue(typeRecord, abstractKey) : null;\n\n if (implementsInterface === false) {\n // Type known to not implement the interface\n isDataExpectedToBePresent = false;\n } else if (implementsInterface == null) {\n // Don't know if the type implements the interface or not\n this._isMissingData = true;\n }\n }\n\n this._isWithinUnmatchedTypeRefinement = !isDataExpectedToBePresent;\n\n var data = this._traverse(node, dataID, null);\n\n return {\n data: data,\n isMissingData: this._isMissingData && isDataExpectedToBePresent,\n seenRecords: this._seenRecords,\n selector: this._selector,\n missingRequiredFields: this._missingRequiredFields\n };\n };\n\n _proto._traverse = function _traverse(node, dataID, prevData) {\n var record = this._recordSource.get(dataID);\n\n this._seenRecords.add(dataID);\n\n if (record == null) {\n if (record === undefined) {\n this._isMissingData = true;\n }\n\n return record;\n }\n\n var data = prevData || {};\n\n var hadRequiredData = this._traverseSelections(node.selections, record, data);\n\n return hadRequiredData ? data : null;\n };\n\n _proto._getVariableValue = function _getVariableValue(name) {\n !this._variables.hasOwnProperty(name) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReader(): Undefined variable `%s`.', name) : invariant(false) : void 0; // $FlowFixMe[cannot-write]\n\n return this._variables[name];\n };\n\n _proto._maybeReportUnexpectedNull = function _maybeReportUnexpectedNull(fieldPath, action, record) {\n var _this$_missingRequire;\n\n if (((_this$_missingRequire = this._missingRequiredFields) === null || _this$_missingRequire === void 0 ? void 0 : _this$_missingRequire.action) === 'THROW') {\n // Chained @required directives may cause a parent `@required(action:\n // THROW)` field to become null, so the first missing field we\n // encounter is likely to be the root cause of the error.\n return;\n }\n\n var owner = this._selector.node.name;\n\n switch (action) {\n case 'THROW':\n this._missingRequiredFields = {\n action: action,\n field: {\n path: fieldPath,\n owner: owner\n }\n };\n return;\n\n case 'LOG':\n if (this._missingRequiredFields == null) {\n this._missingRequiredFields = {\n action: action,\n fields: []\n };\n }\n\n this._missingRequiredFields.fields.push({\n path: fieldPath,\n owner: owner\n });\n\n return;\n\n default:\n action;\n }\n };\n\n _proto._traverseSelections = function _traverseSelections(selections, record, data)\n /* had all expected data */\n {\n for (var i = 0; i < selections.length; i++) {\n var selection = selections[i];\n\n switch (selection.kind) {\n case REQUIRED_FIELD:\n !RelayFeatureFlags.ENABLE_REQUIRED_DIRECTIVES ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReader(): Encountered a `@required` directive at path \"%s\" in `%s` without the `ENABLE_REQUIRED_DIRECTIVES` feature flag enabled.', selection.path, this._selector.node.name) : invariant(false) : void 0;\n\n var fieldValue = this._readRequiredField(selection, record, data);\n\n if (fieldValue == null) {\n var action = selection.action;\n\n if (action !== 'NONE') {\n this._maybeReportUnexpectedNull(selection.path, action, record);\n } // We are going to throw, or our parent is going to get nulled out.\n // Either way, sibling values are going to be ignored, so we can\n // bail early here as an optimization.\n\n\n return false;\n }\n\n break;\n\n case SCALAR_FIELD:\n this._readScalar(selection, record, data);\n\n break;\n\n case LINKED_FIELD:\n if (selection.plural) {\n this._readPluralLink(selection, record, data);\n } else {\n this._readLink(selection, record, data);\n }\n\n break;\n\n case CONDITION:\n var conditionValue = this._getVariableValue(selection.condition);\n\n if (conditionValue === selection.passingValue) {\n var hasExpectedData = this._traverseSelections(selection.selections, record, data);\n\n if (!hasExpectedData) {\n return false;\n }\n }\n\n break;\n\n case INLINE_FRAGMENT:\n {\n var abstractKey = selection.abstractKey;\n\n if (abstractKey == null) {\n // concrete type refinement: only read data if the type exactly matches\n var typeName = RelayModernRecord.getType(record);\n\n if (typeName != null && typeName === selection.type) {\n var _hasExpectedData = this._traverseSelections(selection.selections, record, data);\n\n if (!_hasExpectedData) {\n return false;\n }\n }\n } else if (RelayFeatureFlags.ENABLE_PRECISE_TYPE_REFINEMENT) {\n // Similar to the logic in read(): data is only expected to be present\n // if the record is known to conform to the interface. If we don't know\n // whether the type conforms or not, that constitutes missing data.\n // store flags to reset after reading\n var parentIsMissingData = this._isMissingData;\n var parentIsWithinUnmatchedTypeRefinement = this._isWithinUnmatchedTypeRefinement;\n\n var _typeName = RelayModernRecord.getType(record);\n\n var typeID = generateTypeID(_typeName);\n\n var typeRecord = this._recordSource.get(typeID);\n\n var implementsInterface = typeRecord != null ? RelayModernRecord.getValue(typeRecord, abstractKey) : null;\n this._isWithinUnmatchedTypeRefinement = parentIsWithinUnmatchedTypeRefinement || implementsInterface === false;\n\n this._traverseSelections(selection.selections, record, data);\n\n this._isWithinUnmatchedTypeRefinement = parentIsWithinUnmatchedTypeRefinement;\n\n if (implementsInterface === false) {\n // Type known to not implement the interface, no data expected\n this._isMissingData = parentIsMissingData;\n } else if (implementsInterface == null) {\n // Don't know if the type implements the interface or not\n this._isMissingData = true;\n }\n } else {\n // legacy behavior for abstract refinements: always read even\n // if the type doesn't conform and don't reset isMissingData\n this._traverseSelections(selection.selections, record, data);\n }\n\n break;\n }\n\n case RELAY_RESOLVER:\n {\n if (!RelayFeatureFlags.ENABLE_RELAY_RESOLVERS) {\n throw new Error('Relay Resolver fields are not yet supported.');\n }\n\n this._readResolverField(selection, record, data);\n\n break;\n }\n\n case FRAGMENT_SPREAD:\n this._createFragmentPointer(selection, record, data);\n\n break;\n\n case MODULE_IMPORT:\n this._readModuleImport(selection, record, data);\n\n break;\n\n case INLINE_DATA_FRAGMENT_SPREAD:\n this._createInlineDataOrResolverFragmentPointer(selection, record, data);\n\n break;\n\n case DEFER:\n case CLIENT_EXTENSION:\n {\n var isMissingData = this._isMissingData;\n\n var _hasExpectedData2 = this._traverseSelections(selection.selections, record, data);\n\n this._isMissingData = isMissingData;\n\n if (!_hasExpectedData2) {\n return false;\n }\n\n break;\n }\n\n case STREAM:\n {\n var _hasExpectedData3 = this._traverseSelections(selection.selections, record, data);\n\n if (!_hasExpectedData3) {\n return false;\n }\n\n break;\n }\n\n case FLIGHT_FIELD:\n if (RelayFeatureFlags.ENABLE_REACT_FLIGHT_COMPONENT_FIELD) {\n this._readFlightField(selection, record, data);\n } else {\n throw new Error('Flight fields are not yet supported.');\n }\n\n break;\n\n default:\n selection;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReader(): Unexpected ast kind `%s`.', selection.kind) : invariant(false) : void 0;\n }\n }\n\n return true;\n };\n\n _proto._readRequiredField = function _readRequiredField(selection, record, data) {\n switch (selection.field.kind) {\n case SCALAR_FIELD:\n return this._readScalar(selection.field, record, data);\n\n case LINKED_FIELD:\n if (selection.field.plural) {\n return this._readPluralLink(selection.field, record, data);\n } else {\n return this._readLink(selection.field, record, data);\n }\n\n default:\n selection.field.kind;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReader(): Unexpected ast kind `%s`.', selection.kind) : invariant(false) : void 0;\n }\n };\n\n _proto._readResolverField = function _readResolverField(selection, record, data) {\n var _this = this;\n\n var name = selection.name,\n alias = selection.alias,\n resolverModule = selection.resolverModule,\n fragment = selection.fragment;\n var key = {\n __id: RelayModernRecord.getDataID(record),\n __fragmentOwner: this._owner,\n __fragments: (0, _defineProperty2[\"default\"])({}, fragment.name, {})\n };\n var resolverContext = {\n getDataForResolverFragment: function getDataForResolverFragment(singularReaderSelector) {\n var _resolverFragmentData;\n\n var resolverFragmentData = {};\n\n _this._createInlineDataOrResolverFragmentPointer(singularReaderSelector.node, record, resolverFragmentData);\n\n var answer = (_resolverFragmentData = resolverFragmentData[FRAGMENTS_KEY]) === null || _resolverFragmentData === void 0 ? void 0 : _resolverFragmentData[fragment.name];\n !(typeof answer === 'object' && answer !== null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected reader data to contain a __fragments property with a property for the fragment named \".concat(fragment.name, \", but it is missing.\")) : invariant(false) : void 0;\n return answer;\n }\n };\n var resolverResult = withResolverContext(resolverContext, function () {\n return (// $FlowFixMe[prop-missing] - resolver module's type signature is a lie\n resolverModule(key)\n );\n });\n data[alias !== null && alias !== void 0 ? alias : name] = resolverResult;\n return resolverResult;\n };\n\n _proto._readFlightField = function _readFlightField(field, record, data) {\n var _field$alias;\n\n var applicationName = (_field$alias = field.alias) !== null && _field$alias !== void 0 ? _field$alias : field.name;\n var storageKey = getStorageKey(field, this._variables);\n var reactFlightClientResponseRecordID = RelayModernRecord.getLinkedRecordID(record, storageKey);\n\n if (reactFlightClientResponseRecordID == null) {\n data[applicationName] = reactFlightClientResponseRecordID;\n\n if (reactFlightClientResponseRecordID === undefined) {\n this._isMissingData = true;\n }\n\n return reactFlightClientResponseRecordID;\n }\n\n var reactFlightClientResponseRecord = this._recordSource.get(reactFlightClientResponseRecordID);\n\n this._seenRecords.add(reactFlightClientResponseRecordID);\n\n if (reactFlightClientResponseRecord == null) {\n data[applicationName] = reactFlightClientResponseRecord;\n\n if (reactFlightClientResponseRecord === undefined) {\n this._isMissingData = true;\n }\n\n return reactFlightClientResponseRecord;\n }\n\n var clientResponse = getReactFlightClientResponse(reactFlightClientResponseRecord);\n data[applicationName] = clientResponse;\n return clientResponse;\n };\n\n _proto._readScalar = function _readScalar(field, record, data) {\n var _field$alias2;\n\n var applicationName = (_field$alias2 = field.alias) !== null && _field$alias2 !== void 0 ? _field$alias2 : field.name;\n var storageKey = getStorageKey(field, this._variables);\n var value = RelayModernRecord.getValue(record, storageKey);\n\n if (value === undefined) {\n this._isMissingData = true;\n }\n\n data[applicationName] = value;\n return value;\n };\n\n _proto._readLink = function _readLink(field, record, data) {\n var _field$alias3;\n\n var applicationName = (_field$alias3 = field.alias) !== null && _field$alias3 !== void 0 ? _field$alias3 : field.name;\n var storageKey = getStorageKey(field, this._variables);\n var linkedID = RelayModernRecord.getLinkedRecordID(record, storageKey);\n\n if (linkedID == null) {\n data[applicationName] = linkedID;\n\n if (linkedID === undefined) {\n this._isMissingData = true;\n }\n\n return linkedID;\n }\n\n var prevData = data[applicationName];\n !(prevData == null || typeof prevData === 'object') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReader(): Expected data for field `%s` on record `%s` ' + 'to be an object, got `%s`.', applicationName, RelayModernRecord.getDataID(record), prevData) : invariant(false) : void 0; // $FlowFixMe[incompatible-variance]\n\n var value = this._traverse(field, linkedID, prevData);\n\n data[applicationName] = value;\n return value;\n };\n\n _proto._readPluralLink = function _readPluralLink(field, record, data) {\n var _this2 = this;\n\n var _field$alias4;\n\n var applicationName = (_field$alias4 = field.alias) !== null && _field$alias4 !== void 0 ? _field$alias4 : field.name;\n var storageKey = getStorageKey(field, this._variables);\n var linkedIDs = RelayModernRecord.getLinkedRecordIDs(record, storageKey);\n\n if (linkedIDs == null) {\n data[applicationName] = linkedIDs;\n\n if (linkedIDs === undefined) {\n this._isMissingData = true;\n }\n\n return linkedIDs;\n }\n\n var prevData = data[applicationName];\n !(prevData == null || Array.isArray(prevData)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReader(): Expected data for field `%s` on record `%s` ' + 'to be an array, got `%s`.', applicationName, RelayModernRecord.getDataID(record), prevData) : invariant(false) : void 0;\n var linkedArray = prevData || [];\n linkedIDs.forEach(function (linkedID, nextIndex) {\n if (linkedID == null) {\n if (linkedID === undefined) {\n _this2._isMissingData = true;\n } // $FlowFixMe[cannot-write]\n\n\n linkedArray[nextIndex] = linkedID;\n return;\n }\n\n var prevItem = linkedArray[nextIndex];\n !(prevItem == null || typeof prevItem === 'object') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReader(): Expected data for field `%s` on record `%s` ' + 'to be an object, got `%s`.', applicationName, RelayModernRecord.getDataID(record), prevItem) : invariant(false) : void 0; // $FlowFixMe[cannot-write]\n // $FlowFixMe[incompatible-variance]\n\n linkedArray[nextIndex] = _this2._traverse(field, linkedID, prevItem);\n });\n data[applicationName] = linkedArray;\n return linkedArray;\n }\n /**\n * Reads a ReaderModuleImport, which was generated from using the @module\n * directive.\n */\n ;\n\n _proto._readModuleImport = function _readModuleImport(moduleImport, record, data) {\n // Determine the component module from the store: if the field is missing\n // it means we don't know what component to render the match with.\n var componentKey = getModuleComponentKey(moduleImport.documentName);\n var component = RelayModernRecord.getValue(record, componentKey);\n\n if (component == null) {\n if (component === undefined) {\n this._isMissingData = true;\n }\n\n return;\n } // Otherwise, read the fragment and module associated to the concrete\n // type, and put that data with the result:\n // - For the matched fragment, create the relevant fragment pointer and add\n // the expected fragmentPropName\n // - For the matched module, create a reference to the module\n\n\n this._createFragmentPointer({\n kind: 'FragmentSpread',\n name: moduleImport.fragmentName,\n args: null\n }, record, data);\n\n data[FRAGMENT_PROP_NAME_KEY] = moduleImport.fragmentPropName;\n data[MODULE_COMPONENT_KEY] = component;\n };\n\n _proto._createFragmentPointer = function _createFragmentPointer(fragmentSpread, record, data) {\n var fragmentPointers = data[FRAGMENTS_KEY];\n\n if (fragmentPointers == null) {\n fragmentPointers = data[FRAGMENTS_KEY] = {};\n }\n\n !(typeof fragmentPointers === 'object' && fragmentPointers != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReader: Expected fragment spread data to be an object, got `%s`.', fragmentPointers) : invariant(false) : void 0;\n\n if (data[ID_KEY] == null) {\n data[ID_KEY] = RelayModernRecord.getDataID(record);\n } // $FlowFixMe[cannot-write] - writing into read-only field\n\n\n fragmentPointers[fragmentSpread.name] = fragmentSpread.args ? getArgumentValues(fragmentSpread.args, this._variables) : {};\n data[FRAGMENT_OWNER_KEY] = this._owner;\n\n if (RelayFeatureFlags.ENABLE_PRECISE_TYPE_REFINEMENT) {\n data[IS_WITHIN_UNMATCHED_TYPE_REFINEMENT] = this._isWithinUnmatchedTypeRefinement;\n }\n };\n\n _proto._createInlineDataOrResolverFragmentPointer = function _createInlineDataOrResolverFragmentPointer(fragmentSpreadOrFragment, record, data) {\n var fragmentPointers = data[FRAGMENTS_KEY];\n\n if (fragmentPointers == null) {\n fragmentPointers = data[FRAGMENTS_KEY] = {};\n }\n\n !(typeof fragmentPointers === 'object' && fragmentPointers != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReader: Expected fragment spread data to be an object, got `%s`.', fragmentPointers) : invariant(false) : void 0;\n\n if (data[ID_KEY] == null) {\n data[ID_KEY] = RelayModernRecord.getDataID(record);\n }\n\n var inlineData = {};\n\n this._traverseSelections(fragmentSpreadOrFragment.selections, record, inlineData); // $FlowFixMe[cannot-write] - writing into read-only field\n\n\n fragmentPointers[fragmentSpreadOrFragment.name] = inlineData;\n };\n\n return RelayReader;\n}();\n\nmodule.exports = {\n read: read\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _require = require('./ViewerPattern'),\n VIEWER_ID = _require.VIEWER_ID,\n VIEWER_TYPE = _require.VIEWER_TYPE;\n\nfunction defaultGetDataID(fieldValue, typeName) {\n if (typeName === VIEWER_TYPE) {\n // $FlowFixMe[prop-missing]\n return fieldValue.id == null ? VIEWER_ID : fieldValue.id;\n } // $FlowFixMe[prop-missing]\n\n\n return fieldValue.id;\n}\n\nmodule.exports = defaultGetDataID;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _createForOfIteratorHelper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createForOfIteratorHelper\"));\n\nvar ConnectionHandler = require('./ConnectionHandler');\n\nvar ConnectionInterface = require('./ConnectionInterface');\n\nvar invariant = require('invariant');\n\nvar warning = require(\"fbjs/lib/warning\");\n\nvar DeleteRecordHandler = {\n update: function update(store, payload) {\n var record = store.get(payload.dataID);\n\n if (record != null) {\n var idOrIds = record.getValue(payload.fieldKey);\n\n if (typeof idOrIds === 'string') {\n store[\"delete\"](idOrIds);\n } else if (Array.isArray(idOrIds)) {\n idOrIds.forEach(function (id) {\n if (typeof id === 'string') {\n store[\"delete\"](id);\n }\n });\n }\n }\n }\n};\nvar DeleteEdgeHandler = {\n update: function update(store, payload) {\n var record = store.get(payload.dataID);\n\n if (record == null) {\n return;\n } // $FlowFixMe[prop-missing]\n\n\n var connections = payload.handleArgs.connections;\n !(connections != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'MutationHandlers: Expected connection IDs to be specified.') : invariant(false) : void 0;\n var idOrIds = record.getValue(payload.fieldKey);\n var idList = Array.isArray(idOrIds) ? idOrIds : [idOrIds];\n idList.forEach(function (id) {\n if (typeof id === 'string') {\n var _iterator = (0, _createForOfIteratorHelper2[\"default\"])(connections),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var connectionID = _step.value;\n var connection = store.get(connectionID);\n\n if (connection == null) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[Relay][Mutation] The connection with id '\".concat(connectionID, \"' doesn't exist.\")) : void 0;\n continue;\n }\n\n ConnectionHandler.deleteNode(connection, id);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n });\n }\n};\nvar AppendEdgeHandler = {\n update: edgeUpdater(ConnectionHandler.insertEdgeAfter)\n};\nvar PrependEdgeHandler = {\n update: edgeUpdater(ConnectionHandler.insertEdgeBefore)\n};\nvar AppendNodeHandler = {\n update: nodeUpdater(ConnectionHandler.insertEdgeAfter)\n};\nvar PrependNodeHandler = {\n update: nodeUpdater(ConnectionHandler.insertEdgeBefore)\n};\n\nfunction edgeUpdater(insertFn) {\n return function (store, payload) {\n var _serverEdges;\n\n var record = store.get(payload.dataID);\n\n if (record == null) {\n return;\n } // $FlowFixMe[prop-missing]\n\n\n var connections = payload.handleArgs.connections;\n !(connections != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'MutationHandlers: Expected connection IDs to be specified.') : invariant(false) : void 0;\n var singleServerEdge, serverEdges;\n\n try {\n singleServerEdge = record.getLinkedRecord(payload.fieldKey, payload.args);\n } catch (_unused) {}\n\n if (!singleServerEdge) {\n try {\n serverEdges = record.getLinkedRecords(payload.fieldKey, payload.args);\n } catch (_unused2) {}\n }\n\n if (singleServerEdge == null && serverEdges == null) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'MutationHandlers: Expected the server edge to be non-null.') : void 0;\n return;\n }\n\n var _ConnectionInterface$ = ConnectionInterface.get(),\n NODE = _ConnectionInterface$.NODE,\n EDGES = _ConnectionInterface$.EDGES;\n\n var serverEdgeList = (_serverEdges = serverEdges) !== null && _serverEdges !== void 0 ? _serverEdges : [singleServerEdge];\n\n var _iterator2 = (0, _createForOfIteratorHelper2[\"default\"])(serverEdgeList),\n _step2;\n\n try {\n var _loop = function _loop() {\n var serverEdge = _step2.value;\n\n if (serverEdge == null) {\n return \"continue\";\n }\n\n var serverNode = serverEdge.getLinkedRecord('node');\n\n if (!serverNode) {\n return \"continue\";\n }\n\n var serverNodeId = serverNode.getDataID();\n\n var _iterator3 = (0, _createForOfIteratorHelper2[\"default\"])(connections),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var connectionID = _step3.value;\n var connection = store.get(connectionID);\n\n if (connection == null) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[Relay][Mutation] The connection with id '\".concat(connectionID, \"' doesn't exist.\")) : void 0;\n continue;\n }\n\n var nodeAlreadyExistsInConnection = (_connection$getLinked = connection.getLinkedRecords(EDGES)) === null || _connection$getLinked === void 0 ? void 0 : _connection$getLinked.some(function (edge) {\n var _edge$getLinkedRecord;\n\n return (edge === null || edge === void 0 ? void 0 : (_edge$getLinkedRecord = edge.getLinkedRecord(NODE)) === null || _edge$getLinkedRecord === void 0 ? void 0 : _edge$getLinkedRecord.getDataID()) === serverNodeId;\n });\n\n if (nodeAlreadyExistsInConnection) {\n continue;\n }\n\n var clientEdge = ConnectionHandler.buildConnectionEdge(store, connection, serverEdge);\n !(clientEdge != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'MutationHandlers: Failed to build the edge.') : invariant(false) : void 0;\n insertFn(connection, clientEdge);\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n };\n\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _connection$getLinked;\n\n var _ret = _loop();\n\n if (_ret === \"continue\") continue;\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n };\n}\n\nfunction nodeUpdater(insertFn) {\n return function (store, payload) {\n var _serverNodes;\n\n var record = store.get(payload.dataID);\n\n if (record == null) {\n return;\n } // $FlowFixMe[prop-missing]\n\n\n var _payload$handleArgs = payload.handleArgs,\n connections = _payload$handleArgs.connections,\n edgeTypeName = _payload$handleArgs.edgeTypeName;\n !(connections != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'MutationHandlers: Expected connection IDs to be specified.') : invariant(false) : void 0;\n !(edgeTypeName != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'MutationHandlers: Expected edge typename to be specified.') : invariant(false) : void 0;\n var singleServerNode;\n var serverNodes;\n\n try {\n singleServerNode = record.getLinkedRecord(payload.fieldKey, payload.args);\n } catch (_unused3) {}\n\n if (!singleServerNode) {\n try {\n serverNodes = record.getLinkedRecords(payload.fieldKey, payload.args);\n } catch (_unused4) {}\n }\n\n if (singleServerNode == null && serverNodes == null) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'MutationHandlers: Expected target node to exist.') : void 0;\n return;\n }\n\n var _ConnectionInterface$2 = ConnectionInterface.get(),\n NODE = _ConnectionInterface$2.NODE,\n EDGES = _ConnectionInterface$2.EDGES;\n\n var serverNodeList = (_serverNodes = serverNodes) !== null && _serverNodes !== void 0 ? _serverNodes : [singleServerNode];\n\n var _iterator4 = (0, _createForOfIteratorHelper2[\"default\"])(serverNodeList),\n _step4;\n\n try {\n var _loop2 = function _loop2() {\n var serverNode = _step4.value;\n\n if (serverNode == null) {\n return \"continue\";\n }\n\n var serverNodeId = serverNode.getDataID();\n\n var _iterator5 = (0, _createForOfIteratorHelper2[\"default\"])(connections),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var connectionID = _step5.value;\n var connection = store.get(connectionID);\n\n if (connection == null) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[Relay][Mutation] The connection with id '\".concat(connectionID, \"' doesn't exist.\")) : void 0;\n continue;\n }\n\n var nodeAlreadyExistsInConnection = (_connection$getLinked2 = connection.getLinkedRecords(EDGES)) === null || _connection$getLinked2 === void 0 ? void 0 : _connection$getLinked2.some(function (edge) {\n var _edge$getLinkedRecord2;\n\n return (edge === null || edge === void 0 ? void 0 : (_edge$getLinkedRecord2 = edge.getLinkedRecord(NODE)) === null || _edge$getLinkedRecord2 === void 0 ? void 0 : _edge$getLinkedRecord2.getDataID()) === serverNodeId;\n });\n\n if (nodeAlreadyExistsInConnection) {\n continue;\n }\n\n var clientEdge = ConnectionHandler.createEdge(store, connection, serverNode, edgeTypeName);\n !(clientEdge != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'MutationHandlers: Failed to build the edge.') : invariant(false) : void 0;\n insertFn(connection, clientEdge);\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n };\n\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var _connection$getLinked2;\n\n var _ret2 = _loop2();\n\n if (_ret2 === \"continue\") continue;\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n };\n}\n\nmodule.exports = {\n AppendEdgeHandler: AppendEdgeHandler,\n DeleteRecordHandler: DeleteRecordHandler,\n PrependEdgeHandler: PrependEdgeHandler,\n AppendNodeHandler: AppendNodeHandler,\n PrependNodeHandler: PrependNodeHandler,\n DeleteEdgeHandler: DeleteEdgeHandler\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar resolvedPromise = Promise.resolve();\n/**\n * An alternative to setImmediate based on Promise.\n */\n\nfunction resolveImmediate(callback) {\n resolvedPromise.then(callback)[\"catch\"](throwNext);\n}\n\nfunction throwNext(error) {\n setTimeout(function () {\n throw error;\n }, 0);\n}\n\nmodule.exports = resolveImmediate;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function F() {};\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\nmodule.exports = _createForOfIteratorHelper, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @emails oncall+relay\n * @format\n */\n'use strict';\n\nfunction reportMissingRequiredFields(environment, missingRequiredFields) {\n switch (missingRequiredFields.action) {\n case 'THROW':\n {\n var _missingRequiredField = missingRequiredFields.field,\n path = _missingRequiredField.path,\n owner = _missingRequiredField.owner; // This gives the consumer the chance to throw their own error if they so wish.\n\n environment.requiredFieldLogger({\n kind: 'missing_field.throw',\n owner: owner,\n fieldPath: path\n });\n throw new Error(\"Relay: Missing @required value at path '\".concat(path, \"' in '\").concat(owner, \"'.\"));\n }\n\n case 'LOG':\n missingRequiredFields.fields.forEach(function (_ref) {\n var path = _ref.path,\n owner = _ref.owner;\n environment.requiredFieldLogger({\n kind: 'missing_field.log',\n owner: owner,\n fieldPath: path\n });\n });\n break;\n\n default:\n {\n missingRequiredFields.action;\n }\n }\n}\n\nmodule.exports = reportMissingRequiredFields;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _createForOfIteratorHelper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createForOfIteratorHelper\"));\n\nvar invariant = require('invariant');\n\nvar RelayOperationTracker = /*#__PURE__*/function () {\n function RelayOperationTracker() {\n this._ownersToPendingOperationsIdentifier = new Map();\n this._pendingOperationsToOwnersIdentifier = new Map();\n this._ownersIdentifierToPromise = new Map();\n }\n /**\n * Update the map of current processing operations with the set of\n * affected owners and notify subscribers\n */\n\n\n var _proto = RelayOperationTracker.prototype;\n\n _proto.update = function update(pendingOperation, affectedOwners) {\n if (affectedOwners.size === 0) {\n return;\n }\n\n var pendingOperationIdentifier = pendingOperation.identifier;\n var newlyAffectedOwnersIdentifier = new Set();\n\n var _iterator = (0, _createForOfIteratorHelper2[\"default\"])(affectedOwners),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var owner = _step.value;\n var ownerIdentifier = owner.identifier;\n\n var pendingOperationsAffectingOwner = this._ownersToPendingOperationsIdentifier.get(ownerIdentifier);\n\n if (pendingOperationsAffectingOwner != null) {\n // In this case the `ownerIdentifier` already affected by some operations\n // We just need to detect, is it the same operation that we already\n // have in the list, or it's a new operation\n if (!pendingOperationsAffectingOwner.has(pendingOperationIdentifier)) {\n pendingOperationsAffectingOwner.add(pendingOperationIdentifier);\n newlyAffectedOwnersIdentifier.add(ownerIdentifier);\n }\n } else {\n // This is a new `ownerIdentifier` that is affected by the operation\n this._ownersToPendingOperationsIdentifier.set(ownerIdentifier, new Set([pendingOperationIdentifier]));\n\n newlyAffectedOwnersIdentifier.add(ownerIdentifier);\n }\n } // No new owners were affected by this operation, we may stop here\n\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n if (newlyAffectedOwnersIdentifier.size === 0) {\n return;\n } // But, if some owners were affected we need to add them to\n // the `_pendingOperationsToOwnersIdentifier` set\n\n\n var ownersAffectedByOperationIdentifier = this._pendingOperationsToOwnersIdentifier.get(pendingOperationIdentifier) || new Set();\n\n var _iterator2 = (0, _createForOfIteratorHelper2[\"default\"])(newlyAffectedOwnersIdentifier),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _ownerIdentifier = _step2.value;\n\n this._resolveOwnerResolvers(_ownerIdentifier);\n\n ownersAffectedByOperationIdentifier.add(_ownerIdentifier);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n this._pendingOperationsToOwnersIdentifier.set(pendingOperationIdentifier, ownersAffectedByOperationIdentifier);\n }\n /**\n * Once pending operation is completed we need to remove it\n * from all tracking maps\n */\n ;\n\n _proto.complete = function complete(pendingOperation) {\n var pendingOperationIdentifier = pendingOperation.identifier;\n\n var affectedOwnersIdentifier = this._pendingOperationsToOwnersIdentifier.get(pendingOperationIdentifier);\n\n if (affectedOwnersIdentifier == null) {\n return;\n } // These were the owners affected only by `pendingOperationIdentifier`\n\n\n var completedOwnersIdentifier = new Set(); // These were the owners affected by `pendingOperationIdentifier`\n // and some other operations\n\n var updatedOwnersIdentifier = new Set();\n\n var _iterator3 = (0, _createForOfIteratorHelper2[\"default\"])(affectedOwnersIdentifier),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var ownerIdentifier = _step3.value;\n\n var pendingOperationsAffectingOwner = this._ownersToPendingOperationsIdentifier.get(ownerIdentifier);\n\n if (!pendingOperationsAffectingOwner) {\n continue;\n }\n\n pendingOperationsAffectingOwner[\"delete\"](pendingOperationIdentifier);\n\n if (pendingOperationsAffectingOwner.size > 0) {\n updatedOwnersIdentifier.add(ownerIdentifier);\n } else {\n completedOwnersIdentifier.add(ownerIdentifier);\n }\n } // Complete subscriptions for all owners, affected by `pendingOperationIdentifier`\n\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n var _iterator4 = (0, _createForOfIteratorHelper2[\"default\"])(completedOwnersIdentifier),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var _ownerIdentifier2 = _step4.value;\n\n this._resolveOwnerResolvers(_ownerIdentifier2);\n\n this._ownersToPendingOperationsIdentifier[\"delete\"](_ownerIdentifier2);\n } // Update all ownerIdentifier that were updated by `pendingOperationIdentifier` but still\n // are affected by other operations\n\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n\n var _iterator5 = (0, _createForOfIteratorHelper2[\"default\"])(updatedOwnersIdentifier),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var _ownerIdentifier3 = _step5.value;\n\n this._resolveOwnerResolvers(_ownerIdentifier3);\n } // Finally, remove pending operation identifier\n\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n\n this._pendingOperationsToOwnersIdentifier[\"delete\"](pendingOperationIdentifier);\n };\n\n _proto._resolveOwnerResolvers = function _resolveOwnerResolvers(ownerIdentifier) {\n var promiseEntry = this._ownersIdentifierToPromise.get(ownerIdentifier);\n\n if (promiseEntry != null) {\n promiseEntry.resolve();\n }\n\n this._ownersIdentifierToPromise[\"delete\"](ownerIdentifier);\n };\n\n _proto.getPromiseForPendingOperationsAffectingOwner = function getPromiseForPendingOperationsAffectingOwner(owner) {\n var ownerIdentifier = owner.identifier;\n\n if (!this._ownersToPendingOperationsIdentifier.has(ownerIdentifier)) {\n return null;\n }\n\n var cachedPromiseEntry = this._ownersIdentifierToPromise.get(ownerIdentifier);\n\n if (cachedPromiseEntry != null) {\n return cachedPromiseEntry.promise;\n }\n\n var resolve;\n var promise = new Promise(function (r) {\n resolve = r;\n });\n !(resolve != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayOperationTracker: Expected resolver to be defined. If you' + 'are seeing this, it is likely a bug in Relay.') : invariant(false) : void 0;\n\n this._ownersIdentifierToPromise.set(ownerIdentifier, {\n promise: promise,\n resolve: resolve\n });\n\n return promise;\n };\n\n return RelayOperationTracker;\n}();\n\nmodule.exports = RelayOperationTracker;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar RelayConcreteNode = require('../util/RelayConcreteNode');\n\nvar invariant = require('invariant');\n\nvar warning = require(\"fbjs/lib/warning\");\n\n/**\n * Runtime function to correspond to the `graphql` tagged template function.\n * All calls to this function should be transformed by the plugin.\n */\nfunction graphql(strings) {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'graphql: Unexpected invocation at runtime. Either the Babel transform ' + 'was not set up, or it failed to identify this call site. Make sure it ' + 'is being used verbatim as `graphql`. Note also that there cannot be ' + 'a space between graphql and the backtick that follows.') : invariant(false) : void 0;\n}\n\nfunction getNode(taggedNode) {\n var node = taggedNode;\n\n if (typeof node === 'function') {\n node = node();\n process.env.NODE_ENV !== \"production\" ? warning(false, 'RelayGraphQLTag: node `%s` unexpectedly wrapped in a function.', node.kind === 'Fragment' ? node.name : node.operation.name) : void 0;\n } else if (node[\"default\"]) {\n // Support for languages that work (best) with ES6 modules, such as TypeScript.\n node = node[\"default\"];\n }\n\n return node;\n}\n\nfunction isFragment(node) {\n var fragment = getNode(node);\n return typeof fragment === 'object' && fragment !== null && fragment.kind === RelayConcreteNode.FRAGMENT;\n}\n\nfunction isRequest(node) {\n var request = getNode(node);\n return typeof request === 'object' && request !== null && request.kind === RelayConcreteNode.REQUEST;\n}\n\nfunction isInlineDataFragment(node) {\n var fragment = getNode(node);\n return typeof fragment === 'object' && fragment !== null && fragment.kind === RelayConcreteNode.INLINE_DATA_FRAGMENT;\n}\n\nfunction getFragment(taggedNode) {\n var fragment = getNode(taggedNode);\n !isFragment(fragment) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'GraphQLTag: Expected a fragment, got `%s`.', JSON.stringify(fragment)) : invariant(false) : void 0;\n return fragment;\n}\n\nfunction getPaginationFragment(taggedNode) {\n var _fragment$metadata;\n\n var fragment = getFragment(taggedNode);\n var refetch = (_fragment$metadata = fragment.metadata) === null || _fragment$metadata === void 0 ? void 0 : _fragment$metadata.refetch;\n var connection = refetch === null || refetch === void 0 ? void 0 : refetch.connection;\n\n if (refetch === null || typeof refetch !== 'object' || connection === null || typeof connection !== 'object') {\n return null;\n }\n\n return fragment;\n}\n\nfunction getRefetchableFragment(taggedNode) {\n var _fragment$metadata2;\n\n var fragment = getFragment(taggedNode);\n var refetch = (_fragment$metadata2 = fragment.metadata) === null || _fragment$metadata2 === void 0 ? void 0 : _fragment$metadata2.refetch;\n\n if (refetch === null || typeof refetch !== 'object') {\n return null;\n }\n\n return fragment;\n}\n\nfunction getRequest(taggedNode) {\n var request = getNode(taggedNode);\n !isRequest(request) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'GraphQLTag: Expected a request, got `%s`.', JSON.stringify(request)) : invariant(false) : void 0;\n return request;\n}\n\nfunction getInlineDataFragment(taggedNode) {\n var fragment = getNode(taggedNode);\n !isInlineDataFragment(fragment) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'GraphQLTag: Expected an inline data fragment, got `%s`.', JSON.stringify(fragment)) : invariant(false) : void 0;\n return fragment;\n}\n\nmodule.exports = {\n getFragment: getFragment,\n getNode: getNode,\n getPaginationFragment: getPaginationFragment,\n getRefetchableFragment: getRefetchableFragment,\n getRequest: getRequest,\n getInlineDataFragment: getInlineDataFragment,\n graphql: graphql,\n isFragment: isFragment,\n isRequest: isRequest,\n isInlineDataFragment: isInlineDataFragment\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _global$ErrorUtils$ap, _global$ErrorUtils;\n\nvar RelayReader = require('./RelayReader');\n\nvar RelayRecordSource = require('./RelayRecordSource');\n\nvar RelayRecordSourceMutator = require('../mutations/RelayRecordSourceMutator');\n\nvar RelayRecordSourceProxy = require('../mutations/RelayRecordSourceProxy');\n\nvar RelayRecordSourceSelectorProxy = require('../mutations/RelayRecordSourceSelectorProxy');\n\nvar invariant = require('invariant');\n\nvar warning = require(\"fbjs/lib/warning\");\n\nvar applyWithGuard = (_global$ErrorUtils$ap = (_global$ErrorUtils = global.ErrorUtils) === null || _global$ErrorUtils === void 0 ? void 0 : _global$ErrorUtils.applyWithGuard) !== null && _global$ErrorUtils$ap !== void 0 ? _global$ErrorUtils$ap : function (callback, context, args, onError, name) {\n return callback.apply(context, args);\n};\n/**\n * Coordinates the concurrent modification of a `Store` due to optimistic and\n * non-revertable client updates and server payloads:\n * - Applies optimistic updates.\n * - Reverts optimistic updates, rebasing any subsequent updates.\n * - Commits client updates (typically for client schema extensions).\n * - Commits server updates:\n * - Normalizes query/mutation/subscription responses.\n * - Executes handlers for \"handle\" fields.\n * - Reverts and reapplies pending optimistic updates.\n */\n\nvar RelayPublishQueue = /*#__PURE__*/function () {\n // True if the next `run()` should apply the backup and rerun all optimistic\n // updates performing a rebase.\n // Payloads to apply or Sources to publish to the store with the next `run()`.\n // Optimistic updaters to add with the next `run()`.\n // Optimistic updaters that are already added and might be rerun in order to\n // rebase them.\n // Garbage collection hold, should rerun gc on dispose\n function RelayPublishQueue(store, handlerProvider, getDataID) {\n this._hasStoreSnapshot = false;\n this._handlerProvider = handlerProvider || null;\n this._pendingBackupRebase = false;\n this._pendingData = new Set();\n this._pendingOptimisticUpdates = new Set();\n this._store = store;\n this._appliedOptimisticUpdates = new Set();\n this._gcHold = null;\n this._getDataID = getDataID;\n }\n /**\n * Schedule applying an optimistic updates on the next `run()`.\n */\n\n\n var _proto = RelayPublishQueue.prototype;\n\n _proto.applyUpdate = function applyUpdate(updater) {\n !(!this._appliedOptimisticUpdates.has(updater) && !this._pendingOptimisticUpdates.has(updater)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayPublishQueue: Cannot apply the same update function more than ' + 'once concurrently.') : invariant(false) : void 0;\n\n this._pendingOptimisticUpdates.add(updater);\n }\n /**\n * Schedule reverting an optimistic updates on the next `run()`.\n */\n ;\n\n _proto.revertUpdate = function revertUpdate(updater) {\n if (this._pendingOptimisticUpdates.has(updater)) {\n // Reverted before it was applied\n this._pendingOptimisticUpdates[\"delete\"](updater);\n } else if (this._appliedOptimisticUpdates.has(updater)) {\n this._pendingBackupRebase = true;\n\n this._appliedOptimisticUpdates[\"delete\"](updater);\n }\n }\n /**\n * Schedule a revert of all optimistic updates on the next `run()`.\n */\n ;\n\n _proto.revertAll = function revertAll() {\n this._pendingBackupRebase = true;\n\n this._pendingOptimisticUpdates.clear();\n\n this._appliedOptimisticUpdates.clear();\n }\n /**\n * Schedule applying a payload to the store on the next `run()`.\n */\n ;\n\n _proto.commitPayload = function commitPayload(operation, payload, updater) {\n this._pendingBackupRebase = true;\n\n this._pendingData.add({\n kind: 'payload',\n operation: operation,\n payload: payload,\n updater: updater\n });\n }\n /**\n * Schedule an updater to mutate the store on the next `run()` typically to\n * update client schema fields.\n */\n ;\n\n _proto.commitUpdate = function commitUpdate(updater) {\n this._pendingBackupRebase = true;\n\n this._pendingData.add({\n kind: 'updater',\n updater: updater\n });\n }\n /**\n * Schedule a publish to the store from the provided source on the next\n * `run()`. As an example, to update the store with substituted fields that\n * are missing in the store.\n */\n ;\n\n _proto.commitSource = function commitSource(source) {\n this._pendingBackupRebase = true;\n\n this._pendingData.add({\n kind: 'source',\n source: source\n });\n }\n /**\n * Execute all queued up operations from the other public methods.\n */\n ;\n\n _proto.run = function run(sourceOperation) {\n if (process.env.NODE_ENV !== \"production\") {\n process.env.NODE_ENV !== \"production\" ? warning(this._isRunning !== true, 'A store update was detected within another store update. Please ' + \"make sure new store updates aren't being executed within an \" + 'updater function for a different update.') : void 0;\n this._isRunning = true;\n }\n\n if (this._pendingBackupRebase) {\n if (this._hasStoreSnapshot) {\n this._store.restore();\n\n this._hasStoreSnapshot = false;\n }\n }\n\n var invalidatedStore = this._commitData();\n\n if (this._pendingOptimisticUpdates.size || this._pendingBackupRebase && this._appliedOptimisticUpdates.size) {\n if (!this._hasStoreSnapshot) {\n this._store.snapshot();\n\n this._hasStoreSnapshot = true;\n }\n\n this._applyUpdates();\n }\n\n this._pendingBackupRebase = false;\n\n if (this._appliedOptimisticUpdates.size > 0) {\n if (!this._gcHold) {\n this._gcHold = this._store.holdGC();\n }\n } else {\n if (this._gcHold) {\n this._gcHold.dispose();\n\n this._gcHold = null;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n this._isRunning = false;\n }\n\n return this._store.notify(sourceOperation, invalidatedStore);\n }\n /**\n * _publishSourceFromPayload will return a boolean indicating if the\n * publish caused the store to be globally invalidated.\n */\n ;\n\n _proto._publishSourceFromPayload = function _publishSourceFromPayload(pendingPayload) {\n var _this = this;\n\n var payload = pendingPayload.payload,\n operation = pendingPayload.operation,\n updater = pendingPayload.updater;\n var source = payload.source,\n fieldPayloads = payload.fieldPayloads;\n var mutator = new RelayRecordSourceMutator(this._store.getSource(), source);\n var recordSourceProxy = new RelayRecordSourceProxy(mutator, this._getDataID);\n\n if (fieldPayloads && fieldPayloads.length) {\n fieldPayloads.forEach(function (fieldPayload) {\n var handler = _this._handlerProvider && _this._handlerProvider(fieldPayload.handle);\n\n !handler ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected a handler to be provided for ' + 'handle `%s`.', fieldPayload.handle) : invariant(false) : void 0;\n handler.update(recordSourceProxy, fieldPayload);\n });\n }\n\n if (updater) {\n var selector = operation.fragment;\n !(selector != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected a selector to be provided with updater function.') : invariant(false) : void 0;\n var recordSourceSelectorProxy = new RelayRecordSourceSelectorProxy(mutator, recordSourceProxy, selector);\n var selectorData = lookupSelector(source, selector);\n updater(recordSourceSelectorProxy, selectorData);\n }\n\n var idsMarkedForInvalidation = recordSourceProxy.getIDsMarkedForInvalidation();\n\n this._store.publish(source, idsMarkedForInvalidation);\n\n return recordSourceProxy.isStoreMarkedForInvalidation();\n }\n /**\n * _commitData will return a boolean indicating if any of\n * the pending commits caused the store to be globally invalidated.\n */\n ;\n\n _proto._commitData = function _commitData() {\n var _this2 = this;\n\n if (!this._pendingData.size) {\n return false;\n }\n\n var invalidatedStore = false;\n\n this._pendingData.forEach(function (data) {\n if (data.kind === 'payload') {\n var payloadInvalidatedStore = _this2._publishSourceFromPayload(data);\n\n invalidatedStore = invalidatedStore || payloadInvalidatedStore;\n } else if (data.kind === 'source') {\n var source = data.source;\n\n _this2._store.publish(source);\n } else {\n var updater = data.updater;\n var sink = RelayRecordSource.create();\n var mutator = new RelayRecordSourceMutator(_this2._store.getSource(), sink);\n var recordSourceProxy = new RelayRecordSourceProxy(mutator, _this2._getDataID);\n applyWithGuard(updater, null, [recordSourceProxy], null, 'RelayPublishQueue:commitData');\n invalidatedStore = invalidatedStore || recordSourceProxy.isStoreMarkedForInvalidation();\n var idsMarkedForInvalidation = recordSourceProxy.getIDsMarkedForInvalidation();\n\n _this2._store.publish(sink, idsMarkedForInvalidation);\n }\n });\n\n this._pendingData.clear();\n\n return invalidatedStore;\n }\n /**\n * Note that unlike _commitData, _applyUpdates will NOT return a boolean\n * indicating if the store was globally invalidated, since invalidating the\n * store during an optimistic update is a no-op.\n */\n ;\n\n _proto._applyUpdates = function _applyUpdates() {\n var _this3 = this;\n\n var sink = RelayRecordSource.create();\n var mutator = new RelayRecordSourceMutator(this._store.getSource(), sink);\n var recordSourceProxy = new RelayRecordSourceProxy(mutator, this._getDataID, this._handlerProvider);\n\n var processUpdate = function processUpdate(optimisticUpdate) {\n if (optimisticUpdate.storeUpdater) {\n var storeUpdater = optimisticUpdate.storeUpdater;\n applyWithGuard(storeUpdater, null, [recordSourceProxy], null, 'RelayPublishQueue:applyUpdates');\n } else {\n var operation = optimisticUpdate.operation,\n payload = optimisticUpdate.payload,\n updater = optimisticUpdate.updater;\n var source = payload.source,\n fieldPayloads = payload.fieldPayloads;\n var recordSourceSelectorProxy = new RelayRecordSourceSelectorProxy(mutator, recordSourceProxy, operation.fragment);\n var selectorData;\n\n if (source) {\n recordSourceProxy.publishSource(source, fieldPayloads);\n selectorData = lookupSelector(source, operation.fragment);\n }\n\n if (updater) {\n applyWithGuard(updater, null, [recordSourceSelectorProxy, selectorData], null, 'RelayPublishQueue:applyUpdates');\n }\n }\n }; // rerun all updaters in case we are running a rebase\n\n\n if (this._pendingBackupRebase && this._appliedOptimisticUpdates.size) {\n this._appliedOptimisticUpdates.forEach(processUpdate);\n } // apply any new updaters\n\n\n if (this._pendingOptimisticUpdates.size) {\n this._pendingOptimisticUpdates.forEach(function (optimisticUpdate) {\n processUpdate(optimisticUpdate);\n\n _this3._appliedOptimisticUpdates.add(optimisticUpdate);\n });\n\n this._pendingOptimisticUpdates.clear();\n }\n\n this._store.publish(sink);\n };\n\n return RelayPublishQueue;\n}();\n\nfunction lookupSelector(source, selector) {\n var selectorData = RelayReader.read(source, selector).data;\n\n if (process.env.NODE_ENV !== \"production\") {\n var deepFreeze = require('../util/deepFreeze');\n\n if (selectorData) {\n deepFreeze(selectorData);\n }\n }\n\n return selectorData;\n}\n\nmodule.exports = RelayPublishQueue;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n/**\n * Determine if a given value is an object that implements the `Environment`\n * interface defined in `RelayStoreTypes`.\n *\n * Use a sigil for detection to avoid a realm-specific instanceof check, and to\n * aid in module tree-shaking to avoid requiring all of RelayRuntime just to\n * detect its environment.\n */\n\nfunction isRelayModernEnvironment(environment) {\n return Boolean(environment && environment['@@RelayModernEnvironment']);\n}\n\nmodule.exports = isRelayModernEnvironment;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar PREFIX = 'client:__type:';\nvar TYPE_SCHEMA_TYPE = '__TypeSchema';\n\nfunction generateTypeID(typeName) {\n return PREFIX + typeName;\n}\n\nfunction isTypeID(id) {\n return id.indexOf(PREFIX) === 0;\n}\n\nmodule.exports = {\n generateTypeID: generateTypeID,\n isTypeID: isTypeID,\n TYPE_SCHEMA_TYPE: TYPE_SCHEMA_TYPE\n};","/**\n * Relay v11.0.2\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nmodule.exports = require('./lib/index.js');\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar invariant = require('invariant');\n\nvar stableCopy = require('./stableCopy');\n\n/**\n * Returns a stable identifier for the given pair of `RequestParameters` +\n * variables.\n */\nfunction getRequestIdentifier(parameters, variables) {\n var requestID = parameters.cacheID != null ? parameters.cacheID : parameters.id;\n !(requestID != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'getRequestIdentifier: Expected request `%s` to have either a ' + 'valid `id` or `cacheID` property', parameters.name) : invariant(false) : void 0;\n return requestID + JSON.stringify(stableCopy(variables));\n}\n\nmodule.exports = getRequestIdentifier;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n/**\n * @private\n */\n\nfunction createError(type, name, messageFormat) {\n for (var _len = arguments.length, messageParams = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n messageParams[_key - 3] = arguments[_key];\n }\n\n var index = 0;\n var message = messageFormat.replace(/%s/g, function () {\n return String(messageParams[index++]);\n });\n var err = new Error(message);\n var error = Object.assign(err, {\n name: name,\n messageFormat: messageFormat,\n messageParams: messageParams,\n type: type,\n taalOpcodes: [2, 2] // skip frame (code=2) twice\n\n }); // In V8, Error objects keep the closure scope chain alive until the\n // err.stack property is accessed.\n\n if (error.stack === undefined) {\n // IE sets the stack only if error is thrown\n try {\n throw error;\n } catch (_unused) {}\n }\n\n return error;\n}\n\nmodule.exports = {\n create: function create(name, messageFormat) {\n for (var _len2 = arguments.length, messageParams = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n messageParams[_key2 - 2] = arguments[_key2];\n }\n\n return createError.apply(void 0, ['error', name, messageFormat].concat(messageParams));\n },\n createWarning: function createWarning(name, messageFormat) {\n for (var _len3 = arguments.length, messageParams = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n messageParams[_key3 - 2] = arguments[_key3];\n }\n\n return createError.apply(void 0, ['warn', name, messageFormat].concat(messageParams));\n }\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar CONNECTION_CALLS = {\n after: true,\n before: true,\n find: true,\n first: true,\n last: true,\n surrounds: true\n};\nvar config = {\n CLIENT_MUTATION_ID: 'clientMutationId',\n CURSOR: 'cursor',\n EDGES: 'edges',\n END_CURSOR: 'endCursor',\n HAS_NEXT_PAGE: 'hasNextPage',\n HAS_PREV_PAGE: 'hasPreviousPage',\n NODE: 'node',\n PAGE_INFO_TYPE: 'PageInfo',\n PAGE_INFO: 'pageInfo',\n START_CURSOR: 'startCursor'\n};\n/**\n * @internal\n *\n * Defines logic relevant to the informal \"Connection\" GraphQL interface.\n */\n\nvar ConnectionInterface = {\n inject: function inject(newConfig) {\n config = newConfig;\n },\n get: function get() {\n return config;\n },\n\n /**\n * Checks whether a call exists strictly to encode which parts of a connection\n * to fetch. Fields that only differ by connection call values should have the\n * same identity.\n */\n isConnectionCall: function isConnectionCall(call) {\n return CONNECTION_CALLS.hasOwnProperty(call.name);\n }\n};\nmodule.exports = ConnectionInterface;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar RelayRecordSource = require('./RelayRecordSource');\n\nvar UNPUBLISH_RECORD_SENTINEL = Object.freeze({\n __UNPUBLISH_RECORD_SENTINEL: true\n});\n/**\n * An implementation of MutableRecordSource that represents a base RecordSource\n * with optimistic updates stacked on top: records with optimistic updates\n * shadow the base version of the record rather than updating/replacing them.\n */\n\nvar RelayOptimisticRecordSource = /*#__PURE__*/function () {\n function RelayOptimisticRecordSource(base) {\n this._base = base;\n this._sink = RelayRecordSource.create();\n }\n\n var _proto = RelayOptimisticRecordSource.prototype;\n\n _proto.has = function has(dataID) {\n if (this._sink.has(dataID)) {\n var sinkRecord = this._sink.get(dataID);\n\n return sinkRecord !== UNPUBLISH_RECORD_SENTINEL;\n } else {\n return this._base.has(dataID);\n }\n };\n\n _proto.get = function get(dataID) {\n if (this._sink.has(dataID)) {\n var sinkRecord = this._sink.get(dataID);\n\n if (sinkRecord === UNPUBLISH_RECORD_SENTINEL) {\n return undefined;\n } else {\n return sinkRecord;\n }\n } else {\n return this._base.get(dataID);\n }\n };\n\n _proto.getStatus = function getStatus(dataID) {\n var record = this.get(dataID);\n\n if (record === undefined) {\n return 'UNKNOWN';\n } else if (record === null) {\n return 'NONEXISTENT';\n } else {\n return 'EXISTENT';\n }\n };\n\n _proto.clear = function clear() {\n this._base = RelayRecordSource.create();\n\n this._sink.clear();\n };\n\n _proto[\"delete\"] = function _delete(dataID) {\n this._sink[\"delete\"](dataID);\n };\n\n _proto.remove = function remove(dataID) {\n this._sink.set(dataID, UNPUBLISH_RECORD_SENTINEL);\n };\n\n _proto.set = function set(dataID, record) {\n this._sink.set(dataID, record);\n };\n\n _proto.getRecordIDs = function getRecordIDs() {\n return Object.keys(this.toJSON());\n };\n\n _proto.size = function size() {\n return Object.keys(this.toJSON()).length;\n };\n\n _proto.toJSON = function toJSON() {\n var _this = this;\n\n var merged = (0, _objectSpread2[\"default\"])({}, this._base.toJSON());\n\n this._sink.getRecordIDs().forEach(function (dataID) {\n var record = _this.get(dataID);\n\n if (record === undefined) {\n delete merged[dataID];\n } else {\n merged[dataID] = record;\n }\n });\n\n return merged;\n };\n\n return RelayOptimisticRecordSource;\n}();\n\nfunction create(base) {\n return new RelayOptimisticRecordSource(base);\n}\n\nmodule.exports = {\n create: create\n};","import { RequestParameters } from 'relay-runtime/lib/util/RelayConcreteNode'\nimport { Variables } from 'relay-runtime/lib/util/RelayRuntimeTypes'\nimport { getUrl } from '@/constant'\n\nexport const fetchGraphQL = async (\n request: RequestParameters,\n variables: Variables\n): Promise => {\n const response = await fetch(getUrl(), {\n method: 'POST',\n credentials: 'include', // Necessary to send auth cookies\n headers: {\n Accept: 'application/json',\n 'Content-type': 'application/json',\n },\n body: JSON.stringify({\n query: request.text,\n variables,\n }),\n })\n\n const data = await response.json()\n\n return data\n}\n","import createEnvironment from './client'\n\nexport default createEnvironment\n","import { Environment, Network, RecordSource, Store, IEnvironment } from 'relay-runtime'\nimport { RequestParameters } from 'relay-runtime/lib/util/RelayConcreteNode'\nimport { Variables } from 'relay-runtime/lib/util/RelayRuntimeTypes'\nimport { fetchGraphQL } from './fetchGraphQL'\n\nconst createEnvironment = (): IEnvironment => {\n const handler = (request: RequestParameters, variables: Variables) =>\n fetchGraphQL(request, variables)\n const network = Network.create(handler)\n\n const env = new Environment({\n network,\n store: new Store(new RecordSource()),\n })\n return env\n}\n\nexport default createEnvironment\n","import { extendTheme } from '@chakra-ui/react'\n// Global style overrides\nimport styles from './styles'\nimport colors from './colors'\nimport fonts from './fonts'\n// Foundational style overrides\n// import borders from \"./foundations/borders\";\n// Component style overrides\n\nimport Button from './components/button'\nimport Text from './components/text'\nimport Checkbox from './components/checkbox'\n\nconst overrides = {\n styles,\n colors,\n fonts,\n // borders,\n // Other foundational style overrides go here\n components: {\n Button,\n Text,\n Checkbox,\n // Other components go here\n },\n}\nexport default extendTheme(overrides)\n","export default {\n global: {\n // styles for the `body`\n body: {\n bg: 'gray.100',\n color: 'grey.900',\n minWidth: 'fit-content',\n },\n // styles for the `a`\n a: {\n color: 'grey.900',\n _hover: {\n textDecoration: 'underline',\n },\n },\n },\n}\n","export default {\n transparent: 'transparent',\n black: '#000',\n white: '#fff',\n grey: {\n 50: '#f9f9f9',\n 100: '#D7D7D7',\n 300: '#757575',\n 400: '#4d4d4d',\n 900: '#212121',\n },\n red: {\n 50: '#FFF4F6',\n 400: '#DF3550',\n },\n blue: {\n 100: '#EFF6FE',\n 200: '#D9E3ED',\n 400: '#C9E2FA',\n 500: '#0B8CDB',\n 800: '#005587',\n 900: '#004b78',\n },\n orange: {\n 900: '#DE9629',\n },\n yellow: {\n 400: '#FFEA30',\n },\n green: {\n 50: '#ECF4ED',\n 400: '#48AD51',\n },\n teal: {\n 400: '#00877F',\n },\n}\n","export default {\n body: \"'GothamRounded-Medium', Helvetica, Arial, sans-serif\",\n heading: \"'GothamRounded-Bold', Helvetica,Arial, sans-serif\",\n mono: \"'GothamRounded-Book', monospace\",\n digit: \"'GothamRounded-Light', Helvetica, Arial, sans-serif\",\n}\n","export default {\n // 1. We can update the base styles\n baseStyle: {\n fontWeight: 'bold', // Normally, it is \"semibold\"\n },\n // 2. We can add a new button size or extend existing\n sizes: {\n md: {\n fontSize: 'sm',\n },\n },\n // 3. We can add a new visual variant\n variants: {\n // \"with-shadow\": {\n // bg: \"red.400\",\n // boxShadow: \"0 0 2px 2px #efdfde\",\n // },\n // // 4. We can override existing variants\n // solid: (props) => ({\n // bg: props.colorMode === \"dark\" ? \"red.300\" : \"red.500\",\n // }),\n },\n defaultProps: {\n size: 'md',\n colorScheme: 'blue',\n },\n}\n","export default {\n defaultProps: {\n colorScheme: 'black',\n },\n}\n","export default {\n baseStyle: {\n control: {\n padding: 1,\n _checked: {\n bg: 'blue.800',\n },\n },\n },\n}\n","import NextPageTracking from '@/NextPageTracking'\nimport { init } from '@/sentry'\nimport { Global } from '@emotion/react'\nimport { ChakraProvider, Container } from '@packages/ui-components'\nimport { AppProps } from 'next/app'\nimport 'react-datepicker/dist/react-datepicker.css'\nimport { RelayEnvironmentProvider } from 'react-relay'\nimport '../components/Forms/date-picker.css'\nimport createEnvironment from '../relay/createEnvironment'\nimport fonts from '../styles/font-face'\nimport '../styles/ios-fix.css'\nimport theme from '../theme'\n\ninit()\n\nconst App = ({ children }: { children: React.ReactNode }) => {\n const Environment = createEnvironment()\n /* @ts-expect-error - environment type off */\n return {children}\n}\n\nfunction MyLifetimeContainer({ Component, pageProps }: AppProps) {\n return (\n \n \n \n \n \n \n \n \n \n )\n}\n\nexport default MyLifetimeContainer\n","export default `\n @font-face {\n font-family: 'GothamRounded-Light';\n font-style: normal;\n font-weight: normal;\n font-display: swap;\n src: url(/fonts/Gotham-Rounded-Light.woff) format('woff');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n @font-face {\n font-family: 'GothamRounded-Book';\n font-style: normal;\n font-weight: normal;\n font-display: swap;\n src: url(/fonts/Gotham-Rounded-Book.woff) format('woff');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n @font-face {\n font-family: 'GothamRounded-Medium';\n font-style: normal;\n font-weight: normal;\n font-display: swap;\n src: url(/fonts/Gotham-Rounded-Medium.woff) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n\n }\n @font-face {\n font-family: 'GothamRounded-Bold';\n font-style: normal;\n font-weight: bold;\n font-display: swap;\n src: url(/fonts/Gotham-Rounded-Bold.woff) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n `\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar RelayModernFragmentSpecResolver = require('./RelayModernFragmentSpecResolver');\n\nvar warning = require(\"fbjs/lib/warning\");\n\nfunction createFragmentSpecResolver(context, containerName, fragments, props, rootIsQueryRenderer, callback) {\n if (process.env.NODE_ENV !== \"production\") {\n var fragmentNames = Object.keys(fragments);\n fragmentNames.forEach(function (fragmentName) {\n var propValue = props[fragmentName];\n process.env.NODE_ENV !== \"production\" ? warning(propValue !== undefined, 'createFragmentSpecResolver: Expected prop `%s` to be supplied to `%s`, but ' + 'got `undefined`. Pass an explicit `null` if this is intentional.', fragmentName, containerName) : void 0;\n });\n }\n\n return new RelayModernFragmentSpecResolver(context, fragments, props, callback, rootIsQueryRenderer);\n}\n\nmodule.exports = createFragmentSpecResolver;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar RelayModernRecord = require('../store/RelayModernRecord');\n\nvar RelayRecordProxy = require('./RelayRecordProxy');\n\nvar invariant = require('invariant');\n\nvar _require = require('../store/RelayRecordState'),\n EXISTENT = _require.EXISTENT,\n NONEXISTENT = _require.NONEXISTENT;\n\nvar _require2 = require('../store/RelayStoreUtils'),\n ROOT_ID = _require2.ROOT_ID,\n ROOT_TYPE = _require2.ROOT_TYPE;\n\n/**\n * @internal\n *\n * A helper for manipulating a `RecordSource` via an imperative/OO-style API.\n */\nvar RelayRecordSourceProxy = /*#__PURE__*/function () {\n function RelayRecordSourceProxy(mutator, getDataID, handlerProvider) {\n this.__mutator = mutator;\n this._handlerProvider = handlerProvider || null;\n this._proxies = {};\n this._getDataID = getDataID;\n this._invalidatedStore = false;\n this._idsMarkedForInvalidation = new Set();\n }\n\n var _proto = RelayRecordSourceProxy.prototype;\n\n _proto.publishSource = function publishSource(source, fieldPayloads) {\n var _this = this;\n\n var dataIDs = source.getRecordIDs();\n dataIDs.forEach(function (dataID) {\n var status = source.getStatus(dataID);\n\n if (status === EXISTENT) {\n var sourceRecord = source.get(dataID);\n\n if (sourceRecord) {\n if (_this.__mutator.getStatus(dataID) !== EXISTENT) {\n _this.create(dataID, RelayModernRecord.getType(sourceRecord));\n }\n\n _this.__mutator.copyFieldsFromRecord(sourceRecord, dataID);\n }\n } else if (status === NONEXISTENT) {\n _this[\"delete\"](dataID);\n }\n });\n\n if (fieldPayloads && fieldPayloads.length) {\n fieldPayloads.forEach(function (fieldPayload) {\n var handler = _this._handlerProvider && _this._handlerProvider(fieldPayload.handle);\n\n !handler ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected a handler to be provided for handle `%s`.', fieldPayload.handle) : invariant(false) : void 0;\n handler.update(_this, fieldPayload);\n });\n }\n };\n\n _proto.create = function create(dataID, typeName) {\n this.__mutator.create(dataID, typeName);\n\n delete this._proxies[dataID];\n var record = this.get(dataID); // For flow\n\n !record ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayRecordSourceProxy#create(): Expected the created record to exist.') : invariant(false) : void 0;\n return record;\n };\n\n _proto[\"delete\"] = function _delete(dataID) {\n !(dataID !== ROOT_ID) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayRecordSourceProxy#delete(): Cannot delete the root record.') : invariant(false) : void 0;\n delete this._proxies[dataID];\n\n this.__mutator[\"delete\"](dataID);\n };\n\n _proto.get = function get(dataID) {\n if (!this._proxies.hasOwnProperty(dataID)) {\n var status = this.__mutator.getStatus(dataID);\n\n if (status === EXISTENT) {\n this._proxies[dataID] = new RelayRecordProxy(this, this.__mutator, dataID);\n } else {\n this._proxies[dataID] = status === NONEXISTENT ? null : undefined;\n }\n }\n\n return this._proxies[dataID];\n };\n\n _proto.getRoot = function getRoot() {\n var root = this.get(ROOT_ID);\n\n if (!root) {\n root = this.create(ROOT_ID, ROOT_TYPE);\n }\n\n !(root && root.getType() === ROOT_TYPE) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayRecordSourceProxy#getRoot(): Expected the source to contain a ' + 'root record, %s.', root == null ? 'no root record found' : \"found a root record of type `\".concat(root.getType(), \"`\")) : invariant(false) : void 0;\n return root;\n };\n\n _proto.invalidateStore = function invalidateStore() {\n this._invalidatedStore = true;\n };\n\n _proto.isStoreMarkedForInvalidation = function isStoreMarkedForInvalidation() {\n return this._invalidatedStore;\n };\n\n _proto.markIDForInvalidation = function markIDForInvalidation(dataID) {\n this._idsMarkedForInvalidation.add(dataID);\n };\n\n _proto.getIDsMarkedForInvalidation = function getIDsMarkedForInvalidation() {\n return this._idsMarkedForInvalidation;\n };\n\n return RelayRecordSourceProxy;\n}();\n\nmodule.exports = RelayRecordSourceProxy;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n * @emails oncall+relay\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar _createForOfIteratorHelper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createForOfIteratorHelper\"));\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\nvar RelayError = require('../util/RelayError');\n\nvar RelayFeatureFlags = require('../util/RelayFeatureFlags');\n\nvar RelayModernRecord = require('./RelayModernRecord');\n\nvar RelayObservable = require('../network/RelayObservable');\n\nvar RelayRecordSource = require('./RelayRecordSource');\n\nvar RelayResponseNormalizer = require('./RelayResponseNormalizer');\n\nvar getOperation = require('../util/getOperation');\n\nvar invariant = require('invariant');\n\nvar stableCopy = require('../util/stableCopy');\n\nvar warning = require(\"fbjs/lib/warning\");\n\nvar _require = require('./ClientID'),\n generateClientID = _require.generateClientID,\n generateUniqueClientID = _require.generateUniqueClientID;\n\nvar _require2 = require('./RelayModernSelector'),\n createNormalizationSelector = _require2.createNormalizationSelector,\n createReaderSelector = _require2.createReaderSelector;\n\nvar _require3 = require('./RelayStoreUtils'),\n ROOT_TYPE = _require3.ROOT_TYPE,\n TYPENAME_KEY = _require3.TYPENAME_KEY,\n getStorageKey = _require3.getStorageKey;\n\nfunction execute(config) {\n return new Executor(config);\n}\n/**\n * Coordinates the execution of a query, handling network callbacks\n * including optimistic payloads, standard payloads, resolution of match\n * dependencies, etc.\n */\n\n\nvar Executor = /*#__PURE__*/function () {\n function Executor(_ref) {\n var _this = this;\n\n var operation = _ref.operation,\n operationExecutions = _ref.operationExecutions,\n operationLoader = _ref.operationLoader,\n optimisticConfig = _ref.optimisticConfig,\n publishQueue = _ref.publishQueue,\n scheduler = _ref.scheduler,\n sink = _ref.sink,\n source = _ref.source,\n store = _ref.store,\n updater = _ref.updater,\n operationTracker = _ref.operationTracker,\n treatMissingFieldsAsNull = _ref.treatMissingFieldsAsNull,\n getDataID = _ref.getDataID,\n isClientPayload = _ref.isClientPayload,\n reactFlightPayloadDeserializer = _ref.reactFlightPayloadDeserializer,\n reactFlightServerErrorHandler = _ref.reactFlightServerErrorHandler,\n shouldProcessClientComponents = _ref.shouldProcessClientComponents;\n this._getDataID = getDataID;\n this._treatMissingFieldsAsNull = treatMissingFieldsAsNull;\n this._incrementalPayloadsPending = false;\n this._incrementalResults = new Map();\n this._nextSubscriptionId = 0;\n this._operation = operation;\n this._operationExecutions = operationExecutions;\n this._operationLoader = operationLoader;\n this._operationTracker = operationTracker;\n this._operationUpdateEpochs = new Map();\n this._optimisticUpdates = null;\n this._pendingModulePayloadsCount = 0;\n this._publishQueue = publishQueue;\n this._scheduler = scheduler;\n this._sink = sink;\n this._source = new Map();\n this._state = 'started';\n this._store = store;\n this._subscriptions = new Map();\n this._updater = updater;\n this._isClientPayload = isClientPayload === true;\n this._reactFlightPayloadDeserializer = reactFlightPayloadDeserializer;\n this._reactFlightServerErrorHandler = reactFlightServerErrorHandler;\n this._isSubscriptionOperation = this._operation.request.node.params.operationKind === 'subscription';\n this._shouldProcessClientComponents = shouldProcessClientComponents;\n var id = this._nextSubscriptionId++;\n source.subscribe({\n complete: function complete() {\n return _this._complete(id);\n },\n error: function error(_error2) {\n return _this._error(_error2);\n },\n next: function next(response) {\n try {\n _this._next(id, response);\n } catch (error) {\n sink.error(error);\n }\n },\n start: function start(subscription) {\n return _this._start(id, subscription);\n }\n });\n\n if (optimisticConfig != null) {\n this._processOptimisticResponse(optimisticConfig.response != null ? {\n data: optimisticConfig.response\n } : null, optimisticConfig.updater, false);\n }\n } // Cancel any pending execution tasks and mark the executor as completed.\n\n\n var _proto = Executor.prototype;\n\n _proto.cancel = function cancel() {\n var _this2 = this;\n\n if (this._state === 'completed') {\n return;\n }\n\n this._state = 'completed';\n\n this._operationExecutions[\"delete\"](this._operation.request.identifier);\n\n if (this._subscriptions.size !== 0) {\n this._subscriptions.forEach(function (sub) {\n return sub.unsubscribe();\n });\n\n this._subscriptions.clear();\n }\n\n var optimisticUpdates = this._optimisticUpdates;\n\n if (optimisticUpdates !== null) {\n this._optimisticUpdates = null;\n optimisticUpdates.forEach(function (update) {\n return _this2._publishQueue.revertUpdate(update);\n }); // OK: run revert on cancel\n\n this._publishQueue.run();\n }\n\n this._incrementalResults.clear();\n\n this._completeOperationTracker();\n\n if (this._retainDisposable) {\n this._retainDisposable.dispose();\n\n this._retainDisposable = null;\n }\n };\n\n _proto._updateActiveState = function _updateActiveState() {\n var activeState;\n\n switch (this._state) {\n case 'started':\n {\n activeState = 'active';\n break;\n }\n\n case 'loading_incremental':\n {\n activeState = 'active';\n break;\n }\n\n case 'completed':\n {\n activeState = 'inactive';\n break;\n }\n\n case 'loading_final':\n {\n activeState = this._pendingModulePayloadsCount > 0 ? 'active' : 'inactive';\n break;\n }\n\n default:\n this._state;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'OperationExecutor: invalid executor state.') : invariant(false) : void 0;\n }\n\n this._operationExecutions.set(this._operation.request.identifier, activeState);\n };\n\n _proto._schedule = function _schedule(task) {\n var _this3 = this;\n\n var scheduler = this._scheduler;\n\n if (scheduler != null) {\n var _id2 = this._nextSubscriptionId++;\n\n RelayObservable.create(function (sink) {\n var cancellationToken = scheduler.schedule(function () {\n try {\n task();\n sink.complete();\n } catch (error) {\n sink.error(error);\n }\n });\n return function () {\n return scheduler.cancel(cancellationToken);\n };\n }).subscribe({\n complete: function complete() {\n return _this3._complete(_id2);\n },\n error: function error(_error3) {\n return _this3._error(_error3);\n },\n start: function start(subscription) {\n return _this3._start(_id2, subscription);\n }\n });\n } else {\n task();\n }\n };\n\n _proto._complete = function _complete(id) {\n this._subscriptions[\"delete\"](id);\n\n if (this._subscriptions.size === 0) {\n this.cancel();\n\n this._sink.complete();\n }\n };\n\n _proto._error = function _error(error) {\n this.cancel();\n\n this._sink.error(error);\n };\n\n _proto._start = function _start(id, subscription) {\n this._subscriptions.set(id, subscription);\n\n this._updateActiveState();\n } // Handle a raw GraphQL response.\n ;\n\n _proto._next = function _next(_id, response) {\n var _this4 = this;\n\n this._schedule(function () {\n _this4._handleNext(response);\n\n _this4._maybeCompleteSubscriptionOperationTracking();\n });\n };\n\n _proto._handleErrorResponse = function _handleErrorResponse(responses) {\n var _this5 = this;\n\n var results = [];\n responses.forEach(function (response) {\n if (response.data === null && response.extensions != null && !response.hasOwnProperty('errors')) {\n // Skip extensions-only payloads\n return;\n } else if (response.data == null) {\n // Error if any other payload in the batch is missing data, regardless of whether\n // it had `errors` or not.\n var errors = response.hasOwnProperty('errors') && response.errors != null ? response.errors : null;\n var messages = errors ? errors.map(function (_ref2) {\n var message = _ref2.message;\n return message;\n }).join('\\n') : '(No errors)';\n var error = RelayError.create('RelayNetwork', 'No data returned for operation `' + _this5._operation.request.node.params.name + '`, got error(s):\\n' + messages + '\\n\\nSee the error `source` property for more information.');\n error.source = {\n errors: errors,\n operation: _this5._operation.request.node,\n variables: _this5._operation.request.variables\n }; // In V8, Error objects keep the closure scope chain alive until the\n // err.stack property is accessed.\n\n error.stack;\n throw error;\n } else {\n var responseWithData = response;\n results.push(responseWithData);\n }\n });\n return results;\n }\n /**\n * This method return boolean to indicate if the optimistic\n * response has been handled\n */\n ;\n\n _proto._handleOptimisticResponses = function _handleOptimisticResponses(responses) {\n var _response$extensions;\n\n if (responses.length > 1) {\n if (responses.some(function (responsePart) {\n var _responsePart$extensi;\n\n return ((_responsePart$extensi = responsePart.extensions) === null || _responsePart$extensi === void 0 ? void 0 : _responsePart$extensi.isOptimistic) === true;\n })) {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Optimistic responses cannot be batched.') : invariant(false) : void 0;\n }\n\n return false;\n }\n\n var response = responses[0];\n var isOptimistic = ((_response$extensions = response.extensions) === null || _response$extensions === void 0 ? void 0 : _response$extensions.isOptimistic) === true;\n\n if (isOptimistic && this._state !== 'started') {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'OperationExecutor: optimistic payload received after server payload.') : invariant(false) : void 0;\n }\n\n if (isOptimistic) {\n this._processOptimisticResponse(response, null, this._treatMissingFieldsAsNull);\n\n this._sink.next(response);\n\n return true;\n }\n\n return false;\n };\n\n _proto._handleNext = function _handleNext(response) {\n if (this._state === 'completed') {\n return;\n }\n\n var responses = Array.isArray(response) ? response : [response];\n\n var responsesWithData = this._handleErrorResponse(responses);\n\n if (responsesWithData.length === 0) {\n // no results with data, nothing to process\n // this can occur with extensions-only payloads\n var isFinal = responses.some(function (x) {\n var _x$extensions;\n\n return ((_x$extensions = x.extensions) === null || _x$extensions === void 0 ? void 0 : _x$extensions.is_final) === true;\n });\n\n if (isFinal) {\n this._state = 'loading_final';\n\n this._updateActiveState();\n\n this._incrementalPayloadsPending = false;\n }\n\n this._sink.next(response);\n\n return;\n } // Next, handle optimistic responses\n\n\n var isOptimistic = this._handleOptimisticResponses(responsesWithData);\n\n if (isOptimistic) {\n return;\n }\n\n var _partitionGraphQLResp = partitionGraphQLResponses(responsesWithData),\n nonIncrementalResponses = _partitionGraphQLResp[0],\n incrementalResponses = _partitionGraphQLResp[1];\n\n var hasNonIncrementalResponses = nonIncrementalResponses.length > 0; // In theory this doesn't preserve the ordering of the batch.\n // The idea is that a batch is always:\n // * at most one non-incremental payload\n // * followed by zero or more incremental payloads\n // The non-incremental payload can appear if the server sends a batch\n // with the initial payload followed by some early-to-resolve incremental\n // payloads (although, can that even happen?)\n\n if (hasNonIncrementalResponses) {\n var payloadFollowups = this._processResponses(nonIncrementalResponses);\n\n if (!RelayFeatureFlags.ENABLE_BATCHED_STORE_UPDATES) {\n var updatedOwners = this._publishQueue.run(this._operation);\n\n this._updateOperationTracker(updatedOwners);\n }\n\n this._processPayloadFollowups(payloadFollowups);\n\n if (!RelayFeatureFlags.ENABLE_BATCHED_STORE_UPDATES) {\n if (this._incrementalPayloadsPending && !this._retainDisposable) {\n this._retainDisposable = this._store.retain(this._operation);\n }\n }\n }\n\n if (incrementalResponses.length > 0) {\n var _payloadFollowups = this._processIncrementalResponses(incrementalResponses);\n\n if (!RelayFeatureFlags.ENABLE_BATCHED_STORE_UPDATES) {\n // For the incremental case, we're only handling follow-up responses\n // for already initiated operation (and we're not passing it to\n // the run(...) call)\n var _updatedOwners = this._publishQueue.run();\n\n this._updateOperationTracker(_updatedOwners);\n }\n\n this._processPayloadFollowups(_payloadFollowups);\n }\n\n if (this._isSubscriptionOperation && RelayFeatureFlags.ENABLE_UNIQUE_SUBSCRIPTION_ROOT) {\n // We attach the id to allow the `requestSubscription` to read from the store using\n // the current id in its `onNext` callback\n if (responsesWithData[0].extensions == null) {\n // $FlowFixMe[cannot-write]\n responsesWithData[0].extensions = {\n __relay_subscription_root_id: this._operation.fragment.dataID\n };\n } else {\n responsesWithData[0].extensions.__relay_subscription_root_id = this._operation.fragment.dataID;\n }\n }\n\n if (RelayFeatureFlags.ENABLE_BATCHED_STORE_UPDATES) {\n // OK: run once after each new payload\n // If we have non-incremental responses, we passing `this._operation` to\n // the publish queue here, which will later be passed to the store (via\n // notify) to indicate that this operation caused the store to update\n var _updatedOwners2 = this._publishQueue.run(hasNonIncrementalResponses ? this._operation : undefined);\n\n if (hasNonIncrementalResponses) {\n if (this._incrementalPayloadsPending && !this._retainDisposable) {\n this._retainDisposable = this._store.retain(this._operation);\n }\n }\n\n this._updateOperationTracker(_updatedOwners2);\n }\n\n this._sink.next(response);\n };\n\n _proto._processOptimisticResponse = function _processOptimisticResponse(response, updater, treatMissingFieldsAsNull) {\n var _this6 = this;\n\n !(this._optimisticUpdates === null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'environment.execute: only support one optimistic response per ' + 'execute.') : invariant(false) : void 0;\n\n if (response == null && updater == null) {\n return;\n }\n\n var optimisticUpdates = [];\n\n if (response) {\n var payload = normalizeResponse(response, this._operation.root, ROOT_TYPE, {\n getDataID: this._getDataID,\n path: [],\n reactFlightPayloadDeserializer: this._reactFlightPayloadDeserializer,\n reactFlightServerErrorHandler: this._reactFlightServerErrorHandler,\n shouldProcessClientComponents: this._shouldProcessClientComponents,\n treatMissingFieldsAsNull: treatMissingFieldsAsNull\n });\n validateOptimisticResponsePayload(payload);\n optimisticUpdates.push({\n operation: this._operation,\n payload: payload,\n updater: updater\n });\n\n this._processOptimisticFollowups(payload, optimisticUpdates);\n } else if (updater) {\n optimisticUpdates.push({\n operation: this._operation,\n payload: {\n errors: null,\n fieldPayloads: null,\n incrementalPlaceholders: null,\n moduleImportPayloads: null,\n source: RelayRecordSource.create(),\n isFinal: false\n },\n updater: updater\n });\n }\n\n this._optimisticUpdates = optimisticUpdates;\n optimisticUpdates.forEach(function (update) {\n return _this6._publishQueue.applyUpdate(update);\n }); // OK: only called on construction and when receiving an optimistic payload from network,\n // which doesn't fall-through to the regular next() handling\n\n this._publishQueue.run();\n };\n\n _proto._processOptimisticFollowups = function _processOptimisticFollowups(payload, optimisticUpdates) {\n if (payload.moduleImportPayloads && payload.moduleImportPayloads.length) {\n var moduleImportPayloads = payload.moduleImportPayloads;\n var operationLoader = this._operationLoader;\n !operationLoader ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected an operationLoader to be ' + 'configured when using `@match`.') : invariant(false) : void 0;\n\n var _iterator = (0, _createForOfIteratorHelper2[\"default\"])(moduleImportPayloads),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var moduleImportPayload = _step.value;\n var operation = operationLoader.get(moduleImportPayload.operationReference);\n\n if (operation == null) {\n this._processAsyncOptimisticModuleImport(operationLoader, moduleImportPayload);\n } else {\n var moduleImportOptimisticUpdates = this._processOptimisticModuleImport(operation, moduleImportPayload);\n\n optimisticUpdates.push.apply(optimisticUpdates, (0, _toConsumableArray2[\"default\"])(moduleImportOptimisticUpdates));\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n };\n\n _proto._normalizeModuleImport = function _normalizeModuleImport(moduleImportPayload, operation) {\n var selector = createNormalizationSelector(operation, moduleImportPayload.dataID, moduleImportPayload.variables);\n return normalizeResponse({\n data: moduleImportPayload.data\n }, selector, moduleImportPayload.typeName, {\n getDataID: this._getDataID,\n path: moduleImportPayload.path,\n reactFlightPayloadDeserializer: this._reactFlightPayloadDeserializer,\n reactFlightServerErrorHandler: this._reactFlightServerErrorHandler,\n treatMissingFieldsAsNull: this._treatMissingFieldsAsNull,\n shouldProcessClientComponents: this._shouldProcessClientComponents\n });\n };\n\n _proto._processOptimisticModuleImport = function _processOptimisticModuleImport(normalizationRootNode, moduleImportPayload) {\n var operation = getOperation(normalizationRootNode);\n var optimisticUpdates = [];\n\n var modulePayload = this._normalizeModuleImport(moduleImportPayload, operation);\n\n validateOptimisticResponsePayload(modulePayload);\n optimisticUpdates.push({\n operation: this._operation,\n payload: modulePayload,\n updater: null\n });\n\n this._processOptimisticFollowups(modulePayload, optimisticUpdates);\n\n return optimisticUpdates;\n };\n\n _proto._processAsyncOptimisticModuleImport = function _processAsyncOptimisticModuleImport(operationLoader, moduleImportPayload) {\n var _this7 = this;\n\n operationLoader.load(moduleImportPayload.operationReference).then(function (operation) {\n if (operation == null || _this7._state !== 'started') {\n return;\n }\n\n var moduleImportOptimisticUpdates = _this7._processOptimisticModuleImport(operation, moduleImportPayload);\n\n moduleImportOptimisticUpdates.forEach(function (update) {\n return _this7._publishQueue.applyUpdate(update);\n });\n\n if (_this7._optimisticUpdates == null) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'OperationExecutor: Unexpected ModuleImport optimistic ' + 'update in operation %s.' + _this7._operation.request.node.params.name) : void 0;\n } else {\n var _this$_optimisticUpda;\n\n (_this$_optimisticUpda = _this7._optimisticUpdates).push.apply(_this$_optimisticUpda, (0, _toConsumableArray2[\"default\"])(moduleImportOptimisticUpdates)); // OK: always have to run() after an module import resolves async\n\n\n _this7._publishQueue.run();\n }\n });\n };\n\n _proto._processResponses = function _processResponses(responses) {\n var _this8 = this;\n\n if (this._optimisticUpdates !== null) {\n this._optimisticUpdates.forEach(function (update) {\n return _this8._publishQueue.revertUpdate(update);\n });\n\n this._optimisticUpdates = null;\n }\n\n this._incrementalPayloadsPending = false;\n\n this._incrementalResults.clear();\n\n this._source.clear();\n\n return responses.map(function (payloadPart) {\n var relayPayload = normalizeResponse(payloadPart, _this8._operation.root, ROOT_TYPE, {\n getDataID: _this8._getDataID,\n path: [],\n reactFlightPayloadDeserializer: _this8._reactFlightPayloadDeserializer,\n reactFlightServerErrorHandler: _this8._reactFlightServerErrorHandler,\n treatMissingFieldsAsNull: _this8._treatMissingFieldsAsNull,\n shouldProcessClientComponents: _this8._shouldProcessClientComponents\n });\n\n _this8._publishQueue.commitPayload(_this8._operation, relayPayload, _this8._updater);\n\n return relayPayload;\n });\n }\n /**\n * Handles any follow-up actions for a Relay payload for @match, @defer,\n * and @stream directives.\n */\n ;\n\n _proto._processPayloadFollowups = function _processPayloadFollowups(payloads) {\n var _this9 = this;\n\n if (this._state === 'completed') {\n return;\n }\n\n payloads.forEach(function (payload) {\n var incrementalPlaceholders = payload.incrementalPlaceholders,\n moduleImportPayloads = payload.moduleImportPayloads,\n isFinal = payload.isFinal;\n _this9._state = isFinal ? 'loading_final' : 'loading_incremental';\n\n _this9._updateActiveState();\n\n if (isFinal) {\n _this9._incrementalPayloadsPending = false;\n }\n\n if (moduleImportPayloads && moduleImportPayloads.length !== 0) {\n var operationLoader = _this9._operationLoader;\n !operationLoader ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected an operationLoader to be ' + 'configured when using `@match`.') : invariant(false) : void 0;\n moduleImportPayloads.forEach(function (moduleImportPayload) {\n _this9._processModuleImportPayload(moduleImportPayload, operationLoader);\n });\n }\n\n if (incrementalPlaceholders && incrementalPlaceholders.length !== 0) {\n _this9._incrementalPayloadsPending = _this9._state !== 'loading_final';\n incrementalPlaceholders.forEach(function (incrementalPlaceholder) {\n _this9._processIncrementalPlaceholder(payload, incrementalPlaceholder);\n });\n\n if (_this9._isClientPayload || _this9._state === 'loading_final') {\n // The query has defer/stream selections that are enabled, but either\n // the server indicated that this is a \"final\" payload: no incremental\n // payloads will be delivered, then warn that the query was (likely)\n // executed on the server in non-streaming mode, with incremental\n // delivery disabled; or this is a client payload, and there will be\n // no incremental payload.\n process.env.NODE_ENV !== \"production\" ? warning(_this9._isClientPayload, 'RelayModernEnvironment: Operation `%s` contains @defer/@stream ' + 'directives but was executed in non-streaming mode. See ' + 'https://fburl.com/relay-incremental-delivery-non-streaming-warning.', _this9._operation.request.node.params.name) : void 0; // But eagerly process any deferred payloads\n\n var relayPayloads = [];\n incrementalPlaceholders.forEach(function (placeholder) {\n if (placeholder.kind === 'defer') {\n relayPayloads.push(_this9._processDeferResponse(placeholder.label, placeholder.path, placeholder, {\n data: placeholder.data\n }));\n }\n });\n\n if (relayPayloads.length > 0) {\n if (!RelayFeatureFlags.ENABLE_BATCHED_STORE_UPDATES) {\n var updatedOwners = _this9._publishQueue.run();\n\n _this9._updateOperationTracker(updatedOwners);\n }\n\n _this9._processPayloadFollowups(relayPayloads);\n }\n }\n }\n });\n };\n\n _proto._maybeCompleteSubscriptionOperationTracking = function _maybeCompleteSubscriptionOperationTracking() {\n if (!this._isSubscriptionOperation) {\n return;\n }\n\n if (this._pendingModulePayloadsCount === 0 && this._incrementalPayloadsPending === false) {\n this._completeOperationTracker();\n }\n\n if (RelayFeatureFlags.ENABLE_UNIQUE_SUBSCRIPTION_ROOT) {\n var nextID = generateUniqueClientID();\n this._operation = {\n request: this._operation.request,\n fragment: createReaderSelector(this._operation.fragment.node, nextID, this._operation.fragment.variables, this._operation.fragment.owner),\n root: createNormalizationSelector(this._operation.root.node, nextID, this._operation.root.variables)\n };\n }\n }\n /**\n * Processes a ModuleImportPayload, asynchronously resolving the normalization\n * AST and using it to normalize the field data into a RelayResponsePayload.\n * The resulting payload may contain other incremental payloads (match,\n * defer, stream, etc); these are handled by calling\n * `_processPayloadFollowups()`.\n */\n ;\n\n _proto._processModuleImportPayload = function _processModuleImportPayload(moduleImportPayload, operationLoader) {\n var _this10 = this;\n\n var node = operationLoader.get(moduleImportPayload.operationReference);\n\n if (node != null) {\n var operation = getOperation(node); // If the operation module is available synchronously, normalize the\n // data synchronously.\n\n this._handleModuleImportPayload(moduleImportPayload, operation);\n\n this._maybeCompleteSubscriptionOperationTracking();\n } else {\n // Otherwise load the operation module and schedule a task to normalize\n // the data when the module is available.\n var _id3 = this._nextSubscriptionId++;\n\n this._pendingModulePayloadsCount++;\n\n var decrementPendingCount = function decrementPendingCount() {\n _this10._pendingModulePayloadsCount--;\n\n _this10._maybeCompleteSubscriptionOperationTracking();\n }; // Observable.from(operationLoader.load()) wouldn't catch synchronous\n // errors thrown by the load function, which is user-defined. Guard\n // against that with Observable.from(new Promise()).\n\n\n RelayObservable.from(new Promise(function (resolve, reject) {\n operationLoader.load(moduleImportPayload.operationReference).then(resolve, reject);\n })).map(function (operation) {\n if (operation != null) {\n _this10._schedule(function () {\n _this10._handleModuleImportPayload(moduleImportPayload, getOperation(operation)); // OK: always have to run after an async module import resolves\n\n\n var updatedOwners = _this10._publishQueue.run();\n\n _this10._updateOperationTracker(updatedOwners);\n });\n }\n }).subscribe({\n complete: function complete() {\n _this10._complete(_id3);\n\n decrementPendingCount();\n },\n error: function error(_error4) {\n _this10._error(_error4);\n\n decrementPendingCount();\n },\n start: function start(subscription) {\n return _this10._start(_id3, subscription);\n }\n });\n }\n };\n\n _proto._handleModuleImportPayload = function _handleModuleImportPayload(moduleImportPayload, operation) {\n var relayPayload = this._normalizeModuleImport(moduleImportPayload, operation);\n\n this._publishQueue.commitPayload(this._operation, relayPayload);\n\n if (!RelayFeatureFlags.ENABLE_BATCHED_STORE_UPDATES) {\n var updatedOwners = this._publishQueue.run();\n\n this._updateOperationTracker(updatedOwners);\n }\n\n this._processPayloadFollowups([relayPayload]);\n }\n /**\n * The executor now knows that GraphQL responses are expected for a given\n * label/path:\n * - Store the placeholder in order to process any future responses that may\n * arrive.\n * - Then process any responses that had already arrived.\n *\n * The placeholder contains the normalization selector, path (for nested\n * defer/stream), and other metadata used to normalize the incremental\n * response(s).\n */\n ;\n\n _proto._processIncrementalPlaceholder = function _processIncrementalPlaceholder(relayPayload, placeholder) {\n var _relayPayload$fieldPa;\n\n // Update the label => path => placeholder map\n var label = placeholder.label,\n path = placeholder.path;\n var pathKey = path.map(String).join('.');\n\n var resultForLabel = this._incrementalResults.get(label);\n\n if (resultForLabel == null) {\n resultForLabel = new Map();\n\n this._incrementalResults.set(label, resultForLabel);\n }\n\n var resultForPath = resultForLabel.get(pathKey);\n var pendingResponses = resultForPath != null && resultForPath.kind === 'response' ? resultForPath.responses : null;\n resultForLabel.set(pathKey, {\n kind: 'placeholder',\n placeholder: placeholder\n }); // Store references to the parent node to allow detecting concurrent\n // modifications to the parent before items arrive and to replay\n // handle field payloads to account for new information on source records.\n\n var parentID;\n\n if (placeholder.kind === 'stream') {\n parentID = placeholder.parentID;\n } else if (placeholder.kind === 'defer') {\n parentID = placeholder.selector.dataID;\n } else {\n placeholder;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Unsupported incremental placeholder kind `%s`.', placeholder.kind) : invariant(false) : void 0;\n }\n\n var parentRecord = relayPayload.source.get(parentID);\n var parentPayloads = ((_relayPayload$fieldPa = relayPayload.fieldPayloads) !== null && _relayPayload$fieldPa !== void 0 ? _relayPayload$fieldPa : []).filter(function (fieldPayload) {\n var fieldID = generateClientID(fieldPayload.dataID, fieldPayload.fieldKey);\n return (// handlers applied to the streamed field itself\n fieldPayload.dataID === parentID || // handlers applied to a field on an ancestor object, where\n // ancestor.field links to the parent record (example: connections)\n fieldID === parentID\n );\n }); // If an incremental payload exists for some id that record should also\n // exist.\n\n !(parentRecord != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected record `%s` to exist.', parentID) : invariant(false) : void 0;\n var nextParentRecord;\n var nextParentPayloads;\n\n var previousParentEntry = this._source.get(parentID);\n\n if (previousParentEntry != null) {\n // If a previous entry exists, merge the previous/next records and\n // payloads together.\n nextParentRecord = RelayModernRecord.update(previousParentEntry.record, parentRecord);\n var handlePayloads = new Map();\n\n var dedupePayload = function dedupePayload(payload) {\n var key = stableStringify(payload);\n handlePayloads.set(key, payload);\n };\n\n previousParentEntry.fieldPayloads.forEach(dedupePayload);\n parentPayloads.forEach(dedupePayload);\n nextParentPayloads = Array.from(handlePayloads.values());\n } else {\n nextParentRecord = parentRecord;\n nextParentPayloads = parentPayloads;\n }\n\n this._source.set(parentID, {\n record: nextParentRecord,\n fieldPayloads: nextParentPayloads\n }); // If there were any queued responses, process them now that placeholders\n // are in place\n\n\n if (pendingResponses != null) {\n var payloadFollowups = this._processIncrementalResponses(pendingResponses);\n\n if (!RelayFeatureFlags.ENABLE_BATCHED_STORE_UPDATES) {\n var updatedOwners = this._publishQueue.run();\n\n this._updateOperationTracker(updatedOwners);\n }\n\n this._processPayloadFollowups(payloadFollowups);\n }\n }\n /**\n * Lookup the placeholder the describes how to process an incremental\n * response, normalize/publish it, and process any nested defer/match/stream\n * metadata.\n */\n ;\n\n _proto._processIncrementalResponses = function _processIncrementalResponses(incrementalResponses) {\n var _this11 = this;\n\n var relayPayloads = [];\n incrementalResponses.forEach(function (incrementalResponse) {\n var label = incrementalResponse.label,\n path = incrementalResponse.path,\n response = incrementalResponse.response;\n\n var resultForLabel = _this11._incrementalResults.get(label);\n\n if (resultForLabel == null) {\n resultForLabel = new Map();\n\n _this11._incrementalResults.set(label, resultForLabel);\n }\n\n if (label.indexOf('$defer$') !== -1) {\n var pathKey = path.map(String).join('.');\n var resultForPath = resultForLabel.get(pathKey);\n\n if (resultForPath == null) {\n resultForPath = {\n kind: 'response',\n responses: [incrementalResponse]\n };\n resultForLabel.set(pathKey, resultForPath);\n return;\n } else if (resultForPath.kind === 'response') {\n resultForPath.responses.push(incrementalResponse);\n return;\n }\n\n var placeholder = resultForPath.placeholder;\n !(placeholder.kind === 'defer') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected data for path `%s` for label `%s` ' + 'to be data for @defer, was `@%s`.', pathKey, label, placeholder.kind) : invariant(false) : void 0;\n relayPayloads.push(_this11._processDeferResponse(label, path, placeholder, response));\n } else {\n // @stream payload path values end in the field name and item index,\n // but Relay records paths relative to the parent of the stream node:\n // therefore we strip the last two elements just to lookup the path\n // (the item index is used later to insert the element in the list)\n var _pathKey = path.slice(0, -2).map(String).join('.');\n\n var _resultForPath = resultForLabel.get(_pathKey);\n\n if (_resultForPath == null) {\n _resultForPath = {\n kind: 'response',\n responses: [incrementalResponse]\n };\n resultForLabel.set(_pathKey, _resultForPath);\n return;\n } else if (_resultForPath.kind === 'response') {\n _resultForPath.responses.push(incrementalResponse);\n\n return;\n }\n\n var _placeholder = _resultForPath.placeholder;\n !(_placeholder.kind === 'stream') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected data for path `%s` for label `%s` ' + 'to be data for @stream, was `@%s`.', _pathKey, label, _placeholder.kind) : invariant(false) : void 0;\n relayPayloads.push(_this11._processStreamResponse(label, path, _placeholder, response));\n }\n });\n return relayPayloads;\n };\n\n _proto._processDeferResponse = function _processDeferResponse(label, path, placeholder, response) {\n var parentID = placeholder.selector.dataID;\n var relayPayload = normalizeResponse(response, placeholder.selector, placeholder.typeName, {\n getDataID: this._getDataID,\n path: placeholder.path,\n reactFlightPayloadDeserializer: this._reactFlightPayloadDeserializer,\n reactFlightServerErrorHandler: this._reactFlightServerErrorHandler,\n treatMissingFieldsAsNull: this._treatMissingFieldsAsNull,\n shouldProcessClientComponents: this._shouldProcessClientComponents\n });\n\n this._publishQueue.commitPayload(this._operation, relayPayload); // Load the version of the parent record from which this incremental data\n // was derived\n\n\n var parentEntry = this._source.get(parentID);\n\n !(parentEntry != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected the parent record `%s` for @defer ' + 'data to exist.', parentID) : invariant(false) : void 0;\n var fieldPayloads = parentEntry.fieldPayloads;\n\n if (fieldPayloads.length !== 0) {\n var _response$extensions2;\n\n var handleFieldsRelayPayload = {\n errors: null,\n fieldPayloads: fieldPayloads,\n incrementalPlaceholders: null,\n moduleImportPayloads: null,\n source: RelayRecordSource.create(),\n isFinal: ((_response$extensions2 = response.extensions) === null || _response$extensions2 === void 0 ? void 0 : _response$extensions2.is_final) === true\n };\n\n this._publishQueue.commitPayload(this._operation, handleFieldsRelayPayload);\n }\n\n return relayPayload;\n }\n /**\n * Process the data for one item in a @stream field.\n */\n ;\n\n _proto._processStreamResponse = function _processStreamResponse(label, path, placeholder, response) {\n var parentID = placeholder.parentID,\n node = placeholder.node,\n variables = placeholder.variables; // Find the LinkedField where @stream was applied\n\n var field = node.selections[0];\n !(field != null && field.kind === 'LinkedField' && field.plural === true) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected @stream to be used on a plural field.') : invariant(false) : void 0;\n\n var _this$_normalizeStrea = this._normalizeStreamItem(response, parentID, field, variables, path, placeholder.path),\n fieldPayloads = _this$_normalizeStrea.fieldPayloads,\n itemID = _this$_normalizeStrea.itemID,\n itemIndex = _this$_normalizeStrea.itemIndex,\n prevIDs = _this$_normalizeStrea.prevIDs,\n relayPayload = _this$_normalizeStrea.relayPayload,\n storageKey = _this$_normalizeStrea.storageKey; // Publish the new item and update the parent record to set\n // field[index] = item *if* the parent record hasn't been concurrently\n // modified.\n\n\n this._publishQueue.commitPayload(this._operation, relayPayload, function (store) {\n var currentParentRecord = store.get(parentID);\n\n if (currentParentRecord == null) {\n // parent has since been deleted, stream data is stale\n return;\n }\n\n var currentItems = currentParentRecord.getLinkedRecords(storageKey);\n\n if (currentItems == null) {\n // field has since been deleted, stream data is stale\n return;\n }\n\n if (currentItems.length !== prevIDs.length || currentItems.some(function (currentItem, index) {\n return prevIDs[index] !== (currentItem && currentItem.getDataID());\n })) {\n // field has been modified by something other than this query,\n // stream data is stale\n return;\n } // parent.field has not been concurrently modified:\n // update `parent.field[index] = item`\n\n\n var nextItems = (0, _toConsumableArray2[\"default\"])(currentItems);\n nextItems[itemIndex] = store.get(itemID);\n currentParentRecord.setLinkedRecords(nextItems, storageKey);\n }); // Now that the parent record has been updated to include the new item,\n // also update any handle fields that are derived from the parent record.\n\n\n if (fieldPayloads.length !== 0) {\n var handleFieldsRelayPayload = {\n errors: null,\n fieldPayloads: fieldPayloads,\n incrementalPlaceholders: null,\n moduleImportPayloads: null,\n source: RelayRecordSource.create(),\n isFinal: false\n };\n\n this._publishQueue.commitPayload(this._operation, handleFieldsRelayPayload);\n }\n\n return relayPayload;\n };\n\n _proto._normalizeStreamItem = function _normalizeStreamItem(response, parentID, field, variables, path, normalizationPath) {\n var _field$alias, _field$concreteType, _this$_getDataID;\n\n var data = response.data;\n !(typeof data === 'object') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected the GraphQL @stream payload `data` ' + 'value to be an object.') : invariant(false) : void 0;\n var responseKey = (_field$alias = field.alias) !== null && _field$alias !== void 0 ? _field$alias : field.name;\n var storageKey = getStorageKey(field, variables); // Load the version of the parent record from which this incremental data\n // was derived\n\n var parentEntry = this._source.get(parentID);\n\n !(parentEntry != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected the parent record `%s` for @stream ' + 'data to exist.', parentID) : invariant(false) : void 0;\n var parentRecord = parentEntry.record,\n fieldPayloads = parentEntry.fieldPayloads; // Load the field value (items) that were created by *this* query executor\n // in order to check if there has been any concurrent modifications by some\n // other operation.\n\n var prevIDs = RelayModernRecord.getLinkedRecordIDs(parentRecord, storageKey);\n !(prevIDs != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected record `%s` to have fetched field ' + '`%s` with @stream.', parentID, field.name) : invariant(false) : void 0; // Determine the index in the field of the new item\n\n var finalPathEntry = path[path.length - 1];\n var itemIndex = parseInt(finalPathEntry, 10);\n !(itemIndex === finalPathEntry && itemIndex >= 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected path for @stream to end in a ' + 'positive integer index, got `%s`', finalPathEntry) : invariant(false) : void 0;\n var typeName = (_field$concreteType = field.concreteType) !== null && _field$concreteType !== void 0 ? _field$concreteType : data[TYPENAME_KEY];\n !(typeof typeName === 'string') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected @stream field `%s` to have a ' + '__typename.', field.name) : invariant(false) : void 0; // Determine the __id of the new item: this must equal the value that would\n // be assigned had the item not been streamed\n\n var itemID = // https://github.com/prettier/prettier/issues/6403\n // prettier-ignore\n ((_this$_getDataID = this._getDataID(data, typeName)) !== null && _this$_getDataID !== void 0 ? _this$_getDataID : prevIDs && prevIDs[itemIndex]) || // Reuse previously generated client IDs\n generateClientID(parentID, storageKey, itemIndex);\n !(typeof itemID === 'string') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernEnvironment: Expected id of elements of field `%s` to ' + 'be strings.', storageKey) : invariant(false) : void 0; // Build a selector to normalize the item data with\n\n var selector = createNormalizationSelector(field, itemID, variables); // Update the cached version of the parent record to reflect the new item:\n // this is used when subsequent stream payloads arrive to see if there\n // have been concurrent modifications to the list\n\n var nextParentRecord = RelayModernRecord.clone(parentRecord);\n var nextIDs = (0, _toConsumableArray2[\"default\"])(prevIDs);\n nextIDs[itemIndex] = itemID;\n RelayModernRecord.setLinkedRecordIDs(nextParentRecord, storageKey, nextIDs);\n\n this._source.set(parentID, {\n record: nextParentRecord,\n fieldPayloads: fieldPayloads\n });\n\n var relayPayload = normalizeResponse(response, selector, typeName, {\n getDataID: this._getDataID,\n path: [].concat((0, _toConsumableArray2[\"default\"])(normalizationPath), [responseKey, String(itemIndex)]),\n reactFlightPayloadDeserializer: this._reactFlightPayloadDeserializer,\n reactFlightServerErrorHandler: this._reactFlightServerErrorHandler,\n treatMissingFieldsAsNull: this._treatMissingFieldsAsNull,\n shouldProcessClientComponents: this._shouldProcessClientComponents\n });\n return {\n fieldPayloads: fieldPayloads,\n itemID: itemID,\n itemIndex: itemIndex,\n prevIDs: prevIDs,\n relayPayload: relayPayload,\n storageKey: storageKey\n };\n };\n\n _proto._updateOperationTracker = function _updateOperationTracker(updatedOwners) {\n if (updatedOwners != null && updatedOwners.length > 0) {\n this._operationTracker.update(this._operation.request, new Set(updatedOwners));\n }\n };\n\n _proto._completeOperationTracker = function _completeOperationTracker() {\n this._operationTracker.complete(this._operation.request);\n };\n\n return Executor;\n}();\n\nfunction partitionGraphQLResponses(responses) {\n var nonIncrementalResponses = [];\n var incrementalResponses = [];\n responses.forEach(function (response) {\n if (response.path != null || response.label != null) {\n var label = response.label,\n path = response.path;\n\n if (label == null || path == null) {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'OperationExecutor: invalid incremental payload, expected ' + '`path` and `label` to either both be null/undefined, or ' + '`path` to be an `Array` and `label` to be a ' + '`string`.') : invariant(false) : void 0;\n }\n\n incrementalResponses.push({\n label: label,\n path: path,\n response: response\n });\n } else {\n nonIncrementalResponses.push(response);\n }\n });\n return [nonIncrementalResponses, incrementalResponses];\n}\n\nfunction normalizeResponse(response, selector, typeName, options) {\n var _response$extensions3;\n\n var data = response.data,\n errors = response.errors;\n var source = RelayRecordSource.create();\n var record = RelayModernRecord.create(selector.dataID, typeName);\n source.set(selector.dataID, record);\n var relayPayload = RelayResponseNormalizer.normalize(source, selector, data, options);\n return (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, relayPayload), {}, {\n errors: errors,\n isFinal: ((_response$extensions3 = response.extensions) === null || _response$extensions3 === void 0 ? void 0 : _response$extensions3.is_final) === true\n });\n}\n\nfunction stableStringify(value) {\n var _JSON$stringify;\n\n return (_JSON$stringify = JSON.stringify(stableCopy(value))) !== null && _JSON$stringify !== void 0 ? _JSON$stringify : ''; // null-check for flow\n}\n\nfunction validateOptimisticResponsePayload(payload) {\n var incrementalPlaceholders = payload.incrementalPlaceholders;\n\n if (incrementalPlaceholders != null && incrementalPlaceholders.length !== 0) {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'OperationExecutor: optimistic responses cannot be returned ' + 'for operations that use incremental data delivery (@defer, ' + '@stream, and @stream_connection).') : invariant(false) : void 0;\n }\n}\n\nmodule.exports = {\n execute: execute\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar RelayDeclarativeMutationConfig = require('./RelayDeclarativeMutationConfig');\n\nvar invariant = require('invariant');\n\nvar isRelayModernEnvironment = require('../store/isRelayModernEnvironment');\n\nvar _require = require('../query/GraphQLTag'),\n getRequest = _require.getRequest;\n\nvar _require2 = require('../store/RelayModernOperationDescriptor'),\n createOperationDescriptor = _require2.createOperationDescriptor;\n\n/**\n * Higher-level helper function to execute a mutation against a specific\n * environment.\n */\nfunction applyOptimisticMutation(environment, config) {\n !isRelayModernEnvironment(environment) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'commitMutation: expected `environment` to be an instance of ' + '`RelayModernEnvironment`.') : invariant(false) : void 0;\n var mutation = getRequest(config.mutation);\n\n if (mutation.params.operationKind !== 'mutation') {\n throw new Error('commitMutation: Expected mutation operation');\n }\n\n var optimisticUpdater = config.optimisticUpdater;\n var configs = config.configs,\n optimisticResponse = config.optimisticResponse,\n variables = config.variables;\n var operation = createOperationDescriptor(mutation, variables);\n\n if (configs) {\n var _RelayDeclarativeMuta = RelayDeclarativeMutationConfig.convert(configs, mutation, optimisticUpdater);\n\n optimisticUpdater = _RelayDeclarativeMuta.optimisticUpdater;\n }\n\n return environment.applyMutation({\n operation: operation,\n response: optimisticResponse,\n updater: optimisticUpdater\n });\n}\n\nmodule.exports = applyOptimisticMutation;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar invariant = require('invariant');\n\nvar stableCopy = require('../util/stableCopy');\n\n/**\n * A cache for storing query responses, featuring:\n * - `get` with TTL\n * - cache size limiting, with least-recently *updated* entries purged first\n */\nvar RelayQueryResponseCache = /*#__PURE__*/function () {\n function RelayQueryResponseCache(_ref) {\n var size = _ref.size,\n ttl = _ref.ttl;\n !(size > 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayQueryResponseCache: Expected the max cache size to be > 0, got ' + '`%s`.', size) : invariant(false) : void 0;\n !(ttl > 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.', ttl) : invariant(false) : void 0;\n this._responses = new Map();\n this._size = size;\n this._ttl = ttl;\n }\n\n var _proto = RelayQueryResponseCache.prototype;\n\n _proto.clear = function clear() {\n this._responses.clear();\n };\n\n _proto.get = function get(queryID, variables) {\n var _this = this;\n\n var cacheKey = getCacheKey(queryID, variables);\n\n this._responses.forEach(function (response, key) {\n if (!isCurrent(response.fetchTime, _this._ttl)) {\n _this._responses[\"delete\"](key);\n }\n });\n\n var response = this._responses.get(cacheKey);\n\n return response != null ? // $FlowFixMe[speculation-ambiguous]\n (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, response.payload), {}, {\n extensions: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, response.payload.extensions), {}, {\n cacheTimestamp: response.fetchTime\n })\n }) : null;\n };\n\n _proto.set = function set(queryID, variables, payload) {\n var fetchTime = Date.now();\n var cacheKey = getCacheKey(queryID, variables);\n\n this._responses[\"delete\"](cacheKey); // deletion resets key ordering\n\n\n this._responses.set(cacheKey, {\n fetchTime: fetchTime,\n payload: payload\n }); // Purge least-recently updated key when max size reached\n\n\n if (this._responses.size > this._size) {\n var firstKey = this._responses.keys().next();\n\n if (!firstKey.done) {\n this._responses[\"delete\"](firstKey.value);\n }\n }\n };\n\n return RelayQueryResponseCache;\n}();\n\nfunction getCacheKey(queryID, variables) {\n return JSON.stringify(stableCopy({\n queryID: queryID,\n variables: variables\n }));\n}\n/**\n * Determine whether a response fetched at `fetchTime` is still valid given\n * some `ttl`.\n */\n\n\nfunction isCurrent(fetchTime, ttl) {\n return fetchTime + ttl >= Date.now();\n}\n\nmodule.exports = RelayQueryResponseCache;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar RelayFeatureFlags = {\n ENABLE_VARIABLE_CONNECTION_KEY: false,\n ENABLE_PARTIAL_RENDERING_DEFAULT: true,\n ENABLE_RELAY_CONTAINERS_SUSPENSE: true,\n ENABLE_PRECISE_TYPE_REFINEMENT: false,\n ENABLE_REACT_FLIGHT_COMPONENT_FIELD: false,\n ENABLE_REQUIRED_DIRECTIVES: false,\n ENABLE_RELAY_RESOLVERS: false,\n ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION: false,\n ENABLE_FRIENDLY_QUERY_NAME_GQL_URL: false,\n ENABLE_STORE_SUBSCRIPTIONS_REFACTOR: false,\n ENABLE_LOAD_QUERY_REQUEST_DEDUPING: true,\n ENABLE_DO_NOT_WRAP_LIVE_QUERY: false,\n ENABLE_NOTIFY_SUBSCRIPTION: false,\n ENABLE_UNIQUE_SUBSCRIPTION_ROOT: false,\n ENABLE_BATCHED_STORE_UPDATES: false\n};\nmodule.exports = RelayFeatureFlags;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\n\n\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\n\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\n\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar invariant = require('invariant');\n\nvar _require = require('./ConvertToExecuteFunction'),\n convertFetch = _require.convertFetch;\n\n/**\n * Creates an implementation of the `Network` interface defined in\n * `RelayNetworkTypes` given `fetch` and `subscribe` functions.\n */\nfunction create(fetchFn, subscribe) {\n // Convert to functions that returns RelayObservable.\n var observeFetch = convertFetch(fetchFn);\n\n function execute(request, variables, cacheConfig, uploadables, logRequestInfo) {\n if (request.operationKind === 'subscription') {\n !subscribe ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayNetwork: This network layer does not support Subscriptions. ' + 'To use Subscriptions, provide a custom network layer.') : invariant(false) : void 0;\n !!uploadables ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayNetwork: Cannot provide uploadables while subscribing.') : invariant(false) : void 0;\n return subscribe(request, variables, cacheConfig);\n }\n\n var pollInterval = cacheConfig.poll;\n\n if (pollInterval != null) {\n !!uploadables ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayNetwork: Cannot provide uploadables while polling.') : invariant(false) : void 0;\n return observeFetch(request, variables, {\n force: true\n }).poll(pollInterval);\n }\n\n return observeFetch(request, variables, cacheConfig, uploadables, logRequestInfo);\n }\n\n return {\n execute: execute\n };\n}\n\nmodule.exports = {\n create: create\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar isPromise = require('../util/isPromise');\n/**\n * A Subscription object is returned from .subscribe(), which can be\n * unsubscribed or checked to see if the resulting subscription has closed.\n */\n\n\nvar hostReportError = swallowError;\n/**\n * Limited implementation of ESObservable, providing the limited set of behavior\n * Relay networking requires.\n *\n * Observables retain the benefit of callbacks which can be called\n * synchronously, avoiding any UI jitter, while providing a compositional API,\n * which simplifies logic and prevents mishandling of errors compared to\n * the direct use of callback functions.\n *\n * ESObservable: https://github.com/tc39/proposal-observable\n */\n\nvar RelayObservable = /*#__PURE__*/function () {\n RelayObservable.create = function create(source) {\n return new RelayObservable(source);\n } // Use RelayObservable.create()\n ;\n\n function RelayObservable(source) {\n if (process.env.NODE_ENV !== \"production\") {\n // Early runtime errors for ill-formed sources.\n if (!source || typeof source !== 'function') {\n throw new Error('Source must be a Function: ' + String(source));\n }\n }\n\n this._source = source;\n }\n /**\n * When an emitted error event is not handled by an Observer, it is reported\n * to the host environment (what the ESObservable spec refers to as\n * \"HostReportErrors()\").\n *\n * The default implementation in development rethrows thrown errors, and\n * logs emitted error events to the console, while in production does nothing\n * (swallowing unhandled errors).\n *\n * Called during application initialization, this method allows\n * application-specific handling of unhandled errors. Allowing, for example,\n * integration with error logging or developer tools.\n *\n * A second parameter `isUncaughtThrownError` is true when the unhandled error\n * was thrown within an Observer handler, and false when the unhandled error\n * was an unhandled emitted event.\n *\n * - Uncaught thrown errors typically represent avoidable errors thrown from\n * application code, which should be handled with a try/catch block, and\n * usually have useful stack traces.\n *\n * - Unhandled emitted event errors typically represent unavoidable events in\n * application flow such as network failure, and may not have useful\n * stack traces.\n */\n\n\n RelayObservable.onUnhandledError = function onUnhandledError(callback) {\n hostReportError = callback;\n }\n /**\n * Accepts various kinds of data sources, and always returns a RelayObservable\n * useful for accepting the result of a user-provided FetchFunction.\n */\n ;\n\n RelayObservable.from = function from(obj) {\n return isObservable(obj) ? fromObservable(obj) : isPromise(obj) ? fromPromise(obj) : fromValue(obj);\n }\n /**\n * Similar to promise.catch(), observable.catch() handles error events, and\n * provides an alternative observable to use in it's place.\n *\n * If the catch handler throws a new error, it will appear as an error event\n * on the resulting Observable.\n */\n ;\n\n var _proto = RelayObservable.prototype;\n\n _proto[\"catch\"] = function _catch(fn) {\n var _this = this;\n\n return RelayObservable.create(function (sink) {\n var subscription;\n\n _this.subscribe({\n start: function start(sub) {\n subscription = sub;\n },\n next: sink.next,\n complete: sink.complete,\n error: function error(_error2) {\n try {\n fn(_error2).subscribe({\n start: function start(sub) {\n subscription = sub;\n },\n next: sink.next,\n complete: sink.complete,\n error: sink.error\n });\n } catch (error2) {\n sink.error(error2, true\n /* isUncaughtThrownError */\n );\n }\n }\n });\n\n return function () {\n return subscription.unsubscribe();\n };\n });\n }\n /**\n * Returns a new Observable which first yields values from this Observable,\n * then yields values from the next Observable. This is useful for chaining\n * together Observables of finite length.\n */\n ;\n\n _proto.concat = function concat(next) {\n var _this2 = this;\n\n return RelayObservable.create(function (sink) {\n var current;\n\n _this2.subscribe({\n start: function start(subscription) {\n current = subscription;\n },\n next: sink.next,\n error: sink.error,\n complete: function complete() {\n current = next.subscribe(sink);\n }\n });\n\n return function () {\n current && current.unsubscribe();\n };\n });\n }\n /**\n * Returns a new Observable which returns the same values as this one, but\n * modified so that the provided Observer is called to perform a side-effects\n * for all events emitted by the source.\n *\n * Any errors that are thrown in the side-effect Observer are unhandled, and\n * do not affect the source Observable or its Observer.\n *\n * This is useful for when debugging your Observables or performing other\n * side-effects such as logging or performance monitoring.\n */\n ;\n\n _proto[\"do\"] = function _do(observer) {\n var _this3 = this;\n\n return RelayObservable.create(function (sink) {\n var both = function both(action) {\n return function () {\n try {\n observer[action] && observer[action].apply(observer, arguments);\n } catch (error) {\n hostReportError(error, true\n /* isUncaughtThrownError */\n );\n }\n\n sink[action] && sink[action].apply(sink, arguments);\n };\n };\n\n return _this3.subscribe({\n start: both('start'),\n next: both('next'),\n error: both('error'),\n complete: both('complete'),\n unsubscribe: both('unsubscribe')\n });\n });\n }\n /**\n * Returns a new Observable which returns the same values as this one, but\n * modified so that the finally callback is performed after completion,\n * whether normal or due to error or unsubscription.\n *\n * This is useful for cleanup such as resource finalization.\n */\n ;\n\n _proto[\"finally\"] = function _finally(fn) {\n var _this4 = this;\n\n return RelayObservable.create(function (sink) {\n var subscription = _this4.subscribe(sink);\n\n return function () {\n subscription.unsubscribe();\n fn();\n };\n });\n }\n /**\n * Returns a new Observable which is identical to this one, unless this\n * Observable completes before yielding any values, in which case the new\n * Observable will yield the values from the alternate Observable.\n *\n * If this Observable does yield values, the alternate is never subscribed to.\n *\n * This is useful for scenarios where values may come from multiple sources\n * which should be tried in order, i.e. from a cache before a network.\n */\n ;\n\n _proto.ifEmpty = function ifEmpty(alternate) {\n var _this5 = this;\n\n return RelayObservable.create(function (sink) {\n var hasValue = false;\n\n var current = _this5.subscribe({\n next: function next(value) {\n hasValue = true;\n sink.next(value);\n },\n error: sink.error,\n complete: function complete() {\n if (hasValue) {\n sink.complete();\n } else {\n current = alternate.subscribe(sink);\n }\n }\n });\n\n return function () {\n current.unsubscribe();\n };\n });\n }\n /**\n * Observable's primary API: returns an unsubscribable Subscription to the\n * source of this Observable.\n *\n * Note: A sink may be passed directly to .subscribe() as its observer,\n * allowing for easily composing Observables.\n */\n ;\n\n _proto.subscribe = function subscribe(observer) {\n if (process.env.NODE_ENV !== \"production\") {\n // Early runtime errors for ill-formed observers.\n if (!observer || typeof observer !== 'object') {\n throw new Error('Observer must be an Object with callbacks: ' + String(observer));\n }\n }\n\n return _subscribe(this._source, observer);\n }\n /**\n * Returns a new Observerable where each value has been transformed by\n * the mapping function.\n */\n ;\n\n _proto.map = function map(fn) {\n var _this6 = this;\n\n return RelayObservable.create(function (sink) {\n var subscription = _this6.subscribe({\n complete: sink.complete,\n error: sink.error,\n next: function next(value) {\n try {\n var mapValue = fn(value);\n sink.next(mapValue);\n } catch (error) {\n sink.error(error, true\n /* isUncaughtThrownError */\n );\n }\n }\n });\n\n return function () {\n subscription.unsubscribe();\n };\n });\n }\n /**\n * Returns a new Observable where each value is replaced with a new Observable\n * by the mapping function, the results of which returned as a single\n * merged Observable.\n */\n ;\n\n _proto.mergeMap = function mergeMap(fn) {\n var _this7 = this;\n\n return RelayObservable.create(function (sink) {\n var subscriptions = [];\n\n function start(subscription) {\n this._sub = subscription;\n subscriptions.push(subscription);\n }\n\n function complete() {\n subscriptions.splice(subscriptions.indexOf(this._sub), 1);\n\n if (subscriptions.length === 0) {\n sink.complete();\n }\n }\n\n _this7.subscribe({\n start: start,\n next: function next(value) {\n try {\n if (!sink.closed) {\n RelayObservable.from(fn(value)).subscribe({\n start: start,\n next: sink.next,\n error: sink.error,\n complete: complete\n });\n }\n } catch (error) {\n sink.error(error, true\n /* isUncaughtThrownError */\n );\n }\n },\n error: sink.error,\n complete: complete\n });\n\n return function () {\n subscriptions.forEach(function (sub) {\n return sub.unsubscribe();\n });\n subscriptions.length = 0;\n };\n });\n }\n /**\n * Returns a new Observable which first mirrors this Observable, then when it\n * completes, waits for `pollInterval` milliseconds before re-subscribing to\n * this Observable again, looping in this manner until unsubscribed.\n *\n * The returned Observable never completes.\n */\n ;\n\n _proto.poll = function poll(pollInterval) {\n var _this8 = this;\n\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof pollInterval !== 'number' || pollInterval <= 0) {\n throw new Error('RelayObservable: Expected pollInterval to be positive, got: ' + pollInterval);\n }\n }\n\n return RelayObservable.create(function (sink) {\n var subscription;\n var timeout;\n\n var poll = function poll() {\n subscription = _this8.subscribe({\n next: sink.next,\n error: sink.error,\n complete: function complete() {\n timeout = setTimeout(poll, pollInterval);\n }\n });\n };\n\n poll();\n return function () {\n clearTimeout(timeout);\n subscription.unsubscribe();\n };\n });\n }\n /**\n * Returns a Promise which resolves when this Observable yields a first value\n * or when it completes with no value.\n *\n * NOTE: The source Observable is *NOT* canceled when the returned Promise\n * resolves. The Observable is always run to completion.\n */\n ;\n\n _proto.toPromise = function toPromise() {\n var _this9 = this;\n\n return new Promise(function (resolve, reject) {\n var resolved = false;\n\n _this9.subscribe({\n next: function next(val) {\n if (!resolved) {\n resolved = true;\n resolve(val);\n }\n },\n error: reject,\n complete: resolve\n });\n });\n };\n\n return RelayObservable;\n}(); // Use declarations to teach Flow how to check isObservable.\n\n\nfunction isObservable(obj) {\n return typeof obj === 'object' && obj !== null && typeof obj.subscribe === 'function';\n}\n\nfunction fromObservable(obj) {\n return obj instanceof RelayObservable ? obj : RelayObservable.create(function (sink) {\n return obj.subscribe(sink);\n });\n}\n\nfunction fromPromise(promise) {\n return RelayObservable.create(function (sink) {\n // Since sink methods do not throw, the resulting Promise can be ignored.\n promise.then(function (value) {\n sink.next(value);\n sink.complete();\n }, sink.error);\n });\n}\n\nfunction fromValue(value) {\n return RelayObservable.create(function (sink) {\n sink.next(value);\n sink.complete();\n });\n}\n\nfunction _subscribe(source, observer) {\n var closed = false;\n var cleanup; // Ideally we would simply describe a `get closed()` method on the Sink and\n // Subscription objects below, however not all flow environments we expect\n // Relay to be used within will support property getters, and many minifier\n // tools still do not support ES5 syntax. Instead, we can use defineProperty.\n\n var withClosed = function withClosed(obj) {\n return Object.defineProperty(obj, 'closed', {\n get: function get() {\n return closed;\n }\n });\n };\n\n function doCleanup() {\n if (cleanup) {\n if (cleanup.unsubscribe) {\n cleanup.unsubscribe();\n } else {\n try {\n cleanup();\n } catch (error) {\n hostReportError(error, true\n /* isUncaughtThrownError */\n );\n }\n }\n\n cleanup = undefined;\n }\n } // Create a Subscription.\n\n\n var subscription = withClosed({\n unsubscribe: function unsubscribe() {\n if (!closed) {\n closed = true; // Tell Observer that unsubscribe was called.\n\n try {\n observer.unsubscribe && observer.unsubscribe(subscription);\n } catch (error) {\n hostReportError(error, true\n /* isUncaughtThrownError */\n );\n } finally {\n doCleanup();\n }\n }\n }\n }); // Tell Observer that observation is about to begin.\n\n try {\n observer.start && observer.start(subscription);\n } catch (error) {\n hostReportError(error, true\n /* isUncaughtThrownError */\n );\n } // If closed already, don't bother creating a Sink.\n\n\n if (closed) {\n return subscription;\n } // Create a Sink respecting subscription state and cleanup.\n\n\n var sink = withClosed({\n next: function next(value) {\n if (!closed && observer.next) {\n try {\n observer.next(value);\n } catch (error) {\n hostReportError(error, true\n /* isUncaughtThrownError */\n );\n }\n }\n },\n error: function error(_error3, isUncaughtThrownError) {\n if (closed || !observer.error) {\n closed = true;\n hostReportError(_error3, isUncaughtThrownError || false);\n doCleanup();\n } else {\n closed = true;\n\n try {\n observer.error(_error3);\n } catch (error2) {\n hostReportError(error2, true\n /* isUncaughtThrownError */\n );\n } finally {\n doCleanup();\n }\n }\n },\n complete: function complete() {\n if (!closed) {\n closed = true;\n\n try {\n observer.complete && observer.complete();\n } catch (error) {\n hostReportError(error, true\n /* isUncaughtThrownError */\n );\n } finally {\n doCleanup();\n }\n }\n }\n }); // If anything goes wrong during observing the source, handle the error.\n\n try {\n cleanup = source(sink);\n } catch (error) {\n sink.error(error, true\n /* isUncaughtThrownError */\n );\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n // Early runtime errors for ill-formed returned cleanup.\n if (cleanup !== undefined && typeof cleanup !== 'function' && (!cleanup || typeof cleanup.unsubscribe !== 'function')) {\n throw new Error('Returned cleanup function which cannot be called: ' + String(cleanup));\n }\n } // If closed before the source function existed, cleanup now.\n\n\n if (closed) {\n doCleanup();\n }\n\n return subscription;\n}\n\nfunction swallowError(_error, _isUncaughtThrownError) {// do nothing.\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n // Default implementation of HostReportErrors() in development builds.\n // Can be replaced by the host application environment.\n RelayObservable.onUnhandledError(function (error, isUncaughtThrownError) {\n if (typeof fail === 'function') {\n // In test environments (Jest), fail() immediately fails the current test.\n fail(String(error));\n } else if (isUncaughtThrownError) {\n // Rethrow uncaught thrown errors on the next frame to avoid breaking\n // current logic.\n setTimeout(function () {\n throw error;\n });\n } else if (typeof console !== 'undefined') {\n // Otherwise, log the unhandled error for visibility.\n // eslint-disable-next-line no-console\n console.error('RelayObservable: Unhandled Error', error);\n }\n });\n}\n\nmodule.exports = RelayObservable;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar deepFreeze = require('../util/deepFreeze');\n\nvar getRequestIdentifier = require('../util/getRequestIdentifier');\n\nvar _require = require('./RelayConcreteVariables'),\n getOperationVariables = _require.getOperationVariables;\n\nvar _require2 = require('./RelayModernSelector'),\n createNormalizationSelector = _require2.createNormalizationSelector,\n createReaderSelector = _require2.createReaderSelector;\n\nvar _require3 = require('./RelayStoreUtils'),\n ROOT_ID = _require3.ROOT_ID;\n\n/**\n * Creates an instance of the `OperationDescriptor` type defined in\n * `RelayStoreTypes` given an operation and some variables. The input variables\n * are filtered to exclude variables that do not match defined arguments on the\n * operation, and default values are populated for null values.\n */\nfunction createOperationDescriptor(request, variables, cacheConfig) {\n var dataID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ROOT_ID;\n var operation = request.operation;\n var operationVariables = getOperationVariables(operation, variables);\n var requestDescriptor = createRequestDescriptor(request, operationVariables, cacheConfig);\n var operationDescriptor = {\n fragment: createReaderSelector(request.fragment, dataID, operationVariables, requestDescriptor),\n request: requestDescriptor,\n root: createNormalizationSelector(operation, dataID, operationVariables)\n };\n\n if (process.env.NODE_ENV !== \"production\") {\n // Freezing properties short-circuits a deepFreeze of snapshots that contain\n // an OperationDescriptor via their selector's owner, avoiding stack\n // overflow on larger queries.\n Object.freeze(operationDescriptor.fragment);\n Object.freeze(operationDescriptor.root);\n Object.freeze(operationDescriptor);\n }\n\n return operationDescriptor;\n}\n\nfunction createRequestDescriptor(request, variables, cacheConfig) {\n var requestDescriptor = {\n identifier: getRequestIdentifier(request.params, variables),\n node: request,\n variables: variables,\n cacheConfig: cacheConfig\n };\n\n if (process.env.NODE_ENV !== \"production\") {\n deepFreeze(variables);\n Object.freeze(request);\n Object.freeze(requestDescriptor);\n }\n\n return requestDescriptor;\n}\n\nmodule.exports = {\n createOperationDescriptor: createOperationDescriptor,\n createRequestDescriptor: createRequestDescriptor\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar RelayRecordState = {\n /**\n * Record exists (either fetched from the server or produced by a local,\n * optimistic update).\n */\n EXISTENT: 'EXISTENT',\n\n /**\n * Record is known not to exist (either as the result of a mutation, or\n * because the server returned `null` when queried for the record).\n */\n NONEXISTENT: 'NONEXISTENT',\n\n /**\n * Record State is unknown because it has not yet been fetched from the\n * server.\n */\n UNKNOWN: 'UNKNOWN'\n};\nmodule.exports = RelayRecordState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _createForOfIteratorHelper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createForOfIteratorHelper\"));\n\nvar RelayFeatureFlags = require('../util/RelayFeatureFlags');\n\nvar RelayReader = require('./RelayReader');\n\nvar deepFreeze = require('../util/deepFreeze');\n\nvar recycleNodesInto = require('../util/recycleNodesInto');\n\nvar RelayStoreSubscriptionsUsingMapByID = /*#__PURE__*/function () {\n function RelayStoreSubscriptionsUsingMapByID(log) {\n this._notifiedRevision = 0;\n this._snapshotRevision = 0;\n this._subscriptionsByDataId = new Map();\n this._staleSubscriptions = new Set();\n this.__log = log;\n }\n\n var _proto = RelayStoreSubscriptionsUsingMapByID.prototype;\n\n _proto.subscribe = function subscribe(snapshot, callback) {\n var _this = this;\n\n var subscription = {\n backup: null,\n callback: callback,\n notifiedRevision: this._notifiedRevision,\n snapshotRevision: this._snapshotRevision,\n snapshot: snapshot\n };\n\n var dispose = function dispose() {\n var _iterator = (0, _createForOfIteratorHelper2[\"default\"])(snapshot.seenRecords),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var dataId = _step.value;\n\n var subscriptionsForDataId = _this._subscriptionsByDataId.get(dataId);\n\n if (subscriptionsForDataId != null) {\n subscriptionsForDataId[\"delete\"](subscription);\n\n if (subscriptionsForDataId.size === 0) {\n _this._subscriptionsByDataId[\"delete\"](dataId);\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n };\n\n var _iterator2 = (0, _createForOfIteratorHelper2[\"default\"])(snapshot.seenRecords),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var dataId = _step2.value;\n\n var subscriptionsForDataId = this._subscriptionsByDataId.get(dataId);\n\n if (subscriptionsForDataId != null) {\n subscriptionsForDataId.add(subscription);\n } else {\n this._subscriptionsByDataId.set(dataId, new Set([subscription]));\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return {\n dispose: dispose\n };\n };\n\n _proto.snapshotSubscriptions = function snapshotSubscriptions(source) {\n var _this2 = this;\n\n this._snapshotRevision++;\n\n this._subscriptionsByDataId.forEach(function (subscriptions) {\n subscriptions.forEach(function (subscription) {\n if (subscription.snapshotRevision === _this2._snapshotRevision) {\n return;\n }\n\n subscription.snapshotRevision = _this2._snapshotRevision; // Backup occurs after writing a new \"final\" payload(s) and before (re)applying\n // optimistic changes. Each subscription's `snapshot` represents what was *last\n // published to the subscriber*, which notably may include previous optimistic\n // updates. Therefore a subscription can be in any of the following states:\n // - stale=true: This subscription was restored to a different value than\n // `snapshot`. That means this subscription has changes relative to its base,\n // but its base has changed (we just applied a final payload): recompute\n // a backup so that we can later restore to the state the subscription\n // should be in.\n // - stale=false: This subscription was restored to the same value than\n // `snapshot`. That means this subscription does *not* have changes relative\n // to its base, so the current `snapshot` is valid to use as a backup.\n\n if (!_this2._staleSubscriptions.has(subscription)) {\n subscription.backup = subscription.snapshot;\n return;\n }\n\n var snapshot = subscription.snapshot;\n var backup = RelayReader.read(source, snapshot.selector);\n var nextData = recycleNodesInto(snapshot.data, backup.data);\n backup.data = nextData; // backup owns the snapshot and can safely mutate\n\n subscription.backup = backup;\n });\n });\n };\n\n _proto.restoreSubscriptions = function restoreSubscriptions() {\n var _this3 = this;\n\n this._snapshotRevision++;\n\n this._subscriptionsByDataId.forEach(function (subscriptions) {\n subscriptions.forEach(function (subscription) {\n if (subscription.snapshotRevision === _this3._snapshotRevision) {\n return;\n }\n\n subscription.snapshotRevision = _this3._snapshotRevision;\n var backup = subscription.backup;\n subscription.backup = null;\n\n if (backup) {\n if (backup.data !== subscription.snapshot.data) {\n _this3._staleSubscriptions.add(subscription);\n }\n\n var prevSeenRecords = subscription.snapshot.seenRecords;\n subscription.snapshot = {\n data: subscription.snapshot.data,\n isMissingData: backup.isMissingData,\n seenRecords: backup.seenRecords,\n selector: backup.selector,\n missingRequiredFields: backup.missingRequiredFields\n };\n\n _this3._updateSubscriptionsMap(subscription, prevSeenRecords);\n } else {\n _this3._staleSubscriptions.add(subscription);\n }\n });\n });\n };\n\n _proto.updateSubscriptions = function updateSubscriptions(source, updatedRecordIDs, updatedOwners, sourceOperation) {\n var _this4 = this;\n\n this._notifiedRevision++;\n updatedRecordIDs.forEach(function (updatedRecordId) {\n var subcriptionsForDataId = _this4._subscriptionsByDataId.get(updatedRecordId);\n\n if (subcriptionsForDataId == null) {\n return;\n }\n\n subcriptionsForDataId.forEach(function (subscription) {\n if (subscription.notifiedRevision === _this4._notifiedRevision) {\n return;\n }\n\n var owner = _this4._updateSubscription(source, subscription, false, sourceOperation);\n\n if (owner != null) {\n updatedOwners.push(owner);\n }\n });\n });\n\n this._staleSubscriptions.forEach(function (subscription) {\n if (subscription.notifiedRevision === _this4._notifiedRevision) {\n return;\n }\n\n var owner = _this4._updateSubscription(source, subscription, true, sourceOperation);\n\n if (owner != null) {\n updatedOwners.push(owner);\n }\n });\n\n this._staleSubscriptions.clear();\n }\n /**\n * Notifies the callback for the subscription if the data for the associated\n * snapshot has changed.\n * Additionally, updates the subscription snapshot with the latest snapshot,\n * amarks it as not stale, and updates the subscription tracking for any\n * any new ids observed in the latest data snapshot.\n * Returns the owner (RequestDescriptor) if the subscription was affected by the\n * latest update, or null if it was not affected.\n */\n ;\n\n _proto._updateSubscription = function _updateSubscription(source, subscription, stale, sourceOperation) {\n var backup = subscription.backup,\n callback = subscription.callback,\n snapshot = subscription.snapshot;\n var nextSnapshot = stale && backup != null ? backup : RelayReader.read(source, snapshot.selector);\n var nextData = recycleNodesInto(snapshot.data, nextSnapshot.data);\n nextSnapshot = {\n data: nextData,\n isMissingData: nextSnapshot.isMissingData,\n seenRecords: nextSnapshot.seenRecords,\n selector: nextSnapshot.selector,\n missingRequiredFields: nextSnapshot.missingRequiredFields\n };\n\n if (process.env.NODE_ENV !== \"production\") {\n deepFreeze(nextSnapshot);\n }\n\n var prevSeenRecords = subscription.snapshot.seenRecords;\n subscription.snapshot = nextSnapshot;\n subscription.notifiedRevision = this._notifiedRevision;\n\n this._updateSubscriptionsMap(subscription, prevSeenRecords);\n\n if (nextSnapshot.data !== snapshot.data) {\n if (this.__log && RelayFeatureFlags.ENABLE_NOTIFY_SUBSCRIPTION) {\n this.__log({\n name: 'store.notify.subscription',\n sourceOperation: sourceOperation,\n snapshot: snapshot,\n nextSnapshot: nextSnapshot\n });\n }\n\n callback(nextSnapshot);\n return snapshot.selector.owner;\n }\n }\n /**\n * Updates the Map that tracks subscriptions by id.\n * Given an updated subscription and the records that where seen\n * on the previous subscription snapshot, updates our tracking\n * to track the subscription for the newly and no longer seen ids.\n */\n ;\n\n _proto._updateSubscriptionsMap = function _updateSubscriptionsMap(subscription, prevSeenRecords) {\n var _iterator3 = (0, _createForOfIteratorHelper2[\"default\"])(prevSeenRecords),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var dataId = _step3.value;\n\n var subscriptionsForDataId = this._subscriptionsByDataId.get(dataId);\n\n if (subscriptionsForDataId != null) {\n subscriptionsForDataId[\"delete\"](subscription);\n\n if (subscriptionsForDataId.size === 0) {\n this._subscriptionsByDataId[\"delete\"](dataId);\n }\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n var _iterator4 = (0, _createForOfIteratorHelper2[\"default\"])(subscription.snapshot.seenRecords),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var _dataId = _step4.value;\n\n var _subscriptionsForDataId = this._subscriptionsByDataId.get(_dataId);\n\n if (_subscriptionsForDataId != null) {\n _subscriptionsForDataId.add(subscription);\n } else {\n this._subscriptionsByDataId.set(_dataId, new Set([subscription]));\n }\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n };\n\n return RelayStoreSubscriptionsUsingMapByID;\n}();\n\nmodule.exports = RelayStoreSubscriptionsUsingMapByID;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar invariant = require('invariant');\n\nvar _require = require('../query/GraphQLTag'),\n getFragment = _require.getFragment;\n\nvar _require2 = require('./RelayModernSelector'),\n getSelector = _require2.getSelector;\n\nvar contextStack = [];\n\nfunction withResolverContext(context, cb) {\n contextStack.push(context);\n\n try {\n return cb();\n } finally {\n contextStack.pop();\n }\n} // NOTE: these declarations are copied from 'useFragment'; it would be good\n// to figure out how to share the same type signature between the two functions.\n// The declarations ensure that the type of the returned data is:\n// - non-nullable if the provided ref type is non-nullable\n// - nullable if the provided ref type is nullable\n// - array of non-nullable if the privoided ref type is an array of\n// non-nullable refs\n// - array of nullable if the privoided ref type is an array of nullable refs\n\n\nfunction readFragment(fragmentInput, fragmentRef) {\n if (!contextStack.length) {\n throw new Error('readFragment should be called only from within a Relay Resolver function.');\n }\n\n var context = contextStack[contextStack.length - 1];\n var fragmentNode = getFragment(fragmentInput);\n var fragmentSelector = getSelector(fragmentNode, fragmentRef);\n !(fragmentSelector != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected a selector for the fragment of the resolver \".concat(fragmentNode.name, \", but got null.\")) : invariant(false) : void 0;\n !(fragmentSelector.kind === 'SingularReaderSelector') ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected a singular reader selector for the fragment of the resolver \".concat(fragmentNode.name, \", but it was plural.\")) : invariant(false) : void 0;\n return context.getDataForResolverFragment(fragmentSelector);\n}\n\nmodule.exports = {\n readFragment: readFragment,\n withResolverContext: withResolverContext\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar RelayDeclarativeMutationConfig = require('../mutations/RelayDeclarativeMutationConfig');\n\nvar RelayFeatureFlags = require('../util/RelayFeatureFlags');\n\nvar warning = require(\"fbjs/lib/warning\");\n\nvar _require = require('../query/GraphQLTag'),\n getRequest = _require.getRequest;\n\nvar _require2 = require('../store/ClientID'),\n generateUniqueClientID = _require2.generateUniqueClientID;\n\nvar _require3 = require('../store/RelayModernOperationDescriptor'),\n createOperationDescriptor = _require3.createOperationDescriptor;\n\nvar _require4 = require('../store/RelayModernSelector'),\n createReaderSelector = _require4.createReaderSelector;\n\nfunction requestSubscription(environment, config) {\n var subscription = getRequest(config.subscription);\n\n if (subscription.params.operationKind !== 'subscription') {\n throw new Error('requestSubscription: Must use Subscription operation');\n }\n\n var configs = config.configs,\n onCompleted = config.onCompleted,\n onError = config.onError,\n onNext = config.onNext,\n variables = config.variables,\n cacheConfig = config.cacheConfig;\n var operation = createOperationDescriptor(subscription, variables, cacheConfig, RelayFeatureFlags.ENABLE_UNIQUE_SUBSCRIPTION_ROOT ? generateUniqueClientID() : undefined);\n process.env.NODE_ENV !== \"production\" ? warning(!(config.updater && configs), 'requestSubscription: Expected only one of `updater` and `configs` to be provided') : void 0;\n\n var _ref = configs ? RelayDeclarativeMutationConfig.convert(configs, subscription, null\n /* optimisticUpdater */\n , config.updater) : config,\n updater = _ref.updater;\n\n var sub = environment.execute({\n operation: operation,\n updater: updater\n }).map(function (responses) {\n var selector = operation.fragment;\n\n if (RelayFeatureFlags.ENABLE_UNIQUE_SUBSCRIPTION_ROOT) {\n var nextID;\n\n if (Array.isArray(responses)) {\n var _responses$, _responses$$extension;\n\n nextID = (_responses$ = responses[0]) === null || _responses$ === void 0 ? void 0 : (_responses$$extension = _responses$.extensions) === null || _responses$$extension === void 0 ? void 0 : _responses$$extension.__relay_subscription_root_id;\n } else {\n var _responses$extensions;\n\n nextID = (_responses$extensions = responses.extensions) === null || _responses$extensions === void 0 ? void 0 : _responses$extensions.__relay_subscription_root_id;\n }\n\n if (typeof nextID === 'string') {\n selector = createReaderSelector(selector.node, nextID, selector.variables, selector.owner);\n }\n }\n\n var data = environment.lookup(selector).data; // $FlowFixMe[incompatible-cast]\n\n return data;\n }).subscribe({\n next: onNext,\n error: onError,\n complete: onCompleted\n });\n return {\n dispose: sub.unsubscribe\n };\n}\n\nmodule.exports = requestSubscription;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar invariant = require('invariant');\n\nvar _require = require('./RelayDefaultHandleKey'),\n DEFAULT_HANDLE_KEY = _require.DEFAULT_HANDLE_KEY;\n/**\n * @internal\n *\n * Helper to create a unique name for a handle field based on the handle name, handle key and\n * source field.\n */\n\n\nfunction getRelayHandleKey(handleName, key, fieldName) {\n if (key && key !== DEFAULT_HANDLE_KEY) {\n return \"__\".concat(key, \"_\").concat(handleName);\n }\n\n !(fieldName != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'getRelayHandleKey: Expected either `fieldName` or `key` in `handle` to be provided') : invariant(false) : void 0;\n return \"__\".concat(fieldName, \"_\").concat(handleName);\n}\n\nmodule.exports = getRelayHandleKey;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n * @emails oncall+relay\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _require = require('./RelayConcreteNode'),\n REQUEST = _require.REQUEST,\n SPLIT_OPERATION = _require.SPLIT_OPERATION;\n\n/**\n * OperationLoaders can return either a NormalizationSplitOperation or\n * ConcreteRequest.\n */\nfunction getOperation(node) {\n switch (node.kind) {\n case REQUEST:\n return node.operation;\n\n case SPLIT_OPERATION:\n default:\n return node;\n }\n}\n\nmodule.exports = getOperation;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar RelayFeatureFlags = require('../util/RelayFeatureFlags');\n\nvar areEqual = require(\"fbjs/lib/areEqual\");\n\nvar invariant = require('invariant');\n\nvar isScalarAndEqual = require('../util/isScalarAndEqual');\n\nvar reportMissingRequiredFields = require('../util/reportMissingRequiredFields');\n\nvar warning = require(\"fbjs/lib/warning\");\n\nvar _require = require('../query/fetchQueryInternal'),\n getPromiseForActiveRequest = _require.getPromiseForActiveRequest;\n\nvar _require2 = require('./RelayModernOperationDescriptor'),\n createRequestDescriptor = _require2.createRequestDescriptor;\n\nvar _require3 = require('./RelayModernSelector'),\n areEqualSelectors = _require3.areEqualSelectors,\n createReaderSelector = _require3.createReaderSelector,\n getSelectorsFromObject = _require3.getSelectorsFromObject;\n\n/**\n * A utility for resolving and subscribing to the results of a fragment spec\n * (key -> fragment mapping) given some \"props\" that determine the root ID\n * and variables to use when reading each fragment. When props are changed via\n * `setProps()`, the resolver will update its results and subscriptions\n * accordingly. Internally, the resolver:\n * - Converts the fragment map & props map into a map of `Selector`s.\n * - Removes any resolvers for any props that became null.\n * - Creates resolvers for any props that became non-null.\n * - Updates resolvers with the latest props.\n *\n * This utility is implemented as an imperative, stateful API for performance\n * reasons: reusing previous resolvers, callback functions, and subscriptions\n * all helps to reduce object allocation and thereby decrease GC time.\n *\n * The `resolve()` function is also lazy and memoized: changes in the store mark\n * the resolver as stale and notify the caller, and the actual results are\n * recomputed the first time `resolve()` is called.\n */\nvar RelayModernFragmentSpecResolver = /*#__PURE__*/function () {\n function RelayModernFragmentSpecResolver(context, fragments, props, callback, rootIsQueryRenderer) {\n var _this = this;\n\n (0, _defineProperty2[\"default\"])(this, \"_onChange\", function () {\n _this._stale = true;\n\n if (typeof _this._callback === 'function') {\n _this._callback();\n }\n });\n this._callback = callback;\n this._context = context;\n this._data = {};\n this._fragments = fragments;\n this._props = {};\n this._resolvers = {};\n this._stale = false;\n this._rootIsQueryRenderer = rootIsQueryRenderer;\n this.setProps(props);\n }\n\n var _proto = RelayModernFragmentSpecResolver.prototype;\n\n _proto.dispose = function dispose() {\n for (var _key in this._resolvers) {\n if (this._resolvers.hasOwnProperty(_key)) {\n disposeCallback(this._resolvers[_key]);\n }\n }\n };\n\n _proto.resolve = function resolve() {\n if (this._stale) {\n // Avoid mapping the object multiple times, which could occur if data for\n // multiple keys changes in the same event loop.\n var prevData = this._data;\n var nextData;\n\n for (var _key2 in this._resolvers) {\n if (this._resolvers.hasOwnProperty(_key2)) {\n var resolver = this._resolvers[_key2];\n var prevItem = prevData[_key2];\n\n if (resolver) {\n var nextItem = resolver.resolve();\n\n if (nextData || nextItem !== prevItem) {\n nextData = nextData || (0, _objectSpread2[\"default\"])({}, prevData);\n nextData[_key2] = nextItem;\n }\n } else {\n var prop = this._props[_key2];\n\n var _nextItem = prop !== undefined ? prop : null;\n\n if (nextData || !isScalarAndEqual(_nextItem, prevItem)) {\n nextData = nextData || (0, _objectSpread2[\"default\"])({}, prevData);\n nextData[_key2] = _nextItem;\n }\n }\n }\n }\n\n this._data = nextData || prevData;\n this._stale = false;\n }\n\n return this._data;\n };\n\n _proto.setCallback = function setCallback(callback) {\n this._callback = callback;\n };\n\n _proto.setProps = function setProps(props) {\n var ownedSelectors = getSelectorsFromObject(this._fragments, props);\n this._props = {};\n\n for (var _key3 in ownedSelectors) {\n if (ownedSelectors.hasOwnProperty(_key3)) {\n var ownedSelector = ownedSelectors[_key3];\n var resolver = this._resolvers[_key3];\n\n if (ownedSelector == null) {\n if (resolver != null) {\n resolver.dispose();\n }\n\n resolver = null;\n } else if (ownedSelector.kind === 'PluralReaderSelector') {\n if (resolver == null) {\n resolver = new SelectorListResolver(this._context.environment, this._rootIsQueryRenderer, ownedSelector, this._onChange);\n } else {\n !(resolver instanceof SelectorListResolver) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernFragmentSpecResolver: Expected prop `%s` to always be an array.', _key3) : invariant(false) : void 0;\n resolver.setSelector(ownedSelector);\n }\n } else {\n if (resolver == null) {\n resolver = new SelectorResolver(this._context.environment, this._rootIsQueryRenderer, ownedSelector, this._onChange);\n } else {\n !(resolver instanceof SelectorResolver) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayModernFragmentSpecResolver: Expected prop `%s` to always be an object.', _key3) : invariant(false) : void 0;\n resolver.setSelector(ownedSelector);\n }\n }\n\n this._props[_key3] = props[_key3];\n this._resolvers[_key3] = resolver;\n }\n }\n\n this._stale = true;\n };\n\n _proto.setVariables = function setVariables(variables, request) {\n for (var _key4 in this._resolvers) {\n if (this._resolvers.hasOwnProperty(_key4)) {\n var resolver = this._resolvers[_key4];\n\n if (resolver) {\n resolver.setVariables(variables, request);\n }\n }\n }\n\n this._stale = true;\n };\n\n return RelayModernFragmentSpecResolver;\n}();\n/**\n * A resolver for a single Selector.\n */\n\n\nvar SelectorResolver = /*#__PURE__*/function () {\n function SelectorResolver(environment, rootIsQueryRenderer, selector, callback) {\n var _this2 = this;\n\n (0, _defineProperty2[\"default\"])(this, \"_onChange\", function (snapshot) {\n _this2._data = snapshot.data;\n _this2._isMissingData = snapshot.isMissingData;\n _this2._missingRequiredFields = snapshot.missingRequiredFields;\n\n _this2._callback();\n });\n\n var _snapshot = environment.lookup(selector);\n\n this._callback = callback;\n this._data = _snapshot.data;\n this._isMissingData = _snapshot.isMissingData;\n this._missingRequiredFields = _snapshot.missingRequiredFields;\n this._environment = environment;\n this._rootIsQueryRenderer = rootIsQueryRenderer;\n this._selector = selector;\n this._subscription = environment.subscribe(_snapshot, this._onChange);\n }\n\n var _proto2 = SelectorResolver.prototype;\n\n _proto2.dispose = function dispose() {\n if (this._subscription) {\n this._subscription.dispose();\n\n this._subscription = null;\n }\n };\n\n _proto2.resolve = function resolve() {\n if (RelayFeatureFlags.ENABLE_RELAY_CONTAINERS_SUSPENSE === true && this._isMissingData === true) {\n var _getPromiseForActiveR;\n\n // NOTE: This branch exists to handle the case in which:\n // - A RelayModern container is rendered as a descendant of a Relay Hook\n // root using a \"partial\" renderPolicy (this means that eargerly\n // reading any cached data that is available instead of blocking\n // at the root until the whole query is fetched).\n // - A parent Relay Hook didnt' suspend earlier on data being fetched,\n // either because the fragment data for the parent was available, or\n // the parent fragment didn't have any data dependencies.\n // Even though our Flow types reflect the possiblity of null data, there\n // might still be cases where it's not handled at runtime becuase the\n // Flow types are being ignored, or simply not being used (for example,\n // the case reported here: https://fburl.com/srnbucf8, was due to\n // misuse of Flow types here: https://fburl.com/g3m0mqqh).\n // Additionally, even though the null data might be handled without a\n // runtime error, we might not suspend when we intended to if a parent\n // Relay Hook (e.g. that is using @defer) decided not to suspend becuase\n // it's immediate data was already available (even if it was deferred),\n // or it didn't actually need any data (was just spreading other fragments).\n // This should eventually go away with something like @optional, where we only\n // suspend at specific boundaries depending on whether the boundary\n // can be fulfilled or not.\n var promise = (_getPromiseForActiveR = getPromiseForActiveRequest(this._environment, this._selector.owner)) !== null && _getPromiseForActiveR !== void 0 ? _getPromiseForActiveR : this._environment.getOperationTracker().getPromiseForPendingOperationsAffectingOwner(this._selector.owner);\n\n if (promise != null) {\n if (this._rootIsQueryRenderer) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Relay: Relay Container for fragment `%s` has missing data and ' + 'would suspend. When using features such as @defer or @module, ' + 'use `useFragment` instead of a Relay Container.', this._selector.node.name) : void 0;\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Relay: Relay Container for fragment `%s` suspended. When using ' + 'features such as @defer or @module, use `useFragment` instead ' + 'of a Relay Container.', this._selector.node.name) : void 0;\n throw promise;\n }\n }\n }\n\n if (this._missingRequiredFields != null) {\n reportMissingRequiredFields(this._environment, this._missingRequiredFields);\n }\n\n return this._data;\n };\n\n _proto2.setSelector = function setSelector(selector) {\n if (this._subscription != null && areEqualSelectors(selector, this._selector)) {\n return;\n }\n\n this.dispose();\n\n var snapshot = this._environment.lookup(selector);\n\n this._data = snapshot.data;\n this._isMissingData = snapshot.isMissingData;\n this._missingRequiredFields = snapshot.missingRequiredFields;\n this._selector = selector;\n this._subscription = this._environment.subscribe(snapshot, this._onChange);\n };\n\n _proto2.setVariables = function setVariables(variables, request) {\n if (areEqual(variables, this._selector.variables)) {\n // If we're not actually setting new variables, we don't actually want\n // to create a new fragment owner, since areEqualSelectors relies on\n // owner identity.\n // In fact, we don't even need to try to attempt to set a new selector.\n // When fragment ownership is not enabled, setSelector will also bail\n // out since the selector doesn't really change, so we're doing it here\n // earlier.\n return;\n } // NOTE: We manually create the request descriptor here instead of\n // calling createOperationDescriptor() because we want to set a\n // descriptor with *unaltered* variables as the fragment owner.\n // This is a hack that allows us to preserve existing (broken)\n // behavior of RelayModern containers while using fragment ownership\n // to propagate variables instead of Context.\n // For more details, see the summary of D13999308\n\n\n var requestDescriptor = createRequestDescriptor(request, variables);\n var selector = createReaderSelector(this._selector.node, this._selector.dataID, variables, requestDescriptor);\n this.setSelector(selector);\n };\n\n return SelectorResolver;\n}();\n/**\n * A resolver for an array of Selectors.\n */\n\n\nvar SelectorListResolver = /*#__PURE__*/function () {\n function SelectorListResolver(environment, rootIsQueryRenderer, selector, callback) {\n var _this3 = this;\n\n (0, _defineProperty2[\"default\"])(this, \"_onChange\", function (data) {\n _this3._stale = true;\n\n _this3._callback();\n });\n this._callback = callback;\n this._data = [];\n this._environment = environment;\n this._resolvers = [];\n this._stale = true;\n this._rootIsQueryRenderer = rootIsQueryRenderer;\n this.setSelector(selector);\n }\n\n var _proto3 = SelectorListResolver.prototype;\n\n _proto3.dispose = function dispose() {\n this._resolvers.forEach(disposeCallback);\n };\n\n _proto3.resolve = function resolve() {\n if (this._stale) {\n // Avoid mapping the array multiple times, which could occur if data for\n // multiple indices changes in the same event loop.\n var prevData = this._data;\n var nextData;\n\n for (var ii = 0; ii < this._resolvers.length; ii++) {\n var prevItem = prevData[ii];\n\n var nextItem = this._resolvers[ii].resolve();\n\n if (nextData || nextItem !== prevItem) {\n nextData = nextData || prevData.slice(0, ii);\n nextData.push(nextItem);\n }\n }\n\n if (!nextData && this._resolvers.length !== prevData.length) {\n nextData = prevData.slice(0, this._resolvers.length);\n }\n\n this._data = nextData || prevData;\n this._stale = false;\n }\n\n return this._data;\n };\n\n _proto3.setSelector = function setSelector(selector) {\n var selectors = selector.selectors;\n\n while (this._resolvers.length > selectors.length) {\n var resolver = this._resolvers.pop();\n\n resolver.dispose();\n }\n\n for (var ii = 0; ii < selectors.length; ii++) {\n if (ii < this._resolvers.length) {\n this._resolvers[ii].setSelector(selectors[ii]);\n } else {\n this._resolvers[ii] = new SelectorResolver(this._environment, this._rootIsQueryRenderer, selectors[ii], this._onChange);\n }\n }\n\n this._stale = true;\n };\n\n _proto3.setVariables = function setVariables(variables, request) {\n this._resolvers.forEach(function (resolver) {\n return resolver.setVariables(variables, request);\n });\n\n this._stale = true;\n };\n\n return SelectorListResolver;\n}();\n\nfunction disposeCallback(disposable) {\n disposable && disposable.dispose();\n}\n\nmodule.exports = RelayModernFragmentSpecResolver;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\n/**\n * Represents a common GraphQL request that can be executed, an `operation`\n * containing information to normalize the results, and a `fragment` derived\n * from that operation to read the response data (masking data from child\n * fragments).\n */\n\n/**\n * Contains the parameters required for executing a GraphQL request.\n * The operation can either be provided as a persisted `id` or `text`. If given\n * in `text` format, a `cacheID` as a hash of the text should be set to be used\n * for local caching.\n */\nvar RelayConcreteNode = {\n CONDITION: 'Condition',\n CLIENT_COMPONENT: 'ClientComponent',\n CLIENT_EXTENSION: 'ClientExtension',\n DEFER: 'Defer',\n CONNECTION: 'Connection',\n FLIGHT_FIELD: 'FlightField',\n FRAGMENT: 'Fragment',\n FRAGMENT_SPREAD: 'FragmentSpread',\n INLINE_DATA_FRAGMENT_SPREAD: 'InlineDataFragmentSpread',\n INLINE_DATA_FRAGMENT: 'InlineDataFragment',\n INLINE_FRAGMENT: 'InlineFragment',\n LINKED_FIELD: 'LinkedField',\n LINKED_HANDLE: 'LinkedHandle',\n LITERAL: 'Literal',\n LIST_VALUE: 'ListValue',\n LOCAL_ARGUMENT: 'LocalArgument',\n MODULE_IMPORT: 'ModuleImport',\n RELAY_RESOLVER: 'RelayResolver',\n REQUIRED_FIELD: 'RequiredField',\n OBJECT_VALUE: 'ObjectValue',\n OPERATION: 'Operation',\n REQUEST: 'Request',\n ROOT_ARGUMENT: 'RootArgument',\n SCALAR_FIELD: 'ScalarField',\n SCALAR_HANDLE: 'ScalarHandle',\n SPLIT_OPERATION: 'SplitOperation',\n STREAM: 'Stream',\n TYPE_DISCRIMINATOR: 'TypeDiscriminator',\n VARIABLE: 'Variable'\n};\nmodule.exports = RelayConcreteNode;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\nvar RelayConcreteNode = require('../util/RelayConcreteNode');\n\nvar getRelayHandleKey = require('../util/getRelayHandleKey');\n\nvar invariant = require('invariant');\n\nvar stableCopy = require('../util/stableCopy');\n\nvar VARIABLE = RelayConcreteNode.VARIABLE,\n LITERAL = RelayConcreteNode.LITERAL,\n OBJECT_VALUE = RelayConcreteNode.OBJECT_VALUE,\n LIST_VALUE = RelayConcreteNode.LIST_VALUE;\nvar MODULE_COMPONENT_KEY_PREFIX = '__module_component_';\nvar MODULE_OPERATION_KEY_PREFIX = '__module_operation_';\n\nfunction getArgumentValue(arg, variables) {\n if (arg.kind === VARIABLE) {\n // Variables are provided at runtime and are not guaranteed to be stable.\n return getStableVariableValue(arg.variableName, variables);\n } else if (arg.kind === LITERAL) {\n // The Relay compiler generates stable ConcreteArgument values.\n return arg.value;\n } else if (arg.kind === OBJECT_VALUE) {\n var value = {};\n arg.fields.forEach(function (field) {\n value[field.name] = getArgumentValue(field, variables);\n });\n return value;\n } else if (arg.kind === LIST_VALUE) {\n var _value = [];\n arg.items.forEach(function (item) {\n item != null ? _value.push(getArgumentValue(item, variables)) : null;\n });\n return _value;\n }\n}\n/**\n * Returns the values of field/fragment arguments as an object keyed by argument\n * names. Guaranteed to return a result with stable ordered nested values.\n */\n\n\nfunction getArgumentValues(args, variables) {\n var values = {};\n args.forEach(function (arg) {\n values[arg.name] = getArgumentValue(arg, variables);\n });\n return values;\n}\n/**\n * Given a handle field and variable values, returns a key that can be used to\n * uniquely identify the combination of the handle name and argument values.\n *\n * Note: the word \"storage\" here refers to the fact this key is primarily used\n * when writing the results of a key in a normalized graph or \"store\". This\n * name was used in previous implementations of Relay internals and is also\n * used here for consistency.\n */\n\n\nfunction getHandleStorageKey(handleField, variables) {\n var dynamicKey = handleField.dynamicKey,\n handle = handleField.handle,\n key = handleField.key,\n name = handleField.name,\n args = handleField.args,\n filters = handleField.filters;\n var handleName = getRelayHandleKey(handle, key, name);\n var filterArgs = null;\n\n if (args && filters && args.length !== 0 && filters.length !== 0) {\n filterArgs = args.filter(function (arg) {\n return filters.indexOf(arg.name) > -1;\n });\n }\n\n if (dynamicKey) {\n // \"Sort\" the arguments by argument name: this is done by the compiler for\n // user-supplied arguments but the dynamic argument must also be in sorted\n // order. Note that dynamic key argument name is double-underscore-\n // -prefixed, and a double-underscore prefix is disallowed for user-supplied\n // argument names, so there's no need to actually sort.\n filterArgs = filterArgs != null ? [dynamicKey].concat((0, _toConsumableArray2[\"default\"])(filterArgs)) : [dynamicKey];\n }\n\n if (filterArgs === null) {\n return handleName;\n } else {\n return formatStorageKey(handleName, getArgumentValues(filterArgs, variables));\n }\n}\n/**\n * Given a field and variable values, returns a key that can be used to\n * uniquely identify the combination of the field name and argument values.\n *\n * Note: the word \"storage\" here refers to the fact this key is primarily used\n * when writing the results of a key in a normalized graph or \"store\". This\n * name was used in previous implementations of Relay internals and is also\n * used here for consistency.\n */\n\n\nfunction getStorageKey(field, variables) {\n if (field.storageKey) {\n // TODO T23663664: Handle nodes do not yet define a static storageKey.\n return field.storageKey;\n }\n\n var args = field.args,\n name = field.name;\n return args && args.length !== 0 ? formatStorageKey(name, getArgumentValues(args, variables)) : name;\n}\n/**\n * Given a `name` (eg. \"foo\") and an object representing argument values\n * (eg. `{orberBy: \"name\", first: 10}`) returns a unique storage key\n * (ie. `foo{\"first\":10,\"orderBy\":\"name\"}`).\n *\n * This differs from getStorageKey which requires a ConcreteNode where arguments\n * are assumed to already be sorted into a stable order.\n */\n\n\nfunction getStableStorageKey(name, args) {\n return formatStorageKey(name, stableCopy(args));\n}\n/**\n * Given a name and argument values, format a storage key.\n *\n * Arguments and the values within them are expected to be ordered in a stable\n * alphabetical ordering.\n */\n\n\nfunction formatStorageKey(name, argValues) {\n if (!argValues) {\n return name;\n }\n\n var values = [];\n\n for (var argName in argValues) {\n if (argValues.hasOwnProperty(argName)) {\n var value = argValues[argName];\n\n if (value != null) {\n var _JSON$stringify;\n\n values.push(argName + ':' + ((_JSON$stringify = JSON.stringify(value)) !== null && _JSON$stringify !== void 0 ? _JSON$stringify : 'undefined'));\n }\n }\n }\n\n return values.length === 0 ? name : name + \"(\".concat(values.join(','), \")\");\n}\n/**\n * Given Variables and a variable name, return a variable value with\n * all values in a stable order.\n */\n\n\nfunction getStableVariableValue(name, variables) {\n !variables.hasOwnProperty(name) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'getVariableValue(): Undefined variable `%s`.', name) : invariant(false) : void 0; // $FlowFixMe[cannot-write]\n\n return stableCopy(variables[name]);\n}\n\nfunction getModuleComponentKey(documentName) {\n return \"\".concat(MODULE_COMPONENT_KEY_PREFIX).concat(documentName);\n}\n\nfunction getModuleOperationKey(documentName) {\n return \"\".concat(MODULE_OPERATION_KEY_PREFIX).concat(documentName);\n}\n/**\n * Constants shared by all implementations of RecordSource/MutableRecordSource/etc.\n */\n\n\nvar RelayStoreUtils = {\n FRAGMENTS_KEY: '__fragments',\n FRAGMENT_OWNER_KEY: '__fragmentOwner',\n FRAGMENT_PROP_NAME_KEY: '__fragmentPropName',\n MODULE_COMPONENT_KEY: '__module_component',\n // alias returned by Reader\n ID_KEY: '__id',\n REF_KEY: '__ref',\n REFS_KEY: '__refs',\n ROOT_ID: 'client:root',\n ROOT_TYPE: '__Root',\n TYPENAME_KEY: '__typename',\n INVALIDATED_AT_KEY: '__invalidated_at',\n IS_WITHIN_UNMATCHED_TYPE_REFINEMENT: '__isWithinUnmatchedTypeRefinement',\n formatStorageKey: formatStorageKey,\n getArgumentValue: getArgumentValue,\n getArgumentValues: getArgumentValues,\n getHandleStorageKey: getHandleStorageKey,\n getStorageKey: getStorageKey,\n getStableStorageKey: getStableStorageKey,\n getModuleComponentKey: getModuleComponentKey,\n getModuleOperationKey: getModuleOperationKey\n};\nmodule.exports = RelayStoreUtils;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar invariant = require('invariant');\n\nvar _require = require('../store/RelayStoreUtils'),\n getStorageKey = _require.getStorageKey,\n ROOT_TYPE = _require.ROOT_TYPE;\n\n/**\n * @internal\n *\n * A subclass of RecordSourceProxy that provides convenience methods for\n * accessing the root fields of a given query/mutation. These fields accept\n * complex arguments and it can be tedious to re-construct the correct sets of\n * arguments to pass to e.g. `getRoot().getLinkedRecord()`.\n */\nvar RelayRecordSourceSelectorProxy = /*#__PURE__*/function () {\n function RelayRecordSourceSelectorProxy(mutator, recordSource, readSelector) {\n this.__mutator = mutator;\n this.__recordSource = recordSource;\n this._readSelector = readSelector;\n }\n\n var _proto = RelayRecordSourceSelectorProxy.prototype;\n\n _proto.create = function create(dataID, typeName) {\n return this.__recordSource.create(dataID, typeName);\n };\n\n _proto[\"delete\"] = function _delete(dataID) {\n this.__recordSource[\"delete\"](dataID);\n };\n\n _proto.get = function get(dataID) {\n return this.__recordSource.get(dataID);\n };\n\n _proto.getRoot = function getRoot() {\n return this.__recordSource.getRoot();\n };\n\n _proto.getOperationRoot = function getOperationRoot() {\n var root = this.__recordSource.get(this._readSelector.dataID);\n\n if (!root) {\n root = this.__recordSource.create(this._readSelector.dataID, ROOT_TYPE);\n }\n\n return root;\n };\n\n _proto._getRootField = function _getRootField(selector, fieldName, plural) {\n var field = selector.node.selections.find(function (selection) {\n return selection.kind === 'LinkedField' && selection.name === fieldName;\n });\n !(field && field.kind === 'LinkedField') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayRecordSourceSelectorProxy#getRootField(): Cannot find root ' + 'field `%s`, no such field is defined on GraphQL document `%s`.', fieldName, selector.node.name) : invariant(false) : void 0;\n !(field.plural === plural) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayRecordSourceSelectorProxy#getRootField(): Expected root field ' + '`%s` to be %s.', fieldName, plural ? 'plural' : 'singular') : invariant(false) : void 0;\n return field;\n };\n\n _proto.getRootField = function getRootField(fieldName) {\n var field = this._getRootField(this._readSelector, fieldName, false);\n\n var storageKey = getStorageKey(field, this._readSelector.variables);\n return this.getOperationRoot().getLinkedRecord(storageKey);\n };\n\n _proto.getPluralRootField = function getPluralRootField(fieldName) {\n var field = this._getRootField(this._readSelector, fieldName, true);\n\n var storageKey = getStorageKey(field, this._readSelector.variables);\n return this.getOperationRoot().getLinkedRecords(storageKey);\n };\n\n _proto.invalidateStore = function invalidateStore() {\n this.__recordSource.invalidateStore();\n };\n\n return RelayRecordSourceSelectorProxy;\n}();\n\nmodule.exports = RelayRecordSourceSelectorProxy;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _createForOfIteratorHelper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createForOfIteratorHelper\"));\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\nvar RelayFeatureFlags = require('../util/RelayFeatureFlags');\n\nvar RelayModernRecord = require('./RelayModernRecord');\n\nvar areEqual = require(\"fbjs/lib/areEqual\");\n\nvar invariant = require('invariant');\n\nvar warning = require(\"fbjs/lib/warning\");\n\nvar _require = require('../util/RelayConcreteNode'),\n CONDITION = _require.CONDITION,\n CLIENT_COMPONENT = _require.CLIENT_COMPONENT,\n CLIENT_EXTENSION = _require.CLIENT_EXTENSION,\n DEFER = _require.DEFER,\n FLIGHT_FIELD = _require.FLIGHT_FIELD,\n FRAGMENT_SPREAD = _require.FRAGMENT_SPREAD,\n INLINE_FRAGMENT = _require.INLINE_FRAGMENT,\n LINKED_FIELD = _require.LINKED_FIELD,\n LINKED_HANDLE = _require.LINKED_HANDLE,\n MODULE_IMPORT = _require.MODULE_IMPORT,\n SCALAR_FIELD = _require.SCALAR_FIELD,\n SCALAR_HANDLE = _require.SCALAR_HANDLE,\n STREAM = _require.STREAM,\n TYPE_DISCRIMINATOR = _require.TYPE_DISCRIMINATOR;\n\nvar _require2 = require('./ClientID'),\n generateClientID = _require2.generateClientID,\n isClientID = _require2.isClientID;\n\nvar _require3 = require('./RelayModernSelector'),\n createNormalizationSelector = _require3.createNormalizationSelector;\n\nvar _require4 = require('./RelayStoreReactFlightUtils'),\n refineToReactFlightPayloadData = _require4.refineToReactFlightPayloadData,\n REACT_FLIGHT_EXECUTABLE_DEFINITIONS_STORAGE_KEY = _require4.REACT_FLIGHT_EXECUTABLE_DEFINITIONS_STORAGE_KEY,\n REACT_FLIGHT_TREE_STORAGE_KEY = _require4.REACT_FLIGHT_TREE_STORAGE_KEY,\n REACT_FLIGHT_TYPE_NAME = _require4.REACT_FLIGHT_TYPE_NAME;\n\nvar _require5 = require('./RelayStoreUtils'),\n getArgumentValues = _require5.getArgumentValues,\n getHandleStorageKey = _require5.getHandleStorageKey,\n getModuleComponentKey = _require5.getModuleComponentKey,\n getModuleOperationKey = _require5.getModuleOperationKey,\n getStorageKey = _require5.getStorageKey,\n TYPENAME_KEY = _require5.TYPENAME_KEY,\n ROOT_ID = _require5.ROOT_ID,\n ROOT_TYPE = _require5.ROOT_TYPE;\n\nvar _require6 = require('./TypeID'),\n generateTypeID = _require6.generateTypeID,\n TYPE_SCHEMA_TYPE = _require6.TYPE_SCHEMA_TYPE;\n\n/**\n * Normalizes the results of a query and standard GraphQL response, writing the\n * normalized records/fields into the given MutableRecordSource.\n */\nfunction normalize(recordSource, selector, response, options) {\n var dataID = selector.dataID,\n node = selector.node,\n variables = selector.variables;\n var normalizer = new RelayResponseNormalizer(recordSource, variables, options);\n return normalizer.normalizeResponse(node, dataID, response);\n}\n/**\n * @private\n *\n * Helper for handling payloads.\n */\n\n\nvar RelayResponseNormalizer = /*#__PURE__*/function () {\n function RelayResponseNormalizer(recordSource, variables, options) {\n this._getDataId = options.getDataID;\n this._handleFieldPayloads = [];\n this._treatMissingFieldsAsNull = options.treatMissingFieldsAsNull;\n this._incrementalPlaceholders = [];\n this._isClientExtension = false;\n this._isUnmatchedAbstractType = false;\n this._moduleImportPayloads = [];\n this._path = options.path ? (0, _toConsumableArray2[\"default\"])(options.path) : [];\n this._recordSource = recordSource;\n this._variables = variables;\n this._reactFlightPayloadDeserializer = options.reactFlightPayloadDeserializer;\n this._reactFlightServerErrorHandler = options.reactFlightServerErrorHandler;\n this._shouldProcessClientComponents = options.shouldProcessClientComponents;\n }\n\n var _proto = RelayResponseNormalizer.prototype;\n\n _proto.normalizeResponse = function normalizeResponse(node, dataID, data) {\n var record = this._recordSource.get(dataID);\n\n !record ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer(): Expected root record `%s` to exist.', dataID) : invariant(false) : void 0;\n\n this._traverseSelections(node, record, data);\n\n return {\n errors: null,\n fieldPayloads: this._handleFieldPayloads,\n incrementalPlaceholders: this._incrementalPlaceholders,\n moduleImportPayloads: this._moduleImportPayloads,\n source: this._recordSource,\n isFinal: false\n };\n };\n\n _proto._getVariableValue = function _getVariableValue(name) {\n !this._variables.hasOwnProperty(name) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer(): Undefined variable `%s`.', name) : invariant(false) : void 0; // $FlowFixMe[cannot-write]\n\n return this._variables[name];\n };\n\n _proto._getRecordType = function _getRecordType(data) {\n var typeName = data[TYPENAME_KEY];\n !(typeName != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer(): Expected a typename for record `%s`.', JSON.stringify(data, null, 2)) : invariant(false) : void 0;\n return typeName;\n };\n\n _proto._traverseSelections = function _traverseSelections(node, record, data) {\n for (var i = 0; i < node.selections.length; i++) {\n var selection = node.selections[i];\n\n switch (selection.kind) {\n case SCALAR_FIELD:\n case LINKED_FIELD:\n this._normalizeField(node, selection, record, data);\n\n break;\n\n case CONDITION:\n var conditionValue = this._getVariableValue(selection.condition);\n\n if (conditionValue === selection.passingValue) {\n this._traverseSelections(selection, record, data);\n }\n\n break;\n\n case FRAGMENT_SPREAD:\n {\n this._traverseSelections(selection.fragment, record, data);\n\n break;\n }\n\n case INLINE_FRAGMENT:\n {\n var abstractKey = selection.abstractKey;\n\n if (abstractKey == null) {\n var _typeName = RelayModernRecord.getType(record);\n\n if (_typeName === selection.type) {\n this._traverseSelections(selection, record, data);\n }\n } else if (RelayFeatureFlags.ENABLE_PRECISE_TYPE_REFINEMENT) {\n var implementsInterface = data.hasOwnProperty(abstractKey);\n\n var _typeName2 = RelayModernRecord.getType(record);\n\n var typeID = generateTypeID(_typeName2);\n\n var typeRecord = this._recordSource.get(typeID);\n\n if (typeRecord == null) {\n typeRecord = RelayModernRecord.create(typeID, TYPE_SCHEMA_TYPE);\n\n this._recordSource.set(typeID, typeRecord);\n }\n\n RelayModernRecord.setValue(typeRecord, abstractKey, implementsInterface);\n\n if (implementsInterface) {\n this._traverseSelections(selection, record, data);\n }\n } else {\n // legacy behavior for abstract refinements: always normalize even\n // if the type doesn't conform, but track if the type matches or not\n // for determining whether response fields are expected to be present\n var _implementsInterface = data.hasOwnProperty(abstractKey);\n\n var parentIsUnmatchedAbstractType = this._isUnmatchedAbstractType;\n this._isUnmatchedAbstractType = this._isUnmatchedAbstractType || !_implementsInterface;\n\n this._traverseSelections(selection, record, data);\n\n this._isUnmatchedAbstractType = parentIsUnmatchedAbstractType;\n }\n\n break;\n }\n\n case TYPE_DISCRIMINATOR:\n {\n if (RelayFeatureFlags.ENABLE_PRECISE_TYPE_REFINEMENT) {\n var _abstractKey = selection.abstractKey;\n\n var _implementsInterface2 = data.hasOwnProperty(_abstractKey);\n\n var _typeName3 = RelayModernRecord.getType(record);\n\n var _typeID = generateTypeID(_typeName3);\n\n var _typeRecord = this._recordSource.get(_typeID);\n\n if (_typeRecord == null) {\n _typeRecord = RelayModernRecord.create(_typeID, TYPE_SCHEMA_TYPE);\n\n this._recordSource.set(_typeID, _typeRecord);\n }\n\n RelayModernRecord.setValue(_typeRecord, _abstractKey, _implementsInterface2);\n }\n\n break;\n }\n\n case LINKED_HANDLE:\n case SCALAR_HANDLE:\n var args = selection.args ? getArgumentValues(selection.args, this._variables) : {};\n var fieldKey = getStorageKey(selection, this._variables);\n var handleKey = getHandleStorageKey(selection, this._variables);\n\n this._handleFieldPayloads.push({\n args: args,\n dataID: RelayModernRecord.getDataID(record),\n fieldKey: fieldKey,\n handle: selection.handle,\n handleKey: handleKey,\n handleArgs: selection.handleArgs ? getArgumentValues(selection.handleArgs, this._variables) : {}\n });\n\n break;\n\n case MODULE_IMPORT:\n this._normalizeModuleImport(node, selection, record, data);\n\n break;\n\n case DEFER:\n this._normalizeDefer(selection, record, data);\n\n break;\n\n case STREAM:\n this._normalizeStream(selection, record, data);\n\n break;\n\n case CLIENT_EXTENSION:\n var isClientExtension = this._isClientExtension;\n this._isClientExtension = true;\n\n this._traverseSelections(selection, record, data);\n\n this._isClientExtension = isClientExtension;\n break;\n\n case CLIENT_COMPONENT:\n if (this._shouldProcessClientComponents === false) {\n break;\n }\n\n this._traverseSelections(selection.fragment, record, data);\n\n break;\n\n case FLIGHT_FIELD:\n if (RelayFeatureFlags.ENABLE_REACT_FLIGHT_COMPONENT_FIELD) {\n this._normalizeFlightField(node, selection, record, data);\n } else {\n throw new Error('Flight fields are not yet supported.');\n }\n\n break;\n\n default:\n selection;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer(): Unexpected ast kind `%s`.', selection.kind) : invariant(false) : void 0;\n }\n }\n };\n\n _proto._normalizeDefer = function _normalizeDefer(defer, record, data) {\n var isDeferred = defer[\"if\"] === null || this._getVariableValue(defer[\"if\"]);\n\n if (process.env.NODE_ENV !== \"production\") {\n process.env.NODE_ENV !== \"production\" ? warning(typeof isDeferred === 'boolean', 'RelayResponseNormalizer: Expected value for @defer `if` argument to ' + 'be a boolean, got `%s`.', isDeferred) : void 0;\n }\n\n if (isDeferred === false) {\n // If defer is disabled there will be no additional response chunk:\n // normalize the data already present.\n this._traverseSelections(defer, record, data);\n } else {\n // Otherwise data *for this selection* should not be present: enqueue\n // metadata to process the subsequent response chunk.\n this._incrementalPlaceholders.push({\n kind: 'defer',\n data: data,\n label: defer.label,\n path: (0, _toConsumableArray2[\"default\"])(this._path),\n selector: createNormalizationSelector(defer, RelayModernRecord.getDataID(record), this._variables),\n typeName: RelayModernRecord.getType(record)\n });\n }\n };\n\n _proto._normalizeStream = function _normalizeStream(stream, record, data) {\n // Always normalize regardless of whether streaming is enabled or not,\n // this populates the initial array value (including any items when\n // initial_count > 0).\n this._traverseSelections(stream, record, data);\n\n var isStreamed = stream[\"if\"] === null || this._getVariableValue(stream[\"if\"]);\n\n if (process.env.NODE_ENV !== \"production\") {\n process.env.NODE_ENV !== \"production\" ? warning(typeof isStreamed === 'boolean', 'RelayResponseNormalizer: Expected value for @stream `if` argument ' + 'to be a boolean, got `%s`.', isStreamed) : void 0;\n }\n\n if (isStreamed === true) {\n // If streaming is enabled, *also* emit metadata to process any\n // response chunks that may be delivered.\n this._incrementalPlaceholders.push({\n kind: 'stream',\n label: stream.label,\n path: (0, _toConsumableArray2[\"default\"])(this._path),\n parentID: RelayModernRecord.getDataID(record),\n node: stream,\n variables: this._variables\n });\n }\n };\n\n _proto._normalizeModuleImport = function _normalizeModuleImport(parent, moduleImport, record, data) {\n !(typeof data === 'object' && data) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer: Expected data for @module to be an object.') : invariant(false) : void 0;\n var typeName = RelayModernRecord.getType(record);\n var componentKey = getModuleComponentKey(moduleImport.documentName);\n var componentReference = data[componentKey];\n RelayModernRecord.setValue(record, componentKey, componentReference !== null && componentReference !== void 0 ? componentReference : null);\n var operationKey = getModuleOperationKey(moduleImport.documentName);\n var operationReference = data[operationKey];\n RelayModernRecord.setValue(record, operationKey, operationReference !== null && operationReference !== void 0 ? operationReference : null);\n\n if (operationReference != null) {\n this._moduleImportPayloads.push({\n data: data,\n dataID: RelayModernRecord.getDataID(record),\n operationReference: operationReference,\n path: (0, _toConsumableArray2[\"default\"])(this._path),\n typeName: typeName,\n variables: this._variables\n });\n }\n };\n\n _proto._normalizeField = function _normalizeField(parent, selection, record, data) {\n !(typeof data === 'object' && data) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'writeField(): Expected data for field `%s` to be an object.', selection.name) : invariant(false) : void 0;\n var responseKey = selection.alias || selection.name;\n var storageKey = getStorageKey(selection, this._variables);\n var fieldValue = data[responseKey];\n\n if (fieldValue == null) {\n if (fieldValue === undefined) {\n // Fields may be missing in the response in two main cases:\n // - Inside a client extension: the server will not generally return\n // values for these fields, but a local update may provide them.\n // - Inside an abstract type refinement where the concrete type does\n // not conform to the interface/union.\n // However an otherwise-required field may also be missing if the server\n // is configured to skip fields with `null` values, in which case the\n // client is assumed to be correctly configured with\n // treatMissingFieldsAsNull=true.\n var isOptionalField = this._isClientExtension || this._isUnmatchedAbstractType;\n\n if (isOptionalField) {\n // Field not expected to exist regardless of whether the server is pruning null\n // fields or not.\n return;\n } else if (!this._treatMissingFieldsAsNull) {\n // Not optional and the server is not pruning null fields: field is expected\n // to be present\n if (process.env.NODE_ENV !== \"production\") {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'RelayResponseNormalizer: Payload did not contain a value ' + 'for field `%s: %s`. Check that you are parsing with the same ' + 'query that was used to fetch the payload.', responseKey, storageKey) : void 0;\n }\n\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (selection.kind === SCALAR_FIELD) {\n this._validateConflictingFieldsWithIdenticalId(record, storageKey, fieldValue);\n }\n }\n\n RelayModernRecord.setValue(record, storageKey, null);\n return;\n }\n\n if (selection.kind === SCALAR_FIELD) {\n if (process.env.NODE_ENV !== \"production\") {\n this._validateConflictingFieldsWithIdenticalId(record, storageKey, fieldValue);\n }\n\n RelayModernRecord.setValue(record, storageKey, fieldValue);\n } else if (selection.kind === LINKED_FIELD) {\n this._path.push(responseKey);\n\n if (selection.plural) {\n this._normalizePluralLink(selection, record, storageKey, fieldValue);\n } else {\n this._normalizeLink(selection, record, storageKey, fieldValue);\n }\n\n this._path.pop();\n } else {\n selection;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer(): Unexpected ast kind `%s` during normalization.', selection.kind) : invariant(false) : void 0;\n }\n };\n\n _proto._normalizeFlightField = function _normalizeFlightField(parent, selection, record, data) {\n var responseKey = selection.alias || selection.name;\n var storageKey = getStorageKey(selection, this._variables);\n var fieldValue = data[responseKey];\n\n if (fieldValue == null) {\n if (fieldValue === undefined) {\n // Flight field may be missing in the response if:\n // - It is inside an abstract type refinement where the concrete type does\n // not conform to the interface/union.\n // However an otherwise-required field may also be missing if the server\n // is configured to skip fields with `null` values, in which case the\n // client is assumed to be correctly configured with\n // treatMissingFieldsAsNull=true.\n if (this._isUnmatchedAbstractType) {\n // Field not expected to exist regardless of whether the server is pruning null\n // fields or not.\n return;\n } else if (!this._treatMissingFieldsAsNull) {\n // Not optional and the server is not pruning null fields: field is expected\n // to be present\n if (process.env.NODE_ENV !== \"production\") {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'RelayResponseNormalizer: Payload did not contain a value ' + 'for field `%s: %s`. Check that you are parsing with the same ' + 'query that was used to fetch the payload.', responseKey, storageKey) : void 0;\n }\n\n return;\n }\n }\n\n RelayModernRecord.setValue(record, storageKey, null);\n return;\n }\n\n var reactFlightPayload = refineToReactFlightPayloadData(fieldValue);\n var reactFlightPayloadDeserializer = this._reactFlightPayloadDeserializer;\n !(reactFlightPayload != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer: Expected React Flight payload data to be an ' + 'object with `status`, tree`, `queries` and `errors` properties, got ' + '`%s`.', fieldValue) : invariant(false) : void 0;\n !(typeof reactFlightPayloadDeserializer === 'function') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer: Expected reactFlightPayloadDeserializer to ' + 'be a function, got `%s`.', reactFlightPayloadDeserializer) : invariant(false) : void 0;\n\n if (reactFlightPayload.errors.length > 0) {\n if (typeof this._reactFlightServerErrorHandler === 'function') {\n this._reactFlightServerErrorHandler(reactFlightPayload.status, reactFlightPayload.errors);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'RelayResponseNormalizer: Received server errors for field `%s`.\\n\\n' + '%s\\n%s', responseKey, reactFlightPayload.errors[0].message, reactFlightPayload.errors[0].stack) : void 0;\n }\n }\n\n var reactFlightID = generateClientID(RelayModernRecord.getDataID(record), getStorageKey(selection, this._variables));\n\n var reactFlightClientResponseRecord = this._recordSource.get(reactFlightID);\n\n if (reactFlightClientResponseRecord == null) {\n reactFlightClientResponseRecord = RelayModernRecord.create(reactFlightID, REACT_FLIGHT_TYPE_NAME);\n\n this._recordSource.set(reactFlightID, reactFlightClientResponseRecord);\n }\n\n if (reactFlightPayload.tree == null) {\n // This typically indicates that a fatal server error prevented rows from\n // being written. When this occurs, we should not continue normalization of\n // the Flight field because the row response is malformed.\n //\n // Receiving empty rows is OK because it can indicate the start of a stream.\n process.env.NODE_ENV !== \"production\" ? warning(false, 'RelayResponseNormalizer: Expected `tree` not to be null. This ' + 'typically indicates that a fatal server error prevented any Server ' + 'Component rows from being written.') : void 0; // We create the flight record with a null value for the tree\n // and empty reachable definitions\n\n RelayModernRecord.setValue(reactFlightClientResponseRecord, REACT_FLIGHT_TREE_STORAGE_KEY, null);\n RelayModernRecord.setValue(reactFlightClientResponseRecord, REACT_FLIGHT_EXECUTABLE_DEFINITIONS_STORAGE_KEY, []);\n RelayModernRecord.setLinkedRecordID(record, storageKey, reactFlightID);\n return;\n } // We store the deserialized reactFlightClientResponse in a separate\n // record and link it to the parent record. This is so we can GC the Flight\n // tree later even if the parent record is still reachable.\n\n\n var reactFlightClientResponse = reactFlightPayloadDeserializer(reactFlightPayload.tree);\n RelayModernRecord.setValue(reactFlightClientResponseRecord, REACT_FLIGHT_TREE_STORAGE_KEY, reactFlightClientResponse);\n var reachableExecutableDefinitions = [];\n\n var _iterator = (0, _createForOfIteratorHelper2[\"default\"])(reactFlightPayload.queries),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var query = _step.value;\n\n if (query.response.data != null) {\n this._moduleImportPayloads.push({\n data: query.response.data,\n dataID: ROOT_ID,\n operationReference: query.module,\n path: [],\n typeName: ROOT_TYPE,\n variables: query.variables\n });\n }\n\n reachableExecutableDefinitions.push({\n module: query.module,\n variables: query.variables\n });\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n var _iterator2 = (0, _createForOfIteratorHelper2[\"default\"])(reactFlightPayload.fragments),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var fragment = _step2.value;\n\n if (fragment.response.data != null) {\n this._moduleImportPayloads.push({\n data: fragment.response.data,\n dataID: fragment.__id,\n operationReference: fragment.module,\n path: [],\n typeName: fragment.__typename,\n variables: fragment.variables\n });\n }\n\n reachableExecutableDefinitions.push({\n module: fragment.module,\n variables: fragment.variables\n });\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n RelayModernRecord.setValue(reactFlightClientResponseRecord, REACT_FLIGHT_EXECUTABLE_DEFINITIONS_STORAGE_KEY, reachableExecutableDefinitions);\n RelayModernRecord.setLinkedRecordID(record, storageKey, reactFlightID);\n };\n\n _proto._normalizeLink = function _normalizeLink(field, record, storageKey, fieldValue) {\n var _field$concreteType;\n\n !(typeof fieldValue === 'object' && fieldValue) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer: Expected data for field `%s` to be an object.', storageKey) : invariant(false) : void 0;\n var nextID = this._getDataId( // $FlowFixMe[incompatible-variance]\n fieldValue, // $FlowFixMe[incompatible-variance]\n (_field$concreteType = field.concreteType) !== null && _field$concreteType !== void 0 ? _field$concreteType : this._getRecordType(fieldValue)) || // Reuse previously generated client IDs\n RelayModernRecord.getLinkedRecordID(record, storageKey) || generateClientID(RelayModernRecord.getDataID(record), storageKey);\n !(typeof nextID === 'string') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer: Expected id on field `%s` to be a string.', storageKey) : invariant(false) : void 0;\n\n if (process.env.NODE_ENV !== \"production\") {\n this._validateConflictingLinkedFieldsWithIdenticalId(record, RelayModernRecord.getLinkedRecordID(record, storageKey), nextID, storageKey);\n }\n\n RelayModernRecord.setLinkedRecordID(record, storageKey, nextID);\n\n var nextRecord = this._recordSource.get(nextID);\n\n if (!nextRecord) {\n // $FlowFixMe[incompatible-variance]\n var _typeName4 = field.concreteType || this._getRecordType(fieldValue);\n\n nextRecord = RelayModernRecord.create(nextID, _typeName4);\n\n this._recordSource.set(nextID, nextRecord);\n } else if (process.env.NODE_ENV !== \"production\") {\n this._validateRecordType(nextRecord, field, fieldValue);\n } // $FlowFixMe[incompatible-variance]\n\n\n this._traverseSelections(field, nextRecord, fieldValue);\n };\n\n _proto._normalizePluralLink = function _normalizePluralLink(field, record, storageKey, fieldValue) {\n var _this = this;\n\n !Array.isArray(fieldValue) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer: Expected data for field `%s` to be an array ' + 'of objects.', storageKey) : invariant(false) : void 0;\n var prevIDs = RelayModernRecord.getLinkedRecordIDs(record, storageKey);\n var nextIDs = [];\n fieldValue.forEach(function (item, nextIndex) {\n var _field$concreteType2;\n\n // validate response data\n if (item == null) {\n nextIDs.push(item);\n return;\n }\n\n _this._path.push(String(nextIndex));\n\n !(typeof item === 'object') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer: Expected elements for field `%s` to be ' + 'objects.', storageKey) : invariant(false) : void 0;\n var nextID = _this._getDataId( // $FlowFixMe[incompatible-variance]\n item, // $FlowFixMe[incompatible-variance]\n (_field$concreteType2 = field.concreteType) !== null && _field$concreteType2 !== void 0 ? _field$concreteType2 : _this._getRecordType(item)) || prevIDs && prevIDs[nextIndex] || // Reuse previously generated client IDs:\n generateClientID(RelayModernRecord.getDataID(record), storageKey, nextIndex);\n !(typeof nextID === 'string') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayResponseNormalizer: Expected id of elements of field `%s` to ' + 'be strings.', storageKey) : invariant(false) : void 0;\n nextIDs.push(nextID);\n\n var nextRecord = _this._recordSource.get(nextID);\n\n if (!nextRecord) {\n // $FlowFixMe[incompatible-variance]\n var _typeName5 = field.concreteType || _this._getRecordType(item);\n\n nextRecord = RelayModernRecord.create(nextID, _typeName5);\n\n _this._recordSource.set(nextID, nextRecord);\n } else if (process.env.NODE_ENV !== \"production\") {\n _this._validateRecordType(nextRecord, field, item);\n } // NOTE: the check to strip __DEV__ code only works for simple\n // `if (__DEV__)`\n\n\n if (process.env.NODE_ENV !== \"production\") {\n if (prevIDs) {\n _this._validateConflictingLinkedFieldsWithIdenticalId(record, prevIDs[nextIndex], nextID, storageKey);\n }\n } // $FlowFixMe[incompatible-variance]\n\n\n _this._traverseSelections(field, nextRecord, item);\n\n _this._path.pop();\n });\n RelayModernRecord.setLinkedRecordIDs(record, storageKey, nextIDs);\n }\n /**\n * Warns if the type of the record does not match the type of the field/payload.\n */\n ;\n\n _proto._validateRecordType = function _validateRecordType(record, field, payload) {\n var _field$concreteType3;\n\n var typeName = (_field$concreteType3 = field.concreteType) !== null && _field$concreteType3 !== void 0 ? _field$concreteType3 : this._getRecordType(payload);\n var dataID = RelayModernRecord.getDataID(record);\n process.env.NODE_ENV !== \"production\" ? warning(isClientID(dataID) && dataID !== ROOT_ID || RelayModernRecord.getType(record) === typeName, 'RelayResponseNormalizer: Invalid record `%s`. Expected %s to be ' + 'consistent, but the record was assigned conflicting types `%s` ' + 'and `%s`. The GraphQL server likely violated the globally unique ' + 'id requirement by returning the same id for different objects.', dataID, TYPENAME_KEY, RelayModernRecord.getType(record), typeName) : void 0;\n }\n /**\n * Warns if a single response contains conflicting fields with the same id\n */\n ;\n\n _proto._validateConflictingFieldsWithIdenticalId = function _validateConflictingFieldsWithIdenticalId(record, storageKey, fieldValue) {\n // NOTE: Only call this function in DEV\n if (process.env.NODE_ENV !== \"production\") {\n var dataID = RelayModernRecord.getDataID(record);\n var previousValue = RelayModernRecord.getValue(record, storageKey);\n process.env.NODE_ENV !== \"production\" ? warning(storageKey === TYPENAME_KEY || previousValue === undefined || areEqual(previousValue, fieldValue), 'RelayResponseNormalizer: Invalid record. The record contains two ' + 'instances of the same id: `%s` with conflicting field, %s and its values: %s and %s. ' + 'If two fields are different but share ' + 'the same id, one field will overwrite the other.', dataID, storageKey, previousValue, fieldValue) : void 0;\n }\n }\n /**\n * Warns if a single response contains conflicting fields with the same id\n */\n ;\n\n _proto._validateConflictingLinkedFieldsWithIdenticalId = function _validateConflictingLinkedFieldsWithIdenticalId(record, prevID, nextID, storageKey) {\n // NOTE: Only call this function in DEV\n if (process.env.NODE_ENV !== \"production\") {\n process.env.NODE_ENV !== \"production\" ? warning(prevID === undefined || prevID === nextID, 'RelayResponseNormalizer: Invalid record. The record contains ' + 'references to the conflicting field, %s and its id values: %s and %s. ' + 'We need to make sure that the record the field points ' + 'to remains consistent or one field will overwrite the other.', storageKey, prevID, nextID) : void 0;\n }\n };\n\n return RelayResponseNormalizer;\n}();\n\nmodule.exports = {\n normalize: normalize\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nvar defaultRequiredFieldLogger = function defaultRequiredFieldLogger(event) {\n if (process.env.NODE_ENV !== \"production\" && event.kind === 'missing_field.log') {\n throw new Error('Relay Environment Configuration Error (dev only): `@required(action: LOG)` requires that the Relay Environment be configured with a `requiredFieldLogger`.');\n }\n};\n\nmodule.exports = defaultRequiredFieldLogger;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n/**\n * A fast test to determine if two values are equal scalars:\n * - compares scalars such as booleans, strings, numbers by value\n * - compares functions by identity\n * - returns false for complex values, since these cannot be cheaply tested for\n * equality (use `areEquals` instead)\n */\n\nfunction isScalarAndEqual(valueA, valueB) {\n return valueA === valueB && (valueA === null || typeof valueA !== 'object');\n}\n\nmodule.exports = isScalarAndEqual;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nfunction isPromise(p) {\n return !!p && typeof p.then === 'function';\n}\n\nmodule.exports = isPromise;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar areEqual = require(\"fbjs/lib/areEqual\");\n\nvar invariant = require('invariant');\n\nvar _require = require('../util/RelayConcreteNode'),\n SCALAR_FIELD = _require.SCALAR_FIELD;\n\nvar _require2 = require('./RelayStoreUtils'),\n getHandleStorageKey = _require2.getHandleStorageKey;\n\n/**\n * @private\n *\n * Creates a clone of the supplied `handleField` by finding the original scalar\n * field (on which the handle was declared) among the sibling `selections`.\n */\nfunction cloneRelayScalarHandleSourceField(handleField, selections, variables) {\n var sourceField = selections.find(function (source) {\n return source.kind === SCALAR_FIELD && source.name === handleField.name && source.alias === handleField.alias && areEqual(source.args, handleField.args);\n });\n !(sourceField && sourceField.kind === SCALAR_FIELD) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'cloneRelayScalarHandleSourceField: Expected a corresponding source field for ' + 'handle `%s`.', handleField.handle) : invariant(false) : void 0;\n var handleKey = getHandleStorageKey(handleField, variables);\n return {\n kind: 'ScalarField',\n alias: sourceField.alias,\n name: handleKey,\n storageKey: handleKey,\n args: null\n };\n}\n\nmodule.exports = cloneRelayScalarHandleSourceField;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar ConnectionHandler = require('./handlers/connection/ConnectionHandler');\n\nvar ConnectionInterface = require('./handlers/connection/ConnectionInterface');\n\nvar GraphQLTag = require('./query/GraphQLTag');\n\nvar MutationHandlers = require('./handlers/connection/MutationHandlers');\n\nvar PreloadableQueryRegistry = require('./query/PreloadableQueryRegistry');\n\nvar RelayConcreteNode = require('./util/RelayConcreteNode');\n\nvar RelayConcreteVariables = require('./store/RelayConcreteVariables');\n\nvar RelayDeclarativeMutationConfig = require('./mutations/RelayDeclarativeMutationConfig');\n\nvar RelayDefaultHandleKey = require('./util/RelayDefaultHandleKey');\n\nvar RelayDefaultHandlerProvider = require('./handlers/RelayDefaultHandlerProvider');\n\nvar RelayError = require('./util/RelayError');\n\nvar RelayFeatureFlags = require('./util/RelayFeatureFlags');\n\nvar RelayModernEnvironment = require('./store/RelayModernEnvironment');\n\nvar RelayModernOperationDescriptor = require('./store/RelayModernOperationDescriptor');\n\nvar RelayModernRecord = require('./store/RelayModernRecord');\n\nvar RelayModernSelector = require('./store/RelayModernSelector');\n\nvar RelayModernStore = require('./store/RelayModernStore');\n\nvar RelayNetwork = require('./network/RelayNetwork');\n\nvar RelayObservable = require('./network/RelayObservable');\n\nvar RelayOperationTracker = require('./store/RelayOperationTracker');\n\nvar RelayProfiler = require('./util/RelayProfiler');\n\nvar RelayQueryResponseCache = require('./network/RelayQueryResponseCache');\n\nvar RelayRecordSource = require('./store/RelayRecordSource');\n\nvar RelayReplaySubject = require('./util/RelayReplaySubject');\n\nvar RelayStoreUtils = require('./store/RelayStoreUtils');\n\nvar ViewerPattern = require('./store/ViewerPattern');\n\nvar applyOptimisticMutation = require('./mutations/applyOptimisticMutation');\n\nvar commitLocalUpdate = require('./mutations/commitLocalUpdate');\n\nvar commitMutation = require('./mutations/commitMutation');\n\nvar createFragmentSpecResolver = require('./store/createFragmentSpecResolver');\n\nvar createPayloadFor3DField = require('./util/createPayloadFor3DField');\n\nvar createRelayContext = require('./store/createRelayContext');\n\nvar deepFreeze = require('./util/deepFreeze');\n\nvar fetchQuery = require('./query/fetchQuery');\n\nvar fetchQueryInternal = require('./query/fetchQueryInternal');\n\nvar fetchQuery_DEPRECATED = require('./query/fetchQuery_DEPRECATED');\n\nvar getFragmentIdentifier = require('./util/getFragmentIdentifier');\n\nvar getRelayHandleKey = require('./util/getRelayHandleKey');\n\nvar getRequestIdentifier = require('./util/getRequestIdentifier');\n\nvar isPromise = require('./util/isPromise');\n\nvar isRelayModernEnvironment = require('./store/isRelayModernEnvironment');\n\nvar isScalarAndEqual = require('./util/isScalarAndEqual');\n\nvar readInlineData = require('./store/readInlineData');\n\nvar recycleNodesInto = require('./util/recycleNodesInto');\n\nvar reportMissingRequiredFields = require('./util/reportMissingRequiredFields');\n\nvar requestSubscription = require('./subscription/requestSubscription');\n\nvar stableCopy = require('./util/stableCopy');\n\nvar _require = require('./store/ClientID'),\n generateClientID = _require.generateClientID,\n generateUniqueClientID = _require.generateUniqueClientID,\n isClientID = _require.isClientID;\n\n// As early as possible, check for the existence of the JavaScript globals which\n// Relay Runtime relies upon, and produce a clear message if they do not exist.\nif (process.env.NODE_ENV !== \"production\") {\n var mapStr = typeof Map !== 'function' ? 'Map' : null;\n var setStr = typeof Set !== 'function' ? 'Set' : null;\n var promiseStr = typeof Promise !== 'function' ? 'Promise' : null;\n var objStr = typeof Object.assign !== 'function' ? 'Object.assign' : null;\n\n if (mapStr || setStr || promiseStr || objStr) {\n throw new Error(\"relay-runtime requires \".concat([mapStr, setStr, promiseStr, objStr].filter(Boolean).join(', and '), \" to exist. \") + 'Use a polyfill to provide these for older browsers.');\n }\n}\n/**\n * The public interface to Relay Runtime.\n */\n\n\nmodule.exports = {\n // Core API\n Environment: RelayModernEnvironment,\n Network: RelayNetwork,\n Observable: RelayObservable,\n QueryResponseCache: RelayQueryResponseCache,\n RecordSource: RelayRecordSource,\n Record: RelayModernRecord,\n ReplaySubject: RelayReplaySubject,\n Store: RelayModernStore,\n areEqualSelectors: RelayModernSelector.areEqualSelectors,\n createFragmentSpecResolver: createFragmentSpecResolver,\n createNormalizationSelector: RelayModernSelector.createNormalizationSelector,\n createOperationDescriptor: RelayModernOperationDescriptor.createOperationDescriptor,\n createReaderSelector: RelayModernSelector.createReaderSelector,\n createRequestDescriptor: RelayModernOperationDescriptor.createRequestDescriptor,\n getDataIDsFromFragment: RelayModernSelector.getDataIDsFromFragment,\n getDataIDsFromObject: RelayModernSelector.getDataIDsFromObject,\n getNode: GraphQLTag.getNode,\n getFragment: GraphQLTag.getFragment,\n getInlineDataFragment: GraphQLTag.getInlineDataFragment,\n getModuleComponentKey: RelayStoreUtils.getModuleComponentKey,\n getModuleOperationKey: RelayStoreUtils.getModuleOperationKey,\n getPaginationFragment: GraphQLTag.getPaginationFragment,\n getPluralSelector: RelayModernSelector.getPluralSelector,\n getRefetchableFragment: GraphQLTag.getRefetchableFragment,\n getRequest: GraphQLTag.getRequest,\n getRequestIdentifier: getRequestIdentifier,\n getSelector: RelayModernSelector.getSelector,\n getSelectorsFromObject: RelayModernSelector.getSelectorsFromObject,\n getSingularSelector: RelayModernSelector.getSingularSelector,\n getStorageKey: RelayStoreUtils.getStorageKey,\n getVariablesFromFragment: RelayModernSelector.getVariablesFromFragment,\n getVariablesFromObject: RelayModernSelector.getVariablesFromObject,\n getVariablesFromPluralFragment: RelayModernSelector.getVariablesFromPluralFragment,\n getVariablesFromSingularFragment: RelayModernSelector.getVariablesFromSingularFragment,\n reportMissingRequiredFields: reportMissingRequiredFields,\n graphql: GraphQLTag.graphql,\n isFragment: GraphQLTag.isFragment,\n isInlineDataFragment: GraphQLTag.isInlineDataFragment,\n isRequest: GraphQLTag.isRequest,\n readInlineData: readInlineData,\n // Declarative mutation API\n MutationTypes: RelayDeclarativeMutationConfig.MutationTypes,\n RangeOperations: RelayDeclarativeMutationConfig.RangeOperations,\n // Extensions\n DefaultHandlerProvider: RelayDefaultHandlerProvider,\n ConnectionHandler: ConnectionHandler,\n MutationHandlers: MutationHandlers,\n VIEWER_ID: ViewerPattern.VIEWER_ID,\n VIEWER_TYPE: ViewerPattern.VIEWER_TYPE,\n // Helpers (can be implemented via the above API)\n applyOptimisticMutation: applyOptimisticMutation,\n commitLocalUpdate: commitLocalUpdate,\n commitMutation: commitMutation,\n fetchQuery: fetchQuery,\n fetchQuery_DEPRECATED: fetchQuery_DEPRECATED,\n isRelayModernEnvironment: isRelayModernEnvironment,\n requestSubscription: requestSubscription,\n // Configuration interface for legacy or special uses\n ConnectionInterface: ConnectionInterface,\n // Utilities\n PreloadableQueryRegistry: PreloadableQueryRegistry,\n RelayProfiler: RelayProfiler,\n createPayloadFor3DField: createPayloadFor3DField,\n // INTERNAL-ONLY: These exports might be removed at any point.\n RelayConcreteNode: RelayConcreteNode,\n RelayError: RelayError,\n RelayFeatureFlags: RelayFeatureFlags,\n DEFAULT_HANDLE_KEY: RelayDefaultHandleKey.DEFAULT_HANDLE_KEY,\n FRAGMENTS_KEY: RelayStoreUtils.FRAGMENTS_KEY,\n FRAGMENT_OWNER_KEY: RelayStoreUtils.FRAGMENT_OWNER_KEY,\n ID_KEY: RelayStoreUtils.ID_KEY,\n REF_KEY: RelayStoreUtils.REF_KEY,\n REFS_KEY: RelayStoreUtils.REFS_KEY,\n ROOT_ID: RelayStoreUtils.ROOT_ID,\n ROOT_TYPE: RelayStoreUtils.ROOT_TYPE,\n TYPENAME_KEY: RelayStoreUtils.TYPENAME_KEY,\n deepFreeze: deepFreeze,\n generateClientID: generateClientID,\n generateUniqueClientID: generateUniqueClientID,\n getRelayHandleKey: getRelayHandleKey,\n isClientID: isClientID,\n isPromise: isPromise,\n isScalarAndEqual: isScalarAndEqual,\n recycleNodesInto: recycleNodesInto,\n stableCopy: stableCopy,\n getFragmentIdentifier: getFragmentIdentifier,\n __internal: {\n OperationTracker: RelayOperationTracker,\n createRelayContext: createRelayContext,\n getOperationVariables: RelayConcreteVariables.getOperationVariables,\n fetchQuery: fetchQueryInternal.fetchQuery,\n fetchQueryDeduped: fetchQueryInternal.fetchQueryDeduped,\n getPromiseForActiveRequest: fetchQueryInternal.getPromiseForActiveRequest,\n getObservableForActiveRequest: fetchQueryInternal.getObservableForActiveRequest\n }\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _createForOfIteratorHelper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createForOfIteratorHelper\"));\n\nvar RelayConcreteNode = require('../util/RelayConcreteNode');\n\nvar RelayFeatureFlags = require('../util/RelayFeatureFlags');\n\nvar RelayModernRecord = require('./RelayModernRecord');\n\nvar RelayStoreReactFlightUtils = require('./RelayStoreReactFlightUtils');\n\nvar RelayStoreUtils = require('./RelayStoreUtils');\n\nvar cloneRelayHandleSourceField = require('./cloneRelayHandleSourceField');\n\nvar getOperation = require('../util/getOperation');\n\nvar invariant = require('invariant');\n\nvar _require = require('./TypeID'),\n generateTypeID = _require.generateTypeID;\n\nvar CONDITION = RelayConcreteNode.CONDITION,\n CLIENT_COMPONENT = RelayConcreteNode.CLIENT_COMPONENT,\n CLIENT_EXTENSION = RelayConcreteNode.CLIENT_EXTENSION,\n DEFER = RelayConcreteNode.DEFER,\n FLIGHT_FIELD = RelayConcreteNode.FLIGHT_FIELD,\n FRAGMENT_SPREAD = RelayConcreteNode.FRAGMENT_SPREAD,\n INLINE_FRAGMENT = RelayConcreteNode.INLINE_FRAGMENT,\n LINKED_FIELD = RelayConcreteNode.LINKED_FIELD,\n MODULE_IMPORT = RelayConcreteNode.MODULE_IMPORT,\n LINKED_HANDLE = RelayConcreteNode.LINKED_HANDLE,\n SCALAR_FIELD = RelayConcreteNode.SCALAR_FIELD,\n SCALAR_HANDLE = RelayConcreteNode.SCALAR_HANDLE,\n STREAM = RelayConcreteNode.STREAM,\n TYPE_DISCRIMINATOR = RelayConcreteNode.TYPE_DISCRIMINATOR;\nvar ROOT_ID = RelayStoreUtils.ROOT_ID,\n getStorageKey = RelayStoreUtils.getStorageKey,\n getModuleOperationKey = RelayStoreUtils.getModuleOperationKey;\n\nfunction mark(recordSource, selector, references, operationLoader, shouldProcessClientComponents) {\n var dataID = selector.dataID,\n node = selector.node,\n variables = selector.variables;\n var marker = new RelayReferenceMarker(recordSource, variables, references, operationLoader, shouldProcessClientComponents);\n marker.mark(node, dataID);\n}\n/**\n * @private\n */\n\n\nvar RelayReferenceMarker = /*#__PURE__*/function () {\n function RelayReferenceMarker(recordSource, variables, references, operationLoader, shouldProcessClientComponents) {\n this._operationLoader = operationLoader !== null && operationLoader !== void 0 ? operationLoader : null;\n this._operationName = null;\n this._recordSource = recordSource;\n this._references = references;\n this._variables = variables;\n this._shouldProcessClientComponents = shouldProcessClientComponents;\n }\n\n var _proto = RelayReferenceMarker.prototype;\n\n _proto.mark = function mark(node, dataID) {\n if (node.kind === 'Operation' || node.kind === 'SplitOperation') {\n this._operationName = node.name;\n }\n\n this._traverse(node, dataID);\n };\n\n _proto._traverse = function _traverse(node, dataID) {\n this._references.add(dataID);\n\n var record = this._recordSource.get(dataID);\n\n if (record == null) {\n return;\n }\n\n this._traverseSelections(node.selections, record);\n };\n\n _proto._getVariableValue = function _getVariableValue(name) {\n !this._variables.hasOwnProperty(name) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReferenceMarker(): Undefined variable `%s`.', name) : invariant(false) : void 0; // $FlowFixMe[cannot-write]\n\n return this._variables[name];\n };\n\n _proto._traverseSelections = function _traverseSelections(selections, record) {\n var _this = this;\n\n selections.forEach(function (selection) {\n /* eslint-disable no-fallthrough */\n switch (selection.kind) {\n case LINKED_FIELD:\n if (selection.plural) {\n _this._traversePluralLink(selection, record);\n } else {\n _this._traverseLink(selection, record);\n }\n\n break;\n\n case CONDITION:\n var conditionValue = _this._getVariableValue(selection.condition);\n\n if (conditionValue === selection.passingValue) {\n _this._traverseSelections(selection.selections, record);\n }\n\n break;\n\n case INLINE_FRAGMENT:\n if (selection.abstractKey == null) {\n var typeName = RelayModernRecord.getType(record);\n\n if (typeName != null && typeName === selection.type) {\n _this._traverseSelections(selection.selections, record);\n }\n } else if (RelayFeatureFlags.ENABLE_PRECISE_TYPE_REFINEMENT) {\n var _typeName = RelayModernRecord.getType(record);\n\n var typeID = generateTypeID(_typeName);\n\n _this._references.add(typeID);\n\n _this._traverseSelections(selection.selections, record);\n } else {\n _this._traverseSelections(selection.selections, record);\n }\n\n break;\n // $FlowFixMe[incompatible-type]\n\n case FRAGMENT_SPREAD:\n _this._traverseSelections(selection.fragment.selections, record);\n\n break;\n\n case LINKED_HANDLE:\n // The selections for a \"handle\" field are the same as those of the\n // original linked field where the handle was applied. Reference marking\n // therefore requires traversing the original field selections against\n // the synthesized client field.\n //\n // TODO: Instead of finding the source field in `selections`, change\n // the concrete structure to allow shared subtrees, and have the linked\n // handle directly refer to the same selections as the LinkedField that\n // it was split from.\n var handleField = cloneRelayHandleSourceField(selection, selections, _this._variables);\n\n if (handleField.plural) {\n _this._traversePluralLink(handleField, record);\n } else {\n _this._traverseLink(handleField, record);\n }\n\n break;\n\n case DEFER:\n case STREAM:\n _this._traverseSelections(selection.selections, record);\n\n break;\n\n case SCALAR_FIELD:\n case SCALAR_HANDLE:\n break;\n\n case TYPE_DISCRIMINATOR:\n {\n if (RelayFeatureFlags.ENABLE_PRECISE_TYPE_REFINEMENT) {\n var _typeName2 = RelayModernRecord.getType(record);\n\n var _typeID = generateTypeID(_typeName2);\n\n _this._references.add(_typeID);\n }\n\n break;\n }\n\n case MODULE_IMPORT:\n _this._traverseModuleImport(selection, record);\n\n break;\n\n case CLIENT_EXTENSION:\n _this._traverseSelections(selection.selections, record);\n\n break;\n\n case FLIGHT_FIELD:\n if (RelayFeatureFlags.ENABLE_REACT_FLIGHT_COMPONENT_FIELD) {\n _this._traverseFlightField(selection, record);\n } else {\n throw new Error('Flight fields are not yet supported.');\n }\n\n break;\n\n case CLIENT_COMPONENT:\n if (_this._shouldProcessClientComponents === false) {\n break;\n }\n\n _this._traverseSelections(selection.fragment.selections, record);\n\n break;\n\n default:\n selection;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReferenceMarker: Unknown AST node `%s`.', selection) : invariant(false) : void 0;\n }\n });\n };\n\n _proto._traverseModuleImport = function _traverseModuleImport(moduleImport, record) {\n var _this$_operationName;\n\n var operationLoader = this._operationLoader;\n !(operationLoader !== null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'RelayReferenceMarker: Expected an operationLoader to be configured when using `@module`. ' + 'Could not load fragment `%s` in operation `%s`.', moduleImport.fragmentName, (_this$_operationName = this._operationName) !== null && _this$_operationName !== void 0 ? _this$_operationName : '(unknown)') : invariant(false) : void 0;\n var operationKey = getModuleOperationKey(moduleImport.documentName);\n var operationReference = RelayModernRecord.getValue(record, operationKey);\n\n if (operationReference == null) {\n return;\n }\n\n var normalizationRootNode = operationLoader.get(operationReference);\n\n if (normalizationRootNode != null) {\n var selections = getOperation(normalizationRootNode).selections;\n\n this._traverseSelections(selections, record);\n } // Otherwise, if the operation is not available, we assume that the data\n // cannot have been processed yet and therefore isn't in the store to\n // begin with.\n\n };\n\n _proto._traverseLink = function _traverseLink(field, record) {\n var storageKey = getStorageKey(field, this._variables);\n var linkedID = RelayModernRecord.getLinkedRecordID(record, storageKey);\n\n if (linkedID == null) {\n return;\n }\n\n this._traverse(field, linkedID);\n };\n\n _proto._traversePluralLink = function _traversePluralLink(field, record) {\n var _this2 = this;\n\n var storageKey = getStorageKey(field, this._variables);\n var linkedIDs = RelayModernRecord.getLinkedRecordIDs(record, storageKey);\n\n if (linkedIDs == null) {\n return;\n }\n\n linkedIDs.forEach(function (linkedID) {\n if (linkedID != null) {\n _this2._traverse(field, linkedID);\n }\n });\n };\n\n _proto._traverseFlightField = function _traverseFlightField(field, record) {\n var storageKey = getStorageKey(field, this._variables);\n var linkedID = RelayModernRecord.getLinkedRecordID(record, storageKey);\n\n if (linkedID == null) {\n return;\n }\n\n this._references.add(linkedID);\n\n var reactFlightClientResponseRecord = this._recordSource.get(linkedID);\n\n if (reactFlightClientResponseRecord == null) {\n return;\n }\n\n var reachableExecutableDefinitions = RelayModernRecord.getValue(reactFlightClientResponseRecord, RelayStoreReactFlightUtils.REACT_FLIGHT_EXECUTABLE_DEFINITIONS_STORAGE_KEY);\n\n if (!Array.isArray(reachableExecutableDefinitions)) {\n return;\n }\n\n var operationLoader = this._operationLoader;\n !(operationLoader !== null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'DataChecker: Expected an operationLoader to be configured when using ' + 'React Flight') : invariant(false) : void 0; // In Flight, the variables that are in scope for reachable executable\n // definitions aren't the same as what's in scope for the outer query.\n\n var prevVariables = this._variables; // $FlowFixMe[incompatible-cast]\n\n var _iterator = (0, _createForOfIteratorHelper2[\"default\"])(reachableExecutableDefinitions),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var definition = _step.value;\n this._variables = definition.variables;\n var operationReference = definition.module;\n var normalizationRootNode = operationLoader.get(operationReference);\n\n if (normalizationRootNode != null) {\n var operation = getOperation(normalizationRootNode);\n\n this._traverse(operation, ROOT_ID);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n this._variables = prevVariables;\n };\n\n return RelayReferenceMarker;\n}();\n\nmodule.exports = {\n mark: mark\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _createForOfIteratorHelper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createForOfIteratorHelper\"));\n\nvar RelayRecordState = require('./RelayRecordState');\n\nvar EXISTENT = RelayRecordState.EXISTENT,\n NONEXISTENT = RelayRecordState.NONEXISTENT,\n UNKNOWN = RelayRecordState.UNKNOWN;\n/**\n * An implementation of the `MutableRecordSource` interface (defined in\n * `RelayStoreTypes`) that holds all records in memory (JS Map).\n */\n\nvar RelayMapRecordSourceMapImpl = /*#__PURE__*/function () {\n function RelayMapRecordSourceMapImpl(records) {\n var _this = this;\n\n this._records = new Map();\n\n if (records != null) {\n Object.keys(records).forEach(function (key) {\n _this._records.set(key, records[key]);\n });\n }\n }\n\n var _proto = RelayMapRecordSourceMapImpl.prototype;\n\n _proto.clear = function clear() {\n this._records = new Map();\n };\n\n _proto[\"delete\"] = function _delete(dataID) {\n this._records.set(dataID, null);\n };\n\n _proto.get = function get(dataID) {\n return this._records.get(dataID);\n };\n\n _proto.getRecordIDs = function getRecordIDs() {\n return Array.from(this._records.keys());\n };\n\n _proto.getStatus = function getStatus(dataID) {\n if (!this._records.has(dataID)) {\n return UNKNOWN;\n }\n\n return this._records.get(dataID) == null ? NONEXISTENT : EXISTENT;\n };\n\n _proto.has = function has(dataID) {\n return this._records.has(dataID);\n };\n\n _proto.remove = function remove(dataID) {\n this._records[\"delete\"](dataID);\n };\n\n _proto.set = function set(dataID, record) {\n this._records.set(dataID, record);\n };\n\n _proto.size = function size() {\n return this._records.size;\n };\n\n _proto.toJSON = function toJSON() {\n var obj = {};\n\n var _iterator = (0, _createForOfIteratorHelper2[\"default\"])(this._records),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _step.value,\n key = _step$value[0],\n value = _step$value[1];\n obj[key] = value;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return obj;\n };\n\n return RelayMapRecordSourceMapImpl;\n}();\n\nmodule.exports = RelayMapRecordSourceMapImpl;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n\nvar invariant = require('invariant');\n\nvar _require = require('../query/GraphQLTag'),\n getInlineDataFragment = _require.getInlineDataFragment;\n\nvar _require2 = require('./RelayStoreUtils'),\n FRAGMENTS_KEY = _require2.FRAGMENTS_KEY;\n\nfunction readInlineData(fragment, fragmentRef) {\n var _fragmentRef$FRAGMENT;\n\n var inlineDataFragment = getInlineDataFragment(fragment);\n\n if (fragmentRef == null) {\n return fragmentRef;\n }\n\n !(typeof fragmentRef === 'object') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'readInlineData(): Expected an object, got `%s`.', typeof fragmentRef) : invariant(false) : void 0; // $FlowFixMe[incompatible-use]\n\n var inlineData = (_fragmentRef$FRAGMENT = fragmentRef[FRAGMENTS_KEY]) === null || _fragmentRef$FRAGMENT === void 0 ? void 0 : _fragmentRef$FRAGMENT[inlineDataFragment.name];\n !(inlineData != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'readInlineData(): Expected fragment `%s` to be spread in the parent ' + 'fragment.', inlineDataFragment.name) : invariant(false) : void 0;\n return inlineData;\n}\n\nmodule.exports = readInlineData;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n/**\n * Creates a copy of the provided value, ensuring any nested objects have their\n * keys sorted such that equivalent values would have identical JSON.stringify\n * results.\n */\n\nfunction stableCopy(value) {\n if (!value || typeof value !== 'object') {\n return value;\n }\n\n if (Array.isArray(value)) {\n return value.map(stableCopy);\n }\n\n var keys = Object.keys(value).sort();\n var stable = {};\n\n for (var i = 0; i < keys.length; i++) {\n stable[keys[i]] = stableCopy(value[keys[i]]);\n }\n\n return stable;\n}\n\nmodule.exports = stableCopy;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n// flowlint ambiguous-object-type:error\n'use strict';\n/**\n * Recursively \"deep\" freezes the supplied object.\n *\n * For convenience, and for consistency with the behavior of `Object.freeze`,\n * returns the now-frozen original object.\n */\n\nfunction deepFreeze(object) {\n Object.freeze(object);\n Object.getOwnPropertyNames(object).forEach(function (name) {\n // $FlowFixMe[prop-missing]\n var property = object[name];\n\n if (property && typeof property === 'object' && !Object.isFrozen(property)) {\n deepFreeze(property);\n }\n });\n return object;\n}\n\nmodule.exports = deepFreeze;"],"sourceRoot":""}