1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="cafd5f41-9176-f59a-9592-01c1256156c2")}catch(e){}}(); 2(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, 3229032, 42187, 4945933, 5((__turbopack_context__) => { 6"use strict"; 7 8// MERGED MODULE: [project]/node_modules/next/node_modules/@swc/helpers/esm/_class_private_field_get.js [app-client] (ecmascript) 9; 10// MERGED MODULE: [project]/node_modules/next/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js [app-client] (ecmascript) 11; 12function _class_apply_descriptor_get(receiver, descriptor) { 13 if (descriptor.get) return descriptor.get.call(receiver); 14 return descriptor.value; 15} 16; 17__turbopack_context__.s([ 18 "_", 19 0, 20 _class_apply_descriptor_get 21], 42187); 22// MERGED MODULE: [project]/node_modules/next/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js [app-client] (ecmascript) 23; 24function _class_extract_field_descriptor(receiver, privateMap, action) { 25 if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance"); 26 return privateMap.get(receiver); 27} 28; 29__turbopack_context__.s([ 30 "_", 31 0, 32 _class_extract_field_descriptor 33], 945933); 34; 35; 36function _class_private_field_get(receiver, privateMap) { 37 var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get"); 38 return _class_apply_descriptor_get(receiver, descriptor); 39} 40; 41__turbopack_context__.s([ 42 "_", 43 0, 44 _class_private_field_get 45], 229032); 46}), 47567928, 32041, 48((__turbopack_context__) => { 49"use strict"; 50 51// MERGED MODULE: [project]/node_modules/next/node_modules/@swc/helpers/esm/_class_private_field_init.js [a
51pp-client] (ecmascript) 52; 53// MERGED MODULE: [project]/node_modules/next/node_modules/@swc/helpers/esm/_check_private_redeclaration.js [app-client] (ecmascript) 54; 55function _check_private_redeclaration(obj, privateCollection) { 56 if (privateCollection.has(obj)) { 57 throw new TypeError("Cannot initialize the same private elements twice on an object"); 58 } 59} 60; 61__turbopack_context__.s([ 62 "_", 63 0, 64 _check_private_redeclaration 65], 32041); 66; 67function _class_private_field_init(obj, privateMap, value) { 68 _check_private_redeclaration(obj, privateMap); 69 privateMap.set(obj, value); 70} 71; 72__turbopack_context__.s([ 73 "_", 74 0, 75 _class_private_field_init 76], 567928); 77}), 78523474, 564927, 79((__turbopack_context__) => { 80"use strict"; 81 82// MERGED MODULE: [project]/node_modules/next/node_modules/@swc/helpers/esm/_class_private_field_set.js [app-client] (ecmascript) 83; 84// MERGED MODULE: [project]/node_modules/next/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js [app-client] (ecmascript) 85; 86function _class_apply_descriptor_set(receiver, descriptor, value) { 87 if (descriptor.set) descriptor.set.call(receiver, value); 88 else { 89 if (!descriptor.writable) { 90 // This should only throw in strict mode, but class bodies are 91 // always strict and private fields can only be used inside 92 // class bodies. 93 throw new TypeError("attempted to set read only private field"); 94 } 95 descriptor.value = value; 96 } 97} 98; 99__turbopack_context__.s([ 100 "_", 101 0, 102 _class_apply_descriptor_set 103], 564927); 104var __TURBOPACK__imported__module__945933__ = __turbopack_context__.i(945933); 105; 106; 107function _class_private_field_set(receiver, privateMap, value) { 108 var descriptor = (0, __TURBOPACK__imported__module__945933__["_"])(receiver, privateMap, "set"); 109 _class_apply_descriptor_set(receiver, descriptor, value); 110 return value; 111} 112; 113__turbopack_context__.s([ 114 "_", 115 0, 116 _class_private_field_set 117], 523474); 118}), 119203023, 903150, 120((__turbopack_context__) => { 121"use strict"; 122 123// MERGED MODULE: [project]/node_modules/next/node_modules/@swc/helpers/esm/_class_private_method_get.js [app-client] (ecmascript) 124; 125function _class_private_method_get(receiver, privateSet, fn) { 126 if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance"); 127 return fn; 128} 129; 130__turbopack_context__.s([ 131 "_", 132 0, 133 _class_private_method_get 134], 203023); 135// MERGED MODULE: [project]/node_modules/next/node_modules/@swc/helpers/esm/_class_private_method_init.js [app-client] (ecmascript) 136; 137var __TURBOPACK__imported__module__32041__ = __turbopack_context__.i(32041); 138; 139function _class_private_method_init(obj, privateSet) { 140 (0, __TURBOPACK__imported__module__32041__["_"])(obj, privateSet); 141 privateSet.add(obj); 142} 143; 144__turbopack_context__.s([ 145 "_", 146 0, 147 _class_private_method_init 148], 903150); 149}), 150912598, ((__turbopack_context__) => { 151"use strict"; 152 153var __TURBOPACK__imported__module__271645__ = __turbopack_context__.i(271645); 154var __TURBOPACK__imported__module__843476__ = __turbopack_context__.i(843476); 155"use client"; 156; 157; 158//#region src/QueryClientProvider.tsx 159const QueryClientContext = __TURBOPACK__imported__module__271645__["createContext"](void 0); 160const useQueryClient = (queryClient)=>{ 161 const client = __TURBOPACK__imported__module__271645__["useContext"](QueryClientContext); 162 if (queryClient) return queryClient; 163 if (!client) throw new Error("No QueryClient set, use QueryClientProvider to set one"); 164 return client; 165}; 166const QueryClientProvider = (param)=>{ 167 let { client, children } = param; 168 __TURBOPACK__imported__module__271645__["useEffect"](()=>{ 169 client.mount(); 170 return ()=>{ 171 client.unmount(); 172 }; 173 }, [ 174 client 175 ]); 176 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(QueryClientContext.Provider, { 177 value: client, 178 children 179 }); 180}; 181; 182__turbopack_context__.s([ 183 "QueryClientProvider", 184 0, 185 QueryClientProvider, 186 "useQueryClient", 187 0, 188 useQueryClient 189]); 190}), 191619273, 180166, 192((__turbopack_context__) => { 193"use strict"; 194 195// MERGED MODULE: [project]/node_modules/@tanstack/query-core/build/modern/utils.js [app-client] (ecmascript) 196; 197var __TURBOPACK__imported__module__247167__ = __turbopack_context__.i(247167); 198// MERGED MODULE: [project]/node_modules/@tanstack/query-core/build/modern/timeoutManager.js [app-client] (ecmascript) 199; 200var __TURBOPACK__imported__module__247167__1 = __TURBOPACK__imported__module__247167__; 201var __TURBOPACK__imported__module__229032__ = __turbopack_context__.i(229032); 202var __TURBOPACK__imported__module__567928__ = __turbopack_context__.i(567928); 203var __TURBOPACK__imported__module__523474__ = __turbopack_context__.i(523474); 204; 205; 206; 207var _provider, _providerCalled; 208//#region src/timeoutManager.ts 209const defaultTimeoutProvider = { 210 setTimeout: (callback, delay)=>setTimeout(callback, delay), 211 clearTimeout: (timeoutId)=>clearTimeout(timeoutId), 212 setInterval: (callback, delay)=>setInterval(callback, delay), 213 clearInterval: (intervalId)=>clearInterval(intervalId) 214}; 215/** 216* Allows customization of how timeouts are created. 217* 218* @tanstack/query-core makes liberal use of timeouts to implement `staleTime` 219* and `gcTime`. The default TimeoutManager provider uses the platform's global 220* `setTimeout` implementation, which is known to have scalability issues with 221* thousands of timeouts on the event loop. 222* 223* If you hit this limitation, consider providing a custom TimeoutProvider that 224* coalesces timeouts. 225*/ var TimeoutManager = (_provider = new WeakMap(), _providerCalled = new WeakMap(), class { 226 setTimeoutProvider(provider) { 227 if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable 228 ; 229 (0, __TURBOPACK__imported__module__523474__["_"])(this, _provider, provider); 230 if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable 231 ; 232 } 233 setTimeout(callback, delay) { 234 if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable 235 ; 236 return (0, __TURBOPACK__imported__module__229032__["_"])(this, _provider).setTimeout(callback, delay); 237 } 238 clearTimeout(timeoutId) { 239 (0, __TURBOPACK__imported__module__229032__["_"])(this, _provider).clearTimeout(timeoutId); 240 } 241 setInterval(callback, delay) { 242 if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable 243 ; 244 return (0, __TURBOPACK__imported__module__229032__["_"])(this, _provider).setInterval(callback, delay); 245 } 246 clearInterval(intervalId) { 247 (0, __TURBOPACK__imported__module__229032__["_"])(this, _provider).clearInterval(intervalId); 248 } 249 constructor(){ 250 (0, __TURBOPACK__imported__module__567928__["_"])(this, _provider, { 251 writable: true, 252 value: defaultTimeoutProvider 253 }); 254 (0, __TURBOPACK__imported__module__567928__["_"])(this, _providerCalled, { 255 writable: true, 256 value: false 257 }); 258 } 259}); 260const timeoutManager = new TimeoutManager(); 261/** 262* In many cases code wants to delay to the next event loop tick; this is not 263* mediated by {@link timeoutManager}. 264* 265* This function is provided to make auditing the `tanstack/query-core` for 266* incorrect use of system `setTimeout` easier. 267*/ function systemSetTimeoutZero(callback) { 268 setTimeout(callback, 0); 269} 270; 271__turbopack_context__.s([ 272 "systemSetTimeoutZero", 273 0, 274 systemSetTimeoutZero, 275 "timeoutManager", 276 0, 277 timeoutManager 278], 180166); 279; 280//#region src/utils.ts 281/** @deprecated 282* use `environmentManager.isServer()` instead. 283*/ const isServer = typeof window === "undefined" || "Deno" in globalThis; 284function noop() {} 285function functionalUpdate(updater, input) { 286 return typeof updater === "function" ? updater(input) : updater; 287} 288function isValidTimeout(value) { 289 return typeof value === "number" && value >= 0 && value !== Infinity; 290} 291function timeUntilStale(updatedAt, staleTime) { 292 return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0); 293} 294function resolveQueryValue(value, query) { 295 return typeof value === "function" ? value(query) : value; 296}
vendor: 4,112 bytes, lines 297-398
297function matchQuery(filters, query) { 298 const { type = "all", exact, fetchStatus, predicate, queryKey, stale } = filters; 299 if (queryKey) { 300 if (exact) { 301 if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) return false; 302 } else if (!partialMatchKey(query.queryKey, queryKey)) return false; 303 } 304 if (type !== "all") { 305 const isActive = query.isActive(); 306 if (type === "active" && !isActive) return false; 307 if (type === "inactive" && isActive) return false; 308 } 309 if (typeof stale === "boolean" && query.isStale() !== stale) return false; 310 if (fetchStatus && fetchStatus !== query.state.fetchStatus) return false; 311 if (predicate && !predicate(query)) return false; 312 return true; 313} 314function matchMutation(filters, mutation) { 315 const { exact, status, predicate, mutationKey } = filters; 316 if (mutationKey) { 317 if (!mutation.options.mutationKey) return false; 318 if (exact) { 319 if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) return false; 320 } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) return false; 321 } 322 if (status && mutation.state.status !== status) return false; 323 if (predicate && !predicate(mutation)) return false; 324 return true; 325} 326function hashQueryKeyByOptions(queryKey, options) { 327 return ((options === null || options === void 0 ? void 0 : options.queryKeyHashFn) || hashKey)(queryKey); 328} 329/** 330* Default query & mutation keys hash function. 331* Hashes the value into a stable hash. 332*/ function hashKey(queryKey) { 333 return JSON.stringify(queryKey, (_, val)=>isPlainObject(val) ? Object.keys(val).sort().reduce((result, key)=>{ 334 result[key] = val[key]; 335 return result; 336 }, {}) : val); 337} 338function partialMatchKey(a, b) { 339 if (a === b) return true; 340 if (typeof a !== typeof b) return false; 341 if (a && b && typeof a === "object" && typeof b === "object") { 342 if (Array.isArray(a) && Array.isArray(b)) { 343 for(let i = 0; i < b.length; i++)if (!partialMatchKey(a[i], b[i])) return false; 344 return true; 345 } 346 const bKeys = Object.keys(b); 347 for (const key of bKeys)if (!partialMatchKey(a[key], b[key])) return false; 348 return true; 349 } 350 return false; 351} 352const hasOwn = Object.prototype.hasOwnProperty; 353function replaceEqualDeep(a, b) { 354 let depth = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; 355 if (a === b) return a; 356 if (depth > 500) return b; 357 const array = isPlainArray(a) && isPlainArray(b); 358 if (!array && !(isPlainObject(a) && isPlainObject(b))) return b; 359 const aSize = (array ? a : Object.keys(a)).length; 360 const bItems = array ? b : Object.keys(b); 361 const bSize = bItems.length; 362 const copy = array ? new Array(bSize) : {}; 363 let equalItems = 0; 364 for(let i = 0; i < bSize; i++){ 365 const key = array ? i : bItems[i]; 366 const aItem = a[key]; 367 const bItem = b[key]; 368 if (aItem === bItem) { 369 copy[key] = aItem; 370 if (array ? i < aSize : hasOwn.call(a, key)) equalItems++; 371 continue; 372 } 373 if (aItem === null || bItem === null || typeof aItem !== "object" || typeof bItem !== "object") { 374 copy[key] = bItem; 375 continue; 376 } 377 const v = replaceEqualDeep(aItem, bItem, depth + 1); 378 copy[key] = v; 379 if (v === aItem) equalItems++; 380 } 381 return aSize === bSize && equalItems === aSize ? a : copy; 382} 383/** 384* Shallow compare objects. 385*/ function shallowEqualObjects(a, b) { 386 if (!b || Object.keys(a).length !== Object.keys(b).length) return false; 387 for(const key in a)if (a[key] !== b[key]) return false; 388 return true; 389} 390function isPlainArray(value) { 391 return Array.isArray(value) && value.length === Object.keys(value).length; 392} 393function isPlainObject(o) { 394 if (!hasObjectPrototype(o)) return false; 395 const ctor = o.constructor; 396 if (ctor === void 0) return true; 397 const prot = ctor.prototype; 398 if (!hasObjectPrototype(prot)) return false;
399 if (!prot.hasOwnProperty("isPrototypeOf")) return false; 400 if (Object.getPrototypeOf(o) !== Object.prototype) return false; 401 return true; 402} 403function hasObjectPrototype(o) { 404 return Object.prototype.toString.call(o) === "[object Object]"; 405} 406function sleep(timeout) { 407 return new Promise((resolve)=>{ 408 timeoutManager.setTimeout(resolve, timeout); 409 }); 410} 411function replaceData(prevData, data, options) { 412 if (typeof options.structuralSharing === "function") return options.structuralSharing(prevData, data); 413 else if (options.structuralSharing !== false) { 414 if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable 415 ; 416 return replaceEqualDeep(prevData, data); 417 } 418 return data; 419} 420function keepPreviousData(previousData) { 421 return previousData; 422} 423function addToEnd(items, item) { 424 let max = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; 425 const newItems = [ 426 ...items, 427 item 428 ]; 429 return max && newItems.length > max ? newItems.slice(1) : newItems; 430} 431function addToStart(items, item) { 432 let max = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; 433 const newItems = [ 434 item, 435 ...items 436 ]; 437 return max && newItems.length > max ? newItems.slice(0, -1) : newItems; 438} 439const skipToken = Symbol(); 440function ensureQueryFn(options, fetchOptions) { 441 if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable 442 ; 443 if (!options.queryFn && (fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.initialPromise)) return ()=>fetchOptions.initialPromise; 444 if (!options.queryFn || options.queryFn === skipToken) return ()=>Promise.reject(/* @__PURE__ */ new Error("Missing queryFn: '".concat(options.queryHash, "'"))); 445 return options.queryFn; 446} 447function shouldThrowError(throwOnError, params) { 448 if (typeof throwOnError === "function") return throwOnError(...params); 449 return !!throwOnError; 450} 451function addConsumeAwareSignal(object, getSignal, onCancelled) {
452 let consumed = false; 453 let signal; 454 Object.defineProperty(object, "signal", { 455 enumerable: true, 456 get: ()=>{ 457 signal !== null && signal !== void 0 ? signal : signal = getSignal(); 458 if (consumed) return signal; 459 consumed = true; 460 if (signal.aborted) onCancelled(); 461 else signal.addEventListener("abort", onCancelled, { 462 once: true 463 }); 464 return signal; 465 } 466 }); 467 return object; 468} 469; 470__turbopack_context__.s([ 471 "addConsumeAwareSignal", 472 0, 473 addConsumeAwareSignal, 474 "addToEnd", 475 0, 476 addToEnd, 477 "addToStart", 478 0, 479 addToStart, 480 "ensureQueryFn", 481 0, 482 ensureQueryFn, 483 "functionalUpdate", 484 0, 485 functionalUpdate, 486 "hashKey", 487 0, 488 hashKey, 489 "hashQueryKeyByOptions", 490 0, 491 hashQueryKeyByOptions, 492 "isServer", 493 0, 494 isServer, 495 "isValidTimeout", 496 0, 497 isValidTimeout, 498 "keepPreviousData", 499 0, 500 keepPreviousData, 501 "matchMutation", 502 0, 503 matchMutation, 504 "matchQuery", 505 0, 506 matchQuery, 507 "noop", 508 0, 509 noop, 510 "partialMatchKey", 511 0, 512 partialMatchKey, 513 "replaceData", 514 0, 515 replaceData, 516 "replaceEqualDeep", 517 0, 518 replaceEqualDeep, 519 "resolveQueryValue", 520 0, 521 resolveQueryValue, 522 "shallowEqualObjects", 523 0, 524 shallowEqualObjects, 525 "shouldThrowError", 526 0, 527 shouldThrowError, 528 "skipToken", 529 0, 530 skipToken, 531 "sleep", 532 0, 533 sleep, 534 "timeUntilStale", 535 0, 536 timeUntilStale 537], 619273); 538}), 539540143, ((__turbopack_context__) => { 540"use strict"; 541 542var __TURBOPACK__imported__module__180166__ = __turbopack_context__.i(180166); 543; 544//#region src/notifyManager.ts 545const defaultScheduler = __TURBOPACK__imported__module__180166__["systemSetTimeoutZero"]; 546function createNotifyManager() { 547 let queue = []; 548 let transactions = 0; 549 let notifyFn = (callback)=>{ 550 callback(); 551 }; 552 let batchNotifyFn = (callback)=>{ 553 callback(); 554 }; 555 let scheduleFn = defaultScheduler; 556 const schedule = (callback)=>{ 557 if (transactions) queue.push(callback); 558 else scheduleFn(()=>{ 559 notifyFn(callback); 560 }); 561 }; 562 const flush = ()=>{ 563 const originalQueue = queue; 564 queue = []; 565 if (originalQueue.length) scheduleFn(()=>{ 566 batchNotifyFn(()=>{ 567 originalQueue.forEach((callback)=>{ 568 notifyFn(callback); 569 }); 570 }); 571 }); 572 }; 573 return { 574 batch: (callback)=>{ 575 let result; 576 transactions++; 577 try { 578 result = callback(); 579 } finally{ 580 transactions--; 581 if (!transactions) flush(); 582 } 583 return result; 584 }, 585 /** 586 * All calls to the wrapped function will be batched. 587 */ batchCalls: (callback)=>{ 588 return function() { 589 for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ 590 args[_key] = arguments[_key]; 591 } 592 schedule(()=>{ 593 callback(...args); 594 }); 595 }; 596 }, 597 schedule, 598 /** 599 * Use this method to set a custom notify function. 600 * This can be used to for example wrap notifications with `React.act` while running tests. 601 */ setNotifyFunction: (fn)=>{ 602 notifyFn = fn; 603 }, 604 /** 605 * Use this method to set a custom function to batch notifications together into a single tick. 606 * By default React Query will use the batch function provided by ReactDOM or React Native. 607 */ setBatchNotifyFunction: (fn)=>{ 608 batchNotifyFn = fn; 609 }, 610 setScheduler: (fn)=>{ 611 scheduleFn = fn; 612 } 613 }; 614} 615const notifyManager = createNotifyManager(); 616; 617__turbopack_context__.s([ 618 "notifyManager", 619 0, 620 notifyManager 621]); 622}), 623273911, ((__turbopack_context__) => { 624"use strict"; 625 626var __TURBOPACK__imported__module__619273__ = __turbopack_context__.i(619273); 627; 628//#region src/environmentManager.ts 629let isServerFn = ()=>__TURBOPACK__imported__module__619273__["isServer"]; 630/** 631* Returns whether the current runtime should be treated as a server environment. 632*/ const isServer = ()=>isServerFn(); 633/** 634* Manages environment detection used by TanStack Query internals. 635*/ const environmentManager = { 636 isServer, 637 /** 638 * Overrides the server check globally. 639 */ setIsServer (isServerValue) { 640 isServerFn = isServerValue; 641 } 642}; 643; 644__turbopack_context__.s([ 645 "isServer", 646 0, 647 isServer 648]); 649}), 650915823, ((__turbopack_context__) => { 651"use strict"; 652
653//#region src/subscribable.ts 654var Subscribable = class { 655 subscribe(listener) { 656 this.listeners.add(listener); 657 this.onSubscribe(); 658 return ()=>{ 659 this.listeners.delete(listener); 660 this.onUnsubscribe(); 661 }; 662 } 663 hasListeners() { 664 return this.listeners.size > 0; 665 } 666 onSubscribe() {} 667 onUnsubscribe() {} 668 constructor(){ 669 this.listeners = /* @__PURE__ */ new Set(); 670 this.subscribe = this.subscribe.bind(this); 671 } 672}; 673; 674__turbopack_context__.s([ 675 "Subscribable", 676 0, 677 Subscribable 678]); 679}), 680175555, 814448, 681((__turbopack_context__) => { 682"use strict"; 683 684// MERGED MODULE: [project]/node_modules/@tanstack/query-core/build/modern/focusManager.js [app-client] (ecmascript) 685; 686var __TURBOPACK__imported__module__229032__ = __turbopack_context__.i(229032); 687var __TURBOPACK__imported__module__567928__ = __turbopack_context__.i(567928); 688var __TURBOPACK__imported__module__523474__ = __turbopack_context__.i(523474); 689var __TURBOPACK__imported__module__915823__ = __turbopack_context__.i(915823); 690; 691; 692; 693var _focused, _cleanup, _setup; 694; 695//#region src/focusManager.ts 696var FocusManager = (_focused = new WeakMap(), _cleanup = new WeakMap(), _setup = new WeakMap(), class extends __TURBOPACK__imported__module__915823__["Subscribable"] { 697 onSubscribe() { 698 if (!(0, __TURBOPACK__imported__module__229032__["_"])(this, _cleanup)) this.setEventListener((0, __TURBOPACK__imported__module__229032__["_"])(this, _setup)); 699 } 700 onUnsubscribe() { 701 var _this, _this1, _ref; 702 if (!this.hasListeners()) { 703 (_this = (0, __TURBOPACK__imported__module__229032__["_"])(_ref = _this1 = this, _cleanup)) === null || _this === void 0 ? void 0 : _this.call(_this1); 704 (0, __TURBOPACK__imported__module__523474__["_"])(this, _cleanup, void 0); 705 } 706 } 707 setEventListener(setup) { 708 var _this, _this1, _ref; 709 (0, __TURBOPACK__imported__module__523474__["_"])(this, _setup, setup); 710 (_this = (0, __TURBOPACK__imported__module__229032__["_"])(_ref = _this1 = this, _cleanup)) === null || _this === void 0 ? void 0 : _this.call(_this1); 711 (0, __TURBOPACK__imported__module__523474__["_"])(this, _cleanup, setup((focused)=>{ 712 if (typeof focused === "boolean") this.setFocused(focused); 713 else this.onFocus(); 714 })); 715 } 716 setFocused(focused) { 717 if ((0, __TURBOPACK__imported__module__229032__["_"])(this, _focused) !== focused) { 718 (0, __TURBOPACK__imported__module__523474__["_"])(this, _focused, focused); 719 this.onFocus(); 720 } 721 } 722 onFocus() { 723 const isFocused = this.isFocused(); 724 this.listeners.forEach((listener)=>{ 725 listener(isFocused); 726 }); 727 } 728 isFocused() { 729 var _globalThis_document; 730 if (typeof (0, __TURBOPACK__imported__module__229032__["_"])(this, _focused) === "boolean") return (0, __TURBOPACK__imported__module__229032__["_"])(this, _focused); 731 return ((_globalThis_document = globalThis.document) === null || _globalThis_document === void 0 ? void 0 : _globalThis_document.visibilityState) !== "hidden"; 732 } 733 constructor(){ 734 super(), (0, __TURBOPACK__imported__module__567928__["_"])(this, _focused, { 735 writable: true, 736 value: void 0 737 }), (0, __TURBOPACK__imported__module__567928__["_"])(this, _cleanup, { 738 writable: true, 739 value: void 0 740 }), (0, __TURBOPACK__imported__module__567928__["_"])(this, _setup, { 741 writable: true, 742 value: void 0 743 }); 744 (0, __TURBOPACK__imported__module__523474__["_"])(this, _setup, (onFocus)=>{ 745 if (typeof window !== "undefined" && window.addEventListener) { 746 const listener = ()=>onFocus(); 747 window.addEventListener("visibilitychange", listener, false); 748 return ()=>{ 749 window.removeEventListener("visibilitychange", listener); 750 }; 751 } 752 }); 753 } 754}); 755const focusManager = new FocusManager(); 756; 757__turbopack_context__.s([ 758 "focusManager", 759 0, 760 focusManager 761], 175555); 762// MERGED MODULE: [project]/node_modules/@tanstack/query-core/build/modern/onlineManager.js [app-client] (ecmascript) 763; 764var __TURBOPACK__imported__module__229032__1 = __TURBOPACK__imported__module__229032__; 765var __TURBOPACK__imported__module__567928__1 = __TURBOPACK__imported__module__567928__; 766var __TURBOPACK__imported__module__523474__1 = __TURBOPACK__imported__module__523474__; 767var __TURBOPACK__imported__module__915823__1 = __TURBOPACK__imported__module__915823__; 768; 769; 770; 771var _online, _cleanup1, _setup1; 772; 773//#region src/onlineManager.ts 774var OnlineManager = (_online = new WeakMap(), _cleanup1 = new WeakMap(), _setup1 = new WeakMap(), class extends __TURBOPACK__imported__module__915823__1["Subscribable"] { 775 onSubscribe() { 776 if (!(0, __TURBOPACK__imported__module__229032__1["_"])(this, _cleanup1)) this.setEventListener((0, __TURBOPACK__imported__module__229032__1["_"])(this, _setup1)); 777 } 778 onUnsubscribe() { 779 var _this, _this1, _ref; 780 if (!this.hasListeners()) { 781 (_this = (0, __TURBOPACK__imported__module__229032__1["_"])(_ref = _this1 = this, _cleanup1)) === null || _this === void 0 ? void 0 : _this.call(_this1); 782 (0, __TURBOPACK__imported__module__523474__1["_"])(this, _cleanup1, void 0); 783 } 784 } 785 setEventListener(setup) { 786 var _this, _this1, _ref; 787 (0, __TURBOPACK__imported__module__523474__1["_"])(this, _setup1, setup); 788 (_this = (0, __TURBOPACK__imported__module__229032__1["_"])(_ref = _this1 = this, _cleanup1)) === null || _this === void 0 ? void 0 : _this.call(_this1); 789 (0, __TURBOPACK__imported__module__523474__1["_"])(this, _cleanup1, setup(this.setOnline.bind(this))); 790 } 791 setOnline(online) { 792 if ((0, __TURBOPACK__imported__module__229032__1["_"])(this, _online) !== online) { 793 (0, __TURBOPACK__imported__module__523474__1["_"])(this, _online, online);
794 this.listeners.forEach((listener)=>{ 795 listener(online); 796 }); 797 } 798 } 799 isOnline() { 800 return (0, __TURBOPACK__imported__module__229032__1["_"])(this, _online); 801 } 802 constructor(){ 803 super(), (0, __TURBOPACK__imported__module__567928__1["_"])(this, _online, { 804 writable: true, 805 value: true 806 }), (0, __TURBOPACK__imported__module__567928__1["_"])(this, _cleanup1, { 807 writable: true, 808 value: void 0 809 }), (0, __TURBOPACK__imported__module__567928__1["_"])(this, _setup1, { 810 writable: true, 811 value: void 0 812 }); 813 (0, __TURBOPACK__imported__module__523474__1["_"])(this, _setup1, (onOnline)=>{ 814 if (typeof window !== "undefined" && window.addEventListener) { 815 const onlineListener = ()=>onOnline(true); 816 const offlineListener = ()=>onOnline(false); 817 window.addEventListener("online", onlineListener, false); 818 window.addEventListener("offline", offlineListener, false); 819 return ()=>{ 820 window.removeEventListener("online", onlineListener); 821 window.removeEventListener("offline", offlineListener); 822 }; 823 } 824 }); 825 } 826}); 827const onlineManager = new OnlineManager(); 828; 829__turbopack_context__.s([ 830 "onlineManager", 831 0, 832 onlineManager 833], 814448); 834}), 835936553, 88587, 836((__turbopack_context__) => { 837"use strict"; 838 839// MERGED MODULE: [project]/node_modules/@tanstack/query-core/build/modern/retryer.js [app-client] (ecmascript) 840; 841var __TURBOPACK__imported__module__619273__ = __turbopack_context__.i(619273); 842var __TURBOPACK__imported__module__273911__ = __turbopack_context__.i(273911); 843var __TURBOPACK__imported__module__175555__ = __turbopack_context__.i(175555); 844var __TURBOPACK__imported__module__814448__ = __turbopack_context__.i(814448); 845; 846; 847; 848; 849//#region src/retryer.ts 850function defaultRetryDelay(failureCount) { 851 return Math.min(1e3 * 2 ** failureCount, 3e4); 852} 853function canFetch(networkMode) { 854 return (networkMode !== null && networkMode !== void 0 ? networkMode : "online") === "online" ? __TURBOPACK__imported__module__814448__["onlineManager"].isOnline() : true; 855} 856var CancelledError = class extends Error { 857 constructor(options){ 858 super("CancelledError"); 859 this.revert = options === null || options === void 0 ? void 0 : options.revert; 860 this.silent = options === null || options === void 0 ? void 0 : options.silent; 861 } 862}; 863/** 864* @deprecated Use instanceof `CancelledError` instead. 865*/ function isCancelledError(value) { 866 return value instanceof CancelledError; 867} 868function createRetryer(config) { 869 let isRetryCancelled = false; 870 let failureCount = 0; 871 let continueFn; 872 let status = "pending"; 873 let promiseResolve;
874 let promiseReject; 875 const promise = new Promise((resolve, reject)=>{ 876 promiseResolve = resolve; 877 promiseReject = reject; 878 }); 879 promise.catch(__TURBOPACK__imported__module__619273__["noop"]); 880 const isResolved = ()=>status !== "pending"; 881 const cancel = (cancelOptions)=>{ 882 if (!isResolved()) { 883 var _config_onCancel; 884 const error = new CancelledError(cancelOptions); 885 reject(error); 886 (_config_onCancel = config.onCancel) === null || _config_onCancel === void 0 ? void 0 : _config_onCancel.call(config, error); 887 } 888 }; 889 const cancelRetry = ()=>{ 890 isRetryCancelled = true; 891 }; 892 const continueRetry = ()=>{ 893 isRetryCancelled = false; 894 }; 895 const canContinue = ()=>__TURBOPACK__imported__module__175555__["focusManager"].isFocused() && (config.networkMode === "always" || __TURBOPACK__imported__module__814448__["onlineManager"].isOnline()) && config.canRun(); 896 const canStart = ()=>canFetch(config.networkMode) && config.canRun(); 897 const resolve = (value)=>{ 898 if (!isResolved()) { 899 continueFn === null || continueFn === void 0 ? void 0 : continueFn(); 900 status = "resolved"; 901 promiseResolve(value); 902 } 903 }; 904 const reject = (value)=>{ 905 if (!isResolved()) { 906 continueFn === null || continueFn === void 0 ? void 0 : continueFn(); 907 status = "rejected"; 908 promiseReject(value); 909 } 910 }; 911 const pause = ()=>{ 912 return new Promise((continueResolve)=>{ 913 var _config_onPause; 914 continueFn = (value)=>{ 915 if (isResolved() || canContinue()) continueResolve(value); 916 }; 917 (_config_onPause = config.onPause) === null || _config_onPause === void 0 ? void 0 : _config_onPause.call(config); 918 }).then(()=>{ 919 var _config_onContinue; 920 continueFn = void 0; 921 if (!isResolved()) (_config_onContinue = config.onContinue) === null || _config_onContinue === void 0 ? void 0 : _config_onContinue.call(config); 922 }); 923 }; 924 const run = ()=>{ 925 if (isResolved()) return; 926 let promiseOrValue; 927 const initialPromise = failureCount === 0 ? config.initialPromise : void 0; 928 try { 929 promiseOrValue = initialPromise !== null && initialPromise !== void 0 ? initialPromise : config.fn(); 930 } catch (error) { 931 promiseOrValue = Promise.reject(error); 932 } 933 Promise.resolve(promiseOrValue).then(resolve).catch((error)=>{ 934 var _config_retry, _config_retryDelay; 935 var _config_onFail; 936 if (isResolved()) return; 937 const retry = (_config_retry = config.retry) !== null && _config_retry !== void 0 ? _config_retry : (0, __TURBOPACK__imported__module__273911__["isServer"])() ? 0 : 3; 938 const retryDelay = (_config_retryDelay = config.retryDelay) !== null && _config_retryDelay !== void 0 ? _config_retryDelay : defaultRetryDelay; 939 const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay; 940 const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error); 941 if (isRetryCancelled || !shouldRetry) { 942 reject(error); 943 return; 944 } 945 failureCount++; 946 (_config_onFail = config.onFail) === null || _config_onFail === void 0 ? void 0 : _config_onFail.call(config, failureCount, error); 947 (0, __TURBOPACK__imported__module__619273__["sleep"])(delay).then(()=>{ 948 return canContinue() ? void 0 : pause(); 949 }).then(()=>{ 950 if (isRetryCancelled) reject(error); 951 else run(); 952 }); 953 }); 954 }; 955 return { 956 promise, 957 status: ()=>status, 958 cancel, 959 continue: ()=>{ 960 continueFn === null || continueFn === void 0 ? void 0 : continueFn(); 961 return promise; 962 }, 963 cancelRetry, 964 continueRetry, 965 canStart, 966 start: ()=>{ 967 if (canStart()) run(); 968 else pause().then(run); 969 return promise; 970 } 971 }; 972} 973; 974__turbopack_context__.s([ 975 "CancelledError", 976 0, 977 CancelledError, 978 "canFetch", 979 0, 980 canFetch, 981 "createRetryer", 982 0, 983 createRetryer 984], 936553); 985// MERGED MODULE: [project]/node_modules/@tanstack/query-core/build/modern/removable.js [a
985pp-client] (ecmascript) 986; 987var __TURBOPACK__imported__module__229032__ = __turbopack_context__.i(229032); 988var __TURBOPACK__imported__module__567928__ = __turbopack_context__.i(567928); 989var __TURBOPACK__imported__module__523474__ = __turbopack_context__.i(523474); 990var __TURBOPACK__imported__module__180166__ = __turbopack_context__.i(180166); 991var __TURBOPACK__imported__module__619273__1 = __TURBOPACK__imported__module__619273__; 992var __TURBOPACK__imported__module__273911__1 = __TURBOPACK__imported__module__273911__; 993; 994; 995; 996var _gcTimeout; 997; 998; 999; 1000//#region src/removable.ts 1001var Removable = (_gcTimeout = new WeakMap(), class { 1002 destroy() { 1003 this.clearGcTimeout(); 1004 } 1005 scheduleGc() { 1006 this.clearGcTimeout(); 1007 if ((0, __TURBOPACK__imported__module__619273__1["isValidTimeout"])(this.gcTime)) (0, __TURBOPACK__imported__module__523474__["_"])(this, _gcTimeout, __TURBOPACK__imported__module__180166__["timeoutManager"].setTimeout(()=>{ 1008 this.optionalRemove(); 1009 }, this.gcTime)); 1010 } 1011 updateGcTime(newGcTime) { 1012 this.gcTime = Math.max(this.gcTime || 0, newGcTime !== null && newGcTime !== void 0 ? newGcTime : (0, __TURBOPACK__imported__module__273911__1["isServer"])() ? Infinity : 3e5); 1013 } 1014 clearGcTimeout() { 1015 if ((0, __TURBOPACK__imported__module__229032__["_"])(this, _gcTimeout) !== void 0) { 1016 __TURBOPACK__imported__module__180166__["timeoutManager"].clearTimeout((0, __TURBOPACK__imported__module__229032__["_"])(this, _gcTimeout)); 1017 (0, __TURBOPACK__imported__module__523474__["_"])(this, _gcTimeout, void 0); 1018 } 1019 } 1020 constructor(){ 1021 (0, __TURBOPACK__imported__module__567928__["_"])(this, _gcTimeout, { 1022 writable: true, 1023 value: void 0 1024 }); 1025 } 1026}); 1027; 1028__turbopack_context__.s([ 1029 "Removable", 1030 0, 1031 Removable 1032], 88587); 1033}), 1034197643, ((__turbopack_context__) => { 1035"use strict"; 1036 1037var __TURBOPACK__imported__module__843476__ = __turbopack_context__.i(843476); 1038var __TURBOPACK__imported__module__271645__ = __turbopack_context__.i(271645); 1039// Generated by @compas/code-gen 1040"use client"; 1041; 1042; 1043const ApiContext = /*#__PURE__*/ (0, __TURBOPACK__imported__module__271645__["createContext"])(undefined); 1044function ApiProvider(param) { 1045 let { instance, children } = param; 1046 return /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(ApiContext.Provider, { 1047 value: instance, 1048 children: children 1049 }); 1050} 1051const useApi = ()=>{ 1052 const context = (0, __TURBOPACK__imported__module__271645__["useContext"])(ApiContext); 1053 if (!context) { 1054 throw Error("Be sure to wrap your application with <ApiProvider>."); 1055 } 1056 return context; 1057}; 1058__turbopack_context__.s([ 1059 "ApiProvider", 1060 0, 1061 ApiProvider, 1062 "useApi", 1063 0, 1064 useApi 1065]); 1066}), 1067286491, ((__turbopack_context__) => { 1068"use strict"; 1069 1070// MERGED MODULE: [project]/node_modules/@tanstack/query-core/build/modern/query.js [app-client] (ecmascript) 1071; 1072var __TURBOPACK__imported__module__247167__ = __turbopack_context__.i(247167); 1073var __TURBOPACK__imported__module__229032__ = __turbopack_context__.i(229032); 1074var __TURBOPACK__imported__module__567928__ = __turbopack_context__.i(567928); 1075var __TURBOPACK__imported__module__523474__ = __turbopack_context__.i(523474); 1076var __TURBOPACK__imported__module__203023__ = __turbopack_context__.i(203023); 1077var __TURBOPACK__imported__module__903150__ = __turbopack_context__.i(903150); 1078var __TURBOPACK__imported__module__619273__ = __turbopack_context__.i(619273); 1079var __TURBOPACK__imported__module__540143__ = __turbopack_context__.i(540143); 1080var __TURBOPACK__imported__module__936553__ = __turbopack_context__.i(936553); 1081var __TURBOPACK__imported__module__88587__ = __turbopack_context__.i(88587); 1082// MERGED MODULE: [project]/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js [app-client] (ecmascript) 1083; 1084var __TURBOPACK__imported__module__619273__1 = __TURBOPACK__imported__module__619273__; 1085; 1086//#region src/infiniteQueryBehavior.ts 1087function infiniteQueryBehavior(pages) { 1088 return { 1089 onFetch: (context, query)=>{
1090 var _context_fetchOptions_meta_fetchMore, _context_fetchOptions_meta, _context_fetchOptions, _context_state_data, _context_state_data1; 1091 const options = context.options; 1092 const direction = (_context_fetchOptions = context.fetchOptions) === null || _context_fetchOptions === void 0 ? void 0 : (_context_fetchOptions_meta = _context_fetchOptions.meta) === null || _context_fetchOptions_meta === void 0 ? void 0 : (_context_fetchOptions_meta_fetchMore = _context_fetchOptions_meta.fetchMore) === null || _context_fetchOptions_meta_fetchMore === void 0 ? void 0 : _context_fetchOptions_meta_fetchMore.direction; 1093 const oldPages = ((_context_state_data = context.state.data) === null || _context_state_data === void 0 ? void 0 : _context_state_data.pages) || []; 1094 const oldPageParams = ((_context_state_data1 = context.state.data) === null || _context_state_data1 === void 0 ? void 0 : _context_state_data1.pageParams) || []; 1095 let result = { 1096 pages: [], 1097 pageParams: [] 1098 }; 1099 let currentPage = 0; 1100 const fetchFn = async ()=>{ 1101 let cancelled = false; 1102 const addSignalProperty = (object)=>{ 1103 (0, __TURBOPACK__imported__module__619273__1["addConsumeAwareSignal"])(object, ()=>context.signal, ()=>cancelled = true); 1104 }; 1105 const queryFn = (0, __TURBOPACK__imported__module__619273__1["ensureQueryFn"])(context.options, context.fetchOptions); 1106 const fetchPage = async (data, param, previous)=>{ 1107 if (cancelled) return Promise.reject(context.signal.reason); 1108 if (param == null && data.pages.length) return Promise.resolve(data); 1109 const createQueryFnContext = ()=>{ 1110 const queryFnContext = { 1111 client: context.client, 1112 queryKey: context.queryKey, 1113 pageParam: param, 1114 direction: previous ? "backward" : "forward", 1115 meta: context.options.meta 1116 }; 1117 addSignalProperty(queryFnContext); 1118 return queryFnContext; 1119 }; 1120 const queryFnContext = createQueryFnContext(); 1121 const page = await queryFn(queryFnContext); 1122 const { maxPages } = context.options; 1123 const addTo = previous ? __TURBOPACK__imported__module__619273__1["addToStart"] : __TURBOPACK__imported__module__619273__1["addToEnd"]; 1124 return { 1125 pages: addTo(data.pages, page, maxPages), 1126 pageParams: addTo(data.pageParams, param, maxPages) 1127 }; 1128 }; 1129 if (direction && oldPages.length) { 1130 const previous = direction === "backward"; 1131 const pageParamFn = previous ? getPreviousPageParam : getNextPageParam; 1132 const oldData = { 1133 pages: oldPages, 1134 pageParams: oldPageParams 1135 }; 1136 result = await fetchPage(oldData, pageParamFn(options, oldData), previous); 1137 } else { 1138 const remainingPages = pages !== null && pages !== void 0 ? pages : oldPages.length; 1139 do { 1140 var _oldPageParams_; 1141 const param = currentPage === 0 ? (_oldPageParams_ = oldPageParams[0]) !== null && _oldPageParams_ !== void 0 ? _oldPageParams_ : options.initialPageParam : getNextPageParam(options, result); 1142 if (currentPage > 0 && param == null) break; 1143 result = await fetchPage(result, param); 1144 currentPage++; 1145 }while (currentPage < remainingPages) 1146 } 1147 return result; 1148 }; 1149 if (context.options.persister) context.fetchFn = ()=>{ 1150 var _context_options_persister, _context_options; 1151 return (_context_options_persister = (_context_options = context.options).persister) === null || _context_options_persister === void 0 ? void 0 : _context_options_persister.call(_context_options, fetchFn, { 1152 client: context.client, 1153 queryKey: context.queryKey, 1154 meta: context.options.meta, 1155 signal: context.signal 1156 }, query); 1157 }; 1158 else context.fetchFn = fetchFn; 1159 } 1160 }; 1161} 1162function getNextPageParam(options, param) { 1163 let { pages, pageParams } = param; 1164 const lastIndex = pages.length - 1; 1165 return pages.length > 0 ? options.getNextPageParam(pages[lastIndex], pages, pageParams[lastIndex], pageParams) : void 0; 1166} 1167function getPreviousPageParam(options, param) { 1168 let { pages, pageParams } = param; 1169 var _options_getPreviousPageParam; 1170 return pages.length > 0 ? (_options_getPreviousPageParam = options.getPreviousPageParam)
1170=== null || _options_getPreviousPageParam === void 0 ? void 0 : _options_getPreviousPageParam.call(options, pages[0], pages, pageParams[0], pageParams) : void 0; 1171} 1172/** 1173* Checks if there is a next page. 1174*/ function hasNextPage(options, data) { 1175 if (!data) return false; 1176 return getNextPageParam(options, data) != null; 1177} 1178/** 1179* Checks if there is a previous page. 1180*/ function hasPreviousPage(options, data) { 1181 if (!data || !options.getPreviousPageParam) return false; 1182 return getPreviousPageParam(options, data) != null; 1183} 1184; 1185; 1186; 1187; 1188; 1189; 1190var _queryType, _initialState, _revertState, _cache, _client, _retryer, _defaultOptions, _abortSignalConsumed, _dispatch, _class; 1191; 1192; 1193; 1194; 1195; 1196//#region src/query.ts 1197var Query = (_queryType = new WeakMap(), _initialState = new WeakMap(), _revertState = new WeakMap(), _cache = new WeakMap(), _client = new WeakMap(), _retryer = new WeakMap(), _defaultOptions = new WeakMap(), _abortSignalConsumed = new WeakMap(), _dispatch = new WeakSet(), _class = class extends __TURBOPACK__imported__module__88587__["Removable"] { 1198 get meta() { 1199 return this.options.meta; 1200 } 1201 get queryType() { 1202 return (0, __TURBOPACK__imported__module__229032__["_"])(this, _queryType); 1203 } 1204 get promise() { 1205 var _class_private_field_get; 1206 return (_class_private_field_get = (0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer)) === null || _class_private_field_get === void 0 ? void 0 : _class_private_field_get.promise; 1207 } 1208 setOptions(options) { 1209 this.options = { 1210 ...(0, __TURBOPACK__imported__module__229032__["_"])(this, _defaultOptions), 1211 ...options 1212 }; 1213 if (options === null || options === void 0 ? void 0 : options._type) (0, __TURBOPACK__imported__module__523474__["_"])(this, _queryType, options._type); 1214 this.updateGcTime(this.options.gcTime); 1215 if (this.state && this.state.data === void 0) { 1216 const defaultState = getDefaultState(this.options); 1217 if (defaultState.data !== void 0) { 1218 this.setState(successState(defaultState.data, defaultState.dataUpdatedAt)); 1219 (0, __TURBOPACK__imported__module__523474__["_"])(this, _initialState, defaultState); 1220 } 1221 } 1222 } 1223 optionalRemove() { 1224 if (!this.observers.length && this.state.fetchStatus === "idle") (0, __TURBOPACK__imported__module__229032__["_"])(this, _cache).remove(this); 1225 } 1226 setData(newData, options) { 1227 const data = (0, __TURBOPACK__imported__module__619273__["replaceData"])(this.state.data, newData, this.options); 1228 (0, __TURBOPACK__imported__module__203023__["_"])(this, _dispatch, dispatch).call(this, { 1229 data, 1230 type: "success", 1231 dataUpdatedAt: options === null || options === void 0 ? void 0 : options.updatedAt, 1232 manual: options === null || options === void 0 ? void 0 : options.manual 1233 }); 1234 return data; 1235 } 1236 setState(state) { 1237 (0, __TURBOPACK__imported__module__203023__["_"])(this, _dispatch, dispatch).call(this, { 1238 type: "setState", 1239 state 1240 }); 1241 } 1242 cancel(options) { 1243 var _class_private_field_get, _class_private_field_get1; 1244 const promise = (_class_private_field_get = (0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer)) === null || _class_private_field_get === void 0 ? void 0 : _class_private_field_get.promise; 1245 (_class_private_field_get1 = (0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer)) === null || _class_private_field_get1 === void 0 ? void 0 : _class_private_field_get1.cancel(options); 1246 return promise ? promise.then(__TURBOPACK__imported__module__619273__["noop"]).catch(__TURBOPACK__imported__module__619273__["noop"]) : Promise.resolve(); 1247 } 1248 destroy() { 1249 super.destroy(); 1250 this.cancel({ 1251 silent: true 1252 }); 1253 } 1254 get resetState() { 1255 return (0, __TURBOPACK__imported__module__229032__["_"])(this, _initialState); 1256 } 1257 reset() { 1258 this.destroy(); 1259 this.setState(this.resetState); 1260 } 1261 isActive() { 1262 return this.observers.some((observer)=>(0, __TURBOPACK__imported__module__619273__["resolveQueryValue"])(observer.options.enabled, this) !== false); 1263 } 1264 isDisabled() { 1265 if (this.getObserversCount() > 0) return !this.isActive(); 1266 return this.options.queryFn === __TURBOPACK__imported__module__619273__["skipToken"] || !this.isFetched(); 1267 } 1268 isFetched() { 1269 return this.state.dataUpdateCount + this.state.errorUpdate
1269Count > 0; 1270 } 1271 isStatic() { 1272 if (this.getObserversCount() > 0) return this.observers.some((observer)=>(0, __TURBOPACK__imported__module__619273__["resolveQueryValue"])(observer.options.staleTime, this) === "static"); 1273 return false; 1274 } 1275 isStale() { 1276 if (this.getObserversCount() > 0) return this.observers.some((observer)=>observer.getCurrentResult().isStale); 1277 return this.state.data === void 0 || this.state.isInvalidated; 1278 } 1279 isStaleByTime() { 1280 let staleTime = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; 1281 if (this.state.data === void 0) return true; 1282 if (staleTime === "static") return false; 1283 if (this.state.isInvalidated) return true; 1284 return !(0, __TURBOPACK__imported__module__619273__["timeUntilStale"])(this.state.dataUpdatedAt, staleTime); 1285 } 1286 onFocus() { 1287 var _this_observers_find, _class_private_field_get; 1288 (_this_observers_find = this.observers.find((x)=>x.shouldFetchOnWindowFocus())) === null || _this_observers_find === void 0 ? void 0 : _this_observers_find.refetch({ 1289 cancelRefetch: false 1290 }); 1291 (_class_private_field_get = (0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer)) === null || _class_private_field_get === void 0 ? void 0 : _class_private_field_get.continue(); 1292 } 1293 onOnline() { 1294 var _this_observers_find, _class_private_field_get; 1295 (_this_observers_find = this.observers.find((x)=>x.shouldFetchOnReconnect())) === null || _this_observers_find === void 0 ? void 0 : _this_observers_find.refetch({ 1296 cancelRefetch: false 1297 }); 1298 (_class_private_field_get = (0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer)) === null || _class_private_field_get === void 0 ? void 0 : _class_private_field_get.continue(); 1299 } 1300 addObserver(observer) { 1301 if (!this.observers.includes(observer)) { 1302 this.observers.push(observer); 1303 this.clearGcTimeout(); 1304 (0, __TURBOPACK__imported__module__229032__["_"])(this, _cache).notify({ 1305 type: "observerAdded", 1306 query: this, 1307 observer 1308 }); 1309 } 1310 } 1311 removeObserver(observer) { 1312 const index = this.observers.indexOf(observer); 1313 if (index !== -1) { 1314 this.observers.splice(index, 1); 1315 if (!this.observers.length) { 1316 if ((0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer)) { 1317 if ((0, __TURBOPACK__imported__module__229032__["_"])(this, _abortSignalConsumed) || this.state.fetchStatus === "paused" && this.state.status === "pending") (0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer).cancel({ 1318 revert: true 1319 }); 1320 else (0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer).cancelRetry(); 1321 } 1322 this.scheduleGc(); 1323 } 1324 (0, __TURBOPACK__imported__module__229032__["_"])(this, _cache).notify({ 1325 type: "observerRemoved", 1326 query: this, 1327 observer 1328 }); 1329 } 1330 } 1331 getObserversCount() { 1332 return this.observers.length; 1333 } 1334 invalidate() { 1335 if (!this.state.isInvalidated) (0, __TURBOPACK__imported__module__203023__["_"])(this, _dispatch, dispatch).call(this, { 1336 type: "invalidate" 1337 }); 1338 } 1339 async fetch(options, fetchOptions) { 1340 var _class_private_field_get, _this, _context_fetchOptions, _context_fetchOptions1; 1341 if (this.state.fetchStatus !== "idle" && ((_class_private_field_get = (0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer)) === null || _class_private_field_get === void 0 ? void 0 : _class_private_field_get.status()) !== "rejected") { 1342 if (this.state.data !== void 0 && (fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.cancelRefetch)) this.cancel({ 1343 silent: true 1344 }); 1345 else if ((0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer)) { 1346 (0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer).continueRetry(); 1347 return (0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer).promise; 1348 } 1349 } 1350 if (options) this.setOptions(options); 1351 if (!this.options.queryFn) { 1352 const observer = this.observers.find((x)=>x.options.queryFn); 1353 if (observer) this.setOptions(observer.options); 1354 } 1355 if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable 1356 ; 1357 const abortController = new AbortController(); 1358 const addSignalProperty = (object)=>{ 1359 Object.defineProperty(object, "signal", { 1360 enumerable: true, 1361 get: ()=>{ 1362 (0, __TURBOPACK__imported__module__523474__["_"])(this, _abortSignalConsumed, true); 1363 return abortController.signal; 1364 } 1365 }); 1366 }; 1367 const fetchFn = ()=>{ 1368 const queryFn = (0, __TURBOPACK__imported__module__619273__["ensureQueryFn"])(this.options, fetchOptions); 1369 const createQueryFnContext = ()=>{ 1370 const queryFnContext = { 1371 client: (0, __TURBOPACK__imported__module__229032__["_"])(this, _client), 1372 queryKey: this.queryKey, 1373 meta: this.meta 1374 }; 1375 addSignalProperty(queryFnContext); 1376 return queryFnContext; 1377 }; 1378 const queryFnContext = createQueryFnContext(); 1379 (0, __TURBOPACK__imported__module__523474__["_"])(this, _abortSignalConsumed, false); 1380 if (this.options.persister) return this.options.persister(queryFn, queryFnContext, this); 1381 return queryFn(queryFnContext); 1382 }; 1383 const createFetchContext = ()=>{ 1384 const context = { 1385 fetchOptions, 1386 options: this.options, 1387 queryKey: this.queryKey, 1388 client: (0, __TURBOPACK__imported__module__229032__["_"])(this, _client), 1389 state: this.state, 1390 fetchFn 1391 }; 1392 addSignalProperty(context); 1393 return context; 1394 }; 1395 const context = createFetchContext(); 1396 (_this = (0, __TURBOPACK__imported__module__229032__["_"])(this, _queryType) === "infinite" ? infiniteQueryBehavior(this.options.pages) : this.options.behavior) === null || _this === void 0 ? void 0 : _this.onFetch(context, this); 1397 (0, __TURBOPACK__imported__module__523474__["_"])(this, _revertState, this.state); 1398 if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((_context_fetchOptions = context.fetchOptions) === null || _context_fetchOptions === void 0 ? void 0 : _context_fetchOptions.meta)) (0, __TURBOPACK__imported__module__203023__["_"])(this, _dispatch, dispatch).call(this, { 1399 type: "fetch", 1400 meta: (_context_fetchOptions1 = context.fetchOptions) === null || _context_fetchOptions1 === void 0 ? void 0 : _context_fetchOptions1.meta 1401 }); 1402 const retryer = (0, __TURBOPACK__imported__module__523474__["_"])(this, _retryer, (0, __TURBOPACK__imported__module__936553__["createRetryer"])({ 1403 initialPromise: fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.initialPromise, 1404 fn: context.fetchFn, 1405 onCancel: (error)=>{ 1406 if (error instanceof __TURBOPACK__imported__module__936553__["CancelledError"] && error.revert) this.setState({ 1407 ...(0, __TURBOPACK__imported__module__229032__["_"])(this, _revertState), 1408 fetchStatus: "idle" 1409 }); 1410 abortController.abort(); 1411 }, 1412 onFail: (failureCount, error)=>{ 1413 (0, __TURBOPACK__imported__module__203023__["_"])(this, _dispatch, dispatch).call(this, { 1414 type: "failed", 1415 failureCount, 1416 error 1417 }); 1418 }, 1419 onPause: ()=>{ 1420 (0, __TURBOPACK__imported__module__203023__["_"])(this, _dispatch, dispatch).call(this, { 1421 type: "pause" 1422 }); 1423 }, 1424 onContinue: ()=>{ 1425 (0, __TURBOPACK__imported__module__203023__["_"])(this, _dispatch, dispatch).call(this, { 1426 type: "continue" 1427 }); 1428 }, 1429 retry: context.options.retry, 1430 retryDelay: context.options.retryDelay, 1431 networkMode: context.options.networkMode, 1432 canRun: ()=>true 1433 })); 1434 try { 1435 var _class_private_field_get_config_onSuccess, _class_private_field_get_config, _class_private_field_get_config_onSettled, _class_private_field_get_config1; 1436 const data = await retryer.start(); 1437 if (data === void 0) { 1438 if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable 1439 ; 1440 throw new Error("".concat(this.queryHash, " data is undefined")); 1441 } 1442 this.setData(data); 1443 (_class_private_field_get_config_onSuccess = (_class_private_field_get_config = (0, __TURBOPACK__imported__module__229032__["_"])(this, _cache).config).onSuccess) === null || _class_private_field_get_config_onSuccess === void 0 ? void 0 : _class_private_field_get_config_onSuccess.call(_class_private_field_get_config, data, this); 1444 (_class_private_field_get_config_onSettled = (_class_private_field_get_config1 = (0, __TURBOPACK__imported__module__229032__["_"])(this, _cache).config).onSettled) === null || _class_private_field_get_config_onSettled === void 0 ? void 0 : _class_private_field_get_config_onSettled.call(_class_private_field_get_config1, data, this.state.error, this); 1445 return data; 1446 } catch (error) { 1447 var _class_private_field_get_config_onError, _class_private_field_get_config2, _class_private_field_get_config_onSettled1, _class_private_field_get_config3; 1448 if (error instanceof __TURBOPACK__imported__module__936553__["CancelledError"]) { 1449 if (error.silent) return (0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer).promise; 1450 else if (error.revert) { 1451 if (this.state.data === void 0) throw error; 1452 return this.state.data; 1453 } 1454 } 1455 (0, __TURBOPACK__imported__module__203023__["_"])(this, _dispatch, dispatch).call(this, { 1456 type: "error", 1457 error 1458 }); 1459 (_class_private_field_get_config_onError = (_class_private_field_get_config2 = (0, __TURBOPACK__imported__module__229032__["_"])(this, _cache).config).onError) === null || _class_private_field_get_config_onError === void 0 ? void 0 : _class_private_field_get_config_onError.call(_class_private_field_get_config2, error, this); 1460 (_class_private_field_get_config_onSettled1 = (_class_private_field_get_config3 = (0, __TURBOPACK__imported__module__229032__["_"])(this, _cache).config).onSettled) === null || _class_private_field_get_config_onSettled1 === void 0 ? void 0 : _class_private_field_get_config_onSettled1.call(_class_private_field_get_config3, this.state.data, error, this); 1461 throw error; 1462 } finally{ 1463 if ((0, __TURBOPACK__imported__module__229032__["_"])(this, _retryer) === retryer) (0, __TURBOPACK__imported__module__523474__["_"])(this, _retryer, void 0); 1464 this.scheduleGc(); 1465 } 1466 } 1467 constructor(config){ 1468 var _config_state; 1469 super(), (0, __TURBOPACK__imported__module__903150__["_"])(this, _dispatch), (0, __TURBOPACK__imported__module__567928__["_"])(this, _queryType, { 1470 writable: true, 1471 value: void 0 1472 }), (0, __TURBOPACK__imported__module__567928__["_"])(this, _initialState, { 1473 writable: true, 1474 value: void 0 1475 }), (0, __TURBOPACK__imported__module__567928__["_"])(this, _revertState, { 1476 writable: true, 1477 value: void 0 1478 }), (0, __TURBOPACK__imported__module__567928__["_"])(this, _cache, { 1479 writable: true, 1480 value: void 0 1481 }), (0, __TURBOPACK__imported__module__567928__["_"])(this, _client, { 1482 writable: true, 1483 value: void 0 1484 }), (0, __TURBOPACK__imported__module__567928__["_"])(this, _retryer, { 1485 writable: true, 1486 value: void 0 1487 }), (0, __TURBOPACK__imported__module__567928__["_"])(this, _defaultOptions, { 1488 writable: true, 1489 value: void 0 1490 }), (0, __TURBOPACK__imported__module__567928__["_"])(this, _abortSignalConsumed, { 1491 writable: true, 1492 value: void 0 1493 }); 1494 (0, __TURBOPACK__imported__module__523474__["_"])(this, _abortSignalConsumed, false); 1495 (0, __TURBOPACK__imported__module__523474__["_"])(this, _defaultOptions, config.defaultOptions); 1496 this.setOptions(config.options); 1497 this.observers = []; 1498 (0, __TURBOPACK__imported__module__523474__["_"])(this, _client, config.client); 1499 (0, __TURBOPACK__imported__module__523474__["_"])(this, _cache, (0, __TURBOPACK__imported__module__229032__["_"])(this, _client).getQueryCache()); 1500 this.queryKey = config.queryKey; 1501 this.queryHash = config.queryHash; 1502 (0, __TURBOPACK__imported__module__523474__["_"])(this, _initialState, getDefaultState(this.options)); 1503 this.state = (_config_state = config.state) !== null && _config_state !== void 0 ? _config_state : (0, __TURBOPACK__imported__module__229032__["_"])(this, _initialState); 1504 this.scheduleGc(); 1505 } 1506}, _class); 1507function fetchState(data, options) { 1508 return { 1509 fetchFailureCount: 0, 1510 fetchFailureReason: null, 1511 fetchStatus: (0, __TURBOPACK__imported__module__936553__["canFetch"])(options.networkMode) ? "fetching" : "paused", 1512 ...data === void 0 && { 1513 error: null, 1514 status: "pending" 1515 } 1516 }; 1517} 1518function successState(data, dataUpdatedAt) { 1519 return { 1520 data, 1521 dataUpdatedAt: dataUpdatedAt !== null && dataUpdatedAt !== void 0 ? dataUpdatedAt : Date.now(), 1522 error: null, 1523 isInvalidated: false, 1524 status: "success" 1525 }; 1526} 1527function getDefaultState(options) { 1528 const data = typeof options.initialData === "function" ? options.initialData() : options.initialData; 1529 const hasData = data !== void 0; 1530 const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0; 1531 return { 1532 data, 1533 dataUpdateCount: 0, 1534 dataUpdatedAt: hasData ? initialDataUpdatedAt !== null && initialDataUpdatedAt !== void 0 ? initialDataUpdatedAt : Date.now() : 0, 1535 error: null,
1536 errorUpdateCount: 0, 1537 errorUpdatedAt: 0, 1538 fetchFailureCount: 0, 1539 fetchFailureReason: null, 1540 fetchMeta: null, 1541 isInvalidated: false, 1542 status: hasData ? "success" : "pending", 1543 fetchStatus: "idle" 1544 }; 1545} 1546; 1547function dispatch(action) { 1548 const reducer = (state)=>{ 1549 switch(action.type){ 1550 case "failed": 1551 return { 1552 ...state, 1553 fetchFailureCount: action.failureCount, 1554 fetchFailureReason: action.error 1555 }; 1556 case "pause": 1557 return { 1558 ...state, 1559 fetchStatus: "paused" 1560 }; 1561 case "continue": 1562 return { 1563 ...state, 1564 fetchStatus: "fetching" 1565 }; 1566 case "fetch": 1567 var _action_meta; 1568 return { 1569 ...state, 1570 ...fetchState(state.data, this.options), 1571 fetchMeta: (_action_meta = action.meta) !== null && _action_meta !== void 0 ? _action_meta : null 1572 }; 1573 case "success": 1574 const newState = { 1575 ...state, 1576 ...successState(action.data, action.dataUpdatedAt), 1577 dataUpdateCount: state.dataUpdateCount + 1, 1578 ...!action.manual && { 1579 fetchStatus: "idle", 1580 fetchFailureCount: 0, 1581 fetchFailureReason: null 1582 } 1583 }; 1584 (0, __TURBOPACK__imported__module__523474__["_"])(this, _revertState, action.manual ? newState : void 0); 1585 return newState; 1586 case "error": 1587 const error = action.error; 1588 return { 1589 ...state, 1590 error, 1591 errorUpdateCount: state.errorUpdateCount + 1, 1592 errorUpdatedAt: Date.now(), 1593 fetchFailureCount: state.fetchFailureCount + 1, 1594 fetchFailureReason: error, 1595 fetchStatus: "idle", 1596 status: "error", 1597 isInvalidated: true 1598 }; 1599 case "invalidate": 1600 return { 1601 ...state, 1602 isInvalidated: true 1603 }; 1604 case "setState": 1605 return { 1606 ...state, 1607 ...action.state 1608 }; 1609 } 1610 }; 1611 this.state = reducer(this.state); 1612 __TURBOPACK__imported__module__540143__["notifyManager"].batch(()=>{ 1613 this.observers.slice().forEach((observer)=>{ 1614 observer.onQueryUpdate(); 1615 }); 1616 (0, __TURBOPACK__imported__module__229032__["_"])(this, _cache).notify({ 1617 query: this, 1618 type: "updated", 1619 action 1620 }); 1621 }); 1622} 1623__turbopack_context__.s([ 1624 "Query", 1625 0, 1626 Query, 1627 "fetchState", 1628 0, 1629 fetchState 1630], 286491); 1631}), 1632]); 1633 1634//# debugId=cafd5f41-9176-f59a-9592-01c1256156c2
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.