@chaibuilder/sdk 1.1.12 → 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddBlocks-Rd2EpNMr.js → AddBlocks-A7WofxHV.js} +29 -37
- package/dist/AddBlocks-Yuc4t0Z_.cjs +1 -0
- package/dist/{BrandingOptions-rTaSfm0M.cjs → BrandingOptions-KkPF1OGn.cjs} +1 -1
- package/dist/{BrandingOptions-OVjd8R6I.js → BrandingOptions-wkFrLFI_.js} +2 -2
- package/dist/{CanvasArea-RGTkdcs7.js → CanvasArea-chEYQhH8.js} +10 -17
- package/dist/{CanvasArea-OXK5ZBHd.cjs → CanvasArea-kF46NWZK.cjs} +2 -2
- package/dist/{CurrentPage-8mHwqtUF.js → CurrentPage-Wd7F9Egg.js} +15 -23
- package/dist/CurrentPage-p9MaXTOB.cjs +1 -0
- package/dist/{Layers-BjP8kxlY.js → Layers-qMOMP2Mi.js} +9 -17
- package/dist/Layers-wQ0Fv9Xc.cjs +1 -0
- package/dist/{MarkAsGlobalBlock--GjBOKA4.js → MarkAsGlobalBlock-Czq45Amf.js} +2 -2
- package/dist/{MarkAsGlobalBlock-GV1kflbN.cjs → MarkAsGlobalBlock-sb3hMXLq.cjs} +1 -1
- package/dist/PagesPanel--maZxwX5.cjs +1 -0
- package/dist/{PagesPanel-gwiGbDKn.js → PagesPanel-ay4uk4mg.js} +7 -15
- package/dist/ProjectPanel-KhIpO7m3.cjs +1 -0
- package/dist/{ProjectPanel-ruWizkTT.js → ProjectPanel-eLlbfAtj.js} +19 -27
- package/dist/{Settings-WtHFLTVf.js → Settings-lpoxaMDu.js} +8 -16
- package/dist/Settings-n2DpS5Ta.cjs +1 -0
- package/dist/SidePanels-Dud5Xh9L.cjs +1 -0
- package/dist/{SidePanels-Hxu9nfmz.js → SidePanels-iRXV69vh.js} +10 -18
- package/dist/{Topbar-qloDpVn7.js → Topbar-dQYhW4iv.js} +2 -2
- package/dist/{Topbar-P3sqe-wG.cjs → Topbar-vqzjB75a.cjs} +1 -1
- package/dist/{UnsplashImages-8p0Vu9j_.cjs → UnsplashImages-3Sh4UZ-7.cjs} +1 -1
- package/dist/{UnsplashImages-aVlfl8Rj.js → UnsplashImages-AL1ASAoD.js} +2 -2
- package/dist/{UploadImages-7xgCWSqx.js → UploadImages-09wuhk2O.js} +2 -2
- package/dist/{UploadImages-PjW68B7L.cjs → UploadImages-mPzLhMiH.cjs} +1 -1
- package/dist/add-page-modal-FPnIWwqA.cjs +1 -0
- package/dist/{add-page-modal-God3usfm.js → add-page-modal-TXREEFPZ.js} +20 -28
- package/dist/{confirm-alert-OQrR9mLj.js → confirm-alert-GkfW9chS.js} +2 -2
- package/dist/{confirm-alert-Wvv7pPyF.cjs → confirm-alert-YNyc3WEo.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +55 -63
- package/dist/{delete-page-modal-Whkna9tP.js → delete-page-modal-LNME2FwD.js} +20 -28
- package/dist/delete-page-modal-sTbqZPvk.cjs +1 -0
- package/dist/{form-W_17vJvn.js → form-Fk4CaX1A.js} +1 -1
- package/dist/{form-1HQKf4Lc.cjs → form-OhgCJlVA.cjs} +1 -1
- package/dist/functions-ZWGlwlQY.cjs +1 -0
- package/dist/functions-slns6ONz.js +23 -0
- package/dist/html-to-json-kGgp07Hv.js +177 -0
- package/dist/html-to-json-po8on2ju.cjs +1 -0
- package/dist/{index-OgEmBQj6.cjs → index-61c5wSJn.cjs} +2 -2
- package/dist/{index-D15K4BZT.js → index-89A3jPHh.js} +2 -2
- package/dist/{index-MIe2pKhn.cjs → index-GNmGzavZ.cjs} +1 -1
- package/dist/{index-TP8jhZbU.js → index-Q5q5Y_8a.js} +16 -16
- package/dist/lib.cjs +2 -1
- package/dist/lib.d.ts +2 -65
- package/dist/lib.js +1140 -230
- package/dist/page-viewer-LPx-OTCC.js +110 -0
- package/dist/page-viewer-wQO9oV9h.cjs +1 -0
- package/dist/project-general-setting-8EwuN5lN.cjs +1 -0
- package/dist/{project-general-setting-AIICdB3T.js → project-general-setting-sSpFUD_Y.js} +8 -16
- package/dist/{project-seo-setting-bW4cNODi.js → project-seo-setting-CGVegBtM.js} +3 -3
- package/dist/{project-seo-setting-uEYqfVt6.cjs → project-seo-setting-R77SKM1I.cjs} +1 -1
- package/dist/render.cjs +1 -1
- package/dist/render.js +44 -50
- package/dist/{single-page-detail-D2NIiDP6.js → single-page-detail-32H1_IG4.js} +54 -62
- package/dist/single-page-detail-nyBEHLtT.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +6 -14
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.js +65 -7
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +2 -2
- package/dist/{useAddBlockByDrop-8i3iNtPF.cjs → useAddBlockByDrop-4VH-SMj7.cjs} +1 -1
- package/dist/{useAddBlockByDrop-wiagwec5.js → useAddBlockByDrop-_kyR0iI4.js} +1 -1
- package/dist/utils-tx6hqsHY.cjs +1 -0
- package/dist/{utils-PPBbw5bk.js → utils-zWMk4dB2.js} +18 -17
- package/package.json +1 -1
- package/dist/AddBlocks-YS5XlqpG.cjs +0 -1
- package/dist/CurrentPage-PrMEc3YN.cjs +0 -1
- package/dist/Layers-zYr-uaHA.cjs +0 -1
- package/dist/PagesPanel-23_rqlAI.cjs +0 -1
- package/dist/ProjectPanel-faZxtDbA.cjs +0 -1
- package/dist/Settings-RjUeZe8o.cjs +0 -1
- package/dist/SidePanels-7GPjyIEE.cjs +0 -1
- package/dist/add-page-modal-HyQBukId.cjs +0 -1
- package/dist/delete-page-modal-L2P69sjk.cjs +0 -1
- package/dist/functions-JFP-oMsY.js +0 -1109
- package/dist/functions-KMQYiBHf.cjs +0 -2
- package/dist/page-viewer-3X3bD4I6.cjs +0 -1
- package/dist/page-viewer-xv8TBR-B.js +0 -118
- package/dist/project-general-setting-IJFP4L0Q.cjs +0 -1
- package/dist/single-page-detail-7-lC8BG1.cjs +0 -1
- package/dist/tailwind-config-OxLD7oFU.cjs +0 -1
- package/dist/tailwind-config-d1VL1lzE.js +0 -62
- package/dist/utils-It2K33fU.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./jsx-runtime-WUGKV8jN.cjs"),w=require("react"),fn=require("@radix-ui/react-toggle"),re=require("class-variance-authority"),c=require("./utils-It2K33fU.cjs"),xn=require("@radix-ui/react-switch"),gn=require("@radix-ui/react-slot"),bn=require("@radix-ui/react-accordion"),L=require("@radix-ui/react-icons"),hn=require("@radix-ui/react-alert-dialog"),vn=require("@radix-ui/react-dialog"),yn=require("@radix-ui/react-label"),jn=require("@radix-ui/react-scroll-area"),wn=require("@radix-ui/react-tabs"),Rn=require("@radix-ui/react-tooltip"),kn=require("@radix-ui/react-popover"),Nn=require("@radix-ui/react-menubar"),An=require("@radix-ui/react-hover-card"),Sn=require("@radix-ui/react-select"),Cn=require("@radix-ui/react-dropdown-menu"),En=require("@radix-ui/react-separator"),_n=require("@radix-ui/react-toast"),U=require("cmdk"),Bn=require("@radix-ui/react-context-menu"),vt=require("react-icons-picker"),Pn=require("react-dom"),i=require("lodash"),Tn=require("react-quill"),u=require("jotai"),yt=require("flat-to-nested"),fe=require("redux-undo"),F=require("./MODIFIERS-WFzDQfiT.cjs"),In=require("@chaibuilder/runtime"),Mn=require("@react-hookz/web");require("react-i18next");function D(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const f=D(w),jt=D(fn),Oe=D(xn),ae=D(bn),V=D(hn),_=D(vn),wt=D(yn),oe=D(jn),ie=D(wn),de=D(Rn),ge=D(kn),C=D(Nn),ke=D(An),M=D(Sn),B=D(Cn),Rt=D(En),G=D(_n),P=D(Bn);var O={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let Dn=0;function K(e,t){const s=`atom${++Dn}`,o={toString:()=>s};return typeof e=="function"?o.read=e:(o.init=e,o.read=a=>a(o),o.write=(a,r,l)=>r(o,typeof l=="function"?l(a(o)):l)),t&&(o.write=t),o}const Pe=e=>"init"in e,Te=e=>!!e.write,je=new WeakMap,On=(e,t)=>{je.set(e,t),e.catch(()=>{}).finally(()=>je.delete(e))},at=(e,t)=>{const s=je.get(e);s&&(je.delete(e),s(t))},rt=(e,t)=>{e.status="fulfilled",e.value=t},it=(e,t)=>{e.status="rejected",e.reason=t},Ln=e=>typeof(e==null?void 0:e.then)=="function",pe=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),lt=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),ce=e=>"v"in e&&e.v instanceof Promise,Vn=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,he=e=>{if("e"in e)throw e.e;return e.v},kt=()=>{const e=new WeakMap,t=new WeakMap,s=new Map;let o,a,r;(O?"production":void 0)!=="production"&&(o=new Set,a=new Set,r=new Set);const l=m=>e.get(m),p=(m,g)=>{(O?"production":void 0)!=="production"&&Object.freeze(g);const y=e.get(m);if(e.set(m,g),s.has(m)||s.set(m,y),y&&ce(y)){const b="v"in g?g.v instanceof Promise?g.v:Promise.resolve(g.v):Promise.reject(g.e);at(y.v,b)}},x=(m,g,y)=>{const b=new Map;let j=!1;y.forEach((v,k)=>{!v&&k===m&&(v=g),v?(b.set(k,v),g.d.get(k)!==v&&(j=!0)):(O?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(j||g.d.size!==b.size)&&(g.d=b)},d=(m,g,y)=>{const b=l(m),j={d:(b==null?void 0:b.d)||new Map,v:g};if(y&&x(m,j,y),b&&pe(b,j)&&b.d===j.d)return b;if(b&&ce(b)&&ce(j)&&Vn(b,j)){if(b.d===j.d)return b;j.v=b.v}return p(m,j),j},h=(m,g,y,b)=>{if(Ln(g)){let j;const v=new Promise((k,T)=>{let A=!1;g.then(E=>{if(!A){A=!0;const S=l(m),J=d(m,v,y);rt(v,E),k(E),(S==null?void 0:S.d)!==J.d&&$(m,J,S==null?void 0:S.d)}},E=>{if(!A){A=!0;const S=l(m),J=d(m,v,y);it(v,E),T(E),(S==null?void 0:S.d)!==J.d&&$(m,J,S==null?void 0:S.d)}}),j=E=>{A||(A=!0,E.then(S=>rt(v,S),S=>it(v,S)),k(E))}});return v.orig=g,v.status="pending",On(v,k=>{k&&j(k),b==null||b()}),d(m,v,y)}return d(m,g,y)},R=(m,g,y)=>{const b=l(m),j={d:(b==null?void 0:b.d)||new Map,e:g};return y&&x(m,j,y),b&<(b,j)&&b.d===j.d?b:(p(m,j),j)},N=m=>{const g=l(m);if(g&&(g.d.forEach((A,E)=>{E!==m&&!t.has(E)&&N(E)}),Array.from(g.d).every(([A,E])=>{const S=l(A);return A===m||S===E||S&&!ce(S)&&pe(S,E)})))return g;const y=new Map;let b=!0;const j=A=>{if(A===m){const S=l(A);if(S)return y.set(A,S),he(S);if(Pe(A))return y.set(A,void 0),A.init;throw new Error("no atom init")}const E=N(A);return y.set(A,E),he(E)};let v,k;const T={get signal(){return v||(v=new AbortController),v.signal},get setSelf(){return(O?"production":void 0)!=="production"&&!Te(m)&&console.warn("setSelf function cannot be used with read-only atom"),!k&&Te(m)&&(k=(...A)=>{if((O?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return Q(m,...A)}),k}};try{const A=m.read(j,T);return h(m,A,y,()=>v==null?void 0:v.abort())}catch(A){return R(m,A,y)}finally{b=!1}},I=m=>he(N(m)),q=m=>{let g=t.get(m);return g||(g=Y(m)),g},z=(m,g)=>!g.l.size&&(!g.t.size||g.t.size===1&&g.t.has(m)),X=m=>{const g=t.get(m);g&&z(m,g)&&se(m)},le=m=>{const g=new Map,y=new WeakMap,b=v=>{const k=t.get(v);k==null||k.t.forEach(T=>{T!==v&&(g.set(T,(g.get(T)||new Set).add(v)),y.set(T,(y.get(T)||0)+1),b(T))})};b(m);const j=v=>{const k=t.get(v);k==null||k.t.forEach(T=>{var A;if(T!==v){let E=y.get(T);if(E&&y.set(T,--E),!E){let S=!!((A=g.get(T))!=null&&A.size);if(S){const J=l(T),pn=N(T);S=!J||!pe(J,pn)}S||g.forEach(J=>J.delete(T))}j(T)}})};j(m)},Z=(m,...g)=>{let y=!0;const b=k=>he(N(k)),j=(k,...T)=>{let A;if(k===m){if(!Pe(k))throw new Error("atom not writable");const E=l(k),S=h(k,T[0]);(!E||!pe(E,S))&&le(k)}else A=Z(k,...T);if(!y){const E=ee();(O?"production":void 0)!=="production"&&a.forEach(S=>S({type:"async-write",flushed:E}))}return A},v=m.write(b,j,...g);return y=!1,v},Q=(m,...g)=>{const y=Z(m,...g),b=ee();return(O?"production":void 0)!=="production"&&a.forEach(j=>j({type:"write",flushed:b})),y},Y=(m,g)=>{const y={t:new Set(g&&[g]),l:new Set};if(t.set(m,y),(O?"production":void 0)!=="production"&&r.add(m),N(m).d.forEach((b,j)=>{const v=t.get(j);v?v.t.add(m):j!==m&&Y(j,m)}),N(m),Te(m)&&m.onMount){const b=m.onMount((...j)=>Q(m,...j));b&&(y.u=b)}return y},se=m=>{var g;const y=(g=t.get(m))==null?void 0:g.u;y&&y(),t.delete(m),(O?"production":void 0)!=="production"&&r.delete(m);const b=l(m);b?(ce(b)&&at(b.v),b.d.forEach((j,v)=>{if(v!==m){const k=t.get(v);k&&(k.t.delete(m),z(v,k)&&se(v))}})):(O?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},$=(m,g,y)=>{const b=new Set(g.d.keys());y==null||y.forEach((j,v)=>{if(b.has(v)){b.delete(v);return}const k=t.get(v);k&&(k.t.delete(m),z(v,k)&&se(v))}),b.forEach(j=>{const v=t.get(j);v?v.t.add(m):t.has(m)&&Y(j,m)})},ee=()=>{let m;for((O?"production":void 0)!=="production"&&(m=new Set);s.size;){const g=Array.from(s);s.clear(),g.forEach(([y,b])=>{const j=l(y);if(j){j.d!==(b==null?void 0:b.d)&&$(y,j,b==null?void 0:b.d);const v=t.get(y);v&&!(b&&!ce(b)&&(pe(b,j)||lt(b,j)))&&(v.l.forEach(k=>k()),(O?"production":void 0)!=="production"&&m.add(y))}else(O?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((O?"production":void 0)!=="production")return o.forEach(g=>g("state")),m},te=(m,g)=>{const y=q(m),b=ee(),j=y.l;return j.add(g),(O?"production":void 0)!=="production"&&(o.forEach(v=>v("sub")),a.forEach(v=>v({type:"sub",flushed:b}))),()=>{j.delete(g),X(m),(O?"production":void 0)!=="production"&&(o.forEach(v=>v("unsub")),a.forEach(v=>v({type:"unsub"})))}};return(O?"production":void 0)!=="production"?{get:I,set:Q,sub:te,dev_subscribe_store:(m,g)=>g!==2?(console.warn("The current StoreListener revision is 2. The older ones are deprecated."),o.add(m),()=>{o.delete(m)}):(a.add(m),()=>{a.delete(m)}),dev_get_mounted_atoms:()=>r.values(),dev_get_atom_state:m=>e.get(m),dev_get_mounted:m=>t.get(m),dev_restore_atoms:m=>{for(const[y,b]of m)Pe(y)&&(h(y,b),le(y));const g=ee();a.forEach(y=>y({type:"restore",flushed:g}))}}:{get:I,set:Q,sub:te}};let Ie;const zn=()=>(Ie||(Ie=kt()),Ie);var Fn={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const qn=w.createContext(void 0),qe=e=>{const t=w.useContext(qn);return(e==null?void 0:e.store)||t||zn()};const Un=e=>typeof(e==null?void 0:e.then)=="function",$n=w.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function Nt(e,t){const s=qe(t),[[o,a,r],l]=w.useReducer(d=>{const h=s.get(e);return Object.is(d[0],h)&&d[1]===s&&d[2]===e?d:[h,s,e]},void 0,()=>[s.get(e),s,e]);let p=o;(a!==s||r!==e)&&(l(),p=s.get(e));const x=t==null?void 0:t.delay;return w.useEffect(()=>{const d=s.sub(e,()=>{if(typeof x=="number"){setTimeout(l,x);return}l()});return l(),d},[s,e,x]),w.useDebugValue(p),Un(p)?$n(p):p}function At(e,t){const s=qe(t);return w.useCallback((...a)=>{if((Fn?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return s.set(e,...a)},[s,e])}function Gn(e,t){return[Nt(e,t),At(e,t)]}var Ue={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const St=Symbol();function Hn(e,t){const s=K(e,(o,a,r)=>a(s,t(o(s),r)));return s}const ct=(e,t,s)=>(t.has(s)?t:t.set(s,e())).get(s),Wn=new WeakMap,Yn=(e,t,s)=>{const o=ct(()=>new WeakMap,Wn,t);return ct(e,o,s)},Kn={},dt=e=>!!e.write,Jn=e=>typeof e=="function";function Qn(e,t){return Yn(()=>{const s=new WeakMap,o=(l,p)=>{let x=s.get(l);if(x)return x;const d=p&&s.get(p),h=[],R=[];return l.forEach((N,I)=>{const q=t?t(N):I;R[I]=q;const z=d&&d.atomList[d.keyList.indexOf(q)];if(z){h[I]=z;return}const X=Z=>{const Q=Z(a),Y=Z(e),$=o(Y,Q==null?void 0:Q.arr).keyList.indexOf(q);if($<0||$>=Y.length){const ee=l[o(l).keyList.indexOf(q)];if(ee)return ee;throw new Error("splitAtom: index out of bounds for read")}return Y[$]},le=(Z,Q,Y)=>{const se=Z(a),$=Z(e),te=o($,se==null?void 0:se.arr).keyList.indexOf(q);if(te<0||te>=$.length)throw new Error("splitAtom: index out of bounds for write");const m=Jn(Y)?Y($[te]):Y;Q(e,[...$.slice(0,te),m,...$.slice(te+1)])};h[I]=dt(e)?K(X,le):K(X)}),d&&d.keyList.length===R.length&&d.keyList.every((N,I)=>N===R[I])?x=d:x={arr:l,atomList:h,keyList:R},s.set(l,x),x},a=K(l=>{const p=l(a),x=l(e);return o(x,p==null?void 0:p.arr)});(Ue?"production":void 0)!=="production"&&(a.debugPrivate=!0),a.init=void 0;const r=dt(e)?K(l=>l(a).atomList,(l,p,x)=>{switch(x.type){case"remove":{const d=l(r).indexOf(x.atom);if(d>=0){const h=l(e);p(e,[...h.slice(0,d),...h.slice(d+1)])}break}case"insert":{const d=x.before?l(r).indexOf(x.before):l(r).length;if(d>=0){const h=l(e);p(e,[...h.slice(0,d),x.value,...h.slice(d)])}break}case"move":{const d=l(r).indexOf(x.atom),h=x.before?l(r).indexOf(x.before):l(r).length;if(d>=0&&h>=0){const R=l(e);d<h?p(e,[...R.slice(0,d),...R.slice(d+1,h),R[d],...R.slice(h)]):p(e,[...R.slice(0,h),R[d],...R.slice(h,d),...R.slice(d+1)])}break}}}):K(l=>l(a).atomList);return r},e,t||Kn)}function Xn(e){const t=Symbol(),s=K(t);(Ue?"production":void 0)!=="production"&&(s.debugPrivate=!0);const o=K((a,r)=>{const l=a(s);return l!==t?l:e(a,r)},(a,r,l)=>{if(l===St)r(s,t);else if(typeof l=="function"){const p=a(o);r(s,l(p))}else r(s,l)});return o}const Zn=e=>typeof(e==null?void 0:e.then)=="function";function ea(e){let t,s;const o={getItem:(a,r)=>{var l,p;const x=h=>{if(h=h||"",t!==h){try{s=JSON.parse(h)}catch{return r}t=h}return s},d=(p=(l=e())==null?void 0:l.getItem(a))!=null?p:null;return Zn(d)?d.then(x):x(d)},setItem:(a,r)=>{var l;return(l=e())==null?void 0:l.setItem(a,JSON.stringify(r))},removeItem:a=>{var r;return(r=e())==null?void 0:r.removeItem(a)}};return typeof window<"u"&&typeof window.addEventListener=="function"&&(o.subscribe=(a,r,l)=>{if(!(e()instanceof window.Storage))return()=>{};const p=x=>{if(x.storageArea===e()&&x.key===a){let d;try{d=JSON.parse(x.newValue||"")}catch{d=l}r(d)}};return window.addEventListener("storage",p),()=>{window.removeEventListener("storage",p)}}),o}const ta=ea(()=>typeof window<"u"?window.localStorage:void 0);function ue(e,t,s=ta,o){const a=o==null?void 0:o.unstable_getOnInit,r=K(a?s.getItem(e,t):t);return(Ue?"production":void 0)!=="production"&&(r.debugPrivate=!0),r.onMount=p=>{a||p(s.getItem(e,t));let x;return s.subscribe&&(x=s.subscribe(e,p,t)),x},K(p=>p(r),(p,x,d)=>{const h=typeof d=="function"?d(p(r)):d;return h===St?(x(r,t),s.removeItem(e)):h instanceof Promise?h.then(R=>(x(r,R),s.setItem(e,R))):(x(r,h),s.setItem(e,h))})}const Ne=u.atom(null);Ne.debugLabel="chaiBuilderPropsAtom";const Ct=u.atom({});Ct.debugLabel="chaiExternalDataAtom";const sa=()=>!1,oa=e=>{const t=e.replace(F.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}};const na=new yt({children:"blockNodes"}),Et=(e,t=null)=>i.flatten(e.map(s=>{if(s=t!==null?{...s,parent:t}:s,s.children&&s.children.length){const o=[...s.children];return delete s.children,i.flatten([s,...Et(o,s._id)])}return s}));function _t(e,t,s){const o=i.filter(e,r=>r._parent===t),a=[];for(let r=0;r<o.length;r++){const l=Bt(o[r]);if(Object.keys(l).length>0&&Object.keys(l).forEach(p=>{o[r][p]=`slot:${c.generateUUID()}`}),i.filter(e,{_parent:o[r]._id}).length>0){const p=c.generateUUID();a.push({...o[r],oldId:o[r]._id,_id:p,_parent:s}),a.push(i.flatten(_t(e,o[r]._id,p)))}else a.push({...o[r],oldId:o[r]._id,_id:c.generateUUID(),_parent:s})}return i.flatten(a)}function aa(e){let t=na.convert(e.map(s=>i.omit(s,["settings"])));return t=!t.type&&t.blockNodes?t.blockNodes:i.isEmpty(t)?[]:[t],t}const Bt=e=>{const t={};return Object.keys(e).forEach(s=>{i.isString(e[s])&&e[s].startsWith("slot")&&(t[s]=e[s].replace("slot:",""))}),t},ra=(e,t,s=null)=>{let o=i.find(e,{_id:t});o={...o,oldId:o._id,_id:c.generateUUID()},s&&(o={...o,_parent:s});const a=[o];i.filter(e,{_parent:t}).length>0&&a.push(i.flatten(_t(e,t,o._id)));const r=i.flatten(a);return i.map(r,l=>{const p=l,x=Bt(p);return Object.keys(x).length>0&&Object.keys(x).forEach(d=>{const h=i.find(r,{oldId:x[d].replace("slot:","")});p[d]=`slot:${h._id}`}),i.omit(p,["global","oldId"])})};const ia=fe((e=[],t)=>{switch(t.type){case"add_new_blocks":case"add_duplicate_blocks":return[...e,...t.payload];case"create_snapshot":return[...e];case"set_blocks":case"set_page_blocks":return[...t.payload];case"update_props":case"update_props_realtime":const{payload:s}=t;return e.map(o=>(s.ids.includes(o._id)&&!i.isEmpty(t.payload.props)&&Object.keys(t.payload.props).forEach(a=>{i.set(o,a,t.payload.props[a])}),o));default:return e}},{debug:!1,ignoreInitialState:!1,limit:30,filter:fe.excludeAction(["update_props_realtime","add_duplicate_blocks","set_page_blocks"])}),Ae=Hn({past:[],present:[],future:[]},ia);Ae.debugLabel="pageBlocksAtom";const H=u.atom(e=>{var t;return(t=e(Ae))==null?void 0:t.present});H.debugLabel="presentBlocksAtom";const $e=Qn(H);$e.debugLabel="pageBlocksAtomsAtom";const Pt=u.atom(e=>aa(e(H)));Pt.debugLabel="pageBlocksTreeAtom";const la=u.atom("");la.debugLabel="builderActivePageAtom";const ca=u.atom(-1);ca.debugLabel="destinationDropIndexAtom";const Tt=u.atom(!1);Tt.debugLabel="addBlocksModalAtom";const It=u.atom([]);It.debugLabel="buildingBlocksAtom";const Mt=u.atom(e=>{const t=e(It);return i.filter(t,s=>i.has(s,"blockId"))});Mt.debugLabel="globalBlocksAtom";const W=()=>{const[,e]=u.useAtom(Ae);return e},da=()=>{const e=W(),t=u.useAtomValue(Pt),s=w.useCallback(o=>{const a=Et(o);e({type:"set_page_blocks",payload:a})},[e]);return[t,s]},ua=()=>{const e=W();return[w.useCallback(s=>{e({type:"set_page_blocks",payload:s})},[e])]},Dt=e=>["Box","Slot","Form","Link","Paragraph","Heading","List","ListItem","Table","TableCell"].includes(e),ma=e=>!["Slot"].includes(e),pa=e=>!["Slot"].includes(e);function Le(e,t){return e==="Slot"||t==="List"&&e!=="ListItem"||t==="Row"&&e!=="Column"||t==="Heading"&&!i.includes(["Span","Text"],e)||t==="Paragraph"&&!i.includes(["Span","Text"],e)?!1:Dt(t)}const fa=(e,{dragSource:t,dropTarget:s})=>{const o=i.get(t,"data._type",""),a=i.get(s,"data._type","");return o==="Slot"||i.get(t,"id")&&i.get(t,"id")===i.get(s,"id")?!1:i.isEmpty(a)?!0:Le(o,a)},Ge=u.atom([]);Ge.debugLabel="selectedBlockIdsAtom";const He=u.atom(e=>{const t=e(H),s=e(Ge);return i.map(i.filter(t,({_id:o})=>i.includes(s,o)),o=>({...o}))});He.debugLabel="selectedBlocksAtom";const We=u.atom(e=>{const t=e(He);return t.length===0?null:t.length===1?t[0]:{type:"Multiple",id:i.map(t,"id")}});We.debugLabel="selectedBlockAtom";const xa=e=>i.get(e,"parent",null),ga=u.atom(e=>{const t=e(He),s=i.map(t,xa);return i.filter(e(H),o=>i.includes(s,o._id))});ga.debugLabel="selectedBlocksParentsAtom";const Ot=u.atom(()=>!1);Ot.debugLabel="selectedBlockFlexChildAtom";const Lt=u.atom(()=>!1);Lt.debugLabel="selectedBlockGridChildAtom";const Ye=u.atom("");Ye.debugLabel="styleStateAtom";const Vt=ue("styleBreakpoint","xs");Vt.debugLabel="styleBreakpointAtom";const ba=()=>({flexChild:u.useAtomValue(Ot),gridChild:u.useAtomValue(Lt)}),ha=()=>u.useAtomValue(We);const me=()=>{const[e,t]=u.useAtom(Ge),s=w.useCallback(o=>{t(a=>i.includes(a,o)?i.without(a,o):[...a,o])},[t]);return[e,t,s]},Ve=e=>{switch(e.type){case"singular":return e.uiSchema;case"model":const{properties:t}=e,s={};return Object.keys(t).forEach(r=>{const l=t[r];if(i.includes(["slot","styles"],l.type))return;const p=r;s[p]=Ve(l)}),s;case"list":const{itemProperties:o}=e,a={items:{}};return Object.keys(o).forEach(r=>{const l=o[r];if(i.includes(["slot","styles"],l.type))return;const p=r;a.items[p]=Ve(l)}),a;default:return{}}},ze=e=>{switch(e.type){case"singular":return e.schema;case"model":const{properties:t,title:s}=e,o={title:s,type:"object",properties:{}};return Object.keys(t).forEach(p=>{const x=t[p];if(i.includes(["slot","styles"],x.type))return;const d=p;o.properties[d]=ze(x)}),o;case"list":const{itemProperties:a,title:r}=e,l={title:r,type:"array",items:{type:"object",properties:{}}};return Object.keys(a).forEach(p=>{const x=a[p];if(i.includes(["slot","styles"],x.type))return;const d=p;l.items.properties[d]=ze(x),i.set(l.items,"title",i.get(x,"itemTitle",`${r} item`))}),l;default:return{}}},zt=e=>{const t={};return Object.keys(e).forEach(s=>{t[s]=ya(e[s])}),t},va=e=>{if(i.isEmpty(e.default))return[];const{itemProperties:t}=e;return i.map(e.default,s=>{const o={...s};return i.forIn(s,(a,r)=>{i.has(t,r)&&i.get(t[r],"i18n",!1)&&(o[r]=F.I18N_KEY)}),o})},ya=e=>{switch(e.type){case"styles":return e.default;case"slot":return`${F.SLOT_KEY}${c.generateUUID()}`;case"singular":const{i18n:t,schema:s}=e;return t?F.I18N_KEY:i.get(s,"default","");case"model":return zt(e.properties);case"list":return va(e);default:return""}};const Ft=()=>u.useAtomValue(H);function ut(e,t,s,o,a){if(s!==null){const x=i.findIndex(e,{_parent:t}),d=(x===-1?0:x)+s;return e.splice(d,0,...o),e}if(!a){const d=i.findIndex(e,{_id:t})+1;return e.splice(d,0,...o),e}let r=i.findIndex(e,{_id:t});const l=i.filter(e,{_parent:t});i.isEmpty(l)||(r=i.findIndex(e,{_id:i.last(l)._id}));const p=r+1;return e.splice(p,0,...o),e}const ja=()=>{const e=W(),t=Ft(),[,s]=me(),o=w.useCallback((r,l,p)=>{var R;for(let N=0;N<r.length;N++){const{_id:I}=r[N];r[N]._id=c.generateUUID();const q=i.filter(r,{_parent:I});for(let z=0;z<q.length;z++)q[z]._parent=r[N]._id}const x=i.first(r);let d;l&&(d=i.find(t,{_id:l}),r[0]._parent=l);const h=d?Le(x._type,d._type):!0;return!h&&d&&(r[0]._parent=d._parent),e({type:"set_blocks",payload:ut(t,l||null,p||null,r,h)}),s([(R=i.first(r))==null?void 0:R._id]),i.first(r)},[t,e,s]);return{addCoreBlock:w.useCallback((r,l,p)=>{if(i.has(r,"blocks")){const z=r.blocks;return o(z,l,p)}const x=c.generateUUID(),d=zt(r.props),h=[];i.forIn(d,(z,X)=>{if(i.startsWith(z,F.SLOT_KEY)){const le=z.replace(F.SLOT_KEY,"");h.push({_id:le,_type:"Slot",_parent:x,_name:r.props[X].name,_styles:r.props[X].styles,_emptyStyles:r.props[X].emptyStyles})}});const R={_type:r.type,_id:x,...d};let N;l&&(N=i.find(t,{_id:l}),R._parent=l);const I=N?Le(r.type,N._type):!0;!I&&N&&(R._parent=N._parent);const q=[R,...h];return e({type:"set_blocks",payload:ut(t,l||null,p||null,q,I)}),s([R._id]),R},[o,t,e,s]),addPredefinedBlock:o}},mt={xs:420,sm:620,md:768,lg:1024,xl:1280,"2xl":1536},pt=["xs","sm","md","lg","xl","2xl"];function wa(e,t){if(t===null)return"baseClasses";const s=t.mq;if(s==="xs"||t.dark||t.mod!=="")return"classes";let o="baseClasses",a=pt.indexOf(s);for(;a>0;){const r=pt[a-1];if(i.find(e,{mq:r,property:t.property})){o="classes";break}a--}return o}const ft=[];function Ra(e="",t="",s=[]){e=e.trim().replace(/ +/g,"");let o=i.filter(i.map(e.split(" "),c.constructClassObject),d=>!i.isNull(d)),a=i.filter(i.map(t.split(" "),c.constructClassObject),d=>!i.isNull(d));a=i.filter(a,d=>!i.includes(ft,d.property));const r=[],l=[];i.each(s,d=>{const h=c.constructClassObject(d),R=i.find(o,i.pick(h,["dark","mq","mod","property"]));if(R&&(o=i.filter(o,N=>N.fullCls!==(R==null?void 0:R.fullCls))),r.push(h),h.mq==="xs"&&!h.dark&&h.mod===""&&(a=i.filter(a,N=>N.property!==h.property)),wa(o,h)==="baseClasses"&&!i.includes(ft,h.property)){const N=i.find(a,i.pick(h,["property"]));R&&(a=i.filter(a,I=>I.fullCls!==(N==null?void 0:N.fullCls))),l.push({...h,fullCls:h.cls,mq:"xs"})}});const p=i.map(i.sortBy([...o,...r],d=>mt[d.mq]),"fullCls").join(" ");return`${i.map(i.sortBy([...a,...l],d=>mt[d.mq]),"fullCls").join(" ").trim()},${p.trim()}`.trim().replace(/ +/g,"")}const be=u.atom([]);be.debugLabel="selectedStylingBlocksAtom";const Ke=()=>u.useAtom(be),ka=e=>{const t=e.replace(F.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}},Na=u.atom(null,(e,t,{blockIds:s,newClasses:o,dispatch:a})=>{const r=i.filter(e($e),p=>s.includes(e(p)._id)),l=i.first(e(be));i.each(r,p=>{const x=e(p),d=i.get(x,l.prop,`${F.STYLES_KEY},`),{baseClasses:h,classes:R}=ka(d);a({type:"update_props_realtime",payload:{ids:[x._id],props:{[l.prop]:`${F.STYLES_KEY}${Ra(R,h,o)}`}}})})}),Aa=()=>{const e=W(),t=u.useSetAtom(Na);return w.useCallback((s,o,a)=>{t({blockIds:s,newClasses:o,dispatch:e}),a&&setTimeout(()=>e({type:"create_snapshot"}),500)},[e,t])},xt=()=>{},qt=()=>{const e=In.useChaiBlocks(),t=u.useAtomValue(Mt),s=()=>{xt()},o=w.useCallback(()=>xt(),[]);return[e,t,s,o]},Sa=u.atom(!1),Ut=()=>{const[e,t]=u.useAtom(Sa);return[e,t]},Ca=u.atom(F.BRANDING_OPTIONS_DEFAULTS),$t=()=>{const[e,t]=u.useAtom(Ca);return[i.isObject(e)?{...F.BRANDING_OPTIONS_DEFAULTS,...e}:F.BRANDING_OPTIONS_DEFAULTS,t]},Ea=u.atom(null),Gt=()=>({currentPage:u.useAtomValue(Ea)}),Ht=new yt({});function _a(e){let t=Ht.convert(e);return t=!t.type&&t.children&&t.children.length?t.children:i.isEmpty(t)?[]:[t],t}const Je=(e,t)=>i.flatten(e.map(s=>{if(s=t?{...s,parent:t}:{...s},s.children){const o=[...s.children];return delete s.children,i.flatten([s,...Je(o,s._id)])}return s}));function Qe(e,t=!1){for(let s=0;s<e.length;s++){const o=e[s];o.global&&!t?e[s]={type:"GlobalBlock",blockId:o.blockId,_parent:i.get(o,"parent",null),_id:o._id}:o.children&&o.children.length&&Qe(o.children)}}function Wt(e){let t=[],s=i.filter(e,{type:"GlobalBlock"});return s.length>0&&(s=i.map(s,Yt),i.each(s,o=>{t=[...t,...Ba(o)]})),t}function Ba(e){let t=[];const s=i.get(i.first(e),"parent",null);i.set(i.first(e),"parent",null);const o=[Ht.convert(Kt(e))];Qe(o,!0);let a=Je(o,e[0]._id);return a=i.set(a,"0.parent",s),t=[...t,a,...Wt(a)],t}function Yt(e){const t=i.find(Fe,{_id:e._id});if(!t)return[];const s=[t],o=i.filter(Fe,{_parent:e._id});return o.length?i.flatten([...s,...i.flatten(i.map(o,Yt))]):i.flatten(s)}const Kt=e=>JSON.parse(JSON.stringify(e));let Fe=[];function Pa(e){Fe=e;const t=_a(Kt(e));Qe(t);const s=Je(t,null),o=Wt(s),a={};return i.each(o,r=>i.set(a,i.first(r).blockId,r)),[s,a]}const Xe=()=>{const[e]=$t(),{currentPage:t}=Gt(),s=u.useAtomValue(H);return w.useCallback(()=>{const o=i.map(s,l=>i.omit(l,["expanded","order","title","siblings","tempClasses"])),[a=[],r=[]]=Pa(o);return{currentPage:t,blocks:a,globalBlocks:r}},[e,t,s])},ne=(e,t=void 0)=>{const s=u.useAtomValue(Ne);return i.get(s,e,t)},Jt=u.atom(!1);Jt.debugLabel="readOnlyModeAtom";const Qt=u.atom(!1);Qt.debugLabel="advanceStylingOpenAtom";const Xt=u.atom("online");Xt.debugLabel="networkModeAtom";const Ta=u.atom(!1);Ta.debugLabel="codeEditorOpenAtom";const Zt=u.atom(!1);Zt.debugLabel="editLayerNameAtom";const Ia=u.atom("");Ia.debugLabel="activeLanguageAtom";const Ma=u.atom("");Ma.debugLabel="primaryLanguageAtom";const es=u.atom(null);es.debugLabel="canvasIframeAtom";const ts=u.atom("layers");ts.debugLabel="activePanelAtom";const ss=u.atom(!1);ss.debugLabel="addBlockOffCanvasAtom";const os=u.atom("");os.debugLabel="showPredefinedBlockCategoryAtom";const Se=u.atom({undoCount:0,redoCount:0});Se.debugLabel="historyStatesAtom";const ns=u.atom("");ns.debugLabel="inlineEditingActiveAtom";const as=u.atom(!1);as.debugLabel="draggingFlagAtom";const rs=u.atom("");rs.debugLabel="draggedBlockIdAtom";const Ze=u.atom([]);Ze.debugLabel="dataProvidersAtom";const is=()=>u.useAtom(Ze),Ce=u.atom("SAVED");Ce.debugLabel="pageSyncStateAtom";const Da=()=>{const[e,t]=u.useAtom(Ce),s=ne("onSaveBlocks",async()=>{}),o=ne("onSavePage",async()=>{}),a=ne("onSyncStatusChange",()=>{}),r=Xe(),l=u.useSetAtom(Se),{undoCount:p,redoCount:x}=Ee(),[d]=is();return{savePage:Mn.useThrottledCallback(async()=>{t("SAVING"),a("SAVING");const R=r();return await o({blocks:R.blocks,providers:d}),setTimeout(()=>{l({undoCount:p,redoCount:x}),t("SAVED"),a("SAVED")},100),!0},[r,t,a,s],5e3),syncState:e,setSyncState:t}},Ee=()=>{const e=u.useAtomValue(Ae),[{undoCount:t,redoCount:s}]=u.useAtom(Se),o=W(),[a]=Ut(),[,r]=me(),[,l]=Ke(),[p,x]=u.useAtom(Ce),d=ne("onSyncStatusChange",()=>{}),h=w.useCallback(()=>{o({type:"create_snapshot"})},[o]);return w.useEffect(()=>{(p==="SAVED"&&t!==(e==null?void 0:e.past.length)||s!==(e==null?void 0:e.future.length))&&(x("UNSAVED"),d("UNSAVED"))},[e==null?void 0:e.past.length,e==null?void 0:e.future.length,t,s,d,x,p]),{undoCount:e==null?void 0:e.past.length,redoCount:e==null?void 0:e.future.length,undo:w.useCallback(()=>{a||(o(fe.ActionCreators.undo()),setTimeout(()=>{l([]),r([])},200))},[o,a,r,l]),redo:w.useCallback(()=>{a||(o(fe.ActionCreators.redo()),setTimeout(()=>{l([]),r([])},200))},[a,o,l,r]),clear:()=>{o(fe.ActionCreators.clearHistory())},createSnapshot:h}},ls=()=>u.useAtom(Vt),cs=ue("canvasWidth",800),ds=u.atom(e=>{const t=e(cs);return c.getBreakpointValue(t).toLowerCase()}),Oa=()=>{const[e,t]=u.useAtom(cs),s=u.useAtomValue(ds),[o,a]=ls();return w.useEffect(()=>{o!=="xs"&&a(s)},[s,o,a]),[e,s,t]},La=ue("canvasZoom",100),Va=()=>u.useAtom(La),us=u.atom([]),ms=()=>{const[e,t]=u.useAtom(us),s=u.useSetAtom(et),o=w.useCallback(a=>{t(a),s([])},[t,s]);return[e,o]},et=u.atom([]),za=()=>{const[e,t]=u.useAtom(et),s=u.useSetAtom(us),o=w.useCallback(a=>{t(a),s([])},[t,s]);return[e,o]},ps=ue("darkMode",!1),Fa=()=>{const[e,t]=u.useAtom(ps);return[e,t]},qa=u.atom(!1),Ua=()=>{const[e,t]=u.useAtom(qa);return[e,t]},fs=()=>{const e=W(),t=u.useAtomValue(H),[,s]=me();return w.useCallback((o,a=null)=>{const r=[];i.each(o,l=>{const x=ra(t,l,a===l?null:a);r.push(i.get(x,"0._id","")),e({type:"add_duplicate_blocks",payload:x})}),s(r),e({type:"create_snapshot"})},[t,s,e])},$a=u.atom([]),Ga=()=>{const[e,t]=u.useAtom($a),s=w.useCallback(o=>{t(a=>i.includes(a,o)?i.without(a,o):[...a,o])},[t]);return[e,t,s]},Ha=u.atom(""),xs=()=>u.useAtom(Ha),Wa=()=>{const e=u.useAtomValue(H),t=W(),s=Xe(),[,,o]=qt();return w.useCallback(async(a,r)=>{const l=c.generateUUID(16),p=i.map(e,x=>(x._id===a&&(x._globalBlockId=l,x._name=r),x));t({type:"set_page_blocks",payload:p}),o()},[e,t,s,o])},Ya=()=>({}),Ka=()=>{const e=u.useAtomValue(H),t=W();return w.useCallback((s,o)=>{const a=i.map(e,r=>(i.includes(s,i.get(r,"_id"))&&i.set(r,"_parent",o),r));t({type:"set_blocks",payload:a})},[e,t])},Ja=()=>{const e=u.useAtomValue(et),[t,s]=ms(),o=fs(),a=Ka();return{canPaste:w.useMemo(()=>t.length>0||e.length>0,[e,t]),pasteBlocks:w.useCallback(l=>{i.isEmpty(e)?a(t,l):o(e,l),s(()=>[])},[t,e,o,a,s])}},Qa=u.atom(""),Xa=()=>{const e=u.useAtomValue(Qa),t=w.useCallback(()=>{},[]),s=w.useCallback(()=>{},[]),o=w.useCallback(()=>{},[]);return{currentProject:e,createProject:o,deleteProject:t,updateProject:s}},gs=(e,t)=>{const s=[],o=i.filter(e,a=>i.includes(t,a._id)||i.includes(t,a._parent)?(s.push(a._id),!1):!0);return i.isEmpty(s)?o:gs(o,s)},Za=()=>{const e=W(),t=u.useAtomValue(H),[s,o]=me();return w.useCallback(a=>{var p;const r=((p=i.find(t,{_id:a[0]}))==null?void 0:p._parent)||null,l=gs(t,a);e({type:"set_blocks",payload:l}),setTimeout(()=>o(r?[r]:[]),200)},[t,o,e,s])},er=u.atom(null,(e,t,{blockIds:s,fullClasses:o,dispatch:a})=>{const r=i.first(e(be)),l=i.filter(e($e),p=>s.includes(e(p)._id));i.each(l,p=>{const x=e(p),d=o;let{classes:h,baseClasses:R}=oa(i.get(x,r.prop,"styles:,"));i.each(d,N=>{const I=new RegExp(`(^| )${N.replace("[","\\[").replace("]","\\]")}($| )`,"g");h=h.replace(I," ").replace(/ +/g," ").trim();const q=i.first(N.split(":"));i.includes(["2xl","xl","lg","md","sm"],q)&&d.push(N.split(":").pop().trim())}),i.each(d,N=>{const I=new RegExp(`(^| )${N.replace("[","\\[").replace("]","\\]")}($| )`,"g");R=R.replace(I," ").replace(/ +/g," ").trim()}),a({type:"update_props_realtime",payload:{ids:[x._id],props:{[r.prop]:`${F.STYLES_KEY}${R},${h}`}}})})}),tr=()=>{const e=W(),t=u.useSetAtom(er);return w.useCallback((s,o)=>{t({blockIds:s,fullClasses:o,dispatch:e}),setTimeout(()=>e({type:"create_snapshot"}))},[e,t])},bs=u.atom(e=>{const t=i.first(e(be)),s=e(We);if(!t||t.blockId!==i.get(s,"_id",null))return[];const a=i.get(s,t.prop,`${F.STYLES_KEY},`).replace(F.STYLES_KEY,"").split(",").join(" ");return i.filter(i.map(a.trim().split(" "),c.constructClassObject),r=>!i.isNull(r))}),sr=()=>u.useAtomValue(bs),gt={xs:0,sm:1,md:2,lg:3,xl:4,"2xl":5},or=u.atom(e=>{const t=e(ds),s=e(Ye),o=e(ps),a=nr(t);let r=i.filter(e(bs),{mod:s});return i.startsWith(s,"_")||(r=i.filter(r,l=>a.includes(l.mq))),r=r.sort((l,p)=>gt[l.mq]-gt[p.mq]),o||(r=i.filter(r,{dark:!1})),r}),nr=e=>{let t=[];switch(e){case"xs":t=["xs"];break;case"sm":t=["xs","sm"];break;case"md":t=["xs","sm","md"];break;case"lg":t=["xs","sm","md","lg"];break;case"xl":t=["xs","sm","md","lg","xl"];break;case"2xl":t=["xs","sm","md","lg","xl","2xl"];break;default:t=["xs"];break}return t},ar=()=>u.useAtomValue(or),rr=()=>u.useAtom(Ye),hs=u.atom(null,(e,t,{blockIds:s,props:o,dispatch:a})=>{a({type:"update_props_realtime",payload:{ids:s,props:o}})}),ir=()=>{const{createSnapshot:e}=Ee(),t=W(),s=u.useSetAtom(hs);return w.useCallback((o,a)=>{s({blockIds:o,props:a,dispatch:t}),e()},[e,t,s])},lr=()=>{const e=W(),t=u.useSetAtom(hs);return w.useCallback((s,o)=>{t({blockIds:s,props:o,dispatch:e})},[e,t])},vs={name:"",props:{},modalProps:{},backdropClose:!0},cr=u.atom(vs),dr=()=>{const[e,t]=u.useAtom(cr),s=w.useCallback((a,r={},l={})=>{t({name:a,props:r,modalProps:l})},[t]),o=w.useCallback((...a)=>{i.get(e,"props.onClose",()=>{})(...a),t(vs)},[t,e]);return{activeModal:e,openModal:s,closeModal:o}},ur=()=>u.useAtomValue(Jt),mr=u.atom(""),pr=u.atom(null),fr=()=>u.useAtom(mr),xr=()=>u.useAtom(pr),gr=ue("selectedBreakpoints",["XS","MD","XL"]),br=()=>{const[e,t]=u.useAtom(gr);return[e,t]},hr=()=>{const e=u.useSetAtom(Se),{clear:t}=Ee(),[,s]=me(),[,o]=xs(),[,a]=Ke();return()=>{s([]),a([]),o(""),t(),e({undoCount:0,redoCount:0})}},vr=u.atom({en:{}}),yr=()=>{const[e,t]=u.useAtom(vr),s=w.useCallback((o,a,r)=>{i.set(e,`${o}.${a}`,r),t(e)},[e,t]);return[e,s]},jr=(e,t)=>{const[s]=u.useAtom(Ne);return i.get(s,e,t)},wr=u.atom([]),Rr=()=>{const[e,t]=w.useState(!1),[s,o]=u.useAtom(wr),a=ne("getUILibraryBlocks",()=>[]);return w.useEffect(()=>{(async()=>s.length>0||(t(!0),o(await a()),t(!1)))()},[]),{data:s,isLoading:e}},ys=re.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),js=f.forwardRef(({className:e,variant:t,size:s,...o},a)=>n.jsxRuntimeExports.jsx(jt.Root,{ref:a,className:c.cn(ys({variant:t,size:s,className:e})),...o}));js.displayName=jt.Root.displayName;const ws=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(Oe.Root,{className:c.cn("peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-800 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",e),...t,ref:s,children:n.jsxRuntimeExports.jsx(Oe.Thumb,{className:c.cn("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950")})}));ws.displayName=Oe.Root.displayName;const _e=re.cva("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Rs=f.forwardRef(({className:e,variant:t,size:s,asChild:o=!1,...a},r)=>{const l=o?gn.Slot:"button";return n.jsxRuntimeExports.jsx(l,{className:c.cn(_e({variant:t,size:s,className:e})),ref:r,...a})});Rs.displayName="Button";const kr=ae.Root,ks=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ae.Item,{ref:s,className:c.cn("border-b",e),...t}));ks.displayName="AccordionItem";const Ns=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsx(ae.Header,{className:"flex",children:n.jsxRuntimeExports.jsxs(ae.Trigger,{ref:o,className:c.cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...s,children:[t,n.jsxRuntimeExports.jsx(L.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));Ns.displayName=ae.Trigger.displayName;const As=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsx(ae.Content,{ref:o,className:c.cn("text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...s,children:n.jsxRuntimeExports.jsx("div",{className:"pb-4 pt-0",children:t})}));As.displayName=ae.Content.displayName;const Nr=re.cva("relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Ss=f.forwardRef(({className:e,variant:t,...s},o)=>n.jsxRuntimeExports.jsx("div",{ref:o,role:"alert",className:c.cn(Nr({variant:t}),e),...s}));Ss.displayName="Alert";const Cs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("h5",{ref:s,className:c.cn("mb-1 font-medium leading-none tracking-tight",e),...t}));Cs.displayName="AlertTitle";const Es=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("text-sm [&_p]:leading-relaxed",e),...t}));Es.displayName="AlertDescription";const _s=re.cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Ar=({className:e,variant:t,...s})=>n.jsxRuntimeExports.jsx("div",{className:c.cn(_s({variant:t}),e),...s}),Sr=V.Root,Cr=V.Trigger,Bs=({className:e,...t})=>n.jsxRuntimeExports.jsx(V.Portal,{className:c.cn(e),...t});Bs.displayName=V.Portal.displayName;const Ps=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Overlay,{className:c.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:s}));Ps.displayName=V.Overlay.displayName;const Ts=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsxs(Bs,{children:[n.jsxRuntimeExports.jsx(Ps,{}),n.jsxRuntimeExports.jsx(V.Content,{ref:s,className:c.cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...t})]}));Ts.displayName=V.Content.displayName;const Is=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});Is.displayName="AlertDialogHeader";const Ms=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ms.displayName="AlertDialogFooter";const Ds=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Title,{ref:s,className:c.cn("text-lg font-semibold",e),...t}));Ds.displayName=V.Title.displayName;const Os=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Description,{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));Os.displayName=V.Description.displayName;const Ls=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Action,{ref:s,className:c.cn(_e(),e),...t}));Ls.displayName=V.Action.displayName;const Vs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Cancel,{ref:s,className:c.cn(_e({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Vs.displayName=V.Cancel.displayName;const tt=_.Root,zs=_.Trigger,Fs=({className:e,...t})=>n.jsxRuntimeExports.jsx(_.Portal,{className:c.cn(e),...t});Fs.displayName=_.Portal.displayName;const qs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Overlay,{ref:s,className:c.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));qs.displayName=_.Overlay.displayName;const Be=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(Fs,{children:[n.jsxRuntimeExports.jsx(qs,{}),n.jsxRuntimeExports.jsxs(_.Content,{ref:o,className:c.cn("fixed left-[50%] top-[50%] z-[999] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...s,children:[t,n.jsxRuntimeExports.jsxs(_.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[n.jsxRuntimeExports.jsx(L.Cross2Icon,{className:"h-4 w-4"}),n.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Be.displayName=_.Content.displayName;const Us=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Us.displayName="DialogHeader";const $s=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$s.displayName="DialogFooter";const Gs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Title,{ref:s,className:c.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));Gs.displayName=_.Title.displayName;const Hs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Description,{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));Hs.displayName=_.Description.displayName;const Ws=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ws.displayName="Card";const Ys=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("flex flex-col space-y-1.5 p-6",e),...t}));Ys.displayName="CardHeader";const Ks=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("h3",{ref:s,className:c.cn("font-semibold leading-none tracking-tight",e),...t}));Ks.displayName="CardTitle";const Js=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("p",{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));Js.displayName="CardDescription";const Qs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("p-6 pt-0",e),...t}));Qs.displayName="CardContent";const Xs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn(" flex items-center p-6 pt-0",e),...t}));Xs.displayName="CardFooter";const Zs=f.forwardRef(({className:e,type:t,...s},o)=>n.jsxRuntimeExports.jsx("input",{type:t,className:c.cn("flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...s}));Zs.displayName="Input";const Er=re.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),eo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(wt.Root,{ref:s,className:c.cn(Er(),e),...t}));eo.displayName=wt.Root.displayName;const to=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("textarea",{className:c.cn("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...t}));to.displayName="Textarea";const so=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(oe.Root,{ref:o,className:c.cn("relative overflow-hidden",e),...s,children:[n.jsxRuntimeExports.jsx(oe.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),n.jsxRuntimeExports.jsx(st,{}),n.jsxRuntimeExports.jsx(oe.Corner,{})]}));so.displayName=oe.Root.displayName;const st=f.forwardRef(({className:e,orientation:t="vertical",...s},o)=>n.jsxRuntimeExports.jsx(oe.ScrollAreaScrollbar,{ref:o,orientation:t,className:c.cn("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 border-t border-t-transparent p-[1px]",e),...s,children:n.jsxRuntimeExports.jsx(oe.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));st.displayName=oe.ScrollAreaScrollbar.displayName;const oo=ie.Root,ot=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ie.List,{ref:s,className:c.cn("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));ot.displayName=ie.List.displayName;const we=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ie.Trigger,{ref:s,className:c.cn("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));we.displayName=ie.Trigger.displayName;const Re=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ie.Content,{ref:s,className:c.cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Re.displayName=ie.Content.displayName;const _r=de.Portal,Br=de.Provider,Pr=de.Root,Tr=de.Trigger,no=f.forwardRef(({className:e,sideOffset:t=4,...s},o)=>n.jsxRuntimeExports.jsx(de.Content,{ref:o,sideOffset:t,className:c.cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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),...s}));no.displayName=de.Content.displayName;const Ir=ge.Root,Mr=ge.Trigger,ao=f.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},a)=>n.jsxRuntimeExports.jsx(ge.Portal,{children:n.jsxRuntimeExports.jsx(ge.Content,{ref:a,align:t,sideOffset:s,className:c.cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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),...o})}));ao.displayName=ge.Content.displayName;const Dr=C.Menu,Or=C.Group,Lr=C.Portal,Vr=C.Sub,zr=C.RadioGroup,ro=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(C.Root,{ref:s,className:c.cn("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",e),...t}));ro.displayName=C.Root.displayName;const io=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(C.Trigger,{ref:s,className:c.cn("flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),...t}));io.displayName=C.Trigger.displayName;const lo=f.forwardRef(({className:e,inset:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(C.SubTrigger,{ref:a,className:c.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...o,children:[s,n.jsxRuntimeExports.jsx(L.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));lo.displayName=C.SubTrigger.displayName;const co=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(C.SubContent,{ref:s,className:c.cn("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}));co.displayName=C.SubContent.displayName;const uo=f.forwardRef(({className:e,align:t="start",alignOffset:s=-4,sideOffset:o=8,...a},r)=>n.jsxRuntimeExports.jsx(C.Portal,{children:n.jsxRuntimeExports.jsx(C.Content,{ref:r,align:t,alignOffset:s,sideOffset:o,className:c.cn("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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),...a})}));uo.displayName=C.Content.displayName;const mo=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(C.Item,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...s}));mo.displayName=C.Item.displayName;const po=f.forwardRef(({className:e,children:t,checked:s,...o},a)=>n.jsxRuntimeExports.jsxs(C.CheckboxItem,{ref:a,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(C.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.CheckIcon,{className:"h-4 w-4"})})}),t]}));po.displayName=C.CheckboxItem.displayName;const fo=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(C.RadioItem,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(C.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));fo.displayName=C.RadioItem.displayName;const xo=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(C.Label,{ref:o,className:c.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s}));xo.displayName=C.Label.displayName;const go=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(C.Separator,{ref:s,className:c.cn("-mx-1 my-1 h-px bg-muted",e),...t}));go.displayName=C.Separator.displayName;const bo=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});bo.displayname="MenubarShortcut";const Fr=ke.Root,qr=ke.Trigger,ho=f.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},a)=>n.jsxRuntimeExports.jsx(ke.Content,{ref:a,align:t,sideOffset:s,className:c.cn("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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),...o}));ho.displayName=ke.Content.displayName;const Ur=M.Root,$r=M.Group,Gr=M.Value,vo=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(M.Trigger,{ref:o,className:c.cn("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...s,children:[t,n.jsxRuntimeExports.jsx(M.Icon,{asChild:!0,children:n.jsxRuntimeExports.jsx(L.CaretSortIcon,{className:"h-4 w-4 opacity-50"})})]}));vo.displayName=M.Trigger.displayName;const yo=f.forwardRef(({className:e,children:t,position:s="popper",...o},a)=>n.jsxRuntimeExports.jsx(M.Portal,{children:n.jsxRuntimeExports.jsx(M.Content,{ref:a,className:c.cn("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...o,children:n.jsxRuntimeExports.jsx(M.Viewport,{className:c.cn("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));yo.displayName=M.Content.displayName;const jo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(M.Label,{ref:s,className:c.cn("px-2 py-1.5 text-sm font-semibold",e),...t}));jo.displayName=M.Label.displayName;const wo=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(M.Item,{ref:o,className:c.cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(M.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.CheckIcon,{className:"h-4 w-4"})})}),n.jsxRuntimeExports.jsx(M.ItemText,{children:t})]}));wo.displayName=M.Item.displayName;const Ro=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(M.Separator,{ref:s,className:c.cn("-mx-1 my-1 h-px bg-muted",e),...t}));Ro.displayName=M.Separator.displayName;const Hr=_.Root,Wr=_.Trigger,Yr=_.Close,ko=({className:e,...t})=>n.jsxRuntimeExports.jsx(_.Portal,{className:c.cn(e),...t});ko.displayName=_.Portal.displayName;const No=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Overlay,{className:c.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:s}));No.displayName=_.Overlay.displayName;const Kr=re.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ao=f.forwardRef(({side:e="right",className:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(ko,{children:[n.jsxRuntimeExports.jsx(No,{}),n.jsxRuntimeExports.jsxs(_.Content,{ref:a,className:c.cn(Kr({side:e}),t),...o,children:[s,n.jsxRuntimeExports.jsxs(_.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[n.jsxRuntimeExports.jsx(L.Cross2Icon,{className:"h-4 w-4"}),n.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ao.displayName=_.Content.displayName;const So=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});So.displayName="SheetHeader";const Co=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Co.displayName="SheetFooter";const Eo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Title,{ref:s,className:c.cn("text-lg font-semibold text-foreground",e),...t}));Eo.displayName=_.Title.displayName;const _o=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Description,{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));_o.displayName=_.Description.displayName;const Jr=B.Root,Qr=B.Trigger,Xr=B.Group,Zr=B.Portal,ei=B.Sub,ti=B.RadioGroup,Bo=f.forwardRef(({className:e,inset:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(B.SubTrigger,{ref:a,className:c.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...o,children:[s,n.jsxRuntimeExports.jsx(L.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Bo.displayName=B.SubTrigger.displayName;const Po=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(B.SubContent,{ref:s,className:c.cn("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}));Po.displayName=B.SubContent.displayName;const To=f.forwardRef(({className:e,sideOffset:t=4,...s},o)=>n.jsxRuntimeExports.jsx(B.Portal,{children:n.jsxRuntimeExports.jsx(B.Content,{ref:o,sideOffset:t,className:c.cn("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),...s})}));To.displayName=B.Content.displayName;const Io=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(B.Item,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...s}));Io.displayName=B.Item.displayName;const Mo=f.forwardRef(({className:e,children:t,checked:s,...o},a)=>n.jsxRuntimeExports.jsxs(B.CheckboxItem,{ref:a,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(B.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.CheckIcon,{className:"h-4 w-4"})})}),t]}));Mo.displayName=B.CheckboxItem.displayName;const Do=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(B.RadioItem,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(B.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Do.displayName=B.RadioItem.displayName;const Oo=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(B.Label,{ref:o,className:c.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s}));Oo.displayName=B.Label.displayName;const Lo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(B.Separator,{ref:s,className:c.cn("-mx-1 my-1 h-px bg-muted",e),...t}));Lo.displayName=B.Separator.displayName;const Vo=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest opacity-60",e),...t});Vo.displayName="DropdownMenuShortcut";const zo=f.forwardRef(({className:e,orientation:t="horizontal",decorative:s=!0,...o},a)=>n.jsxRuntimeExports.jsx(Rt.Root,{ref:a,decorative:s,orientation:t,className:c.cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));zo.displayName=Rt.Root.displayName;const si=1,oi=1e6;let Me=0;function ni(){return Me=(Me+1)%Number.MAX_VALUE,Me.toString()}const De=new Map,bt=e=>{if(De.has(e))return;const t=setTimeout(()=>{De.delete(e),xe({type:"REMOVE_TOAST",toastId:e})},oi);De.set(e,t)},Fo=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,si)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=t;return s?bt(s):e.toasts.forEach(o=>{bt(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)}}},ve=[];let ye={toasts:[]};function xe(e){ye=Fo(ye,e),ve.forEach(t=>{t(ye)})}function qo({...e}){const t=ni(),s=a=>xe({type:"UPDATE_TOAST",toast:{...a,id:t}}),o=()=>xe({type:"DISMISS_TOAST",toastId:t});return xe({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||o()}}}),{id:t,dismiss:o,update:s}}function Uo(){const[e,t]=f.useState(ye);return f.useEffect(()=>(ve.push(t),()=>{const s=ve.indexOf(t);s>-1&&ve.splice(s,1)}),[e]),{...e,toast:qo,dismiss:s=>xe({type:"DISMISS_TOAST",toastId:s})}}const ai=G.Provider,$o=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Viewport,{ref:s,className:c.cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));$o.displayName=G.Viewport.displayName;const ri=re.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Go=f.forwardRef(({className:e,variant:t,...s},o)=>n.jsxRuntimeExports.jsx(G.Root,{ref:o,className:c.cn(ri({variant:t}),e),...s}));Go.displayName=G.Root.displayName;const ii=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Action,{ref:s,className:c.cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));ii.displayName=G.Action.displayName;const Ho=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Close,{ref:s,className:c.cn("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:n.jsxRuntimeExports.jsx(L.Cross2Icon,{className:"h-4 w-4"})}));Ho.displayName=G.Close.displayName;const Wo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Title,{ref:s,className:c.cn("text-sm font-semibold [&+div]:text-xs",e),...t}));Wo.displayName=G.Title.displayName;const Yo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Description,{ref:s,className:c.cn("text-sm opacity-90",e),...t}));Yo.displayName=G.Description.displayName;function li(){const{toasts:e}=Uo();return n.jsxRuntimeExports.jsxs(ai,{children:[e.map(({id:t,title:s,description:o,action:a,...r})=>n.jsxRuntimeExports.jsxs(Go,{...r,children:[n.jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[s&&n.jsxRuntimeExports.jsx(Wo,{children:s}),o&&n.jsxRuntimeExports.jsx(Yo,{children:o})]}),a,n.jsxRuntimeExports.jsx(Ho,{})]},t)),n.jsxRuntimeExports.jsx($o,{})]})}const ci=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("animate-pulse rounded-md bg-primary/10",e),...t}),nt=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command,{ref:s,className:c.cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));nt.displayName=U.Command.displayName;const di=({children:e,...t})=>n.jsxRuntimeExports.jsx(tt,{...t,children:n.jsxRuntimeExports.jsx(Be,{className:"overflow-hidden p-0",children:n.jsxRuntimeExports.jsx(nt,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Ko=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[n.jsxRuntimeExports.jsx(L.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),n.jsxRuntimeExports.jsx(U.Command.Input,{ref:s,className:c.cn("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Ko.displayName=U.Command.Input.displayName;const Jo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command.List,{ref:s,className:c.cn("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Jo.displayName=U.Command.List.displayName;const Qo=f.forwardRef((e,t)=>n.jsxRuntimeExports.jsx(U.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Qo.displayName=U.Command.Empty.displayName;const Xo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command.Group,{ref:s,className:c.cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Xo.displayName=U.Command.Group.displayName;const Zo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command.Separator,{ref:s,className:c.cn("-mx-1 h-px bg-border",e),...t}));Zo.displayName=U.Command.Separator.displayName;const en=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command.Item,{ref:s,className:c.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));en.displayName=U.Command.Item.displayName;const tn=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});tn.displayName="CommandShortcut";const ui=P.Root,mi=P.Trigger,pi=P.Group,fi=P.Portal,xi=P.Sub,gi=P.RadioGroup,sn=f.forwardRef(({className:e,inset:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(P.SubTrigger,{ref:a,className:c.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...o,children:[s,n.jsxRuntimeExports.jsx(L.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));sn.displayName=P.SubTrigger.displayName;const on=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(P.SubContent,{ref:s,className:c.cn("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}));on.displayName=P.SubContent.displayName;const nn=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(P.Portal,{children:n.jsxRuntimeExports.jsx(P.Content,{ref:s,className:c.cn("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),...t})}));nn.displayName=P.Content.displayName;const an=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(P.Item,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...s}));an.displayName=P.Item.displayName;const rn=f.forwardRef(({className:e,children:t,checked:s,...o},a)=>n.jsxRuntimeExports.jsxs(P.CheckboxItem,{ref:a,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(P.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.CheckIcon,{className:"h-4 w-4"})})}),t]}));rn.displayName=P.CheckboxItem.displayName;const ln=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(P.RadioItem,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(P.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));ln.displayName=P.RadioItem.displayName;const cn=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(P.Label,{ref:o,className:c.cn("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...s}));cn.displayName=P.Label.displayName;const dn=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(P.Separator,{ref:s,className:c.cn("-mx-1 my-1 h-px bg-border",e),...t}));dn.displayName=P.Separator.displayName;const un=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});un.displayName="ContextMenuShortcut";const bi=e=>{try{const t=document.getElementById("icon-picker-field"),s=document.createElement("div");Pn.render(n.jsxRuntimeExports.jsx(vt.IconPickerItem,{value:e}),s),t.appendChild(s),s.hidden=!0;let o=s.innerHTML;setTimeout(()=>t.removeChild(s),1e3);const r=new DOMParser().parseFromString(o,"image/svg+xml"),l=r.querySelector("svg");return l&&(l.removeAttribute("width"),l.removeAttribute("height")),new XMLSerializer().serializeToString(r)}catch{return""}},hi=({value:e,onChange:t,onBlur:s,id:o})=>{const a=r=>{t("<svg />");const l=bi(r);t(l),s(o,l)};return n.jsxRuntimeExports.jsxs("div",{className:"mt-1 flex h-20 items-center gap-x-2",id:"icon-picker-field",children:[n.jsxRuntimeExports.jsxs("div",{className:"relative h-12 w-12 group",children:[n.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:e==null?void 0:e.replace("<svg",'<svg class="h-5 w-5"')},className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform cursor-pointer bg-white z-0"}),n.jsxRuntimeExports.jsx(vt,{value:e?"BiSolidGrid":null,onChange:a,pickButtonStyle:{position:"relative",height:"48px",width:"48px",border:"1px solid #BBBBBB",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",backgroundColor:"transparent",zIndex:1},searchInputStyle:{backgroundColor:"transparent",width:"100%",border:"1px solid #BBBBBB",margin:"0px 10px",padding:"10px"}})]}),n.jsxRuntimeExports.jsx("textarea",{value:e,onChange:r=>t(r.target.value),className:"h-full border w-full rounded-sm border-foreground/20 px-2 py-1 text-xs shadow-sm focus:border-gray-500/80 focus:outline-none focus:ring-0",placeholder:"Choose icon or enter svg"})]})},vi=w.lazy(()=>Promise.resolve().then(()=>require("./UnsplashImages-8p0Vu9j_.cjs"))),yi=w.lazy(()=>Promise.resolve().then(()=>require("./UploadImages-PjW68B7L.cjs"))),mn=({isModalView:e=!1,onSelect:t=()=>{}})=>{const[s,o]=w.useState("upload");return n.jsxRuntimeExports.jsxs("div",{className:"flex h-full flex-col",children:[n.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:n.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:e?"Select or upload images":"Images"})}),n.jsxRuntimeExports.jsxs(oo,{value:s,onValueChange:a=>o(a),className:"flex h-full w-full flex-col py-2",children:[n.jsxRuntimeExports.jsxs(ot,{className:"w-full",children:[n.jsxRuntimeExports.jsx(we,{value:"upload",className:"w-1/2",children:"Upload"}),n.jsxRuntimeExports.jsx(we,{value:"unsplash",className:"w-1/2",children:"Unsplash"})]}),s==="unsplash"?n.jsxRuntimeExports.jsx(Re,{value:"unsplash",className:"flex h-full flex-col overflow-hidden",children:n.jsxRuntimeExports.jsx(w.Suspense,{fallback:n.jsxRuntimeExports.jsx("div",{className:"h-64 w-full animate-pulse bg-gray-100"}),children:n.jsxRuntimeExports.jsx(vi,{isModalView:e,onSelect:t})})}):n.jsxRuntimeExports.jsx(Re,{value:"upload",className:"flex h-full flex-col overflow-hidden",children:n.jsxRuntimeExports.jsx(w.Suspense,{fallback:n.jsxRuntimeExports.jsx("div",{className:"h-64 w-full animate-pulse bg-gray-100"}),children:n.jsxRuntimeExports.jsx(yi,{isModalView:e,onSelect:t})})})]})]})},ji=Object.freeze(Object.defineProperty({__proto__:null,default:mn},Symbol.toStringTag,{value:"Module"})),ht=({children:e,onSelect:t})=>{const[s,o]=w.useState(!1),a=(...r)=>{t.call(void 0,...r),o(!1)};return n.jsxRuntimeExports.jsxs(tt,{open:s,onOpenChange:r=>o(r),children:[n.jsxRuntimeExports.jsx(zs,{asChild:!0,children:e}),n.jsxRuntimeExports.jsx(Be,{className:"flex h-3/4 max-w-5xl",children:n.jsxRuntimeExports.jsx("div",{className:"h-full w-full",children:n.jsxRuntimeExports.jsx(mn,{isModalView:!0,onSelect:a})})})]})},wi=({value:e,onChange:t,id:s,onBlur:o})=>n.jsxRuntimeExports.jsxs("div",{className:"mt-1.5 flex items-center gap-x-3",children:[e?n.jsxRuntimeExports.jsx("img",{src:e,className:"h-20 w-20 overflow-hidden rounded-md border object-cover",alt:""}):n.jsxRuntimeExports.jsx(ht,{onSelect:t,children:n.jsxRuntimeExports.jsx("div",{className:"h-20 w-20 cursor-pointer rounded-md border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px] hover:border-gray-400"})}),n.jsxRuntimeExports.jsxs("div",{className:"flex w-3/5 flex-col",children:[n.jsxRuntimeExports.jsx(ht,{onSelect:t,children:n.jsxRuntimeExports.jsx("small",{className:"cursor-pointer rounded-full bg-gray-600 px-2 py-1 text-center text-xs text-white hover:bg-gray-500 dark:bg-gray-700",children:e||!i.isEmpty(e)?"Replace Image":"Choose Image"})}),n.jsxRuntimeExports.jsx("small",{className:"-pl-4 pt-2 text-center text-xs text-gray-600",children:"OR"}),n.jsxRuntimeExports.jsx("input",{type:"url",className:"text-xs",placeholder:"Enter image URL",value:e,onBlur:({target:{value:a}})=>o(s,a),onChange:a=>t(a.target.value)})]})]}),Ri=({id:e,placeholder:t,value:s,onChange:o,onBlur:a})=>{const r={toolbar:[["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]},{align:[]}],["link","clean"]]},l=["header","font","list","bold","italic","underline","strike","blockquote","color","background","align","link","image"];return typeof window>"u"?null:n.jsxRuntimeExports.jsx(Tn,{id:e,value:s,onBlur:p=>a(e,p),onChange:p=>o(p),modules:r,formats:l,placeholder:t,className:"mt-1 rounded-md"})},ki=({schema:e,formData:t,onChange:s})=>{const[o,a]=w.useState([]),r=ne("getPages",()=>[]),{type:l="page",href:p="",target:x="self"}=t;return w.useEffect(()=>{(async()=>{const d=await r();a(d||[])})()},[]),n.jsxRuntimeExports.jsxs("div",{children:[n.jsxRuntimeExports.jsx("span",{className:"text-xs font-medium",children:(e==null?void 0:e.title)??"Link"}),n.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-y-1.5",children:[n.jsxRuntimeExports.jsx("select",{name:"type",value:l,onChange:d=>s({...t,type:d.target.value}),children:[{const:"page",title:"Open Page"},{const:"url",title:"Open URL"},{const:"email",title:"Compose Email"},{const:"telephone",title:"Call Phone"},{const:"scroll",title:"Scroll to element"}].map(d=>n.jsxRuntimeExports.jsx("option",{value:d.const,children:d.title},d.const))}),l==="page"?n.jsxRuntimeExports.jsxs("select",{name:"href",placeholder:"Choose Page",value:p,onChange:d=>s({...t,href:d.target.value}),children:[n.jsxRuntimeExports.jsx("option",{value:"",children:"Choose page"}),i.map(o,d=>n.jsxRuntimeExports.jsx("option",{value:d.slug,children:d.name},d.uuid))]}):n.jsxRuntimeExports.jsx("input",{name:"href",type:"text",value:p,onChange:d=>s({...t,href:d.target.value}),placeholder:l==="page"||l==="url"?"Enter URL":l==="scroll"?"#ElementID":"Enter detail"}),(l==="page"||l==="url")&&n.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2",children:[n.jsxRuntimeExports.jsx("input",{type:"checkbox",defaultChecked:x==="_blank",className:"cursor-pointer rounded-md border border-border",onChange:()=>s({...t,target:x==="_blank"?"_self":"_blank"})}),n.jsxRuntimeExports.jsx("span",{className:"pt-1 text-xs",children:"Open in new tab"})]})]})]})};exports.Accordion=kr;exports.AccordionContent=As;exports.AccordionItem=ks;exports.AccordionTrigger=Ns;exports.Alert=Ss;exports.AlertDescription=Es;exports.AlertDialog=Sr;exports.AlertDialogAction=Ls;exports.AlertDialogCancel=Vs;exports.AlertDialogContent=Ts;exports.AlertDialogDescription=Os;exports.AlertDialogFooter=Ms;exports.AlertDialogHeader=Is;exports.AlertDialogTitle=Ds;exports.AlertDialogTrigger=Cr;exports.AlertTitle=Cs;exports.Badge=Ar;exports.Button=Rs;exports.Card=Ws;exports.CardContent=Qs;exports.CardDescription=Js;exports.CardFooter=Xs;exports.CardHeader=Ys;exports.CardTitle=Ks;exports.Command=nt;exports.CommandDialog=di;exports.CommandEmpty=Qo;exports.CommandGroup=Xo;exports.CommandInput=Ko;exports.CommandItem=en;exports.CommandList=Jo;exports.CommandSeparator=Zo;exports.CommandShortcut=tn;exports.ContextMenu=ui;exports.ContextMenuCheckboxItem=rn;exports.ContextMenuContent=nn;exports.ContextMenuGroup=pi;exports.ContextMenuItem=an;exports.ContextMenuLabel=cn;exports.ContextMenuPortal=fi;exports.ContextMenuRadioGroup=gi;exports.ContextMenuRadioItem=ln;exports.ContextMenuSeparator=dn;exports.ContextMenuShortcut=un;exports.ContextMenuSub=xi;exports.ContextMenuSubContent=on;exports.ContextMenuSubTrigger=sn;exports.ContextMenuTrigger=mi;exports.Dialog=tt;exports.DialogContent=Be;exports.DialogDescription=Hs;exports.DialogFooter=$s;exports.DialogHeader=Us;exports.DialogTitle=Gs;exports.DialogTrigger=zs;exports.DropdownMenu=Jr;exports.DropdownMenuCheckboxItem=Mo;exports.DropdownMenuContent=To;exports.DropdownMenuGroup=Xr;exports.DropdownMenuItem=Io;exports.DropdownMenuLabel=Oo;exports.DropdownMenuPortal=Zr;exports.DropdownMenuRadioGroup=ti;exports.DropdownMenuRadioItem=Do;exports.DropdownMenuSeparator=Lo;exports.DropdownMenuShortcut=Vo;exports.DropdownMenuSub=ei;exports.DropdownMenuSubContent=Po;exports.DropdownMenuSubTrigger=Bo;exports.DropdownMenuTrigger=Qr;exports.HoverCard=Fr;exports.HoverCardContent=ho;exports.HoverCardTrigger=qr;exports.IconPickerField=hi;exports.ImagePickerField=wi;exports.ImagesPanel=ji;exports.Input=Zs;exports.Label=eo;exports.LinkField=ki;exports.Menubar=ro;exports.MenubarCheckboxItem=po;exports.MenubarContent=uo;exports.MenubarGroup=Or;exports.MenubarItem=mo;exports.MenubarLabel=xo;exports.MenubarMenu=Dr;exports.MenubarPortal=Lr;exports.MenubarRadioGroup=zr;exports.MenubarRadioItem=fo;exports.MenubarSeparator=go;exports.MenubarShortcut=bo;exports.MenubarSub=Vr;exports.MenubarSubContent=co;exports.MenubarSubTrigger=lo;exports.MenubarTrigger=io;exports.Popover=Ir;exports.PopoverContent=ao;exports.PopoverTrigger=Mr;exports.RichTextEditorField=Ri;exports.ScrollArea=so;exports.ScrollBar=st;exports.Select=Ur;exports.SelectContent=yo;exports.SelectGroup=$r;exports.SelectItem=wo;exports.SelectLabel=jo;exports.SelectSeparator=Ro;exports.SelectTrigger=vo;exports.SelectValue=Gr;exports.Separator=zo;exports.Sheet=Hr;exports.SheetClose=Yr;exports.SheetContent=Ao;exports.SheetDescription=_o;exports.SheetFooter=Co;exports.SheetHeader=So;exports.SheetTitle=Eo;exports.SheetTrigger=Wr;exports.Skeleton=ci;exports.Switch=ws;exports.Tabs=oo;exports.TabsContent=Re;exports.TabsList=ot;exports.TabsTrigger=we;exports.Textarea=to;exports.Toaster=li;exports.Toggle=js;exports.Tooltip=Pr;exports.TooltipContent=no;exports.TooltipPortal=_r;exports.TooltipProvider=Br;exports.TooltipTrigger=Tr;exports.activePanelAtom=ts;exports.addBlockOffCanvasAtom=ss;exports.addBlocksModalAtom=Tt;exports.advanceStylingOpenAtom=Qt;exports.atom=K;exports.atomWithDefault=Xn;exports.atomWithStorage=ue;exports.badgeVariants=_s;exports.buttonVariants=_e;exports.canAddChildBlock=Dt;exports.canDeleteBlock=pa;exports.canDropBlock=fa;exports.canDuplicateBlock=ma;exports.canvasIframeAtom=es;exports.chaiBuilderPropsAtom=Ne;exports.chaiExternalDataAtom=Ct;exports.createStore=kt;exports.dataProvidersAtom=Ze;exports.draggedBlockIdAtom=rs;exports.draggingFlagAtom=as;exports.editLayerNameAtom=Zt;exports.getBlockJSONFromSchemas=ze;exports.getBlockJSONFromUISchemas=Ve;exports.inlineEditingActiveAtom=ns;exports.isDevelopment=sa;exports.networkModeAtom=Xt;exports.pageSyncStateAtom=Ce;exports.presentBlocksAtom=H;exports.reducer=Fo;exports.showPredefinedBlockCategoryAtom=os;exports.toast=qo;exports.toggleVariants=ys;exports.useActiveModal=dr;exports.useActivePanel=fr;exports.useAddBlock=ja;exports.useAddBlockParent=xr;exports.useAddClassesToBlocks=Aa;exports.useAllBlocks=Ft;exports.useAtom=Gn;exports.useAtomValue=Nt;exports.useBrandingOptions=$t;exports.useBuilderProp=ne;exports.useBuilderReset=hr;exports.useBuildingBlocks=qt;exports.useCanvasHistory=Ee;exports.useCanvasWidth=Oa;exports.useCanvasZoom=Va;exports.useCopyBlockIds=za;exports.useCurrentPage=Gt;exports.useCutBlockIds=ms;exports.useDarkMode=Fa;exports.useDeveloperPreviewMode=Ua;exports.useDuplicateBlocks=fs;exports.useFeatureSupport=jr;exports.useGetPageData=Xe;exports.useHiddenBlockIds=Ga;exports.useHighlightBlockId=xs;exports.useMarkAsGlobalBlock=Wa;exports.useMoveBlocks=Ya;exports.usePageDataProviders=is;exports.usePasteBlocks=Ja;exports.usePreviewMode=Ut;exports.useProject=Xa;exports.useReadOnlyMode=ur;exports.useRemoveBlocks=Za;exports.useRemoveClassesFromBlocks=tr;exports.useSavePage=Da;exports.useSelectedBlock=ha;exports.useSelectedBlockAllClasses=sr;exports.useSelectedBlockCurrentClasses=ar;exports.useSelectedBlockIds=me;exports.useSelectedBlocksDisplayChild=ba;exports.useSelectedBreakpoints=br;exports.useSelectedStylingBlocks=Ke;exports.useSetAllBlocks=ua;exports.useSetAtom=At;exports.useStore=qe;exports.useStylingBreakpoint=ls;exports.useStylingState=rr;exports.useToast=Uo;exports.useTranslations=yr;exports.useTreeData=da;exports.useUILibraryBlocks=Rr;exports.useUpdateBlocksProps=ir;exports.useUpdateBlocksPropsRealtime=lr;
|
|
1
|
+
"use strict";const n=require("./jsx-runtime-WUGKV8jN.cjs"),w=require("react"),fn=require("@radix-ui/react-toggle"),re=require("class-variance-authority"),c=require("./utils-tx6hqsHY.cjs"),xn=require("@radix-ui/react-switch"),gn=require("@radix-ui/react-slot"),bn=require("@radix-ui/react-accordion"),L=require("@radix-ui/react-icons"),hn=require("@radix-ui/react-alert-dialog"),vn=require("@radix-ui/react-dialog"),yn=require("@radix-ui/react-label"),jn=require("@radix-ui/react-scroll-area"),wn=require("@radix-ui/react-tabs"),Rn=require("@radix-ui/react-tooltip"),kn=require("@radix-ui/react-popover"),Nn=require("@radix-ui/react-menubar"),An=require("@radix-ui/react-hover-card"),Sn=require("@radix-ui/react-select"),Cn=require("@radix-ui/react-dropdown-menu"),En=require("@radix-ui/react-separator"),_n=require("@radix-ui/react-toast"),U=require("cmdk"),Bn=require("@radix-ui/react-context-menu"),vt=require("react-icons-picker"),Pn=require("react-dom"),i=require("lodash"),Tn=require("react-quill"),u=require("jotai"),yt=require("flat-to-nested"),fe=require("redux-undo"),F=require("./MODIFIERS-WFzDQfiT.cjs"),In=require("@chaibuilder/runtime"),Mn=require("@react-hookz/web");require("react-i18next");function D(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const f=D(w),jt=D(fn),Oe=D(xn),ae=D(bn),V=D(hn),_=D(vn),wt=D(yn),oe=D(jn),ie=D(wn),de=D(Rn),ge=D(kn),C=D(Nn),ke=D(An),M=D(Sn),B=D(Cn),Rt=D(En),G=D(_n),P=D(Bn);var O={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let Dn=0;function K(e,t){const s=`atom${++Dn}`,o={toString:()=>s};return typeof e=="function"?o.read=e:(o.init=e,o.read=a=>a(o),o.write=(a,r,l)=>r(o,typeof l=="function"?l(a(o)):l)),t&&(o.write=t),o}const Pe=e=>"init"in e,Te=e=>!!e.write,je=new WeakMap,On=(e,t)=>{je.set(e,t),e.catch(()=>{}).finally(()=>je.delete(e))},at=(e,t)=>{const s=je.get(e);s&&(je.delete(e),s(t))},rt=(e,t)=>{e.status="fulfilled",e.value=t},it=(e,t)=>{e.status="rejected",e.reason=t},Ln=e=>typeof(e==null?void 0:e.then)=="function",pe=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),lt=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),ce=e=>"v"in e&&e.v instanceof Promise,Vn=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,he=e=>{if("e"in e)throw e.e;return e.v},kt=()=>{const e=new WeakMap,t=new WeakMap,s=new Map;let o,a,r;(O?"production":void 0)!=="production"&&(o=new Set,a=new Set,r=new Set);const l=m=>e.get(m),p=(m,g)=>{(O?"production":void 0)!=="production"&&Object.freeze(g);const y=e.get(m);if(e.set(m,g),s.has(m)||s.set(m,y),y&&ce(y)){const b="v"in g?g.v instanceof Promise?g.v:Promise.resolve(g.v):Promise.reject(g.e);at(y.v,b)}},x=(m,g,y)=>{const b=new Map;let j=!1;y.forEach((v,k)=>{!v&&k===m&&(v=g),v?(b.set(k,v),g.d.get(k)!==v&&(j=!0)):(O?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(j||g.d.size!==b.size)&&(g.d=b)},d=(m,g,y)=>{const b=l(m),j={d:(b==null?void 0:b.d)||new Map,v:g};if(y&&x(m,j,y),b&&pe(b,j)&&b.d===j.d)return b;if(b&&ce(b)&&ce(j)&&Vn(b,j)){if(b.d===j.d)return b;j.v=b.v}return p(m,j),j},h=(m,g,y,b)=>{if(Ln(g)){let j;const v=new Promise((k,T)=>{let A=!1;g.then(E=>{if(!A){A=!0;const S=l(m),J=d(m,v,y);rt(v,E),k(E),(S==null?void 0:S.d)!==J.d&&$(m,J,S==null?void 0:S.d)}},E=>{if(!A){A=!0;const S=l(m),J=d(m,v,y);it(v,E),T(E),(S==null?void 0:S.d)!==J.d&&$(m,J,S==null?void 0:S.d)}}),j=E=>{A||(A=!0,E.then(S=>rt(v,S),S=>it(v,S)),k(E))}});return v.orig=g,v.status="pending",On(v,k=>{k&&j(k),b==null||b()}),d(m,v,y)}return d(m,g,y)},R=(m,g,y)=>{const b=l(m),j={d:(b==null?void 0:b.d)||new Map,e:g};return y&&x(m,j,y),b&<(b,j)&&b.d===j.d?b:(p(m,j),j)},N=m=>{const g=l(m);if(g&&(g.d.forEach((A,E)=>{E!==m&&!t.has(E)&&N(E)}),Array.from(g.d).every(([A,E])=>{const S=l(A);return A===m||S===E||S&&!ce(S)&&pe(S,E)})))return g;const y=new Map;let b=!0;const j=A=>{if(A===m){const S=l(A);if(S)return y.set(A,S),he(S);if(Pe(A))return y.set(A,void 0),A.init;throw new Error("no atom init")}const E=N(A);return y.set(A,E),he(E)};let v,k;const T={get signal(){return v||(v=new AbortController),v.signal},get setSelf(){return(O?"production":void 0)!=="production"&&!Te(m)&&console.warn("setSelf function cannot be used with read-only atom"),!k&&Te(m)&&(k=(...A)=>{if((O?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return Q(m,...A)}),k}};try{const A=m.read(j,T);return h(m,A,y,()=>v==null?void 0:v.abort())}catch(A){return R(m,A,y)}finally{b=!1}},I=m=>he(N(m)),q=m=>{let g=t.get(m);return g||(g=Y(m)),g},z=(m,g)=>!g.l.size&&(!g.t.size||g.t.size===1&&g.t.has(m)),X=m=>{const g=t.get(m);g&&z(m,g)&&se(m)},le=m=>{const g=new Map,y=new WeakMap,b=v=>{const k=t.get(v);k==null||k.t.forEach(T=>{T!==v&&(g.set(T,(g.get(T)||new Set).add(v)),y.set(T,(y.get(T)||0)+1),b(T))})};b(m);const j=v=>{const k=t.get(v);k==null||k.t.forEach(T=>{var A;if(T!==v){let E=y.get(T);if(E&&y.set(T,--E),!E){let S=!!((A=g.get(T))!=null&&A.size);if(S){const J=l(T),pn=N(T);S=!J||!pe(J,pn)}S||g.forEach(J=>J.delete(T))}j(T)}})};j(m)},Z=(m,...g)=>{let y=!0;const b=k=>he(N(k)),j=(k,...T)=>{let A;if(k===m){if(!Pe(k))throw new Error("atom not writable");const E=l(k),S=h(k,T[0]);(!E||!pe(E,S))&&le(k)}else A=Z(k,...T);if(!y){const E=ee();(O?"production":void 0)!=="production"&&a.forEach(S=>S({type:"async-write",flushed:E}))}return A},v=m.write(b,j,...g);return y=!1,v},Q=(m,...g)=>{const y=Z(m,...g),b=ee();return(O?"production":void 0)!=="production"&&a.forEach(j=>j({type:"write",flushed:b})),y},Y=(m,g)=>{const y={t:new Set(g&&[g]),l:new Set};if(t.set(m,y),(O?"production":void 0)!=="production"&&r.add(m),N(m).d.forEach((b,j)=>{const v=t.get(j);v?v.t.add(m):j!==m&&Y(j,m)}),N(m),Te(m)&&m.onMount){const b=m.onMount((...j)=>Q(m,...j));b&&(y.u=b)}return y},se=m=>{var g;const y=(g=t.get(m))==null?void 0:g.u;y&&y(),t.delete(m),(O?"production":void 0)!=="production"&&r.delete(m);const b=l(m);b?(ce(b)&&at(b.v),b.d.forEach((j,v)=>{if(v!==m){const k=t.get(v);k&&(k.t.delete(m),z(v,k)&&se(v))}})):(O?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},$=(m,g,y)=>{const b=new Set(g.d.keys());y==null||y.forEach((j,v)=>{if(b.has(v)){b.delete(v);return}const k=t.get(v);k&&(k.t.delete(m),z(v,k)&&se(v))}),b.forEach(j=>{const v=t.get(j);v?v.t.add(m):t.has(m)&&Y(j,m)})},ee=()=>{let m;for((O?"production":void 0)!=="production"&&(m=new Set);s.size;){const g=Array.from(s);s.clear(),g.forEach(([y,b])=>{const j=l(y);if(j){j.d!==(b==null?void 0:b.d)&&$(y,j,b==null?void 0:b.d);const v=t.get(y);v&&!(b&&!ce(b)&&(pe(b,j)||lt(b,j)))&&(v.l.forEach(k=>k()),(O?"production":void 0)!=="production"&&m.add(y))}else(O?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((O?"production":void 0)!=="production")return o.forEach(g=>g("state")),m},te=(m,g)=>{const y=q(m),b=ee(),j=y.l;return j.add(g),(O?"production":void 0)!=="production"&&(o.forEach(v=>v("sub")),a.forEach(v=>v({type:"sub",flushed:b}))),()=>{j.delete(g),X(m),(O?"production":void 0)!=="production"&&(o.forEach(v=>v("unsub")),a.forEach(v=>v({type:"unsub"})))}};return(O?"production":void 0)!=="production"?{get:I,set:Q,sub:te,dev_subscribe_store:(m,g)=>g!==2?(console.warn("The current StoreListener revision is 2. The older ones are deprecated."),o.add(m),()=>{o.delete(m)}):(a.add(m),()=>{a.delete(m)}),dev_get_mounted_atoms:()=>r.values(),dev_get_atom_state:m=>e.get(m),dev_get_mounted:m=>t.get(m),dev_restore_atoms:m=>{for(const[y,b]of m)Pe(y)&&(h(y,b),le(y));const g=ee();a.forEach(y=>y({type:"restore",flushed:g}))}}:{get:I,set:Q,sub:te}};let Ie;const zn=()=>(Ie||(Ie=kt()),Ie);var Fn={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const qn=w.createContext(void 0),qe=e=>{const t=w.useContext(qn);return(e==null?void 0:e.store)||t||zn()};const Un=e=>typeof(e==null?void 0:e.then)=="function",$n=w.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function Nt(e,t){const s=qe(t),[[o,a,r],l]=w.useReducer(d=>{const h=s.get(e);return Object.is(d[0],h)&&d[1]===s&&d[2]===e?d:[h,s,e]},void 0,()=>[s.get(e),s,e]);let p=o;(a!==s||r!==e)&&(l(),p=s.get(e));const x=t==null?void 0:t.delay;return w.useEffect(()=>{const d=s.sub(e,()=>{if(typeof x=="number"){setTimeout(l,x);return}l()});return l(),d},[s,e,x]),w.useDebugValue(p),Un(p)?$n(p):p}function At(e,t){const s=qe(t);return w.useCallback((...a)=>{if((Fn?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return s.set(e,...a)},[s,e])}function Gn(e,t){return[Nt(e,t),At(e,t)]}var Ue={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const St=Symbol();function Hn(e,t){const s=K(e,(o,a,r)=>a(s,t(o(s),r)));return s}const ct=(e,t,s)=>(t.has(s)?t:t.set(s,e())).get(s),Wn=new WeakMap,Yn=(e,t,s)=>{const o=ct(()=>new WeakMap,Wn,t);return ct(e,o,s)},Kn={},dt=e=>!!e.write,Jn=e=>typeof e=="function";function Qn(e,t){return Yn(()=>{const s=new WeakMap,o=(l,p)=>{let x=s.get(l);if(x)return x;const d=p&&s.get(p),h=[],R=[];return l.forEach((N,I)=>{const q=t?t(N):I;R[I]=q;const z=d&&d.atomList[d.keyList.indexOf(q)];if(z){h[I]=z;return}const X=Z=>{const Q=Z(a),Y=Z(e),$=o(Y,Q==null?void 0:Q.arr).keyList.indexOf(q);if($<0||$>=Y.length){const ee=l[o(l).keyList.indexOf(q)];if(ee)return ee;throw new Error("splitAtom: index out of bounds for read")}return Y[$]},le=(Z,Q,Y)=>{const se=Z(a),$=Z(e),te=o($,se==null?void 0:se.arr).keyList.indexOf(q);if(te<0||te>=$.length)throw new Error("splitAtom: index out of bounds for write");const m=Jn(Y)?Y($[te]):Y;Q(e,[...$.slice(0,te),m,...$.slice(te+1)])};h[I]=dt(e)?K(X,le):K(X)}),d&&d.keyList.length===R.length&&d.keyList.every((N,I)=>N===R[I])?x=d:x={arr:l,atomList:h,keyList:R},s.set(l,x),x},a=K(l=>{const p=l(a),x=l(e);return o(x,p==null?void 0:p.arr)});(Ue?"production":void 0)!=="production"&&(a.debugPrivate=!0),a.init=void 0;const r=dt(e)?K(l=>l(a).atomList,(l,p,x)=>{switch(x.type){case"remove":{const d=l(r).indexOf(x.atom);if(d>=0){const h=l(e);p(e,[...h.slice(0,d),...h.slice(d+1)])}break}case"insert":{const d=x.before?l(r).indexOf(x.before):l(r).length;if(d>=0){const h=l(e);p(e,[...h.slice(0,d),x.value,...h.slice(d)])}break}case"move":{const d=l(r).indexOf(x.atom),h=x.before?l(r).indexOf(x.before):l(r).length;if(d>=0&&h>=0){const R=l(e);d<h?p(e,[...R.slice(0,d),...R.slice(d+1,h),R[d],...R.slice(h)]):p(e,[...R.slice(0,h),R[d],...R.slice(h,d),...R.slice(d+1)])}break}}}):K(l=>l(a).atomList);return r},e,t||Kn)}function Xn(e){const t=Symbol(),s=K(t);(Ue?"production":void 0)!=="production"&&(s.debugPrivate=!0);const o=K((a,r)=>{const l=a(s);return l!==t?l:e(a,r)},(a,r,l)=>{if(l===St)r(s,t);else if(typeof l=="function"){const p=a(o);r(s,l(p))}else r(s,l)});return o}const Zn=e=>typeof(e==null?void 0:e.then)=="function";function ea(e){let t,s;const o={getItem:(a,r)=>{var l,p;const x=h=>{if(h=h||"",t!==h){try{s=JSON.parse(h)}catch{return r}t=h}return s},d=(p=(l=e())==null?void 0:l.getItem(a))!=null?p:null;return Zn(d)?d.then(x):x(d)},setItem:(a,r)=>{var l;return(l=e())==null?void 0:l.setItem(a,JSON.stringify(r))},removeItem:a=>{var r;return(r=e())==null?void 0:r.removeItem(a)}};return typeof window<"u"&&typeof window.addEventListener=="function"&&(o.subscribe=(a,r,l)=>{if(!(e()instanceof window.Storage))return()=>{};const p=x=>{if(x.storageArea===e()&&x.key===a){let d;try{d=JSON.parse(x.newValue||"")}catch{d=l}r(d)}};return window.addEventListener("storage",p),()=>{window.removeEventListener("storage",p)}}),o}const ta=ea(()=>typeof window<"u"?window.localStorage:void 0);function ue(e,t,s=ta,o){const a=o==null?void 0:o.unstable_getOnInit,r=K(a?s.getItem(e,t):t);return(Ue?"production":void 0)!=="production"&&(r.debugPrivate=!0),r.onMount=p=>{a||p(s.getItem(e,t));let x;return s.subscribe&&(x=s.subscribe(e,p,t)),x},K(p=>p(r),(p,x,d)=>{const h=typeof d=="function"?d(p(r)):d;return h===St?(x(r,t),s.removeItem(e)):h instanceof Promise?h.then(R=>(x(r,R),s.setItem(e,R))):(x(r,h),s.setItem(e,h))})}const Ne=u.atom(null);Ne.debugLabel="chaiBuilderPropsAtom";const Ct=u.atom({});Ct.debugLabel="chaiExternalDataAtom";const sa=()=>!1,oa=e=>{const t=e.replace(F.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}};const na=new yt({children:"blockNodes"}),Et=(e,t=null)=>i.flatten(e.map(s=>{if(s=t!==null?{...s,parent:t}:s,s.children&&s.children.length){const o=[...s.children];return delete s.children,i.flatten([s,...Et(o,s._id)])}return s}));function _t(e,t,s){const o=i.filter(e,r=>r._parent===t),a=[];for(let r=0;r<o.length;r++){const l=Bt(o[r]);if(Object.keys(l).length>0&&Object.keys(l).forEach(p=>{o[r][p]=`slot:${c.generateUUID()}`}),i.filter(e,{_parent:o[r]._id}).length>0){const p=c.generateUUID();a.push({...o[r],oldId:o[r]._id,_id:p,_parent:s}),a.push(i.flatten(_t(e,o[r]._id,p)))}else a.push({...o[r],oldId:o[r]._id,_id:c.generateUUID(),_parent:s})}return i.flatten(a)}function aa(e){let t=na.convert(e.map(s=>i.omit(s,["settings"])));return t=!t.type&&t.blockNodes?t.blockNodes:i.isEmpty(t)?[]:[t],t}const Bt=e=>{const t={};return Object.keys(e).forEach(s=>{i.isString(e[s])&&e[s].startsWith("slot")&&(t[s]=e[s].replace("slot:",""))}),t},ra=(e,t,s=null)=>{let o=i.find(e,{_id:t});o={...o,oldId:o._id,_id:c.generateUUID()},s&&(o={...o,_parent:s});const a=[o];i.filter(e,{_parent:t}).length>0&&a.push(i.flatten(_t(e,t,o._id)));const r=i.flatten(a);return i.map(r,l=>{const p=l,x=Bt(p);return Object.keys(x).length>0&&Object.keys(x).forEach(d=>{const h=i.find(r,{oldId:x[d].replace("slot:","")});p[d]=`slot:${h._id}`}),i.omit(p,["global","oldId"])})};const ia=fe((e=[],t)=>{switch(t.type){case"add_new_blocks":case"add_duplicate_blocks":return[...e,...t.payload];case"create_snapshot":return[...e];case"set_blocks":case"set_page_blocks":return[...t.payload];case"update_props":case"update_props_realtime":const{payload:s}=t;return e.map(o=>(s.ids.includes(o._id)&&!i.isEmpty(t.payload.props)&&Object.keys(t.payload.props).forEach(a=>{i.set(o,a,t.payload.props[a])}),o));default:return e}},{debug:!1,ignoreInitialState:!1,limit:30,filter:fe.excludeAction(["update_props_realtime","add_duplicate_blocks","set_page_blocks"])}),Ae=Hn({past:[],present:[],future:[]},ia);Ae.debugLabel="pageBlocksAtom";const H=u.atom(e=>{var t;return(t=e(Ae))==null?void 0:t.present});H.debugLabel="presentBlocksAtom";const $e=Qn(H);$e.debugLabel="pageBlocksAtomsAtom";const Pt=u.atom(e=>aa(e(H)));Pt.debugLabel="pageBlocksTreeAtom";const la=u.atom("");la.debugLabel="builderActivePageAtom";const ca=u.atom(-1);ca.debugLabel="destinationDropIndexAtom";const Tt=u.atom(!1);Tt.debugLabel="addBlocksModalAtom";const It=u.atom([]);It.debugLabel="buildingBlocksAtom";const Mt=u.atom(e=>{const t=e(It);return i.filter(t,s=>i.has(s,"blockId"))});Mt.debugLabel="globalBlocksAtom";const W=()=>{const[,e]=u.useAtom(Ae);return e},da=()=>{const e=W(),t=u.useAtomValue(Pt),s=w.useCallback(o=>{const a=Et(o);e({type:"set_page_blocks",payload:a})},[e]);return[t,s]},ua=()=>{const e=W();return[w.useCallback(s=>{e({type:"set_page_blocks",payload:s})},[e])]},Dt=e=>["Box","Slot","Form","Link","Paragraph","Heading","List","ListItem","Table","TableCell"].includes(e),ma=e=>!["Slot"].includes(e),pa=e=>!["Slot"].includes(e);function Le(e,t){return e==="Slot"||t==="List"&&e!=="ListItem"||t==="Row"&&e!=="Column"||t==="Heading"&&!i.includes(["Span","Text"],e)||t==="Paragraph"&&!i.includes(["Span","Text"],e)?!1:Dt(t)}const fa=(e,{dragSource:t,dropTarget:s})=>{const o=i.get(t,"data._type",""),a=i.get(s,"data._type","");return o==="Slot"||i.get(t,"id")&&i.get(t,"id")===i.get(s,"id")?!1:i.isEmpty(a)?!0:Le(o,a)},Ge=u.atom([]);Ge.debugLabel="selectedBlockIdsAtom";const He=u.atom(e=>{const t=e(H),s=e(Ge);return i.map(i.filter(t,({_id:o})=>i.includes(s,o)),o=>({...o}))});He.debugLabel="selectedBlocksAtom";const We=u.atom(e=>{const t=e(He);return t.length===0?null:t.length===1?t[0]:{type:"Multiple",id:i.map(t,"id")}});We.debugLabel="selectedBlockAtom";const xa=e=>i.get(e,"parent",null),ga=u.atom(e=>{const t=e(He),s=i.map(t,xa);return i.filter(e(H),o=>i.includes(s,o._id))});ga.debugLabel="selectedBlocksParentsAtom";const Ot=u.atom(()=>!1);Ot.debugLabel="selectedBlockFlexChildAtom";const Lt=u.atom(()=>!1);Lt.debugLabel="selectedBlockGridChildAtom";const Ye=u.atom("");Ye.debugLabel="styleStateAtom";const Vt=ue("styleBreakpoint","xs");Vt.debugLabel="styleBreakpointAtom";const ba=()=>({flexChild:u.useAtomValue(Ot),gridChild:u.useAtomValue(Lt)}),ha=()=>u.useAtomValue(We);const me=()=>{const[e,t]=u.useAtom(Ge),s=w.useCallback(o=>{t(a=>i.includes(a,o)?i.without(a,o):[...a,o])},[t]);return[e,t,s]},Ve=e=>{switch(e.type){case"singular":return e.uiSchema;case"model":const{properties:t}=e,s={};return Object.keys(t).forEach(r=>{const l=t[r];if(i.includes(["slot","styles"],l.type))return;const p=r;s[p]=Ve(l)}),s;case"list":const{itemProperties:o}=e,a={items:{}};return Object.keys(o).forEach(r=>{const l=o[r];if(i.includes(["slot","styles"],l.type))return;const p=r;a.items[p]=Ve(l)}),a;default:return{}}},ze=e=>{switch(e.type){case"singular":return e.schema;case"model":const{properties:t,title:s}=e,o={title:s,type:"object",properties:{}};return Object.keys(t).forEach(p=>{const x=t[p];if(i.includes(["slot","styles"],x.type))return;const d=p;o.properties[d]=ze(x)}),o;case"list":const{itemProperties:a,title:r}=e,l={title:r,type:"array",items:{type:"object",properties:{}}};return Object.keys(a).forEach(p=>{const x=a[p];if(i.includes(["slot","styles"],x.type))return;const d=p;l.items.properties[d]=ze(x),i.set(l.items,"title",i.get(x,"itemTitle",`${r} item`))}),l;default:return{}}},zt=e=>{const t={};return Object.keys(e).forEach(s=>{t[s]=ya(e[s])}),t},va=e=>{if(i.isEmpty(e.default))return[];const{itemProperties:t}=e;return i.map(e.default,s=>{const o={...s};return i.forIn(s,(a,r)=>{i.has(t,r)&&i.get(t[r],"i18n",!1)&&(o[r]=F.I18N_KEY)}),o})},ya=e=>{switch(e.type){case"styles":return e.default;case"slot":return`${F.SLOT_KEY}${c.generateUUID()}`;case"singular":const{i18n:t,schema:s}=e;return t?F.I18N_KEY:i.get(s,"default","");case"model":return zt(e.properties);case"list":return va(e);default:return""}};const Ft=()=>u.useAtomValue(H);function ut(e,t,s,o,a){if(s!==null){const x=i.findIndex(e,{_parent:t}),d=(x===-1?0:x)+s;return e.splice(d,0,...o),e}if(!a){const d=i.findIndex(e,{_id:t})+1;return e.splice(d,0,...o),e}let r=i.findIndex(e,{_id:t});const l=i.filter(e,{_parent:t});i.isEmpty(l)||(r=i.findIndex(e,{_id:i.last(l)._id}));const p=r+1;return e.splice(p,0,...o),e}const ja=()=>{const e=W(),t=Ft(),[,s]=me(),o=w.useCallback((r,l,p)=>{var R;for(let N=0;N<r.length;N++){const{_id:I}=r[N];r[N]._id=c.generateUUID();const q=i.filter(r,{_parent:I});for(let z=0;z<q.length;z++)q[z]._parent=r[N]._id}const x=i.first(r);let d;l&&(d=i.find(t,{_id:l}),r[0]._parent=l);const h=d?Le(x._type,d._type):!0;return!h&&d&&(r[0]._parent=d._parent),e({type:"set_blocks",payload:ut(t,l||null,p||null,r,h)}),s([(R=i.first(r))==null?void 0:R._id]),i.first(r)},[t,e,s]);return{addCoreBlock:w.useCallback((r,l,p)=>{if(i.has(r,"blocks")){const z=r.blocks;return o(z,l,p)}const x=c.generateUUID(),d=zt(r.props),h=[];i.forIn(d,(z,X)=>{if(i.startsWith(z,F.SLOT_KEY)){const le=z.replace(F.SLOT_KEY,"");h.push({_id:le,_type:"Slot",_parent:x,_name:r.props[X].name,_styles:r.props[X].styles,_emptyStyles:r.props[X].emptyStyles})}});const R={_type:r.type,_id:x,...d};let N;l&&(N=i.find(t,{_id:l}),R._parent=l);const I=N?Le(r.type,N._type):!0;!I&&N&&(R._parent=N._parent);const q=[R,...h];return e({type:"set_blocks",payload:ut(t,l||null,p||null,q,I)}),s([R._id]),R},[o,t,e,s]),addPredefinedBlock:o}},mt={xs:420,sm:620,md:768,lg:1024,xl:1280,"2xl":1536},pt=["xs","sm","md","lg","xl","2xl"];function wa(e,t){if(t===null)return"baseClasses";const s=t.mq;if(s==="xs"||t.dark||t.mod!=="")return"classes";let o="baseClasses",a=pt.indexOf(s);for(;a>0;){const r=pt[a-1];if(i.find(e,{mq:r,property:t.property})){o="classes";break}a--}return o}const ft=[];function Ra(e="",t="",s=[]){e=e.trim().replace(/ +/g,"");let o=i.filter(i.map(e.split(" "),c.constructClassObject),d=>!i.isNull(d)),a=i.filter(i.map(t.split(" "),c.constructClassObject),d=>!i.isNull(d));a=i.filter(a,d=>!i.includes(ft,d.property));const r=[],l=[];i.each(s,d=>{const h=c.constructClassObject(d),R=i.find(o,i.pick(h,["dark","mq","mod","property"]));if(R&&(o=i.filter(o,N=>N.fullCls!==(R==null?void 0:R.fullCls))),r.push(h),h.mq==="xs"&&!h.dark&&h.mod===""&&(a=i.filter(a,N=>N.property!==h.property)),wa(o,h)==="baseClasses"&&!i.includes(ft,h.property)){const N=i.find(a,i.pick(h,["property"]));R&&(a=i.filter(a,I=>I.fullCls!==(N==null?void 0:N.fullCls))),l.push({...h,fullCls:h.cls,mq:"xs"})}});const p=i.map(i.sortBy([...o,...r],d=>mt[d.mq]),"fullCls").join(" ");return`${i.map(i.sortBy([...a,...l],d=>mt[d.mq]),"fullCls").join(" ").trim()},${p.trim()}`.trim().replace(/ +/g,"")}const be=u.atom([]);be.debugLabel="selectedStylingBlocksAtom";const Ke=()=>u.useAtom(be),ka=e=>{const t=e.replace(F.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}},Na=u.atom(null,(e,t,{blockIds:s,newClasses:o,dispatch:a})=>{const r=i.filter(e($e),p=>s.includes(e(p)._id)),l=i.first(e(be));i.each(r,p=>{const x=e(p),d=i.get(x,l.prop,`${F.STYLES_KEY},`),{baseClasses:h,classes:R}=ka(d);a({type:"update_props_realtime",payload:{ids:[x._id],props:{[l.prop]:`${F.STYLES_KEY}${Ra(R,h,o)}`}}})})}),Aa=()=>{const e=W(),t=u.useSetAtom(Na);return w.useCallback((s,o,a)=>{t({blockIds:s,newClasses:o,dispatch:e}),a&&setTimeout(()=>e({type:"create_snapshot"}),500)},[e,t])},xt=()=>{},qt=()=>{const e=In.useChaiBlocks(),t=u.useAtomValue(Mt),s=()=>{xt()},o=w.useCallback(()=>xt(),[]);return[e,t,s,o]},Sa=u.atom(!1),Ut=()=>{const[e,t]=u.useAtom(Sa);return[e,t]},Ca=u.atom(F.BRANDING_OPTIONS_DEFAULTS),$t=()=>{const[e,t]=u.useAtom(Ca);return[i.isObject(e)?{...F.BRANDING_OPTIONS_DEFAULTS,...e}:F.BRANDING_OPTIONS_DEFAULTS,t]},Ea=u.atom(null),Gt=()=>({currentPage:u.useAtomValue(Ea)}),Ht=new yt({});function _a(e){let t=Ht.convert(e);return t=!t.type&&t.children&&t.children.length?t.children:i.isEmpty(t)?[]:[t],t}const Je=(e,t)=>i.flatten(e.map(s=>{if(s=t?{...s,parent:t}:{...s},s.children){const o=[...s.children];return delete s.children,i.flatten([s,...Je(o,s._id)])}return s}));function Qe(e,t=!1){for(let s=0;s<e.length;s++){const o=e[s];o.global&&!t?e[s]={type:"GlobalBlock",blockId:o.blockId,_parent:i.get(o,"parent",null),_id:o._id}:o.children&&o.children.length&&Qe(o.children)}}function Wt(e){let t=[],s=i.filter(e,{type:"GlobalBlock"});return s.length>0&&(s=i.map(s,Yt),i.each(s,o=>{t=[...t,...Ba(o)]})),t}function Ba(e){let t=[];const s=i.get(i.first(e),"parent",null);i.set(i.first(e),"parent",null);const o=[Ht.convert(Kt(e))];Qe(o,!0);let a=Je(o,e[0]._id);return a=i.set(a,"0.parent",s),t=[...t,a,...Wt(a)],t}function Yt(e){const t=i.find(Fe,{_id:e._id});if(!t)return[];const s=[t],o=i.filter(Fe,{_parent:e._id});return o.length?i.flatten([...s,...i.flatten(i.map(o,Yt))]):i.flatten(s)}const Kt=e=>JSON.parse(JSON.stringify(e));let Fe=[];function Pa(e){Fe=e;const t=_a(Kt(e));Qe(t);const s=Je(t,null),o=Wt(s),a={};return i.each(o,r=>i.set(a,i.first(r).blockId,r)),[s,a]}const Xe=()=>{const[e]=$t(),{currentPage:t}=Gt(),s=u.useAtomValue(H);return w.useCallback(()=>{const o=i.map(s,l=>i.omit(l,["expanded","order","title","siblings","tempClasses"])),[a=[],r=[]]=Pa(o);return{currentPage:t,blocks:a,globalBlocks:r}},[e,t,s])},ne=(e,t=void 0)=>{const s=u.useAtomValue(Ne);return i.get(s,e,t)},Jt=u.atom(!1);Jt.debugLabel="readOnlyModeAtom";const Qt=u.atom(!1);Qt.debugLabel="advanceStylingOpenAtom";const Xt=u.atom("online");Xt.debugLabel="networkModeAtom";const Ta=u.atom(!1);Ta.debugLabel="codeEditorOpenAtom";const Zt=u.atom(!1);Zt.debugLabel="editLayerNameAtom";const Ia=u.atom("");Ia.debugLabel="activeLanguageAtom";const Ma=u.atom("");Ma.debugLabel="primaryLanguageAtom";const es=u.atom(null);es.debugLabel="canvasIframeAtom";const ts=u.atom("layers");ts.debugLabel="activePanelAtom";const ss=u.atom(!1);ss.debugLabel="addBlockOffCanvasAtom";const os=u.atom("");os.debugLabel="showPredefinedBlockCategoryAtom";const Se=u.atom({undoCount:0,redoCount:0});Se.debugLabel="historyStatesAtom";const ns=u.atom("");ns.debugLabel="inlineEditingActiveAtom";const as=u.atom(!1);as.debugLabel="draggingFlagAtom";const rs=u.atom("");rs.debugLabel="draggedBlockIdAtom";const Ze=u.atom([]);Ze.debugLabel="dataProvidersAtom";const is=()=>u.useAtom(Ze),Ce=u.atom("SAVED");Ce.debugLabel="pageSyncStateAtom";const Da=()=>{const[e,t]=u.useAtom(Ce),s=ne("onSaveBlocks",async()=>{}),o=ne("onSavePage",async()=>{}),a=ne("onSyncStatusChange",()=>{}),r=Xe(),l=u.useSetAtom(Se),{undoCount:p,redoCount:x}=Ee(),[d]=is();return{savePage:Mn.useThrottledCallback(async()=>{t("SAVING"),a("SAVING");const R=r();return await o({blocks:R.blocks,providers:d}),setTimeout(()=>{l({undoCount:p,redoCount:x}),t("SAVED"),a("SAVED")},100),!0},[r,t,a,s],5e3),syncState:e,setSyncState:t}},Ee=()=>{const e=u.useAtomValue(Ae),[{undoCount:t,redoCount:s}]=u.useAtom(Se),o=W(),[a]=Ut(),[,r]=me(),[,l]=Ke(),[p,x]=u.useAtom(Ce),d=ne("onSyncStatusChange",()=>{}),h=w.useCallback(()=>{o({type:"create_snapshot"})},[o]);return w.useEffect(()=>{(p==="SAVED"&&t!==(e==null?void 0:e.past.length)||s!==(e==null?void 0:e.future.length))&&(x("UNSAVED"),d("UNSAVED"))},[e==null?void 0:e.past.length,e==null?void 0:e.future.length,t,s,d,x,p]),{undoCount:e==null?void 0:e.past.length,redoCount:e==null?void 0:e.future.length,undo:w.useCallback(()=>{a||(o(fe.ActionCreators.undo()),setTimeout(()=>{l([]),r([])},200))},[o,a,r,l]),redo:w.useCallback(()=>{a||(o(fe.ActionCreators.redo()),setTimeout(()=>{l([]),r([])},200))},[a,o,l,r]),clear:()=>{o(fe.ActionCreators.clearHistory())},createSnapshot:h}},ls=()=>u.useAtom(Vt),cs=ue("canvasWidth",800),ds=u.atom(e=>{const t=e(cs);return c.getBreakpointValue(t).toLowerCase()}),Oa=()=>{const[e,t]=u.useAtom(cs),s=u.useAtomValue(ds),[o,a]=ls();return w.useEffect(()=>{o!=="xs"&&a(s)},[s,o,a]),[e,s,t]},La=ue("canvasZoom",100),Va=()=>u.useAtom(La),us=u.atom([]),ms=()=>{const[e,t]=u.useAtom(us),s=u.useSetAtom(et),o=w.useCallback(a=>{t(a),s([])},[t,s]);return[e,o]},et=u.atom([]),za=()=>{const[e,t]=u.useAtom(et),s=u.useSetAtom(us),o=w.useCallback(a=>{t(a),s([])},[t,s]);return[e,o]},ps=ue("darkMode",!1),Fa=()=>{const[e,t]=u.useAtom(ps);return[e,t]},qa=u.atom(!1),Ua=()=>{const[e,t]=u.useAtom(qa);return[e,t]},fs=()=>{const e=W(),t=u.useAtomValue(H),[,s]=me();return w.useCallback((o,a=null)=>{const r=[];i.each(o,l=>{const x=ra(t,l,a===l?null:a);r.push(i.get(x,"0._id","")),e({type:"add_duplicate_blocks",payload:x})}),s(r),e({type:"create_snapshot"})},[t,s,e])},$a=u.atom([]),Ga=()=>{const[e,t]=u.useAtom($a),s=w.useCallback(o=>{t(a=>i.includes(a,o)?i.without(a,o):[...a,o])},[t]);return[e,t,s]},Ha=u.atom(""),xs=()=>u.useAtom(Ha),Wa=()=>{const e=u.useAtomValue(H),t=W(),s=Xe(),[,,o]=qt();return w.useCallback(async(a,r)=>{const l=c.generateUUID(16),p=i.map(e,x=>(x._id===a&&(x._globalBlockId=l,x._name=r),x));t({type:"set_page_blocks",payload:p}),o()},[e,t,s,o])},Ya=()=>({}),Ka=()=>{const e=u.useAtomValue(H),t=W();return w.useCallback((s,o)=>{const a=i.map(e,r=>(i.includes(s,i.get(r,"_id"))&&i.set(r,"_parent",o),r));t({type:"set_blocks",payload:a})},[e,t])},Ja=()=>{const e=u.useAtomValue(et),[t,s]=ms(),o=fs(),a=Ka();return{canPaste:w.useMemo(()=>t.length>0||e.length>0,[e,t]),pasteBlocks:w.useCallback(l=>{i.isEmpty(e)?a(t,l):o(e,l),s(()=>[])},[t,e,o,a,s])}},Qa=u.atom(""),Xa=()=>{const e=u.useAtomValue(Qa),t=w.useCallback(()=>{},[]),s=w.useCallback(()=>{},[]),o=w.useCallback(()=>{},[]);return{currentProject:e,createProject:o,deleteProject:t,updateProject:s}},gs=(e,t)=>{const s=[],o=i.filter(e,a=>i.includes(t,a._id)||i.includes(t,a._parent)?(s.push(a._id),!1):!0);return i.isEmpty(s)?o:gs(o,s)},Za=()=>{const e=W(),t=u.useAtomValue(H),[s,o]=me();return w.useCallback(a=>{var p;const r=((p=i.find(t,{_id:a[0]}))==null?void 0:p._parent)||null,l=gs(t,a);e({type:"set_blocks",payload:l}),setTimeout(()=>o(r?[r]:[]),200)},[t,o,e,s])},er=u.atom(null,(e,t,{blockIds:s,fullClasses:o,dispatch:a})=>{const r=i.first(e(be)),l=i.filter(e($e),p=>s.includes(e(p)._id));i.each(l,p=>{const x=e(p),d=o;let{classes:h,baseClasses:R}=oa(i.get(x,r.prop,"styles:,"));i.each(d,N=>{const I=new RegExp(`(^| )${N.replace("[","\\[").replace("]","\\]")}($| )`,"g");h=h.replace(I," ").replace(/ +/g," ").trim();const q=i.first(N.split(":"));i.includes(["2xl","xl","lg","md","sm"],q)&&d.push(N.split(":").pop().trim())}),i.each(d,N=>{const I=new RegExp(`(^| )${N.replace("[","\\[").replace("]","\\]")}($| )`,"g");R=R.replace(I," ").replace(/ +/g," ").trim()}),a({type:"update_props_realtime",payload:{ids:[x._id],props:{[r.prop]:`${F.STYLES_KEY}${R},${h}`}}})})}),tr=()=>{const e=W(),t=u.useSetAtom(er);return w.useCallback((s,o)=>{t({blockIds:s,fullClasses:o,dispatch:e}),setTimeout(()=>e({type:"create_snapshot"}))},[e,t])},bs=u.atom(e=>{const t=i.first(e(be)),s=e(We);if(!t||t.blockId!==i.get(s,"_id",null))return[];const a=i.get(s,t.prop,`${F.STYLES_KEY},`).replace(F.STYLES_KEY,"").split(",").join(" ");return i.filter(i.map(a.trim().split(" "),c.constructClassObject),r=>!i.isNull(r))}),sr=()=>u.useAtomValue(bs),gt={xs:0,sm:1,md:2,lg:3,xl:4,"2xl":5},or=u.atom(e=>{const t=e(ds),s=e(Ye),o=e(ps),a=nr(t);let r=i.filter(e(bs),{mod:s});return i.startsWith(s,"_")||(r=i.filter(r,l=>a.includes(l.mq))),r=r.sort((l,p)=>gt[l.mq]-gt[p.mq]),o||(r=i.filter(r,{dark:!1})),r}),nr=e=>{let t=[];switch(e){case"xs":t=["xs"];break;case"sm":t=["xs","sm"];break;case"md":t=["xs","sm","md"];break;case"lg":t=["xs","sm","md","lg"];break;case"xl":t=["xs","sm","md","lg","xl"];break;case"2xl":t=["xs","sm","md","lg","xl","2xl"];break;default:t=["xs"];break}return t},ar=()=>u.useAtomValue(or),rr=()=>u.useAtom(Ye),hs=u.atom(null,(e,t,{blockIds:s,props:o,dispatch:a})=>{a({type:"update_props_realtime",payload:{ids:s,props:o}})}),ir=()=>{const{createSnapshot:e}=Ee(),t=W(),s=u.useSetAtom(hs);return w.useCallback((o,a)=>{s({blockIds:o,props:a,dispatch:t}),e()},[e,t,s])},lr=()=>{const e=W(),t=u.useSetAtom(hs);return w.useCallback((s,o)=>{t({blockIds:s,props:o,dispatch:e})},[e,t])},vs={name:"",props:{},modalProps:{},backdropClose:!0},cr=u.atom(vs),dr=()=>{const[e,t]=u.useAtom(cr),s=w.useCallback((a,r={},l={})=>{t({name:a,props:r,modalProps:l})},[t]),o=w.useCallback((...a)=>{i.get(e,"props.onClose",()=>{})(...a),t(vs)},[t,e]);return{activeModal:e,openModal:s,closeModal:o}},ur=()=>u.useAtomValue(Jt),mr=u.atom(""),pr=u.atom(null),fr=()=>u.useAtom(mr),xr=()=>u.useAtom(pr),gr=ue("selectedBreakpoints",["XS","MD","XL"]),br=()=>{const[e,t]=u.useAtom(gr);return[e,t]},hr=()=>{const e=u.useSetAtom(Se),{clear:t}=Ee(),[,s]=me(),[,o]=xs(),[,a]=Ke();return()=>{s([]),a([]),o(""),t(),e({undoCount:0,redoCount:0})}},vr=u.atom({en:{}}),yr=()=>{const[e,t]=u.useAtom(vr),s=w.useCallback((o,a,r)=>{i.set(e,`${o}.${a}`,r),t(e)},[e,t]);return[e,s]},jr=(e,t)=>{const[s]=u.useAtom(Ne);return i.get(s,e,t)},wr=u.atom([]),Rr=()=>{const[e,t]=w.useState(!1),[s,o]=u.useAtom(wr),a=ne("getUILibraryBlocks",()=>[]);return w.useEffect(()=>{(async()=>s.length>0||(t(!0),o(await a()),t(!1)))()},[]),{data:s,isLoading:e}},ys=re.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),js=f.forwardRef(({className:e,variant:t,size:s,...o},a)=>n.jsxRuntimeExports.jsx(jt.Root,{ref:a,className:c.cn(ys({variant:t,size:s,className:e})),...o}));js.displayName=jt.Root.displayName;const ws=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(Oe.Root,{className:c.cn("peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-800 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",e),...t,ref:s,children:n.jsxRuntimeExports.jsx(Oe.Thumb,{className:c.cn("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950")})}));ws.displayName=Oe.Root.displayName;const _e=re.cva("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Rs=f.forwardRef(({className:e,variant:t,size:s,asChild:o=!1,...a},r)=>{const l=o?gn.Slot:"button";return n.jsxRuntimeExports.jsx(l,{className:c.cn(_e({variant:t,size:s,className:e})),ref:r,...a})});Rs.displayName="Button";const kr=ae.Root,ks=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ae.Item,{ref:s,className:c.cn("border-b",e),...t}));ks.displayName="AccordionItem";const Ns=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsx(ae.Header,{className:"flex",children:n.jsxRuntimeExports.jsxs(ae.Trigger,{ref:o,className:c.cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...s,children:[t,n.jsxRuntimeExports.jsx(L.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));Ns.displayName=ae.Trigger.displayName;const As=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsx(ae.Content,{ref:o,className:c.cn("text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...s,children:n.jsxRuntimeExports.jsx("div",{className:"pb-4 pt-0",children:t})}));As.displayName=ae.Content.displayName;const Nr=re.cva("relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Ss=f.forwardRef(({className:e,variant:t,...s},o)=>n.jsxRuntimeExports.jsx("div",{ref:o,role:"alert",className:c.cn(Nr({variant:t}),e),...s}));Ss.displayName="Alert";const Cs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("h5",{ref:s,className:c.cn("mb-1 font-medium leading-none tracking-tight",e),...t}));Cs.displayName="AlertTitle";const Es=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("text-sm [&_p]:leading-relaxed",e),...t}));Es.displayName="AlertDescription";const _s=re.cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Ar=({className:e,variant:t,...s})=>n.jsxRuntimeExports.jsx("div",{className:c.cn(_s({variant:t}),e),...s}),Sr=V.Root,Cr=V.Trigger,Bs=({className:e,...t})=>n.jsxRuntimeExports.jsx(V.Portal,{className:c.cn(e),...t});Bs.displayName=V.Portal.displayName;const Ps=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Overlay,{className:c.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:s}));Ps.displayName=V.Overlay.displayName;const Ts=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsxs(Bs,{children:[n.jsxRuntimeExports.jsx(Ps,{}),n.jsxRuntimeExports.jsx(V.Content,{ref:s,className:c.cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...t})]}));Ts.displayName=V.Content.displayName;const Is=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});Is.displayName="AlertDialogHeader";const Ms=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ms.displayName="AlertDialogFooter";const Ds=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Title,{ref:s,className:c.cn("text-lg font-semibold",e),...t}));Ds.displayName=V.Title.displayName;const Os=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Description,{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));Os.displayName=V.Description.displayName;const Ls=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Action,{ref:s,className:c.cn(_e(),e),...t}));Ls.displayName=V.Action.displayName;const Vs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Cancel,{ref:s,className:c.cn(_e({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Vs.displayName=V.Cancel.displayName;const tt=_.Root,zs=_.Trigger,Fs=({className:e,...t})=>n.jsxRuntimeExports.jsx(_.Portal,{className:c.cn(e),...t});Fs.displayName=_.Portal.displayName;const qs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Overlay,{ref:s,className:c.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));qs.displayName=_.Overlay.displayName;const Be=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(Fs,{children:[n.jsxRuntimeExports.jsx(qs,{}),n.jsxRuntimeExports.jsxs(_.Content,{ref:o,className:c.cn("fixed left-[50%] top-[50%] z-[999] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...s,children:[t,n.jsxRuntimeExports.jsxs(_.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[n.jsxRuntimeExports.jsx(L.Cross2Icon,{className:"h-4 w-4"}),n.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Be.displayName=_.Content.displayName;const Us=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Us.displayName="DialogHeader";const $s=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$s.displayName="DialogFooter";const Gs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Title,{ref:s,className:c.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));Gs.displayName=_.Title.displayName;const Hs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Description,{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));Hs.displayName=_.Description.displayName;const Ws=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ws.displayName="Card";const Ys=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("flex flex-col space-y-1.5 p-6",e),...t}));Ys.displayName="CardHeader";const Ks=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("h3",{ref:s,className:c.cn("font-semibold leading-none tracking-tight",e),...t}));Ks.displayName="CardTitle";const Js=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("p",{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));Js.displayName="CardDescription";const Qs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("p-6 pt-0",e),...t}));Qs.displayName="CardContent";const Xs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn(" flex items-center p-6 pt-0",e),...t}));Xs.displayName="CardFooter";const Zs=f.forwardRef(({className:e,type:t,...s},o)=>n.jsxRuntimeExports.jsx("input",{type:t,className:c.cn("flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...s}));Zs.displayName="Input";const Er=re.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),eo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(wt.Root,{ref:s,className:c.cn(Er(),e),...t}));eo.displayName=wt.Root.displayName;const to=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("textarea",{className:c.cn("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...t}));to.displayName="Textarea";const so=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(oe.Root,{ref:o,className:c.cn("relative overflow-hidden",e),...s,children:[n.jsxRuntimeExports.jsx(oe.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),n.jsxRuntimeExports.jsx(st,{}),n.jsxRuntimeExports.jsx(oe.Corner,{})]}));so.displayName=oe.Root.displayName;const st=f.forwardRef(({className:e,orientation:t="vertical",...s},o)=>n.jsxRuntimeExports.jsx(oe.ScrollAreaScrollbar,{ref:o,orientation:t,className:c.cn("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 border-t border-t-transparent p-[1px]",e),...s,children:n.jsxRuntimeExports.jsx(oe.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));st.displayName=oe.ScrollAreaScrollbar.displayName;const oo=ie.Root,ot=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ie.List,{ref:s,className:c.cn("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));ot.displayName=ie.List.displayName;const we=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ie.Trigger,{ref:s,className:c.cn("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));we.displayName=ie.Trigger.displayName;const Re=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ie.Content,{ref:s,className:c.cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Re.displayName=ie.Content.displayName;const _r=de.Portal,Br=de.Provider,Pr=de.Root,Tr=de.Trigger,no=f.forwardRef(({className:e,sideOffset:t=4,...s},o)=>n.jsxRuntimeExports.jsx(de.Content,{ref:o,sideOffset:t,className:c.cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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),...s}));no.displayName=de.Content.displayName;const Ir=ge.Root,Mr=ge.Trigger,ao=f.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},a)=>n.jsxRuntimeExports.jsx(ge.Portal,{children:n.jsxRuntimeExports.jsx(ge.Content,{ref:a,align:t,sideOffset:s,className:c.cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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),...o})}));ao.displayName=ge.Content.displayName;const Dr=C.Menu,Or=C.Group,Lr=C.Portal,Vr=C.Sub,zr=C.RadioGroup,ro=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(C.Root,{ref:s,className:c.cn("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",e),...t}));ro.displayName=C.Root.displayName;const io=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(C.Trigger,{ref:s,className:c.cn("flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),...t}));io.displayName=C.Trigger.displayName;const lo=f.forwardRef(({className:e,inset:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(C.SubTrigger,{ref:a,className:c.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...o,children:[s,n.jsxRuntimeExports.jsx(L.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));lo.displayName=C.SubTrigger.displayName;const co=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(C.SubContent,{ref:s,className:c.cn("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}));co.displayName=C.SubContent.displayName;const uo=f.forwardRef(({className:e,align:t="start",alignOffset:s=-4,sideOffset:o=8,...a},r)=>n.jsxRuntimeExports.jsx(C.Portal,{children:n.jsxRuntimeExports.jsx(C.Content,{ref:r,align:t,alignOffset:s,sideOffset:o,className:c.cn("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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),...a})}));uo.displayName=C.Content.displayName;const mo=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(C.Item,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...s}));mo.displayName=C.Item.displayName;const po=f.forwardRef(({className:e,children:t,checked:s,...o},a)=>n.jsxRuntimeExports.jsxs(C.CheckboxItem,{ref:a,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(C.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.CheckIcon,{className:"h-4 w-4"})})}),t]}));po.displayName=C.CheckboxItem.displayName;const fo=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(C.RadioItem,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(C.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));fo.displayName=C.RadioItem.displayName;const xo=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(C.Label,{ref:o,className:c.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s}));xo.displayName=C.Label.displayName;const go=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(C.Separator,{ref:s,className:c.cn("-mx-1 my-1 h-px bg-muted",e),...t}));go.displayName=C.Separator.displayName;const bo=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});bo.displayname="MenubarShortcut";const Fr=ke.Root,qr=ke.Trigger,ho=f.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},a)=>n.jsxRuntimeExports.jsx(ke.Content,{ref:a,align:t,sideOffset:s,className:c.cn("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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),...o}));ho.displayName=ke.Content.displayName;const Ur=M.Root,$r=M.Group,Gr=M.Value,vo=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(M.Trigger,{ref:o,className:c.cn("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...s,children:[t,n.jsxRuntimeExports.jsx(M.Icon,{asChild:!0,children:n.jsxRuntimeExports.jsx(L.CaretSortIcon,{className:"h-4 w-4 opacity-50"})})]}));vo.displayName=M.Trigger.displayName;const yo=f.forwardRef(({className:e,children:t,position:s="popper",...o},a)=>n.jsxRuntimeExports.jsx(M.Portal,{children:n.jsxRuntimeExports.jsx(M.Content,{ref:a,className:c.cn("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...o,children:n.jsxRuntimeExports.jsx(M.Viewport,{className:c.cn("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));yo.displayName=M.Content.displayName;const jo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(M.Label,{ref:s,className:c.cn("px-2 py-1.5 text-sm font-semibold",e),...t}));jo.displayName=M.Label.displayName;const wo=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(M.Item,{ref:o,className:c.cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(M.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.CheckIcon,{className:"h-4 w-4"})})}),n.jsxRuntimeExports.jsx(M.ItemText,{children:t})]}));wo.displayName=M.Item.displayName;const Ro=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(M.Separator,{ref:s,className:c.cn("-mx-1 my-1 h-px bg-muted",e),...t}));Ro.displayName=M.Separator.displayName;const Hr=_.Root,Wr=_.Trigger,Yr=_.Close,ko=({className:e,...t})=>n.jsxRuntimeExports.jsx(_.Portal,{className:c.cn(e),...t});ko.displayName=_.Portal.displayName;const No=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Overlay,{className:c.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:s}));No.displayName=_.Overlay.displayName;const Kr=re.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ao=f.forwardRef(({side:e="right",className:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(ko,{children:[n.jsxRuntimeExports.jsx(No,{}),n.jsxRuntimeExports.jsxs(_.Content,{ref:a,className:c.cn(Kr({side:e}),t),...o,children:[s,n.jsxRuntimeExports.jsxs(_.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[n.jsxRuntimeExports.jsx(L.Cross2Icon,{className:"h-4 w-4"}),n.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ao.displayName=_.Content.displayName;const So=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});So.displayName="SheetHeader";const Co=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Co.displayName="SheetFooter";const Eo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Title,{ref:s,className:c.cn("text-lg font-semibold text-foreground",e),...t}));Eo.displayName=_.Title.displayName;const _o=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Description,{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));_o.displayName=_.Description.displayName;const Jr=B.Root,Qr=B.Trigger,Xr=B.Group,Zr=B.Portal,ei=B.Sub,ti=B.RadioGroup,Bo=f.forwardRef(({className:e,inset:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(B.SubTrigger,{ref:a,className:c.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...o,children:[s,n.jsxRuntimeExports.jsx(L.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Bo.displayName=B.SubTrigger.displayName;const Po=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(B.SubContent,{ref:s,className:c.cn("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}));Po.displayName=B.SubContent.displayName;const To=f.forwardRef(({className:e,sideOffset:t=4,...s},o)=>n.jsxRuntimeExports.jsx(B.Portal,{children:n.jsxRuntimeExports.jsx(B.Content,{ref:o,sideOffset:t,className:c.cn("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),...s})}));To.displayName=B.Content.displayName;const Io=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(B.Item,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...s}));Io.displayName=B.Item.displayName;const Mo=f.forwardRef(({className:e,children:t,checked:s,...o},a)=>n.jsxRuntimeExports.jsxs(B.CheckboxItem,{ref:a,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(B.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.CheckIcon,{className:"h-4 w-4"})})}),t]}));Mo.displayName=B.CheckboxItem.displayName;const Do=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(B.RadioItem,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(B.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Do.displayName=B.RadioItem.displayName;const Oo=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(B.Label,{ref:o,className:c.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s}));Oo.displayName=B.Label.displayName;const Lo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(B.Separator,{ref:s,className:c.cn("-mx-1 my-1 h-px bg-muted",e),...t}));Lo.displayName=B.Separator.displayName;const Vo=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest opacity-60",e),...t});Vo.displayName="DropdownMenuShortcut";const zo=f.forwardRef(({className:e,orientation:t="horizontal",decorative:s=!0,...o},a)=>n.jsxRuntimeExports.jsx(Rt.Root,{ref:a,decorative:s,orientation:t,className:c.cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));zo.displayName=Rt.Root.displayName;const si=1,oi=1e6;let Me=0;function ni(){return Me=(Me+1)%Number.MAX_VALUE,Me.toString()}const De=new Map,bt=e=>{if(De.has(e))return;const t=setTimeout(()=>{De.delete(e),xe({type:"REMOVE_TOAST",toastId:e})},oi);De.set(e,t)},Fo=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,si)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=t;return s?bt(s):e.toasts.forEach(o=>{bt(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)}}},ve=[];let ye={toasts:[]};function xe(e){ye=Fo(ye,e),ve.forEach(t=>{t(ye)})}function qo({...e}){const t=ni(),s=a=>xe({type:"UPDATE_TOAST",toast:{...a,id:t}}),o=()=>xe({type:"DISMISS_TOAST",toastId:t});return xe({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||o()}}}),{id:t,dismiss:o,update:s}}function Uo(){const[e,t]=f.useState(ye);return f.useEffect(()=>(ve.push(t),()=>{const s=ve.indexOf(t);s>-1&&ve.splice(s,1)}),[e]),{...e,toast:qo,dismiss:s=>xe({type:"DISMISS_TOAST",toastId:s})}}const ai=G.Provider,$o=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Viewport,{ref:s,className:c.cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));$o.displayName=G.Viewport.displayName;const ri=re.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Go=f.forwardRef(({className:e,variant:t,...s},o)=>n.jsxRuntimeExports.jsx(G.Root,{ref:o,className:c.cn(ri({variant:t}),e),...s}));Go.displayName=G.Root.displayName;const ii=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Action,{ref:s,className:c.cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));ii.displayName=G.Action.displayName;const Ho=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Close,{ref:s,className:c.cn("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:n.jsxRuntimeExports.jsx(L.Cross2Icon,{className:"h-4 w-4"})}));Ho.displayName=G.Close.displayName;const Wo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Title,{ref:s,className:c.cn("text-sm font-semibold [&+div]:text-xs",e),...t}));Wo.displayName=G.Title.displayName;const Yo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Description,{ref:s,className:c.cn("text-sm opacity-90",e),...t}));Yo.displayName=G.Description.displayName;function li(){const{toasts:e}=Uo();return n.jsxRuntimeExports.jsxs(ai,{children:[e.map(({id:t,title:s,description:o,action:a,...r})=>n.jsxRuntimeExports.jsxs(Go,{...r,children:[n.jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[s&&n.jsxRuntimeExports.jsx(Wo,{children:s}),o&&n.jsxRuntimeExports.jsx(Yo,{children:o})]}),a,n.jsxRuntimeExports.jsx(Ho,{})]},t)),n.jsxRuntimeExports.jsx($o,{})]})}const ci=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("animate-pulse rounded-md bg-primary/10",e),...t}),nt=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command,{ref:s,className:c.cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));nt.displayName=U.Command.displayName;const di=({children:e,...t})=>n.jsxRuntimeExports.jsx(tt,{...t,children:n.jsxRuntimeExports.jsx(Be,{className:"overflow-hidden p-0",children:n.jsxRuntimeExports.jsx(nt,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Ko=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[n.jsxRuntimeExports.jsx(L.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),n.jsxRuntimeExports.jsx(U.Command.Input,{ref:s,className:c.cn("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Ko.displayName=U.Command.Input.displayName;const Jo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command.List,{ref:s,className:c.cn("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Jo.displayName=U.Command.List.displayName;const Qo=f.forwardRef((e,t)=>n.jsxRuntimeExports.jsx(U.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Qo.displayName=U.Command.Empty.displayName;const Xo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command.Group,{ref:s,className:c.cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Xo.displayName=U.Command.Group.displayName;const Zo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command.Separator,{ref:s,className:c.cn("-mx-1 h-px bg-border",e),...t}));Zo.displayName=U.Command.Separator.displayName;const en=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command.Item,{ref:s,className:c.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));en.displayName=U.Command.Item.displayName;const tn=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});tn.displayName="CommandShortcut";const ui=P.Root,mi=P.Trigger,pi=P.Group,fi=P.Portal,xi=P.Sub,gi=P.RadioGroup,sn=f.forwardRef(({className:e,inset:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(P.SubTrigger,{ref:a,className:c.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...o,children:[s,n.jsxRuntimeExports.jsx(L.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));sn.displayName=P.SubTrigger.displayName;const on=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(P.SubContent,{ref:s,className:c.cn("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}));on.displayName=P.SubContent.displayName;const nn=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(P.Portal,{children:n.jsxRuntimeExports.jsx(P.Content,{ref:s,className:c.cn("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),...t})}));nn.displayName=P.Content.displayName;const an=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(P.Item,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...s}));an.displayName=P.Item.displayName;const rn=f.forwardRef(({className:e,children:t,checked:s,...o},a)=>n.jsxRuntimeExports.jsxs(P.CheckboxItem,{ref:a,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(P.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.CheckIcon,{className:"h-4 w-4"})})}),t]}));rn.displayName=P.CheckboxItem.displayName;const ln=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(P.RadioItem,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(P.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));ln.displayName=P.RadioItem.displayName;const cn=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(P.Label,{ref:o,className:c.cn("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...s}));cn.displayName=P.Label.displayName;const dn=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(P.Separator,{ref:s,className:c.cn("-mx-1 my-1 h-px bg-border",e),...t}));dn.displayName=P.Separator.displayName;const un=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});un.displayName="ContextMenuShortcut";const bi=e=>{try{const t=document.getElementById("icon-picker-field"),s=document.createElement("div");Pn.render(n.jsxRuntimeExports.jsx(vt.IconPickerItem,{value:e}),s),t.appendChild(s),s.hidden=!0;let o=s.innerHTML;setTimeout(()=>t.removeChild(s),1e3);const r=new DOMParser().parseFromString(o,"image/svg+xml"),l=r.querySelector("svg");return l&&(l.removeAttribute("width"),l.removeAttribute("height")),new XMLSerializer().serializeToString(r)}catch{return""}},hi=({value:e,onChange:t,onBlur:s,id:o})=>{const a=r=>{t("<svg />");const l=bi(r);t(l),s(o,l)};return n.jsxRuntimeExports.jsxs("div",{className:"mt-1 flex h-20 items-center gap-x-2",id:"icon-picker-field",children:[n.jsxRuntimeExports.jsxs("div",{className:"relative h-12 w-12 group",children:[n.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:e==null?void 0:e.replace("<svg",'<svg class="h-5 w-5"')},className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform cursor-pointer bg-white z-0"}),n.jsxRuntimeExports.jsx(vt,{value:e?"BiSolidGrid":null,onChange:a,pickButtonStyle:{position:"relative",height:"48px",width:"48px",border:"1px solid #BBBBBB",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",backgroundColor:"transparent",zIndex:1},searchInputStyle:{backgroundColor:"transparent",width:"100%",border:"1px solid #BBBBBB",margin:"0px 10px",padding:"10px"}})]}),n.jsxRuntimeExports.jsx("textarea",{value:e,onChange:r=>t(r.target.value),className:"h-full border w-full rounded-sm border-foreground/20 px-2 py-1 text-xs shadow-sm focus:border-gray-500/80 focus:outline-none focus:ring-0",placeholder:"Choose icon or enter svg"})]})},vi=w.lazy(()=>Promise.resolve().then(()=>require("./UnsplashImages-3Sh4UZ-7.cjs"))),yi=w.lazy(()=>Promise.resolve().then(()=>require("./UploadImages-mPzLhMiH.cjs"))),mn=({isModalView:e=!1,onSelect:t=()=>{}})=>{const[s,o]=w.useState("upload");return n.jsxRuntimeExports.jsxs("div",{className:"flex h-full flex-col",children:[n.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:n.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:e?"Select or upload images":"Images"})}),n.jsxRuntimeExports.jsxs(oo,{value:s,onValueChange:a=>o(a),className:"flex h-full w-full flex-col py-2",children:[n.jsxRuntimeExports.jsxs(ot,{className:"w-full",children:[n.jsxRuntimeExports.jsx(we,{value:"upload",className:"w-1/2",children:"Upload"}),n.jsxRuntimeExports.jsx(we,{value:"unsplash",className:"w-1/2",children:"Unsplash"})]}),s==="unsplash"?n.jsxRuntimeExports.jsx(Re,{value:"unsplash",className:"flex h-full flex-col overflow-hidden",children:n.jsxRuntimeExports.jsx(w.Suspense,{fallback:n.jsxRuntimeExports.jsx("div",{className:"h-64 w-full animate-pulse bg-gray-100"}),children:n.jsxRuntimeExports.jsx(vi,{isModalView:e,onSelect:t})})}):n.jsxRuntimeExports.jsx(Re,{value:"upload",className:"flex h-full flex-col overflow-hidden",children:n.jsxRuntimeExports.jsx(w.Suspense,{fallback:n.jsxRuntimeExports.jsx("div",{className:"h-64 w-full animate-pulse bg-gray-100"}),children:n.jsxRuntimeExports.jsx(yi,{isModalView:e,onSelect:t})})})]})]})},ji=Object.freeze(Object.defineProperty({__proto__:null,default:mn},Symbol.toStringTag,{value:"Module"})),ht=({children:e,onSelect:t})=>{const[s,o]=w.useState(!1),a=(...r)=>{t.call(void 0,...r),o(!1)};return n.jsxRuntimeExports.jsxs(tt,{open:s,onOpenChange:r=>o(r),children:[n.jsxRuntimeExports.jsx(zs,{asChild:!0,children:e}),n.jsxRuntimeExports.jsx(Be,{className:"flex h-3/4 max-w-5xl",children:n.jsxRuntimeExports.jsx("div",{className:"h-full w-full",children:n.jsxRuntimeExports.jsx(mn,{isModalView:!0,onSelect:a})})})]})},wi=({value:e,onChange:t,id:s,onBlur:o})=>n.jsxRuntimeExports.jsxs("div",{className:"mt-1.5 flex items-center gap-x-3",children:[e?n.jsxRuntimeExports.jsx("img",{src:e,className:"h-20 w-20 overflow-hidden rounded-md border object-cover",alt:""}):n.jsxRuntimeExports.jsx(ht,{onSelect:t,children:n.jsxRuntimeExports.jsx("div",{className:"h-20 w-20 cursor-pointer rounded-md border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px] hover:border-gray-400"})}),n.jsxRuntimeExports.jsxs("div",{className:"flex w-3/5 flex-col",children:[n.jsxRuntimeExports.jsx(ht,{onSelect:t,children:n.jsxRuntimeExports.jsx("small",{className:"cursor-pointer rounded-full bg-gray-600 px-2 py-1 text-center text-xs text-white hover:bg-gray-500 dark:bg-gray-700",children:e||!i.isEmpty(e)?"Replace Image":"Choose Image"})}),n.jsxRuntimeExports.jsx("small",{className:"-pl-4 pt-2 text-center text-xs text-gray-600",children:"OR"}),n.jsxRuntimeExports.jsx("input",{type:"url",className:"text-xs",placeholder:"Enter image URL",value:e,onBlur:({target:{value:a}})=>o(s,a),onChange:a=>t(a.target.value)})]})]}),Ri=({id:e,placeholder:t,value:s,onChange:o,onBlur:a})=>{const r={toolbar:[["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]},{align:[]}],["link","clean"]]},l=["header","font","list","bold","italic","underline","strike","blockquote","color","background","align","link","image"];return typeof window>"u"?null:n.jsxRuntimeExports.jsx(Tn,{id:e,value:s,onBlur:p=>a(e,p),onChange:p=>o(p),modules:r,formats:l,placeholder:t,className:"mt-1 rounded-md"})},ki=({schema:e,formData:t,onChange:s})=>{const[o,a]=w.useState([]),r=ne("getPages",()=>[]),{type:l="page",href:p="",target:x="self"}=t;return w.useEffect(()=>{(async()=>{const d=await r();a(d||[])})()},[]),n.jsxRuntimeExports.jsxs("div",{children:[n.jsxRuntimeExports.jsx("span",{className:"text-xs font-medium",children:(e==null?void 0:e.title)??"Link"}),n.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-y-1.5",children:[n.jsxRuntimeExports.jsx("select",{name:"type",value:l,onChange:d=>s({...t,type:d.target.value}),children:[{const:"page",title:"Open Page"},{const:"url",title:"Open URL"},{const:"email",title:"Compose Email"},{const:"telephone",title:"Call Phone"},{const:"scroll",title:"Scroll to element"}].map(d=>n.jsxRuntimeExports.jsx("option",{value:d.const,children:d.title},d.const))}),l==="page"?n.jsxRuntimeExports.jsxs("select",{name:"href",placeholder:"Choose Page",value:p,onChange:d=>s({...t,href:d.target.value}),children:[n.jsxRuntimeExports.jsx("option",{value:"",children:"Choose page"}),i.map(o,d=>n.jsxRuntimeExports.jsx("option",{value:d.slug,children:d.name},d.uuid))]}):n.jsxRuntimeExports.jsx("input",{name:"href",type:"text",value:p,onChange:d=>s({...t,href:d.target.value}),placeholder:l==="page"||l==="url"?"Enter URL":l==="scroll"?"#ElementID":"Enter detail"}),(l==="page"||l==="url")&&n.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2",children:[n.jsxRuntimeExports.jsx("input",{type:"checkbox",defaultChecked:x==="_blank",className:"cursor-pointer rounded-md border border-border",onChange:()=>s({...t,target:x==="_blank"?"_self":"_blank"})}),n.jsxRuntimeExports.jsx("span",{className:"pt-1 text-xs",children:"Open in new tab"})]})]})]})};exports.Accordion=kr;exports.AccordionContent=As;exports.AccordionItem=ks;exports.AccordionTrigger=Ns;exports.Alert=Ss;exports.AlertDescription=Es;exports.AlertDialog=Sr;exports.AlertDialogAction=Ls;exports.AlertDialogCancel=Vs;exports.AlertDialogContent=Ts;exports.AlertDialogDescription=Os;exports.AlertDialogFooter=Ms;exports.AlertDialogHeader=Is;exports.AlertDialogTitle=Ds;exports.AlertDialogTrigger=Cr;exports.AlertTitle=Cs;exports.Badge=Ar;exports.Button=Rs;exports.Card=Ws;exports.CardContent=Qs;exports.CardDescription=Js;exports.CardFooter=Xs;exports.CardHeader=Ys;exports.CardTitle=Ks;exports.Command=nt;exports.CommandDialog=di;exports.CommandEmpty=Qo;exports.CommandGroup=Xo;exports.CommandInput=Ko;exports.CommandItem=en;exports.CommandList=Jo;exports.CommandSeparator=Zo;exports.CommandShortcut=tn;exports.ContextMenu=ui;exports.ContextMenuCheckboxItem=rn;exports.ContextMenuContent=nn;exports.ContextMenuGroup=pi;exports.ContextMenuItem=an;exports.ContextMenuLabel=cn;exports.ContextMenuPortal=fi;exports.ContextMenuRadioGroup=gi;exports.ContextMenuRadioItem=ln;exports.ContextMenuSeparator=dn;exports.ContextMenuShortcut=un;exports.ContextMenuSub=xi;exports.ContextMenuSubContent=on;exports.ContextMenuSubTrigger=sn;exports.ContextMenuTrigger=mi;exports.Dialog=tt;exports.DialogContent=Be;exports.DialogDescription=Hs;exports.DialogFooter=$s;exports.DialogHeader=Us;exports.DialogTitle=Gs;exports.DialogTrigger=zs;exports.DropdownMenu=Jr;exports.DropdownMenuCheckboxItem=Mo;exports.DropdownMenuContent=To;exports.DropdownMenuGroup=Xr;exports.DropdownMenuItem=Io;exports.DropdownMenuLabel=Oo;exports.DropdownMenuPortal=Zr;exports.DropdownMenuRadioGroup=ti;exports.DropdownMenuRadioItem=Do;exports.DropdownMenuSeparator=Lo;exports.DropdownMenuShortcut=Vo;exports.DropdownMenuSub=ei;exports.DropdownMenuSubContent=Po;exports.DropdownMenuSubTrigger=Bo;exports.DropdownMenuTrigger=Qr;exports.HoverCard=Fr;exports.HoverCardContent=ho;exports.HoverCardTrigger=qr;exports.IconPickerField=hi;exports.ImagePickerField=wi;exports.ImagesPanel=ji;exports.Input=Zs;exports.Label=eo;exports.LinkField=ki;exports.Menubar=ro;exports.MenubarCheckboxItem=po;exports.MenubarContent=uo;exports.MenubarGroup=Or;exports.MenubarItem=mo;exports.MenubarLabel=xo;exports.MenubarMenu=Dr;exports.MenubarPortal=Lr;exports.MenubarRadioGroup=zr;exports.MenubarRadioItem=fo;exports.MenubarSeparator=go;exports.MenubarShortcut=bo;exports.MenubarSub=Vr;exports.MenubarSubContent=co;exports.MenubarSubTrigger=lo;exports.MenubarTrigger=io;exports.Popover=Ir;exports.PopoverContent=ao;exports.PopoverTrigger=Mr;exports.RichTextEditorField=Ri;exports.ScrollArea=so;exports.ScrollBar=st;exports.Select=Ur;exports.SelectContent=yo;exports.SelectGroup=$r;exports.SelectItem=wo;exports.SelectLabel=jo;exports.SelectSeparator=Ro;exports.SelectTrigger=vo;exports.SelectValue=Gr;exports.Separator=zo;exports.Sheet=Hr;exports.SheetClose=Yr;exports.SheetContent=Ao;exports.SheetDescription=_o;exports.SheetFooter=Co;exports.SheetHeader=So;exports.SheetTitle=Eo;exports.SheetTrigger=Wr;exports.Skeleton=ci;exports.Switch=ws;exports.Tabs=oo;exports.TabsContent=Re;exports.TabsList=ot;exports.TabsTrigger=we;exports.Textarea=to;exports.Toaster=li;exports.Toggle=js;exports.Tooltip=Pr;exports.TooltipContent=no;exports.TooltipPortal=_r;exports.TooltipProvider=Br;exports.TooltipTrigger=Tr;exports.activePanelAtom=ts;exports.addBlockOffCanvasAtom=ss;exports.addBlocksModalAtom=Tt;exports.advanceStylingOpenAtom=Qt;exports.atom=K;exports.atomWithDefault=Xn;exports.atomWithStorage=ue;exports.badgeVariants=_s;exports.buttonVariants=_e;exports.canAddChildBlock=Dt;exports.canDeleteBlock=pa;exports.canDropBlock=fa;exports.canDuplicateBlock=ma;exports.canvasIframeAtom=es;exports.chaiBuilderPropsAtom=Ne;exports.chaiExternalDataAtom=Ct;exports.createStore=kt;exports.dataProvidersAtom=Ze;exports.draggedBlockIdAtom=rs;exports.draggingFlagAtom=as;exports.editLayerNameAtom=Zt;exports.getBlockJSONFromSchemas=ze;exports.getBlockJSONFromUISchemas=Ve;exports.inlineEditingActiveAtom=ns;exports.isDevelopment=sa;exports.networkModeAtom=Xt;exports.pageSyncStateAtom=Ce;exports.presentBlocksAtom=H;exports.reducer=Fo;exports.showPredefinedBlockCategoryAtom=os;exports.toast=qo;exports.toggleVariants=ys;exports.useActiveModal=dr;exports.useActivePanel=fr;exports.useAddBlock=ja;exports.useAddBlockParent=xr;exports.useAddClassesToBlocks=Aa;exports.useAllBlocks=Ft;exports.useAtom=Gn;exports.useAtomValue=Nt;exports.useBrandingOptions=$t;exports.useBuilderProp=ne;exports.useBuilderReset=hr;exports.useBuildingBlocks=qt;exports.useCanvasHistory=Ee;exports.useCanvasWidth=Oa;exports.useCanvasZoom=Va;exports.useCopyBlockIds=za;exports.useCurrentPage=Gt;exports.useCutBlockIds=ms;exports.useDarkMode=Fa;exports.useDeveloperPreviewMode=Ua;exports.useDuplicateBlocks=fs;exports.useFeatureSupport=jr;exports.useGetPageData=Xe;exports.useHiddenBlockIds=Ga;exports.useHighlightBlockId=xs;exports.useMarkAsGlobalBlock=Wa;exports.useMoveBlocks=Ya;exports.usePageDataProviders=is;exports.usePasteBlocks=Ja;exports.usePreviewMode=Ut;exports.useProject=Xa;exports.useReadOnlyMode=ur;exports.useRemoveBlocks=Za;exports.useRemoveClassesFromBlocks=tr;exports.useSavePage=Da;exports.useSelectedBlock=ha;exports.useSelectedBlockAllClasses=sr;exports.useSelectedBlockCurrentClasses=ar;exports.useSelectedBlockIds=me;exports.useSelectedBlocksDisplayChild=ba;exports.useSelectedBreakpoints=br;exports.useSelectedStylingBlocks=Ke;exports.useSetAllBlocks=ua;exports.useSetAtom=At;exports.useStore=qe;exports.useStylingBreakpoint=ls;exports.useStylingState=rr;exports.useToast=Uo;exports.useTranslations=yr;exports.useTreeData=da;exports.useUILibraryBlocks=Rr;exports.useUpdateBlocksProps=ir;exports.useUpdateBlocksPropsRealtime=lr;
|
|
@@ -20,7 +20,7 @@ import { initReactI18next as oS } from "react-i18next";
|
|
|
20
20
|
import { j as n1 } from "./jsx-runtime-NV737rRe.js";
|
|
21
21
|
import * as O from "react";
|
|
22
22
|
import p, { useState as g1, useRef as z1, useLayoutEffect as L3, useEffect as L1, useCallback as D1, useDebugValue as o91, useContext as Et, forwardRef as Q, createContext as $t, useReducer as cS, useMemo as fa, cloneElement as Ae, Fragment as hS, Children as br, Component as Ff, isValidElement as sS, createElement as G4, memo as vS, Suspense as Ue, lazy as v0 } from "react";
|
|
23
|
-
import { u as O3, a as h2, c as qf, b as wt, d as Pe, e as s2, f as d0, g as Wf, h as dS, i as J4, B as S3, S as uS, j as Kf, k as gS, l as fS, m as pS, n as zS, o as MS, p as mS, q as HS, r as VS, s as wS, t as bS, v as yS, T as xS, w as LS, x as OS, y as Uf, z as SS, A as CS, C as BS, D as AS, E as PS, F as ES, G as IS, H as kS, I as NS, J as RS, K as TS } from "./index-
|
|
23
|
+
import { u as O3, a as h2, c as qf, b as wt, d as Pe, e as s2, f as d0, g as Wf, h as dS, i as J4, B as S3, S as uS, j as Kf, k as gS, l as fS, m as pS, n as zS, o as MS, p as mS, q as HS, r as VS, s as wS, t as bS, v as yS, T as xS, w as LS, x as OS, y as Uf, z as SS, A as CS, C as BS, D as AS, E as PS, F as ES, G as IS, H as kS, I as NS, J as RS, K as TS } from "./index-89A3jPHh.js";
|
|
24
24
|
import { g as Ii, c as j0 } from "./MODIFIERS-MLfpKQY1.js";
|
|
25
25
|
import Zf from "clsx";
|
|
26
26
|
import { flushSync as DS, createPortal as jS } from "react-dom";
|
|
@@ -32,12 +32,12 @@ import { FlagsProvider as JS } from "flagged";
|
|
|
32
32
|
import { DndProvider as YS } from "react-dnd";
|
|
33
33
|
import { find as Bc, get as Ac, isString as _f, isEmpty as QS, flatten as XS, first as _S, each as ls, omit as $f, sortBy as $S, filter as tC, has as eC, set as aC, capitalize as rC, size as is } from "lodash";
|
|
34
34
|
import { MultiBackend as nC, getBackendOptions as lC } from "@minoru/react-dnd-treeview";
|
|
35
|
-
import {
|
|
36
|
-
import { c as oC } from "./utils-PPBbw5bk.js";
|
|
35
|
+
import { d as iC } from "./utils-zWMk4dB2.js";
|
|
37
36
|
import { useHotkeys as se } from "react-hotkeys-hook";
|
|
38
|
-
import { getChaiDataProviders as
|
|
39
|
-
import { FileTextIcon as
|
|
40
|
-
import { toast as ae, Toaster as
|
|
37
|
+
import { getChaiDataProviders as oC, syncBlocksWithDefaults as cC } from "@chaibuilder/runtime";
|
|
38
|
+
import { FileTextIcon as hC, GearIcon as sC, EyeClosedIcon as vC, EyeOpenIcon as dC } from "@radix-ui/react-icons";
|
|
39
|
+
import { toast as ae, Toaster as uC } from "sonner";
|
|
40
|
+
import { g as gC } from "./html-to-json-kGgp07Hv.js";
|
|
41
41
|
import { Loader as fC, Loader2 as pC, LogOutIcon as zC } from "lucide-react";
|
|
42
42
|
const MC = "Dark mode", mC = "This page has no blocks. Add a block by clicking the + button", HC = "This page is empty", VC = "Please select a block to edit settings or styles", wC = "Please select a styling block", bC = "Drop your block here", yC = {
|
|
43
43
|
dark_mode: MC,
|
|
@@ -38556,7 +38556,7 @@ class Ph1 extends p.Component {
|
|
|
38556
38556
|
}
|
|
38557
38557
|
const Eh1 = () => {
|
|
38558
38558
|
const [t, e] = dS(), a = J4("previewComponent");
|
|
38559
|
-
return /* @__PURE__ */ n1.jsxs("div", { className:
|
|
38559
|
+
return /* @__PURE__ */ n1.jsxs("div", { className: iC("fixed inset-0 z-[999] bg-background", t ? "block" : "hidden"), children: [
|
|
38560
38560
|
/* @__PURE__ */ n1.jsx(S3, { size: "sm", className: "absolute right-0 top-0 m-4", onClick: () => e(!1), children: "Close Preview" }),
|
|
38561
38561
|
/* @__PURE__ */ n1.jsx("div", { children: a ? /* @__PURE__ */ n1.jsx(Ue, { fallback: /* @__PURE__ */ n1.jsx(uS, { className: "h-96 w-full" }), children: p.createElement(a) }) : null })
|
|
38562
38562
|
] });
|
|
@@ -38583,7 +38583,7 @@ const Eh1 = () => {
|
|
|
38583
38583
|
const n = _S(t);
|
|
38584
38584
|
_f(n) && (r = [n, ...kh1(e, n)]), a(r);
|
|
38585
38585
|
}, [t, e, a]);
|
|
38586
|
-
}, J91 = () => Xf(FO), Rh1 = () => ki(VS), Th1 = () => fa(() =>
|
|
38586
|
+
}, J91 = () => Xf(FO), Rh1 = () => ki(VS), Th1 = () => fa(() => oC(), []), Y91 = ({ children: t }) => {
|
|
38587
38587
|
const [, e] = Rh1(), [a] = wS(), r = Th1();
|
|
38588
38588
|
return L1(() => (e({}), ls(a, (n) => {
|
|
38589
38589
|
const l = Bc(r, { providerKey: n.providerKey });
|
|
@@ -38598,7 +38598,7 @@ const Eh1 = () => {
|
|
|
38598
38598
|
e((l) => (delete l[n.providerKey], l));
|
|
38599
38599
|
});
|
|
38600
38600
|
}), [r, a, e]), /* @__PURE__ */ n1.jsx(n1.Fragment, { children: t });
|
|
38601
|
-
}, Dh1 = v0(() => import("./SidePanels-
|
|
38601
|
+
}, Dh1 = v0(() => import("./SidePanels-iRXV69vh.js")), jh1 = v0(() => import("./Topbar-dQYhW4iv.js")), Fh1 = v0(() => import("./CanvasArea-chEYQhH8.js")), qh1 = v0(() => import("./Settings-lpoxaMDu.js")), Wh1 = () => {
|
|
38602
38602
|
const [t] = ki(bS), e = (n) => {
|
|
38603
38603
|
yS() || n.preventDefault();
|
|
38604
38604
|
};
|
|
@@ -38639,7 +38639,7 @@ const Uh1 = (t) => /* @__PURE__ */ n1.jsx(n1.Fragment, { children: t.children })
|
|
|
38639
38639
|
}, [t]), L1(() => {
|
|
38640
38640
|
Hf.set(CS, t.dataProviders || []);
|
|
38641
38641
|
}, [t.dataProviders]), L1(() => {
|
|
38642
|
-
a(
|
|
38642
|
+
a(cC(t.blocks || [])), n();
|
|
38643
38643
|
}, [t.blocks]), L1(() => {
|
|
38644
38644
|
r(t.brandingOptions);
|
|
38645
38645
|
}, [t.brandingOptions, r]), /* @__PURE__ */ n1.jsx(YS, { ...e, options: lC(), children: /* @__PURE__ */ n1.jsx(Uh1, { children: /* @__PURE__ */ n1.jsx(Wh1, {}) }) });
|
|
@@ -40531,7 +40531,7 @@ const v2 = {
|
|
|
40531
40531
|
if (!e || !e.uuid)
|
|
40532
40532
|
return [];
|
|
40533
40533
|
try {
|
|
40534
|
-
const { data: a } = await v2.get(`${t}/block?uuid=${e.uuid}&format=${e.format}`).then(async (r) => e.format === "html" ?
|
|
40534
|
+
const { data: a } = await v2.get(`${t}/block?uuid=${e.uuid}&format=${e.format}`).then(async (r) => e.format === "html" ? gC(await r.text()) : await r.json());
|
|
40535
40535
|
return aC(a, "0._name", rC(e.group)), a || [];
|
|
40536
40536
|
} catch {
|
|
40537
40537
|
return [];
|
|
@@ -40728,7 +40728,7 @@ const Fs1 = () => {
|
|
|
40728
40728
|
] })
|
|
40729
40729
|
] })
|
|
40730
40730
|
] });
|
|
40731
|
-
}, Zs1 = () => /* @__PURE__ */ n1.jsx(Us1, { children: /* @__PURE__ */ n1.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ n1.jsx(zC, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), Gs1 = v0(() => import("./PagesPanel-
|
|
40731
|
+
}, Zs1 = () => /* @__PURE__ */ n1.jsx(Us1, { children: /* @__PURE__ */ n1.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ n1.jsx(zC, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), Gs1 = v0(() => import("./PagesPanel-ay4uk4mg.js")), Js1 = v0(() => import("./ProjectPanel-eLlbfAtj.js")), Ys1 = v0(() => import("./CurrentPage-Wd7F9Egg.js")), Qs1 = () => /* @__PURE__ */ n1.jsx("h2", { children: "Your Logo" }), Xs1 = () => {
|
|
40732
40732
|
const { mutate: t } = Es1();
|
|
40733
40733
|
return J4("editable", !0) ? /* @__PURE__ */ n1.jsx(S3, { onClick: t, className: "bg-blue-600 text-white", children: "Publish" }) : null;
|
|
40734
40734
|
}, _s1 = (t) => {
|
|
@@ -40760,8 +40760,8 @@ const Fs1 = () => {
|
|
|
40760
40760
|
},
|
|
40761
40761
|
sideBarComponents: {
|
|
40762
40762
|
top: [
|
|
40763
|
-
{ icon:
|
|
40764
|
-
{ icon:
|
|
40763
|
+
{ icon: hC, name: "pages", panel: Gs1 },
|
|
40764
|
+
{ icon: sC, name: "settings", panel: Js1 }
|
|
40765
40765
|
],
|
|
40766
40766
|
bottom: [Zs1]
|
|
40767
40767
|
},
|
|
@@ -40834,7 +40834,7 @@ const Fs1 = () => {
|
|
|
40834
40834
|
type: "button",
|
|
40835
40835
|
className: "absolute inset-y-0 right-4 flex items-center pl-3 cursor-pointer",
|
|
40836
40836
|
onClick: () => a(!e),
|
|
40837
|
-
children: e ? /* @__PURE__ */ n1.jsx(
|
|
40837
|
+
children: e ? /* @__PURE__ */ n1.jsx(vC, {}) : /* @__PURE__ */ n1.jsx(dC, {})
|
|
40838
40838
|
}
|
|
40839
40839
|
)
|
|
40840
40840
|
] }) }),
|
|
@@ -40864,7 +40864,7 @@ const Fs1 = () => {
|
|
|
40864
40864
|
r.setQueryData(["apiBaseUrl"], t.apiBaseUrl || "/api/chaibuilder");
|
|
40865
40865
|
}, [t.apiBaseUrl, r]), a ? /* @__PURE__ */ n1.jsx(x3, {}) : e != null && e.valid ? /* @__PURE__ */ n1.jsx(_s1, { ...t }) : /* @__PURE__ */ n1.jsx($s1, { logo: t.logo });
|
|
40866
40866
|
}, e91 = new cs1(), tv1 = (t) => /* @__PURE__ */ n1.jsxs(us1, { client: e91, children: [
|
|
40867
|
-
/* @__PURE__ */ n1.jsx(
|
|
40867
|
+
/* @__PURE__ */ n1.jsx(uC, { richColors: !0 }),
|
|
40868
40868
|
/* @__PURE__ */ n1.jsx(t91, { ...t })
|
|
40869
40869
|
] });
|
|
40870
40870
|
export {
|