@cagatayfdn/flora-components 0.0.138 → 0.0.140

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 (186) hide show
  1. package/dist/Accordion.css +1 -0
  2. package/dist/ActionButton.css +1 -0
  3. package/dist/AlertCard.css +1 -0
  4. package/dist/Autocomplete.css +1 -0
  5. package/dist/Button.css +1 -0
  6. package/dist/Card.css +1 -0
  7. package/dist/Checkbox.css +1 -0
  8. package/dist/Config.css +1 -0
  9. package/dist/Confirm.css +1 -0
  10. package/dist/ContentHeader.css +1 -0
  11. package/dist/Datepicker.css +1 -0
  12. package/dist/Divider.css +1 -0
  13. package/dist/DropdownList.css +1 -0
  14. package/dist/ErrorLogModal.css +1 -0
  15. package/dist/FileUpload.css +1 -0
  16. package/dist/FileUpload.module-BxCEtOHx.js +32 -0
  17. package/dist/Heading.css +1 -0
  18. package/dist/IconBox.css +1 -0
  19. package/dist/InfoBoxList.css +1 -0
  20. package/dist/InfoBoxList.module-BHkAHgos.js +8 -0
  21. package/dist/InfoDate.css +1 -0
  22. package/dist/InfoText.css +1 -0
  23. package/dist/Input.css +1 -0
  24. package/dist/Label.css +1 -0
  25. package/dist/Legends.css +1 -0
  26. package/dist/Loading.css +1 -0
  27. package/dist/MenuItem-Df6Zsa7E.js +53 -0
  28. package/dist/MenuItem.css +1 -0
  29. package/dist/Modal.css +1 -0
  30. package/dist/NoResult.css +1 -0
  31. package/dist/PageWrap.css +1 -0
  32. package/dist/Pager.css +1 -0
  33. package/dist/Panel.css +1 -0
  34. package/dist/Radio.css +1 -0
  35. package/dist/ResultError.css +1 -0
  36. package/dist/ScrollContainer.css +1 -0
  37. package/dist/Select-BE_y91ZN.js +1831 -0
  38. package/dist/Select.css +1 -0
  39. package/dist/Select.module-ByPQ6qr4.js +21 -0
  40. package/dist/StatusTag.css +1 -0
  41. package/dist/StatusTypography.css +1 -0
  42. package/dist/Stepper.css +1 -0
  43. package/dist/Switch.css +1 -0
  44. package/dist/Tab.css +1 -0
  45. package/dist/Table.css +1 -0
  46. package/dist/Table.module-DUqpZOLt.js +29 -0
  47. package/dist/Textarea.css +1 -0
  48. package/dist/Tooltip.css +1 -0
  49. package/dist/Trans-B4ILpbwK.js +343 -0
  50. package/dist/TypographyText.css +1 -0
  51. package/dist/ValidationError.css +1 -0
  52. package/dist/_commonjsHelpers-CT_km90n.js +30 -0
  53. package/dist/_isArray-CBUZFxFA.js +6 -0
  54. package/dist/_isString-BUpNGP_8.js +6 -0
  55. package/dist/_reduce-DsUCMz4O.js +148 -0
  56. package/dist/assets/icons/icons.js +70 -0
  57. package/dist/assets/images/500_error_2x.gif +0 -0
  58. package/dist/assets/images/oms.png +0 -0
  59. package/dist/components/Accordion/Accordion.js +60 -0
  60. package/dist/components/ActionButton/ActionButton.js +54 -0
  61. package/dist/components/AlertCard/AlertCard.js +29 -0
  62. package/dist/components/AuthUserCan/Permission.js +18 -0
  63. package/dist/components/AuthUserCan/index.js +23 -0
  64. package/dist/components/Autocomplete/Autocomplete.js +87 -0
  65. package/dist/components/Button/Button.js +87 -0
  66. package/dist/components/Card/Card.js +21 -0
  67. package/dist/components/Charts/Bar.js +18 -0
  68. package/dist/components/Charts/Legends.js +21 -0
  69. package/dist/components/Charts/Line.js +18 -0
  70. package/dist/components/Charts/Pie.js +43 -0
  71. package/dist/components/Charts/index.js +31 -0
  72. package/dist/components/Charts/types.js +1 -0
  73. package/dist/components/Charts/utils.js +12 -0
  74. package/dist/components/Checkbox/Checkbox.js +68 -0
  75. package/dist/components/Config/Config.js +32 -0
  76. package/dist/components/Confirm/Confirm.js +60 -0
  77. package/dist/components/ContentHeader/ContentHeader.js +75 -0
  78. package/dist/components/ContentLoader/ContentLoader.js +16 -0
  79. package/dist/components/Countdown/Countdown.js +20 -0
  80. package/dist/components/Datepicker/Datepicker.js +1478 -0
  81. package/dist/components/Divider/Divider.js +27 -0
  82. package/dist/components/Drawer/Provider.js +24 -0
  83. package/dist/components/Drawer/index.js +55 -0
  84. package/dist/components/Dropdown/DropdownList.js +90 -0
  85. package/dist/components/ErrorLogModal/ErrorLogModal.js +69 -0
  86. package/dist/components/FileUpload/FileUpload.js +237 -0
  87. package/dist/components/FileUpload/ImagePreview.js +19 -0
  88. package/dist/components/FileUpload/LengthCard.js +6 -0
  89. package/dist/components/FileUpload/PreviewModal.js +53 -0
  90. package/dist/components/Grid/Column.js +29 -0
  91. package/dist/components/Grid/Row.js +6 -0
  92. package/dist/components/Heading/Heading.js +22 -0
  93. package/dist/components/Icon/index.js +24 -0
  94. package/dist/components/IconBox/IconBox.js +13 -0
  95. package/dist/components/InfiniteScroll/InfiniteScroll.js +41 -0
  96. package/dist/components/InfoBoxList/InfoBoxList.js +30 -0
  97. package/dist/components/InfoBoxList/helper.js +83 -0
  98. package/dist/components/InfoDate/InfoDate.js +19 -0
  99. package/dist/components/InfoText/InfoText.js +13 -0
  100. package/dist/components/Input/Input.js +140 -0
  101. package/dist/components/Label/Label.js +22 -0
  102. package/dist/components/Loading/Loading.js +62 -0
  103. package/dist/components/Modal/Modal.js +74 -0
  104. package/dist/components/NavigatorCard/index.js +59 -0
  105. package/dist/components/NoResult/NoResult.js +12 -0
  106. package/dist/components/Notification/Notification.js +26 -0
  107. package/dist/components/PageWrapper/PageWrap.js +46 -0
  108. package/dist/components/Pager/Pager.js +103 -0
  109. package/dist/components/Panel/Panel.js +71 -0
  110. package/dist/components/PermaLink/PermaLink.js +387 -0
  111. package/dist/components/Radio/Radio.js +96 -0
  112. package/dist/components/ResultError/ResultError.js +20 -0
  113. package/dist/components/ScrollContainer/ScrollContainer.js +23 -0
  114. package/dist/components/Select/NoData.js +10 -0
  115. package/dist/components/Select/OptionItem.js +19 -0
  116. package/dist/components/Select/Select.js +13 -0
  117. package/dist/components/Sidebar/MenuItem.js +9 -0
  118. package/dist/components/Sidebar/index.js +137 -0
  119. package/dist/components/StatusTag/StatusTag.js +24 -0
  120. package/dist/components/StatusTypography/StatusTypography.js +51 -0
  121. package/dist/components/Stepper/Stepper.js +75 -0
  122. package/dist/components/Switch/Switch.js +84 -0
  123. package/dist/components/Tab/Tab.js +28 -0
  124. package/dist/components/Table/Table.js +271 -0
  125. package/dist/components/Table/TableHeader.js +137 -0
  126. package/dist/components/Table/TableSort.js +25 -0
  127. package/dist/components/Textarea/Textarea.js +95 -0
  128. package/dist/components/Tooltip/Tooltip.js +1548 -0
  129. package/dist/components/TypographyText/TypographyText.js +91 -0
  130. package/dist/components/ValidationError/ValidationError.js +7 -0
  131. package/dist/components/index.js +133 -0
  132. package/dist/defineProperty-DeKy1XT0.js +37 -0
  133. package/dist/enums/appearance.js +14 -0
  134. package/dist/enums/applicationTypeSlug.js +4 -0
  135. package/dist/enums/index.js +29 -0
  136. package/dist/enums/isActiveColor.js +4 -0
  137. package/dist/enums/size.js +4 -0
  138. package/dist/enums/status.js +11 -0
  139. package/dist/equals-PL9KqVQf.js +119 -0
  140. package/dist/flatpickr-CRz1AV0e.js +59 -0
  141. package/dist/helper-lFjvXQpv.js +1465 -0
  142. package/dist/hooks/index.js +15 -0
  143. package/dist/hooks/useAauth.js +40 -0
  144. package/dist/hooks/useDisclosure.js +14 -0
  145. package/dist/hooks/useDrawer.js +9 -0
  146. package/dist/hooks/useMediaQuery.js +21 -0
  147. package/dist/hooks/useNiceModal.js +13 -0
  148. package/dist/i18nInstance-CiCZbaCK.js +55 -0
  149. package/dist/includes-8YTFrx85.js +46 -0
  150. package/dist/index-9ZLCCecr.js +364 -0
  151. package/dist/index-BHf7G3IG.js +35 -0
  152. package/dist/index-BJU1K2Aw.js +8003 -0
  153. package/dist/index-CB61CB0b.js +669 -0
  154. package/dist/index-H7XbDVmH.js +320 -0
  155. package/dist/index.css +1 -0
  156. package/dist/index.d.mts +1478 -0
  157. package/dist/index.d.ts +1478 -0
  158. package/dist/index.js +203 -0
  159. package/dist/index2.css +1 -0
  160. package/dist/jsx-runtime-BcAkpsdy.js +631 -0
  161. package/dist/keys-B0bo5Q7o.js +67 -0
  162. package/dist/locales/en/index.js +615 -0
  163. package/dist/locales/i18n.js +1417 -0
  164. package/dist/locales/index.js +5 -0
  165. package/dist/locales/tr/index.js +615 -0
  166. package/dist/main.css +1 -0
  167. package/dist/main.js +57 -0
  168. package/dist/prodivers.css +6 -0
  169. package/dist/prodivers.js +13 -0
  170. package/dist/react-content-loader.es-CswLCxkm.js +90 -0
  171. package/dist/react-toastify.esm-BUWNP7Nm.js +808 -0
  172. package/dist/types/common/date.js +1 -0
  173. package/dist/types/common/events.js +1 -0
  174. package/dist/types/common/forms.js +1 -0
  175. package/dist/types/common/option.js +1 -0
  176. package/dist/types/index.js +1 -0
  177. package/dist/useTranslation-CnCPcxVj.js +142 -0
  178. package/dist/utils/date.js +413 -0
  179. package/dist/utils/flatpickr.js +4 -0
  180. package/dist/utils/helper.js +18 -0
  181. package/dist/utils/index.js +27 -0
  182. package/dist/utils/language.js +46 -0
  183. package/dist/utils/table.js +62 -0
  184. package/dist/utils/validation.js +27 -0
  185. package/dist/utils/yup.js +2921 -0
  186. package/package.json +1 -1
@@ -0,0 +1,15 @@
1
+ import { AuthProvider as o, useAuth as t } from "./useAauth.js";
2
+ import { default as a } from "./useDisclosure.js";
3
+ import { default as f } from "./useNiceModal.js";
4
+ import { default as x } from "./useMediaQuery.js";
5
+ import { useDrawerContext as m } from "../components/Drawer/Provider.js";
6
+ import { default as i } from "./useDrawer.js";
7
+ export {
8
+ o as AuthProvider,
9
+ t as useAuth,
10
+ a as useDisclosure,
11
+ i as useDrawer,
12
+ m as useDrawerContext,
13
+ x as useMediaQuery,
14
+ f as useNiceModal
15
+ };
@@ -0,0 +1,40 @@
1
+ import { j as n } from "../jsx-runtime-BcAkpsdy.js";
2
+ import { createContext as o, useReducer as i, useContext as a } from "react";
3
+ const s = {
4
+ user: null,
5
+ status: "pending",
6
+ error: null
7
+ }, r = o(null);
8
+ r.displayName = "AuthContext";
9
+ function c(e, t) {
10
+ switch (t.type) {
11
+ case "login_pending":
12
+ case "register_pending":
13
+ return { ...e, status: "pending" };
14
+ case "active_user_success":
15
+ return { ...e, user: t.payload, status: "success" };
16
+ case "login_failure":
17
+ case "register_failure":
18
+ case "active_user_failure":
19
+ return { ...e, status: "rejected", error: t.payload };
20
+ case "no_active_user":
21
+ return { ...e, status: "idle" };
22
+ case "signout":
23
+ return s;
24
+ default:
25
+ throw new Error();
26
+ }
27
+ }
28
+ const p = (e) => {
29
+ const [t, u] = i(c, s);
30
+ return /* @__PURE__ */ n.jsx(r.Provider, { value: [{ ...t }, u], ...e });
31
+ }, h = () => {
32
+ const e = a(r);
33
+ if (!e)
34
+ throw new Error("useAuth must be used within a AuthProvider");
35
+ return e;
36
+ };
37
+ export {
38
+ p as AuthProvider,
39
+ h as useAuth
40
+ };
@@ -0,0 +1,14 @@
1
+ import { useState as r, useCallback as s } from "react";
2
+ function p(o) {
3
+ const [n, e] = r(!!o), t = s(() => {
4
+ e(!0);
5
+ }, []), u = s(() => {
6
+ e(!1);
7
+ }, []), c = s(() => {
8
+ e((l) => !l);
9
+ }, []);
10
+ return { isOpen: n, setIsOpen: e, onOpen: t, onClose: u, onToggle: c };
11
+ }
12
+ export {
13
+ p as default
14
+ };
@@ -0,0 +1,9 @@
1
+ import { useDrawerContext as t } from "../components/Drawer/Provider.js";
2
+ import { useId as a } from "react";
3
+ function u() {
4
+ const r = a(), { openDrawer: e, closeDrawer: o } = t();
5
+ return [e, o, r];
6
+ }
7
+ export {
8
+ u as default
9
+ };
@@ -0,0 +1,21 @@
1
+ import { useState as h, useEffect as m } from "react";
2
+ const f = ({ query: s, onMatch: n, onUnmatch: c }) => {
3
+ const i = window.matchMedia(s), [r, d] = h(i.matches), t = (e) => {
4
+ e ? n && n() : c && c(), d(e);
5
+ };
6
+ return m(() => {
7
+ const e = window.matchMedia(s);
8
+ return t(e.matches), e.addEventListener && e.addEventListener(
9
+ "change",
10
+ (a) => t(a.matches)
11
+ ), () => {
12
+ e.removeEventListener && e.removeEventListener(
13
+ "change",
14
+ (a) => t(a.matches)
15
+ );
16
+ };
17
+ }, []), r;
18
+ };
19
+ export {
20
+ f as default
21
+ };
@@ -0,0 +1,13 @@
1
+ import { useId as a } from "react";
2
+ import { u as i, N as t } from "../index-H7XbDVmH.js";
3
+ function r(s) {
4
+ const e = a(), o = s || e, d = i(o);
5
+ return [() => {
6
+ d.show({ id: o });
7
+ }, () => {
8
+ t.remove(o);
9
+ }, d.id];
10
+ }
11
+ export {
12
+ r as default
13
+ };
@@ -0,0 +1,55 @@
1
+ const s = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, a = {
2
+ "&": "&",
3
+ "&": "&",
4
+ "&lt;": "<",
5
+ "&#60;": "<",
6
+ "&gt;": ">",
7
+ "&#62;": ">",
8
+ "&apos;": "'",
9
+ "&#39;": "'",
10
+ "&quot;": '"',
11
+ "&#34;": '"',
12
+ "&nbsp;": " ",
13
+ "&#160;": " ",
14
+ "&copy;": "©",
15
+ "&#169;": "©",
16
+ "&reg;": "®",
17
+ "&#174;": "®",
18
+ "&hellip;": "…",
19
+ "&#8230;": "…",
20
+ "&#x2F;": "/",
21
+ "&#47;": "/"
22
+ }, o = (t) => a[t], u = (t) => t.replace(s, o);
23
+ let e = {
24
+ bindI18n: "languageChanged",
25
+ bindI18nStore: "",
26
+ transEmptyNodeValue: "",
27
+ transSupportBasicHtmlNodes: !0,
28
+ transWrapTextNodes: "",
29
+ transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
30
+ useSuspense: !0,
31
+ unescape: u
32
+ };
33
+ function p() {
34
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
35
+ e = {
36
+ ...e,
37
+ ...t
38
+ };
39
+ }
40
+ function r() {
41
+ return e;
42
+ }
43
+ let n;
44
+ function l(t) {
45
+ n = t;
46
+ }
47
+ function i() {
48
+ return n;
49
+ }
50
+ export {
51
+ i as a,
52
+ l as b,
53
+ r as g,
54
+ p as s
55
+ };
@@ -0,0 +1,46 @@
1
+ import { e as t } from "./equals-PL9KqVQf.js";
2
+ import { _ as c } from "./keys-B0bo5Q7o.js";
3
+ function o(n, r, e) {
4
+ var u, f;
5
+ if (typeof n.indexOf == "function")
6
+ switch (typeof r) {
7
+ case "number":
8
+ if (r === 0) {
9
+ for (u = 1 / r; e < n.length; ) {
10
+ if (f = n[e], f === 0 && 1 / f === u)
11
+ return e;
12
+ e += 1;
13
+ }
14
+ return -1;
15
+ } else if (r !== r) {
16
+ for (; e < n.length; ) {
17
+ if (f = n[e], typeof f == "number" && f !== f)
18
+ return e;
19
+ e += 1;
20
+ }
21
+ return -1;
22
+ }
23
+ return n.indexOf(r, e);
24
+ case "string":
25
+ case "boolean":
26
+ case "function":
27
+ case "undefined":
28
+ return n.indexOf(r, e);
29
+ case "object":
30
+ if (r === null)
31
+ return n.indexOf(r, e);
32
+ }
33
+ for (; e < n.length; ) {
34
+ if (t(n[e], r))
35
+ return e;
36
+ e += 1;
37
+ }
38
+ return -1;
39
+ }
40
+ function h(n, r) {
41
+ return o(r, n, 0) >= 0;
42
+ }
43
+ var p = /* @__PURE__ */ c(h);
44
+ export {
45
+ p as i
46
+ };
@@ -0,0 +1,364 @@
1
+ import * as i from "react";
2
+ /**
3
+ * @remix-run/router v1.15.0
4
+ *
5
+ * Copyright (c) Remix Software Inc.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE.md file in the root directory of this source tree.
9
+ *
10
+ * @license MIT
11
+ */
12
+ function x() {
13
+ return x = Object.assign ? Object.assign.bind() : function(e) {
14
+ for (var t = 1; t < arguments.length; t++) {
15
+ var n = arguments[t];
16
+ for (var a in n)
17
+ Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
18
+ }
19
+ return e;
20
+ }, x.apply(this, arguments);
21
+ }
22
+ var P;
23
+ (function(e) {
24
+ e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
25
+ })(P || (P = {}));
26
+ function l(e, t) {
27
+ if (e === !1 || e === null || typeof e > "u")
28
+ throw new Error(t);
29
+ }
30
+ function m(e, t) {
31
+ if (!e) {
32
+ typeof console < "u" && console.warn(t);
33
+ try {
34
+ throw new Error(t);
35
+ } catch {
36
+ }
37
+ }
38
+ }
39
+ function ae(e) {
40
+ let {
41
+ pathname: t = "/",
42
+ search: n = "",
43
+ hash: a = ""
44
+ } = e;
45
+ return n && n !== "?" && (t += n.charAt(0) === "?" ? n : "?" + n), a && a !== "#" && (t += a.charAt(0) === "#" ? a : "#" + a), t;
46
+ }
47
+ function S(e) {
48
+ let t = {};
49
+ if (e) {
50
+ let n = e.indexOf("#");
51
+ n >= 0 && (t.hash = e.substr(n), e = e.substr(0, n));
52
+ let a = e.indexOf("?");
53
+ a >= 0 && (t.search = e.substr(a), e = e.substr(0, a)), e && (t.pathname = e);
54
+ }
55
+ return t;
56
+ }
57
+ var U;
58
+ (function(e) {
59
+ e.data = "data", e.deferred = "deferred", e.redirect = "redirect", e.error = "error";
60
+ })(U || (U = {}));
61
+ function re(e, t) {
62
+ t === void 0 && (t = {});
63
+ let n = e;
64
+ n.endsWith("*") && n !== "*" && !n.endsWith("/*") && (m(!1, 'Route path "' + n + '" will be treated as if it were ' + ('"' + n.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + n.replace(/\*$/, "/*") + '".')), n = n.replace(/\*$/, "/*"));
65
+ const a = n.startsWith("/") ? "/" : "", r = (s) => s == null ? "" : typeof s == "string" ? s : String(s), o = n.split(/\/+/).map((s, u, f) => {
66
+ if (u === f.length - 1 && s === "*")
67
+ return r(t["*"]);
68
+ const h = s.match(/^:([\w-]+)(\??)$/);
69
+ if (h) {
70
+ const [, c, p] = h;
71
+ let N = t[c];
72
+ return l(p === "?" || N != null, 'Missing ":' + c + '" param'), r(N);
73
+ }
74
+ return s.replace(/\?$/g, "");
75
+ }).filter((s) => !!s);
76
+ return a + o.join("/");
77
+ }
78
+ function se(e, t) {
79
+ typeof e == "string" && (e = {
80
+ path: e,
81
+ caseSensitive: !1,
82
+ end: !0
83
+ });
84
+ let [n, a] = J(e.path, e.caseSensitive, e.end), r = t.match(n);
85
+ if (!r)
86
+ return null;
87
+ let o = r[0], s = o.replace(/(.)\/+$/, "$1"), u = r.slice(1);
88
+ return {
89
+ params: a.reduce((d, h, c) => {
90
+ let {
91
+ paramName: p,
92
+ isOptional: N
93
+ } = h;
94
+ if (p === "*") {
95
+ let A = u[c] || "";
96
+ s = o.slice(0, o.length - A.length).replace(/(.)\/+$/, "$1");
97
+ }
98
+ const O = u[c];
99
+ return N && !O ? d[p] = void 0 : d[p] = T(O || "", p), d;
100
+ }, {}),
101
+ pathname: o,
102
+ pathnameBase: s,
103
+ pattern: e
104
+ };
105
+ }
106
+ function J(e, t, n) {
107
+ t === void 0 && (t = !1), n === void 0 && (n = !0), m(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(/\*$/, "/*") + '".'));
108
+ let a = [], r = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (s, u, f) => (a.push({
109
+ paramName: u,
110
+ isOptional: f != null
111
+ }), f ? "/?([^\\/]+)?" : "/([^\\/]+)"));
112
+ return e.endsWith("*") ? (a.push({
113
+ paramName: "*"
114
+ }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? r += "\\/*$" : e !== "" && e !== "/" && (r += "(?:(?=\\/|$))"), [new RegExp(r, t ? void 0 : "i"), a];
115
+ }
116
+ function T(e, t) {
117
+ try {
118
+ return decodeURIComponent(e);
119
+ } catch (n) {
120
+ return m(!1, 'The value for the URL param "' + t + '" will not be decoded because' + (' the string "' + e + '" is a malformed URL segment. This is probably') + (" due to a bad percent encoding (" + n + ").")), e;
121
+ }
122
+ }
123
+ function ie(e, t) {
124
+ if (t === "/")
125
+ return e;
126
+ if (!e.toLowerCase().startsWith(t.toLowerCase()))
127
+ return null;
128
+ let n = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(n);
129
+ return a && a !== "/" ? null : e.slice(n) || "/";
130
+ }
131
+ function q(e, t) {
132
+ t === void 0 && (t = "/");
133
+ let {
134
+ pathname: n,
135
+ search: a = "",
136
+ hash: r = ""
137
+ } = typeof e == "string" ? S(e) : e;
138
+ return {
139
+ pathname: n ? n.startsWith("/") ? n : z(n, t) : t,
140
+ search: Y(a),
141
+ hash: F(r)
142
+ };
143
+ }
144
+ function z(e, t) {
145
+ let n = t.replace(/\/+$/, "").split("/");
146
+ return e.split("/").forEach((r) => {
147
+ r === ".." ? n.length > 1 && n.pop() : r !== "." && n.push(r);
148
+ }), n.length > 1 ? n.join("/") : "/";
149
+ }
150
+ function E(e, t, n, a) {
151
+ return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + t + "` field [" + JSON.stringify(a) + "]. 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.';
152
+ }
153
+ function G(e) {
154
+ return e.filter((t, n) => n === 0 || t.route.path && t.route.path.length > 0);
155
+ }
156
+ function D(e, t) {
157
+ let n = G(e);
158
+ return t ? n.map((a, r) => r === e.length - 1 ? a.pathname : a.pathnameBase) : n.map((a) => a.pathnameBase);
159
+ }
160
+ function $(e, t, n, a) {
161
+ a === void 0 && (a = !1);
162
+ let r;
163
+ typeof e == "string" ? r = S(e) : (r = x({}, e), l(!r.pathname || !r.pathname.includes("?"), E("?", "pathname", "search", r)), l(!r.pathname || !r.pathname.includes("#"), E("#", "pathname", "hash", r)), l(!r.search || !r.search.includes("#"), E("#", "search", "hash", r)));
164
+ let o = e === "" || r.pathname === "", s = o ? "/" : r.pathname, u;
165
+ if (s == null)
166
+ u = n;
167
+ else {
168
+ let c = t.length - 1;
169
+ if (!a && s.startsWith("..")) {
170
+ let p = s.split("/");
171
+ for (; p[0] === ".."; )
172
+ p.shift(), c -= 1;
173
+ r.pathname = p.join("/");
174
+ }
175
+ u = c >= 0 ? t[c] : "/";
176
+ }
177
+ let f = q(r, u), d = s && s !== "/" && s.endsWith("/"), h = (o || s === ".") && n.endsWith("/");
178
+ return !f.pathname.endsWith("/") && (d || h) && (f.pathname += "/"), f;
179
+ }
180
+ const L = (e) => e.join("/").replace(/\/\/+/g, "/"), Y = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, F = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, _ = ["post", "put", "patch", "delete"];
181
+ new Set(_);
182
+ const K = ["get", ..._];
183
+ new Set(K);
184
+ /**
185
+ * React Router v6.22.0
186
+ *
187
+ * Copyright (c) Remix Software Inc.
188
+ *
189
+ * This source code is licensed under the MIT license found in the
190
+ * LICENSE.md file in the root directory of this source tree.
191
+ *
192
+ * @license MIT
193
+ */
194
+ function y() {
195
+ return y = Object.assign ? Object.assign.bind() : function(e) {
196
+ for (var t = 1; t < arguments.length; t++) {
197
+ var n = arguments[t];
198
+ for (var a in n)
199
+ Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
200
+ }
201
+ return e;
202
+ }, y.apply(this, arguments);
203
+ }
204
+ const C = /* @__PURE__ */ i.createContext(null);
205
+ process.env.NODE_ENV !== "production" && (C.displayName = "DataRouter");
206
+ const Q = /* @__PURE__ */ i.createContext(null);
207
+ process.env.NODE_ENV !== "production" && (Q.displayName = "DataRouterState");
208
+ const X = /* @__PURE__ */ i.createContext(null);
209
+ process.env.NODE_ENV !== "production" && (X.displayName = "Await");
210
+ const v = /* @__PURE__ */ i.createContext(null);
211
+ process.env.NODE_ENV !== "production" && (v.displayName = "Navigation");
212
+ const R = /* @__PURE__ */ i.createContext(null);
213
+ process.env.NODE_ENV !== "production" && (R.displayName = "Location");
214
+ const g = /* @__PURE__ */ i.createContext({
215
+ outlet: null,
216
+ matches: [],
217
+ isDataRoute: !1
218
+ });
219
+ process.env.NODE_ENV !== "production" && (g.displayName = "Route");
220
+ const Z = /* @__PURE__ */ i.createContext(null);
221
+ process.env.NODE_ENV !== "production" && (Z.displayName = "RouteError");
222
+ function oe(e, t) {
223
+ let {
224
+ relative: n
225
+ } = t === void 0 ? {} : t;
226
+ b() || (process.env.NODE_ENV !== "production" ? l(
227
+ !1,
228
+ // TODO: This error is probably because they somehow have 2 versions of the
229
+ // router loaded. We can help them understand how to avoid that.
230
+ "useHref() may be used only in the context of a <Router> component."
231
+ ) : l(!1));
232
+ let {
233
+ basename: a,
234
+ navigator: r
235
+ } = i.useContext(v), {
236
+ hash: o,
237
+ pathname: s,
238
+ search: u
239
+ } = H(e, {
240
+ relative: n
241
+ }), f = s;
242
+ return a !== "/" && (f = s === "/" ? a : L([a, s])), r.createHref({
243
+ pathname: f,
244
+ search: u,
245
+ hash: o
246
+ });
247
+ }
248
+ function b() {
249
+ return i.useContext(R) != null;
250
+ }
251
+ function V() {
252
+ return b() || (process.env.NODE_ENV !== "production" ? l(
253
+ !1,
254
+ // TODO: This error is probably because they somehow have 2 versions of the
255
+ // router loaded. We can help them understand how to avoid that.
256
+ "useLocation() may be used only in the context of a <Router> component."
257
+ ) : l(!1)), i.useContext(R).location;
258
+ }
259
+ const W = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
260
+ function I(e) {
261
+ i.useContext(v).static || i.useLayoutEffect(e);
262
+ }
263
+ function ue() {
264
+ let {
265
+ isDataRoute: e
266
+ } = i.useContext(g);
267
+ return e ? ne() : k();
268
+ }
269
+ function k() {
270
+ b() || (process.env.NODE_ENV !== "production" ? l(
271
+ !1,
272
+ // TODO: This error is probably because they somehow have 2 versions of the
273
+ // router loaded. We can help them understand how to avoid that.
274
+ "useNavigate() may be used only in the context of a <Router> component."
275
+ ) : l(!1));
276
+ let e = i.useContext(C), {
277
+ basename: t,
278
+ future: n,
279
+ navigator: a
280
+ } = i.useContext(v), {
281
+ matches: r
282
+ } = i.useContext(g), {
283
+ pathname: o
284
+ } = V(), s = JSON.stringify(D(r, n.v7_relativeSplatPath)), u = i.useRef(!1);
285
+ return I(() => {
286
+ u.current = !0;
287
+ }), i.useCallback(function(d, h) {
288
+ if (h === void 0 && (h = {}), process.env.NODE_ENV !== "production" && m(u.current, W), !u.current)
289
+ return;
290
+ if (typeof d == "number") {
291
+ a.go(d);
292
+ return;
293
+ }
294
+ let c = $(d, JSON.parse(s), o, h.relative === "path");
295
+ e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : L([t, c.pathname])), (h.replace ? a.replace : a.push)(c, h.state, h);
296
+ }, [t, a, s, o, e]);
297
+ }
298
+ function H(e, t) {
299
+ let {
300
+ relative: n
301
+ } = t === void 0 ? {} : t, {
302
+ future: a
303
+ } = i.useContext(v), {
304
+ matches: r
305
+ } = i.useContext(g), {
306
+ pathname: o
307
+ } = V(), s = JSON.stringify(D(r, a.v7_relativeSplatPath));
308
+ return i.useMemo(() => $(e, JSON.parse(s), o, n === "path"), [e, s, o, n]);
309
+ }
310
+ var j = /* @__PURE__ */ function(e) {
311
+ return e.UseBlocker = "useBlocker", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e;
312
+ }(j || {}), w = /* @__PURE__ */ function(e) {
313
+ return e.UseBlocker = "useBlocker", e.UseLoaderData = "useLoaderData", e.UseActionData = "useActionData", e.UseRouteError = "useRouteError", e.UseNavigation = "useNavigation", e.UseRouteLoaderData = "useRouteLoaderData", e.UseMatches = "useMatches", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e.UseRouteId = "useRouteId", e;
314
+ }(w || {});
315
+ function M(e) {
316
+ return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
317
+ }
318
+ function ee(e) {
319
+ let t = i.useContext(C);
320
+ return t || (process.env.NODE_ENV !== "production" ? l(!1, M(e)) : l(!1)), t;
321
+ }
322
+ function te(e) {
323
+ let t = i.useContext(g);
324
+ return t || (process.env.NODE_ENV !== "production" ? l(!1, M(e)) : l(!1)), t;
325
+ }
326
+ function B(e) {
327
+ let t = te(e), n = t.matches[t.matches.length - 1];
328
+ return n.route.id || (process.env.NODE_ENV !== "production" ? l(!1, e + ' can only be used on routes that contain a unique "id"') : l(!1)), n.route.id;
329
+ }
330
+ function le() {
331
+ return B(w.UseRouteId);
332
+ }
333
+ function ne() {
334
+ let {
335
+ router: e
336
+ } = ee(j.UseNavigateStable), t = B(w.UseNavigateStable), n = i.useRef(!1);
337
+ return I(() => {
338
+ n.current = !0;
339
+ }), i.useCallback(function(r, o) {
340
+ o === void 0 && (o = {}), process.env.NODE_ENV !== "production" && m(n.current, W), n.current && (typeof r == "number" ? e.navigate(r) : e.navigate(r, y({
341
+ fromRouteId: t
342
+ }, o)));
343
+ }, [e, t]);
344
+ }
345
+ new Promise(() => {
346
+ });
347
+ export {
348
+ Q as D,
349
+ v as N,
350
+ g as R,
351
+ H as a,
352
+ oe as b,
353
+ C as c,
354
+ ue as d,
355
+ ae as e,
356
+ le as f,
357
+ re as g,
358
+ l as i,
359
+ L as j,
360
+ se as m,
361
+ ie as s,
362
+ V as u,
363
+ m as w
364
+ };
@@ -0,0 +1,35 @@
1
+ import { g as i } from "./_commonjsHelpers-CT_km90n.js";
2
+ var f = { exports: {} };
3
+ /*!
4
+ Copyright (c) 2017 Jed Watson.
5
+ Licensed under the MIT License (MIT), see
6
+ http://jedwatson.github.io/classnames
7
+ */
8
+ (function(o) {
9
+ (function() {
10
+ var c = {}.hasOwnProperty;
11
+ function t() {
12
+ for (var e = [], a = 0; a < arguments.length; a++) {
13
+ var s = arguments[a];
14
+ if (s) {
15
+ var n = typeof s;
16
+ if (n === "string" || n === "number")
17
+ e.push(s);
18
+ else if (Array.isArray(s) && s.length) {
19
+ var l = t.apply(null, s);
20
+ l && e.push(l);
21
+ } else if (n === "object")
22
+ for (var r in s)
23
+ c.call(s, r) && s[r] && e.push(r);
24
+ }
25
+ }
26
+ return e.join(" ");
27
+ }
28
+ o.exports ? (t.default = t, o.exports = t) : window.classNames = t;
29
+ })();
30
+ })(f);
31
+ var p = f.exports;
32
+ const m = /* @__PURE__ */ i(p);
33
+ export {
34
+ m as c
35
+ };