@chaibuilder/sdk 0.1.17 → 0.1.18

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 (89) hide show
  1. package/dist/AddBlocks-5cb44efb.cjs +3 -0
  2. package/dist/{AddBlocks-7b723045.js → AddBlocks-c47af38f.js} +49 -45
  3. package/dist/BrandingOptions-4f3e3a8d.cjs +1 -0
  4. package/dist/{BrandingOptions-b0624d8f.js → BrandingOptions-52b2de6f.js} +11 -7
  5. package/dist/CanvasArea-90a395c1.js +1311 -0
  6. package/dist/CanvasArea-aef3fa5e.cjs +46 -0
  7. package/dist/{CurrentPage-e0c8b063.js → CurrentPage-2721bc7b.js} +18 -14
  8. package/dist/CurrentPage-d1ec06db.cjs +1 -0
  9. package/dist/{ImagesPanel-68a11293.cjs → ImagesPanel-0db5c72f.cjs} +1 -1
  10. package/dist/{ImagesPanel-996761b1.js → ImagesPanel-38c44785.js} +1 -1
  11. package/dist/{Layers-20ce5cb3.js → Layers-a9cf4d7c.js} +144 -142
  12. package/dist/Layers-d0edf1a8.cjs +1 -0
  13. package/dist/{MarkAsGlobalBlock-96dd248c.js → MarkAsGlobalBlock-0cf6e5a2.js} +15 -11
  14. package/dist/MarkAsGlobalBlock-c43c3b2c.cjs +1 -0
  15. package/dist/PagesPanel-22050a98.cjs +1 -0
  16. package/dist/{PagesPanel-6f5393e8.js → PagesPanel-589544c2.js} +12 -8
  17. package/dist/ProjectPanel-215ba7f1.cjs +1 -0
  18. package/dist/{ProjectPanel-b027fc0d.js → ProjectPanel-dbea8af1.js} +12 -8
  19. package/dist/Settings-71c0312b.cjs +1 -0
  20. package/dist/{Settings-5bae2bdf.js → Settings-c347533e.js} +909 -640
  21. package/dist/SidePanels-214fef72.js +2999 -0
  22. package/dist/SidePanels-3844d8b5.cjs +13 -0
  23. package/dist/{Topbar-ba10ddd1.js → Topbar-1dd5c34e.js} +23 -19
  24. package/dist/Topbar-4fa3ab61.cjs +1 -0
  25. package/dist/{UnsplashImages-f761ad96.cjs → UnsplashImages-0d091e33.cjs} +1 -1
  26. package/dist/{UnsplashImages-47374e0c.js → UnsplashImages-10c95b63.js} +1 -1
  27. package/dist/{UploadImages-33c1507a.cjs → UploadImages-10439fde.cjs} +1 -1
  28. package/dist/{UploadImages-f0ba3215.js → UploadImages-b14bd152.js} +1 -1
  29. package/dist/_commonjsHelpers-10dfc225.js +8 -0
  30. package/dist/_commonjsHelpers-87b0abe8.cjs +1 -0
  31. package/dist/add-page-modal-05c947fb.cjs +1 -0
  32. package/dist/{add-page-modal-b5f3aeab.js → add-page-modal-5cc1393d.js} +14 -11
  33. package/dist/card-14e1d020.cjs +1 -0
  34. package/dist/card-f8f4f985.js +33 -0
  35. package/dist/core.cjs +1 -1
  36. package/dist/core.d.ts +6 -4
  37. package/dist/core.js +63 -59
  38. package/dist/delete-page-modal-859c3a09.cjs +1 -0
  39. package/dist/{delete-page-modal-b1d253ae.js → delete-page-modal-a79bfc45.js} +10 -6
  40. package/dist/{form-bf09d392.js → form-725e3191.js} +3 -3
  41. package/dist/{form-5d04c9b3.cjs → form-99b51245.cjs} +1 -1
  42. package/dist/index-dfeadcce.cjs +164 -0
  43. package/dist/index-f8a2f8ef.js +31068 -0
  44. package/dist/{link-6467eda6.js → link-2af5de8b.js} +1 -1
  45. package/dist/{link-4585b2d6.cjs → link-86ac8848.cjs} +1 -1
  46. package/dist/page-viewer-aac7b439.cjs +1 -0
  47. package/dist/{page-viewer-11b81948.js → page-viewer-c6421156.js} +19 -15
  48. package/dist/project-general-setting-ce814ecf.cjs +1 -0
  49. package/dist/{project-general-setting-9f37b1ac.js → project-general-setting-f9fd21cc.js} +9 -7
  50. package/dist/{project-seo-setting-3f645a02.cjs → project-seo-setting-a9403f1d.cjs} +1 -1
  51. package/dist/{project-seo-setting-e9587467.js → project-seo-setting-c1980ec3.js} +3 -3
  52. package/dist/render.cjs +1 -1
  53. package/dist/render.js +1 -1
  54. package/dist/{scroll-area-9f64a082.js → scroll-area-83bd9e8f.js} +7 -7
  55. package/dist/{scroll-area-088530b9.cjs → scroll-area-bb343b86.cjs} +1 -1
  56. package/dist/{single-page-detail-085b82ca.js → single-page-detail-2ac00c2e.js} +32 -30
  57. package/dist/single-page-detail-dcbb3cab.cjs +1 -0
  58. package/dist/style.css +1 -1
  59. package/dist/textarea-20b2f6b2.cjs +1 -0
  60. package/dist/textarea-9dfb6a32.js +45 -0
  61. package/dist/ui.cjs +1 -1
  62. package/dist/ui.js +74 -73
  63. package/dist/useChaiExternalData-192c7896.js +5 -0
  64. package/dist/useChaiExternalData-a90e8aac.cjs +1 -0
  65. package/package.json +5 -3
  66. package/dist/AddBlocks-3d30d446.cjs +0 -3
  67. package/dist/BrandingOptions-daafdabf.cjs +0 -1
  68. package/dist/CanvasArea-93be7e7b.cjs +0 -60
  69. package/dist/CanvasArea-d301c4ef.js +0 -1459
  70. package/dist/CurrentPage-478eb8a0.cjs +0 -1
  71. package/dist/Layers-85854772.cjs +0 -1
  72. package/dist/MarkAsGlobalBlock-5a36e8ad.cjs +0 -1
  73. package/dist/PagesPanel-39cc0156.cjs +0 -1
  74. package/dist/ProjectPanel-027fb151.cjs +0 -1
  75. package/dist/Settings-d9dc47d7.cjs +0 -1
  76. package/dist/SidePanels-9ac03c5d.js +0 -149
  77. package/dist/SidePanels-fe464a57.cjs +0 -1
  78. package/dist/Topbar-e00f11e0.cjs +0 -1
  79. package/dist/_commonjsHelpers-5a53b418.cjs +0 -1
  80. package/dist/_commonjsHelpers-d4512b9c.js +0 -6
  81. package/dist/add-page-modal-b267650f.cjs +0 -1
  82. package/dist/delete-page-modal-04b3677b.cjs +0 -1
  83. package/dist/index-1e878777.cjs +0 -2
  84. package/dist/index-95757b80.js +0 -5028
  85. package/dist/page-viewer-f41c53e3.cjs +0 -1
  86. package/dist/project-general-setting-51da3f18.cjs +0 -1
  87. package/dist/single-page-detail-a251b327.cjs +0 -1
  88. package/dist/textarea-0750bcd2.js +0 -73
  89. package/dist/textarea-a338ede6.cjs +0 -1
@@ -1,1459 +0,0 @@
1
- var vt = Object.defineProperty;
2
- var gt = (e, r, n) => r in e ? vt(e, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[r] = n;
3
- var V = (e, r, n) => (gt(e, typeof r != "symbol" ? r + "" : r, n), n);
4
- import { j as t } from "./jsx-runtime-944c88e2.js";
5
- import G, { createElement as xt, useCallback as Q, useState as H, useEffect as F, Component as Xe, Children as bt, Suspense as Ze, useRef as Oe, useMemo as wt, lazy as Et } from "react";
6
- import { map as ie, includes as Me, toUpper as ye, round as St, isEmpty as ee, first as ce, get as B, memoize as Tt, find as jt, filter as Je, isNull as Ct, isString as Qe } from "lodash";
7
- import { ResetIcon as De, DotsVerticalIcon as kt, MobileIcon as $e, LaptopIcon as Rt, DesktopIcon as At, EraserIcon as _t, ZoomInIcon as Pt, ArrowUpIcon as It, CopyIcon as Ot, TrashIcon as Mt, DragHandleDots2Icon as Dt } from "@radix-ui/react-icons";
8
- import { B as le, u as et, S as tt } from "./useBuilderProp-81a14920.js";
9
- import { c as ke, d as rt, e as Re, f as $t, g as Bt, h as X, i as Z, j as Nt, k as nt, l as ot, m as Lt, n as Ft, o as Wt, p as st, q as at, u as qt, r as Ut, s as Yt, t as zt, v as Ht, w as Kt, x as Ae, y as it, z as Vt, A as Gt, B as Xt, b as Zt, E as Jt } from "./index-95757b80.js";
10
- import { useTranslation as ct } from "react-i18next";
11
- import { S as se } from "./separator-a80d065b.js";
12
- import { S as Qt, D as er, c as tr, d as rr, h as nr, i as or, f as sr, H as ar, a as ir, b as cr } from "./dropdown-menu-ae3ed09b.js";
13
- import { L as lr } from "./label-e770a087.js";
14
- import { A as dr, a as ur, b as fr, c as pr, e as hr, f as mr, d as yr, h as vr, g as gr } from "./alert-dialog-ee98f47e.js";
15
- import { useAtom as te } from "jotai";
16
- import { flip as xr } from "@floating-ui/dom";
17
- import { useFloating as br, shift as wr } from "@floating-ui/react-dom";
18
- import { useDrag as Er } from "react-dnd";
19
- import { useResizeObserver as Sr } from "@react-hookz/web";
20
- import { tailwindcssPaletteGenerator as Tr } from "@bobthered/tailwindcss-palette-generator";
21
- import { Provider as jr } from "react-wrap-balancer";
22
- import { twMerge as Cr } from "tailwind-merge";
23
- import { S as lt, a as Be } from "./MODIFIERS-c2e02614.js";
24
- import { getBlockComponent as kr } from "@chaibuilder/blocks";
25
- import Ne from "react-dom";
26
- import { g as Rr } from "./_commonjsHelpers-d4512b9c.js";
27
- import "@radix-ui/react-slot";
28
- import "class-variance-authority";
29
- import "./utils-ac68b2c8.js";
30
- import "clsx";
31
- import "@radix-ui/react-tooltip";
32
- import "@radix-ui/react-toast";
33
- import "i18next";
34
- import "flagged";
35
- import "@minoru/react-dnd-treeview";
36
- import "react-hotkeys-hook";
37
- import "flat-to-nested";
38
- import "./html-to-json-8397fab5.js";
39
- import "himalaya";
40
- import "redux-undo";
41
- import "lucide-react";
42
- import "sonner";
43
- import "@radix-ui/react-separator";
44
- import "@radix-ui/react-switch";
45
- import "@radix-ui/react-hover-card";
46
- import "@radix-ui/react-dropdown-menu";
47
- import "@radix-ui/react-label";
48
- import "@radix-ui/react-alert-dialog";
49
- const Ar = () => {
50
- const { undoCount: e, redoCount: r, undo: n, redo: i } = ke();
51
- return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
52
- /* @__PURE__ */ t.jsx(le, { disabled: !e, size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ t.jsx(De, {}) }),
53
- /* @__PURE__ */ t.jsx(le, { disabled: !r, onClick: i, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ t.jsx(De, { className: "rotate-180 scale-y-[-1] transform" }) })
54
- ] });
55
- };
56
- function _r() {
57
- const [e, r] = rt(), { t: n } = ct();
58
- return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
59
- /* @__PURE__ */ t.jsx(lr, { htmlFor: "dark-mode-switch", children: n("dark_mode") }),
60
- /* @__PURE__ */ t.jsxs(
61
- Qt,
62
- {
63
- id: "dark-mode-switch",
64
- checked: e,
65
- onCheckedChange: () => {
66
- r(!e);
67
- },
68
- className: `${e ? "bg-violet-600" : "bg-violet-300"}
69
- relative ml-2 inline-flex h-[20px] w-[40px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,
70
- children: [
71
- /* @__PURE__ */ t.jsx("span", { className: "sr-only", children: "Use setting" }),
72
- /* @__PURE__ */ t.jsx(
73
- "span",
74
- {
75
- "aria-hidden": "true",
76
- className: `${e ? "translate-x-5" : "translate-x-0"}
77
- pointer-events-none -mt-px inline-block h-[18px] w-[20px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`
78
- }
79
- )
80
- ]
81
- }
82
- )
83
- ] });
84
- }
85
- const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ t.jsxs(
86
- "svg",
87
- {
88
- className: e ? "rotate-90" : "",
89
- xmlns: "http://www.w3.org/2000/svg",
90
- viewBox: "0 0 13 13",
91
- xmlSpace: "preserve",
92
- width: 13,
93
- height: 13,
94
- children: [
95
- /* @__PURE__ */ t.jsx("g", { strokeWidth: 0 }),
96
- /* @__PURE__ */ t.jsx("g", { strokeLinecap: "round", strokeLinejoin: "round" }),
97
- /* @__PURE__ */ t.jsx(
98
- "path",
99
- {
100
- d: "M10.65 0H2.349a.851.851 0 0 0-.851.852v11.299c0 .47.382.852.851.852h8.3a.851.851 0 0 0 .851-.852V.852A.851.851 0 0 0 10.65 0zM6.599 12.466a.367.367 0 1 1 0-.735.367.367 0 0 1 0 .735zm3.9-1.267H2.5V1h8.001v10.199z",
101
- style: {
102
- fill: "#000"
103
- }
104
- }
105
- )
106
- ]
107
- }
108
- ), Fe = [
109
- {
110
- title: "Mobile (XS)",
111
- content: "Styles set here are applied to all screen unless edited at higher breakpoint",
112
- breakpoint: "xs",
113
- icon: /* @__PURE__ */ t.jsx($e, {}),
114
- width: 400
115
- },
116
- {
117
- title: "Mobile landscape (SM)",
118
- content: "Styles set here are applied at 640px and up unless edited at higher breakpoint",
119
- breakpoint: "sm",
120
- icon: /* @__PURE__ */ t.jsx($e, { className: "rotate-90" }),
121
- width: 640
122
- },
123
- {
124
- title: "Tablet (MD)",
125
- content: "Styles set here are applied at 768px and up",
126
- breakpoint: "md",
127
- icon: /* @__PURE__ */ t.jsx(Le, {}),
128
- width: 800
129
- },
130
- {
131
- title: "Tablet Landscape (LG)",
132
- content: "Styles set here are applied at 1024px and up unless edited at higher breakpoint",
133
- breakpoint: "lg",
134
- icon: /* @__PURE__ */ t.jsx(Le, { landscape: !0 }),
135
- width: 1024
136
- },
137
- {
138
- title: "Desktop (XL)",
139
- content: "Styles set here are applied at 1280px and up unless edited at higher breakpoint",
140
- breakpoint: "xl",
141
- icon: /* @__PURE__ */ t.jsx(Rt, {}),
142
- width: 1420
143
- },
144
- {
145
- title: "Large Desktop (2XL)",
146
- content: "Styles set here are applied at 1536px and up",
147
- breakpoint: "2xl",
148
- icon: /* @__PURE__ */ t.jsx(At, {}),
149
- width: 1920
150
- }
151
- ], Pr = ({
152
- title: e,
153
- content: r,
154
- currentBreakpoint: n,
155
- breakpoint: i,
156
- width: d,
157
- icon: s,
158
- onClick: a
159
- }) => /* @__PURE__ */ t.jsxs(ar, { children: [
160
- /* @__PURE__ */ t.jsx(ir, { asChild: !0, children: /* @__PURE__ */ t.jsx(
161
- le,
162
- {
163
- onClick: () => a(d),
164
- size: "sm",
165
- variant: i === n ? "secondary" : "ghost",
166
- children: s
167
- }
168
- ) }),
169
- /* @__PURE__ */ t.jsx(cr, { className: "w-52 border-border", children: /* @__PURE__ */ t.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ t.jsxs("div", { className: "space-y-1", children: [
170
- /* @__PURE__ */ t.jsx("h4", { className: "text-sm font-semibold", children: e }),
171
- /* @__PURE__ */ t.jsx("p", { className: "text-xs", children: r })
172
- ] }) }) })
173
- ] }), Ir = () => {
174
- const [, e, r] = Re(), [n, i] = $t(), d = (s) => {
175
- n.includes(s) ? n.length > 2 && i(n.filter((a) => a !== s)) : i((a) => [...a, s]);
176
- };
177
- return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center rounded-md", children: [
178
- ie(
179
- Fe.filter((s) => Me(n, ye(s.breakpoint))),
180
- (s) => /* @__PURE__ */ xt(Pr, { ...s, onClick: r, key: s.breakpoint, currentBreakpoint: e })
181
- ),
182
- /* @__PURE__ */ t.jsxs(er, { children: [
183
- /* @__PURE__ */ t.jsx(tr, { asChild: !0, children: /* @__PURE__ */ t.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ t.jsx(kt, { className: "scale-90 transform" }) }) }),
184
- /* @__PURE__ */ t.jsxs(rr, { className: "w-56 border-border text-xs", children: [
185
- /* @__PURE__ */ t.jsx(nr, { children: "Breakpoints" }),
186
- /* @__PURE__ */ t.jsx(or, {}),
187
- ie(Fe, (s) => /* @__PURE__ */ t.jsx(
188
- sr,
189
- {
190
- disabled: s.breakpoint === "xs",
191
- onCheckedChange: () => d(ye(s.breakpoint)),
192
- checked: Me(n, ye(s.breakpoint)),
193
- children: s.title
194
- },
195
- s.breakpoint
196
- ))
197
- ] })
198
- ] })
199
- ] });
200
- }, Or = () => {
201
- const [e] = Bt(), { createSnapshot: r } = ke(), [, n] = X(), [, i] = Z(), d = Q(() => {
202
- e([]), n([]), i([]), r();
203
- }, [e, r]);
204
- return /* @__PURE__ */ t.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ t.jsxs(dr, { children: [
205
- /* @__PURE__ */ t.jsx(ur, { asChild: !0, children: /* @__PURE__ */ t.jsxs(le, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
206
- /* @__PURE__ */ t.jsx(_t, {}),
207
- " Clear"
208
- ] }) }),
209
- /* @__PURE__ */ t.jsxs(fr, { className: "border-border", children: [
210
- /* @__PURE__ */ t.jsxs(pr, { children: [
211
- /* @__PURE__ */ t.jsx(hr, { children: "Clear whole canvas?" }),
212
- /* @__PURE__ */ t.jsx(mr, { children: "Are you sure you want to clear the whole canvas?" })
213
- ] }),
214
- /* @__PURE__ */ t.jsxs(yr, { children: [
215
- /* @__PURE__ */ t.jsx(vr, { children: "Cancel" }),
216
- /* @__PURE__ */ t.jsx(gr, { onClick: d, children: "Yes" })
217
- ] })
218
- ] })
219
- ] }) });
220
- }, Mr = () => {
221
- const e = Nt("darkMode", !1), [r] = nt();
222
- return /* @__PURE__ */ t.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
223
- /* @__PURE__ */ t.jsxs("div", { className: "flex h-full space-x-2", children: [
224
- e ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
225
- /* @__PURE__ */ t.jsx(_r, {}),
226
- /* @__PURE__ */ t.jsx(se, { orientation: "vertical" })
227
- ] }) : null,
228
- /* @__PURE__ */ t.jsx(Ir, {}),
229
- /* @__PURE__ */ t.jsx(se, { orientation: "vertical" }),
230
- /* @__PURE__ */ t.jsxs("div", { className: "flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium", children: [
231
- /* @__PURE__ */ t.jsx(Pt, { className: "h-3.5 w-3.5 flex-shrink-0" }),
232
- " ",
233
- /* @__PURE__ */ t.jsxs("div", { className: "text-xs leading-3", children: [
234
- St(r, 0),
235
- "%"
236
- ] })
237
- ] }),
238
- /* @__PURE__ */ t.jsx(se, { orientation: "vertical" }),
239
- /* @__PURE__ */ t.jsx(Ar, {})
240
- ] }),
241
- /* @__PURE__ */ t.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
242
- /* @__PURE__ */ t.jsx(se, { orientation: "vertical" }),
243
- /* @__PURE__ */ t.jsx(Or, {})
244
- ] })
245
- ] });
246
- }, ve = {
247
- FRAMEWORK: "FRAMEWORK",
248
- STATIC: "STATIC",
249
- EMAIL: "EMAIL",
250
- PRESENTATION: "PRESENTATION",
251
- GRAPHIC: "GRAPHIC"
252
- }, Dr = `<!doctype html>
253
- <html class="scroll-smooth h-full overflow-y-auto">
254
- <head>
255
- <meta charset="UTF-8">
256
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
257
- <script src="https://old.chaibuilder.com/offline/tailwind.cdn.js"><\/script>
258
- <style>
259
- html { height: 100%; overflow:auto; }
260
- body { height: 100%; }
261
- .air-highlight{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}
262
- .air-highlight-multi{ outline: 1px solid #29e503 !important; outline-offset: -1px;}
263
- body{ -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none;
264
- -moz-user-select: none;-ms-user-select: none; user-select: none; }
265
- html{
266
- -ms-overflow-style: none; /* IE and Edge */
267
- scrollbar-width: none; /* Firefox */
268
- }
269
- /** IMPORTANT: Make fields content editable in SAFARI */
270
- [contenteditable] {-webkit-user-select: text;user-select: text;}
271
-
272
- html::-webkit-scrollbar { width: 0 !important }
273
- .aspect-auto{aspect-ratio: auto;}
274
- .aspect-square{aspect-ratio: 1/1;}
275
- .aspect-video{aspect-ratio: 16/9;}
276
- a{ pointer-events: none !important; }
277
- </style>
278
- <style id="hidden-blocks"></style>
279
- <style id="selected-block"></style>
280
- <style id="selected-styling-block"></style>
281
- <style id="highlighted-block"></style>
282
- </head>
283
- <body class="font-body antialiased h-full">
284
- <div class="frame-root"></div>
285
- </body>
286
- </html>`, $r = (e) => {
287
- const [r] = Re(), [, n] = nt(), [i, d] = H({}), s = Q(() => {
288
- const { width: a, height: p } = e;
289
- if (a < r) {
290
- const y = parseFloat((a / r).toString());
291
- let u = {};
292
- p && (u = { height: p + 2 * p * (1 - y) }), d({
293
- transform: `scale(${y})`,
294
- transformOrigin: "top left",
295
- ...u,
296
- maxWidth: "none"
297
- }), n(y * 100);
298
- } else
299
- d({}), n(100);
300
- }, [r, e, n]);
301
- return F(() => {
302
- s();
303
- }, [r, e, n, s]), i;
304
- };
305
- var Te = { exports: {} }, ae = { exports: {} }, _ = {};
306
- /** @license React v16.13.1
307
- * react-is.production.min.js
308
- *
309
- * Copyright (c) Facebook, Inc. and its affiliates.
310
- *
311
- * This source code is licensed under the MIT license found in the
312
- * LICENSE file in the root directory of this source tree.
313
- */
314
- var We;
315
- function Br() {
316
- if (We)
317
- return _;
318
- We = 1;
319
- var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, d = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, p = e ? Symbol.for("react.context") : 60110, y = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, O = e ? Symbol.for("react.lazy") : 60116, w = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, g = e ? Symbol.for("react.responder") : 60118, U = e ? Symbol.for("react.scope") : 60119;
320
- function M(l) {
321
- if (typeof l == "object" && l !== null) {
322
- var D = l.$$typeof;
323
- switch (D) {
324
- case r:
325
- switch (l = l.type, l) {
326
- case y:
327
- case u:
328
- case i:
329
- case s:
330
- case d:
331
- case h:
332
- return l;
333
- default:
334
- switch (l = l && l.$$typeof, l) {
335
- case p:
336
- case m:
337
- case O:
338
- case v:
339
- case a:
340
- return l;
341
- default:
342
- return D;
343
- }
344
- }
345
- case n:
346
- return D;
347
- }
348
- }
349
- }
350
- function $(l) {
351
- return M(l) === u;
352
- }
353
- return _.AsyncMode = y, _.ConcurrentMode = u, _.ContextConsumer = p, _.ContextProvider = a, _.Element = r, _.ForwardRef = m, _.Fragment = i, _.Lazy = O, _.Memo = v, _.Portal = n, _.Profiler = s, _.StrictMode = d, _.Suspense = h, _.isAsyncMode = function(l) {
354
- return $(l) || M(l) === y;
355
- }, _.isConcurrentMode = $, _.isContextConsumer = function(l) {
356
- return M(l) === p;
357
- }, _.isContextProvider = function(l) {
358
- return M(l) === a;
359
- }, _.isElement = function(l) {
360
- return typeof l == "object" && l !== null && l.$$typeof === r;
361
- }, _.isForwardRef = function(l) {
362
- return M(l) === m;
363
- }, _.isFragment = function(l) {
364
- return M(l) === i;
365
- }, _.isLazy = function(l) {
366
- return M(l) === O;
367
- }, _.isMemo = function(l) {
368
- return M(l) === v;
369
- }, _.isPortal = function(l) {
370
- return M(l) === n;
371
- }, _.isProfiler = function(l) {
372
- return M(l) === s;
373
- }, _.isStrictMode = function(l) {
374
- return M(l) === d;
375
- }, _.isSuspense = function(l) {
376
- return M(l) === h;
377
- }, _.isValidElementType = function(l) {
378
- return typeof l == "string" || typeof l == "function" || l === i || l === u || l === s || l === d || l === h || l === b || typeof l == "object" && l !== null && (l.$$typeof === O || l.$$typeof === v || l.$$typeof === a || l.$$typeof === p || l.$$typeof === m || l.$$typeof === C || l.$$typeof === g || l.$$typeof === U || l.$$typeof === w);
379
- }, _.typeOf = M, _;
380
- }
381
- var P = {};
382
- /** @license React v16.13.1
383
- * react-is.development.js
384
- *
385
- * Copyright (c) Facebook, Inc. and its affiliates.
386
- *
387
- * This source code is licensed under the MIT license found in the
388
- * LICENSE file in the root directory of this source tree.
389
- */
390
- var qe;
391
- function Nr() {
392
- return qe || (qe = 1, process.env.NODE_ENV !== "production" && function() {
393
- var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, d = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, p = e ? Symbol.for("react.context") : 60110, y = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, O = e ? Symbol.for("react.lazy") : 60116, w = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, g = e ? Symbol.for("react.responder") : 60118, U = e ? Symbol.for("react.scope") : 60119;
394
- function M(c) {
395
- return typeof c == "string" || typeof c == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
396
- c === i || c === u || c === s || c === d || c === h || c === b || typeof c == "object" && c !== null && (c.$$typeof === O || c.$$typeof === v || c.$$typeof === a || c.$$typeof === p || c.$$typeof === m || c.$$typeof === C || c.$$typeof === g || c.$$typeof === U || c.$$typeof === w);
397
- }
398
- function $(c) {
399
- if (typeof c == "object" && c !== null) {
400
- var z = c.$$typeof;
401
- switch (z) {
402
- case r:
403
- var oe = c.type;
404
- switch (oe) {
405
- case y:
406
- case u:
407
- case i:
408
- case s:
409
- case d:
410
- case h:
411
- return oe;
412
- default:
413
- var Ie = oe && oe.$$typeof;
414
- switch (Ie) {
415
- case p:
416
- case m:
417
- case O:
418
- case v:
419
- case a:
420
- return Ie;
421
- default:
422
- return z;
423
- }
424
- }
425
- case n:
426
- return z;
427
- }
428
- }
429
- }
430
- var l = y, D = u, W = p, q = a, de = r, ue = m, re = i, fe = O, pe = v, J = n, he = s, Y = d, K = h, ne = !1;
431
- function me(c) {
432
- return ne || (ne = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), o(c) || $(c) === y;
433
- }
434
- function o(c) {
435
- return $(c) === u;
436
- }
437
- function f(c) {
438
- return $(c) === p;
439
- }
440
- function j(c) {
441
- return $(c) === a;
442
- }
443
- function S(c) {
444
- return typeof c == "object" && c !== null && c.$$typeof === r;
445
- }
446
- function x(c) {
447
- return $(c) === m;
448
- }
449
- function k(c) {
450
- return $(c) === i;
451
- }
452
- function E(c) {
453
- return $(c) === O;
454
- }
455
- function T(c) {
456
- return $(c) === v;
457
- }
458
- function R(c) {
459
- return $(c) === n;
460
- }
461
- function I(c) {
462
- return $(c) === s;
463
- }
464
- function A(c) {
465
- return $(c) === d;
466
- }
467
- function N(c) {
468
- return $(c) === h;
469
- }
470
- P.AsyncMode = l, P.ConcurrentMode = D, P.ContextConsumer = W, P.ContextProvider = q, P.Element = de, P.ForwardRef = ue, P.Fragment = re, P.Lazy = fe, P.Memo = pe, P.Portal = J, P.Profiler = he, P.StrictMode = Y, P.Suspense = K, P.isAsyncMode = me, P.isConcurrentMode = o, P.isContextConsumer = f, P.isContextProvider = j, P.isElement = S, P.isForwardRef = x, P.isFragment = k, P.isLazy = E, P.isMemo = T, P.isPortal = R, P.isProfiler = I, P.isStrictMode = A, P.isSuspense = N, P.isValidElementType = M, P.typeOf = $;
471
- }()), P;
472
- }
473
- var Ue;
474
- function dt() {
475
- return Ue || (Ue = 1, process.env.NODE_ENV === "production" ? ae.exports = Br() : ae.exports = Nr()), ae.exports;
476
- }
477
- /*
478
- object-assign
479
- (c) Sindre Sorhus
480
- @license MIT
481
- */
482
- var ge, Ye;
483
- function Lr() {
484
- if (Ye)
485
- return ge;
486
- Ye = 1;
487
- var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
488
- function i(s) {
489
- if (s == null)
490
- throw new TypeError("Object.assign cannot be called with null or undefined");
491
- return Object(s);
492
- }
493
- function d() {
494
- try {
495
- if (!Object.assign)
496
- return !1;
497
- var s = new String("abc");
498
- if (s[5] = "de", Object.getOwnPropertyNames(s)[0] === "5")
499
- return !1;
500
- for (var a = {}, p = 0; p < 10; p++)
501
- a["_" + String.fromCharCode(p)] = p;
502
- var y = Object.getOwnPropertyNames(a).map(function(m) {
503
- return a[m];
504
- });
505
- if (y.join("") !== "0123456789")
506
- return !1;
507
- var u = {};
508
- return "abcdefghijklmnopqrst".split("").forEach(function(m) {
509
- u[m] = m;
510
- }), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
511
- } catch {
512
- return !1;
513
- }
514
- }
515
- return ge = d() ? Object.assign : function(s, a) {
516
- for (var p, y = i(s), u, m = 1; m < arguments.length; m++) {
517
- p = Object(arguments[m]);
518
- for (var h in p)
519
- r.call(p, h) && (y[h] = p[h]);
520
- if (e) {
521
- u = e(p);
522
- for (var b = 0; b < u.length; b++)
523
- n.call(p, u[b]) && (y[u[b]] = p[u[b]]);
524
- }
525
- }
526
- return y;
527
- }, ge;
528
- }
529
- var xe, ze;
530
- function _e() {
531
- if (ze)
532
- return xe;
533
- ze = 1;
534
- var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
535
- return xe = e, xe;
536
- }
537
- var be, He;
538
- function ut() {
539
- return He || (He = 1, be = Function.call.bind(Object.prototype.hasOwnProperty)), be;
540
- }
541
- var we, Ke;
542
- function Fr() {
543
- if (Ke)
544
- return we;
545
- Ke = 1;
546
- var e = function() {
547
- };
548
- if (process.env.NODE_ENV !== "production") {
549
- var r = _e(), n = {}, i = ut();
550
- e = function(s) {
551
- var a = "Warning: " + s;
552
- typeof console < "u" && console.error(a);
553
- try {
554
- throw new Error(a);
555
- } catch {
556
- }
557
- };
558
- }
559
- function d(s, a, p, y, u) {
560
- if (process.env.NODE_ENV !== "production") {
561
- for (var m in s)
562
- if (i(s, m)) {
563
- var h;
564
- try {
565
- if (typeof s[m] != "function") {
566
- var b = Error(
567
- (y || "React class") + ": " + p + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
568
- );
569
- throw b.name = "Invariant Violation", b;
570
- }
571
- h = s[m](a, m, y, p, null, r);
572
- } catch (O) {
573
- h = O;
574
- }
575
- if (h && !(h instanceof Error) && e(
576
- (y || "React class") + ": type specification of " + p + " `" + m + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
577
- ), h instanceof Error && !(h.message in n)) {
578
- n[h.message] = !0;
579
- var v = u ? u() : "";
580
- e(
581
- "Failed " + p + " type: " + h.message + (v ?? "")
582
- );
583
- }
584
- }
585
- }
586
- }
587
- return d.resetWarningCache = function() {
588
- process.env.NODE_ENV !== "production" && (n = {});
589
- }, we = d, we;
590
- }
591
- var Ee, Ve;
592
- function Wr() {
593
- if (Ve)
594
- return Ee;
595
- Ve = 1;
596
- var e = dt(), r = Lr(), n = _e(), i = ut(), d = Fr(), s = function() {
597
- };
598
- process.env.NODE_ENV !== "production" && (s = function(p) {
599
- var y = "Warning: " + p;
600
- typeof console < "u" && console.error(y);
601
- try {
602
- throw new Error(y);
603
- } catch {
604
- }
605
- });
606
- function a() {
607
- return null;
608
- }
609
- return Ee = function(p, y) {
610
- var u = typeof Symbol == "function" && Symbol.iterator, m = "@@iterator";
611
- function h(o) {
612
- var f = o && (u && o[u] || o[m]);
613
- if (typeof f == "function")
614
- return f;
615
- }
616
- var b = "<<anonymous>>", v = {
617
- array: g("array"),
618
- bigint: g("bigint"),
619
- bool: g("boolean"),
620
- func: g("function"),
621
- number: g("number"),
622
- object: g("object"),
623
- string: g("string"),
624
- symbol: g("symbol"),
625
- any: U(),
626
- arrayOf: M,
627
- element: $(),
628
- elementType: l(),
629
- instanceOf: D,
630
- node: ue(),
631
- objectOf: q,
632
- oneOf: W,
633
- oneOfType: de,
634
- shape: fe,
635
- exact: pe
636
- };
637
- function O(o, f) {
638
- return o === f ? o !== 0 || 1 / o === 1 / f : o !== o && f !== f;
639
- }
640
- function w(o, f) {
641
- this.message = o, this.data = f && typeof f == "object" ? f : {}, this.stack = "";
642
- }
643
- w.prototype = Error.prototype;
644
- function C(o) {
645
- if (process.env.NODE_ENV !== "production")
646
- var f = {}, j = 0;
647
- function S(k, E, T, R, I, A, N) {
648
- if (R = R || b, A = A || T, N !== n) {
649
- if (y) {
650
- var c = new Error(
651
- "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"
652
- );
653
- throw c.name = "Invariant Violation", c;
654
- } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
655
- var z = R + ":" + T;
656
- !f[z] && // Avoid spamming the console because they are often not actionable except for lib authors
657
- j < 3 && (s(
658
- "You are manually calling a React.PropTypes validation function for the `" + A + "` prop on `" + R + "`. 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."
659
- ), f[z] = !0, j++);
660
- }
661
- }
662
- return E[T] == null ? k ? E[T] === null ? new w("The " + I + " `" + A + "` is marked as required " + ("in `" + R + "`, but its value is `null`.")) : new w("The " + I + " `" + A + "` is marked as required in " + ("`" + R + "`, but its value is `undefined`.")) : null : o(E, T, R, I, A);
663
- }
664
- var x = S.bind(null, !1);
665
- return x.isRequired = S.bind(null, !0), x;
666
- }
667
- function g(o) {
668
- function f(j, S, x, k, E, T) {
669
- var R = j[S], I = Y(R);
670
- if (I !== o) {
671
- var A = K(R);
672
- return new w(
673
- "Invalid " + k + " `" + E + "` of type " + ("`" + A + "` supplied to `" + x + "`, expected ") + ("`" + o + "`."),
674
- { expectedType: o }
675
- );
676
- }
677
- return null;
678
- }
679
- return C(f);
680
- }
681
- function U() {
682
- return C(a);
683
- }
684
- function M(o) {
685
- function f(j, S, x, k, E) {
686
- if (typeof o != "function")
687
- return new w("Property `" + E + "` of component `" + x + "` has invalid PropType notation inside arrayOf.");
688
- var T = j[S];
689
- if (!Array.isArray(T)) {
690
- var R = Y(T);
691
- return new w("Invalid " + k + " `" + E + "` of type " + ("`" + R + "` supplied to `" + x + "`, expected an array."));
692
- }
693
- for (var I = 0; I < T.length; I++) {
694
- var A = o(T, I, x, k, E + "[" + I + "]", n);
695
- if (A instanceof Error)
696
- return A;
697
- }
698
- return null;
699
- }
700
- return C(f);
701
- }
702
- function $() {
703
- function o(f, j, S, x, k) {
704
- var E = f[j];
705
- if (!p(E)) {
706
- var T = Y(E);
707
- return new w("Invalid " + x + " `" + k + "` of type " + ("`" + T + "` supplied to `" + S + "`, expected a single ReactElement."));
708
- }
709
- return null;
710
- }
711
- return C(o);
712
- }
713
- function l() {
714
- function o(f, j, S, x, k) {
715
- var E = f[j];
716
- if (!e.isValidElementType(E)) {
717
- var T = Y(E);
718
- return new w("Invalid " + x + " `" + k + "` of type " + ("`" + T + "` supplied to `" + S + "`, expected a single ReactElement type."));
719
- }
720
- return null;
721
- }
722
- return C(o);
723
- }
724
- function D(o) {
725
- function f(j, S, x, k, E) {
726
- if (!(j[S] instanceof o)) {
727
- var T = o.name || b, R = me(j[S]);
728
- return new w("Invalid " + k + " `" + E + "` of type " + ("`" + R + "` supplied to `" + x + "`, expected ") + ("instance of `" + T + "`."));
729
- }
730
- return null;
731
- }
732
- return C(f);
733
- }
734
- function W(o) {
735
- if (!Array.isArray(o))
736
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s(
737
- "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])."
738
- ) : s("Invalid argument supplied to oneOf, expected an array.")), a;
739
- function f(j, S, x, k, E) {
740
- for (var T = j[S], R = 0; R < o.length; R++)
741
- if (O(T, o[R]))
742
- return null;
743
- var I = JSON.stringify(o, function(N, c) {
744
- var z = K(c);
745
- return z === "symbol" ? String(c) : c;
746
- });
747
- return new w("Invalid " + k + " `" + E + "` of value `" + String(T) + "` " + ("supplied to `" + x + "`, expected one of " + I + "."));
748
- }
749
- return C(f);
750
- }
751
- function q(o) {
752
- function f(j, S, x, k, E) {
753
- if (typeof o != "function")
754
- return new w("Property `" + E + "` of component `" + x + "` has invalid PropType notation inside objectOf.");
755
- var T = j[S], R = Y(T);
756
- if (R !== "object")
757
- return new w("Invalid " + k + " `" + E + "` of type " + ("`" + R + "` supplied to `" + x + "`, expected an object."));
758
- for (var I in T)
759
- if (i(T, I)) {
760
- var A = o(T, I, x, k, E + "." + I, n);
761
- if (A instanceof Error)
762
- return A;
763
- }
764
- return null;
765
- }
766
- return C(f);
767
- }
768
- function de(o) {
769
- if (!Array.isArray(o))
770
- return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), a;
771
- for (var f = 0; f < o.length; f++) {
772
- var j = o[f];
773
- if (typeof j != "function")
774
- return s(
775
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ne(j) + " at index " + f + "."
776
- ), a;
777
- }
778
- function S(x, k, E, T, R) {
779
- for (var I = [], A = 0; A < o.length; A++) {
780
- var N = o[A], c = N(x, k, E, T, R, n);
781
- if (c == null)
782
- return null;
783
- c.data && i(c.data, "expectedType") && I.push(c.data.expectedType);
784
- }
785
- var z = I.length > 0 ? ", expected one of type [" + I.join(", ") + "]" : "";
786
- return new w("Invalid " + T + " `" + R + "` supplied to " + ("`" + E + "`" + z + "."));
787
- }
788
- return C(S);
789
- }
790
- function ue() {
791
- function o(f, j, S, x, k) {
792
- return J(f[j]) ? null : new w("Invalid " + x + " `" + k + "` supplied to " + ("`" + S + "`, expected a ReactNode."));
793
- }
794
- return C(o);
795
- }
796
- function re(o, f, j, S, x) {
797
- return new w(
798
- (o || "React class") + ": " + f + " type `" + j + "." + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + x + "`."
799
- );
800
- }
801
- function fe(o) {
802
- function f(j, S, x, k, E) {
803
- var T = j[S], R = Y(T);
804
- if (R !== "object")
805
- return new w("Invalid " + k + " `" + E + "` of type `" + R + "` " + ("supplied to `" + x + "`, expected `object`."));
806
- for (var I in o) {
807
- var A = o[I];
808
- if (typeof A != "function")
809
- return re(x, k, E, I, K(A));
810
- var N = A(T, I, x, k, E + "." + I, n);
811
- if (N)
812
- return N;
813
- }
814
- return null;
815
- }
816
- return C(f);
817
- }
818
- function pe(o) {
819
- function f(j, S, x, k, E) {
820
- var T = j[S], R = Y(T);
821
- if (R !== "object")
822
- return new w("Invalid " + k + " `" + E + "` of type `" + R + "` " + ("supplied to `" + x + "`, expected `object`."));
823
- var I = r({}, j[S], o);
824
- for (var A in I) {
825
- var N = o[A];
826
- if (i(o, A) && typeof N != "function")
827
- return re(x, k, E, A, K(N));
828
- if (!N)
829
- return new w(
830
- "Invalid " + k + " `" + E + "` key `" + A + "` supplied to `" + x + "`.\nBad object: " + JSON.stringify(j[S], null, " ") + `
831
- Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
832
- );
833
- var c = N(T, A, x, k, E + "." + A, n);
834
- if (c)
835
- return c;
836
- }
837
- return null;
838
- }
839
- return C(f);
840
- }
841
- function J(o) {
842
- switch (typeof o) {
843
- case "number":
844
- case "string":
845
- case "undefined":
846
- return !0;
847
- case "boolean":
848
- return !o;
849
- case "object":
850
- if (Array.isArray(o))
851
- return o.every(J);
852
- if (o === null || p(o))
853
- return !0;
854
- var f = h(o);
855
- if (f) {
856
- var j = f.call(o), S;
857
- if (f !== o.entries) {
858
- for (; !(S = j.next()).done; )
859
- if (!J(S.value))
860
- return !1;
861
- } else
862
- for (; !(S = j.next()).done; ) {
863
- var x = S.value;
864
- if (x && !J(x[1]))
865
- return !1;
866
- }
867
- } else
868
- return !1;
869
- return !0;
870
- default:
871
- return !1;
872
- }
873
- }
874
- function he(o, f) {
875
- return o === "symbol" ? !0 : f ? f["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && f instanceof Symbol : !1;
876
- }
877
- function Y(o) {
878
- var f = typeof o;
879
- return Array.isArray(o) ? "array" : o instanceof RegExp ? "object" : he(f, o) ? "symbol" : f;
880
- }
881
- function K(o) {
882
- if (typeof o > "u" || o === null)
883
- return "" + o;
884
- var f = Y(o);
885
- if (f === "object") {
886
- if (o instanceof Date)
887
- return "date";
888
- if (o instanceof RegExp)
889
- return "regexp";
890
- }
891
- return f;
892
- }
893
- function ne(o) {
894
- var f = K(o);
895
- switch (f) {
896
- case "array":
897
- case "object":
898
- return "an " + f;
899
- case "boolean":
900
- case "date":
901
- case "regexp":
902
- return "a " + f;
903
- default:
904
- return f;
905
- }
906
- }
907
- function me(o) {
908
- return !o.constructor || !o.constructor.name ? b : o.constructor.name;
909
- }
910
- return v.checkPropTypes = d, v.resetWarningCache = d.resetWarningCache, v.PropTypes = v, v;
911
- }, Ee;
912
- }
913
- var Se, Ge;
914
- function qr() {
915
- if (Ge)
916
- return Se;
917
- Ge = 1;
918
- var e = _e();
919
- function r() {
920
- }
921
- function n() {
922
- }
923
- return n.resetWarningCache = r, Se = function() {
924
- function i(a, p, y, u, m, h) {
925
- if (h !== e) {
926
- var b = new Error(
927
- "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"
928
- );
929
- throw b.name = "Invariant Violation", b;
930
- }
931
- }
932
- i.isRequired = i;
933
- function d() {
934
- return i;
935
- }
936
- var s = {
937
- array: i,
938
- bigint: i,
939
- bool: i,
940
- func: i,
941
- number: i,
942
- object: i,
943
- string: i,
944
- symbol: i,
945
- any: i,
946
- arrayOf: d,
947
- element: i,
948
- elementType: i,
949
- instanceOf: d,
950
- node: i,
951
- objectOf: d,
952
- oneOf: d,
953
- oneOfType: d,
954
- shape: d,
955
- exact: d,
956
- checkPropTypes: n,
957
- resetWarningCache: r
958
- };
959
- return s.PropTypes = s, s;
960
- }, Se;
961
- }
962
- if (process.env.NODE_ENV !== "production") {
963
- var Ur = dt(), Yr = !0;
964
- Te.exports = Wr()(Ur.isElement, Yr);
965
- } else
966
- Te.exports = qr()();
967
- var zr = Te.exports;
968
- const L = /* @__PURE__ */ Rr(zr);
969
- let ft, pt;
970
- typeof document < "u" && (ft = document);
971
- typeof window < "u" && (pt = window);
972
- const ht = G.createContext({ document: ft, window: pt }), Pe = () => G.useContext(ht), { Provider: Hr, Consumer: to } = ht;
973
- class mt extends Xe {
974
- componentDidMount() {
975
- this.props.contentDidMount();
976
- }
977
- componentDidUpdate() {
978
- this.props.contentDidUpdate();
979
- }
980
- render() {
981
- return bt.only(this.props.children);
982
- }
983
- }
984
- V(mt, "propTypes", {
985
- children: L.element.isRequired,
986
- contentDidMount: L.func.isRequired,
987
- contentDidUpdate: L.func.isRequired
988
- });
989
- class je extends Xe {
990
- constructor(n, i) {
991
- super(n, i);
992
- V(this, "setRef", (n) => {
993
- this.nodeRef.current = n;
994
- const { forwardedRef: i } = this.props;
995
- typeof i == "function" ? i(n) : i && (i.current = n);
996
- });
997
- V(this, "handleLoad", () => {
998
- clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
999
- });
1000
- // In certain situations on a cold cache DOMContentLoaded never gets called
1001
- // fallback to an interval to check if that's the case
1002
- V(this, "loadCheck", () => setInterval(() => {
1003
- this.handleLoad();
1004
- }, 500));
1005
- this._isMounted = !1, this.nodeRef = G.createRef(), this.state = { iframeLoaded: !1 };
1006
- }
1007
- componentDidMount() {
1008
- this._isMounted = !0, this.getDoc() && this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded", this.handleLoad);
1009
- }
1010
- componentWillUnmount() {
1011
- this._isMounted = !1, this.nodeRef.current.removeEventListener("DOMContentLoaded", this.handleLoad);
1012
- }
1013
- getDoc() {
1014
- return this.nodeRef.current ? this.nodeRef.current.contentDocument : null;
1015
- }
1016
- getMountTarget() {
1017
- const n = this.getDoc();
1018
- return this.props.mountTarget ? n.querySelector(this.props.mountTarget) : n.body.children[0];
1019
- }
1020
- renderFrameContents() {
1021
- if (!this._isMounted)
1022
- return null;
1023
- const n = this.getDoc();
1024
- if (!n)
1025
- return null;
1026
- const i = this.props.contentDidMount, d = this.props.contentDidUpdate, s = n.defaultView || n.parentView, a = /* @__PURE__ */ t.jsx(mt, { contentDidMount: i, contentDidUpdate: d, children: /* @__PURE__ */ t.jsx(Hr, { value: { document: n, window: s }, children: /* @__PURE__ */ t.jsx("div", { className: "frame-content", children: this.props.children }) }) }), p = this.getMountTarget();
1027
- return [Ne.createPortal(this.props.head, this.getDoc().head), Ne.createPortal(a, p)];
1028
- }
1029
- render() {
1030
- const n = {
1031
- ...this.props,
1032
- srcDoc: this.props.initialContent,
1033
- children: void 0
1034
- // The iframe isn't ready so we drop children from props here. #12, #17
1035
- };
1036
- return delete n.head, delete n.initialContent, delete n.mountTarget, delete n.contentDidMount, delete n.contentDidUpdate, delete n.forwardedRef, /* @__PURE__ */ t.jsx("iframe", { ...n, ref: this.setRef, onLoad: this.handleLoad, children: this.state.iframeLoaded && this.renderFrameContents() });
1037
- }
1038
- }
1039
- // React warns when you render directly into the body since browser extensions
1040
- // also inject into the body and can mess up React. For this reason
1041
- // initialContent is expected to have a div inside of the body
1042
- // element that we render react into.
1043
- V(je, "propTypes", {
1044
- style: L.object,
1045
- // eslint-disable-line
1046
- head: L.node,
1047
- initialContent: L.string,
1048
- mountTarget: L.string,
1049
- contentDidMount: L.func,
1050
- contentDidUpdate: L.func,
1051
- children: L.oneOfType([L.element, L.arrayOf(L.element)])
1052
- }), V(je, "defaultProps", {
1053
- style: {},
1054
- head: null,
1055
- children: void 0,
1056
- mountTarget: void 0,
1057
- contentDidMount: () => {
1058
- },
1059
- contentDidUpdate: () => {
1060
- },
1061
- initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
1062
- });
1063
- const Kr = G.forwardRef((e, r) => /* @__PURE__ */ t.jsx(je, { ...e, forwardedRef: r })), Vr = ({ children: e }) => {
1064
- const { document: r } = Pe(), [n] = X(), [i, d] = Z();
1065
- return F(() => {
1066
- setTimeout(() => {
1067
- if (!ee(i))
1068
- return;
1069
- const s = yt(r, ce(n));
1070
- if (s) {
1071
- const a = s.getAttribute("data-style-prop");
1072
- if (a) {
1073
- const p = s.getAttribute("data-style-id"), y = s.getAttribute("data-block-parent");
1074
- d([{ id: p, prop: a, blockId: y }]);
1075
- }
1076
- }
1077
- }, 100);
1078
- }, [r, n, d, i]), /* @__PURE__ */ t.jsx("div", { id: "canvas", className: "relative h-screen max-w-full outline-2", children: e });
1079
- }, yt = (e, r) => e.querySelector(`[data-block-id="${r}"]`), Gr = () => {
1080
- const { window: e } = Pe(), [r, n] = X(), [, i] = Z(), { undo: d, redo: s } = ke(), a = ot(), [, p] = Lt(), [, y] = Ft(), { pasteBlocks: u } = Wt(), [, m] = st(), h = at(), { savePage: b } = qt(), [v] = te(Ut), [, O] = te(Yt), w = (C) => {
1081
- C.key === "Enter" && (C.preventDefault(), r.length === 1 && O(ce(r)));
1082
- };
1083
- return F(() => {
1084
- const C = (g) => {
1085
- if (g.key === "Escape") {
1086
- n([]), i([]);
1087
- return;
1088
- }
1089
- if (w(g), !v && (g.key === "Delete" || g.key === "Backspace") && (g.preventDefault(), h(r)), g.ctrlKey || g.metaKey) {
1090
- if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(g.key)) {
1091
- if (v && ["x", "z", "v"].includes(g.key))
1092
- return !0;
1093
- g.preventDefault();
1094
- }
1095
- g.key === "s" && (g.stopPropagation(), g.preventDefault(), b()), g.key === "z" && d(), g.key === "y" && s(), g.key === "d" && a(r), g.key === "x" && p(r), g.key === "c" && y(r), g.key === "v" && r.length > 0 && u(r[0]);
1096
- }
1097
- };
1098
- return e.removeEventListener("keydown", C), e.addEventListener("keydown", C), () => {
1099
- e.removeEventListener("keydown", C);
1100
- };
1101
- }, [
1102
- r,
1103
- n,
1104
- d,
1105
- h,
1106
- m,
1107
- s,
1108
- a,
1109
- p,
1110
- y,
1111
- u,
1112
- v,
1113
- b,
1114
- e
1115
- ]), null;
1116
- }, Xr = ({ block: e, label: r }) => {
1117
- const [, n] = Er(() => ({
1118
- type: "CANVAS_BLOCK",
1119
- item: e
1120
- }));
1121
- return /* @__PURE__ */ t.jsxs(
1122
- "div",
1123
- {
1124
- className: "mr-10 flex cursor-grab items-center space-x-1 px-1",
1125
- ref: n,
1126
- onDragStart: () => {
1127
- console.log("drag start");
1128
- },
1129
- children: [
1130
- /* @__PURE__ */ t.jsx(Dt, {}),
1131
- r
1132
- ]
1133
- }
1134
- );
1135
- }, Zr = ({
1136
- selectedBlockElement: e,
1137
- block: r
1138
- }) => {
1139
- const n = at(), i = ot(), [, d] = X(), [, s] = Z(), { floatingStyles: a, refs: p, update: y } = br({
1140
- placement: "top-start",
1141
- middleware: [wr(), xr()],
1142
- elements: {
1143
- reference: e
1144
- }
1145
- });
1146
- Sr(e, () => y(), e !== null);
1147
- const u = B(r, "_parent", null), m = ee(B(r, "_name", "")) ? B(r, "_type", "") : B(r, "_name", "");
1148
- return !e || !r ? null : /* @__PURE__ */ t.jsxs(
1149
- "div",
1150
- {
1151
- role: "button",
1152
- tabIndex: 0,
1153
- ref: p.setFloating,
1154
- style: a,
1155
- onClick: (h) => {
1156
- h.stopPropagation(), h.preventDefault();
1157
- },
1158
- onKeyDown: (h) => h.stopPropagation(),
1159
- className: "z-50 flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
1160
- children: [
1161
- /* @__PURE__ */ t.jsx(Xr, { label: m, block: r }),
1162
- /* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 px-1 ", children: [
1163
- u && /* @__PURE__ */ t.jsx(
1164
- It,
1165
- {
1166
- className: "hover:scale-105 ",
1167
- onClick: () => {
1168
- s([]), d([u]);
1169
- }
1170
- }
1171
- ),
1172
- zt(B(r, "_type", "")) ? /* @__PURE__ */ t.jsx(Ot, { className: "hover:scale-105 ", onClick: () => i([r == null ? void 0 : r._id]) }) : null,
1173
- Ht(B(r, "_type", "")) ? /* @__PURE__ */ t.jsx(Mt, { className: "hover:scale-105 ", onClick: () => n([r == null ? void 0 : r._id]) }) : null
1174
- ] })
1175
- ]
1176
- }
1177
- );
1178
- }, Jr = ({ model: e }) => {
1179
- const [r] = Kt(), [n] = X(), [i] = rt(), [d] = Ae(), [s] = Z(), { document: a, window: p } = Pe(), [y] = H(a == null ? void 0 : a.getElementById("highlighted-block")), [u] = H(
1180
- a == null ? void 0 : a.getElementById("selected-block")
1181
- ), [m] = H(
1182
- a == null ? void 0 : a.getElementById("selected-styling-block")
1183
- );
1184
- F(() => {
1185
- i ? a == null || a.documentElement.classList.add("dark") : a == null || a.documentElement.classList.remove("dark");
1186
- }, [i, a]);
1187
- const h = B(r, "headingFont", "DM Sans"), b = B(r, "bodyFont", "DM Sans");
1188
- return F(() => {
1189
- const v = B(r, "primaryColor", "#000"), O = B(r, "secondaryColor", "#FFF"), w = Tr({
1190
- colors: [v, O],
1191
- names: ["primary", "secondary"]
1192
- });
1193
- w.primary.DEFAULT = v, w.secondary.DEFAULT = O;
1194
- const C = B(r, "roundedCorners", "0");
1195
- !p || !p.tailwind || (p.tailwind.config = {
1196
- darkMode: "class",
1197
- theme: {
1198
- fontFamily: {
1199
- heading: [h],
1200
- body: [b]
1201
- },
1202
- extend: {
1203
- borderRadius: {
1204
- global: `${C || "0"}px`
1205
- },
1206
- colors: w
1207
- }
1208
- },
1209
- plugins: [
1210
- // @ts-ignore
1211
- p.tailwind.plugin.withOptions(({ prefix: g = "ui" } = {}) => ({ addVariant: U }) => {
1212
- for (const M of ["open", "checked", "selected", "active", "disabled"])
1213
- U(`${g}-${M}`, [
1214
- `&[data-headlessui-state~="${M}"]`,
1215
- `:where([data-headlessui-state~="${M}"]) &`
1216
- ]), U(`${g}-not-${M}`, [
1217
- `&[data-headlessui-state]:not([data-headlessui-state~="${M}"])`,
1218
- `:where([data-headlessui-state]:not([data-headlessui-state~="${M}"])) &:not([data-headlessui-state])`
1219
- ]);
1220
- })
1221
- ]
1222
- });
1223
- }, [r, p, h, b]), F(() => {
1224
- u && (u.textContent = `${ie(n, (v) => `[data-block-id="${v}"]`).join(",")}{
1225
- outline: 1px solid ${n.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
1226
- }`);
1227
- }, [n, u]), F(() => {
1228
- y && (y.textContent = d ? `[data-style-id="${d}"]{ outline: 1px solid orange !important; outline-offset: -1px;}` : "");
1229
- }, [d, n, y]), F(() => {
1230
- m && (m.textContent = `${ie(s, ({ id: v }) => `[data-style-id="${v}"]`).join(",")}{
1231
- outline: 1px solid orange !important; outline-offset: -1px;
1232
- }`);
1233
- }, [s, m]), F(() => {
1234
- if (e === "section")
1235
- return;
1236
- const v = B(r, "bodyTextLightColor", "#64748b"), O = B(r, "bodyTextDarkColor", "#94a3b8"), w = B(r, "bodyBgLightColor", "#FFFFFF"), C = B(r, "bodyBgDarkColor", "#0f172a");
1237
- a.body.className = `font-body antialiased text-[${v}] bg-[${w}] dark:text-[${O}] dark:bg-[${C}]`;
1238
- }, [r, a, e]), e === "page" ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1239
- h && /* @__PURE__ */ t.jsx(
1240
- "link",
1241
- {
1242
- id: "heading-font",
1243
- rel: "stylesheet",
1244
- type: "text/css",
1245
- href: `https://fonts.googleapis.com/css2?family=${h.replace(
1246
- / /g,
1247
- "+"
1248
- )}:wght@300;400;500;600;700;800;900&display=swap`,
1249
- media: "all"
1250
- }
1251
- ),
1252
- b && h !== b && /* @__PURE__ */ t.jsx(
1253
- "link",
1254
- {
1255
- id: "body-font",
1256
- rel: "stylesheet",
1257
- type: "text/css",
1258
- href: `https://fonts.googleapis.com/css2?family=${b.replace(
1259
- / /g,
1260
- "+"
1261
- )}:wght@300;400;500;600;700;800;900&display=swap`,
1262
- media: "all"
1263
- }
1264
- ),
1265
- h && /* @__PURE__ */ t.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${h}",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";}` })
1266
- ] }) : null;
1267
- }, Qr = () => {
1268
- const { t: e } = ct();
1269
- return /* @__PURE__ */ t.jsx("div", { className: "my-auto py-24 text-center text-gray-600 dark:text-white", children: /* @__PURE__ */ t.jsx("h1", { className: "mb-10 text-4xl ", children: e("canvas_empty") }) });
1270
- }, en = (e) => {
1271
- const r = {};
1272
- return Object.keys(e).forEach((n) => {
1273
- Qe(e[n]) && e[n].startsWith(Be) && (r[n] = e[n].replace(Be, "").split(","));
1274
- }), r;
1275
- }, tn = Tt((e) => {
1276
- const r = e.replace(lt, "").split(",");
1277
- return Cr(r[0], r[1]);
1278
- });
1279
- function rn(e, r) {
1280
- return B(e, `${r}_attrs`, {});
1281
- }
1282
- function nn(e, r, n, i) {
1283
- const d = {};
1284
- return Object.keys(e).forEach((s) => {
1285
- if (Qe(e[s]) && e[s].startsWith(lt)) {
1286
- const a = tn(e[s]);
1287
- d[s] = {
1288
- className: a,
1289
- "data-style-prop": s,
1290
- "data-block-parent": e._id,
1291
- "data-style-id": `${s}-${e._id}`,
1292
- onMouseEnter: r,
1293
- onMouseLeave: n,
1294
- onClick: i,
1295
- ...rn(e, s)
1296
- };
1297
- }
1298
- }), d;
1299
- }
1300
- function Ce({ blocks: e }) {
1301
- const r = it(), [, n] = Ae(), [, i] = Z(), [, d] = X(), s = Q(
1302
- (u) => {
1303
- var h;
1304
- const m = (h = u.currentTarget) == null ? void 0 : h.getAttribute("data-style-id");
1305
- n(m || ""), u.stopPropagation();
1306
- },
1307
- [n]
1308
- ), a = Q(
1309
- (u) => {
1310
- n(""), u.stopPropagation();
1311
- },
1312
- [n]
1313
- ), p = Q(
1314
- (u) => {
1315
- u.stopPropagation();
1316
- const m = u.currentTarget;
1317
- if (m.getAttribute("data-block-parent")) {
1318
- const h = m.getAttribute("data-style-prop"), b = m.getAttribute("data-style-id"), v = m.getAttribute("data-block-parent");
1319
- i([{ id: b, prop: h, blockId: v }]), d([v]);
1320
- } else if (m.getAttribute("data-block-id") && (d([m.getAttribute("data-block-id")]), m.getAttribute("data-block-parent"))) {
1321
- const h = m.getAttribute("data-style-prop"), b = m.getAttribute("data-style-id"), v = m.getAttribute("data-block-parent");
1322
- i([{ id: b, prop: h, blockId: v }]);
1323
- }
1324
- },
1325
- [i, d]
1326
- ), y = Q(
1327
- (u) => nn(u, s, a, p),
1328
- [p, s, a]
1329
- );
1330
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: G.Children.toArray(
1331
- e.map((u, m) => {
1332
- const h = en(u), b = {};
1333
- ee(h) || Object.keys(h).forEach((C) => {
1334
- b[C] = G.Children.toArray(
1335
- h[C].map((g) => /* @__PURE__ */ t.jsx(Ce, { blocks: [jt(r, { _id: g })] }))
1336
- );
1337
- });
1338
- const v = Je(r, { _parent: u._id });
1339
- b.children = v.length ? /* @__PURE__ */ t.jsx(Ce, { blocks: v }) : null;
1340
- const O = kr(u._type), w = B(O, "builderComponent", O == null ? void 0 : O.component) || null;
1341
- return Ct(w) ? /* @__PURE__ */ t.jsx("noscript", { children: `<!-- ${u == null ? void 0 : u._type} not registered -->` }) : /* @__PURE__ */ t.jsx(Ze, { children: G.createElement(w, {
1342
- blockProps: {
1343
- onClick: p,
1344
- "data-block-id": u._id,
1345
- "data-block-type": u._type
1346
- },
1347
- inBuilder: !0,
1348
- ...u,
1349
- index: m,
1350
- ...y(u),
1351
- ...b
1352
- }) });
1353
- })
1354
- ) });
1355
- }
1356
- const on = () => {
1357
- const e = it();
1358
- return /* @__PURE__ */ t.jsx(jr, { children: e.length ? /* @__PURE__ */ t.jsx(Ce, { blocks: Je(e, (r) => ee(r._parent)) }) : /* @__PURE__ */ t.jsx(Qr, {}) });
1359
- }, sn = (e, r) => e.querySelector(`[data-style-id="${r}"]`), an = () => {
1360
- const [e] = te(Vt), [r] = st(), [n] = Re(), [, i] = X(), d = Gt(), [, s] = Ae(), a = Oe(null), p = Oe(null), [y, u] = H({ width: 0, height: 0 }), m = $r(y), [h, b] = H(0), [v, O] = H([]), [, w] = H([]), [, C] = te(Xt), [g, U] = Z(), M = et("loadingCanvas", !1);
1361
- F(() => {
1362
- const { clientWidth: D, clientHeight: W } = p.current;
1363
- u({ width: D, height: W }), h === 0 && b(D);
1364
- }, [p, n, h]);
1365
- const $ = (D, W = 0) => {
1366
- const { top: q } = D.getBoundingClientRect();
1367
- return q + W >= 0 && q - W <= window.innerHeight;
1368
- };
1369
- F(() => {
1370
- var D, W;
1371
- if (d && d.type !== "Multiple" && a.current) {
1372
- const q = yt(a.current.contentDocument, d._id);
1373
- q && ($(q) || (W = (D = a.current) == null ? void 0 : D.contentWindow) == null || W.scrollTo({ top: q.offsetTop, behavior: "smooth" }), O([q]));
1374
- }
1375
- }, [d]), F(() => {
1376
- if (!ee(g) && a.current) {
1377
- const D = sn(
1378
- a.current.contentDocument,
1379
- ce(g).id
1380
- );
1381
- w(D ? [D] : [null]);
1382
- } else
1383
- w([null]);
1384
- }, [g]);
1385
- const l = wt(() => {
1386
- let D = Dr;
1387
- return e === "offline" && (D = D.replace(
1388
- "https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio",
1389
- "/offline/tailwind.cdn.js"
1390
- ), 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;
1391
- }, [e]);
1392
- return /* @__PURE__ */ t.jsx(
1393
- "div",
1394
- {
1395
- onClick: () => {
1396
- i([]), U([]);
1397
- },
1398
- onMouseLeave: () => setTimeout(() => s(""), 300),
1399
- className: "relative mx-auto h-full w-full bg-black/80",
1400
- style: h > 0 && !ee(m) ? { width: r ? "100%" : h } : {},
1401
- ref: p,
1402
- children: /* @__PURE__ */ t.jsxs(
1403
- Kr,
1404
- {
1405
- contentDidMount: () => C(a.current),
1406
- ref: a,
1407
- id: "canvas-iframe",
1408
- style: { width: `${n}px`, ...m },
1409
- className: "relative mx-auto box-content h-full max-w-full shadow-md transition-all duration-300 ease-linear",
1410
- initialContent: l,
1411
- children: [
1412
- /* @__PURE__ */ t.jsx(Gr, {}),
1413
- /* @__PURE__ */ t.jsx(
1414
- Zr,
1415
- {
1416
- block: d,
1417
- selectedBlockElement: ce(v)
1418
- }
1419
- ),
1420
- /* @__PURE__ */ t.jsx(Jr, { model: "page" }),
1421
- /* @__PURE__ */ t.jsxs(Vr, { children: [
1422
- M ? /* @__PURE__ */ t.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ t.jsx(tt, { className: "h-full" }) }) : /* @__PURE__ */ t.jsx(on, {}),
1423
- /* @__PURE__ */ t.jsx("div", { className: "h-60" })
1424
- ] })
1425
- ]
1426
- }
1427
- )
1428
- }
1429
- );
1430
- }, cn = Et(() => import("./AddBlocks-7b723045.js")), ro = () => {
1431
- const e = et("mode", ve.STATIC), [r, n] = te(Zt), i = {
1432
- [ve.STATIC]: /* @__PURE__ */ t.jsx(an, {}),
1433
- [ve.FRAMEWORK]: null
1434
- }[e];
1435
- return /* @__PURE__ */ t.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1436
- /* @__PURE__ */ t.jsx(Mr, {}),
1437
- /* @__PURE__ */ t.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: [
1438
- /* @__PURE__ */ t.jsx(Ze, { fallback: /* @__PURE__ */ t.jsx(tt, { className: "h-full" }), children: /* @__PURE__ */ t.jsx(Jt, { children: i }) }),
1439
- r ? /* @__PURE__ */ t.jsx(
1440
- "div",
1441
- {
1442
- onClick: () => n(!1),
1443
- className: "absolute inset-0 z-50 flex items-center bg-black/30 backdrop-blur-sm",
1444
- children: /* @__PURE__ */ t.jsx(
1445
- "div",
1446
- {
1447
- onClick: (d) => d.stopPropagation(),
1448
- className: "mx-auto h-[90%] w-[90%] max-w-3xl rounded-md bg-white p-4 shadow-lg shadow-black/10 xl:w-[65%]",
1449
- children: /* @__PURE__ */ t.jsx(cn, {})
1450
- }
1451
- )
1452
- }
1453
- ) : null
1454
- ] })
1455
- ] });
1456
- };
1457
- export {
1458
- ro as default
1459
- };