likec4 1.57.0 → 1.58.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 (168) hide show
  1. package/__app__/codegen/react.mjs +7 -8
  2. package/__app__/codegen/webcomponent.mjs +70 -881
  3. package/__app__/src/aichat/index.mjs +8 -1
  4. package/__app__/src/chunks/AIChat.mjs +959 -0
  5. package/__app__/src/chunks/DiagramActorProvider.mjs +7638 -0
  6. package/__app__/src/chunks/LikeC4Styles.mjs +1866 -0
  7. package/__app__/src/chunks/Markdown.mjs +146 -0
  8. package/__app__/src/chunks/NavigationPanel.mjs +61 -0
  9. package/__app__/src/chunks/ProjectsOverview.mjs +540 -0
  10. package/__app__/src/chunks/adhoc-editor.mjs +3386 -0
  11. package/__app__/src/chunks/es.mjs +439 -0
  12. package/__app__/src/chunks/hooks.mjs +145 -0
  13. package/__app__/src/chunks/libs/@dagrejs/dagre.mjs +1894 -0
  14. package/__app__/src/chunks/libs/@floating-ui.mjs +2218 -0
  15. package/__app__/src/chunks/libs/@mantine.mjs +12070 -0
  16. package/__app__/src/chunks/libs/@tabler/icons-react.mjs +252 -0
  17. package/__app__/src/chunks/libs/@tanstack-ai.mjs +1768 -0
  18. package/__app__/src/chunks/libs/@tanstack.mjs +2718 -0
  19. package/__app__/src/chunks/libs/@xstate/react.mjs +1982 -0
  20. package/__app__/src/chunks/libs/@xyflow/react.mjs +5256 -0
  21. package/__app__/src/chunks/libs/bezier-js.mjs +1003 -0
  22. package/__app__/src/chunks/libs/d3.mjs +2842 -0
  23. package/__app__/src/chunks/libs/fast-equals.mjs +268 -0
  24. package/__app__/src/chunks/libs/framer.mjs +5872 -0
  25. package/__app__/src/chunks/libs/remeda.mjs +642 -0
  26. package/__app__/src/chunks/libs/zod.mjs +3170 -0
  27. package/__app__/src/chunks/rolldown-runtime.mjs +23 -0
  28. package/__app__/src/chunks/styled-system.mjs +1040 -0
  29. package/__app__/src/fonts.css +1 -1
  30. package/__app__/src/main.mjs +14816 -14
  31. package/__app__/src/style.css +1 -1
  32. package/dist/chunks/enableServer.mjs +1 -1
  33. package/dist/chunks/filenames.mjs +2 -2
  34. package/dist/chunks/index2.d.mts +1877 -734
  35. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
  36. package/dist/chunks/libs/@logtape/logtape.mjs +4 -3
  37. package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
  38. package/dist/chunks/libs/chevrotain.mjs +25 -25
  39. package/dist/chunks/libs/langium.mjs +1 -1
  40. package/dist/chunks/libs/merge-error-cause.mjs +1 -1
  41. package/dist/chunks/libs/pretty-ms.mjs +1 -1
  42. package/dist/chunks/libs/remeda.mjs +1 -1
  43. package/dist/chunks/libs/ufo.mjs +1 -1
  44. package/dist/chunks/libs/unstorage.mjs +1 -1
  45. package/dist/chunks/libs/which.mjs +1 -1
  46. package/dist/chunks/libs/zod.mjs +65 -0
  47. package/dist/chunks/node.mjs +73 -62
  48. package/dist/chunks/{plugin.mjs → vite-plugin.mjs} +41 -41
  49. package/dist/cli/index.mjs +184 -144
  50. package/dist/index.d.mts +1 -1
  51. package/dist/index.mjs +1 -1
  52. package/dist/model/index.d.mts +1 -1
  53. package/dist/vite-plugin/index.mjs +1 -1
  54. package/dist/vite-plugin/internal/index.d.mts +52 -57
  55. package/dist/vite-plugin/internal/index.mjs +946 -1
  56. package/package.json +46 -47
  57. package/react/index.d.mts +92 -23
  58. package/react/index.mjs +44551 -42605
  59. package/__app__/chunks/AIChat2.mjs +0 -2
  60. package/__app__/chunks/DiagramActorProvider.mjs +0 -10
  61. package/__app__/chunks/EmbedPage.mjs +0 -1
  62. package/__app__/chunks/ExportPage.mjs +0 -2
  63. package/__app__/chunks/LikeC4Diagram.mjs +0 -19
  64. package/__app__/chunks/LikeC4Styles.mjs +0 -48
  65. package/__app__/chunks/Markdown.mjs +0 -1
  66. package/__app__/chunks/NavigationPanel.mjs +0 -1
  67. package/__app__/chunks/ViewReact.mjs +0 -1
  68. package/__app__/chunks/adhoc-editor.mjs +0 -1
  69. package/__app__/chunks/aichat.mjs +0 -1
  70. package/__app__/chunks/box.mjs +0 -1
  71. package/__app__/chunks/create-style-context.mjs +0 -1
  72. package/__app__/chunks/css.mjs +0 -1
  73. package/__app__/chunks/factory.mjs +0 -1
  74. package/__app__/chunks/hooks.mjs +0 -1
  75. package/__app__/chunks/hstack.mjs +0 -1
  76. package/__app__/chunks/libs/@dagrejs/dagre.mjs +0 -1
  77. package/__app__/chunks/libs/@floating-ui/core.mjs +0 -1
  78. package/__app__/chunks/libs/@floating-ui/dom.mjs +0 -1
  79. package/__app__/chunks/libs/@floating-ui/react.mjs +0 -1
  80. package/__app__/chunks/libs/@mantine/core.mjs +0 -41
  81. package/__app__/chunks/libs/@mantine/hooks.mjs +0 -1
  82. package/__app__/chunks/libs/@nanostores/react.mjs +0 -1
  83. package/__app__/chunks/libs/@react-hookz/web.mjs +0 -1
  84. package/__app__/chunks/libs/@tabler/icons-react.mjs +0 -358
  85. package/__app__/chunks/libs/@tanstack/ai-client.mjs +0 -2
  86. package/__app__/chunks/libs/@tanstack/ai-react-ui.mjs +0 -1
  87. package/__app__/chunks/libs/@tanstack/ai-react.mjs +0 -1
  88. package/__app__/chunks/libs/@tanstack/ai.mjs +0 -2
  89. package/__app__/chunks/libs/@tanstack/history.mjs +0 -1
  90. package/__app__/chunks/libs/@tanstack/react-router.mjs +0 -3
  91. package/__app__/chunks/libs/@tanstack/router-core.mjs +0 -1
  92. package/__app__/chunks/libs/@xstate/react.mjs +0 -1
  93. package/__app__/chunks/libs/@xstate/store.mjs +0 -1
  94. package/__app__/chunks/libs/@xyflow/react.mjs +0 -7
  95. package/__app__/chunks/libs/@zag-js/anatomy.mjs +0 -1
  96. package/__app__/chunks/libs/@zag-js/collection.mjs +0 -1
  97. package/__app__/chunks/libs/@zag-js/core.mjs +0 -1
  98. package/__app__/chunks/libs/@zag-js/react.mjs +0 -1
  99. package/__app__/chunks/libs/@zag-js/tree-view.mjs +0 -1
  100. package/__app__/chunks/libs/bezier-js.mjs +0 -1
  101. package/__app__/chunks/libs/copy-anything.mjs +0 -1
  102. package/__app__/chunks/libs/d3-path.mjs +0 -1
  103. package/__app__/chunks/libs/d3-shape.mjs +0 -1
  104. package/__app__/chunks/libs/fast-equals.mjs +0 -1
  105. package/__app__/chunks/libs/framer-motion.mjs +0 -9
  106. package/__app__/chunks/libs/html-to-image.mjs +0 -2
  107. package/__app__/chunks/libs/motion-dom.mjs +0 -1
  108. package/__app__/chunks/libs/nanostores.mjs +0 -1
  109. package/__app__/chunks/libs/react-error-boundary.mjs +0 -1
  110. package/__app__/chunks/libs/react-resizable-panels.mjs +0 -1
  111. package/__app__/chunks/libs/remeda.mjs +0 -1
  112. package/__app__/chunks/libs/superjson.mjs +0 -1
  113. package/__app__/chunks/libs/zod.mjs +0 -64
  114. package/__app__/chunks/rolldown-runtime.mjs +0 -1
  115. package/__app__/chunks/styles.css.mjs +0 -1
  116. package/__app__/chunks/txt.mjs +0 -1
  117. package/__app__/chunks/useLikeC4Project.mjs +0 -1
  118. package/__app__/src/pages/AdHocViewEditor.mjs +0 -1
  119. package/__app__/src/pages/EmbedPage.mjs +0 -1
  120. package/__app__/src/pages/ExportPage.mjs +0 -1
  121. package/__app__/src/pages/ProjectsOverview.mjs +0 -1
  122. package/__app__/src/pages/ViewAsD2.mjs +0 -1
  123. package/__app__/src/pages/ViewAsDot.mjs +0 -1
  124. package/__app__/src/pages/ViewAsMmd.mjs +0 -1
  125. package/__app__/src/pages/ViewAsPuml.mjs +0 -1
  126. package/__app__/src/pages/ViewEditor.mjs +0 -1
  127. package/__app__/src/pages/ViewReact.mjs +0 -1
  128. package/dist/chunks/libs/@chevrotain/utils.mjs +0 -1
  129. package/dist/chunks/libs/@hono/mcp.mjs +0 -70
  130. package/dist/chunks/libs/@hono/node-server.mjs +0 -1
  131. package/dist/chunks/libs/@logtape/logtape.d.mts +0 -1023
  132. package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
  133. package/dist/chunks/libs/ajv.mjs +0 -1
  134. package/dist/chunks/libs/ansi-align.mjs +0 -2
  135. package/dist/chunks/libs/ansi-regex.mjs +0 -1
  136. package/dist/chunks/libs/ansi-styles.mjs +0 -1
  137. package/dist/chunks/libs/atomically.mjs +0 -1
  138. package/dist/chunks/libs/boxen.mjs +0 -22
  139. package/dist/chunks/libs/conf.mjs +0 -1
  140. package/dist/chunks/libs/defu.mjs +0 -1
  141. package/dist/chunks/libs/destr.mjs +0 -1
  142. package/dist/chunks/libs/find-up-simple.mjs +0 -1
  143. package/dist/chunks/libs/get-port.mjs +0 -1
  144. package/dist/chunks/libs/hono.mjs +0 -1
  145. package/dist/chunks/libs/is-docker.mjs +0 -1
  146. package/dist/chunks/libs/is-error-instance.mjs +0 -1
  147. package/dist/chunks/libs/is-inside-container.mjs +0 -1
  148. package/dist/chunks/libs/is-plain-obj.mjs +0 -1
  149. package/dist/chunks/libs/isexe.mjs +0 -1
  150. package/dist/chunks/libs/ky.mjs +0 -3
  151. package/dist/chunks/libs/p-debounce.mjs +0 -1
  152. package/dist/chunks/libs/p-limit.mjs +0 -1
  153. package/dist/chunks/libs/p-timeout.mjs +0 -1
  154. package/dist/chunks/libs/package-up.mjs +0 -1
  155. package/dist/chunks/libs/parse-ms.mjs +0 -1
  156. package/dist/chunks/libs/safe-stringify.mjs +0 -1
  157. package/dist/chunks/libs/strip-indent.mjs +0 -1
  158. package/dist/chunks/libs/tinyrainbow.mjs +0 -1
  159. package/dist/chunks/libs/ts-graphviz.mjs +0 -1
  160. package/dist/chunks/libs/unctx.mjs +0 -1
  161. package/dist/chunks/libs/vscode-languageserver.mjs +0 -1
  162. package/dist/chunks/libs/word-wrap.mjs +0 -12
  163. package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.mjs +0 -1
  164. package/dist/vite-plugin/internal/chunks/libs/birpc.mjs +0 -1
  165. package/dist/vite-plugin/internal/chunks/libs/fast-equals.mjs +0 -1
  166. package/dist/vite-plugin/internal/chunks/libs/nanostores.mjs +0 -1
  167. package/dist/vite-plugin/internal/chunks/libs/remeda.mjs +0 -1
  168. package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +0 -1
@@ -0,0 +1,2718 @@
1
+ import { t as e } from "../rolldown-runtime.mjs";
2
+ import * as t from "react";
3
+ import { useRef as n } from "react";
4
+ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ import { useSyncExternalStoreWithSelector as o } from "use-sync-external-store/shim/with-selector";
6
+ import { flushSync as s } from "react-dom";
7
+ //#region ../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js
8
+ var c = !0, l = "Invariant failed";
9
+ function invariant(e, t) {
10
+ if (!e) {
11
+ if (c) throw Error(l);
12
+ var n = typeof t == "function" ? t() : t, r = n ? `${l}: ${n}` : l;
13
+ throw Error(r);
14
+ }
15
+ }
16
+ //#endregion
17
+ //#region ../../node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js
18
+ var u = !0;
19
+ function warning(e, t) {
20
+ if (!u) {
21
+ if (e) return;
22
+ var n = "Warning: " + t;
23
+ typeof console < "u" && console.warn(n);
24
+ try {
25
+ throw Error(n);
26
+ } catch {}
27
+ }
28
+ }
29
+ //#endregion
30
+ //#region ../../node_modules/.pnpm/@tanstack+store@0.7.0/node_modules/@tanstack/store/dist/esm/scheduler.js
31
+ var d = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), p = { current: [] }, m = !1, h = 0, g = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Map();
32
+ function __flush_internals(e) {
33
+ let t = Array.from(e).sort((e, t) => e instanceof v && e.options.deps.includes(t) ? 1 : t instanceof v && t.options.deps.includes(e) ? -1 : 0);
34
+ for (let e of t) {
35
+ if (p.current.includes(e)) continue;
36
+ p.current.push(e), e.recompute();
37
+ let t = f.get(e);
38
+ if (t) for (let e of t) {
39
+ let t = d.get(e);
40
+ t && __flush_internals(t);
41
+ }
42
+ }
43
+ }
44
+ function __notifyListeners(e) {
45
+ e.listeners.forEach((t) => t({
46
+ prevVal: e.prevState,
47
+ currentVal: e.state
48
+ }));
49
+ }
50
+ function __notifyDerivedListeners(e) {
51
+ e.listeners.forEach((t) => t({
52
+ prevVal: e.prevState,
53
+ currentVal: e.state
54
+ }));
55
+ }
56
+ function __flush(e) {
57
+ if (h > 0 && !_.has(e) && _.set(e, e.prevState), g.add(e), !(h > 0) && !m) try {
58
+ for (m = !0; g.size > 0;) {
59
+ let e = Array.from(g);
60
+ g.clear();
61
+ for (let t of e) t.prevState = _.get(t) ?? t.prevState, __notifyListeners(t);
62
+ for (let t of e) {
63
+ let e = d.get(t);
64
+ e && (p.current.push(t), __flush_internals(e));
65
+ }
66
+ for (let t of e) {
67
+ let e = d.get(t);
68
+ if (e) for (let t of e) __notifyDerivedListeners(t);
69
+ }
70
+ }
71
+ } finally {
72
+ m = !1, p.current = [], _.clear();
73
+ }
74
+ }
75
+ function batch(e) {
76
+ h++;
77
+ try {
78
+ e();
79
+ } finally {
80
+ if (h--, h === 0) {
81
+ let e = Array.from(g)[0];
82
+ e && __flush(e);
83
+ }
84
+ }
85
+ }
86
+ //#endregion
87
+ //#region ../../node_modules/.pnpm/@tanstack+store@0.7.0/node_modules/@tanstack/store/dist/esm/store.js
88
+ var Store = class {
89
+ constructor(e, t) {
90
+ this.listeners = /* @__PURE__ */ new Set(), this.subscribe = (e) => {
91
+ var t;
92
+ this.listeners.add(e);
93
+ let n = ((t = this.options)?.onSubscribe)?.call(t, e, this);
94
+ return () => {
95
+ this.listeners.delete(e), n?.();
96
+ };
97
+ }, this.setState = (e) => {
98
+ var t, n;
99
+ this.prevState = this.state, this.state = this.options?.updateFn ? this.options.updateFn(this.prevState)(e) : e(this.prevState), (n = (t = this.options)?.onUpdate) == null || n.call(t), __flush(this);
100
+ }, this.prevState = e, this.state = e, this.options = t;
101
+ }
102
+ }, v = class Derived {
103
+ constructor(e) {
104
+ this.listeners = /* @__PURE__ */ new Set(), this._subscriptions = [], this.lastSeenDepValues = [], this.getDepVals = () => {
105
+ let e = [], t = [];
106
+ for (let n of this.options.deps) e.push(n.prevState), t.push(n.state);
107
+ return this.lastSeenDepValues = t, {
108
+ prevDepVals: e,
109
+ currDepVals: t,
110
+ prevVal: this.prevState ?? void 0
111
+ };
112
+ }, this.recompute = () => {
113
+ var e, t;
114
+ this.prevState = this.state;
115
+ let { prevDepVals: n, currDepVals: r, prevVal: i } = this.getDepVals();
116
+ this.state = this.options.fn({
117
+ prevDepVals: n,
118
+ currDepVals: r,
119
+ prevVal: i
120
+ }), (t = (e = this.options).onUpdate) == null || t.call(e);
121
+ }, this.checkIfRecalculationNeededDeeply = () => {
122
+ for (let e of this.options.deps) e instanceof Derived && e.checkIfRecalculationNeededDeeply();
123
+ let e = !1, t = this.lastSeenDepValues, { currDepVals: n } = this.getDepVals();
124
+ for (let r = 0; r < n.length; r++) if (n[r] !== t[r]) {
125
+ e = !0;
126
+ break;
127
+ }
128
+ e && this.recompute();
129
+ }, this.mount = () => (this.registerOnGraph(), this.checkIfRecalculationNeededDeeply(), () => {
130
+ this.unregisterFromGraph();
131
+ for (let e of this._subscriptions) e();
132
+ }), this.subscribe = (e) => {
133
+ var t;
134
+ this.listeners.add(e);
135
+ let n = (t = this.options).onSubscribe?.call(t, e, this);
136
+ return () => {
137
+ this.listeners.delete(e), n?.();
138
+ };
139
+ }, this.options = e, this.state = e.fn({
140
+ prevDepVals: void 0,
141
+ prevVal: void 0,
142
+ currDepVals: this.getDepVals().currDepVals
143
+ });
144
+ }
145
+ registerOnGraph(e = this.options.deps) {
146
+ for (let t of e) if (t instanceof Derived) t.registerOnGraph(), this.registerOnGraph(t.options.deps);
147
+ else if (t instanceof Store) {
148
+ let e = d.get(t);
149
+ e || (e = /* @__PURE__ */ new Set(), d.set(t, e)), e.add(this);
150
+ let n = f.get(this);
151
+ n || (n = /* @__PURE__ */ new Set(), f.set(this, n)), n.add(t);
152
+ }
153
+ }
154
+ unregisterFromGraph(e = this.options.deps) {
155
+ for (let t of e) if (t instanceof Derived) this.unregisterFromGraph(t.options.deps);
156
+ else if (t instanceof Store) {
157
+ let e = d.get(t);
158
+ e && e.delete(this);
159
+ let n = f.get(this);
160
+ n && n.delete(t);
161
+ }
162
+ }
163
+ }, y = "__TSR_index", b = "popstate", x = "beforeunload";
164
+ function createHistory(e) {
165
+ let t = e.getLocation(), n = /* @__PURE__ */ new Set(), notify = (r) => {
166
+ t = e.getLocation(), n.forEach((e) => e({
167
+ location: t,
168
+ action: r
169
+ }));
170
+ }, handleIndexChange = (n) => {
171
+ e.notifyOnIndexChange ?? !0 ? notify(n) : t = e.getLocation();
172
+ }, tryNavigation = async ({ task: n, navigateOpts: r, ...i }) => {
173
+ var a;
174
+ if (r?.ignoreBlocker ?? !1) {
175
+ n();
176
+ return;
177
+ }
178
+ let o = e.getBlockers?.call(e) ?? [], s = i.type === "PUSH" || i.type === "REPLACE";
179
+ if (typeof document < "u" && o.length && s) for (let n of o) {
180
+ let r = parseHref(i.path, i.state);
181
+ if (await n.blockerFn({
182
+ currentLocation: t,
183
+ nextLocation: r,
184
+ action: i.type
185
+ })) {
186
+ (a = e.onBlocked) == null || a.call(e);
187
+ return;
188
+ }
189
+ }
190
+ n();
191
+ };
192
+ return {
193
+ get location() {
194
+ return t;
195
+ },
196
+ get length() {
197
+ return e.getLength();
198
+ },
199
+ subscribers: n,
200
+ subscribe: (e) => (n.add(e), () => {
201
+ n.delete(e);
202
+ }),
203
+ push: (n, r, i) => {
204
+ let a = t.state[y];
205
+ r = assignKeyAndIndex(a + 1, r), tryNavigation({
206
+ task: () => {
207
+ e.pushState(n, r), notify({ type: "PUSH" });
208
+ },
209
+ navigateOpts: i,
210
+ type: "PUSH",
211
+ path: n,
212
+ state: r
213
+ });
214
+ },
215
+ replace: (n, r, i) => {
216
+ let a = t.state[y];
217
+ r = assignKeyAndIndex(a, r), tryNavigation({
218
+ task: () => {
219
+ e.replaceState(n, r), notify({ type: "REPLACE" });
220
+ },
221
+ navigateOpts: i,
222
+ type: "REPLACE",
223
+ path: n,
224
+ state: r
225
+ });
226
+ },
227
+ go: (t, n) => {
228
+ tryNavigation({
229
+ task: () => {
230
+ e.go(t), handleIndexChange({
231
+ type: "GO",
232
+ index: t
233
+ });
234
+ },
235
+ navigateOpts: n,
236
+ type: "GO"
237
+ });
238
+ },
239
+ back: (t) => {
240
+ tryNavigation({
241
+ task: () => {
242
+ e.back(t?.ignoreBlocker ?? !1), handleIndexChange({ type: "BACK" });
243
+ },
244
+ navigateOpts: t,
245
+ type: "BACK"
246
+ });
247
+ },
248
+ forward: (t) => {
249
+ tryNavigation({
250
+ task: () => {
251
+ e.forward(t?.ignoreBlocker ?? !1), handleIndexChange({ type: "FORWARD" });
252
+ },
253
+ navigateOpts: t,
254
+ type: "FORWARD"
255
+ });
256
+ },
257
+ canGoBack: () => t.state[y] !== 0,
258
+ createHref: (t) => e.createHref(t),
259
+ block: (t) => {
260
+ if (!e.setBlockers) return () => {};
261
+ let n = e.getBlockers?.call(e) ?? [];
262
+ return e.setBlockers([...n, t]), () => {
263
+ var n;
264
+ let r = e.getBlockers?.call(e) ?? [];
265
+ (n = e.setBlockers) == null || n.call(e, r.filter((e) => e !== t));
266
+ };
267
+ },
268
+ flush: () => e.flush?.call(e),
269
+ destroy: () => e.destroy?.call(e),
270
+ notify
271
+ };
272
+ }
273
+ function assignKeyAndIndex(e, t) {
274
+ return t ||= {}, {
275
+ ...t,
276
+ key: createRandomKey(),
277
+ [y]: e
278
+ };
279
+ }
280
+ function createBrowserHistory(e) {
281
+ let t = e?.window ?? (typeof document < "u" ? window : void 0), n = t.history.pushState, r = t.history.replaceState, i = [], _getBlockers = () => i, _setBlockers = (e) => i = e, a = e?.createHref ?? ((e) => e), o = e?.parseLocation ?? (() => parseHref(`${t.location.pathname}${t.location.search}${t.location.hash}`, t.history.state));
282
+ t.history.state?.key || t.history.replaceState({
283
+ [y]: 0,
284
+ key: createRandomKey()
285
+ }, "");
286
+ let s = o(), c, l = !1, u = !1, d = !1, f = !1, getLocation = () => s, p, m, flush = () => {
287
+ p && (h._ignoreSubscribers = !0, (p.isPush ? t.history.pushState : t.history.replaceState)(p.state, "", p.href), h._ignoreSubscribers = !1, p = void 0, m = void 0, c = void 0);
288
+ }, queueHistoryAction = (e, t, n) => {
289
+ let r = a(t);
290
+ m || (c = s), s = parseHref(t, n), p = {
291
+ href: r,
292
+ state: n,
293
+ isPush: p?.isPush || e === "push"
294
+ }, m ||= Promise.resolve().then(() => flush());
295
+ }, onPushPop = (e) => {
296
+ s = o(), h.notify({ type: e });
297
+ }, onPushPopEvent = async () => {
298
+ if (u) {
299
+ u = !1;
300
+ return;
301
+ }
302
+ let e = o(), n = e.state[y] - s.state[y], r = n === 1, i = n === -1, a = !r && !i || l;
303
+ l = !1;
304
+ let c = a ? "GO" : i ? "BACK" : "FORWARD", f = a ? {
305
+ type: "GO",
306
+ index: n
307
+ } : { type: i ? "BACK" : "FORWARD" };
308
+ if (d) d = !1;
309
+ else {
310
+ let n = _getBlockers();
311
+ if (typeof document < "u" && n.length) {
312
+ for (let r of n) if (await r.blockerFn({
313
+ currentLocation: s,
314
+ nextLocation: e,
315
+ action: c
316
+ })) {
317
+ u = !0, t.history.go(1), h.notify(f);
318
+ return;
319
+ }
320
+ }
321
+ }
322
+ s = o(), h.notify(f);
323
+ }, onBeforeUnload = (e) => {
324
+ if (f) {
325
+ f = !1;
326
+ return;
327
+ }
328
+ let t = !1, n = _getBlockers();
329
+ if (typeof document < "u" && n.length) for (let e of n) {
330
+ let n = e.enableBeforeUnload ?? !0;
331
+ if (n === !0) {
332
+ t = !0;
333
+ break;
334
+ }
335
+ if (typeof n == "function" && n() === !0) {
336
+ t = !0;
337
+ break;
338
+ }
339
+ }
340
+ if (t) return e.preventDefault(), e.returnValue = "";
341
+ }, h = createHistory({
342
+ getLocation,
343
+ getLength: () => t.history.length,
344
+ pushState: (e, t) => queueHistoryAction("push", e, t),
345
+ replaceState: (e, t) => queueHistoryAction("replace", e, t),
346
+ back: (e) => (e && (d = !0), f = !0, t.history.back()),
347
+ forward: (e) => {
348
+ e && (d = !0), f = !0, t.history.forward();
349
+ },
350
+ go: (e) => {
351
+ l = !0, t.history.go(e);
352
+ },
353
+ createHref: (e) => a(e),
354
+ flush,
355
+ destroy: () => {
356
+ t.history.pushState = n, t.history.replaceState = r, t.removeEventListener(x, onBeforeUnload, { capture: !0 }), t.removeEventListener(b, onPushPopEvent);
357
+ },
358
+ onBlocked: () => {
359
+ c && s !== c && (s = c);
360
+ },
361
+ getBlockers: _getBlockers,
362
+ setBlockers: _setBlockers,
363
+ notifyOnIndexChange: !1
364
+ });
365
+ return t.addEventListener(x, onBeforeUnload, { capture: !0 }), t.addEventListener(b, onPushPopEvent), t.history.pushState = function(...e) {
366
+ let r = n.apply(t.history, e);
367
+ return h._ignoreSubscribers || onPushPop("PUSH"), r;
368
+ }, t.history.replaceState = function(...e) {
369
+ let n = r.apply(t.history, e);
370
+ return h._ignoreSubscribers || onPushPop("REPLACE"), n;
371
+ }, h;
372
+ }
373
+ function createHashHistory(e) {
374
+ let t = e?.window ?? (typeof document < "u" ? window : void 0);
375
+ return createBrowserHistory({
376
+ window: t,
377
+ parseLocation: () => {
378
+ let e = t.location.hash.split("#").slice(1), n = e[0] ?? "/", r = t.location.search, i = e.slice(1);
379
+ return parseHref(`${n}${r}${i.length === 0 ? "" : `#${i.join("#")}`}`, t.history.state);
380
+ },
381
+ createHref: (e) => `${t.location.pathname}${t.location.search}#${e}`
382
+ });
383
+ }
384
+ function createMemoryHistory(e = { initialEntries: ["/"] }) {
385
+ let t = e.initialEntries, n = e.initialIndex ? Math.min(Math.max(e.initialIndex, 0), t.length - 1) : t.length - 1, r = t.map((e, t) => assignKeyAndIndex(t, void 0)), getLocation = () => parseHref(t[n], r[n]);
386
+ return createHistory({
387
+ getLocation,
388
+ getLength: () => t.length,
389
+ pushState: (e, i) => {
390
+ n < t.length - 1 && (t.splice(n + 1), r.splice(n + 1)), r.push(i), t.push(e), n = Math.max(t.length - 1, 0);
391
+ },
392
+ replaceState: (e, i) => {
393
+ r[n] = i, t[n] = e;
394
+ },
395
+ back: () => {
396
+ n = Math.max(n - 1, 0);
397
+ },
398
+ forward: () => {
399
+ n = Math.min(n + 1, t.length - 1);
400
+ },
401
+ go: (e) => {
402
+ n = Math.min(Math.max(n + e, 0), t.length - 1);
403
+ },
404
+ createHref: (e) => e
405
+ });
406
+ }
407
+ function parseHref(e, t) {
408
+ let n = e.indexOf("#"), r = e.indexOf("?");
409
+ return {
410
+ href: e,
411
+ pathname: e.substring(0, n > 0 ? r > 0 ? Math.min(n, r) : n : r > 0 ? r : e.length),
412
+ hash: n > -1 ? e.substring(n) : "",
413
+ search: r > -1 ? e.slice(r, n === -1 ? void 0 : n) : "",
414
+ state: t || {
415
+ [y]: 0,
416
+ key: createRandomKey()
417
+ }
418
+ };
419
+ }
420
+ function createRandomKey() {
421
+ return (Math.random() + 1).toString(36).substring(7);
422
+ }
423
+ //#endregion
424
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/utils.js
425
+ function last(e) {
426
+ return e[e.length - 1];
427
+ }
428
+ function isFunction(e) {
429
+ return typeof e == "function";
430
+ }
431
+ function functionalUpdate(e, t) {
432
+ return isFunction(e) ? e(t) : e;
433
+ }
434
+ function pick(e, t) {
435
+ return t.reduce((t, n) => (t[n] = e[n], t), {});
436
+ }
437
+ function replaceEqualDeep(e, t) {
438
+ if (e === t) return e;
439
+ let n = t, r = isPlainArray(e) && isPlainArray(n);
440
+ if (r || isPlainObject(e) && isPlainObject(n)) {
441
+ let t = r ? e : Object.keys(e), i = t.length, a = r ? n : Object.keys(n), o = a.length, s = r ? [] : {}, c = 0;
442
+ for (let i = 0; i < o; i++) {
443
+ let o = r ? i : a[i];
444
+ (!r && t.includes(o) || r) && e[o] === void 0 && n[o] === void 0 ? (s[o] = void 0, c++) : (s[o] = replaceEqualDeep(e[o], n[o]), s[o] === e[o] && e[o] !== void 0 && c++);
445
+ }
446
+ return i === o && c === i ? e : s;
447
+ }
448
+ return n;
449
+ }
450
+ function isPlainObject(e) {
451
+ if (!hasObjectPrototype(e)) return !1;
452
+ let t = e.constructor;
453
+ if (t === void 0) return !0;
454
+ let n = t.prototype;
455
+ return !(!hasObjectPrototype(n) || !n.hasOwnProperty("isPrototypeOf"));
456
+ }
457
+ function hasObjectPrototype(e) {
458
+ return Object.prototype.toString.call(e) === "[object Object]";
459
+ }
460
+ function isPlainArray(e) {
461
+ return Array.isArray(e) && e.length === Object.keys(e).length;
462
+ }
463
+ function getObjectKeys(e, t) {
464
+ let n = Object.keys(e);
465
+ return t && (n = n.filter((t) => e[t] !== void 0)), n;
466
+ }
467
+ function deepEqual(e, t, n) {
468
+ if (e === t) return !0;
469
+ if (typeof e != typeof t) return !1;
470
+ if (isPlainObject(e) && isPlainObject(t)) {
471
+ let r = n?.ignoreUndefined ?? !0, i = getObjectKeys(e, r), a = getObjectKeys(t, r);
472
+ return !n?.partial && i.length !== a.length ? !1 : a.every((r) => deepEqual(e[r], t[r], n));
473
+ }
474
+ return Array.isArray(e) && Array.isArray(t) && e.length === t.length ? !e.some((e, r) => !deepEqual(e, t[r], n)) : !1;
475
+ }
476
+ function createControlledPromise(e) {
477
+ let t, n, r = new Promise((e, r) => {
478
+ t = e, n = r;
479
+ });
480
+ return r.status = "pending", r.resolve = (n) => {
481
+ r.status = "resolved", r.value = n, t(n), e?.(n);
482
+ }, r.reject = (e) => {
483
+ r.status = "rejected", n(e);
484
+ }, r;
485
+ }
486
+ function hasUriEncodedChars(e) {
487
+ return /%[0-9A-Fa-f]{2}/.test(e);
488
+ }
489
+ //#endregion
490
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/path.js
491
+ function joinPaths(e) {
492
+ return cleanPath(e.filter((e) => e !== void 0).join("/"));
493
+ }
494
+ function cleanPath(e) {
495
+ return e.replace(/\/{2,}/g, "/");
496
+ }
497
+ function trimPathLeft(e) {
498
+ return e === "/" ? e : e.replace(/^\/{1,}/, "");
499
+ }
500
+ function trimPathRight(e) {
501
+ return e === "/" ? e : e.replace(/\/{1,}$/, "");
502
+ }
503
+ function trimPath(e) {
504
+ return trimPathRight(trimPathLeft(e));
505
+ }
506
+ function removeTrailingSlash(e, t) {
507
+ return e?.endsWith("/") && e !== "/" && e !== `${t}/` ? e.slice(0, -1) : e;
508
+ }
509
+ function exactPathTest(e, t, n) {
510
+ return removeTrailingSlash(e, n) === removeTrailingSlash(t, n);
511
+ }
512
+ function resolvePath({ basepath: e, base: t, to: n, trailingSlash: r = "never", caseSensitive: i }) {
513
+ t = removeBasepath(e, t, i), n = removeBasepath(e, n, i);
514
+ let a = parsePathname(t), o = parsePathname(n);
515
+ return a.length > 1 && last(a)?.value === "/" && a.pop(), o.forEach((e, t) => {
516
+ e.value === "/" ? t ? t === o.length - 1 && a.push(e) : a = [e] : e.value === ".." ? a.pop() : e.value === "." || a.push(e);
517
+ }), a.length > 1 && (last(a)?.value === "/" ? r === "never" && a.pop() : r === "always" && a.push({
518
+ type: "pathname",
519
+ value: "/"
520
+ })), cleanPath(joinPaths([e, ...a.map((e) => e.value)]));
521
+ }
522
+ function parsePathname(e) {
523
+ if (!e) return [];
524
+ e = cleanPath(e);
525
+ let t = [];
526
+ if (e.slice(0, 1) === "/" && (e = e.substring(1), t.push({
527
+ type: "pathname",
528
+ value: "/"
529
+ })), !e) return t;
530
+ let n = e.split("/").filter(Boolean);
531
+ return t.push(...n.map((e) => e === "$" || e === "*" ? {
532
+ type: "wildcard",
533
+ value: e
534
+ } : e.charAt(0) === "$" ? {
535
+ type: "param",
536
+ value: e
537
+ } : {
538
+ type: "pathname",
539
+ value: e.includes("%25") ? e.split("%25").map((e) => decodeURI(e)).join("%25") : decodeURI(e)
540
+ })), e.slice(-1) === "/" && (e = e.substring(1), t.push({
541
+ type: "pathname",
542
+ value: "/"
543
+ })), t;
544
+ }
545
+ function interpolatePath({ path: e, params: t, leaveWildcards: n, leaveParams: r, decodeCharMap: i }) {
546
+ let a = parsePathname(e);
547
+ function encodeParam(e) {
548
+ let n = t[e], r = typeof n == "string";
549
+ return ["*", "_splat"].includes(e) ? r ? encodeURI(n) : n : r ? encodePathParam(n, i) : n;
550
+ }
551
+ let o = {};
552
+ return {
553
+ usedParams: o,
554
+ interpolatedPath: joinPaths(a.map((e) => {
555
+ if (e.type === "wildcard") {
556
+ o._splat = t._splat;
557
+ let r = encodeParam("_splat");
558
+ return n ? `${e.value}${r ?? ""}` : r;
559
+ }
560
+ if (e.type === "param") {
561
+ let n = e.value.substring(1);
562
+ if (o[n] = t[n], r) {
563
+ let t = encodeParam(e.value);
564
+ return `${e.value}${t ?? ""}`;
565
+ }
566
+ return encodeParam(n) ?? "undefined";
567
+ }
568
+ return e.value;
569
+ }))
570
+ };
571
+ }
572
+ function encodePathParam(e, t) {
573
+ let n = encodeURIComponent(e);
574
+ if (t) for (let [e, r] of t) n = n.replaceAll(e, r);
575
+ return n;
576
+ }
577
+ function matchPathname(e, t, n) {
578
+ let r = matchByPath(e, t, n);
579
+ if (!(n.to && !r)) return r ?? {};
580
+ }
581
+ function removeBasepath(e, t, n = !1) {
582
+ let r = n ? e : e.toLowerCase(), i = n ? t : t.toLowerCase();
583
+ switch (!0) {
584
+ case r === "/": return t;
585
+ case i === r: return "";
586
+ case t.length < e.length: return t;
587
+ case i[r.length] !== "/": return t;
588
+ case i.startsWith(r): return t.slice(e.length);
589
+ default: return t;
590
+ }
591
+ }
592
+ function matchByPath(e, t, n) {
593
+ if (e !== "/" && !t.startsWith(e)) return;
594
+ t = removeBasepath(e, t, n.caseSensitive);
595
+ let r = removeBasepath(e, `${n.to ?? "$"}`, n.caseSensitive), i = parsePathname(t), a = parsePathname(r);
596
+ t.startsWith("/") || i.unshift({
597
+ type: "pathname",
598
+ value: "/"
599
+ }), r.startsWith("/") || a.unshift({
600
+ type: "pathname",
601
+ value: "/"
602
+ });
603
+ let o = {};
604
+ return (() => {
605
+ for (let e = 0; e < Math.max(i.length, a.length); e++) {
606
+ let t = i[e], r = a[e], s = e >= i.length - 1, c = e >= a.length - 1;
607
+ if (r) {
608
+ if (r.type === "wildcard") {
609
+ let t = decodeURI(joinPaths(i.slice(e).map((e) => e.value)));
610
+ return o["*"] = t, o._splat = t, !0;
611
+ }
612
+ if (r.type === "pathname") {
613
+ if (r.value === "/" && !t?.value) return !0;
614
+ if (t) {
615
+ if (n.caseSensitive) {
616
+ if (r.value !== t.value) return !1;
617
+ } else if (r.value.toLowerCase() !== t.value.toLowerCase()) return !1;
618
+ }
619
+ }
620
+ if (!t) return !1;
621
+ if (r.type === "param") {
622
+ if (t.value === "/") return !1;
623
+ t.value.charAt(0) !== "$" && (o[r.value.substring(1)] = decodeURIComponent(t.value));
624
+ }
625
+ }
626
+ if (!s && c) return o["**"] = joinPaths(i.slice(e + 1).map((e) => e.value)), !!n.fuzzy && r?.value !== "/";
627
+ }
628
+ return !0;
629
+ })() ? o : void 0;
630
+ }
631
+ //#endregion
632
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/not-found.js
633
+ function notFound(e = {}) {
634
+ if (e.isNotFound = !0, e.throw) throw e;
635
+ return e;
636
+ }
637
+ function isNotFound(e) {
638
+ return !!e?.isNotFound;
639
+ }
640
+ //#endregion
641
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/scroll-restoration.js
642
+ var S = "tsr-scroll-restoration-v1_3", C = !1;
643
+ try {
644
+ C = typeof window < "u" && typeof window.sessionStorage == "object";
645
+ } catch {}
646
+ var throttle = (e, t) => {
647
+ let n;
648
+ return (...r) => {
649
+ n ||= setTimeout(() => {
650
+ e(...r), n = null;
651
+ }, t);
652
+ };
653
+ }, w = C ? {
654
+ state: JSON.parse(window.sessionStorage.getItem("tsr-scroll-restoration-v1_3") || "null") || {},
655
+ set: (e) => (w.state = functionalUpdate(e, w.state) || w.state, window.sessionStorage.setItem(S, JSON.stringify(w.state)))
656
+ } : void 0, defaultGetScrollRestorationKey = (e) => e.state.key || e.href;
657
+ function getCssSelector(e) {
658
+ let t = [], n;
659
+ for (; n = e.parentNode;) t.unshift(`${e.tagName}:nth-child(${[].indexOf.call(n.children, e) + 1})`), e = n;
660
+ return `${t.join(" > ")}`.toLowerCase();
661
+ }
662
+ var T = !1;
663
+ function restoreScroll(e, t, n, r, i) {
664
+ let a;
665
+ try {
666
+ a = JSON.parse(sessionStorage.getItem(e) || "{}");
667
+ } catch (e) {
668
+ console.error(e);
669
+ return;
670
+ }
671
+ let o = t || window.history.state?.key, s = a[o];
672
+ T = !0, (() => {
673
+ if (r && s) {
674
+ for (let e in s) {
675
+ let t = s[e];
676
+ if (e === "window") window.scrollTo({
677
+ top: t.scrollY,
678
+ left: t.scrollX,
679
+ behavior: n
680
+ });
681
+ else if (e) {
682
+ let n = document.querySelector(e);
683
+ n && (n.scrollLeft = t.scrollX, n.scrollTop = t.scrollY);
684
+ }
685
+ }
686
+ return;
687
+ }
688
+ let e = window.location.hash.split("#")[1];
689
+ if (e) {
690
+ let t = (window.history.state || {}).__hashScrollIntoViewOptions ?? !0;
691
+ if (t) {
692
+ let n = document.getElementById(e);
693
+ n && n.scrollIntoView(t);
694
+ }
695
+ return;
696
+ }
697
+ ["window", ...i?.filter((e) => e !== "window") ?? []].forEach((e) => {
698
+ let t = e === "window" ? window : document.querySelector(e);
699
+ t && t.scrollTo({
700
+ top: 0,
701
+ left: 0,
702
+ behavior: n
703
+ });
704
+ });
705
+ })(), T = !1;
706
+ }
707
+ function setupScrollRestoration(e, t) {
708
+ if ((t ?? e.options.scrollRestoration ?? !1) && (e.isScrollRestoring = !0), typeof document > "u" || e.isScrollRestorationSetup) return;
709
+ e.isScrollRestorationSetup = !0, T = !1;
710
+ let n = e.options.getScrollRestorationKey || defaultGetScrollRestorationKey;
711
+ window.history.scrollRestoration = "manual";
712
+ let onScroll = (t) => {
713
+ if (T || !e.isScrollRestoring) return;
714
+ let r = "";
715
+ if (t.target === document || t.target === window) r = "window";
716
+ else {
717
+ let e = t.target.getAttribute("data-scroll-restoration-id");
718
+ r = e ? `[data-scroll-restoration-id="${e}"]` : getCssSelector(t.target);
719
+ }
720
+ let i = n(e.state.location);
721
+ w.set((e) => {
722
+ let t = e[i] = e[i] || {}, n = t[r] = t[r] || {};
723
+ if (r === "window") n.scrollX = window.scrollX || 0, n.scrollY = window.scrollY || 0;
724
+ else if (r) {
725
+ let e = document.querySelector(r);
726
+ e && (n.scrollX = e.scrollLeft || 0, n.scrollY = e.scrollTop || 0);
727
+ }
728
+ return e;
729
+ });
730
+ };
731
+ typeof document < "u" && document.addEventListener("scroll", throttle(onScroll, 100), !0), e.subscribe("onRendered", (t) => {
732
+ let r = n(t.toLocation);
733
+ if (!e.resetNextScroll) {
734
+ e.resetNextScroll = !0;
735
+ return;
736
+ }
737
+ restoreScroll(S, r, e.options.scrollRestorationBehavior || void 0, e.isScrollRestoring || void 0, e.options.scrollToTopSelectors || void 0), e.isScrollRestoring && w.set((e) => (e[r] = e[r] || {}, e));
738
+ });
739
+ }
740
+ //#endregion
741
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/qss.js
742
+ function encode(e, t) {
743
+ let n, r, i, a = "";
744
+ for (n in e) if ((i = e[n]) !== void 0) if (Array.isArray(i)) for (r = 0; r < i.length; r++) a && (a += "&"), a += encodeURIComponent(n) + "=" + encodeURIComponent(i[r]);
745
+ else a && (a += "&"), a += encodeURIComponent(n) + "=" + encodeURIComponent(i);
746
+ return (t || "") + a;
747
+ }
748
+ function toValue(e) {
749
+ if (!e) return "";
750
+ let t = hasUriEncodedChars(e) ? decodeURIComponent(e) : decodeURIComponent(encodeURIComponent(e));
751
+ return t === "false" ? !1 : t === "true" ? !0 : t * 0 == 0 && +t + "" === t ? +t : t;
752
+ }
753
+ function decode(e, t) {
754
+ let n, r, i = {}, a = (t ? e.substr(t.length) : e).split("&");
755
+ for (; n = a.shift();) {
756
+ let e = n.indexOf("=");
757
+ if (e !== -1) {
758
+ r = n.slice(0, e), r = decodeURIComponent(r);
759
+ let t = n.slice(e + 1);
760
+ i[r] === void 0 ? i[r] = toValue(t) : i[r] = [].concat(i[r], toValue(t));
761
+ } else r = n, r = decodeURIComponent(r), i[r] = "";
762
+ }
763
+ return i;
764
+ }
765
+ //#endregion
766
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/searchParams.js
767
+ var E = parseSearchWith(JSON.parse), D = stringifySearchWith(JSON.stringify, JSON.parse);
768
+ function parseSearchWith(e) {
769
+ return (t) => {
770
+ t.substring(0, 1) === "?" && (t = t.substring(1));
771
+ let n = decode(t);
772
+ for (let t in n) {
773
+ let r = n[t];
774
+ if (typeof r == "string") try {
775
+ n[t] = e(r);
776
+ } catch {}
777
+ }
778
+ return n;
779
+ };
780
+ }
781
+ function stringifySearchWith(e, t) {
782
+ function stringifyValue(n) {
783
+ if (typeof n == "object" && n) try {
784
+ return e(n);
785
+ } catch {}
786
+ else if (typeof n == "string" && typeof t == "function") try {
787
+ return t(n), e(n);
788
+ } catch {}
789
+ return n;
790
+ }
791
+ return (e) => {
792
+ e = { ...e }, Object.keys(e).forEach((t) => {
793
+ let n = e[t];
794
+ n === void 0 || n === void 0 ? delete e[t] : e[t] = stringifyValue(n);
795
+ });
796
+ let t = encode(e).toString();
797
+ return t ? `?${t}` : "";
798
+ };
799
+ }
800
+ //#endregion
801
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/root.js
802
+ var O = "__root__";
803
+ //#endregion
804
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/redirect.js
805
+ function redirect(e) {
806
+ if (e.isRedirect = !0, e.statusCode = e.statusCode || e.code || 307, e.headers = e.headers || {}, !e.reloadDocument) {
807
+ e.reloadDocument = !1;
808
+ try {
809
+ new URL(`${e.href}`), e.reloadDocument = !0;
810
+ } catch {}
811
+ }
812
+ if (e.throw) throw e;
813
+ return e;
814
+ }
815
+ function isRedirect(e) {
816
+ return !!e?.isRedirect;
817
+ }
818
+ function isResolvedRedirect(e) {
819
+ return !!e?.isRedirect && e.href;
820
+ }
821
+ //#endregion
822
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/router.js
823
+ function getLocationChangeInfo(e) {
824
+ let t = e.resolvedLocation, n = e.location;
825
+ return {
826
+ fromLocation: t,
827
+ toLocation: n,
828
+ pathChanged: t?.pathname !== n.pathname,
829
+ hrefChanged: t?.href !== n.href,
830
+ hashChanged: t?.hash !== n.hash
831
+ };
832
+ }
833
+ var RouterCore = class {
834
+ constructor(e) {
835
+ this.tempLocationKey = `${Math.round(Math.random() * 1e7)}`, this.resetNextScroll = !0, this.shouldViewTransition = void 0, this.isViewTransitionTypesSupported = void 0, this.subscribers = /* @__PURE__ */ new Set(), this.isScrollRestoring = !1, this.isScrollRestorationSetup = !1, this.startTransition = (e) => e(), this.update = (e) => {
836
+ e.notFoundRoute && console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");
837
+ let t = this.options;
838
+ this.options = {
839
+ ...this.options,
840
+ ...e
841
+ }, this.isServer = this.options.isServer ?? typeof document > "u", this.pathParamsDecodeCharMap = this.options.pathParamsAllowedCharacters ? new Map(this.options.pathParamsAllowedCharacters.map((e) => [encodeURIComponent(e), e])) : void 0, (!this.basepath || e.basepath && e.basepath !== t.basepath) && (e.basepath === void 0 || e.basepath === "" || e.basepath === "/" ? this.basepath = "/" : this.basepath = `/${trimPath(e.basepath)}`), (!this.history || this.options.history && this.options.history !== this.history) && (this.history = this.options.history ?? (this.isServer ? createMemoryHistory({ initialEntries: [this.basepath || "/"] }) : createBrowserHistory()), this.latestLocation = this.parseLocation()), this.options.routeTree !== this.routeTree && (this.routeTree = this.options.routeTree, this.buildRouteTree()), this.__store || (this.__store = new Store(getInitialRouterState(this.latestLocation), { onUpdate: () => {
842
+ this.__store.state = {
843
+ ...this.state,
844
+ cachedMatches: this.state.cachedMatches.filter((e) => !["redirected"].includes(e.status))
845
+ };
846
+ } }), setupScrollRestoration(this)), typeof window < "u" && "CSS" in window && typeof window.CSS?.supports == "function" && (this.isViewTransitionTypesSupported = window.CSS.supports("selector(:active-view-transition-type(a)"));
847
+ }, this.buildRouteTree = () => {
848
+ this.routesById = {}, this.routesByPath = {};
849
+ let e = this.options.notFoundRoute;
850
+ e && (e.init({
851
+ originalIndex: 99999999999,
852
+ defaultSsr: this.options.defaultSsr
853
+ }), this.routesById[e.id] = e);
854
+ let recurseRoutes = (e) => {
855
+ e.forEach((e, t) => {
856
+ e.init({
857
+ originalIndex: t,
858
+ defaultSsr: this.options.defaultSsr
859
+ });
860
+ let n = this.routesById[e.id];
861
+ if (invariant(!n, `Duplicate routes found with id: ${String(e.id)}`), this.routesById[e.id] = e, !e.isRoot && e.path) {
862
+ let t = trimPathRight(e.fullPath);
863
+ (!this.routesByPath[t] || e.fullPath.endsWith("/")) && (this.routesByPath[t] = e);
864
+ }
865
+ let r = e.children;
866
+ r?.length && recurseRoutes(r);
867
+ });
868
+ };
869
+ recurseRoutes([this.routeTree]);
870
+ let t = [];
871
+ Object.values(this.routesById).forEach((e, n) => {
872
+ if (e.isRoot || !e.path) return;
873
+ let r = trimPathLeft(e.fullPath), i = parsePathname(r);
874
+ for (; i.length > 1 && i[0]?.value === "/";) i.shift();
875
+ let a = i.map((e) => e.value === "/" ? .75 : e.type === "param" ? .5 : e.type === "wildcard" ? .25 : 1);
876
+ t.push({
877
+ child: e,
878
+ trimmed: r,
879
+ parsed: i,
880
+ index: n,
881
+ scores: a
882
+ });
883
+ }), this.flatRoutes = t.sort((e, t) => {
884
+ let n = Math.min(e.scores.length, t.scores.length);
885
+ for (let r = 0; r < n; r++) if (e.scores[r] !== t.scores[r]) return t.scores[r] - e.scores[r];
886
+ if (e.scores.length !== t.scores.length) return t.scores.length - e.scores.length;
887
+ for (let r = 0; r < n; r++) if (e.parsed[r].value !== t.parsed[r].value) return e.parsed[r].value > t.parsed[r].value ? 1 : -1;
888
+ return e.index - t.index;
889
+ }).map((e, t) => (e.child.rank = t, e.child));
890
+ }, this.subscribe = (e, t) => {
891
+ let n = {
892
+ eventType: e,
893
+ fn: t
894
+ };
895
+ return this.subscribers.add(n), () => {
896
+ this.subscribers.delete(n);
897
+ };
898
+ }, this.emit = (e) => {
899
+ this.subscribers.forEach((t) => {
900
+ t.eventType === e.type && t.fn(e);
901
+ });
902
+ }, this.parseLocation = (e, t) => {
903
+ let parse = ({ pathname: t, search: n, hash: r, state: i }) => {
904
+ let a = this.options.parseSearch(n), o = this.options.stringifySearch(a);
905
+ return {
906
+ pathname: t,
907
+ searchStr: o,
908
+ search: replaceEqualDeep(e?.search, a),
909
+ hash: r.split("#").reverse()[0] ?? "",
910
+ href: `${t}${o}${r}`,
911
+ state: replaceEqualDeep(e?.state, i)
912
+ };
913
+ }, n = parse(t ?? this.history.location), { __tempLocation: r, __tempKey: i } = n.state;
914
+ if (r && (!i || i === this.tempLocationKey)) {
915
+ let e = parse(r);
916
+ return e.state.key = n.state.key, delete e.state.__tempLocation, {
917
+ ...e,
918
+ maskedLocation: n
919
+ };
920
+ }
921
+ return n;
922
+ }, this.resolvePathWithBase = (e, t) => resolvePath({
923
+ basepath: this.basepath,
924
+ base: e,
925
+ to: cleanPath(t),
926
+ trailingSlash: this.options.trailingSlash,
927
+ caseSensitive: this.options.caseSensitive
928
+ }), this.matchRoutes = (e, t, n) => typeof e == "string" ? this.matchRoutesInternal({
929
+ pathname: e,
930
+ search: t
931
+ }, n) : this.matchRoutesInternal(e, t), this.getMatchedRoutes = (e, t) => {
932
+ let n = {}, r = trimPathRight(e.pathname), getMatchedParams = (e) => matchPathname(this.basepath, r, {
933
+ to: e.fullPath,
934
+ caseSensitive: e.options.caseSensitive ?? this.options.caseSensitive,
935
+ fuzzy: !0
936
+ }), i = t?.to === void 0 ? void 0 : this.routesByPath[t.to];
937
+ i ? n = getMatchedParams(i) : i = this.flatRoutes.find((e) => {
938
+ let t = getMatchedParams(e);
939
+ return t ? (n = t, !0) : !1;
940
+ });
941
+ let a = i || this.routesById.__root__, o = [a];
942
+ for (; a.parentRoute;) a = a.parentRoute, o.unshift(a);
943
+ return {
944
+ matchedRoutes: o,
945
+ routeParams: n,
946
+ foundRoute: i
947
+ };
948
+ }, this.cancelMatch = (e) => {
949
+ let t = this.getMatch(e);
950
+ t && (t.abortController.abort(), clearTimeout(t.pendingTimeout));
951
+ }, this.cancelMatches = () => {
952
+ var e;
953
+ (e = this.state.pendingMatches) == null || e.forEach((e) => {
954
+ this.cancelMatch(e.id);
955
+ });
956
+ }, this.buildLocation = (e) => {
957
+ let build = (t = {}, n) => {
958
+ let r = t._fromLocation ? this.matchRoutes(t._fromLocation, { _buildLocation: !0 }) : this.state.matches, i = t.from == null ? void 0 : r.find((e) => matchPathname(this.basepath, trimPathRight(e.pathname), {
959
+ to: t.from,
960
+ caseSensitive: !1,
961
+ fuzzy: !1
962
+ })), a = i?.pathname || this.latestLocation.pathname;
963
+ invariant(t.from == null || i != null, "Could not find match for from: " + t.from);
964
+ let o = this.state.pendingMatches?.length ? last(this.state.pendingMatches)?.search : last(r)?.search || this.latestLocation.search, s = n?.matchedRoutes.filter((e) => r.find((t) => t.routeId === e.id)), c;
965
+ if (t.to) {
966
+ let e = i?.fullPath || last(r)?.fullPath || this.latestLocation.pathname;
967
+ c = this.resolvePathWithBase(e, `${t.to}`);
968
+ } else {
969
+ let e = this.routesById[s?.find((e) => {
970
+ let t = interpolatePath({
971
+ path: e.fullPath,
972
+ params: n?.routeParams ?? {},
973
+ decodeCharMap: this.pathParamsDecodeCharMap
974
+ }).interpolatedPath;
975
+ return joinPaths([this.basepath, t]) === a;
976
+ })?.id];
977
+ c = this.resolvePathWithBase(a, e?.to ?? a);
978
+ }
979
+ let l = { ...last(r)?.params }, u = (t.params ?? !0) === !0 ? l : {
980
+ ...l,
981
+ ...functionalUpdate(t.params, l)
982
+ };
983
+ Object.keys(u).length > 0 && n?.matchedRoutes.map((e) => e.options.params?.stringify ?? e.options.stringifyParams).filter(Boolean).forEach((e) => {
984
+ u = {
985
+ ...u,
986
+ ...e(u)
987
+ };
988
+ }), c = interpolatePath({
989
+ path: c,
990
+ params: u ?? {},
991
+ leaveWildcards: !1,
992
+ leaveParams: e.leaveParams,
993
+ decodeCharMap: this.pathParamsDecodeCharMap
994
+ }).interpolatedPath;
995
+ let d = o;
996
+ if (e._includeValidateSearch && this.options.search?.strict) {
997
+ let e = {};
998
+ n?.matchedRoutes.forEach((t) => {
999
+ try {
1000
+ t.options.validateSearch && (e = {
1001
+ ...e,
1002
+ ...validateSearch(t.options.validateSearch, {
1003
+ ...e,
1004
+ ...d
1005
+ }) ?? {}
1006
+ });
1007
+ } catch {}
1008
+ }), d = e;
1009
+ }
1010
+ let applyMiddlewares = (r) => {
1011
+ let i = n?.matchedRoutes.reduce((t, n) => {
1012
+ let r = [];
1013
+ if ("search" in n.options) n.options.search?.middlewares && r.push(...n.options.search.middlewares);
1014
+ else if (n.options.preSearchFilters || n.options.postSearchFilters) {
1015
+ let legacyMiddleware = ({ search: e, next: t }) => {
1016
+ let r = e;
1017
+ "preSearchFilters" in n.options && n.options.preSearchFilters && (r = n.options.preSearchFilters.reduce((e, t) => t(e), e));
1018
+ let i = t(r);
1019
+ return "postSearchFilters" in n.options && n.options.postSearchFilters ? n.options.postSearchFilters.reduce((e, t) => t(e), i) : i;
1020
+ };
1021
+ r.push(legacyMiddleware);
1022
+ }
1023
+ if (e._includeValidateSearch && n.options.validateSearch) {
1024
+ let validate = ({ search: e, next: t }) => {
1025
+ let r = t(e);
1026
+ try {
1027
+ return {
1028
+ ...r,
1029
+ ...validateSearch(n.options.validateSearch, r) ?? {}
1030
+ };
1031
+ } catch {
1032
+ return r;
1033
+ }
1034
+ };
1035
+ r.push(validate);
1036
+ }
1037
+ return t.concat(r);
1038
+ }, []) ?? [], final = ({ search: e }) => t.search ? t.search === !0 ? e : functionalUpdate(t.search, e) : {};
1039
+ i.push(final);
1040
+ let applyNext = (e, t) => {
1041
+ if (e >= i.length) return t;
1042
+ let n = i[e], next = (t) => applyNext(e + 1, t);
1043
+ return n({
1044
+ search: t,
1045
+ next
1046
+ });
1047
+ };
1048
+ return applyNext(0, r);
1049
+ };
1050
+ d = applyMiddlewares(d), d = replaceEqualDeep(o, d);
1051
+ let f = this.options.stringifySearch(d), p = t.hash === !0 ? this.latestLocation.hash : t.hash ? functionalUpdate(t.hash, this.latestLocation.hash) : void 0, m = p ? `#${p}` : "", h = t.state === !0 ? this.latestLocation.state : t.state ? functionalUpdate(t.state, this.latestLocation.state) : {};
1052
+ return h = replaceEqualDeep(this.latestLocation.state, h), {
1053
+ pathname: c,
1054
+ search: d,
1055
+ searchStr: f,
1056
+ state: h,
1057
+ hash: p ?? "",
1058
+ href: `${c}${f}${m}`,
1059
+ unmaskOnReload: t.unmaskOnReload
1060
+ };
1061
+ }, buildWithMatches = (t = {}, n) => {
1062
+ let r = build(t), i = n ? build(n) : void 0;
1063
+ if (!i) {
1064
+ let t = {}, a = this.options.routeMasks?.find((e) => {
1065
+ let n = matchPathname(this.basepath, r.pathname, {
1066
+ to: e.from,
1067
+ caseSensitive: !1,
1068
+ fuzzy: !1
1069
+ });
1070
+ return n ? (t = n, !0) : !1;
1071
+ });
1072
+ if (a) {
1073
+ let { from: r, ...o } = a;
1074
+ n = {
1075
+ ...pick(e, ["from"]),
1076
+ ...o,
1077
+ params: t
1078
+ }, i = build(n);
1079
+ }
1080
+ }
1081
+ let a = build(t, this.getMatchedRoutes(r, t));
1082
+ if (i) {
1083
+ let e = this.getMatchedRoutes(i, n);
1084
+ a.maskedLocation = build(n, e);
1085
+ }
1086
+ return a;
1087
+ };
1088
+ return e.mask ? buildWithMatches(e, {
1089
+ ...pick(e, ["from"]),
1090
+ ...e.mask
1091
+ }) : buildWithMatches(e);
1092
+ }, this.commitLocation = ({ viewTransition: e, ignoreBlocker: t, ...n }) => {
1093
+ let isSameState = () => {
1094
+ let e = [
1095
+ "key",
1096
+ "__TSR_index",
1097
+ "__hashScrollIntoViewOptions"
1098
+ ];
1099
+ e.forEach((e) => {
1100
+ n.state[e] = this.latestLocation.state[e];
1101
+ });
1102
+ let t = deepEqual(n.state, this.latestLocation.state);
1103
+ return e.forEach((e) => {
1104
+ delete n.state[e];
1105
+ }), t;
1106
+ }, r = this.latestLocation.href === n.href, i = this.commitLocationPromise;
1107
+ if (this.commitLocationPromise = createControlledPromise(() => {
1108
+ i?.resolve();
1109
+ }), r && isSameState()) this.load();
1110
+ else {
1111
+ let { maskedLocation: r, hashScrollIntoView: i, ...a } = n;
1112
+ r && (a = {
1113
+ ...r,
1114
+ state: {
1115
+ ...r.state,
1116
+ __tempKey: void 0,
1117
+ __tempLocation: {
1118
+ ...a,
1119
+ search: a.searchStr,
1120
+ state: {
1121
+ ...a.state,
1122
+ __tempKey: void 0,
1123
+ __tempLocation: void 0,
1124
+ key: void 0
1125
+ }
1126
+ }
1127
+ }
1128
+ }, (a.unmaskOnReload ?? this.options.unmaskOnReload ?? !1) && (a.state.__tempKey = this.tempLocationKey)), a.state.__hashScrollIntoViewOptions = i ?? this.options.defaultHashScrollIntoView ?? !0, this.shouldViewTransition = e, this.history[n.replace ? "replace" : "push"](a.href, a.state, { ignoreBlocker: t });
1129
+ }
1130
+ return this.resetNextScroll = n.resetScroll ?? !0, this.history.subscribers.size || this.load(), this.commitLocationPromise;
1131
+ }, this.buildAndCommitLocation = ({ replace: e, resetScroll: t, hashScrollIntoView: n, viewTransition: r, ignoreBlocker: i, href: a, ...o } = {}) => {
1132
+ if (a) {
1133
+ let t = this.history.location.state.__TSR_index, n = parseHref(a, { __TSR_index: e ? t : t + 1 });
1134
+ o.to = n.pathname, o.search = this.options.parseSearch(n.search), o.hash = n.hash.slice(1);
1135
+ }
1136
+ let s = this.buildLocation({
1137
+ ...o,
1138
+ _includeValidateSearch: !0
1139
+ });
1140
+ return this.commitLocation({
1141
+ ...s,
1142
+ viewTransition: r,
1143
+ replace: e,
1144
+ resetScroll: t,
1145
+ hashScrollIntoView: n,
1146
+ ignoreBlocker: i
1147
+ });
1148
+ }, this.navigate = ({ to: e, reloadDocument: t, href: n, ...r }) => {
1149
+ if (t) {
1150
+ if (!n) {
1151
+ let t = this.buildLocation({
1152
+ to: e,
1153
+ ...r
1154
+ });
1155
+ n = this.history.createHref(t.href);
1156
+ }
1157
+ r.replace ? window.location.replace(n) : window.location.href = n;
1158
+ return;
1159
+ }
1160
+ return this.buildAndCommitLocation({
1161
+ ...r,
1162
+ href: n,
1163
+ to: e
1164
+ });
1165
+ }, this.load = async (e) => {
1166
+ this.latestLocation = this.parseLocation(this.latestLocation);
1167
+ let t, n, r;
1168
+ for (r = new Promise((i) => {
1169
+ this.startTransition(async () => {
1170
+ var a;
1171
+ try {
1172
+ let t = this.latestLocation, n = this.state.resolvedLocation;
1173
+ this.cancelMatches();
1174
+ let r;
1175
+ batch(() => {
1176
+ r = this.matchRoutes(t), this.__store.setState((e) => ({
1177
+ ...e,
1178
+ status: "pending",
1179
+ isLoading: !0,
1180
+ location: t,
1181
+ pendingMatches: r,
1182
+ cachedMatches: e.cachedMatches.filter((e) => !r.find((t) => t.id === e.id))
1183
+ }));
1184
+ }), this.state.redirect || this.emit({
1185
+ type: "onBeforeNavigate",
1186
+ ...getLocationChangeInfo({
1187
+ resolvedLocation: n,
1188
+ location: t
1189
+ })
1190
+ }), this.emit({
1191
+ type: "onBeforeLoad",
1192
+ ...getLocationChangeInfo({
1193
+ resolvedLocation: n,
1194
+ location: t
1195
+ })
1196
+ }), await this.loadMatches({
1197
+ sync: e?.sync,
1198
+ matches: r,
1199
+ location: t,
1200
+ onReady: async () => {
1201
+ this.startViewTransition(async () => {
1202
+ let e, t, n;
1203
+ batch(() => {
1204
+ this.__store.setState((r) => {
1205
+ let i = r.matches, a = r.pendingMatches || r.matches;
1206
+ return e = i.filter((e) => !a.find((t) => t.id === e.id)), t = a.filter((e) => !i.find((t) => t.id === e.id)), n = i.filter((e) => a.find((t) => t.id === e.id)), {
1207
+ ...r,
1208
+ isLoading: !1,
1209
+ loadedAt: Date.now(),
1210
+ matches: a,
1211
+ pendingMatches: void 0,
1212
+ cachedMatches: [...r.cachedMatches, ...e.filter((e) => e.status !== "error")]
1213
+ };
1214
+ }), this.clearExpiredCache();
1215
+ }), [
1216
+ [e, "onLeave"],
1217
+ [t, "onEnter"],
1218
+ [n, "onStay"]
1219
+ ].forEach(([e, t]) => {
1220
+ e.forEach((e) => {
1221
+ var n, r;
1222
+ (r = (n = this.looseRoutesById[e.routeId].options)[t]) == null || r.call(n, e);
1223
+ });
1224
+ });
1225
+ });
1226
+ }
1227
+ });
1228
+ } catch (e) {
1229
+ isResolvedRedirect(e) ? (t = e, this.isServer || this.navigate({
1230
+ ...t,
1231
+ replace: !0,
1232
+ ignoreBlocker: !0
1233
+ })) : isNotFound(e) && (n = e), this.__store.setState((e) => ({
1234
+ ...e,
1235
+ statusCode: t ? t.statusCode : n ? 404 : e.matches.some((e) => e.status === "error") ? 500 : 200,
1236
+ redirect: t
1237
+ }));
1238
+ }
1239
+ this.latestLoadPromise === r && ((a = this.commitLocationPromise) == null || a.resolve(), this.latestLoadPromise = void 0, this.commitLocationPromise = void 0), i();
1240
+ });
1241
+ }), this.latestLoadPromise = r, await r; this.latestLoadPromise && r !== this.latestLoadPromise;) await this.latestLoadPromise;
1242
+ this.hasNotFoundMatch() && this.__store.setState((e) => ({
1243
+ ...e,
1244
+ statusCode: 404
1245
+ }));
1246
+ }, this.startViewTransition = (e) => {
1247
+ let t = this.shouldViewTransition ?? this.options.defaultViewTransition;
1248
+ if (delete this.shouldViewTransition, t && typeof document < "u" && "startViewTransition" in document && typeof document.startViewTransition == "function") {
1249
+ let n;
1250
+ n = typeof t == "object" && this.isViewTransitionTypesSupported ? {
1251
+ update: e,
1252
+ types: t.types
1253
+ } : e, document.startViewTransition(n);
1254
+ } else e();
1255
+ }, this.updateMatch = (e, t) => {
1256
+ let n, r = this.state.pendingMatches?.find((t) => t.id === e), i = this.state.matches.find((t) => t.id === e), a = this.state.cachedMatches.find((t) => t.id === e), o = r ? "pendingMatches" : i ? "matches" : a ? "cachedMatches" : "";
1257
+ return o && this.__store.setState((r) => ({
1258
+ ...r,
1259
+ [o]: r[o]?.map((r) => r.id === e ? n = t(r) : r)
1260
+ })), n;
1261
+ }, this.getMatch = (e) => [
1262
+ ...this.state.cachedMatches,
1263
+ ...this.state.pendingMatches ?? [],
1264
+ ...this.state.matches
1265
+ ].find((t) => t.id === e), this.loadMatches = async ({ location: e, matches: t, preload: n, onReady: r, updateMatch: i = this.updateMatch, sync: a }) => {
1266
+ let o, s = !1, triggerOnReady = async () => {
1267
+ s || (s = !0, await r?.());
1268
+ }, resolvePreload = (e) => !!(n && !this.state.matches.find((t) => t.id === e));
1269
+ !this.isServer && !this.state.matches.length && triggerOnReady();
1270
+ let handleRedirectAndNotFound = (n, r) => {
1271
+ var a, o, c, l;
1272
+ if (isResolvedRedirect(r) && !r.reloadDocument) throw r;
1273
+ if (isRedirect(r) || isNotFound(r)) {
1274
+ if (i(n.id, (e) => ({
1275
+ ...e,
1276
+ status: isRedirect(r) ? "redirected" : isNotFound(r) ? "notFound" : "error",
1277
+ isFetching: !1,
1278
+ error: r,
1279
+ beforeLoadPromise: void 0,
1280
+ loaderPromise: void 0
1281
+ })), r.routeId ||= n.routeId, (a = n.beforeLoadPromise) == null || a.resolve(), (o = n.loaderPromise) == null || o.resolve(), (c = n.loadPromise) == null || c.resolve(), isRedirect(r)) throw s = !0, r = this.resolveRedirect({
1282
+ ...r,
1283
+ _fromLocation: e
1284
+ }), r;
1285
+ if (isNotFound(r)) throw this._handleNotFound(t, r, { updateMatch: i }), (l = this.serverSsr) == null || l.onMatchSettled({
1286
+ router: this,
1287
+ match: this.getMatch(n.id)
1288
+ }), r;
1289
+ }
1290
+ };
1291
+ try {
1292
+ await new Promise((n, s) => {
1293
+ (async () => {
1294
+ var c;
1295
+ try {
1296
+ let handleSerialError = (e, n, r) => {
1297
+ var a, s;
1298
+ let { id: c, routeId: l } = t[e], u = this.looseRoutesById[l];
1299
+ if (n instanceof Promise) throw n;
1300
+ n.routerCode = r, o ??= e, handleRedirectAndNotFound(this.getMatch(c), n);
1301
+ try {
1302
+ (s = (a = u.options).onError) == null || s.call(a, n);
1303
+ } catch (e) {
1304
+ n = e, handleRedirectAndNotFound(this.getMatch(c), n);
1305
+ }
1306
+ i(c, (e) => {
1307
+ var t, r;
1308
+ return (t = e.beforeLoadPromise) == null || t.resolve(), (r = e.loadPromise) == null || r.resolve(), {
1309
+ ...e,
1310
+ error: n,
1311
+ status: "error",
1312
+ isFetching: !1,
1313
+ updatedAt: Date.now(),
1314
+ abortController: new AbortController(),
1315
+ beforeLoadPromise: void 0
1316
+ };
1317
+ });
1318
+ };
1319
+ for (let [n, { id: a, routeId: o }] of t.entries()) {
1320
+ let s = this.getMatch(a), l = t[n - 1]?.id, u = this.looseRoutesById[o], d = u.options.pendingMs ?? this.options.defaultPendingMs, f = !!(r && !this.isServer && !resolvePreload(a) && (u.options.loader || u.options.beforeLoad) && typeof d == "number" && d !== Infinity && (u.options.pendingComponent ?? this.options?.defaultPendingComponent)), p = !0;
1321
+ if ((s.beforeLoadPromise || s.loaderPromise) && (f && setTimeout(() => {
1322
+ try {
1323
+ triggerOnReady();
1324
+ } catch {}
1325
+ }, d), await s.beforeLoadPromise, p = this.getMatch(a).status !== "success"), p) {
1326
+ try {
1327
+ i(a, (e) => {
1328
+ let t = e.loadPromise;
1329
+ return {
1330
+ ...e,
1331
+ loadPromise: createControlledPromise(() => {
1332
+ t?.resolve();
1333
+ }),
1334
+ beforeLoadPromise: createControlledPromise()
1335
+ };
1336
+ });
1337
+ let r = new AbortController(), o;
1338
+ f && (o = setTimeout(() => {
1339
+ try {
1340
+ triggerOnReady();
1341
+ } catch {}
1342
+ }, d));
1343
+ let { paramsError: s, searchError: p } = this.getMatch(a);
1344
+ s && handleSerialError(n, s, "PARSE_PARAMS"), p && handleSerialError(n, p, "VALIDATE_SEARCH");
1345
+ let getParentMatchContext = () => l ? this.getMatch(l).context : this.options.context ?? {};
1346
+ i(a, (e) => ({
1347
+ ...e,
1348
+ isFetching: "beforeLoad",
1349
+ fetchCount: e.fetchCount + 1,
1350
+ abortController: r,
1351
+ pendingTimeout: o,
1352
+ context: {
1353
+ ...getParentMatchContext(),
1354
+ ...e.__routeContext
1355
+ }
1356
+ }));
1357
+ let { search: m, params: h, context: g, cause: _ } = this.getMatch(a), v = resolvePreload(a), y = {
1358
+ search: m,
1359
+ abortController: r,
1360
+ params: h,
1361
+ preload: v,
1362
+ context: g,
1363
+ location: e,
1364
+ navigate: (t) => this.navigate({
1365
+ ...t,
1366
+ _fromLocation: e
1367
+ }),
1368
+ buildLocation: this.buildLocation,
1369
+ cause: v ? "preload" : _,
1370
+ matches: t
1371
+ }, b = await (c = u.options).beforeLoad?.call(c, y) ?? {};
1372
+ (isRedirect(b) || isNotFound(b)) && handleSerialError(n, b, "BEFORE_LOAD"), i(a, (e) => ({
1373
+ ...e,
1374
+ __beforeLoadContext: b,
1375
+ context: {
1376
+ ...getParentMatchContext(),
1377
+ ...e.__routeContext,
1378
+ ...b
1379
+ },
1380
+ abortController: r
1381
+ }));
1382
+ } catch (e) {
1383
+ handleSerialError(n, e, "BEFORE_LOAD");
1384
+ }
1385
+ i(a, (e) => {
1386
+ var t;
1387
+ return (t = e.beforeLoadPromise) == null || t.resolve(), {
1388
+ ...e,
1389
+ beforeLoadPromise: void 0,
1390
+ isFetching: !1
1391
+ };
1392
+ });
1393
+ }
1394
+ }
1395
+ let s = t.slice(0, o), l = [];
1396
+ s.forEach(({ id: n, routeId: r }, o) => {
1397
+ l.push((async () => {
1398
+ let { loaderPromise: s } = this.getMatch(n), c = !1, u = !1;
1399
+ if (s) {
1400
+ await s;
1401
+ let e = this.getMatch(n);
1402
+ e.error && handleRedirectAndNotFound(e, e.error);
1403
+ } else {
1404
+ let s = l[o - 1], d = this.looseRoutesById[r], getLoaderContext = () => {
1405
+ let { params: t, loaderDeps: r, abortController: i, context: a, cause: o } = this.getMatch(n), c = resolvePreload(n);
1406
+ return {
1407
+ params: t,
1408
+ deps: r,
1409
+ preload: !!c,
1410
+ parentMatchPromise: s,
1411
+ abortController: i,
1412
+ context: a,
1413
+ location: e,
1414
+ navigate: (t) => this.navigate({
1415
+ ...t,
1416
+ _fromLocation: e
1417
+ }),
1418
+ cause: c ? "preload" : o,
1419
+ route: d
1420
+ };
1421
+ }, f = Date.now() - this.getMatch(n).updatedAt, p = resolvePreload(n), m = p ? d.options.preloadStaleTime ?? this.options.defaultPreloadStaleTime ?? 3e4 : d.options.staleTime ?? this.options.defaultStaleTime ?? 0, h = d.options.shouldReload, g = typeof h == "function" ? h(getLoaderContext()) : h;
1422
+ i(n, (e) => ({
1423
+ ...e,
1424
+ loaderPromise: createControlledPromise(),
1425
+ preload: !!p && !this.state.matches.find((e) => e.id === n)
1426
+ }));
1427
+ let runLoader = async () => {
1428
+ var e, r, a, o, s, c, l;
1429
+ try {
1430
+ let potentialPendingMinPromise = async () => {
1431
+ let e = this.getMatch(n);
1432
+ e.minPendingPromise && await e.minPendingPromise;
1433
+ };
1434
+ try {
1435
+ this.loadRouteChunk(d), i(n, (e) => ({
1436
+ ...e,
1437
+ isFetching: "loader"
1438
+ }));
1439
+ let s = await (e = d.options).loader?.call(e, getLoaderContext());
1440
+ handleRedirectAndNotFound(this.getMatch(n), s), await d._lazyPromise, await potentialPendingMinPromise();
1441
+ let c = {
1442
+ matches: t,
1443
+ match: this.getMatch(n),
1444
+ params: this.getMatch(n).params,
1445
+ loaderData: s
1446
+ }, l = (r = d.options).head?.call(r, c), u = l?.meta, f = l?.links, p = l?.scripts, m = (a = d.options).scripts?.call(a, c), h = (o = d.options).headers?.call(o, { loaderData: s });
1447
+ i(n, (e) => ({
1448
+ ...e,
1449
+ error: void 0,
1450
+ status: "success",
1451
+ isFetching: !1,
1452
+ updatedAt: Date.now(),
1453
+ loaderData: s,
1454
+ meta: u,
1455
+ links: f,
1456
+ headScripts: p,
1457
+ headers: h,
1458
+ scripts: m
1459
+ }));
1460
+ } catch (e) {
1461
+ let t = e;
1462
+ await potentialPendingMinPromise(), handleRedirectAndNotFound(this.getMatch(n), e);
1463
+ try {
1464
+ (c = (s = d.options).onError) == null || c.call(s, e);
1465
+ } catch (e) {
1466
+ t = e, handleRedirectAndNotFound(this.getMatch(n), e);
1467
+ }
1468
+ i(n, (e) => ({
1469
+ ...e,
1470
+ error: t,
1471
+ status: "error",
1472
+ isFetching: !1
1473
+ }));
1474
+ }
1475
+ (l = this.serverSsr) == null || l.onMatchSettled({
1476
+ router: this,
1477
+ match: this.getMatch(n)
1478
+ }), await d._componentsPromise;
1479
+ } catch (e) {
1480
+ i(n, (e) => ({
1481
+ ...e,
1482
+ loaderPromise: void 0
1483
+ })), handleRedirectAndNotFound(this.getMatch(n), e);
1484
+ }
1485
+ }, { status: _, invalid: v } = this.getMatch(n);
1486
+ c = _ === "success" && (v || (g ?? f > m)), p && d.options.preload === !1 || (c && !a ? (u = !0, (async () => {
1487
+ try {
1488
+ await runLoader();
1489
+ let { loaderPromise: e, loadPromise: t } = this.getMatch(n);
1490
+ e?.resolve(), t?.resolve(), i(n, (e) => ({
1491
+ ...e,
1492
+ loaderPromise: void 0
1493
+ }));
1494
+ } catch (e) {
1495
+ isResolvedRedirect(e) && await this.navigate(e);
1496
+ }
1497
+ })()) : (_ !== "success" || c && a) && await runLoader());
1498
+ }
1499
+ if (!u) {
1500
+ let { loaderPromise: e, loadPromise: t } = this.getMatch(n);
1501
+ e?.resolve(), t?.resolve();
1502
+ }
1503
+ return i(n, (e) => ({
1504
+ ...e,
1505
+ isFetching: u ? e.isFetching : !1,
1506
+ loaderPromise: u ? e.loaderPromise : void 0,
1507
+ invalid: !1
1508
+ })), this.getMatch(n);
1509
+ })());
1510
+ }), await Promise.all(l), n();
1511
+ } catch (e) {
1512
+ s(e);
1513
+ }
1514
+ })();
1515
+ }), await triggerOnReady();
1516
+ } catch (e) {
1517
+ if (isRedirect(e) || isNotFound(e)) throw isNotFound(e) && !n && await triggerOnReady(), e;
1518
+ }
1519
+ return t;
1520
+ }, this.invalidate = (e) => {
1521
+ let invalidate = (t) => (e?.filter)?.call(e, t) ?? !0 ? {
1522
+ ...t,
1523
+ invalid: !0,
1524
+ ...t.status === "error" ? {
1525
+ status: "pending",
1526
+ error: void 0
1527
+ } : {}
1528
+ } : t;
1529
+ return this.__store.setState((e) => ({
1530
+ ...e,
1531
+ matches: e.matches.map(invalidate),
1532
+ cachedMatches: e.cachedMatches.map(invalidate),
1533
+ pendingMatches: e.pendingMatches?.map(invalidate)
1534
+ })), this.load({ sync: e?.sync });
1535
+ }, this.resolveRedirect = (e) => {
1536
+ let t = e;
1537
+ return t.href ||= this.buildLocation(t).href, t;
1538
+ }, this.clearCache = (e) => {
1539
+ let t = e?.filter;
1540
+ t === void 0 ? this.__store.setState((e) => ({
1541
+ ...e,
1542
+ cachedMatches: []
1543
+ })) : this.__store.setState((e) => ({
1544
+ ...e,
1545
+ cachedMatches: e.cachedMatches.filter((e) => !t(e))
1546
+ }));
1547
+ }, this.clearExpiredCache = () => {
1548
+ let filter = (e) => {
1549
+ let t = this.looseRoutesById[e.routeId];
1550
+ if (!t.options.loader) return !0;
1551
+ let n = (e.preload ? t.options.preloadGcTime ?? this.options.defaultPreloadGcTime : t.options.gcTime ?? this.options.defaultGcTime) ?? 300 * 1e3;
1552
+ return !(e.status !== "error" && Date.now() - e.updatedAt < n);
1553
+ };
1554
+ this.clearCache({ filter });
1555
+ }, this.loadRouteChunk = (e) => (e._lazyPromise === void 0 && (e.lazyFn ? e._lazyPromise = e.lazyFn().then((t) => {
1556
+ let { id: n, ...r } = t.options;
1557
+ Object.assign(e.options, r);
1558
+ }) : e._lazyPromise = Promise.resolve()), e._componentsPromise === void 0 && (e._componentsPromise = e._lazyPromise.then(() => Promise.all(k.map(async (t) => {
1559
+ let n = e.options[t];
1560
+ n?.preload && await n.preload();
1561
+ })))), e._componentsPromise), this.preloadRoute = async (e) => {
1562
+ let t = this.buildLocation(e), n = this.matchRoutes(t, {
1563
+ throwOnError: !0,
1564
+ preload: !0,
1565
+ dest: e
1566
+ }), r = new Set([...this.state.matches, ...this.state.pendingMatches ?? []].map((e) => e.id)), i = /* @__PURE__ */ new Set([...r, ...this.state.cachedMatches.map((e) => e.id)]);
1567
+ batch(() => {
1568
+ n.forEach((e) => {
1569
+ i.has(e.id) || this.__store.setState((t) => ({
1570
+ ...t,
1571
+ cachedMatches: [...t.cachedMatches, e]
1572
+ }));
1573
+ });
1574
+ });
1575
+ try {
1576
+ return n = await this.loadMatches({
1577
+ matches: n,
1578
+ location: t,
1579
+ preload: !0,
1580
+ updateMatch: (e, t) => {
1581
+ r.has(e) ? n = n.map((n) => n.id === e ? t(n) : n) : this.updateMatch(e, t);
1582
+ }
1583
+ }), n;
1584
+ } catch (e) {
1585
+ if (isRedirect(e)) return e.reloadDocument ? void 0 : await this.preloadRoute({
1586
+ ...e,
1587
+ _fromLocation: t
1588
+ });
1589
+ isNotFound(e) || console.error(e);
1590
+ return;
1591
+ }
1592
+ }, this.matchRoute = (e, t) => {
1593
+ let n = {
1594
+ ...e,
1595
+ to: e.to ? this.resolvePathWithBase(e.from || "", e.to) : void 0,
1596
+ params: e.params || {},
1597
+ leaveParams: !0
1598
+ }, r = this.buildLocation(n);
1599
+ if (t?.pending && this.state.status !== "pending") return !1;
1600
+ let i = (t?.pending === void 0 ? !this.state.isLoading : t.pending) ? this.latestLocation : this.state.resolvedLocation || this.state.location, a = matchPathname(this.basepath, i.pathname, {
1601
+ ...t,
1602
+ to: r.pathname
1603
+ });
1604
+ return !a || e.params && !deepEqual(a, e.params, { partial: !0 }) ? !1 : a && (t?.includeSearch ?? !0) ? deepEqual(i.search, r.search, { partial: !0 }) ? a : !1 : a;
1605
+ }, this._handleNotFound = (e, t, { updateMatch: n = this.updateMatch } = {}) => {
1606
+ let r = this.routesById[t.routeId ?? ""] ?? this.routeTree, i = {};
1607
+ for (let t of e) i[t.routeId] = t;
1608
+ !r.options.notFoundComponent && this.options?.defaultNotFoundComponent && (r.options.notFoundComponent = this.options.defaultNotFoundComponent), invariant(r.options.notFoundComponent, "No notFoundComponent found. Please set a notFoundComponent on your route or provide a defaultNotFoundComponent to the router.");
1609
+ let a = i[r.id];
1610
+ invariant(a, "Could not find match for route: " + r.id), n(a.id, (e) => ({
1611
+ ...e,
1612
+ status: "notFound",
1613
+ error: t,
1614
+ isFetching: !1
1615
+ })), t.routerCode === "BEFORE_LOAD" && r.parentRoute && (t.routeId = r.parentRoute.id, this._handleNotFound(e, t, { updateMatch: n }));
1616
+ }, this.hasNotFoundMatch = () => this.__store.state.matches.some((e) => e.status === "notFound" || e.globalNotFound), this.update({
1617
+ defaultPreloadDelay: 50,
1618
+ defaultPendingMs: 1e3,
1619
+ defaultPendingMinMs: 500,
1620
+ context: void 0,
1621
+ ...e,
1622
+ caseSensitive: e.caseSensitive ?? !1,
1623
+ notFoundMode: e.notFoundMode ?? "fuzzy",
1624
+ stringifySearch: e.stringifySearch ?? D,
1625
+ parseSearch: e.parseSearch ?? E
1626
+ }), typeof document < "u" && (window.__TSR_ROUTER__ = this);
1627
+ }
1628
+ get state() {
1629
+ return this.__store.state;
1630
+ }
1631
+ get looseRoutesById() {
1632
+ return this.routesById;
1633
+ }
1634
+ matchRoutesInternal(e, t) {
1635
+ let { foundRoute: n, matchedRoutes: r, routeParams: i } = this.getMatchedRoutes(e, t?.dest), a = !1;
1636
+ (n ? n.path !== "/" && i["**"] : trimPathRight(e.pathname)) && (this.options.notFoundRoute ? r.push(this.options.notFoundRoute) : a = !0);
1637
+ let o = (() => {
1638
+ if (a) {
1639
+ if (this.options.notFoundMode !== "root") for (let e = r.length - 1; e >= 0; e--) {
1640
+ let t = r[e];
1641
+ if (t.children) return t.id;
1642
+ }
1643
+ return O;
1644
+ }
1645
+ })(), s = r.map((e) => {
1646
+ let n, r = e.options.params?.parse ?? e.options.parseParams;
1647
+ if (r) try {
1648
+ let e = r(i);
1649
+ Object.assign(i, e);
1650
+ } catch (e) {
1651
+ if (n = new PathParamError(e.message, { cause: e }), t?.throwOnError) throw n;
1652
+ return n;
1653
+ }
1654
+ }), c = [], getParentContext = (e) => e?.id ? e.context ?? this.options.context ?? {} : this.options.context ?? {};
1655
+ return r.forEach((n, r) => {
1656
+ var a;
1657
+ let l = c[r - 1], [u, d, f] = (() => {
1658
+ let r = l?.search ?? e.search, i = l?._strictSearch ?? {};
1659
+ try {
1660
+ let e = validateSearch(n.options.validateSearch, { ...r }) ?? {};
1661
+ return [
1662
+ {
1663
+ ...r,
1664
+ ...e
1665
+ },
1666
+ {
1667
+ ...i,
1668
+ ...e
1669
+ },
1670
+ void 0
1671
+ ];
1672
+ } catch (e) {
1673
+ let n = e;
1674
+ if (e instanceof SearchParamError || (n = new SearchParamError(e.message, { cause: e })), t?.throwOnError) throw n;
1675
+ return [
1676
+ r,
1677
+ {},
1678
+ n
1679
+ ];
1680
+ }
1681
+ })(), p = (a = n.options).loaderDeps?.call(a, { search: u }) ?? "", m = p ? JSON.stringify(p) : "", { usedParams: h, interpolatedPath: g } = interpolatePath({
1682
+ path: n.fullPath,
1683
+ params: i,
1684
+ decodeCharMap: this.pathParamsDecodeCharMap
1685
+ }), _ = interpolatePath({
1686
+ path: n.id,
1687
+ params: i,
1688
+ leaveWildcards: !0,
1689
+ decodeCharMap: this.pathParamsDecodeCharMap
1690
+ }).interpolatedPath + m, v = this.getMatch(_), y = this.state.matches.find((e) => e.routeId === n.id), b = y ? "stay" : "enter", x;
1691
+ if (v) x = {
1692
+ ...v,
1693
+ cause: b,
1694
+ params: y ? replaceEqualDeep(y.params, i) : i,
1695
+ _strictParams: h,
1696
+ search: replaceEqualDeep(y ? y.search : v.search, u),
1697
+ _strictSearch: d
1698
+ };
1699
+ else {
1700
+ let e = n.options.loader || n.options.beforeLoad || n.lazyFn || routeNeedsPreload(n) ? "pending" : "success";
1701
+ x = {
1702
+ id: _,
1703
+ index: r,
1704
+ routeId: n.id,
1705
+ params: y ? replaceEqualDeep(y.params, i) : i,
1706
+ _strictParams: h,
1707
+ pathname: joinPaths([this.basepath, g]),
1708
+ updatedAt: Date.now(),
1709
+ search: y ? replaceEqualDeep(y.search, u) : u,
1710
+ _strictSearch: d,
1711
+ searchError: void 0,
1712
+ status: e,
1713
+ isFetching: !1,
1714
+ error: void 0,
1715
+ paramsError: s[r],
1716
+ __routeContext: {},
1717
+ __beforeLoadContext: {},
1718
+ context: {},
1719
+ abortController: new AbortController(),
1720
+ fetchCount: 0,
1721
+ cause: b,
1722
+ loaderDeps: y ? replaceEqualDeep(y.loaderDeps, p) : p,
1723
+ invalid: !1,
1724
+ preload: !1,
1725
+ links: void 0,
1726
+ scripts: void 0,
1727
+ headScripts: void 0,
1728
+ meta: void 0,
1729
+ staticData: n.options.staticData || {},
1730
+ loadPromise: createControlledPromise(),
1731
+ fullPath: n.fullPath
1732
+ };
1733
+ }
1734
+ t?.preload || (x.globalNotFound = o === n.id), x.searchError = f;
1735
+ let S = getParentContext(l);
1736
+ x.context = {
1737
+ ...S,
1738
+ ...x.__routeContext,
1739
+ ...x.__beforeLoadContext
1740
+ }, c.push(x);
1741
+ }), c.forEach((n, r) => {
1742
+ var i, a, o, s;
1743
+ let l = this.looseRoutesById[n.routeId];
1744
+ if (!this.getMatch(n.id) && t?._buildLocation !== !0) {
1745
+ let t = c[r - 1], a = getParentContext(t), o = {
1746
+ deps: n.loaderDeps,
1747
+ params: n.params,
1748
+ context: a,
1749
+ location: e,
1750
+ navigate: (t) => this.navigate({
1751
+ ...t,
1752
+ _fromLocation: e
1753
+ }),
1754
+ buildLocation: this.buildLocation,
1755
+ cause: n.cause,
1756
+ abortController: n.abortController,
1757
+ preload: !!n.preload,
1758
+ matches: c
1759
+ };
1760
+ n.__routeContext = (i = l.options).context?.call(i, o) ?? {}, n.context = {
1761
+ ...a,
1762
+ ...n.__routeContext,
1763
+ ...n.__beforeLoadContext
1764
+ };
1765
+ }
1766
+ if (n.status === "success") {
1767
+ n.headers = (a = l.options).headers?.call(a, { loaderData: n.loaderData });
1768
+ let e = {
1769
+ matches: c,
1770
+ match: n,
1771
+ params: n.params,
1772
+ loaderData: n.loaderData
1773
+ }, t = (o = l.options).head?.call(o, e);
1774
+ n.links = t?.links, n.headScripts = t?.scripts, n.meta = t?.meta, n.scripts = (s = l.options).scripts?.call(s, e);
1775
+ }
1776
+ }), c;
1777
+ }
1778
+ }, SearchParamError = class extends Error {}, PathParamError = class extends Error {};
1779
+ function getInitialRouterState(e) {
1780
+ return {
1781
+ loadedAt: 0,
1782
+ isLoading: !1,
1783
+ isTransitioning: !1,
1784
+ status: "idle",
1785
+ resolvedLocation: void 0,
1786
+ location: e,
1787
+ matches: [],
1788
+ pendingMatches: [],
1789
+ cachedMatches: [],
1790
+ statusCode: 200
1791
+ };
1792
+ }
1793
+ function validateSearch(e, t) {
1794
+ if (e == null) return {};
1795
+ if ("~standard" in e) {
1796
+ let n = e["~standard"].validate(t);
1797
+ if (n instanceof Promise) throw new SearchParamError("Async validation not supported");
1798
+ if (n.issues) throw new SearchParamError(JSON.stringify(n.issues, void 0, 2), { cause: n });
1799
+ return n.value;
1800
+ }
1801
+ return "parse" in e ? e.parse(t) : typeof e == "function" ? e(t) : {};
1802
+ }
1803
+ var k = [
1804
+ "component",
1805
+ "errorComponent",
1806
+ "pendingComponent",
1807
+ "notFoundComponent"
1808
+ ];
1809
+ function routeNeedsPreload(e) {
1810
+ for (let t of k) if (e.options[t]?.preload) return !0;
1811
+ return !1;
1812
+ }
1813
+ //#endregion
1814
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/link.js
1815
+ var A = "Error preloading route! ☝️", BaseRoute = class {
1816
+ constructor(e) {
1817
+ if (this.init = (e) => {
1818
+ var t;
1819
+ this.originalIndex = e.originalIndex;
1820
+ let n = this.options, r = !n?.path && !n?.id;
1821
+ if (this.parentRoute = (t = this.options).getParentRoute?.call(t), r) this._path = O;
1822
+ else if (!this.parentRoute) throw Error("Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");
1823
+ let i = r ? O : n?.path;
1824
+ i && i !== "/" && (i = trimPathLeft(i));
1825
+ let a = n?.id || i, o = r ? O : joinPaths([this.parentRoute.id === "__root__" ? "" : this.parentRoute.id, a]);
1826
+ i === "__root__" && (i = "/"), o !== "__root__" && (o = joinPaths(["/", o]));
1827
+ let s = o === "__root__" ? "/" : joinPaths([this.parentRoute.fullPath, i]);
1828
+ this._path = i, this._id = o, this._fullPath = s, this._to = s, this._ssr = n?.ssr ?? e.defaultSsr ?? !0;
1829
+ }, this.addChildren = (e) => this._addFileChildren(e), this._addFileChildren = (e) => (Array.isArray(e) && (this.children = e), typeof e == "object" && e && (this.children = Object.values(e)), this), this._addFileTypes = () => this, this.updateLoader = (e) => (Object.assign(this.options, e), this), this.update = (e) => (Object.assign(this.options, e), this), this.lazy = (e) => (this.lazyFn = e, this), this.options = e || {}, this.isRoot = !e?.getParentRoute, e?.id && e?.path) throw Error("Route cannot have both an 'id' and a 'path' option.");
1830
+ }
1831
+ get to() {
1832
+ return this._to;
1833
+ }
1834
+ get id() {
1835
+ return this._id;
1836
+ }
1837
+ get path() {
1838
+ return this._path;
1839
+ }
1840
+ get fullPath() {
1841
+ return this._fullPath;
1842
+ }
1843
+ get ssr() {
1844
+ return this._ssr;
1845
+ }
1846
+ }, BaseRootRoute = class extends BaseRoute {
1847
+ constructor(e) {
1848
+ super(e);
1849
+ }
1850
+ };
1851
+ //#endregion
1852
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.114.25/node_modules/@tanstack/router-core/dist/esm/searchMiddleware.js
1853
+ function stripSearchParams(e) {
1854
+ return ({ search: t, next: n }) => {
1855
+ if (e === !0) return {};
1856
+ let r = n(t);
1857
+ return Array.isArray(e) ? e.forEach((e) => {
1858
+ delete r[e];
1859
+ }) : Object.entries(e).forEach(([e, t]) => {
1860
+ deepEqual(r[e], t) && delete r[e];
1861
+ }), r;
1862
+ };
1863
+ }
1864
+ //#endregion
1865
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/CatchBoundary.js
1866
+ function CatchBoundary(e) {
1867
+ let n = e.errorComponent ?? ErrorComponent;
1868
+ return /* @__PURE__ */ i(CatchBoundaryImpl, {
1869
+ getResetKey: e.getResetKey,
1870
+ onCatch: e.onCatch,
1871
+ children: ({ error: r, reset: i }) => r ? t.createElement(n, {
1872
+ error: r,
1873
+ reset: i
1874
+ }) : e.children
1875
+ });
1876
+ }
1877
+ var CatchBoundaryImpl = class extends t.Component {
1878
+ constructor() {
1879
+ super(...arguments), this.state = { error: null };
1880
+ }
1881
+ static getDerivedStateFromProps(e) {
1882
+ return { resetKey: e.getResetKey() };
1883
+ }
1884
+ static getDerivedStateFromError(e) {
1885
+ return { error: e };
1886
+ }
1887
+ reset() {
1888
+ this.setState({ error: null });
1889
+ }
1890
+ componentDidUpdate(e, t) {
1891
+ t.error && t.resetKey !== this.state.resetKey && this.reset();
1892
+ }
1893
+ componentDidCatch(e, t) {
1894
+ this.props.onCatch && this.props.onCatch(e, t);
1895
+ }
1896
+ render() {
1897
+ return this.props.children({
1898
+ error: this.state.resetKey === this.props.getResetKey() ? this.state.error : null,
1899
+ reset: () => {
1900
+ this.reset();
1901
+ }
1902
+ });
1903
+ }
1904
+ };
1905
+ function ErrorComponent({ error: e }) {
1906
+ let [n, r] = t.useState(!1);
1907
+ return /* @__PURE__ */ a("div", {
1908
+ style: {
1909
+ padding: ".5rem",
1910
+ maxWidth: "100%"
1911
+ },
1912
+ children: [
1913
+ /* @__PURE__ */ a("div", {
1914
+ style: {
1915
+ display: "flex",
1916
+ alignItems: "center",
1917
+ gap: ".5rem"
1918
+ },
1919
+ children: [/* @__PURE__ */ i("strong", {
1920
+ style: { fontSize: "1rem" },
1921
+ children: "Something went wrong!"
1922
+ }), /* @__PURE__ */ i("button", {
1923
+ style: {
1924
+ appearance: "none",
1925
+ fontSize: ".6em",
1926
+ border: "1px solid currentColor",
1927
+ padding: ".1rem .2rem",
1928
+ fontWeight: "bold",
1929
+ borderRadius: ".25rem"
1930
+ },
1931
+ onClick: () => r((e) => !e),
1932
+ children: n ? "Hide Error" : "Show Error"
1933
+ })]
1934
+ }),
1935
+ /* @__PURE__ */ i("div", { style: { height: ".25rem" } }),
1936
+ n ? /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i("pre", {
1937
+ style: {
1938
+ fontSize: ".7em",
1939
+ border: "1px solid red",
1940
+ borderRadius: ".25rem",
1941
+ padding: ".3rem",
1942
+ color: "red",
1943
+ overflow: "auto"
1944
+ },
1945
+ children: e.message ? /* @__PURE__ */ i("code", { children: e.message }) : null
1946
+ }) }) : null
1947
+ ]
1948
+ });
1949
+ }
1950
+ //#endregion
1951
+ //#region ../../node_modules/.pnpm/@tanstack+react-store@0.7.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-store/dist/esm/index.js
1952
+ function useStore(e, t = (e) => e) {
1953
+ return o(e.subscribe, () => e.state, () => e.state, t, shallow);
1954
+ }
1955
+ function shallow(e, t) {
1956
+ if (Object.is(e, t)) return !0;
1957
+ if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
1958
+ if (e instanceof Map && t instanceof Map) {
1959
+ if (e.size !== t.size) return !1;
1960
+ for (let [n, r] of e) if (!t.has(n) || !Object.is(r, t.get(n))) return !1;
1961
+ return !0;
1962
+ }
1963
+ if (e instanceof Set && t instanceof Set) {
1964
+ if (e.size !== t.size) return !1;
1965
+ for (let n of e) if (!t.has(n)) return !1;
1966
+ return !0;
1967
+ }
1968
+ let n = Object.keys(e);
1969
+ if (n.length !== Object.keys(t).length) return !1;
1970
+ for (let r = 0; r < n.length; r++) if (!Object.prototype.hasOwnProperty.call(t, n[r]) || !Object.is(e[n[r]], t[n[r]])) return !1;
1971
+ return !0;
1972
+ }
1973
+ //#endregion
1974
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/routerContext.js
1975
+ var j = t.createContext(null);
1976
+ function getRouterContext() {
1977
+ return typeof document > "u" ? j : window.__TSR_ROUTER_CONTEXT__ ? window.__TSR_ROUTER_CONTEXT__ : (window.__TSR_ROUTER_CONTEXT__ = j, j);
1978
+ }
1979
+ //#endregion
1980
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useRouter.js
1981
+ function useRouter(e) {
1982
+ let n = t.useContext(getRouterContext());
1983
+ return warning(!((e?.warn ?? !0) && !n), "useRouter must be used inside a <RouterProvider> component!"), n;
1984
+ }
1985
+ //#endregion
1986
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useRouterState.js
1987
+ function useRouterState(e) {
1988
+ let t = useRouter({ warn: e?.router === void 0 }), r = e?.router || t, i = n(void 0);
1989
+ return useStore(r.__store, (t) => {
1990
+ if (e?.select) {
1991
+ if (e.structuralSharing ?? r.options.defaultStructuralSharing) {
1992
+ let n = replaceEqualDeep(i.current, e.select(t));
1993
+ return i.current = n, n;
1994
+ }
1995
+ return e.select(t);
1996
+ }
1997
+ return t;
1998
+ });
1999
+ }
2000
+ //#endregion
2001
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/matchContext.js
2002
+ var M = t.createContext(void 0), N = t.createContext(void 0);
2003
+ //#endregion
2004
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useMatch.js
2005
+ function useMatch(e) {
2006
+ let n = t.useContext(e.from ? N : M);
2007
+ return useRouterState({
2008
+ select: (t) => {
2009
+ let r = t.matches.find((t) => e.from ? e.from === t.routeId : t.id === n);
2010
+ if (invariant(!((e.shouldThrow ?? !0) && !r), `Could not find ${e.from ? `an active match from "${e.from}"` : "a nearest match!"}`), r !== void 0) return e.select ? e.select(r) : r;
2011
+ },
2012
+ structuralSharing: e.structuralSharing
2013
+ });
2014
+ }
2015
+ //#endregion
2016
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useLoaderData.js
2017
+ function useLoaderData(e) {
2018
+ return useMatch({
2019
+ from: e.from,
2020
+ strict: e.strict,
2021
+ structuralSharing: e.structuralSharing,
2022
+ select: (t) => e.select ? e.select(t.loaderData) : t.loaderData
2023
+ });
2024
+ }
2025
+ //#endregion
2026
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useLoaderDeps.js
2027
+ function useLoaderDeps(e) {
2028
+ let { select: t, ...n } = e;
2029
+ return useMatch({
2030
+ ...n,
2031
+ select: (e) => t ? t(e.loaderDeps) : e.loaderDeps
2032
+ });
2033
+ }
2034
+ //#endregion
2035
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useParams.js
2036
+ function useParams(e) {
2037
+ return useMatch({
2038
+ from: e.from,
2039
+ strict: e.strict,
2040
+ shouldThrow: e.shouldThrow,
2041
+ structuralSharing: e.structuralSharing,
2042
+ select: (t) => e.select ? e.select(t.params) : t.params
2043
+ });
2044
+ }
2045
+ //#endregion
2046
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useSearch.js
2047
+ function useSearch(e) {
2048
+ return useMatch({
2049
+ from: e.from,
2050
+ strict: e.strict,
2051
+ shouldThrow: e.shouldThrow,
2052
+ structuralSharing: e.structuralSharing,
2053
+ select: (t) => e.select ? e.select(t.search) : t.search
2054
+ });
2055
+ }
2056
+ //#endregion
2057
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useNavigate.js
2058
+ function useNavigate(e) {
2059
+ let { navigate: n } = useRouter();
2060
+ return t.useCallback((t) => n({
2061
+ from: e?.from,
2062
+ ...t
2063
+ }), [e?.from, n]);
2064
+ }
2065
+ function Navigate(e) {
2066
+ let n = useRouter(), r = t.useRef(null);
2067
+ return t.useEffect(() => {
2068
+ r.current !== e && (n.navigate({ ...e }), r.current = e);
2069
+ }, [n, e]), null;
2070
+ }
2071
+ //#endregion
2072
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/route.js
2073
+ var Route = class extends BaseRoute {
2074
+ constructor(e) {
2075
+ super(e), this.useMatch = (e) => useMatch({
2076
+ select: e?.select,
2077
+ from: this.id,
2078
+ structuralSharing: e?.structuralSharing
2079
+ }), this.useRouteContext = (e) => useMatch({
2080
+ ...e,
2081
+ from: this.id,
2082
+ select: (t) => e?.select ? e.select(t.context) : t.context
2083
+ }), this.useSearch = (e) => useSearch({
2084
+ select: e?.select,
2085
+ structuralSharing: e?.structuralSharing,
2086
+ from: this.id
2087
+ }), this.useParams = (e) => useParams({
2088
+ select: e?.select,
2089
+ structuralSharing: e?.structuralSharing,
2090
+ from: this.id
2091
+ }), this.useLoaderDeps = (e) => useLoaderDeps({
2092
+ ...e,
2093
+ from: this.id
2094
+ }), this.useLoaderData = (e) => useLoaderData({
2095
+ ...e,
2096
+ from: this.id
2097
+ }), this.useNavigate = () => useNavigate({ from: this.fullPath }), this.$$typeof = Symbol.for("react.memo");
2098
+ }
2099
+ };
2100
+ function createRoute(e) {
2101
+ return new Route(e);
2102
+ }
2103
+ function createRootRouteWithContext() {
2104
+ return (e) => createRootRoute(e);
2105
+ }
2106
+ var RootRoute = class extends BaseRootRoute {
2107
+ constructor(e) {
2108
+ super(e), this.useMatch = (e) => useMatch({
2109
+ select: e?.select,
2110
+ from: this.id,
2111
+ structuralSharing: e?.structuralSharing
2112
+ }), this.useRouteContext = (e) => useMatch({
2113
+ ...e,
2114
+ from: this.id,
2115
+ select: (t) => e?.select ? e.select(t.context) : t.context
2116
+ }), this.useSearch = (e) => useSearch({
2117
+ select: e?.select,
2118
+ structuralSharing: e?.structuralSharing,
2119
+ from: this.id
2120
+ }), this.useParams = (e) => useParams({
2121
+ select: e?.select,
2122
+ structuralSharing: e?.structuralSharing,
2123
+ from: this.id
2124
+ }), this.useLoaderDeps = (e) => useLoaderDeps({
2125
+ ...e,
2126
+ from: this.id
2127
+ }), this.useLoaderData = (e) => useLoaderData({
2128
+ ...e,
2129
+ from: this.id
2130
+ }), this.useNavigate = () => useNavigate({ from: this.fullPath });
2131
+ }
2132
+ };
2133
+ function createRootRoute(e) {
2134
+ return new RootRoute(e);
2135
+ }
2136
+ //#endregion
2137
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/fileRoute.js
2138
+ function createFileRoute(e) {
2139
+ return new FileRoute(e, { silent: !0 }).createRoute;
2140
+ }
2141
+ var FileRoute = class {
2142
+ constructor(e, t) {
2143
+ this.path = e, this.createRoute = (e) => {
2144
+ warning(this.silent, "FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.");
2145
+ let t = createRoute(e);
2146
+ return t.isRoot = !1, t;
2147
+ }, this.silent = t?.silent;
2148
+ }
2149
+ };
2150
+ //#endregion
2151
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/not-found.js
2152
+ function CatchNotFound(e) {
2153
+ let t = useRouterState({ select: (e) => `not-found-${e.location.pathname}-${e.status}` });
2154
+ return /* @__PURE__ */ i(CatchBoundary, {
2155
+ getResetKey: () => t,
2156
+ onCatch: (t, n) => {
2157
+ var r;
2158
+ if (isNotFound(t)) (r = e.onCatch) == null || r.call(e, t, n);
2159
+ else throw t;
2160
+ },
2161
+ errorComponent: ({ error: t }) => {
2162
+ if (isNotFound(t)) return e.fallback?.call(e, t);
2163
+ throw t;
2164
+ },
2165
+ children: e.children
2166
+ });
2167
+ }
2168
+ function DefaultGlobalNotFound() {
2169
+ return /* @__PURE__ */ i("p", { children: "Not Found" });
2170
+ }
2171
+ //#endregion
2172
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/SafeFragment.js
2173
+ function SafeFragment(e) {
2174
+ return /* @__PURE__ */ i(r, { children: e.children });
2175
+ }
2176
+ //#endregion
2177
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/renderRouteNotFound.js
2178
+ function renderRouteNotFound(e, t, n) {
2179
+ return t.options.notFoundComponent ? /* @__PURE__ */ i(t.options.notFoundComponent, { data: n }) : e.options.defaultNotFoundComponent ? /* @__PURE__ */ i(e.options.defaultNotFoundComponent, { data: n }) : /* @__PURE__ */ i(DefaultGlobalNotFound, {});
2180
+ }
2181
+ (/* @__PURE__ */ e(((e, t) => {
2182
+ var n = {}, r = n.hasOwnProperty, forOwn = (e, t) => {
2183
+ for (let n in e) r.call(e, n) && t(n, e[n]);
2184
+ }, extend = (e, t) => (t && forOwn(t, (t, n) => {
2185
+ e[t] = n;
2186
+ }), e), forEach = (e, t) => {
2187
+ let n = e.length, r = -1;
2188
+ for (; ++r < n;) t(e[r]);
2189
+ }, fourHexEscape = (e) => "\\u" + ("0000" + e).slice(-4), hexadecimal = (e, t) => {
2190
+ let n = e.toString(16);
2191
+ return t ? n : n.toUpperCase();
2192
+ }, i = n.toString, a = Array.isArray, isBuffer = (e) => typeof Buffer == "function" && Buffer.isBuffer(e), isObject = (e) => i.call(e) == "[object Object]", isString = (e) => typeof e == "string" || i.call(e) == "[object String]", isNumber = (e) => typeof e == "number" || i.call(e) == "[object Number]", isBigInt = (e) => typeof e == "bigint", isFunction = (e) => typeof e == "function", isMap = (e) => i.call(e) == "[object Map]", isSet = (e) => i.call(e) == "[object Set]", o = {
2193
+ "\\": "\\\\",
2194
+ "\b": "\\b",
2195
+ "\f": "\\f",
2196
+ "\n": "\\n",
2197
+ "\r": "\\r",
2198
+ " ": "\\t"
2199
+ }, s = /[\\\b\f\n\r\t]/, c = /[0-9]/, l = /[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, u = /([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g, d = /([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g, jsesc = (e, t) => {
2200
+ let increaseIndentation = () => {
2201
+ h = m, ++t.indentLevel, m = t.indent.repeat(t.indentLevel);
2202
+ }, n = {
2203
+ escapeEverything: !1,
2204
+ minimal: !1,
2205
+ isScriptContext: !1,
2206
+ quotes: "single",
2207
+ wrap: !1,
2208
+ es6: !1,
2209
+ json: !1,
2210
+ compact: !0,
2211
+ lowercaseHex: !1,
2212
+ numbers: "decimal",
2213
+ indent: " ",
2214
+ indentLevel: 0,
2215
+ __inline1__: !1,
2216
+ __inline2__: !1
2217
+ }, r = t && t.json;
2218
+ r && (n.quotes = "double", n.wrap = !0), t = extend(n, t), t.quotes != "single" && t.quotes != "double" && t.quotes != "backtick" && (t.quotes = "single");
2219
+ let i = t.quotes == "double" ? "\"" : t.quotes == "backtick" ? "`" : "'", f = t.compact, p = t.lowercaseHex, m = t.indent.repeat(t.indentLevel), h = "", g = t.__inline1__, _ = t.__inline2__, v = f ? "" : "\n", y, b = !0, x = t.numbers == "binary", S = t.numbers == "octal", C = t.numbers == "decimal", w = t.numbers == "hexadecimal";
2220
+ if (r && e && isFunction(e.toJSON) && (e = e.toJSON()), !isString(e)) {
2221
+ if (isMap(e)) return e.size == 0 ? "new Map()" : (f || (t.__inline1__ = !0, t.__inline2__ = !1), "new Map(" + jsesc(Array.from(e), t) + ")");
2222
+ if (isSet(e)) return e.size == 0 ? "new Set()" : "new Set(" + jsesc(Array.from(e), t) + ")";
2223
+ if (isBuffer(e)) return e.length == 0 ? "Buffer.from([])" : "Buffer.from(" + jsesc(Array.from(e), t) + ")";
2224
+ if (a(e)) return y = [], t.wrap = !0, g && (t.__inline1__ = !1, t.__inline2__ = !0), _ || increaseIndentation(), forEach(e, (e) => {
2225
+ b = !1, _ && (t.__inline2__ = !1), y.push((f || _ ? "" : m) + jsesc(e, t));
2226
+ }), b ? "[]" : _ ? "[" + y.join(", ") + "]" : "[" + v + y.join("," + v) + v + (f ? "" : h) + "]";
2227
+ if (isNumber(e) || isBigInt(e)) {
2228
+ if (r) return JSON.stringify(Number(e));
2229
+ let t;
2230
+ if (C) t = String(e);
2231
+ else if (w) {
2232
+ let n = e.toString(16);
2233
+ p || (n = n.toUpperCase()), t = "0x" + n;
2234
+ } else x ? t = "0b" + e.toString(2) : S && (t = "0o" + e.toString(8));
2235
+ return isBigInt(e) ? t + "n" : t;
2236
+ } else if (isBigInt(e)) return r ? JSON.stringify(Number(e)) : e + "n";
2237
+ else if (isObject(e)) return y = [], t.wrap = !0, increaseIndentation(), forOwn(e, (e, n) => {
2238
+ b = !1, y.push((f ? "" : m) + jsesc(e, t) + ":" + (f ? "" : " ") + jsesc(n, t));
2239
+ }), b ? "{}" : "{" + v + y.join("," + v) + v + (f ? "" : h) + "}";
2240
+ else return r ? JSON.stringify(e) || "null" : String(e);
2241
+ }
2242
+ let T = t.escapeEverything ? u : d;
2243
+ return y = e.replace(T, (e, n, a, u, d, f) => {
2244
+ if (n) {
2245
+ if (t.minimal) return n;
2246
+ let e = n.charCodeAt(0), r = n.charCodeAt(1);
2247
+ return t.es6 ? "\\u{" + hexadecimal((e - 55296) * 1024 + r - 56320 + 65536, p) + "}" : fourHexEscape(hexadecimal(e, p)) + fourHexEscape(hexadecimal(r, p));
2248
+ }
2249
+ if (a) return fourHexEscape(hexadecimal(a.charCodeAt(0), p));
2250
+ if (e == "\0" && !r && !c.test(f.charAt(d + 1))) return "\\0";
2251
+ if (u) return u == i || t.escapeEverything ? "\\" + u : u;
2252
+ if (s.test(e)) return o[e];
2253
+ if (t.minimal && !l.test(e)) return e;
2254
+ let m = hexadecimal(e.charCodeAt(0), p);
2255
+ return r || m.length > 2 ? fourHexEscape(m) : "\\x" + ("00" + m).slice(-2);
2256
+ }), i == "`" && (y = y.replace(/\$\{/g, "\\${")), t.isScriptContext && (y = y.replace(/<\/(script|style)/gi, "<\\/$1").replace(/<!--/g, r ? "\\u003C!--" : "\\x3C!--")), t.wrap && (y = i + y + i), y;
2257
+ };
2258
+ jsesc.version = "3.0.2", t.exports = jsesc;
2259
+ })))();
2260
+ function ScriptOnce({ children: e, log: t }) {
2261
+ return typeof document < "u" ? null : /* @__PURE__ */ i("script", {
2262
+ className: "tsr-once",
2263
+ dangerouslySetInnerHTML: { __html: [
2264
+ e,
2265
+ "",
2266
+ "if (typeof __TSR_SSR__ !== \"undefined\") __TSR_SSR__.cleanScripts()"
2267
+ ].filter(Boolean).join("\n") }
2268
+ });
2269
+ }
2270
+ //#endregion
2271
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/scroll-restoration.js
2272
+ function ScrollRestoration() {
2273
+ let e = useRouter(), t = (e.options.getScrollRestorationKey || defaultGetScrollRestorationKey)(e.latestLocation), n = t === defaultGetScrollRestorationKey(e.latestLocation) ? null : t;
2274
+ return !e.isScrollRestoring || !e.isServer ? null : /* @__PURE__ */ i(ScriptOnce, {
2275
+ children: `(${restoreScroll.toString()})(${JSON.stringify(S)},${JSON.stringify(n)}, undefined, true)`,
2276
+ log: !1
2277
+ });
2278
+ }
2279
+ //#endregion
2280
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/Match.js
2281
+ var P = t.memo(function MatchImpl({ matchId: e }) {
2282
+ let n = useRouter(), o = useRouterState({ select: (t) => t.matches.find((t) => t.id === e)?.routeId });
2283
+ invariant(o, `Could not find routeId for matchId "${e}". Please file an issue!`);
2284
+ let s = n.routesById[o], c = s.options.pendingComponent ?? n.options.defaultPendingComponent, l = c ? /* @__PURE__ */ i(c, {}) : null, u = s.options.errorComponent ?? n.options.defaultErrorComponent, d = s.options.onCatch ?? n.options.defaultOnCatch, f = s.isRoot ? s.options.notFoundComponent ?? n.options.notFoundRoute?.options.component : s.options.notFoundComponent, p = (!s.isRoot || s.options.wrapInSuspense) && (s.options.wrapInSuspense ?? c ?? s.options.errorComponent?.preload) ? t.Suspense : SafeFragment, m = u ? CatchBoundary : SafeFragment, h = f ? CatchNotFound : SafeFragment, g = useRouterState({ select: (e) => e.loadedAt }), _ = useRouterState({ select: (t) => {
2285
+ let n = t.matches.findIndex((t) => t.id === e);
2286
+ return t.matches[n - 1]?.routeId;
2287
+ } });
2288
+ return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(M.Provider, {
2289
+ value: e,
2290
+ children: /* @__PURE__ */ i(p, {
2291
+ fallback: l,
2292
+ children: /* @__PURE__ */ i(m, {
2293
+ getResetKey: () => g,
2294
+ errorComponent: u || ErrorComponent,
2295
+ onCatch: (t, n) => {
2296
+ if (isNotFound(t)) throw t;
2297
+ warning(!1, `Error in route match: ${e}`), d?.(t, n);
2298
+ },
2299
+ children: /* @__PURE__ */ i(h, {
2300
+ fallback: (e) => {
2301
+ if (!f || e.routeId && e.routeId !== o || !e.routeId && !s.isRoot) throw e;
2302
+ return t.createElement(f, e);
2303
+ },
2304
+ children: /* @__PURE__ */ i(F, { matchId: e })
2305
+ })
2306
+ })
2307
+ })
2308
+ }), _ === "__root__" && n.options.scrollRestoration ? /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(OnRendered, {}), /* @__PURE__ */ i(ScrollRestoration, {})] }) : null] });
2309
+ });
2310
+ function OnRendered() {
2311
+ let e = useRouter(), n = t.useRef(void 0);
2312
+ return /* @__PURE__ */ i("script", {
2313
+ suppressHydrationWarning: !0,
2314
+ ref: (t) => {
2315
+ t && (n.current === void 0 || n.current.href !== e.state.resolvedLocation?.href) && (e.emit({
2316
+ type: "onRendered",
2317
+ ...getLocationChangeInfo(e.state)
2318
+ }), n.current = e.state.resolvedLocation);
2319
+ }
2320
+ }, e.state.resolvedLocation?.state.key);
2321
+ }
2322
+ var F = t.memo(function MatchInnerImpl({ matchId: e }) {
2323
+ let n = useRouter(), { match: r, key: a, routeId: o } = useRouterState({
2324
+ select: (t) => {
2325
+ let r = t.matches.findIndex((t) => t.id === e), i = t.matches[r], a = i.routeId, o = (n.routesById[a].options.remountDeps ?? n.options.defaultRemountDeps)?.({
2326
+ routeId: a,
2327
+ loaderDeps: i.loaderDeps,
2328
+ params: i._strictParams,
2329
+ search: i._strictSearch
2330
+ });
2331
+ return {
2332
+ key: o ? JSON.stringify(o) : void 0,
2333
+ routeId: a,
2334
+ match: pick(i, [
2335
+ "id",
2336
+ "status",
2337
+ "error"
2338
+ ])
2339
+ };
2340
+ },
2341
+ structuralSharing: !0
2342
+ }), s = n.routesById[o], c = t.useMemo(() => {
2343
+ let e = s.options.component ?? n.options.defaultComponent;
2344
+ return e ? /* @__PURE__ */ i(e, {}, a) : /* @__PURE__ */ i(I, {});
2345
+ }, [
2346
+ a,
2347
+ s.options.component,
2348
+ n.options.defaultComponent
2349
+ ]), l = (s.options.errorComponent ?? n.options.defaultErrorComponent) || ErrorComponent;
2350
+ if (r.status === "notFound") return invariant(isNotFound(r.error), "Expected a notFound error"), renderRouteNotFound(n, s, r.error);
2351
+ if (r.status === "redirected") throw invariant(isRedirect(r.error), "Expected a redirect error"), n.getMatch(r.id)?.loadPromise;
2352
+ if (r.status === "error") {
2353
+ if (n.isServer) return /* @__PURE__ */ i(l, {
2354
+ error: r.error,
2355
+ reset: void 0,
2356
+ info: { componentStack: "" }
2357
+ });
2358
+ throw r.error;
2359
+ }
2360
+ if (r.status === "pending") {
2361
+ let e = s.options.pendingMinMs ?? n.options.defaultPendingMinMs;
2362
+ if (e && !n.getMatch(r.id)?.minPendingPromise && !n.isServer) {
2363
+ let t = createControlledPromise();
2364
+ Promise.resolve().then(() => {
2365
+ n.updateMatch(r.id, (e) => ({
2366
+ ...e,
2367
+ minPendingPromise: t
2368
+ }));
2369
+ }), setTimeout(() => {
2370
+ t.resolve(), n.updateMatch(r.id, (e) => ({
2371
+ ...e,
2372
+ minPendingPromise: void 0
2373
+ }));
2374
+ }, e);
2375
+ }
2376
+ throw n.getMatch(r.id)?.loadPromise;
2377
+ }
2378
+ return c;
2379
+ }), I = t.memo(function OutletImpl() {
2380
+ let e = useRouter(), n = t.useContext(M), r = useRouterState({ select: (e) => e.matches.find((e) => e.id === n)?.routeId }), a = e.routesById[r], o = useRouterState({ select: (e) => {
2381
+ let t = e.matches.find((e) => e.id === n);
2382
+ return invariant(t, `Could not find parent match for matchId "${n}"`), t.globalNotFound;
2383
+ } }), s = useRouterState({ select: (e) => {
2384
+ let t = e.matches;
2385
+ return t[t.findIndex((e) => e.id === n) + 1]?.id;
2386
+ } });
2387
+ if (o) return renderRouteNotFound(e, a, void 0);
2388
+ if (!s) return null;
2389
+ let c = /* @__PURE__ */ i(P, { matchId: s }), l = e.options.defaultPendingComponent ? /* @__PURE__ */ i(e.options.defaultPendingComponent, {}) : null;
2390
+ return n === "__root__" ? /* @__PURE__ */ i(t.Suspense, {
2391
+ fallback: l,
2392
+ children: c
2393
+ }) : c;
2394
+ }), L = typeof window < "u" ? t.useLayoutEffect : t.useEffect;
2395
+ function usePrevious(e) {
2396
+ let n = t.useRef({
2397
+ value: e,
2398
+ prev: null
2399
+ }), r = n.current.value;
2400
+ return e !== r && (n.current = {
2401
+ value: e,
2402
+ prev: r
2403
+ }), n.current.prev;
2404
+ }
2405
+ function useIntersectionObserver(e, n, r = {}, i = {}) {
2406
+ let a = t.useRef(typeof IntersectionObserver == "function"), o = t.useRef(null);
2407
+ return t.useEffect(() => {
2408
+ if (!(!e.current || !a.current || i.disabled)) return o.current = new IntersectionObserver(([e]) => {
2409
+ n(e);
2410
+ }, r), o.current.observe(e.current), () => {
2411
+ var e;
2412
+ (e = o.current) == null || e.disconnect();
2413
+ };
2414
+ }, [
2415
+ n,
2416
+ r,
2417
+ i.disabled,
2418
+ e
2419
+ ]), o.current;
2420
+ }
2421
+ function useForwardedRef(e) {
2422
+ let n = t.useRef(null);
2423
+ return t.useImperativeHandle(e, () => n.current, []), n;
2424
+ }
2425
+ //#endregion
2426
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/Transitioner.js
2427
+ function Transitioner() {
2428
+ let e = useRouter(), n = t.useRef({
2429
+ router: e,
2430
+ mounted: !1
2431
+ }), r = useRouterState({ select: ({ isLoading: e }) => e }), [i, a] = t.useState(!1), o = useRouterState({
2432
+ select: (e) => e.matches.some((e) => e.status === "pending"),
2433
+ structuralSharing: !0
2434
+ }), s = usePrevious(r), c = r || i || o, l = usePrevious(c), u = r || o, d = usePrevious(u);
2435
+ return e.isServer || (e.startTransition = (e) => {
2436
+ a(!0), t.startTransition(() => {
2437
+ e(), a(!1);
2438
+ });
2439
+ }), t.useEffect(() => {
2440
+ let t = e.history.subscribe(e.load), n = e.buildLocation({
2441
+ to: e.latestLocation.pathname,
2442
+ search: !0,
2443
+ params: !0,
2444
+ hash: !0,
2445
+ state: !0,
2446
+ _includeValidateSearch: !0
2447
+ });
2448
+ return trimPathRight(e.latestLocation.href) !== trimPathRight(n.href) && e.commitLocation({
2449
+ ...n,
2450
+ replace: !0
2451
+ }), () => {
2452
+ t();
2453
+ };
2454
+ }, [e, e.history]), L(() => {
2455
+ if (typeof window < "u" && e.clientSsr || n.current.router === e && n.current.mounted) return;
2456
+ n.current = {
2457
+ router: e,
2458
+ mounted: !0
2459
+ };
2460
+ let tryLoad = async () => {
2461
+ try {
2462
+ await e.load();
2463
+ } catch (e) {
2464
+ console.error(e);
2465
+ }
2466
+ };
2467
+ tryLoad();
2468
+ }, [e]), L(() => {
2469
+ s && !r && e.emit({
2470
+ type: "onLoad",
2471
+ ...getLocationChangeInfo(e.state)
2472
+ });
2473
+ }, [
2474
+ s,
2475
+ e,
2476
+ r
2477
+ ]), L(() => {
2478
+ d && !u && e.emit({
2479
+ type: "onBeforeRouteMount",
2480
+ ...getLocationChangeInfo(e.state)
2481
+ });
2482
+ }, [
2483
+ u,
2484
+ d,
2485
+ e
2486
+ ]), L(() => {
2487
+ l && !c && (e.emit({
2488
+ type: "onResolved",
2489
+ ...getLocationChangeInfo(e.state)
2490
+ }), e.__store.setState((e) => ({
2491
+ ...e,
2492
+ status: "idle",
2493
+ resolvedLocation: e.location
2494
+ })));
2495
+ }, [
2496
+ c,
2497
+ l,
2498
+ e
2499
+ ]), null;
2500
+ }
2501
+ //#endregion
2502
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/Matches.js
2503
+ function Matches() {
2504
+ let e = useRouter(), n = e.options.defaultPendingComponent ? /* @__PURE__ */ i(e.options.defaultPendingComponent, {}) : null, r = /* @__PURE__ */ a(e.isServer || typeof document < "u" && e.clientSsr ? SafeFragment : t.Suspense, {
2505
+ fallback: n,
2506
+ children: [/* @__PURE__ */ i(Transitioner, {}), /* @__PURE__ */ i(MatchesInner, {})]
2507
+ });
2508
+ return e.options.InnerWrap ? /* @__PURE__ */ i(e.options.InnerWrap, { children: r }) : r;
2509
+ }
2510
+ function MatchesInner() {
2511
+ let e = useRouterState({ select: (e) => e.matches[0]?.id }), t = useRouterState({ select: (e) => e.loadedAt });
2512
+ return /* @__PURE__ */ i(M.Provider, {
2513
+ value: e,
2514
+ children: /* @__PURE__ */ i(CatchBoundary, {
2515
+ getResetKey: () => t,
2516
+ errorComponent: ErrorComponent,
2517
+ onCatch: (e) => {
2518
+ warning(!1, "The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!"), warning(!1, e.message || e.toString());
2519
+ },
2520
+ children: e ? /* @__PURE__ */ i(P, { matchId: e }) : null
2521
+ })
2522
+ });
2523
+ }
2524
+ function useMatches(e) {
2525
+ return useRouterState({
2526
+ select: (t) => {
2527
+ let n = t.matches;
2528
+ return e?.select ? e.select(n) : n;
2529
+ },
2530
+ structuralSharing: e?.structuralSharing
2531
+ });
2532
+ }
2533
+ //#endregion
2534
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/link.js
2535
+ function useLinkProps(e, n) {
2536
+ let r = useRouter(), [i, a] = t.useState(!1), o = t.useRef(!1), c = useForwardedRef(n), { activeProps = () => ({ className: "active" }), inactiveProps = () => ({}), activeOptions: l, to: u, preload: d, preloadDelay: f, hashScrollIntoView: p, replace: m, startTransition: h, resetScroll: g, viewTransition: _, children: v, target: y, disabled: b, style: x, className: S, onClick: C, onFocus: w, onMouseEnter: T, onMouseLeave: E, onTouchStart: D, ignoreBlocker: O, ...k } = e, { params: j, search: M, hash: N, state: P, mask: F, reloadDocument: I, ...R } = k, z = t.useMemo(() => {
2537
+ try {
2538
+ return new URL(`${u}`), "external";
2539
+ } catch {}
2540
+ return "internal";
2541
+ }, [u]), B = useRouterState({
2542
+ select: (e) => e.location.search,
2543
+ structuralSharing: !0
2544
+ }), V = useMatches({ select: (t) => e.from ?? t[t.length - 1]?.fullPath }), H = t.useMemo(() => ({
2545
+ ...e,
2546
+ from: V
2547
+ }), [e, V]), U = t.useMemo(() => r.buildLocation(H), [
2548
+ r,
2549
+ H,
2550
+ B
2551
+ ]), W = t.useMemo(() => H.reloadDocument ? !1 : d ?? r.options.defaultPreload, [
2552
+ r.options.defaultPreload,
2553
+ d,
2554
+ H.reloadDocument
2555
+ ]), G = f ?? r.options.defaultPreloadDelay ?? 0, K = useRouterState({ select: (e) => {
2556
+ if (l?.exact) {
2557
+ if (!exactPathTest(e.location.pathname, U.pathname, r.basepath)) return !1;
2558
+ } else {
2559
+ let t = removeTrailingSlash(e.location.pathname, r.basepath).split("/");
2560
+ if (!removeTrailingSlash(U.pathname, r.basepath).split("/").every((e, n) => e === t[n])) return !1;
2561
+ }
2562
+ return (l?.includeSearch ?? !0) && !deepEqual(e.location.search, U.search, {
2563
+ partial: !l?.exact,
2564
+ ignoreUndefined: !l?.explicitUndefined
2565
+ }) ? !1 : l?.includeHash ? e.location.hash === U.hash : !0;
2566
+ } }), q = t.useCallback(() => {
2567
+ r.preloadRoute(H).catch((e) => {
2568
+ console.warn(e), console.warn(A);
2569
+ });
2570
+ }, [H, r]);
2571
+ if (useIntersectionObserver(c, t.useCallback((e) => {
2572
+ e?.isIntersecting && q();
2573
+ }, [q]), { rootMargin: "100px" }, { disabled: !!b || W !== "viewport" }), L(() => {
2574
+ o.current || !b && W === "render" && (q(), o.current = !0);
2575
+ }, [
2576
+ b,
2577
+ q,
2578
+ W
2579
+ ]), z === "external") return {
2580
+ ...R,
2581
+ ref: c,
2582
+ type: z,
2583
+ href: u,
2584
+ ...v && { children: v },
2585
+ ...y && { target: y },
2586
+ ...b && { disabled: b },
2587
+ ...x && { style: x },
2588
+ ...S && { className: S },
2589
+ ...C && { onClick: C },
2590
+ ...w && { onFocus: w },
2591
+ ...T && { onMouseEnter: T },
2592
+ ...E && { onMouseLeave: E },
2593
+ ...D && { onTouchStart: D }
2594
+ };
2595
+ let handleClick = (e) => {
2596
+ if (!b && !isCtrlEvent(e) && !e.defaultPrevented && (!y || y === "_self") && e.button === 0) {
2597
+ e.preventDefault(), s(() => {
2598
+ a(!0);
2599
+ });
2600
+ let t = r.subscribe("onResolved", () => {
2601
+ t(), a(!1);
2602
+ });
2603
+ return r.navigate({
2604
+ ...H,
2605
+ replace: m,
2606
+ resetScroll: g,
2607
+ hashScrollIntoView: p,
2608
+ startTransition: h,
2609
+ viewTransition: _,
2610
+ ignoreBlocker: O
2611
+ });
2612
+ }
2613
+ }, handleFocus = (e) => {
2614
+ b || W && q();
2615
+ }, J = handleFocus, handleEnter = (e) => {
2616
+ if (b) return;
2617
+ let t = e.target || {};
2618
+ if (W) {
2619
+ if (t.preloadTimeout) return;
2620
+ t.preloadTimeout = setTimeout(() => {
2621
+ t.preloadTimeout = null, q();
2622
+ }, G);
2623
+ }
2624
+ }, handleLeave = (e) => {
2625
+ if (b) return;
2626
+ let t = e.target || {};
2627
+ t.preloadTimeout &&= (clearTimeout(t.preloadTimeout), null);
2628
+ }, composeHandlers = (e) => (t) => {
2629
+ var n;
2630
+ (n = t.persist) == null || n.call(t), e.filter(Boolean).forEach((e) => {
2631
+ t.defaultPrevented || e(t);
2632
+ });
2633
+ }, Y = K ? functionalUpdate(activeProps, {}) ?? {} : {}, X = K ? {} : functionalUpdate(inactiveProps, {}), Z = [
2634
+ S,
2635
+ Y.className,
2636
+ X.className
2637
+ ].filter(Boolean).join(" "), Q = {
2638
+ ...x,
2639
+ ...Y.style,
2640
+ ...X.style
2641
+ };
2642
+ return {
2643
+ ...R,
2644
+ ...Y,
2645
+ ...X,
2646
+ href: b ? void 0 : U.maskedLocation ? r.history.createHref(U.maskedLocation.href) : r.history.createHref(U.href),
2647
+ ref: c,
2648
+ onClick: composeHandlers([C, handleClick]),
2649
+ onFocus: composeHandlers([w, handleFocus]),
2650
+ onMouseEnter: composeHandlers([T, handleEnter]),
2651
+ onMouseLeave: composeHandlers([E, handleLeave]),
2652
+ onTouchStart: composeHandlers([D, J]),
2653
+ disabled: !!b,
2654
+ target: y,
2655
+ ...Object.keys(Q).length && { style: Q },
2656
+ ...Z && { className: Z },
2657
+ ...b && {
2658
+ role: "link",
2659
+ "aria-disabled": !0
2660
+ },
2661
+ ...K && {
2662
+ "data-status": "active",
2663
+ "aria-current": "page"
2664
+ },
2665
+ ...i && { "data-transitioning": "transitioning" }
2666
+ };
2667
+ }
2668
+ var R = t.forwardRef((e, n) => {
2669
+ let { _asChild: r, ...i } = e, { type: a, ref: o, ...s } = useLinkProps(i, n), c = typeof i.children == "function" ? i.children({ isActive: s["data-status"] === "active" }) : i.children;
2670
+ return r === void 0 && delete s.disabled, t.createElement(r || "a", {
2671
+ ...s,
2672
+ ref: o
2673
+ }, c);
2674
+ });
2675
+ function isCtrlEvent(e) {
2676
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
2677
+ }
2678
+ //#endregion
2679
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/router.js
2680
+ var createRouter = (e) => new Router(e), Router = class extends RouterCore {
2681
+ constructor(e) {
2682
+ super(e);
2683
+ }
2684
+ };
2685
+ //#endregion
2686
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/RouterProvider.js
2687
+ function RouterContextProvider({ router: e, children: t, ...n }) {
2688
+ e.update({
2689
+ ...e.options,
2690
+ ...n,
2691
+ context: {
2692
+ ...e.options.context,
2693
+ ...n.context
2694
+ }
2695
+ });
2696
+ let r = /* @__PURE__ */ i(getRouterContext().Provider, {
2697
+ value: e,
2698
+ children: t
2699
+ });
2700
+ return e.options.Wrap ? /* @__PURE__ */ i(e.options.Wrap, { children: r }) : r;
2701
+ }
2702
+ function RouterProvider({ router: e, ...t }) {
2703
+ return /* @__PURE__ */ i(RouterContextProvider, {
2704
+ router: e,
2705
+ ...t,
2706
+ children: /* @__PURE__ */ i(Matches, {})
2707
+ });
2708
+ }
2709
+ //#endregion
2710
+ //#region ../../node_modules/.pnpm/@tanstack+react-router@1.114.27_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/useRouteContext.js
2711
+ function useRouteContext(e) {
2712
+ return useMatch({
2713
+ ...e,
2714
+ select: (t) => e.select ? e.select(t.context) : t.context
2715
+ });
2716
+ }
2717
+ //#endregion
2718
+ export { notFound as _, useMatches as a, createRootRouteWithContext as c, useSearch as d, useParams as f, isNotFound as g, redirect as h, R as i, Navigate as l, stripSearchParams as m, RouterProvider as n, I as o, useRouter as p, createRouter as r, createFileRoute as s, useRouteContext as t, useNavigate as u, createBrowserHistory as v, createHashHistory as y };