{"version":3,"file":"defaultReactQueryClient-BLTJ0usZ.js","sources":["../../../client/app/bundles/Shared/components/modal/modal.tsx","../../../client/node_modules/react-query/es/core/subscribable.js","../../../client/node_modules/react-query/es/core/focusManager.js","../../../client/node_modules/react-query/es/core/onlineManager.js","../../../client/node_modules/react-query/es/core/retryer.js","../../../client/node_modules/react-query/es/core/query.js","../../../client/node_modules/react-query/es/core/queryCache.js","../../../client/node_modules/react-query/es/core/mutation.js","../../../client/node_modules/react-query/es/core/mutationCache.js","../../../client/node_modules/react-query/es/core/infiniteQueryBehavior.js","../../../client/node_modules/react-query/es/core/queryClient.js","../../../client/node_modules/react-query/es/core/queryObserver.js","../../../client/node_modules/react-query/es/react/QueryClientProvider.js","../../../client/node_modules/react-query/es/react/QueryErrorResetBoundary.js","../../../client/node_modules/react-query/es/react/utils.js","../../../client/node_modules/react-query/es/react/useBaseQuery.js","../../../client/node_modules/react-query/es/react/useQuery.js","../../../client/app/bundles/Shared/utils/defaultReactQueryClient.tsx"],"sourcesContent":["import * as React from 'react';\n\nconst Modal = (props: any) => (\n
\n
\n
\n
\n {props.children}\n
\n
\n
\n)\n\nexport { Modal };\n\n","export var Subscribable = /*#__PURE__*/function () {\n function Subscribable() {\n this.listeners = [];\n }\n\n var _proto = Subscribable.prototype;\n\n _proto.subscribe = function subscribe(listener) {\n var _this = this;\n\n var callback = listener || function () {\n return undefined;\n };\n\n this.listeners.push(callback);\n this.onSubscribe();\n return function () {\n _this.listeners = _this.listeners.filter(function (x) {\n return x !== callback;\n });\n\n _this.onUnsubscribe();\n };\n };\n\n _proto.hasListeners = function hasListeners() {\n return this.listeners.length > 0;\n };\n\n _proto.onSubscribe = function onSubscribe() {// Do nothing\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {// Do nothing\n };\n\n return Subscribable;\n}();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Subscribable } from './subscribable';\nimport { isServer } from './utils';\nexport var FocusManager = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(FocusManager, _Subscribable);\n\n function FocusManager() {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n\n _this.setup = function (onFocus) {\n var _window;\n\n if (!isServer && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n var listener = function listener() {\n return onFocus();\n }; // Listen to visibillitychange and focus\n\n\n window.addEventListener('visibilitychange', listener, false);\n window.addEventListener('focus', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('visibilitychange', listener);\n window.removeEventListener('focus', listener);\n };\n }\n };\n\n return _this;\n }\n\n var _proto = FocusManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this$cleanup2,\n _this2 = this;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(function (focused) {\n if (typeof focused === 'boolean') {\n _this2.setFocused(focused);\n } else {\n _this2.onFocus();\n }\n });\n };\n\n _proto.setFocused = function setFocused(focused) {\n this.focused = focused;\n\n if (focused) {\n this.onFocus();\n }\n };\n\n _proto.onFocus = function onFocus() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isFocused = function isFocused() {\n if (typeof this.focused === 'boolean') {\n return this.focused;\n } // document global can be unavailable in react native\n\n\n if (typeof document === 'undefined') {\n return true;\n }\n\n return [undefined, 'visible', 'prerender'].includes(document.visibilityState);\n };\n\n return FocusManager;\n}(Subscribable);\nexport var focusManager = new FocusManager();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Subscribable } from './subscribable';\nimport { isServer } from './utils';\nexport var OnlineManager = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(OnlineManager, _Subscribable);\n\n function OnlineManager() {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n\n _this.setup = function (onOnline) {\n var _window;\n\n if (!isServer && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n var listener = function listener() {\n return onOnline();\n }; // Listen to online\n\n\n window.addEventListener('online', listener, false);\n window.addEventListener('offline', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('online', listener);\n window.removeEventListener('offline', listener);\n };\n }\n };\n\n return _this;\n }\n\n var _proto = OnlineManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this$cleanup2,\n _this2 = this;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(function (online) {\n if (typeof online === 'boolean') {\n _this2.setOnline(online);\n } else {\n _this2.onOnline();\n }\n });\n };\n\n _proto.setOnline = function setOnline(online) {\n this.online = online;\n\n if (online) {\n this.onOnline();\n }\n };\n\n _proto.onOnline = function onOnline() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isOnline = function isOnline() {\n if (typeof this.online === 'boolean') {\n return this.online;\n }\n\n if (typeof navigator === 'undefined' || typeof navigator.onLine === 'undefined') {\n return true;\n }\n\n return navigator.onLine;\n };\n\n return OnlineManager;\n}(Subscribable);\nexport var onlineManager = new OnlineManager();","import { focusManager } from './focusManager';\nimport { onlineManager } from './onlineManager';\nimport { sleep } from './utils';\n\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1000 * Math.pow(2, failureCount), 30000);\n}\n\nexport function isCancelable(value) {\n return typeof (value == null ? void 0 : value.cancel) === 'function';\n}\nexport var CancelledError = function CancelledError(options) {\n this.revert = options == null ? void 0 : options.revert;\n this.silent = options == null ? void 0 : options.silent;\n};\nexport function isCancelledError(value) {\n return value instanceof CancelledError;\n} // CLASS\n\nexport var Retryer = function Retryer(config) {\n var _this = this;\n\n var cancelRetry = false;\n var cancelFn;\n var continueFn;\n var promiseResolve;\n var promiseReject;\n this.abort = config.abort;\n\n this.cancel = function (cancelOptions) {\n return cancelFn == null ? void 0 : cancelFn(cancelOptions);\n };\n\n this.cancelRetry = function () {\n cancelRetry = true;\n };\n\n this.continueRetry = function () {\n cancelRetry = false;\n };\n\n this.continue = function () {\n return continueFn == null ? void 0 : continueFn();\n };\n\n this.failureCount = 0;\n this.isPaused = false;\n this.isResolved = false;\n this.isTransportCancelable = false;\n this.promise = new Promise(function (outerResolve, outerReject) {\n promiseResolve = outerResolve;\n promiseReject = outerReject;\n });\n\n var resolve = function resolve(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onSuccess == null ? void 0 : config.onSuccess(value);\n continueFn == null ? void 0 : continueFn();\n promiseResolve(value);\n }\n };\n\n var reject = function reject(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onError == null ? void 0 : config.onError(value);\n continueFn == null ? void 0 : continueFn();\n promiseReject(value);\n }\n };\n\n var pause = function pause() {\n return new Promise(function (continueResolve) {\n continueFn = continueResolve;\n _this.isPaused = true;\n config.onPause == null ? void 0 : config.onPause();\n }).then(function () {\n continueFn = undefined;\n _this.isPaused = false;\n config.onContinue == null ? void 0 : config.onContinue();\n });\n }; // Create loop function\n\n\n var run = function run() {\n // Do nothing if already resolved\n if (_this.isResolved) {\n return;\n }\n\n var promiseOrValue; // Execute query\n\n try {\n promiseOrValue = config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n } // Create callback to cancel this fetch\n\n\n cancelFn = function cancelFn(cancelOptions) {\n if (!_this.isResolved) {\n reject(new CancelledError(cancelOptions));\n _this.abort == null ? void 0 : _this.abort(); // Cancel transport if supported\n\n if (isCancelable(promiseOrValue)) {\n try {\n promiseOrValue.cancel();\n } catch (_unused) {}\n }\n }\n }; // Check if the transport layer support cancellation\n\n\n _this.isTransportCancelable = isCancelable(promiseOrValue);\n Promise.resolve(promiseOrValue).then(resolve).catch(function (error) {\n var _config$retry, _config$retryDelay;\n\n // Stop if the fetch is already resolved\n if (_this.isResolved) {\n return;\n } // Do we need to retry the request?\n\n\n var retry = (_config$retry = config.retry) != null ? _config$retry : 3;\n var retryDelay = (_config$retryDelay = config.retryDelay) != null ? _config$retryDelay : defaultRetryDelay;\n var delay = typeof retryDelay === 'function' ? retryDelay(_this.failureCount, error) : retryDelay;\n var shouldRetry = retry === true || typeof retry === 'number' && _this.failureCount < retry || typeof retry === 'function' && retry(_this.failureCount, error);\n\n if (cancelRetry || !shouldRetry) {\n // We are done if the query does not need to be retried\n reject(error);\n return;\n }\n\n _this.failureCount++; // Notify on fail\n\n config.onFail == null ? void 0 : config.onFail(_this.failureCount, error); // Delay\n\n sleep(delay) // Pause if the document is not visible or when the device is offline\n .then(function () {\n if (!focusManager.isFocused() || !onlineManager.isOnline()) {\n return pause();\n }\n }).then(function () {\n if (cancelRetry) {\n reject(error);\n } else {\n run();\n }\n });\n });\n }; // Start loop\n\n\n run();\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getAbortController, functionalUpdate, isValidTimeout, noop, replaceEqualDeep, timeUntilStale, ensureQueryKeyArray } from './utils';\nimport { notifyManager } from './notifyManager';\nimport { getLogger } from './logger';\nimport { Retryer, isCancelledError } from './retryer'; // TYPES\n\n// CLASS\nexport var Query = /*#__PURE__*/function () {\n function Query(config) {\n this.abortSignalConsumed = false;\n this.hadObservers = false;\n this.defaultOptions = config.defaultOptions;\n this.setOptions(config.options);\n this.observers = [];\n this.cache = config.cache;\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n this.initialState = config.state || this.getDefaultState(this.options);\n this.state = this.initialState;\n this.meta = config.meta;\n this.scheduleGc();\n }\n\n var _proto = Query.prototype;\n\n _proto.setOptions = function setOptions(options) {\n var _this$options$cacheTi;\n\n this.options = _extends({}, this.defaultOptions, options);\n this.meta = options == null ? void 0 : options.meta; // Default to 5 minutes if not cache time is set\n\n this.cacheTime = Math.max(this.cacheTime || 0, (_this$options$cacheTi = this.options.cacheTime) != null ? _this$options$cacheTi : 5 * 60 * 1000);\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.scheduleGc = function scheduleGc() {\n var _this = this;\n\n this.clearGcTimeout();\n\n if (isValidTimeout(this.cacheTime)) {\n this.gcTimeout = setTimeout(function () {\n _this.optionalRemove();\n }, this.cacheTime);\n }\n };\n\n _proto.clearGcTimeout = function clearGcTimeout() {\n if (this.gcTimeout) {\n clearTimeout(this.gcTimeout);\n this.gcTimeout = undefined;\n }\n };\n\n _proto.optionalRemove = function optionalRemove() {\n if (!this.observers.length) {\n if (this.state.isFetching) {\n if (this.hadObservers) {\n this.scheduleGc();\n }\n } else {\n this.cache.remove(this);\n }\n }\n };\n\n _proto.setData = function setData(updater, options) {\n var _this$options$isDataE, _this$options;\n\n var prevData = this.state.data; // Get the new data\n\n var data = functionalUpdate(updater, prevData); // Use prev data if an isDataEqual function is defined and returns `true`\n\n if ((_this$options$isDataE = (_this$options = this.options).isDataEqual) == null ? void 0 : _this$options$isDataE.call(_this$options, prevData, data)) {\n data = prevData;\n } else if (this.options.structuralSharing !== false) {\n // Structurally share data between prev and new data if needed\n data = replaceEqualDeep(prevData, data);\n } // Set data and mark it as cached\n\n\n this.dispatch({\n data: data,\n type: 'success',\n dataUpdatedAt: options == null ? void 0 : options.updatedAt\n });\n return data;\n };\n\n _proto.setState = function setState(state, setStateOptions) {\n this.dispatch({\n type: 'setState',\n state: state,\n setStateOptions: setStateOptions\n });\n };\n\n _proto.cancel = function cancel(options) {\n var _this$retryer;\n\n var promise = this.promise;\n (_this$retryer = this.retryer) == null ? void 0 : _this$retryer.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n };\n\n _proto.destroy = function destroy() {\n this.clearGcTimeout();\n this.cancel({\n silent: true\n });\n };\n\n _proto.reset = function reset() {\n this.destroy();\n this.setState(this.initialState);\n };\n\n _proto.isActive = function isActive() {\n return this.observers.some(function (observer) {\n return observer.options.enabled !== false;\n });\n };\n\n _proto.isFetching = function isFetching() {\n return this.state.isFetching;\n };\n\n _proto.isStale = function isStale() {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some(function (observer) {\n return observer.getCurrentResult().isStale;\n });\n };\n\n _proto.isStaleByTime = function isStaleByTime(staleTime) {\n if (staleTime === void 0) {\n staleTime = 0;\n }\n\n return this.state.isInvalidated || !this.state.dataUpdatedAt || !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n };\n\n _proto.onFocus = function onFocus() {\n var _this$retryer2;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnWindowFocus();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer2 = this.retryer) == null ? void 0 : _this$retryer2.continue();\n };\n\n _proto.onOnline = function onOnline() {\n var _this$retryer3;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnReconnect();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer3 = this.retryer) == null ? void 0 : _this$retryer3.continue();\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n this.hadObservers = true; // Stop the query from being garbage collected\n\n this.clearGcTimeout();\n this.cache.notify({\n type: 'observerAdded',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n if (this.observers.indexOf(observer) !== -1) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n\n if (!this.observers.length) {\n // If the transport layer does not support cancellation\n // we'll let the query continue so the result can be cached\n if (this.retryer) {\n if (this.retryer.isTransportCancelable || this.abortSignalConsumed) {\n this.retryer.cancel({\n revert: true\n });\n } else {\n this.retryer.cancelRetry();\n }\n }\n\n if (this.cacheTime) {\n this.scheduleGc();\n } else {\n this.cache.remove(this);\n }\n }\n\n this.cache.notify({\n type: 'observerRemoved',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.getObserversCount = function getObserversCount() {\n return this.observers.length;\n };\n\n _proto.invalidate = function invalidate() {\n if (!this.state.isInvalidated) {\n this.dispatch({\n type: 'invalidate'\n });\n }\n };\n\n _proto.fetch = function fetch(options, fetchOptions) {\n var _this2 = this,\n _this$options$behavio,\n _context$fetchOptions,\n _abortController$abor;\n\n if (this.state.isFetching) {\n if (this.state.dataUpdatedAt && (fetchOptions == null ? void 0 : fetchOptions.cancelRefetch)) {\n // Silently cancel current fetch if the user wants to cancel refetches\n this.cancel({\n silent: true\n });\n } else if (this.promise) {\n var _this$retryer4;\n\n // make sure that retries that were potentially cancelled due to unmounts can continue\n (_this$retryer4 = this.retryer) == null ? void 0 : _this$retryer4.continueRetry(); // Return current promise if we are already fetching\n\n return this.promise;\n }\n } // Update config if passed, otherwise the config from the last execution is used\n\n\n if (options) {\n this.setOptions(options);\n } // Use the options from the first observer with a query function if no function is found.\n // This can happen when the query is hydrated or created with setQueryData.\n\n\n if (!this.options.queryFn) {\n var observer = this.observers.find(function (x) {\n return x.options.queryFn;\n });\n\n if (observer) {\n this.setOptions(observer.options);\n }\n }\n\n var queryKey = ensureQueryKeyArray(this.queryKey);\n var abortController = getAbortController(); // Create query function context\n\n var queryFnContext = {\n queryKey: queryKey,\n pageParam: undefined,\n meta: this.meta\n };\n Object.defineProperty(queryFnContext, 'signal', {\n enumerable: true,\n get: function get() {\n if (abortController) {\n _this2.abortSignalConsumed = true;\n return abortController.signal;\n }\n\n return undefined;\n }\n }); // Create fetch function\n\n var fetchFn = function fetchFn() {\n if (!_this2.options.queryFn) {\n return Promise.reject('Missing queryFn');\n }\n\n _this2.abortSignalConsumed = false;\n return _this2.options.queryFn(queryFnContext);\n }; // Trigger behavior hook\n\n\n var context = {\n fetchOptions: fetchOptions,\n options: this.options,\n queryKey: queryKey,\n state: this.state,\n fetchFn: fetchFn,\n meta: this.meta\n };\n\n if ((_this$options$behavio = this.options.behavior) == null ? void 0 : _this$options$behavio.onFetch) {\n var _this$options$behavio2;\n\n (_this$options$behavio2 = this.options.behavior) == null ? void 0 : _this$options$behavio2.onFetch(context);\n } // Store state in case the current fetch needs to be reverted\n\n\n this.revertState = this.state; // Set to fetching state if not already in it\n\n if (!this.state.isFetching || this.state.fetchMeta !== ((_context$fetchOptions = context.fetchOptions) == null ? void 0 : _context$fetchOptions.meta)) {\n var _context$fetchOptions2;\n\n this.dispatch({\n type: 'fetch',\n meta: (_context$fetchOptions2 = context.fetchOptions) == null ? void 0 : _context$fetchOptions2.meta\n });\n } // Try to fetch the data\n\n\n this.retryer = new Retryer({\n fn: context.fetchFn,\n abort: abortController == null ? void 0 : (_abortController$abor = abortController.abort) == null ? void 0 : _abortController$abor.bind(abortController),\n onSuccess: function onSuccess(data) {\n _this2.setData(data); // Notify cache callback\n\n\n _this2.cache.config.onSuccess == null ? void 0 : _this2.cache.config.onSuccess(data, _this2); // Remove query after fetching if cache time is 0\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onError: function onError(error) {\n // Optimistically update state if needed\n if (!(isCancelledError(error) && error.silent)) {\n _this2.dispatch({\n type: 'error',\n error: error\n });\n }\n\n if (!isCancelledError(error)) {\n // Notify cache callback\n _this2.cache.config.onError == null ? void 0 : _this2.cache.config.onError(error, _this2); // Log error\n\n getLogger().error(error);\n } // Remove query after fetching if cache time is 0\n\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay\n });\n this.promise = this.retryer.promise;\n return this.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = this.reducer(this.state, action);\n notifyManager.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onQueryUpdate(action);\n });\n\n _this3.cache.notify({\n query: _this3,\n type: 'queryUpdated',\n action: action\n });\n });\n };\n\n _proto.getDefaultState = function getDefaultState(options) {\n var data = typeof options.initialData === 'function' ? options.initialData() : options.initialData;\n var hasInitialData = typeof options.initialData !== 'undefined';\n var initialDataUpdatedAt = hasInitialData ? typeof options.initialDataUpdatedAt === 'function' ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n var hasData = typeof data !== 'undefined';\n return {\n data: data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? initialDataUpdatedAt != null ? initialDataUpdatedAt : Date.now() : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchMeta: null,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: hasData ? 'success' : 'idle'\n };\n };\n\n _proto.reducer = function reducer(state, action) {\n var _action$meta, _action$dataUpdatedAt;\n\n switch (action.type) {\n case 'failed':\n return _extends({}, state, {\n fetchFailureCount: state.fetchFailureCount + 1\n });\n\n case 'pause':\n return _extends({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return _extends({}, state, {\n isPaused: false\n });\n\n case 'fetch':\n return _extends({}, state, {\n fetchFailureCount: 0,\n fetchMeta: (_action$meta = action.meta) != null ? _action$meta : null,\n isFetching: true,\n isPaused: false\n }, !state.dataUpdatedAt && {\n error: null,\n status: 'loading'\n });\n\n case 'success':\n return _extends({}, state, {\n data: action.data,\n dataUpdateCount: state.dataUpdateCount + 1,\n dataUpdatedAt: (_action$dataUpdatedAt = action.dataUpdatedAt) != null ? _action$dataUpdatedAt : Date.now(),\n error: null,\n fetchFailureCount: 0,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: 'success'\n });\n\n case 'error':\n var error = action.error;\n\n if (isCancelledError(error) && error.revert && this.revertState) {\n return _extends({}, this.revertState);\n }\n\n return _extends({}, state, {\n error: error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n isFetching: false,\n isPaused: false,\n status: 'error'\n });\n\n case 'invalidate':\n return _extends({}, state, {\n isInvalidated: true\n });\n\n case 'setState':\n return _extends({}, state, action.state);\n\n default:\n return state;\n }\n };\n\n return Query;\n}();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { hashQueryKeyByOptions, matchQuery, parseFilterArgs } from './utils';\nimport { Query } from './query';\nimport { notifyManager } from './notifyManager';\nimport { Subscribable } from './subscribable';\n// CLASS\nexport var QueryCache = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(QueryCache, _Subscribable);\n\n function QueryCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.queries = [];\n _this.queriesMap = {};\n return _this;\n }\n\n var _proto = QueryCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var _options$queryHash;\n\n var queryKey = options.queryKey;\n var queryHash = (_options$queryHash = options.queryHash) != null ? _options$queryHash : hashQueryKeyByOptions(queryKey, options);\n var query = this.get(queryHash);\n\n if (!query) {\n query = new Query({\n cache: this,\n queryKey: queryKey,\n queryHash: queryHash,\n options: client.defaultQueryOptions(options),\n state: state,\n defaultOptions: client.getQueryDefaults(queryKey),\n meta: options.meta\n });\n this.add(query);\n }\n\n return query;\n };\n\n _proto.add = function add(query) {\n if (!this.queriesMap[query.queryHash]) {\n this.queriesMap[query.queryHash] = query;\n this.queries.push(query);\n this.notify({\n type: 'queryAdded',\n query: query\n });\n }\n };\n\n _proto.remove = function remove(query) {\n var queryInMap = this.queriesMap[query.queryHash];\n\n if (queryInMap) {\n query.destroy();\n this.queries = this.queries.filter(function (x) {\n return x !== query;\n });\n\n if (queryInMap === query) {\n delete this.queriesMap[query.queryHash];\n }\n\n this.notify({\n type: 'queryRemoved',\n query: query\n });\n }\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager.batch(function () {\n _this2.queries.forEach(function (query) {\n _this2.remove(query);\n });\n });\n };\n\n _proto.get = function get(queryHash) {\n return this.queriesMap[queryHash];\n };\n\n _proto.getAll = function getAll() {\n return this.queries;\n };\n\n _proto.find = function find(arg1, arg2) {\n var _parseFilterArgs = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.queries.find(function (query) {\n return matchQuery(filters, query);\n });\n };\n\n _proto.findAll = function findAll(arg1, arg2) {\n var _parseFilterArgs2 = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n return Object.keys(filters).length > 0 ? this.queries.filter(function (query) {\n return matchQuery(filters, query);\n }) : this.queries;\n };\n\n _proto.notify = function notify(event) {\n var _this3 = this;\n\n notifyManager.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(event);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n var _this4 = this;\n\n notifyManager.batch(function () {\n _this4.queries.forEach(function (query) {\n query.onFocus();\n });\n });\n };\n\n _proto.onOnline = function onOnline() {\n var _this5 = this;\n\n notifyManager.batch(function () {\n _this5.queries.forEach(function (query) {\n query.onOnline();\n });\n });\n };\n\n return QueryCache;\n}(Subscribable);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getLogger } from './logger';\nimport { notifyManager } from './notifyManager';\nimport { Retryer } from './retryer';\nimport { noop } from './utils'; // TYPES\n\n// CLASS\nexport var Mutation = /*#__PURE__*/function () {\n function Mutation(config) {\n this.options = _extends({}, config.defaultOptions, config.options);\n this.mutationId = config.mutationId;\n this.mutationCache = config.mutationCache;\n this.observers = [];\n this.state = config.state || getDefaultState();\n this.meta = config.meta;\n }\n\n var _proto = Mutation.prototype;\n\n _proto.setState = function setState(state) {\n this.dispatch({\n type: 'setState',\n state: state\n });\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n };\n\n _proto.cancel = function cancel() {\n if (this.retryer) {\n this.retryer.cancel();\n return this.retryer.promise.then(noop).catch(noop);\n }\n\n return Promise.resolve();\n };\n\n _proto.continue = function _continue() {\n if (this.retryer) {\n this.retryer.continue();\n return this.retryer.promise;\n }\n\n return this.execute();\n };\n\n _proto.execute = function execute() {\n var _this = this;\n\n var data;\n var restored = this.state.status === 'loading';\n var promise = Promise.resolve();\n\n if (!restored) {\n this.dispatch({\n type: 'loading',\n variables: this.options.variables\n });\n promise = promise.then(function () {\n // Notify cache callback\n _this.mutationCache.config.onMutate == null ? void 0 : _this.mutationCache.config.onMutate(_this.state.variables, _this);\n }).then(function () {\n return _this.options.onMutate == null ? void 0 : _this.options.onMutate(_this.state.variables);\n }).then(function (context) {\n if (context !== _this.state.context) {\n _this.dispatch({\n type: 'loading',\n context: context,\n variables: _this.state.variables\n });\n }\n });\n }\n\n return promise.then(function () {\n return _this.executeMutation();\n }).then(function (result) {\n data = result; // Notify cache callback\n\n _this.mutationCache.config.onSuccess == null ? void 0 : _this.mutationCache.config.onSuccess(data, _this.state.variables, _this.state.context, _this);\n }).then(function () {\n return _this.options.onSuccess == null ? void 0 : _this.options.onSuccess(data, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(data, null, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'success',\n data: data\n });\n\n return data;\n }).catch(function (error) {\n // Notify cache callback\n _this.mutationCache.config.onError == null ? void 0 : _this.mutationCache.config.onError(error, _this.state.variables, _this.state.context, _this); // Log error\n\n getLogger().error(error);\n return Promise.resolve().then(function () {\n return _this.options.onError == null ? void 0 : _this.options.onError(error, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(undefined, error, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'error',\n error: error\n });\n\n throw error;\n });\n });\n };\n\n _proto.executeMutation = function executeMutation() {\n var _this2 = this,\n _this$options$retry;\n\n this.retryer = new Retryer({\n fn: function fn() {\n if (!_this2.options.mutationFn) {\n return Promise.reject('No mutationFn found');\n }\n\n return _this2.options.mutationFn(_this2.state.variables);\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: (_this$options$retry = this.options.retry) != null ? _this$options$retry : 0,\n retryDelay: this.options.retryDelay\n });\n return this.retryer.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = reducer(this.state, action);\n notifyManager.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onMutationUpdate(action);\n });\n\n _this3.mutationCache.notify(_this3);\n });\n };\n\n return Mutation;\n}();\nexport function getDefaultState() {\n return {\n context: undefined,\n data: undefined,\n error: null,\n failureCount: 0,\n isPaused: false,\n status: 'idle',\n variables: undefined\n };\n}\n\nfunction reducer(state, action) {\n switch (action.type) {\n case 'failed':\n return _extends({}, state, {\n failureCount: state.failureCount + 1\n });\n\n case 'pause':\n return _extends({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return _extends({}, state, {\n isPaused: false\n });\n\n case 'loading':\n return _extends({}, state, {\n context: action.context,\n data: undefined,\n error: null,\n isPaused: false,\n status: 'loading',\n variables: action.variables\n });\n\n case 'success':\n return _extends({}, state, {\n data: action.data,\n error: null,\n status: 'success',\n isPaused: false\n });\n\n case 'error':\n return _extends({}, state, {\n data: undefined,\n error: action.error,\n failureCount: state.failureCount + 1,\n isPaused: false,\n status: 'error'\n });\n\n case 'setState':\n return _extends({}, state, action.state);\n\n default:\n return state;\n }\n}","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { notifyManager } from './notifyManager';\nimport { Mutation } from './mutation';\nimport { matchMutation, noop } from './utils';\nimport { Subscribable } from './subscribable'; // TYPES\n\n// CLASS\nexport var MutationCache = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(MutationCache, _Subscribable);\n\n function MutationCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.mutations = [];\n _this.mutationId = 0;\n return _this;\n }\n\n var _proto = MutationCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var mutation = new Mutation({\n mutationCache: this,\n mutationId: ++this.mutationId,\n options: client.defaultMutationOptions(options),\n state: state,\n defaultOptions: options.mutationKey ? client.getMutationDefaults(options.mutationKey) : undefined,\n meta: options.meta\n });\n this.add(mutation);\n return mutation;\n };\n\n _proto.add = function add(mutation) {\n this.mutations.push(mutation);\n this.notify(mutation);\n };\n\n _proto.remove = function remove(mutation) {\n this.mutations = this.mutations.filter(function (x) {\n return x !== mutation;\n });\n mutation.cancel();\n this.notify(mutation);\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager.batch(function () {\n _this2.mutations.forEach(function (mutation) {\n _this2.remove(mutation);\n });\n });\n };\n\n _proto.getAll = function getAll() {\n return this.mutations;\n };\n\n _proto.find = function find(filters) {\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.mutations.find(function (mutation) {\n return matchMutation(filters, mutation);\n });\n };\n\n _proto.findAll = function findAll(filters) {\n return this.mutations.filter(function (mutation) {\n return matchMutation(filters, mutation);\n });\n };\n\n _proto.notify = function notify(mutation) {\n var _this3 = this;\n\n notifyManager.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(mutation);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n this.resumePausedMutations();\n };\n\n _proto.onOnline = function onOnline() {\n this.resumePausedMutations();\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n var pausedMutations = this.mutations.filter(function (x) {\n return x.state.isPaused;\n });\n return notifyManager.batch(function () {\n return pausedMutations.reduce(function (promise, mutation) {\n return promise.then(function () {\n return mutation.continue().catch(noop);\n });\n }, Promise.resolve());\n });\n };\n\n return MutationCache;\n}(Subscribable);","import { isCancelable } from './retryer';\nimport { getAbortController } from './utils';\nexport function infiniteQueryBehavior() {\n return {\n onFetch: function onFetch(context) {\n context.fetchFn = function () {\n var _context$fetchOptions, _context$fetchOptions2, _context$fetchOptions3, _context$fetchOptions4, _context$state$data, _context$state$data2;\n\n var refetchPage = (_context$fetchOptions = context.fetchOptions) == null ? void 0 : (_context$fetchOptions2 = _context$fetchOptions.meta) == null ? void 0 : _context$fetchOptions2.refetchPage;\n var fetchMore = (_context$fetchOptions3 = context.fetchOptions) == null ? void 0 : (_context$fetchOptions4 = _context$fetchOptions3.meta) == null ? void 0 : _context$fetchOptions4.fetchMore;\n var pageParam = fetchMore == null ? void 0 : fetchMore.pageParam;\n var isFetchingNextPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'forward';\n var isFetchingPreviousPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'backward';\n var oldPages = ((_context$state$data = context.state.data) == null ? void 0 : _context$state$data.pages) || [];\n var oldPageParams = ((_context$state$data2 = context.state.data) == null ? void 0 : _context$state$data2.pageParams) || [];\n var abortController = getAbortController();\n var abortSignal = abortController == null ? void 0 : abortController.signal;\n var newPageParams = oldPageParams;\n var cancelled = false; // Get query function\n\n var queryFn = context.options.queryFn || function () {\n return Promise.reject('Missing queryFn');\n };\n\n var buildNewPages = function buildNewPages(pages, param, page, previous) {\n newPageParams = previous ? [param].concat(newPageParams) : [].concat(newPageParams, [param]);\n return previous ? [page].concat(pages) : [].concat(pages, [page]);\n }; // Create function to fetch a page\n\n\n var fetchPage = function fetchPage(pages, manual, param, previous) {\n if (cancelled) {\n return Promise.reject('Cancelled');\n }\n\n if (typeof param === 'undefined' && !manual && pages.length) {\n return Promise.resolve(pages);\n }\n\n var queryFnContext = {\n queryKey: context.queryKey,\n signal: abortSignal,\n pageParam: param,\n meta: context.meta\n };\n var queryFnResult = queryFn(queryFnContext);\n var promise = Promise.resolve(queryFnResult).then(function (page) {\n return buildNewPages(pages, param, page, previous);\n });\n\n if (isCancelable(queryFnResult)) {\n var promiseAsAny = promise;\n promiseAsAny.cancel = queryFnResult.cancel;\n }\n\n return promise;\n };\n\n var promise; // Fetch first page?\n\n if (!oldPages.length) {\n promise = fetchPage([]);\n } // Fetch next page?\n else if (isFetchingNextPage) {\n var manual = typeof pageParam !== 'undefined';\n var param = manual ? pageParam : getNextPageParam(context.options, oldPages);\n promise = fetchPage(oldPages, manual, param);\n } // Fetch previous page?\n else if (isFetchingPreviousPage) {\n var _manual = typeof pageParam !== 'undefined';\n\n var _param = _manual ? pageParam : getPreviousPageParam(context.options, oldPages);\n\n promise = fetchPage(oldPages, _manual, _param, true);\n } // Refetch pages\n else {\n (function () {\n newPageParams = [];\n var manual = typeof context.options.getNextPageParam === 'undefined';\n var shouldFetchFirstPage = refetchPage && oldPages[0] ? refetchPage(oldPages[0], 0, oldPages) : true; // Fetch first page\n\n promise = shouldFetchFirstPage ? fetchPage([], manual, oldPageParams[0]) : Promise.resolve(buildNewPages([], oldPageParams[0], oldPages[0])); // Fetch remaining pages\n\n var _loop = function _loop(i) {\n promise = promise.then(function (pages) {\n var shouldFetchNextPage = refetchPage && oldPages[i] ? refetchPage(oldPages[i], i, oldPages) : true;\n\n if (shouldFetchNextPage) {\n var _param2 = manual ? oldPageParams[i] : getNextPageParam(context.options, pages);\n\n return fetchPage(pages, manual, _param2);\n }\n\n return Promise.resolve(buildNewPages(pages, oldPageParams[i], oldPages[i]));\n });\n };\n\n for (var i = 1; i < oldPages.length; i++) {\n _loop(i);\n }\n })();\n }\n\n var finalPromise = promise.then(function (pages) {\n return {\n pages: pages,\n pageParams: newPageParams\n };\n });\n var finalPromiseAsAny = finalPromise;\n\n finalPromiseAsAny.cancel = function () {\n cancelled = true;\n abortController == null ? void 0 : abortController.abort();\n\n if (isCancelable(promise)) {\n promise.cancel();\n }\n };\n\n return finalPromise;\n };\n }\n };\n}\nexport function getNextPageParam(options, pages) {\n return options.getNextPageParam == null ? void 0 : options.getNextPageParam(pages[pages.length - 1], pages);\n}\nexport function getPreviousPageParam(options, pages) {\n return options.getPreviousPageParam == null ? void 0 : options.getPreviousPageParam(pages[0], pages);\n}\n/**\n * Checks if there is a next page.\n * Returns `undefined` if it cannot be determined.\n */\n\nexport function hasNextPage(options, pages) {\n if (options.getNextPageParam && Array.isArray(pages)) {\n var nextPageParam = getNextPageParam(options, pages);\n return typeof nextPageParam !== 'undefined' && nextPageParam !== null && nextPageParam !== false;\n }\n}\n/**\n * Checks if there is a previous page.\n * Returns `undefined` if it cannot be determined.\n */\n\nexport function hasPreviousPage(options, pages) {\n if (options.getPreviousPageParam && Array.isArray(pages)) {\n var previousPageParam = getPreviousPageParam(options, pages);\n return typeof previousPageParam !== 'undefined' && previousPageParam !== null && previousPageParam !== false;\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { hashQueryKey, noop, parseFilterArgs, parseQueryArgs, partialMatchKey, hashQueryKeyByOptions } from './utils';\nimport { QueryCache } from './queryCache';\nimport { MutationCache } from './mutationCache';\nimport { focusManager } from './focusManager';\nimport { onlineManager } from './onlineManager';\nimport { notifyManager } from './notifyManager';\nimport { infiniteQueryBehavior } from './infiniteQueryBehavior';\n// CLASS\nexport var QueryClient = /*#__PURE__*/function () {\n function QueryClient(config) {\n if (config === void 0) {\n config = {};\n }\n\n this.queryCache = config.queryCache || new QueryCache();\n this.mutationCache = config.mutationCache || new MutationCache();\n this.defaultOptions = config.defaultOptions || {};\n this.queryDefaults = [];\n this.mutationDefaults = [];\n }\n\n var _proto = QueryClient.prototype;\n\n _proto.mount = function mount() {\n var _this = this;\n\n this.unsubscribeFocus = focusManager.subscribe(function () {\n if (focusManager.isFocused() && onlineManager.isOnline()) {\n _this.mutationCache.onFocus();\n\n _this.queryCache.onFocus();\n }\n });\n this.unsubscribeOnline = onlineManager.subscribe(function () {\n if (focusManager.isFocused() && onlineManager.isOnline()) {\n _this.mutationCache.onOnline();\n\n _this.queryCache.onOnline();\n }\n });\n };\n\n _proto.unmount = function unmount() {\n var _this$unsubscribeFocu, _this$unsubscribeOnli;\n\n (_this$unsubscribeFocu = this.unsubscribeFocus) == null ? void 0 : _this$unsubscribeFocu.call(this);\n (_this$unsubscribeOnli = this.unsubscribeOnline) == null ? void 0 : _this$unsubscribeOnli.call(this);\n };\n\n _proto.isFetching = function isFetching(arg1, arg2) {\n var _parseFilterArgs = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n filters.fetching = true;\n return this.queryCache.findAll(filters).length;\n };\n\n _proto.isMutating = function isMutating(filters) {\n return this.mutationCache.findAll(_extends({}, filters, {\n fetching: true\n })).length;\n };\n\n _proto.getQueryData = function getQueryData(queryKey, filters) {\n var _this$queryCache$find;\n\n return (_this$queryCache$find = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find.state.data;\n };\n\n _proto.getQueriesData = function getQueriesData(queryKeyOrFilters) {\n return this.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref) {\n var queryKey = _ref.queryKey,\n state = _ref.state;\n var data = state.data;\n return [queryKey, data];\n });\n };\n\n _proto.setQueryData = function setQueryData(queryKey, updater, options) {\n var parsedOptions = parseQueryArgs(queryKey);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions);\n return this.queryCache.build(this, defaultedOptions).setData(updater, options);\n };\n\n _proto.setQueriesData = function setQueriesData(queryKeyOrFilters, updater, options) {\n var _this2 = this;\n\n return notifyManager.batch(function () {\n return _this2.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref2) {\n var queryKey = _ref2.queryKey;\n return [queryKey, _this2.setQueryData(queryKey, updater, options)];\n });\n });\n };\n\n _proto.getQueryState = function getQueryState(queryKey, filters) {\n var _this$queryCache$find2;\n\n return (_this$queryCache$find2 = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find2.state;\n };\n\n _proto.removeQueries = function removeQueries(arg1, arg2) {\n var _parseFilterArgs2 = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n var queryCache = this.queryCache;\n notifyManager.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n queryCache.remove(query);\n });\n });\n };\n\n _proto.resetQueries = function resetQueries(arg1, arg2, arg3) {\n var _this3 = this;\n\n var _parseFilterArgs3 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs3[0],\n options = _parseFilterArgs3[1];\n\n var queryCache = this.queryCache;\n\n var refetchFilters = _extends({}, filters, {\n active: true\n });\n\n return notifyManager.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n query.reset();\n });\n return _this3.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.cancelQueries = function cancelQueries(arg1, arg2, arg3) {\n var _this4 = this;\n\n var _parseFilterArgs4 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs4[0],\n _parseFilterArgs4$ = _parseFilterArgs4[1],\n cancelOptions = _parseFilterArgs4$ === void 0 ? {} : _parseFilterArgs4$;\n\n if (typeof cancelOptions.revert === 'undefined') {\n cancelOptions.revert = true;\n }\n\n var promises = notifyManager.batch(function () {\n return _this4.queryCache.findAll(filters).map(function (query) {\n return query.cancel(cancelOptions);\n });\n });\n return Promise.all(promises).then(noop).catch(noop);\n };\n\n _proto.invalidateQueries = function invalidateQueries(arg1, arg2, arg3) {\n var _ref3,\n _filters$refetchActiv,\n _filters$refetchInact,\n _this5 = this;\n\n var _parseFilterArgs5 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs5[0],\n options = _parseFilterArgs5[1];\n\n var refetchFilters = _extends({}, filters, {\n // if filters.refetchActive is not provided and filters.active is explicitly false,\n // e.g. invalidateQueries({ active: false }), we don't want to refetch active queries\n active: (_ref3 = (_filters$refetchActiv = filters.refetchActive) != null ? _filters$refetchActiv : filters.active) != null ? _ref3 : true,\n inactive: (_filters$refetchInact = filters.refetchInactive) != null ? _filters$refetchInact : false\n });\n\n return notifyManager.batch(function () {\n _this5.queryCache.findAll(filters).forEach(function (query) {\n query.invalidate();\n });\n\n return _this5.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.refetchQueries = function refetchQueries(arg1, arg2, arg3) {\n var _this6 = this;\n\n var _parseFilterArgs6 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs6[0],\n options = _parseFilterArgs6[1];\n\n var promises = notifyManager.batch(function () {\n return _this6.queryCache.findAll(filters).map(function (query) {\n return query.fetch(undefined, _extends({}, options, {\n meta: {\n refetchPage: filters == null ? void 0 : filters.refetchPage\n }\n }));\n });\n });\n var promise = Promise.all(promises).then(noop);\n\n if (!(options == null ? void 0 : options.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n };\n\n _proto.fetchQuery = function fetchQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions); // https://github.com/tannerlinsley/react-query/issues/652\n\n if (typeof defaultedOptions.retry === 'undefined') {\n defaultedOptions.retry = false;\n }\n\n var query = this.queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n };\n\n _proto.prefetchQuery = function prefetchQuery(arg1, arg2, arg3) {\n return this.fetchQuery(arg1, arg2, arg3).then(noop).catch(noop);\n };\n\n _proto.fetchInfiniteQuery = function fetchInfiniteQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n parsedOptions.behavior = infiniteQueryBehavior();\n return this.fetchQuery(parsedOptions);\n };\n\n _proto.prefetchInfiniteQuery = function prefetchInfiniteQuery(arg1, arg2, arg3) {\n return this.fetchInfiniteQuery(arg1, arg2, arg3).then(noop).catch(noop);\n };\n\n _proto.cancelMutations = function cancelMutations() {\n var _this7 = this;\n\n var promises = notifyManager.batch(function () {\n return _this7.mutationCache.getAll().map(function (mutation) {\n return mutation.cancel();\n });\n });\n return Promise.all(promises).then(noop).catch(noop);\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n return this.getMutationCache().resumePausedMutations();\n };\n\n _proto.executeMutation = function executeMutation(options) {\n return this.mutationCache.build(this, options).execute();\n };\n\n _proto.getQueryCache = function getQueryCache() {\n return this.queryCache;\n };\n\n _proto.getMutationCache = function getMutationCache() {\n return this.mutationCache;\n };\n\n _proto.getDefaultOptions = function getDefaultOptions() {\n return this.defaultOptions;\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.setQueryDefaults = function setQueryDefaults(queryKey, options) {\n var result = this.queryDefaults.find(function (x) {\n return hashQueryKey(queryKey) === hashQueryKey(x.queryKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.queryDefaults.push({\n queryKey: queryKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getQueryDefaults = function getQueryDefaults(queryKey) {\n var _this$queryDefaults$f;\n\n return queryKey ? (_this$queryDefaults$f = this.queryDefaults.find(function (x) {\n return partialMatchKey(queryKey, x.queryKey);\n })) == null ? void 0 : _this$queryDefaults$f.defaultOptions : undefined;\n };\n\n _proto.setMutationDefaults = function setMutationDefaults(mutationKey, options) {\n var result = this.mutationDefaults.find(function (x) {\n return hashQueryKey(mutationKey) === hashQueryKey(x.mutationKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.mutationDefaults.push({\n mutationKey: mutationKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getMutationDefaults = function getMutationDefaults(mutationKey) {\n var _this$mutationDefault;\n\n return mutationKey ? (_this$mutationDefault = this.mutationDefaults.find(function (x) {\n return partialMatchKey(mutationKey, x.mutationKey);\n })) == null ? void 0 : _this$mutationDefault.defaultOptions : undefined;\n };\n\n _proto.defaultQueryOptions = function defaultQueryOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n var defaultedOptions = _extends({}, this.defaultOptions.queries, this.getQueryDefaults(options == null ? void 0 : options.queryKey), options, {\n _defaulted: true\n });\n\n if (!defaultedOptions.queryHash && defaultedOptions.queryKey) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);\n }\n\n return defaultedOptions;\n };\n\n _proto.defaultQueryObserverOptions = function defaultQueryObserverOptions(options) {\n return this.defaultQueryOptions(options);\n };\n\n _proto.defaultMutationOptions = function defaultMutationOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n return _extends({}, this.defaultOptions.mutations, this.getMutationDefaults(options == null ? void 0 : options.mutationKey), options, {\n _defaulted: true\n });\n };\n\n _proto.clear = function clear() {\n this.queryCache.clear();\n this.mutationCache.clear();\n };\n\n return QueryClient;\n}();","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { isServer, isValidTimeout, noop, replaceEqualDeep, shallowEqualObjects, timeUntilStale } from './utils';\nimport { notifyManager } from './notifyManager';\nimport { focusManager } from './focusManager';\nimport { Subscribable } from './subscribable';\nimport { getLogger } from './logger';\nimport { isCancelledError } from './retryer';\nexport var QueryObserver = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(QueryObserver, _Subscribable);\n\n function QueryObserver(client, options) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n _this.options = options;\n _this.trackedProps = [];\n _this.selectError = null;\n\n _this.bindMethods();\n\n _this.setOptions(options);\n\n return _this;\n }\n\n var _proto = QueryObserver.prototype;\n\n _proto.bindMethods = function bindMethods() {\n this.remove = this.remove.bind(this);\n this.refetch = this.refetch.bind(this);\n };\n\n _proto.onSubscribe = function onSubscribe() {\n if (this.listeners.length === 1) {\n this.currentQuery.addObserver(this);\n\n if (shouldFetchOnMount(this.currentQuery, this.options)) {\n this.executeFetch();\n }\n\n this.updateTimers();\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n this.destroy();\n }\n };\n\n _proto.shouldFetchOnReconnect = function shouldFetchOnReconnect() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnReconnect);\n };\n\n _proto.shouldFetchOnWindowFocus = function shouldFetchOnWindowFocus() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnWindowFocus);\n };\n\n _proto.destroy = function destroy() {\n this.listeners = [];\n this.clearTimers();\n this.currentQuery.removeObserver(this);\n };\n\n _proto.setOptions = function setOptions(options, notifyOptions) {\n var prevOptions = this.options;\n var prevQuery = this.currentQuery;\n this.options = this.client.defaultQueryObserverOptions(options);\n\n if (typeof this.options.enabled !== 'undefined' && typeof this.options.enabled !== 'boolean') {\n throw new Error('Expected enabled to be a boolean');\n } // Keep previous query key if the user does not supply one\n\n\n if (!this.options.queryKey) {\n this.options.queryKey = prevOptions.queryKey;\n }\n\n this.updateQuery();\n var mounted = this.hasListeners(); // Fetch if there are subscribers\n\n if (mounted && shouldFetchOptionally(this.currentQuery, prevQuery, this.options, prevOptions)) {\n this.executeFetch();\n } // Update result\n\n\n this.updateResult(notifyOptions); // Update stale interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {\n this.updateStaleTimeout();\n }\n\n var nextRefetchInterval = this.computeRefetchInterval(); // Update refetch interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.currentRefetchInterval)) {\n this.updateRefetchInterval(nextRefetchInterval);\n }\n };\n\n _proto.getOptimisticResult = function getOptimisticResult(options) {\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return this.createResult(query, defaultedOptions);\n };\n\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n\n _proto.trackResult = function trackResult(result, defaultedOptions) {\n var _this2 = this;\n\n var trackedResult = {};\n\n var trackProp = function trackProp(key) {\n if (!_this2.trackedProps.includes(key)) {\n _this2.trackedProps.push(key);\n }\n };\n\n Object.keys(result).forEach(function (key) {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: function get() {\n trackProp(key);\n return result[key];\n }\n });\n });\n\n if (defaultedOptions.useErrorBoundary || defaultedOptions.suspense) {\n trackProp('error');\n }\n\n return trackedResult;\n };\n\n _proto.getNextResult = function getNextResult(options) {\n var _this3 = this;\n\n return new Promise(function (resolve, reject) {\n var unsubscribe = _this3.subscribe(function (result) {\n if (!result.isFetching) {\n unsubscribe();\n\n if (result.isError && (options == null ? void 0 : options.throwOnError)) {\n reject(result.error);\n } else {\n resolve(result);\n }\n }\n });\n });\n };\n\n _proto.getCurrentQuery = function getCurrentQuery() {\n return this.currentQuery;\n };\n\n _proto.remove = function remove() {\n this.client.getQueryCache().remove(this.currentQuery);\n };\n\n _proto.refetch = function refetch(options) {\n return this.fetch(_extends({}, options, {\n meta: {\n refetchPage: options == null ? void 0 : options.refetchPage\n }\n }));\n };\n\n _proto.fetchOptimistic = function fetchOptimistic(options) {\n var _this4 = this;\n\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return query.fetch().then(function () {\n return _this4.createResult(query, defaultedOptions);\n });\n };\n\n _proto.fetch = function fetch(fetchOptions) {\n var _this5 = this;\n\n return this.executeFetch(fetchOptions).then(function () {\n _this5.updateResult();\n\n return _this5.currentResult;\n });\n };\n\n _proto.executeFetch = function executeFetch(fetchOptions) {\n // Make sure we reference the latest query as the current one might have been removed\n this.updateQuery(); // Fetch\n\n var promise = this.currentQuery.fetch(this.options, fetchOptions);\n\n if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n };\n\n _proto.updateStaleTimeout = function updateStaleTimeout() {\n var _this6 = this;\n\n this.clearStaleTimeout();\n\n if (isServer || this.currentResult.isStale || !isValidTimeout(this.options.staleTime)) {\n return;\n }\n\n var time = timeUntilStale(this.currentResult.dataUpdatedAt, this.options.staleTime); // The timeout is sometimes triggered 1 ms before the stale time expiration.\n // To mitigate this issue we always add 1 ms to the timeout.\n\n var timeout = time + 1;\n this.staleTimeoutId = setTimeout(function () {\n if (!_this6.currentResult.isStale) {\n _this6.updateResult();\n }\n }, timeout);\n };\n\n _proto.computeRefetchInterval = function computeRefetchInterval() {\n var _this$options$refetch;\n\n return typeof this.options.refetchInterval === 'function' ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (_this$options$refetch = this.options.refetchInterval) != null ? _this$options$refetch : false;\n };\n\n _proto.updateRefetchInterval = function updateRefetchInterval(nextInterval) {\n var _this7 = this;\n\n this.clearRefetchInterval();\n this.currentRefetchInterval = nextInterval;\n\n if (isServer || this.options.enabled === false || !isValidTimeout(this.currentRefetchInterval) || this.currentRefetchInterval === 0) {\n return;\n }\n\n this.refetchIntervalId = setInterval(function () {\n if (_this7.options.refetchIntervalInBackground || focusManager.isFocused()) {\n _this7.executeFetch();\n }\n }, this.currentRefetchInterval);\n };\n\n _proto.updateTimers = function updateTimers() {\n this.updateStaleTimeout();\n this.updateRefetchInterval(this.computeRefetchInterval());\n };\n\n _proto.clearTimers = function clearTimers() {\n this.clearStaleTimeout();\n this.clearRefetchInterval();\n };\n\n _proto.clearStaleTimeout = function clearStaleTimeout() {\n if (this.staleTimeoutId) {\n clearTimeout(this.staleTimeoutId);\n this.staleTimeoutId = undefined;\n }\n };\n\n _proto.clearRefetchInterval = function clearRefetchInterval() {\n if (this.refetchIntervalId) {\n clearInterval(this.refetchIntervalId);\n this.refetchIntervalId = undefined;\n }\n };\n\n _proto.createResult = function createResult(query, options) {\n var prevQuery = this.currentQuery;\n var prevOptions = this.options;\n var prevResult = this.currentResult;\n var prevResultState = this.currentResultState;\n var prevResultOptions = this.currentResultOptions;\n var queryChange = query !== prevQuery;\n var queryInitialState = queryChange ? query.state : this.currentQueryInitialState;\n var prevQueryResult = queryChange ? this.currentResult : this.previousQueryResult;\n var state = query.state;\n var dataUpdatedAt = state.dataUpdatedAt,\n error = state.error,\n errorUpdatedAt = state.errorUpdatedAt,\n isFetching = state.isFetching,\n status = state.status;\n var isPreviousData = false;\n var isPlaceholderData = false;\n var data; // Optimistically set result in fetching state if needed\n\n if (options.optimisticResults) {\n var mounted = this.hasListeners();\n var fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n var fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\n if (fetchOnMount || fetchOptionally) {\n isFetching = true;\n\n if (!dataUpdatedAt) {\n status = 'loading';\n }\n }\n } // Keep previous data if needed\n\n\n if (options.keepPreviousData && !state.dataUpdateCount && (prevQueryResult == null ? void 0 : prevQueryResult.isSuccess) && status !== 'error') {\n data = prevQueryResult.data;\n dataUpdatedAt = prevQueryResult.dataUpdatedAt;\n status = prevQueryResult.status;\n isPreviousData = true;\n } // Select data if needed\n else if (options.select && typeof state.data !== 'undefined') {\n // Memoize select result\n if (prevResult && state.data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === this.selectFn) {\n data = this.selectResult;\n } else {\n try {\n this.selectFn = options.select;\n data = options.select(state.data);\n\n if (options.structuralSharing !== false) {\n data = replaceEqualDeep(prevResult == null ? void 0 : prevResult.data, data);\n }\n\n this.selectResult = data;\n this.selectError = null;\n } catch (selectError) {\n getLogger().error(selectError);\n this.selectError = selectError;\n }\n }\n } // Use query data\n else {\n data = state.data;\n } // Show placeholder data if needed\n\n\n if (typeof options.placeholderData !== 'undefined' && typeof data === 'undefined' && (status === 'loading' || status === 'idle')) {\n var placeholderData; // Memoize placeholder data\n\n if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {\n placeholderData = prevResult.data;\n } else {\n placeholderData = typeof options.placeholderData === 'function' ? options.placeholderData() : options.placeholderData;\n\n if (options.select && typeof placeholderData !== 'undefined') {\n try {\n placeholderData = options.select(placeholderData);\n\n if (options.structuralSharing !== false) {\n placeholderData = replaceEqualDeep(prevResult == null ? void 0 : prevResult.data, placeholderData);\n }\n\n this.selectError = null;\n } catch (selectError) {\n getLogger().error(selectError);\n this.selectError = selectError;\n }\n }\n }\n\n if (typeof placeholderData !== 'undefined') {\n status = 'success';\n data = placeholderData;\n isPlaceholderData = true;\n }\n }\n\n if (this.selectError) {\n error = this.selectError;\n data = this.selectResult;\n errorUpdatedAt = Date.now();\n status = 'error';\n }\n\n var result = {\n status: status,\n isLoading: status === 'loading',\n isSuccess: status === 'success',\n isError: status === 'error',\n isIdle: status === 'idle',\n data: data,\n dataUpdatedAt: dataUpdatedAt,\n error: error,\n errorUpdatedAt: errorUpdatedAt,\n failureCount: state.fetchFailureCount,\n errorUpdateCount: state.errorUpdateCount,\n isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,\n isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching: isFetching,\n isRefetching: isFetching && status !== 'loading',\n isLoadingError: status === 'error' && state.dataUpdatedAt === 0,\n isPlaceholderData: isPlaceholderData,\n isPreviousData: isPreviousData,\n isRefetchError: status === 'error' && state.dataUpdatedAt !== 0,\n isStale: isStale(query, options),\n refetch: this.refetch,\n remove: this.remove\n };\n return result;\n };\n\n _proto.shouldNotifyListeners = function shouldNotifyListeners(result, prevResult) {\n if (!prevResult) {\n return true;\n }\n\n var _this$options = this.options,\n notifyOnChangeProps = _this$options.notifyOnChangeProps,\n notifyOnChangePropsExclusions = _this$options.notifyOnChangePropsExclusions;\n\n if (!notifyOnChangeProps && !notifyOnChangePropsExclusions) {\n return true;\n }\n\n if (notifyOnChangeProps === 'tracked' && !this.trackedProps.length) {\n return true;\n }\n\n var includedProps = notifyOnChangeProps === 'tracked' ? this.trackedProps : notifyOnChangeProps;\n return Object.keys(result).some(function (key) {\n var typedKey = key;\n var changed = result[typedKey] !== prevResult[typedKey];\n var isIncluded = includedProps == null ? void 0 : includedProps.some(function (x) {\n return x === key;\n });\n var isExcluded = notifyOnChangePropsExclusions == null ? void 0 : notifyOnChangePropsExclusions.some(function (x) {\n return x === key;\n });\n return changed && !isExcluded && (!includedProps || isIncluded);\n });\n };\n\n _proto.updateResult = function updateResult(notifyOptions) {\n var prevResult = this.currentResult;\n this.currentResult = this.createResult(this.currentQuery, this.options);\n this.currentResultState = this.currentQuery.state;\n this.currentResultOptions = this.options; // Only notify if something has changed\n\n if (shallowEqualObjects(this.currentResult, prevResult)) {\n return;\n } // Determine which callbacks to trigger\n\n\n var defaultNotifyOptions = {\n cache: true\n };\n\n if ((notifyOptions == null ? void 0 : notifyOptions.listeners) !== false && this.shouldNotifyListeners(this.currentResult, prevResult)) {\n defaultNotifyOptions.listeners = true;\n }\n\n this.notify(_extends({}, defaultNotifyOptions, notifyOptions));\n };\n\n _proto.updateQuery = function updateQuery() {\n var query = this.client.getQueryCache().build(this.client, this.options);\n\n if (query === this.currentQuery) {\n return;\n }\n\n var prevQuery = this.currentQuery;\n this.currentQuery = query;\n this.currentQueryInitialState = query.state;\n this.previousQueryResult = this.currentResult;\n\n if (this.hasListeners()) {\n prevQuery == null ? void 0 : prevQuery.removeObserver(this);\n query.addObserver(this);\n }\n };\n\n _proto.onQueryUpdate = function onQueryUpdate(action) {\n var notifyOptions = {};\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error' && !isCancelledError(action.error)) {\n notifyOptions.onError = true;\n }\n\n this.updateResult(notifyOptions);\n\n if (this.hasListeners()) {\n this.updateTimers();\n }\n };\n\n _proto.notify = function notify(notifyOptions) {\n var _this8 = this;\n\n notifyManager.batch(function () {\n // First trigger the configuration callbacks\n if (notifyOptions.onSuccess) {\n _this8.options.onSuccess == null ? void 0 : _this8.options.onSuccess(_this8.currentResult.data);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(_this8.currentResult.data, null);\n } else if (notifyOptions.onError) {\n _this8.options.onError == null ? void 0 : _this8.options.onError(_this8.currentResult.error);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(undefined, _this8.currentResult.error);\n } // Then trigger the listeners\n\n\n if (notifyOptions.listeners) {\n _this8.listeners.forEach(function (listener) {\n listener(_this8.currentResult);\n });\n } // Then the cache listeners\n\n\n if (notifyOptions.cache) {\n _this8.client.getQueryCache().notify({\n query: _this8.currentQuery,\n type: 'observerResultsUpdated'\n });\n }\n });\n };\n\n return QueryObserver;\n}(Subscribable);\n\nfunction shouldLoadOnMount(query, options) {\n return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === 'error' && options.retryOnMount === false);\n}\n\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\n\nfunction shouldFetchOn(query, options, field) {\n if (options.enabled !== false) {\n var value = typeof field === 'function' ? field(query) : field;\n return value === 'always' || value !== false && isStale(query, options);\n }\n\n return false;\n}\n\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== 'error') && isStale(query, options);\n}\n\nfunction isStale(query, options) {\n return query.isStaleByTime(options.staleTime);\n}","import React from 'react';\nvar defaultContext = /*#__PURE__*/React.createContext(undefined);\nvar QueryClientSharingContext = /*#__PURE__*/React.createContext(false); // if contextSharing is on, we share the first and at least one\n// instance of the context across the window\n// to ensure that if React Query is used across\n// different bundles or microfrontends they will\n// all use the same **instance** of context, regardless\n// of module scoping.\n\nfunction getQueryClientContext(contextSharing) {\n if (contextSharing && typeof window !== 'undefined') {\n if (!window.ReactQueryClientContext) {\n window.ReactQueryClientContext = defaultContext;\n }\n\n return window.ReactQueryClientContext;\n }\n\n return defaultContext;\n}\n\nexport var useQueryClient = function useQueryClient() {\n var queryClient = React.useContext(getQueryClientContext(React.useContext(QueryClientSharingContext)));\n\n if (!queryClient) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one');\n }\n\n return queryClient;\n};\nexport var QueryClientProvider = function QueryClientProvider(_ref) {\n var client = _ref.client,\n _ref$contextSharing = _ref.contextSharing,\n contextSharing = _ref$contextSharing === void 0 ? false : _ref$contextSharing,\n children = _ref.children;\n React.useEffect(function () {\n client.mount();\n return function () {\n client.unmount();\n };\n }, [client]);\n var Context = getQueryClientContext(contextSharing);\n return /*#__PURE__*/React.createElement(QueryClientSharingContext.Provider, {\n value: contextSharing\n }, /*#__PURE__*/React.createElement(Context.Provider, {\n value: client\n }, children));\n};","import React from 'react'; // CONTEXT\n\nfunction createValue() {\n var _isReset = false;\n return {\n clearReset: function clearReset() {\n _isReset = false;\n },\n reset: function reset() {\n _isReset = true;\n },\n isReset: function isReset() {\n return _isReset;\n }\n };\n}\n\nvar QueryErrorResetBoundaryContext = /*#__PURE__*/React.createContext(createValue()); // HOOK\n\nexport var useQueryErrorResetBoundary = function useQueryErrorResetBoundary() {\n return React.useContext(QueryErrorResetBoundaryContext);\n}; // COMPONENT\n\nexport var QueryErrorResetBoundary = function QueryErrorResetBoundary(_ref) {\n var children = _ref.children;\n var value = React.useMemo(function () {\n return createValue();\n }, []);\n return /*#__PURE__*/React.createElement(QueryErrorResetBoundaryContext.Provider, {\n value: value\n }, typeof children === 'function' ? children(value) : children);\n};","export function shouldThrowError(suspense, _useErrorBoundary, params) {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary.apply(void 0, params);\n } // Allow useErrorBoundary to override suspense's throwing behavior\n\n\n if (typeof _useErrorBoundary === 'boolean') return _useErrorBoundary; // If suspense is enabled default to throwing errors\n\n return !!suspense;\n}","import React from 'react';\nimport { notifyManager } from '../core/notifyManager';\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary';\nimport { useQueryClient } from './QueryClientProvider';\nimport { shouldThrowError } from './utils';\nexport function useBaseQuery(options, Observer) {\n var mountedRef = React.useRef(false);\n\n var _React$useState = React.useState(0),\n forceUpdate = _React$useState[1];\n\n var queryClient = useQueryClient();\n var errorResetBoundary = useQueryErrorResetBoundary();\n var defaultedOptions = queryClient.defaultQueryObserverOptions(options); // Make sure results are optimistically set in fetching state before subscribing or updating options\n\n defaultedOptions.optimisticResults = true; // Include callbacks in batch renders\n\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(defaultedOptions.onError);\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(defaultedOptions.onSuccess);\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(defaultedOptions.onSettled);\n }\n\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000;\n } // Set cache time to 1 if the option has been set to 0\n // when using suspense to prevent infinite loop of fetches\n\n\n if (defaultedOptions.cacheTime === 0) {\n defaultedOptions.cacheTime = 1;\n }\n }\n\n if (defaultedOptions.suspense || defaultedOptions.useErrorBoundary) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n defaultedOptions.retryOnMount = false;\n }\n }\n\n var _React$useState2 = React.useState(function () {\n return new Observer(queryClient, defaultedOptions);\n }),\n observer = _React$useState2[0];\n\n var result = observer.getOptimisticResult(defaultedOptions);\n React.useEffect(function () {\n mountedRef.current = true;\n errorResetBoundary.clearReset();\n var unsubscribe = observer.subscribe(notifyManager.batchCalls(function () {\n if (mountedRef.current) {\n forceUpdate(function (x) {\n return x + 1;\n });\n }\n })); // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n\n observer.updateResult();\n return function () {\n mountedRef.current = false;\n unsubscribe();\n };\n }, [errorResetBoundary, observer]);\n React.useEffect(function () {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, {\n listeners: false\n });\n }, [defaultedOptions, observer]); // Handle suspense\n\n if (defaultedOptions.suspense && result.isLoading) {\n throw observer.fetchOptimistic(defaultedOptions).then(function (_ref) {\n var data = _ref.data;\n defaultedOptions.onSuccess == null ? void 0 : defaultedOptions.onSuccess(data);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(data, null);\n }).catch(function (error) {\n errorResetBoundary.clearReset();\n defaultedOptions.onError == null ? void 0 : defaultedOptions.onError(error);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(undefined, error);\n });\n } // Handle error boundary\n\n\n if (result.isError && !errorResetBoundary.isReset() && !result.isFetching && shouldThrowError(defaultedOptions.suspense, defaultedOptions.useErrorBoundary, [result.error, observer.getCurrentQuery()])) {\n throw result.error;\n } // Handle result property usage tracking\n\n\n if (defaultedOptions.notifyOnChangeProps === 'tracked') {\n result = observer.trackResult(result, defaultedOptions);\n }\n\n return result;\n}","import { QueryObserver } from '../core';\nimport { parseQueryArgs } from '../core/utils';\nimport { useBaseQuery } from './useBaseQuery'; // HOOK\n\nexport function useQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n return useBaseQuery(parsedOptions, QueryObserver);\n}","import { QueryClient } from 'react-query'\n\nexport class DefaultReactQueryClient extends QueryClient {\n constructor() {\n super({\n defaultOptions: {\n queries: {\n staleTime: Infinity,\n // all current query instances are manually refetched after data changes so no cache is needed (this option can be overridden in any useQuery instance)\n cacheTime: Infinity\n }\n }\n })\n }\n}\n"],"names":["Modal","props","React.createElement","Subscribable","_proto","listener","_this","callback","x","FocusManager","_Subscribable","_inheritsLoose","onFocus","_window","isServer","_this$cleanup","setup","_this$cleanup2","_this2","focused","focusManager","OnlineManager","onOnline","online","onlineManager","defaultRetryDelay","failureCount","isCancelable","value","CancelledError","options","isCancelledError","Retryer","config","cancelRetry","cancelFn","continueFn","promiseResolve","promiseReject","cancelOptions","outerResolve","outerReject","resolve","reject","pause","continueResolve","run","promiseOrValue","error","_config$retry","_config$retryDelay","retry","retryDelay","delay","shouldRetry","sleep","Query","_this$options$cacheTi","_extends","isValidTimeout","updater","_this$options$isDataE","_this$options","prevData","data","functionalUpdate","replaceEqualDeep","state","setStateOptions","_this$retryer","promise","noop","observer","staleTime","timeUntilStale","_this$retryer2","_this$retryer3","fetchOptions","_this$options$behavio","_context$fetchOptions","_abortController$abor","_this$retryer4","queryKey","ensureQueryKeyArray","abortController","getAbortController","queryFnContext","fetchFn","context","_this$options$behavio2","_context$fetchOptions2","getLogger","action","_this3","notifyManager","hasInitialData","initialDataUpdatedAt","hasData","_action$meta","_action$dataUpdatedAt","QueryCache","client","_options$queryHash","queryHash","hashQueryKeyByOptions","query","queryInMap","arg1","arg2","_parseFilterArgs","parseFilterArgs","filters","matchQuery","_parseFilterArgs2","event","_this4","_this5","Mutation","getDefaultState","restored","result","_this$options$retry","reducer","MutationCache","mutation","matchMutation","pausedMutations","infiniteQueryBehavior","_context$fetchOptions3","_context$fetchOptions4","_context$state$data","_context$state$data2","refetchPage","fetchMore","pageParam","isFetchingNextPage","isFetchingPreviousPage","oldPages","oldPageParams","abortSignal","newPageParams","cancelled","queryFn","buildNewPages","pages","param","page","previous","fetchPage","manual","queryFnResult","promiseAsAny","getNextPageParam","_manual","_param","getPreviousPageParam","shouldFetchFirstPage","_loop","i","shouldFetchNextPage","_param2","finalPromise","finalPromiseAsAny","QueryClient","_this$unsubscribeFocu","_this$unsubscribeOnli","_this$queryCache$find","queryKeyOrFilters","_ref","parsedOptions","parseQueryArgs","defaultedOptions","_ref2","_this$queryCache$find2","queryCache","arg3","_parseFilterArgs3","refetchFilters","_parseFilterArgs4","_parseFilterArgs4$","promises","_ref3","_filters$refetchActiv","_filters$refetchInact","_parseFilterArgs5","_this6","_parseFilterArgs6","_this7","hashQueryKey","_this$queryDefaults$f","partialMatchKey","mutationKey","_this$mutationDefault","QueryObserver","shouldFetchOnMount","shouldFetchOn","notifyOptions","prevOptions","prevQuery","mounted","shouldFetchOptionally","nextRefetchInterval","trackedResult","trackProp","key","unsubscribe","time","timeout","_this$options$refetch","nextInterval","prevResult","prevResultState","prevResultOptions","queryChange","queryInitialState","prevQueryResult","dataUpdatedAt","errorUpdatedAt","isFetching","status","isPreviousData","isPlaceholderData","fetchOnMount","fetchOptionally","selectError","placeholderData","isStale","notifyOnChangeProps","notifyOnChangePropsExclusions","includedProps","typedKey","changed","isIncluded","isExcluded","shallowEqualObjects","defaultNotifyOptions","_this8","shouldLoadOnMount","field","defaultContext","React","QueryClientSharingContext","getQueryClientContext","contextSharing","useQueryClient","queryClient","QueryClientProvider","_ref$contextSharing","children","Context","createValue","_isReset","QueryErrorResetBoundaryContext","useQueryErrorResetBoundary","shouldThrowError","suspense","_useErrorBoundary","params","useBaseQuery","Observer","mountedRef","_React$useState","forceUpdate","errorResetBoundary","_React$useState2","useQuery","DefaultReactQueryClient"],"mappings":"0QAEA,MAAMA,GAASC,GACbC,EAAAA,cAAC,MAAI,CAAA,UAAU,iBACb,EAAAA,EAAA,cAAC,MAAI,CAAA,UAAU,kBAAmB,CAAA,kBACjC,MAAI,CAAA,UAAU,iBACb,EAAAA,EAAAA,cAAC,MAAI,CAAA,UAAU,eACZ,EAAAD,EAAM,QACT,CACF,EACCC,EAAAA,cAAA,SAAA,CAAO,UAAU,cAAc,QAASD,EAAM,MAAO,CACxD,ECXK,IAAIE,EAAwC,UAAA,CACjD,SAASA,GAAe,CACtB,KAAK,UAAY,EACnB,CAEA,IAAIC,EAASD,EAAa,UAEnB,OAAAC,EAAA,UAAY,SAAmBC,EAAU,CAC9C,IAAIC,EAAQ,KAERC,EAAWF,GAAY,UAAY,CAC9B,EAGJ,YAAA,UAAU,KAAKE,CAAQ,EAC5B,KAAK,YAAY,EACV,UAAY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