@chaibuilder/sdk 1.1.18 → 1.2.0

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 (122) hide show
  1. package/dist/AddBlocks-57-vroWk.cjs +1 -0
  2. package/dist/AddBlocks-QvCc-oag.js +225 -0
  3. package/dist/BrandingOptions-arKT1zCy.cjs +1 -0
  4. package/dist/{BrandingOptions-zFJ28xmJ.js → BrandingOptions-mZXO7thQ.js} +27 -25
  5. package/dist/{CanvasArea-vTV3O27-.js → CanvasArea-59Gm0EZx.js} +581 -598
  6. package/dist/CanvasArea-jRg53jrS.cjs +59 -0
  7. package/dist/CurrentPage-MLObvs0K.cjs +1 -0
  8. package/dist/{CurrentPage-Ay7X9h9y.js → CurrentPage-YPI5QTjk.js} +17 -14
  9. package/dist/Functions-7jnEwJyw.js +15 -0
  10. package/dist/Functions-N3yhPYKY.cjs +1 -0
  11. package/dist/{Layers-CWnzKXMo.js → Layers-no2keK4N.js} +149 -146
  12. package/dist/Layers-x_mWeT_q.cjs +1 -0
  13. package/dist/MODIFIERS-2FeVfZQ9.cjs +1 -0
  14. package/dist/{MODIFIERS-MLfpKQY1.js → MODIFIERS-RiXS5Mn1.js} +7 -13
  15. package/dist/MarkAsGlobalBlock-S2BhHTsK.cjs +1 -0
  16. package/dist/{MarkAsGlobalBlock-uhj0kGZo.js → MarkAsGlobalBlock-SPWd6Flk.js} +9 -7
  17. package/dist/{PagesPanel-ALbBHaO3.js → PagesPanel-Q08uN4X3.js} +12 -9
  18. package/dist/PagesPanel-pOIuFPOA.cjs +1 -0
  19. package/dist/ProjectPanel-4bN_GyNm.cjs +1 -0
  20. package/dist/{ProjectPanel-tIDarI9R.js → ProjectPanel-zzYV9yrV.js} +25 -22
  21. package/dist/{Settings-5uDMY9SU.js → Settings-28A7R61i.js} +334 -331
  22. package/dist/Settings-KlTtgu3w.cjs +1 -0
  23. package/dist/{SidePanels-D6U95ur1.js → SidePanels--ZK6Iqou.js} +80 -77
  24. package/dist/SidePanels-eJBA_cUu.cjs +1 -0
  25. package/dist/{Topbar-_-1HX-EE.js → Topbar-ks1ckGLz.js} +15 -13
  26. package/dist/Topbar-u5XKdWgQ.cjs +1 -0
  27. package/dist/{UnsplashImages-mqK09h8E.js → UnsplashImages-8vJPuqrF.js} +25 -23
  28. package/dist/UnsplashImages-V8oKEHfi.cjs +1 -0
  29. package/dist/{UploadImages-IDkkRuhx.js → UploadImages-6N6UrjLo.js} +26 -24
  30. package/dist/UploadImages-eHYxwWAp.cjs +1 -0
  31. package/dist/_commonjsHelpers-UyOWmZb0.js +8 -0
  32. package/dist/_commonjsHelpers-wDK0ZLPo.cjs +1 -0
  33. package/dist/{add-page-modal-C1UGoRkw.js → add-page-modal-EHIYTW4T.js} +27 -24
  34. package/dist/add-page-modal-OvNXLGf0.cjs +1 -0
  35. package/dist/{confirm-alert-ea5xpncD.js → confirm-alert-biqvaLT-.js} +9 -7
  36. package/dist/confirm-alert-f3DYO5Hj.cjs +1 -0
  37. package/dist/controls-Dy1qa8Dc.cjs +1 -0
  38. package/dist/controls-XPXGHKht.js +182 -0
  39. package/dist/core.cjs +1 -1
  40. package/dist/core.d.ts +10 -1
  41. package/dist/core.js +60 -57
  42. package/dist/delete-page-modal-U4yiuhx0.cjs +1 -0
  43. package/dist/{delete-page-modal-0GxR128b.js → delete-page-modal-qZJCk_JH.js} +15 -12
  44. package/dist/email-blocks.cjs +1 -0
  45. package/dist/email-blocks.d.ts +3 -0
  46. package/dist/email-blocks.js +35 -0
  47. package/dist/{form-irY39wvJ.js → form-Moz_psOw.js} +16 -16
  48. package/dist/form-lJhy9DEC.cjs +1 -0
  49. package/dist/functions-Ox_svtKm.cjs +1 -0
  50. package/dist/functions-xIebp8Aw.js +23 -0
  51. package/dist/html-to-json-dfALTAdG.cjs +1 -0
  52. package/dist/{html-to-json-wmbV9eZP.js → html-to-json-xKBERAI1.js} +47 -46
  53. package/dist/index-IIJ_o44s.cjs +1 -0
  54. package/dist/{index-qEix1meh.js → index-QEchoZ98.js} +8 -8
  55. package/dist/{index-0OqmBgqo.js → index-_OgCuSUz.js} +528 -533
  56. package/dist/{index-npVo1wi3.cjs → index-hMoPNZVn.cjs} +2 -2
  57. package/dist/{jsx-runtime-NV737rRe.js → jsx-runtime-WbnYoNE9.js} +1 -1
  58. package/dist/{jsx-runtime-WUGKV8jN.cjs → jsx-runtime-Z_BpKhVy.cjs} +7 -7
  59. package/dist/lib.cjs +2 -2
  60. package/dist/lib.d.ts +1 -1
  61. package/dist/lib.js +47 -44
  62. package/dist/page-viewer-WhM1FSU0.cjs +1 -0
  63. package/dist/{page-viewer-mgnZt6nO.js → page-viewer-zFLkUu2I.js} +17 -14
  64. package/dist/{project-general-setting-M52W-vUp.js → project-general-setting-MWGOOurD.js} +16 -13
  65. package/dist/project-general-setting-y8daY7V9.cjs +1 -0
  66. package/dist/project-seo-setting-9JGBPzcA.cjs +1 -0
  67. package/dist/{project-seo-setting-EhqUcTKy.js → project-seo-setting-dXclexQW.js} +15 -13
  68. package/dist/render.cjs +1 -1
  69. package/dist/render.d.ts +1 -1
  70. package/dist/render.js +50 -49
  71. package/dist/server.cjs +1 -1
  72. package/dist/server.d.ts +1 -1
  73. package/dist/server.js +11 -11
  74. package/dist/single-page-detail--xPv74bX.cjs +1 -0
  75. package/dist/{single-page-detail-61UDUgWG.js → single-page-detail-C48IPzbd.js} +77 -74
  76. package/dist/studio.cjs +1 -1
  77. package/dist/studio.js +11 -8
  78. package/dist/ui.cjs +1 -1
  79. package/dist/ui.d.ts +3 -3
  80. package/dist/ui.js +144 -142
  81. package/dist/useAddBlockByDrop-_nd8yZBa.cjs +1 -0
  82. package/dist/useAddBlockByDrop-uPXvrg4G.js +20 -0
  83. package/dist/{utils-XsPKXMVo.js → utils-AvyFzbPC.js} +26 -35
  84. package/dist/utils-PTxFk6qT.cjs +1 -0
  85. package/dist/web-blocks.cjs +9 -0
  86. package/dist/web-blocks.d.ts +3 -0
  87. package/dist/web-blocks.js +1033 -0
  88. package/package.json +5 -2
  89. package/dist/AddBlocks-sKF4ti68.js +0 -222
  90. package/dist/AddBlocks-yPovJXtD.cjs +0 -1
  91. package/dist/BrandingOptions-TRVyCvVq.cjs +0 -1
  92. package/dist/CanvasArea-xxqOiENt.cjs +0 -59
  93. package/dist/CurrentPage-ju6otPNk.cjs +0 -1
  94. package/dist/Layers-d9OU0HRE.cjs +0 -1
  95. package/dist/MODIFIERS-WFzDQfiT.cjs +0 -1
  96. package/dist/MarkAsGlobalBlock-CDmEHNx7.cjs +0 -1
  97. package/dist/PagesPanel-F9Cdi4Pf.cjs +0 -1
  98. package/dist/ProjectPanel-T49RUDyt.cjs +0 -1
  99. package/dist/Settings-eZnusNbR.cjs +0 -1
  100. package/dist/SidePanels-BVM5JwGC.cjs +0 -1
  101. package/dist/Topbar-gQxbcPtG.cjs +0 -1
  102. package/dist/UnsplashImages-PNp5fYCc.cjs +0 -1
  103. package/dist/UploadImages-BoSSsLtD.cjs +0 -1
  104. package/dist/add-page-modal-HP1yv9yJ.cjs +0 -1
  105. package/dist/confirm-alert-dHRDZrA1.cjs +0 -1
  106. package/dist/controls-QnyBNkXG.cjs +0 -36
  107. package/dist/controls-kEuiMMDf.js +0 -4600
  108. package/dist/delete-page-modal-yOgfPcHr.cjs +0 -1
  109. package/dist/form-6qGAOYI3.cjs +0 -1
  110. package/dist/functions-86L6n983.js +0 -23
  111. package/dist/functions-Jr7gX_RX.cjs +0 -1
  112. package/dist/html-to-json-AqLy6ye-.cjs +0 -1
  113. package/dist/index-d55M5MRz.cjs +0 -1
  114. package/dist/lodash-2us0VT8I.cjs +0 -36
  115. package/dist/lodash-3gkdNK5u.js +0 -4538
  116. package/dist/page-viewer-G2YIKVSt.cjs +0 -1
  117. package/dist/project-general-setting-sinIiBKe.cjs +0 -1
  118. package/dist/project-seo-setting-N0OnBCvh.cjs +0 -1
  119. package/dist/single-page-detail-oa-yTXhQ.cjs +0 -1
  120. package/dist/useAddBlockByDrop-5QW86HjG.js +0 -20
  121. package/dist/useAddBlockByDrop-Ckzuvu-s.cjs +0 -1
  122. package/dist/utils-37UXq2O5.cjs +0 -1
@@ -0,0 +1,59 @@
1
+ "use strict";var $e=Object.defineProperty;var Ue=(e,t,n)=>t in e?$e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var K=(e,t,n)=>(Ue(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./jsx-runtime-Z_BpKhVy.cjs"),g=require("react"),p=require("lodash-es"),L=require("@radix-ui/react-icons"),o=require("./index-IIJ_o44s.cjs"),ne=require("react-i18next"),H=require("jotai"),ge=require("react-dom"),ze=require("./_commonjsHelpers-wDK0ZLPo.cjs"),G=require("./index-hMoPNZVn.cjs"),Ye=require("react-quill"),Ke=require("./useAddBlockByDrop-_nd8yZBa.cjs"),Ce=require("flagged"),Je=require("@floating-ui/dom"),me=require("@floating-ui/react-dom"),Ve=require("@react-hookz/web"),Ze=require("@bobthered/tailwindcss-palette-generator"),Qe=require("react-wrap-balancer"),Ge=require("tailwind-merge"),ee=require("./MODIFIERS-2FeVfZQ9.cjs"),Xe=require("@chaibuilder/runtime");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("clsx");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("i18next");require("react-textarea-autosize");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-dfALTAdG.cjs");require("himalaya");require("lodash");require("lucide-react");const et=()=>{const{undoCount:e,redoCount:t,undo:n,redo:i}=o.useCanvasHistory();return s.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[s.jsxRuntimeExports.jsx(o.Button,{disabled:!e,size:"sm",onClick:n,className:"rounded-full",variant:"ghost",children:s.jsxRuntimeExports.jsx(L.ResetIcon,{})}),s.jsxRuntimeExports.jsx(o.Button,{disabled:!t,onClick:i,size:"sm",className:"rounded-full",variant:"ghost",children:s.jsxRuntimeExports.jsx(L.ResetIcon,{className:"rotate-180 scale-y-[-1] transform"})})]})};function tt(){const[e,t]=o.useDarkMode(),{t:n}=ne.useTranslation();return s.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[s.jsxRuntimeExports.jsx(o.Label,{htmlFor:"dark-mode-switch",children:n("dark_mode")}),s.jsxRuntimeExports.jsxs(o.Switch,{id:"dark-mode-switch",checked:e,onCheckedChange:()=>{t(!e)},className:`${e?"bg-violet-600":"bg-violet-300"}
2
+ 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`,children:[s.jsxRuntimeExports.jsx("span",{className:"sr-only",children:n("use_setting")}),s.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:`${e?"translate-x-5":"translate-x-0"}
3
+ 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`})]})]})}const ye=({landscape:e=!1})=>s.jsxRuntimeExports.jsxs("svg",{className:e?"rotate-90":"",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",xmlSpace:"preserve",width:13,height:13,children:[s.jsxRuntimeExports.jsx("g",{strokeWidth:0}),s.jsxRuntimeExports.jsx("g",{strokeLinecap:"round",strokeLinejoin:"round"}),s.jsxRuntimeExports.jsx("path",{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",style:{fill:"#000"}})]}),nt=[{title:"mobile_xs_title",content:"mobile_xs_content",breakpoint:"xs",icon:s.jsxRuntimeExports.jsx(L.MobileIcon,{}),width:400},{title:"mobile_sm_title",content:"mobile_sm_content",breakpoint:"sm",icon:s.jsxRuntimeExports.jsx(L.MobileIcon,{className:"rotate-90"}),width:640},{title:"tablet_md_title",content:"tablet_md_content",breakpoint:"md",icon:s.jsxRuntimeExports.jsx(ye,{}),width:800},{title:"tablet_lg_title",content:"tablet_lg_content",breakpoint:"lg",icon:s.jsxRuntimeExports.jsx(ye,{landscape:!0}),width:1024},{title:"desktop_xl_title",content:"desktop_xl_content",breakpoint:"xl",icon:s.jsxRuntimeExports.jsx(L.LaptopIcon,{}),width:1420},{title:"large_desktop_2xl_title",content:"large_desktop_2xl_content",breakpoint:"2xl",icon:s.jsxRuntimeExports.jsx(L.DesktopIcon,{}),width:1920}],ve=({title:e,content:t,currentBreakpoint:n,breakpoint:i,width:a,icon:l,onClick:u})=>{const{t:r}=ne.useTranslation();return s.jsxRuntimeExports.jsxs(o.HoverCard,{children:[s.jsxRuntimeExports.jsx(o.HoverCardTrigger,{asChild:!0,children:s.jsxRuntimeExports.jsx(o.Button,{onClick:()=>u(a),size:"sm",variant:i===n?"secondary":"ghost",children:l})}),s.jsxRuntimeExports.jsx(o.HoverCardContent,{className:"w-52 border-border",children:s.jsxRuntimeExports.jsx("div",{className:"flex justify-between space-x-4",children:s.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[s.jsxRuntimeExports.jsx("h4",{className:"text-sm font-semibold",children:r(e)}),s.jsxRuntimeExports.jsx("p",{className:"text-xs",children:r(t)})]})})})]})},st=()=>{const[,e,t]=o.useCanvasWidth(),[n,i]=o.useSelectedBreakpoints(),{t:a}=ne.useTranslation(),l=o.useBuilderProp("breakpoints",nt),u=r=>{n.includes(r)?n.length>2&&i(n.filter(d=>d!==r)):i(d=>[...d,r])};return l.length<4?s.jsxRuntimeExports.jsx("div",{className:"flex items-center rounded-md",children:p.map(l,r=>g.createElement(ve,{...r,onClick:t,key:r.breakpoint,currentBreakpoint:e}))}):s.jsxRuntimeExports.jsxs("div",{className:"flex items-center rounded-md",children:[p.map(l.filter(r=>p.includes(n,p.toUpper(r.breakpoint))),r=>g.createElement(ve,{...r,onClick:t,key:r.breakpoint,currentBreakpoint:e})),s.jsxRuntimeExports.jsxs(o.DropdownMenu,{children:[s.jsxRuntimeExports.jsx(o.DropdownMenuTrigger,{asChild:!0,children:s.jsxRuntimeExports.jsx("span",{className:"cursor-pointer px-2.5 hover:opacity-80",children:s.jsxRuntimeExports.jsx(L.DotsVerticalIcon,{className:"scale-90 transform"})})}),s.jsxRuntimeExports.jsxs(o.DropdownMenuContent,{className:"w-56 border-border text-xs",children:[s.jsxRuntimeExports.jsx(o.DropdownMenuLabel,{children:a("Breakpoints")}),s.jsxRuntimeExports.jsx(o.DropdownMenuSeparator,{}),p.map(l,r=>s.jsxRuntimeExports.jsx(o.DropdownMenuCheckboxItem,{disabled:r.breakpoint==="xs",onCheckedChange:()=>u(p.toUpper(r.breakpoint)),checked:p.includes(n,p.toUpper(r.breakpoint)),children:a(r.title)},r.breakpoint))]})]})]})},rt=()=>{const{t:e}=ne.useTranslation(),[t]=o.useSetAllBlocks(),{createSnapshot:n}=o.useCanvasHistory(),[,i]=o.useSelectedBlockIds(),[,a]=o.useSelectedStylingBlocks(),l=g.useCallback(()=>{t([]),i([]),a([]),n()},[t,n]);return s.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:s.jsxRuntimeExports.jsxs(o.AlertDialog,{children:[s.jsxRuntimeExports.jsx(o.AlertDialogTrigger,{asChild:!0,children:s.jsxRuntimeExports.jsxs(o.Button,{size:"sm",variant:"ghost",className:"flex items-center gap-x-1",children:[s.jsxRuntimeExports.jsx(L.EraserIcon,{})," ",e("clear")]})}),s.jsxRuntimeExports.jsxs(o.AlertDialogContent,{className:"border-border",children:[s.jsxRuntimeExports.jsxs(o.AlertDialogHeader,{children:[s.jsxRuntimeExports.jsx(o.AlertDialogTitle,{children:e("clear_canvas_title")}),s.jsxRuntimeExports.jsx(o.AlertDialogDescription,{children:e("clear_canvas_description")})]}),s.jsxRuntimeExports.jsxs(o.AlertDialogFooter,{children:[s.jsxRuntimeExports.jsx(o.AlertDialogCancel,{children:e("cancel")}),s.jsxRuntimeExports.jsx(o.AlertDialogAction,{onClick:l,children:e("yes")})]})]})]})})},ot=()=>{const e=o.useFeatureSupport("darkMode",!1),[t]=o.useCanvasZoom();return s.jsxRuntimeExports.jsxs("div",{className:"flex h-10 items-center justify-between border-b bg-background/70 px-2",children:[s.jsxRuntimeExports.jsxs("div",{className:"flex h-full space-x-2",children:[e?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(tt,{}),s.jsxRuntimeExports.jsx(o.Separator,{orientation:"vertical"})]}):null,s.jsxRuntimeExports.jsx(st,{}),s.jsxRuntimeExports.jsx(o.Separator,{orientation:"vertical"}),s.jsxRuntimeExports.jsxs("div",{className:"flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium",children:[s.jsxRuntimeExports.jsx(L.ZoomInIcon,{className:"h-3.5 w-3.5 flex-shrink-0"})," ",s.jsxRuntimeExports.jsxs("div",{className:"text-xs leading-3",children:[p.round(t,0),"%"]})]}),s.jsxRuntimeExports.jsx(o.Separator,{orientation:"vertical"}),s.jsxRuntimeExports.jsx(et,{})]}),s.jsxRuntimeExports.jsxs("div",{className:"flex h-full items-center space-x-2",children:[s.jsxRuntimeExports.jsx(o.Separator,{orientation:"vertical"}),s.jsxRuntimeExports.jsx(rt,{})]})]})},it=`<!doctype html>
4
+ <html class="scroll-smooth h-full overflow-y-auto">
5
+ <head>
6
+ <meta charset="UTF-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+ <script src="https://old.chaibuilder.com/offline/tailwind.cdn.js"><\/script>
9
+ <style>
10
+ html { height: 100%; overflow:auto; }
11
+ body { height: 100%; }
12
+ .air-highlight{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}
13
+ .air-highlight-multi{ outline: 1px solid #29e503 !important; outline-offset: -1px;}
14
+ body{ -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none;
15
+ -moz-user-select: none;-ms-user-select: none; user-select: none; }
16
+ html{
17
+ -ms-overflow-style: none; /* IE and Edge */
18
+ scrollbar-width: none; /* Firefox */
19
+ }
20
+ /** IMPORTANT: Make fields content editable in SAFARI */
21
+ [contenteditable] {-webkit-user-select: text;user-select: text;}
22
+
23
+ html::-webkit-scrollbar { width: 0 !important }
24
+ .aspect-auto{aspect-ratio: auto;}
25
+ .aspect-square{aspect-ratio: 1/1;}
26
+ .aspect-video{aspect-ratio: 16/9;}
27
+ .dragging [data-dnd="leaf"] { pointer-events: none; } .dragging [data-dnd="leaf"] * { pointer-events: none; }
28
+ .dragging [data-dnd="ignore"], .dragging [data-dnd="ignore"] * { pointer-events: none; }
29
+ a{ pointer-events: none !important; }
30
+ [contenteditable="true"], [contenteditable="true"] * { cursor: text !important; }
31
+ [contenteditable="true"] {
32
+ outline: none;
33
+ box-shadow: 0 0 0px 4px rgba(36, 150, 255, 0.2);
34
+ -webkit-user-select: text;
35
+ -moz-user-select: text;
36
+ user-select: text;
37
+ }
38
+ </style>
39
+ <style id="hidden-blocks"></style>
40
+ <style id="selected-block"></style>
41
+ <style id="selected-styling-block"></style>
42
+ <style id="highlighted-block"></style>
43
+ <style id="dragged-block"></style>
44
+
45
+ </head>
46
+ <body class="font-body antialiased h-full">
47
+ <div class="frame-root"></div>
48
+ <script src="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.js"><\/script>
49
+ </body>
50
+ </html>`,at=e=>{const[t]=o.useCanvasWidth(),[,n]=o.useCanvasZoom(),[i,a]=g.useState({}),l=g.useCallback(()=>{const{width:u,height:r}=e;if(u<t){const d=parseFloat((u/t).toFixed(2).toString());let x={};const h=r*d;r&&(x={height:100+(r-h)/h*100+"%"}),a({position:"relative",top:0,transform:`scale(${d})`,transformOrigin:"top left",...x,maxWidth:"none"}),n(d*100)}else a({}),n(100)},[t,e,n]);return g.useEffect(()=>{l()},[t,e,n,l]),i};var te={exports:{}};/*
51
+ object-assign
52
+ (c) Sindre Sorhus
53
+ @license MIT
54
+ */var re,je;function lt(){if(je)return re;je=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function i(l){if(l==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(l)}function a(){try{if(!Object.assign)return!1;var l=new String("abc");if(l[5]="de",Object.getOwnPropertyNames(l)[0]==="5")return!1;for(var u={},r=0;r<10;r++)u["_"+String.fromCharCode(r)]=r;var d=Object.getOwnPropertyNames(u).map(function(h){return u[h]});if(d.join("")!=="0123456789")return!1;var x={};return"abcdefghijklmnopqrst".split("").forEach(function(h){x[h]=h}),Object.keys(Object.assign({},x)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return re=a()?Object.assign:function(l,u){for(var r,d=i(l),x,h=1;h<arguments.length;h++){r=Object(arguments[h]);for(var m in r)t.call(r,m)&&(d[m]=r[m]);if(e){x=e(r);for(var y=0;y<x.length;y++)n.call(r,x[y])&&(d[x[y]]=r[x[y]])}}return d},re}var oe,Ee;function fe(){if(Ee)return oe;Ee=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return oe=e,oe}var ie,be;function Te(){return be||(be=1,ie=Function.call.bind(Object.prototype.hasOwnProperty)),ie}var ae,ke;function ct(){if(ke)return ae;ke=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=fe(),n={},i=Te();e=function(l){var u="Warning: "+l;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}}}function a(l,u,r,d,x){if(process.env.NODE_ENV!=="production"){for(var h in l)if(i(l,h)){var m;try{if(typeof l[h]!="function"){var y=Error((d||"React class")+": "+r+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw y.name="Invariant Violation",y}m=l[h](u,h,d,r,null,t)}catch(q){m=q}if(m&&!(m instanceof Error)&&e((d||"React class")+": type specification of "+r+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in n)){n[m.message]=!0;var B=x?x():"";e("Failed "+r+" type: "+m.message+(B??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ae=a,ae}var le,Re;function dt(){if(Re)return le;Re=1;var e=G.reactIsExports,t=lt(),n=fe(),i=Te(),a=ct(),l=function(){};process.env.NODE_ENV!=="production"&&(l=function(r){var d="Warning: "+r;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function u(){return null}return le=function(r,d){var x=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function m(c){var f=c&&(x&&c[x]||c[h]);if(typeof f=="function")return f}var y="<<anonymous>>",B={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:O(),arrayOf:w,element:F(),elementType:W(),instanceOf:_,node:Me(),objectOf:U,oneOf:$,oneOfType:Pe,shape:Le,exact:Ne};function q(c,f){return c===f?c!==0||1/c===1/f:c!==c&&f!==f}function k(c,f){this.message=c,this.data=f&&typeof f=="object"?f:{},this.stack=""}k.prototype=Error.prototype;function A(c){if(process.env.NODE_ENV!=="production")var f={},R=0;function E(S,j,b,C,I,T,N){if(C=C||y,T=T||b,N!==n){if(d){var P=new Error("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");throw P.name="Invariant Violation",P}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var J=C+":"+b;!f[J]&&R<3&&(l("You are manually calling a React.PropTypes validation function for the `"+T+"` prop on `"+C+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),f[J]=!0,R++)}}return j[b]==null?S?j[b]===null?new k("The "+I+" `"+T+"` is marked as required "+("in `"+C+"`, but its value is `null`.")):new k("The "+I+" `"+T+"` is marked as required in "+("`"+C+"`, but its value is `undefined`.")):null:c(j,b,C,I,T)}var v=E.bind(null,!1);return v.isRequired=E.bind(null,!0),v}function D(c){function f(R,E,v,S,j,b){var C=R[E],I=z(C);if(I!==c){var T=V(C);return new k("Invalid "+S+" `"+j+"` of type "+("`"+T+"` supplied to `"+v+"`, expected ")+("`"+c+"`."),{expectedType:c})}return null}return A(f)}function O(){return A(u)}function w(c){function f(R,E,v,S,j){if(typeof c!="function")return new k("Property `"+j+"` of component `"+v+"` has invalid PropType notation inside arrayOf.");var b=R[E];if(!Array.isArray(b)){var C=z(b);return new k("Invalid "+S+" `"+j+"` of type "+("`"+C+"` supplied to `"+v+"`, expected an array."))}for(var I=0;I<b.length;I++){var T=c(b,I,v,S,j+"["+I+"]",n);if(T instanceof Error)return T}return null}return A(f)}function F(){function c(f,R,E,v,S){var j=f[R];if(!r(j)){var b=z(j);return new k("Invalid "+v+" `"+S+"` of type "+("`"+b+"` supplied to `"+E+"`, expected a single ReactElement."))}return null}return A(c)}function W(){function c(f,R,E,v,S){var j=f[R];if(!e.isValidElementType(j)){var b=z(j);return new k("Invalid "+v+" `"+S+"` of type "+("`"+b+"` supplied to `"+E+"`, expected a single ReactElement type."))}return null}return A(c)}function _(c){function f(R,E,v,S,j){if(!(R[E]instanceof c)){var b=c.name||y,C=We(R[E]);return new k("Invalid "+S+" `"+j+"` of type "+("`"+C+"` supplied to `"+v+"`, expected ")+("instance of `"+b+"`."))}return null}return A(f)}function $(c){if(!Array.isArray(c))return process.env.NODE_ENV!=="production"&&(arguments.length>1?l("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])."):l("Invalid argument supplied to oneOf, expected an array.")),u;function f(R,E,v,S,j){for(var b=R[E],C=0;C<c.length;C++)if(q(b,c[C]))return null;var I=JSON.stringify(c,function(N,P){var J=V(P);return J==="symbol"?String(P):P});return new k("Invalid "+S+" `"+j+"` of value `"+String(b)+"` "+("supplied to `"+v+"`, expected one of "+I+"."))}return A(f)}function U(c){function f(R,E,v,S,j){if(typeof c!="function")return new k("Property `"+j+"` of component `"+v+"` has invalid PropType notation inside objectOf.");var b=R[E],C=z(b);if(C!=="object")return new k("Invalid "+S+" `"+j+"` of type "+("`"+C+"` supplied to `"+v+"`, expected an object."));for(var I in b)if(i(b,I)){var T=c(b,I,v,S,j+"."+I,n);if(T instanceof Error)return T}return null}return A(f)}function Pe(c){if(!Array.isArray(c))return process.env.NODE_ENV!=="production"&&l("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var f=0;f<c.length;f++){var R=c[f];if(typeof R!="function")return l("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+He(R)+" at index "+f+"."),u}function E(v,S,j,b,C){for(var I=[],T=0;T<c.length;T++){var N=c[T],P=N(v,S,j,b,C,n);if(P==null)return null;P.data&&i(P.data,"expectedType")&&I.push(P.data.expectedType)}var J=I.length>0?", expected one of type ["+I.join(", ")+"]":"";return new k("Invalid "+b+" `"+C+"` supplied to "+("`"+j+"`"+J+"."))}return A(E)}function Me(){function c(f,R,E,v,S){return X(f[R])?null:new k("Invalid "+v+" `"+S+"` supplied to "+("`"+E+"`, expected a ReactNode."))}return A(c)}function he(c,f,R,E,v){return new k((c||"React class")+": "+f+" type `"+R+"."+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+v+"`.")}function Le(c){function f(R,E,v,S,j){var b=R[E],C=z(b);if(C!=="object")return new k("Invalid "+S+" `"+j+"` of type `"+C+"` "+("supplied to `"+v+"`, expected `object`."));for(var I in c){var T=c[I];if(typeof T!="function")return he(v,S,j,I,V(T));var N=T(b,I,v,S,j+"."+I,n);if(N)return N}return null}return A(f)}function Ne(c){function f(R,E,v,S,j){var b=R[E],C=z(b);if(C!=="object")return new k("Invalid "+S+" `"+j+"` of type `"+C+"` "+("supplied to `"+v+"`, expected `object`."));var I=t({},R[E],c);for(var T in I){var N=c[T];if(i(c,T)&&typeof N!="function")return he(v,S,j,T,V(N));if(!N)return new k("Invalid "+S+" `"+j+"` key `"+T+"` supplied to `"+v+"`.\nBad object: "+JSON.stringify(R[E],null," ")+`
55
+ Valid keys: `+JSON.stringify(Object.keys(c),null," "));var P=N(b,T,v,S,j+"."+T,n);if(P)return P}return null}return A(f)}function X(c){switch(typeof c){case"number":case"string":case"undefined":return!0;case"boolean":return!c;case"object":if(Array.isArray(c))return c.every(X);if(c===null||r(c))return!0;var f=m(c);if(f){var R=f.call(c),E;if(f!==c.entries){for(;!(E=R.next()).done;)if(!X(E.value))return!1}else for(;!(E=R.next()).done;){var v=E.value;if(v&&!X(v[1]))return!1}}else return!1;return!0;default:return!1}}function Fe(c,f){return c==="symbol"?!0:f?f["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&f instanceof Symbol:!1}function z(c){var f=typeof c;return Array.isArray(c)?"array":c instanceof RegExp?"object":Fe(f,c)?"symbol":f}function V(c){if(typeof c>"u"||c===null)return""+c;var f=z(c);if(f==="object"){if(c instanceof Date)return"date";if(c instanceof RegExp)return"regexp"}return f}function He(c){var f=V(c);switch(f){case"array":case"object":return"an "+f;case"boolean":case"date":case"regexp":return"a "+f;default:return f}}function We(c){return!c.constructor||!c.constructor.name?y:c.constructor.name}return B.checkPropTypes=a,B.resetWarningCache=a.resetWarningCache,B.PropTypes=B,B},le}var ce,we;function ut(){if(we)return ce;we=1;var e=fe();function t(){}function n(){}return n.resetWarningCache=t,ce=function(){function i(u,r,d,x,h,m){if(m!==e){var y=new Error("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");throw y.name="Invariant Violation",y}}i.isRequired=i;function a(){return i}var l={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:a,element:i,elementType:i,instanceOf:a,node:i,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return l.PropTypes=l,l},ce}var Wt=te.exports;if(process.env.NODE_ENV!=="production"){var pt=G.reactIsExports,ft=!0;te.exports=dt()(pt.isElement,ft)}else te.exports=ut()();var xt=te.exports;const M=ze.getDefaultExportFromCjs(xt);let Ie,Be;typeof document<"u"&&(Ie=document);typeof window<"u"&&(Be=window);const Ae=g.createContext({document:Ie,window:Be}),se=()=>g.useContext(Ae),{Provider:ht,Consumer:$t}=Ae;class De extends g.Component{componentDidMount(){this.props.contentDidMount()}componentDidUpdate(){this.props.contentDidUpdate()}render(){return g.Children.only(this.props.children)}}K(De,"propTypes",{children:M.element.isRequired,contentDidMount:M.func.isRequired,contentDidUpdate:M.func.isRequired});class ue extends g.Component{constructor(n,i){super(n,i);K(this,"setRef",n=>{this.nodeRef.current=n;const{forwardedRef:i}=this.props;typeof i=="function"?i(n):i&&(i.current=n)});K(this,"handleLoad",()=>{clearInterval(this.loadCheck),this.state.iframeLoaded||this.setState({iframeLoaded:!0})});K(this,"loadCheck",()=>setInterval(()=>{this.handleLoad()},500));this._isMounted=!1,this.nodeRef=g.createRef(),this.state={iframeLoaded:!1}}componentDidMount(){this._isMounted=!0,this.getDoc()&&this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded",this.handleLoad)}componentWillUnmount(){this._isMounted=!1,this.nodeRef.current.removeEventListener("DOMContentLoaded",this.handleLoad)}getDoc(){return this.nodeRef.current?this.nodeRef.current.contentDocument:null}getMountTarget(){const n=this.getDoc();return this.props.mountTarget?n.querySelector(this.props.mountTarget):n.body.children[0]}renderFrameContents(){if(!this._isMounted)return null;const n=this.getDoc();if(!n)return null;const i=this.props.contentDidMount,a=this.props.contentDidUpdate,l=n.defaultView||n.parentView,u=s.jsxRuntimeExports.jsx(De,{contentDidMount:i,contentDidUpdate:a,children:s.jsxRuntimeExports.jsx(ht,{value:{document:n,window:l},children:s.jsxRuntimeExports.jsx("div",{className:"frame-content",children:this.props.children})})}),r=this.getMountTarget();return[ge.createPortal(this.props.head,this.getDoc().head),ge.createPortal(u,r)]}render(){const n={...this.props,srcDoc:this.props.initialContent,children:void 0};return delete n.head,delete n.initialContent,delete n.mountTarget,delete n.contentDidMount,delete n.contentDidUpdate,delete n.forwardedRef,s.jsxRuntimeExports.jsx("iframe",{...n,ref:this.setRef,onLoad:this.handleLoad,children:this.state.iframeLoaded&&this.renderFrameContents()})}}K(ue,"propTypes",{style:M.object,head:M.node,initialContent:M.string,mountTarget:M.string,contentDidMount:M.func,contentDidUpdate:M.func,children:M.oneOfType([M.element,M.arrayOf(M.element)])}),K(ue,"defaultProps",{style:{},head:null,children:void 0,mountTarget:void 0,contentDidMount:()=>{},contentDidUpdate:()=>{},initialContent:'<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'});const gt=g.forwardRef((e,t)=>s.jsxRuntimeExports.jsx(ue,{...e,forwardedRef:t}));let Y=null,Q=[],Z=null,_e=null;function mt(e){const t=window.getComputedStyle(e),n=parseInt(t.paddingLeft,10),i=parseInt(t.paddingTop,10),a=parseInt(t.paddingRight,10),l=parseInt(t.paddingBottom,10);return{paddingLeft:n,paddingTop:i,paddingRight:a,paddingBottom:l}}const Se=(e,t,n)=>{if(!Y)return;const i=e.getBoundingClientRect(),a=Y==null?void 0:Y.getElementById("placeholder"),{paddingLeft:l,paddingTop:u,paddingRight:r,paddingBottom:d}=mt(e);a.style.width=t==="vertical"?i.width-l-r+"px":"2px",a.style.height=t==="vertical"?"2px":i.height-u-d+"px",a.style.display="block";const x=Q.reduce((h,m)=>Math.abs(m-n)<Math.abs(h-n)?m:h);_e=Q.indexOf(x),t==="vertical"?(a.style.top=e.offsetTop+x+"px",a.style.left=e.offsetLeft+l+"px"):(a.style.top=e.offsetTop+u+"px",a.style.left=e.offsetLeft+x+"px")},yt=e=>{const t=Oe(e),n=window.getComputedStyle(e),i=t==="horizontal",a=parseInt(n.paddingLeft),l=parseInt(n.paddingTop);let u=i?a:l;Q=[u],Array.from(e.children).forEach(r=>{const d=window.getComputedStyle(r),x=parseInt(i?d.marginLeft+d.marginRight:d.marginTop+d.marginBottom),h=i?r.offsetWidth:r.offsetHeight;Q.push(u+h+x),u+=h+x})};function Oe(e){const t=window.getComputedStyle(e).display,n=window.getComputedStyle(e).flexDirection;if(t==="flex")return n==="column"||n==="column-reverse"?"vertical":"horizontal";if(t==="grid"){const i=window.getComputedStyle(e).gridTemplateRows,a=window.getComputedStyle(e).gridTemplateColumns;if(i.includes("auto"))return"vertical";if(a.includes("auto"))return"horizontal"}return t==="block"?"vertical":"horizontal"}const vt=p.throttle(e=>{const t=e.target,n=Oe(t);if(n==="vertical"){const i=e.clientY-t.offsetTop;Se(t,n,i)}else{const i=e.clientX-t.offsetLeft;Se(t,n,i)}},200),jt=e=>{e.preventDefault(),e.stopPropagation(),vt(e)};function de(){const e=Y==null?void 0:Y.getElementById("placeholder");e.style.display="none"}const Et=()=>{const{document:e}=se(),[t,n]=H.useAtom(o.draggingFlagAtom),i=Ke.useAddBlockByDrop(),a=Ce.useFeature("dnd"),[,l]=o.useHighlightBlockId(),[,u]=o.useSelectedBlockIds();return Y=e,{isDragging:t,"data-dnd":"branch",onDragOver:a?jt:p.noop,onDrop:a?r=>{Z==null||Z.classList.remove("outline","outline-green-300","outline-2","-outline-offset-2");const d=JSON.parse(r.dataTransfer.getData("text/plain"));let x=r.target.getAttribute("data-block-id");x===null&&(x=r.target.parentElement.getAttribute("data-block-id")),i({block:d,dropTargetId:x||null,relativeIndex:_e}),n(!1),de(),setTimeout(()=>{de()},300)}:p.noop,onDragEnter:a?r=>{const d=r;Z=d.target,d.stopPropagation(),d.preventDefault(),Q=[];const x=d.target;yt(x),x.classList.add("outline","outline-green-300","outline-2","-outline-offset-2"),n(!0),l(""),u([])}:p.noop,onDragLeave:a?r=>{const d=r;Z=null,d.stopPropagation(),d.preventDefault(),d.target.classList.remove("outline","outline-green-300","outline-2","-outline-offset-2")}:p.noop,onMouseOut:a?()=>{n(!1),de()}:p.noop}};function xe(e){return e.getAttribute("data-block-id")?e:e.closest("[data-block-id]")}function bt(e){e.container.innerHTML="",e.container.parentNode.removeChild(e.container);var t=document.querySelector(".ql-toolbar");t&&t.parentNode.removeChild(t),e=null}const kt=()=>{const e=["Heading","Paragraph","Text","Link","Span","Button"],t=o.useUpdateBlocksProps(),[,n]=o.useHighlightBlockId(),[i,a]=H.useAtom(o.inlineEditingActiveAtom);return l=>{var m;if(i)return;const u=xe(l.target),r=u.getAttribute("data-block-type");if(!r||!e.includes(r))return;const d=u.cloneNode(!0);u.style.display="none",Array.from(d.attributes).forEach(y=>{y.name!=="class"&&d.removeAttribute(y.name)}),r==="Text"&&(d.style.display="inline-block"),u.parentNode.insertBefore(d,u.nextSibling);const x=new Ye.Quill(d,{placeholder:"Type here..."});function h(){const y=x.getText(0,x.getLength());t([u.getAttribute("data-block-id")],{content:y}),u.removeAttribute("style"),d.removeEventListener("blur",h,!0),bt(x),a(""),n("")}d.addEventListener("blur",h,!0),x.focus(),(m=d.querySelector(".ql-clipboard"))==null||m.remove(),a(u.getAttribute("data-block-id"))}},Rt=()=>{const[,e]=o.useSelectedStylingBlocks(),[,t]=o.useSelectedBlockIds(),[n]=H.useAtom(o.inlineEditingActiveAtom);return i=>{if(n)return;i.stopPropagation();const a=xe(i.target);if(a!=null&&a.getAttribute("data-block-parent")){const l=a.getAttribute("data-style-prop"),u=a.getAttribute("data-style-id"),r=a.getAttribute("data-block-parent");e([{id:u,prop:l,blockId:r}]),t([r])}else a!=null&&a.getAttribute("data-block-id")&&t([a.getAttribute("data-block-id")])}},wt=p.throttle((e,t)=>{const n=xe(e.target);n!=null&&n.getAttribute("data-style-id")&&t(n.getAttribute("data-style-id"))},100),St=()=>{const[,e]=o.useHighlightBlockId(),[t]=H.useAtom(o.inlineEditingActiveAtom);return n=>{t||wt(n,e)}},Ct=({children:e})=>{const{document:t}=se(),[n]=o.useSelectedBlockIds(),[i,a]=o.useSelectedStylingBlocks();g.useEffect(()=>{setTimeout(()=>{if(!p.isEmpty(i))return;const x=qe(t,p.first(n));if(x){const h=x.getAttribute("data-style-prop");if(h){const m=x.getAttribute("data-style-id"),y=x.getAttribute("data-block-parent");a([{id:m,prop:h,blockId:y}])}}},100)},[t,n,a,i]);const l=kt(),u=Rt(),r=St(),d=Et();return s.jsxRuntimeExports.jsx("div",{id:"canvas",onClick:u,onDoubleClick:l,onMouseMove:r,...p.omit(d,"isDragging"),className:"relative mb-5 max-w-full "+(d.isDragging?"dragging":""),children:e})},qe=(e,t)=>e.querySelector(`[data-block-id="${t}"]`),Tt=()=>{const{window:e}=se(),[t,n]=o.useSelectedBlockIds(),i=o.useAllBlocks(),[,a]=o.useSelectedStylingBlocks(),{undo:l,redo:u}=o.useCanvasHistory(),r=o.useDuplicateBlocks(),[,d]=o.useCutBlockIds(),[,x]=o.useCopyBlockIds(),{pasteBlocks:h}=o.usePasteBlocks(),[,m]=o.usePreviewMode(),y=o.useRemoveBlocks(),{savePage:B}=o.useSavePage(),[q]=H.useAtom(o.inlineEditingActiveAtom),[,k]=H.useAtom(o.editLayerNameAtom),A=O=>{O.key==="Enter"&&(O.preventDefault(),t.length===1&&k(p.first(t)))},D=O=>{const w=i.find(F=>F._id===O);return w?w._parent:null};return g.useEffect(()=>{const O=w=>{if(w.key==="Escape"){n([]),a([]);return}if(A(w),!q&&(w.key==="Delete"||w.key==="Backspace")&&(w.preventDefault(),y(t)),w.ctrlKey||w.metaKey){if(w.key==="ArrowUp"){w.preventDefault();const F=t.length>0?D(t[0]):null;F&&n([F])}if(["z","y","d","x","c","p","s","v"].includes(w.key)){if(q&&["x","z","v"].includes(w.key))return!0;w.preventDefault()}w.key==="s"&&(w.stopPropagation(),w.preventDefault(),B()),w.key==="z"&&l(),w.key==="y"&&u(),w.key==="d"&&r(t),w.key==="x"&&d(t),w.key==="c"&&x(t),w.key==="v"&&t.length>0&&h(t[0])}};return e.removeEventListener("keydown",O),e.addEventListener("keydown",O),()=>{e.removeEventListener("keydown",O)}},[t,n,l,y,m,u,r,d,x,h,q,B,e]),null},It=({block:e,label:t})=>{const[,n]=o.useSelectedBlockIds(),[,i]=o.useHighlightBlockId(),[,a]=H.useAtom(o.draggedBlockIdAtom),l=Ce.useFeature("dnd");return s.jsxRuntimeExports.jsxs("div",{className:"mr-10 flex cursor-grab items-center space-x-1 px-1",draggable:l?"true":"false",onDragStart:u=>{u.dataTransfer.setData("text/plain",JSON.stringify(p.pick(e,["_id","_type"]))),a(e._id),setTimeout(()=>{n([]),i(null)},200)},children:[s.jsxRuntimeExports.jsx(L.DragHandleDots2Icon,{}),t]})},Bt=({selectedBlockElement:e,block:t})=>{const n=o.useRemoveBlocks(),i=o.useDuplicateBlocks(),[,a]=o.useSelectedBlockIds(),[,l]=o.useSelectedStylingBlocks(),[u]=H.useAtom(o.inlineEditingActiveAtom),{floatingStyles:r,refs:d,update:x}=me.useFloating({placement:"top-start",middleware:[me.shift(),Je.flip()],elements:{reference:e}});Ve.useResizeObserver(e,()=>x(),e!==null);const h=p.get(t,"_parent",null),m=p.isEmpty(p.get(t,"_name",""))?p.get(t,"_type",""):p.get(t,"_name","");return!e||!t||u?null:s.jsxRuntimeExports.jsxs("div",{role:"button",tabIndex:0,ref:d.setFloating,style:r,onClick:y=>{y.stopPropagation(),y.preventDefault()},onKeyDown:y=>y.stopPropagation(),className:"z-[99999] flex h-6 items-center bg-blue-500 py-2 text-xs text-white",children:[s.jsxRuntimeExports.jsx(It,{label:m,block:t}),s.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 px-1 ",children:[h&&s.jsxRuntimeExports.jsx(L.ArrowUpIcon,{className:"hover:scale-105 ",onClick:()=>{l([]),a([h])}}),o.canDuplicateBlock(p.get(t,"_type",""))?s.jsxRuntimeExports.jsx(L.CopyIcon,{className:"hover:scale-105 ",onClick:()=>i([t==null?void 0:t._id])}):null,o.canDeleteBlock(p.get(t,"_type",""))?s.jsxRuntimeExports.jsx(L.TrashIcon,{className:"hover:scale-105 ",onClick:()=>n([t==null?void 0:t._id])}):null]})]})},At=({model:e})=>{const[t]=o.useBrandingOptions(),[n]=o.useSelectedBlockIds(),[i]=o.useDarkMode(),[a]=o.useHighlightBlockId(),[l]=o.useSelectedStylingBlocks(),[u]=H.useAtom(o.draggedBlockIdAtom),{document:r,window:d}=se(),[x]=g.useState(r==null?void 0:r.getElementById("highlighted-block")),[h]=g.useState(r==null?void 0:r.getElementById("selected-block")),[m]=g.useState(r==null?void 0:r.getElementById("selected-styling-block")),[y]=g.useState(r==null?void 0:r.getElementById("dragged-block"));g.useEffect(()=>{i?r==null||r.documentElement.classList.add("dark"):r==null||r.documentElement.classList.remove("dark")},[i,r]);const B=p.get(t,"headingFont","DM Sans"),q=p.get(t,"bodyFont","DM Sans");return g.useEffect(()=>{const k=p.get(t,"primaryColor","#000"),A=p.get(t,"secondaryColor","#FFF"),D=Ze.tailwindcssPaletteGenerator({colors:[k,A],names:["primary","secondary"]});D.primary.DEFAULT=k,D.secondary.DEFAULT=A;const O=p.get(t,"roundedCorners","0");!d||!d.tailwind||(d.tailwind.config={darkMode:"class",theme:{fontFamily:{heading:[B],body:[q]},extend:{borderRadius:{global:`${O||"0"}px`},colors:D}},plugins:[d.tailwind.plugin.withOptions(({prefix:w="ui"}={})=>({addVariant:F})=>{for(const W of["open","checked","selected","active","disabled"])F(`${w}-${W}`,[`&[data-headlessui-state~="${W}"]`,`:where([data-headlessui-state~="${W}"]) &`]),F(`${w}-not-${W}`,[`&[data-headlessui-state]:not([data-headlessui-state~="${W}"])`,`:where([data-headlessui-state]:not([data-headlessui-state~="${W}"])) &:not([data-headlessui-state])`])})]})},[t,d,B,q]),g.useEffect(()=>{h&&(h.textContent=`${p.map(n,k=>`[data-block-id="${k}"]`).join(",")}{
56
+ outline: 1px solid ${n.length===1?"#42a1fc":"orange"} !important; outline-offset: -1px;
57
+ }`)},[n,h]),g.useEffect(()=>{if(!u){y.textContent="";return}y.textContent=`[data-block-id="${u}"]{ pointer-events: none !important; opacity: 0.2 !important}`},[u]),g.useEffect(()=>{x&&(x.textContent=a?`[data-style-id="${a}"]{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}`:"")},[a,n,x]),g.useEffect(()=>{m&&(m.textContent=`${p.map(l,({id:k})=>`[data-style-id="${k}"]`).join(",")}{
58
+ outline: 1px solid #42a1fc !important; outline-offset: -1px;
59
+ }`)},[l,m]),g.useEffect(()=>{const k=p.get(t,"bodyTextLightColor","#64748b"),A=p.get(t,"bodyTextDarkColor","#94a3b8"),D=p.get(t,"bodyBgLightColor","#FFFFFF"),O=p.get(t,"bodyBgDarkColor","#0f172a");r.body.className=`font-body antialiased text-[${k}] bg-[${D}] dark:text-[${A}] dark:bg-[${O}]`},[t,r,e]),e==="page"?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[B&&s.jsxRuntimeExports.jsx("link",{id:"heading-font",rel:"stylesheet",type:"text/css",href:`https://fonts.googleapis.com/css2?family=${B.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900&display=swap`,media:"all"}),q&&B!==q&&s.jsxRuntimeExports.jsx("link",{id:"body-font",rel:"stylesheet",type:"text/css",href:`https://fonts.googleapis.com/css2?family=${q.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900&display=swap`,media:"all"}),B&&s.jsxRuntimeExports.jsx("style",{children:`h1,h2,h3,h4,h5,h6{font-family: "${B}",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";}`})]}):null},Dt=e=>{const t={};return Object.keys(e).forEach(n=>{p.isString(e[n])&&e[n].startsWith(ee.SLOT_KEY)&&(t[n]=e[n].replace(ee.SLOT_KEY,"").split(","))}),t},_t=p.memoize(e=>{const t=e.replace(ee.STYLES_KEY,"").split(",");return Ge.twMerge(t[0],t[1])});function Ot(e,t){return p.get(e,`${t}_attrs`,{})}function qt(e){const t={};return Object.keys(e).forEach(n=>{if(p.isString(e[n])&&e[n].startsWith(ee.STYLES_KEY)){const i=_t(e[n]);t[n]={className:i,"data-style-prop":n,"data-block-parent":e._id,"data-style-id":`${n}-${e._id}`,...Ot(e,n)}}}),t}function Pt(e,t){const n=p.get(e,"_bindings",{});return p.isEmpty(n)?{...e}:(p.each(n,(i,a)=>{p.isString(i)&&p.get(t,i,null)&&(e[a]=p.get(t,i,null))}),e)}function pe({blocks:e}){const t=o.useAllBlocks(),n=g.useCallback(l=>qt(l),[]),[i]=G.useChaiExternalData(),[a]=o.useAtom(o.inlineEditingActiveAtom);return s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:g.Children.toArray(e.map((l,u)=>{if(a===l._id)return null;const r=Dt(l),d={};p.isEmpty(r)||Object.keys(r).forEach(y=>{d[y]=g.Children.toArray(r[y].map(B=>s.jsxRuntimeExports.jsx(pe,{blocks:[p.find(t,{_id:B})]})))});const x=p.filter(t,{_parent:l._id});d.children=x.length?s.jsxRuntimeExports.jsx(pe,{blocks:x}):null;const h=Xe.getBlockComponent(l._type),m=p.get(h,"component",null);return p.isNull(m)?s.jsxRuntimeExports.jsx("noscript",{children:`<!-- ${l==null?void 0:l._type} not registered -->`}):s.jsxRuntimeExports.jsx(g.Suspense,{children:g.createElement(m,{blockProps:{"data-block-id":l._id,"data-block-type":l._type,"data-dnd":o.canAddChildBlock(l._type)?"branch":"leaf"},inBuilder:!0,index:u,...Pt(l,i),...n(l),...d})})}))})}const Mt=()=>{const e=o.useAllBlocks();return s.jsxRuntimeExports.jsx(Qe.Provider,{children:p.isEmpty(e)?null:s.jsxRuntimeExports.jsx(G.BlocksExternalDataProvider,{children:s.jsxRuntimeExports.jsx(pe,{blocks:p.filter(e,t=>p.isEmpty(t._parent))})})})},Lt=(e,t)=>e.querySelector(`[data-style-id="${t}"]`),Nt=()=>{const[e]=H.useAtom(o.networkModeAtom),[t]=o.usePreviewMode(),[n]=o.useCanvasWidth(),[,i]=o.useSelectedBlockIds(),a=o.useSelectedBlock(),[,l]=o.useHighlightBlockId(),u=g.useRef(null),r=g.useRef(null),[d,x]=g.useState({width:0,height:0}),h=at(d),[m,y]=g.useState(0),[B,q]=g.useState([]),[,k]=g.useState([]),[,A]=H.useAtom(o.canvasIframeAtom),[D,O]=o.useSelectedStylingBlocks(),w=o.useBuilderProp("loadingCanvas",!1);g.useEffect(()=>{const{clientWidth:_,clientHeight:$}=r.current;x({width:_,height:$}),m===0&&y(_)},[r,n,m]);const F=(_,$=0)=>{const{top:U}=_.getBoundingClientRect();return U+$>=0&&U-$<=window.innerHeight};g.useEffect(()=>{var _,$;if(a&&a.type!=="Multiple"&&u.current){const U=qe(u.current.contentDocument,a._id);U&&(F(U)||($=(_=u.current)==null?void 0:_.contentWindow)==null||$.scrollTo({top:U.offsetTop,behavior:"smooth"}),q([U]))}},[a]),g.useEffect(()=>{if(!p.isEmpty(D)&&u.current){const _=Lt(u.current.contentDocument,p.first(D).id);k(_?[_]:[null])}else k([null])},[D]);const W=g.useMemo(()=>{let _=it;return e==="offline"&&(_=_.replace("https://old.chaibuilder.com/offline/tailwind.cdn.js","/offline/tailwind.cdn.js"),_=_.replace("https://unpkg.com/aos@next/dist/aos.css","/offline/aos.css"),_=_.replace("https://unpkg.com/aos@next/dist/aos.js","/offline/aos.js")),_},[e]);return s.jsxRuntimeExports.jsx("div",{onClick:()=>{i([]),O([])},onMouseLeave:()=>setTimeout(()=>l(""),300),className:"relative mx-auto overflow-hidden h-full w-full",style:m>0&&!p.isEmpty(h)?{width:t?"100%":m}:{},ref:r,children:s.jsxRuntimeExports.jsxs(gt,{contentDidMount:()=>A(u.current),ref:u,id:"canvas-iframe",style:{width:`${n}px`,...h},className:"relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",initialContent:W,children:[s.jsxRuntimeExports.jsx(Tt,{}),s.jsxRuntimeExports.jsx(Bt,{block:a,selectedBlockElement:p.first(B)}),s.jsxRuntimeExports.jsx(At,{model:"page"}),s.jsxRuntimeExports.jsx(Ct,{children:w?s.jsxRuntimeExports.jsx("div",{className:"h-full p-4",children:s.jsxRuntimeExports.jsx(o.Skeleton,{className:"h-full"})}):s.jsxRuntimeExports.jsx(Mt,{})}),s.jsxRuntimeExports.jsx("br",{}),s.jsxRuntimeExports.jsx("div",{id:"placeholder",className:"absolute bg-green-500 z-[99999] max-w-full transition-transform"})]})})},Ft=()=>s.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-full flex-col",children:[s.jsxRuntimeExports.jsx(ot,{}),s.jsxRuntimeExports.jsx("div",{className:"relative h-full overflow-hidden bg-slate-800/90 px-2 bg-[linear-gradient(to_right,#222_0.5px,transparent_0.5px),linear-gradient(to_bottom,#222_0.5px,transparent_0.5px)] bg-[size:12px_12px]",children:s.jsxRuntimeExports.jsx(g.Suspense,{fallback:s.jsxRuntimeExports.jsx(o.Skeleton,{className:"h-full"}),children:s.jsxRuntimeExports.jsx(G.ErrorBoundary,{children:s.jsxRuntimeExports.jsx(Nt,{})})})})]});exports.default=Ft;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),t=require("./index-IIJ_o44s.cjs"),i=require("lodash-es"),h=require("sonner"),l=require("react"),o=require("./index-hMoPNZVn.cjs"),j=require("lucide-react");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("./MODIFIERS-2FeVfZQ9.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("jotai");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("react-i18next");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("./html-to-json-dfALTAdG.cjs");require("himalaya");require("lodash");const p=()=>{const{data:s}=o.useProject(),{data:u,isLoading:x}=o.usePages(),{syncState:d}=t.useSavePage(),q=o.useChangePage(),[n,a]=o.useCurrentPage(),c=i.sortBy(i.filter(u,{type:"STATIC"}),r=>i.get(r,"uuid")===(s==null?void 0:s.homepage)?0:1);l.useEffect(()=>{!i.isEmpty(u)&&s.homepage&&!i.find(u,{uuid:n})&&a(s.homepage)},[n,u,s,a]),l.useEffect(()=>()=>a(null),[a]);const m=r=>{if(d!=="SAVED")h.toast.error("You have unsaved changes. Please save before changing the page.");else{const g=i.find(c,{uuid:r});q(g)}};return x||i.isEmpty(n)?null:e.jsxRuntimeExports.jsx("nav",{className:"flex rounded-lg border border-gray-200 bg-gray-50 px-3 pr-0 py-1 text-gray-700 dark:border-gray-700 dark:bg-gray-800","aria-label":"Breadcrumb",children:e.jsxRuntimeExports.jsxs("ol",{className:"inline-flex items-center space-x-1 md:space-x-3",children:[e.jsxRuntimeExports.jsx("li",{className:"inline-flex items-center",children:e.jsxRuntimeExports.jsxs("div",{className:"inline-flex items-center text-sm font-medium text-gray-500 dark:text-gray-400",children:[e.jsxRuntimeExports.jsx(j.BriefcaseIcon,{className:"w-4 h-4 mr-2"}),i.capitalize(s.name)]})}),e.jsxRuntimeExports.jsx("li",{"aria-current":"page",children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx("svg",{className:"mx-1 h-3 w-3 text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10",children:e.jsxRuntimeExports.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 9 4-4-4-4"})}),e.jsxRuntimeExports.jsxs(t.Select,{value:n||"",onValueChange:m,children:[e.jsxRuntimeExports.jsx(t.SelectTrigger,{className:"h-max border-0 py-0 text-sm font-medium text-gray-600 shadow-none outline-none ring-0 focus:ring-0 dark:text-gray-400",children:e.jsxRuntimeExports.jsx(t.SelectValue,{placeholder:"Page"})}),e.jsxRuntimeExports.jsx(t.SelectContent,{className:"z-[999]",children:i.map(c,r=>e.jsxRuntimeExports.jsx(t.SelectItem,{value:r.uuid,children:r==null?void 0:r.name},r.uuid))})]})]})})]})})};exports.default=p;
@@ -1,14 +1,15 @@
1
- import { j as e } from "./jsx-runtime-NV737rRe.js";
2
- import { ag as x, aq as h, ar as f, as as j, at as y, au as P } from "./index-0OqmBgqo.js";
3
- import { q as v, b, g as w, a as m, j as n, u as C, d as N } from "./lodash-3gkdNK5u.js";
1
+ import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
+ import { ag as x, aq as h, ar as f, as as j, at as y, au as P } from "./index-_OgCuSUz.js";
3
+ import { sortBy as v, filter as b, get as w, isEmpty as m, find as n, capitalize as C, map as N } from "lodash-es";
4
4
  import { toast as S } from "sonner";
5
5
  import { useEffect as p } from "react";
6
- import { b as k, a as B, d as E, e as I } from "./index-qEix1meh.js";
6
+ import { b as k, a as B, d as E, e as I } from "./index-QEchoZ98.js";
7
7
  import { BriefcaseIcon as L } from "lucide-react";
8
- import "./MODIFIERS-MLfpKQY1.js";
8
+ import "./_commonjsHelpers-UyOWmZb0.js";
9
9
  import "@radix-ui/react-toggle";
10
10
  import "class-variance-authority";
11
- import "./utils-XsPKXMVo.js";
11
+ import "./utils-AvyFzbPC.js";
12
+ import "./MODIFIERS-RiXS5Mn1.js";
12
13
  import "clsx";
13
14
  import "tailwind-merge";
14
15
  import "@radix-ui/react-switch";
@@ -35,6 +36,7 @@ import "react-dom";
35
36
  import "react-quill";
36
37
  import "jotai";
37
38
  import "flat-to-nested";
39
+ import "./Functions-7jnEwJyw.js";
38
40
  import "redux-undo";
39
41
  import "@chaibuilder/runtime";
40
42
  import "@react-hookz/web";
@@ -46,13 +48,14 @@ import "flagged";
46
48
  import "react-dnd";
47
49
  import "@minoru/react-dnd-treeview";
48
50
  import "react-hotkeys-hook";
49
- import "./html-to-json-wmbV9eZP.js";
51
+ import "./html-to-json-xKBERAI1.js";
50
52
  import "himalaya";
51
- const Be = () => {
52
- const { data: t } = k(), { data: a, isLoading: l } = B(), { syncState: c } = x(), d = E(), [i, o] = I(), s = v(b(a, { type: "STATIC" }), (r) => w(r, "uuid") === (t == null ? void 0 : t.homepage) ? 0 : 1);
53
+ import "lodash";
54
+ const Le = () => {
55
+ const { data: t } = k(), { data: i, isLoading: l } = B(), { syncState: c } = x(), d = E(), [a, o] = I(), s = v(b(i, { type: "STATIC" }), (r) => w(r, "uuid") === (t == null ? void 0 : t.homepage) ? 0 : 1);
53
56
  p(() => {
54
- !m(a) && t.homepage && !n(a, { uuid: i }) && o(t.homepage);
55
- }, [i, a, t, o]), p(() => () => o(null), [o]);
57
+ !m(i) && t.homepage && !n(i, { uuid: a }) && o(t.homepage);
58
+ }, [a, i, t, o]), p(() => () => o(null), [o]);
56
59
  const u = (r) => {
57
60
  if (c !== "SAVED")
58
61
  S.error("You have unsaved changes. Please save before changing the page.");
@@ -61,7 +64,7 @@ const Be = () => {
61
64
  d(g);
62
65
  }
63
66
  };
64
- return l || m(i) ? null : /* @__PURE__ */ e.jsx(
67
+ return l || m(a) ? null : /* @__PURE__ */ e.jsx(
65
68
  "nav",
66
69
  {
67
70
  className: "flex rounded-lg border border-gray-200 bg-gray-50 px-3 pr-0 py-1 text-gray-700 dark:border-gray-700 dark:bg-gray-800",
@@ -92,7 +95,7 @@ const Be = () => {
92
95
  )
93
96
  }
94
97
  ),
95
- /* @__PURE__ */ e.jsxs(h, { value: i || "", onValueChange: u, children: [
98
+ /* @__PURE__ */ e.jsxs(h, { value: a || "", onValueChange: u, children: [
96
99
  /* @__PURE__ */ e.jsx(f, { className: "h-max border-0 py-0 text-sm font-medium text-gray-600 shadow-none outline-none ring-0 focus:ring-0 dark:text-gray-400", children: /* @__PURE__ */ e.jsx(j, { placeholder: "Page" }) }),
97
100
  /* @__PURE__ */ e.jsx(y, { className: "z-[999]", children: N(s, (r) => /* @__PURE__ */ e.jsx(P, { value: r.uuid, children: r == null ? void 0 : r.name }, r.uuid)) })
98
101
  ] })
@@ -102,5 +105,5 @@ const Be = () => {
102
105
  );
103
106
  };
104
107
  export {
105
- Be as default
108
+ Le as default
106
109
  };
@@ -0,0 +1,15 @@
1
+ import { isEmpty as s, startsWith as f } from "lodash-es";
2
+ import { clsx as n } from "clsx";
3
+ import { twMerge as a } from "tailwind-merge";
4
+ function c(t = 6, r = "abcdefghijklmnopqrstuvwxyzABCD") {
5
+ let e = "";
6
+ for (let o = t; o > 0; --o)
7
+ e += r[Math.floor(Math.random() * r.length)];
8
+ return e;
9
+ }
10
+ const l = (t) => t >= 1536 ? "2XL" : t >= 1280 ? "XL" : t >= 1024 ? "LG" : t >= 768 ? "MD" : t >= 640 ? "SM" : "XS", i = (...t) => a(n(t));
11
+ export {
12
+ l as a,
13
+ i as c,
14
+ c as g
15
+ };
@@ -0,0 +1 @@
1
+ "use strict";const u=require("lodash-es"),o=require("clsx"),s=require("tailwind-merge");function c(e=6,t="abcdefghijklmnopqrstuvwxyzABCD"){let r="";for(let n=e;n>0;--n)r+=t[Math.floor(Math.random()*t.length)];return r}const a=e=>e>=1536?"2XL":e>=1280?"XL":e>=1024?"LG":e>=768?"MD":e>=640?"SM":"XS",l=(...e)=>s.twMerge(o.clsx(e));exports.cn=l;exports.generateUUID=c;exports.getBreakpointValue=a;