PageSourceSearch

https://mtligroup.com/assets/AdminPageEditor-CinxnM_t.js

js mtligroup.com collected 2026-10-04 08:38:23 UTC 94,305 bytes, 61 lines download raw bytes

1import{O as fe,r as c,ad as Y,g as We,j as s,l as we,q as W,a3 as Us,aq as Ks,w as E,T as Ie,x as Je,y as Ze,z as et,D as tt,E as V,I as B,c as qs,a as Yn,aJ as Wn,aK as Vs,d as _t,u as dt,aC as Hs,f as L,aD as Xs,aE as Ys,aF as Ws,aL as Qs,P as Ge,e as Qn,aM as Js,aN as Jn,aB as Zs,k as eo,h as to,aH as no,ao as ro,aO as so,b as oo,ap as Dn,an as ao,a1 as io,af as co,_ as Ee,Z as Ut,N as lo}from"./index-BAfnFMCw.js";import{C as wt,a as Xt,d as Ct,b as En}from"./card-7dd14T8X.js";import{B as Zn}from"./badge-oZFKM5KT.js";import{d as er,R as uo,I as fo,T as ho,a as po,b as In,c as Tn}from"./tabs-DEzcWxsk.js";import{u as Fe}from"./index-BH9fevLC.js";import{E as tr}from"./eye-mgoIFsz8.js";import{E as go}from"./eye-off-HFRhKlMv.js";import{T as jt}from"./trash-2-DTi7n8Kd.js";import{I as nr}from"./image-C0t2Nggv.js";import{M as rr}from"./message-square-quote-D2rTicn2.js";import{G as sr}from"./grid-3x3-BWDYXCb7.js";import{C as or}from"./chart-column-Dgi2ae05.js";import{P as ar}from"./play-BbiGKO6w.js";import{P as St}from"./plus-u9Pry0dZ.js";import{C as mo}from"./chevron-right-Cq6SZWr_.js";import{A as vo}from"./arrow-left-C0yFe6vZ.js";import{S as xo}from"./save-DiDHbxrA.js";import{L as _n}from"./layers-NI01ryzP.js";import{S as bo}from"./settings-2-CykZ71Ee.js";import{W as yo}from"./wand-sparkles-BN4TGu8e.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const ir=fe("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const wo=fe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
12 * @license lucide-react v0.462.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const cr=fe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
17 * @license lucide-react v0.462.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const lr=fe("FileInput",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
22 * @license lucide-react v0.462.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const Co=fe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
27 * @license lucide-react v0.462.0 - ISC
28 *
29 * This source code is licensed under the ISC license.
30 * See the LICENSE file in the root directory of this source tree.
31 */const ur=fe("Images",[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]]);/**
32 * @license lucide-react v0.462.0 - ISC
33 *
34 * This source code is licensed under the ISC license.
35 * See the LICENSE file in the root directory of this source tree.
36 */const dr=fe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
37 * @license lucide-react v0.462.0 - ISC
38 *
39 * This source code is licensed under the ISC license.
40 * See the LICENSE file in the root directory of this source tree.
41 */const fr=fe("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.
41074z",key:"s0h3yz"}]]);/**
42 * @license lucide-react v0.462.0 - ISC
43 *
44 * This source code is licensed under the ISC license.
45 * See the LICENSE file in the root directory of this source tree.
46 */const tn=fe("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/**
47 * @license lucide-react v0.462.0 - ISC
48 *
49 * This source code is licensed under the ISC license.
50 * See the LICENSE file in the root directory of this source tree.
51 */const hr=fe("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
52 * @license lucide-react v0.462.0 - ISC
53 *
54 * This source code is licensed under the ISC license.
55 * See the LICENSE file in the root directory of this source tree.
56 */const pr=fe("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"}]]);function jo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(a=>a(r))},t)}const kt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $e(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function nn(e){return"nodeType"in e}function Q(e){var t,n;return e?$e(e)?e:nn(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function rn(e){const{Document:t}=Q(e);return e instanceof t}function ft(e){return $e(e)?!1:e instanceof Q(e).HTMLElement}function gr(e){return e instanceof Q(e).SVGElement}function Ue(e){return e?$e(e)?e.document:nn(e)?rn(e)?e:ft(e)||gr(e)?e.ownerDocument:document:document:document}const ve=kt?c.useLayoutEffect:c.useEffect;function sn(e){const t=c.useRef(e);return ve(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return t.current==null?void 0:t.current(...r)},[])}function So(){const e=c.useRef(null),t=c.useCallback((r,a)=>{e.current=setInterval(r,a)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ot(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return ve(()=>{n.current!==e&&(n.current=e)},t),n}function ht(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Mt(e){const t=sn(e),n=c.useRef(null),r=c.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,r]}function Yt(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let Kt={};function pt(e,t){return c.useMemo(()=>{if(t)return t;const n=Kt[e]==null?0:Kt[e]+1;return Kt[e]=n,e+"-"+n},[e,t])}function mr(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return r.reduce((o,i)=>{const l=Object.entries(i);for(const[u,h]of l){const f=o[u];f!=null&&(o[u]=f+e*h)}return o},{...t})}}const ze=mr(1),at=mr(-1);function No(e){return"clientX"in e&&"clientY"in e}function on(e){if(!e)return!1;const{KeyboardEvent:t}=Q(e.target);return t&&e instanceof t}function Mo(e){if(!e)return!1;const{TouchEvent:t}=Q(e.target);return t&&e instanceof t}function Wt(e){if(Mo(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return No(e)?{x:e.clientX,y:e.clientY}:null}const it=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[it.Translate.toString(e),it.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),kn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ro(e){return e.matches(kn)?e:e.querySelector(kn)}const Do={display:"none"};function Eo(e){let{id:t,value:n}=e;return Y.createElement("div",{id:t,style:Do},n)}function Io(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Y.createElement("div",{id:t,style:a,role:"status","aria-live":r,"aria-atomic":!0},n)}function To(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const vr=c.createContext(null);function _o(e){const t=c.useContext(vr);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function ko(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:a,event:o}=r;e.forEach(i=>
56{var l;return(l=i[a])==null?void 0:l.call(i,o)})},[e]),t]}const Ao={draggable:`
57    To pick up a draggable item, press the space bar.
58    While dragging, use the arrow keys to move the item.
59    Press space again to drop the item in its new position, or press escape to cancel.
60  `},Po={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Oo(e){let{announcements:t=Po,container:n,hiddenTextDescribedById:r,screenReaderInstructions:a=Ao}=e;const{announce:o,announcement:i}=To(),l=pt("DndLiveRegion"),[u,h]=c.useState(!1);if(c.useEffect(()=>{h(!0)},[]),_o(c.useMemo(()=>({onDragStart(d){let{active:p}=d;o(t.onDragStart({active:p}))},onDragMove(d){let{active:p,over:m}=d;t.onDragMove&&o(t.onDragMove({active:p,over:m}))},onDragOver(d){let{active:p,over:m}=d;o(t.onDragOver({active:p,over:m}))},onDragEnd(d){let{active:p,over:m}=d;o(t.onDragEnd({active:p,over:m}))},onDragCancel(d){let{active:p,over:m}=d;o(t.onDragCancel({active:p,over:m}))}}),[o,t])),!u)return null;const f=Y.createElement(Y.Fragment,null,Y.createElement(Eo,{id:r,value:a.draggable}),Y.createElement(Io,{id:l,announcement:i}));return n?We.createPortal(f,n):f}var G;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(G||(G={}));function Rt(){}function An(e,t){return c.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Lo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const de=Object.freeze({x:0,y:0});function xr(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function br(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Bo(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Pn(e){let{left:t,top:n,height:r,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+r},{x:t+a,y:n+r}]}function yr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function On(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const Fo=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const a=On(t,t.left,t.top),o=[];for(const i of r){const{id:l}=i,u=n.get(l);if(u){const h=xr(On(u),a);o.push({id:l,data:{droppableContainer:i,value:h}})}}return o.sort(br)},zo=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const a=Pn(t),o=[];for(const i of r){const{id:l}=i,u=n.get(l);if(u){const h=Pn(u),f=a.reduce((p,m,v)=>p+xr(h[v],m),0),d=Number((f/4).toFixed(4));o.push({id:l,data:{droppableContainer:i,value:d}})}}return o.sort(br)};function Go(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),i=a-r,l=o-n;if(r<a&&n<o){const u=t.width*t.height,h=e.width*e.height,f=i*l,d=f/(u+h-f);return Number(d.toFixed(4))}return 0}const $o=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const a=[];for(const o of r){const{id:i}=o,l=n.get(i);if(l){const u=Go(l,t);u>0&&a.push({id:i,data:{droppableContainer:o,value:u}})}}return a.sort(Bo)};function Uo(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function wr(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:de}function Ko(e){return function(n){for(var r=arguments.length,a=new Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];return a.reduce((i,l)=>({...i,top:i.top+e*l.y,bottom:i.bottom+e*l.y,left:i.left+e*l.x,right:i.right+e*l.x}),{...n})}}const qo=Ko(1);function Vo(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}
60function Ho(e,t,n){const r=Vo(t);if(!r)return e;const{scaleX:a,scaleY:o,x:i,y:l}=r,u=e.left-i-(1-a)*parseFloat(n),h=e.top-l-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),f=a?e.width/a:e.width,d=o?e.height/o:e.height;return{width:f,height:d,top:h,right:u+f,bottom:h+d,left:u}}const Xo={ignoreTransform:!1};function Ke(e,t){t===void 0&&(t=Xo);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:h,transformOrigin:f}=Q(e).getComputedStyle(e);h&&(n=Ho(n,h,f))}const{top:r,left:a,width:o,height:i,bottom:l,right:u}=n;return{top:r,left:a,width:o,height:i,bottom:l,right:u}}function Ln(e){return Ke(e,{ignoreTransform:!0})}function Yo(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Wo(e,t){return t===void 0&&(t=Q(e).getComputedStyle(e)),t.position==="fixed"}function Qo(e,t){t===void 0&&(t=Q(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const o=t[a];return typeof o=="string"?n.test(o):!1})}function At(e,t){const n=[];function r(a){if(t!=null&&n.length>=t||!a)return n;if(rn(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!ft(a)||gr(a)||n.includes(a))return n;const o=Q(e).getComputedStyle(a);return a!==e&&Qo(a,o)&&n.push(a),Wo(a,o)?n:r(a.parentNode)}return e?r(e):n}function Cr(e){const[t]=At(e,1);return t??null}function qt(e){return!kt||!e?null:$e(e)?e:nn(e)?rn(e)||e===Ue(e).scrollingElement?window:ft(e)?e:null:null}function jr(e){return $e(e)?e.scrollX:e.scrollLeft}function Sr(e){return $e(e)?e.scrollY:e.scrollTop}function Qt(e){return{x:jr(e),y:Sr(e)}}var K;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(K||(K={}));function Nr(e){return!kt||!e?!1:e===document.scrollingElement}function Mr(e){const t={x:0,y:0},n=Nr(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},a=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,l=e.scrollLeft>=r.x;return{isTop:a,isLeft:o,isBottom:i,isRight:l,maxScroll:r,minScroll:t}}const Jo={x:.2,y:.2};function Zo(e,t,n,r,a){let{top:o,left:i,right:l,bottom:u}=n;r===void 0&&(r=10),a===void 0&&(a=Jo);const{isTop:h,isBottom:f,isLeft:d,isRight:p}=Mr(e),m={x:0,y:0},v={x:0,y:0},x={height:t.height*a.y,width:t.width*a.x};
60return!h&&o<=t.top+x.height?(m.y=K.Backward,v.y=r*Math.abs((t.top+x.height-o)/x.height)):!f&&u>=t.bottom-x.height&&(m.y=K.Forward,v.y=r*Math.abs((t.bottom-x.height-u)/x.height)),!p&&l>=t.right-x.width?(m.x=K.Forward,v.x=r*Math.abs((t.right-x.width-l)/x.width)):!d&&i<=t.left+x.width&&(m.x=K.Backward,v.x=r*Math.abs((t.left+x.width-i)/x.width)),{direction:m,speed:v}}function ea(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:i}=window;return{top:0,left:0,right:o,bottom:i,width:o,height:i}}const{top:t,left:n,right:r,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:a,width:e.clientWidth,height:e.clientHeight}}function Rr(e){return e.reduce((t,n)=>ze(t,Qt(n)),de)}function ta(e){return e.reduce((t,n)=>t+jr(n),0)}function na(e){return e.reduce((t,n)=>t+Sr(n),0)}function ra(e,t){if(t===void 0&&(t=Ke),!e)return;const{top:n,left:r,bottom:a,right:o}=t(e);Cr(e)&&(a<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const sa=[["x",["left","right"],ta],["y",["top","bottom"],na]];class an{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=At(n),a=Rr(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,i,l]of sa)for(const u of i)Object.defineProperty(this,u,{get:()=>{const h=l(r),f=a[o]-h;return this.rect[u]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class nt{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var a;(a=this.target)==null||a.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function oa(e){const{EventTarget:t}=Q(e);return e instanceof t?e:Ue(e)}function Vt(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var ae;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ae||(ae={}));function Bn(e){e.preventDefault()}function aa(e){e.stopPropagation()}var T;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(T||(T={}));const Dr={start:[T.Space,T.Enter],cancel:[T.Esc],end:[T.Space,T.Enter,T.Tab]},ia=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case T.Right:return{...n,x:n.x+25};case T.Left:return{...n,x:n.x-25};case T.Down:return{...n,y:n.y+25};case T.Up:return{...n,y:n.y-25}}};class cn{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new nt(Ue(n)),this.windowListeners=new nt(Q(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ae.Resize,this.handleCancel),this.windowListeners.add(ae.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ae.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&ra(r),n(de)}handleKeyDown(t){if(on(t)){const{active:n,context:r,options:a}=this.props,{keyboardCodes:o=Dr,coordinateGetter:i=ia,scrollBehavior:l="smooth"}=a,{code:u}=t;if(o.end.includes(u)){this.handleEnd(t);return}if(o.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:h}=r.current,f=h?{x:h.left,y:h.top}:de;this.referenceCoordinates||(this.referenceCoordinates=f);const d=i(t,{active:n,context:r.current,currentCoordinates:f});if(d){const p=at(d,f),m={x:0,y:0},{scrollableAncestors:v}=r.current;for(const x of v){const y=t.code,{isTop:j,isRight:M,isLeft:S,isBottom:R,maxScroll:_,minScroll:I}=Mr(x),N=ea(x),D={x:Math.min(y===T.Right?N.right-N.width/2:N.right,Math.max(y===T.Right?N.left:N.left+N.width/2,d.x)),y:Math.min(y===T.Down?N.bottom-N.height/2:N.bottom,Math.max(y===T.Down?N.top:N.top+N.height/2,d.y))}
60,P=y===T.Right&&!M||y===T.Left&&!S,O=y===T.Down&&!R||y===T.Up&&!j;if(P&&D.x!==d.x){const g=x.scrollLeft+p.x,b=y===T.Right&&g<=_.x||y===T.Left&&g>=I.x;if(b&&!p.y){x.scrollTo({left:g,behavior:l});return}b?m.x=x.scrollLeft-g:m.x=y===T.Right?x.scrollLeft-_.x:x.scrollLeft-I.x,m.x&&x.scrollBy({left:-m.x,behavior:l});break}else if(O&&D.y!==d.y){const g=x.scrollTop+p.y,b=y===T.Down&&g<=_.y||y===T.Up&&g>=I.y;if(b&&!p.x){x.scrollTo({top:g,behavior:l});return}b?m.y=x.scrollTop-g:m.y=y===T.Down?x.scrollTop-_.y:x.scrollTop-I.y,m.y&&x.scrollBy({top:-m.y,behavior:l});break}}this.handleMove(t,ze(at(d,this.referenceCoordinates),m))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}cn.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Dr,onActivation:a}=t,{active:o}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const l=o.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];function Fn(e){return!!(e&&"distance"in e)}function zn(e){return!!(e&&"delay"in e)}class ln{constructor(t,n,r){var a;r===void 0&&(r=oa(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:i}=o;this.props=t,this.events=n,this.document=Ue(i),this.documentListeners=new nt(this.document),this.listeners=new nt(r),this.windowListeners=new nt(Q(i)),this.initialCoordinates=(a=Wt(o))!=null?a:de,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(ae.Resize,this.handleCancel),this.windowListeners.add(ae.DragStart,Bn),this.windowListeners.add(ae.VisibilityChange,this.handleCancel),this.windowListeners.add(ae.ContextMenu,Bn),this.documentListeners.add(ae.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(zn(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Fn(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:a}=this.props;a(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(ae.Click,aa,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ae.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:a,props:o}=this,{onMove:i,options:{activationConstraint:l}}=o;if(!a)return;const u=(n=Wt(t))!=null?n:de,h=at(a,u);if(!r&&l){if(Fn(l)){if(l.tolerance!=null&&Vt(h,l.tolerance))return this.handleCancel();if(Vt(h,l.distance))return this.handleStart()}if(zn(l)&&Vt(h,l.tolerance))return this.handleCancel();this.handlePending(l,h);return}t.cancelable&&t.preventDefault(),i(u)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===T.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const ca={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class un extends ln{constructor(t){const{event:n}=t,r=Ue(n.target);super(t,ca,r)}}un.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const la={move:{name:"mousemove"},end:{name:"mouseup"}};var Jt;(function(e){e[e.RightClick=2]="RightClick"})(Jt||(Jt={}));class ua extends ln{constructor(t){super(t,la,Ue(t.event.target))}}ua.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Jt.RightClick?!1:(r?.({event:n}),!0)}}];const Ht={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class da extends ln{constructor(t){super(t,Ht)}static setup(){return window.addEventListener(Ht.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Ht.move.name,t)};function t(){}}}da.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:a}=n;return a.length>1?!1:(r?.({event:n}),!0)}}];var rt;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(rt||(rt={}));var Dt;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="Rever
60sedTreeOrder"})(Dt||(Dt={}));function fa(e){let{acceleration:t,activator:n=rt.Pointer,canScroll:r,draggingRect:a,enabled:o,interval:i=5,order:l=Dt.TreeOrder,pointerCoordinates:u,scrollableAncestors:h,scrollableAncestorRects:f,delta:d,threshold:p}=e;const m=pa({delta:d,disabled:!o}),[v,x]=So(),y=c.useRef({x:0,y:0}),j=c.useRef({x:0,y:0}),M=c.useMemo(()=>{switch(n){case rt.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case rt.DraggableRect:return a}},[n,a,u]),S=c.useRef(null),R=c.useCallback(()=>{const I=S.current;if(!I)return;const N=y.current.x*j.current.x,D=y.current.y*j.current.y;I.scrollBy(N,D)},[]),_=c.useMemo(()=>l===Dt.TreeOrder?[...h].reverse():h,[l,h]);c.useEffect(()=>{if(!o||!h.length||!M){x();return}for(const I of _){if(r?.(I)===!1)continue;const N=h.indexOf(I),D=f[N];if(!D)continue;const{direction:P,speed:O}=Zo(I,D,M,t,p);for(const g of["x","y"])m[g][P[g]]||(O[g]=0,P[g]=0);if(O.x>0||O.y>0){x(),S.current=I,v(R,i),y.current=O,j.current=P;return}}y.current={x:0,y:0},j.current={x:0,y:0},x()},[t,R,r,x,o,i,JSON.stringify(M),JSON.stringify(m),v,h,_,f,JSON.stringify(p)])}const ha={x:{[K.Backward]:!1,[K.Forward]:!1},y:{[K.Backward]:!1,[K.Forward]:!1}};function pa(e){let{delta:t,disabled:n}=e;const r=Yt(t);return ht(a=>{if(n||!r||!a)return ha;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[K.Backward]:a.x[K.Backward]||o.x===-1,[K.Forward]:a.x[K.Forward]||o.x===1},y:{[K.Backward]:a.y[K.Backward]||o.y===-1,[K.Forward]:a.y[K.Forward]||o.y===1}}},[n,t,r])}function ga(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return ht(a=>{var o;return t==null?null:(o=r??a)!=null?o:null},[r,t])}function ma(e,t){return c.useMemo(()=>e.reduce((n,r)=>{const{sensor:a}=r,o=a.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...o]},[]),[e,t])}var ct;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ct||(ct={}));var Zt;(function(e){e.Optimized="optimized"})(Zt||(Zt={}));const Gn=new Map;function va(e,t){let{dragging:n,dependencies:r,config:a}=t;const[o,i]=c.useState(null),{frequency:l,measure:u,strategy:h}=a,f=c.useRef(e),d=y(),p=ot(d),m=c.useCallback(function(j){j===void 0&&(j=[]),!p.current&&i(M=>M===null?j:M.concat(j.filter(S=>!M.includes(S))))},[p]),v=c.useRef(null),x=ht(j=>{if(d&&!n)return Gn;if(!j||j===Gn||f.current!==e||o!=null){const M=new Map;for(let S of e){if(!S)continue;if(o&&o.length>0&&!o.includes(S.id)&&S.rect.current){M.set(S.id,S.rect.current);continue}const R=S.node.current,_=R?new an(u(R),R):null;S.rect.current=_,_&&M.set(S.id,_)}return M}return j},[e,o,n,d,u]);return c.useEffect(()=>{f.current=e},[e]),c.useEffect(()=>{d||m()},[n,d]),c.useEffect(()=>{o&&o.length>0&&i(null)},[JSON.stringify(o)]),c.useEffect(()=>{d||typeof l!="number"||v.current!==null||(v.current=setTimeout(()=>{m(),v.current=null},l))},[l,d,m,...r]),{droppableRects:x,measureDroppableContainers:m,measuringScheduled:o!=null};function y(){switch(h){case ct.Always:return!1;case ct.BeforeDragging:return n;default:return!n}}}function Er(e,t){return ht(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function xa(e,t){return Er(e,t)}function ba(e){let{callback:t,disabled:n}=e;const r=sn(t),a=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return c.useEffect(()=>()=>a?.disconnect(),[a]),a}function Pt(e){let{callback:t,disabled:n}=e;const r=sn(t),a=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return c.useEffect(()=>()=>a?.disconnect(),[a]),a}function ya(e){return new an(Ke(e),e)}function $n(e,t,n){t===void 0&&(t=ya);const[r,a]=c.useState(null);function o(){a(u=>{if(!e)return null;if(e.isConnected===!1){var h;return(h=u??n)!=null?h:null}const f=t(e);return JSON.stringify(u)===JSON.stringify(f)?u:f})}const i=ba({callback(u){if(e)for(const h of u){const{type:f,target:d}=h;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),l=Pt({callback:o});return ve(()=>{o(),e?(l?.observe(e),i?.observe(document.body,{childList:!0,subtree:!0})):(l?.disconnect(),i?.disconnect())},[e]),r}function wa(e){const t=Er(e);return wr(e,t)}const Un=[];function Ca(e){const t=c.useRef(e),n=ht(r=>e?r&&r!==Un&&e&&t.current&&e.parentNode===t.current.parentNode?r:At(e):Un,[e]);return c.useEffect(()=>{t.current=e},[e]),n}function ja(e){const[t,n]=c.useState(null),r=c.useRef(e),a=c.useCallback(o=>{const i=qt(o.target);i&&n(l=>l?(l.set(i,Qt(i)),new Map(l)):null)},[]);return c.useEffect(()=>{const o=r.current;if(e!==o){i(o);const l=e.map(u=>{const h=qt(u);return h?(h.addEventListener("scroll",a,{passive:!0}),[h,Qt(h)]):null}).filter(u=>u!=null);n(l.length?new Map(l):null),r.current=e}return()=>{i(e),i(o)};function i(l){l.forEach(u=>{const h=qt(u);h?.removeEventListener("scroll",a)})}},[a,e]),c.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,i)=>ze(o,i),de):Rr(e):de,[e,t])}function Kn(e,t){t===void 0&&(t=[]);const n=c.useRef(null);return c.useEffect(()=>{n.current=null},t),c.useEffect(()=>{const r=e!==de;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?at(e,n.current):de}function Sa(e){c.useEffect(()=>{if(!kt)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function Na(e,t){return c.useMemo(()=>e.reduce((n,r)=>{let{eventName:a,handler:o}=r;return n[a]=i=>{o(i,t)},n},{}),[e,t])}function Ir(e){return c.useMemo(()=>e?Yo(e):null,[e])}const qn=[];
60function Ma(e,t){t===void 0&&(t=Ke);const[n]=e,r=Ir(n?Q(n):null),[a,o]=c.useState(qn);function i(){o(()=>e.length?e.map(u=>Nr(u)?r:new an(t(u),u)):qn)}const l=Pt({callback:i});return ve(()=>{l?.disconnect(),i(),e.forEach(u=>l?.observe(u))},[e]),a}function Ra(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ft(t)?t:e}function Da(e){let{measure:t}=e;const[n,r]=c.useState(null),a=c.useCallback(h=>{for(const{target:f}of h)if(ft(f)){r(d=>{const p=t(f);return d?{...d,width:p.width,height:p.height}:p});break}},[t]),o=Pt({callback:a}),i=c.useCallback(h=>{const f=Ra(h);o?.disconnect(),f&&o?.observe(f),r(f?t(f):null)},[t,o]),[l,u]=Mt(i);return c.useMemo(()=>({nodeRef:l,rect:n,setRef:u}),[n,l,u])}const Ea=[{sensor:un,options:{}},{sensor:cn,options:{}}],Ia={current:{}},Nt={draggable:{measure:Ln},droppable:{measure:Ln,strategy:ct.WhileDragging,frequency:Zt.Optimized},dragOverlay:{measure:Ke}};class st extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Ta={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new st,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Rt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Nt,measureDroppableContainers:Rt,windowRect:null,measuringScheduled:!1},_a={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Rt,draggableNodes:new Map,over:null,measureDroppableContainers:Rt},Ot=c.createContext(_a),Tr=c.createContext(Ta);function ka(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new st}}}function Aa(e,t){switch(t.type){case G.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case G.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case G.DragEnd:case G.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case G.RegisterDroppable:{const{element:n}=t,{id:r}=n,a=new st(e.droppable.containers);return a.set(r,n),{...e,droppable:{...e.droppable,containers:a}}}case G.SetDroppableDisabled:{const{id:n,key:r,disabled:a}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new st(e.droppable.containers);return i.set(n,{...o,disabled:a}),{...e,droppable:{...e.droppable,containers:i}}}case G.UnregisterDroppable:{const{id:n,key:r}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const o=new st(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function Pa(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:a}=c.useContext(Ot),o=Yt(r),i=Yt(n?.id);return c.useEffect(()=>{if(!t&&!r&&o&&i!=null){if(!on(o)||document.activeElement===o.target)return;const l=a.get(i);if(!l)return;const{activatorNode:u,node:h}=l;if(!u.current&&!h.current)return;requestAnimationFrame(()=>{for(const f of[u.current,h.current]){if(!f)continue;const d=Ro(f);if(d){d.focus();break}}})}},[r,t,a,i,o]),null}function Oa(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((a,o)=>o({transform:a,...r}),n):n}function La(e){return c.useMemo(()=>({draggable:{...Nt.draggable,...e?.draggable},droppable:{...Nt.droppable,...e?.droppable},dragOverlay:{...Nt.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Ba(e){let{activeNode:t,measure:n,initialRect:r,config:a=!0}=e;const o=c.useRef(!1),{x:i,y:l}=typeof a=="boolean"?{x:a,y:a}:a;ve(()=>{if(!i&&!l||!t){o.current=!1;return}if(o.current||!r)return;const h=t?.node.current;if(!h||h.isConnected===!1)return;const f=n(h),d=wr(f,r);
60if(i||(d.x=0),l||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=Cr(h);p&&p.scrollBy({top:d.y,left:d.x})}},[t,i,l,r,n])}const _r=c.createContext({...de,scaleX:1,scaleY:1});var De;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(De||(De={}));const Fa=c.memo(function(t){var n,r,a,o;let{id:i,accessibility:l,autoScroll:u=!0,children:h,sensors:f=Ea,collisionDetection:d=$o,measuring:p,modifiers:m,...v}=t;const x=c.useReducer(Aa,void 0,ka),[y,j]=x,[M,S]=ko(),[R,_]=c.useState(De.Uninitialized),I=R===De.Initialized,{draggable:{active:N,nodes:D,translate:P},droppable:{containers:O}}=y,g=N!=null?D.get(N):null,b=c.useRef({initial:null,translated:null}),C=c.useMemo(()=>{var H;return N!=null?{id:N,data:(H=g?.data)!=null?H:Ia,rect:b}:null},[N,g]),k=c.useRef(null),[J,he]=c.useState(null),[z,ce]=c.useState(null),w=ot(v,Object.values(v)),re=pt("DndDescribedBy",i),se=c.useMemo(()=>O.getEnabled(),[O]),F=La(p),{droppableRects:Z,measureDroppableContainers:le,measuringScheduled:Ce}=va(se,{dragging:I,dependencies:[P.x,P.y],config:F.droppable}),$=ga(D,N),U=c.useMemo(()=>z?Wt(z):null,[z]),ue=$s(),xe=xa($,F.draggable.measure);Ba({activeNode:N!=null?D.get(N):null,config:ue.layoutShiftCompensation,initialRect:xe,measure:F.draggable.measure});const A=$n($,F.draggable.measure,xe),qe=$n($?$.parentElement:null),pe=c.useRef({activatorEvent:null,active:null,activeNode:$,collisionRect:null,collisions:null,droppableRects:Z,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:O,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ke=O.getNodeFor((n=pe.current.over)==null?void 0:n.id),be=Da({measure:F.dragOverlay.measure}),Ae=(r=be.nodeRef.current)!=null?r:$,Pe=I?(a=be.rect)!=null?a:A:null,yn=!!(be.nodeRef.current&&be.rect),wn=wa(yn?null:A),zt=Ir(Ae?Q(Ae):null),je=Ca(I?ke??$:null),vt=Ma(je),xt=Oa(m,{transform:{x:P.x-wn.x,y:P.y-wn.y,scaleX:1,scaleY:1},activatorEvent:z,active:C,activeNodeRect:A,containerNodeRect:qe,draggingNodeRect:Pe,over:pe.current.over,overlayNodeRect:be.rect,scrollableAncestors:je,scrollableAncestorRects:vt,windowRect:zt}),Cn=U?ze(U,P):null,jn=ja(je),Ps=Kn(jn),Os=Kn(jn,[A]),Oe=ze(xt,Ps),Le=Pe?qo(Pe,xt):null,Ve=C&&Le?d({active:C,collisionRect:Le,droppableRects:Z,droppableContainers:se,pointerCoordinates:Cn}):null,Sn=yr(Ve,"id"),[Se,Nn]=c.useState(null),Ls=yn?xt:ze(xt,Os),Bs=Uo(Ls,(o=Se?.rect)!=null?o:null,A),Gt=c.useRef(null),Mn=c.useCallback((H,ee)=>{let{sensor:te,options:Ne}=ee;if(k.current==null)return;const oe=D.get(k.current);if(!oe)return;const ne=H.nativeEvent,ge=new te({active:k.current,activeNode:oe,event:ne,options:Ne,context:pe,onAbort(q){if(!D.get(q))return;const{onDragAbort:me}=w.current,ye={id:q};me?.(ye),M({type:"onDragAbort",event:ye})},onPending(q,Me,me,ye){if(!D.get(q))return;const{onDragPending:Xe}=w.current,Re={id:q,constraint:Me,initialCoordinates:me,offset:ye};Xe?.(Re),M({type:"onDragPending",event:Re})},onStart(q){const Me=k.current;if(Me==null)return;const me=D.get(Me);if(!me)return;const{onDragStart:ye}=w.current,He={activatorEvent:ne,active:{id:Me,data:me.data,rect:b}};We.unstable_batchedUpdates(()=>{ye?.(He),_(De.Initializing),j({type:G.DragStart,initialCoordinates:q,active:Me}),M({type:"onDragStart",event:He}),he(Gt.current),ce(ne)})},onMove(q){j({type:G.DragMove,coordinates:q})},onEnd:Be(G.DragEnd),onCancel:Be(G.DragCancel)});Gt.current=ge;function Be(q){return async function(){const{active:me,collisions:ye,over:He,scrollAdjustedTranslate:Xe}=pe.current;let Re=null;if(me&&Xe){const{cancelDrop:Ye}=w.current;Re={activatorEvent:ne,active:me,collisions:ye,delta:Xe,over:He},q===G.DragEnd&&typeof Ye=="function"&&await Promise.resolve(Ye(Re))&&(q=G.DragCancel)}k.current=null,We.unstable_batchedUpdates(()=>{j({type:q}),_(De.Uninitialized),Nn(null),he(null),ce(null),Gt.current=null;const Ye=q===G.DragEnd?"onDragEnd":"onDragCancel";if(Re){const $t=w.current[Ye];$t?.(Re),M({type:Ye,event:Re})}})}}},[D]),Fs=c.useCallback((H,ee)=>(te,Ne)=>{const oe=te.nativeEvent,ne=D.get(Ne);if(k.current!==null||!ne||oe.dndKit||oe.defaultPrevented)return;const ge={active:ne};H(te,ee.options,ge)===!0&&(oe.dndKit={capturedBy:ee.sensor},k.current=Ne,Mn(te,ee))},[D,Mn]),Rn=ma(f,Fs);Sa(f),ve(()=>{A&&R===De.Initializing&&_(De.Initialized)},[A,R]),c.useEffect(()=>{const{onDragMove:H}=w.current,{active:ee,activatorEvent:te,collisions:Ne,over:oe}=pe.current;if(!ee||!te)return;const ne={active:ee,activatorEvent:te,collisions:Ne,delta:{x:Oe.x,y:Oe.y},over:oe};We.unstable_batchedUpdates(()=>{H?.(ne),M({type:"onDragMove",event:ne})})},[Oe.x,Oe.y]),c.useEffect(()=>{const{active:H,activatorEvent:ee,collisions:te,droppableContainers:Ne,scrollAdjustedTranslate:oe}=pe.current;if(!H||k.current==null||!ee||!oe)return;const{onDragOver:ne}
60=w.current,ge=Ne.get(Sn),Be=ge&&ge.rect.current?{id:ge.id,rect:ge.rect.current,data:ge.data,disabled:ge.disabled}:null,q={active:H,activatorEvent:ee,collisions:te,delta:{x:oe.x,y:oe.y},over:Be};We.unstable_batchedUpdates(()=>{Nn(Be),ne?.(q),M({type:"onDragOver",event:q})})},[Sn]),ve(()=>{pe.current={activatorEvent:z,active:C,activeNode:$,collisionRect:Le,collisions:Ve,droppableRects:Z,draggableNodes:D,draggingNode:Ae,draggingNodeRect:Pe,droppableContainers:O,over:Se,scrollableAncestors:je,scrollAdjustedTranslate:Oe},b.current={initial:Pe,translated:Le}},[C,$,Ve,Le,D,Ae,Pe,Z,O,Se,je,Oe]),fa({...ue,delta:P,draggingRect:Le,pointerCoordinates:Cn,scrollableAncestors:je,scrollableAncestorRects:vt});const zs=c.useMemo(()=>({active:C,activeNode:$,activeNodeRect:A,activatorEvent:z,collisions:Ve,containerNodeRect:qe,dragOverlay:be,draggableNodes:D,droppableContainers:O,droppableRects:Z,over:Se,measureDroppableContainers:le,scrollableAncestors:je,scrollableAncestorRects:vt,measuringConfiguration:F,measuringScheduled:Ce,windowRect:zt}),[C,$,A,z,Ve,qe,be,D,O,Z,Se,le,je,vt,F,Ce,zt]),Gs=c.useMemo(()=>({activatorEvent:z,activators:Rn,active:C,activeNodeRect:A,ariaDescribedById:{draggable:re},dispatch:j,draggableNodes:D,over:Se,measureDroppableContainers:le}),[z,Rn,C,A,j,re,D,Se,le]);return Y.createElement(vr.Provider,{value:S},Y.createElement(Ot.Provider,{value:Gs},Y.createElement(Tr.Provider,{value:zs},Y.createElement(_r.Provider,{value:Bs},h)),Y.createElement(Pa,{disabled:l?.restoreFocus===!1})),Y.createElement(Oo,{...l,hiddenTextDescribedById:re}));function $s(){const H=J?.autoScrollEnabled===!1,ee=typeof u=="object"?u.enabled===!1:u===!1,te=I&&!H&&!ee;return typeof u=="object"?{...u,enabled:te}:{enabled:te}}}),za=c.createContext(null),Vn="button",Ga="Draggable";function $a(e){let{id:t,data:n,disabled:r=!1,attributes:a}=e;const o=pt(Ga),{activators:i,activatorEvent:l,active:u,activeNodeRect:h,ariaDescribedById:f,draggableNodes:d,over:p}=c.useContext(Ot),{role:m=Vn,roleDescription:v="draggable",tabIndex:x=0}=a??{},y=u?.id===t,j=c.useContext(y?_r:za),[M,S]=Mt(),[R,_]=Mt(),I=Na(i,t),N=ot(n);ve(()=>(d.set(t,{id:t,key:o,node:M,activatorNode:R,data:N}),()=>{const P=d.get(t);P&&P.key===o&&d.delete(t)}),[d,t]);const D=c.useMemo(()=>({role:m,tabIndex:x,"aria-disabled":r,"aria-pressed":y&&m===Vn?!0:void 0,"aria-roledescription":v,"aria-describedby":f.draggable}),[r,m,x,y,v,f.draggable]);return{active:u,activatorEvent:l,activeNodeRect:h,attributes:D,isDragging:y,listeners:r?void 0:I,node:M,over:p,setNodeRef:S,setActivatorNodeRef:_,transform:j}}function Ua(){return c.useContext(Tr)}const Ka="Droppable",qa={timeout:25};function Va(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:a}=e;const o=pt(Ka),{active:i,dispatch:l,over:u,measureDroppableContainers:h}=c.useContext(Ot),f=c.useRef({disabled:n}),d=c.useRef(!1),p=c.useRef(null),m=c.useRef(null),{disabled:v,updateMeasurementsFor:x,timeout:y}={...qa,...a},j=ot(x??r),M=c.useCallback(()=>{if(!d.current){d.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{h(Array.isArray(j.current)?j.current:[j.current]),m.current=null},y)},[y]),S=Pt({callback:M,disabled:v||!i}),R=c.useCallback((D,P)=>{S&&(P&&(S.unobserve(P),d.current=!1),D&&S.observe(D))},[S]),[_,I]=Mt(R),N=ot(t);return c.useEffect(()=>{!S||!_.current||(S.disconnect(),d.current=!1,S.observe(_.current))},[_,S]),c.useEffect(()=>(l({type:G.RegisterDroppable,element:{id:r,key:o,disabled:n,node:_,rect:p,data:N}}),()=>l({type:G.UnregisterDroppable,key:o,id:r})),[r]),c.useEffect(()=>{n!==f.current.disabled&&(l({type:G.SetDroppableDisabled,id:r,key:o,disabled:n}),f.current.disabled=n)},[r,o,n,l]),{active:i,rect:p,isOver:u?.id===r,node:_,over:u,setNodeRef:I}}function dn(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Ha(e,t){return e.reduce((n,r,a)=>{const o=t.get(r);return o&&(n[a]=o),n},Array(e.length))}function bt(e){return e!==null&&e>=0}function Xa(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Ya(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const kr=e=>{let{rects:t,activeIndex:n,overIndex:r,index:a}=e;const o=dn(t,r,n),i=t[a],l=o[a];return!l||!i?null:{x:l.left-i.left,y:l.top-i.top,scaleX:l.width/i.width,scaleY:l.height/i.height}},yt={scaleX:1,scaleY:1},Wa=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:a,rects:o,overIndex:i}=e;const l=(t=o[n])!=null?t:r;if(!l)return null;if(a===n){const h=o[i];return h?{x:0,y:n<i?h.top+h.height-(l.top+l.height):h.top-l.top,...yt}:null}const u=Qa(o,a,n);return a>n&&a<=i?{x:0,y:-l.height-u,...yt}:a<n&&a>
60=i?{x:0,y:l.height+u,...yt}:{x:0,y:0,...yt}};function Qa(e,t,n){const r=e[t],a=e[t-1],o=e[t+1];return r?n<t?a?r.top-(a.top+a.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):a?r.top-(a.top+a.height):0:0}const Ar="Sortable",Pr=Y.createContext({activeIndex:-1,containerId:Ar,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:kr,disabled:{draggable:!1,droppable:!1}});function Ja(e){let{children:t,id:n,items:r,strategy:a=kr,disabled:o=!1}=e;const{active:i,dragOverlay:l,droppableRects:u,over:h,measureDroppableContainers:f}=Ua(),d=pt(Ar,n),p=l.rect!==null,m=c.useMemo(()=>r.map(I=>typeof I=="object"&&"id"in I?I.id:I),[r]),v=i!=null,x=i?m.indexOf(i.id):-1,y=h?m.indexOf(h.id):-1,j=c.useRef(m),M=!Xa(m,j.current),S=y!==-1&&x===-1||M,R=Ya(o);ve(()=>{M&&v&&f(m)},[M,m,v,f]),c.useEffect(()=>{j.current=m},[m]);const _=c.useMemo(()=>({activeIndex:x,containerId:d,disabled:R,disableTransforms:S,items:m,overIndex:y,useDragOverlay:p,sortedRects:Ha(m,u),strategy:a}),[x,d,R.draggable,R.droppable,S,m,y,u,p,a]);return Y.createElement(Pr.Provider,{value:_},t)}const Za=e=>{let{id:t,items:n,activeIndex:r,overIndex:a}=e;return dn(n,r,a).indexOf(t)},ei=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:a,items:o,newIndex:i,previousItems:l,previousContainerId:u,transition:h}=e;return!h||!r||l!==o&&a===i?!1:n?!0:i!==a&&t===u},ti={duration:200,easing:"ease"},Or="transform",ni=it.Transition.toString({property:Or,duration:0,easing:"linear"}),ri={roleDescription:"sortable"};function si(e){let{disabled:t,index:n,node:r,rect:a}=e;const[o,i]=c.useState(null),l=c.useRef(n);return ve(()=>{if(!t&&n!==l.current&&r.current){const u=a.current;if(u){const h=Ke(r.current,{ignoreTransform:!0}),f={x:u.left-h.left,y:u.top-h.top,scaleX:u.width/h.width,scaleY:u.height/h.height};(f.x||f.y)&&i(f)}}n!==l.current&&(l.current=n)},[t,n,r,a]),c.useEffect(()=>{o&&i(null)},[o]),o}function oi(e){let{animateLayoutChanges:t=ei,attributes:n,disabled:r,data:a,getNewIndex:o=Za,id:i,strategy:l,resizeObserverConfig:u,transition:h=ti}=e;const{items:f,containerId:d,activeIndex:p,disabled:m,disableTransforms:v,sortedRects:x,overIndex:y,useDragOverlay:j,strategy:M}=c.useContext(Pr),S=ai(r,m),R=f.indexOf(i),_=c.useMemo(()=>({sortable:{containerId:d,index:R,items:f},...a}),[d,a,R,f]),I=c.useMemo(()=>f.slice(f.indexOf(i)),[f,i]),{rect:N,node:D,isOver:P,setNodeRef:O}=Va({id:i,data:_,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...u}}),{active:g,activatorEvent:b,activeNodeRect:C,attributes:k,setNodeRef:J,listeners:he,isDragging:z,over:ce,setActivatorNodeRef:w,transform:re}=$a({id:i,data:_,attributes:{...ri,...n},disabled:S.draggable}),se=jo(O,J),F=!!g,Z=F&&!v&&bt(p)&&bt(y),le=!j&&z,Ce=le&&Z?re:null,U=Z?Ce??(l??M)({rects:x,activeNodeRect:C,activeIndex:p,overIndex:y,index:R}):null,ue=bt(p)&&bt(y)?o({id:i,items:f,activeIndex:p,overIndex:y}):R,xe=g?.id,A=c.useRef({activeId:xe,items:f,newIndex:ue,containerId:d}),qe=f!==A.current.items,pe=t({active:g,containerId:d,isDragging:z,isSorting:F,id:i,index:R,items:f,newIndex:A.current.newIndex,previousItems:A.current.items,previousContainerId:A.current.containerId,transition:h,wasDragging:A.current.activeId!=null}),ke=si({disabled:!pe,index:R,node:D,rect:N});return c.useEffect(()=>{F&&A.current.newIndex!==ue&&(A.current.newIndex=ue),d!==A.current.containerId&&(A.current.containerId=d),f!==A.current.items&&(A.current.items=f)},[F,ue,d,f]),c.useEffect(()=>{if(xe===A.current.activeId)return;if(xe!=null&&A.current.activeId==null){A.current.activeId=xe;return}const Ae=setTimeout(()=>{A.current.activeId=xe},50);return()=>clearTimeout(Ae)},[xe]),{active:g,activeIndex:p,attributes:k,data:_,rect:N,index:R,newIndex:ue,items:f,isOver:P,isSorting:F,isDragging:z,listeners:he,node:D,overIndex:y,over:ce,setNodeRef:se,setActivatorNodeRef:w,setDroppableNodeRef:O,setDraggableNodeRef:J,transform:ke??U,transition:be()};function be(){if(ke||qe&&A.current.newIndex===R)return ni;if(!(le&&!on(b)||!h)&&(F||pe))return it.Transition.toString({...h,property:Or})}}function ai(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function Et(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const ii=[T.Down,T.Right,T.Up,T.Left],ci=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:a,droppableContainers:o,over:i,scrollableAncestors:l}}=t;if(ii.includes(e.code)){if(e.preventDefault(),!n||!r)return;const u=[];
60o.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=a.get(d.id);if(p)switch(e.code){case T.Down:r.top<p.top&&u.push(d);break;case T.Up:r.top>p.top&&u.push(d);break;case T.Left:r.left>p.left&&u.push(d);break;case T.Right:r.left<p.left&&u.push(d);break}});const h=zo({active:n,collisionRect:r,droppableRects:a,droppableContainers:u,pointerCoordinates:null});let f=yr(h,"id");if(f===i?.id&&h.length>1&&(f=h[1].id),f!=null){const d=o.get(n.id),p=o.get(f),m=p?a.get(p.id):null,v=p?.node.current;if(v&&m&&d&&p){const y=At(v).some((I,N)=>l[N]!==I),j=Lr(d,p),M=li(d,p),S=y||!j?{x:0,y:0}:{x:M?r.width-m.width:0,y:M?r.height-m.height:0},R={x:m.left,y:m.top};return S.x&&S.y?R:at(R,S)}}}};function Lr(e,t){return!Et(e)||!Et(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function li(e,t){return!Et(e)||!Et(t)||!Lr(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const fn={hero:{label:"Hero Section",icon:"Layout",defaultContent:{headline:"Your Headline Here",subheadline:"Add a compelling subheadline",buttonText:"Get Started",buttonLink:"/contact",alignment:"center"}},text:{label:"Text Block",icon:"Type",defaultContent:{body:"Enter your content here..."}},image:{label:"Image",icon:"Image",defaultContent:{src:"",alt:"",caption:""}},gallery:{label:"Image Gallery",icon:"Images",defaultContent:{images:[],columns:3}},cta:{label:"Call to Action",icon:"MousePointerClick",defaultContent:{title:"Ready to get started?",description:"Contact us today for a free consultation.",primaryButtonText:"Get a Quote",primaryButtonLink:"/quote",ctaStyle:"default"}},faq:{label:"FAQ Section",icon:"HelpCircle",defaultContent:{faqItems:[{question:"What services do you offer?",answer:"We offer a wide range of services..."}]}},testimonials:{label:"Testimonials",icon:"MessageSquareQuote",defaultContent:{testimonialIds:[],layout:"carousel"}},services:{label:"Services Grid",icon:"Grid3x3",defaultContent:{serviceIds:[],showIcons:!0}},features:{label:"Features List",icon:"CheckSquare",defaultContent:{features:[{title:"Feature 1",description:"Description of feature 1"}]}},stats:{label:"Statistics",icon:"BarChart3",defaultContent:{stats:[{value:"100",label:"Projects Completed",suffix:"+"}]}},video:{label:"Video",icon:"Play",defaultContent:{videoUrl:"",autoplay:!1}},form:{label:"Form",icon:"FileInput",defaultContent:{formType:"contact"}},divider:{label:"Divider",icon:"Minus",defaultContent:{dividerStyle:"line",height:40}},custom:{label:"Custom HTML",icon:"Code",defaultContent:{html:""}}},ui={hero:tn,text:pr,image:nr,gallery:ur,cta:fr,faq:ir,testimonials:rr,services:sr,features:hr,stats:or,video:ar,form:lr,divider:dr,custom:cr};function di({block:e,isExpanded:t,onToggleExpand:n,onToggleVisibility:r,onDelete:a,children:o}){const{attributes:i,listeners:l,setNodeRef:u,transform:h,transition:f,isDragging:d}=oi({id:e.id}),p={transform:it.Transform.toString(h),transition:f},m=ui[e.block_type]||tn,v=fn[e.block_type];return s.jsxs(wt,{ref:u,style:p,className:we("transition-shadow",d&&"shadow-lg ring-2 ring-primary/50 opacity-90",!e.is_visible&&"opacity-60"),children:[s.jsx(Xt,{className:"py-3 px-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{...i,...l,className:"cursor-grab active:cursor-grabbing p-1 hover:bg-muted rounded",children:s.jsx(Co,{className:"h-5 w-5 text-muted-foreground"})}),s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx(m,{className:"h-4 w-4 text-primary"}),s.jsx("span",{className:"font-medium text-sm",children:v?.label||e.block_type}),!e.is_visible&&s.jsx(Zn,{variant:"secondary",className:"text-xs",children:"Hidden"})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(W,{variant:"ghost",size:"sm",onClick:r,className:"h-8 w-8 p-0",children:e.is_visible?s.jsx(tr,{className:"h-4 w-4"}):s.jsx(go,{className:"h-4 w-4"})}),s.jsx(W,{variant:"ghost",size:"sm",onClick:a,className:"h-8 w-8 p-0 text-destructive hover:text-destructive",children:s.jsx(jt,{className:"h-4 w-4"})}),s.jsx(W,{variant:"ghost",size:"sm",onClick:n,className:"h-8 w-8 p-0",children:t?s.jsx(Us,{className:"h-4 w-4"}):s.jsx(Ks,{className:"h-4 w-4"})})]})]})}),t&&s.jsx(Ct,{className:"pt-0 pb-4 px-4",children:o})]})}function fi({blockType:e,content:t,onChange:n}){const r=(a,o)=>{n({...t,[a]:o})};switch(e){case"hero":return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Headline"}),s.jsx(B,{value:t.headline||"",onChange:o=>r("headline",o.target.value),placeholder:"Enter headline"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Subheadline"}),s.jsx(Ie,{value:t.subheadline||"",onChange:o=>r("subheadline",o.target.value),placeholder:"Enter subheadline",rows:2})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Button Text"}),s.jsx(B,{value:t.buttonText||"",onChange:o=>r("buttonText",o.target.value),placeholder:"Get Started"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Button Link"}),s.jsx(B,{value:t.buttonLink||"",onChange:o=>r("buttonLink",o.target.value),placeholder:"/contact"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Backgroun
60d Image URL"}),s.jsx(B,{value:t.backgroundImage||"",onChange:o=>r("backgroundImage",o.target.value),placeholder:"https://..."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Alignment"}),s.jsxs(Je,{value:t.alignment||"center",onValueChange:o=>r("alignment",o),children:[s.jsx(Ze,{children:s.jsx(et,{})}),s.jsxs(tt,{children:[s.jsx(V,{value:"left",children:"Left"}),s.jsx(V,{value:"center",children:"Center"}),s.jsx(V,{value:"right",children:"Right"})]})]})]})]});case"text":return s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Content"}),s.jsx(Ie,{value:t.body||"",onChange:o=>r("body",o.target.value),placeholder:"Enter your content...",rows:6})]});case"image":return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Image URL"}),s.jsx(B,{value:t.src||"",onChange:o=>r("src",o.target.value),placeholder:"https://..."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Alt Text"}),s.jsx(B,{value:t.alt||"",onChange:o=>r("alt",o.target.value),placeholder:"Describe the image"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Caption (optional)"}),s.jsx(B,{value:t.caption||"",onChange:o=>r("caption",o.target.value),placeholder:"Image caption"})]}),t.src&&s.jsx("div",{className:"mt-2",children:s.jsx("img",{src:t.src,alt:t.alt||"Preview",className:"max-h-40 rounded border"})})]});case"cta":return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Title"}),s.jsx(B,{value:t.title||"",onChange:o=>r("title",o.target.value),placeholder:"Ready to get started?"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Description"}),s.jsx(Ie,{value:t.description||"",onChange:o=>r("description",o.target.value),placeholder:"Add a compelling description",rows:2})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Primary Button Text"}),s.jsx(B,{value:t.primaryButtonText||"",onChange:o=>r("primaryButtonText",o.target.value),placeholder:"Get a Quote"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Primary Button Link"}),s.jsx(B,{value:t.primaryButtonLink||"",onChange:o=>r("primaryButtonLink",o.target.value),placeholder:"/quote"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Secondary Button Text (optional)"}),s.jsx(B,{value:t.secondaryButtonText||"",onChange:o=>r("secondaryButtonText",o.target.value),placeholder:"Learn More"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Secondary Button Link"}),s.jsx(B,{value:t.secondaryButtonLink||"",onChange:o=>r("secondaryButtonLink",o.target.value),placeholder:"/about"})]})]})]});case"faq":const a=t.faqItems||[];return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(E,{children:"FAQ Items"}),s.jsxs(W,{type:"button",variant:"outline",size:"sm",onClick:()=>{r("faqItems",[...a,{question:"",answer:""}])},children:[s.jsx(St,{className:"h-4 w-4 mr-1"}),"Add Item"]})]}),s.jsx("div",{className:"space-y-4",children:a.map((o,i)=>s.jsxs("div",{className:"border rounded-lg p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-sm font-medium",children:["FAQ #",i+1]}),s.jsx(W,{type:"button",variant:"ghost",size:"sm",onClick:()=>{const l=[...a];l.splice(i,1),r("faqItems",l)},children:s.jsx(jt,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Question"}),s.jsx(B,{value:o.question,onChange:l=>{const u=[...a];u[i]={...u[i],question:l.target.value},r("faqItems",u)},placeholder:"What is your question?"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Answer"}),s.jsx(Ie,{value:o.answer,onChange:l=>{const u=[...a];u[i]={...u[i],answer:l.target.value},r("faqItems",u)},placeholder:"Provide the answer...",rows:3})]})]},i))})]});case"stats":return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(E,{children:"Statistics"}),s.jsxs(W,{type:"button",variant:"outline",size:"sm",onClick:()=>{const o=t.stats||[];r("stats",[...o,{value:"",label:"",suffix:""}])},children:[s.jsx(St,{className:"h-4 w-4 mr-1"}),"Add Stat"]})]}),s.jsx("div",{className:"space-y-3",children:(t.stats||[]).map((o,i)=>s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(B,{value:o.value,onChange:l=>{const u=[...t.stats||[]];u[i]={...u[i],value:l.target.value},r("stats",u)},placeholder:"100",className:"w-24"}),s.jsx(B,{value:o.suffix||"",onChange:l=>{const u=[...t.stats||[]];u[i]={...u[i],suffix:l.target.value},r("stats",u)},placeholder:"+",className:"w-16"}),s.jsx(B,{value:o.label,onChange:l=>{const u=[...t.stats||[]];u[i]={...u[i],label:l.target.value},r("stats",u)},placeholder:"Projects Completed",className:"flex-1"}),s.jsx(W,{type:"button",variant:"ghost",size:"sm",onClick:()=>{const l=[...t.stats||[]];l.splice(i,1),r("stats",l)},children:s.jsx(jt,{className:"h-4 w-4"})})]},i))})]});case"features":return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(E,{children:"Features"}),s.jsxs(W,{type:"button",variant:"outline",size:"sm",onClick:()=>{const o=t.features||[];r("features",[...o,{title:"",description:""}])},children:[s.jsx(St,{className:"h-4 w-4 mr-1"}),"Add Feature"]})]}),s.jsx("div",{className:"space-y-3",children:(t.features||[]).map((o,i)=>s.jsxs("div",{className:"border rounded-lg p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-sm font-medium",children:["Feature #",i+1]}),s.jsx(W,{type:"button",variant:"ghost",size:"sm",onClick:()=>{const l=[...t.features||[]];l.splice(i,1),r("features",l)},children:s.jsx(jt,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Title"}),s.jsx(B,{value:o.title,onChange:l=>{const u=[...t.features||[]];u[i]={...u[i],title:l.target.value},r("features",u)}
60,placeholder:"Feature title"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Description"}),s.jsx(Ie,{value:o.description,onChange:l=>{const u=[...t.features||[]];u[i]={...u[i],description:l.target.value},r("features",u)},placeholder:"Feature description",rows:2})]})]},i))})]});case"video":return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Video URL (YouTube, Vimeo, or direct)"}),s.jsx(B,{value:t.videoUrl||"",onChange:o=>r("videoUrl",o.target.value),placeholder:"https://youtube.com/watch?v=..."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Thumbnail URL (optional)"}),s.jsx(B,{value:t.thumbnailUrl||"",onChange:o=>r("thumbnailUrl",o.target.value),placeholder:"https://..."})]})]});case"divider":return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Style"}),s.jsxs(Je,{value:t.dividerStyle||"line",onValueChange:o=>r("dividerStyle",o),children:[s.jsx(Ze,{children:s.jsx(et,{})}),s.jsxs(tt,{children:[s.jsx(V,{value:"line",children:"Line"}),s.jsx(V,{value:"space",children:"Space"}),s.jsx(V,{value:"dots",children:"Dots"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Height (px)"}),s.jsx(B,{type:"number",value:t.height||40,onChange:o=>r("height",parseInt(o.target.value)||40),min:10,max:200})]})]});case"form":return s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Form Type"}),s.jsxs(Je,{value:t.formType||"contact",onValueChange:o=>r("formType",o),children:[s.jsx(Ze,{children:s.jsx(et,{})}),s.jsxs(tt,{children:[s.jsx(V,{value:"contact",children:"Contact Form"}),s.jsx(V,{value:"quote",children:"Quote Request"}),s.jsx(V,{value:"newsletter",children:"Newsletter Signup"})]})]})]});case"custom":return s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Custom HTML"}),s.jsx(Ie,{value:t.html||"",onChange:o=>r("html",o.target.value),placeholder:"<div>Your custom HTML...</div>",rows:8,className:"font-mono text-sm"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"⚠️ Be careful with custom HTML - ensure it's safe and properly formatted."})]});default:return s.jsx("div",{className:"text-muted-foreground text-sm",children:"Editor not available for this block type."})}}var en=["Enter"," "],hi=["ArrowDown","PageUp","Home"],Br=["ArrowUp","PageDown","End"],pi=[...hi,...Br],gi={ltr:[...en,"ArrowRight"],rtl:[...en,"ArrowLeft"]},mi={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gt="Menu",[lt,vi,xi]=qs(gt),[Te,Fr]=Yn(gt,[xi,Wn,er]),Lt=Wn(),zr=er(),[bi,_e]=Te(gt),[yi,mt]=Te(gt),Gr=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:i=!0}=e,l=Lt(t),[u,h]=c.useState(null),f=c.useRef(!1),d=Qn(o),p=ro(a);return c.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),s.jsx(so,{...l,children:s.jsx(bi,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:h,children:s.jsx(yi,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:i,children:r})})})};Gr.displayName=gt;var wi="MenuAnchor",hn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Lt(n);return s.jsx(Vs,{...a,...r,ref:t})});hn.displayName=wi;var pn="MenuPortal",[Ci,$r]=Te(pn,{forceMount:void 0}),Ur=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=_e(pn,t);return s.jsx(Ci,{scope:t,forceMount:n,children:s.jsx(_t,{present:n||o.open,children:s.jsx(to,{asChild:!0,container:a,children:r})})})};Ur.displayName=pn;var ie="MenuContent",[ji,gn]=Te(ie),Kr=c.forwardRef((e,t)=>{const n=$r(ie,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=_e(ie,e.__scopeMenu),i=mt(ie,e.__scopeMenu);return s.jsx(lt.Provider,{scope:e.__scopeMenu,children:s.jsx(_t,{present:r||o.open,children:s.jsx(lt.Slot,{scope:e.__scopeMenu,children:i.modal?s.jsx(Si,{...a,ref:t}):s.jsx(Ni,{...a,ref:t})})})})}),Si=c.forwardRef((e,t)=>
vendor: 12,962 bytes, line 60
60{const n=_e(ie,e.__scopeMenu),r=c.useRef(null),a=dt(t,r);return c.useEffect(()=>{const o=r.current;if(o)return Hs(o)},[]),s.jsx(mn,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:L(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ni=c.forwardRef((e,t)=>{const n=_e(ie,e.__scopeMenu);return s.jsx(mn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Mi=no("MenuContent.ScrollLock"),mn=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...x}=e,y=_e(ie,n),j=mt(ie,n),M=Lt(n),S=zr(n),R=vi(n),[_,I]=c.useState(null),N=c.useRef(null),D=dt(t,N,y.onContentChange),P=c.useRef(0),O=c.useRef(""),g=c.useRef(0),b=c.useRef(null),C=c.useRef("right"),k=c.useRef(0),J=v?Zs:c.Fragment,he=v?{as:Mi,allowPinchZoom:!0}:void 0,z=w=>{const re=O.current+w,se=R().filter(U=>!U.disabled),F=document.activeElement,Z=se.find(U=>U.ref.current===F)?.textValue,le=se.map(U=>U.textValue),Ce=Bi(le,re,Z),$=se.find(U=>U.textValue===Ce)?.ref.current;(function U(ue){O.current=ue,window.clearTimeout(P.current),ue!==""&&(P.current=window.setTimeout(()=>U(""),1e3))})(re),$&&setTimeout(()=>$.focus())};c.useEffect(()=>()=>window.clearTimeout(P.current),[]),Xs();const ce=c.useCallback(w=>C.current===b.current?.side&&zi(w,b.current?.area),[]);return s.jsx(ji,{scope:n,searchRef:O,onItemEnter:c.useCallback(w=>{ce(w)&&w.preventDefault()},[ce]),onItemLeave:c.useCallback(w=>{ce(w)||(N.current?.focus(),I(null))},[ce]),onTriggerLeave:c.useCallback(w=>{ce(w)&&w.preventDefault()},[ce]),pointerGraceTimerRef:g,onPointerGraceIntentChange:c.useCallback(w=>{b.current=w},[]),children:s.jsx(J,{...he,children:s.jsx(Ys,{asChild:!0,trapped:a,onMountAutoFocus:L(o,w=>{w.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:s.jsx(Ws,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:m,children:s.jsx(uo,{asChild:!0,...S,dir:j.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:I,onEntryFocus:L(u,w=>{j.isUsingKeyboardRef.current||w.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(Qs,{role:"menu","aria-orientation":"vertical","data-state":as(y.open),"data-radix-menu-content":"",dir:j.dir,...M,...x,ref:D,style:{outline:"none",...x.style},onKeyDown:L(x.onKeyDown,w=>{const se=w.target.closest("[data-radix-menu-content]")===w.currentTarget,F=w.ctrlKey||w.altKey||w.metaKey,Z=w.key.length===1;se&&(w.key==="Tab"&&w.preventDefault(),!F&&Z&&z(w.key));const le=N.current;if(w.target!==le||!pi.includes(w.key))return;w.preventDefault();const $=R().filter(U=>!U.disabled).map(U=>U.ref.current);Br.includes(w.key)&&$.reverse(),Oi($)}),onBlur:L(e.onBlur,w=>{w.currentTarget.contains(w.target)||(window.clearTimeout(P.current),O.current="")}),onPointerMove:L(e.onPointerMove,ut(w=>{const re=w.target,se=k.current!==w.clientX;if(w.currentTarget.contains(re)&&se){const F=w.clientX>k.current?"right":"left";C.current=F,k.current=w.clientX}}))})})})})})})});Kr.displayName=ie;var Ri="MenuGroup",vn=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Ge.div,{role:"group",...r,ref:t})});vn.displayName=Ri;var Di="MenuLabel",qr=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Ge.div,{...r,ref:t})});qr.displayName=Di;var It="MenuItem",Hn="menu.itemSelect",Bt=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,o=c.useRef(null),i=mt(It,e.__scopeMenu),l=gn(It,e.__scopeMenu),u=dt(t,o),h=c.useRef(!1),f=()=>{const d=o.current;if(!n&&d){const p=new CustomEvent(Hn,{bubbles:!0,cancelable:!0});d.addEventListener(Hn,m=>r?.(m),{once:!0}),eo(d,p),p.defaultPrevented?h.current=!1:i.onClose()}};return s.jsx(Vr,{...a,ref:u,disabled:n,onClick:L(e.onClick,f),onPointerDown:d=>{e.onPointerDown?.(d),h.current=!0},onPointerUp:L(e.onPointerUp,d=>{h.current||d.currentTarget?.click()}),onKeyDown:L(e.onKeyDown,d=>{const p=l.searchRef.current!=="";n||p&&d.key===" "||en.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Bt.displayName=It;var Vr=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,i=gn(It,n),l=zr(n),u=c.useRef(null),h=dt(t,u),[f,d]=c.useState(!1),[p,m]=c.useState("");return c.useEffect(()=>{const v=u.current;v&&m((v.textContent??"").trim())},[o.children]),s.jsx(lt.ItemSlot,{scope:n,disabled:r,textValue:a??p,children:s.jsx(fo,{asChild:!0,...l,focusable:!r,children:s.jsx(Ge.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:h,onPointerMove:L(e.onPointerMove,ut(v=>{r?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:L(e.onPointerLeave,ut(v=>i.onItemLeave(v))),onFocus:L(e.onFocus,()=>d(!0)),onBlur:L(e.onBlur,()=>d(!1))})})})}),Ei="MenuCheckboxItem",Hr=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return s.jsx(Jr,{scope:e.__scopeMenu,checked:n,children:s.jsx(Bt,{role:"menuitemcheckbox","aria-checked":Tt(n)?"mixed":n,...a,ref:t,"data-state":bn(n),onSelect:L(a.onSelect,()=>r?.(Tt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Hr.displayName=Ei;var Xr="MenuRadioGroup",[Ii,Ti]=Te(Xr,{value:void 0,onValueChange:()=>{}}),Yr=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,o=Qn(r);return s.jsx(Ii,{scope:e.__scopeMenu,value:n,onValueChange:o,children:s.jsx(vn,{...a,ref:t})})});Yr.displayName=Xr;var Wr="MenuRadioItem",Qr=c.forwardRef((e,t)=>{const{value:n,...r}=e,a=Ti(Wr,e.__scopeMenu),o=n===a.value;return s.jsx(Jr,{scope:e.__scopeMenu,checked:o,children:s.jsx(Bt,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":bn(o),onSelect:L(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Qr.displayName=Wr;var xn="MenuItemIndicator",[Jr,_i]=Te(xn,{checked:!1}),Zr=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,o=_i(xn,n);return s.jsx(_t,{present:r||Tt(o.checked)||o.checked===!0,children:s.jsx(Ge.span,{...a,ref:t,"data-state":bn(o.checked)})})});Zr.displayName=xn;var ki="MenuSeparator",es=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Ge.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});es.displayName=ki;var Ai="MenuArrow",ts=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Lt(n);return s.jsx(Js,{...a,...r,ref:t})});ts.displayName=Ai;var Pi="MenuSub",[Wc,ns]=Te(Pi),Qe="MenuSubTrigger",rs=c.forwardRef((e,t)=>{const n=_e(Qe,e.__scopeMenu),r=mt(Qe,e.__scopeMenu),a=ns(Qe,e.__scopeMenu),o=gn(Qe,e.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=o,h={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),u(null)}},[l,u]),s.jsx(hn,{asChild:!0,...h,children:s.jsx(Vr,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":as(n.open),...e,ref:Jn(t,a.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:L(e.onPointerMove,ut(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:L(e.onPointerLeave,ut(d=>{f();const p=n.content?.getBoundingClientRect();if(p){const m=n.content?.dataset.side,v=m==="right",x=v?-5:5,y=p[v?"left":"right"],j=p[v?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+x,y:d.clientY},{x:y,y:p.top},{x:j,y:p.top},{x:j,y:p.bottom},{x:y,y:p.bottom}],side:m}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:L(e.onKeyDown,d=>{const p=o.searchRef.current!=="";e.disabled||p&&d.key===" "||gi[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});rs.displayName=Qe;var ss="MenuSubContent",os=c.forwardRef((e,t)=>{const n=$r(ie,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=_e(ie,e.__scopeMenu),i=mt(ie,e.__scopeMenu),l=ns(ss,e.__scopeMenu),u=c.useRef(null),h=dt(t,u);return s.jsx(lt.Provider,{scope:e.__scopeMenu,children:s.jsx(_t,{present:r||o.open,children:s.jsx(lt.Slot,{scope:e.__scopeMenu,children:s.jsx(mn,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:h,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&u.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:L(e.onFocusOutside,f=>{f.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:L(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:L(e.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),p=mi[i.dir].includes(f.key);d&&p&&(o.onOpenChange(!1),l.trigger?.focus(),f.preventDefault())})})})})})});os.displayName=ss;function as(e){return e?"open":"closed"}function Tt(e){return e==="indeterminate"}function bn(e){return Tt(e)?"indeterminate":e?"checked":"unchecked"}function Oi(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Li(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Bi(e,t,n){const a=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=Li(e,Math.max(o,0));a.length===1&&(i=i.filter(h=>h!==n));const u=i.find(h=>h.toLowerCase().startsWith(a.toLowerCase()));return u!==n?u:void 0}function Fi(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const l=t[o],u=t[i],h=l.x,f=l.y,d=u.x,p=u.y;f>r!=p>r&&n<(d-h)*(r-f)/(p-f)+h&&(a=!a)}return a}function zi(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Fi(n,t)}function ut(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Gi=Gr,$i=hn,Ui=Ur,Ki=Kr,qi=vn,Vi=qr,Hi=Bt,Xi=Hr,Yi=Yr,Wi=Qr,Qi=Zr,Ji=es,Zi=ts,ec=rs,tc=os,Ft="DropdownMenu",[nc,Qc]=Yn(Ft,[Fr]),X=Fr(),[rc,is]=nc(Ft),cs=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:o,onOpenChange:i,modal:l=!0}=e,u=X(t),h=c.useRef(null),[f,d]=oo({prop:a,defaultProp:o??!1,onChange:i,caller:Ft});return s.jsx(rc,{scope:t,triggerId:Dn(),triggerRef:h,contentId:Dn(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(p=>!p),[d]),modal:l,children:s.jsx(Gi,{...u,open:f,onOpenChange:d,dir:r,modal:l,children:n})})};cs.displayName=Ft;var ls="DropdownMenuTrigger",us=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,o=is(ls,n),i=X(n);return s.jsx($i,{asChild:!0,...i,children:s.jsx(Ge.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Jn(t,o.triggerRef),onPointerDown:L(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(o.onOpenToggle(),o.open||l.preventDefault())}),onKeyDown:L(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&o.onOpenToggle(),l.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});us.displayName=ls;var sc="DropdownMenuPortal",ds=e=>{const{__scopeDropdownMenu:t,...n}=e,r=X(t);return s.jsx(Ui,{...r,...n})};ds.displayName=sc;var fs="DropdownMenuContent",hs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=is(fs,n),o=X(n),i=c.useRef(!1);return s.jsx(Ki,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:t,onCloseAutoFocus:L(e.onCloseAutoFocus,l=>{i.current||a.triggerRef.current?.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:L(e.onInteractOutside,l=>{const u=l.detail.originalEvent,h=u.button===0&&u.ctrlKey===!0,f=u.button===2||h;(!a.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});hs.displayName=fs;var oc="DropdownMenuGroup",ac=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=X(n);return s.jsx(qi,{...a,...r,ref:t})});ac.displayName=oc;var ic="DropdownMenuLabel",ps=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=X(n);return s.jsx(Vi,{...a,...r,ref:t})});ps.displayName=ic;var cc="DropdownMenuItem",gs=c.forwardRef((e,t)=>
60{const{__scopeDropdownMenu:n,...r}=e,a=X(n);return s.jsx(Hi,{...a,...r,ref:t})});gs.displayName=cc;var lc="DropdownMenuCheckboxItem",ms=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=X(n);return s.jsx(Xi,{...a,...r,ref:t})});ms.displayName=lc;var uc="DropdownMenuRadioGroup",dc=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=X(n);return s.jsx(Yi,{...a,...r,ref:t})});dc.displayName=uc;var fc="DropdownMenuRadioItem",vs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=X(n);return s.jsx(Wi,{...a,...r,ref:t})});vs.displayName=fc;var hc="DropdownMenuItemIndicator",xs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=X(n);return s.jsx(Qi,{...a,...r,ref:t})});xs.displayName=hc;var pc="DropdownMenuSeparator",bs=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=X(n);return s.jsx(Ji,{...a,...r,ref:t})});bs.displayName=pc;var gc="DropdownMenuArrow",mc=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=X(n);return s.jsx(Zi,{...a,...r,ref:t})});mc.displayName=gc;var vc="DropdownMenuSubTrigger",ys=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=X(n);return s.jsx(ec,{...a,...r,ref:t})});ys.displayName=vc;var xc="DropdownMenuSubContent",ws=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=X(n);return s.jsx(tc,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ws.displayName=xc;var bc=cs,yc=us,wc=ds,Cs=hs,js=ps,Ss=gs,Ns=ms,Ms=vs,Rs=xs,Ds=bs,Es=ys,Is=ws;const Cc=bc,jc=yc,Sc=c.forwardRef(({className:e,inset:t,children:n,...r},a)=>s.jsxs(Es,{ref:a,className:we("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,s.jsx(mo,{className:"ml-auto h-4 w-4"})]}));Sc.displayName=Es.displayName;const Nc=c.forwardRef(({className:e,...t},n)=>s.jsx(Is,{ref:n,className:we("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Nc.displayName=Is.displayName;const Ts=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(wc,{children:s.jsx(Cs,{ref:r,sideOffset:t,className:we("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Ts.displayName=Cs.displayName;const _s=c.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(Ss,{ref:r,className:we("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));_s.displayName=Ss.displayName;const Mc=c.forwardRef(({className:e,children:t,checked:n,...r},a)=>s.jsxs(Ns,{ref:a,className:we("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Rs,{children:s.jsx(ao,{className:"h-4 w-4"})})}),t]}));Mc.displayName=Ns.displayName;const Rc=c.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Ms,{ref:r,className:we("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Rs,{children:s.jsx(wo,{className:"h-2 w-2 fill-current"})})}),t]}));Rc.displayName=Ms.displayName;
60const ks=c.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(js,{ref:r,className:we("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));ks.displayName=js.displayName;const As=c.forwardRef(({className:e,...t},n)=>s.jsx(Ds,{ref:n,className:we("-mx-1 my-1 h-px bg-muted",e),...t}));As.displayName=Ds.displayName;const Dc={hero:tn,text:pr,image:nr,gallery:ur,cta:fr,faq:ir,testimonials:rr,services:sr,features:hr,stats:or,video:ar,form:lr,divider:dr,custom:cr},Ec={Layout:["hero","divider"],Content:["text","image","gallery","video"],Conversion:["cta","form","testimonials"],Data:["faq","features","stats","services"],Advanced:["custom"]};function Xn({onAddBlock:e}){return s.jsxs(Cc,{children:[s.jsx(jc,{asChild:!0,children:s.jsxs(W,{children:[s.jsx(St,{className:"h-4 w-4 mr-2"}),"Add Block"]})}),s.jsx(Ts,{align:"end",className:"w-56",children:Object.entries(Ec).map(([t,n],r)=>s.jsxs("div",{children:[r>0&&s.jsx(As,{}),s.jsx(ks,{children:t}),n.map(a=>{const o=Dc[a],i=fn[a];return s.jsxs(_s,{onClick:()=>e(a),className:"cursor-pointer",children:[s.jsx(o,{className:"h-4 w-4 mr-2"}),i.label]},a)})]},t))})]})}const Jc=()=>{const{id:e}=io(),t=co(),n=e==="new",[r,a]=c.useState({id:"",slug:"",title:"",meta_title:null,meta_description:null,featured_image:null,status:"draft",region:"global"}),[o,i]=c.useState([]),[l,u]=c.useState(!n),[h,f]=c.useState(!1),[d,p]=c.useState(!1),[m,v]=c.useState(new Set),x=Lo(An(un),An(cn,{coordinateGetter:ci}));c.useEffect(()=>{!n&&e&&(y(),j())},[e,n]);const y=async()=>{const{data:g,error:b}=await Ee.from("cms_pages").select("*").eq("id",e).maybeSingle();g&&a(g),u(!1)},j=async()=>{const{data:g}=await Ee.from("cms_blocks").select("*").eq("page_id",e).order("sort_order",{ascending:!0});g&&i(g.map(b=>({id:b.id,block_type:b.block_type,content:b.content,sort_order:b.sort_order,is_visible:b.is_visible})))},M=g=>{const{active:b,over:C}=g;C&&b.id!==C.id&&i(k=>{const J=k.findIndex(z=>z.id===b.id),he=k.findIndex(z=>z.id===C.id);return dn(k,J,he)})},S=g=>{const b=fn[g],C={id:`new-${Date.now()}`,block_type:g,content:{...b.defaultContent},sort_order:o.length,is_visible:!0};i([...o,C]),v(new Set([...m,C.id]))},R=(g,b)=>{i(o.map(C=>C.id===g?{...C,content:b}:C))},_=g=>{i(o.map(b=>b.id===g?{...b,is_visible:!b.is_visible}:b))},I=g=>{confirm("Delete this block?")&&i(o.filter(b=>b.id!==g))},N=g=>{const b=new Set(m);b.has(g)?b.delete(g):b.add(g),v(b)},D=()=>{const g=[r.title];return o.forEach(b=>{const C=b.content;C.headline&&g.push(String(C.headline)),C.subheadline&&g.push(String(C.subheadline)),C.body&&g.push(String(C.body)),C.title&&g.push(String(C.title)),C.description&&g.push(String(C.description)),C.items&&Array.isArray(C.items)&&C.items.forEach(k=>{k.question&&g.push(k.question),k.answer&&g.push(k.answer),k.title&&g.push(k.title),k.description&&g.push(k.description)})}),g.filter(Boolean).join(" ").slice(0,2e3)},P=async()=>{if(!r.title){Fe.error("Please add a page title first");return}p(!0);try{const g=D(),b=r.slug||r.title.toLowerCase().replace(/\s+/g,"-"),C=await Ee.functions.invoke("generate-seo",{body:{pageTitle:r.title,pageSlug:b,pageContent:g,industry:"warehouse logistics, material handling, industrial services",companyName:"MTLI Group"}});if(C.error)throw C.error;const{metaTitle:k,metaDescription:J}=C.data;a(he=>({...he,meta_title:k,meta_description:J})),Fe.success("SEO content generated! Review and save.")}catch{Fe.error("Failed to generate SEO. Please try again.")}p(!1)},O=async()=>{if(!r.title||!r.slug){Fe.error("Title and slug are required");return}f(!0);try{let g=r.id;if(n){const{data:b,error:C}=await Ee.from("cms_pages").insert([{title:r.title,slug:r.slug,meta_title:r.meta_title,meta_description:r.meta_description,featured_image:r.featured_image,status:r.status,region:r.region}]).select("id").single();if(C)throw C;g=b.id}else{const{error:b}=await Ee.from("cms_pages").update({title:r.title,slug:r.slug,meta_title:r.meta_title,meta_description:r.meta_description,featured_image:r.featured_image,status:r.status,region:r.region}).eq("id",e);if(b)throw b}if(n||await Ee.from("cms_blocks").delete().eq("page_id",e),o.length>0){const b=o.map((k,J)=>({page_id:g,block_type:k.block_type,content:JSON.parse(JSON.stringify(k.content)),sort_order:J,is_visible:k.is_visible})),{error:C}=await Ee.from("cms_blocks").insert(b);if(C)throw C}Fe.success("Page saved successfully"),n?t(`/admin/pages/${g}`):j()}catch{Fe.error("Failed to save page. Please try again.")}f(!1)};return l?s.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:s.jsx(Ut,{className:"h-8 w-8 animate-spin text-primary"})}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs(W,{variant:"ghost",onClick:()=>t("/admin/pages"),children:[s.jsx(vo,{className:"h-4 w-4 mr-2"}),"Back"]}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-bold",children:n?"New Page":`Edit: ${r.title}`}),!n&&s.jsxs("p",{className:"text-sm text-muted-foreground",children:["/",r.slug]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Zn,{variant:r.status==="published"?"default":"secondary",children:r.status}),!n&&s.jsxs(W,{variant:"outline",onClick:()=>window.open(`/${r.slug}`,"_blank"),children:[s.jsx(tr,{className:"h-4 w-4 mr-2"}),"Preview"]}),s.jsxs(W,{onClick:O,disabled:h,children:[h?s.jsx(Ut,{className:"h-4 w-4 mr-2 animate-spin"}):s.jsx(xo,{className:"h-4 w-4 mr-2"}),"Save"]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[s.jsx(_n,{className:"h-5 w-5"}),"Content Blocks (",o.length,")"]}),s.jsx(Xn,{onAddBlock:S})]}),o.length===0?s.jsx(wt,{children:s.jsxs(Ct,{className:"py-12 text-center",children:[s.jsx(_n,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),s.jsx("h3",{className:"font-medium mb-2",children:"No blocks yet"}),s.jsx("p",{className:"text-muted-foreground text-sm mb-4",children:"Add blocks to build your page content"}),s.jsx(Xn,{onAddBlock:S})]})}):s.jsx(Fa,{sensors:x,collisionDetection:Fo,onDragEnd:M,children:s.jsx(Ja,{items:o.map(g=>g.id),strategy:Wa,children:s.jsx("div",{className:"space-y-3",children:o.map(g=>s.jsx(di,{block:g,isExpanded:m.has(g.id),onToggleExpand:()=>N(g.id),onToggleVisibility:()=>_(g.id),onDelete:()=>I(g.id),children:s.jsx(fi,{blockType:g.block_type,content:g.content,onChange:b=>R(g.id,b)})},g.id))})})})]}),s.jsx("div",{className:"space-y-4",children:s.jsxs(ho,{defaultValue:"settings",children:[s.jsxs(po,{className:"w-full",children:[s.jsxs(In,{value:"settings",className:"flex-1",children:[s.jsx(bo,{className:"h-4 w-4 mr-1"}),"Settings"]}),s.jsxs(In,{value:"seo",className:"flex-1",children:[s.jsx(lo,{className:"h-4 w-4 mr-1"}),"SEO"]})]}),s.jsx(Tn,{value:"settings",className:"mt-4",children:s.jsxs(wt,{children:[s.jsx(Xt,{children:s.jsx(En,{className:"text-base",children:"Page Settings"})}),s.jsxs(Ct,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Title *"}),s.jsx(B,{value:r.title,onChange:g=>a({...r,title:g.target.value}),placeholder:"Page Title"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Slug *"}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-muted-foreground",children:"/"}),s.jsx(B,{value:r.slug,onChange:g=>a({...r,slug:g.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"-")}),placeholder:"page-slug"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Status"}),s.jsxs(Je,{value:r.status||"draft",onValueChange:g=>a({...r,status:g}),children:[s.jsx(Ze,{children:s.jsx(et,{})}),s.jsxs(tt,{children:[s.jsx(V,{value:"draft",children:"Draft"}),s.jsx(V,{value:"published",children:"Published"}),s.jsx(V,{value:"scheduled",children:"Scheduled"}),s.jsx(V,{value:"archived",children:"Archived"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Region / Site"}
60),s.jsxs(Je,{value:r.region||"global",onValueChange:g=>a({...r,region:g}),children:[s.jsx(Ze,{children:s.jsx(et,{})}),s.jsxs(tt,{children:[s.jsx(V,{value:"global",children:"🌐 Global (Both Sites)"}),s.jsx(V,{value:"ca-en",children:"🍁 mtli.ca (English)"}),s.jsx(V,{value:"ca-fr",children:"🍁 mtli.ca (French)"}),s.jsx(V,{value:"us",children:"🇺🇸 mtligroup.com (USA)"})]})]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[r.region==="us"&&"Shows on mtligroup.com only",r.region==="ca-en"&&"Shows on mtli.ca English only",r.region==="ca-fr"&&"Shows on mtli.ca French only",(r.region==="global"||!r.region)&&"Shows on both sites"]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Featured Image URL"}),s.jsx(B,{value:r.featured_image||"",onChange:g=>a({...r,featured_image:g.target.value}),placeholder:"https://..."})]})]})]})}),s.jsx(Tn,{value:"seo",className:"mt-4",children:s.jsxs(wt,{children:[s.jsxs(Xt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(En,{className:"text-base",children:"SEO Settings"}),s.jsxs(W,{size:"sm",variant:"outline",onClick:P,disabled:d,className:"gap-1",children:[d?s.jsx(Ut,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(yo,{className:"h-3.5 w-3.5"}),d?"Generating...":"AI Generate"]})]}),s.jsxs(Ct,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Meta Title"}),s.jsx(B,{value:r.meta_title||"",onChange:g=>a({...r,meta_title:g.target.value}),placeholder:"SEO page title"}),s.jsxs("p",{className:`text-xs ${(r.meta_title||"").length>60?"text-destructive":"text-muted-foreground"}`,children:[(r.meta_title||"").length,"/60 characters"]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(E,{children:"Meta Description"}),s.jsx(Ie,{value:r.meta_description||"",onChange:g=>a({...r,meta_description:g.target.value}),placeholder:"SEO description",rows:3}),s.jsxs("p",{className:`text-xs ${(r.meta_description||"").length>160?"text-destructive":"text-muted-foreground"}`,children:[(r.meta_description||"").length,"/160 characters"]})]}),s.jsxs("div",{className:"pt-4 border-t",children:[s.jsx(E,{className:"text-xs text-muted-foreground mb-2 block",children:"Search Preview"}),s.jsxs("div",{className:"bg-muted/50 rounded-lg p-3 space-y-1",children:[s.jsxs("p",{className:"text-primary text-sm font-medium truncate",children:[r.meta_title||r.title||"Page Title"," | MTLI Group"]}),s.jsxs("p",{className:"text-xs text-primary/70 truncate",children:["mtli.ca/",r.slug||"page-slug"]}),s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:r.meta_description||"Add a meta description to help search engines understand your page content."})]})]})]})]})})]})})]})]})};export{Jc as default};
61//# sourceMappingURL=AdminPageEditor-CinxnM_t.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.