@chaibuilder/sdk 1.2.11 → 1.2.12

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 (56) hide show
  1. package/dist/{AddBlocks-TSt8uJY4.js → AddBlocks-ByeMUUzE.js} +11 -11
  2. package/dist/{AddBlocks-k2p8Hy1n.cjs → AddBlocks-nMUkm4og.cjs} +1 -1
  3. package/dist/{BrandingOptions-uFTyYJZj.js → BrandingOptions--poS5shs.js} +1 -1
  4. package/dist/{BrandingOptions-WyVWfFVz.cjs → BrandingOptions-eeDfvB0R.cjs} +1 -1
  5. package/dist/{CanvasArea-iRQqpOak.js → CanvasArea--TKubnIM.js} +21 -21
  6. package/dist/{CanvasArea-5erOZYLy.cjs → CanvasArea-h4lA4oqP.cjs} +1 -1
  7. package/dist/{CurrentPage-NzmJloN7.cjs → CurrentPage-B3YumhrX.cjs} +1 -1
  8. package/dist/{CurrentPage-RCxTz9Mc.js → CurrentPage-Gw9LJ40j.js} +2 -2
  9. package/dist/{Layers-xDG7oltg.cjs → Layers-4r_4F6ST.cjs} +1 -1
  10. package/dist/{Layers-tXB5Pwid.js → Layers-d-xge4On.js} +56 -56
  11. package/dist/{PagesPanel-Jaz9jvye.js → PagesPanel-E4wSgVcE.js} +3 -3
  12. package/dist/{PagesPanel-72nzYB1k.cjs → PagesPanel-iZLDBwXQ.cjs} +1 -1
  13. package/dist/{ProjectPanel-RU0QvH6e.cjs → ProjectPanel-2TcqGnfN.cjs} +1 -1
  14. package/dist/{ProjectPanel--S014Xx3.js → ProjectPanel-q7upaf7h.js} +3 -3
  15. package/dist/{Settings-5EuwaVb3.cjs → Settings-NuDNH2dR.cjs} +1 -1
  16. package/dist/{Settings-gjvl5V1k.js → Settings-y3DHsT88.js} +59 -59
  17. package/dist/{SidePanels-uNCxnGte.cjs → SidePanels-91l1CjYv.cjs} +1 -1
  18. package/dist/{SidePanels-Fq3kRwR0.js → SidePanels-BK_QnEh9.js} +7 -7
  19. package/dist/{Topbar-m5dbbI1f.js → Topbar-b7jnOD57.js} +4 -4
  20. package/dist/{Topbar-JqW89xI5.cjs → Topbar-rEO5z57t.cjs} +1 -1
  21. package/dist/{UnsplashImages-GhBD6owT.js → UnsplashImages-Lb78FYx7.js} +7 -7
  22. package/dist/{UnsplashImages-vACw5hbK.cjs → UnsplashImages-p-WdKs3b.cjs} +1 -1
  23. package/dist/{UploadImages-S1HgxeGb.js → UploadImages-aWG_1r7N.js} +1 -1
  24. package/dist/{UploadImages-PzHdEKHT.cjs → UploadImages-zk-IYDx8.cjs} +1 -1
  25. package/dist/{add-page-modal-2P5hGXOQ.js → add-page-modal-7djj9GZj.js} +12 -12
  26. package/dist/{add-page-modal-GAizM2Jw.cjs → add-page-modal-iUffBbAe.cjs} +1 -1
  27. package/dist/{confirm-alert-57Xq5foA.js → confirm-alert-QuqMrpWn.js} +1 -1
  28. package/dist/{confirm-alert-Uf84DpdR.cjs → confirm-alert-i3FRAgP4.cjs} +1 -1
  29. package/dist/core.cjs +1 -1
  30. package/dist/core.d.ts +8 -0
  31. package/dist/core.js +38 -36
  32. package/dist/{delete-page-modal-ix5IjaFW.js → delete-page-modal-DEBiprds.js} +2 -2
  33. package/dist/{delete-page-modal-MG42FdnU.cjs → delete-page-modal-RllDrgxs.cjs} +1 -1
  34. package/dist/email.cjs +1 -1
  35. package/dist/email.js +2 -2
  36. package/dist/{form-SYcFyACJ.js → form-94xR0NG8.js} +1 -1
  37. package/dist/{form-KBb3kA8g.cjs → form-yz7h2msc.cjs} +1 -1
  38. package/dist/{index-pNYv0oAF.js → index-0m8Zuv5X.js} +306 -294
  39. package/dist/{index-Fj3ead-J.js → index-19nTm_cE.js} +2069 -2059
  40. package/dist/{index-aiHDvS5v.cjs → index-TEfD-2ti.cjs} +1 -1
  41. package/dist/{index-cM3eKmlx.cjs → index-XVud0HL8.cjs} +33 -33
  42. package/dist/{page-viewer-Sh99FGYk.cjs → page-viewer-_ktv1pgX.cjs} +1 -1
  43. package/dist/{page-viewer-VxqOevr4.js → page-viewer-xPLhXv6k.js} +3 -3
  44. package/dist/{project-general-setting-nWOjPiin.js → project-general-setting-XlORLtqJ.js} +3 -3
  45. package/dist/{project-general-setting-VTLHa-Ik.cjs → project-general-setting-nULU3Tzw.cjs} +1 -1
  46. package/dist/{project-seo-setting-ENAKc2Dl.cjs → project-seo-setting-9QkARPhg.cjs} +1 -1
  47. package/dist/{project-seo-setting-70bWTwsB.js → project-seo-setting-KQkeHwny.js} +2 -2
  48. package/dist/{single-page-detail-6L38HJC4.cjs → single-page-detail-Gb6O3Yyw.cjs} +1 -1
  49. package/dist/{single-page-detail-3z7TF-Yy.js → single-page-detail-gtVN9hxR.js} +4 -4
  50. package/dist/studio.cjs +1 -1
  51. package/dist/studio.js +2 -2
  52. package/dist/ui.cjs +1 -1
  53. package/dist/ui.js +25 -25
  54. package/dist/{useAddBlockByDrop-7mUMwNSG.cjs → useAddBlockByDrop-GU5QLPtz.cjs} +1 -1
  55. package/dist/{useAddBlockByDrop-tjQ5DgiO.js → useAddBlockByDrop-b5KJh_7w.js} +1 -1
  56. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import * as m from "react";
2
- import et, { createContext as Ms, useContext as Ds, useRef as vr, createElement as yr, useReducer as Es, useEffect as Ce, useDebugValue as Os, useCallback as z, useMemo as Ls, useState as Ee, Suspense as ht } from "react";
2
+ import et, { createContext as Ms, useContext as Ds, useRef as vr, createElement as yr, useReducer as Es, useEffect as Ce, useDebugValue as Os, useCallback as L, useMemo as Ls, useState as Be, Suspense as ht } from "react";
3
3
  import { has as pe, get as F, flatten as ne, filter as M, omit as Oe, isEmpty as ve, isString as Et, find as te, map as R, each as ue, set as Se, includes as q, isUndefined as Nr, without as Ot, forIn as Lt, isObject as zs, first as Q, noop as Vs, keys as $s, startsWith as zt, isNull as qe, pick as vt, sortBy as yt } from "lodash-es";
4
4
  import { g as ce, a as Fs } from "./Functions-7jnEwJyw.js";
5
5
  import { getBlockComponent as Le } from "@chaibuilder/runtime";
6
- import { atom as w, useAtomValue as X, useAtom as D, useSetAtom as Be } from "jotai";
6
+ import { atom as w, useAtomValue as X, useAtom as D, useSetAtom as _e } from "jotai";
7
7
  import Vt from "flat-to-nested";
8
8
  import { a as me, I as $t, S as Ke, B as Je } from "./MODIFIERS-RiXS5Mn1.js";
9
9
  import { g as Us } from "./_commonjsHelpers-UyOWmZb0.js";
@@ -11,7 +11,7 @@ import { useThrottledCallback as Ws } from "@react-hookz/web";
11
11
  import { j as a } from "./jsx-runtime-WbnYoNE9.js";
12
12
  import * as Ft from "@radix-ui/react-toggle";
13
13
  import { cva as ge } from "class-variance-authority";
14
- import { a as d, c as Pe } from "./Class-17XFhL48.js";
14
+ import { a as d, c as Ie } from "./Class-17XFhL48.js";
15
15
  import * as Ye from "@radix-ui/react-switch";
16
16
  import { Slot as Gs } from "@radix-ui/react-slot";
17
17
  import * as fe from "@radix-ui/react-accordion";
@@ -25,7 +25,7 @@ import * as ye from "@radix-ui/react-tooltip";
25
25
  import * as Ae from "@radix-ui/react-popover";
26
26
  import * as C from "@radix-ui/react-menubar";
27
27
  import * as Ve from "@radix-ui/react-hover-card";
28
- import * as L from "@radix-ui/react-select";
28
+ import * as z from "@radix-ui/react-select";
29
29
  import * as T from "@radix-ui/react-dropdown-menu";
30
30
  import * as Wt from "@radix-ui/react-separator";
31
31
  import * as Y from "@radix-ui/react-toast";
@@ -46,17 +46,17 @@ function oe(e, t) {
46
46
  typeof r == "function" ? r(n(o)) : r
47
47
  )), t && (o.write = t), o;
48
48
  }
49
- const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new WeakMap(), eo = (e, t) => {
50
- De.set(e, t), e.catch(() => {
51
- }).finally(() => De.delete(e));
49
+ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new WeakMap(), eo = (e, t) => {
50
+ Ee.set(e, t), e.catch(() => {
51
+ }).finally(() => Ee.delete(e));
52
52
  }, wt = (e, t) => {
53
- const s = De.get(e);
54
- s && (De.delete(e), s(t));
53
+ const s = Ee.get(e);
54
+ s && (Ee.delete(e), s(t));
55
55
  }, Nt = (e, t) => {
56
56
  e.status = "fulfilled", e.value = t;
57
57
  }, kt = (e, t) => {
58
58
  e.status = "rejected", e.reason = t;
59
- }, to = (e) => typeof (e == null ? void 0 : e.then) == "function", Ne = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), jt = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), he = (e) => "v" in e && e.v instanceof Promise, so = (e, t) => "v" in e && "v" in t && e.v.orig && e.v.orig === t.v.orig, Te = (e) => {
59
+ }, to = (e) => typeof (e == null ? void 0 : e.then) == "function", Ne = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), jt = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), he = (e) => "v" in e && e.v instanceof Promise, so = (e, t) => "v" in e && "v" in t && e.v.orig && e.v.orig === t.v.orig, Pe = (e) => {
60
60
  if ("e" in e)
61
61
  throw e.e;
62
62
  return e.v;
@@ -74,8 +74,8 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
74
74
  }, p = (u, g, v) => {
75
75
  const b = /* @__PURE__ */ new Map();
76
76
  let y = !1;
77
- v.forEach((h, k) => {
78
- !h && k === u && (h = g), h ? (b.set(k, h), g.d.get(k) !== h && (y = !0)) : (V ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
77
+ v.forEach((h, j) => {
78
+ !h && j === u && (h = g), h ? (b.set(j, h), g.d.get(j) !== h && (y = !0)) : (V ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
79
79
  }), (y || g.d.size !== b.size) && (g.d = b);
80
80
  }, l = (u, g, v) => {
81
81
  const b = r(u), y = {
@@ -93,7 +93,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
93
93
  }, f = (u, g, v, b) => {
94
94
  if (to(g)) {
95
95
  let y;
96
- const h = new Promise((k, E) => {
96
+ const h = new Promise((j, E) => {
97
97
  let S = !1;
98
98
  g.then(
99
99
  (B) => {
@@ -104,7 +104,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
104
104
  h,
105
105
  v
106
106
  );
107
- Nt(h, B), k(B), (A == null ? void 0 : A.d) !== ee.d && J(u, ee, A == null ? void 0 : A.d);
107
+ Nt(h, B), j(B), (A == null ? void 0 : A.d) !== ee.d && J(u, ee, A == null ? void 0 : A.d);
108
108
  }
109
109
  },
110
110
  (B) => {
@@ -122,11 +122,11 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
122
122
  S || (S = !0, B.then(
123
123
  (A) => Nt(h, A),
124
124
  (A) => kt(h, A)
125
- ), k(B));
125
+ ), j(B));
126
126
  };
127
127
  });
128
- return h.orig = g, h.status = "pending", eo(h, (k) => {
129
- k && y(k), b == null || b();
128
+ return h.orig = g, h.status = "pending", eo(h, (j) => {
129
+ j && y(j), b == null || b();
130
130
  }), l(u, h, v);
131
131
  }
132
132
  return l(u, g, v);
@@ -152,24 +152,24 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
152
152
  if (S === u) {
153
153
  const A = r(S);
154
154
  if (A)
155
- return v.set(S, A), Te(A);
155
+ return v.set(S, A), Pe(A);
156
156
  if (Fe(S))
157
157
  return v.set(S, void 0), S.init;
158
158
  throw new Error("no atom init");
159
159
  }
160
160
  const B = N(S);
161
- return v.set(S, B), Te(B);
161
+ return v.set(S, B), Pe(B);
162
162
  };
163
- let h, k;
163
+ let h, j;
164
164
  const E = {
165
165
  get signal() {
166
166
  return h || (h = new AbortController()), h.signal;
167
167
  },
168
168
  get setSelf() {
169
- return (V ? "production" : void 0) !== "production" && !Ue(u) && console.warn("setSelf function cannot be used with read-only atom"), !k && Ue(u) && (k = (...S) => {
169
+ return (V ? "production" : void 0) !== "production" && !Ue(u) && console.warn("setSelf function cannot be used with read-only atom"), !j && Ue(u) && (j = (...S) => {
170
170
  if ((V ? "production" : void 0) !== "production" && b && console.warn("setSelf function cannot be called in sync"), !b)
171
171
  return $(u, ...S);
172
- }), k;
172
+ }), j;
173
173
  }
174
174
  };
175
175
  try {
@@ -185,7 +185,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
185
185
  } finally {
186
186
  b = !1;
187
187
  }
188
- }, j = (u) => Te(N(u)), I = (u) => {
188
+ }, k = (u) => Pe(N(u)), I = (u) => {
189
189
  let g = t.get(u);
190
190
  return g || (g = Z(u)), g;
191
191
  }, O = (u, g) => !g.l.size && (!g.t.size || g.t.size === 1 && g.t.has(u)), W = (u) => {
@@ -193,8 +193,8 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
193
193
  g && O(u, g) && le(u);
194
194
  }, G = (u) => {
195
195
  const g = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new WeakMap(), b = (h) => {
196
- const k = t.get(h);
197
- k == null || k.t.forEach((E) => {
196
+ const j = t.get(h);
197
+ j == null || j.t.forEach((E) => {
198
198
  E !== h && (g.set(
199
199
  E,
200
200
  (g.get(E) || /* @__PURE__ */ new Set()).add(h)
@@ -203,8 +203,8 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
203
203
  };
204
204
  b(u);
205
205
  const y = (h) => {
206
- const k = t.get(h);
207
- k == null || k.t.forEach((E) => {
206
+ const j = t.get(h);
207
+ j == null || j.t.forEach((E) => {
208
208
  var S;
209
209
  if (E !== h) {
210
210
  let B = v.get(E);
@@ -223,15 +223,15 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
223
223
  y(u);
224
224
  }, H = (u, ...g) => {
225
225
  let v = !0;
226
- const b = (k) => Te(N(k)), y = (k, ...E) => {
226
+ const b = (j) => Pe(N(j)), y = (j, ...E) => {
227
227
  let S;
228
- if (k === u) {
229
- if (!Fe(k))
228
+ if (j === u) {
229
+ if (!Fe(j))
230
230
  throw new Error("atom not writable");
231
- const B = r(k), A = f(k, E[0]);
232
- (!B || !Ne(B, A)) && G(k);
231
+ const B = r(j), A = f(j, E[0]);
232
+ (!B || !Ne(B, A)) && G(j);
233
233
  } else
234
- S = H(k, ...E);
234
+ S = H(j, ...E);
235
235
  if (!v) {
236
236
  const B = ae();
237
237
  (V ? "production" : void 0) !== "production" && n.forEach(
@@ -266,8 +266,8 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
266
266
  const b = r(u);
267
267
  b ? (he(b) && wt(b.v), b.d.forEach((y, h) => {
268
268
  if (h !== u) {
269
- const k = t.get(h);
270
- k && (k.t.delete(u), O(h, k) && le(h));
269
+ const j = t.get(h);
270
+ j && (j.t.delete(u), O(h, j) && le(h));
271
271
  }
272
272
  })) : (V ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", u);
273
273
  }, J = (u, g, v) => {
@@ -277,8 +277,8 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
277
277
  b.delete(h);
278
278
  return;
279
279
  }
280
- const k = t.get(h);
281
- k && (k.t.delete(u), O(h, k) && le(h));
280
+ const j = t.get(h);
281
+ j && (j.t.delete(u), O(h, j) && le(h));
282
282
  }), b.forEach((y) => {
283
283
  const h = t.get(y);
284
284
  h ? h.t.add(u) : t.has(u) && Z(y, u);
@@ -294,7 +294,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
294
294
  const h = t.get(v);
295
295
  h && !// TODO This seems pretty hacky. Hope to fix it.
296
296
  // Maybe we could `mountDependencies` in `setAtomState`?
297
- (b && !he(b) && (Ne(b, y) || jt(b, y))) && (h.l.forEach((k) => k()), (V ? "production" : void 0) !== "production" && u.add(v));
297
+ (b && !he(b) && (Ne(b, y) || jt(b, y))) && (h.l.forEach((j) => j()), (V ? "production" : void 0) !== "production" && u.add(v));
298
298
  } else
299
299
  (V ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
300
300
  });
@@ -310,7 +310,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
310
310
  };
311
311
  };
312
312
  return (V ? "production" : void 0) !== "production" ? {
313
- get: j,
313
+ get: k,
314
314
  set: $,
315
315
  sub: re,
316
316
  // store dev methods (these are tentative and subject to change without notice)
@@ -333,7 +333,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, De = /* @__PURE__ */ new W
333
333
  );
334
334
  }
335
335
  } : {
336
- get: j,
336
+ get: k,
337
337
  set: $,
338
338
  sub: re
339
339
  };
@@ -384,7 +384,7 @@ function co(e, t) {
384
384
  }
385
385
  function uo(e, t) {
386
386
  const s = Gt(t);
387
- return z(
387
+ return L(
388
388
  (...n) => {
389
389
  if ((ao ? "production" : void 0) !== "production" && !("write" in e))
390
390
  throw new Error("not writable atom");
@@ -414,12 +414,12 @@ function bo(e, t) {
414
414
  if (p)
415
415
  return p;
416
416
  const l = c && s.get(c), f = [], x = [];
417
- return r.forEach((N, j) => {
418
- const I = t ? t(N) : j;
419
- x[j] = I;
417
+ return r.forEach((N, k) => {
418
+ const I = t ? t(N) : k;
419
+ x[k] = I;
420
420
  const O = l && l.atomList[l.keyList.indexOf(I)];
421
421
  if (O) {
422
- f[j] = O;
422
+ f[k] = O;
423
423
  return;
424
424
  }
425
425
  const W = (H) => {
@@ -442,8 +442,8 @@ function bo(e, t) {
442
442
  ...J.slice(re + 1)
443
443
  ]);
444
444
  };
445
- f[j] = At(e) ? oe(W, G) : oe(W);
446
- }), l && l.keyList.length === x.length && l.keyList.every((N, j) => N === x[j]) ? p = l : p = { arr: r, atomList: f, keyList: x }, s.set(r, p), p;
445
+ f[k] = At(e) ? oe(W, G) : oe(W);
446
+ }), l && l.keyList.length === x.length && l.keyList.every((N, k) => N === x[k]) ? p = l : p = { arr: r, atomList: f, keyList: x }, s.set(r, p), p;
447
447
  }, n = oe((r) => {
448
448
  const c = r(n), p = r(e);
449
449
  return o(p, c == null ? void 0 : c.arr);
@@ -574,7 +574,7 @@ function ho(e) {
574
574
  const vo = ho(
575
575
  () => typeof window < "u" ? window.localStorage : void 0
576
576
  );
577
- function _e(e, t, s = vo, o) {
577
+ function Re(e, t, s = vo, o) {
578
578
  const n = o == null ? void 0 : o.unstable_getOnInit, i = oe(
579
579
  n ? s.getItem(e, t) : t
580
580
  );
@@ -704,14 +704,14 @@ const Zt = w(() => !1);
704
704
  Zt.debugLabel = "selectedBlockGridChildAtom";
705
705
  const ct = w("");
706
706
  ct.debugLabel = "styleStateAtom";
707
- const es = _e("styleBreakpoint", "xs");
707
+ const es = Re("styleBreakpoint", "xs");
708
708
  es.debugLabel = "styleBreakpointAtom";
709
709
  const Hr = () => ({
710
710
  flexChild: X(Xt),
711
711
  gridChild: X(Zt)
712
712
  }), qr = () => X(lt);
713
713
  const $e = () => {
714
- const [e, t] = D(rt), s = z(
714
+ const [e, t] = D(rt), s = L(
715
715
  (o) => {
716
716
  t((n) => q(n, o) ? Ot(n, o) : [...n, o]);
717
717
  },
@@ -985,7 +985,7 @@ function Fo(e) {
985
985
  }
986
986
  const Uo = () => {
987
987
  const [e] = Oo(), { currentPage: t } = zo(), [s] = we();
988
- return z(() => {
988
+ return L(() => {
989
989
  const o = R(
990
990
  s,
991
991
  (r) => Oe(r, ["expanded", "order", "title", "siblings", "tempClasses"])
@@ -1039,7 +1039,7 @@ const is = () => {
1039
1039
  return ve(s) ? o : pt(o, s);
1040
1040
  }, Qr = () => {
1041
1041
  const [e] = we(), [t, s] = $e(), { setNewBlocks: o } = xe();
1042
- return z(
1042
+ return L(
1043
1043
  (n) => {
1044
1044
  var r;
1045
1045
  const i = ((r = te(e, { _id: n[0] })) == null ? void 0 : r._parent) || null;
@@ -1096,10 +1096,10 @@ const Ho = () => {
1096
1096
  updateBlocksProps: i
1097
1097
  } = Ho();
1098
1098
  return {
1099
- addBlocks: (x, N, j) => {
1100
- o(x, N, j), e({
1099
+ addBlocks: (x, N, k) => {
1100
+ o(x, N, k), e({
1101
1101
  undo: () => n(R(x, "_id")),
1102
- redo: () => o(x, N, j)
1102
+ redo: () => o(x, N, k)
1103
1103
  });
1104
1104
  },
1105
1105
  removeBlocks: (x) => {
@@ -1110,10 +1110,10 @@ const Ho = () => {
1110
1110
  redo: () => n(R(x, "_id"))
1111
1111
  });
1112
1112
  },
1113
- updateBlocks: (x, N, j) => {
1113
+ updateBlocks: (x, N, k) => {
1114
1114
  let I = [];
1115
- if (j)
1116
- I = R(x, (O) => ({ _id: O, ...j }));
1115
+ if (k)
1116
+ I = R(x, (O) => ({ _id: O, ...k }));
1117
1117
  else {
1118
1118
  const O = $s(N);
1119
1119
  I = R(x, (W) => {
@@ -1127,7 +1127,7 @@ const Ho = () => {
1127
1127
  });
1128
1128
  },
1129
1129
  updateBlocksRuntime: (x, N) => {
1130
- i(R(x, (j) => ({ _id: j, ...N })));
1130
+ i(R(x, (k) => ({ _id: k, ...N })));
1131
1131
  },
1132
1132
  setNewBlocks: (x) => {
1133
1133
  s(x), e({
@@ -1648,8 +1648,8 @@ const fi = Ve.Root, pi = Ve.Trigger, Un = m.forwardRef(({ className: e, align: t
1648
1648
  }
1649
1649
  ));
1650
1650
  Un.displayName = Ve.Content.displayName;
1651
- const gi = L.Root, bi = L.Group, xi = L.Value, Wn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
1652
- L.Trigger,
1651
+ const gi = z.Root, bi = z.Group, xi = z.Value, Wn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
1652
+ z.Trigger,
1653
1653
  {
1654
1654
  ref: o,
1655
1655
  className: d(
@@ -1659,13 +1659,13 @@ const gi = L.Root, bi = L.Group, xi = L.Value, Wn = m.forwardRef(({ className: e
1659
1659
  ...s,
1660
1660
  children: [
1661
1661
  t,
1662
- /* @__PURE__ */ a.jsx(L.Icon, { asChild: !0, children: /* @__PURE__ */ a.jsx(qs, { className: "h-4 w-4 opacity-50" }) })
1662
+ /* @__PURE__ */ a.jsx(z.Icon, { asChild: !0, children: /* @__PURE__ */ a.jsx(qs, { className: "h-4 w-4 opacity-50" }) })
1663
1663
  ]
1664
1664
  }
1665
1665
  ));
1666
- Wn.displayName = L.Trigger.displayName;
1667
- const Gn = m.forwardRef(({ className: e, children: t, position: s = "popper", ...o }, n) => /* @__PURE__ */ a.jsx(L.Portal, { children: /* @__PURE__ */ a.jsx(
1668
- L.Content,
1666
+ Wn.displayName = z.Trigger.displayName;
1667
+ const Gn = m.forwardRef(({ className: e, children: t, position: s = "popper", ...o }, n) => /* @__PURE__ */ a.jsx(z.Portal, { children: /* @__PURE__ */ a.jsx(
1668
+ z.Content,
1669
1669
  {
1670
1670
  ref: n,
1671
1671
  className: d(
@@ -1676,7 +1676,7 @@ const Gn = m.forwardRef(({ className: e, children: t, position: s = "popper", ..
1676
1676
  position: s,
1677
1677
  ...o,
1678
1678
  children: /* @__PURE__ */ a.jsx(
1679
- L.Viewport,
1679
+ z.Viewport,
1680
1680
  {
1681
1681
  className: d(
1682
1682
  "p-1",
@@ -1687,11 +1687,11 @@ const Gn = m.forwardRef(({ className: e, children: t, position: s = "popper", ..
1687
1687
  )
1688
1688
  }
1689
1689
  ) }));
1690
- Gn.displayName = L.Content.displayName;
1691
- const Hn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(L.Label, { ref: s, className: d("px-2 py-1.5 text-sm font-semibold", e), ...t }));
1692
- Hn.displayName = L.Label.displayName;
1690
+ Gn.displayName = z.Content.displayName;
1691
+ const Hn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(z.Label, { ref: s, className: d("px-2 py-1.5 text-sm font-semibold", e), ...t }));
1692
+ Hn.displayName = z.Label.displayName;
1693
1693
  const qn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
1694
- L.Item,
1694
+ z.Item,
1695
1695
  {
1696
1696
  ref: o,
1697
1697
  className: d(
@@ -1700,14 +1700,14 @@ const qn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
1700
1700
  ),
1701
1701
  ...s,
1702
1702
  children: [
1703
- /* @__PURE__ */ a.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(L.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
1704
- /* @__PURE__ */ a.jsx(L.ItemText, { children: t })
1703
+ /* @__PURE__ */ a.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(z.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
1704
+ /* @__PURE__ */ a.jsx(z.ItemText, { children: t })
1705
1705
  ]
1706
1706
  }
1707
1707
  ));
1708
- qn.displayName = L.Item.displayName;
1709
- const Kn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(L.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
1710
- Kn.displayName = L.Separator.displayName;
1708
+ qn.displayName = z.Item.displayName;
1709
+ const Kn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(z.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
1710
+ Kn.displayName = z.Separator.displayName;
1711
1711
  const hi = _.Root, vi = _.Trigger, yi = _.Close, gs = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(_.Portal, { className: d(e), ...t });
1712
1712
  gs.displayName = _.Portal.displayName;
1713
1713
  const bs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
@@ -1921,11 +1921,11 @@ const He = /* @__PURE__ */ new Map(), Rt = (e) => {
1921
1921
  toasts: e.toasts.filter((s) => s.id !== t.toastId)
1922
1922
  };
1923
1923
  }
1924
- }, Ie = [];
1925
- let Me = { toasts: [] };
1924
+ }, Me = [];
1925
+ let De = { toasts: [] };
1926
1926
  function je(e) {
1927
- Me = pa(Me, e), Ie.forEach((t) => {
1928
- t(Me);
1927
+ De = pa(De, e), Me.forEach((t) => {
1928
+ t(De);
1929
1929
  });
1930
1930
  }
1931
1931
  function ga({ ...e }) {
@@ -1950,10 +1950,10 @@ function ga({ ...e }) {
1950
1950
  };
1951
1951
  }
1952
1952
  function xs() {
1953
- const [e, t] = m.useState(Me);
1954
- return m.useEffect(() => (Ie.push(t), () => {
1955
- const s = Ie.indexOf(t);
1956
- s > -1 && Ie.splice(s, 1);
1953
+ const [e, t] = m.useState(De);
1954
+ return m.useEffect(() => (Me.push(t), () => {
1955
+ const s = Me.indexOf(t);
1956
+ s > -1 && Me.splice(s, 1);
1957
1957
  }), [e]), {
1958
1958
  ...e,
1959
1959
  toast: ga,
@@ -2262,12 +2262,12 @@ const Da = (e) => {
2262
2262
  }
2263
2263
  )
2264
2264
  ] });
2265
- }, Ea = et.lazy(() => import("./UnsplashImages-GhBD6owT.js")), Oa = et.lazy(() => import("./UploadImages-S1HgxeGb.js")), js = ({
2265
+ }, Ea = et.lazy(() => import("./UnsplashImages-Lb78FYx7.js")), Oa = et.lazy(() => import("./UploadImages-aWG_1r7N.js")), js = ({
2266
2266
  isModalView: e = !1,
2267
2267
  onSelect: t = () => {
2268
2268
  }
2269
2269
  }) => {
2270
- const [s, o] = Ee("upload");
2270
+ const [s, o] = Be("upload");
2271
2271
  return /* @__PURE__ */ a.jsxs("div", { className: "flex h-full flex-col", children: [
2272
2272
  /* @__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" }) }),
2273
2273
  /* @__PURE__ */ a.jsxs(_n, { value: s, onValueChange: (n) => o(n), className: "flex h-full w-full flex-col py-2", children: [
@@ -2282,7 +2282,7 @@ const Da = (e) => {
2282
2282
  __proto__: null,
2283
2283
  default: js
2284
2284
  }, Symbol.toStringTag, { value: "Module" })), Tt = ({ children: e, onSelect: t }) => {
2285
- const [s, o] = Ee(!1), n = (...i) => {
2285
+ const [s, o] = Be(!1), n = (...i) => {
2286
2286
  t.call(void 0, ...i), o(!1);
2287
2287
  };
2288
2288
  return /* @__PURE__ */ a.jsxs(ds, { open: s, onOpenChange: (i) => o(i), children: [
@@ -2343,7 +2343,7 @@ const Da = (e) => {
2343
2343
  }
2344
2344
  );
2345
2345
  }, Vi = ({ schema: e, formData: t, onChange: s }) => {
2346
- const [o, n] = Ee([]), i = ke("getPages", () => []), { type: r = "page", href: c = "", target: p = "self" } = t;
2346
+ const [o, n] = Be([]), i = ke("getPages", () => []), { type: r = "page", href: c = "", target: p = "self" } = t;
2347
2347
  return Ce(() => {
2348
2348
  (async () => {
2349
2349
  const l = await i();
@@ -2396,9 +2396,9 @@ const Da = (e) => {
2396
2396
  ] })
2397
2397
  ] });
2398
2398
  }, $i = () => {
2399
- const [e] = we(), [, t] = $e(), { addBlocks: s } = xe(), { toast: o } = xs(), n = z(
2399
+ const [e] = we(), [, t] = $e(), { addBlocks: s } = xe(), { toast: o } = xs(), n = L(
2400
2400
  (r, c, p) => {
2401
- var j;
2401
+ var k;
2402
2402
  for (let I = 0; I < r.length; I++) {
2403
2403
  const { _id: O } = r[I];
2404
2404
  r[I]._id = ce();
@@ -2408,11 +2408,11 @@ const Da = (e) => {
2408
2408
  }
2409
2409
  const l = Q(r);
2410
2410
  let f, x;
2411
- return c && (f = te(e, { _id: c }), r[0]._parent = c, x = c), !(f ? Ct(f._type, l._type) : !0) && f && (r[0]._parent = f._parent, x = f._parent), s(r, x, p), t([(j = Q(r)) == null ? void 0 : j._id]), Q(r);
2411
+ return c && (f = te(e, { _id: c }), r[0]._parent = c, x = c), !(f ? Ct(f._type, l._type) : !0) && f && (r[0]._parent = f._parent, x = f._parent), s(r, x, p), t([(k = Q(r)) == null ? void 0 : k._id]), Q(r);
2412
2412
  },
2413
2413
  [e, t]
2414
2414
  );
2415
- return { addCoreBlock: z(
2415
+ return { addCoreBlock: L(
2416
2416
  (r, c, p) => {
2417
2417
  if (pe(r, "blocks")) {
2418
2418
  const G = r.blocks;
@@ -2437,16 +2437,16 @@ const Da = (e) => {
2437
2437
  _id: l,
2438
2438
  ...f
2439
2439
  };
2440
- let j, I;
2441
- if (c && (j = te(e, { _id: c }), N._parent = c, I = c), !Kt(j == null ? void 0 : j._type, r.type)) {
2440
+ let k, I;
2441
+ if (c && (k = te(e, { _id: c }), N._parent = c, I = c), !Kt(k == null ? void 0 : k._type, r.type)) {
2442
2442
  o({
2443
2443
  variant: "destructive",
2444
2444
  title: "Error",
2445
- description: `"${r.type}" cannot be added under "${j._type}"`
2445
+ description: `"${r.type}" cannot be added under "${k ? k == null ? void 0 : k._type : "root"}"`
2446
2446
  });
2447
2447
  return;
2448
2448
  }
2449
- !(j ? Ct(j._type, r.type) : !0) && j && (N._parent = j._parent, I = j._parent);
2449
+ !(k ? Ct(k._type, r.type) : !0) && k && (N._parent = k._parent, I = k._parent);
2450
2450
  const W = [N, ...x];
2451
2451
  return s(W, I, p), t([N._id]), N;
2452
2452
  },
@@ -2484,16 +2484,16 @@ const Mt = [];
2484
2484
  function za(e = "", t = "", s = []) {
2485
2485
  e = e.trim().replace(/ +/g, "");
2486
2486
  let o = M(
2487
- R(e.split(" "), Pe),
2487
+ R(e.split(" "), Ie),
2488
2488
  (l) => !qe(l)
2489
- ), n = M(R(t.split(" "), Pe), (l) => !qe(l));
2489
+ ), n = M(R(t.split(" "), Ie), (l) => !qe(l));
2490
2490
  n = M(
2491
2491
  n,
2492
2492
  (l) => !q(Mt, l.property)
2493
2493
  );
2494
2494
  const i = [], r = [];
2495
2495
  ue(s, (l) => {
2496
- const f = Pe(l), x = te(o, vt(f, ["dark", "mq", "mod", "property"]));
2496
+ const f = Ie(l), x = te(o, vt(f, ["dark", "mq", "mod", "property"]));
2497
2497
  if (x && (o = M(
2498
2498
  o,
2499
2499
  (N) => N.fullCls !== (x == null ? void 0 : x.fullCls)
@@ -2501,7 +2501,7 @@ function za(e = "", t = "", s = []) {
2501
2501
  const N = te(n, vt(f, ["property"]));
2502
2502
  x && (n = M(
2503
2503
  n,
2504
- (j) => j.fullCls !== (N == null ? void 0 : N.fullCls)
2504
+ (k) => k.fullCls !== (N == null ? void 0 : N.fullCls)
2505
2505
  )), r.push({
2506
2506
  ...f,
2507
2507
  fullCls: f.cls,
@@ -2518,9 +2518,9 @@ function za(e = "", t = "", s = []) {
2518
2518
  "fullCls"
2519
2519
  ).join(" ").trim()},${c.trim()}`.trim().replace(/ +/g, "");
2520
2520
  }
2521
- const Re = w([]);
2522
- Re.debugLabel = "selectedStylingBlocksAtom";
2523
- const Va = () => D(Re), $a = (e) => {
2521
+ const Te = w([]);
2522
+ Te.debugLabel = "selectedStylingBlocksAtom";
2523
+ const Va = () => D(Te), $a = (e) => {
2524
2524
  const t = e.replace(me, "").split(",");
2525
2525
  return { baseClasses: t[0], classes: t[1] };
2526
2526
  }, Fa = w(null, (e, t, { blockIds: s, newClasses: o }) => {
@@ -2530,7 +2530,7 @@ const Va = () => D(Re), $a = (e) => {
2530
2530
  // @ts-ignore
2531
2531
  s.includes(e(r)._id)
2532
2532
  )
2533
- ), i = Q(e(Re));
2533
+ ), i = Q(e(Te));
2534
2534
  return R(n, (r) => {
2535
2535
  const c = e(r), p = F(c, i.prop, `${me},`), { baseClasses: l, classes: f } = $a(p);
2536
2536
  return {
@@ -2539,8 +2539,8 @@ const Va = () => D(Re), $a = (e) => {
2539
2539
  };
2540
2540
  });
2541
2541
  }), Fi = () => {
2542
- const e = Be(Fa), { updateBlocks: t, updateBlocksRuntime: s } = xe();
2543
- return z(
2542
+ const e = _e(Fa), { updateBlocks: t, updateBlocksRuntime: s } = xe();
2543
+ return L(
2544
2544
  (o, n, i = !1) => {
2545
2545
  const r = e({ blockIds: o, newClasses: n });
2546
2546
  if (!i) {
@@ -2551,7 +2551,7 @@ const Va = () => D(Re), $a = (e) => {
2551
2551
  },
2552
2552
  [e]
2553
2553
  );
2554
- }, Ua = () => D(es), Ss = _e("canvasWidth", 800), As = w((e) => {
2554
+ }, Ua = () => D(es), Ss = Re("canvasWidth", 800), As = w((e) => {
2555
2555
  const t = e(Ss);
2556
2556
  return Fs(t).toLowerCase();
2557
2557
  }), Ui = () => {
@@ -2559,8 +2559,8 @@ const Va = () => D(Re), $a = (e) => {
2559
2559
  return Ce(() => {
2560
2560
  o !== "xs" && n(s);
2561
2561
  }, [s, o, n]), [e, s, t];
2562
- }, Wa = _e("canvasZoom", 100), Wi = () => D(Wa), Cs = w([]), Ga = () => {
2563
- const [e, t] = D(Cs), s = Be(xt), o = z(
2562
+ }, Wa = Re("canvasZoom", 100), Wi = () => D(Wa), Cs = w([]), Ga = () => {
2563
+ const [e, t] = D(Cs), s = _e(xt), o = L(
2564
2564
  (n) => {
2565
2565
  t(n), s([]);
2566
2566
  },
@@ -2568,19 +2568,19 @@ const Va = () => D(Re), $a = (e) => {
2568
2568
  );
2569
2569
  return [e, o];
2570
2570
  }, xt = w([]), Gi = () => {
2571
- const [e, t] = D(xt), s = Be(Cs), o = z(
2571
+ const [e, t] = D(xt), s = _e(Cs), o = L(
2572
2572
  (n) => {
2573
2573
  t(n), s([]);
2574
2574
  },
2575
2575
  [t, s]
2576
2576
  );
2577
2577
  return [e, o];
2578
- }, Bs = _e("darkMode", !1), Hi = () => {
2578
+ }, Bs = Re("darkMode", !1), Hi = () => {
2579
2579
  const [e, t] = D(Bs);
2580
2580
  return [e, t];
2581
2581
  }, Ha = () => {
2582
2582
  const [e] = we(), [, t] = $e(), { addBlocks: s } = xe();
2583
- return z(
2583
+ return L(
2584
2584
  (o, n = null) => {
2585
2585
  const i = [];
2586
2586
  ue(o, (r) => {
@@ -2596,7 +2596,7 @@ const Va = () => D(Re), $a = (e) => {
2596
2596
  [e, t]
2597
2597
  );
2598
2598
  }, qa = w([]), qi = () => {
2599
- const [e, t] = D(qa), s = z(
2599
+ const [e, t] = D(qa), s = L(
2600
2600
  (o) => {
2601
2601
  t((n) => q(n, o) ? Ot(n, o) : [...n, o]);
2602
2602
  },
@@ -2605,7 +2605,7 @@ const Va = () => D(Re), $a = (e) => {
2605
2605
  return [e, t, s];
2606
2606
  }, Ka = w(""), Ja = () => D(Ka), Ya = () => {
2607
2607
  const e = X(ie);
2608
- return z(
2608
+ return L(
2609
2609
  (t, s) => {
2610
2610
  const o = R(e, (n) => (q(t, F(n, "_id")) && Se(n, "_parent", s), n));
2611
2611
  console.log("newBlocks", o);
@@ -2620,7 +2620,7 @@ const Va = () => D(Re), $a = (e) => {
2620
2620
  () => t.length > 0 || e.length > 0,
2621
2621
  [e, t]
2622
2622
  ),
2623
- pasteBlocks: z(
2623
+ pasteBlocks: L(
2624
2624
  (r) => {
2625
2625
  ve(e) ? n(t, r) : o(e, r), s(() => []);
2626
2626
  },
@@ -2631,7 +2631,7 @@ const Va = () => D(Re), $a = (e) => {
2631
2631
  const [e, t] = D(Qa);
2632
2632
  return [e, t];
2633
2633
  }, Xa = w(null, (e, t, { blockIds: s, fullClasses: o }) => {
2634
- const n = Q(e(Re)), i = M(
2634
+ const n = Q(e(Te)), i = M(
2635
2635
  e(at),
2636
2636
  (r) => (
2637
2637
  // @ts-ignore
@@ -2644,8 +2644,8 @@ const Va = () => D(Re), $a = (e) => {
2644
2644
  return ue(p, (x) => {
2645
2645
  const N = new RegExp(`(^| )${x.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
2646
2646
  l = l.replace(N, " ").replace(/ +/g, " ").trim();
2647
- const j = Q(x.split(":"));
2648
- q(["2xl", "xl", "lg", "md", "sm"], j) && p.push(x.split(":").pop().trim());
2647
+ const k = Q(x.split(":"));
2648
+ q(["2xl", "xl", "lg", "md", "sm"], k) && p.push(x.split(":").pop().trim());
2649
2649
  }), ue(p, (x) => {
2650
2650
  const N = new RegExp(`(^| )${x.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
2651
2651
  f = f.replace(N, " ").replace(/ +/g, " ").trim();
@@ -2657,8 +2657,8 @@ const Va = () => D(Re), $a = (e) => {
2657
2657
  };
2658
2658
  });
2659
2659
  }), Yi = () => {
2660
- const { updateBlocks: e } = xe(), t = Be(Xa);
2661
- return z(
2660
+ const { updateBlocks: e } = xe(), t = _e(Xa);
2661
+ return L(
2662
2662
  (s, o) => {
2663
2663
  const n = t({ blockIds: s, fullClasses: o });
2664
2664
  e(s, n[0].props);
@@ -2666,11 +2666,11 @@ const Va = () => D(Re), $a = (e) => {
2666
2666
  [t]
2667
2667
  );
2668
2668
  }, _s = w((e) => {
2669
- const t = Q(e(Re)), s = e(lt);
2669
+ const t = Q(e(Te)), s = e(lt);
2670
2670
  if (!t || t.blockId !== F(s, "_id", null))
2671
2671
  return [];
2672
2672
  const n = F(s, t.prop, `${me},`).replace(me, "").split(",").join(" ");
2673
- return M(R(n.trim().split(" "), Pe), (i) => !qe(i));
2673
+ return M(R(n.trim().split(" "), Ie), (i) => !qe(i));
2674
2674
  }), Qi = () => X(_s), Dt = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, Za = w((e) => {
2675
2675
  const t = e(As), s = e(ct), o = e(Bs), n = er(t);
2676
2676
  let i = M(e(_s), { mod: s });
@@ -2703,7 +2703,7 @@ const Va = () => D(Re), $a = (e) => {
2703
2703
  return t;
2704
2704
  }, Xi = () => X(Za), Zi = () => D(ct), el = () => {
2705
2705
  const { updateBlocks: e } = xe();
2706
- return z(
2706
+ return L(
2707
2707
  (t, s, o) => {
2708
2708
  e(t, s, o);
2709
2709
  },
@@ -2711,7 +2711,7 @@ const Va = () => D(Re), $a = (e) => {
2711
2711
  );
2712
2712
  }, tl = () => {
2713
2713
  const { updateBlocksRuntime: e } = xe();
2714
- return z(
2714
+ return L(
2715
2715
  (t, s) => {
2716
2716
  e(t, s);
2717
2717
  },
@@ -2723,12 +2723,12 @@ const Va = () => D(Re), $a = (e) => {
2723
2723
  modalProps: {},
2724
2724
  backdropClose: !0
2725
2725
  }, tr = w(Rs), sl = () => {
2726
- const [e, t] = D(tr), s = z(
2726
+ const [e, t] = D(tr), s = L(
2727
2727
  (n, i = {}, r = {}) => {
2728
2728
  t({ name: n, props: i, modalProps: r });
2729
2729
  },
2730
2730
  [t]
2731
- ), o = z(
2731
+ ), o = L(
2732
2732
  (...n) => {
2733
2733
  F(e, "props.onClose", () => {
2734
2734
  })(...n), t(Rs);
@@ -2768,22 +2768,33 @@ const mr = w(!1);
2768
2768
  mr.debugLabel = "draggingFlagAtom";
2769
2769
  const fr = w("");
2770
2770
  fr.debugLabel = "draggedBlockIdAtom";
2771
- const nl = () => X(Ts), pr = w(""), gr = w(null), al = () => D(pr), rl = () => D(gr), br = _e("selectedBreakpoints", ["XS", "MD", "XL"]), il = () => {
2771
+ const nl = () => X(Ts), pr = w(""), gr = w(null), al = () => D(pr), rl = () => D(gr), br = Re("selectedBreakpoints", ["XS", "MD", "XL"]), il = () => {
2772
2772
  const [e, t] = D(br);
2773
2773
  return [e, t];
2774
2774
  }, ll = () => {
2775
- const e = Be(Ps), { clear: t } = is(), [, s] = $e(), [, o] = Ja(), [, n] = Va();
2775
+ const e = _e(Ps), { clear: t } = is(), [, s] = $e(), [, o] = Ja(), [, n] = Va();
2776
2776
  return () => {
2777
2777
  s([]), n([]), o(""), t(), e({ undoCount: 0, redoCount: 0 });
2778
2778
  };
2779
2779
  }, xr = w([]), cl = () => {
2780
- const [e, t] = Ee(!1), [s, o] = D(xr), n = ke("getUILibraryBlocks", () => []);
2780
+ const [e, t] = Be(!1), [s, o] = D(xr), n = ke("getUILibraryBlocks", () => []);
2781
2781
  return Ce(() => {
2782
2782
  (async () => s.length > 0 || (t(!0), o(await n()), t(!1)))();
2783
2783
  }, []), { data: s, isLoading: e };
2784
+ }, dl = () => {
2785
+ const [e, t] = Be(null), s = L(async (o) => {
2786
+ if (!(navigator != null && navigator.clipboard))
2787
+ return console.warn("Clipboard not supported"), !1;
2788
+ try {
2789
+ return await navigator.clipboard.writeText(o), t(o), !0;
2790
+ } catch (n) {
2791
+ return console.warn("Copy failed", n), t(null), !1;
2792
+ }
2793
+ }, []);
2794
+ return [e, s];
2784
2795
  };
2785
2796
  export {
2786
- qr as $,
2797
+ Qi as $,
2787
2798
  ei as A,
2788
2799
  Yo as B,
2789
2800
  an as C,
@@ -2799,178 +2810,179 @@ export {
2799
2810
  Ui as M,
2800
2811
  Wi as N,
2801
2812
  Gi as O,
2802
- zo as P,
2803
- Ga as Q,
2804
- Hi as R,
2813
+ dl as P,
2814
+ zo as Q,
2815
+ Ga as R,
2805
2816
  Bi as S,
2806
2817
  oi as T,
2807
- Uo as U,
2808
- qi as V,
2809
- Ja as W,
2810
- Ki as X,
2811
- Yi as Y,
2812
- Xi as Z,
2813
- Qi as _,
2818
+ Hi as U,
2819
+ Uo as V,
2820
+ qi as W,
2821
+ Ja as X,
2822
+ Ki as Y,
2823
+ Yi as Z,
2824
+ Xi as _,
2814
2825
  Vr as a,
2815
- gn as a$,
2816
- Ua as a0,
2817
- cl as a1,
2818
- Zi as a2,
2819
- el as a3,
2820
- tl as a4,
2821
- Hr as a5,
2822
- ol as a6,
2823
- al as a7,
2824
- Yr as a8,
2825
- rl as a9,
2826
- fi as aA,
2827
- pi as aB,
2828
- Un as aC,
2829
- wi as aD,
2830
- Ni as aE,
2831
- oa as aF,
2832
- ia as aG,
2833
- la as aH,
2834
- aa as aI,
2835
- xe as aJ,
2836
- mr as aK,
2837
- ur as aL,
2838
- ar as aM,
2839
- fr as aN,
2840
- Ur as aO,
2841
- Wr as aP,
2842
- or as aQ,
2843
- lr as aR,
2844
- ri as aS,
2845
- ii as aT,
2846
- Tn as aU,
2847
- ks as aV,
2848
- va as aW,
2849
- ya as aX,
2850
- wa as aY,
2851
- Na as aZ,
2852
- ja as a_,
2853
- il as aa,
2854
- Va as ab,
2855
- ds as ac,
2856
- bt as ad,
2857
- pn as ae,
2858
- bn as af,
2859
- xn as ag,
2860
- un as ah,
2861
- gi as ai,
2862
- Wn as aj,
2863
- xi as ak,
2864
- Gn as al,
2865
- qn as am,
2866
- cr as an,
2867
- _n as ao,
2868
- ps as ap,
2869
- Xe as aq,
2870
- Ze as ar,
2871
- bi as as,
2872
- Hn as at,
2873
- ni as au,
2874
- ai as av,
2875
- Rn as aw,
2876
- da as ax,
2877
- An as ay,
2878
- Jo as az,
2826
+ ja as a$,
2827
+ qr as a0,
2828
+ Ua as a1,
2829
+ cl as a2,
2830
+ Zi as a3,
2831
+ el as a4,
2832
+ tl as a5,
2833
+ Hr as a6,
2834
+ ol as a7,
2835
+ al as a8,
2836
+ Yr as a9,
2837
+ Jo as aA,
2838
+ fi as aB,
2839
+ pi as aC,
2840
+ Un as aD,
2841
+ wi as aE,
2842
+ Ni as aF,
2843
+ oa as aG,
2844
+ ia as aH,
2845
+ la as aI,
2846
+ aa as aJ,
2847
+ xe as aK,
2848
+ mr as aL,
2849
+ ur as aM,
2850
+ ar as aN,
2851
+ fr as aO,
2852
+ Ur as aP,
2853
+ Wr as aQ,
2854
+ or as aR,
2855
+ lr as aS,
2856
+ ri as aT,
2857
+ ii as aU,
2858
+ Tn as aV,
2859
+ ks as aW,
2860
+ va as aX,
2861
+ ya as aY,
2862
+ wa as aZ,
2863
+ Na as a_,
2864
+ rl as aa,
2865
+ il as ab,
2866
+ Va as ac,
2867
+ ds as ad,
2868
+ bt as ae,
2869
+ pn as af,
2870
+ bn as ag,
2871
+ xn as ah,
2872
+ un as ai,
2873
+ gi as aj,
2874
+ Wn as ak,
2875
+ xi as al,
2876
+ Gn as am,
2877
+ qn as an,
2878
+ cr as ao,
2879
+ _n as ap,
2880
+ ps as aq,
2881
+ Xe as ar,
2882
+ Ze as as,
2883
+ bi as at,
2884
+ Hn as au,
2885
+ ni as av,
2886
+ ai as aw,
2887
+ Rn as ax,
2888
+ da as ay,
2889
+ An as az,
2879
2890
  oe as b,
2880
- na as b$,
2881
- fn as b0,
2882
- _t as b1,
2883
- Bt as b2,
2884
- zi as b3,
2885
- Ei as b4,
2886
- Li as b5,
2887
- Vi as b6,
2888
- Xr as b7,
2889
- Qo as b8,
2890
- Xo as b9,
2891
- yn as bA,
2892
- fs as bB,
2893
- Pn as bC,
2894
- li as bD,
2895
- In as bE,
2896
- En as bF,
2897
- On as bG,
2898
- $n as bH,
2899
- Vn as bI,
2900
- Ln as bJ,
2901
- mi as bK,
2902
- zn as bL,
2903
- di as bM,
2904
- Dn as bN,
2905
- Mn as bO,
2906
- ci as bP,
2907
- ui as bQ,
2908
- Fn as bR,
2909
- Kn as bS,
2910
- hi as bT,
2911
- vi as bU,
2912
- yi as bV,
2913
- Yn as bW,
2914
- Qn as bX,
2915
- Xn as bY,
2916
- Zn as bZ,
2917
- ea as b_,
2918
- Zo as ba,
2919
- jn as bb,
2920
- si as bc,
2921
- sr as bd,
2922
- Bn as be,
2923
- hn as bf,
2924
- vn as bg,
2925
- wn as bh,
2926
- Nn as bi,
2927
- Cn as bj,
2928
- kn as bk,
2929
- tn as bl,
2930
- sn as bm,
2931
- dr as bn,
2932
- _a as bo,
2933
- Ba as bp,
2934
- Ri as bq,
2935
- Ti as br,
2936
- Jr as bs,
2937
- Gr as bt,
2938
- Ko as bu,
2939
- qo as bv,
2940
- gt as bw,
2941
- on as bx,
2942
- Zr as by,
2943
- nn as bz,
2891
+ ea as b$,
2892
+ gn as b0,
2893
+ fn as b1,
2894
+ _t as b2,
2895
+ Bt as b3,
2896
+ zi as b4,
2897
+ Ei as b5,
2898
+ Li as b6,
2899
+ Vi as b7,
2900
+ Xr as b8,
2901
+ Qo as b9,
2902
+ nn as bA,
2903
+ yn as bB,
2904
+ fs as bC,
2905
+ Pn as bD,
2906
+ li as bE,
2907
+ In as bF,
2908
+ En as bG,
2909
+ On as bH,
2910
+ $n as bI,
2911
+ Vn as bJ,
2912
+ Ln as bK,
2913
+ mi as bL,
2914
+ zn as bM,
2915
+ di as bN,
2916
+ Dn as bO,
2917
+ Mn as bP,
2918
+ ci as bQ,
2919
+ ui as bR,
2920
+ Fn as bS,
2921
+ Kn as bT,
2922
+ hi as bU,
2923
+ vi as bV,
2924
+ yi as bW,
2925
+ Yn as bX,
2926
+ Qn as bY,
2927
+ Xn as bZ,
2928
+ Zn as b_,
2929
+ Xo as ba,
2930
+ Zo as bb,
2931
+ jn as bc,
2932
+ si as bd,
2933
+ sr as be,
2934
+ Bn as bf,
2935
+ hn as bg,
2936
+ vn as bh,
2937
+ wn as bi,
2938
+ Nn as bj,
2939
+ Cn as bk,
2940
+ kn as bl,
2941
+ tn as bm,
2942
+ sn as bn,
2943
+ dr as bo,
2944
+ _a as bp,
2945
+ Ba as bq,
2946
+ Ri as br,
2947
+ Ti as bs,
2948
+ Jr as bt,
2949
+ Gr as bu,
2950
+ Ko as bv,
2951
+ qo as bw,
2952
+ gt as bx,
2953
+ on as by,
2954
+ Zr as bz,
2944
2955
  oo as c,
2945
- ra as c0,
2946
- ca as c1,
2947
- ki as c2,
2948
- ji as c3,
2949
- Si as c4,
2950
- sa as c5,
2951
- ta as c6,
2952
- Ai as c7,
2953
- pa as c8,
2954
- xs as c9,
2955
- ga as ca,
2956
- _i as cb,
2957
- Sa as cc,
2958
- ka as cd,
2959
- Ra as ce,
2960
- Ta as cf,
2961
- Pa as cg,
2962
- Ia as ch,
2963
- Ma as ci,
2964
- Pi as cj,
2965
- Ii as ck,
2966
- Mi as cl,
2967
- Ca as cm,
2968
- Aa as cn,
2969
- Di as co,
2970
- Oi as cp,
2956
+ na as c0,
2957
+ ra as c1,
2958
+ ca as c2,
2959
+ ki as c3,
2960
+ ji as c4,
2961
+ Si as c5,
2962
+ sa as c6,
2963
+ ta as c7,
2964
+ Ai as c8,
2965
+ pa as c9,
2966
+ xs as ca,
2967
+ ga as cb,
2968
+ _i as cc,
2969
+ Sa as cd,
2970
+ ka as ce,
2971
+ Ra as cf,
2972
+ Ta as cg,
2973
+ Pa as ch,
2974
+ Ia as ci,
2975
+ Ma as cj,
2976
+ Pi as ck,
2977
+ Ii as cl,
2978
+ Mi as cm,
2979
+ Ca as cn,
2980
+ Aa as co,
2981
+ Di as cp,
2982
+ Oi as cq,
2971
2983
  uo as d,
2972
2984
  co as e,
2973
- _e as f,
2985
+ Re as f,
2974
2986
  $r as g,
2975
2987
  Ji as h,
2976
2988
  ke as i,