zudoku 0.42.2 → 0.43.1

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 (202) hide show
  1. package/dist/app/entry.client.js +21 -0
  2. package/dist/app/entry.client.js.map +1 -1
  3. package/dist/config/loader.d.ts +1 -16
  4. package/dist/config/loader.js +9 -90
  5. package/dist/config/loader.js.map +1 -1
  6. package/dist/config/validators/common.d.ts +193 -0
  7. package/dist/config/validators/common.js +2 -0
  8. package/dist/config/validators/common.js.map +1 -1
  9. package/dist/config/validators/validate.d.ts +70 -0
  10. package/dist/lib/components/Banner.js +1 -1
  11. package/dist/lib/components/Banner.js.map +1 -1
  12. package/dist/lib/components/Heading.d.ts +2 -2
  13. package/dist/lib/components/Heading.js +1 -1
  14. package/dist/lib/components/Heading.js.map +1 -1
  15. package/dist/lib/components/Layout.js +1 -1
  16. package/dist/lib/components/Layout.js.map +1 -1
  17. package/dist/lib/components/Main.js +3 -2
  18. package/dist/lib/components/Main.js.map +1 -1
  19. package/dist/lib/components/MobileTopNavigation.js +1 -1
  20. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  21. package/dist/lib/components/Pagination.js +2 -2
  22. package/dist/lib/components/Pagination.js.map +1 -1
  23. package/dist/lib/components/Search.js +1 -1
  24. package/dist/lib/components/Search.js.map +1 -1
  25. package/dist/lib/components/TopNavigation.js +1 -1
  26. package/dist/lib/components/TopNavigation.js.map +1 -1
  27. package/dist/lib/components/navigation/PoweredByZudoku.js +1 -1
  28. package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -1
  29. package/dist/lib/components/navigation/Sidebar.js +1 -1
  30. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  31. package/dist/lib/components/navigation/SidebarCategory.js +9 -5
  32. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  33. package/dist/lib/components/navigation/SidebarItem.js +2 -3
  34. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  35. package/dist/lib/components/navigation/Toc.js +2 -2
  36. package/dist/lib/components/navigation/Toc.js.map +1 -1
  37. package/dist/lib/core/ZudokuContext.d.ts +2 -1
  38. package/dist/lib/core/ZudokuContext.js.map +1 -1
  39. package/dist/lib/oas/parser/upgrade/index.d.ts +1 -0
  40. package/dist/lib/oas/parser/upgrade/index.js +76 -24
  41. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  42. package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
  43. package/dist/lib/plugins/openapi/OperationList.js +1 -1
  44. package/dist/lib/plugins/openapi/OperationListItem.js +4 -2
  45. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  46. package/dist/lib/plugins/openapi/ParamInfos.js +1 -0
  47. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  48. package/dist/lib/plugins/openapi/SchemaList.js +1 -1
  49. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
  50. package/dist/lib/plugins/openapi/client/useCreateQuery.js +10 -4
  51. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  52. package/dist/lib/plugins/openapi/components/ConstValue.d.ts +5 -0
  53. package/dist/lib/plugins/openapi/components/ConstValue.js +6 -0
  54. package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -0
  55. package/dist/lib/plugins/openapi/index.d.ts +3 -4
  56. package/dist/lib/plugins/openapi/index.js +6 -4
  57. package/dist/lib/plugins/openapi/index.js.map +1 -1
  58. package/dist/lib/plugins/openapi/interfaces.d.ts +4 -3
  59. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -1
  60. package/dist/lib/plugins/openapi/playground/Playground.js +2 -2
  61. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  62. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
  63. package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
  64. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +1 -1
  65. package/dist/lib/plugins/openapi/playground/SubmitButton.js +1 -1
  66. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +1 -1
  67. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +1 -1
  68. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +1 -1
  69. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +6 -4
  70. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  71. package/dist/lib/plugins/openapi/schema/SchemaView.js +8 -5
  72. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  73. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +40 -0
  74. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  75. package/dist/lib/plugins/openapi/util/getRoutes.js +33 -3
  76. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  77. package/dist/lib/ui/SyntaxHighlight.js +1 -1
  78. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  79. package/dist/lib/util/traverse.d.ts +1 -1
  80. package/dist/lib/util/traverse.js +6 -5
  81. package/dist/lib/util/traverse.js.map +1 -1
  82. package/dist/vite/build.js +1 -0
  83. package/dist/vite/build.js.map +1 -1
  84. package/dist/vite/config.js +1 -1
  85. package/dist/vite/config.js.map +1 -1
  86. package/dist/vite/dev-server.js +5 -2
  87. package/dist/vite/dev-server.js.map +1 -1
  88. package/dist/vite/html.d.ts +6 -2
  89. package/dist/vite/html.js +11 -8
  90. package/dist/vite/html.js.map +1 -1
  91. package/dist/vite/plugin-api.js +2 -2
  92. package/dist/vite/plugin-api.js.map +1 -1
  93. package/lib/{AuthenticationPlugin-ByDF051g.js → AuthenticationPlugin-BxoEZCSJ.js} +4 -4
  94. package/lib/{AuthenticationPlugin-ByDF051g.js.map → AuthenticationPlugin-BxoEZCSJ.js.map} +1 -1
  95. package/lib/{Markdown-mFpg_n9p.js → Markdown-DvdVn1O7.js} +1839 -1836
  96. package/lib/Markdown-DvdVn1O7.js.map +1 -0
  97. package/lib/{MdxPage-Cm7atiW3.js → MdxPage-DUcuusMU.js} +7 -7
  98. package/lib/{MdxPage-Cm7atiW3.js.map → MdxPage-DUcuusMU.js.map} +1 -1
  99. package/lib/{OasProvider-CDtbrUG_.js → OasProvider-CjMm8pB7.js} +8 -9
  100. package/lib/{OasProvider-CDtbrUG_.js.map → OasProvider-CjMm8pB7.js.map} +1 -1
  101. package/lib/{OperationList-DTyJIxKW.js → OperationList-BhJcPgGi.js} +1353 -1316
  102. package/lib/{OperationList-DTyJIxKW.js.map → OperationList-BhJcPgGi.js.map} +1 -1
  103. package/lib/Pagination-BgQxwq5j.js +48 -0
  104. package/lib/Pagination-BgQxwq5j.js.map +1 -0
  105. package/lib/{RouteGuard-DRtEu9nh.js → RouteGuard-D2gX29iI.js} +3 -3
  106. package/lib/{RouteGuard-DRtEu9nh.js.map → RouteGuard-D2gX29iI.js.map} +1 -1
  107. package/lib/{SchemaList-B9lvArDe.js → SchemaList-BexhT_Z0.js} +22 -23
  108. package/lib/{SchemaList-B9lvArDe.js.map → SchemaList-BexhT_Z0.js.map} +1 -1
  109. package/lib/SchemaView-Dt_-u8rW.js +365 -0
  110. package/lib/SchemaView-Dt_-u8rW.js.map +1 -0
  111. package/lib/{Select-CT64Ou40.js → Select-CYaEBIYK.js} +3 -3
  112. package/lib/{Select-CT64Ou40.js.map → Select-CYaEBIYK.js.map} +1 -1
  113. package/lib/{SlotletProvider-CS_nO-XT.js → SlotletProvider-wWbHYqWf.js} +7 -7
  114. package/lib/SlotletProvider-wWbHYqWf.js.map +1 -0
  115. package/lib/{SyntaxHighlight-CxhyyMkF.js → SyntaxHighlight-o7q0acut.js} +81 -81
  116. package/lib/{SyntaxHighlight-CxhyyMkF.js.map → SyntaxHighlight-o7q0acut.js.map} +1 -1
  117. package/lib/{Toc-D_tV8_Ri.js → Toc-BnN4zBb3.js} +17 -17
  118. package/lib/Toc-BnN4zBb3.js.map +1 -0
  119. package/lib/{chunk-BAXFHI7N-BVBOl9s0.js → chunk-BAXFHI7N-BLTsN6tl.js} +679 -659
  120. package/lib/{chunk-BAXFHI7N-BVBOl9s0.js.map → chunk-BAXFHI7N-BLTsN6tl.js.map} +1 -1
  121. package/lib/{circular-ByJI6Mci.js → circular-BWEIet3w.js} +4616 -5567
  122. package/lib/circular-BWEIet3w.js.map +1 -0
  123. package/lib/{createServer-IW7v5hWm.js → createServer-BQD3Eeqb.js} +1998 -1970
  124. package/lib/createServer-BQD3Eeqb.js.map +1 -0
  125. package/lib/{hook-CldJlP5c.js → hook-8GM2HXNM.js} +24 -24
  126. package/lib/{hook-CldJlP5c.js.map → hook-8GM2HXNM.js.map} +1 -1
  127. package/lib/index-CFf9AN-y.js +3208 -0
  128. package/lib/index-CFf9AN-y.js.map +1 -0
  129. package/lib/{index-DnQftvP4.js → index-DGNSSXgR.js} +77 -69
  130. package/lib/{index-DnQftvP4.js.map → index-DGNSSXgR.js.map} +1 -1
  131. package/lib/{mutation-DBQh7AOZ.js → mutation-Bq5bn7Hf.js} +2 -2
  132. package/lib/{mutation-DBQh7AOZ.js.map → mutation-Bq5bn7Hf.js.map} +1 -1
  133. package/lib/processors/traverse.js +9 -7
  134. package/lib/processors/traverse.js.map +1 -1
  135. package/lib/ui/SyntaxHighlight.js +1 -1
  136. package/lib/{useExposedProps-DbIZXspi.js → useExposedProps-DmTJxEXG.js} +2 -2
  137. package/lib/{useExposedProps-DbIZXspi.js.map → useExposedProps-DmTJxEXG.js.map} +1 -1
  138. package/lib/zudoku.auth-auth0.js +1 -1
  139. package/lib/zudoku.auth-clerk.js +2 -2
  140. package/lib/zudoku.auth-openid.js +3 -3
  141. package/lib/zudoku.components.js +6 -6
  142. package/lib/zudoku.hooks.js +1 -1
  143. package/lib/zudoku.plugin-api-catalog.js +5 -5
  144. package/lib/zudoku.plugin-api-keys.js +4 -4
  145. package/lib/zudoku.plugin-custom-pages.js +2 -2
  146. package/lib/zudoku.plugin-markdown.js +1 -1
  147. package/lib/zudoku.plugin-openapi.js +6 -5
  148. package/lib/zudoku.plugin-redirect.js +1 -1
  149. package/lib/zudoku.plugin-search-pagefind.js +3 -3
  150. package/package.json +4 -4
  151. package/src/app/entry.client.tsx +26 -0
  152. package/src/app/main.css +2 -2
  153. package/src/lib/components/Banner.tsx +1 -1
  154. package/src/lib/components/Heading.tsx +3 -3
  155. package/src/lib/components/Layout.tsx +1 -4
  156. package/src/lib/components/Main.tsx +4 -3
  157. package/src/lib/components/MobileTopNavigation.tsx +2 -2
  158. package/src/lib/components/Pagination.tsx +3 -3
  159. package/src/lib/components/Search.tsx +1 -1
  160. package/src/lib/components/TopNavigation.tsx +1 -1
  161. package/src/lib/components/navigation/PoweredByZudoku.tsx +6 -1
  162. package/src/lib/components/navigation/Sidebar.tsx +1 -1
  163. package/src/lib/components/navigation/SidebarCategory.tsx +9 -5
  164. package/src/lib/components/navigation/SidebarItem.tsx +2 -3
  165. package/src/lib/components/navigation/Toc.tsx +4 -4
  166. package/src/lib/core/ZudokuContext.ts +2 -1
  167. package/src/lib/oas/parser/upgrade/index.ts +97 -27
  168. package/src/lib/plugins/openapi/CollapsibleCode.tsx +2 -2
  169. package/src/lib/plugins/openapi/OperationList.tsx +1 -1
  170. package/src/lib/plugins/openapi/OperationListItem.tsx +15 -6
  171. package/src/lib/plugins/openapi/ParamInfos.tsx +1 -0
  172. package/src/lib/plugins/openapi/SchemaList.tsx +1 -1
  173. package/src/lib/plugins/openapi/client/useCreateQuery.ts +23 -4
  174. package/src/lib/plugins/openapi/components/ConstValue.tsx +24 -0
  175. package/src/lib/plugins/openapi/index.tsx +8 -7
  176. package/src/lib/plugins/openapi/interfaces.ts +4 -3
  177. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +2 -2
  178. package/src/lib/plugins/openapi/playground/Playground.tsx +5 -5
  179. package/src/lib/plugins/openapi/playground/QueryParams.tsx +2 -2
  180. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +2 -2
  181. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +2 -2
  182. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +1 -1
  183. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +1 -1
  184. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +6 -3
  185. package/src/lib/plugins/openapi/schema/SchemaView.tsx +31 -15
  186. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +45 -0
  187. package/src/lib/plugins/openapi/util/getRoutes.tsx +67 -3
  188. package/src/lib/ui/SyntaxHighlight.tsx +2 -2
  189. package/src/lib/util/traverse.ts +8 -5
  190. package/lib/Markdown-mFpg_n9p.js.map +0 -1
  191. package/lib/Pagination-DLPL5z77.js +0 -48
  192. package/lib/Pagination-DLPL5z77.js.map +0 -1
  193. package/lib/SchemaView-DXjql-Bl.js +0 -356
  194. package/lib/SchemaView-DXjql-Bl.js.map +0 -1
  195. package/lib/SlotletProvider-CS_nO-XT.js.map +0 -1
  196. package/lib/Toc-D_tV8_Ri.js.map +0 -1
  197. package/lib/circular-ByJI6Mci.js.map +0 -1
  198. package/lib/context-Lrf2Y9bR.js +0 -22
  199. package/lib/context-Lrf2Y9bR.js.map +0 -1
  200. package/lib/createServer-IW7v5hWm.js.map +0 -1
  201. package/lib/index-Ckl3s_w-.js +0 -2184
  202. package/lib/index-Ckl3s_w-.js.map +0 -1
@@ -1,94 +1,94 @@
1
1
  import * as o from "react";
2
2
  var F = {}, ue;
3
- function Me() {
3
+ function Ae() {
4
4
  if (ue) return F;
5
- ue = 1, Object.defineProperty(F, "__esModule", { value: !0 }), F.parse = c, F.serialize = s;
6
- const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, n = /^([.]?[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]*$/, r = Object.prototype.toString, i = /* @__PURE__ */ (() => {
5
+ ue = 1, Object.defineProperty(F, "__esModule", { value: !0 }), F.parse = s, F.serialize = u;
6
+ const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, n = /^[\u0021-\u003A\u003C-\u007E]*$/, t = /^([.]?[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]*$/, r = Object.prototype.toString, i = /* @__PURE__ */ (() => {
7
7
  const d = function() {
8
8
  };
9
9
  return d.prototype = /* @__PURE__ */ Object.create(null), d;
10
10
  })();
11
- function c(d, v) {
11
+ function s(d, g) {
12
12
  const f = new i(), w = d.length;
13
13
  if (w < 2)
14
14
  return f;
15
- const E = (v == null ? void 0 : v.decode) || h;
16
- let m = 0;
15
+ const E = (g == null ? void 0 : g.decode) || h;
16
+ let p = 0;
17
17
  do {
18
- const g = d.indexOf("=", m);
19
- if (g === -1)
18
+ const v = d.indexOf("=", p);
19
+ if (v === -1)
20
20
  break;
21
- const y = d.indexOf(";", m), R = y === -1 ? w : y;
22
- if (g > R) {
23
- m = d.lastIndexOf(";", g - 1) + 1;
21
+ const y = d.indexOf(";", p), b = y === -1 ? w : y;
22
+ if (v > b) {
23
+ p = d.lastIndexOf(";", v - 1) + 1;
24
24
  continue;
25
25
  }
26
- const x = u(d, m, g), C = l(d, g, x), $ = d.slice(x, C);
26
+ const x = c(d, p, v), C = l(d, v, x), $ = d.slice(x, C);
27
27
  if (f[$] === void 0) {
28
- let S = u(d, g + 1, R), P = l(d, R, S);
28
+ let S = c(d, v + 1, b), P = l(d, b, S);
29
29
  const D = E(d.slice(S, P));
30
30
  f[$] = D;
31
31
  }
32
- m = R + 1;
33
- } while (m < w);
32
+ p = b + 1;
33
+ } while (p < w);
34
34
  return f;
35
35
  }
36
- function u(d, v, f) {
36
+ function c(d, g, f) {
37
37
  do {
38
- const w = d.charCodeAt(v);
38
+ const w = d.charCodeAt(g);
39
39
  if (w !== 32 && w !== 9)
40
- return v;
41
- } while (++v < f);
40
+ return g;
41
+ } while (++g < f);
42
42
  return f;
43
43
  }
44
- function l(d, v, f) {
45
- for (; v > f; ) {
46
- const w = d.charCodeAt(--v);
44
+ function l(d, g, f) {
45
+ for (; g > f; ) {
46
+ const w = d.charCodeAt(--g);
47
47
  if (w !== 32 && w !== 9)
48
- return v + 1;
48
+ return g + 1;
49
49
  }
50
50
  return f;
51
51
  }
52
- function s(d, v, f) {
52
+ function u(d, g, f) {
53
53
  const w = (f == null ? void 0 : f.encode) || encodeURIComponent;
54
54
  if (!e.test(d))
55
55
  throw new TypeError(`argument name is invalid: ${d}`);
56
- const E = w(v);
57
- if (!t.test(E))
58
- throw new TypeError(`argument val is invalid: ${v}`);
59
- let m = d + "=" + E;
56
+ const E = w(g);
57
+ if (!n.test(E))
58
+ throw new TypeError(`argument val is invalid: ${g}`);
59
+ let p = d + "=" + E;
60
60
  if (!f)
61
- return m;
61
+ return p;
62
62
  if (f.maxAge !== void 0) {
63
63
  if (!Number.isInteger(f.maxAge))
64
64
  throw new TypeError(`option maxAge is invalid: ${f.maxAge}`);
65
- m += "; Max-Age=" + f.maxAge;
65
+ p += "; Max-Age=" + f.maxAge;
66
66
  }
67
67
  if (f.domain) {
68
- if (!n.test(f.domain))
68
+ if (!t.test(f.domain))
69
69
  throw new TypeError(`option domain is invalid: ${f.domain}`);
70
- m += "; Domain=" + f.domain;
70
+ p += "; Domain=" + f.domain;
71
71
  }
72
72
  if (f.path) {
73
73
  if (!a.test(f.path))
74
74
  throw new TypeError(`option path is invalid: ${f.path}`);
75
- m += "; Path=" + f.path;
75
+ p += "; Path=" + f.path;
76
76
  }
77
77
  if (f.expires) {
78
- if (!p(f.expires) || !Number.isFinite(f.expires.valueOf()))
78
+ if (!m(f.expires) || !Number.isFinite(f.expires.valueOf()))
79
79
  throw new TypeError(`option expires is invalid: ${f.expires}`);
80
- m += "; Expires=" + f.expires.toUTCString();
80
+ p += "; Expires=" + f.expires.toUTCString();
81
81
  }
82
- if (f.httpOnly && (m += "; HttpOnly"), f.secure && (m += "; Secure"), f.partitioned && (m += "; Partitioned"), f.priority)
82
+ if (f.httpOnly && (p += "; HttpOnly"), f.secure && (p += "; Secure"), f.partitioned && (p += "; Partitioned"), f.priority)
83
83
  switch (typeof f.priority == "string" ? f.priority.toLowerCase() : void 0) {
84
84
  case "low":
85
- m += "; Priority=Low";
85
+ p += "; Priority=Low";
86
86
  break;
87
87
  case "medium":
88
- m += "; Priority=Medium";
88
+ p += "; Priority=Medium";
89
89
  break;
90
90
  case "high":
91
- m += "; Priority=High";
91
+ p += "; Priority=High";
92
92
  break;
93
93
  default:
94
94
  throw new TypeError(`option priority is invalid: ${f.priority}`);
@@ -97,18 +97,18 @@ function Me() {
97
97
  switch (typeof f.sameSite == "string" ? f.sameSite.toLowerCase() : f.sameSite) {
98
98
  case !0:
99
99
  case "strict":
100
- m += "; SameSite=Strict";
100
+ p += "; SameSite=Strict";
101
101
  break;
102
102
  case "lax":
103
- m += "; SameSite=Lax";
103
+ p += "; SameSite=Lax";
104
104
  break;
105
105
  case "none":
106
- m += "; SameSite=None";
106
+ p += "; SameSite=None";
107
107
  break;
108
108
  default:
109
109
  throw new TypeError(`option sameSite is invalid: ${f.sameSite}`);
110
110
  }
111
- return m;
111
+ return p;
112
112
  }
113
113
  function h(d) {
114
114
  if (d.indexOf("%") === -1)
@@ -119,12 +119,12 @@ function Me() {
119
119
  return d;
120
120
  }
121
121
  }
122
- function p(d) {
122
+ function m(d) {
123
123
  return r.call(d) === "[object Date]";
124
124
  }
125
125
  return F;
126
126
  }
127
- Me();
127
+ Ae();
128
128
  /**
129
129
  * react-router v7.5.2
130
130
  *
@@ -135,282 +135,301 @@ Me();
135
135
  *
136
136
  * @license MIT
137
137
  */
138
- function b(e, t) {
138
+ function R(e, n) {
139
139
  if (e === !1 || e === null || typeof e > "u")
140
- throw new Error(t);
140
+ throw new Error(n);
141
141
  }
142
- function L(e, t) {
142
+ function L(e, n) {
143
143
  if (!e) {
144
- typeof console < "u" && console.warn(t);
144
+ typeof console < "u" && console.warn(n);
145
145
  try {
146
- throw new Error(t);
146
+ throw new Error(n);
147
147
  } catch {
148
148
  }
149
149
  }
150
150
  }
151
- function B({
151
+ function W({
152
152
  pathname: e = "/",
153
- search: t = "",
154
- hash: n = ""
153
+ search: n = "",
154
+ hash: t = ""
155
155
  }) {
156
- return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
156
+ return n && n !== "?" && (e += n.charAt(0) === "?" ? n : "?" + n), t && t !== "#" && (e += t.charAt(0) === "#" ? t : "#" + t), e;
157
157
  }
158
158
  function Y(e) {
159
- let t = {};
159
+ let n = {};
160
160
  if (e) {
161
- let n = e.indexOf("#");
162
- n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
161
+ let t = e.indexOf("#");
162
+ t >= 0 && (n.hash = e.substring(t), e = e.substring(0, t));
163
163
  let a = e.indexOf("?");
164
- a >= 0 && (t.search = e.substring(a), e = e.substring(0, a)), e && (t.pathname = e);
164
+ a >= 0 && (n.search = e.substring(a), e = e.substring(0, a)), e && (n.pathname = e);
165
165
  }
166
- return t;
166
+ return n;
167
167
  }
168
- function pe(e, t, n = "/") {
169
- return De(e, t, n, !1);
168
+ function pe(e, n, t = "/") {
169
+ return De(e, n, t, !1);
170
170
  }
171
- function De(e, t, n, a) {
172
- let r = typeof t == "string" ? Y(t) : t, i = M(r.pathname || "/", n);
171
+ function De(e, n, t, a) {
172
+ let r = typeof n == "string" ? Y(n) : n, i = A(r.pathname || "/", t);
173
173
  if (i == null)
174
174
  return null;
175
- let c = ve(e);
176
- Oe(c);
177
- let u = null;
178
- for (let l = 0; u == null && l < c.length; ++l) {
179
- let s = ye(i);
180
- u = Ve(
181
- c[l],
182
- s,
175
+ let s = ge(e);
176
+ Oe(s);
177
+ let c = null;
178
+ for (let l = 0; c == null && l < s.length; ++l) {
179
+ let u = ye(i);
180
+ c = je(
181
+ s[l],
182
+ u,
183
183
  a
184
184
  );
185
185
  }
186
- return u;
186
+ return c;
187
187
  }
188
- function ve(e, t = [], n = [], a = "") {
189
- let r = (i, c, u) => {
188
+ function ge(e, n = [], t = [], a = "") {
189
+ let r = (i, s, c) => {
190
190
  let l = {
191
- relativePath: u === void 0 ? i.path || "" : u,
191
+ relativePath: c === void 0 ? i.path || "" : c,
192
192
  caseSensitive: i.caseSensitive === !0,
193
- childrenIndex: c,
193
+ childrenIndex: s,
194
194
  route: i
195
195
  };
196
- l.relativePath.startsWith("/") && (b(
196
+ l.relativePath.startsWith("/") && (R(
197
197
  l.relativePath.startsWith(a),
198
198
  `Absolute route path "${l.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
199
199
  ), l.relativePath = l.relativePath.slice(a.length));
200
- let s = A([a, l.relativePath]), h = n.concat(l);
201
- i.children && i.children.length > 0 && (b(
200
+ let u = M([a, l.relativePath]), h = t.concat(l);
201
+ i.children && i.children.length > 0 && (R(
202
202
  // Our types know better, but runtime JS may not!
203
203
  // @ts-expect-error
204
204
  i.index !== !0,
205
- `Index routes must not have child routes. Please remove all child routes from route path "${s}".`
206
- ), ve(i.children, t, h, s)), !(i.path == null && !i.index) && t.push({
207
- path: s,
208
- score: We(s, i.index),
205
+ `Index routes must not have child routes. Please remove all child routes from route path "${u}".`
206
+ ), ge(i.children, n, h, u)), !(i.path == null && !i.index) && n.push({
207
+ path: u,
208
+ score: He(u, i.index),
209
209
  routesMeta: h
210
210
  });
211
211
  };
212
- return e.forEach((i, c) => {
213
- var u;
214
- if (i.path === "" || !((u = i.path) != null && u.includes("?")))
215
- r(i, c);
212
+ return e.forEach((i, s) => {
213
+ var c;
214
+ if (i.path === "" || !((c = i.path) != null && c.includes("?")))
215
+ r(i, s);
216
216
  else
217
- for (let l of ge(i.path))
218
- r(i, c, l);
219
- }), t;
217
+ for (let l of ve(i.path))
218
+ r(i, s, l);
219
+ }), n;
220
220
  }
221
- function ge(e) {
222
- let t = e.split("/");
223
- if (t.length === 0) return [];
224
- let [n, ...a] = t, r = n.endsWith("?"), i = n.replace(/\?$/, "");
221
+ function ve(e) {
222
+ let n = e.split("/");
223
+ if (n.length === 0) return [];
224
+ let [t, ...a] = n, r = t.endsWith("?"), i = t.replace(/\?$/, "");
225
225
  if (a.length === 0)
226
226
  return r ? [i, ""] : [i];
227
- let c = ge(a.join("/")), u = [];
228
- return u.push(
229
- ...c.map(
227
+ let s = ve(a.join("/")), c = [];
228
+ return c.push(
229
+ ...s.map(
230
230
  (l) => l === "" ? i : [i, l].join("/")
231
231
  )
232
- ), r && u.push(...c), u.map(
232
+ ), r && c.push(...s), c.map(
233
233
  (l) => e.startsWith("/") && l === "" ? "/" : l
234
234
  );
235
235
  }
236
236
  function Oe(e) {
237
237
  e.sort(
238
- (t, n) => t.score !== n.score ? n.score - t.score : ze(
239
- t.routesMeta.map((a) => a.childrenIndex),
240
- n.routesMeta.map((a) => a.childrenIndex)
238
+ (n, t) => n.score !== t.score ? t.score - n.score : ze(
239
+ n.routesMeta.map((a) => a.childrenIndex),
240
+ t.routesMeta.map((a) => a.childrenIndex)
241
241
  )
242
242
  );
243
243
  }
244
- var Ie = /^:[\w-]+$/, _e = 3, Fe = 2, Ue = 1, Be = 10, He = -2, ce = (e) => e === "*";
245
- function We(e, t) {
246
- let n = e.split("/"), a = n.length;
247
- return n.some(ce) && (a += He), t && (a += Fe), n.filter((r) => !ce(r)).reduce(
248
- (r, i) => r + (Ie.test(i) ? _e : i === "" ? Ue : Be),
244
+ var Ie = /^:[\w-]+$/, _e = 3, Fe = 2, Ue = 1, We = 10, Be = -2, ce = (e) => e === "*";
245
+ function He(e, n) {
246
+ let t = e.split("/"), a = t.length;
247
+ return t.some(ce) && (a += Be), n && (a += Fe), t.filter((r) => !ce(r)).reduce(
248
+ (r, i) => r + (Ie.test(i) ? _e : i === "" ? Ue : We),
249
249
  a
250
250
  );
251
251
  }
252
- function ze(e, t) {
253
- return e.length === t.length && e.slice(0, -1).every((a, r) => a === t[r]) ? (
252
+ function ze(e, n) {
253
+ return e.length === n.length && e.slice(0, -1).every((a, r) => a === n[r]) ? (
254
254
  // If two routes are siblings, we should try to match the earlier sibling
255
255
  // first. This allows people to have fine-grained control over the matching
256
256
  // behavior by simply putting routes with identical paths in the order they
257
257
  // want them tried.
258
- e[e.length - 1] - t[t.length - 1]
258
+ e[e.length - 1] - n[n.length - 1]
259
259
  ) : (
260
260
  // Otherwise, it doesn't really make sense to rank non-siblings by index,
261
261
  // so they sort equally.
262
262
  0
263
263
  );
264
264
  }
265
- function Ve(e, t, n = !1) {
266
- let { routesMeta: a } = e, r = {}, i = "/", c = [];
267
- for (let u = 0; u < a.length; ++u) {
268
- let l = a[u], s = u === a.length - 1, h = i === "/" ? t : t.slice(i.length) || "/", p = H(
269
- { path: l.relativePath, caseSensitive: l.caseSensitive, end: s },
265
+ function je(e, n, t = !1) {
266
+ let { routesMeta: a } = e, r = {}, i = "/", s = [];
267
+ for (let c = 0; c < a.length; ++c) {
268
+ let l = a[c], u = c === a.length - 1, h = i === "/" ? n : n.slice(i.length) || "/", m = B(
269
+ { path: l.relativePath, caseSensitive: l.caseSensitive, end: u },
270
270
  h
271
271
  ), d = l.route;
272
- if (!p && s && n && !a[a.length - 1].route.index && (p = H(
272
+ if (!m && u && t && !a[a.length - 1].route.index && (m = B(
273
273
  {
274
274
  path: l.relativePath,
275
275
  caseSensitive: l.caseSensitive,
276
276
  end: !1
277
277
  },
278
278
  h
279
- )), !p)
279
+ )), !m)
280
280
  return null;
281
- Object.assign(r, p.params), c.push({
281
+ Object.assign(r, m.params), s.push({
282
282
  // TODO: Can this as be avoided?
283
283
  params: r,
284
- pathname: A([i, p.pathname]),
284
+ pathname: M([i, m.pathname]),
285
285
  pathnameBase: qe(
286
- A([i, p.pathnameBase])
286
+ M([i, m.pathnameBase])
287
287
  ),
288
288
  route: d
289
- }), p.pathnameBase !== "/" && (i = A([i, p.pathnameBase]));
289
+ }), m.pathnameBase !== "/" && (i = M([i, m.pathnameBase]));
290
290
  }
291
- return c;
291
+ return s;
292
+ }
293
+ function on(e, n = {}) {
294
+ let t = e;
295
+ t.endsWith("*") && t !== "*" && !t.endsWith("/*") && (L(
296
+ !1,
297
+ `Route path "${t}" will be treated as if it were "${t.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/, "/*")}".`
298
+ ), t = t.replace(/\*$/, "/*"));
299
+ const a = t.startsWith("/") ? "/" : "", r = (s) => s == null ? "" : typeof s == "string" ? s : String(s), i = t.split(/\/+/).map((s, c, l) => {
300
+ if (c === l.length - 1 && s === "*")
301
+ return r(n["*"]);
302
+ const h = s.match(/^:([\w-]+)(\??)$/);
303
+ if (h) {
304
+ const [, m, d] = h;
305
+ let g = n[m];
306
+ return R(d === "?" || g != null, `Missing ":${m}" param`), r(g);
307
+ }
308
+ return s.replace(/\?$/g, "");
309
+ }).filter((s) => !!s);
310
+ return a + i.join("/");
292
311
  }
293
- function H(e, t) {
312
+ function B(e, n) {
294
313
  typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
295
- let [n, a] = je(
314
+ let [t, a] = Ve(
296
315
  e.path,
297
316
  e.caseSensitive,
298
317
  e.end
299
- ), r = t.match(n);
318
+ ), r = n.match(t);
300
319
  if (!r) return null;
301
- let i = r[0], c = i.replace(/(.)\/+$/, "$1"), u = r.slice(1);
320
+ let i = r[0], s = i.replace(/(.)\/+$/, "$1"), c = r.slice(1);
302
321
  return {
303
322
  params: a.reduce(
304
- (s, { paramName: h, isOptional: p }, d) => {
323
+ (u, { paramName: h, isOptional: m }, d) => {
305
324
  if (h === "*") {
306
- let f = u[d] || "";
307
- c = i.slice(0, i.length - f.length).replace(/(.)\/+$/, "$1");
325
+ let f = c[d] || "";
326
+ s = i.slice(0, i.length - f.length).replace(/(.)\/+$/, "$1");
308
327
  }
309
- const v = u[d];
310
- return p && !v ? s[h] = void 0 : s[h] = (v || "").replace(/%2F/g, "/"), s;
328
+ const g = c[d];
329
+ return m && !g ? u[h] = void 0 : u[h] = (g || "").replace(/%2F/g, "/"), u;
311
330
  },
312
331
  {}
313
332
  ),
314
333
  pathname: i,
315
- pathnameBase: c,
334
+ pathnameBase: s,
316
335
  pattern: e
317
336
  };
318
337
  }
319
- function je(e, t = !1, n = !0) {
338
+ function Ve(e, n = !1, t = !0) {
320
339
  L(
321
340
  e === "*" || !e.endsWith("*") || e.endsWith("/*"),
322
341
  `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
323
342
  );
324
343
  let a = [], r = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
325
344
  /\/:([\w-]+)(\?)?/g,
326
- (c, u, l) => (a.push({ paramName: u, isOptional: l != null }), l ? "/?([^\\/]+)?" : "/([^\\/]+)")
345
+ (s, c, l) => (a.push({ paramName: c, isOptional: l != null }), l ? "/?([^\\/]+)?" : "/([^\\/]+)")
327
346
  );
328
- return e.endsWith("*") ? (a.push({ paramName: "*" }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? r += "\\/*$" : e !== "" && e !== "/" && (r += "(?:(?=\\/|$))"), [new RegExp(r, t ? void 0 : "i"), a];
347
+ return e.endsWith("*") ? (a.push({ paramName: "*" }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : t ? r += "\\/*$" : e !== "" && e !== "/" && (r += "(?:(?=\\/|$))"), [new RegExp(r, n ? void 0 : "i"), a];
329
348
  }
330
349
  function ye(e) {
331
350
  try {
332
- return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
333
- } catch (t) {
351
+ return e.split("/").map((n) => decodeURIComponent(n).replace(/\//g, "%2F")).join("/");
352
+ } catch (n) {
334
353
  return L(
335
354
  !1,
336
- `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
355
+ `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`
337
356
  ), e;
338
357
  }
339
358
  }
340
- function M(e, t) {
341
- if (t === "/") return e;
342
- if (!e.toLowerCase().startsWith(t.toLowerCase()))
359
+ function A(e, n) {
360
+ if (n === "/") return e;
361
+ if (!e.toLowerCase().startsWith(n.toLowerCase()))
343
362
  return null;
344
- let n = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(n);
345
- return a && a !== "/" ? null : e.slice(n) || "/";
363
+ let t = n.endsWith("/") ? n.length - 1 : n.length, a = e.charAt(t);
364
+ return a && a !== "/" ? null : e.slice(t) || "/";
346
365
  }
347
- function Ye(e, t = "/") {
366
+ function Ye(e, n = "/") {
348
367
  let {
349
- pathname: n,
368
+ pathname: t,
350
369
  search: a = "",
351
370
  hash: r = ""
352
371
  } = typeof e == "string" ? Y(e) : e;
353
372
  return {
354
- pathname: n ? n.startsWith("/") ? n : Je(n, t) : t,
373
+ pathname: t ? t.startsWith("/") ? t : Je(t, n) : n,
355
374
  search: Ge(a),
356
375
  hash: Xe(r)
357
376
  };
358
377
  }
359
- function Je(e, t) {
360
- let n = t.replace(/\/+$/, "").split("/");
378
+ function Je(e, n) {
379
+ let t = n.replace(/\/+$/, "").split("/");
361
380
  return e.split("/").forEach((r) => {
362
- r === ".." ? n.length > 1 && n.pop() : r !== "." && n.push(r);
363
- }), n.length > 1 ? n.join("/") : "/";
381
+ r === ".." ? t.length > 1 && t.pop() : r !== "." && t.push(r);
382
+ }), t.length > 1 ? t.join("/") : "/";
364
383
  }
365
- function G(e, t, n, a) {
366
- return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
384
+ function G(e, n, t, a) {
385
+ return `Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(
367
386
  a
368
- )}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
387
+ )}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
369
388
  }
370
389
  function Ke(e) {
371
390
  return e.filter(
372
- (t, n) => n === 0 || t.route.path && t.route.path.length > 0
391
+ (n, t) => t === 0 || n.route.path && n.route.path.length > 0
373
392
  );
374
393
  }
375
394
  function Z(e) {
376
- let t = Ke(e);
377
- return t.map(
378
- (n, a) => a === t.length - 1 ? n.pathname : n.pathnameBase
395
+ let n = Ke(e);
396
+ return n.map(
397
+ (t, a) => a === n.length - 1 ? t.pathname : t.pathnameBase
379
398
  );
380
399
  }
381
- function ee(e, t, n, a = !1) {
400
+ function ee(e, n, t, a = !1) {
382
401
  let r;
383
- typeof e == "string" ? r = Y(e) : (r = { ...e }, b(
402
+ typeof e == "string" ? r = Y(e) : (r = { ...e }, R(
384
403
  !r.pathname || !r.pathname.includes("?"),
385
404
  G("?", "pathname", "search", r)
386
- ), b(
405
+ ), R(
387
406
  !r.pathname || !r.pathname.includes("#"),
388
407
  G("#", "pathname", "hash", r)
389
- ), b(
408
+ ), R(
390
409
  !r.search || !r.search.includes("#"),
391
410
  G("#", "search", "hash", r)
392
411
  ));
393
- let i = e === "" || r.pathname === "", c = i ? "/" : r.pathname, u;
394
- if (c == null)
395
- u = n;
412
+ let i = e === "" || r.pathname === "", s = i ? "/" : r.pathname, c;
413
+ if (s == null)
414
+ c = t;
396
415
  else {
397
- let p = t.length - 1;
398
- if (!a && c.startsWith("..")) {
399
- let d = c.split("/");
416
+ let m = n.length - 1;
417
+ if (!a && s.startsWith("..")) {
418
+ let d = s.split("/");
400
419
  for (; d[0] === ".."; )
401
- d.shift(), p -= 1;
420
+ d.shift(), m -= 1;
402
421
  r.pathname = d.join("/");
403
422
  }
404
- u = p >= 0 ? t[p] : "/";
423
+ c = m >= 0 ? n[m] : "/";
405
424
  }
406
- let l = Ye(r, u), s = c && c !== "/" && c.endsWith("/"), h = (i || c === ".") && n.endsWith("/");
407
- return !l.pathname.endsWith("/") && (s || h) && (l.pathname += "/"), l;
408
- }
409
- var A = (e) => e.join("/").replace(/\/\/+/g, "/"), qe = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), Ge = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Xe = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, on = (e, t = 302) => {
410
- let n = t;
411
- typeof n == "number" ? n = { status: n } : typeof n.status > "u" && (n.status = 302);
412
- let a = new Headers(n.headers);
413
- return a.set("Location", e), new Response(null, { ...n, headers: a });
425
+ let l = Ye(r, c), u = s && s !== "/" && s.endsWith("/"), h = (i || s === ".") && t.endsWith("/");
426
+ return !l.pathname.endsWith("/") && (u || h) && (l.pathname += "/"), l;
427
+ }
428
+ var M = (e) => e.join("/").replace(/\/\/+/g, "/"), qe = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), Ge = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Xe = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, ln = (e, n = 302) => {
429
+ let t = n;
430
+ typeof t == "number" ? t = { status: t } : typeof t.status > "u" && (t.status = 302);
431
+ let a = new Headers(t.headers);
432
+ return a.set("Location", e), new Response(null, { ...t, headers: a });
414
433
  };
415
434
  function we(e) {
416
435
  return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
@@ -459,42 +478,42 @@ var k = o.createContext({
459
478
  k.displayName = "Route";
460
479
  var ne = o.createContext(null);
461
480
  ne.displayName = "RouteError";
462
- function et(e, { relative: t } = {}) {
463
- b(
481
+ function et(e, { relative: n } = {}) {
482
+ R(
464
483
  I(),
465
484
  // TODO: This error is probably because they somehow have 2 versions of the
466
485
  // router loaded. We can help them understand how to avoid that.
467
486
  "useHref() may be used only in the context of a <Router> component."
468
487
  );
469
- let { basename: n, navigator: a } = o.useContext(T), { hash: r, pathname: i, search: c } = W(e, { relative: t }), u = i;
470
- return n !== "/" && (u = i === "/" ? n : A([n, i])), a.createHref({ pathname: u, search: c, hash: r });
488
+ let { basename: t, navigator: a } = o.useContext(T), { hash: r, pathname: i, search: s } = H(e, { relative: n }), c = i;
489
+ return t !== "/" && (c = i === "/" ? t : M([t, i])), a.createHref({ pathname: c, search: s, hash: r });
471
490
  }
472
491
  function I() {
473
492
  return o.useContext(K) != null;
474
493
  }
475
494
  function N() {
476
- return b(
495
+ return R(
477
496
  I(),
478
497
  // TODO: This error is probably because they somehow have 2 versions of the
479
498
  // router loaded. We can help them understand how to avoid that.
480
499
  "useLocation() may be used only in the context of a <Router> component."
481
500
  ), o.useContext(K).location;
482
501
  }
483
- function ln(e) {
484
- b(
502
+ function sn(e) {
503
+ R(
485
504
  I(),
486
505
  // TODO: This error is probably because they somehow have 2 versions of the
487
506
  // router loaded. We can help them understand how to avoid that.
488
507
  "useMatch() may be used only in the context of a <Router> component."
489
508
  );
490
- let { pathname: t } = N();
509
+ let { pathname: n } = N();
491
510
  return o.useMemo(
492
- () => H(e, ye(t)),
493
- [t, e]
511
+ () => B(e, ye(n)),
512
+ [n, e]
494
513
  );
495
514
  }
496
515
  var xe = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
497
- function Re(e) {
516
+ function be(e) {
498
517
  o.useContext(T).static || o.useLayoutEffect(e);
499
518
  }
500
519
  function re() {
@@ -502,37 +521,37 @@ function re() {
502
521
  return e ? ht() : tt();
503
522
  }
504
523
  function tt() {
505
- b(
524
+ R(
506
525
  I(),
507
526
  // TODO: This error is probably because they somehow have 2 versions of the
508
527
  // router loaded. We can help them understand how to avoid that.
509
528
  "useNavigate() may be used only in the context of a <Router> component."
510
529
  );
511
- let e = o.useContext(O), { basename: t, navigator: n } = o.useContext(T), { matches: a } = o.useContext(k), { pathname: r } = N(), i = JSON.stringify(Z(a)), c = o.useRef(!1);
512
- return Re(() => {
513
- c.current = !0;
530
+ let e = o.useContext(O), { basename: n, navigator: t } = o.useContext(T), { matches: a } = o.useContext(k), { pathname: r } = N(), i = JSON.stringify(Z(a)), s = o.useRef(!1);
531
+ return be(() => {
532
+ s.current = !0;
514
533
  }), o.useCallback(
515
- (l, s = {}) => {
516
- if (L(c.current, xe), !c.current) return;
534
+ (l, u = {}) => {
535
+ if (L(s.current, xe), !s.current) return;
517
536
  if (typeof l == "number") {
518
- n.go(l);
537
+ t.go(l);
519
538
  return;
520
539
  }
521
540
  let h = ee(
522
541
  l,
523
542
  JSON.parse(i),
524
543
  r,
525
- s.relative === "path"
544
+ u.relative === "path"
526
545
  );
527
- e == null && t !== "/" && (h.pathname = h.pathname === "/" ? t : A([t, h.pathname])), (s.replace ? n.replace : n.push)(
546
+ e == null && n !== "/" && (h.pathname = h.pathname === "/" ? n : M([n, h.pathname])), (u.replace ? t.replace : t.push)(
528
547
  h,
529
- s.state,
530
- s
548
+ u.state,
549
+ u
531
550
  );
532
551
  },
533
552
  [
534
- t,
535
553
  n,
554
+ t,
536
555
  i,
537
556
  r,
538
557
  e
@@ -541,84 +560,84 @@ function tt() {
541
560
  }
542
561
  var nt = o.createContext(null);
543
562
  function rt(e) {
544
- let t = o.useContext(k).outlet;
545
- return t && /* @__PURE__ */ o.createElement(nt.Provider, { value: e }, t);
563
+ let n = o.useContext(k).outlet;
564
+ return n && /* @__PURE__ */ o.createElement(nt.Provider, { value: e }, n);
546
565
  }
547
- function sn() {
548
- let { matches: e } = o.useContext(k), t = e[e.length - 1];
549
- return t ? t.params : {};
566
+ function un() {
567
+ let { matches: e } = o.useContext(k), n = e[e.length - 1];
568
+ return n ? n.params : {};
550
569
  }
551
- function W(e, { relative: t } = {}) {
552
- let { matches: n } = o.useContext(k), { pathname: a } = N(), r = JSON.stringify(Z(n));
570
+ function H(e, { relative: n } = {}) {
571
+ let { matches: t } = o.useContext(k), { pathname: a } = N(), r = JSON.stringify(Z(t));
553
572
  return o.useMemo(
554
573
  () => ee(
555
574
  e,
556
575
  JSON.parse(r),
557
576
  a,
558
- t === "path"
577
+ n === "path"
559
578
  ),
560
- [e, r, a, t]
579
+ [e, r, a, n]
561
580
  );
562
581
  }
563
- function be(e, t, n, a) {
564
- b(
582
+ function Re(e, n, t, a) {
583
+ R(
565
584
  I(),
566
585
  // TODO: This error is probably because they somehow have 2 versions of the
567
586
  // router loaded. We can help them understand how to avoid that.
568
587
  "useRoutes() may be used only in the context of a <Router> component."
569
588
  );
570
- let { navigator: r, static: i } = o.useContext(T), { matches: c } = o.useContext(k), u = c[c.length - 1], l = u ? u.params : {}, s = u ? u.pathname : "/", h = u ? u.pathnameBase : "/", p = u && u.route;
589
+ let { navigator: r, static: i } = o.useContext(T), { matches: s } = o.useContext(k), c = s[s.length - 1], l = c ? c.params : {}, u = c ? c.pathname : "/", h = c ? c.pathnameBase : "/", m = c && c.route;
571
590
  {
572
- let g = p && p.path || "";
591
+ let v = m && m.path || "";
573
592
  Se(
574
- s,
575
- !p || g.endsWith("*") || g.endsWith("*?"),
576
- `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${g}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
593
+ u,
594
+ !m || v.endsWith("*") || v.endsWith("*?"),
595
+ `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${v}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
577
596
 
578
- Please change the parent <Route path="${g}"> to <Route path="${g === "/" ? "*" : `${g}/*`}">.`
597
+ Please change the parent <Route path="${v}"> to <Route path="${v === "/" ? "*" : `${v}/*`}">.`
579
598
  );
580
599
  }
581
- let d = N(), v;
582
- v = d;
583
- let f = v.pathname || "/", w = f;
600
+ let d = N(), g;
601
+ g = d;
602
+ let f = g.pathname || "/", w = f;
584
603
  if (h !== "/") {
585
- let g = h.replace(/^\//, "").split("/");
586
- w = "/" + f.replace(/^\//, "").split("/").slice(g.length).join("/");
604
+ let v = h.replace(/^\//, "").split("/");
605
+ w = "/" + f.replace(/^\//, "").split("/").slice(v.length).join("/");
587
606
  }
588
- let E = !i && n && n.matches && n.matches.length > 0 ? n.matches : pe(e, { pathname: w });
607
+ let E = !i && t && t.matches && t.matches.length > 0 ? t.matches : pe(e, { pathname: w });
589
608
  return L(
590
- p || E != null,
591
- `No routes matched location "${v.pathname}${v.search}${v.hash}" `
609
+ m || E != null,
610
+ `No routes matched location "${g.pathname}${g.search}${g.hash}" `
592
611
  ), L(
593
612
  E == null || E[E.length - 1].route.element !== void 0 || E[E.length - 1].route.Component !== void 0 || E[E.length - 1].route.lazy !== void 0,
594
- `Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
613
+ `Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
595
614
  ), st(
596
615
  E && E.map(
597
- (g) => Object.assign({}, g, {
598
- params: Object.assign({}, l, g.params),
599
- pathname: A([
616
+ (v) => Object.assign({}, v, {
617
+ params: Object.assign({}, l, v.params),
618
+ pathname: M([
600
619
  h,
601
620
  // Re-encode pathnames that were decoded inside matchRoutes
602
- r.encodeLocation ? r.encodeLocation(g.pathname).pathname : g.pathname
621
+ r.encodeLocation ? r.encodeLocation(v.pathname).pathname : v.pathname
603
622
  ]),
604
- pathnameBase: g.pathnameBase === "/" ? h : A([
623
+ pathnameBase: v.pathnameBase === "/" ? h : M([
605
624
  h,
606
625
  // Re-encode pathnames that were decoded inside matchRoutes
607
- r.encodeLocation ? r.encodeLocation(g.pathnameBase).pathname : g.pathnameBase
626
+ r.encodeLocation ? r.encodeLocation(v.pathnameBase).pathname : v.pathnameBase
608
627
  ])
609
628
  })
610
629
  ),
611
- c,
612
- n,
630
+ s,
631
+ t,
613
632
  a
614
633
  );
615
634
  }
616
635
  function at() {
617
- let e = dt(), t = we(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", r = { padding: "0.5rem", backgroundColor: a }, i = { padding: "2px 4px", backgroundColor: a }, c = null;
636
+ let e = dt(), n = we(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), t = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", r = { padding: "0.5rem", backgroundColor: a }, i = { padding: "2px 4px", backgroundColor: a }, s = null;
618
637
  return console.error(
619
638
  "Error handled by React Router default ErrorBoundary:",
620
639
  e
621
- ), c = /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ o.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ o.createElement("code", { style: i }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ o.createElement("code", { style: i }, "errorElement"), " prop on your route.")), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ o.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ o.createElement("pre", { style: r }, n) : null, c);
640
+ ), s = /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ o.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ o.createElement("code", { style: i }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ o.createElement("code", { style: i }, "errorElement"), " prop on your route.")), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ o.createElement("h3", { style: { fontStyle: "italic" } }, n), t ? /* @__PURE__ */ o.createElement("pre", { style: r }, t) : null, s);
622
641
  }
623
642
  var it = /* @__PURE__ */ o.createElement(at, null), ot = class extends o.Component {
624
643
  constructor(e) {
@@ -631,22 +650,22 @@ var it = /* @__PURE__ */ o.createElement(at, null), ot = class extends o.Compone
631
650
  static getDerivedStateFromError(e) {
632
651
  return { error: e };
633
652
  }
634
- static getDerivedStateFromProps(e, t) {
635
- return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
653
+ static getDerivedStateFromProps(e, n) {
654
+ return n.location !== e.location || n.revalidation !== "idle" && e.revalidation === "idle" ? {
636
655
  error: e.error,
637
656
  location: e.location,
638
657
  revalidation: e.revalidation
639
658
  } : {
640
- error: e.error !== void 0 ? e.error : t.error,
641
- location: t.location,
642
- revalidation: e.revalidation || t.revalidation
659
+ error: e.error !== void 0 ? e.error : n.error,
660
+ location: n.location,
661
+ revalidation: e.revalidation || n.revalidation
643
662
  };
644
663
  }
645
- componentDidCatch(e, t) {
664
+ componentDidCatch(e, n) {
646
665
  console.error(
647
666
  "React Router caught the following error during render",
648
667
  e,
649
- t
668
+ n
650
669
  );
651
670
  }
652
671
  render() {
@@ -659,27 +678,27 @@ var it = /* @__PURE__ */ o.createElement(at, null), ot = class extends o.Compone
659
678
  )) : this.props.children;
660
679
  }
661
680
  };
662
- function lt({ routeContext: e, match: t, children: n }) {
681
+ function lt({ routeContext: e, match: n, children: t }) {
663
682
  let a = o.useContext(O);
664
- return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ o.createElement(k.Provider, { value: e }, n);
683
+ return a && a.static && a.staticContext && (n.route.errorElement || n.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = n.route.id), /* @__PURE__ */ o.createElement(k.Provider, { value: e }, t);
665
684
  }
666
- function st(e, t = [], n = null, a = null) {
685
+ function st(e, n = [], t = null, a = null) {
667
686
  if (e == null) {
668
- if (!n)
687
+ if (!t)
669
688
  return null;
670
- if (n.errors)
671
- e = n.matches;
672
- else if (t.length === 0 && !n.initialized && n.matches.length > 0)
673
- e = n.matches;
689
+ if (t.errors)
690
+ e = t.matches;
691
+ else if (n.length === 0 && !t.initialized && t.matches.length > 0)
692
+ e = t.matches;
674
693
  else
675
694
  return null;
676
695
  }
677
- let r = e, i = n == null ? void 0 : n.errors;
696
+ let r = e, i = t == null ? void 0 : t.errors;
678
697
  if (i != null) {
679
698
  let l = r.findIndex(
680
- (s) => s.route.id && (i == null ? void 0 : i[s.route.id]) !== void 0
699
+ (u) => u.route.id && (i == null ? void 0 : i[u.route.id]) !== void 0
681
700
  );
682
- b(
701
+ R(
683
702
  l >= 0,
684
703
  `Could not find a matching route for errors on route IDs: ${Object.keys(
685
704
  i
@@ -689,47 +708,47 @@ function st(e, t = [], n = null, a = null) {
689
708
  Math.min(r.length, l + 1)
690
709
  );
691
710
  }
692
- let c = !1, u = -1;
693
- if (n)
711
+ let s = !1, c = -1;
712
+ if (t)
694
713
  for (let l = 0; l < r.length; l++) {
695
- let s = r[l];
696
- if ((s.route.HydrateFallback || s.route.hydrateFallbackElement) && (u = l), s.route.id) {
697
- let { loaderData: h, errors: p } = n, d = s.route.loader && !h.hasOwnProperty(s.route.id) && (!p || p[s.route.id] === void 0);
698
- if (s.route.lazy || d) {
699
- c = !0, u >= 0 ? r = r.slice(0, u + 1) : r = [r[0]];
714
+ let u = r[l];
715
+ if ((u.route.HydrateFallback || u.route.hydrateFallbackElement) && (c = l), u.route.id) {
716
+ let { loaderData: h, errors: m } = t, d = u.route.loader && !h.hasOwnProperty(u.route.id) && (!m || m[u.route.id] === void 0);
717
+ if (u.route.lazy || d) {
718
+ s = !0, c >= 0 ? r = r.slice(0, c + 1) : r = [r[0]];
700
719
  break;
701
720
  }
702
721
  }
703
722
  }
704
- return r.reduceRight((l, s, h) => {
705
- let p, d = !1, v = null, f = null;
706
- n && (p = i && s.route.id ? i[s.route.id] : void 0, v = s.route.errorElement || it, c && (u < 0 && h === 0 ? (Se(
723
+ return r.reduceRight((l, u, h) => {
724
+ let m, d = !1, g = null, f = null;
725
+ t && (m = i && u.route.id ? i[u.route.id] : void 0, g = u.route.errorElement || it, s && (c < 0 && h === 0 ? (Se(
707
726
  "route-fallback",
708
727
  !1,
709
728
  "No `HydrateFallback` element provided to render during initial hydration"
710
- ), d = !0, f = null) : u === h && (d = !0, f = s.route.hydrateFallbackElement || null)));
711
- let w = t.concat(r.slice(0, h + 1)), E = () => {
712
- let m;
713
- return p ? m = v : d ? m = f : s.route.Component ? m = /* @__PURE__ */ o.createElement(s.route.Component, null) : s.route.element ? m = s.route.element : m = l, /* @__PURE__ */ o.createElement(
729
+ ), d = !0, f = null) : c === h && (d = !0, f = u.route.hydrateFallbackElement || null)));
730
+ let w = n.concat(r.slice(0, h + 1)), E = () => {
731
+ let p;
732
+ return m ? p = g : d ? p = f : u.route.Component ? p = /* @__PURE__ */ o.createElement(u.route.Component, null) : u.route.element ? p = u.route.element : p = l, /* @__PURE__ */ o.createElement(
714
733
  lt,
715
734
  {
716
- match: s,
735
+ match: u,
717
736
  routeContext: {
718
737
  outlet: l,
719
738
  matches: w,
720
- isDataRoute: n != null
739
+ isDataRoute: t != null
721
740
  },
722
- children: m
741
+ children: p
723
742
  }
724
743
  );
725
744
  };
726
- return n && (s.route.ErrorBoundary || s.route.errorElement || h === 0) ? /* @__PURE__ */ o.createElement(
745
+ return t && (u.route.ErrorBoundary || u.route.errorElement || h === 0) ? /* @__PURE__ */ o.createElement(
727
746
  ot,
728
747
  {
729
- location: n.location,
730
- revalidation: n.revalidation,
731
- component: v,
732
- error: p,
748
+ location: t.location,
749
+ revalidation: t.revalidation,
750
+ component: g,
751
+ error: m,
733
752
  children: E(),
734
753
  routeContext: { outlet: null, matches: w, isDataRoute: !0 }
735
754
  }
@@ -740,23 +759,23 @@ function ae(e) {
740
759
  return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
741
760
  }
742
761
  function ut(e) {
743
- let t = o.useContext(O);
744
- return b(t, ae(e)), t;
762
+ let n = o.useContext(O);
763
+ return R(n, ae(e)), n;
745
764
  }
746
765
  function Ce(e) {
747
- let t = o.useContext(_);
748
- return b(t, ae(e)), t;
766
+ let n = o.useContext(_);
767
+ return R(n, ae(e)), n;
749
768
  }
750
769
  function ct(e) {
751
- let t = o.useContext(k);
752
- return b(t, ae(e)), t;
770
+ let n = o.useContext(k);
771
+ return R(n, ae(e)), n;
753
772
  }
754
773
  function ie(e) {
755
- let t = ct(e), n = t.matches[t.matches.length - 1];
756
- return b(
757
- n.route.id,
774
+ let n = ct(e), t = n.matches[n.matches.length - 1];
775
+ return R(
776
+ t.route.id,
758
777
  `${e} can only be used on routes that contain a unique "id"`
759
- ), n.route.id;
778
+ ), t.route.id;
760
779
  }
761
780
  function ft() {
762
781
  return ie(
@@ -764,7 +783,7 @@ function ft() {
764
783
  /* UseRouteId */
765
784
  );
766
785
  }
767
- function un() {
786
+ function cn() {
768
787
  return Ce(
769
788
  "useNavigation"
770
789
  /* UseNavigation */
@@ -772,63 +791,63 @@ function un() {
772
791
  }
773
792
  function dt() {
774
793
  var a;
775
- let e = o.useContext(ne), t = Ce(
794
+ let e = o.useContext(ne), n = Ce(
776
795
  "useRouteError"
777
796
  /* UseRouteError */
778
- ), n = ie(
797
+ ), t = ie(
779
798
  "useRouteError"
780
799
  /* UseRouteError */
781
800
  );
782
- return e !== void 0 ? e : (a = t.errors) == null ? void 0 : a[n];
801
+ return e !== void 0 ? e : (a = n.errors) == null ? void 0 : a[t];
783
802
  }
784
803
  function ht() {
785
804
  let { router: e } = ut(
786
805
  "useNavigate"
787
806
  /* UseNavigateStable */
788
- ), t = ie(
807
+ ), n = ie(
789
808
  "useNavigate"
790
809
  /* UseNavigateStable */
791
- ), n = o.useRef(!1);
792
- return Re(() => {
793
- n.current = !0;
810
+ ), t = o.useRef(!1);
811
+ return be(() => {
812
+ t.current = !0;
794
813
  }), o.useCallback(
795
814
  async (r, i = {}) => {
796
- L(n.current, xe), n.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...i }));
815
+ L(t.current, xe), t.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: n, ...i }));
797
816
  },
798
- [e, t]
817
+ [e, n]
799
818
  );
800
819
  }
801
820
  var fe = {};
802
- function Se(e, t, n) {
803
- !t && !fe[e] && (fe[e] = !0, L(!1, n));
821
+ function Se(e, n, t) {
822
+ !n && !fe[e] && (fe[e] = !0, L(!1, t));
804
823
  }
805
824
  var de = {};
806
- function he(e, t) {
807
- !e && !de[t] && (de[t] = !0, console.warn(t));
825
+ function he(e, n) {
826
+ !e && !de[n] && (de[n] = !0, console.warn(n));
808
827
  }
809
828
  var mt = class {
810
829
  constructor() {
811
- this.status = "pending", this.promise = new Promise((e, t) => {
812
- this.resolve = (n) => {
813
- this.status === "pending" && (this.status = "resolved", e(n));
814
- }, this.reject = (n) => {
815
- this.status === "pending" && (this.status = "rejected", t(n));
830
+ this.status = "pending", this.promise = new Promise((e, n) => {
831
+ this.resolve = (t) => {
832
+ this.status === "pending" && (this.status = "resolved", e(t));
833
+ }, this.reject = (t) => {
834
+ this.status === "pending" && (this.status = "rejected", n(t));
816
835
  };
817
836
  });
818
837
  }
819
838
  };
820
- function cn({
839
+ function fn({
821
840
  router: e,
822
- flushSync: t
841
+ flushSync: n
823
842
  }) {
824
- let [n, a] = o.useState(e.state), [r, i] = o.useState(), [c, u] = o.useState({
843
+ let [t, a] = o.useState(e.state), [r, i] = o.useState(), [s, c] = o.useState({
825
844
  isTransitioning: !1
826
- }), [l, s] = o.useState(), [h, p] = o.useState(), [d, v] = o.useState(), f = o.useRef(/* @__PURE__ */ new Map()), w = o.useCallback(
827
- (y, { deletedFetchers: R, flushSync: x, viewTransitionOpts: C }) => {
845
+ }), [l, u] = o.useState(), [h, m] = o.useState(), [d, g] = o.useState(), f = o.useRef(/* @__PURE__ */ new Map()), w = o.useCallback(
846
+ (y, { deletedFetchers: b, flushSync: x, viewTransitionOpts: C }) => {
828
847
  y.fetchers.forEach((S, P) => {
829
848
  S.data !== void 0 && f.current.set(P, S.data);
830
- }), R.forEach((S) => f.current.delete(S)), he(
831
- x === !1 || t != null,
849
+ }), b.forEach((S) => f.current.delete(S)), he(
850
+ x === !1 || n != null,
832
851
  'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'
833
852
  );
834
853
  let $ = e.window != null && e.window.document != null && typeof e.window.document.startViewTransition == "function";
@@ -836,12 +855,12 @@ function cn({
836
855
  C == null || $,
837
856
  "You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."
838
857
  ), !C || !$) {
839
- t && x ? t(() => a(y)) : o.startTransition(() => a(y));
858
+ n && x ? n(() => a(y)) : o.startTransition(() => a(y));
840
859
  return;
841
860
  }
842
- if (t && x) {
843
- t(() => {
844
- h && (l && l.resolve(), h.skipTransition()), u({
861
+ if (n && x) {
862
+ n(() => {
863
+ h && (l && l.resolve(), h.skipTransition()), c({
845
864
  isTransitioning: !0,
846
865
  flushSync: !0,
847
866
  currentLocation: C.currentLocation,
@@ -849,77 +868,77 @@ function cn({
849
868
  });
850
869
  });
851
870
  let S = e.window.document.startViewTransition(() => {
852
- t(() => a(y));
871
+ n(() => a(y));
853
872
  });
854
873
  S.finished.finally(() => {
855
- t(() => {
856
- s(void 0), p(void 0), i(void 0), u({ isTransitioning: !1 });
874
+ n(() => {
875
+ u(void 0), m(void 0), i(void 0), c({ isTransitioning: !1 });
857
876
  });
858
- }), t(() => p(S));
877
+ }), n(() => m(S));
859
878
  return;
860
879
  }
861
- h ? (l && l.resolve(), h.skipTransition(), v({
880
+ h ? (l && l.resolve(), h.skipTransition(), g({
862
881
  state: y,
863
882
  currentLocation: C.currentLocation,
864
883
  nextLocation: C.nextLocation
865
- })) : (i(y), u({
884
+ })) : (i(y), c({
866
885
  isTransitioning: !0,
867
886
  flushSync: !1,
868
887
  currentLocation: C.currentLocation,
869
888
  nextLocation: C.nextLocation
870
889
  }));
871
890
  },
872
- [e.window, t, h, l]
891
+ [e.window, n, h, l]
873
892
  );
874
893
  o.useLayoutEffect(() => e.subscribe(w), [e, w]), o.useEffect(() => {
875
- c.isTransitioning && !c.flushSync && s(new mt());
876
- }, [c]), o.useEffect(() => {
894
+ s.isTransitioning && !s.flushSync && u(new mt());
895
+ }, [s]), o.useEffect(() => {
877
896
  if (l && r && e.window) {
878
- let y = r, R = l.promise, x = e.window.document.startViewTransition(async () => {
879
- o.startTransition(() => a(y)), await R;
897
+ let y = r, b = l.promise, x = e.window.document.startViewTransition(async () => {
898
+ o.startTransition(() => a(y)), await b;
880
899
  });
881
900
  x.finished.finally(() => {
882
- s(void 0), p(void 0), i(void 0), u({ isTransitioning: !1 });
883
- }), p(x);
901
+ u(void 0), m(void 0), i(void 0), c({ isTransitioning: !1 });
902
+ }), m(x);
884
903
  }
885
904
  }, [r, l, e.window]), o.useEffect(() => {
886
- l && r && n.location.key === r.location.key && l.resolve();
887
- }, [l, h, n.location, r]), o.useEffect(() => {
888
- !c.isTransitioning && d && (i(d.state), u({
905
+ l && r && t.location.key === r.location.key && l.resolve();
906
+ }, [l, h, t.location, r]), o.useEffect(() => {
907
+ !s.isTransitioning && d && (i(d.state), c({
889
908
  isTransitioning: !0,
890
909
  flushSync: !1,
891
910
  currentLocation: d.currentLocation,
892
911
  nextLocation: d.nextLocation
893
- }), v(void 0));
894
- }, [c.isTransitioning, d]);
912
+ }), g(void 0));
913
+ }, [s.isTransitioning, d]);
895
914
  let E = o.useMemo(() => ({
896
915
  createHref: e.createHref,
897
916
  encodeLocation: e.encodeLocation,
898
917
  go: (y) => e.navigate(y),
899
- push: (y, R, x) => e.navigate(y, {
900
- state: R,
918
+ push: (y, b, x) => e.navigate(y, {
919
+ state: b,
901
920
  preventScrollReset: x == null ? void 0 : x.preventScrollReset
902
921
  }),
903
- replace: (y, R, x) => e.navigate(y, {
922
+ replace: (y, b, x) => e.navigate(y, {
904
923
  replace: !0,
905
- state: R,
924
+ state: b,
906
925
  preventScrollReset: x == null ? void 0 : x.preventScrollReset
907
926
  })
908
- }), [e]), m = e.basename || "/", g = o.useMemo(
927
+ }), [e]), p = e.basename || "/", v = o.useMemo(
909
928
  () => ({
910
929
  router: e,
911
930
  navigator: E,
912
931
  static: !1,
913
- basename: m
932
+ basename: p
914
933
  }),
915
- [e, E, m]
934
+ [e, E, p]
916
935
  );
917
- return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(O.Provider, { value: g }, /* @__PURE__ */ o.createElement(_.Provider, { value: n }, /* @__PURE__ */ o.createElement(te.Provider, { value: f.current }, /* @__PURE__ */ o.createElement(J.Provider, { value: c }, /* @__PURE__ */ o.createElement(
936
+ return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(O.Provider, { value: v }, /* @__PURE__ */ o.createElement(_.Provider, { value: t }, /* @__PURE__ */ o.createElement(te.Provider, { value: f.current }, /* @__PURE__ */ o.createElement(J.Provider, { value: s }, /* @__PURE__ */ o.createElement(
918
937
  Pe,
919
938
  {
920
- basename: m,
921
- location: n.location,
922
- navigationType: n.historyAction,
939
+ basename: p,
940
+ location: t.location,
941
+ navigationType: t.historyAction,
923
942
  navigator: E
924
943
  },
925
944
  /* @__PURE__ */ o.createElement(
@@ -927,26 +946,26 @@ function cn({
927
946
  {
928
947
  routes: e.routes,
929
948
  future: e.future,
930
- state: n
949
+ state: t
931
950
  }
932
951
  )
933
952
  ))))), null);
934
953
  }
935
- var pt = o.memo(vt);
936
- function vt({
954
+ var pt = o.memo(gt);
955
+ function gt({
937
956
  routes: e,
938
- future: t,
939
- state: n
957
+ future: n,
958
+ state: t
940
959
  }) {
941
- return be(e, void 0, n, t);
960
+ return Re(e, void 0, t, n);
942
961
  }
943
- function fn({
962
+ function dn({
944
963
  to: e,
945
- replace: t,
946
- state: n,
964
+ replace: n,
965
+ state: t,
947
966
  relative: a
948
967
  }) {
949
- b(
968
+ R(
950
969
  I(),
951
970
  // TODO: This error is probably because they somehow have 2 versions of
952
971
  // the router loaded. We can help them understand how to avoid that.
@@ -957,70 +976,70 @@ function fn({
957
976
  !r,
958
977
  "<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change."
959
978
  );
960
- let { matches: i } = o.useContext(k), { pathname: c } = N(), u = re(), l = ee(
979
+ let { matches: i } = o.useContext(k), { pathname: s } = N(), c = re(), l = ee(
961
980
  e,
962
981
  Z(i),
963
- c,
982
+ s,
964
983
  a === "path"
965
- ), s = JSON.stringify(l);
984
+ ), u = JSON.stringify(l);
966
985
  return o.useEffect(() => {
967
- u(JSON.parse(s), { replace: t, state: n, relative: a });
968
- }, [u, s, a, t, n]), null;
986
+ c(JSON.parse(u), { replace: n, state: t, relative: a });
987
+ }, [c, u, a, n, t]), null;
969
988
  }
970
- function dn(e) {
989
+ function hn(e) {
971
990
  return rt(e.context);
972
991
  }
973
992
  function Pe({
974
993
  basename: e = "/",
975
- children: t = null,
976
- location: n,
994
+ children: n = null,
995
+ location: t,
977
996
  navigationType: a = "POP",
978
997
  navigator: r,
979
998
  static: i = !1
980
999
  }) {
981
- b(
1000
+ R(
982
1001
  !I(),
983
1002
  "You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
984
1003
  );
985
- let c = e.replace(/^\/*/, "/"), u = o.useMemo(
1004
+ let s = e.replace(/^\/*/, "/"), c = o.useMemo(
986
1005
  () => ({
987
- basename: c,
1006
+ basename: s,
988
1007
  navigator: r,
989
1008
  static: i,
990
1009
  future: {}
991
1010
  }),
992
- [c, r, i]
1011
+ [s, r, i]
993
1012
  );
994
- typeof n == "string" && (n = Y(n));
1013
+ typeof t == "string" && (t = Y(t));
995
1014
  let {
996
1015
  pathname: l = "/",
997
- search: s = "",
1016
+ search: u = "",
998
1017
  hash: h = "",
999
- state: p = null,
1018
+ state: m = null,
1000
1019
  key: d = "default"
1001
- } = n, v = o.useMemo(() => {
1002
- let f = M(l, c);
1020
+ } = t, g = o.useMemo(() => {
1021
+ let f = A(l, s);
1003
1022
  return f == null ? null : {
1004
1023
  location: {
1005
1024
  pathname: f,
1006
- search: s,
1025
+ search: u,
1007
1026
  hash: h,
1008
- state: p,
1027
+ state: m,
1009
1028
  key: d
1010
1029
  },
1011
1030
  navigationType: a
1012
1031
  };
1013
- }, [c, l, s, h, p, d, a]);
1032
+ }, [s, l, u, h, m, d, a]);
1014
1033
  return L(
1015
- v != null,
1016
- `<Router basename="${c}"> is not able to match the URL "${l}${s}${h}" because it does not start with the basename, so the <Router> won't render anything.`
1017
- ), v == null ? null : /* @__PURE__ */ o.createElement(T.Provider, { value: u }, /* @__PURE__ */ o.createElement(K.Provider, { children: t, value: v }));
1034
+ g != null,
1035
+ `<Router basename="${s}"> is not able to match the URL "${l}${u}${h}" because it does not start with the basename, so the <Router> won't render anything.`
1036
+ ), g == null ? null : /* @__PURE__ */ o.createElement(T.Provider, { value: c }, /* @__PURE__ */ o.createElement(K.Provider, { children: n, value: g }));
1018
1037
  }
1019
- var V = "get", j = "application/x-www-form-urlencoded";
1038
+ var j = "get", V = "application/x-www-form-urlencoded";
1020
1039
  function q(e) {
1021
1040
  return e != null && typeof e.tagName == "string";
1022
1041
  }
1023
- function gt(e) {
1042
+ function vt(e) {
1024
1043
  return q(e) && e.tagName.toLowerCase() === "button";
1025
1044
  }
1026
1045
  function yt(e) {
@@ -1032,31 +1051,31 @@ function wt(e) {
1032
1051
  function Et(e) {
1033
1052
  return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
1034
1053
  }
1035
- function xt(e, t) {
1054
+ function xt(e, n) {
1036
1055
  return e.button === 0 && // Ignore everything but left clicks
1037
- (!t || t === "_self") && // Let browser handle "target=_blank" etc.
1056
+ (!n || n === "_self") && // Let browser handle "target=_blank" etc.
1038
1057
  !Et(e);
1039
1058
  }
1040
1059
  function Q(e = "") {
1041
1060
  return new URLSearchParams(
1042
- typeof e == "string" || Array.isArray(e) || e instanceof URLSearchParams ? e : Object.keys(e).reduce((t, n) => {
1043
- let a = e[n];
1044
- return t.concat(
1045
- Array.isArray(a) ? a.map((r) => [n, r]) : [[n, a]]
1061
+ typeof e == "string" || Array.isArray(e) || e instanceof URLSearchParams ? e : Object.keys(e).reduce((n, t) => {
1062
+ let a = e[t];
1063
+ return n.concat(
1064
+ Array.isArray(a) ? a.map((r) => [t, r]) : [[t, a]]
1046
1065
  );
1047
1066
  }, [])
1048
1067
  );
1049
1068
  }
1050
- function Rt(e, t) {
1051
- let n = Q(e);
1052
- return t && t.forEach((a, r) => {
1053
- n.has(r) || t.getAll(r).forEach((i) => {
1054
- n.append(r, i);
1069
+ function bt(e, n) {
1070
+ let t = Q(e);
1071
+ return n && n.forEach((a, r) => {
1072
+ t.has(r) || n.getAll(r).forEach((i) => {
1073
+ t.append(r, i);
1055
1074
  });
1056
- }), n;
1075
+ }), t;
1057
1076
  }
1058
1077
  var z = null;
1059
- function bt() {
1078
+ function Rt() {
1060
1079
  if (z === null)
1061
1080
  try {
1062
1081
  new FormData(
@@ -1077,96 +1096,96 @@ var Ct = /* @__PURE__ */ new Set([
1077
1096
  function X(e) {
1078
1097
  return e != null && !Ct.has(e) ? (L(
1079
1098
  !1,
1080
- `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${j}"`
1099
+ `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${V}"`
1081
1100
  ), null) : e;
1082
1101
  }
1083
- function St(e, t) {
1084
- let n, a, r, i, c;
1102
+ function St(e, n) {
1103
+ let t, a, r, i, s;
1085
1104
  if (yt(e)) {
1086
- let u = e.getAttribute("action");
1087
- a = u ? M(u, t) : null, n = e.getAttribute("method") || V, r = X(e.getAttribute("enctype")) || j, i = new FormData(e);
1088
- } else if (gt(e) || wt(e) && (e.type === "submit" || e.type === "image")) {
1089
- let u = e.form;
1090
- if (u == null)
1105
+ let c = e.getAttribute("action");
1106
+ a = c ? A(c, n) : null, t = e.getAttribute("method") || j, r = X(e.getAttribute("enctype")) || V, i = new FormData(e);
1107
+ } else if (vt(e) || wt(e) && (e.type === "submit" || e.type === "image")) {
1108
+ let c = e.form;
1109
+ if (c == null)
1091
1110
  throw new Error(
1092
1111
  'Cannot submit a <button> or <input type="submit"> without a <form>'
1093
1112
  );
1094
- let l = e.getAttribute("formaction") || u.getAttribute("action");
1095
- if (a = l ? M(l, t) : null, n = e.getAttribute("formmethod") || u.getAttribute("method") || V, r = X(e.getAttribute("formenctype")) || X(u.getAttribute("enctype")) || j, i = new FormData(u, e), !bt()) {
1096
- let { name: s, type: h, value: p } = e;
1113
+ let l = e.getAttribute("formaction") || c.getAttribute("action");
1114
+ if (a = l ? A(l, n) : null, t = e.getAttribute("formmethod") || c.getAttribute("method") || j, r = X(e.getAttribute("formenctype")) || X(c.getAttribute("enctype")) || V, i = new FormData(c, e), !Rt()) {
1115
+ let { name: u, type: h, value: m } = e;
1097
1116
  if (h === "image") {
1098
- let d = s ? `${s}.` : "";
1117
+ let d = u ? `${u}.` : "";
1099
1118
  i.append(`${d}x`, "0"), i.append(`${d}y`, "0");
1100
- } else s && i.append(s, p);
1119
+ } else u && i.append(u, m);
1101
1120
  }
1102
1121
  } else {
1103
1122
  if (q(e))
1104
1123
  throw new Error(
1105
1124
  'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
1106
1125
  );
1107
- n = V, a = null, r = j, c = e;
1126
+ t = j, a = null, r = V, s = e;
1108
1127
  }
1109
- return i && r === "text/plain" && (c = i, i = void 0), { action: a, method: n.toLowerCase(), encType: r, formData: i, body: c };
1128
+ return i && r === "text/plain" && (s = i, i = void 0), { action: a, method: t.toLowerCase(), encType: r, formData: i, body: s };
1110
1129
  }
1111
- function oe(e, t) {
1130
+ function oe(e, n) {
1112
1131
  if (e === !1 || e === null || typeof e > "u")
1113
- throw new Error(t);
1132
+ throw new Error(n);
1114
1133
  }
1115
- async function Pt(e, t) {
1116
- if (e.id in t)
1117
- return t[e.id];
1134
+ async function Pt(e, n) {
1135
+ if (e.id in n)
1136
+ return n[e.id];
1118
1137
  try {
1119
- let n = await import(
1138
+ let t = await import(
1120
1139
  /* @vite-ignore */
1121
1140
  /* webpackIgnore: true */
1122
1141
  e.module
1123
1142
  );
1124
- return t[e.id] = n, n;
1125
- } catch (n) {
1143
+ return n[e.id] = t, t;
1144
+ } catch (t) {
1126
1145
  return console.error(
1127
1146
  `Error loading route module \`${e.module}\`, reloading page...`
1128
- ), console.error(n), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
1147
+ ), console.error(t), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
1129
1148
  });
1130
1149
  }
1131
1150
  }
1132
1151
  function Lt(e) {
1133
1152
  return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
1134
1153
  }
1135
- async function kt(e, t, n) {
1154
+ async function kt(e, n, t) {
1136
1155
  let a = await Promise.all(
1137
1156
  e.map(async (r) => {
1138
- let i = t.routes[r.route.id];
1157
+ let i = n.routes[r.route.id];
1139
1158
  if (i) {
1140
- let c = await Pt(i, n);
1141
- return c.links ? c.links() : [];
1159
+ let s = await Pt(i, t);
1160
+ return s.links ? s.links() : [];
1142
1161
  }
1143
1162
  return [];
1144
1163
  })
1145
1164
  );
1146
- return At(
1165
+ return Mt(
1147
1166
  a.flat(1).filter(Lt).filter((r) => r.rel === "stylesheet" || r.rel === "preload").map(
1148
1167
  (r) => r.rel === "stylesheet" ? { ...r, rel: "prefetch", as: "style" } : { ...r, rel: "prefetch" }
1149
1168
  )
1150
1169
  );
1151
1170
  }
1152
- function me(e, t, n, a, r, i) {
1153
- let c = (l, s) => n[s] ? l.route.id !== n[s].route.id : !0, u = (l, s) => {
1171
+ function me(e, n, t, a, r, i) {
1172
+ let s = (l, u) => t[u] ? l.route.id !== t[u].route.id : !0, c = (l, u) => {
1154
1173
  var h;
1155
1174
  return (
1156
1175
  // param change, /users/123 -> /users/456
1157
- n[s].pathname !== l.pathname || // splat param changed, which is not present in match.path
1176
+ t[u].pathname !== l.pathname || // splat param changed, which is not present in match.path
1158
1177
  // e.g. /files/images/avatar.jpg -> files/finances.xls
1159
- ((h = n[s].route.path) == null ? void 0 : h.endsWith("*")) && n[s].params["*"] !== l.params["*"]
1178
+ ((h = t[u].route.path) == null ? void 0 : h.endsWith("*")) && t[u].params["*"] !== l.params["*"]
1160
1179
  );
1161
1180
  };
1162
- return i === "assets" ? t.filter(
1163
- (l, s) => c(l, s) || u(l, s)
1164
- ) : i === "data" ? t.filter((l, s) => {
1165
- var p;
1181
+ return i === "assets" ? n.filter(
1182
+ (l, u) => s(l, u) || c(l, u)
1183
+ ) : i === "data" ? n.filter((l, u) => {
1184
+ var m;
1166
1185
  let h = a.routes[l.route.id];
1167
1186
  if (!h || !h.hasLoader)
1168
1187
  return !1;
1169
- if (c(l, s) || u(l, s))
1188
+ if (s(l, u) || c(l, u))
1170
1189
  return !0;
1171
1190
  if (l.route.shouldRevalidate) {
1172
1191
  let d = l.route.shouldRevalidate({
@@ -1174,7 +1193,7 @@ function me(e, t, n, a, r, i) {
1174
1193
  r.pathname + r.search + r.hash,
1175
1194
  window.origin
1176
1195
  ),
1177
- currentParams: ((p = n[0]) == null ? void 0 : p.params) || {},
1196
+ currentParams: ((m = t[0]) == null ? void 0 : m.params) || {},
1178
1197
  nextUrl: new URL(e, window.origin),
1179
1198
  nextParams: l.params,
1180
1199
  defaultShouldRevalidate: !0
@@ -1185,13 +1204,13 @@ function me(e, t, n, a, r, i) {
1185
1204
  return !0;
1186
1205
  }) : [];
1187
1206
  }
1188
- function $t(e, t, { includeHydrateFallback: n } = {}) {
1207
+ function $t(e, n, { includeHydrateFallback: t } = {}) {
1189
1208
  return Tt(
1190
1209
  e.map((a) => {
1191
- let r = t.routes[a.route.id];
1210
+ let r = n.routes[a.route.id];
1192
1211
  if (!r) return [];
1193
1212
  let i = [r.module];
1194
- return r.clientActionModule && (i = i.concat(r.clientActionModule)), r.clientLoaderModule && (i = i.concat(r.clientLoaderModule)), n && r.hydrateFallbackModule && (i = i.concat(r.hydrateFallbackModule)), r.imports && (i = i.concat(r.imports)), i;
1213
+ return r.clientActionModule && (i = i.concat(r.clientActionModule)), r.clientLoaderModule && (i = i.concat(r.clientLoaderModule)), t && r.hydrateFallbackModule && (i = i.concat(r.hydrateFallbackModule)), r.imports && (i = i.concat(r.imports)), i;
1195
1214
  }).flat(1)
1196
1215
  );
1197
1216
  }
@@ -1199,27 +1218,27 @@ function Tt(e) {
1199
1218
  return [...new Set(e)];
1200
1219
  }
1201
1220
  function Nt(e) {
1202
- let t = {}, n = Object.keys(e).sort();
1203
- for (let a of n)
1204
- t[a] = e[a];
1205
- return t;
1221
+ let n = {}, t = Object.keys(e).sort();
1222
+ for (let a of t)
1223
+ n[a] = e[a];
1224
+ return n;
1206
1225
  }
1207
- function At(e, t) {
1208
- let n = /* @__PURE__ */ new Set();
1209
- return new Set(t), e.reduce((a, r) => {
1226
+ function Mt(e, n) {
1227
+ let t = /* @__PURE__ */ new Set();
1228
+ return new Set(n), e.reduce((a, r) => {
1210
1229
  let i = JSON.stringify(Nt(r));
1211
- return n.has(i) || (n.add(i), a.push({ key: i, link: r })), a;
1230
+ return t.has(i) || (t.add(i), a.push({ key: i, link: r })), a;
1212
1231
  }, []);
1213
1232
  }
1214
- var Mt = /* @__PURE__ */ new Set([100, 101, 204, 205]);
1215
- function Dt(e, t) {
1216
- let n = typeof e == "string" ? new URL(
1233
+ var At = /* @__PURE__ */ new Set([100, 101, 204, 205]);
1234
+ function Dt(e, n) {
1235
+ let t = typeof e == "string" ? new URL(
1217
1236
  e,
1218
1237
  // This can be called during the SSR flow via PrefetchPageLinksImpl so
1219
1238
  // don't assume window is available
1220
1239
  typeof window > "u" ? "server://singlefetch/" : window.location.origin
1221
1240
  ) : e;
1222
- return n.pathname === "/" ? n.pathname = "_root.data" : t && M(n.pathname, t) === "/" ? n.pathname = `${t.replace(/\/$/, "")}/_root.data` : n.pathname = `${n.pathname.replace(/\/$/, "")}.data`, n;
1241
+ return t.pathname === "/" ? t.pathname = "_root.data" : n && A(t.pathname, n) === "/" ? t.pathname = `${n.replace(/\/$/, "")}/_root.data` : t.pathname = `${t.pathname.replace(/\/$/, "")}.data`, t;
1223
1242
  }
1224
1243
  function Le() {
1225
1244
  let e = o.useContext(O);
@@ -1244,13 +1263,13 @@ function ke() {
1244
1263
  "You must render this element inside a <HydratedRouter> element"
1245
1264
  ), e;
1246
1265
  }
1247
- function It(e, t) {
1248
- let n = o.useContext(le), [a, r] = o.useState(!1), [i, c] = o.useState(!1), { onFocus: u, onBlur: l, onMouseEnter: s, onMouseLeave: h, onTouchStart: p } = t, d = o.useRef(null);
1266
+ function It(e, n) {
1267
+ let t = o.useContext(le), [a, r] = o.useState(!1), [i, s] = o.useState(!1), { onFocus: c, onBlur: l, onMouseEnter: u, onMouseLeave: h, onTouchStart: m } = n, d = o.useRef(null);
1249
1268
  o.useEffect(() => {
1250
- if (e === "render" && c(!0), e === "viewport") {
1251
- let w = (m) => {
1252
- m.forEach((g) => {
1253
- c(g.isIntersecting);
1269
+ if (e === "render" && s(!0), e === "viewport") {
1270
+ let w = (p) => {
1271
+ p.forEach((v) => {
1272
+ s(v.isIntersecting);
1254
1273
  });
1255
1274
  }, E = new IntersectionObserver(w, { threshold: 0.5 });
1256
1275
  return d.current && E.observe(d.current), () => {
@@ -1260,121 +1279,121 @@ function It(e, t) {
1260
1279
  }, [e]), o.useEffect(() => {
1261
1280
  if (a) {
1262
1281
  let w = setTimeout(() => {
1263
- c(!0);
1282
+ s(!0);
1264
1283
  }, 100);
1265
1284
  return () => {
1266
1285
  clearTimeout(w);
1267
1286
  };
1268
1287
  }
1269
1288
  }, [a]);
1270
- let v = () => {
1289
+ let g = () => {
1271
1290
  r(!0);
1272
1291
  }, f = () => {
1273
- r(!1), c(!1);
1292
+ r(!1), s(!1);
1274
1293
  };
1275
- return n ? e !== "intent" ? [i, d, {}] : [
1294
+ return t ? e !== "intent" ? [i, d, {}] : [
1276
1295
  i,
1277
1296
  d,
1278
1297
  {
1279
- onFocus: U(u, v),
1298
+ onFocus: U(c, g),
1280
1299
  onBlur: U(l, f),
1281
- onMouseEnter: U(s, v),
1300
+ onMouseEnter: U(u, g),
1282
1301
  onMouseLeave: U(h, f),
1283
- onTouchStart: U(p, v)
1302
+ onTouchStart: U(m, g)
1284
1303
  }
1285
1304
  ] : [!1, d, {}];
1286
1305
  }
1287
- function U(e, t) {
1288
- return (n) => {
1289
- e && e(n), n.defaultPrevented || t(n);
1306
+ function U(e, n) {
1307
+ return (t) => {
1308
+ e && e(t), t.defaultPrevented || n(t);
1290
1309
  };
1291
1310
  }
1292
1311
  function _t({
1293
1312
  page: e,
1294
- ...t
1313
+ ...n
1295
1314
  }) {
1296
- let { router: n } = Le(), a = o.useMemo(
1297
- () => pe(n.routes, e, n.basename),
1298
- [n.routes, e, n.basename]
1315
+ let { router: t } = Le(), a = o.useMemo(
1316
+ () => pe(t.routes, e, t.basename),
1317
+ [t.routes, e, t.basename]
1299
1318
  );
1300
- return a ? /* @__PURE__ */ o.createElement(Ut, { page: e, matches: a, ...t }) : null;
1319
+ return a ? /* @__PURE__ */ o.createElement(Ut, { page: e, matches: a, ...n }) : null;
1301
1320
  }
1302
1321
  function Ft(e) {
1303
- let { manifest: t, routeModules: n } = ke(), [a, r] = o.useState([]);
1322
+ let { manifest: n, routeModules: t } = ke(), [a, r] = o.useState([]);
1304
1323
  return o.useEffect(() => {
1305
1324
  let i = !1;
1306
- return kt(e, t, n).then(
1307
- (c) => {
1308
- i || r(c);
1325
+ return kt(e, n, t).then(
1326
+ (s) => {
1327
+ i || r(s);
1309
1328
  }
1310
1329
  ), () => {
1311
1330
  i = !0;
1312
1331
  };
1313
- }, [e, t, n]), a;
1332
+ }, [e, n, t]), a;
1314
1333
  }
1315
1334
  function Ut({
1316
1335
  page: e,
1317
- matches: t,
1318
- ...n
1336
+ matches: n,
1337
+ ...t
1319
1338
  }) {
1320
- let a = N(), { manifest: r, routeModules: i } = ke(), { basename: c } = Le(), { loaderData: u, matches: l } = Ot(), s = o.useMemo(
1339
+ let a = N(), { manifest: r, routeModules: i } = ke(), { basename: s } = Le(), { loaderData: c, matches: l } = Ot(), u = o.useMemo(
1321
1340
  () => me(
1322
1341
  e,
1323
- t,
1342
+ n,
1324
1343
  l,
1325
1344
  r,
1326
1345
  a,
1327
1346
  "data"
1328
1347
  ),
1329
- [e, t, l, r, a]
1348
+ [e, n, l, r, a]
1330
1349
  ), h = o.useMemo(
1331
1350
  () => me(
1332
1351
  e,
1333
- t,
1352
+ n,
1334
1353
  l,
1335
1354
  r,
1336
1355
  a,
1337
1356
  "assets"
1338
1357
  ),
1339
- [e, t, l, r, a]
1340
- ), p = o.useMemo(() => {
1358
+ [e, n, l, r, a]
1359
+ ), m = o.useMemo(() => {
1341
1360
  if (e === a.pathname + a.search + a.hash)
1342
1361
  return [];
1343
1362
  let f = /* @__PURE__ */ new Set(), w = !1;
1344
- if (t.forEach((m) => {
1363
+ if (n.forEach((p) => {
1345
1364
  var y;
1346
- let g = r.routes[m.route.id];
1347
- !g || !g.hasLoader || (!s.some((R) => R.route.id === m.route.id) && m.route.id in u && ((y = i[m.route.id]) != null && y.shouldRevalidate) || g.hasClientLoader ? w = !0 : f.add(m.route.id));
1365
+ let v = r.routes[p.route.id];
1366
+ !v || !v.hasLoader || (!u.some((b) => b.route.id === p.route.id) && p.route.id in c && ((y = i[p.route.id]) != null && y.shouldRevalidate) || v.hasClientLoader ? w = !0 : f.add(p.route.id));
1348
1367
  }), f.size === 0)
1349
1368
  return [];
1350
- let E = Dt(e, c);
1369
+ let E = Dt(e, s);
1351
1370
  return w && f.size > 0 && E.searchParams.set(
1352
1371
  "_routes",
1353
- t.filter((m) => f.has(m.route.id)).map((m) => m.route.id).join(",")
1372
+ n.filter((p) => f.has(p.route.id)).map((p) => p.route.id).join(",")
1354
1373
  ), [E.pathname + E.search];
1355
1374
  }, [
1375
+ s,
1356
1376
  c,
1357
- u,
1358
1377
  a,
1359
1378
  r,
1360
- s,
1361
- t,
1379
+ u,
1380
+ n,
1362
1381
  e,
1363
1382
  i
1364
1383
  ]), d = o.useMemo(
1365
1384
  () => $t(h, r),
1366
1385
  [h, r]
1367
- ), v = Ft(h);
1368
- return /* @__PURE__ */ o.createElement(o.Fragment, null, p.map((f) => /* @__PURE__ */ o.createElement("link", { key: f, rel: "prefetch", as: "fetch", href: f, ...n })), d.map((f) => /* @__PURE__ */ o.createElement("link", { key: f, rel: "modulepreload", href: f, ...n })), v.map(({ key: f, link: w }) => (
1386
+ ), g = Ft(h);
1387
+ return /* @__PURE__ */ o.createElement(o.Fragment, null, m.map((f) => /* @__PURE__ */ o.createElement("link", { key: f, rel: "prefetch", as: "fetch", href: f, ...t })), d.map((f) => /* @__PURE__ */ o.createElement("link", { key: f, rel: "modulepreload", href: f, ...t })), g.map(({ key: f, link: w }) => (
1369
1388
  // these don't spread `linkProps` because they are full link descriptors
1370
1389
  // already with their own props
1371
1390
  /* @__PURE__ */ o.createElement("link", { key: f, ...w })
1372
1391
  )));
1373
1392
  }
1374
- function Bt(...e) {
1375
- return (t) => {
1376
- e.forEach((n) => {
1377
- typeof n == "function" ? n(t) : n != null && (n.current = t);
1393
+ function Wt(...e) {
1394
+ return (n) => {
1395
+ e.forEach((t) => {
1396
+ typeof t == "function" ? t(n) : t != null && (t.current = n);
1378
1397
  });
1379
1398
  };
1380
1399
  }
@@ -1385,43 +1404,43 @@ try {
1385
1404
  }
1386
1405
  var Te = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ne = o.forwardRef(
1387
1406
  function({
1388
- onClick: t,
1389
- discover: n = "render",
1407
+ onClick: n,
1408
+ discover: t = "render",
1390
1409
  prefetch: a = "none",
1391
1410
  relative: r,
1392
1411
  reloadDocument: i,
1393
- replace: c,
1394
- state: u,
1412
+ replace: s,
1413
+ state: c,
1395
1414
  target: l,
1396
- to: s,
1415
+ to: u,
1397
1416
  preventScrollReset: h,
1398
- viewTransition: p,
1417
+ viewTransition: m,
1399
1418
  ...d
1400
- }, v) {
1401
- let { basename: f } = o.useContext(T), w = typeof s == "string" && Te.test(s), E, m = !1;
1402
- if (typeof s == "string" && w && (E = s, $e))
1419
+ }, g) {
1420
+ let { basename: f } = o.useContext(T), w = typeof u == "string" && Te.test(u), E, p = !1;
1421
+ if (typeof u == "string" && w && (E = u, $e))
1403
1422
  try {
1404
- let P = new URL(window.location.href), D = s.startsWith("//") ? new URL(P.protocol + s) : new URL(s), se = M(D.pathname, f);
1405
- D.origin === P.origin && se != null ? s = se + D.search + D.hash : m = !0;
1423
+ let P = new URL(window.location.href), D = u.startsWith("//") ? new URL(P.protocol + u) : new URL(u), se = A(D.pathname, f);
1424
+ D.origin === P.origin && se != null ? u = se + D.search + D.hash : p = !0;
1406
1425
  } catch {
1407
1426
  L(
1408
1427
  !1,
1409
- `<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
1428
+ `<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
1410
1429
  );
1411
1430
  }
1412
- let g = et(s, { relative: r }), [y, R, x] = It(
1431
+ let v = et(u, { relative: r }), [y, b, x] = It(
1413
1432
  a,
1414
1433
  d
1415
- ), C = Vt(s, {
1416
- replace: c,
1417
- state: u,
1434
+ ), C = jt(u, {
1435
+ replace: s,
1436
+ state: c,
1418
1437
  target: l,
1419
1438
  preventScrollReset: h,
1420
1439
  relative: r,
1421
- viewTransition: p
1440
+ viewTransition: m
1422
1441
  });
1423
1442
  function $(P) {
1424
- t && t(P), P.defaultPrevented || C(P);
1443
+ n && n(P), P.defaultPrevented || C(P);
1425
1444
  }
1426
1445
  let S = (
1427
1446
  // eslint-disable-next-line jsx-a11y/anchor-has-content
@@ -1430,40 +1449,40 @@ var Te = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ne = o.forwardRef(
1430
1449
  {
1431
1450
  ...d,
1432
1451
  ...x,
1433
- href: E || g,
1434
- onClick: m || i ? t : $,
1435
- ref: Bt(v, R),
1452
+ href: E || v,
1453
+ onClick: p || i ? n : $,
1454
+ ref: Wt(g, b),
1436
1455
  target: l,
1437
- "data-discover": !w && n === "render" ? "true" : void 0
1456
+ "data-discover": !w && t === "render" ? "true" : void 0
1438
1457
  }
1439
1458
  )
1440
1459
  );
1441
- return y && !w ? /* @__PURE__ */ o.createElement(o.Fragment, null, S, /* @__PURE__ */ o.createElement(_t, { page: g })) : S;
1460
+ return y && !w ? /* @__PURE__ */ o.createElement(o.Fragment, null, S, /* @__PURE__ */ o.createElement(_t, { page: v })) : S;
1442
1461
  }
1443
1462
  );
1444
1463
  Ne.displayName = "Link";
1445
- var Ht = o.forwardRef(
1464
+ var Bt = o.forwardRef(
1446
1465
  function({
1447
- "aria-current": t = "page",
1448
- caseSensitive: n = !1,
1466
+ "aria-current": n = "page",
1467
+ caseSensitive: t = !1,
1449
1468
  className: a = "",
1450
1469
  end: r = !1,
1451
1470
  style: i,
1452
- to: c,
1453
- viewTransition: u,
1471
+ to: s,
1472
+ viewTransition: c,
1454
1473
  children: l,
1455
- ...s
1474
+ ...u
1456
1475
  }, h) {
1457
- let p = W(c, { relative: s.relative }), d = N(), v = o.useContext(_), { navigator: f, basename: w } = o.useContext(T), E = v != null && // Conditional usage is OK here because the usage of a data router is static
1476
+ let m = H(s, { relative: u.relative }), d = N(), g = o.useContext(_), { navigator: f, basename: w } = o.useContext(T), E = g != null && // Conditional usage is OK here because the usage of a data router is static
1458
1477
  // eslint-disable-next-line react-hooks/rules-of-hooks
1459
- qt(p) && u === !0, m = f.encodeLocation ? f.encodeLocation(p).pathname : p.pathname, g = d.pathname, y = v && v.navigation && v.navigation.location ? v.navigation.location.pathname : null;
1460
- n || (g = g.toLowerCase(), y = y ? y.toLowerCase() : null, m = m.toLowerCase()), y && w && (y = M(y, w) || y);
1461
- const R = m !== "/" && m.endsWith("/") ? m.length - 1 : m.length;
1462
- let x = g === m || !r && g.startsWith(m) && g.charAt(R) === "/", C = y != null && (y === m || !r && y.startsWith(m) && y.charAt(m.length) === "/"), $ = {
1478
+ qt(m) && c === !0, p = f.encodeLocation ? f.encodeLocation(m).pathname : m.pathname, v = d.pathname, y = g && g.navigation && g.navigation.location ? g.navigation.location.pathname : null;
1479
+ t || (v = v.toLowerCase(), y = y ? y.toLowerCase() : null, p = p.toLowerCase()), y && w && (y = A(y, w) || y);
1480
+ const b = p !== "/" && p.endsWith("/") ? p.length - 1 : p.length;
1481
+ let x = v === p || !r && v.startsWith(p) && v.charAt(b) === "/", C = y != null && (y === p || !r && y.startsWith(p) && y.charAt(p.length) === "/"), $ = {
1463
1482
  isActive: x,
1464
1483
  isPending: C,
1465
1484
  isTransitioning: E
1466
- }, S = x ? t : void 0, P;
1485
+ }, S = x ? n : void 0, P;
1467
1486
  typeof a == "function" ? P = a($) : P = [
1468
1487
  a,
1469
1488
  x ? "active" : null,
@@ -1474,268 +1493,268 @@ var Ht = o.forwardRef(
1474
1493
  return /* @__PURE__ */ o.createElement(
1475
1494
  Ne,
1476
1495
  {
1477
- ...s,
1496
+ ...u,
1478
1497
  "aria-current": S,
1479
1498
  className: P,
1480
1499
  ref: h,
1481
1500
  style: D,
1482
- to: c,
1483
- viewTransition: u
1501
+ to: s,
1502
+ viewTransition: c
1484
1503
  },
1485
1504
  typeof l == "function" ? l($) : l
1486
1505
  );
1487
1506
  }
1488
1507
  );
1489
- Ht.displayName = "NavLink";
1490
- var Wt = o.forwardRef(
1508
+ Bt.displayName = "NavLink";
1509
+ var Ht = o.forwardRef(
1491
1510
  ({
1492
1511
  discover: e = "render",
1493
- fetcherKey: t,
1494
- navigate: n,
1512
+ fetcherKey: n,
1513
+ navigate: t,
1495
1514
  reloadDocument: a,
1496
1515
  replace: r,
1497
1516
  state: i,
1498
- method: c = V,
1499
- action: u,
1517
+ method: s = j,
1518
+ action: c,
1500
1519
  onSubmit: l,
1501
- relative: s,
1520
+ relative: u,
1502
1521
  preventScrollReset: h,
1503
- viewTransition: p,
1522
+ viewTransition: m,
1504
1523
  ...d
1505
- }, v) => {
1506
- let f = Jt(), w = Kt(u, { relative: s }), E = c.toLowerCase() === "get" ? "get" : "post", m = typeof u == "string" && Te.test(u), g = (y) => {
1524
+ }, g) => {
1525
+ let f = Jt(), w = Kt(c, { relative: u }), E = s.toLowerCase() === "get" ? "get" : "post", p = typeof c == "string" && Te.test(c), v = (y) => {
1507
1526
  if (l && l(y), y.defaultPrevented) return;
1508
1527
  y.preventDefault();
1509
- let R = y.nativeEvent.submitter, x = (R == null ? void 0 : R.getAttribute("formmethod")) || c;
1510
- f(R || y.currentTarget, {
1511
- fetcherKey: t,
1528
+ let b = y.nativeEvent.submitter, x = (b == null ? void 0 : b.getAttribute("formmethod")) || s;
1529
+ f(b || y.currentTarget, {
1530
+ fetcherKey: n,
1512
1531
  method: x,
1513
- navigate: n,
1532
+ navigate: t,
1514
1533
  replace: r,
1515
1534
  state: i,
1516
- relative: s,
1535
+ relative: u,
1517
1536
  preventScrollReset: h,
1518
- viewTransition: p
1537
+ viewTransition: m
1519
1538
  });
1520
1539
  };
1521
1540
  return /* @__PURE__ */ o.createElement(
1522
1541
  "form",
1523
1542
  {
1524
- ref: v,
1543
+ ref: g,
1525
1544
  method: E,
1526
1545
  action: w,
1527
- onSubmit: a ? l : g,
1546
+ onSubmit: a ? l : v,
1528
1547
  ...d,
1529
- "data-discover": !m && e === "render" ? "true" : void 0
1548
+ "data-discover": !p && e === "render" ? "true" : void 0
1530
1549
  }
1531
1550
  );
1532
1551
  }
1533
1552
  );
1534
- Wt.displayName = "Form";
1553
+ Ht.displayName = "Form";
1535
1554
  function zt(e) {
1536
1555
  return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1537
1556
  }
1538
- function Ae(e) {
1539
- let t = o.useContext(O);
1540
- return b(t, zt(e)), t;
1557
+ function Me(e) {
1558
+ let n = o.useContext(O);
1559
+ return R(n, zt(e)), n;
1541
1560
  }
1542
- function Vt(e, {
1543
- target: t,
1544
- replace: n,
1561
+ function jt(e, {
1562
+ target: n,
1563
+ replace: t,
1545
1564
  state: a,
1546
1565
  preventScrollReset: r,
1547
1566
  relative: i,
1548
- viewTransition: c
1567
+ viewTransition: s
1549
1568
  } = {}) {
1550
- let u = re(), l = N(), s = W(e, { relative: i });
1569
+ let c = re(), l = N(), u = H(e, { relative: i });
1551
1570
  return o.useCallback(
1552
1571
  (h) => {
1553
- if (xt(h, t)) {
1572
+ if (xt(h, n)) {
1554
1573
  h.preventDefault();
1555
- let p = n !== void 0 ? n : B(l) === B(s);
1556
- u(e, {
1557
- replace: p,
1574
+ let m = t !== void 0 ? t : W(l) === W(u);
1575
+ c(e, {
1576
+ replace: m,
1558
1577
  state: a,
1559
1578
  preventScrollReset: r,
1560
1579
  relative: i,
1561
- viewTransition: c
1580
+ viewTransition: s
1562
1581
  });
1563
1582
  }
1564
1583
  },
1565
1584
  [
1566
1585
  l,
1586
+ c,
1567
1587
  u,
1568
- s,
1569
- n,
1570
- a,
1571
1588
  t,
1589
+ a,
1590
+ n,
1572
1591
  e,
1573
1592
  r,
1574
1593
  i,
1575
- c
1594
+ s
1576
1595
  ]
1577
1596
  );
1578
1597
  }
1579
- function hn(e) {
1598
+ function mn(e) {
1580
1599
  L(
1581
1600
  typeof URLSearchParams < "u",
1582
1601
  "You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params."
1583
1602
  );
1584
- let t = o.useRef(Q(e)), n = o.useRef(!1), a = N(), r = o.useMemo(
1603
+ let n = o.useRef(Q(e)), t = o.useRef(!1), a = N(), r = o.useMemo(
1585
1604
  () => (
1586
1605
  // Only merge in the defaults if we haven't yet called setSearchParams.
1587
1606
  // Once we call that we want those to take precedence, otherwise you can't
1588
1607
  // remove a param with setSearchParams({}) if it has an initial value
1589
- Rt(
1608
+ bt(
1590
1609
  a.search,
1591
- n.current ? null : t.current
1610
+ t.current ? null : n.current
1592
1611
  )
1593
1612
  ),
1594
1613
  [a.search]
1595
- ), i = re(), c = o.useCallback(
1596
- (u, l) => {
1597
- const s = Q(
1598
- typeof u == "function" ? u(r) : u
1614
+ ), i = re(), s = o.useCallback(
1615
+ (c, l) => {
1616
+ const u = Q(
1617
+ typeof c == "function" ? c(r) : c
1599
1618
  );
1600
- n.current = !0, i("?" + s, l);
1619
+ t.current = !0, i("?" + u, l);
1601
1620
  },
1602
1621
  [i, r]
1603
1622
  );
1604
- return [r, c];
1623
+ return [r, s];
1605
1624
  }
1606
- var jt = 0, Yt = () => `__${String(++jt)}__`;
1625
+ var Vt = 0, Yt = () => `__${String(++Vt)}__`;
1607
1626
  function Jt() {
1608
- let { router: e } = Ae(
1627
+ let { router: e } = Me(
1609
1628
  "useSubmit"
1610
1629
  /* UseSubmit */
1611
- ), { basename: t } = o.useContext(T), n = ft();
1630
+ ), { basename: n } = o.useContext(T), t = ft();
1612
1631
  return o.useCallback(
1613
1632
  async (a, r = {}) => {
1614
- let { action: i, method: c, encType: u, formData: l, body: s } = St(
1633
+ let { action: i, method: s, encType: c, formData: l, body: u } = St(
1615
1634
  a,
1616
- t
1635
+ n
1617
1636
  );
1618
1637
  if (r.navigate === !1) {
1619
1638
  let h = r.fetcherKey || Yt();
1620
- await e.fetch(h, n, r.action || i, {
1639
+ await e.fetch(h, t, r.action || i, {
1621
1640
  preventScrollReset: r.preventScrollReset,
1622
1641
  formData: l,
1623
- body: s,
1624
- formMethod: r.method || c,
1625
- formEncType: r.encType || u,
1642
+ body: u,
1643
+ formMethod: r.method || s,
1644
+ formEncType: r.encType || c,
1626
1645
  flushSync: r.flushSync
1627
1646
  });
1628
1647
  } else
1629
1648
  await e.navigate(r.action || i, {
1630
1649
  preventScrollReset: r.preventScrollReset,
1631
1650
  formData: l,
1632
- body: s,
1633
- formMethod: r.method || c,
1634
- formEncType: r.encType || u,
1651
+ body: u,
1652
+ formMethod: r.method || s,
1653
+ formEncType: r.encType || c,
1635
1654
  replace: r.replace,
1636
1655
  state: r.state,
1637
- fromRouteId: n,
1656
+ fromRouteId: t,
1638
1657
  flushSync: r.flushSync,
1639
1658
  viewTransition: r.viewTransition
1640
1659
  });
1641
1660
  },
1642
- [e, t, n]
1661
+ [e, n, t]
1643
1662
  );
1644
1663
  }
1645
- function Kt(e, { relative: t } = {}) {
1646
- let { basename: n } = o.useContext(T), a = o.useContext(k);
1647
- b(a, "useFormAction must be used inside a RouteContext");
1648
- let [r] = a.matches.slice(-1), i = { ...W(e || ".", { relative: t }) }, c = N();
1664
+ function Kt(e, { relative: n } = {}) {
1665
+ let { basename: t } = o.useContext(T), a = o.useContext(k);
1666
+ R(a, "useFormAction must be used inside a RouteContext");
1667
+ let [r] = a.matches.slice(-1), i = { ...H(e || ".", { relative: n }) }, s = N();
1649
1668
  if (e == null) {
1650
- i.search = c.search;
1651
- let u = new URLSearchParams(i.search), l = u.getAll("index");
1669
+ i.search = s.search;
1670
+ let c = new URLSearchParams(i.search), l = c.getAll("index");
1652
1671
  if (l.some((h) => h === "")) {
1653
- u.delete("index"), l.filter((p) => p).forEach((p) => u.append("index", p));
1654
- let h = u.toString();
1672
+ c.delete("index"), l.filter((m) => m).forEach((m) => c.append("index", m));
1673
+ let h = c.toString();
1655
1674
  i.search = h ? `?${h}` : "";
1656
1675
  }
1657
1676
  }
1658
- return (!e || e === ".") && r.route.index && (i.search = i.search ? i.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (i.pathname = i.pathname === "/" ? n : A([n, i.pathname])), B(i);
1677
+ return (!e || e === ".") && r.route.index && (i.search = i.search ? i.search.replace(/^\?/, "?index&") : "?index"), t !== "/" && (i.pathname = i.pathname === "/" ? t : M([t, i.pathname])), W(i);
1659
1678
  }
1660
- function qt(e, t = {}) {
1661
- let n = o.useContext(J);
1662
- b(
1663
- n != null,
1679
+ function qt(e, n = {}) {
1680
+ let t = o.useContext(J);
1681
+ R(
1682
+ t != null,
1664
1683
  "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
1665
1684
  );
1666
- let { basename: a } = Ae(
1685
+ let { basename: a } = Me(
1667
1686
  "useViewTransitionState"
1668
1687
  /* useViewTransitionState */
1669
- ), r = W(e, { relative: t.relative });
1670
- if (!n.isTransitioning)
1688
+ ), r = H(e, { relative: n.relative });
1689
+ if (!t.isTransitioning)
1671
1690
  return !1;
1672
- let i = M(n.currentLocation.pathname, a) || n.currentLocation.pathname, c = M(n.nextLocation.pathname, a) || n.nextLocation.pathname;
1673
- return H(r.pathname, c) != null || H(r.pathname, i) != null;
1691
+ let i = A(t.currentLocation.pathname, a) || t.currentLocation.pathname, s = A(t.nextLocation.pathname, a) || t.nextLocation.pathname;
1692
+ return B(r.pathname, s) != null || B(r.pathname, i) != null;
1674
1693
  }
1675
- function mn({
1694
+ function pn({
1676
1695
  context: e,
1677
- router: t,
1678
- hydrate: n = !0,
1696
+ router: n,
1697
+ hydrate: t = !0,
1679
1698
  nonce: a
1680
1699
  }) {
1681
- b(
1682
- t && e,
1700
+ R(
1701
+ n && e,
1683
1702
  "You must provide `router` and `context` to <StaticRouterProvider>"
1684
1703
  );
1685
1704
  let r = {
1686
- router: t,
1705
+ router: n,
1687
1706
  navigator: Qt(),
1688
1707
  static: !0,
1689
1708
  staticContext: e,
1690
1709
  basename: e.basename || "/"
1691
- }, i = /* @__PURE__ */ new Map(), c = "";
1692
- if (n !== !1) {
1710
+ }, i = /* @__PURE__ */ new Map(), s = "";
1711
+ if (t !== !1) {
1693
1712
  let l = {
1694
1713
  loaderData: e.loaderData,
1695
1714
  actionData: e.actionData,
1696
1715
  errors: Xt(e.errors)
1697
1716
  };
1698
- c = `window.__staticRouterHydrationData = JSON.parse(${an(JSON.stringify(JSON.stringify(l)))});`;
1717
+ s = `window.__staticRouterHydrationData = JSON.parse(${an(JSON.stringify(JSON.stringify(l)))});`;
1699
1718
  }
1700
- let { state: u } = r.router;
1701
- return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(O.Provider, { value: r }, /* @__PURE__ */ o.createElement(_.Provider, { value: u }, /* @__PURE__ */ o.createElement(te.Provider, { value: i }, /* @__PURE__ */ o.createElement(J.Provider, { value: { isTransitioning: !1 } }, /* @__PURE__ */ o.createElement(
1719
+ let { state: c } = r.router;
1720
+ return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(O.Provider, { value: r }, /* @__PURE__ */ o.createElement(_.Provider, { value: c }, /* @__PURE__ */ o.createElement(te.Provider, { value: i }, /* @__PURE__ */ o.createElement(J.Provider, { value: { isTransitioning: !1 } }, /* @__PURE__ */ o.createElement(
1702
1721
  Pe,
1703
1722
  {
1704
1723
  basename: r.basename,
1705
- location: u.location,
1706
- navigationType: u.historyAction,
1724
+ location: c.location,
1725
+ navigationType: c.historyAction,
1707
1726
  navigator: r.navigator,
1708
1727
  static: r.static
1709
1728
  },
1710
1729
  /* @__PURE__ */ o.createElement(
1711
1730
  Gt,
1712
1731
  {
1713
- routes: t.routes,
1714
- future: t.future,
1715
- state: u
1732
+ routes: n.routes,
1733
+ future: n.future,
1734
+ state: c
1716
1735
  }
1717
1736
  )
1718
- ))))), c ? /* @__PURE__ */ o.createElement(
1737
+ ))))), s ? /* @__PURE__ */ o.createElement(
1719
1738
  "script",
1720
1739
  {
1721
1740
  suppressHydrationWarning: !0,
1722
1741
  nonce: a,
1723
- dangerouslySetInnerHTML: { __html: c }
1742
+ dangerouslySetInnerHTML: { __html: s }
1724
1743
  }
1725
1744
  ) : null);
1726
1745
  }
1727
1746
  function Gt({
1728
1747
  routes: e,
1729
- future: t,
1730
- state: n
1748
+ future: n,
1749
+ state: t
1731
1750
  }) {
1732
- return be(e, void 0, n, t);
1751
+ return Re(e, void 0, t, n);
1733
1752
  }
1734
1753
  function Xt(e) {
1735
1754
  if (!e) return null;
1736
- let t = Object.entries(e), n = {};
1737
- for (let [a, r] of t)
1738
- we(r) ? n[a] = { ...r, __type: "RouteErrorResponse" } : r instanceof Error ? n[a] = {
1755
+ let n = Object.entries(e), t = {};
1756
+ for (let [a, r] of n)
1757
+ we(r) ? t[a] = { ...r, __type: "RouteErrorResponse" } : r instanceof Error ? t[a] = {
1739
1758
  message: r.message,
1740
1759
  __type: "Error",
1741
1760
  // If this is a subclass (i.e., ReferenceError), send up the type so we
@@ -1743,8 +1762,8 @@ function Xt(e) {
1743
1762
  ...r.name !== "Error" ? {
1744
1763
  __subType: r.name
1745
1764
  } : {}
1746
- } : n[a] = r;
1747
- return n;
1765
+ } : t[a] = r;
1766
+ return t;
1748
1767
  }
1749
1768
  function Qt() {
1750
1769
  return {
@@ -1778,16 +1797,16 @@ function Qt() {
1778
1797
  };
1779
1798
  }
1780
1799
  function Zt(e) {
1781
- return typeof e == "string" ? e : B(e);
1800
+ return typeof e == "string" ? e : W(e);
1782
1801
  }
1783
1802
  function en(e) {
1784
- let t = typeof e == "string" ? e : B(e);
1785
- t = t.replace(/ $/, "%20");
1786
- let n = tn.test(t) ? new URL(t) : new URL(t, "http://localhost");
1803
+ let n = typeof e == "string" ? e : W(e);
1804
+ n = n.replace(/ $/, "%20");
1805
+ let t = tn.test(n) ? new URL(n) : new URL(n, "http://localhost");
1787
1806
  return {
1788
- pathname: n.pathname,
1789
- search: n.search,
1790
- hash: n.hash
1807
+ pathname: t.pathname,
1808
+ search: t.search,
1809
+ hash: t.hash
1791
1810
  };
1792
1811
  }
1793
1812
  var tn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, nn = {
@@ -1798,29 +1817,30 @@ var tn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, nn = {
1798
1817
  "\u2029": "\\u2029"
1799
1818
  }, rn = /[&><\u2028\u2029]/g;
1800
1819
  function an(e) {
1801
- return e.replace(rn, (t) => nn[t]);
1820
+ return e.replace(rn, (n) => nn[n]);
1802
1821
  }
1803
1822
  new TextEncoder();
1804
1823
  [
1805
- ...Mt
1824
+ ...At
1806
1825
  ];
1807
1826
  export {
1808
1827
  Ne as L,
1809
- fn as N,
1810
- dn as O,
1811
- cn as R,
1812
- mn as S,
1828
+ dn as N,
1829
+ hn as O,
1830
+ fn as R,
1831
+ pn as S,
1813
1832
  re as a,
1814
- hn as b,
1815
- sn as c,
1816
- ln as d,
1833
+ mn as b,
1834
+ un as c,
1835
+ sn as d,
1817
1836
  dt as e,
1818
- un as f,
1819
- Ht as g,
1820
- et as h,
1837
+ cn as f,
1838
+ Bt as g,
1839
+ on as h,
1821
1840
  we as i,
1822
- H as m,
1823
- on as r,
1841
+ et as j,
1842
+ B as m,
1843
+ ln as r,
1824
1844
  N as u
1825
1845
  };
1826
- //# sourceMappingURL=chunk-BAXFHI7N-BVBOl9s0.js.map
1846
+ //# sourceMappingURL=chunk-BAXFHI7N-BLTsN6tl.js.map