diff --git a/features/landing/frontend-standalone/.vite-cache/deps/chunk-7Y3UKPDW.js.map b/features/landing/frontend-standalone/.vite-cache/deps/chunk-7Y3UKPDW.js.map
deleted file mode 100644
index afde784cf..000000000
--- a/features/landing/frontend-standalone/.vite-cache/deps/chunk-7Y3UKPDW.js.map
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "version": 3,
- "sources": ["../../../../../../node_modules/.bun/react@19.2.4/node_modules/react/cjs/react.development.js", "../../../../../../node_modules/.bun/react@19.2.4/node_modules/react/index.js"],
- "sourcesContent": ["/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function defineDeprecationWarning(methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n console.warn(\n \"%s(...) is deprecated in plain JavaScript React classes. %s\",\n info[0],\n info[1]\n );\n }\n });\n }\n function getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n }\n function warnNoop(publicInstance, callerName) {\n publicInstance =\n ((publicInstance = publicInstance.constructor) &&\n (publicInstance.displayName || publicInstance.name)) ||\n \"ReactClass\";\n var warningKey = publicInstance + \".\" + callerName;\n didWarnStateUpdateForUnmountedComponent[warningKey] ||\n (console.error(\n \"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.\",\n callerName,\n publicInstance\n ),\n (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));\n }\n function Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function ComponentDummy() {}\n function PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function noop() {}\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function cloneAndReplaceKey(oldElement, newKey) {\n newKey = ReactElement(\n oldElement.type,\n newKey,\n oldElement.props,\n oldElement._owner,\n oldElement._debugStack,\n oldElement._debugTask\n );\n oldElement._store &&\n (newKey._store.validated = oldElement._store.validated);\n return newKey;\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n function escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n }\n function getElementKey(element, index) {\n return \"object\" === typeof element &&\n null !== element &&\n null != element.key\n ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n : index.toString(36);\n }\n function resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"),\n (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n }\n function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback) {\n invokeCallback = children;\n callback = callback(invokeCallback);\n var childKey =\n \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != childKey &&\n (escapedPrefix =\n childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (null != callback.key &&\n ((invokeCallback && invokeCallback.key === callback.key) ||\n checkKeyStringCoercion(callback.key)),\n (escapedPrefix = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (invokeCallback && invokeCallback.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n childKey\n )),\n \"\" !== nameSoFar &&\n null != invokeCallback &&\n isValidElement(invokeCallback) &&\n null == invokeCallback.key &&\n invokeCallback._store &&\n !invokeCallback._store.validated &&\n (escapedPrefix._store.validated = 2),\n (callback = escapedPrefix)),\n array.push(callback));\n return 1;\n }\n invokeCallback = 0;\n childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = childKey + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n i === children.entries &&\n (didWarnAboutMaps ||\n console.warn(\n \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n ),\n (didWarnAboutMaps = !0)),\n children = i.call(children),\n i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = childKey + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n }\n function mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n }\n function lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ioInfo = payload._ioInfo;\n null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());\n ioInfo = payload._result;\n var thenable = ioInfo();\n thenable.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 1;\n payload._result = moduleObject;\n var _ioInfo = payload._ioInfo;\n null != _ioInfo && (_ioInfo.end = performance.now());\n void 0 === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = moduleObject));\n }\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 2;\n payload._result = error;\n var _ioInfo2 = payload._ioInfo;\n null != _ioInfo2 && (_ioInfo2.end = performance.now());\n void 0 === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n }\n );\n ioInfo = payload._ioInfo;\n if (null != ioInfo) {\n ioInfo.value = thenable;\n var displayName = thenable.displayName;\n \"string\" === typeof displayName && (ioInfo.name = displayName);\n }\n -1 === payload._status &&\n ((payload._status = 0), (payload._result = thenable));\n }\n if (1 === payload._status)\n return (\n (ioInfo = payload._result),\n void 0 === ioInfo &&\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n ioInfo\n ),\n \"default\" in ioInfo ||\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\",\n ioInfo\n ),\n ioInfo.default\n );\n throw payload._result;\n }\n function resolveDispatcher() {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher;\n }\n function releaseAsyncTransition() {\n ReactSharedInternals.asyncTransitions--;\n }\n function enqueueTask(task) {\n if (null === enqueueTaskImpl)\n try {\n var requireString = (\"require\" + Math.random()).slice(0, 7);\n enqueueTaskImpl = (module && module[requireString]).call(\n module,\n \"timers\"\n ).setImmediate;\n } catch (_err) {\n enqueueTaskImpl = function (callback) {\n !1 === didWarnAboutMessageChannel &&\n ((didWarnAboutMessageChannel = !0),\n \"undefined\" === typeof MessageChannel &&\n console.error(\n \"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.\"\n ));\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(void 0);\n };\n }\n return enqueueTaskImpl(task);\n }\n function aggregateErrors(errors) {\n return 1 < errors.length && \"function\" === typeof AggregateError\n ? new AggregateError(errors)\n : errors[0];\n }\n function popActScope(prevActQueue, prevActScopeDepth) {\n prevActScopeDepth !== actScopeDepth - 1 &&\n console.error(\n \"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"\n );\n actScopeDepth = prevActScopeDepth;\n }\n function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n var queue = ReactSharedInternals.actQueue;\n if (null !== queue)\n if (0 !== queue.length)\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n });\n return;\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n else ReactSharedInternals.actQueue = null;\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(queue))\n : resolve(returnValue);\n }\n function flushActQueue(queue) {\n if (!isFlushing) {\n isFlushing = !0;\n var i = 0;\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n do {\n ReactSharedInternals.didUsePromise = !1;\n var continuation = callback(!1);\n if (null !== continuation) {\n if (ReactSharedInternals.didUsePromise) {\n queue[i] = callback;\n queue.splice(0, i);\n return;\n }\n callback = continuation;\n } else break;\n } while (1);\n }\n queue.length = 0;\n } catch (error) {\n queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);\n } finally {\n isFlushing = !1;\n }\n }\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n didWarnStateUpdateForUnmountedComponent = {},\n ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function (publicInstance) {\n warnNoop(publicInstance, \"forceUpdate\");\n },\n enqueueReplaceState: function (publicInstance) {\n warnNoop(publicInstance, \"replaceState\");\n },\n enqueueSetState: function (publicInstance) {\n warnNoop(publicInstance, \"setState\");\n }\n },\n assign = Object.assign,\n emptyObject = {};\n Object.freeze(emptyObject);\n Component.prototype.isReactComponent = {};\n Component.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n };\n Component.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n };\n var deprecatedAPIs = {\n isMounted: [\n \"isMounted\",\n \"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\"\n ],\n replaceState: [\n \"replaceState\",\n \"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).\"\n ]\n };\n for (fnName in deprecatedAPIs)\n deprecatedAPIs.hasOwnProperty(fnName) &&\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n ComponentDummy.prototype = Component.prototype;\n deprecatedAPIs = PureComponent.prototype = new ComponentDummy();\n deprecatedAPIs.constructor = PureComponent;\n assign(deprecatedAPIs, Component.prototype);\n deprecatedAPIs.isPureReactComponent = !0;\n var isArrayImpl = Array.isArray,\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals = {\n H: null,\n A: null,\n T: null,\n S: null,\n actQueue: null,\n asyncTransitions: 0,\n isBatchingLegacy: !1,\n didScheduleLegacyUpdate: !1,\n didUsePromise: !1,\n thrownErrors: [],\n getCurrentStack: null,\n recentlyCreatedOwnerStacks: 0\n },\n hasOwnProperty = Object.prototype.hasOwnProperty,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n deprecatedAPIs = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(\n deprecatedAPIs,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutMaps = !1,\n userProvidedKeyEscapeRegex = /\\/+/g,\n reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n didWarnAboutMessageChannel = !1,\n enqueueTaskImpl = null,\n actScopeDepth = 0,\n didWarnNoAwaitAct = !1,\n isFlushing = !1,\n queueSeveralMicrotasks =\n \"function\" === typeof queueMicrotask\n ? function (callback) {\n queueMicrotask(function () {\n return queueMicrotask(callback);\n });\n }\n : enqueueTask;\n deprecatedAPIs = Object.freeze({\n __proto__: null,\n c: function (size) {\n return resolveDispatcher().useMemoCache(size);\n }\n });\n var fnName = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\n exports.Activity = REACT_ACTIVITY_TYPE;\n exports.Children = fnName;\n exports.Component = Component;\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.PureComponent = PureComponent;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\n exports.__COMPILER_RUNTIME = deprecatedAPIs;\n exports.act = function (callback) {\n var prevActQueue = ReactSharedInternals.actQueue,\n prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n var queue = (ReactSharedInternals.actQueue =\n null !== prevActQueue ? prevActQueue : []),\n didAwaitActCall = !1;\n try {\n var result = callback();\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n (popActScope(prevActQueue, prevActScopeDepth),\n (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n if (\n null !== result &&\n \"object\" === typeof result &&\n \"function\" === typeof result.then\n ) {\n var thenable = result;\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);\"\n ));\n });\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n thenable.then(\n function (returnValue) {\n popActScope(prevActQueue, prevActScopeDepth);\n if (0 === prevActScopeDepth) {\n try {\n flushActQueue(queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue,\n resolve,\n reject\n );\n });\n } catch (error$0) {\n ReactSharedInternals.thrownErrors.push(error$0);\n }\n if (0 < ReactSharedInternals.thrownErrors.length) {\n var _thrownError = aggregateErrors(\n ReactSharedInternals.thrownErrors\n );\n ReactSharedInternals.thrownErrors.length = 0;\n reject(_thrownError);\n }\n } else resolve(returnValue);\n },\n function (error) {\n popActScope(prevActQueue, prevActScopeDepth);\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((error = aggregateErrors(\n ReactSharedInternals.thrownErrors\n )),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(error))\n : reject(error);\n }\n );\n }\n };\n }\n var returnValue$jscomp$0 = result;\n popActScope(prevActQueue, prevActScopeDepth);\n 0 === prevActScopeDepth &&\n (flushActQueue(queue),\n 0 !== queue.length &&\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\\n\\nawait act(() => ...)\"\n ));\n }),\n (ReactSharedInternals.actQueue = null));\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n 0 === prevActScopeDepth\n ? ((ReactSharedInternals.actQueue = queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue$jscomp$0,\n resolve,\n reject\n );\n }))\n : resolve(returnValue$jscomp$0);\n }\n };\n };\n exports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n };\n exports.cacheSignal = function () {\n return null;\n };\n exports.captureOwnerStack = function () {\n var getCurrentStack = ReactSharedInternals.getCurrentStack;\n return null === getCurrentStack ? null : getCurrentStack();\n };\n exports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" +\n element +\n \".\"\n );\n var props = assign({}, element.props),\n key = element.key,\n owner = element._owner;\n if (null != config) {\n var JSCompiler_inline_result;\n a: {\n if (\n hasOwnProperty.call(config, \"ref\") &&\n (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n config,\n \"ref\"\n ).get) &&\n JSCompiler_inline_result.isReactWarning\n ) {\n JSCompiler_inline_result = !1;\n break a;\n }\n JSCompiler_inline_result = void 0 !== config.ref;\n }\n JSCompiler_inline_result && (owner = getOwner());\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n for (propName in config)\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n }\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n JSCompiler_inline_result = Array(propName);\n for (var i = 0; i < propName; i++)\n JSCompiler_inline_result[i] = arguments[i + 2];\n props.children = JSCompiler_inline_result;\n }\n props = ReactElement(\n element.type,\n key,\n props,\n owner,\n element._debugStack,\n element._debugTask\n );\n for (key = 2; key < arguments.length; key++)\n validateChildKeys(arguments[key]);\n return props;\n };\n exports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n defaultValue._currentRenderer = null;\n defaultValue._currentRenderer2 = null;\n return defaultValue;\n };\n exports.createElement = function (type, config, children) {\n for (var i = 2; i < arguments.length; i++)\n validateChildKeys(arguments[i]);\n i = {};\n var key = null;\n if (null != config)\n for (propName in (didWarnAboutOldJSXRuntime ||\n !(\"__self\" in config) ||\n \"key\" in config ||\n ((didWarnAboutOldJSXRuntime = !0),\n console.warn(\n \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n )),\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key)),\n config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (i[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) i.children = children;\n else if (1 < childrenLength) {\n for (\n var childArray = Array(childrenLength), _i = 0;\n _i < childrenLength;\n _i++\n )\n childArray[_i] = arguments[_i + 2];\n Object.freeze && Object.freeze(childArray);\n i.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n key &&\n defineKeyPropWarningGetter(\n i,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return ReactElement(\n type,\n key,\n i,\n getOwner(),\n propName ? Error(\"react-stack-top-frame\") : unknownOwnerDebugStack,\n propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.createRef = function () {\n var refObject = { current: null };\n Object.seal(refObject);\n return refObject;\n };\n exports.forwardRef = function (render) {\n null != render && render.$$typeof === REACT_MEMO_TYPE\n ? console.error(\n \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n )\n : \"function\" !== typeof render\n ? console.error(\n \"forwardRef requires a render function but was given %s.\",\n null === render ? \"null\" : typeof render\n )\n : 0 !== render.length &&\n 2 !== render.length &&\n console.error(\n \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n 1 === render.length\n ? \"Did you forget to use the ref parameter?\"\n : \"Any additional parameter will be undefined.\"\n );\n null != render &&\n null != render.defaultProps &&\n console.error(\n \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n );\n var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n ownName;\n Object.defineProperty(elementType, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n render.name ||\n render.displayName ||\n (Object.defineProperty(render, \"name\", { value: name }),\n (render.displayName = name));\n }\n });\n return elementType;\n };\n exports.isValidElement = isValidElement;\n exports.lazy = function (ctor) {\n ctor = { _status: -1, _result: ctor };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: ctor,\n _init: lazyInitializer\n },\n ioInfo = {\n name: \"lazy\",\n start: -1,\n end: -1,\n value: null,\n owner: null,\n debugStack: Error(\"react-stack-top-frame\"),\n debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n };\n ctor._ioInfo = ioInfo;\n lazyType._debugInfo = [{ awaited: ioInfo }];\n return lazyType;\n };\n exports.memo = function (type, compare) {\n null == type &&\n console.error(\n \"memo: The first argument must be a component. Instead received: %s\",\n null === type ? \"null\" : typeof type\n );\n compare = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n var ownName;\n Object.defineProperty(compare, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n type.name ||\n type.displayName ||\n (Object.defineProperty(type, \"name\", { value: name }),\n (type.displayName = name));\n }\n });\n return compare;\n };\n exports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n currentTransition._updatedFibers = new Set();\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n (ReactSharedInternals.asyncTransitions++,\n returnValue.then(releaseAsyncTransition, releaseAsyncTransition),\n returnValue.then(noop, reportGlobalError));\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null === prevTransition &&\n currentTransition._updatedFibers &&\n ((scope = currentTransition._updatedFibers.size),\n currentTransition._updatedFibers.clear(),\n 10 < scope &&\n console.warn(\n \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n )),\n null !== prevTransition &&\n null !== currentTransition.types &&\n (null !== prevTransition.types &&\n prevTransition.types !== currentTransition.types &&\n console.error(\n \"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.\"\n ),\n (prevTransition.types = currentTransition.types)),\n (ReactSharedInternals.T = prevTransition);\n }\n };\n exports.unstable_useCacheRefresh = function () {\n return resolveDispatcher().useCacheRefresh();\n };\n exports.use = function (usable) {\n return resolveDispatcher().use(usable);\n };\n exports.useActionState = function (action, initialState, permalink) {\n return resolveDispatcher().useActionState(\n action,\n initialState,\n permalink\n );\n };\n exports.useCallback = function (callback, deps) {\n return resolveDispatcher().useCallback(callback, deps);\n };\n exports.useContext = function (Context) {\n var dispatcher = resolveDispatcher();\n Context.$$typeof === REACT_CONSUMER_TYPE &&\n console.error(\n \"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?\"\n );\n return dispatcher.useContext(Context);\n };\n exports.useDebugValue = function (value, formatterFn) {\n return resolveDispatcher().useDebugValue(value, formatterFn);\n };\n exports.useDeferredValue = function (value, initialValue) {\n return resolveDispatcher().useDeferredValue(value, initialValue);\n };\n exports.useEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useEffect(create, deps);\n };\n exports.useEffectEvent = function (callback) {\n return resolveDispatcher().useEffectEvent(callback);\n };\n exports.useId = function () {\n return resolveDispatcher().useId();\n };\n exports.useImperativeHandle = function (ref, create, deps) {\n return resolveDispatcher().useImperativeHandle(ref, create, deps);\n };\n exports.useInsertionEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useInsertionEffect(create, deps);\n };\n exports.useLayoutEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useLayoutEffect(create, deps);\n };\n exports.useMemo = function (create, deps) {\n return resolveDispatcher().useMemo(create, deps);\n };\n exports.useOptimistic = function (passthrough, reducer) {\n return resolveDispatcher().useOptimistic(passthrough, reducer);\n };\n exports.useReducer = function (reducer, initialArg, init) {\n return resolveDispatcher().useReducer(reducer, initialArg, init);\n };\n exports.useRef = function (initialValue) {\n return resolveDispatcher().useRef(initialValue);\n };\n exports.useState = function (initialState) {\n return resolveDispatcher().useState(initialState);\n };\n exports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n ) {\n return resolveDispatcher().useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n };\n exports.useTransition = function () {\n return resolveDispatcher().useTransition();\n };\n exports.version = \"19.2.4\";\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n"],
- "mappings": ";;;;;AAAA;AAAA;AAAA;AAWA,KACG,WAAY;AACX,eAAS,yBAAyB,YAAY,MAAM;AAClD,eAAO,eAAe,UAAU,WAAW,YAAY;AAAA,UACrD,KAAK,WAAY;AACf,oBAAQ;AAAA,cACN;AAAA,cACA,KAAK,CAAC;AAAA,cACN,KAAK,CAAC;AAAA,YACR;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH;AACA,eAAS,cAAc,eAAe;AACpC,YAAI,SAAS,iBAAiB,aAAa,OAAO;AAChD,iBAAO;AACT,wBACG,yBAAyB,cAAc,qBAAqB,KAC7D,cAAc,YAAY;AAC5B,eAAO,eAAe,OAAO,gBAAgB,gBAAgB;AAAA,MAC/D;AACA,eAAS,SAAS,gBAAgB,YAAY;AAC5C,0BACI,iBAAiB,eAAe,iBAC/B,eAAe,eAAe,eAAe,SAChD;AACF,YAAI,aAAa,iBAAiB,MAAM;AACxC,gDAAw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- "names": []
-}
diff --git a/features/landing/frontend-standalone/.vite-cache/deps/chunk-DKXZQOKX.js b/features/landing/frontend-standalone/.vite-cache/deps/chunk-DKXZQOKX.js
deleted file mode 100644
index 28662865e..000000000
--- a/features/landing/frontend-standalone/.vite-cache/deps/chunk-DKXZQOKX.js
+++ /dev/null
@@ -1,267 +0,0 @@
-import {
- require_react
-} from "./chunk-7Y3UKPDW.js";
-import {
- __commonJS
-} from "./chunk-DSCFE4L4.js";
-
-// ../../../../node_modules/.bun/react-dom@19.2.4+b1ab299f0a400331/node_modules/react-dom/cjs/react-dom.development.js
-var require_react_dom_development = __commonJS({
- "../../../../node_modules/.bun/react-dom@19.2.4+b1ab299f0a400331/node_modules/react-dom/cjs/react-dom.development.js"(exports) {
- "use strict";
- (function() {
- function noop() {
- }
- function testStringCoercion(value) {
- return "" + value;
- }
- function createPortal$1(children, containerInfo, implementation) {
- var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
- try {
- testStringCoercion(key);
- var JSCompiler_inline_result = false;
- } catch (e) {
- JSCompiler_inline_result = true;
- }
- JSCompiler_inline_result && (console.error(
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
- "function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object"
- ), testStringCoercion(key));
- return {
- $$typeof: REACT_PORTAL_TYPE,
- key: null == key ? null : "" + key,
- children,
- containerInfo,
- implementation
- };
- }
- function getCrossOriginStringAs(as, input) {
- if ("font" === as) return "";
- if ("string" === typeof input)
- return "use-credentials" === input ? input : "";
- }
- function getValueDescriptorExpectingObjectForWarning(thing) {
- return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : 'something with type "' + typeof thing + '"';
- }
- function getValueDescriptorExpectingEnumForWarning(thing) {
- return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : 'something with type "' + typeof thing + '"';
- }
- function resolveDispatcher() {
- var dispatcher = ReactSharedInternals.H;
- null === dispatcher && console.error(
- "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
- );
- return dispatcher;
- }
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
- var React = require_react(), Internals = {
- d: {
- f: noop,
- r: function() {
- throw Error(
- "Invalid form element. requestFormReset must be passed a form that was rendered by React."
- );
- },
- D: noop,
- C: noop,
- L: noop,
- m: noop,
- X: noop,
- S: noop,
- M: noop
- },
- p: 0,
- findDOMNode: null
- }, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
- "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
- "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
- );
- exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
- exports.createPortal = function(children, container) {
- var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
- if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType)
- throw Error("Target container is not a DOM element.");
- return createPortal$1(children, container, null, key);
- };
- exports.flushSync = function(fn) {
- var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
- try {
- if (ReactSharedInternals.T = null, Internals.p = 2, fn)
- return fn();
- } finally {
- ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error(
- "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
- );
- }
- };
- exports.preconnect = function(href, options) {
- "string" === typeof href && href ? null != options && "object" !== typeof options ? console.error(
- "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
- getValueDescriptorExpectingEnumForWarning(options)
- ) : null != options && "string" !== typeof options.crossOrigin && console.error(
- "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
- getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
- ) : console.error(
- "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
- getValueDescriptorExpectingObjectForWarning(href)
- );
- "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
- };
- exports.prefetchDNS = function(href) {
- if ("string" !== typeof href || !href)
- console.error(
- "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
- getValueDescriptorExpectingObjectForWarning(href)
- );
- else if (1 < arguments.length) {
- var options = arguments[1];
- "object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error(
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
- getValueDescriptorExpectingEnumForWarning(options)
- ) : console.error(
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
- getValueDescriptorExpectingEnumForWarning(options)
- );
- }
- "string" === typeof href && Internals.d.D(href);
- };
- exports.preinit = function(href, options) {
- "string" === typeof href && href ? null == options || "object" !== typeof options ? console.error(
- "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
- getValueDescriptorExpectingEnumForWarning(options)
- ) : "style" !== options.as && "script" !== options.as && console.error(
- 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
- getValueDescriptorExpectingEnumForWarning(options.as)
- ) : console.error(
- "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
- getValueDescriptorExpectingObjectForWarning(href)
- );
- if ("string" === typeof href && options && "string" === typeof options.as) {
- var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
- "style" === as ? Internals.d.S(
- href,
- "string" === typeof options.precedence ? options.precedence : void 0,
- {
- crossOrigin,
- integrity,
- fetchPriority
- }
- ) : "script" === as && Internals.d.X(href, {
- crossOrigin,
- integrity,
- fetchPriority,
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
- });
- }
- };
- exports.preinitModule = function(href, options) {
- var encountered = "";
- "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
- void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "script" !== options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + ".");
- if (encountered)
- console.error(
- "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
- encountered
- );
- else
- switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) {
- case "script":
- break;
- default:
- encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error(
- 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
- encountered,
- href
- );
- }
- if ("string" === typeof href)
- if ("object" === typeof options && null !== options) {
- if (null == options.as || "script" === options.as)
- encountered = getCrossOriginStringAs(
- options.as,
- options.crossOrigin
- ), Internals.d.M(href, {
- crossOrigin: encountered,
- integrity: "string" === typeof options.integrity ? options.integrity : void 0,
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
- });
- } else null == options && Internals.d.M(href);
- };
- exports.preload = function(href, options) {
- var encountered = "";
- "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
- null == options || "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : "string" === typeof options.as && options.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
- encountered && console.error(
- 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `` tag.%s',
- encountered
- );
- if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
- encountered = options.as;
- var crossOrigin = getCrossOriginStringAs(
- encountered,
- options.crossOrigin
- );
- Internals.d.L(href, encountered, {
- crossOrigin,
- integrity: "string" === typeof options.integrity ? options.integrity : void 0,
- nonce: "string" === typeof options.nonce ? options.nonce : void 0,
- type: "string" === typeof options.type ? options.type : void 0,
- fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
- referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
- imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
- imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
- media: "string" === typeof options.media ? options.media : void 0
- });
- }
- };
- exports.preloadModule = function(href, options) {
- var encountered = "";
- "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
- void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "string" !== typeof options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
- encountered && console.error(
- 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `` tag.%s',
- encountered
- );
- "string" === typeof href && (options ? (encountered = getCrossOriginStringAs(
- options.as,
- options.crossOrigin
- ), Internals.d.m(href, {
- as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
- crossOrigin: encountered,
- integrity: "string" === typeof options.integrity ? options.integrity : void 0
- })) : Internals.d.m(href));
- };
- exports.requestFormReset = function(form) {
- Internals.d.r(form);
- };
- exports.unstable_batchedUpdates = function(fn, a) {
- return fn(a);
- };
- exports.useFormState = function(action, initialState, permalink) {
- return resolveDispatcher().useFormState(action, initialState, permalink);
- };
- exports.useFormStatus = function() {
- return resolveDispatcher().useHostTransitionStatus();
- };
- exports.version = "19.2.4";
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
- })();
- }
-});
-
-// ../../../../node_modules/.bun/react-dom@19.2.4+b1ab299f0a400331/node_modules/react-dom/index.js
-var require_react_dom = __commonJS({
- "../../../../node_modules/.bun/react-dom@19.2.4+b1ab299f0a400331/node_modules/react-dom/index.js"(exports, module) {
- if (false) {
- checkDCE();
- module.exports = null;
- } else {
- module.exports = require_react_dom_development();
- }
- }
-});
-
-export {
- require_react_dom
-};
-//# sourceMappingURL=chunk-DKXZQOKX.js.map
diff --git a/features/landing/frontend-standalone/.vite-cache/deps/chunk-DKXZQOKX.js.map b/features/landing/frontend-standalone/.vite-cache/deps/chunk-DKXZQOKX.js.map
deleted file mode 100644
index 715b94922..000000000
--- a/features/landing/frontend-standalone/.vite-cache/deps/chunk-DKXZQOKX.js.map
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "version": 3,
- "sources": ["../../../../../../node_modules/.bun/react-dom@19.2.4+b1ab299f0a400331/node_modules/react-dom/cjs/react-dom.development.js", "../../../../../../node_modules/.bun/react-dom@19.2.4+b1ab299f0a400331/node_modules/react-dom/index.js"],
- "sourcesContent": ["/**\n * @license React\n * react-dom.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function noop() {}\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function createPortal$1(children, containerInfo, implementation) {\n var key =\n 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n try {\n testStringCoercion(key);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n JSCompiler_inline_result &&\n (console.error(\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n key[Symbol.toStringTag]) ||\n key.constructor.name ||\n \"Object\"\n ),\n testStringCoercion(key));\n return {\n $$typeof: REACT_PORTAL_TYPE,\n key: null == key ? null : \"\" + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n }\n function getCrossOriginStringAs(as, input) {\n if (\"font\" === as) return \"\";\n if (\"string\" === typeof input)\n return \"use-credentials\" === input ? input : \"\";\n }\n function getValueDescriptorExpectingObjectForWarning(thing) {\n return null === thing\n ? \"`null`\"\n : void 0 === thing\n ? \"`undefined`\"\n : \"\" === thing\n ? \"an empty string\"\n : 'something with type \"' + typeof thing + '\"';\n }\n function getValueDescriptorExpectingEnumForWarning(thing) {\n return null === thing\n ? \"`null`\"\n : void 0 === thing\n ? \"`undefined`\"\n : \"\" === thing\n ? \"an empty string\"\n : \"string\" === typeof thing\n ? JSON.stringify(thing)\n : \"number\" === typeof thing\n ? \"`\" + thing + \"`\"\n : 'something with type \"' + typeof thing + '\"';\n }\n function resolveDispatcher() {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher;\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n Internals = {\n d: {\n f: noop,\n r: function () {\n throw Error(\n \"Invalid form element. requestFormReset must be passed a form that was rendered by React.\"\n );\n },\n D: noop,\n C: noop,\n L: noop,\n m: noop,\n X: noop,\n S: noop,\n M: noop\n },\n p: 0,\n findDOMNode: null\n },\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n (\"function\" === typeof Map &&\n null != Map.prototype &&\n \"function\" === typeof Map.prototype.forEach &&\n \"function\" === typeof Set &&\n null != Set.prototype &&\n \"function\" === typeof Set.prototype.clear &&\n \"function\" === typeof Set.prototype.forEach) ||\n console.error(\n \"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"\n );\n exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n Internals;\n exports.createPortal = function (children, container) {\n var key =\n 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n if (\n !container ||\n (1 !== container.nodeType &&\n 9 !== container.nodeType &&\n 11 !== container.nodeType)\n )\n throw Error(\"Target container is not a DOM element.\");\n return createPortal$1(children, container, null, key);\n };\n exports.flushSync = function (fn) {\n var previousTransition = ReactSharedInternals.T,\n previousUpdatePriority = Internals.p;\n try {\n if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))\n return fn();\n } finally {\n (ReactSharedInternals.T = previousTransition),\n (Internals.p = previousUpdatePriority),\n Internals.d.f() &&\n console.error(\n \"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.\"\n );\n }\n };\n exports.preconnect = function (href, options) {\n \"string\" === typeof href && href\n ? null != options && \"object\" !== typeof options\n ? console.error(\n \"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.\",\n getValueDescriptorExpectingEnumForWarning(options)\n )\n : null != options &&\n \"string\" !== typeof options.crossOrigin &&\n console.error(\n \"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.\",\n getValueDescriptorExpectingObjectForWarning(options.crossOrigin)\n )\n : console.error(\n \"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n getValueDescriptorExpectingObjectForWarning(href)\n );\n \"string\" === typeof href &&\n (options\n ? ((options = options.crossOrigin),\n (options =\n \"string\" === typeof options\n ? \"use-credentials\" === options\n ? options\n : \"\"\n : void 0))\n : (options = null),\n Internals.d.C(href, options));\n };\n exports.prefetchDNS = function (href) {\n if (\"string\" !== typeof href || !href)\n console.error(\n \"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n getValueDescriptorExpectingObjectForWarning(href)\n );\n else if (1 < arguments.length) {\n var options = arguments[1];\n \"object\" === typeof options && options.hasOwnProperty(\"crossOrigin\")\n ? console.error(\n \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n getValueDescriptorExpectingEnumForWarning(options)\n )\n : console.error(\n \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n getValueDescriptorExpectingEnumForWarning(options)\n );\n }\n \"string\" === typeof href && Internals.d.D(href);\n };\n exports.preinit = function (href, options) {\n \"string\" === typeof href && href\n ? null == options || \"object\" !== typeof options\n ? console.error(\n \"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.\",\n getValueDescriptorExpectingEnumForWarning(options)\n )\n : \"style\" !== options.as &&\n \"script\" !== options.as &&\n console.error(\n 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".',\n getValueDescriptorExpectingEnumForWarning(options.as)\n )\n : console.error(\n \"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n getValueDescriptorExpectingObjectForWarning(href)\n );\n if (\n \"string\" === typeof href &&\n options &&\n \"string\" === typeof options.as\n ) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n integrity =\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n fetchPriority =\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0;\n \"style\" === as\n ? Internals.d.S(\n href,\n \"string\" === typeof options.precedence\n ? options.precedence\n : void 0,\n {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority\n }\n )\n : \"script\" === as &&\n Internals.d.X(href, {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n };\n exports.preinitModule = function (href, options) {\n var encountered = \"\";\n (\"string\" === typeof href && href) ||\n (encountered +=\n \" The `href` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(href) +\n \".\");\n void 0 !== options && \"object\" !== typeof options\n ? (encountered +=\n \" The `options` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options) +\n \".\")\n : options &&\n \"as\" in options &&\n \"script\" !== options.as &&\n (encountered +=\n \" The `as` option encountered was \" +\n getValueDescriptorExpectingEnumForWarning(options.as) +\n \".\");\n if (encountered)\n console.error(\n \"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s\",\n encountered\n );\n else\n switch (\n ((encountered =\n options && \"string\" === typeof options.as ? options.as : \"script\"),\n encountered)\n ) {\n case \"script\":\n break;\n default:\n (encountered =\n getValueDescriptorExpectingEnumForWarning(encountered)),\n console.error(\n 'ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\" but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',\n encountered,\n href\n );\n }\n if (\"string\" === typeof href)\n if (\"object\" === typeof options && null !== options) {\n if (null == options.as || \"script\" === options.as)\n (encountered = getCrossOriginStringAs(\n options.as,\n options.crossOrigin\n )),\n Internals.d.M(href, {\n crossOrigin: encountered,\n integrity:\n \"string\" === typeof options.integrity\n ? options.integrity\n : void 0,\n nonce:\n \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n } else null == options && Internals.d.M(href);\n };\n exports.preload = function (href, options) {\n var encountered = \"\";\n (\"string\" === typeof href && href) ||\n (encountered +=\n \" The `href` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(href) +\n \".\");\n null == options || \"object\" !== typeof options\n ? (encountered +=\n \" The `options` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options) +\n \".\")\n : (\"string\" === typeof options.as && options.as) ||\n (encountered +=\n \" The `as` option encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options.as) +\n \".\");\n encountered &&\n console.error(\n 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `` tag.%s',\n encountered\n );\n if (\n \"string\" === typeof href &&\n \"object\" === typeof options &&\n null !== options &&\n \"string\" === typeof options.as\n ) {\n encountered = options.as;\n var crossOrigin = getCrossOriginStringAs(\n encountered,\n options.crossOrigin\n );\n Internals.d.L(href, encountered, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n type: \"string\" === typeof options.type ? options.type : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0,\n referrerPolicy:\n \"string\" === typeof options.referrerPolicy\n ? options.referrerPolicy\n : void 0,\n imageSrcSet:\n \"string\" === typeof options.imageSrcSet\n ? options.imageSrcSet\n : void 0,\n imageSizes:\n \"string\" === typeof options.imageSizes\n ? options.imageSizes\n : void 0,\n media: \"string\" === typeof options.media ? options.media : void 0\n });\n }\n };\n exports.preloadModule = function (href, options) {\n var encountered = \"\";\n (\"string\" === typeof href && href) ||\n (encountered +=\n \" The `href` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(href) +\n \".\");\n void 0 !== options && \"object\" !== typeof options\n ? (encountered +=\n \" The `options` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options) +\n \".\")\n : options &&\n \"as\" in options &&\n \"string\" !== typeof options.as &&\n (encountered +=\n \" The `as` option encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options.as) +\n \".\");\n encountered &&\n console.error(\n 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `` tag.%s',\n encountered\n );\n \"string\" === typeof href &&\n (options\n ? ((encountered = getCrossOriginStringAs(\n options.as,\n options.crossOrigin\n )),\n Internals.d.m(href, {\n as:\n \"string\" === typeof options.as && \"script\" !== options.as\n ? options.as\n : void 0,\n crossOrigin: encountered,\n integrity:\n \"string\" === typeof options.integrity\n ? options.integrity\n : void 0\n }))\n : Internals.d.m(href));\n };\n exports.requestFormReset = function (form) {\n Internals.d.r(form);\n };\n exports.unstable_batchedUpdates = function (fn, a) {\n return fn(a);\n };\n exports.useFormState = function (action, initialState, permalink) {\n return resolveDispatcher().useFormState(action, initialState, permalink);\n };\n exports.useFormStatus = function () {\n return resolveDispatcher().useHostTransitionStatus();\n };\n exports.version = \"19.2.4\";\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n", "'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n"],
- "mappings": ";;;;;;;;AAAA;AAAA;AAAA;AAWA,KACG,WAAY;AACX,eAAS,OAAO;AAAA,MAAC;AACjB,eAAS,mBAAmB,OAAO;AACjC,eAAO,KAAK;AAAA,MACd;AACA,eAAS,eAAe,UAAU,eAAe,gBAAgB;AAC/D,YAAI,MACF,IAAI,UAAU,UAAU,WAAW,UAAU,CAAC,IAAI,UAAU,CAAC,IAAI;AACnE,YAAI;AACF,6BAAmB,GAAG;AACtB,cAAI,2BAA2B;AAAA,QACjC,SAAS,GAAG;AACV,qCAA2B;AAAA,QAC7B;AACA,qCACG,QAAQ;AAAA,UACP;AAAA,UACC,eAAe,OAAO,UACrB,OAAO,eACP,IAAI,OAAO,WAAW,KACtB,IAAI,YAAY,QAChB;AAAA,QACJ,GACA,mBAAmB,GAAG;AACxB,eAAO;AAAA,UACL,UAAU;AAAA,UACV,KAAK,QAAQ,MAAM,OAAO,KAAK;AAAA,UAC/B;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AACA,eAAS,uBAAuB,IAAI,OAAO;AACzC,YAAI,WAAW,GAAI,QAAO;AAC1B,YAAI,aAAa,OAAO;AACtB,iBAAO,sBAAsB,QAAQ,QAAQ;AAAA,MACjD;AACA,eAAS,4CAA4C,OAAO;AAC1D,eAAO,SAAS,QACZ,WACA,WAAW,QACT,gBACA,OAAO,QACL,oBACA,0BAA0B,OAAO,QAAQ;AAAA,MACnD;AACA,eAAS,0CAA0C,OAAO;AACxD,eAAO,SAAS,QACZ,WACA,WAAW,QACT,gBACA,OAAO,QACL,oBACA,aAAa,OAAO,QAClB,KAAK,UAAU,KAAK,IACpB,aAAa,OAAO,QAClB,MAAM,QAAQ,MACd,0BAA0B,OAAO,QAAQ;AAAA,MACvD;AACA,eAAS,oBAAoB;AAC3B,YAAI,aAAa,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,CAAC;AAAA,IACrE,GAAG;AAAA;AAAA;;;ACvaL;AAAA;AA8BA,QAAI,OAAuC;AAGzC,eAAS;AACT,aAAO,UAAU;AAAA,IACnB,OAAO;AACL,aAAO,UAAU;AAAA,IACnB;AAAA;AAAA;",
- "names": []
-}
diff --git a/features/landing/frontend-standalone/.vite-cache/deps/chunk-DSCFE4L4.js b/features/landing/frontend-standalone/.vite-cache/deps/chunk-DSCFE4L4.js
deleted file mode 100644
index 8f303694b..000000000
--- a/features/landing/frontend-standalone/.vite-cache/deps/chunk-DSCFE4L4.js
+++ /dev/null
@@ -1,49 +0,0 @@
-var __create = Object.create;
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __getProtoOf = Object.getPrototypeOf;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __typeError = (msg) => {
- throw TypeError(msg);
-};
-var __esm = (fn, res) => function __init() {
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
-};
-var __commonJS = (cb, mod) => function __require() {
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
-};
-var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
-};
-var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
- // If the importer is in node compatibility mode or this is not an ESM
- // file that has been converted to a CommonJS file using a Babel-
- // compatible transform (i.e. "__esModule" has not been set), then set
- // "default" to the CommonJS "module.exports" for node compatibility.
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
- mod
-));
-var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
-var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
-var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
-var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
-
-export {
- __esm,
- __commonJS,
- __export,
- __toESM,
- __toCommonJS,
- __privateGet,
- __privateAdd
-};
diff --git a/features/landing/frontend-standalone/.vite-cache/deps/chunk-DSCFE4L4.js.map b/features/landing/frontend-standalone/.vite-cache/deps/chunk-DSCFE4L4.js.map
deleted file mode 100644
index 98652118b..000000000
--- a/features/landing/frontend-standalone/.vite-cache/deps/chunk-DSCFE4L4.js.map
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "version": 3,
- "sources": [],
- "sourcesContent": [],
- "mappings": "",
- "names": []
-}
diff --git a/features/landing/frontend-standalone/.vite-cache/deps/chunk-EK6WSQWS.js b/features/landing/frontend-standalone/.vite-cache/deps/chunk-EK6WSQWS.js
deleted file mode 100644
index 665f72c51..000000000
--- a/features/landing/frontend-standalone/.vite-cache/deps/chunk-EK6WSQWS.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import {
- init_development,
- init_dom_export
-} from "./chunk-OTAO74UU.js";
-
-// ../../../../node_modules/.bun/react-router-dom@7.13.0+bf16f8eded5e12ee/node_modules/react-router-dom/dist/index.mjs
-init_dom_export();
-init_development();
-//# sourceMappingURL=chunk-EK6WSQWS.js.map
diff --git a/features/landing/frontend-standalone/.vite-cache/deps/chunk-EK6WSQWS.js.map b/features/landing/frontend-standalone/.vite-cache/deps/chunk-EK6WSQWS.js.map
deleted file mode 100644
index b0ec190ee..000000000
--- a/features/landing/frontend-standalone/.vite-cache/deps/chunk-EK6WSQWS.js.map
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "version": 3,
- "sources": ["../../../../../../node_modules/.bun/react-router-dom@7.13.0+bf16f8eded5e12ee/node_modules/react-router-dom/dist/index.mjs"],
- "sourcesContent": ["/**\n * react-router-dom v7.13.0\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n\n// index.ts\nimport { HydratedRouter, RouterProvider } from \"react-router/dom\";\nexport * from \"react-router\";\nexport {\n HydratedRouter,\n RouterProvider\n};\n"],
- "mappings": ";;;;;;AAYA;AACA;",
- "names": []
-}
diff --git a/features/landing/frontend-standalone/.vite-cache/deps/chunk-GVT3TYT3.js b/features/landing/frontend-standalone/.vite-cache/deps/chunk-GVT3TYT3.js
deleted file mode 100644
index f6a24e9e3..000000000
--- a/features/landing/frontend-standalone/.vite-cache/deps/chunk-GVT3TYT3.js
+++ /dev/null
@@ -1,3669 +0,0 @@
-import {
- require_jsx_runtime
-} from "./chunk-SF3ICQTZ.js";
-import {
- require_react
-} from "./chunk-7Y3UKPDW.js";
-import {
- __toESM
-} from "./chunk-DSCFE4L4.js";
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/subscribable.js
-var Subscribable = class {
- constructor() {
- this.listeners = /* @__PURE__ */ new Set();
- this.subscribe = this.subscribe.bind(this);
- }
- subscribe(listener) {
- this.listeners.add(listener);
- this.onSubscribe();
- return () => {
- this.listeners.delete(listener);
- this.onUnsubscribe();
- };
- }
- hasListeners() {
- return this.listeners.size > 0;
- }
- onSubscribe() {
- }
- onUnsubscribe() {
- }
-};
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/timeoutManager.js
-var defaultTimeoutProvider = {
- // We need the wrapper function syntax below instead of direct references to
- // global setTimeout etc.
- //
- // BAD: `setTimeout: setTimeout`
- // GOOD: `setTimeout: (cb, delay) => setTimeout(cb, delay)`
- //
- // If we use direct references here, then anything that wants to spy on or
- // replace the global setTimeout (like tests) won't work since we'll already
- // have a hard reference to the original implementation at the time when this
- // file was imported.
- setTimeout: (callback, delay) => setTimeout(callback, delay),
- clearTimeout: (timeoutId) => clearTimeout(timeoutId),
- setInterval: (callback, delay) => setInterval(callback, delay),
- clearInterval: (intervalId) => clearInterval(intervalId)
-};
-var TimeoutManager = class {
- // We cannot have TimeoutManager as we must instantiate it with a concrete
- // type at app boot; and if we leave that type, then any new timer provider
- // would need to support ReturnType, which is infeasible.
- //
- // We settle for type safety for the TimeoutProvider type, and accept that
- // this class is unsafe internally to allow for extension.
- #provider = defaultTimeoutProvider;
- #providerCalled = false;
- setTimeoutProvider(provider) {
- if (true) {
- if (this.#providerCalled && provider !== this.#provider) {
- console.error(
- `[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,
- { previous: this.#provider, provider }
- );
- }
- }
- this.#provider = provider;
- if (true) {
- this.#providerCalled = false;
- }
- }
- setTimeout(callback, delay) {
- if (true) {
- this.#providerCalled = true;
- }
- return this.#provider.setTimeout(callback, delay);
- }
- clearTimeout(timeoutId) {
- this.#provider.clearTimeout(timeoutId);
- }
- setInterval(callback, delay) {
- if (true) {
- this.#providerCalled = true;
- }
- return this.#provider.setInterval(callback, delay);
- }
- clearInterval(intervalId) {
- this.#provider.clearInterval(intervalId);
- }
-};
-var timeoutManager = new TimeoutManager();
-function systemSetTimeoutZero(callback) {
- setTimeout(callback, 0);
-}
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/utils.js
-var isServer = typeof window === "undefined" || "Deno" in globalThis;
-function noop() {
-}
-function functionalUpdate(updater, input) {
- return typeof updater === "function" ? updater(input) : updater;
-}
-function isValidTimeout(value) {
- return typeof value === "number" && value >= 0 && value !== Infinity;
-}
-function timeUntilStale(updatedAt, staleTime) {
- return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
-}
-function resolveStaleTime(staleTime, query) {
- return typeof staleTime === "function" ? staleTime(query) : staleTime;
-}
-function resolveEnabled(enabled, query) {
- return typeof enabled === "function" ? enabled(query) : enabled;
-}
-function matchQuery(filters, query) {
- const {
- type = "all",
- exact,
- fetchStatus,
- predicate,
- queryKey,
- stale
- } = filters;
- if (queryKey) {
- if (exact) {
- if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {
- return false;
- }
- } else if (!partialMatchKey(query.queryKey, queryKey)) {
- return false;
- }
- }
- if (type !== "all") {
- const isActive = query.isActive();
- if (type === "active" && !isActive) {
- return false;
- }
- if (type === "inactive" && isActive) {
- return false;
- }
- }
- if (typeof stale === "boolean" && query.isStale() !== stale) {
- return false;
- }
- if (fetchStatus && fetchStatus !== query.state.fetchStatus) {
- return false;
- }
- if (predicate && !predicate(query)) {
- return false;
- }
- return true;
-}
-function matchMutation(filters, mutation) {
- const { exact, status, predicate, mutationKey } = filters;
- if (mutationKey) {
- if (!mutation.options.mutationKey) {
- return false;
- }
- if (exact) {
- if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {
- return false;
- }
- } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {
- return false;
- }
- }
- if (status && mutation.state.status !== status) {
- return false;
- }
- if (predicate && !predicate(mutation)) {
- return false;
- }
- return true;
-}
-function hashQueryKeyByOptions(queryKey, options) {
- const hashFn = options?.queryKeyHashFn || hashKey;
- return hashFn(queryKey);
-}
-function hashKey(queryKey) {
- return JSON.stringify(
- queryKey,
- (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {
- result[key] = val[key];
- return result;
- }, {}) : val
- );
-}
-function partialMatchKey(a, b) {
- if (a === b) {
- return true;
- }
- if (typeof a !== typeof b) {
- return false;
- }
- if (a && b && typeof a === "object" && typeof b === "object") {
- return Object.keys(b).every((key) => partialMatchKey(a[key], b[key]));
- }
- return false;
-}
-var hasOwn = Object.prototype.hasOwnProperty;
-function replaceEqualDeep(a, b, depth = 0) {
- if (a === b) {
- return a;
- }
- if (depth > 500) return b;
- const array = isPlainArray(a) && isPlainArray(b);
- if (!array && !(isPlainObject(a) && isPlainObject(b))) return b;
- const aItems = array ? a : Object.keys(a);
- const aSize = aItems.length;
- const bItems = array ? b : Object.keys(b);
- const bSize = bItems.length;
- const copy = array ? new Array(bSize) : {};
- let equalItems = 0;
- for (let i = 0; i < bSize; i++) {
- const key = array ? i : bItems[i];
- const aItem = a[key];
- const bItem = b[key];
- if (aItem === bItem) {
- copy[key] = aItem;
- if (array ? i < aSize : hasOwn.call(a, key)) equalItems++;
- continue;
- }
- if (aItem === null || bItem === null || typeof aItem !== "object" || typeof bItem !== "object") {
- copy[key] = bItem;
- continue;
- }
- const v = replaceEqualDeep(aItem, bItem, depth + 1);
- copy[key] = v;
- if (v === aItem) equalItems++;
- }
- return aSize === bSize && equalItems === aSize ? a : copy;
-}
-function shallowEqualObjects(a, b) {
- if (!b || Object.keys(a).length !== Object.keys(b).length) {
- return false;
- }
- for (const key in a) {
- if (a[key] !== b[key]) {
- return false;
- }
- }
- return true;
-}
-function isPlainArray(value) {
- return Array.isArray(value) && value.length === Object.keys(value).length;
-}
-function isPlainObject(o) {
- if (!hasObjectPrototype(o)) {
- return false;
- }
- const ctor = o.constructor;
- if (ctor === void 0) {
- return true;
- }
- const prot = ctor.prototype;
- if (!hasObjectPrototype(prot)) {
- return false;
- }
- if (!prot.hasOwnProperty("isPrototypeOf")) {
- return false;
- }
- if (Object.getPrototypeOf(o) !== Object.prototype) {
- return false;
- }
- return true;
-}
-function hasObjectPrototype(o) {
- return Object.prototype.toString.call(o) === "[object Object]";
-}
-function sleep(timeout) {
- return new Promise((resolve) => {
- timeoutManager.setTimeout(resolve, timeout);
- });
-}
-function replaceData(prevData, data, options) {
- if (typeof options.structuralSharing === "function") {
- return options.structuralSharing(prevData, data);
- } else if (options.structuralSharing !== false) {
- if (true) {
- try {
- return replaceEqualDeep(prevData, data);
- } catch (error) {
- console.error(
- `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`
- );
- throw error;
- }
- }
- return replaceEqualDeep(prevData, data);
- }
- return data;
-}
-function keepPreviousData(previousData) {
- return previousData;
-}
-function addToEnd(items, item, max = 0) {
- const newItems = [...items, item];
- return max && newItems.length > max ? newItems.slice(1) : newItems;
-}
-function addToStart(items, item, max = 0) {
- const newItems = [item, ...items];
- return max && newItems.length > max ? newItems.slice(0, -1) : newItems;
-}
-var skipToken = /* @__PURE__ */ Symbol();
-function ensureQueryFn(options, fetchOptions) {
- if (true) {
- if (options.queryFn === skipToken) {
- console.error(
- `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`
- );
- }
- }
- if (!options.queryFn && fetchOptions?.initialPromise) {
- return () => fetchOptions.initialPromise;
- }
- if (!options.queryFn || options.queryFn === skipToken) {
- return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));
- }
- return options.queryFn;
-}
-function shouldThrowError(throwOnError, params) {
- if (typeof throwOnError === "function") {
- return throwOnError(...params);
- }
- return !!throwOnError;
-}
-function addConsumeAwareSignal(object, getSignal, onCancelled) {
- let consumed = false;
- let signal;
- Object.defineProperty(object, "signal", {
- enumerable: true,
- get: () => {
- signal ??= getSignal();
- if (consumed) {
- return signal;
- }
- consumed = true;
- if (signal.aborted) {
- onCancelled();
- } else {
- signal.addEventListener("abort", onCancelled, { once: true });
- }
- return signal;
- }
- });
- return object;
-}
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/focusManager.js
-var FocusManager = class extends Subscribable {
- #focused;
- #cleanup;
- #setup;
- constructor() {
- super();
- this.#setup = (onFocus) => {
- if (!isServer && window.addEventListener) {
- const listener = () => onFocus();
- window.addEventListener("visibilitychange", listener, false);
- return () => {
- window.removeEventListener("visibilitychange", listener);
- };
- }
- return;
- };
- }
- onSubscribe() {
- if (!this.#cleanup) {
- this.setEventListener(this.#setup);
- }
- }
- onUnsubscribe() {
- if (!this.hasListeners()) {
- this.#cleanup?.();
- this.#cleanup = void 0;
- }
- }
- setEventListener(setup) {
- this.#setup = setup;
- this.#cleanup?.();
- this.#cleanup = setup((focused) => {
- if (typeof focused === "boolean") {
- this.setFocused(focused);
- } else {
- this.onFocus();
- }
- });
- }
- setFocused(focused) {
- const changed = this.#focused !== focused;
- if (changed) {
- this.#focused = focused;
- this.onFocus();
- }
- }
- onFocus() {
- const isFocused = this.isFocused();
- this.listeners.forEach((listener) => {
- listener(isFocused);
- });
- }
- isFocused() {
- if (typeof this.#focused === "boolean") {
- return this.#focused;
- }
- return globalThis.document?.visibilityState !== "hidden";
- }
-};
-var focusManager = new FocusManager();
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/thenable.js
-function pendingThenable() {
- let resolve;
- let reject;
- const thenable = new Promise((_resolve, _reject) => {
- resolve = _resolve;
- reject = _reject;
- });
- thenable.status = "pending";
- thenable.catch(() => {
- });
- function finalize(data) {
- Object.assign(thenable, data);
- delete thenable.resolve;
- delete thenable.reject;
- }
- thenable.resolve = (value) => {
- finalize({
- status: "fulfilled",
- value
- });
- resolve(value);
- };
- thenable.reject = (reason) => {
- finalize({
- status: "rejected",
- reason
- });
- reject(reason);
- };
- return thenable;
-}
-function tryResolveSync(promise) {
- let data;
- promise.then((result) => {
- data = result;
- return result;
- }, noop)?.catch(noop);
- if (data !== void 0) {
- return { data };
- }
- return void 0;
-}
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/hydration.js
-function defaultTransformerFn(data) {
- return data;
-}
-function dehydrateMutation(mutation) {
- return {
- mutationKey: mutation.options.mutationKey,
- state: mutation.state,
- ...mutation.options.scope && { scope: mutation.options.scope },
- ...mutation.meta && { meta: mutation.meta }
- };
-}
-function dehydrateQuery(query, serializeData, shouldRedactErrors) {
- const dehydratePromise = () => {
- const promise = query.promise?.then(serializeData).catch((error) => {
- if (!shouldRedactErrors(error)) {
- return Promise.reject(error);
- }
- if (true) {
- console.error(
- `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`
- );
- }
- return Promise.reject(new Error("redacted"));
- });
- promise?.catch(noop);
- return promise;
- };
- return {
- dehydratedAt: Date.now(),
- state: {
- ...query.state,
- ...query.state.data !== void 0 && {
- data: serializeData(query.state.data)
- }
- },
- queryKey: query.queryKey,
- queryHash: query.queryHash,
- ...query.state.status === "pending" && {
- promise: dehydratePromise()
- },
- ...query.meta && { meta: query.meta }
- };
-}
-function defaultShouldDehydrateMutation(mutation) {
- return mutation.state.isPaused;
-}
-function defaultShouldDehydrateQuery(query) {
- return query.state.status === "success";
-}
-function defaultShouldRedactErrors(_) {
- return true;
-}
-function dehydrate(client, options = {}) {
- const filterMutation = options.shouldDehydrateMutation ?? client.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;
- const mutations = client.getMutationCache().getAll().flatMap(
- (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []
- );
- const filterQuery = options.shouldDehydrateQuery ?? client.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;
- const shouldRedactErrors = options.shouldRedactErrors ?? client.getDefaultOptions().dehydrate?.shouldRedactErrors ?? defaultShouldRedactErrors;
- const serializeData = options.serializeData ?? client.getDefaultOptions().dehydrate?.serializeData ?? defaultTransformerFn;
- const queries = client.getQueryCache().getAll().flatMap(
- (query) => filterQuery(query) ? [dehydrateQuery(query, serializeData, shouldRedactErrors)] : []
- );
- return { mutations, queries };
-}
-function hydrate(client, dehydratedState, options) {
- if (typeof dehydratedState !== "object" || dehydratedState === null) {
- return;
- }
- const mutationCache = client.getMutationCache();
- const queryCache = client.getQueryCache();
- const deserializeData = options?.defaultOptions?.deserializeData ?? client.getDefaultOptions().hydrate?.deserializeData ?? defaultTransformerFn;
- const mutations = dehydratedState.mutations || [];
- const queries = dehydratedState.queries || [];
- mutations.forEach(({ state, ...mutationOptions2 }) => {
- mutationCache.build(
- client,
- {
- ...client.getDefaultOptions().hydrate?.mutations,
- ...options?.defaultOptions?.mutations,
- ...mutationOptions2
- },
- state
- );
- });
- queries.forEach(
- ({ queryKey, state, queryHash, meta, promise, dehydratedAt }) => {
- const syncData = promise ? tryResolveSync(promise) : void 0;
- const rawData = state.data === void 0 ? syncData?.data : state.data;
- const data = rawData === void 0 ? rawData : deserializeData(rawData);
- let query = queryCache.get(queryHash);
- const existingQueryIsPending = query?.state.status === "pending";
- const existingQueryIsFetching = query?.state.fetchStatus === "fetching";
- if (query) {
- const hasNewerSyncData = syncData && // We only need this undefined check to handle older dehydration
- // payloads that might not have dehydratedAt
- dehydratedAt !== void 0 && dehydratedAt > query.state.dataUpdatedAt;
- if (state.dataUpdatedAt > query.state.dataUpdatedAt || hasNewerSyncData) {
- const { fetchStatus: _ignored, ...serializedState } = state;
- query.setState({
- ...serializedState,
- data
- });
- }
- } else {
- query = queryCache.build(
- client,
- {
- ...client.getDefaultOptions().hydrate?.queries,
- ...options?.defaultOptions?.queries,
- queryKey,
- queryHash,
- meta
- },
- // Reset fetch status to idle to avoid
- // query being stuck in fetching state upon hydration
- {
- ...state,
- data,
- fetchStatus: "idle",
- status: data !== void 0 ? "success" : state.status
- }
- );
- }
- if (promise && !existingQueryIsPending && !existingQueryIsFetching && // Only hydrate if dehydration is newer than any existing data,
- // this is always true for new queries
- (dehydratedAt === void 0 || dehydratedAt > query.state.dataUpdatedAt)) {
- query.fetch(void 0, {
- // RSC transformed promises are not thenable
- initialPromise: Promise.resolve(promise).then(deserializeData)
- }).catch(noop);
- }
- }
- );
-}
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/notifyManager.js
-var defaultScheduler = systemSetTimeoutZero;
-function createNotifyManager() {
- let queue = [];
- let transactions = 0;
- let notifyFn = (callback) => {
- callback();
- };
- let batchNotifyFn = (callback) => {
- callback();
- };
- let scheduleFn = defaultScheduler;
- const schedule = (callback) => {
- if (transactions) {
- queue.push(callback);
- } else {
- scheduleFn(() => {
- notifyFn(callback);
- });
- }
- };
- const flush = () => {
- const originalQueue = queue;
- queue = [];
- if (originalQueue.length) {
- scheduleFn(() => {
- batchNotifyFn(() => {
- originalQueue.forEach((callback) => {
- notifyFn(callback);
- });
- });
- });
- }
- };
- return {
- batch: (callback) => {
- let result;
- transactions++;
- try {
- result = callback();
- } finally {
- transactions--;
- if (!transactions) {
- flush();
- }
- }
- return result;
- },
- /**
- * All calls to the wrapped function will be batched.
- */
- batchCalls: (callback) => {
- return (...args) => {
- schedule(() => {
- callback(...args);
- });
- };
- },
- schedule,
- /**
- * Use this method to set a custom notify function.
- * This can be used to for example wrap notifications with `React.act` while running tests.
- */
- setNotifyFunction: (fn) => {
- notifyFn = fn;
- },
- /**
- * Use this method to set a custom function to batch notifications together into a single tick.
- * By default React Query will use the batch function provided by ReactDOM or React Native.
- */
- setBatchNotifyFunction: (fn) => {
- batchNotifyFn = fn;
- },
- setScheduler: (fn) => {
- scheduleFn = fn;
- }
- };
-}
-var notifyManager = createNotifyManager();
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/onlineManager.js
-var OnlineManager = class extends Subscribable {
- #online = true;
- #cleanup;
- #setup;
- constructor() {
- super();
- this.#setup = (onOnline) => {
- if (!isServer && window.addEventListener) {
- const onlineListener = () => onOnline(true);
- const offlineListener = () => onOnline(false);
- window.addEventListener("online", onlineListener, false);
- window.addEventListener("offline", offlineListener, false);
- return () => {
- window.removeEventListener("online", onlineListener);
- window.removeEventListener("offline", offlineListener);
- };
- }
- return;
- };
- }
- onSubscribe() {
- if (!this.#cleanup) {
- this.setEventListener(this.#setup);
- }
- }
- onUnsubscribe() {
- if (!this.hasListeners()) {
- this.#cleanup?.();
- this.#cleanup = void 0;
- }
- }
- setEventListener(setup) {
- this.#setup = setup;
- this.#cleanup?.();
- this.#cleanup = setup(this.setOnline.bind(this));
- }
- setOnline(online) {
- const changed = this.#online !== online;
- if (changed) {
- this.#online = online;
- this.listeners.forEach((listener) => {
- listener(online);
- });
- }
- }
- isOnline() {
- return this.#online;
- }
-};
-var onlineManager = new OnlineManager();
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/retryer.js
-function defaultRetryDelay(failureCount) {
- return Math.min(1e3 * 2 ** failureCount, 3e4);
-}
-function canFetch(networkMode) {
- return (networkMode ?? "online") === "online" ? onlineManager.isOnline() : true;
-}
-var CancelledError = class extends Error {
- constructor(options) {
- super("CancelledError");
- this.revert = options?.revert;
- this.silent = options?.silent;
- }
-};
-function isCancelledError(value) {
- return value instanceof CancelledError;
-}
-function createRetryer(config) {
- let isRetryCancelled = false;
- let failureCount = 0;
- let continueFn;
- const thenable = pendingThenable();
- const isResolved = () => thenable.status !== "pending";
- const cancel = (cancelOptions) => {
- if (!isResolved()) {
- const error = new CancelledError(cancelOptions);
- reject(error);
- config.onCancel?.(error);
- }
- };
- const cancelRetry = () => {
- isRetryCancelled = true;
- };
- const continueRetry = () => {
- isRetryCancelled = false;
- };
- const canContinue = () => focusManager.isFocused() && (config.networkMode === "always" || onlineManager.isOnline()) && config.canRun();
- const canStart = () => canFetch(config.networkMode) && config.canRun();
- const resolve = (value) => {
- if (!isResolved()) {
- continueFn?.();
- thenable.resolve(value);
- }
- };
- const reject = (value) => {
- if (!isResolved()) {
- continueFn?.();
- thenable.reject(value);
- }
- };
- const pause = () => {
- return new Promise((continueResolve) => {
- continueFn = (value) => {
- if (isResolved() || canContinue()) {
- continueResolve(value);
- }
- };
- config.onPause?.();
- }).then(() => {
- continueFn = void 0;
- if (!isResolved()) {
- config.onContinue?.();
- }
- });
- };
- const run = () => {
- if (isResolved()) {
- return;
- }
- let promiseOrValue;
- const initialPromise = failureCount === 0 ? config.initialPromise : void 0;
- try {
- promiseOrValue = initialPromise ?? config.fn();
- } catch (error) {
- promiseOrValue = Promise.reject(error);
- }
- Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
- if (isResolved()) {
- return;
- }
- const retry = config.retry ?? (isServer ? 0 : 3);
- const retryDelay = config.retryDelay ?? defaultRetryDelay;
- const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
- const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
- if (isRetryCancelled || !shouldRetry) {
- reject(error);
- return;
- }
- failureCount++;
- config.onFail?.(failureCount, error);
- sleep(delay).then(() => {
- return canContinue() ? void 0 : pause();
- }).then(() => {
- if (isRetryCancelled) {
- reject(error);
- } else {
- run();
- }
- });
- });
- };
- return {
- promise: thenable,
- status: () => thenable.status,
- cancel,
- continue: () => {
- continueFn?.();
- return thenable;
- },
- cancelRetry,
- continueRetry,
- canStart,
- start: () => {
- if (canStart()) {
- run();
- } else {
- pause().then(run);
- }
- return thenable;
- }
- };
-}
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/removable.js
-var Removable = class {
- #gcTimeout;
- destroy() {
- this.clearGcTimeout();
- }
- scheduleGc() {
- this.clearGcTimeout();
- if (isValidTimeout(this.gcTime)) {
- this.#gcTimeout = timeoutManager.setTimeout(() => {
- this.optionalRemove();
- }, this.gcTime);
- }
- }
- updateGcTime(newGcTime) {
- this.gcTime = Math.max(
- this.gcTime || 0,
- newGcTime ?? (isServer ? Infinity : 5 * 60 * 1e3)
- );
- }
- clearGcTimeout() {
- if (this.#gcTimeout) {
- timeoutManager.clearTimeout(this.#gcTimeout);
- this.#gcTimeout = void 0;
- }
- }
-};
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/query.js
-var Query = class extends Removable {
- #initialState;
- #revertState;
- #cache;
- #client;
- #retryer;
- #defaultOptions;
- #abortSignalConsumed;
- constructor(config) {
- super();
- this.#abortSignalConsumed = false;
- this.#defaultOptions = config.defaultOptions;
- this.setOptions(config.options);
- this.observers = [];
- this.#client = config.client;
- this.#cache = this.#client.getQueryCache();
- this.queryKey = config.queryKey;
- this.queryHash = config.queryHash;
- this.#initialState = getDefaultState(this.options);
- this.state = config.state ?? this.#initialState;
- this.scheduleGc();
- }
- get meta() {
- return this.options.meta;
- }
- get promise() {
- return this.#retryer?.promise;
- }
- setOptions(options) {
- this.options = { ...this.#defaultOptions, ...options };
- this.updateGcTime(this.options.gcTime);
- if (this.state && this.state.data === void 0) {
- const defaultState = getDefaultState(this.options);
- if (defaultState.data !== void 0) {
- this.setState(
- successState(defaultState.data, defaultState.dataUpdatedAt)
- );
- this.#initialState = defaultState;
- }
- }
- }
- optionalRemove() {
- if (!this.observers.length && this.state.fetchStatus === "idle") {
- this.#cache.remove(this);
- }
- }
- setData(newData, options) {
- const data = replaceData(this.state.data, newData, this.options);
- this.#dispatch({
- data,
- type: "success",
- dataUpdatedAt: options?.updatedAt,
- manual: options?.manual
- });
- return data;
- }
- setState(state, setStateOptions) {
- this.#dispatch({ type: "setState", state, setStateOptions });
- }
- cancel(options) {
- const promise = this.#retryer?.promise;
- this.#retryer?.cancel(options);
- return promise ? promise.then(noop).catch(noop) : Promise.resolve();
- }
- destroy() {
- super.destroy();
- this.cancel({ silent: true });
- }
- reset() {
- this.destroy();
- this.setState(this.#initialState);
- }
- isActive() {
- return this.observers.some(
- (observer) => resolveEnabled(observer.options.enabled, this) !== false
- );
- }
- isDisabled() {
- if (this.getObserversCount() > 0) {
- return !this.isActive();
- }
- return this.options.queryFn === skipToken || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
- }
- isStatic() {
- if (this.getObserversCount() > 0) {
- return this.observers.some(
- (observer) => resolveStaleTime(observer.options.staleTime, this) === "static"
- );
- }
- return false;
- }
- isStale() {
- if (this.getObserversCount() > 0) {
- return this.observers.some(
- (observer) => observer.getCurrentResult().isStale
- );
- }
- return this.state.data === void 0 || this.state.isInvalidated;
- }
- isStaleByTime(staleTime = 0) {
- if (this.state.data === void 0) {
- return true;
- }
- if (staleTime === "static") {
- return false;
- }
- if (this.state.isInvalidated) {
- return true;
- }
- return !timeUntilStale(this.state.dataUpdatedAt, staleTime);
- }
- onFocus() {
- const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus());
- observer?.refetch({ cancelRefetch: false });
- this.#retryer?.continue();
- }
- onOnline() {
- const observer = this.observers.find((x) => x.shouldFetchOnReconnect());
- observer?.refetch({ cancelRefetch: false });
- this.#retryer?.continue();
- }
- addObserver(observer) {
- if (!this.observers.includes(observer)) {
- this.observers.push(observer);
- this.clearGcTimeout();
- this.#cache.notify({ type: "observerAdded", query: this, observer });
- }
- }
- removeObserver(observer) {
- if (this.observers.includes(observer)) {
- this.observers = this.observers.filter((x) => x !== observer);
- if (!this.observers.length) {
- if (this.#retryer) {
- if (this.#abortSignalConsumed) {
- this.#retryer.cancel({ revert: true });
- } else {
- this.#retryer.cancelRetry();
- }
- }
- this.scheduleGc();
- }
- this.#cache.notify({ type: "observerRemoved", query: this, observer });
- }
- }
- getObserversCount() {
- return this.observers.length;
- }
- invalidate() {
- if (!this.state.isInvalidated) {
- this.#dispatch({ type: "invalidate" });
- }
- }
- async fetch(options, fetchOptions) {
- if (this.state.fetchStatus !== "idle" && // If the promise in the retryer is already rejected, we have to definitely
- // re-start the fetch; there is a chance that the query is still in a
- // pending state when that happens
- this.#retryer?.status() !== "rejected") {
- if (this.state.data !== void 0 && fetchOptions?.cancelRefetch) {
- this.cancel({ silent: true });
- } else if (this.#retryer) {
- this.#retryer.continueRetry();
- return this.#retryer.promise;
- }
- }
- if (options) {
- this.setOptions(options);
- }
- if (!this.options.queryFn) {
- const observer = this.observers.find((x) => x.options.queryFn);
- if (observer) {
- this.setOptions(observer.options);
- }
- }
- if (true) {
- if (!Array.isArray(this.options.queryKey)) {
- console.error(
- `As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`
- );
- }
- }
- const abortController = new AbortController();
- const addSignalProperty = (object) => {
- Object.defineProperty(object, "signal", {
- enumerable: true,
- get: () => {
- this.#abortSignalConsumed = true;
- return abortController.signal;
- }
- });
- };
- const fetchFn = () => {
- const queryFn = ensureQueryFn(this.options, fetchOptions);
- const createQueryFnContext = () => {
- const queryFnContext2 = {
- client: this.#client,
- queryKey: this.queryKey,
- meta: this.meta
- };
- addSignalProperty(queryFnContext2);
- return queryFnContext2;
- };
- const queryFnContext = createQueryFnContext();
- this.#abortSignalConsumed = false;
- if (this.options.persister) {
- return this.options.persister(
- queryFn,
- queryFnContext,
- this
- );
- }
- return queryFn(queryFnContext);
- };
- const createFetchContext = () => {
- const context2 = {
- fetchOptions,
- options: this.options,
- queryKey: this.queryKey,
- client: this.#client,
- state: this.state,
- fetchFn
- };
- addSignalProperty(context2);
- return context2;
- };
- const context = createFetchContext();
- this.options.behavior?.onFetch(context, this);
- this.#revertState = this.state;
- if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== context.fetchOptions?.meta) {
- this.#dispatch({ type: "fetch", meta: context.fetchOptions?.meta });
- }
- this.#retryer = createRetryer({
- initialPromise: fetchOptions?.initialPromise,
- fn: context.fetchFn,
- onCancel: (error) => {
- if (error instanceof CancelledError && error.revert) {
- this.setState({
- ...this.#revertState,
- fetchStatus: "idle"
- });
- }
- abortController.abort();
- },
- onFail: (failureCount, error) => {
- this.#dispatch({ type: "failed", failureCount, error });
- },
- onPause: () => {
- this.#dispatch({ type: "pause" });
- },
- onContinue: () => {
- this.#dispatch({ type: "continue" });
- },
- retry: context.options.retry,
- retryDelay: context.options.retryDelay,
- networkMode: context.options.networkMode,
- canRun: () => true
- });
- try {
- const data = await this.#retryer.start();
- if (data === void 0) {
- if (true) {
- console.error(
- `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
- );
- }
- throw new Error(`${this.queryHash} data is undefined`);
- }
- this.setData(data);
- this.#cache.config.onSuccess?.(data, this);
- this.#cache.config.onSettled?.(
- data,
- this.state.error,
- this
- );
- return data;
- } catch (error) {
- if (error instanceof CancelledError) {
- if (error.silent) {
- return this.#retryer.promise;
- } else if (error.revert) {
- if (this.state.data === void 0) {
- throw error;
- }
- return this.state.data;
- }
- }
- this.#dispatch({
- type: "error",
- error
- });
- this.#cache.config.onError?.(
- error,
- this
- );
- this.#cache.config.onSettled?.(
- this.state.data,
- error,
- this
- );
- throw error;
- } finally {
- this.scheduleGc();
- }
- }
- #dispatch(action) {
- const reducer = (state) => {
- switch (action.type) {
- case "failed":
- return {
- ...state,
- fetchFailureCount: action.failureCount,
- fetchFailureReason: action.error
- };
- case "pause":
- return {
- ...state,
- fetchStatus: "paused"
- };
- case "continue":
- return {
- ...state,
- fetchStatus: "fetching"
- };
- case "fetch":
- return {
- ...state,
- ...fetchState(state.data, this.options),
- fetchMeta: action.meta ?? null
- };
- case "success":
- const newState = {
- ...state,
- ...successState(action.data, action.dataUpdatedAt),
- dataUpdateCount: state.dataUpdateCount + 1,
- ...!action.manual && {
- fetchStatus: "idle",
- fetchFailureCount: 0,
- fetchFailureReason: null
- }
- };
- this.#revertState = action.manual ? newState : void 0;
- return newState;
- case "error":
- const error = action.error;
- return {
- ...state,
- error,
- errorUpdateCount: state.errorUpdateCount + 1,
- errorUpdatedAt: Date.now(),
- fetchFailureCount: state.fetchFailureCount + 1,
- fetchFailureReason: error,
- fetchStatus: "idle",
- status: "error",
- // flag existing data as invalidated if we get a background error
- // note that "no data" always means stale so we can set unconditionally here
- isInvalidated: true
- };
- case "invalidate":
- return {
- ...state,
- isInvalidated: true
- };
- case "setState":
- return {
- ...state,
- ...action.state
- };
- }
- };
- this.state = reducer(this.state);
- notifyManager.batch(() => {
- this.observers.forEach((observer) => {
- observer.onQueryUpdate();
- });
- this.#cache.notify({ query: this, type: "updated", action });
- });
- }
-};
-function fetchState(data, options) {
- return {
- fetchFailureCount: 0,
- fetchFailureReason: null,
- fetchStatus: canFetch(options.networkMode) ? "fetching" : "paused",
- ...data === void 0 && {
- error: null,
- status: "pending"
- }
- };
-}
-function successState(data, dataUpdatedAt) {
- return {
- data,
- dataUpdatedAt: dataUpdatedAt ?? Date.now(),
- error: null,
- isInvalidated: false,
- status: "success"
- };
-}
-function getDefaultState(options) {
- const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
- const hasData = data !== void 0;
- const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;
- return {
- data,
- dataUpdateCount: 0,
- dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,
- error: null,
- errorUpdateCount: 0,
- errorUpdatedAt: 0,
- fetchFailureCount: 0,
- fetchFailureReason: null,
- fetchMeta: null,
- isInvalidated: false,
- status: hasData ? "success" : "pending",
- fetchStatus: "idle"
- };
-}
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/queryObserver.js
-var QueryObserver = class extends Subscribable {
- constructor(client, options) {
- super();
- this.options = options;
- this.#client = client;
- this.#selectError = null;
- this.#currentThenable = pendingThenable();
- this.bindMethods();
- this.setOptions(options);
- }
- #client;
- #currentQuery = void 0;
- #currentQueryInitialState = void 0;
- #currentResult = void 0;
- #currentResultState;
- #currentResultOptions;
- #currentThenable;
- #selectError;
- #selectFn;
- #selectResult;
- // This property keeps track of the last query with defined data.
- // It will be used to pass the previous data and query to the placeholder function between renders.
- #lastQueryWithDefinedData;
- #staleTimeoutId;
- #refetchIntervalId;
- #currentRefetchInterval;
- #trackedProps = /* @__PURE__ */ new Set();
- bindMethods() {
- this.refetch = this.refetch.bind(this);
- }
- onSubscribe() {
- if (this.listeners.size === 1) {
- this.#currentQuery.addObserver(this);
- if (shouldFetchOnMount(this.#currentQuery, this.options)) {
- this.#executeFetch();
- } else {
- this.updateResult();
- }
- this.#updateTimers();
- }
- }
- onUnsubscribe() {
- if (!this.hasListeners()) {
- this.destroy();
- }
- }
- shouldFetchOnReconnect() {
- return shouldFetchOn(
- this.#currentQuery,
- this.options,
- this.options.refetchOnReconnect
- );
- }
- shouldFetchOnWindowFocus() {
- return shouldFetchOn(
- this.#currentQuery,
- this.options,
- this.options.refetchOnWindowFocus
- );
- }
- destroy() {
- this.listeners = /* @__PURE__ */ new Set();
- this.#clearStaleTimeout();
- this.#clearRefetchInterval();
- this.#currentQuery.removeObserver(this);
- }
- setOptions(options) {
- const prevOptions = this.options;
- const prevQuery = this.#currentQuery;
- this.options = this.#client.defaultQueryOptions(options);
- if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof resolveEnabled(this.options.enabled, this.#currentQuery) !== "boolean") {
- throw new Error(
- "Expected enabled to be a boolean or a callback that returns a boolean"
- );
- }
- this.#updateQuery();
- this.#currentQuery.setOptions(this.options);
- if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) {
- this.#client.getQueryCache().notify({
- type: "observerOptionsUpdated",
- query: this.#currentQuery,
- observer: this
- });
- }
- const mounted = this.hasListeners();
- if (mounted && shouldFetchOptionally(
- this.#currentQuery,
- prevQuery,
- this.options,
- prevOptions
- )) {
- this.#executeFetch();
- }
- this.updateResult();
- if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || resolveStaleTime(this.options.staleTime, this.#currentQuery) !== resolveStaleTime(prevOptions.staleTime, this.#currentQuery))) {
- this.#updateStaleTimeout();
- }
- const nextRefetchInterval = this.#computeRefetchInterval();
- if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {
- this.#updateRefetchInterval(nextRefetchInterval);
- }
- }
- getOptimisticResult(options) {
- const query = this.#client.getQueryCache().build(this.#client, options);
- const result = this.createResult(query, options);
- if (shouldAssignObserverCurrentProperties(this, result)) {
- this.#currentResult = result;
- this.#currentResultOptions = this.options;
- this.#currentResultState = this.#currentQuery.state;
- }
- return result;
- }
- getCurrentResult() {
- return this.#currentResult;
- }
- trackResult(result, onPropTracked) {
- return new Proxy(result, {
- get: (target, key) => {
- this.trackProp(key);
- onPropTracked?.(key);
- if (key === "promise") {
- this.trackProp("data");
- if (!this.options.experimental_prefetchInRender && this.#currentThenable.status === "pending") {
- this.#currentThenable.reject(
- new Error(
- "experimental_prefetchInRender feature flag is not enabled"
- )
- );
- }
- }
- return Reflect.get(target, key);
- }
- });
- }
- trackProp(key) {
- this.#trackedProps.add(key);
- }
- getCurrentQuery() {
- return this.#currentQuery;
- }
- refetch({ ...options } = {}) {
- return this.fetch({
- ...options
- });
- }
- fetchOptimistic(options) {
- const defaultedOptions = this.#client.defaultQueryOptions(options);
- const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);
- return query.fetch().then(() => this.createResult(query, defaultedOptions));
- }
- fetch(fetchOptions) {
- return this.#executeFetch({
- ...fetchOptions,
- cancelRefetch: fetchOptions.cancelRefetch ?? true
- }).then(() => {
- this.updateResult();
- return this.#currentResult;
- });
- }
- #executeFetch(fetchOptions) {
- this.#updateQuery();
- let promise = this.#currentQuery.fetch(
- this.options,
- fetchOptions
- );
- if (!fetchOptions?.throwOnError) {
- promise = promise.catch(noop);
- }
- return promise;
- }
- #updateStaleTimeout() {
- this.#clearStaleTimeout();
- const staleTime = resolveStaleTime(
- this.options.staleTime,
- this.#currentQuery
- );
- if (isServer || this.#currentResult.isStale || !isValidTimeout(staleTime)) {
- return;
- }
- const time = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime);
- const timeout = time + 1;
- this.#staleTimeoutId = timeoutManager.setTimeout(() => {
- if (!this.#currentResult.isStale) {
- this.updateResult();
- }
- }, timeout);
- }
- #computeRefetchInterval() {
- return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;
- }
- #updateRefetchInterval(nextInterval) {
- this.#clearRefetchInterval();
- this.#currentRefetchInterval = nextInterval;
- if (isServer || resolveEnabled(this.options.enabled, this.#currentQuery) === false || !isValidTimeout(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
- return;
- }
- this.#refetchIntervalId = timeoutManager.setInterval(() => {
- if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {
- this.#executeFetch();
- }
- }, this.#currentRefetchInterval);
- }
- #updateTimers() {
- this.#updateStaleTimeout();
- this.#updateRefetchInterval(this.#computeRefetchInterval());
- }
- #clearStaleTimeout() {
- if (this.#staleTimeoutId) {
- timeoutManager.clearTimeout(this.#staleTimeoutId);
- this.#staleTimeoutId = void 0;
- }
- }
- #clearRefetchInterval() {
- if (this.#refetchIntervalId) {
- timeoutManager.clearInterval(this.#refetchIntervalId);
- this.#refetchIntervalId = void 0;
- }
- }
- createResult(query, options) {
- const prevQuery = this.#currentQuery;
- const prevOptions = this.options;
- const prevResult = this.#currentResult;
- const prevResultState = this.#currentResultState;
- const prevResultOptions = this.#currentResultOptions;
- const queryChange = query !== prevQuery;
- const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;
- const { state } = query;
- let newState = { ...state };
- let isPlaceholderData = false;
- let data;
- if (options._optimisticResults) {
- const mounted = this.hasListeners();
- const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
- const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
- if (fetchOnMount || fetchOptionally) {
- newState = {
- ...newState,
- ...fetchState(state.data, query.options)
- };
- }
- if (options._optimisticResults === "isRestoring") {
- newState.fetchStatus = "idle";
- }
- }
- let { error, errorUpdatedAt, status } = newState;
- data = newState.data;
- let skipSelect = false;
- if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
- let placeholderData;
- if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {
- placeholderData = prevResult.data;
- skipSelect = true;
- } else {
- placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
- this.#lastQueryWithDefinedData?.state.data,
- this.#lastQueryWithDefinedData
- ) : options.placeholderData;
- }
- if (placeholderData !== void 0) {
- status = "success";
- data = replaceData(
- prevResult?.data,
- placeholderData,
- options
- );
- isPlaceholderData = true;
- }
- }
- if (options.select && data !== void 0 && !skipSelect) {
- if (prevResult && data === prevResultState?.data && options.select === this.#selectFn) {
- data = this.#selectResult;
- } else {
- try {
- this.#selectFn = options.select;
- data = options.select(data);
- data = replaceData(prevResult?.data, data, options);
- this.#selectResult = data;
- this.#selectError = null;
- } catch (selectError) {
- this.#selectError = selectError;
- }
- }
- }
- if (this.#selectError) {
- error = this.#selectError;
- data = this.#selectResult;
- errorUpdatedAt = Date.now();
- status = "error";
- }
- const isFetching = newState.fetchStatus === "fetching";
- const isPending = status === "pending";
- const isError = status === "error";
- const isLoading = isPending && isFetching;
- const hasData = data !== void 0;
- const result = {
- status,
- fetchStatus: newState.fetchStatus,
- isPending,
- isSuccess: status === "success",
- isError,
- isInitialLoading: isLoading,
- isLoading,
- data,
- dataUpdatedAt: newState.dataUpdatedAt,
- error,
- errorUpdatedAt,
- failureCount: newState.fetchFailureCount,
- failureReason: newState.fetchFailureReason,
- errorUpdateCount: newState.errorUpdateCount,
- isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,
- isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
- isFetching,
- isRefetching: isFetching && !isPending,
- isLoadingError: isError && !hasData,
- isPaused: newState.fetchStatus === "paused",
- isPlaceholderData,
- isRefetchError: isError && hasData,
- isStale: isStale(query, options),
- refetch: this.refetch,
- promise: this.#currentThenable,
- isEnabled: resolveEnabled(options.enabled, query) !== false
- };
- const nextResult = result;
- if (this.options.experimental_prefetchInRender) {
- const hasResultData = nextResult.data !== void 0;
- const isErrorWithoutData = nextResult.status === "error" && !hasResultData;
- const finalizeThenableIfPossible = (thenable) => {
- if (isErrorWithoutData) {
- thenable.reject(nextResult.error);
- } else if (hasResultData) {
- thenable.resolve(nextResult.data);
- }
- };
- const recreateThenable = () => {
- const pending = this.#currentThenable = nextResult.promise = pendingThenable();
- finalizeThenableIfPossible(pending);
- };
- const prevThenable = this.#currentThenable;
- switch (prevThenable.status) {
- case "pending":
- if (query.queryHash === prevQuery.queryHash) {
- finalizeThenableIfPossible(prevThenable);
- }
- break;
- case "fulfilled":
- if (isErrorWithoutData || nextResult.data !== prevThenable.value) {
- recreateThenable();
- }
- break;
- case "rejected":
- if (!isErrorWithoutData || nextResult.error !== prevThenable.reason) {
- recreateThenable();
- }
- break;
- }
- }
- return nextResult;
- }
- updateResult() {
- const prevResult = this.#currentResult;
- const nextResult = this.createResult(this.#currentQuery, this.options);
- this.#currentResultState = this.#currentQuery.state;
- this.#currentResultOptions = this.options;
- if (this.#currentResultState.data !== void 0) {
- this.#lastQueryWithDefinedData = this.#currentQuery;
- }
- if (shallowEqualObjects(nextResult, prevResult)) {
- return;
- }
- this.#currentResult = nextResult;
- const shouldNotifyListeners = () => {
- if (!prevResult) {
- return true;
- }
- const { notifyOnChangeProps } = this.options;
- const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
- if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) {
- return true;
- }
- const includedProps = new Set(
- notifyOnChangePropsValue ?? this.#trackedProps
- );
- if (this.options.throwOnError) {
- includedProps.add("error");
- }
- return Object.keys(this.#currentResult).some((key) => {
- const typedKey = key;
- const changed = this.#currentResult[typedKey] !== prevResult[typedKey];
- return changed && includedProps.has(typedKey);
- });
- };
- this.#notify({ listeners: shouldNotifyListeners() });
- }
- #updateQuery() {
- const query = this.#client.getQueryCache().build(this.#client, this.options);
- if (query === this.#currentQuery) {
- return;
- }
- const prevQuery = this.#currentQuery;
- this.#currentQuery = query;
- this.#currentQueryInitialState = query.state;
- if (this.hasListeners()) {
- prevQuery?.removeObserver(this);
- query.addObserver(this);
- }
- }
- onQueryUpdate() {
- this.updateResult();
- if (this.hasListeners()) {
- this.#updateTimers();
- }
- }
- #notify(notifyOptions) {
- notifyManager.batch(() => {
- if (notifyOptions.listeners) {
- this.listeners.forEach((listener) => {
- listener(this.#currentResult);
- });
- }
- this.#client.getQueryCache().notify({
- query: this.#currentQuery,
- type: "observerResultsUpdated"
- });
- });
- }
-};
-function shouldLoadOnMount(query, options) {
- return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
-}
-function shouldFetchOnMount(query, options) {
- return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
-}
-function shouldFetchOn(query, options, field) {
- if (resolveEnabled(options.enabled, query) !== false && resolveStaleTime(options.staleTime, query) !== "static") {
- const value = typeof field === "function" ? field(query) : field;
- return value === "always" || value !== false && isStale(query, options);
- }
- return false;
-}
-function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
- return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
-}
-function isStale(query, options) {
- return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));
-}
-function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
- if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {
- return true;
- }
- return false;
-}
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
-function infiniteQueryBehavior(pages) {
- return {
- onFetch: (context, query) => {
- const options = context.options;
- const direction = context.fetchOptions?.meta?.fetchMore?.direction;
- const oldPages = context.state.data?.pages || [];
- const oldPageParams = context.state.data?.pageParams || [];
- let result = { pages: [], pageParams: [] };
- let currentPage = 0;
- const fetchFn = async () => {
- let cancelled = false;
- const addSignalProperty = (object) => {
- addConsumeAwareSignal(
- object,
- () => context.signal,
- () => cancelled = true
- );
- };
- const queryFn = ensureQueryFn(context.options, context.fetchOptions);
- const fetchPage = async (data, param, previous) => {
- if (cancelled) {
- return Promise.reject();
- }
- if (param == null && data.pages.length) {
- return Promise.resolve(data);
- }
- const createQueryFnContext = () => {
- const queryFnContext2 = {
- client: context.client,
- queryKey: context.queryKey,
- pageParam: param,
- direction: previous ? "backward" : "forward",
- meta: context.options.meta
- };
- addSignalProperty(queryFnContext2);
- return queryFnContext2;
- };
- const queryFnContext = createQueryFnContext();
- const page = await queryFn(queryFnContext);
- const { maxPages } = context.options;
- const addTo = previous ? addToStart : addToEnd;
- return {
- pages: addTo(data.pages, page, maxPages),
- pageParams: addTo(data.pageParams, param, maxPages)
- };
- };
- if (direction && oldPages.length) {
- const previous = direction === "backward";
- const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
- const oldData = {
- pages: oldPages,
- pageParams: oldPageParams
- };
- const param = pageParamFn(options, oldData);
- result = await fetchPage(oldData, param, previous);
- } else {
- const remainingPages = pages ?? oldPages.length;
- do {
- const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);
- if (currentPage > 0 && param == null) {
- break;
- }
- result = await fetchPage(result, param);
- currentPage++;
- } while (currentPage < remainingPages);
- }
- return result;
- };
- if (context.options.persister) {
- context.fetchFn = () => {
- return context.options.persister?.(
- fetchFn,
- {
- client: context.client,
- queryKey: context.queryKey,
- meta: context.options.meta,
- signal: context.signal
- },
- query
- );
- };
- } else {
- context.fetchFn = fetchFn;
- }
- }
- };
-}
-function getNextPageParam(options, { pages, pageParams }) {
- const lastIndex = pages.length - 1;
- return pages.length > 0 ? options.getNextPageParam(
- pages[lastIndex],
- pages,
- pageParams[lastIndex],
- pageParams
- ) : void 0;
-}
-function getPreviousPageParam(options, { pages, pageParams }) {
- return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
-}
-function hasNextPage(options, data) {
- if (!data) return false;
- return getNextPageParam(options, data) != null;
-}
-function hasPreviousPage(options, data) {
- if (!data || !options.getPreviousPageParam) return false;
- return getPreviousPageParam(options, data) != null;
-}
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js
-var InfiniteQueryObserver = class extends QueryObserver {
- constructor(client, options) {
- super(client, options);
- }
- bindMethods() {
- super.bindMethods();
- this.fetchNextPage = this.fetchNextPage.bind(this);
- this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
- }
- setOptions(options) {
- super.setOptions({
- ...options,
- behavior: infiniteQueryBehavior()
- });
- }
- getOptimisticResult(options) {
- options.behavior = infiniteQueryBehavior();
- return super.getOptimisticResult(options);
- }
- fetchNextPage(options) {
- return this.fetch({
- ...options,
- meta: {
- fetchMore: { direction: "forward" }
- }
- });
- }
- fetchPreviousPage(options) {
- return this.fetch({
- ...options,
- meta: {
- fetchMore: { direction: "backward" }
- }
- });
- }
- createResult(query, options) {
- const { state } = query;
- const parentResult = super.createResult(query, options);
- const { isFetching, isRefetching, isError, isRefetchError } = parentResult;
- const fetchDirection = state.fetchMeta?.fetchMore?.direction;
- const isFetchNextPageError = isError && fetchDirection === "forward";
- const isFetchingNextPage = isFetching && fetchDirection === "forward";
- const isFetchPreviousPageError = isError && fetchDirection === "backward";
- const isFetchingPreviousPage = isFetching && fetchDirection === "backward";
- const result = {
- ...parentResult,
- fetchNextPage: this.fetchNextPage,
- fetchPreviousPage: this.fetchPreviousPage,
- hasNextPage: hasNextPage(options, state.data),
- hasPreviousPage: hasPreviousPage(options, state.data),
- isFetchNextPageError,
- isFetchingNextPage,
- isFetchPreviousPageError,
- isFetchingPreviousPage,
- isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,
- isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
- };
- return result;
- }
-};
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/mutation.js
-var Mutation = class extends Removable {
- #client;
- #observers;
- #mutationCache;
- #retryer;
- constructor(config) {
- super();
- this.#client = config.client;
- this.mutationId = config.mutationId;
- this.#mutationCache = config.mutationCache;
- this.#observers = [];
- this.state = config.state || getDefaultState2();
- this.setOptions(config.options);
- this.scheduleGc();
- }
- setOptions(options) {
- this.options = options;
- this.updateGcTime(this.options.gcTime);
- }
- get meta() {
- return this.options.meta;
- }
- addObserver(observer) {
- if (!this.#observers.includes(observer)) {
- this.#observers.push(observer);
- this.clearGcTimeout();
- this.#mutationCache.notify({
- type: "observerAdded",
- mutation: this,
- observer
- });
- }
- }
- removeObserver(observer) {
- this.#observers = this.#observers.filter((x) => x !== observer);
- this.scheduleGc();
- this.#mutationCache.notify({
- type: "observerRemoved",
- mutation: this,
- observer
- });
- }
- optionalRemove() {
- if (!this.#observers.length) {
- if (this.state.status === "pending") {
- this.scheduleGc();
- } else {
- this.#mutationCache.remove(this);
- }
- }
- }
- continue() {
- return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
- this.execute(this.state.variables);
- }
- async execute(variables) {
- const onContinue = () => {
- this.#dispatch({ type: "continue" });
- };
- const mutationFnContext = {
- client: this.#client,
- meta: this.options.meta,
- mutationKey: this.options.mutationKey
- };
- this.#retryer = createRetryer({
- fn: () => {
- if (!this.options.mutationFn) {
- return Promise.reject(new Error("No mutationFn found"));
- }
- return this.options.mutationFn(variables, mutationFnContext);
- },
- onFail: (failureCount, error) => {
- this.#dispatch({ type: "failed", failureCount, error });
- },
- onPause: () => {
- this.#dispatch({ type: "pause" });
- },
- onContinue,
- retry: this.options.retry ?? 0,
- retryDelay: this.options.retryDelay,
- networkMode: this.options.networkMode,
- canRun: () => this.#mutationCache.canRun(this)
- });
- const restored = this.state.status === "pending";
- const isPaused = !this.#retryer.canStart();
- try {
- if (restored) {
- onContinue();
- } else {
- this.#dispatch({ type: "pending", variables, isPaused });
- if (this.#mutationCache.config.onMutate) {
- await this.#mutationCache.config.onMutate(
- variables,
- this,
- mutationFnContext
- );
- }
- const context = await this.options.onMutate?.(
- variables,
- mutationFnContext
- );
- if (context !== this.state.context) {
- this.#dispatch({
- type: "pending",
- context,
- variables,
- isPaused
- });
- }
- }
- const data = await this.#retryer.start();
- await this.#mutationCache.config.onSuccess?.(
- data,
- variables,
- this.state.context,
- this,
- mutationFnContext
- );
- await this.options.onSuccess?.(
- data,
- variables,
- this.state.context,
- mutationFnContext
- );
- await this.#mutationCache.config.onSettled?.(
- data,
- null,
- this.state.variables,
- this.state.context,
- this,
- mutationFnContext
- );
- await this.options.onSettled?.(
- data,
- null,
- variables,
- this.state.context,
- mutationFnContext
- );
- this.#dispatch({ type: "success", data });
- return data;
- } catch (error) {
- try {
- await this.#mutationCache.config.onError?.(
- error,
- variables,
- this.state.context,
- this,
- mutationFnContext
- );
- } catch (e) {
- void Promise.reject(e);
- }
- try {
- await this.options.onError?.(
- error,
- variables,
- this.state.context,
- mutationFnContext
- );
- } catch (e) {
- void Promise.reject(e);
- }
- try {
- await this.#mutationCache.config.onSettled?.(
- void 0,
- error,
- this.state.variables,
- this.state.context,
- this,
- mutationFnContext
- );
- } catch (e) {
- void Promise.reject(e);
- }
- try {
- await this.options.onSettled?.(
- void 0,
- error,
- variables,
- this.state.context,
- mutationFnContext
- );
- } catch (e) {
- void Promise.reject(e);
- }
- this.#dispatch({ type: "error", error });
- throw error;
- } finally {
- this.#mutationCache.runNext(this);
- }
- }
- #dispatch(action) {
- const reducer = (state) => {
- switch (action.type) {
- case "failed":
- return {
- ...state,
- failureCount: action.failureCount,
- failureReason: action.error
- };
- case "pause":
- return {
- ...state,
- isPaused: true
- };
- case "continue":
- return {
- ...state,
- isPaused: false
- };
- case "pending":
- return {
- ...state,
- context: action.context,
- data: void 0,
- failureCount: 0,
- failureReason: null,
- error: null,
- isPaused: action.isPaused,
- status: "pending",
- variables: action.variables,
- submittedAt: Date.now()
- };
- case "success":
- return {
- ...state,
- data: action.data,
- failureCount: 0,
- failureReason: null,
- error: null,
- status: "success",
- isPaused: false
- };
- case "error":
- return {
- ...state,
- data: void 0,
- error: action.error,
- failureCount: state.failureCount + 1,
- failureReason: action.error,
- isPaused: false,
- status: "error"
- };
- }
- };
- this.state = reducer(this.state);
- notifyManager.batch(() => {
- this.#observers.forEach((observer) => {
- observer.onMutationUpdate(action);
- });
- this.#mutationCache.notify({
- mutation: this,
- type: "updated",
- action
- });
- });
- }
-};
-function getDefaultState2() {
- return {
- context: void 0,
- data: void 0,
- error: null,
- failureCount: 0,
- failureReason: null,
- isPaused: false,
- status: "idle",
- variables: void 0,
- submittedAt: 0
- };
-}
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/mutationCache.js
-var MutationCache = class extends Subscribable {
- constructor(config = {}) {
- super();
- this.config = config;
- this.#mutations = /* @__PURE__ */ new Set();
- this.#scopes = /* @__PURE__ */ new Map();
- this.#mutationId = 0;
- }
- #mutations;
- #scopes;
- #mutationId;
- build(client, options, state) {
- const mutation = new Mutation({
- client,
- mutationCache: this,
- mutationId: ++this.#mutationId,
- options: client.defaultMutationOptions(options),
- state
- });
- this.add(mutation);
- return mutation;
- }
- add(mutation) {
- this.#mutations.add(mutation);
- const scope = scopeFor(mutation);
- if (typeof scope === "string") {
- const scopedMutations = this.#scopes.get(scope);
- if (scopedMutations) {
- scopedMutations.push(mutation);
- } else {
- this.#scopes.set(scope, [mutation]);
- }
- }
- this.notify({ type: "added", mutation });
- }
- remove(mutation) {
- if (this.#mutations.delete(mutation)) {
- const scope = scopeFor(mutation);
- if (typeof scope === "string") {
- const scopedMutations = this.#scopes.get(scope);
- if (scopedMutations) {
- if (scopedMutations.length > 1) {
- const index = scopedMutations.indexOf(mutation);
- if (index !== -1) {
- scopedMutations.splice(index, 1);
- }
- } else if (scopedMutations[0] === mutation) {
- this.#scopes.delete(scope);
- }
- }
- }
- }
- this.notify({ type: "removed", mutation });
- }
- canRun(mutation) {
- const scope = scopeFor(mutation);
- if (typeof scope === "string") {
- const mutationsWithSameScope = this.#scopes.get(scope);
- const firstPendingMutation = mutationsWithSameScope?.find(
- (m) => m.state.status === "pending"
- );
- return !firstPendingMutation || firstPendingMutation === mutation;
- } else {
- return true;
- }
- }
- runNext(mutation) {
- const scope = scopeFor(mutation);
- if (typeof scope === "string") {
- const foundMutation = this.#scopes.get(scope)?.find((m) => m !== mutation && m.state.isPaused);
- return foundMutation?.continue() ?? Promise.resolve();
- } else {
- return Promise.resolve();
- }
- }
- clear() {
- notifyManager.batch(() => {
- this.#mutations.forEach((mutation) => {
- this.notify({ type: "removed", mutation });
- });
- this.#mutations.clear();
- this.#scopes.clear();
- });
- }
- getAll() {
- return Array.from(this.#mutations);
- }
- find(filters) {
- const defaultedFilters = { exact: true, ...filters };
- return this.getAll().find(
- (mutation) => matchMutation(defaultedFilters, mutation)
- );
- }
- findAll(filters = {}) {
- return this.getAll().filter((mutation) => matchMutation(filters, mutation));
- }
- notify(event) {
- notifyManager.batch(() => {
- this.listeners.forEach((listener) => {
- listener(event);
- });
- });
- }
- resumePausedMutations() {
- const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
- return notifyManager.batch(
- () => Promise.all(
- pausedMutations.map((mutation) => mutation.continue().catch(noop))
- )
- );
- }
-};
-function scopeFor(mutation) {
- return mutation.options.scope?.id;
-}
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/mutationObserver.js
-var MutationObserver = class extends Subscribable {
- #client;
- #currentResult = void 0;
- #currentMutation;
- #mutateOptions;
- constructor(client, options) {
- super();
- this.#client = client;
- this.setOptions(options);
- this.bindMethods();
- this.#updateResult();
- }
- bindMethods() {
- this.mutate = this.mutate.bind(this);
- this.reset = this.reset.bind(this);
- }
- setOptions(options) {
- const prevOptions = this.options;
- this.options = this.#client.defaultMutationOptions(options);
- if (!shallowEqualObjects(this.options, prevOptions)) {
- this.#client.getMutationCache().notify({
- type: "observerOptionsUpdated",
- mutation: this.#currentMutation,
- observer: this
- });
- }
- if (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) {
- this.reset();
- } else if (this.#currentMutation?.state.status === "pending") {
- this.#currentMutation.setOptions(this.options);
- }
- }
- onUnsubscribe() {
- if (!this.hasListeners()) {
- this.#currentMutation?.removeObserver(this);
- }
- }
- onMutationUpdate(action) {
- this.#updateResult();
- this.#notify(action);
- }
- getCurrentResult() {
- return this.#currentResult;
- }
- reset() {
- this.#currentMutation?.removeObserver(this);
- this.#currentMutation = void 0;
- this.#updateResult();
- this.#notify();
- }
- mutate(variables, options) {
- this.#mutateOptions = options;
- this.#currentMutation?.removeObserver(this);
- this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);
- this.#currentMutation.addObserver(this);
- return this.#currentMutation.execute(variables);
- }
- #updateResult() {
- const state = this.#currentMutation?.state ?? getDefaultState2();
- this.#currentResult = {
- ...state,
- isPending: state.status === "pending",
- isSuccess: state.status === "success",
- isError: state.status === "error",
- isIdle: state.status === "idle",
- mutate: this.mutate,
- reset: this.reset
- };
- }
- #notify(action) {
- notifyManager.batch(() => {
- if (this.#mutateOptions && this.hasListeners()) {
- const variables = this.#currentResult.variables;
- const onMutateResult = this.#currentResult.context;
- const context = {
- client: this.#client,
- meta: this.options.meta,
- mutationKey: this.options.mutationKey
- };
- if (action?.type === "success") {
- try {
- this.#mutateOptions.onSuccess?.(
- action.data,
- variables,
- onMutateResult,
- context
- );
- } catch (e) {
- void Promise.reject(e);
- }
- try {
- this.#mutateOptions.onSettled?.(
- action.data,
- null,
- variables,
- onMutateResult,
- context
- );
- } catch (e) {
- void Promise.reject(e);
- }
- } else if (action?.type === "error") {
- try {
- this.#mutateOptions.onError?.(
- action.error,
- variables,
- onMutateResult,
- context
- );
- } catch (e) {
- void Promise.reject(e);
- }
- try {
- this.#mutateOptions.onSettled?.(
- void 0,
- action.error,
- variables,
- onMutateResult,
- context
- );
- } catch (e) {
- void Promise.reject(e);
- }
- }
- }
- this.listeners.forEach((listener) => {
- listener(this.#currentResult);
- });
- });
- }
-};
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/queriesObserver.js
-function difference(array1, array2) {
- const excludeSet = new Set(array2);
- return array1.filter((x) => !excludeSet.has(x));
-}
-function replaceAt(array, index, value) {
- const copy = array.slice(0);
- copy[index] = value;
- return copy;
-}
-var QueriesObserver = class extends Subscribable {
- #client;
- #result;
- #queries;
- #options;
- #observers;
- #combinedResult;
- #lastCombine;
- #lastResult;
- #lastQueryHashes;
- #observerMatches = [];
- constructor(client, queries, options) {
- super();
- this.#client = client;
- this.#options = options;
- this.#queries = [];
- this.#observers = [];
- this.#result = [];
- this.setQueries(queries);
- }
- onSubscribe() {
- if (this.listeners.size === 1) {
- this.#observers.forEach((observer) => {
- observer.subscribe((result) => {
- this.#onUpdate(observer, result);
- });
- });
- }
- }
- onUnsubscribe() {
- if (!this.listeners.size) {
- this.destroy();
- }
- }
- destroy() {
- this.listeners = /* @__PURE__ */ new Set();
- this.#observers.forEach((observer) => {
- observer.destroy();
- });
- }
- setQueries(queries, options) {
- this.#queries = queries;
- this.#options = options;
- if (true) {
- const queryHashes = queries.map(
- (query) => this.#client.defaultQueryOptions(query).queryHash
- );
- if (new Set(queryHashes).size !== queryHashes.length) {
- console.warn(
- "[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior."
- );
- }
- }
- notifyManager.batch(() => {
- const prevObservers = this.#observers;
- const newObserverMatches = this.#findMatchingObservers(this.#queries);
- newObserverMatches.forEach(
- (match) => match.observer.setOptions(match.defaultedQueryOptions)
- );
- const newObservers = newObserverMatches.map((match) => match.observer);
- const newResult = newObservers.map(
- (observer) => observer.getCurrentResult()
- );
- const hasLengthChange = prevObservers.length !== newObservers.length;
- const hasIndexChange = newObservers.some(
- (observer, index) => observer !== prevObservers[index]
- );
- const hasStructuralChange = hasLengthChange || hasIndexChange;
- const hasResultChange = hasStructuralChange ? true : newResult.some((result, index) => {
- const prev = this.#result[index];
- return !prev || !shallowEqualObjects(result, prev);
- });
- if (!hasStructuralChange && !hasResultChange) return;
- if (hasStructuralChange) {
- this.#observerMatches = newObserverMatches;
- this.#observers = newObservers;
- }
- this.#result = newResult;
- if (!this.hasListeners()) return;
- if (hasStructuralChange) {
- difference(prevObservers, newObservers).forEach((observer) => {
- observer.destroy();
- });
- difference(newObservers, prevObservers).forEach((observer) => {
- observer.subscribe((result) => {
- this.#onUpdate(observer, result);
- });
- });
- }
- this.#notify();
- });
- }
- getCurrentResult() {
- return this.#result;
- }
- getQueries() {
- return this.#observers.map((observer) => observer.getCurrentQuery());
- }
- getObservers() {
- return this.#observers;
- }
- getOptimisticResult(queries, combine) {
- const matches = this.#findMatchingObservers(queries);
- const result = matches.map(
- (match) => match.observer.getOptimisticResult(match.defaultedQueryOptions)
- );
- const queryHashes = matches.map(
- (match) => match.defaultedQueryOptions.queryHash
- );
- return [
- result,
- (r) => {
- return this.#combineResult(r ?? result, combine, queryHashes);
- },
- () => {
- return this.#trackResult(result, matches);
- }
- ];
- }
- #trackResult(result, matches) {
- return matches.map((match, index) => {
- const observerResult = result[index];
- return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult, (accessedProp) => {
- matches.forEach((m) => {
- m.observer.trackProp(accessedProp);
- });
- }) : observerResult;
- });
- }
- #combineResult(input, combine, queryHashes) {
- if (combine) {
- const lastHashes = this.#lastQueryHashes;
- const queryHashesChanged = queryHashes !== void 0 && lastHashes !== void 0 && (lastHashes.length !== queryHashes.length || queryHashes.some((hash, i) => hash !== lastHashes[i]));
- if (!this.#combinedResult || this.#result !== this.#lastResult || queryHashesChanged || combine !== this.#lastCombine) {
- this.#lastCombine = combine;
- this.#lastResult = this.#result;
- if (queryHashes !== void 0) {
- this.#lastQueryHashes = queryHashes;
- }
- this.#combinedResult = replaceEqualDeep(
- this.#combinedResult,
- combine(input)
- );
- }
- return this.#combinedResult;
- }
- return input;
- }
- #findMatchingObservers(queries) {
- const prevObserversMap = /* @__PURE__ */ new Map();
- this.#observers.forEach((observer) => {
- const key = observer.options.queryHash;
- if (!key) return;
- const previousObservers = prevObserversMap.get(key);
- if (previousObservers) {
- previousObservers.push(observer);
- } else {
- prevObserversMap.set(key, [observer]);
- }
- });
- const observers = [];
- queries.forEach((options) => {
- const defaultedOptions = this.#client.defaultQueryOptions(options);
- const match = prevObserversMap.get(defaultedOptions.queryHash)?.shift();
- const observer = match ?? new QueryObserver(this.#client, defaultedOptions);
- observers.push({
- defaultedQueryOptions: defaultedOptions,
- observer
- });
- });
- return observers;
- }
- #onUpdate(observer, result) {
- const index = this.#observers.indexOf(observer);
- if (index !== -1) {
- this.#result = replaceAt(this.#result, index, result);
- this.#notify();
- }
- }
- #notify() {
- if (this.hasListeners()) {
- const previousResult = this.#combinedResult;
- const newTracked = this.#trackResult(this.#result, this.#observerMatches);
- const newResult = this.#combineResult(newTracked, this.#options?.combine);
- if (previousResult !== newResult) {
- notifyManager.batch(() => {
- this.listeners.forEach((listener) => {
- listener(this.#result);
- });
- });
- }
- }
- }
-};
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/queryCache.js
-var QueryCache = class extends Subscribable {
- constructor(config = {}) {
- super();
- this.config = config;
- this.#queries = /* @__PURE__ */ new Map();
- }
- #queries;
- build(client, options, state) {
- const queryKey = options.queryKey;
- const queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);
- let query = this.get(queryHash);
- if (!query) {
- query = new Query({
- client,
- queryKey,
- queryHash,
- options: client.defaultQueryOptions(options),
- state,
- defaultOptions: client.getQueryDefaults(queryKey)
- });
- this.add(query);
- }
- return query;
- }
- add(query) {
- if (!this.#queries.has(query.queryHash)) {
- this.#queries.set(query.queryHash, query);
- this.notify({
- type: "added",
- query
- });
- }
- }
- remove(query) {
- const queryInMap = this.#queries.get(query.queryHash);
- if (queryInMap) {
- query.destroy();
- if (queryInMap === query) {
- this.#queries.delete(query.queryHash);
- }
- this.notify({ type: "removed", query });
- }
- }
- clear() {
- notifyManager.batch(() => {
- this.getAll().forEach((query) => {
- this.remove(query);
- });
- });
- }
- get(queryHash) {
- return this.#queries.get(queryHash);
- }
- getAll() {
- return [...this.#queries.values()];
- }
- find(filters) {
- const defaultedFilters = { exact: true, ...filters };
- return this.getAll().find(
- (query) => matchQuery(defaultedFilters, query)
- );
- }
- findAll(filters = {}) {
- const queries = this.getAll();
- return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;
- }
- notify(event) {
- notifyManager.batch(() => {
- this.listeners.forEach((listener) => {
- listener(event);
- });
- });
- }
- onFocus() {
- notifyManager.batch(() => {
- this.getAll().forEach((query) => {
- query.onFocus();
- });
- });
- }
- onOnline() {
- notifyManager.batch(() => {
- this.getAll().forEach((query) => {
- query.onOnline();
- });
- });
- }
-};
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/queryClient.js
-var QueryClient = class {
- #queryCache;
- #mutationCache;
- #defaultOptions;
- #queryDefaults;
- #mutationDefaults;
- #mountCount;
- #unsubscribeFocus;
- #unsubscribeOnline;
- constructor(config = {}) {
- this.#queryCache = config.queryCache || new QueryCache();
- this.#mutationCache = config.mutationCache || new MutationCache();
- this.#defaultOptions = config.defaultOptions || {};
- this.#queryDefaults = /* @__PURE__ */ new Map();
- this.#mutationDefaults = /* @__PURE__ */ new Map();
- this.#mountCount = 0;
- }
- mount() {
- this.#mountCount++;
- if (this.#mountCount !== 1) return;
- this.#unsubscribeFocus = focusManager.subscribe(async (focused) => {
- if (focused) {
- await this.resumePausedMutations();
- this.#queryCache.onFocus();
- }
- });
- this.#unsubscribeOnline = onlineManager.subscribe(async (online) => {
- if (online) {
- await this.resumePausedMutations();
- this.#queryCache.onOnline();
- }
- });
- }
- unmount() {
- this.#mountCount--;
- if (this.#mountCount !== 0) return;
- this.#unsubscribeFocus?.();
- this.#unsubscribeFocus = void 0;
- this.#unsubscribeOnline?.();
- this.#unsubscribeOnline = void 0;
- }
- isFetching(filters) {
- return this.#queryCache.findAll({ ...filters, fetchStatus: "fetching" }).length;
- }
- isMutating(filters) {
- return this.#mutationCache.findAll({ ...filters, status: "pending" }).length;
- }
- /**
- * Imperative (non-reactive) way to retrieve data for a QueryKey.
- * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
- *
- * Hint: Do not use this function inside a component, because it won't receive updates.
- * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
- */
- getQueryData(queryKey) {
- const options = this.defaultQueryOptions({ queryKey });
- return this.#queryCache.get(options.queryHash)?.state.data;
- }
- ensureQueryData(options) {
- const defaultedOptions = this.defaultQueryOptions(options);
- const query = this.#queryCache.build(this, defaultedOptions);
- const cachedData = query.state.data;
- if (cachedData === void 0) {
- return this.fetchQuery(options);
- }
- if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) {
- void this.prefetchQuery(defaultedOptions);
- }
- return Promise.resolve(cachedData);
- }
- getQueriesData(filters) {
- return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {
- const data = state.data;
- return [queryKey, data];
- });
- }
- setQueryData(queryKey, updater, options) {
- const defaultedOptions = this.defaultQueryOptions({ queryKey });
- const query = this.#queryCache.get(
- defaultedOptions.queryHash
- );
- const prevData = query?.state.data;
- const data = functionalUpdate(updater, prevData);
- if (data === void 0) {
- return void 0;
- }
- return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });
- }
- setQueriesData(filters, updater, options) {
- return notifyManager.batch(
- () => this.#queryCache.findAll(filters).map(({ queryKey }) => [
- queryKey,
- this.setQueryData(queryKey, updater, options)
- ])
- );
- }
- getQueryState(queryKey) {
- const options = this.defaultQueryOptions({ queryKey });
- return this.#queryCache.get(
- options.queryHash
- )?.state;
- }
- removeQueries(filters) {
- const queryCache = this.#queryCache;
- notifyManager.batch(() => {
- queryCache.findAll(filters).forEach((query) => {
- queryCache.remove(query);
- });
- });
- }
- resetQueries(filters, options) {
- const queryCache = this.#queryCache;
- return notifyManager.batch(() => {
- queryCache.findAll(filters).forEach((query) => {
- query.reset();
- });
- return this.refetchQueries(
- {
- type: "active",
- ...filters
- },
- options
- );
- });
- }
- cancelQueries(filters, cancelOptions = {}) {
- const defaultedCancelOptions = { revert: true, ...cancelOptions };
- const promises = notifyManager.batch(
- () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))
- );
- return Promise.all(promises).then(noop).catch(noop);
- }
- invalidateQueries(filters, options = {}) {
- return notifyManager.batch(() => {
- this.#queryCache.findAll(filters).forEach((query) => {
- query.invalidate();
- });
- if (filters?.refetchType === "none") {
- return Promise.resolve();
- }
- return this.refetchQueries(
- {
- ...filters,
- type: filters?.refetchType ?? filters?.type ?? "active"
- },
- options
- );
- });
- }
- refetchQueries(filters, options = {}) {
- const fetchOptions = {
- ...options,
- cancelRefetch: options.cancelRefetch ?? true
- };
- const promises = notifyManager.batch(
- () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {
- let promise = query.fetch(void 0, fetchOptions);
- if (!fetchOptions.throwOnError) {
- promise = promise.catch(noop);
- }
- return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
- })
- );
- return Promise.all(promises).then(noop);
- }
- fetchQuery(options) {
- const defaultedOptions = this.defaultQueryOptions(options);
- if (defaultedOptions.retry === void 0) {
- defaultedOptions.retry = false;
- }
- const query = this.#queryCache.build(this, defaultedOptions);
- return query.isStaleByTime(
- resolveStaleTime(defaultedOptions.staleTime, query)
- ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
- }
- prefetchQuery(options) {
- return this.fetchQuery(options).then(noop).catch(noop);
- }
- fetchInfiniteQuery(options) {
- options.behavior = infiniteQueryBehavior(options.pages);
- return this.fetchQuery(options);
- }
- prefetchInfiniteQuery(options) {
- return this.fetchInfiniteQuery(options).then(noop).catch(noop);
- }
- ensureInfiniteQueryData(options) {
- options.behavior = infiniteQueryBehavior(options.pages);
- return this.ensureQueryData(options);
- }
- resumePausedMutations() {
- if (onlineManager.isOnline()) {
- return this.#mutationCache.resumePausedMutations();
- }
- return Promise.resolve();
- }
- getQueryCache() {
- return this.#queryCache;
- }
- getMutationCache() {
- return this.#mutationCache;
- }
- getDefaultOptions() {
- return this.#defaultOptions;
- }
- setDefaultOptions(options) {
- this.#defaultOptions = options;
- }
- setQueryDefaults(queryKey, options) {
- this.#queryDefaults.set(hashKey(queryKey), {
- queryKey,
- defaultOptions: options
- });
- }
- getQueryDefaults(queryKey) {
- const defaults = [...this.#queryDefaults.values()];
- const result = {};
- defaults.forEach((queryDefault) => {
- if (partialMatchKey(queryKey, queryDefault.queryKey)) {
- Object.assign(result, queryDefault.defaultOptions);
- }
- });
- return result;
- }
- setMutationDefaults(mutationKey, options) {
- this.#mutationDefaults.set(hashKey(mutationKey), {
- mutationKey,
- defaultOptions: options
- });
- }
- getMutationDefaults(mutationKey) {
- const defaults = [...this.#mutationDefaults.values()];
- const result = {};
- defaults.forEach((queryDefault) => {
- if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {
- Object.assign(result, queryDefault.defaultOptions);
- }
- });
- return result;
- }
- defaultQueryOptions(options) {
- if (options._defaulted) {
- return options;
- }
- const defaultedOptions = {
- ...this.#defaultOptions.queries,
- ...this.getQueryDefaults(options.queryKey),
- ...options,
- _defaulted: true
- };
- if (!defaultedOptions.queryHash) {
- defaultedOptions.queryHash = hashQueryKeyByOptions(
- defaultedOptions.queryKey,
- defaultedOptions
- );
- }
- if (defaultedOptions.refetchOnReconnect === void 0) {
- defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
- }
- if (defaultedOptions.throwOnError === void 0) {
- defaultedOptions.throwOnError = !!defaultedOptions.suspense;
- }
- if (!defaultedOptions.networkMode && defaultedOptions.persister) {
- defaultedOptions.networkMode = "offlineFirst";
- }
- if (defaultedOptions.queryFn === skipToken) {
- defaultedOptions.enabled = false;
- }
- return defaultedOptions;
- }
- defaultMutationOptions(options) {
- if (options?._defaulted) {
- return options;
- }
- return {
- ...this.#defaultOptions.mutations,
- ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),
- ...options,
- _defaulted: true
- };
- }
- clear() {
- this.#queryCache.clear();
- this.#mutationCache.clear();
- }
-};
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/streamedQuery.js
-function streamedQuery({
- streamFn,
- refetchMode = "reset",
- reducer = (items, chunk) => addToEnd(items, chunk),
- initialValue = []
-}) {
- return async (context) => {
- const query = context.client.getQueryCache().find({ queryKey: context.queryKey, exact: true });
- const isRefetch = !!query && query.state.data !== void 0;
- if (isRefetch && refetchMode === "reset") {
- query.setState({
- status: "pending",
- data: void 0,
- error: null,
- fetchStatus: "fetching"
- });
- }
- let result = initialValue;
- let cancelled = false;
- const streamFnContext = addConsumeAwareSignal(
- {
- client: context.client,
- meta: context.meta,
- queryKey: context.queryKey,
- pageParam: context.pageParam,
- direction: context.direction
- },
- () => context.signal,
- () => cancelled = true
- );
- const stream = await streamFn(streamFnContext);
- const isReplaceRefetch = isRefetch && refetchMode === "replace";
- for await (const chunk of stream) {
- if (cancelled) {
- break;
- }
- if (isReplaceRefetch) {
- result = reducer(result, chunk);
- } else {
- context.client.setQueryData(
- context.queryKey,
- (prev) => reducer(prev === void 0 ? initialValue : prev, chunk)
- );
- }
- }
- if (isReplaceRefetch && !cancelled) {
- context.client.setQueryData(context.queryKey, result);
- }
- return context.client.getQueryData(context.queryKey) ?? initialValue;
- };
-}
-
-// ../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/types.js
-var dataTagSymbol = /* @__PURE__ */ Symbol("dataTagSymbol");
-var dataTagErrorSymbol = /* @__PURE__ */ Symbol("dataTagErrorSymbol");
-var unsetMarker = /* @__PURE__ */ Symbol("unsetMarker");
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/useQueries.js
-var React5 = __toESM(require_react(), 1);
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
-var React = __toESM(require_react(), 1);
-var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
-var QueryClientContext = React.createContext(
- void 0
-);
-var useQueryClient = (queryClient) => {
- const client = React.useContext(QueryClientContext);
- if (queryClient) {
- return queryClient;
- }
- if (!client) {
- throw new Error("No QueryClient set, use QueryClientProvider to set one");
- }
- return client;
-};
-var QueryClientProvider = ({
- client,
- children
-}) => {
- React.useEffect(() => {
- client.mount();
- return () => {
- client.unmount();
- };
- }, [client]);
- return (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, { value: client, children });
-};
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
-var React2 = __toESM(require_react(), 1);
-var IsRestoringContext = React2.createContext(false);
-var useIsRestoring = () => React2.useContext(IsRestoringContext);
-var IsRestoringProvider = IsRestoringContext.Provider;
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
-var React3 = __toESM(require_react(), 1);
-var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
-function createValue() {
- let isReset = false;
- return {
- clearReset: () => {
- isReset = false;
- },
- reset: () => {
- isReset = true;
- },
- isReset: () => {
- return isReset;
- }
- };
-}
-var QueryErrorResetBoundaryContext = React3.createContext(createValue());
-var useQueryErrorResetBoundary = () => React3.useContext(QueryErrorResetBoundaryContext);
-var QueryErrorResetBoundary = ({
- children
-}) => {
- const [value] = React3.useState(() => createValue());
- return (0, import_jsx_runtime2.jsx)(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
-};
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
-var React4 = __toESM(require_react(), 1);
-var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
- const throwOnError = query?.state.error && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
- if (options.suspense || options.experimental_prefetchInRender || throwOnError) {
- if (!errorResetBoundary.isReset()) {
- options.retryOnMount = false;
- }
- }
-};
-var useClearResetErrorBoundary = (errorResetBoundary) => {
- React4.useEffect(() => {
- errorResetBoundary.clearReset();
- }, [errorResetBoundary]);
-};
-var getHasError = ({
- result,
- errorResetBoundary,
- throwOnError,
- query,
- suspense
-}) => {
- return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
-};
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/suspense.js
-var defaultThrowOnError = (_error, query) => query.state.data === void 0;
-var ensureSuspenseTimers = (defaultedOptions) => {
- if (defaultedOptions.suspense) {
- const MIN_SUSPENSE_TIME_MS = 1e3;
- const clamp = (value) => value === "static" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);
- const originalStaleTime = defaultedOptions.staleTime;
- defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);
- if (typeof defaultedOptions.gcTime === "number") {
- defaultedOptions.gcTime = Math.max(
- defaultedOptions.gcTime,
- MIN_SUSPENSE_TIME_MS
- );
- }
- }
-};
-var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
-var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
-var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
- errorResetBoundary.clearReset();
-});
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/useQueries.js
-function useQueries({
- queries,
- ...options
-}, queryClient) {
- const client = useQueryClient(queryClient);
- const isRestoring = useIsRestoring();
- const errorResetBoundary = useQueryErrorResetBoundary();
- const defaultedQueries = React5.useMemo(
- () => queries.map((opts) => {
- const defaultedOptions = client.defaultQueryOptions(
- opts
- );
- defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
- return defaultedOptions;
- }),
- [queries, client, isRestoring]
- );
- defaultedQueries.forEach((queryOptions2) => {
- ensureSuspenseTimers(queryOptions2);
- const query = client.getQueryCache().get(queryOptions2.queryHash);
- ensurePreventErrorBoundaryRetry(queryOptions2, errorResetBoundary, query);
- });
- useClearResetErrorBoundary(errorResetBoundary);
- const [observer] = React5.useState(
- () => new QueriesObserver(
- client,
- defaultedQueries,
- options
- )
- );
- const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(
- defaultedQueries,
- options.combine
- );
- const shouldSubscribe = !isRestoring && options.subscribed !== false;
- React5.useSyncExternalStore(
- React5.useCallback(
- (onStoreChange) => shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop,
- [observer, shouldSubscribe]
- ),
- () => observer.getCurrentResult(),
- () => observer.getCurrentResult()
- );
- React5.useEffect(() => {
- observer.setQueries(
- defaultedQueries,
- options
- );
- }, [defaultedQueries, options, observer]);
- const shouldAtLeastOneSuspend = optimisticResult.some(
- (result, index) => shouldSuspend(defaultedQueries[index], result)
- );
- const suspensePromises = shouldAtLeastOneSuspend ? optimisticResult.flatMap((result, index) => {
- const opts = defaultedQueries[index];
- if (opts && shouldSuspend(opts, result)) {
- const queryObserver = new QueryObserver(client, opts);
- return fetchOptimistic(opts, queryObserver, errorResetBoundary);
- }
- return [];
- }) : [];
- if (suspensePromises.length > 0) {
- throw Promise.all(suspensePromises);
- }
- const firstSingleResultWhichShouldThrow = optimisticResult.find(
- (result, index) => {
- const query = defaultedQueries[index];
- return query && getHasError({
- result,
- errorResetBoundary,
- throwOnError: query.throwOnError,
- query: client.getQueryCache().get(query.queryHash),
- suspense: query.suspense
- });
- }
- );
- if (firstSingleResultWhichShouldThrow?.error) {
- throw firstSingleResultWhichShouldThrow.error;
- }
- return getCombinedResult(trackResult());
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
-var React6 = __toESM(require_react(), 1);
-function useBaseQuery(options, Observer, queryClient) {
- if (true) {
- if (typeof options !== "object" || Array.isArray(options)) {
- throw new Error(
- 'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
- );
- }
- }
- const isRestoring = useIsRestoring();
- const errorResetBoundary = useQueryErrorResetBoundary();
- const client = useQueryClient(queryClient);
- const defaultedOptions = client.defaultQueryOptions(options);
- client.getDefaultOptions().queries?._experimental_beforeQuery?.(
- defaultedOptions
- );
- const query = client.getQueryCache().get(defaultedOptions.queryHash);
- if (true) {
- if (!defaultedOptions.queryFn) {
- console.error(
- `[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
- );
- }
- }
- defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
- ensureSuspenseTimers(defaultedOptions);
- ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);
- useClearResetErrorBoundary(errorResetBoundary);
- const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
- const [observer] = React6.useState(
- () => new Observer(
- client,
- defaultedOptions
- )
- );
- const result = observer.getOptimisticResult(defaultedOptions);
- const shouldSubscribe = !isRestoring && options.subscribed !== false;
- React6.useSyncExternalStore(
- React6.useCallback(
- (onStoreChange) => {
- const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;
- observer.updateResult();
- return unsubscribe;
- },
- [observer, shouldSubscribe]
- ),
- () => observer.getCurrentResult(),
- () => observer.getCurrentResult()
- );
- React6.useEffect(() => {
- observer.setOptions(defaultedOptions);
- }, [defaultedOptions, observer]);
- if (shouldSuspend(defaultedOptions, result)) {
- throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);
- }
- if (getHasError({
- result,
- errorResetBoundary,
- throwOnError: defaultedOptions.throwOnError,
- query,
- suspense: defaultedOptions.suspense
- })) {
- throw result.error;
- }
- ;
- client.getDefaultOptions().queries?._experimental_afterQuery?.(
- defaultedOptions,
- result
- );
- if (defaultedOptions.experimental_prefetchInRender && !isServer && willFetch(result, isRestoring)) {
- const promise = isNewCacheEntry ? (
- // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
- fetchOptimistic(defaultedOptions, observer, errorResetBoundary)
- ) : (
- // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
- query?.promise
- );
- promise?.catch(noop).finally(() => {
- observer.updateResult();
- });
- }
- return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/useQuery.js
-function useQuery(options, queryClient) {
- return useBaseQuery(options, QueryObserver, queryClient);
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.js
-function useSuspenseQuery(options, queryClient) {
- if (true) {
- if (options.queryFn === skipToken) {
- console.error("skipToken is not allowed for useSuspenseQuery");
- }
- }
- return useBaseQuery(
- {
- ...options,
- enabled: true,
- suspense: true,
- throwOnError: defaultThrowOnError,
- placeholderData: void 0
- },
- QueryObserver,
- queryClient
- );
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.js
-function useSuspenseInfiniteQuery(options, queryClient) {
- if (true) {
- if (options.queryFn === skipToken) {
- console.error("skipToken is not allowed for useSuspenseInfiniteQuery");
- }
- }
- return useBaseQuery(
- {
- ...options,
- enabled: true,
- suspense: true,
- throwOnError: defaultThrowOnError
- },
- InfiniteQueryObserver,
- queryClient
- );
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.js
-function useSuspenseQueries(options, queryClient) {
- return useQueries(
- {
- ...options,
- queries: options.queries.map((query) => {
- if (true) {
- if (query.queryFn === skipToken) {
- console.error("skipToken is not allowed for useSuspenseQueries");
- }
- }
- return {
- ...query,
- suspense: true,
- throwOnError: defaultThrowOnError,
- enabled: true,
- placeholderData: void 0
- };
- })
- },
- queryClient
- );
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.js
-function usePrefetchQuery(options, queryClient) {
- const client = useQueryClient(queryClient);
- if (!client.getQueryState(options.queryKey)) {
- client.prefetchQuery(options);
- }
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.js
-function usePrefetchInfiniteQuery(options, queryClient) {
- const client = useQueryClient(queryClient);
- if (!client.getQueryState(options.queryKey)) {
- client.prefetchInfiniteQuery(options);
- }
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/queryOptions.js
-function queryOptions(options) {
- return options;
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js
-function infiniteQueryOptions(options) {
- return options;
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.js
-var React7 = __toESM(require_react(), 1);
-var HydrationBoundary = ({
- children,
- options = {},
- state,
- queryClient
-}) => {
- const client = useQueryClient(queryClient);
- const optionsRef = React7.useRef(options);
- React7.useEffect(() => {
- optionsRef.current = options;
- });
- const hydrationQueue = React7.useMemo(() => {
- if (state) {
- if (typeof state !== "object") {
- return;
- }
- const queryCache = client.getQueryCache();
- const queries = state.queries || [];
- const newQueries = [];
- const existingQueries = [];
- for (const dehydratedQuery of queries) {
- const existingQuery = queryCache.get(dehydratedQuery.queryHash);
- if (!existingQuery) {
- newQueries.push(dehydratedQuery);
- } else {
- const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt || dehydratedQuery.promise && existingQuery.state.status !== "pending" && existingQuery.state.fetchStatus !== "fetching" && dehydratedQuery.dehydratedAt !== void 0 && dehydratedQuery.dehydratedAt > existingQuery.state.dataUpdatedAt;
- if (hydrationIsNewer) {
- existingQueries.push(dehydratedQuery);
- }
- }
- }
- if (newQueries.length > 0) {
- hydrate(client, { queries: newQueries }, optionsRef.current);
- }
- if (existingQueries.length > 0) {
- return existingQueries;
- }
- }
- return void 0;
- }, [client, state]);
- React7.useEffect(() => {
- if (hydrationQueue) {
- hydrate(client, { queries: hydrationQueue }, optionsRef.current);
- }
- }, [client, hydrationQueue]);
- return children;
-};
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/useIsFetching.js
-var React8 = __toESM(require_react(), 1);
-function useIsFetching(filters, queryClient) {
- const client = useQueryClient(queryClient);
- const queryCache = client.getQueryCache();
- return React8.useSyncExternalStore(
- React8.useCallback(
- (onStoreChange) => queryCache.subscribe(notifyManager.batchCalls(onStoreChange)),
- [queryCache]
- ),
- () => client.isFetching(filters),
- () => client.isFetching(filters)
- );
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/useMutationState.js
-var React9 = __toESM(require_react(), 1);
-function useIsMutating(filters, queryClient) {
- const client = useQueryClient(queryClient);
- return useMutationState(
- { filters: { ...filters, status: "pending" } },
- client
- ).length;
-}
-function getResult(mutationCache, options) {
- return mutationCache.findAll(options.filters).map(
- (mutation) => options.select ? options.select(mutation) : mutation.state
- );
-}
-function useMutationState(options = {}, queryClient) {
- const mutationCache = useQueryClient(queryClient).getMutationCache();
- const optionsRef = React9.useRef(options);
- const result = React9.useRef(null);
- if (result.current === null) {
- result.current = getResult(mutationCache, options);
- }
- React9.useEffect(() => {
- optionsRef.current = options;
- });
- return React9.useSyncExternalStore(
- React9.useCallback(
- (onStoreChange) => mutationCache.subscribe(() => {
- const nextResult = replaceEqualDeep(
- result.current,
- getResult(mutationCache, optionsRef.current)
- );
- if (result.current !== nextResult) {
- result.current = nextResult;
- notifyManager.schedule(onStoreChange);
- }
- }),
- [mutationCache]
- ),
- () => result.current,
- () => result.current
- );
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/useMutation.js
-var React10 = __toESM(require_react(), 1);
-function useMutation(options, queryClient) {
- const client = useQueryClient(queryClient);
- const [observer] = React10.useState(
- () => new MutationObserver(
- client,
- options
- )
- );
- React10.useEffect(() => {
- observer.setOptions(options);
- }, [observer, options]);
- const result = React10.useSyncExternalStore(
- React10.useCallback(
- (onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)),
- [observer]
- ),
- () => observer.getCurrentResult(),
- () => observer.getCurrentResult()
- );
- const mutate = React10.useCallback(
- (variables, mutateOptions) => {
- observer.mutate(variables, mutateOptions).catch(noop);
- },
- [observer]
- );
- if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) {
- throw result.error;
- }
- return { ...result, mutate, mutateAsync: result.mutate };
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/mutationOptions.js
-function mutationOptions(options) {
- return options;
-}
-
-// ../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js
-function useInfiniteQuery(options, queryClient) {
- return useBaseQuery(
- options,
- InfiniteQueryObserver,
- queryClient
- );
-}
-
-export {
- timeoutManager,
- isServer,
- noop,
- matchQuery,
- matchMutation,
- hashKey,
- partialMatchKey,
- replaceEqualDeep,
- keepPreviousData,
- skipToken,
- shouldThrowError,
- focusManager,
- defaultShouldDehydrateMutation,
- defaultShouldDehydrateQuery,
- dehydrate,
- hydrate,
- defaultScheduler,
- notifyManager,
- onlineManager,
- CancelledError,
- isCancelledError,
- Query,
- QueryObserver,
- InfiniteQueryObserver,
- Mutation,
- MutationCache,
- MutationObserver,
- QueriesObserver,
- QueryCache,
- QueryClient,
- streamedQuery,
- dataTagSymbol,
- dataTagErrorSymbol,
- unsetMarker,
- QueryClientContext,
- useQueryClient,
- QueryClientProvider,
- useIsRestoring,
- IsRestoringProvider,
- useQueryErrorResetBoundary,
- QueryErrorResetBoundary,
- useQueries,
- useQuery,
- useSuspenseQuery,
- useSuspenseInfiniteQuery,
- useSuspenseQueries,
- usePrefetchQuery,
- usePrefetchInfiniteQuery,
- queryOptions,
- infiniteQueryOptions,
- HydrationBoundary,
- useIsFetching,
- useIsMutating,
- useMutationState,
- useMutation,
- mutationOptions,
- useInfiniteQuery
-};
-//# sourceMappingURL=chunk-GVT3TYT3.js.map
diff --git a/features/landing/frontend-standalone/.vite-cache/deps/chunk-GVT3TYT3.js.map b/features/landing/frontend-standalone/.vite-cache/deps/chunk-GVT3TYT3.js.map
deleted file mode 100644
index ac94330f6..000000000
--- a/features/landing/frontend-standalone/.vite-cache/deps/chunk-GVT3TYT3.js.map
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "version": 3,
- "sources": ["../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/subscribable.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/timeoutManager.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/utils.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/focusManager.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/thenable.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/hydration.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/notifyManager.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/onlineManager.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/retryer.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/removable.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/query.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/queryObserver.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/infiniteQueryBehavior.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/infiniteQueryObserver.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/mutation.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/mutationCache.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/mutationObserver.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/queriesObserver.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/queryCache.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/queryClient.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/streamedQuery.ts", "../../../../../../node_modules/.bun/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/src/types.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/useQueries.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/QueryClientProvider.tsx", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/IsRestoringProvider.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/QueryErrorResetBoundary.tsx", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/errorBoundaryUtils.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/suspense.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/useBaseQuery.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/useQuery.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/useSuspenseQuery.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/useSuspenseInfiniteQuery.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/useSuspenseQueries.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/usePrefetchQuery.tsx", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/usePrefetchInfiniteQuery.tsx", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/queryOptions.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/infiniteQueryOptions.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/HydrationBoundary.tsx", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/useIsFetching.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/useMutationState.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/useMutation.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/mutationOptions.ts", "../../../../../../node_modules/.bun/@tanstack+react-query@5.90.21+b1ab299f0a400331/node_modules/@tanstack/react-query/src/useInfiniteQuery.ts"],
- "sourcesContent": ["export class Subscribable {\n protected listeners = new Set()\n\n constructor() {\n this.subscribe = this.subscribe.bind(this)\n }\n\n subscribe(listener: TListener): () => void {\n this.listeners.add(listener)\n\n this.onSubscribe()\n\n return () => {\n this.listeners.delete(listener)\n this.onUnsubscribe()\n }\n }\n\n hasListeners(): boolean {\n return this.listeners.size > 0\n }\n\n protected onSubscribe(): void {\n // Do nothing\n }\n\n protected onUnsubscribe(): void {\n // Do nothing\n }\n}\n", "/**\n * {@link TimeoutManager} does not support passing arguments to the callback.\n *\n * `(_: void)` is the argument type inferred by TypeScript's default typings for\n * `setTimeout(cb, number)`.\n * If we don't accept a single void argument, then\n * `new Promise(resolve => timeoutManager.setTimeout(resolve, N))` is a type error.\n */\nexport type TimeoutCallback = (_: void) => void\n\n/**\n * Wrapping `setTimeout` is awkward from a typing perspective because platform\n * typings may extend the return type of `setTimeout`. For example, NodeJS\n * typings add `NodeJS.Timeout`; but a non-default `timeoutManager` may not be\n * able to return such a type.\n */\nexport type ManagedTimerId = number | { [Symbol.toPrimitive]: () => number }\n\n/**\n * Backend for timer functions.\n */\nexport type TimeoutProvider =\n {\n readonly setTimeout: (callback: TimeoutCallback, delay: number) => TTimerId\n readonly clearTimeout: (timeoutId: TTimerId | undefined) => void\n\n readonly setInterval: (callback: TimeoutCallback, delay: number) => TTimerId\n readonly clearInterval: (intervalId: TTimerId | undefined) => void\n }\n\nexport const defaultTimeoutProvider: TimeoutProvider<\n ReturnType\n> = {\n // We need the wrapper function syntax below instead of direct references to\n // global setTimeout etc.\n //\n // BAD: `setTimeout: setTimeout`\n // GOOD: `setTimeout: (cb, delay) => setTimeout(cb, delay)`\n //\n // If we use direct references here, then anything that wants to spy on or\n // replace the global setTimeout (like tests) won't work since we'll already\n // have a hard reference to the original implementation at the time when this\n // file was imported.\n setTimeout: (callback, delay) => setTimeout(callback, delay),\n clearTimeout: (timeoutId) => clearTimeout(timeoutId),\n\n setInterval: (callback, delay) => setInterval(callback, delay),\n clearInterval: (intervalId) => clearInterval(intervalId),\n}\n\n/**\n * Allows customization of how timeouts are created.\n *\n * @tanstack/query-core makes liberal use of timeouts to implement `staleTime`\n * and `gcTime`. The default TimeoutManager provider uses the platform's global\n * `setTimeout` implementation, which is known to have scalability issues with\n * thousands of timeouts on the event loop.\n *\n * If you hit this limitation, consider providing a custom TimeoutProvider that\n * coalesces timeouts.\n */\nexport class TimeoutManager implements Omit {\n // We cannot have TimeoutManager as we must instantiate it with a concrete\n // type at app boot; and if we leave that type, then any new timer provider\n // would need to support ReturnType, which is infeasible.\n //\n // We settle for type safety for the TimeoutProvider type, and accept that\n // this class is unsafe internally to allow for extension.\n #provider: TimeoutProvider = defaultTimeoutProvider\n #providerCalled = false\n\n setTimeoutProvider(\n provider: TimeoutProvider,\n ): void {\n if (process.env.NODE_ENV !== 'production') {\n if (this.#providerCalled && provider !== this.#provider) {\n // After changing providers, `clearTimeout` will not work as expected for\n // timeouts from the previous provider.\n //\n // Since they may allocate the same timeout ID, clearTimeout may cancel an\n // arbitrary different timeout, or unexpected no-op.\n //\n // We could protect against this by mixing the timeout ID bits\n // deterministically with some per-provider bits.\n //\n // We could internally queue `setTimeout` calls to `TimeoutManager` until\n // some API call to set the initial provider.\n console.error(\n `[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,\n { previous: this.#provider, provider },\n )\n }\n }\n\n this.#provider = provider\n if (process.env.NODE_ENV !== 'production') {\n this.#providerCalled = false\n }\n }\n\n setTimeout(callback: TimeoutCallback, delay: number): ManagedTimerId {\n if (process.env.NODE_ENV !== 'production') {\n this.#providerCalled = true\n }\n return this.#provider.setTimeout(callback, delay)\n }\n\n clearTimeout(timeoutId: ManagedTimerId | undefined): void {\n this.#provider.clearTimeout(timeoutId)\n }\n\n setInterval(callback: TimeoutCallback, delay: number): ManagedTimerId {\n if (process.env.NODE_ENV !== 'production') {\n this.#providerCalled = true\n }\n return this.#provider.setInterval(callback, delay)\n }\n\n clearInterval(intervalId: ManagedTimerId | undefined): void {\n this.#provider.clearInterval(intervalId)\n }\n}\n\nexport const timeoutManager = new TimeoutManager()\n\n/**\n * In many cases code wants to delay to the next event loop tick; this is not\n * mediated by {@link timeoutManager}.\n *\n * This function is provided to make auditing the `tanstack/query-core` for\n * incorrect use of system `setTimeout` easier.\n */\nexport function systemSetTimeoutZero(callback: TimeoutCallback): void {\n setTimeout(callback, 0)\n}\n", "import { timeoutManager } from './timeoutManager'\nimport type {\n DefaultError,\n Enabled,\n FetchStatus,\n MutationKey,\n MutationStatus,\n QueryFunction,\n QueryKey,\n QueryOptions,\n StaleTime,\n StaleTimeFunction,\n} from './types'\nimport type { Mutation } from './mutation'\nimport type { FetchOptions, Query } from './query'\n\n// TYPES\n\ntype DropLast> = T extends readonly [\n ...infer R,\n unknown,\n]\n ? readonly [...R]\n : never\n\ntype TuplePrefixes> = T extends readonly []\n ? readonly []\n : TuplePrefixes> | T\n\nexport interface QueryFilters {\n /**\n * Filter to active queries, inactive queries or all queries\n */\n type?: QueryTypeFilter\n /**\n * Match query key exactly\n */\n exact?: boolean\n /**\n * Include queries matching this predicate function\n */\n predicate?: (query: Query) => boolean\n /**\n * Include queries matching this query key\n */\n queryKey?: TQueryKey | TuplePrefixes\n /**\n * Include or exclude stale queries\n */\n stale?: boolean\n /**\n * Include queries matching their fetchStatus\n */\n fetchStatus?: FetchStatus\n}\n\nexport interface MutationFilters<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> {\n /**\n * Match mutation key exactly\n */\n exact?: boolean\n /**\n * Include mutations matching this predicate function\n */\n predicate?: (\n mutation: Mutation,\n ) => boolean\n /**\n * Include mutations matching this mutation key\n */\n mutationKey?: TuplePrefixes\n /**\n * Filter by mutation status\n */\n status?: MutationStatus\n}\n\nexport type Updater = TOutput | ((input: TInput) => TOutput)\n\nexport type QueryTypeFilter = 'all' | 'active' | 'inactive'\n\n// UTILS\n\nexport const isServer = typeof window === 'undefined' || 'Deno' in globalThis\n\nexport function noop(): void\nexport function noop(): undefined\nexport function noop() {}\n\nexport function functionalUpdate(\n updater: Updater,\n input: TInput,\n): TOutput {\n return typeof updater === 'function'\n ? (updater as (_: TInput) => TOutput)(input)\n : updater\n}\n\nexport function isValidTimeout(value: unknown): value is number {\n return typeof value === 'number' && value >= 0 && value !== Infinity\n}\n\nexport function timeUntilStale(updatedAt: number, staleTime?: number): number {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0)\n}\n\nexport function resolveStaleTime<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n staleTime:\n | undefined\n | StaleTimeFunction,\n query: Query,\n): StaleTime | undefined {\n return typeof staleTime === 'function' ? staleTime(query) : staleTime\n}\n\nexport function resolveEnabled<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n enabled: undefined | Enabled,\n query: Query,\n): boolean | undefined {\n return typeof enabled === 'function' ? enabled(query) : enabled\n}\n\nexport function matchQuery(\n filters: QueryFilters,\n query: Query,\n): boolean {\n const {\n type = 'all',\n exact,\n fetchStatus,\n predicate,\n queryKey,\n stale,\n } = filters\n\n if (queryKey) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false\n }\n }\n\n if (type !== 'all') {\n const isActive = query.isActive()\n if (type === 'active' && !isActive) {\n return false\n }\n if (type === 'inactive' && isActive) {\n return false\n }\n }\n\n if (typeof stale === 'boolean' && query.isStale() !== stale) {\n return false\n }\n\n if (fetchStatus && fetchStatus !== query.state.fetchStatus) {\n return false\n }\n\n if (predicate && !predicate(query)) {\n return false\n }\n\n return true\n}\n\nexport function matchMutation(\n filters: MutationFilters,\n mutation: Mutation,\n): boolean {\n const { exact, status, predicate, mutationKey } = filters\n if (mutationKey) {\n if (!mutation.options.mutationKey) {\n return false\n }\n if (exact) {\n if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {\n return false\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false\n }\n }\n\n if (status && mutation.state.status !== status) {\n return false\n }\n\n if (predicate && !predicate(mutation)) {\n return false\n }\n\n return true\n}\n\nexport function hashQueryKeyByOptions(\n queryKey: TQueryKey,\n options?: Pick, 'queryKeyHashFn'>,\n): string {\n const hashFn = options?.queryKeyHashFn || hashKey\n return hashFn(queryKey)\n}\n\n/**\n * Default query & mutation keys hash function.\n * Hashes the value into a stable hash.\n */\nexport function hashKey(queryKey: QueryKey | MutationKey): string {\n return JSON.stringify(queryKey, (_, val) =>\n isPlainObject(val)\n ? Object.keys(val)\n .sort()\n .reduce((result, key) => {\n result[key] = val[key]\n return result\n }, {} as any)\n : val,\n )\n}\n\n/**\n * Checks if key `b` partially matches with key `a`.\n */\nexport function partialMatchKey(a: QueryKey, b: QueryKey): boolean\nexport function partialMatchKey(a: any, b: any): boolean {\n if (a === b) {\n return true\n }\n\n if (typeof a !== typeof b) {\n return false\n }\n\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n return Object.keys(b).every((key) => partialMatchKey(a[key], b[key]))\n }\n\n return false\n}\n\nconst hasOwn = Object.prototype.hasOwnProperty\n\n/**\n * This function returns `a` if `b` is deeply equal.\n * If not, it will replace any deeply equal children of `b` with those of `a`.\n * This can be used for structural sharing between JSON values for example.\n */\nexport function replaceEqualDeep(a: unknown, b: T, depth?: number): T\nexport function replaceEqualDeep(a: any, b: any, depth = 0): any {\n if (a === b) {\n return a\n }\n\n if (depth > 500) return b\n\n const array = isPlainArray(a) && isPlainArray(b)\n\n if (!array && !(isPlainObject(a) && isPlainObject(b))) return b\n\n const aItems = array ? a : Object.keys(a)\n const aSize = aItems.length\n const bItems = array ? b : Object.keys(b)\n const bSize = bItems.length\n const copy: any = array ? new Array(bSize) : {}\n\n let equalItems = 0\n\n for (let i = 0; i < bSize; i++) {\n const key: any = array ? i : bItems[i]\n const aItem = a[key]\n const bItem = b[key]\n\n if (aItem === bItem) {\n copy[key] = aItem\n if (array ? i < aSize : hasOwn.call(a, key)) equalItems++\n continue\n }\n\n if (\n aItem === null ||\n bItem === null ||\n typeof aItem !== 'object' ||\n typeof bItem !== 'object'\n ) {\n copy[key] = bItem\n continue\n }\n\n const v = replaceEqualDeep(aItem, bItem, depth + 1)\n copy[key] = v\n if (v === aItem) equalItems++\n }\n\n return aSize === bSize && equalItems === aSize ? a : copy\n}\n\n/**\n * Shallow compare objects.\n */\nexport function shallowEqualObjects>(\n a: T,\n b: T | undefined,\n): boolean {\n if (!b || Object.keys(a).length !== Object.keys(b).length) {\n return false\n }\n\n for (const key in a) {\n if (a[key] !== b[key]) {\n return false\n }\n }\n\n return true\n}\n\nexport function isPlainArray(value: unknown): value is Array {\n return Array.isArray(value) && value.length === Object.keys(value).length\n}\n\n// Copied from: https://github.com/jonschlinkert/is-plain-object\nexport function isPlainObject(o: any): o is Record {\n if (!hasObjectPrototype(o)) {\n return false\n }\n\n // If has no constructor\n const ctor = o.constructor\n if (ctor === undefined) {\n return true\n }\n\n // If has modified prototype\n const prot = ctor.prototype\n if (!hasObjectPrototype(prot)) {\n return false\n }\n\n // If constructor does not have an Object-specific method\n if (!prot.hasOwnProperty('isPrototypeOf')) {\n return false\n }\n\n // Handles Objects created by Object.create()\n if (Object.getPrototypeOf(o) !== Object.prototype) {\n return false\n }\n\n // Most likely a plain Object\n return true\n}\n\nfunction hasObjectPrototype(o: any): boolean {\n return Object.prototype.toString.call(o) === '[object Object]'\n}\n\nexport function sleep(timeout: number): Promise {\n return new Promise((resolve) => {\n timeoutManager.setTimeout(resolve, timeout)\n })\n}\n\nexport function replaceData<\n TData,\n TOptions extends QueryOptions,\n>(prevData: TData | undefined, data: TData, options: TOptions): TData {\n if (typeof options.structuralSharing === 'function') {\n return options.structuralSharing(prevData, data) as TData\n } else if (options.structuralSharing !== false) {\n if (process.env.NODE_ENV !== 'production') {\n try {\n return replaceEqualDeep(prevData, data)\n } catch (error) {\n console.error(\n `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`,\n )\n\n // Prevent the replaceEqualDeep from being called again down below.\n throw error\n }\n }\n // Structurally share data between prev and new data if needed\n return replaceEqualDeep(prevData, data)\n }\n return data\n}\n\nexport function keepPreviousData(\n previousData: T | undefined,\n): T | undefined {\n return previousData\n}\n\nexport function addToEnd(items: Array, item: T, max = 0): Array {\n const newItems = [...items, item]\n return max && newItems.length > max ? newItems.slice(1) : newItems\n}\n\nexport function addToStart(items: Array, item: T, max = 0): Array {\n const newItems = [item, ...items]\n return max && newItems.length > max ? newItems.slice(0, -1) : newItems\n}\n\nexport const skipToken = Symbol()\nexport type SkipToken = typeof skipToken\n\nexport function ensureQueryFn<\n TQueryFnData = unknown,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: {\n queryFn?: QueryFunction | SkipToken\n queryHash?: string\n },\n fetchOptions?: FetchOptions,\n): QueryFunction {\n if (process.env.NODE_ENV !== 'production') {\n if (options.queryFn === skipToken) {\n console.error(\n `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`,\n )\n }\n }\n\n // if we attempt to retry a fetch that was triggered from an initialPromise\n // when we don't have a queryFn yet, we can't retry, so we just return the already rejected initialPromise\n // if an observer has already mounted, we will be able to retry with that queryFn\n if (!options.queryFn && fetchOptions?.initialPromise) {\n return () => fetchOptions.initialPromise!\n }\n\n if (!options.queryFn || options.queryFn === skipToken) {\n return () =>\n Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`))\n }\n\n return options.queryFn\n}\n\nexport function shouldThrowError) => boolean>(\n throwOnError: boolean | T | undefined,\n params: Parameters,\n): boolean {\n // Allow throwOnError function to override throwing behavior on a per-error basis\n if (typeof throwOnError === 'function') {\n return throwOnError(...params)\n }\n\n return !!throwOnError\n}\n\nexport function addConsumeAwareSignal(\n object: T,\n getSignal: () => AbortSignal,\n onCancelled: VoidFunction,\n): T & { signal: AbortSignal } {\n let consumed = false\n let signal: AbortSignal | undefined\n\n Object.defineProperty(object, 'signal', {\n enumerable: true,\n get: () => {\n signal ??= getSignal()\n if (consumed) {\n return signal\n }\n\n consumed = true\n if (signal.aborted) {\n onCancelled()\n } else {\n signal.addEventListener('abort', onCancelled, { once: true })\n }\n\n return signal\n },\n })\n\n return object as T & { signal: AbortSignal }\n}\n", "import { Subscribable } from './subscribable'\nimport { isServer } from './utils'\n\ntype Listener = (focused: boolean) => void\n\ntype SetupFn = (\n setFocused: (focused?: boolean) => void,\n) => (() => void) | undefined\n\nexport class FocusManager extends Subscribable {\n #focused?: boolean\n #cleanup?: () => void\n\n #setup: SetupFn\n\n constructor() {\n super()\n this.#setup = (onFocus) => {\n // addEventListener does not exist in React Native, but window does\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!isServer && window.addEventListener) {\n const listener = () => onFocus()\n // Listen to visibilitychange\n window.addEventListener('visibilitychange', listener, false)\n\n return () => {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('visibilitychange', listener)\n }\n }\n return\n }\n }\n\n protected onSubscribe(): void {\n if (!this.#cleanup) {\n this.setEventListener(this.#setup)\n }\n }\n\n protected onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#cleanup?.()\n this.#cleanup = undefined\n }\n }\n\n setEventListener(setup: SetupFn): void {\n this.#setup = setup\n this.#cleanup?.()\n this.#cleanup = setup((focused) => {\n if (typeof focused === 'boolean') {\n this.setFocused(focused)\n } else {\n this.onFocus()\n }\n })\n }\n\n setFocused(focused?: boolean): void {\n const changed = this.#focused !== focused\n if (changed) {\n this.#focused = focused\n this.onFocus()\n }\n }\n\n onFocus(): void {\n const isFocused = this.isFocused()\n this.listeners.forEach((listener) => {\n listener(isFocused)\n })\n }\n\n isFocused(): boolean {\n if (typeof this.#focused === 'boolean') {\n return this.#focused\n }\n\n // document global can be unavailable in react native\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n return globalThis.document?.visibilityState !== 'hidden'\n }\n}\n\nexport const focusManager = new FocusManager()\n", "/**\n * Thenable types which matches React's types for promises\n *\n * React seemingly uses `.status`, `.value` and `.reason` properties on a promises to optimistically unwrap data from promises\n *\n * @see https://github.com/facebook/react/blob/main/packages/shared/ReactTypes.js#L112-L138\n * @see https://github.com/facebook/react/blob/4f604941569d2e8947ce1460a0b2997e835f37b9/packages/react-debug-tools/src/ReactDebugHooks.js#L224-L227\n */\n\nimport { noop } from './utils'\n\ninterface Fulfilled {\n status: 'fulfilled'\n value: T\n}\ninterface Rejected {\n status: 'rejected'\n reason: unknown\n}\ninterface Pending {\n status: 'pending'\n\n /**\n * Resolve the promise with a value.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n resolve: (value: T) => void\n /**\n * Reject the promise with a reason.\n * Will remove the `resolve` and `reject` properties from the promise.\n */\n reject: (reason: unknown) => void\n}\n\nexport type FulfilledThenable = Promise & Fulfilled\nexport type RejectedThenable = Promise & Rejected\nexport type PendingThenable = Promise & Pending\n\nexport type Thenable =\n | FulfilledThenable\n | RejectedThenable\n | PendingThenable\n\nexport function pendingThenable(): PendingThenable {\n let resolve: Pending['resolve']\n let reject: Pending['reject']\n // this could use `Promise.withResolvers()` in the future\n const thenable = new Promise((_resolve, _reject) => {\n resolve = _resolve\n reject = _reject\n }) as PendingThenable\n\n thenable.status = 'pending'\n thenable.catch(() => {\n // prevent unhandled rejection errors\n })\n\n function finalize(data: Fulfilled | Rejected) {\n Object.assign(thenable, data)\n\n // clear pending props props to avoid calling them twice\n delete (thenable as Partial>).resolve\n delete (thenable as Partial>).reject\n }\n\n thenable.resolve = (value) => {\n finalize({\n status: 'fulfilled',\n value,\n })\n\n resolve(value)\n }\n thenable.reject = (reason) => {\n finalize({\n status: 'rejected',\n reason,\n })\n\n reject(reason)\n }\n\n return thenable\n}\n\n/**\n * This function takes a Promise-like input and detects whether the data\n * is synchronously available or not.\n *\n * It does not inspect .status, .value or .reason properties of the promise,\n * as those are not always available, and the .status of React's promises\n * should not be considered part of the public API.\n */\nexport function tryResolveSync(promise: Promise | Thenable) {\n let data: unknown\n\n promise\n .then((result) => {\n data = result\n return result\n }, noop)\n // .catch can be unavailable on certain kinds of thenable's\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n ?.catch(noop)\n\n if (data !== undefined) {\n return { data }\n }\n\n return undefined\n}\n", "import { tryResolveSync } from './thenable'\nimport { noop } from './utils'\nimport type {\n DefaultError,\n MutationKey,\n MutationMeta,\n MutationOptions,\n MutationScope,\n QueryKey,\n QueryMeta,\n QueryOptions,\n} from './types'\nimport type { QueryClient } from './queryClient'\nimport type { Query, QueryState } from './query'\nimport type { Mutation, MutationState } from './mutation'\n\n// TYPES\ntype TransformerFn = (data: any) => any\nfunction defaultTransformerFn(data: any): any {\n return data\n}\n\nexport interface DehydrateOptions {\n serializeData?: TransformerFn\n shouldDehydrateMutation?: (mutation: Mutation) => boolean\n shouldDehydrateQuery?: (query: Query) => boolean\n shouldRedactErrors?: (error: unknown) => boolean\n}\n\nexport interface HydrateOptions {\n defaultOptions?: {\n deserializeData?: TransformerFn\n queries?: QueryOptions\n mutations?: MutationOptions\n }\n}\n\ninterface DehydratedMutation {\n mutationKey?: MutationKey\n state: MutationState\n meta?: MutationMeta\n scope?: MutationScope\n}\n\ninterface DehydratedQuery {\n queryHash: string\n queryKey: QueryKey\n state: QueryState\n promise?: Promise\n meta?: QueryMeta\n // This is only optional because older versions of Query might have dehydrated\n // without it which we need to handle for backwards compatibility.\n // This should be changed to required in the future.\n dehydratedAt?: number\n}\n\nexport interface DehydratedState {\n mutations: Array\n queries: Array\n}\n\n// FUNCTIONS\n\nfunction dehydrateMutation(mutation: Mutation): DehydratedMutation {\n return {\n mutationKey: mutation.options.mutationKey,\n state: mutation.state,\n ...(mutation.options.scope && { scope: mutation.options.scope }),\n ...(mutation.meta && { meta: mutation.meta }),\n }\n}\n\n// Most config is not dehydrated but instead meant to configure again when\n// consuming the de/rehydrated data, typically with useQuery on the client.\n// Sometimes it might make sense to prefetch data on the server and include\n// in the html-payload, but not consume it on the initial render.\nfunction dehydrateQuery(\n query: Query,\n serializeData: TransformerFn,\n shouldRedactErrors: (error: unknown) => boolean,\n): DehydratedQuery {\n const dehydratePromise = () => {\n const promise = query.promise?.then(serializeData).catch((error) => {\n if (!shouldRedactErrors(error)) {\n // Reject original error if it should not be redacted\n return Promise.reject(error)\n }\n // If not in production, log original error before rejecting redacted error\n if (process.env.NODE_ENV !== 'production') {\n console.error(\n `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`,\n )\n }\n return Promise.reject(new Error('redacted'))\n })\n\n // Avoid unhandled promise rejections\n // We need the promise we dehydrate to reject to get the correct result into\n // the query cache, but we also want to avoid unhandled promise rejections\n // in whatever environment the prefetches are happening in.\n promise?.catch(noop)\n\n return promise\n }\n\n return {\n dehydratedAt: Date.now(),\n state: {\n ...query.state,\n ...(query.state.data !== undefined && {\n data: serializeData(query.state.data),\n }),\n },\n queryKey: query.queryKey,\n queryHash: query.queryHash,\n ...(query.state.status === 'pending' && {\n promise: dehydratePromise(),\n }),\n ...(query.meta && { meta: query.meta }),\n }\n}\n\nexport function defaultShouldDehydrateMutation(mutation: Mutation) {\n return mutation.state.isPaused\n}\n\nexport function defaultShouldDehydrateQuery(query: Query) {\n return query.state.status === 'success'\n}\n\nfunction defaultShouldRedactErrors(_: unknown) {\n return true\n}\n\nexport function dehydrate(\n client: QueryClient,\n options: DehydrateOptions = {},\n): DehydratedState {\n const filterMutation =\n options.shouldDehydrateMutation ??\n client.getDefaultOptions().dehydrate?.shouldDehydrateMutation ??\n defaultShouldDehydrateMutation\n\n const mutations = client\n .getMutationCache()\n .getAll()\n .flatMap((mutation) =>\n filterMutation(mutation) ? [dehydrateMutation(mutation)] : [],\n )\n\n const filterQuery =\n options.shouldDehydrateQuery ??\n client.getDefaultOptions().dehydrate?.shouldDehydrateQuery ??\n defaultShouldDehydrateQuery\n\n const shouldRedactErrors =\n options.shouldRedactErrors ??\n client.getDefaultOptions().dehydrate?.shouldRedactErrors ??\n defaultShouldRedactErrors\n\n const serializeData =\n options.serializeData ??\n client.getDefaultOptions().dehydrate?.serializeData ??\n defaultTransformerFn\n\n const queries = client\n .getQueryCache()\n .getAll()\n .flatMap((query) =>\n filterQuery(query)\n ? [dehydrateQuery(query, serializeData, shouldRedactErrors)]\n : [],\n )\n\n return { mutations, queries }\n}\n\nexport function hydrate(\n client: QueryClient,\n dehydratedState: unknown,\n options?: HydrateOptions,\n): void {\n if (typeof dehydratedState !== 'object' || dehydratedState === null) {\n return\n }\n\n const mutationCache = client.getMutationCache()\n const queryCache = client.getQueryCache()\n const deserializeData =\n options?.defaultOptions?.deserializeData ??\n client.getDefaultOptions().hydrate?.deserializeData ??\n defaultTransformerFn\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const mutations = (dehydratedState as DehydratedState).mutations || []\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const queries = (dehydratedState as DehydratedState).queries || []\n\n mutations.forEach(({ state, ...mutationOptions }) => {\n mutationCache.build(\n client,\n {\n ...client.getDefaultOptions().hydrate?.mutations,\n ...options?.defaultOptions?.mutations,\n ...mutationOptions,\n },\n state,\n )\n })\n\n queries.forEach(\n ({ queryKey, state, queryHash, meta, promise, dehydratedAt }) => {\n const syncData = promise ? tryResolveSync(promise) : undefined\n const rawData = state.data === undefined ? syncData?.data : state.data\n const data = rawData === undefined ? rawData : deserializeData(rawData)\n\n let query = queryCache.get(queryHash)\n const existingQueryIsPending = query?.state.status === 'pending'\n const existingQueryIsFetching = query?.state.fetchStatus === 'fetching'\n\n // Do not hydrate if an existing query exists with newer data\n if (query) {\n const hasNewerSyncData =\n syncData &&\n // We only need this undefined check to handle older dehydration\n // payloads that might not have dehydratedAt\n dehydratedAt !== undefined &&\n dehydratedAt > query.state.dataUpdatedAt\n if (\n state.dataUpdatedAt > query.state.dataUpdatedAt ||\n hasNewerSyncData\n ) {\n // omit fetchStatus from dehydrated state\n // so that query stays in its current fetchStatus\n const { fetchStatus: _ignored, ...serializedState } = state\n query.setState({\n ...serializedState,\n data,\n })\n }\n } else {\n // Restore query\n query = queryCache.build(\n client,\n {\n ...client.getDefaultOptions().hydrate?.queries,\n ...options?.defaultOptions?.queries,\n queryKey,\n queryHash,\n meta,\n },\n // Reset fetch status to idle to avoid\n // query being stuck in fetching state upon hydration\n {\n ...state,\n data,\n fetchStatus: 'idle',\n status: data !== undefined ? 'success' : state.status,\n },\n )\n }\n\n if (\n promise &&\n !existingQueryIsPending &&\n !existingQueryIsFetching &&\n // Only hydrate if dehydration is newer than any existing data,\n // this is always true for new queries\n (dehydratedAt === undefined || dehydratedAt > query.state.dataUpdatedAt)\n ) {\n // This doesn't actually fetch - it just creates a retryer\n // which will re-use the passed `initialPromise`\n // Note that we need to call these even when data was synchronously\n // available, as we still need to set up the retryer\n query\n .fetch(undefined, {\n // RSC transformed promises are not thenable\n initialPromise: Promise.resolve(promise).then(deserializeData),\n })\n // Avoid unhandled promise rejections\n .catch(noop)\n }\n },\n )\n}\n", "// TYPES\n\nimport { systemSetTimeoutZero } from './timeoutManager'\n\ntype NotifyCallback = () => void\n\ntype NotifyFunction = (callback: () => void) => void\n\ntype BatchNotifyFunction = (callback: () => void) => void\n\ntype BatchCallsCallback> = (...args: T) => void\n\ntype ScheduleFunction = (callback: () => void) => void\n\nexport const defaultScheduler: ScheduleFunction = systemSetTimeoutZero\n\nexport function createNotifyManager() {\n let queue: Array = []\n let transactions = 0\n let notifyFn: NotifyFunction = (callback) => {\n callback()\n }\n let batchNotifyFn: BatchNotifyFunction = (callback: () => void) => {\n callback()\n }\n let scheduleFn = defaultScheduler\n\n const schedule = (callback: NotifyCallback): void => {\n if (transactions) {\n queue.push(callback)\n } else {\n scheduleFn(() => {\n notifyFn(callback)\n })\n }\n }\n const flush = (): void => {\n const originalQueue = queue\n queue = []\n if (originalQueue.length) {\n scheduleFn(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback)\n })\n })\n })\n }\n }\n\n return {\n batch: (callback: () => T): T => {\n let result\n transactions++\n try {\n result = callback()\n } finally {\n transactions--\n if (!transactions) {\n flush()\n }\n }\n return result\n },\n /**\n * All calls to the wrapped function will be batched.\n */\n batchCalls: >(\n callback: BatchCallsCallback,\n ): BatchCallsCallback => {\n return (...args) => {\n schedule(() => {\n callback(...args)\n })\n }\n },\n schedule,\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n setNotifyFunction: (fn: NotifyFunction) => {\n notifyFn = fn\n },\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n setBatchNotifyFunction: (fn: BatchNotifyFunction) => {\n batchNotifyFn = fn\n },\n setScheduler: (fn: ScheduleFunction) => {\n scheduleFn = fn\n },\n } as const\n}\n\n// SINGLETON\nexport const notifyManager = createNotifyManager()\n", "import { Subscribable } from './subscribable'\nimport { isServer } from './utils'\n\ntype Listener = (online: boolean) => void\ntype SetupFn = (setOnline: Listener) => (() => void) | undefined\n\nexport class OnlineManager extends Subscribable {\n #online = true\n #cleanup?: () => void\n\n #setup: SetupFn\n\n constructor() {\n super()\n this.#setup = (onOnline) => {\n // addEventListener does not exist in React Native, but window does\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!isServer && window.addEventListener) {\n const onlineListener = () => onOnline(true)\n const offlineListener = () => onOnline(false)\n // Listen to online\n window.addEventListener('online', onlineListener, false)\n window.addEventListener('offline', offlineListener, false)\n\n return () => {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('online', onlineListener)\n window.removeEventListener('offline', offlineListener)\n }\n }\n\n return\n }\n }\n\n protected onSubscribe(): void {\n if (!this.#cleanup) {\n this.setEventListener(this.#setup)\n }\n }\n\n protected onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#cleanup?.()\n this.#cleanup = undefined\n }\n }\n\n setEventListener(setup: SetupFn): void {\n this.#setup = setup\n this.#cleanup?.()\n this.#cleanup = setup(this.setOnline.bind(this))\n }\n\n setOnline(online: boolean): void {\n const changed = this.#online !== online\n\n if (changed) {\n this.#online = online\n this.listeners.forEach((listener) => {\n listener(online)\n })\n }\n }\n\n isOnline(): boolean {\n return this.#online\n }\n}\n\nexport const onlineManager = new OnlineManager()\n", "import { focusManager } from './focusManager'\nimport { onlineManager } from './onlineManager'\nimport { pendingThenable } from './thenable'\nimport { isServer, sleep } from './utils'\nimport type { Thenable } from './thenable'\nimport type { CancelOptions, DefaultError, NetworkMode } from './types'\n\n// TYPES\n\ninterface RetryerConfig {\n fn: () => TData | Promise\n initialPromise?: Promise\n onCancel?: (error: TError) => void\n onFail?: (failureCount: number, error: TError) => void\n onPause?: () => void\n onContinue?: () => void\n retry?: RetryValue\n retryDelay?: RetryDelayValue\n networkMode: NetworkMode | undefined\n canRun: () => boolean\n}\n\nexport interface Retryer {\n promise: Promise\n cancel: (cancelOptions?: CancelOptions) => void\n continue: () => Promise\n cancelRetry: () => void\n continueRetry: () => void\n canStart: () => boolean\n start: () => Promise\n status: () => 'pending' | 'resolved' | 'rejected'\n}\n\nexport type RetryValue = boolean | number | ShouldRetryFunction\n\ntype ShouldRetryFunction = (\n failureCount: number,\n error: TError,\n) => boolean\n\nexport type RetryDelayValue = number | RetryDelayFunction\n\ntype RetryDelayFunction = (\n failureCount: number,\n error: TError,\n) => number\n\nfunction defaultRetryDelay(failureCount: number) {\n return Math.min(1000 * 2 ** failureCount, 30000)\n}\n\nexport function canFetch(networkMode: NetworkMode | undefined): boolean {\n return (networkMode ?? 'online') === 'online'\n ? onlineManager.isOnline()\n : true\n}\n\nexport class CancelledError extends Error {\n revert?: boolean\n silent?: boolean\n constructor(options?: CancelOptions) {\n super('CancelledError')\n this.revert = options?.revert\n this.silent = options?.silent\n }\n}\n\n/**\n * @deprecated Use instanceof `CancelledError` instead.\n */\nexport function isCancelledError(value: any): value is CancelledError {\n return value instanceof CancelledError\n}\n\nexport function createRetryer(\n config: RetryerConfig,\n): Retryer {\n let isRetryCancelled = false\n let failureCount = 0\n let continueFn: ((value?: unknown) => void) | undefined\n\n const thenable = pendingThenable()\n\n const isResolved = () =>\n (thenable.status as Thenable['status']) !== 'pending'\n\n const cancel = (cancelOptions?: CancelOptions): void => {\n if (!isResolved()) {\n const error = new CancelledError(cancelOptions) as TError\n reject(error)\n\n config.onCancel?.(error)\n }\n }\n const cancelRetry = () => {\n isRetryCancelled = true\n }\n\n const continueRetry = () => {\n isRetryCancelled = false\n }\n\n const canContinue = () =>\n focusManager.isFocused() &&\n (config.networkMode === 'always' || onlineManager.isOnline()) &&\n config.canRun()\n\n const canStart = () => canFetch(config.networkMode) && config.canRun()\n\n const resolve = (value: any) => {\n if (!isResolved()) {\n continueFn?.()\n thenable.resolve(value)\n }\n }\n\n const reject = (value: any) => {\n if (!isResolved()) {\n continueFn?.()\n thenable.reject(value)\n }\n }\n\n const pause = () => {\n return new Promise((continueResolve) => {\n continueFn = (value) => {\n if (isResolved() || canContinue()) {\n continueResolve(value)\n }\n }\n config.onPause?.()\n }).then(() => {\n continueFn = undefined\n if (!isResolved()) {\n config.onContinue?.()\n }\n })\n }\n\n // Create loop function\n const run = () => {\n // Do nothing if already resolved\n if (isResolved()) {\n return\n }\n\n let promiseOrValue: any\n\n // we can re-use config.initialPromise on the first call of run()\n const initialPromise =\n failureCount === 0 ? config.initialPromise : undefined\n\n // Execute query\n try {\n promiseOrValue = initialPromise ?? config.fn()\n } catch (error) {\n promiseOrValue = Promise.reject(error)\n }\n\n Promise.resolve(promiseOrValue)\n .then(resolve)\n .catch((error) => {\n // Stop if the fetch is already resolved\n if (isResolved()) {\n return\n }\n\n // Do we need to retry the request?\n const retry = config.retry ?? (isServer ? 0 : 3)\n const retryDelay = config.retryDelay ?? defaultRetryDelay\n const delay =\n typeof retryDelay === 'function'\n ? retryDelay(failureCount, error)\n : retryDelay\n const shouldRetry =\n retry === true ||\n (typeof retry === 'number' && failureCount < retry) ||\n (typeof retry === 'function' && retry(failureCount, error))\n\n if (isRetryCancelled || !shouldRetry) {\n // We are done if the query does not need to be retried\n reject(error)\n return\n }\n\n failureCount++\n\n // Notify on fail\n config.onFail?.(failureCount, error)\n\n // Delay\n sleep(delay)\n // Pause if the document is not visible or when the device is offline\n .then(() => {\n return canContinue() ? undefined : pause()\n })\n .then(() => {\n if (isRetryCancelled) {\n reject(error)\n } else {\n run()\n }\n })\n })\n }\n\n return {\n promise: thenable,\n status: () => thenable.status,\n cancel,\n continue: () => {\n continueFn?.()\n return thenable\n },\n cancelRetry,\n continueRetry,\n canStart,\n start: () => {\n // Start loop\n if (canStart()) {\n run()\n } else {\n pause().then(run)\n }\n return thenable\n },\n }\n}\n", "import { timeoutManager } from './timeoutManager'\nimport { isServer, isValidTimeout } from './utils'\nimport type { ManagedTimerId } from './timeoutManager'\n\nexport abstract class Removable {\n gcTime!: number\n #gcTimeout?: ManagedTimerId\n\n destroy(): void {\n this.clearGcTimeout()\n }\n\n protected scheduleGc(): void {\n this.clearGcTimeout()\n\n if (isValidTimeout(this.gcTime)) {\n this.#gcTimeout = timeoutManager.setTimeout(() => {\n this.optionalRemove()\n }, this.gcTime)\n }\n }\n\n protected updateGcTime(newGcTime: number | undefined): void {\n // Default to 5 minutes (Infinity for server-side) if no gcTime is set\n this.gcTime = Math.max(\n this.gcTime || 0,\n newGcTime ?? (isServer ? Infinity : 5 * 60 * 1000),\n )\n }\n\n protected clearGcTimeout() {\n if (this.#gcTimeout) {\n timeoutManager.clearTimeout(this.#gcTimeout)\n this.#gcTimeout = undefined\n }\n }\n\n protected abstract optionalRemove(): void\n}\n", "import {\n ensureQueryFn,\n noop,\n replaceData,\n resolveEnabled,\n resolveStaleTime,\n skipToken,\n timeUntilStale,\n} from './utils'\nimport { notifyManager } from './notifyManager'\nimport { CancelledError, canFetch, createRetryer } from './retryer'\nimport { Removable } from './removable'\nimport type { QueryCache } from './queryCache'\nimport type { QueryClient } from './queryClient'\nimport type {\n CancelOptions,\n DefaultError,\n FetchStatus,\n InitialDataFunction,\n OmitKeyof,\n QueryFunctionContext,\n QueryKey,\n QueryMeta,\n QueryOptions,\n QueryStatus,\n SetDataOptions,\n StaleTime,\n} from './types'\nimport type { QueryObserver } from './queryObserver'\nimport type { Retryer } from './retryer'\n\n// TYPES\n\ninterface QueryConfig<\n TQueryFnData,\n TError,\n TData,\n TQueryKey extends QueryKey = QueryKey,\n> {\n client: QueryClient\n queryKey: TQueryKey\n queryHash: string\n options?: QueryOptions\n defaultOptions?: QueryOptions\n state?: QueryState\n}\n\nexport interface QueryState {\n data: TData | undefined\n dataUpdateCount: number\n dataUpdatedAt: number\n error: TError | null\n errorUpdateCount: number\n errorUpdatedAt: number\n fetchFailureCount: number\n fetchFailureReason: TError | null\n fetchMeta: FetchMeta | null\n isInvalidated: boolean\n status: QueryStatus\n fetchStatus: FetchStatus\n}\n\nexport interface FetchContext<\n TQueryFnData,\n TError,\n TData,\n TQueryKey extends QueryKey = QueryKey,\n> {\n fetchFn: () => unknown | Promise\n fetchOptions?: FetchOptions\n signal: AbortSignal\n options: QueryOptions\n client: QueryClient\n queryKey: TQueryKey\n state: QueryState\n}\n\nexport interface QueryBehavior<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> {\n onFetch: (\n context: FetchContext,\n query: Query,\n ) => void\n}\n\nexport type FetchDirection = 'forward' | 'backward'\n\nexport interface FetchMeta {\n fetchMore?: { direction: FetchDirection }\n}\n\nexport interface FetchOptions {\n cancelRefetch?: boolean\n meta?: FetchMeta\n initialPromise?: Promise\n}\n\ninterface FailedAction {\n type: 'failed'\n failureCount: number\n error: TError\n}\n\ninterface FetchAction {\n type: 'fetch'\n meta?: FetchMeta\n}\n\ninterface SuccessAction {\n data: TData | undefined\n type: 'success'\n dataUpdatedAt?: number\n manual?: boolean\n}\n\ninterface ErrorAction {\n type: 'error'\n error: TError\n}\n\ninterface InvalidateAction {\n type: 'invalidate'\n}\n\ninterface PauseAction {\n type: 'pause'\n}\n\ninterface ContinueAction {\n type: 'continue'\n}\n\ninterface SetStateAction {\n type: 'setState'\n state: Partial>\n setStateOptions?: SetStateOptions\n}\n\nexport type Action =\n | ContinueAction\n | ErrorAction\n | FailedAction\n | FetchAction\n | InvalidateAction\n | PauseAction\n | SetStateAction\n | SuccessAction\n\nexport interface SetStateOptions {\n meta?: any\n}\n\n// CLASS\n\nexport class Query<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends Removable {\n queryKey: TQueryKey\n queryHash: string\n options!: QueryOptions\n state: QueryState\n\n #initialState: QueryState\n #revertState?: QueryState\n #cache: QueryCache\n #client: QueryClient\n #retryer?: Retryer\n observers: Array>\n #defaultOptions?: QueryOptions\n #abortSignalConsumed: boolean\n\n constructor(config: QueryConfig) {\n super()\n\n this.#abortSignalConsumed = false\n this.#defaultOptions = config.defaultOptions\n this.setOptions(config.options)\n this.observers = []\n this.#client = config.client\n this.#cache = this.#client.getQueryCache()\n this.queryKey = config.queryKey\n this.queryHash = config.queryHash\n this.#initialState = getDefaultState(this.options)\n this.state = config.state ?? this.#initialState\n this.scheduleGc()\n }\n get meta(): QueryMeta | undefined {\n return this.options.meta\n }\n\n get promise(): Promise | undefined {\n return this.#retryer?.promise\n }\n\n setOptions(\n options?: QueryOptions,\n ): void {\n this.options = { ...this.#defaultOptions, ...options }\n\n this.updateGcTime(this.options.gcTime)\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (this.state && this.state.data === undefined) {\n const defaultState = getDefaultState(this.options)\n if (defaultState.data !== undefined) {\n this.setState(\n successState(defaultState.data, defaultState.dataUpdatedAt),\n )\n this.#initialState = defaultState\n }\n }\n }\n\n protected optionalRemove() {\n if (!this.observers.length && this.state.fetchStatus === 'idle') {\n this.#cache.remove(this)\n }\n }\n\n setData(\n newData: TData,\n options?: SetDataOptions & { manual: boolean },\n ): TData {\n const data = replaceData(this.state.data, newData, this.options)\n\n // Set data and mark it as cached\n this.#dispatch({\n data,\n type: 'success',\n dataUpdatedAt: options?.updatedAt,\n manual: options?.manual,\n })\n\n return data\n }\n\n setState(\n state: Partial>,\n setStateOptions?: SetStateOptions,\n ): void {\n this.#dispatch({ type: 'setState', state, setStateOptions })\n }\n\n cancel(options?: CancelOptions): Promise {\n const promise = this.#retryer?.promise\n this.#retryer?.cancel(options)\n return promise ? promise.then(noop).catch(noop) : Promise.resolve()\n }\n\n destroy(): void {\n super.destroy()\n\n this.cancel({ silent: true })\n }\n\n reset(): void {\n this.destroy()\n this.setState(this.#initialState)\n }\n\n isActive(): boolean {\n return this.observers.some(\n (observer) => resolveEnabled(observer.options.enabled, this) !== false,\n )\n }\n\n isDisabled(): boolean {\n if (this.getObserversCount() > 0) {\n return !this.isActive()\n }\n // if a query has no observers, it should still be considered disabled if it never attempted a fetch\n return (\n this.options.queryFn === skipToken ||\n this.state.dataUpdateCount + this.state.errorUpdateCount === 0\n )\n }\n\n isStatic(): boolean {\n if (this.getObserversCount() > 0) {\n return this.observers.some(\n (observer) =>\n resolveStaleTime(observer.options.staleTime, this) === 'static',\n )\n }\n\n return false\n }\n\n isStale(): boolean {\n // check observers first, their `isStale` has the source of truth\n // calculated with `isStaleByTime` and it takes `enabled` into account\n if (this.getObserversCount() > 0) {\n return this.observers.some(\n (observer) => observer.getCurrentResult().isStale,\n )\n }\n\n return this.state.data === undefined || this.state.isInvalidated\n }\n\n isStaleByTime(staleTime: StaleTime = 0): boolean {\n // no data is always stale\n if (this.state.data === undefined) {\n return true\n }\n // static is never stale\n if (staleTime === 'static') {\n return false\n }\n // if the query is invalidated, it is stale\n if (this.state.isInvalidated) {\n return true\n }\n\n return !timeUntilStale(this.state.dataUpdatedAt, staleTime)\n }\n\n onFocus(): void {\n const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus())\n\n observer?.refetch({ cancelRefetch: false })\n\n // Continue fetch if currently paused\n this.#retryer?.continue()\n }\n\n onOnline(): void {\n const observer = this.observers.find((x) => x.shouldFetchOnReconnect())\n\n observer?.refetch({ cancelRefetch: false })\n\n // Continue fetch if currently paused\n this.#retryer?.continue()\n }\n\n addObserver(observer: QueryObserver): void {\n if (!this.observers.includes(observer)) {\n this.observers.push(observer)\n\n // Stop the query from being garbage collected\n this.clearGcTimeout()\n\n this.#cache.notify({ type: 'observerAdded', query: this, observer })\n }\n }\n\n removeObserver(observer: QueryObserver): void {\n if (this.observers.includes(observer)) {\n this.observers = this.observers.filter((x) => x !== observer)\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.#abortSignalConsumed) {\n this.#retryer.cancel({ revert: true })\n } else {\n this.#retryer.cancelRetry()\n }\n }\n\n this.scheduleGc()\n }\n\n this.#cache.notify({ type: 'observerRemoved', query: this, observer })\n }\n }\n\n getObserversCount(): number {\n return this.observers.length\n }\n\n invalidate(): void {\n if (!this.state.isInvalidated) {\n this.#dispatch({ type: 'invalidate' })\n }\n }\n\n async fetch(\n options?: QueryOptions,\n fetchOptions?: FetchOptions,\n ): Promise {\n if (\n this.state.fetchStatus !== 'idle' &&\n // If the promise in the retryer is already rejected, we have to definitely\n // re-start the fetch; there is a chance that the query is still in a\n // pending state when that happens\n this.#retryer?.status() !== 'rejected'\n ) {\n if (this.state.data !== undefined && fetchOptions?.cancelRefetch) {\n // Silently cancel current fetch if the user wants to cancel refetch\n this.cancel({ silent: true })\n } else if (this.#retryer) {\n // make sure that retries that were potentially cancelled due to unmounts can continue\n this.#retryer.continueRetry()\n // Return current promise if we are already fetching\n return this.#retryer.promise\n }\n }\n\n // Update config if passed, otherwise the config from the last execution is used\n if (options) {\n this.setOptions(options)\n }\n\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 if (!this.options.queryFn) {\n const observer = this.observers.find((x) => x.options.queryFn)\n if (observer) {\n this.setOptions(observer.options)\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!Array.isArray(this.options.queryKey)) {\n console.error(\n `As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`,\n )\n }\n }\n\n const abortController = new AbortController()\n\n // Adds an enumerable signal property to the object that\n // which sets abortSignalConsumed to true when the signal\n // is read.\n const addSignalProperty = (object: unknown) => {\n Object.defineProperty(object, 'signal', {\n enumerable: true,\n get: () => {\n this.#abortSignalConsumed = true\n return abortController.signal\n },\n })\n }\n\n // Create fetch function\n const fetchFn = () => {\n const queryFn = ensureQueryFn(this.options, fetchOptions)\n\n // Create query function context\n const createQueryFnContext = (): QueryFunctionContext => {\n const queryFnContext: OmitKeyof<\n QueryFunctionContext,\n 'signal'\n > = {\n client: this.#client,\n queryKey: this.queryKey,\n meta: this.meta,\n }\n addSignalProperty(queryFnContext)\n return queryFnContext as QueryFunctionContext\n }\n\n const queryFnContext = createQueryFnContext()\n\n this.#abortSignalConsumed = false\n if (this.options.persister) {\n return this.options.persister(\n queryFn,\n queryFnContext,\n this as unknown as Query,\n )\n }\n\n return queryFn(queryFnContext)\n }\n\n // Trigger behavior hook\n const createFetchContext = (): FetchContext<\n TQueryFnData,\n TError,\n TData,\n TQueryKey\n > => {\n const context: OmitKeyof<\n FetchContext,\n 'signal'\n > = {\n fetchOptions,\n options: this.options,\n queryKey: this.queryKey,\n client: this.#client,\n state: this.state,\n fetchFn,\n }\n\n addSignalProperty(context)\n return context as FetchContext\n }\n\n const context = createFetchContext()\n\n this.options.behavior?.onFetch(context, this as unknown as Query)\n\n // Store state in case the current fetch needs to be reverted\n this.#revertState = this.state\n\n // Set to fetching state if not already in it\n if (\n this.state.fetchStatus === 'idle' ||\n this.state.fetchMeta !== context.fetchOptions?.meta\n ) {\n this.#dispatch({ type: 'fetch', meta: context.fetchOptions?.meta })\n }\n\n // Try to fetch the data\n this.#retryer = createRetryer({\n initialPromise: fetchOptions?.initialPromise as\n | Promise\n | undefined,\n fn: context.fetchFn as () => Promise,\n onCancel: (error) => {\n if (error instanceof CancelledError && error.revert) {\n this.setState({\n ...this.#revertState,\n fetchStatus: 'idle' as const,\n })\n }\n abortController.abort()\n },\n onFail: (failureCount, error) => {\n this.#dispatch({ type: 'failed', failureCount, error })\n },\n onPause: () => {\n this.#dispatch({ type: 'pause' })\n },\n onContinue: () => {\n this.#dispatch({ type: 'continue' })\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay,\n networkMode: context.options.networkMode,\n canRun: () => true,\n })\n\n try {\n const data = await this.#retryer.start()\n // this is more of a runtime guard\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (data === undefined) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(\n `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`,\n )\n }\n throw new Error(`${this.queryHash} data is undefined`)\n }\n\n this.setData(data)\n\n // Notify cache callback\n this.#cache.config.onSuccess?.(data, this as Query)\n this.#cache.config.onSettled?.(\n data,\n this.state.error as any,\n this as Query,\n )\n return data\n } catch (error) {\n if (error instanceof CancelledError) {\n if (error.silent) {\n // silent cancellation implies a new fetch is going to be started,\n // so we piggyback onto that promise\n return this.#retryer.promise\n } else if (error.revert) {\n // transform error into reverted state data\n // if the initial fetch was cancelled, we have no data, so we have\n // to get reject with a CancelledError\n if (this.state.data === undefined) {\n throw error\n }\n return this.state.data\n }\n }\n this.#dispatch({\n type: 'error',\n error: error as TError,\n })\n\n // Notify cache callback\n this.#cache.config.onError?.(\n error as any,\n this as Query,\n )\n this.#cache.config.onSettled?.(\n this.state.data,\n error as any,\n this as Query,\n )\n\n throw error // rethrow the error for further handling\n } finally {\n // Schedule query gc after fetching\n this.scheduleGc()\n }\n }\n\n #dispatch(action: Action): void {\n const reducer = (\n state: QueryState,\n ): QueryState => {\n switch (action.type) {\n case 'failed':\n return {\n ...state,\n fetchFailureCount: action.failureCount,\n fetchFailureReason: action.error,\n }\n case 'pause':\n return {\n ...state,\n fetchStatus: 'paused',\n }\n case 'continue':\n return {\n ...state,\n fetchStatus: 'fetching',\n }\n case 'fetch':\n return {\n ...state,\n ...fetchState(state.data, this.options),\n fetchMeta: action.meta ?? null,\n }\n case 'success':\n const newState = {\n ...state,\n ...successState(action.data, action.dataUpdatedAt),\n dataUpdateCount: state.dataUpdateCount + 1,\n ...(!action.manual && {\n fetchStatus: 'idle' as const,\n fetchFailureCount: 0,\n fetchFailureReason: null,\n }),\n }\n // If fetching ends successfully, we don't need revertState as a fallback anymore.\n // For manual updates, capture the state to revert to it in case of a cancellation.\n this.#revertState = action.manual ? newState : undefined\n\n return newState\n case 'error':\n const error = action.error\n return {\n ...state,\n error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n fetchFailureReason: error,\n fetchStatus: 'idle',\n status: 'error',\n // flag existing data as invalidated if we get a background error\n // note that \"no data\" always means stale so we can set unconditionally here\n isInvalidated: true,\n }\n case 'invalidate':\n return {\n ...state,\n isInvalidated: true,\n }\n case 'setState':\n return {\n ...state,\n ...action.state,\n }\n }\n }\n\n this.state = reducer(this.state)\n\n notifyManager.batch(() => {\n this.observers.forEach((observer) => {\n observer.onQueryUpdate()\n })\n\n this.#cache.notify({ query: this, type: 'updated', action })\n })\n }\n}\n\nexport function fetchState<\n TQueryFnData,\n TError,\n TData,\n TQueryKey extends QueryKey,\n>(\n data: TData | undefined,\n options: QueryOptions,\n) {\n return {\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchStatus: canFetch(options.networkMode) ? 'fetching' : 'paused',\n ...(data === undefined &&\n ({\n error: null,\n status: 'pending',\n } as const)),\n } as const\n}\n\nfunction successState(data: TData | undefined, dataUpdatedAt?: number) {\n return {\n data,\n dataUpdatedAt: dataUpdatedAt ?? Date.now(),\n error: null,\n isInvalidated: false,\n status: 'success' as const,\n }\n}\n\nfunction getDefaultState<\n TQueryFnData,\n TError,\n TData,\n TQueryKey extends QueryKey,\n>(\n options: QueryOptions,\n): QueryState {\n const data =\n typeof options.initialData === 'function'\n ? (options.initialData as InitialDataFunction)()\n : options.initialData\n\n const hasData = data !== undefined\n\n const initialDataUpdatedAt = hasData\n ? typeof options.initialDataUpdatedAt === 'function'\n ? options.initialDataUpdatedAt()\n : options.initialDataUpdatedAt\n : 0\n\n return {\n data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? (initialDataUpdatedAt ?? Date.now()) : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchMeta: null,\n isInvalidated: false,\n status: hasData ? 'success' : 'pending',\n fetchStatus: 'idle',\n }\n}\n", "import { focusManager } from './focusManager'\nimport { notifyManager } from './notifyManager'\nimport { fetchState } from './query'\nimport { Subscribable } from './subscribable'\nimport { pendingThenable } from './thenable'\nimport {\n isServer,\n isValidTimeout,\n noop,\n replaceData,\n resolveEnabled,\n resolveStaleTime,\n shallowEqualObjects,\n timeUntilStale,\n} from './utils'\nimport { timeoutManager } from './timeoutManager'\nimport type { ManagedTimerId } from './timeoutManager'\nimport type { FetchOptions, Query, QueryState } from './query'\nimport type { QueryClient } from './queryClient'\nimport type { PendingThenable, Thenable } from './thenable'\nimport type {\n DefaultError,\n DefaultedQueryObserverOptions,\n PlaceholderDataFunction,\n QueryKey,\n QueryObserverBaseResult,\n QueryObserverOptions,\n QueryObserverResult,\n RefetchOptions,\n} from './types'\n\ntype QueryObserverListener = (\n result: QueryObserverResult,\n) => void\n\ninterface ObserverFetchOptions extends FetchOptions {\n throwOnError?: boolean\n}\n\nexport class QueryObserver<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> extends Subscribable> {\n #client: QueryClient\n #currentQuery: Query = undefined!\n #currentQueryInitialState: QueryState = undefined!\n #currentResult: QueryObserverResult = undefined!\n #currentResultState?: QueryState\n #currentResultOptions?: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >\n #currentThenable: Thenable\n #selectError: TError | null\n #selectFn?: (data: TQueryData) => TData\n #selectResult?: TData\n // This property keeps track of the last query with defined data.\n // It will be used to pass the previous data and query to the placeholder function between renders.\n #lastQueryWithDefinedData?: Query\n #staleTimeoutId?: ManagedTimerId\n #refetchIntervalId?: ManagedTimerId\n #currentRefetchInterval?: number | false\n #trackedProps = new Set()\n\n constructor(\n client: QueryClient,\n public options: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ) {\n super()\n\n this.#client = client\n this.#selectError = null\n this.#currentThenable = pendingThenable()\n\n this.bindMethods()\n this.setOptions(options)\n }\n\n protected bindMethods(): void {\n this.refetch = this.refetch.bind(this)\n }\n\n protected onSubscribe(): void {\n if (this.listeners.size === 1) {\n this.#currentQuery.addObserver(this)\n\n if (shouldFetchOnMount(this.#currentQuery, this.options)) {\n this.#executeFetch()\n } else {\n this.updateResult()\n }\n\n this.#updateTimers()\n }\n }\n\n protected onUnsubscribe(): void {\n if (!this.hasListeners()) {\n this.destroy()\n }\n }\n\n shouldFetchOnReconnect(): boolean {\n return shouldFetchOn(\n this.#currentQuery,\n this.options,\n this.options.refetchOnReconnect,\n )\n }\n\n shouldFetchOnWindowFocus(): boolean {\n return shouldFetchOn(\n this.#currentQuery,\n this.options,\n this.options.refetchOnWindowFocus,\n )\n }\n\n destroy(): void {\n this.listeners = new Set()\n this.#clearStaleTimeout()\n this.#clearRefetchInterval()\n this.#currentQuery.removeObserver(this)\n }\n\n setOptions(\n options: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ): void {\n const prevOptions = this.options\n const prevQuery = this.#currentQuery\n\n this.options = this.#client.defaultQueryOptions(options)\n\n if (\n this.options.enabled !== undefined &&\n typeof this.options.enabled !== 'boolean' &&\n typeof this.options.enabled !== 'function' &&\n typeof resolveEnabled(this.options.enabled, this.#currentQuery) !==\n 'boolean'\n ) {\n throw new Error(\n 'Expected enabled to be a boolean or a callback that returns a boolean',\n )\n }\n\n this.#updateQuery()\n this.#currentQuery.setOptions(this.options)\n\n if (\n prevOptions._defaulted &&\n !shallowEqualObjects(this.options, prevOptions)\n ) {\n this.#client.getQueryCache().notify({\n type: 'observerOptionsUpdated',\n query: this.#currentQuery,\n observer: this,\n })\n }\n\n const mounted = this.hasListeners()\n\n // Fetch if there are subscribers\n if (\n mounted &&\n shouldFetchOptionally(\n this.#currentQuery,\n prevQuery,\n this.options,\n prevOptions,\n )\n ) {\n this.#executeFetch()\n }\n\n // Update result\n this.updateResult()\n\n // Update stale interval if needed\n if (\n mounted &&\n (this.#currentQuery !== prevQuery ||\n resolveEnabled(this.options.enabled, this.#currentQuery) !==\n resolveEnabled(prevOptions.enabled, this.#currentQuery) ||\n resolveStaleTime(this.options.staleTime, this.#currentQuery) !==\n resolveStaleTime(prevOptions.staleTime, this.#currentQuery))\n ) {\n this.#updateStaleTimeout()\n }\n\n const nextRefetchInterval = this.#computeRefetchInterval()\n\n // Update refetch interval if needed\n if (\n mounted &&\n (this.#currentQuery !== prevQuery ||\n resolveEnabled(this.options.enabled, this.#currentQuery) !==\n resolveEnabled(prevOptions.enabled, this.#currentQuery) ||\n nextRefetchInterval !== this.#currentRefetchInterval)\n ) {\n this.#updateRefetchInterval(nextRefetchInterval)\n }\n }\n\n getOptimisticResult(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ): QueryObserverResult {\n const query = this.#client.getQueryCache().build(this.#client, options)\n\n const result = this.createResult(query, options)\n\n if (shouldAssignObserverCurrentProperties(this, result)) {\n // this assigns the optimistic result to the current Observer\n // because if the query function changes, useQuery will be performing\n // an effect where it would fetch again.\n // When the fetch finishes, we perform a deep data cloning in order\n // to reuse objects references. This deep data clone is performed against\n // the `observer.currentResult.data` property\n // When QueryKey changes, we refresh the query and get new `optimistic`\n // result, while we leave the `observer.currentResult`, so when new data\n // arrives, it finds the old `observer.currentResult` which is related\n // to the old QueryKey. Which means that currentResult and selectData are\n // out of sync already.\n // To solve this, we move the cursor of the currentResult every time\n // an observer reads an optimistic value.\n\n // When keeping the previous data, the result doesn't change until new\n // data arrives.\n this.#currentResult = result\n this.#currentResultOptions = this.options\n this.#currentResultState = this.#currentQuery.state\n }\n return result\n }\n\n getCurrentResult(): QueryObserverResult {\n return this.#currentResult\n }\n\n trackResult(\n result: QueryObserverResult,\n onPropTracked?: (key: keyof QueryObserverResult) => void,\n ): QueryObserverResult {\n return new Proxy(result, {\n get: (target, key) => {\n this.trackProp(key as keyof QueryObserverResult)\n onPropTracked?.(key as keyof QueryObserverResult)\n if (key === 'promise') {\n this.trackProp('data')\n if (\n !this.options.experimental_prefetchInRender &&\n this.#currentThenable.status === 'pending'\n ) {\n this.#currentThenable.reject(\n new Error(\n 'experimental_prefetchInRender feature flag is not enabled',\n ),\n )\n }\n }\n return Reflect.get(target, key)\n },\n })\n }\n\n trackProp(key: keyof QueryObserverResult) {\n this.#trackedProps.add(key)\n }\n\n getCurrentQuery(): Query {\n return this.#currentQuery\n }\n\n refetch({ ...options }: RefetchOptions = {}): Promise<\n QueryObserverResult\n > {\n return this.fetch({\n ...options,\n })\n }\n\n fetchOptimistic(\n options: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ): Promise> {\n const defaultedOptions = this.#client.defaultQueryOptions(options)\n\n const query = this.#client\n .getQueryCache()\n .build(this.#client, defaultedOptions)\n\n return query.fetch().then(() => this.createResult(query, defaultedOptions))\n }\n\n protected fetch(\n fetchOptions: ObserverFetchOptions,\n ): Promise> {\n return this.#executeFetch({\n ...fetchOptions,\n cancelRefetch: fetchOptions.cancelRefetch ?? true,\n }).then(() => {\n this.updateResult()\n return this.#currentResult\n })\n }\n\n #executeFetch(\n fetchOptions?: Omit,\n ): Promise {\n // Make sure we reference the latest query as the current one might have been removed\n this.#updateQuery()\n\n // Fetch\n let promise: Promise = this.#currentQuery.fetch(\n this.options,\n fetchOptions,\n )\n\n if (!fetchOptions?.throwOnError) {\n promise = promise.catch(noop)\n }\n\n return promise\n }\n\n #updateStaleTimeout(): void {\n this.#clearStaleTimeout()\n const staleTime = resolveStaleTime(\n this.options.staleTime,\n this.#currentQuery,\n )\n\n if (isServer || this.#currentResult.isStale || !isValidTimeout(staleTime)) {\n return\n }\n\n const time = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime)\n\n // 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 const timeout = time + 1\n\n this.#staleTimeoutId = timeoutManager.setTimeout(() => {\n if (!this.#currentResult.isStale) {\n this.updateResult()\n }\n }, timeout)\n }\n\n #computeRefetchInterval() {\n return (\n (typeof this.options.refetchInterval === 'function'\n ? this.options.refetchInterval(this.#currentQuery)\n : this.options.refetchInterval) ?? false\n )\n }\n\n #updateRefetchInterval(nextInterval: number | false): void {\n this.#clearRefetchInterval()\n\n this.#currentRefetchInterval = nextInterval\n\n if (\n isServer ||\n resolveEnabled(this.options.enabled, this.#currentQuery) === false ||\n !isValidTimeout(this.#currentRefetchInterval) ||\n this.#currentRefetchInterval === 0\n ) {\n return\n }\n\n this.#refetchIntervalId = timeoutManager.setInterval(() => {\n if (\n this.options.refetchIntervalInBackground ||\n focusManager.isFocused()\n ) {\n this.#executeFetch()\n }\n }, this.#currentRefetchInterval)\n }\n\n #updateTimers(): void {\n this.#updateStaleTimeout()\n this.#updateRefetchInterval(this.#computeRefetchInterval())\n }\n\n #clearStaleTimeout(): void {\n if (this.#staleTimeoutId) {\n timeoutManager.clearTimeout(this.#staleTimeoutId)\n this.#staleTimeoutId = undefined\n }\n }\n\n #clearRefetchInterval(): void {\n if (this.#refetchIntervalId) {\n timeoutManager.clearInterval(this.#refetchIntervalId)\n this.#refetchIntervalId = undefined\n }\n }\n\n protected createResult(\n query: Query,\n options: QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n ): QueryObserverResult {\n const prevQuery = this.#currentQuery\n const prevOptions = this.options\n const prevResult = this.#currentResult as\n | QueryObserverResult\n | undefined\n const prevResultState = this.#currentResultState\n const prevResultOptions = this.#currentResultOptions\n const queryChange = query !== prevQuery\n const queryInitialState = queryChange\n ? query.state\n : this.#currentQueryInitialState\n\n const { state } = query\n let newState = { ...state }\n let isPlaceholderData = false\n let data: TData | undefined\n\n // Optimistically set result in fetching state if needed\n if (options._optimisticResults) {\n const mounted = this.hasListeners()\n\n const fetchOnMount = !mounted && shouldFetchOnMount(query, options)\n\n const fetchOptionally =\n mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions)\n\n if (fetchOnMount || fetchOptionally) {\n newState = {\n ...newState,\n ...fetchState(state.data, query.options),\n }\n }\n if (options._optimisticResults === 'isRestoring') {\n newState.fetchStatus = 'idle'\n }\n }\n\n let { error, errorUpdatedAt, status } = newState\n\n // Per default, use query data\n data = newState.data as unknown as TData\n let skipSelect = false\n\n // use placeholderData if needed\n if (\n options.placeholderData !== undefined &&\n data === undefined &&\n status === 'pending'\n ) {\n let placeholderData\n\n // Memoize placeholder data\n if (\n prevResult?.isPlaceholderData &&\n options.placeholderData === prevResultOptions?.placeholderData\n ) {\n placeholderData = prevResult.data\n // we have to skip select when reading this memoization\n // because prevResult.data is already \"selected\"\n skipSelect = true\n } else {\n // compute placeholderData\n placeholderData =\n typeof options.placeholderData === 'function'\n ? (\n options.placeholderData as unknown as PlaceholderDataFunction\n )(\n this.#lastQueryWithDefinedData?.state.data,\n this.#lastQueryWithDefinedData as any,\n )\n : options.placeholderData\n }\n\n if (placeholderData !== undefined) {\n status = 'success'\n data = replaceData(\n prevResult?.data,\n placeholderData as unknown,\n options,\n ) as TData\n isPlaceholderData = true\n }\n }\n\n // Select data if needed\n // this also runs placeholderData through the select function\n if (options.select && data !== undefined && !skipSelect) {\n // Memoize select result\n if (\n prevResult &&\n data === prevResultState?.data &&\n options.select === this.#selectFn\n ) {\n data = this.#selectResult\n } else {\n try {\n this.#selectFn = options.select\n data = options.select(data as any)\n data = replaceData(prevResult?.data, data, options)\n this.#selectResult = data\n this.#selectError = null\n } catch (selectError) {\n this.#selectError = selectError as TError\n }\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 const isFetching = newState.fetchStatus === 'fetching'\n const isPending = status === 'pending'\n const isError = status === 'error'\n\n const isLoading = isPending && isFetching\n const hasData = data !== undefined\n\n const result: QueryObserverBaseResult = {\n status,\n fetchStatus: newState.fetchStatus,\n isPending,\n isSuccess: status === 'success',\n isError,\n isInitialLoading: isLoading,\n isLoading,\n data,\n dataUpdatedAt: newState.dataUpdatedAt,\n error,\n errorUpdatedAt,\n failureCount: newState.fetchFailureCount,\n failureReason: newState.fetchFailureReason,\n errorUpdateCount: newState.errorUpdateCount,\n isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,\n isFetchedAfterMount:\n newState.dataUpdateCount > queryInitialState.dataUpdateCount ||\n newState.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching,\n isRefetching: isFetching && !isPending,\n isLoadingError: isError && !hasData,\n isPaused: newState.fetchStatus === 'paused',\n isPlaceholderData,\n isRefetchError: isError && hasData,\n isStale: isStale(query, options),\n refetch: this.refetch,\n promise: this.#currentThenable,\n isEnabled: resolveEnabled(options.enabled, query) !== false,\n }\n\n const nextResult = result as QueryObserverResult\n\n if (this.options.experimental_prefetchInRender) {\n const hasResultData = nextResult.data !== undefined\n const isErrorWithoutData = nextResult.status === 'error' && !hasResultData\n const finalizeThenableIfPossible = (thenable: PendingThenable) => {\n if (isErrorWithoutData) {\n thenable.reject(nextResult.error)\n } else if (hasResultData) {\n thenable.resolve(nextResult.data as TData)\n }\n }\n\n /**\n * Create a new thenable and result promise when the results have changed\n */\n const recreateThenable = () => {\n const pending =\n (this.#currentThenable =\n nextResult.promise =\n pendingThenable())\n\n finalizeThenableIfPossible(pending)\n }\n\n const prevThenable = this.#currentThenable\n switch (prevThenable.status) {\n case 'pending':\n // Finalize the previous thenable if it was pending\n // and we are still observing the same query\n if (query.queryHash === prevQuery.queryHash) {\n finalizeThenableIfPossible(prevThenable)\n }\n break\n case 'fulfilled':\n if (isErrorWithoutData || nextResult.data !== prevThenable.value) {\n recreateThenable()\n }\n break\n case 'rejected':\n if (!isErrorWithoutData || nextResult.error !== prevThenable.reason) {\n recreateThenable()\n }\n break\n }\n }\n\n return nextResult\n }\n\n updateResult(): void {\n const prevResult = this.#currentResult as\n | QueryObserverResult\n | undefined\n\n const nextResult = this.createResult(this.#currentQuery, this.options)\n\n this.#currentResultState = this.#currentQuery.state\n this.#currentResultOptions = this.options\n\n if (this.#currentResultState.data !== undefined) {\n this.#lastQueryWithDefinedData = this.#currentQuery\n }\n\n // Only notify and update result if something has changed\n if (shallowEqualObjects(nextResult, prevResult)) {\n return\n }\n\n this.#currentResult = nextResult\n\n const shouldNotifyListeners = (): boolean => {\n if (!prevResult) {\n return true\n }\n\n const { notifyOnChangeProps } = this.options\n const notifyOnChangePropsValue =\n typeof notifyOnChangeProps === 'function'\n ? notifyOnChangeProps()\n : notifyOnChangeProps\n\n if (\n notifyOnChangePropsValue === 'all' ||\n (!notifyOnChangePropsValue && !this.#trackedProps.size)\n ) {\n return true\n }\n\n const includedProps = new Set(\n notifyOnChangePropsValue ?? this.#trackedProps,\n )\n\n if (this.options.throwOnError) {\n includedProps.add('error')\n }\n\n return Object.keys(this.#currentResult).some((key) => {\n const typedKey = key as keyof QueryObserverResult\n const changed = this.#currentResult[typedKey] !== prevResult[typedKey]\n\n return changed && includedProps.has(typedKey)\n })\n }\n\n this.#notify({ listeners: shouldNotifyListeners() })\n }\n\n #updateQuery(): void {\n const query = this.#client.getQueryCache().build(this.#client, this.options)\n\n if (query === this.#currentQuery) {\n return\n }\n\n const prevQuery = this.#currentQuery as\n | Query\n | undefined\n this.#currentQuery = query\n this.#currentQueryInitialState = query.state\n\n if (this.hasListeners()) {\n prevQuery?.removeObserver(this)\n query.addObserver(this)\n }\n }\n\n onQueryUpdate(): void {\n this.updateResult()\n\n if (this.hasListeners()) {\n this.#updateTimers()\n }\n }\n\n #notify(notifyOptions: { listeners: boolean }): void {\n notifyManager.batch(() => {\n // First, trigger the listeners\n if (notifyOptions.listeners) {\n this.listeners.forEach((listener) => {\n listener(this.#currentResult)\n })\n }\n\n // Then the cache listeners\n this.#client.getQueryCache().notify({\n query: this.#currentQuery,\n type: 'observerResultsUpdated',\n })\n })\n }\n}\n\nfunction shouldLoadOnMount(\n query: Query,\n options: QueryObserverOptions,\n): boolean {\n return (\n resolveEnabled(options.enabled, query) !== false &&\n query.state.data === undefined &&\n !(query.state.status === 'error' && options.retryOnMount === false)\n )\n}\n\nfunction shouldFetchOnMount(\n query: Query,\n options: QueryObserverOptions,\n): boolean {\n return (\n shouldLoadOnMount(query, options) ||\n (query.state.data !== undefined &&\n shouldFetchOn(query, options, options.refetchOnMount))\n )\n}\n\nfunction shouldFetchOn(\n query: Query,\n options: QueryObserverOptions,\n field: (typeof options)['refetchOnMount'] &\n (typeof options)['refetchOnWindowFocus'] &\n (typeof options)['refetchOnReconnect'],\n) {\n if (\n resolveEnabled(options.enabled, query) !== false &&\n resolveStaleTime(options.staleTime, query) !== 'static'\n ) {\n const value = typeof field === 'function' ? field(query) : field\n\n return value === 'always' || (value !== false && isStale(query, options))\n }\n return false\n}\n\nfunction shouldFetchOptionally(\n query: Query,\n prevQuery: Query,\n options: QueryObserverOptions,\n prevOptions: QueryObserverOptions,\n): boolean {\n return (\n (query !== prevQuery ||\n resolveEnabled(prevOptions.enabled, query) === false) &&\n (!options.suspense || query.state.status !== 'error') &&\n isStale(query, options)\n )\n}\n\nfunction isStale(\n query: Query,\n options: QueryObserverOptions,\n): boolean {\n return (\n resolveEnabled(options.enabled, query) !== false &&\n query.isStaleByTime(resolveStaleTime(options.staleTime, query))\n )\n}\n\n// this function would decide if we will update the observer's 'current'\n// properties after an optimistic reading via getOptimisticResult\nfunction shouldAssignObserverCurrentProperties<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n observer: QueryObserver,\n optimisticResult: QueryObserverResult,\n) {\n // if the newly created result isn't what the observer is holding as current,\n // then we'll need to update the properties as well\n if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {\n return true\n }\n\n // basically, just keep previous properties if nothing changed\n return false\n}\n", "import {\n addConsumeAwareSignal,\n addToEnd,\n addToStart,\n ensureQueryFn,\n} from './utils'\nimport type { QueryBehavior } from './query'\nimport type {\n InfiniteData,\n InfiniteQueryPageParamsOptions,\n OmitKeyof,\n QueryFunctionContext,\n QueryKey,\n} from './types'\n\nexport function infiniteQueryBehavior(\n pages?: number,\n): QueryBehavior> {\n return {\n onFetch: (context, query) => {\n const options = context.options as InfiniteQueryPageParamsOptions\n const direction = context.fetchOptions?.meta?.fetchMore?.direction\n const oldPages = context.state.data?.pages || []\n const oldPageParams = context.state.data?.pageParams || []\n let result: InfiniteData = { pages: [], pageParams: [] }\n let currentPage = 0\n\n const fetchFn = async () => {\n let cancelled = false\n const addSignalProperty = (object: unknown) => {\n addConsumeAwareSignal(\n object,\n () => context.signal,\n () => (cancelled = true),\n )\n }\n\n const queryFn = ensureQueryFn(context.options, context.fetchOptions)\n\n // Create function to fetch a page\n const fetchPage = async (\n data: InfiniteData,\n param: unknown,\n previous?: boolean,\n ): Promise> => {\n if (cancelled) {\n return Promise.reject()\n }\n\n if (param == null && data.pages.length) {\n return Promise.resolve(data)\n }\n\n const createQueryFnContext = () => {\n const queryFnContext: OmitKeyof<\n QueryFunctionContext,\n 'signal'\n > = {\n client: context.client,\n queryKey: context.queryKey,\n pageParam: param,\n direction: previous ? 'backward' : 'forward',\n meta: context.options.meta,\n }\n addSignalProperty(queryFnContext)\n return queryFnContext as QueryFunctionContext\n }\n\n const queryFnContext = createQueryFnContext()\n\n const page = await queryFn(queryFnContext)\n\n const { maxPages } = context.options\n const addTo = previous ? addToStart : addToEnd\n\n return {\n pages: addTo(data.pages, page, maxPages),\n pageParams: addTo(data.pageParams, param, maxPages),\n }\n }\n\n // fetch next / previous page?\n if (direction && oldPages.length) {\n const previous = direction === 'backward'\n const pageParamFn = previous ? getPreviousPageParam : getNextPageParam\n const oldData = {\n pages: oldPages,\n pageParams: oldPageParams,\n }\n const param = pageParamFn(options, oldData)\n\n result = await fetchPage(oldData, param, previous)\n } else {\n const remainingPages = pages ?? oldPages.length\n\n // Fetch all pages\n do {\n const param =\n currentPage === 0\n ? (oldPageParams[0] ?? options.initialPageParam)\n : getNextPageParam(options, result)\n if (currentPage > 0 && param == null) {\n break\n }\n result = await fetchPage(result, param)\n currentPage++\n } while (currentPage < remainingPages)\n }\n\n return result\n }\n if (context.options.persister) {\n context.fetchFn = () => {\n return context.options.persister?.(\n fetchFn as any,\n {\n client: context.client,\n queryKey: context.queryKey,\n meta: context.options.meta,\n signal: context.signal,\n },\n query,\n )\n }\n } else {\n context.fetchFn = fetchFn\n }\n },\n }\n}\n\nfunction getNextPageParam(\n options: InfiniteQueryPageParamsOptions,\n { pages, pageParams }: InfiniteData,\n): unknown | undefined {\n const lastIndex = pages.length - 1\n return pages.length > 0\n ? options.getNextPageParam(\n pages[lastIndex],\n pages,\n pageParams[lastIndex],\n pageParams,\n )\n : undefined\n}\n\nfunction getPreviousPageParam(\n options: InfiniteQueryPageParamsOptions,\n { pages, pageParams }: InfiniteData,\n): unknown | undefined {\n return pages.length > 0\n ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams)\n : undefined\n}\n\n/**\n * Checks if there is a next page.\n */\nexport function hasNextPage(\n options: InfiniteQueryPageParamsOptions,\n data?: InfiniteData,\n): boolean {\n if (!data) return false\n return getNextPageParam(options, data) != null\n}\n\n/**\n * Checks if there is a previous page.\n */\nexport function hasPreviousPage(\n options: InfiniteQueryPageParamsOptions,\n data?: InfiniteData,\n): boolean {\n if (!data || !options.getPreviousPageParam) return false\n return getPreviousPageParam(options, data) != null\n}\n", "import { QueryObserver } from './queryObserver'\nimport {\n hasNextPage,\n hasPreviousPage,\n infiniteQueryBehavior,\n} from './infiniteQueryBehavior'\nimport type { Subscribable } from './subscribable'\nimport type {\n DefaultError,\n DefaultedInfiniteQueryObserverOptions,\n FetchNextPageOptions,\n FetchPreviousPageOptions,\n InfiniteData,\n InfiniteQueryObserverBaseResult,\n InfiniteQueryObserverOptions,\n InfiniteQueryObserverResult,\n QueryKey,\n} from './types'\nimport type { QueryClient } from './queryClient'\nimport type { Query } from './query'\n\ntype InfiniteQueryObserverListener = (\n result: InfiniteQueryObserverResult,\n) => void\n\nexport class InfiniteQueryObserver<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = InfiniteData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> extends QueryObserver<\n TQueryFnData,\n TError,\n TData,\n InfiniteData,\n TQueryKey\n> {\n // Type override\n subscribe!: Subscribable<\n InfiniteQueryObserverListener\n >['subscribe']\n\n // Type override\n getCurrentResult!: ReplaceReturnType<\n QueryObserver<\n TQueryFnData,\n TError,\n TData,\n InfiniteData,\n TQueryKey\n >['getCurrentResult'],\n InfiniteQueryObserverResult\n >\n\n // Type override\n protected fetch!: ReplaceReturnType<\n QueryObserver<\n TQueryFnData,\n TError,\n TData,\n InfiniteData,\n TQueryKey\n >['fetch'],\n Promise>\n >\n\n constructor(\n client: QueryClient,\n options: InfiniteQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n ) {\n super(client, options)\n }\n\n protected bindMethods(): void {\n super.bindMethods()\n this.fetchNextPage = this.fetchNextPage.bind(this)\n this.fetchPreviousPage = this.fetchPreviousPage.bind(this)\n }\n\n setOptions(\n options: InfiniteQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n ): void {\n super.setOptions({\n ...options,\n behavior: infiniteQueryBehavior(),\n })\n }\n\n getOptimisticResult(\n options: DefaultedInfiniteQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n ): InfiniteQueryObserverResult {\n options.behavior = infiniteQueryBehavior()\n return super.getOptimisticResult(options) as InfiniteQueryObserverResult<\n TData,\n TError\n >\n }\n\n fetchNextPage(\n options?: FetchNextPageOptions,\n ): Promise> {\n return this.fetch({\n ...options,\n meta: {\n fetchMore: { direction: 'forward' },\n },\n })\n }\n\n fetchPreviousPage(\n options?: FetchPreviousPageOptions,\n ): Promise> {\n return this.fetch({\n ...options,\n meta: {\n fetchMore: { direction: 'backward' },\n },\n })\n }\n\n protected createResult(\n query: Query<\n TQueryFnData,\n TError,\n InfiniteData,\n TQueryKey\n >,\n options: InfiniteQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n ): InfiniteQueryObserverResult {\n const { state } = query\n const parentResult = super.createResult(query, options)\n\n const { isFetching, isRefetching, isError, isRefetchError } = parentResult\n const fetchDirection = state.fetchMeta?.fetchMore?.direction\n\n const isFetchNextPageError = isError && fetchDirection === 'forward'\n const isFetchingNextPage = isFetching && fetchDirection === 'forward'\n\n const isFetchPreviousPageError = isError && fetchDirection === 'backward'\n const isFetchingPreviousPage = isFetching && fetchDirection === 'backward'\n\n const result: InfiniteQueryObserverBaseResult = {\n ...parentResult,\n fetchNextPage: this.fetchNextPage,\n fetchPreviousPage: this.fetchPreviousPage,\n hasNextPage: hasNextPage(options, state.data),\n hasPreviousPage: hasPreviousPage(options, state.data),\n isFetchNextPageError,\n isFetchingNextPage,\n isFetchPreviousPageError,\n isFetchingPreviousPage,\n isRefetchError:\n isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,\n isRefetching:\n isRefetching && !isFetchingNextPage && !isFetchingPreviousPage,\n }\n\n return result as InfiniteQueryObserverResult\n }\n}\n\ntype ReplaceReturnType<\n TFunction extends (...args: Array) => unknown,\n TReturn,\n> = (...args: Parameters) => TReturn\n", "import { notifyManager } from './notifyManager'\nimport { Removable } from './removable'\nimport { createRetryer } from './retryer'\nimport type {\n DefaultError,\n MutationFunctionContext,\n MutationMeta,\n MutationOptions,\n MutationStatus,\n} from './types'\nimport type { MutationCache } from './mutationCache'\nimport type { MutationObserver } from './mutationObserver'\nimport type { Retryer } from './retryer'\nimport type { QueryClient } from './queryClient'\n\n// TYPES\n\ninterface MutationConfig {\n client: QueryClient\n mutationId: number\n mutationCache: MutationCache\n options: MutationOptions\n state?: MutationState\n}\n\nexport interface MutationState<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> {\n context: TOnMutateResult | undefined\n data: TData | undefined\n error: TError | null\n failureCount: number\n failureReason: TError | null\n isPaused: boolean\n status: MutationStatus\n variables: TVariables | undefined\n submittedAt: number\n}\n\ninterface FailedAction {\n type: 'failed'\n failureCount: number\n error: TError | null\n}\n\ninterface PendingAction {\n type: 'pending'\n isPaused: boolean\n variables?: TVariables\n context?: TOnMutateResult\n}\n\ninterface SuccessAction {\n type: 'success'\n data: TData\n}\n\ninterface ErrorAction {\n type: 'error'\n error: TError\n}\n\ninterface PauseAction {\n type: 'pause'\n}\n\ninterface ContinueAction {\n type: 'continue'\n}\n\nexport type Action =\n | ContinueAction\n | ErrorAction\n | FailedAction\n | PendingAction\n | PauseAction\n | SuccessAction\n\n// CLASS\n\nexport class Mutation<\n TData = unknown,\n TError = DefaultError,\n TVariables = unknown,\n TOnMutateResult = unknown,\n> extends Removable {\n state: MutationState\n options!: MutationOptions\n readonly mutationId: number\n\n #client: QueryClient\n #observers: Array<\n MutationObserver