zudoku 0.66.5 → 0.66.6

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 (113) hide show
  1. package/dist/app/main.d.ts +6 -6
  2. package/dist/config/validators/InputNavigationSchema.d.ts +2 -0
  3. package/dist/config/validators/InputNavigationSchema.js +1 -0
  4. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  5. package/dist/config/validators/NavigationSchema.js +6 -1
  6. package/dist/config/validators/NavigationSchema.js.map +1 -1
  7. package/dist/flat-config.d.ts +1 -0
  8. package/dist/lib/authentication/providers/auth0.js +11 -7
  9. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  10. package/dist/lib/authentication/providers/clerk.js +0 -22
  11. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  12. package/dist/lib/authentication/providers/supabase.js +6 -15
  13. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  14. package/dist/lib/oas/graphql/circular.d.ts +1 -0
  15. package/dist/lib/oas/graphql/circular.js +20 -5
  16. package/dist/lib/oas/graphql/circular.js.map +1 -1
  17. package/dist/lib/plugins/openapi/OperationList.js +5 -1
  18. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  19. package/dist/lib/plugins/openapi/schema/utils.js +11 -3
  20. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  21. package/dist/vite/api/SchemaManager.d.ts +1 -0
  22. package/dist/vite/api/SchemaManager.js +9 -3
  23. package/dist/vite/api/SchemaManager.js.map +1 -1
  24. package/dist/vite/prerender/utils.js +9 -3
  25. package/dist/vite/prerender/utils.js.map +1 -1
  26. package/lib/{ClaudeLogo-ByzA8TYR.js → ClaudeLogo-BpqHBMS8.js} +3 -3
  27. package/lib/{ClaudeLogo-ByzA8TYR.js.map → ClaudeLogo-BpqHBMS8.js.map} +1 -1
  28. package/lib/{Input-nskrp_mj.js → Input-B6YcAPv-.js} +3 -3
  29. package/lib/{Input-nskrp_mj.js.map → Input-B6YcAPv-.js.map} +1 -1
  30. package/lib/{MdxPage-Bh5YNRV9.js → MdxPage-CeFSxGb_.js} +8 -8
  31. package/lib/{MdxPage-Bh5YNRV9.js.map → MdxPage-CeFSxGb_.js.map} +1 -1
  32. package/lib/{Mermaid-CGRoylZf.js → Mermaid-COVtAqcZ.js} +3 -3
  33. package/lib/{Mermaid-CGRoylZf.js.map → Mermaid-COVtAqcZ.js.map} +1 -1
  34. package/lib/{OAuthErrorPage-CsTKz5hX.js → OAuthErrorPage-XTPBOMN8.js} +6 -6
  35. package/lib/{OAuthErrorPage-CsTKz5hX.js.map → OAuthErrorPage-XTPBOMN8.js.map} +1 -1
  36. package/lib/{OasProvider-BBAbJiYa.js → OasProvider-BS4rdzZC.js} +4 -4
  37. package/lib/{OasProvider-BBAbJiYa.js.map → OasProvider-BS4rdzZC.js.map} +1 -1
  38. package/lib/{OperationList-DUxrNisd.js → OperationList-Dg0Nm1tg.js} +128 -125
  39. package/lib/{OperationList-DUxrNisd.js.map → OperationList-Dg0Nm1tg.js.map} +1 -1
  40. package/lib/{RouteGuard-CIN9Ou-r.js → RouteGuard-kCicqF3x.js} +4 -4
  41. package/lib/{RouteGuard-CIN9Ou-r.js.map → RouteGuard-kCicqF3x.js.map} +1 -1
  42. package/lib/{SchemaList-BbnkfjIe.js → SchemaList-DZKBH2WC.js} +7 -7
  43. package/lib/{SchemaList-BbnkfjIe.js.map → SchemaList-DZKBH2WC.js.map} +1 -1
  44. package/lib/{SchemaView-BrUf6_nP.js → SchemaView-DBaqV2yU.js} +94 -91
  45. package/lib/SchemaView-DBaqV2yU.js.map +1 -0
  46. package/lib/{SignUp-AlaaduyY.js → SignUp-DNmOFbLD.js} +4 -4
  47. package/lib/{SignUp-AlaaduyY.js.map → SignUp-DNmOFbLD.js.map} +1 -1
  48. package/lib/{SyntaxHighlight-DveJcTOQ.js → SyntaxHighlight-C75W8uCn.js} +372 -363
  49. package/lib/SyntaxHighlight-C75W8uCn.js.map +1 -0
  50. package/lib/{Toc-B4ShtN-I.js → Toc-ICilS65g.js} +2 -2
  51. package/lib/{Toc-B4ShtN-I.js.map → Toc-ICilS65g.js.map} +1 -1
  52. package/lib/{ZudokuContext-CDJYKqMY.js → ZudokuContext-Ea7gxmGq.js} +2 -2
  53. package/lib/{ZudokuContext-CDJYKqMY.js.map → ZudokuContext-Ea7gxmGq.js.map} +1 -1
  54. package/lib/chunk-EPOLDU6W-C6C8jAwd.js +8558 -0
  55. package/lib/chunk-EPOLDU6W-C6C8jAwd.js.map +1 -0
  56. package/lib/{circular-CuSWVYOZ.js → circular-DleWPaPP.js} +767 -747
  57. package/lib/{circular-CuSWVYOZ.js.map → circular-DleWPaPP.js.map} +1 -1
  58. package/lib/{createServer-B1_RUTJP.js → createServer-nqMW9kro.js} +4 -4
  59. package/lib/{createServer-B1_RUTJP.js.map → createServer-nqMW9kro.js.map} +1 -1
  60. package/lib/{errors-iDfQAr_v.js → errors-D2FbERKl.js} +2 -2
  61. package/lib/{errors-iDfQAr_v.js.map → errors-D2FbERKl.js.map} +1 -1
  62. package/lib/{firebase-I54w2ZsH.js → firebase-Cn9CmB6h.js} +14 -14
  63. package/lib/{firebase-I54w2ZsH.js.map → firebase-Cn9CmB6h.js.map} +1 -1
  64. package/lib/{hook-BxWvqzB0.js → hook-B2nmfmYN.js} +3 -3
  65. package/lib/{hook-BxWvqzB0.js.map → hook-B2nmfmYN.js.map} +1 -1
  66. package/lib/{index-CjTisMeX.js → index-CC4L3gtM.js} +4 -4
  67. package/lib/{index-CjTisMeX.js.map → index-CC4L3gtM.js.map} +1 -1
  68. package/lib/{index-B4puReRo.js → index-CSDW7CHl.js} +12 -12
  69. package/lib/{index-B4puReRo.js.map → index-CSDW7CHl.js.map} +1 -1
  70. package/lib/{index-A5Cre871.js → index-D5NeW2z6.js} +7 -7
  71. package/lib/{index-A5Cre871.js.map → index-D5NeW2z6.js.map} +1 -1
  72. package/lib/{index-Dbrv6d94.js → index-DSKBOdpT.js} +2 -2
  73. package/lib/{index-Dbrv6d94.js.map → index-DSKBOdpT.js.map} +1 -1
  74. package/lib/{index.esm-BxIXRKtj.js → index.esm-B35e7P83.js} +2 -2
  75. package/lib/index.esm-B35e7P83.js.map +1 -0
  76. package/lib/{mutation-Cq0wKBqW.js → mutation-BOYnEDf6.js} +2 -2
  77. package/lib/{mutation-Cq0wKBqW.js.map → mutation-BOYnEDf6.js.map} +1 -1
  78. package/lib/ui/SyntaxHighlight.js +2 -2
  79. package/lib/zudoku.__internal.js +42 -42
  80. package/lib/zudoku.__internal.js.map +1 -1
  81. package/lib/zudoku.auth-auth0.js +16 -16
  82. package/lib/zudoku.auth-auth0.js.map +1 -1
  83. package/lib/zudoku.auth-azureb2c.js +4 -4
  84. package/lib/zudoku.auth-clerk.js +52 -75
  85. package/lib/zudoku.auth-clerk.js.map +1 -1
  86. package/lib/zudoku.auth-firebase.js +4 -4
  87. package/lib/zudoku.auth-openid.js +4 -4
  88. package/lib/zudoku.auth-supabase.js +31 -40
  89. package/lib/zudoku.auth-supabase.js.map +1 -1
  90. package/lib/zudoku.components.js +5 -5
  91. package/lib/zudoku.hooks.js +3 -3
  92. package/lib/zudoku.mermaid.js +3 -3
  93. package/lib/zudoku.plugin-api-catalog.js +4 -4
  94. package/lib/zudoku.plugin-api-keys.js +6 -6
  95. package/lib/zudoku.plugin-custom-pages.js +1 -1
  96. package/lib/zudoku.plugin-markdown.js +1 -1
  97. package/lib/zudoku.plugin-openapi.js +3 -3
  98. package/lib/zudoku.plugin-redirect.js +1 -1
  99. package/lib/zudoku.plugin-search-pagefind.js +3 -3
  100. package/lib/zudoku.router.js +1130 -1404
  101. package/lib/zudoku.router.js.map +1 -1
  102. package/package.json +10 -10
  103. package/src/lib/authentication/providers/auth0.tsx +15 -9
  104. package/src/lib/authentication/providers/clerk.tsx +0 -26
  105. package/src/lib/authentication/providers/supabase.tsx +6 -15
  106. package/src/lib/oas/graphql/circular.ts +36 -3
  107. package/src/lib/plugins/openapi/OperationList.tsx +6 -1
  108. package/src/lib/plugins/openapi/schema/utils.ts +15 -4
  109. package/lib/SchemaView-BrUf6_nP.js.map +0 -1
  110. package/lib/SyntaxHighlight-DveJcTOQ.js.map +0 -1
  111. package/lib/chunk-PVWAREVJ-ClM0m2aJ.js +0 -7965
  112. package/lib/chunk-PVWAREVJ-ClM0m2aJ.js.map +0 -1
  113. package/lib/index.esm-BxIXRKtj.js.map +0 -1
@@ -1,98 +1,97 @@
1
- import { e as We, s as $, f as ve, F as j, R as qe, S as Se, g as Ge, h as Xe, E as D, i as Ee, j as X, k as U, l as Ye, n as oe, o as Je, p as Ke, q as _e, t as Qe, v as be, w as Ce, x as A, y as De, z as Ze, A as C, B as et, C as tt, D as rt, G as at, O as nt, H as L, I as ot, J as st, K as it, M as lt, P as T, Q as ut, T as dt, r as ct, U as Z, V as ft, W as ht, X as pt, Y as mt, Z as yt, _ as Rt, $ as wt, a0 as gt, a1 as vt } from "./chunk-PVWAREVJ-ClM0m2aJ.js";
2
- import { a2 as Ur, a3 as Mr, a4 as Nr, a5 as Or, a6 as zr, a7 as Br, a8 as $r, L as jr, a9 as Vr, aa as Wr, ab as qr, ac as Gr, N as Xr, ad as Yr, ae as Jr, af as Kr, ag as Qr, ah as Zr, ai as ea, aj as ta, ak as ra, al as aa, am as na, an as oa, ao as sa, ap as ia, aq as la, ar as ua, as as da, at as ca, au as fa, av as ha, aw as pa, ax as ma, ay as ya, az as Ra, aA as wa, aB as ga, aC as va, aD as Sa, aE as Ea, aF as _a, aG as ba, aH as Ca, aI as Da, aJ as Aa, aK as xa, aL as Fa, m as ka, aM as La, aN as Ta, aO as Ha, aP as Ia, aQ as Pa, aR as Ua, aS as Ma, aT as Na, aU as Oa, aV as za, aW as Ba, aX as $a, aY as ja, aZ as Va, a_ as Wa, a$ as qa, b0 as Ga, a as Xa, c as Ya, b1 as Ja, u as Ka, b2 as Qa, b3 as Za, b4 as en, b5 as tn, d as rn, b6 as an, b7 as nn, b8 as on, b9 as sn, b as ln, ba as un, bb as dn } from "./chunk-PVWAREVJ-ClM0m2aJ.js";
3
- import * as g from "react";
4
- import E from "react";
5
- import * as St from "react-dom";
6
- var k = {}, se;
7
- function Et() {
8
- if (se) return k;
9
- se = 1, Object.defineProperty(k, "__esModule", { value: !0 }), k.parse = o, k.serialize = l;
1
+ import { e as ze, s as Z, f as ve, F as ee, R as $e, S as Ee, g as je, h as qe, E as O, i as Ce, j as J, k as Ve, l as We, n as Xe, o as Je, p as be, q as ne, t as se, v as Q, w as k, x as _e, y as Qe, z as Ge, A as Ke, B as Ye, C as Ze, O as et, D as tt, G as I, H as rt, I as at, r as nt, J as M, K as st, M as oe, P as ot, Q as te, T as P, U as it, V as lt, W as ut } from "./chunk-EPOLDU6W-C6C8jAwd.js";
2
+ import { X as mr, Y as yr, Z as wr, _ as gr, $ as Rr, a0 as Sr, a1 as vr, L as Er, a2 as Cr, a3 as br, a4 as _r, a5 as xr, N as Ar, a6 as Dr, a7 as Hr, a8 as Tr, a9 as kr, aa as Fr, ab as Pr, ac as Ur, ad as Lr, ae as Nr, af as Or, ag as Ir, ah as Br, ai as Mr, aj as zr, ak as $r, al as jr, am as qr, an as Vr, ao as Wr, ap as Xr, aq as Jr, ar as Qr, as as Gr, at as Kr, au as Yr, av as Zr, aw as ea, ax as ta, ay as ra, az as aa, aA as na, aB as sa, aC as oa, aD as ia, aE as la, aF as ua, aG as da, aH as ca, aI as fa, aJ as ha, aK as pa, aL as ma, m as ya, aM as wa, aN as ga, aO as Ra, aP as Sa, aQ as va, aR as Ea, aS as Ca, aT as ba, aU as _a, aV as xa, aW as Aa, aX as Da, aY as Ha, aZ as Ta, a_ as ka, a$ as Fa, b0 as Pa, b1 as Ua, a as La, c as Na, b2 as Oa, u as Ia, b3 as Ba, b4 as Ma, b5 as za, b6 as $a, d as ja, b7 as qa, b8 as Va, b9 as Wa, ba as Xa, b as Ja, bb as Qa, bc as Ga } from "./chunk-EPOLDU6W-C6C8jAwd.js";
3
+ import * as b from "react";
4
+ import _ from "react";
5
+ var N = {}, ie;
6
+ function dt() {
7
+ if (ie) return N;
8
+ ie = 1, Object.defineProperty(N, "__esModule", { value: !0 }), N.parse = o, N.serialize = u;
10
9
  const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, r = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, a = /^[\u0020-\u003A\u003D-\u007E]*$/, n = Object.prototype.toString, s = /* @__PURE__ */ (() => {
11
- const c = function() {
10
+ const d = function() {
12
11
  };
13
- return c.prototype = /* @__PURE__ */ Object.create(null), c;
12
+ return d.prototype = /* @__PURE__ */ Object.create(null), d;
14
13
  })();
15
- function o(c, p) {
16
- const f = new s(), m = c.length;
17
- if (m < 2)
14
+ function o(d, p) {
15
+ const f = new s(), y = d.length;
16
+ if (y < 2)
18
17
  return f;
19
- const y = p?.decode || d;
20
- let R = 0;
18
+ const m = p?.decode || c;
19
+ let g = 0;
21
20
  do {
22
- const S = c.indexOf("=", R);
23
- if (S === -1)
21
+ const w = d.indexOf("=", g);
22
+ if (w === -1)
24
23
  break;
25
- const v = c.indexOf(";", R), w = v === -1 ? m : v;
26
- if (S > w) {
27
- R = c.lastIndexOf(";", S - 1) + 1;
24
+ const R = d.indexOf(";", g), S = R === -1 ? y : R;
25
+ if (w > S) {
26
+ g = d.lastIndexOf(";", w - 1) + 1;
28
27
  continue;
29
28
  }
30
- const _ = u(c, R, S), I = i(c, S, _), ae = c.slice(_, I);
31
- if (f[ae] === void 0) {
32
- let ne = u(c, S + 1, w), je = i(c, w, ne);
33
- const Ve = y(c.slice(ne, je));
34
- f[ae] = Ve;
29
+ const E = l(d, g, w), H = i(d, w, E), x = d.slice(E, H);
30
+ if (f[x] === void 0) {
31
+ let A = l(d, w + 1, S), U = i(d, S, A);
32
+ const v = m(d.slice(A, U));
33
+ f[x] = v;
35
34
  }
36
- R = w + 1;
37
- } while (R < m);
35
+ g = S + 1;
36
+ } while (g < y);
38
37
  return f;
39
38
  }
40
- function u(c, p, f) {
39
+ function l(d, p, f) {
41
40
  do {
42
- const m = c.charCodeAt(p);
43
- if (m !== 32 && m !== 9)
41
+ const y = d.charCodeAt(p);
42
+ if (y !== 32 && y !== 9)
44
43
  return p;
45
44
  } while (++p < f);
46
45
  return f;
47
46
  }
48
- function i(c, p, f) {
47
+ function i(d, p, f) {
49
48
  for (; p > f; ) {
50
- const m = c.charCodeAt(--p);
51
- if (m !== 32 && m !== 9)
49
+ const y = d.charCodeAt(--p);
50
+ if (y !== 32 && y !== 9)
52
51
  return p + 1;
53
52
  }
54
53
  return f;
55
54
  }
56
- function l(c, p, f) {
57
- const m = f?.encode || encodeURIComponent;
58
- if (!e.test(c))
59
- throw new TypeError(`argument name is invalid: ${c}`);
60
- const y = m(p);
61
- if (!t.test(y))
55
+ function u(d, p, f) {
56
+ const y = f?.encode || encodeURIComponent;
57
+ if (!e.test(d))
58
+ throw new TypeError(`argument name is invalid: ${d}`);
59
+ const m = y(p);
60
+ if (!t.test(m))
62
61
  throw new TypeError(`argument val is invalid: ${p}`);
63
- let R = c + "=" + y;
62
+ let g = d + "=" + m;
64
63
  if (!f)
65
- return R;
64
+ return g;
66
65
  if (f.maxAge !== void 0) {
67
66
  if (!Number.isInteger(f.maxAge))
68
67
  throw new TypeError(`option maxAge is invalid: ${f.maxAge}`);
69
- R += "; Max-Age=" + f.maxAge;
68
+ g += "; Max-Age=" + f.maxAge;
70
69
  }
71
70
  if (f.domain) {
72
71
  if (!r.test(f.domain))
73
72
  throw new TypeError(`option domain is invalid: ${f.domain}`);
74
- R += "; Domain=" + f.domain;
73
+ g += "; Domain=" + f.domain;
75
74
  }
76
75
  if (f.path) {
77
76
  if (!a.test(f.path))
78
77
  throw new TypeError(`option path is invalid: ${f.path}`);
79
- R += "; Path=" + f.path;
78
+ g += "; Path=" + f.path;
80
79
  }
81
80
  if (f.expires) {
82
81
  if (!h(f.expires) || !Number.isFinite(f.expires.valueOf()))
83
82
  throw new TypeError(`option expires is invalid: ${f.expires}`);
84
- R += "; Expires=" + f.expires.toUTCString();
83
+ g += "; Expires=" + f.expires.toUTCString();
85
84
  }
86
- if (f.httpOnly && (R += "; HttpOnly"), f.secure && (R += "; Secure"), f.partitioned && (R += "; Partitioned"), f.priority)
85
+ if (f.httpOnly && (g += "; HttpOnly"), f.secure && (g += "; Secure"), f.partitioned && (g += "; Partitioned"), f.priority)
87
86
  switch (typeof f.priority == "string" ? f.priority.toLowerCase() : void 0) {
88
87
  case "low":
89
- R += "; Priority=Low";
88
+ g += "; Priority=Low";
90
89
  break;
91
90
  case "medium":
92
- R += "; Priority=Medium";
91
+ g += "; Priority=Medium";
93
92
  break;
94
93
  case "high":
95
- R += "; Priority=High";
94
+ g += "; Priority=High";
96
95
  break;
97
96
  default:
98
97
  throw new TypeError(`option priority is invalid: ${f.priority}`);
@@ -101,37 +100,37 @@ function Et() {
101
100
  switch (typeof f.sameSite == "string" ? f.sameSite.toLowerCase() : f.sameSite) {
102
101
  case !0:
103
102
  case "strict":
104
- R += "; SameSite=Strict";
103
+ g += "; SameSite=Strict";
105
104
  break;
106
105
  case "lax":
107
- R += "; SameSite=Lax";
106
+ g += "; SameSite=Lax";
108
107
  break;
109
108
  case "none":
110
- R += "; SameSite=None";
109
+ g += "; SameSite=None";
111
110
  break;
112
111
  default:
113
112
  throw new TypeError(`option sameSite is invalid: ${f.sameSite}`);
114
113
  }
115
- return R;
114
+ return g;
116
115
  }
117
- function d(c) {
118
- if (c.indexOf("%") === -1)
119
- return c;
116
+ function c(d) {
117
+ if (d.indexOf("%") === -1)
118
+ return d;
120
119
  try {
121
- return decodeURIComponent(c);
120
+ return decodeURIComponent(d);
122
121
  } catch {
123
- return c;
122
+ return d;
124
123
  }
125
124
  }
126
- function h(c) {
127
- return n.call(c) === "[object Date]";
125
+ function h(d) {
126
+ return n.call(d) === "[object Date]";
128
127
  }
129
- return k;
128
+ return N;
130
129
  }
131
- var ie = Et(), x = { exports: {} }, le;
132
- function _t() {
133
- if (le) return x.exports;
134
- le = 1;
130
+ var le = dt(), L = { exports: {} }, ue;
131
+ function ct() {
132
+ if (ue) return L.exports;
133
+ ue = 1;
135
134
  var e = {
136
135
  decodeValues: !0,
137
136
  map: !1,
@@ -140,55 +139,55 @@ function _t() {
140
139
  function t(o) {
141
140
  return typeof o == "string" && !!o.trim();
142
141
  }
143
- function r(o, u) {
144
- var i = o.split(";").filter(t), l = i.shift(), d = a(l), h = d.name, c = d.value;
145
- u = u ? Object.assign({}, e, u) : e;
142
+ function r(o, l) {
143
+ var i = o.split(";").filter(t), u = i.shift(), c = a(u), h = c.name, d = c.value;
144
+ l = l ? Object.assign({}, e, l) : e;
146
145
  try {
147
- c = u.decodeValues ? decodeURIComponent(c) : c;
146
+ d = l.decodeValues ? decodeURIComponent(d) : d;
148
147
  } catch (f) {
149
148
  console.error(
150
- "set-cookie-parser encountered an error while decoding a cookie with value '" + c + "'. Set options.decodeValues to false to disable this feature.",
149
+ "set-cookie-parser encountered an error while decoding a cookie with value '" + d + "'. Set options.decodeValues to false to disable this feature.",
151
150
  f
152
151
  );
153
152
  }
154
153
  var p = {
155
154
  name: h,
156
- value: c
155
+ value: d
157
156
  };
158
157
  return i.forEach(function(f) {
159
- var m = f.split("="), y = m.shift().trimLeft().toLowerCase(), R = m.join("=");
160
- y === "expires" ? p.expires = new Date(R) : y === "max-age" ? p.maxAge = parseInt(R, 10) : y === "secure" ? p.secure = !0 : y === "httponly" ? p.httpOnly = !0 : y === "samesite" ? p.sameSite = R : y === "partitioned" ? p.partitioned = !0 : p[y] = R;
158
+ var y = f.split("="), m = y.shift().trimLeft().toLowerCase(), g = y.join("=");
159
+ m === "expires" ? p.expires = new Date(g) : m === "max-age" ? p.maxAge = parseInt(g, 10) : m === "secure" ? p.secure = !0 : m === "httponly" ? p.httpOnly = !0 : m === "samesite" ? p.sameSite = g : m === "partitioned" ? p.partitioned = !0 : p[m] = g;
161
160
  }), p;
162
161
  }
163
162
  function a(o) {
164
- var u = "", i = "", l = o.split("=");
165
- return l.length > 1 ? (u = l.shift(), i = l.join("=")) : i = o, { name: u, value: i };
163
+ var l = "", i = "", u = o.split("=");
164
+ return u.length > 1 ? (l = u.shift(), i = u.join("=")) : i = o, { name: l, value: i };
166
165
  }
167
- function n(o, u) {
168
- if (u = u ? Object.assign({}, e, u) : e, !o)
169
- return u.map ? {} : [];
166
+ function n(o, l) {
167
+ if (l = l ? Object.assign({}, e, l) : e, !o)
168
+ return l.map ? {} : [];
170
169
  if (o.headers)
171
170
  if (typeof o.headers.getSetCookie == "function")
172
171
  o = o.headers.getSetCookie();
173
172
  else if (o.headers["set-cookie"])
174
173
  o = o.headers["set-cookie"];
175
174
  else {
176
- var i = o.headers[Object.keys(o.headers).find(function(d) {
177
- return d.toLowerCase() === "set-cookie";
175
+ var i = o.headers[Object.keys(o.headers).find(function(c) {
176
+ return c.toLowerCase() === "set-cookie";
178
177
  })];
179
- !i && o.headers.cookie && !u.silent && console.warn(
178
+ !i && o.headers.cookie && !l.silent && console.warn(
180
179
  "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
181
180
  ), o = i;
182
181
  }
183
- if (Array.isArray(o) || (o = [o]), u.map) {
184
- var l = {};
185
- return o.filter(t).reduce(function(d, h) {
186
- var c = r(h, u);
187
- return d[c.name] = c, d;
188
- }, l);
182
+ if (Array.isArray(o) || (o = [o]), l.map) {
183
+ var u = {};
184
+ return o.filter(t).reduce(function(c, h) {
185
+ var d = r(h, l);
186
+ return c[d.name] = d, c;
187
+ }, u);
189
188
  } else
190
- return o.filter(t).map(function(d) {
191
- return r(d, u);
189
+ return o.filter(t).map(function(c) {
190
+ return r(c, l);
192
191
  });
193
192
  }
194
193
  function s(o) {
@@ -196,32 +195,32 @@ function _t() {
196
195
  return o;
197
196
  if (typeof o != "string")
198
197
  return [];
199
- var u = [], i = 0, l, d, h, c, p;
198
+ var l = [], i = 0, u, c, h, d, p;
200
199
  function f() {
201
200
  for (; i < o.length && /\s/.test(o.charAt(i)); )
202
201
  i += 1;
203
202
  return i < o.length;
204
203
  }
205
- function m() {
206
- return d = o.charAt(i), d !== "=" && d !== ";" && d !== ",";
204
+ function y() {
205
+ return c = o.charAt(i), c !== "=" && c !== ";" && c !== ",";
207
206
  }
208
207
  for (; i < o.length; ) {
209
- for (l = i, p = !1; f(); )
210
- if (d = o.charAt(i), d === ",") {
211
- for (h = i, i += 1, f(), c = i; i < o.length && m(); )
208
+ for (u = i, p = !1; f(); )
209
+ if (c = o.charAt(i), c === ",") {
210
+ for (h = i, i += 1, f(), d = i; i < o.length && y(); )
212
211
  i += 1;
213
- i < o.length && o.charAt(i) === "=" ? (p = !0, i = c, u.push(o.substring(l, h)), l = i) : i = h + 1;
212
+ i < o.length && o.charAt(i) === "=" ? (p = !0, i = d, l.push(o.substring(u, h)), u = i) : i = h + 1;
214
213
  } else
215
214
  i += 1;
216
- (!p || i >= o.length) && u.push(o.substring(l, o.length));
215
+ (!p || i >= o.length) && l.push(o.substring(u, o.length));
217
216
  }
218
- return u;
217
+ return l;
219
218
  }
220
- return x.exports = n, x.exports.parse = n, x.exports.parseString = r, x.exports.splitCookiesString = s, x.exports;
219
+ return L.exports = n, L.exports.parse = n, L.exports.parseString = r, L.exports.splitCookiesString = s, L.exports;
221
220
  }
222
- var bt = /* @__PURE__ */ _t();
221
+ var ft = /* @__PURE__ */ ct();
223
222
  /**
224
- * react-router v7.8.2
223
+ * react-router v7.12.0
225
224
  *
226
225
  * Copyright (c) Remix Software Inc.
227
226
  *
@@ -230,13 +229,13 @@ var bt = /* @__PURE__ */ _t();
230
229
  *
231
230
  * @license MIT
232
231
  */
233
- function gr({
232
+ function er({
234
233
  context: e,
235
234
  url: t,
236
235
  nonce: r
237
236
  }) {
238
237
  typeof t == "string" && (t = new URL(t));
239
- let { manifest: a, routeModules: n, criticalCss: s, serverHandoffString: o } = e, u = We(
238
+ let { manifest: a, routeModules: n, criticalCss: s, serverHandoffString: o } = e, l = ze(
240
239
  a.routes,
241
240
  n,
242
241
  e.future,
@@ -245,18 +244,18 @@ function gr({
245
244
  e.staticHandlerContext.loaderData = {
246
245
  ...e.staticHandlerContext.loaderData
247
246
  };
248
- for (let l of e.staticHandlerContext.matches) {
249
- let d = l.route.id, h = n[d], c = e.manifest.routes[d];
250
- h && c && $(
251
- d,
247
+ for (let u of e.staticHandlerContext.matches) {
248
+ let c = u.route.id, h = n[c], d = e.manifest.routes[c];
249
+ h && d && Z(
250
+ c,
252
251
  h.clientLoader,
253
- c.hasLoader,
252
+ d.hasLoader,
254
253
  e.isSpaMode
255
- ) && (h.HydrateFallback || !c.hasLoader) && delete e.staticHandlerContext.loaderData[d];
254
+ ) && (h.HydrateFallback || !d.hasLoader) && delete e.staticHandlerContext.loaderData[c];
256
255
  }
257
- let i = ve(u, e.staticHandlerContext);
258
- return /* @__PURE__ */ g.createElement(g.Fragment, null, /* @__PURE__ */ g.createElement(
259
- j.Provider,
256
+ let i = ve(l, e.staticHandlerContext);
257
+ return /* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.createElement(
258
+ ee.Provider,
260
259
  {
261
260
  value: {
262
261
  manifest: a,
@@ -271,16 +270,16 @@ function gr({
271
270
  renderMeta: e.renderMeta
272
271
  }
273
272
  },
274
- /* @__PURE__ */ g.createElement(qe, { location: i.state.location }, /* @__PURE__ */ g.createElement(
275
- Se,
273
+ /* @__PURE__ */ b.createElement($e, { location: i.state.location }, /* @__PURE__ */ b.createElement(
274
+ Ee,
276
275
  {
277
276
  router: i,
278
277
  context: e.staticHandlerContext,
279
278
  hydrate: !1
280
279
  }
281
280
  ))
282
- ), e.serverHandoffStream ? /* @__PURE__ */ g.createElement(g.Suspense, null, /* @__PURE__ */ g.createElement(
283
- Ge,
281
+ ), e.serverHandoffStream ? /* @__PURE__ */ b.createElement(b.Suspense, null, /* @__PURE__ */ b.createElement(
282
+ je,
284
283
  {
285
284
  context: e,
286
285
  identifier: 0,
@@ -290,19 +289,20 @@ function gr({
290
289
  }
291
290
  )) : null);
292
291
  }
293
- function vr(e, t) {
292
+ function tr(e, t) {
294
293
  return function({
295
294
  initialEntries: a,
296
295
  initialIndex: n,
297
296
  hydrationData: s,
298
297
  future: o
299
298
  }) {
300
- let u = g.useRef(), i = g.useRef();
301
- if (u.current == null) {
299
+ let l = b.useRef(), i = b.useRef();
300
+ if (l.current == null) {
302
301
  i.current = {
303
302
  future: {
304
303
  unstable_subResourceIntegrity: o?.unstable_subResourceIntegrity === !0,
305
- unstable_middleware: o?.unstable_middleware === !0
304
+ v8_middleware: o?.v8_middleware === !0,
305
+ unstable_trailingSlashAwareDataRequests: o?.unstable_trailingSlashAwareDataRequests === !0
306
306
  },
307
307
  manifest: {
308
308
  routes: {},
@@ -315,24 +315,24 @@ function vr(e, t) {
315
315
  isSpaMode: !1,
316
316
  routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" }
317
317
  };
318
- let l = Ae(
318
+ let u = xe(
319
319
  // @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
320
320
  // types compared to `AgnosticRouteObject`
321
- Je(e, (d) => d),
322
- t !== void 0 ? t : o?.unstable_middleware ? new X() : {},
321
+ Ve(e, (c) => c),
322
+ t !== void 0 ? t : o?.v8_middleware ? new J() : {},
323
323
  i.current.manifest,
324
324
  i.current.routeModules
325
325
  );
326
- u.current = Ke(l, {
326
+ l.current = We(u, {
327
327
  initialEntries: a,
328
328
  initialIndex: n,
329
329
  hydrationData: s
330
330
  });
331
331
  }
332
- return /* @__PURE__ */ g.createElement(j.Provider, { value: i.current }, /* @__PURE__ */ g.createElement(_e, { router: u.current }));
332
+ return /* @__PURE__ */ b.createElement(ee.Provider, { value: i.current }, /* @__PURE__ */ b.createElement(Xe, { router: l.current }));
333
333
  };
334
334
  }
335
- function Ae(e, t, r, a, n) {
335
+ function xe(e, t, r, a, n) {
336
336
  return e.map((s) => {
337
337
  if (!s.id)
338
338
  throw new Error(
@@ -342,14 +342,20 @@ function Ae(e, t, r, a, n) {
342
342
  id: s.id,
343
343
  path: s.path,
344
344
  index: s.index,
345
- Component: s.Component ? at(s.Component) : void 0,
346
- HydrateFallback: s.HydrateFallback ? rt(s.HydrateFallback) : void 0,
347
- ErrorBoundary: s.ErrorBoundary ? tt(s.ErrorBoundary) : void 0,
345
+ Component: s.Component ? Ze(s.Component) : void 0,
346
+ HydrateFallback: s.HydrateFallback ? Ye(s.HydrateFallback) : void 0,
347
+ ErrorBoundary: s.ErrorBoundary ? Ke(s.ErrorBoundary) : void 0,
348
348
  action: s.action ? (i) => s.action({ ...i, context: t }) : void 0,
349
349
  loader: s.loader ? (i) => s.loader({ ...i, context: t }) : void 0,
350
+ middleware: s.middleware ? s.middleware.map(
351
+ (i) => (...u) => i(
352
+ { ...u[0], context: t },
353
+ u[1]
354
+ )
355
+ ) : void 0,
350
356
  handle: s.handle,
351
357
  shouldRevalidate: s.shouldRevalidate
352
- }, u = {
358
+ }, l = {
353
359
  id: s.id,
354
360
  path: s.path,
355
361
  index: s.index,
@@ -370,14 +376,14 @@ function Ae(e, t, r, a, n) {
370
376
  clientMiddlewareModule: void 0,
371
377
  hydrateFallbackModule: void 0
372
378
  };
373
- return r.routes[o.id] = u, a[s.id] = {
374
- default: o.Component || nt,
379
+ return r.routes[o.id] = l, a[s.id] = {
380
+ default: o.Component || et,
375
381
  ErrorBoundary: o.ErrorBoundary || void 0,
376
382
  handle: s.handle,
377
383
  links: s.links,
378
384
  meta: s.meta,
379
385
  shouldRevalidate: s.shouldRevalidate
380
- }, s.children && (o.children = Ae(
386
+ }, s.children && (o.children = xe(
381
387
  s.children,
382
388
  t,
383
389
  r,
@@ -386,40 +392,40 @@ function Ae(e, t, r, a, n) {
386
392
  )), o;
387
393
  });
388
394
  }
389
- var ee = /* @__PURE__ */ new TextEncoder(), Ct = async (e, t) => {
390
- let r = ee.encode(e), a = await xe(t, ["sign"]), n = await crypto.subtle.sign("HMAC", a, r), s = btoa(String.fromCharCode(...new Uint8Array(n))).replace(
395
+ var re = /* @__PURE__ */ new TextEncoder(), ht = async (e, t) => {
396
+ let r = re.encode(e), a = await Ae(t, ["sign"]), n = await crypto.subtle.sign("HMAC", a, r), s = btoa(String.fromCharCode(...new Uint8Array(n))).replace(
391
397
  /=+$/,
392
398
  ""
393
399
  );
394
400
  return e + "." + s;
395
- }, Dt = async (e, t) => {
396
- let r = e.lastIndexOf("."), a = e.slice(0, r), n = e.slice(r + 1), s = ee.encode(a), o = await xe(t, ["verify"]);
401
+ }, pt = async (e, t) => {
402
+ let r = e.lastIndexOf("."), a = e.slice(0, r), n = e.slice(r + 1), s = re.encode(a), o = await Ae(t, ["verify"]);
397
403
  try {
398
- let u = At(atob(n));
399
- return await crypto.subtle.verify("HMAC", o, u, s) ? a : !1;
404
+ let l = mt(atob(n));
405
+ return await crypto.subtle.verify("HMAC", o, l, s) ? a : !1;
400
406
  } catch {
401
407
  return !1;
402
408
  }
403
- }, xe = async (e, t) => crypto.subtle.importKey(
409
+ }, Ae = async (e, t) => crypto.subtle.importKey(
404
410
  "raw",
405
- ee.encode(e),
411
+ re.encode(e),
406
412
  { name: "HMAC", hash: "SHA-256" },
407
413
  !1,
408
414
  t
409
415
  );
410
- function At(e) {
416
+ function mt(e) {
411
417
  let t = new Uint8Array(e.length);
412
418
  for (let r = 0; r < e.length; r++)
413
419
  t[r] = e.charCodeAt(r);
414
420
  return t;
415
421
  }
416
- var Fe = (e, t = {}) => {
422
+ var De = (e, t = {}) => {
417
423
  let { secrets: r = [], ...a } = {
418
424
  path: "/",
419
425
  sameSite: "lax",
420
426
  ...t
421
427
  };
422
- return Ht(e, a.expires), {
428
+ return vt(e, a.expires), {
423
429
  get name() {
424
430
  return e;
425
431
  },
@@ -431,17 +437,17 @@ var Fe = (e, t = {}) => {
431
437
  },
432
438
  async parse(n, s) {
433
439
  if (!n) return null;
434
- let o = ie.parse(n, { ...a, ...s });
440
+ let o = le.parse(n, { ...a, ...s });
435
441
  if (e in o) {
436
- let u = o[e];
437
- return typeof u == "string" && u !== "" ? await Ft(u, r) : "";
442
+ let l = o[e];
443
+ return typeof l == "string" && l !== "" ? await wt(l, r) : "";
438
444
  } else
439
445
  return null;
440
446
  },
441
447
  async serialize(n, s) {
442
- return ie.serialize(
448
+ return le.serialize(
443
449
  e,
444
- n === "" ? "" : await xt(n, r),
450
+ n === "" ? "" : await yt(n, r),
445
451
  {
446
452
  ...a,
447
453
  ...s
@@ -449,44 +455,44 @@ var Fe = (e, t = {}) => {
449
455
  );
450
456
  }
451
457
  };
452
- }, ke = (e) => e != null && typeof e.name == "string" && typeof e.isSigned == "boolean" && typeof e.parse == "function" && typeof e.serialize == "function";
453
- async function xt(e, t) {
454
- let r = kt(e);
455
- return t.length > 0 && (r = await Ct(r, t[0])), r;
458
+ }, He = (e) => e != null && typeof e.name == "string" && typeof e.isSigned == "boolean" && typeof e.parse == "function" && typeof e.serialize == "function";
459
+ async function yt(e, t) {
460
+ let r = gt(e);
461
+ return t.length > 0 && (r = await ht(r, t[0])), r;
456
462
  }
457
- async function Ft(e, t) {
463
+ async function wt(e, t) {
458
464
  if (t.length > 0) {
459
465
  for (let r of t) {
460
- let a = await Dt(e, r);
466
+ let a = await pt(e, r);
461
467
  if (a !== !1)
462
- return ue(a);
468
+ return de(a);
463
469
  }
464
470
  return null;
465
471
  }
466
- return ue(e);
472
+ return de(e);
467
473
  }
468
- function kt(e) {
469
- return btoa(Tt(encodeURIComponent(JSON.stringify(e))));
474
+ function gt(e) {
475
+ return btoa(St(encodeURIComponent(JSON.stringify(e))));
470
476
  }
471
- function ue(e) {
477
+ function de(e) {
472
478
  try {
473
- return JSON.parse(decodeURIComponent(Lt(atob(e))));
479
+ return JSON.parse(decodeURIComponent(Rt(atob(e))));
474
480
  } catch {
475
481
  return {};
476
482
  }
477
483
  }
478
- function Lt(e) {
484
+ function Rt(e) {
479
485
  let t = e.toString(), r = "", a = 0, n, s;
480
486
  for (; a < t.length; )
481
- n = t.charAt(a++), /[\w*+\-./@]/.exec(n) ? r += n : (s = n.charCodeAt(0), s < 256 ? r += "%" + de(s, 2) : r += "%u" + de(s, 4).toUpperCase());
487
+ n = t.charAt(a++), /[\w*+\-./@]/.exec(n) ? r += n : (s = n.charCodeAt(0), s < 256 ? r += "%" + ce(s, 2) : r += "%u" + ce(s, 4).toUpperCase());
482
488
  return r;
483
489
  }
484
- function de(e, t) {
490
+ function ce(e, t) {
485
491
  let r = e.toString(16);
486
492
  for (; r.length < t; ) r = "0" + r;
487
493
  return r;
488
494
  }
489
- function Tt(e) {
495
+ function St(e) {
490
496
  let t = e.toString(), r = "", a = 0, n, s;
491
497
  for (; a < t.length; ) {
492
498
  if (n = t.charAt(a++), n === "%") {
@@ -504,47 +510,47 @@ function Tt(e) {
504
510
  }
505
511
  return r;
506
512
  }
507
- function Ht(e, t) {
508
- De(
513
+ function vt(e, t) {
514
+ _e(
509
515
  !t,
510
516
  `The "${e}" cookie has an "expires" property set. This will cause the expires value to not be updated when the session is committed. Instead, you should set the expires value when serializing the cookie. You can use \`commitSession(session, { expires })\` if using a session storage object, or \`cookie.serialize("value", { expires })\` if you're using the cookie directly.`
511
517
  );
512
518
  }
513
- function It(e) {
519
+ function Et(e) {
514
520
  return Object.keys(e).reduce((t, r) => {
515
521
  let a = e[r];
516
522
  return a && (t[r] = a.module), t;
517
523
  }, {});
518
524
  }
519
- var Pt = /* @__PURE__ */ ((e) => (e.Development = "development", e.Production = "production", e.Test = "test", e))(Pt || {});
520
- function Ut(e) {
525
+ var Ct = /* @__PURE__ */ ((e) => (e.Development = "development", e.Production = "production", e.Test = "test", e))(Ct || {});
526
+ function bt(e) {
521
527
  return e === "development" || e === "production" || e === "test";
522
528
  }
523
- function V(e, t) {
529
+ function q(e, t) {
524
530
  if (e instanceof Error && t !== "development") {
525
531
  let r = new Error("Unexpected Server Error");
526
532
  return r.stack = void 0, r;
527
533
  }
528
534
  return e;
529
535
  }
530
- function O(e, t) {
531
- return Object.entries(e).reduce((r, [a, n]) => Object.assign(r, { [a]: V(n, t) }), {});
536
+ function $(e, t) {
537
+ return Object.entries(e).reduce((r, [a, n]) => Object.assign(r, { [a]: q(n, t) }), {});
532
538
  }
533
- function Le(e, t) {
534
- let r = V(e, t);
539
+ function Te(e, t) {
540
+ let r = q(e, t);
535
541
  return {
536
542
  message: r.message,
537
543
  stack: r.stack
538
544
  };
539
545
  }
540
- function ce(e, t) {
546
+ function fe(e, t) {
541
547
  if (!e) return null;
542
548
  let r = Object.entries(e), a = {};
543
549
  for (let [n, s] of r)
544
- if (A(s))
550
+ if (k(s))
545
551
  a[n] = { ...s, __type: "RouteErrorResponse" };
546
552
  else if (s instanceof Error) {
547
- let o = V(s, t);
553
+ let o = q(s, t);
548
554
  a[n] = {
549
555
  message: o.message,
550
556
  stack: o.stack,
@@ -561,8 +567,8 @@ function ce(e, t) {
561
567
  a[n] = s;
562
568
  return a;
563
569
  }
564
- function Y(e, t, r) {
565
- let a = Ee(
570
+ function G(e, t, r) {
571
+ let a = Ce(
566
572
  e,
567
573
  t,
568
574
  r
@@ -573,17 +579,18 @@ function Y(e, t, r) {
573
579
  route: n.route
574
580
  })) : null;
575
581
  }
576
- async function fe(e, t) {
582
+ async function he(e, t) {
577
583
  let r = await e({
578
- request: Nt(Mt(t.request)),
584
+ request: xt(_t(t.request)),
579
585
  params: t.params,
580
- context: t.context
586
+ context: t.context,
587
+ unstable_pattern: t.unstable_pattern
581
588
  });
582
- if (yt(r) && r.init && r.init.status && Z(r.init.status))
589
+ if (ot(r) && r.init && r.init.status && te(r.init.status))
583
590
  throw new Response(null, r.init);
584
591
  return r;
585
592
  }
586
- function Mt(e) {
593
+ function _t(e) {
587
594
  let t = new URL(e.url), r = t.searchParams.getAll("index");
588
595
  t.searchParams.delete("index");
589
596
  let a = [];
@@ -599,7 +606,7 @@ function Mt(e) {
599
606
  };
600
607
  return n.body && (n.duplex = "half"), new Request(t.href, n);
601
608
  }
602
- function Nt(e) {
609
+ function xt(e) {
603
610
  let t = new URL(e.url);
604
611
  t.searchParams.delete("_routes");
605
612
  let r = {
@@ -610,20 +617,20 @@ function Nt(e) {
610
617
  };
611
618
  return r.body && (r.duplex = "half"), new Request(t.href, r);
612
619
  }
613
- function M(e, t) {
620
+ function z(e, t) {
614
621
  if (e === !1 || e === null || typeof e > "u")
615
622
  throw console.error(
616
623
  "The following error is a bug in React Router; please open an issue! https://github.com/remix-run/react-router/issues/new/choose"
617
624
  ), new Error(t);
618
625
  }
619
- var Te = "__reactRouterDevServerHooks";
620
- function Sr(e) {
621
- globalThis[Te] = e;
626
+ var ke = "__reactRouterDevServerHooks";
627
+ function rr(e) {
628
+ globalThis[ke] = e;
622
629
  }
623
- function W() {
624
- return globalThis[Te];
630
+ function V() {
631
+ return globalThis[ke];
625
632
  }
626
- function He(e, t) {
633
+ function Fe(e, t) {
627
634
  if (typeof process < "u")
628
635
  try {
629
636
  if (process.env?.IS_RR_BUILD_REQUEST === "yes")
@@ -632,7 +639,7 @@ function He(e, t) {
632
639
  }
633
640
  return null;
634
641
  }
635
- function Ie(e) {
642
+ function Pe(e) {
636
643
  let t = {};
637
644
  return Object.values(e).forEach((r) => {
638
645
  if (r) {
@@ -641,53 +648,53 @@ function Ie(e) {
641
648
  }
642
649
  }), t;
643
650
  }
644
- function Pe(e, t = "", r = Ie(e)) {
651
+ function Ue(e, t = "", r = Pe(e)) {
645
652
  return (r[t] || []).map((a) => ({
646
653
  ...a,
647
- children: Pe(e, a.id, r)
654
+ children: Ue(e, a.id, r)
648
655
  }));
649
656
  }
650
- function Ue(e, t, r = "", a = Ie(e)) {
657
+ function Le(e, t, r = "", a = Pe(e)) {
651
658
  return (a[r] || []).map((n) => {
652
659
  let s = {
653
660
  // Always include root due to default boundaries
654
661
  hasErrorBoundary: n.id === "root" || n.module.ErrorBoundary != null,
655
662
  id: n.id,
656
663
  path: n.path,
657
- unstable_middleware: n.module.unstable_middleware,
664
+ middleware: n.module.middleware,
658
665
  // Need to use RR's version in the param typed here to permit the optional
659
666
  // context even though we know it'll always be provided in remix
660
667
  loader: n.module.loader ? async (o) => {
661
- let u = He(
668
+ let l = Fe(
662
669
  o.request,
663
670
  "X-React-Router-Prerender-Data"
664
671
  );
665
- if (u != null) {
666
- let l = u && decodeURI(u);
667
- M(l, "Missing prerendered data for route");
668
- let d = new TextEncoder().encode(l), h = new ReadableStream({
672
+ if (l != null) {
673
+ let u = l && decodeURI(l);
674
+ z(u, "Missing prerendered data for route");
675
+ let c = new TextEncoder().encode(u), h = new ReadableStream({
669
676
  start(f) {
670
- f.enqueue(d), f.close();
677
+ f.enqueue(c), f.close();
671
678
  }
672
- }), p = (await lt(h, global)).value;
673
- if (p && T in p) {
674
- let f = p[T], m = { status: f.status };
675
- throw f.reload ? ut(f.redirect, m) : f.replace ? dt(f.redirect, m) : ct(f.redirect, m);
679
+ }), p = (await tt(h, global)).value;
680
+ if (p && I in p) {
681
+ let f = p[I], y = { status: f.status };
682
+ throw f.reload ? rt(f.redirect, y) : f.replace ? at(f.redirect, y) : nt(f.redirect, y);
676
683
  } else {
677
- M(
684
+ z(
678
685
  p && n.id in p,
679
686
  "Unable to decode prerendered data"
680
687
  );
681
688
  let f = p[n.id];
682
- return M(
689
+ return z(
683
690
  "data" in f,
684
691
  "Unable to process prerendered data"
685
692
  ), f.data;
686
693
  }
687
694
  }
688
- return await fe(n.module.loader, o);
695
+ return await he(n.module.loader, o);
689
696
  } : void 0,
690
- action: n.module.action ? (o) => fe(n.module.action, o) : void 0,
697
+ action: n.module.action ? (o) => he(n.module.action, o) : void 0,
691
698
  handle: n.module.handle
692
699
  };
693
700
  return n.index ? {
@@ -695,7 +702,7 @@ function Ue(e, t, r = "", a = Ie(e)) {
695
702
  ...s
696
703
  } : {
697
704
  caseSensitive: n.caseSensitive,
698
- children: Ue(
705
+ children: Le(
699
706
  e,
700
707
  t,
701
708
  n.id,
@@ -705,182 +712,224 @@ function Ue(e, t, r = "", a = Ie(e)) {
705
712
  };
706
713
  });
707
714
  }
708
- var Ot = {
709
- "&": "\\u0026",
710
- ">": "\\u003e",
711
- "<": "\\u003c",
712
- "\u2028": "\\u2028",
713
- "\u2029": "\\u2029"
714
- }, zt = /[&><\u2028\u2029]/g;
715
- function Bt(e) {
716
- return e.replace(zt, (t) => Ot[t]);
717
- }
718
- function he(e) {
719
- return Bt(JSON.stringify(e));
715
+ function pe(e) {
716
+ return Q(JSON.stringify(e));
720
717
  }
721
- function te(e, t) {
722
- return $t(e, (r) => {
718
+ function ae(e, t) {
719
+ return At(e, (r) => {
723
720
  let a = t.routes[r.route.id];
724
- return M(a, `Route with id "${r.route.id}" not found in build`), a.module.headers;
721
+ return z(a, `Route with id "${r.route.id}" not found in build`), a.module.headers;
725
722
  });
726
723
  }
727
- function $t(e, t, r) {
728
- let a = e.errors ? e.matches.findIndex((u) => e.errors[u.route.id]) : -1, n = a >= 0 ? e.matches.slice(0, a + 1) : e.matches, s;
724
+ function At(e, t, r) {
725
+ let a = e.errors ? e.matches.findIndex((l) => e.errors[l.route.id]) : -1, n = a >= 0 ? e.matches.slice(0, a + 1) : e.matches, s;
729
726
  if (a >= 0) {
730
- let { actionHeaders: u, actionData: i, loaderHeaders: l, loaderData: d } = e;
727
+ let { actionHeaders: l, actionData: i, loaderHeaders: u, loaderData: c } = e;
731
728
  e.matches.slice(a).some((h) => {
732
- let c = h.route.id;
733
- return u[c] && (!i || !i.hasOwnProperty(c)) ? s = u[c] : l[c] && !d.hasOwnProperty(c) && (s = l[c]), s != null;
729
+ let d = h.route.id;
730
+ return l[d] && (!i || !i.hasOwnProperty(d)) ? s = l[d] : u[d] && !c.hasOwnProperty(d) && (s = u[d]), s != null;
734
731
  });
735
732
  }
736
733
  const o = new Headers(r);
737
- return n.reduce((u, i, l) => {
738
- let { id: d } = i.route, h = e.loaderHeaders[d] || new Headers(), c = e.actionHeaders[d] || new Headers(), p = s != null && l === n.length - 1, f = p && s !== h && s !== c, m = t(i);
739
- if (m == null) {
740
- let R = new Headers(u);
741
- return f && b(s, R), b(c, R), b(h, R), R;
734
+ return n.reduce((l, i, u) => {
735
+ let { id: c } = i.route, h = e.loaderHeaders[c] || new Headers(), d = e.actionHeaders[c] || new Headers(), p = s != null && u === n.length - 1, f = p && s !== h && s !== d, y = t(i);
736
+ if (y == null) {
737
+ let g = new Headers(l);
738
+ return f && F(s, g), F(d, g), F(h, g), g;
742
739
  }
743
- let y = new Headers(
744
- typeof m == "function" ? m({
740
+ let m = new Headers(
741
+ typeof y == "function" ? y({
745
742
  loaderHeaders: h,
746
- parentHeaders: u,
747
- actionHeaders: c,
743
+ parentHeaders: l,
744
+ actionHeaders: d,
748
745
  errorHeaders: p ? s : void 0
749
- }) : m
746
+ }) : y
750
747
  );
751
- return f && b(s, y), b(c, y), b(h, y), b(u, y), y;
748
+ return f && F(s, m), F(d, m), F(h, m), F(l, m), m;
752
749
  }, new Headers(o));
753
750
  }
754
- function b(e, t) {
751
+ function F(e, t) {
755
752
  let r = e.get("Set-Cookie");
756
753
  if (r) {
757
- let a = bt.splitCookiesString(r), n = new Set(t.getSetCookie());
754
+ let a = ft.splitCookiesString(r), n = new Set(t.getSetCookie());
758
755
  a.forEach((s) => {
759
756
  n.has(s) || t.append("Set-Cookie", s);
760
757
  });
761
758
  }
762
759
  }
763
- var Me = /* @__PURE__ */ new Set([
764
- ...ft,
760
+ function Ne(e, t) {
761
+ let r = e.get("origin"), a = typeof r == "string" && r !== "null" ? new URL(r).host : r, n = Tt(e);
762
+ if (a && (!n || a !== n.value) && !Ht(a, t))
763
+ throw n ? new Error(
764
+ `${n.type} header does not match \`origin\` header from a forwarded action request. Aborting the action.`
765
+ ) : new Error(
766
+ "`x-forwarded-host` or `host` headers are not provided. One of these is needed to compare the `origin` header from a forwarded action request. Aborting the action."
767
+ );
768
+ }
769
+ function Dt(e, t) {
770
+ const r = e.split("."), a = t.split(".");
771
+ if (a.length < 1 || r.length < a.length || a.length === 1 && (a[0] === "*" || a[0] === "**"))
772
+ return !1;
773
+ for (; a.length; ) {
774
+ const n = a.pop(), s = r.pop();
775
+ switch (n) {
776
+ case "":
777
+ return !1;
778
+ case "*": {
779
+ if (s)
780
+ continue;
781
+ return !1;
782
+ }
783
+ case "**":
784
+ return a.length > 0 ? !1 : s !== void 0;
785
+ case void 0:
786
+ default:
787
+ if (s !== n)
788
+ return !1;
789
+ }
790
+ }
791
+ return r.length === 0;
792
+ }
793
+ function Ht(e, t = []) {
794
+ return t.some(
795
+ (r) => r && (r === e || Dt(e, r))
796
+ );
797
+ }
798
+ function Tt(e) {
799
+ let r = e.get("x-forwarded-host")?.split(",")[0]?.trim(), a = e.get("host");
800
+ return r ? {
801
+ type: "x-forwarded-host",
802
+ value: r
803
+ } : a ? {
804
+ type: "host",
805
+ value: a
806
+ } : void 0;
807
+ }
808
+ var Oe = /* @__PURE__ */ new Set([
809
+ ...lt,
765
810
  304
766
811
  ]);
767
- async function jt(e, t, r, a, n, s, o) {
812
+ async function kt(e, t, r, a, n, s, o) {
768
813
  try {
769
- let d = new Request(n, {
814
+ Ne(
815
+ a.headers,
816
+ Array.isArray(e.allowedActionOrigins) ? e.allowedActionOrigins : []
817
+ );
818
+ let c = new Request(n, {
770
819
  method: a.method,
771
820
  body: a.body,
772
821
  headers: a.headers,
773
822
  signal: a.signal,
774
823
  ...a.body ? { duplex: "half" } : void 0
775
- }), h = await r.query(d, {
824
+ }), h = await r.query(c, {
776
825
  requestContext: s,
777
826
  skipLoaderErrorBubbling: !0,
778
827
  skipRevalidation: !0,
779
- unstable_generateMiddlewareResponse: e.future.unstable_middleware ? async (c) => {
828
+ generateMiddlewareResponse: e.future.v8_middleware ? async (d) => {
780
829
  try {
781
- let p = await c(d);
782
- return u(p);
830
+ let p = await d(c);
831
+ return l(p);
783
832
  } catch (p) {
784
833
  return i(p);
785
834
  }
786
835
  } : void 0
787
836
  });
788
- return u(h);
789
- } catch (d) {
790
- return i(d);
837
+ return l(h);
838
+ } catch (c) {
839
+ return i(c);
791
840
  }
792
- function u(d) {
793
- return C(d) ? d : l(d);
841
+ function l(c) {
842
+ return P(c) ? c : u(c);
794
843
  }
795
- function i(d) {
796
- return o(d), H(a, e, t, {
797
- result: { error: d },
844
+ function i(c) {
845
+ return o(c), B(a, e, t, {
846
+ result: { error: c },
798
847
  headers: new Headers(),
799
848
  status: 500
800
849
  });
801
850
  }
802
- function l(d) {
803
- let h = te(d, e);
804
- if (Z(d.statusCode) && h.has("Location"))
805
- return new Response(null, { status: d.statusCode, headers: h });
806
- d.errors && (Object.values(d.errors).forEach((p) => {
807
- (!A(p) || p.error) && o(p);
808
- }), d.errors = O(d.errors, t));
809
- let c;
810
- return d.errors ? c = { error: Object.values(d.errors)[0] } : c = {
811
- data: Object.values(d.actionData || {})[0]
812
- }, H(a, e, t, {
813
- result: c,
851
+ function u(c) {
852
+ let h = ae(c, e);
853
+ if (te(c.statusCode) && h.has("Location"))
854
+ return new Response(null, { status: c.statusCode, headers: h });
855
+ c.errors && (Object.values(c.errors).forEach((p) => {
856
+ (!k(p) || p.error) && o(p);
857
+ }), c.errors = $(c.errors, t));
858
+ let d;
859
+ return c.errors ? d = { error: Object.values(c.errors)[0] } : d = {
860
+ data: Object.values(c.actionData || {})[0]
861
+ }, B(a, e, t, {
862
+ result: d,
814
863
  headers: h,
815
- status: d.statusCode
864
+ status: c.statusCode
816
865
  });
817
866
  }
818
867
  }
819
- async function Vt(e, t, r, a, n, s, o) {
820
- let u = new URL(a.url).searchParams.get("_routes"), i = u ? new Set(u.split(",")) : null;
868
+ async function Ft(e, t, r, a, n, s, o) {
869
+ let l = new URL(a.url).searchParams.get("_routes"), i = l ? new Set(l.split(",")) : null;
821
870
  try {
822
- let c = new Request(n, {
871
+ let d = new Request(n, {
823
872
  headers: a.headers,
824
873
  signal: a.signal
825
- }), p = await r.query(c, {
874
+ }), p = await r.query(d, {
826
875
  requestContext: s,
827
876
  filterMatchesToLoad: (f) => !i || i.has(f.route.id),
828
877
  skipLoaderErrorBubbling: !0,
829
- unstable_generateMiddlewareResponse: e.future.unstable_middleware ? async (f) => {
878
+ generateMiddlewareResponse: e.future.v8_middleware ? async (f) => {
830
879
  try {
831
- let m = await f(c);
832
- return l(m);
833
- } catch (m) {
834
- return d(m);
880
+ let y = await f(d);
881
+ return u(y);
882
+ } catch (y) {
883
+ return c(y);
835
884
  }
836
885
  } : void 0
837
886
  });
838
- return l(p);
839
- } catch (c) {
840
- return d(c);
887
+ return u(p);
888
+ } catch (d) {
889
+ return c(d);
841
890
  }
842
- function l(c) {
843
- return C(c) ? c : h(c);
891
+ function u(d) {
892
+ return P(d) ? d : h(d);
844
893
  }
845
- function d(c) {
846
- return o(c), H(a, e, t, {
847
- result: { error: c },
894
+ function c(d) {
895
+ return o(d), B(a, e, t, {
896
+ result: { error: d },
848
897
  headers: new Headers(),
849
898
  status: 500
850
899
  });
851
900
  }
852
- function h(c) {
853
- let p = te(c, e);
854
- if (Z(c.statusCode) && p.has("Location"))
855
- return new Response(null, { status: c.statusCode, headers: p });
856
- c.errors && (Object.values(c.errors).forEach((y) => {
857
- (!A(y) || y.error) && o(y);
858
- }), c.errors = O(c.errors, t));
859
- let f = {}, m = new Set(
860
- c.matches.filter(
861
- (y) => i ? i.has(y.route.id) : y.route.loader != null
862
- ).map((y) => y.route.id)
901
+ function h(d) {
902
+ let p = ae(d, e);
903
+ if (te(d.statusCode) && p.has("Location"))
904
+ return new Response(null, { status: d.statusCode, headers: p });
905
+ d.errors && (Object.values(d.errors).forEach((m) => {
906
+ (!k(m) || m.error) && o(m);
907
+ }), d.errors = $(d.errors, t));
908
+ let f = {}, y = new Set(
909
+ d.matches.filter(
910
+ (m) => i ? i.has(m.route.id) : m.route.loader != null
911
+ ).map((m) => m.route.id)
863
912
  );
864
- if (c.errors)
865
- for (let [y, R] of Object.entries(c.errors))
866
- f[y] = { error: R };
867
- for (let [y, R] of Object.entries(c.loaderData))
868
- !(y in f) && m.has(y) && (f[y] = { data: R });
869
- return H(a, e, t, {
913
+ if (d.errors)
914
+ for (let [m, g] of Object.entries(d.errors))
915
+ f[m] = { error: g };
916
+ for (let [m, g] of Object.entries(d.loaderData))
917
+ !(m in f) && y.has(m) && (f[m] = { data: g });
918
+ return B(a, e, t, {
870
919
  result: f,
871
920
  headers: p,
872
- status: c.statusCode
921
+ status: d.statusCode
873
922
  });
874
923
  }
875
924
  }
876
- function H(e, t, r, {
925
+ function B(e, t, r, {
877
926
  result: a,
878
927
  headers: n,
879
928
  status: s
880
929
  }) {
881
930
  let o = new Headers(n);
882
- return o.set("X-Remix-Response", "yes"), Me.has(s) ? new Response(null, { status: s, headers: o }) : (o.set("Content-Type", "text/x-script"), o.delete("Content-Length"), new Response(
883
- J(
931
+ return o.set("X-Remix-Response", "yes"), Oe.has(s) ? new Response(null, { status: s, headers: o }) : (o.set("Content-Type", "text/x-script"), o.delete("Content-Length"), new Response(
932
+ K(
884
933
  a,
885
934
  e.signal,
886
935
  t.entry.module.streamTimeout,
@@ -892,21 +941,21 @@ function H(e, t, r, {
892
941
  }
893
942
  ));
894
943
  }
895
- function pe(e, t, r, a) {
896
- let n = Wt(
944
+ function me(e, t, r, a) {
945
+ let n = Pt(
897
946
  e.status,
898
947
  e.headers,
899
948
  r.basename
900
949
  ), s = new Headers(e.headers);
901
- return s.delete("Location"), s.set("Content-Type", "text/x-script"), H(t, r, a, {
902
- result: t.method === "GET" ? { [T]: n } : n,
950
+ return s.delete("Location"), s.set("Content-Type", "text/x-script"), B(t, r, a, {
951
+ result: t.method === "GET" ? { [I]: n } : n,
903
952
  headers: s,
904
- status: Ce
953
+ status: be
905
954
  });
906
955
  }
907
- function Wt(e, t, r) {
956
+ function Pt(e, t, r) {
908
957
  let a = t.get("Location");
909
- return r && (a = U(a, r) || a), {
958
+ return r && (a = M(a, r) || a), {
910
959
  redirect: a,
911
960
  status: e,
912
961
  revalidate: (
@@ -923,25 +972,25 @@ function Wt(e, t, r) {
923
972
  replace: t.has("X-Remix-Replace")
924
973
  };
925
974
  }
926
- function J(e, t, r, a) {
975
+ function K(e, t, r, a) {
927
976
  let n = new AbortController(), s = setTimeout(
928
977
  () => n.abort(new Error("Server Timeout")),
929
978
  typeof r == "number" ? r : 4950
930
979
  );
931
- return t.addEventListener("abort", () => clearTimeout(s)), ht(e, {
980
+ return t.addEventListener("abort", () => clearTimeout(s)), ut(e, {
932
981
  signal: n.signal,
933
982
  plugins: [
934
983
  (o) => {
935
984
  if (o instanceof Error) {
936
- let { name: u, message: i, stack: l } = a === "production" ? V(o, a) : o;
937
- return ["SanitizedError", u, i, l];
985
+ let { name: l, message: i, stack: u } = a === "production" ? q(o, a) : o;
986
+ return ["SanitizedError", l, i, u];
938
987
  }
939
- if (o instanceof D) {
940
- let { data: u, status: i, statusText: l } = o;
941
- return ["ErrorResponse", u, i, l];
988
+ if (o instanceof O) {
989
+ let { data: l, status: i, statusText: u } = o;
990
+ return ["ErrorResponse", l, i, u];
942
991
  }
943
- if (o && typeof o == "object" && T in o)
944
- return ["SingleFetchRedirect", o[T]];
992
+ if (o && typeof o == "object" && I in o)
993
+ return ["SingleFetchRedirect", o[I]];
945
994
  }
946
995
  ],
947
996
  postPlugins: [
@@ -956,172 +1005,179 @@ function J(e, t, r, a) {
956
1005
  ]
957
1006
  });
958
1007
  }
959
- function me(e, t) {
960
- let r = Pe(e.routes), a = Ue(e.routes, e.future), n = Ut(t) ? t : "production", s = Ze(a, {
961
- basename: e.basename
962
- }), o = e.entry.module.handleError || ((u, { request: i }) => {
963
- n !== "test" && !i.signal.aborted && console.error(
1008
+ function ye(e, t) {
1009
+ let r = Ue(e.routes), a = Le(e.routes, e.future), n = bt(t) ? t : "production", s = Qe(a, {
1010
+ basename: e.basename,
1011
+ unstable_instrumentations: e.entry.module.unstable_instrumentations
1012
+ }), o = e.entry.module.handleError || ((i, { request: u }) => {
1013
+ n !== "test" && !u.signal.aborted && console.error(
964
1014
  // @ts-expect-error This is "private" from users but intended for internal use
965
- A(u) && u.error ? u.error : u
1015
+ k(i) && i.error ? i.error : i
966
1016
  );
967
- });
968
- return {
969
- routes: r,
970
- dataRoutes: a,
971
- serverMode: n,
972
- staticHandler: s,
973
- errorHandler: o
974
- };
975
- }
976
- var Er = (e, t) => {
977
- let r, a, n, s, o;
978
- return async function(i, l) {
979
- if (r = typeof e == "function" ? await e() : e, typeof e == "function") {
980
- let w = me(r, t);
981
- a = w.routes, n = w.serverMode, s = w.staticHandler, o = w.errorHandler;
982
- } else if (!a || !n || !s || !o) {
983
- let w = me(r, t);
984
- a = w.routes, n = w.serverMode, s = w.staticHandler, o = w.errorHandler;
985
- }
986
- let d = {}, h, c = (w) => {
987
- t === "development" && W()?.processRequestError?.(w), o(w, {
1017
+ }), l = async (i, u) => {
1018
+ let c = {}, h, d = (S) => {
1019
+ t === "development" && V()?.processRequestError?.(S), o(S, {
988
1020
  context: h,
989
- params: d,
1021
+ params: c,
990
1022
  request: i
991
1023
  });
992
1024
  };
993
- if (r.future.unstable_middleware) {
994
- if (l && !(l instanceof X)) {
995
- let w = new Error(
996
- "Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `unstable_RouterContextProvider` from your `getLoadContext` function."
1025
+ if (e.future.v8_middleware) {
1026
+ if (u && !(u instanceof J)) {
1027
+ let S = new Error(
1028
+ "Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
997
1029
  );
998
- return c(w), z(w, n);
1030
+ return d(S), j(S, n);
999
1031
  }
1000
- h = l || new X();
1032
+ h = u || new J();
1001
1033
  } else
1002
- h = l || {};
1003
- let p = new URL(i.url), f = r.basename || "/", m = p.pathname;
1004
- U(m, f) === "/_root.data" ? m = f : m.endsWith(".data") && (m = m.replace(/\.data$/, "")), U(m, f) !== "/" && m.endsWith("/") && (m = m.slice(0, -1));
1005
- let y = He(i, "X-React-Router-SPA-Mode") === "yes";
1006
- if (!r.ssr) {
1007
- let w = decodeURI(m);
1034
+ h = u || {};
1035
+ let p = new URL(i.url), f = e.basename || "/", y = p.pathname;
1036
+ e.future.unstable_trailingSlashAwareDataRequests ? y.endsWith("/_.data") ? y = y.replace(/_.data$/, "") : y = y.replace(/\.data$/, "") : (M(y, f) === "/_root.data" ? y = f : y.endsWith(".data") && (y = y.replace(/\.data$/, "")), M(y, f) !== "/" && y.endsWith("/") && (y = y.slice(0, -1)));
1037
+ let m = Fe(i, "X-React-Router-SPA-Mode") === "yes";
1038
+ if (!e.ssr) {
1039
+ let S = decodeURI(y);
1008
1040
  if (f !== "/") {
1009
- let _ = U(w, f);
1010
- if (_ == null)
1041
+ let E = M(S, f);
1042
+ if (E == null)
1011
1043
  return o(
1012
- new D(
1044
+ new O(
1013
1045
  404,
1014
1046
  "Not Found",
1015
- `Refusing to prerender the \`${w}\` path because it does not start with the basename \`${f}\``
1047
+ `Refusing to prerender the \`${S}\` path because it does not start with the basename \`${f}\``
1016
1048
  ),
1017
1049
  {
1018
1050
  context: h,
1019
- params: d,
1051
+ params: c,
1020
1052
  request: i
1021
1053
  }
1022
1054
  ), new Response("Not Found", {
1023
1055
  status: 404,
1024
1056
  statusText: "Not Found"
1025
1057
  });
1026
- w = _;
1058
+ S = E;
1027
1059
  }
1028
- if (r.prerender.length === 0)
1029
- y = !0;
1030
- else if (!r.prerender.includes(w) && !r.prerender.includes(w + "/")) {
1060
+ if (e.prerender.length === 0)
1061
+ m = !0;
1062
+ else if (!e.prerender.includes(S) && !e.prerender.includes(S + "/")) {
1031
1063
  if (p.pathname.endsWith(".data"))
1032
1064
  return o(
1033
- new D(
1065
+ new O(
1034
1066
  404,
1035
1067
  "Not Found",
1036
- `Refusing to SSR the path \`${w}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`
1068
+ `Refusing to SSR the path \`${S}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`
1037
1069
  ),
1038
1070
  {
1039
1071
  context: h,
1040
- params: d,
1072
+ params: c,
1041
1073
  request: i
1042
1074
  }
1043
1075
  ), new Response("Not Found", {
1044
1076
  status: 404,
1045
1077
  statusText: "Not Found"
1046
1078
  });
1047
- y = !0;
1079
+ m = !0;
1048
1080
  }
1049
1081
  }
1050
- let R = Ye(
1051
- r.routeDiscovery.manifestPath,
1082
+ let g = st(
1083
+ e.routeDiscovery.manifestPath,
1052
1084
  f
1053
1085
  );
1054
- if (p.pathname === R)
1086
+ if (p.pathname === g)
1055
1087
  try {
1056
- return await qt(r, a, p);
1057
- } catch (w) {
1058
- return c(w), new Response("Unknown Server Error", { status: 500 });
1088
+ return await Ut(e, r, p);
1089
+ } catch (S) {
1090
+ return d(S), new Response("Unknown Server Error", { status: 500 });
1059
1091
  }
1060
- let S = Y(a, m, r.basename);
1061
- S && S.length > 0 && Object.assign(d, S[0].params);
1062
- let v;
1092
+ let w = G(r, y, e.basename);
1093
+ w && w.length > 0 && Object.assign(c, w[0].params);
1094
+ let R;
1063
1095
  if (p.pathname.endsWith(".data")) {
1064
- let w = new URL(i.url);
1065
- w.pathname = m;
1066
- let _ = Y(
1067
- a,
1068
- w.pathname,
1069
- r.basename
1096
+ let S = new URL(i.url);
1097
+ S.pathname = y;
1098
+ let E = G(
1099
+ r,
1100
+ S.pathname,
1101
+ e.basename
1070
1102
  );
1071
- v = await Gt(
1103
+ R = await Lt(
1072
1104
  n,
1073
- r,
1105
+ e,
1074
1106
  s,
1075
1107
  i,
1076
- w,
1108
+ S,
1077
1109
  h,
1078
- c
1079
- ), oe(v) && (v = pe(
1080
- v,
1110
+ d
1111
+ ), oe(R) && (R = me(
1112
+ R,
1081
1113
  i,
1082
- r,
1114
+ e,
1083
1115
  n
1084
- )), r.entry.module.handleDataRequest && (v = await r.entry.module.handleDataRequest(v, {
1116
+ )), e.entry.module.handleDataRequest && (R = await e.entry.module.handleDataRequest(R, {
1085
1117
  context: h,
1086
- params: _ ? _[0].params : {},
1118
+ params: E ? E[0].params : {},
1087
1119
  request: i
1088
- }), oe(v) && (v = pe(
1089
- v,
1120
+ }), oe(R) && (R = me(
1121
+ R,
1090
1122
  i,
1091
- r,
1123
+ e,
1092
1124
  n
1093
1125
  )));
1094
- } else if (!y && S && S[S.length - 1].route.module.default == null && S[S.length - 1].route.module.ErrorBoundary == null)
1095
- v = await Yt(
1126
+ } else if (!m && w && w[w.length - 1].route.module.default == null && w[w.length - 1].route.module.ErrorBoundary == null)
1127
+ R = await Ot(
1096
1128
  n,
1097
- r,
1129
+ e,
1098
1130
  s,
1099
- S.slice(-1)[0].route.id,
1131
+ w.slice(-1)[0].route.id,
1100
1132
  i,
1101
1133
  h,
1102
- c
1134
+ d
1103
1135
  );
1104
1136
  else {
1105
- let { pathname: w } = p, _;
1106
- r.unstable_getCriticalCss ? _ = await r.unstable_getCriticalCss({ pathname: w }) : t === "development" && W()?.getCriticalCss && (_ = await W()?.getCriticalCss?.(w)), v = await Xt(
1137
+ let { pathname: S } = p, E;
1138
+ e.unstable_getCriticalCss ? E = await e.unstable_getCriticalCss({ pathname: S }) : t === "development" && V()?.getCriticalCss && (E = await V()?.getCriticalCss?.(S)), R = await Nt(
1107
1139
  n,
1108
- r,
1140
+ e,
1109
1141
  s,
1110
1142
  i,
1111
1143
  h,
1112
- c,
1113
- y,
1114
- _
1144
+ d,
1145
+ m,
1146
+ E
1115
1147
  );
1116
1148
  }
1117
1149
  return i.method === "HEAD" ? new Response(null, {
1118
- headers: v.headers,
1119
- status: v.status,
1120
- statusText: v.statusText
1121
- }) : v;
1150
+ headers: R.headers,
1151
+ status: R.status,
1152
+ statusText: R.statusText
1153
+ }) : R;
1154
+ };
1155
+ return e.entry.module.unstable_instrumentations && (l = Ge(
1156
+ l,
1157
+ e.entry.module.unstable_instrumentations.map((i) => i.handler).filter(Boolean)
1158
+ )), {
1159
+ routes: r,
1160
+ dataRoutes: a,
1161
+ serverMode: n,
1162
+ staticHandler: s,
1163
+ errorHandler: o,
1164
+ requestHandler: l
1165
+ };
1166
+ }
1167
+ var ar = (e, t) => {
1168
+ let r, a, n, s, o, l;
1169
+ return async function(u, c) {
1170
+ if (r = typeof e == "function" ? await e() : e, typeof e == "function") {
1171
+ let h = ye(r, t);
1172
+ a = h.routes, n = h.serverMode, s = h.staticHandler, o = h.errorHandler, l = h.requestHandler;
1173
+ } else if (!a || !n || !s || !o || !l) {
1174
+ let h = ye(r, t);
1175
+ a = h.routes, n = h.serverMode, s = h.staticHandler, o = h.errorHandler, l = h.requestHandler;
1176
+ }
1177
+ return l(u, c);
1122
1178
  };
1123
1179
  };
1124
- async function qt(e, t, r) {
1180
+ async function Ut(e, t, r) {
1125
1181
  if (e.assets.version !== r.searchParams.get("version"))
1126
1182
  return new Response(null, {
1127
1183
  status: 204,
@@ -1130,22 +1186,22 @@ async function qt(e, t, r) {
1130
1186
  }
1131
1187
  });
1132
1188
  let a = {};
1133
- if (r.searchParams.has("p")) {
1189
+ if (r.searchParams.has("paths")) {
1134
1190
  let n = /* @__PURE__ */ new Set();
1135
- r.searchParams.getAll("p").forEach((s) => {
1136
- s.startsWith("/") || (s = `/${s}`);
1137
- let o = s.split("/").slice(1);
1138
- o.forEach((u, i) => {
1139
- let l = o.slice(0, i + 1).join("/");
1140
- n.add(`/${l}`);
1191
+ (r.searchParams.get("paths") || "").split(",").filter(Boolean).forEach((l) => {
1192
+ l.startsWith("/") || (l = `/${l}`);
1193
+ let i = l.split("/").slice(1);
1194
+ i.forEach((u, c) => {
1195
+ let h = i.slice(0, c + 1).join("/");
1196
+ n.add(`/${h}`);
1141
1197
  });
1142
1198
  });
1143
- for (let s of n) {
1144
- let o = Y(t, s, e.basename);
1145
- if (o)
1146
- for (let u of o) {
1147
- let i = u.route.id, l = e.assets.routes[i];
1148
- l && (a[i] = l);
1199
+ for (let l of n) {
1200
+ let i = G(t, l, e.basename);
1201
+ if (i)
1202
+ for (let u of i) {
1203
+ let c = u.route.id, h = e.assets.routes[c];
1204
+ h && (a[c] = h);
1149
1205
  }
1150
1206
  }
1151
1207
  return Response.json(a, {
@@ -1156,8 +1212,8 @@ async function qt(e, t, r) {
1156
1212
  }
1157
1213
  return new Response("Invalid Request", { status: 400 });
1158
1214
  }
1159
- async function Gt(e, t, r, a, n, s, o) {
1160
- return a.method !== "GET" ? await jt(
1215
+ async function Lt(e, t, r, a, n, s, o) {
1216
+ return a.method !== "GET" ? await kt(
1161
1217
  t,
1162
1218
  e,
1163
1219
  r,
@@ -1165,7 +1221,7 @@ async function Gt(e, t, r, a, n, s, o) {
1165
1221
  n,
1166
1222
  s,
1167
1223
  o
1168
- ) : await Vt(
1224
+ ) : await Ft(
1169
1225
  t,
1170
1226
  e,
1171
1227
  r,
@@ -1175,51 +1231,55 @@ async function Gt(e, t, r, a, n, s, o) {
1175
1231
  o
1176
1232
  );
1177
1233
  }
1178
- async function Xt(e, t, r, a, n, s, o, u) {
1234
+ async function Nt(e, t, r, a, n, s, o, l) {
1179
1235
  try {
1180
- let l = await r.query(a, {
1236
+ a.method === "POST" && Ne(
1237
+ a.headers,
1238
+ Array.isArray(t.allowedActionOrigins) ? t.allowedActionOrigins : []
1239
+ );
1240
+ let u = await r.query(a, {
1181
1241
  requestContext: n,
1182
- unstable_generateMiddlewareResponse: t.future.unstable_middleware ? async (d) => {
1242
+ generateMiddlewareResponse: t.future.v8_middleware ? async (c) => {
1183
1243
  try {
1184
- let h = await d(a);
1185
- return C(h) || (h = await i(h, o)), h;
1244
+ let h = await c(a);
1245
+ return P(h) || (h = await i(h, o)), h;
1186
1246
  } catch (h) {
1187
1247
  return s(h), new Response(null, { status: 500 });
1188
1248
  }
1189
1249
  } : void 0
1190
1250
  });
1191
- return C(l) || (l = await i(l, o)), l;
1192
- } catch (l) {
1193
- return s(l), new Response(null, { status: 500 });
1251
+ return P(u) || (u = await i(u, o)), u;
1252
+ } catch (u) {
1253
+ return s(u), new Response(null, { status: 500 });
1194
1254
  }
1195
- async function i(l, d) {
1196
- let h = te(l, t);
1197
- if (Me.has(l.statusCode))
1198
- return new Response(null, { status: l.statusCode, headers: h });
1199
- l.errors && (Object.values(l.errors).forEach((y) => {
1200
- (!A(y) || y.error) && s(y);
1201
- }), l.errors = O(l.errors, e));
1202
- let c = {
1203
- loaderData: l.loaderData,
1204
- actionData: l.actionData,
1205
- errors: ce(l.errors, e)
1255
+ async function i(u, c) {
1256
+ let h = ae(u, t);
1257
+ if (Oe.has(u.statusCode))
1258
+ return new Response(null, { status: u.statusCode, headers: h });
1259
+ u.errors && (Object.values(u.errors).forEach((m) => {
1260
+ (!k(m) || m.error) && s(m);
1261
+ }), u.errors = $(u.errors, e));
1262
+ let d = {
1263
+ loaderData: u.loaderData,
1264
+ actionData: u.actionData,
1265
+ errors: fe(u.errors, e)
1206
1266
  }, p = {
1207
1267
  basename: t.basename,
1208
1268
  future: t.future,
1209
1269
  routeDiscovery: t.routeDiscovery,
1210
1270
  ssr: t.ssr,
1211
- isSpaMode: d
1271
+ isSpaMode: c
1212
1272
  }, f = {
1213
1273
  manifest: t.assets,
1214
- routeModules: It(t.routes),
1215
- staticHandlerContext: l,
1216
- criticalCss: u,
1217
- serverHandoffString: he({
1274
+ routeModules: Et(t.routes),
1275
+ staticHandlerContext: u,
1276
+ criticalCss: l,
1277
+ serverHandoffString: pe({
1218
1278
  ...p,
1219
- criticalCss: u
1279
+ criticalCss: l
1220
1280
  }),
1221
- serverHandoffStream: J(
1222
- c,
1281
+ serverHandoffStream: K(
1282
+ d,
1223
1283
  a.signal,
1224
1284
  t.entry.module.streamTimeout,
1225
1285
  e
@@ -1228,46 +1288,46 @@ async function Xt(e, t, r, a, n, s, o, u) {
1228
1288
  future: t.future,
1229
1289
  ssr: t.ssr,
1230
1290
  routeDiscovery: t.routeDiscovery,
1231
- isSpaMode: d,
1232
- serializeError: (y) => Le(y, e)
1233
- }, m = t.entry.module.default;
1291
+ isSpaMode: c,
1292
+ serializeError: (m) => Te(m, e)
1293
+ }, y = t.entry.module.default;
1234
1294
  try {
1235
- return await m(
1295
+ return await y(
1236
1296
  a,
1237
- l.statusCode,
1297
+ u.statusCode,
1238
1298
  h,
1239
1299
  f,
1240
1300
  n
1241
1301
  );
1242
- } catch (y) {
1243
- s(y);
1244
- let R = y;
1245
- if (C(y))
1302
+ } catch (m) {
1303
+ s(m);
1304
+ let g = m;
1305
+ if (P(m))
1246
1306
  try {
1247
- let v = await Kt(y);
1248
- R = new D(
1249
- y.status,
1250
- y.statusText,
1251
- v
1307
+ let R = await Bt(m);
1308
+ g = new O(
1309
+ m.status,
1310
+ m.statusText,
1311
+ R
1252
1312
  );
1253
1313
  } catch {
1254
1314
  }
1255
- l = et(
1315
+ u = it(
1256
1316
  r.dataRoutes,
1257
- l,
1258
- R
1259
- ), l.errors && (l.errors = O(l.errors, e));
1260
- let S = {
1261
- loaderData: l.loaderData,
1262
- actionData: l.actionData,
1263
- errors: ce(l.errors, e)
1317
+ u,
1318
+ g
1319
+ ), u.errors && (u.errors = $(u.errors, e));
1320
+ let w = {
1321
+ loaderData: u.loaderData,
1322
+ actionData: u.actionData,
1323
+ errors: fe(u.errors, e)
1264
1324
  };
1265
1325
  f = {
1266
1326
  ...f,
1267
- staticHandlerContext: l,
1268
- serverHandoffString: he(p),
1269
- serverHandoffStream: J(
1270
- S,
1327
+ staticHandlerContext: u,
1328
+ serverHandoffString: pe(p),
1329
+ serverHandoffStream: K(
1330
+ w,
1271
1331
  a.signal,
1272
1332
  t.entry.module.streamTimeout,
1273
1333
  e
@@ -1275,71 +1335,68 @@ async function Xt(e, t, r, a, n, s, o, u) {
1275
1335
  renderMeta: {}
1276
1336
  };
1277
1337
  try {
1278
- return await m(
1338
+ return await y(
1279
1339
  a,
1280
- l.statusCode,
1340
+ u.statusCode,
1281
1341
  h,
1282
1342
  f,
1283
1343
  n
1284
1344
  );
1285
- } catch (v) {
1286
- return s(v), z(v, e);
1345
+ } catch (R) {
1346
+ return s(R), j(R, e);
1287
1347
  }
1288
1348
  }
1289
1349
  }
1290
1350
  }
1291
- async function Yt(e, t, r, a, n, s, o) {
1351
+ async function Ot(e, t, r, a, n, s, o) {
1292
1352
  try {
1293
- let l = await r.queryRoute(n, {
1353
+ let u = await r.queryRoute(n, {
1294
1354
  routeId: a,
1295
1355
  requestContext: s,
1296
- unstable_generateMiddlewareResponse: t.future.unstable_middleware ? async (d) => {
1356
+ generateMiddlewareResponse: t.future.v8_middleware ? async (c) => {
1297
1357
  try {
1298
- let h = await d(n);
1299
- return u(h);
1358
+ let h = await c(n);
1359
+ return l(h);
1300
1360
  } catch (h) {
1301
1361
  return i(h);
1302
1362
  }
1303
1363
  } : void 0
1304
1364
  });
1305
- return u(l);
1306
- } catch (l) {
1307
- return i(l);
1365
+ return l(u);
1366
+ } catch (u) {
1367
+ return i(u);
1308
1368
  }
1309
- function u(l) {
1310
- return C(l) ? l : typeof l == "string" ? new Response(l) : Response.json(l);
1369
+ function l(u) {
1370
+ return P(u) ? u : typeof u == "string" ? new Response(u) : Response.json(u);
1311
1371
  }
1312
- function i(l) {
1313
- if (C(l))
1314
- return l.headers.set("X-Remix-Catch", "yes"), l;
1315
- if (A(l))
1316
- return o(l), Jt(l, e);
1317
- if (l instanceof Error && l.message === "Expected a response from queryRoute") {
1318
- let d = new Error(
1372
+ function i(u) {
1373
+ if (P(u))
1374
+ return u;
1375
+ if (k(u))
1376
+ return o(u), It(u, e);
1377
+ if (u instanceof Error && u.message === "Expected a response from queryRoute") {
1378
+ let c = new Error(
1319
1379
  "Expected a Response to be returned from resource route handler"
1320
1380
  );
1321
- return o(d), z(d, e);
1381
+ return o(c), j(c, e);
1322
1382
  }
1323
- return o(l), z(l, e);
1383
+ return o(u), j(u, e);
1324
1384
  }
1325
1385
  }
1326
- function Jt(e, t) {
1386
+ function It(e, t) {
1327
1387
  return Response.json(
1328
- Le(
1388
+ Te(
1329
1389
  // @ts-expect-error This is "private" from users but intended for internal use
1330
1390
  e.error || new Error("Unexpected Server Error"),
1331
1391
  t
1332
1392
  ),
1333
1393
  {
1334
1394
  status: e.status,
1335
- statusText: e.statusText,
1336
- headers: {
1337
- "X-Remix-Error": "yes"
1338
- }
1395
+ statusText: e.statusText
1339
1396
  }
1340
1397
  );
1341
1398
  }
1342
- function z(e, t) {
1399
+ function j(e, t) {
1343
1400
  let r = "Unexpected Server Error";
1344
1401
  return t !== "production" && (r += `
1345
1402
 
@@ -1350,14 +1407,14 @@ ${String(e)}`), new Response(r, {
1350
1407
  }
1351
1408
  });
1352
1409
  }
1353
- function Kt(e) {
1410
+ function Bt(e) {
1354
1411
  let t = e.headers.get("Content-Type");
1355
1412
  return t && /\bapplication\/json\b/.test(t) ? e.body == null ? null : e.json() : e.text();
1356
1413
  }
1357
- function q(e) {
1414
+ function W(e) {
1358
1415
  return `__flash_${e}__`;
1359
1416
  }
1360
- var Ne = (e = {}, t = "") => {
1417
+ var Ie = (e = {}, t = "") => {
1361
1418
  let r = new Map(Object.entries(e));
1362
1419
  return {
1363
1420
  get id() {
@@ -1367,11 +1424,11 @@ var Ne = (e = {}, t = "") => {
1367
1424
  return Object.fromEntries(r);
1368
1425
  },
1369
1426
  has(a) {
1370
- return r.has(a) || r.has(q(a));
1427
+ return r.has(a) || r.has(W(a));
1371
1428
  },
1372
1429
  get(a) {
1373
1430
  if (r.has(a)) return r.get(a);
1374
- let n = q(a);
1431
+ let n = W(a);
1375
1432
  if (r.has(n)) {
1376
1433
  let s = r.get(n);
1377
1434
  return r.delete(n), s;
@@ -1381,50 +1438,50 @@ var Ne = (e = {}, t = "") => {
1381
1438
  r.set(a, n);
1382
1439
  },
1383
1440
  flash(a, n) {
1384
- r.set(q(a), n);
1441
+ r.set(W(a), n);
1385
1442
  },
1386
1443
  unset(a) {
1387
1444
  r.delete(a);
1388
1445
  }
1389
1446
  };
1390
- }, _r = (e) => e != null && typeof e.id == "string" && typeof e.data < "u" && typeof e.has == "function" && typeof e.get == "function" && typeof e.set == "function" && typeof e.flash == "function" && typeof e.unset == "function";
1391
- function Qt({
1447
+ }, nr = (e) => e != null && typeof e.id == "string" && typeof e.data < "u" && typeof e.has == "function" && typeof e.get == "function" && typeof e.set == "function" && typeof e.flash == "function" && typeof e.unset == "function";
1448
+ function Mt({
1392
1449
  cookie: e,
1393
1450
  createData: t,
1394
1451
  readData: r,
1395
1452
  updateData: a,
1396
1453
  deleteData: n
1397
1454
  }) {
1398
- let s = ke(e) ? e : Fe(e?.name || "__session", e);
1399
- return Oe(s), {
1400
- async getSession(o, u) {
1401
- let i = o && await s.parse(o, u), l = i && await r(i);
1402
- return Ne(l || {}, i || "");
1455
+ let s = He(e) ? e : De(e?.name || "__session", e);
1456
+ return Be(s), {
1457
+ async getSession(o, l) {
1458
+ let i = o && await s.parse(o, l), u = i && await r(i);
1459
+ return Ie(u || {}, i || "");
1403
1460
  },
1404
- async commitSession(o, u) {
1405
- let { id: i, data: l } = o, d = u?.maxAge != null ? new Date(Date.now() + u.maxAge * 1e3) : u?.expires != null ? u.expires : s.expires;
1406
- return i ? await a(i, l, d) : i = await t(l, d), s.serialize(i, u);
1461
+ async commitSession(o, l) {
1462
+ let { id: i, data: u } = o, c = l?.maxAge != null ? new Date(Date.now() + l.maxAge * 1e3) : l?.expires != null ? l.expires : s.expires;
1463
+ return i ? await a(i, u, c) : i = await t(u, c), s.serialize(i, l);
1407
1464
  },
1408
- async destroySession(o, u) {
1465
+ async destroySession(o, l) {
1409
1466
  return await n(o.id), s.serialize("", {
1410
- ...u,
1467
+ ...l,
1411
1468
  maxAge: void 0,
1412
1469
  expires: /* @__PURE__ */ new Date(0)
1413
1470
  });
1414
1471
  }
1415
1472
  };
1416
1473
  }
1417
- function Oe(e) {
1418
- De(
1474
+ function Be(e) {
1475
+ _e(
1419
1476
  e.isSigned,
1420
1477
  `The "${e.name}" cookie is not signed, but session cookies should be signed to prevent tampering on the client before they are sent back to the server. See https://reactrouter.com/explanation/sessions-and-cookies#signing-cookies for more information.`
1421
1478
  );
1422
1479
  }
1423
- function br({ cookie: e } = {}) {
1424
- let t = ke(e) ? e : Fe(e?.name || "__session", e);
1425
- return Oe(t), {
1480
+ function sr({ cookie: e } = {}) {
1481
+ let t = He(e) ? e : De(e?.name || "__session", e);
1482
+ return Be(t), {
1426
1483
  async getSession(r, a) {
1427
- return Ne(
1484
+ return Ie(
1428
1485
  r && await t.parse(r, a) || {}
1429
1486
  );
1430
1487
  },
@@ -1445,9 +1502,9 @@ function br({ cookie: e } = {}) {
1445
1502
  }
1446
1503
  };
1447
1504
  }
1448
- function Cr({ cookie: e } = {}) {
1505
+ function or({ cookie: e } = {}) {
1449
1506
  let t = /* @__PURE__ */ new Map();
1450
- return Qt({
1507
+ return Mt({
1451
1508
  cookie: e,
1452
1509
  async createData(r, a) {
1453
1510
  let n = Math.random().toString(36).substring(2, 10);
@@ -1470,39 +1527,94 @@ function Cr({ cookie: e } = {}) {
1470
1527
  }
1471
1528
  });
1472
1529
  }
1473
- function Dr(e, ...t) {
1474
- let r = t[0];
1475
- return e.split("/").map((a) => {
1476
- if (a === "*")
1477
- return r ? r["*"] : void 0;
1478
- const n = a.match(/^:([\w-]+)(\?)?/);
1479
- if (!n) return a;
1480
- const s = n[1], o = r ? r[s] : void 0;
1481
- if (n[2] === void 0 && o === void 0)
1482
- throw Error(
1483
- `Path '${e}' requires param '${s}' but it was not provided`
1484
- );
1485
- return o;
1486
- }).filter((a) => a !== void 0).join("/");
1530
+ function ir(e, ...t) {
1531
+ let r = t[0], a = zt(e).replace(
1532
+ /\/:([\w-]+)(\?)?/g,
1533
+ // same regex as in .\router\utils.ts: compilePath().
1534
+ (n, s, o) => {
1535
+ const l = o === void 0, i = r?.[s];
1536
+ if (l && i === void 0)
1537
+ throw new Error(
1538
+ `Path '${e}' requires param '${s}' but it was not provided`
1539
+ );
1540
+ return i === void 0 ? "" : "/" + i;
1541
+ }
1542
+ );
1543
+ if (e.endsWith("*")) {
1544
+ const n = r?.["*"];
1545
+ n !== void 0 && (a += "/" + n);
1546
+ }
1547
+ return a || "/";
1487
1548
  }
1488
- function Zt(e, t, r, a, n, s) {
1489
- let o = {
1490
- ...e,
1491
- loaderData: { ...e.loaderData }
1492
- }, u = Ee(t, a, n);
1493
- if (u)
1494
- for (let i of u) {
1495
- let l = i.route.id, d = r(l);
1496
- $(
1497
- l,
1498
- d.clientLoader,
1499
- d.hasLoader,
1500
- s
1501
- ) && (d.hasHydrateFallback || !d.hasLoader) ? delete o.loaderData[l] : d.hasLoader || (o.loaderData[l] = null);
1549
+ function zt(e) {
1550
+ let t = e.length - 1, r = e[t];
1551
+ if (r !== "*" && r !== "/") return e;
1552
+ for (t--; t >= 0 && e[t] === "/"; t--)
1553
+ ;
1554
+ return e.slice(0, t + 1);
1555
+ }
1556
+ var Y = new TextEncoder(), we = "</body></html>";
1557
+ function ge(e) {
1558
+ let t = new TextDecoder(), r, a = new Promise(
1559
+ (i) => r = i
1560
+ ), n = !1, s = [], o = null;
1561
+ function l(i) {
1562
+ for (let u of s) {
1563
+ let c = t.decode(u, { stream: !0 });
1564
+ c.endsWith(we) && (c = c.slice(0, -we.length)), i.enqueue(Y.encode(c));
1502
1565
  }
1503
- return o;
1566
+ s.length = 0, o = null;
1567
+ }
1568
+ return new TransformStream({
1569
+ transform(i, u) {
1570
+ s.push(i), !o && (o = setTimeout(async () => {
1571
+ l(u), n || (n = !0, $t(e, u).catch((c) => u.error(c)).then(r));
1572
+ }, 0));
1573
+ },
1574
+ async flush(i) {
1575
+ await a, o && (clearTimeout(o), l(i)), i.enqueue(Y.encode("</body></html>"));
1576
+ }
1577
+ });
1578
+ }
1579
+ async function $t(e, t) {
1580
+ let r = new TextDecoder("utf-8", { fatal: !0 });
1581
+ const a = e.getReader();
1582
+ try {
1583
+ let s;
1584
+ for (; (s = await a.read()) && !s.done; ) {
1585
+ const o = s.value;
1586
+ try {
1587
+ X(
1588
+ JSON.stringify(r.decode(o, { stream: !0 })),
1589
+ t
1590
+ );
1591
+ } catch {
1592
+ let i = JSON.stringify(btoa(String.fromCodePoint(...o)));
1593
+ X(
1594
+ `Uint8Array.from(atob(${i}), m => m.codePointAt(0))`,
1595
+ t
1596
+ );
1597
+ }
1598
+ }
1599
+ } finally {
1600
+ a.releaseLock();
1601
+ }
1602
+ let n = r.decode();
1603
+ n.length && X(JSON.stringify(n), t);
1604
+ }
1605
+ function X(e, t) {
1606
+ t.enqueue(
1607
+ Y.encode(
1608
+ `<script>${jt(
1609
+ `(self.__FLIGHT_DATA||=[]).push(${e})`
1610
+ )}<\/script>`
1611
+ )
1612
+ );
1613
+ }
1614
+ function jt(e) {
1615
+ return e.replace(/<!--/g, "<\\!--").replace(/<\/(script)/gi, "</\\$1");
1504
1616
  }
1505
- var ze = class extends E.Component {
1617
+ var qt = class extends _.Component {
1506
1618
  constructor(e) {
1507
1619
  super(e), this.state = { error: null, location: e.location };
1508
1620
  }
@@ -1513,8 +1625,8 @@ var ze = class extends E.Component {
1513
1625
  return t.location !== e.location ? { error: null, location: e.location } : { error: t.error, location: t.location };
1514
1626
  }
1515
1627
  render() {
1516
- return this.state.error ? /* @__PURE__ */ E.createElement(
1517
- Be,
1628
+ return this.state.error ? /* @__PURE__ */ _.createElement(
1629
+ Me,
1518
1630
  {
1519
1631
  error: this.state.error,
1520
1632
  renderAppShell: !0
@@ -1522,25 +1634,25 @@ var ze = class extends E.Component {
1522
1634
  ) : this.props.children;
1523
1635
  }
1524
1636
  };
1525
- function ye({
1637
+ function Re({
1526
1638
  renderAppShell: e,
1527
1639
  title: t,
1528
1640
  children: r
1529
1641
  }) {
1530
- return e ? /* @__PURE__ */ E.createElement("html", { lang: "en" }, /* @__PURE__ */ E.createElement("head", null, /* @__PURE__ */ E.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ E.createElement(
1642
+ return e ? /* @__PURE__ */ _.createElement("html", { lang: "en" }, /* @__PURE__ */ _.createElement("head", null, /* @__PURE__ */ _.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ _.createElement(
1531
1643
  "meta",
1532
1644
  {
1533
1645
  name: "viewport",
1534
1646
  content: "width=device-width,initial-scale=1,viewport-fit=cover"
1535
1647
  }
1536
- ), /* @__PURE__ */ E.createElement("title", null, t)), /* @__PURE__ */ E.createElement("body", null, /* @__PURE__ */ E.createElement("main", { style: { fontFamily: "system-ui, sans-serif", padding: "2rem" } }, r))) : r;
1648
+ ), /* @__PURE__ */ _.createElement("title", null, t)), /* @__PURE__ */ _.createElement("body", null, /* @__PURE__ */ _.createElement("main", { style: { fontFamily: "system-ui, sans-serif", padding: "2rem" } }, r))) : r;
1537
1649
  }
1538
- function Be({
1650
+ function Me({
1539
1651
  error: e,
1540
1652
  renderAppShell: t
1541
1653
  }) {
1542
1654
  console.error(e);
1543
- let r = /* @__PURE__ */ E.createElement(
1655
+ let r = /* @__PURE__ */ _.createElement(
1544
1656
  "script",
1545
1657
  {
1546
1658
  dangerouslySetInnerHTML: {
@@ -1552,14 +1664,14 @@ function Be({
1552
1664
  }
1553
1665
  }
1554
1666
  );
1555
- if (A(e))
1556
- return /* @__PURE__ */ E.createElement(
1557
- ye,
1667
+ if (k(e))
1668
+ return /* @__PURE__ */ _.createElement(
1669
+ Re,
1558
1670
  {
1559
1671
  renderAppShell: t,
1560
1672
  title: "Unhandled Thrown Response!"
1561
1673
  },
1562
- /* @__PURE__ */ E.createElement("h1", { style: { fontSize: "24px" } }, e.status, " ", e.statusText),
1674
+ /* @__PURE__ */ _.createElement("h1", { style: { fontSize: "24px" } }, e.status, " ", e.statusText),
1563
1675
  r
1564
1676
  );
1565
1677
  let a;
@@ -1569,7 +1681,7 @@ function Be({
1569
1681
  let n = e == null ? "Unknown Error" : typeof e == "object" && "toString" in e ? e.toString() : JSON.stringify(e);
1570
1682
  a = new Error(n);
1571
1683
  }
1572
- return /* @__PURE__ */ E.createElement(ye, { renderAppShell: t, title: "Application Error!" }, /* @__PURE__ */ E.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ E.createElement(
1684
+ return /* @__PURE__ */ _.createElement(Re, { renderAppShell: t, title: "Application Error!" }, /* @__PURE__ */ _.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ _.createElement(
1573
1685
  "pre",
1574
1686
  {
1575
1687
  style: {
@@ -1582,722 +1694,326 @@ function Be({
1582
1694
  a.stack
1583
1695
  ), r);
1584
1696
  }
1585
- function Ar({
1697
+ function lr({
1586
1698
  hasRootLayout: e
1587
1699
  }) {
1588
- let t = Xe();
1700
+ let t = qe();
1589
1701
  if (e === void 0)
1590
1702
  throw new Error("Missing 'hasRootLayout' prop");
1591
- return /* @__PURE__ */ E.createElement(
1592
- Be,
1703
+ return /* @__PURE__ */ _.createElement(
1704
+ Me,
1593
1705
  {
1594
1706
  renderAppShell: !e,
1595
1707
  error: t
1596
1708
  }
1597
1709
  );
1598
1710
  }
1599
- function er(e) {
1711
+ function Vt(e) {
1600
1712
  const t = {};
1601
1713
  for (const r of e.matches)
1602
- re(t, r);
1714
+ Wt(t, r);
1603
1715
  return t;
1604
1716
  }
1605
- function re(e, t) {
1717
+ function Wt(e, t) {
1606
1718
  t = Array.isArray(t) ? t : [t];
1607
1719
  for (const r of t)
1608
1720
  e[r.id] = {
1609
1721
  links: r.links,
1610
1722
  meta: r.meta,
1611
- default: tr
1723
+ default: Xt
1612
1724
  };
1613
1725
  }
1614
- var tr = () => null;
1615
- function xr({
1616
- createFromReadableStream: e,
1617
- createTemporaryReferenceSet: t,
1618
- encodeReply: r,
1619
- fetch: a = fetch
1620
- }) {
1621
- const n = window;
1622
- let s = 0;
1623
- return async (o, u) => {
1624
- let i = n.__routerActionID = (n.__routerActionID ?? (n.__routerActionID = 0)) + 1;
1625
- const l = t(), d = await a(
1626
- new Request(location.href, {
1627
- body: await r(u, { temporaryReferences: l }),
1628
- method: "POST",
1629
- headers: {
1630
- Accept: "text/x-component",
1631
- "rsc-action-id": o
1632
- }
1633
- })
1634
- );
1635
- if (!d.body)
1636
- throw new Error("No response body");
1637
- const h = await e(d.body, {
1638
- temporaryReferences: l
1639
- });
1640
- if (h.type === "redirect") {
1641
- if (h.reload) {
1642
- window.location.href = h.location;
1643
- return;
1644
- }
1645
- return n.__reactRouterDataRouter.navigate(h.location, {
1646
- replace: h.replace
1647
- }), h.actionResult;
1648
- }
1649
- if (h.type !== "action")
1650
- throw new Error("Unexpected payload type");
1651
- return h.rerender && g.startTransition(
1652
- // @ts-expect-error - We have old react types that don't know this can be async
1653
- async () => {
1654
- const c = await h.rerender;
1655
- if (c && s < i && n.__routerActionID <= i) {
1656
- if (s = i, c.type === "redirect") {
1657
- if (c.reload) {
1658
- window.location.href = c.location;
1659
- return;
1660
- }
1661
- n.__reactRouterDataRouter.navigate(c.location, {
1662
- replace: c.replace
1663
- });
1664
- return;
1665
- }
1666
- let p;
1667
- for (const f of c.matches)
1668
- n.__reactRouterDataRouter.patchRoutes(
1669
- p?.id ?? null,
1670
- [F(f)],
1671
- !0
1672
- ), p = f;
1673
- window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
1674
- {}
1675
- ), g.startTransition(() => {
1676
- window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
1677
- {
1678
- loaderData: Object.assign(
1679
- {},
1680
- n.__reactRouterDataRouter.state.loaderData,
1681
- c.loaderData
1682
- ),
1683
- errors: c.errors ? Object.assign(
1684
- {},
1685
- n.__reactRouterDataRouter.state.errors,
1686
- c.errors
1687
- ) : null
1688
- }
1689
- );
1690
- });
1691
- }
1692
- }
1693
- ), h.actionResult;
1694
- };
1726
+ var Xt = () => null, Jt = "use", Se = b[Jt];
1727
+ function Qt(e) {
1728
+ if (Se)
1729
+ return Se(e);
1730
+ throw new Error("React Router v7 requires React 19+ for RSC features.");
1695
1731
  }
1696
- function rr({
1697
- fetchImplementation: e,
1698
- createFromReadableStream: t,
1699
- unstable_getContext: r,
1700
- payload: a
1732
+ async function ur({
1733
+ request: e,
1734
+ serverResponse: t,
1735
+ createFromReadableStream: r,
1736
+ renderHTML: a,
1737
+ hydrate: n = !0
1701
1738
  }) {
1702
- const n = window;
1703
- if (n.__reactRouterDataRouter && n.__reactRouterRouteModules)
1704
- return {
1705
- router: n.__reactRouterDataRouter,
1706
- routeModules: n.__reactRouterRouteModules
1707
- };
1708
- if (a.type !== "render") throw new Error("Invalid payload type");
1709
- n.__reactRouterRouteModules = n.__reactRouterRouteModules ?? {}, re(n.__reactRouterRouteModules, a.matches);
1710
- let s = /* @__PURE__ */ new Map();
1711
- a.patches?.forEach((i) => {
1712
- L(i.parentId, "Invalid patch parentId"), s.has(i.parentId) || s.set(i.parentId, []), s.get(i.parentId)?.push(i);
1713
- });
1714
- let o = a.matches.reduceRight((i, l) => {
1715
- const d = F(
1716
- l,
1717
- a
1718
- );
1719
- if (i.length > 0) {
1720
- d.children = i;
1721
- let h = s.get(l.id);
1722
- h && d.children.push(
1723
- ...h.map((c) => F(c))
1724
- );
1739
+ const s = new URL(e.url);
1740
+ if (Gt(s) || Kt(s) || e.headers.has("rsc-action-id") || t.headers.get("React-Router-Resource") === "true")
1741
+ return t;
1742
+ if (!t.body)
1743
+ throw new Error("Missing body in server response");
1744
+ const i = t.clone();
1745
+ let u = null;
1746
+ n && (u = t.clone());
1747
+ const c = t.body;
1748
+ let h, d = [];
1749
+ const p = () => h ? new ReadableStream({
1750
+ start(w) {
1751
+ h.forEach((R) => w.enqueue(R)), d.push(w);
1725
1752
  }
1726
- return [d];
1727
- }, []);
1728
- n.__reactRouterDataRouter = ot({
1729
- routes: o,
1730
- unstable_getContext: r,
1731
- basename: a.basename,
1732
- history: st(),
1733
- hydrationData: Zt(
1734
- {
1735
- loaderData: a.loaderData,
1736
- actionData: a.actionData,
1737
- errors: a.errors
1753
+ }) : (h = [], c.pipeThrough(
1754
+ new TransformStream({
1755
+ transform(w, R) {
1756
+ h.push(w), R.enqueue(w), d.forEach((S) => S.enqueue(w));
1738
1757
  },
1739
- o,
1740
- (i) => {
1741
- let l = a.matches.find((d) => d.id === i);
1742
- return L(l, "Route not found in payload"), {
1743
- clientLoader: l.clientLoader,
1744
- hasLoader: l.hasLoader,
1745
- hasHydrateFallback: l.hydrateFallbackElement != null
1746
- };
1758
+ flush() {
1759
+ d.forEach((w) => w.close()), d = [];
1760
+ }
1761
+ })
1762
+ ));
1763
+ let f = null;
1764
+ const y = () => {
1765
+ const w = Promise.resolve(
1766
+ r(p())
1767
+ );
1768
+ return Object.defineProperties(w, {
1769
+ _deepestRenderedBoundaryId: {
1770
+ get() {
1771
+ return f;
1772
+ },
1773
+ set(R) {
1774
+ f = R;
1775
+ }
1747
1776
  },
1748
- a.location,
1749
- void 0,
1750
- !1
1751
- ),
1752
- async patchRoutesOnNavigation({ path: i, signal: l }) {
1753
- B.has(i) || await $e(
1754
- [i],
1755
- t,
1756
- e,
1757
- l
1758
- );
1759
- },
1760
- // FIXME: Pass `build.ssr` into this function
1761
- dataStrategy: ar(
1762
- () => n.__reactRouterDataRouter,
1763
- !0,
1764
- a.basename,
1765
- t,
1766
- e
1767
- )
1768
- }), n.__reactRouterDataRouter.state.initialized ? (n.__routerInitialized = !0, n.__reactRouterDataRouter.initialize()) : n.__routerInitialized = !1;
1769
- let u;
1770
- return n.__reactRouterDataRouter.subscribe(({ loaderData: i, actionData: l }) => {
1771
- u !== i && (n.__routerActionID = (n.__routerActionID ?? (n.__routerActionID = 0)) + 1);
1772
- }), n.__reactRouterDataRouter._updateRoutesForHMR = (i) => {
1773
- const l = window.__reactRouterDataRouter.routes, d = [];
1774
- function h(c, p) {
1775
- return c.map((f) => {
1776
- const m = i.get(f.id);
1777
- if (m) {
1778
- const {
1779
- routeModule: R,
1780
- hasAction: S,
1781
- hasComponent: v,
1782
- hasErrorBoundary: w,
1783
- hasLoader: _
1784
- } = m, I = F({
1785
- clientAction: R.clientAction,
1786
- clientLoader: R.clientLoader,
1787
- element: f.element,
1788
- errorElement: f.errorElement,
1789
- handle: f.handle,
1790
- hasAction: S,
1791
- hasComponent: v,
1792
- hasErrorBoundary: w,
1793
- hasLoader: _,
1794
- hydrateFallbackElement: f.hydrateFallbackElement,
1795
- id: f.id,
1796
- index: f.index,
1797
- links: R.links,
1798
- meta: R.meta,
1799
- parentId: p,
1800
- path: f.path,
1801
- shouldRevalidate: R.shouldRevalidate
1802
- });
1803
- return f.children && (I.children = h(f.children, f.id)), I;
1777
+ formState: {
1778
+ get() {
1779
+ return w.then(
1780
+ (R) => R.type === "render" ? R.formState : void 0
1781
+ );
1804
1782
  }
1805
- const y = { ...f };
1806
- return f.children && (y.children = h(f.children, f.id)), y;
1807
- });
1808
- }
1809
- d.push(
1810
- ...h(l, void 0)
1811
- ), window.__reactRouterDataRouter._internalSetRoutes(d);
1812
- }, {
1813
- router: n.__reactRouterDataRouter,
1814
- routeModules: n.__reactRouterRouteModules
1783
+ }
1784
+ });
1815
1785
  };
1816
- }
1817
- var K = pt();
1818
- function ar(e, t, r, a, n) {
1819
- let s = mt(
1820
- e,
1821
- (o) => {
1822
- let u = o;
1823
- return {
1824
- hasLoader: u.route.hasLoader,
1825
- hasClientLoader: u.route.hasClientLoader,
1826
- hasComponent: u.route.hasComponent,
1827
- hasAction: u.route.hasAction,
1828
- hasClientAction: u.route.hasClientAction,
1829
- hasShouldRevalidate: u.route.hasShouldRevalidate
1830
- };
1831
- },
1832
- // pass map into fetchAndDecode so it can add payloads
1833
- nr(a, n),
1834
- t,
1835
- r,
1836
- // If the route has a component but we don't have an element, we need to hit
1837
- // the server loader flow regardless of whether the client loader calls
1838
- // `serverLoader` or not, otherwise we'll have nothing to render.
1839
- (o) => {
1840
- let u = o;
1841
- return u.route.hasComponent && !u.route.element;
1842
- }
1843
- );
1844
- return async (o) => o.unstable_runClientMiddleware(async () => {
1845
- let u = o.context;
1846
- u.set(K, []);
1847
- let i = await s(o);
1848
- const l = /* @__PURE__ */ new Map();
1849
- for (const d of u.get(K))
1850
- l.has(d.id) || l.set(d.id, []), l.get(d.id).push(d);
1851
- for (const d of o.matches) {
1852
- const h = l.get(d.route.id);
1853
- if (h)
1854
- for (const c of h)
1855
- window.__reactRouterDataRouter.patchRoutes(
1856
- c.parentId ?? null,
1857
- [F(c)],
1858
- !0
1859
- );
1860
- }
1861
- return i;
1862
- });
1863
- }
1864
- function nr(e, t) {
1865
- return async (r, a, n) => {
1866
- let { request: s, context: o } = r, u = Rt(s.url, a, "rsc");
1867
- s.method === "GET" && (u = wt(u), n && u.searchParams.set("_routes", n.join(",")));
1868
- let i = await t(
1869
- new Request(u, await gt(s))
1786
+ let m, g;
1787
+ try {
1788
+ if (!i.body)
1789
+ throw new Error("Failed to clone server response");
1790
+ const w = await r(
1791
+ i.body
1870
1792
  );
1871
- if (i.status === 404 && !i.headers.has("X-Remix-Response"))
1872
- throw new D(404, "Not Found", !0);
1873
- L(i.body, "No response body to decode");
1874
- try {
1875
- const l = await e(i.body, {
1876
- temporaryReferences: void 0
1793
+ if (t.status === be && w.type === "redirect") {
1794
+ const v = new Headers(t.headers);
1795
+ return v.delete("Content-Encoding"), v.delete("Content-Length"), v.delete("Content-Type"), v.delete("X-Remix-Response"), v.set("Location", w.location), new Response(u?.body || "", {
1796
+ headers: v,
1797
+ status: w.status,
1798
+ statusText: t.statusText
1877
1799
  });
1878
- if (l.type === "redirect")
1879
- return {
1880
- status: i.status,
1881
- data: {
1882
- redirect: {
1883
- redirect: l.location,
1884
- reload: l.reload,
1885
- replace: l.replace,
1886
- revalidate: !1,
1887
- status: l.status
1888
- }
1889
- }
1890
- };
1891
- if (l.type !== "render")
1892
- throw new Error("Unexpected payload type");
1893
- o.get(K).push(...l.matches);
1894
- let d = { routes: {} };
1895
- const h = vt(s.method) ? "actionData" : "loaderData";
1896
- for (let [c, p] of Object.entries(l[h] || {}))
1897
- d.routes[c] = { data: p };
1898
- if (l.errors)
1899
- for (let [c, p] of Object.entries(l.errors))
1900
- d.routes[c] = { error: p };
1901
- return { status: i.status, data: d };
1902
- } catch {
1903
- throw new Error("Unable to decode RSC response");
1904
- }
1905
- };
1906
- }
1907
- function Fr({
1908
- createFromReadableStream: e,
1909
- fetch: t = fetch,
1910
- payload: r,
1911
- routeDiscovery: a = "eager",
1912
- unstable_getContext: n
1913
- }) {
1914
- if (r.type !== "render") throw new Error("Invalid payload type");
1915
- let { router: s, routeModules: o } = g.useMemo(
1916
- () => rr({
1917
- payload: r,
1918
- fetchImplementation: t,
1919
- unstable_getContext: n,
1920
- createFromReadableStream: e
1921
- }),
1922
- [
1923
- e,
1924
- r,
1925
- t,
1926
- n
1927
- ]
1928
- );
1929
- g.useEffect(() => {
1930
- Qe();
1931
- }, []), g.useLayoutEffect(() => {
1932
- const d = window;
1933
- d.__routerInitialized || (d.__routerInitialized = !0, d.__reactRouterDataRouter.initialize());
1934
- }, []);
1935
- let [u, i] = g.useState(s.state.location);
1936
- g.useLayoutEffect(
1937
- () => s.subscribe((d) => {
1938
- d.location !== u && i(d.location);
1939
- }),
1940
- [s, u]
1941
- ), g.useEffect(() => {
1942
- if (a === "lazy" || // @ts-expect-error - TS doesn't know about this yet
1943
- window.navigator?.connection?.saveData === !0)
1944
- return;
1945
- function d(f) {
1946
- let m = f.tagName === "FORM" ? f.getAttribute("action") : f.getAttribute("href");
1947
- if (!m)
1948
- return;
1949
- let y = f.tagName === "A" ? f.pathname : new URL(m, window.location.origin).pathname;
1950
- B.has(y) || N.add(y);
1951
1800
  }
1952
- async function h() {
1953
- document.querySelectorAll("a[data-discover], form[data-discover]").forEach(d);
1954
- let f = Array.from(N.keys()).filter((m) => B.has(m) ? (N.delete(m), !1) : !0);
1955
- if (f.length !== 0)
1956
- try {
1957
- await $e(
1958
- f,
1959
- e,
1960
- t
1961
- );
1962
- } catch (m) {
1963
- console.error("Failed to fetch manifest patches", m);
1801
+ let R = new Headers(), S = t.status, E = t.statusText, H = await a(y, {
1802
+ onError(v) {
1803
+ if (typeof v == "object" && v && "digest" in v && typeof v.digest == "string") {
1804
+ if (m = ne(v.digest), m)
1805
+ return v.digest;
1806
+ let C = se(v.digest);
1807
+ if (C)
1808
+ return g = C, S = C.status, E = C.statusText, v.digest;
1964
1809
  }
1965
- }
1966
- let c = ur(h, 100);
1967
- h(), new MutationObserver(() => c()).observe(document.documentElement, {
1968
- subtree: !0,
1969
- childList: !0,
1970
- attributes: !0,
1971
- attributeFilter: ["data-discover", "href", "action"]
1810
+ },
1811
+ onHeaders(v) {
1812
+ for (const [C, D] of v)
1813
+ R.append(C, D);
1814
+ }
1972
1815
  });
1973
- }, [a, e, t]);
1974
- const l = {
1975
- future: {
1976
- // These flags have no runtime impact so can always be false. If we add
1977
- // flags that drive runtime behavior they'll need to be proxied through.
1978
- unstable_middleware: !1,
1979
- unstable_subResourceIntegrity: !1
1980
- },
1981
- isSpaMode: !1,
1982
- ssr: !0,
1983
- criticalCss: "",
1984
- manifest: {
1985
- routes: {},
1986
- version: "1",
1987
- url: "",
1988
- entry: {
1989
- module: "",
1990
- imports: []
1816
+ const x = new Headers(R);
1817
+ for (const [v, C] of t.headers)
1818
+ x.append(v, C);
1819
+ if (x.set("Content-Type", "text/html; charset=utf-8"), m)
1820
+ return x.set("Location", m.location), new Response(H, {
1821
+ status: m.status,
1822
+ headers: x
1823
+ });
1824
+ const A = new TransformStream({
1825
+ flush(v) {
1826
+ m && v.enqueue(
1827
+ new TextEncoder().encode(
1828
+ `<meta http-equiv="refresh" content="0;url=${Q(m.location)}"/>`
1829
+ )
1830
+ );
1991
1831
  }
1992
- },
1993
- routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
1994
- routeModules: o
1995
- };
1996
- return /* @__PURE__ */ g.createElement(be.Provider, { value: !0 }, /* @__PURE__ */ g.createElement(ze, { location: u }, /* @__PURE__ */ g.createElement(j.Provider, { value: l }, /* @__PURE__ */ g.createElement(_e, { router: s, flushSync: St.flushSync }))));
1997
- }
1998
- function F(e, t) {
1999
- let r = t && e.id in t.loaderData, a = t?.loaderData[e.id], n = t?.errors && e.id in t.errors, s = t?.errors?.[e.id], o = e.clientLoader?.hydrate === !0 || !e.hasLoader || // If the route has a component but we don't have an element, we need to hit
2000
- // the server loader flow regardless of whether the client loader calls
2001
- // `serverLoader` or not, otherwise we'll have nothing to render.
2002
- e.hasComponent && !e.element;
2003
- L(window.__reactRouterRouteModules), re(window.__reactRouterRouteModules, e);
2004
- let u = {
2005
- id: e.id,
2006
- element: e.element,
2007
- errorElement: e.errorElement,
2008
- handle: e.handle,
2009
- hasErrorBoundary: e.hasErrorBoundary,
2010
- hydrateFallbackElement: e.hydrateFallbackElement,
2011
- index: e.index,
2012
- loader: e.clientLoader ? async (i, l) => {
2013
- try {
2014
- return await e.clientLoader({
2015
- ...i,
2016
- serverLoader: () => {
2017
- if (Re(
2018
- "loader",
2019
- e.id,
2020
- e.hasLoader
2021
- ), o) {
2022
- if (r)
2023
- return a;
2024
- if (n)
2025
- throw s;
1832
+ });
1833
+ if (!n)
1834
+ return new Response(H.pipeThrough(A), {
1835
+ status: S,
1836
+ statusText: E,
1837
+ headers: x
1838
+ });
1839
+ if (!u?.body)
1840
+ throw new Error("Failed to clone server response");
1841
+ const U = H.pipeThrough(ge(u.body)).pipeThrough(A);
1842
+ return new Response(U, {
1843
+ status: S,
1844
+ statusText: E,
1845
+ headers: x
1846
+ });
1847
+ } catch (w) {
1848
+ if (w instanceof Response)
1849
+ return w;
1850
+ if (m)
1851
+ return new Response(`Redirect: ${m.location}`, {
1852
+ status: m.status,
1853
+ headers: {
1854
+ Location: m.location
1855
+ }
1856
+ });
1857
+ try {
1858
+ w = g ?? w;
1859
+ let [R, S] = k(w) ? [w.status, w.statusText] : [500, ""], E, H = new Headers();
1860
+ const x = await a(
1861
+ () => {
1862
+ const D = Promise.resolve(
1863
+ r(p())
1864
+ ).then(
1865
+ (T) => Object.assign(T, {
1866
+ status: R,
1867
+ errors: f ? {
1868
+ [f]: w
1869
+ } : {}
1870
+ })
1871
+ );
1872
+ return Object.defineProperties(D, {
1873
+ _deepestRenderedBoundaryId: {
1874
+ get() {
1875
+ return f;
1876
+ },
1877
+ set(T) {
1878
+ f = T;
1879
+ }
1880
+ },
1881
+ formState: {
1882
+ get() {
1883
+ return D.then(
1884
+ (T) => T.type === "render" ? T.formState : void 0
1885
+ );
1886
+ }
1887
+ }
1888
+ });
1889
+ },
1890
+ {
1891
+ onError(C) {
1892
+ if (typeof C == "object" && C && "digest" in C && typeof C.digest == "string") {
1893
+ if (E = ne(C.digest), E)
1894
+ return C.digest;
1895
+ let D = se(
1896
+ C.digest
1897
+ );
1898
+ if (D)
1899
+ return R = D.status, S = D.statusText, C.digest;
2026
1900
  }
2027
- return P(l);
1901
+ },
1902
+ onHeaders(C) {
1903
+ for (const [D, T] of C)
1904
+ H.append(D, T);
2028
1905
  }
1906
+ }
1907
+ ), A = new Headers(H);
1908
+ for (const [C, D] of t.headers)
1909
+ A.append(C, D);
1910
+ if (A.set("Content-Type", "text/html; charset=utf-8"), E)
1911
+ return A.set("Location", E.location), new Response(x, {
1912
+ status: E.status,
1913
+ headers: A
2029
1914
  });
2030
- } finally {
2031
- o = !1;
2032
- }
2033
- } : (
2034
- // We always make the call in this RSC world since even if we don't
2035
- // have a `loader` we may need to get the `element` implementation
2036
- ((i, l) => P(l))
2037
- ),
2038
- action: e.clientAction ? (i, l) => e.clientAction({
2039
- ...i,
2040
- serverAction: async () => (Re(
2041
- "action",
2042
- e.id,
2043
- e.hasLoader
2044
- ), await P(l))
2045
- }) : e.hasAction ? (i, l) => P(l) : () => {
2046
- throw it("action", e.id);
2047
- },
2048
- path: e.path,
2049
- shouldRevalidate: e.shouldRevalidate,
2050
- // We always have a "loader" in this RSC world since even if we don't
2051
- // have a `loader` we may need to get the `element` implementation
2052
- hasLoader: !0,
2053
- hasClientLoader: e.clientLoader != null,
2054
- hasAction: e.hasAction,
2055
- hasClientAction: e.clientAction != null,
2056
- hasShouldRevalidate: e.shouldRevalidate != null
2057
- };
2058
- return typeof u.loader == "function" && (u.loader.hydrate = $(
2059
- e.id,
2060
- e.clientLoader,
2061
- e.hasLoader,
2062
- !1
2063
- )), u;
2064
- }
2065
- function P(e) {
2066
- return L(typeof e == "function", "Invalid singleFetch parameter"), e();
2067
- }
2068
- function Re(e, t, r) {
2069
- if (!r) {
2070
- let n = `You are trying to call ${e === "action" ? "serverAction()" : "serverLoader()"} on a route that does not have a server ${e} (routeId: "${t}")`;
2071
- throw console.error(n), new D(400, "Bad Request", new Error(n), !0);
2072
- }
2073
- }
2074
- var N = /* @__PURE__ */ new Set(), or = 1e3, B = /* @__PURE__ */ new Set(), sr = 7680;
2075
- function ir(e) {
2076
- if (e.length === 0)
2077
- return null;
2078
- if (e.length === 1)
2079
- return new URL(`${e[0]}.manifest`, window.location.origin);
2080
- let r = (window.__reactRouterDataRouter.basename ?? "").replace(
2081
- /^\/|\/$/g,
2082
- ""
2083
- ), a = new URL(`${r}/.manifest`, window.location.origin);
2084
- return e.sort().forEach((n) => a.searchParams.append("p", n)), a;
2085
- }
2086
- async function $e(e, t, r, a) {
2087
- let n = ir(e);
2088
- if (n == null)
2089
- return;
2090
- if (n.toString().length > sr) {
2091
- N.clear();
2092
- return;
2093
- }
2094
- let s = await r(new Request(n, { signal: a }));
2095
- if (!s.body || s.status < 200 || s.status >= 300)
2096
- throw new Error("Unable to fetch new route matches from the server");
2097
- let o = await t(s.body, {
2098
- temporaryReferences: void 0
2099
- });
2100
- if (o.type !== "manifest")
2101
- throw new Error("Failed to patch routes");
2102
- e.forEach((u) => lr(u, B)), o.patches.forEach((u) => {
2103
- window.__reactRouterDataRouter.patchRoutes(
2104
- u.parentId ?? null,
2105
- [F(u)]
2106
- );
2107
- });
2108
- }
2109
- function lr(e, t) {
2110
- if (t.size >= or) {
2111
- let r = t.values().next().value;
2112
- t.delete(r);
2113
- }
2114
- t.add(e);
2115
- }
2116
- function ur(e, t) {
2117
- let r;
2118
- return (...a) => {
2119
- window.clearTimeout(r), r = window.setTimeout(() => e(...a), t);
2120
- };
2121
- }
2122
- var Q = new TextEncoder(), we = "</body></html>";
2123
- function dr(e) {
2124
- let t = new TextDecoder(), r, a = new Promise(
2125
- (i) => r = i
2126
- ), n = !1, s = [], o = null;
2127
- function u(i) {
2128
- for (let l of s) {
2129
- let d = t.decode(l, { stream: !0 });
2130
- d.endsWith(we) && (d = d.slice(0, -we.length)), i.enqueue(Q.encode(d));
2131
- }
2132
- s.length = 0, o = null;
2133
- }
2134
- return new TransformStream({
2135
- transform(i, l) {
2136
- s.push(i), !o && (o = setTimeout(async () => {
2137
- u(l), n || (n = !0, cr(e, l).catch((d) => l.error(d)).then(r));
2138
- }, 0));
2139
- },
2140
- async flush(i) {
2141
- await a, o && (clearTimeout(o), u(i)), i.enqueue(Q.encode("</body></html>"));
2142
- }
2143
- });
2144
- }
2145
- async function cr(e, t) {
2146
- let r = new TextDecoder("utf-8", { fatal: !0 });
2147
- const a = e.getReader();
2148
- try {
2149
- let s;
2150
- for (; (s = await a.read()) && !s.done; ) {
2151
- const o = s.value;
2152
- try {
2153
- G(
2154
- JSON.stringify(r.decode(o, { stream: !0 })),
2155
- t
2156
- );
2157
- } catch {
2158
- let i = JSON.stringify(btoa(String.fromCodePoint(...o)));
2159
- G(
2160
- `Uint8Array.from(atob(${i}), m => m.codePointAt(0))`,
2161
- t
2162
- );
2163
- }
2164
- }
2165
- } finally {
2166
- a.releaseLock();
2167
- }
2168
- let n = r.decode();
2169
- n.length && G(JSON.stringify(n), t);
2170
- }
2171
- function G(e, t) {
2172
- t.enqueue(
2173
- Q.encode(
2174
- `<script>${fr(
2175
- `(self.__FLIGHT_DATA||=[]).push(${e})`
2176
- )}<\/script>`
2177
- )
2178
- );
2179
- }
2180
- function fr(e) {
2181
- return e.replace(/<!--/g, "<\\!--").replace(/<\/(script)/gi, "</\\$1");
2182
- }
2183
- var hr = "use", ge = g[hr];
2184
- function pr(e) {
2185
- if (ge)
2186
- return ge(e);
2187
- throw new Error("React Router v7 requires React 19+ for RSC features.");
2188
- }
2189
- async function kr({
2190
- request: e,
2191
- fetchServer: t,
2192
- createFromReadableStream: r,
2193
- renderHTML: a,
2194
- hydrate: n = !0
2195
- }) {
2196
- const s = new URL(e.url), u = mr(s) || yr(s) || e.headers.has("rsc-action-id"), i = await t(e);
2197
- if (u || i.headers.get("React-Router-Resource") === "true")
2198
- return i;
2199
- if (!i.body)
2200
- throw new Error("Missing body in server response");
2201
- let l = null;
2202
- n && (l = i.clone());
2203
- const d = i.body;
2204
- let h;
2205
- const c = async () => h || (h = r(d), h);
2206
- try {
2207
- const p = await c();
2208
- if (i.status === Ce && p.type === "redirect") {
2209
- const R = new Headers(i.headers);
2210
- return R.delete("Content-Encoding"), R.delete("Content-Length"), R.delete("Content-Type"), R.delete("x-remix-response"), R.set("Location", p.location), new Response(l?.body || "", {
2211
- headers: R,
2212
- status: p.status,
2213
- statusText: i.statusText
1915
+ const U = new TransformStream({
1916
+ flush(C) {
1917
+ E && C.enqueue(
1918
+ new TextEncoder().encode(
1919
+ `<meta http-equiv="refresh" content="0;url=${Q(E.location)}"/>`
1920
+ )
1921
+ );
1922
+ }
2214
1923
  });
2215
- }
2216
- const f = await a(c), m = new Headers(i.headers);
2217
- if (m.set("Content-Type", "text/html"), !n)
2218
- return new Response(f, {
2219
- status: i.status,
2220
- headers: m
1924
+ if (!n)
1925
+ return new Response(x.pipeThrough(U), {
1926
+ status: R,
1927
+ statusText: S,
1928
+ headers: A
1929
+ });
1930
+ if (!u?.body)
1931
+ throw new Error("Failed to clone server response");
1932
+ const v = x.pipeThrough(ge(u.body)).pipeThrough(U);
1933
+ return new Response(v, {
1934
+ status: R,
1935
+ statusText: S,
1936
+ headers: A
2221
1937
  });
2222
- if (!l?.body)
2223
- throw new Error("Failed to clone server response");
2224
- const y = f.pipeThrough(dr(l.body));
2225
- return new Response(y, {
2226
- status: i.status,
2227
- headers: m
2228
- });
2229
- } catch (p) {
2230
- if (p instanceof Response)
2231
- return p;
2232
- throw p;
1938
+ } catch {
1939
+ }
1940
+ throw w;
2233
1941
  }
2234
1942
  }
2235
- function Lr({ getPayload: e }) {
2236
- const t = pr(e());
2237
- if (t.type === "redirect")
1943
+ function dr({ getPayload: e }) {
1944
+ const t = e(), r = Qt(t);
1945
+ if (r.type === "redirect")
2238
1946
  throw new Response(null, {
2239
- status: t.status,
1947
+ status: r.status,
2240
1948
  headers: {
2241
- Location: t.location
1949
+ Location: r.location
2242
1950
  }
2243
1951
  });
2244
- if (t.type !== "render") return null;
2245
- let r = { ...t.loaderData };
2246
- for (const o of t.matches)
2247
- $(
2248
- o.id,
2249
- o.clientLoader,
2250
- o.hasLoader,
1952
+ if (r.type !== "render") return null;
1953
+ let a = { ...r.loaderData };
1954
+ for (const l of r.matches)
1955
+ Z(
1956
+ l.id,
1957
+ l.clientLoader,
1958
+ l.hasLoader,
2251
1959
  !1
2252
- ) && (o.hydrateFallbackElement || !o.hasLoader) && delete r[o.id];
2253
- const a = {
2254
- actionData: t.actionData,
1960
+ ) && (l.hydrateFallbackElement || !l.hasLoader) && delete a[l.id];
1961
+ const n = {
1962
+ get _deepestRenderedBoundaryId() {
1963
+ return t._deepestRenderedBoundaryId ?? null;
1964
+ },
1965
+ set _deepestRenderedBoundaryId(l) {
1966
+ t._deepestRenderedBoundaryId = l;
1967
+ },
1968
+ actionData: r.actionData,
2255
1969
  actionHeaders: {},
2256
- basename: t.basename,
2257
- errors: t.errors,
2258
- loaderData: r,
1970
+ basename: r.basename,
1971
+ errors: r.errors,
1972
+ loaderData: a,
2259
1973
  loaderHeaders: {},
2260
- location: t.location,
1974
+ location: r.location,
2261
1975
  statusCode: 200,
2262
- matches: t.matches.map((o) => ({
2263
- params: o.params,
2264
- pathname: o.pathname,
2265
- pathnameBase: o.pathnameBase,
1976
+ matches: r.matches.map((l) => ({
1977
+ params: l.params,
1978
+ pathname: l.pathname,
1979
+ pathnameBase: l.pathnameBase,
2266
1980
  route: {
2267
- id: o.id,
2268
- action: o.hasAction || !!o.clientAction,
2269
- handle: o.handle,
2270
- hasErrorBoundary: o.hasErrorBoundary,
2271
- loader: o.hasLoader || !!o.clientLoader,
2272
- index: o.index,
2273
- path: o.path,
2274
- shouldRevalidate: o.shouldRevalidate
1981
+ id: l.id,
1982
+ action: l.hasAction || !!l.clientAction,
1983
+ handle: l.handle,
1984
+ hasErrorBoundary: l.hasErrorBoundary,
1985
+ loader: l.hasLoader || !!l.clientLoader,
1986
+ index: l.index,
1987
+ path: l.path,
1988
+ shouldRevalidate: l.shouldRevalidate
2275
1989
  }
2276
1990
  }))
2277
- }, n = ve(
2278
- t.matches.reduceRight((o, u) => {
2279
- const i = {
2280
- id: u.id,
2281
- action: u.hasAction || !!u.clientAction,
2282
- element: u.element,
2283
- errorElement: u.errorElement,
2284
- handle: u.handle,
2285
- hasErrorBoundary: !!u.errorElement,
2286
- hydrateFallbackElement: u.hydrateFallbackElement,
2287
- index: u.index,
2288
- loader: u.hasLoader || !!u.clientLoader,
2289
- path: u.path,
2290
- shouldRevalidate: u.shouldRevalidate
1991
+ }, s = ve(
1992
+ r.matches.reduceRight((l, i) => {
1993
+ const u = {
1994
+ id: i.id,
1995
+ action: i.hasAction || !!i.clientAction,
1996
+ element: i.element,
1997
+ errorElement: i.errorElement,
1998
+ handle: i.handle,
1999
+ hasErrorBoundary: !!i.errorElement,
2000
+ hydrateFallbackElement: i.hydrateFallbackElement,
2001
+ index: i.index,
2002
+ loader: i.hasLoader || !!i.clientLoader,
2003
+ path: i.path,
2004
+ shouldRevalidate: i.shouldRevalidate
2291
2005
  };
2292
- return o.length > 0 && (i.children = o), [i];
2006
+ return l.length > 0 && (u.children = l), [u];
2293
2007
  }, []),
2294
- a
2295
- ), s = {
2008
+ n
2009
+ ), o = {
2296
2010
  future: {
2297
2011
  // These flags have no runtime impact so can always be false. If we add
2298
2012
  // flags that drive runtime behavior they'll need to be proxied through.
2299
- unstable_middleware: !1,
2300
- unstable_subResourceIntegrity: !1
2013
+ v8_middleware: !1,
2014
+ unstable_subResourceIntegrity: !1,
2015
+ unstable_trailingSlashAwareDataRequests: !0
2016
+ // always on for RSC
2301
2017
  },
2302
2018
  isSpaMode: !1,
2303
2019
  ssr: !0,
@@ -2312,45 +2028,30 @@ function Lr({ getPayload: e }) {
2312
2028
  }
2313
2029
  },
2314
2030
  routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
2315
- routeModules: er(t)
2031
+ routeModules: Vt(r)
2316
2032
  };
2317
- return /* @__PURE__ */ g.createElement(be.Provider, { value: !0 }, /* @__PURE__ */ g.createElement(ze, { location: t.location }, /* @__PURE__ */ g.createElement(j.Provider, { value: s }, /* @__PURE__ */ g.createElement(
2318
- Se,
2033
+ return /* @__PURE__ */ b.createElement(Je.Provider, { value: !0 }, /* @__PURE__ */ b.createElement(qt, { location: r.location }, /* @__PURE__ */ b.createElement(ee.Provider, { value: o }, /* @__PURE__ */ b.createElement(
2034
+ Ee,
2319
2035
  {
2320
- context: a,
2321
- router: n,
2036
+ context: n,
2037
+ router: s,
2322
2038
  hydrate: !1,
2323
- nonce: t.nonce
2039
+ nonce: r.nonce
2324
2040
  }
2325
2041
  ))));
2326
2042
  }
2327
- function mr(e) {
2043
+ function Gt(e) {
2328
2044
  return e.pathname.endsWith(".rsc");
2329
2045
  }
2330
- function yr(e) {
2046
+ function Kt(e) {
2331
2047
  return e.pathname.endsWith(".manifest");
2332
2048
  }
2333
- function Tr() {
2334
- let e = new TextEncoder(), t = null, r = new ReadableStream({
2335
- start(a) {
2336
- if (typeof window > "u")
2337
- return;
2338
- let n = (s) => {
2339
- typeof s == "string" ? a.enqueue(e.encode(s)) : a.enqueue(s);
2340
- };
2341
- window.__FLIGHT_DATA || (window.__FLIGHT_DATA = []), window.__FLIGHT_DATA.forEach(n), window.__FLIGHT_DATA.push = (s) => (n(s), 0), t = a;
2342
- }
2343
- });
2344
- return typeof document < "u" && document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => {
2345
- t?.close();
2346
- }) : t?.close(), r;
2347
- }
2348
- function Hr(e) {
2049
+ function cr(e) {
2349
2050
  if (!e) return null;
2350
2051
  let t = Object.entries(e), r = {};
2351
2052
  for (let [a, n] of t)
2352
2053
  if (n && n.__type === "RouteErrorResponse")
2353
- r[a] = new D(
2054
+ r[a] = new O(
2354
2055
  n.status,
2355
2056
  n.statusText,
2356
2057
  n.data,
@@ -2374,134 +2075,159 @@ function Hr(e) {
2374
2075
  r[a] = n;
2375
2076
  return r;
2376
2077
  }
2078
+ function fr({
2079
+ state: e,
2080
+ routes: t,
2081
+ getRouteInfo: r,
2082
+ location: a,
2083
+ basename: n,
2084
+ isSpaMode: s
2085
+ }) {
2086
+ let o = {
2087
+ ...e,
2088
+ loaderData: { ...e.loaderData }
2089
+ }, l = Ce(t, a, n);
2090
+ if (l)
2091
+ for (let i of l) {
2092
+ let u = i.route.id, c = r(u);
2093
+ Z(
2094
+ u,
2095
+ c.clientLoader,
2096
+ c.hasLoader,
2097
+ s
2098
+ ) && (c.hasHydrateFallback || !c.hasLoader) ? delete o.loaderData[u] : c.hasLoader || (o.loaderData[u] = null);
2099
+ }
2100
+ return o;
2101
+ }
2377
2102
  export {
2378
- Ur as Await,
2379
- Mr as BrowserRouter,
2380
- Nr as Form,
2381
- Or as HashRouter,
2382
- zr as IDLE_BLOCKER,
2383
- Br as IDLE_FETCHER,
2384
- $r as IDLE_NAVIGATION,
2385
- jr as Link,
2386
- Vr as Links,
2387
- Wr as MemoryRouter,
2388
- qr as Meta,
2389
- Gr as NavLink,
2390
- Xr as Navigate,
2391
- Yr as NavigationType,
2392
- nt as Outlet,
2393
- Jr as PrefetchPageLinks,
2394
- Kr as Route,
2395
- Qr as Router,
2396
- _e as RouterProvider,
2397
- Zr as Routes,
2398
- ea as Scripts,
2399
- ta as ScrollRestoration,
2400
- gr as ServerRouter,
2401
- ra as StaticRouter,
2402
- Se as StaticRouterProvider,
2403
- aa as UNSAFE_DataRouterContext,
2404
- na as UNSAFE_DataRouterStateContext,
2405
- D as UNSAFE_ErrorResponseImpl,
2406
- oa as UNSAFE_FetchersContext,
2407
- j as UNSAFE_FrameworkContext,
2408
- sa as UNSAFE_LocationContext,
2409
- ia as UNSAFE_NavigationContext,
2410
- Ar as UNSAFE_RSCDefaultRootErrorBoundary,
2411
- qe as UNSAFE_RemixErrorBoundary,
2412
- la as UNSAFE_RouteContext,
2413
- Pt as UNSAFE_ServerMode,
2414
- T as UNSAFE_SingleFetchRedirectSymbol,
2415
- ua as UNSAFE_ViewTransitionContext,
2416
- da as UNSAFE_WithComponentProps,
2417
- ca as UNSAFE_WithErrorBoundaryProps,
2418
- fa as UNSAFE_WithHydrateFallbackProps,
2419
- st as UNSAFE_createBrowserHistory,
2420
- ha as UNSAFE_createClientRoutes,
2421
- pa as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
2422
- ot as UNSAFE_createRouter,
2423
- lt as UNSAFE_decodeViaTurboStream,
2424
- Hr as UNSAFE_deserializeErrors,
2425
- Zt as UNSAFE_getHydrationData,
2426
- ma as UNSAFE_getPatchRoutesOnNavigationFunction,
2427
- ya as UNSAFE_getTurboStreamSingleFetchDataStrategy,
2428
- Ra as UNSAFE_hydrationRouteProperties,
2429
- L as UNSAFE_invariant,
2430
- wa as UNSAFE_mapRouteProperties,
2431
- $ as UNSAFE_shouldHydrateRouteLoader,
2432
- ga as UNSAFE_useFogOFWarDiscovery,
2433
- va as UNSAFE_useScrollRestoration,
2434
- at as UNSAFE_withComponentProps,
2435
- tt as UNSAFE_withErrorBoundaryProps,
2436
- rt as UNSAFE_withHydrateFallbackProps,
2437
- Sa as createBrowserRouter,
2438
- Fe as createCookie,
2439
- br as createCookieSessionStorage,
2440
- Ea as createHashRouter,
2441
- Ke as createMemoryRouter,
2442
- Cr as createMemorySessionStorage,
2443
- _a as createPath,
2444
- Er as createRequestHandler,
2445
- ba as createRoutesFromChildren,
2446
- Ca as createRoutesFromElements,
2447
- vr as createRoutesStub,
2448
- Da as createSearchParams,
2449
- Ne as createSession,
2450
- Qt as createSessionStorage,
2451
- Aa as createStaticHandler,
2103
+ mr as Await,
2104
+ yr as BrowserRouter,
2105
+ wr as Form,
2106
+ gr as HashRouter,
2107
+ Rr as IDLE_BLOCKER,
2108
+ Sr as IDLE_FETCHER,
2109
+ vr as IDLE_NAVIGATION,
2110
+ Er as Link,
2111
+ Cr as Links,
2112
+ br as MemoryRouter,
2113
+ _r as Meta,
2114
+ xr as NavLink,
2115
+ Ar as Navigate,
2116
+ Dr as NavigationType,
2117
+ et as Outlet,
2118
+ Hr as PrefetchPageLinks,
2119
+ Tr as Route,
2120
+ kr as Router,
2121
+ J as RouterContextProvider,
2122
+ Xe as RouterProvider,
2123
+ Fr as Routes,
2124
+ Pr as Scripts,
2125
+ Ur as ScrollRestoration,
2126
+ er as ServerRouter,
2127
+ Lr as StaticRouter,
2128
+ Ee as StaticRouterProvider,
2129
+ Nr as UNSAFE_AwaitContextProvider,
2130
+ Or as UNSAFE_DataRouterContext,
2131
+ Ir as UNSAFE_DataRouterStateContext,
2132
+ O as UNSAFE_ErrorResponseImpl,
2133
+ Br as UNSAFE_FetchersContext,
2134
+ ee as UNSAFE_FrameworkContext,
2135
+ Mr as UNSAFE_LocationContext,
2136
+ zr as UNSAFE_NavigationContext,
2137
+ lr as UNSAFE_RSCDefaultRootErrorBoundary,
2138
+ $e as UNSAFE_RemixErrorBoundary,
2139
+ $r as UNSAFE_RouteContext,
2140
+ Ct as UNSAFE_ServerMode,
2141
+ I as UNSAFE_SingleFetchRedirectSymbol,
2142
+ jr as UNSAFE_ViewTransitionContext,
2143
+ qr as UNSAFE_WithComponentProps,
2144
+ Vr as UNSAFE_WithErrorBoundaryProps,
2145
+ Wr as UNSAFE_WithHydrateFallbackProps,
2146
+ Xr as UNSAFE_createBrowserHistory,
2147
+ Jr as UNSAFE_createClientRoutes,
2148
+ Qr as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
2149
+ Gr as UNSAFE_createHashHistory,
2150
+ Kr as UNSAFE_createMemoryHistory,
2151
+ Yr as UNSAFE_createRouter,
2152
+ tt as UNSAFE_decodeViaTurboStream,
2153
+ cr as UNSAFE_deserializeErrors,
2154
+ fr as UNSAFE_getHydrationData,
2155
+ Zr as UNSAFE_getPatchRoutesOnNavigationFunction,
2156
+ ea as UNSAFE_getTurboStreamSingleFetchDataStrategy,
2157
+ ta as UNSAFE_hydrationRouteProperties,
2158
+ ra as UNSAFE_invariant,
2159
+ aa as UNSAFE_mapRouteProperties,
2160
+ Z as UNSAFE_shouldHydrateRouteLoader,
2161
+ na as UNSAFE_useFogOFWarDiscovery,
2162
+ sa as UNSAFE_useScrollRestoration,
2163
+ Ze as UNSAFE_withComponentProps,
2164
+ Ke as UNSAFE_withErrorBoundaryProps,
2165
+ Ye as UNSAFE_withHydrateFallbackProps,
2166
+ oa as createBrowserRouter,
2167
+ ia as createContext,
2168
+ De as createCookie,
2169
+ sr as createCookieSessionStorage,
2170
+ la as createHashRouter,
2171
+ We as createMemoryRouter,
2172
+ or as createMemorySessionStorage,
2173
+ ua as createPath,
2174
+ ar as createRequestHandler,
2175
+ da as createRoutesFromChildren,
2176
+ ca as createRoutesFromElements,
2177
+ tr as createRoutesStub,
2178
+ fa as createSearchParams,
2179
+ Ie as createSession,
2180
+ Mt as createSessionStorage,
2181
+ ha as createStaticHandler,
2452
2182
  ve as createStaticRouter,
2453
- xa as data,
2454
- Fa as generatePath,
2455
- Dr as href,
2456
- ke as isCookie,
2457
- A as isRouteErrorResponse,
2458
- _r as isSession,
2459
- ka as matchPath,
2460
- Ee as matchRoutes,
2461
- La as parsePath,
2462
- ct as redirect,
2463
- ut as redirectDocument,
2464
- Ta as renderMatches,
2465
- dt as replace,
2466
- Ha as resolvePath,
2467
- Ia as unstable_HistoryRouter,
2468
- Fr as unstable_RSCHydratedRouter,
2469
- Lr as unstable_RSCStaticRouter,
2470
- X as unstable_RouterContextProvider,
2471
- xr as unstable_createCallServer,
2472
- pt as unstable_createContext,
2473
- Tr as unstable_getRSCStream,
2474
- kr as unstable_routeRSCServerRequest,
2475
- Sr as unstable_setDevServerHooks,
2476
- Pa as unstable_usePrompt,
2477
- Ua as useActionData,
2478
- Ma as useAsyncError,
2479
- Na as useAsyncValue,
2480
- Oa as useBeforeUnload,
2481
- za as useBlocker,
2482
- Ba as useFetcher,
2483
- $a as useFetchers,
2484
- ja as useFormAction,
2485
- Va as useHref,
2486
- Wa as useInRouterContext,
2487
- qa as useLinkClickHandler,
2488
- Ga as useLoaderData,
2489
- Xa as useLocation,
2490
- Ya as useMatch,
2491
- Ja as useMatches,
2492
- Ka as useNavigate,
2493
- Qa as useNavigation,
2494
- Za as useNavigationType,
2495
- en as useOutlet,
2496
- tn as useOutletContext,
2497
- rn as useParams,
2498
- an as useResolvedPath,
2499
- nn as useRevalidator,
2500
- Xe as useRouteError,
2501
- on as useRouteLoaderData,
2502
- sn as useRoutes,
2503
- ln as useSearchParams,
2504
- un as useSubmit,
2505
- dn as useViewTransitionState
2183
+ pa as data,
2184
+ ma as generatePath,
2185
+ ir as href,
2186
+ He as isCookie,
2187
+ k as isRouteErrorResponse,
2188
+ nr as isSession,
2189
+ ya as matchPath,
2190
+ Ce as matchRoutes,
2191
+ wa as parsePath,
2192
+ nt as redirect,
2193
+ rt as redirectDocument,
2194
+ ga as renderMatches,
2195
+ at as replace,
2196
+ Ra as resolvePath,
2197
+ Sa as unstable_HistoryRouter,
2198
+ dr as unstable_RSCStaticRouter,
2199
+ ur as unstable_routeRSCServerRequest,
2200
+ rr as unstable_setDevServerHooks,
2201
+ va as unstable_usePrompt,
2202
+ Ea as unstable_useRoute,
2203
+ Ca as useActionData,
2204
+ ba as useAsyncError,
2205
+ _a as useAsyncValue,
2206
+ xa as useBeforeUnload,
2207
+ Aa as useBlocker,
2208
+ Da as useFetcher,
2209
+ Ha as useFetchers,
2210
+ Ta as useFormAction,
2211
+ ka as useHref,
2212
+ Fa as useInRouterContext,
2213
+ Pa as useLinkClickHandler,
2214
+ Ua as useLoaderData,
2215
+ La as useLocation,
2216
+ Na as useMatch,
2217
+ Oa as useMatches,
2218
+ Ia as useNavigate,
2219
+ Ba as useNavigation,
2220
+ Ma as useNavigationType,
2221
+ za as useOutlet,
2222
+ $a as useOutletContext,
2223
+ ja as useParams,
2224
+ qa as useResolvedPath,
2225
+ Va as useRevalidator,
2226
+ qe as useRouteError,
2227
+ Wa as useRouteLoaderData,
2228
+ Xa as useRoutes,
2229
+ Ja as useSearchParams,
2230
+ Qa as useSubmit,
2231
+ Ga as useViewTransitionState
2506
2232
  };
2507
2233
  //# sourceMappingURL=zudoku.router.js.map