@chaibuilder/sdk 1.0.9 → 1.0.10

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 (162) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +123 -21
  3. package/dist/AddBlocks-tdvDe7xL.cjs +3 -0
  4. package/dist/{AddBlocks-d10b7b87.js → AddBlocks-xR2s2BVa.js} +47 -44
  5. package/dist/BrandingOptions-DpJ-oNnf.cjs +1 -0
  6. package/dist/{BrandingOptions-f4ab5d9f.js → BrandingOptions-cHK2bVZy.js} +14 -18
  7. package/dist/{CanvasArea-10356200.js → CanvasArea-2zqT1lSE.js} +492 -503
  8. package/dist/CanvasArea-Br8bBSeT.cjs +46 -0
  9. package/dist/ChaiBuilderEditor-SacH75l4.cjs +163 -0
  10. package/dist/{index-aa42febc.js → ChaiBuilderEditor-h9bXC4l-.js} +11215 -15404
  11. package/dist/Class-_uCzl5v1.cjs +1 -0
  12. package/dist/{html-to-json-45e0e3b5.js → Class-l7qYbuoN.js} +185 -366
  13. package/dist/{CurrentPage-35e14043.js → CurrentPage-4lTETR2f.js} +26 -23
  14. package/dist/CurrentPage-nlUWJiUA.cjs +1 -0
  15. package/dist/{ImagesPanel-8b7a989d.cjs → ImagesPanel-6us7hiLN.cjs} +1 -1
  16. package/dist/{ImagesPanel-47ac13c3.js → ImagesPanel-oaHOD-Ex.js} +4 -4
  17. package/dist/Layers-Vw4XE6YB.cjs +1 -0
  18. package/dist/{Layers-c3dd4fc8.js → Layers-wOfijZnb.js} +42 -41
  19. package/dist/MarkAsGlobalBlock-1J_YyL1L.cjs +1 -0
  20. package/dist/{MarkAsGlobalBlock-505ae793.js → MarkAsGlobalBlock-xRyn29gC.js} +17 -20
  21. package/dist/{PagesPanel-bafc506f.js → PagesPanel-82gCVzHS.js} +16 -13
  22. package/dist/PagesPanel-ZKRdK-mI.cjs +1 -0
  23. package/dist/ProjectPanel-kYg4KkJu.cjs +1 -0
  24. package/dist/{ProjectPanel-6113f394.js → ProjectPanel-vz5WOyqZ.js} +22 -19
  25. package/dist/Settings-1E3Y_5r6.cjs +1 -0
  26. package/dist/{Settings-1c41c514.js → Settings-IuAF359L.js} +297 -296
  27. package/dist/SidePanels-WL1UioF2.cjs +1 -0
  28. package/dist/{SidePanels-c13f87dc.js → SidePanels-xssTWt4M.js} +34 -42
  29. package/dist/Topbar-3ozdWfSy.cjs +1 -0
  30. package/dist/{Topbar-b38d5d50.js → Topbar-H0f0EL6-.js} +33 -35
  31. package/dist/UnsplashImages-BoBBSi1a.cjs +1 -0
  32. package/dist/{UnsplashImages-4edb97e7.js → UnsplashImages-gPcBLjgB.js} +13 -14
  33. package/dist/UploadImages-T6kW0s3G.cjs +1 -0
  34. package/dist/{UploadImages-52181c3e.js → UploadImages-_ZyUU66E.js} +11 -12
  35. package/dist/{accordion-c0176dc5.js → accordion-oPUeqPCZ.js} +2 -2
  36. package/dist/{accordion-0afd8143.cjs → accordion-ynvFtV_p.cjs} +1 -1
  37. package/dist/{add-page-modal-08a19915.js → add-page-modal-J1E7rh1U.js} +25 -22
  38. package/dist/add-page-modal-eiiUZCJX.cjs +1 -0
  39. package/dist/alert-dialog-GNfnpqFB.js +64 -0
  40. package/dist/alert-dialog-Mv0-wAvS.cjs +1 -0
  41. package/dist/{command-b1103666.cjs → command-ThdTuUxt.cjs} +1 -1
  42. package/dist/{command-6f260f61.js → command-VHca6CcN.js} +3 -3
  43. package/dist/confirm-alert-8EHe0OOd.cjs +1 -0
  44. package/dist/confirm-alert-b0e_BLhF.js +36 -0
  45. package/dist/{context-menu-e1c240ce.js → context-menu-8dC9uGXj.js} +2 -2
  46. package/dist/{context-menu-fec580f2.cjs → context-menu-IgLbIuth.cjs} +1 -1
  47. package/dist/controls-Ni5kEzLz.js +103 -0
  48. package/dist/controls-xUKa23ic.cjs +1 -0
  49. package/dist/core.cjs +1 -1
  50. package/dist/core.d.ts +1 -10
  51. package/dist/core.js +116 -69
  52. package/dist/delete-page-modal-TGTmRjyn.cjs +1 -0
  53. package/dist/{delete-page-modal-9b37665b.js → delete-page-modal-ysj4O0bM.js} +25 -22
  54. package/dist/{dialog-170eaad9.cjs → dialog-S_QbL1iq.cjs} +1 -1
  55. package/dist/{dialog-18207bef.js → dialog-jrw9DF1f.js} +2 -2
  56. package/dist/{dropdown-menu-ae3ed09b.js → dropdown-menu-S03K_fNs.js} +2 -2
  57. package/dist/{dropdown-menu-84b2439e.cjs → dropdown-menu-sMXR59cB.cjs} +1 -1
  58. package/dist/{form-25e1af37.js → form-dVpOAyRl.js} +2 -2
  59. package/dist/{form-ea21db6c.cjs → form-nRAvKPQj.cjs} +1 -1
  60. package/dist/{functions-83b1de8d.js → functions-nNTuSTsR.js} +1 -1
  61. package/dist/functions-pcUZhFJM.js +12 -0
  62. package/dist/{functions-f84d5e2a.cjs → functions-sCuB7nvZ.cjs} +1 -1
  63. package/dist/functions-uw7QP2kT.cjs +1 -0
  64. package/dist/html-to-json-P6GpbcQX.cjs +1 -0
  65. package/dist/html-to-json-pdHQfRkN.js +178 -0
  66. package/dist/index-8L3zCc6V.cjs +1 -0
  67. package/dist/index-cZ4uo6aT.js +2256 -0
  68. package/dist/{label-e770a087.js → label-KaP7MRrs.js} +2 -2
  69. package/dist/{label-167415e5.cjs → label-tFm8HZdb.cjs} +1 -1
  70. package/dist/lib.cjs +1 -1
  71. package/dist/lib.d.ts +20 -13
  72. package/dist/lib.js +24 -23
  73. package/dist/{link-57de608a.js → link-6o6n2Tnd.js} +4 -4
  74. package/dist/link-ece8dZGH.cjs +1 -0
  75. package/dist/{page-viewer-5c733179.js → page-viewer-84Giu0Rs.js} +29 -26
  76. package/dist/page-viewer-OdVEG83P.cjs +1 -0
  77. package/dist/{popover-f7addcf4.js → popover-a84pbVhQ.js} +2 -2
  78. package/dist/{popover-7cb9079b.cjs → popover-fKjgcRUx.cjs} +1 -1
  79. package/dist/{project-general-setting-d9736056.js → project-general-setting-8OEVVxzn.js} +20 -17
  80. package/dist/project-general-setting-laHNQPW5.cjs +1 -0
  81. package/dist/{project-seo-setting-d81fc1e3.js → project-seo-setting-9kD_stdI.js} +11 -12
  82. package/dist/project-seo-setting-F3Opt9Uj.cjs +1 -0
  83. package/dist/render.cjs +1 -1
  84. package/dist/render.d.ts +7 -7
  85. package/dist/render.js +3 -3
  86. package/dist/{scroll-area-bb343b86.cjs → scroll-area-FiHvy-TZ.cjs} +1 -1
  87. package/dist/{scroll-area-83bd9e8f.js → scroll-area-ewXbxc3n.js} +2 -2
  88. package/dist/{select-0e32300c.cjs → select-7bjg-rr9.cjs} +1 -1
  89. package/dist/{select-7fddd7c3.js → select-POGdEDHT.js} +2 -2
  90. package/dist/{separator-a597dba7.cjs → separator-3Civ-6hb.cjs} +1 -1
  91. package/dist/{separator-a80d065b.js → separator-SctTn0Qi.js} +2 -2
  92. package/dist/server.d.ts +7 -10
  93. package/dist/server.js +0 -3
  94. package/dist/single-page-detail-X0TGlsT4.cjs +1 -0
  95. package/dist/{single-page-detail-04410e64.js → single-page-detail-iXpavDy8.js} +32 -29
  96. package/dist/skeleton-CU_FIbg3.js +239 -0
  97. package/dist/skeleton-JHP9zwL2.cjs +1 -0
  98. package/dist/studio.cjs +1 -0
  99. package/dist/studio.d.ts +13 -0
  100. package/dist/studio.js +39 -0
  101. package/dist/{tabs-85caa1e8.js → tabs-Gb9v5dVb.js} +2 -2
  102. package/dist/{tabs-860e37aa.cjs → tabs-iWeaaVrg.cjs} +1 -1
  103. package/dist/{textarea-a338ede6.cjs → textarea-1kZEh7ki.cjs} +1 -1
  104. package/dist/{textarea-0750bcd2.js → textarea-b2QvVhrK.js} +2 -2
  105. package/dist/{toggle-00c9d11e.js → toggle-ASJRAaGP.js} +2 -2
  106. package/dist/{toggle-b90fed97.cjs → toggle-ehNIPmme.cjs} +1 -1
  107. package/dist/ui.cjs +1 -1
  108. package/dist/ui.d.ts +69 -4
  109. package/dist/ui.js +272 -212
  110. package/dist/useAddBlock-1cMXaOVk.cjs +1 -0
  111. package/dist/useAddBlock-BOjrGBEO.js +86 -0
  112. package/dist/useAllBlocks-RU_Xw8j9.cjs +1 -0
  113. package/dist/useAllBlocks-lX6uVO39.js +20 -0
  114. package/dist/useChaiExternalData-4K9WxANa.js +6 -0
  115. package/dist/useChaiExternalData-DkyBJ81C.cjs +1 -0
  116. package/dist/useDarkMode-JWkrNFpH.js +23 -0
  117. package/dist/useDarkMode-zeTW_UUR.cjs +1 -0
  118. package/dist/useFeatureSupport-jWSuY7wk.js +16 -0
  119. package/dist/useFeatureSupport-tZ0QfBxp.cjs +1 -0
  120. package/dist/useHiddenBlocks-3MsGOJ1s.js +15 -0
  121. package/dist/useHiddenBlocks-oJuQDmTy.cjs +1 -0
  122. package/dist/useLanguage-O1uu2Bzu.js +216 -0
  123. package/dist/useLanguage-Y3qgAbgG.cjs +1 -0
  124. package/dist/useMarkAsGlobalBlock-DB5B1UP6.js +25 -0
  125. package/dist/useMarkAsGlobalBlock-toxRSLc_.cjs +1 -0
  126. package/dist/useUiLibraries-4hPOi8DI.js +12 -0
  127. package/dist/useUiLibraries-9FhQCpKo.cjs +1 -0
  128. package/package.json +19 -5
  129. package/dist/AddBlocks-76275943.cjs +0 -3
  130. package/dist/BrandingOptions-d3b3309a.cjs +0 -1
  131. package/dist/CanvasArea-9f94cd28.cjs +0 -46
  132. package/dist/CurrentPage-edb509db.cjs +0 -1
  133. package/dist/Layers-ecba52c1.cjs +0 -1
  134. package/dist/MarkAsGlobalBlock-3a06a159.cjs +0 -1
  135. package/dist/PagesPanel-f4329082.cjs +0 -1
  136. package/dist/ProjectPanel-ce3116d3.cjs +0 -1
  137. package/dist/Settings-b6a2bef6.cjs +0 -1
  138. package/dist/SidePanels-2cc72c0b.cjs +0 -1
  139. package/dist/Topbar-3b9db9f3.cjs +0 -1
  140. package/dist/UnsplashImages-98c085c2.cjs +0 -1
  141. package/dist/UploadImages-61ef83ad.cjs +0 -1
  142. package/dist/add-page-modal-7f9ff733.cjs +0 -1
  143. package/dist/confirm-alert-c1fdf1e4.js +0 -35
  144. package/dist/confirm-alert-e1ea5110.cjs +0 -1
  145. package/dist/delete-page-modal-7066b01f.cjs +0 -1
  146. package/dist/html-to-json-aadcbf66.cjs +0 -1
  147. package/dist/index-c535cc95.cjs +0 -164
  148. package/dist/link-24679521.cjs +0 -1
  149. package/dist/page-viewer-da99c71e.cjs +0 -1
  150. package/dist/project-general-setting-90f8416d.cjs +0 -1
  151. package/dist/project-seo-setting-6eef8387.cjs +0 -1
  152. package/dist/single-page-detail-90f49d7a.cjs +0 -1
  153. package/dist/useBuilderProp-21feb2da.js +0 -296
  154. package/dist/useBuilderProp-adacf42f.cjs +0 -1
  155. package/dist/useChaiExternalData-192c7896.js +0 -5
  156. package/dist/useChaiExternalData-a90e8aac.cjs +0 -1
  157. /package/dist/{MODIFIERS-2f19c314.js → MODIFIERS-DsEzQ3aH.js} +0 -0
  158. /package/dist/{MODIFIERS-4716c669.cjs → MODIFIERS-Fx6WAZcw.cjs} +0 -0
  159. /package/dist/{jsx-runtime-5c3ac4f7.cjs → jsx-runtime-JYMCiFoE.cjs} +0 -0
  160. /package/dist/{jsx-runtime-944c88e2.js → jsx-runtime-Sp0orL4X.js} +0 -0
  161. /package/dist/{utils-ac68b2c8.js → utils-dze1SGvB.js} +0 -0
  162. /package/dist/{utils-3c452dd0.cjs → utils-qK_SjzzV.cjs} +0 -0
@@ -1,33 +1,36 @@
1
- var ft = Object.defineProperty;
2
- var ht = (n, t, r) => t in n ? ft(n, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[t] = r;
3
- var U = (n, t, r) => (ht(n, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { j as e } from "./jsx-runtime-944c88e2.js";
5
- import H, { useMemo as Ne, useEffect as B, createElement as mt, useCallback as V, useState as $, Component as Le, Children as yt, Suspense as Fe, useRef as ke, lazy as gt } from "react";
6
- import { each as pe, find as We, map as Q, includes as Te, toUpper as se, round as vt, isEmpty as q, first as ee, get as O, memoize as xt, filter as $e, isNull as bt, isString as ye } from "lodash";
7
- import { ResetIcon as Ce, DotsVerticalIcon as jt, MobileIcon as Ee, LaptopIcon as wt, DesktopIcon as kt, EraserIcon as Tt, ZoomInIcon as Ct, ArrowUpIcon as Et, CopyIcon as St, TrashIcon as It, DragHandleDots2Icon as At } from "@radix-ui/react-icons";
8
- import { B as te, A as Dt, b as Ot, d as Rt, e as Pt, f as Bt, g as Mt, h as _t, i as Nt, k as Lt, u as qe, S as Ue } from "./useBuilderProp-21feb2da.js";
9
- import { u as Ft, d as ge, e as He, f as ve, g as Wt, h as $t, i as z, j as K, k as qt, l as ze, r as Ke, m as Ye, n as Ut, o as Ht, q as zt, s as Ve, t as Ge, c as Kt, v as Yt, w as Vt, x as Gt, y as Xt, z as Jt, A as xe, B as Xe, C as Zt, D as Qt, F as en, b as tn, E as nn } from "./index-aa42febc.js";
10
- import { useTranslation as Je } from "react-i18next";
11
- import { S as Z } from "./separator-a80d065b.js";
12
- import { S as rn, D as sn, c as on, d as an, h as ln, i as cn, f as dn, H as un, a as pn, b as fn } from "./dropdown-menu-ae3ed09b.js";
13
- import { L as hn } from "./label-e770a087.js";
14
- import { useAtom as X } from "jotai";
15
- import { flip as mn } from "@floating-ui/dom";
16
- import { useFloating as yn, shift as gn } from "@floating-ui/react-dom";
17
- import { useDrag as vn } from "react-dnd";
18
- import { useResizeObserver as xn } from "@react-hookz/web";
19
- import { tailwindcssPaletteGenerator as bn } from "@bobthered/tailwindcss-palette-generator";
20
- import { Provider as jn } from "react-wrap-balancer";
21
- import { twMerge as wn } from "tailwind-merge";
22
- import { g as kn, S as Ze, a as Se } from "./MODIFIERS-2f19c314.js";
23
- import { getChaiDataProviders as Tn, getBlockComponent as Cn } from "@chaibuilder/blocks";
24
- import { u as Qe } from "./useChaiExternalData-192c7896.js";
25
- import Ie from "react-dom";
26
- import "@radix-ui/react-alert-dialog";
27
- import "./utils-ac68b2c8.js";
28
- import "clsx";
1
+ var ut = Object.defineProperty;
2
+ var pt = (n, t, r) => t in n ? ut(n, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[t] = r;
3
+ var U = (n, t, r) => (pt(n, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { j as e } from "./jsx-runtime-Sp0orL4X.js";
5
+ import z, { useMemo as Me, useEffect as R, createElement as ft, useCallback as V, useState as $, Component as Ne, Children as ht, Suspense as Le, useRef as we, lazy as mt } from "react";
6
+ import { each as ue, find as Fe, map as Q, includes as ke, toUpper as se, round as yt, isEmpty as q, first as ee, get as A, memoize as gt, filter as We, isNull as vt, isString as me } from "lodash";
7
+ import { ResetIcon as Ce, DotsVerticalIcon as xt, MobileIcon as Te, LaptopIcon as bt, DesktopIcon as jt, EraserIcon as wt, ZoomInIcon as kt, ArrowUpIcon as Ct, CopyIcon as Tt, TrashIcon as Et, DragHandleDots2Icon as St } from "@radix-ui/react-icons";
8
+ import { B as te, u as Dt, S as $e } from "./skeleton-CU_FIbg3.js";
9
+ import { t as Ot, a as ye, s as It, l as H, q as K, y as qe, e as Ue, d as At, b as Bt, h as Pt, i as ze, k as He, p as Rt, z as _t, A as Mt, j as Nt, g as ge, B as Lt, m as Ft, D as Wt, x as $t, E as qt } from "./ChaiBuilderEditor-h9bXC4l-.js";
10
+ import { useTranslation as Ke } from "react-i18next";
11
+ import { S as G } from "./separator-SctTn0Qi.js";
12
+ import { a as Ye, u as ve } from "./useDarkMode-JWkrNFpH.js";
13
+ import { S as Ut, D as zt, c as Ht, d as Kt, h as Yt, i as Vt, f as Xt, H as Jt, a as Zt, b as Gt } from "./dropdown-menu-S03K_fNs.js";
14
+ import { L as Qt } from "./label-KaP7MRrs.js";
15
+ import { b as en, u as tn, a as Ve } from "./useFeatureSupport-jWSuY7wk.js";
16
+ import { A as nn, a as rn, b as sn, c as on, e as an, f as ln, d as cn, h as dn, g as un } from "./alert-dialog-GNfnpqFB.js";
17
+ import { useAtom as J } from "jotai";
18
+ import { flip as pn } from "@floating-ui/dom";
19
+ import { useFloating as fn, shift as hn } from "@floating-ui/react-dom";
20
+ import { useDrag as mn } from "react-dnd";
21
+ import { c as yn, a as gn, u as Xe } from "./useAllBlocks-lX6uVO39.js";
22
+ import { useResizeObserver as vn } from "@react-hookz/web";
23
+ import { tailwindcssPaletteGenerator as xn } from "@bobthered/tailwindcss-palette-generator";
24
+ import { Provider as bn } from "react-wrap-balancer";
25
+ import { twMerge as jn } from "tailwind-merge";
26
+ import { g as wn, S as Je, a as Ee } from "./MODIFIERS-DsEzQ3aH.js";
27
+ import { getChaiDataProviders as kn, getBlockComponent as Cn } from "@chaibuilder/blocks";
28
+ import { u as Ze } from "./useChaiExternalData-4K9WxANa.js";
29
+ import Se from "react-dom";
29
30
  import "@radix-ui/react-slot";
30
31
  import "class-variance-authority";
32
+ import "./utils-dze1SGvB.js";
33
+ import "clsx";
31
34
  import "@radix-ui/react-tooltip";
32
35
  import "@radix-ui/react-toast";
33
36
  import "@radix-ui/react-scroll-area";
@@ -36,44 +39,42 @@ import "flagged";
36
39
  import "@minoru/react-dnd-treeview";
37
40
  import "react-hotkeys-hook";
38
41
  import "flat-to-nested";
39
- import "./html-to-json-45e0e3b5.js";
40
- import "himalaya";
42
+ import "./functions-pcUZhFJM.js";
41
43
  import "redux-undo";
42
- import "sonner";
43
- import "lucide-react";
44
44
  import "@radix-ui/react-separator";
45
45
  import "@radix-ui/react-switch";
46
46
  import "@radix-ui/react-hover-card";
47
47
  import "@radix-ui/react-dropdown-menu";
48
48
  import "@radix-ui/react-label";
49
- const En = () => Ne(() => Tn(), []), Sn = ({ children: n }) => {
50
- const [, t] = Qe(), [r] = Ft(), i = En();
51
- return B(() => (t({}), pe(r, (l) => {
52
- const s = We(i, { providerKey: l.providerKey });
49
+ import "@radix-ui/react-alert-dialog";
50
+ const Tn = () => Me(() => kn(), []), En = ({ children: n }) => {
51
+ const [, t] = Ze(), [r] = Ot(), a = Tn();
52
+ return R(() => (t({}), ue(r, (c) => {
53
+ const s = Fe(a, { providerKey: c.providerKey });
53
54
  if (s) {
54
- const a = (s == null ? void 0 : s.mockFn) || (s == null ? void 0 : s.dataFn);
55
- a && a(l.args).then(
56
- (d) => t((y) => ({ ...y, [l.providerKey]: d }))
55
+ const i = (s == null ? void 0 : s.mockFn) || (s == null ? void 0 : s.dataFn);
56
+ i && i(c.args).then(
57
+ (d) => t((y) => ({ ...y, [c.providerKey]: d }))
57
58
  );
58
59
  }
59
60
  }), () => {
60
- pe(r, (l) => {
61
- t((s) => (delete s[l.providerKey], s));
61
+ ue(r, (c) => {
62
+ t((s) => (delete s[c.providerKey], s));
62
63
  });
63
- }), [i, r, t]), /* @__PURE__ */ e.jsx(e.Fragment, { children: n });
64
- }, In = () => {
65
- const { undoCount: n, redoCount: t, undo: r, redo: i } = ge();
64
+ }), [a, r, t]), /* @__PURE__ */ e.jsx(e.Fragment, { children: n });
65
+ }, Sn = () => {
66
+ const { undoCount: n, redoCount: t, undo: r, redo: a } = ye();
66
67
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
67
68
  /* @__PURE__ */ e.jsx(te, { disabled: !n, size: "sm", onClick: r, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ e.jsx(Ce, {}) }),
68
- /* @__PURE__ */ e.jsx(te, { disabled: !t, onClick: i, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ e.jsx(Ce, { className: "rotate-180 scale-y-[-1] transform" }) })
69
+ /* @__PURE__ */ e.jsx(te, { disabled: !t, onClick: a, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ e.jsx(Ce, { className: "rotate-180 scale-y-[-1] transform" }) })
69
70
  ] });
70
71
  };
71
- function An() {
72
- const [n, t] = He(), { t: r } = Je();
72
+ function Dn() {
73
+ const [n, t] = Ye(), { t: r } = Ke();
73
74
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
74
- /* @__PURE__ */ e.jsx(hn, { htmlFor: "dark-mode-switch", children: r("dark_mode") }),
75
+ /* @__PURE__ */ e.jsx(Qt, { htmlFor: "dark-mode-switch", children: r("dark_mode") }),
75
76
  /* @__PURE__ */ e.jsxs(
76
- rn,
77
+ Ut,
77
78
  {
78
79
  id: "dark-mode-switch",
79
80
  checked: n,
@@ -97,7 +98,7 @@ function An() {
97
98
  )
98
99
  ] });
99
100
  }
100
- const Ae = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
101
+ const De = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
101
102
  "svg",
102
103
  {
103
104
  className: n ? "rotate-90" : "",
@@ -120,91 +121,91 @@ const Ae = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
120
121
  )
121
122
  ]
122
123
  }
123
- ), De = [
124
+ ), Oe = [
124
125
  {
125
126
  title: "Mobile (XS)",
126
127
  content: "Styles set here are applied to all screen unless edited at higher breakpoint",
127
128
  breakpoint: "xs",
128
- icon: /* @__PURE__ */ e.jsx(Ee, {}),
129
+ icon: /* @__PURE__ */ e.jsx(Te, {}),
129
130
  width: 400
130
131
  },
131
132
  {
132
133
  title: "Mobile landscape (SM)",
133
134
  content: "Styles set here are applied at 640px and up unless edited at higher breakpoint",
134
135
  breakpoint: "sm",
135
- icon: /* @__PURE__ */ e.jsx(Ee, { className: "rotate-90" }),
136
+ icon: /* @__PURE__ */ e.jsx(Te, { className: "rotate-90" }),
136
137
  width: 640
137
138
  },
138
139
  {
139
140
  title: "Tablet (MD)",
140
141
  content: "Styles set here are applied at 768px and up",
141
142
  breakpoint: "md",
142
- icon: /* @__PURE__ */ e.jsx(Ae, {}),
143
+ icon: /* @__PURE__ */ e.jsx(De, {}),
143
144
  width: 800
144
145
  },
145
146
  {
146
147
  title: "Tablet Landscape (LG)",
147
148
  content: "Styles set here are applied at 1024px and up unless edited at higher breakpoint",
148
149
  breakpoint: "lg",
149
- icon: /* @__PURE__ */ e.jsx(Ae, { landscape: !0 }),
150
+ icon: /* @__PURE__ */ e.jsx(De, { landscape: !0 }),
150
151
  width: 1024
151
152
  },
152
153
  {
153
154
  title: "Desktop (XL)",
154
155
  content: "Styles set here are applied at 1280px and up unless edited at higher breakpoint",
155
156
  breakpoint: "xl",
156
- icon: /* @__PURE__ */ e.jsx(wt, {}),
157
+ icon: /* @__PURE__ */ e.jsx(bt, {}),
157
158
  width: 1420
158
159
  },
159
160
  {
160
161
  title: "Large Desktop (2XL)",
161
162
  content: "Styles set here are applied at 1536px and up",
162
163
  breakpoint: "2xl",
163
- icon: /* @__PURE__ */ e.jsx(kt, {}),
164
+ icon: /* @__PURE__ */ e.jsx(jt, {}),
164
165
  width: 1920
165
166
  }
166
- ], Dn = ({
167
+ ], On = ({
167
168
  title: n,
168
169
  content: t,
169
170
  currentBreakpoint: r,
170
- breakpoint: i,
171
- width: l,
171
+ breakpoint: a,
172
+ width: c,
172
173
  icon: s,
173
- onClick: a
174
- }) => /* @__PURE__ */ e.jsxs(un, { children: [
175
- /* @__PURE__ */ e.jsx(pn, { asChild: !0, children: /* @__PURE__ */ e.jsx(
174
+ onClick: i
175
+ }) => /* @__PURE__ */ e.jsxs(Jt, { children: [
176
+ /* @__PURE__ */ e.jsx(Zt, { asChild: !0, children: /* @__PURE__ */ e.jsx(
176
177
  te,
177
178
  {
178
- onClick: () => a(l),
179
+ onClick: () => i(c),
179
180
  size: "sm",
180
- variant: i === r ? "secondary" : "ghost",
181
+ variant: a === r ? "secondary" : "ghost",
181
182
  children: s
182
183
  }
183
184
  ) }),
184
- /* @__PURE__ */ e.jsx(fn, { className: "w-52 border-border", children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
185
+ /* @__PURE__ */ e.jsx(Gt, { className: "w-52 border-border", children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
185
186
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-semibold", children: n }),
186
187
  /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: t })
187
188
  ] }) }) })
188
- ] }), On = () => {
189
- const [, n, t] = ve(), [r, i] = Wt(), l = (s) => {
190
- r.includes(s) ? r.length > 2 && i(r.filter((a) => a !== s)) : i((a) => [...a, s]);
189
+ ] }), In = () => {
190
+ const [, n, t] = ve(), [r, a] = en(), c = (s) => {
191
+ r.includes(s) ? r.length > 2 && a(r.filter((i) => i !== s)) : a((i) => [...i, s]);
191
192
  };
192
193
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md", children: [
193
194
  Q(
194
- De.filter((s) => Te(r, se(s.breakpoint))),
195
- (s) => /* @__PURE__ */ mt(Dn, { ...s, onClick: t, key: s.breakpoint, currentBreakpoint: n })
195
+ Oe.filter((s) => ke(r, se(s.breakpoint))),
196
+ (s) => /* @__PURE__ */ ft(On, { ...s, onClick: t, key: s.breakpoint, currentBreakpoint: n })
196
197
  ),
197
- /* @__PURE__ */ e.jsxs(sn, { children: [
198
- /* @__PURE__ */ e.jsx(on, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ e.jsx(jt, { className: "scale-90 transform" }) }) }),
199
- /* @__PURE__ */ e.jsxs(an, { className: "w-56 border-border text-xs", children: [
200
- /* @__PURE__ */ e.jsx(ln, { children: "Breakpoints" }),
201
- /* @__PURE__ */ e.jsx(cn, {}),
202
- Q(De, (s) => /* @__PURE__ */ e.jsx(
203
- dn,
198
+ /* @__PURE__ */ e.jsxs(zt, { children: [
199
+ /* @__PURE__ */ e.jsx(Ht, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ e.jsx(xt, { className: "scale-90 transform" }) }) }),
200
+ /* @__PURE__ */ e.jsxs(Kt, { className: "w-56 border-border text-xs", children: [
201
+ /* @__PURE__ */ e.jsx(Yt, { children: "Breakpoints" }),
202
+ /* @__PURE__ */ e.jsx(Vt, {}),
203
+ Q(Oe, (s) => /* @__PURE__ */ e.jsx(
204
+ Xt,
204
205
  {
205
206
  disabled: s.breakpoint === "xs",
206
- onCheckedChange: () => l(se(s.breakpoint)),
207
- checked: Te(r, se(s.breakpoint)),
207
+ onCheckedChange: () => c(se(s.breakpoint)),
208
+ checked: ke(r, se(s.breakpoint)),
208
209
  children: s.title
209
210
  },
210
211
  s.breakpoint
@@ -212,59 +213,53 @@ const Ae = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
212
213
  ] })
213
214
  ] })
214
215
  ] });
215
- }, Rn = () => {
216
- const [n] = $t(), { createSnapshot: t } = ge(), [, r] = z(), [, i] = K(), l = V(() => {
217
- n([]), r([]), i([]), t();
216
+ }, An = () => {
217
+ const [n] = It(), { createSnapshot: t } = ye(), [, r] = H(), [, a] = K(), c = V(() => {
218
+ n([]), r([]), a([]), t();
218
219
  }, [n, t]);
219
- return /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsxs(Dt, { children: [
220
- /* @__PURE__ */ e.jsx(Ot, { asChild: !0, children: /* @__PURE__ */ e.jsxs(te, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
221
- /* @__PURE__ */ e.jsx(Tt, {}),
220
+ return /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsxs(nn, { children: [
221
+ /* @__PURE__ */ e.jsx(rn, { asChild: !0, children: /* @__PURE__ */ e.jsxs(te, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
222
+ /* @__PURE__ */ e.jsx(wt, {}),
222
223
  " Clear"
223
224
  ] }) }),
224
- /* @__PURE__ */ e.jsxs(Rt, { className: "border-border", children: [
225
- /* @__PURE__ */ e.jsxs(Pt, { children: [
226
- /* @__PURE__ */ e.jsx(Bt, { children: "Clear whole canvas?" }),
227
- /* @__PURE__ */ e.jsx(Mt, { children: "Are you sure you want to clear the whole canvas?" })
225
+ /* @__PURE__ */ e.jsxs(sn, { className: "border-border", children: [
226
+ /* @__PURE__ */ e.jsxs(on, { children: [
227
+ /* @__PURE__ */ e.jsx(an, { children: "Clear whole canvas?" }),
228
+ /* @__PURE__ */ e.jsx(ln, { children: "Are you sure you want to clear the whole canvas?" })
228
229
  ] }),
229
- /* @__PURE__ */ e.jsxs(_t, { children: [
230
- /* @__PURE__ */ e.jsx(Nt, { children: "Cancel" }),
231
- /* @__PURE__ */ e.jsx(Lt, { onClick: l, children: "Yes" })
230
+ /* @__PURE__ */ e.jsxs(cn, { children: [
231
+ /* @__PURE__ */ e.jsx(dn, { children: "Cancel" }),
232
+ /* @__PURE__ */ e.jsx(un, { onClick: c, children: "Yes" })
232
233
  ] })
233
234
  ] })
234
235
  ] }) });
235
- }, Pn = () => {
236
- const n = qt("darkMode", !1), [t] = ze();
236
+ }, Bn = () => {
237
+ const n = tn("darkMode", !1), [t] = Ve();
237
238
  return /* @__PURE__ */ e.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
238
239
  /* @__PURE__ */ e.jsxs("div", { className: "flex h-full space-x-2", children: [
239
240
  n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
240
- /* @__PURE__ */ e.jsx(An, {}),
241
- /* @__PURE__ */ e.jsx(Z, { orientation: "vertical" })
241
+ /* @__PURE__ */ e.jsx(Dn, {}),
242
+ /* @__PURE__ */ e.jsx(G, { orientation: "vertical" })
242
243
  ] }) : null,
243
- /* @__PURE__ */ e.jsx(On, {}),
244
- /* @__PURE__ */ e.jsx(Z, { orientation: "vertical" }),
244
+ /* @__PURE__ */ e.jsx(In, {}),
245
+ /* @__PURE__ */ e.jsx(G, { orientation: "vertical" }),
245
246
  /* @__PURE__ */ e.jsxs("div", { className: "flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium", children: [
246
- /* @__PURE__ */ e.jsx(Ct, { className: "h-3.5 w-3.5 flex-shrink-0" }),
247
+ /* @__PURE__ */ e.jsx(kt, { className: "h-3.5 w-3.5 flex-shrink-0" }),
247
248
  " ",
248
249
  /* @__PURE__ */ e.jsxs("div", { className: "text-xs leading-3", children: [
249
- vt(t, 0),
250
+ yt(t, 0),
250
251
  "%"
251
252
  ] })
252
253
  ] }),
253
- /* @__PURE__ */ e.jsx(Z, { orientation: "vertical" }),
254
- /* @__PURE__ */ e.jsx(In, {})
254
+ /* @__PURE__ */ e.jsx(G, { orientation: "vertical" }),
255
+ /* @__PURE__ */ e.jsx(Sn, {})
255
256
  ] }),
256
257
  /* @__PURE__ */ e.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
257
- /* @__PURE__ */ e.jsx(Z, { orientation: "vertical" }),
258
- /* @__PURE__ */ e.jsx(Rn, {})
258
+ /* @__PURE__ */ e.jsx(G, { orientation: "vertical" }),
259
+ /* @__PURE__ */ e.jsx(An, {})
259
260
  ] })
260
261
  ] });
261
- }, oe = {
262
- FRAMEWORK: "FRAMEWORK",
263
- STATIC: "STATIC",
264
- EMAIL: "EMAIL",
265
- PRESENTATION: "PRESENTATION",
266
- GRAPHIC: "GRAPHIC"
267
- }, Bn = `<!doctype html>
262
+ }, Pn = `<!doctype html>
268
263
  <html class="scroll-smooth h-full overflow-y-auto">
269
264
  <head>
270
265
  <meta charset="UTF-8">
@@ -298,53 +293,53 @@ const Ae = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
298
293
  <body class="font-body antialiased h-full">
299
294
  <div class="frame-root"></div>
300
295
  </body>
301
- </html>`, Mn = (n) => {
302
- const [t] = ve(), [, r] = ze(), [i, l] = $({}), s = V(() => {
303
- const { width: a, height: d } = n;
304
- if (a < t) {
305
- const y = parseFloat((a / t).toString());
296
+ </html>`, Rn = (n) => {
297
+ const [t] = ve(), [, r] = Ve(), [a, c] = $({}), s = V(() => {
298
+ const { width: i, height: d } = n;
299
+ if (i < t) {
300
+ const y = parseFloat((i / t).toString());
306
301
  let b = {};
307
- d && (b = { height: d + 2 * d * (1 - y) }), l({
302
+ d && (b = { height: d + 2 * d * (1 - y) }), c({
308
303
  transform: `scale(${y})`,
309
304
  transformOrigin: "top left",
310
305
  ...b,
311
306
  maxWidth: "none"
312
307
  }), r(y * 100);
313
308
  } else
314
- l({}), r(100);
309
+ c({}), r(100);
315
310
  }, [t, n, r]);
316
- return B(() => {
311
+ return R(() => {
317
312
  s();
318
- }, [t, n, r, s]), i;
313
+ }, [t, n, r, s]), a;
319
314
  };
320
- var fe = { exports: {} };
315
+ var pe = { exports: {} };
321
316
  /*
322
317
  object-assign
323
318
  (c) Sindre Sorhus
324
319
  @license MIT
325
320
  */
326
- var ie, Oe;
321
+ var oe, Ie;
327
322
  function _n() {
328
- if (Oe)
329
- return ie;
330
- Oe = 1;
323
+ if (Ie)
324
+ return oe;
325
+ Ie = 1;
331
326
  var n = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
332
- function i(s) {
327
+ function a(s) {
333
328
  if (s == null)
334
329
  throw new TypeError("Object.assign cannot be called with null or undefined");
335
330
  return Object(s);
336
331
  }
337
- function l() {
332
+ function c() {
338
333
  try {
339
334
  if (!Object.assign)
340
335
  return !1;
341
336
  var s = new String("abc");
342
337
  if (s[5] = "de", Object.getOwnPropertyNames(s)[0] === "5")
343
338
  return !1;
344
- for (var a = {}, d = 0; d < 10; d++)
345
- a["_" + String.fromCharCode(d)] = d;
346
- var y = Object.getOwnPropertyNames(a).map(function(p) {
347
- return a[p];
339
+ for (var i = {}, d = 0; d < 10; d++)
340
+ i["_" + String.fromCharCode(d)] = d;
341
+ var y = Object.getOwnPropertyNames(i).map(function(p) {
342
+ return i[p];
348
343
  });
349
344
  if (y.join("") !== "0123456789")
350
345
  return !1;
@@ -356,8 +351,8 @@ function _n() {
356
351
  return !1;
357
352
  }
358
353
  }
359
- return ie = l() ? Object.assign : function(s, a) {
360
- for (var d, y = i(s), b, p = 1; p < arguments.length; p++) {
354
+ return oe = c() ? Object.assign : function(s, i) {
355
+ for (var d, y = a(s), b, p = 1; p < arguments.length; p++) {
361
356
  d = Object(arguments[p]);
362
357
  for (var u in d)
363
358
  t.call(d, u) && (y[u] = d[u]);
@@ -368,42 +363,42 @@ function _n() {
368
363
  }
369
364
  }
370
365
  return y;
371
- }, ie;
366
+ }, oe;
372
367
  }
373
- var ae, Re;
374
- function be() {
375
- if (Re)
376
- return ae;
377
- Re = 1;
368
+ var ie, Ae;
369
+ function xe() {
370
+ if (Ae)
371
+ return ie;
372
+ Ae = 1;
378
373
  var n = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
379
- return ae = n, ae;
374
+ return ie = n, ie;
380
375
  }
381
- var le, Pe;
382
- function et() {
383
- return Pe || (Pe = 1, le = Function.call.bind(Object.prototype.hasOwnProperty)), le;
376
+ var ae, Be;
377
+ function Ge() {
378
+ return Be || (Be = 1, ae = Function.call.bind(Object.prototype.hasOwnProperty)), ae;
384
379
  }
385
- var ce, Be;
386
- function Nn() {
387
- if (Be)
388
- return ce;
389
- Be = 1;
380
+ var le, Pe;
381
+ function Mn() {
382
+ if (Pe)
383
+ return le;
384
+ Pe = 1;
390
385
  var n = function() {
391
386
  };
392
387
  if (process.env.NODE_ENV !== "production") {
393
- var t = be(), r = {}, i = et();
388
+ var t = xe(), r = {}, a = Ge();
394
389
  n = function(s) {
395
- var a = "Warning: " + s;
396
- typeof console < "u" && console.error(a);
390
+ var i = "Warning: " + s;
391
+ typeof console < "u" && console.error(i);
397
392
  try {
398
- throw new Error(a);
393
+ throw new Error(i);
399
394
  } catch {
400
395
  }
401
396
  };
402
397
  }
403
- function l(s, a, d, y, b) {
398
+ function c(s, i, d, y, b) {
404
399
  if (process.env.NODE_ENV !== "production") {
405
400
  for (var p in s)
406
- if (i(s, p)) {
401
+ if (a(s, p)) {
407
402
  var u;
408
403
  try {
409
404
  if (typeof s[p] != "function") {
@@ -412,9 +407,9 @@ function Nn() {
412
407
  );
413
408
  throw m.name = "Invariant Violation", m;
414
409
  }
415
- u = s[p](a, p, y, d, null, t);
416
- } catch (A) {
417
- u = A;
410
+ u = s[p](i, p, y, d, null, t);
411
+ } catch (O) {
412
+ u = O;
418
413
  }
419
414
  if (u && !(u instanceof Error) && n(
420
415
  (y || "React class") + ": type specification of " + d + " `" + p + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
@@ -428,16 +423,16 @@ function Nn() {
428
423
  }
429
424
  }
430
425
  }
431
- return l.resetWarningCache = function() {
426
+ return c.resetWarningCache = function() {
432
427
  process.env.NODE_ENV !== "production" && (r = {});
433
- }, ce = l, ce;
428
+ }, le = c, le;
434
429
  }
435
- var de, Me;
436
- function Ln() {
437
- if (Me)
438
- return de;
439
- Me = 1;
440
- var n = Ke, t = _n(), r = be(), i = et(), l = Nn(), s = function() {
430
+ var ce, Re;
431
+ function Nn() {
432
+ if (Re)
433
+ return ce;
434
+ Re = 1;
435
+ var n = qe, t = _n(), r = xe(), a = Ge(), c = Mn(), s = function() {
441
436
  };
442
437
  process.env.NODE_ENV !== "production" && (s = function(d) {
443
438
  var y = "Warning: " + d;
@@ -447,15 +442,15 @@ function Ln() {
447
442
  } catch {
448
443
  }
449
444
  });
450
- function a() {
445
+ function i() {
451
446
  return null;
452
447
  }
453
- return de = function(d, y) {
448
+ return ce = function(d, y) {
454
449
  var b = typeof Symbol == "function" && Symbol.iterator, p = "@@iterator";
455
450
  function u(o) {
456
- var c = o && (b && o[b] || o[p]);
457
- if (typeof c == "function")
458
- return c;
451
+ var l = o && (b && o[b] || o[p]);
452
+ if (typeof l == "function")
453
+ return l;
459
454
  }
460
455
  var m = "<<anonymous>>", k = {
461
456
  array: f("array"),
@@ -467,222 +462,222 @@ function Ln() {
467
462
  string: f("string"),
468
463
  symbol: f("symbol"),
469
464
  any: F(),
470
- arrayOf: _,
465
+ arrayOf: M,
471
466
  element: ne(),
472
467
  elementType: re(),
473
- instanceOf: D,
474
- node: at(),
468
+ instanceOf: I,
469
+ node: ot(),
475
470
  objectOf: L,
476
471
  oneOf: N,
477
- oneOfType: it,
478
- shape: lt,
479
- exact: ct
472
+ oneOfType: st,
473
+ shape: it,
474
+ exact: at
480
475
  };
481
- function A(o, c) {
482
- return o === c ? o !== 0 || 1 / o === 1 / c : o !== o && c !== c;
476
+ function O(o, l) {
477
+ return o === l ? o !== 0 || 1 / o === 1 / l : o !== o && l !== l;
483
478
  }
484
- function w(o, c) {
485
- this.message = o, this.data = c && typeof c == "object" ? c : {}, this.stack = "";
479
+ function w(o, l) {
480
+ this.message = o, this.data = l && typeof l == "object" ? l : {}, this.stack = "";
486
481
  }
487
482
  w.prototype = Error.prototype;
488
483
  function S(o) {
489
484
  if (process.env.NODE_ENV !== "production")
490
- var c = {}, j = 0;
491
- function v(T, g, x, C, I, E, M) {
492
- if (C = C || m, E = E || x, M !== r) {
485
+ var l = {}, j = 0;
486
+ function v(C, g, x, T, D, E, _) {
487
+ if (T = T || m, E = E || x, _ !== r) {
493
488
  if (y) {
494
- var R = new Error(
489
+ var B = new Error(
495
490
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
496
491
  );
497
- throw R.name = "Invariant Violation", R;
492
+ throw B.name = "Invariant Violation", B;
498
493
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
499
- var Y = C + ":" + x;
500
- !c[Y] && // Avoid spamming the console because they are often not actionable except for lib authors
494
+ var Y = T + ":" + x;
495
+ !l[Y] && // Avoid spamming the console because they are often not actionable except for lib authors
501
496
  j < 3 && (s(
502
- "You are manually calling a React.PropTypes validation function for the `" + E + "` prop on `" + C + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
503
- ), c[Y] = !0, j++);
497
+ "You are manually calling a React.PropTypes validation function for the `" + E + "` prop on `" + T + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
498
+ ), l[Y] = !0, j++);
504
499
  }
505
500
  }
506
- return g[x] == null ? T ? g[x] === null ? new w("The " + I + " `" + E + "` is marked as required " + ("in `" + C + "`, but its value is `null`.")) : new w("The " + I + " `" + E + "` is marked as required in " + ("`" + C + "`, but its value is `undefined`.")) : null : o(g, x, C, I, E);
501
+ return g[x] == null ? C ? g[x] === null ? new w("The " + D + " `" + E + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new w("The " + D + " `" + E + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : o(g, x, T, D, E);
507
502
  }
508
503
  var h = v.bind(null, !1);
509
504
  return h.isRequired = v.bind(null, !0), h;
510
505
  }
511
506
  function f(o) {
512
- function c(j, v, h, T, g, x) {
513
- var C = j[v], I = W(C);
514
- if (I !== o) {
515
- var E = G(C);
507
+ function l(j, v, h, C, g, x) {
508
+ var T = j[v], D = W(T);
509
+ if (D !== o) {
510
+ var E = X(T);
516
511
  return new w(
517
- "Invalid " + T + " `" + g + "` of type " + ("`" + E + "` supplied to `" + h + "`, expected ") + ("`" + o + "`."),
512
+ "Invalid " + C + " `" + g + "` of type " + ("`" + E + "` supplied to `" + h + "`, expected ") + ("`" + o + "`."),
518
513
  { expectedType: o }
519
514
  );
520
515
  }
521
516
  return null;
522
517
  }
523
- return S(c);
518
+ return S(l);
524
519
  }
525
520
  function F() {
526
- return S(a);
521
+ return S(i);
527
522
  }
528
- function _(o) {
529
- function c(j, v, h, T, g) {
523
+ function M(o) {
524
+ function l(j, v, h, C, g) {
530
525
  if (typeof o != "function")
531
526
  return new w("Property `" + g + "` of component `" + h + "` has invalid PropType notation inside arrayOf.");
532
527
  var x = j[v];
533
528
  if (!Array.isArray(x)) {
534
- var C = W(x);
535
- return new w("Invalid " + T + " `" + g + "` of type " + ("`" + C + "` supplied to `" + h + "`, expected an array."));
529
+ var T = W(x);
530
+ return new w("Invalid " + C + " `" + g + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected an array."));
536
531
  }
537
- for (var I = 0; I < x.length; I++) {
538
- var E = o(x, I, h, T, g + "[" + I + "]", r);
532
+ for (var D = 0; D < x.length; D++) {
533
+ var E = o(x, D, h, C, g + "[" + D + "]", r);
539
534
  if (E instanceof Error)
540
535
  return E;
541
536
  }
542
537
  return null;
543
538
  }
544
- return S(c);
539
+ return S(l);
545
540
  }
546
541
  function ne() {
547
- function o(c, j, v, h, T) {
548
- var g = c[j];
542
+ function o(l, j, v, h, C) {
543
+ var g = l[j];
549
544
  if (!d(g)) {
550
545
  var x = W(g);
551
- return new w("Invalid " + h + " `" + T + "` of type " + ("`" + x + "` supplied to `" + v + "`, expected a single ReactElement."));
546
+ return new w("Invalid " + h + " `" + C + "` of type " + ("`" + x + "` supplied to `" + v + "`, expected a single ReactElement."));
552
547
  }
553
548
  return null;
554
549
  }
555
550
  return S(o);
556
551
  }
557
552
  function re() {
558
- function o(c, j, v, h, T) {
559
- var g = c[j];
553
+ function o(l, j, v, h, C) {
554
+ var g = l[j];
560
555
  if (!n.isValidElementType(g)) {
561
556
  var x = W(g);
562
- return new w("Invalid " + h + " `" + T + "` of type " + ("`" + x + "` supplied to `" + v + "`, expected a single ReactElement type."));
557
+ return new w("Invalid " + h + " `" + C + "` of type " + ("`" + x + "` supplied to `" + v + "`, expected a single ReactElement type."));
563
558
  }
564
559
  return null;
565
560
  }
566
561
  return S(o);
567
562
  }
568
- function D(o) {
569
- function c(j, v, h, T, g) {
563
+ function I(o) {
564
+ function l(j, v, h, C, g) {
570
565
  if (!(j[v] instanceof o)) {
571
- var x = o.name || m, C = pt(j[v]);
572
- return new w("Invalid " + T + " `" + g + "` of type " + ("`" + C + "` supplied to `" + h + "`, expected ") + ("instance of `" + x + "`."));
566
+ var x = o.name || m, T = dt(j[v]);
567
+ return new w("Invalid " + C + " `" + g + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected ") + ("instance of `" + x + "`."));
573
568
  }
574
569
  return null;
575
570
  }
576
- return S(c);
571
+ return S(l);
577
572
  }
578
573
  function N(o) {
579
574
  if (!Array.isArray(o))
580
575
  return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s(
581
576
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
582
- ) : s("Invalid argument supplied to oneOf, expected an array.")), a;
583
- function c(j, v, h, T, g) {
584
- for (var x = j[v], C = 0; C < o.length; C++)
585
- if (A(x, o[C]))
577
+ ) : s("Invalid argument supplied to oneOf, expected an array.")), i;
578
+ function l(j, v, h, C, g) {
579
+ for (var x = j[v], T = 0; T < o.length; T++)
580
+ if (O(x, o[T]))
586
581
  return null;
587
- var I = JSON.stringify(o, function(M, R) {
588
- var Y = G(R);
589
- return Y === "symbol" ? String(R) : R;
582
+ var D = JSON.stringify(o, function(_, B) {
583
+ var Y = X(B);
584
+ return Y === "symbol" ? String(B) : B;
590
585
  });
591
- return new w("Invalid " + T + " `" + g + "` of value `" + String(x) + "` " + ("supplied to `" + h + "`, expected one of " + I + "."));
586
+ return new w("Invalid " + C + " `" + g + "` of value `" + String(x) + "` " + ("supplied to `" + h + "`, expected one of " + D + "."));
592
587
  }
593
- return S(c);
588
+ return S(l);
594
589
  }
595
590
  function L(o) {
596
- function c(j, v, h, T, g) {
591
+ function l(j, v, h, C, g) {
597
592
  if (typeof o != "function")
598
593
  return new w("Property `" + g + "` of component `" + h + "` has invalid PropType notation inside objectOf.");
599
- var x = j[v], C = W(x);
600
- if (C !== "object")
601
- return new w("Invalid " + T + " `" + g + "` of type " + ("`" + C + "` supplied to `" + h + "`, expected an object."));
602
- for (var I in x)
603
- if (i(x, I)) {
604
- var E = o(x, I, h, T, g + "." + I, r);
594
+ var x = j[v], T = W(x);
595
+ if (T !== "object")
596
+ return new w("Invalid " + C + " `" + g + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected an object."));
597
+ for (var D in x)
598
+ if (a(x, D)) {
599
+ var E = o(x, D, h, C, g + "." + D, r);
605
600
  if (E instanceof Error)
606
601
  return E;
607
602
  }
608
603
  return null;
609
604
  }
610
- return S(c);
605
+ return S(l);
611
606
  }
612
- function it(o) {
607
+ function st(o) {
613
608
  if (!Array.isArray(o))
614
- return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), a;
615
- for (var c = 0; c < o.length; c++) {
616
- var j = o[c];
609
+ return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), i;
610
+ for (var l = 0; l < o.length; l++) {
611
+ var j = o[l];
617
612
  if (typeof j != "function")
618
613
  return s(
619
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ut(j) + " at index " + c + "."
620
- ), a;
614
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ct(j) + " at index " + l + "."
615
+ ), i;
621
616
  }
622
- function v(h, T, g, x, C) {
623
- for (var I = [], E = 0; E < o.length; E++) {
624
- var M = o[E], R = M(h, T, g, x, C, r);
625
- if (R == null)
617
+ function v(h, C, g, x, T) {
618
+ for (var D = [], E = 0; E < o.length; E++) {
619
+ var _ = o[E], B = _(h, C, g, x, T, r);
620
+ if (B == null)
626
621
  return null;
627
- R.data && i(R.data, "expectedType") && I.push(R.data.expectedType);
622
+ B.data && a(B.data, "expectedType") && D.push(B.data.expectedType);
628
623
  }
629
- var Y = I.length > 0 ? ", expected one of type [" + I.join(", ") + "]" : "";
630
- return new w("Invalid " + x + " `" + C + "` supplied to " + ("`" + g + "`" + Y + "."));
624
+ var Y = D.length > 0 ? ", expected one of type [" + D.join(", ") + "]" : "";
625
+ return new w("Invalid " + x + " `" + T + "` supplied to " + ("`" + g + "`" + Y + "."));
631
626
  }
632
627
  return S(v);
633
628
  }
634
- function at() {
635
- function o(c, j, v, h, T) {
636
- return J(c[j]) ? null : new w("Invalid " + h + " `" + T + "` supplied to " + ("`" + v + "`, expected a ReactNode."));
629
+ function ot() {
630
+ function o(l, j, v, h, C) {
631
+ return Z(l[j]) ? null : new w("Invalid " + h + " `" + C + "` supplied to " + ("`" + v + "`, expected a ReactNode."));
637
632
  }
638
633
  return S(o);
639
634
  }
640
- function we(o, c, j, v, h) {
635
+ function je(o, l, j, v, h) {
641
636
  return new w(
642
- (o || "React class") + ": " + c + " type `" + j + "." + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + h + "`."
637
+ (o || "React class") + ": " + l + " type `" + j + "." + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + h + "`."
643
638
  );
644
639
  }
645
- function lt(o) {
646
- function c(j, v, h, T, g) {
647
- var x = j[v], C = W(x);
648
- if (C !== "object")
649
- return new w("Invalid " + T + " `" + g + "` of type `" + C + "` " + ("supplied to `" + h + "`, expected `object`."));
650
- for (var I in o) {
651
- var E = o[I];
640
+ function it(o) {
641
+ function l(j, v, h, C, g) {
642
+ var x = j[v], T = W(x);
643
+ if (T !== "object")
644
+ return new w("Invalid " + C + " `" + g + "` of type `" + T + "` " + ("supplied to `" + h + "`, expected `object`."));
645
+ for (var D in o) {
646
+ var E = o[D];
652
647
  if (typeof E != "function")
653
- return we(h, T, g, I, G(E));
654
- var M = E(x, I, h, T, g + "." + I, r);
655
- if (M)
656
- return M;
648
+ return je(h, C, g, D, X(E));
649
+ var _ = E(x, D, h, C, g + "." + D, r);
650
+ if (_)
651
+ return _;
657
652
  }
658
653
  return null;
659
654
  }
660
- return S(c);
655
+ return S(l);
661
656
  }
662
- function ct(o) {
663
- function c(j, v, h, T, g) {
664
- var x = j[v], C = W(x);
665
- if (C !== "object")
666
- return new w("Invalid " + T + " `" + g + "` of type `" + C + "` " + ("supplied to `" + h + "`, expected `object`."));
667
- var I = t({}, j[v], o);
668
- for (var E in I) {
669
- var M = o[E];
670
- if (i(o, E) && typeof M != "function")
671
- return we(h, T, g, E, G(M));
672
- if (!M)
657
+ function at(o) {
658
+ function l(j, v, h, C, g) {
659
+ var x = j[v], T = W(x);
660
+ if (T !== "object")
661
+ return new w("Invalid " + C + " `" + g + "` of type `" + T + "` " + ("supplied to `" + h + "`, expected `object`."));
662
+ var D = t({}, j[v], o);
663
+ for (var E in D) {
664
+ var _ = o[E];
665
+ if (a(o, E) && typeof _ != "function")
666
+ return je(h, C, g, E, X(_));
667
+ if (!_)
673
668
  return new w(
674
- "Invalid " + T + " `" + g + "` key `" + E + "` supplied to `" + h + "`.\nBad object: " + JSON.stringify(j[v], null, " ") + `
669
+ "Invalid " + C + " `" + g + "` key `" + E + "` supplied to `" + h + "`.\nBad object: " + JSON.stringify(j[v], null, " ") + `
675
670
  Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
676
671
  );
677
- var R = M(x, E, h, T, g + "." + E, r);
678
- if (R)
679
- return R;
672
+ var B = _(x, E, h, C, g + "." + E, r);
673
+ if (B)
674
+ return B;
680
675
  }
681
676
  return null;
682
677
  }
683
- return S(c);
678
+ return S(l);
684
679
  }
685
- function J(o) {
680
+ function Z(o) {
686
681
  switch (typeof o) {
687
682
  case "number":
688
683
  case "string":
@@ -692,20 +687,20 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
692
687
  return !o;
693
688
  case "object":
694
689
  if (Array.isArray(o))
695
- return o.every(J);
690
+ return o.every(Z);
696
691
  if (o === null || d(o))
697
692
  return !0;
698
- var c = u(o);
699
- if (c) {
700
- var j = c.call(o), v;
701
- if (c !== o.entries) {
693
+ var l = u(o);
694
+ if (l) {
695
+ var j = l.call(o), v;
696
+ if (l !== o.entries) {
702
697
  for (; !(v = j.next()).done; )
703
- if (!J(v.value))
698
+ if (!Z(v.value))
704
699
  return !1;
705
700
  } else
706
701
  for (; !(v = j.next()).done; ) {
707
702
  var h = v.value;
708
- if (h && !J(h[1]))
703
+ if (h && !Z(h[1]))
709
704
  return !1;
710
705
  }
711
706
  } else
@@ -715,57 +710,57 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
715
710
  return !1;
716
711
  }
717
712
  }
718
- function dt(o, c) {
719
- return o === "symbol" ? !0 : c ? c["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && c instanceof Symbol : !1;
713
+ function lt(o, l) {
714
+ return o === "symbol" ? !0 : l ? l["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && l instanceof Symbol : !1;
720
715
  }
721
716
  function W(o) {
722
- var c = typeof o;
723
- return Array.isArray(o) ? "array" : o instanceof RegExp ? "object" : dt(c, o) ? "symbol" : c;
717
+ var l = typeof o;
718
+ return Array.isArray(o) ? "array" : o instanceof RegExp ? "object" : lt(l, o) ? "symbol" : l;
724
719
  }
725
- function G(o) {
720
+ function X(o) {
726
721
  if (typeof o > "u" || o === null)
727
722
  return "" + o;
728
- var c = W(o);
729
- if (c === "object") {
723
+ var l = W(o);
724
+ if (l === "object") {
730
725
  if (o instanceof Date)
731
726
  return "date";
732
727
  if (o instanceof RegExp)
733
728
  return "regexp";
734
729
  }
735
- return c;
730
+ return l;
736
731
  }
737
- function ut(o) {
738
- var c = G(o);
739
- switch (c) {
732
+ function ct(o) {
733
+ var l = X(o);
734
+ switch (l) {
740
735
  case "array":
741
736
  case "object":
742
- return "an " + c;
737
+ return "an " + l;
743
738
  case "boolean":
744
739
  case "date":
745
740
  case "regexp":
746
- return "a " + c;
741
+ return "a " + l;
747
742
  default:
748
- return c;
743
+ return l;
749
744
  }
750
745
  }
751
- function pt(o) {
746
+ function dt(o) {
752
747
  return !o.constructor || !o.constructor.name ? m : o.constructor.name;
753
748
  }
754
- return k.checkPropTypes = l, k.resetWarningCache = l.resetWarningCache, k.PropTypes = k, k;
755
- }, de;
749
+ return k.checkPropTypes = c, k.resetWarningCache = c.resetWarningCache, k.PropTypes = k, k;
750
+ }, ce;
756
751
  }
757
- var ue, _e;
758
- function Fn() {
752
+ var de, _e;
753
+ function Ln() {
759
754
  if (_e)
760
- return ue;
755
+ return de;
761
756
  _e = 1;
762
- var n = be();
757
+ var n = xe();
763
758
  function t() {
764
759
  }
765
760
  function r() {
766
761
  }
767
- return r.resetWarningCache = t, ue = function() {
768
- function i(a, d, y, b, p, u) {
762
+ return r.resetWarningCache = t, de = function() {
763
+ function a(i, d, y, b, p, u) {
769
764
  if (u !== n) {
770
765
  var m = new Error(
771
766
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
@@ -773,48 +768,48 @@ function Fn() {
773
768
  throw m.name = "Invariant Violation", m;
774
769
  }
775
770
  }
776
- i.isRequired = i;
777
- function l() {
778
- return i;
771
+ a.isRequired = a;
772
+ function c() {
773
+ return a;
779
774
  }
780
775
  var s = {
781
- array: i,
782
- bigint: i,
783
- bool: i,
784
- func: i,
785
- number: i,
786
- object: i,
787
- string: i,
788
- symbol: i,
789
- any: i,
790
- arrayOf: l,
791
- element: i,
792
- elementType: i,
793
- instanceOf: l,
794
- node: i,
795
- objectOf: l,
796
- oneOf: l,
797
- oneOfType: l,
798
- shape: l,
799
- exact: l,
776
+ array: a,
777
+ bigint: a,
778
+ bool: a,
779
+ func: a,
780
+ number: a,
781
+ object: a,
782
+ string: a,
783
+ symbol: a,
784
+ any: a,
785
+ arrayOf: c,
786
+ element: a,
787
+ elementType: a,
788
+ instanceOf: c,
789
+ node: a,
790
+ objectOf: c,
791
+ oneOf: c,
792
+ oneOfType: c,
793
+ shape: c,
794
+ exact: c,
800
795
  checkPropTypes: r,
801
796
  resetWarningCache: t
802
797
  };
803
798
  return s.PropTypes = s, s;
804
- }, ue;
799
+ }, de;
805
800
  }
806
801
  if (process.env.NODE_ENV !== "production") {
807
- var Wn = Ke, $n = !0;
808
- fe.exports = Ln()(Wn.isElement, $n);
802
+ var Fn = qe, Wn = !0;
803
+ pe.exports = Nn()(Fn.isElement, Wn);
809
804
  } else
810
- fe.exports = Fn()();
811
- var qn = fe.exports;
812
- const P = /* @__PURE__ */ kn(qn);
813
- let tt, nt;
814
- typeof document < "u" && (tt = document);
815
- typeof window < "u" && (nt = window);
816
- const rt = H.createContext({ document: tt, window: nt }), je = () => H.useContext(rt), { Provider: Un, Consumer: Zr } = rt;
817
- class st extends Le {
805
+ pe.exports = Ln()();
806
+ var $n = pe.exports;
807
+ const P = /* @__PURE__ */ wn($n);
808
+ let Qe, et;
809
+ typeof document < "u" && (Qe = document);
810
+ typeof window < "u" && (et = window);
811
+ const tt = z.createContext({ document: Qe, window: et }), be = () => z.useContext(tt), { Provider: qn, Consumer: Gr } = tt;
812
+ class nt extends Ne {
818
813
  componentDidMount() {
819
814
  this.props.contentDidMount();
820
815
  }
@@ -822,21 +817,21 @@ class st extends Le {
822
817
  this.props.contentDidUpdate();
823
818
  }
824
819
  render() {
825
- return yt.only(this.props.children);
820
+ return ht.only(this.props.children);
826
821
  }
827
822
  }
828
- U(st, "propTypes", {
823
+ U(nt, "propTypes", {
829
824
  children: P.element.isRequired,
830
825
  contentDidMount: P.func.isRequired,
831
826
  contentDidUpdate: P.func.isRequired
832
827
  });
833
- class he extends Le {
834
- constructor(r, i) {
835
- super(r, i);
828
+ class fe extends Ne {
829
+ constructor(r, a) {
830
+ super(r, a);
836
831
  U(this, "setRef", (r) => {
837
832
  this.nodeRef.current = r;
838
- const { forwardedRef: i } = this.props;
839
- typeof i == "function" ? i(r) : i && (i.current = r);
833
+ const { forwardedRef: a } = this.props;
834
+ typeof a == "function" ? a(r) : a && (a.current = r);
840
835
  });
841
836
  U(this, "handleLoad", () => {
842
837
  clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
@@ -846,7 +841,7 @@ class he extends Le {
846
841
  U(this, "loadCheck", () => setInterval(() => {
847
842
  this.handleLoad();
848
843
  }, 500));
849
- this._isMounted = !1, this.nodeRef = H.createRef(), this.state = { iframeLoaded: !1 };
844
+ this._isMounted = !1, this.nodeRef = z.createRef(), this.state = { iframeLoaded: !1 };
850
845
  }
851
846
  componentDidMount() {
852
847
  this._isMounted = !0, this.getDoc() && this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded", this.handleLoad);
@@ -867,8 +862,8 @@ class he extends Le {
867
862
  const r = this.getDoc();
868
863
  if (!r)
869
864
  return null;
870
- const i = this.props.contentDidMount, l = this.props.contentDidUpdate, s = r.defaultView || r.parentView, a = /* @__PURE__ */ e.jsx(st, { contentDidMount: i, contentDidUpdate: l, children: /* @__PURE__ */ e.jsx(Un, { value: { document: r, window: s }, children: /* @__PURE__ */ e.jsx("div", { className: "frame-content", children: this.props.children }) }) }), d = this.getMountTarget();
871
- return [Ie.createPortal(this.props.head, this.getDoc().head), Ie.createPortal(a, d)];
865
+ const a = this.props.contentDidMount, c = this.props.contentDidUpdate, s = r.defaultView || r.parentView, i = /* @__PURE__ */ e.jsx(nt, { contentDidMount: a, contentDidUpdate: c, children: /* @__PURE__ */ e.jsx(qn, { value: { document: r, window: s }, children: /* @__PURE__ */ e.jsx("div", { className: "frame-content", children: this.props.children }) }) }), d = this.getMountTarget();
866
+ return [Se.createPortal(this.props.head, this.getDoc().head), Se.createPortal(i, d)];
872
867
  }
873
868
  render() {
874
869
  const r = {
@@ -884,7 +879,7 @@ class he extends Le {
884
879
  // also inject into the body and can mess up React. For this reason
885
880
  // initialContent is expected to have a div inside of the body
886
881
  // element that we render react into.
887
- U(he, "propTypes", {
882
+ U(fe, "propTypes", {
888
883
  style: P.object,
889
884
  // eslint-disable-line
890
885
  head: P.node,
@@ -893,7 +888,7 @@ U(he, "propTypes", {
893
888
  contentDidMount: P.func,
894
889
  contentDidUpdate: P.func,
895
890
  children: P.oneOfType([P.element, P.arrayOf(P.element)])
896
- }), U(he, "defaultProps", {
891
+ }), U(fe, "defaultProps", {
897
892
  style: {},
898
893
  head: null,
899
894
  children: void 0,
@@ -904,30 +899,30 @@ U(he, "propTypes", {
904
899
  },
905
900
  initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
906
901
  });
907
- const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef: t })), zn = ({ children: n }) => {
908
- const { document: t } = je(), [r] = z(), [i, l] = K();
909
- return B(() => {
902
+ const Un = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(fe, { ...n, forwardedRef: t })), zn = ({ children: n }) => {
903
+ const { document: t } = be(), [r] = H(), [a, c] = K();
904
+ return R(() => {
910
905
  setTimeout(() => {
911
- if (!q(i))
906
+ if (!q(a))
912
907
  return;
913
- const s = ot(t, ee(r));
908
+ const s = rt(t, ee(r));
914
909
  if (s) {
915
- const a = s.getAttribute("data-style-prop");
916
- if (a) {
910
+ const i = s.getAttribute("data-style-prop");
911
+ if (i) {
917
912
  const d = s.getAttribute("data-style-id"), y = s.getAttribute("data-block-parent");
918
- l([{ id: d, prop: a, blockId: y }]);
913
+ c([{ id: d, prop: i, blockId: y }]);
919
914
  }
920
915
  }
921
916
  }, 100);
922
- }, [t, r, l, i]), /* @__PURE__ */ e.jsx("div", { id: "canvas", className: "relative h-screen max-w-full outline-2", children: n });
923
- }, ot = (n, t) => n.querySelector(`[data-block-id="${t}"]`), Kn = () => {
924
- const { window: n } = je(), [t, r] = z(), [, i] = K(), { undo: l, redo: s } = ge(), a = Ye(), [, d] = Ut(), [, y] = Ht(), { pasteBlocks: b } = zt(), [, p] = Ve(), u = Ge(), { savePage: m } = Kt(), [k] = X(Yt), [, A] = X(Vt), w = (S) => {
925
- S.key === "Enter" && (S.preventDefault(), t.length === 1 && A(ee(t)));
917
+ }, [t, r, c, a]), /* @__PURE__ */ e.jsx("div", { id: "canvas", className: "relative h-screen max-w-full outline-2", children: n });
918
+ }, rt = (n, t) => n.querySelector(`[data-block-id="${t}"]`), Hn = () => {
919
+ const { window: n } = be(), [t, r] = H(), [, a] = K(), { undo: c, redo: s } = ye(), i = Ue(), [, d] = At(), [, y] = Bt(), { pasteBlocks: b } = Pt(), [, p] = ze(), u = He(), { savePage: m } = Rt(), [k] = J(_t), [, O] = J(Mt), w = (S) => {
920
+ S.key === "Enter" && (S.preventDefault(), t.length === 1 && O(ee(t)));
926
921
  };
927
- return B(() => {
922
+ return R(() => {
928
923
  const S = (f) => {
929
924
  if (f.key === "Escape") {
930
- r([]), i([]);
925
+ r([]), a([]);
931
926
  return;
932
927
  }
933
928
  if (w(f), !k && (f.key === "Delete" || f.key === "Backspace") && (f.preventDefault(), u(t)), f.ctrlKey || f.metaKey) {
@@ -936,7 +931,7 @@ const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef
936
931
  return !0;
937
932
  f.preventDefault();
938
933
  }
939
- f.key === "s" && (f.stopPropagation(), f.preventDefault(), m()), f.key === "z" && l(), f.key === "y" && s(), f.key === "d" && a(t), f.key === "x" && d(t), f.key === "c" && y(t), f.key === "v" && t.length > 0 && b(t[0]);
934
+ f.key === "s" && (f.stopPropagation(), f.preventDefault(), m()), f.key === "z" && c(), f.key === "y" && s(), f.key === "d" && i(t), f.key === "x" && d(t), f.key === "c" && y(t), f.key === "v" && t.length > 0 && b(t[0]);
940
935
  }
941
936
  };
942
937
  return n.removeEventListener("keydown", S), n.addEventListener("keydown", S), () => {
@@ -945,11 +940,11 @@ const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef
945
940
  }, [
946
941
  t,
947
942
  r,
948
- l,
943
+ c,
949
944
  u,
950
945
  p,
951
946
  s,
952
- a,
947
+ i,
953
948
  d,
954
949
  y,
955
950
  b,
@@ -957,8 +952,8 @@ const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef
957
952
  m,
958
953
  n
959
954
  ]), null;
960
- }, Yn = ({ block: n, label: t }) => {
961
- const [, r] = vn(() => ({
955
+ }, Kn = ({ block: n, label: t }) => {
956
+ const [, r] = mn(() => ({
962
957
  type: "CANVAS_BLOCK",
963
958
  item: n
964
959
  }));
@@ -971,71 +966,68 @@ const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef
971
966
  console.log("drag start");
972
967
  },
973
968
  children: [
974
- /* @__PURE__ */ e.jsx(At, {}),
969
+ /* @__PURE__ */ e.jsx(St, {}),
975
970
  t
976
971
  ]
977
972
  }
978
973
  );
979
- }, Vn = ({
980
- selectedBlockElement: n,
981
- block: t
982
- }) => {
983
- const r = Ge(), i = Ye(), [, l] = z(), [, s] = K(), { floatingStyles: a, refs: d, update: y } = yn({
974
+ }, Yn = ({ selectedBlockElement: n, block: t }) => {
975
+ const r = He(), a = Ue(), [, c] = H(), [, s] = K(), { floatingStyles: i, refs: d, update: y } = fn({
984
976
  placement: "top-start",
985
- middleware: [gn(), mn()],
977
+ middleware: [hn(), pn()],
986
978
  elements: {
987
979
  reference: n
988
980
  }
989
981
  });
990
- xn(n, () => y(), n !== null);
991
- const b = O(t, "_parent", null), p = q(O(t, "_name", "")) ? O(t, "_type", "") : O(t, "_name", "");
982
+ vn(n, () => y(), n !== null);
983
+ const b = A(t, "_parent", null), p = q(A(t, "_name", "")) ? A(t, "_type", "") : A(t, "_name", "");
992
984
  return !n || !t ? null : /* @__PURE__ */ e.jsxs(
993
985
  "div",
994
986
  {
995
987
  role: "button",
996
988
  tabIndex: 0,
997
989
  ref: d.setFloating,
998
- style: a,
990
+ style: i,
999
991
  onClick: (u) => {
1000
992
  u.stopPropagation(), u.preventDefault();
1001
993
  },
1002
994
  onKeyDown: (u) => u.stopPropagation(),
1003
995
  className: "z-50 flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
1004
996
  children: [
1005
- /* @__PURE__ */ e.jsx(Yn, { label: p, block: t }),
997
+ /* @__PURE__ */ e.jsx(Kn, { label: p, block: t }),
1006
998
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 px-1 ", children: [
1007
999
  b && /* @__PURE__ */ e.jsx(
1008
- Et,
1000
+ Ct,
1009
1001
  {
1010
1002
  className: "hover:scale-105 ",
1011
1003
  onClick: () => {
1012
- s([]), l([b]);
1004
+ s([]), c([b]);
1013
1005
  }
1014
1006
  }
1015
1007
  ),
1016
- Gt(O(t, "_type", "")) ? /* @__PURE__ */ e.jsx(St, { className: "hover:scale-105 ", onClick: () => i([t == null ? void 0 : t._id]) }) : null,
1017
- Xt(O(t, "_type", "")) ? /* @__PURE__ */ e.jsx(It, { className: "hover:scale-105 ", onClick: () => r([t == null ? void 0 : t._id]) }) : null
1008
+ yn(A(t, "_type", "")) ? /* @__PURE__ */ e.jsx(Tt, { className: "hover:scale-105 ", onClick: () => a([t == null ? void 0 : t._id]) }) : null,
1009
+ gn(A(t, "_type", "")) ? /* @__PURE__ */ e.jsx(Et, { className: "hover:scale-105 ", onClick: () => r([t == null ? void 0 : t._id]) }) : null
1018
1010
  ] })
1019
1011
  ]
1020
1012
  }
1021
1013
  );
1022
- }, Gn = ({ model: n }) => {
1023
- const [t] = Jt(), [r] = z(), [i] = He(), [l] = xe(), [s] = K(), { document: a, window: d } = je(), [y] = $(a == null ? void 0 : a.getElementById("highlighted-block")), [b] = $(
1024
- a == null ? void 0 : a.getElementById("selected-block")
1014
+ }, Vn = ({ model: n }) => {
1015
+ const [t] = Nt(), [r] = H(), [a] = Ye(), [c] = ge(), [s] = K(), { document: i, window: d } = be(), [y] = $(i == null ? void 0 : i.getElementById("highlighted-block")), [b] = $(
1016
+ i == null ? void 0 : i.getElementById("selected-block")
1025
1017
  ), [p] = $(
1026
- a == null ? void 0 : a.getElementById("selected-styling-block")
1018
+ i == null ? void 0 : i.getElementById("selected-styling-block")
1027
1019
  );
1028
- B(() => {
1029
- i ? a == null || a.documentElement.classList.add("dark") : a == null || a.documentElement.classList.remove("dark");
1030
- }, [i, a]);
1031
- const u = O(t, "headingFont", "DM Sans"), m = O(t, "bodyFont", "DM Sans");
1032
- return B(() => {
1033
- const k = O(t, "primaryColor", "#000"), A = O(t, "secondaryColor", "#FFF"), w = bn({
1034
- colors: [k, A],
1020
+ R(() => {
1021
+ a ? i == null || i.documentElement.classList.add("dark") : i == null || i.documentElement.classList.remove("dark");
1022
+ }, [a, i]);
1023
+ const u = A(t, "headingFont", "DM Sans"), m = A(t, "bodyFont", "DM Sans");
1024
+ return R(() => {
1025
+ const k = A(t, "primaryColor", "#000"), O = A(t, "secondaryColor", "#FFF"), w = xn({
1026
+ colors: [k, O],
1035
1027
  names: ["primary", "secondary"]
1036
1028
  });
1037
- w.primary.DEFAULT = k, w.secondary.DEFAULT = A;
1038
- const S = O(t, "roundedCorners", "0");
1029
+ w.primary.DEFAULT = k, w.secondary.DEFAULT = O;
1030
+ const S = A(t, "roundedCorners", "0");
1039
1031
  !d || !d.tailwind || (d.tailwind.config = {
1040
1032
  darkMode: "class",
1041
1033
  theme: {
@@ -1053,33 +1045,33 @@ const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef
1053
1045
  plugins: [
1054
1046
  // @ts-ignore
1055
1047
  d.tailwind.plugin.withOptions(({ prefix: f = "ui" } = {}) => ({ addVariant: F }) => {
1056
- for (const _ of ["open", "checked", "selected", "active", "disabled"])
1057
- F(`${f}-${_}`, [
1058
- `&[data-headlessui-state~="${_}"]`,
1059
- `:where([data-headlessui-state~="${_}"]) &`
1060
- ]), F(`${f}-not-${_}`, [
1061
- `&[data-headlessui-state]:not([data-headlessui-state~="${_}"])`,
1062
- `:where([data-headlessui-state]:not([data-headlessui-state~="${_}"])) &:not([data-headlessui-state])`
1048
+ for (const M of ["open", "checked", "selected", "active", "disabled"])
1049
+ F(`${f}-${M}`, [
1050
+ `&[data-headlessui-state~="${M}"]`,
1051
+ `:where([data-headlessui-state~="${M}"]) &`
1052
+ ]), F(`${f}-not-${M}`, [
1053
+ `&[data-headlessui-state]:not([data-headlessui-state~="${M}"])`,
1054
+ `:where([data-headlessui-state]:not([data-headlessui-state~="${M}"])) &:not([data-headlessui-state])`
1063
1055
  ]);
1064
1056
  })
1065
1057
  ]
1066
1058
  });
1067
- }, [t, d, u, m]), B(() => {
1059
+ }, [t, d, u, m]), R(() => {
1068
1060
  b && (b.textContent = `${Q(r, (k) => `[data-block-id="${k}"]`).join(",")}{
1069
1061
  outline: 1px solid ${r.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
1070
1062
  }`);
1071
- }, [r, b]), B(() => {
1072
- y && (y.textContent = l ? `[data-style-id="${l}"]{ outline: 1px solid orange !important; outline-offset: -1px;}` : "");
1073
- }, [l, r, y]), B(() => {
1063
+ }, [r, b]), R(() => {
1064
+ y && (y.textContent = c ? `[data-style-id="${c}"]{ outline: 1px solid orange !important; outline-offset: -1px;}` : "");
1065
+ }, [c, r, y]), R(() => {
1074
1066
  p && (p.textContent = `${Q(s, ({ id: k }) => `[data-style-id="${k}"]`).join(",")}{
1075
1067
  outline: 1px solid orange !important; outline-offset: -1px;
1076
1068
  }`);
1077
- }, [s, p]), B(() => {
1069
+ }, [s, p]), R(() => {
1078
1070
  if (n === "section")
1079
1071
  return;
1080
- const k = O(t, "bodyTextLightColor", "#64748b"), A = O(t, "bodyTextDarkColor", "#94a3b8"), w = O(t, "bodyBgLightColor", "#FFFFFF"), S = O(t, "bodyBgDarkColor", "#0f172a");
1081
- a.body.className = `font-body antialiased text-[${k}] bg-[${w}] dark:text-[${A}] dark:bg-[${S}]`;
1082
- }, [t, a, n]), n === "page" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1072
+ const k = A(t, "bodyTextLightColor", "#64748b"), O = A(t, "bodyTextDarkColor", "#94a3b8"), w = A(t, "bodyBgLightColor", "#FFFFFF"), S = A(t, "bodyBgDarkColor", "#0f172a");
1073
+ i.body.className = `font-body antialiased text-[${k}] bg-[${w}] dark:text-[${O}] dark:bg-[${S}]`;
1074
+ }, [t, i, n]), n === "page" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1083
1075
  u && /* @__PURE__ */ e.jsx(
1084
1076
  "link",
1085
1077
  {
@@ -1109,53 +1101,53 @@ const Hn = H.forwardRef((n, t) => /* @__PURE__ */ e.jsx(he, { ...n, forwardedRef
1109
1101
  u && /* @__PURE__ */ e.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${u}",ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";}` })
1110
1102
  ] }) : null;
1111
1103
  }, Xn = () => {
1112
- const { t: n } = Je();
1104
+ const { t: n } = Ke();
1113
1105
  return /* @__PURE__ */ e.jsx("div", { className: "my-auto py-24 text-center text-gray-600 dark:text-white", children: /* @__PURE__ */ e.jsx("h1", { className: "mb-10 text-4xl ", children: n("canvas_empty") }) });
1114
1106
  }, Jn = (n) => {
1115
1107
  const t = {};
1116
1108
  return Object.keys(n).forEach((r) => {
1117
- ye(n[r]) && n[r].startsWith(Se) && (t[r] = n[r].replace(Se, "").split(","));
1109
+ me(n[r]) && n[r].startsWith(Ee) && (t[r] = n[r].replace(Ee, "").split(","));
1118
1110
  }), t;
1119
- }, Zn = xt((n) => {
1120
- const t = n.replace(Ze, "").split(",");
1121
- return wn(t[0], t[1]);
1111
+ }, Zn = gt((n) => {
1112
+ const t = n.replace(Je, "").split(",");
1113
+ return jn(t[0], t[1]);
1122
1114
  });
1123
- function Qn(n, t) {
1124
- return O(n, `${t}_attrs`, {});
1115
+ function Gn(n, t) {
1116
+ return A(n, `${t}_attrs`, {});
1125
1117
  }
1126
- function er(n, t, r, i) {
1127
- const l = {};
1118
+ function Qn(n, t, r, a) {
1119
+ const c = {};
1128
1120
  return Object.keys(n).forEach((s) => {
1129
- if (ye(n[s]) && n[s].startsWith(Ze)) {
1130
- const a = Zn(n[s]);
1131
- l[s] = {
1132
- className: a,
1121
+ if (me(n[s]) && n[s].startsWith(Je)) {
1122
+ const i = Zn(n[s]);
1123
+ c[s] = {
1124
+ className: i,
1133
1125
  "data-style-prop": s,
1134
1126
  "data-block-parent": n._id,
1135
1127
  "data-style-id": `${s}-${n._id}`,
1136
1128
  onMouseEnter: t,
1137
1129
  onMouseLeave: r,
1138
- onClick: i,
1139
- ...Qn(n, s)
1130
+ onClick: a,
1131
+ ...Gn(n, s)
1140
1132
  };
1141
1133
  }
1142
- }), l;
1134
+ }), c;
1143
1135
  }
1144
- function tr(n, t) {
1145
- const r = O(n, "_bindings", {});
1146
- return q(r) ? { ...n } : (pe(r, (i, l) => {
1147
- ye(i) && O(t, i, null) && (n[l] = O(t, i, null));
1136
+ function er(n, t) {
1137
+ const r = A(n, "_bindings", {});
1138
+ return q(r) ? { ...n } : (ue(r, (a, c) => {
1139
+ me(a) && A(t, a, null) && (n[c] = A(t, a, null));
1148
1140
  }), n);
1149
1141
  }
1150
- function me({ blocks: n }) {
1151
- const t = Xe(), [, r] = xe(), [, i] = K(), [, l] = z(), s = V(
1142
+ function he({ blocks: n }) {
1143
+ const t = Xe(), [, r] = ge(), [, a] = K(), [, c] = H(), s = V(
1152
1144
  (p) => {
1153
1145
  var m;
1154
1146
  const u = (m = p.currentTarget) == null ? void 0 : m.getAttribute("data-style-id");
1155
1147
  r(u || ""), p.stopPropagation();
1156
1148
  },
1157
1149
  [r]
1158
- ), a = V(
1150
+ ), i = V(
1159
1151
  (p) => {
1160
1152
  r(""), p.stopPropagation();
1161
1153
  },
@@ -1165,30 +1157,30 @@ function me({ blocks: n }) {
1165
1157
  p.stopPropagation();
1166
1158
  const u = p.currentTarget;
1167
1159
  if (u.getAttribute("data-block-parent")) {
1168
- const m = u.getAttribute("data-style-prop"), k = u.getAttribute("data-style-id"), A = u.getAttribute("data-block-parent");
1169
- i([{ id: k, prop: m, blockId: A }]), l([A]);
1170
- } else if (u.getAttribute("data-block-id") && (l([u.getAttribute("data-block-id")]), u.getAttribute("data-block-parent"))) {
1171
- const m = u.getAttribute("data-style-prop"), k = u.getAttribute("data-style-id"), A = u.getAttribute("data-block-parent");
1172
- i([{ id: k, prop: m, blockId: A }]);
1160
+ const m = u.getAttribute("data-style-prop"), k = u.getAttribute("data-style-id"), O = u.getAttribute("data-block-parent");
1161
+ a([{ id: k, prop: m, blockId: O }]), c([O]);
1162
+ } else if (u.getAttribute("data-block-id") && (c([u.getAttribute("data-block-id")]), u.getAttribute("data-block-parent"))) {
1163
+ const m = u.getAttribute("data-style-prop"), k = u.getAttribute("data-style-id"), O = u.getAttribute("data-block-parent");
1164
+ a([{ id: k, prop: m, blockId: O }]);
1173
1165
  }
1174
1166
  },
1175
- [i, l]
1167
+ [a, c]
1176
1168
  ), y = V(
1177
- (p) => er(p, s, a, d),
1178
- [d, s, a]
1179
- ), [b] = Qe();
1180
- return /* @__PURE__ */ e.jsx(e.Fragment, { children: H.Children.toArray(
1169
+ (p) => Qn(p, s, i, d),
1170
+ [d, s, i]
1171
+ ), [b] = Ze();
1172
+ return /* @__PURE__ */ e.jsx(e.Fragment, { children: z.Children.toArray(
1181
1173
  n.map((p, u) => {
1182
1174
  const m = Jn(p), k = {};
1183
1175
  q(m) || Object.keys(m).forEach((f) => {
1184
- k[f] = H.Children.toArray(
1185
- m[f].map((F) => /* @__PURE__ */ e.jsx(me, { blocks: [We(t, { _id: F })] }))
1176
+ k[f] = z.Children.toArray(
1177
+ m[f].map((F) => /* @__PURE__ */ e.jsx(he, { blocks: [Fe(t, { _id: F })] }))
1186
1178
  );
1187
1179
  });
1188
- const A = $e(t, { _parent: p._id });
1189
- k.children = A.length ? /* @__PURE__ */ e.jsx(me, { blocks: A }) : null;
1190
- const w = Cn(p._type), S = O(w, "component", null);
1191
- return bt(S) ? /* @__PURE__ */ e.jsx("noscript", { children: `<!-- ${p == null ? void 0 : p._type} not registered -->` }) : /* @__PURE__ */ e.jsx(Fe, { children: H.createElement(S, {
1180
+ const O = We(t, { _parent: p._id });
1181
+ k.children = O.length ? /* @__PURE__ */ e.jsx(he, { blocks: O }) : null;
1182
+ const w = Cn(p._type), S = A(w, "component", null);
1183
+ return vt(S) ? /* @__PURE__ */ e.jsx("noscript", { children: `<!-- ${p == null ? void 0 : p._type} not registered -->` }) : /* @__PURE__ */ e.jsx(Le, { children: z.createElement(S, {
1192
1184
  blockProps: {
1193
1185
  onClick: d,
1194
1186
  "data-block-id": p._id,
@@ -1196,80 +1188,80 @@ function me({ blocks: n }) {
1196
1188
  },
1197
1189
  inBuilder: !0,
1198
1190
  index: u,
1199
- ...tr(p, b),
1191
+ ...er(p, b),
1200
1192
  ...y(p),
1201
1193
  ...k
1202
1194
  }) });
1203
1195
  })
1204
1196
  ) });
1205
1197
  }
1206
- const nr = () => {
1198
+ const tr = () => {
1207
1199
  const n = Xe();
1208
- return /* @__PURE__ */ e.jsx(jn, { children: q(n) ? /* @__PURE__ */ e.jsx(Xn, {}) : /* @__PURE__ */ e.jsx(Sn, { children: /* @__PURE__ */ e.jsx(me, { blocks: $e(n, (t) => q(t._parent)) }) }) });
1209
- }, rr = (n, t) => n.querySelector(`[data-style-id="${t}"]`), sr = () => {
1210
- const [n] = X(Zt), [t] = Ve(), [r] = ve(), [, i] = z(), l = Qt(), [, s] = xe(), a = ke(null), d = ke(null), [y, b] = $({ width: 0, height: 0 }), p = Mn(y), [u, m] = $(0), [k, A] = $([]), [, w] = $([]), [, S] = X(en), [f, F] = K(), _ = qe("loadingCanvas", !1);
1211
- B(() => {
1212
- const { clientWidth: D, clientHeight: N } = d.current;
1213
- b({ width: D, height: N }), u === 0 && m(D);
1200
+ return /* @__PURE__ */ e.jsx(bn, { children: q(n) ? /* @__PURE__ */ e.jsx(Xn, {}) : /* @__PURE__ */ e.jsx(En, { children: /* @__PURE__ */ e.jsx(he, { blocks: We(n, (t) => q(t._parent)) }) }) });
1201
+ }, nr = (n, t) => n.querySelector(`[data-style-id="${t}"]`), rr = () => {
1202
+ const [n] = J(Lt), [t] = ze(), [r] = ve(), [, a] = H(), c = Ft(), [, s] = ge(), i = we(null), d = we(null), [y, b] = $({ width: 0, height: 0 }), p = Rn(y), [u, m] = $(0), [k, O] = $([]), [, w] = $([]), [, S] = J(Wt), [f, F] = K(), M = Dt("loadingCanvas", !1);
1203
+ R(() => {
1204
+ const { clientWidth: I, clientHeight: N } = d.current;
1205
+ b({ width: I, height: N }), u === 0 && m(I);
1214
1206
  }, [d, r, u]);
1215
- const ne = (D, N = 0) => {
1216
- const { top: L } = D.getBoundingClientRect();
1207
+ const ne = (I, N = 0) => {
1208
+ const { top: L } = I.getBoundingClientRect();
1217
1209
  return L + N >= 0 && L - N <= window.innerHeight;
1218
1210
  };
1219
- B(() => {
1220
- var D, N;
1221
- if (l && l.type !== "Multiple" && a.current) {
1222
- const L = ot(a.current.contentDocument, l._id);
1223
- L && (ne(L) || (N = (D = a.current) == null ? void 0 : D.contentWindow) == null || N.scrollTo({ top: L.offsetTop, behavior: "smooth" }), A([L]));
1211
+ R(() => {
1212
+ var I, N;
1213
+ if (c && c.type !== "Multiple" && i.current) {
1214
+ const L = rt(i.current.contentDocument, c._id);
1215
+ L && (ne(L) || (N = (I = i.current) == null ? void 0 : I.contentWindow) == null || N.scrollTo({ top: L.offsetTop, behavior: "smooth" }), O([L]));
1224
1216
  }
1225
- }, [l]), B(() => {
1226
- if (!q(f) && a.current) {
1227
- const D = rr(
1228
- a.current.contentDocument,
1217
+ }, [c]), R(() => {
1218
+ if (!q(f) && i.current) {
1219
+ const I = nr(
1220
+ i.current.contentDocument,
1229
1221
  ee(f).id
1230
1222
  );
1231
- w(D ? [D] : [null]);
1223
+ w(I ? [I] : [null]);
1232
1224
  } else
1233
1225
  w([null]);
1234
1226
  }, [f]);
1235
- const re = Ne(() => {
1236
- let D = Bn;
1237
- return n === "offline" && (D = D.replace(
1238
- "https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio",
1227
+ const re = Me(() => {
1228
+ let I = Pn;
1229
+ return n === "offline" && (I = I.replace(
1230
+ "https://old.chaibuilder.com/offline/tailwind.cdn.js",
1239
1231
  "/offline/tailwind.cdn.js"
1240
- ), D = D.replace("https://unpkg.com/aos@next/dist/aos.css", "/offline/aos.css"), D = D.replace("https://unpkg.com/aos@next/dist/aos.js", "/offline/aos.js")), D;
1232
+ ), I = I.replace("https://unpkg.com/aos@next/dist/aos.css", "/offline/aos.css"), I = I.replace("https://unpkg.com/aos@next/dist/aos.js", "/offline/aos.js")), I;
1241
1233
  }, [n]);
1242
1234
  return /* @__PURE__ */ e.jsx(
1243
1235
  "div",
1244
1236
  {
1245
1237
  onClick: () => {
1246
- i([]), F([]);
1238
+ a([]), F([]);
1247
1239
  },
1248
1240
  onMouseLeave: () => setTimeout(() => s(""), 300),
1249
- className: "relative mx-auto h-full w-full bg-black/80",
1241
+ className: "relative mx-auto h-full w-full",
1250
1242
  style: u > 0 && !q(p) ? { width: t ? "100%" : u } : {},
1251
1243
  ref: d,
1252
1244
  children: /* @__PURE__ */ e.jsxs(
1253
- Hn,
1245
+ Un,
1254
1246
  {
1255
- contentDidMount: () => S(a.current),
1256
- ref: a,
1247
+ contentDidMount: () => S(i.current),
1248
+ ref: i,
1257
1249
  id: "canvas-iframe",
1258
1250
  style: { width: `${r}px`, ...p },
1259
1251
  className: "relative mx-auto box-content h-full max-w-full shadow-md transition-all duration-300 ease-linear",
1260
1252
  initialContent: re,
1261
1253
  children: [
1262
- /* @__PURE__ */ e.jsx(Kn, {}),
1254
+ /* @__PURE__ */ e.jsx(Hn, {}),
1263
1255
  /* @__PURE__ */ e.jsx(
1264
- Vn,
1256
+ Yn,
1265
1257
  {
1266
- block: l,
1258
+ block: c,
1267
1259
  selectedBlockElement: ee(k)
1268
1260
  }
1269
1261
  ),
1270
- /* @__PURE__ */ e.jsx(Gn, { model: "page" }),
1262
+ /* @__PURE__ */ e.jsx(Vn, { model: "page" }),
1271
1263
  /* @__PURE__ */ e.jsxs(zn, { children: [
1272
- _ ? /* @__PURE__ */ e.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ e.jsx(Ue, { className: "h-full" }) }) : /* @__PURE__ */ e.jsx(nr, {}),
1264
+ M ? /* @__PURE__ */ e.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ e.jsx($e, { className: "h-full" }) }) : /* @__PURE__ */ e.jsx(tr, {}),
1273
1265
  /* @__PURE__ */ e.jsx("div", { className: "h-60" })
1274
1266
  ] })
1275
1267
  ]
@@ -1277,26 +1269,23 @@ const nr = () => {
1277
1269
  )
1278
1270
  }
1279
1271
  );
1280
- }, or = gt(() => import("./AddBlocks-d10b7b87.js")), Qr = () => {
1281
- const n = qe("mode", oe.STATIC), [t, r] = X(tn), i = {
1282
- [oe.STATIC]: /* @__PURE__ */ e.jsx(sr, {}),
1283
- [oe.FRAMEWORK]: null
1284
- }[n];
1272
+ }, sr = mt(() => import("./AddBlocks-xR2s2BVa.js")), Qr = () => {
1273
+ const [n, t] = J($t);
1285
1274
  return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1286
- /* @__PURE__ */ e.jsx(Pn, {}),
1287
- /* @__PURE__ */ e.jsxs("div", { className: "relative flex-1 overflow-hidden bg-slate-800/20 bg-[linear-gradient(to_right,#EEE_0.5px,transparent_0.5px),linear-gradient(to_bottom,#EEE_0.5px,transparent_0.5px)] bg-[size:12px_12px]", children: [
1288
- /* @__PURE__ */ e.jsx(Fe, { fallback: /* @__PURE__ */ e.jsx(Ue, { className: "h-full" }), children: /* @__PURE__ */ e.jsx(nn, { children: i }) }),
1289
- t ? /* @__PURE__ */ e.jsx(
1275
+ /* @__PURE__ */ e.jsx(Bn, {}),
1276
+ /* @__PURE__ */ e.jsxs("div", { className: "relative flex-1 overflow-hidden bg-slate-800/80 px-2 bg-[linear-gradient(to_right,#EEE_0.5px,transparent_0.5px),linear-gradient(to_bottom,#EEE_0.5px,transparent_0.5px)] bg-[size:12px_12px]", children: [
1277
+ /* @__PURE__ */ e.jsx(Le, { fallback: /* @__PURE__ */ e.jsx($e, { className: "h-full" }), children: /* @__PURE__ */ e.jsx(qt, { children: /* @__PURE__ */ e.jsx(rr, {}) }) }),
1278
+ n ? /* @__PURE__ */ e.jsx(
1290
1279
  "div",
1291
1280
  {
1292
- onClick: () => r(!1),
1281
+ onClick: () => t(!1),
1293
1282
  className: "absolute inset-0 z-50 flex items-center bg-black/30 backdrop-blur-sm",
1294
1283
  children: /* @__PURE__ */ e.jsx(
1295
1284
  "div",
1296
1285
  {
1297
- onClick: (l) => l.stopPropagation(),
1286
+ onClick: (r) => r.stopPropagation(),
1298
1287
  className: "mx-auto h-[90%] w-[90%] max-w-3xl rounded-md bg-white p-4 shadow-lg shadow-black/10 xl:w-[65%]",
1299
- children: /* @__PURE__ */ e.jsx(or, {})
1288
+ children: /* @__PURE__ */ e.jsx(sr, {})
1300
1289
  }
1301
1290
  )
1302
1291
  }