zudoku 0.13.0 → 0.13.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 (165) hide show
  1. package/dist/cli/dev/handler.js +2 -2
  2. package/dist/cli/dev/handler.js.map +1 -1
  3. package/dist/config/validators/validate.d.ts +27 -13
  4. package/dist/config/validators/validate.js +3 -1
  5. package/dist/config/validators/validate.js.map +1 -1
  6. package/dist/index.d.ts +1 -1
  7. package/dist/lib/components/Header.js +1 -1
  8. package/dist/lib/components/Header.js.map +1 -1
  9. package/dist/lib/components/MobileTopNavigation.js +2 -1
  10. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  11. package/dist/lib/components/Search.js +1 -1
  12. package/dist/lib/components/Search.js.map +1 -1
  13. package/dist/lib/components/SlotletProvider.d.ts +6 -2
  14. package/dist/lib/components/SlotletProvider.js +3 -5
  15. package/dist/lib/components/SlotletProvider.js.map +1 -1
  16. package/dist/lib/components/index.d.ts +2 -1
  17. package/dist/lib/components/index.js.map +1 -1
  18. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
  19. package/dist/lib/plugins/custom-pages/CustomPage.js +11 -0
  20. package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
  21. package/dist/lib/plugins/custom-pages/index.d.ts +8 -6
  22. package/dist/lib/plugins/custom-pages/index.js +3 -4
  23. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  24. package/dist/lib/plugins/openapi/Endpoint.js +1 -1
  25. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  26. package/dist/lib/plugins/openapi/OperationList.js +1 -1
  27. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  28. package/dist/lib/plugins/openapi/Route.d.ts +1 -1
  29. package/dist/lib/plugins/openapi/Route.js +1 -1
  30. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  31. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  32. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  33. package/dist/lib/plugins/openapi/client/createMemoryClient.js +1 -1
  34. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -1
  35. package/dist/lib/plugins/openapi/client/createWorkerClient.js +1 -1
  36. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -1
  37. package/dist/lib/plugins/openapi/index.js +1 -1
  38. package/dist/lib/plugins/openapi/index.js.map +1 -1
  39. package/dist/lib/ui/Callout.d.ts +36 -35
  40. package/dist/lib/ui/Callout.js.map +1 -1
  41. package/dist/lib/ui/Drawer.d.ts +8 -10
  42. package/dist/lib/ui/Drawer.js.map +1 -1
  43. package/dist/lib/util/useExposedProps.d.ts +2 -0
  44. package/dist/lib/util/useExposedProps.js +8 -0
  45. package/dist/lib/util/useExposedProps.js.map +1 -0
  46. package/dist/vite/dev-server.d.ts +6 -1
  47. package/dist/vite/dev-server.js +4 -2
  48. package/dist/vite/dev-server.js.map +1 -1
  49. package/lib/{AuthenticationPlugin-Bx9FK124.js → AuthenticationPlugin-CbgJ5SAh.js} +3 -3
  50. package/lib/{AuthenticationPlugin-Bx9FK124.js.map → AuthenticationPlugin-CbgJ5SAh.js.map} +1 -1
  51. package/lib/{CategoryHeading-ovR-zHRq.js → CategoryHeading-3Qtp2yZ8.js} +2 -2
  52. package/lib/{CategoryHeading-ovR-zHRq.js.map → CategoryHeading-3Qtp2yZ8.js.map} +1 -1
  53. package/lib/{DeveloperHint-YeWHKvyr.js → DeveloperHint-BE9DzNhv.js} +2 -2
  54. package/lib/{DeveloperHint-YeWHKvyr.js.map → DeveloperHint-BE9DzNhv.js.map} +1 -1
  55. package/lib/{ErrorPage-CsZAN_za.js → ErrorPage-B0COs372.js} +3 -3
  56. package/lib/{ErrorPage-CsZAN_za.js.map → ErrorPage-B0COs372.js.map} +1 -1
  57. package/lib/Input-CHfE_2Qk.js +2229 -0
  58. package/lib/Input-CHfE_2Qk.js.map +1 -0
  59. package/lib/{Markdown-DapSf3wG.js → Markdown-CWI6lU11.js} +714 -554
  60. package/lib/Markdown-CWI6lU11.js.map +1 -0
  61. package/lib/{MdxPage-BqBWsXZ1.js → MdxPage-C3tlrV4j.js} +6 -6
  62. package/lib/{MdxPage-BqBWsXZ1.js.map → MdxPage-C3tlrV4j.js.map} +1 -1
  63. package/lib/{OperationList-CYrmxPa8.js → OperationList-BO-ES1C5.js} +38 -39
  64. package/lib/OperationList-BO-ES1C5.js.map +1 -0
  65. package/lib/{Route-Q5mqNQrv.js → Route-Dq6zv0Pi.js} +3 -4
  66. package/lib/Route-Dq6zv0Pi.js.map +1 -0
  67. package/lib/SidebarBadge-DmI5hT04.js +503 -0
  68. package/lib/SidebarBadge-DmI5hT04.js.map +1 -0
  69. package/lib/{SlotletProvider-BWwfPzgI.js → SlotletProvider-RvaeLR6z.js} +43 -44
  70. package/lib/{SlotletProvider-BWwfPzgI.js.map → SlotletProvider-RvaeLR6z.js.map} +1 -1
  71. package/lib/ZudokuContext-BEmsYQoq.js +1173 -0
  72. package/lib/ZudokuContext-BEmsYQoq.js.map +1 -0
  73. package/lib/assets/{index-B9EWVYfo.js → index-B_Jk_Yzp.js} +968 -938
  74. package/lib/assets/index-B_Jk_Yzp.js.map +1 -0
  75. package/lib/assets/{worker-BP8Uzflt.js → worker-Bf8vjASY.js} +4581 -4300
  76. package/lib/assets/worker-Bf8vjASY.js.map +1 -0
  77. package/lib/{index-BG0g4WW0.js → index-BRCiYFaL.js} +747 -737
  78. package/lib/index-BRCiYFaL.js.map +1 -0
  79. package/lib/{index-CLd8ycZz.js → index-CkwDvuPt.js} +947 -917
  80. package/lib/index-CkwDvuPt.js.map +1 -0
  81. package/lib/{index-LNp6rxyU.js → index-D06ATMgg.js} +2 -2
  82. package/lib/{index-LNp6rxyU.js.map → index-D06ATMgg.js.map} +1 -1
  83. package/lib/index-DJqnphbT.js +35 -0
  84. package/lib/{index-Bn6Lc9tq.js.map → index-DJqnphbT.js.map} +1 -1
  85. package/lib/{index-BlJ2rj99.js → index-DNfiZTPV.js} +1123 -974
  86. package/lib/index-DNfiZTPV.js.map +1 -0
  87. package/lib/{index-Dolisrci.js → index-Do_BBSIs.js} +597 -544
  88. package/lib/index-Do_BBSIs.js.map +1 -0
  89. package/lib/{index-BngPzhKn.js → index-Dvh1BL_e.js} +3 -3
  90. package/lib/{index-BngPzhKn.js.map → index-Dvh1BL_e.js.map} +1 -1
  91. package/lib/router-Oe6YmY6B.js +3024 -0
  92. package/lib/router-Oe6YmY6B.js.map +1 -0
  93. package/lib/state-CsuHT8ZO.js +183 -0
  94. package/lib/state-CsuHT8ZO.js.map +1 -0
  95. package/lib/urql-core-KJnLL26g.js +1455 -0
  96. package/lib/urql-core-KJnLL26g.js.map +1 -0
  97. package/lib/useExposedProps-Csw8oAlt.js +9 -0
  98. package/lib/useExposedProps-Csw8oAlt.js.map +1 -0
  99. package/lib/{utils-ByIc_KIM.js → utils-Chi3p5nE.js} +4 -4
  100. package/lib/utils-Chi3p5nE.js.map +1 -0
  101. package/lib/zudoku.auth-auth0.js +1 -1
  102. package/lib/zudoku.auth-clerk.js +2 -2
  103. package/lib/zudoku.auth-openid.js +363 -350
  104. package/lib/zudoku.auth-openid.js.map +1 -1
  105. package/lib/zudoku.components.js +1694 -1628
  106. package/lib/zudoku.components.js.map +1 -1
  107. package/lib/zudoku.openapi-worker.js +4599 -4317
  108. package/lib/zudoku.openapi-worker.js.map +1 -1
  109. package/lib/zudoku.plugin-api-keys.js +7 -7
  110. package/lib/zudoku.plugin-custom-pages.js +16 -8
  111. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  112. package/lib/zudoku.plugin-markdown.js +1 -1
  113. package/lib/zudoku.plugin-openapi.js +8 -8
  114. package/lib/zudoku.plugin-redirect.js +1 -1
  115. package/package.json +58 -65
  116. package/src/lib/components/Header.tsx +2 -2
  117. package/src/lib/components/MobileTopNavigation.tsx +4 -0
  118. package/src/lib/components/Search.tsx +1 -1
  119. package/src/lib/components/SlotletProvider.tsx +14 -7
  120. package/src/lib/components/index.ts +1 -1
  121. package/src/lib/plugins/custom-pages/CustomPage.tsx +18 -0
  122. package/src/lib/plugins/custom-pages/index.tsx +11 -9
  123. package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
  124. package/src/lib/plugins/openapi/OperationList.tsx +1 -1
  125. package/src/lib/plugins/openapi/Route.tsx +1 -2
  126. package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
  127. package/src/lib/plugins/openapi/client/createMemoryClient.ts +1 -6
  128. package/src/lib/plugins/openapi/client/createWorkerClient.ts +1 -6
  129. package/src/lib/plugins/openapi/index.tsx +1 -5
  130. package/src/lib/ui/Callout.tsx +7 -6
  131. package/src/lib/ui/Drawer.tsx +38 -36
  132. package/src/lib/util/useExposedProps.tsx +10 -0
  133. package/dist/lib/plugins/openapi/playground/Editor.d.ts +0 -1
  134. package/dist/lib/plugins/openapi/playground/Editor.js +0 -5
  135. package/dist/lib/plugins/openapi/playground/Editor.js.map +0 -1
  136. package/dist/lib/plugins/openapi/util/urql.d.ts +0 -7
  137. package/dist/lib/plugins/openapi/util/urql.js +0 -8
  138. package/dist/lib/plugins/openapi/util/urql.js.map +0 -1
  139. package/lib/Input-CtVUl3eT.js +0 -2198
  140. package/lib/Input-CtVUl3eT.js.map +0 -1
  141. package/lib/Markdown-DapSf3wG.js.map +0 -1
  142. package/lib/OperationList-CYrmxPa8.js.map +0 -1
  143. package/lib/Route-Q5mqNQrv.js.map +0 -1
  144. package/lib/SidebarBadge-Dx7jtnoA.js +0 -498
  145. package/lib/SidebarBadge-Dx7jtnoA.js.map +0 -1
  146. package/lib/ZudokuContext-cr-pTRY1.js +0 -1084
  147. package/lib/ZudokuContext-cr-pTRY1.js.map +0 -1
  148. package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
  149. package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
  150. package/lib/assets/index-B9EWVYfo.js.map +0 -1
  151. package/lib/assets/worker-BP8Uzflt.js.map +0 -1
  152. package/lib/index-BG0g4WW0.js.map +0 -1
  153. package/lib/index-BlJ2rj99.js.map +0 -1
  154. package/lib/index-Bn6Lc9tq.js +0 -9
  155. package/lib/index-CLd8ycZz.js.map +0 -1
  156. package/lib/index-Dolisrci.js.map +0 -1
  157. package/lib/router-D2p7Olpn.js +0 -2971
  158. package/lib/router-D2p7Olpn.js.map +0 -1
  159. package/lib/state-hNe1dw4B.js +0 -548
  160. package/lib/state-hNe1dw4B.js.map +0 -1
  161. package/lib/urql-YhcsXYy8.js +0 -1591
  162. package/lib/urql-YhcsXYy8.js.map +0 -1
  163. package/lib/utils-ByIc_KIM.js.map +0 -1
  164. package/src/lib/plugins/openapi/playground/Editor.tsx +0 -4
  165. package/src/lib/plugins/openapi/util/urql.ts +0 -8
@@ -1,42 +1,42 @@
1
- var Io = Object.defineProperty;
2
- var sn = (e) => {
1
+ var Ba = Object.defineProperty;
2
+ var fn = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var Ao = (e, t, n) => t in e ? Io(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var J = (e, t, n) => Ao(e, typeof t != "symbol" ? t + "" : t, n), ln = (e, t, n) => t.has(e) || sn("Cannot " + n);
7
- var b = (e, t, n) => (ln(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ae = (e, t, n) => t.has(e) ? sn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), G = (e, t, n, r) => (ln(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
8
- var it = (e, t, n, r) => ({
9
- set _(a) {
10
- G(e, t, a, n);
5
+ var Ha = (e, t, n) => t in e ? Ba(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
+ var ae = (e, t, n) => Ha(e, typeof t != "symbol" ? t + "" : t, n), hn = (e, t, n) => t.has(e) || fn("Cannot " + n);
7
+ var w = (e, t, n) => (hn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ce = (e, t, n) => t.has(e) ? fn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), X = (e, t, n, r) => (hn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
8
+ var ut = (e, t, n, r) => ({
9
+ set _(o) {
10
+ X(e, t, o, n);
11
11
  },
12
12
  get _() {
13
- return b(e, t, r);
13
+ return w(e, t, r);
14
14
  }
15
15
  });
16
- import { c as Dn, H as _t, M as ko, d as $o, A as Lo, b as Fo } from "./utils-ByIc_KIM.js";
17
- import { e as Ho, f as Uo, R as Bo, N as We, L as Ot, g as zo, O as jn, u as Ko, b as It } from "./index-BG0g4WW0.js";
18
- import { E as Nn, S as he, a as Vo, R as Qo } from "./SlotletProvider-BWwfPzgI.js";
19
- import { j as o } from "./jsx-runtime-B6kdoens.js";
20
- import { M as qo, f as Go, c as Pn, o as Tn, A as Wo, d as Ze, i as Yo, b as A, j as Xo, F as Jo, D as Zo, C as ea, P as He, h as At, p as ta, r as _n, R as na, S as ra, s as oa, g as aa, q as On, l as sa, a as ht, u as In, V as An, m as cn, B as Rt } from "./index-Dolisrci.js";
21
- import { a as O, c as kn, b as ia, T as la, d as ca, V as ua, u as kt, e as da, C as fa } from "./Markdown-DapSf3wG.js";
16
+ import { c as On, H as It, M as Ua, d as za, A as Ka, b as qa } from "./utils-Chi3p5nE.js";
17
+ import { e as Qa, f as Va, R as Ga, N as Ze, L as At, g as Wa, O as In, b as Ya, u as kt } from "./index-BRCiYFaL.js";
18
+ import { E as An, S as xe, a as Xa, R as Ja } from "./SlotletProvider-RvaeLR6z.js";
19
+ import { j as a } from "./jsx-runtime-B6kdoens.js";
20
+ import { M as Za, f as eo, c as kn, p as $n, A as to, d as rt, j as no, b as A, k as ro, F as ao, D as oo, C as so, P as Ke, i as $t, q as io, s as Fn, R as lo, S as co, t as uo, h as fo, r as Ln, m as ho, a as gt, u as Bn, V as Hn, n as pn, B as Pt } from "./index-Do_BBSIs.js";
21
+ import { a as O, c as Un, b as po, T as mo, d as go, V as vo, u as Ft, e as wo, C as xo } from "./Markdown-CWI6lU11.js";
22
22
  import * as h from "react";
23
- import g, { StrictMode as $n, createContext as Ln, Component as ha, createElement as un, isValidElement as pa, useState as Te, useLayoutEffect as ma, useEffect as xe, useCallback as Fn, Suspense as Hn, memo as Un, useMemo as xt, useContext as ga, Fragment as va, useRef as $t, forwardRef as wa } from "react";
24
- import { a as Lt } from "./_commonjsHelpers-BkfeUUK-.js";
25
- import { z as ba } from "./router-D2p7Olpn.js";
26
- import { a as Dt, R as xa, T as ya, C as Ma } from "./index-BngPzhKn.js";
27
- import { S as Bn, f as zn, Q as Sa, n as ee, m as dn, g as fn, i as we, j as Ca, k as Ea, l as Ra, o as Da, p as hn, r as pn, q as ja, h as mn, t as gn, v as Na, u as Ue, b as Pa, Z as Ta, w as _a, c as Kn, x as Oa } from "./ZudokuContext-cr-pTRY1.js";
28
- import { j as Ft } from "./joinPath-B7kNnUX4.js";
29
- import { ChevronRightIcon as Vn, CheckIcon as Ia, DotIcon as Aa, CircleXIcon as ka, MenuIcon as $a, SearchIcon as La, MoonStarIcon as Fa, SunIcon as Ha, ExternalLinkIcon as Ua, PanelLeftIcon as Ba } from "lucide-react";
30
- import { c as Qn, P as gt, R as za, I as Ka, O as Va, C as Qa, T as qa, a as Ga, b as Wa, d as Ya, D as Xa, e as Ja, S as yt } from "./SidebarBadge-Dx7jtnoA.js";
31
- import { S as Za } from "./Spinner-3cQDBVGr.js";
32
- function es({ error: e }) {
33
- return /* @__PURE__ */ o.jsx(Nn, { error: e });
34
- }
35
- var et = {};
36
- const ts = /* @__PURE__ */ Lt(ba), ns = /* @__PURE__ */ Lt(Ho), rs = /* @__PURE__ */ Lt(Uo);
37
- Object.defineProperty(et, "__esModule", { value: !0 });
38
- var os = g, fe = ts, Ht = ns, be = rs;
39
- function as(e) {
23
+ import p, { StrictMode as zn, createContext as Kn, Component as yo, createElement as mn, isValidElement as bo, useState as Ie, useMemo as mt, useLayoutEffect as So, useEffect as Ce, useCallback as qn, Suspense as Qn, memo as Vn, useContext as Co, Fragment as Mo, useRef as Lt, forwardRef as Ro } from "react";
24
+ import { a as Bt } from "./index-DJqnphbT.js";
25
+ import { B as Eo } from "./router-Oe6YmY6B.js";
26
+ import { a as jt, R as Do, T as Po, C as jo } from "./index-Dvh1BL_e.js";
27
+ import { S as Gn, f as Wn, Q as No, n as se, m as gn, g as vn, i as be, j as To, k as _o, l as Oo, o as Io, p as wn, r as xn, q as Ao, h as yn, t as bn, v as ko, u as qe, b as $o, Z as Fo, w as Lo, c as Yn, x as Bo } from "./ZudokuContext-BEmsYQoq.js";
28
+ import { j as Ht } from "./joinPath-B7kNnUX4.js";
29
+ import { ChevronRightIcon as Xn, CheckIcon as Ho, DotIcon as Uo, CircleXIcon as zo, SearchIcon as Ko, MenuIcon as qo, MoonStarIcon as Qo, SunIcon as Vo, ExternalLinkIcon as Go, PanelLeftIcon as Wo } from "lucide-react";
30
+ import { c as Jn, P as xt, R as Yo, I as Xo, O as Jo, C as Zo, T as es, a as ts, b as ns, D as rs, d as as, e as os, S as St } from "./SidebarBadge-DmI5hT04.js";
31
+ import { S as ss } from "./Spinner-3cQDBVGr.js";
32
+ function is({ error: e }) {
33
+ return /* @__PURE__ */ a.jsx(An, { error: e });
34
+ }
35
+ var at = {};
36
+ const ls = /* @__PURE__ */ Bt(Eo), cs = /* @__PURE__ */ Bt(Qa), us = /* @__PURE__ */ Bt(Va);
37
+ Object.defineProperty(at, "__esModule", { value: !0 });
38
+ var ds = p, we = ls, Ut = cs, Se = us;
39
+ function fs(e) {
40
40
  if (e && e.__esModule) return e;
41
41
  var t = /* @__PURE__ */ Object.create(null);
42
42
  return e && Object.keys(e).forEach(function(n) {
@@ -51,41 +51,41 @@ function as(e) {
51
51
  }
52
52
  }), t.default = e, Object.freeze(t);
53
53
  }
54
- var ue = /* @__PURE__ */ as(os);
55
- function ss({
54
+ var ge = /* @__PURE__ */ fs(ds);
55
+ function hs({
56
56
  basename: e,
57
57
  children: t,
58
58
  location: n = "/",
59
59
  future: r
60
60
  }) {
61
- typeof n == "string" && (n = be.parsePath(n));
62
- let a = fe.Action.Pop, s = {
61
+ typeof n == "string" && (n = Se.parsePath(n));
62
+ let o = we.Action.Pop, s = {
63
63
  pathname: n.pathname || "/",
64
64
  search: n.search || "",
65
65
  hash: n.hash || "",
66
66
  state: n.state != null ? n.state : null,
67
67
  key: n.key || "default"
68
- }, i = qn();
69
- return /* @__PURE__ */ ue.createElement(be.Router, {
68
+ }, i = Zn();
69
+ return /* @__PURE__ */ ge.createElement(Se.Router, {
70
70
  basename: e,
71
71
  children: t,
72
72
  location: s,
73
- navigationType: a,
73
+ navigationType: o,
74
74
  navigator: i,
75
75
  future: r,
76
76
  static: !0
77
77
  });
78
78
  }
79
- function is({
79
+ function ps({
80
80
  context: e,
81
81
  router: t,
82
82
  hydrate: n = !0,
83
83
  nonce: r
84
84
  }) {
85
- t && e || (process.env.NODE_ENV !== "production" ? fe.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : fe.UNSAFE_invariant(!1));
86
- let a = {
85
+ t && e || (process.env.NODE_ENV !== "production" ? we.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : we.UNSAFE_invariant(!1));
86
+ let o = {
87
87
  router: t,
88
- navigator: qn(),
88
+ navigator: Zn(),
89
89
  static: !0,
90
90
  staticContext: e,
91
91
  basename: e.basename || "/"
@@ -94,37 +94,37 @@ function is({
94
94
  let u = {
95
95
  loaderData: e.loaderData,
96
96
  actionData: e.actionData,
97
- errors: cs(e.errors)
97
+ errors: gs(e.errors)
98
98
  };
99
- i = `window.__staticRouterHydrationData = JSON.parse(${ms(JSON.stringify(JSON.stringify(u)))});`;
99
+ i = `window.__staticRouterHydrationData = JSON.parse(${Ss(JSON.stringify(JSON.stringify(u)))});`;
100
100
  }
101
101
  let {
102
102
  state: l
103
- } = a.router;
104
- return /* @__PURE__ */ ue.createElement(ue.Fragment, null, /* @__PURE__ */ ue.createElement(be.UNSAFE_DataRouterContext.Provider, {
105
- value: a
106
- }, /* @__PURE__ */ ue.createElement(be.UNSAFE_DataRouterStateContext.Provider, {
103
+ } = o.router;
104
+ return /* @__PURE__ */ ge.createElement(ge.Fragment, null, /* @__PURE__ */ ge.createElement(Se.UNSAFE_DataRouterContext.Provider, {
105
+ value: o
106
+ }, /* @__PURE__ */ ge.createElement(Se.UNSAFE_DataRouterStateContext.Provider, {
107
107
  value: l
108
- }, /* @__PURE__ */ ue.createElement(be.UNSAFE_FetchersContext.Provider, {
108
+ }, /* @__PURE__ */ ge.createElement(Se.UNSAFE_FetchersContext.Provider, {
109
109
  value: s
110
- }, /* @__PURE__ */ ue.createElement(be.UNSAFE_ViewTransitionContext.Provider, {
110
+ }, /* @__PURE__ */ ge.createElement(Se.UNSAFE_ViewTransitionContext.Provider, {
111
111
  value: {
112
112
  isTransitioning: !1
113
113
  }
114
- }, /* @__PURE__ */ ue.createElement(be.Router, {
115
- basename: a.basename,
114
+ }, /* @__PURE__ */ ge.createElement(Se.Router, {
115
+ basename: o.basename,
116
116
  location: l.location,
117
117
  navigationType: l.historyAction,
118
- navigator: a.navigator,
119
- static: a.static,
118
+ navigator: o.navigator,
119
+ static: o.static,
120
120
  future: {
121
121
  v7_relativeSplatPath: t.future.v7_relativeSplatPath
122
122
  }
123
- }, /* @__PURE__ */ ue.createElement(ls, {
123
+ }, /* @__PURE__ */ ge.createElement(ms, {
124
124
  routes: t.routes,
125
125
  future: t.future,
126
126
  state: l
127
- })))))), i ? /* @__PURE__ */ ue.createElement("script", {
127
+ })))))), i ? /* @__PURE__ */ ge.createElement("script", {
128
128
  suppressHydrationWarning: !0,
129
129
  nonce: r,
130
130
  dangerouslySetInnerHTML: {
@@ -132,35 +132,35 @@ function is({
132
132
  }
133
133
  }) : null);
134
134
  }
135
- function ls({
135
+ function ms({
136
136
  routes: e,
137
137
  future: t,
138
138
  state: n
139
139
  }) {
140
- return Ht.UNSAFE_useRoutesImpl(e, void 0, n, t);
140
+ return Ut.UNSAFE_useRoutesImpl(e, void 0, n, t);
141
141
  }
142
- function cs(e) {
142
+ function gs(e) {
143
143
  if (!e) return null;
144
144
  let t = Object.entries(e), n = {};
145
- for (let [r, a] of t)
146
- fe.isRouteErrorResponse(a) ? n[r] = {
147
- ...a,
145
+ for (let [r, o] of t)
146
+ we.isRouteErrorResponse(o) ? n[r] = {
147
+ ...o,
148
148
  __type: "RouteErrorResponse"
149
- } : a instanceof Error ? n[r] = {
150
- message: a.message,
149
+ } : o instanceof Error ? n[r] = {
150
+ message: o.message,
151
151
  __type: "Error",
152
152
  // If this is a subclass (i.e., ReferenceError), send up the type so we
153
153
  // can re-create the same type during hydration.
154
- ...a.name !== "Error" ? {
155
- __subType: a.name
154
+ ...o.name !== "Error" ? {
155
+ __subType: o.name
156
156
  } : {}
157
- } : n[r] = a;
157
+ } : n[r] = o;
158
158
  return n;
159
159
  }
160
- function qn() {
160
+ function Zn() {
161
161
  return {
162
- createHref: Gn,
163
- encodeLocation: Wn,
162
+ createHref: er,
163
+ encodeLocation: tr,
164
164
  push(e) {
165
165
  throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`);
166
166
  },
@@ -178,14 +178,14 @@ function qn() {
178
178
  }
179
179
  };
180
180
  }
181
- function us(e, t) {
182
- return fe.createStaticHandler(e, {
181
+ function vs(e, t) {
182
+ return we.createStaticHandler(e, {
183
183
  ...t,
184
- mapRouteProperties: Ht.UNSAFE_mapRouteProperties
184
+ mapRouteProperties: Ut.UNSAFE_mapRouteProperties
185
185
  });
186
186
  }
187
- function ds(e, t, n = {}) {
188
- let r = {}, a = fe.UNSAFE_convertRoutesToDataRoutes(e, Ht.UNSAFE_mapRouteProperties, void 0, r), s = t.matches.map((l) => {
187
+ function ws(e, t, n = {}) {
188
+ let r = {}, o = we.UNSAFE_convertRoutesToDataRoutes(e, Ut.UNSAFE_mapRouteProperties, void 0, r), s = t.matches.map((l) => {
189
189
  let u = r[l.route.id] || l.route;
190
190
  return {
191
191
  ...l,
@@ -209,14 +209,14 @@ function ds(e, t, n = {}) {
209
209
  },
210
210
  get state() {
211
211
  return {
212
- historyAction: fe.Action.Pop,
212
+ historyAction: we.Action.Pop,
213
213
  location: t.location,
214
214
  matches: s,
215
215
  loaderData: t.loaderData,
216
216
  actionData: t.actionData,
217
217
  errors: t.errors,
218
218
  initialized: !0,
219
- navigation: fe.IDLE_NAVIGATION,
219
+ navigation: we.IDLE_NAVIGATION,
220
220
  restoreScrollPosition: null,
221
221
  preventScrollReset: !1,
222
222
  revalidation: "idle",
@@ -225,7 +225,7 @@ function ds(e, t, n = {}) {
225
225
  };
226
226
  },
227
227
  get routes() {
228
- return a;
228
+ return o;
229
229
  },
230
230
  get window() {
231
231
  },
@@ -247,10 +247,10 @@ function ds(e, t, n = {}) {
247
247
  revalidate() {
248
248
  throw i("revalidate");
249
249
  },
250
- createHref: Gn,
251
- encodeLocation: Wn,
250
+ createHref: er,
251
+ encodeLocation: tr,
252
252
  getFetcher() {
253
- return fe.IDLE_FETCHER;
253
+ return we.IDLE_FETCHER;
254
254
  },
255
255
  deleteFetcher() {
256
256
  throw i("deleteFetcher");
@@ -259,7 +259,7 @@ function ds(e, t, n = {}) {
259
259
  throw i("dispose");
260
260
  },
261
261
  getBlocker() {
262
- return fe.IDLE_BLOCKER;
262
+ return we.IDLE_BLOCKER;
263
263
  },
264
264
  deleteBlocker() {
265
265
  throw i("deleteBlocker");
@@ -274,173 +274,173 @@ function ds(e, t, n = {}) {
274
274
  }
275
275
  };
276
276
  }
277
- function Gn(e) {
278
- return typeof e == "string" ? e : be.createPath(e);
277
+ function er(e) {
278
+ return typeof e == "string" ? e : Se.createPath(e);
279
279
  }
280
- function Wn(e) {
281
- let t = typeof e == "string" ? e : be.createPath(e);
280
+ function tr(e) {
281
+ let t = typeof e == "string" ? e : Se.createPath(e);
282
282
  t = t.replace(/ $/, "%20");
283
- let n = fs.test(t) ? new URL(t) : new URL(t, "http://localhost");
283
+ let n = xs.test(t) ? new URL(t) : new URL(t, "http://localhost");
284
284
  return {
285
285
  pathname: n.pathname,
286
286
  search: n.search,
287
287
  hash: n.hash
288
288
  };
289
289
  }
290
- const fs = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, hs = {
290
+ const xs = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ys = {
291
291
  "&": "\\u0026",
292
292
  ">": "\\u003e",
293
293
  "<": "\\u003c",
294
294
  "\u2028": "\\u2028",
295
295
  "\u2029": "\\u2029"
296
- }, ps = /[&><\u2028\u2029]/g;
297
- function ms(e) {
298
- return e.replace(ps, (t) => hs[t]);
299
- }
300
- et.StaticRouter = ss;
301
- var gs = et.StaticRouterProvider = is;
302
- et.createStaticHandler = us;
303
- et.createStaticRouter = ds;
304
- const vs = ({
296
+ }, bs = /[&><\u2028\u2029]/g;
297
+ function Ss(e) {
298
+ return e.replace(bs, (t) => ys[t]);
299
+ }
300
+ at.StaticRouter = hs;
301
+ var Cs = at.StaticRouterProvider = ps;
302
+ at.createStaticHandler = vs;
303
+ at.createStaticRouter = ws;
304
+ const Ms = ({
305
305
  router: e,
306
306
  hydrate: t = !1
307
- }) => /* @__PURE__ */ o.jsx($n, { children: /* @__PURE__ */ o.jsx(Dn, { children: /* @__PURE__ */ o.jsx(Dt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ o.jsx(Bo, { router: e }) }) }) }), ws = ({
307
+ }) => /* @__PURE__ */ a.jsx(zn, { children: /* @__PURE__ */ a.jsx(On, { children: /* @__PURE__ */ a.jsx(jt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(Ga, { router: e }) }) }) }), Rs = ({
308
308
  router: e,
309
309
  context: t,
310
310
  helmetContext: n
311
- }) => /* @__PURE__ */ o.jsx($n, { children: /* @__PURE__ */ o.jsx(Dn, { context: n, children: /* @__PURE__ */ o.jsx(gs, { router: e, context: t }) }) });
312
- var de, Cn, bs = (Cn = class extends Bn {
311
+ }) => /* @__PURE__ */ a.jsx(zn, { children: /* @__PURE__ */ a.jsx(On, { context: n, children: /* @__PURE__ */ a.jsx(Cs, { router: e, context: t }) }) });
312
+ var ve, Nn, Es = (Nn = class extends Gn {
313
313
  constructor(t = {}) {
314
314
  super();
315
- ae(this, de);
316
- this.config = t, G(this, de, /* @__PURE__ */ new Map());
315
+ ce(this, ve);
316
+ this.config = t, X(this, ve, /* @__PURE__ */ new Map());
317
317
  }
318
318
  build(t, n, r) {
319
- const a = n.queryKey, s = n.queryHash ?? zn(a, n);
319
+ const o = n.queryKey, s = n.queryHash ?? Wn(o, n);
320
320
  let i = this.get(s);
321
- return i || (i = new Sa({
321
+ return i || (i = new No({
322
322
  cache: this,
323
- queryKey: a,
323
+ queryKey: o,
324
324
  queryHash: s,
325
325
  options: t.defaultQueryOptions(n),
326
326
  state: r,
327
- defaultOptions: t.getQueryDefaults(a)
327
+ defaultOptions: t.getQueryDefaults(o)
328
328
  }), this.add(i)), i;
329
329
  }
330
330
  add(t) {
331
- b(this, de).has(t.queryHash) || (b(this, de).set(t.queryHash, t), this.notify({
331
+ w(this, ve).has(t.queryHash) || (w(this, ve).set(t.queryHash, t), this.notify({
332
332
  type: "added",
333
333
  query: t
334
334
  }));
335
335
  }
336
336
  remove(t) {
337
- const n = b(this, de).get(t.queryHash);
338
- n && (t.destroy(), n === t && b(this, de).delete(t.queryHash), this.notify({ type: "removed", query: t }));
337
+ const n = w(this, ve).get(t.queryHash);
338
+ n && (t.destroy(), n === t && w(this, ve).delete(t.queryHash), this.notify({ type: "removed", query: t }));
339
339
  }
340
340
  clear() {
341
- ee.batch(() => {
341
+ se.batch(() => {
342
342
  this.getAll().forEach((t) => {
343
343
  this.remove(t);
344
344
  });
345
345
  });
346
346
  }
347
347
  get(t) {
348
- return b(this, de).get(t);
348
+ return w(this, ve).get(t);
349
349
  }
350
350
  getAll() {
351
- return [...b(this, de).values()];
351
+ return [...w(this, ve).values()];
352
352
  }
353
353
  find(t) {
354
354
  const n = { exact: !0, ...t };
355
355
  return this.getAll().find(
356
- (r) => dn(n, r)
356
+ (r) => gn(n, r)
357
357
  );
358
358
  }
359
359
  findAll(t = {}) {
360
360
  const n = this.getAll();
361
- return Object.keys(t).length > 0 ? n.filter((r) => dn(t, r)) : n;
361
+ return Object.keys(t).length > 0 ? n.filter((r) => gn(t, r)) : n;
362
362
  }
363
363
  notify(t) {
364
- ee.batch(() => {
364
+ se.batch(() => {
365
365
  this.listeners.forEach((n) => {
366
366
  n(t);
367
367
  });
368
368
  });
369
369
  }
370
370
  onFocus() {
371
- ee.batch(() => {
371
+ se.batch(() => {
372
372
  this.getAll().forEach((t) => {
373
373
  t.onFocus();
374
374
  });
375
375
  });
376
376
  }
377
377
  onOnline() {
378
- ee.batch(() => {
378
+ se.batch(() => {
379
379
  this.getAll().forEach((t) => {
380
380
  t.onOnline();
381
381
  });
382
382
  });
383
383
  }
384
- }, de = new WeakMap(), Cn), Z, Je, En, xs = (En = class extends Bn {
384
+ }, ve = new WeakMap(), Nn), oe, nt, Tn, Ds = (Tn = class extends Gn {
385
385
  constructor(t = {}) {
386
386
  super();
387
- ae(this, Z);
388
- ae(this, Je);
389
- this.config = t, G(this, Z, /* @__PURE__ */ new Map()), G(this, Je, Date.now());
387
+ ce(this, oe);
388
+ ce(this, nt);
389
+ this.config = t, X(this, oe, /* @__PURE__ */ new Map()), X(this, nt, Date.now());
390
390
  }
391
391
  build(t, n, r) {
392
- const a = new qo({
392
+ const o = new Za({
393
393
  mutationCache: this,
394
- mutationId: ++it(this, Je)._,
394
+ mutationId: ++ut(this, nt)._,
395
395
  options: t.defaultMutationOptions(n),
396
396
  state: r
397
397
  });
398
- return this.add(a), a;
398
+ return this.add(o), o;
399
399
  }
400
400
  add(t) {
401
- const n = lt(t), r = b(this, Z).get(n) ?? [];
402
- r.push(t), b(this, Z).set(n, r), this.notify({ type: "added", mutation: t });
401
+ const n = dt(t), r = w(this, oe).get(n) ?? [];
402
+ r.push(t), w(this, oe).set(n, r), this.notify({ type: "added", mutation: t });
403
403
  }
404
404
  remove(t) {
405
405
  var r;
406
- const n = lt(t);
407
- if (b(this, Z).has(n)) {
408
- const a = (r = b(this, Z).get(n)) == null ? void 0 : r.filter((s) => s !== t);
409
- a && (a.length === 0 ? b(this, Z).delete(n) : b(this, Z).set(n, a));
406
+ const n = dt(t);
407
+ if (w(this, oe).has(n)) {
408
+ const o = (r = w(this, oe).get(n)) == null ? void 0 : r.filter((s) => s !== t);
409
+ o && (o.length === 0 ? w(this, oe).delete(n) : w(this, oe).set(n, o));
410
410
  }
411
411
  this.notify({ type: "removed", mutation: t });
412
412
  }
413
413
  canRun(t) {
414
414
  var r;
415
- const n = (r = b(this, Z).get(lt(t))) == null ? void 0 : r.find((a) => a.state.status === "pending");
415
+ const n = (r = w(this, oe).get(dt(t))) == null ? void 0 : r.find((o) => o.state.status === "pending");
416
416
  return !n || n === t;
417
417
  }
418
418
  runNext(t) {
419
419
  var r;
420
- const n = (r = b(this, Z).get(lt(t))) == null ? void 0 : r.find((a) => a !== t && a.state.isPaused);
420
+ const n = (r = w(this, oe).get(dt(t))) == null ? void 0 : r.find((o) => o !== t && o.state.isPaused);
421
421
  return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
422
422
  }
423
423
  clear() {
424
- ee.batch(() => {
424
+ se.batch(() => {
425
425
  this.getAll().forEach((t) => {
426
426
  this.remove(t);
427
427
  });
428
428
  });
429
429
  }
430
430
  getAll() {
431
- return [...b(this, Z).values()].flat();
431
+ return [...w(this, oe).values()].flat();
432
432
  }
433
433
  find(t) {
434
434
  const n = { exact: !0, ...t };
435
435
  return this.getAll().find(
436
- (r) => fn(n, r)
436
+ (r) => vn(n, r)
437
437
  );
438
438
  }
439
439
  findAll(t = {}) {
440
- return this.getAll().filter((n) => fn(t, n));
440
+ return this.getAll().filter((n) => vn(t, n));
441
441
  }
442
442
  notify(t) {
443
- ee.batch(() => {
443
+ se.batch(() => {
444
444
  this.listeners.forEach((n) => {
445
445
  n(t);
446
446
  });
@@ -448,76 +448,74 @@ var de, Cn, bs = (Cn = class extends Bn {
448
448
  }
449
449
  resumePausedMutations() {
450
450
  const t = this.getAll().filter((n) => n.state.isPaused);
451
- return ee.batch(
451
+ return se.batch(
452
452
  () => Promise.all(
453
- t.map((n) => n.continue().catch(we))
453
+ t.map((n) => n.continue().catch(be))
454
454
  )
455
455
  );
456
456
  }
457
- }, Z = new WeakMap(), Je = new WeakMap(), En);
458
- function lt(e) {
457
+ }, oe = new WeakMap(), nt = new WeakMap(), Tn);
458
+ function dt(e) {
459
459
  var t;
460
460
  return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
461
461
  }
462
- function ys(e) {
462
+ function Sn(e) {
463
463
  return {
464
464
  onFetch: (t, n) => {
465
- const r = async () => {
466
- var y, R, K, H, q;
467
- const a = t.options, s = (K = (R = (y = t.fetchOptions) == null ? void 0 : y.meta) == null ? void 0 : R.fetchMore) == null ? void 0 : K.direction, i = ((H = t.state.data) == null ? void 0 : H.pages) || [], l = ((q = t.state.data) == null ? void 0 : q.pageParams) || [], u = { pages: [], pageParams: [] };
468
- let v = !1;
469
- const m = (x) => {
470
- Object.defineProperty(x, "signal", {
465
+ var f, c, d, v, M;
466
+ const r = t.options, o = (d = (c = (f = t.fetchOptions) == null ? void 0 : f.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : d.direction, s = ((v = t.state.data) == null ? void 0 : v.pages) || [], i = ((M = t.state.data) == null ? void 0 : M.pageParams) || [];
467
+ let l = { pages: [], pageParams: [] }, u = 0;
468
+ const m = async () => {
469
+ let C = !1;
470
+ const _ = (P) => {
471
+ Object.defineProperty(P, "signal", {
471
472
  enumerable: !0,
472
- get: () => (t.signal.aborted ? v = !0 : t.signal.addEventListener("abort", () => {
473
- v = !0;
473
+ get: () => (t.signal.aborted ? C = !0 : t.signal.addEventListener("abort", () => {
474
+ C = !0;
474
475
  }), t.signal)
475
476
  });
476
- }, c = Ca(t.options, t.fetchOptions), d = async (x, p, E) => {
477
- if (v)
477
+ }, R = To(t.options, t.fetchOptions), k = async (P, g, z) => {
478
+ if (C)
478
479
  return Promise.reject();
479
- if (p == null && x.pages.length)
480
- return Promise.resolve(x);
481
- const N = {
480
+ if (g == null && P.pages.length)
481
+ return Promise.resolve(P);
482
+ const Z = {
482
483
  queryKey: t.queryKey,
483
- pageParam: p,
484
- direction: E ? "backward" : "forward",
484
+ pageParam: g,
485
+ direction: z ? "backward" : "forward",
485
486
  meta: t.options.meta
486
487
  };
487
- m(N);
488
- const P = await c(
489
- N
490
- ), { maxPages: _ } = t.options, w = E ? Ea : Ra;
488
+ _(Z);
489
+ const b = await R(
490
+ Z
491
+ ), { maxPages: j } = t.options, D = z ? _o : Oo;
491
492
  return {
492
- pages: w(x.pages, P, _),
493
- pageParams: w(x.pageParams, p, _)
493
+ pages: D(P.pages, b, j),
494
+ pageParams: D(P.pageParams, g, j)
494
495
  };
495
496
  };
496
- let f;
497
- if (s && i.length) {
498
- const x = s === "backward", p = x ? Ms : vn, E = {
499
- pages: i,
500
- pageParams: l
501
- }, N = p(a, E);
502
- f = await d(E, N, x);
497
+ if (o && s.length) {
498
+ const P = o === "backward", g = P ? Ps : Cn, z = {
499
+ pages: s,
500
+ pageParams: i
501
+ }, Z = g(r, z);
502
+ l = await k(z, Z, P);
503
503
  } else {
504
- f = await d(
505
- u,
506
- l[0] ?? a.initialPageParam
507
- );
508
- const x = e ?? i.length;
509
- for (let p = 1; p < x; p++) {
510
- const E = vn(a, f);
511
- f = await d(f, E);
512
- }
504
+ const P = e ?? s.length;
505
+ do {
506
+ const g = u === 0 ? i[0] ?? r.initialPageParam : Cn(r, l);
507
+ if (u > 0 && g == null)
508
+ break;
509
+ l = await k(l, g), u++;
510
+ } while (u < P);
513
511
  }
514
- return f;
512
+ return l;
515
513
  };
516
514
  t.options.persister ? t.fetchFn = () => {
517
- var a, s;
518
- return (s = (a = t.options).persister) == null ? void 0 : s.call(
519
- a,
520
- r,
515
+ var C, _;
516
+ return (_ = (C = t.options).persister) == null ? void 0 : _.call(
517
+ C,
518
+ m,
521
519
  {
522
520
  queryKey: t.queryKey,
523
521
  meta: t.options.meta,
@@ -525,88 +523,82 @@ function ys(e) {
525
523
  },
526
524
  n
527
525
  );
528
- } : t.fetchFn = r;
526
+ } : t.fetchFn = m;
529
527
  }
530
528
  };
531
529
  }
532
- function vn(e, { pages: t, pageParams: n }) {
530
+ function Cn(e, { pages: t, pageParams: n }) {
533
531
  const r = t.length - 1;
534
- return e.getNextPageParam(
532
+ return t.length > 0 ? e.getNextPageParam(
535
533
  t[r],
536
534
  t,
537
535
  n[r],
538
536
  n
539
- );
537
+ ) : void 0;
540
538
  }
541
- function Ms(e, { pages: t, pageParams: n }) {
539
+ function Ps(e, { pages: t, pageParams: n }) {
542
540
  var r;
543
- return (r = e.getPreviousPageParam) == null ? void 0 : r.call(
544
- e,
545
- t[0],
546
- t,
547
- n[0],
548
- n
549
- );
541
+ return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, n[0], n) : void 0;
550
542
  }
551
- var $, Ce, Ee, ke, $e, Re, Le, Fe, Rn, Ss = (Rn = class {
543
+ var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
552
544
  constructor(e = {}) {
553
- ae(this, $);
554
- ae(this, Ce);
555
- ae(this, Ee);
556
- ae(this, ke);
557
- ae(this, $e);
558
- ae(this, Re);
559
- ae(this, Le);
560
- ae(this, Fe);
561
- G(this, $, e.queryCache || new bs()), G(this, Ce, e.mutationCache || new xs()), G(this, Ee, e.defaultOptions || {}), G(this, ke, /* @__PURE__ */ new Map()), G(this, $e, /* @__PURE__ */ new Map()), G(this, Re, 0);
545
+ ce(this, F);
546
+ ce(this, Pe);
547
+ ce(this, je);
548
+ ce(this, Be);
549
+ ce(this, He);
550
+ ce(this, Ne);
551
+ ce(this, Ue);
552
+ ce(this, ze);
553
+ X(this, F, e.queryCache || new Es()), X(this, Pe, e.mutationCache || new Ds()), X(this, je, e.defaultOptions || {}), X(this, Be, /* @__PURE__ */ new Map()), X(this, He, /* @__PURE__ */ new Map()), X(this, Ne, 0);
562
554
  }
563
555
  mount() {
564
- it(this, Re)._++, b(this, Re) === 1 && (G(this, Le, Da.subscribe(async (e) => {
565
- e && (await this.resumePausedMutations(), b(this, $).onFocus());
566
- })), G(this, Fe, hn.subscribe(async (e) => {
567
- e && (await this.resumePausedMutations(), b(this, $).onOnline());
556
+ ut(this, Ne)._++, w(this, Ne) === 1 && (X(this, Ue, Io.subscribe(async (e) => {
557
+ e && (await this.resumePausedMutations(), w(this, F).onFocus());
558
+ })), X(this, ze, wn.subscribe(async (e) => {
559
+ e && (await this.resumePausedMutations(), w(this, F).onOnline());
568
560
  })));
569
561
  }
570
562
  unmount() {
571
563
  var e, t;
572
- it(this, Re)._--, b(this, Re) === 0 && ((e = b(this, Le)) == null || e.call(this), G(this, Le, void 0), (t = b(this, Fe)) == null || t.call(this), G(this, Fe, void 0));
564
+ ut(this, Ne)._--, w(this, Ne) === 0 && ((e = w(this, Ue)) == null || e.call(this), X(this, Ue, void 0), (t = w(this, ze)) == null || t.call(this), X(this, ze, void 0));
573
565
  }
574
566
  isFetching(e) {
575
- return b(this, $).findAll({ ...e, fetchStatus: "fetching" }).length;
567
+ return w(this, F).findAll({ ...e, fetchStatus: "fetching" }).length;
576
568
  }
577
569
  isMutating(e) {
578
- return b(this, Ce).findAll({ ...e, status: "pending" }).length;
570
+ return w(this, Pe).findAll({ ...e, status: "pending" }).length;
579
571
  }
580
572
  getQueryData(e) {
581
573
  var n;
582
574
  const t = this.defaultQueryOptions({ queryKey: e });
583
- return (n = b(this, $).get(t.queryHash)) == null ? void 0 : n.state.data;
575
+ return (n = w(this, F).get(t.queryHash)) == null ? void 0 : n.state.data;
584
576
  }
585
577
  ensureQueryData(e) {
586
578
  const t = this.getQueryData(e.queryKey);
587
579
  if (t === void 0)
588
580
  return this.fetchQuery(e);
589
581
  {
590
- const n = this.defaultQueryOptions(e), r = b(this, $).build(this, n);
591
- return e.revalidateIfStale && r.isStaleByTime(pn(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(t);
582
+ const n = this.defaultQueryOptions(e), r = w(this, F).build(this, n);
583
+ return e.revalidateIfStale && r.isStaleByTime(xn(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(t);
592
584
  }
593
585
  }
594
586
  getQueriesData(e) {
595
- return b(this, $).findAll(e).map(({ queryKey: t, state: n }) => {
587
+ return w(this, F).findAll(e).map(({ queryKey: t, state: n }) => {
596
588
  const r = n.data;
597
589
  return [t, r];
598
590
  });
599
591
  }
600
592
  setQueryData(e, t, n) {
601
- const r = this.defaultQueryOptions({ queryKey: e }), a = b(this, $).get(
593
+ const r = this.defaultQueryOptions({ queryKey: e }), o = w(this, F).get(
602
594
  r.queryHash
603
- ), s = a == null ? void 0 : a.state.data, i = ja(t, s);
595
+ ), s = o == null ? void 0 : o.state.data, i = Ao(t, s);
604
596
  if (i !== void 0)
605
- return b(this, $).build(this, r).setData(i, { ...n, manual: !0 });
597
+ return w(this, F).build(this, r).setData(i, { ...n, manual: !0 });
606
598
  }
607
599
  setQueriesData(e, t, n) {
608
- return ee.batch(
609
- () => b(this, $).findAll(e).map(({ queryKey: r }) => [
600
+ return se.batch(
601
+ () => w(this, F).findAll(e).map(({ queryKey: r }) => [
610
602
  r,
611
603
  this.setQueryData(r, t, n)
612
604
  ])
@@ -615,34 +607,34 @@ var $, Ce, Ee, ke, $e, Re, Le, Fe, Rn, Ss = (Rn = class {
615
607
  getQueryState(e) {
616
608
  var n;
617
609
  const t = this.defaultQueryOptions({ queryKey: e });
618
- return (n = b(this, $).get(t.queryHash)) == null ? void 0 : n.state;
610
+ return (n = w(this, F).get(t.queryHash)) == null ? void 0 : n.state;
619
611
  }
620
612
  removeQueries(e) {
621
- const t = b(this, $);
622
- ee.batch(() => {
613
+ const t = w(this, F);
614
+ se.batch(() => {
623
615
  t.findAll(e).forEach((n) => {
624
616
  t.remove(n);
625
617
  });
626
618
  });
627
619
  }
628
620
  resetQueries(e, t) {
629
- const n = b(this, $), r = {
621
+ const n = w(this, F), r = {
630
622
  type: "active",
631
623
  ...e
632
624
  };
633
- return ee.batch(() => (n.findAll(e).forEach((a) => {
634
- a.reset();
625
+ return se.batch(() => (n.findAll(e).forEach((o) => {
626
+ o.reset();
635
627
  }), this.refetchQueries(r, t)));
636
628
  }
637
629
  cancelQueries(e = {}, t = {}) {
638
- const n = { revert: !0, ...t }, r = ee.batch(
639
- () => b(this, $).findAll(e).map((a) => a.cancel(n))
630
+ const n = { revert: !0, ...t }, r = se.batch(
631
+ () => w(this, F).findAll(e).map((o) => o.cancel(n))
640
632
  );
641
- return Promise.all(r).then(we).catch(we);
633
+ return Promise.all(r).then(be).catch(be);
642
634
  }
643
635
  invalidateQueries(e = {}, t = {}) {
644
- return ee.batch(() => {
645
- if (b(this, $).findAll(e).forEach((r) => {
636
+ return se.batch(() => {
637
+ if (w(this, F).findAll(e).forEach((r) => {
646
638
  r.invalidate();
647
639
  }), e.refetchType === "none")
648
640
  return Promise.resolve();
@@ -657,105 +649,108 @@ var $, Ce, Ee, ke, $e, Re, Le, Fe, Rn, Ss = (Rn = class {
657
649
  const n = {
658
650
  ...t,
659
651
  cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
660
- }, r = ee.batch(
661
- () => b(this, $).findAll(e).filter((a) => !a.isDisabled()).map((a) => {
662
- let s = a.fetch(void 0, n);
663
- return n.throwOnError || (s = s.catch(we)), a.state.fetchStatus === "paused" ? Promise.resolve() : s;
652
+ }, r = se.batch(
653
+ () => w(this, F).findAll(e).filter((o) => !o.isDisabled()).map((o) => {
654
+ let s = o.fetch(void 0, n);
655
+ return n.throwOnError || (s = s.catch(be)), o.state.fetchStatus === "paused" ? Promise.resolve() : s;
664
656
  })
665
657
  );
666
- return Promise.all(r).then(we);
658
+ return Promise.all(r).then(be);
667
659
  }
668
660
  fetchQuery(e) {
669
661
  const t = this.defaultQueryOptions(e);
670
662
  t.retry === void 0 && (t.retry = !1);
671
- const n = b(this, $).build(this, t);
663
+ const n = w(this, F).build(this, t);
672
664
  return n.isStaleByTime(
673
- pn(t.staleTime, n)
665
+ xn(t.staleTime, n)
674
666
  ) ? n.fetch(t) : Promise.resolve(n.state.data);
675
667
  }
676
668
  prefetchQuery(e) {
677
- return this.fetchQuery(e).then(we).catch(we);
669
+ return this.fetchQuery(e).then(be).catch(be);
678
670
  }
679
671
  fetchInfiniteQuery(e) {
680
- return e.behavior = ys(e.pages), this.fetchQuery(e);
672
+ return e.behavior = Sn(e.pages), this.fetchQuery(e);
681
673
  }
682
674
  prefetchInfiniteQuery(e) {
683
- return this.fetchInfiniteQuery(e).then(we).catch(we);
675
+ return this.fetchInfiniteQuery(e).then(be).catch(be);
676
+ }
677
+ ensureInfiniteQueryData(e) {
678
+ return e.behavior = Sn(e.pages), this.ensureQueryData(e);
684
679
  }
685
680
  resumePausedMutations() {
686
- return hn.isOnline() ? b(this, Ce).resumePausedMutations() : Promise.resolve();
681
+ return wn.isOnline() ? w(this, Pe).resumePausedMutations() : Promise.resolve();
687
682
  }
688
683
  getQueryCache() {
689
- return b(this, $);
684
+ return w(this, F);
690
685
  }
691
686
  getMutationCache() {
692
- return b(this, Ce);
687
+ return w(this, Pe);
693
688
  }
694
689
  getDefaultOptions() {
695
- return b(this, Ee);
690
+ return w(this, je);
696
691
  }
697
692
  setDefaultOptions(e) {
698
- G(this, Ee, e);
693
+ X(this, je, e);
699
694
  }
700
695
  setQueryDefaults(e, t) {
701
- b(this, ke).set(mn(e), {
696
+ w(this, Be).set(yn(e), {
702
697
  queryKey: e,
703
698
  defaultOptions: t
704
699
  });
705
700
  }
706
701
  getQueryDefaults(e) {
707
- const t = [...b(this, ke).values()];
702
+ const t = [...w(this, Be).values()];
708
703
  let n = {};
709
704
  return t.forEach((r) => {
710
- gn(e, r.queryKey) && (n = { ...n, ...r.defaultOptions });
705
+ bn(e, r.queryKey) && (n = { ...n, ...r.defaultOptions });
711
706
  }), n;
712
707
  }
713
708
  setMutationDefaults(e, t) {
714
- b(this, $e).set(mn(e), {
709
+ w(this, He).set(yn(e), {
715
710
  mutationKey: e,
716
711
  defaultOptions: t
717
712
  });
718
713
  }
719
714
  getMutationDefaults(e) {
720
- const t = [...b(this, $e).values()];
715
+ const t = [...w(this, He).values()];
721
716
  let n = {};
722
717
  return t.forEach((r) => {
723
- gn(e, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
718
+ bn(e, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
724
719
  }), n;
725
720
  }
726
721
  defaultQueryOptions(e) {
727
722
  if (e._defaulted)
728
723
  return e;
729
724
  const t = {
730
- ...b(this, Ee).queries,
725
+ ...w(this, je).queries,
731
726
  ...this.getQueryDefaults(e.queryKey),
732
727
  ...e,
733
728
  _defaulted: !0
734
729
  };
735
- return t.queryHash || (t.queryHash = zn(
730
+ return t.queryHash || (t.queryHash = Wn(
736
731
  t.queryKey,
737
732
  t
738
- )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === Na && (t.enabled = !1), t;
733
+ )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === ko && (t.enabled = !1), t;
739
734
  }
740
735
  defaultMutationOptions(e) {
741
736
  return e != null && e._defaulted ? e : {
742
- ...b(this, Ee).mutations,
737
+ ...w(this, je).mutations,
743
738
  ...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
744
739
  ...e,
745
740
  _defaulted: !0
746
741
  };
747
742
  }
748
743
  clear() {
749
- b(this, $).clear(), b(this, Ce).clear();
744
+ w(this, F).clear(), w(this, Pe).clear();
750
745
  }
751
- }, $ = new WeakMap(), Ce = new WeakMap(), Ee = new WeakMap(), ke = new WeakMap(), $e = new WeakMap(), Re = new WeakMap(), Le = new WeakMap(), Fe = new WeakMap(), Rn);
752
- const Cs = Ln(null), Mt = {
746
+ }, F = new WeakMap(), Pe = new WeakMap(), je = new WeakMap(), Be = new WeakMap(), He = new WeakMap(), Ne = new WeakMap(), Ue = new WeakMap(), ze = new WeakMap(), _n);
747
+ const Ns = Kn(null), Ct = {
753
748
  didCatch: !1,
754
749
  error: null
755
750
  };
756
- class Es extends ha {
751
+ class Ts extends yo {
757
752
  constructor(t) {
758
- super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Mt;
753
+ super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Ct;
759
754
  }
760
755
  static getDerivedStateFromError(t) {
761
756
  return {
@@ -768,31 +763,31 @@ class Es extends ha {
768
763
  error: t
769
764
  } = this.state;
770
765
  if (t !== null) {
771
- for (var n, r, a = arguments.length, s = new Array(a), i = 0; i < a; i++)
766
+ for (var n, r, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
772
767
  s[i] = arguments[i];
773
768
  (n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
774
769
  args: s,
775
770
  reason: "imperative-api"
776
- }), this.setState(Mt);
771
+ }), this.setState(Ct);
777
772
  }
778
773
  }
779
774
  componentDidCatch(t, n) {
780
- var r, a;
781
- (r = (a = this.props).onError) === null || r === void 0 || r.call(a, t, n);
775
+ var r, o;
776
+ (r = (o = this.props).onError) === null || r === void 0 || r.call(o, t, n);
782
777
  }
783
778
  componentDidUpdate(t, n) {
784
779
  const {
785
780
  didCatch: r
786
781
  } = this.state, {
787
- resetKeys: a
782
+ resetKeys: o
788
783
  } = this.props;
789
- if (r && n.error !== null && Rs(t.resetKeys, a)) {
784
+ if (r && n.error !== null && _s(t.resetKeys, o)) {
790
785
  var s, i;
791
786
  (s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
792
- next: a,
787
+ next: o,
793
788
  prev: t.resetKeys,
794
789
  reason: "keys"
795
- }), this.setState(Mt);
790
+ }), this.setState(Ct);
796
791
  }
797
792
  }
798
793
  render() {
@@ -800,7 +795,7 @@ class Es extends ha {
800
795
  children: t,
801
796
  fallbackRender: n,
802
797
  FallbackComponent: r,
803
- fallback: a
798
+ fallback: o
804
799
  } = this.props, {
805
800
  didCatch: s,
806
801
  error: i
@@ -814,13 +809,13 @@ class Es extends ha {
814
809
  if (typeof n == "function")
815
810
  l = n(u);
816
811
  else if (r)
817
- l = un(r, u);
818
- else if (a === null || pa(a))
819
- l = a;
812
+ l = mn(r, u);
813
+ else if (o === null || bo(o))
814
+ l = o;
820
815
  else
821
816
  throw i;
822
817
  }
823
- return un(Cs.Provider, {
818
+ return mn(Ns.Provider, {
824
819
  value: {
825
820
  didCatch: s,
826
821
  error: i,
@@ -829,89 +824,89 @@ class Es extends ha {
829
824
  }, l);
830
825
  }
831
826
  }
832
- function Rs() {
827
+ function _s() {
833
828
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
834
829
  return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
835
830
  }
836
- const Ds = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", js = (e) => "getRoutes" in e && typeof e.getRoutes == "function", Ns = (e) => "renderSearch" in e && typeof e.renderSearch == "function", Ps = (e) => "initialize" in e && typeof e.initialize == "function", Ts = (e) => "getHead" in e && typeof e.getHead == "function", _s = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", Os = (e) => "getIdentities" in e && typeof e.getIdentities == "function", Yn = new Ss();
837
- class Is {
831
+ const Os = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", Is = (e) => "getRoutes" in e && typeof e.getRoutes == "function", As = (e) => "renderSearch" in e && typeof e.renderSearch == "function", ks = (e) => "initialize" in e && typeof e.initialize == "function", $s = (e) => "getHead" in e && typeof e.getHead == "function", Fs = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", Ls = (e) => "getIdentities" in e && typeof e.getIdentities == "function", nr = new js();
832
+ class Bs {
838
833
  constructor(t) {
839
- J(this, "plugins");
840
- J(this, "sidebars");
841
- J(this, "topNavigation");
842
- J(this, "meta");
843
- J(this, "page");
844
- J(this, "authentication");
845
- J(this, "navigationPlugins");
846
- J(this, "initialize", async () => {
834
+ ae(this, "plugins");
835
+ ae(this, "sidebars");
836
+ ae(this, "topNavigation");
837
+ ae(this, "meta");
838
+ ae(this, "page");
839
+ ae(this, "authentication");
840
+ ae(this, "navigationPlugins");
841
+ ae(this, "initialize", async () => {
847
842
  await Promise.all(
848
- this.plugins.filter(Ps).map((t) => {
843
+ this.plugins.filter(ks).map((t) => {
849
844
  var n;
850
845
  return (n = t.initialize) == null ? void 0 : n.call(t, this);
851
846
  })
852
847
  );
853
848
  });
854
- J(this, "invalidateCache", async (t) => {
855
- await Yn.invalidateQueries({ queryKey: t });
849
+ ae(this, "invalidateCache", async (t) => {
850
+ await nr.invalidateQueries({ queryKey: t });
856
851
  });
857
- J(this, "getApiIdentities", async () => (await Promise.all(
858
- this.plugins.filter(Os).map((n) => n.getIdentities(this))
852
+ ae(this, "getApiIdentities", async () => (await Promise.all(
853
+ this.plugins.filter(Ls).map((n) => n.getIdentities(this))
859
854
  )).flat());
860
- J(this, "getPluginSidebar", async (t) => (await Promise.all(
855
+ ae(this, "getPluginSidebar", async (t) => (await Promise.all(
861
856
  this.navigationPlugins.map(
862
857
  (r) => {
863
- var a;
864
- return (a = r.getSidebar) == null ? void 0 : a.call(r, Ft(t));
858
+ var o;
859
+ return (o = r.getSidebar) == null ? void 0 : o.call(r, Ht(t));
865
860
  }
866
861
  )
867
862
  )).flatMap((r) => r ?? []));
868
- J(this, "signRequest", async (t) => {
863
+ ae(this, "signRequest", async (t) => {
869
864
  if (!this.authentication)
870
865
  throw new Error("No authentication provider configured");
871
866
  const n = await this.authentication.getAccessToken();
872
867
  return t.headers.set("Authorization", `Bearer ${n}`), t;
873
868
  });
874
- this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(js), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
869
+ this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Is), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
875
870
  }
876
871
  }
877
- function As({ error: e, resetErrorBoundary: t }) {
878
- return /* @__PURE__ */ o.jsx(Nn, { error: e });
872
+ function Hs({ error: e, resetErrorBoundary: t }) {
873
+ return /* @__PURE__ */ a.jsx(An, { error: e });
879
874
  }
880
- const ct = globalThis;
881
- (!ct.requestIdleCallback || !ct.cancelIdleCallback) && (ct.requestIdleCallback = (e) => setTimeout(e, 1), ct.cancelIdleCallback = clearTimeout);
882
- var jt = ["Enter", " "], ks = ["ArrowDown", "PageUp", "Home"], Xn = ["ArrowUp", "PageDown", "End"], $s = [...ks, ...Xn], Ls = {
883
- ltr: [...jt, "ArrowRight"],
884
- rtl: [...jt, "ArrowLeft"]
885
- }, Fs = {
875
+ const ft = globalThis;
876
+ (!ft.requestIdleCallback || !ft.cancelIdleCallback) && (ft.requestIdleCallback = (e) => setTimeout(e, 1), ft.cancelIdleCallback = clearTimeout);
877
+ var Nt = ["Enter", " "], Us = ["ArrowDown", "PageUp", "Home"], rr = ["ArrowUp", "PageDown", "End"], zs = [...Us, ...rr], Ks = {
878
+ ltr: [...Nt, "ArrowRight"],
879
+ rtl: [...Nt, "ArrowLeft"]
880
+ }, qs = {
886
881
  ltr: ["ArrowLeft"],
887
882
  rtl: ["ArrowRight"]
888
- }, tt = "Menu", [Ye, Hs, Us] = Go(tt), [_e, Jn] = Pn(tt, [
889
- Us,
890
- Tn,
891
- Qn
892
- ]), nt = Tn(), Zn = Qn(), [er, De] = _e(tt), [Bs, rt] = _e(tt), tr = (e) => {
893
- const { __scopeMenu: t, open: n = !1, children: r, dir: a, onOpenChange: s, modal: i = !0 } = e, l = nt(t), [u, v] = h.useState(null), m = h.useRef(!1), c = At(s), d = aa(a);
883
+ }, ot = "Menu", [et, Qs, Vs] = eo(ot), [Ae, ar] = kn(ot, [
884
+ Vs,
885
+ $n,
886
+ Jn
887
+ ]), st = $n(), or = Jn(), [sr, Te] = Ae(ot), [Gs, it] = Ae(ot), ir = (e) => {
888
+ const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, l = st(t), [u, m] = h.useState(null), f = h.useRef(!1), c = $t(s), d = fo(o);
894
889
  return h.useEffect(() => {
895
- const f = () => {
896
- m.current = !0, document.addEventListener("pointerdown", y, { capture: !0, once: !0 }), document.addEventListener("pointermove", y, { capture: !0, once: !0 });
897
- }, y = () => m.current = !1;
898
- return document.addEventListener("keydown", f, { capture: !0 }), () => {
899
- document.removeEventListener("keydown", f, { capture: !0 }), document.removeEventListener("pointerdown", y, { capture: !0 }), document.removeEventListener("pointermove", y, { capture: !0 });
890
+ const v = () => {
891
+ f.current = !0, document.addEventListener("pointerdown", M, { capture: !0, once: !0 }), document.addEventListener("pointermove", M, { capture: !0, once: !0 });
892
+ }, M = () => f.current = !1;
893
+ return document.addEventListener("keydown", v, { capture: !0 }), () => {
894
+ document.removeEventListener("keydown", v, { capture: !0 }), document.removeEventListener("pointerdown", M, { capture: !0 }), document.removeEventListener("pointermove", M, { capture: !0 });
900
895
  };
901
- }, []), /* @__PURE__ */ o.jsx(On, { ...l, children: /* @__PURE__ */ o.jsx(
902
- er,
896
+ }, []), /* @__PURE__ */ a.jsx(Ln, { ...l, children: /* @__PURE__ */ a.jsx(
897
+ sr,
903
898
  {
904
899
  scope: t,
905
900
  open: n,
906
901
  onOpenChange: c,
907
902
  content: u,
908
- onContentChange: v,
909
- children: /* @__PURE__ */ o.jsx(
910
- Bs,
903
+ onContentChange: m,
904
+ children: /* @__PURE__ */ a.jsx(
905
+ Gs,
911
906
  {
912
907
  scope: t,
913
908
  onClose: h.useCallback(() => c(!1), [c]),
914
- isUsingKeyboardRef: m,
909
+ isUsingKeyboardRef: f,
915
910
  dir: d,
916
911
  modal: i,
917
912
  children: r
@@ -920,37 +915,37 @@ var jt = ["Enter", " "], ks = ["ArrowDown", "PageUp", "Home"], Xn = ["ArrowUp",
920
915
  }
921
916
  ) });
922
917
  };
923
- tr.displayName = tt;
924
- var zs = "MenuAnchor", Ut = h.forwardRef(
918
+ ir.displayName = ot;
919
+ var Ws = "MenuAnchor", zt = h.forwardRef(
925
920
  (e, t) => {
926
- const { __scopeMenu: n, ...r } = e, a = nt(n);
927
- return /* @__PURE__ */ o.jsx(Wo, { ...a, ...r, ref: t });
921
+ const { __scopeMenu: n, ...r } = e, o = st(n);
922
+ return /* @__PURE__ */ a.jsx(to, { ...o, ...r, ref: t });
928
923
  }
929
924
  );
930
- Ut.displayName = zs;
931
- var Bt = "MenuPortal", [Ks, nr] = _e(Bt, {
925
+ zt.displayName = Ws;
926
+ var Kt = "MenuPortal", [Ys, lr] = Ae(Kt, {
932
927
  forceMount: void 0
933
- }), rr = (e) => {
934
- const { __scopeMenu: t, forceMount: n, children: r, container: a } = e, s = De(Bt, t);
935
- return /* @__PURE__ */ o.jsx(Ks, { scope: t, forceMount: n, children: /* @__PURE__ */ o.jsx(gt, { present: n || s.open, children: /* @__PURE__ */ o.jsx(sa, { asChild: !0, container: a, children: r }) }) });
928
+ }), cr = (e) => {
929
+ const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Te(Kt, t);
930
+ return /* @__PURE__ */ a.jsx(Ys, { scope: t, forceMount: n, children: /* @__PURE__ */ a.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ a.jsx(ho, { asChild: !0, container: o, children: r }) }) });
936
931
  };
937
- rr.displayName = Bt;
938
- var se = "MenuContent", [Vs, zt] = _e(se), or = h.forwardRef(
932
+ cr.displayName = Kt;
933
+ var ue = "MenuContent", [Xs, qt] = Ae(ue), ur = h.forwardRef(
939
934
  (e, t) => {
940
- const n = nr(se, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, s = De(se, e.__scopeMenu), i = rt(se, e.__scopeMenu);
941
- return /* @__PURE__ */ o.jsx(Ye.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(gt, { present: r || s.open, children: /* @__PURE__ */ o.jsx(Ye.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ o.jsx(Qs, { ...a, ref: t }) : /* @__PURE__ */ o.jsx(qs, { ...a, ref: t }) }) }) });
935
+ const n = lr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu);
936
+ return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ a.jsx(Js, { ...o, ref: t }) : /* @__PURE__ */ a.jsx(Zs, { ...o, ref: t }) }) }) });
942
937
  }
943
- ), Qs = h.forwardRef(
938
+ ), Js = h.forwardRef(
944
939
  (e, t) => {
945
- const n = De(se, e.__scopeMenu), r = h.useRef(null), a = Ze(t, r);
940
+ const n = Te(ue, e.__scopeMenu), r = h.useRef(null), o = rt(t, r);
946
941
  return h.useEffect(() => {
947
942
  const s = r.current;
948
- if (s) return Yo(s);
949
- }, []), /* @__PURE__ */ o.jsx(
950
- Kt,
943
+ if (s) return no(s);
944
+ }, []), /* @__PURE__ */ a.jsx(
945
+ Qt,
951
946
  {
952
947
  ...e,
953
- ref: a,
948
+ ref: o,
954
949
  trapFocus: n.open,
955
950
  disableOutsidePointerEvents: n.open,
956
951
  disableOutsideScroll: !0,
@@ -963,10 +958,10 @@ var se = "MenuContent", [Vs, zt] = _e(se), or = h.forwardRef(
963
958
  }
964
959
  );
965
960
  }
966
- ), qs = h.forwardRef((e, t) => {
967
- const n = De(se, e.__scopeMenu);
968
- return /* @__PURE__ */ o.jsx(
969
- Kt,
961
+ ), Zs = h.forwardRef((e, t) => {
962
+ const n = Te(ue, e.__scopeMenu);
963
+ return /* @__PURE__ */ a.jsx(
964
+ Qt,
970
965
  {
971
966
  ...e,
972
967
  ref: t,
@@ -976,128 +971,128 @@ var se = "MenuContent", [Vs, zt] = _e(se), or = h.forwardRef(
976
971
  onDismiss: () => n.onOpenChange(!1)
977
972
  }
978
973
  );
979
- }), Kt = h.forwardRef(
974
+ }), Qt = h.forwardRef(
980
975
  (e, t) => {
981
976
  const {
982
977
  __scopeMenu: n,
983
978
  loop: r = !1,
984
- trapFocus: a,
979
+ trapFocus: o,
985
980
  onOpenAutoFocus: s,
986
981
  onCloseAutoFocus: i,
987
982
  disableOutsidePointerEvents: l,
988
983
  onEntryFocus: u,
989
- onEscapeKeyDown: v,
990
- onPointerDownOutside: m,
984
+ onEscapeKeyDown: m,
985
+ onPointerDownOutside: f,
991
986
  onFocusOutside: c,
992
987
  onInteractOutside: d,
993
- onDismiss: f,
994
- disableOutsideScroll: y,
995
- ...R
996
- } = e, K = De(se, n), H = rt(se, n), q = nt(n), x = Zn(n), p = Hs(n), [E, N] = h.useState(null), P = h.useRef(null), _ = Ze(t, P, K.onContentChange), w = h.useRef(0), L = h.useRef(""), te = h.useRef(0), Q = h.useRef(null), V = h.useRef("right"), X = h.useRef(0), Oe = y ? na : h.Fragment, pe = y ? { as: ra, allowPinchZoom: !0 } : void 0, Be = (C) => {
997
- var le, ve;
998
- const U = L.current + C, Y = p().filter((re) => !re.disabled), ne = document.activeElement, je = (le = Y.find((re) => re.ref.current === ne)) == null ? void 0 : le.textValue, me = Y.map((re) => re.textValue), Me = ai(me, U, je), ge = (ve = Y.find((re) => re.textValue === Me)) == null ? void 0 : ve.ref.current;
999
- (function re(M) {
1000
- L.current = M, window.clearTimeout(w.current), M !== "" && (w.current = window.setTimeout(() => re(""), 1e3));
1001
- })(U), ge && setTimeout(() => ge.focus());
988
+ onDismiss: v,
989
+ disableOutsideScroll: M,
990
+ ...C
991
+ } = e, _ = Te(ue, n), R = it(ue, n), k = st(n), P = or(n), g = Qs(n), [z, Z] = h.useState(null), b = h.useRef(null), j = rt(t, b, _.onContentChange), D = h.useRef(0), B = h.useRef(""), K = h.useRef(0), W = h.useRef(null), x = h.useRef("right"), V = h.useRef(0), G = M ? lo : h.Fragment, te = M ? { as: co, allowPinchZoom: !0 } : void 0, q = (y) => {
992
+ var le, Re;
993
+ const Q = B.current + y, ie = g().filter((re) => !re.disabled), de = document.activeElement, pe = (le = ie.find((re) => re.ref.current === de)) == null ? void 0 : le.textValue, Me = ie.map((re) => re.textValue), ke = di(Me, Q, pe), ye = (Re = ie.find((re) => re.textValue === ke)) == null ? void 0 : Re.ref.current;
994
+ (function re($e) {
995
+ B.current = $e, window.clearTimeout(D.current), $e !== "" && (D.current = window.setTimeout(() => re(""), 1e3));
996
+ })(Q), ye && setTimeout(() => ye.focus());
1002
997
  };
1003
- h.useEffect(() => () => window.clearTimeout(w.current), []), Xo();
1004
- const ye = h.useCallback((C) => {
1005
- var Y, ne;
1006
- return V.current === ((Y = Q.current) == null ? void 0 : Y.side) && ii(C, (ne = Q.current) == null ? void 0 : ne.area);
998
+ h.useEffect(() => () => window.clearTimeout(D.current), []), ro();
999
+ const Y = h.useCallback((y) => {
1000
+ var ie, de;
1001
+ return x.current === ((ie = W.current) == null ? void 0 : ie.side) && hi(y, (de = W.current) == null ? void 0 : de.area);
1007
1002
  }, []);
1008
- return /* @__PURE__ */ o.jsx(
1009
- Vs,
1003
+ return /* @__PURE__ */ a.jsx(
1004
+ Xs,
1010
1005
  {
1011
1006
  scope: n,
1012
- searchRef: L,
1007
+ searchRef: B,
1013
1008
  onItemEnter: h.useCallback(
1014
- (C) => {
1015
- ye(C) && C.preventDefault();
1009
+ (y) => {
1010
+ Y(y) && y.preventDefault();
1016
1011
  },
1017
- [ye]
1012
+ [Y]
1018
1013
  ),
1019
1014
  onItemLeave: h.useCallback(
1020
- (C) => {
1021
- var U;
1022
- ye(C) || ((U = P.current) == null || U.focus(), N(null));
1015
+ (y) => {
1016
+ var Q;
1017
+ Y(y) || ((Q = b.current) == null || Q.focus(), Z(null));
1023
1018
  },
1024
- [ye]
1019
+ [Y]
1025
1020
  ),
1026
1021
  onTriggerLeave: h.useCallback(
1027
- (C) => {
1028
- ye(C) && C.preventDefault();
1022
+ (y) => {
1023
+ Y(y) && y.preventDefault();
1029
1024
  },
1030
- [ye]
1025
+ [Y]
1031
1026
  ),
1032
- pointerGraceTimerRef: te,
1033
- onPointerGraceIntentChange: h.useCallback((C) => {
1034
- Q.current = C;
1027
+ pointerGraceTimerRef: K,
1028
+ onPointerGraceIntentChange: h.useCallback((y) => {
1029
+ W.current = y;
1035
1030
  }, []),
1036
- children: /* @__PURE__ */ o.jsx(Oe, { ...pe, children: /* @__PURE__ */ o.jsx(
1037
- Jo,
1031
+ children: /* @__PURE__ */ a.jsx(G, { ...te, children: /* @__PURE__ */ a.jsx(
1032
+ ao,
1038
1033
  {
1039
1034
  asChild: !0,
1040
- trapped: a,
1041
- onMountAutoFocus: A(s, (C) => {
1042
- var U;
1043
- C.preventDefault(), (U = P.current) == null || U.focus({ preventScroll: !0 });
1035
+ trapped: o,
1036
+ onMountAutoFocus: A(s, (y) => {
1037
+ var Q;
1038
+ y.preventDefault(), (Q = b.current) == null || Q.focus({ preventScroll: !0 });
1044
1039
  }),
1045
1040
  onUnmountAutoFocus: i,
1046
- children: /* @__PURE__ */ o.jsx(
1047
- Zo,
1041
+ children: /* @__PURE__ */ a.jsx(
1042
+ oo,
1048
1043
  {
1049
1044
  asChild: !0,
1050
1045
  disableOutsidePointerEvents: l,
1051
- onEscapeKeyDown: v,
1052
- onPointerDownOutside: m,
1046
+ onEscapeKeyDown: m,
1047
+ onPointerDownOutside: f,
1053
1048
  onFocusOutside: c,
1054
1049
  onInteractOutside: d,
1055
- onDismiss: f,
1056
- children: /* @__PURE__ */ o.jsx(
1057
- za,
1050
+ onDismiss: v,
1051
+ children: /* @__PURE__ */ a.jsx(
1052
+ Yo,
1058
1053
  {
1059
1054
  asChild: !0,
1060
- ...x,
1061
- dir: H.dir,
1055
+ ...P,
1056
+ dir: R.dir,
1062
1057
  orientation: "vertical",
1063
1058
  loop: r,
1064
- currentTabStopId: E,
1065
- onCurrentTabStopIdChange: N,
1066
- onEntryFocus: A(u, (C) => {
1067
- H.isUsingKeyboardRef.current || C.preventDefault();
1059
+ currentTabStopId: z,
1060
+ onCurrentTabStopIdChange: Z,
1061
+ onEntryFocus: A(u, (y) => {
1062
+ R.isUsingKeyboardRef.current || y.preventDefault();
1068
1063
  }),
1069
1064
  preventScrollOnEntryFocus: !0,
1070
- children: /* @__PURE__ */ o.jsx(
1071
- ea,
1065
+ children: /* @__PURE__ */ a.jsx(
1066
+ so,
1072
1067
  {
1073
1068
  role: "menu",
1074
1069
  "aria-orientation": "vertical",
1075
- "data-state": yr(K.open),
1070
+ "data-state": Dr(_.open),
1076
1071
  "data-radix-menu-content": "",
1077
- dir: H.dir,
1078
- ...q,
1079
- ...R,
1080
- ref: _,
1081
- style: { outline: "none", ...R.style },
1082
- onKeyDown: A(R.onKeyDown, (C) => {
1083
- const Y = C.target.closest("[data-radix-menu-content]") === C.currentTarget, ne = C.ctrlKey || C.altKey || C.metaKey, je = C.key.length === 1;
1084
- Y && (C.key === "Tab" && C.preventDefault(), !ne && je && Be(C.key));
1085
- const me = P.current;
1086
- if (C.target !== me || !$s.includes(C.key)) return;
1087
- C.preventDefault();
1088
- const ge = p().filter((le) => !le.disabled).map((le) => le.ref.current);
1089
- Xn.includes(C.key) && ge.reverse(), ri(ge);
1072
+ dir: R.dir,
1073
+ ...k,
1074
+ ...C,
1075
+ ref: j,
1076
+ style: { outline: "none", ...C.style },
1077
+ onKeyDown: A(C.onKeyDown, (y) => {
1078
+ const ie = y.target.closest("[data-radix-menu-content]") === y.currentTarget, de = y.ctrlKey || y.altKey || y.metaKey, pe = y.key.length === 1;
1079
+ ie && (y.key === "Tab" && y.preventDefault(), !de && pe && q(y.key));
1080
+ const Me = b.current;
1081
+ if (y.target !== Me || !zs.includes(y.key)) return;
1082
+ y.preventDefault();
1083
+ const ye = g().filter((le) => !le.disabled).map((le) => le.ref.current);
1084
+ rr.includes(y.key) && ye.reverse(), ci(ye);
1090
1085
  }),
1091
- onBlur: A(e.onBlur, (C) => {
1092
- C.currentTarget.contains(C.target) || (window.clearTimeout(w.current), L.current = "");
1086
+ onBlur: A(e.onBlur, (y) => {
1087
+ y.currentTarget.contains(y.target) || (window.clearTimeout(D.current), B.current = "");
1093
1088
  }),
1094
1089
  onPointerMove: A(
1095
1090
  e.onPointerMove,
1096
- Xe((C) => {
1097
- const U = C.target, Y = X.current !== C.clientX;
1098
- if (C.currentTarget.contains(U) && Y) {
1099
- const ne = C.clientX > X.current ? "right" : "left";
1100
- V.current = ne, X.current = C.clientX;
1091
+ tt((y) => {
1092
+ const Q = y.target, ie = V.current !== y.clientX;
1093
+ if (y.currentTarget.contains(Q) && ie) {
1094
+ const de = y.clientX > V.current ? "right" : "left";
1095
+ x.current = de, V.current = y.clientX;
1101
1096
  }
1102
1097
  })
1103
1098
  )
@@ -1113,84 +1108,84 @@ var se = "MenuContent", [Vs, zt] = _e(se), or = h.forwardRef(
1113
1108
  );
1114
1109
  }
1115
1110
  );
1116
- or.displayName = se;
1117
- var Gs = "MenuGroup", Vt = h.forwardRef(
1111
+ ur.displayName = ue;
1112
+ var ei = "MenuGroup", Vt = h.forwardRef(
1118
1113
  (e, t) => {
1119
1114
  const { __scopeMenu: n, ...r } = e;
1120
- return /* @__PURE__ */ o.jsx(He.div, { role: "group", ...r, ref: t });
1115
+ return /* @__PURE__ */ a.jsx(Ke.div, { role: "group", ...r, ref: t });
1121
1116
  }
1122
1117
  );
1123
- Vt.displayName = Gs;
1124
- var Ws = "MenuLabel", ar = h.forwardRef(
1118
+ Vt.displayName = ei;
1119
+ var ti = "MenuLabel", dr = h.forwardRef(
1125
1120
  (e, t) => {
1126
1121
  const { __scopeMenu: n, ...r } = e;
1127
- return /* @__PURE__ */ o.jsx(He.div, { ...r, ref: t });
1122
+ return /* @__PURE__ */ a.jsx(Ke.div, { ...r, ref: t });
1128
1123
  }
1129
1124
  );
1130
- ar.displayName = Ws;
1131
- var pt = "MenuItem", wn = "menu.itemSelect", vt = h.forwardRef(
1125
+ dr.displayName = ti;
1126
+ var vt = "MenuItem", Mn = "menu.itemSelect", yt = h.forwardRef(
1132
1127
  (e, t) => {
1133
- const { disabled: n = !1, onSelect: r, ...a } = e, s = h.useRef(null), i = rt(pt, e.__scopeMenu), l = zt(pt, e.__scopeMenu), u = Ze(t, s), v = h.useRef(!1), m = () => {
1128
+ const { disabled: n = !1, onSelect: r, ...o } = e, s = h.useRef(null), i = it(vt, e.__scopeMenu), l = qt(vt, e.__scopeMenu), u = rt(t, s), m = h.useRef(!1), f = () => {
1134
1129
  const c = s.current;
1135
1130
  if (!n && c) {
1136
- const d = new CustomEvent(wn, { bubbles: !0, cancelable: !0 });
1137
- c.addEventListener(wn, (f) => r == null ? void 0 : r(f), { once: !0 }), oa(c, d), d.defaultPrevented ? v.current = !1 : i.onClose();
1131
+ const d = new CustomEvent(Mn, { bubbles: !0, cancelable: !0 });
1132
+ c.addEventListener(Mn, (v) => r == null ? void 0 : r(v), { once: !0 }), uo(c, d), d.defaultPrevented ? m.current = !1 : i.onClose();
1138
1133
  }
1139
1134
  };
1140
- return /* @__PURE__ */ o.jsx(
1141
- sr,
1135
+ return /* @__PURE__ */ a.jsx(
1136
+ fr,
1142
1137
  {
1143
- ...a,
1138
+ ...o,
1144
1139
  ref: u,
1145
1140
  disabled: n,
1146
- onClick: A(e.onClick, m),
1141
+ onClick: A(e.onClick, f),
1147
1142
  onPointerDown: (c) => {
1148
1143
  var d;
1149
- (d = e.onPointerDown) == null || d.call(e, c), v.current = !0;
1144
+ (d = e.onPointerDown) == null || d.call(e, c), m.current = !0;
1150
1145
  },
1151
1146
  onPointerUp: A(e.onPointerUp, (c) => {
1152
1147
  var d;
1153
- v.current || (d = c.currentTarget) == null || d.click();
1148
+ m.current || (d = c.currentTarget) == null || d.click();
1154
1149
  }),
1155
1150
  onKeyDown: A(e.onKeyDown, (c) => {
1156
1151
  const d = l.searchRef.current !== "";
1157
- n || d && c.key === " " || jt.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
1152
+ n || d && c.key === " " || Nt.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
1158
1153
  })
1159
1154
  }
1160
1155
  );
1161
1156
  }
1162
1157
  );
1163
- vt.displayName = pt;
1164
- var sr = h.forwardRef(
1158
+ yt.displayName = vt;
1159
+ var fr = h.forwardRef(
1165
1160
  (e, t) => {
1166
- const { __scopeMenu: n, disabled: r = !1, textValue: a, ...s } = e, i = zt(pt, n), l = Zn(n), u = h.useRef(null), v = Ze(t, u), [m, c] = h.useState(!1), [d, f] = h.useState("");
1161
+ const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = qt(vt, n), l = or(n), u = h.useRef(null), m = rt(t, u), [f, c] = h.useState(!1), [d, v] = h.useState("");
1167
1162
  return h.useEffect(() => {
1168
- const y = u.current;
1169
- y && f((y.textContent ?? "").trim());
1170
- }, [s.children]), /* @__PURE__ */ o.jsx(
1171
- Ye.ItemSlot,
1163
+ const M = u.current;
1164
+ M && v((M.textContent ?? "").trim());
1165
+ }, [s.children]), /* @__PURE__ */ a.jsx(
1166
+ et.ItemSlot,
1172
1167
  {
1173
1168
  scope: n,
1174
1169
  disabled: r,
1175
- textValue: a ?? d,
1176
- children: /* @__PURE__ */ o.jsx(Ka, { asChild: !0, ...l, focusable: !r, children: /* @__PURE__ */ o.jsx(
1177
- He.div,
1170
+ textValue: o ?? d,
1171
+ children: /* @__PURE__ */ a.jsx(Xo, { asChild: !0, ...l, focusable: !r, children: /* @__PURE__ */ a.jsx(
1172
+ Ke.div,
1178
1173
  {
1179
1174
  role: "menuitem",
1180
- "data-highlighted": m ? "" : void 0,
1175
+ "data-highlighted": f ? "" : void 0,
1181
1176
  "aria-disabled": r || void 0,
1182
1177
  "data-disabled": r ? "" : void 0,
1183
1178
  ...s,
1184
- ref: v,
1179
+ ref: m,
1185
1180
  onPointerMove: A(
1186
1181
  e.onPointerMove,
1187
- Xe((y) => {
1188
- r ? i.onItemLeave(y) : (i.onItemEnter(y), y.defaultPrevented || y.currentTarget.focus({ preventScroll: !0 }));
1182
+ tt((M) => {
1183
+ r ? i.onItemLeave(M) : (i.onItemEnter(M), M.defaultPrevented || M.currentTarget.focus({ preventScroll: !0 }));
1189
1184
  })
1190
1185
  ),
1191
1186
  onPointerLeave: A(
1192
1187
  e.onPointerLeave,
1193
- Xe((y) => i.onItemLeave(y))
1188
+ tt((M) => i.onItemLeave(M))
1194
1189
  ),
1195
1190
  onFocus: A(e.onFocus, () => c(!0)),
1196
1191
  onBlur: A(e.onBlur, () => c(!1))
@@ -1199,54 +1194,54 @@ var sr = h.forwardRef(
1199
1194
  }
1200
1195
  );
1201
1196
  }
1202
- ), Ys = "MenuCheckboxItem", ir = h.forwardRef(
1197
+ ), ni = "MenuCheckboxItem", hr = h.forwardRef(
1203
1198
  (e, t) => {
1204
- const { checked: n = !1, onCheckedChange: r, ...a } = e;
1205
- return /* @__PURE__ */ o.jsx(fr, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ o.jsx(
1206
- vt,
1199
+ const { checked: n = !1, onCheckedChange: r, ...o } = e;
1200
+ return /* @__PURE__ */ a.jsx(wr, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ a.jsx(
1201
+ yt,
1207
1202
  {
1208
1203
  role: "menuitemcheckbox",
1209
- "aria-checked": mt(n) ? "mixed" : n,
1210
- ...a,
1204
+ "aria-checked": wt(n) ? "mixed" : n,
1205
+ ...o,
1211
1206
  ref: t,
1212
- "data-state": Gt(n),
1207
+ "data-state": Yt(n),
1213
1208
  onSelect: A(
1214
- a.onSelect,
1215
- () => r == null ? void 0 : r(mt(n) ? !0 : !n),
1209
+ o.onSelect,
1210
+ () => r == null ? void 0 : r(wt(n) ? !0 : !n),
1216
1211
  { checkForDefaultPrevented: !1 }
1217
1212
  )
1218
1213
  }
1219
1214
  ) });
1220
1215
  }
1221
1216
  );
1222
- ir.displayName = Ys;
1223
- var lr = "MenuRadioGroup", [Xs, Js] = _e(
1224
- lr,
1217
+ hr.displayName = ni;
1218
+ var pr = "MenuRadioGroup", [ri, ai] = Ae(
1219
+ pr,
1225
1220
  { value: void 0, onValueChange: () => {
1226
1221
  } }
1227
- ), cr = h.forwardRef(
1222
+ ), mr = h.forwardRef(
1228
1223
  (e, t) => {
1229
- const { value: n, onValueChange: r, ...a } = e, s = At(r);
1230
- return /* @__PURE__ */ o.jsx(Xs, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ o.jsx(Vt, { ...a, ref: t }) });
1224
+ const { value: n, onValueChange: r, ...o } = e, s = $t(r);
1225
+ return /* @__PURE__ */ a.jsx(ri, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ a.jsx(Vt, { ...o, ref: t }) });
1231
1226
  }
1232
1227
  );
1233
- cr.displayName = lr;
1234
- var ur = "MenuRadioItem", dr = h.forwardRef(
1228
+ mr.displayName = pr;
1229
+ var gr = "MenuRadioItem", vr = h.forwardRef(
1235
1230
  (e, t) => {
1236
- const { value: n, ...r } = e, a = Js(ur, e.__scopeMenu), s = n === a.value;
1237
- return /* @__PURE__ */ o.jsx(fr, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ o.jsx(
1238
- vt,
1231
+ const { value: n, ...r } = e, o = ai(gr, e.__scopeMenu), s = n === o.value;
1232
+ return /* @__PURE__ */ a.jsx(wr, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ a.jsx(
1233
+ yt,
1239
1234
  {
1240
1235
  role: "menuitemradio",
1241
1236
  "aria-checked": s,
1242
1237
  ...r,
1243
1238
  ref: t,
1244
- "data-state": Gt(s),
1239
+ "data-state": Yt(s),
1245
1240
  onSelect: A(
1246
1241
  r.onSelect,
1247
1242
  () => {
1248
1243
  var i;
1249
- return (i = a.onValueChange) == null ? void 0 : i.call(a, n);
1244
+ return (i = o.onValueChange) == null ? void 0 : i.call(o, n);
1250
1245
  },
1251
1246
  { checkForDefaultPrevented: !1 }
1252
1247
  )
@@ -1254,35 +1249,35 @@ var ur = "MenuRadioItem", dr = h.forwardRef(
1254
1249
  ) });
1255
1250
  }
1256
1251
  );
1257
- dr.displayName = ur;
1258
- var Qt = "MenuItemIndicator", [fr, Zs] = _e(
1259
- Qt,
1252
+ vr.displayName = gr;
1253
+ var Gt = "MenuItemIndicator", [wr, oi] = Ae(
1254
+ Gt,
1260
1255
  { checked: !1 }
1261
- ), hr = h.forwardRef(
1256
+ ), xr = h.forwardRef(
1262
1257
  (e, t) => {
1263
- const { __scopeMenu: n, forceMount: r, ...a } = e, s = Zs(Qt, n);
1264
- return /* @__PURE__ */ o.jsx(
1265
- gt,
1258
+ const { __scopeMenu: n, forceMount: r, ...o } = e, s = oi(Gt, n);
1259
+ return /* @__PURE__ */ a.jsx(
1260
+ xt,
1266
1261
  {
1267
- present: r || mt(s.checked) || s.checked === !0,
1268
- children: /* @__PURE__ */ o.jsx(
1269
- He.span,
1262
+ present: r || wt(s.checked) || s.checked === !0,
1263
+ children: /* @__PURE__ */ a.jsx(
1264
+ Ke.span,
1270
1265
  {
1271
- ...a,
1266
+ ...o,
1272
1267
  ref: t,
1273
- "data-state": Gt(s.checked)
1268
+ "data-state": Yt(s.checked)
1274
1269
  }
1275
1270
  )
1276
1271
  }
1277
1272
  );
1278
1273
  }
1279
1274
  );
1280
- hr.displayName = Qt;
1281
- var ei = "MenuSeparator", pr = h.forwardRef(
1275
+ xr.displayName = Gt;
1276
+ var si = "MenuSeparator", yr = h.forwardRef(
1282
1277
  (e, t) => {
1283
1278
  const { __scopeMenu: n, ...r } = e;
1284
- return /* @__PURE__ */ o.jsx(
1285
- He.div,
1279
+ return /* @__PURE__ */ a.jsx(
1280
+ Ke.div,
1286
1281
  {
1287
1282
  role: "separator",
1288
1283
  "aria-orientation": "horizontal",
@@ -1292,30 +1287,30 @@ var ei = "MenuSeparator", pr = h.forwardRef(
1292
1287
  );
1293
1288
  }
1294
1289
  );
1295
- pr.displayName = ei;
1296
- var ti = "MenuArrow", mr = h.forwardRef(
1290
+ yr.displayName = si;
1291
+ var ii = "MenuArrow", br = h.forwardRef(
1297
1292
  (e, t) => {
1298
- const { __scopeMenu: n, ...r } = e, a = nt(n);
1299
- return /* @__PURE__ */ o.jsx(ta, { ...a, ...r, ref: t });
1293
+ const { __scopeMenu: n, ...r } = e, o = st(n);
1294
+ return /* @__PURE__ */ a.jsx(io, { ...o, ...r, ref: t });
1300
1295
  }
1301
1296
  );
1302
- mr.displayName = ti;
1303
- var qt = "MenuSub", [ni, gr] = _e(qt), vr = (e) => {
1304
- const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: a } = e, s = De(qt, t), i = nt(t), [l, u] = h.useState(null), [v, m] = h.useState(null), c = At(a);
1305
- return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */ o.jsx(On, { ...i, children: /* @__PURE__ */ o.jsx(
1306
- er,
1297
+ br.displayName = ii;
1298
+ var Wt = "MenuSub", [li, Sr] = Ae(Wt), Cr = (e) => {
1299
+ const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, s = Te(Wt, t), i = st(t), [l, u] = h.useState(null), [m, f] = h.useState(null), c = $t(o);
1300
+ return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */ a.jsx(Ln, { ...i, children: /* @__PURE__ */ a.jsx(
1301
+ sr,
1307
1302
  {
1308
1303
  scope: t,
1309
1304
  open: r,
1310
1305
  onOpenChange: c,
1311
- content: v,
1312
- onContentChange: m,
1313
- children: /* @__PURE__ */ o.jsx(
1314
- ni,
1306
+ content: m,
1307
+ onContentChange: f,
1308
+ children: /* @__PURE__ */ a.jsx(
1309
+ li,
1315
1310
  {
1316
1311
  scope: t,
1317
- contentId: ht(),
1318
- triggerId: ht(),
1312
+ contentId: gt(),
1313
+ triggerId: gt(),
1319
1314
  trigger: l,
1320
1315
  onTriggerChange: u,
1321
1316
  children: n
@@ -1324,58 +1319,58 @@ var qt = "MenuSub", [ni, gr] = _e(qt), vr = (e) => {
1324
1319
  }
1325
1320
  ) });
1326
1321
  };
1327
- vr.displayName = qt;
1328
- var qe = "MenuSubTrigger", wr = h.forwardRef(
1322
+ Cr.displayName = Wt;
1323
+ var Xe = "MenuSubTrigger", Mr = h.forwardRef(
1329
1324
  (e, t) => {
1330
- const n = De(qe, e.__scopeMenu), r = rt(qe, e.__scopeMenu), a = gr(qe, e.__scopeMenu), s = zt(qe, e.__scopeMenu), i = h.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, v = { __scopeMenu: e.__scopeMenu }, m = h.useCallback(() => {
1325
+ const n = Te(Xe, e.__scopeMenu), r = it(Xe, e.__scopeMenu), o = Sr(Xe, e.__scopeMenu), s = qt(Xe, e.__scopeMenu), i = h.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, m = { __scopeMenu: e.__scopeMenu }, f = h.useCallback(() => {
1331
1326
  i.current && window.clearTimeout(i.current), i.current = null;
1332
1327
  }, []);
1333
- return h.useEffect(() => m, [m]), h.useEffect(() => {
1328
+ return h.useEffect(() => f, [f]), h.useEffect(() => {
1334
1329
  const c = l.current;
1335
1330
  return () => {
1336
1331
  window.clearTimeout(c), u(null);
1337
1332
  };
1338
- }, [l, u]), /* @__PURE__ */ o.jsx(Ut, { asChild: !0, ...v, children: /* @__PURE__ */ o.jsx(
1339
- sr,
1333
+ }, [l, u]), /* @__PURE__ */ a.jsx(zt, { asChild: !0, ...m, children: /* @__PURE__ */ a.jsx(
1334
+ fr,
1340
1335
  {
1341
- id: a.triggerId,
1336
+ id: o.triggerId,
1342
1337
  "aria-haspopup": "menu",
1343
1338
  "aria-expanded": n.open,
1344
- "aria-controls": a.contentId,
1345
- "data-state": yr(n.open),
1339
+ "aria-controls": o.contentId,
1340
+ "data-state": Dr(n.open),
1346
1341
  ...e,
1347
- ref: _n(t, a.onTriggerChange),
1342
+ ref: Fn(t, o.onTriggerChange),
1348
1343
  onClick: (c) => {
1349
1344
  var d;
1350
1345
  (d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), n.open || n.onOpenChange(!0));
1351
1346
  },
1352
1347
  onPointerMove: A(
1353
1348
  e.onPointerMove,
1354
- Xe((c) => {
1349
+ tt((c) => {
1355
1350
  s.onItemEnter(c), !c.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
1356
- n.onOpenChange(!0), m();
1351
+ n.onOpenChange(!0), f();
1357
1352
  }, 100));
1358
1353
  })
1359
1354
  ),
1360
1355
  onPointerLeave: A(
1361
1356
  e.onPointerLeave,
1362
- Xe((c) => {
1363
- var f, y;
1364
- m();
1365
- const d = (f = n.content) == null ? void 0 : f.getBoundingClientRect();
1357
+ tt((c) => {
1358
+ var v, M;
1359
+ f();
1360
+ const d = (v = n.content) == null ? void 0 : v.getBoundingClientRect();
1366
1361
  if (d) {
1367
- const R = (y = n.content) == null ? void 0 : y.dataset.side, K = R === "right", H = K ? -5 : 5, q = d[K ? "left" : "right"], x = d[K ? "right" : "left"];
1362
+ const C = (M = n.content) == null ? void 0 : M.dataset.side, _ = C === "right", R = _ ? -5 : 5, k = d[_ ? "left" : "right"], P = d[_ ? "right" : "left"];
1368
1363
  s.onPointerGraceIntentChange({
1369
1364
  area: [
1370
1365
  // Apply a bleed on clientX to ensure that our exit point is
1371
1366
  // consistently within polygon bounds
1372
- { x: c.clientX + H, y: c.clientY },
1373
- { x: q, y: d.top },
1374
- { x, y: d.top },
1375
- { x, y: d.bottom },
1376
- { x: q, y: d.bottom }
1367
+ { x: c.clientX + R, y: c.clientY },
1368
+ { x: k, y: d.top },
1369
+ { x: P, y: d.top },
1370
+ { x: P, y: d.bottom },
1371
+ { x: k, y: d.bottom }
1377
1372
  ],
1378
- side: R
1373
+ side: C
1379
1374
  }), window.clearTimeout(l.current), l.current = window.setTimeout(
1380
1375
  () => s.onPointerGraceIntentChange(null),
1381
1376
  300
@@ -1387,132 +1382,132 @@ var qe = "MenuSubTrigger", wr = h.forwardRef(
1387
1382
  })
1388
1383
  ),
1389
1384
  onKeyDown: A(e.onKeyDown, (c) => {
1390
- var f;
1385
+ var v;
1391
1386
  const d = s.searchRef.current !== "";
1392
- e.disabled || d && c.key === " " || Ls[r.dir].includes(c.key) && (n.onOpenChange(!0), (f = n.content) == null || f.focus(), c.preventDefault());
1387
+ e.disabled || d && c.key === " " || Ks[r.dir].includes(c.key) && (n.onOpenChange(!0), (v = n.content) == null || v.focus(), c.preventDefault());
1393
1388
  })
1394
1389
  }
1395
1390
  ) });
1396
1391
  }
1397
1392
  );
1398
- wr.displayName = qe;
1399
- var br = "MenuSubContent", xr = h.forwardRef(
1393
+ Mr.displayName = Xe;
1394
+ var Rr = "MenuSubContent", Er = h.forwardRef(
1400
1395
  (e, t) => {
1401
- const n = nr(se, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, s = De(se, e.__scopeMenu), i = rt(se, e.__scopeMenu), l = gr(br, e.__scopeMenu), u = h.useRef(null), v = Ze(t, u);
1402
- return /* @__PURE__ */ o.jsx(Ye.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(gt, { present: r || s.open, children: /* @__PURE__ */ o.jsx(Ye.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(
1403
- Kt,
1396
+ const n = lr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu), l = Sr(Rr, e.__scopeMenu), u = h.useRef(null), m = rt(t, u);
1397
+ return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(
1398
+ Qt,
1404
1399
  {
1405
1400
  id: l.contentId,
1406
1401
  "aria-labelledby": l.triggerId,
1407
- ...a,
1408
- ref: v,
1402
+ ...o,
1403
+ ref: m,
1409
1404
  align: "start",
1410
1405
  side: i.dir === "rtl" ? "left" : "right",
1411
1406
  disableOutsidePointerEvents: !1,
1412
1407
  disableOutsideScroll: !1,
1413
1408
  trapFocus: !1,
1414
- onOpenAutoFocus: (m) => {
1409
+ onOpenAutoFocus: (f) => {
1415
1410
  var c;
1416
- i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), m.preventDefault();
1411
+ i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), f.preventDefault();
1417
1412
  },
1418
- onCloseAutoFocus: (m) => m.preventDefault(),
1419
- onFocusOutside: A(e.onFocusOutside, (m) => {
1420
- m.target !== l.trigger && s.onOpenChange(!1);
1413
+ onCloseAutoFocus: (f) => f.preventDefault(),
1414
+ onFocusOutside: A(e.onFocusOutside, (f) => {
1415
+ f.target !== l.trigger && s.onOpenChange(!1);
1421
1416
  }),
1422
- onEscapeKeyDown: A(e.onEscapeKeyDown, (m) => {
1423
- i.onClose(), m.preventDefault();
1417
+ onEscapeKeyDown: A(e.onEscapeKeyDown, (f) => {
1418
+ i.onClose(), f.preventDefault();
1424
1419
  }),
1425
- onKeyDown: A(e.onKeyDown, (m) => {
1426
- var f;
1427
- const c = m.currentTarget.contains(m.target), d = Fs[i.dir].includes(m.key);
1428
- c && d && (s.onOpenChange(!1), (f = l.trigger) == null || f.focus(), m.preventDefault());
1420
+ onKeyDown: A(e.onKeyDown, (f) => {
1421
+ var v;
1422
+ const c = f.currentTarget.contains(f.target), d = qs[i.dir].includes(f.key);
1423
+ c && d && (s.onOpenChange(!1), (v = l.trigger) == null || v.focus(), f.preventDefault());
1429
1424
  })
1430
1425
  }
1431
1426
  ) }) }) });
1432
1427
  }
1433
1428
  );
1434
- xr.displayName = br;
1435
- function yr(e) {
1429
+ Er.displayName = Rr;
1430
+ function Dr(e) {
1436
1431
  return e ? "open" : "closed";
1437
1432
  }
1438
- function mt(e) {
1433
+ function wt(e) {
1439
1434
  return e === "indeterminate";
1440
1435
  }
1441
- function Gt(e) {
1442
- return mt(e) ? "indeterminate" : e ? "checked" : "unchecked";
1436
+ function Yt(e) {
1437
+ return wt(e) ? "indeterminate" : e ? "checked" : "unchecked";
1443
1438
  }
1444
- function ri(e) {
1439
+ function ci(e) {
1445
1440
  const t = document.activeElement;
1446
1441
  for (const n of e)
1447
1442
  if (n === t || (n.focus(), document.activeElement !== t)) return;
1448
1443
  }
1449
- function oi(e, t) {
1444
+ function ui(e, t) {
1450
1445
  return e.map((n, r) => e[(t + r) % e.length]);
1451
1446
  }
1452
- function ai(e, t, n) {
1453
- const a = t.length > 1 && Array.from(t).every((v) => v === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
1454
- let i = oi(e, Math.max(s, 0));
1455
- a.length === 1 && (i = i.filter((v) => v !== n));
1447
+ function di(e, t, n) {
1448
+ const o = t.length > 1 && Array.from(t).every((m) => m === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
1449
+ let i = ui(e, Math.max(s, 0));
1450
+ o.length === 1 && (i = i.filter((m) => m !== n));
1456
1451
  const u = i.find(
1457
- (v) => v.toLowerCase().startsWith(a.toLowerCase())
1452
+ (m) => m.toLowerCase().startsWith(o.toLowerCase())
1458
1453
  );
1459
1454
  return u !== n ? u : void 0;
1460
1455
  }
1461
- function si(e, t) {
1456
+ function fi(e, t) {
1462
1457
  const { x: n, y: r } = e;
1463
- let a = !1;
1458
+ let o = !1;
1464
1459
  for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
1465
- const l = t[s].x, u = t[s].y, v = t[i].x, m = t[i].y;
1466
- u > r != m > r && n < (v - l) * (r - u) / (m - u) + l && (a = !a);
1460
+ const l = t[s].x, u = t[s].y, m = t[i].x, f = t[i].y;
1461
+ u > r != f > r && n < (m - l) * (r - u) / (f - u) + l && (o = !o);
1467
1462
  }
1468
- return a;
1463
+ return o;
1469
1464
  }
1470
- function ii(e, t) {
1465
+ function hi(e, t) {
1471
1466
  if (!t) return !1;
1472
1467
  const n = { x: e.clientX, y: e.clientY };
1473
- return si(n, t);
1468
+ return fi(n, t);
1474
1469
  }
1475
- function Xe(e) {
1470
+ function tt(e) {
1476
1471
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
1477
1472
  }
1478
- var li = tr, ci = Ut, ui = rr, di = or, fi = Vt, hi = ar, pi = vt, mi = ir, gi = cr, vi = dr, wi = hr, bi = pr, xi = mr, yi = vr, Mi = wr, Si = xr, Wt = "DropdownMenu", [Ci, Jl] = Pn(
1479
- Wt,
1480
- [Jn]
1481
- ), W = Jn(), [Ei, Mr] = Ci(Wt), Sr = (e) => {
1473
+ var pi = ir, mi = zt, gi = cr, vi = ur, wi = Vt, xi = dr, yi = yt, bi = hr, Si = mr, Ci = vr, Mi = xr, Ri = yr, Ei = br, Di = Cr, Pi = Mr, ji = Er, Xt = "DropdownMenu", [Ni, uc] = kn(
1474
+ Xt,
1475
+ [ar]
1476
+ ), J = ar(), [Ti, Pr] = Ni(Xt), jr = (e) => {
1482
1477
  const {
1483
1478
  __scopeDropdownMenu: t,
1484
1479
  children: n,
1485
1480
  dir: r,
1486
- open: a,
1481
+ open: o,
1487
1482
  defaultOpen: s,
1488
1483
  onOpenChange: i,
1489
1484
  modal: l = !0
1490
- } = e, u = W(t), v = h.useRef(null), [m = !1, c] = In({
1491
- prop: a,
1485
+ } = e, u = J(t), m = h.useRef(null), [f = !1, c] = Bn({
1486
+ prop: o,
1492
1487
  defaultProp: s,
1493
1488
  onChange: i
1494
1489
  });
1495
- return /* @__PURE__ */ o.jsx(
1496
- Ei,
1490
+ return /* @__PURE__ */ a.jsx(
1491
+ Ti,
1497
1492
  {
1498
1493
  scope: t,
1499
- triggerId: ht(),
1500
- triggerRef: v,
1501
- contentId: ht(),
1502
- open: m,
1494
+ triggerId: gt(),
1495
+ triggerRef: m,
1496
+ contentId: gt(),
1497
+ open: f,
1503
1498
  onOpenChange: c,
1504
1499
  onOpenToggle: h.useCallback(() => c((d) => !d), [c]),
1505
1500
  modal: l,
1506
- children: /* @__PURE__ */ o.jsx(li, { ...u, open: m, onOpenChange: c, dir: r, modal: l, children: n })
1501
+ children: /* @__PURE__ */ a.jsx(pi, { ...u, open: f, onOpenChange: c, dir: r, modal: l, children: n })
1507
1502
  }
1508
1503
  );
1509
1504
  };
1510
- Sr.displayName = Wt;
1511
- var Cr = "DropdownMenuTrigger", Er = h.forwardRef(
1505
+ jr.displayName = Xt;
1506
+ var Nr = "DropdownMenuTrigger", Tr = h.forwardRef(
1512
1507
  (e, t) => {
1513
- const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = e, s = Mr(Cr, n), i = W(n);
1514
- return /* @__PURE__ */ o.jsx(ci, { asChild: !0, ...i, children: /* @__PURE__ */ o.jsx(
1515
- He.button,
1508
+ const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Pr(Nr, n), i = J(n);
1509
+ return /* @__PURE__ */ a.jsx(mi, { asChild: !0, ...i, children: /* @__PURE__ */ a.jsx(
1510
+ Ke.button,
1516
1511
  {
1517
1512
  type: "button",
1518
1513
  id: s.triggerId,
@@ -1522,8 +1517,8 @@ var Cr = "DropdownMenuTrigger", Er = h.forwardRef(
1522
1517
  "data-state": s.open ? "open" : "closed",
1523
1518
  "data-disabled": r ? "" : void 0,
1524
1519
  disabled: r,
1525
- ...a,
1526
- ref: _n(t, s.triggerRef),
1520
+ ...o,
1521
+ ref: Fn(t, s.triggerRef),
1527
1522
  onPointerDown: A(e.onPointerDown, (l) => {
1528
1523
  !r && l.button === 0 && l.ctrlKey === !1 && (s.onOpenToggle(), s.open || l.preventDefault());
1529
1524
  }),
@@ -1534,30 +1529,30 @@ var Cr = "DropdownMenuTrigger", Er = h.forwardRef(
1534
1529
  ) });
1535
1530
  }
1536
1531
  );
1537
- Er.displayName = Cr;
1538
- var Ri = "DropdownMenuPortal", Rr = (e) => {
1539
- const { __scopeDropdownMenu: t, ...n } = e, r = W(t);
1540
- return /* @__PURE__ */ o.jsx(ui, { ...r, ...n });
1532
+ Tr.displayName = Nr;
1533
+ var _i = "DropdownMenuPortal", _r = (e) => {
1534
+ const { __scopeDropdownMenu: t, ...n } = e, r = J(t);
1535
+ return /* @__PURE__ */ a.jsx(gi, { ...r, ...n });
1541
1536
  };
1542
- Rr.displayName = Ri;
1543
- var Dr = "DropdownMenuContent", jr = h.forwardRef(
1537
+ _r.displayName = _i;
1538
+ var Or = "DropdownMenuContent", Ir = h.forwardRef(
1544
1539
  (e, t) => {
1545
- const { __scopeDropdownMenu: n, ...r } = e, a = Mr(Dr, n), s = W(n), i = h.useRef(!1);
1546
- return /* @__PURE__ */ o.jsx(
1547
- di,
1540
+ const { __scopeDropdownMenu: n, ...r } = e, o = Pr(Or, n), s = J(n), i = h.useRef(!1);
1541
+ return /* @__PURE__ */ a.jsx(
1542
+ vi,
1548
1543
  {
1549
- id: a.contentId,
1550
- "aria-labelledby": a.triggerId,
1544
+ id: o.contentId,
1545
+ "aria-labelledby": o.triggerId,
1551
1546
  ...s,
1552
1547
  ...r,
1553
1548
  ref: t,
1554
1549
  onCloseAutoFocus: A(e.onCloseAutoFocus, (l) => {
1555
1550
  var u;
1556
- i.current || (u = a.triggerRef.current) == null || u.focus(), i.current = !1, l.preventDefault();
1551
+ i.current || (u = o.triggerRef.current) == null || u.focus(), i.current = !1, l.preventDefault();
1557
1552
  }),
1558
1553
  onInteractOutside: A(e.onInteractOutside, (l) => {
1559
- const u = l.detail.originalEvent, v = u.button === 0 && u.ctrlKey === !0, m = u.button === 2 || v;
1560
- (!a.modal || m) && (i.current = !0);
1554
+ const u = l.detail.originalEvent, m = u.button === 0 && u.ctrlKey === !0, f = u.button === 2 || m;
1555
+ (!o.modal || f) && (i.current = !0);
1561
1556
  }),
1562
1557
  style: {
1563
1558
  ...e.style,
@@ -1571,78 +1566,78 @@ var Dr = "DropdownMenuContent", jr = h.forwardRef(
1571
1566
  );
1572
1567
  }
1573
1568
  );
1574
- jr.displayName = Dr;
1575
- var Di = "DropdownMenuGroup", ji = h.forwardRef(
1569
+ Ir.displayName = Or;
1570
+ var Oi = "DropdownMenuGroup", Ii = h.forwardRef(
1576
1571
  (e, t) => {
1577
- const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
1578
- return /* @__PURE__ */ o.jsx(fi, { ...a, ...r, ref: t });
1572
+ const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1573
+ return /* @__PURE__ */ a.jsx(wi, { ...o, ...r, ref: t });
1579
1574
  }
1580
1575
  );
1581
- ji.displayName = Di;
1582
- var Ni = "DropdownMenuLabel", Nr = h.forwardRef(
1576
+ Ii.displayName = Oi;
1577
+ var Ai = "DropdownMenuLabel", Ar = h.forwardRef(
1583
1578
  (e, t) => {
1584
- const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
1585
- return /* @__PURE__ */ o.jsx(hi, { ...a, ...r, ref: t });
1579
+ const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1580
+ return /* @__PURE__ */ a.jsx(xi, { ...o, ...r, ref: t });
1586
1581
  }
1587
1582
  );
1588
- Nr.displayName = Ni;
1589
- var Pi = "DropdownMenuItem", Pr = h.forwardRef(
1583
+ Ar.displayName = Ai;
1584
+ var ki = "DropdownMenuItem", kr = h.forwardRef(
1590
1585
  (e, t) => {
1591
- const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
1592
- return /* @__PURE__ */ o.jsx(pi, { ...a, ...r, ref: t });
1586
+ const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1587
+ return /* @__PURE__ */ a.jsx(yi, { ...o, ...r, ref: t });
1593
1588
  }
1594
1589
  );
1595
- Pr.displayName = Pi;
1596
- var Ti = "DropdownMenuCheckboxItem", Tr = h.forwardRef((e, t) => {
1597
- const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
1598
- return /* @__PURE__ */ o.jsx(mi, { ...a, ...r, ref: t });
1590
+ kr.displayName = ki;
1591
+ var $i = "DropdownMenuCheckboxItem", $r = h.forwardRef((e, t) => {
1592
+ const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1593
+ return /* @__PURE__ */ a.jsx(bi, { ...o, ...r, ref: t });
1599
1594
  });
1600
- Tr.displayName = Ti;
1601
- var _i = "DropdownMenuRadioGroup", Oi = h.forwardRef((e, t) => {
1602
- const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
1603
- return /* @__PURE__ */ o.jsx(gi, { ...a, ...r, ref: t });
1595
+ $r.displayName = $i;
1596
+ var Fi = "DropdownMenuRadioGroup", Li = h.forwardRef((e, t) => {
1597
+ const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1598
+ return /* @__PURE__ */ a.jsx(Si, { ...o, ...r, ref: t });
1604
1599
  });
1605
- Oi.displayName = _i;
1606
- var Ii = "DropdownMenuRadioItem", _r = h.forwardRef((e, t) => {
1607
- const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
1608
- return /* @__PURE__ */ o.jsx(vi, { ...a, ...r, ref: t });
1600
+ Li.displayName = Fi;
1601
+ var Bi = "DropdownMenuRadioItem", Fr = h.forwardRef((e, t) => {
1602
+ const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1603
+ return /* @__PURE__ */ a.jsx(Ci, { ...o, ...r, ref: t });
1609
1604
  });
1610
- _r.displayName = Ii;
1611
- var Ai = "DropdownMenuItemIndicator", Or = h.forwardRef((e, t) => {
1612
- const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
1613
- return /* @__PURE__ */ o.jsx(wi, { ...a, ...r, ref: t });
1605
+ Fr.displayName = Bi;
1606
+ var Hi = "DropdownMenuItemIndicator", Lr = h.forwardRef((e, t) => {
1607
+ const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1608
+ return /* @__PURE__ */ a.jsx(Mi, { ...o, ...r, ref: t });
1614
1609
  });
1615
- Or.displayName = Ai;
1616
- var ki = "DropdownMenuSeparator", Ir = h.forwardRef((e, t) => {
1617
- const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
1618
- return /* @__PURE__ */ o.jsx(bi, { ...a, ...r, ref: t });
1610
+ Lr.displayName = Hi;
1611
+ var Ui = "DropdownMenuSeparator", Br = h.forwardRef((e, t) => {
1612
+ const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1613
+ return /* @__PURE__ */ a.jsx(Ri, { ...o, ...r, ref: t });
1619
1614
  });
1620
- Ir.displayName = ki;
1621
- var $i = "DropdownMenuArrow", Li = h.forwardRef(
1615
+ Br.displayName = Ui;
1616
+ var zi = "DropdownMenuArrow", Ki = h.forwardRef(
1622
1617
  (e, t) => {
1623
- const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
1624
- return /* @__PURE__ */ o.jsx(xi, { ...a, ...r, ref: t });
1618
+ const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1619
+ return /* @__PURE__ */ a.jsx(Ei, { ...o, ...r, ref: t });
1625
1620
  }
1626
1621
  );
1627
- Li.displayName = $i;
1628
- var Fi = (e) => {
1629
- const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: a, defaultOpen: s } = e, i = W(t), [l = !1, u] = In({
1622
+ Ki.displayName = zi;
1623
+ var qi = (e) => {
1624
+ const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i = J(t), [l = !1, u] = Bn({
1630
1625
  prop: r,
1631
1626
  defaultProp: s,
1632
- onChange: a
1627
+ onChange: o
1633
1628
  });
1634
- return /* @__PURE__ */ o.jsx(yi, { ...i, open: l, onOpenChange: u, children: n });
1635
- }, Hi = "DropdownMenuSubTrigger", Ar = h.forwardRef((e, t) => {
1636
- const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
1637
- return /* @__PURE__ */ o.jsx(Mi, { ...a, ...r, ref: t });
1629
+ return /* @__PURE__ */ a.jsx(Di, { ...i, open: l, onOpenChange: u, children: n });
1630
+ }, Qi = "DropdownMenuSubTrigger", Hr = h.forwardRef((e, t) => {
1631
+ const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1632
+ return /* @__PURE__ */ a.jsx(Pi, { ...o, ...r, ref: t });
1638
1633
  });
1639
- Ar.displayName = Hi;
1640
- var Ui = "DropdownMenuSubContent", kr = h.forwardRef((e, t) => {
1641
- const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
1642
- return /* @__PURE__ */ o.jsx(
1643
- Si,
1634
+ Hr.displayName = Qi;
1635
+ var Vi = "DropdownMenuSubContent", Ur = h.forwardRef((e, t) => {
1636
+ const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1637
+ return /* @__PURE__ */ a.jsx(
1638
+ ji,
1644
1639
  {
1645
- ...a,
1640
+ ...o,
1646
1641
  ...r,
1647
1642
  ref: t,
1648
1643
  style: {
@@ -1656,12 +1651,12 @@ var Ui = "DropdownMenuSubContent", kr = h.forwardRef((e, t) => {
1656
1651
  }
1657
1652
  );
1658
1653
  });
1659
- kr.displayName = Ui;
1660
- var Bi = Sr, zi = Er, $r = Rr, Lr = jr, Fr = Nr, Hr = Pr, Ur = Tr, Br = _r, zr = Or, Kr = Ir, Ki = Fi, Vr = Ar, Qr = kr;
1661
- const Vi = Bi, Qi = zi, qi = $r, Gi = Ki, qr = h.forwardRef(({ className: e, inset: t, children: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
1662
- Vr,
1654
+ Ur.displayName = Vi;
1655
+ var Gi = jr, Wi = Tr, zr = _r, Kr = Ir, qr = Ar, Qr = kr, Vr = $r, Gr = Fr, Wr = Lr, Yr = Br, Yi = qi, Xr = Hr, Jr = Ur;
1656
+ const Xi = Gi, Ji = Wi, Zi = zr, el = Yi, Zr = h.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
1657
+ Xr,
1663
1658
  {
1664
- ref: a,
1659
+ ref: o,
1665
1660
  className: O(
1666
1661
  "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
1667
1662
  t && "pl-8",
@@ -1670,13 +1665,13 @@ const Vi = Bi, Qi = zi, qi = $r, Gi = Ki, qr = h.forwardRef(({ className: e, ins
1670
1665
  ...r,
1671
1666
  children: [
1672
1667
  n,
1673
- /* @__PURE__ */ o.jsx(Vn, { className: "ml-auto h-4 w-4" })
1668
+ /* @__PURE__ */ a.jsx(Xn, { className: "ml-auto h-4 w-4" })
1674
1669
  ]
1675
1670
  }
1676
1671
  ));
1677
- qr.displayName = Vr.displayName;
1678
- const Gr = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
1679
- Qr,
1672
+ Zr.displayName = Xr.displayName;
1673
+ const ea = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
1674
+ Jr,
1680
1675
  {
1681
1676
  ref: n,
1682
1677
  className: O(
@@ -1686,9 +1681,9 @@ const Gr = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
1686
1681
  ...t
1687
1682
  }
1688
1683
  ));
1689
- Gr.displayName = Qr.displayName;
1690
- const Wr = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ o.jsx($r, { children: /* @__PURE__ */ o.jsx(
1691
- Lr,
1684
+ ea.displayName = Jr.displayName;
1685
+ const ta = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ a.jsx(zr, { children: /* @__PURE__ */ a.jsx(
1686
+ Kr,
1692
1687
  {
1693
1688
  ref: r,
1694
1689
  sideOffset: t,
@@ -1700,9 +1695,9 @@ const Wr = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
1700
1695
  ...n
1701
1696
  }
1702
1697
  ) }));
1703
- Wr.displayName = Lr.displayName;
1704
- const Yr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ o.jsx(
1705
- Hr,
1698
+ ta.displayName = Kr.displayName;
1699
+ const na = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
1700
+ Qr,
1706
1701
  {
1707
1702
  ref: r,
1708
1703
  className: O(
@@ -1713,11 +1708,11 @@ const Yr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
1713
1708
  ...n
1714
1709
  }
1715
1710
  ));
1716
- Yr.displayName = Hr.displayName;
1717
- const Wi = h.forwardRef(({ className: e, children: t, checked: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
1718
- Ur,
1711
+ na.displayName = Qr.displayName;
1712
+ const tl = h.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
1713
+ Vr,
1719
1714
  {
1720
- ref: a,
1715
+ ref: o,
1721
1716
  className: O(
1722
1717
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1723
1718
  e
@@ -1725,14 +1720,14 @@ const Wi = h.forwardRef(({ className: e, children: t, checked: n, ...r }, a) =>
1725
1720
  checked: n,
1726
1721
  ...r,
1727
1722
  children: [
1728
- /* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(zr, { children: /* @__PURE__ */ o.jsx(Ia, { className: "h-4 w-4" }) }) }),
1723
+ /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Wr, { children: /* @__PURE__ */ a.jsx(Ho, { className: "h-4 w-4" }) }) }),
1729
1724
  t
1730
1725
  ]
1731
1726
  }
1732
1727
  ));
1733
- Wi.displayName = Ur.displayName;
1734
- const Yi = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ o.jsxs(
1735
- Br,
1728
+ tl.displayName = Vr.displayName;
1729
+ const nl = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ a.jsxs(
1730
+ Gr,
1736
1731
  {
1737
1732
  ref: r,
1738
1733
  className: O(
@@ -1741,14 +1736,14 @@ const Yi = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
1741
1736
  ),
1742
1737
  ...n,
1743
1738
  children: [
1744
- /* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(zr, { children: /* @__PURE__ */ o.jsx(Aa, { className: "h-4 w-4 fill-current" }) }) }),
1739
+ /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Wr, { children: /* @__PURE__ */ a.jsx(Uo, { className: "h-4 w-4 fill-current" }) }) }),
1745
1740
  t
1746
1741
  ]
1747
1742
  }
1748
1743
  ));
1749
- Yi.displayName = Br.displayName;
1750
- const Xr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ o.jsx(
1751
- Fr,
1744
+ nl.displayName = Gr.displayName;
1745
+ const ra = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
1746
+ qr,
1752
1747
  {
1753
1748
  ref: r,
1754
1749
  className: O(
@@ -1759,64 +1754,62 @@ const Xr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
1759
1754
  ...n
1760
1755
  }
1761
1756
  ));
1762
- Xr.displayName = Fr.displayName;
1763
- const Jr = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
1764
- Kr,
1757
+ ra.displayName = qr.displayName;
1758
+ const aa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
1759
+ Yr,
1765
1760
  {
1766
1761
  ref: n,
1767
1762
  className: O("-mx-1 my-1 h-px bg-muted", e),
1768
1763
  ...t
1769
1764
  }
1770
1765
  ));
1771
- Jr.displayName = Kr.displayName;
1772
- const bn = {
1766
+ aa.displayName = Yr.displayName;
1767
+ const Rn = {
1773
1768
  info: "bg-blue-500",
1774
1769
  note: "bg-gray-500",
1775
1770
  tip: "bg-green-600",
1776
1771
  caution: "bg-orange-500",
1777
1772
  danger: "bg-rose-500"
1778
- }, Xi = () => {
1779
- const { page: e } = Ue(), [t, n] = Te(!0);
1773
+ }, rl = () => {
1774
+ const { page: e } = qe(), [t, n] = Ie(!0);
1780
1775
  if (!(e != null && e.banner) || !t)
1781
- return /* @__PURE__ */ o.jsx("style", { children: ":root { --banner-height: 0px; }" });
1782
- const r = e.banner.color && e.banner.color in bn ? bn[e.banner.color] : e.banner.color ? void 0 : "bg-primary", a = r ? {} : { backgroundColor: e.banner.color };
1783
- return /* @__PURE__ */ o.jsxs(
1776
+ return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
1777
+ const r = e.banner.color && e.banner.color in Rn ? Rn[e.banner.color] : e.banner.color ? void 0 : "bg-primary", o = r ? {} : { backgroundColor: e.banner.color };
1778
+ return /* @__PURE__ */ a.jsxs(
1784
1779
  "div",
1785
1780
  {
1786
1781
  className: O(
1787
1782
  "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
1788
1783
  r
1789
1784
  ),
1790
- style: a,
1785
+ style: o,
1791
1786
  children: [
1792
- /* @__PURE__ */ o.jsx("div", { className: "w-full", children: e.banner.message }),
1793
- e.banner.dismissible && /* @__PURE__ */ o.jsx(
1787
+ /* @__PURE__ */ a.jsx("div", { className: "w-full", children: e.banner.message }),
1788
+ e.banner.dismissible && /* @__PURE__ */ a.jsx(
1794
1789
  "button",
1795
1790
  {
1796
1791
  type: "button",
1797
1792
  className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
1798
1793
  onClick: () => n(!1),
1799
- children: /* @__PURE__ */ o.jsx(ka, { size: 16 })
1794
+ children: /* @__PURE__ */ a.jsx(zo, { size: 16 })
1800
1795
  }
1801
1796
  )
1802
1797
  ]
1803
1798
  }
1804
1799
  );
1805
1800
  };
1806
- function Ji(e) {
1801
+ function al(e) {
1807
1802
  if (typeof document > "u") return;
1808
1803
  let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
1809
1804
  n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
1810
1805
  }
1811
- const Zr = g.createContext({
1806
+ const oa = p.createContext({
1812
1807
  drawerRef: {
1813
1808
  current: null
1814
1809
  },
1815
1810
  overlayRef: {
1816
1811
  current: null
1817
1812
  },
1818
- scaleBackground: () => {
1819
- },
1820
1813
  onPress: () => {
1821
1814
  },
1822
1815
  onRelease: () => {
@@ -1831,7 +1824,6 @@ const Zr = g.createContext({
1831
1824
  },
1832
1825
  openProp: void 0,
1833
1826
  dismissible: !1,
1834
- handleOnly: !1,
1835
1827
  isOpen: !1,
1836
1828
  isDragging: !1,
1837
1829
  keyboardIsOpen: {
@@ -1839,6 +1831,7 @@ const Zr = g.createContext({
1839
1831
  },
1840
1832
  snapPointsOffset: null,
1841
1833
  snapPoints: null,
1834
+ handleOnly: !1,
1842
1835
  modal: !1,
1843
1836
  shouldFade: !1,
1844
1837
  activeSnapPoint: null,
@@ -1846,53 +1839,68 @@ const Zr = g.createContext({
1846
1839
  },
1847
1840
  setActiveSnapPoint: () => {
1848
1841
  },
1849
- visible: !1,
1850
1842
  closeDrawer: () => {
1851
1843
  },
1852
- setVisible: () => {
1844
+ direction: "bottom",
1845
+ shouldAnimate: {
1846
+ current: !0
1853
1847
  },
1854
- direction: "bottom"
1855
- }), wt = () => {
1856
- const e = g.useContext(Zr);
1848
+ shouldScaleBackground: !1,
1849
+ setBackgroundColorOnScale: !0,
1850
+ noBodyStyles: !1,
1851
+ container: null,
1852
+ autoFocus: !1
1853
+ }), Qe = () => {
1854
+ const e = p.useContext(oa);
1857
1855
  if (!e)
1858
1856
  throw new Error("useDrawerContext must be used within a Drawer.Root");
1859
1857
  return e;
1860
1858
  };
1861
- Ji("[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-handle]{display:block;position:relative;opacity:.8;margin-left:auto;margin-right:auto;height:5px;width:56px;border-radius:1rem;touch-action:pan-y;cursor:grab}[vaul-handle]:active,[vaul-handle]:hover{opacity:1}[vaul-handle]:active{cursor:grabbing}[vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@media (hover:hover) and (pointer:fine){[vaul-drawer]{user-select:none}}@media (pointer:fine){[vaul-handle-hitarea]:{width:100%;height:100%}}");
1862
- const eo = typeof window < "u" ? ma : xe;
1863
- function Nt(...e) {
1864
- return (...t) => {
1865
- for (let n of e)
1866
- typeof n == "function" && n(...t);
1867
- };
1859
+ al(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
1860
+ [data-state=closed]
1861
+ ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);
1862
+ function ol() {
1863
+ const e = navigator.userAgent;
1864
+ return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || // Android Firefox
1865
+ /FxiOS/.test(e));
1868
1866
  }
1869
- function Zi() {
1870
- return Yt(/^Mac/);
1867
+ function sl() {
1868
+ return Jt(/^Mac/);
1871
1869
  }
1872
- function el() {
1873
- return Yt(/^iPhone/);
1870
+ function il() {
1871
+ return Jt(/^iPhone/);
1874
1872
  }
1875
- function tl() {
1876
- return Yt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
1877
- Zi() && navigator.maxTouchPoints > 1;
1873
+ function En() {
1874
+ return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
1878
1875
  }
1879
- function to() {
1880
- return el() || tl();
1876
+ function ll() {
1877
+ return Jt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
1878
+ sl() && navigator.maxTouchPoints > 1;
1881
1879
  }
1882
- function Yt(e) {
1880
+ function sa() {
1881
+ return il() || ll();
1882
+ }
1883
+ function Jt(e) {
1883
1884
  return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
1884
1885
  }
1885
- const St = typeof document < "u" && window.visualViewport;
1886
- function xn(e) {
1886
+ const cl = 24, ul = typeof window < "u" ? So : Ce;
1887
+ function Dn(...e) {
1888
+ return (...t) => {
1889
+ for (let n of e)
1890
+ typeof n == "function" && n(...t);
1891
+ };
1892
+ }
1893
+ const Mt = typeof document < "u" && window.visualViewport;
1894
+ function Pn(e) {
1887
1895
  let t = window.getComputedStyle(e);
1888
1896
  return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
1889
1897
  }
1890
- function no(e) {
1891
- for (xn(e) && (e = e.parentElement); e && !xn(e); )
1898
+ function ia(e) {
1899
+ for (Pn(e) && (e = e.parentElement); e && !Pn(e); )
1892
1900
  e = e.parentElement;
1893
1901
  return e || document.scrollingElement || document.documentElement;
1894
1902
  }
1895
- const nl = /* @__PURE__ */ new Set([
1903
+ const dl = /* @__PURE__ */ new Set([
1896
1904
  "checkbox",
1897
1905
  "radio",
1898
1906
  "range",
@@ -1903,179 +1911,113 @@ const nl = /* @__PURE__ */ new Set([
1903
1911
  "submit",
1904
1912
  "reset"
1905
1913
  ]);
1906
- let ut = 0, Ct;
1907
- function rl(e = {}) {
1914
+ let ht = 0, Rt;
1915
+ function fl(e = {}) {
1908
1916
  let { isDisabled: t } = e;
1909
- eo(() => {
1917
+ ul(() => {
1910
1918
  if (!t)
1911
- return ut++, ut === 1 && (to() ? Ct = al() : Ct = ol()), () => {
1912
- ut--, ut === 0 && Ct();
1919
+ return ht++, ht === 1 && sa() && (Rt = hl()), () => {
1920
+ ht--, ht === 0 && (Rt == null || Rt());
1913
1921
  };
1914
1922
  }, [
1915
1923
  t
1916
1924
  ]);
1917
1925
  }
1918
- function ol() {
1919
- return Nt(ro(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
1920
- }
1921
- function al() {
1926
+ function hl() {
1922
1927
  let e, t = 0, n = (c) => {
1923
- e = no(c.target), !(e === document.documentElement && e === document.body) && (t = c.changedTouches[0].pageY);
1928
+ e = ia(c.target), !(e === document.documentElement && e === document.body) && (t = c.changedTouches[0].pageY);
1924
1929
  }, r = (c) => {
1925
1930
  if (!e || e === document.documentElement || e === document.body) {
1926
1931
  c.preventDefault();
1927
1932
  return;
1928
1933
  }
1929
- let d = c.changedTouches[0].pageY, f = e.scrollTop, y = e.scrollHeight - e.clientHeight;
1930
- y !== 0 && ((f <= 0 && d > t || f >= y && d < t) && c.preventDefault(), t = d);
1931
- }, a = (c) => {
1934
+ let d = c.changedTouches[0].pageY, v = e.scrollTop, M = e.scrollHeight - e.clientHeight;
1935
+ M !== 0 && ((v <= 0 && d > t || v >= M && d < t) && c.preventDefault(), t = d);
1936
+ }, o = (c) => {
1932
1937
  let d = c.target;
1933
- Pt(d) && d !== document.activeElement && (c.preventDefault(), d.style.transform = "translateY(-2000px)", d.focus(), requestAnimationFrame(() => {
1938
+ Tt(d) && d !== document.activeElement && (c.preventDefault(), d.style.transform = "translateY(-2000px)", d.focus(), requestAnimationFrame(() => {
1934
1939
  d.style.transform = "";
1935
1940
  }));
1936
1941
  }, s = (c) => {
1937
1942
  let d = c.target;
1938
- Pt(d) && (d.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
1939
- d.style.transform = "", St && (St.height < window.innerHeight ? requestAnimationFrame(() => {
1940
- yn(d);
1941
- }) : St.addEventListener("resize", () => yn(d), {
1943
+ Tt(d) && (d.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
1944
+ d.style.transform = "", Mt && (Mt.height < window.innerHeight ? requestAnimationFrame(() => {
1945
+ jn(d);
1946
+ }) : Mt.addEventListener("resize", () => jn(d), {
1942
1947
  once: !0
1943
1948
  }));
1944
1949
  }));
1945
1950
  }, i = () => {
1946
1951
  window.scrollTo(0, 0);
1947
- }, l = window.pageXOffset, u = window.pageYOffset, v = Nt(ro(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
1952
+ }, l = window.pageXOffset, u = window.pageYOffset, m = Dn(pl(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
1948
1953
  window.scrollTo(0, 0);
1949
- let m = Nt(Ve(document, "touchstart", n, {
1954
+ let f = Dn(We(document, "touchstart", n, {
1950
1955
  passive: !1,
1951
1956
  capture: !0
1952
- }), Ve(document, "touchmove", r, {
1957
+ }), We(document, "touchmove", r, {
1953
1958
  passive: !1,
1954
1959
  capture: !0
1955
- }), Ve(document, "touchend", a, {
1960
+ }), We(document, "touchend", o, {
1956
1961
  passive: !1,
1957
1962
  capture: !0
1958
- }), Ve(document, "focus", s, !0), Ve(window, "scroll", i));
1963
+ }), We(document, "focus", s, !0), We(window, "scroll", i));
1959
1964
  return () => {
1960
- v(), m(), window.scrollTo(l, u);
1965
+ m(), f(), window.scrollTo(l, u);
1961
1966
  };
1962
1967
  }
1963
- function ro(e, t, n) {
1968
+ function pl(e, t, n) {
1964
1969
  let r = e.style[t];
1965
1970
  return e.style[t] = n, () => {
1966
1971
  e.style[t] = r;
1967
1972
  };
1968
1973
  }
1969
- function Ve(e, t, n, r) {
1974
+ function We(e, t, n, r) {
1970
1975
  return e.addEventListener(t, n, r), () => {
1971
1976
  e.removeEventListener(t, n, r);
1972
1977
  };
1973
1978
  }
1974
- function yn(e) {
1979
+ function jn(e) {
1975
1980
  let t = document.scrollingElement || document.documentElement;
1976
1981
  for (; e && e !== t; ) {
1977
- let n = no(e);
1982
+ let n = ia(e);
1978
1983
  if (n !== document.documentElement && n !== document.body && n !== e) {
1979
- let r = n.getBoundingClientRect().top, a = e.getBoundingClientRect().top, s = e.getBoundingClientRect().bottom;
1980
- const i = n.getBoundingClientRect().bottom;
1981
- s > i && (n.scrollTop += a - r);
1984
+ let r = n.getBoundingClientRect().top, o = e.getBoundingClientRect().top, s = e.getBoundingClientRect().bottom;
1985
+ const i = n.getBoundingClientRect().bottom + cl;
1986
+ s > i && (n.scrollTop += o - r);
1982
1987
  }
1983
1988
  e = n.parentElement;
1984
1989
  }
1985
1990
  }
1986
- function Pt(e) {
1987
- return e instanceof HTMLInputElement && !nl.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
1991
+ function Tt(e) {
1992
+ return e instanceof HTMLInputElement && !dl.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
1988
1993
  }
1989
- function sl(e, t) {
1994
+ function ml(e, t) {
1990
1995
  typeof e == "function" ? e(t) : e != null && (e.current = t);
1991
1996
  }
1992
- function il(...e) {
1993
- return (t) => e.forEach((n) => sl(n, t));
1997
+ function gl(...e) {
1998
+ return (t) => e.forEach((n) => ml(n, t));
1994
1999
  }
1995
- function oo(...e) {
1996
- return h.useCallback(il(...e), e);
1997
- }
1998
- let Qe = null;
1999
- function ll({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: a, noBodyStyles: s }) {
2000
- const [i, l] = g.useState(() => typeof window < "u" ? window.location.href : ""), u = g.useRef(0), v = g.useCallback(() => {
2001
- if (Qe === null && e && !s) {
2002
- Qe = {
2003
- position: document.body.style.position,
2004
- top: document.body.style.top,
2005
- left: document.body.style.left,
2006
- height: document.body.style.height,
2007
- right: "unset"
2008
- };
2009
- const { scrollX: c, innerHeight: d } = window;
2010
- document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
2011
- top: `${-u.current}px`,
2012
- left: `${-c}px`,
2013
- right: "0px",
2014
- height: "auto"
2015
- }), window.setTimeout(() => window.requestAnimationFrame(() => {
2016
- const f = d - window.innerHeight;
2017
- f && u.current >= d && (document.body.style.top = `${-(u.current + f)}px`);
2018
- }), 300);
2019
- }
2020
- }, [
2021
- e
2022
- ]), m = g.useCallback(() => {
2023
- if (Qe !== null && !s) {
2024
- const c = -parseInt(document.body.style.top, 10), d = -parseInt(document.body.style.left, 10);
2025
- Object.assign(document.body.style, Qe), window.requestAnimationFrame(() => {
2026
- if (a && i !== window.location.href) {
2027
- l(window.location.href);
2028
- return;
2029
- }
2030
- window.scrollTo(d, c);
2031
- }), Qe = null;
2032
- }
2033
- }, [
2034
- i
2035
- ]);
2036
- return g.useEffect(() => {
2037
- function c() {
2038
- u.current = window.scrollY;
2039
- }
2040
- return c(), window.addEventListener("scroll", c), () => {
2041
- window.removeEventListener("scroll", c);
2042
- };
2043
- }, []), g.useEffect(() => {
2044
- n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && v(), t || window.setTimeout(() => {
2045
- m();
2046
- }, 500)) : m());
2047
- }, [
2048
- e,
2049
- r,
2050
- i,
2051
- t,
2052
- n,
2053
- v,
2054
- m
2055
- ]), {
2056
- restorePositionSetting: m
2057
- };
2000
+ function la(...e) {
2001
+ return h.useCallback(gl(...e), e);
2058
2002
  }
2059
- const ao = /* @__PURE__ */ new WeakMap();
2060
- function I(e, t, n = !1) {
2003
+ const ca = /* @__PURE__ */ new WeakMap();
2004
+ function H(e, t, n = !1) {
2061
2005
  if (!e || !(e instanceof HTMLElement)) return;
2062
2006
  let r = {};
2063
- Object.entries(t).forEach(([a, s]) => {
2064
- if (a.startsWith("--")) {
2065
- e.style.setProperty(a, s);
2007
+ Object.entries(t).forEach(([o, s]) => {
2008
+ if (o.startsWith("--")) {
2009
+ e.style.setProperty(o, s);
2066
2010
  return;
2067
2011
  }
2068
- r[a] = e.style[a], e.style[a] = s;
2069
- }), !n && ao.set(e, r);
2012
+ r[o] = e.style[o], e.style[o] = s;
2013
+ }), !n && ca.set(e, r);
2070
2014
  }
2071
- function dt(e, t) {
2015
+ function vl(e, t) {
2072
2016
  if (!e || !(e instanceof HTMLElement)) return;
2073
- let n = ao.get(e);
2074
- n && (t ? e.style[t] = n[t] : Object.entries(n).forEach(([r, a]) => {
2075
- e.style[r] = a;
2076
- }));
2017
+ let n = ca.get(e);
2018
+ n && (e.style[t] = n[t]);
2077
2019
  }
2078
- const z = (e) => {
2020
+ const U = (e) => {
2079
2021
  switch (e) {
2080
2022
  case "top":
2081
2023
  case "bottom":
@@ -2087,20 +2029,34 @@ const z = (e) => {
2087
2029
  return e;
2088
2030
  }
2089
2031
  };
2090
- function ft(e, t) {
2032
+ function pt(e, t) {
2091
2033
  if (!e)
2092
2034
  return null;
2093
2035
  const n = window.getComputedStyle(e), r = (
2094
2036
  // @ts-ignore
2095
2037
  n.transform || n.webkitTransform || n.mozTransform
2096
2038
  );
2097
- let a = r.match(/^matrix3d\((.+)\)$/);
2098
- return a ? parseFloat(a[1].split(", ")[z(t) ? 13 : 12]) : (a = r.match(/^matrix\((.+)\)$/), a ? parseFloat(a[1].split(", ")[z(t) ? 5 : 4]) : null);
2039
+ let o = r.match(/^matrix3d\((.+)\)$/);
2040
+ return o ? parseFloat(o[1].split(", ")[U(t) ? 13 : 12]) : (o = r.match(/^matrix\((.+)\)$/), o ? parseFloat(o[1].split(", ")[U(t) ? 5 : 4]) : null);
2099
2041
  }
2100
- function cl(e) {
2042
+ function wl(e) {
2101
2043
  return 8 * (Math.log(e + 1) - 2);
2102
2044
  }
2103
- const T = {
2045
+ function Et(e, t) {
2046
+ if (!e) return () => {
2047
+ };
2048
+ const n = e.style.cssText;
2049
+ return Object.assign(e.style, t), () => {
2050
+ e.style.cssText = n;
2051
+ };
2052
+ }
2053
+ function xl(...e) {
2054
+ return (...t) => {
2055
+ for (const n of e)
2056
+ typeof n == "function" && n(...t);
2057
+ };
2058
+ }
2059
+ const $ = {
2104
2060
  DURATION: 0.5,
2105
2061
  EASE: [
2106
2062
  0.32,
@@ -2108,38 +2064,38 @@ const T = {
2108
2064
  0,
2109
2065
  1
2110
2066
  ]
2111
- }, so = 0.4;
2112
- function io(e) {
2113
- const t = g.useRef(e);
2114
- return g.useEffect(() => {
2067
+ }, ua = 0.4, yl = 0.25, bl = 100, da = 8, Oe = 16, _t = 26, Dt = "vaul-dragging";
2068
+ function fa(e) {
2069
+ const t = p.useRef(e);
2070
+ return p.useEffect(() => {
2115
2071
  t.current = e;
2116
- }), g.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
2072
+ }), p.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
2117
2073
  }
2118
- function ul({ defaultProp: e, onChange: t }) {
2119
- const n = g.useState(e), [r] = n, a = g.useRef(r), s = io(t);
2120
- return g.useEffect(() => {
2121
- a.current !== r && (s(r), a.current = r);
2074
+ function Sl({ defaultProp: e, onChange: t }) {
2075
+ const n = p.useState(e), [r] = n, o = p.useRef(r), s = fa(t);
2076
+ return p.useEffect(() => {
2077
+ o.current !== r && (s(r), o.current = r);
2122
2078
  }, [
2123
2079
  r,
2124
- a,
2080
+ o,
2125
2081
  s
2126
2082
  ]), n;
2127
2083
  }
2128
- function dl({ prop: e, defaultProp: t, onChange: n = () => {
2084
+ function ha({ prop: e, defaultProp: t, onChange: n = () => {
2129
2085
  } }) {
2130
- const [r, a] = ul({
2086
+ const [r, o] = Sl({
2131
2087
  defaultProp: t,
2132
2088
  onChange: n
2133
- }), s = e !== void 0, i = s ? e : r, l = io(n), u = g.useCallback((v) => {
2089
+ }), s = e !== void 0, i = s ? e : r, l = fa(n), u = p.useCallback((m) => {
2134
2090
  if (s) {
2135
- const c = typeof v == "function" ? v(e) : v;
2091
+ const c = typeof m == "function" ? m(e) : m;
2136
2092
  c !== e && l(c);
2137
2093
  } else
2138
- a(v);
2094
+ o(m);
2139
2095
  }, [
2140
2096
  s,
2141
2097
  e,
2142
- a,
2098
+ o,
2143
2099
  l
2144
2100
  ]);
2145
2101
  return [
@@ -2147,686 +2103,795 @@ function dl({ prop: e, defaultProp: t, onChange: n = () => {
2147
2103
  u
2148
2104
  ];
2149
2105
  }
2150
- function fl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: a, fadeFromIndex: s, onSnapPointChange: i, direction: l = "bottom" }) {
2151
- const [u, v] = dl({
2106
+ function Cl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: o, fadeFromIndex: s, onSnapPointChange: i, direction: l = "bottom", container: u, snapToSequentialPoint: m }) {
2107
+ const [f, c] = ha({
2152
2108
  prop: e,
2153
2109
  defaultProp: n == null ? void 0 : n[0],
2154
2110
  onChange: t
2155
- }), m = g.useMemo(() => u === (n == null ? void 0 : n[n.length - 1]) || null, [
2111
+ }), [d, v] = p.useState(typeof window < "u" ? {
2112
+ innerWidth: window.innerWidth,
2113
+ innerHeight: window.innerHeight
2114
+ } : void 0);
2115
+ p.useEffect(() => {
2116
+ function b() {
2117
+ v({
2118
+ innerWidth: window.innerWidth,
2119
+ innerHeight: window.innerHeight
2120
+ });
2121
+ }
2122
+ return window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
2123
+ }, []);
2124
+ const M = p.useMemo(() => f === (n == null ? void 0 : n[n.length - 1]) || null, [
2156
2125
  n,
2157
- u
2158
- ]), c = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === u || !n, d = g.useMemo(() => n == null ? void 0 : n.findIndex((x) => x === u), [
2126
+ f
2127
+ ]), C = p.useMemo(() => {
2128
+ var b;
2129
+ return (b = n == null ? void 0 : n.findIndex((j) => j === f)) != null ? b : null;
2130
+ }, [
2159
2131
  n,
2160
- u
2161
- ]), f = g.useMemo(() => {
2162
- var x;
2163
- return (x = n == null ? void 0 : n.map((p) => {
2164
- const E = typeof window < "u", N = typeof p == "string";
2165
- let P = 0;
2166
- if (N && (P = parseInt(p, 10)), z(l)) {
2167
- const w = N ? P : E ? p * window.innerHeight : 0;
2168
- return E ? l === "bottom" ? window.innerHeight - w : -window.innerHeight + w : w;
2132
+ f
2133
+ ]), _ = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === f || !n, R = p.useMemo(() => {
2134
+ const b = u ? {
2135
+ width: u.getBoundingClientRect().width,
2136
+ height: u.getBoundingClientRect().height
2137
+ } : typeof window < "u" ? {
2138
+ width: window.innerWidth,
2139
+ height: window.innerHeight
2140
+ } : {
2141
+ width: 0,
2142
+ height: 0
2143
+ };
2144
+ var j;
2145
+ return (j = n == null ? void 0 : n.map((D) => {
2146
+ const B = typeof D == "string";
2147
+ let K = 0;
2148
+ if (B && (K = parseInt(D, 10)), U(l)) {
2149
+ const x = B ? K : d ? D * b.height : 0;
2150
+ return d ? l === "bottom" ? b.height - x : -b.height + x : x;
2169
2151
  }
2170
- const _ = N ? P : E ? p * window.innerWidth : 0;
2171
- return E ? l === "right" ? window.innerWidth - _ : -window.innerWidth + _ : _;
2172
- })) != null ? x : [];
2152
+ const W = B ? K : d ? D * b.width : 0;
2153
+ return d ? l === "right" ? b.width - W : -b.width + W : W;
2154
+ })) != null ? j : [];
2173
2155
  }, [
2174
- n
2175
- ]), y = g.useMemo(() => d !== null ? f == null ? void 0 : f[d] : null, [
2176
- f,
2177
- d
2178
- ]), R = g.useCallback((x) => {
2179
- var p;
2180
- const E = (p = f == null ? void 0 : f.findIndex((N) => N === x)) != null ? p : null;
2181
- i(E), I(r.current, {
2182
- transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
2183
- transform: z(l) ? `translate3d(0, ${x}px, 0)` : `translate3d(${x}px, 0, 0)`
2184
- }), f && E !== f.length - 1 && E !== s ? I(a.current, {
2185
- transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
2156
+ n,
2157
+ d,
2158
+ u
2159
+ ]), k = p.useMemo(() => C !== null ? R == null ? void 0 : R[C] : null, [
2160
+ R,
2161
+ C
2162
+ ]), P = p.useCallback((b) => {
2163
+ var j;
2164
+ const D = (j = R == null ? void 0 : R.findIndex((B) => B === b)) != null ? j : null;
2165
+ i(D), H(r.current, {
2166
+ transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
2167
+ transform: U(l) ? `translate3d(0, ${b}px, 0)` : `translate3d(${b}px, 0, 0)`
2168
+ }), R && D !== R.length - 1 && s !== void 0 && D !== s && D < s ? H(o.current, {
2169
+ transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
2186
2170
  opacity: "0"
2187
- }) : I(a.current, {
2188
- transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
2171
+ }) : H(o.current, {
2172
+ transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
2189
2173
  opacity: "1"
2190
- }), v(E !== null ? n == null ? void 0 : n[E] : null);
2174
+ }), c(n == null ? void 0 : n[Math.max(D, 0)]);
2191
2175
  }, [
2192
2176
  r.current,
2193
2177
  n,
2194
- f,
2178
+ R,
2195
2179
  s,
2196
- a,
2197
- v
2180
+ o,
2181
+ c
2198
2182
  ]);
2199
- g.useEffect(() => {
2200
- if (u || e) {
2201
- var x;
2202
- const p = (x = n == null ? void 0 : n.findIndex((E) => E === e || E === u)) != null ? x : -1;
2203
- f && p !== -1 && typeof f[p] == "number" && R(f[p]);
2183
+ p.useEffect(() => {
2184
+ if (f || e) {
2185
+ var b;
2186
+ const j = (b = n == null ? void 0 : n.findIndex((D) => D === e || D === f)) != null ? b : -1;
2187
+ R && j !== -1 && typeof R[j] == "number" && P(R[j]);
2204
2188
  }
2205
2189
  }, [
2206
- u,
2190
+ f,
2207
2191
  e,
2208
2192
  n,
2209
- f,
2210
- R
2193
+ R,
2194
+ P
2211
2195
  ]);
2212
- function K({ draggedDistance: x, closeDrawer: p, velocity: E, dismissible: N }) {
2196
+ function g({ draggedDistance: b, closeDrawer: j, velocity: D, dismissible: B }) {
2213
2197
  if (s === void 0) return;
2214
- const P = l === "bottom" || l === "right" ? (y ?? 0) - x : (y ?? 0) + x, _ = d === s - 1, w = d === 0, L = x > 0;
2215
- if (_ && I(a.current, {
2216
- transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
2217
- }), E > 2 && !L) {
2218
- N ? p() : R(f[0]);
2198
+ const K = l === "bottom" || l === "right" ? (k ?? 0) - b : (k ?? 0) + b, W = C === s - 1, x = C === 0, V = b > 0;
2199
+ if (W && H(o.current, {
2200
+ transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`
2201
+ }), !m && D > 2 && !V) {
2202
+ B ? j() : P(R[0]);
2219
2203
  return;
2220
2204
  }
2221
- if (E > 2 && L && f && n) {
2222
- R(f[n.length - 1]);
2205
+ if (!m && D > 2 && V && R && n) {
2206
+ P(R[n.length - 1]);
2223
2207
  return;
2224
2208
  }
2225
- const te = f == null ? void 0 : f.reduce((V, X) => typeof V != "number" || typeof X != "number" ? V : Math.abs(X - P) < Math.abs(V - P) ? X : V), Q = z(l) ? window.innerHeight : window.innerWidth;
2226
- if (E > so && Math.abs(x) < Q * 0.4) {
2227
- const V = L ? 1 : -1;
2228
- if (V > 0 && m) {
2229
- R(f[n.length - 1]);
2209
+ const G = R == null ? void 0 : R.reduce((q, Y) => typeof q != "number" || typeof Y != "number" ? q : Math.abs(Y - K) < Math.abs(q - K) ? Y : q), te = U(l) ? window.innerHeight : window.innerWidth;
2210
+ if (D > ua && Math.abs(b) < te * 0.4) {
2211
+ const q = V ? 1 : -1;
2212
+ if (q > 0 && M && n) {
2213
+ P(R[n.length - 1]);
2230
2214
  return;
2231
2215
  }
2232
- if (w && V < 0 && N && p(), d === null) return;
2233
- R(f[d + V]);
2216
+ if (x && q < 0 && B && j(), C === null) return;
2217
+ P(R[C + q]);
2234
2218
  return;
2235
2219
  }
2236
- R(te);
2220
+ P(G);
2237
2221
  }
2238
- function H({ draggedDistance: x }) {
2239
- if (y === null) return;
2240
- const p = l === "bottom" || l === "right" ? y - x : y + x;
2241
- (l === "bottom" || l === "right") && p < f[f.length - 1] || (l === "top" || l === "left") && p > f[f.length - 1] || I(r.current, {
2242
- transform: z(l) ? `translate3d(0, ${p}px, 0)` : `translate3d(${p}px, 0, 0)`
2222
+ function z({ draggedDistance: b }) {
2223
+ if (k === null) return;
2224
+ const j = l === "bottom" || l === "right" ? k - b : k + b;
2225
+ (l === "bottom" || l === "right") && j < R[R.length - 1] || (l === "top" || l === "left") && j > R[R.length - 1] || H(r.current, {
2226
+ transform: U(l) ? `translate3d(0, ${j}px, 0)` : `translate3d(${j}px, 0, 0)`
2243
2227
  });
2244
2228
  }
2245
- function q(x, p) {
2246
- if (!n || typeof d != "number" || !f || s === void 0) return null;
2247
- const E = d === s - 1;
2248
- if (d >= s && p)
2229
+ function Z(b, j) {
2230
+ if (!n || typeof C != "number" || !R || s === void 0) return null;
2231
+ const D = C === s - 1;
2232
+ if (C >= s && j)
2249
2233
  return 0;
2250
- if (E && !p) return 1;
2251
- if (!c && !E) return null;
2252
- const P = E ? d + 1 : d - 1, _ = E ? f[P] - f[P - 1] : f[P + 1] - f[P], w = x / Math.abs(_);
2253
- return E ? 1 - w : w;
2234
+ if (D && !j) return 1;
2235
+ if (!_ && !D) return null;
2236
+ const K = D ? C + 1 : C - 1, W = D ? R[K] - R[K - 1] : R[K + 1] - R[K], x = b / Math.abs(W);
2237
+ return D ? 1 - x : x;
2254
2238
  }
2255
2239
  return {
2256
- isLastSnapPoint: m,
2257
- activeSnapPoint: u,
2258
- shouldFade: c,
2259
- getPercentageDragged: q,
2260
- setActiveSnapPoint: v,
2261
- activeSnapPointIndex: d,
2262
- onRelease: K,
2263
- onDrag: H,
2264
- snapPointsOffset: f
2240
+ isLastSnapPoint: M,
2241
+ activeSnapPoint: f,
2242
+ shouldFade: _,
2243
+ getPercentageDragged: Z,
2244
+ setActiveSnapPoint: c,
2245
+ activeSnapPointIndex: C,
2246
+ onRelease: g,
2247
+ onDrag: z,
2248
+ snapPointsOffset: R
2249
+ };
2250
+ }
2251
+ const Ml = () => () => {
2252
+ };
2253
+ function Rl() {
2254
+ const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: o } = Qe(), s = p.useRef(null), i = mt(() => document.body.style.backgroundColor, []);
2255
+ function l() {
2256
+ return (window.innerWidth - _t) / window.innerWidth;
2257
+ }
2258
+ p.useEffect(() => {
2259
+ if (t && n) {
2260
+ s.current && clearTimeout(s.current);
2261
+ const u = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
2262
+ if (!u) return;
2263
+ xl(r && !o ? Et(document.body, {
2264
+ background: "black"
2265
+ }) : Ml, Et(u, {
2266
+ transformOrigin: U(e) ? "top" : "left",
2267
+ transitionProperty: "transform, border-radius",
2268
+ transitionDuration: `${$.DURATION}s`,
2269
+ transitionTimingFunction: `cubic-bezier(${$.EASE.join(",")})`
2270
+ }));
2271
+ const m = Et(u, {
2272
+ borderRadius: `${da}px`,
2273
+ overflow: "hidden",
2274
+ ...U(e) ? {
2275
+ transform: `scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`
2276
+ } : {
2277
+ transform: `scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`
2278
+ }
2279
+ });
2280
+ return () => {
2281
+ m(), s.current = window.setTimeout(() => {
2282
+ i ? document.body.style.background = i : document.body.style.removeProperty("background");
2283
+ }, $.DURATION * 1e3);
2284
+ };
2285
+ }
2286
+ }, [
2287
+ t,
2288
+ n,
2289
+ i
2290
+ ]);
2291
+ }
2292
+ let Ye = null;
2293
+ function El({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: o, noBodyStyles: s }) {
2294
+ const [i, l] = p.useState(() => typeof window < "u" ? window.location.href : ""), u = p.useRef(0), m = p.useCallback(() => {
2295
+ if (En() && Ye === null && e && !s) {
2296
+ Ye = {
2297
+ position: document.body.style.position,
2298
+ top: document.body.style.top,
2299
+ left: document.body.style.left,
2300
+ height: document.body.style.height,
2301
+ right: "unset"
2302
+ };
2303
+ const { scrollX: c, innerHeight: d } = window;
2304
+ document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
2305
+ top: `${-u.current}px`,
2306
+ left: `${-c}px`,
2307
+ right: "0px",
2308
+ height: "auto"
2309
+ }), window.setTimeout(() => window.requestAnimationFrame(() => {
2310
+ const v = d - window.innerHeight;
2311
+ v && u.current >= d && (document.body.style.top = `${-(u.current + v)}px`);
2312
+ }), 300);
2313
+ }
2314
+ }, [
2315
+ e
2316
+ ]), f = p.useCallback(() => {
2317
+ if (En() && Ye !== null && !s) {
2318
+ const c = -parseInt(document.body.style.top, 10), d = -parseInt(document.body.style.left, 10);
2319
+ Object.assign(document.body.style, Ye), window.requestAnimationFrame(() => {
2320
+ if (o && i !== window.location.href) {
2321
+ l(window.location.href);
2322
+ return;
2323
+ }
2324
+ window.scrollTo(d, c);
2325
+ }), Ye = null;
2326
+ }
2327
+ }, [
2328
+ i
2329
+ ]);
2330
+ return p.useEffect(() => {
2331
+ function c() {
2332
+ u.current = window.scrollY;
2333
+ }
2334
+ return c(), window.addEventListener("scroll", c), () => {
2335
+ window.removeEventListener("scroll", c);
2336
+ };
2337
+ }, []), p.useEffect(() => {
2338
+ if (t)
2339
+ return () => {
2340
+ typeof document > "u" || document.querySelector("[data-vaul-drawer]") || f();
2341
+ };
2342
+ }, [
2343
+ t,
2344
+ f
2345
+ ]), p.useEffect(() => {
2346
+ n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && m(), t || window.setTimeout(() => {
2347
+ f();
2348
+ }, 500)) : f());
2349
+ }, [
2350
+ e,
2351
+ r,
2352
+ i,
2353
+ t,
2354
+ n,
2355
+ m,
2356
+ f
2357
+ ]), {
2358
+ restorePositionSetting: f
2265
2359
  };
2266
2360
  }
2267
- const hl = 0.25, pl = 100, Mn = 8, Pe = 16, Sn = 26, Et = "vaul-dragging";
2268
- function lo({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, onDrag: a, onRelease: s, snapPoints: i, nested: l = !1, setBackgroundColorOnScale: u = !0, closeThreshold: v = hl, scrollLockTimeout: m = pl, dismissible: c = !0, handleOnly: d = !1, fadeFromIndex: f = i && i.length - 1, activeSnapPoint: y, setActiveSnapPoint: R, fixed: K, modal: H = !0, onClose: q, noBodyStyles: x, direction: p = "bottom", preventScrollRestoration: E = !0, disablePreventScroll: N = !1 }) {
2269
- var P;
2270
- const [_ = !1, w] = g.useState(!1), [L, te] = g.useState(!1), [Q, V] = g.useState(!1), [X, Oe] = g.useState(!1), [pe, Be] = g.useState(!1), [ye, C] = g.useState(!1), U = g.useRef(null), Y = g.useRef(null), ne = g.useRef(null), je = g.useRef(null), me = g.useRef(null), Me = g.useRef(!1), ge = g.useRef(null), le = g.useRef(0), ve = g.useRef(!1), re = g.useRef(0), M = g.useRef(null), en = g.useRef(((P = M.current) == null ? void 0 : P.getBoundingClientRect().height) || 0), bt = g.useRef(0), yo = g.useCallback((S) => {
2271
- i && S === Ke.length - 1 && (Y.current = /* @__PURE__ */ new Date());
2272
- }, []), { activeSnapPoint: Mo, activeSnapPointIndex: ze, setActiveSnapPoint: tn, onRelease: So, snapPointsOffset: Ke, onDrag: Co, shouldFade: nn, getPercentageDragged: Eo } = fl({
2273
- snapPoints: i,
2274
- activeSnapPointProp: y,
2275
- setActiveSnapPointProp: R,
2276
- drawerRef: M,
2277
- fadeFromIndex: f,
2278
- overlayRef: U,
2279
- onSnapPointChange: yo,
2280
- direction: p
2361
+ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: s, shouldScaleBackground: i = !1, setBackgroundColorOnScale: l = !0, closeThreshold: u = yl, scrollLockTimeout: m = bl, dismissible: f = !0, handleOnly: c = !1, fadeFromIndex: d = s && s.length - 1, activeSnapPoint: v, setActiveSnapPoint: M, fixed: C, modal: _ = !0, onClose: R, nested: k, noBodyStyles: P = !1, direction: g = "bottom", defaultOpen: z = !1, disablePreventScroll: Z = !0, snapToSequentialPoint: b = !1, preventScrollRestoration: j = !1, repositionInputs: D = !0, onAnimationEnd: B, container: K, autoFocus: W = !1 }) {
2362
+ var x, V;
2363
+ const [G = !1, te] = ha({
2364
+ defaultProp: z,
2365
+ prop: e,
2366
+ onChange: (S) => {
2367
+ t == null || t(S), !S && !k && _a(), setTimeout(() => {
2368
+ B == null || B(S);
2369
+ }, $.DURATION * 1e3), S && !_ && typeof window < "u" && window.requestAnimationFrame(() => {
2370
+ document.body.style.pointerEvents = "auto";
2371
+ }), S || (document.body.style.pointerEvents = "auto");
2372
+ }
2373
+ }), [q, Y] = p.useState(!1), [y, Q] = p.useState(!1), [ie, de] = p.useState(!1), pe = p.useRef(null), Me = p.useRef(null), ke = p.useRef(null), ye = p.useRef(null), le = p.useRef(null), Re = p.useRef(!1), re = p.useRef(null), $e = p.useRef(0), Fe = p.useRef(!1), nn = p.useRef(!z), rn = p.useRef(0), E = p.useRef(null), an = p.useRef(((x = E.current) == null ? void 0 : x.getBoundingClientRect().height) || 0), on = p.useRef(((V = E.current) == null ? void 0 : V.getBoundingClientRect().width) || 0), bt = p.useRef(0), Da = p.useCallback((S) => {
2374
+ s && S === Ve.length - 1 && (Me.current = /* @__PURE__ */ new Date());
2375
+ }, []), { activeSnapPoint: Pa, activeSnapPointIndex: Le, setActiveSnapPoint: sn, onRelease: ja, snapPointsOffset: Ve, onDrag: Na, shouldFade: ln, getPercentageDragged: Ta } = Cl({
2376
+ snapPoints: s,
2377
+ activeSnapPointProp: v,
2378
+ setActiveSnapPointProp: M,
2379
+ drawerRef: E,
2380
+ fadeFromIndex: d,
2381
+ overlayRef: pe,
2382
+ onSnapPointChange: Da,
2383
+ direction: g,
2384
+ container: K,
2385
+ snapToSequentialPoint: b
2281
2386
  });
2282
- rl({
2283
- isDisabled: !_ || pe || !H || ye || !L || N
2387
+ fl({
2388
+ isDisabled: !G || y || !_ || ie || !q || !D || !Z
2284
2389
  });
2285
- const { restorePositionSetting: Ro } = ll({
2286
- isOpen: _,
2287
- modal: H,
2288
- nested: l,
2289
- hasBeenOpened: L,
2290
- preventScrollRestoration: E,
2291
- noBodyStyles: x
2390
+ const { restorePositionSetting: _a } = El({
2391
+ isOpen: G,
2392
+ modal: _,
2393
+ nested: k ?? !1,
2394
+ hasBeenOpened: q,
2395
+ preventScrollRestoration: j,
2396
+ noBodyStyles: P
2292
2397
  });
2293
- function Ie() {
2294
- return (window.innerWidth - Sn) / window.innerWidth;
2398
+ function lt() {
2399
+ return (window.innerWidth - _t) / window.innerWidth;
2295
2400
  }
2296
- function Do(S) {
2297
- var D;
2298
- !c && !i || M.current && !M.current.contains(S.target) || (en.current = ((D = M.current) == null ? void 0 : D.getBoundingClientRect().height) || 0, Be(!0), ne.current = /* @__PURE__ */ new Date(), to() && window.addEventListener("touchend", () => Me.current = !1, {
2401
+ function Oa(S) {
2402
+ var T, I;
2403
+ !f && !s || E.current && !E.current.contains(S.target) || (an.current = ((T = E.current) == null ? void 0 : T.getBoundingClientRect().height) || 0, on.current = ((I = E.current) == null ? void 0 : I.getBoundingClientRect().width) || 0, Q(!0), ke.current = /* @__PURE__ */ new Date(), sa() && window.addEventListener("touchend", () => Re.current = !1, {
2299
2404
  once: !0
2300
- }), S.target.setPointerCapture(S.pointerId), le.current = z(p) ? S.clientY : S.clientX);
2405
+ }), S.target.setPointerCapture(S.pointerId), $e.current = U(g) ? S.pageY : S.pageX);
2301
2406
  }
2302
- function rn(S, D) {
2303
- var k;
2304
- let j = S;
2305
- const F = (k = window.getSelection()) == null ? void 0 : k.toString(), B = M.current ? ft(M.current, p) : null, oe = /* @__PURE__ */ new Date();
2306
- if (j.hasAttribute("data-vaul-no-drag") || j.closest("[data-vaul-no-drag]"))
2407
+ function cn(S, T) {
2408
+ var I;
2409
+ let N = S;
2410
+ const L = (I = window.getSelection()) == null ? void 0 : I.toString(), ne = E.current ? pt(E.current, g) : null, ee = /* @__PURE__ */ new Date();
2411
+ if (N.tagName === "SELECT" || N.hasAttribute("data-vaul-no-drag") || N.closest("[data-vaul-no-drag]"))
2307
2412
  return !1;
2308
- if (p === "right" || p === "left")
2413
+ if (g === "right" || g === "left")
2309
2414
  return !0;
2310
- if (Y.current && oe.getTime() - Y.current.getTime() < 500)
2415
+ if (Me.current && ee.getTime() - Me.current.getTime() < 500)
2311
2416
  return !1;
2312
- if (B !== null && (p === "bottom" ? B > 0 : B < 0))
2417
+ if (ne !== null && (g === "bottom" ? ne > 0 : ne < 0))
2313
2418
  return !0;
2314
- if (F && F.length > 0)
2419
+ if (L && L.length > 0)
2315
2420
  return !1;
2316
- if (me.current && oe.getTime() - me.current.getTime() < m && B === 0 || D)
2317
- return me.current = oe, !1;
2318
- for (; j; ) {
2319
- if (j.scrollHeight > j.clientHeight) {
2320
- if (j.scrollTop !== 0)
2321
- return me.current = /* @__PURE__ */ new Date(), !1;
2322
- if (j.getAttribute("role") === "dialog")
2421
+ if (le.current && ee.getTime() - le.current.getTime() < m && ne === 0 || T)
2422
+ return le.current = ee, !1;
2423
+ for (; N; ) {
2424
+ if (N.scrollHeight > N.clientHeight) {
2425
+ if (N.scrollTop !== 0)
2426
+ return le.current = /* @__PURE__ */ new Date(), !1;
2427
+ if (N.getAttribute("role") === "dialog")
2323
2428
  return !0;
2324
2429
  }
2325
- j = j.parentNode;
2430
+ N = N.parentNode;
2326
2431
  }
2327
2432
  return !0;
2328
2433
  }
2329
- function jo(S) {
2330
- if (M.current && pe) {
2331
- const D = p === "bottom" || p === "right" ? 1 : -1, k = (le.current - (z(p) ? S.clientY : S.clientX)) * D, j = k > 0, F = i && !c && !j;
2332
- if (F && ze === 0) return;
2333
- const B = Math.abs(k), oe = document.querySelector("[vaul-drawer-wrapper]");
2334
- let ce = B / en.current;
2335
- const Se = Eo(B, j);
2336
- if (Se !== null && (ce = Se), F && ce >= 1 || !Me.current && !rn(S.target, j)) return;
2337
- if (M.current.classList.add(Et), Me.current = !0, I(M.current, {
2434
+ function Ia(S) {
2435
+ if (E.current && y) {
2436
+ const T = g === "bottom" || g === "right" ? 1 : -1, I = ($e.current - (U(g) ? S.pageY : S.pageX)) * T, N = I > 0, L = s && !f && !N;
2437
+ if (L && Le === 0) return;
2438
+ const ne = Math.abs(I), ee = document.querySelector("[data-vaul-drawer-wrapper]"), Ee = g === "bottom" || g === "top" ? an.current : on.current;
2439
+ let fe = ne / Ee;
2440
+ const _e = Ta(ne, N);
2441
+ if (_e !== null && (fe = _e), L && fe >= 1 || !Re.current && !cn(S.target, N)) return;
2442
+ if (E.current.classList.add(Dt), Re.current = !0, H(E.current, {
2338
2443
  transition: "none"
2339
- }), I(U.current, {
2444
+ }), H(pe.current, {
2340
2445
  transition: "none"
2341
- }), i && Co({
2342
- draggedDistance: k
2343
- }), j && !i) {
2344
- const Ne = cl(k), st = Math.min(Ne * -1, 0) * D;
2345
- I(M.current, {
2346
- transform: z(p) ? `translate3d(0, ${st}px, 0)` : `translate3d(${st}px, 0, 0)`
2446
+ }), s && Na({
2447
+ draggedDistance: I
2448
+ }), N && !s) {
2449
+ const me = wl(I), ct = Math.min(me * -1, 0) * T;
2450
+ H(E.current, {
2451
+ transform: U(g) ? `translate3d(0, ${ct}px, 0)` : `translate3d(${ct}px, 0, 0)`
2347
2452
  });
2348
2453
  return;
2349
2454
  }
2350
- const at = 1 - ce;
2351
- if ((nn || f && ze === f - 1) && (a == null || a(S, ce), I(U.current, {
2352
- opacity: `${at}`,
2455
+ const De = 1 - fe;
2456
+ if ((ln || d && Le === d - 1) && (r == null || r(S, fe), H(pe.current, {
2457
+ opacity: `${De}`,
2353
2458
  transition: "none"
2354
- }, !0)), oe && U.current && r) {
2355
- const Ne = Math.min(Ie() + ce * (1 - Ie()), 1), st = 8 - ce * 8, an = Math.max(0, 14 - ce * 14);
2356
- I(oe, {
2357
- borderRadius: `${st}px`,
2358
- transform: z(p) ? `scale(${Ne}) translate3d(0, ${an}px, 0)` : `scale(${Ne}) translate3d(${an}px, 0, 0)`,
2459
+ }, !0)), ee && pe.current && i) {
2460
+ const me = Math.min(lt() + fe * (1 - lt()), 1), ct = 8 - fe * 8, dn = Math.max(0, 14 - fe * 14);
2461
+ H(ee, {
2462
+ borderRadius: `${ct}px`,
2463
+ transform: U(g) ? `scale(${me}) translate3d(0, ${dn}px, 0)` : `scale(${me}) translate3d(${dn}px, 0, 0)`,
2359
2464
  transition: "none"
2360
2465
  }, !0);
2361
2466
  }
2362
- if (!i) {
2363
- const Ne = B * D;
2364
- I(M.current, {
2365
- transform: z(p) ? `translate3d(0, ${Ne}px, 0)` : `translate3d(${Ne}px, 0, 0)`
2467
+ if (!s) {
2468
+ const me = ne * T;
2469
+ H(E.current, {
2470
+ transform: U(g) ? `translate3d(0, ${me}px, 0)` : `translate3d(${me}px, 0, 0)`
2366
2471
  });
2367
2472
  }
2368
2473
  }
2369
2474
  }
2370
- g.useEffect(() => () => {
2371
- ot(!1), Ro();
2372
- }, []), g.useEffect(() => {
2475
+ p.useEffect(() => {
2476
+ window.requestAnimationFrame(() => {
2477
+ nn.current = !0;
2478
+ });
2479
+ }, []), p.useEffect(() => {
2373
2480
  var S;
2374
- function D() {
2375
- if (!M.current) return;
2376
- const k = document.activeElement;
2377
- if (Pt(k) || ve.current) {
2378
- var j;
2379
- const F = ((j = window.visualViewport) == null ? void 0 : j.height) || 0;
2380
- let B = window.innerHeight - F;
2381
- const oe = M.current.getBoundingClientRect().height || 0;
2382
- bt.current || (bt.current = oe);
2383
- const ce = M.current.getBoundingClientRect().top;
2384
- if (Math.abs(re.current - B) > 60 && (ve.current = !ve.current), i && i.length > 0 && Ke && ze) {
2385
- const Se = Ke[ze] || 0;
2386
- B += Se;
2481
+ function T() {
2482
+ if (!E.current || !D) return;
2483
+ const I = document.activeElement;
2484
+ if (Tt(I) || Fe.current) {
2485
+ var N;
2486
+ const L = ((N = window.visualViewport) == null ? void 0 : N.height) || 0, ne = window.innerHeight;
2487
+ let ee = ne - L;
2488
+ const Ee = E.current.getBoundingClientRect().height || 0, fe = Ee > ne * 0.8;
2489
+ bt.current || (bt.current = Ee);
2490
+ const _e = E.current.getBoundingClientRect().top;
2491
+ if (Math.abs(rn.current - ee) > 60 && (Fe.current = !Fe.current), s && s.length > 0 && Ve && Le) {
2492
+ const De = Ve[Le] || 0;
2493
+ ee += De;
2387
2494
  }
2388
- if (re.current = B, oe > F || ve.current) {
2389
- const Se = M.current.getBoundingClientRect().height;
2390
- let at = Se;
2391
- Se > F && (at = F - Sn), K ? M.current.style.height = `${Se - Math.max(B, 0)}px` : M.current.style.height = `${Math.max(at, F - ce)}px`;
2392
- } else
2393
- M.current.style.height = `${bt.current}px`;
2394
- i && i.length > 0 && !ve.current ? M.current.style.bottom = "0px" : M.current.style.bottom = `${Math.max(B, 0)}px`;
2495
+ if (rn.current = ee, Ee > L || Fe.current) {
2496
+ const De = E.current.getBoundingClientRect().height;
2497
+ let me = De;
2498
+ De > L && (me = L - (fe ? _e : _t)), C ? E.current.style.height = `${De - Math.max(ee, 0)}px` : E.current.style.height = `${Math.max(me, L - _e)}px`;
2499
+ } else ol() || (E.current.style.height = `${bt.current}px`);
2500
+ s && s.length > 0 && !Fe.current ? E.current.style.bottom = "0px" : E.current.style.bottom = `${Math.max(ee, 0)}px`;
2395
2501
  }
2396
2502
  }
2397
- return (S = window.visualViewport) == null || S.addEventListener("resize", D), () => {
2398
- var k;
2399
- return (k = window.visualViewport) == null ? void 0 : k.removeEventListener("resize", D);
2503
+ return (S = window.visualViewport) == null || S.addEventListener("resize", T), () => {
2504
+ var I;
2505
+ return (I = window.visualViewport) == null ? void 0 : I.removeEventListener("resize", T);
2400
2506
  };
2401
2507
  }, [
2402
- ze,
2403
- i,
2404
- Ke
2508
+ Le,
2509
+ s,
2510
+ Ve
2405
2511
  ]);
2406
- function Ae() {
2407
- M.current && (No(), q == null || q(), I(M.current, {
2408
- transform: z(p) ? `translate3d(0, ${p === "bottom" ? "100%" : "-100%"}, 0)` : `translate3d(${p === "right" ? "100%" : "-100%"}, 0, 0)`,
2409
- transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
2410
- }), I(U.current, {
2411
- opacity: "0",
2412
- transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
2413
- }), ot(!1), setTimeout(() => {
2414
- V(!1), w(!1);
2415
- }, 300), setTimeout(() => {
2416
- i && tn(i[0]);
2417
- }, T.DURATION * 1e3));
2418
- }
2419
- g.useEffect(() => {
2420
- if (!_ && r) {
2421
- const S = setTimeout(() => {
2422
- dt(document.body);
2423
- }, 200);
2424
- return () => clearTimeout(S);
2425
- }
2426
- }, [
2427
- _,
2428
- r
2429
- ]), eo(() => {
2430
- e ? (w(!0), te(!0)) : Ae();
2431
- }, [
2432
- e
2433
- ]), g.useEffect(() => {
2434
- X && (t == null || t(_));
2435
- }, [
2436
- _
2437
- ]), g.useEffect(() => {
2438
- Oe(!0);
2439
- }, []);
2440
- function on() {
2441
- if (!M.current) return;
2442
- const S = document.querySelector("[vaul-drawer-wrapper]"), D = ft(M.current, p);
2443
- I(M.current, {
2512
+ function Ge(S) {
2513
+ Aa(), R == null || R(), S || te(!1), setTimeout(() => {
2514
+ s && sn(s[0]);
2515
+ }, $.DURATION * 1e3);
2516
+ }
2517
+ function un() {
2518
+ if (!E.current) return;
2519
+ const S = document.querySelector("[data-vaul-drawer-wrapper]"), T = pt(E.current, g);
2520
+ H(E.current, {
2444
2521
  transform: "translate3d(0, 0, 0)",
2445
- transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
2446
- }), I(U.current, {
2447
- transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
2522
+ transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`
2523
+ }), H(pe.current, {
2524
+ transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
2448
2525
  opacity: "1"
2449
- }), r && D && D > 0 && _ && I(S, {
2450
- borderRadius: `${Mn}px`,
2526
+ }), i && T && T > 0 && G && H(S, {
2527
+ borderRadius: `${da}px`,
2451
2528
  overflow: "hidden",
2452
- ...z(p) ? {
2453
- transform: `scale(${Ie()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
2529
+ ...U(g) ? {
2530
+ transform: `scale(${lt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
2454
2531
  transformOrigin: "top"
2455
2532
  } : {
2456
- transform: `scale(${Ie()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
2533
+ transform: `scale(${lt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
2457
2534
  transformOrigin: "left"
2458
2535
  },
2459
2536
  transitionProperty: "transform, border-radius",
2460
- transitionDuration: `${T.DURATION}s`,
2461
- transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
2537
+ transitionDuration: `${$.DURATION}s`,
2538
+ transitionTimingFunction: `cubic-bezier(${$.EASE.join(",")})`
2462
2539
  }, !0);
2463
2540
  }
2464
- function No() {
2465
- !pe || !M.current || (M.current.classList.remove(Et), Me.current = !1, Be(!1), je.current = /* @__PURE__ */ new Date());
2466
- }
2467
- function Po(S) {
2468
- if (!pe || !M.current) return;
2469
- M.current.classList.remove(Et), Me.current = !1, Be(!1), je.current = /* @__PURE__ */ new Date();
2470
- const D = ft(M.current, p);
2471
- if (!rn(S.target, !1) || !D || Number.isNaN(D) || ne.current === null) return;
2472
- const k = je.current.getTime() - ne.current.getTime(), j = le.current - (z(p) ? S.clientY : S.clientX), F = Math.abs(j) / k;
2473
- if (F > 0.05 && (C(!0), setTimeout(() => {
2474
- C(!1);
2475
- }, 200)), i) {
2476
- So({
2477
- draggedDistance: j * (p === "bottom" || p === "right" ? 1 : -1),
2478
- closeDrawer: Ae,
2479
- velocity: F,
2480
- dismissible: c
2481
- }), s == null || s(S, !0);
2541
+ function Aa() {
2542
+ !y || !E.current || (E.current.classList.remove(Dt), Re.current = !1, Q(!1), ye.current = /* @__PURE__ */ new Date());
2543
+ }
2544
+ function ka(S) {
2545
+ if (!y || !E.current) return;
2546
+ E.current.classList.remove(Dt), Re.current = !1, Q(!1), ye.current = /* @__PURE__ */ new Date();
2547
+ const T = pt(E.current, g);
2548
+ if (!S || !cn(S.target, !1) || !T || Number.isNaN(T) || ke.current === null) return;
2549
+ const I = ye.current.getTime() - ke.current.getTime(), N = $e.current - (U(g) ? S.pageY : S.pageX), L = Math.abs(N) / I;
2550
+ if (L > 0.05 && (de(!0), setTimeout(() => {
2551
+ de(!1);
2552
+ }, 200)), s) {
2553
+ ja({
2554
+ draggedDistance: N * (g === "bottom" || g === "right" ? 1 : -1),
2555
+ closeDrawer: Ge,
2556
+ velocity: L,
2557
+ dismissible: f
2558
+ }), o == null || o(S, !0);
2482
2559
  return;
2483
2560
  }
2484
- if (p === "bottom" || p === "right" ? j > 0 : j < 0) {
2485
- on(), s == null || s(S, !0);
2561
+ if (g === "bottom" || g === "right" ? N > 0 : N < 0) {
2562
+ un(), o == null || o(S, !0);
2486
2563
  return;
2487
2564
  }
2488
- if (F > so) {
2489
- Ae(), s == null || s(S, !1);
2565
+ if (L > ua) {
2566
+ Ge(), o == null || o(S, !1);
2490
2567
  return;
2491
2568
  }
2492
- var B;
2493
- const oe = Math.min((B = M.current.getBoundingClientRect().height) != null ? B : 0, window.innerHeight);
2494
- if (D >= oe * v) {
2495
- Ae(), s == null || s(S, !1);
2569
+ var ne;
2570
+ const ee = Math.min((ne = E.current.getBoundingClientRect().height) != null ? ne : 0, window.innerHeight);
2571
+ var Ee;
2572
+ const fe = Math.min((Ee = E.current.getBoundingClientRect().width) != null ? Ee : 0, window.innerWidth), _e = g === "left" || g === "right";
2573
+ if (Math.abs(T) >= (_e ? fe : ee) * u) {
2574
+ Ge(), o == null || o(S, !1);
2496
2575
  return;
2497
2576
  }
2498
- s == null || s(S, !0), on();
2499
- }
2500
- g.useEffect(() => {
2501
- _ && (I(document.documentElement, {
2502
- scrollBehavior: "auto"
2503
- }), Y.current = /* @__PURE__ */ new Date(), ot(!0));
2504
- }, [
2505
- _
2506
- ]), g.useEffect(() => {
2507
- if (M.current && Q) {
2508
- var S;
2509
- const D = M == null || (S = M.current) == null ? void 0 : S.querySelectorAll("*");
2510
- D == null || D.forEach((k) => {
2511
- const j = k;
2512
- (j.scrollHeight > j.clientHeight || j.scrollWidth > j.clientWidth) && j.classList.add("vaul-scrollable");
2513
- });
2514
- }
2515
- }, [
2516
- Q
2577
+ o == null || o(S, !0), un();
2578
+ }
2579
+ p.useEffect(() => (G && (H(document.documentElement, {
2580
+ scrollBehavior: "auto"
2581
+ }), Me.current = /* @__PURE__ */ new Date()), () => {
2582
+ vl(document.documentElement, "scrollBehavior");
2583
+ }), [
2584
+ G
2517
2585
  ]);
2518
- function ot(S) {
2519
- const D = document.querySelector("[vaul-drawer-wrapper]");
2520
- !D || !r || (S ? (u && (x || (I(document.body, {
2521
- background: document.body.style.backgroundColor || document.body.style.background
2522
- }), I(document.body, {
2523
- background: "black"
2524
- }, !0))), I(D, {
2525
- borderRadius: `${Mn}px`,
2526
- overflow: "hidden",
2527
- ...z(p) ? {
2528
- transform: `scale(${Ie()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
2529
- transformOrigin: "top"
2530
- } : {
2531
- transform: `scale(${Ie()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
2532
- transformOrigin: "left"
2533
- },
2534
- transitionProperty: "transform, border-radius",
2535
- transitionDuration: `${T.DURATION}s`,
2536
- transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
2537
- })) : (dt(D, "overflow"), dt(D, "transform"), dt(D, "borderRadius"), I(D, {
2538
- transitionProperty: "transform, border-radius",
2539
- transitionDuration: `${T.DURATION}s`,
2540
- transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
2541
- })));
2542
- }
2543
- function To(S) {
2544
- const D = S ? (window.innerWidth - Pe) / window.innerWidth : 1, k = S ? -Pe : 0;
2545
- ge.current && window.clearTimeout(ge.current), I(M.current, {
2546
- transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
2547
- transform: `scale(${D}) translate3d(0, ${k}px, 0)`
2548
- }), !S && M.current && (ge.current = setTimeout(() => {
2549
- const j = ft(M.current, p);
2550
- I(M.current, {
2586
+ function $a(S) {
2587
+ const T = S ? (window.innerWidth - Oe) / window.innerWidth : 1, I = S ? -Oe : 0;
2588
+ re.current && window.clearTimeout(re.current), H(E.current, {
2589
+ transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
2590
+ transform: `scale(${T}) translate3d(0, ${I}px, 0)`
2591
+ }), !S && E.current && (re.current = setTimeout(() => {
2592
+ const N = pt(E.current, g);
2593
+ H(E.current, {
2551
2594
  transition: "none",
2552
- transform: z(p) ? `translate3d(0, ${j}px, 0)` : `translate3d(${j}px, 0, 0)`
2595
+ transform: U(g) ? `translate3d(0, ${N}px, 0)` : `translate3d(${N}px, 0, 0)`
2553
2596
  });
2554
2597
  }, 500));
2555
2598
  }
2556
- function _o(S, D) {
2557
- if (D < 0) return;
2558
- const k = z(p) ? window.innerHeight : window.innerWidth, j = (k - Pe) / k, F = j + D * (1 - j), B = -Pe + D * Pe;
2559
- I(M.current, {
2560
- transform: z(p) ? `scale(${F}) translate3d(0, ${B}px, 0)` : `scale(${F}) translate3d(${B}px, 0, 0)`,
2599
+ function Fa(S, T) {
2600
+ if (T < 0) return;
2601
+ const I = (window.innerWidth - Oe) / window.innerWidth, N = I + T * (1 - I), L = -Oe + T * Oe;
2602
+ H(E.current, {
2603
+ transform: U(g) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`,
2561
2604
  transition: "none"
2562
2605
  });
2563
2606
  }
2564
- function Oo(S, D) {
2565
- const k = z(p) ? window.innerHeight : window.innerWidth, j = D ? (k - Pe) / k : 1, F = D ? -Pe : 0;
2566
- D && I(M.current, {
2567
- transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
2568
- transform: z(p) ? `scale(${j}) translate3d(0, ${F}px, 0)` : `scale(${j}) translate3d(${F}px, 0, 0)`
2607
+ function La(S, T) {
2608
+ const I = U(g) ? window.innerHeight : window.innerWidth, N = T ? (I - Oe) / I : 1, L = T ? -Oe : 0;
2609
+ T && H(E.current, {
2610
+ transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
2611
+ transform: U(g) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`
2569
2612
  });
2570
2613
  }
2571
- return /* @__PURE__ */ g.createElement(Ja, {
2572
- modal: H,
2614
+ return p.useEffect(() => {
2615
+ _ || window.requestAnimationFrame(() => {
2616
+ document.body.style.pointerEvents = "auto";
2617
+ });
2618
+ }, [
2619
+ _
2620
+ ]), /* @__PURE__ */ p.createElement(as, {
2621
+ defaultOpen: z,
2573
2622
  onOpenChange: (S) => {
2574
- if (e !== void 0) {
2575
- t == null || t(S);
2576
- return;
2577
- }
2578
- S ? (te(!0), w(S)) : Ae();
2623
+ !f && !S || (S ? Y(!0) : Ge(!0), te(S));
2579
2624
  },
2580
- open: _
2581
- }, /* @__PURE__ */ g.createElement(Zr.Provider, {
2625
+ open: G
2626
+ }, /* @__PURE__ */ p.createElement(oa.Provider, {
2582
2627
  value: {
2583
- visible: Q,
2584
- activeSnapPoint: Mo,
2585
- snapPoints: i,
2586
- setActiveSnapPoint: tn,
2587
- drawerRef: M,
2588
- overlayRef: U,
2589
- scaleBackground: ot,
2628
+ activeSnapPoint: Pa,
2629
+ snapPoints: s,
2630
+ setActiveSnapPoint: sn,
2631
+ drawerRef: E,
2632
+ overlayRef: pe,
2590
2633
  onOpenChange: t,
2591
- onPress: Do,
2592
- setVisible: V,
2593
- onRelease: Po,
2594
- onDrag: jo,
2595
- dismissible: c,
2596
- handleOnly: d,
2597
- isOpen: _,
2598
- isDragging: pe,
2599
- shouldFade: nn,
2600
- closeDrawer: Ae,
2601
- onNestedDrag: _o,
2602
- onNestedOpenChange: To,
2603
- onNestedRelease: Oo,
2604
- keyboardIsOpen: ve,
2605
- openProp: e,
2606
- modal: H,
2607
- snapPointsOffset: Ke,
2608
- direction: p
2634
+ onPress: Oa,
2635
+ onRelease: ka,
2636
+ onDrag: Ia,
2637
+ dismissible: f,
2638
+ shouldAnimate: nn,
2639
+ handleOnly: c,
2640
+ isOpen: G,
2641
+ isDragging: y,
2642
+ shouldFade: ln,
2643
+ closeDrawer: Ge,
2644
+ onNestedDrag: Fa,
2645
+ onNestedOpenChange: $a,
2646
+ onNestedRelease: La,
2647
+ keyboardIsOpen: Fe,
2648
+ modal: _,
2649
+ snapPointsOffset: Ve,
2650
+ activeSnapPointIndex: Le,
2651
+ direction: g,
2652
+ shouldScaleBackground: i,
2653
+ setBackgroundColorOnScale: l,
2654
+ noBodyStyles: P,
2655
+ container: K,
2656
+ autoFocus: W
2609
2657
  }
2610
2658
  }, n));
2611
2659
  }
2612
- const ml = 250, gl = 120, co = /* @__PURE__ */ g.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
2613
- const { visible: a, closeDrawer: s, isDragging: i, snapPoints: l, activeSnapPoint: u, setActiveSnapPoint: v, dismissible: m, handleOnly: c, onPress: d, onDrag: f } = wt(), y = g.useRef(null), R = g.useRef(!1);
2614
- function K() {
2615
- if (R.current) {
2616
- x();
2660
+ const ma = /* @__PURE__ */ p.forwardRef(function({ ...e }, t) {
2661
+ const { overlayRef: n, snapPoints: r, onRelease: o, shouldFade: s, isOpen: i, modal: l, shouldAnimate: u } = Qe(), m = la(t, n), f = r && r.length > 0;
2662
+ if (!l)
2663
+ return null;
2664
+ const c = p.useCallback((d) => o(d), [
2665
+ o
2666
+ ]);
2667
+ return /* @__PURE__ */ p.createElement(Jo, {
2668
+ onMouseUp: c,
2669
+ ref: m,
2670
+ "data-vaul-overlay": "",
2671
+ "data-vaul-snap-points": i && f ? "true" : "false",
2672
+ "data-vaul-snap-points-overlay": i && s ? "true" : "false",
2673
+ "data-vaul-animate": u != null && u.current ? "true" : "false",
2674
+ ...e
2675
+ });
2676
+ });
2677
+ ma.displayName = "Drawer.Overlay";
2678
+ const ga = /* @__PURE__ */ p.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...r }, o) {
2679
+ const { drawerRef: s, onPress: i, onRelease: l, onDrag: u, keyboardIsOpen: m, snapPointsOffset: f, activeSnapPointIndex: c, modal: d, isOpen: v, direction: M, snapPoints: C, container: _, handleOnly: R, shouldAnimate: k, autoFocus: P } = Qe(), [g, z] = p.useState(!1), Z = la(o, s), b = p.useRef(null), j = p.useRef(null), D = p.useRef(!1), B = C && C.length > 0;
2680
+ Rl();
2681
+ const K = (x, V, G = 0) => {
2682
+ if (D.current) return !0;
2683
+ const te = Math.abs(x.y), q = Math.abs(x.x), Y = q > te, y = [
2684
+ "bottom",
2685
+ "right"
2686
+ ].includes(V) ? 1 : -1;
2687
+ if (V === "left" || V === "right") {
2688
+ if (!(x.x * y < 0) && q >= 0 && q <= G)
2689
+ return Y;
2690
+ } else if (!(x.y * y < 0) && te >= 0 && te <= G)
2691
+ return !Y;
2692
+ return D.current = !0, !0;
2693
+ };
2694
+ p.useEffect(() => {
2695
+ B && window.requestAnimationFrame(() => {
2696
+ z(!0);
2697
+ });
2698
+ }, []);
2699
+ function W(x) {
2700
+ b.current = null, D.current = !1, l(x);
2701
+ }
2702
+ return /* @__PURE__ */ p.createElement(Zo, {
2703
+ "data-vaul-drawer-direction": M,
2704
+ "data-vaul-drawer": "",
2705
+ "data-vaul-delayed-snap-points": g ? "true" : "false",
2706
+ "data-vaul-snap-points": v && B ? "true" : "false",
2707
+ "data-vaul-custom-container": _ ? "true" : "false",
2708
+ "data-vaul-animate": k != null && k.current ? "true" : "false",
2709
+ ...r,
2710
+ ref: Z,
2711
+ style: f && f.length > 0 ? {
2712
+ "--snap-point-height": `${f[c ?? 0]}px`,
2713
+ ...t
2714
+ } : t,
2715
+ onPointerDown: (x) => {
2716
+ R || (r.onPointerDown == null || r.onPointerDown.call(r, x), b.current = {
2717
+ x: x.pageX,
2718
+ y: x.pageY
2719
+ }, i(x));
2720
+ },
2721
+ onOpenAutoFocus: (x) => {
2722
+ n == null || n(x), P || x.preventDefault();
2723
+ },
2724
+ onPointerDownOutside: (x) => {
2725
+ if (e == null || e(x), !d || x.defaultPrevented) {
2726
+ x.preventDefault();
2727
+ return;
2728
+ }
2729
+ m.current && (m.current = !1);
2730
+ },
2731
+ onFocusOutside: (x) => {
2732
+ if (!d) {
2733
+ x.preventDefault();
2734
+ return;
2735
+ }
2736
+ },
2737
+ onPointerMove: (x) => {
2738
+ if (j.current = x, R || (r.onPointerMove == null || r.onPointerMove.call(r, x), !b.current)) return;
2739
+ const V = x.pageY - b.current.y, G = x.pageX - b.current.x, te = x.pointerType === "touch" ? 10 : 2;
2740
+ K({
2741
+ x: G,
2742
+ y: V
2743
+ }, M, te) ? u(x) : (Math.abs(G) > te || Math.abs(V) > te) && (b.current = null);
2744
+ },
2745
+ onPointerUp: (x) => {
2746
+ r.onPointerUp == null || r.onPointerUp.call(r, x), b.current = null, D.current = !1, l(x);
2747
+ },
2748
+ onPointerOut: (x) => {
2749
+ r.onPointerOut == null || r.onPointerOut.call(r, x), W(j.current);
2750
+ },
2751
+ onContextMenu: (x) => {
2752
+ r.onContextMenu == null || r.onContextMenu.call(r, x), j.current && W(j.current);
2753
+ }
2754
+ });
2755
+ });
2756
+ ga.displayName = "Drawer.Content";
2757
+ const Dl = 250, Pl = 120, va = /* @__PURE__ */ p.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
2758
+ const { closeDrawer: o, isDragging: s, snapPoints: i, activeSnapPoint: l, setActiveSnapPoint: u, dismissible: m, handleOnly: f, isOpen: c, onPress: d, onDrag: v } = Qe(), M = p.useRef(null), C = p.useRef(!1);
2759
+ function _() {
2760
+ if (C.current) {
2761
+ P();
2617
2762
  return;
2618
2763
  }
2619
2764
  window.setTimeout(() => {
2620
- H();
2621
- }, gl);
2765
+ R();
2766
+ }, Pl);
2622
2767
  }
2623
- function H() {
2624
- if (i || e || R.current) {
2625
- x();
2768
+ function R() {
2769
+ if (s || e || C.current) {
2770
+ P();
2626
2771
  return;
2627
2772
  }
2628
- if (x(), (!l || l.length === 0) && m) {
2629
- s();
2773
+ if (P(), !i || i.length === 0) {
2774
+ m || o();
2630
2775
  return;
2631
2776
  }
2632
- if (u === l[l.length - 1] && m) {
2633
- s();
2777
+ if (l === i[i.length - 1] && m) {
2778
+ o();
2634
2779
  return;
2635
2780
  }
2636
- const E = l.findIndex((P) => P === u);
2637
- if (E === -1) return;
2638
- const N = l[E + 1];
2639
- v(N);
2640
- }
2641
- function q() {
2642
- y.current = window.setTimeout(() => {
2643
- R.current = !0;
2644
- }, ml);
2645
- }
2646
- function x() {
2647
- window.clearTimeout(y.current), R.current = !1;
2648
- }
2649
- return /* @__PURE__ */ g.createElement("div", {
2650
- onClick: K,
2651
- onDoubleClick: () => {
2652
- R.current = !0, s();
2781
+ const z = i.findIndex((b) => b === l);
2782
+ if (z === -1) return;
2783
+ const Z = i[z + 1];
2784
+ u(Z);
2785
+ }
2786
+ function k() {
2787
+ M.current = window.setTimeout(() => {
2788
+ C.current = !0;
2789
+ }, Dl);
2790
+ }
2791
+ function P() {
2792
+ M.current && window.clearTimeout(M.current), C.current = !1;
2793
+ }
2794
+ return /* @__PURE__ */ p.createElement("div", {
2795
+ onClick: _,
2796
+ onPointerCancel: P,
2797
+ onPointerDown: (g) => {
2798
+ f && d(g), k();
2653
2799
  },
2654
- onPointerCancel: x,
2655
- onPointerDown: (p) => {
2656
- c && d(p), q();
2657
- },
2658
- onPointerMove: (p) => {
2659
- c && f(p);
2800
+ onPointerMove: (g) => {
2801
+ f && v(g);
2660
2802
  },
2661
2803
  // onPointerUp is already handled by the content component
2662
2804
  ref: r,
2663
- "vaul-drawer-visible": a ? "true" : "false",
2664
- "vaul-handle": "",
2805
+ "data-vaul-drawer-visible": c ? "true" : "false",
2806
+ "data-vaul-handle": "",
2665
2807
  "aria-hidden": "true",
2666
2808
  ...n
2667
- }, /* @__PURE__ */ g.createElement("span", {
2668
- "vaul-handle-hitarea": "",
2809
+ }, /* @__PURE__ */ p.createElement("span", {
2810
+ "data-vaul-handle-hitarea": "",
2669
2811
  "aria-hidden": "true"
2670
2812
  }, t));
2671
2813
  });
2672
- co.displayName = "Drawer.Handle";
2673
- const uo = /* @__PURE__ */ g.forwardRef(function({ children: e, ...t }, n) {
2674
- const { overlayRef: r, snapPoints: a, onRelease: s, shouldFade: i, isOpen: l, visible: u } = wt(), v = oo(n, r), m = a && a.length > 0;
2675
- return /* @__PURE__ */ g.createElement(Va, {
2676
- onMouseUp: s,
2677
- ref: v,
2678
- "vaul-drawer-visible": u ? "true" : "false",
2679
- "vaul-overlay": "",
2680
- "vaul-snap-points": l && m ? "true" : "false",
2681
- "vaul-snap-points-overlay": l && i ? "true" : "false",
2682
- ...t
2683
- });
2684
- });
2685
- uo.displayName = "Drawer.Overlay";
2686
- const fo = /* @__PURE__ */ g.forwardRef(function({ onOpenAutoFocus: e, onPointerDownOutside: t, onAnimationEnd: n, style: r, ...a }, s) {
2687
- const { drawerRef: i, onPress: l, onRelease: u, onDrag: v, dismissible: m, keyboardIsOpen: c, snapPointsOffset: d, visible: f, closeDrawer: y, modal: R, openProp: K, onOpenChange: H, setVisible: q, handleOnly: x, direction: p } = wt(), E = oo(s, i), N = g.useRef(null), P = g.useRef(!1), _ = (w, L, te = 0) => {
2688
- if (P.current) return !0;
2689
- const Q = Math.abs(w.y), V = Math.abs(w.x), X = V > Q, Oe = [
2690
- "bottom",
2691
- "right"
2692
- ].includes(L) ? 1 : -1;
2693
- if (L === "left" || L === "right") {
2694
- if (!(w.x * Oe < 0) && V >= 0 && V <= te)
2695
- return X;
2696
- } else if (!(w.y * Oe < 0) && Q >= 0 && Q <= te)
2697
- return !X;
2698
- return P.current = !0, !0;
2699
- };
2700
- return g.useEffect(() => {
2701
- q(!0);
2702
- }, []), /* @__PURE__ */ g.createElement(Qa, {
2703
- "vaul-drawer": "",
2704
- "vaul-drawer-direction": p,
2705
- "vaul-drawer-visible": f ? "true" : "false",
2706
- ...a,
2707
- ref: E,
2708
- style: d && d.length > 0 ? {
2709
- "--snap-point-height": `${d[0]}px`,
2710
- ...r
2711
- } : r,
2712
- onOpenAutoFocus: (w) => {
2713
- if (e)
2714
- e(w);
2715
- else {
2716
- var L;
2717
- w.preventDefault(), (L = i.current) == null || L.focus();
2718
- }
2719
- },
2720
- onPointerDown: (w) => {
2721
- x || (a.onPointerDown == null || a.onPointerDown.call(a, w), N.current = {
2722
- x: w.clientX,
2723
- y: w.clientY
2724
- }, l(w));
2725
- },
2726
- onPointerDownOutside: (w) => {
2727
- if (t == null || t(w), !R || w.defaultPrevented) {
2728
- w.preventDefault();
2729
- return;
2730
- }
2731
- c.current && (c.current = !1), w.preventDefault(), H == null || H(!1), !(!m || K !== void 0) && y();
2732
- },
2733
- onFocusOutside: (w) => {
2734
- if (!R) {
2735
- w.preventDefault();
2736
- return;
2737
- }
2738
- },
2739
- onEscapeKeyDown: (w) => {
2740
- if (!R) {
2741
- w.preventDefault();
2742
- return;
2743
- }
2744
- },
2745
- onPointerMove: (w) => {
2746
- if (x || (a.onPointerMove == null || a.onPointerMove.call(a, w), !N.current)) return;
2747
- const L = w.clientY - N.current.y, te = w.clientX - N.current.x, Q = w.pointerType === "touch" ? 10 : 2;
2748
- _({
2749
- x: te,
2750
- y: L
2751
- }, p, Q) ? v(w) : (Math.abs(te) > Q || Math.abs(L) > Q) && (N.current = null);
2752
- },
2753
- onPointerUp: (w) => {
2754
- a.onPointerUp == null || a.onPointerUp.call(a, w), N.current = null, P.current = !1, u(w);
2755
- }
2756
- });
2757
- });
2758
- fo.displayName = "Drawer.Content";
2759
- function vl({ onDrag: e, onOpenChange: t, ...n }) {
2760
- const { onNestedDrag: r, onNestedOpenChange: a, onNestedRelease: s } = wt();
2814
+ va.displayName = "Drawer.Handle";
2815
+ function jl({ onDrag: e, onOpenChange: t, ...n }) {
2816
+ const { onNestedDrag: r, onNestedOpenChange: o, onNestedRelease: s } = Qe();
2761
2817
  if (!r)
2762
2818
  throw new Error("Drawer.NestedRoot must be placed in another drawer");
2763
- return /* @__PURE__ */ g.createElement(lo, {
2819
+ return /* @__PURE__ */ p.createElement(pa, {
2764
2820
  nested: !0,
2765
2821
  onClose: () => {
2766
- a(!1);
2822
+ o(!1);
2767
2823
  },
2768
2824
  onDrag: (i, l) => {
2769
2825
  r(i, l), e == null || e(i, l);
2770
2826
  },
2771
2827
  onOpenChange: (i) => {
2772
- i && a(i), t == null || t(i);
2828
+ i && o(i);
2773
2829
  },
2774
2830
  onRelease: s,
2775
2831
  ...n
2776
2832
  });
2777
2833
  }
2778
- const ie = {
2779
- Root: lo,
2780
- NestedRoot: vl,
2781
- Content: fo,
2782
- Handle: co,
2783
- Overlay: uo,
2784
- Trigger: qa,
2785
- Portal: Ga,
2786
- Close: Wa,
2787
- Title: Ya,
2788
- Description: Xa
2789
- }, Xt = ({
2834
+ function Nl(e) {
2835
+ const t = Qe(), { container: n = t.container, ...r } = e;
2836
+ return /* @__PURE__ */ p.createElement(os, {
2837
+ container: n,
2838
+ ...r
2839
+ });
2840
+ }
2841
+ const he = {
2842
+ Root: pa,
2843
+ NestedRoot: jl,
2844
+ Content: ga,
2845
+ Overlay: ma,
2846
+ Trigger: es,
2847
+ Portal: Nl,
2848
+ Handle: va,
2849
+ Close: ts,
2850
+ Title: ns,
2851
+ Description: rs
2852
+ }, Zt = ({
2790
2853
  shouldScaleBackground: e = !0,
2791
2854
  ...t
2792
- }) => /* @__PURE__ */ o.jsx(
2793
- ie.Root,
2855
+ }) => /* @__PURE__ */ a.jsx(
2856
+ he.Root,
2794
2857
  {
2795
2858
  shouldScaleBackground: e,
2796
2859
  ...t
2797
2860
  }
2798
2861
  );
2799
- Xt.displayName = "Drawer";
2800
- const ho = ie.Trigger, wl = ie.Portal, bl = ie.Close, po = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
2801
- ie.Overlay,
2862
+ Zt.displayName = "Drawer";
2863
+ const wa = he.Trigger, Tl = he.Portal, _l = he.Close, xa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2864
+ he.Overlay,
2802
2865
  {
2803
2866
  ref: n,
2804
2867
  className: O("fixed inset-0 z-50 bg-black/80", e),
2805
2868
  ...t
2806
2869
  }
2807
2870
  ));
2808
- po.displayName = ie.Overlay.displayName;
2809
- const Jt = h.forwardRef(({ className: e, children: t, hideBar: n = !0, ...r }, a) => /* @__PURE__ */ o.jsxs(wl, { children: [
2810
- /* @__PURE__ */ o.jsx(po, {}),
2811
- /* @__PURE__ */ o.jsxs(
2812
- ie.Content,
2813
- {
2814
- ref: a,
2815
- className: O(
2816
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
2817
- e
2818
- ),
2819
- ...r,
2820
- children: [
2821
- !n && /* @__PURE__ */ o.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2822
- t
2823
- ]
2824
- }
2825
- )
2826
- ] }));
2827
- Jt.displayName = "DrawerContent";
2828
- const Zt = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
2829
- ie.Title,
2871
+ xa.displayName = he.Overlay.displayName;
2872
+ const en = h.forwardRef(
2873
+ ({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ a.jsxs(Tl, { children: [
2874
+ /* @__PURE__ */ a.jsx(xa, {}),
2875
+ /* @__PURE__ */ a.jsxs(
2876
+ he.Content,
2877
+ {
2878
+ ref: o,
2879
+ className: O(
2880
+ "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
2881
+ e
2882
+ ),
2883
+ ...r,
2884
+ children: [
2885
+ !n && /* @__PURE__ */ a.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2886
+ t
2887
+ ]
2888
+ }
2889
+ )
2890
+ ] })
2891
+ );
2892
+ en.displayName = "DrawerContent";
2893
+ const tn = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2894
+ he.Title,
2830
2895
  {
2831
2896
  ref: n,
2832
2897
  className: O(
@@ -2836,45 +2901,19 @@ const Zt = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
2836
2901
  ...t
2837
2902
  }
2838
2903
  ));
2839
- Zt.displayName = ie.Title.displayName;
2840
- const xl = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
2841
- ie.Description,
2904
+ tn.displayName = he.Title.displayName;
2905
+ const Ol = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2906
+ he.Description,
2842
2907
  {
2843
2908
  ref: n,
2844
2909
  className: O("text-sm text-muted-foreground", e),
2845
2910
  ...t
2846
2911
  }
2847
2912
  ));
2848
- xl.displayName = ie.Description.displayName;
2849
- const yl = () => {
2850
- const { topNavigation: e } = Ue();
2851
- return /* @__PURE__ */ o.jsxs(Xt, { direction: "right", children: [
2852
- /* @__PURE__ */ o.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ o.jsx(ho, { className: "lg:hidden", children: /* @__PURE__ */ o.jsx($a, { size: 22 }) }) }),
2853
- /* @__PURE__ */ o.jsxs(
2854
- Jt,
2855
- {
2856
- className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none",
2857
- "aria-describedby": void 0,
2858
- children: [
2859
- /* @__PURE__ */ o.jsx(An, { children: /* @__PURE__ */ o.jsx(Zt, { children: "Navigation" }) }),
2860
- /* @__PURE__ */ o.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.map((t) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(
2861
- We,
2862
- {
2863
- className: ({ isActive: n }) => kn(
2864
- "block font-medium border-b-2",
2865
- n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
2866
- ),
2867
- to: t.id,
2868
- children: /* @__PURE__ */ o.jsx(bl, { children: t.label })
2869
- }
2870
- ) }, t.label)) })
2871
- ]
2872
- }
2873
- )
2874
- ] });
2875
- }, Ml = () => {
2876
- const e = Ue(), [t, n] = Te(!1), r = Fn(() => n(!1), []);
2877
- xe(() => {
2913
+ Ol.displayName = he.Description.displayName;
2914
+ const ya = () => {
2915
+ const e = qe(), [t, n] = Ie(!1), r = qn(() => n(!1), []);
2916
+ Ce(() => {
2878
2917
  if (t)
2879
2918
  return;
2880
2919
  function s(i) {
@@ -2884,34 +2923,61 @@ const yl = () => {
2884
2923
  window.removeEventListener("keydown", s);
2885
2924
  };
2886
2925
  }, [t, n]);
2887
- const a = e.plugins.find(Ns);
2888
- return a ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2889
- /* @__PURE__ */ o.jsxs(
2926
+ const o = e.plugins.find(As);
2927
+ return o ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2928
+ /* @__PURE__ */ a.jsxs(
2890
2929
  "button",
2891
2930
  {
2892
2931
  type: "button",
2893
2932
  onClick: () => n(!0),
2894
- className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-40 sm:w-72",
2933
+ className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
2895
2934
  children: [
2896
- /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
2897
- /* @__PURE__ */ o.jsx(La, { size: 14 }),
2935
+ /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
2936
+ /* @__PURE__ */ a.jsx(Ko, { size: 14 }),
2898
2937
  "Search"
2899
2938
  ] }),
2900
- /* @__PURE__ */ o.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
2939
+ /* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
2901
2940
  ]
2902
2941
  }
2903
2942
  ),
2904
- /* @__PURE__ */ o.jsx(Hn, { fallback: null, children: a.renderSearch({
2943
+ /* @__PURE__ */ a.jsx(Qn, { fallback: null, children: o.renderSearch({
2905
2944
  isOpen: t,
2906
2945
  onClose: r
2907
2946
  }) })
2908
2947
  ] }) : null;
2909
- }, Sl = () => {
2910
- const { topNavigation: e } = Ue();
2911
- return e.length <= 1 ? /* @__PURE__ */ o.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ o.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ o.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.map((t) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(
2912
- We,
2948
+ }, Il = () => {
2949
+ const { topNavigation: e } = qe();
2950
+ return /* @__PURE__ */ a.jsxs(Zt, { direction: "right", children: [
2951
+ /* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(wa, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(qo, { size: 22 }) }) }),
2952
+ /* @__PURE__ */ a.jsxs(
2953
+ en,
2954
+ {
2955
+ className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none",
2956
+ "aria-describedby": void 0,
2957
+ children: [
2958
+ /* @__PURE__ */ a.jsx(Hn, { children: /* @__PURE__ */ a.jsx(tn, { children: "Navigation" }) }),
2959
+ /* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(ya, {}) }),
2960
+ /* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.map((t) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
2961
+ Ze,
2962
+ {
2963
+ className: ({ isActive: n }) => Un(
2964
+ "block font-medium border-b-2",
2965
+ n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
2966
+ ),
2967
+ to: t.id,
2968
+ children: /* @__PURE__ */ a.jsx(_l, { children: t.label })
2969
+ }
2970
+ ) }, t.label)) })
2971
+ ]
2972
+ }
2973
+ )
2974
+ ] });
2975
+ }, Al = () => {
2976
+ const { topNavigation: e } = qe();
2977
+ return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.map((t) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
2978
+ Ze,
2913
2979
  {
2914
- className: ({ isActive: n }) => kn(
2980
+ className: ({ isActive: n }) => Un(
2915
2981
  "block py-3.5 font-medium -mb-px border-b-2",
2916
2982
  n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
2917
2983
  ),
@@ -2919,21 +2985,21 @@ const yl = () => {
2919
2985
  children: t.label
2920
2986
  }
2921
2987
  ) }, t.label)) }) });
2922
- }, mo = ({ item: e }) => e.children ? /* @__PURE__ */ o.jsxs(Gi, { children: [
2923
- /* @__PURE__ */ o.jsx(qr, { children: e.label }),
2924
- /* @__PURE__ */ o.jsx(qi, { children: /* @__PURE__ */ o.jsx(Gr, { children: e.children.map((t, n) => (
2988
+ }, ba = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(el, { children: [
2989
+ /* @__PURE__ */ a.jsx(Zr, { children: e.label }),
2990
+ /* @__PURE__ */ a.jsx(Zi, { children: /* @__PURE__ */ a.jsx(ea, { children: e.children.map((t, n) => (
2925
2991
  // eslint-disable-next-line react/no-array-index-key
2926
- /* @__PURE__ */ o.jsx(mo, { item: t }, n)
2992
+ /* @__PURE__ */ a.jsx(ba, { item: t }, n)
2927
2993
  )) }) })
2928
- ] }, e.label) : /* @__PURE__ */ o.jsx(Ot, { to: e.path ?? "", children: /* @__PURE__ */ o.jsx(Yr, { children: e.label }, e.label) }), go = Un(function() {
2929
- const t = cn(), [n, r] = ia(), { isAuthenticated: a, profile: s, isAuthEnabled: i } = cn(), l = Ue(), { page: u, plugins: v } = l, m = v.filter((d) => Ds(d)).flatMap((d) => d.getProfileMenuItems(l)).map((d) => /* @__PURE__ */ o.jsx(mo, { item: d }, d.label)), c = n ? Fa : Ha;
2930
- return /* @__PURE__ */ o.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
2931
- /* @__PURE__ */ o.jsx(Xi, {}),
2932
- /* @__PURE__ */ o.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
2933
- /* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
2934
- /* @__PURE__ */ o.jsx("div", { className: "flex", children: /* @__PURE__ */ o.jsx(Ot, { to: "/", children: /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-3.5", children: [
2935
- (u == null ? void 0 : u.logo) && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2936
- /* @__PURE__ */ o.jsx(
2994
+ ] }, e.label) : /* @__PURE__ */ a.jsx(At, { to: e.path ?? "", children: /* @__PURE__ */ a.jsx(na, { children: e.label }, e.label) }), Sa = Vn(function() {
2995
+ const t = pn(), [n, r] = po(), { isAuthenticated: o, profile: s, isAuthEnabled: i } = pn(), l = qe(), { page: u, plugins: m } = l, f = m.filter((d) => Os(d)).flatMap((d) => d.getProfileMenuItems(l)).map((d) => /* @__PURE__ */ a.jsx(ba, { item: d }, d.label)), c = n ? Qo : Vo;
2996
+ return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
2997
+ /* @__PURE__ */ a.jsx(rl, {}),
2998
+ /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
2999
+ /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
3000
+ /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(At, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
3001
+ (u == null ? void 0 : u.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3002
+ /* @__PURE__ */ a.jsx(
2937
3003
  "img",
2938
3004
  {
2939
3005
  src: u.logo.src.light,
@@ -2943,7 +3009,7 @@ const yl = () => {
2943
3009
  loading: "lazy"
2944
3010
  }
2945
3011
  ),
2946
- /* @__PURE__ */ o.jsx(
3012
+ /* @__PURE__ */ a.jsx(
2947
3013
  "img",
2948
3014
  {
2949
3015
  src: u.logo.src.dark,
@@ -2954,194 +3020,194 @@ const yl = () => {
2954
3020
  }
2955
3021
  )
2956
3022
  ] }),
2957
- /* @__PURE__ */ o.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: u == null ? void 0 : u.pageTitle })
3023
+ /* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: u == null ? void 0 : u.pageTitle })
2958
3024
  ] }) }) }),
2959
- /* @__PURE__ */ o.jsxs("div", { className: "grid grid-cols-2 md:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
2960
- /* @__PURE__ */ o.jsx("div", { className: "w-full justify-center flex", children: /* @__PURE__ */ o.jsx(Ml, {}) }),
2961
- /* @__PURE__ */ o.jsx(yl, {}),
2962
- /* @__PURE__ */ o.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
2963
- /* @__PURE__ */ o.jsx(he, { name: "head-navigation-start" }),
2964
- i && !a ? /* @__PURE__ */ o.jsx(Rt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : m.length > 0 && /* @__PURE__ */ o.jsxs(Vi, { modal: !1, children: [
2965
- /* @__PURE__ */ o.jsx(Qi, { asChild: !0, children: /* @__PURE__ */ o.jsx(Rt, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
2966
- /* @__PURE__ */ o.jsxs(Wr, { className: "w-56", children: [
2967
- /* @__PURE__ */ o.jsx(Xr, { children: "My Account" }),
2968
- /* @__PURE__ */ o.jsx(Jr, {}),
2969
- m
3025
+ /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
3026
+ /* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(ya, {}) }),
3027
+ /* @__PURE__ */ a.jsx(Il, {}),
3028
+ /* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
3029
+ /* @__PURE__ */ a.jsx(xe, { name: "head-navigation-start" }),
3030
+ i && !o ? /* @__PURE__ */ a.jsx(Pt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : f.length > 0 && /* @__PURE__ */ a.jsxs(Xi, { modal: !1, children: [
3031
+ /* @__PURE__ */ a.jsx(Ji, { asChild: !0, children: /* @__PURE__ */ a.jsx(Pt, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
3032
+ /* @__PURE__ */ a.jsxs(ta, { className: "w-56", children: [
3033
+ /* @__PURE__ */ a.jsx(ra, { children: "My Account" }),
3034
+ /* @__PURE__ */ a.jsx(aa, {}),
3035
+ f
2970
3036
  ] })
2971
3037
  ] }),
2972
- /* @__PURE__ */ o.jsx(
3038
+ /* @__PURE__ */ a.jsx(
2973
3039
  "button",
2974
3040
  {
2975
3041
  type: "button",
2976
3042
  "aria-label": n ? "Switch to light mode" : "Switch to dark mode",
2977
3043
  className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
2978
3044
  onClick: r,
2979
- children: /* @__PURE__ */ o.jsx(c, { size: 18 })
3045
+ children: /* @__PURE__ */ a.jsx(c, { size: 18 })
2980
3046
  }
2981
3047
  ),
2982
- /* @__PURE__ */ o.jsx(he, { name: "head-navigation-end" })
3048
+ /* @__PURE__ */ a.jsx(xe, { name: "head-navigation-end" })
2983
3049
  ] })
2984
3050
  ] })
2985
3051
  ] }),
2986
- /* @__PURE__ */ o.jsx(he, { name: "top-navigation-before" }),
2987
- /* @__PURE__ */ o.jsx(Sl, {}),
2988
- /* @__PURE__ */ o.jsx(he, { name: "top-navigation-after" })
3052
+ /* @__PURE__ */ a.jsx(xe, { name: "top-navigation-before" }),
3053
+ /* @__PURE__ */ a.jsx(Al, {}),
3054
+ /* @__PURE__ */ a.jsx(xe, { name: "top-navigation-after" })
2989
3055
  ] })
2990
3056
  ] });
2991
- }), vo = {
2992
- Header: go
2993
- }, Cl = Ln(vo), El = Cl.Provider, Rl = (e) => {
2994
- const [t, n] = Te(!1);
2995
- xe(() => {
3057
+ }), Ca = {
3058
+ Header: Sa
3059
+ }, kl = Kn(Ca), $l = kl.Provider, Fl = (e) => {
3060
+ const [t, n] = Ie(!1);
3061
+ Ce(() => {
2996
3062
  const s = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"), l = s === "dark" || !s && i.matches;
2997
3063
  n(l);
2998
3064
  }, [t]);
2999
- const r = Fn(() => {
3065
+ const r = qn(() => {
3000
3066
  const s = !t;
3001
3067
  document.documentElement.classList.toggle("dark", s), localStorage.setItem("theme", s ? "dark" : "light"), n(s);
3002
- }, [t]), a = [t, r];
3003
- return /* @__PURE__ */ o.jsx(la.Provider, { value: a, ...e });
3004
- }, Dl = ({
3068
+ }, [t]), o = [t, r];
3069
+ return /* @__PURE__ */ a.jsx(mo.Provider, { value: o, ...e });
3070
+ }, Ll = ({
3005
3071
  children: e,
3006
3072
  context: t
3007
- }) => (Pa({
3073
+ }) => ($o({
3008
3074
  queryFn: async () => (await t.initialize(), !0),
3009
3075
  queryKey: ["zudoku-initialize"]
3010
- }), /* @__PURE__ */ o.jsx(Ta.Provider, { value: t, children: e })), jl = ({
3076
+ }), /* @__PURE__ */ a.jsx(Fo.Provider, { value: t, children: e })), Bl = ({
3011
3077
  children: e,
3012
3078
  ...t
3013
3079
  }) => {
3014
3080
  var c, d;
3015
- const n = xt(
3016
- () => ({ ...vo, ...t.overrides }),
3081
+ const n = mt(
3082
+ () => ({ ...Ca, ...t.overrides }),
3017
3083
  [t.overrides]
3018
- ), r = xt(() => {
3019
- var y;
3084
+ ), r = mt(() => {
3085
+ var M;
3020
3086
  return {
3021
- ...(t.plugins ?? []).filter(_s).flatMap(
3022
- (R) => R.getMdxComponents ? [R.getMdxComponents()] : []
3023
- ).reduce((R, K) => ({ ...R, ...K }), {}),
3024
- ...ca,
3025
- ...(y = t.mdx) == null ? void 0 : y.components
3087
+ ...(t.plugins ?? []).filter(Fs).flatMap(
3088
+ (C) => C.getMdxComponents ? [C.getMdxComponents()] : []
3089
+ ).reduce((C, _) => ({ ...C, ..._ }), {}),
3090
+ ...go,
3091
+ ...(M = t.mdx) == null ? void 0 : M.components
3026
3092
  };
3027
- }, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: a } = ga(Dt), [s, i] = Te(!1), l = xt(
3028
- () => s ? { stagger: !0 } : { stagger: a },
3029
- [a, s]
3030
- ), u = zo();
3031
- xe(() => {
3093
+ }, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: o } = Co(jt), [s, i] = Ie(!1), l = mt(
3094
+ () => s ? { stagger: !0 } : { stagger: o },
3095
+ [o, s]
3096
+ ), u = Wa();
3097
+ Ce(() => {
3032
3098
  s || i(!0);
3033
3099
  }, [s, u.location]);
3034
- const [v] = Te(() => new Is(t)), m = (d = t.plugins) == null ? void 0 : d.filter(Ts).map((f, y) => {
3035
- var R;
3036
- return /* @__PURE__ */ o.jsx(va, { children: (R = f.getHead) == null ? void 0 : R.call(f) }, y);
3100
+ const [m] = Ie(() => new Bs(t)), f = (d = t.plugins) == null ? void 0 : d.filter($s).map((v, M) => {
3101
+ var C;
3102
+ return /* @__PURE__ */ a.jsx(Mo, { children: (C = v.getHead) == null ? void 0 : C.call(v) }, M);
3037
3103
  });
3038
- return /* @__PURE__ */ o.jsxs(_a, { client: Yn, children: [
3039
- /* @__PURE__ */ o.jsx(_t, { children: m }),
3040
- /* @__PURE__ */ o.jsx(Dt.Provider, { value: l, children: /* @__PURE__ */ o.jsx(Dl, { context: v, children: /* @__PURE__ */ o.jsx(ko, { components: r, children: /* @__PURE__ */ o.jsx(Rl, { children: /* @__PURE__ */ o.jsx(El, { value: n, children: /* @__PURE__ */ o.jsx(Vo, { slotlets: t.slotlets, children: /* @__PURE__ */ o.jsx(ua, { children: e ?? /* @__PURE__ */ o.jsx(jn, {}) }) }) }) }) }) }) })
3104
+ return /* @__PURE__ */ a.jsxs(Lo, { client: nr, children: [
3105
+ /* @__PURE__ */ a.jsx(It, { children: f }),
3106
+ /* @__PURE__ */ a.jsx(jt.Provider, { value: l, children: /* @__PURE__ */ a.jsx(Ll, { context: m, children: /* @__PURE__ */ a.jsx(Ua, { components: r, children: /* @__PURE__ */ a.jsx(Fl, { children: /* @__PURE__ */ a.jsx($l, { value: n, children: /* @__PURE__ */ a.jsx(Xa, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(vo, { children: e ?? /* @__PURE__ */ a.jsx(In, {}) }) }) }) }) }) }) })
3041
3107
  ] });
3042
- }, Nl = Un(jl), wo = (e) => /* @__PURE__ */ o.jsx(Es, { FallbackComponent: As, children: /* @__PURE__ */ o.jsx(Nl, { ...e }) });
3043
- wo.displayName = "DevPortal";
3044
- const Pl = ({
3108
+ }, Hl = Vn(Bl), Ma = (e) => /* @__PURE__ */ a.jsx(Ts, { FallbackComponent: Hs, children: /* @__PURE__ */ a.jsx(Hl, { ...e }) });
3109
+ Ma.displayName = "DevPortal";
3110
+ const Ul = ({
3045
3111
  category: e,
3046
3112
  level: t
3047
3113
  }) => {
3048
3114
  var d;
3049
- const n = Kn(), r = $o(e), [a, s] = Te(!1), i = e.collapsible ?? !0, l = e.collapsed ?? !0, u = !!(!i || !l || r), [v, m] = Te(u);
3050
- xe(() => {
3051
- r && m(!0);
3115
+ const n = Yn(), r = za(e), [o, s] = Ie(!1), i = e.collapsible ?? !0, l = e.collapsed ?? !0, u = !!(!i || !l || r), [m, f] = Ie(u);
3116
+ Ce(() => {
3117
+ r && f(!0);
3052
3118
  }, [r]);
3053
- const c = i && /* @__PURE__ */ o.jsx(
3119
+ const c = i && /* @__PURE__ */ a.jsx(
3054
3120
  "button",
3055
3121
  {
3056
3122
  type: "button",
3057
- onClick: (f) => {
3058
- f.preventDefault(), m((y) => !y), s(!0);
3123
+ onClick: (v) => {
3124
+ v.preventDefault(), f((M) => !M), s(!0);
3059
3125
  },
3060
- children: /* @__PURE__ */ o.jsx(
3061
- Vn,
3126
+ children: /* @__PURE__ */ a.jsx(
3127
+ Xn,
3062
3128
  {
3063
3129
  size: 16,
3064
3130
  className: O(
3065
- a && "transition",
3131
+ o && "transition",
3066
3132
  "shrink-0 group-data-[state=open]:rotate-90"
3067
3133
  )
3068
3134
  }
3069
3135
  )
3070
3136
  }
3071
3137
  );
3072
- return /* @__PURE__ */ o.jsxs(
3073
- xa,
3138
+ return /* @__PURE__ */ a.jsxs(
3139
+ Do,
3074
3140
  {
3075
3141
  className: O("flex flex-col", t === 0 && "-mx-[--padding-nav-item]"),
3076
3142
  defaultOpen: u,
3077
- open: v,
3078
- onOpenChange: () => m(!0),
3143
+ open: m,
3144
+ onOpenChange: () => f(!0),
3079
3145
  children: [
3080
- /* @__PURE__ */ o.jsx(ya, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ o.jsxs(
3146
+ /* @__PURE__ */ a.jsx(Po, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
3081
3147
  "div",
3082
3148
  {
3083
3149
  className: O(
3084
3150
  "text-start",
3085
- Ge({ isActive: !1, isTopLevel: t === 0 }),
3151
+ Je({ isActive: !1, isTopLevel: t === 0 }),
3086
3152
  i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
3087
3153
  ),
3088
3154
  children: [
3089
- e.icon && /* @__PURE__ */ o.jsx(
3155
+ e.icon && /* @__PURE__ */ a.jsx(
3090
3156
  e.icon,
3091
3157
  {
3092
3158
  size: 16,
3093
3159
  className: "align-[-0.125em] -translate-x-1"
3094
3160
  }
3095
3161
  ),
3096
- ((d = e.link) == null ? void 0 : d.type) === "doc" ? /* @__PURE__ */ o.jsx(
3097
- We,
3162
+ ((d = e.link) == null ? void 0 : d.type) === "doc" ? /* @__PURE__ */ a.jsx(
3163
+ Ze,
3098
3164
  {
3099
- to: Ft(n == null ? void 0 : n.id, e.link.id),
3165
+ to: Ht(n == null ? void 0 : n.id, e.link.id),
3100
3166
  className: "flex-1",
3101
3167
  onClick: () => s(!0),
3102
- children: ({ isActive: f }) => /* @__PURE__ */ o.jsxs(
3168
+ children: ({ isActive: v }) => /* @__PURE__ */ a.jsxs(
3103
3169
  "div",
3104
3170
  {
3105
3171
  className: O(
3106
3172
  "flex items-center gap-2 justify-between w-full",
3107
- f ? "text-primary font-medium" : "text-foreground/80"
3173
+ v ? "text-primary font-medium" : "text-foreground/80"
3108
3174
  ),
3109
3175
  children: [
3110
- /* @__PURE__ */ o.jsx("div", { className: "truncate", children: e.label }),
3176
+ /* @__PURE__ */ a.jsx("div", { className: "truncate", children: e.label }),
3111
3177
  c
3112
3178
  ]
3113
3179
  }
3114
3180
  )
3115
3181
  }
3116
- ) : /* @__PURE__ */ o.jsxs("div", { className: "flex items-center justify-between w-full", children: [
3117
- /* @__PURE__ */ o.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
3182
+ ) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
3183
+ /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
3118
3184
  c
3119
3185
  ] })
3120
3186
  ]
3121
3187
  }
3122
3188
  ) }),
3123
- /* @__PURE__ */ o.jsx(
3124
- Ma,
3189
+ /* @__PURE__ */ a.jsx(
3190
+ jo,
3125
3191
  {
3126
3192
  className: O(
3127
3193
  // CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
3128
- a && "CollapsibleContent",
3194
+ o && "CollapsibleContent",
3129
3195
  "ms-[calc(var(--padding-nav-item)*1.125)]"
3130
3196
  ),
3131
- children: /* @__PURE__ */ o.jsx("ul", { className: "mt-1 border-l ps-2", children: e.items.map((f) => /* @__PURE__ */ o.jsx(
3132
- Tt,
3197
+ children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ps-2", children: e.items.map((v) => /* @__PURE__ */ a.jsx(
3198
+ Ot,
3133
3199
  {
3134
3200
  level: t + 1,
3135
- item: f
3201
+ item: v
3136
3202
  },
3137
- ("id" in f ? f.id : "") + ("href" in f ? f.href : "") + f.label
3203
+ ("id" in v ? v.id : "") + ("href" in v ? v.href : "") + v.label
3138
3204
  )) })
3139
3205
  }
3140
3206
  )
3141
3207
  ]
3142
3208
  }
3143
3209
  );
3144
- }, Ge = da(
3210
+ }, Je = wo(
3145
3211
  "flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
3146
3212
  {
3147
3213
  variants: {
@@ -3158,102 +3224,102 @@ const Pl = ({
3158
3224
  }
3159
3225
  }
3160
3226
  }
3161
- ), bo = "data-anchor", Tt = ({
3227
+ ), Ra = "data-anchor", Ot = ({
3162
3228
  item: e,
3163
3229
  level: t = 0
3164
3230
  }) => {
3165
- const n = Kn(), { activeAnchor: r } = kt(), [a] = Ko();
3231
+ const n = Yn(), { activeAnchor: r } = Ft(), [o] = Ya();
3166
3232
  switch (e.type) {
3167
3233
  case "category":
3168
- return /* @__PURE__ */ o.jsx(Pl, { category: e, level: t });
3234
+ return /* @__PURE__ */ a.jsx(Ul, { category: e, level: t });
3169
3235
  case "doc":
3170
- return /* @__PURE__ */ o.jsxs(
3171
- We,
3236
+ return /* @__PURE__ */ a.jsxs(
3237
+ Ze,
3172
3238
  {
3173
- className: ({ isActive: s }) => Ge({ isActive: s, isTopLevel: t === 0 }),
3174
- to: Ft(n == null ? void 0 : n.id, e.id),
3239
+ className: ({ isActive: s }) => Je({ isActive: s, isTopLevel: t === 0 }),
3240
+ to: Ht(n == null ? void 0 : n.id, e.id),
3175
3241
  children: [
3176
- e.icon && /* @__PURE__ */ o.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
3177
- e.badge ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
3178
- /* @__PURE__ */ o.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3179
- /* @__PURE__ */ o.jsx(yt, { ...e.badge })
3242
+ e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
3243
+ e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3244
+ /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3245
+ /* @__PURE__ */ a.jsx(St, { ...e.badge })
3180
3246
  ] }) : e.label
3181
3247
  ]
3182
3248
  }
3183
3249
  );
3184
3250
  case "link":
3185
- return e.href.startsWith("#") ? /* @__PURE__ */ o.jsx(
3186
- Lo,
3251
+ return e.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
3252
+ Ka,
3187
3253
  {
3188
- to: { hash: e.href, search: a.toString() },
3189
- [bo]: e.href.slice(1),
3254
+ to: { hash: e.href, search: o.toString() },
3255
+ [Ra]: e.href.slice(1),
3190
3256
  className: O(
3191
3257
  "flex gap-2.5 justify-between",
3192
3258
  t === 0 && "-mx-[--padding-nav-item]",
3193
- Ge({
3259
+ Je({
3194
3260
  isActive: e.href.slice(1) === r
3195
3261
  })
3196
3262
  ),
3197
- children: e.badge ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
3198
- /* @__PURE__ */ o.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3199
- /* @__PURE__ */ o.jsx(yt, { ...e.badge })
3200
- ] }) : /* @__PURE__ */ o.jsx("span", { className: "break-all", children: e.label })
3263
+ children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3264
+ /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3265
+ /* @__PURE__ */ a.jsx(St, { ...e.badge })
3266
+ ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
3201
3267
  }
3202
- ) : e.href.startsWith("http") ? /* @__PURE__ */ o.jsxs(
3268
+ ) : e.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
3203
3269
  "a",
3204
3270
  {
3205
3271
  className: O(
3206
- Ge({ isTopLevel: t === 0 }),
3272
+ Je({ isTopLevel: t === 0 }),
3207
3273
  "block"
3208
3274
  ),
3209
3275
  href: e.href,
3210
3276
  target: "_blank",
3211
3277
  rel: "noopener noreferrer",
3212
3278
  children: [
3213
- /* @__PURE__ */ o.jsx("span", { className: "whitespace-normal", children: e.label }),
3214
- /* @__PURE__ */ o.jsxs("span", { className: "whitespace-nowrap", children: [
3279
+ /* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: e.label }),
3280
+ /* @__PURE__ */ a.jsxs("span", { className: "whitespace-nowrap", children: [
3215
3281
  " ",
3216
- /* @__PURE__ */ o.jsx(Ua, { className: "inline ml-1", size: 12 })
3282
+ /* @__PURE__ */ a.jsx(Go, { className: "inline ml-1", size: 12 })
3217
3283
  ] })
3218
3284
  ]
3219
3285
  }
3220
- ) : /* @__PURE__ */ o.jsx(
3221
- We,
3286
+ ) : /* @__PURE__ */ a.jsx(
3287
+ Ze,
3222
3288
  {
3223
- className: O("flex gap-2.5 justify-between", Ge()),
3289
+ className: O("flex gap-2.5 justify-between", Je()),
3224
3290
  to: e.href,
3225
- children: e.badge ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
3226
- /* @__PURE__ */ o.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3227
- /* @__PURE__ */ o.jsx(yt, { ...e.badge })
3228
- ] }) : /* @__PURE__ */ o.jsx("span", { className: "break-all", children: e.label })
3291
+ children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3292
+ /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3293
+ /* @__PURE__ */ a.jsx(St, { ...e.badge })
3294
+ ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
3229
3295
  }
3230
3296
  );
3231
3297
  }
3232
- }, Tl = (e, t = { block: "center" }) => {
3298
+ }, zl = (e, t = { block: "center" }) => {
3233
3299
  if (!e) return;
3234
3300
  const n = e.getBoundingClientRect();
3235
3301
  n.top >= 0 && n.left >= 0 && n.bottom <= (window.innerHeight || document.documentElement.clientHeight) && n.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
3236
- }, _l = () => {
3237
- const e = It(), { setActiveAnchor: t } = kt();
3238
- xe(() => {
3302
+ }, Kl = () => {
3303
+ const e = kt(), { setActiveAnchor: t } = Ft();
3304
+ Ce(() => {
3239
3305
  if (!e.hash) return;
3240
3306
  const n = decodeURIComponent(e.hash.split("/")[0].slice(1)), r = () => {
3241
- const a = document.getElementById(n), s = document.querySelector(`[${bo}="${n}"]`);
3242
- return a ? (a.scrollIntoView(), Tl(s), requestIdleCallback(() => t(n)), !0) : !1;
3307
+ const o = document.getElementById(n), s = document.querySelector(`[${Ra}="${n}"]`);
3308
+ return o ? (o.scrollIntoView(), zl(s), requestIdleCallback(() => t(n)), !0) : !1;
3243
3309
  };
3244
3310
  if (!r()) {
3245
- const a = new MutationObserver((s, i) => {
3311
+ const o = new MutationObserver((s, i) => {
3246
3312
  r() && i.disconnect();
3247
3313
  });
3248
- return a.observe(document.body, { childList: !0, subtree: !0 }), () => a.disconnect();
3314
+ return o.observe(document.body, { childList: !0, subtree: !0 }), () => o.disconnect();
3249
3315
  }
3250
3316
  }, [e.hash, t]);
3251
- }, Ol = () => {
3252
- const e = It(), t = $t(e.pathname);
3253
- xe(() => {
3317
+ }, ql = () => {
3318
+ const e = kt(), t = Lt(e.pathname);
3319
+ Ce(() => {
3254
3320
  t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
3255
3321
  }, [e.pathname]);
3256
- }, xo = wa(({ children: e, className: t, pushMainContent: n }, r) => /* @__PURE__ */ o.jsx(
3322
+ }, Ea = Ro(({ children: e, className: t, pushMainContent: n }, r) => /* @__PURE__ */ a.jsx(
3257
3323
  "nav",
3258
3324
  {
3259
3325
  "data-navigation": String(n),
@@ -3267,72 +3333,72 @@ const Pl = ({
3267
3333
  children: e
3268
3334
  }
3269
3335
  ));
3270
- xo.displayName = "SidebarWrapper";
3271
- const Il = () => {
3272
- const e = $t(null), t = Oa();
3273
- return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
3274
- /* @__PURE__ */ o.jsxs(
3275
- xo,
3336
+ Ea.displayName = "SidebarWrapper";
3337
+ const Ql = () => {
3338
+ const e = Lt(null), t = Bo();
3339
+ return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3340
+ /* @__PURE__ */ a.jsxs(
3341
+ Ea,
3276
3342
  {
3277
3343
  ref: e,
3278
3344
  pushMainContent: t.data.items.length > 0,
3279
3345
  children: [
3280
- /* @__PURE__ */ o.jsx(he, { name: "zudoku-before-navigation" }),
3281
- t.data.items.map((n) => /* @__PURE__ */ o.jsx(Tt, { item: n }, n.label)),
3282
- /* @__PURE__ */ o.jsx(he, { name: "zudoku-after-navigation" })
3346
+ /* @__PURE__ */ a.jsx(xe, { name: "zudoku-before-navigation" }),
3347
+ t.data.items.map((n) => /* @__PURE__ */ a.jsx(Ot, { item: n }, n.label)),
3348
+ /* @__PURE__ */ a.jsx(xe, { name: "zudoku-after-navigation" })
3283
3349
  ]
3284
3350
  }
3285
3351
  ),
3286
- /* @__PURE__ */ o.jsxs(
3287
- Jt,
3352
+ /* @__PURE__ */ a.jsxs(
3353
+ en,
3288
3354
  {
3289
3355
  className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none",
3290
3356
  "aria-describedby": void 0,
3291
3357
  children: [
3292
- /* @__PURE__ */ o.jsx(An, { children: /* @__PURE__ */ o.jsx(Zt, { children: "Sidebar" }) }),
3293
- t.data.items.map((n) => /* @__PURE__ */ o.jsx(Tt, { item: n }, n.label))
3358
+ /* @__PURE__ */ a.jsx(Hn, { children: /* @__PURE__ */ a.jsx(tn, { children: "Sidebar" }) }),
3359
+ t.data.items.map((n) => /* @__PURE__ */ a.jsx(Ot, { item: n }, n.label))
3294
3360
  ]
3295
3361
  }
3296
3362
  )
3297
3363
  ] });
3298
- }, Al = ({ children: e }) => {
3299
- const t = It(), { setActiveAnchor: n } = kt(), { meta: r, authentication: a } = Ue();
3300
- _l(), Ol();
3301
- const s = $t(t.pathname);
3302
- return xe(() => {
3364
+ }, Vl = ({ children: e }) => {
3365
+ const t = kt(), { setActiveAnchor: n } = Ft(), { meta: r, authentication: o } = qe();
3366
+ Kl(), ql();
3367
+ const s = Lt(t.pathname);
3368
+ return Ce(() => {
3303
3369
  var i;
3304
- (i = a == null ? void 0 : a.pageLoad) == null || i.call(a);
3305
- }, [a]), xe(() => {
3370
+ (i = o == null ? void 0 : o.pageLoad) == null || i.call(o);
3371
+ }, [o]), Ce(() => {
3306
3372
  t.pathname !== s.current && n(""), s.current = t.pathname;
3307
- }, [t.pathname, n]), /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
3373
+ }, [t.pathname, n]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3308
3374
  !1,
3309
- /* @__PURE__ */ o.jsxs(_t, { titleTemplate: r == null ? void 0 : r.title, children: [
3310
- (r == null ? void 0 : r.description) && /* @__PURE__ */ o.jsx("meta", { name: "description", content: r.description }),
3311
- (r == null ? void 0 : r.favicon) && /* @__PURE__ */ o.jsx("link", { rel: "icon", href: r.favicon })
3375
+ /* @__PURE__ */ a.jsxs(It, { titleTemplate: r == null ? void 0 : r.title, children: [
3376
+ (r == null ? void 0 : r.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: r.description }),
3377
+ (r == null ? void 0 : r.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: r.favicon })
3312
3378
  ] }),
3313
- /* @__PURE__ */ o.jsx(he, { name: "layout-before-head" }),
3314
- /* @__PURE__ */ o.jsx(go, {}),
3315
- /* @__PURE__ */ o.jsx(he, { name: "layout-after-head" }),
3316
- /* @__PURE__ */ o.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ o.jsx(
3317
- Hn,
3379
+ /* @__PURE__ */ a.jsx(xe, { name: "layout-before-head" }),
3380
+ /* @__PURE__ */ a.jsx(Sa, {}),
3381
+ /* @__PURE__ */ a.jsx(xe, { name: "layout-after-head" }),
3382
+ /* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
3383
+ Qn,
3318
3384
  {
3319
- fallback: /* @__PURE__ */ o.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ o.jsx(Za, {}) }),
3320
- children: /* @__PURE__ */ o.jsxs(Xt, { direction: "left", children: [
3321
- /* @__PURE__ */ o.jsx(Il, {}),
3322
- /* @__PURE__ */ o.jsx(
3385
+ fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(ss, {}) }),
3386
+ children: /* @__PURE__ */ a.jsxs(Zt, { direction: "left", children: [
3387
+ /* @__PURE__ */ a.jsx(Ql, {}),
3388
+ /* @__PURE__ */ a.jsx(
3323
3389
  "div",
3324
3390
  {
3325
3391
  className: O(
3326
3392
  "lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
3327
3393
  "peer-data-[navigation=false]:hidden"
3328
3394
  ),
3329
- children: /* @__PURE__ */ o.jsxs(ho, { className: "flex items-center gap-2", children: [
3330
- /* @__PURE__ */ o.jsx(Ba, { size: 16, strokeWidth: 1.5 }),
3331
- /* @__PURE__ */ o.jsx("span", { className: "text-sm", children: "Menu" })
3395
+ children: /* @__PURE__ */ a.jsxs(wa, { className: "flex items-center gap-2", children: [
3396
+ /* @__PURE__ */ a.jsx(Wo, { size: 16, strokeWidth: 1.5 }),
3397
+ /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
3332
3398
  ] })
3333
3399
  }
3334
3400
  ),
3335
- /* @__PURE__ */ o.jsxs(
3401
+ /* @__PURE__ */ a.jsxs(
3336
3402
  "main",
3337
3403
  {
3338
3404
  className: O(
@@ -3343,9 +3409,9 @@ const Il = () => {
3343
3409
  "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
3344
3410
  ),
3345
3411
  children: [
3346
- /* @__PURE__ */ o.jsx(he, { name: "zudoku-before-content" }),
3347
- e ?? /* @__PURE__ */ o.jsx(jn, {}),
3348
- /* @__PURE__ */ o.jsx(he, { name: "zudoku-after-content" })
3412
+ /* @__PURE__ */ a.jsx(xe, { name: "zudoku-before-content" }),
3413
+ e ?? /* @__PURE__ */ a.jsx(In, {}),
3414
+ /* @__PURE__ */ a.jsx(xe, { name: "zudoku-after-content" })
3349
3415
  ]
3350
3416
  }
3351
3417
  )
@@ -3353,18 +3419,18 @@ const Il = () => {
3353
3419
  }
3354
3420
  ) })
3355
3421
  ] });
3356
- }, Zl = Fo, ec = fa, tc = wo, nc = Al, rc = Ot, oc = Qo, ac = es, sc = vs, ic = ws, lc = Rt, cc = _t;
3422
+ }, dc = qa, fc = xo, hc = Ma, pc = Vl, mc = At, gc = Ja, vc = is, wc = Ms, xc = Rs, yc = Pt, bc = It;
3357
3423
  export {
3358
- sc as Bootstrap,
3359
- ic as BootstrapStatic,
3360
- lc as Button,
3361
- ec as Callout,
3362
- tc as DevPortal,
3363
- cc as Head,
3364
- nc as Layout,
3365
- rc as Link,
3366
- oc as RouterError,
3367
- ac as ServerError,
3368
- Zl as useMDXComponents
3424
+ wc as Bootstrap,
3425
+ xc as BootstrapStatic,
3426
+ yc as Button,
3427
+ fc as Callout,
3428
+ hc as DevPortal,
3429
+ bc as Head,
3430
+ pc as Layout,
3431
+ mc as Link,
3432
+ gc as RouterError,
3433
+ vc as ServerError,
3434
+ dc as useMDXComponents
3369
3435
  };
3370
3436
  //# sourceMappingURL=zudoku.components.js.map