@chaibuilder/sdk 1.2.22 → 1.2.23

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 (106) hide show
  1. package/dist/AddBlocks-b0Vk6eqO.js +206 -0
  2. package/dist/AddBlocks-bgu08YJC.cjs +1 -0
  3. package/dist/BrandingOptions-AljW1cXz.cjs +1 -0
  4. package/dist/{BrandingOptions-4961TxX2.js → BrandingOptions-eUSoIgjj.js} +10 -9
  5. package/dist/CanvasArea-dp1tzDkK.cjs +55 -0
  6. package/dist/CanvasArea-ulUy_rmB.js +951 -0
  7. package/dist/{Class-MmCxz2Ay.cjs → Class-PoYusiA5.cjs} +1 -1
  8. package/dist/{Class-3k8xjeiM.js → Class-lGzsNBOK.js} +1 -1
  9. package/dist/{CurrentPage-oPZN6Gwj.js → CurrentPage-SFhXzQMy.js} +9 -10
  10. package/dist/CurrentPage-rWHgPomd.cjs +1 -0
  11. package/dist/ListTree-5n8U4-IF.cjs +1 -0
  12. package/dist/ListTree-ZeVWczTF.js +309 -0
  13. package/dist/MODIFIERS-0g14w5RS.cjs +1 -0
  14. package/dist/{MODIFIERS-WQdaNvb8.js → MODIFIERS-dytZ-osO.js} +4 -8
  15. package/dist/{PagesPanel-pRKHw-AZ.js → PagesPanel-IkZjy0Gn.js} +9 -10
  16. package/dist/PagesPanel-sBN51kKZ.cjs +1 -0
  17. package/dist/{ProjectPanel-iU6DY-Yp.js → ProjectPanel-e98TJLfI.js} +10 -11
  18. package/dist/ProjectPanel-lbQH31jc.cjs +1 -0
  19. package/dist/STRINGS--j49GZJP.js +7 -0
  20. package/dist/STRINGS-gPz7CUOk.cjs +1 -0
  21. package/dist/{Settings-BhSrj-cE.js → Settings-FZWm8Fc3.js} +862 -865
  22. package/dist/Settings-qytQoyTv.cjs +1 -0
  23. package/dist/SidePanels-YRIM1IPq.cjs +1 -0
  24. package/dist/{SidePanels-OLOUpKn4.js → SidePanels-wrkkpcGE.js} +119 -123
  25. package/dist/{Topbar-Ny9T-7Zb.js → Topbar-LUyDFBkK.js} +6 -5
  26. package/dist/Topbar-NOSnWo7V.cjs +1 -0
  27. package/dist/{UnsplashImages-Y8RGFVSh.js → UnsplashImages-eZedbK2J.js} +16 -15
  28. package/dist/UnsplashImages-f-ObKOC-.cjs +1 -0
  29. package/dist/{UploadImages-dd8LfyFr.js → UploadImages-71QziLbr.js} +11 -10
  30. package/dist/UploadImages-oOnccvT9.cjs +1 -0
  31. package/dist/add-page-modal-g3fd00P5.cjs +1 -0
  32. package/dist/{add-page-modal-Jni6CY1x.js → add-page-modal-yQ6qL6Ui.js} +10 -11
  33. package/dist/{confirm-alert-sc8RaWvD.js → confirm-alert-3flAvzWH.js} +6 -5
  34. package/dist/confirm-alert-LQsGNYz8.cjs +1 -0
  35. package/dist/core.cjs +1 -1
  36. package/dist/core.d.ts +1 -0
  37. package/dist/core.js +48 -49
  38. package/dist/defaultTheme-7VqqhOcp.cjs +1 -0
  39. package/dist/{defaultTheme-gunU_Fe5.js → defaultTheme-D8B4-wHO.js} +1 -1
  40. package/dist/{delete-page-modal-0WiMZFxr.js → delete-page-modal-iMmkPec0.js} +9 -10
  41. package/dist/delete-page-modal-tzZmqGzE.cjs +1 -0
  42. package/dist/email.cjs +1 -1
  43. package/dist/email.d.ts +1 -0
  44. package/dist/email.js +16 -16
  45. package/dist/{form-n1Q6u16z.cjs → form-LBHtTduy.cjs} +1 -1
  46. package/dist/{form-Nj6Kdn3g.js → form-zKUMQFuB.js} +1 -1
  47. package/dist/html-to-json-efmv1pCj.cjs +1 -0
  48. package/dist/{html-to-json-C5sExaSD.js → html-to-json-ngX9ef2u.js} +31 -29
  49. package/dist/{index-nwAgi0aD.cjs → index--dUsFH1I.cjs} +1 -1
  50. package/dist/{index-IPJAbzzO.js → index-HD1UKc4P.js} +1091 -1063
  51. package/dist/{index-0bwkNnA0.cjs → index-bOWwCMRF.cjs} +42 -42
  52. package/dist/index-fvMaxES9.cjs +1 -0
  53. package/dist/{index-_VPpjzJu.js → index-m4WGov7e.js} +4 -4
  54. package/dist/{index-UP_4awU9.js → index-uLtBNl55.js} +4479 -4484
  55. package/dist/lib.cjs +3 -3
  56. package/dist/lib.js +17 -16
  57. package/dist/page-viewer-5gTszT-n.cjs +1 -0
  58. package/dist/{page-viewer-L1Dmgj-c.js → page-viewer-7AwzWRtB.js} +14 -15
  59. package/dist/project-general-setting-52CTYL_w.cjs +1 -0
  60. package/dist/{project-general-setting-sUP7JqWK.js → project-general-setting-pYPoqvqd.js} +10 -11
  61. package/dist/project-seo-setting-jTweI1DX.cjs +1 -0
  62. package/dist/{project-seo-setting-NNvAGt4T.js → project-seo-setting-zXKOcjep.js} +7 -6
  63. package/dist/render.cjs +1 -1
  64. package/dist/render.js +14 -13
  65. package/dist/single-page-detail-jy2SPcp1.cjs +1 -0
  66. package/dist/{single-page-detail-FXg_NebW.js → single-page-detail-q2TDxN-P.js} +11 -12
  67. package/dist/studio.cjs +1 -1
  68. package/dist/studio.d.ts +1 -0
  69. package/dist/studio.js +8 -9
  70. package/dist/ui.cjs +1 -1
  71. package/dist/ui.js +138 -137
  72. package/dist/web-blocks.cjs +6 -1
  73. package/dist/web-blocks.js +462 -354
  74. package/package.json +3 -5
  75. package/dist/AddBlocks-157fSrJX.cjs +0 -1
  76. package/dist/AddBlocks-WgpssWmQ.js +0 -223
  77. package/dist/BrandingOptions-nwXR9TMl.cjs +0 -1
  78. package/dist/CanvasArea-MajWGr9z.js +0 -908
  79. package/dist/CanvasArea-MmTlc5Vb.cjs +0 -55
  80. package/dist/CurrentPage-LpLr0lDI.cjs +0 -1
  81. package/dist/ListTree-dvxHTXs4.js +0 -167
  82. package/dist/ListTree-gTmusfso.cjs +0 -1
  83. package/dist/MODIFIERS-9EwxLM8V.cjs +0 -1
  84. package/dist/Outline-2OxsXs1-.js +0 -294
  85. package/dist/Outline-7CCnnzmK.cjs +0 -1
  86. package/dist/PagesPanel-8536oBWB.cjs +0 -1
  87. package/dist/ProjectPanel-oILsUWOH.cjs +0 -1
  88. package/dist/Settings-jHiYmt0y.cjs +0 -1
  89. package/dist/SidePanels-bcJJocSq.cjs +0 -1
  90. package/dist/Topbar-NMvzqQHW.cjs +0 -1
  91. package/dist/TypeIcon-ElNNPazl.cjs +0 -1
  92. package/dist/TypeIcon-qO96rNbV.js +0 -69
  93. package/dist/UnsplashImages-6tZv1q2_.cjs +0 -1
  94. package/dist/UploadImages-VLlVg9Ur.cjs +0 -1
  95. package/dist/add-page-modal-IsqDdK7X.cjs +0 -1
  96. package/dist/confirm-alert-f26zJ7Js.cjs +0 -1
  97. package/dist/defaultTheme-7Lk2zq60.cjs +0 -1
  98. package/dist/delete-page-modal-c3b-GCap.cjs +0 -1
  99. package/dist/html-to-json-FGufPv9R.cjs +0 -1
  100. package/dist/index-9PHdn80L.cjs +0 -1
  101. package/dist/page-viewer-TnxHhq7S.cjs +0 -1
  102. package/dist/project-general-setting-1Ot1RU43.cjs +0 -1
  103. package/dist/project-seo-setting-3-vBkx2v.cjs +0 -1
  104. package/dist/single-page-detail-btEKYXjE.cjs +0 -1
  105. package/dist/useAddBlockByDrop-V8xo-PNQ.js +0 -20
  106. package/dist/useAddBlockByDrop-qRHgy8_0.cjs +0 -1
@@ -1,43 +1,44 @@
1
- import * as m from "react";
2
- import et, { createContext as Is, useContext as Ms, useRef as br, createElement as xr, useReducer as Ds, useEffect as Ae, useDebugValue as Es, useCallback as F, useMemo as Os, useState as Ce, Suspense as vt } from "react";
3
- import { has as pe, get as H, flatten as ae, filter as D, isString as Et, find as se, map as P, omit as tt, each as ce, set as je, includes as Y, isUndefined as vr, without as Ot, isEmpty as Ee, forIn as Lt, isObject as Ls, first as Z, noop as zs, keys as Vs, startsWith as zt, isNull as He, pick as yt, sortBy as wt } from "lodash-es";
4
- import { g as de, a as $s } from "./Functions-7jnEwJyw.js";
5
- import { getBlockComponent as Oe } from "@chaibuilder/runtime";
6
- import { atom as w, useAtomValue as ee, useAtom as E, useSetAtom as _e } from "jotai";
7
- import { a as me, I as Vt, S as qe, B as Ke } from "./MODIFIERS-WQdaNvb8.js";
8
- import { g as Fs } from "./_commonjsHelpers-UyOWmZb0.js";
9
- import { useThrottledCallback as Us } from "@react-hookz/web";
1
+ import * as f from "react";
2
+ import et, { createContext as Ds, useContext as Es, useRef as hr, createElement as vr, useReducer as Os, useEffect as Ae, useDebugValue as Ls, useCallback as $, useMemo as zs, useState as Ce, Suspense as vt } from "react";
3
+ import { memoize as Oe, has as pe, get as J, flatten as re, filter as E, isString as Lt, find as oe, map as I, omit as tt, each as ce, set as je, includes as Y, isUndefined as wr, without as zt, isEmpty as _e, forIn as Vt, isObject as Vs, first as ee, noop as $s, keys as Fs, startsWith as $t, isNull as qe, pick as yt, sortBy as wt } from "lodash-es";
4
+ import { g as de, a as Us } from "./Functions-7jnEwJyw.js";
5
+ import { getBlockComponent as Le } from "@chaibuilder/runtime";
6
+ import { atom as w, useAtomValue as te, useAtom as O, useSetAtom as Be } from "jotai";
7
+ import { a as fe, I as Ft, S as Ke } from "./STRINGS--j49GZJP.js";
8
+ import { g as Ws } from "./_commonjsHelpers-UyOWmZb0.js";
9
+ import { useThrottledCallback as Gs } from "@react-hookz/web";
10
+ import { B as Je } from "./MODIFIERS-dytZ-osO.js";
10
11
  import { j as a } from "./jsx-runtime-WbnYoNE9.js";
11
- import * as $t from "@radix-ui/react-toggle";
12
+ import * as Ut from "@radix-ui/react-toggle";
12
13
  import { cva as ge } from "class-variance-authority";
13
- import { a as d, c as Pe } from "./Class-3k8xjeiM.js";
14
- import * as Je from "@radix-ui/react-switch";
15
- import { Slot as Ws } from "@radix-ui/react-slot";
16
- import * as fe from "@radix-ui/react-accordion";
17
- import { ChevronDownIcon as Gs, Cross2Icon as st, ChevronRightIcon as ot, CheckIcon as Le, DotFilledIcon as nt, CaretSortIcon as Hs, MagnifyingGlassIcon as qs } from "@radix-ui/react-icons";
18
- import * as q from "@radix-ui/react-alert-dialog";
19
- import * as T from "@radix-ui/react-dialog";
20
- import * as Ft from "@radix-ui/react-label";
14
+ import { a as d, c as Ie } from "./Class-lGzsNBOK.js";
15
+ import * as Ye from "@radix-ui/react-switch";
16
+ import { Slot as Hs } from "@radix-ui/react-slot";
17
+ import * as me from "@radix-ui/react-accordion";
18
+ import { ChevronDownIcon as qs, Cross2Icon as st, ChevronRightIcon as ot, CheckIcon as ze, DotFilledIcon as nt, CaretSortIcon as Ks, MagnifyingGlassIcon as Js } from "@radix-ui/react-icons";
19
+ import * as H from "@radix-ui/react-alert-dialog";
20
+ import * as P from "@radix-ui/react-dialog";
21
+ import * as Wt from "@radix-ui/react-label";
21
22
  import * as ue from "@radix-ui/react-scroll-area";
22
23
  import * as be from "@radix-ui/react-tabs";
23
24
  import * as ve from "@radix-ui/react-tooltip";
24
25
  import * as Se from "@radix-ui/react-popover";
25
26
  import * as B from "@radix-ui/react-menubar";
26
- import * as ze from "@radix-ui/react-hover-card";
27
+ import * as Ve from "@radix-ui/react-hover-card";
27
28
  import * as U from "@radix-ui/react-select";
28
- import * as I from "@radix-ui/react-dropdown-menu";
29
- import * as Ut from "@radix-ui/react-separator";
30
- import * as X from "@radix-ui/react-toast";
29
+ import * as M from "@radix-ui/react-dropdown-menu";
30
+ import * as Gt from "@radix-ui/react-separator";
31
+ import * as Z from "@radix-ui/react-toast";
31
32
  import { Command as Q } from "cmdk";
32
- import * as M from "@radix-ui/react-context-menu";
33
- import Ks, { IconPickerItem as Js } from "react-icons-picker";
34
- import Ys from "react-dom";
35
- import Qs from "react-quill";
33
+ import * as D from "@radix-ui/react-context-menu";
34
+ import Ys, { IconPickerItem as Qs } from "react-icons-picker";
35
+ import Xs from "react-dom";
36
+ import Zs from "react-quill";
36
37
  import "react-i18next";
37
- var G = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
38
- let Xs = 0;
39
- function ne(e, t) {
40
- const s = `atom${++Xs}`, o = {
38
+ var W = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
39
+ let eo = 0;
40
+ function ae(e, t) {
41
+ const s = `atom${++eo}`, o = {
41
42
  toString: () => s
42
43
  };
43
44
  return typeof e == "function" ? o.read = e : (o.init = e, o.read = (n) => n(o), o.write = (n, i, r) => i(
@@ -45,26 +46,26 @@ function ne(e, t) {
45
46
  typeof r == "function" ? r(n(o)) : r
46
47
  )), t && (o.write = t), o;
47
48
  }
48
- const $e = (e) => "init" in e, Fe = (e) => !!e.write, De = /* @__PURE__ */ new WeakMap(), Zs = (e, t) => {
49
- De.set(e, t), e.catch(() => {
50
- }).finally(() => De.delete(e));
49
+ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new WeakMap(), to = (e, t) => {
50
+ Ee.set(e, t), e.catch(() => {
51
+ }).finally(() => Ee.delete(e));
51
52
  }, Nt = (e, t) => {
52
- const s = De.get(e);
53
- s && (De.delete(e), s(t));
53
+ const s = Ee.get(e);
54
+ s && (Ee.delete(e), s(t));
54
55
  }, kt = (e, t) => {
55
56
  e.status = "fulfilled", e.value = t;
56
57
  }, jt = (e, t) => {
57
58
  e.status = "rejected", e.reason = t;
58
- }, eo = (e) => typeof (e == null ? void 0 : e.then) == "function", we = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), St = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), he = (e) => "v" in e && e.v instanceof Promise, to = (e, t) => "v" in e && "v" in t && e.v.orig && e.v.orig === t.v.orig, Te = (e) => {
59
+ }, so = (e) => typeof (e == null ? void 0 : e.then) == "function", we = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), St = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), he = (e) => "v" in e && e.v instanceof Promise, oo = (e, t) => "v" in e && "v" in t && e.v.orig && e.v.orig === t.v.orig, Te = (e) => {
59
60
  if ("e" in e)
60
61
  throw e.e;
61
62
  return e.v;
62
- }, so = () => {
63
+ }, no = () => {
63
64
  const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new Map();
64
65
  let o, n, i;
65
- (G ? "production" : void 0) !== "production" && (o = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set());
66
+ (W ? "production" : void 0) !== "production" && (o = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set());
66
67
  const r = (u) => e.get(u), c = (u, g) => {
67
- (G ? "production" : void 0) !== "production" && Object.freeze(g);
68
+ (W ? "production" : void 0) !== "production" && Object.freeze(g);
68
69
  const h = e.get(u);
69
70
  if (e.set(u, g), s.has(u) || s.set(u, h), h && he(h)) {
70
71
  const b = "v" in g ? g.v instanceof Promise ? g.v : Promise.resolve(g.v) : Promise.reject(g.e);
@@ -74,7 +75,7 @@ const $e = (e) => "init" in e, Fe = (e) => !!e.write, De = /* @__PURE__ */ new W
74
75
  const b = /* @__PURE__ */ new Map();
75
76
  let y = !1;
76
77
  h.forEach((x, k) => {
77
- !x && k === u && (x = g), x ? (b.set(k, x), g.d.get(k) !== x && (y = !0)) : (G ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
78
+ !x && k === u && (x = g), x ? (b.set(k, x), g.d.get(k) !== x && (y = !0)) : (W ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
78
79
  }), (y || g.d.size !== b.size) && (g.d = b);
79
80
  }, l = (u, g, h) => {
80
81
  const b = r(u), y = {
@@ -83,48 +84,48 @@ const $e = (e) => "init" in e, Fe = (e) => !!e.write, De = /* @__PURE__ */ new W
83
84
  };
84
85
  if (h && p(u, y, h), b && we(b, y) && b.d === y.d)
85
86
  return b;
86
- if (b && he(b) && he(y) && to(b, y)) {
87
+ if (b && he(b) && he(y) && oo(b, y)) {
87
88
  if (b.d === y.d)
88
89
  return b;
89
90
  y.v = b.v;
90
91
  }
91
92
  return c(u, y), y;
92
- }, f = (u, g, h, b) => {
93
- if (eo(g)) {
93
+ }, m = (u, g, h, b) => {
94
+ if (so(g)) {
94
95
  let y;
95
- const x = new Promise((k, O) => {
96
+ const x = new Promise((k, z) => {
96
97
  let A = !1;
97
98
  g.then(
98
99
  (R) => {
99
100
  if (!A) {
100
101
  A = !0;
101
- const _ = r(u), te = l(
102
+ const C = r(u), se = l(
102
103
  u,
103
104
  x,
104
105
  h
105
106
  );
106
- kt(x, R), k(R), (_ == null ? void 0 : _.d) !== te.d && V(u, te, _ == null ? void 0 : _.d);
107
+ kt(x, R), k(R), (C == null ? void 0 : C.d) !== se.d && q(u, se, C == null ? void 0 : C.d);
107
108
  }
108
109
  },
109
110
  (R) => {
110
111
  if (!A) {
111
112
  A = !0;
112
- const _ = r(u), te = l(
113
+ const C = r(u), se = l(
113
114
  u,
114
115
  x,
115
116
  h
116
117
  );
117
- jt(x, R), O(R), (_ == null ? void 0 : _.d) !== te.d && V(u, te, _ == null ? void 0 : _.d);
118
+ jt(x, R), z(R), (C == null ? void 0 : C.d) !== se.d && q(u, se, C == null ? void 0 : C.d);
118
119
  }
119
120
  }
120
121
  ), y = (R) => {
121
122
  A || (A = !0, R.then(
122
- (_) => kt(x, _),
123
- (_) => jt(x, _)
123
+ (C) => kt(x, C),
124
+ (C) => jt(x, C)
124
125
  ), k(R));
125
126
  };
126
127
  });
127
- return x.orig = g, x.status = "pending", Zs(x, (k) => {
128
+ return x.orig = g, x.status = "pending", to(x, (k) => {
128
129
  k && y(k), b == null || b();
129
130
  }), l(u, x, h);
130
131
  }
@@ -140,19 +141,19 @@ const $e = (e) => "init" in e, Fe = (e) => !!e.write, De = /* @__PURE__ */ new W
140
141
  if (g && (g.d.forEach((A, R) => {
141
142
  R !== u && !t.has(R) && j(R);
142
143
  }), Array.from(g.d).every(([A, R]) => {
143
- const _ = r(A);
144
- return A === u || _ === R || // TODO This is a hack, we should find a better solution.
145
- _ && !he(_) && we(_, R);
144
+ const C = r(A);
145
+ return A === u || C === R || // TODO This is a hack, we should find a better solution.
146
+ C && !he(C) && we(C, R);
146
147
  })))
147
148
  return g;
148
149
  const h = /* @__PURE__ */ new Map();
149
150
  let b = !0;
150
151
  const y = (A) => {
151
152
  if (A === u) {
152
- const _ = r(A);
153
- if (_)
154
- return h.set(A, _), Te(_);
155
- if ($e(A))
153
+ const C = r(A);
154
+ if (C)
155
+ return h.set(A, C), Te(C);
156
+ if (Fe(A))
156
157
  return h.set(A, void 0), A.init;
157
158
  throw new Error("no atom init");
158
159
  }
@@ -160,20 +161,20 @@ const $e = (e) => "init" in e, Fe = (e) => !!e.write, De = /* @__PURE__ */ new W
160
161
  return h.set(A, R), Te(R);
161
162
  };
162
163
  let x, k;
163
- const O = {
164
+ const z = {
164
165
  get signal() {
165
166
  return x || (x = new AbortController()), x.signal;
166
167
  },
167
168
  get setSelf() {
168
- return (G ? "production" : void 0) !== "production" && !Fe(u) && console.warn("setSelf function cannot be used with read-only atom"), !k && Fe(u) && (k = (...A) => {
169
- if ((G ? "production" : void 0) !== "production" && b && console.warn("setSelf function cannot be called in sync"), !b)
170
- return $(u, ...A);
169
+ return (W ? "production" : void 0) !== "production" && !Ue(u) && console.warn("setSelf function cannot be used with read-only atom"), !k && Ue(u) && (k = (...A) => {
170
+ if ((W ? "production" : void 0) !== "production" && b && console.warn("setSelf function cannot be called in sync"), !b)
171
+ return G(u, ...A);
171
172
  }), k;
172
173
  }
173
174
  };
174
175
  try {
175
- const A = u.read(y, O);
176
- return f(
176
+ const A = u.read(y, z);
177
+ return m(
177
178
  u,
178
179
  A,
179
180
  h,
@@ -186,90 +187,90 @@ const $e = (e) => "init" in e, Fe = (e) => !!e.write, De = /* @__PURE__ */ new W
186
187
  }
187
188
  }, v = (u) => Te(j(u)), S = (u) => {
188
189
  let g = t.get(u);
189
- return g || (g = K(u)), g;
190
- }, L = (u, g) => !g.l.size && (!g.t.size || g.t.size === 1 && g.t.has(u)), W = (u) => {
190
+ return g || (g = V(u)), g;
191
+ }, L = (u, g) => !g.l.size && (!g.t.size || g.t.size === 1 && g.t.has(u)), F = (u) => {
191
192
  const g = t.get(u);
192
- g && L(u, g) && J(u);
193
- }, C = (u) => {
193
+ g && L(u, g) && X(u);
194
+ }, _ = (u) => {
194
195
  const g = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new WeakMap(), b = (x) => {
195
196
  const k = t.get(x);
196
- k == null || k.t.forEach((O) => {
197
- O !== x && (g.set(
198
- O,
199
- (g.get(O) || /* @__PURE__ */ new Set()).add(x)
200
- ), h.set(O, (h.get(O) || 0) + 1), b(O));
197
+ k == null || k.t.forEach((z) => {
198
+ z !== x && (g.set(
199
+ z,
200
+ (g.get(z) || /* @__PURE__ */ new Set()).add(x)
201
+ ), h.set(z, (h.get(z) || 0) + 1), b(z));
201
202
  });
202
203
  };
203
204
  b(u);
204
205
  const y = (x) => {
205
206
  const k = t.get(x);
206
- k == null || k.t.forEach((O) => {
207
+ k == null || k.t.forEach((z) => {
207
208
  var A;
208
- if (O !== x) {
209
- let R = h.get(O);
210
- if (R && h.set(O, --R), !R) {
211
- let _ = !!((A = g.get(O)) != null && A.size);
212
- if (_) {
213
- const te = r(O), Ps = j(O);
214
- _ = !te || !we(te, Ps);
209
+ if (z !== x) {
210
+ let R = h.get(z);
211
+ if (R && h.set(z, --R), !R) {
212
+ let C = !!((A = g.get(z)) != null && A.size);
213
+ if (C) {
214
+ const se = r(z), Ms = j(z);
215
+ C = !se || !we(se, Ms);
215
216
  }
216
- _ || g.forEach((te) => te.delete(O));
217
+ C || g.forEach((se) => se.delete(z));
217
218
  }
218
- y(O);
219
+ y(z);
219
220
  }
220
221
  });
221
222
  };
222
223
  y(u);
223
- }, z = (u, ...g) => {
224
+ }, T = (u, ...g) => {
224
225
  let h = !0;
225
- const b = (k) => Te(j(k)), y = (k, ...O) => {
226
+ const b = (k) => Te(j(k)), y = (k, ...z) => {
226
227
  let A;
227
228
  if (k === u) {
228
- if (!$e(k))
229
+ if (!Fe(k))
229
230
  throw new Error("atom not writable");
230
- const R = r(k), _ = f(k, O[0]);
231
- (!R || !we(R, _)) && C(k);
231
+ const R = r(k), C = m(k, z[0]);
232
+ (!R || !we(R, C)) && _(k);
232
233
  } else
233
- A = z(k, ...O);
234
+ A = T(k, ...z);
234
235
  if (!h) {
235
- const R = ie();
236
- (G ? "production" : void 0) !== "production" && n.forEach(
237
- (_) => _({ type: "async-write", flushed: R })
236
+ const R = K();
237
+ (W ? "production" : void 0) !== "production" && n.forEach(
238
+ (C) => C({ type: "async-write", flushed: R })
238
239
  );
239
240
  }
240
241
  return A;
241
242
  }, x = u.write(b, y, ...g);
242
243
  return h = !1, x;
243
- }, $ = (u, ...g) => {
244
- const h = z(u, ...g), b = ie();
245
- return (G ? "production" : void 0) !== "production" && n.forEach(
244
+ }, G = (u, ...g) => {
245
+ const h = T(u, ...g), b = K();
246
+ return (W ? "production" : void 0) !== "production" && n.forEach(
246
247
  (y) => y({ type: "write", flushed: b })
247
248
  ), h;
248
- }, K = (u, g) => {
249
+ }, V = (u, g) => {
249
250
  const h = {
250
251
  t: new Set(g && [g]),
251
252
  l: /* @__PURE__ */ new Set()
252
253
  };
253
- if (t.set(u, h), (G ? "production" : void 0) !== "production" && i.add(u), j(u).d.forEach((b, y) => {
254
+ if (t.set(u, h), (W ? "production" : void 0) !== "production" && i.add(u), j(u).d.forEach((b, y) => {
254
255
  const x = t.get(y);
255
- x ? x.t.add(u) : y !== u && K(y, u);
256
- }), j(u), Fe(u) && u.onMount) {
257
- const b = u.onMount((...y) => $(u, ...y));
256
+ x ? x.t.add(u) : y !== u && V(y, u);
257
+ }), j(u), Ue(u) && u.onMount) {
258
+ const b = u.onMount((...y) => G(u, ...y));
258
259
  b && (h.u = b);
259
260
  }
260
261
  return h;
261
- }, J = (u) => {
262
+ }, X = (u) => {
262
263
  var g;
263
264
  const h = (g = t.get(u)) == null ? void 0 : g.u;
264
- h && h(), t.delete(u), (G ? "production" : void 0) !== "production" && i.delete(u);
265
+ h && h(), t.delete(u), (W ? "production" : void 0) !== "production" && i.delete(u);
265
266
  const b = r(u);
266
267
  b ? (he(b) && Nt(b.v), b.d.forEach((y, x) => {
267
268
  if (x !== u) {
268
269
  const k = t.get(x);
269
- k && (k.t.delete(u), L(x, k) && J(x));
270
+ k && (k.t.delete(u), L(x, k) && X(x));
270
271
  }
271
- })) : (G ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", u);
272
- }, V = (u, g, h) => {
272
+ })) : (W ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", u);
273
+ }, q = (u, g, h) => {
273
274
  const b = new Set(g.d.keys());
274
275
  h == null || h.forEach((y, x) => {
275
276
  if (b.has(x)) {
@@ -277,40 +278,40 @@ const $e = (e) => "init" in e, Fe = (e) => !!e.write, De = /* @__PURE__ */ new W
277
278
  return;
278
279
  }
279
280
  const k = t.get(x);
280
- k && (k.t.delete(u), L(x, k) && J(x));
281
+ k && (k.t.delete(u), L(x, k) && X(x));
281
282
  }), b.forEach((y) => {
282
283
  const x = t.get(y);
283
- x ? x.t.add(u) : t.has(u) && K(y, u);
284
+ x ? x.t.add(u) : t.has(u) && V(y, u);
284
285
  });
285
- }, ie = () => {
286
+ }, K = () => {
286
287
  let u;
287
- for ((G ? "production" : void 0) !== "production" && (u = /* @__PURE__ */ new Set()); s.size; ) {
288
+ for ((W ? "production" : void 0) !== "production" && (u = /* @__PURE__ */ new Set()); s.size; ) {
288
289
  const g = Array.from(s);
289
290
  s.clear(), g.forEach(([h, b]) => {
290
291
  const y = r(h);
291
292
  if (y) {
292
- y.d !== (b == null ? void 0 : b.d) && V(h, y, b == null ? void 0 : b.d);
293
+ y.d !== (b == null ? void 0 : b.d) && q(h, y, b == null ? void 0 : b.d);
293
294
  const x = t.get(h);
294
295
  x && !// TODO This seems pretty hacky. Hope to fix it.
295
296
  // Maybe we could `mountDependencies` in `setAtomState`?
296
- (b && !he(b) && (we(b, y) || St(b, y))) && (x.l.forEach((k) => k()), (G ? "production" : void 0) !== "production" && u.add(h));
297
+ (b && !he(b) && (we(b, y) || St(b, y))) && (x.l.forEach((k) => k()), (W ? "production" : void 0) !== "production" && u.add(h));
297
298
  } else
298
- (G ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
299
+ (W ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
299
300
  });
300
301
  }
301
- if ((G ? "production" : void 0) !== "production")
302
+ if ((W ? "production" : void 0) !== "production")
302
303
  return o.forEach((g) => g("state")), u;
303
304
  }, le = (u, g) => {
304
- const h = S(u), b = ie(), y = h.l;
305
- return y.add(g), (G ? "production" : void 0) !== "production" && (o.forEach((x) => x("sub")), n.forEach(
305
+ const h = S(u), b = K(), y = h.l;
306
+ return y.add(g), (W ? "production" : void 0) !== "production" && (o.forEach((x) => x("sub")), n.forEach(
306
307
  (x) => x({ type: "sub", flushed: b })
307
308
  )), () => {
308
- y.delete(g), W(u), (G ? "production" : void 0) !== "production" && (o.forEach((x) => x("unsub")), n.forEach((x) => x({ type: "unsub" })));
309
+ y.delete(g), F(u), (W ? "production" : void 0) !== "production" && (o.forEach((x) => x("unsub")), n.forEach((x) => x({ type: "unsub" })));
309
310
  };
310
311
  };
311
- return (G ? "production" : void 0) !== "production" ? {
312
+ return (W ? "production" : void 0) !== "production" ? {
312
313
  get: v,
313
- set: $,
314
+ set: G,
314
315
  sub: le,
315
316
  // store dev methods (these are tentative and subject to change without notice)
316
317
  dev_subscribe_store: (u, g) => g !== 2 ? (console.warn(
@@ -325,26 +326,26 @@ const $e = (e) => "init" in e, Fe = (e) => !!e.write, De = /* @__PURE__ */ new W
325
326
  dev_get_mounted: (u) => t.get(u),
326
327
  dev_restore_atoms: (u) => {
327
328
  for (const [h, b] of u)
328
- $e(h) && (f(h, b), C(h));
329
- const g = ie();
329
+ Fe(h) && (m(h, b), _(h));
330
+ const g = K();
330
331
  n.forEach(
331
332
  (h) => h({ type: "restore", flushed: g })
332
333
  );
333
334
  }
334
335
  } : {
335
336
  get: v,
336
- set: $,
337
+ set: G,
337
338
  sub: le
338
339
  };
339
340
  };
340
- let Ue;
341
- const oo = () => (Ue || (Ue = so()), Ue);
342
- var no = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
343
- const ao = Is(void 0), Wt = (e) => {
344
- const t = Ms(ao);
345
- return (e == null ? void 0 : e.store) || t || oo();
341
+ let We;
342
+ const ao = () => (We || (We = no()), We);
343
+ var ro = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
344
+ const io = Ds(void 0), Ht = (e) => {
345
+ const t = Es(io);
346
+ return (e == null ? void 0 : e.store) || t || ao();
346
347
  };
347
- const ro = (e) => typeof (e == null ? void 0 : e.then) == "function", io = et.use || ((e) => {
348
+ const lo = (e) => typeof (e == null ? void 0 : e.then) == "function", co = et.use || ((e) => {
348
349
  if (e.status === "pending")
349
350
  throw e;
350
351
  if (e.status === "fulfilled")
@@ -358,11 +359,11 @@ const ro = (e) => typeof (e == null ? void 0 : e.then) == "function", io = et.us
358
359
  }
359
360
  ), e);
360
361
  });
361
- function lo(e, t) {
362
- const s = Wt(t), [[o, n, i], r] = Ds(
362
+ function uo(e, t) {
363
+ const s = Ht(t), [[o, n, i], r] = Os(
363
364
  (l) => {
364
- const f = s.get(e);
365
- return Object.is(l[0], f) && l[1] === s && l[2] === e ? l : [f, s, e];
365
+ const m = s.get(e);
366
+ return Object.is(l[0], m) && l[1] === s && l[2] === e ? l : [m, s, e];
366
367
  },
367
368
  void 0,
368
369
  () => [s.get(e), s, e]
@@ -379,86 +380,86 @@ function lo(e, t) {
379
380
  r();
380
381
  });
381
382
  return r(), l;
382
- }, [s, e, p]), Es(c), ro(c) ? io(c) : c;
383
+ }, [s, e, p]), Ls(c), lo(c) ? co(c) : c;
383
384
  }
384
- function co(e, t) {
385
- const s = Wt(t);
386
- return F(
385
+ function fo(e, t) {
386
+ const s = Ht(t);
387
+ return $(
387
388
  (...n) => {
388
- if ((no ? "production" : void 0) !== "production" && !("write" in e))
389
+ if ((ro ? "production" : void 0) !== "production" && !("write" in e))
389
390
  throw new Error("not writable atom");
390
391
  return s.set(e, ...n);
391
392
  },
392
393
  [s, e]
393
394
  );
394
395
  }
395
- function Er(e, t) {
396
+ function zr(e, t) {
396
397
  return [
397
- lo(e, t),
398
+ uo(e, t),
398
399
  // We do wrong type assertion here, which results in throwing an error.
399
- co(e, t)
400
+ fo(e, t)
400
401
  ];
401
402
  }
402
403
  var at = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
403
- const Gt = Symbol();
404
- const At = (e, t, s) => (t.has(s) ? t : t.set(s, e())).get(s), uo = /* @__PURE__ */ new WeakMap(), mo = (e, t, s) => {
405
- const o = At(() => /* @__PURE__ */ new WeakMap(), uo, t);
404
+ const qt = Symbol();
405
+ const At = (e, t, s) => (t.has(s) ? t : t.set(s, e())).get(s), mo = /* @__PURE__ */ new WeakMap(), po = (e, t, s) => {
406
+ const o = At(() => /* @__PURE__ */ new WeakMap(), mo, t);
406
407
  return At(e, o, s);
407
- }, fo = {}, Ct = (e) => !!e.write, po = (e) => typeof e == "function";
408
- function go(e, t) {
409
- return mo(
408
+ }, go = {}, Ct = (e) => !!e.write, bo = (e) => typeof e == "function";
409
+ function xo(e, t) {
410
+ return po(
410
411
  () => {
411
412
  const s = /* @__PURE__ */ new WeakMap(), o = (r, c) => {
412
413
  let p = s.get(r);
413
414
  if (p)
414
415
  return p;
415
- const l = c && s.get(c), f = [], N = [];
416
+ const l = c && s.get(c), m = [], N = [];
416
417
  return r.forEach((j, v) => {
417
418
  const S = t ? t(j) : v;
418
419
  N[v] = S;
419
420
  const L = l && l.atomList[l.keyList.indexOf(S)];
420
421
  if (L) {
421
- f[v] = L;
422
+ m[v] = L;
422
423
  return;
423
424
  }
424
- const W = (z) => {
425
- const $ = z(n), K = z(e), V = o(K, $ == null ? void 0 : $.arr).keyList.indexOf(S);
426
- if (V < 0 || V >= K.length) {
427
- const ie = r[o(r).keyList.indexOf(S)];
428
- if (ie)
429
- return ie;
425
+ const F = (T) => {
426
+ const G = T(n), V = T(e), q = o(V, G == null ? void 0 : G.arr).keyList.indexOf(S);
427
+ if (q < 0 || q >= V.length) {
428
+ const K = r[o(r).keyList.indexOf(S)];
429
+ if (K)
430
+ return K;
430
431
  throw new Error("splitAtom: index out of bounds for read");
431
432
  }
432
- return K[V];
433
- }, C = (z, $, K) => {
434
- const J = z(n), V = z(e), le = o(V, J == null ? void 0 : J.arr).keyList.indexOf(S);
435
- if (le < 0 || le >= V.length)
433
+ return V[q];
434
+ }, _ = (T, G, V) => {
435
+ const X = T(n), q = T(e), le = o(q, X == null ? void 0 : X.arr).keyList.indexOf(S);
436
+ if (le < 0 || le >= q.length)
436
437
  throw new Error("splitAtom: index out of bounds for write");
437
- const u = po(K) ? K(V[le]) : K;
438
- $(e, [
439
- ...V.slice(0, le),
438
+ const u = bo(V) ? V(q[le]) : V;
439
+ G(e, [
440
+ ...q.slice(0, le),
440
441
  u,
441
- ...V.slice(le + 1)
442
+ ...q.slice(le + 1)
442
443
  ]);
443
444
  };
444
- f[v] = Ct(e) ? ne(W, C) : ne(W);
445
- }), l && l.keyList.length === N.length && l.keyList.every((j, v) => j === N[v]) ? p = l : p = { arr: r, atomList: f, keyList: N }, s.set(r, p), p;
446
- }, n = ne((r) => {
445
+ m[v] = Ct(e) ? ae(F, _) : ae(F);
446
+ }), l && l.keyList.length === N.length && l.keyList.every((j, v) => j === N[v]) ? p = l : p = { arr: r, atomList: m, keyList: N }, s.set(r, p), p;
447
+ }, n = ae((r) => {
447
448
  const c = r(n), p = r(e);
448
449
  return o(p, c == null ? void 0 : c.arr);
449
450
  });
450
451
  (at ? "production" : void 0) !== "production" && (n.debugPrivate = !0), n.init = void 0;
451
- const i = Ct(e) ? ne(
452
+ const i = Ct(e) ? ae(
452
453
  (r) => r(n).atomList,
453
454
  (r, c, p) => {
454
455
  switch (p.type) {
455
456
  case "remove": {
456
457
  const l = r(i).indexOf(p.atom);
457
458
  if (l >= 0) {
458
- const f = r(e);
459
+ const m = r(e);
459
460
  c(e, [
460
- ...f.slice(0, l),
461
- ...f.slice(l + 1)
461
+ ...m.slice(0, l),
462
+ ...m.slice(l + 1)
462
463
  ]);
463
464
  }
464
465
  break;
@@ -466,28 +467,28 @@ function go(e, t) {
466
467
  case "insert": {
467
468
  const l = p.before ? r(i).indexOf(p.before) : r(i).length;
468
469
  if (l >= 0) {
469
- const f = r(e);
470
+ const m = r(e);
470
471
  c(e, [
471
- ...f.slice(0, l),
472
+ ...m.slice(0, l),
472
473
  p.value,
473
- ...f.slice(l)
474
+ ...m.slice(l)
474
475
  ]);
475
476
  }
476
477
  break;
477
478
  }
478
479
  case "move": {
479
- const l = r(i).indexOf(p.atom), f = p.before ? r(i).indexOf(p.before) : r(i).length;
480
- if (l >= 0 && f >= 0) {
480
+ const l = r(i).indexOf(p.atom), m = p.before ? r(i).indexOf(p.before) : r(i).length;
481
+ if (l >= 0 && m >= 0) {
481
482
  const N = r(e);
482
- l < f ? c(e, [
483
+ l < m ? c(e, [
483
484
  ...N.slice(0, l),
484
- ...N.slice(l + 1, f),
485
+ ...N.slice(l + 1, m),
485
486
  N[l],
486
- ...N.slice(f)
487
+ ...N.slice(m)
487
488
  ]) : c(e, [
488
- ...N.slice(0, f),
489
+ ...N.slice(0, m),
489
490
  N[l],
490
- ...N.slice(f, l),
491
+ ...N.slice(m, l),
491
492
  ...N.slice(l + 1)
492
493
  ]);
493
494
  }
@@ -495,23 +496,23 @@ function go(e, t) {
495
496
  }
496
497
  }
497
498
  }
498
- ) : ne((r) => r(n).atomList);
499
+ ) : ae((r) => r(n).atomList);
499
500
  return i;
500
501
  },
501
502
  e,
502
- t || fo
503
+ t || go
503
504
  );
504
505
  }
505
- function Or(e) {
506
- const t = Symbol(), s = ne(t);
506
+ function Vr(e) {
507
+ const t = Symbol(), s = ae(t);
507
508
  (at ? "production" : void 0) !== "production" && (s.debugPrivate = !0);
508
- const o = ne(
509
+ const o = ae(
509
510
  (n, i) => {
510
511
  const r = n(s);
511
512
  return r !== t ? r : e(n, i);
512
513
  },
513
514
  (n, i, r) => {
514
- if (r === Gt)
515
+ if (r === qt)
515
516
  i(s, t);
516
517
  else if (typeof r == "function") {
517
518
  const c = n(o);
@@ -522,24 +523,24 @@ function Or(e) {
522
523
  );
523
524
  return o;
524
525
  }
525
- const bo = (e) => typeof (e == null ? void 0 : e.then) == "function";
526
- function xo(e) {
526
+ const ho = (e) => typeof (e == null ? void 0 : e.then) == "function";
527
+ function vo(e) {
527
528
  let t, s;
528
529
  const o = {
529
530
  getItem: (n, i) => {
530
531
  var r, c;
531
- const p = (f) => {
532
- if (f = f || "", t !== f) {
532
+ const p = (m) => {
533
+ if (m = m || "", t !== m) {
533
534
  try {
534
- s = JSON.parse(f);
535
+ s = JSON.parse(m);
535
536
  } catch {
536
537
  return i;
537
538
  }
538
- t = f;
539
+ t = m;
539
540
  }
540
541
  return s;
541
542
  }, l = (c = (r = e()) == null ? void 0 : r.getItem(n)) != null ? c : null;
542
- return bo(l) ? l.then(p) : p(l);
543
+ return ho(l) ? l.then(p) : p(l);
543
544
  },
544
545
  setItem: (n, i) => {
545
546
  var r;
@@ -570,59 +571,56 @@ function xo(e) {
570
571
  };
571
572
  }), o;
572
573
  }
573
- const ho = xo(
574
+ const yo = vo(
574
575
  () => typeof window < "u" ? window.localStorage : void 0
575
576
  );
576
- function Be(e, t, s = ho, o) {
577
- const n = o == null ? void 0 : o.unstable_getOnInit, i = ne(
577
+ function Re(e, t, s = yo, o) {
578
+ const n = o == null ? void 0 : o.unstable_getOnInit, i = ae(
578
579
  n ? s.getItem(e, t) : t
579
580
  );
580
581
  return (at ? "production" : void 0) !== "production" && (i.debugPrivate = !0), i.onMount = (c) => {
581
582
  n || c(s.getItem(e, t));
582
583
  let p;
583
584
  return s.subscribe && (p = s.subscribe(e, c, t)), p;
584
- }, ne(
585
+ }, ae(
585
586
  (c) => c(i),
586
587
  (c, p, l) => {
587
- const f = typeof l == "function" ? l(c(i)) : l;
588
- return f === Gt ? (p(i, t), s.removeItem(e)) : f instanceof Promise ? f.then((N) => (p(i, N), s.setItem(e, N))) : (p(i, f), s.setItem(e, f));
588
+ const m = typeof l == "function" ? l(c(i)) : l;
589
+ return m === qt ? (p(i, t), s.removeItem(e)) : m instanceof Promise ? m.then((N) => (p(i, N), s.setItem(e, N))) : (p(i, m), s.setItem(e, m));
589
590
  }
590
591
  );
591
592
  }
592
- const Ht = w(null);
593
- Ht.debugLabel = "chaiBuilderPropsAtom";
594
- const vo = w({});
595
- vo.debugLabel = "chaiExternalDataAtom";
596
- const Lr = () => !1, yo = (e) => {
597
- const t = e.replace(me, "").split(",");
593
+ const Kt = w(null);
594
+ Kt.debugLabel = "chaiBuilderPropsAtom";
595
+ const wo = w({});
596
+ wo.debugLabel = "chaiExternalDataAtom";
597
+ const $r = () => !1, No = (e) => {
598
+ const t = e.replace(fe, "").split(",");
598
599
  return { baseClasses: t[0], classes: t[1] };
599
- }, Ye = (e, t) => {
600
+ }, _t = Oe((e, t) => {
600
601
  if (!e)
601
602
  return !0;
602
- const s = Oe(e);
603
+ const s = Le(e);
603
604
  return s && pe(s, "canAcceptBlock") ? s.canAcceptBlock(t) : !1;
604
- }, wo = (e, t) => {
605
- const s = Oe(t);
605
+ }), ko = Oe((e, t) => {
606
+ const s = Le(t);
606
607
  return s && pe(s, "canBeNested") ? s.canBeNested(e) : !0;
607
- }, zr = (e) => {
608
- const t = Oe(e);
608
+ }), Fr = Oe((e) => {
609
+ const t = Le(e);
609
610
  return t && pe(t, "canDuplicate") ? t.canDuplicate() : !0;
610
- }, Vr = (e) => {
611
- const t = Oe(e);
611
+ }), Ur = Oe((e) => {
612
+ const t = Le(e);
612
613
  return t && pe(t, "canDelete") ? t.canDelete() : !0;
613
- }, $r = (e, { dragSource: t, dropTarget: s }) => {
614
- const o = H(t, "data._type", ""), n = H(s, "data._type", "");
615
- return Ye(n, o);
616
- };
617
- function qt(e, t, s) {
618
- const o = D(e, (i) => i._parent === t), n = [];
614
+ });
615
+ function Jt(e, t, s) {
616
+ const o = E(e, (i) => i._parent === t), n = [];
619
617
  for (let i = 0; i < o.length; i++) {
620
- const r = Jt(o[i]);
618
+ const r = Qt(o[i]);
621
619
  if (Object.keys(r).length > 0 && Object.keys(r).forEach((c) => {
622
620
  o[i][c] = `slot:${de()}`;
623
- }), D(e, { _parent: o[i]._id }).length > 0) {
621
+ }), E(e, { _parent: o[i]._id }).length > 0) {
624
622
  const c = de();
625
- n.push({ ...o[i], oldId: o[i]._id, _id: c, _parent: s }), n.push(ae(qt(e, o[i]._id, c)));
623
+ n.push({ ...o[i], oldId: o[i]._id, _id: c, _parent: s }), n.push(re(Jt(e, o[i]._id, c)));
626
624
  } else
627
625
  n.push({
628
626
  ...o[i],
@@ -631,9 +629,9 @@ function qt(e, t, s) {
631
629
  _parent: s
632
630
  });
633
631
  }
634
- return ae(n);
632
+ return re(n);
635
633
  }
636
- function Kt(e) {
634
+ function Yt(e) {
637
635
  const t = {};
638
636
  e.forEach((o) => {
639
637
  t[o._id] = { ...o, children: [] };
@@ -647,52 +645,52 @@ function Kt(e) {
647
645
  s.push(t[o._id]);
648
646
  }), s;
649
647
  }
650
- const Jt = (e) => {
648
+ const Qt = (e) => {
651
649
  const t = {};
652
650
  return Object.keys(e).forEach((s) => {
653
- Et(e[s]) && e[s].startsWith("slot") && (t[s] = e[s].replace("slot:", ""));
651
+ Lt(e[s]) && e[s].startsWith("slot") && (t[s] = e[s].replace("slot:", ""));
654
652
  }), t;
655
- }, No = (e, t, s = null) => {
656
- let o = se(e, { _id: t });
653
+ }, jo = (e, t, s = null) => {
654
+ let o = oe(e, { _id: t });
657
655
  o = { ...o, oldId: o._id, _id: de() }, s && (o = { ...o, _parent: s });
658
656
  const n = [o];
659
- D(e, { _parent: t }).length > 0 && n.push(ae(qt(e, t, o._id)));
660
- const i = ae(n);
661
- return P(i, (r) => {
662
- const c = r, p = Jt(c);
657
+ E(e, { _parent: t }).length > 0 && n.push(re(Jt(e, t, o._id)));
658
+ const i = re(n);
659
+ return I(i, (r) => {
660
+ const c = r, p = Qt(c);
663
661
  return Object.keys(p).length > 0 && Object.keys(p).forEach((l) => {
664
- const f = se(i, { oldId: p[l].replace("slot:", "") });
665
- c[l] = `slot:${f._id}`;
662
+ const m = oe(i, { oldId: p[l].replace("slot:", "") });
663
+ c[l] = `slot:${m._id}`;
666
664
  }), tt(c, ["global", "oldId"]);
667
665
  });
668
666
  };
669
- const re = w([]);
670
- re.debugLabel = "presentBlocksAtom";
671
- const ko = w((e) => {
672
- const t = e(re);
673
- return Kt([...t]);
667
+ const ie = w([]);
668
+ ie.debugLabel = "presentBlocksAtom";
669
+ const So = w((e) => {
670
+ const t = e(ie);
671
+ return Yt([...t]);
674
672
  });
675
- ko.debugLabel = "treeDSBlocks";
676
- re.debugLabel = "presentBlocksAtom";
677
- const rt = go(re);
673
+ So.debugLabel = "treeDSBlocks";
674
+ ie.debugLabel = "presentBlocksAtom";
675
+ const rt = xo(ie);
678
676
  rt.debugLabel = "pageBlocksAtomsAtom";
679
- const jo = w("");
680
- jo.debugLabel = "builderActivePageAtom";
681
- const So = w(-1);
682
- So.debugLabel = "destinationDropIndexAtom";
683
- const Yt = w([]);
684
- Yt.debugLabel = "buildingBlocksAtom";
685
- const Ao = w((e) => {
686
- const t = e(Yt);
687
- return D(t, (s) => pe(s, "blockId"));
677
+ const Ao = w("");
678
+ Ao.debugLabel = "builderActivePageAtom";
679
+ const Co = w(-1);
680
+ Co.debugLabel = "destinationDropIndexAtom";
681
+ const Xt = w([]);
682
+ Xt.debugLabel = "buildingBlocksAtom";
683
+ const _o = w((e) => {
684
+ const t = e(Xt);
685
+ return E(t, (s) => pe(s, "blockId"));
688
686
  });
689
- Ao.debugLabel = "globalBlocksAtom";
687
+ _o.debugLabel = "globalBlocksAtom";
690
688
  const it = w([]);
691
689
  it.debugLabel = "selectedBlockIdsAtom";
692
690
  const lt = w((e) => {
693
- const t = e(re), s = e(it);
694
- return P(
695
- D(t, ({ _id: o }) => Y(s, o)),
691
+ const t = e(ie), s = e(it);
692
+ return I(
693
+ E(t, ({ _id: o }) => Y(s, o)),
696
694
  (o) => ({ ...o })
697
695
  );
698
696
  });
@@ -701,36 +699,36 @@ const ct = w((e) => {
701
699
  const t = e(lt);
702
700
  return t.length === 0 ? null : t.length === 1 ? t[0] : {
703
701
  type: "Multiple",
704
- id: P(t, "id")
702
+ id: I(t, "id")
705
703
  };
706
704
  });
707
705
  ct.debugLabel = "selectedBlockAtom";
708
- const Co = (e) => H(e, "parent", null), _o = w((e) => {
709
- const t = e(lt), s = P(t, Co);
710
- return D(e(re), (o) => Y(s, o._id));
706
+ const Bo = (e) => J(e, "parent", null), Ro = w((e) => {
707
+ const t = e(lt), s = I(t, Bo);
708
+ return E(e(ie), (o) => Y(s, o._id));
711
709
  });
712
- _o.debugLabel = "selectedBlocksParentsAtom";
713
- const Qt = w(() => !1);
714
- Qt.debugLabel = "selectedBlockFlexChildAtom";
715
- const Xt = w(() => !1);
716
- Xt.debugLabel = "selectedBlockGridChildAtom";
710
+ Ro.debugLabel = "selectedBlocksParentsAtom";
711
+ const Zt = w(() => !1);
712
+ Zt.debugLabel = "selectedBlockFlexChildAtom";
713
+ const es = w(() => !1);
714
+ es.debugLabel = "selectedBlockGridChildAtom";
717
715
  const dt = w("");
718
716
  dt.debugLabel = "styleStateAtom";
719
- const Zt = Be("styleBreakpoint", "xs");
720
- Zt.debugLabel = "styleBreakpointAtom";
721
- const Fr = () => ({
722
- flexChild: ee(Qt),
723
- gridChild: ee(Xt)
724
- }), Ur = () => ee(ct);
725
- const Ve = () => {
726
- const [e, t] = E(it), s = F(
717
+ const ts = Re("styleBreakpoint", "xs");
718
+ ts.debugLabel = "styleBreakpointAtom";
719
+ const Wr = () => ({
720
+ flexChild: te(Zt),
721
+ gridChild: te(es)
722
+ }), Gr = () => te(ct);
723
+ const $e = () => {
724
+ const [e, t] = O(it), s = $(
727
725
  (o) => {
728
- t((n) => Y(n, o) ? Ot(n, o) : [...n, o]);
726
+ t((n) => Y(n, o) ? zt(n, o) : [...n, o]);
729
727
  },
730
728
  [t]
731
729
  );
732
730
  return [e, t, s];
733
- }, _t = (e) => {
731
+ }, Bt = (e) => {
734
732
  switch (e.type) {
735
733
  case "singular":
736
734
  return e.uiSchema;
@@ -741,7 +739,7 @@ const Ve = () => {
741
739
  if (Y(["slot", "styles"], r.type))
742
740
  return;
743
741
  const c = i;
744
- s[c] = _t(r);
742
+ s[c] = Bt(r);
745
743
  }), s;
746
744
  case "list":
747
745
  const { itemProperties: o } = e, n = {
@@ -752,12 +750,12 @@ const Ve = () => {
752
750
  if (Y(["slot", "styles"], r.type))
753
751
  return;
754
752
  const c = i;
755
- n.items[c] = _t(r);
753
+ n.items[c] = Bt(r);
756
754
  }), n;
757
755
  default:
758
756
  return {};
759
757
  }
760
- }, Bt = (e) => {
758
+ }, Rt = (e) => {
761
759
  switch (e.type) {
762
760
  case "singular":
763
761
  return e.schema;
@@ -772,7 +770,7 @@ const Ve = () => {
772
770
  if (Y(["slot", "styles"], p.type))
773
771
  return;
774
772
  const l = c;
775
- o.properties[l] = Bt(p);
773
+ o.properties[l] = Rt(p);
776
774
  }), o;
777
775
  case "list":
778
776
  const { itemProperties: n, title: i } = e, r = {
@@ -788,46 +786,46 @@ const Ve = () => {
788
786
  if (Y(["slot", "styles"], p.type))
789
787
  return;
790
788
  const l = c;
791
- r.items.properties[l] = Bt(p), je(r.items, "title", H(p, "itemTitle", `${i} item`));
789
+ r.items.properties[l] = Rt(p), je(r.items, "title", J(p, "itemTitle", `${i} item`));
792
790
  }), r;
793
791
  default:
794
792
  return {};
795
793
  }
796
- }, es = (e) => {
794
+ }, ss = (e) => {
797
795
  if (!e)
798
796
  return {};
799
797
  const t = {};
800
798
  return Object.keys(e).forEach((s) => {
801
- t[s] = Ro(e[s]);
799
+ t[s] = To(e[s]);
802
800
  }), t;
803
- }, Bo = (e) => {
804
- if (Ee(e.default))
801
+ }, Po = (e) => {
802
+ if (_e(e.default))
805
803
  return [];
806
804
  const { itemProperties: t } = e;
807
- return P(e.default, (s) => {
805
+ return I(e.default, (s) => {
808
806
  const o = { ...s };
809
- return Lt(s, (n, i) => {
810
- pe(t, i) && H(t[i], "i18n", !1) && (o[i] = Vt);
807
+ return Vt(s, (n, i) => {
808
+ pe(t, i) && J(t[i], "i18n", !1) && (o[i] = Ft);
811
809
  }), o;
812
810
  });
813
- }, Ro = (e) => {
811
+ }, To = (e) => {
814
812
  switch (e.type) {
815
813
  case "styles":
816
814
  return e.default;
817
815
  case "slot":
818
- return `${qe}${de()}`;
816
+ return `${Ke}${de()}`;
819
817
  case "singular":
820
818
  const { i18n: t, schema: s } = e;
821
- return t ? Vt : H(s, "default", "");
819
+ return t ? Ft : J(s, "default", "");
822
820
  case "model":
823
- return es(e.properties);
821
+ return ss(e.properties);
824
822
  case "list":
825
- return Bo(e);
823
+ return Po(e);
826
824
  default:
827
825
  return "";
828
826
  }
829
827
  };
830
- var ut = { exports: {} }, Wr = ut.exports;
828
+ var ut = { exports: {} }, Hr = ut.exports;
831
829
  (function(e) {
832
830
  (function() {
833
831
  "use strict";
@@ -839,8 +837,8 @@ var ut = { exports: {} }, Wr = ut.exports;
839
837
  }
840
838
  let s = function() {
841
839
  let o = [], n = -1, i = 0, r = !1, c;
842
- function p(l, f) {
843
- return !l || typeof l[f] != "function" ? this : (r = !0, l[f](), r = !1, this);
840
+ function p(l, m) {
841
+ return !l || typeof l[m] != "function" ? this : (r = !0, l[m](), r = !1, this);
844
842
  }
845
843
  return {
846
844
  /**
@@ -867,8 +865,8 @@ var ut = { exports: {} }, Wr = ut.exports;
867
865
  let l = o[n];
868
866
  if (!l)
869
867
  return this;
870
- const f = l.groupId;
871
- for (; l.groupId === f && (p(l, "undo"), n -= 1, l = o[n], !(!l || !l.groupId)); )
868
+ const m = l.groupId;
869
+ for (; l.groupId === m && (p(l, "undo"), n -= 1, l = o[n], !(!l || !l.groupId)); )
872
870
  ;
873
871
  return c && c(), this;
874
872
  },
@@ -879,8 +877,8 @@ var ut = { exports: {} }, Wr = ut.exports;
879
877
  let l = o[n + 1];
880
878
  if (!l)
881
879
  return this;
882
- const f = l.groupId;
883
- for (; l.groupId === f && (p(l, "redo"), n += 1, l = o[n + 1], !(!l || !l.groupId)); )
880
+ const m = l.groupId;
881
+ for (; l.groupId === m && (p(l, "redo"), n += 1, l = o[n + 1], !(!l || !l.groupId)); )
884
882
  ;
885
883
  return c && c(), this;
886
884
  },
@@ -911,7 +909,7 @@ var ut = { exports: {} }, Wr = ut.exports;
911
909
  * @returns {array}
912
910
  */
913
911
  getCommands: function(l) {
914
- return l ? o.filter((f) => f.groupId === l) : o;
912
+ return l ? o.filter((m) => m.groupId === l) : o;
915
913
  },
916
914
  /**
917
915
  * Returns the index of the actions list.
@@ -932,93 +930,93 @@ var ut = { exports: {} }, Wr = ut.exports;
932
930
  e.exports ? e.exports = s : window.UndoManager = s;
933
931
  })();
934
932
  })(ut);
935
- var To = ut.exports;
936
- const Po = /* @__PURE__ */ Fs(To), Io = w(Ke), Mo = w(null), ts = () => {
937
- const [e, t] = E(Io);
933
+ var Io = ut.exports;
934
+ const Mo = /* @__PURE__ */ Ws(Io), Do = w(Je), Eo = w(null), os = () => {
935
+ const [e, t] = O(Do);
938
936
  return [
939
- Ls(e) ? { ...Ke, ...e } : Ke,
937
+ Vs(e) ? { ...Je, ...e } : Je,
940
938
  t
941
939
  ];
942
- }, Gr = () => E(Mo), Do = w(null), Eo = () => ({ currentPage: ee(Do) });
943
- function Oo(e) {
944
- return Kt(e);
940
+ }, qr = () => O(Eo), Oo = w(null), Lo = () => ({ currentPage: te(Oo) });
941
+ function zo(e) {
942
+ return Yt(e);
945
943
  }
946
- const mt = (e, t) => ae(
944
+ const ft = (e, t) => re(
947
945
  e.map((s) => {
948
946
  if (s = t ? { ...s, parent: t } : { ...s }, s.children) {
949
947
  const o = [...s.children];
950
- return delete s.children, ae([s, ...mt(o, s._id)]);
948
+ return delete s.children, re([s, ...ft(o, s._id)]);
951
949
  }
952
950
  return s;
953
951
  })
954
952
  );
955
- function ft(e, t = !1) {
953
+ function mt(e, t = !1) {
956
954
  for (let s = 0; s < e.length; s++) {
957
955
  const o = e[s];
958
956
  o.global && !t ? e[s] = {
959
957
  type: "GlobalBlock",
960
958
  blockId: o.blockId,
961
- _parent: H(o, "parent", null),
959
+ _parent: J(o, "parent", null),
962
960
  _id: o._id
963
- } : o.children && o.children.length && ft(o.children);
961
+ } : o.children && o.children.length && mt(o.children);
964
962
  }
965
963
  }
966
- function ss(e) {
967
- let t = [], s = D(e, { type: "GlobalBlock" });
968
- return s.length > 0 && (s = P(s, os), ce(s, (o) => {
969
- t = [...t, ...Lo(o)];
964
+ function ns(e) {
965
+ let t = [], s = E(e, { type: "GlobalBlock" });
966
+ return s.length > 0 && (s = I(s, as), ce(s, (o) => {
967
+ t = [...t, ...Vo(o)];
970
968
  })), t;
971
969
  }
972
- function Lo(e) {
970
+ function Vo(e) {
973
971
  let t = [];
974
- const s = H(Z(e), "parent", null);
975
- je(Z(e), "parent", null);
976
- const o = [flatToNestedInstance.convert(ns(e))];
977
- ft(o, !0);
978
- let n = mt(o, e[0]._id);
979
- return n = je(n, "0.parent", s), t = [...t, n, ...ss(n)], t;
972
+ const s = J(ee(e), "parent", null);
973
+ je(ee(e), "parent", null);
974
+ const o = [flatToNestedInstance.convert(rs(e))];
975
+ mt(o, !0);
976
+ let n = ft(o, e[0]._id);
977
+ return n = je(n, "0.parent", s), t = [...t, n, ...ns(n)], t;
980
978
  }
981
- function os(e) {
982
- const t = se(Qe, { _id: e._id });
979
+ function as(e) {
980
+ const t = oe(Qe, { _id: e._id });
983
981
  if (!t)
984
982
  return [];
985
- const s = [t], o = D(Qe, { _parent: e._id });
986
- return o.length ? ae([...s, ...ae(P(o, os))]) : ae(s);
983
+ const s = [t], o = E(Qe, { _parent: e._id });
984
+ return o.length ? re([...s, ...re(I(o, as))]) : re(s);
987
985
  }
988
- const ns = (e) => JSON.parse(JSON.stringify(e));
986
+ const rs = (e) => JSON.parse(JSON.stringify(e));
989
987
  let Qe = [];
990
- function zo(e) {
988
+ function $o(e) {
991
989
  Qe = e;
992
- const t = Oo(ns(e));
993
- ft(t);
994
- const s = mt(t, null), o = ss(s), n = {};
995
- return ce(o, (i) => je(n, Z(i).blockId, i)), [s, n];
990
+ const t = zo(rs(e));
991
+ mt(t);
992
+ const s = ft(t, null), o = ns(s), n = {};
993
+ return ce(o, (i) => je(n, ee(i).blockId, i)), [s, n];
996
994
  }
997
- const Vo = () => {
998
- const [e] = ts(), { currentPage: t } = Eo(), [s] = ye();
999
- return F(() => {
1000
- const o = P(
995
+ const Fo = () => {
996
+ const [e] = os(), { currentPage: t } = Lo(), [s] = ye();
997
+ return $(() => {
998
+ const o = I(
1001
999
  s,
1002
1000
  (i) => tt(i, ["expanded", "order", "title", "siblings", "tempClasses"])
1003
- ), [n = []] = zo(o);
1001
+ ), [n = []] = $o(o);
1004
1002
  return {
1005
1003
  currentPage: t,
1006
1004
  blocks: n
1007
1005
  };
1008
1006
  }, [e, t, s]);
1009
1007
  }, Ne = (e, t = void 0) => {
1010
- const s = ee(Ht);
1011
- return H(s, e, t);
1012
- }, as = w([]);
1013
- as.debugLabel = "dataProvidersAtom";
1014
- const $o = () => E(as), pt = w("SAVED");
1008
+ const s = te(Kt);
1009
+ return J(s, e, t);
1010
+ }, is = w([]);
1011
+ is.debugLabel = "dataProvidersAtom";
1012
+ const Uo = () => O(is), pt = w("SAVED");
1015
1013
  pt.debugLabel = "pageSyncStateAtom";
1016
- const Hr = () => {
1017
- const [e, t] = E(pt), s = Ne("onSavePage", async (l) => {
1014
+ const Kr = () => {
1015
+ const [e, t] = O(pt), s = Ne("onSavePage", async (l) => {
1018
1016
  }), o = Ne("onSave", async (l) => {
1019
1017
  }), n = Ne("onSyncStatusChange", (l) => {
1020
- }), i = Vo(), [r] = $o(), [c] = ts();
1021
- return { savePage: Us(
1018
+ }), i = Fo(), [r] = Uo(), [c] = os();
1019
+ return { savePage: Gs(
1022
1020
  async () => {
1023
1021
  t("SAVING"), n("SAVING");
1024
1022
  const l = i();
@@ -1030,35 +1028,35 @@ const Hr = () => {
1030
1028
  5e3
1031
1029
  // save only every 5 seconds
1032
1030
  ), syncState: e, setSyncState: t };
1033
- }, oe = new Po();
1034
- oe.setLimit(50);
1035
- const rs = () => {
1036
- const [, e] = E(pt);
1037
- return Ae(() => (oe.setCallback(() => e("UNSAVED")), () => {
1038
- oe.setCallback(zs);
1031
+ }, ne = new Mo();
1032
+ ne.setLimit(50);
1033
+ const ls = () => {
1034
+ const [, e] = O(pt);
1035
+ return Ae(() => (ne.setCallback(() => e("UNSAVED")), () => {
1036
+ ne.setCallback($s);
1039
1037
  }), []), {
1040
- add: oe.add,
1041
- undo: oe.undo,
1042
- redo: oe.redo,
1043
- hasRedo: oe.hasRedo,
1044
- hasUndo: oe.hasUndo,
1045
- clear: oe.clear
1038
+ add: ne.add,
1039
+ undo: ne.undo,
1040
+ redo: ne.redo,
1041
+ hasRedo: ne.hasRedo,
1042
+ hasUndo: ne.hasUndo,
1043
+ clear: ne.clear
1046
1044
  };
1047
1045
  }, gt = (e, t) => {
1048
- const s = [], o = D(e, (n) => Y(t, n._id) || Y(t, n._parent) ? (s.push(n._id), !1) : !0);
1049
- return Ee(s) ? o : gt(o, s);
1050
- }, qr = () => {
1051
- const [e] = ye(), [t, s] = Ve(), { setNewBlocks: o } = xe();
1052
- return F(
1046
+ const s = [], o = E(e, (n) => Y(t, n._id) || Y(t, n._parent) ? (s.push(n._id), !1) : !0);
1047
+ return _e(s) ? o : gt(o, s);
1048
+ }, Jr = () => {
1049
+ const [e] = ye(), [t, s] = $e(), { setNewBlocks: o } = xe();
1050
+ return $(
1053
1051
  (n) => {
1054
1052
  var r;
1055
- const i = ((r = se(e, { _id: n[0] })) == null ? void 0 : r._parent) || null;
1053
+ const i = ((r = oe(e, { _id: n[0] })) == null ? void 0 : r._parent) || null;
1056
1054
  o(gt(e, n)), setTimeout(() => s(i ? [i] : []), 200);
1057
1055
  },
1058
1056
  [e, s, t]
1059
1057
  );
1060
1058
  };
1061
- function Fo(e, t, s, o) {
1059
+ function Wo(e, t, s, o) {
1062
1060
  let n = e.filter((c) => !c._parent);
1063
1061
  s && (n = e.filter((c) => c._parent === s));
1064
1062
  const i = o !== void 0 ? o : n.length;
@@ -1073,19 +1071,36 @@ function Fo(e, t, s, o) {
1073
1071
  }
1074
1072
  return !s && o !== void 0 && o >= n.length && (r = e.length), [...e.slice(0, r), ...t, ...e.slice(r)];
1075
1073
  }
1076
- const Uo = (e, t, s, o) => {
1074
+ function Pt(e) {
1075
+ const t = [], s = /* @__PURE__ */ new Map();
1076
+ e.forEach((n) => {
1077
+ s.set(n._id, n);
1078
+ });
1079
+ function o(n) {
1080
+ const i = s.get(n);
1081
+ t.includes(i) || (t.push(i), e.forEach((r) => {
1082
+ r._parent === n && o(r._id);
1083
+ }));
1084
+ }
1085
+ return e.forEach((n) => {
1086
+ n._parent || o(n._id);
1087
+ }), t;
1088
+ }
1089
+ const Go = (e, t, s, o) => {
1090
+ if (_e(t))
1091
+ return Pt(e);
1077
1092
  function n(c, p) {
1078
1093
  const l = c.filter((N) => N._parent === p);
1079
- let f = [...l];
1094
+ let m = [...l];
1080
1095
  return l.forEach((N) => {
1081
- f = f.concat(n(c, N._id));
1082
- }), f;
1096
+ m = m.concat(n(c, N._id));
1097
+ }), m;
1083
1098
  }
1084
1099
  const i = t.reduce((c, p) => {
1085
- const l = e.find((f) => f._id === p);
1100
+ const l = e.find((m) => m._id === p);
1086
1101
  if (l) {
1087
- const f = n(e, p);
1088
- c.push(l, ...f);
1102
+ const m = n(e, p);
1103
+ c.push(l, ...m);
1089
1104
  }
1090
1105
  return c;
1091
1106
  }, []);
@@ -1093,28 +1108,41 @@ const Uo = (e, t, s, o) => {
1093
1108
  t.includes(c._id) && (c._parent = s);
1094
1109
  });
1095
1110
  let r;
1096
- return s === void 0 ? r = o : r = e.findIndex((p) => p._id === s) + 1 + o, e.splice(r, 0, ...i), e;
1097
- }, Wo = () => {
1111
+ if (!s)
1112
+ r = o;
1113
+ else {
1114
+ const c = e.findIndex((p) => p._id === s);
1115
+ if (c === -1)
1116
+ r = o;
1117
+ else {
1118
+ r = c + 1;
1119
+ let p = 0;
1120
+ for (; p < o && r < e.length; )
1121
+ e[r]._parent === s && p++, r++;
1122
+ }
1123
+ }
1124
+ return e.splice(r, 0, ...i), Pt(e);
1125
+ }, Ho = () => {
1098
1126
  const [, e] = ye();
1099
1127
  return {
1100
1128
  setNewBlocks: (t) => {
1101
1129
  e(t);
1102
1130
  },
1103
1131
  addBlocks: (t, s, o) => {
1104
- e((n) => Fo(n, t, s, o));
1132
+ e((n) => Wo(n, t, s, o));
1105
1133
  },
1106
1134
  removeBlocks: (t) => {
1107
1135
  e((s) => gt(s, t));
1108
1136
  },
1109
1137
  moveBlocks: (t, s, o) => {
1110
- e((n) => Uo(n, t, s, o));
1138
+ e((n) => Go(n, t, s, o));
1111
1139
  },
1112
1140
  updateBlocksProps: (t) => {
1113
1141
  e((s) => {
1114
1142
  const o = t.map((n) => n._id);
1115
1143
  return s.map((n) => {
1116
1144
  if (o.includes(n._id)) {
1117
- const i = se(t, { _id: n._id });
1145
+ const i = oe(t, { _id: n._id });
1118
1146
  return { ...n, ...tt(i, "_id") };
1119
1147
  }
1120
1148
  return n;
@@ -1122,59 +1150,59 @@ const Uo = (e, t, s, o) => {
1122
1150
  });
1123
1151
  }
1124
1152
  };
1125
- }, ye = () => E(re), xe = () => {
1126
- const { add: e } = rs(), [t] = ye(), {
1153
+ }, ye = () => O(ie), xe = () => {
1154
+ const { add: e } = ls(), [t] = ye(), {
1127
1155
  setNewBlocks: s,
1128
1156
  addBlocks: o,
1129
1157
  removeBlocks: n,
1130
1158
  moveBlocks: i,
1131
1159
  updateBlocksProps: r
1132
- } = Wo();
1160
+ } = Ho();
1133
1161
  return {
1134
1162
  moveBlocks: (v, S, L) => {
1135
- const W = P(v, (C) => {
1136
- const $ = t.find((V) => V._id === C)._parent || void 0, J = t.filter((V) => $ ? V._parent === $ : !V._parent).map((V) => V._id).indexOf(C);
1137
- return { _id: C, oldParent: $, oldPosition: J };
1138
- });
1139
- i(v, S, L), e({
1140
- undo: () => ce(W, ({ _id: C, oldParent: z, oldPosition: $ }) => {
1141
- i([C], z, $);
1163
+ const F = I(v, (T) => {
1164
+ const V = t.find((K) => K._id === T)._parent || null, q = t.filter((K) => V ? K._parent === V : !K._parent).map((K) => K._id).indexOf(T);
1165
+ return { _id: T, oldParent: V, oldPosition: q };
1166
+ }), _ = F.find(({ _id: T }) => T === v[0]);
1167
+ _ && _.oldParent === S && _.oldPosition === L || (i(v, S, L), e({
1168
+ undo: () => ce(F, ({ _id: T, oldParent: G, oldPosition: V }) => {
1169
+ i([T], G, V);
1142
1170
  }),
1143
1171
  redo: () => i(v, S, L)
1144
- });
1172
+ }));
1145
1173
  },
1146
1174
  addBlocks: (v, S, L) => {
1147
1175
  o(v, S, L), e({
1148
- undo: () => n(P(v, "_id")),
1176
+ undo: () => n(I(v, "_id")),
1149
1177
  redo: () => o(v, S, L)
1150
1178
  });
1151
1179
  },
1152
1180
  removeBlocks: (v) => {
1153
- var C;
1154
- const S = (C = Z(v)) == null ? void 0 : C._parent, W = t.filter((z) => S ? z._parent === S : !z._parent).indexOf(Z(v));
1155
- n(P(v, "_id")), e({
1156
- undo: () => o(v, S, W),
1157
- redo: () => n(P(v, "_id"))
1181
+ var _;
1182
+ const S = (_ = ee(v)) == null ? void 0 : _._parent, F = t.filter((T) => S ? T._parent === S : !T._parent).indexOf(ee(v));
1183
+ n(I(v, "_id")), e({
1184
+ undo: () => o(v, S, F),
1185
+ redo: () => n(I(v, "_id"))
1158
1186
  });
1159
1187
  },
1160
1188
  updateBlocks: (v, S, L) => {
1161
- let W = [];
1189
+ let F = [];
1162
1190
  if (L)
1163
- W = P(v, (C) => ({ _id: C, ...L }));
1191
+ F = I(v, (_) => ({ _id: _, ...L }));
1164
1192
  else {
1165
- const C = Vs(S);
1166
- W = P(v, (z) => {
1167
- const $ = t.find((J) => J._id === z), K = { _id: z };
1168
- return ce(C, (J) => K[J] = $[J]), K;
1193
+ const _ = Fs(S);
1194
+ F = I(v, (T) => {
1195
+ const G = t.find((X) => X._id === T), V = { _id: T };
1196
+ return ce(_, (X) => V[X] = G[X]), V;
1169
1197
  });
1170
1198
  }
1171
- r(P(v, (C) => ({ _id: C, ...S }))), e({
1172
- undo: () => r(W),
1173
- redo: () => r(P(v, (C) => ({ _id: C, ...S })))
1199
+ r(I(v, (_) => ({ _id: _, ...S }))), e({
1200
+ undo: () => r(F),
1201
+ redo: () => r(I(v, (_) => ({ _id: _, ...S })))
1174
1202
  });
1175
1203
  },
1176
1204
  updateBlocksRuntime: (v, S) => {
1177
- r(P(v, (L) => ({ _id: L, ...S })));
1205
+ r(I(v, (L) => ({ _id: L, ...S })));
1178
1206
  },
1179
1207
  setNewBlocks: (v) => {
1180
1208
  s(v), e({
@@ -1183,7 +1211,7 @@ const Uo = (e, t, s, o) => {
1183
1211
  });
1184
1212
  }
1185
1213
  };
1186
- }, Go = ge(
1214
+ }, qo = ge(
1187
1215
  "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
1188
1216
  {
1189
1217
  variants: {
@@ -1202,10 +1230,10 @@ const Uo = (e, t, s, o) => {
1202
1230
  size: "default"
1203
1231
  }
1204
1232
  }
1205
- ), Ho = m.forwardRef(({ className: e, variant: t, size: s, ...o }, n) => /* @__PURE__ */ a.jsx($t.Root, { ref: n, className: d(Go({ variant: t, size: s, className: e })), ...o }));
1206
- Ho.displayName = $t.Root.displayName;
1207
- const qo = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1208
- Je.Root,
1233
+ ), Ko = f.forwardRef(({ className: e, variant: t, size: s, ...o }, n) => /* @__PURE__ */ a.jsx(Ut.Root, { ref: n, className: d(qo({ variant: t, size: s, className: e })), ...o }));
1234
+ Ko.displayName = Ut.Root.displayName;
1235
+ const Jo = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1236
+ Ye.Root,
1209
1237
  {
1210
1238
  className: d(
1211
1239
  "peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-800 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",
@@ -1214,7 +1242,7 @@ const qo = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1214
1242
  ...t,
1215
1243
  ref: s,
1216
1244
  children: /* @__PURE__ */ a.jsx(
1217
- Je.Thumb,
1245
+ Ye.Thumb,
1218
1246
  {
1219
1247
  className: d(
1220
1248
  "pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950"
@@ -1223,7 +1251,7 @@ const qo = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1223
1251
  )
1224
1252
  }
1225
1253
  ));
1226
- qo.displayName = Je.Root.displayName;
1254
+ Jo.displayName = Ye.Root.displayName;
1227
1255
  const bt = ge(
1228
1256
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
1229
1257
  {
@@ -1248,17 +1276,17 @@ const bt = ge(
1248
1276
  size: "default"
1249
1277
  }
1250
1278
  }
1251
- ), Ko = m.forwardRef(
1279
+ ), Yo = f.forwardRef(
1252
1280
  ({ className: e, variant: t, size: s, asChild: o = !1, ...n }, i) => {
1253
- const r = o ? Ws : "button";
1281
+ const r = o ? Hs : "button";
1254
1282
  return /* @__PURE__ */ a.jsx(r, { className: d(bt({ variant: t, size: s, className: e })), ref: i, ...n });
1255
1283
  }
1256
1284
  );
1257
- Ko.displayName = "Button";
1258
- const Kr = fe.Root, Jo = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(fe.Item, { ref: s, className: d("border-b", e), ...t }));
1259
- Jo.displayName = "AccordionItem";
1260
- const Yo = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsx(fe.Header, { className: "flex", children: /* @__PURE__ */ a.jsxs(
1261
- fe.Trigger,
1285
+ Yo.displayName = "Button";
1286
+ const Yr = me.Root, Qo = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(me.Item, { ref: s, className: d("border-b", e), ...t }));
1287
+ Qo.displayName = "AccordionItem";
1288
+ const Xo = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsx(me.Header, { className: "flex", children: /* @__PURE__ */ a.jsxs(
1289
+ me.Trigger,
1262
1290
  {
1263
1291
  ref: o,
1264
1292
  className: d(
@@ -1268,13 +1296,13 @@ const Yo = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
1268
1296
  ...s,
1269
1297
  children: [
1270
1298
  t,
1271
- /* @__PURE__ */ a.jsx(Gs, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
1299
+ /* @__PURE__ */ a.jsx(qs, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
1272
1300
  ]
1273
1301
  }
1274
1302
  ) }));
1275
- Yo.displayName = fe.Trigger.displayName;
1276
- const Qo = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsx(
1277
- fe.Content,
1303
+ Xo.displayName = me.Trigger.displayName;
1304
+ const Zo = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsx(
1305
+ me.Content,
1278
1306
  {
1279
1307
  ref: o,
1280
1308
  className: d(
@@ -1285,8 +1313,8 @@ const Qo = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
1285
1313
  children: /* @__PURE__ */ a.jsx("div", { className: "pb-4 pt-0", children: t })
1286
1314
  }
1287
1315
  ));
1288
- Qo.displayName = fe.Content.displayName;
1289
- const Xo = ge(
1316
+ Zo.displayName = me.Content.displayName;
1317
+ const en = ge(
1290
1318
  "relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
1291
1319
  {
1292
1320
  variants: {
@@ -1299,17 +1327,17 @@ const Xo = ge(
1299
1327
  variant: "default"
1300
1328
  }
1301
1329
  }
1302
- ), Zo = m.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx("div", { ref: o, role: "alert", className: d(Xo({ variant: t }), e), ...s }));
1303
- Zo.displayName = "Alert";
1304
- const en = m.forwardRef(
1330
+ ), tn = f.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx("div", { ref: o, role: "alert", className: d(en({ variant: t }), e), ...s }));
1331
+ tn.displayName = "Alert";
1332
+ const sn = f.forwardRef(
1305
1333
  ({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("h5", { ref: s, className: d("mb-1 font-medium leading-none tracking-tight", e), ...t })
1306
1334
  );
1307
- en.displayName = "AlertTitle";
1308
- const tn = m.forwardRef(
1335
+ sn.displayName = "AlertTitle";
1336
+ const on = f.forwardRef(
1309
1337
  ({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("text-sm [&_p]:leading-relaxed", e), ...t })
1310
1338
  );
1311
- tn.displayName = "AlertDescription";
1312
- const sn = ge(
1339
+ on.displayName = "AlertDescription";
1340
+ const nn = ge(
1313
1341
  "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
1314
1342
  {
1315
1343
  variants: {
@@ -1324,10 +1352,10 @@ const sn = ge(
1324
1352
  variant: "default"
1325
1353
  }
1326
1354
  }
1327
- ), Jr = ({ className: e, variant: t, ...s }) => /* @__PURE__ */ a.jsx("div", { className: d(sn({ variant: t }), e), ...s }), Yr = q.Root, Qr = q.Trigger, is = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(q.Portal, { className: d(e), ...t });
1328
- is.displayName = q.Portal.displayName;
1329
- const ls = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1330
- q.Overlay,
1355
+ ), Qr = ({ className: e, variant: t, ...s }) => /* @__PURE__ */ a.jsx("div", { className: d(nn({ variant: t }), e), ...s }), Xr = H.Root, Zr = H.Trigger, cs = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(H.Portal, { className: d(e), ...t });
1356
+ cs.displayName = H.Portal.displayName;
1357
+ const ds = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1358
+ H.Overlay,
1331
1359
  {
1332
1360
  className: d(
1333
1361
  "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
@@ -1337,11 +1365,11 @@ const ls = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1337
1365
  ref: s
1338
1366
  }
1339
1367
  ));
1340
- ls.displayName = q.Overlay.displayName;
1341
- const on = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs(is, { children: [
1342
- /* @__PURE__ */ a.jsx(ls, {}),
1368
+ ds.displayName = H.Overlay.displayName;
1369
+ const an = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs(cs, { children: [
1370
+ /* @__PURE__ */ a.jsx(ds, {}),
1343
1371
  /* @__PURE__ */ a.jsx(
1344
- q.Content,
1372
+ H.Content,
1345
1373
  {
1346
1374
  ref: s,
1347
1375
  className: d(
@@ -1352,30 +1380,30 @@ const on = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs(is
1352
1380
  }
1353
1381
  )
1354
1382
  ] }));
1355
- on.displayName = q.Content.displayName;
1356
- const nn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
1357
- nn.displayName = "AlertDialogHeader";
1358
- const an = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
1359
- an.displayName = "AlertDialogFooter";
1360
- const rn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(q.Title, { ref: s, className: d("text-lg font-semibold", e), ...t }));
1361
- rn.displayName = q.Title.displayName;
1362
- const ln = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(q.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
1363
- ln.displayName = q.Description.displayName;
1364
- const cn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(q.Action, { ref: s, className: d(bt(), e), ...t }));
1365
- cn.displayName = q.Action.displayName;
1366
- const dn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1367
- q.Cancel,
1383
+ an.displayName = H.Content.displayName;
1384
+ const rn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
1385
+ rn.displayName = "AlertDialogHeader";
1386
+ const ln = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
1387
+ ln.displayName = "AlertDialogFooter";
1388
+ const cn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(H.Title, { ref: s, className: d("text-lg font-semibold", e), ...t }));
1389
+ cn.displayName = H.Title.displayName;
1390
+ const dn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(H.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
1391
+ dn.displayName = H.Description.displayName;
1392
+ const un = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(H.Action, { ref: s, className: d(bt(), e), ...t }));
1393
+ un.displayName = H.Action.displayName;
1394
+ const fn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1395
+ H.Cancel,
1368
1396
  {
1369
1397
  ref: s,
1370
1398
  className: d(bt({ variant: "outline" }), "mt-2 sm:mt-0", e),
1371
1399
  ...t
1372
1400
  }
1373
1401
  ));
1374
- dn.displayName = q.Cancel.displayName;
1375
- const cs = T.Root, un = T.Trigger, ds = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(T.Portal, { className: d(e), ...t });
1376
- ds.displayName = T.Portal.displayName;
1377
- const us = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1378
- T.Overlay,
1402
+ fn.displayName = H.Cancel.displayName;
1403
+ const us = P.Root, mn = P.Trigger, fs = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(P.Portal, { className: d(e), ...t });
1404
+ fs.displayName = P.Portal.displayName;
1405
+ const ms = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1406
+ P.Overlay,
1379
1407
  {
1380
1408
  ref: s,
1381
1409
  className: d(
@@ -1385,11 +1413,11 @@ const us = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1385
1413
  ...t
1386
1414
  }
1387
1415
  ));
1388
- us.displayName = T.Overlay.displayName;
1389
- const xt = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(ds, { children: [
1390
- /* @__PURE__ */ a.jsx(us, {}),
1416
+ ms.displayName = P.Overlay.displayName;
1417
+ const xt = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(fs, { children: [
1418
+ /* @__PURE__ */ a.jsx(ms, {}),
1391
1419
  /* @__PURE__ */ a.jsxs(
1392
- T.Content,
1420
+ P.Content,
1393
1421
  {
1394
1422
  ref: o,
1395
1423
  className: d(
@@ -1399,7 +1427,7 @@ const xt = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
1399
1427
  ...s,
1400
1428
  children: [
1401
1429
  t,
1402
- /* @__PURE__ */ a.jsxs(T.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
1430
+ /* @__PURE__ */ a.jsxs(P.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
1403
1431
  /* @__PURE__ */ a.jsx(st, { className: "h-4 w-4" }),
1404
1432
  /* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
1405
1433
  ] })
@@ -1407,45 +1435,45 @@ const xt = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
1407
1435
  }
1408
1436
  )
1409
1437
  ] }));
1410
- xt.displayName = T.Content.displayName;
1411
- const mn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-1.5 text-center sm:text-left", e), ...t });
1412
- mn.displayName = "DialogHeader";
1413
- const fn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
1414
- fn.displayName = "DialogFooter";
1415
- const pn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1416
- T.Title,
1438
+ xt.displayName = P.Content.displayName;
1439
+ const pn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-1.5 text-center sm:text-left", e), ...t });
1440
+ pn.displayName = "DialogHeader";
1441
+ const gn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
1442
+ gn.displayName = "DialogFooter";
1443
+ const bn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1444
+ P.Title,
1417
1445
  {
1418
1446
  ref: s,
1419
1447
  className: d("text-lg font-semibold leading-none tracking-tight", e),
1420
1448
  ...t
1421
1449
  }
1422
1450
  ));
1423
- pn.displayName = T.Title.displayName;
1424
- const gn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(T.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
1425
- gn.displayName = T.Description.displayName;
1426
- const bn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("rounded-xl border bg-card text-card-foreground shadow", e), ...t }));
1427
- bn.displayName = "Card";
1428
- const xn = m.forwardRef(
1451
+ bn.displayName = P.Title.displayName;
1452
+ const xn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(P.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
1453
+ xn.displayName = P.Description.displayName;
1454
+ const hn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("rounded-xl border bg-card text-card-foreground shadow", e), ...t }));
1455
+ hn.displayName = "Card";
1456
+ const vn = f.forwardRef(
1429
1457
  ({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("flex flex-col space-y-1.5 p-6", e), ...t })
1430
1458
  );
1431
- xn.displayName = "CardHeader";
1432
- const hn = m.forwardRef(
1459
+ vn.displayName = "CardHeader";
1460
+ const yn = f.forwardRef(
1433
1461
  ({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("h3", { ref: s, className: d("font-semibold leading-none tracking-tight", e), ...t })
1434
1462
  );
1435
- hn.displayName = "CardTitle";
1436
- const vn = m.forwardRef(
1463
+ yn.displayName = "CardTitle";
1464
+ const wn = f.forwardRef(
1437
1465
  ({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("p", { ref: s, className: d("text-sm text-muted-foreground", e), ...t })
1438
1466
  );
1439
- vn.displayName = "CardDescription";
1440
- const yn = m.forwardRef(
1467
+ wn.displayName = "CardDescription";
1468
+ const Nn = f.forwardRef(
1441
1469
  ({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("p-6 pt-0", e), ...t })
1442
1470
  );
1443
- yn.displayName = "CardContent";
1444
- const wn = m.forwardRef(
1471
+ Nn.displayName = "CardContent";
1472
+ const kn = f.forwardRef(
1445
1473
  ({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d(" flex items-center p-6 pt-0", e), ...t })
1446
1474
  );
1447
- wn.displayName = "CardFooter";
1448
- const Nn = m.forwardRef(({ className: e, type: t, ...s }, o) => /* @__PURE__ */ a.jsx(
1475
+ kn.displayName = "CardFooter";
1476
+ const jn = f.forwardRef(({ className: e, type: t, ...s }, o) => /* @__PURE__ */ a.jsx(
1449
1477
  "input",
1450
1478
  {
1451
1479
  type: t,
@@ -1457,10 +1485,10 @@ const Nn = m.forwardRef(({ className: e, type: t, ...s }, o) => /* @__PURE__ */
1457
1485
  ...s
1458
1486
  }
1459
1487
  ));
1460
- Nn.displayName = "Input";
1461
- const kn = ge("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), jn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Ft.Root, { ref: s, className: d(kn(), e), ...t }));
1462
- jn.displayName = Ft.Root.displayName;
1463
- const Sn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1488
+ jn.displayName = "Input";
1489
+ const Sn = ge("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), An = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Wt.Root, { ref: s, className: d(Sn(), e), ...t }));
1490
+ An.displayName = Wt.Root.displayName;
1491
+ const Cn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1464
1492
  "textarea",
1465
1493
  {
1466
1494
  className: d(
@@ -1471,14 +1499,14 @@ const Sn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1471
1499
  ...t
1472
1500
  }
1473
1501
  ));
1474
- Sn.displayName = "Textarea";
1475
- const An = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(ue.Root, { ref: o, className: d("relative overflow-hidden", e), ...s, children: [
1502
+ Cn.displayName = "Textarea";
1503
+ const _n = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(ue.Root, { ref: o, className: d("relative overflow-hidden", e), ...s, children: [
1476
1504
  /* @__PURE__ */ a.jsx(ue.Viewport, { className: "h-full w-full rounded-[inherit]", children: t }),
1477
- /* @__PURE__ */ a.jsx(ms, {}),
1505
+ /* @__PURE__ */ a.jsx(ps, {}),
1478
1506
  /* @__PURE__ */ a.jsx(ue.Corner, {})
1479
1507
  ] }));
1480
- An.displayName = ue.Root.displayName;
1481
- const ms = m.forwardRef(({ className: e, orientation: t = "vertical", ...s }, o) => /* @__PURE__ */ a.jsx(
1508
+ _n.displayName = ue.Root.displayName;
1509
+ const ps = f.forwardRef(({ className: e, orientation: t = "vertical", ...s }, o) => /* @__PURE__ */ a.jsx(
1482
1510
  ue.ScrollAreaScrollbar,
1483
1511
  {
1484
1512
  ref: o,
@@ -1493,8 +1521,8 @@ const ms = m.forwardRef(({ className: e, orientation: t = "vertical", ...s }, o)
1493
1521
  children: /* @__PURE__ */ a.jsx(ue.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
1494
1522
  }
1495
1523
  ));
1496
- ms.displayName = ue.ScrollAreaScrollbar.displayName;
1497
- const Cn = be.Root, fs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1524
+ ps.displayName = ue.ScrollAreaScrollbar.displayName;
1525
+ const Bn = be.Root, gs = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1498
1526
  be.List,
1499
1527
  {
1500
1528
  ref: s,
@@ -1505,8 +1533,8 @@ const Cn = be.Root, fs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE_
1505
1533
  ...t
1506
1534
  }
1507
1535
  ));
1508
- fs.displayName = be.List.displayName;
1509
- const Xe = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1536
+ gs.displayName = be.List.displayName;
1537
+ const Xe = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1510
1538
  be.Trigger,
1511
1539
  {
1512
1540
  ref: s,
@@ -1518,7 +1546,7 @@ const Xe = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1518
1546
  }
1519
1547
  ));
1520
1548
  Xe.displayName = be.Trigger.displayName;
1521
- const Ze = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1549
+ const Ze = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1522
1550
  be.Content,
1523
1551
  {
1524
1552
  ref: s,
@@ -1530,7 +1558,7 @@ const Ze = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1530
1558
  }
1531
1559
  ));
1532
1560
  Ze.displayName = be.Content.displayName;
1533
- const Xr = ve.Portal, Zr = ve.Provider, ei = ve.Root, ti = ve.Trigger, _n = m.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__PURE__ */ a.jsx(
1561
+ const ei = ve.Portal, ti = ve.Provider, si = ve.Root, oi = ve.Trigger, Rn = f.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__PURE__ */ a.jsx(
1534
1562
  ve.Content,
1535
1563
  {
1536
1564
  ref: o,
@@ -1542,8 +1570,8 @@ const Xr = ve.Portal, Zr = ve.Provider, ei = ve.Root, ti = ve.Trigger, _n = m.fo
1542
1570
  ...s
1543
1571
  }
1544
1572
  ));
1545
- _n.displayName = ve.Content.displayName;
1546
- const si = Se.Root, oi = Se.Trigger, Bn = m.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...o }, n) => /* @__PURE__ */ a.jsx(Se.Portal, { children: /* @__PURE__ */ a.jsx(
1573
+ Rn.displayName = ve.Content.displayName;
1574
+ const ni = Se.Root, ai = Se.Trigger, Pn = f.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...o }, n) => /* @__PURE__ */ a.jsx(Se.Portal, { children: /* @__PURE__ */ a.jsx(
1547
1575
  Se.Content,
1548
1576
  {
1549
1577
  ref: n,
@@ -1556,8 +1584,8 @@ const si = Se.Root, oi = Se.Trigger, Bn = m.forwardRef(({ className: e, align: t
1556
1584
  ...o
1557
1585
  }
1558
1586
  ) }));
1559
- Bn.displayName = Se.Content.displayName;
1560
- const ni = B.Menu, ai = B.Group, ri = B.Portal, ii = B.Sub, li = B.RadioGroup, Rn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1587
+ Pn.displayName = Se.Content.displayName;
1588
+ const ri = B.Menu, ii = B.Group, li = B.Portal, ci = B.Sub, di = B.RadioGroup, Tn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1561
1589
  B.Root,
1562
1590
  {
1563
1591
  ref: s,
@@ -1565,8 +1593,8 @@ const ni = B.Menu, ai = B.Group, ri = B.Portal, ii = B.Sub, li = B.RadioGroup, R
1565
1593
  ...t
1566
1594
  }
1567
1595
  ));
1568
- Rn.displayName = B.Root.displayName;
1569
- const Tn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1596
+ Tn.displayName = B.Root.displayName;
1597
+ const In = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1570
1598
  B.Trigger,
1571
1599
  {
1572
1600
  ref: s,
@@ -1577,8 +1605,8 @@ const Tn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1577
1605
  ...t
1578
1606
  }
1579
1607
  ));
1580
- Tn.displayName = B.Trigger.displayName;
1581
- const Pn = m.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
1608
+ In.displayName = B.Trigger.displayName;
1609
+ const Mn = f.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
1582
1610
  B.SubTrigger,
1583
1611
  {
1584
1612
  ref: n,
@@ -1594,8 +1622,8 @@ const Pn = m.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /*
1594
1622
  ]
1595
1623
  }
1596
1624
  ));
1597
- Pn.displayName = B.SubTrigger.displayName;
1598
- const In = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1625
+ Mn.displayName = B.SubTrigger.displayName;
1626
+ const Dn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1599
1627
  B.SubContent,
1600
1628
  {
1601
1629
  ref: s,
@@ -1606,8 +1634,8 @@ const In = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1606
1634
  ...t
1607
1635
  }
1608
1636
  ));
1609
- In.displayName = B.SubContent.displayName;
1610
- const Mn = m.forwardRef(({ className: e, align: t = "start", alignOffset: s = -4, sideOffset: o = 8, ...n }, i) => /* @__PURE__ */ a.jsx(B.Portal, { children: /* @__PURE__ */ a.jsx(
1637
+ Dn.displayName = B.SubContent.displayName;
1638
+ const En = f.forwardRef(({ className: e, align: t = "start", alignOffset: s = -4, sideOffset: o = 8, ...n }, i) => /* @__PURE__ */ a.jsx(B.Portal, { children: /* @__PURE__ */ a.jsx(
1611
1639
  B.Content,
1612
1640
  {
1613
1641
  ref: i,
@@ -1621,8 +1649,8 @@ const Mn = m.forwardRef(({ className: e, align: t = "start", alignOffset: s = -4
1621
1649
  ...n
1622
1650
  }
1623
1651
  ) }));
1624
- Mn.displayName = B.Content.displayName;
1625
- const Dn = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
1652
+ En.displayName = B.Content.displayName;
1653
+ const On = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
1626
1654
  B.Item,
1627
1655
  {
1628
1656
  ref: o,
@@ -1634,8 +1662,8 @@ const Dn = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */
1634
1662
  ...s
1635
1663
  }
1636
1664
  ));
1637
- Dn.displayName = B.Item.displayName;
1638
- const En = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
1665
+ On.displayName = B.Item.displayName;
1666
+ const Ln = f.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
1639
1667
  B.CheckboxItem,
1640
1668
  {
1641
1669
  ref: n,
@@ -1646,13 +1674,13 @@ const En = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) =>
1646
1674
  checked: s,
1647
1675
  ...o,
1648
1676
  children: [
1649
- /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(B.ItemIndicator, { children: /* @__PURE__ */ a.jsx(Le, { className: "h-4 w-4" }) }) }),
1677
+ /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(B.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
1650
1678
  t
1651
1679
  ]
1652
1680
  }
1653
1681
  ));
1654
- En.displayName = B.CheckboxItem.displayName;
1655
- const On = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
1682
+ Ln.displayName = B.CheckboxItem.displayName;
1683
+ const zn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
1656
1684
  B.RadioItem,
1657
1685
  {
1658
1686
  ref: o,
@@ -1667,8 +1695,8 @@ const On = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
1667
1695
  ]
1668
1696
  }
1669
1697
  ));
1670
- On.displayName = B.RadioItem.displayName;
1671
- const Ln = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
1698
+ zn.displayName = B.RadioItem.displayName;
1699
+ const Vn = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
1672
1700
  B.Label,
1673
1701
  {
1674
1702
  ref: o,
@@ -1676,13 +1704,13 @@ const Ln = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */
1676
1704
  ...s
1677
1705
  }
1678
1706
  ));
1679
- Ln.displayName = B.Label.displayName;
1680
- const zn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(B.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
1681
- zn.displayName = B.Separator.displayName;
1682
- const Vn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
1683
- Vn.displayname = "MenubarShortcut";
1684
- const ci = ze.Root, di = ze.Trigger, $n = m.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...o }, n) => /* @__PURE__ */ a.jsx(
1685
- ze.Content,
1707
+ Vn.displayName = B.Label.displayName;
1708
+ const $n = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(B.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
1709
+ $n.displayName = B.Separator.displayName;
1710
+ const Fn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
1711
+ Fn.displayname = "MenubarShortcut";
1712
+ const ui = Ve.Root, fi = Ve.Trigger, Un = f.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...o }, n) => /* @__PURE__ */ a.jsx(
1713
+ Ve.Content,
1686
1714
  {
1687
1715
  ref: n,
1688
1716
  align: t,
@@ -1694,8 +1722,8 @@ const ci = ze.Root, di = ze.Trigger, $n = m.forwardRef(({ className: e, align: t
1694
1722
  ...o
1695
1723
  }
1696
1724
  ));
1697
- $n.displayName = ze.Content.displayName;
1698
- const ui = U.Root, mi = U.Group, fi = U.Value, Fn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
1725
+ Un.displayName = Ve.Content.displayName;
1726
+ const mi = U.Root, pi = U.Group, gi = U.Value, Wn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
1699
1727
  U.Trigger,
1700
1728
  {
1701
1729
  ref: o,
@@ -1706,12 +1734,12 @@ const ui = U.Root, mi = U.Group, fi = U.Value, Fn = m.forwardRef(({ className: e
1706
1734
  ...s,
1707
1735
  children: [
1708
1736
  t,
1709
- /* @__PURE__ */ a.jsx(U.Icon, { asChild: !0, children: /* @__PURE__ */ a.jsx(Hs, { className: "h-4 w-4 opacity-50" }) })
1737
+ /* @__PURE__ */ a.jsx(U.Icon, { asChild: !0, children: /* @__PURE__ */ a.jsx(Ks, { className: "h-4 w-4 opacity-50" }) })
1710
1738
  ]
1711
1739
  }
1712
1740
  ));
1713
- Fn.displayName = U.Trigger.displayName;
1714
- const Un = m.forwardRef(({ className: e, children: t, position: s = "popper", ...o }, n) => /* @__PURE__ */ a.jsx(U.Portal, { children: /* @__PURE__ */ a.jsx(
1741
+ Wn.displayName = U.Trigger.displayName;
1742
+ const Gn = f.forwardRef(({ className: e, children: t, position: s = "popper", ...o }, n) => /* @__PURE__ */ a.jsx(U.Portal, { children: /* @__PURE__ */ a.jsx(
1715
1743
  U.Content,
1716
1744
  {
1717
1745
  ref: n,
@@ -1734,10 +1762,10 @@ const Un = m.forwardRef(({ className: e, children: t, position: s = "popper", ..
1734
1762
  )
1735
1763
  }
1736
1764
  ) }));
1737
- Un.displayName = U.Content.displayName;
1738
- const Wn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(U.Label, { ref: s, className: d("px-2 py-1.5 text-sm font-semibold", e), ...t }));
1739
- Wn.displayName = U.Label.displayName;
1740
- const Gn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
1765
+ Gn.displayName = U.Content.displayName;
1766
+ const Hn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(U.Label, { ref: s, className: d("px-2 py-1.5 text-sm font-semibold", e), ...t }));
1767
+ Hn.displayName = U.Label.displayName;
1768
+ const qn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
1741
1769
  U.Item,
1742
1770
  {
1743
1771
  ref: o,
@@ -1747,18 +1775,18 @@ const Gn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
1747
1775
  ),
1748
1776
  ...s,
1749
1777
  children: [
1750
- /* @__PURE__ */ a.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(U.ItemIndicator, { children: /* @__PURE__ */ a.jsx(Le, { className: "h-4 w-4" }) }) }),
1778
+ /* @__PURE__ */ a.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(U.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
1751
1779
  /* @__PURE__ */ a.jsx(U.ItemText, { children: t })
1752
1780
  ]
1753
1781
  }
1754
1782
  ));
1755
- Gn.displayName = U.Item.displayName;
1756
- const Hn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(U.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
1757
- Hn.displayName = U.Separator.displayName;
1758
- const pi = T.Root, gi = T.Trigger, bi = T.Close, ps = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(T.Portal, { className: d(e), ...t });
1759
- ps.displayName = T.Portal.displayName;
1760
- const gs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1761
- T.Overlay,
1783
+ qn.displayName = U.Item.displayName;
1784
+ const Kn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(U.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
1785
+ Kn.displayName = U.Separator.displayName;
1786
+ const bi = P.Root, xi = P.Trigger, hi = P.Close, bs = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(P.Portal, { className: d(e), ...t });
1787
+ bs.displayName = P.Portal.displayName;
1788
+ const xs = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1789
+ P.Overlay,
1762
1790
  {
1763
1791
  className: d(
1764
1792
  "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
@@ -1768,8 +1796,8 @@ const gs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1768
1796
  ref: s
1769
1797
  }
1770
1798
  ));
1771
- gs.displayName = T.Overlay.displayName;
1772
- const qn = ge(
1799
+ xs.displayName = P.Overlay.displayName;
1800
+ const Jn = ge(
1773
1801
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
1774
1802
  {
1775
1803
  variants: {
@@ -1784,29 +1812,29 @@ const qn = ge(
1784
1812
  side: "right"
1785
1813
  }
1786
1814
  }
1787
- ), Kn = m.forwardRef(
1788
- ({ side: e = "right", className: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(ps, { children: [
1789
- /* @__PURE__ */ a.jsx(gs, {}),
1790
- /* @__PURE__ */ a.jsxs(T.Content, { ref: n, className: d(qn({ side: e }), t), ...o, children: [
1815
+ ), Yn = f.forwardRef(
1816
+ ({ side: e = "right", className: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(bs, { children: [
1817
+ /* @__PURE__ */ a.jsx(xs, {}),
1818
+ /* @__PURE__ */ a.jsxs(P.Content, { ref: n, className: d(Jn({ side: e }), t), ...o, children: [
1791
1819
  s,
1792
- /* @__PURE__ */ a.jsxs(T.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
1820
+ /* @__PURE__ */ a.jsxs(P.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
1793
1821
  /* @__PURE__ */ a.jsx(st, { className: "h-4 w-4" }),
1794
1822
  /* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
1795
1823
  ] })
1796
1824
  ] })
1797
1825
  ] })
1798
1826
  );
1799
- Kn.displayName = T.Content.displayName;
1800
- const Jn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
1801
- Jn.displayName = "SheetHeader";
1802
- const Yn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
1803
- Yn.displayName = "SheetFooter";
1804
- const Qn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(T.Title, { ref: s, className: d("text-lg font-semibold text-foreground", e), ...t }));
1805
- Qn.displayName = T.Title.displayName;
1806
- const Xn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(T.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
1807
- Xn.displayName = T.Description.displayName;
1808
- const xi = I.Root, hi = I.Trigger, vi = I.Group, yi = I.Portal, wi = I.Sub, Ni = I.RadioGroup, Zn = m.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
1809
- I.SubTrigger,
1827
+ Yn.displayName = P.Content.displayName;
1828
+ const Qn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
1829
+ Qn.displayName = "SheetHeader";
1830
+ const Xn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
1831
+ Xn.displayName = "SheetFooter";
1832
+ const Zn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(P.Title, { ref: s, className: d("text-lg font-semibold text-foreground", e), ...t }));
1833
+ Zn.displayName = P.Title.displayName;
1834
+ const ea = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(P.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
1835
+ ea.displayName = P.Description.displayName;
1836
+ const vi = M.Root, yi = M.Trigger, wi = M.Group, Ni = M.Portal, ki = M.Sub, ji = M.RadioGroup, ta = f.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
1837
+ M.SubTrigger,
1810
1838
  {
1811
1839
  ref: n,
1812
1840
  className: d(
@@ -1821,9 +1849,9 @@ const xi = I.Root, hi = I.Trigger, vi = I.Group, yi = I.Portal, wi = I.Sub, Ni =
1821
1849
  ]
1822
1850
  }
1823
1851
  ));
1824
- Zn.displayName = I.SubTrigger.displayName;
1825
- const ea = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1826
- I.SubContent,
1852
+ ta.displayName = M.SubTrigger.displayName;
1853
+ const sa = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1854
+ M.SubContent,
1827
1855
  {
1828
1856
  ref: s,
1829
1857
  className: d(
@@ -1833,9 +1861,9 @@ const ea = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
1833
1861
  ...t
1834
1862
  }
1835
1863
  ));
1836
- ea.displayName = I.SubContent.displayName;
1837
- const ta = m.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__PURE__ */ a.jsx(I.Portal, { children: /* @__PURE__ */ a.jsx(
1838
- I.Content,
1864
+ sa.displayName = M.SubContent.displayName;
1865
+ const oa = f.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__PURE__ */ a.jsx(M.Portal, { children: /* @__PURE__ */ a.jsx(
1866
+ M.Content,
1839
1867
  {
1840
1868
  ref: o,
1841
1869
  sideOffset: t,
@@ -1847,9 +1875,9 @@ const ta = m.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__
1847
1875
  ...s
1848
1876
  }
1849
1877
  ) }));
1850
- ta.displayName = I.Content.displayName;
1851
- const sa = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
1852
- I.Item,
1878
+ oa.displayName = M.Content.displayName;
1879
+ const na = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
1880
+ M.Item,
1853
1881
  {
1854
1882
  ref: o,
1855
1883
  className: d(
@@ -1860,9 +1888,9 @@ const sa = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */
1860
1888
  ...s
1861
1889
  }
1862
1890
  ));
1863
- sa.displayName = I.Item.displayName;
1864
- const oa = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
1865
- I.CheckboxItem,
1891
+ na.displayName = M.Item.displayName;
1892
+ const aa = f.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
1893
+ M.CheckboxItem,
1866
1894
  {
1867
1895
  ref: n,
1868
1896
  className: d(
@@ -1872,14 +1900,14 @@ const oa = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) =>
1872
1900
  checked: s,
1873
1901
  ...o,
1874
1902
  children: [
1875
- /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(I.ItemIndicator, { children: /* @__PURE__ */ a.jsx(Le, { className: "h-4 w-4" }) }) }),
1903
+ /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(M.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
1876
1904
  t
1877
1905
  ]
1878
1906
  }
1879
1907
  ));
1880
- oa.displayName = I.CheckboxItem.displayName;
1881
- const na = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
1882
- I.RadioItem,
1908
+ aa.displayName = M.CheckboxItem.displayName;
1909
+ const ra = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
1910
+ M.RadioItem,
1883
1911
  {
1884
1912
  ref: o,
1885
1913
  className: d(
@@ -1888,27 +1916,27 @@ const na = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
1888
1916
  ),
1889
1917
  ...s,
1890
1918
  children: [
1891
- /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(I.ItemIndicator, { children: /* @__PURE__ */ a.jsx(nt, { className: "h-4 w-4 fill-current" }) }) }),
1919
+ /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(M.ItemIndicator, { children: /* @__PURE__ */ a.jsx(nt, { className: "h-4 w-4 fill-current" }) }) }),
1892
1920
  t
1893
1921
  ]
1894
1922
  }
1895
1923
  ));
1896
- na.displayName = I.RadioItem.displayName;
1897
- const aa = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
1898
- I.Label,
1924
+ ra.displayName = M.RadioItem.displayName;
1925
+ const ia = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
1926
+ M.Label,
1899
1927
  {
1900
1928
  ref: o,
1901
1929
  className: d("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
1902
1930
  ...s
1903
1931
  }
1904
1932
  ));
1905
- aa.displayName = I.Label.displayName;
1906
- const ra = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(I.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
1907
- ra.displayName = I.Separator.displayName;
1908
- const ia = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest opacity-60", e), ...t });
1909
- ia.displayName = "DropdownMenuShortcut";
1910
- const la = m.forwardRef(({ className: e, orientation: t = "horizontal", decorative: s = !0, ...o }, n) => /* @__PURE__ */ a.jsx(
1911
- Ut.Root,
1933
+ ia.displayName = M.Label.displayName;
1934
+ const la = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(M.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
1935
+ la.displayName = M.Separator.displayName;
1936
+ const ca = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest opacity-60", e), ...t });
1937
+ ca.displayName = "DropdownMenuShortcut";
1938
+ const da = f.forwardRef(({ className: e, orientation: t = "horizontal", decorative: s = !0, ...o }, n) => /* @__PURE__ */ a.jsx(
1939
+ Gt.Root,
1912
1940
  {
1913
1941
  ref: n,
1914
1942
  decorative: s,
@@ -1917,28 +1945,28 @@ const la = m.forwardRef(({ className: e, orientation: t = "horizontal", decorati
1917
1945
  ...o
1918
1946
  }
1919
1947
  ));
1920
- la.displayName = Ut.Root.displayName;
1921
- const ca = 1, da = 1e6;
1922
- let We = 0;
1923
- function ua() {
1924
- return We = (We + 1) % Number.MAX_VALUE, We.toString();
1948
+ da.displayName = Gt.Root.displayName;
1949
+ const ua = 1, fa = 1e6;
1950
+ let Ge = 0;
1951
+ function ma() {
1952
+ return Ge = (Ge + 1) % Number.MAX_VALUE, Ge.toString();
1925
1953
  }
1926
- const Ge = /* @__PURE__ */ new Map(), Rt = (e) => {
1927
- if (Ge.has(e))
1954
+ const He = /* @__PURE__ */ new Map(), Tt = (e) => {
1955
+ if (He.has(e))
1928
1956
  return;
1929
1957
  const t = setTimeout(() => {
1930
- Ge.delete(e), ke({
1958
+ He.delete(e), ke({
1931
1959
  type: "REMOVE_TOAST",
1932
1960
  toastId: e
1933
1961
  });
1934
- }, da);
1935
- Ge.set(e, t);
1936
- }, ma = (e, t) => {
1962
+ }, fa);
1963
+ He.set(e, t);
1964
+ }, pa = (e, t) => {
1937
1965
  switch (t.type) {
1938
1966
  case "ADD_TOAST":
1939
1967
  return {
1940
1968
  ...e,
1941
- toasts: [t.toast, ...e.toasts].slice(0, ca)
1969
+ toasts: [t.toast, ...e.toasts].slice(0, ua)
1942
1970
  };
1943
1971
  case "UPDATE_TOAST":
1944
1972
  return {
@@ -1947,8 +1975,8 @@ const Ge = /* @__PURE__ */ new Map(), Rt = (e) => {
1947
1975
  };
1948
1976
  case "DISMISS_TOAST": {
1949
1977
  const { toastId: s } = t;
1950
- return s ? Rt(s) : e.toasts.forEach((o) => {
1951
- Rt(o.id);
1978
+ return s ? Tt(s) : e.toasts.forEach((o) => {
1979
+ Tt(o.id);
1952
1980
  }), {
1953
1981
  ...e,
1954
1982
  toasts: e.toasts.map(
@@ -1968,15 +1996,15 @@ const Ge = /* @__PURE__ */ new Map(), Rt = (e) => {
1968
1996
  toasts: e.toasts.filter((s) => s.id !== t.toastId)
1969
1997
  };
1970
1998
  }
1971
- }, Ie = [];
1972
- let Me = { toasts: [] };
1999
+ }, Me = [];
2000
+ let De = { toasts: [] };
1973
2001
  function ke(e) {
1974
- Me = ma(Me, e), Ie.forEach((t) => {
1975
- t(Me);
2002
+ De = pa(De, e), Me.forEach((t) => {
2003
+ t(De);
1976
2004
  });
1977
2005
  }
1978
- function fa({ ...e }) {
1979
- const t = ua(), s = (n) => ke({
2006
+ function ga({ ...e }) {
2007
+ const t = ma(), s = (n) => ke({
1980
2008
  type: "UPDATE_TOAST",
1981
2009
  toast: { ...n, id: t }
1982
2010
  }), o = () => ke({ type: "DISMISS_TOAST", toastId: t });
@@ -1996,19 +2024,19 @@ function fa({ ...e }) {
1996
2024
  update: s
1997
2025
  };
1998
2026
  }
1999
- function bs() {
2000
- const [e, t] = m.useState(Me);
2001
- return m.useEffect(() => (Ie.push(t), () => {
2002
- const s = Ie.indexOf(t);
2003
- s > -1 && Ie.splice(s, 1);
2027
+ function hs() {
2028
+ const [e, t] = f.useState(De);
2029
+ return f.useEffect(() => (Me.push(t), () => {
2030
+ const s = Me.indexOf(t);
2031
+ s > -1 && Me.splice(s, 1);
2004
2032
  }), [e]), {
2005
2033
  ...e,
2006
- toast: fa,
2034
+ toast: ga,
2007
2035
  dismiss: (s) => ke({ type: "DISMISS_TOAST", toastId: s })
2008
2036
  };
2009
2037
  }
2010
- const pa = X.Provider, xs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2011
- X.Viewport,
2038
+ const ba = Z.Provider, vs = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2039
+ Z.Viewport,
2012
2040
  {
2013
2041
  ref: s,
2014
2042
  className: d(
@@ -2018,8 +2046,8 @@ const pa = X.Provider, xs = m.forwardRef(({ className: e, ...t }, s) => /* @__PU
2018
2046
  ...t
2019
2047
  }
2020
2048
  ));
2021
- xs.displayName = X.Viewport.displayName;
2022
- const ga = ge(
2049
+ vs.displayName = Z.Viewport.displayName;
2050
+ const xa = ge(
2023
2051
  "group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
2024
2052
  {
2025
2053
  variants: {
@@ -2032,10 +2060,10 @@ const ga = ge(
2032
2060
  variant: "default"
2033
2061
  }
2034
2062
  }
2035
- ), hs = m.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx(X.Root, { ref: o, className: d(ga({ variant: t }), e), ...s }));
2036
- hs.displayName = X.Root.displayName;
2037
- const ba = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2038
- X.Action,
2063
+ ), ys = f.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx(Z.Root, { ref: o, className: d(xa({ variant: t }), e), ...s }));
2064
+ ys.displayName = Z.Root.displayName;
2065
+ const ha = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2066
+ Z.Action,
2039
2067
  {
2040
2068
  ref: s,
2041
2069
  className: d(
@@ -2045,9 +2073,9 @@ const ba = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2045
2073
  ...t
2046
2074
  }
2047
2075
  ));
2048
- ba.displayName = X.Action.displayName;
2049
- const vs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2050
- X.Close,
2076
+ ha.displayName = Z.Action.displayName;
2077
+ const ws = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2078
+ Z.Close,
2051
2079
  {
2052
2080
  ref: s,
2053
2081
  className: d(
@@ -2059,26 +2087,26 @@ const vs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2059
2087
  children: /* @__PURE__ */ a.jsx(st, { className: "h-4 w-4" })
2060
2088
  }
2061
2089
  ));
2062
- vs.displayName = X.Close.displayName;
2063
- const ys = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(X.Title, { ref: s, className: d("text-sm font-semibold [&+div]:text-xs", e), ...t }));
2064
- ys.displayName = X.Title.displayName;
2065
- const ws = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(X.Description, { ref: s, className: d("text-sm opacity-90", e), ...t }));
2066
- ws.displayName = X.Description.displayName;
2067
- function ki() {
2068
- const { toasts: e } = bs();
2069
- return /* @__PURE__ */ a.jsxs(pa, { children: [
2070
- e.map(({ id: t, title: s, description: o, action: n, ...i }) => /* @__PURE__ */ a.jsxs(hs, { ...i, children: [
2090
+ ws.displayName = Z.Close.displayName;
2091
+ const Ns = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Z.Title, { ref: s, className: d("text-sm font-semibold [&+div]:text-xs", e), ...t }));
2092
+ Ns.displayName = Z.Title.displayName;
2093
+ const ks = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Z.Description, { ref: s, className: d("text-sm opacity-90", e), ...t }));
2094
+ ks.displayName = Z.Description.displayName;
2095
+ function Si() {
2096
+ const { toasts: e } = hs();
2097
+ return /* @__PURE__ */ a.jsxs(ba, { children: [
2098
+ e.map(({ id: t, title: s, description: o, action: n, ...i }) => /* @__PURE__ */ a.jsxs(ys, { ...i, children: [
2071
2099
  /* @__PURE__ */ a.jsxs("div", { className: "grid gap-1", children: [
2072
- s && /* @__PURE__ */ a.jsx(ys, { children: s }),
2073
- o && /* @__PURE__ */ a.jsx(ws, { children: o })
2100
+ s && /* @__PURE__ */ a.jsx(Ns, { children: s }),
2101
+ o && /* @__PURE__ */ a.jsx(ks, { children: o })
2074
2102
  ] }),
2075
2103
  n,
2076
- /* @__PURE__ */ a.jsx(vs, {})
2104
+ /* @__PURE__ */ a.jsx(ws, {})
2077
2105
  ] }, t)),
2078
- /* @__PURE__ */ a.jsx(xs, {})
2106
+ /* @__PURE__ */ a.jsx(vs, {})
2079
2107
  ] });
2080
2108
  }
2081
- const ji = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("animate-pulse rounded-md bg-primary/10", e), ...t }), Ns = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2109
+ const Ai = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("animate-pulse rounded-md bg-primary/10", e), ...t }), js = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2082
2110
  Q,
2083
2111
  {
2084
2112
  ref: s,
@@ -2089,9 +2117,9 @@ const ji = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className:
2089
2117
  ...t
2090
2118
  }
2091
2119
  ));
2092
- Ns.displayName = Q.displayName;
2093
- const Si = ({ children: e, ...t }) => /* @__PURE__ */ a.jsx(cs, { ...t, children: /* @__PURE__ */ a.jsx(xt, { className: "overflow-hidden p-0", children: /* @__PURE__ */ a.jsx(Ns, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), xa = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
2094
- /* @__PURE__ */ a.jsx(qs, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
2120
+ js.displayName = Q.displayName;
2121
+ const Ci = ({ children: e, ...t }) => /* @__PURE__ */ a.jsx(us, { ...t, children: /* @__PURE__ */ a.jsx(xt, { className: "overflow-hidden p-0", children: /* @__PURE__ */ a.jsx(js, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), va = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
2122
+ /* @__PURE__ */ a.jsx(Js, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
2095
2123
  /* @__PURE__ */ a.jsx(
2096
2124
  Q.Input,
2097
2125
  {
@@ -2104,8 +2132,8 @@ const Si = ({ children: e, ...t }) => /* @__PURE__ */ a.jsx(cs, { ...t, children
2104
2132
  }
2105
2133
  )
2106
2134
  ] }));
2107
- xa.displayName = Q.Input.displayName;
2108
- const ha = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2135
+ va.displayName = Q.Input.displayName;
2136
+ const ya = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2109
2137
  Q.List,
2110
2138
  {
2111
2139
  ref: s,
@@ -2113,10 +2141,10 @@ const ha = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2113
2141
  ...t
2114
2142
  }
2115
2143
  ));
2116
- ha.displayName = Q.List.displayName;
2117
- const va = m.forwardRef((e, t) => /* @__PURE__ */ a.jsx(Q.Empty, { ref: t, className: "py-6 text-center text-sm", ...e }));
2118
- va.displayName = Q.Empty.displayName;
2119
- const ya = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2144
+ ya.displayName = Q.List.displayName;
2145
+ const wa = f.forwardRef((e, t) => /* @__PURE__ */ a.jsx(Q.Empty, { ref: t, className: "py-6 text-center text-sm", ...e }));
2146
+ wa.displayName = Q.Empty.displayName;
2147
+ const Na = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2120
2148
  Q.Group,
2121
2149
  {
2122
2150
  ref: s,
@@ -2127,10 +2155,10 @@ const ya = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2127
2155
  ...t
2128
2156
  }
2129
2157
  ));
2130
- ya.displayName = Q.Group.displayName;
2131
- const wa = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Q.Separator, { ref: s, className: d("-mx-1 h-px bg-border", e), ...t }));
2132
- wa.displayName = Q.Separator.displayName;
2133
- const Na = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2158
+ Na.displayName = Q.Group.displayName;
2159
+ const ka = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Q.Separator, { ref: s, className: d("-mx-1 h-px bg-border", e), ...t }));
2160
+ ka.displayName = Q.Separator.displayName;
2161
+ const ja = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2134
2162
  Q.Item,
2135
2163
  {
2136
2164
  ref: s,
@@ -2141,11 +2169,11 @@ const Na = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2141
2169
  ...t
2142
2170
  }
2143
2171
  ));
2144
- Na.displayName = Q.Item.displayName;
2145
- const ka = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
2146
- ka.displayName = "CommandShortcut";
2147
- const Ai = M.Root, Ci = M.Trigger, _i = M.Group, Bi = M.Portal, Ri = M.Sub, Ti = M.RadioGroup, ja = m.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
2148
- M.SubTrigger,
2172
+ ja.displayName = Q.Item.displayName;
2173
+ const Sa = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
2174
+ Sa.displayName = "CommandShortcut";
2175
+ const _i = D.Root, Bi = D.Trigger, Ri = D.Group, Pi = D.Portal, Ti = D.Sub, Ii = D.RadioGroup, Aa = f.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
2176
+ D.SubTrigger,
2149
2177
  {
2150
2178
  ref: n,
2151
2179
  className: d(
@@ -2160,9 +2188,9 @@ const Ai = M.Root, Ci = M.Trigger, _i = M.Group, Bi = M.Portal, Ri = M.Sub, Ti =
2160
2188
  ]
2161
2189
  }
2162
2190
  ));
2163
- ja.displayName = M.SubTrigger.displayName;
2164
- const Sa = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2165
- M.SubContent,
2191
+ Aa.displayName = D.SubTrigger.displayName;
2192
+ const Ca = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2193
+ D.SubContent,
2166
2194
  {
2167
2195
  ref: s,
2168
2196
  className: d(
@@ -2172,9 +2200,9 @@ const Sa = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
2172
2200
  ...t
2173
2201
  }
2174
2202
  ));
2175
- Sa.displayName = M.SubContent.displayName;
2176
- const Aa = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(M.Portal, { children: /* @__PURE__ */ a.jsx(
2177
- M.Content,
2203
+ Ca.displayName = D.SubContent.displayName;
2204
+ const _a = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(D.Portal, { children: /* @__PURE__ */ a.jsx(
2205
+ D.Content,
2178
2206
  {
2179
2207
  ref: s,
2180
2208
  className: d(
@@ -2184,9 +2212,9 @@ const Aa = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(M.P
2184
2212
  ...t
2185
2213
  }
2186
2214
  ) }));
2187
- Aa.displayName = M.Content.displayName;
2188
- const Ca = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
2189
- M.Item,
2215
+ _a.displayName = D.Content.displayName;
2216
+ const Ba = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
2217
+ D.Item,
2190
2218
  {
2191
2219
  ref: o,
2192
2220
  className: d(
@@ -2197,9 +2225,9 @@ const Ca = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */
2197
2225
  ...s
2198
2226
  }
2199
2227
  ));
2200
- Ca.displayName = M.Item.displayName;
2201
- const _a = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
2202
- M.CheckboxItem,
2228
+ Ba.displayName = D.Item.displayName;
2229
+ const Ra = f.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
2230
+ D.CheckboxItem,
2203
2231
  {
2204
2232
  ref: n,
2205
2233
  className: d(
@@ -2209,14 +2237,14 @@ const _a = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) =>
2209
2237
  checked: s,
2210
2238
  ...o,
2211
2239
  children: [
2212
- /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(M.ItemIndicator, { children: /* @__PURE__ */ a.jsx(Le, { className: "h-4 w-4" }) }) }),
2240
+ /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(D.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
2213
2241
  t
2214
2242
  ]
2215
2243
  }
2216
2244
  ));
2217
- _a.displayName = M.CheckboxItem.displayName;
2218
- const Ba = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
2219
- M.RadioItem,
2245
+ Ra.displayName = D.CheckboxItem.displayName;
2246
+ const Pa = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
2247
+ D.RadioItem,
2220
2248
  {
2221
2249
  ref: o,
2222
2250
  className: d(
@@ -2225,29 +2253,29 @@ const Ba = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
2225
2253
  ),
2226
2254
  ...s,
2227
2255
  children: [
2228
- /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(M.ItemIndicator, { children: /* @__PURE__ */ a.jsx(nt, { className: "h-4 w-4 fill-current" }) }) }),
2256
+ /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(D.ItemIndicator, { children: /* @__PURE__ */ a.jsx(nt, { className: "h-4 w-4 fill-current" }) }) }),
2229
2257
  t
2230
2258
  ]
2231
2259
  }
2232
2260
  ));
2233
- Ba.displayName = M.RadioItem.displayName;
2234
- const Ra = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
2235
- M.Label,
2261
+ Pa.displayName = D.RadioItem.displayName;
2262
+ const Ta = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
2263
+ D.Label,
2236
2264
  {
2237
2265
  ref: o,
2238
2266
  className: d("px-2 py-1.5 text-sm font-semibold text-foreground", t && "pl-8", e),
2239
2267
  ...s
2240
2268
  }
2241
2269
  ));
2242
- Ra.displayName = M.Label.displayName;
2243
- const Ta = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(M.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-border", e), ...t }));
2244
- Ta.displayName = M.Separator.displayName;
2245
- const Pa = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
2246
- Pa.displayName = "ContextMenuShortcut";
2247
- const Ia = (e) => {
2270
+ Ta.displayName = D.Label.displayName;
2271
+ const Ia = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(D.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-border", e), ...t }));
2272
+ Ia.displayName = D.Separator.displayName;
2273
+ const Ma = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
2274
+ Ma.displayName = "ContextMenuShortcut";
2275
+ const Da = (e) => {
2248
2276
  try {
2249
2277
  const t = document.getElementById("icon-picker-field"), s = document.createElement("div");
2250
- Ys.render(/* @__PURE__ */ a.jsx(Js, { value: e }), s), t.appendChild(s), s.hidden = !0;
2278
+ Xs.render(/* @__PURE__ */ a.jsx(Qs, { value: e }), s), t.appendChild(s), s.hidden = !0;
2251
2279
  let o = s.innerHTML;
2252
2280
  setTimeout(() => t.removeChild(s), 100);
2253
2281
  const i = new DOMParser().parseFromString(o, "image/svg+xml"), r = i.querySelector("svg");
@@ -2255,10 +2283,10 @@ const Ia = (e) => {
2255
2283
  } catch (t) {
2256
2284
  return console.error(t), "";
2257
2285
  }
2258
- }, Pi = ({ value: e, onChange: t }) => {
2286
+ }, Mi = ({ value: e, onChange: t }) => {
2259
2287
  const s = (o) => {
2260
2288
  t("<svg />");
2261
- const n = Ia(o);
2289
+ const n = Da(o);
2262
2290
  t(n);
2263
2291
  };
2264
2292
  return /* @__PURE__ */ a.jsxs("div", { className: "mt-1 flex h-20 items-center gap-x-2", id: "icon-picker-field", children: [
@@ -2273,7 +2301,7 @@ const Ia = (e) => {
2273
2301
  }
2274
2302
  ),
2275
2303
  /* @__PURE__ */ a.jsx(
2276
- Ks,
2304
+ Ys,
2277
2305
  {
2278
2306
  value: e ? "BiSolidGrid" : null,
2279
2307
  onChange: s,
@@ -2309,7 +2337,7 @@ const Ia = (e) => {
2309
2337
  }
2310
2338
  )
2311
2339
  ] });
2312
- }, Ma = et.lazy(() => import("./UnsplashImages-Y8RGFVSh.js")), Da = et.lazy(() => import("./UploadImages-dd8LfyFr.js")), ks = ({
2340
+ }, Ea = et.lazy(() => import("./UnsplashImages-eZedbK2J.js")), Oa = et.lazy(() => import("./UploadImages-71QziLbr.js")), Ss = ({
2313
2341
  isModalView: e = !1,
2314
2342
  onSelect: t = () => {
2315
2343
  }
@@ -2317,29 +2345,29 @@ const Ia = (e) => {
2317
2345
  const [s, o] = Ce("upload");
2318
2346
  return /* @__PURE__ */ a.jsxs("div", { className: "flex h-full flex-col", children: [
2319
2347
  /* @__PURE__ */ a.jsx("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ a.jsx("h1", { className: "px-1 font-semibold", children: e ? "Select or upload images" : "Images" }) }),
2320
- /* @__PURE__ */ a.jsxs(Cn, { value: s, onValueChange: (n) => o(n), className: "flex h-full w-full flex-col py-2", children: [
2321
- /* @__PURE__ */ a.jsxs(fs, { className: "w-full", children: [
2348
+ /* @__PURE__ */ a.jsxs(Bn, { value: s, onValueChange: (n) => o(n), className: "flex h-full w-full flex-col py-2", children: [
2349
+ /* @__PURE__ */ a.jsxs(gs, { className: "w-full", children: [
2322
2350
  /* @__PURE__ */ a.jsx(Xe, { value: "upload", className: "w-1/2", children: "Upload" }),
2323
2351
  /* @__PURE__ */ a.jsx(Xe, { value: "unsplash", className: "w-1/2", children: "Unsplash" })
2324
2352
  ] }),
2325
- s === "unsplash" ? /* @__PURE__ */ a.jsx(Ze, { value: "unsplash", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(vt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(Ma, { isModalView: e, onSelect: t }) }) }) : /* @__PURE__ */ a.jsx(Ze, { value: "upload", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(vt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(Da, { isModalView: e, onSelect: t }) }) })
2353
+ s === "unsplash" ? /* @__PURE__ */ a.jsx(Ze, { value: "unsplash", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(vt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(Ea, { isModalView: e, onSelect: t }) }) }) : /* @__PURE__ */ a.jsx(Ze, { value: "upload", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(vt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(Oa, { isModalView: e, onSelect: t }) }) })
2326
2354
  ] })
2327
2355
  ] });
2328
- }, Ii = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2356
+ }, Di = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2329
2357
  __proto__: null,
2330
- default: ks
2331
- }, Symbol.toStringTag, { value: "Module" })), Tt = ({ children: e, onSelect: t }) => {
2358
+ default: Ss
2359
+ }, Symbol.toStringTag, { value: "Module" })), It = ({ children: e, onSelect: t }) => {
2332
2360
  const [s, o] = Ce(!1), n = (...i) => {
2333
2361
  t.call(void 0, ...i), o(!1);
2334
2362
  };
2335
- return /* @__PURE__ */ a.jsxs(cs, { open: s, onOpenChange: (i) => o(i), children: [
2336
- /* @__PURE__ */ a.jsx(un, { asChild: !0, children: e }),
2337
- /* @__PURE__ */ a.jsx(xt, { className: "flex h-3/4 max-w-5xl", children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ a.jsx(ks, { isModalView: !0, onSelect: n }) }) })
2363
+ return /* @__PURE__ */ a.jsxs(us, { open: s, onOpenChange: (i) => o(i), children: [
2364
+ /* @__PURE__ */ a.jsx(mn, { asChild: !0, children: e }),
2365
+ /* @__PURE__ */ a.jsx(xt, { className: "flex h-3/4 max-w-5xl", children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ a.jsx(Ss, { isModalView: !0, onSelect: n }) }) })
2338
2366
  ] });
2339
- }, Mi = ({ value: e, onChange: t, id: s, onBlur: o }) => /* @__PURE__ */ a.jsxs("div", { className: "mt-1.5 flex items-center gap-x-3", children: [
2340
- e ? /* @__PURE__ */ a.jsx("img", { src: e, className: "h-20 w-20 overflow-hidden rounded-md border object-cover", alt: "" }) : /* @__PURE__ */ a.jsx(Tt, { onSelect: t, children: /* @__PURE__ */ a.jsx("div", { className: "h-20 w-20 cursor-pointer rounded-md border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px] hover:border-gray-400" }) }),
2367
+ }, Ei = ({ value: e, onChange: t, id: s, onBlur: o }) => /* @__PURE__ */ a.jsxs("div", { className: "mt-1.5 flex items-center gap-x-3", children: [
2368
+ e ? /* @__PURE__ */ a.jsx("img", { src: e, className: "h-20 w-20 overflow-hidden rounded-md border object-cover", alt: "" }) : /* @__PURE__ */ a.jsx(It, { onSelect: t, children: /* @__PURE__ */ a.jsx("div", { className: "h-20 w-20 cursor-pointer rounded-md border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px] hover:border-gray-400" }) }),
2341
2369
  /* @__PURE__ */ a.jsxs("div", { className: "flex w-3/5 flex-col", children: [
2342
- /* @__PURE__ */ a.jsx(Tt, { onSelect: t, children: /* @__PURE__ */ a.jsx("small", { className: "cursor-pointer rounded-full bg-gray-600 px-2 py-1 text-center text-xs text-white hover:bg-gray-500 dark:bg-gray-700", children: e || !Ee(e) ? "Replace Image" : "Choose Image" }) }),
2370
+ /* @__PURE__ */ a.jsx(It, { onSelect: t, children: /* @__PURE__ */ a.jsx("small", { className: "cursor-pointer rounded-full bg-gray-600 px-2 py-1 text-center text-xs text-white hover:bg-gray-500 dark:bg-gray-700", children: e || !_e(e) ? "Replace Image" : "Choose Image" }) }),
2343
2371
  /* @__PURE__ */ a.jsx("small", { className: "-pl-4 pt-2 text-center text-xs text-gray-600", children: "OR" }),
2344
2372
  /* @__PURE__ */ a.jsx(
2345
2373
  "input",
@@ -2353,7 +2381,7 @@ const Ia = (e) => {
2353
2381
  }
2354
2382
  )
2355
2383
  ] })
2356
- ] }), Di = ({ id: e, placeholder: t, value: s, onChange: o, onBlur: n }) => {
2384
+ ] }), Oi = ({ id: e, placeholder: t, value: s, onChange: o, onBlur: n }) => {
2357
2385
  const i = {
2358
2386
  toolbar: [
2359
2387
  ["bold", "italic", "underline", "strike", "blockquote"],
@@ -2377,7 +2405,7 @@ const Ia = (e) => {
2377
2405
  "image"
2378
2406
  ];
2379
2407
  return typeof window > "u" ? null : /* @__PURE__ */ a.jsx(
2380
- Qs,
2408
+ Zs,
2381
2409
  {
2382
2410
  id: e,
2383
2411
  value: s,
@@ -2389,7 +2417,7 @@ const Ia = (e) => {
2389
2417
  className: "mt-1 rounded-md"
2390
2418
  }
2391
2419
  );
2392
- }, Ei = ({ schema: e, formData: t, onChange: s }) => {
2420
+ }, Li = ({ schema: e, formData: t, onChange: s }) => {
2393
2421
  const [o, n] = Ce([]), i = Ne("getPages", () => []), { type: r = "page", href: c = "", target: p = "self" } = t;
2394
2422
  return Ae(() => {
2395
2423
  (async () => {
@@ -2415,7 +2443,7 @@ const Ia = (e) => {
2415
2443
  onChange: (l) => s({ ...t, href: l.target.value }),
2416
2444
  children: [
2417
2445
  /* @__PURE__ */ a.jsx("option", { value: "", children: "Choose page" }),
2418
- P(o, (l) => /* @__PURE__ */ a.jsx("option", { value: l.slug, children: l.name }, l.uuid))
2446
+ I(o, (l) => /* @__PURE__ */ a.jsx("option", { value: l.slug, children: l.name }, l.uuid))
2419
2447
  ]
2420
2448
  }
2421
2449
  ) : /* @__PURE__ */ a.jsx(
@@ -2442,50 +2470,50 @@ const Ia = (e) => {
2442
2470
  ] })
2443
2471
  ] })
2444
2472
  ] });
2445
- }, Oi = () => {
2446
- const [e] = ye(), [, t] = Ve(), { addBlocks: s } = xe(), { toast: o } = bs(), n = F(
2473
+ }, zi = () => {
2474
+ const [e] = ye(), [, t] = $e(), { addBlocks: s } = xe(), { toast: o } = hs(), n = $(
2447
2475
  (r, c, p) => {
2448
2476
  var v;
2449
2477
  for (let S = 0; S < r.length; S++) {
2450
2478
  const { _id: L } = r[S];
2451
2479
  r[S]._id = de();
2452
- const W = D(r, { _parent: L });
2453
- for (let C = 0; C < W.length; C++)
2454
- W[C]._parent = r[S]._id;
2480
+ const F = E(r, { _parent: L });
2481
+ for (let _ = 0; _ < F.length; _++)
2482
+ F[_]._parent = r[S]._id;
2455
2483
  }
2456
- const l = Z(r);
2457
- let f, N;
2458
- return c && (f = se(e, { _id: c }), r[0]._parent = c, N = c), !(f ? Ye(f._type, l._type) : !0) && f && (r[0]._parent = f._parent, N = f._parent), s(r, N, p), t([(v = Z(r)) == null ? void 0 : v._id]), Z(r);
2484
+ const l = ee(r);
2485
+ let m, N;
2486
+ return c && (m = oe(e, { _id: c }), r[0]._parent = c, N = c), !(m ? _t(m._type, l._type) : !0) && m && (r[0]._parent = m._parent, N = m._parent), s(r, N, p), t([(v = ee(r)) == null ? void 0 : v._id]), ee(r);
2459
2487
  },
2460
2488
  [e, t]
2461
2489
  );
2462
- return { addCoreBlock: F(
2490
+ return { addCoreBlock: $(
2463
2491
  (r, c, p) => {
2464
2492
  if (pe(r, "blocks")) {
2465
- const C = r.blocks;
2466
- return n(C, c, p);
2493
+ const _ = r.blocks;
2494
+ return n(_, c, p);
2467
2495
  }
2468
- const l = de(), f = es(r.props), N = [];
2469
- Lt(f, (C, z) => {
2470
- if (zt(C, qe)) {
2471
- const $ = C.replace(qe, "");
2496
+ const l = de(), m = ss(r.props), N = [];
2497
+ Vt(m, (_, T) => {
2498
+ if ($t(_, Ke)) {
2499
+ const G = _.replace(Ke, "");
2472
2500
  N.push({
2473
- _id: $,
2501
+ _id: G,
2474
2502
  _type: "Slot",
2475
2503
  _parent: l,
2476
- _name: r.props[z].name,
2477
- _styles: r.props[z].styles,
2478
- _emptyStyles: r.props[z].emptyStyles
2504
+ _name: r.props[T].name,
2505
+ _styles: r.props[T].styles,
2506
+ _emptyStyles: r.props[T].emptyStyles
2479
2507
  });
2480
2508
  }
2481
2509
  });
2482
2510
  const j = {
2483
2511
  _type: r.type,
2484
2512
  _id: l,
2485
- ...f
2513
+ ...m
2486
2514
  };
2487
2515
  let v, S;
2488
- if (c && (v = se(e, { _id: c }), j._parent = c, S = c), !wo(v == null ? void 0 : v._type, r.type)) {
2516
+ if (c && (v = oe(e, { _id: c }), j._parent = c, S = c), !ko(v == null ? void 0 : v._type, r.type)) {
2489
2517
  o({
2490
2518
  variant: "destructive",
2491
2519
  title: "Error",
@@ -2493,30 +2521,30 @@ const Ia = (e) => {
2493
2521
  }), t([]);
2494
2522
  return;
2495
2523
  }
2496
- !(v ? Ye(v._type, r.type) : !0) && v && (j._parent = v._parent, S = v._parent);
2497
- const W = [j, ...N];
2498
- return s(W, S, p), t([j._id]), j;
2524
+ !(v ? _t(v._type, r.type) : !0) && v && (j._parent = v._parent, S = v._parent);
2525
+ const F = [j, ...N];
2526
+ return s(F, S, p), t([j._id]), j;
2499
2527
  },
2500
2528
  [n, e, t]
2501
2529
  ), addPredefinedBlock: n };
2502
- }, Pt = {
2530
+ }, Mt = {
2503
2531
  xs: 420,
2504
2532
  sm: 620,
2505
2533
  md: 768,
2506
2534
  lg: 1024,
2507
2535
  xl: 1280,
2508
2536
  "2xl": 1536
2509
- }, It = ["xs", "sm", "md", "lg", "xl", "2xl"];
2510
- function Ea(e, t) {
2537
+ }, Dt = ["xs", "sm", "md", "lg", "xl", "2xl"];
2538
+ function La(e, t) {
2511
2539
  if (t === null)
2512
2540
  return "baseClasses";
2513
2541
  const s = t.mq;
2514
2542
  if (s === "xs" || t.dark || t.mod !== "")
2515
2543
  return "classes";
2516
- let o = "baseClasses", n = It.indexOf(s);
2544
+ let o = "baseClasses", n = Dt.indexOf(s);
2517
2545
  for (; n > 0; ) {
2518
- const i = It[n - 1];
2519
- if (se(e, {
2546
+ const i = Dt[n - 1];
2547
+ if (oe(e, {
2520
2548
  mq: i,
2521
2549
  property: t.property
2522
2550
  })) {
@@ -2527,67 +2555,67 @@ function Ea(e, t) {
2527
2555
  }
2528
2556
  return o;
2529
2557
  }
2530
- const Mt = [];
2531
- function Oa(e = "", t = "", s = []) {
2558
+ const Et = [];
2559
+ function za(e = "", t = "", s = []) {
2532
2560
  e = e.trim().replace(/ +/g, "");
2533
- let o = D(
2534
- P(e.split(" "), Pe),
2535
- (l) => !He(l)
2536
- ), n = D(P(t.split(" "), Pe), (l) => !He(l));
2537
- n = D(
2561
+ let o = E(
2562
+ I(e.split(" "), Ie),
2563
+ (l) => !qe(l)
2564
+ ), n = E(I(t.split(" "), Ie), (l) => !qe(l));
2565
+ n = E(
2538
2566
  n,
2539
- (l) => !Y(Mt, l.property)
2567
+ (l) => !Y(Et, l.property)
2540
2568
  );
2541
2569
  const i = [], r = [];
2542
2570
  ce(s, (l) => {
2543
- const f = Pe(l), N = se(o, yt(f, ["dark", "mq", "mod", "property"]));
2544
- if (N && (o = D(
2571
+ const m = Ie(l), N = oe(o, yt(m, ["dark", "mq", "mod", "property"]));
2572
+ if (N && (o = E(
2545
2573
  o,
2546
2574
  (j) => j.fullCls !== (N == null ? void 0 : N.fullCls)
2547
- )), i.push(f), f.mq === "xs" && !f.dark && f.mod === "" && (n = D(n, (j) => j.property !== f.property)), Ea(o, f) === "baseClasses" && !Y(Mt, f.property)) {
2548
- const j = se(n, yt(f, ["property"]));
2549
- N && (n = D(
2575
+ )), i.push(m), m.mq === "xs" && !m.dark && m.mod === "" && (n = E(n, (j) => j.property !== m.property)), La(o, m) === "baseClasses" && !Y(Et, m.property)) {
2576
+ const j = oe(n, yt(m, ["property"]));
2577
+ N && (n = E(
2550
2578
  n,
2551
2579
  (v) => v.fullCls !== (j == null ? void 0 : j.fullCls)
2552
2580
  )), r.push({
2553
- ...f,
2554
- fullCls: f.cls,
2581
+ ...m,
2582
+ fullCls: m.cls,
2555
2583
  mq: "xs"
2556
2584
  });
2557
2585
  }
2558
2586
  });
2559
- const c = P(
2560
- wt([...o, ...i], (l) => Pt[l.mq]),
2587
+ const c = I(
2588
+ wt([...o, ...i], (l) => Mt[l.mq]),
2561
2589
  "fullCls"
2562
2590
  ).join(" ");
2563
- return `${P(
2564
- wt([...n, ...r], (l) => Pt[l.mq]),
2591
+ return `${I(
2592
+ wt([...n, ...r], (l) => Mt[l.mq]),
2565
2593
  "fullCls"
2566
2594
  ).join(" ").trim()},${c.trim()}`.trim().replace(/ +/g, "");
2567
2595
  }
2568
- const Re = w([]);
2569
- Re.debugLabel = "selectedStylingBlocksAtom";
2570
- const La = () => E(Re), za = (e) => {
2571
- const t = e.replace(me, "").split(",");
2596
+ const Pe = w([]);
2597
+ Pe.debugLabel = "selectedStylingBlocksAtom";
2598
+ const Va = () => O(Pe), $a = (e) => {
2599
+ const t = e.replace(fe, "").split(",");
2572
2600
  return { baseClasses: t[0], classes: t[1] };
2573
- }, Va = w(null, (e, t, { blockIds: s, newClasses: o }) => {
2574
- const n = D(
2601
+ }, Fa = w(null, (e, t, { blockIds: s, newClasses: o }) => {
2602
+ const n = E(
2575
2603
  e(rt),
2576
2604
  (r) => (
2577
2605
  // @ts-ignore
2578
2606
  s.includes(e(r)._id)
2579
2607
  )
2580
- ), i = Z(e(Re));
2581
- return P(n, (r) => {
2582
- const c = e(r), p = H(c, i.prop, `${me},`), { baseClasses: l, classes: f } = za(p);
2608
+ ), i = ee(e(Pe));
2609
+ return I(n, (r) => {
2610
+ const c = e(r), p = J(c, i.prop, `${fe},`), { baseClasses: l, classes: m } = $a(p);
2583
2611
  return {
2584
2612
  ids: [c._id],
2585
- props: { [i.prop]: `${me}${Oa(f, l, o)}` }
2613
+ props: { [i.prop]: `${fe}${za(m, l, o)}` }
2586
2614
  };
2587
2615
  });
2588
- }), Li = () => {
2589
- const e = _e(Va), { updateBlocks: t, updateBlocksRuntime: s } = xe();
2590
- return F(
2616
+ }), Vi = () => {
2617
+ const e = Be(Fa), { updateBlocks: t, updateBlocksRuntime: s } = xe();
2618
+ return $(
2591
2619
  (o, n, i = !1) => {
2592
2620
  const r = e({ blockIds: o, newClasses: n });
2593
2621
  if (!i) {
@@ -2598,131 +2626,131 @@ const La = () => E(Re), za = (e) => {
2598
2626
  },
2599
2627
  [e]
2600
2628
  );
2601
- }, $a = () => E(Zt), js = Be("canvasWidth", 800), Ss = w((e) => {
2602
- const t = e(js);
2603
- return $s(t).toLowerCase();
2604
- }), zi = () => {
2605
- const [e, t] = E(js), s = ee(Ss), [o, n] = $a();
2629
+ }, Ua = () => O(ts), As = Re("canvasWidth", 800), Cs = w((e) => {
2630
+ const t = e(As);
2631
+ return Us(t).toLowerCase();
2632
+ }), $i = () => {
2633
+ const [e, t] = O(As), s = te(Cs), [o, n] = Ua();
2606
2634
  return Ae(() => {
2607
2635
  o !== "xs" && n(s);
2608
2636
  }, [s, o, n]), [e, s, t];
2609
- }, Fa = Be("canvasZoom", 100), Vi = () => E(Fa), As = w([]), Ua = () => {
2610
- const [e, t] = E(As), s = _e(ht), o = F(
2637
+ }, Wa = Re("canvasZoom", 100), Fi = () => O(Wa), _s = w([]), Ga = () => {
2638
+ const [e, t] = O(_s), s = Be(ht), o = $(
2611
2639
  (n) => {
2612
2640
  t(n), s([]);
2613
2641
  },
2614
2642
  [t, s]
2615
2643
  );
2616
2644
  return [e, o];
2617
- }, ht = w([]), $i = () => {
2618
- const [e, t] = E(ht), s = _e(As), o = F(
2645
+ }, ht = w([]), Ui = () => {
2646
+ const [e, t] = O(ht), s = Be(_s), o = $(
2619
2647
  (n) => {
2620
2648
  t(n), s([]);
2621
2649
  },
2622
2650
  [t, s]
2623
2651
  );
2624
2652
  return [e, o];
2625
- }, Cs = Be("darkMode", !1), Fi = () => {
2626
- const [e, t] = E(Cs);
2653
+ }, Bs = Re("darkMode", !1), Wi = () => {
2654
+ const [e, t] = O(Bs);
2627
2655
  return [e, t];
2628
- }, Wa = () => {
2629
- const [e] = ye(), [, t] = Ve(), { addBlocks: s } = xe();
2630
- return F(
2656
+ }, Ha = () => {
2657
+ const [e] = ye(), [, t] = $e(), { addBlocks: s } = xe();
2658
+ return $(
2631
2659
  (o, n = null) => {
2632
2660
  const i = [];
2633
2661
  ce(o, (r) => {
2634
2662
  const c = e.find((j) => j._id === r);
2635
2663
  n || (n = c._parent);
2636
- const f = D(
2664
+ const m = E(
2637
2665
  e,
2638
- (j) => Et(n) ? j._parent === n : !c._parent
2639
- ).indexOf(c) + 1, N = No(e, r, n);
2640
- s(N, n, f), i.push(H(N, "0._id", ""));
2666
+ (j) => Lt(n) ? j._parent === n : !c._parent
2667
+ ).indexOf(c) + 1, N = jo(e, r, n);
2668
+ s(N, n, m), i.push(J(N, "0._id", ""));
2641
2669
  }), t(i);
2642
2670
  },
2643
2671
  [e, t]
2644
2672
  );
2645
- }, Ga = w([]), Ui = () => {
2646
- const [e, t] = E(Ga), s = F(
2673
+ }, qa = w([]), Gi = () => {
2674
+ const [e, t] = O(qa), s = $(
2647
2675
  (o) => {
2648
- t((n) => Y(n, o) ? Ot(n, o) : [...n, o]);
2676
+ t((n) => Y(n, o) ? zt(n, o) : [...n, o]);
2649
2677
  },
2650
2678
  [t]
2651
2679
  );
2652
2680
  return [e, t, s];
2653
- }, Ha = w(""), qa = () => E(Ha), Ka = () => {
2654
- const e = ee(re);
2655
- return F(
2681
+ }, Ka = w(""), Ja = () => O(Ka), Ya = () => {
2682
+ const e = te(ie);
2683
+ return $(
2656
2684
  (t, s) => {
2657
- const o = P(e, (n) => (Y(t, H(n, "_id")) && je(n, "_parent", s), n));
2685
+ const o = I(e, (n) => (Y(t, J(n, "_id")) && je(n, "_parent", s), n));
2658
2686
  console.log("newBlocks", o);
2659
2687
  },
2660
2688
  [e]
2661
2689
  );
2662
- }, Wi = () => {
2690
+ }, Hi = () => {
2663
2691
  console.warn("usePasteBlocks is not implemented");
2664
- const e = ee(ht), [t, s] = Ua(), o = Wa(), n = Ka();
2692
+ const e = te(ht), [t, s] = Ga(), o = Ha(), n = Ya();
2665
2693
  return {
2666
- canPaste: Os(
2694
+ canPaste: zs(
2667
2695
  () => t.length > 0 || e.length > 0,
2668
2696
  [e, t]
2669
2697
  ),
2670
- pasteBlocks: F(
2698
+ pasteBlocks: $(
2671
2699
  (r) => {
2672
- Ee(e) ? n(t, r) : o(e, r), s(() => []);
2700
+ _e(e) ? n(t, r) : o(e, r), s(() => []);
2673
2701
  },
2674
2702
  [t, e, o, n, s]
2675
2703
  )
2676
2704
  };
2677
- }, Ja = w(!1), Gi = () => {
2678
- const [e, t] = E(Ja);
2705
+ }, Qa = w(!1), qi = () => {
2706
+ const [e, t] = O(Qa);
2679
2707
  return [e, t];
2680
- }, Ya = w(null, (e, t, { blockIds: s, fullClasses: o }) => {
2681
- const n = Z(e(Re)), i = D(
2708
+ }, Xa = w(null, (e, t, { blockIds: s, fullClasses: o }) => {
2709
+ const n = ee(e(Pe)), i = E(
2682
2710
  e(rt),
2683
2711
  (r) => (
2684
2712
  // @ts-ignore
2685
2713
  s.includes(e(r)._id)
2686
2714
  )
2687
2715
  );
2688
- return P(i, (r) => {
2716
+ return I(i, (r) => {
2689
2717
  const c = e(r), p = o;
2690
- let { classes: l, baseClasses: f } = yo(H(c, n.prop, "styles:,"));
2718
+ let { classes: l, baseClasses: m } = No(J(c, n.prop, "styles:,"));
2691
2719
  return ce(p, (N) => {
2692
2720
  const j = new RegExp(`(^| )${N.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
2693
2721
  l = l.replace(j, " ").replace(/ +/g, " ").trim();
2694
- const v = Z(N.split(":"));
2722
+ const v = ee(N.split(":"));
2695
2723
  Y(["2xl", "xl", "lg", "md", "sm"], v) && p.push(N.split(":").pop().trim());
2696
2724
  }), ce(p, (N) => {
2697
2725
  const j = new RegExp(`(^| )${N.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
2698
- f = f.replace(j, " ").replace(/ +/g, " ").trim();
2726
+ m = m.replace(j, " ").replace(/ +/g, " ").trim();
2699
2727
  }), {
2700
2728
  ids: [c._id],
2701
2729
  props: {
2702
- [n.prop]: `${me}${f},${l}`
2730
+ [n.prop]: `${fe}${m},${l}`
2703
2731
  }
2704
2732
  };
2705
2733
  });
2706
- }), Hi = () => {
2707
- const { updateBlocks: e } = xe(), t = _e(Ya);
2708
- return F(
2734
+ }), Ki = () => {
2735
+ const { updateBlocks: e } = xe(), t = Be(Xa);
2736
+ return $(
2709
2737
  (s, o) => {
2710
2738
  const n = t({ blockIds: s, fullClasses: o });
2711
2739
  e(s, n[0].props);
2712
2740
  },
2713
2741
  [t]
2714
2742
  );
2715
- }, _s = w((e) => {
2716
- const t = Z(e(Re)), s = e(ct);
2717
- if (!t || t.blockId !== H(s, "_id", null))
2743
+ }, Rs = w((e) => {
2744
+ const t = ee(e(Pe)), s = e(ct);
2745
+ if (!t || t.blockId !== J(s, "_id", null))
2718
2746
  return [];
2719
- const n = H(s, t.prop, `${me},`).replace(me, "").split(",").join(" ");
2720
- return D(P(n.trim().split(" "), Pe), (i) => !He(i));
2721
- }), qi = () => ee(_s), Dt = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, Qa = w((e) => {
2722
- const t = e(Ss), s = e(dt), o = e(Cs), n = Xa(t);
2723
- let i = D(e(_s), { mod: s });
2724
- return zt(s, "_") || (i = D(i, (r) => n.includes(r.mq))), i = i.sort((r, c) => Dt[r.mq] - Dt[c.mq]), o || (i = D(i, { dark: !1 })), i;
2725
- }), Xa = (e) => {
2747
+ const n = J(s, t.prop, `${fe},`).replace(fe, "").split(",").join(" ");
2748
+ return E(I(n.trim().split(" "), Ie), (i) => !qe(i));
2749
+ }), Ji = () => te(Rs), Ot = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, Za = w((e) => {
2750
+ const t = e(Cs), s = e(dt), o = e(Bs), n = er(t);
2751
+ let i = E(e(Rs), { mod: s });
2752
+ return $t(s, "_") || (i = E(i, (r) => n.includes(r.mq))), i = i.sort((r, c) => Ot[r.mq] - Ot[c.mq]), o || (i = E(i, { dark: !1 })), i;
2753
+ }), er = (e) => {
2726
2754
  let t = [];
2727
2755
  switch (e) {
2728
2756
  case "xs":
@@ -2748,37 +2776,37 @@ const La = () => E(Re), za = (e) => {
2748
2776
  break;
2749
2777
  }
2750
2778
  return t;
2751
- }, Ki = () => ee(Qa), Ji = () => E(dt), Yi = () => {
2779
+ }, Yi = () => te(Za), Qi = () => O(dt), Xi = () => {
2752
2780
  const { updateBlocks: e } = xe();
2753
- return F(
2781
+ return $(
2754
2782
  (t, s, o) => {
2755
2783
  e(t, s, o);
2756
2784
  },
2757
2785
  [e]
2758
2786
  );
2759
- }, Qi = () => {
2787
+ }, Zi = () => {
2760
2788
  const { updateBlocksRuntime: e } = xe();
2761
- return F(
2789
+ return $(
2762
2790
  (t, s) => {
2763
2791
  e(t, s);
2764
2792
  },
2765
2793
  [e]
2766
2794
  );
2767
- }, Bs = {
2795
+ }, Ps = {
2768
2796
  name: "",
2769
2797
  props: {},
2770
2798
  modalProps: {},
2771
2799
  backdropClose: !0
2772
- }, Za = w(Bs), Xi = () => {
2773
- const [e, t] = E(Za), s = F(
2800
+ }, tr = w(Ps), el = () => {
2801
+ const [e, t] = O(tr), s = $(
2774
2802
  (n, i = {}, r = {}) => {
2775
2803
  t({ name: n, props: i, modalProps: r });
2776
2804
  },
2777
2805
  [t]
2778
- ), o = F(
2806
+ ), o = $(
2779
2807
  (...n) => {
2780
- H(e, "props.onClose", () => {
2781
- })(...n), t(Bs);
2808
+ J(e, "props.onClose", () => {
2809
+ })(...n), t(Ps);
2782
2810
  },
2783
2811
  [t, e]
2784
2812
  );
@@ -2787,47 +2815,47 @@ const La = () => E(Re), za = (e) => {
2787
2815
  openModal: s,
2788
2816
  closeModal: o
2789
2817
  };
2790
- }, Zi = () => (console.warn("useAllBlocks is deprecated, use useBlocksStore() instead"), ee(re)), Rs = w(!1);
2791
- Rs.debugLabel = "readOnlyModeAtom";
2792
- const er = w("online");
2793
- er.debugLabel = "networkModeAtom";
2794
- const tr = w(!1);
2795
- tr.debugLabel = "codeEditorOpenAtom";
2796
- const sr = w(!1);
2797
- sr.debugLabel = "editLayerNameAtom";
2798
- const or = w("");
2799
- or.debugLabel = "activeLanguageAtom";
2800
- const nr = w("");
2801
- nr.debugLabel = "primaryLanguageAtom";
2802
- const ar = w(null);
2803
- ar.debugLabel = "canvasIframeAtom";
2804
- const rr = w("outline");
2805
- rr.debugLabel = "activePanelAtom";
2806
- const ir = w("");
2807
- ir.debugLabel = "showPredefinedBlockCategoryAtom";
2808
- const Ts = w({ undoCount: 0, redoCount: 0 });
2809
- Ts.debugLabel = "historyStatesAtom";
2810
- const lr = w("");
2811
- lr.debugLabel = "inlineEditingActiveAtom";
2812
- const cr = w(!1);
2813
- cr.debugLabel = "draggingFlagAtom";
2818
+ }, tl = () => (console.warn("useAllBlocks is deprecated, use useBlocksStore() instead"), te(ie)), Ts = w(!1);
2819
+ Ts.debugLabel = "readOnlyModeAtom";
2820
+ const sr = w("online");
2821
+ sr.debugLabel = "networkModeAtom";
2822
+ const or = w(!1);
2823
+ or.debugLabel = "codeEditorOpenAtom";
2824
+ const nr = w(!1);
2825
+ nr.debugLabel = "editLayerNameAtom";
2826
+ const ar = w("");
2827
+ ar.debugLabel = "activeLanguageAtom";
2828
+ const rr = w("");
2829
+ rr.debugLabel = "primaryLanguageAtom";
2830
+ const ir = w(null);
2831
+ ir.debugLabel = "canvasIframeAtom";
2832
+ const lr = w("outline");
2833
+ lr.debugLabel = "activePanelAtom";
2834
+ const cr = w("");
2835
+ cr.debugLabel = "showPredefinedBlockCategoryAtom";
2836
+ const Is = w({ undoCount: 0, redoCount: 0 });
2837
+ Is.debugLabel = "historyStatesAtom";
2814
2838
  const dr = w("");
2815
- dr.debugLabel = "draggedBlockIdAtom";
2816
- const el = () => ee(Rs), ur = w(""), mr = w(null), tl = () => E(ur), sl = () => E(mr), fr = Be("selectedBreakpoints", ["XS", "MD", "XL"]), ol = () => {
2817
- const [e, t] = E(fr);
2839
+ dr.debugLabel = "inlineEditingActiveAtom";
2840
+ const ur = w(!1);
2841
+ ur.debugLabel = "draggingFlagAtom";
2842
+ const fr = w("");
2843
+ fr.debugLabel = "draggedBlockIdAtom";
2844
+ const sl = () => te(Ts), mr = w(""), pr = w(null), ol = () => O(mr), nl = () => O(pr), gr = Re("selectedBreakpoints", ["XS", "MD", "XL"]), al = () => {
2845
+ const [e, t] = O(gr);
2818
2846
  return [e, t];
2819
- }, nl = () => {
2820
- const e = _e(Ts), { clear: t } = rs(), [, s] = Ve(), [, o] = qa(), [, n] = La();
2847
+ }, rl = () => {
2848
+ const e = Be(Is), { clear: t } = ls(), [, s] = $e(), [, o] = Ja(), [, n] = Va();
2821
2849
  return () => {
2822
2850
  s([]), n([]), o(""), t(), e({ undoCount: 0, redoCount: 0 });
2823
2851
  };
2824
- }, pr = w([]), al = () => {
2825
- const [e, t] = Ce(!1), [s, o] = E(pr), n = Ne("getUILibraryBlocks", () => []);
2852
+ }, br = w([]), il = () => {
2853
+ const [e, t] = Ce(!1), [s, o] = O(br), n = Ne("getUILibraryBlocks", () => []);
2826
2854
  return Ae(() => {
2827
2855
  (async () => s.length > 0 || (t(!0), o(await n()), t(!1)))();
2828
2856
  }, []), { data: s, isLoading: e };
2829
- }, rl = () => {
2830
- const [e, t] = Ce(null), s = F(async (o) => {
2857
+ }, ll = () => {
2858
+ const [e, t] = Ce(null), s = $(async (o) => {
2831
2859
  if (!(navigator != null && navigator.clipboard))
2832
2860
  return console.warn("Clipboard not supported"), !1;
2833
2861
  try {
@@ -2839,213 +2867,213 @@ const el = () => ee(Rs), ur = w(""), mr = w(null), tl = () => E(ur), sl = () =>
2839
2867
  return [e, s];
2840
2868
  };
2841
2869
  export {
2842
- Ki as $,
2843
- Yr as A,
2844
- Ko as B,
2870
+ Yi as $,
2871
+ Xr as A,
2872
+ Yo as B,
2845
2873
  pt as C,
2846
- Lr as D,
2874
+ $r as D,
2847
2875
  ye as E,
2848
- ts as F,
2849
- Ht as G,
2850
- as as H,
2851
- ki as I,
2852
- el as J,
2853
- Xi as K,
2854
- Oi as L,
2855
- Li as M,
2856
- zi as N,
2857
- Vi as O,
2858
- $i as P,
2859
- rl as Q,
2860
- Eo as R,
2861
- ji as S,
2862
- Zr as T,
2863
- Ua as U,
2864
- Fi as V,
2865
- Vo as W,
2866
- Ui as X,
2867
- qa as Y,
2868
- Wi as Z,
2869
- Hi as _,
2870
- Qr as a,
2871
- va as a$,
2872
- qi as a0,
2873
- Ur as a1,
2874
- $a as a2,
2875
- al as a3,
2876
- Ji as a4,
2877
- Yi as a5,
2878
- Qi as a6,
2879
- Fr as a7,
2880
- Zi as a8,
2881
- tl as a9,
2882
- la as aA,
2883
- jn as aB,
2884
- qo as aC,
2885
- ci as aD,
2886
- di as aE,
2887
- $n as aF,
2888
- xi as aG,
2889
- hi as aH,
2890
- ta as aI,
2891
- aa as aJ,
2892
- ra as aK,
2893
- oa as aL,
2876
+ os as F,
2877
+ Kt as G,
2878
+ is as H,
2879
+ Si as I,
2880
+ sl as J,
2881
+ el as K,
2882
+ zi as L,
2883
+ Vi as M,
2884
+ $i as N,
2885
+ Fi as O,
2886
+ Ui as P,
2887
+ ll as Q,
2888
+ Lo as R,
2889
+ Ai as S,
2890
+ ti as T,
2891
+ Ga as U,
2892
+ Wi as V,
2893
+ Fo as W,
2894
+ Gi as X,
2895
+ Ja as Y,
2896
+ Hi as Z,
2897
+ Ki as _,
2898
+ Zr as a,
2899
+ wa as a$,
2900
+ Ji as a0,
2901
+ Gr as a1,
2902
+ Ua as a2,
2903
+ il as a3,
2904
+ Qi as a4,
2905
+ Xi as a5,
2906
+ Zi as a6,
2907
+ Wr as a7,
2908
+ tl as a8,
2909
+ ol as a9,
2910
+ da as aA,
2911
+ An as aB,
2912
+ Jo as aC,
2913
+ ui as aD,
2914
+ fi as aE,
2915
+ Un as aF,
2916
+ vi as aG,
2917
+ yi as aH,
2918
+ oa as aI,
2919
+ ia as aJ,
2920
+ la as aK,
2921
+ aa as aL,
2894
2922
  xe as aM,
2895
- cr as aN,
2896
- lr as aO,
2897
- sr as aP,
2898
- dr as aQ,
2899
- zr as aR,
2900
- Vr as aS,
2901
- er as aT,
2902
- ar as aU,
2903
- si as aV,
2904
- oi as aW,
2905
- Bn as aX,
2906
- Ns as aY,
2907
- xa as aZ,
2908
- ha as a_,
2909
- sl as aa,
2910
- ol as ab,
2911
- La as ac,
2912
- cs as ad,
2923
+ ur as aN,
2924
+ dr as aO,
2925
+ nr as aP,
2926
+ fr as aQ,
2927
+ Fr as aR,
2928
+ Ur as aS,
2929
+ sr as aT,
2930
+ ir as aU,
2931
+ ni as aV,
2932
+ ai as aW,
2933
+ Pn as aX,
2934
+ js as aY,
2935
+ va as aZ,
2936
+ ya as a_,
2937
+ nl as aa,
2938
+ al as ab,
2939
+ Va as ac,
2940
+ us as ad,
2913
2941
  xt as ae,
2914
- mn as af,
2915
- pn as ag,
2916
- gn as ah,
2917
- cn as ai,
2918
- ui as aj,
2919
- Fn as ak,
2920
- fi as al,
2921
- Un as am,
2922
- Gn as an,
2923
- un as ao,
2924
- ei as ap,
2925
- ti as aq,
2926
- _n as ar,
2927
- Jr as as,
2928
- rr as at,
2929
- Cn as au,
2930
- fs as av,
2942
+ pn as af,
2943
+ bn as ag,
2944
+ xn as ah,
2945
+ un as ai,
2946
+ mi as aj,
2947
+ Wn as ak,
2948
+ gi as al,
2949
+ Gn as am,
2950
+ qn as an,
2951
+ mn as ao,
2952
+ si as ap,
2953
+ oi as aq,
2954
+ Rn as ar,
2955
+ Qr as as,
2956
+ lr as at,
2957
+ Bn as au,
2958
+ gs as av,
2931
2959
  Xe as aw,
2932
2960
  Ze as ax,
2933
- mi as ay,
2934
- Wn as az,
2935
- on as b,
2936
- Jn as b$,
2937
- ya as b0,
2938
- Na as b1,
2939
- fn as b2,
2940
- Bt as b3,
2941
- _t as b4,
2942
- Di as b5,
2943
- Pi as b6,
2944
- Mi as b7,
2945
- Ei as b8,
2946
- Kr as b9,
2947
- Go as bA,
2961
+ pi as ay,
2962
+ Hn as az,
2963
+ an as b,
2964
+ Qn as b$,
2965
+ Na as b0,
2966
+ ja as b1,
2967
+ gn as b2,
2968
+ Rt as b3,
2969
+ Bt as b4,
2970
+ Oi as b5,
2971
+ Mi as b6,
2972
+ Ei as b7,
2973
+ Li as b8,
2974
+ Yr as b9,
2975
+ qo as bA,
2948
2976
  bt as bB,
2949
- tn as bC,
2950
- sn as bD,
2951
- hn as bE,
2952
- ms as bF,
2953
- Rn as bG,
2954
- ni as bH,
2955
- Tn as bI,
2956
- Mn as bJ,
2957
- Dn as bK,
2958
- zn as bL,
2959
- Ln as bM,
2960
- En as bN,
2961
- li as bO,
2962
- On as bP,
2963
- ri as bQ,
2964
- In as bR,
2965
- Pn as bS,
2966
- ai as bT,
2967
- ii as bU,
2968
- Vn as bV,
2969
- Hn as bW,
2970
- pi as bX,
2971
- gi as bY,
2972
- bi as bZ,
2973
- Kn as b_,
2974
- Jo as ba,
2975
- Yo as bb,
2976
- Qo as bc,
2977
- Nn as bd,
2978
- Xr as be,
2979
- An as bf,
2980
- vi as bg,
2981
- sa as bh,
2982
- ia as bi,
2983
- bn as bj,
2984
- xn as bk,
2985
- vn as bl,
2986
- yn as bm,
2987
- Sn as bn,
2988
- wn as bo,
2989
- Zo as bp,
2990
- en as bq,
2991
- ir as br,
2992
- Ca as bs,
2993
- Aa as bt,
2994
- Ai as bu,
2995
- Ci as bv,
2996
- Gr as bw,
2997
- $r as bx,
2998
- ko as by,
2999
- Ho as bz,
3000
- nn as c,
3001
- Yn as c0,
3002
- Qn as c1,
3003
- Xn as c2,
3004
- na as c3,
3005
- yi as c4,
3006
- wi as c5,
3007
- ea as c6,
3008
- Zn as c7,
3009
- Ni as c8,
3010
- ma as c9,
3011
- bs as ca,
3012
- fa as cb,
3013
- Si as cc,
3014
- ka as cd,
3015
- wa as ce,
3016
- _a as cf,
3017
- Ba as cg,
3018
- Ra as ch,
3019
- Ta as ci,
3020
- Pa as cj,
3021
- _i as ck,
3022
- Bi as cl,
3023
- Ri as cm,
3024
- Sa as cn,
3025
- ja as co,
3026
- Ti as cp,
3027
- Ii as cq,
3028
- rn as d,
3029
- ln as e,
3030
- an as f,
3031
- dn as g,
2977
+ on as bC,
2978
+ nn as bD,
2979
+ yn as bE,
2980
+ ps as bF,
2981
+ Tn as bG,
2982
+ ri as bH,
2983
+ In as bI,
2984
+ En as bJ,
2985
+ On as bK,
2986
+ $n as bL,
2987
+ Vn as bM,
2988
+ Ln as bN,
2989
+ di as bO,
2990
+ zn as bP,
2991
+ li as bQ,
2992
+ Dn as bR,
2993
+ Mn as bS,
2994
+ ii as bT,
2995
+ ci as bU,
2996
+ Fn as bV,
2997
+ Kn as bW,
2998
+ bi as bX,
2999
+ xi as bY,
3000
+ hi as bZ,
3001
+ Yn as b_,
3002
+ Qo as ba,
3003
+ Xo as bb,
3004
+ Zo as bc,
3005
+ jn as bd,
3006
+ ei as be,
3007
+ _n as bf,
3008
+ wi as bg,
3009
+ na as bh,
3010
+ ca as bi,
3011
+ hn as bj,
3012
+ vn as bk,
3013
+ wn as bl,
3014
+ Nn as bm,
3015
+ Cn as bn,
3016
+ kn as bo,
3017
+ tn as bp,
3018
+ sn as bq,
3019
+ cr as br,
3020
+ Ba as bs,
3021
+ _a as bt,
3022
+ _i as bu,
3023
+ Bi as bv,
3024
+ _t as bw,
3025
+ So as bx,
3026
+ qr as by,
3027
+ Ko as bz,
3028
+ rn as c,
3029
+ Xn as c0,
3030
+ Zn as c1,
3031
+ ea as c2,
3032
+ ra as c3,
3033
+ Ni as c4,
3034
+ ki as c5,
3035
+ sa as c6,
3036
+ ta as c7,
3037
+ ji as c8,
3038
+ pa as c9,
3039
+ hs as ca,
3040
+ ga as cb,
3041
+ Ci as cc,
3042
+ Sa as cd,
3043
+ ka as ce,
3044
+ Ra as cf,
3045
+ Pa as cg,
3046
+ Ta as ch,
3047
+ Ia as ci,
3048
+ Ma as cj,
3049
+ Ri as ck,
3050
+ Pi as cl,
3051
+ Ti as cm,
3052
+ Ca as cn,
3053
+ Aa as co,
3054
+ Ii as cp,
3055
+ Di as cq,
3056
+ cn as d,
3057
+ dn as e,
3058
+ ln as f,
3059
+ fn as g,
3032
3060
  Ne as h,
3033
- Wt as i,
3034
- Er as j,
3035
- so as k,
3036
- ne as l,
3037
- co as m,
3038
- lo as n,
3039
- Be as o,
3040
- Or as p,
3041
- Gi as q,
3042
- Ve as r,
3043
- qr as s,
3044
- Wa as t,
3045
- nl as u,
3046
- rs as v,
3047
- re as w,
3048
- vo as x,
3049
- $o as y,
3050
- Hr as z
3061
+ Ht as i,
3062
+ zr as j,
3063
+ no as k,
3064
+ ae as l,
3065
+ fo as m,
3066
+ uo as n,
3067
+ Re as o,
3068
+ Vr as p,
3069
+ qi as q,
3070
+ $e as r,
3071
+ Jr as s,
3072
+ Ha as t,
3073
+ rl as u,
3074
+ ls as v,
3075
+ ie as w,
3076
+ wo as x,
3077
+ Uo as y,
3078
+ Kr as z
3051
3079
  };