@jskit-ai/assistant-voice 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/examples/conversation/package.json +8 -8
  2. package/package.json +1 -1
  3. package/examples/conversation/dist/assets/error-DOwCrGXH.js +0 -1
  4. package/examples/conversation/dist/assets/index-Bq1DwQwF.js +0 -90
  5. package/examples/conversation/dist/assets/index-Bw7_l3Cu.css +0 -1
  6. package/examples/conversation/dist/assets/placement-CUwf_TAl.js +0 -1
  7. package/examples/conversation/dist/assets/placementTopology-CUwf_TAl.js +0 -1
  8. package/examples/conversation/dist/index.html +0 -3
  9. package/examples/conversation/node_modules/.vite/deps/@jskit-ai_kernel_client_moduleBootstrap.js +0 -824
  10. package/examples/conversation/node_modules/.vite/deps/@jskit-ai_kernel_client_moduleBootstrap.js.map +0 -1
  11. package/examples/conversation/node_modules/.vite/deps/@mdi_js.js +0 -7450
  12. package/examples/conversation/node_modules/.vite/deps/@mdi_js.js.map +0 -1
  13. package/examples/conversation/node_modules/.vite/deps/@tanstack_vue-query.js +0 -3965
  14. package/examples/conversation/node_modules/.vite/deps/@tanstack_vue-query.js.map +0 -1
  15. package/examples/conversation/node_modules/.vite/deps/VTooltip-Nwckus73.js +0 -2311
  16. package/examples/conversation/node_modules/.vite/deps/VTooltip-Nwckus73.js.map +0 -1
  17. package/examples/conversation/node_modules/.vite/deps/_metadata.json +0 -110
  18. package/examples/conversation/node_modules/.vite/deps/defineComponent-Bx_4rnHZ.js +0 -710
  19. package/examples/conversation/node_modules/.vite/deps/defineComponent-Bx_4rnHZ.js.map +0 -1
  20. package/examples/conversation/node_modules/.vite/deps/dist-CUIjXXPV.js +0 -3878
  21. package/examples/conversation/node_modules/.vite/deps/dist-CUIjXXPV.js.map +0 -1
  22. package/examples/conversation/node_modules/.vite/deps/hotkey-parsing-B5h5TiMG.js +0 -1214
  23. package/examples/conversation/node_modules/.vite/deps/hotkey-parsing-B5h5TiMG.js.map +0 -1
  24. package/examples/conversation/node_modules/.vite/deps/icons-DPtxVIU0.js +0 -98
  25. package/examples/conversation/node_modules/.vite/deps/icons-DPtxVIU0.js.map +0 -1
  26. package/examples/conversation/node_modules/.vite/deps/json-rest-schema.js +0 -2071
  27. package/examples/conversation/node_modules/.vite/deps/json-rest-schema.js.map +0 -1
  28. package/examples/conversation/node_modules/.vite/deps/package.json +0 -3
  29. package/examples/conversation/node_modules/.vite/deps/pinia.js +0 -1453
  30. package/examples/conversation/node_modules/.vite/deps/pinia.js.map +0 -1
  31. package/examples/conversation/node_modules/.vite/deps/socket__io-client.js +0 -3899
  32. package/examples/conversation/node_modules/.vite/deps/socket__io-client.js.map +0 -1
  33. package/examples/conversation/node_modules/.vite/deps/theme-BSn2V8xv.js +0 -1301
  34. package/examples/conversation/node_modules/.vite/deps/theme-BSn2V8xv.js.map +0 -1
  35. package/examples/conversation/node_modules/.vite/deps/vue-router.js +0 -2989
  36. package/examples/conversation/node_modules/.vite/deps/vue-router.js.map +0 -1
  37. package/examples/conversation/node_modules/.vite/deps/vue.js +0 -2
  38. package/examples/conversation/node_modules/.vite/deps/vue.runtime.esm-bundler-DWdvffrK.js +0 -8890
  39. package/examples/conversation/node_modules/.vite/deps/vue.runtime.esm-bundler-DWdvffrK.js.map +0 -1
  40. package/examples/conversation/node_modules/.vite/deps/vuetify.js +0 -413
  41. package/examples/conversation/node_modules/.vite/deps/vuetify.js.map +0 -1
  42. package/examples/conversation/node_modules/.vite/deps/vuetify_components.js +0 -25370
  43. package/examples/conversation/node_modules/.vite/deps/vuetify_components.js.map +0 -1
  44. package/examples/conversation/node_modules/.vite/deps/vuetify_directives.js +0 -132
  45. package/examples/conversation/node_modules/.vite/deps/vuetify_directives.js.map +0 -1
  46. package/examples/conversation/node_modules/.vite/deps/vuetify_iconsets_mdi-svg.js +0 -70
  47. package/examples/conversation/node_modules/.vite/deps/vuetify_iconsets_mdi-svg.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"@tanstack_vue-query.js","names":["#setup","#cleanup","#focused","#providerCalled","#provider","isPlainObject","#setup","#cleanup","#online","#gcTimeout","#abortSignalConsumed","#defaultOptions","#client","#cache","#initialState","getDefaultState","#queryType","#retryer","#dispatch","#isInitialPausedFetch","#revertState","#client","#selectError","#currentThenable","#currentQuery","#executeFetch","#updateTimers","#clearStaleTimeout","#clearRefetchInterval","#updateQuery","#updateStaleTimeout","#computeRefetchInterval","#currentRefetchInterval","#updateRefetchInterval","#currentResult","#currentResultOptions","#currentResultState","#trackedProps","#staleTimeoutId","#refetchIntervalId","#currentQueryInitialState","#lastQueryWithDefinedData","#selectFn","#selectResult","#notify","#client","#mutationCache","#observers","#retryer","#dispatch","MutationCache","#mutations","#scopes","#mutationId","#client","#updateResult","#currentMutation","#notify","#currentResult","#mutateOptions","#client","#options","#queries","#observers","#result","#onUpdate","#findMatchingObservers","#observerMatches","#notify","#combineResult","#trackResult","#lastQueryHashes","#combinedResult","#lastResult","#lastCombine","#shouldSkipCombine","QueryCache","#queries","QueryClient","#queryCache","QueryCache","#mutationCache","MutationCache","#defaultOptions","#queryDefaults","#mutationDefaults","#mountCount","#unsubscribeFocus","#unsubscribeOnline","QC","MC","QC","isGetter"],"sources":["../../../../../../../node_modules/@tanstack/query-core/build/modern/subscribable.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/focusManager.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/timeoutManager.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/utils.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/environmentManager.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/thenable.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/hydration.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/notifyManager.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/onlineManager.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/retryer.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/removable.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/query.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/mutation.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/mutationCache.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/queriesObserver.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/queryCache.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/queryClient.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/streamedQuery.js","../../../../../../../node_modules/@tanstack/query-core/build/modern/types.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/utils.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/useQueryClient.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/queryCache.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/mutationCache.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/queryClient.js","../../../../../../../node_modules/@tanstack/vue-query/node_modules/@vue/devtools-api/lib/esm/env.js","../../../../../../../node_modules/@tanstack/vue-query/node_modules/@vue/devtools-api/lib/esm/const.js","../../../../../../../node_modules/@tanstack/vue-query/node_modules/@vue/devtools-api/lib/esm/time.js","../../../../../../../node_modules/@tanstack/vue-query/node_modules/@vue/devtools-api/lib/esm/proxy.js","../../../../../../../node_modules/@tanstack/vue-query/node_modules/@vue/devtools-api/lib/esm/index.js","../../../../../../../node_modules/@tanstack/match-sorter-utils/build/lib/index.mjs","../../../../../../../node_modules/@tanstack/vue-query/build/modern/devtools/utils.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/devtools/devtools.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/vueQueryPlugin.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/queryOptions.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/infiniteQueryOptions.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/mutationOptions.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/useBaseQuery.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/useQuery.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/useQueries.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/useInfiniteQuery.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/usePrefetchQuery.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/usePrefetchInfiniteQuery.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/useMutation.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/useIsFetching.js","../../../../../../../node_modules/@tanstack/vue-query/build/modern/useMutationState.js"],"sourcesContent":["// src/subscribable.ts\nvar Subscribable = class {\n constructor() {\n this.listeners = /* @__PURE__ */ new Set();\n this.subscribe = this.subscribe.bind(this);\n }\n subscribe(listener) {\n this.listeners.add(listener);\n this.onSubscribe();\n return () => {\n this.listeners.delete(listener);\n this.onUnsubscribe();\n };\n }\n hasListeners() {\n return this.listeners.size > 0;\n }\n onSubscribe() {\n }\n onUnsubscribe() {\n }\n};\nexport {\n Subscribable\n};\n//# sourceMappingURL=subscribable.js.map","// src/focusManager.ts\nimport { Subscribable } from \"./subscribable.js\";\nvar FocusManager = class extends Subscribable {\n #focused;\n #cleanup;\n #setup;\n constructor() {\n super();\n this.#setup = (onFocus) => {\n if (typeof window !== \"undefined\" && window.addEventListener) {\n const listener = () => onFocus();\n window.addEventListener(\"visibilitychange\", listener, false);\n return () => {\n window.removeEventListener(\"visibilitychange\", listener);\n };\n }\n return;\n };\n }\n onSubscribe() {\n if (!this.#cleanup) {\n this.setEventListener(this.#setup);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#cleanup?.();\n this.#cleanup = void 0;\n }\n }\n setEventListener(setup) {\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 setFocused(focused) {\n const changed = this.#focused !== focused;\n if (changed) {\n this.#focused = focused;\n this.onFocus();\n }\n }\n onFocus() {\n const isFocused = this.isFocused();\n this.listeners.forEach((listener) => {\n listener(isFocused);\n });\n }\n isFocused() {\n if (typeof this.#focused === \"boolean\") {\n return this.#focused;\n }\n return globalThis.document?.visibilityState !== \"hidden\";\n }\n};\nvar focusManager = new FocusManager();\nexport {\n FocusManager,\n focusManager\n};\n//# sourceMappingURL=focusManager.js.map","// src/timeoutManager.ts\nvar defaultTimeoutProvider = {\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 setInterval: (callback, delay) => setInterval(callback, delay),\n clearInterval: (intervalId) => clearInterval(intervalId)\n};\nvar TimeoutManager = class {\n // We cannot have TimeoutManager<T> 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 the default provider's concrete timer ID, which is\n // infeasible across environments.\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 = defaultTimeoutProvider;\n #providerCalled = false;\n setTimeoutProvider(provider) {\n if (process.env.NODE_ENV !== \"production\") {\n if (this.#providerCalled && provider !== this.#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 this.#provider = provider;\n if (process.env.NODE_ENV !== \"production\") {\n this.#providerCalled = false;\n }\n }\n setTimeout(callback, delay) {\n if (process.env.NODE_ENV !== \"production\") {\n this.#providerCalled = true;\n }\n return this.#provider.setTimeout(callback, delay);\n }\n clearTimeout(timeoutId) {\n this.#provider.clearTimeout(timeoutId);\n }\n setInterval(callback, delay) {\n if (process.env.NODE_ENV !== \"production\") {\n this.#providerCalled = true;\n }\n return this.#provider.setInterval(callback, delay);\n }\n clearInterval(intervalId) {\n this.#provider.clearInterval(intervalId);\n }\n};\nvar timeoutManager = new TimeoutManager();\nfunction systemSetTimeoutZero(callback) {\n setTimeout(callback, 0);\n}\nexport {\n TimeoutManager,\n defaultTimeoutProvider,\n systemSetTimeoutZero,\n timeoutManager\n};\n//# sourceMappingURL=timeoutManager.js.map","// src/utils.ts\nimport { timeoutManager } from \"./timeoutManager.js\";\nvar isServer = typeof window === \"undefined\" || \"Deno\" in globalThis;\nfunction noop() {\n}\nfunction functionalUpdate(updater, input) {\n return typeof updater === \"function\" ? updater(input) : updater;\n}\nfunction isValidTimeout(value) {\n return typeof value === \"number\" && value >= 0 && value !== Infinity;\n}\nfunction timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nfunction resolveStaleTime(staleTime, query) {\n return typeof staleTime === \"function\" ? staleTime(query) : staleTime;\n}\nfunction resolveQueryBoolean(option, query) {\n return typeof option === \"function\" ? option(query) : option;\n}\nfunction matchQuery(filters, query) {\n const {\n type = \"all\",\n exact,\n fetchStatus,\n predicate,\n queryKey,\n stale\n } = filters;\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 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 if (typeof stale === \"boolean\" && query.isStale() !== stale) {\n return false;\n }\n if (fetchStatus && fetchStatus !== query.state.fetchStatus) {\n return false;\n }\n if (predicate && !predicate(query)) {\n return false;\n }\n return true;\n}\nfunction matchMutation(filters, mutation) {\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 if (status && mutation.state.status !== status) {\n return false;\n }\n if (predicate && !predicate(mutation)) {\n return false;\n }\n return true;\n}\nfunction hashQueryKeyByOptions(queryKey, options) {\n const hashFn = options?.queryKeyHashFn || hashKey;\n return hashFn(queryKey);\n}\nfunction hashKey(queryKey) {\n return JSON.stringify(\n queryKey,\n (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {\n result[key] = val[key];\n return result;\n }, {}) : val\n );\n}\nfunction partialMatchKey(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\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 return false;\n}\nvar hasOwn = Object.prototype.hasOwnProperty;\nfunction replaceEqualDeep(a, b, depth = 0) {\n if (a === b) {\n return a;\n }\n if (depth > 500) return b;\n const array = isPlainArray(a) && isPlainArray(b);\n if (!array && !(isPlainObject(a) && isPlainObject(b))) return b;\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 = array ? new Array(bSize) : {};\n let equalItems = 0;\n for (let i = 0; i < bSize; i++) {\n const key = array ? i : bItems[i];\n const aItem = a[key];\n const bItem = b[key];\n if (aItem === bItem) {\n copy[key] = aItem;\n if (array ? i < aSize : hasOwn.call(a, key)) equalItems++;\n continue;\n }\n if (aItem === null || bItem === null || typeof aItem !== \"object\" || typeof bItem !== \"object\") {\n copy[key] = bItem;\n continue;\n }\n const v = replaceEqualDeep(aItem, bItem, depth + 1);\n copy[key] = v;\n if (v === aItem) equalItems++;\n }\n return aSize === bSize && equalItems === aSize ? a : copy;\n}\nfunction shallowEqualObjects(a, b) {\n if (!b || Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n for (const key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\nfunction isPlainArray(value) {\n return Array.isArray(value) && value.length === Object.keys(value).length;\n}\nfunction isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n }\n const ctor = o.constructor;\n if (ctor === void 0) {\n return true;\n }\n const prot = ctor.prototype;\n if (!hasObjectPrototype(prot)) {\n return false;\n }\n if (!prot.hasOwnProperty(\"isPrototypeOf\")) {\n return false;\n }\n if (Object.getPrototypeOf(o) !== Object.prototype) {\n return false;\n }\n return true;\n}\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === \"[object Object]\";\n}\nfunction sleep(timeout) {\n return new Promise((resolve) => {\n timeoutManager.setTimeout(resolve, timeout);\n });\n}\nfunction replaceData(prevData, data, options) {\n if (typeof options.structuralSharing === \"function\") {\n return options.structuralSharing(prevData, data);\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 throw error;\n }\n }\n return replaceEqualDeep(prevData, data);\n }\n return data;\n}\nfunction keepPreviousData(previousData) {\n return previousData;\n}\nfunction addToEnd(items, item, max = 0) {\n const newItems = [...items, item];\n return max && newItems.length > max ? newItems.slice(1) : newItems;\n}\nfunction addToStart(items, item, max = 0) {\n const newItems = [item, ...items];\n return max && newItems.length > max ? newItems.slice(0, -1) : newItems;\n}\nvar skipToken = /* @__PURE__ */ Symbol();\nfunction ensureQueryFn(options, fetchOptions) {\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 if (!options.queryFn && fetchOptions?.initialPromise) {\n return () => fetchOptions.initialPromise;\n }\n if (!options.queryFn || options.queryFn === skipToken) {\n return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));\n }\n return options.queryFn;\n}\nfunction shouldThrowError(throwOnError, params) {\n if (typeof throwOnError === \"function\") {\n return throwOnError(...params);\n }\n return !!throwOnError;\n}\nfunction addConsumeAwareSignal(object, getSignal, onCancelled) {\n let consumed = false;\n let signal;\n Object.defineProperty(object, \"signal\", {\n enumerable: true,\n get: () => {\n signal ??= getSignal();\n if (consumed) {\n return signal;\n }\n consumed = true;\n if (signal.aborted) {\n onCancelled();\n } else {\n signal.addEventListener(\"abort\", onCancelled, { once: true });\n }\n return signal;\n }\n });\n return object;\n}\nexport {\n addConsumeAwareSignal,\n addToEnd,\n addToStart,\n ensureQueryFn,\n functionalUpdate,\n hashKey,\n hashQueryKeyByOptions,\n isPlainArray,\n isPlainObject,\n isServer,\n isValidTimeout,\n keepPreviousData,\n matchMutation,\n matchQuery,\n noop,\n partialMatchKey,\n replaceData,\n replaceEqualDeep,\n resolveQueryBoolean,\n resolveStaleTime,\n shallowEqualObjects,\n shouldThrowError,\n skipToken,\n sleep,\n timeUntilStale\n};\n//# sourceMappingURL=utils.js.map","// src/environmentManager.ts\nimport { isServer } from \"./utils.js\";\nvar environmentManager = /* @__PURE__ */ (() => {\n let isServerFn = () => isServer;\n return {\n /**\n * Returns whether the current runtime should be treated as a server environment.\n */\n isServer() {\n return isServerFn();\n },\n /**\n * Overrides the server check globally.\n */\n setIsServer(isServerValue) {\n isServerFn = isServerValue;\n }\n };\n})();\nexport {\n environmentManager\n};\n//# sourceMappingURL=environmentManager.js.map","// src/thenable.ts\nimport { noop } from \"./utils.js\";\nfunction pendingThenable() {\n let resolve;\n let reject;\n const thenable = new Promise((_resolve, _reject) => {\n resolve = _resolve;\n reject = _reject;\n });\n thenable.status = \"pending\";\n thenable.catch(() => {\n });\n function finalize(data) {\n Object.assign(thenable, data);\n delete thenable.resolve;\n delete thenable.reject;\n }\n thenable.resolve = (value) => {\n finalize({\n status: \"fulfilled\",\n value\n });\n resolve(value);\n };\n thenable.reject = (reason) => {\n finalize({\n status: \"rejected\",\n reason\n });\n reject(reason);\n };\n return thenable;\n}\nfunction tryResolveSync(promise) {\n let data;\n promise.then((result) => {\n data = result;\n return result;\n }, noop)?.catch(noop);\n if (data !== void 0) {\n return { data };\n }\n return void 0;\n}\nexport {\n pendingThenable,\n tryResolveSync\n};\n//# sourceMappingURL=thenable.js.map","// src/hydration.ts\nimport { tryResolveSync } from \"./thenable.js\";\nimport { noop } from \"./utils.js\";\nfunction defaultTransformerFn(data) {\n return data;\n}\nfunction dehydrateMutation(mutation) {\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}\nfunction dehydrateQuery(query, serializeData, shouldRedactErrors) {\n const dehydratePromise = () => {\n const promise = query.promise?.then(serializeData).catch((error) => {\n if (!shouldRedactErrors(error)) {\n return Promise.reject(error);\n }\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 promise?.catch(noop);\n return promise;\n };\n return {\n dehydratedAt: Date.now(),\n state: {\n ...query.state,\n ...query.state.data !== void 0 && {\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 ...query.queryType && { queryType: query.queryType }\n };\n}\nfunction defaultShouldDehydrateMutation(mutation) {\n return mutation.state.isPaused;\n}\nfunction defaultShouldDehydrateQuery(query) {\n return query.state.status === \"success\";\n}\nfunction defaultShouldRedactErrors(_) {\n return true;\n}\nfunction dehydrate(client, options = {}) {\n const filterMutation = options.shouldDehydrateMutation ?? client.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;\n const mutations = client.getMutationCache().getAll().flatMap(\n (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []\n );\n const filterQuery = options.shouldDehydrateQuery ?? client.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;\n const shouldRedactErrors = options.shouldRedactErrors ?? client.getDefaultOptions().dehydrate?.shouldRedactErrors ?? defaultShouldRedactErrors;\n const serializeData = options.serializeData ?? client.getDefaultOptions().dehydrate?.serializeData ?? defaultTransformerFn;\n const queries = client.getQueryCache().getAll().flatMap(\n (query) => filterQuery(query) ? [dehydrateQuery(query, serializeData, shouldRedactErrors)] : []\n );\n return { mutations, queries };\n}\nfunction hydrate(client, dehydratedState, options) {\n if (typeof dehydratedState !== \"object\" || dehydratedState === null) {\n return;\n }\n const mutationCache = client.getMutationCache();\n const queryCache = client.getQueryCache();\n const deserializeData = options?.defaultOptions?.deserializeData ?? client.getDefaultOptions().hydrate?.deserializeData ?? defaultTransformerFn;\n const mutations = dehydratedState.mutations || [];\n const queries = dehydratedState.queries || [];\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 queries.forEach(\n ({\n queryKey,\n state,\n queryHash,\n meta,\n promise,\n dehydratedAt,\n queryType\n }) => {\n const syncData = promise ? tryResolveSync(promise) : void 0;\n const rawData = state.data === void 0 ? syncData?.data : state.data;\n const data = rawData === void 0 ? rawData : deserializeData(rawData);\n let query = queryCache.get(queryHash);\n const existingQueryIsPending = query?.state.status === \"pending\";\n const existingQueryIsFetching = query?.state.fetchStatus === \"fetching\";\n if (query) {\n const hasNewerSyncData = syncData && // We only need this undefined check to handle older dehydration\n // payloads that might not have dehydratedAt\n dehydratedAt !== void 0 && dehydratedAt > query.state.dataUpdatedAt;\n if (state.dataUpdatedAt > query.state.dataUpdatedAt || hasNewerSyncData) {\n const { fetchStatus: _ignored, ...serializedState } = state;\n query.setState({\n ...serializedState,\n data,\n // If the query was pending at the moment of dehydration, but resolved to have data\n // before hydration, we can assume the query should be hydrated as successful.\n //\n // Since you can opt into dehydrating failed queries, and those can have data from\n // previous successful fetches, we make sure we only do this for pending queries.\n ...state.status === \"pending\" && data !== void 0 && {\n status: \"success\",\n // Preserve existing fetchStatus if the existing query is actively fetching.\n ...!existingQueryIsFetching && {\n fetchStatus: \"idle\"\n }\n }\n });\n }\n } else {\n query = queryCache.build(\n client,\n {\n ...client.getDefaultOptions().hydrate?.queries,\n ...options?.defaultOptions?.queries,\n queryKey,\n queryHash,\n meta,\n _type: queryType\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 // Like above, if the query was pending at the moment of dehydration but has data,\n // we can assume it should be hydrated as successful.\n status: state.status === \"pending\" && data !== void 0 ? \"success\" : state.status\n }\n );\n }\n if (promise && // If the data was synchronously available, there is no need to set up\n // a retryer and thus no reason to call fetch\n !syncData && !existingQueryIsPending && !existingQueryIsFetching && // Only hydrate if dehydration is newer than any existing data,\n // this is always true for new queries\n (dehydratedAt === void 0 || dehydratedAt > query.state.dataUpdatedAt)) {\n query.fetch(void 0, {\n // RSC transformed promises are not thenable\n initialPromise: Promise.resolve(promise).then(deserializeData)\n }).catch(noop);\n }\n }\n );\n}\nexport {\n defaultShouldDehydrateMutation,\n defaultShouldDehydrateQuery,\n dehydrate,\n hydrate\n};\n//# sourceMappingURL=hydration.js.map","// src/notifyManager.ts\nimport { systemSetTimeoutZero } from \"./timeoutManager.js\";\nvar defaultScheduler = systemSetTimeoutZero;\nfunction createNotifyManager() {\n let queue = [];\n let transactions = 0;\n let notifyFn = (callback) => {\n callback();\n };\n let batchNotifyFn = (callback) => {\n callback();\n };\n let scheduleFn = defaultScheduler;\n const schedule = (callback) => {\n if (transactions) {\n queue.push(callback);\n } else {\n scheduleFn(() => {\n notifyFn(callback);\n });\n }\n };\n const flush = () => {\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 return {\n batch: (callback) => {\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: (callback) => {\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) => {\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) => {\n batchNotifyFn = fn;\n },\n setScheduler: (fn) => {\n scheduleFn = fn;\n }\n };\n}\nvar notifyManager = createNotifyManager();\nexport {\n createNotifyManager,\n defaultScheduler,\n notifyManager\n};\n//# sourceMappingURL=notifyManager.js.map","// src/onlineManager.ts\nimport { Subscribable } from \"./subscribable.js\";\nvar OnlineManager = class extends Subscribable {\n #online = true;\n #cleanup;\n #setup;\n constructor() {\n super();\n this.#setup = (onOnline) => {\n if (typeof window !== \"undefined\" && window.addEventListener) {\n const onlineListener = () => onOnline(true);\n const offlineListener = () => onOnline(false);\n window.addEventListener(\"online\", onlineListener, false);\n window.addEventListener(\"offline\", offlineListener, false);\n return () => {\n window.removeEventListener(\"online\", onlineListener);\n window.removeEventListener(\"offline\", offlineListener);\n };\n }\n return;\n };\n }\n onSubscribe() {\n if (!this.#cleanup) {\n this.setEventListener(this.#setup);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#cleanup?.();\n this.#cleanup = void 0;\n }\n }\n setEventListener(setup) {\n this.#setup = setup;\n this.#cleanup?.();\n this.#cleanup = setup(this.setOnline.bind(this));\n }\n setOnline(online) {\n const changed = this.#online !== online;\n if (changed) {\n this.#online = online;\n this.listeners.forEach((listener) => {\n listener(online);\n });\n }\n }\n isOnline() {\n return this.#online;\n }\n};\nvar onlineManager = new OnlineManager();\nexport {\n OnlineManager,\n onlineManager\n};\n//# sourceMappingURL=onlineManager.js.map","// src/retryer.ts\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { pendingThenable } from \"./thenable.js\";\nimport { environmentManager } from \"./environmentManager.js\";\nimport { sleep } from \"./utils.js\";\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1e3 * 2 ** failureCount, 3e4);\n}\nfunction canFetch(networkMode) {\n return (networkMode ?? \"online\") === \"online\" ? onlineManager.isOnline() : true;\n}\nvar CancelledError = class extends Error {\n constructor(options) {\n super(\"CancelledError\");\n this.revert = options?.revert;\n this.silent = options?.silent;\n }\n};\nfunction isCancelledError(value) {\n return value instanceof CancelledError;\n}\nfunction createRetryer(config) {\n let isRetryCancelled = false;\n let failureCount = 0;\n let continueFn;\n const thenable = pendingThenable();\n const isResolved = () => thenable.status !== \"pending\";\n const cancel = (cancelOptions) => {\n if (!isResolved()) {\n const error = new CancelledError(cancelOptions);\n reject(error);\n config.onCancel?.(error);\n }\n };\n const cancelRetry = () => {\n isRetryCancelled = true;\n };\n const continueRetry = () => {\n isRetryCancelled = false;\n };\n const canContinue = () => focusManager.isFocused() && (config.networkMode === \"always\" || onlineManager.isOnline()) && config.canRun();\n const canStart = () => canFetch(config.networkMode) && config.canRun();\n const resolve = (value) => {\n if (!isResolved()) {\n continueFn?.();\n thenable.resolve(value);\n }\n };\n const reject = (value) => {\n if (!isResolved()) {\n continueFn?.();\n thenable.reject(value);\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 = void 0;\n if (!isResolved()) {\n config.onContinue?.();\n }\n });\n };\n const run = () => {\n if (isResolved()) {\n return;\n }\n let promiseOrValue;\n const initialPromise = failureCount === 0 ? config.initialPromise : void 0;\n try {\n promiseOrValue = initialPromise ?? config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n }\n Promise.resolve(promiseOrValue).then(resolve).catch((error) => {\n if (isResolved()) {\n return;\n }\n const retry = config.retry ?? (environmentManager.isServer() ? 0 : 3);\n const retryDelay = config.retryDelay ?? defaultRetryDelay;\n const delay = typeof retryDelay === \"function\" ? retryDelay(failureCount, error) : retryDelay;\n const shouldRetry = retry === true || typeof retry === \"number\" && failureCount < retry || typeof retry === \"function\" && retry(failureCount, error);\n if (isRetryCancelled || !shouldRetry) {\n reject(error);\n return;\n }\n failureCount++;\n config.onFail?.(failureCount, error);\n sleep(delay).then(() => {\n return canContinue() ? void 0 : pause();\n }).then(() => {\n if (isRetryCancelled) {\n reject(error);\n } else {\n run();\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 if (canStart()) {\n run();\n } else {\n pause().then(run);\n }\n return thenable;\n }\n };\n}\nexport {\n CancelledError,\n canFetch,\n createRetryer,\n isCancelledError\n};\n//# sourceMappingURL=retryer.js.map","// src/removable.ts\nimport { timeoutManager } from \"./timeoutManager.js\";\nimport { environmentManager } from \"./environmentManager.js\";\nimport { isValidTimeout } from \"./utils.js\";\nvar Removable = class {\n #gcTimeout;\n destroy() {\n this.clearGcTimeout();\n }\n scheduleGc() {\n this.clearGcTimeout();\n if (isValidTimeout(this.gcTime)) {\n this.#gcTimeout = timeoutManager.setTimeout(() => {\n this.optionalRemove();\n }, this.gcTime);\n }\n }\n updateGcTime(newGcTime) {\n this.gcTime = Math.max(\n this.gcTime || 0,\n newGcTime ?? (environmentManager.isServer() ? Infinity : 5 * 60 * 1e3)\n );\n }\n clearGcTimeout() {\n if (this.#gcTimeout !== void 0) {\n timeoutManager.clearTimeout(this.#gcTimeout);\n this.#gcTimeout = void 0;\n }\n }\n};\nexport {\n Removable\n};\n//# sourceMappingURL=removable.js.map","// src/infiniteQueryBehavior.ts\nimport {\n addConsumeAwareSignal,\n addToEnd,\n addToStart,\n ensureQueryFn\n} from \"./utils.js\";\nfunction infiniteQueryBehavior(pages) {\n return {\n onFetch: (context, query) => {\n const options = context.options;\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 = { pages: [], pageParams: [] };\n let currentPage = 0;\n const fetchFn = async () => {\n let cancelled = false;\n const addSignalProperty = (object) => {\n addConsumeAwareSignal(\n object,\n () => context.signal,\n () => cancelled = true\n );\n };\n const queryFn = ensureQueryFn(context.options, context.fetchOptions);\n const fetchPage = async (data, param, previous) => {\n if (cancelled) {\n return Promise.reject(context.signal.reason);\n }\n if (param == null && data.pages.length) {\n return Promise.resolve(data);\n }\n const createQueryFnContext = () => {\n const queryFnContext2 = {\n client: context.client,\n queryKey: context.queryKey,\n pageParam: param,\n direction: previous ? \"backward\" : \"forward\",\n meta: context.options.meta\n };\n addSignalProperty(queryFnContext2);\n return queryFnContext2;\n };\n const queryFnContext = createQueryFnContext();\n const page = await queryFn(queryFnContext);\n const { maxPages } = context.options;\n const addTo = previous ? addToStart : addToEnd;\n return {\n pages: addTo(data.pages, page, maxPages),\n pageParams: addTo(data.pageParams, param, maxPages)\n };\n };\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 result = await fetchPage(oldData, param, previous);\n } else {\n const remainingPages = pages ?? oldPages.length;\n do {\n const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : 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 return result;\n };\n if (context.options.persister) {\n context.fetchFn = () => {\n return context.options.persister?.(\n fetchFn,\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}\nfunction getNextPageParam(options, { pages, pageParams }) {\n const lastIndex = pages.length - 1;\n return pages.length > 0 ? options.getNextPageParam(\n pages[lastIndex],\n pages,\n pageParams[lastIndex],\n pageParams\n ) : void 0;\n}\nfunction getPreviousPageParam(options, { pages, pageParams }) {\n return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;\n}\nfunction hasNextPage(options, data) {\n if (!data) return false;\n return getNextPageParam(options, data) != null;\n}\nfunction hasPreviousPage(options, data) {\n if (!data || !options.getPreviousPageParam) return false;\n return getPreviousPageParam(options, data) != null;\n}\nexport {\n hasNextPage,\n hasPreviousPage,\n infiniteQueryBehavior\n};\n//# sourceMappingURL=infiniteQueryBehavior.js.map","// src/query.ts\nimport {\n ensureQueryFn,\n noop,\n replaceData,\n resolveQueryBoolean,\n resolveStaleTime,\n skipToken,\n timeUntilStale\n} from \"./utils.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { CancelledError, canFetch, createRetryer } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\nimport { infiniteQueryBehavior } from \"./infiniteQueryBehavior.js\";\nvar Query = class extends Removable {\n #queryType;\n #initialState;\n #revertState;\n #cache;\n #client;\n #retryer;\n #defaultOptions;\n #abortSignalConsumed;\n constructor(config) {\n super();\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() {\n return this.options.meta;\n }\n get queryType() {\n return this.#queryType;\n }\n get promise() {\n return this.#retryer?.promise;\n }\n setOptions(options) {\n this.options = { ...this.#defaultOptions, ...options };\n if (options?._type) {\n this.#queryType = options._type;\n }\n this.updateGcTime(this.options.gcTime);\n if (this.state && this.state.data === void 0) {\n const defaultState = getDefaultState(this.options);\n if (defaultState.data !== void 0) {\n this.setState(\n successState(defaultState.data, defaultState.dataUpdatedAt)\n );\n this.#initialState = defaultState;\n }\n }\n }\n optionalRemove() {\n if (!this.observers.length && this.state.fetchStatus === \"idle\") {\n this.#cache.remove(this);\n }\n }\n setData(newData, options) {\n const data = replaceData(this.state.data, newData, this.options);\n this.#dispatch({\n data,\n type: \"success\",\n dataUpdatedAt: options?.updatedAt,\n manual: options?.manual\n });\n return data;\n }\n setState(state) {\n this.#dispatch({ type: \"setState\", state });\n }\n cancel(options) {\n const promise = this.#retryer?.promise;\n this.#retryer?.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n }\n destroy() {\n super.destroy();\n this.cancel({ silent: true });\n }\n get resetState() {\n return this.#initialState;\n }\n reset() {\n this.destroy();\n this.setState(this.resetState);\n }\n isActive() {\n return this.observers.some(\n (observer) => resolveQueryBoolean(observer.options.enabled, this) !== false\n );\n }\n isDisabled() {\n if (this.getObserversCount() > 0) {\n return !this.isActive();\n }\n return this.options.queryFn === skipToken || !this.isFetched();\n }\n isFetched() {\n return this.state.dataUpdateCount + this.state.errorUpdateCount > 0;\n }\n isStatic() {\n if (this.getObserversCount() > 0) {\n return this.observers.some(\n (observer) => resolveStaleTime(observer.options.staleTime, this) === \"static\"\n );\n }\n return false;\n }\n isStale() {\n if (this.getObserversCount() > 0) {\n return this.observers.some(\n (observer) => observer.getCurrentResult().isStale\n );\n }\n return this.state.data === void 0 || this.state.isInvalidated;\n }\n isStaleByTime(staleTime = 0) {\n if (this.state.data === void 0) {\n return true;\n }\n if (staleTime === \"static\") {\n return false;\n }\n if (this.state.isInvalidated) {\n return true;\n }\n return !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n }\n onFocus() {\n const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus());\n observer?.refetch({ cancelRefetch: false });\n this.#retryer?.continue();\n }\n onOnline() {\n const observer = this.observers.find((x) => x.shouldFetchOnReconnect());\n observer?.refetch({ cancelRefetch: false });\n this.#retryer?.continue();\n }\n addObserver(observer) {\n if (!this.observers.includes(observer)) {\n this.observers.push(observer);\n this.clearGcTimeout();\n this.#cache.notify({ type: \"observerAdded\", query: this, observer });\n }\n }\n removeObserver(observer) {\n if (this.observers.includes(observer)) {\n this.observers = this.observers.filter((x) => x !== observer);\n if (!this.observers.length) {\n if (this.#retryer) {\n if (this.#abortSignalConsumed || this.#isInitialPausedFetch()) {\n this.#retryer.cancel({ revert: true });\n } else {\n this.#retryer.cancelRetry();\n }\n }\n this.scheduleGc();\n }\n this.#cache.notify({ type: \"observerRemoved\", query: this, observer });\n }\n }\n getObserversCount() {\n return this.observers.length;\n }\n #isInitialPausedFetch() {\n return this.state.fetchStatus === \"paused\" && this.state.status === \"pending\";\n }\n invalidate() {\n if (!this.state.isInvalidated) {\n this.#dispatch({ type: \"invalidate\" });\n }\n }\n async fetch(options, fetchOptions) {\n if (this.state.fetchStatus !== \"idle\" && // 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 if (this.state.data !== void 0 && fetchOptions?.cancelRefetch) {\n this.cancel({ silent: true });\n } else if (this.#retryer) {\n this.#retryer.continueRetry();\n return this.#retryer.promise;\n }\n }\n if (options) {\n this.setOptions(options);\n }\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 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 const abortController = new AbortController();\n const addSignalProperty = (object) => {\n Object.defineProperty(object, \"signal\", {\n enumerable: true,\n get: () => {\n this.#abortSignalConsumed = true;\n return abortController.signal;\n }\n });\n };\n const fetchFn = () => {\n const queryFn = ensureQueryFn(this.options, fetchOptions);\n const createQueryFnContext = () => {\n const queryFnContext2 = {\n client: this.#client,\n queryKey: this.queryKey,\n meta: this.meta\n };\n addSignalProperty(queryFnContext2);\n return queryFnContext2;\n };\n const queryFnContext = createQueryFnContext();\n this.#abortSignalConsumed = false;\n if (this.options.persister) {\n return this.options.persister(\n queryFn,\n queryFnContext,\n this\n );\n }\n return queryFn(queryFnContext);\n };\n const createFetchContext = () => {\n const context2 = {\n fetchOptions,\n options: this.options,\n queryKey: this.queryKey,\n client: this.#client,\n state: this.state,\n fetchFn\n };\n addSignalProperty(context2);\n return context2;\n };\n const context = createFetchContext();\n const behavior = this.#queryType === \"infinite\" ? infiniteQueryBehavior(\n this.options.pages\n ) : this.options.behavior;\n behavior?.onFetch(context, this);\n this.#revertState = this.state;\n if (this.state.fetchStatus === \"idle\" || this.state.fetchMeta !== context.fetchOptions?.meta) {\n this.#dispatch({ type: \"fetch\", meta: context.fetchOptions?.meta });\n }\n this.#retryer = createRetryer({\n initialPromise: fetchOptions?.initialPromise,\n fn: context.fetchFn,\n onCancel: (error) => {\n if (error instanceof CancelledError && error.revert) {\n this.setState({\n ...this.#revertState,\n fetchStatus: \"idle\"\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 try {\n const data = await this.#retryer.start();\n if (data === void 0) {\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 this.setData(data);\n this.#cache.config.onSuccess?.(data, this);\n this.#cache.config.onSettled?.(\n data,\n this.state.error,\n this\n );\n return data;\n } catch (error) {\n if (error instanceof CancelledError) {\n if (error.silent) {\n return this.#retryer.promise;\n } else if (error.revert) {\n if (this.state.data === void 0) {\n throw error;\n }\n return this.state.data;\n }\n }\n this.#dispatch({\n type: \"error\",\n error\n });\n this.#cache.config.onError?.(\n error,\n this\n );\n this.#cache.config.onSettled?.(\n this.state.data,\n error,\n this\n );\n throw error;\n } finally {\n this.scheduleGc();\n }\n }\n #dispatch(action) {\n const reducer = (state) => {\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\",\n fetchFailureCount: 0,\n fetchFailureReason: null\n }\n };\n this.#revertState = action.manual ? newState : void 0;\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 this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.observers.forEach((observer) => {\n observer.onQueryUpdate();\n });\n this.#cache.notify({ query: this, type: \"updated\", action });\n });\n }\n};\nfunction fetchState(data, options) {\n return {\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchStatus: canFetch(options.networkMode) ? \"fetching\" : \"paused\",\n ...data === void 0 && {\n error: null,\n status: \"pending\"\n }\n };\n}\nfunction successState(data, dataUpdatedAt) {\n return {\n data,\n dataUpdatedAt: dataUpdatedAt ?? Date.now(),\n error: null,\n isInvalidated: false,\n status: \"success\"\n };\n}\nfunction getDefaultState(options) {\n const data = typeof options.initialData === \"function\" ? options.initialData() : options.initialData;\n const hasData = data !== void 0;\n const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === \"function\" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\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}\nexport {\n Query,\n fetchState\n};\n//# sourceMappingURL=query.js.map","// src/queryObserver.ts\nimport { focusManager } from \"./focusManager.js\";\nimport { environmentManager } from \"./environmentManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { fetchState } from \"./query.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { pendingThenable } from \"./thenable.js\";\nimport {\n isValidTimeout,\n noop,\n replaceData,\n resolveQueryBoolean,\n resolveStaleTime,\n shallowEqualObjects,\n timeUntilStale\n} from \"./utils.js\";\nimport { timeoutManager } from \"./timeoutManager.js\";\nvar QueryObserver = class extends Subscribable {\n constructor(client, options) {\n super();\n this.options = options;\n this.#client = client;\n this.#selectError = null;\n this.#currentThenable = pendingThenable();\n this.bindMethods();\n this.setOptions(options);\n }\n #client;\n #currentQuery = void 0;\n #currentQueryInitialState = void 0;\n #currentResult = void 0;\n #currentResultState;\n #currentResultOptions;\n #currentThenable;\n #selectError;\n #selectFn;\n #selectResult;\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;\n #staleTimeoutId;\n #refetchIntervalId;\n #currentRefetchInterval;\n #trackedProps = /* @__PURE__ */ new Set();\n bindMethods() {\n this.refetch = this.refetch.bind(this);\n }\n onSubscribe() {\n if (this.listeners.size === 1) {\n this.#currentQuery.addObserver(this);\n if (shouldFetchOnMount(this.#currentQuery, this.options)) {\n this.#executeFetch();\n } else {\n this.updateResult();\n }\n this.#updateTimers();\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.destroy();\n }\n }\n shouldFetchOnReconnect() {\n return shouldFetchOn(\n this.#currentQuery,\n this.options,\n this.options.refetchOnReconnect\n );\n }\n shouldFetchOnWindowFocus() {\n return shouldFetchOn(\n this.#currentQuery,\n this.options,\n this.options.refetchOnWindowFocus\n );\n }\n destroy() {\n this.listeners = /* @__PURE__ */ new Set();\n this.#clearStaleTimeout();\n this.#clearRefetchInterval();\n this.#currentQuery.removeObserver(this);\n }\n setOptions(options) {\n const prevOptions = this.options;\n const prevQuery = this.#currentQuery;\n this.options = this.#client.defaultQueryOptions(options);\n if (this.options.enabled !== void 0 && typeof this.options.enabled !== \"boolean\" && typeof this.options.enabled !== \"function\" && typeof resolveQueryBoolean(this.options.enabled, this.#currentQuery) !== \"boolean\") {\n throw new Error(\n \"Expected enabled to be a boolean or a callback that returns a boolean\"\n );\n }\n this.#updateQuery();\n this.#currentQuery.setOptions(this.options);\n if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) {\n this.#client.getQueryCache().notify({\n type: \"observerOptionsUpdated\",\n query: this.#currentQuery,\n observer: this\n });\n }\n const mounted = this.hasListeners();\n if (mounted && shouldFetchOptionally(\n this.#currentQuery,\n prevQuery,\n this.options,\n prevOptions\n )) {\n this.#executeFetch();\n }\n this.updateResult();\n if (mounted && (this.#currentQuery !== prevQuery || resolveQueryBoolean(this.options.enabled, this.#currentQuery) !== resolveQueryBoolean(prevOptions.enabled, this.#currentQuery) || resolveStaleTime(this.options.staleTime, this.#currentQuery) !== resolveStaleTime(prevOptions.staleTime, this.#currentQuery))) {\n this.#updateStaleTimeout();\n }\n const nextRefetchInterval = this.#computeRefetchInterval();\n if (mounted && (this.#currentQuery !== prevQuery || resolveQueryBoolean(this.options.enabled, this.#currentQuery) !== resolveQueryBoolean(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {\n this.#updateRefetchInterval(nextRefetchInterval);\n }\n }\n getOptimisticResult(options) {\n const query = this.#client.getQueryCache().build(this.#client, options);\n const result = this.createResult(query, options);\n if (shouldAssignObserverCurrentProperties(this, result)) {\n this.#currentResult = result;\n this.#currentResultOptions = this.options;\n this.#currentResultState = this.#currentQuery.state;\n }\n return result;\n }\n getCurrentResult() {\n return this.#currentResult;\n }\n trackResult(result, onPropTracked) {\n return new Proxy(result, {\n get: (target, key) => {\n this.trackProp(key);\n onPropTracked?.(key);\n if (key === \"promise\") {\n this.trackProp(\"data\");\n if (!this.options.experimental_prefetchInRender && this.#currentThenable.status === \"pending\") {\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 trackProp(key) {\n this.#trackedProps.add(key);\n }\n getCurrentQuery() {\n return this.#currentQuery;\n }\n refetch({ ...options } = {}) {\n return this.fetch({\n ...options\n });\n }\n fetchOptimistic(options) {\n const defaultedOptions = this.#client.defaultQueryOptions(options);\n const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);\n return query.fetch().then(() => this.createResult(query, defaultedOptions));\n }\n fetch(fetchOptions) {\n return this.#executeFetch({\n ...fetchOptions,\n cancelRefetch: fetchOptions.cancelRefetch ?? true\n }).then(() => {\n this.updateResult();\n return this.#currentResult;\n });\n }\n #executeFetch(fetchOptions) {\n this.#updateQuery();\n let promise = this.#currentQuery.fetch(\n this.options,\n fetchOptions\n );\n if (!fetchOptions?.throwOnError) {\n promise = promise.catch(noop);\n }\n return promise;\n }\n #updateStaleTimeout() {\n this.#clearStaleTimeout();\n const staleTime = resolveStaleTime(\n this.options.staleTime,\n this.#currentQuery\n );\n if (environmentManager.isServer() || this.#currentResult.isStale || !isValidTimeout(staleTime)) {\n return;\n }\n const time = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime);\n const timeout = time + 1;\n this.#staleTimeoutId = timeoutManager.setTimeout(() => {\n if (!this.#currentResult.isStale) {\n this.updateResult();\n }\n }, timeout);\n }\n #computeRefetchInterval() {\n return (typeof this.options.refetchInterval === \"function\" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;\n }\n #updateRefetchInterval(nextInterval) {\n this.#clearRefetchInterval();\n this.#currentRefetchInterval = nextInterval;\n if (environmentManager.isServer() || resolveQueryBoolean(this.options.enabled, this.#currentQuery) === false || !isValidTimeout(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {\n return;\n }\n this.#refetchIntervalId = timeoutManager.setInterval(() => {\n if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {\n this.#executeFetch();\n }\n }, this.#currentRefetchInterval);\n }\n #updateTimers() {\n this.#updateStaleTimeout();\n this.#updateRefetchInterval(this.#computeRefetchInterval());\n }\n #clearStaleTimeout() {\n if (this.#staleTimeoutId !== void 0) {\n timeoutManager.clearTimeout(this.#staleTimeoutId);\n this.#staleTimeoutId = void 0;\n }\n }\n #clearRefetchInterval() {\n if (this.#refetchIntervalId !== void 0) {\n timeoutManager.clearInterval(this.#refetchIntervalId);\n this.#refetchIntervalId = void 0;\n }\n }\n createResult(query, options) {\n const prevQuery = this.#currentQuery;\n const prevOptions = this.options;\n const prevResult = this.#currentResult;\n const prevResultState = this.#currentResultState;\n const prevResultOptions = this.#currentResultOptions;\n const queryChange = query !== prevQuery;\n const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;\n const { state } = query;\n let newState = { ...state };\n let isPlaceholderData = false;\n let data;\n if (options._optimisticResults) {\n const mounted = this.hasListeners();\n const fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\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 let { error, errorUpdatedAt, status } = newState;\n data = newState.data;\n let skipSelect = false;\n if (options.placeholderData !== void 0 && data === void 0 && status === \"pending\") {\n let placeholderData;\n if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {\n placeholderData = prevResult.data;\n skipSelect = true;\n } else {\n placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(\n this.#lastQueryWithDefinedData?.state.data,\n this.#lastQueryWithDefinedData\n ) : options.placeholderData;\n }\n if (placeholderData !== void 0) {\n status = \"success\";\n data = replaceData(\n prevResult?.data,\n placeholderData,\n options\n );\n isPlaceholderData = true;\n }\n }\n if (options.select && data !== void 0 && !skipSelect) {\n if (prevResult && data === prevResultState?.data && options.select === this.#selectFn) {\n data = this.#selectResult;\n } else {\n try {\n this.#selectFn = options.select;\n data = options.select(data);\n data = replaceData(prevResult?.data, data, options);\n this.#selectResult = data;\n this.#selectError = null;\n } catch (selectError) {\n this.#selectError = selectError;\n }\n }\n }\n if (this.#selectError) {\n error = this.#selectError;\n data = this.#selectResult;\n errorUpdatedAt = Date.now();\n status = \"error\";\n }\n const isFetching = newState.fetchStatus === \"fetching\";\n const isPending = status === \"pending\";\n const isError = status === \"error\";\n const isLoading = isPending && isFetching;\n const hasData = data !== void 0;\n const result = {\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: query.isFetched(),\n isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || 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: resolveQueryBoolean(options.enabled, query) !== false\n };\n const nextResult = result;\n if (this.options.experimental_prefetchInRender) {\n const hasResultData = nextResult.data !== void 0;\n const isErrorWithoutData = nextResult.status === \"error\" && !hasResultData;\n const finalizeThenableIfPossible = (thenable) => {\n if (isErrorWithoutData) {\n thenable.reject(nextResult.error);\n } else if (hasResultData) {\n thenable.resolve(nextResult.data);\n }\n };\n const recreateThenable = () => {\n const pending = this.#currentThenable = nextResult.promise = pendingThenable();\n finalizeThenableIfPossible(pending);\n };\n const prevThenable = this.#currentThenable;\n switch (prevThenable.status) {\n case \"pending\":\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 return nextResult;\n }\n updateResult() {\n const prevResult = this.#currentResult;\n const nextResult = this.createResult(this.#currentQuery, this.options);\n this.#currentResultState = this.#currentQuery.state;\n this.#currentResultOptions = this.options;\n if (this.#currentResultState.data !== void 0) {\n this.#lastQueryWithDefinedData = this.#currentQuery;\n }\n if (shallowEqualObjects(nextResult, prevResult)) {\n return;\n }\n this.#currentResult = nextResult;\n const shouldNotifyListeners = () => {\n if (!prevResult) {\n return true;\n }\n const { notifyOnChangeProps } = this.options;\n const notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n if (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !this.#trackedProps.size) {\n return true;\n }\n const includedProps = new Set(\n notifyOnChangePropsValue ?? this.#trackedProps\n );\n if (this.options.throwOnError) {\n includedProps.add(\"error\");\n }\n return Object.keys(this.#currentResult).some((key) => {\n const typedKey = key;\n const changed = this.#currentResult[typedKey] !== prevResult[typedKey];\n return changed && includedProps.has(typedKey);\n });\n };\n this.#notify({ listeners: shouldNotifyListeners() });\n }\n #updateQuery() {\n const query = this.#client.getQueryCache().build(this.#client, this.options);\n if (query === this.#currentQuery) {\n return;\n }\n const prevQuery = this.#currentQuery;\n this.#currentQuery = query;\n this.#currentQueryInitialState = query.state;\n if (this.hasListeners()) {\n prevQuery?.removeObserver(this);\n query.addObserver(this);\n }\n }\n onQueryUpdate() {\n this.updateResult();\n if (this.hasListeners()) {\n this.#updateTimers();\n }\n }\n #notify(notifyOptions) {\n notifyManager.batch(() => {\n if (notifyOptions.listeners) {\n this.listeners.forEach((listener) => {\n listener(this.#currentResult);\n });\n }\n this.#client.getQueryCache().notify({\n query: this.#currentQuery,\n type: \"observerResultsUpdated\"\n });\n });\n }\n};\nfunction shouldLoadOnMount(query, options) {\n return resolveQueryBoolean(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === \"error\" && resolveQueryBoolean(options.retryOnMount, query) === false);\n}\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n if (resolveQueryBoolean(options.enabled, query) !== false && resolveStaleTime(options.staleTime, query) !== \"static\") {\n const value = typeof field === \"function\" ? field(query) : field;\n return value === \"always\" || value !== false && isStale(query, options);\n }\n return false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return (query !== prevQuery || resolveQueryBoolean(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n return resolveQueryBoolean(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));\n}\nfunction shouldAssignObserverCurrentProperties(observer, optimisticResult) {\n if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {\n return true;\n }\n return false;\n}\nexport {\n QueryObserver\n};\n//# sourceMappingURL=queryObserver.js.map","// src/infiniteQueryObserver.ts\nimport { QueryObserver } from \"./queryObserver.js\";\nimport { hasNextPage, hasPreviousPage } from \"./infiniteQueryBehavior.js\";\nvar InfiniteQueryObserver = class extends QueryObserver {\n constructor(client, options) {\n super(client, options);\n }\n bindMethods() {\n super.bindMethods();\n this.fetchNextPage = this.fetchNextPage.bind(this);\n this.fetchPreviousPage = this.fetchPreviousPage.bind(this);\n }\n setOptions(options) {\n options._type = \"infinite\";\n super.setOptions(options);\n }\n getOptimisticResult(options) {\n options._type = \"infinite\";\n return super.getOptimisticResult(options);\n }\n fetchNextPage(options) {\n return this.fetch({\n ...options,\n meta: {\n fetchMore: { direction: \"forward\" }\n }\n });\n }\n fetchPreviousPage(options) {\n return this.fetch({\n ...options,\n meta: {\n fetchMore: { direction: \"backward\" }\n }\n });\n }\n createResult(query, options) {\n const { state } = query;\n const parentResult = super.createResult(query, options);\n const { isFetching, isRefetching, isError, isRefetchError } = parentResult;\n const fetchDirection = state.fetchMeta?.fetchMore?.direction;\n const isFetchNextPageError = isError && fetchDirection === \"forward\";\n const isFetchingNextPage = isFetching && fetchDirection === \"forward\";\n const isFetchPreviousPageError = isError && fetchDirection === \"backward\";\n const isFetchingPreviousPage = isFetching && fetchDirection === \"backward\";\n const result = {\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: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,\n isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage\n };\n return result;\n }\n};\nexport {\n InfiniteQueryObserver\n};\n//# sourceMappingURL=infiniteQueryObserver.js.map","// src/mutation.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Removable } from \"./removable.js\";\nimport { createRetryer } from \"./retryer.js\";\nvar Mutation = class extends Removable {\n #client;\n #observers;\n #mutationCache;\n #retryer;\n constructor(config) {\n super();\n this.#client = config.client;\n this.mutationId = config.mutationId;\n this.#mutationCache = config.mutationCache;\n this.#observers = [];\n this.state = config.state || getDefaultState();\n this.setOptions(config.options);\n this.scheduleGc();\n }\n setOptions(options) {\n this.options = options;\n this.updateGcTime(this.options.gcTime);\n }\n get meta() {\n return this.options.meta;\n }\n addObserver(observer) {\n if (!this.#observers.includes(observer)) {\n this.#observers.push(observer);\n this.clearGcTimeout();\n this.#mutationCache.notify({\n type: \"observerAdded\",\n mutation: this,\n observer\n });\n }\n }\n removeObserver(observer) {\n this.#observers = this.#observers.filter((x) => x !== observer);\n this.scheduleGc();\n this.#mutationCache.notify({\n type: \"observerRemoved\",\n mutation: this,\n observer\n });\n }\n optionalRemove() {\n if (!this.#observers.length) {\n if (this.state.status === \"pending\") {\n this.scheduleGc();\n } else {\n this.#mutationCache.remove(this);\n }\n }\n }\n continue() {\n return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before\n this.execute(this.state.variables);\n }\n async execute(variables) {\n const onContinue = () => {\n this.#dispatch({ type: \"continue\" });\n };\n const mutationFnContext = {\n client: this.#client,\n meta: this.options.meta,\n mutationKey: this.options.mutationKey\n };\n this.#retryer = createRetryer({\n fn: () => {\n if (!this.options.mutationFn) {\n return Promise.reject(new Error(\"No mutationFn found\"));\n }\n return this.options.mutationFn(variables, mutationFnContext);\n },\n onFail: (failureCount, error) => {\n this.#dispatch({ type: \"failed\", failureCount, error });\n },\n onPause: () => {\n this.#dispatch({ type: \"pause\" });\n },\n onContinue,\n retry: this.options.retry ?? 0,\n retryDelay: this.options.retryDelay,\n networkMode: this.options.networkMode,\n canRun: () => this.#mutationCache.canRun(this)\n });\n const restored = this.state.status === \"pending\";\n const isPaused = !this.#retryer.canStart();\n try {\n if (restored) {\n onContinue();\n } else {\n this.#dispatch({ type: \"pending\", variables, isPaused });\n if (this.#mutationCache.config.onMutate) {\n await this.#mutationCache.config.onMutate(\n variables,\n this,\n mutationFnContext\n );\n }\n const context = await this.options.onMutate?.(\n variables,\n mutationFnContext\n );\n if (context !== this.state.context) {\n this.#dispatch({\n type: \"pending\",\n context,\n variables,\n isPaused\n });\n }\n }\n const data = await this.#retryer.start();\n await this.#mutationCache.config.onSuccess?.(\n data,\n variables,\n this.state.context,\n this,\n mutationFnContext\n );\n await this.options.onSuccess?.(\n data,\n variables,\n this.state.context,\n mutationFnContext\n );\n await this.#mutationCache.config.onSettled?.(\n data,\n null,\n this.state.variables,\n this.state.context,\n this,\n mutationFnContext\n );\n await this.options.onSettled?.(\n data,\n null,\n variables,\n this.state.context,\n mutationFnContext\n );\n this.#dispatch({ type: \"success\", data });\n return data;\n } catch (error) {\n try {\n await this.#mutationCache.config.onError?.(\n error,\n variables,\n this.state.context,\n this,\n mutationFnContext\n );\n } catch (e) {\n void Promise.reject(e);\n }\n try {\n await this.options.onError?.(\n error,\n variables,\n this.state.context,\n mutationFnContext\n );\n } catch (e) {\n void Promise.reject(e);\n }\n try {\n await this.#mutationCache.config.onSettled?.(\n void 0,\n error,\n this.state.variables,\n this.state.context,\n this,\n mutationFnContext\n );\n } catch (e) {\n void Promise.reject(e);\n }\n try {\n await this.options.onSettled?.(\n void 0,\n error,\n variables,\n this.state.context,\n mutationFnContext\n );\n } catch (e) {\n void Promise.reject(e);\n }\n this.#dispatch({ type: \"error\", error });\n throw error;\n } finally {\n this.#mutationCache.runNext(this);\n }\n }\n #dispatch(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n failureCount: action.failureCount,\n failureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n isPaused: true\n };\n case \"continue\":\n return {\n ...state,\n isPaused: false\n };\n case \"pending\":\n return {\n ...state,\n context: action.context,\n data: void 0,\n failureCount: 0,\n failureReason: null,\n error: null,\n isPaused: action.isPaused,\n status: \"pending\",\n variables: action.variables,\n submittedAt: Date.now()\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n failureCount: 0,\n failureReason: null,\n error: null,\n status: \"success\",\n isPaused: false\n };\n case \"error\":\n return {\n ...state,\n data: void 0,\n error: action.error,\n failureCount: state.failureCount + 1,\n failureReason: action.error,\n isPaused: false,\n status: \"error\"\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.#observers.forEach((observer) => {\n observer.onMutationUpdate(action);\n });\n this.#mutationCache.notify({\n mutation: this,\n type: \"updated\",\n action\n });\n });\n }\n};\nfunction getDefaultState() {\n return {\n context: void 0,\n data: void 0,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: false,\n status: \"idle\",\n variables: void 0,\n submittedAt: 0\n };\n}\nexport {\n Mutation,\n getDefaultState\n};\n//# sourceMappingURL=mutation.js.map","// src/mutationCache.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Mutation } from \"./mutation.js\";\nimport { matchMutation, noop } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar MutationCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n this.#mutations = /* @__PURE__ */ new Set();\n this.#scopes = /* @__PURE__ */ new Map();\n this.#mutationId = 0;\n }\n #mutations;\n #scopes;\n #mutationId;\n build(client, options, state) {\n const mutation = new Mutation({\n client,\n mutationCache: this,\n mutationId: ++this.#mutationId,\n options: client.defaultMutationOptions(options),\n state\n });\n this.add(mutation);\n return mutation;\n }\n add(mutation) {\n this.#mutations.add(mutation);\n const scope = scopeFor(mutation);\n if (typeof scope === \"string\") {\n const scopedMutations = this.#scopes.get(scope);\n if (scopedMutations) {\n scopedMutations.push(mutation);\n } else {\n this.#scopes.set(scope, [mutation]);\n }\n }\n this.notify({ type: \"added\", mutation });\n }\n remove(mutation) {\n if (this.#mutations.delete(mutation)) {\n const scope = scopeFor(mutation);\n if (typeof scope === \"string\") {\n const scopedMutations = this.#scopes.get(scope);\n if (scopedMutations) {\n if (scopedMutations.length > 1) {\n const index = scopedMutations.indexOf(mutation);\n if (index !== -1) {\n scopedMutations.splice(index, 1);\n }\n } else if (scopedMutations[0] === mutation) {\n this.#scopes.delete(scope);\n }\n }\n }\n }\n this.notify({ type: \"removed\", mutation });\n }\n canRun(mutation) {\n const scope = scopeFor(mutation);\n if (typeof scope === \"string\") {\n const mutationsWithSameScope = this.#scopes.get(scope);\n const firstPendingMutation = mutationsWithSameScope?.find(\n (m) => m.state.status === \"pending\"\n );\n return !firstPendingMutation || firstPendingMutation === mutation;\n } else {\n return true;\n }\n }\n runNext(mutation) {\n const scope = scopeFor(mutation);\n if (typeof scope === \"string\") {\n const foundMutation = this.#scopes.get(scope)?.find((m) => m !== mutation && m.state.isPaused);\n return foundMutation?.continue() ?? Promise.resolve();\n } else {\n return Promise.resolve();\n }\n }\n clear() {\n notifyManager.batch(() => {\n this.#mutations.forEach((mutation) => {\n this.notify({ type: \"removed\", mutation });\n });\n this.#mutations.clear();\n this.#scopes.clear();\n });\n }\n getAll() {\n return Array.from(this.#mutations);\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return this.getAll().find(\n (mutation) => matchMutation(defaultedFilters, mutation)\n );\n }\n findAll(filters = {}) {\n return this.getAll().filter((mutation) => matchMutation(filters, mutation));\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n resumePausedMutations() {\n const pausedMutations = this.getAll().filter((x) => x.state.isPaused);\n return notifyManager.batch(\n () => Promise.all(\n pausedMutations.map((mutation) => mutation.continue().catch(noop))\n )\n );\n }\n};\nfunction scopeFor(mutation) {\n return mutation.options.scope?.id;\n}\nexport {\n MutationCache\n};\n//# sourceMappingURL=mutationCache.js.map","// src/mutationObserver.ts\nimport { getDefaultState } from \"./mutation.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { hashKey, shallowEqualObjects } from \"./utils.js\";\nvar MutationObserver = class extends Subscribable {\n #client;\n #currentResult = void 0;\n #currentMutation;\n #mutateOptions;\n constructor(client, options) {\n super();\n this.#client = client;\n this.setOptions(options);\n this.bindMethods();\n this.#updateResult();\n }\n bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n }\n setOptions(options) {\n const prevOptions = this.options;\n this.options = this.#client.defaultMutationOptions(options);\n if (!shallowEqualObjects(this.options, prevOptions)) {\n this.#client.getMutationCache().notify({\n type: \"observerOptionsUpdated\",\n mutation: this.#currentMutation,\n observer: this\n });\n }\n if (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) {\n this.reset();\n } else if (this.#currentMutation?.state.status === \"pending\") {\n this.#currentMutation.setOptions(this.options);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#currentMutation?.removeObserver(this);\n }\n }\n onMutationUpdate(action) {\n this.#updateResult();\n this.#notify(action);\n }\n getCurrentResult() {\n return this.#currentResult;\n }\n reset() {\n this.#currentMutation?.removeObserver(this);\n this.#currentMutation = void 0;\n this.#updateResult();\n this.#notify();\n }\n mutate(variables, options) {\n this.#mutateOptions = options;\n this.#currentMutation?.removeObserver(this);\n this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n this.#currentMutation.addObserver(this);\n return this.#currentMutation.execute(variables);\n }\n #updateResult() {\n const state = this.#currentMutation?.state ?? getDefaultState();\n this.#currentResult = {\n ...state,\n isPending: state.status === \"pending\",\n isSuccess: state.status === \"success\",\n isError: state.status === \"error\",\n isIdle: state.status === \"idle\",\n mutate: this.mutate,\n reset: this.reset\n };\n }\n #notify(action) {\n notifyManager.batch(() => {\n if (this.#mutateOptions && this.hasListeners()) {\n const variables = this.#currentResult.variables;\n const onMutateResult = this.#currentResult.context;\n const context = {\n client: this.#client,\n meta: this.options.meta,\n mutationKey: this.options.mutationKey\n };\n if (action?.type === \"success\") {\n try {\n this.#mutateOptions.onSuccess?.(\n action.data,\n variables,\n onMutateResult,\n context\n );\n } catch (e) {\n void Promise.reject(e);\n }\n try {\n this.#mutateOptions.onSettled?.(\n action.data,\n null,\n variables,\n onMutateResult,\n context\n );\n } catch (e) {\n void Promise.reject(e);\n }\n } else if (action?.type === \"error\") {\n try {\n this.#mutateOptions.onError?.(\n action.error,\n variables,\n onMutateResult,\n context\n );\n } catch (e) {\n void Promise.reject(e);\n }\n try {\n this.#mutateOptions.onSettled?.(\n void 0,\n action.error,\n variables,\n onMutateResult,\n context\n );\n } catch (e) {\n void Promise.reject(e);\n }\n }\n }\n this.listeners.forEach((listener) => {\n listener(this.#currentResult);\n });\n });\n }\n};\nexport {\n MutationObserver\n};\n//# sourceMappingURL=mutationObserver.js.map","// src/queriesObserver.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { QueryObserver } from \"./queryObserver.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { replaceEqualDeep, shallowEqualObjects } from \"./utils.js\";\nfunction difference(array1, array2) {\n const excludeSet = new Set(array2);\n return array1.filter((x) => !excludeSet.has(x));\n}\nfunction replaceAt(array, index, value) {\n const copy = array.slice(0);\n copy[index] = value;\n return copy;\n}\nvar QueriesObserver = class extends Subscribable {\n #client;\n #result;\n #queries;\n #options;\n #observers;\n #combinedResult;\n #lastCombine;\n #lastResult;\n #lastQueryHashes;\n #observerMatches = [];\n constructor(client, queries, options) {\n super();\n this.#client = client;\n this.#options = options;\n this.#queries = [];\n this.#observers = [];\n this.#result = [];\n this.setQueries(queries);\n }\n onSubscribe() {\n if (this.listeners.size === 1) {\n this.#observers.forEach((observer) => {\n observer.subscribe((result) => {\n this.#onUpdate(observer, result);\n });\n });\n }\n }\n onUnsubscribe() {\n if (!this.listeners.size) {\n this.destroy();\n }\n }\n destroy() {\n this.listeners = /* @__PURE__ */ new Set();\n this.#observers.forEach((observer) => {\n observer.destroy();\n });\n }\n setQueries(queries, options) {\n this.#queries = queries;\n this.#options = options;\n if (process.env.NODE_ENV !== \"production\") {\n const queryHashes = queries.map(\n (query) => this.#client.defaultQueryOptions(query).queryHash\n );\n if (new Set(queryHashes).size !== queryHashes.length) {\n console.warn(\n \"[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.\"\n );\n }\n }\n notifyManager.batch(() => {\n const prevObservers = this.#observers;\n const newObserverMatches = this.#findMatchingObservers(this.#queries);\n newObserverMatches.forEach(\n (match) => match.observer.setOptions(match.defaultedQueryOptions)\n );\n const newObservers = newObserverMatches.map((match) => match.observer);\n const newResult = newObservers.map(\n (observer) => observer.getCurrentResult()\n );\n const hasLengthChange = prevObservers.length !== newObservers.length;\n const hasIndexChange = newObservers.some(\n (observer, index) => observer !== prevObservers[index]\n );\n const hasStructuralChange = hasLengthChange || hasIndexChange;\n const hasResultChange = hasStructuralChange ? true : newResult.some((result, index) => {\n const prev = this.#result[index];\n return !prev || !shallowEqualObjects(result, prev);\n });\n if (!hasStructuralChange && !hasResultChange) return;\n if (hasStructuralChange) {\n this.#observerMatches = newObserverMatches;\n this.#observers = newObservers;\n }\n this.#result = newResult;\n if (!this.hasListeners()) return;\n if (hasStructuralChange) {\n difference(prevObservers, newObservers).forEach((observer) => {\n observer.destroy();\n });\n difference(newObservers, prevObservers).forEach((observer) => {\n observer.subscribe((result) => {\n this.#onUpdate(observer, result);\n });\n });\n }\n this.#notify();\n });\n }\n getCurrentResult() {\n return this.#result;\n }\n getQueries() {\n return this.#observers.map((observer) => observer.getCurrentQuery());\n }\n getObservers() {\n return this.#observers;\n }\n getOptimisticResult(queries, combine) {\n const matches = this.#findMatchingObservers(queries);\n const result = matches.map(\n (match) => match.observer.getOptimisticResult(match.defaultedQueryOptions)\n );\n const queryHashes = matches.map(\n (match) => match.defaultedQueryOptions.queryHash\n );\n return [\n result,\n (r) => {\n return this.#combineResult(r ?? result, combine, queryHashes);\n },\n () => {\n return this.#trackResult(result, matches);\n }\n ];\n }\n #trackResult(result, matches) {\n return matches.map((match, index) => {\n const observerResult = result[index];\n return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult, (accessedProp) => {\n matches.forEach((m) => {\n m.observer.trackProp(accessedProp);\n });\n }) : observerResult;\n });\n }\n #combineResult(input, combine, queryHashes) {\n if (combine) {\n const lastHashes = this.#lastQueryHashes;\n const queryHashesChanged = queryHashes !== void 0 && lastHashes !== void 0 && (lastHashes.length !== queryHashes.length || queryHashes.some((hash, i) => hash !== lastHashes[i]));\n if (!this.#combinedResult || this.#result !== this.#lastResult || queryHashesChanged || combine !== this.#lastCombine) {\n this.#lastCombine = combine;\n this.#lastResult = this.#result;\n if (queryHashes !== void 0) {\n this.#lastQueryHashes = queryHashes;\n }\n this.#combinedResult = replaceEqualDeep(\n this.#combinedResult,\n combine(input)\n );\n }\n return this.#combinedResult;\n }\n return input;\n }\n #shouldSkipCombine() {\n return this.#options?.combine !== void 0 && this.#observers.some((observer, index) => {\n return observer.options.suspense && this.#result[index]?.data === void 0;\n });\n }\n #findMatchingObservers(queries) {\n const prevObserversMap = /* @__PURE__ */ new Map();\n this.#observers.forEach((observer) => {\n const key = observer.options.queryHash;\n if (!key) return;\n const previousObservers = prevObserversMap.get(key);\n if (previousObservers) {\n previousObservers.push(observer);\n } else {\n prevObserversMap.set(key, [observer]);\n }\n });\n const observers = [];\n queries.forEach((options) => {\n const defaultedOptions = this.#client.defaultQueryOptions(options);\n const match = prevObserversMap.get(defaultedOptions.queryHash)?.shift();\n const observer = match ?? new QueryObserver(this.#client, defaultedOptions);\n observers.push({\n defaultedQueryOptions: defaultedOptions,\n observer\n });\n });\n return observers;\n }\n #onUpdate(observer, result) {\n const index = this.#observers.indexOf(observer);\n if (index !== -1) {\n this.#result = replaceAt(this.#result, index, result);\n this.#notify();\n }\n }\n #notify() {\n if (this.hasListeners()) {\n const newTracked = this.#trackResult(this.#result, this.#observerMatches);\n const shouldSkipCombine = this.#shouldSkipCombine();\n const previousResult = this.#combinedResult;\n const newResult = shouldSkipCombine ? previousResult : this.#combineResult(newTracked, this.#options?.combine);\n if (shouldSkipCombine || previousResult !== newResult) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(this.#result);\n });\n });\n }\n }\n }\n};\nexport {\n QueriesObserver\n};\n//# sourceMappingURL=queriesObserver.js.map","// src/queryCache.ts\nimport { hashQueryKeyByOptions, matchQuery } from \"./utils.js\";\nimport { Query } from \"./query.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar QueryCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n this.#queries = /* @__PURE__ */ new Map();\n }\n #queries;\n build(client, options, state) {\n const queryKey = options.queryKey;\n const queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);\n let query = this.get(queryHash);\n if (!query) {\n query = new Query({\n client,\n queryKey,\n queryHash,\n options: client.defaultQueryOptions(options),\n state,\n defaultOptions: client.getQueryDefaults(queryKey)\n });\n this.add(query);\n }\n return query;\n }\n add(query) {\n if (!this.#queries.has(query.queryHash)) {\n this.#queries.set(query.queryHash, query);\n this.notify({\n type: \"added\",\n query\n });\n }\n }\n remove(query) {\n const queryInMap = this.#queries.get(query.queryHash);\n if (queryInMap) {\n query.destroy();\n if (queryInMap === query) {\n this.#queries.delete(query.queryHash);\n }\n this.notify({ type: \"removed\", query });\n }\n }\n clear() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n this.remove(query);\n });\n });\n }\n get(queryHash) {\n return this.#queries.get(queryHash);\n }\n getAll() {\n return [...this.#queries.values()];\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return this.getAll().find(\n (query) => matchQuery(defaultedFilters, query)\n );\n }\n findAll(filters = {}) {\n const queries = this.getAll();\n return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n onFocus() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onFocus();\n });\n });\n }\n onOnline() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onOnline();\n });\n });\n }\n};\nexport {\n QueryCache\n};\n//# sourceMappingURL=queryCache.js.map","// src/queryClient.ts\nimport {\n functionalUpdate,\n hashKey,\n hashQueryKeyByOptions,\n noop,\n partialMatchKey,\n resolveStaleTime,\n skipToken\n} from \"./utils.js\";\nimport { QueryCache } from \"./queryCache.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nvar QueryClient = class {\n #queryCache;\n #mutationCache;\n #defaultOptions;\n #queryDefaults;\n #mutationDefaults;\n #mountCount;\n #unsubscribeFocus;\n #unsubscribeOnline;\n constructor(config = {}) {\n this.#queryCache = config.queryCache || new QueryCache();\n this.#mutationCache = config.mutationCache || new MutationCache();\n this.#defaultOptions = config.defaultOptions || {};\n this.#queryDefaults = /* @__PURE__ */ new Map();\n this.#mutationDefaults = /* @__PURE__ */ new Map();\n this.#mountCount = 0;\n }\n mount() {\n this.#mountCount++;\n if (this.#mountCount !== 1) return;\n this.#unsubscribeFocus = focusManager.subscribe(async (focused) => {\n if (focused) {\n await this.resumePausedMutations();\n this.#queryCache.onFocus();\n }\n });\n this.#unsubscribeOnline = onlineManager.subscribe(async (online) => {\n if (online) {\n await this.resumePausedMutations();\n this.#queryCache.onOnline();\n }\n });\n }\n unmount() {\n this.#mountCount--;\n if (this.#mountCount !== 0) return;\n this.#unsubscribeFocus?.();\n this.#unsubscribeFocus = void 0;\n this.#unsubscribeOnline?.();\n this.#unsubscribeOnline = void 0;\n }\n isFetching(filters) {\n return this.#queryCache.findAll({ ...filters, fetchStatus: \"fetching\" }).length;\n }\n isMutating(filters) {\n return this.#mutationCache.findAll({ ...filters, status: \"pending\" }).length;\n }\n /**\n * Imperative (non-reactive) way to retrieve data for a QueryKey.\n * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.\n *\n * Hint: Do not use this function inside a component, because it won't receive updates.\n * Use `useQuery` to create a `QueryObserver` that subscribes to changes.\n */\n getQueryData(queryKey) {\n const options = this.defaultQueryOptions({ queryKey });\n return this.#queryCache.get(options.queryHash)?.state.data;\n }\n ensureQueryData(options) {\n const defaultedOptions = this.defaultQueryOptions(options);\n const query = this.#queryCache.build(this, defaultedOptions);\n const cachedData = query.state.data;\n if (cachedData === void 0) {\n return this.fetchQuery(options);\n }\n if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) {\n void this.prefetchQuery(defaultedOptions);\n }\n return Promise.resolve(cachedData);\n }\n getQueriesData(filters) {\n return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {\n const data = state.data;\n return [queryKey, data];\n });\n }\n setQueryData(queryKey, updater, options) {\n const defaultedOptions = this.defaultQueryOptions({ queryKey });\n const query = this.#queryCache.get(\n defaultedOptions.queryHash\n );\n const prevData = query?.state.data;\n const data = functionalUpdate(updater, prevData);\n if (data === void 0) {\n return void 0;\n }\n return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });\n }\n setQueriesData(filters, updater, options) {\n return notifyManager.batch(\n () => this.#queryCache.findAll(filters).map(({ queryKey }) => [\n queryKey,\n this.setQueryData(queryKey, updater, options)\n ])\n );\n }\n getQueryState(queryKey) {\n const options = this.defaultQueryOptions({ queryKey });\n return this.#queryCache.get(\n options.queryHash\n )?.state;\n }\n removeQueries(filters) {\n const queryCache = this.#queryCache;\n notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n queryCache.remove(query);\n });\n });\n }\n resetQueries(filters, options) {\n const queryCache = this.#queryCache;\n return notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n query.reset();\n });\n return this.refetchQueries(\n {\n type: \"active\",\n ...filters\n },\n options\n );\n });\n }\n cancelQueries(filters, cancelOptions = {}) {\n const defaultedCancelOptions = { revert: true, ...cancelOptions };\n const promises = notifyManager.batch(\n () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))\n );\n return Promise.all(promises).then(noop).catch(noop);\n }\n invalidateQueries(filters, options = {}) {\n return notifyManager.batch(() => {\n this.#queryCache.findAll(filters).forEach((query) => {\n query.invalidate();\n });\n if (filters?.refetchType === \"none\") {\n return Promise.resolve();\n }\n return this.refetchQueries(\n {\n ...filters,\n type: filters?.refetchType ?? filters?.type ?? \"active\"\n },\n options\n );\n });\n }\n refetchQueries(filters, options = {}) {\n const fetchOptions = {\n ...options,\n cancelRefetch: options.cancelRefetch ?? true\n };\n const promises = notifyManager.batch(\n () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {\n let promise = query.fetch(void 0, fetchOptions);\n if (!fetchOptions.throwOnError) {\n promise = promise.catch(noop);\n }\n return query.state.fetchStatus === \"paused\" ? Promise.resolve() : promise;\n })\n );\n return Promise.all(promises).then(noop);\n }\n fetchQuery(options) {\n const defaultedOptions = this.defaultQueryOptions(options);\n if (defaultedOptions.retry === void 0) {\n defaultedOptions.retry = false;\n }\n const query = this.#queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(\n resolveStaleTime(defaultedOptions.staleTime, query)\n ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n }\n prefetchQuery(options) {\n return this.fetchQuery(options).then(noop).catch(noop);\n }\n fetchInfiniteQuery(options) {\n options._type = \"infinite\";\n return this.fetchQuery(options);\n }\n prefetchInfiniteQuery(options) {\n return this.fetchInfiniteQuery(options).then(noop).catch(noop);\n }\n ensureInfiniteQueryData(options) {\n options._type = \"infinite\";\n return this.ensureQueryData(options);\n }\n resumePausedMutations() {\n if (onlineManager.isOnline()) {\n return this.#mutationCache.resumePausedMutations();\n }\n return Promise.resolve();\n }\n getQueryCache() {\n return this.#queryCache;\n }\n getMutationCache() {\n return this.#mutationCache;\n }\n getDefaultOptions() {\n return this.#defaultOptions;\n }\n setDefaultOptions(options) {\n this.#defaultOptions = options;\n }\n setQueryDefaults(queryKey, options) {\n this.#queryDefaults.set(hashKey(queryKey), {\n queryKey,\n defaultOptions: options\n });\n }\n getQueryDefaults(queryKey) {\n const defaults = [...this.#queryDefaults.values()];\n const result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(queryKey, queryDefault.queryKey)) {\n Object.assign(result, queryDefault.defaultOptions);\n }\n });\n return result;\n }\n setMutationDefaults(mutationKey, options) {\n this.#mutationDefaults.set(hashKey(mutationKey), {\n mutationKey,\n defaultOptions: options\n });\n }\n getMutationDefaults(mutationKey) {\n const defaults = [...this.#mutationDefaults.values()];\n const result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {\n Object.assign(result, queryDefault.defaultOptions);\n }\n });\n return result;\n }\n defaultQueryOptions(options) {\n if (options._defaulted) {\n return options;\n }\n const defaultedOptions = {\n ...this.#defaultOptions.queries,\n ...this.getQueryDefaults(options.queryKey),\n ...options,\n _defaulted: true\n };\n if (!defaultedOptions.queryHash) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(\n defaultedOptions.queryKey,\n defaultedOptions\n );\n }\n if (defaultedOptions.refetchOnReconnect === void 0) {\n defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== \"always\";\n }\n if (defaultedOptions.throwOnError === void 0) {\n defaultedOptions.throwOnError = !!defaultedOptions.suspense;\n }\n if (!defaultedOptions.networkMode && defaultedOptions.persister) {\n defaultedOptions.networkMode = \"offlineFirst\";\n }\n if (defaultedOptions.queryFn === skipToken) {\n defaultedOptions.enabled = false;\n }\n return defaultedOptions;\n }\n defaultMutationOptions(options) {\n if (options?._defaulted) {\n return options;\n }\n return {\n ...this.#defaultOptions.mutations,\n ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),\n ...options,\n _defaulted: true\n };\n }\n clear() {\n this.#queryCache.clear();\n this.#mutationCache.clear();\n }\n};\nexport {\n QueryClient\n};\n//# sourceMappingURL=queryClient.js.map","// src/streamedQuery.ts\nimport { addConsumeAwareSignal, addToEnd } from \"./utils.js\";\nfunction streamedQuery({\n streamFn,\n refetchMode = \"reset\",\n reducer = (items, chunk) => addToEnd(items, chunk),\n initialValue = []\n}) {\n return async (context) => {\n const query = context.client.getQueryCache().find({ queryKey: context.queryKey, exact: true });\n const isRefetch = !!query && query.isFetched();\n if (isRefetch && refetchMode === \"reset\") {\n query.setState({\n ...query.resetState,\n fetchStatus: \"fetching\"\n });\n }\n let result = initialValue;\n let cancelled = false;\n const streamFnContext = addConsumeAwareSignal(\n {\n client: context.client,\n meta: context.meta,\n queryKey: context.queryKey,\n pageParam: context.pageParam,\n direction: context.direction\n },\n () => context.signal,\n () => cancelled = true\n );\n const stream = await streamFn(streamFnContext);\n const isReplaceRefetch = isRefetch && refetchMode === \"replace\";\n for await (const chunk of stream) {\n if (cancelled) {\n break;\n }\n if (isReplaceRefetch) {\n result = reducer(result, chunk);\n } else {\n context.client.setQueryData(\n context.queryKey,\n (prev) => reducer(prev === void 0 ? initialValue : prev, chunk)\n );\n }\n }\n if (isReplaceRefetch && !cancelled) {\n context.client.setQueryData(context.queryKey, result);\n }\n return context.client.getQueryData(context.queryKey) ?? initialValue;\n };\n}\nexport {\n streamedQuery\n};\n//# sourceMappingURL=streamedQuery.js.map","// src/types.ts\nvar dataTagSymbol = /* @__PURE__ */ Symbol(\"dataTagSymbol\");\nvar dataTagErrorSymbol = /* @__PURE__ */ Symbol(\"dataTagErrorSymbol\");\nvar unsetMarker = /* @__PURE__ */ Symbol(\"unsetMarker\");\nexport {\n dataTagErrorSymbol,\n dataTagSymbol,\n unsetMarker\n};\n//# sourceMappingURL=types.js.map","// src/utils.ts\nimport { isRef, unref } from \"vue-demi\";\nvar VUE_QUERY_CLIENT = \"VUE_QUERY_CLIENT\";\nfunction getClientKey(key) {\n const suffix = key ? `:${key}` : \"\";\n return `${VUE_QUERY_CLIENT}${suffix}`;\n}\nfunction updateState(state, update) {\n Object.keys(state).forEach((key) => {\n state[key] = update[key];\n });\n}\nfunction _cloneDeep(value, customize, currentKey = \"\", currentLevel = 0) {\n if (customize) {\n const result = customize(value, currentKey, currentLevel);\n if (result === void 0 && isRef(value)) {\n return result;\n }\n if (result !== void 0) {\n return result;\n }\n }\n if (Array.isArray(value)) {\n return value.map(\n (val, index) => _cloneDeep(val, customize, String(index), currentLevel + 1)\n );\n }\n if (typeof value === \"object\" && isPlainObject(value)) {\n const entries = Object.entries(value).map(([key, val]) => [\n key,\n _cloneDeep(val, customize, key, currentLevel + 1)\n ]);\n return Object.fromEntries(entries);\n }\n return value;\n}\nfunction cloneDeep(value, customize) {\n return _cloneDeep(value, customize);\n}\nfunction cloneDeepUnref(obj, unrefGetters = false) {\n return cloneDeep(obj, (val, key, level) => {\n if (level === 1 && key === \"queryKey\") {\n return cloneDeepUnref(val, true);\n }\n if (unrefGetters && isFunction(val)) {\n return cloneDeepUnref(val(), unrefGetters);\n }\n if (isRef(val)) {\n return cloneDeepUnref(unref(val), unrefGetters);\n }\n return void 0;\n });\n}\nfunction isPlainObject(value) {\n if (Object.prototype.toString.call(value) !== \"[object Object]\") {\n return false;\n }\n const prototype = Object.getPrototypeOf(value);\n return prototype === null || prototype === Object.prototype;\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\nfunction toValueDeep(source) {\n return isFunction(source) ? source() : cloneDeepUnref(source);\n}\nexport {\n VUE_QUERY_CLIENT,\n cloneDeep,\n cloneDeepUnref,\n getClientKey,\n toValueDeep,\n updateState\n};\n//# sourceMappingURL=utils.js.map","// src/useQueryClient.ts\nimport { hasInjectionContext, inject } from \"vue-demi\";\nimport { getClientKey } from \"./utils.js\";\nfunction useQueryClient(id = \"\") {\n if (!hasInjectionContext()) {\n throw new Error(\n \"vue-query hooks can only be used inside setup() function or functions that support injection context.\"\n );\n }\n const key = getClientKey(id);\n const queryClient = inject(key);\n if (!queryClient) {\n throw new Error(\n \"No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.\"\n );\n }\n return queryClient;\n}\nexport {\n useQueryClient\n};\n//# sourceMappingURL=useQueryClient.js.map","// src/queryCache.ts\nimport { QueryCache as QC } from \"@tanstack/query-core\";\nimport { cloneDeepUnref } from \"./utils.js\";\nvar QueryCache = class extends QC {\n find(filters) {\n return super.find(cloneDeepUnref(filters));\n }\n findAll(filters = {}) {\n return super.findAll(cloneDeepUnref(filters));\n }\n};\nexport {\n QueryCache\n};\n//# sourceMappingURL=queryCache.js.map","// src/mutationCache.ts\nimport { MutationCache as MC } from \"@tanstack/query-core\";\nimport { cloneDeepUnref } from \"./utils.js\";\nvar MutationCache = class extends MC {\n find(filters) {\n return super.find(cloneDeepUnref(filters));\n }\n findAll(filters = {}) {\n return super.findAll(cloneDeepUnref(filters));\n }\n};\nexport {\n MutationCache\n};\n//# sourceMappingURL=mutationCache.js.map","// src/queryClient.ts\nimport { nextTick, ref } from \"vue-demi\";\nimport { QueryClient as QC } from \"@tanstack/query-core\";\nimport { cloneDeepUnref } from \"./utils.js\";\nimport { QueryCache } from \"./queryCache.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nvar QueryClient = class extends QC {\n constructor(config = {}) {\n const vueQueryConfig = {\n defaultOptions: config.defaultOptions,\n queryCache: config.queryCache || new QueryCache(),\n mutationCache: config.mutationCache || new MutationCache()\n };\n super(vueQueryConfig);\n this.isRestoring = ref(false);\n }\n isFetching(filters = {}) {\n return super.isFetching(cloneDeepUnref(filters));\n }\n isMutating(filters = {}) {\n return super.isMutating(cloneDeepUnref(filters));\n }\n getQueryData(queryKey) {\n return super.getQueryData(cloneDeepUnref(queryKey));\n }\n ensureQueryData(options) {\n return super.ensureQueryData(cloneDeepUnref(options));\n }\n getQueriesData(filters) {\n return super.getQueriesData(cloneDeepUnref(filters));\n }\n setQueryData(queryKey, updater, options = {}) {\n return super.setQueryData(\n cloneDeepUnref(queryKey),\n updater,\n cloneDeepUnref(options)\n );\n }\n setQueriesData(filters, updater, options = {}) {\n return super.setQueriesData(\n cloneDeepUnref(filters),\n updater,\n cloneDeepUnref(options)\n );\n }\n getQueryState(queryKey) {\n return super.getQueryState(cloneDeepUnref(queryKey));\n }\n removeQueries(filters = {}) {\n return super.removeQueries(cloneDeepUnref(filters));\n }\n resetQueries(filters = {}, options = {}) {\n return super.resetQueries(cloneDeepUnref(filters), cloneDeepUnref(options));\n }\n cancelQueries(filters = {}, options = {}) {\n return super.cancelQueries(cloneDeepUnref(filters), cloneDeepUnref(options));\n }\n invalidateQueries(filters = {}, options = {}) {\n const filtersCloned = cloneDeepUnref(\n filters\n );\n const optionsCloned = cloneDeepUnref(\n options\n );\n super.invalidateQueries(\n { ...filtersCloned, refetchType: \"none\" },\n optionsCloned\n );\n if (filtersCloned.refetchType === \"none\") {\n return Promise.resolve();\n }\n const refetchFilters = {\n ...filtersCloned,\n type: filtersCloned.refetchType ?? filtersCloned.type ?? \"active\"\n };\n return nextTick().then(() => {\n return super.refetchQueries(refetchFilters, optionsCloned);\n });\n }\n refetchQueries(filters = {}, options = {}) {\n return super.refetchQueries(\n cloneDeepUnref(filters),\n cloneDeepUnref(options)\n );\n }\n fetchQuery(options) {\n return super.fetchQuery(cloneDeepUnref(options));\n }\n prefetchQuery(options) {\n return super.prefetchQuery(cloneDeepUnref(options));\n }\n fetchInfiniteQuery(options) {\n return super.fetchInfiniteQuery(cloneDeepUnref(options));\n }\n prefetchInfiniteQuery(options) {\n return super.prefetchInfiniteQuery(cloneDeepUnref(options));\n }\n setDefaultOptions(options) {\n super.setDefaultOptions(cloneDeepUnref(options));\n }\n setQueryDefaults(queryKey, options) {\n super.setQueryDefaults(cloneDeepUnref(queryKey), cloneDeepUnref(options));\n }\n getQueryDefaults(queryKey) {\n return super.getQueryDefaults(cloneDeepUnref(queryKey));\n }\n setMutationDefaults(mutationKey, options) {\n super.setMutationDefaults(\n cloneDeepUnref(mutationKey),\n cloneDeepUnref(options)\n );\n }\n getMutationDefaults(mutationKey) {\n return super.getMutationDefaults(cloneDeepUnref(mutationKey));\n }\n};\nexport {\n QueryClient\n};\n//# sourceMappingURL=queryClient.js.map","export function getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nexport function getTarget() {\n // @ts-expect-error navigator and windows are not available in all environments\n return (typeof navigator !== 'undefined' && typeof window !== 'undefined')\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : {};\n}\nexport const isProxyAvailable = typeof Proxy === 'function';\n","export const HOOK_SETUP = 'devtools-plugin:setup';\nexport const HOOK_PLUGIN_SETTINGS_SET = 'plugin:settings:set';\n","let supported;\nlet perf;\nexport function isPerformanceSupported() {\n var _a;\n if (supported !== undefined) {\n return supported;\n }\n if (typeof window !== 'undefined' && window.performance) {\n supported = true;\n perf = window.performance;\n }\n else if (typeof globalThis !== 'undefined' && ((_a = globalThis.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = globalThis.perf_hooks.performance;\n }\n else {\n supported = false;\n }\n return supported;\n}\nexport function now() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\n","import { HOOK_PLUGIN_SETTINGS_SET } from './const.js';\nimport { now } from './time.js';\nexport class ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n }\n catch (e) {\n // noop\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n }\n catch (e) {\n // noop\n }\n currentSettings = value;\n },\n now() {\n return now();\n },\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n }\n else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args,\n });\n };\n }\n },\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n }\n else if (prop === 'on') {\n return this.proxiedOn;\n }\n else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => { },\n });\n return this.fallbacks[prop](...args);\n };\n }\n else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve,\n });\n });\n };\n }\n },\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\n","import { getDevtoolsGlobalHook, getTarget, isProxyAvailable } from './env.js';\nimport { HOOK_SETUP } from './const.js';\nimport { ApiProxy } from './proxy.js';\nexport * from './api/index.js';\nexport * from './plugin.js';\nexport * from './time.js';\nexport function setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n }\n else {\n const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy,\n });\n if (proxy) {\n setupFn(proxy.proxiedTarget);\n }\n }\n}\n","/**\n * match-sorter-utils\n *\n * Copyright (c) TanStack\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 */\nconst characterMap = {\n À: 'A',\n Á: 'A',\n Â: 'A',\n Ã: 'A',\n Ä: 'A',\n Å: 'A',\n Ấ: 'A',\n Ắ: 'A',\n Ẳ: 'A',\n Ẵ: 'A',\n Ặ: 'A',\n Æ: 'AE',\n Ầ: 'A',\n Ằ: 'A',\n Ȃ: 'A',\n Ç: 'C',\n Ḉ: 'C',\n È: 'E',\n É: 'E',\n Ê: 'E',\n Ë: 'E',\n Ế: 'E',\n Ḗ: 'E',\n Ề: 'E',\n Ḕ: 'E',\n Ḝ: 'E',\n Ȇ: 'E',\n Ì: 'I',\n Í: 'I',\n Î: 'I',\n Ï: 'I',\n Ḯ: 'I',\n Ȋ: 'I',\n Ð: 'D',\n Ñ: 'N',\n Ò: 'O',\n Ó: 'O',\n Ô: 'O',\n Õ: 'O',\n Ö: 'O',\n Ø: 'O',\n Ố: 'O',\n Ṍ: 'O',\n Ṓ: 'O',\n Ȏ: 'O',\n Ù: 'U',\n Ú: 'U',\n Û: 'U',\n Ü: 'U',\n Ý: 'Y',\n à: 'a',\n á: 'a',\n â: 'a',\n ã: 'a',\n ä: 'a',\n å: 'a',\n ấ: 'a',\n ắ: 'a',\n ẳ: 'a',\n ẵ: 'a',\n ặ: 'a',\n æ: 'ae',\n ầ: 'a',\n ằ: 'a',\n ȃ: 'a',\n ç: 'c',\n ḉ: 'c',\n è: 'e',\n é: 'e',\n ê: 'e',\n ë: 'e',\n ế: 'e',\n ḗ: 'e',\n ề: 'e',\n ḕ: 'e',\n ḝ: 'e',\n ȇ: 'e',\n ì: 'i',\n í: 'i',\n î: 'i',\n ï: 'i',\n ḯ: 'i',\n ȋ: 'i',\n ð: 'd',\n ñ: 'n',\n ò: 'o',\n ó: 'o',\n ô: 'o',\n õ: 'o',\n ö: 'o',\n ø: 'o',\n ố: 'o',\n ṍ: 'o',\n ṓ: 'o',\n ȏ: 'o',\n ù: 'u',\n ú: 'u',\n û: 'u',\n ü: 'u',\n ý: 'y',\n ÿ: 'y',\n Ā: 'A',\n ā: 'a',\n Ă: 'A',\n ă: 'a',\n Ą: 'A',\n ą: 'a',\n Ć: 'C',\n ć: 'c',\n Ĉ: 'C',\n ĉ: 'c',\n Ċ: 'C',\n ċ: 'c',\n Č: 'C',\n č: 'c',\n C̆: 'C',\n c̆: 'c',\n Ď: 'D',\n ď: 'd',\n Đ: 'D',\n đ: 'd',\n Ē: 'E',\n ē: 'e',\n Ĕ: 'E',\n ĕ: 'e',\n Ė: 'E',\n ė: 'e',\n Ę: 'E',\n ę: 'e',\n Ě: 'E',\n ě: 'e',\n Ĝ: 'G',\n Ǵ: 'G',\n ĝ: 'g',\n ǵ: 'g',\n Ğ: 'G',\n ğ: 'g',\n Ġ: 'G',\n ġ: 'g',\n Ģ: 'G',\n ģ: 'g',\n Ĥ: 'H',\n ĥ: 'h',\n Ħ: 'H',\n ħ: 'h',\n Ḫ: 'H',\n ḫ: 'h',\n Ĩ: 'I',\n ĩ: 'i',\n Ī: 'I',\n ī: 'i',\n Ĭ: 'I',\n ĭ: 'i',\n Į: 'I',\n į: 'i',\n İ: 'I',\n ı: 'i',\n IJ: 'IJ',\n ij: 'ij',\n Ĵ: 'J',\n ĵ: 'j',\n Ķ: 'K',\n ķ: 'k',\n Ḱ: 'K',\n ḱ: 'k',\n K̆: 'K',\n k̆: 'k',\n Ĺ: 'L',\n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 'r',\n Ṧ: 'S',\n ṧ: 's',\n V̌: 'V',\n v̌: 'v',\n W̌: 'W',\n w̌: 'w',\n X̌: 'X',\n x̌: 'x',\n Y̌: 'Y',\n y̌: 'y',\n A̧: 'A',\n a̧: 'a',\n B̧: 'B',\n b̧: 'b',\n Ḑ: 'D',\n ḑ: 'd',\n Ȩ: 'E',\n ȩ: 'e',\n Ɛ̧: 'E',\n ɛ̧: 'e',\n Ḩ: 'H',\n ḩ: 'h',\n I̧: 'I',\n i̧: 'i',\n Ɨ̧: 'I',\n ɨ̧: 'i',\n M̧: 'M',\n m̧: 'm',\n O̧: 'O',\n o̧: 'o',\n Q̧: 'Q',\n q̧: 'q',\n U̧: 'U',\n u̧: 'u',\n X̧: 'X',\n x̧: 'x',\n Z̧: 'Z',\n z̧: 'z'\n};\nconst chars = Object.keys(characterMap).join('|');\nconst allAccents = new RegExp(chars, 'g');\nfunction removeAccents(str) {\n return str.replace(allAccents, match => {\n return characterMap[match];\n });\n}\n\n/**\n * @name match-sorter\n * @license MIT license.\n * @copyright (c) 2099 Kent C. Dodds\n * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)\n */\n\nconst rankings = {\n CASE_SENSITIVE_EQUAL: 7,\n EQUAL: 6,\n STARTS_WITH: 5,\n WORD_STARTS_WITH: 4,\n CONTAINS: 3,\n ACRONYM: 2,\n MATCHES: 1,\n NO_MATCH: 0\n};\n/**\n * Gets the highest ranking for value for the given item based on its values for the given keys\n * @param {*} item - the item to rank\n * @param {String} value - the value to rank against\n * @param {Object} options - options to control the ranking\n * @return {{rank: Number, accessorIndex: Number, accessorThreshold: Number}} - the highest ranking\n */\nfunction rankItem(item, value, options) {\n var _options$threshold;\n options = options || {};\n options.threshold = (_options$threshold = options.threshold) != null ? _options$threshold : rankings.MATCHES;\n if (!options.accessors) {\n // if keys is not specified, then we assume the item given is ready to be matched\n const rank = getMatchRanking(item, value, options);\n return {\n // ends up being duplicate of 'item' in matches but consistent\n rankedValue: item,\n rank,\n accessorIndex: -1,\n accessorThreshold: options.threshold,\n passed: rank >= options.threshold\n };\n }\n const valuesToRank = getAllValuesToRank(item, options.accessors);\n const rankingInfo = {\n rankedValue: item,\n rank: rankings.NO_MATCH,\n accessorIndex: -1,\n accessorThreshold: options.threshold,\n passed: false\n };\n for (let i = 0; i < valuesToRank.length; i++) {\n const rankValue = valuesToRank[i];\n let newRank = getMatchRanking(rankValue.itemValue, value, options);\n const {\n minRanking,\n maxRanking,\n threshold = options.threshold\n } = rankValue.attributes;\n if (newRank < minRanking && newRank >= rankings.MATCHES) {\n newRank = minRanking;\n } else if (newRank > maxRanking) {\n newRank = maxRanking;\n }\n newRank = Math.min(newRank, maxRanking);\n if (newRank >= threshold && newRank > rankingInfo.rank) {\n rankingInfo.rank = newRank;\n rankingInfo.passed = true;\n rankingInfo.accessorIndex = i;\n rankingInfo.accessorThreshold = threshold;\n rankingInfo.rankedValue = rankValue.itemValue;\n }\n }\n return rankingInfo;\n}\n\n/**\n * Gives a rankings score based on how well the two strings match.\n * @param {String} testString - the string to test against\n * @param {String} stringToRank - the string to rank\n * @param {Object} options - options for the match (like keepDiacritics for comparison)\n * @returns {Number} the ranking for how well stringToRank matches testString\n */\nfunction getMatchRanking(testString, stringToRank, options) {\n testString = prepareValueForComparison(testString, options);\n stringToRank = prepareValueForComparison(stringToRank, options);\n\n // too long\n if (stringToRank.length > testString.length) {\n return rankings.NO_MATCH;\n }\n\n // case sensitive equals\n if (testString === stringToRank) {\n return rankings.CASE_SENSITIVE_EQUAL;\n }\n\n // Lower casing before further comparison\n testString = testString.toLowerCase();\n stringToRank = stringToRank.toLowerCase();\n\n // case insensitive equals\n if (testString === stringToRank) {\n return rankings.EQUAL;\n }\n\n // starts with\n if (testString.startsWith(stringToRank)) {\n return rankings.STARTS_WITH;\n }\n\n // word starts with\n if (testString.includes(` ${stringToRank}`)) {\n return rankings.WORD_STARTS_WITH;\n }\n\n // contains\n if (testString.includes(stringToRank)) {\n return rankings.CONTAINS;\n } else if (stringToRank.length === 1) {\n // If the only character in the given stringToRank\n // isn't even contained in the testString, then\n // it's definitely not a match.\n return rankings.NO_MATCH;\n }\n\n // acronym\n if (getAcronym(testString).includes(stringToRank)) {\n return rankings.ACRONYM;\n }\n\n // will return a number between rankings.MATCHES and\n // rankings.MATCHES + 1 depending on how close of a match it is.\n return getClosenessRanking(testString, stringToRank);\n}\n\n/**\n * Generates an acronym for a string.\n *\n * @param {String} string the string for which to produce the acronym\n * @returns {String} the acronym\n */\nfunction getAcronym(string) {\n let acronym = '';\n const wordsInString = string.split(' ');\n wordsInString.forEach(wordInString => {\n const splitByHyphenWords = wordInString.split('-');\n splitByHyphenWords.forEach(splitByHyphenWord => {\n acronym += splitByHyphenWord.substr(0, 1);\n });\n });\n return acronym;\n}\n\n/**\n * Returns a score based on how spread apart the\n * characters from the stringToRank are within the testString.\n * A number close to rankings.MATCHES represents a loose match. A number close\n * to rankings.MATCHES + 1 represents a tighter match.\n * @param {String} testString - the string to test against\n * @param {String} stringToRank - the string to rank\n * @returns {Number} the number between rankings.MATCHES and\n * rankings.MATCHES + 1 for how well stringToRank matches testString\n */\nfunction getClosenessRanking(testString, stringToRank) {\n let matchingInOrderCharCount = 0;\n let charNumber = 0;\n function findMatchingCharacter(matchChar, string, index) {\n for (let j = index, J = string.length; j < J; j++) {\n const stringChar = string[j];\n if (stringChar === matchChar) {\n matchingInOrderCharCount += 1;\n return j + 1;\n }\n }\n return -1;\n }\n function getRanking(spread) {\n const spreadPercentage = 1 / spread;\n const inOrderPercentage = matchingInOrderCharCount / stringToRank.length;\n const ranking = rankings.MATCHES + inOrderPercentage * spreadPercentage;\n return ranking;\n }\n const firstIndex = findMatchingCharacter(stringToRank[0], testString, 0);\n if (firstIndex < 0) {\n return rankings.NO_MATCH;\n }\n charNumber = firstIndex;\n for (let i = 1, I = stringToRank.length; i < I; i++) {\n const matchChar = stringToRank[i];\n charNumber = findMatchingCharacter(matchChar, testString, charNumber);\n const found = charNumber > -1;\n if (!found) {\n return rankings.NO_MATCH;\n }\n }\n const spread = charNumber - firstIndex;\n return getRanking(spread);\n}\n\n/**\n * Sorts items that have a rank, index, and accessorIndex\n * @param {Object} a - the first item to sort\n * @param {Object} b - the second item to sort\n * @return {Number} -1 if a should come first, 1 if b should come first, 0 if equal\n */\nfunction compareItems(a, b) {\n return a.rank === b.rank ? 0 : a.rank > b.rank ? -1 : 1;\n}\n\n/**\n * Prepares value for comparison by stringifying it, removing diacritics (if specified)\n * @param {String} value - the value to clean\n * @param {Object} options - {keepDiacritics: whether to remove diacritics}\n * @return {String} the prepared value\n */\nfunction prepareValueForComparison(value, _ref) {\n let {\n keepDiacritics\n } = _ref;\n // value might not actually be a string at this point (we don't get to choose)\n // so part of preparing the value for comparison is ensure that it is a string\n value = `${value}`; // toString\n if (!keepDiacritics) {\n value = removeAccents(value);\n }\n return value;\n}\n\n/**\n * Gets value for key in item at arbitrarily nested keypath\n * @param {Object} item - the item\n * @param {Object|Function} key - the potentially nested keypath or property callback\n * @return {Array} - an array containing the value(s) at the nested keypath\n */\nfunction getItemValues(item, accessor) {\n let accessorFn = accessor;\n if (typeof accessor === 'object') {\n accessorFn = accessor.accessor;\n }\n const value = accessorFn(item);\n\n // because `value` can also be undefined\n if (value == null) {\n return [];\n }\n if (Array.isArray(value)) {\n return value;\n }\n return [String(value)];\n}\n\n/**\n * Gets all the values for the given keys in the given item and returns an array of those values\n * @param item - the item from which the values will be retrieved\n * @param keys - the keys to use to retrieve the values\n * @return objects with {itemValue, attributes}\n */\nfunction getAllValuesToRank(item, accessors) {\n const allValues = [];\n for (let j = 0, J = accessors.length; j < J; j++) {\n const accessor = accessors[j];\n const attributes = getAccessorAttributes(accessor);\n const itemValues = getItemValues(item, accessor);\n for (let i = 0, I = itemValues.length; i < I; i++) {\n allValues.push({\n itemValue: itemValues[i],\n attributes\n });\n }\n }\n return allValues;\n}\nconst defaultKeyAttributes = {\n maxRanking: Infinity,\n minRanking: -Infinity\n};\n/**\n * Gets all the attributes for the given accessor\n * @param accessor - the accessor from which the attributes will be retrieved\n * @return object containing the accessor's attributes\n */\nfunction getAccessorAttributes(accessor) {\n if (typeof accessor === 'function') {\n return defaultKeyAttributes;\n }\n return {\n ...defaultKeyAttributes,\n ...accessor\n };\n}\n\nexport { compareItems, rankItem, rankings };\n//# sourceMappingURL=index.mjs.map\n","// src/devtools/utils.ts\nfunction getQueryState(query) {\n if (query.state.fetchStatus === \"fetching\") {\n return 0 /* Fetching */;\n }\n if (query.state.fetchStatus === \"paused\") {\n return 4 /* Paused */;\n }\n if (!query.getObserversCount()) {\n return 3 /* Inactive */;\n }\n if (query.isStale()) {\n return 2 /* Stale */;\n }\n return 1 /* Fresh */;\n}\nfunction getQueryStateLabel(query) {\n const queryState = getQueryState(query);\n if (queryState === 0 /* Fetching */) {\n return \"fetching\";\n }\n if (queryState === 4 /* Paused */) {\n return \"paused\";\n }\n if (queryState === 2 /* Stale */) {\n return \"stale\";\n }\n if (queryState === 3 /* Inactive */) {\n return \"inactive\";\n }\n return \"fresh\";\n}\nfunction getQueryStatusFg(query) {\n const queryState = getQueryState(query);\n if (queryState === 2 /* Stale */) {\n return 0;\n }\n return 16777215;\n}\nfunction getQueryStatusBg(query) {\n const queryState = getQueryState(query);\n if (queryState === 0 /* Fetching */) {\n return 27647;\n }\n if (queryState === 4 /* Paused */) {\n return 9193963;\n }\n if (queryState === 2 /* Stale */) {\n return 16757248;\n }\n if (queryState === 3 /* Inactive */) {\n return 4148832;\n }\n return 33575;\n}\nvar queryHashSort = (a, b) => a.queryHash.localeCompare(b.queryHash);\nvar dateSort = (a, b) => a.state.dataUpdatedAt < b.state.dataUpdatedAt ? 1 : -1;\nvar statusAndDateSort = (a, b) => {\n if (getQueryState(a) === getQueryState(b)) {\n return dateSort(a, b);\n }\n return getQueryState(a) > getQueryState(b) ? 1 : -1;\n};\nvar sortFns = {\n \"Status > Last Updated\": statusAndDateSort,\n \"Query Hash\": queryHashSort,\n \"Last Updated\": dateSort\n};\nexport {\n getQueryState,\n getQueryStateLabel,\n getQueryStatusBg,\n getQueryStatusFg,\n sortFns\n};\n//# sourceMappingURL=utils.js.map","// src/devtools/devtools.ts\nimport { setupDevtoolsPlugin } from \"@vue/devtools-api\";\nimport { rankItem } from \"@tanstack/match-sorter-utils\";\nimport { onlineManager } from \"@tanstack/query-core\";\nimport {\n getQueryStateLabel,\n getQueryStatusBg,\n getQueryStatusFg,\n sortFns\n} from \"./utils.js\";\nvar pluginId = \"vue-query\";\nvar pluginName = \"Vue Query\";\nfunction setupDevtools(app, queryClient) {\n setupDevtoolsPlugin(\n {\n id: pluginId,\n label: pluginName,\n packageName: \"vue-query\",\n homepage: \"https://tanstack.com/query/latest\",\n logo: \"https://raw.githubusercontent.com/TanStack/query/main/packages/vue-query/media/vue-query.svg\",\n app,\n settings: {\n baseSort: {\n type: \"choice\",\n component: \"button-group\",\n label: \"Sort Cache Entries\",\n options: [\n {\n label: \"ASC\",\n value: 1\n },\n {\n label: \"DESC\",\n value: -1\n }\n ],\n defaultValue: 1\n },\n sortFn: {\n type: \"choice\",\n label: \"Sort Function\",\n options: Object.keys(sortFns).map((key) => ({\n label: key,\n value: key\n })),\n defaultValue: Object.keys(sortFns)[0]\n },\n onlineMode: {\n type: \"choice\",\n component: \"button-group\",\n label: \"Online mode\",\n options: [\n {\n label: \"Online\",\n value: 1\n },\n {\n label: \"Offline\",\n value: 0\n }\n ],\n defaultValue: 1\n }\n }\n },\n (api) => {\n const initialSettings = api.getSettings();\n onlineManager.setOnline(Boolean(initialSettings.onlineMode.valueOf()));\n const queryCache = queryClient.getQueryCache();\n api.addInspector({\n id: pluginId,\n label: pluginName,\n icon: \"api\",\n nodeActions: [\n {\n icon: \"file_download\",\n tooltip: \"Refetch\",\n action: (queryHash) => {\n queryCache.get(queryHash)?.fetch();\n }\n },\n {\n icon: \"alarm\",\n tooltip: \"Invalidate\",\n action: (queryHash) => {\n const query = queryCache.get(queryHash);\n queryClient.invalidateQueries({\n queryKey: query.queryKey,\n exact: true\n });\n }\n },\n {\n icon: \"settings_backup_restore\",\n tooltip: \"Reset\",\n action: (queryHash) => {\n queryCache.get(queryHash)?.reset();\n }\n },\n {\n icon: \"delete\",\n tooltip: \"Remove\",\n action: (queryHash) => {\n const query = queryCache.get(queryHash);\n queryCache.remove(query);\n }\n },\n {\n icon: \"hourglass_empty\",\n tooltip: \"Force loading\",\n action: (queryHash) => {\n const query = queryCache.get(queryHash);\n query.setState({\n data: void 0,\n status: \"pending\"\n });\n }\n },\n {\n icon: \"error_outline\",\n tooltip: \"Force error\",\n action: (queryHash) => {\n const query = queryCache.get(queryHash);\n query.setState({\n data: void 0,\n status: \"error\",\n error: new Error(\"Unknown error from devtools\")\n });\n }\n }\n ]\n });\n api.addTimelineLayer({\n id: pluginId,\n label: pluginName,\n color: 16767308\n });\n queryCache.subscribe((event) => {\n api.sendInspectorTree(pluginId);\n api.sendInspectorState(pluginId);\n const queryEvents = [\n \"added\",\n \"removed\",\n \"updated\"\n ];\n if (queryEvents.includes(event.type)) {\n api.addTimelineEvent({\n layerId: pluginId,\n event: {\n title: event.type,\n subtitle: event.query.queryHash,\n time: api.now(),\n data: {\n queryHash: event.query.queryHash,\n ...event\n }\n }\n });\n }\n });\n api.on.setPluginSettings((payload) => {\n if (payload.key === \"onlineMode\") {\n onlineManager.setOnline(Boolean(payload.newValue));\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.inspectorId === pluginId) {\n const queries = queryCache.getAll();\n const settings = api.getSettings();\n const filtered = payload.filter ? queries.filter(\n (item) => rankItem(item.queryHash, payload.filter).passed\n ) : [...queries];\n const sorted = filtered.sort(\n (a, b) => sortFns[settings.sortFn](a, b) * settings.baseSort\n );\n const nodes = sorted.map((query) => {\n const stateLabel = getQueryStateLabel(query);\n return {\n id: query.queryHash,\n label: query.queryHash,\n tags: [\n {\n label: `${stateLabel} [${query.getObserversCount()}]`,\n textColor: getQueryStatusFg(query),\n backgroundColor: getQueryStatusBg(query)\n }\n ]\n };\n });\n payload.rootNodes = nodes;\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.inspectorId === pluginId) {\n const query = queryCache.get(payload.nodeId);\n if (!query) {\n return;\n }\n payload.state = {\n \" Query Details\": [\n {\n key: \"Query key\",\n value: query.queryHash\n },\n {\n key: \"Query status\",\n value: getQueryStateLabel(query)\n },\n {\n key: \"Observers\",\n value: query.getObserversCount()\n },\n {\n key: \"Last Updated\",\n value: new Date(query.state.dataUpdatedAt).toLocaleTimeString()\n }\n ],\n \"Data Explorer\": [\n {\n key: \"Data\",\n value: query.state.data\n }\n ],\n \"Query Explorer\": [\n {\n key: \"Query\",\n value: query\n }\n ]\n };\n }\n });\n }\n );\n}\nexport {\n setupDevtools\n};\n//# sourceMappingURL=devtools.js.map","// src/vueQueryPlugin.ts\nimport { isVue2 } from \"vue-demi\";\nimport { isServer } from \"@tanstack/query-core\";\nimport { QueryClient } from \"./queryClient.js\";\nimport { getClientKey } from \"./utils.js\";\nimport { setupDevtools } from \"./devtools/devtools.js\";\nvar VueQueryPlugin = {\n install: (app, options = {}) => {\n const clientKey = getClientKey(options.queryClientKey);\n let client;\n if (\"queryClient\" in options && options.queryClient) {\n client = options.queryClient;\n } else {\n const clientConfig = \"queryClientConfig\" in options ? options.queryClientConfig : void 0;\n client = new QueryClient(clientConfig);\n }\n if (!isServer) {\n client.mount();\n }\n let persisterUnmount = () => {\n };\n if (options.clientPersister) {\n if (client.isRestoring) {\n client.isRestoring.value = true;\n }\n const [unmount, promise] = options.clientPersister(client);\n persisterUnmount = unmount;\n promise.then(() => {\n if (client.isRestoring) {\n client.isRestoring.value = false;\n }\n options.clientPersisterOnSuccess?.(client);\n });\n }\n const cleanup = () => {\n client.unmount();\n persisterUnmount();\n };\n if (app.onUnmount) {\n app.onUnmount(cleanup);\n } else {\n const originalUnmount = app.unmount;\n app.unmount = function vueQueryUnmount() {\n cleanup();\n originalUnmount();\n };\n }\n if (isVue2) {\n app.mixin({\n beforeCreate() {\n if (!this._provided) {\n const provideCache = {};\n Object.defineProperty(this, \"_provided\", {\n get: () => provideCache,\n set: (v) => Object.assign(provideCache, v)\n });\n }\n this._provided[clientKey] = client;\n if (process.env.NODE_ENV === \"development\") {\n if (this === this.$root && options.enableDevtoolsV6Plugin) {\n setupDevtools(this, client);\n }\n }\n }\n });\n } else {\n app.provide(clientKey, client);\n if (process.env.NODE_ENV === \"development\") {\n if (options.enableDevtoolsV6Plugin) {\n setupDevtools(app, client);\n }\n }\n }\n }\n};\nexport {\n VueQueryPlugin\n};\n//# sourceMappingURL=vueQueryPlugin.js.map","// src/queryOptions.ts\nfunction queryOptions(options) {\n return options;\n}\nexport {\n queryOptions\n};\n//# sourceMappingURL=queryOptions.js.map","// src/infiniteQueryOptions.ts\nfunction infiniteQueryOptions(options) {\n return options;\n}\nexport {\n infiniteQueryOptions\n};\n//# sourceMappingURL=infiniteQueryOptions.js.map","// src/mutationOptions.ts\nfunction mutationOptions(options) {\n return options;\n}\nexport {\n mutationOptions\n};\n//# sourceMappingURL=mutationOptions.js.map","// src/useBaseQuery.ts\nimport {\n computed,\n getCurrentScope,\n onScopeDispose,\n reactive,\n readonly,\n shallowReactive,\n shallowReadonly,\n toRefs,\n watch\n} from \"vue-demi\";\nimport { shouldThrowError } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./useQueryClient.js\";\nimport { cloneDeepUnref, updateState } from \"./utils.js\";\nfunction useBaseQuery(Observer, options, queryClient) {\n if (process.env.NODE_ENV === \"development\") {\n if (!getCurrentScope()) {\n console.warn(\n 'vue-query composable like \"useQuery()\" should only be used inside a \"setup()\" function or a running effect scope. They might otherwise lead to memory leaks.'\n );\n }\n }\n const client = queryClient || useQueryClient();\n const defaultedOptions = computed(() => {\n let resolvedOptions = options;\n if (typeof resolvedOptions === \"function\") {\n resolvedOptions = resolvedOptions();\n }\n const clonedOptions = cloneDeepUnref(resolvedOptions);\n if (typeof clonedOptions.enabled === \"function\") {\n clonedOptions.enabled = clonedOptions.enabled();\n }\n const defaulted = client.defaultQueryOptions(clonedOptions);\n defaulted._optimisticResults = client.isRestoring?.value ? \"isRestoring\" : \"optimistic\";\n return defaulted;\n });\n const observer = new Observer(client, defaultedOptions.value);\n const state = defaultedOptions.value.shallow ? shallowReactive(observer.getCurrentResult()) : reactive(observer.getCurrentResult());\n let unsubscribe = () => {\n };\n if (client.isRestoring) {\n watch(\n client.isRestoring,\n (isRestoring) => {\n if (!isRestoring) {\n unsubscribe();\n unsubscribe = observer.subscribe((result) => {\n updateState(state, result);\n });\n }\n },\n { immediate: true }\n );\n }\n const updater = () => {\n observer.setOptions(defaultedOptions.value);\n updateState(state, observer.getCurrentResult());\n };\n watch(defaultedOptions, updater);\n onScopeDispose(() => {\n unsubscribe();\n });\n const refetch = (...args) => {\n updater();\n return state.refetch(...args);\n };\n const suspense = () => {\n return new Promise(\n (resolve, reject) => {\n let stopWatch = () => {\n };\n const run = () => {\n if (defaultedOptions.value.enabled !== false) {\n observer.setOptions(defaultedOptions.value);\n const optimisticResult = observer.getOptimisticResult(\n defaultedOptions.value\n );\n if (optimisticResult.isStale) {\n stopWatch();\n observer.fetchOptimistic(defaultedOptions.value).then(resolve, (error) => {\n if (shouldThrowError(defaultedOptions.value.throwOnError, [\n error,\n observer.getCurrentQuery()\n ])) {\n reject(error);\n } else {\n resolve(observer.getCurrentResult());\n }\n });\n } else {\n stopWatch();\n resolve(optimisticResult);\n }\n }\n };\n run();\n stopWatch = watch(defaultedOptions, run);\n }\n );\n };\n watch(\n () => state.error,\n (error) => {\n if (state.isError && !state.isFetching && shouldThrowError(defaultedOptions.value.throwOnError, [\n error,\n observer.getCurrentQuery()\n ])) {\n throw error;\n }\n }\n );\n const readonlyState = defaultedOptions.value.shallow ? shallowReadonly(state) : readonly(state);\n const object = toRefs(readonlyState);\n for (const key in state) {\n if (typeof state[key] === \"function\") {\n object[key] = state[key];\n }\n }\n object.suspense = suspense;\n object.refetch = refetch;\n return object;\n}\nexport {\n useBaseQuery\n};\n//# sourceMappingURL=useBaseQuery.js.map","// src/useQuery.ts\nimport { QueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nfunction useQuery(options, queryClient) {\n return useBaseQuery(QueryObserver, options, queryClient);\n}\nexport {\n useQuery\n};\n//# sourceMappingURL=useQuery.js.map","// src/useQueries.ts\nimport { QueriesObserver } from \"@tanstack/query-core\";\nimport {\n computed,\n getCurrentScope,\n onScopeDispose,\n readonly,\n shallowReadonly,\n shallowRef,\n unref,\n watch\n} from \"vue-demi\";\nimport { useQueryClient } from \"./useQueryClient.js\";\nimport { cloneDeepUnref } from \"./utils.js\";\nfunction useQueries({\n queries,\n ...options\n}, queryClient) {\n if (process.env.NODE_ENV === \"development\") {\n if (!getCurrentScope()) {\n console.warn(\n 'vue-query composable like \"useQuery()\" should only be used inside a \"setup()\" function or a running effect scope. They might otherwise lead to memory leaks.'\n );\n }\n }\n const client = queryClient || useQueryClient();\n const defaultedQueries = computed(() => {\n const resolvedQueries = typeof queries === \"function\" ? queries() : queries;\n const queriesRaw = unref(resolvedQueries);\n return queriesRaw.map((queryOptions) => {\n const clonedOptions = cloneDeepUnref(queryOptions);\n if (typeof clonedOptions.enabled === \"function\") {\n clonedOptions.enabled = queryOptions.enabled();\n }\n const defaulted = client.defaultQueryOptions(clonedOptions);\n defaulted._optimisticResults = client.isRestoring?.value ? \"isRestoring\" : \"optimistic\";\n return defaulted;\n });\n });\n const observer = new QueriesObserver(\n client,\n defaultedQueries.value,\n options\n );\n const getOptimisticResult = () => {\n const [results, getCombinedResult] = observer.getOptimisticResult(\n defaultedQueries.value,\n options.combine\n );\n return getCombinedResult(\n results.map((result, index) => {\n return {\n ...result,\n refetch: async (...args) => {\n const [{ [index]: query }] = observer.getOptimisticResult(\n defaultedQueries.value,\n options.combine\n );\n return query.refetch(...args);\n }\n };\n })\n );\n };\n const state = shallowRef(getOptimisticResult());\n let unsubscribe = () => {\n };\n if (client.isRestoring) {\n watch(\n client.isRestoring,\n (isRestoring) => {\n if (!isRestoring) {\n unsubscribe();\n unsubscribe = observer.subscribe(() => {\n state.value = getOptimisticResult();\n });\n state.value = getOptimisticResult();\n }\n },\n { immediate: true }\n );\n }\n watch(defaultedQueries, (queriesValue) => {\n observer.setQueries(\n queriesValue,\n options\n );\n state.value = getOptimisticResult();\n });\n onScopeDispose(() => {\n unsubscribe();\n });\n return options.shallow ? shallowReadonly(state) : readonly(state);\n}\nexport {\n useQueries\n};\n//# sourceMappingURL=useQueries.js.map","// src/useInfiniteQuery.ts\nimport { InfiniteQueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nfunction useInfiniteQuery(options, queryClient) {\n return useBaseQuery(\n InfiniteQueryObserver,\n options,\n queryClient\n );\n}\nexport {\n useInfiniteQuery\n};\n//# sourceMappingURL=useInfiniteQuery.js.map","// src/usePrefetchQuery.ts\nimport { getCurrentScope, unref, watchEffect } from \"vue-demi\";\nimport { useQueryClient } from \"./useQueryClient.js\";\nimport { cloneDeepUnref } from \"./utils.js\";\nfunction isGetter(value) {\n return typeof value === \"function\";\n}\nfunction usePrefetchQuery(options, queryClient) {\n if (process.env.NODE_ENV === \"development\") {\n if (!getCurrentScope()) {\n console.warn(\n 'vue-query composable like \"useQuery()\" should only be used inside a \"setup()\" function or a running effect scope. They might otherwise lead to memory leaks.'\n );\n }\n }\n const client = queryClient || useQueryClient();\n watchEffect(() => {\n const resolvedOptions = isGetter(options) ? options() : unref(options);\n const clonedOptions = cloneDeepUnref(resolvedOptions);\n if (!client.getQueryState(clonedOptions.queryKey)) {\n void client.prefetchQuery(clonedOptions);\n }\n });\n}\nexport {\n usePrefetchQuery\n};\n//# sourceMappingURL=usePrefetchQuery.js.map","// src/usePrefetchInfiniteQuery.ts\nimport { getCurrentScope, unref, watchEffect } from \"vue-demi\";\nimport { useQueryClient } from \"./useQueryClient.js\";\nimport { cloneDeepUnref } from \"./utils.js\";\nfunction isGetter(value) {\n return typeof value === \"function\";\n}\nfunction usePrefetchInfiniteQuery(options, queryClient) {\n if (process.env.NODE_ENV === \"development\") {\n if (!getCurrentScope()) {\n console.warn(\n 'vue-query composable like \"useQuery()\" should only be used inside a \"setup()\" function or a running effect scope. They might otherwise lead to memory leaks.'\n );\n }\n }\n const client = queryClient || useQueryClient();\n watchEffect(() => {\n const resolvedOptions = isGetter(options) ? options() : unref(options);\n const clonedOptions = cloneDeepUnref(resolvedOptions);\n if (!client.getQueryState(clonedOptions.queryKey)) {\n void client.prefetchInfiniteQuery(\n clonedOptions\n );\n }\n });\n}\nexport {\n usePrefetchInfiniteQuery\n};\n//# sourceMappingURL=usePrefetchInfiniteQuery.js.map","// src/useMutation.ts\nimport {\n computed,\n getCurrentScope,\n onScopeDispose,\n reactive,\n readonly,\n shallowReactive,\n shallowReadonly,\n toRefs,\n watch\n} from \"vue-demi\";\nimport { MutationObserver, shouldThrowError } from \"@tanstack/query-core\";\nimport { cloneDeepUnref, updateState } from \"./utils.js\";\nimport { useQueryClient } from \"./useQueryClient.js\";\nfunction useMutation(mutationOptions, queryClient) {\n if (process.env.NODE_ENV === \"development\") {\n if (!getCurrentScope()) {\n console.warn(\n 'vue-query composable like \"useQuery()\" should only be used inside a \"setup()\" function or a running effect scope. They might otherwise lead to memory leaks.'\n );\n }\n }\n const client = queryClient || useQueryClient();\n const options = computed(() => {\n const resolvedOptions = typeof mutationOptions === \"function\" ? mutationOptions() : mutationOptions;\n return client.defaultMutationOptions(cloneDeepUnref(resolvedOptions));\n });\n const observer = new MutationObserver(client, options.value);\n const state = options.value.shallow ? shallowReactive(observer.getCurrentResult()) : reactive(observer.getCurrentResult());\n const unsubscribe = observer.subscribe((result) => {\n updateState(state, result);\n });\n const mutate = (variables, mutateOptions) => {\n observer.mutate(variables, mutateOptions).catch(() => {\n });\n };\n watch(options, () => {\n observer.setOptions(options.value);\n });\n onScopeDispose(() => {\n unsubscribe();\n });\n const readonlyState = options.value.shallow ? shallowReadonly(state) : readonly(state);\n const resultRefs = toRefs(readonlyState);\n watch(\n () => state.error,\n (error) => {\n if (error && shouldThrowError(options.value.throwOnError, [error])) {\n throw error;\n }\n }\n );\n return {\n ...resultRefs,\n mutate,\n mutateAsync: state.mutate,\n reset: state.reset\n };\n}\nexport {\n useMutation\n};\n//# sourceMappingURL=useMutation.js.map","// src/useIsFetching.ts\nimport { getCurrentScope, onScopeDispose, ref, watchEffect } from \"vue-demi\";\nimport { useQueryClient } from \"./useQueryClient.js\";\nimport { cloneDeepUnref } from \"./utils.js\";\nfunction useIsFetching(fetchingFilters = {}, queryClient) {\n if (process.env.NODE_ENV === \"development\") {\n if (!getCurrentScope()) {\n console.warn(\n 'vue-query composable like \"useQuery()\" should only be used inside a \"setup()\" function or a running effect scope. They might otherwise lead to memory leaks.'\n );\n }\n }\n const client = queryClient || useQueryClient();\n const isFetching = ref();\n const listener = () => {\n const resolvedFilters = typeof fetchingFilters === \"function\" ? fetchingFilters() : fetchingFilters;\n isFetching.value = client.isFetching(cloneDeepUnref(resolvedFilters));\n };\n const unsubscribe = client.getQueryCache().subscribe(listener);\n watchEffect(listener);\n onScopeDispose(() => {\n unsubscribe();\n });\n return isFetching;\n}\nexport {\n useIsFetching\n};\n//# sourceMappingURL=useIsFetching.js.map","// src/useMutationState.ts\nimport {\n computed,\n getCurrentScope,\n onScopeDispose,\n shallowReadonly,\n shallowRef,\n watch\n} from \"vue-demi\";\nimport { useQueryClient } from \"./useQueryClient.js\";\nimport { cloneDeepUnref } from \"./utils.js\";\nfunction useIsMutating(filters = {}, queryClient) {\n if (process.env.NODE_ENV === \"development\") {\n if (!getCurrentScope()) {\n console.warn(\n 'vue-query composable like \"useQuery()\" should only be used inside a \"setup()\" function or a running effect scope. They might otherwise lead to memory leaks.'\n );\n }\n }\n const client = queryClient || useQueryClient();\n const mutationState = useMutationState(\n {\n filters: computed(() => ({\n ...cloneDeepUnref(typeof filters === \"function\" ? filters() : filters),\n status: \"pending\"\n }))\n },\n client\n );\n const length = computed(() => mutationState.value.length);\n return length;\n}\nfunction getResult(mutationCache, options) {\n return mutationCache.findAll(options.filters).map(\n (mutation) => options.select ? options.select(mutation) : mutation.state\n );\n}\nfunction useMutationState(options = {}, queryClient) {\n const resolvedOptions = computed(() => {\n const newOptions = typeof options === \"function\" ? options() : options;\n return {\n filters: cloneDeepUnref(newOptions.filters),\n select: newOptions.select\n };\n });\n const mutationCache = (queryClient || useQueryClient()).getMutationCache();\n const state = shallowRef(getResult(mutationCache, resolvedOptions.value));\n const unsubscribe = mutationCache.subscribe(() => {\n state.value = getResult(mutationCache, resolvedOptions.value);\n });\n watch(resolvedOptions, () => {\n state.value = getResult(mutationCache, resolvedOptions.value);\n });\n onScopeDispose(() => {\n unsubscribe();\n });\n return shallowReadonly(state);\n}\nexport {\n useIsMutating,\n useMutationState\n};\n//# sourceMappingURL=useMutationState.js.map"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"mappings":";;AACA,IAAI,eAAe,MAAM;CACvB,cAAc;EACZ,KAAK,4BAA4B,IAAI,IAAI;EACzC,KAAK,YAAY,KAAK,UAAU,KAAK,IAAI;CAC3C;CACA,UAAU,UAAU;EAClB,KAAK,UAAU,IAAI,QAAQ;EAC3B,KAAK,YAAY;EACjB,aAAa;GACX,KAAK,UAAU,OAAO,QAAQ;GAC9B,KAAK,cAAc;EACrB;CACF;CACA,eAAe;EACb,OAAO,KAAK,UAAU,OAAO;CAC/B;CACA,cAAc,CACd;CACA,gBAAgB,CAChB;AACF;;;ACnBA,IAAI,eAAe,cAAc,aAAa;CAC5C;CACA;CACA;CACA,cAAc;EACZ,MAAM;EACN,KAAKA,UAAU,YAAY;GACzB,IAAI,OAAO,WAAW,eAAe,OAAO,kBAAkB;IAC5D,MAAM,iBAAiB,QAAQ;IAC/B,OAAO,iBAAiB,oBAAoB,UAAU,KAAK;IAC3D,aAAa;KACX,OAAO,oBAAoB,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G;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,IAAI;CACJ,IAAI;CACJ,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,IAAI;CACJ,IAAI;CACJ,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,IAAI;CACJ,IAAI;CACJ,GAAG;CACH,GAAG;CACH,GAAG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