@tech_carthagos/page-builder 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CraftEditor-ws3IIYFu.cjs → CraftEditor-De7992rd.cjs} +10 -10
- package/dist/{CraftEditor-D1flDXtR.js → CraftEditor-w53hSE-U.js} +86 -86
- package/dist/{index-C45bBHT3.js → index-BKtWyPwY.js} +7 -7
- package/dist/{index-BmPZUAqo.cjs → index-CTfOh5Y0.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("react"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("react"),i=require("./index-CTfOh5Y0.cjs"),so=require("react-dom");function io(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const h=io(m);/**
|
|
2
2
|
* @license lucide-react v0.462.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const rt=i.createLucideIcon("Columns2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]);/**
|
|
7
7
|
* @license lucide-react v0.462.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
@@ -13,27 +13,27 @@
|
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const
|
|
16
|
+
*/const nt=i.createLucideIcon("Heading",[["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M6 20V4",key:"1w1bmo"}],["path",{d:"M18 20V4",key:"o2hl4u"}]]);/**
|
|
17
17
|
* @license lucide-react v0.462.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const at=i.createLucideIcon("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
22
22
|
* @license lucide-react v0.462.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const
|
|
26
|
+
*/const st=i.createLucideIcon("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
27
27
|
* @license lucide-react v0.462.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
31
|
+
*/const it=i.createLucideIcon("MousePointer",[["path",{d:"M12.586 12.586 19 19",key:"ea5xo7"}],["path",{d:"M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z",key:"277e5u"}]]);/**
|
|
32
32
|
* @license lucide-react v0.462.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const
|
|
36
|
+
*/const lt=i.createLucideIcon("MoveVertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m8 18 4 4 4-4",key:"bh5tu3"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}]]);/**
|
|
37
37
|
* @license lucide-react v0.462.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
61
|
+
*/const ct=i.createLucideIcon("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
|
|
62
62
|
* @license lucide-react v0.462.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const po=i.createLucideIcon("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]),ho=()=>{const{connectors:e}=i.Pe(),t=[{name:"Container",icon:Ae,element:a.jsx(i.ke,{is:i.Container,canvas:!0})},{name:"Columns",icon:nt,element:a.jsxs(i.ke,{is:i.Columns,canvas:!0,children:[a.jsx(i.ke,{is:i.Container,canvas:!0}),a.jsx(i.ke,{is:i.Container,canvas:!0})]})}],o=[{name:"Heading",icon:at,element:a.jsx(i.Heading,{})},{name:"Text",icon:dt,element:a.jsx(i.Text,{})},{name:"Button",icon:lt,element:a.jsx(i.ButtonComponent,{})},{name:"Link",icon:i.Link,element:a.jsx(i.Link$1,{})}],r=[{name:"Image",icon:st,element:a.jsx(i.Image,{})},{name:"Video",icon:i.Film,element:a.jsx(i.Video,{})}],n=[{name:"Divider",icon:it,element:a.jsx(i.Divider,{})},{name:"Spacer",icon:ct,element:a.jsx(i.Spacer,{})}],l=(c,u)=>a.jsxs("div",{className:"space-y-2",children:[a.jsx("span",{className:"text-xs text-muted-foreground/70",children:c}),a.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:u.map(d=>a.jsxs(i.Button,{variant:"outline",size:"sm",className:"flex flex-col items-center justify-center h-14 cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground",ref:f=>f&&e.create(f,d.element),children:[a.jsx(d.icon,{className:"h-4 w-4 mb-1"}),a.jsx("span",{className:"text-[10px]",children:d.name})]},d.name))})]});return a.jsxs("div",{className:"space-y-4",children:[a.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Components"}),l("Layout",t),l("Basic",o),l("Media",r),l("Utility",n)]})};var go=h.createContext(void 0);function _e(e){const t=h.useContext(go);return e||t||"ltr"}function vo(e,[t,o]){return Math.min(o,Math.max(t,e))}function bo(e,t){return h.useReducer((o,r)=>t[o][r]??o,e)}var Oe="ScrollArea",[ut]=i.createContextScope(Oe),[xo,U]=ut(Oe),ft=h.forwardRef((e,t)=>{const{__scopeScrollArea:o,type:r="hover",dir:n,scrollHideDelay:l=600,...c}=e,[u,d]=h.useState(null),[f,p]=h.useState(null),[g,v]=h.useState(null),[s,R]=h.useState(null),[x,b]=h.useState(null),[T,E]=h.useState(0),[S,N]=h.useState(0),[z,I]=h.useState(!1),[B,D]=h.useState(!1),P=i.useComposedRefs(t,H=>d(H)),O=_e(n);return a.jsx(xo,{scope:o,type:r,dir:O,scrollHideDelay:l,scrollArea:u,viewport:f,onViewportChange:p,content:g,onContentChange:v,scrollbarX:s,onScrollbarXChange:R,scrollbarXEnabled:z,onScrollbarXEnabledChange:I,scrollbarY:x,onScrollbarYChange:b,scrollbarYEnabled:B,onScrollbarYEnabledChange:D,onCornerWidthChange:E,onCornerHeightChange:N,children:a.jsx(i.Primitive.div,{dir:O,...c,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":T+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});ft.displayName=Oe;var mt="ScrollAreaViewport",pt=h.forwardRef((e,t)=>{const{__scopeScrollArea:o,children:r,nonce:n,...l}=e,c=U(mt,o),u=h.useRef(null),d=i.useComposedRefs(t,u,c.onViewportChange);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),a.jsx(i.Primitive.div,{"data-radix-scroll-area-viewport":"",...l,ref:d,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});pt.displayName=mt;var Q="ScrollAreaScrollbar",ze=h.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=U(Q,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:c}=n,u=e.orientation==="horizontal";return h.useEffect(()=>(u?l(!0):c(!0),()=>{u?l(!1):c(!1)}),[u,l,c]),n.type==="hover"?a.jsx(yo,{...r,ref:t,forceMount:o}):n.type==="scroll"?a.jsx(wo,{...r,ref:t,forceMount:o}):n.type==="auto"?a.jsx(ht,{...r,ref:t,forceMount:o}):n.type==="always"?a.jsx(Be,{...r,ref:t}):null});ze.displayName=Q;var yo=h.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=U(Q,e.__scopeScrollArea),[l,c]=h.useState(!1);return h.useEffect(()=>{const u=n.scrollArea;let d=0;if(u){const f=()=>{window.clearTimeout(d),c(!0)},p=()=>{d=window.setTimeout(()=>c(!1),n.scrollHideDelay)};return u.addEventListener("pointerenter",f),u.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",f),u.removeEventListener("pointerleave",p)}}},[n.scrollArea,n.scrollHideDelay]),a.jsx(i.Presence,{present:o||l,children:a.jsx(ht,{"data-state":l?"visible":"hidden",...r,ref:t})})}),wo=h.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=U(Q,e.__scopeScrollArea),l=e.orientation==="horizontal",c=Te(()=>d("SCROLL_END"),100),[u,d]=bo("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return h.useEffect(()=>{if(u==="idle"){const f=window.setTimeout(()=>d("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(f)}},[u,n.scrollHideDelay,d]),h.useEffect(()=>{const f=n.viewport,p=l?"scrollLeft":"scrollTop";if(f){let g=f[p];const v=()=>{const s=f[p];g!==s&&(d("SCROLL"),c()),g=s};return f.addEventListener("scroll",v),()=>f.removeEventListener("scroll",v)}},[n.viewport,l,d,c]),a.jsx(i.Presence,{present:o||u!=="hidden",children:a.jsx(Be,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:i.composeEventHandlers(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:i.composeEventHandlers(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),ht=h.forwardRef((e,t)=>{const o=U(Q,e.__scopeScrollArea),{forceMount:r,...n}=e,[l,c]=h.useState(!1),u=e.orientation==="horizontal",d=Te(()=>{if(o.viewport){const f=o.viewport.offsetWidth<o.viewport.scrollWidth,p=o.viewport.offsetHeight<o.viewport.scrollHeight;c(u?f:p)}},10);return me(o.viewport,d),me(o.content,d),a.jsx(i.Presence,{present:r||l,children:a.jsx(Be,{"data-state":l?"visible":"hidden",...n,ref:t})})}),Be=h.forwardRef((e,t)=>{const{orientation:o="vertical",...r}=e,n=U(Q,e.__scopeScrollArea),l=h.useRef(null),c=h.useRef(0),[u,d]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=yt(u.viewport,u.content),p={...r,sizes:u,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:v=>l.current=v,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:v=>c.current=v};function g(v,s){return Ro(v,c.current,u,s)}return o==="horizontal"?a.jsx(So,{...p,ref:t,onThumbPositionChange:()=>{if(n.viewport&&l.current){const v=n.viewport.scrollLeft,s=Qe(v,u,n.dir);l.current.style.transform=`translate3d(${s}px, 0, 0)`}},onWheelScroll:v=>{n.viewport&&(n.viewport.scrollLeft=v)},onDragScroll:v=>{n.viewport&&(n.viewport.scrollLeft=g(v,n.dir))}}):o==="vertical"?a.jsx(Co,{...p,ref:t,onThumbPositionChange:()=>{if(n.viewport&&l.current){const v=n.viewport.scrollTop,s=Qe(v,u);l.current.style.transform=`translate3d(0, ${s}px, 0)`}},onWheelScroll:v=>{n.viewport&&(n.viewport.scrollTop=v)},onDragScroll:v=>{n.viewport&&(n.viewport.scrollTop=g(v))}}):null}),So=h.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,l=U(Q,e.__scopeScrollArea),[c,u]=h.useState(),d=h.useRef(null),f=i.useComposedRefs(t,d,l.onScrollbarXChange);return h.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),a.jsx(vt,{"data-orientation":"horizontal",...n,ref:f,sizes:o,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Ee(o)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,g)=>{if(l.viewport){const v=l.viewport.scrollLeft+p.deltaX;e.onWheelScroll(v),St(v,g)&&p.preventDefault()}},onResize:()=>{d.current&&l.viewport&&c&&r({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Se(c.paddingLeft),paddingEnd:Se(c.paddingRight)}})}})}),Co=h.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,l=U(Q,e.__scopeScrollArea),[c,u]=h.useState(),d=h.useRef(null),f=i.useComposedRefs(t,d,l.onScrollbarYChange);return h.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),a.jsx(vt,{"data-orientation":"vertical",...n,ref:f,sizes:o,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Ee(o)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,g)=>{if(l.viewport){const v=l.viewport.scrollTop+p.deltaY;e.onWheelScroll(v),St(v,g)&&p.preventDefault()}},onResize:()=>{d.current&&l.viewport&&c&&r({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Se(c.paddingTop),paddingEnd:Se(c.paddingBottom)}})}})}),[Eo,gt]=ut(Q),vt=h.forwardRef((e,t)=>{const{__scopeScrollArea:o,sizes:r,hasThumb:n,onThumbChange:l,onThumbPointerUp:c,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:p,onResize:g,...v}=e,s=U(Q,o),[R,x]=h.useState(null),b=i.useComposedRefs(t,P=>x(P)),T=h.useRef(null),E=h.useRef(""),S=s.viewport,N=r.content-r.viewport,z=i.useCallbackRef(p),I=i.useCallbackRef(d),B=Te(g,10);function D(P){if(T.current){const O=P.clientX-T.current.left,H=P.clientY-T.current.top;f({x:O,y:H})}}return h.useEffect(()=>{const P=O=>{const H=O.target;(R==null?void 0:R.contains(H))&&z(O,N)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[S,R,N,z]),h.useEffect(I,[r,I]),me(R,B),me(s.content,B),a.jsx(Eo,{scope:o,scrollbar:R,hasThumb:n,onThumbChange:i.useCallbackRef(l),onThumbPointerUp:i.useCallbackRef(c),onThumbPositionChange:I,onThumbPointerDown:i.useCallbackRef(u),children:a.jsx(i.Primitive.div,{...v,ref:b,style:{position:"absolute",...v.style},onPointerDown:i.composeEventHandlers(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),T.current=R.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",s.viewport&&(s.viewport.style.scrollBehavior="auto"),D(P))}),onPointerMove:i.composeEventHandlers(e.onPointerMove,D),onPointerUp:i.composeEventHandlers(e.onPointerUp,P=>{const O=P.target;O.hasPointerCapture(P.pointerId)&&O.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=E.current,s.viewport&&(s.viewport.style.scrollBehavior=""),T.current=null})})})}),we="ScrollAreaThumb",bt=h.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=gt(we,e.__scopeScrollArea);return a.jsx(i.Presence,{present:o||n.hasThumb,children:a.jsx(To,{ref:t,...r})})}),To=h.forwardRef((e,t)=>{const{__scopeScrollArea:o,style:r,...n}=e,l=U(we,o),c=gt(we,o),{onThumbPositionChange:u}=c,d=i.useComposedRefs(t,g=>c.onThumbChange(g)),f=h.useRef(void 0),p=Te(()=>{f.current&&(f.current(),f.current=void 0)},100);return h.useEffect(()=>{const g=l.viewport;if(g){const v=()=>{if(p(),!f.current){const s=No(g,u);f.current=s,u()}};return u(),g.addEventListener("scroll",v),()=>g.removeEventListener("scroll",v)}},[l.viewport,p,u]),a.jsx(i.Primitive.div,{"data-state":c.hasThumb?"visible":"hidden",...n,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:i.composeEventHandlers(e.onPointerDownCapture,g=>{const s=g.target.getBoundingClientRect(),R=g.clientX-s.left,x=g.clientY-s.top;c.onThumbPointerDown({x:R,y:x})}),onPointerUp:i.composeEventHandlers(e.onPointerUp,c.onThumbPointerUp)})});bt.displayName=we;var He="ScrollAreaCorner",xt=h.forwardRef((e,t)=>{const o=U(He,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?a.jsx(jo,{...e,ref:t}):null});xt.displayName=He;var jo=h.forwardRef((e,t)=>{const{__scopeScrollArea:o,...r}=e,n=U(He,o),[l,c]=h.useState(0),[u,d]=h.useState(0),f=!!(l&&u);return me(n.scrollbarX,()=>{var g;const p=((g=n.scrollbarX)==null?void 0:g.offsetHeight)||0;n.onCornerHeightChange(p),d(p)}),me(n.scrollbarY,()=>{var g;const p=((g=n.scrollbarY)==null?void 0:g.offsetWidth)||0;n.onCornerWidthChange(p),c(p)}),f?a.jsx(i.Primitive.div,{...r,ref:t,style:{width:l,height:u,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Se(e){return e?parseInt(e,10):0}function yt(e,t){const o=e/t;return isNaN(o)?0:o}function Ee(e){const t=yt(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function Ro(e,t,o,r="ltr"){const n=Ee(o),l=n/2,c=t||l,u=n-c,d=o.scrollbar.paddingStart+c,f=o.scrollbar.size-o.scrollbar.paddingEnd-u,p=o.content-o.viewport,g=r==="ltr"?[0,p]:[p*-1,0];return wt([d,f],g)(e)}function Qe(e,t,o="ltr"){const r=Ee(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,l=t.scrollbar.size-n,c=t.content-t.viewport,u=l-r,d=o==="ltr"?[0,c]:[c*-1,0],f=vo(e,d);return wt([0,c],[0,u])(f)}function wt(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(o-e[0])}}function St(e,t){return e>0&&e<t}var No=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return function n(){const l={left:e.scrollLeft,top:e.scrollTop},c=o.left!==l.left,u=o.top!==l.top;(c||u)&&t(),o=l,r=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(r)};function Te(e,t){const o=i.useCallbackRef(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function me(e,t){const o=i.useCallbackRef(t);i.useLayoutEffect2(()=>{let r=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return n.observe(e),()=>{window.cancelAnimationFrame(r),n.unobserve(e)}}},[e,o])}var Ct=ft,Po=pt,ko=xt;const Fe=h.forwardRef(({className:e,children:t,...o},r)=>a.jsxs(Ct,{ref:r,className:i.cn("relative overflow-hidden",e),...o,children:[a.jsx(Po,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(Et,{}),a.jsx(ko,{})]}));Fe.displayName=Ct.displayName;const Et=h.forwardRef(({className:e,orientation:t="vertical",...o},r)=>a.jsx(ze,{ref:r,orientation:t,className:i.cn("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:a.jsx(bt,{className:"relative flex-1 rounded-full bg-border"})}));Et.displayName=ze.displayName;const Io=()=>{const{selected:e,actions:t}=i.Pe(o=>{var l,c,u,d,f,p,g;const r=o.events.selected?Array.from(o.events.selected)[0]:null;let n;return r&&(n={id:r,name:((c=(l=o.nodes[r])==null?void 0:l.data)==null?void 0:c.displayName)||((d=(u=o.nodes[r])==null?void 0:u.data)==null?void 0:d.name),settings:(p=(f=o.nodes[r])==null?void 0:f.related)==null?void 0:p.settings,isDeletable:((g=o.nodes[r])==null?void 0:g.id)!=="ROOT"}),{selected:n}});return a.jsx("div",{className:"h-full flex flex-col",children:e?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center justify-between pb-3 border-b border-border mb-3",children:[a.jsxs("div",{children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"Selected"}),a.jsx("h3",{className:"text-sm font-semibold",children:e.name})]}),e.isDeletable&&a.jsx("button",{onClick:()=>t.delete(e.id),className:"p-1.5 rounded hover:bg-destructive/10 text-destructive transition-colors",title:"Delete element",children:a.jsx(fo,{className:"h-4 w-4"})})]}),a.jsx(Fe,{className:"flex-1 -mr-4 pr-4",children:e.settings&&m.createElement(e.settings)})]}):a.jsx("div",{className:"text-center py-8",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:"Select an element to edit its properties"})})})},Do=e=>{switch(e){case"Container":return Ae;case"Text":return dt;case"Heading":return at;case"Button":return lt;case"Image":return st;case"Divider":return it;case"Spacer":return ct;case"Video":return po;case"Columns":return nt;case"Link":return i.Link;default:return Ae}},Tt=({nodeId:e,depth:t=0,onDragStart:o,onDragOver:r,onDrop:n,draggedId:l})=>{const{node:c,actions:u,selectedNodeId:d,childNodes:f,parentId:p}=i.Pe((C,ae)=>{var se,w;const V=C.nodes[e],ee=((se=V==null?void 0:V.data)==null?void 0:se.nodes)||[],F=C.events.selected?Array.from(C.events.selected)[0]:null,X=(w=V==null?void 0:V.data)==null?void 0:w.parent;return{node:V,childNodes:ee,selectedNodeId:F,parentId:X}}),[g,v]=m.useState(!0),[s,R]=m.useState(!1);if(!c)return null;const x=c.data.displayName||c.data.name||"Unknown",b=f.length>0,T=d===e,E=e==="ROOT",S=Do(x),N=l===e,z=c.data.isCanvas,I=C=>{C.stopPropagation(),E||u.selectNode(e)},B=C=>{C.stopPropagation(),v(!g)},D=C=>{if(E){C.preventDefault();return}C.stopPropagation(),o(e,p)},P=C=>{C.preventDefault(),C.stopPropagation(),l&&l!==e&&z&&R(!0)},O=C=>{C.stopPropagation(),R(!1)},H=C=>{C.preventDefault(),C.stopPropagation(),R(!1),l&&l!==e&&n(e)};return a.jsxs("div",{className:"select-none",children:[a.jsxs("div",{className:`flex items-center gap-1 py-1 px-1 rounded cursor-pointer text-sm transition-colors ${T?"bg-primary/10 text-primary":"hover:bg-secondary/50"} ${N?"opacity-50":""} ${s?"bg-primary/20 ring-1 ring-primary":""}`,style:{paddingLeft:`${t*12+4}px`},onClick:I,draggable:!E,onDragStart:D,onDragOver:P,onDragLeave:O,onDrop:H,children:[!E&&a.jsx(lo,{className:"h-3 w-3 text-muted-foreground/50 cursor-grab active:cursor-grabbing"}),b?a.jsx("button",{onClick:B,className:"p-0.5 hover:bg-secondary rounded",children:g?a.jsx(i.ChevronDown,{className:"h-3 w-3"}):a.jsx(i.ChevronRight,{className:"h-3 w-3"})}):a.jsx("span",{className:"w-4"}),a.jsx(S,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),a.jsx("span",{className:`truncate ${E?"font-medium":""}`,children:E?"Root":x})]}),b&&g&&a.jsx("div",{children:f.map(C=>a.jsx(Tt,{nodeId:C,depth:t+1,onDragStart:o,onDragOver:r,onDrop:n,draggedId:l},C))})]})},Ao=()=>{const[e,t]=m.useState(null),[o,r]=m.useState(null),{nodeIds:n,actions:l}=i.Pe(f=>({nodeIds:Object.keys(f.nodes)})),c=(f,p)=>{t(f),r(p)},u=f=>{if(e&&f&&e!==f)try{l.move(e,f,0)}catch(p){console.log("Cannot move node:",p)}t(null),r(null)},d=()=>{t(null),r(null)};return a.jsxs("div",{className:"space-y-2",onDragEnd:d,children:[a.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Layers"}),a.jsx("div",{className:"border border-border rounded-lg p-2 max-h-[250px] overflow-y-auto bg-background",children:n.includes("ROOT")&&a.jsx(Tt,{nodeId:"ROOT",onDragStart:c,onDrop:u,draggedId:e})}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Drag to containers to reorder"})]})};function et(e){const t=Mo(e),o=h.forwardRef((r,n)=>{const{children:l,...c}=r,u=h.Children.toArray(l),d=u.find(_o);if(d){const f=d.props.children,p=u.map(g=>g===d?h.Children.count(f)>1?h.Children.only(null):h.isValidElement(f)?f.props.children:null:g);return a.jsx(t,{...c,ref:n,children:h.isValidElement(f)?h.cloneElement(f,void 0,p):null})}return a.jsx(t,{...c,ref:n,children:l})});return o.displayName=`${e}.Slot`,o}function Mo(e){const t=h.forwardRef((o,r)=>{const{children:n,...l}=o;if(h.isValidElement(n)){const c=zo(n),u=Oo(l,n.props);return n.type!==h.Fragment&&(u.ref=r?i.composeRefs(r,c):c),h.cloneElement(n,u)}return h.Children.count(n)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Lo=Symbol("radix.slottable");function _o(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Lo}function Oo(e,t){const o={...t};for(const r in t){const n=e[r],l=t[r];/^on[A-Z]/.test(r)?n&&l?o[r]=(...u)=>{const d=l(...u);return n(...u),d}:n&&(o[r]=n):r==="style"?o[r]={...n,...l}:r==="className"&&(o[r]=[n,l].filter(Boolean).join(" "))}return{...e,...o}}function zo(e){var r,n;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function Bo(e){const t=e+"CollectionProvider",[o,r]=i.createContextScope(t),[n,l]=o(t,{collectionRef:{current:null},itemMap:new Map}),c=x=>{const{scope:b,children:T}=x,E=m.useRef(null),S=m.useRef(new Map).current;return a.jsx(n,{scope:b,itemMap:S,collectionRef:E,children:T})};c.displayName=t;const u=e+"CollectionSlot",d=et(u),f=m.forwardRef((x,b)=>{const{scope:T,children:E}=x,S=l(u,T),N=i.useComposedRefs(b,S.collectionRef);return a.jsx(d,{ref:N,children:E})});f.displayName=u;const p=e+"CollectionItemSlot",g="data-radix-collection-item",v=et(p),s=m.forwardRef((x,b)=>{const{scope:T,children:E,...S}=x,N=m.useRef(null),z=i.useComposedRefs(b,N),I=l(p,T);return m.useEffect(()=>(I.itemMap.set(N,{ref:N,...S}),()=>void I.itemMap.delete(N))),a.jsx(v,{[g]:"",ref:z,children:E})});s.displayName=p;function R(x){const b=l(e+"CollectionConsumer",x);return m.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const S=Array.from(E.querySelectorAll(`[${g}]`));return Array.from(b.itemMap.values()).sort((I,B)=>S.indexOf(I.ref.current)-S.indexOf(B.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:c,Slot:f,ItemSlot:s},R,r]}var De="rovingFocusGroup.onEntryFocus",Ho={bubbles:!1,cancelable:!0},ve="RovingFocusGroup",[Me,jt,Fo]=Bo(ve),[Vo,Rt]=i.createContextScope(ve,[Fo]),[Go,Yo]=Vo(ve),Nt=h.forwardRef((e,t)=>a.jsx(Me.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Me.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Wo,{...e,ref:t})})}));Nt.displayName=ve;var Wo=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:r,loop:n=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...g}=e,v=h.useRef(null),s=i.useComposedRefs(t,v),R=_e(l),[x,b]=i.useControllableState({prop:c,defaultProp:u??null,onChange:d,caller:ve}),[T,E]=h.useState(!1),S=i.useCallbackRef(f),N=jt(o),z=h.useRef(!1),[I,B]=h.useState(0);return h.useEffect(()=>{const D=v.current;if(D)return D.addEventListener(De,S),()=>D.removeEventListener(De,S)},[S]),a.jsx(Go,{scope:o,orientation:r,dir:R,loop:n,currentTabStopId:x,onItemFocus:h.useCallback(D=>b(D),[b]),onItemShiftTab:h.useCallback(()=>E(!0),[]),onFocusableItemAdd:h.useCallback(()=>B(D=>D+1),[]),onFocusableItemRemove:h.useCallback(()=>B(D=>D-1),[]),children:a.jsx(i.Primitive.div,{tabIndex:T||I===0?-1:0,"data-orientation":r,...g,ref:s,style:{outline:"none",...e.style},onMouseDown:i.composeEventHandlers(e.onMouseDown,()=>{z.current=!0}),onFocus:i.composeEventHandlers(e.onFocus,D=>{const P=!z.current;if(D.target===D.currentTarget&&P&&!T){const O=new CustomEvent(De,Ho);if(D.currentTarget.dispatchEvent(O),!O.defaultPrevented){const H=N().filter(F=>F.focusable),C=H.find(F=>F.active),ae=H.find(F=>F.id===x),ee=[C,ae,...H].filter(Boolean).map(F=>F.ref.current);It(ee,p)}}z.current=!1}),onBlur:i.composeEventHandlers(e.onBlur,()=>E(!1))})})}),Pt="RovingFocusGroupItem",kt=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:r=!0,active:n=!1,tabStopId:l,children:c,...u}=e,d=i.useId(),f=l||d,p=Yo(Pt,o),g=p.currentTabStopId===f,v=jt(o),{onFocusableItemAdd:s,onFocusableItemRemove:R,currentTabStopId:x}=p;return h.useEffect(()=>{if(r)return s(),()=>R()},[r,s,R]),a.jsx(Me.ItemSlot,{scope:o,id:f,focusable:r,active:n,children:a.jsx(i.Primitive.span,{tabIndex:g?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:i.composeEventHandlers(e.onMouseDown,b=>{r?p.onItemFocus(f):b.preventDefault()}),onFocus:i.composeEventHandlers(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:i.composeEventHandlers(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){p.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const T=Xo(b,p.orientation,p.dir);if(T!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let S=v().filter(N=>N.focusable).map(N=>N.ref.current);if(T==="last")S.reverse();else if(T==="prev"||T==="next"){T==="prev"&&S.reverse();const N=S.indexOf(b.currentTarget);S=p.loop?Ko(S,N+1):S.slice(N+1)}setTimeout(()=>It(S))}}),children:typeof c=="function"?c({isCurrentTabStop:g,hasTabStop:x!=null}):c})})});kt.displayName=Pt;var $o={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Uo(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Xo(e,t,o){const r=Uo(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $o[r]}function It(e,t=!1){const o=document.activeElement;for(const r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function Ko(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var qo=Nt,Zo=kt,Dt="Toggle",Ve=h.forwardRef((e,t)=>{const{pressed:o,defaultPressed:r,onPressedChange:n,...l}=e,[c,u]=i.useControllableState({prop:o,onChange:n,defaultProp:r??!1,caller:Dt});return a.jsx(i.Primitive.button,{type:"button","aria-pressed":c,"data-state":c?"on":"off","data-disabled":e.disabled?"":void 0,...l,ref:t,onClick:i.composeEventHandlers(e.onClick,()=>{e.disabled||u(!c)})})});Ve.displayName=Dt;var At=Ve,ne="ToggleGroup",[Mt]=i.createContextScope(ne,[Rt]),Lt=Rt(),Ge=m.forwardRef((e,t)=>{const{type:o,...r}=e;if(o==="single"){const n=r;return a.jsx(Jo,{...n,ref:t})}if(o==="multiple"){const n=r;return a.jsx(Qo,{...n,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${ne}\``)});Ge.displayName=ne;var[_t,Ot]=Mt(ne),Jo=m.forwardRef((e,t)=>{const{value:o,defaultValue:r,onValueChange:n=()=>{},...l}=e,[c,u]=i.useControllableState({prop:o,defaultProp:r??"",onChange:n,caller:ne});return a.jsx(_t,{scope:e.__scopeToggleGroup,type:"single",value:m.useMemo(()=>c?[c]:[],[c]),onItemActivate:u,onItemDeactivate:m.useCallback(()=>u(""),[u]),children:a.jsx(zt,{...l,ref:t})})}),Qo=m.forwardRef((e,t)=>{const{value:o,defaultValue:r,onValueChange:n=()=>{},...l}=e,[c,u]=i.useControllableState({prop:o,defaultProp:r??[],onChange:n,caller:ne}),d=m.useCallback(p=>u((g=[])=>[...g,p]),[u]),f=m.useCallback(p=>u((g=[])=>g.filter(v=>v!==p)),[u]);return a.jsx(_t,{scope:e.__scopeToggleGroup,type:"multiple",value:c,onItemActivate:d,onItemDeactivate:f,children:a.jsx(zt,{...l,ref:t})})});Ge.displayName=ne;var[er,tr]=Mt(ne),zt=m.forwardRef((e,t)=>{const{__scopeToggleGroup:o,disabled:r=!1,rovingFocus:n=!0,orientation:l,dir:c,loop:u=!0,...d}=e,f=Lt(o),p=_e(c),g={role:"group",dir:p,...d};return a.jsx(er,{scope:o,rovingFocus:n,disabled:r,children:n?a.jsx(qo,{asChild:!0,...f,orientation:l,dir:p,loop:u,children:a.jsx(i.Primitive.div,{...g,ref:t})}):a.jsx(i.Primitive.div,{...g,ref:t})})}),Ce="ToggleGroupItem",Bt=m.forwardRef((e,t)=>{const o=Ot(Ce,e.__scopeToggleGroup),r=tr(Ce,e.__scopeToggleGroup),n=Lt(e.__scopeToggleGroup),l=o.value.includes(e.value),c=r.disabled||e.disabled,u={...e,pressed:l,disabled:c},d=m.useRef(null);return r.rovingFocus?a.jsx(Zo,{asChild:!0,...n,focusable:!c,active:l,ref:d,children:a.jsx(tt,{...u,ref:t})}):a.jsx(tt,{...u,ref:t})});Bt.displayName=Ce;var tt=m.forwardRef((e,t)=>{const{__scopeToggleGroup:o,value:r,...n}=e,l=Ot(Ce,o),c={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},u=l.type==="single"?c:void 0;return a.jsx(Ve,{...u,...n,ref:t,onPressedChange:d=>{d?l.onItemActivate(r):l.onItemDeactivate(r)}})}),Ht=Ge,Ft=Bt;const Vt=i.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),or=h.forwardRef(({className:e,variant:t,size:o,...r},n)=>a.jsx(At,{ref:n,className:i.cn(Vt({variant:t,size:o,className:e})),...r}));or.displayName=At.displayName;const Gt=h.createContext({size:"default",variant:"default"}),Yt=h.forwardRef(({className:e,variant:t,size:o,children:r,...n},l)=>a.jsx(Ht,{ref:l,className:i.cn("flex items-center justify-center gap-1",e),...n,children:a.jsx(Gt.Provider,{value:{variant:t,size:o},children:r})}));Yt.displayName=Ht.displayName;const Wt=h.forwardRef(({className:e,children:t,variant:o,size:r,...n},l)=>{const c=h.useContext(Gt);return a.jsx(Ft,{ref:l,className:i.cn(Vt({variant:c.variant||o,size:c.size||r}),e),...n,children:t})});Wt.displayName=Ft.displayName;var rr=e=>{switch(e){case"success":return sr;case"info":return lr;case"warning":return ir;case"error":return cr;default:return null}},nr=Array(12).fill(0),ar=({visible:e,className:t})=>m.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},m.createElement("div",{className:"sonner-spinner"},nr.map((o,r)=>m.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),sr=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ir=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),lr=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),cr=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),dr=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},m.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),m.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ur=()=>{let[e,t]=m.useState(document.hidden);return m.useEffect(()=>{let o=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e},Le=1,fr=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:o,...r}=e,n=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Le++,l=this.toasts.find(u=>u.id===n),c=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),l?this.toasts=this.toasts.map(u=>u.id===n?(this.publish({...u,...e,id:n,title:o}),{...u,...e,id:n,dismissible:c,title:o}):u):this.addToast({title:o,...r,dismissible:c,id:n}),n},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(o=>o({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let o;t.loading!==void 0&&(o=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),n=o!==void 0,l,c=r.then(async d=>{if(l=["resolve",d],m.isValidElement(d))n=!1,this.create({id:o,type:"default",message:d});else if(pr(d)&&!d.ok){n=!1;let f=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:o,type:"error",message:f,description:p})}else if(t.success!==void 0){n=!1;let f=typeof t.success=="function"?await t.success(d):t.success,p=typeof t.description=="function"?await t.description(d):t.description;this.create({id:o,type:"success",message:f,description:p})}}).catch(async d=>{if(l=["reject",d],t.error!==void 0){n=!1;let f=typeof t.error=="function"?await t.error(d):t.error,p=typeof t.description=="function"?await t.description(d):t.description;this.create({id:o,type:"error",message:f,description:p})}}).finally(()=>{var d;n&&(this.dismiss(o),o=void 0),(d=t.finally)==null||d.call(t)}),u=()=>new Promise((d,f)=>c.then(()=>l[0]==="reject"?f(l[1]):d(l[1])).catch(f));return typeof o!="string"&&typeof o!="number"?{unwrap:u}:Object.assign(o,{unwrap:u})},this.custom=(e,t)=>{let o=(t==null?void 0:t.id)||Le++;return this.create({jsx:e(o),id:o,...t}),o},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Y=new fr,mr=(e,t)=>{let o=(t==null?void 0:t.id)||Le++;return Y.addToast({title:e,...t,id:o}),o},pr=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",hr=mr,gr=()=>Y.toasts,vr=()=>Y.getActiveToasts(),br=Object.assign(hr,{success:Y.success,info:Y.info,warning:Y.warning,error:Y.error,custom:Y.custom,message:Y.message,promise:Y.promise,dismiss:Y.dismiss,loading:Y.loading},{getHistory:gr,getToasts:vr});function xr(e,{insertAt:t}={}){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}xr(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family: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;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
72
|
-
`);function ye(e){return e.label!==void 0}var yr=3,wr="32px",Sr="16px",ot=4e3,Cr=356,Er=14,Tr=20,jr=200;function J(...e){return e.filter(Boolean).join(" ")}function Rr(e){let[t,o]=e.split("-"),r=[];return t&&r.push(t),o&&r.push(o),r}var Nr=e=>{var t,o,r,n,l,c,u,d,f,p,g;let{invert:v,toast:s,unstyled:R,interacting:x,setHeights:b,visibleToasts:T,heights:E,index:S,toasts:N,expanded:z,removeToast:I,defaultRichColors:B,closeButton:D,style:P,cancelButtonStyle:O,actionButtonStyle:H,className:C="",descriptionClassName:ae="",duration:V,position:ee,gap:F,loadingIcon:X,expandByDefault:se,classNames:w,icons:W,closeButtonAriaLabel:je="Close toast",pauseWhenPageIsHidden:k}=e,[A,L]=m.useState(null),[G,ce]=m.useState(null),[_,Re]=m.useState(!1),[pe,be]=m.useState(!1),[he,Ne]=m.useState(!1),[We,Ut]=m.useState(!1),[Xt,$e]=m.useState(!1),[Kt,Pe]=m.useState(0),[qt,Ue]=m.useState(0),ge=m.useRef(s.duration||V||ot),Xe=m.useRef(null),ie=m.useRef(null),Zt=S===0,Jt=S+1<=T,$=s.type,de=s.dismissible!==!1,Qt=s.className||"",eo=s.descriptionClassName||"",xe=m.useMemo(()=>E.findIndex(y=>y.toastId===s.id)||0,[E,s.id]),to=m.useMemo(()=>{var y;return(y=s.closeButton)!=null?y:D},[s.closeButton,D]),Ke=m.useMemo(()=>s.duration||V||ot,[s.duration,V]),ke=m.useRef(0),ue=m.useRef(0),qe=m.useRef(0),fe=m.useRef(null),[oo,ro]=ee.split("-"),Ze=m.useMemo(()=>E.reduce((y,j,M)=>M>=xe?y:y+j.height,0),[E,xe]),Je=ur(),no=s.invert||v,Ie=$==="loading";ue.current=m.useMemo(()=>xe*F+Ze,[xe,Ze]),m.useEffect(()=>{ge.current=Ke},[Ke]),m.useEffect(()=>{Re(!0)},[]),m.useEffect(()=>{let y=ie.current;if(y){let j=y.getBoundingClientRect().height;return Ue(j),b(M=>[{toastId:s.id,height:j,position:s.position},...M]),()=>b(M=>M.filter(K=>K.toastId!==s.id))}},[b,s.id]),m.useLayoutEffect(()=>{if(!_)return;let y=ie.current,j=y.style.height;y.style.height="auto";let M=y.getBoundingClientRect().height;y.style.height=j,Ue(M),b(K=>K.find(q=>q.toastId===s.id)?K.map(q=>q.toastId===s.id?{...q,height:M}:q):[{toastId:s.id,height:M,position:s.position},...K])},[_,s.title,s.description,b,s.id]);let te=m.useCallback(()=>{be(!0),Pe(ue.current),b(y=>y.filter(j=>j.toastId!==s.id)),setTimeout(()=>{I(s)},jr)},[s,I,b,ue]);m.useEffect(()=>{if(s.promise&&$==="loading"||s.duration===1/0||s.type==="loading")return;let y;return z||x||k&&Je?(()=>{if(qe.current<ke.current){let j=new Date().getTime()-ke.current;ge.current=ge.current-j}qe.current=new Date().getTime()})():ge.current!==1/0&&(ke.current=new Date().getTime(),y=setTimeout(()=>{var j;(j=s.onAutoClose)==null||j.call(s,s),te()},ge.current)),()=>clearTimeout(y)},[z,x,s,$,k,Je,te]),m.useEffect(()=>{s.delete&&te()},[te,s.delete]);function ao(){var y,j,M;return W!=null&&W.loading?m.createElement("div",{className:J(w==null?void 0:w.loader,(y=s==null?void 0:s.classNames)==null?void 0:y.loader,"sonner-loader"),"data-visible":$==="loading"},W.loading):X?m.createElement("div",{className:J(w==null?void 0:w.loader,(j=s==null?void 0:s.classNames)==null?void 0:j.loader,"sonner-loader"),"data-visible":$==="loading"},X):m.createElement(ar,{className:J(w==null?void 0:w.loader,(M=s==null?void 0:s.classNames)==null?void 0:M.loader),visible:$==="loading"})}return m.createElement("li",{tabIndex:0,ref:ie,className:J(C,Qt,w==null?void 0:w.toast,(t=s==null?void 0:s.classNames)==null?void 0:t.toast,w==null?void 0:w.default,w==null?void 0:w[$],(o=s==null?void 0:s.classNames)==null?void 0:o[$]),"data-sonner-toast":"","data-rich-colors":(r=s.richColors)!=null?r:B,"data-styled":!(s.jsx||s.unstyled||R),"data-mounted":_,"data-promise":!!s.promise,"data-swiped":Xt,"data-removed":pe,"data-visible":Jt,"data-y-position":oo,"data-x-position":ro,"data-index":S,"data-front":Zt,"data-swiping":he,"data-dismissible":de,"data-type":$,"data-invert":no,"data-swipe-out":We,"data-swipe-direction":G,"data-expanded":!!(z||se&&_),style:{"--index":S,"--toasts-before":S,"--z-index":N.length-S,"--offset":`${pe?Kt:ue.current}px`,"--initial-height":se?"auto":`${qt}px`,...P,...s.style},onDragEnd:()=>{Ne(!1),L(null),fe.current=null},onPointerDown:y=>{Ie||!de||(Xe.current=new Date,Pe(ue.current),y.target.setPointerCapture(y.pointerId),y.target.tagName!=="BUTTON"&&(Ne(!0),fe.current={x:y.clientX,y:y.clientY}))},onPointerUp:()=>{var y,j,M,K;if(We||!de)return;fe.current=null;let q=Number(((y=ie.current)==null?void 0:y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),oe=Number(((j=ie.current)==null?void 0:j.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),le=new Date().getTime()-((M=Xe.current)==null?void 0:M.getTime()),Z=A==="x"?q:oe,re=Math.abs(Z)/le;if(Math.abs(Z)>=Tr||re>.11){Pe(ue.current),(K=s.onDismiss)==null||K.call(s,s),ce(A==="x"?q>0?"right":"left":oe>0?"down":"up"),te(),Ut(!0),$e(!1);return}Ne(!1),L(null)},onPointerMove:y=>{var j,M,K,q;if(!fe.current||!de||((j=window.getSelection())==null?void 0:j.toString().length)>0)return;let oe=y.clientY-fe.current.y,le=y.clientX-fe.current.x,Z=(M=e.swipeDirections)!=null?M:Rr(ee);!A&&(Math.abs(le)>1||Math.abs(oe)>1)&&L(Math.abs(le)>Math.abs(oe)?"x":"y");let re={x:0,y:0};A==="y"?(Z.includes("top")||Z.includes("bottom"))&&(Z.includes("top")&&oe<0||Z.includes("bottom")&&oe>0)&&(re.y=oe):A==="x"&&(Z.includes("left")||Z.includes("right"))&&(Z.includes("left")&&le<0||Z.includes("right")&&le>0)&&(re.x=le),(Math.abs(re.x)>0||Math.abs(re.y)>0)&&$e(!0),(K=ie.current)==null||K.style.setProperty("--swipe-amount-x",`${re.x}px`),(q=ie.current)==null||q.style.setProperty("--swipe-amount-y",`${re.y}px`)}},to&&!s.jsx?m.createElement("button",{"aria-label":je,"data-disabled":Ie,"data-close-button":!0,onClick:Ie||!de?()=>{}:()=>{var y;te(),(y=s.onDismiss)==null||y.call(s,s)},className:J(w==null?void 0:w.closeButton,(n=s==null?void 0:s.classNames)==null?void 0:n.closeButton)},(l=W==null?void 0:W.close)!=null?l:dr):null,s.jsx||m.isValidElement(s.title)?s.jsx?s.jsx:typeof s.title=="function"?s.title():s.title:m.createElement(m.Fragment,null,$||s.icon||s.promise?m.createElement("div",{"data-icon":"",className:J(w==null?void 0:w.icon,(c=s==null?void 0:s.classNames)==null?void 0:c.icon)},s.promise||s.type==="loading"&&!s.icon?s.icon||ao():null,s.type!=="loading"?s.icon||(W==null?void 0:W[$])||rr($):null):null,m.createElement("div",{"data-content":"",className:J(w==null?void 0:w.content,(u=s==null?void 0:s.classNames)==null?void 0:u.content)},m.createElement("div",{"data-title":"",className:J(w==null?void 0:w.title,(d=s==null?void 0:s.classNames)==null?void 0:d.title)},typeof s.title=="function"?s.title():s.title),s.description?m.createElement("div",{"data-description":"",className:J(ae,eo,w==null?void 0:w.description,(f=s==null?void 0:s.classNames)==null?void 0:f.description)},typeof s.description=="function"?s.description():s.description):null),m.isValidElement(s.cancel)?s.cancel:s.cancel&&ye(s.cancel)?m.createElement("button",{"data-button":!0,"data-cancel":!0,style:s.cancelButtonStyle||O,onClick:y=>{var j,M;ye(s.cancel)&&de&&((M=(j=s.cancel).onClick)==null||M.call(j,y),te())},className:J(w==null?void 0:w.cancelButton,(p=s==null?void 0:s.classNames)==null?void 0:p.cancelButton)},s.cancel.label):null,m.isValidElement(s.action)?s.action:s.action&&ye(s.action)?m.createElement("button",{"data-button":!0,"data-action":!0,style:s.actionButtonStyle||H,onClick:y=>{var j,M;ye(s.action)&&((M=(j=s.action).onClick)==null||M.call(j,y),!y.defaultPrevented&&te())},className:J(w==null?void 0:w.actionButton,(g=s==null?void 0:s.classNames)==null?void 0:g.actionButton)},s.action.label):null))};function rt(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Pr(e,t){let o={};return[e,t].forEach((r,n)=>{let l=n===1,c=l?"--mobile-offset":"--offset",u=l?Sr:wr;function d(f){["top","right","bottom","left"].forEach(p=>{o[`${c}-${p}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?o[`${c}-${f}`]=u:o[`${c}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),o}m.forwardRef(function(e,t){let{invert:o,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:l,closeButton:c,className:u,offset:d,mobileOffset:f,theme:p="light",richColors:g,duration:v,style:s,visibleToasts:R=yr,toastOptions:x,dir:b=rt(),gap:T=Er,loadingIcon:E,icons:S,containerAriaLabel:N="Notifications",pauseWhenPageIsHidden:z}=e,[I,B]=m.useState([]),D=m.useMemo(()=>Array.from(new Set([r].concat(I.filter(k=>k.position).map(k=>k.position)))),[I,r]),[P,O]=m.useState([]),[H,C]=m.useState(!1),[ae,V]=m.useState(!1),[ee,F]=m.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=m.useRef(null),se=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=m.useRef(null),W=m.useRef(!1),je=m.useCallback(k=>{B(A=>{var L;return(L=A.find(G=>G.id===k.id))!=null&&L.delete||Y.dismiss(k.id),A.filter(({id:G})=>G!==k.id)})},[]);return m.useEffect(()=>Y.subscribe(k=>{if(k.dismiss){B(A=>A.map(L=>L.id===k.id?{...L,delete:!0}:L));return}setTimeout(()=>{so.flushSync(()=>{B(A=>{let L=A.findIndex(G=>G.id===k.id);return L!==-1?[...A.slice(0,L),{...A[L],...k},...A.slice(L+1)]:[k,...A]})})})}),[]),m.useEffect(()=>{if(p!=="system"){F(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;let k=window.matchMedia("(prefers-color-scheme: dark)");try{k.addEventListener("change",({matches:A})=>{F(A?"dark":"light")})}catch{k.addListener(({matches:L})=>{try{F(L?"dark":"light")}catch(G){console.error(G)}})}},[p]),m.useEffect(()=>{I.length<=1&&C(!1)},[I]),m.useEffect(()=>{let k=A=>{var L,G;n.every(ce=>A[ce]||A.code===ce)&&(C(!0),(L=X.current)==null||L.focus()),A.code==="Escape"&&(document.activeElement===X.current||(G=X.current)!=null&&G.contains(document.activeElement))&&C(!1)};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[n]),m.useEffect(()=>{if(X.current)return()=>{w.current&&(w.current.focus({preventScroll:!0}),w.current=null,W.current=!1)}},[X.current]),m.createElement("section",{ref:t,"aria-label":`${N} ${se}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((k,A)=>{var L;let[G,ce]=k.split("-");return I.length?m.createElement("ol",{key:k,dir:b==="auto"?rt():b,tabIndex:-1,ref:X,className:u,"data-sonner-toaster":!0,"data-theme":ee,"data-y-position":G,"data-lifted":H&&I.length>1&&!l,"data-x-position":ce,style:{"--front-toast-height":`${((L=P[0])==null?void 0:L.height)||0}px`,"--width":`${Cr}px`,"--gap":`${T}px`,...s,...Pr(d,f)},onBlur:_=>{W.current&&!_.currentTarget.contains(_.relatedTarget)&&(W.current=!1,w.current&&(w.current.focus({preventScroll:!0}),w.current=null))},onFocus:_=>{_.target instanceof HTMLElement&&_.target.dataset.dismissible==="false"||W.current||(W.current=!0,w.current=_.relatedTarget)},onMouseEnter:()=>C(!0),onMouseMove:()=>C(!0),onMouseLeave:()=>{ae||C(!1)},onDragEnd:()=>C(!1),onPointerDown:_=>{_.target instanceof HTMLElement&&_.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},I.filter(_=>!_.position&&A===0||_.position===k).map((_,Re)=>{var pe,be;return m.createElement(Nr,{key:_.id,icons:S,index:Re,toast:_,defaultRichColors:g,duration:(pe=x==null?void 0:x.duration)!=null?pe:v,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:o,visibleToasts:R,closeButton:(be=x==null?void 0:x.closeButton)!=null?be:c,interacting:ae,position:k,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,removeToast:je,toasts:I.filter(he=>he.position==_.position),heights:P.filter(he=>he.position==_.position),setHeights:O,expandByDefault:l,gap:T,loadingIcon:E,expanded:H,pauseWhenPageIsHidden:z,swipeDirections:e.swipeDirections})})):null}))});const $t={mobile:{width:375,icon:i.Smartphone,label:"Mobile (375px)"},tablet:{width:768,icon:i.Tablet,label:"Tablet (768px)"},small:{width:1024,icon:i.Monitor,label:"Small Desktop (1024px)"},desktop:{width:"100%",icon:i.Tv,label:"Desktop (Full)"}},kr=({onSave:e,deviceSize:t,onDeviceSizeChange:o})=>{const{actions:r,query:n,canUndo:l,canRedo:c}=i.Pe((d,f)=>({canUndo:f.history.canUndo(),canRedo:f.history.canRedo()})),u=()=>{const d=n.serialize();e==null||e(d),br.success("Page saved successfully")};return a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx(i.TooltipProvider,{children:a.jsx(Yt,{type:"single",value:t,onValueChange:d=>d&&o(d),className:"bg-muted rounded-md p-1",children:Object.entries($t).map(([d,{icon:f,label:p}])=>a.jsxs(i.Tooltip,{children:[a.jsx(i.TooltipTrigger,{asChild:!0,children:a.jsx(Wt,{value:d,size:"sm",className:"data-[state=on]:bg-background data-[state=on]:shadow-sm",children:a.jsx(f,{className:"h-4 w-4"})})}),a.jsx(i.TooltipContent,{side:"bottom",children:a.jsx("p",{children:p})})]},d))})}),a.jsx("div",{className:"h-6 w-px bg-border"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(i.Button,{variant:"outline",size:"sm",onClick:()=>r.history.undo(),disabled:!l,children:a.jsx(mo,{className:"h-4 w-4"})}),a.jsx(i.Button,{variant:"outline",size:"sm",onClick:()=>r.history.redo(),disabled:!c,children:a.jsx(co,{className:"h-4 w-4"})}),a.jsxs(i.Button,{size:"sm",onClick:u,children:[a.jsx(uo,{className:"h-4 w-4 mr-2"}),"Save"]})]})]})},Ye=({children:e,className:t})=>{const{connectors:{connect:o,drag:r},selected:n}=i.Ne(l=>({selected:l.events.selected}));return a.jsx("div",{ref:l=>{l&&o(r(l))},className:i.clsx("relative min-h-[100vh] bg-white",t||""),children:e})};Ye.craft={props:{},displayName:"Body",isCanvas:!0,rules:{canMoveIn:e=>e.every(t=>t.data.displayName!=="Body")}};const Ir=({htmlJson:e="{}"})=>{const{actions:t}=i.Pe();return t.deserialize(e),a.jsx(i.De,{children:a.jsx(i.ke,{id:"mainBody",is:Ye,canvas:!0})})},Dr=({initialData:e,onSave:t,onStateChange:o})=>{var d;const r=i.useEventData(),[n,l]=m.useState("desktop"),c=((d=$t[n])==null?void 0:d.width)||"100%",u=f=>{if(o)try{const p=f.serialize();o(p)}catch{}};return a.jsx(i.ut,{resolver:{Body:Ye,Wrapper:i.Wrapper,Section:i.Section,Container:i.Container,Text:i.Text,ButtonComponent:i.ButtonComponent,Heading:i.Heading,Image:i.Image,Img:i.Img,Divider:i.Divider,Spacer:i.Spacer,Video:i.Video,Columns:i.Columns,Link:i.Link$1},enabled:!0,onNodesChange:f=>u(f),children:a.jsx(i.DeviceSizeProvider,{value:n,children:a.jsx(i.EventDataProvider,{value:r,children:a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsxs("div",{className:"flex items-center justify-between pb-4 border-b border-border",children:[a.jsx("h2",{className:"text-lg font-semibold",children:"Page Builder"}),a.jsx(kr,{onSave:t,deviceSize:n,onDeviceSizeChange:l})]}),a.jsxs("div",{className:"flex gap-4 mt-4 flex-1 min-h-0",children:[a.jsx(i.Card,{className:"w-56 shrink-0",children:a.jsxs(i.CardContent,{className:"p-4 space-y-6",children:[a.jsx(ho,{}),a.jsx(Ao,{})]})}),a.jsx(i.Card,{className:"flex-1 overflow-hidden bg-muted/30 flex flex-col",children:a.jsx(i.CardContent,{className:"p-4 flex-1 flex justify-center overflow-hidden",children:a.jsx(Fe,{className:"h-full w-full",children:a.jsx("div",{className:"flex justify-center min-h-full",children:a.jsx("div",{className:"bg-white rounded-lg min-h-full p-4 border border-dashed border-border transition-all duration-300 shadow-sm",style:{width:typeof c=="number"?`${c}px`:c,maxWidth:"100%"},children:a.jsx(Ir,{htmlJson:e})})})})})}),a.jsx(i.Card,{className:"w-72 shrink-0 flex flex-col",children:a.jsx(i.CardContent,{className:"p-4 flex-1 overflow-hidden",children:a.jsx(Io,{})})})]})]})})})})};exports.default=Dr;
|
|
71
|
+
*/const po=i.createLucideIcon("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]),ho=()=>{const{connectors:e}=i.Pe(),t=[{name:"Container",icon:Ae,element:a.jsx(i.ke,{is:i.Container,canvas:!0})},{name:"Columns",icon:rt,element:a.jsxs(i.ke,{is:i.Columns,canvas:!0,children:[a.jsx(i.ke,{is:i.Container,canvas:!0}),a.jsx(i.ke,{is:i.Container,canvas:!0})]})}],o=[{name:"Heading",icon:nt,element:a.jsx(i.Heading,{})},{name:"Text",icon:ct,element:a.jsx(i.Text,{})},{name:"Button",icon:it,element:a.jsx(i.ButtonComponent,{})},{name:"Link",icon:i.Link,element:a.jsx(i.Link$1,{})}],r=[{name:"Image",icon:at,element:a.jsx(i.Image,{})},{name:"Video",icon:i.Film,element:a.jsx(i.Video,{})}],n=[{name:"Divider",icon:st,element:a.jsx(i.Divider,{})},{name:"Spacer",icon:lt,element:a.jsx(i.Spacer,{})}],l=(c,u)=>a.jsxs("div",{className:"space-y-2",children:[a.jsx("span",{className:"text-xs text-muted-foreground/70",children:c}),a.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:u.map(d=>a.jsxs(i.Button,{variant:"outline",size:"sm",className:"flex flex-col items-center justify-center h-14 cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground",ref:f=>f&&e.create(f,d.element),children:[a.jsx(d.icon,{className:"h-4 w-4 mb-1"}),a.jsx("span",{className:"text-[10px]",children:d.name})]},d.name))})]});return a.jsxs("div",{className:"space-y-4",children:[a.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Components"}),l("Layout",t),l("Basic",o),l("Media",r),l("Utility",n)]})};var go=h.createContext(void 0);function _e(e){const t=h.useContext(go);return e||t||"ltr"}function vo(e,[t,o]){return Math.min(o,Math.max(t,e))}function bo(e,t){return h.useReducer((o,r)=>t[o][r]??o,e)}var Oe="ScrollArea",[dt]=i.createContextScope(Oe),[xo,U]=dt(Oe),ut=h.forwardRef((e,t)=>{const{__scopeScrollArea:o,type:r="hover",dir:n,scrollHideDelay:l=600,...c}=e,[u,d]=h.useState(null),[f,p]=h.useState(null),[g,v]=h.useState(null),[s,R]=h.useState(null),[x,b]=h.useState(null),[T,E]=h.useState(0),[S,N]=h.useState(0),[z,I]=h.useState(!1),[B,D]=h.useState(!1),P=i.useComposedRefs(t,H=>d(H)),O=_e(n);return a.jsx(xo,{scope:o,type:r,dir:O,scrollHideDelay:l,scrollArea:u,viewport:f,onViewportChange:p,content:g,onContentChange:v,scrollbarX:s,onScrollbarXChange:R,scrollbarXEnabled:z,onScrollbarXEnabledChange:I,scrollbarY:x,onScrollbarYChange:b,scrollbarYEnabled:B,onScrollbarYEnabledChange:D,onCornerWidthChange:E,onCornerHeightChange:N,children:a.jsx(i.Primitive.div,{dir:O,...c,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":T+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});ut.displayName=Oe;var ft="ScrollAreaViewport",mt=h.forwardRef((e,t)=>{const{__scopeScrollArea:o,children:r,nonce:n,...l}=e,c=U(ft,o),u=h.useRef(null),d=i.useComposedRefs(t,u,c.onViewportChange);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),a.jsx(i.Primitive.div,{"data-radix-scroll-area-viewport":"",...l,ref:d,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});mt.displayName=ft;var Q="ScrollAreaScrollbar",ze=h.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=U(Q,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:c}=n,u=e.orientation==="horizontal";return h.useEffect(()=>(u?l(!0):c(!0),()=>{u?l(!1):c(!1)}),[u,l,c]),n.type==="hover"?a.jsx(yo,{...r,ref:t,forceMount:o}):n.type==="scroll"?a.jsx(wo,{...r,ref:t,forceMount:o}):n.type==="auto"?a.jsx(pt,{...r,ref:t,forceMount:o}):n.type==="always"?a.jsx(Be,{...r,ref:t}):null});ze.displayName=Q;var yo=h.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=U(Q,e.__scopeScrollArea),[l,c]=h.useState(!1);return h.useEffect(()=>{const u=n.scrollArea;let d=0;if(u){const f=()=>{window.clearTimeout(d),c(!0)},p=()=>{d=window.setTimeout(()=>c(!1),n.scrollHideDelay)};return u.addEventListener("pointerenter",f),u.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",f),u.removeEventListener("pointerleave",p)}}},[n.scrollArea,n.scrollHideDelay]),a.jsx(i.Presence,{present:o||l,children:a.jsx(pt,{"data-state":l?"visible":"hidden",...r,ref:t})})}),wo=h.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=U(Q,e.__scopeScrollArea),l=e.orientation==="horizontal",c=Te(()=>d("SCROLL_END"),100),[u,d]=bo("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return h.useEffect(()=>{if(u==="idle"){const f=window.setTimeout(()=>d("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(f)}},[u,n.scrollHideDelay,d]),h.useEffect(()=>{const f=n.viewport,p=l?"scrollLeft":"scrollTop";if(f){let g=f[p];const v=()=>{const s=f[p];g!==s&&(d("SCROLL"),c()),g=s};return f.addEventListener("scroll",v),()=>f.removeEventListener("scroll",v)}},[n.viewport,l,d,c]),a.jsx(i.Presence,{present:o||u!=="hidden",children:a.jsx(Be,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:i.composeEventHandlers(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:i.composeEventHandlers(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),pt=h.forwardRef((e,t)=>{const o=U(Q,e.__scopeScrollArea),{forceMount:r,...n}=e,[l,c]=h.useState(!1),u=e.orientation==="horizontal",d=Te(()=>{if(o.viewport){const f=o.viewport.offsetWidth<o.viewport.scrollWidth,p=o.viewport.offsetHeight<o.viewport.scrollHeight;c(u?f:p)}},10);return me(o.viewport,d),me(o.content,d),a.jsx(i.Presence,{present:r||l,children:a.jsx(Be,{"data-state":l?"visible":"hidden",...n,ref:t})})}),Be=h.forwardRef((e,t)=>{const{orientation:o="vertical",...r}=e,n=U(Q,e.__scopeScrollArea),l=h.useRef(null),c=h.useRef(0),[u,d]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=xt(u.viewport,u.content),p={...r,sizes:u,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:v=>l.current=v,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:v=>c.current=v};function g(v,s){return Ro(v,c.current,u,s)}return o==="horizontal"?a.jsx(So,{...p,ref:t,onThumbPositionChange:()=>{if(n.viewport&&l.current){const v=n.viewport.scrollLeft,s=Je(v,u,n.dir);l.current.style.transform=`translate3d(${s}px, 0, 0)`}},onWheelScroll:v=>{n.viewport&&(n.viewport.scrollLeft=v)},onDragScroll:v=>{n.viewport&&(n.viewport.scrollLeft=g(v,n.dir))}}):o==="vertical"?a.jsx(Co,{...p,ref:t,onThumbPositionChange:()=>{if(n.viewport&&l.current){const v=n.viewport.scrollTop,s=Je(v,u);l.current.style.transform=`translate3d(0, ${s}px, 0)`}},onWheelScroll:v=>{n.viewport&&(n.viewport.scrollTop=v)},onDragScroll:v=>{n.viewport&&(n.viewport.scrollTop=g(v))}}):null}),So=h.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,l=U(Q,e.__scopeScrollArea),[c,u]=h.useState(),d=h.useRef(null),f=i.useComposedRefs(t,d,l.onScrollbarXChange);return h.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),a.jsx(gt,{"data-orientation":"horizontal",...n,ref:f,sizes:o,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Ee(o)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,g)=>{if(l.viewport){const v=l.viewport.scrollLeft+p.deltaX;e.onWheelScroll(v),wt(v,g)&&p.preventDefault()}},onResize:()=>{d.current&&l.viewport&&c&&r({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Se(c.paddingLeft),paddingEnd:Se(c.paddingRight)}})}})}),Co=h.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,l=U(Q,e.__scopeScrollArea),[c,u]=h.useState(),d=h.useRef(null),f=i.useComposedRefs(t,d,l.onScrollbarYChange);return h.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),a.jsx(gt,{"data-orientation":"vertical",...n,ref:f,sizes:o,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Ee(o)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,g)=>{if(l.viewport){const v=l.viewport.scrollTop+p.deltaY;e.onWheelScroll(v),wt(v,g)&&p.preventDefault()}},onResize:()=>{d.current&&l.viewport&&c&&r({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Se(c.paddingTop),paddingEnd:Se(c.paddingBottom)}})}})}),[Eo,ht]=dt(Q),gt=h.forwardRef((e,t)=>{const{__scopeScrollArea:o,sizes:r,hasThumb:n,onThumbChange:l,onThumbPointerUp:c,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:p,onResize:g,...v}=e,s=U(Q,o),[R,x]=h.useState(null),b=i.useComposedRefs(t,P=>x(P)),T=h.useRef(null),E=h.useRef(""),S=s.viewport,N=r.content-r.viewport,z=i.useCallbackRef(p),I=i.useCallbackRef(d),B=Te(g,10);function D(P){if(T.current){const O=P.clientX-T.current.left,H=P.clientY-T.current.top;f({x:O,y:H})}}return h.useEffect(()=>{const P=O=>{const H=O.target;(R==null?void 0:R.contains(H))&&z(O,N)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[S,R,N,z]),h.useEffect(I,[r,I]),me(R,B),me(s.content,B),a.jsx(Eo,{scope:o,scrollbar:R,hasThumb:n,onThumbChange:i.useCallbackRef(l),onThumbPointerUp:i.useCallbackRef(c),onThumbPositionChange:I,onThumbPointerDown:i.useCallbackRef(u),children:a.jsx(i.Primitive.div,{...v,ref:b,style:{position:"absolute",...v.style},onPointerDown:i.composeEventHandlers(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),T.current=R.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",s.viewport&&(s.viewport.style.scrollBehavior="auto"),D(P))}),onPointerMove:i.composeEventHandlers(e.onPointerMove,D),onPointerUp:i.composeEventHandlers(e.onPointerUp,P=>{const O=P.target;O.hasPointerCapture(P.pointerId)&&O.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=E.current,s.viewport&&(s.viewport.style.scrollBehavior=""),T.current=null})})})}),we="ScrollAreaThumb",vt=h.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=ht(we,e.__scopeScrollArea);return a.jsx(i.Presence,{present:o||n.hasThumb,children:a.jsx(To,{ref:t,...r})})}),To=h.forwardRef((e,t)=>{const{__scopeScrollArea:o,style:r,...n}=e,l=U(we,o),c=ht(we,o),{onThumbPositionChange:u}=c,d=i.useComposedRefs(t,g=>c.onThumbChange(g)),f=h.useRef(void 0),p=Te(()=>{f.current&&(f.current(),f.current=void 0)},100);return h.useEffect(()=>{const g=l.viewport;if(g){const v=()=>{if(p(),!f.current){const s=No(g,u);f.current=s,u()}};return u(),g.addEventListener("scroll",v),()=>g.removeEventListener("scroll",v)}},[l.viewport,p,u]),a.jsx(i.Primitive.div,{"data-state":c.hasThumb?"visible":"hidden",...n,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:i.composeEventHandlers(e.onPointerDownCapture,g=>{const s=g.target.getBoundingClientRect(),R=g.clientX-s.left,x=g.clientY-s.top;c.onThumbPointerDown({x:R,y:x})}),onPointerUp:i.composeEventHandlers(e.onPointerUp,c.onThumbPointerUp)})});vt.displayName=we;var He="ScrollAreaCorner",bt=h.forwardRef((e,t)=>{const o=U(He,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?a.jsx(jo,{...e,ref:t}):null});bt.displayName=He;var jo=h.forwardRef((e,t)=>{const{__scopeScrollArea:o,...r}=e,n=U(He,o),[l,c]=h.useState(0),[u,d]=h.useState(0),f=!!(l&&u);return me(n.scrollbarX,()=>{var g;const p=((g=n.scrollbarX)==null?void 0:g.offsetHeight)||0;n.onCornerHeightChange(p),d(p)}),me(n.scrollbarY,()=>{var g;const p=((g=n.scrollbarY)==null?void 0:g.offsetWidth)||0;n.onCornerWidthChange(p),c(p)}),f?a.jsx(i.Primitive.div,{...r,ref:t,style:{width:l,height:u,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Se(e){return e?parseInt(e,10):0}function xt(e,t){const o=e/t;return isNaN(o)?0:o}function Ee(e){const t=xt(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function Ro(e,t,o,r="ltr"){const n=Ee(o),l=n/2,c=t||l,u=n-c,d=o.scrollbar.paddingStart+c,f=o.scrollbar.size-o.scrollbar.paddingEnd-u,p=o.content-o.viewport,g=r==="ltr"?[0,p]:[p*-1,0];return yt([d,f],g)(e)}function Je(e,t,o="ltr"){const r=Ee(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,l=t.scrollbar.size-n,c=t.content-t.viewport,u=l-r,d=o==="ltr"?[0,c]:[c*-1,0],f=vo(e,d);return yt([0,c],[0,u])(f)}function yt(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(o-e[0])}}function wt(e,t){return e>0&&e<t}var No=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return function n(){const l={left:e.scrollLeft,top:e.scrollTop},c=o.left!==l.left,u=o.top!==l.top;(c||u)&&t(),o=l,r=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(r)};function Te(e,t){const o=i.useCallbackRef(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function me(e,t){const o=i.useCallbackRef(t);i.useLayoutEffect2(()=>{let r=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return n.observe(e),()=>{window.cancelAnimationFrame(r),n.unobserve(e)}}},[e,o])}var St=ut,Po=mt,ko=bt;const Fe=h.forwardRef(({className:e,children:t,...o},r)=>a.jsxs(St,{ref:r,className:i.cn("relative overflow-hidden",e),...o,children:[a.jsx(Po,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(Ct,{}),a.jsx(ko,{})]}));Fe.displayName=St.displayName;const Ct=h.forwardRef(({className:e,orientation:t="vertical",...o},r)=>a.jsx(ze,{ref:r,orientation:t,className:i.cn("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:a.jsx(vt,{className:"relative flex-1 rounded-full bg-border"})}));Ct.displayName=ze.displayName;const Io=()=>{const{selected:e,actions:t}=i.Pe(o=>{var l,c,u,d,f,p,g;const r=o.events.selected?Array.from(o.events.selected)[0]:null;let n;return r&&(n={id:r,name:((c=(l=o.nodes[r])==null?void 0:l.data)==null?void 0:c.displayName)||((d=(u=o.nodes[r])==null?void 0:u.data)==null?void 0:d.name),settings:(p=(f=o.nodes[r])==null?void 0:f.related)==null?void 0:p.settings,isDeletable:((g=o.nodes[r])==null?void 0:g.id)!=="ROOT"}),{selected:n}});return a.jsx("div",{className:"h-full flex flex-col",children:e?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center justify-between pb-3 border-b border-border mb-3",children:[a.jsxs("div",{children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"Selected"}),a.jsx("h3",{className:"text-sm font-semibold",children:e.name})]}),e.isDeletable&&a.jsx("button",{onClick:()=>t.delete(e.id),className:"p-1.5 rounded hover:bg-destructive/10 text-destructive transition-colors",title:"Delete element",children:a.jsx(fo,{className:"h-4 w-4"})})]}),a.jsx(Fe,{className:"flex-1 -mr-4 pr-4",children:e.settings&&m.createElement(e.settings)})]}):a.jsx("div",{className:"text-center py-8",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:"Select an element to edit its properties"})})})},Do=e=>{switch(e){case"Container":return Ae;case"Text":return ct;case"Heading":return nt;case"Button":return it;case"Image":return at;case"Divider":return st;case"Spacer":return lt;case"Video":return po;case"Columns":return rt;case"Link":return i.Link;default:return Ae}},Et=({nodeId:e,depth:t=0,onDragStart:o,onDragOver:r,onDrop:n,draggedId:l})=>{const{node:c,actions:u,selectedNodeId:d,childNodes:f,parentId:p}=i.Pe((C,ae)=>{var se,w;const V=C.nodes[e],ee=((se=V==null?void 0:V.data)==null?void 0:se.nodes)||[],F=C.events.selected?Array.from(C.events.selected)[0]:null,X=(w=V==null?void 0:V.data)==null?void 0:w.parent;return{node:V,childNodes:ee,selectedNodeId:F,parentId:X}}),[g,v]=m.useState(!0),[s,R]=m.useState(!1);if(!c)return null;const x=c.data.displayName||c.data.name||"Unknown",b=f.length>0,T=d===e,E=e==="ROOT",S=Do(x),N=l===e,z=c.data.isCanvas,I=C=>{C.stopPropagation(),E||u.selectNode(e)},B=C=>{C.stopPropagation(),v(!g)},D=C=>{if(E){C.preventDefault();return}C.stopPropagation(),o(e,p)},P=C=>{C.preventDefault(),C.stopPropagation(),l&&l!==e&&z&&R(!0)},O=C=>{C.stopPropagation(),R(!1)},H=C=>{C.preventDefault(),C.stopPropagation(),R(!1),l&&l!==e&&n(e)};return a.jsxs("div",{className:"select-none",children:[a.jsxs("div",{className:`flex items-center gap-1 py-1 px-1 rounded cursor-pointer text-sm transition-colors ${T?"bg-primary/10 text-primary":"hover:bg-secondary/50"} ${N?"opacity-50":""} ${s?"bg-primary/20 ring-1 ring-primary":""}`,style:{paddingLeft:`${t*12+4}px`},onClick:I,draggable:!E,onDragStart:D,onDragOver:P,onDragLeave:O,onDrop:H,children:[!E&&a.jsx(lo,{className:"h-3 w-3 text-muted-foreground/50 cursor-grab active:cursor-grabbing"}),b?a.jsx("button",{onClick:B,className:"p-0.5 hover:bg-secondary rounded",children:g?a.jsx(i.ChevronDown,{className:"h-3 w-3"}):a.jsx(i.ChevronRight,{className:"h-3 w-3"})}):a.jsx("span",{className:"w-4"}),a.jsx(S,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),a.jsx("span",{className:`truncate ${E?"font-medium":""}`,children:E?"Root":x})]}),b&&g&&a.jsx("div",{children:f.map(C=>a.jsx(Et,{nodeId:C,depth:t+1,onDragStart:o,onDragOver:r,onDrop:n,draggedId:l},C))})]})},Ao=()=>{const[e,t]=m.useState(null),[o,r]=m.useState(null),{nodeIds:n,actions:l}=i.Pe(f=>({nodeIds:Object.keys(f.nodes)})),c=(f,p)=>{t(f),r(p)},u=f=>{if(e&&f&&e!==f)try{l.move(e,f,0)}catch(p){console.log("Cannot move node:",p)}t(null),r(null)},d=()=>{t(null),r(null)};return a.jsxs("div",{className:"space-y-2",onDragEnd:d,children:[a.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Layers"}),a.jsx("div",{className:"border border-border rounded-lg p-2 max-h-[250px] overflow-y-auto bg-background",children:n.includes("ROOT")&&a.jsx(Et,{nodeId:"ROOT",onDragStart:c,onDrop:u,draggedId:e})}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Drag to containers to reorder"})]})};function Qe(e){const t=Mo(e),o=h.forwardRef((r,n)=>{const{children:l,...c}=r,u=h.Children.toArray(l),d=u.find(_o);if(d){const f=d.props.children,p=u.map(g=>g===d?h.Children.count(f)>1?h.Children.only(null):h.isValidElement(f)?f.props.children:null:g);return a.jsx(t,{...c,ref:n,children:h.isValidElement(f)?h.cloneElement(f,void 0,p):null})}return a.jsx(t,{...c,ref:n,children:l})});return o.displayName=`${e}.Slot`,o}function Mo(e){const t=h.forwardRef((o,r)=>{const{children:n,...l}=o;if(h.isValidElement(n)){const c=zo(n),u=Oo(l,n.props);return n.type!==h.Fragment&&(u.ref=r?i.composeRefs(r,c):c),h.cloneElement(n,u)}return h.Children.count(n)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Lo=Symbol("radix.slottable");function _o(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Lo}function Oo(e,t){const o={...t};for(const r in t){const n=e[r],l=t[r];/^on[A-Z]/.test(r)?n&&l?o[r]=(...u)=>{const d=l(...u);return n(...u),d}:n&&(o[r]=n):r==="style"?o[r]={...n,...l}:r==="className"&&(o[r]=[n,l].filter(Boolean).join(" "))}return{...e,...o}}function zo(e){var r,n;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function Bo(e){const t=e+"CollectionProvider",[o,r]=i.createContextScope(t),[n,l]=o(t,{collectionRef:{current:null},itemMap:new Map}),c=x=>{const{scope:b,children:T}=x,E=m.useRef(null),S=m.useRef(new Map).current;return a.jsx(n,{scope:b,itemMap:S,collectionRef:E,children:T})};c.displayName=t;const u=e+"CollectionSlot",d=Qe(u),f=m.forwardRef((x,b)=>{const{scope:T,children:E}=x,S=l(u,T),N=i.useComposedRefs(b,S.collectionRef);return a.jsx(d,{ref:N,children:E})});f.displayName=u;const p=e+"CollectionItemSlot",g="data-radix-collection-item",v=Qe(p),s=m.forwardRef((x,b)=>{const{scope:T,children:E,...S}=x,N=m.useRef(null),z=i.useComposedRefs(b,N),I=l(p,T);return m.useEffect(()=>(I.itemMap.set(N,{ref:N,...S}),()=>void I.itemMap.delete(N))),a.jsx(v,{[g]:"",ref:z,children:E})});s.displayName=p;function R(x){const b=l(e+"CollectionConsumer",x);return m.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const S=Array.from(E.querySelectorAll(`[${g}]`));return Array.from(b.itemMap.values()).sort((I,B)=>S.indexOf(I.ref.current)-S.indexOf(B.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:c,Slot:f,ItemSlot:s},R,r]}var De="rovingFocusGroup.onEntryFocus",Ho={bubbles:!1,cancelable:!0},ve="RovingFocusGroup",[Me,Tt,Fo]=Bo(ve),[Vo,jt]=i.createContextScope(ve,[Fo]),[Go,Yo]=Vo(ve),Rt=h.forwardRef((e,t)=>a.jsx(Me.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Me.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Wo,{...e,ref:t})})}));Rt.displayName=ve;var Wo=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:r,loop:n=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...g}=e,v=h.useRef(null),s=i.useComposedRefs(t,v),R=_e(l),[x,b]=i.useControllableState({prop:c,defaultProp:u??null,onChange:d,caller:ve}),[T,E]=h.useState(!1),S=i.useCallbackRef(f),N=Tt(o),z=h.useRef(!1),[I,B]=h.useState(0);return h.useEffect(()=>{const D=v.current;if(D)return D.addEventListener(De,S),()=>D.removeEventListener(De,S)},[S]),a.jsx(Go,{scope:o,orientation:r,dir:R,loop:n,currentTabStopId:x,onItemFocus:h.useCallback(D=>b(D),[b]),onItemShiftTab:h.useCallback(()=>E(!0),[]),onFocusableItemAdd:h.useCallback(()=>B(D=>D+1),[]),onFocusableItemRemove:h.useCallback(()=>B(D=>D-1),[]),children:a.jsx(i.Primitive.div,{tabIndex:T||I===0?-1:0,"data-orientation":r,...g,ref:s,style:{outline:"none",...e.style},onMouseDown:i.composeEventHandlers(e.onMouseDown,()=>{z.current=!0}),onFocus:i.composeEventHandlers(e.onFocus,D=>{const P=!z.current;if(D.target===D.currentTarget&&P&&!T){const O=new CustomEvent(De,Ho);if(D.currentTarget.dispatchEvent(O),!O.defaultPrevented){const H=N().filter(F=>F.focusable),C=H.find(F=>F.active),ae=H.find(F=>F.id===x),ee=[C,ae,...H].filter(Boolean).map(F=>F.ref.current);kt(ee,p)}}z.current=!1}),onBlur:i.composeEventHandlers(e.onBlur,()=>E(!1))})})}),Nt="RovingFocusGroupItem",Pt=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:r=!0,active:n=!1,tabStopId:l,children:c,...u}=e,d=i.useId(),f=l||d,p=Yo(Nt,o),g=p.currentTabStopId===f,v=Tt(o),{onFocusableItemAdd:s,onFocusableItemRemove:R,currentTabStopId:x}=p;return h.useEffect(()=>{if(r)return s(),()=>R()},[r,s,R]),a.jsx(Me.ItemSlot,{scope:o,id:f,focusable:r,active:n,children:a.jsx(i.Primitive.span,{tabIndex:g?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:i.composeEventHandlers(e.onMouseDown,b=>{r?p.onItemFocus(f):b.preventDefault()}),onFocus:i.composeEventHandlers(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:i.composeEventHandlers(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){p.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const T=Xo(b,p.orientation,p.dir);if(T!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let S=v().filter(N=>N.focusable).map(N=>N.ref.current);if(T==="last")S.reverse();else if(T==="prev"||T==="next"){T==="prev"&&S.reverse();const N=S.indexOf(b.currentTarget);S=p.loop?Ko(S,N+1):S.slice(N+1)}setTimeout(()=>kt(S))}}),children:typeof c=="function"?c({isCurrentTabStop:g,hasTabStop:x!=null}):c})})});Pt.displayName=Nt;var $o={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Uo(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Xo(e,t,o){const r=Uo(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $o[r]}function kt(e,t=!1){const o=document.activeElement;for(const r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function Ko(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var qo=Rt,Zo=Pt,It="Toggle",Ve=h.forwardRef((e,t)=>{const{pressed:o,defaultPressed:r,onPressedChange:n,...l}=e,[c,u]=i.useControllableState({prop:o,onChange:n,defaultProp:r??!1,caller:It});return a.jsx(i.Primitive.button,{type:"button","aria-pressed":c,"data-state":c?"on":"off","data-disabled":e.disabled?"":void 0,...l,ref:t,onClick:i.composeEventHandlers(e.onClick,()=>{e.disabled||u(!c)})})});Ve.displayName=It;var Dt=Ve,ne="ToggleGroup",[At]=i.createContextScope(ne,[jt]),Mt=jt(),Ge=m.forwardRef((e,t)=>{const{type:o,...r}=e;if(o==="single"){const n=r;return a.jsx(Jo,{...n,ref:t})}if(o==="multiple"){const n=r;return a.jsx(Qo,{...n,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${ne}\``)});Ge.displayName=ne;var[Lt,_t]=At(ne),Jo=m.forwardRef((e,t)=>{const{value:o,defaultValue:r,onValueChange:n=()=>{},...l}=e,[c,u]=i.useControllableState({prop:o,defaultProp:r??"",onChange:n,caller:ne});return a.jsx(Lt,{scope:e.__scopeToggleGroup,type:"single",value:m.useMemo(()=>c?[c]:[],[c]),onItemActivate:u,onItemDeactivate:m.useCallback(()=>u(""),[u]),children:a.jsx(Ot,{...l,ref:t})})}),Qo=m.forwardRef((e,t)=>{const{value:o,defaultValue:r,onValueChange:n=()=>{},...l}=e,[c,u]=i.useControllableState({prop:o,defaultProp:r??[],onChange:n,caller:ne}),d=m.useCallback(p=>u((g=[])=>[...g,p]),[u]),f=m.useCallback(p=>u((g=[])=>g.filter(v=>v!==p)),[u]);return a.jsx(Lt,{scope:e.__scopeToggleGroup,type:"multiple",value:c,onItemActivate:d,onItemDeactivate:f,children:a.jsx(Ot,{...l,ref:t})})});Ge.displayName=ne;var[er,tr]=At(ne),Ot=m.forwardRef((e,t)=>{const{__scopeToggleGroup:o,disabled:r=!1,rovingFocus:n=!0,orientation:l,dir:c,loop:u=!0,...d}=e,f=Mt(o),p=_e(c),g={role:"group",dir:p,...d};return a.jsx(er,{scope:o,rovingFocus:n,disabled:r,children:n?a.jsx(qo,{asChild:!0,...f,orientation:l,dir:p,loop:u,children:a.jsx(i.Primitive.div,{...g,ref:t})}):a.jsx(i.Primitive.div,{...g,ref:t})})}),Ce="ToggleGroupItem",zt=m.forwardRef((e,t)=>{const o=_t(Ce,e.__scopeToggleGroup),r=tr(Ce,e.__scopeToggleGroup),n=Mt(e.__scopeToggleGroup),l=o.value.includes(e.value),c=r.disabled||e.disabled,u={...e,pressed:l,disabled:c},d=m.useRef(null);return r.rovingFocus?a.jsx(Zo,{asChild:!0,...n,focusable:!c,active:l,ref:d,children:a.jsx(et,{...u,ref:t})}):a.jsx(et,{...u,ref:t})});zt.displayName=Ce;var et=m.forwardRef((e,t)=>{const{__scopeToggleGroup:o,value:r,...n}=e,l=_t(Ce,o),c={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},u=l.type==="single"?c:void 0;return a.jsx(Ve,{...u,...n,ref:t,onPressedChange:d=>{d?l.onItemActivate(r):l.onItemDeactivate(r)}})}),Bt=Ge,Ht=zt;const Ft=i.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),or=h.forwardRef(({className:e,variant:t,size:o,...r},n)=>a.jsx(Dt,{ref:n,className:i.cn(Ft({variant:t,size:o,className:e})),...r}));or.displayName=Dt.displayName;const Vt=h.createContext({size:"default",variant:"default"}),Gt=h.forwardRef(({className:e,variant:t,size:o,children:r,...n},l)=>a.jsx(Bt,{ref:l,className:i.cn("flex items-center justify-center gap-1",e),...n,children:a.jsx(Vt.Provider,{value:{variant:t,size:o},children:r})}));Gt.displayName=Bt.displayName;const Yt=h.forwardRef(({className:e,children:t,variant:o,size:r,...n},l)=>{const c=h.useContext(Vt);return a.jsx(Ht,{ref:l,className:i.cn(Ft({variant:c.variant||o,size:c.size||r}),e),...n,children:t})});Yt.displayName=Ht.displayName;var rr=e=>{switch(e){case"success":return sr;case"info":return lr;case"warning":return ir;case"error":return cr;default:return null}},nr=Array(12).fill(0),ar=({visible:e,className:t})=>m.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},m.createElement("div",{className:"sonner-spinner"},nr.map((o,r)=>m.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),sr=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ir=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),lr=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),cr=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),dr=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},m.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),m.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ur=()=>{let[e,t]=m.useState(document.hidden);return m.useEffect(()=>{let o=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e},Le=1,fr=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:o,...r}=e,n=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Le++,l=this.toasts.find(u=>u.id===n),c=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),l?this.toasts=this.toasts.map(u=>u.id===n?(this.publish({...u,...e,id:n,title:o}),{...u,...e,id:n,dismissible:c,title:o}):u):this.addToast({title:o,...r,dismissible:c,id:n}),n},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(o=>o({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let o;t.loading!==void 0&&(o=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),n=o!==void 0,l,c=r.then(async d=>{if(l=["resolve",d],m.isValidElement(d))n=!1,this.create({id:o,type:"default",message:d});else if(pr(d)&&!d.ok){n=!1;let f=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:o,type:"error",message:f,description:p})}else if(t.success!==void 0){n=!1;let f=typeof t.success=="function"?await t.success(d):t.success,p=typeof t.description=="function"?await t.description(d):t.description;this.create({id:o,type:"success",message:f,description:p})}}).catch(async d=>{if(l=["reject",d],t.error!==void 0){n=!1;let f=typeof t.error=="function"?await t.error(d):t.error,p=typeof t.description=="function"?await t.description(d):t.description;this.create({id:o,type:"error",message:f,description:p})}}).finally(()=>{var d;n&&(this.dismiss(o),o=void 0),(d=t.finally)==null||d.call(t)}),u=()=>new Promise((d,f)=>c.then(()=>l[0]==="reject"?f(l[1]):d(l[1])).catch(f));return typeof o!="string"&&typeof o!="number"?{unwrap:u}:Object.assign(o,{unwrap:u})},this.custom=(e,t)=>{let o=(t==null?void 0:t.id)||Le++;return this.create({jsx:e(o),id:o,...t}),o},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Y=new fr,mr=(e,t)=>{let o=(t==null?void 0:t.id)||Le++;return Y.addToast({title:e,...t,id:o}),o},pr=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",hr=mr,gr=()=>Y.toasts,vr=()=>Y.getActiveToasts(),br=Object.assign(hr,{success:Y.success,info:Y.info,warning:Y.warning,error:Y.error,custom:Y.custom,message:Y.message,promise:Y.promise,dismiss:Y.dismiss,loading:Y.loading},{getHistory:gr,getToasts:vr});function xr(e,{insertAt:t}={}){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}xr(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family: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;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
72
|
+
`);function ye(e){return e.label!==void 0}var yr=3,wr="32px",Sr="16px",tt=4e3,Cr=356,Er=14,Tr=20,jr=200;function J(...e){return e.filter(Boolean).join(" ")}function Rr(e){let[t,o]=e.split("-"),r=[];return t&&r.push(t),o&&r.push(o),r}var Nr=e=>{var t,o,r,n,l,c,u,d,f,p,g;let{invert:v,toast:s,unstyled:R,interacting:x,setHeights:b,visibleToasts:T,heights:E,index:S,toasts:N,expanded:z,removeToast:I,defaultRichColors:B,closeButton:D,style:P,cancelButtonStyle:O,actionButtonStyle:H,className:C="",descriptionClassName:ae="",duration:V,position:ee,gap:F,loadingIcon:X,expandByDefault:se,classNames:w,icons:W,closeButtonAriaLabel:je="Close toast",pauseWhenPageIsHidden:k}=e,[A,L]=m.useState(null),[G,ce]=m.useState(null),[_,Re]=m.useState(!1),[pe,be]=m.useState(!1),[he,Ne]=m.useState(!1),[Ye,Ut]=m.useState(!1),[Xt,We]=m.useState(!1),[Kt,Pe]=m.useState(0),[qt,$e]=m.useState(0),ge=m.useRef(s.duration||V||tt),Ue=m.useRef(null),ie=m.useRef(null),Zt=S===0,Jt=S+1<=T,$=s.type,de=s.dismissible!==!1,Qt=s.className||"",eo=s.descriptionClassName||"",xe=m.useMemo(()=>E.findIndex(y=>y.toastId===s.id)||0,[E,s.id]),to=m.useMemo(()=>{var y;return(y=s.closeButton)!=null?y:D},[s.closeButton,D]),Xe=m.useMemo(()=>s.duration||V||tt,[s.duration,V]),ke=m.useRef(0),ue=m.useRef(0),Ke=m.useRef(0),fe=m.useRef(null),[oo,ro]=ee.split("-"),qe=m.useMemo(()=>E.reduce((y,j,M)=>M>=xe?y:y+j.height,0),[E,xe]),Ze=ur(),no=s.invert||v,Ie=$==="loading";ue.current=m.useMemo(()=>xe*F+qe,[xe,qe]),m.useEffect(()=>{ge.current=Xe},[Xe]),m.useEffect(()=>{Re(!0)},[]),m.useEffect(()=>{let y=ie.current;if(y){let j=y.getBoundingClientRect().height;return $e(j),b(M=>[{toastId:s.id,height:j,position:s.position},...M]),()=>b(M=>M.filter(K=>K.toastId!==s.id))}},[b,s.id]),m.useLayoutEffect(()=>{if(!_)return;let y=ie.current,j=y.style.height;y.style.height="auto";let M=y.getBoundingClientRect().height;y.style.height=j,$e(M),b(K=>K.find(q=>q.toastId===s.id)?K.map(q=>q.toastId===s.id?{...q,height:M}:q):[{toastId:s.id,height:M,position:s.position},...K])},[_,s.title,s.description,b,s.id]);let te=m.useCallback(()=>{be(!0),Pe(ue.current),b(y=>y.filter(j=>j.toastId!==s.id)),setTimeout(()=>{I(s)},jr)},[s,I,b,ue]);m.useEffect(()=>{if(s.promise&&$==="loading"||s.duration===1/0||s.type==="loading")return;let y;return z||x||k&&Ze?(()=>{if(Ke.current<ke.current){let j=new Date().getTime()-ke.current;ge.current=ge.current-j}Ke.current=new Date().getTime()})():ge.current!==1/0&&(ke.current=new Date().getTime(),y=setTimeout(()=>{var j;(j=s.onAutoClose)==null||j.call(s,s),te()},ge.current)),()=>clearTimeout(y)},[z,x,s,$,k,Ze,te]),m.useEffect(()=>{s.delete&&te()},[te,s.delete]);function ao(){var y,j,M;return W!=null&&W.loading?m.createElement("div",{className:J(w==null?void 0:w.loader,(y=s==null?void 0:s.classNames)==null?void 0:y.loader,"sonner-loader"),"data-visible":$==="loading"},W.loading):X?m.createElement("div",{className:J(w==null?void 0:w.loader,(j=s==null?void 0:s.classNames)==null?void 0:j.loader,"sonner-loader"),"data-visible":$==="loading"},X):m.createElement(ar,{className:J(w==null?void 0:w.loader,(M=s==null?void 0:s.classNames)==null?void 0:M.loader),visible:$==="loading"})}return m.createElement("li",{tabIndex:0,ref:ie,className:J(C,Qt,w==null?void 0:w.toast,(t=s==null?void 0:s.classNames)==null?void 0:t.toast,w==null?void 0:w.default,w==null?void 0:w[$],(o=s==null?void 0:s.classNames)==null?void 0:o[$]),"data-sonner-toast":"","data-rich-colors":(r=s.richColors)!=null?r:B,"data-styled":!(s.jsx||s.unstyled||R),"data-mounted":_,"data-promise":!!s.promise,"data-swiped":Xt,"data-removed":pe,"data-visible":Jt,"data-y-position":oo,"data-x-position":ro,"data-index":S,"data-front":Zt,"data-swiping":he,"data-dismissible":de,"data-type":$,"data-invert":no,"data-swipe-out":Ye,"data-swipe-direction":G,"data-expanded":!!(z||se&&_),style:{"--index":S,"--toasts-before":S,"--z-index":N.length-S,"--offset":`${pe?Kt:ue.current}px`,"--initial-height":se?"auto":`${qt}px`,...P,...s.style},onDragEnd:()=>{Ne(!1),L(null),fe.current=null},onPointerDown:y=>{Ie||!de||(Ue.current=new Date,Pe(ue.current),y.target.setPointerCapture(y.pointerId),y.target.tagName!=="BUTTON"&&(Ne(!0),fe.current={x:y.clientX,y:y.clientY}))},onPointerUp:()=>{var y,j,M,K;if(Ye||!de)return;fe.current=null;let q=Number(((y=ie.current)==null?void 0:y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),oe=Number(((j=ie.current)==null?void 0:j.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),le=new Date().getTime()-((M=Ue.current)==null?void 0:M.getTime()),Z=A==="x"?q:oe,re=Math.abs(Z)/le;if(Math.abs(Z)>=Tr||re>.11){Pe(ue.current),(K=s.onDismiss)==null||K.call(s,s),ce(A==="x"?q>0?"right":"left":oe>0?"down":"up"),te(),Ut(!0),We(!1);return}Ne(!1),L(null)},onPointerMove:y=>{var j,M,K,q;if(!fe.current||!de||((j=window.getSelection())==null?void 0:j.toString().length)>0)return;let oe=y.clientY-fe.current.y,le=y.clientX-fe.current.x,Z=(M=e.swipeDirections)!=null?M:Rr(ee);!A&&(Math.abs(le)>1||Math.abs(oe)>1)&&L(Math.abs(le)>Math.abs(oe)?"x":"y");let re={x:0,y:0};A==="y"?(Z.includes("top")||Z.includes("bottom"))&&(Z.includes("top")&&oe<0||Z.includes("bottom")&&oe>0)&&(re.y=oe):A==="x"&&(Z.includes("left")||Z.includes("right"))&&(Z.includes("left")&&le<0||Z.includes("right")&&le>0)&&(re.x=le),(Math.abs(re.x)>0||Math.abs(re.y)>0)&&We(!0),(K=ie.current)==null||K.style.setProperty("--swipe-amount-x",`${re.x}px`),(q=ie.current)==null||q.style.setProperty("--swipe-amount-y",`${re.y}px`)}},to&&!s.jsx?m.createElement("button",{"aria-label":je,"data-disabled":Ie,"data-close-button":!0,onClick:Ie||!de?()=>{}:()=>{var y;te(),(y=s.onDismiss)==null||y.call(s,s)},className:J(w==null?void 0:w.closeButton,(n=s==null?void 0:s.classNames)==null?void 0:n.closeButton)},(l=W==null?void 0:W.close)!=null?l:dr):null,s.jsx||m.isValidElement(s.title)?s.jsx?s.jsx:typeof s.title=="function"?s.title():s.title:m.createElement(m.Fragment,null,$||s.icon||s.promise?m.createElement("div",{"data-icon":"",className:J(w==null?void 0:w.icon,(c=s==null?void 0:s.classNames)==null?void 0:c.icon)},s.promise||s.type==="loading"&&!s.icon?s.icon||ao():null,s.type!=="loading"?s.icon||(W==null?void 0:W[$])||rr($):null):null,m.createElement("div",{"data-content":"",className:J(w==null?void 0:w.content,(u=s==null?void 0:s.classNames)==null?void 0:u.content)},m.createElement("div",{"data-title":"",className:J(w==null?void 0:w.title,(d=s==null?void 0:s.classNames)==null?void 0:d.title)},typeof s.title=="function"?s.title():s.title),s.description?m.createElement("div",{"data-description":"",className:J(ae,eo,w==null?void 0:w.description,(f=s==null?void 0:s.classNames)==null?void 0:f.description)},typeof s.description=="function"?s.description():s.description):null),m.isValidElement(s.cancel)?s.cancel:s.cancel&&ye(s.cancel)?m.createElement("button",{"data-button":!0,"data-cancel":!0,style:s.cancelButtonStyle||O,onClick:y=>{var j,M;ye(s.cancel)&&de&&((M=(j=s.cancel).onClick)==null||M.call(j,y),te())},className:J(w==null?void 0:w.cancelButton,(p=s==null?void 0:s.classNames)==null?void 0:p.cancelButton)},s.cancel.label):null,m.isValidElement(s.action)?s.action:s.action&&ye(s.action)?m.createElement("button",{"data-button":!0,"data-action":!0,style:s.actionButtonStyle||H,onClick:y=>{var j,M;ye(s.action)&&((M=(j=s.action).onClick)==null||M.call(j,y),!y.defaultPrevented&&te())},className:J(w==null?void 0:w.actionButton,(g=s==null?void 0:s.classNames)==null?void 0:g.actionButton)},s.action.label):null))};function ot(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Pr(e,t){let o={};return[e,t].forEach((r,n)=>{let l=n===1,c=l?"--mobile-offset":"--offset",u=l?Sr:wr;function d(f){["top","right","bottom","left"].forEach(p=>{o[`${c}-${p}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?o[`${c}-${f}`]=u:o[`${c}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),o}m.forwardRef(function(e,t){let{invert:o,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:l,closeButton:c,className:u,offset:d,mobileOffset:f,theme:p="light",richColors:g,duration:v,style:s,visibleToasts:R=yr,toastOptions:x,dir:b=ot(),gap:T=Er,loadingIcon:E,icons:S,containerAriaLabel:N="Notifications",pauseWhenPageIsHidden:z}=e,[I,B]=m.useState([]),D=m.useMemo(()=>Array.from(new Set([r].concat(I.filter(k=>k.position).map(k=>k.position)))),[I,r]),[P,O]=m.useState([]),[H,C]=m.useState(!1),[ae,V]=m.useState(!1),[ee,F]=m.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=m.useRef(null),se=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=m.useRef(null),W=m.useRef(!1),je=m.useCallback(k=>{B(A=>{var L;return(L=A.find(G=>G.id===k.id))!=null&&L.delete||Y.dismiss(k.id),A.filter(({id:G})=>G!==k.id)})},[]);return m.useEffect(()=>Y.subscribe(k=>{if(k.dismiss){B(A=>A.map(L=>L.id===k.id?{...L,delete:!0}:L));return}setTimeout(()=>{so.flushSync(()=>{B(A=>{let L=A.findIndex(G=>G.id===k.id);return L!==-1?[...A.slice(0,L),{...A[L],...k},...A.slice(L+1)]:[k,...A]})})})}),[]),m.useEffect(()=>{if(p!=="system"){F(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;let k=window.matchMedia("(prefers-color-scheme: dark)");try{k.addEventListener("change",({matches:A})=>{F(A?"dark":"light")})}catch{k.addListener(({matches:L})=>{try{F(L?"dark":"light")}catch(G){console.error(G)}})}},[p]),m.useEffect(()=>{I.length<=1&&C(!1)},[I]),m.useEffect(()=>{let k=A=>{var L,G;n.every(ce=>A[ce]||A.code===ce)&&(C(!0),(L=X.current)==null||L.focus()),A.code==="Escape"&&(document.activeElement===X.current||(G=X.current)!=null&&G.contains(document.activeElement))&&C(!1)};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[n]),m.useEffect(()=>{if(X.current)return()=>{w.current&&(w.current.focus({preventScroll:!0}),w.current=null,W.current=!1)}},[X.current]),m.createElement("section",{ref:t,"aria-label":`${N} ${se}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((k,A)=>{var L;let[G,ce]=k.split("-");return I.length?m.createElement("ol",{key:k,dir:b==="auto"?ot():b,tabIndex:-1,ref:X,className:u,"data-sonner-toaster":!0,"data-theme":ee,"data-y-position":G,"data-lifted":H&&I.length>1&&!l,"data-x-position":ce,style:{"--front-toast-height":`${((L=P[0])==null?void 0:L.height)||0}px`,"--width":`${Cr}px`,"--gap":`${T}px`,...s,...Pr(d,f)},onBlur:_=>{W.current&&!_.currentTarget.contains(_.relatedTarget)&&(W.current=!1,w.current&&(w.current.focus({preventScroll:!0}),w.current=null))},onFocus:_=>{_.target instanceof HTMLElement&&_.target.dataset.dismissible==="false"||W.current||(W.current=!0,w.current=_.relatedTarget)},onMouseEnter:()=>C(!0),onMouseMove:()=>C(!0),onMouseLeave:()=>{ae||C(!1)},onDragEnd:()=>C(!1),onPointerDown:_=>{_.target instanceof HTMLElement&&_.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},I.filter(_=>!_.position&&A===0||_.position===k).map((_,Re)=>{var pe,be;return m.createElement(Nr,{key:_.id,icons:S,index:Re,toast:_,defaultRichColors:g,duration:(pe=x==null?void 0:x.duration)!=null?pe:v,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:o,visibleToasts:R,closeButton:(be=x==null?void 0:x.closeButton)!=null?be:c,interacting:ae,position:k,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,removeToast:je,toasts:I.filter(he=>he.position==_.position),heights:P.filter(he=>he.position==_.position),setHeights:O,expandByDefault:l,gap:T,loadingIcon:E,expanded:H,pauseWhenPageIsHidden:z,swipeDirections:e.swipeDirections})})):null}))});const Wt={mobile:{width:375,icon:i.Smartphone,label:"Mobile (375px)"},tablet:{width:768,icon:i.Tablet,label:"Tablet (768px)"},small:{width:1024,icon:i.Monitor,label:"Small Desktop (1024px)"},desktop:{width:"100%",icon:i.Tv,label:"Desktop (Full)"}},kr=({onSave:e,deviceSize:t,onDeviceSizeChange:o})=>{const{actions:r,query:n,canUndo:l,canRedo:c}=i.Pe((d,f)=>({canUndo:f.history.canUndo(),canRedo:f.history.canRedo()})),u=()=>{const d=n.serialize();e==null||e(d),br.success("Page saved successfully")};return a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx(i.TooltipProvider,{children:a.jsx(Gt,{type:"single",value:t,onValueChange:d=>d&&o(d),className:"bg-muted rounded-md p-1",children:Object.entries(Wt).map(([d,{icon:f,label:p}])=>a.jsxs(i.Tooltip,{children:[a.jsx(i.TooltipTrigger,{asChild:!0,children:a.jsx(Yt,{value:d,size:"sm",className:"data-[state=on]:bg-background data-[state=on]:shadow-sm",children:a.jsx(f,{className:"h-4 w-4"})})}),a.jsx(i.TooltipContent,{side:"bottom",children:a.jsx("p",{children:p})})]},d))})}),a.jsx("div",{className:"h-6 w-px bg-border"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(i.Button,{variant:"outline",size:"sm",onClick:()=>r.history.undo(),disabled:!l,children:a.jsx(mo,{className:"h-4 w-4"})}),a.jsx(i.Button,{variant:"outline",size:"sm",onClick:()=>r.history.redo(),disabled:!c,children:a.jsx(co,{className:"h-4 w-4"})}),a.jsxs(i.Button,{size:"sm",onClick:u,children:[a.jsx(uo,{className:"h-4 w-4 mr-2"}),"Save"]})]})]})},Ir=({htmlJson:e="{}"})=>{const{actions:t}=i.Pe();return t.deserialize(e),a.jsx(i.De,{children:a.jsx(i.ke,{id:"mainBody",is:i.Section,canvas:!0})})},$t=({children:e,className:t})=>{const{connectors:{connect:o,drag:r},selected:n}=i.Ne(l=>({selected:l.events.selected}));return a.jsx("div",{ref:l=>{l&&o(r(l))},className:i.clsx("relative min-h-[100vh] bg-white",t||""),children:e})};$t.craft={props:{},displayName:"Body",isCanvas:!0,rules:{canMoveIn:e=>e.every(t=>t.data.displayName!=="Body")}};const Dr=({initialData:e,onSave:t,onStateChange:o})=>{var d;const r=i.useEventData(),[n,l]=m.useState("desktop"),c=((d=Wt[n])==null?void 0:d.width)||"100%",u=f=>{if(o)try{const p=f.serialize();o(p)}catch{}};return a.jsx(i.ut,{resolver:{Body:$t,Wrapper:i.Wrapper,Section:i.Section,Container:i.Container,Text:i.Text,ButtonComponent:i.ButtonComponent,Heading:i.Heading,Image:i.Image,Img:i.Img,Divider:i.Divider,Spacer:i.Spacer,Video:i.Video,Columns:i.Columns,Link:i.Link$1},enabled:!0,onNodesChange:f=>u(f),children:a.jsx(i.DeviceSizeProvider,{value:n,children:a.jsx(i.EventDataProvider,{value:r,children:a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsxs("div",{className:"flex items-center justify-between pb-4 border-b border-border",children:[a.jsx("h2",{className:"text-lg font-semibold",children:"Page Builder"}),a.jsx(kr,{onSave:t,deviceSize:n,onDeviceSizeChange:l})]}),a.jsxs("div",{className:"flex gap-4 mt-4 flex-1 min-h-0",children:[a.jsx(i.Card,{className:"w-56 shrink-0",children:a.jsxs(i.CardContent,{className:"p-4 space-y-6",children:[a.jsx(ho,{}),a.jsx(Ao,{})]})}),a.jsx(i.Card,{className:"flex-1 overflow-hidden bg-muted/30 flex flex-col",children:a.jsx(i.CardContent,{className:"p-4 flex-1 flex justify-center overflow-hidden",children:a.jsx(Fe,{className:"h-full w-full",children:a.jsx("div",{className:"flex justify-center min-h-full",children:a.jsx("div",{className:"bg-white rounded-lg min-h-full p-4 border border-dashed border-border transition-all duration-300 shadow-sm",style:{width:typeof c=="number"?`${c}px`:c,maxWidth:"100%"},children:a.jsx(Ir,{htmlJson:e})})})})})}),a.jsx(i.Card,{className:"w-72 shrink-0 flex flex-col",children:a.jsx(i.CardContent,{className:"p-4 flex-1 overflow-hidden",children:a.jsx(Io,{})})})]})]})})})})};exports.default=Dr;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as O, jsx as l, Fragment as
|
|
1
|
+
import { jsxs as O, jsx as l, Fragment as wt } from "react/jsx-runtime";
|
|
2
2
|
import * as h from "react";
|
|
3
|
-
import m, { useState as Ee, forwardRef as
|
|
4
|
-
import { c as W, P as ye, B as Ie, L as
|
|
3
|
+
import m, { useState as Ee, forwardRef as Lr, isValidElement as We } from "react";
|
|
4
|
+
import { c as W, P as ye, B as Ie, L as xt, F as zr, k as Ce, C as Ae, a as St, H as Ct, T as Et, b as Tt, d as Nt, I as Rt, V as Pt, D as kt, S as It, u as oe, e as Le, f as te, g as ze, h as $, i as ie, j as Or, l as Te, m as Br, n as Fr, o as Hr, p as Vr, q as Oe, r as Gr, s as jr, M as Yr, t as $r, v as Wr, w as Ur, x as Xr, y as Kr, z as qr, A as Jr, E as At, N as Zr, G as Qr, J as eo, K as to, O as ro, W as oo, Q as no, R as ao, U as Ue, X as Xe } from "./index-BKtWyPwY.js";
|
|
5
5
|
import so from "react-dom";
|
|
6
6
|
/**
|
|
7
7
|
* @license lucide-react v0.462.0 - ISC
|
|
@@ -178,7 +178,7 @@ const mo = W("Video", [
|
|
|
178
178
|
{
|
|
179
179
|
name: "Columns",
|
|
180
180
|
icon: Dt,
|
|
181
|
-
element: /* @__PURE__ */ O(Ce, { is:
|
|
181
|
+
element: /* @__PURE__ */ O(Ce, { is: St, canvas: !0, children: [
|
|
182
182
|
/* @__PURE__ */ l(Ce, { is: Ae, canvas: !0 }),
|
|
183
183
|
/* @__PURE__ */ l(Ce, { is: Ae, canvas: !0 })
|
|
184
184
|
] })
|
|
@@ -187,44 +187,44 @@ const mo = W("Video", [
|
|
|
187
187
|
{
|
|
188
188
|
name: "Heading",
|
|
189
189
|
icon: Mt,
|
|
190
|
-
element: /* @__PURE__ */ l(
|
|
190
|
+
element: /* @__PURE__ */ l(Ct, {})
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
name: "Text",
|
|
194
194
|
icon: Bt,
|
|
195
|
-
element: /* @__PURE__ */ l(
|
|
195
|
+
element: /* @__PURE__ */ l(Et, {})
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
name: "Button",
|
|
199
199
|
icon: zt,
|
|
200
|
-
element: /* @__PURE__ */ l(
|
|
200
|
+
element: /* @__PURE__ */ l(Tt, {})
|
|
201
201
|
},
|
|
202
202
|
{
|
|
203
203
|
name: "Link",
|
|
204
|
-
icon:
|
|
205
|
-
element: /* @__PURE__ */ l(
|
|
204
|
+
icon: xt,
|
|
205
|
+
element: /* @__PURE__ */ l(Nt, {})
|
|
206
206
|
}
|
|
207
207
|
], o = [
|
|
208
208
|
{
|
|
209
209
|
name: "Image",
|
|
210
210
|
icon: _t,
|
|
211
|
-
element: /* @__PURE__ */ l(
|
|
211
|
+
element: /* @__PURE__ */ l(Rt, {})
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
name: "Video",
|
|
215
|
-
icon:
|
|
216
|
-
element: /* @__PURE__ */ l(
|
|
215
|
+
icon: zr,
|
|
216
|
+
element: /* @__PURE__ */ l(Pt, {})
|
|
217
217
|
}
|
|
218
218
|
], n = [
|
|
219
219
|
{
|
|
220
220
|
name: "Divider",
|
|
221
221
|
icon: Lt,
|
|
222
|
-
element: /* @__PURE__ */ l(
|
|
222
|
+
element: /* @__PURE__ */ l(kt, {})
|
|
223
223
|
},
|
|
224
224
|
{
|
|
225
225
|
name: "Spacer",
|
|
226
226
|
icon: Ot,
|
|
227
|
-
element: /* @__PURE__ */ l(
|
|
227
|
+
element: /* @__PURE__ */ l(It, {})
|
|
228
228
|
}
|
|
229
229
|
], s = (i, d) => /* @__PURE__ */ O("div", { className: "space-y-2", children: [
|
|
230
230
|
/* @__PURE__ */ l("span", { className: "text-xs text-muted-foreground/70", children: i }),
|
|
@@ -316,7 +316,7 @@ Ht.displayName = et;
|
|
|
316
316
|
var Vt = "ScrollAreaViewport", Gt = h.forwardRef(
|
|
317
317
|
(e, t) => {
|
|
318
318
|
const { __scopeScrollArea: r, children: o, nonce: n, ...s } = e, i = K(Vt, r), d = h.useRef(null), c = oe(t, d, i.onViewportChange);
|
|
319
|
-
return /* @__PURE__ */ O(
|
|
319
|
+
return /* @__PURE__ */ O(wt, { children: [
|
|
320
320
|
/* @__PURE__ */ l(
|
|
321
321
|
"style",
|
|
322
322
|
{
|
|
@@ -470,7 +470,7 @@ var yo = h.forwardRef((e, t) => {
|
|
|
470
470
|
ref: t,
|
|
471
471
|
onThumbPositionChange: () => {
|
|
472
472
|
if (n.viewport && s.current) {
|
|
473
|
-
const g = n.viewport.scrollLeft, a =
|
|
473
|
+
const g = n.viewport.scrollLeft, a = pt(g, d, n.dir);
|
|
474
474
|
s.current.style.transform = `translate3d(${a}px, 0, 0)`;
|
|
475
475
|
}
|
|
476
476
|
},
|
|
@@ -488,7 +488,7 @@ var yo = h.forwardRef((e, t) => {
|
|
|
488
488
|
ref: t,
|
|
489
489
|
onThumbPositionChange: () => {
|
|
490
490
|
if (n.viewport && s.current) {
|
|
491
|
-
const g = n.viewport.scrollTop, a =
|
|
491
|
+
const g = n.viewport.scrollTop, a = pt(g, d);
|
|
492
492
|
s.current.style.transform = `translate3d(0, ${a}px, 0)`;
|
|
493
493
|
}
|
|
494
494
|
},
|
|
@@ -727,7 +727,7 @@ function No(e, t, r, o = "ltr") {
|
|
|
727
727
|
const n = Be(r), s = n / 2, i = t || s, d = n - i, c = r.scrollbar.paddingStart + i, u = r.scrollbar.size - r.scrollbar.paddingEnd - d, f = r.content - r.viewport, p = o === "ltr" ? [0, f] : [f * -1, 0];
|
|
728
728
|
return Kt([c, u], p)(e);
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function pt(e, t, r = "ltr") {
|
|
731
731
|
const o = Be(t), n = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - n, i = t.content - t.viewport, d = s - o, c = r === "ltr" ? [0, i] : [i * -1, 0], u = go(e, c);
|
|
732
732
|
return Kt([0, i], [0, d])(u);
|
|
733
733
|
}
|
|
@@ -757,7 +757,7 @@ function Fe(e, t) {
|
|
|
757
757
|
}
|
|
758
758
|
function be(e, t) {
|
|
759
759
|
const r = ie(t);
|
|
760
|
-
|
|
760
|
+
Or(() => {
|
|
761
761
|
let o = 0;
|
|
762
762
|
if (e) {
|
|
763
763
|
const n = new ResizeObserver(() => {
|
|
@@ -804,7 +804,7 @@ const Io = () => {
|
|
|
804
804
|
isDeletable: ((p = r.nodes[o]) == null ? void 0 : p.id) !== "ROOT"
|
|
805
805
|
}), { selected: n };
|
|
806
806
|
});
|
|
807
|
-
return /* @__PURE__ */ l("div", { className: "h-full flex flex-col", children: e ? /* @__PURE__ */ O(
|
|
807
|
+
return /* @__PURE__ */ l("div", { className: "h-full flex flex-col", children: e ? /* @__PURE__ */ O(wt, { children: [
|
|
808
808
|
/* @__PURE__ */ O("div", { className: "flex items-center justify-between pb-3 border-b border-border mb-3", children: [
|
|
809
809
|
/* @__PURE__ */ O("div", { children: [
|
|
810
810
|
/* @__PURE__ */ l("span", { className: "text-xs text-muted-foreground", children: "Selected" }),
|
|
@@ -843,7 +843,7 @@ const Io = () => {
|
|
|
843
843
|
case "Columns":
|
|
844
844
|
return Dt;
|
|
845
845
|
case "Link":
|
|
846
|
-
return
|
|
846
|
+
return xt;
|
|
847
847
|
default:
|
|
848
848
|
return qe;
|
|
849
849
|
}
|
|
@@ -890,7 +890,7 @@ const Io = () => {
|
|
|
890
890
|
onDrop: H,
|
|
891
891
|
children: [
|
|
892
892
|
!C && /* @__PURE__ */ l(lo, { className: "h-3 w-3 text-muted-foreground/50 cursor-grab active:cursor-grabbing" }),
|
|
893
|
-
v ? /* @__PURE__ */ l("button", { onClick: F, className: "p-0.5 hover:bg-secondary rounded", children: p ? /* @__PURE__ */ l(
|
|
893
|
+
v ? /* @__PURE__ */ l("button", { onClick: F, className: "p-0.5 hover:bg-secondary rounded", children: p ? /* @__PURE__ */ l(Br, { className: "h-3 w-3" }) : /* @__PURE__ */ l(Fr, { className: "h-3 w-3" }) }) : /* @__PURE__ */ l("span", { className: "w-4" }),
|
|
894
894
|
/* @__PURE__ */ l(x, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
|
|
895
895
|
/* @__PURE__ */ l("span", { className: `truncate ${C ? "font-medium" : ""}`, children: C ? "Root" : b })
|
|
896
896
|
]
|
|
@@ -940,7 +940,7 @@ const Io = () => {
|
|
|
940
940
|
] });
|
|
941
941
|
};
|
|
942
942
|
// @__NO_SIDE_EFFECTS__
|
|
943
|
-
function
|
|
943
|
+
function gt(e) {
|
|
944
944
|
const t = /* @__PURE__ */ Mo(e), r = h.forwardRef((o, n) => {
|
|
945
945
|
const { children: s, ...i } = o, d = h.Children.toArray(s), c = d.find(Lo);
|
|
946
946
|
if (c) {
|
|
@@ -957,7 +957,7 @@ function Mo(e) {
|
|
|
957
957
|
const { children: n, ...s } = r;
|
|
958
958
|
if (h.isValidElement(n)) {
|
|
959
959
|
const i = Oo(n), d = zo(s, n.props);
|
|
960
|
-
return n.type !== h.Fragment && (d.ref = o ?
|
|
960
|
+
return n.type !== h.Fragment && (d.ref = o ? Hr(o, i) : i), h.cloneElement(n, d);
|
|
961
961
|
}
|
|
962
962
|
return h.Children.count(n) > 1 ? h.Children.only(null) : null;
|
|
963
963
|
});
|
|
@@ -992,14 +992,14 @@ function Bo(e) {
|
|
|
992
992
|
return /* @__PURE__ */ l(n, { scope: v, itemMap: x, collectionRef: C, children: E });
|
|
993
993
|
};
|
|
994
994
|
i.displayName = t;
|
|
995
|
-
const d = e + "CollectionSlot", c = /* @__PURE__ */
|
|
995
|
+
const d = e + "CollectionSlot", c = /* @__PURE__ */ gt(d), u = m.forwardRef(
|
|
996
996
|
(b, v) => {
|
|
997
997
|
const { scope: E, children: C } = b, x = s(d, E), R = oe(v, x.collectionRef);
|
|
998
998
|
return /* @__PURE__ */ l(c, { ref: R, children: C });
|
|
999
999
|
}
|
|
1000
1000
|
);
|
|
1001
1001
|
u.displayName = d;
|
|
1002
|
-
const f = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */
|
|
1002
|
+
const f = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */ gt(f), a = m.forwardRef(
|
|
1003
1003
|
(b, v) => {
|
|
1004
1004
|
const { scope: E, children: C, ...x } = b, R = m.useRef(null), B = oe(v, R), I = s(f, E);
|
|
1005
1005
|
return m.useEffect(() => (I.itemMap.set(R, { ref: R, ...x }), () => void I.itemMap.delete(R))), /* @__PURE__ */ l(g, { [p]: "", ref: B, children: C });
|
|
@@ -1111,7 +1111,7 @@ var Yo = h.forwardRef((e, t) => {
|
|
|
1111
1111
|
tabStopId: s,
|
|
1112
1112
|
children: i,
|
|
1113
1113
|
...d
|
|
1114
|
-
} = e, c =
|
|
1114
|
+
} = e, c = Vr(), u = s || c, f = jo(or, r), p = f.currentTabStopId === u, g = er(r), { onFocusableItemAdd: a, onFocusableItemRemove: N, currentTabStopId: b } = f;
|
|
1115
1115
|
return h.useEffect(() => {
|
|
1116
1116
|
if (o)
|
|
1117
1117
|
return a(), () => N();
|
|
@@ -1311,13 +1311,13 @@ var [Qo, en] = ir(ce), fr = m.forwardRef(
|
|
|
1311
1311
|
focusable: !i,
|
|
1312
1312
|
active: s,
|
|
1313
1313
|
ref: c,
|
|
1314
|
-
children: /* @__PURE__ */ l(
|
|
1314
|
+
children: /* @__PURE__ */ l(vt, { ...d, ref: t })
|
|
1315
1315
|
}
|
|
1316
|
-
) : /* @__PURE__ */ l(
|
|
1316
|
+
) : /* @__PURE__ */ l(vt, { ...d, ref: t });
|
|
1317
1317
|
}
|
|
1318
1318
|
);
|
|
1319
1319
|
mr.displayName = _e;
|
|
1320
|
-
var
|
|
1320
|
+
var vt = m.forwardRef(
|
|
1321
1321
|
(e, t) => {
|
|
1322
1322
|
const { __scopeToggleGroup: r, value: o, ...n } = e, s = ur(_e, r), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, d = s.type === "single" ? i : void 0;
|
|
1323
1323
|
return /* @__PURE__ */ l(
|
|
@@ -1333,7 +1333,7 @@ var bt = m.forwardRef(
|
|
|
1333
1333
|
);
|
|
1334
1334
|
}
|
|
1335
1335
|
), hr = st, pr = mr;
|
|
1336
|
-
const gr =
|
|
1336
|
+
const gr = Gr(
|
|
1337
1337
|
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
1338
1338
|
{
|
|
1339
1339
|
variants: {
|
|
@@ -1459,7 +1459,7 @@ yn(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-ico
|
|
|
1459
1459
|
function ke(e) {
|
|
1460
1460
|
return e.label !== void 0;
|
|
1461
1461
|
}
|
|
1462
|
-
var wn = 3, xn = "32px", Sn = "16px",
|
|
1462
|
+
var wn = 3, xn = "32px", Sn = "16px", bt = 4e3, Cn = 356, En = 14, Tn = 20, Nn = 200;
|
|
1463
1463
|
function ee(...e) {
|
|
1464
1464
|
return e.filter(Boolean).join(" ");
|
|
1465
1465
|
}
|
|
@@ -1469,26 +1469,26 @@ function Rn(e) {
|
|
|
1469
1469
|
}
|
|
1470
1470
|
var Pn = (e) => {
|
|
1471
1471
|
var t, r, o, n, s, i, d, c, u, f, p;
|
|
1472
|
-
let { invert: g, toast: a, unstyled: N, interacting: b, setHeights: v, visibleToasts: E, heights: C, index: x, toasts: R, expanded: B, removeToast: I, defaultRichColors: F, closeButton: A, style: P, cancelButtonStyle: z, actionButtonStyle: H, className: S = "", descriptionClassName: de = "", duration: G, position: ne, gap: V, loadingIcon: q, expandByDefault: ue, classNames: w, icons: U, closeButtonAriaLabel: He = "Close toast", pauseWhenPageIsHidden: k } = e, [D, _] = m.useState(null), [j, he] = m.useState(null), [L, Ve] = m.useState(!1), [we, Re] = m.useState(!1), [xe, Ge] = m.useState(!1), [
|
|
1472
|
+
let { invert: g, toast: a, unstyled: N, interacting: b, setHeights: v, visibleToasts: E, heights: C, index: x, toasts: R, expanded: B, removeToast: I, defaultRichColors: F, closeButton: A, style: P, cancelButtonStyle: z, actionButtonStyle: H, className: S = "", descriptionClassName: de = "", duration: G, position: ne, gap: V, loadingIcon: q, expandByDefault: ue, classNames: w, icons: U, closeButtonAriaLabel: He = "Close toast", pauseWhenPageIsHidden: k } = e, [D, _] = m.useState(null), [j, he] = m.useState(null), [L, Ve] = m.useState(!1), [we, Re] = m.useState(!1), [xe, Ge] = m.useState(!1), [lt, Sr] = m.useState(!1), [Cr, it] = m.useState(!1), [Er, je] = m.useState(0), [Tr, ct] = m.useState(0), Se = m.useRef(a.duration || G || bt), dt = m.useRef(null), fe = m.useRef(null), Nr = x === 0, Rr = x + 1 <= E, X = a.type, pe = a.dismissible !== !1, Pr = a.className || "", kr = a.descriptionClassName || "", Pe = m.useMemo(() => C.findIndex((y) => y.toastId === a.id) || 0, [C, a.id]), Ir = m.useMemo(() => {
|
|
1473
1473
|
var y;
|
|
1474
1474
|
return (y = a.closeButton) != null ? y : A;
|
|
1475
|
-
}, [a.closeButton, A]),
|
|
1476
|
-
ge.current = m.useMemo(() => Pe * V +
|
|
1477
|
-
Se.current =
|
|
1478
|
-
}, [
|
|
1475
|
+
}, [a.closeButton, A]), ut = m.useMemo(() => a.duration || G || bt, [a.duration, G]), Ye = m.useRef(0), ge = m.useRef(0), ft = m.useRef(0), ve = m.useRef(null), [Ar, Dr] = ne.split("-"), mt = m.useMemo(() => C.reduce((y, T, M) => M >= Pe ? y : y + T.height, 0), [C, Pe]), ht = un(), Mr = a.invert || g, $e = X === "loading";
|
|
1476
|
+
ge.current = m.useMemo(() => Pe * V + mt, [Pe, mt]), m.useEffect(() => {
|
|
1477
|
+
Se.current = ut;
|
|
1478
|
+
}, [ut]), m.useEffect(() => {
|
|
1479
1479
|
Ve(!0);
|
|
1480
1480
|
}, []), m.useEffect(() => {
|
|
1481
1481
|
let y = fe.current;
|
|
1482
1482
|
if (y) {
|
|
1483
1483
|
let T = y.getBoundingClientRect().height;
|
|
1484
|
-
return
|
|
1484
|
+
return ct(T), v((M) => [{ toastId: a.id, height: T, position: a.position }, ...M]), () => v((M) => M.filter((J) => J.toastId !== a.id));
|
|
1485
1485
|
}
|
|
1486
1486
|
}, [v, a.id]), m.useLayoutEffect(() => {
|
|
1487
1487
|
if (!L) return;
|
|
1488
1488
|
let y = fe.current, T = y.style.height;
|
|
1489
1489
|
y.style.height = "auto";
|
|
1490
1490
|
let M = y.getBoundingClientRect().height;
|
|
1491
|
-
y.style.height = T,
|
|
1491
|
+
y.style.height = T, ct(M), v((J) => J.find((Z) => Z.toastId === a.id) ? J.map((Z) => Z.toastId === a.id ? { ...Z, height: M } : Z) : [{ toastId: a.id, height: M, position: a.position }, ...J]);
|
|
1492
1492
|
}, [L, a.title, a.description, v, a.id]);
|
|
1493
1493
|
let ae = m.useCallback(() => {
|
|
1494
1494
|
Re(!0), je(ge.current), v((y) => y.filter((T) => T.toastId !== a.id)), setTimeout(() => {
|
|
@@ -1498,34 +1498,34 @@ var Pn = (e) => {
|
|
|
1498
1498
|
m.useEffect(() => {
|
|
1499
1499
|
if (a.promise && X === "loading" || a.duration === 1 / 0 || a.type === "loading") return;
|
|
1500
1500
|
let y;
|
|
1501
|
-
return B || b || k &&
|
|
1502
|
-
if (
|
|
1501
|
+
return B || b || k && ht ? (() => {
|
|
1502
|
+
if (ft.current < Ye.current) {
|
|
1503
1503
|
let T = (/* @__PURE__ */ new Date()).getTime() - Ye.current;
|
|
1504
1504
|
Se.current = Se.current - T;
|
|
1505
1505
|
}
|
|
1506
|
-
|
|
1506
|
+
ft.current = (/* @__PURE__ */ new Date()).getTime();
|
|
1507
1507
|
})() : Se.current !== 1 / 0 && (Ye.current = (/* @__PURE__ */ new Date()).getTime(), y = setTimeout(() => {
|
|
1508
1508
|
var T;
|
|
1509
1509
|
(T = a.onAutoClose) == null || T.call(a, a), ae();
|
|
1510
1510
|
}, Se.current)), () => clearTimeout(y);
|
|
1511
|
-
}, [B, b, a, X, k,
|
|
1511
|
+
}, [B, b, a, X, k, ht, ae]), m.useEffect(() => {
|
|
1512
1512
|
a.delete && ae();
|
|
1513
1513
|
}, [ae, a.delete]);
|
|
1514
|
-
function
|
|
1514
|
+
function _r() {
|
|
1515
1515
|
var y, T, M;
|
|
1516
1516
|
return U != null && U.loading ? m.createElement("div", { className: ee(w == null ? void 0 : w.loader, (y = a == null ? void 0 : a.classNames) == null ? void 0 : y.loader, "sonner-loader"), "data-visible": X === "loading" }, U.loading) : q ? m.createElement("div", { className: ee(w == null ? void 0 : w.loader, (T = a == null ? void 0 : a.classNames) == null ? void 0 : T.loader, "sonner-loader"), "data-visible": X === "loading" }, q) : m.createElement(nn, { className: ee(w == null ? void 0 : w.loader, (M = a == null ? void 0 : a.classNames) == null ? void 0 : M.loader), visible: X === "loading" });
|
|
1517
1517
|
}
|
|
1518
|
-
return m.createElement("li", { tabIndex: 0, ref: fe, className: ee(S,
|
|
1518
|
+
return m.createElement("li", { tabIndex: 0, ref: fe, className: ee(S, Pr, w == null ? void 0 : w.toast, (t = a == null ? void 0 : a.classNames) == null ? void 0 : t.toast, w == null ? void 0 : w.default, w == null ? void 0 : w[X], (r = a == null ? void 0 : a.classNames) == null ? void 0 : r[X]), "data-sonner-toast": "", "data-rich-colors": (o = a.richColors) != null ? o : F, "data-styled": !(a.jsx || a.unstyled || N), "data-mounted": L, "data-promise": !!a.promise, "data-swiped": Cr, "data-removed": we, "data-visible": Rr, "data-y-position": Ar, "data-x-position": Dr, "data-index": x, "data-front": Nr, "data-swiping": xe, "data-dismissible": pe, "data-type": X, "data-invert": Mr, "data-swipe-out": lt, "data-swipe-direction": j, "data-expanded": !!(B || ue && L), style: { "--index": x, "--toasts-before": x, "--z-index": R.length - x, "--offset": `${we ? Er : ge.current}px`, "--initial-height": ue ? "auto" : `${Tr}px`, ...P, ...a.style }, onDragEnd: () => {
|
|
1519
1519
|
Ge(!1), _(null), ve.current = null;
|
|
1520
1520
|
}, onPointerDown: (y) => {
|
|
1521
|
-
$e || !pe || (
|
|
1521
|
+
$e || !pe || (dt.current = /* @__PURE__ */ new Date(), je(ge.current), y.target.setPointerCapture(y.pointerId), y.target.tagName !== "BUTTON" && (Ge(!0), ve.current = { x: y.clientX, y: y.clientY }));
|
|
1522
1522
|
}, onPointerUp: () => {
|
|
1523
1523
|
var y, T, M, J;
|
|
1524
|
-
if (
|
|
1524
|
+
if (lt || !pe) return;
|
|
1525
1525
|
ve.current = null;
|
|
1526
|
-
let Z = Number(((y = fe.current) == null ? void 0 : y.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), se = Number(((T = fe.current) == null ? void 0 : T.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), me = (/* @__PURE__ */ new Date()).getTime() - ((M =
|
|
1526
|
+
let Z = Number(((y = fe.current) == null ? void 0 : y.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), se = Number(((T = fe.current) == null ? void 0 : T.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), me = (/* @__PURE__ */ new Date()).getTime() - ((M = dt.current) == null ? void 0 : M.getTime()), Q = D === "x" ? Z : se, le = Math.abs(Q) / me;
|
|
1527
1527
|
if (Math.abs(Q) >= Tn || le > 0.11) {
|
|
1528
|
-
je(ge.current), (J = a.onDismiss) == null || J.call(a, a), he(D === "x" ? Z > 0 ? "right" : "left" : se > 0 ? "down" : "up"), ae(),
|
|
1528
|
+
je(ge.current), (J = a.onDismiss) == null || J.call(a, a), he(D === "x" ? Z > 0 ? "right" : "left" : se > 0 ? "down" : "up"), ae(), Sr(!0), it(!1);
|
|
1529
1529
|
return;
|
|
1530
1530
|
}
|
|
1531
1531
|
Ge(!1), _(null);
|
|
@@ -1535,12 +1535,12 @@ var Pn = (e) => {
|
|
|
1535
1535
|
let se = y.clientY - ve.current.y, me = y.clientX - ve.current.x, Q = (M = e.swipeDirections) != null ? M : Rn(ne);
|
|
1536
1536
|
!D && (Math.abs(me) > 1 || Math.abs(se) > 1) && _(Math.abs(me) > Math.abs(se) ? "x" : "y");
|
|
1537
1537
|
let le = { x: 0, y: 0 };
|
|
1538
|
-
D === "y" ? (Q.includes("top") || Q.includes("bottom")) && (Q.includes("top") && se < 0 || Q.includes("bottom") && se > 0) && (le.y = se) : D === "x" && (Q.includes("left") || Q.includes("right")) && (Q.includes("left") && me < 0 || Q.includes("right") && me > 0) && (le.x = me), (Math.abs(le.x) > 0 || Math.abs(le.y) > 0) &&
|
|
1539
|
-
} },
|
|
1538
|
+
D === "y" ? (Q.includes("top") || Q.includes("bottom")) && (Q.includes("top") && se < 0 || Q.includes("bottom") && se > 0) && (le.y = se) : D === "x" && (Q.includes("left") || Q.includes("right")) && (Q.includes("left") && me < 0 || Q.includes("right") && me > 0) && (le.x = me), (Math.abs(le.x) > 0 || Math.abs(le.y) > 0) && it(!0), (J = fe.current) == null || J.style.setProperty("--swipe-amount-x", `${le.x}px`), (Z = fe.current) == null || Z.style.setProperty("--swipe-amount-y", `${le.y}px`);
|
|
1539
|
+
} }, Ir && !a.jsx ? m.createElement("button", { "aria-label": He, "data-disabled": $e, "data-close-button": !0, onClick: $e || !pe ? () => {
|
|
1540
1540
|
} : () => {
|
|
1541
1541
|
var y;
|
|
1542
1542
|
ae(), (y = a.onDismiss) == null || y.call(a, a);
|
|
1543
|
-
}, className: ee(w == null ? void 0 : w.closeButton, (n = a == null ? void 0 : a.classNames) == null ? void 0 : n.closeButton) }, (s = U == null ? void 0 : U.close) != null ? s : dn) : null, a.jsx || We(a.title) ? a.jsx ? a.jsx : typeof a.title == "function" ? a.title() : a.title : m.createElement(m.Fragment, null, X || a.icon || a.promise ? m.createElement("div", { "data-icon": "", className: ee(w == null ? void 0 : w.icon, (i = a == null ? void 0 : a.classNames) == null ? void 0 : i.icon) }, a.promise || a.type === "loading" && !a.icon ? a.icon ||
|
|
1543
|
+
}, className: ee(w == null ? void 0 : w.closeButton, (n = a == null ? void 0 : a.classNames) == null ? void 0 : n.closeButton) }, (s = U == null ? void 0 : U.close) != null ? s : dn) : null, a.jsx || We(a.title) ? a.jsx ? a.jsx : typeof a.title == "function" ? a.title() : a.title : m.createElement(m.Fragment, null, X || a.icon || a.promise ? m.createElement("div", { "data-icon": "", className: ee(w == null ? void 0 : w.icon, (i = a == null ? void 0 : a.classNames) == null ? void 0 : i.icon) }, a.promise || a.type === "loading" && !a.icon ? a.icon || _r() : null, a.type !== "loading" ? a.icon || (U == null ? void 0 : U[X]) || rn(X) : null) : null, m.createElement("div", { "data-content": "", className: ee(w == null ? void 0 : w.content, (d = a == null ? void 0 : a.classNames) == null ? void 0 : d.content) }, m.createElement("div", { "data-title": "", className: ee(w == null ? void 0 : w.title, (c = a == null ? void 0 : a.classNames) == null ? void 0 : c.title) }, typeof a.title == "function" ? a.title() : a.title), a.description ? m.createElement("div", { "data-description": "", className: ee(de, kr, w == null ? void 0 : w.description, (u = a == null ? void 0 : a.classNames) == null ? void 0 : u.description) }, typeof a.description == "function" ? a.description() : a.description) : null), We(a.cancel) ? a.cancel : a.cancel && ke(a.cancel) ? m.createElement("button", { "data-button": !0, "data-cancel": !0, style: a.cancelButtonStyle || z, onClick: (y) => {
|
|
1544
1544
|
var T, M;
|
|
1545
1545
|
ke(a.cancel) && pe && ((M = (T = a.cancel).onClick) == null || M.call(T, y), ae());
|
|
1546
1546
|
}, className: ee(w == null ? void 0 : w.cancelButton, (f = a == null ? void 0 : a.classNames) == null ? void 0 : f.cancelButton) }, a.cancel.label) : null, We(a.action) ? a.action : a.action && ke(a.action) ? m.createElement("button", { "data-button": !0, "data-action": !0, style: a.actionButtonStyle || H, onClick: (y) => {
|
|
@@ -1548,7 +1548,7 @@ var Pn = (e) => {
|
|
|
1548
1548
|
ke(a.action) && ((M = (T = a.action).onClick) == null || M.call(T, y), !y.defaultPrevented && ae());
|
|
1549
1549
|
}, className: ee(w == null ? void 0 : w.actionButton, (p = a == null ? void 0 : a.classNames) == null ? void 0 : p.actionButton) }, a.action.label) : null));
|
|
1550
1550
|
};
|
|
1551
|
-
function
|
|
1551
|
+
function yt() {
|
|
1552
1552
|
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
1553
1553
|
let e = document.documentElement.getAttribute("dir");
|
|
1554
1554
|
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
|
@@ -1567,8 +1567,8 @@ function kn(e, t) {
|
|
|
1567
1567
|
}) : c(d);
|
|
1568
1568
|
}), r;
|
|
1569
1569
|
}
|
|
1570
|
-
|
|
1571
|
-
let { invert: r, position: o = "bottom-right", hotkey: n = ["altKey", "KeyT"], expand: s, closeButton: i, className: d, offset: c, mobileOffset: u, theme: f = "light", richColors: p, duration: g, style: a, visibleToasts: N = wn, toastOptions: b, dir: v =
|
|
1570
|
+
Lr(function(e, t) {
|
|
1571
|
+
let { invert: r, position: o = "bottom-right", hotkey: n = ["altKey", "KeyT"], expand: s, closeButton: i, className: d, offset: c, mobileOffset: u, theme: f = "light", richColors: p, duration: g, style: a, visibleToasts: N = wn, toastOptions: b, dir: v = yt(), gap: E = En, loadingIcon: C, icons: x, containerAriaLabel: R = "Notifications", pauseWhenPageIsHidden: B } = e, [I, F] = m.useState([]), A = m.useMemo(() => Array.from(new Set([o].concat(I.filter((k) => k.position).map((k) => k.position)))), [I, o]), [P, z] = m.useState([]), [H, S] = m.useState(!1), [de, G] = m.useState(!1), [ne, V] = m.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), q = m.useRef(null), ue = n.join("+").replace(/Key/g, "").replace(/Digit/g, ""), w = m.useRef(null), U = m.useRef(!1), He = m.useCallback((k) => {
|
|
1572
1572
|
F((D) => {
|
|
1573
1573
|
var _;
|
|
1574
1574
|
return (_ = D.find((j) => j.id === k.id)) != null && _.delete || Y.dismiss(k.id), D.filter(({ id: j }) => j !== k.id);
|
|
@@ -1622,7 +1622,7 @@ _r(function(e, t) {
|
|
|
1622
1622
|
}, [q.current]), m.createElement("section", { ref: t, "aria-label": `${R} ${ue}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, A.map((k, D) => {
|
|
1623
1623
|
var _;
|
|
1624
1624
|
let [j, he] = k.split("-");
|
|
1625
|
-
return I.length ? m.createElement("ol", { key: k, dir: v === "auto" ?
|
|
1625
|
+
return I.length ? m.createElement("ol", { key: k, dir: v === "auto" ? yt() : v, tabIndex: -1, ref: q, className: d, "data-sonner-toaster": !0, "data-theme": ne, "data-y-position": j, "data-lifted": H && I.length > 1 && !s, "data-x-position": he, style: { "--front-toast-height": `${((_ = P[0]) == null ? void 0 : _.height) || 0}px`, "--width": `${Cn}px`, "--gap": `${E}px`, ...a, ...kn(c, u) }, onBlur: (L) => {
|
|
1626
1626
|
U.current && !L.currentTarget.contains(L.relatedTarget) && (U.current = !1, w.current && (w.current.focus({ preventScroll: !0 }), w.current = null));
|
|
1627
1627
|
}, onFocus: (L) => {
|
|
1628
1628
|
L.target instanceof HTMLElement && L.target.dataset.dismissible === "false" || U.current || (U.current = !0, w.current = L.relatedTarget);
|
|
@@ -1637,10 +1637,10 @@ _r(function(e, t) {
|
|
|
1637
1637
|
}));
|
|
1638
1638
|
});
|
|
1639
1639
|
const wr = {
|
|
1640
|
-
mobile: { width: 375, icon:
|
|
1641
|
-
tablet: { width: 768, icon:
|
|
1642
|
-
small: { width: 1024, icon:
|
|
1643
|
-
desktop: { width: "100%", icon:
|
|
1640
|
+
mobile: { width: 375, icon: Wr, label: "Mobile (375px)" },
|
|
1641
|
+
tablet: { width: 768, icon: $r, label: "Tablet (768px)" },
|
|
1642
|
+
small: { width: 1024, icon: Yr, label: "Small Desktop (1024px)" },
|
|
1643
|
+
desktop: { width: "100%", icon: jr, label: "Desktop (Full)" }
|
|
1644
1644
|
}, In = ({ onSave: e, deviceSize: t, onDeviceSizeChange: r }) => {
|
|
1645
1645
|
const { actions: o, query: n, canUndo: s, canRedo: i } = ye((c, u) => ({
|
|
1646
1646
|
canUndo: u.history.canUndo(),
|
|
@@ -1650,15 +1650,15 @@ const wr = {
|
|
|
1650
1650
|
e == null || e(c), bn.success("Page saved successfully");
|
|
1651
1651
|
};
|
|
1652
1652
|
return /* @__PURE__ */ O("div", { className: "flex items-center gap-4", children: [
|
|
1653
|
-
/* @__PURE__ */ l(
|
|
1653
|
+
/* @__PURE__ */ l(Ur, { children: /* @__PURE__ */ l(
|
|
1654
1654
|
br,
|
|
1655
1655
|
{
|
|
1656
1656
|
type: "single",
|
|
1657
1657
|
value: t,
|
|
1658
1658
|
onValueChange: (c) => c && r(c),
|
|
1659
1659
|
className: "bg-muted rounded-md p-1",
|
|
1660
|
-
children: Object.entries(wr).map(([c, { icon: u, label: f }]) => /* @__PURE__ */ O(
|
|
1661
|
-
/* @__PURE__ */ l(
|
|
1660
|
+
children: Object.entries(wr).map(([c, { icon: u, label: f }]) => /* @__PURE__ */ O(Xr, { children: [
|
|
1661
|
+
/* @__PURE__ */ l(Kr, { asChild: !0, children: /* @__PURE__ */ l(
|
|
1662
1662
|
yr,
|
|
1663
1663
|
{
|
|
1664
1664
|
value: c,
|
|
@@ -1667,7 +1667,7 @@ const wr = {
|
|
|
1667
1667
|
children: /* @__PURE__ */ l(u, { className: "h-4 w-4" })
|
|
1668
1668
|
}
|
|
1669
1669
|
) }),
|
|
1670
|
-
/* @__PURE__ */ l(
|
|
1670
|
+
/* @__PURE__ */ l(qr, { side: "bottom", children: /* @__PURE__ */ l("p", { children: f }) })
|
|
1671
1671
|
] }, c))
|
|
1672
1672
|
}
|
|
1673
1673
|
) }),
|
|
@@ -1699,11 +1699,14 @@ const wr = {
|
|
|
1699
1699
|
] })
|
|
1700
1700
|
] })
|
|
1701
1701
|
] });
|
|
1702
|
-
},
|
|
1702
|
+
}, An = ({ htmlJson: e = "{}" }) => {
|
|
1703
|
+
const { actions: t } = ye();
|
|
1704
|
+
return t.deserialize(e), /* @__PURE__ */ l(Jr, { children: /* @__PURE__ */ l(Ce, { id: "mainBody", is: At, canvas: !0 }) });
|
|
1705
|
+
}, xr = ({ children: e, className: t }) => {
|
|
1703
1706
|
const {
|
|
1704
1707
|
connectors: { connect: r, drag: o },
|
|
1705
1708
|
selected: n
|
|
1706
|
-
} =
|
|
1709
|
+
} = Zr((s) => ({
|
|
1707
1710
|
selected: s.events.selected
|
|
1708
1711
|
}));
|
|
1709
1712
|
return /* @__PURE__ */ l(
|
|
@@ -1712,12 +1715,12 @@ const wr = {
|
|
|
1712
1715
|
ref: (s) => {
|
|
1713
1716
|
s && r(o(s));
|
|
1714
1717
|
},
|
|
1715
|
-
className:
|
|
1718
|
+
className: Qr("relative min-h-[100vh] bg-white", t || ""),
|
|
1716
1719
|
children: e
|
|
1717
1720
|
}
|
|
1718
1721
|
);
|
|
1719
1722
|
};
|
|
1720
|
-
|
|
1723
|
+
xr.craft = {
|
|
1721
1724
|
props: {},
|
|
1722
1725
|
displayName: "Body",
|
|
1723
1726
|
isCanvas: !0,
|
|
@@ -1727,12 +1730,9 @@ lt.craft = {
|
|
|
1727
1730
|
)
|
|
1728
1731
|
}
|
|
1729
1732
|
};
|
|
1730
|
-
const
|
|
1731
|
-
const { actions: t } = ye();
|
|
1732
|
-
return t.deserialize(e), /* @__PURE__ */ l(Zr, { children: /* @__PURE__ */ l(Ce, { id: "mainBody", is: lt, canvas: !0 }) });
|
|
1733
|
-
}, zn = ({ initialData: e, onSave: t, onStateChange: r }) => {
|
|
1733
|
+
const zn = ({ initialData: e, onSave: t, onStateChange: r }) => {
|
|
1734
1734
|
var c;
|
|
1735
|
-
const o =
|
|
1735
|
+
const o = eo(), [n, s] = Ee("desktop"), i = ((c = wr[n]) == null ? void 0 : c.width) || "100%", d = (u) => {
|
|
1736
1736
|
if (r)
|
|
1737
1737
|
try {
|
|
1738
1738
|
const f = u.serialize();
|
|
@@ -1741,23 +1741,23 @@ const An = ({ htmlJson: e = "{}" }) => {
|
|
|
1741
1741
|
}
|
|
1742
1742
|
};
|
|
1743
1743
|
return /* @__PURE__ */ l(
|
|
1744
|
-
|
|
1744
|
+
to,
|
|
1745
1745
|
{
|
|
1746
1746
|
resolver: {
|
|
1747
|
-
Body:
|
|
1747
|
+
Body: xr,
|
|
1748
1748
|
Wrapper: oo,
|
|
1749
|
-
Section:
|
|
1749
|
+
Section: At,
|
|
1750
1750
|
Container: Ae,
|
|
1751
|
-
Text:
|
|
1752
|
-
ButtonComponent:
|
|
1753
|
-
Heading:
|
|
1754
|
-
Image:
|
|
1755
|
-
Img:
|
|
1756
|
-
Divider:
|
|
1757
|
-
Spacer:
|
|
1758
|
-
Video:
|
|
1759
|
-
Columns:
|
|
1760
|
-
Link:
|
|
1751
|
+
Text: Et,
|
|
1752
|
+
ButtonComponent: Tt,
|
|
1753
|
+
Heading: Ct,
|
|
1754
|
+
Image: Rt,
|
|
1755
|
+
Img: ro,
|
|
1756
|
+
Divider: kt,
|
|
1757
|
+
Spacer: It,
|
|
1758
|
+
Video: Pt,
|
|
1759
|
+
Columns: St,
|
|
1760
|
+
Link: Nt
|
|
1761
1761
|
},
|
|
1762
1762
|
enabled: !0,
|
|
1763
1763
|
onNodesChange: (u) => d(u),
|
|
@@ -2303,7 +2303,7 @@ ef.displayName = "CardFooter";
|
|
|
2303
2303
|
function en({ className: t, ...e }) {
|
|
2304
2304
|
return /* @__PURE__ */ h("div", { className: we("animate-pulse rounded-md bg-muted", t), ...e });
|
|
2305
2305
|
}
|
|
2306
|
-
const Js = Ur(null), Ks = ({ children: t, value: e }) => /* @__PURE__ */ h(Js.Provider, { value: e, children: t }), Kn = () => _t(Js), tf = d0(() => import("./CraftEditor-
|
|
2306
|
+
const Js = Ur(null), Ks = ({ children: t, value: e }) => /* @__PURE__ */ h(Js.Provider, { value: e, children: t }), Kn = () => _t(Js), tf = d0(() => import("./CraftEditor-w53hSE-U.js")), U4 = ({ initialData: t, onSave: e, onStateChange: r, eventData: n }) => /* @__PURE__ */ h(Ks, { value: n, children: /* @__PURE__ */ h(
|
|
2307
2307
|
f0,
|
|
2308
2308
|
{
|
|
2309
2309
|
fallback: /* @__PURE__ */ h(Xs, { children: /* @__PURE__ */ h(Ys, { className: "p-4", children: /* @__PURE__ */ P("div", { className: "space-y-4", children: [
|
|
@@ -15804,21 +15804,21 @@ const Wi = {
|
|
|
15804
15804
|
}), f8 = ({ children: t, fetchVideoByLocation: e }) => /* @__PURE__ */ h(a0.Provider, { value: { fetchVideoByLocation: e }, children: t }), p8 = () => _t(a0);
|
|
15805
15805
|
export {
|
|
15806
15806
|
p8 as $,
|
|
15807
|
-
|
|
15807
|
+
uv as A,
|
|
15808
15808
|
Cn as B,
|
|
15809
15809
|
xa as C,
|
|
15810
15810
|
Vd as D,
|
|
15811
|
-
|
|
15811
|
+
u0 as E,
|
|
15812
15812
|
cf as F,
|
|
15813
|
-
|
|
15813
|
+
Qt as G,
|
|
15814
15814
|
zd as H,
|
|
15815
15815
|
Ud as I,
|
|
15816
|
-
|
|
15817
|
-
|
|
15816
|
+
Kn as J,
|
|
15817
|
+
yv as K,
|
|
15818
15818
|
ff as L,
|
|
15819
15819
|
tl as M,
|
|
15820
15820
|
ne as N,
|
|
15821
|
-
|
|
15821
|
+
i0 as O,
|
|
15822
15822
|
ql as P,
|
|
15823
15823
|
vv as Q,
|
|
15824
15824
|
Ks as R,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const h=require("react/jsx-runtime"),j=require("react"),Ks=require("react-dom"),l0=require("@tanstack/react-query");function Zs(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const x=Zs(j),Qs=Zs(Ks);function el(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=el(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Tt(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=el(t))&&(n&&(n+=" "),n+=e);return n}const Lu="-",c0=t=>{const e=f0(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{const a=o.split(Lu);return a[0]===""&&a.length!==1&&a.shift(),tl(a,e)||d0(o)},getConflictingClassGroupIds:(o,a)=>{const s=r[o]||[];return a&&n[o]?[...s,...n[o]]:s}}},tl=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),i=n?tl(t.slice(1),n):void 0;if(i)return i;if(e.validators.length===0)return;const u=t.join(Lu);return(o=e.validators.find(({validator:a})=>a(u)))==null?void 0:o.classGroupId},oa=/^\[(.+)\]$/,d0=t=>{if(oa.test(t)){const e=oa.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},f0=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return h0(Object.entries(t.classGroups),r).forEach(([u,o])=>{Vi(o,n,u,e)}),n},Vi=(t,e,r,n)=>{t.forEach(i=>{if(typeof i=="string"){const u=i===""?e:aa(e,i);u.classGroupId=r;return}if(typeof i=="function"){if(p0(i)){Vi(i(n),e,r,n);return}e.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([u,o])=>{Vi(o,aa(e,u),r,n)})})},aa=(t,e)=>{let r=t;return e.split(Lu).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},p0=t=>t.isThemeGetter,h0=(t,e)=>e?t.map(([r,n])=>{const i=n.map(u=>typeof u=="string"?e+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([o,a])=>[e+o,a])):u);return[r,i]}):t,b0=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const i=(u,o)=>{r.set(u,o),e++,e>t&&(e=0,n=r,r=new Map)};return{get(u){let o=r.get(u);if(o!==void 0)return o;if((o=n.get(u))!==void 0)return i(u,o),o},set(u,o){r.has(u)?r.set(u,o):i(u,o)}}},rl="!",g0=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,i=e[0],u=e.length,o=a=>{const s=[];let l=0,c=0,p;for(let b=0;b<a.length;b++){let y=a[b];if(l===0){if(y===i&&(n||a.slice(b,b+u)===e)){s.push(a.slice(c,b)),c=b+u;continue}if(y==="/"){p=b;continue}}y==="["?l++:y==="]"&&l--}const d=s.length===0?a:a.substring(c),f=d.startsWith(rl),g=f?d.substring(1):d,m=p&&p>c?p-c:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:m}};return r?a=>r({className:a,parseClassName:o}):o},m0=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},y0=t=>({cache:b0(t.cacheSize),parseClassName:g0(t),...c0(t)}),v0=/\s+/,x0=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=e,u=[],o=t.trim().split(v0);let a="";for(let s=o.length-1;s>=0;s-=1){const l=o[s],{modifiers:c,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}=r(l);let g=!!f,m=n(g?d.substring(0,f):d);if(!m){if(!g){a=l+(a.length>0?" "+a:a);continue}if(m=n(d),!m){a=l+(a.length>0?" "+a:a);continue}g=!1}const b=m0(c).join(":"),y=p?b+rl:b,v=y+m;if(u.includes(v))continue;u.push(v);const C=i(m,g);for(let S=0;S<C.length;++S){const N=C[S];u.push(y+N)}a=l+(a.length>0?" "+a:a)}return a};function w0(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=nl(e))&&(n&&(n+=" "),n+=r);return n}const nl=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=nl(t[n]))&&(r&&(r+=" "),r+=e);return r};function E0(t,...e){let r,n,i,u=o;function o(s){const l=e.reduce((c,p)=>p(c),t());return r=y0(l),n=r.cache.get,i=r.cache.set,u=a,a(s)}function a(s){const l=n(s);if(l)return l;const c=x0(s,r);return i(s,c),c}return function(){return u(w0.apply(null,arguments))}}const Q=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},il=/^\[(?:([a-z-]+):)?(.+)\]$/i,S0=/^\d+\/\d+$/,C0=new Set(["px","full","screen"]),T0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,A0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,N0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,O0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,j0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ze=t=>Dt(t)||C0.has(t)||S0.test(t),it=t=>Zt(t,"length",M0),Dt=t=>!!t&&!Number.isNaN(Number(t)),Ai=t=>Zt(t,"number",Dt),dr=t=>!!t&&Number.isInteger(Number(t)),_0=t=>t.endsWith("%")&&Dt(t.slice(0,-1)),q=t=>il.test(t),ut=t=>T0.test(t),P0=new Set(["length","size","percentage"]),k0=t=>Zt(t,P0,ul),R0=t=>Zt(t,"position",ul),I0=new Set(["image","url"]),D0=t=>Zt(t,I0,B0),L0=t=>Zt(t,"",$0),fr=()=>!0,Zt=(t,e,r)=>{const n=il.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},M0=t=>A0.test(t)&&!N0.test(t),ul=()=>!1,$0=t=>O0.test(t),B0=t=>j0.test(t),q0=()=>{const t=Q("colors"),e=Q("spacing"),r=Q("blur"),n=Q("brightness"),i=Q("borderColor"),u=Q("borderRadius"),o=Q("borderSpacing"),a=Q("borderWidth"),s=Q("contrast"),l=Q("grayscale"),c=Q("hueRotate"),p=Q("invert"),d=Q("gap"),f=Q("gradientColorStops"),g=Q("gradientColorStopPositions"),m=Q("inset"),b=Q("margin"),y=Q("opacity"),v=Q("padding"),C=Q("saturate"),S=Q("scale"),N=Q("sepia"),k=Q("skew"),R=Q("space"),D=Q("translate"),$=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",q,e],T=()=>[q,e],_=()=>["",ze,it],I=()=>["auto",Dt,q],w=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",q],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],le=()=>[Dt,q];return{cacheSize:500,separator:":",theme:{colors:[fr],spacing:[ze,it],blur:["none","",ut,q],brightness:le(),borderColor:[t],borderRadius:["none","","full",ut,q],borderSpacing:T(),borderWidth:_(),contrast:le(),grayscale:B(),hueRotate:le(),invert:B(),gap:T(),gradientColorStops:[t],gradientColorStopPositions:[_0,it],inset:E(),margin:E(),opacity:le(),padding:T(),saturate:le(),scale:le(),sepia:B(),skew:le(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",q]}],container:["container"],columns:[{columns:[ut]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...w(),q]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",dr,q]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",q]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",dr,q]}],"grid-cols":[{"grid-cols":[fr]}],"col-start-end":[{col:["auto",{span:["full",dr,q]},q]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[fr]}],"row-start-end":[{row:["auto",{span:[dr,q]},q]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",q]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",q,e]}],"min-w":[{"min-w":[q,e,"min","max","fit"]}],"max-w":[{"max-w":[q,e,"none","full","min","max","fit","prose",{screen:[ut]},ut]}],h:[{h:[q,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[q,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[q,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[q,e,"auto","min","max","fit"]}],"font-size":[{text:["base",ut,it]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ai]}],"font-family":[{font:[fr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",q]}],"line-clamp":[{"line-clamp":["none",Dt,Ai]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ze,q]}],"list-image":[{"list-image":["none",q]}],"list-style-type":[{list:["none","disc","decimal",q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ze,it]}],"underline-offset":[{"underline-offset":["auto",ze,q]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...w(),R0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",k0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},D0]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:O()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[ze,q]}],"outline-w":[{outline:[ze,it]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[ze,it]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",ut,L0]}],"shadow-color":[{shadow:[fr]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",ut,q]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[p]}],saturate:[{saturate:[C]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",q]}],duration:[{duration:le()}],ease:[{ease:["linear","in","out","in-out",q]}],delay:[{delay:le()}],animate:[{animate:["none","spin","ping","pulse","bounce",q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[dr,q]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",q]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",q]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",q]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ze,it,Ai]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},ol=E0(q0);function ge(...t){return ol(Tt(t))}const Mu=x.forwardRef(({className:t,...e},r)=>h.jsx("div",{ref:r,className:ge("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));Mu.displayName="Card";const H0=x.forwardRef(({className:t,...e},r)=>h.jsx("div",{ref:r,className:ge("flex flex-col space-y-1.5 p-6",t),...e}));H0.displayName="CardHeader";const F0=x.forwardRef(({className:t,...e},r)=>h.jsx("h3",{ref:r,className:ge("text-2xl font-semibold leading-none tracking-tight",t),...e}));F0.displayName="CardTitle";const z0=x.forwardRef(({className:t,...e},r)=>h.jsx("p",{ref:r,className:ge("text-sm text-muted-foreground",t),...e}));z0.displayName="CardDescription";const $u=x.forwardRef(({className:t,...e},r)=>h.jsx("div",{ref:r,className:ge("p-6 pt-0",t),...e}));$u.displayName="CardContent";const U0=x.forwardRef(({className:t,...e},r)=>h.jsx("div",{ref:r,className:ge("flex items-center p-6 pt-0",t),...e}));U0.displayName="CardFooter";function Jr({className:t,...e}){return h.jsx("div",{className:ge("animate-pulse rounded-md bg-muted",t),...e})}const al=j.createContext(null),Bu=({children:t,value:e})=>h.jsx(al.Provider,{value:e,children:t}),Br=()=>j.useContext(al),V0=j.lazy(()=>Promise.resolve().then(()=>require("./CraftEditor-ws3IIYFu.cjs"))),W0=({initialData:t,onSave:e,onStateChange:r,eventData:n})=>h.jsx(Bu,{value:n,children:h.jsx(j.Suspense,{fallback:h.jsx(Mu,{children:h.jsx($u,{className:"p-4",children:h.jsxs("div",{className:"space-y-4",children:[h.jsx(Jr,{className:"h-8 w-48"}),h.jsxs("div",{className:"flex gap-4",children:[h.jsx(Jr,{className:"h-[500px] w-48"}),h.jsx(Jr,{className:"h-[500px] flex-1"}),h.jsx(Jr,{className:"h-[500px] w-64"})]})]})})}),children:h.jsx(V0,{initialData:t,onSave:e,onStateChange:r})})});/**
|
|
1
|
+
"use strict";const h=require("react/jsx-runtime"),j=require("react"),Ks=require("react-dom"),l0=require("@tanstack/react-query");function Zs(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const x=Zs(j),Qs=Zs(Ks);function el(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=el(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Tt(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=el(t))&&(n&&(n+=" "),n+=e);return n}const Lu="-",c0=t=>{const e=f0(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{const a=o.split(Lu);return a[0]===""&&a.length!==1&&a.shift(),tl(a,e)||d0(o)},getConflictingClassGroupIds:(o,a)=>{const s=r[o]||[];return a&&n[o]?[...s,...n[o]]:s}}},tl=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),i=n?tl(t.slice(1),n):void 0;if(i)return i;if(e.validators.length===0)return;const u=t.join(Lu);return(o=e.validators.find(({validator:a})=>a(u)))==null?void 0:o.classGroupId},oa=/^\[(.+)\]$/,d0=t=>{if(oa.test(t)){const e=oa.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},f0=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return h0(Object.entries(t.classGroups),r).forEach(([u,o])=>{Vi(o,n,u,e)}),n},Vi=(t,e,r,n)=>{t.forEach(i=>{if(typeof i=="string"){const u=i===""?e:aa(e,i);u.classGroupId=r;return}if(typeof i=="function"){if(p0(i)){Vi(i(n),e,r,n);return}e.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([u,o])=>{Vi(o,aa(e,u),r,n)})})},aa=(t,e)=>{let r=t;return e.split(Lu).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},p0=t=>t.isThemeGetter,h0=(t,e)=>e?t.map(([r,n])=>{const i=n.map(u=>typeof u=="string"?e+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([o,a])=>[e+o,a])):u);return[r,i]}):t,b0=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const i=(u,o)=>{r.set(u,o),e++,e>t&&(e=0,n=r,r=new Map)};return{get(u){let o=r.get(u);if(o!==void 0)return o;if((o=n.get(u))!==void 0)return i(u,o),o},set(u,o){r.has(u)?r.set(u,o):i(u,o)}}},rl="!",g0=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,i=e[0],u=e.length,o=a=>{const s=[];let l=0,c=0,p;for(let b=0;b<a.length;b++){let y=a[b];if(l===0){if(y===i&&(n||a.slice(b,b+u)===e)){s.push(a.slice(c,b)),c=b+u;continue}if(y==="/"){p=b;continue}}y==="["?l++:y==="]"&&l--}const d=s.length===0?a:a.substring(c),f=d.startsWith(rl),g=f?d.substring(1):d,m=p&&p>c?p-c:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:m}};return r?a=>r({className:a,parseClassName:o}):o},m0=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},y0=t=>({cache:b0(t.cacheSize),parseClassName:g0(t),...c0(t)}),v0=/\s+/,x0=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=e,u=[],o=t.trim().split(v0);let a="";for(let s=o.length-1;s>=0;s-=1){const l=o[s],{modifiers:c,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}=r(l);let g=!!f,m=n(g?d.substring(0,f):d);if(!m){if(!g){a=l+(a.length>0?" "+a:a);continue}if(m=n(d),!m){a=l+(a.length>0?" "+a:a);continue}g=!1}const b=m0(c).join(":"),y=p?b+rl:b,v=y+m;if(u.includes(v))continue;u.push(v);const C=i(m,g);for(let S=0;S<C.length;++S){const N=C[S];u.push(y+N)}a=l+(a.length>0?" "+a:a)}return a};function w0(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=nl(e))&&(n&&(n+=" "),n+=r);return n}const nl=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=nl(t[n]))&&(r&&(r+=" "),r+=e);return r};function E0(t,...e){let r,n,i,u=o;function o(s){const l=e.reduce((c,p)=>p(c),t());return r=y0(l),n=r.cache.get,i=r.cache.set,u=a,a(s)}function a(s){const l=n(s);if(l)return l;const c=x0(s,r);return i(s,c),c}return function(){return u(w0.apply(null,arguments))}}const Q=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},il=/^\[(?:([a-z-]+):)?(.+)\]$/i,S0=/^\d+\/\d+$/,C0=new Set(["px","full","screen"]),T0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,A0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,N0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,O0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,j0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ze=t=>Dt(t)||C0.has(t)||S0.test(t),it=t=>Zt(t,"length",M0),Dt=t=>!!t&&!Number.isNaN(Number(t)),Ai=t=>Zt(t,"number",Dt),dr=t=>!!t&&Number.isInteger(Number(t)),_0=t=>t.endsWith("%")&&Dt(t.slice(0,-1)),q=t=>il.test(t),ut=t=>T0.test(t),P0=new Set(["length","size","percentage"]),k0=t=>Zt(t,P0,ul),R0=t=>Zt(t,"position",ul),I0=new Set(["image","url"]),D0=t=>Zt(t,I0,B0),L0=t=>Zt(t,"",$0),fr=()=>!0,Zt=(t,e,r)=>{const n=il.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},M0=t=>A0.test(t)&&!N0.test(t),ul=()=>!1,$0=t=>O0.test(t),B0=t=>j0.test(t),q0=()=>{const t=Q("colors"),e=Q("spacing"),r=Q("blur"),n=Q("brightness"),i=Q("borderColor"),u=Q("borderRadius"),o=Q("borderSpacing"),a=Q("borderWidth"),s=Q("contrast"),l=Q("grayscale"),c=Q("hueRotate"),p=Q("invert"),d=Q("gap"),f=Q("gradientColorStops"),g=Q("gradientColorStopPositions"),m=Q("inset"),b=Q("margin"),y=Q("opacity"),v=Q("padding"),C=Q("saturate"),S=Q("scale"),N=Q("sepia"),k=Q("skew"),R=Q("space"),D=Q("translate"),$=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",q,e],T=()=>[q,e],_=()=>["",ze,it],I=()=>["auto",Dt,q],w=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",q],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],le=()=>[Dt,q];return{cacheSize:500,separator:":",theme:{colors:[fr],spacing:[ze,it],blur:["none","",ut,q],brightness:le(),borderColor:[t],borderRadius:["none","","full",ut,q],borderSpacing:T(),borderWidth:_(),contrast:le(),grayscale:B(),hueRotate:le(),invert:B(),gap:T(),gradientColorStops:[t],gradientColorStopPositions:[_0,it],inset:E(),margin:E(),opacity:le(),padding:T(),saturate:le(),scale:le(),sepia:B(),skew:le(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",q]}],container:["container"],columns:[{columns:[ut]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...w(),q]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",dr,q]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",q]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",dr,q]}],"grid-cols":[{"grid-cols":[fr]}],"col-start-end":[{col:["auto",{span:["full",dr,q]},q]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[fr]}],"row-start-end":[{row:["auto",{span:[dr,q]},q]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",q]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",q,e]}],"min-w":[{"min-w":[q,e,"min","max","fit"]}],"max-w":[{"max-w":[q,e,"none","full","min","max","fit","prose",{screen:[ut]},ut]}],h:[{h:[q,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[q,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[q,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[q,e,"auto","min","max","fit"]}],"font-size":[{text:["base",ut,it]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ai]}],"font-family":[{font:[fr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",q]}],"line-clamp":[{"line-clamp":["none",Dt,Ai]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ze,q]}],"list-image":[{"list-image":["none",q]}],"list-style-type":[{list:["none","disc","decimal",q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ze,it]}],"underline-offset":[{"underline-offset":["auto",ze,q]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...w(),R0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",k0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},D0]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:O()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[ze,q]}],"outline-w":[{outline:[ze,it]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[ze,it]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",ut,L0]}],"shadow-color":[{shadow:[fr]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",ut,q]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[p]}],saturate:[{saturate:[C]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",q]}],duration:[{duration:le()}],ease:[{ease:["linear","in","out","in-out",q]}],delay:[{delay:le()}],animate:[{animate:["none","spin","ping","pulse","bounce",q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[dr,q]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",q]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",q]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",q]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ze,it,Ai]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},ol=E0(q0);function ge(...t){return ol(Tt(t))}const Mu=x.forwardRef(({className:t,...e},r)=>h.jsx("div",{ref:r,className:ge("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));Mu.displayName="Card";const H0=x.forwardRef(({className:t,...e},r)=>h.jsx("div",{ref:r,className:ge("flex flex-col space-y-1.5 p-6",t),...e}));H0.displayName="CardHeader";const F0=x.forwardRef(({className:t,...e},r)=>h.jsx("h3",{ref:r,className:ge("text-2xl font-semibold leading-none tracking-tight",t),...e}));F0.displayName="CardTitle";const z0=x.forwardRef(({className:t,...e},r)=>h.jsx("p",{ref:r,className:ge("text-sm text-muted-foreground",t),...e}));z0.displayName="CardDescription";const $u=x.forwardRef(({className:t,...e},r)=>h.jsx("div",{ref:r,className:ge("p-6 pt-0",t),...e}));$u.displayName="CardContent";const U0=x.forwardRef(({className:t,...e},r)=>h.jsx("div",{ref:r,className:ge("flex items-center p-6 pt-0",t),...e}));U0.displayName="CardFooter";function Jr({className:t,...e}){return h.jsx("div",{className:ge("animate-pulse rounded-md bg-muted",t),...e})}const al=j.createContext(null),Bu=({children:t,value:e})=>h.jsx(al.Provider,{value:e,children:t}),Br=()=>j.useContext(al),V0=j.lazy(()=>Promise.resolve().then(()=>require("./CraftEditor-De7992rd.cjs"))),W0=({initialData:t,onSave:e,onStateChange:r,eventData:n})=>h.jsx(Bu,{value:n,children:h.jsx(j.Suspense,{fallback:h.jsx(Mu,{children:h.jsx($u,{className:"p-4",children:h.jsxs("div",{className:"space-y-4",children:[h.jsx(Jr,{className:"h-8 w-48"}),h.jsxs("div",{className:"flex gap-4",children:[h.jsx(Jr,{className:"h-[500px] w-48"}),h.jsx(Jr,{className:"h-[500px] flex-1"}),h.jsx(Jr,{className:"h-[500px] w-64"})]})]})})}),children:h.jsx(V0,{initialData:t,onSave:e,onStateChange:r})})});/**
|
|
2
2
|
* @license lucide-react v0.462.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CTfOh5Y0.cjs");exports.ApiConfigProvider=e.ApiConfigProvider;exports.DEVICE_ORDER=e.DEVICE_ORDER;exports.DeviceSizeProvider=e.DeviceSizeProvider;exports.EventDataProvider=e.EventDataProvider;exports.PageBuilder=e.PageBuilder;exports.PreviewModal=e.PreviewModal;exports.TEMPLATE_VARIABLES=e.TEMPLATE_VARIABLES;exports.getPlaceholderPaths=e.getPlaceholderPaths;exports.getResponsiveValue=e.getResponsiveValue;exports.hasTemplatePlaceholders=e.hasTemplatePlaceholders;exports.processTemplate=e.processTemplate;exports.useApiConfig=e.useApiConfig;exports.useDeviceSize=e.useDeviceSize;exports.useEventData=e.useEventData;
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as s, a2 as i, Q as r, R as o, Y as t, Z as l, a6 as v, a5 as P, a1 as E, a4 as d, a3 as p, $ as D, a0 as c,
|
|
1
|
+
import { _ as s, a2 as i, Q as r, R as o, Y as t, Z as l, a6 as v, a5 as P, a1 as E, a4 as d, a3 as p, $ as D, a0 as c, J as g } from "./index-BKtWyPwY.js";
|
|
2
2
|
export {
|
|
3
3
|
s as ApiConfigProvider,
|
|
4
4
|
i as DEVICE_ORDER,
|