@cartanova/qgrid-cli 1.4.0 → 1.5.0

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 (22) hide show
  1. package/bundle/dist/application/qgrid/pool.js +6 -3
  2. package/bundle/src/application/qgrid/pool.ts +6 -2
  3. package/bundle/web-dist/client/assets/index-CJbMnvkl.css +1 -0
  4. package/bundle/web-dist/client/assets/index-DhqeOdaq.js +116 -0
  5. package/bundle/web-dist/client/assets/logs-BzY81a5V.js +1 -0
  6. package/bundle/web-dist/client/assets/preload-helper-ca-nBW7U.js +1 -0
  7. package/bundle/web-dist/client/assets/routes-C8VZv8Ii.js +5 -0
  8. package/bundle/web-dist/client/assets/{show-CFGLH8f_.js → show-B9Z-snx2.js} +1 -1
  9. package/bundle/web-dist/client/assets/{tokens-Bib8aQbc.js → tokens-Dk4_IBwI.js} +1 -1
  10. package/bundle/web-dist/client/index.html +3 -2
  11. package/bundle/web-dist/server/assets/lazyRouteComponent-Dyl_0WZs.js +1982 -0
  12. package/bundle/web-dist/server/assets/logs-bLRMIO1J.js +244 -0
  13. package/bundle/web-dist/server/assets/{routes-Dx59lTlD.js → routes-qwzTPLE2.js} +14 -388
  14. package/bundle/web-dist/server/assets/{show-BEFi1cKV.js → show-Btv2c6zd.js} +2 -1
  15. package/bundle/web-dist/server/assets/{tokens-Dyi6qMmP.js → tokens-BYhGItkk.js} +1 -1
  16. package/bundle/web-dist/server/entry-server.generated.js +70 -2008
  17. package/dist/cli.js +25 -4
  18. package/package.json +1 -1
  19. package/bundle/web-dist/client/assets/index-BP0XRvKL.css +0 -1
  20. package/bundle/web-dist/client/assets/index-CgXTSTgN.js +0 -116
  21. package/bundle/web-dist/client/assets/routes-DvViUcG1.js +0 -5
  22. /package/bundle/web-dist/client/assets/{services.generated-CAJQk7Wk.js → services.generated-1X7EKUWg.js} +0 -0
@@ -0,0 +1,1982 @@
1
+ import { $ as __commonJSMin, S as require_react, nt as __toESM, v as require_react_dom, x as require_jsx_runtime } from "./sd.generated-BeEKgSOs.js";
2
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/utils.js
3
+ function last(arr) {
4
+ return arr[arr.length - 1];
5
+ }
6
+ function isFunction(d) {
7
+ return typeof d === "function";
8
+ }
9
+ function functionalUpdate(updater, previous) {
10
+ if (isFunction(updater)) return updater(previous);
11
+ return updater;
12
+ }
13
+ var hasOwn = Object.prototype.hasOwnProperty;
14
+ function replaceEqualDeep(prev, _next) {
15
+ if (prev === _next) return prev;
16
+ const next = _next;
17
+ const array = isPlainArray(prev) && isPlainArray(next);
18
+ if (!array && !(isPlainObject(prev) && isPlainObject(next))) return next;
19
+ const prevItems = array ? prev : getEnumerableOwnKeys(prev);
20
+ if (!prevItems) return next;
21
+ const nextItems = array ? next : getEnumerableOwnKeys(next);
22
+ if (!nextItems) return next;
23
+ const prevSize = prevItems.length;
24
+ const nextSize = nextItems.length;
25
+ const copy = array ? new Array(nextSize) : {};
26
+ let equalItems = 0;
27
+ for (let i = 0; i < nextSize; i++) {
28
+ const key = array ? i : nextItems[i];
29
+ const p = prev[key];
30
+ const n = next[key];
31
+ if (p === n) {
32
+ copy[key] = p;
33
+ if (array ? i < prevSize : hasOwn.call(prev, key)) equalItems++;
34
+ continue;
35
+ }
36
+ if (p === null || n === null || typeof p !== "object" || typeof n !== "object") {
37
+ copy[key] = n;
38
+ continue;
39
+ }
40
+ const v = replaceEqualDeep(p, n);
41
+ copy[key] = v;
42
+ if (v === p) equalItems++;
43
+ }
44
+ return prevSize === nextSize && equalItems === prevSize ? prev : copy;
45
+ }
46
+ function getEnumerableOwnKeys(o) {
47
+ const keys = [];
48
+ const names = Object.getOwnPropertyNames(o);
49
+ for (const name of names) {
50
+ if (!Object.prototype.propertyIsEnumerable.call(o, name)) return false;
51
+ keys.push(name);
52
+ }
53
+ const symbols = Object.getOwnPropertySymbols(o);
54
+ for (const symbol of symbols) {
55
+ if (!Object.prototype.propertyIsEnumerable.call(o, symbol)) return false;
56
+ keys.push(symbol);
57
+ }
58
+ return keys;
59
+ }
60
+ function isPlainObject(o) {
61
+ if (!hasObjectPrototype(o)) return false;
62
+ const ctor = o.constructor;
63
+ if (typeof ctor === "undefined") return true;
64
+ const prot = ctor.prototype;
65
+ if (!hasObjectPrototype(prot)) return false;
66
+ if (!prot.hasOwnProperty("isPrototypeOf")) return false;
67
+ return true;
68
+ }
69
+ function hasObjectPrototype(o) {
70
+ return Object.prototype.toString.call(o) === "[object Object]";
71
+ }
72
+ function isPlainArray(value) {
73
+ return Array.isArray(value) && value.length === Object.keys(value).length;
74
+ }
75
+ function deepEqual(a, b, opts) {
76
+ if (a === b) return true;
77
+ if (typeof a !== typeof b) return false;
78
+ if (Array.isArray(a) && Array.isArray(b)) {
79
+ if (a.length !== b.length) return false;
80
+ for (let i = 0, l = a.length; i < l; i++) if (!deepEqual(a[i], b[i], opts)) return false;
81
+ return true;
82
+ }
83
+ if (isPlainObject(a) && isPlainObject(b)) {
84
+ const ignoreUndefined = opts?.ignoreUndefined ?? true;
85
+ if (opts?.partial) {
86
+ for (const k in b) if (!ignoreUndefined || b[k] !== void 0) {
87
+ if (!deepEqual(a[k], b[k], opts)) return false;
88
+ }
89
+ return true;
90
+ }
91
+ let aCount = 0;
92
+ if (!ignoreUndefined) aCount = Object.keys(a).length;
93
+ else for (const k in a) if (a[k] !== void 0) aCount++;
94
+ let bCount = 0;
95
+ for (const k in b) if (!ignoreUndefined || b[k] !== void 0) {
96
+ bCount++;
97
+ if (bCount > aCount || !deepEqual(a[k], b[k], opts)) return false;
98
+ }
99
+ return aCount === bCount;
100
+ }
101
+ return false;
102
+ }
103
+ function createControlledPromise(onResolve) {
104
+ let resolveLoadPromise;
105
+ let rejectLoadPromise;
106
+ const controlledPromise = new Promise((resolve, reject) => {
107
+ resolveLoadPromise = resolve;
108
+ rejectLoadPromise = reject;
109
+ });
110
+ controlledPromise.status = "pending";
111
+ controlledPromise.resolve = (value) => {
112
+ controlledPromise.status = "resolved";
113
+ controlledPromise.value = value;
114
+ resolveLoadPromise(value);
115
+ onResolve?.(value);
116
+ };
117
+ controlledPromise.reject = (e) => {
118
+ controlledPromise.status = "rejected";
119
+ rejectLoadPromise(e);
120
+ };
121
+ return controlledPromise;
122
+ }
123
+ function isModuleNotFoundError(error) {
124
+ if (typeof error?.message !== "string") return false;
125
+ return error.message.startsWith("Failed to fetch dynamically imported module") || error.message.startsWith("error loading dynamically imported module") || error.message.startsWith("Importing a module script failed");
126
+ }
127
+ function isPromise(value) {
128
+ return Boolean(value && typeof value === "object" && typeof value.then === "function");
129
+ }
130
+ function findLast(array, predicate) {
131
+ for (let i = array.length - 1; i >= 0; i--) {
132
+ const item = array[i];
133
+ if (predicate(item)) return item;
134
+ }
135
+ }
136
+ function decodeSegment(segment) {
137
+ try {
138
+ return decodeURI(segment);
139
+ } catch {
140
+ return segment.replaceAll(/%[0-9A-F]{2}/gi, (match) => {
141
+ try {
142
+ return decodeURI(match);
143
+ } catch {
144
+ return match;
145
+ }
146
+ });
147
+ }
148
+ }
149
+ function decodePath(path, decodeIgnore) {
150
+ if (!path) return path;
151
+ const re = decodeIgnore ? new RegExp(`${decodeIgnore.join("|")}`, "gi") : /%25|%5C/gi;
152
+ let cursor = 0;
153
+ let result = "";
154
+ let match;
155
+ while (null !== (match = re.exec(path))) {
156
+ result += decodeSegment(path.slice(cursor, match.index)) + match[0];
157
+ cursor = re.lastIndex;
158
+ }
159
+ return result + decodeSegment(cursor ? path.slice(cursor) : path);
160
+ }
161
+ //#endregion
162
+ //#region ../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js
163
+ var isProduction$1 = process.env.NODE_ENV === "production";
164
+ var prefix = "Invariant failed";
165
+ function invariant(condition, message) {
166
+ if (condition) return;
167
+ if (isProduction$1) throw new Error(prefix);
168
+ var provided = typeof message === "function" ? message() : message;
169
+ var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
170
+ throw new Error(value);
171
+ }
172
+ //#endregion
173
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/lru-cache.js
174
+ function createLRUCache(max) {
175
+ const cache = /* @__PURE__ */ new Map();
176
+ let oldest;
177
+ let newest;
178
+ const touch = (entry) => {
179
+ if (!entry.next) return;
180
+ if (!entry.prev) {
181
+ entry.next.prev = void 0;
182
+ oldest = entry.next;
183
+ entry.next = void 0;
184
+ if (newest) {
185
+ entry.prev = newest;
186
+ newest.next = entry;
187
+ }
188
+ } else {
189
+ entry.prev.next = entry.next;
190
+ entry.next.prev = entry.prev;
191
+ entry.next = void 0;
192
+ if (newest) {
193
+ newest.next = entry;
194
+ entry.prev = newest;
195
+ }
196
+ }
197
+ newest = entry;
198
+ };
199
+ return {
200
+ get(key) {
201
+ const entry = cache.get(key);
202
+ if (!entry) return void 0;
203
+ touch(entry);
204
+ return entry.value;
205
+ },
206
+ set(key, value) {
207
+ if (cache.size >= max && oldest) {
208
+ const toDelete = oldest;
209
+ cache.delete(toDelete.key);
210
+ if (toDelete.next) {
211
+ oldest = toDelete.next;
212
+ toDelete.next.prev = void 0;
213
+ }
214
+ if (toDelete === newest) newest = void 0;
215
+ }
216
+ const existing = cache.get(key);
217
+ if (existing) {
218
+ existing.value = value;
219
+ touch(existing);
220
+ } else {
221
+ const entry = {
222
+ key,
223
+ value,
224
+ prev: newest
225
+ };
226
+ if (newest) newest.next = entry;
227
+ newest = entry;
228
+ if (!oldest) oldest = entry;
229
+ cache.set(key, entry);
230
+ }
231
+ },
232
+ clear() {
233
+ cache.clear();
234
+ oldest = void 0;
235
+ newest = void 0;
236
+ }
237
+ };
238
+ }
239
+ var SEGMENT_TYPE_INDEX = 4;
240
+ var PARAM_W_CURLY_BRACES_RE = /^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/;
241
+ var OPTIONAL_PARAM_W_CURLY_BRACES_RE = /^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/;
242
+ var WILDCARD_W_CURLY_BRACES_RE = /^([^{]*)\{\$\}([^}]*)$/;
243
+ function parseSegment(path, start, output = new Uint16Array(6)) {
244
+ const next = path.indexOf("/", start);
245
+ const end = next === -1 ? path.length : next;
246
+ const part = path.substring(start, end);
247
+ if (!part || !part.includes("$")) {
248
+ output[0] = 0;
249
+ output[1] = start;
250
+ output[2] = start;
251
+ output[3] = end;
252
+ output[4] = end;
253
+ output[5] = end;
254
+ return output;
255
+ }
256
+ if (part === "$") {
257
+ const total = path.length;
258
+ output[0] = 2;
259
+ output[1] = start;
260
+ output[2] = start;
261
+ output[3] = total;
262
+ output[4] = total;
263
+ output[5] = total;
264
+ return output;
265
+ }
266
+ if (part.charCodeAt(0) === 36) {
267
+ output[0] = 1;
268
+ output[1] = start;
269
+ output[2] = start + 1;
270
+ output[3] = end;
271
+ output[4] = end;
272
+ output[5] = end;
273
+ return output;
274
+ }
275
+ const wildcardBracesMatch = part.match(WILDCARD_W_CURLY_BRACES_RE);
276
+ if (wildcardBracesMatch) {
277
+ const pLength = wildcardBracesMatch[1].length;
278
+ output[0] = 2;
279
+ output[1] = start + pLength;
280
+ output[2] = start + pLength + 1;
281
+ output[3] = start + pLength + 2;
282
+ output[4] = start + pLength + 3;
283
+ output[5] = path.length;
284
+ return output;
285
+ }
286
+ const optionalParamBracesMatch = part.match(OPTIONAL_PARAM_W_CURLY_BRACES_RE);
287
+ if (optionalParamBracesMatch) {
288
+ const prefix = optionalParamBracesMatch[1];
289
+ const paramName = optionalParamBracesMatch[2];
290
+ const suffix = optionalParamBracesMatch[3];
291
+ const pLength = prefix.length;
292
+ output[0] = 3;
293
+ output[1] = start + pLength;
294
+ output[2] = start + pLength + 3;
295
+ output[3] = start + pLength + 3 + paramName.length;
296
+ output[4] = end - suffix.length;
297
+ output[5] = end;
298
+ return output;
299
+ }
300
+ const paramBracesMatch = part.match(PARAM_W_CURLY_BRACES_RE);
301
+ if (paramBracesMatch) {
302
+ const prefix = paramBracesMatch[1];
303
+ const paramName = paramBracesMatch[2];
304
+ const suffix = paramBracesMatch[3];
305
+ const pLength = prefix.length;
306
+ output[0] = 1;
307
+ output[1] = start + pLength;
308
+ output[2] = start + pLength + 2;
309
+ output[3] = start + pLength + 2 + paramName.length;
310
+ output[4] = end - suffix.length;
311
+ output[5] = end;
312
+ return output;
313
+ }
314
+ output[0] = 0;
315
+ output[1] = start;
316
+ output[2] = start;
317
+ output[3] = end;
318
+ output[4] = end;
319
+ output[5] = end;
320
+ return output;
321
+ }
322
+ function parseSegments(defaultCaseSensitive, data, route, start, node, depth, onRoute) {
323
+ onRoute?.(route);
324
+ let cursor = start;
325
+ {
326
+ const path = route.fullPath ?? route.from;
327
+ const length = path.length;
328
+ const caseSensitive = route.options?.caseSensitive ?? defaultCaseSensitive;
329
+ while (cursor < length) {
330
+ const segment = parseSegment(path, cursor, data);
331
+ let nextNode;
332
+ const start2 = cursor;
333
+ const end = segment[5];
334
+ cursor = end + 1;
335
+ depth++;
336
+ switch (segment[0]) {
337
+ case 0: {
338
+ const value = path.substring(segment[2], segment[3]);
339
+ if (caseSensitive) {
340
+ const existingNode = node.static?.get(value);
341
+ if (existingNode) nextNode = existingNode;
342
+ else {
343
+ node.static ??= /* @__PURE__ */ new Map();
344
+ const next = createStaticNode(route.fullPath ?? route.from);
345
+ next.parent = node;
346
+ next.depth = depth;
347
+ nextNode = next;
348
+ node.static.set(value, next);
349
+ }
350
+ } else {
351
+ const name = value.toLowerCase();
352
+ const existingNode = node.staticInsensitive?.get(name);
353
+ if (existingNode) nextNode = existingNode;
354
+ else {
355
+ node.staticInsensitive ??= /* @__PURE__ */ new Map();
356
+ const next = createStaticNode(route.fullPath ?? route.from);
357
+ next.parent = node;
358
+ next.depth = depth;
359
+ nextNode = next;
360
+ node.staticInsensitive.set(name, next);
361
+ }
362
+ }
363
+ break;
364
+ }
365
+ case 1: {
366
+ const prefix_raw = path.substring(start2, segment[1]);
367
+ const suffix_raw = path.substring(segment[4], end);
368
+ const actuallyCaseSensitive = caseSensitive && !!(prefix_raw || suffix_raw);
369
+ const prefix = !prefix_raw ? void 0 : actuallyCaseSensitive ? prefix_raw : prefix_raw.toLowerCase();
370
+ const suffix = !suffix_raw ? void 0 : actuallyCaseSensitive ? suffix_raw : suffix_raw.toLowerCase();
371
+ const existingNode = node.dynamic?.find((s) => s.caseSensitive === actuallyCaseSensitive && s.prefix === prefix && s.suffix === suffix);
372
+ if (existingNode) nextNode = existingNode;
373
+ else {
374
+ const next = createDynamicNode(1, route.fullPath ?? route.from, actuallyCaseSensitive, prefix, suffix);
375
+ nextNode = next;
376
+ next.depth = depth;
377
+ next.parent = node;
378
+ node.dynamic ??= [];
379
+ node.dynamic.push(next);
380
+ }
381
+ break;
382
+ }
383
+ case 3: {
384
+ const prefix_raw = path.substring(start2, segment[1]);
385
+ const suffix_raw = path.substring(segment[4], end);
386
+ const actuallyCaseSensitive = caseSensitive && !!(prefix_raw || suffix_raw);
387
+ const prefix = !prefix_raw ? void 0 : actuallyCaseSensitive ? prefix_raw : prefix_raw.toLowerCase();
388
+ const suffix = !suffix_raw ? void 0 : actuallyCaseSensitive ? suffix_raw : suffix_raw.toLowerCase();
389
+ const existingNode = node.optional?.find((s) => s.caseSensitive === actuallyCaseSensitive && s.prefix === prefix && s.suffix === suffix);
390
+ if (existingNode) nextNode = existingNode;
391
+ else {
392
+ const next = createDynamicNode(3, route.fullPath ?? route.from, actuallyCaseSensitive, prefix, suffix);
393
+ nextNode = next;
394
+ next.parent = node;
395
+ next.depth = depth;
396
+ node.optional ??= [];
397
+ node.optional.push(next);
398
+ }
399
+ break;
400
+ }
401
+ case 2: {
402
+ const prefix_raw = path.substring(start2, segment[1]);
403
+ const suffix_raw = path.substring(segment[4], end);
404
+ const actuallyCaseSensitive = caseSensitive && !!(prefix_raw || suffix_raw);
405
+ const prefix = !prefix_raw ? void 0 : actuallyCaseSensitive ? prefix_raw : prefix_raw.toLowerCase();
406
+ const suffix = !suffix_raw ? void 0 : actuallyCaseSensitive ? suffix_raw : suffix_raw.toLowerCase();
407
+ const next = createDynamicNode(2, route.fullPath ?? route.from, actuallyCaseSensitive, prefix, suffix);
408
+ nextNode = next;
409
+ next.parent = node;
410
+ next.depth = depth;
411
+ node.wildcard ??= [];
412
+ node.wildcard.push(next);
413
+ }
414
+ }
415
+ node = nextNode;
416
+ }
417
+ const isLeaf = (route.path || !route.children) && !route.isRoot;
418
+ if (isLeaf && path.endsWith("/")) {
419
+ const indexNode = createStaticNode(route.fullPath ?? route.from);
420
+ indexNode.kind = SEGMENT_TYPE_INDEX;
421
+ indexNode.parent = node;
422
+ depth++;
423
+ indexNode.depth = depth;
424
+ node.index = indexNode;
425
+ node = indexNode;
426
+ }
427
+ if (isLeaf && !node.route) {
428
+ node.route = route;
429
+ node.fullPath = route.fullPath ?? route.from;
430
+ }
431
+ }
432
+ if (route.children) for (const child of route.children) parseSegments(defaultCaseSensitive, data, child, cursor, node, depth, onRoute);
433
+ }
434
+ function sortDynamic(a, b) {
435
+ if (a.prefix && b.prefix && a.prefix !== b.prefix) {
436
+ if (a.prefix.startsWith(b.prefix)) return -1;
437
+ if (b.prefix.startsWith(a.prefix)) return 1;
438
+ }
439
+ if (a.suffix && b.suffix && a.suffix !== b.suffix) {
440
+ if (a.suffix.endsWith(b.suffix)) return -1;
441
+ if (b.suffix.endsWith(a.suffix)) return 1;
442
+ }
443
+ if (a.prefix && !b.prefix) return -1;
444
+ if (!a.prefix && b.prefix) return 1;
445
+ if (a.suffix && !b.suffix) return -1;
446
+ if (!a.suffix && b.suffix) return 1;
447
+ if (a.caseSensitive && !b.caseSensitive) return -1;
448
+ if (!a.caseSensitive && b.caseSensitive) return 1;
449
+ return 0;
450
+ }
451
+ function sortTreeNodes(node) {
452
+ if (node.static) for (const child of node.static.values()) sortTreeNodes(child);
453
+ if (node.staticInsensitive) for (const child of node.staticInsensitive.values()) sortTreeNodes(child);
454
+ if (node.dynamic?.length) {
455
+ node.dynamic.sort(sortDynamic);
456
+ for (const child of node.dynamic) sortTreeNodes(child);
457
+ }
458
+ if (node.optional?.length) {
459
+ node.optional.sort(sortDynamic);
460
+ for (const child of node.optional) sortTreeNodes(child);
461
+ }
462
+ if (node.wildcard?.length) {
463
+ node.wildcard.sort(sortDynamic);
464
+ for (const child of node.wildcard) sortTreeNodes(child);
465
+ }
466
+ }
467
+ function createStaticNode(fullPath) {
468
+ return {
469
+ kind: 0,
470
+ depth: 0,
471
+ index: null,
472
+ static: null,
473
+ staticInsensitive: null,
474
+ dynamic: null,
475
+ optional: null,
476
+ wildcard: null,
477
+ route: null,
478
+ fullPath,
479
+ parent: null
480
+ };
481
+ }
482
+ function createDynamicNode(kind, fullPath, caseSensitive, prefix, suffix) {
483
+ return {
484
+ kind,
485
+ depth: 0,
486
+ index: null,
487
+ static: null,
488
+ staticInsensitive: null,
489
+ dynamic: null,
490
+ optional: null,
491
+ wildcard: null,
492
+ route: null,
493
+ fullPath,
494
+ parent: null,
495
+ caseSensitive,
496
+ prefix,
497
+ suffix
498
+ };
499
+ }
500
+ function processRouteMasks(routeList, processedTree) {
501
+ const segmentTree = createStaticNode("/");
502
+ const data = new Uint16Array(6);
503
+ for (const route of routeList) parseSegments(false, data, route, 1, segmentTree, 0);
504
+ sortTreeNodes(segmentTree);
505
+ processedTree.masksTree = segmentTree;
506
+ processedTree.flatCache = createLRUCache(1e3);
507
+ }
508
+ function findFlatMatch(path, processedTree) {
509
+ path ||= "/";
510
+ const cached = processedTree.flatCache.get(path);
511
+ if (cached) return cached;
512
+ const result = findMatch(path, processedTree.masksTree);
513
+ processedTree.flatCache.set(path, result);
514
+ return result;
515
+ }
516
+ function findSingleMatch(from, caseSensitive, fuzzy, path, processedTree) {
517
+ from ||= "/";
518
+ path ||= "/";
519
+ const key = caseSensitive ? `case\0${from}` : from;
520
+ let tree = processedTree.singleCache.get(key);
521
+ if (!tree) {
522
+ tree = createStaticNode("/");
523
+ parseSegments(caseSensitive, new Uint16Array(6), { from }, 1, tree, 0);
524
+ processedTree.singleCache.set(key, tree);
525
+ }
526
+ return findMatch(path, tree, fuzzy);
527
+ }
528
+ function findRouteMatch(path, processedTree, fuzzy = false) {
529
+ const key = fuzzy ? path : `nofuzz\0${path}`;
530
+ const cached = processedTree.matchCache.get(key);
531
+ if (cached !== void 0) return cached;
532
+ path ||= "/";
533
+ const result = findMatch(path, processedTree.segmentTree, fuzzy);
534
+ if (result) result.branch = buildRouteBranch(result.route);
535
+ processedTree.matchCache.set(key, result);
536
+ return result;
537
+ }
538
+ function trimPathRight$1(path) {
539
+ return path === "/" ? path : path.replace(/\/{1,}$/, "");
540
+ }
541
+ function processRouteTree(routeTree, caseSensitive = false, initRoute) {
542
+ const segmentTree = createStaticNode(routeTree.fullPath);
543
+ const data = new Uint16Array(6);
544
+ const routesById = {};
545
+ const routesByPath = {};
546
+ let index = 0;
547
+ parseSegments(caseSensitive, data, routeTree, 1, segmentTree, 0, (route) => {
548
+ initRoute?.(route, index);
549
+ invariant(!(route.id in routesById), `Duplicate routes found with id: ${String(route.id)}`);
550
+ routesById[route.id] = route;
551
+ if (index !== 0 && route.path) {
552
+ const trimmedFullPath = trimPathRight$1(route.fullPath);
553
+ if (!routesByPath[trimmedFullPath] || route.fullPath.endsWith("/")) routesByPath[trimmedFullPath] = route;
554
+ }
555
+ index++;
556
+ });
557
+ sortTreeNodes(segmentTree);
558
+ return {
559
+ processedTree: {
560
+ segmentTree,
561
+ singleCache: createLRUCache(1e3),
562
+ matchCache: createLRUCache(1e3),
563
+ flatCache: null,
564
+ masksTree: null
565
+ },
566
+ routesById,
567
+ routesByPath
568
+ };
569
+ }
570
+ function findMatch(path, segmentTree, fuzzy = false) {
571
+ const parts = path.split("/");
572
+ const leaf = getNodeMatch(path, parts, segmentTree, fuzzy);
573
+ if (!leaf) return null;
574
+ const params = extractParams(path, parts, leaf);
575
+ if ("**" in leaf) params["**"] = leaf["**"];
576
+ return {
577
+ route: leaf.node.route,
578
+ params
579
+ };
580
+ }
581
+ function extractParams(path, parts, leaf) {
582
+ const list = buildBranch(leaf.node);
583
+ let nodeParts = null;
584
+ const params = {};
585
+ for (let partIndex = 0, nodeIndex = 0, pathIndex = 0; nodeIndex < list.length; partIndex++, nodeIndex++, pathIndex++) {
586
+ const node = list[nodeIndex];
587
+ const part = parts[partIndex];
588
+ const currentPathIndex = pathIndex;
589
+ if (part) pathIndex += part.length;
590
+ if (node.kind === 1) {
591
+ nodeParts ??= leaf.node.fullPath.split("/");
592
+ const nodePart = nodeParts[nodeIndex];
593
+ const preLength = node.prefix?.length ?? 0;
594
+ if (nodePart.charCodeAt(preLength) === 123) {
595
+ const sufLength = node.suffix?.length ?? 0;
596
+ const name = nodePart.substring(preLength + 2, nodePart.length - sufLength - 1);
597
+ const value = part.substring(preLength, part.length - sufLength);
598
+ params[name] = decodeURIComponent(value);
599
+ } else {
600
+ const name = nodePart.substring(1);
601
+ params[name] = decodeURIComponent(part);
602
+ }
603
+ } else if (node.kind === 3) {
604
+ if (leaf.skipped & 1 << nodeIndex) {
605
+ partIndex--;
606
+ continue;
607
+ }
608
+ nodeParts ??= leaf.node.fullPath.split("/");
609
+ const nodePart = nodeParts[nodeIndex];
610
+ const preLength = node.prefix?.length ?? 0;
611
+ const sufLength = node.suffix?.length ?? 0;
612
+ const name = nodePart.substring(preLength + 3, nodePart.length - sufLength - 1);
613
+ const value = node.suffix || node.prefix ? part.substring(preLength, part.length - sufLength) : part;
614
+ if (value) params[name] = decodeURIComponent(value);
615
+ } else if (node.kind === 2) {
616
+ const n = node;
617
+ const value = path.substring(currentPathIndex + (n.prefix?.length ?? 0), path.length - (n.suffix?.length ?? 0));
618
+ const splat = decodeURIComponent(value);
619
+ params["*"] = splat;
620
+ params._splat = splat;
621
+ break;
622
+ }
623
+ }
624
+ return params;
625
+ }
626
+ function buildRouteBranch(route) {
627
+ const list = [route];
628
+ while (route.parentRoute) {
629
+ route = route.parentRoute;
630
+ list.push(route);
631
+ }
632
+ list.reverse();
633
+ return list;
634
+ }
635
+ function buildBranch(node) {
636
+ const list = Array(node.depth + 1);
637
+ do {
638
+ list[node.depth] = node;
639
+ node = node.parent;
640
+ } while (node);
641
+ return list;
642
+ }
643
+ function getNodeMatch(path, parts, segmentTree, fuzzy) {
644
+ if (path === "/" && segmentTree.index) return {
645
+ node: segmentTree.index,
646
+ skipped: 0
647
+ };
648
+ const trailingSlash = !last(parts);
649
+ const pathIsIndex = trailingSlash && path !== "/";
650
+ const partsLength = parts.length - (trailingSlash ? 1 : 0);
651
+ const stack = [{
652
+ node: segmentTree,
653
+ index: 1,
654
+ skipped: 0,
655
+ depth: 1,
656
+ statics: 1,
657
+ dynamics: 0,
658
+ optionals: 0
659
+ }];
660
+ let wildcardMatch = null;
661
+ let bestFuzzy = null;
662
+ let bestMatch = null;
663
+ while (stack.length) {
664
+ const frame = stack.pop();
665
+ let { node, index, skipped, depth, statics, dynamics, optionals } = frame;
666
+ if (fuzzy && node.route && node.kind !== SEGMENT_TYPE_INDEX && isFrameMoreSpecific(bestFuzzy, frame)) bestFuzzy = frame;
667
+ const isBeyondPath = index === partsLength;
668
+ if (isBeyondPath) {
669
+ if (node.route && !pathIsIndex && isFrameMoreSpecific(bestMatch, frame)) bestMatch = frame;
670
+ if (!node.optional && !node.wildcard && !node.index) continue;
671
+ }
672
+ const part = isBeyondPath ? void 0 : parts[index];
673
+ let lowerPart;
674
+ if (isBeyondPath && node.index) {
675
+ const indexFrame = {
676
+ node: node.index,
677
+ index,
678
+ skipped,
679
+ depth: depth + 1,
680
+ statics,
681
+ dynamics,
682
+ optionals
683
+ };
684
+ if (statics === partsLength && !dynamics && !optionals && !skipped) return indexFrame;
685
+ if (isFrameMoreSpecific(bestMatch, indexFrame)) bestMatch = indexFrame;
686
+ }
687
+ if (node.wildcard && isFrameMoreSpecific(wildcardMatch, frame)) for (const segment of node.wildcard) {
688
+ const { prefix, suffix } = segment;
689
+ if (prefix) {
690
+ if (isBeyondPath) continue;
691
+ if (!(segment.caseSensitive ? part : lowerPart ??= part.toLowerCase()).startsWith(prefix)) continue;
692
+ }
693
+ if (suffix) {
694
+ if (isBeyondPath) continue;
695
+ const end = parts.slice(index).join("/").slice(-suffix.length);
696
+ if ((segment.caseSensitive ? end : end.toLowerCase()) !== suffix) continue;
697
+ }
698
+ wildcardMatch = {
699
+ node: segment,
700
+ index: partsLength,
701
+ skipped,
702
+ depth,
703
+ statics,
704
+ dynamics,
705
+ optionals
706
+ };
707
+ break;
708
+ }
709
+ if (node.optional) {
710
+ const nextSkipped = skipped | 1 << depth;
711
+ const nextDepth = depth + 1;
712
+ for (let i = node.optional.length - 1; i >= 0; i--) {
713
+ const segment = node.optional[i];
714
+ stack.push({
715
+ node: segment,
716
+ index,
717
+ skipped: nextSkipped,
718
+ depth: nextDepth,
719
+ statics,
720
+ dynamics,
721
+ optionals
722
+ });
723
+ }
724
+ if (!isBeyondPath) for (let i = node.optional.length - 1; i >= 0; i--) {
725
+ const segment = node.optional[i];
726
+ const { prefix, suffix } = segment;
727
+ if (prefix || suffix) {
728
+ const casePart = segment.caseSensitive ? part : lowerPart ??= part.toLowerCase();
729
+ if (prefix && !casePart.startsWith(prefix)) continue;
730
+ if (suffix && !casePart.endsWith(suffix)) continue;
731
+ }
732
+ stack.push({
733
+ node: segment,
734
+ index: index + 1,
735
+ skipped,
736
+ depth: nextDepth,
737
+ statics,
738
+ dynamics,
739
+ optionals: optionals + 1
740
+ });
741
+ }
742
+ }
743
+ if (!isBeyondPath && node.dynamic && part) for (let i = node.dynamic.length - 1; i >= 0; i--) {
744
+ const segment = node.dynamic[i];
745
+ const { prefix, suffix } = segment;
746
+ if (prefix || suffix) {
747
+ const casePart = segment.caseSensitive ? part : lowerPart ??= part.toLowerCase();
748
+ if (prefix && !casePart.startsWith(prefix)) continue;
749
+ if (suffix && !casePart.endsWith(suffix)) continue;
750
+ }
751
+ stack.push({
752
+ node: segment,
753
+ index: index + 1,
754
+ skipped,
755
+ depth: depth + 1,
756
+ statics,
757
+ dynamics: dynamics + 1,
758
+ optionals
759
+ });
760
+ }
761
+ if (!isBeyondPath && node.staticInsensitive) {
762
+ const match = node.staticInsensitive.get(lowerPart ??= part.toLowerCase());
763
+ if (match) stack.push({
764
+ node: match,
765
+ index: index + 1,
766
+ skipped,
767
+ depth: depth + 1,
768
+ statics: statics + 1,
769
+ dynamics,
770
+ optionals
771
+ });
772
+ }
773
+ if (!isBeyondPath && node.static) {
774
+ const match = node.static.get(part);
775
+ if (match) stack.push({
776
+ node: match,
777
+ index: index + 1,
778
+ skipped,
779
+ depth: depth + 1,
780
+ statics: statics + 1,
781
+ dynamics,
782
+ optionals
783
+ });
784
+ }
785
+ }
786
+ if (bestMatch && wildcardMatch) return isFrameMoreSpecific(wildcardMatch, bestMatch) ? bestMatch : wildcardMatch;
787
+ if (bestMatch) return bestMatch;
788
+ if (wildcardMatch) return wildcardMatch;
789
+ if (fuzzy && bestFuzzy) {
790
+ let sliceIndex = bestFuzzy.index;
791
+ for (let i = 0; i < bestFuzzy.index; i++) sliceIndex += parts[i].length;
792
+ const splat = sliceIndex === path.length ? "/" : path.slice(sliceIndex);
793
+ return {
794
+ node: bestFuzzy.node,
795
+ skipped: bestFuzzy.skipped,
796
+ "**": decodeURIComponent(splat)
797
+ };
798
+ }
799
+ return null;
800
+ }
801
+ function isFrameMoreSpecific(prev, next) {
802
+ if (!prev) return true;
803
+ return next.statics > prev.statics || next.statics === prev.statics && (next.dynamics > prev.dynamics || next.dynamics === prev.dynamics && (next.optionals > prev.optionals || next.optionals === prev.optionals && ((next.node.kind === SEGMENT_TYPE_INDEX) > (prev.node.kind === SEGMENT_TYPE_INDEX) || next.node.kind === SEGMENT_TYPE_INDEX === (prev.node.kind === SEGMENT_TYPE_INDEX) && next.depth > prev.depth)));
804
+ }
805
+ //#endregion
806
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/path.js
807
+ function joinPaths(paths) {
808
+ return cleanPath(paths.filter((val) => {
809
+ return val !== void 0;
810
+ }).join("/"));
811
+ }
812
+ function cleanPath(path) {
813
+ return path.replace(/\/{2,}/g, "/");
814
+ }
815
+ function trimPathLeft(path) {
816
+ return path === "/" ? path : path.replace(/^\/{1,}/, "");
817
+ }
818
+ function trimPathRight(path) {
819
+ const len = path.length;
820
+ return len > 1 && path[len - 1] === "/" ? path.replace(/\/{1,}$/, "") : path;
821
+ }
822
+ function trimPath(path) {
823
+ return trimPathRight(trimPathLeft(path));
824
+ }
825
+ function removeTrailingSlash(value, basepath) {
826
+ if (value?.endsWith("/") && value !== "/" && value !== `${basepath}/`) return value.slice(0, -1);
827
+ return value;
828
+ }
829
+ function exactPathTest(pathName1, pathName2, basepath) {
830
+ return removeTrailingSlash(pathName1, basepath) === removeTrailingSlash(pathName2, basepath);
831
+ }
832
+ function resolvePath({ base, to, trailingSlash = "never", cache }) {
833
+ const isAbsolute = to.startsWith("/");
834
+ const isBase = !isAbsolute && to === ".";
835
+ let key;
836
+ if (cache) {
837
+ key = isAbsolute ? to : isBase ? base : base + "\0" + to;
838
+ const cached = cache.get(key);
839
+ if (cached) return cached;
840
+ }
841
+ let baseSegments;
842
+ if (isBase) baseSegments = base.split("/");
843
+ else if (isAbsolute) baseSegments = to.split("/");
844
+ else {
845
+ baseSegments = base.split("/");
846
+ while (baseSegments.length > 1 && last(baseSegments) === "") baseSegments.pop();
847
+ const toSegments = to.split("/");
848
+ for (let index = 0, length = toSegments.length; index < length; index++) {
849
+ const value = toSegments[index];
850
+ if (value === "") {
851
+ if (!index) baseSegments = [value];
852
+ else if (index === length - 1) baseSegments.push(value);
853
+ } else if (value === "..") baseSegments.pop();
854
+ else if (value === ".");
855
+ else baseSegments.push(value);
856
+ }
857
+ }
858
+ if (baseSegments.length > 1) {
859
+ if (last(baseSegments) === "") {
860
+ if (trailingSlash === "never") baseSegments.pop();
861
+ } else if (trailingSlash === "always") baseSegments.push("");
862
+ }
863
+ let segment;
864
+ let joined = "";
865
+ for (let i = 0; i < baseSegments.length; i++) {
866
+ if (i > 0) joined += "/";
867
+ const part = baseSegments[i];
868
+ if (!part) continue;
869
+ segment = parseSegment(part, 0, segment);
870
+ const kind = segment[0];
871
+ if (kind === 0) {
872
+ joined += part;
873
+ continue;
874
+ }
875
+ const end = segment[5];
876
+ const prefix = part.substring(0, segment[1]);
877
+ const suffix = part.substring(segment[4], end);
878
+ const value = part.substring(segment[2], segment[3]);
879
+ if (kind === 1) joined += prefix || suffix ? `${prefix}{$${value}}${suffix}` : `$${value}`;
880
+ else if (kind === 2) joined += prefix || suffix ? `${prefix}{$}${suffix}` : "$";
881
+ else joined += `${prefix}{-$${value}}${suffix}`;
882
+ }
883
+ joined = cleanPath(joined);
884
+ const result = joined || "/";
885
+ if (key && cache) cache.set(key, result);
886
+ return result;
887
+ }
888
+ function encodeParam(key, params, decodeCharMap) {
889
+ const value = params[key];
890
+ if (typeof value !== "string") return value;
891
+ if (key === "_splat") return encodeURI(value);
892
+ else return encodePathParam(value, decodeCharMap);
893
+ }
894
+ function interpolatePath({ path, params, decodeCharMap }) {
895
+ let isMissingParams = false;
896
+ const usedParams = {};
897
+ if (!path || path === "/") return {
898
+ interpolatedPath: "/",
899
+ usedParams,
900
+ isMissingParams
901
+ };
902
+ if (!path.includes("$")) return {
903
+ interpolatedPath: path,
904
+ usedParams,
905
+ isMissingParams
906
+ };
907
+ const length = path.length;
908
+ let cursor = 0;
909
+ let segment;
910
+ let joined = "";
911
+ while (cursor < length) {
912
+ const start = cursor;
913
+ segment = parseSegment(path, start, segment);
914
+ const end = segment[5];
915
+ cursor = end + 1;
916
+ if (start === end) continue;
917
+ const kind = segment[0];
918
+ if (kind === 0) {
919
+ joined += "/" + path.substring(start, end);
920
+ continue;
921
+ }
922
+ if (kind === 2) {
923
+ const splat = params._splat;
924
+ usedParams._splat = splat;
925
+ usedParams["*"] = splat;
926
+ const prefix = path.substring(start, segment[1]);
927
+ const suffix = path.substring(segment[4], end);
928
+ if (!splat) {
929
+ isMissingParams = true;
930
+ if (prefix || suffix) joined += "/" + prefix + suffix;
931
+ continue;
932
+ }
933
+ const value = encodeParam("_splat", params, decodeCharMap);
934
+ joined += "/" + prefix + value + suffix;
935
+ continue;
936
+ }
937
+ if (kind === 1) {
938
+ const key = path.substring(segment[2], segment[3]);
939
+ if (!isMissingParams && !(key in params)) isMissingParams = true;
940
+ usedParams[key] = params[key];
941
+ const prefix = path.substring(start, segment[1]);
942
+ const suffix = path.substring(segment[4], end);
943
+ const value = encodeParam(key, params, decodeCharMap) ?? "undefined";
944
+ joined += "/" + prefix + value + suffix;
945
+ continue;
946
+ }
947
+ if (kind === 3) {
948
+ const key = path.substring(segment[2], segment[3]);
949
+ const valueRaw = params[key];
950
+ if (valueRaw == null) continue;
951
+ usedParams[key] = valueRaw;
952
+ const prefix = path.substring(start, segment[1]);
953
+ const suffix = path.substring(segment[4], end);
954
+ const value = encodeParam(key, params, decodeCharMap) ?? "";
955
+ joined += "/" + prefix + value + suffix;
956
+ continue;
957
+ }
958
+ }
959
+ if (path.endsWith("/")) joined += "/";
960
+ return {
961
+ usedParams,
962
+ interpolatedPath: joined || "/",
963
+ isMissingParams
964
+ };
965
+ }
966
+ function encodePathParam(value, decodeCharMap) {
967
+ let encoded = encodeURIComponent(value);
968
+ if (decodeCharMap) for (const [encodedChar, char] of decodeCharMap) encoded = encoded.replaceAll(encodedChar, char);
969
+ return encoded;
970
+ }
971
+ //#endregion
972
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/not-found.js
973
+ function isNotFound(obj) {
974
+ return !!obj?.isNotFound;
975
+ }
976
+ //#endregion
977
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/root.js
978
+ var rootRouteId = "__root__";
979
+ //#endregion
980
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/link.js
981
+ var preloadWarning = "Error preloading route! ☝️";
982
+ //#endregion
983
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/route.js
984
+ var BaseRoute = class {
985
+ constructor(options) {
986
+ this.init = (opts) => {
987
+ this.originalIndex = opts.originalIndex;
988
+ const options2 = this.options;
989
+ const isRoot = !options2?.path && !options2?.id;
990
+ this.parentRoute = this.options.getParentRoute?.();
991
+ if (isRoot) this._path = rootRouteId;
992
+ else if (!this.parentRoute) invariant(false, `Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`);
993
+ let path = isRoot ? rootRouteId : options2?.path;
994
+ if (path && path !== "/") path = trimPathLeft(path);
995
+ const customId = options2?.id || path;
996
+ let id = isRoot ? rootRouteId : joinPaths([this.parentRoute.id === "__root__" ? "" : this.parentRoute.id, customId]);
997
+ if (path === "__root__") path = "/";
998
+ if (id !== "__root__") id = joinPaths(["/", id]);
999
+ const fullPath = id === "__root__" ? "/" : joinPaths([this.parentRoute.fullPath, path]);
1000
+ this._path = path;
1001
+ this._id = id;
1002
+ this._fullPath = fullPath;
1003
+ this._to = fullPath;
1004
+ };
1005
+ this.addChildren = (children) => {
1006
+ return this._addFileChildren(children);
1007
+ };
1008
+ this._addFileChildren = (children) => {
1009
+ if (Array.isArray(children)) this.children = children;
1010
+ if (typeof children === "object" && children !== null) this.children = Object.values(children);
1011
+ return this;
1012
+ };
1013
+ this._addFileTypes = () => {
1014
+ return this;
1015
+ };
1016
+ this.updateLoader = (options2) => {
1017
+ Object.assign(this.options, options2);
1018
+ return this;
1019
+ };
1020
+ this.update = (options2) => {
1021
+ Object.assign(this.options, options2);
1022
+ return this;
1023
+ };
1024
+ this.lazy = (lazyFn) => {
1025
+ this.lazyFn = lazyFn;
1026
+ return this;
1027
+ };
1028
+ this.options = options || {};
1029
+ this.isRoot = !options?.getParentRoute;
1030
+ if (options?.id && options?.path) throw new Error(`Route cannot have both an 'id' and a 'path' option.`);
1031
+ }
1032
+ get to() {
1033
+ return this._to;
1034
+ }
1035
+ get id() {
1036
+ return this._id;
1037
+ }
1038
+ get path() {
1039
+ return this._path;
1040
+ }
1041
+ get fullPath() {
1042
+ return this._fullPath;
1043
+ }
1044
+ };
1045
+ var BaseRootRoute = class extends BaseRoute {
1046
+ constructor(options) {
1047
+ super(options);
1048
+ }
1049
+ };
1050
+ //#endregion
1051
+ //#region ../../node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js
1052
+ var isProduction = process.env.NODE_ENV === "production";
1053
+ function warning(condition, message) {
1054
+ if (!isProduction) {
1055
+ if (condition) return;
1056
+ var text = "Warning: " + message;
1057
+ if (typeof console !== "undefined") console.warn(text);
1058
+ try {
1059
+ throw Error(text);
1060
+ } catch (x) {}
1061
+ }
1062
+ }
1063
+ //#endregion
1064
+ //#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
1065
+ /**
1066
+ * @license React
1067
+ * use-sync-external-store-shim.production.js
1068
+ *
1069
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1070
+ *
1071
+ * This source code is licensed under the MIT license found in the
1072
+ * LICENSE file in the root directory of this source tree.
1073
+ */
1074
+ var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJSMin(((exports) => {
1075
+ var React = require_react();
1076
+ function is(x, y) {
1077
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
1078
+ }
1079
+ var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
1080
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
1081
+ var value = getSnapshot(), _useState = useState({ inst: {
1082
+ value,
1083
+ getSnapshot
1084
+ } }), inst = _useState[0].inst, forceUpdate = _useState[1];
1085
+ useLayoutEffect(function() {
1086
+ inst.value = value;
1087
+ inst.getSnapshot = getSnapshot;
1088
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1089
+ }, [
1090
+ subscribe,
1091
+ value,
1092
+ getSnapshot
1093
+ ]);
1094
+ useEffect(function() {
1095
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1096
+ return subscribe(function() {
1097
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1098
+ });
1099
+ }, [subscribe]);
1100
+ useDebugValue(value);
1101
+ return value;
1102
+ }
1103
+ function checkIfSnapshotChanged(inst) {
1104
+ var latestGetSnapshot = inst.getSnapshot;
1105
+ inst = inst.value;
1106
+ try {
1107
+ var nextValue = latestGetSnapshot();
1108
+ return !objectIs(inst, nextValue);
1109
+ } catch (error) {
1110
+ return !0;
1111
+ }
1112
+ }
1113
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
1114
+ return getSnapshot();
1115
+ }
1116
+ var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
1117
+ exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
1118
+ }));
1119
+ //#endregion
1120
+ //#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
1121
+ /**
1122
+ * @license React
1123
+ * use-sync-external-store-shim.development.js
1124
+ *
1125
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1126
+ *
1127
+ * This source code is licensed under the MIT license found in the
1128
+ * LICENSE file in the root directory of this source tree.
1129
+ */
1130
+ var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJSMin(((exports) => {
1131
+ "production" !== process.env.NODE_ENV && (function() {
1132
+ function is(x, y) {
1133
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
1134
+ }
1135
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
1136
+ didWarnOld18Alpha || void 0 === React.startTransition || (didWarnOld18Alpha = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
1137
+ var value = getSnapshot();
1138
+ if (!didWarnUncachedGetSnapshot) {
1139
+ var cachedValue = getSnapshot();
1140
+ objectIs(value, cachedValue) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), didWarnUncachedGetSnapshot = !0);
1141
+ }
1142
+ cachedValue = useState({ inst: {
1143
+ value,
1144
+ getSnapshot
1145
+ } });
1146
+ var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
1147
+ useLayoutEffect(function() {
1148
+ inst.value = value;
1149
+ inst.getSnapshot = getSnapshot;
1150
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1151
+ }, [
1152
+ subscribe,
1153
+ value,
1154
+ getSnapshot
1155
+ ]);
1156
+ useEffect(function() {
1157
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1158
+ return subscribe(function() {
1159
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1160
+ });
1161
+ }, [subscribe]);
1162
+ useDebugValue(value);
1163
+ return value;
1164
+ }
1165
+ function checkIfSnapshotChanged(inst) {
1166
+ var latestGetSnapshot = inst.getSnapshot;
1167
+ inst = inst.value;
1168
+ try {
1169
+ var nextValue = latestGetSnapshot();
1170
+ return !objectIs(inst, nextValue);
1171
+ } catch (error) {
1172
+ return !0;
1173
+ }
1174
+ }
1175
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
1176
+ return getSnapshot();
1177
+ }
1178
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
1179
+ var React = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue, didWarnOld18Alpha = !1, didWarnUncachedGetSnapshot = !1, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
1180
+ exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
1181
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1182
+ })();
1183
+ }));
1184
+ //#endregion
1185
+ //#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/shim/index.js
1186
+ var require_shim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1187
+ if (process.env.NODE_ENV === "production") module.exports = require_use_sync_external_store_shim_production();
1188
+ else module.exports = require_use_sync_external_store_shim_development();
1189
+ }));
1190
+ //#endregion
1191
+ //#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
1192
+ /**
1193
+ * @license React
1194
+ * use-sync-external-store-shim/with-selector.production.js
1195
+ *
1196
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1197
+ *
1198
+ * This source code is licensed under the MIT license found in the
1199
+ * LICENSE file in the root directory of this source tree.
1200
+ */
1201
+ var require_with_selector_production = /* @__PURE__ */ __commonJSMin(((exports) => {
1202
+ var React = require_react(), shim = require_shim();
1203
+ function is(x, y) {
1204
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
1205
+ }
1206
+ var objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React.useRef, useEffect = React.useEffect, useMemo = React.useMemo, useDebugValue = React.useDebugValue;
1207
+ exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
1208
+ var instRef = useRef(null);
1209
+ if (null === instRef.current) {
1210
+ var inst = {
1211
+ hasValue: !1,
1212
+ value: null
1213
+ };
1214
+ instRef.current = inst;
1215
+ } else inst = instRef.current;
1216
+ instRef = useMemo(function() {
1217
+ function memoizedSelector(nextSnapshot) {
1218
+ if (!hasMemo) {
1219
+ hasMemo = !0;
1220
+ memoizedSnapshot = nextSnapshot;
1221
+ nextSnapshot = selector(nextSnapshot);
1222
+ if (void 0 !== isEqual && inst.hasValue) {
1223
+ var currentSelection = inst.value;
1224
+ if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
1225
+ }
1226
+ return memoizedSelection = nextSnapshot;
1227
+ }
1228
+ currentSelection = memoizedSelection;
1229
+ if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
1230
+ var nextSelection = selector(nextSnapshot);
1231
+ if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
1232
+ memoizedSnapshot = nextSnapshot;
1233
+ return memoizedSelection = nextSelection;
1234
+ }
1235
+ var hasMemo = !1, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
1236
+ return [function() {
1237
+ return memoizedSelector(getSnapshot());
1238
+ }, null === maybeGetServerSnapshot ? void 0 : function() {
1239
+ return memoizedSelector(maybeGetServerSnapshot());
1240
+ }];
1241
+ }, [
1242
+ getSnapshot,
1243
+ getServerSnapshot,
1244
+ selector,
1245
+ isEqual
1246
+ ]);
1247
+ var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
1248
+ useEffect(function() {
1249
+ inst.hasValue = !0;
1250
+ inst.value = value;
1251
+ }, [value]);
1252
+ useDebugValue(value);
1253
+ return value;
1254
+ };
1255
+ }));
1256
+ //#endregion
1257
+ //#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
1258
+ /**
1259
+ * @license React
1260
+ * use-sync-external-store-shim/with-selector.development.js
1261
+ *
1262
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1263
+ *
1264
+ * This source code is licensed under the MIT license found in the
1265
+ * LICENSE file in the root directory of this source tree.
1266
+ */
1267
+ var require_with_selector_development = /* @__PURE__ */ __commonJSMin(((exports) => {
1268
+ "production" !== process.env.NODE_ENV && (function() {
1269
+ function is(x, y) {
1270
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
1271
+ }
1272
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
1273
+ var React = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React.useRef, useEffect = React.useEffect, useMemo = React.useMemo, useDebugValue = React.useDebugValue;
1274
+ exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
1275
+ var instRef = useRef(null);
1276
+ if (null === instRef.current) {
1277
+ var inst = {
1278
+ hasValue: !1,
1279
+ value: null
1280
+ };
1281
+ instRef.current = inst;
1282
+ } else inst = instRef.current;
1283
+ instRef = useMemo(function() {
1284
+ function memoizedSelector(nextSnapshot) {
1285
+ if (!hasMemo) {
1286
+ hasMemo = !0;
1287
+ memoizedSnapshot = nextSnapshot;
1288
+ nextSnapshot = selector(nextSnapshot);
1289
+ if (void 0 !== isEqual && inst.hasValue) {
1290
+ var currentSelection = inst.value;
1291
+ if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
1292
+ }
1293
+ return memoizedSelection = nextSnapshot;
1294
+ }
1295
+ currentSelection = memoizedSelection;
1296
+ if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
1297
+ var nextSelection = selector(nextSnapshot);
1298
+ if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
1299
+ memoizedSnapshot = nextSnapshot;
1300
+ return memoizedSelection = nextSelection;
1301
+ }
1302
+ var hasMemo = !1, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
1303
+ return [function() {
1304
+ return memoizedSelector(getSnapshot());
1305
+ }, null === maybeGetServerSnapshot ? void 0 : function() {
1306
+ return memoizedSelector(maybeGetServerSnapshot());
1307
+ }];
1308
+ }, [
1309
+ getSnapshot,
1310
+ getServerSnapshot,
1311
+ selector,
1312
+ isEqual
1313
+ ]);
1314
+ var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
1315
+ useEffect(function() {
1316
+ inst.hasValue = !0;
1317
+ inst.value = value;
1318
+ }, [value]);
1319
+ useDebugValue(value);
1320
+ return value;
1321
+ };
1322
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1323
+ })();
1324
+ }));
1325
+ //#endregion
1326
+ //#region ../../node_modules/.pnpm/@tanstack+react-store@0.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-store/dist/esm/index.js
1327
+ var import_with_selector = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
1328
+ if (process.env.NODE_ENV === "production") module.exports = require_with_selector_production();
1329
+ else module.exports = require_with_selector_development();
1330
+ })))();
1331
+ function useStore(store, selector = (d) => d, options = {}) {
1332
+ const equal = options.equal ?? shallow;
1333
+ return (0, import_with_selector.useSyncExternalStoreWithSelector)(store.subscribe, () => store.state, () => store.state, selector, equal);
1334
+ }
1335
+ function shallow(objA, objB) {
1336
+ if (Object.is(objA, objB)) return true;
1337
+ if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) return false;
1338
+ if (objA instanceof Map && objB instanceof Map) {
1339
+ if (objA.size !== objB.size) return false;
1340
+ for (const [k, v] of objA) if (!objB.has(k) || !Object.is(v, objB.get(k))) return false;
1341
+ return true;
1342
+ }
1343
+ if (objA instanceof Set && objB instanceof Set) {
1344
+ if (objA.size !== objB.size) return false;
1345
+ for (const v of objA) if (!objB.has(v)) return false;
1346
+ return true;
1347
+ }
1348
+ if (objA instanceof Date && objB instanceof Date) {
1349
+ if (objA.getTime() !== objB.getTime()) return false;
1350
+ return true;
1351
+ }
1352
+ const keysA = getOwnKeys(objA);
1353
+ if (keysA.length !== getOwnKeys(objB).length) return false;
1354
+ for (let i = 0; i < keysA.length; i++) if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) return false;
1355
+ return true;
1356
+ }
1357
+ function getOwnKeys(obj) {
1358
+ return Object.keys(obj).concat(Object.getOwnPropertySymbols(obj));
1359
+ }
1360
+ //#endregion
1361
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/routerContext.js
1362
+ var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
1363
+ var routerContext = import_react.createContext(null);
1364
+ function getRouterContext() {
1365
+ if (typeof document === "undefined") return routerContext;
1366
+ if (window.__TSR_ROUTER_CONTEXT__) return window.__TSR_ROUTER_CONTEXT__;
1367
+ window.__TSR_ROUTER_CONTEXT__ = routerContext;
1368
+ return routerContext;
1369
+ }
1370
+ //#endregion
1371
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useRouter.js
1372
+ function useRouter(opts) {
1373
+ const value = import_react.useContext(getRouterContext());
1374
+ warning(!((opts?.warn ?? true) && !value), "useRouter must be used inside a <RouterProvider> component!");
1375
+ return value;
1376
+ }
1377
+ //#endregion
1378
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useRouterState.js
1379
+ function useRouterState(opts) {
1380
+ const contextRouter = useRouter({ warn: opts?.router === void 0 });
1381
+ const router = opts?.router || contextRouter;
1382
+ const previousResult = (0, import_react.useRef)(void 0);
1383
+ return useStore(router.__store, (state) => {
1384
+ if (opts?.select) {
1385
+ if (opts.structuralSharing ?? router.options.defaultStructuralSharing) {
1386
+ const newSlice = replaceEqualDeep(previousResult.current, opts.select(state));
1387
+ previousResult.current = newSlice;
1388
+ return newSlice;
1389
+ }
1390
+ return opts.select(state);
1391
+ }
1392
+ return state;
1393
+ });
1394
+ }
1395
+ //#endregion
1396
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/matchContext.js
1397
+ var matchContext = import_react.createContext(void 0);
1398
+ var dummyMatchContext = import_react.createContext(void 0);
1399
+ //#endregion
1400
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useMatch.js
1401
+ function useMatch(opts) {
1402
+ const nearestMatchId = import_react.useContext(opts.from ? dummyMatchContext : matchContext);
1403
+ return useRouterState({
1404
+ select: (state) => {
1405
+ const match = state.matches.find((d) => opts.from ? opts.from === d.routeId : d.id === nearestMatchId);
1406
+ invariant(!((opts.shouldThrow ?? true) && !match), `Could not find ${opts.from ? `an active match from "${opts.from}"` : "a nearest match!"}`);
1407
+ if (match === void 0) return;
1408
+ return opts.select ? opts.select(match) : match;
1409
+ },
1410
+ structuralSharing: opts.structuralSharing
1411
+ });
1412
+ }
1413
+ //#endregion
1414
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useLoaderData.js
1415
+ function useLoaderData(opts) {
1416
+ return useMatch({
1417
+ from: opts.from,
1418
+ strict: opts.strict,
1419
+ structuralSharing: opts.structuralSharing,
1420
+ select: (s) => {
1421
+ return opts.select ? opts.select(s.loaderData) : s.loaderData;
1422
+ }
1423
+ });
1424
+ }
1425
+ //#endregion
1426
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useLoaderDeps.js
1427
+ function useLoaderDeps(opts) {
1428
+ const { select, ...rest } = opts;
1429
+ return useMatch({
1430
+ ...rest,
1431
+ select: (s) => {
1432
+ return select ? select(s.loaderDeps) : s.loaderDeps;
1433
+ }
1434
+ });
1435
+ }
1436
+ //#endregion
1437
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useParams.js
1438
+ function useParams(opts) {
1439
+ return useMatch({
1440
+ from: opts.from,
1441
+ shouldThrow: opts.shouldThrow,
1442
+ structuralSharing: opts.structuralSharing,
1443
+ strict: opts.strict,
1444
+ select: (match) => {
1445
+ const params = opts.strict === false ? match.params : match._strictParams;
1446
+ return opts.select ? opts.select(params) : params;
1447
+ }
1448
+ });
1449
+ }
1450
+ //#endregion
1451
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useSearch.js
1452
+ function useSearch(opts) {
1453
+ return useMatch({
1454
+ from: opts.from,
1455
+ strict: opts.strict,
1456
+ shouldThrow: opts.shouldThrow,
1457
+ structuralSharing: opts.structuralSharing,
1458
+ select: (match) => {
1459
+ return opts.select ? opts.select(match.search) : match.search;
1460
+ }
1461
+ });
1462
+ }
1463
+ //#endregion
1464
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/utils.js
1465
+ var useLayoutEffect = typeof window !== "undefined" ? import_react.useLayoutEffect : import_react.useEffect;
1466
+ function usePrevious(value) {
1467
+ const ref = import_react.useRef({
1468
+ value,
1469
+ prev: null
1470
+ });
1471
+ const current = ref.current.value;
1472
+ if (value !== current) ref.current = {
1473
+ value,
1474
+ prev: current
1475
+ };
1476
+ return ref.current.prev;
1477
+ }
1478
+ function useIntersectionObserver(ref, callback, intersectionObserverOptions = {}, options = {}) {
1479
+ import_react.useEffect(() => {
1480
+ if (!ref.current || options.disabled || typeof IntersectionObserver !== "function") return;
1481
+ const observer = new IntersectionObserver(([entry]) => {
1482
+ callback(entry);
1483
+ }, intersectionObserverOptions);
1484
+ observer.observe(ref.current);
1485
+ return () => {
1486
+ observer.disconnect();
1487
+ };
1488
+ }, [
1489
+ callback,
1490
+ intersectionObserverOptions,
1491
+ options.disabled,
1492
+ ref
1493
+ ]);
1494
+ }
1495
+ function useForwardedRef(ref) {
1496
+ const innerRef = import_react.useRef(null);
1497
+ import_react.useImperativeHandle(ref, () => innerRef.current, []);
1498
+ return innerRef;
1499
+ }
1500
+ //#endregion
1501
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/useNavigate.js
1502
+ function useNavigate(_defaultOpts) {
1503
+ const router = useRouter();
1504
+ return import_react.useCallback((options) => {
1505
+ return router.navigate({
1506
+ ...options,
1507
+ from: options.from ?? _defaultOpts?.from
1508
+ });
1509
+ }, [_defaultOpts?.from, router]);
1510
+ }
1511
+ //#endregion
1512
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/link.js
1513
+ var import_jsx_runtime = require_jsx_runtime();
1514
+ var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1);
1515
+ function useLinkProps(options, forwardedRef) {
1516
+ const router = useRouter();
1517
+ const [isTransitioning, setIsTransitioning] = import_react.useState(false);
1518
+ const hasRenderFetched = import_react.useRef(false);
1519
+ const innerRef = useForwardedRef(forwardedRef);
1520
+ const { activeProps, inactiveProps, activeOptions, to, preload: userPreload, preloadDelay: userPreloadDelay, hashScrollIntoView, replace, startTransition, resetScroll, viewTransition, children, target, disabled, style, className, onClick, onFocus, onMouseEnter, onMouseLeave, onTouchStart, ignoreBlocker, params: _params, search: _search, hash: _hash, state: _state, mask: _mask, reloadDocument: _reloadDocument, unsafeRelative: _unsafeRelative, from: _from, _fromLocation, ...propsSafeToSpread } = options;
1521
+ const currentSearch = useRouterState({
1522
+ select: (s) => s.location.search,
1523
+ structuralSharing: true
1524
+ });
1525
+ const from = options.from;
1526
+ const _options = import_react.useMemo(() => {
1527
+ return {
1528
+ ...options,
1529
+ from
1530
+ };
1531
+ }, [
1532
+ router,
1533
+ currentSearch,
1534
+ from,
1535
+ options._fromLocation,
1536
+ options.hash,
1537
+ options.to,
1538
+ options.search,
1539
+ options.params,
1540
+ options.state,
1541
+ options.mask,
1542
+ options.unsafeRelative
1543
+ ]);
1544
+ const next = import_react.useMemo(() => router.buildLocation({ ..._options }), [router, _options]);
1545
+ const hrefOption = import_react.useMemo(() => {
1546
+ if (disabled) return;
1547
+ let href = next.maskedLocation ? next.maskedLocation.url.href : next.url.href;
1548
+ let external = false;
1549
+ if (router.origin) if (href.startsWith(router.origin)) href = router.history.createHref(href.replace(router.origin, "")) || "/";
1550
+ else external = true;
1551
+ return {
1552
+ href,
1553
+ external
1554
+ };
1555
+ }, [
1556
+ disabled,
1557
+ next.maskedLocation,
1558
+ next.url,
1559
+ router.origin,
1560
+ router.history
1561
+ ]);
1562
+ const externalLink = import_react.useMemo(() => {
1563
+ if (hrefOption?.external) return hrefOption.href;
1564
+ try {
1565
+ new URL(to);
1566
+ return to;
1567
+ } catch {}
1568
+ }, [to, hrefOption]);
1569
+ const preload = options.reloadDocument || externalLink ? false : userPreload ?? router.options.defaultPreload;
1570
+ const preloadDelay = userPreloadDelay ?? router.options.defaultPreloadDelay ?? 0;
1571
+ const isActive = useRouterState({ select: (s) => {
1572
+ if (externalLink) return false;
1573
+ if (activeOptions?.exact) {
1574
+ if (!exactPathTest(s.location.pathname, next.pathname, router.basepath)) return false;
1575
+ } else {
1576
+ const currentPathSplit = removeTrailingSlash(s.location.pathname, router.basepath);
1577
+ const nextPathSplit = removeTrailingSlash(next.pathname, router.basepath);
1578
+ if (!(currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === "/"))) return false;
1579
+ }
1580
+ if (activeOptions?.includeSearch ?? true) {
1581
+ if (!deepEqual(s.location.search, next.search, {
1582
+ partial: !activeOptions?.exact,
1583
+ ignoreUndefined: !activeOptions?.explicitUndefined
1584
+ })) return false;
1585
+ }
1586
+ if (activeOptions?.includeHash) return s.location.hash === next.hash;
1587
+ return true;
1588
+ } });
1589
+ const doPreload = import_react.useCallback(() => {
1590
+ router.preloadRoute({ ..._options }).catch((err) => {
1591
+ console.warn(err);
1592
+ console.warn(preloadWarning);
1593
+ });
1594
+ }, [router, _options]);
1595
+ useIntersectionObserver(innerRef, import_react.useCallback((entry) => {
1596
+ if (entry?.isIntersecting) doPreload();
1597
+ }, [doPreload]), intersectionObserverOptions, { disabled: !!disabled || !(preload === "viewport") });
1598
+ import_react.useEffect(() => {
1599
+ if (hasRenderFetched.current) return;
1600
+ if (!disabled && preload === "render") {
1601
+ doPreload();
1602
+ hasRenderFetched.current = true;
1603
+ }
1604
+ }, [
1605
+ disabled,
1606
+ doPreload,
1607
+ preload
1608
+ ]);
1609
+ const handleClick = (e) => {
1610
+ const elementTarget = e.currentTarget.getAttribute("target");
1611
+ const effectiveTarget = target !== void 0 ? target : elementTarget;
1612
+ if (!disabled && !isCtrlEvent(e) && !e.defaultPrevented && (!effectiveTarget || effectiveTarget === "_self") && e.button === 0) {
1613
+ e.preventDefault();
1614
+ (0, import_react_dom.flushSync)(() => {
1615
+ setIsTransitioning(true);
1616
+ });
1617
+ const unsub = router.subscribe("onResolved", () => {
1618
+ unsub();
1619
+ setIsTransitioning(false);
1620
+ });
1621
+ router.navigate({
1622
+ ..._options,
1623
+ replace,
1624
+ resetScroll,
1625
+ hashScrollIntoView,
1626
+ startTransition,
1627
+ viewTransition,
1628
+ ignoreBlocker
1629
+ });
1630
+ }
1631
+ };
1632
+ if (externalLink) return {
1633
+ ...propsSafeToSpread,
1634
+ ref: innerRef,
1635
+ href: externalLink,
1636
+ ...children && { children },
1637
+ ...target && { target },
1638
+ ...disabled && { disabled },
1639
+ ...style && { style },
1640
+ ...className && { className },
1641
+ ...onClick && { onClick },
1642
+ ...onFocus && { onFocus },
1643
+ ...onMouseEnter && { onMouseEnter },
1644
+ ...onMouseLeave && { onMouseLeave },
1645
+ ...onTouchStart && { onTouchStart }
1646
+ };
1647
+ const handleFocus = (_) => {
1648
+ if (disabled) return;
1649
+ if (preload) doPreload();
1650
+ };
1651
+ const handleTouchStart = handleFocus;
1652
+ const handleEnter = (e) => {
1653
+ if (disabled || !preload) return;
1654
+ if (!preloadDelay) doPreload();
1655
+ else {
1656
+ const eventTarget = e.target;
1657
+ if (timeoutMap.has(eventTarget)) return;
1658
+ const id = setTimeout(() => {
1659
+ timeoutMap.delete(eventTarget);
1660
+ doPreload();
1661
+ }, preloadDelay);
1662
+ timeoutMap.set(eventTarget, id);
1663
+ }
1664
+ };
1665
+ const handleLeave = (e) => {
1666
+ if (disabled || !preload || !preloadDelay) return;
1667
+ const eventTarget = e.target;
1668
+ const id = timeoutMap.get(eventTarget);
1669
+ if (id) {
1670
+ clearTimeout(id);
1671
+ timeoutMap.delete(eventTarget);
1672
+ }
1673
+ };
1674
+ const resolvedActiveProps = isActive ? functionalUpdate(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;
1675
+ const resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : functionalUpdate(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;
1676
+ const resolvedClassName = [
1677
+ className,
1678
+ resolvedActiveProps.className,
1679
+ resolvedInactiveProps.className
1680
+ ].filter(Boolean).join(" ");
1681
+ const resolvedStyle = (style || resolvedActiveProps.style || resolvedInactiveProps.style) && {
1682
+ ...style,
1683
+ ...resolvedActiveProps.style,
1684
+ ...resolvedInactiveProps.style
1685
+ };
1686
+ return {
1687
+ ...propsSafeToSpread,
1688
+ ...resolvedActiveProps,
1689
+ ...resolvedInactiveProps,
1690
+ href: hrefOption?.href,
1691
+ ref: innerRef,
1692
+ onClick: composeHandlers([onClick, handleClick]),
1693
+ onFocus: composeHandlers([onFocus, handleFocus]),
1694
+ onMouseEnter: composeHandlers([onMouseEnter, handleEnter]),
1695
+ onMouseLeave: composeHandlers([onMouseLeave, handleLeave]),
1696
+ onTouchStart: composeHandlers([onTouchStart, handleTouchStart]),
1697
+ disabled: !!disabled,
1698
+ target,
1699
+ ...resolvedStyle && { style: resolvedStyle },
1700
+ ...resolvedClassName && { className: resolvedClassName },
1701
+ ...disabled && STATIC_DISABLED_PROPS,
1702
+ ...isActive && STATIC_ACTIVE_PROPS,
1703
+ ...isTransitioning && STATIC_TRANSITIONING_PROPS
1704
+ };
1705
+ }
1706
+ var STATIC_EMPTY_OBJECT = {};
1707
+ var STATIC_ACTIVE_OBJECT = { className: "active" };
1708
+ var STATIC_DISABLED_PROPS = {
1709
+ role: "link",
1710
+ "aria-disabled": true
1711
+ };
1712
+ var STATIC_ACTIVE_PROPS = {
1713
+ "data-status": "active",
1714
+ "aria-current": "page"
1715
+ };
1716
+ var STATIC_TRANSITIONING_PROPS = { "data-transitioning": "transitioning" };
1717
+ var timeoutMap = /* @__PURE__ */ new WeakMap();
1718
+ var intersectionObserverOptions = { rootMargin: "100px" };
1719
+ var composeHandlers = (handlers) => (e) => {
1720
+ for (const handler of handlers) {
1721
+ if (!handler) continue;
1722
+ if (e.defaultPrevented) return;
1723
+ handler(e);
1724
+ }
1725
+ };
1726
+ var Link = import_react.forwardRef((props, ref) => {
1727
+ const { _asChild, ...rest } = props;
1728
+ const { type: _type, ref: innerRef, ...linkProps } = useLinkProps(rest, ref);
1729
+ const children = typeof rest.children === "function" ? rest.children({ isActive: linkProps["data-status"] === "active" }) : rest.children;
1730
+ if (_asChild === void 0) delete linkProps.disabled;
1731
+ return import_react.createElement(_asChild ? _asChild : "a", {
1732
+ ...linkProps,
1733
+ ref: innerRef
1734
+ }, children);
1735
+ });
1736
+ function isCtrlEvent(e) {
1737
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
1738
+ }
1739
+ //#endregion
1740
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/route.js
1741
+ var Route = class extends BaseRoute {
1742
+ /**
1743
+ * @deprecated Use the `createRoute` function instead.
1744
+ */
1745
+ constructor(options) {
1746
+ super(options);
1747
+ this.useMatch = (opts) => {
1748
+ return useMatch({
1749
+ select: opts?.select,
1750
+ from: this.id,
1751
+ structuralSharing: opts?.structuralSharing
1752
+ });
1753
+ };
1754
+ this.useRouteContext = (opts) => {
1755
+ return useMatch({
1756
+ ...opts,
1757
+ from: this.id,
1758
+ select: (d) => opts?.select ? opts.select(d.context) : d.context
1759
+ });
1760
+ };
1761
+ this.useSearch = (opts) => {
1762
+ return useSearch({
1763
+ select: opts?.select,
1764
+ structuralSharing: opts?.structuralSharing,
1765
+ from: this.id
1766
+ });
1767
+ };
1768
+ this.useParams = (opts) => {
1769
+ return useParams({
1770
+ select: opts?.select,
1771
+ structuralSharing: opts?.structuralSharing,
1772
+ from: this.id
1773
+ });
1774
+ };
1775
+ this.useLoaderDeps = (opts) => {
1776
+ return useLoaderDeps({
1777
+ ...opts,
1778
+ from: this.id
1779
+ });
1780
+ };
1781
+ this.useLoaderData = (opts) => {
1782
+ return useLoaderData({
1783
+ ...opts,
1784
+ from: this.id
1785
+ });
1786
+ };
1787
+ this.useNavigate = () => {
1788
+ return useNavigate({ from: this.fullPath });
1789
+ };
1790
+ this.Link = import_react.forwardRef((props, ref) => {
1791
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
1792
+ ref,
1793
+ from: this.fullPath,
1794
+ ...props
1795
+ });
1796
+ });
1797
+ this.$$typeof = Symbol.for("react.memo");
1798
+ }
1799
+ };
1800
+ function createRoute(options) {
1801
+ return new Route(options);
1802
+ }
1803
+ function createRootRouteWithContext() {
1804
+ return (options) => {
1805
+ return createRootRoute(options);
1806
+ };
1807
+ }
1808
+ var RootRoute = class extends BaseRootRoute {
1809
+ /**
1810
+ * @deprecated `RootRoute` is now an internal implementation detail. Use `createRootRoute()` instead.
1811
+ */
1812
+ constructor(options) {
1813
+ super(options);
1814
+ this.useMatch = (opts) => {
1815
+ return useMatch({
1816
+ select: opts?.select,
1817
+ from: this.id,
1818
+ structuralSharing: opts?.structuralSharing
1819
+ });
1820
+ };
1821
+ this.useRouteContext = (opts) => {
1822
+ return useMatch({
1823
+ ...opts,
1824
+ from: this.id,
1825
+ select: (d) => opts?.select ? opts.select(d.context) : d.context
1826
+ });
1827
+ };
1828
+ this.useSearch = (opts) => {
1829
+ return useSearch({
1830
+ select: opts?.select,
1831
+ structuralSharing: opts?.structuralSharing,
1832
+ from: this.id
1833
+ });
1834
+ };
1835
+ this.useParams = (opts) => {
1836
+ return useParams({
1837
+ select: opts?.select,
1838
+ structuralSharing: opts?.structuralSharing,
1839
+ from: this.id
1840
+ });
1841
+ };
1842
+ this.useLoaderDeps = (opts) => {
1843
+ return useLoaderDeps({
1844
+ ...opts,
1845
+ from: this.id
1846
+ });
1847
+ };
1848
+ this.useLoaderData = (opts) => {
1849
+ return useLoaderData({
1850
+ ...opts,
1851
+ from: this.id
1852
+ });
1853
+ };
1854
+ this.useNavigate = () => {
1855
+ return useNavigate({ from: this.fullPath });
1856
+ };
1857
+ this.Link = import_react.forwardRef((props, ref) => {
1858
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
1859
+ ref,
1860
+ from: this.fullPath,
1861
+ ...props
1862
+ });
1863
+ });
1864
+ this.$$typeof = Symbol.for("react.memo");
1865
+ }
1866
+ };
1867
+ function createRootRoute(options) {
1868
+ return new RootRoute(options);
1869
+ }
1870
+ //#endregion
1871
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/fileRoute.js
1872
+ function createFileRoute(path) {
1873
+ if (typeof path === "object") return new FileRoute(path, { silent: true }).createRoute(path);
1874
+ return new FileRoute(path, { silent: true }).createRoute;
1875
+ }
1876
+ var FileRoute = class {
1877
+ constructor(path, _opts) {
1878
+ this.path = path;
1879
+ this.createRoute = (options) => {
1880
+ warning(this.silent, "FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.");
1881
+ const route = createRoute(options);
1882
+ route.isRoot = false;
1883
+ return route;
1884
+ };
1885
+ this.silent = _opts?.silent;
1886
+ }
1887
+ };
1888
+ var LazyRoute = class {
1889
+ constructor(opts) {
1890
+ this.useMatch = (opts2) => {
1891
+ return useMatch({
1892
+ select: opts2?.select,
1893
+ from: this.options.id,
1894
+ structuralSharing: opts2?.structuralSharing
1895
+ });
1896
+ };
1897
+ this.useRouteContext = (opts2) => {
1898
+ return useMatch({
1899
+ from: this.options.id,
1900
+ select: (d) => opts2?.select ? opts2.select(d.context) : d.context
1901
+ });
1902
+ };
1903
+ this.useSearch = (opts2) => {
1904
+ return useSearch({
1905
+ select: opts2?.select,
1906
+ structuralSharing: opts2?.structuralSharing,
1907
+ from: this.options.id
1908
+ });
1909
+ };
1910
+ this.useParams = (opts2) => {
1911
+ return useParams({
1912
+ select: opts2?.select,
1913
+ structuralSharing: opts2?.structuralSharing,
1914
+ from: this.options.id
1915
+ });
1916
+ };
1917
+ this.useLoaderDeps = (opts2) => {
1918
+ return useLoaderDeps({
1919
+ ...opts2,
1920
+ from: this.options.id
1921
+ });
1922
+ };
1923
+ this.useLoaderData = (opts2) => {
1924
+ return useLoaderData({
1925
+ ...opts2,
1926
+ from: this.options.id
1927
+ });
1928
+ };
1929
+ this.useNavigate = () => {
1930
+ return useNavigate({ from: useRouter().routesById[this.options.id].fullPath });
1931
+ };
1932
+ this.options = opts;
1933
+ this.$$typeof = Symbol.for("react.memo");
1934
+ }
1935
+ };
1936
+ function createLazyFileRoute(id) {
1937
+ if (typeof id === "object") return new LazyRoute(id);
1938
+ return (opts) => new LazyRoute({
1939
+ id,
1940
+ ...opts
1941
+ });
1942
+ }
1943
+ //#endregion
1944
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.143.11_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-router/dist/esm/lazyRouteComponent.js
1945
+ function lazyRouteComponent(importer, exportName) {
1946
+ let loadPromise;
1947
+ let comp;
1948
+ let error;
1949
+ let reload;
1950
+ const load = () => {
1951
+ if (!loadPromise) loadPromise = importer().then((res) => {
1952
+ loadPromise = void 0;
1953
+ comp = res[exportName ?? "default"];
1954
+ }).catch((err) => {
1955
+ error = err;
1956
+ if (isModuleNotFoundError(error)) {
1957
+ if (error instanceof Error && typeof window !== "undefined" && typeof sessionStorage !== "undefined") {
1958
+ const storageKey = `tanstack_router_reload:${error.message}`;
1959
+ if (!sessionStorage.getItem(storageKey)) {
1960
+ sessionStorage.setItem(storageKey, "1");
1961
+ reload = true;
1962
+ }
1963
+ }
1964
+ }
1965
+ });
1966
+ return loadPromise;
1967
+ };
1968
+ const lazyComp = function Lazy(props) {
1969
+ if (reload) {
1970
+ window.location.reload();
1971
+ throw new Promise(() => {});
1972
+ }
1973
+ if (error) throw error;
1974
+ if (!comp) if (import_react.use) import_react.use(load());
1975
+ else throw load();
1976
+ return import_react.createElement(comp, props);
1977
+ };
1978
+ lazyComp.preload = load;
1979
+ return lazyComp;
1980
+ }
1981
+ //#endregion
1982
+ export { decodePath as A, findRouteMatch as C, createLRUCache as D, processRouteTree as E, last as F, replaceEqualDeep as I, findLast as M, functionalUpdate as N, invariant as O, isPromise as P, findFlatMatch as S, processRouteMasks as T, interpolatePath as _, Link as a, trimPath as b, usePrevious as c, useRouter as d, getRouterContext as f, cleanPath as g, isNotFound as h, createRootRouteWithContext as i, deepEqual as j, createControlledPromise as k, matchContext as l, rootRouteId as m, createFileRoute as n, useNavigate as o, warning as p, createLazyFileRoute as r, useLayoutEffect as s, lazyRouteComponent as t, useRouterState as u, joinPaths as v, findSingleMatch as w, trimPathRight as x, resolvePath as y };