@chaibuilder/sdk 1.2.18 → 1.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/AddBlocks-KeHVFaIr.cjs +1 -0
  2. package/dist/{AddBlocks-uCdu9Xpr.js → AddBlocks-gcTaEIKO.js} +5 -4
  3. package/dist/BrandingOptions-I2I8w6E9.cjs +1 -0
  4. package/dist/{BrandingOptions-JbHRN7V5.js → BrandingOptions-bfiFY0VR.js} +5 -4
  5. package/dist/{CanvasArea-oUIvLfdq.cjs → CanvasArea-JfHkTnQD.cjs} +1 -1
  6. package/dist/{CanvasArea-aWzbzB9p.js → CanvasArea-xvMCbQDL.js} +8 -7
  7. package/dist/{CurrentPage-AlOLPG4o.js → CurrentPage-0Ap2N0uc.js} +13 -12
  8. package/dist/CurrentPage-vj52UxMA.cjs +1 -0
  9. package/dist/ListTree-Vq0_s1wC.cjs +1 -0
  10. package/dist/ListTree-k-QMO740.js +96 -0
  11. package/dist/{Outline-oGoAdnBw.js → Outline-HI6-c9nf.js} +96 -92
  12. package/dist/Outline-fAflJ_lN.cjs +1 -0
  13. package/dist/{PagesPanel-VbSQHEu_.js → PagesPanel-Pk-C1956.js} +7 -6
  14. package/dist/PagesPanel-ug8Tmva6.cjs +1 -0
  15. package/dist/{ProjectPanel-fqux215P.js → ProjectPanel-_KQBhuPO.js} +8 -7
  16. package/dist/ProjectPanel-o8-6cPX-.cjs +1 -0
  17. package/dist/Settings-Cc9eV4VG.cjs +1 -0
  18. package/dist/{Settings-IhWI1ice.js → Settings-XtAatoiu.js} +5 -4
  19. package/dist/{SidePanels-lMCXrchR.js → SidePanels-O52zKXbH.js} +134 -133
  20. package/dist/SidePanels-ugRobm34.cjs +1 -0
  21. package/dist/Topbar-e5MGWX9n.cjs +1 -0
  22. package/dist/{Topbar-DYiisBtw.js → Topbar-oTx7a12r.js} +5 -4
  23. package/dist/{UnsplashImages-lGLcqo4M.js → UnsplashImages-5A21uzMK.js} +5 -4
  24. package/dist/UnsplashImages-KSbKGs91.cjs +1 -0
  25. package/dist/UploadImages-V42YSRVO.cjs +1 -0
  26. package/dist/{UploadImages-06m6vjbL.js → UploadImages-V_54lCAO.js} +5 -4
  27. package/dist/{add-page-modal-mEbIXSKX.js → add-page-modal-dKQLw7RQ.js} +17 -16
  28. package/dist/add-page-modal-xMedOdsp.cjs +1 -0
  29. package/dist/{confirm-alert-YETlIRpE.js → confirm-alert-8GP3bKH_.js} +5 -4
  30. package/dist/{confirm-alert-ZpEIxh3X.cjs → confirm-alert-KtW-4OjG.cjs} +1 -1
  31. package/dist/core.cjs +1 -1
  32. package/dist/core.d.ts +1 -0
  33. package/dist/core.js +47 -46
  34. package/dist/defaultTheme-7Lk2zq60.cjs +1 -0
  35. package/dist/{defaultTheme-s0cpA5Oy.js → defaultTheme-gunU_Fe5.js} +31 -33
  36. package/dist/{delete-page-modal-J_SmPWrw.js → delete-page-modal-Zb5ld6O-.js} +7 -6
  37. package/dist/delete-page-modal-lebJCBBe.cjs +1 -0
  38. package/dist/email-blocks.cjs +1 -1
  39. package/dist/email-blocks.js +79 -79
  40. package/dist/email.cjs +1 -1
  41. package/dist/email.d.ts +1 -0
  42. package/dist/email.js +6 -5
  43. package/dist/{form-Y0Vb4m04.cjs → form-o6_55v8F.cjs} +1 -1
  44. package/dist/{form-2xJcQs_Y.js → form-yyU2x7So.js} +1 -1
  45. package/dist/{index-3TQsdso6.cjs → index-BMZLAJUV.cjs} +1 -1
  46. package/dist/{index-ZwpjuB-N.cjs → index-JdnF6lYP.cjs} +42 -42
  47. package/dist/{index-ZBqiaKhx.js → index-WP7IRkij.js} +739 -739
  48. package/dist/{index-627XtO9e.js → index-lFcrvDFC.js} +3 -3
  49. package/dist/index-thKfFhmr.cjs +1 -0
  50. package/dist/{index-LF3KXx4u.js → index-yILWlilS.js} +3142 -3132
  51. package/dist/lib.cjs +1 -1
  52. package/dist/lib.js +1 -1
  53. package/dist/{page-viewer-7u0SWWmO.js → page-viewer-3QXwPGpg.js} +11 -10
  54. package/dist/page-viewer-DTIblLiz.cjs +1 -0
  55. package/dist/{project-general-setting-SqC85J7F.js → project-general-setting-UalRmyHm.js} +8 -7
  56. package/dist/project-general-setting-g7WhM3hc.cjs +1 -0
  57. package/dist/{project-seo-setting-TlQherop.js → project-seo-setting-8FsvPSPl.js} +6 -5
  58. package/dist/project-seo-setting-xoeLQVj3.cjs +1 -0
  59. package/dist/render.cjs +1 -1
  60. package/dist/render.d.ts +10 -0
  61. package/dist/render.js +164 -78
  62. package/dist/{single-page-detail-ClZYIdSO.js → single-page-detail-GaB85dNv.js} +9 -8
  63. package/dist/single-page-detail-XdBysrE_.cjs +1 -0
  64. package/dist/studio.cjs +1 -1
  65. package/dist/studio.d.ts +1 -0
  66. package/dist/studio.js +6 -5
  67. package/dist/ui.cjs +1 -1
  68. package/dist/ui.d.ts +1 -1
  69. package/dist/ui.js +140 -139
  70. package/dist/{useAddBlockByDrop-E343zoB3.cjs → useAddBlockByDrop-6EbioQV4.cjs} +1 -1
  71. package/dist/{useAddBlockByDrop-sPX4lN-O.js → useAddBlockByDrop-BIK2fdgj.js} +1 -1
  72. package/package.json +2 -1
  73. package/dist/AddBlocks-5Q5w5lPJ.cjs +0 -1
  74. package/dist/BrandingOptions-xrGQI1Kn.cjs +0 -1
  75. package/dist/CurrentPage-atmd8UrZ.cjs +0 -1
  76. package/dist/Outline-uMUTwN-R.cjs +0 -1
  77. package/dist/PagesPanel-nN3QUwXp.cjs +0 -1
  78. package/dist/ProjectPanel-UIEFhref.cjs +0 -1
  79. package/dist/Settings-8qUW0Iow.cjs +0 -1
  80. package/dist/SidePanels-cOHgPE9y.cjs +0 -1
  81. package/dist/Topbar-vLD-rWl5.cjs +0 -1
  82. package/dist/UnsplashImages-1JWfKlBc.cjs +0 -1
  83. package/dist/UploadImages-T4MYMOhW.cjs +0 -1
  84. package/dist/add-page-modal-niwhffYL.cjs +0 -1
  85. package/dist/defaultTheme-1XwPZT2b.cjs +0 -1
  86. package/dist/delete-page-modal-sOqRlmKb.cjs +0 -1
  87. package/dist/index-T3wfa1kz.cjs +0 -1
  88. package/dist/page-viewer-6UDraUKW.cjs +0 -1
  89. package/dist/project-general-setting-AW5Vtmgx.cjs +0 -1
  90. package/dist/project-seo-setting-cWiNZcxW.cjs +0 -1
  91. package/dist/single-page-detail-kJUW6FE9.cjs +0 -1
@@ -18,9 +18,9 @@ var v2 = (a, t, h, v) => ({
18
18
  import { j as i } from "./jsx-runtime-WbnYoNE9.js";
19
19
  import * as b from "react";
20
20
  import H0, { lazy as A2, useCallback as g2, useState as M2, Suspense as u0, useEffect as s0 } from "react";
21
- import { C as p0 } from "./index-LF3KXx4u.js";
21
+ import { C as p0 } from "./index-yILWlilS.js";
22
22
  import { FileTextIcon as V0, GearIcon as f0, EyeClosedIcon as m0, EyeOpenIcon as L0 } from "@radix-ui/react-icons";
23
- import { u as x0, B as Y2, A as w0, a as B0, b as C0, c as O0, d as A0, e as S0, f as y0, g as b0, h as P0 } from "./index-ZBqiaKhx.js";
23
+ import { u as x0, B as Y2, A as w0, a as B0, b as C0, c as O0, d as A0, e as S0, f as y0, g as b0, h as P0 } from "./index-WP7IRkij.js";
24
24
  import { toast as h1, Toaster as F0 } from "sonner";
25
25
  import { sortBy as D0, filter as R0, has as k0, set as T0, capitalize as E0, get as b2, omit as N0, size as P2 } from "lodash-es";
26
26
  import { g as I0 } from "./html-to-json-C5sExaSD.js";
@@ -2045,7 +2045,7 @@ const R4 = () => {
2045
2045
  ] })
2046
2046
  ] })
2047
2047
  ] });
2048
- }, I4 = () => /* @__PURE__ */ i.jsx(N4, { children: /* @__PURE__ */ i.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ i.jsx(j0, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), W4 = A2(() => import("./PagesPanel-VbSQHEu_.js")), U4 = A2(() => import("./ProjectPanel-fqux215P.js")), j4 = A2(() => import("./CurrentPage-AlOLPG4o.js")), Q4 = () => /* @__PURE__ */ i.jsx("h2", { children: "Your Logo" }), K4 = () => {
2048
+ }, I4 = () => /* @__PURE__ */ i.jsx(N4, { children: /* @__PURE__ */ i.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ i.jsx(j0, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), W4 = A2(() => import("./PagesPanel-Pk-C1956.js")), U4 = A2(() => import("./ProjectPanel-_KQBhuPO.js")), j4 = A2(() => import("./CurrentPage-0Ap2N0uc.js")), Q4 = () => /* @__PURE__ */ i.jsx("h2", { children: "Your Logo" }), K4 = () => {
2049
2049
  const { mutate: a } = S4();
2050
2050
  return P0("editable", !0) ? /* @__PURE__ */ i.jsx(Y2, { onClick: a, className: "bg-blue-600 text-white", children: "Publish" }) : null;
2051
2051
  }, G4 = (a) => {
@@ -0,0 +1 @@
1
+ "use strict";const k=require("react"),i=require("lodash-es"),se=require("./Functions-N3yhPYKY.cjs"),Se=require("@chaibuilder/runtime"),p=require("jotai"),W=require("./MODIFIERS-9EwxLM8V.cjs"),nn=require("./_commonjsHelpers-wDK0ZLPo.cjs"),rn=require("@react-hookz/web"),yt=require("flat-to-nested"),r=require("./jsx-runtime-Z_BpKhVy.cjs"),an=require("@radix-ui/react-toggle"),le=require("class-variance-authority"),u=require("./Class-MmCxz2Ay.cjs"),ln=require("@radix-ui/react-switch"),cn=require("@radix-ui/react-slot"),dn=require("@radix-ui/react-accordion"),F=require("@radix-ui/react-icons"),un=require("@radix-ui/react-alert-dialog"),mn=require("@radix-ui/react-dialog"),pn=require("@radix-ui/react-label"),fn=require("@radix-ui/react-scroll-area"),xn=require("@radix-ui/react-tabs"),gn=require("@radix-ui/react-tooltip"),hn=require("@radix-ui/react-popover"),bn=require("@radix-ui/react-menubar"),vn=require("@radix-ui/react-hover-card"),yn=require("@radix-ui/react-select"),jn=require("@radix-ui/react-dropdown-menu"),wn=require("@radix-ui/react-separator"),Rn=require("@radix-ui/react-toast"),H=require("cmdk"),kn=require("@radix-ui/react-context-menu"),jt=require("react-icons-picker"),Nn=require("react-dom"),Sn=require("react-quill"),mi=require("lodash");require("react-i18next");function L(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=L(k),wt=L(an),De=L(ln),ie=L(dn),U=L(un),B=L(mn),Rt=L(pn),ae=L(fn),ce=L(xn),pe=L(gn),he=L(hn),A=L(bn),Ce=L(vn),O=L(yn),T=L(jn),kt=L(wn),K=L(Rn),P=L(kn);var z={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let Cn=0;function X(e,t){const s=`atom${++Cn}`,o={toString:()=>s};return typeof e=="function"?o.read=e:(o.init=e,o.read=n=>n(o),o.write=(n,l,a)=>l(o,typeof a=="function"?a(n(o)):a)),t&&(o.write=t),o}const Be=e=>"init"in e,Te=e=>!!e.write,Re=new WeakMap,En=(e,t)=>{Re.set(e,t),e.catch(()=>{}).finally(()=>Re.delete(e))},lt=(e,t)=>{const s=Re.get(e);s&&(Re.delete(e),s(t))},ct=(e,t)=>{e.status="fulfilled",e.value=t},dt=(e,t)=>{e.status="rejected",e.reason=t},An=e=>typeof(e==null?void 0:e.then)=="function",xe=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),ut=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),ue=e=>"v"in e&&e.v instanceof Promise,_n=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,ye=e=>{if("e"in e)throw e.e;return e.v},Nt=()=>{const e=new WeakMap,t=new WeakMap,s=new Map;let o,n,l;(z?"production":void 0)!=="production"&&(o=new Set,n=new Set,l=new Set);const a=m=>e.get(m),d=(m,h)=>{(z?"production":void 0)!=="production"&&Object.freeze(h);const j=e.get(m);if(e.set(m,h),s.has(m)||s.set(m,j),j&&ue(j)){const b="v"in h?h.v instanceof Promise?h.v:Promise.resolve(h.v):Promise.reject(h.e);lt(j.v,b)}},g=(m,h,j)=>{const b=new Map;let w=!1;j.forEach((y,S)=>{!y&&S===m&&(y=h),y?(b.set(S,y),h.d.get(S)!==y&&(w=!0)):(z?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(w||h.d.size!==b.size)&&(h.d=b)},c=(m,h,j)=>{const b=a(m),w={d:(b==null?void 0:b.d)||new Map,v:h};if(j&&g(m,w,j),b&&xe(b,w)&&b.d===w.d)return b;if(b&&ue(b)&&ue(w)&&_n(b,w)){if(b.d===w.d)return b;w.v=b.v}return d(m,w),w},x=(m,h,j,b)=>{if(An(h)){let w;const y=new Promise((S,M)=>{let C=!1;h.then(_=>{if(!C){C=!0;const E=a(m),Q=c(m,y,j);ct(y,_),S(_),(E==null?void 0:E.d)!==Q.d&&Y(m,Q,E==null?void 0:E.d)}},_=>{if(!C){C=!0;const E=a(m),Q=c(m,y,j);dt(y,_),M(_),(E==null?void 0:E.d)!==Q.d&&Y(m,Q,E==null?void 0:E.d)}}),w=_=>{C||(C=!0,_.then(E=>ct(y,E),E=>dt(y,E)),S(_))}});return y.orig=h,y.status="pending",En(y,S=>{S&&w(S),b==null||b()}),c(m,y,j)}return c(m,h,j)},v=(m,h,j)=>{const b=a(m),w={d:(b==null?void 0:b.d)||new Map,e:h};return j&&g(m,w,j),b&&ut(b,w)&&b.d===w.d?b:(d(m,w),w)},R=m=>{const h=a(m);if(h&&(h.d.forEach((C,_)=>{_!==m&&!t.has(_)&&R(_)}),Array.from(h.d).every(([C,_])=>{const E=a(C);return C===m||E===_||E&&!ue(E)&&xe(E,_)})))return h;const j=new Map;let b=!0;const w=C=>{if(C===m){const E=a(C);if(E)return j.set(C,E),ye(E);if(Be(C))return j.set(C,void 0),C.init;throw new Error("no atom init")}const _=R(C);return j.set(C,_),ye(_)};let y,S;const M={get signal(){return y||(y=new AbortController),y.signal},get setSelf(){return(z?"production":void 0)!=="production"&&!Te(m)&&console.warn("setSelf function cannot be used with read-only atom"),!S&&Te(m)&&(S=(...C)=>{if((z?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return V(m,...C)}),S}};try{const C=m.read(w,M);return x(m,C,j,()=>y==null?void 0:y.abort())}catch(C){return v(m,C,j)}finally{b=!1}},N=m=>ye(R(m)),I=m=>{let h=t.get(m);return h||(h=J(m)),h},D=(m,h)=>!h.l.size&&(!h.t.size||h.t.size===1&&h.t.has(m)),q=m=>{const h=t.get(m);h&&D(m,h)&&re(m)},$=m=>{const h=new Map,j=new WeakMap,b=y=>{const S=t.get(y);S==null||S.t.forEach(M=>{M!==y&&(h.set(M,(h.get(M)||new Set).add(y)),j.set(M,(j.get(M)||0)+1),b(M))})};b(m);const w=y=>{const S=t.get(y);S==null||S.t.forEach(M=>{var C;if(M!==y){let _=j.get(M);if(_&&j.set(M,--_),!_){let E=!!((C=h.get(M))!=null&&C.size);if(E){const Q=a(M),on=R(M);E=!Q||!xe(Q,on)}E||h.forEach(Q=>Q.delete(M))}w(M)}})};w(m)},G=(m,...h)=>{let j=!0;const b=S=>ye(R(S)),w=(S,...M)=>{let C;if(S===m){if(!Be(S))throw new Error("atom not writable");const _=a(S),E=x(S,M[0]);(!_||!xe(_,E))&&$(S)}else C=G(S,...M);if(!j){const _=ee();(z?"production":void 0)!=="production"&&n.forEach(E=>E({type:"async-write",flushed:_}))}return C},y=m.write(b,w,...h);return j=!1,y},V=(m,...h)=>{const j=G(m,...h),b=ee();return(z?"production":void 0)!=="production"&&n.forEach(w=>w({type:"write",flushed:b})),j},J=(m,h)=>{const j={t:new Set(h&&[h]),l:new Set};if(t.set(m,j),(z?"production":void 0)!=="production"&&l.add(m),R(m).d.forEach((b,w)=>{const y=t.get(w);y?y.t.add(m):w!==m&&J(w,m)}),R(m),Te(m)&&m.onMount){const b=m.onMount((...w)=>V(m,...w));b&&(j.u=b)}return j},re=m=>{var h;const j=(h=t.get(m))==null?void 0:h.u;j&&j(),t.delete(m),(z?"production":void 0)!=="production"&&l.delete(m);const b=a(m);b?(ue(b)&&lt(b.v),b.d.forEach((w,y)=>{if(y!==m){const S=t.get(y);S&&(S.t.delete(m),D(y,S)&&re(y))}})):(z?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},Y=(m,h,j)=>{const b=new Set(h.d.keys());j==null||j.forEach((w,y)=>{if(b.has(y)){b.delete(y);return}const S=t.get(y);S&&(S.t.delete(m),D(y,S)&&re(y))}),b.forEach(w=>{const y=t.get(w);y?y.t.add(m):t.has(m)&&J(w,m)})},ee=()=>{let m;for((z?"production":void 0)!=="production"&&(m=new Set);s.size;){const h=Array.from(s);s.clear(),h.forEach(([j,b])=>{const w=a(j);if(w){w.d!==(b==null?void 0:b.d)&&Y(j,w,b==null?void 0:b.d);const y=t.get(j);y&&!(b&&!ue(b)&&(xe(b,w)||ut(b,w)))&&(y.l.forEach(S=>S()),(z?"production":void 0)!=="production"&&m.add(j))}else(z?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((z?"production":void 0)!=="production")return o.forEach(h=>h("state")),m},te=(m,h)=>{const j=I(m),b=ee(),w=j.l;return w.add(h),(z?"production":void 0)!=="production"&&(o.forEach(y=>y("sub")),n.forEach(y=>y({type:"sub",flushed:b}))),()=>{w.delete(h),q(m),(z?"production":void 0)!=="production"&&(o.forEach(y=>y("unsub")),n.forEach(y=>y({type:"unsub"})))}};return(z?"production":void 0)!=="production"?{get:N,set:V,sub:te,dev_subscribe_store:(m,h)=>h!==2?(console.warn("The current StoreListener revision is 2. The older ones are deprecated."),o.add(m),()=>{o.delete(m)}):(n.add(m),()=>{n.delete(m)}),dev_get_mounted_atoms:()=>l.values(),dev_get_atom_state:m=>e.get(m),dev_get_mounted:m=>t.get(m),dev_restore_atoms:m=>{for(const[j,b]of m)Be(j)&&(x(j,b),$(j));const h=ee();n.forEach(j=>j({type:"restore",flushed:h}))}}:{get:N,set:V,sub:te}};let Pe;const Bn=()=>(Pe||(Pe=Nt()),Pe);var Tn={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Pn=k.createContext(void 0),Fe=e=>{const t=k.useContext(Pn);return(e==null?void 0:e.store)||t||Bn()};const In=e=>typeof(e==null?void 0:e.then)=="function",Mn=k.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 St(e,t){const s=Fe(t),[[o,n,l],a]=k.useReducer(c=>{const x=s.get(e);return Object.is(c[0],x)&&c[1]===s&&c[2]===e?c:[x,s,e]},void 0,()=>[s.get(e),s,e]);let d=o;(n!==s||l!==e)&&(a(),d=s.get(e));const g=t==null?void 0:t.delay;return k.useEffect(()=>{const c=s.sub(e,()=>{if(typeof g=="number"){setTimeout(a,g);return}a()});return a(),c},[s,e,g]),k.useDebugValue(d),In(d)?Mn(d):d}function Ct(e,t){const s=Fe(t);return k.useCallback((...n)=>{if((Tn?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return s.set(e,...n)},[s,e])}function Dn(e,t){return[St(e,t),Ct(e,t)]}var Ue={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Et=Symbol();const mt=(e,t,s)=>(t.has(s)?t:t.set(s,e())).get(s),On=new WeakMap,Ln=(e,t,s)=>{const o=mt(()=>new WeakMap,On,t);return mt(e,o,s)},zn={},pt=e=>!!e.write,Vn=e=>typeof e=="function";function Fn(e,t){return Ln(()=>{const s=new WeakMap,o=(a,d)=>{let g=s.get(a);if(g)return g;const c=d&&s.get(d),x=[],v=[];return a.forEach((R,N)=>{const I=t?t(R):N;v[N]=I;const D=c&&c.atomList[c.keyList.indexOf(I)];if(D){x[N]=D;return}const q=G=>{const V=G(n),J=G(e),Y=o(J,V==null?void 0:V.arr).keyList.indexOf(I);if(Y<0||Y>=J.length){const ee=a[o(a).keyList.indexOf(I)];if(ee)return ee;throw new Error("splitAtom: index out of bounds for read")}return J[Y]},$=(G,V,J)=>{const re=G(n),Y=G(e),te=o(Y,re==null?void 0:re.arr).keyList.indexOf(I);if(te<0||te>=Y.length)throw new Error("splitAtom: index out of bounds for write");const m=Vn(J)?J(Y[te]):J;V(e,[...Y.slice(0,te),m,...Y.slice(te+1)])};x[N]=pt(e)?X(q,$):X(q)}),c&&c.keyList.length===v.length&&c.keyList.every((R,N)=>R===v[N])?g=c:g={arr:a,atomList:x,keyList:v},s.set(a,g),g},n=X(a=>{const d=a(n),g=a(e);return o(g,d==null?void 0:d.arr)});(Ue?"production":void 0)!=="production"&&(n.debugPrivate=!0),n.init=void 0;const l=pt(e)?X(a=>a(n).atomList,(a,d,g)=>{switch(g.type){case"remove":{const c=a(l).indexOf(g.atom);if(c>=0){const x=a(e);d(e,[...x.slice(0,c),...x.slice(c+1)])}break}case"insert":{const c=g.before?a(l).indexOf(g.before):a(l).length;if(c>=0){const x=a(e);d(e,[...x.slice(0,c),g.value,...x.slice(c)])}break}case"move":{const c=a(l).indexOf(g.atom),x=g.before?a(l).indexOf(g.before):a(l).length;if(c>=0&&x>=0){const v=a(e);c<x?d(e,[...v.slice(0,c),...v.slice(c+1,x),v[c],...v.slice(x)]):d(e,[...v.slice(0,x),v[c],...v.slice(x,c),...v.slice(c+1)])}break}}}):X(a=>a(n).atomList);return l},e,t||zn)}function Un(e){const t=Symbol(),s=X(t);(Ue?"production":void 0)!=="production"&&(s.debugPrivate=!0);const o=X((n,l)=>{const a=n(s);return a!==t?a:e(n,l)},(n,l,a)=>{if(a===Et)l(s,t);else if(typeof a=="function"){const d=n(o);l(s,a(d))}else l(s,a)});return o}const qn=e=>typeof(e==null?void 0:e.then)=="function";function $n(e){let t,s;const o={getItem:(n,l)=>{var a,d;const g=x=>{if(x=x||"",t!==x){try{s=JSON.parse(x)}catch{return l}t=x}return s},c=(d=(a=e())==null?void 0:a.getItem(n))!=null?d:null;return qn(c)?c.then(g):g(c)},setItem:(n,l)=>{var a;return(a=e())==null?void 0:a.setItem(n,JSON.stringify(l))},removeItem:n=>{var l;return(l=e())==null?void 0:l.removeItem(n)}};return typeof window<"u"&&typeof window.addEventListener=="function"&&(o.subscribe=(n,l,a)=>{if(!(e()instanceof window.Storage))return()=>{};const d=g=>{if(g.storageArea===e()&&g.key===n){let c;try{c=JSON.parse(g.newValue||"")}catch{c=a}l(c)}};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}}),o}const Gn=$n(()=>typeof window<"u"?window.localStorage:void 0);function fe(e,t,s=Gn,o){const n=o==null?void 0:o.unstable_getOnInit,l=X(n?s.getItem(e,t):t);return(Ue?"production":void 0)!=="production"&&(l.debugPrivate=!0),l.onMount=d=>{n||d(s.getItem(e,t));let g;return s.subscribe&&(g=s.subscribe(e,d,t)),g},X(d=>d(l),(d,g,c)=>{const x=typeof c=="function"?c(d(l)):c;return x===Et?(g(l,t),s.removeItem(e)):x instanceof Promise?x.then(v=>(g(l,v),s.setItem(e,v))):(g(l,x),s.setItem(e,x))})}const qe=p.atom(null);qe.debugLabel="chaiBuilderPropsAtom";const At=p.atom({});At.debugLabel="chaiExternalDataAtom";const Wn=()=>!1,Hn=e=>{const t=e.replace(W.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}},Oe=(e,t)=>{if(!e)return!0;const s=Se.getBlockComponent(e);return s&&i.has(s,"canAcceptBlock")?s.canAcceptBlock(t):!1},Yn=(e,t)=>{const s=Se.getBlockComponent(t);return s&&i.has(s,"canBeNested")?s.canBeNested(e):!0},Kn=e=>{const t=Se.getBlockComponent(e);return t&&i.has(t,"canDuplicate")?t.canDuplicate():!0},Jn=e=>{const t=Se.getBlockComponent(e);return t&&i.has(t,"canDelete")?t.canDelete():!0},Qn=(e,{dragSource:t,dropTarget:s})=>{const o=i.get(t,"data._type",""),n=i.get(s,"data._type","");return Oe(n,o)};const oe=p.atom([]);oe.debugLabel="presentBlocksAtom";const $e=Fn(oe);$e.debugLabel="pageBlocksAtomsAtom";const Xn=p.atom("");Xn.debugLabel="builderActivePageAtom";const Zn=p.atom(-1);Zn.debugLabel="destinationDropIndexAtom";const _t=p.atom([]);_t.debugLabel="buildingBlocksAtom";const er=p.atom(e=>{const t=e(_t);return i.filter(t,s=>i.has(s,"blockId"))});er.debugLabel="globalBlocksAtom";const Ge=p.atom([]);Ge.debugLabel="selectedBlockIdsAtom";const We=p.atom(e=>{const t=e(oe),s=e(Ge);return i.map(i.filter(t,({_id:o})=>i.includes(s,o)),o=>({...o}))});We.debugLabel="selectedBlocksAtom";const He=p.atom(e=>{const t=e(We);return t.length===0?null:t.length===1?t[0]:{type:"Multiple",id:i.map(t,"id")}});He.debugLabel="selectedBlockAtom";const tr=e=>i.get(e,"parent",null),sr=p.atom(e=>{const t=e(We),s=i.map(t,tr);return i.filter(e(oe),o=>i.includes(s,o._id))});sr.debugLabel="selectedBlocksParentsAtom";const Bt=p.atom(()=>!1);Bt.debugLabel="selectedBlockFlexChildAtom";const Tt=p.atom(()=>!1);Tt.debugLabel="selectedBlockGridChildAtom";const Ye=p.atom("");Ye.debugLabel="styleStateAtom";const Pt=fe("styleBreakpoint","xs");Pt.debugLabel="styleBreakpointAtom";const or=()=>({flexChild:p.useAtomValue(Bt),gridChild:p.useAtomValue(Tt)}),nr=()=>p.useAtomValue(He);const be=()=>{const[e,t]=p.useAtom(Ge),s=k.useCallback(o=>{t(n=>i.includes(n,o)?i.without(n,o):[...n,o])},[t]);return[e,t,s]},Le=e=>{switch(e.type){case"singular":return e.uiSchema;case"model":const{properties:t}=e,s={};return Object.keys(t).forEach(l=>{const a=t[l];if(i.includes(["slot","styles"],a.type))return;const d=l;s[d]=Le(a)}),s;case"list":const{itemProperties:o}=e,n={items:{}};return Object.keys(o).forEach(l=>{const a=o[l];if(i.includes(["slot","styles"],a.type))return;const d=l;n.items[d]=Le(a)}),n;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(d=>{const g=t[d];if(i.includes(["slot","styles"],g.type))return;const c=d;o.properties[c]=ze(g)}),o;case"list":const{itemProperties:n,title:l}=e,a={title:l,type:"array",items:{type:"object",properties:{}}};return Object.keys(n).forEach(d=>{const g=n[d];if(i.includes(["slot","styles"],g.type))return;const c=d;a.items.properties[c]=ze(g),i.set(a.items,"title",i.get(g,"itemTitle",`${l} item`))}),a;default:return{}}},It=e=>{if(!e)return{};const t={};return Object.keys(e).forEach(s=>{t[s]=ar(e[s])}),t},rr=e=>{if(i.isEmpty(e.default))return[];const{itemProperties:t}=e;return i.map(e.default,s=>{const o={...s};return i.forIn(s,(n,l)=>{i.has(t,l)&&i.get(t[l],"i18n",!1)&&(o[l]=W.I18N_KEY)}),o})},ar=e=>{switch(e.type){case"styles":return e.default;case"slot":return`${W.SLOT_KEY}${se.generateUUID()}`;case"singular":const{i18n:t,schema:s}=e;return t?W.I18N_KEY:i.get(s,"default","");case"model":return It(e.properties);case"list":return rr(e);default:return""}};var Ke={exports:{}},pi=Ke.exports;(function(e){(function(){"use strict";function t(o,n,l){return o.splice(n,!l||1+l-n+(!(l<0^n>=0)&&(l<0||-1)*o.length)),o.length}let s=function(){let o=[],n=-1,l=0,a=!1,d;function g(c,x){return!c||typeof c[x]!="function"?this:(a=!0,c[x](),a=!1,this)}return{add:function(c){return a?this:(o.splice(n+1,o.length-n),o.push(c),l&&o.length>l&&t(o,0,-(l+1)),n=o.length-1,d&&d(),this)},setCallback:function(c){d=c},undo:function(){let c=o[n];if(!c)return this;const x=c.groupId;for(;c.groupId===x&&(g(c,"undo"),n-=1,c=o[n],!(!c||!c.groupId)););return d&&d(),this},redo:function(){let c=o[n+1];if(!c)return this;const x=c.groupId;for(;c.groupId===x&&(g(c,"redo"),n+=1,c=o[n+1],!(!c||!c.groupId)););return d&&d(),this},clear:function(){let c=o.length;o=[],n=-1,d&&c>0&&d()},hasUndo:function(){return n!==-1},hasRedo:function(){return n<o.length-1},getCommands:function(c){return c?o.filter(x=>x.groupId===c):o},getIndex:function(){return n},setLimit:function(c){l=c}}};e.exports?e.exports=s:window.UndoManager=s})()})(Ke);var ir=Ke.exports;const lr=nn.getDefaultExportFromCjs(ir),cr=p.atom(W.BRANDING_OPTIONS_DEFAULTS),dr=p.atom(null),Je=()=>{const[e,t]=p.useAtom(cr);return[i.isObject(e)?{...W.BRANDING_OPTIONS_DEFAULTS,...e}:W.BRANDING_OPTIONS_DEFAULTS,t]},ur=()=>p.useAtom(dr),mr=p.atom(null),Mt=()=>({currentPage:p.useAtomValue(mr)}),Dt=new yt({});function pr(e){let t=Dt.convert(e);return t=!t.type&&t.children&&t.children.length?t.children:i.isEmpty(t)?[]:[t],t}const Qe=(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,...Qe(o,s._id)])}return s}));function Xe(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&&Xe(o.children)}}function Ot(e){let t=[],s=i.filter(e,{type:"GlobalBlock"});return s.length>0&&(s=i.map(s,Lt),i.each(s,o=>{t=[...t,...fr(o)]})),t}function fr(e){let t=[];const s=i.get(i.first(e),"parent",null);i.set(i.first(e),"parent",null);const o=[Dt.convert(zt(e))];Xe(o,!0);let n=Qe(o,e[0]._id);return n=i.set(n,"0.parent",s),t=[...t,n,...Ot(n)],t}function Lt(e){const t=i.find(Ve,{_id:e._id});if(!t)return[];const s=[t],o=i.filter(Ve,{_parent:e._id});return o.length?i.flatten([...s,...i.flatten(i.map(o,Lt))]):i.flatten(s)}const zt=e=>JSON.parse(JSON.stringify(e));let Ve=[];function xr(e){Ve=e;const t=pr(zt(e));Xe(t);const s=Qe(t,null),o=Ot(s),n={};return i.each(o,l=>i.set(n,i.first(l).blockId,l)),[s,n]}const Vt=()=>{const[e]=Je(),{currentPage:t}=Mt(),[s]=de();return k.useCallback(()=>{const o=i.map(s,a=>i.omit(a,["expanded","order","title","siblings","tempClasses"])),[n=[],l=[]]=xr(o);return{currentPage:t,blocks:n,globalBlocks:l}},[e,t,s])},me=(e,t=void 0)=>{const s=p.useAtomValue(qe);return i.get(s,e,t)},Ze=p.atom([]);Ze.debugLabel="dataProvidersAtom";const Ft=()=>p.useAtom(Ze),Ee=p.atom("SAVED");Ee.debugLabel="pageSyncStateAtom";const gr=()=>{const[e,t]=p.useAtom(Ee),s=me("onSavePage",async c=>{}),o=me("onSave",async c=>{}),n=me("onSyncStatusChange",c=>{}),l=Vt(),[a]=Ft(),[d]=Je();return{savePage:rn.useThrottledCallback(async()=>{t("SAVING"),n("SAVING");const c=l();return await s({blocks:c.blocks,providers:a}),await o({blocks:c.blocks,providers:a,brandingOptions:d}),setTimeout(()=>{t("SAVED"),n("SAVED")},100),!0},[l,t,d,o,n],5e3),syncState:e,setSyncState:t}},Z=new lr;Z.setLimit(50);const et=()=>{const[,e]=p.useAtom(Ee);return k.useEffect(()=>(Z.setCallback(()=>e("UNSAVED")),()=>{Z.setCallback(i.noop)}),[]),{add:Z.add,undo:Z.undo,redo:Z.redo,hasRedo:Z.hasRedo,hasUndo:Z.hasUndo,clear:Z.clear}},tt=(e,t)=>{const s=[],o=i.filter(e,n=>i.includes(t,n._id)||i.includes(t,n._parent)?(s.push(n._id),!1):!0);return i.isEmpty(s)?o:tt(o,s)},hr=()=>{const[e]=de(),[t,s]=be(),{setNewBlocks:o}=ne();return k.useCallback(n=>{var a;const l=((a=i.find(e,{_id:n[0]}))==null?void 0:a._parent)||null;o(tt(e,n)),setTimeout(()=>s(l?[l]:[]),200)},[e,s,t])};function br(e,t,s,o){let n=e.filter(d=>!d._parent);s&&(n=e.filter(d=>d._parent===s));const l=o!==void 0?o:n.length;let a=e.length;for(let d=0,g=0;d<e.length;d++)if(e[d]._parent===s){if(g===l){a=d;break}g++}return!s&&o!==void 0&&o>=n.length&&(a=e.length),[...e.slice(0,a),...t,...e.slice(a)]}const vr=()=>{const[,e]=de();return{setNewBlocks:t=>{e(t)},addBlocks:(t,s,o)=>{e(n=>br(n,t,s,o))},removeBlocks:t=>{e(s=>tt(s,t))},updateBlocksProps:t=>{e(s=>{const o=t.map(n=>n._id);return s.map(n=>{if(o.includes(n._id)){const l=i.find(t,{_id:n._id});return{...n,...i.omit(l,"_id")}}return n})})}}},de=()=>p.useAtom(oe),ne=()=>{const{add:e}=et(),[t]=de(),{setNewBlocks:s,addBlocks:o,removeBlocks:n,updateBlocksProps:l}=vr();return{addBlocks:(v,R,N)=>{o(v,R,N),e({undo:()=>n(i.map(v,"_id")),redo:()=>o(v,R,N)})},removeBlocks:v=>{var D;const R=(D=i.first(v))==null?void 0:D._parent,I=t.filter(q=>R?q._parent===R:!q._parent).indexOf(i.first(v));n(i.map(v,"_id")),e({undo:()=>o(v,R,I),redo:()=>n(i.map(v,"_id"))})},updateBlocks:(v,R,N)=>{let I=[];if(N)I=i.map(v,D=>({_id:D,...N}));else{const D=i.keys(R);I=i.map(v,q=>{const $=t.find(V=>V._id===q),G={_id:q};return i.each(D,V=>G[V]=$[V]),G})}l(i.map(v,D=>({_id:D,...R}))),e({undo:()=>l(I),redo:()=>l(i.map(v,D=>({_id:D,...R})))})},updateBlocksRuntime:(v,R)=>{l(i.map(v,N=>({_id:N,...R})))},setNewBlocks:v=>{s(v),e({undo:()=>s(t),redo:()=>s(v)})}}},Ut=le.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"}}),qt=f.forwardRef(({className:e,variant:t,size:s,...o},n)=>r.jsxRuntimeExports.jsx(wt.Root,{ref:n,className:u.cn(Ut({variant:t,size:s,className:e})),...o}));qt.displayName=wt.Root.displayName;const $t=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(De.Root,{className:u.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:r.jsxRuntimeExports.jsx(De.Thumb,{className:u.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")})}));$t.displayName=De.Root.displayName;const Ae=le.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"}}),Gt=f.forwardRef(({className:e,variant:t,size:s,asChild:o=!1,...n},l)=>{const a=o?cn.Slot:"button";return r.jsxRuntimeExports.jsx(a,{className:u.cn(Ae({variant:t,size:s,className:e})),ref:l,...n})});Gt.displayName="Button";const yr=ie.Root,Wt=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(ie.Item,{ref:s,className:u.cn("border-b",e),...t}));Wt.displayName="AccordionItem";const Ht=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsx(ie.Header,{className:"flex",children:r.jsxRuntimeExports.jsxs(ie.Trigger,{ref:o,className:u.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,r.jsxRuntimeExports.jsx(F.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));Ht.displayName=ie.Trigger.displayName;const Yt=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsx(ie.Content,{ref:o,className:u.cn("text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...s,children:r.jsxRuntimeExports.jsx("div",{className:"pb-4 pt-0",children:t})}));Yt.displayName=ie.Content.displayName;const jr=le.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"}}),Kt=f.forwardRef(({className:e,variant:t,...s},o)=>r.jsxRuntimeExports.jsx("div",{ref:o,role:"alert",className:u.cn(jr({variant:t}),e),...s}));Kt.displayName="Alert";const Jt=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("h5",{ref:s,className:u.cn("mb-1 font-medium leading-none tracking-tight",e),...t}));Jt.displayName="AlertTitle";const Qt=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn("text-sm [&_p]:leading-relaxed",e),...t}));Qt.displayName="AlertDescription";const Xt=le.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"}}),wr=({className:e,variant:t,...s})=>r.jsxRuntimeExports.jsx("div",{className:u.cn(Xt({variant:t}),e),...s}),Rr=U.Root,kr=U.Trigger,Zt=({className:e,...t})=>r.jsxRuntimeExports.jsx(U.Portal,{className:u.cn(e),...t});Zt.displayName=U.Portal.displayName;const es=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(U.Overlay,{className:u.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}));es.displayName=U.Overlay.displayName;const ts=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsxs(Zt,{children:[r.jsxRuntimeExports.jsx(es,{}),r.jsxRuntimeExports.jsx(U.Content,{ref:s,className:u.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=U.Content.displayName;const ss=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});ss.displayName="AlertDialogHeader";const os=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});os.displayName="AlertDialogFooter";const ns=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(U.Title,{ref:s,className:u.cn("text-lg font-semibold",e),...t}));ns.displayName=U.Title.displayName;const rs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(U.Description,{ref:s,className:u.cn("text-sm text-muted-foreground",e),...t}));rs.displayName=U.Description.displayName;const as=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(U.Action,{ref:s,className:u.cn(Ae(),e),...t}));as.displayName=U.Action.displayName;const is=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(U.Cancel,{ref:s,className:u.cn(Ae({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));is.displayName=U.Cancel.displayName;const st=B.Root,ls=B.Trigger,cs=({className:e,...t})=>r.jsxRuntimeExports.jsx(B.Portal,{className:u.cn(e),...t});cs.displayName=B.Portal.displayName;const ds=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(B.Overlay,{ref:s,className:u.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}));ds.displayName=B.Overlay.displayName;const _e=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(cs,{children:[r.jsxRuntimeExports.jsx(ds,{}),r.jsxRuntimeExports.jsxs(B.Content,{ref:o,className:u.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,r.jsxRuntimeExports.jsxs(B.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:[r.jsxRuntimeExports.jsx(F.Cross2Icon,{className:"h-4 w-4"}),r.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));_e.displayName=B.Content.displayName;const us=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});us.displayName="DialogHeader";const ms=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ms.displayName="DialogFooter";const ps=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(B.Title,{ref:s,className:u.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));ps.displayName=B.Title.displayName;const fs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(B.Description,{ref:s,className:u.cn("text-sm text-muted-foreground",e),...t}));fs.displayName=B.Description.displayName;const xs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn("rounded-xl border bg-card text-card-foreground shadow",e),...t}));xs.displayName="Card";const gs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn("flex flex-col space-y-1.5 p-6",e),...t}));gs.displayName="CardHeader";const hs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("h3",{ref:s,className:u.cn("font-semibold leading-none tracking-tight",e),...t}));hs.displayName="CardTitle";const bs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("p",{ref:s,className:u.cn("text-sm text-muted-foreground",e),...t}));bs.displayName="CardDescription";const vs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn("p-6 pt-0",e),...t}));vs.displayName="CardContent";const ys=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("div",{ref:s,className:u.cn(" flex items-center p-6 pt-0",e),...t}));ys.displayName="CardFooter";const js=f.forwardRef(({className:e,type:t,...s},o)=>r.jsxRuntimeExports.jsx("input",{type:t,className:u.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}));js.displayName="Input";const Nr=le.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ws=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(Rt.Root,{ref:s,className:u.cn(Nr(),e),...t}));ws.displayName=Rt.Root.displayName;const Rs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx("textarea",{className:u.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}));Rs.displayName="Textarea";const ks=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(ae.Root,{ref:o,className:u.cn("relative overflow-hidden",e),...s,children:[r.jsxRuntimeExports.jsx(ae.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),r.jsxRuntimeExports.jsx(ot,{}),r.jsxRuntimeExports.jsx(ae.Corner,{})]}));ks.displayName=ae.Root.displayName;const ot=f.forwardRef(({className:e,orientation:t="vertical",...s},o)=>r.jsxRuntimeExports.jsx(ae.ScrollAreaScrollbar,{ref:o,orientation:t,className:u.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:r.jsxRuntimeExports.jsx(ae.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ot.displayName=ae.ScrollAreaScrollbar.displayName;const Ns=ce.Root,nt=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(ce.List,{ref:s,className:u.cn("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));nt.displayName=ce.List.displayName;const ke=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(ce.Trigger,{ref:s,className:u.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}));ke.displayName=ce.Trigger.displayName;const Ne=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(ce.Content,{ref:s,className:u.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}));Ne.displayName=ce.Content.displayName;const Sr=pe.Portal,Cr=pe.Provider,Er=pe.Root,Ar=pe.Trigger,Ss=f.forwardRef(({className:e,sideOffset:t=4,...s},o)=>r.jsxRuntimeExports.jsx(pe.Content,{ref:o,sideOffset:t,className:u.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}));Ss.displayName=pe.Content.displayName;const _r=he.Root,Br=he.Trigger,Cs=f.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},n)=>r.jsxRuntimeExports.jsx(he.Portal,{children:r.jsxRuntimeExports.jsx(he.Content,{ref:n,align:t,sideOffset:s,className:u.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})}));Cs.displayName=he.Content.displayName;const Tr=A.Menu,Pr=A.Group,Ir=A.Portal,Mr=A.Sub,Dr=A.RadioGroup,Es=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(A.Root,{ref:s,className:u.cn("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",e),...t}));Es.displayName=A.Root.displayName;const As=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(A.Trigger,{ref:s,className:u.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}));As.displayName=A.Trigger.displayName;const _s=f.forwardRef(({className:e,inset:t,children:s,...o},n)=>r.jsxRuntimeExports.jsxs(A.SubTrigger,{ref:n,className:u.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,r.jsxRuntimeExports.jsx(F.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));_s.displayName=A.SubTrigger.displayName;const Bs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(A.SubContent,{ref:s,className:u.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}));Bs.displayName=A.SubContent.displayName;const Ts=f.forwardRef(({className:e,align:t="start",alignOffset:s=-4,sideOffset:o=8,...n},l)=>r.jsxRuntimeExports.jsx(A.Portal,{children:r.jsxRuntimeExports.jsx(A.Content,{ref:l,align:t,alignOffset:s,sideOffset:o,className:u.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),...n})}));Ts.displayName=A.Content.displayName;const Ps=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(A.Item,{ref:o,className:u.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}));Ps.displayName=A.Item.displayName;const Is=f.forwardRef(({className:e,children:t,checked:s,...o},n)=>r.jsxRuntimeExports.jsxs(A.CheckboxItem,{ref:n,className:u.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:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(A.ItemIndicator,{children:r.jsxRuntimeExports.jsx(F.CheckIcon,{className:"h-4 w-4"})})}),t]}));Is.displayName=A.CheckboxItem.displayName;const Ms=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(A.RadioItem,{ref:o,className:u.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:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(A.ItemIndicator,{children:r.jsxRuntimeExports.jsx(F.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Ms.displayName=A.RadioItem.displayName;const Ds=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(A.Label,{ref:o,className:u.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s}));Ds.displayName=A.Label.displayName;const Os=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(A.Separator,{ref:s,className:u.cn("-mx-1 my-1 h-px bg-muted",e),...t}));Os.displayName=A.Separator.displayName;const Ls=({className:e,...t})=>r.jsxRuntimeExports.jsx("span",{className:u.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ls.displayname="MenubarShortcut";const Or=Ce.Root,Lr=Ce.Trigger,zs=f.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},n)=>r.jsxRuntimeExports.jsx(Ce.Content,{ref:n,align:t,sideOffset:s,className:u.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}));zs.displayName=Ce.Content.displayName;const zr=O.Root,Vr=O.Group,Fr=O.Value,Vs=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(O.Trigger,{ref:o,className:u.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,r.jsxRuntimeExports.jsx(O.Icon,{asChild:!0,children:r.jsxRuntimeExports.jsx(F.CaretSortIcon,{className:"h-4 w-4 opacity-50"})})]}));Vs.displayName=O.Trigger.displayName;const Fs=f.forwardRef(({className:e,children:t,position:s="popper",...o},n)=>r.jsxRuntimeExports.jsx(O.Portal,{children:r.jsxRuntimeExports.jsx(O.Content,{ref:n,className:u.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:r.jsxRuntimeExports.jsx(O.Viewport,{className:u.cn("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Fs.displayName=O.Content.displayName;const Us=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(O.Label,{ref:s,className:u.cn("px-2 py-1.5 text-sm font-semibold",e),...t}));Us.displayName=O.Label.displayName;const qs=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(O.Item,{ref:o,className:u.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:[r.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(O.ItemIndicator,{children:r.jsxRuntimeExports.jsx(F.CheckIcon,{className:"h-4 w-4"})})}),r.jsxRuntimeExports.jsx(O.ItemText,{children:t})]}));qs.displayName=O.Item.displayName;const $s=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(O.Separator,{ref:s,className:u.cn("-mx-1 my-1 h-px bg-muted",e),...t}));$s.displayName=O.Separator.displayName;const Ur=B.Root,qr=B.Trigger,$r=B.Close,Gs=({className:e,...t})=>r.jsxRuntimeExports.jsx(B.Portal,{className:u.cn(e),...t});Gs.displayName=B.Portal.displayName;const Ws=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(B.Overlay,{className:u.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}));Ws.displayName=B.Overlay.displayName;const Gr=le.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"}}),Hs=f.forwardRef(({side:e="right",className:t,children:s,...o},n)=>r.jsxRuntimeExports.jsxs(Gs,{children:[r.jsxRuntimeExports.jsx(Ws,{}),r.jsxRuntimeExports.jsxs(B.Content,{ref:n,className:u.cn(Gr({side:e}),t),...o,children:[s,r.jsxRuntimeExports.jsxs(B.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:[r.jsxRuntimeExports.jsx(F.Cross2Icon,{className:"h-4 w-4"}),r.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Hs.displayName=B.Content.displayName;const Ys=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ys.displayName="SheetHeader";const Ks=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ks.displayName="SheetFooter";const Js=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(B.Title,{ref:s,className:u.cn("text-lg font-semibold text-foreground",e),...t}));Js.displayName=B.Title.displayName;const Qs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(B.Description,{ref:s,className:u.cn("text-sm text-muted-foreground",e),...t}));Qs.displayName=B.Description.displayName;const Wr=T.Root,Hr=T.Trigger,Yr=T.Group,Kr=T.Portal,Jr=T.Sub,Qr=T.RadioGroup,Xs=f.forwardRef(({className:e,inset:t,children:s,...o},n)=>r.jsxRuntimeExports.jsxs(T.SubTrigger,{ref:n,className:u.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,r.jsxRuntimeExports.jsx(F.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Xs.displayName=T.SubTrigger.displayName;const Zs=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(T.SubContent,{ref:s,className:u.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}));Zs.displayName=T.SubContent.displayName;const eo=f.forwardRef(({className:e,sideOffset:t=4,...s},o)=>r.jsxRuntimeExports.jsx(T.Portal,{children:r.jsxRuntimeExports.jsx(T.Content,{ref:o,sideOffset:t,className:u.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})}));eo.displayName=T.Content.displayName;const to=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(T.Item,{ref:o,className:u.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}));to.displayName=T.Item.displayName;const so=f.forwardRef(({className:e,children:t,checked:s,...o},n)=>r.jsxRuntimeExports.jsxs(T.CheckboxItem,{ref:n,className:u.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:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(T.ItemIndicator,{children:r.jsxRuntimeExports.jsx(F.CheckIcon,{className:"h-4 w-4"})})}),t]}));so.displayName=T.CheckboxItem.displayName;const oo=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(T.RadioItem,{ref:o,className:u.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:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(T.ItemIndicator,{children:r.jsxRuntimeExports.jsx(F.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));oo.displayName=T.RadioItem.displayName;const no=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(T.Label,{ref:o,className:u.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s}));no.displayName=T.Label.displayName;const ro=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(T.Separator,{ref:s,className:u.cn("-mx-1 my-1 h-px bg-muted",e),...t}));ro.displayName=T.Separator.displayName;const ao=({className:e,...t})=>r.jsxRuntimeExports.jsx("span",{className:u.cn("ml-auto text-xs tracking-widest opacity-60",e),...t});ao.displayName="DropdownMenuShortcut";const io=f.forwardRef(({className:e,orientation:t="horizontal",decorative:s=!0,...o},n)=>r.jsxRuntimeExports.jsx(kt.Root,{ref:n,decorative:s,orientation:t,className:u.cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));io.displayName=kt.Root.displayName;const Xr=1,Zr=1e6;let Ie=0;function ea(){return Ie=(Ie+1)%Number.MAX_VALUE,Ie.toString()}const Me=new Map,ft=e=>{if(Me.has(e))return;const t=setTimeout(()=>{Me.delete(e),ge({type:"REMOVE_TOAST",toastId:e})},Zr);Me.set(e,t)},lo=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Xr)};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?ft(s):e.toasts.forEach(o=>{ft(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)}}},je=[];let we={toasts:[]};function ge(e){we=lo(we,e),je.forEach(t=>{t(we)})}function co({...e}){const t=ea(),s=n=>ge({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>ge({type:"DISMISS_TOAST",toastId:t});return ge({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:s}}function rt(){const[e,t]=f.useState(we);return f.useEffect(()=>(je.push(t),()=>{const s=je.indexOf(t);s>-1&&je.splice(s,1)}),[e]),{...e,toast:co,dismiss:s=>ge({type:"DISMISS_TOAST",toastId:s})}}const ta=K.Provider,uo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(K.Viewport,{ref:s,className:u.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}));uo.displayName=K.Viewport.displayName;const sa=le.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"}}),mo=f.forwardRef(({className:e,variant:t,...s},o)=>r.jsxRuntimeExports.jsx(K.Root,{ref:o,className:u.cn(sa({variant:t}),e),...s}));mo.displayName=K.Root.displayName;const oa=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(K.Action,{ref:s,className:u.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}));oa.displayName=K.Action.displayName;const po=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(K.Close,{ref:s,className:u.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:r.jsxRuntimeExports.jsx(F.Cross2Icon,{className:"h-4 w-4"})}));po.displayName=K.Close.displayName;const fo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(K.Title,{ref:s,className:u.cn("text-sm font-semibold [&+div]:text-xs",e),...t}));fo.displayName=K.Title.displayName;const xo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(K.Description,{ref:s,className:u.cn("text-sm opacity-90",e),...t}));xo.displayName=K.Description.displayName;function na(){const{toasts:e}=rt();return r.jsxRuntimeExports.jsxs(ta,{children:[e.map(({id:t,title:s,description:o,action:n,...l})=>r.jsxRuntimeExports.jsxs(mo,{...l,children:[r.jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[s&&r.jsxRuntimeExports.jsx(fo,{children:s}),o&&r.jsxRuntimeExports.jsx(xo,{children:o})]}),n,r.jsxRuntimeExports.jsx(po,{})]},t)),r.jsxRuntimeExports.jsx(uo,{})]})}const ra=({className:e,...t})=>r.jsxRuntimeExports.jsx("div",{className:u.cn("animate-pulse rounded-md bg-primary/10",e),...t}),at=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(H.Command,{ref:s,className:u.cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));at.displayName=H.Command.displayName;const aa=({children:e,...t})=>r.jsxRuntimeExports.jsx(st,{...t,children:r.jsxRuntimeExports.jsx(_e,{className:"overflow-hidden p-0",children:r.jsxRuntimeExports.jsx(at,{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})})}),go=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[r.jsxRuntimeExports.jsx(F.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),r.jsxRuntimeExports.jsx(H.Command.Input,{ref:s,className:u.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})]}));go.displayName=H.Command.Input.displayName;const ho=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(H.Command.List,{ref:s,className:u.cn("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));ho.displayName=H.Command.List.displayName;const bo=f.forwardRef((e,t)=>r.jsxRuntimeExports.jsx(H.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));bo.displayName=H.Command.Empty.displayName;const vo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(H.Command.Group,{ref:s,className:u.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}));vo.displayName=H.Command.Group.displayName;const yo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(H.Command.Separator,{ref:s,className:u.cn("-mx-1 h-px bg-border",e),...t}));yo.displayName=H.Command.Separator.displayName;const jo=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(H.Command.Item,{ref:s,className:u.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}));jo.displayName=H.Command.Item.displayName;const wo=({className:e,...t})=>r.jsxRuntimeExports.jsx("span",{className:u.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});wo.displayName="CommandShortcut";const ia=P.Root,la=P.Trigger,ca=P.Group,da=P.Portal,ua=P.Sub,ma=P.RadioGroup,Ro=f.forwardRef(({className:e,inset:t,children:s,...o},n)=>r.jsxRuntimeExports.jsxs(P.SubTrigger,{ref:n,className:u.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,r.jsxRuntimeExports.jsx(F.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Ro.displayName=P.SubTrigger.displayName;const ko=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(P.SubContent,{ref:s,className:u.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}));ko.displayName=P.SubContent.displayName;const No=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(P.Portal,{children:r.jsxRuntimeExports.jsx(P.Content,{ref:s,className:u.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})}));No.displayName=P.Content.displayName;const So=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(P.Item,{ref:o,className:u.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}));So.displayName=P.Item.displayName;const Co=f.forwardRef(({className:e,children:t,checked:s,...o},n)=>r.jsxRuntimeExports.jsxs(P.CheckboxItem,{ref:n,className:u.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:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(P.ItemIndicator,{children:r.jsxRuntimeExports.jsx(F.CheckIcon,{className:"h-4 w-4"})})}),t]}));Co.displayName=P.CheckboxItem.displayName;const Eo=f.forwardRef(({className:e,children:t,...s},o)=>r.jsxRuntimeExports.jsxs(P.RadioItem,{ref:o,className:u.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:[r.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(P.ItemIndicator,{children:r.jsxRuntimeExports.jsx(F.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Eo.displayName=P.RadioItem.displayName;const Ao=f.forwardRef(({className:e,inset:t,...s},o)=>r.jsxRuntimeExports.jsx(P.Label,{ref:o,className:u.cn("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...s}));Ao.displayName=P.Label.displayName;const _o=f.forwardRef(({className:e,...t},s)=>r.jsxRuntimeExports.jsx(P.Separator,{ref:s,className:u.cn("-mx-1 my-1 h-px bg-border",e),...t}));_o.displayName=P.Separator.displayName;const Bo=({className:e,...t})=>r.jsxRuntimeExports.jsx("span",{className:u.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Bo.displayName="ContextMenuShortcut";const pa=e=>{try{const t=document.getElementById("icon-picker-field"),s=document.createElement("div");Nn.render(r.jsxRuntimeExports.jsx(jt.IconPickerItem,{value:e}),s),t.appendChild(s),s.hidden=!0;let o=s.innerHTML;setTimeout(()=>t.removeChild(s),100);const l=new DOMParser().parseFromString(o,"image/svg+xml"),a=l.querySelector("svg");return a&&(a.removeAttribute("width"),a.removeAttribute("height")),new XMLSerializer().serializeToString(l)}catch(t){return console.error(t),""}},fa=({value:e,onChange:t})=>{const s=o=>{t("<svg />");const n=pa(o);t(n)};return r.jsxRuntimeExports.jsxs("div",{className:"mt-1 flex h-20 items-center gap-x-2",id:"icon-picker-field",children:[r.jsxRuntimeExports.jsxs("div",{className:"group relative h-12 w-12",children:[r.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:e?e.replace("<svg",'<svg class="h-5 w-5"'):"<svg class='h-5 w-5' />"},className:"absolute left-1/2 top-1/2 z-0 -translate-x-1/2 -translate-y-1/2 transform cursor-pointer bg-white"}),r.jsxRuntimeExports.jsx(jt,{value:e?"BiSolidGrid":null,onChange:s,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"}})]}),r.jsxRuntimeExports.jsx("textarea",{value:e,onChange:o=>t(o.target.value),className:"h-full w-full rounded-sm border 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"})]})},xa=k.lazy(()=>Promise.resolve().then(()=>require("./UnsplashImages-KSbKGs91.cjs"))),ga=k.lazy(()=>Promise.resolve().then(()=>require("./UploadImages-V42YSRVO.cjs"))),To=({isModalView:e=!1,onSelect:t=()=>{}})=>{const[s,o]=k.useState("upload");return r.jsxRuntimeExports.jsxs("div",{className:"flex h-full flex-col",children:[r.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:r.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:e?"Select or upload images":"Images"})}),r.jsxRuntimeExports.jsxs(Ns,{value:s,onValueChange:n=>o(n),className:"flex h-full w-full flex-col py-2",children:[r.jsxRuntimeExports.jsxs(nt,{className:"w-full",children:[r.jsxRuntimeExports.jsx(ke,{value:"upload",className:"w-1/2",children:"Upload"}),r.jsxRuntimeExports.jsx(ke,{value:"unsplash",className:"w-1/2",children:"Unsplash"})]}),s==="unsplash"?r.jsxRuntimeExports.jsx(Ne,{value:"unsplash",className:"flex h-full flex-col overflow-hidden",children:r.jsxRuntimeExports.jsx(k.Suspense,{fallback:r.jsxRuntimeExports.jsx("div",{className:"h-64 w-full animate-pulse bg-gray-100"}),children:r.jsxRuntimeExports.jsx(xa,{isModalView:e,onSelect:t})})}):r.jsxRuntimeExports.jsx(Ne,{value:"upload",className:"flex h-full flex-col overflow-hidden",children:r.jsxRuntimeExports.jsx(k.Suspense,{fallback:r.jsxRuntimeExports.jsx("div",{className:"h-64 w-full animate-pulse bg-gray-100"}),children:r.jsxRuntimeExports.jsx(ga,{isModalView:e,onSelect:t})})})]})]})},ha=Object.freeze(Object.defineProperty({__proto__:null,default:To},Symbol.toStringTag,{value:"Module"})),xt=({children:e,onSelect:t})=>{const[s,o]=k.useState(!1),n=(...l)=>{t.call(void 0,...l),o(!1)};return r.jsxRuntimeExports.jsxs(st,{open:s,onOpenChange:l=>o(l),children:[r.jsxRuntimeExports.jsx(ls,{asChild:!0,children:e}),r.jsxRuntimeExports.jsx(_e,{className:"flex h-3/4 max-w-5xl",children:r.jsxRuntimeExports.jsx("div",{className:"h-full w-full",children:r.jsxRuntimeExports.jsx(To,{isModalView:!0,onSelect:n})})})]})},ba=({value:e,onChange:t,id:s,onBlur:o})=>r.jsxRuntimeExports.jsxs("div",{className:"mt-1.5 flex items-center gap-x-3",children:[e?r.jsxRuntimeExports.jsx("img",{src:e,className:"h-20 w-20 overflow-hidden rounded-md border object-cover",alt:""}):r.jsxRuntimeExports.jsx(xt,{onSelect:t,children:r.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"})}),r.jsxRuntimeExports.jsxs("div",{className:"flex w-3/5 flex-col",children:[r.jsxRuntimeExports.jsx(xt,{onSelect:t,children:r.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"})}),r.jsxRuntimeExports.jsx("small",{className:"-pl-4 pt-2 text-center text-xs text-gray-600",children:"OR"}),r.jsxRuntimeExports.jsx("input",{type:"url",className:"text-xs",placeholder:"Enter image URL",value:e,onBlur:({target:{value:n}})=>o(s,n),onChange:n=>t(n.target.value)})]})]}),va=({id:e,placeholder:t,value:s,onChange:o,onBlur:n})=>{const l={toolbar:[["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]},{align:[]}],["link","clean"]]},a=["header","font","list","bold","italic","underline","strike","blockquote","color","background","align","link","image"];return typeof window>"u"?null:r.jsxRuntimeExports.jsx(Sn,{id:e,value:s,onBlur:d=>n(e,d),onChange:d=>o(d),modules:l,formats:a,placeholder:t,className:"mt-1 rounded-md"})},ya=({schema:e,formData:t,onChange:s})=>{const[o,n]=k.useState([]),l=me("getPages",()=>[]),{type:a="page",href:d="",target:g="self"}=t;return k.useEffect(()=>{(async()=>{const c=await l();n(c||[])})()},[]),r.jsxRuntimeExports.jsxs("div",{children:[r.jsxRuntimeExports.jsx("span",{className:"text-xs font-medium",children:(e==null?void 0:e.title)??"Link"}),r.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-y-1.5",children:[r.jsxRuntimeExports.jsx("select",{name:"type",value:a,onChange:c=>s({...t,type:c.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(c=>r.jsxRuntimeExports.jsx("option",{value:c.const,children:c.title},c.const))}),a==="page"?r.jsxRuntimeExports.jsxs("select",{name:"href",placeholder:"Choose Page",value:d,onChange:c=>s({...t,href:c.target.value}),children:[r.jsxRuntimeExports.jsx("option",{value:"",children:"Choose page"}),i.map(o,c=>r.jsxRuntimeExports.jsx("option",{value:c.slug,children:c.name},c.uuid))]}):r.jsxRuntimeExports.jsx("input",{name:"href",type:"text",value:d,onChange:c=>s({...t,href:c.target.value}),placeholder:a==="page"||a==="url"?"Enter URL":a==="scroll"?"#ElementID":"Enter detail"}),(a==="page"||a==="url")&&r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2",children:[r.jsxRuntimeExports.jsx("input",{type:"checkbox",defaultChecked:g==="_blank",className:"cursor-pointer rounded-md border border-border",onChange:()=>s({...t,target:g==="_blank"?"_self":"_blank"})}),r.jsxRuntimeExports.jsx("span",{className:"pt-1 text-xs",children:"Open in new tab"})]})]})]})},ja=()=>{const[e]=de(),[,t]=be(),{addBlocks:s}=ne(),{toast:o}=rt(),n=k.useCallback((a,d,g)=>{var N;for(let I=0;I<a.length;I++){const{_id:D}=a[I];a[I]._id=se.generateUUID();const q=i.filter(a,{_parent:D});for(let $=0;$<q.length;$++)q[$]._parent=a[I]._id}const c=i.first(a);let x,v;return d&&(x=i.find(e,{_id:d}),a[0]._parent=d,v=d),!(x?Oe(x._type,c._type):!0)&&x&&(a[0]._parent=x._parent,v=x._parent),s(a,v,g),t([(N=i.first(a))==null?void 0:N._id]),i.first(a)},[e,t]);return{addCoreBlock:k.useCallback((a,d,g)=>{if(i.has(a,"blocks")){const $=a.blocks;return n($,d,g)}const c=se.generateUUID(),x=It(a.props),v=[];i.forIn(x,($,G)=>{if(i.startsWith($,W.SLOT_KEY)){const V=$.replace(W.SLOT_KEY,"");v.push({_id:V,_type:"Slot",_parent:c,_name:a.props[G].name,_styles:a.props[G].styles,_emptyStyles:a.props[G].emptyStyles})}});const R={_type:a.type,_id:c,...x};let N,I;if(d&&(N=i.find(e,{_id:d}),R._parent=d,I=d),!Yn(N==null?void 0:N._type,a.type)){o({variant:"destructive",title:"Error",description:`"${a.type}" cannot be added under "${N?N==null?void 0:N._type:"root"}"`}),t([]);return}!(N?Oe(N._type,a.type):!0)&&N&&(R._parent=N._parent,I=N._parent);const q=[R,...v];return s(q,I,g),t([R._id]),R},[n,e,t]),addPredefinedBlock:n}},gt={xs:420,sm:620,md:768,lg:1024,xl:1280,"2xl":1536},ht=["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",n=ht.indexOf(s);for(;n>0;){const l=ht[n-1];if(i.find(e,{mq:l,property:t.property})){o="classes";break}n--}return o}const bt=[];function Ra(e="",t="",s=[]){e=e.trim().replace(/ +/g,"");let o=i.filter(i.map(e.split(" "),u.constructClassObject),c=>!i.isNull(c)),n=i.filter(i.map(t.split(" "),u.constructClassObject),c=>!i.isNull(c));n=i.filter(n,c=>!i.includes(bt,c.property));const l=[],a=[];i.each(s,c=>{const x=u.constructClassObject(c),v=i.find(o,i.pick(x,["dark","mq","mod","property"]));if(v&&(o=i.filter(o,R=>R.fullCls!==(v==null?void 0:v.fullCls))),l.push(x),x.mq==="xs"&&!x.dark&&x.mod===""&&(n=i.filter(n,R=>R.property!==x.property)),wa(o,x)==="baseClasses"&&!i.includes(bt,x.property)){const R=i.find(n,i.pick(x,["property"]));v&&(n=i.filter(n,N=>N.fullCls!==(R==null?void 0:R.fullCls))),a.push({...x,fullCls:x.cls,mq:"xs"})}});const d=i.map(i.sortBy([...o,...l],c=>gt[c.mq]),"fullCls").join(" ");return`${i.map(i.sortBy([...n,...a],c=>gt[c.mq]),"fullCls").join(" ").trim()},${d.trim()}`.trim().replace(/ +/g,"")}const ve=p.atom([]);ve.debugLabel="selectedStylingBlocksAtom";const Po=()=>p.useAtom(ve),ka=e=>{const t=e.replace(W.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}},Na=p.atom(null,(e,t,{blockIds:s,newClasses:o})=>{const n=i.filter(e($e),a=>s.includes(e(a)._id)),l=i.first(e(ve));return i.map(n,a=>{const d=e(a),g=i.get(d,l.prop,`${W.STYLES_KEY},`),{baseClasses:c,classes:x}=ka(g);return{ids:[d._id],props:{[l.prop]:`${W.STYLES_KEY}${Ra(x,c,o)}`}}})}),Sa=()=>{const e=p.useSetAtom(Na),{updateBlocks:t,updateBlocksRuntime:s}=ne();return k.useCallback((o,n,l=!1)=>{const a=e({blockIds:o,newClasses:n});if(!l){s(o,a[0].props);return}t(o,a[0].props)},[e])},Io=()=>p.useAtom(Pt),Mo=fe("canvasWidth",800),Do=p.atom(e=>{const t=e(Mo);return se.getBreakpointValue(t).toLowerCase()}),Ca=()=>{const[e,t]=p.useAtom(Mo),s=p.useAtomValue(Do),[o,n]=Io();return k.useEffect(()=>{o!=="xs"&&n(s)},[s,o,n]),[e,s,t]},Ea=fe("canvasZoom",100),Aa=()=>p.useAtom(Ea),Oo=p.atom([]),Lo=()=>{const[e,t]=p.useAtom(Oo),s=p.useSetAtom(it),o=k.useCallback(n=>{t(n),s([])},[t,s]);return[e,o]},it=p.atom([]),_a=()=>{const[e,t]=p.useAtom(it),s=p.useSetAtom(Oo),o=k.useCallback(n=>{t(n),s([])},[t,s]);return[e,o]},zo=fe("darkMode",!1),Ba=()=>{const[e,t]=p.useAtom(zo);return[e,t]},fi=new yt({children:"children",id:"_id",parent:"_parent",options:{deleteParent:!1}});function Vo(e,t,s){const o=i.filter(e,l=>l._parent===t),n=[];for(let l=0;l<o.length;l++){const a=Fo(o[l]);if(Object.keys(a).length>0&&Object.keys(a).forEach(d=>{o[l][d]=`slot:${se.generateUUID()}`}),i.filter(e,{_parent:o[l]._id}).length>0){const d=se.generateUUID();n.push({...o[l],oldId:o[l]._id,_id:d,_parent:s}),n.push(i.flatten(Vo(e,o[l]._id,d)))}else n.push({...o[l],oldId:o[l]._id,_id:se.generateUUID(),_parent:s})}return i.flatten(n)}const Fo=e=>{const t={};return Object.keys(e).forEach(s=>{i.isString(e[s])&&e[s].startsWith("slot")&&(t[s]=e[s].replace("slot:",""))}),t},Ta=(e,t,s=null)=>{let o=i.find(e,{_id:t});o={...o,oldId:o._id,_id:se.generateUUID()},s&&(o={...o,_parent:s});const n=[o];i.filter(e,{_parent:t}).length>0&&n.push(i.flatten(Vo(e,t,o._id)));const l=i.flatten(n);return i.map(l,a=>{const d=a,g=Fo(d);return Object.keys(g).length>0&&Object.keys(g).forEach(c=>{const x=i.find(l,{oldId:g[c].replace("slot:","")});d[c]=`slot:${x._id}`}),i.omit(d,["global","oldId"])})};const Uo=()=>{const[e]=de(),[,t]=be(),{addBlocks:s}=ne();return k.useCallback((o,n=null)=>{const l=[];i.each(o,a=>{const d=e.find(R=>R._id===a);n||(n=d._parent);const x=i.filter(e,R=>i.isString(n)?R._parent===n:!d._parent).indexOf(d)+1,v=Ta(e,a,n);s(v,n,x),l.push(i.get(v,"0._id",""))}),t(l)},[e,t])},Pa=p.atom([]),Ia=()=>{const[e,t]=p.useAtom(Pa),s=k.useCallback(o=>{t(n=>i.includes(n,o)?i.without(n,o):[...n,o])},[t]);return[e,t,s]},Ma=p.atom(""),qo=()=>p.useAtom(Ma),Da=()=>{const e=p.useAtomValue(oe);return k.useCallback((t,s)=>{const o=i.map(e,n=>(i.includes(t,i.get(n,"_id"))&&i.set(n,"_parent",s),n));console.log("newBlocks",o)},[e])},Oa=()=>{console.warn("usePasteBlocks is not implemented");const e=p.useAtomValue(it),[t,s]=Lo(),o=Uo(),n=Da();return{canPaste:k.useMemo(()=>t.length>0||e.length>0,[e,t]),pasteBlocks:k.useCallback(a=>{i.isEmpty(e)?n(t,a):o(e,a),s(()=>[])},[t,e,o,n,s])}},La=p.atom(!1),za=()=>{const[e,t]=p.useAtom(La);return[e,t]},Va=p.atom(null,(e,t,{blockIds:s,fullClasses:o})=>{const n=i.first(e(ve)),l=i.filter(e($e),a=>s.includes(e(a)._id));return i.map(l,a=>{const d=e(a),g=o;let{classes:c,baseClasses:x}=Hn(i.get(d,n.prop,"styles:,"));return i.each(g,v=>{const R=new RegExp(`(^| )${v.replace("[","\\[").replace("]","\\]")}($| )`,"g");c=c.replace(R," ").replace(/ +/g," ").trim();const N=i.first(v.split(":"));i.includes(["2xl","xl","lg","md","sm"],N)&&g.push(v.split(":").pop().trim())}),i.each(g,v=>{const R=new RegExp(`(^| )${v.replace("[","\\[").replace("]","\\]")}($| )`,"g");x=x.replace(R," ").replace(/ +/g," ").trim()}),{ids:[d._id],props:{[n.prop]:`${W.STYLES_KEY}${x},${c}`}}})}),Fa=()=>{const{updateBlocks:e}=ne(),t=p.useSetAtom(Va);return k.useCallback((s,o)=>{const n=t({blockIds:s,fullClasses:o});e(s,n[0].props)},[t])},$o=p.atom(e=>{const t=i.first(e(ve)),s=e(He);if(!t||t.blockId!==i.get(s,"_id",null))return[];const n=i.get(s,t.prop,`${W.STYLES_KEY},`).replace(W.STYLES_KEY,"").split(",").join(" ");return i.filter(i.map(n.trim().split(" "),u.constructClassObject),l=>!i.isNull(l))}),Ua=()=>p.useAtomValue($o),vt={xs:0,sm:1,md:2,lg:3,xl:4,"2xl":5},qa=p.atom(e=>{const t=e(Do),s=e(Ye),o=e(zo),n=$a(t);let l=i.filter(e($o),{mod:s});return i.startsWith(s,"_")||(l=i.filter(l,a=>n.includes(a.mq))),l=l.sort((a,d)=>vt[a.mq]-vt[d.mq]),o||(l=i.filter(l,{dark:!1})),l}),$a=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},Ga=()=>p.useAtomValue(qa),Wa=()=>p.useAtom(Ye),Ha=()=>{const{updateBlocks:e}=ne();return k.useCallback((t,s,o)=>{e(t,s,o)},[e])},Ya=()=>{const{updateBlocksRuntime:e}=ne();return k.useCallback((t,s)=>{e(t,s)},[e])},Go={name:"",props:{},modalProps:{},backdropClose:!0},Ka=p.atom(Go),Ja=()=>{const[e,t]=p.useAtom(Ka),s=k.useCallback((n,l={},a={})=>{t({name:n,props:l,modalProps:a})},[t]),o=k.useCallback((...n)=>{i.get(e,"props.onClose",()=>{})(...n),t(Go)},[t,e]);return{activeModal:e,openModal:s,closeModal:o}},Qa=()=>(console.warn("useAllBlocks is deprecated, use useBlocksStore() instead"),p.useAtomValue(oe)),Wo=p.atom(!1);Wo.debugLabel="readOnlyModeAtom";const Ho=p.atom(!1);Ho.debugLabel="advanceStylingOpenAtom";const Yo=p.atom("online");Yo.debugLabel="networkModeAtom";const Xa=p.atom(!1);Xa.debugLabel="codeEditorOpenAtom";const Ko=p.atom(!1);Ko.debugLabel="editLayerNameAtom";const Za=p.atom("");Za.debugLabel="activeLanguageAtom";const ei=p.atom("");ei.debugLabel="primaryLanguageAtom";const Jo=p.atom(null);Jo.debugLabel="canvasIframeAtom";const Qo=p.atom("outline");Qo.debugLabel="activePanelAtom";const Xo=p.atom("");Xo.debugLabel="showPredefinedBlockCategoryAtom";const Zo=p.atom({undoCount:0,redoCount:0});Zo.debugLabel="historyStatesAtom";const en=p.atom("");en.debugLabel="inlineEditingActiveAtom";const tn=p.atom(!1);tn.debugLabel="draggingFlagAtom";const sn=p.atom("");sn.debugLabel="draggedBlockIdAtom";const ti=()=>p.useAtomValue(Wo),si=p.atom(""),oi=p.atom(null),ni=()=>p.useAtom(si),ri=()=>p.useAtom(oi),ai=fe("selectedBreakpoints",["XS","MD","XL"]),ii=()=>{const[e,t]=p.useAtom(ai);return[e,t]},li=()=>{const e=p.useSetAtom(Zo),{clear:t}=et(),[,s]=be(),[,o]=qo(),[,n]=Po();return()=>{s([]),n([]),o(""),t(),e({undoCount:0,redoCount:0})}},ci=p.atom([]),di=()=>{const[e,t]=k.useState(!1),[s,o]=p.useAtom(ci),n=me("getUILibraryBlocks",()=>[]);return k.useEffect(()=>{(async()=>s.length>0||(t(!0),o(await n()),t(!1)))()},[]),{data:s,isLoading:e}},ui=()=>{const[e,t]=k.useState(null),s=k.useCallback(async o=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(o),t(o),!0}catch(n){return console.warn("Copy failed",n),t(null),!1}},[]);return[e,s]};exports.Accordion=yr;exports.AccordionContent=Yt;exports.AccordionItem=Wt;exports.AccordionTrigger=Ht;exports.Alert=Kt;exports.AlertDescription=Qt;exports.AlertDialog=Rr;exports.AlertDialogAction=as;exports.AlertDialogCancel=is;exports.AlertDialogContent=ts;exports.AlertDialogDescription=rs;exports.AlertDialogFooter=os;exports.AlertDialogHeader=ss;exports.AlertDialogTitle=ns;exports.AlertDialogTrigger=kr;exports.AlertTitle=Jt;exports.Badge=wr;exports.Button=Gt;exports.Card=xs;exports.CardContent=vs;exports.CardDescription=bs;exports.CardFooter=ys;exports.CardHeader=gs;exports.CardTitle=hs;exports.Command=at;exports.CommandDialog=aa;exports.CommandEmpty=bo;exports.CommandGroup=vo;exports.CommandInput=go;exports.CommandItem=jo;exports.CommandList=ho;exports.CommandSeparator=yo;exports.CommandShortcut=wo;exports.ContextMenu=ia;exports.ContextMenuCheckboxItem=Co;exports.ContextMenuContent=No;exports.ContextMenuGroup=ca;exports.ContextMenuItem=So;exports.ContextMenuLabel=Ao;exports.ContextMenuPortal=da;exports.ContextMenuRadioGroup=ma;exports.ContextMenuRadioItem=Eo;exports.ContextMenuSeparator=_o;exports.ContextMenuShortcut=Bo;exports.ContextMenuSub=ua;exports.ContextMenuSubContent=ko;exports.ContextMenuSubTrigger=Ro;exports.ContextMenuTrigger=la;exports.Dialog=st;exports.DialogContent=_e;exports.DialogDescription=fs;exports.DialogFooter=ms;exports.DialogHeader=us;exports.DialogTitle=ps;exports.DialogTrigger=ls;exports.DropdownMenu=Wr;exports.DropdownMenuCheckboxItem=so;exports.DropdownMenuContent=eo;exports.DropdownMenuGroup=Yr;exports.DropdownMenuItem=to;exports.DropdownMenuLabel=no;exports.DropdownMenuPortal=Kr;exports.DropdownMenuRadioGroup=Qr;exports.DropdownMenuRadioItem=oo;exports.DropdownMenuSeparator=ro;exports.DropdownMenuShortcut=ao;exports.DropdownMenuSub=Jr;exports.DropdownMenuSubContent=Zs;exports.DropdownMenuSubTrigger=Xs;exports.DropdownMenuTrigger=Hr;exports.HoverCard=Or;exports.HoverCardContent=zs;exports.HoverCardTrigger=Lr;exports.IconPickerField=fa;exports.ImagePickerField=ba;exports.ImagesPanel=ha;exports.Input=js;exports.Label=ws;exports.LinkField=ya;exports.Menubar=Es;exports.MenubarCheckboxItem=Is;exports.MenubarContent=Ts;exports.MenubarGroup=Pr;exports.MenubarItem=Ps;exports.MenubarLabel=Ds;exports.MenubarMenu=Tr;exports.MenubarPortal=Ir;exports.MenubarRadioGroup=Dr;exports.MenubarRadioItem=Ms;exports.MenubarSeparator=Os;exports.MenubarShortcut=Ls;exports.MenubarSub=Mr;exports.MenubarSubContent=Bs;exports.MenubarSubTrigger=_s;exports.MenubarTrigger=As;exports.Popover=_r;exports.PopoverContent=Cs;exports.PopoverTrigger=Br;exports.RichTextEditorField=va;exports.ScrollArea=ks;exports.ScrollBar=ot;exports.Select=zr;exports.SelectContent=Fs;exports.SelectGroup=Vr;exports.SelectItem=qs;exports.SelectLabel=Us;exports.SelectSeparator=$s;exports.SelectTrigger=Vs;exports.SelectValue=Fr;exports.Separator=io;exports.Sheet=Ur;exports.SheetClose=$r;exports.SheetContent=Hs;exports.SheetDescription=Qs;exports.SheetFooter=Ks;exports.SheetHeader=Ys;exports.SheetTitle=Js;exports.SheetTrigger=qr;exports.Skeleton=ra;exports.Switch=$t;exports.Tabs=Ns;exports.TabsContent=Ne;exports.TabsList=nt;exports.TabsTrigger=ke;exports.Textarea=Rs;exports.Toaster=na;exports.Toggle=qt;exports.Tooltip=Er;exports.TooltipContent=Ss;exports.TooltipPortal=Sr;exports.TooltipProvider=Cr;exports.TooltipTrigger=Ar;exports.activePanelAtom=Qo;exports.advanceStylingOpenAtom=Ho;exports.atom=X;exports.atomWithDefault=Un;exports.atomWithStorage=fe;exports.badgeVariants=Xt;exports.buttonVariants=Ae;exports.canDeleteBlock=Jn;exports.canDropBlock=Qn;exports.canDuplicateBlock=Kn;exports.canvasIframeAtom=Jo;exports.chaiBuilderPropsAtom=qe;exports.chaiExternalDataAtom=At;exports.createStore=Nt;exports.dataProvidersAtom=Ze;exports.draggedBlockIdAtom=sn;exports.draggingFlagAtom=tn;exports.editLayerNameAtom=Ko;exports.getBlockJSONFromSchemas=ze;exports.getBlockJSONFromUISchemas=Le;exports.inlineEditingActiveAtom=en;exports.isDevelopment=Wn;exports.networkModeAtom=Yo;exports.pageSyncStateAtom=Ee;exports.presentBlocksAtom=oe;exports.reducer=lo;exports.showPredefinedBlockCategoryAtom=Xo;exports.toast=co;exports.toggleVariants=Ut;exports.useActiveModal=Ja;exports.useActivePanel=ni;exports.useAddBlock=ja;exports.useAddBlockParent=ri;exports.useAddClassesToBlocks=Sa;exports.useAllBlocks=Qa;exports.useAtom=Dn;exports.useAtomValue=St;exports.useBlocksContainer=ur;exports.useBlocksStore=de;exports.useBlocksStoreUndoableActions=ne;exports.useBrandingOptions=Je;exports.useBuilderProp=me;exports.useBuilderReset=li;exports.useCanvasWidth=Ca;exports.useCanvasZoom=Aa;exports.useCopyBlockIds=_a;exports.useCopyToClipboard=ui;exports.useCurrentPage=Mt;exports.useCutBlockIds=Lo;exports.useDarkMode=Ba;exports.useDuplicateBlocks=Uo;exports.useGetPageData=Vt;exports.useHiddenBlockIds=Ia;exports.useHighlightBlockId=qo;exports.usePageDataProviders=Ft;exports.usePasteBlocks=Oa;exports.usePreviewMode=za;exports.useReadOnlyMode=ti;exports.useRemoveBlocks=hr;exports.useRemoveClassesFromBlocks=Fa;exports.useSavePage=gr;exports.useSelectedBlock=nr;exports.useSelectedBlockAllClasses=Ua;exports.useSelectedBlockCurrentClasses=Ga;exports.useSelectedBlockIds=be;exports.useSelectedBlocksDisplayChild=or;exports.useSelectedBreakpoints=ii;exports.useSelectedStylingBlocks=Po;exports.useSetAtom=Ct;exports.useStore=Fe;exports.useStylingBreakpoint=Io;exports.useStylingState=Wa;exports.useToast=rt;exports.useUILibraryBlocks=di;exports.useUndoManager=et;exports.useUpdateBlocksProps=Ha;exports.useUpdateBlocksPropsRealtime=Ya;