react-relay 2.0.0-rc.2 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. package/index.js +2 -2
  2. package/lib/ReactRelayContext.js +6 -3
  3. package/lib/ReactRelayFragmentContainer.js +48 -46
  4. package/lib/ReactRelayFragmentMockRenderer.js +5 -1
  5. package/lib/ReactRelayPaginationContainer.js +102 -68
  6. package/lib/ReactRelayQueryFetcher.js +54 -28
  7. package/lib/ReactRelayQueryRenderer.js +28 -20
  8. package/lib/ReactRelayRefetchContainer.js +70 -58
  9. package/lib/ReactRelayTestMocker.js +56 -43
  10. package/lib/ReactRelayTypes.js +1 -1
  11. package/lib/RelayContext.js +8 -2
  12. package/lib/assertFragmentMap.js +9 -7
  13. package/lib/buildReactRelayContainer.js +32 -23
  14. package/lib/index.js +41 -0
  15. package/lib/isRelayEnvironment.js +1 -1
  16. package/lib/isRelayVariables.js +1 -1
  17. package/lib/readContext.js +7 -4
  18. package/package.json +4 -4
  19. package/react-relay.js +2 -2
  20. package/react-relay.min.js +2 -2
  21. package/classic.js +0 -10
  22. package/compat.js +0 -10
  23. package/lib/ConcreteQuery.js +0 -10
  24. package/lib/GraphQLQueryRunner.js +0 -264
  25. package/lib/GraphQLRange.js +0 -1124
  26. package/lib/GraphQLSegment.js +0 -743
  27. package/lib/GraphQLStoreChangeEmitter.js +0 -141
  28. package/lib/GraphQLStoreQueryResolver.js +0 -288
  29. package/lib/GraphQLStoreRangeUtils.js +0 -126
  30. package/lib/QueryBuilder.js +0 -228
  31. package/lib/ReactRelayClassicExports.js +0 -29
  32. package/lib/ReactRelayCompatContainerBuilder.js +0 -175
  33. package/lib/ReactRelayCompatPublic.js +0 -28
  34. package/lib/ReactRelayContainerProfiler.js +0 -30
  35. package/lib/ReactRelayFragmentContainer-flowtest.js +0 -201
  36. package/lib/ReactRelayPaginationContainer-flowtest.js +0 -213
  37. package/lib/ReactRelayPublic.js +0 -29
  38. package/lib/ReactRelayRefetchContainer-flowtest.js +0 -191
  39. package/lib/RelayCacheProcessor.js +0 -196
  40. package/lib/RelayChangeTracker.js +0 -83
  41. package/lib/RelayClassicContainerUtils.js +0 -49
  42. package/lib/RelayClassicCore.js +0 -34
  43. package/lib/RelayClassicRecordState.js +0 -31
  44. package/lib/RelayCompatContainer.js +0 -25
  45. package/lib/RelayCompatEnvironment.js +0 -27
  46. package/lib/RelayCompatMutations.js +0 -133
  47. package/lib/RelayCompatPaginationContainer.js +0 -27
  48. package/lib/RelayCompatRefetchContainer.js +0 -27
  49. package/lib/RelayCompatTypes.js +0 -10
  50. package/lib/RelayContainer.js +0 -889
  51. package/lib/RelayContainerComparators.js +0 -75
  52. package/lib/RelayContainerProxy.js +0 -21
  53. package/lib/RelayDefaultNetworkLayer.js +0 -192
  54. package/lib/RelayEnvironment.js +0 -449
  55. package/lib/RelayEnvironmentTypes.js +0 -10
  56. package/lib/RelayFetchMode.js +0 -17
  57. package/lib/RelayFragmentPointer.js +0 -161
  58. package/lib/RelayFragmentReference.js +0 -249
  59. package/lib/RelayFragmentSpecResolver.js +0 -305
  60. package/lib/RelayGraphQLMutation.js +0 -288
  61. package/lib/RelayGraphQLTag.js +0 -42
  62. package/lib/RelayInternalTypes.js +0 -15
  63. package/lib/RelayInternals.js +0 -24
  64. package/lib/RelayMetaRoute.js +0 -35
  65. package/lib/RelayMockRenderer.js +0 -71
  66. package/lib/RelayModern-flowtest.js +0 -342
  67. package/lib/RelayModernFlowtest_badref.graphql.js +0 -10
  68. package/lib/RelayModernFlowtest_notref.graphql.js +0 -10
  69. package/lib/RelayModernFlowtest_user.graphql.js +0 -10
  70. package/lib/RelayModernFlowtest_users.graphql.js +0 -10
  71. package/lib/RelayMutation.js +0 -322
  72. package/lib/RelayMutationDebugPrinter.js +0 -47
  73. package/lib/RelayMutationQuery.js +0 -558
  74. package/lib/RelayMutationQueue.js +0 -530
  75. package/lib/RelayMutationRequest.js +0 -103
  76. package/lib/RelayMutationTracker.js +0 -113
  77. package/lib/RelayMutationTransaction.js +0 -92
  78. package/lib/RelayMutationTransactionStatus.js +0 -55
  79. package/lib/RelayNetworkDebug.js +0 -131
  80. package/lib/RelayNetworkLayer.js +0 -185
  81. package/lib/RelayNodeInterface.js +0 -104
  82. package/lib/RelayOperationDescriptor.js +0 -40
  83. package/lib/RelayOptimisticMutationUtils.js +0 -208
  84. package/lib/RelayPendingQueryTracker.js +0 -166
  85. package/lib/RelayPropTypes.js +0 -57
  86. package/lib/RelayPublic.js +0 -44
  87. package/lib/RelayQL.js +0 -128
  88. package/lib/RelayQuery.js +0 -1584
  89. package/lib/RelayQueryCaching.js +0 -33
  90. package/lib/RelayQueryConfig.js +0 -58
  91. package/lib/RelayQueryPath.js +0 -204
  92. package/lib/RelayQueryRequest.js +0 -103
  93. package/lib/RelayQueryTracker.js +0 -86
  94. package/lib/RelayQueryTransform.js +0 -91
  95. package/lib/RelayQueryVisitor.js +0 -93
  96. package/lib/RelayQueryWriter.js +0 -573
  97. package/lib/RelayReadyState.js +0 -83
  98. package/lib/RelayReadyStateRenderer.js +0 -145
  99. package/lib/RelayRecord.js +0 -75
  100. package/lib/RelayRecordStatusMap.js +0 -57
  101. package/lib/RelayRecordStore.js +0 -433
  102. package/lib/RelayRecordWriter.js +0 -601
  103. package/lib/RelayRefQueryDescriptor.js +0 -27
  104. package/lib/RelayRenderer.js +0 -268
  105. package/lib/RelayRootContainer.js +0 -125
  106. package/lib/RelayRoute.js +0 -92
  107. package/lib/RelayRouteFragment.js +0 -44
  108. package/lib/RelaySelector.js +0 -201
  109. package/lib/RelayShallowMock.js +0 -69
  110. package/lib/RelayStaticContainer.js +0 -38
  111. package/lib/RelayStore.js +0 -12
  112. package/lib/RelayStoreConstants.js +0 -20
  113. package/lib/RelayStoreData.js +0 -660
  114. package/lib/RelayTaskQueue.js +0 -189
  115. package/lib/RelayTypes.js +0 -13
  116. package/lib/RelayVariable.js +0 -32
  117. package/lib/RelayVariables.js +0 -92
  118. package/lib/buildRQL.js +0 -160
  119. package/lib/callsFromGraphQL.js +0 -74
  120. package/lib/callsToGraphQL.js +0 -34
  121. package/lib/checkRelayQueryData.js +0 -250
  122. package/lib/createRelayQuery.js +0 -17
  123. package/lib/dedent.js +0 -49
  124. package/lib/diffRelayQuery.js +0 -757
  125. package/lib/directivesToGraphQL.js +0 -39
  126. package/lib/filterRelayQuery.js +0 -29
  127. package/lib/findRelayQueryLeaves.js +0 -293
  128. package/lib/flattenRelayQuery.js +0 -121
  129. package/lib/flattenSplitRelayQueries.js +0 -44
  130. package/lib/forEachRootCallArg.js +0 -40
  131. package/lib/fromGraphQL.js +0 -48
  132. package/lib/generateClientEdgeID.js +0 -22
  133. package/lib/generateClientID.js +0 -27
  134. package/lib/generateConcreteFragmentID.js +0 -30
  135. package/lib/generateForceIndex.js +0 -24
  136. package/lib/generateRQLFieldAlias.js +0 -39
  137. package/lib/getRangeBehavior.js +0 -58
  138. package/lib/getRelayQueries.js +0 -83
  139. package/lib/intersectRelayQuery.js +0 -149
  140. package/lib/isClassicRelayContext.js +0 -20
  141. package/lib/isClassicRelayEnvironment.js +0 -20
  142. package/lib/isCompatibleRelayFragmentType.js +0 -27
  143. package/lib/isRelayContainer.js +0 -16
  144. package/lib/makeLegacyStringishComponentRef.js +0 -52
  145. package/lib/printRelayOSSQuery.js +0 -329
  146. package/lib/printRelayQuery.js +0 -26
  147. package/lib/rangeOperationToMetadataKey.js +0 -25
  148. package/lib/readRelayQueryData.js +0 -551
  149. package/lib/relayUnstableBatchedUpdates.js +0 -12
  150. package/lib/relayUnstableBatchedUpdates.native.js +0 -11
  151. package/lib/restoreRelayCacheData.js +0 -188
  152. package/lib/serializeRelayQueryCall.js +0 -42
  153. package/lib/splitDeferredRelayQueries.js +0 -298
  154. package/lib/stableStringify.js +0 -85
  155. package/lib/testEditDistance.js +0 -112
  156. package/lib/throwFailedPromise.js +0 -26
  157. package/lib/toGraphQL.js +0 -94
  158. package/lib/transformRelayQueryPayload.js +0 -145
  159. package/lib/validateMutationConfig.js +0 -117
  160. package/lib/validateRelayReadQuery.js +0 -112
  161. package/lib/writeRelayQueryPayload.js +0 -44
  162. package/lib/writeRelayUpdatePayload.js +0 -513
  163. package/react-relay-classic.js +0 -4
  164. package/react-relay-classic.min.js +0 -9
  165. package/react-relay-compat.js +0 -4
  166. package/react-relay-compat.min.js +0 -9
package/react-relay.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Relay v2.0.0-rc.2
2
+ * Relay v5.0.0
3
3
  */
4
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("relay-runtime"),require("fbjs/lib/invariant"),require("react"),require("fbjs/lib/areEqual"),require("fbjs/lib/warning"),require("fbjs/lib/mapObject")):"function"==typeof define&&define.amd?define(["relay-runtime","fbjs/lib/invariant","react","fbjs/lib/areEqual","fbjs/lib/warning","fbjs/lib/mapObject"],t):"object"==typeof exports?exports.ReactRelay=t(require("relay-runtime"),require("fbjs/lib/invariant"),require("react"),require("fbjs/lib/areEqual"),require("fbjs/lib/warning"),require("fbjs/lib/mapObject")):e.ReactRelay=t(e["relay-runtime"],e["fbjs/lib/invariant"],e.react,e["fbjs/lib/areEqual"],e["fbjs/lib/warning"],e["fbjs/lib/mapObject"])}(window,function(e,t,n,r,o,a){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(t,n){t.exports=e},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&n(21)(e.environment)&&n(22)(e.variables)}e.exports={assertRelayContext:function(e){return r(e)||n(2)(!1,"RelayContext: Expected `context.relay` to be an object conforming to the `RelayContext` interface, got `%s`.",e),e},isRelayContext:r}},function(e,t,n){"use strict";var r=n(1)(n(7)),o=function(){function e(e){(0,r.default)(this,"_selectionReferences",[]),(0,r.default)(this,"_callOnDataChangeWhenSet",!1),null!=e&&(this._cacheSelectionReference=e.cacheSelectionReference,this._selectionReferences=e.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(e,t){return e.check(t.root)?(this._retainCachedOperation(e,t),e.lookup(t.fragment)):null},t.execute=function(e){var t=this,n=e.environment,r=e.operation,o=e.cacheConfig,a=e.preservePreviousReferences,i=void 0!==a&&a,s=n.retain(r.root);return n.execute({operation:r,cacheConfig:o}).do({error:function(){t._selectionReferences=t._selectionReferences.concat(s)},complete:function(){i||t.disposeSelectionReferences(),t._selectionReferences=t._selectionReferences.concat(s)},unsubscribe:function(){t._selectionReferences=t._selectionReferences.concat(s)}})},t.setOnDataChange=function(e){this._fetchOptions||n(2)(!1,"ReactRelayQueryFetcher: `setOnDataChange` should have been called after having called `fetch`"),"function"==typeof e&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(e),this._callOnDataChangeWhenSet&&(null!=this._error?e({error:this._error}):null!=this._snapshot&&e({snapshot:this._snapshot})))},t.fetch=function(e){var t,n=this,r=e.cacheConfig,o=e.environment,a=e.operation,i=e.onDataChange,s=!1;this.disposeRequest();var l=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={cacheConfig:r,environment:o,onDataChangeCallbacks:l||[],operation:a},i&&-1===this._fetchOptions.onDataChangeCallbacks.indexOf(i)&&this._fetchOptions.onDataChangeCallbacks.push(i);var c=this.execute({environment:o,operation:a,cacheConfig:r}).finally(function(){n._pendingRequest=null}).subscribe({next:function(){n._callOnDataChangeWhenSet=!0,n._error=null,n._onQueryDataAvailable({notifyFirstResult:s})},error:function(e){n._callOnDataChangeWhenSet=!0,n._error=e,n._snapshot=null;var r=n._fetchOptions&&n._fetchOptions.onDataChangeCallbacks;s?r&&r.forEach(function(t){t({error:e})}):t=e}});if(this._pendingRequest={dispose:function(){c.unsubscribe()}},s=!0,t)throw t;return this._snapshot},t.retry=function(){return this._fetchOptions||n(2)(!1,"ReactRelayQueryFetcher: `retry` should be called after having called `fetch`"),this.fetch({cacheConfig:this._fetchOptions.cacheConfig,environment:this._fetchOptions.environment,operation:this._fetchOptions.operation,onDataChange:null})},t.dispose=function(){this.disposeRequest(),this.disposeSelectionReferences()},t.disposeRequest=function(){this._error=null,this._snapshot=null,this._pendingRequest&&this._pendingRequest.dispose(),this._rootSubscription&&(this._rootSubscription.dispose(),this._rootSubscription=null)},t._retainCachedOperation=function(e,t){this._disposeCacheSelectionReference(),this._cacheSelectionReference=e.retain(t.root)},t._disposeCacheSelectionReference=function(){this._cacheSelectionReference&&this._cacheSelectionReference.dispose(),this._cacheSelectionReference=null},t.disposeSelectionReferences=function(){this._disposeCacheSelectionReference(),this._selectionReferences.forEach(function(e){return e.dispose()}),this._selectionReferences=[]},t._onQueryDataAvailable=function(e){var t=this,r=e.notifyFirstResult;this._fetchOptions||n(2)(!1,"ReactRelayQueryFetcher: `_onQueryDataAvailable` should have been called after having called `fetch`");var o=this._fetchOptions,a=o.environment,i=o.onDataChangeCallbacks,s=o.operation;if(!this._snapshot&&(this._snapshot=a.lookup(s.fragment),this._rootSubscription=a.subscribe(this._snapshot,function(e){if(null!=t._fetchOptions){var n=t._fetchOptions.onDataChangeCallbacks;Array.isArray(n)&&n.forEach(function(t){return t({snapshot:e})})}}),this._snapshot&&r&&Array.isArray(i))){var l=this._snapshot;i.forEach(function(e){return e({snapshot:l})})}},e}();e.exports=o},function(e,t,n){"use strict";function r(e){return e.displayName||e.name||"Component"}e.exports={getComponentName:r,getContainerName:function(e){return"Relay("+r(e)+")"}}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=r},function(e,t,n){"use strict";var r=n(3).createContext(null);e.exports=r},function(e,t,n){var r=n(7);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t){e.exports=o},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";e.exports={profileContainer:function(e,t){n(0).RelayProfiler.instrumentMethods(e.prototype,{constructor:"".concat(t,".prototype.constructor"),UNSAFE_componentWillReceiveProps:"".concat(t,".prototype.UNSAFE_componentWillReceiveProps"),componentWillUnmount:"".concat(t,".prototype.componentWillUnmount"),shouldComponentUpdate:"".concat(t,".prototype.shouldComponentUpdate")}),null!==e.prototype&&"object"==typeof e.prototype&&"function"==typeof e.getDerivedStateFromProps&&(e.prototype.constructor.getDerivedStateFromProps=e.getDerivedStateFromProps)}}},function(e,t,n){"use strict";var r=n(1)(n(17));e.exports=function(e,t,o){var a,i,s=n(6).getContainerName(e);function l(r){if(null==i||r.__relayContext.environment!==a){if(a=r.__relayContext.environment,!(0,n(0).isRelayModernEnvironment)(a))throw new Error("RelayModernContainer: Can only use Relay Modern component "+"".concat(s," in a Relay Modern environment!\n")+"When using Relay Modern and Relay Classic in the same application, ensure components use Relay Compat to work in both environments.\nSee: http://facebook.github.io/relay/docs/relay-compat.html");var c=a.unstable_internal.getFragment,u=n(24)(t,c);i=o(e,u),l.getDerivedStateFromProps=i.getDerivedStateFromProps}return new i(r)}function c(e,t){var o=n(25)(n(9));return o||n(2)(!1,"".concat(s," tried to render a context that was ")+"not valid this means that ".concat(s," was rendered outside of a ")+"query renderer."),n(3).createElement(l,(0,r.default)({},e,{__relayContext:o,componentRef:e.componentRef||t}))}n(23)(n(6).getComponentName(e),t),c.displayName=s;var u=n(3).forwardRef(c);return u.__ComponentClass=e,u.getFragment=function(){throw new Error("RelayModernContainer: ".concat(s,".getFragment() was called on ")+"a Relay Modern component by a Relay Classic or Relay Compat component.\nWhen using Relay Modern and Relay Classic in the same application, ensure components use Relay Compat to work in both environments.\nSee: http://facebook.github.io/relay/docs/relay-compat.html")},u}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";e.exports={QueryRenderer:n(19),MutationTypes:n(0).MutationTypes,RangeOperations:n(0).RangeOperations,ReactRelayContext:n(9),applyOptimisticMutation:n(0).applyOptimisticMutation,commitLocalUpdate:n(0).commitLocalUpdate,commitMutation:n(0).commitMutation,createFragmentContainer:n(20).createContainer,createPaginationContainer:n(26).createContainer,createRefetchContainer:n(27).createContainer,fetchQuery:n(0).fetchQuery,graphql:n(0).graphql,requestSubscription:n(0).requestSubscription}},function(e,t,n){"use strict";var r=n(1)(n(10)),o=n(1)(n(11)),a={},i="STORE_THEN_NETWORK",s=function(e){function t(t){var o;o=e.call(this,t)||this;var i,s,l={handleDataChange:null,handleRetryAfterError:null};if(t.query){var c=t.query;s=u((0,t.environment.unstable_internal.getRequest)(c).params,t.variables),i=a[s]?a[s].queryFetcher:new(n(5))}else i=new(n(5));return o.state=(0,r.default)({prevPropsEnvironment:t.environment,prevPropsVariables:t.variables,prevQuery:t.query,queryFetcher:i,retryCallbacks:l},p(t,i,l,s)),o}(0,o.default)(t,e),t.getDerivedStateFromProps=function(e,t){if(t.prevQuery!==e.query||t.prevPropsEnvironment!==e.environment||!n(8)(t.prevPropsVariables,e.variables)){var o,i=e.query,s=t.queryFetcher.getSelectionReferences();if(t.queryFetcher.disposeRequest(),i){var l=u((0,e.environment.unstable_internal.getRequest)(i).params,e.variables);o=a[l]?a[l].queryFetcher:new(n(5))(s)}else o=new(n(5))(s);return(0,r.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:o},p(e,o,t.retryCallbacks))}return null};var i=t.prototype;return i.componentDidMount=function(){var e=this,t=this.state,n=t.retryCallbacks,r=t.queryFetcher,o=t.requestCacheKey;o&&delete a[o],n.handleDataChange=function(t){var o=null==t.error?null:t.error,i=null==t.snapshot?null:t.snapshot;e.setState(function(e){var t=e.requestCacheKey;return t&&delete a[t],i===e.snapshot&&o===e.error?null:{renderProps:c(o,i,r,n),snapshot:i,requestCacheKey:null}})},n.handleRetryAfterError=function(t){return e.setState(function(e){var t=e.requestCacheKey;return t&&delete a[t],{renderProps:{error:null,props:null,retry:null},requestCacheKey:null}})},this.props.query&&r.setOnDataChange(n.handleDataChange)},i.componentDidUpdate=function(){var e=this.state.requestCacheKey;e&&(delete a[e],delete this.state.requestCacheKey)},i.componentWillUnmount=function(){this.state.queryFetcher.dispose()},i.shouldComponentUpdate=function(e,t){return e.render!==this.props.render||t.renderProps!==this.state.renderProps},i.render=function(){var e=this.state,t=e.renderProps,r=e.relayContext;return n(0).deepFreeze(t),n(3).createElement(n(9).Provider,{value:r},this.props.render(t))},t}(n(3).Component);function l(e,t){return{environment:e,variables:t}}function c(e,t,n,r){return{error:e||null,props:t?t.data:null,retry:function(){var t=n.retry();t&&"function"==typeof r.handleDataChange?r.handleDataChange({snapshot:t}):e&&"function"==typeof r.handleRetryAfterError&&r.handleRetryAfterError(e)}}}function u(e,t){var n=e.id||e.text;return JSON.stringify({id:String(n),variables:t})}function p(e,t,n,r){var o=e.environment,s=e.query,p=e.variables,f=o;if(!s)return t.dispose(),{error:null,relayContext:l(f,p),renderProps:{error:null,props:{},retry:null},requestCacheKey:null};var h=f.unstable_internal,d=h.createOperationDescriptor,v=(0,h.getRequest)(s),y=d(v,p),_=l(f,y.variables);if("string"==typeof r&&a[r]){var b=a[r].snapshot;return b?{error:null,relayContext:_,renderProps:c(null,b,t,n),snapshot:b,requestCacheKey:r}:{error:null,relayContext:_,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:r}}try{var m=e.dataFrom===i?t.lookupInStore(f,y):null,C=t.fetch({cacheConfig:e.cacheConfig,dataFrom:e.dataFrom,environment:f,onDataChange:n.handleDataChange,operation:y})||m;return r=r||u(v.params,e.variables),a[r]={queryFetcher:t,snapshot:C},C?{error:null,relayContext:_,renderProps:c(null,C,t,n),snapshot:C,requestCacheKey:r}:{error:null,relayContext:_,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:r}}catch(e){return{error:e,relayContext:_,renderProps:c(e,null,t,n),snapshot:null,requestCacheKey:r}}}e.exports=s},function(e,t,n){"use strict";var r=n(1)(n(10)),o=n(1)(n(13)),a=n(1)(n(11)),i=n(1)(n(14)),s=n(1)(n(7));function l(e,t){var l=n(6).getContainerName(e),u=function(u){function p(e){var r;r=u.call(this,e)||this,(0,s.default)((0,i.default)((0,i.default)(r)),"_handleFragmentDataUpdate",function(){var e=n(0).RelayProfiler.profile("ReactRelayFragmentContainer.handleFragmentDataUpdate"),t=r.state.resolver;r.setState(function(e){return t===e.resolver?{data:e.resolver.resolve(),relayProp:c(e.relayProp.environment)}:null},e.stop)});var o=n(4).assertRelayContext(e.__relayContext),a=(0,o.environment.unstable_internal.createFragmentSpecResolver)(o,l,t,e);return r.state={data:a.resolve(),prevProps:e,prevPropsContext:o,relayProp:c(o.environment),resolver:a},r}(0,a.default)(p,u),p.getDerivedStateFromProps=function(e,r){var o=r.prevProps,a=n(4).assertRelayContext(e.__relayContext),i=a.environment.unstable_internal,s=i.createFragmentSpecResolver,u=i.getDataIDsFromObject,p=u(t,o),f=u(t,e),h=r.resolver;if(r.prevPropsContext.environment!==a.environment||r.prevPropsContext.variables!==a.variables||!n(8)(p,f))return{data:(h=s(a,l,t,e)).resolve(),prevPropsContext:a,prevProps:e,relayProp:c(a.environment),resolver:h};h.setProps(e);var d=h.resolve();return d!==r.data?{data:d,prevProps:e,prevPropsContext:a,relayProp:c(a.environment)}:null};var f=p.prototype;return f.componentDidMount=function(){this._subscribeToNewResolver(),this._rerenderIfStoreHasChanged()},f.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver&&(t.resolver.dispose(),this._subscribeToNewResolver()),this._rerenderIfStoreHasChanged()},f.componentWillUnmount=function(){this.state.resolver.dispose()},f.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data)return!0;for(var o=Object.keys(e),a=0;a<o.length;a++){var i=o[a];if("__relayContext"===i){if(r.prevPropsContext.environment!==this.state.prevPropsContext.environment||r.prevPropsContext.variables!==this.state.prevPropsContext.variables)return!0}else if(!t.hasOwnProperty(i)&&!n(0).isScalarAndEqual(e[i],this.props[i]))return!0}return!1},f._rerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,n=e.resolver.resolve();t!==n&&this.setState({data:n})},f._subscribeToNewResolver=function(){this.state.resolver.setCallback(this._handleFragmentDataUpdate)},f.render=function(){var t=this.props,a=t.componentRef,i=(t.__relayContext,(0,o.default)(t,["componentRef","__relayContext"]));return n(3).createElement(e,(0,r.default)({},i,this.state.data,{ref:a,relay:this.state.relayProp}))},p}(n(3).Component);return(0,s.default)(u,"displayName",l),n(15).profileContainer(u,"ReactRelayFragmentContainer"),u}function c(e){return{environment:e}}e.exports={createContainer:function(e,t){return n(16)(e,t,l)},createContainerWithFragments:l}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.check&&"function"==typeof e.lookup&&"function"==typeof e.retain&&"function"==typeof e.sendQuery&&"function"==typeof e.execute&&"function"==typeof e.subscribe}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}},function(e,t,n){"use strict";e.exports=function(e,t){for(var r in t&&"object"==typeof t||n(2)(!1,"Could not create Relay Container for `%s`. Expected a set of GraphQL fragments, got `%s` instead.",e,t),t)if(t.hasOwnProperty(r)){var o=t[r];(!o||"object"!=typeof o&&"function"!=typeof o)&&n(2)(!1,"Could not create Relay Container for `%s`. The value of fragment `%s` was expected to be a fragment, got `%s` instead.",e,r,o)}}},function(e,t){e.exports=a},function(e,t,n){"use strict";var r=n(3).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher,o=n(3).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;e.exports=function(e){return(null!=r?r.current:o.currentDispatcher).readContext(e)}},function(e,t,n){"use strict";var r=n(1)(n(17)),o=n(1)(n(13)),a=n(1)(n(11)),i=n(1)(n(14)),s=n(1)(n(7)),l=n(1)(n(10)),c="forward";function u(e){return"function"==typeof e?{error:e,complete:e,unsubscribe:function(t){"function"==typeof e&&e()}}:e||{}}function p(e,t,p){var f=n(6).getComponentName(e),h=n(6).getContainerName(e),d=function(e){var t=null,r=!1;for(var o in e){var a=e[o],i=a.metadata&&a.metadata.connection;void 0!==a.metadata&&(r=!0),i&&(1!==i.length&&n(2)(!1,"ReactRelayPaginationContainer: Only a single @connection is supported, `%s` has %s.",o,i.length),t&&n(2)(!1,"ReactRelayPaginationContainer: Only a single fragment with @connection is supported."),t=(0,l.default)({},i[0],{fragmentName:o}))}return r&&null===t&&n(2)(!1,"ReactRelayPaginationContainer: A @connection directive must be present."),t||{}}(t),v=p.getConnectionFromProps||function(e){var t=e.path;return t||n(2)(!1,"ReactRelayPaginationContainer: Unable to synthesize a getConnectionFromProps function."),function(n){for(var r=n[e.fragmentName],o=0;o<t.length;o++){if(!r||"object"!=typeof r)return null;r=r[t[o]]}return r}}(d),y=p.direction||d.direction;y||n(2)(!1,"ReactRelayPaginationContainer: Unable to infer direction of the connection, possibly because both first and last are provided.");var _=p.getFragmentVariables||function(e){var t=e.count;return t||n(2)(!1,"ReactRelayPaginationContainer: Unable to synthesize a getFragmentVariables function."),function(e,n){return(0,l.default)({},e,(0,s.default)({},t,n))}}(d),b=function(d){function b(e){var r;r=d.call(this,e)||this,(0,s.default)((0,i.default)((0,i.default)(r)),"_handleFragmentDataUpdate",function(){var e=n(0).RelayProfiler.profile("ReactRelayPaginationContainer.handleFragmentDataUpdate");r.setState({data:r._resolver.resolve()},e.stop)}),(0,s.default)((0,i.default)((0,i.default)(r)),"_hasMore",function(){var e=r._getConnectionData();return!!(e&&e.hasMore&&e.cursor)}),(0,s.default)((0,i.default)((0,i.default)(r)),"_isLoading",function(){return!!r._refetchSubscription}),(0,s.default)((0,i.default)((0,i.default)(r)),"_refetchConnection",function(e,t,n){if(!r._canFetchPage("refetchConnection"))return{dispose:function(){}};r._refetchVariables=n;var o={count:e,cursor:null,totalCount:e};return{dispose:r._fetchPage(o,u(t),{force:!0}).unsubscribe}}),(0,s.default)((0,i.default)((0,i.default)(r)),"_loadMore",function(e,t,o){if(!r._canFetchPage("loadMore"))return{dispose:function(){}};var a=u(t),i=r._getConnectionData();if(!i)return n(0).Observable.create(function(e){return e.complete()}).subscribe(a),null;var s=i.edgeCount+e;if(o&&o.force)return r._refetchConnection(s,t);var l=n(0).ConnectionInterface.get(),p=l.END_CURSOR,f=l.START_CURSOR,h=i.cursor;n(12)(h,"ReactRelayPaginationContainer: Cannot `loadMore` without valid `%s` (got `%s`)",y===c?p:f,h);var d={count:e,cursor:h,totalCount:s};return{dispose:r._fetchPage(d,a,o).unsubscribe}});var o=n(4).assertRelayContext(e.__relayContext),a=o.environment.unstable_internal.createFragmentSpecResolver;return r._isARequestInFlight=!1,r._refetchSubscription=null,r._refetchVariables=null,r._resolver=a(o,h,t,e,r._handleFragmentDataUpdate),r.state={data:r._resolver.resolve(),prevContext:o,contextForChildren:o,relayProp:r._buildRelayProp(o)},r._isUnmounted=!1,r._hasFetched=!1,r}(0,a.default)(b,d);var m=b.prototype;return m.UNSAFE_componentWillReceiveProps=function(e){var r=n(4).assertRelayContext(e.__relayContext),o=r.environment.unstable_internal,a=o.createFragmentSpecResolver,i=o.getDataIDsFromObject,s=i(t,this.props),l=i(t,e);r.environment===this.state.prevContext.environment&&r.variables===this.state.prevContext.variables&&n(8)(s,l)?this._hasFetched||this._resolver.setProps(e):(this._cleanup(),this._resolver=a(r,h,t,e,this._handleFragmentDataUpdate),this.setState({prevContext:r,contextForChildren:r,relayProp:this._buildRelayProp(r)}));var c=this._resolver.resolve();c!==this.state.data&&this.setState({data:c})},m.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},m.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data||r.relayProp!==this.state.relayProp)return!0;for(var o=Object.keys(e),a=0;a<o.length;a++){var i=o[a];if("__relayContext"===i){if(r.prevContext.environment!==this.state.prevContext.environment||r.prevContext.variables!==this.state.prevContext.variables)return!0}else if(!t.hasOwnProperty(i)&&!n(0).isScalarAndEqual(e[i],this.props[i]))return!0}return!1},m._buildRelayProp=function(e){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:e.environment}},m._getConnectionData=function(){var e=this.props,t=(e.componentRef,(0,o.default)(e,["componentRef"])),r=(0,l.default)({},t,this.state.data),a=v(r);if(null==a)return null;var i=n(0).ConnectionInterface.get(),s=i.EDGES,u=i.PAGE_INFO,p=i.HAS_NEXT_PAGE,h=i.HAS_PREV_PAGE,d=i.END_CURSOR,_=i.START_CURSOR;"object"!=typeof a&&n(2)(!1,"ReactRelayPaginationContainer: Expected `getConnectionFromProps()` in `%s`to return `null` or a plain object with %s and %s properties, got `%s`.",f,s,u,a);var b=a[s],m=a[u];if(null==b||null==m)return null;Array.isArray(b)||n(2)(!1,"ReactRelayPaginationContainer: Expected `getConnectionFromProps()` in `%s`to return an object with %s: Array, got `%s`.",f,s,b),"object"!=typeof m&&n(2)(!1,"ReactRelayPaginationContainer: Expected `getConnectionFromProps()` in `%s`to return an object with %s: Object, got `%s`.",f,u,m);var C=y===c?m[p]:m[h],g=y===c?m[d]:m[_];return"boolean"!=typeof C||0!==b.length&&void 0===g?(n(12)(!1,"ReactRelayPaginationContainer: Cannot paginate without %s fields in `%s`. Be sure to fetch %s (got `%s`) and %s (got `%s`).",u,f,y===c?p:h,C,y===c?d:_,g),null):{cursor:g,edgeCount:b.length,hasMore:C}},m._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new(n(5))),this._queryFetcher},m._canFetchPage=function(e){return!this._isUnmounted||(n(12)(!1,"ReactRelayPaginationContainer: Unexpected call of `%s` on unmounted container `%s`. It looks like some instances of your container still trying to fetch data but they already unmounted. Please make sure you clear all timers, intervals, async calls, etc that may trigger `%s` call.",e,h,e),!1)},m._fetchPage=function(e,r,a){var i=this,s=n(4).assertRelayContext(this.props.__relayContext).environment,c=s.unstable_internal,u=c.createOperationDescriptor,h=c.getRequest,d=c.getVariablesFromObject,v=this.props,y=(v.componentRef,v.__relayContext,(0,o.default)(v,["componentRef","__relayContext"])),b=(0,l.default)({},y,this.state.data),m=this.props.__relayContext.variables,C=d(m,t,y);C=(0,l.default)({},m,C,this._refetchVariables);var g=p.getVariables(b,{count:e.count,cursor:e.cursor},C);("object"!=typeof g||null===g)&&n(2)(!1,"ReactRelayPaginationContainer: Expected `getVariables()` to return an object, got `%s` in `%s`.",g,f),g=(0,l.default)({},g,this._refetchVariables);var R=a?{force:!!a.force}:void 0,x=u(h(p.query),g),P=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var S=function(){i._refetchSubscription===P&&(i._refetchSubscription=null,i._isARequestInFlight=!1)};return this._isARequestInFlight=!0,P=this._getQueryFetcher().execute({environment:s,operation:x,cacheConfig:R,preservePreviousReferences:!0}).mergeMap(function(t){return n(0).Observable.create(function(t){!function(t,r){var o=(0,l.default)({},i.props.__relayContext.variables,C),a=i._resolver.resolve();i._resolver.setVariables(_(C,e.totalCount));var s=i._resolver.resolve();n(8)(a,s)?r():i.setState({data:s,contextForChildren:{environment:i.props.__relayContext.environment,variables:o}},r)}(0,function(){t.next(),t.complete()})})}).do({error:S,complete:S,unsubscribe:S}).subscribe(r||{}),this._refetchSubscription=this._isARequestInFlight?P:null,P},m._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},m.render=function(){var t=this.props,a=t.componentRef,i=(t.__relayContext,(0,o.default)(t,["componentRef","__relayContext"]));return n(3).createElement(n(9).Provider,{value:this.state.contextForChildren},n(3).createElement(e,(0,r.default)({},i,this.state.data,{ref:a,relay:this.state.relayProp})))},b}(n(3).Component);return(0,s.default)(b,"displayName",h),n(15).profileContainer(b,"ReactRelayPaginationContainer"),b}e.exports={createContainer:function(e,t,r){return n(16)(e,t,function(e,t){return p(e,t,r)})},createContainerWithFragments:p}},function(e,t,n){"use strict";var r=n(1)(n(17)),o=n(1)(n(13)),a=n(1)(n(10)),i=n(1)(n(11)),s=n(1)(n(14)),l=n(1)(n(7));function c(e,t,c){var p=n(6).getContainerName(e),f=function(f){function h(e){var r;r=f.call(this,e)||this,(0,l.default)((0,s.default)((0,s.default)(r)),"_handleFragmentDataUpdate",function(){var e=n(0).RelayProfiler.profile("ReactRelayRefetchContainer.handleFragmentDataUpdate"),t=r.state.resolver;r.setState(function(e){return t===e.resolver?{data:e.resolver.resolve()}:null},e.stop)}),(0,l.default)((0,s.default)((0,s.default)(r)),"_refetch",function(e,t,o,i){if(r._isUnmounted)return n(12)(!1,"ReactRelayRefetchContainer: Unexpected call of `refetch` on unmounted container `%s`. It looks like some instances of your container still trying to refetch the data but they already unmounted. Please make sure you clear all timers, intervals, async calls, etc that may trigger `refetch`.",p),{dispose:function(){}};var s=n(4).assertRelayContext(r.props.__relayContext),l=s.environment,u=s.variables,f="function"==typeof e?e(r._getFragmentVariables()):e;f=(0,a.default)({},u,f);var h,d=t?(0,a.default)({},u,t):f,v=i?{force:!!i.force}:void 0,y="function"==typeof o?{next:o,error:o}:o||{},_=r.props.__relayContext.environment.unstable_internal,b=(0,_.createOperationDescriptor)((0,_.getRequest)(c),f);if((r.state.localVariables=f,r._refetchSubscription&&r._refetchSubscription.unsubscribe(),"store-or-network"===(null===i||void 0===i?void 0:i.fetchPolicy))&&null!=r._getQueryFetcher().lookupInStore(l,b))return r.state.resolver.setVariables(d),r.setState(function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:r.props.__relayContext.environment,variables:d}}},function(){y.next&&y.next(),y.complete&&y.complete()}),{dispose:function(){}};return r._getQueryFetcher().execute({environment:l,operation:b,cacheConfig:v,preservePreviousReferences:!0}).mergeMap(function(e){return r.state.resolver.setVariables(d),n(0).Observable.create(function(e){return r.setState(function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:r.props.__relayContext.environment,variables:d}}},function(){e.next(),e.complete()})})}).finally(function(){r._refetchSubscription===h&&(r._refetchSubscription=null)}).subscribe((0,a.default)({},y,{start:function(e){r._refetchSubscription=h=e,y.start&&y.start(e)}})),{dispose:function(){h&&h.unsubscribe()}}});var o=n(4).assertRelayContext(e.__relayContext);r._refetchSubscription=null;var i=(0,o.environment.unstable_internal.createFragmentSpecResolver)(o,p,t,e);return r.state={data:i.resolve(),localVariables:null,prevProps:e,prevPropsContext:o,contextForChildren:o,relayProp:u(o.environment,r._refetch),resolver:i},r._isUnmounted=!1,r}(0,i.default)(h,f);var d=h.prototype;return d.componentDidMount=function(){this._subscribeToNewResolver()},d.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver&&(t.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolver())},h.getDerivedStateFromProps=function(e,r){var o=r.prevProps,a=n(4).assertRelayContext(e.__relayContext),i=a.environment.unstable_internal,s=i.createFragmentSpecResolver,l=i.getDataIDsFromObject,c=l(t,o),f=l(t,e),h=r.resolver;if(r.prevPropsContext.environment!==a.environment||r.prevPropsContext.variables!==a.variables||!n(8)(c,f))return{data:(h=s(a,p,t,e)).resolve(),localVariables:null,prevProps:e,prevPropsContext:a,contextForChildren:a,relayProp:u(a.environment,r.relayProp.refetch),resolver:h};r.localVariables||h.setProps(e);var d=h.resolve();return d!==r.data?{data:d,prevProps:e}:null},d.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},d.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data||r.relayProp!==this.state.relayProp)return!0;for(var o=Object.keys(e),a=0;a<o.length;a++){var i=o[a];if("__relayContext"===i){if(this.state.prevPropsContext.environment!==r.prevPropsContext.environment||this.state.prevPropsContext.variables!==r.prevPropsContext.variables)return!0}else if(!t.hasOwnProperty(i)&&!n(0).isScalarAndEqual(e[i],this.props[i]))return!0}return!1},d._subscribeToNewResolver=function(){var e=this.state,t=e.data,n=e.resolver;n.setCallback(this._handleFragmentDataUpdate);var r=n.resolve();t!==r&&this.setState({data:r})},d._getFragmentVariables=function(){return(0,this.props.__relayContext.environment.unstable_internal.getVariablesFromObject)(this.props.__relayContext.variables,t,this.props)},d._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new(n(5))),this._queryFetcher},d.render=function(){var t=this.props,a=t.componentRef,i=(t.__relayContext,(0,o.default)(t,["componentRef","__relayContext"])),s=this.state,l=s.relayProp,c=s.contextForChildren;return n(3).createElement(n(9).Provider,{value:c},n(3).createElement(e,(0,r.default)({},i,this.state.data,{ref:a,relay:l})))},h}(n(3).Component);return(0,l.default)(f,"displayName",p),n(15).profileContainer(f,"ReactRelayRefetchContainer"),f}function u(e,t){return{environment:e,refetch:t}}e.exports={createContainer:function(e,t,r){return n(16)(e,t,function(e,t){return c(e,t,r)})},createContainerWithFragments:c}}])});
4
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("relay-runtime"),require("react"),require("fbjs/lib/invariant"),require("fbjs/lib/areEqual"),require("fbjs/lib/warning"),require("fbjs/lib/mapObject"),require("fbjs/lib/forEachObject")):"function"==typeof define&&define.amd?define(["relay-runtime","react","fbjs/lib/invariant","fbjs/lib/areEqual","fbjs/lib/warning","fbjs/lib/mapObject","fbjs/lib/forEachObject"],t):"object"==typeof exports?exports.ReactRelay=t(require("relay-runtime"),require("react"),require("fbjs/lib/invariant"),require("fbjs/lib/areEqual"),require("fbjs/lib/warning"),require("fbjs/lib/mapObject"),require("fbjs/lib/forEachObject")):e.ReactRelay=t(e["relay-runtime"],e.react,e["fbjs/lib/invariant"],e["fbjs/lib/areEqual"],e["fbjs/lib/warning"],e["fbjs/lib/mapObject"],e["fbjs/lib/forEachObject"])}(window,function(e,t,n,r,o,a,i){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=17)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";var r=n(1),o=n(0).__internal.createRelayContext;e.exports=o(r)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=n},function(e,t,n){var r=n(4);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t){e.exports=r},function(e,t,n){"use strict";function r(e){return e.displayName||e.name||"Component"}e.exports={getComponentName:r,getContainerName:function(e){return"Relay("+r(e)+")"}}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";var r=n(2)(n(13)),o=n(1),a=n(3),i=n(19),s=n(5),c=n(20),l=n(21),u=n(9),f=u.getComponentName,p=u.getContainerName;e.exports=function(e,t,u){var h,v,d=p(e);function y(r){if(null==v||r.__relayContext.environment!==h){if(h=r.__relayContext.environment,!(0,n(0).isRelayModernEnvironment)(h))throw new Error("RelayModernContainer: Can only use Relay Modern component "+"".concat(d," in a Relay Modern environment!"));var o=h.unstable_internal.getFragment,a=c(t,o);v=u(e,a),y.getDerivedStateFromProps=v.getDerivedStateFromProps}return new v(r)}function _(e,t){var n=l(a);return n||s(!1,"".concat(d," tried to render a context that was ")+"not valid this means that ".concat(d," was rendered outside of a ")+"query renderer."),o.createElement(y,(0,r.default)({},e,{__relayContext:n,componentRef:e.componentRef||t}))}i(f(e),t),y.prototype=o.Component.prototype,y.displayName=d,_.displayName=d;var b=o.forwardRef(_);return b.__ComponentClass=e,b}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";var r=n(5),o=n(22),a=n(23);function i(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&o(e.environment)&&a(e.variables)}e.exports={assertRelayContext:function(e){return i(e)||r(!1,"RelayContext: Expected `context.relay` to be an object conforming to the `RelayContext` interface, got `%s`.",e),e},isRelayContext:i}},function(e,t,n){"use strict";var r=n(2)(n(4)),o=n(5),a=n(0),i=a.isRelayModernEnvironment,s=a.__internal.fetchQuery,c=function(){function e(e){(0,r.default)(this,"_selectionReferences",[]),(0,r.default)(this,"_callOnDataChangeWhenSet",!1),null!=e&&(this._cacheSelectionReference=e.cacheSelectionReference,this._selectionReferences=e.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(e,t){return e.check(t.root)?(this._retainCachedOperation(e,t),e.lookup(t.fragment,t)):null},t.execute=function(e){var t=this,n=e.environment,r=e.operation,o=e.cacheConfig,a=e.preservePreviousReferences,c=void 0!==a&&a,l=n.retain(r.root),u=null!=o?{networkCacheConfig:o}:{},f=function(){t._selectionReferences=t._selectionReferences.concat(l)},p=function(){c||t.disposeSelectionReferences(),t._selectionReferences=t._selectionReferences.concat(l)},h=function(){t._selectionReferences=t._selectionReferences.concat(l)};return i(n)?s(n,r,u).do({error:f,complete:p,unsubscribe:h}):n.execute({operation:r,cacheConfig:o}).do({error:f,complete:p,unsubscribe:h})},t.setOnDataChange=function(e){this._fetchOptions||o(!1,"ReactRelayQueryFetcher: `setOnDataChange` should have been called after having called `fetch`"),"function"==typeof e&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(e),this._callOnDataChangeWhenSet&&(null!=this._error?e({error:this._error}):null!=this._snapshot&&e({snapshot:this._snapshot})))},t.fetch=function(e){var t,n=this,r=e.cacheConfig,o=e.environment,a=e.operation,i=e.onDataChange,s=!1;this.disposeRequest();var c=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={cacheConfig:r,environment:o,onDataChangeCallbacks:c||[],operation:a},i&&-1===this._fetchOptions.onDataChangeCallbacks.indexOf(i)&&this._fetchOptions.onDataChangeCallbacks.push(i);var l=this.execute({environment:o,operation:a,cacheConfig:r}).finally(function(){n._pendingRequest=null}).subscribe({next:function(){n._callOnDataChangeWhenSet=!0,n._error=null,n._onQueryDataAvailable({notifyFirstResult:s})},error:function(e){n._callOnDataChangeWhenSet=!0,n._error=e,n._snapshot=null;var r=n._fetchOptions&&n._fetchOptions.onDataChangeCallbacks;s?r&&r.forEach(function(t){t({error:e})}):t=e}});if(this._pendingRequest={dispose:function(){l.unsubscribe()}},s=!0,t)throw t;return this._snapshot},t.retry=function(){return this._fetchOptions||o(!1,"ReactRelayQueryFetcher: `retry` should be called after having called `fetch`"),this.fetch({cacheConfig:this._fetchOptions.cacheConfig,environment:this._fetchOptions.environment,operation:this._fetchOptions.operation,onDataChange:null})},t.dispose=function(){this.disposeRequest(),this.disposeSelectionReferences()},t.disposeRequest=function(){this._error=null,this._snapshot=null,this._pendingRequest&&this._pendingRequest.dispose(),this._rootSubscription&&(this._rootSubscription.dispose(),this._rootSubscription=null)},t._retainCachedOperation=function(e,t){this._disposeCacheSelectionReference(),this._cacheSelectionReference=e.retain(t.root)},t._disposeCacheSelectionReference=function(){this._cacheSelectionReference&&this._cacheSelectionReference.dispose(),this._cacheSelectionReference=null},t.disposeSelectionReferences=function(){this._disposeCacheSelectionReference(),this._selectionReferences.forEach(function(e){return e.dispose()}),this._selectionReferences=[]},t._onQueryDataAvailable=function(e){var t=this,n=e.notifyFirstResult;this._fetchOptions||o(!1,"ReactRelayQueryFetcher: `_onQueryDataAvailable` should have been called after having called `fetch`");var r=this._fetchOptions,a=r.environment,i=r.onDataChangeCallbacks,s=r.operation;if(!this._snapshot&&(this._snapshot=a.lookup(s.fragment,s),this._rootSubscription=a.subscribe(this._snapshot,function(e){if(null!=t._fetchOptions){var n=t._fetchOptions.onDataChangeCallbacks;Array.isArray(n)&&n.forEach(function(t){return t({snapshot:e})})}}),this._snapshot&&n&&Array.isArray(i))){var c=this._snapshot;i.forEach(function(e){return e({snapshot:c})})}},e}();e.exports=c},function(e,t){e.exports=o},function(e,t,n){"use strict";var r=n(3),o=n(18),a=n(24),i=n(26),s=n(27),c=n(0);e.exports={QueryRenderer:i,MutationTypes:c.MutationTypes,RangeOperations:c.RangeOperations,ReactRelayContext:r,applyOptimisticMutation:c.applyOptimisticMutation,commitLocalUpdate:c.commitLocalUpdate,commitMutation:c.commitMutation,createFragmentContainer:o.createContainer,createPaginationContainer:a.createContainer,createRefetchContainer:s.createContainer,fetchQuery:c.fetchQuery,graphql:c.graphql,requestSubscription:c.requestSubscription}},function(e,t,n){"use strict";var r=n(2),o=r(n(6)),a=r(n(10)),i=r(n(11)),s=r(n(7)),c=r(n(4)),l=n(1),u=n(8),f=n(12),p=n(9).getContainerName,h=n(14).assertRelayContext,v=n(0).isScalarAndEqual;function d(e,t){var n,r,f=p(e);return r=n=function(n){function r(e){var r;r=n.call(this,e)||this,(0,c.default)((0,i.default)(r),"_handleFragmentDataUpdate",function(){var e=r.state.resolver;r.setState(function(t){return e===t.resolver?{data:t.resolver.resolve(),relayProp:y(t.relayProp.environment)}:null})});var o=h(e.__relayContext),a=(0,o.environment.unstable_internal.createFragmentSpecResolver)(o,f,t,e);return r.state={data:a.resolve(),prevProps:e,prevPropsContext:o,relayProp:y(o.environment),resolver:a},r}(0,s.default)(r,n),r.getDerivedStateFromProps=function(e,n){var r=n.prevProps,o=h(e.__relayContext),a=o.environment.unstable_internal,i=a.createFragmentSpecResolver,s=a.getDataIDsFromObject,c=s(t,r),l=s(t,e),p=n.resolver;if(n.prevPropsContext.environment!==o.environment||n.prevPropsContext.variables!==o.variables||!u(c,l))return{data:(p=i(o,f,t,e)).resolve(),prevPropsContext:o,prevProps:e,relayProp:y(o.environment),resolver:p};p.setProps(e);var v=p.resolve();return v!==n.data?{data:v,prevProps:e,prevPropsContext:o,relayProp:y(o.environment)}:null};var p=r.prototype;return p.componentDidMount=function(){this._subscribeToNewResolver(),this._rerenderIfStoreHasChanged()},p.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver&&(t.resolver.dispose(),this._subscribeToNewResolver()),this._rerenderIfStoreHasChanged()},p.componentWillUnmount=function(){this.state.resolver.dispose()},p.shouldComponentUpdate=function(e,n){if(n.data!==this.state.data)return!0;for(var r=Object.keys(e),o=0;o<r.length;o++){var a=r[o];if("__relayContext"===a){if(n.prevPropsContext.environment!==this.state.prevPropsContext.environment||n.prevPropsContext.variables!==this.state.prevPropsContext.variables)return!0}else if(!t.hasOwnProperty(a)&&!v(e[a],this.props[a]))return!0}return!1},p._rerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,n=e.resolver.resolve();t!==n&&this.setState({data:n})},p._subscribeToNewResolver=function(){this.state.resolver.setCallback(this._handleFragmentDataUpdate)},p.render=function(){var t=this.props,n=t.componentRef,r=(t.__relayContext,(0,a.default)(t,["componentRef","__relayContext"]));return l.createElement(e,(0,o.default)({},r,this.state.data,{ref:n,relay:this.state.relayProp}))},r}(l.Component),(0,c.default)(n,"displayName",f),r}function y(e){return{environment:e}}e.exports={createContainer:function(e,t){return f(e,t,d)}}},function(e,t,n){"use strict";var r=n(5);e.exports=function(e,t){for(var n in t&&"object"==typeof t||r(!1,"Could not create Relay Container for `%s`. Expected a set of GraphQL fragments, got `%s` instead.",e,t),t)if(t.hasOwnProperty(n)){var o=t[n];(!o||"object"!=typeof o&&"function"!=typeof o)&&r(!1,"Could not create Relay Container for `%s`. The value of fragment `%s` was expected to be a fragment, got `%s` instead.",e,n,o)}}},function(e,t){e.exports=a},function(e,t,n){"use strict";var r=n(1).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,o=r.ReactCurrentDispatcher,a=r.ReactCurrentOwner;e.exports=function(e){return(null!=o?o.current:a.currentDispatcher).readContext(e)}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.check&&"function"==typeof e.lookup&&"function"==typeof e.retain&&"function"==typeof e.sendQuery&&"function"==typeof e.execute&&"function"==typeof e.subscribe}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}},function(e,t,n){"use strict";var r=n(2),o=r(n(13)),a=r(n(10)),i=r(n(11)),s=r(n(7)),c=r(n(4)),l=r(n(6)),u=n(1),f=n(3),p=n(15),h=n(8),v=n(12),d=n(25),y=n(5),_=n(16),b=n(9),m=b.getComponentName,C=b.getContainerName,g=n(14).assertRelayContext,R=n(0),x=R.ConnectionInterface,P=R.Observable,S=R.getFragmentOwners,O=R.isScalarAndEqual,F="forward";function q(e){return"function"==typeof e?{error:e,complete:e,unsubscribe:function(t){"function"==typeof e&&e()}}:e||{}}function j(e,t,n){var r,v,b=m(e),R=C(e),j=function(e){var t=null,n=!1;for(var r in e){var o=e[r],a=o.metadata&&o.metadata.connection;void 0!==o.metadata&&(n=!0),a&&(1!==a.length&&y(!1,"ReactRelayPaginationContainer: Only a single @connection is supported, `%s` has %s.",r,a.length),t&&y(!1,"ReactRelayPaginationContainer: Only a single fragment with @connection is supported."),t=(0,l.default)({},a[0],{fragmentName:r}))}return n&&null===t&&y(!1,"ReactRelayPaginationContainer: A @connection directive must be present."),t||{}}(t),D=n.getConnectionFromProps||function(e){var t=e.path;return t||y(!1,"ReactRelayPaginationContainer: Unable to synthesize a getConnectionFromProps function."),function(n){for(var r=n[e.fragmentName],o=0;o<t.length;o++){if(!r||"object"!=typeof r)return null;r=r[t[o]]}return r}}(j),E=n.direction||j.direction;E||y(!1,"ReactRelayPaginationContainer: Unable to infer direction of the connection, possibly because both first and last are provided.");var w=n.getFragmentVariables||function(e){var t=e.count;return t||y(!1,"ReactRelayPaginationContainer: Unable to synthesize a getFragmentVariables function."),function(e,n){return(0,l.default)({},e,(0,c.default)({},t,n))}}(j);return v=r=function(r){function v(e){var n;n=r.call(this,e)||this,(0,c.default)((0,i.default)(n),"_handleFragmentDataUpdate",function(){n.setState({data:n._resolver.resolve()})}),(0,c.default)((0,i.default)(n),"_hasMore",function(){var e=n._getConnectionData();return!!(e&&e.hasMore&&e.cursor)}),(0,c.default)((0,i.default)(n),"_isLoading",function(){return!!n._refetchSubscription}),(0,c.default)((0,i.default)(n),"_refetchConnection",function(e,t,r){if(!n._canFetchPage("refetchConnection"))return{dispose:function(){}};n._refetchVariables=r;var o={count:e,cursor:null,totalCount:e};return{dispose:n._fetchPage(o,q(t),{force:!0}).unsubscribe}}),(0,c.default)((0,i.default)(n),"_loadMore",function(e,t,r){if(!n._canFetchPage("loadMore"))return{dispose:function(){}};var o=q(t),a=n._getConnectionData();if(!a)return P.create(function(e){return e.complete()}).subscribe(o),null;var i=a.edgeCount+e;if(r&&r.force)return n._refetchConnection(i,t);var s=x.get(),c=s.END_CURSOR,l=s.START_CURSOR,u=a.cursor;_(u,"ReactRelayPaginationContainer: Cannot `loadMore` without valid `%s` (got `%s`)",E===F?c:l,u);var f={count:e,cursor:u,totalCount:i};return{dispose:n._fetchPage(f,o,r).unsubscribe}});var o=g(e.__relayContext),a=o.environment.unstable_internal.createFragmentSpecResolver;return n._isARequestInFlight=!1,n._refetchSubscription=null,n._refetchVariables=null,n._resolver=a(o,R,t,e,n._handleFragmentDataUpdate),n.state={data:n._resolver.resolve(),prevContext:o,contextForChildren:o,relayProp:n._buildRelayProp(o)},n._isUnmounted=!1,n._hasFetched=!1,n}(0,s.default)(v,r);var m=v.prototype;return m.UNSAFE_componentWillReceiveProps=function(e){var n=g(e.__relayContext),r=n.environment.unstable_internal,o=r.createFragmentSpecResolver,a=r.getDataIDsFromObject,i=a(t,this.props),s=a(t,e);n.environment===this.state.prevContext.environment&&n.variables===this.state.prevContext.variables&&h(i,s)?this._hasFetched||this._resolver.setProps(e):(this._cleanup(),this._resolver=o(n,R,t,e,this._handleFragmentDataUpdate),this.setState({prevContext:n,contextForChildren:n,relayProp:this._buildRelayProp(n)}));var c=this._resolver.resolve();c!==this.state.data&&this.setState({data:c})},m.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},m.shouldComponentUpdate=function(e,n){if(n.data!==this.state.data||n.relayProp!==this.state.relayProp)return!0;for(var r=Object.keys(e),o=0;o<r.length;o++){var a=r[o];if("__relayContext"===a){if(n.prevContext.environment!==this.state.prevContext.environment||n.prevContext.variables!==this.state.prevContext.variables)return!0}else if(!t.hasOwnProperty(a)&&!O(e[a],this.props[a]))return!0}return!1},m._buildRelayProp=function(e){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:e.environment}},m._getConnectionData=function(){var e=this.props,t=(e.componentRef,(0,a.default)(e,["componentRef"])),n=(0,l.default)({},t,this.state.data),r=D(n);if(null==r)return null;var o=x.get(),i=o.EDGES,s=o.PAGE_INFO,c=o.HAS_NEXT_PAGE,u=o.HAS_PREV_PAGE,f=o.END_CURSOR,p=o.START_CURSOR;"object"!=typeof r&&y(!1,"ReactRelayPaginationContainer: Expected `getConnectionFromProps()` in `%s`to return `null` or a plain object with %s and %s properties, got `%s`.",b,i,s,r);var h=r[i],v=r[s];if(null==h||null==v)return null;Array.isArray(h)||y(!1,"ReactRelayPaginationContainer: Expected `getConnectionFromProps()` in `%s`to return an object with %s: Array, got `%s`.",b,i,h),"object"!=typeof v&&y(!1,"ReactRelayPaginationContainer: Expected `getConnectionFromProps()` in `%s`to return an object with %s: Object, got `%s`.",b,s,v);var d=E===F?v[c]:v[u],m=E===F?v[f]:v[p];return"boolean"!=typeof d||0!==h.length&&void 0===m?(_(!1,"ReactRelayPaginationContainer: Cannot paginate without %s fields in `%s`. Be sure to fetch %s (got `%s`) and %s (got `%s`).",s,b,E===F?c:u,d,E===F?f:p,m),null):{cursor:m,edgeCount:h.length,hasMore:d}},m._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new p),this._queryFetcher},m._canFetchPage=function(e){return!this._isUnmounted||(_(!1,"ReactRelayPaginationContainer: Unexpected call of `%s` on unmounted container `%s`. It looks like some instances of your container still trying to fetch data but they already unmounted. Please make sure you clear all timers, intervals, async calls, etc that may trigger `%s` call.",e,R,e),!1)},m._fetchPage=function(e,r,o){var i,s,c=this,u=g(this.props.__relayContext).environment,f=u.unstable_internal,p=f.createOperationDescriptor,v=f.getRequest,_=f.getVariablesFromObject,m=this.props,C=(m.componentRef,m.__relayContext,(0,a.default)(m,["componentRef","__relayContext"])),R=(0,l.default)({},C,this.state.data),x=S(t,C);d(t,function(e,t){var n,r,o,a=x[t],s=Array.isArray(a)?null!==(n=null===(r=a[0])||void 0===r?void 0:r.variables)&&void 0!==n?n:{}:null!==(o=null==a?void 0:a.variables)&&void 0!==o?o:{};i=(0,l.default)({},i,s)}),s=_({},t,C,x),s=(0,l.default)({},i,s,this._refetchVariables);var O=n.getVariables(R,{count:e.count,cursor:e.cursor},s);("object"!=typeof O||null===O)&&y(!1,"ReactRelayPaginationContainer: Expected `getVariables()` to return an object, got `%s` in `%s`.",O,b),O=(0,l.default)({},O,this._refetchVariables),s=(0,l.default)({},O,s);var F=o?{force:!!o.force}:void 0,q=p(v(n.query),O),j=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var D=function(){c._refetchSubscription===j&&(c._refetchSubscription=null,c._isARequestInFlight=!1)};return this._isARequestInFlight=!0,j=this._getQueryFetcher().execute({environment:u,operation:q,cacheConfig:F,preservePreviousReferences:!0}).mergeMap(function(t){return P.create(function(t){!function(t,n){var r=(0,l.default)({},c.props.__relayContext.variables,s),o=c._resolver.resolve();c._resolver.setVariables(w(s,e.totalCount),q.node);var a=c._resolver.resolve();h(o,a)?n():c.setState({data:a,contextForChildren:{environment:c.props.__relayContext.environment,variables:r}},n)}(0,function(){t.next(),t.complete()})})}).do({error:D,complete:D,unsubscribe:D}).subscribe(r||{}),this._refetchSubscription=this._isARequestInFlight?j:null,j},m._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},m.render=function(){var t=this.props,n=t.componentRef,r=(t.__relayContext,(0,a.default)(t,["componentRef","__relayContext"]));return u.createElement(f.Provider,{value:this.state.contextForChildren},u.createElement(e,(0,o.default)({},r,this.state.data,{ref:n,relay:this.state.relayProp})))},v}(u.Component),(0,c.default)(r,"displayName",R),v}e.exports={createContainer:function(e,t,n){return v(e,t,function(e,t){return j(e,t,n)})}}},function(e,t){e.exports=i},function(e,t,n){"use strict";var r=n(2),o=r(n(6)),a=r(n(7)),i=n(1),s=n(3),c=n(15),l=n(8),u=n(0).deepFreeze,f={},p="STORE_THEN_NETWORK",h=function(e){function t(t){var n;n=e.call(this,t)||this;var r,a,i={handleDataChange:null,handleRetryAfterError:null};if(t.query){var s=t.query;a=y((0,t.environment.unstable_internal.getRequest)(s).params,t.variables),r=f[a]?f[a].queryFetcher:new c}else r=new c;return n.state=(0,o.default)({prevPropsEnvironment:t.environment,prevPropsVariables:t.variables,prevQuery:t.query,queryFetcher:r,retryCallbacks:i},_(t,r,i,a)),n}(0,a.default)(t,e),t.getDerivedStateFromProps=function(e,t){if(t.prevQuery!==e.query||t.prevPropsEnvironment!==e.environment||!l(t.prevPropsVariables,e.variables)){var n,r=e.query,a=t.queryFetcher.getSelectionReferences();if(t.queryFetcher.disposeRequest(),r){var i=y((0,e.environment.unstable_internal.getRequest)(r).params,e.variables);n=f[i]?f[i].queryFetcher:new c(a)}else n=new c(a);return(0,o.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:n},_(e,n,t.retryCallbacks))}return null};var n=t.prototype;return n.componentDidMount=function(){var e=this,t=this.state,n=t.retryCallbacks,r=t.queryFetcher,o=t.requestCacheKey;o&&delete f[o],n.handleDataChange=function(t){var n=null==t.error?null:t.error,r=null==t.snapshot?null:t.snapshot;e.setState(function(e){var t=e.requestCacheKey;return t&&delete f[t],r===e.snapshot&&n===e.error?null:{renderProps:d(n,r,e.queryFetcher,e.retryCallbacks),snapshot:r,requestCacheKey:null}})},n.handleRetryAfterError=function(t){return e.setState(function(e){var t=e.requestCacheKey;return t&&delete f[t],{renderProps:{error:null,props:null,retry:null},requestCacheKey:null}})},this.props.query&&r.setOnDataChange(n.handleDataChange)},n.componentDidUpdate=function(){var e=this.state.requestCacheKey;e&&(delete f[e],delete this.state.requestCacheKey)},n.componentWillUnmount=function(){this.state.queryFetcher.dispose()},n.shouldComponentUpdate=function(e,t){return e.render!==this.props.render||t.renderProps!==this.state.renderProps},n.render=function(){var e=this.state,t=e.renderProps,n=e.relayContext;return u(t),i.createElement(s.Provider,{value:n},this.props.render(t))},t}(i.Component);function v(e,t){return{environment:e,variables:t}}function d(e,t,n,r){return{error:e||null,props:t?t.data:null,retry:function(){var t=n.retry();t&&"function"==typeof r.handleDataChange?r.handleDataChange({snapshot:t}):e&&"function"==typeof r.handleRetryAfterError&&r.handleRetryAfterError(e)}}}function y(e,t){var n=e.id||e.text;return JSON.stringify({id:String(n),variables:t})}function _(e,t,n,r){var o=e.environment,a=e.query,i=e.variables,s=o;if(!a)return t.dispose(),{error:null,relayContext:v(s,i),renderProps:{error:null,props:{},retry:null},requestCacheKey:null};var c=s.unstable_internal,l=c.createOperationDescriptor,u=(0,c.getRequest)(a),h=l(u,i),_=v(s,h.variables);if("string"==typeof r&&f[r]){var b=f[r].snapshot;return b?{error:null,relayContext:_,renderProps:d(null,b,t,n),snapshot:b,requestCacheKey:r}:{error:null,relayContext:_,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:r}}try{var m=e.dataFrom===p?t.lookupInStore(s,h):null,C=t.fetch({cacheConfig:e.cacheConfig,dataFrom:e.dataFrom,environment:s,onDataChange:n.handleDataChange,operation:h})||m;return r=r||y(u.params,e.variables),f[r]={queryFetcher:t,snapshot:C},C?{error:null,relayContext:_,renderProps:d(null,C,t,n),snapshot:C,requestCacheKey:r}:{error:null,relayContext:_,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:r}}catch(e){return{error:e,relayContext:_,renderProps:d(e,null,t,n),snapshot:null,requestCacheKey:r}}}e.exports=h},function(e,t,n){"use strict";var r=n(2),o=r(n(13)),a=r(n(10)),i=r(n(6)),s=r(n(11)),c=r(n(7)),l=r(n(4)),u=n(1),f=n(3),p=n(15),h=n(8),v=n(12),d=n(16),y=n(9).getContainerName,_=n(14).assertRelayContext,b=n(0),m=b.Observable,C=b.getFragmentOwners,g=b.isScalarAndEqual;function R(e,t){return{environment:e,refetch:t}}e.exports={createContainer:function(e,t,n){return v(e,t,function(e,t){return function(e,t,n){var r,v,b=y(e);return v=r=function(r){function v(e){var o;o=r.call(this,e)||this,(0,l.default)((0,s.default)(o),"_handleFragmentDataUpdate",function(){var e=o.state.resolver;o.setState(function(t){return e===t.resolver?{data:t.resolver.resolve()}:null})}),(0,l.default)((0,s.default)(o),"_refetch",function(e,t,r,a){if(o._isUnmounted)return d(!1,"ReactRelayRefetchContainer: Unexpected call of `refetch` on unmounted container `%s`. It looks like some instances of your container still trying to refetch the data but they already unmounted. Please make sure you clear all timers, intervals, async calls, etc that may trigger `refetch`.",b),{dispose:function(){}};var s=_(o.props.__relayContext),c=s.environment,l=s.variables,u="function"==typeof e?e(o._getFragmentVariables()):e;u=(0,i.default)({},l,u);var f,p=t?(0,i.default)({},u,t):u,h=a?{force:!!a.force}:void 0,v="function"==typeof r?{next:r,error:r}:r||{},y=o.props.__relayContext.environment.unstable_internal,C=(0,y.createOperationDescriptor)((0,y.getRequest)(n),u);return o.state.localVariables=u,o._refetchSubscription&&o._refetchSubscription.unsubscribe(),"store-or-network"===(null==a?void 0:a.fetchPolicy)&&null!=o._getQueryFetcher().lookupInStore(c,C)?(o.state.resolver.setVariables(p,C.node),o.setState(function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:o.props.__relayContext.environment,variables:p}}},function(){v.next&&v.next(),v.complete&&v.complete()}),{dispose:function(){}}):(o._getQueryFetcher().execute({environment:c,operation:C,cacheConfig:h,preservePreviousReferences:!0}).mergeMap(function(e){return o.state.resolver.setVariables(p,C.node),m.create(function(e){return o.setState(function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:o.props.__relayContext.environment,variables:p}}},function(){e.next(),e.complete()})})}).finally(function(){o._refetchSubscription===f&&(o._refetchSubscription=null)}).subscribe((0,i.default)({},v,{start:function(e){o._refetchSubscription=f=e,v.start&&v.start(e)}})),{dispose:function(){f&&f.unsubscribe()}})});var a=_(e.__relayContext);o._refetchSubscription=null;var c=(0,a.environment.unstable_internal.createFragmentSpecResolver)(a,b,t,e);return o.state={data:c.resolve(),localVariables:null,prevProps:e,prevPropsContext:a,contextForChildren:a,relayProp:R(a.environment,o._refetch),resolver:c},o._isUnmounted=!1,o}(0,c.default)(v,r);var y=v.prototype;return y.componentDidMount=function(){this._subscribeToNewResolver()},y.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver&&(t.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolver())},v.getDerivedStateFromProps=function(e,n){var r=n.prevProps,o=_(e.__relayContext),a=o.environment.unstable_internal,i=a.createFragmentSpecResolver,s=a.getDataIDsFromObject,c=s(t,r),l=s(t,e),u=n.resolver;if(n.prevPropsContext.environment!==o.environment||n.prevPropsContext.variables!==o.variables||!h(c,l))return{data:(u=i(o,b,t,e)).resolve(),localVariables:null,prevProps:e,prevPropsContext:o,contextForChildren:o,relayProp:R(o.environment,n.relayProp.refetch),resolver:u};n.localVariables||u.setProps(e);var f=u.resolve();return f!==n.data?{data:f,prevProps:e}:null},y.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},y.shouldComponentUpdate=function(e,n){if(n.data!==this.state.data||n.relayProp!==this.state.relayProp)return!0;for(var r=Object.keys(e),o=0;o<r.length;o++){var a=r[o];if("__relayContext"===a){if(this.state.prevPropsContext.environment!==n.prevPropsContext.environment||this.state.prevPropsContext.variables!==n.prevPropsContext.variables)return!0}else if(!t.hasOwnProperty(a)&&!g(e[a],this.props[a]))return!0}return!1},y._subscribeToNewResolver=function(){var e=this.state,t=e.data,n=e.resolver;n.setCallback(this._handleFragmentDataUpdate);var r=n.resolve();t!==r&&this.setState({data:r})},y._getFragmentVariables=function(){return(0,this.props.__relayContext.environment.unstable_internal.getVariablesFromObject)({},t,this.props,C(t,this.props))},y._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new p),this._queryFetcher},y.render=function(){var t=this.props,n=t.componentRef,r=(t.__relayContext,(0,a.default)(t,["componentRef","__relayContext"])),i=this.state,s=i.relayProp,c=i.contextForChildren;return u.createElement(f.Provider,{value:c},u.createElement(e,(0,o.default)({},r,this.state.data,{ref:n,relay:s})))},v}(u.Component),(0,l.default)(r,"displayName",b),v}(e,t,n)})}}}])});
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Relay v2.0.0-rc.2
2
+ * Relay v5.0.0
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
5
5
  *
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("relay-runtime"),require("fbjs/lib/invariant"),require("react"),require("fbjs/lib/areEqual"),require("fbjs/lib/mapObject")):"function"==typeof define&&define.amd?define(["relay-runtime","fbjs/lib/invariant","react","fbjs/lib/areEqual","fbjs/lib/mapObject"],t):"object"==typeof exports?exports.ReactRelay=t(require("relay-runtime"),require("fbjs/lib/invariant"),require("react"),require("fbjs/lib/areEqual"),require("fbjs/lib/mapObject")):e.ReactRelay=t(e["relay-runtime"],e["fbjs/lib/invariant"],e.react,e["fbjs/lib/areEqual"],e["fbjs/lib/mapObject"])}(window,function(e,t,r,n,o){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=17)}([function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t,r){"use strict";function n(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&r(20)(e.environment)&&r(21)(e.variables)}e.exports={assertRelayContext:function(e){return n(e)||r(2)(!1),e},isRelayContext:n}},function(e,t,r){"use strict";var n=r(0)(r(7)),o=function(){function e(e){(0,n.default)(this,"_selectionReferences",[]),(0,n.default)(this,"_callOnDataChangeWhenSet",!1),null!=e&&(this._cacheSelectionReference=e.cacheSelectionReference,this._selectionReferences=e.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(e,t){return e.check(t.root)?(this._retainCachedOperation(e,t),e.lookup(t.fragment)):null},t.execute=function(e){var t=this,r=e.environment,n=e.operation,o=e.cacheConfig,a=e.preservePreviousReferences,i=void 0!==a&&a,s=r.retain(n.root);return r.execute({operation:n,cacheConfig:o}).do({error:function(){t._selectionReferences=t._selectionReferences.concat(s)},complete:function(){i||t.disposeSelectionReferences(),t._selectionReferences=t._selectionReferences.concat(s)},unsubscribe:function(){t._selectionReferences=t._selectionReferences.concat(s)}})},t.setOnDataChange=function(e){this._fetchOptions||r(2)(!1),"function"==typeof e&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(e),this._callOnDataChangeWhenSet&&(null!=this._error?e({error:this._error}):null!=this._snapshot&&e({snapshot:this._snapshot})))},t.fetch=function(e){var t,r=this,n=e.cacheConfig,o=e.environment,a=e.operation,i=e.onDataChange,s=!1;this.disposeRequest();var u=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={cacheConfig:n,environment:o,onDataChangeCallbacks:u||[],operation:a},i&&-1===this._fetchOptions.onDataChangeCallbacks.indexOf(i)&&this._fetchOptions.onDataChangeCallbacks.push(i);var c=this.execute({environment:o,operation:a,cacheConfig:n}).finally(function(){r._pendingRequest=null}).subscribe({next:function(){r._callOnDataChangeWhenSet=!0,r._error=null,r._onQueryDataAvailable({notifyFirstResult:s})},error:function(e){r._callOnDataChangeWhenSet=!0,r._error=e,r._snapshot=null;var n=r._fetchOptions&&r._fetchOptions.onDataChangeCallbacks;s?n&&n.forEach(function(t){t({error:e})}):t=e}});if(this._pendingRequest={dispose:function(){c.unsubscribe()}},s=!0,t)throw t;return this._snapshot},t.retry=function(){return this._fetchOptions||r(2)(!1),this.fetch({cacheConfig:this._fetchOptions.cacheConfig,environment:this._fetchOptions.environment,operation:this._fetchOptions.operation,onDataChange:null})},t.dispose=function(){this.disposeRequest(),this.disposeSelectionReferences()},t.disposeRequest=function(){this._error=null,this._snapshot=null,this._pendingRequest&&this._pendingRequest.dispose(),this._rootSubscription&&(this._rootSubscription.dispose(),this._rootSubscription=null)},t._retainCachedOperation=function(e,t){this._disposeCacheSelectionReference(),this._cacheSelectionReference=e.retain(t.root)},t._disposeCacheSelectionReference=function(){this._cacheSelectionReference&&this._cacheSelectionReference.dispose(),this._cacheSelectionReference=null},t.disposeSelectionReferences=function(){this._disposeCacheSelectionReference(),this._selectionReferences.forEach(function(e){return e.dispose()}),this._selectionReferences=[]},t._onQueryDataAvailable=function(e){var t=this,n=e.notifyFirstResult;this._fetchOptions||r(2)(!1);var o=this._fetchOptions,a=o.environment,i=o.onDataChangeCallbacks,s=o.operation;if(!this._snapshot&&(this._snapshot=a.lookup(s.fragment),this._rootSubscription=a.subscribe(this._snapshot,function(e){if(null!=t._fetchOptions){var r=t._fetchOptions.onDataChangeCallbacks;Array.isArray(r)&&r.forEach(function(t){return t({snapshot:e})})}}),this._snapshot&&n&&Array.isArray(i))){var u=this._snapshot;i.forEach(function(e){return e({snapshot:u})})}},e}();e.exports=o},function(e,t,r){"use strict";function n(e){return e.displayName||e.name||"Component"}e.exports={getComponentName:n,getContainerName:function(e){return"Relay("+n(e)+")"}}},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){e.exports=n},function(e,t,r){"use strict";var n=r(3).createContext(null);e.exports=n},function(e,t,r){var n=r(7);e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){n(e,t,r[t])})}return e}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,r){"use strict";e.exports={profileContainer:function(e,t){r(1).RelayProfiler.instrumentMethods(e.prototype,{constructor:"".concat(t,".prototype.constructor"),UNSAFE_componentWillReceiveProps:"".concat(t,".prototype.UNSAFE_componentWillReceiveProps"),componentWillUnmount:"".concat(t,".prototype.componentWillUnmount"),shouldComponentUpdate:"".concat(t,".prototype.shouldComponentUpdate")}),null!==e.prototype&&"object"==typeof e.prototype&&"function"==typeof e.getDerivedStateFromProps&&(e.prototype.constructor.getDerivedStateFromProps=e.getDerivedStateFromProps)}}},function(e,t,r){"use strict";var n=r(0)(r(16));e.exports=function(e,t,o){var a,i,s=r(6).getContainerName(e);function u(n){if(null==i||n.__relayContext.environment!==a){var s=(a=n.__relayContext.environment).unstable_internal.getFragment,c=r(23)(t,s);i=o(e,c),u.getDerivedStateFromProps=i.getDerivedStateFromProps}return new i(n)}function c(e,t){var o=r(24)(r(9));return o||r(2)(!1),r(3).createElement(u,(0,n.default)({},e,{__relayContext:o,componentRef:e.componentRef||t}))}return r(22)(r(6).getComponentName(e),t),c.displayName=s,r(3).forwardRef(c)}},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},function(e,t,r){"use strict";e.exports={QueryRenderer:r(18),MutationTypes:r(1).MutationTypes,RangeOperations:r(1).RangeOperations,ReactRelayContext:r(9),applyOptimisticMutation:r(1).applyOptimisticMutation,commitLocalUpdate:r(1).commitLocalUpdate,commitMutation:r(1).commitMutation,createFragmentContainer:r(19).createContainer,createPaginationContainer:r(25).createContainer,createRefetchContainer:r(26).createContainer,fetchQuery:r(1).fetchQuery,graphql:r(1).graphql,requestSubscription:r(1).requestSubscription}},function(e,t,r){"use strict";var n=r(0)(r(10)),o=r(0)(r(11)),a={},i="STORE_THEN_NETWORK",s=function(e){function t(t){var o;o=e.call(this,t)||this;var i,s,u={handleDataChange:null,handleRetryAfterError:null};if(t.query){var c=t.query;s=l((0,t.environment.unstable_internal.getRequest)(c).params,t.variables),i=a[s]?a[s].queryFetcher:new(r(5))}else i=new(r(5));return o.state=(0,n.default)({prevPropsEnvironment:t.environment,prevPropsVariables:t.variables,prevQuery:t.query,queryFetcher:i,retryCallbacks:u},p(t,i,u,s)),o}(0,o.default)(t,e),t.getDerivedStateFromProps=function(e,t){if(t.prevQuery!==e.query||t.prevPropsEnvironment!==e.environment||!r(8)(t.prevPropsVariables,e.variables)){var o,i=e.query,s=t.queryFetcher.getSelectionReferences();if(t.queryFetcher.disposeRequest(),i){var u=l((0,e.environment.unstable_internal.getRequest)(i).params,e.variables);o=a[u]?a[u].queryFetcher:new(r(5))(s)}else o=new(r(5))(s);return(0,n.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:o},p(e,o,t.retryCallbacks))}return null};var i=t.prototype;return i.componentDidMount=function(){var e=this,t=this.state,r=t.retryCallbacks,n=t.queryFetcher,o=t.requestCacheKey;o&&delete a[o],r.handleDataChange=function(t){var o=null==t.error?null:t.error,i=null==t.snapshot?null:t.snapshot;e.setState(function(e){var t=e.requestCacheKey;return t&&delete a[t],i===e.snapshot&&o===e.error?null:{renderProps:c(o,i,n,r),snapshot:i,requestCacheKey:null}})},r.handleRetryAfterError=function(t){return e.setState(function(e){var t=e.requestCacheKey;return t&&delete a[t],{renderProps:{error:null,props:null,retry:null},requestCacheKey:null}})},this.props.query&&n.setOnDataChange(r.handleDataChange)},i.componentDidUpdate=function(){var e=this.state.requestCacheKey;e&&(delete a[e],delete this.state.requestCacheKey)},i.componentWillUnmount=function(){this.state.queryFetcher.dispose()},i.shouldComponentUpdate=function(e,t){return e.render!==this.props.render||t.renderProps!==this.state.renderProps},i.render=function(){var e=this.state,t=e.renderProps,n=e.relayContext;return r(3).createElement(r(9).Provider,{value:n},this.props.render(t))},t}(r(3).Component);function u(e,t){return{environment:e,variables:t}}function c(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(){var t=r.retry();t&&"function"==typeof n.handleDataChange?n.handleDataChange({snapshot:t}):e&&"function"==typeof n.handleRetryAfterError&&n.handleRetryAfterError(e)}}}function l(e,t){var r=e.id||e.text;return JSON.stringify({id:String(r),variables:t})}function p(e,t,r,n){var o=e.environment,s=e.query,p=e.variables,f=o;if(!s)return t.dispose(),{error:null,relayContext:u(f,p),renderProps:{error:null,props:{},retry:null},requestCacheKey:null};var h=f.unstable_internal,v=h.createOperationDescriptor,d=(0,h.getRequest)(s),_=v(d,p),y=u(f,_.variables);if("string"==typeof n&&a[n]){var b=a[n].snapshot;return b?{error:null,relayContext:y,renderProps:c(null,b,t,r),snapshot:b,requestCacheKey:n}:{error:null,relayContext:y,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:n}}try{var m=e.dataFrom===i?t.lookupInStore(f,_):null,C=t.fetch({cacheConfig:e.cacheConfig,dataFrom:e.dataFrom,environment:f,onDataChange:r.handleDataChange,operation:_})||m;return n=n||l(d.params,e.variables),a[n]={queryFetcher:t,snapshot:C},C?{error:null,relayContext:y,renderProps:c(null,C,t,r),snapshot:C,requestCacheKey:n}:{error:null,relayContext:y,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:n}}catch(e){return{error:e,relayContext:y,renderProps:c(e,null,t,r),snapshot:null,requestCacheKey:n}}}e.exports=s},function(e,t,r){"use strict";var n=r(0)(r(10)),o=r(0)(r(12)),a=r(0)(r(11)),i=r(0)(r(13)),s=r(0)(r(7));function u(e,t){var u=r(6).getContainerName(e),l=function(l){function p(e){var n;n=l.call(this,e)||this,(0,s.default)((0,i.default)((0,i.default)(n)),"_handleFragmentDataUpdate",function(){var e=r(1).RelayProfiler.profile("ReactRelayFragmentContainer.handleFragmentDataUpdate"),t=n.state.resolver;n.setState(function(e){return t===e.resolver?{data:e.resolver.resolve(),relayProp:c(e.relayProp.environment)}:null},e.stop)});var o=r(4).assertRelayContext(e.__relayContext),a=(0,o.environment.unstable_internal.createFragmentSpecResolver)(o,u,t,e);return n.state={data:a.resolve(),prevProps:e,prevPropsContext:o,relayProp:c(o.environment),resolver:a},n}(0,a.default)(p,l),p.getDerivedStateFromProps=function(e,n){var o=n.prevProps,a=r(4).assertRelayContext(e.__relayContext),i=a.environment.unstable_internal,s=i.createFragmentSpecResolver,l=i.getDataIDsFromObject,p=l(t,o),f=l(t,e),h=n.resolver;if(n.prevPropsContext.environment!==a.environment||n.prevPropsContext.variables!==a.variables||!r(8)(p,f))return{data:(h=s(a,u,t,e)).resolve(),prevPropsContext:a,prevProps:e,relayProp:c(a.environment),resolver:h};h.setProps(e);var v=h.resolve();return v!==n.data?{data:v,prevProps:e,prevPropsContext:a,relayProp:c(a.environment)}:null};var f=p.prototype;return f.componentDidMount=function(){this._subscribeToNewResolver(),this._rerenderIfStoreHasChanged()},f.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver&&(t.resolver.dispose(),this._subscribeToNewResolver()),this._rerenderIfStoreHasChanged()},f.componentWillUnmount=function(){this.state.resolver.dispose()},f.shouldComponentUpdate=function(e,n){if(n.data!==this.state.data)return!0;for(var o=Object.keys(e),a=0;a<o.length;a++){var i=o[a];if("__relayContext"===i){if(n.prevPropsContext.environment!==this.state.prevPropsContext.environment||n.prevPropsContext.variables!==this.state.prevPropsContext.variables)return!0}else if(!t.hasOwnProperty(i)&&!r(1).isScalarAndEqual(e[i],this.props[i]))return!0}return!1},f._rerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver.resolve();t!==r&&this.setState({data:r})},f._subscribeToNewResolver=function(){this.state.resolver.setCallback(this._handleFragmentDataUpdate)},f.render=function(){var t=this.props,a=t.componentRef,i=(t.__relayContext,(0,o.default)(t,["componentRef","__relayContext"]));return r(3).createElement(e,(0,n.default)({},i,this.state.data,{ref:a,relay:this.state.relayProp}))},p}(r(3).Component);return(0,s.default)(l,"displayName",u),r(14).profileContainer(l,"ReactRelayFragmentContainer"),l}function c(e){return{environment:e}}e.exports={createContainer:function(e,t){return r(15)(e,t,u)},createContainerWithFragments:u}},function(e,t,r){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.check&&"function"==typeof e.lookup&&"function"==typeof e.retain&&"function"==typeof e.sendQuery&&"function"==typeof e.execute&&"function"==typeof e.subscribe}},function(e,t,r){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}},function(e,t,r){"use strict";e.exports=function(e,t){for(var n in t&&"object"==typeof t||r(2)(!1),t)if(t.hasOwnProperty(n)){var o=t[n];(!o||"object"!=typeof o&&"function"!=typeof o)&&r(2)(!1)}}},function(e,t){e.exports=o},function(e,t,r){"use strict";var n=r(3).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher,o=r(3).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;e.exports=function(e){return(null!=n?n.current:o.currentDispatcher).readContext(e)}},function(e,t,r){"use strict";var n=r(0)(r(16)),o=r(0)(r(12)),a=r(0)(r(11)),i=r(0)(r(13)),s=r(0)(r(7)),u=r(0)(r(10)),c="forward";function l(e){return"function"==typeof e?{error:e,complete:e,unsubscribe:function(t){"function"==typeof e&&e()}}:e||{}}function p(e,t,p){r(6).getComponentName(e);var f=r(6).getContainerName(e),h=function(e){var t=null,n=!1;for(var o in e){var a=e[o],i=a.metadata&&a.metadata.connection;void 0!==a.metadata&&(n=!0),i&&(1!==i.length&&r(2)(!1),t&&r(2)(!1),t=(0,u.default)({},i[0],{fragmentName:o}))}return n&&null===t&&r(2)(!1),t||{}}(t),v=p.getConnectionFromProps||function(e){var t=e.path;return t||r(2)(!1),function(r){for(var n=r[e.fragmentName],o=0;o<t.length;o++){if(!n||"object"!=typeof n)return null;n=n[t[o]]}return n}}(h),d=p.direction||h.direction;d||r(2)(!1);var _=p.getFragmentVariables||function(e){var t=e.count;return t||r(2)(!1),function(e,r){return(0,u.default)({},e,(0,s.default)({},t,r))}}(h),y=function(h){function y(e){var n;n=h.call(this,e)||this,(0,s.default)((0,i.default)((0,i.default)(n)),"_handleFragmentDataUpdate",function(){var e=r(1).RelayProfiler.profile("ReactRelayPaginationContainer.handleFragmentDataUpdate");n.setState({data:n._resolver.resolve()},e.stop)}),(0,s.default)((0,i.default)((0,i.default)(n)),"_hasMore",function(){var e=n._getConnectionData();return!!(e&&e.hasMore&&e.cursor)}),(0,s.default)((0,i.default)((0,i.default)(n)),"_isLoading",function(){return!!n._refetchSubscription}),(0,s.default)((0,i.default)((0,i.default)(n)),"_refetchConnection",function(e,t,r){if(!n._canFetchPage("refetchConnection"))return{dispose:function(){}};n._refetchVariables=r;var o={count:e,cursor:null,totalCount:e};return{dispose:n._fetchPage(o,l(t),{force:!0}).unsubscribe}}),(0,s.default)((0,i.default)((0,i.default)(n)),"_loadMore",function(e,t,o){if(!n._canFetchPage("loadMore"))return{dispose:function(){}};var a=l(t),i=n._getConnectionData();if(!i)return r(1).Observable.create(function(e){return e.complete()}).subscribe(a),null;var s=i.edgeCount+e;if(o&&o.force)return n._refetchConnection(s,t);var u=r(1).ConnectionInterface.get(),c=(u.END_CURSOR,u.START_CURSOR,{count:e,cursor:i.cursor,totalCount:s});return{dispose:n._fetchPage(c,a,o).unsubscribe}});var o=r(4).assertRelayContext(e.__relayContext),a=o.environment.unstable_internal.createFragmentSpecResolver;return n._isARequestInFlight=!1,n._refetchSubscription=null,n._refetchVariables=null,n._resolver=a(o,f,t,e,n._handleFragmentDataUpdate),n.state={data:n._resolver.resolve(),prevContext:o,contextForChildren:o,relayProp:n._buildRelayProp(o)},n._isUnmounted=!1,n._hasFetched=!1,n}(0,a.default)(y,h);var b=y.prototype;return b.UNSAFE_componentWillReceiveProps=function(e){var n=r(4).assertRelayContext(e.__relayContext),o=n.environment.unstable_internal,a=o.createFragmentSpecResolver,i=o.getDataIDsFromObject,s=i(t,this.props),u=i(t,e);n.environment===this.state.prevContext.environment&&n.variables===this.state.prevContext.variables&&r(8)(s,u)?this._hasFetched||this._resolver.setProps(e):(this._cleanup(),this._resolver=a(n,f,t,e,this._handleFragmentDataUpdate),this.setState({prevContext:n,contextForChildren:n,relayProp:this._buildRelayProp(n)}));var c=this._resolver.resolve();c!==this.state.data&&this.setState({data:c})},b.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},b.shouldComponentUpdate=function(e,n){if(n.data!==this.state.data||n.relayProp!==this.state.relayProp)return!0;for(var o=Object.keys(e),a=0;a<o.length;a++){var i=o[a];if("__relayContext"===i){if(n.prevContext.environment!==this.state.prevContext.environment||n.prevContext.variables!==this.state.prevContext.variables)return!0}else if(!t.hasOwnProperty(i)&&!r(1).isScalarAndEqual(e[i],this.props[i]))return!0}return!1},b._buildRelayProp=function(e){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:e.environment}},b._getConnectionData=function(){var e=this.props,t=(e.componentRef,(0,o.default)(e,["componentRef"])),n=(0,u.default)({},t,this.state.data),a=v(n);if(null==a)return null;var i=r(1).ConnectionInterface.get(),s=i.EDGES,l=i.PAGE_INFO,p=i.HAS_NEXT_PAGE,f=i.HAS_PREV_PAGE,h=i.END_CURSOR,_=i.START_CURSOR;"object"!=typeof a&&r(2)(!1);var y=a[s],b=a[l];if(null==y||null==b)return null;Array.isArray(y)||r(2)(!1),"object"!=typeof b&&r(2)(!1);var m=d===c?b[p]:b[f],C=d===c?b[h]:b[_];return"boolean"!=typeof m||0!==y.length&&void 0===C?null:{cursor:C,edgeCount:y.length,hasMore:m}},b._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new(r(5))),this._queryFetcher},b._canFetchPage=function(e){return!this._isUnmounted},b._fetchPage=function(e,n,a){var i=this,s=r(4).assertRelayContext(this.props.__relayContext).environment,c=s.unstable_internal,l=c.createOperationDescriptor,f=c.getRequest,h=c.getVariablesFromObject,v=this.props,d=(v.componentRef,v.__relayContext,(0,o.default)(v,["componentRef","__relayContext"])),y=(0,u.default)({},d,this.state.data),b=this.props.__relayContext.variables,m=h(b,t,d);m=(0,u.default)({},b,m,this._refetchVariables);var C=p.getVariables(y,{count:e.count,cursor:e.cursor},m);("object"!=typeof C||null===C)&&r(2)(!1),C=(0,u.default)({},C,this._refetchVariables);var g=a?{force:!!a.force}:void 0,R=l(f(p.query),C),x=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var P=function(){i._refetchSubscription===x&&(i._refetchSubscription=null,i._isARequestInFlight=!1)};return this._isARequestInFlight=!0,x=this._getQueryFetcher().execute({environment:s,operation:R,cacheConfig:g,preservePreviousReferences:!0}).mergeMap(function(t){return r(1).Observable.create(function(t){!function(t,n){var o=(0,u.default)({},i.props.__relayContext.variables,m),a=i._resolver.resolve();i._resolver.setVariables(_(m,e.totalCount));var s=i._resolver.resolve();r(8)(a,s)?n():i.setState({data:s,contextForChildren:{environment:i.props.__relayContext.environment,variables:o}},n)}(0,function(){t.next(),t.complete()})})}).do({error:P,complete:P,unsubscribe:P}).subscribe(n||{}),this._refetchSubscription=this._isARequestInFlight?x:null,x},b._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},b.render=function(){var t=this.props,a=t.componentRef,i=(t.__relayContext,(0,o.default)(t,["componentRef","__relayContext"]));return r(3).createElement(r(9).Provider,{value:this.state.contextForChildren},r(3).createElement(e,(0,n.default)({},i,this.state.data,{ref:a,relay:this.state.relayProp})))},y}(r(3).Component);return(0,s.default)(y,"displayName",f),r(14).profileContainer(y,"ReactRelayPaginationContainer"),y}e.exports={createContainer:function(e,t,n){return r(15)(e,t,function(e,t){return p(e,t,n)})},createContainerWithFragments:p}},function(e,t,r){"use strict";var n=r(0)(r(16)),o=r(0)(r(12)),a=r(0)(r(10)),i=r(0)(r(11)),s=r(0)(r(13)),u=r(0)(r(7));function c(e,t,c){var p=r(6).getContainerName(e),f=function(f){function h(e){var n;n=f.call(this,e)||this,(0,u.default)((0,s.default)((0,s.default)(n)),"_handleFragmentDataUpdate",function(){var e=r(1).RelayProfiler.profile("ReactRelayRefetchContainer.handleFragmentDataUpdate"),t=n.state.resolver;n.setState(function(e){return t===e.resolver?{data:e.resolver.resolve()}:null},e.stop)}),(0,u.default)((0,s.default)((0,s.default)(n)),"_refetch",function(e,t,o,i){if(n._isUnmounted)return{dispose:function(){}};var s=r(4).assertRelayContext(n.props.__relayContext),u=s.environment,l=s.variables,p="function"==typeof e?e(n._getFragmentVariables()):e;p=(0,a.default)({},l,p);var f,h=t?(0,a.default)({},l,t):p,v=i?{force:!!i.force}:void 0,d="function"==typeof o?{next:o,error:o}:o||{},_=n.props.__relayContext.environment.unstable_internal,y=(0,_.createOperationDescriptor)((0,_.getRequest)(c),p);if((n.state.localVariables=p,n._refetchSubscription&&n._refetchSubscription.unsubscribe(),"store-or-network"===(null===i||void 0===i?void 0:i.fetchPolicy))&&null!=n._getQueryFetcher().lookupInStore(u,y))return n.state.resolver.setVariables(h),n.setState(function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:n.props.__relayContext.environment,variables:h}}},function(){d.next&&d.next(),d.complete&&d.complete()}),{dispose:function(){}};return n._getQueryFetcher().execute({environment:u,operation:y,cacheConfig:v,preservePreviousReferences:!0}).mergeMap(function(e){return n.state.resolver.setVariables(h),r(1).Observable.create(function(e){return n.setState(function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:n.props.__relayContext.environment,variables:h}}},function(){e.next(),e.complete()})})}).finally(function(){n._refetchSubscription===f&&(n._refetchSubscription=null)}).subscribe((0,a.default)({},d,{start:function(e){n._refetchSubscription=f=e,d.start&&d.start(e)}})),{dispose:function(){f&&f.unsubscribe()}}});var o=r(4).assertRelayContext(e.__relayContext);n._refetchSubscription=null;var i=(0,o.environment.unstable_internal.createFragmentSpecResolver)(o,p,t,e);return n.state={data:i.resolve(),localVariables:null,prevProps:e,prevPropsContext:o,contextForChildren:o,relayProp:l(o.environment,n._refetch),resolver:i},n._isUnmounted=!1,n}(0,i.default)(h,f);var v=h.prototype;return v.componentDidMount=function(){this._subscribeToNewResolver()},v.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver&&(t.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolver())},h.getDerivedStateFromProps=function(e,n){var o=n.prevProps,a=r(4).assertRelayContext(e.__relayContext),i=a.environment.unstable_internal,s=i.createFragmentSpecResolver,u=i.getDataIDsFromObject,c=u(t,o),f=u(t,e),h=n.resolver;if(n.prevPropsContext.environment!==a.environment||n.prevPropsContext.variables!==a.variables||!r(8)(c,f))return{data:(h=s(a,p,t,e)).resolve(),localVariables:null,prevProps:e,prevPropsContext:a,contextForChildren:a,relayProp:l(a.environment,n.relayProp.refetch),resolver:h};n.localVariables||h.setProps(e);var v=h.resolve();return v!==n.data?{data:v,prevProps:e}:null},v.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},v.shouldComponentUpdate=function(e,n){if(n.data!==this.state.data||n.relayProp!==this.state.relayProp)return!0;for(var o=Object.keys(e),a=0;a<o.length;a++){var i=o[a];if("__relayContext"===i){if(this.state.prevPropsContext.environment!==n.prevPropsContext.environment||this.state.prevPropsContext.variables!==n.prevPropsContext.variables)return!0}else if(!t.hasOwnProperty(i)&&!r(1).isScalarAndEqual(e[i],this.props[i]))return!0}return!1},v._subscribeToNewResolver=function(){var e=this.state,t=e.data,r=e.resolver;r.setCallback(this._handleFragmentDataUpdate);var n=r.resolve();t!==n&&this.setState({data:n})},v._getFragmentVariables=function(){return(0,this.props.__relayContext.environment.unstable_internal.getVariablesFromObject)(this.props.__relayContext.variables,t,this.props)},v._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new(r(5))),this._queryFetcher},v.render=function(){var t=this.props,a=t.componentRef,i=(t.__relayContext,(0,o.default)(t,["componentRef","__relayContext"])),s=this.state,u=s.relayProp,c=s.contextForChildren;return r(3).createElement(r(9).Provider,{value:c},r(3).createElement(e,(0,n.default)({},i,this.state.data,{ref:a,relay:u})))},h}(r(3).Component);return(0,u.default)(f,"displayName",p),r(14).profileContainer(f,"ReactRelayRefetchContainer"),f}function l(e,t){return{environment:e,refetch:t}}e.exports={createContainer:function(e,t,n){return r(15)(e,t,function(e,t){return c(e,t,n)})},createContainerWithFragments:c}}])});
9
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("relay-runtime"),require("fbjs/lib/invariant"),require("fbjs/lib/areEqual"),require("fbjs/lib/warning"),require("fbjs/lib/mapObject"),require("fbjs/lib/forEachObject")):"function"==typeof define&&define.amd?define(["react","relay-runtime","fbjs/lib/invariant","fbjs/lib/areEqual","fbjs/lib/warning","fbjs/lib/mapObject","fbjs/lib/forEachObject"],t):"object"==typeof exports?exports.ReactRelay=t(require("react"),require("relay-runtime"),require("fbjs/lib/invariant"),require("fbjs/lib/areEqual"),require("fbjs/lib/warning"),require("fbjs/lib/mapObject"),require("fbjs/lib/forEachObject")):e.ReactRelay=t(e.react,e["relay-runtime"],e["fbjs/lib/invariant"],e["fbjs/lib/areEqual"],e["fbjs/lib/warning"],e["fbjs/lib/mapObject"],e["fbjs/lib/forEachObject"])}(window,function(e,t,r,n,o,a,i){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=17)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";var n=r(0),o=r(1).__internal.createRelayContext;e.exports=o(n)},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){e.exports=r},function(e,t,r){var n=r(4);e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){n(e,t,r[t])})}return e}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t){e.exports=n},function(e,t,r){"use strict";function n(e){return e.displayName||e.name||"Component"}e.exports={getComponentName:n,getContainerName:function(e){return"Relay("+n(e)+")"}}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,r){"use strict";var n=r(2)(r(13)),o=r(0),a=r(3),i=r(19),s=r(5),u=r(20),c=r(21),l=r(9),f=l.getComponentName,p=l.getContainerName;e.exports=function(e,t,r){var l,h,v=p(e);function d(n){if(null==h||n.__relayContext.environment!==l){var o=(l=n.__relayContext.environment).unstable_internal.getFragment,a=u(t,o);h=r(e,a),d.getDerivedStateFromProps=h.getDerivedStateFromProps}return new h(n)}function _(e,t){var r=c(a);return r||s(!1),o.createElement(d,(0,n.default)({},e,{__relayContext:r,componentRef:e.componentRef||t}))}return i(f(e),t),d.prototype=o.Component.prototype,d.displayName=v,_.displayName=v,o.forwardRef(_)}},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},function(e,t,r){"use strict";var n=r(5),o=r(22),a=r(23);function i(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&o(e.environment)&&a(e.variables)}e.exports={assertRelayContext:function(e){return i(e)||n(!1),e},isRelayContext:i}},function(e,t,r){"use strict";var n=r(2)(r(4)),o=r(5),a=r(1),i=a.isRelayModernEnvironment,s=a.__internal.fetchQuery,u=function(){function e(e){(0,n.default)(this,"_selectionReferences",[]),(0,n.default)(this,"_callOnDataChangeWhenSet",!1),null!=e&&(this._cacheSelectionReference=e.cacheSelectionReference,this._selectionReferences=e.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(e,t){return e.check(t.root)?(this._retainCachedOperation(e,t),e.lookup(t.fragment,t)):null},t.execute=function(e){var t=this,r=e.environment,n=e.operation,o=e.cacheConfig,a=e.preservePreviousReferences,u=void 0!==a&&a,c=r.retain(n.root),l=null!=o?{networkCacheConfig:o}:{},f=function(){t._selectionReferences=t._selectionReferences.concat(c)},p=function(){u||t.disposeSelectionReferences(),t._selectionReferences=t._selectionReferences.concat(c)},h=function(){t._selectionReferences=t._selectionReferences.concat(c)};return i(r)?s(r,n,l).do({error:f,complete:p,unsubscribe:h}):r.execute({operation:n,cacheConfig:o}).do({error:f,complete:p,unsubscribe:h})},t.setOnDataChange=function(e){this._fetchOptions||o(!1),"function"==typeof e&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(e),this._callOnDataChangeWhenSet&&(null!=this._error?e({error:this._error}):null!=this._snapshot&&e({snapshot:this._snapshot})))},t.fetch=function(e){var t,r=this,n=e.cacheConfig,o=e.environment,a=e.operation,i=e.onDataChange,s=!1;this.disposeRequest();var u=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={cacheConfig:n,environment:o,onDataChangeCallbacks:u||[],operation:a},i&&-1===this._fetchOptions.onDataChangeCallbacks.indexOf(i)&&this._fetchOptions.onDataChangeCallbacks.push(i);var c=this.execute({environment:o,operation:a,cacheConfig:n}).finally(function(){r._pendingRequest=null}).subscribe({next:function(){r._callOnDataChangeWhenSet=!0,r._error=null,r._onQueryDataAvailable({notifyFirstResult:s})},error:function(e){r._callOnDataChangeWhenSet=!0,r._error=e,r._snapshot=null;var n=r._fetchOptions&&r._fetchOptions.onDataChangeCallbacks;s?n&&n.forEach(function(t){t({error:e})}):t=e}});if(this._pendingRequest={dispose:function(){c.unsubscribe()}},s=!0,t)throw t;return this._snapshot},t.retry=function(){return this._fetchOptions||o(!1),this.fetch({cacheConfig:this._fetchOptions.cacheConfig,environment:this._fetchOptions.environment,operation:this._fetchOptions.operation,onDataChange:null})},t.dispose=function(){this.disposeRequest(),this.disposeSelectionReferences()},t.disposeRequest=function(){this._error=null,this._snapshot=null,this._pendingRequest&&this._pendingRequest.dispose(),this._rootSubscription&&(this._rootSubscription.dispose(),this._rootSubscription=null)},t._retainCachedOperation=function(e,t){this._disposeCacheSelectionReference(),this._cacheSelectionReference=e.retain(t.root)},t._disposeCacheSelectionReference=function(){this._cacheSelectionReference&&this._cacheSelectionReference.dispose(),this._cacheSelectionReference=null},t.disposeSelectionReferences=function(){this._disposeCacheSelectionReference(),this._selectionReferences.forEach(function(e){return e.dispose()}),this._selectionReferences=[]},t._onQueryDataAvailable=function(e){var t=this,r=e.notifyFirstResult;this._fetchOptions||o(!1);var n=this._fetchOptions,a=n.environment,i=n.onDataChangeCallbacks,s=n.operation;if(!this._snapshot&&(this._snapshot=a.lookup(s.fragment,s),this._rootSubscription=a.subscribe(this._snapshot,function(e){if(null!=t._fetchOptions){var r=t._fetchOptions.onDataChangeCallbacks;Array.isArray(r)&&r.forEach(function(t){return t({snapshot:e})})}}),this._snapshot&&r&&Array.isArray(i))){var u=this._snapshot;i.forEach(function(e){return e({snapshot:u})})}},e}();e.exports=u},function(e,t){e.exports=o},function(e,t,r){"use strict";var n=r(3),o=r(18),a=r(24),i=r(26),s=r(27),u=r(1);e.exports={QueryRenderer:i,MutationTypes:u.MutationTypes,RangeOperations:u.RangeOperations,ReactRelayContext:n,applyOptimisticMutation:u.applyOptimisticMutation,commitLocalUpdate:u.commitLocalUpdate,commitMutation:u.commitMutation,createFragmentContainer:o.createContainer,createPaginationContainer:a.createContainer,createRefetchContainer:s.createContainer,fetchQuery:u.fetchQuery,graphql:u.graphql,requestSubscription:u.requestSubscription}},function(e,t,r){"use strict";var n=r(2),o=n(r(6)),a=n(r(10)),i=n(r(11)),s=n(r(7)),u=n(r(4)),c=r(0),l=r(8),f=r(12),p=r(9).getContainerName,h=r(14).assertRelayContext,v=r(1).isScalarAndEqual;function d(e,t){var r,n,f=p(e);return n=r=function(r){function n(e){var n;n=r.call(this,e)||this,(0,u.default)((0,i.default)(n),"_handleFragmentDataUpdate",function(){var e=n.state.resolver;n.setState(function(t){return e===t.resolver?{data:t.resolver.resolve(),relayProp:_(t.relayProp.environment)}:null})});var o=h(e.__relayContext),a=(0,o.environment.unstable_internal.createFragmentSpecResolver)(o,f,t,e);return n.state={data:a.resolve(),prevProps:e,prevPropsContext:o,relayProp:_(o.environment),resolver:a},n}(0,s.default)(n,r),n.getDerivedStateFromProps=function(e,r){var n=r.prevProps,o=h(e.__relayContext),a=o.environment.unstable_internal,i=a.createFragmentSpecResolver,s=a.getDataIDsFromObject,u=s(t,n),c=s(t,e),p=r.resolver;if(r.prevPropsContext.environment!==o.environment||r.prevPropsContext.variables!==o.variables||!l(u,c))return{data:(p=i(o,f,t,e)).resolve(),prevPropsContext:o,prevProps:e,relayProp:_(o.environment),resolver:p};p.setProps(e);var v=p.resolve();return v!==r.data?{data:v,prevProps:e,prevPropsContext:o,relayProp:_(o.environment)}:null};var p=n.prototype;return p.componentDidMount=function(){this._subscribeToNewResolver(),this._rerenderIfStoreHasChanged()},p.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver&&(t.resolver.dispose(),this._subscribeToNewResolver()),this._rerenderIfStoreHasChanged()},p.componentWillUnmount=function(){this.state.resolver.dispose()},p.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(r.prevPropsContext.environment!==this.state.prevPropsContext.environment||r.prevPropsContext.variables!==this.state.prevPropsContext.variables)return!0}else if(!t.hasOwnProperty(a)&&!v(e[a],this.props[a]))return!0}return!1},p._rerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver.resolve();t!==r&&this.setState({data:r})},p._subscribeToNewResolver=function(){this.state.resolver.setCallback(this._handleFragmentDataUpdate)},p.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,(0,a.default)(t,["componentRef","__relayContext"]));return c.createElement(e,(0,o.default)({},n,this.state.data,{ref:r,relay:this.state.relayProp}))},n}(c.Component),(0,u.default)(r,"displayName",f),n}function _(e){return{environment:e}}e.exports={createContainer:function(e,t){return f(e,t,d)}}},function(e,t,r){"use strict";var n=r(5);e.exports=function(e,t){for(var r in t&&"object"==typeof t||n(!1),t)if(t.hasOwnProperty(r)){var o=t[r];(!o||"object"!=typeof o&&"function"!=typeof o)&&n(!1)}}},function(e,t){e.exports=a},function(e,t,r){"use strict";var n=r(0).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,o=n.ReactCurrentDispatcher,a=n.ReactCurrentOwner;e.exports=function(e){return(null!=o?o.current:a.currentDispatcher).readContext(e)}},function(e,t,r){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.check&&"function"==typeof e.lookup&&"function"==typeof e.retain&&"function"==typeof e.sendQuery&&"function"==typeof e.execute&&"function"==typeof e.subscribe}},function(e,t,r){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}},function(e,t,r){"use strict";var n=r(2),o=n(r(13)),a=n(r(10)),i=n(r(11)),s=n(r(7)),u=n(r(4)),c=n(r(6)),l=r(0),f=r(3),p=r(15),h=r(8),v=r(12),d=r(25),_=r(5),b=(r(16),r(9)),y=b.getComponentName,m=b.getContainerName,C=r(14).assertRelayContext,g=r(1),x=g.ConnectionInterface,R=g.Observable,P=g.getFragmentOwners,S=g.isScalarAndEqual,O="forward";function F(e){return"function"==typeof e?{error:e,complete:e,unsubscribe:function(t){"function"==typeof e&&e()}}:e||{}}function q(e,t,r){y(e);var n,v,b=m(e),g=function(e){var t=null,r=!1;for(var n in e){var o=e[n],a=o.metadata&&o.metadata.connection;void 0!==o.metadata&&(r=!0),a&&(1!==a.length&&_(!1),t&&_(!1),t=(0,c.default)({},a[0],{fragmentName:n}))}return r&&null===t&&_(!1),t||{}}(t),q=r.getConnectionFromProps||function(e){var t=e.path;return t||_(!1),function(r){for(var n=r[e.fragmentName],o=0;o<t.length;o++){if(!n||"object"!=typeof n)return null;n=n[t[o]]}return n}}(g),D=r.direction||g.direction;D||_(!1);var j=r.getFragmentVariables||function(e){var t=e.count;return t||_(!1),function(e,r){return(0,c.default)({},e,(0,u.default)({},t,r))}}(g);return v=n=function(n){function v(e){var r;r=n.call(this,e)||this,(0,u.default)((0,i.default)(r),"_handleFragmentDataUpdate",function(){r.setState({data:r._resolver.resolve()})}),(0,u.default)((0,i.default)(r),"_hasMore",function(){var e=r._getConnectionData();return!!(e&&e.hasMore&&e.cursor)}),(0,u.default)((0,i.default)(r),"_isLoading",function(){return!!r._refetchSubscription}),(0,u.default)((0,i.default)(r),"_refetchConnection",function(e,t,n){if(!r._canFetchPage("refetchConnection"))return{dispose:function(){}};r._refetchVariables=n;var o={count:e,cursor:null,totalCount:e};return{dispose:r._fetchPage(o,F(t),{force:!0}).unsubscribe}}),(0,u.default)((0,i.default)(r),"_loadMore",function(e,t,n){if(!r._canFetchPage("loadMore"))return{dispose:function(){}};var o=F(t),a=r._getConnectionData();if(!a)return R.create(function(e){return e.complete()}).subscribe(o),null;var i=a.edgeCount+e;if(n&&n.force)return r._refetchConnection(i,t);var s=x.get(),u=(s.END_CURSOR,s.START_CURSOR,{count:e,cursor:a.cursor,totalCount:i});return{dispose:r._fetchPage(u,o,n).unsubscribe}});var o=C(e.__relayContext),a=o.environment.unstable_internal.createFragmentSpecResolver;return r._isARequestInFlight=!1,r._refetchSubscription=null,r._refetchVariables=null,r._resolver=a(o,b,t,e,r._handleFragmentDataUpdate),r.state={data:r._resolver.resolve(),prevContext:o,contextForChildren:o,relayProp:r._buildRelayProp(o)},r._isUnmounted=!1,r._hasFetched=!1,r}(0,s.default)(v,n);var y=v.prototype;return y.UNSAFE_componentWillReceiveProps=function(e){var r=C(e.__relayContext),n=r.environment.unstable_internal,o=n.createFragmentSpecResolver,a=n.getDataIDsFromObject,i=a(t,this.props),s=a(t,e);r.environment===this.state.prevContext.environment&&r.variables===this.state.prevContext.variables&&h(i,s)?this._hasFetched||this._resolver.setProps(e):(this._cleanup(),this._resolver=o(r,b,t,e,this._handleFragmentDataUpdate),this.setState({prevContext:r,contextForChildren:r,relayProp:this._buildRelayProp(r)}));var u=this._resolver.resolve();u!==this.state.data&&this.setState({data:u})},y.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},y.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data||r.relayProp!==this.state.relayProp)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(r.prevContext.environment!==this.state.prevContext.environment||r.prevContext.variables!==this.state.prevContext.variables)return!0}else if(!t.hasOwnProperty(a)&&!S(e[a],this.props[a]))return!0}return!1},y._buildRelayProp=function(e){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:e.environment}},y._getConnectionData=function(){var e=this.props,t=(e.componentRef,(0,a.default)(e,["componentRef"])),r=(0,c.default)({},t,this.state.data),n=q(r);if(null==n)return null;var o=x.get(),i=o.EDGES,s=o.PAGE_INFO,u=o.HAS_NEXT_PAGE,l=o.HAS_PREV_PAGE,f=o.END_CURSOR,p=o.START_CURSOR;"object"!=typeof n&&_(!1);var h=n[i],v=n[s];if(null==h||null==v)return null;Array.isArray(h)||_(!1),"object"!=typeof v&&_(!1);var d=D===O?v[u]:v[l],b=D===O?v[f]:v[p];return"boolean"!=typeof d||0!==h.length&&void 0===b?null:{cursor:b,edgeCount:h.length,hasMore:d}},y._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new p),this._queryFetcher},y._canFetchPage=function(e){return!this._isUnmounted},y._fetchPage=function(e,n,o){var i,s,u=this,l=C(this.props.__relayContext).environment,f=l.unstable_internal,p=f.createOperationDescriptor,v=f.getRequest,b=f.getVariablesFromObject,y=this.props,m=(y.componentRef,y.__relayContext,(0,a.default)(y,["componentRef","__relayContext"])),g=(0,c.default)({},m,this.state.data),x=P(t,m);d(t,function(e,t){var r,n,o,a=x[t],s=Array.isArray(a)?null!==(r=null===(n=a[0])||void 0===n?void 0:n.variables)&&void 0!==r?r:{}:null!==(o=null==a?void 0:a.variables)&&void 0!==o?o:{};i=(0,c.default)({},i,s)}),s=b({},t,m,x),s=(0,c.default)({},i,s,this._refetchVariables);var S=r.getVariables(g,{count:e.count,cursor:e.cursor},s);("object"!=typeof S||null===S)&&_(!1),S=(0,c.default)({},S,this._refetchVariables),s=(0,c.default)({},S,s);var O=o?{force:!!o.force}:void 0,F=p(v(r.query),S),q=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var D=function(){u._refetchSubscription===q&&(u._refetchSubscription=null,u._isARequestInFlight=!1)};return this._isARequestInFlight=!0,q=this._getQueryFetcher().execute({environment:l,operation:F,cacheConfig:O,preservePreviousReferences:!0}).mergeMap(function(t){return R.create(function(t){!function(t,r){var n=(0,c.default)({},u.props.__relayContext.variables,s),o=u._resolver.resolve();u._resolver.setVariables(j(s,e.totalCount),F.node);var a=u._resolver.resolve();h(o,a)?r():u.setState({data:a,contextForChildren:{environment:u.props.__relayContext.environment,variables:n}},r)}(0,function(){t.next(),t.complete()})})}).do({error:D,complete:D,unsubscribe:D}).subscribe(n||{}),this._refetchSubscription=this._isARequestInFlight?q:null,q},y._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},y.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,(0,a.default)(t,["componentRef","__relayContext"]));return l.createElement(f.Provider,{value:this.state.contextForChildren},l.createElement(e,(0,o.default)({},n,this.state.data,{ref:r,relay:this.state.relayProp})))},v}(l.Component),(0,u.default)(n,"displayName",b),v}e.exports={createContainer:function(e,t,r){return v(e,t,function(e,t){return q(e,t,r)})}}},function(e,t){e.exports=i},function(e,t,r){"use strict";var n=r(2),o=n(r(6)),a=n(r(7)),i=r(0),s=r(3),u=r(15),c=r(8),l=(r(1).deepFreeze,{}),f="STORE_THEN_NETWORK",p=function(e){function t(t){var r;r=e.call(this,t)||this;var n,a,i={handleDataChange:null,handleRetryAfterError:null};if(t.query){var s=t.query;a=d((0,t.environment.unstable_internal.getRequest)(s).params,t.variables),n=l[a]?l[a].queryFetcher:new u}else n=new u;return r.state=(0,o.default)({prevPropsEnvironment:t.environment,prevPropsVariables:t.variables,prevQuery:t.query,queryFetcher:n,retryCallbacks:i},_(t,n,i,a)),r}(0,a.default)(t,e),t.getDerivedStateFromProps=function(e,t){if(t.prevQuery!==e.query||t.prevPropsEnvironment!==e.environment||!c(t.prevPropsVariables,e.variables)){var r,n=e.query,a=t.queryFetcher.getSelectionReferences();if(t.queryFetcher.disposeRequest(),n){var i=d((0,e.environment.unstable_internal.getRequest)(n).params,e.variables);r=l[i]?l[i].queryFetcher:new u(a)}else r=new u(a);return(0,o.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:r},_(e,r,t.retryCallbacks))}return null};var r=t.prototype;return r.componentDidMount=function(){var e=this,t=this.state,r=t.retryCallbacks,n=t.queryFetcher,o=t.requestCacheKey;o&&delete l[o],r.handleDataChange=function(t){var r=null==t.error?null:t.error,n=null==t.snapshot?null:t.snapshot;e.setState(function(e){var t=e.requestCacheKey;return t&&delete l[t],n===e.snapshot&&r===e.error?null:{renderProps:v(r,n,e.queryFetcher,e.retryCallbacks),snapshot:n,requestCacheKey:null}})},r.handleRetryAfterError=function(t){return e.setState(function(e){var t=e.requestCacheKey;return t&&delete l[t],{renderProps:{error:null,props:null,retry:null},requestCacheKey:null}})},this.props.query&&n.setOnDataChange(r.handleDataChange)},r.componentDidUpdate=function(){var e=this.state.requestCacheKey;e&&(delete l[e],delete this.state.requestCacheKey)},r.componentWillUnmount=function(){this.state.queryFetcher.dispose()},r.shouldComponentUpdate=function(e,t){return e.render!==this.props.render||t.renderProps!==this.state.renderProps},r.render=function(){var e=this.state,t=e.renderProps,r=e.relayContext;return i.createElement(s.Provider,{value:r},this.props.render(t))},t}(i.Component);function h(e,t){return{environment:e,variables:t}}function v(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(){var t=r.retry();t&&"function"==typeof n.handleDataChange?n.handleDataChange({snapshot:t}):e&&"function"==typeof n.handleRetryAfterError&&n.handleRetryAfterError(e)}}}function d(e,t){var r=e.id||e.text;return JSON.stringify({id:String(r),variables:t})}function _(e,t,r,n){var o=e.environment,a=e.query,i=e.variables,s=o;if(!a)return t.dispose(),{error:null,relayContext:h(s,i),renderProps:{error:null,props:{},retry:null},requestCacheKey:null};var u=s.unstable_internal,c=u.createOperationDescriptor,p=(0,u.getRequest)(a),_=c(p,i),b=h(s,_.variables);if("string"==typeof n&&l[n]){var y=l[n].snapshot;return y?{error:null,relayContext:b,renderProps:v(null,y,t,r),snapshot:y,requestCacheKey:n}:{error:null,relayContext:b,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:n}}try{var m=e.dataFrom===f?t.lookupInStore(s,_):null,C=t.fetch({cacheConfig:e.cacheConfig,dataFrom:e.dataFrom,environment:s,onDataChange:r.handleDataChange,operation:_})||m;return n=n||d(p.params,e.variables),l[n]={queryFetcher:t,snapshot:C},C?{error:null,relayContext:b,renderProps:v(null,C,t,r),snapshot:C,requestCacheKey:n}:{error:null,relayContext:b,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:n}}catch(e){return{error:e,relayContext:b,renderProps:v(e,null,t,r),snapshot:null,requestCacheKey:n}}}e.exports=p},function(e,t,r){"use strict";var n=r(2),o=n(r(13)),a=n(r(10)),i=n(r(6)),s=n(r(11)),u=n(r(7)),c=n(r(4)),l=r(0),f=r(3),p=r(15),h=r(8),v=r(12),d=(r(16),r(9).getContainerName),_=r(14).assertRelayContext,b=r(1),y=b.Observable,m=b.getFragmentOwners,C=b.isScalarAndEqual;function g(e,t){return{environment:e,refetch:t}}e.exports={createContainer:function(e,t,r){return v(e,t,function(e,t){return function(e,t,r){var n,v,b=d(e);return v=n=function(n){function v(e){var o;o=n.call(this,e)||this,(0,c.default)((0,s.default)(o),"_handleFragmentDataUpdate",function(){var e=o.state.resolver;o.setState(function(t){return e===t.resolver?{data:t.resolver.resolve()}:null})}),(0,c.default)((0,s.default)(o),"_refetch",function(e,t,n,a){if(o._isUnmounted)return{dispose:function(){}};var s=_(o.props.__relayContext),u=s.environment,c=s.variables,l="function"==typeof e?e(o._getFragmentVariables()):e;l=(0,i.default)({},c,l);var f,p=t?(0,i.default)({},l,t):l,h=a?{force:!!a.force}:void 0,v="function"==typeof n?{next:n,error:n}:n||{},d=o.props.__relayContext.environment.unstable_internal,b=(0,d.createOperationDescriptor)((0,d.getRequest)(r),l);return o.state.localVariables=l,o._refetchSubscription&&o._refetchSubscription.unsubscribe(),"store-or-network"===(null==a?void 0:a.fetchPolicy)&&null!=o._getQueryFetcher().lookupInStore(u,b)?(o.state.resolver.setVariables(p,b.node),o.setState(function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:o.props.__relayContext.environment,variables:p}}},function(){v.next&&v.next(),v.complete&&v.complete()}),{dispose:function(){}}):(o._getQueryFetcher().execute({environment:u,operation:b,cacheConfig:h,preservePreviousReferences:!0}).mergeMap(function(e){return o.state.resolver.setVariables(p,b.node),y.create(function(e){return o.setState(function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:o.props.__relayContext.environment,variables:p}}},function(){e.next(),e.complete()})})}).finally(function(){o._refetchSubscription===f&&(o._refetchSubscription=null)}).subscribe((0,i.default)({},v,{start:function(e){o._refetchSubscription=f=e,v.start&&v.start(e)}})),{dispose:function(){f&&f.unsubscribe()}})});var a=_(e.__relayContext);o._refetchSubscription=null;var u=(0,a.environment.unstable_internal.createFragmentSpecResolver)(a,b,t,e);return o.state={data:u.resolve(),localVariables:null,prevProps:e,prevPropsContext:a,contextForChildren:a,relayProp:g(a.environment,o._refetch),resolver:u},o._isUnmounted=!1,o}(0,u.default)(v,n);var d=v.prototype;return d.componentDidMount=function(){this._subscribeToNewResolver()},d.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver&&(t.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolver())},v.getDerivedStateFromProps=function(e,r){var n=r.prevProps,o=_(e.__relayContext),a=o.environment.unstable_internal,i=a.createFragmentSpecResolver,s=a.getDataIDsFromObject,u=s(t,n),c=s(t,e),l=r.resolver;if(r.prevPropsContext.environment!==o.environment||r.prevPropsContext.variables!==o.variables||!h(u,c))return{data:(l=i(o,b,t,e)).resolve(),localVariables:null,prevProps:e,prevPropsContext:o,contextForChildren:o,relayProp:g(o.environment,r.relayProp.refetch),resolver:l};r.localVariables||l.setProps(e);var f=l.resolve();return f!==r.data?{data:f,prevProps:e}:null},d.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},d.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data||r.relayProp!==this.state.relayProp)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(this.state.prevPropsContext.environment!==r.prevPropsContext.environment||this.state.prevPropsContext.variables!==r.prevPropsContext.variables)return!0}else if(!t.hasOwnProperty(a)&&!C(e[a],this.props[a]))return!0}return!1},d._subscribeToNewResolver=function(){var e=this.state,t=e.data,r=e.resolver;r.setCallback(this._handleFragmentDataUpdate);var n=r.resolve();t!==n&&this.setState({data:n})},d._getFragmentVariables=function(){return(0,this.props.__relayContext.environment.unstable_internal.getVariablesFromObject)({},t,this.props,m(t,this.props))},d._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new p),this._queryFetcher},d.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,(0,a.default)(t,["componentRef","__relayContext"])),i=this.state,s=i.relayProp,u=i.contextForChildren;return l.createElement(f.Provider,{value:u},l.createElement(e,(0,o.default)({},n,this.state.data,{ref:r,relay:s})))},v}(l.Component),(0,c.default)(n,"displayName",b),v}(e,t,r)})}}}])});
package/classic.js DELETED
@@ -1,10 +0,0 @@
1
- /**
2
- * Relay v2.0.0-rc.2
3
- *
4
- * Copyright (c) 2013-present, Facebook, Inc.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
-
10
- module.exports = require('./lib/ReactRelayClassicExports.js');
package/compat.js DELETED
@@ -1,10 +0,0 @@
1
- /**
2
- * Relay v2.0.0-rc.2
3
- *
4
- * Copyright (c) 2013-present, Facebook, Inc.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
-
10
- module.exports = require('./lib/ReactRelayCompatPublic.js');
@@ -1,10 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * strict-local
8
- * @format
9
- */
10
- 'use strict';
@@ -1,264 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- *
8
- * @format
9
- */
10
- 'use strict';
11
-
12
- var _toConsumableArray2 = require("@babel/runtime/helpers/interopRequireDefault")(require("@babel/runtime/helpers/toConsumableArray"));
13
-
14
- /**
15
- * This is the high-level entry point for sending queries to the GraphQL
16
- * endpoint. It provides methods for scheduling queries (`run`), force-fetching
17
- * queries (ie. ignoring the cache; `forceFetch`).
18
- *
19
- * In order to send minimal queries and avoid re-retrieving data,
20
- * `GraphQLQueryRunner` maintains a registry of pending (in-flight) queries, and
21
- * "subtracts" those from any new queries that callers enqueue.
22
- *
23
- * @internal
24
- */
25
- var GraphQLQueryRunner =
26
- /*#__PURE__*/
27
- function () {
28
- function GraphQLQueryRunner(storeData) {
29
- this._storeData = storeData;
30
- }
31
- /**
32
- * Fetches data required to resolve a set of queries. See the `RelayStore`
33
- * module for documentation on the callback.
34
- */
35
-
36
-
37
- var _proto = GraphQLQueryRunner.prototype;
38
-
39
- _proto.run = function run(querySet, callback) {
40
- var fetchMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : require("./RelayFetchMode").CLIENT;
41
- return runQueries(this._storeData, querySet, callback, fetchMode);
42
- };
43
- /**
44
- * Ignores the cache and fetches data required to resolve a set of queries.
45
- * Uses the data we get back from the server to overwrite data in the cache.
46
- *
47
- * Even though we're ignoring the cache, we will still invoke the callback
48
- * immediately with `ready: true` if `querySet` can be resolved by the cache.
49
- */
50
-
51
-
52
- _proto.forceFetch = function forceFetch(querySet, callback) {
53
- var fetchMode = require("./RelayFetchMode").REFETCH;
54
-
55
- return runQueries(this._storeData, querySet, callback, fetchMode);
56
- };
57
-
58
- return GraphQLQueryRunner;
59
- }();
60
-
61
- function hasItems(map) {
62
- return !!Object.keys(map).length;
63
- }
64
-
65
- function splitAndFlattenQueries(storeData, queries) {
66
- if (!storeData.getNetworkLayer().supports('defer')) {
67
- if (process.env.NODE_ENV !== "production") {
68
- queries.forEach(function (query) {
69
- process.env.NODE_ENV !== "production" ? require("fbjs/lib/warning")(!query.hasDeferredDescendant(), 'Relay: Query `%s` contains a deferred fragment (e.g. ' + "`getFragment('foo').defer()`) which is not supported by the " + 'default network layer. This query will be sent without deferral.', query.getName()) : void 0;
70
- });
71
- }
72
-
73
- return queries;
74
- }
75
-
76
- var flattenedQueries = [];
77
- queries.forEach(function (query) {
78
- return flattenedQueries.push.apply(flattenedQueries, (0, _toConsumableArray2["default"])(require("./flattenSplitRelayQueries")(require("./splitDeferredRelayQueries")(query))));
79
- });
80
- return flattenedQueries;
81
- }
82
-
83
- function runQueries(storeData, querySet, callback, fetchMode) {
84
- var profiler = fetchMode === require("./RelayFetchMode").REFETCH ? require("relay-runtime").RelayProfiler.profile('GraphQLQueryRunner.forceFetch') : require("relay-runtime").RelayProfiler.profile('GraphQLQueryRunner.primeCache');
85
- var readyState = new (require("./RelayReadyState"))(callback);
86
- var remainingFetchMap = {};
87
- var remainingRequiredFetchMap = {};
88
-
89
- function onResolved(pendingFetch) {
90
- var pendingQuery = pendingFetch.getQuery();
91
- var pendingQueryID = pendingQuery.getID();
92
- delete remainingFetchMap[pendingQueryID];
93
-
94
- if (!pendingQuery.isDeferred()) {
95
- delete remainingRequiredFetchMap[pendingQueryID];
96
- }
97
-
98
- if (hasItems(remainingRequiredFetchMap)) {
99
- return;
100
- }
101
-
102
- if (require("fbjs/lib/someObject")(remainingFetchMap, function (query) {
103
- return query.isResolvable();
104
- })) {
105
- // The other resolvable query will resolve imminently and call
106
- // `readyState.update` instead.
107
- return;
108
- }
109
-
110
- if (hasItems(remainingFetchMap)) {
111
- readyState.update({
112
- done: false,
113
- ready: true,
114
- stale: false
115
- }, [{
116
- type: 'NETWORK_QUERY_RECEIVED_REQUIRED'
117
- }]);
118
- } else {
119
- readyState.update({
120
- done: true,
121
- ready: true,
122
- stale: false
123
- }, [{
124
- type: 'NETWORK_QUERY_RECEIVED_ALL'
125
- }]);
126
- }
127
- }
128
-
129
- function onRejected(pendingFetch, error) {
130
- readyState.update({
131
- error: error
132
- }, [{
133
- type: 'NETWORK_QUERY_ERROR',
134
- error: error
135
- }]);
136
- }
137
-
138
- function canResolve(fetch) {
139
- return require("./checkRelayQueryData")(storeData.getQueuedStore(), fetch.getQuery());
140
- }
141
-
142
- require("./throwFailedPromise")(storeData.getTaskQueue().enqueue(function () {
143
- var forceIndex = fetchMode === require("./RelayFetchMode").REFETCH ? require("./generateForceIndex")() : null;
144
- var queries = [];
145
-
146
- if (fetchMode === require("./RelayFetchMode").CLIENT) {
147
- require("fbjs/lib/forEachObject")(querySet, function (query) {
148
- if (query) {
149
- queries.push.apply(queries, (0, _toConsumableArray2["default"])(require("./diffRelayQuery")(query, storeData.getRecordStore(), storeData.getQueryTracker())));
150
- }
151
- });
152
- } else {
153
- require("fbjs/lib/forEachObject")(querySet, function (query) {
154
- if (query) {
155
- queries.push(query);
156
- }
157
- });
158
- }
159
-
160
- var flattenedQueries = splitAndFlattenQueries(storeData, queries);
161
- var networkEvent = [];
162
-
163
- if (flattenedQueries.length) {
164
- networkEvent.push({
165
- type: 'NETWORK_QUERY_START'
166
- });
167
- }
168
-
169
- flattenedQueries.forEach(function (query) {
170
- var pendingFetch = storeData.getPendingQueryTracker().add({
171
- query: query,
172
- fetchMode: fetchMode,
173
- forceIndex: forceIndex,
174
- storeData: storeData
175
- });
176
- var queryID = query.getID();
177
- remainingFetchMap[queryID] = pendingFetch;
178
-
179
- if (!query.isDeferred()) {
180
- remainingRequiredFetchMap[queryID] = pendingFetch;
181
- }
182
-
183
- pendingFetch.getResolvedPromise().then(onResolved.bind(null, pendingFetch), onRejected.bind(null, pendingFetch));
184
- });
185
-
186
- if (!hasItems(remainingFetchMap)) {
187
- readyState.update({
188
- done: true,
189
- ready: true
190
- }, networkEvent.concat([{
191
- type: 'STORE_FOUND_ALL'
192
- }]));
193
- } else {
194
- if (!hasItems(remainingRequiredFetchMap)) {
195
- readyState.update({
196
- ready: true
197
- }, networkEvent.concat([{
198
- type: 'STORE_FOUND_REQUIRED'
199
- }]));
200
- } else {
201
- readyState.update({
202
- ready: false
203
- }, networkEvent.concat([{
204
- type: 'CACHE_RESTORE_START'
205
- }]));
206
-
207
- require("fbjs/lib/resolveImmediate")(function () {
208
- if (storeData.hasCacheManager()) {
209
- var requiredQueryMap = require("fbjs/lib/mapObject")(remainingRequiredFetchMap, function (value) {
210
- return value.getQuery();
211
- });
212
-
213
- storeData.restoreQueriesFromCache(requiredQueryMap, {
214
- onSuccess: function onSuccess() {
215
- readyState.update({
216
- ready: true,
217
- stale: true
218
- }, [{
219
- type: 'CACHE_RESTORED_REQUIRED'
220
- }]);
221
- },
222
- onFailure: function onFailure(error) {
223
- readyState.update({
224
- error: error
225
- }, [{
226
- type: 'CACHE_RESTORE_FAILED',
227
- error: error
228
- }]);
229
- }
230
- });
231
- } else {
232
- if (require("fbjs/lib/everyObject")(remainingRequiredFetchMap, canResolve) && hasItems(remainingRequiredFetchMap)) {
233
- readyState.update({
234
- ready: true,
235
- stale: true
236
- }, [{
237
- type: 'CACHE_RESTORED_REQUIRED'
238
- }]);
239
- } else {
240
- readyState.update({}, [{
241
- type: 'CACHE_RESTORE_FAILED'
242
- }]);
243
- }
244
- }
245
- });
246
- }
247
- } // Stop profiling when queries have been sent to the network layer.
248
-
249
-
250
- profiler.stop();
251
- }));
252
-
253
- return {
254
- abort: function abort() {
255
- readyState.update({
256
- aborted: true
257
- }, [{
258
- type: 'ABORT'
259
- }]);
260
- }
261
- };
262
- }
263
-
264
- module.exports = GraphQLQueryRunner;