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