@gen-epix/ui-client-casedb 4.3.0 → 4.3.2

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 (170) hide show
  1. package/dist/_chunks/Dashboard.js +613 -666
  2. package/dist/_chunks/Dashboard.js.map +1 -1
  3. package/dist/_chunks/LegendaItem.js.map +1 -1
  4. package/dist/_chunks/UploadUtil.js +4 -6
  5. package/dist/_chunks/UploadUtil.js.map +1 -1
  6. package/dist/_chunks/_baseClone.js +1 -1
  7. package/dist/_chunks/_baseClone.js.map +1 -1
  8. package/dist/_chunks/cloneDeep.js +1 -1
  9. package/dist/_chunks/cloneDeep.js.map +1 -1
  10. package/dist/_chunks/esm.js +93 -101
  11. package/dist/_chunks/esm.js.map +1 -1
  12. package/dist/_chunks/react.js +1 -1
  13. package/dist/_chunks/react.js.map +1 -1
  14. package/dist/_chunks/shallow.js +2 -2
  15. package/dist/_chunks/shallow.js.map +1 -1
  16. package/dist/_chunks/sync.js +4 -4
  17. package/dist/_chunks/sync.js.map +1 -1
  18. package/dist/_chunks/vanilla.js +1 -1
  19. package/dist/_chunks/vanilla.js.map +1 -1
  20. package/dist/_chunks/yup.js +2 -2
  21. package/dist/_chunks/yup.js.map +1 -1
  22. package/dist/components/app/CaseDbApp/CaseDbApp.d.ts +1 -1
  23. package/dist/components/ui/AddCasesToEventDialog/AddCasesToEventDialogSuccessNotificationMessage.d.ts +1 -1
  24. package/dist/components/ui/CaseContentForm/CaseContentForm.d.ts +1 -1
  25. package/dist/components/ui/CaseInfoDialog/CaseCaseSetInfo.d.ts +1 -1
  26. package/dist/components/ui/CaseInfoDialog/CaseContent.d.ts +1 -1
  27. package/dist/components/ui/CaseInfoDialog/CaseInfoForm.d.ts +1 -1
  28. package/dist/components/ui/CaseInfoDialog/CaseSharingForm.d.ts +1 -1
  29. package/dist/components/ui/CaseInfoDialog/CaseSharingInfo.d.ts +1 -1
  30. package/dist/components/ui/CaseInfoDialog/ReadOnlyCaseContent.d.ts +1 -1
  31. package/dist/components/ui/CaseSetInfoDialog/CaseSetContent.d.ts +1 -1
  32. package/dist/components/ui/CaseSetInfoDialog/CaseSetDescription.d.ts +1 -1
  33. package/dist/components/ui/CaseSetInfoDialog/CaseSetForm.d.ts +1 -1
  34. package/dist/components/ui/CaseSetInfoDialog/CaseSetSharingForm.d.ts +1 -1
  35. package/dist/components/ui/CaseSetInfoDialog/CaseSetSharingInfo.d.ts +1 -1
  36. package/dist/components/ui/CaseSummary/CaseSummary.d.ts +1 -1
  37. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoAccessRights.d.ts +1 -1
  38. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoColAccessRights.d.ts +1 -1
  39. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoData.d.ts +1 -1
  40. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoDialogContent.d.ts +1 -1
  41. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoRegions.d.ts +1 -1
  42. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoTrees.d.ts +1 -1
  43. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoValues.d.ts +1 -1
  44. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoVariableDetails.d.ts +1 -1
  45. package/dist/components/ui/CasesAlreadyInCaseSetWarning/CasesAlreadyInCaseSetWarning.d.ts +1 -1
  46. package/dist/components/ui/CasesAlreadyInCaseSetWarning/CasesAlreadyInCaseSetWarningCaseSetLink.d.ts +1 -1
  47. package/dist/components/ui/CompletCaseTypeLoader/CompletCaseTypeLoader.d.ts +1 -1
  48. package/dist/components/ui/ContextMenu/ContextMenu.d.ts +1 -1
  49. package/dist/components/ui/ContextMenu/index.js +1 -1
  50. package/dist/components/ui/ContextMenu/index.js.map +1 -1
  51. package/dist/components/ui/CreateEventDialog/CreateEventDialogSuccessNotificationMessage.d.ts +1 -1
  52. package/dist/components/ui/CreateEventDialog/index.js +1 -1
  53. package/dist/components/ui/CreateEventDialog/index.js.map +1 -1
  54. package/dist/components/ui/CustomTabPanel/CustomTabPanel.d.ts +1 -1
  55. package/dist/components/ui/Dashboard/DashboardContent.d.ts +1 -1
  56. package/dist/components/ui/Dashboard/DashboardDownloadSidebarItem.d.ts +1 -1
  57. package/dist/components/ui/Dashboard/DashboardGeneralSettingsForm.d.ts +1 -1
  58. package/dist/components/ui/Dashboard/DashboardLayoutRenderer.d.ts +1 -1
  59. package/dist/components/ui/Dashboard/DashboardLayoutSettingsForm.d.ts +1 -1
  60. package/dist/components/ui/Dashboard/DashboardSearch.d.ts +1 -1
  61. package/dist/components/ui/Dashboard/DashboardSearchSettings.d.ts +1 -1
  62. package/dist/components/ui/Dashboard/DashboardSettingsSidebarItem.d.ts +1 -1
  63. package/dist/components/ui/Dashboard/DashboardWidget.d.ts +1 -1
  64. package/dist/components/ui/Dashboard/DashboardWidgetPlaceHolder.d.ts +1 -1
  65. package/dist/components/ui/Dashboard/DashboardWidgetSettingsForm.d.ts +1 -1
  66. package/dist/components/ui/Dashboard/context/DashboardContextProvider.d.ts +1 -1
  67. package/dist/components/ui/DashboardEditCases/DashboardEditCases.d.ts +1 -1
  68. package/dist/components/ui/DashboardStoreLoader/DashboardStoreLoader.d.ts +1 -1
  69. package/dist/components/ui/DashboardStoreLoader/DashboardStoreLoaderContent.d.ts +1 -1
  70. package/dist/components/ui/DataCollectionAccessInfo/DataCollectionAccessInfo.d.ts +1 -1
  71. package/dist/components/ui/EpiCurveWidget/EpiCurveBarChart.d.ts +1 -1
  72. package/dist/components/ui/EpiCurveWidget/EpiCurveStackedAreaChart.d.ts +1 -1
  73. package/dist/components/ui/EpiCurveWidget/EpiCurveWidget.d.ts +1 -1
  74. package/dist/components/ui/Grouping/Grouping.d.ts +1 -1
  75. package/dist/components/ui/HistogramWidget/HistogramWidget.d.ts +1 -1
  76. package/dist/components/ui/HistogramWidget/index.js +1 -1
  77. package/dist/components/ui/HistogramWidget/index.js.map +1 -1
  78. package/dist/components/ui/HomePageTrends/HomePageTrendCard.d.ts +1 -1
  79. package/dist/components/ui/HomePageTrends/HomePageTrends.d.ts +1 -1
  80. package/dist/components/ui/LegendaItem/LegendaItem.d.ts +1 -1
  81. package/dist/components/ui/LineListWidget/LineListWidget.d.ts +1 -1
  82. package/dist/components/ui/LineListWidget/LineListWidgetIsInEventCell.d.ts +1 -1
  83. package/dist/components/ui/LineListWidget/LineListWidgetIsOwnCaseCell.d.ts +1 -1
  84. package/dist/components/ui/LineListWidget/LineListWidgetPrimaryMenu.d.ts +1 -1
  85. package/dist/components/ui/LineListWidget/LineListWidgetSecondaryMenu.d.ts +1 -1
  86. package/dist/components/ui/LineListWidget/LineListWidgetTitle.d.ts +1 -1
  87. package/dist/components/ui/MapWidget/MapWidget.d.ts +1 -1
  88. package/dist/components/ui/PanelSeparator/PanelSeparatorHorizontal.d.ts +1 -1
  89. package/dist/components/ui/PanelSeparator/PanelSeparatorVertical.d.ts +1 -1
  90. package/dist/components/ui/PanelSeparator/index.js +50 -2
  91. package/dist/components/ui/PanelSeparator/index.js.map +1 -0
  92. package/dist/components/ui/TreeDescription/TreeDescription.d.ts +1 -1
  93. package/dist/components/ui/TreeWidget/TreeWidget.d.ts +1 -1
  94. package/dist/components/ui/Upload/Upload.d.ts +1 -1
  95. package/dist/components/ui/Upload/UploadCaseResultTable.d.ts +1 -1
  96. package/dist/components/ui/Upload/UploadCreateCases.d.ts +1 -1
  97. package/dist/components/ui/Upload/UploadMapColumns.d.ts +1 -1
  98. package/dist/components/ui/Upload/UploadMapSequences.d.ts +1 -1
  99. package/dist/components/ui/Upload/UploadNavigation.d.ts +1 -1
  100. package/dist/components/ui/Upload/UploadPreviewNavigation.d.ts +1 -1
  101. package/dist/components/ui/Upload/UploadSelectFile.d.ts +1 -1
  102. package/dist/components/ui/Upload/UploadSelectSequenceFiles.d.ts +1 -1
  103. package/dist/components/ui/UserRightsDialog/UserRightsDialogCaseAccessPolicy.d.ts +1 -1
  104. package/dist/components/ui/Warning/Warning.d.ts +1 -1
  105. package/dist/components/ui/WidgetHeaderIconButton/WidgetHeaderIconButton.d.ts +1 -1
  106. package/dist/components/ui/WidgetMenu/WidgetMenu.d.ts +1 -1
  107. package/dist/components/ui/WidgetUnavailable/WidgetUnavailable.d.ts +1 -1
  108. package/dist/context/caseAbac/CaseAbacContextProvider.d.ts +1 -1
  109. package/dist/context/caseTypeAbac/CaseTypeAbacContextProvider.d.ts +1 -1
  110. package/dist/pages/CaseDbUsersAdminPage/CaseDbUsersAdminPage.d.ts +1 -1
  111. package/dist/pages/CaseSetCategoryAdminPage/CaseSetCategoryAdminPage.d.ts +1 -1
  112. package/dist/pages/CaseSetStatusAdminPage/CaseSetStatusAdminPage.d.ts +1 -1
  113. package/dist/pages/CaseTypeSetCategoriesAdminPage/CaseTypeSetCategoriesAdminPage.d.ts +1 -1
  114. package/dist/pages/CaseTypeSetsAdminPage/CaseTypeSetsAdminPage.d.ts +1 -1
  115. package/dist/pages/CaseTypesAdminPage/CaseTypesAdminPage.d.ts +1 -1
  116. package/dist/pages/CasesDetailPage/CasesDetailPage.d.ts +1 -1
  117. package/dist/pages/CasesDetailPage/index.js +16 -16
  118. package/dist/pages/CasesPage/CasesPage.d.ts +1 -1
  119. package/dist/pages/ColSetsAdminPage/ColSetsAdminPage.d.ts +1 -1
  120. package/dist/pages/ColsAdminPage/ColsAdminPage.d.ts +1 -1
  121. package/dist/pages/ColsAdminPage/index.js +77 -77
  122. package/dist/pages/ColsAdminPage/index.js.map +1 -1
  123. package/dist/pages/ConceptRelationsAdminPage/ConceptRelationsAdminPage.d.ts +1 -1
  124. package/dist/pages/ConceptSetsAdminPage/ConceptSetsAdminPage.d.ts +1 -1
  125. package/dist/pages/ConceptsAdminPage/ConceptsAdminPage.d.ts +1 -1
  126. package/dist/pages/ConceptsAdminPage/index.js +31 -31
  127. package/dist/pages/DataCollectionSetsAdminPage/DataCollectionSetsAdminPage.d.ts +1 -1
  128. package/dist/pages/DataCollectionVisualizationPage/DataCollectionVisualizationPage.d.ts +1 -1
  129. package/dist/pages/DataCollectionVisualizationPage/index.js +1 -1
  130. package/dist/pages/DataCollectionVisualizationPage/index.js.map +1 -1
  131. package/dist/pages/DataCollectionsAdminPage/DataCollectionsAdminPage.d.ts +1 -1
  132. package/dist/pages/DimsAdminPage/DimsAdminPage.d.ts +1 -1
  133. package/dist/pages/DimsAdminPage/index.js +46 -46
  134. package/dist/pages/DiseasesAdminPage/DiseasesAdminPage.d.ts +1 -1
  135. package/dist/pages/EtiologicalAgentsAdminPage/EtiologicalAgentsAdminPage.d.ts +1 -1
  136. package/dist/pages/EtiologiesAdminPage/EtiologiesAdminPage.d.ts +1 -1
  137. package/dist/pages/EventsDetailPage/EventsDetailPage.d.ts +1 -1
  138. package/dist/pages/EventsDetailPage/index.js +18 -18
  139. package/dist/pages/EventsPage/EventsPage.d.ts +1 -1
  140. package/dist/pages/HomePage/HomePage.d.ts +1 -1
  141. package/dist/pages/OrganizationAccessCasePoliciesAdminPage/OrganizationAccessCasePoliciesAdminPage.d.ts +1 -1
  142. package/dist/pages/OrganizationShareCasePoliciesAdminPage/OrganizationShareCasePoliciesAdminPage.d.ts +1 -1
  143. package/dist/pages/RefColsAdminPage/RefColsAdminPage.d.ts +1 -1
  144. package/dist/pages/RefColsAdminPage/index.js +94 -94
  145. package/dist/pages/RefDimsAdminPage/RefDimsAdminPage.d.ts +1 -1
  146. package/dist/pages/RegionRelationsAdminPage/RegionRelationsAdminPage.d.ts +1 -1
  147. package/dist/pages/RegionSetShapesAdminPage/RegionSetShapesAdminPage.d.ts +1 -1
  148. package/dist/pages/RegionSetShapesAdminPage/index.js +26 -26
  149. package/dist/pages/RegionSetsAdminPage/RegionSetsAdminPage.d.ts +1 -1
  150. package/dist/pages/RegionsAdminPage/RegionsAdminPage.d.ts +1 -1
  151. package/dist/pages/RegionsAdminPage/index.js +33 -33
  152. package/dist/pages/TrendsPage/TrendsPage.d.ts +1 -1
  153. package/dist/pages/UploadPage/UploadPage.d.ts +1 -1
  154. package/dist/pages/UserAccessCasePoliciesAdminPage/UserAccessCasePoliciesAdminPage.d.ts +1 -1
  155. package/dist/pages/UserEffectiveRightsAdminPage/UserEffectiveRightsAdminPage.d.ts +1 -1
  156. package/dist/pages/UserEffectiveRightsAdminPage/index.js +56 -56
  157. package/dist/pages/UserEffectiveRightsAdminPage/index.js.map +1 -1
  158. package/dist/pages/UserEffectiveRightsTesterAdminPage/UserEffectiveRightsTesterAdminPage.d.ts +1 -1
  159. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js +45 -45
  160. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js.map +1 -1
  161. package/dist/pages/UserShareCasePoliciesAdminPage/UserShareCasePoliciesAdminPage.d.ts +1 -1
  162. package/dist/utils/CaseDbStandardConfigUtil/index.js +1 -5
  163. package/dist/utils/CaseDbStandardConfigUtil/index.js.map +1 -1
  164. package/dist/utils/MapUtil/index.js +1 -1
  165. package/dist/utils/MapUtil/index.js.map +1 -1
  166. package/package.json +33 -28
  167. package/dist/_chunks/PanelSeparator.js +0 -1666
  168. package/dist/_chunks/PanelSeparator.js.map +0 -1
  169. package/dist/_chunks/chunk-OB3PAWPO.js +0 -1162
  170. package/dist/_chunks/chunk-OB3PAWPO.js.map +0 -1
@@ -1,1162 +0,0 @@
1
- import * as e from "react";
2
- //#region ../../node_modules/.pnpm/react-router@7.18.4_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/react-router/dist/development/chunk-OB3PAWPO.mjs
3
- var t = /^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i, n = /^[\\/]{2}/;
4
- function r(e, t) {
5
- return t + e.replace(/\\/g, "/");
6
- }
7
- function i(e, t) {
8
- if (e === !1 || e == null) throw Error(t);
9
- }
10
- function a(e, t) {
11
- if (!e) {
12
- typeof console < "u" && console.warn(t);
13
- try {
14
- throw Error(t);
15
- } catch {}
16
- }
17
- }
18
- function o({ pathname: e = "/", search: t = "", hash: n = "" }) {
19
- return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
20
- }
21
- function s(e) {
22
- let t = {};
23
- if (e) {
24
- let n = e.indexOf("#");
25
- n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
26
- let r = e.indexOf("?");
27
- r >= 0 && (t.search = e.substring(r), e = e.substring(0, r)), e && (t.pathname = e);
28
- }
29
- return t;
30
- }
31
- function c(e, t, n = "/") {
32
- return l(e, t, n, !1);
33
- }
34
- function l(e, t, n, r, i) {
35
- let a = D((typeof t == "string" ? s(t) : t).pathname || "/", n);
36
- if (a == null) return null;
37
- let o = i ?? u(e), c = null, l = ee(a);
38
- for (let e = 0; c == null && e < o.length; ++e) c = C(o[e], l, r);
39
- return c;
40
- }
41
- function u(e) {
42
- let t = d(e);
43
- return p(t), t;
44
- }
45
- function d(e, t = [], n = [], r = "", a = !1) {
46
- let o = (e, o, s = a, c) => {
47
- let l = {
48
- relativePath: c === void 0 ? e.path || "" : c,
49
- caseSensitive: e.caseSensitive === !0,
50
- childrenIndex: o,
51
- route: e
52
- };
53
- if (l.relativePath.startsWith("/")) {
54
- if (!l.relativePath.startsWith(r) && s) return;
55
- i(l.relativePath.startsWith(r), `Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`), l.relativePath = l.relativePath.slice(r.length);
56
- }
57
- let u = A([r, l.relativePath]), f = n.concat(l);
58
- e.children && e.children.length > 0 && (i(e.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${u}".`), d(e.children, t, f, u, s)), !(e.path == null && !e.index) && t.push({
59
- path: u,
60
- score: x(u, e.index),
61
- routesMeta: f.map((e, t) => {
62
- let [n, r] = E(e.relativePath, e.caseSensitive, t === f.length - 1);
63
- return {
64
- ...e,
65
- matcher: n,
66
- compiledParams: r
67
- };
68
- })
69
- });
70
- };
71
- return e.forEach((e, t) => {
72
- if (e.path === "" || !e.path?.includes("?")) o(e, t);
73
- else for (let n of f(e.path)) o(e, t, !0, n);
74
- }), t;
75
- }
76
- function f(e) {
77
- let t = e.split("/");
78
- if (t.length === 0) return [];
79
- let [n, ...r] = t, i = n.endsWith("?"), a = n.replace(/\?$/, "");
80
- if (r.length === 0) return i ? [a, ""] : [a];
81
- let o = f(r.join("/")), s = [];
82
- return s.push(...o.map((e) => e === "" ? a : [a, e].join("/"))), i && s.push(...o), s.map((t) => e.startsWith("/") && t === "" ? "/" : t);
83
- }
84
- function p(e) {
85
- e.sort((e, t) => e.score === t.score ? S(e.routesMeta.map((e) => e.childrenIndex), t.routesMeta.map((e) => e.childrenIndex)) : t.score - e.score);
86
- }
87
- var m = /^:[\w-]+$/, h = 3, g = 2, _ = 1, v = 10, y = -2, b = (e) => e === "*";
88
- function x(e, t) {
89
- let n = e.split("/"), r = n.length;
90
- return n.some(b) && (r += y), t && (r += g), n.filter((e) => !b(e)).reduce((e, t) => e + (m.test(t) ? h : t === "" ? _ : v), r);
91
- }
92
- function S(e, t) {
93
- return e.length === t.length && e.slice(0, -1).every((e, n) => e === t[n]) ? e[e.length - 1] - t[t.length - 1] : 0;
94
- }
95
- function C(e, t, n = !1) {
96
- let { routesMeta: r } = e, i = {}, a = "/", o = [];
97
- for (let e = 0; e < r.length; ++e) {
98
- let s = r[e], c = e === r.length - 1, l = a === "/" ? t : t.slice(a.length) || "/", u = {
99
- path: s.relativePath,
100
- caseSensitive: s.caseSensitive,
101
- end: c
102
- }, d = s.matcher && s.compiledParams ? T(u, l, s.matcher, s.compiledParams) : w(u, l), f = s.route;
103
- if (!d && c && n && !r[r.length - 1].route.index && (d = w({
104
- path: s.relativePath,
105
- caseSensitive: s.caseSensitive,
106
- end: !1
107
- }, l)), !d) return null;
108
- Object.assign(i, d.params), o.push({
109
- params: i,
110
- pathname: A([a, d.pathname]),
111
- pathnameBase: oe(A([a, d.pathnameBase])),
112
- route: f
113
- }), d.pathnameBase !== "/" && (a = A([a, d.pathnameBase]));
114
- }
115
- return o;
116
- }
117
- function w(e, t) {
118
- typeof e == "string" && (e = {
119
- path: e,
120
- caseSensitive: !1,
121
- end: !0
122
- });
123
- let [n, r] = E(e.path, e.caseSensitive, e.end);
124
- return T(e, t, n, r);
125
- }
126
- function T(e, t, n, r) {
127
- let i = t.match(n);
128
- if (!i) return null;
129
- let a = i[0], o = j(a, 1), s = i.slice(1);
130
- return {
131
- params: r.reduce((e, { paramName: t, isOptional: n }, r) => {
132
- if (t === "*") {
133
- let e = s[r] || "";
134
- o = j(a.slice(0, a.length - e.length), 1);
135
- }
136
- let i = s[r];
137
- return e[t] = n && !i ? void 0 : (i || "").replace(/%2F/g, "/"), e;
138
- }, {}),
139
- pathname: a,
140
- pathnameBase: o,
141
- pattern: e
142
- };
143
- }
144
- function E(e, t = !1, n = !0) {
145
- a(e === "*" || !e.endsWith("*") || e.endsWith("/*"), `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(/\*$/, "/*")}".`);
146
- let r = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (e, t, n, i, a) => {
147
- if (r.push({
148
- paramName: t,
149
- isOptional: n != null
150
- }), n) {
151
- let t = a.charAt(i + e.length);
152
- return t && t !== "/" ? "/([^\\/]*)" : "(?:/([^\\/]*))?";
153
- }
154
- return "/([^\\/]+)";
155
- }).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
156
- return e.endsWith("*") ? (r.push({ paramName: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), r];
157
- }
158
- function ee(e) {
159
- try {
160
- return e.split("/").map((e) => decodeURIComponent(e).replace(/\//g, "%2F")).join("/");
161
- } catch (t) {
162
- return a(!1, `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}).`), e;
163
- }
164
- }
165
- function D(e, t) {
166
- if (t === "/") return e;
167
- if (!e.toLowerCase().startsWith(t.toLowerCase())) return null;
168
- let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
169
- return r && r !== "/" ? null : e.slice(n) || "/";
170
- }
171
- function te(e, t = "/") {
172
- let { pathname: n, search: r = "", hash: i = "" } = typeof e == "string" ? s(e) : e, a;
173
- return n ? (n = ae(n), a = n.startsWith("/") || n.startsWith("\\") ? O(n.substring(1), "/") : O(n, t)) : a = t, {
174
- pathname: a,
175
- search: se(r),
176
- hash: ce(i)
177
- };
178
- }
179
- function O(e, t) {
180
- let n = j(t).split("/");
181
- return e.split("/").forEach((e) => {
182
- e === ".." ? n.length > 1 && n.pop() : e !== "." && n.push(e);
183
- }), n.length > 1 ? n.join("/") : "/";
184
- }
185
- function k(e, t, n, r) {
186
- return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. 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.`;
187
- }
188
- function ne(e) {
189
- return e.filter((e, t) => t === 0 || e.route.path && e.route.path.length > 0);
190
- }
191
- function re(e) {
192
- let t = ne(e);
193
- return t.map((e, n) => n === t.length - 1 ? e.pathname : e.pathnameBase);
194
- }
195
- function ie(e, t, n, r = !1) {
196
- let a;
197
- typeof e == "string" ? a = s(e) : (a = { ...e }, i(!a.pathname || !a.pathname.includes("?"), k("?", "pathname", "search", a)), i(!a.pathname || !a.pathname.includes("#"), k("#", "pathname", "hash", a)), i(!a.search || !a.search.includes("#"), k("#", "search", "hash", a)));
198
- let o = e === "" || a.pathname === "", c = o ? "/" : a.pathname, l;
199
- if (c == null) l = n;
200
- else {
201
- let e = t.length - 1;
202
- if (!r && c.startsWith("..")) {
203
- let t = c.split("/");
204
- for (; t[0] === "..";) t.shift(), --e;
205
- a.pathname = t.join("/");
206
- }
207
- l = e >= 0 ? t[e] : "/";
208
- }
209
- let u = te(a, l), d = c && c !== "/" && c.endsWith("/"), f = (o || c === ".") && n.endsWith("/");
210
- return !u.pathname.endsWith("/") && (d || f) && (u.pathname += "/"), u;
211
- }
212
- var ae = (e) => e.replace(/[\\/]{2,}/g, "/"), A = (e) => ae(e.join("/"));
213
- function j(e, t = 0) {
214
- let n = e.length;
215
- for (; n > t && e.charCodeAt(n - 1) === 47;) n--;
216
- return n === e.length ? e : e.slice(0, n);
217
- }
218
- var oe = (e) => j(e).replace(/^\/*/, "/"), se = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, ce = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, le = class {
219
- constructor(e, t, n, r = !1) {
220
- this.status = e, this.statusText = t || "", this.internal = r, n instanceof Error ? (this.data = n.toString(), this.error = n) : this.data = n;
221
- }
222
- };
223
- function ue(e) {
224
- return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
225
- }
226
- function de(e) {
227
- return A(e.map((e) => e.route.path).filter(Boolean)) || "/";
228
- }
229
- var fe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
230
- function pe(e, i) {
231
- let o = e;
232
- if (typeof o != "string" || !t.test(o)) return {
233
- absoluteURL: void 0,
234
- isExternal: !1,
235
- to: o
236
- };
237
- let s = o, c = !1;
238
- if (fe) try {
239
- let e = new URL(window.location.href), t = n.test(o) ? new URL(r(o, e.protocol)) : new URL(o), a = D(t.pathname, i);
240
- t.origin === e.origin && a != null ? o = a + t.search + t.hash : c = !0;
241
- } catch {
242
- a(!1, `<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);
243
- }
244
- return {
245
- absoluteURL: s,
246
- isExternal: c,
247
- to: o
248
- };
249
- }
250
- Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
251
- var me = new URL("http://localhost");
252
- function he(e) {
253
- if (e.createURL) return e.createURL("/");
254
- try {
255
- return new URL(e.createHref("/"), me);
256
- } catch {
257
- return me;
258
- }
259
- }
260
- function M(e, t) {
261
- return e.origin === t.origin && (e.origin !== "null" || e.protocol === t.protocol && e.host === t.host);
262
- }
263
- function ge(e, t) {
264
- if (e.startsWith("//")) return !0;
265
- let n = t.protocol.toLowerCase();
266
- return e.toLowerCase().startsWith(n) ? t.host === "" || e.slice(n.length).startsWith("//") : !1;
267
- }
268
- function _e(e, t, n, r) {
269
- let i = null;
270
- try {
271
- i = e == null ? null : new URL(e, n);
272
- } catch {}
273
- let a = new URL(t, n), o = i != null && !M(i, n), s = !M(a, n);
274
- if (r === "reject") {
275
- if (o || s) throw Error("External navigation is not allowed");
276
- } else if (s && (i == null || !ge(e, i) || !M(i, a))) throw Error("External navigation is not allowed");
277
- }
278
- var ve = [
279
- "POST",
280
- "PUT",
281
- "PATCH",
282
- "DELETE"
283
- ];
284
- new Set(ve);
285
- var ye = ["GET", ...ve];
286
- new Set(ye);
287
- var be = [
288
- "about:",
289
- "blob:",
290
- "chrome:",
291
- "chrome-untrusted:",
292
- "content:",
293
- "data:",
294
- "devtools:",
295
- "file:",
296
- "filesystem:",
297
- "javascript:"
298
- ];
299
- function xe(e) {
300
- try {
301
- return be.includes(new URL(e).protocol);
302
- } catch {
303
- return !1;
304
- }
305
- }
306
- var N = e.createContext(null);
307
- N.displayName = "DataRouter";
308
- var P = e.createContext(null);
309
- P.displayName = "DataRouterState";
310
- var Se = e.createContext(!1);
311
- function Ce() {
312
- return e.useContext(Se);
313
- }
314
- var we = e.createContext({ isTransitioning: !1 });
315
- we.displayName = "ViewTransition";
316
- var Te = e.createContext(/* @__PURE__ */ new Map());
317
- Te.displayName = "Fetchers";
318
- var Ee = e.createContext(null);
319
- Ee.displayName = "Await";
320
- var F = e.createContext(null);
321
- F.displayName = "Navigation";
322
- var I = e.createContext(null);
323
- I.displayName = "Location";
324
- var L = e.createContext({
325
- outlet: null,
326
- matches: [],
327
- isDataRoute: !1
328
- });
329
- L.displayName = "Route";
330
- var R = e.createContext(null);
331
- R.displayName = "RouteError";
332
- var De = "REACT_ROUTER_ERROR", Oe = "REDIRECT", ke = "ROUTE_ERROR_RESPONSE";
333
- function Ae(e) {
334
- if (e.startsWith(`${De}:${Oe}:{`)) try {
335
- let t = JSON.parse(e.slice(28));
336
- if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean") return t;
337
- } catch {}
338
- }
339
- function je(e) {
340
- if (e.startsWith(`${De}:${ke}:{`)) try {
341
- let t = JSON.parse(e.slice(40));
342
- if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new le(t.status, t.statusText, t.data);
343
- } catch {}
344
- }
345
- function Me(t, { relative: n } = {}) {
346
- i(z(), "useHref() may be used only in the context of a <Router> component.");
347
- let { basename: r, navigator: a } = e.useContext(F), { hash: o, pathname: s, search: c } = V(t, { relative: n }), l = s;
348
- return r !== "/" && (l = s === "/" ? r : A([r, s])), a.createHref({
349
- pathname: l,
350
- search: c,
351
- hash: o
352
- });
353
- }
354
- function z() {
355
- return e.useContext(I) != null;
356
- }
357
- function B() {
358
- return i(z(), "useLocation() may be used only in the context of a <Router> component."), e.useContext(I).location;
359
- }
360
- var Ne = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
361
- function Pe(t) {
362
- e.useContext(F).static || e.useLayoutEffect(t);
363
- }
364
- function Fe() {
365
- let { isDataRoute: t } = e.useContext(L);
366
- return t ? Xe() : Ie();
367
- }
368
- function Ie() {
369
- i(z(), "useNavigate() may be used only in the context of a <Router> component.");
370
- let t = e.useContext(N), { basename: n, navigator: r } = e.useContext(F), { matches: s } = e.useContext(L), { pathname: c } = B(), l = JSON.stringify(re(s)), u = e.useRef(!1);
371
- return Pe(() => {
372
- u.current = !0;
373
- }), e.useCallback((e, i = {}) => {
374
- if (a(u.current, Ne), !u.current) return;
375
- if (typeof e == "number") {
376
- r.go(e);
377
- return;
378
- }
379
- let s = ie(e, JSON.parse(l), c, i.relative === "path");
380
- t == null && n !== "/" && (s.pathname = s.pathname === "/" ? n : A([n, s.pathname])), _e(typeof e == "string" ? e : o(e), r.createHref(s), he(r), "reject"), (i.replace ? r.replace : r.push)(s, i.state, i);
381
- }, [
382
- n,
383
- r,
384
- l,
385
- c,
386
- t
387
- ]);
388
- }
389
- e.createContext(null);
390
- function Le() {
391
- let { matches: t } = e.useContext(L);
392
- return t[t.length - 1]?.params ?? {};
393
- }
394
- function V(t, { relative: n } = {}) {
395
- let { matches: r } = e.useContext(L), { pathname: i } = B(), a = JSON.stringify(re(r));
396
- return e.useMemo(() => ie(t, JSON.parse(a), i, n === "path"), [
397
- t,
398
- a,
399
- i,
400
- n
401
- ]);
402
- }
403
- function Re(t, n, r) {
404
- i(z(), "useRoutes() may be used only in the context of a <Router> component.");
405
- let { navigator: o } = e.useContext(F), { matches: l } = e.useContext(L), u = l[l.length - 1], d = u ? u.params : {}, f = u ? u.pathname : "/", p = u ? u.pathnameBase : "/", m = u && u.route;
406
- {
407
- let e = m && m.path || "";
408
- Qe(f, !m || e.endsWith("*") || e.endsWith("*?"), `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${e}">) 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.
409
-
410
- Please change the parent <Route path="${e}"> to <Route path="${e === "/" ? "*" : `${e}/*`}">.`);
411
- }
412
- let h = B(), g;
413
- if (n) {
414
- let e = typeof n == "string" ? s(n) : n;
415
- i(p === "/" || e.pathname?.startsWith(p), `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${e.pathname}" was given in the \`location\` prop.`), g = e;
416
- } else g = h;
417
- let _ = g.pathname || "/", v = _;
418
- if (p !== "/") {
419
- let e = p.replace(/^\//, "").split("/");
420
- v = "/" + _.replace(/^\//, "").split("/").slice(e.length).join("/");
421
- }
422
- let y = r && r.state.matches.length ? r.state.matches.map((e) => Object.assign(e, { route: r.manifest[e.route.id] || e.route })) : c(t, { pathname: v });
423
- a(m || y != null, `No routes matched location "${g.pathname}${g.search}${g.hash}" `), a(y == null || y[y.length - 1].route.element !== void 0 || y[y.length - 1].route.Component !== void 0 || y[y.length - 1].route.lazy !== void 0, `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.`);
424
- let b = We(y && y.map((e) => Object.assign({}, e, {
425
- params: Object.assign({}, d, e.params),
426
- pathname: A([p, o.encodeLocation ? o.encodeLocation(e.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathname]),
427
- pathnameBase: e.pathnameBase === "/" ? p : A([p, o.encodeLocation ? o.encodeLocation(e.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathnameBase])
428
- })), l, r);
429
- return n && b ? /* @__PURE__ */ e.createElement(I.Provider, { value: {
430
- location: {
431
- pathname: "/",
432
- search: "",
433
- hash: "",
434
- state: null,
435
- key: "default",
436
- mask: void 0,
437
- ...g
438
- },
439
- navigationType: "POP"
440
- } }, b) : b;
441
- }
442
- function ze() {
443
- let t = Ye(), n = ue(t) ? `${t.status} ${t.statusText}` : t instanceof Error ? t.message : JSON.stringify(t), r = t instanceof Error ? t.stack : null, i = "rgba(200,200,200, 0.5)", a = {
444
- padding: "0.5rem",
445
- backgroundColor: i
446
- }, o = {
447
- padding: "2px 4px",
448
- backgroundColor: i
449
- }, s = null;
450
- return console.error("Error handled by React Router default ErrorBoundary:", t), s = /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ e.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ e.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ e.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ e.createElement("h3", { style: { fontStyle: "italic" } }, n), r ? /* @__PURE__ */ e.createElement("pre", { style: a }, r) : null, s);
451
- }
452
- var Be = /* @__PURE__ */ e.createElement(ze, null), Ve = class extends e.Component {
453
- constructor(e) {
454
- super(e), this.state = {
455
- location: e.location,
456
- revalidation: e.revalidation,
457
- error: e.error
458
- };
459
- }
460
- static getDerivedStateFromError(e) {
461
- return { error: e };
462
- }
463
- static getDerivedStateFromProps(e, t) {
464
- return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
465
- error: e.error,
466
- location: e.location,
467
- revalidation: e.revalidation
468
- } : {
469
- error: e.error === void 0 ? t.error : e.error,
470
- location: t.location,
471
- revalidation: e.revalidation || t.revalidation
472
- };
473
- }
474
- componentDidCatch(e, t) {
475
- this.props.onError ? this.props.onError(e, t) : console.error("React Router caught the following error during render", e);
476
- }
477
- render() {
478
- let t = this.state.error;
479
- if (this.context && typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
480
- let e = je(t.digest);
481
- e && (t = e);
482
- }
483
- let n = t === void 0 ? this.props.children : /* @__PURE__ */ e.createElement(L.Provider, { value: this.props.routeContext }, /* @__PURE__ */ e.createElement(R.Provider, {
484
- value: t,
485
- children: this.props.component
486
- }));
487
- return this.context ? /* @__PURE__ */ e.createElement(He, { error: t }, n) : n;
488
- }
489
- };
490
- Ve.contextType = Se;
491
- var H = /* @__PURE__ */ new WeakMap();
492
- function He({ children: t, error: n }) {
493
- let { basename: r, navigator: i } = e.useContext(F);
494
- if (typeof n == "object" && n && "digest" in n && typeof n.digest == "string") {
495
- let t = Ae(n.digest);
496
- if (t) {
497
- let a = H.get(n);
498
- if (a) throw a;
499
- let o = pe(t.location, r), s = o.absoluteURL || o.to;
500
- if (_e(t.location, s, he(i), "allow-explicit"), xe(s)) throw Error("Invalid redirect location");
501
- if (fe && !H.get(n)) {
502
- if (o.isExternal || t.reloadDocument) window.location.href = s;
503
- else {
504
- let e = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(o.to, { replace: t.replace }));
505
- throw H.set(n, e), e;
506
- }
507
- }
508
- return /* @__PURE__ */ e.createElement("meta", {
509
- httpEquiv: "refresh",
510
- content: `0;url=${s}`
511
- });
512
- }
513
- }
514
- return t;
515
- }
516
- function Ue({ routeContext: t, match: n, children: r }) {
517
- let i = e.useContext(N);
518
- return i && i.static && i.staticContext && (n.route.errorElement || n.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = n.route.id), /* @__PURE__ */ e.createElement(L.Provider, { value: t }, r);
519
- }
520
- function We(t, n = [], r) {
521
- let a = r?.state;
522
- if (t == null) {
523
- if (!a) return null;
524
- if (a.errors) t = a.matches;
525
- else if (n.length === 0 && !a.initialized && a.matches.length > 0) t = a.matches;
526
- else return null;
527
- }
528
- let o = t, s = a?.errors;
529
- if (s != null) {
530
- let e = o.findIndex((e) => e.route.id && s?.[e.route.id] !== void 0);
531
- i(e >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`), o = o.slice(0, Math.min(o.length, e + 1));
532
- }
533
- let c = !1, l = -1;
534
- if (r && a) {
535
- c = a.renderFallback;
536
- for (let e = 0; e < o.length; e++) {
537
- let t = o[e];
538
- if ((t.route.HydrateFallback || t.route.hydrateFallbackElement) && (l = e), t.route.id) {
539
- let { loaderData: e, errors: n } = a, i = t.route.loader && !e.hasOwnProperty(t.route.id) && (!n || n[t.route.id] === void 0);
540
- if (t.route.lazy || i) {
541
- r.isStatic && (c = !0), o = l >= 0 ? o.slice(0, l + 1) : [o[0]];
542
- break;
543
- }
544
- }
545
- }
546
- }
547
- let u = r?.onError, d = a && u ? (e, t) => {
548
- u(e, {
549
- location: a.location,
550
- params: a.matches?.[0]?.params ?? {},
551
- pattern: de(a.matches),
552
- errorInfo: t
553
- });
554
- } : void 0;
555
- return o.reduceRight((t, r, i) => {
556
- let u, f = !1, p = null, m = null;
557
- a && (u = s && r.route.id ? s[r.route.id] : void 0, p = r.route.errorElement || Be, c && (l < 0 && i === 0 ? (Qe("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), f = !0, m = null) : l === i && (f = !0, m = r.route.hydrateFallbackElement || null)));
558
- let h = n.concat(o.slice(0, i + 1)), g = () => {
559
- let n;
560
- return n = u ? p : f ? m : r.route.Component ? /* @__PURE__ */ e.createElement(r.route.Component, null) : r.route.element ? r.route.element : t, /* @__PURE__ */ e.createElement(Ue, {
561
- match: r,
562
- routeContext: {
563
- outlet: t,
564
- matches: h,
565
- isDataRoute: a != null
566
- },
567
- children: n
568
- });
569
- };
570
- return a && (r.route.ErrorBoundary || r.route.errorElement || i === 0) ? /* @__PURE__ */ e.createElement(Ve, {
571
- location: a.location,
572
- revalidation: a.revalidation,
573
- component: p,
574
- error: u,
575
- children: g(),
576
- routeContext: {
577
- outlet: null,
578
- matches: h,
579
- isDataRoute: !0
580
- },
581
- onError: d
582
- }) : g();
583
- }, null);
584
- }
585
- function U(e) {
586
- return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
587
- }
588
- function Ge(t) {
589
- let n = e.useContext(N);
590
- return i(n, U(t)), n;
591
- }
592
- function Ke(t) {
593
- let n = e.useContext(P);
594
- return i(n, U(t)), n;
595
- }
596
- function qe(t) {
597
- let n = e.useContext(L);
598
- return i(n, U(t)), n;
599
- }
600
- function W(e) {
601
- let t = qe(e), n = t.matches[t.matches.length - 1];
602
- return i(n.route.id, `${e} can only be used on routes that contain a unique "id"`), n.route.id;
603
- }
604
- function Je() {
605
- return W("useRouteId");
606
- }
607
- function Ye() {
608
- let t = e.useContext(R), n = Ke("useRouteError"), r = W("useRouteError");
609
- return t === void 0 ? n.errors?.[r] : t;
610
- }
611
- function Xe() {
612
- let { router: t } = Ge("useNavigate"), n = W("useNavigate"), r = e.useRef(!1);
613
- return Pe(() => {
614
- r.current = !0;
615
- }), e.useCallback(async (e, i = {}) => {
616
- a(r.current, Ne), r.current && (typeof e == "number" ? await t.navigate(e) : await t.navigate(e, {
617
- fromRouteId: n,
618
- ...i
619
- }));
620
- }, [t, n]);
621
- }
622
- var Ze = {};
623
- function Qe(e, t, n) {
624
- !t && !Ze[e] && (Ze[e] = !0, a(!1, n));
625
- }
626
- e.memo($e);
627
- function $e({ routes: e, manifest: t, future: n, state: r, isStatic: i, onError: a }) {
628
- return Re(e, void 0, {
629
- manifest: t,
630
- state: r,
631
- isStatic: i,
632
- onError: a,
633
- future: n
634
- });
635
- }
636
- e.Component;
637
- var G = "get", K = "application/x-www-form-urlencoded";
638
- function q(e) {
639
- return typeof HTMLElement < "u" && e instanceof HTMLElement;
640
- }
641
- function et(e) {
642
- return q(e) && e.tagName.toLowerCase() === "button";
643
- }
644
- function tt(e) {
645
- return q(e) && e.tagName.toLowerCase() === "form";
646
- }
647
- function nt(e) {
648
- return q(e) && e.tagName.toLowerCase() === "input";
649
- }
650
- function rt(e) {
651
- return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
652
- }
653
- function it(e, t) {
654
- return e.button === 0 && (!t || t === "_self") && !rt(e);
655
- }
656
- var J = null;
657
- function at() {
658
- if (J === null) try {
659
- new FormData(document.createElement("form"), 0), J = !1;
660
- } catch {
661
- J = !0;
662
- }
663
- return J;
664
- }
665
- var ot = /* @__PURE__ */ new Set([
666
- "application/x-www-form-urlencoded",
667
- "multipart/form-data",
668
- "text/plain"
669
- ]);
670
- function Y(e) {
671
- return e != null && !ot.has(e) ? (a(!1, `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${K}"`), null) : e;
672
- }
673
- function st(e, t) {
674
- let n, r, i, a, o;
675
- if (tt(e)) {
676
- let o = e.getAttribute("action");
677
- r = o ? D(o, t) : null, n = e.getAttribute("method") || G, i = Y(e.getAttribute("enctype")) || K, a = new FormData(e);
678
- } else if (et(e) || nt(e) && (e.type === "submit" || e.type === "image")) {
679
- let o = e.form;
680
- if (o == null) throw Error("Cannot submit a <button> or <input type=\"submit\"> without a <form>");
681
- let s = e.getAttribute("formaction") || o.getAttribute("action");
682
- if (r = s ? D(s, t) : null, n = e.getAttribute("formmethod") || o.getAttribute("method") || G, i = Y(e.getAttribute("formenctype")) || Y(o.getAttribute("enctype")) || K, a = new FormData(o, e), !at()) {
683
- let { name: t, type: n, value: r } = e;
684
- if (n === "image") {
685
- let e = t ? `${t}.` : "";
686
- a.append(`${e}x`, "0"), a.append(`${e}y`, "0");
687
- } else t && a.append(t, r);
688
- }
689
- } else if (q(e)) throw Error("Cannot submit element that is not <form>, <button>, or <input type=\"submit|image\">");
690
- else n = G, r = null, i = K, o = e;
691
- return a && i === "text/plain" && (o = a, a = void 0), {
692
- action: r,
693
- method: n.toLowerCase(),
694
- encType: i,
695
- formData: a,
696
- body: o
697
- };
698
- }
699
- Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
700
- function X(e, t) {
701
- if (e === !1 || e == null) throw Error(t);
702
- }
703
- function ct(e, t, n, r) {
704
- let i = typeof e == "string" ? new URL(e, typeof window > "u" ? "server://singlefetch/" : window.location.origin) : e;
705
- return i.pathname = n ? i.pathname.endsWith("/") ? `${i.pathname}_.${r}` : `${i.pathname}.${r}` : i.pathname === "/" ? `_root.${r}` : t && D(i.pathname, t) === "/" ? `${j(t)}/_root.${r}` : `${j(i.pathname)}.${r}`, i;
706
- }
707
- async function lt(e, t) {
708
- if (e.id in t) return t[e.id];
709
- try {
710
- let n = await import(
711
- /* @vite-ignore */
712
- /* webpackIgnore: true */
713
- e.module
714
- );
715
- return t[e.id] = n, n;
716
- } catch (t) {
717
- return console.error(`Error loading route module \`${e.module}\`, reloading page...`), console.error(t), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {});
718
- }
719
- }
720
- function ut(e) {
721
- return e != null && typeof e.page == "string";
722
- }
723
- function dt(e) {
724
- 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";
725
- }
726
- async function ft(e, t, n) {
727
- return _t((await Promise.all(e.map(async (e) => {
728
- let r = t.routes[e.route.id];
729
- if (r) {
730
- let e = await lt(r, n);
731
- return e.links ? e.links() : [];
732
- }
733
- return [];
734
- }))).flat(1).filter(dt).filter((e) => e.rel === "stylesheet" || e.rel === "preload").map((e) => e.rel === "stylesheet" ? {
735
- ...e,
736
- rel: "prefetch",
737
- as: "style"
738
- } : {
739
- ...e,
740
- rel: "prefetch"
741
- }));
742
- }
743
- function pt(e, t, n, r, i, a) {
744
- let o = (e, t) => !n[t] || e.route.id !== n[t].route.id, s = (e, t) => n[t].pathname !== e.pathname || n[t].route.path?.endsWith("*") && n[t].params["*"] !== e.params["*"];
745
- return a === "assets" ? t.filter((e, t) => o(e, t) || s(e, t)) : a === "data" ? t.filter((t, a) => {
746
- let c = r.routes[t.route.id];
747
- if (!c || !c.hasLoader) return !1;
748
- if (o(t, a) || s(t, a)) return !0;
749
- if (t.route.shouldRevalidate) {
750
- let r = t.route.shouldRevalidate({
751
- currentUrl: new URL(i.pathname + i.search + i.hash, window.origin),
752
- currentParams: n[0]?.params || {},
753
- nextUrl: new URL(e, window.origin),
754
- nextParams: t.params,
755
- defaultShouldRevalidate: !0
756
- });
757
- if (typeof r == "boolean") return r;
758
- }
759
- return !0;
760
- }) : [];
761
- }
762
- function mt(e, t, { includeHydrateFallback: n } = {}) {
763
- return ht(e.map((e) => {
764
- let r = t.routes[e.route.id];
765
- if (!r) return [];
766
- let i = [r.module];
767
- 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;
768
- }).flat(1));
769
- }
770
- function ht(e) {
771
- return [...new Set(e)];
772
- }
773
- function gt(e) {
774
- let t = {}, n = Object.keys(e).sort();
775
- for (let r of n) t[r] = e[r];
776
- return t;
777
- }
778
- function _t(e, t) {
779
- let n = /* @__PURE__ */ new Set(), r = new Set(t);
780
- return e.reduce((e, i) => {
781
- if (t && !ut(i) && i.as === "script" && i.href && r.has(i.href)) return e;
782
- let a = JSON.stringify(gt(i));
783
- return n.has(a) || (n.add(a), e.push({
784
- key: a,
785
- link: i
786
- })), e;
787
- }, []);
788
- }
789
- function Z() {
790
- let t = e.useContext(N);
791
- return X(t, "You must render this element inside a <DataRouterContext.Provider> element"), t;
792
- }
793
- function vt() {
794
- let t = e.useContext(P);
795
- return X(t, "You must render this element inside a <DataRouterStateContext.Provider> element"), t;
796
- }
797
- var yt = e.createContext(void 0);
798
- yt.displayName = "FrameworkContext";
799
- function Q() {
800
- let t = e.useContext(yt);
801
- return X(t, "You must render this element inside a <HydratedRouter> element"), t;
802
- }
803
- function bt(t, n) {
804
- let r = e.useContext(yt), [i, a] = e.useState(!1), [o, s] = e.useState(!1), { onFocus: c, onBlur: l, onMouseEnter: u, onMouseLeave: d, onTouchStart: f } = n, p = e.useRef(null);
805
- e.useEffect(() => {
806
- if (t === "render" && s(!0), t === "viewport") {
807
- let e = new IntersectionObserver((e) => {
808
- e.forEach((e) => {
809
- s(e.isIntersecting);
810
- });
811
- }, { threshold: .5 });
812
- return p.current && e.observe(p.current), () => {
813
- e.disconnect();
814
- };
815
- }
816
- }, [t]), e.useEffect(() => {
817
- if (i) {
818
- let e = setTimeout(() => {
819
- s(!0);
820
- }, 100);
821
- return () => {
822
- clearTimeout(e);
823
- };
824
- }
825
- }, [i]);
826
- let m = () => {
827
- a(!0);
828
- }, h = () => {
829
- a(!1), s(!1);
830
- };
831
- return r ? t === "intent" ? [
832
- o,
833
- p,
834
- {
835
- onFocus: $(c, m),
836
- onBlur: $(l, h),
837
- onMouseEnter: $(u, m),
838
- onMouseLeave: $(d, h),
839
- onTouchStart: $(f, m)
840
- }
841
- ] : [
842
- o,
843
- p,
844
- {}
845
- ] : [
846
- !1,
847
- p,
848
- {}
849
- ];
850
- }
851
- function $(e, t) {
852
- return (n) => {
853
- e && e(n), n.defaultPrevented || t(n);
854
- };
855
- }
856
- function xt({ page: t, ...n }) {
857
- let r = Ce(), { nonce: i } = Q(), { router: a } = Z(), o = e.useMemo(() => c(a.routes, t, a.basename), [
858
- a.routes,
859
- t,
860
- a.basename
861
- ]);
862
- return o ? (n.nonce == null && i && (n = {
863
- ...n,
864
- nonce: i
865
- }), r ? /* @__PURE__ */ e.createElement(Ct, {
866
- page: t,
867
- matches: o,
868
- ...n
869
- }) : /* @__PURE__ */ e.createElement(wt, {
870
- page: t,
871
- matches: o,
872
- ...n
873
- })) : null;
874
- }
875
- function St(t) {
876
- let { manifest: n, routeModules: r } = Q(), [i, a] = e.useState([]);
877
- return e.useEffect(() => {
878
- let e = !1;
879
- return ft(t, n, r).then((t) => {
880
- e || a(t);
881
- }), () => {
882
- e = !0;
883
- };
884
- }, [
885
- t,
886
- n,
887
- r
888
- ]), i;
889
- }
890
- function Ct({ page: t, matches: n, ...r }) {
891
- let i = B(), { future: a } = Q(), { basename: o } = Z(), s = e.useMemo(() => {
892
- if (t === i.pathname + i.search + i.hash) return [];
893
- let e = ct(t, o, a.v8_trailingSlashAwareDataRequests, "rsc"), r = !1, s = [];
894
- for (let e of n) typeof e.route.shouldRevalidate == "function" ? r = !0 : s.push(e.route.id);
895
- return r && s.length > 0 && e.searchParams.set("_routes", s.join(",")), [e.pathname + e.search];
896
- }, [
897
- o,
898
- a.v8_trailingSlashAwareDataRequests,
899
- t,
900
- i,
901
- n
902
- ]);
903
- return /* @__PURE__ */ e.createElement(e.Fragment, null, s.map((t) => /* @__PURE__ */ e.createElement("link", {
904
- key: t,
905
- rel: "prefetch",
906
- as: "fetch",
907
- href: t,
908
- ...r
909
- })));
910
- }
911
- function wt({ page: t, matches: n, ...r }) {
912
- let i = B(), { future: a, manifest: o, routeModules: s } = Q(), { basename: c } = Z(), { loaderData: l, matches: u } = vt(), d = e.useMemo(() => pt(t, n, u, o, i, "data"), [
913
- t,
914
- n,
915
- u,
916
- o,
917
- i
918
- ]), f = e.useMemo(() => pt(t, n, u, o, i, "assets"), [
919
- t,
920
- n,
921
- u,
922
- o,
923
- i
924
- ]), p = e.useMemo(() => {
925
- if (t === i.pathname + i.search + i.hash) return [];
926
- let e = /* @__PURE__ */ new Set(), r = !1;
927
- if (n.forEach((t) => {
928
- let n = o.routes[t.route.id];
929
- !n || !n.hasLoader || (!d.some((e) => e.route.id === t.route.id) && t.route.id in l && s[t.route.id]?.shouldRevalidate || n.hasClientLoader ? r = !0 : e.add(t.route.id));
930
- }), e.size === 0) return [];
931
- let u = ct(t, c, a.v8_trailingSlashAwareDataRequests, "data");
932
- return r && e.size > 0 && u.searchParams.set("_routes", n.filter((t) => e.has(t.route.id)).map((e) => e.route.id).join(",")), [u.pathname + u.search];
933
- }, [
934
- c,
935
- a.v8_trailingSlashAwareDataRequests,
936
- l,
937
- i,
938
- o,
939
- d,
940
- n,
941
- t,
942
- s
943
- ]), m = e.useMemo(() => mt(f, o), [f, o]), h = St(f);
944
- return /* @__PURE__ */ e.createElement(e.Fragment, null, p.map((t) => /* @__PURE__ */ e.createElement("link", {
945
- key: t,
946
- rel: "prefetch",
947
- as: "fetch",
948
- href: t,
949
- ...r
950
- })), m.map((t) => /* @__PURE__ */ e.createElement("link", {
951
- key: t,
952
- rel: "modulepreload",
953
- href: t,
954
- ...r
955
- })), h.map(({ key: t, link: n }) => /* @__PURE__ */ e.createElement("link", {
956
- key: t,
957
- nonce: r.nonce,
958
- ...n,
959
- crossOrigin: n.crossOrigin ?? r.crossOrigin
960
- })));
961
- }
962
- function Tt(...e) {
963
- return (t) => {
964
- e.forEach((e) => {
965
- typeof e == "function" ? e(t) : e != null && (e.current = t);
966
- });
967
- };
968
- }
969
- e.Component;
970
- var Et = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
971
- try {
972
- Et && (window.__reactRouterVersion = "7.18.4");
973
- } catch {}
974
- var Dt = e.forwardRef(function({ onClick: n, discover: r = "render", prefetch: i = "none", relative: a, reloadDocument: o, replace: s, mask: c, state: l, target: u, to: d, preventScrollReset: f, viewTransition: p, defaultShouldRevalidate: m, ...h }, g) {
975
- let { basename: _, navigator: v, useTransitions: y } = e.useContext(F), b = typeof d == "string" && t.test(d), x = pe(d, _);
976
- d = x.to;
977
- let S = Me(d, { relative: a }), C = B(), w = null;
978
- if (c) {
979
- let e = ie(c, [], C.mask ? C.mask.pathname : "/", !0);
980
- _ !== "/" && (e.pathname = e.pathname === "/" ? _ : A([_, e.pathname])), w = v.createHref(e);
981
- }
982
- let [T, E, ee] = bt(i, h), D = Mt(d, {
983
- replace: s,
984
- mask: c,
985
- state: l,
986
- target: u,
987
- preventScrollReset: f,
988
- relative: a,
989
- viewTransition: p,
990
- defaultShouldRevalidate: m,
991
- useTransitions: y
992
- });
993
- function te(e) {
994
- n && n(e), e.defaultPrevented || D(e);
995
- }
996
- let O = !(x.isExternal || o), k = /* @__PURE__ */ e.createElement("a", {
997
- ...h,
998
- ...ee,
999
- href: (O ? w : void 0) || x.absoluteURL || S,
1000
- onClick: O ? te : n,
1001
- ref: Tt(g, E),
1002
- target: u,
1003
- "data-discover": !b && r === "render" ? "true" : void 0
1004
- });
1005
- return T && !b ? /* @__PURE__ */ e.createElement(e.Fragment, null, k, /* @__PURE__ */ e.createElement(xt, { page: S })) : k;
1006
- });
1007
- Dt.displayName = "Link";
1008
- var Ot = e.forwardRef(function({ "aria-current": t = "page", caseSensitive: n = !1, className: r = "", end: i = !1, style: a, to: o, viewTransition: s, children: c, ...l }, u) {
1009
- let d = V(o, { relative: l.relative }), f = B(), p = e.useContext(P), { navigator: m, basename: h } = e.useContext(F), g = p != null && Lt(d) && s === !0, _ = m.encodeLocation ? m.encodeLocation(d).pathname : d.pathname, v = f.pathname, y = p && p.navigation && p.navigation.location ? p.navigation.location.pathname : null;
1010
- n || (v = v.toLowerCase(), y = y ? y.toLowerCase() : null, _ = _.toLowerCase()), y && h && (y = D(y, h) || y);
1011
- let b = _ !== "/" && _.endsWith("/") ? _.length - 1 : _.length, x = v === _ || !i && v.startsWith(_) && v.charAt(b) === "/", S = y != null && (y === _ || !i && y.startsWith(_) && y.charAt(_.length) === "/"), C = {
1012
- isActive: x,
1013
- isPending: S,
1014
- isTransitioning: g
1015
- }, w = x ? t : void 0, T;
1016
- T = typeof r == "function" ? r(C) : [
1017
- r,
1018
- x ? "active" : null,
1019
- S ? "pending" : null,
1020
- g ? "transitioning" : null
1021
- ].filter(Boolean).join(" ");
1022
- let E = typeof a == "function" ? a(C) : a;
1023
- return /* @__PURE__ */ e.createElement(Dt, {
1024
- ...l,
1025
- "aria-current": w,
1026
- className: T,
1027
- ref: u,
1028
- style: E,
1029
- to: o,
1030
- viewTransition: s
1031
- }, typeof c == "function" ? c(C) : c);
1032
- });
1033
- Ot.displayName = "NavLink";
1034
- var kt = e.forwardRef(({ discover: n = "render", fetcherKey: r, navigate: i, reloadDocument: a, replace: o, state: s, method: c = G, action: l, onSubmit: u, relative: d, preventScrollReset: f, viewTransition: p, defaultShouldRevalidate: m, ...h }, g) => {
1035
- let { useTransitions: _ } = e.useContext(F), v = Ft(), y = It(l, { relative: d }), b = c.toLowerCase() === "get" ? "get" : "post", x = typeof l == "string" && t.test(l);
1036
- return /* @__PURE__ */ e.createElement("form", {
1037
- ref: g,
1038
- method: b,
1039
- action: y,
1040
- onSubmit: a ? u : (t) => {
1041
- if (u && u(t), t.defaultPrevented) return;
1042
- t.preventDefault();
1043
- let n = t.nativeEvent.submitter, a = n?.getAttribute("formmethod") || c, l = () => v(n || t.currentTarget, {
1044
- fetcherKey: r,
1045
- method: a,
1046
- navigate: i,
1047
- replace: o,
1048
- state: s,
1049
- relative: d,
1050
- preventScrollReset: f,
1051
- viewTransition: p,
1052
- defaultShouldRevalidate: m
1053
- });
1054
- _ && i !== !1 ? e.startTransition(() => l()) : l();
1055
- },
1056
- ...h,
1057
- "data-discover": !x && n === "render" ? "true" : void 0
1058
- });
1059
- });
1060
- kt.displayName = "Form";
1061
- function At(e) {
1062
- return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1063
- }
1064
- function jt(t) {
1065
- let n = e.useContext(N);
1066
- return i(n, At(t)), n;
1067
- }
1068
- function Mt(t, { target: n, replace: r, mask: i, state: a, preventScrollReset: s, relative: c, viewTransition: l, defaultShouldRevalidate: u, useTransitions: d } = {}) {
1069
- let f = Fe(), p = B(), m = V(t, { relative: c });
1070
- return e.useCallback((h) => {
1071
- if (it(h, n)) {
1072
- h.preventDefault();
1073
- let n = r === void 0 ? o(p) === o(m) : r, g = () => f(t, {
1074
- replace: n,
1075
- mask: i,
1076
- state: a,
1077
- preventScrollReset: s,
1078
- relative: c,
1079
- viewTransition: l,
1080
- defaultShouldRevalidate: u
1081
- });
1082
- d ? e.startTransition(() => g()) : g();
1083
- }
1084
- }, [
1085
- p,
1086
- f,
1087
- m,
1088
- r,
1089
- i,
1090
- a,
1091
- n,
1092
- t,
1093
- s,
1094
- c,
1095
- l,
1096
- u,
1097
- d
1098
- ]);
1099
- }
1100
- var Nt = 0, Pt = () => `__${String(++Nt)}__`;
1101
- function Ft() {
1102
- let { router: t } = jt("useSubmit"), { basename: n } = e.useContext(F), r = Je(), i = t.fetch, a = t.navigate;
1103
- return e.useCallback(async (e, t = {}) => {
1104
- let { action: o, method: s, encType: c, formData: l, body: u } = st(e, n);
1105
- if (t.navigate === !1) {
1106
- let e = t.fetcherKey || Pt();
1107
- await i(e, r, t.action || o, {
1108
- defaultShouldRevalidate: t.defaultShouldRevalidate,
1109
- preventScrollReset: t.preventScrollReset,
1110
- formData: l,
1111
- body: u,
1112
- formMethod: t.method || s,
1113
- formEncType: t.encType || c,
1114
- flushSync: t.flushSync
1115
- });
1116
- } else await a(t.action || o, {
1117
- defaultShouldRevalidate: t.defaultShouldRevalidate,
1118
- preventScrollReset: t.preventScrollReset,
1119
- formData: l,
1120
- body: u,
1121
- formMethod: t.method || s,
1122
- formEncType: t.encType || c,
1123
- replace: t.replace,
1124
- state: t.state,
1125
- fromRouteId: r,
1126
- flushSync: t.flushSync,
1127
- viewTransition: t.viewTransition
1128
- });
1129
- }, [
1130
- i,
1131
- a,
1132
- n,
1133
- r
1134
- ]);
1135
- }
1136
- function It(t, { relative: n } = {}) {
1137
- let { basename: r } = e.useContext(F), a = e.useContext(L);
1138
- i(a, "useFormAction must be used inside a RouteContext");
1139
- let [s] = a.matches.slice(-1), c = { ...V(t || ".", { relative: n }) }, l = B();
1140
- if (t == null) {
1141
- c.search = l.search;
1142
- let e = new URLSearchParams(c.search), t = e.getAll("index");
1143
- if (t.some((e) => e === "")) {
1144
- e.delete("index"), t.filter((e) => e).forEach((t) => e.append("index", t));
1145
- let n = e.toString();
1146
- c.search = n ? `?${n}` : "";
1147
- }
1148
- }
1149
- return (!t || t === ".") && s.route.index && (c.search = c.search ? c.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (c.pathname = c.pathname === "/" ? r : A([r, c.pathname])), o(c);
1150
- }
1151
- function Lt(t, { relative: n } = {}) {
1152
- let r = e.useContext(we);
1153
- i(r != null, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");
1154
- let { basename: a } = jt("useViewTransitionState"), o = V(t, { relative: n });
1155
- if (!r.isTransitioning) return !1;
1156
- let s = D(r.currentLocation.pathname, a) || r.currentLocation.pathname, c = D(r.nextLocation.pathname, a) || r.nextLocation.pathname;
1157
- return w(o.pathname, c) != null || w(o.pathname, s) != null;
1158
- }
1159
- //#endregion
1160
- export { Le as t };
1161
-
1162
- //# sourceMappingURL=chunk-OB3PAWPO.js.map