@chaibuilder/sdk 2.0.0-beta.8 → 2.0.0-beta.80

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 (54) hide show
  1. package/README.md +1 -3
  2. package/dist/ChaiThemeFn-Cort9tch.js +201 -0
  3. package/dist/ChaiThemeFn-DQu-2Eh9.cjs +13 -0
  4. package/dist/CodeEditor-B2x4yruH.cjs +1 -0
  5. package/dist/CodeEditor-VcQsGvTM.js +65 -0
  6. package/dist/Topbar-BQsjWb-A.js +16 -0
  7. package/dist/Topbar-DEw_kBMz.cjs +1 -0
  8. package/dist/chaibuilder-logo.png +0 -0
  9. package/dist/context-menu-C4lLV8gP.cjs +1 -0
  10. package/dist/{context-menu-I8woggB3.js → context-menu-D5ViOi6K.js} +260 -263
  11. package/dist/core.cjs +61 -1
  12. package/dist/core.d.ts +123 -54
  13. package/dist/core.js +8856 -123
  14. package/dist/getSplitClasses-DodqA_KW.cjs +1 -0
  15. package/dist/getSplitClasses-DphwgQiE.js +48 -0
  16. package/dist/{iconBase-Ief2hJUZ.js → iconBase-DHfFLkem.js} +6 -12
  17. package/dist/mockServiceWorker.js +39 -24
  18. package/dist/plugin-2xcljWGM.cjs +1 -0
  19. package/dist/plugin-kUMxtQR5.js +24 -0
  20. package/dist/render.cjs +2 -2
  21. package/dist/render.d.ts +41 -16
  22. package/dist/render.js +166 -139
  23. package/dist/runtime.cjs +1 -1
  24. package/dist/runtime.d.ts +6 -1
  25. package/dist/runtime.js +0 -20
  26. package/dist/{style.css → sdk.css} +1 -1
  27. package/dist/tailwind.cjs +1 -1
  28. package/dist/tailwind.d.ts +37 -26
  29. package/dist/tailwind.js +8 -10
  30. package/dist/ui.cjs +1 -1
  31. package/dist/ui.d.ts +12 -51
  32. package/dist/ui.js +210 -367
  33. package/dist/web-blocks.cjs +2 -2
  34. package/dist/web-blocks.d.ts +6 -0
  35. package/dist/web-blocks.js +1230 -813
  36. package/package.json +135 -132
  37. package/dist/CodeEditor-BUKZyPNe.js +0 -127
  38. package/dist/CodeEditor-RngMJDM5.cjs +0 -1
  39. package/dist/STRINGS-Xxstm-7I.js +0 -7
  40. package/dist/STRINGS-Yl7cSWDc.cjs +0 -1
  41. package/dist/Topbar-34AjGxOm.js +0 -161
  42. package/dist/Topbar-s6yma9af.cjs +0 -1
  43. package/dist/context-menu-0lRey9QY.cjs +0 -1
  44. package/dist/controls-lEwMTdPQ.js +0 -234
  45. package/dist/controls-p9IwFnPx.cjs +0 -1
  46. package/dist/index-IE-FmPVl.cjs +0 -61
  47. package/dist/index-eXQ8lngR.js +0 -8554
  48. package/dist/jsx-runtime-JYMCiFoE.cjs +0 -27
  49. package/dist/jsx-runtime-Sp0orL4X.js +0 -631
  50. package/dist/plugin-UiUFs2fK.js +0 -44
  51. package/dist/plugin-f6SDZ_Or.js +0 -108
  52. package/dist/plugin-jum1MjXp.cjs +0 -1
  53. package/dist/plugin-xOpS-UNV.cjs +0 -1
  54. /package/dist/{iconBase-aZzpqff_.cjs → iconBase-Cn2BsTrq.cjs} +0 -0
package/README.md CHANGED
@@ -4,9 +4,7 @@ Chai Builder is an Open Source Low Code React + Tailwind CSS Visual Builder.
4
4
  It allows you to create web pages visually by dragging and dropping elements onto the canvas.
5
5
  It is a simple React component that renders a full-fledged visual builder into any React application.
6
6
 
7
- #### [View Demo](https://chaibuilder.com/demos/web)
8
- #### [Documentation](https://chaibuilder.com/docs/sdk/introduction)
9
- #### [API References](https://api-reference.chaibuilder.com)
7
+ Demo: https://chaibuilder-sdk.vercel.app/
10
8
 
11
9
  ---
12
10
 
@@ -0,0 +1,201 @@
1
+ import { isEmpty as $, uniq as b, keys as _, flatten as v } from "lodash-es";
2
+ function P(e) {
3
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
+ }
5
+ const k = {
6
+ fontFamily: {
7
+ "font-heading": "Inter",
8
+ "font-body": "Inter"
9
+ },
10
+ borderRadius: "10px",
11
+ colors: [
12
+ {
13
+ group: "Body",
14
+ items: {
15
+ background: ["#FFFFFF", "#121212"],
16
+ foreground: ["#121212", "#FFFFFF"]
17
+ }
18
+ },
19
+ {
20
+ group: "Primary",
21
+ items: {
22
+ primary: ["#2563EB", "#3B82F6"],
23
+ "primary-foreground": ["#FFFFFF", "#FFFFFF"]
24
+ }
25
+ },
26
+ {
27
+ group: "Secondary",
28
+ items: {
29
+ secondary: ["#F3F4F6", "#374151"],
30
+ "secondary-foreground": ["#1F2937", "#F9FAFB"]
31
+ }
32
+ },
33
+ {
34
+ group: "Border, Input & Ring",
35
+ items: {
36
+ border: ["#E5E7EB", "#374151"],
37
+ input: ["#E5E7EB", "#374151"],
38
+ ring: ["#2563EB", "#3B82F6"]
39
+ }
40
+ },
41
+ {
42
+ group: "Card",
43
+ items: {
44
+ card: ["#FFFFFF", "#1F2937"],
45
+ "card-foreground": ["#121212", "#FFFFFF"]
46
+ }
47
+ },
48
+ {
49
+ group: "Popover",
50
+ items: {
51
+ popover: ["#FFFFFF", "#1F2937"],
52
+ "popover-foreground": ["#121212", "#FFFFFF"]
53
+ }
54
+ },
55
+ {
56
+ group: "Muted",
57
+ items: {
58
+ muted: ["#F3F4F6", "#374151"],
59
+ "muted-foreground": ["#6B7280", "#9CA3AF"]
60
+ }
61
+ },
62
+ {
63
+ group: "Accent",
64
+ items: {
65
+ accent: ["#F3F4F6", "#374151"],
66
+ "accent-foreground": ["#1F2937", "#FFFFFF"]
67
+ }
68
+ },
69
+ {
70
+ group: "Destructive",
71
+ items: {
72
+ destructive: ["#DC2626", "#EF4444"],
73
+ "destructive-foreground": ["#FFFFFF", "#FFFFFF"]
74
+ }
75
+ }
76
+ ]
77
+ };
78
+ var l = {}, c = {}, p;
79
+ function j() {
80
+ return p || (p = 1, function(e) {
81
+ Object.defineProperty(e, "__esModule", {
82
+ value: !0
83
+ }), Object.defineProperty(e, "default", {
84
+ enumerable: !0,
85
+ get: function() {
86
+ return r;
87
+ }
88
+ });
89
+ function n(t, o) {
90
+ return {
91
+ handler: t,
92
+ config: o
93
+ };
94
+ }
95
+ n.withOptions = function(t, o = () => ({})) {
96
+ const u = function(a) {
97
+ return {
98
+ __options: a,
99
+ handler: t(a),
100
+ config: o(a)
101
+ };
102
+ };
103
+ return u.__isOptionsFunction = !0, u.__pluginFunction = t, u.__configFunction = o, u;
104
+ };
105
+ const r = n;
106
+ }(c)), c;
107
+ }
108
+ var g;
109
+ function C() {
110
+ return g || (g = 1, function(e) {
111
+ Object.defineProperty(e, "__esModule", {
112
+ value: !0
113
+ }), Object.defineProperty(e, "default", {
114
+ enumerable: !0,
115
+ get: function() {
116
+ return t;
117
+ }
118
+ });
119
+ const n = /* @__PURE__ */ r(j());
120
+ function r(o) {
121
+ return o && o.__esModule ? o : {
122
+ default: o
123
+ };
124
+ }
125
+ const t = n.default;
126
+ }(l)), l;
127
+ }
128
+ var d, m;
129
+ function E() {
130
+ if (m) return d;
131
+ m = 1;
132
+ let e = C();
133
+ return d = (e.__esModule ? e : { default: e }).default, d;
134
+ }
135
+ var M = E();
136
+ const B = /* @__PURE__ */ P(M), R = (e) => ({
137
+ fontFamily: e.fontFamily ? _(e.fontFamily).reduce(
138
+ (r, t) => ({
139
+ ...r,
140
+ [t.replace("font-", "")]: `var(--${t})`
141
+ }),
142
+ {}
143
+ ) : {},
144
+ borderRadius: e.borderRadius ? {
145
+ lg: "var(--radius)",
146
+ md: "calc(var(--radius) - 2px)",
147
+ sm: "calc(var(--radius) - 4px)"
148
+ } : {},
149
+ colors: e.colors ? v(e.colors.map((r) => Object.entries(r.items))).reduce(
150
+ (r, [t]) => ({ ...r, [t]: `hsl(var(--${t}))` }),
151
+ {}
152
+ ) : {}
153
+ });
154
+ function y(e) {
155
+ const n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
156
+ let r = parseInt(n[1], 16), t = parseInt(n[2], 16), o = parseInt(n[3], 16);
157
+ r /= 255, t /= 255, o /= 255;
158
+ const u = Math.max(r, t, o), a = Math.min(r, t, o);
159
+ let s, F;
160
+ const f = (u + a) / 2;
161
+ if (u == a)
162
+ s = F = 0;
163
+ else {
164
+ const i = u - a;
165
+ switch (F = f > 0.5 ? i / (2 - u - a) : i / (u + a), u) {
166
+ case r:
167
+ s = (t - o) / i + (t < o ? 6 : 0);
168
+ break;
169
+ case t:
170
+ s = (o - r) / i + 2;
171
+ break;
172
+ case o:
173
+ s = (r - t) / i + 4;
174
+ break;
175
+ }
176
+ s /= 6;
177
+ }
178
+ return `${Math.round(s * 360)} ${Math.round(F * 100)}% ${Math.round(f * 100)}%`;
179
+ }
180
+ const q = (e) => `:root {
181
+ ${e.fontFamily && Object.entries(e.fontFamily).map(([n, r]) => `--font-${n}: "${r}";`).join(`
182
+ `)}
183
+ ${e.borderRadius && `--radius: ${e.borderRadius};`}
184
+ ${e.colors && Object.entries(e.colors).map(([n, r]) => `--${n}: ${y(r[0])};`).join(`
185
+ `)}
186
+ }
187
+ .dark {
188
+ ${e.colors && Object.entries(e.colors).map(([n, r]) => `--${n}: ${y(r[1])};`).join(`
189
+ `)}
190
+ }`, I = (e) => $(e.fontFamily) ? "" : b(Object.entries(e.fontFamily).map(([, r]) => r)).map((r) => `<link rel="stylesheet" href="${`https://fonts.googleapis.com/css2?family=${r.replace(/\s+/g, "+")}&display=swap`}">`).join(`
191
+ `), w = (e) => $(e.fontFamily) ? "" : b(Object.entries(e.fontFamily).map(([, r]) => r)).map((r) => `@import url("${`https://fonts.googleapis.com/css2?family=${r.replace(/\s+/g, "+")}&display=swap`}");`).join(`
192
+ `);
193
+ export {
194
+ q as a,
195
+ w as b,
196
+ I as c,
197
+ k as d,
198
+ P as e,
199
+ R as g,
200
+ B as p
201
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";const a=require("lodash-es");function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const _={fontFamily:{"font-heading":"Inter","font-body":"Inter"},borderRadius:"10px",colors:[{group:"Body",items:{background:["#FFFFFF","#121212"],foreground:["#121212","#FFFFFF"]}},{group:"Primary",items:{primary:["#2563EB","#3B82F6"],"primary-foreground":["#FFFFFF","#FFFFFF"]}},{group:"Secondary",items:{secondary:["#F3F4F6","#374151"],"secondary-foreground":["#1F2937","#F9FAFB"]}},{group:"Border, Input & Ring",items:{border:["#E5E7EB","#374151"],input:["#E5E7EB","#374151"],ring:["#2563EB","#3B82F6"]}},{group:"Card",items:{card:["#FFFFFF","#1F2937"],"card-foreground":["#121212","#FFFFFF"]}},{group:"Popover",items:{popover:["#FFFFFF","#1F2937"],"popover-foreground":["#121212","#FFFFFF"]}},{group:"Muted",items:{muted:["#F3F4F6","#374151"],"muted-foreground":["#6B7280","#9CA3AF"]}},{group:"Accent",items:{accent:["#F3F4F6","#374151"],"accent-foreground":["#1F2937","#FFFFFF"]}},{group:"Destructive",items:{destructive:["#DC2626","#EF4444"],"destructive-foreground":["#FFFFFF","#FFFFFF"]}}]};var c={},d={},p;function v(){return p||(p=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});function n(t,o){return{handler:t,config:o}}n.withOptions=function(t,o=()=>({})){const u=function(s){return{__options:s,handler:t(s),config:o(s)}};return u.__isOptionsFunction=!0,u.__pluginFunction=t,u.__configFunction=o,u};const r=n}(d)),d}var m;function P(){return m||(m=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});const n=r(v());function r(o){return o&&o.__esModule?o:{default:o}}const t=n.default}(c)),c}var f,y;function C(){if(y)return f;y=1;let e=P();return f=(e.__esModule?e:{default:e}).default,f}var j=C();const E=b(j),O=e=>({fontFamily:e.fontFamily?a.keys(e.fontFamily).reduce((r,t)=>({...r,[t.replace("font-","")]:`var(--${t})`}),{}):{},borderRadius:e.borderRadius?{lg:"var(--radius)",md:"calc(var(--radius) - 2px)",sm:"calc(var(--radius) - 4px)"}:{},colors:e.colors?a.flatten(e.colors.map(r=>Object.entries(r.items))).reduce((r,[t])=>({...r,[t]:`hsl(var(--${t}))`}),{}):{}});function $(e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);let r=parseInt(n[1],16),t=parseInt(n[2],16),o=parseInt(n[3],16);r/=255,t/=255,o/=255;const u=Math.max(r,t,o),s=Math.min(r,t,o);let i,l;const g=(u+s)/2;if(u==s)i=l=0;else{const F=u-s;switch(l=g>.5?F/(2-u-s):F/(u+s),u){case r:i=(t-o)/F+(t<o?6:0);break;case t:i=(o-r)/F+2;break;case o:i=(r-t)/F+4;break}i/=6}return`${Math.round(i*360)} ${Math.round(l*100)}% ${Math.round(g*100)}%`}const k=e=>`:root {
2
+ ${e.fontFamily&&Object.entries(e.fontFamily).map(([n,r])=>`--font-${n}: "${r}";`).join(`
3
+ `)}
4
+ ${e.borderRadius&&`--radius: ${e.borderRadius};`}
5
+ ${e.colors&&Object.entries(e.colors).map(([n,r])=>`--${n}: ${$(r[0])};`).join(`
6
+ `)}
7
+ }
8
+ .dark {
9
+ ${e.colors&&Object.entries(e.colors).map(([n,r])=>`--${n}: ${$(r[1])};`).join(`
10
+ `)}
11
+ }`,M=e=>a.isEmpty(e.fontFamily)?"":a.uniq(Object.entries(e.fontFamily).map(([,r])=>r)).map(r=>`<link rel="stylesheet" href="${`https://fonts.googleapis.com/css2?family=${r.replace(/\s+/g,"+")}&display=swap`}">`).join(`
12
+ `),h=e=>a.isEmpty(e.fontFamily)?"":a.uniq(Object.entries(e.fontFamily).map(([,r])=>r)).map(r=>`@import url("${`https://fonts.googleapis.com/css2?family=${r.replace(/\s+/g,"+")}&display=swap`}");`).join(`
13
+ `);exports.defaultThemeOptions=_;exports.getChaiThemeCssVariables=k;exports.getChaiThemeOptions=O;exports.getDefaultExportFromCjs=b;exports.getThemeFontsCSSImport=h;exports.getThemeFontsLinkMarkup=M;exports.plugin=E;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("@radix-ui/react-icons"),v=require("@react-hookz/web"),c=require("react"),j=require("react-i18next"),g=require("./context-menu-C4lLV8gP.cjs"),a=require("./core.cjs"),u=n=>{const s=document.createElement("div");return s.innerHTML=n,s.innerHTML};function y(){const{t:n}=j.useTranslation(),[s,x]=c.useState(!1),[r,m]=c.useState(""),[t,i]=a.useCodeEditor(),[d]=a.useSelectedBlockIds(),b=a.useUpdateBlocksProps(),f=a.useUpdateBlocksPropsRealtime(),h=v.useThrottledCallback(l=>{const o=u(l);f([t.blockId],{[t.blockProp]:o})},[],300),p=c.useCallback(()=>{if(s){const l=u(r);b([t.blockId],{[t.blockProp]:l})}},[s,r]);c.useEffect(()=>{d.includes(t==null?void 0:t.blockId)||(p(),i(null))},[d]);const k=()=>{i(null)};return e.jsxs("div",{className:"h-full text-white bg-black border-t-4 border-black rounded-t-lg",children:[e.jsx("button",{onClick:k,className:"fixed inset-0 z-[100000] cursor-default bg-gray-400/20"}),e.jsxs("div",{className:"relative z-[100001] h-full w-full flex-col gap-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-2 -mt-1",children:[e.jsxs("h3",{className:"space-x-3 text-sm font-semibold",children:[e.jsx("span",{children:n("HTML Code Editor |")}),e.jsx("span",{className:"text-xs text-gray-400",children:n("Scripts will be only executed in preview and live mode.")})]}),e.jsx("div",{className:"flex gap-x-2",children:e.jsx(g.Button,{onClick:()=>i(null),size:"sm",variant:"destructive",className:"h-6 w-fit",children:e.jsx(C.Cross2Icon,{})})})]}),e.jsx("textarea",{className:"w-full h-full p-2 font-mono text-xs bg-black text-white/90",value:r||t.initialCode,onChange:l=>{const o=l.target.value;x(!0),m(o),h(o)}})]})]})}exports.default=y;
@@ -0,0 +1,65 @@
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
+ import { Cross2Icon as k } from "@radix-ui/react-icons";
3
+ import { useThrottledCallback as C } from "@react-hookz/web";
4
+ import { useState as d, useCallback as v, useEffect as g } from "react";
5
+ import { useTranslation as N } from "react-i18next";
6
+ import { B as w } from "./context-menu-D5ViOi6K.js";
7
+ import { useCodeEditor as y, useSelectedBlockIds as T, useUpdateBlocksProps as B, useUpdateBlocksPropsRealtime as E } from "./core.js";
8
+ const u = (o) => {
9
+ const l = document.createElement("div");
10
+ return l.innerHTML = o, l.innerHTML;
11
+ };
12
+ function S() {
13
+ const { t: o } = N(), [l, m] = d(!1), [c, f] = d(""), [e, i] = y(), [r] = T(), p = B(), h = E(), x = C(
14
+ (s) => {
15
+ const n = u(s);
16
+ h([e.blockId], { [e.blockProp]: n });
17
+ },
18
+ [],
19
+ 300
20
+ ), b = v(() => {
21
+ if (l) {
22
+ const s = u(c);
23
+ p([e.blockId], { [e.blockProp]: s });
24
+ }
25
+ }, [l, c]);
26
+ return g(() => {
27
+ r.includes(e == null ? void 0 : e.blockId) || (b(), i(null));
28
+ }, [r]), /* @__PURE__ */ a("div", { className: "h-full text-white bg-black border-t-4 border-black rounded-t-lg", children: [
29
+ /* @__PURE__ */ t("button", { onClick: () => {
30
+ i(null);
31
+ }, className: "fixed inset-0 z-[100000] cursor-default bg-gray-400/20" }),
32
+ /* @__PURE__ */ a("div", { className: "relative z-[100001] h-full w-full flex-col gap-y-1", children: [
33
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between px-2 py-2 -mt-1", children: [
34
+ /* @__PURE__ */ a("h3", { className: "space-x-3 text-sm font-semibold", children: [
35
+ /* @__PURE__ */ t("span", { children: o("HTML Code Editor |") }),
36
+ /* @__PURE__ */ t("span", { className: "text-xs text-gray-400", children: o("Scripts will be only executed in preview and live mode.") })
37
+ ] }),
38
+ /* @__PURE__ */ t("div", { className: "flex gap-x-2", children: /* @__PURE__ */ t(
39
+ w,
40
+ {
41
+ onClick: () => i(null),
42
+ size: "sm",
43
+ variant: "destructive",
44
+ className: "h-6 w-fit",
45
+ children: /* @__PURE__ */ t(k, {})
46
+ }
47
+ ) })
48
+ ] }),
49
+ /* @__PURE__ */ t(
50
+ "textarea",
51
+ {
52
+ className: "w-full h-full p-2 font-mono text-xs bg-black text-white/90",
53
+ value: c || e.initialCode,
54
+ onChange: (s) => {
55
+ const n = s.target.value;
56
+ m(!0), f(n), x(n);
57
+ }
58
+ }
59
+ )
60
+ ] })
61
+ ] });
62
+ }
63
+ export {
64
+ S as default
65
+ };
@@ -0,0 +1,16 @@
1
+ import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
+ import { Suspense as n } from "react";
3
+ import { S as r } from "./context-menu-D5ViOi6K.js";
4
+ import "react-i18next";
5
+ import { useBuilderProp as a } from "./core.js";
6
+ const x = () => {
7
+ const c = a("topBarComponents.left", []), l = a("topBarComponents.center", []), o = a("topBarComponents.right", []);
8
+ return /* @__PURE__ */ m("div", { className: "flex h-14 items-center justify-between px-2", children: [
9
+ /* @__PURE__ */ e("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ e("div", { className: "flex items-center space-x-2 font-bold", children: c.map((s, t) => /* @__PURE__ */ e(n, { fallback: /* @__PURE__ */ e(r, { className: "h-10" }), children: /* @__PURE__ */ e(s, {}) }, `left-${t}`)) }) }),
10
+ /* @__PURE__ */ e("div", { className: "flex items-center space-x-2", children: l.map((s, t) => /* @__PURE__ */ e(n, { fallback: /* @__PURE__ */ e(r, { className: "h-10" }), children: /* @__PURE__ */ e(s, {}) }, `center-${t}`)) }),
11
+ /* @__PURE__ */ e("div", { className: "flex items-center space-x-1", children: o.map((s, t) => /* @__PURE__ */ e(n, { fallback: /* @__PURE__ */ e(r, { className: "h-10" }), children: /* @__PURE__ */ e(s, {}) }, `right-${t}`)) })
12
+ ] });
13
+ };
14
+ export {
15
+ x as default
16
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),r=require("./context-menu-C4lLV8gP.cjs");require("react-i18next");const c=require("./core.cjs"),i=()=>{const l=c.useBuilderProp("topBarComponents.left",[]),o=c.useBuilderProp("topBarComponents.center",[]),a=c.useBuilderProp("topBarComponents.right",[]);return e.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("div",{className:"flex items-center space-x-2 font-bold",children:l.map((s,t)=>e.jsx(n.Suspense,{fallback:e.jsx(r.Skeleton,{className:"h-10"}),children:e.jsx(s,{})},`left-${t}`))})}),e.jsx("div",{className:"flex items-center space-x-2",children:o.map((s,t)=>e.jsx(n.Suspense,{fallback:e.jsx(r.Skeleton,{className:"h-10"}),children:e.jsx(s,{})},`center-${t}`))}),e.jsx("div",{className:"flex items-center space-x-1",children:a.map((s,t)=>e.jsx(n.Suspense,{fallback:e.jsx(r.Skeleton,{className:"h-10"}),children:e.jsx(s,{})},`right-${t}`))})]})};exports.default=i;
Binary file
@@ -0,0 +1 @@
1
+ "use strict";const a=require("react/jsx-runtime"),Qe=require("@radix-ui/react-switch"),Xe=require("react"),Ye=require("@radix-ui/react-accordion"),f=require("@radix-ui/react-icons"),C=require("class-variance-authority"),Je=require("@radix-ui/react-alert-dialog"),Ke=require("@radix-ui/react-slot"),We=require("@radix-ui/react-dialog"),Ze=require("@radix-ui/react-label"),$e=require("@radix-ui/react-scroll-area"),et=require("@radix-ui/react-tabs"),tt=require("@radix-ui/react-tooltip"),ot=require("@radix-ui/react-popover"),at=require("@radix-ui/react-hover-card"),st=require("@radix-ui/react-dropdown-menu"),rt=require("@radix-ui/react-separator"),nt=require("@radix-ui/react-toast"),it=require("@radix-ui/react-context-menu"),dt=require("clsx"),lt=require("tailwind-merge");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const M=m(Qe),n=m(Xe),x=m(Ye),c=m(Je),u=m(We),I=m(Ze),g=m($e),b=m(et),v=m(tt),N=m(ot),j=m(at),i=m(st),k=m(rt),p=m(nt),d=m(it),s=(...e)=>lt.twMerge(dt.clsx(e)),_=n.forwardRef(({className:e,...t},o)=>a.jsx(M.Root,{className:s("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:o,children:a.jsx(M.Thumb,{className:s("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")})}));_.displayName=M.Root.displayName;const T=C.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"}}),z=n.forwardRef(({className:e,variant:t,size:o,asChild:r=!1,...l},D)=>{const Ue=r?Ke.Slot:"button";return a.jsx(Ue,{className:s(T({variant:t,size:o,className:e})),ref:D,...l})});z.displayName="Button";const ct=x.Root,O=n.forwardRef(({className:e,...t},o)=>a.jsx(x.Item,{ref:o,className:s("border-b",e),...t}));O.displayName="AccordionItem";const q=n.forwardRef(({className:e,children:t,...o},r)=>a.jsx(x.Header,{className:"flex",children:a.jsxs(x.Trigger,{ref:r,className:s("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o,children:[t,o.hideArrow?null:a.jsx(f.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));q.displayName=x.Trigger.displayName;const L=n.forwardRef(({className:e,children:t,...o},r)=>a.jsx(x.Content,{ref:r,className:s("text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...o,children:a.jsx("div",{className:"pb-4 pt-0",children:t})}));L.displayName=x.Content.displayName;const H=C.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"}}),mt=({className:e,variant:t,...o})=>a.jsx("div",{className:s(H({variant:t}),e),...o}),ut=c.Root,pt=c.Trigger,V=({className:e,...t})=>a.jsx(c.Portal,{className:s(e),...t});V.displayName=c.Portal.displayName;const E=n.forwardRef(({className:e,...t},o)=>a.jsx(c.Overlay,{className:s("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:o}));E.displayName=c.Overlay.displayName;const G=n.forwardRef(({className:e,...t},o)=>a.jsxs(V,{children:[a.jsx(E,{}),a.jsx(c.Content,{ref:o,className:s("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})]}));G.displayName=c.Content.displayName;const F=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col space-y-2 text-center sm:text-left",e),...t});F.displayName="AlertDialogHeader";const B=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});B.displayName="AlertDialogFooter";const U=n.forwardRef(({className:e,...t},o)=>a.jsx(c.Title,{ref:o,className:s("text-lg font-semibold",e),...t}));U.displayName=c.Title.displayName;const Q=n.forwardRef(({className:e,...t},o)=>a.jsx(c.Description,{ref:o,className:s("text-sm text-muted-foreground",e),...t}));Q.displayName=c.Description.displayName;const X=n.forwardRef(({className:e,...t},o)=>a.jsx(c.Action,{ref:o,className:s(T(),e),...t}));X.displayName=c.Action.displayName;const Y=n.forwardRef(({className:e,...t},o)=>a.jsx(c.Cancel,{ref:o,className:s(T({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Y.displayName=c.Cancel.displayName;const ft=u.Root,gt=u.Trigger,J=({className:e,...t})=>a.jsx(u.Portal,{className:s(e),...t});J.displayName=u.Portal.displayName;const K=n.forwardRef(({className:e,...t},o)=>a.jsx(u.Overlay,{ref:o,className:s("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}));K.displayName=u.Overlay.displayName;const W=n.forwardRef(({className:e,children:t,...o},r)=>a.jsxs(J,{children:[a.jsx(K,{}),a.jsxs(u.Content,{ref:r,className:s("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),...o,children:[t,a.jsxs(u.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:[a.jsx(f.Cross2Icon,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));W.displayName=u.Content.displayName;const Z=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Z.displayName="DialogHeader";const $=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$.displayName="DialogFooter";const ee=n.forwardRef(({className:e,...t},o)=>a.jsx(u.Title,{ref:o,className:s("text-lg font-semibold leading-none tracking-tight",e),...t}));ee.displayName=u.Title.displayName;const te=n.forwardRef(({className:e,...t},o)=>a.jsx(u.Description,{ref:o,className:s("text-sm text-muted-foreground",e),...t}));te.displayName=u.Description.displayName;const oe=n.forwardRef(({className:e,...t},o)=>a.jsx("div",{ref:o,className:s("rounded-xl border bg-card text-card-foreground shadow",e),...t}));oe.displayName="Card";const ae=n.forwardRef(({className:e,...t},o)=>a.jsx("div",{ref:o,className:s("flex flex-col space-y-1.5 p-6",e),...t}));ae.displayName="CardHeader";const se=n.forwardRef(({className:e,...t},o)=>a.jsx("h3",{ref:o,className:s("font-semibold leading-none tracking-tight",e),...t}));se.displayName="CardTitle";const re=n.forwardRef(({className:e,...t},o)=>a.jsx("p",{ref:o,className:s("text-sm text-muted-foreground",e),...t}));re.displayName="CardDescription";const ne=n.forwardRef(({className:e,...t},o)=>a.jsx("div",{ref:o,className:s("p-6 pt-0",e),...t}));ne.displayName="CardContent";const ie=n.forwardRef(({className:e,...t},o)=>a.jsx("div",{ref:o,className:s(" flex items-center p-6 pt-0",e),...t}));ie.displayName="CardFooter";const de=n.forwardRef(({className:e,type:t,...o},r)=>a.jsx("input",{type:t,className:s("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:r,...o,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));de.displayName="Input";const xt=C.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),le=n.forwardRef(({className:e,...t},o)=>a.jsx(I.Root,{ref:o,className:s(xt(),e),...t}));le.displayName=I.Root.displayName;const ce=n.forwardRef(({className:e,...t},o)=>a.jsx("textarea",{className:s("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:o,...t,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));ce.displayName="Textarea";const me=n.forwardRef(({className:e,children:t,...o},r)=>a.jsxs(g.Root,{ref:r,className:s("relative overflow-hidden",e),...o,children:[a.jsx(g.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(A,{}),a.jsx(g.Corner,{})]}));me.displayName=g.Root.displayName;const A=n.forwardRef(({className:e,orientation:t="vertical",...o},r)=>a.jsx(g.ScrollAreaScrollbar,{ref:r,orientation:t,className:s("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),...o,children:a.jsx(g.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));A.displayName=g.ScrollAreaScrollbar.displayName;const bt=b.Root,ue=n.forwardRef(({className:e,...t},o)=>a.jsx(b.List,{ref:o,className:s("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));ue.displayName=b.List.displayName;const pe=n.forwardRef(({className:e,...t},o)=>a.jsx(b.Trigger,{ref:o,className:s("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}));pe.displayName=b.Trigger.displayName;const fe=n.forwardRef(({className:e,...t},o)=>a.jsx(b.Content,{ref:o,className:s("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));fe.displayName=b.Content.displayName;const vt=v.Portal,yt=v.Provider,Nt=v.Root,ht=v.Trigger,ge=n.forwardRef(({className:e,sideOffset:t=4,...o},r)=>a.jsx(v.Content,{ref:r,sideOffset:t,className:s("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),...o}));ge.displayName=v.Content.displayName;const wt=N.Root,Ct=N.Trigger,xe=n.forwardRef(({className:e,align:t="center",sideOffset:o=4,...r},l)=>a.jsx(N.Portal,{children:a.jsx(N.Content,{ref:l,align:t,sideOffset:o,className:s("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),...r})}));xe.displayName=N.Content.displayName;const jt=j.Root,Tt=j.Trigger,be=n.forwardRef(({className:e,align:t="center",sideOffset:o=4,...r},l)=>a.jsx(j.Content,{ref:l,align:t,sideOffset:o,className:s("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),...r}));be.displayName=j.Content.displayName;const Dt=i.Root,Rt=i.Trigger,St=i.Group,Mt=i.Portal,At=i.Sub,Pt=i.RadioGroup,ve=n.forwardRef(({className:e,inset:t,children:o,...r},l)=>a.jsxs(i.SubTrigger,{ref:l,className:s("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),...r,children:[o,a.jsx(f.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));ve.displayName=i.SubTrigger.displayName;const ye=n.forwardRef(({className:e,...t},o)=>a.jsx(i.SubContent,{ref:o,className:s("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}));ye.displayName=i.SubContent.displayName;const Ne=n.forwardRef(({className:e,sideOffset:t=4,...o},r)=>a.jsx(i.Portal,{children:a.jsx(i.Content,{ref:r,sideOffset:t,className:s("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),...o})}));Ne.displayName=i.Content.displayName;const he=n.forwardRef(({className:e,inset:t,...o},r)=>a.jsx(i.Item,{ref:r,className:s("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),...o}));he.displayName=i.Item.displayName;const we=n.forwardRef(({className:e,children:t,checked:o,...r},l)=>a.jsxs(i.CheckboxItem,{ref:l,className:s("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:o,...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(i.ItemIndicator,{children:a.jsx(f.CheckIcon,{className:"h-4 w-4"})})}),t]}));we.displayName=i.CheckboxItem.displayName;const Ce=n.forwardRef(({className:e,children:t,...o},r)=>a.jsxs(i.RadioItem,{ref:r,className:s("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),...o,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(i.ItemIndicator,{children:a.jsx(f.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Ce.displayName=i.RadioItem.displayName;const je=n.forwardRef(({className:e,inset:t,...o},r)=>a.jsx(i.Label,{ref:r,className:s("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));je.displayName=i.Label.displayName;const Te=n.forwardRef(({className:e,...t},o)=>a.jsx(i.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));Te.displayName=i.Separator.displayName;const De=({className:e,...t})=>a.jsx("span",{className:s("ml-auto text-xs tracking-widest opacity-60",e),...t});De.displayName="DropdownMenuShortcut";const Re=n.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...r},l)=>a.jsx(k.Root,{ref:l,decorative:o,orientation:t,className:s("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Re.displayName=k.Root.displayName;const It=1,kt=1e6;let R=0;function _t(){return R=(R+1)%Number.MAX_VALUE,R.toString()}const S=new Map,P=e=>{if(S.has(e))return;const t=setTimeout(()=>{S.delete(e),y({type:"REMOVE_TOAST",toastId:e})},kt);S.set(e,t)},Se=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,It)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=t;return o?P(o):e.toasts.forEach(r=>{P(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===o||o===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)}}},h=[];let w={toasts:[]};function y(e){w=Se(w,e),h.forEach(t=>{t(w)})}function Me({...e}){const t=_t(),o=l=>y({type:"UPDATE_TOAST",toast:{...l,id:t}}),r=()=>y({type:"DISMISS_TOAST",toastId:t});return y({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:l=>{l||r()}}}),{id:t,dismiss:r,update:o}}function Ae(){const[e,t]=n.useState(w);return n.useEffect(()=>(h.push(t),()=>{const o=h.indexOf(t);o>-1&&h.splice(o,1)}),[e]),{...e,toast:Me,dismiss:o=>y({type:"DISMISS_TOAST",toastId:o})}}const zt=p.Provider,Pe=n.forwardRef(({className:e,...t},o)=>a.jsx(p.Viewport,{ref:o,className:s("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}));Pe.displayName=p.Viewport.displayName;const Ot=C.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"}}),Ie=n.forwardRef(({className:e,variant:t,...o},r)=>a.jsx(p.Root,{ref:r,className:s(Ot({variant:t}),e),...o}));Ie.displayName=p.Root.displayName;const qt=n.forwardRef(({className:e,...t},o)=>a.jsx(p.Action,{ref:o,className:s("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}));qt.displayName=p.Action.displayName;const ke=n.forwardRef(({className:e,...t},o)=>a.jsx(p.Close,{ref:o,className:s("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:a.jsx(f.Cross2Icon,{className:"h-4 w-4"})}));ke.displayName=p.Close.displayName;const _e=n.forwardRef(({className:e,...t},o)=>a.jsx(p.Title,{ref:o,className:s("text-sm font-semibold [&+div]:text-xs",e),...t}));_e.displayName=p.Title.displayName;const ze=n.forwardRef(({className:e,...t},o)=>a.jsx(p.Description,{ref:o,className:s("text-sm opacity-90",e),...t}));ze.displayName=p.Description.displayName;function Lt(){const{toasts:e}=Ae();return a.jsxs(zt,{children:[e.map(({id:t,title:o,description:r,action:l,...D})=>a.jsxs(Ie,{...D,children:[a.jsxs("div",{className:"grid gap-1",children:[o&&a.jsx(_e,{children:o}),r&&a.jsx(ze,{children:r})]}),l,a.jsx(ke,{})]},t)),a.jsx(Pe,{})]})}const Ht=({className:e,...t})=>a.jsx("div",{className:s("animate-pulse rounded-md bg-primary/10",e),...t}),Vt=d.Root,Et=d.Trigger,Gt=d.Group,Ft=d.Portal,Bt=d.Sub,Ut=d.RadioGroup,Oe=n.forwardRef(({className:e,inset:t,children:o,...r},l)=>a.jsxs(d.SubTrigger,{ref:l,className:s("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),...r,children:[o,a.jsx(f.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Oe.displayName=d.SubTrigger.displayName;const qe=n.forwardRef(({className:e,...t},o)=>a.jsx(d.SubContent,{ref:o,className:s("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}));qe.displayName=d.SubContent.displayName;const Le=n.forwardRef(({className:e,...t},o)=>a.jsx(d.Portal,{children:a.jsx(d.Content,{ref:o,className:s("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})}));Le.displayName=d.Content.displayName;const He=n.forwardRef(({className:e,inset:t,...o},r)=>a.jsx(d.Item,{ref:r,className:s("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),...o}));He.displayName=d.Item.displayName;const Ve=n.forwardRef(({className:e,children:t,checked:o,...r},l)=>a.jsxs(d.CheckboxItem,{ref:l,className:s("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:o,...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(d.ItemIndicator,{children:a.jsx(f.CheckIcon,{className:"h-4 w-4"})})}),t]}));Ve.displayName=d.CheckboxItem.displayName;const Ee=n.forwardRef(({className:e,children:t,...o},r)=>a.jsxs(d.RadioItem,{ref:r,className:s("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),...o,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(d.ItemIndicator,{children:a.jsx(f.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Ee.displayName=d.RadioItem.displayName;const Ge=n.forwardRef(({className:e,inset:t,...o},r)=>a.jsx(d.Label,{ref:r,className:s("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...o}));Ge.displayName=d.Label.displayName;const Fe=n.forwardRef(({className:e,...t},o)=>a.jsx(d.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-border",e),...t}));Fe.displayName=d.Separator.displayName;const Be=({className:e,...t})=>a.jsx("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Be.displayName="ContextMenuShortcut";exports.Accordion=ct;exports.AccordionContent=L;exports.AccordionItem=O;exports.AccordionTrigger=q;exports.AlertDialog=ut;exports.AlertDialogAction=X;exports.AlertDialogCancel=Y;exports.AlertDialogContent=G;exports.AlertDialogDescription=Q;exports.AlertDialogFooter=B;exports.AlertDialogHeader=F;exports.AlertDialogTitle=U;exports.AlertDialogTrigger=pt;exports.Badge=mt;exports.Button=z;exports.Card=oe;exports.CardContent=ne;exports.CardDescription=re;exports.CardFooter=ie;exports.CardHeader=ae;exports.CardTitle=se;exports.ContextMenu=Vt;exports.ContextMenuCheckboxItem=Ve;exports.ContextMenuContent=Le;exports.ContextMenuGroup=Gt;exports.ContextMenuItem=He;exports.ContextMenuLabel=Ge;exports.ContextMenuPortal=Ft;exports.ContextMenuRadioGroup=Ut;exports.ContextMenuRadioItem=Ee;exports.ContextMenuSeparator=Fe;exports.ContextMenuShortcut=Be;exports.ContextMenuSub=Bt;exports.ContextMenuSubContent=qe;exports.ContextMenuSubTrigger=Oe;exports.ContextMenuTrigger=Et;exports.Dialog=ft;exports.DialogContent=W;exports.DialogDescription=te;exports.DialogFooter=$;exports.DialogHeader=Z;exports.DialogTitle=ee;exports.DialogTrigger=gt;exports.DropdownMenu=Dt;exports.DropdownMenuCheckboxItem=we;exports.DropdownMenuContent=Ne;exports.DropdownMenuGroup=St;exports.DropdownMenuItem=he;exports.DropdownMenuLabel=je;exports.DropdownMenuPortal=Mt;exports.DropdownMenuRadioGroup=Pt;exports.DropdownMenuRadioItem=Ce;exports.DropdownMenuSeparator=Te;exports.DropdownMenuShortcut=De;exports.DropdownMenuSub=At;exports.DropdownMenuSubContent=ye;exports.DropdownMenuSubTrigger=ve;exports.DropdownMenuTrigger=Rt;exports.HoverCard=jt;exports.HoverCardContent=be;exports.HoverCardTrigger=Tt;exports.Input=de;exports.Label=le;exports.Popover=wt;exports.PopoverContent=xe;exports.PopoverTrigger=Ct;exports.ScrollArea=me;exports.ScrollBar=A;exports.Separator=Re;exports.Skeleton=Ht;exports.Switch=_;exports.Tabs=bt;exports.TabsContent=fe;exports.TabsList=ue;exports.TabsTrigger=pe;exports.Textarea=ce;exports.Toaster=Lt;exports.Tooltip=Nt;exports.TooltipContent=ge;exports.TooltipPortal=vt;exports.TooltipProvider=yt;exports.TooltipTrigger=ht;exports.badgeVariants=H;exports.buttonVariants=T;exports.cn=s;exports.reducer=Se;exports.toast=Me;exports.useToast=Ae;