@chaibuilder/sdk 2.0.0-beta.10 → 2.0.0-beta.102

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 (53) 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-BQTYQosF.cjs +1 -0
  5. package/dist/CodeEditor-DyWk02_x.js +65 -0
  6. package/dist/Topbar-BhwvnJJc.cjs +1 -0
  7. package/dist/Topbar-BuWEmzZG.js +16 -0
  8. package/dist/chaibuilder-logo.png +0 -0
  9. package/dist/context-menu-CeqJxblw.cjs +1 -0
  10. package/dist/context-menu-iqXuo9Yt.js +907 -0
  11. package/dist/core.cjs +7 -18
  12. package/dist/core.d.ts +79 -46
  13. package/dist/core.js +5564 -5309
  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 +194 -433
  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 +136 -132
  37. package/dist/CodeEditor-9qjIOTD0.js +0 -126
  38. package/dist/CodeEditor-pceepCns.cjs +0 -1
  39. package/dist/STRINGS-Xxstm-7I.js +0 -7
  40. package/dist/STRINGS-Yl7cSWDc.cjs +0 -1
  41. package/dist/Topbar-7bGqLcSJ.js +0 -73
  42. package/dist/Topbar-EXPx1Yg2.cjs +0 -1
  43. package/dist/context-menu-4nQs6OxC.cjs +0 -1
  44. package/dist/context-menu-oLipAPzI.js +0 -817
  45. package/dist/controls-lEwMTdPQ.js +0 -234
  46. package/dist/controls-p9IwFnPx.cjs +0 -1
  47. package/dist/jsx-runtime-JYMCiFoE.cjs +0 -27
  48. package/dist/jsx-runtime-Sp0orL4X.js +0 -631
  49. package/dist/plugin-Dm5EFGnP.cjs +0 -1
  50. package/dist/plugin-KIpT3NWi.cjs +0 -1
  51. package/dist/plugin-PFjzFeON.js +0 -97
  52. package/dist/plugin-ooqqxWRQ.js +0 -55
  53. /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-CeqJxblw.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-iqXuo9Yt.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 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),r=require("./context-menu-CeqJxblw.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;
@@ -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-iqXuo9Yt.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
+ };
Binary file
@@ -0,0 +1 @@
1
+ "use strict";const a=require("react/jsx-runtime"),ot=require("@radix-ui/react-switch"),at=require("react"),st=require("@radix-ui/react-accordion"),g=require("@radix-ui/react-icons"),j=require("class-variance-authority"),rt=require("@radix-ui/react-alert-dialog"),nt=require("@radix-ui/react-slot"),dt=require("@radix-ui/react-label"),it=require("@radix-ui/react-scroll-area"),lt=require("@radix-ui/react-tabs"),ct=require("@radix-ui/react-tooltip"),mt=require("@radix-ui/react-popover"),pt=require("@radix-ui/react-hover-card"),ut=require("@radix-ui/react-dropdown-menu"),ft=require("@radix-ui/react-separator"),gt=require("@radix-ui/react-toast"),p=require("cmdk"),xt=require("@radix-ui/react-dialog"),bt=require("@radix-ui/react-context-menu"),yt=require("clsx"),vt=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 n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const k=m(ot),r=m(at),b=m(st),c=m(rt),z=m(dt),x=m(it),y=m(lt),v=m(ct),h=m(mt),T=m(pt),d=m(ut),O=m(ft),f=m(gt),u=m(xt),i=m(bt),s=(...e)=>vt.twMerge(yt.clsx(e)),L=r.forwardRef(({className:e,...t},o)=>a.jsx(k.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(k.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")})}));L.displayName=k.Root.displayName;const D=j.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"}}),q=r.forwardRef(({className:e,variant:t,size:o,asChild:n=!1,...l},R)=>{const tt=n?nt.Slot:"button";return a.jsx(tt,{className:s(D({variant:t,size:o,className:e})),ref:R,...l})});q.displayName="Button";const Nt=b.Root,H=r.forwardRef(({className:e,...t},o)=>a.jsx(b.Item,{ref:o,className:s("border-b",e),...t}));H.displayName="AccordionItem";const V=r.forwardRef(({className:e,children:t,...o},n)=>a.jsx(b.Header,{className:"flex",children:a.jsxs(b.Trigger,{ref:n,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(g.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));V.displayName=b.Trigger.displayName;const E=r.forwardRef(({className:e,children:t,...o},n)=>a.jsx(b.Content,{ref:n,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})}));E.displayName=b.Content.displayName;const G=j.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"}}),ht=({className:e,variant:t,...o})=>a.jsx("div",{className:s(G({variant:t}),e),...o}),wt=c.Root,Ct=c.Trigger,F=({className:e,...t})=>a.jsx(c.Portal,{className:s(e),...t});F.displayName=c.Portal.displayName;const B=r.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}));B.displayName=c.Overlay.displayName;const U=r.forwardRef(({className:e,...t},o)=>a.jsxs(F,{children:[a.jsx(B,{}),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})]}));U.displayName=c.Content.displayName;const Q=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col space-y-2 text-center sm:text-left",e),...t});Q.displayName="AlertDialogHeader";const X=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});X.displayName="AlertDialogFooter";const Y=r.forwardRef(({className:e,...t},o)=>a.jsx(c.Title,{ref:o,className:s("text-lg font-semibold",e),...t}));Y.displayName=c.Title.displayName;const J=r.forwardRef(({className:e,...t},o)=>a.jsx(c.Description,{ref:o,className:s("text-sm text-muted-foreground",e),...t}));J.displayName=c.Description.displayName;const K=r.forwardRef(({className:e,...t},o)=>a.jsx(c.Action,{ref:o,className:s(D(),e),...t}));K.displayName=c.Action.displayName;const W=r.forwardRef(({className:e,...t},o)=>a.jsx(c.Cancel,{ref:o,className:s(D({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));W.displayName=c.Cancel.displayName;const Z=u.Root,jt=u.Trigger,$=({className:e,...t})=>a.jsx(u.Portal,{className:s(e),...t});$.displayName=u.Portal.displayName;const ee=r.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}));ee.displayName=u.Overlay.displayName;const A=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxs($,{children:[a.jsx(ee,{}),a.jsxs(u.Content,{ref:n,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(g.Cross2Icon,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));A.displayName=u.Content.displayName;const te=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});te.displayName="DialogHeader";const oe=({className:e,...t})=>a.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});oe.displayName="DialogFooter";const ae=r.forwardRef(({className:e,...t},o)=>a.jsx(u.Title,{ref:o,className:s("text-lg font-semibold leading-none tracking-tight",e),...t}));ae.displayName=u.Title.displayName;const se=r.forwardRef(({className:e,...t},o)=>a.jsx(u.Description,{ref:o,className:s("text-sm text-muted-foreground",e),...t}));se.displayName=u.Description.displayName;const re=r.forwardRef(({className:e,...t},o)=>a.jsx("div",{ref:o,className:s("rounded-xl border bg-card text-card-foreground shadow",e),...t}));re.displayName="Card";const ne=r.forwardRef(({className:e,...t},o)=>a.jsx("div",{ref:o,className:s("flex flex-col space-y-1.5 p-6",e),...t}));ne.displayName="CardHeader";const de=r.forwardRef(({className:e,...t},o)=>a.jsx("h3",{ref:o,className:s("font-semibold leading-none tracking-tight",e),...t}));de.displayName="CardTitle";const ie=r.forwardRef(({className:e,...t},o)=>a.jsx("p",{ref:o,className:s("text-sm text-muted-foreground",e),...t}));ie.displayName="CardDescription";const le=r.forwardRef(({className:e,...t},o)=>a.jsx("div",{ref:o,className:s("p-6 pt-0",e),...t}));le.displayName="CardContent";const ce=r.forwardRef(({className:e,...t},o)=>a.jsx("div",{ref:o,className:s(" flex items-center p-6 pt-0",e),...t}));ce.displayName="CardFooter";const me=r.forwardRef(({className:e,type:t,...o},n)=>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:n,...o,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));me.displayName="Input";const Tt=j.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),pe=r.forwardRef(({className:e,...t},o)=>a.jsx(z.Root,{ref:o,className:s(Tt(),e),...t}));pe.displayName=z.Root.displayName;const ue=r.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"}));ue.displayName="Textarea";const fe=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxs(x.Root,{ref:n,className:s("relative overflow-hidden",e),...o,children:[a.jsx(x.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(I,{}),a.jsx(x.Corner,{})]}));fe.displayName=x.Root.displayName;const I=r.forwardRef(({className:e,orientation:t="vertical",...o},n)=>a.jsx(x.ScrollAreaScrollbar,{ref:n,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(x.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));I.displayName=x.ScrollAreaScrollbar.displayName;const Dt=y.Root,ge=r.forwardRef(({className:e,...t},o)=>a.jsx(y.List,{ref:o,className:s("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));ge.displayName=y.List.displayName;const xe=r.forwardRef(({className:e,...t},o)=>a.jsx(y.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}));xe.displayName=y.Trigger.displayName;const be=r.forwardRef(({className:e,...t},o)=>a.jsx(y.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}));be.displayName=y.Content.displayName;const Rt=v.Portal,St=v.Provider,Mt=v.Root,kt=v.Trigger,ye=r.forwardRef(({className:e,sideOffset:t=4,...o},n)=>a.jsx(v.Content,{ref:n,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}));ye.displayName=v.Content.displayName;const At=h.Root,It=h.Trigger,ve=r.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},l)=>a.jsx(h.Portal,{children:a.jsx(h.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),...n})}));ve.displayName=h.Content.displayName;const _t=T.Root,Pt=T.Trigger,Ne=r.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},l)=>a.jsx(T.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),...n}));Ne.displayName=T.Content.displayName;const zt=d.Root,Ot=d.Trigger,Lt=d.Group,qt=d.Portal,Ht=d.Sub,Vt=d.RadioGroup,he=r.forwardRef(({className:e,inset:t,children:o,...n},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 data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[o,a.jsx(g.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));he.displayName=d.SubTrigger.displayName;const we=r.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}));we.displayName=d.SubContent.displayName;const Ce=r.forwardRef(({className:e,sideOffset:t=4,...o},n)=>a.jsx(d.Portal,{children:a.jsx(d.Content,{ref:n,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})}));Ce.displayName=d.Content.displayName;const je=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsx(d.Item,{ref:n,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}));je.displayName=d.Item.displayName;const Te=r.forwardRef(({className:e,children:t,checked:o,...n},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 transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...n,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(g.CheckIcon,{className:"h-4 w-4"})})}),t]}));Te.displayName=d.CheckboxItem.displayName;const De=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxs(d.RadioItem,{ref:n,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(d.ItemIndicator,{children:a.jsx(g.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));De.displayName=d.RadioItem.displayName;const Re=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsx(d.Label,{ref:n,className:s("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Re.displayName=d.Label.displayName;const Se=r.forwardRef(({className:e,...t},o)=>a.jsx(d.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));Se.displayName=d.Separator.displayName;const Me=({className:e,...t})=>a.jsx("span",{className:s("ml-auto text-xs tracking-widest opacity-60",e),...t});Me.displayName="DropdownMenuShortcut";const ke=r.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...n},l)=>a.jsx(O.Root,{ref:l,decorative:o,orientation:t,className:s("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));ke.displayName=O.Root.displayName;const Et=1,Gt=1e6;let S=0;function Ft(){return S=(S+1)%Number.MAX_VALUE,S.toString()}const M=new Map,P=e=>{if(M.has(e))return;const t=setTimeout(()=>{M.delete(e),N({type:"REMOVE_TOAST",toastId:e})},Gt);M.set(e,t)},Ae=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Et)};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(n=>{P(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===o||o===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)}}},w=[];let C={toasts:[]};function N(e){C=Ae(C,e),w.forEach(t=>{t(C)})}function Ie({...e}){const t=Ft(),o=l=>N({type:"UPDATE_TOAST",toast:{...l,id:t}}),n=()=>N({type:"DISMISS_TOAST",toastId:t});return N({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:l=>{l||n()}}}),{id:t,dismiss:n,update:o}}function _e(){const[e,t]=r.useState(C);return r.useEffect(()=>(w.push(t),()=>{const o=w.indexOf(t);o>-1&&w.splice(o,1)}),[e]),{...e,toast:Ie,dismiss:o=>N({type:"DISMISS_TOAST",toastId:o})}}const Bt=f.Provider,Pe=r.forwardRef(({className:e,...t},o)=>a.jsx(f.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=f.Viewport.displayName;const Ut=j.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"}}),ze=r.forwardRef(({className:e,variant:t,...o},n)=>a.jsx(f.Root,{ref:n,className:s(Ut({variant:t}),e),...o}));ze.displayName=f.Root.displayName;const Qt=r.forwardRef(({className:e,...t},o)=>a.jsx(f.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=f.Action.displayName;const Oe=r.forwardRef(({className:e,...t},o)=>a.jsx(f.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(g.Cross2Icon,{className:"h-4 w-4"})}));Oe.displayName=f.Close.displayName;const Le=r.forwardRef(({className:e,...t},o)=>a.jsx(f.Title,{ref:o,className:s("text-sm font-semibold [&+div]:text-xs",e),...t}));Le.displayName=f.Title.displayName;const qe=r.forwardRef(({className:e,...t},o)=>a.jsx(f.Description,{ref:o,className:s("text-sm opacity-90",e),...t}));qe.displayName=f.Description.displayName;function Xt(){const{toasts:e}=_e();return a.jsxs(Bt,{children:[e.map(({id:t,title:o,description:n,action:l,...R})=>a.jsxs(ze,{...R,children:[a.jsxs("div",{className:"grid gap-1",children:[o&&a.jsx(Le,{children:o}),n&&a.jsx(qe,{children:n})]}),l,a.jsx(Oe,{})]},t)),a.jsx(Pe,{})]})}const Yt=({className:e,...t})=>a.jsx("div",{className:s("animate-pulse rounded-md bg-primary/10",e),...t}),_=r.forwardRef(({className:e,...t},o)=>a.jsx(p.Command,{ref:o,className:s("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));_.displayName=p.Command.displayName;const Jt=({children:e,...t})=>a.jsx(Z,{...t,children:a.jsx(A,{className:"overflow-hidden p-0",children:a.jsx(_,{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})})}),He=r.forwardRef(({className:e,...t},o)=>a.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[a.jsx(g.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),a.jsx(p.Command.Input,{ref:o,className:s("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})]}));He.displayName=p.Command.Input.displayName;const Ve=r.forwardRef(({className:e,...t},o)=>a.jsx(p.Command.List,{ref:o,className:s("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Ve.displayName=p.Command.List.displayName;const Ee=r.forwardRef((e,t)=>a.jsx(p.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ee.displayName=p.Command.Empty.displayName;const Ge=r.forwardRef(({className:e,...t},o)=>a.jsx(p.Command.Group,{ref:o,className:s("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}));Ge.displayName=p.Command.Group.displayName;const Fe=r.forwardRef(({className:e,...t},o)=>a.jsx(p.Command.Separator,{ref:o,className:s("-mx-1 h-px bg-border",e),...t}));Fe.displayName=p.Command.Separator.displayName;const Be=r.forwardRef(({className:e,...t},o)=>a.jsx(p.Command.Item,{ref:o,className:s("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}));Be.displayName=p.Command.Item.displayName;const Ue=({className:e,...t})=>a.jsx("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ue.displayName="CommandShortcut";const Kt=i.Root,Wt=i.Trigger,Zt=i.Group,$t=i.Portal,eo=i.Sub,to=i.RadioGroup,Qe=r.forwardRef(({className:e,inset:t,children:o,...n},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 focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...n,children:[o,a.jsx(g.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Qe.displayName=i.SubTrigger.displayName;const Xe=r.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}));Xe.displayName=i.SubContent.displayName;const Ye=r.forwardRef(({className:e,...t},o)=>a.jsx(i.Portal,{children:a.jsx(i.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})}));Ye.displayName=i.Content.displayName;const Je=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsx(i.Item,{ref:n,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}));Je.displayName=i.Item.displayName;const Ke=r.forwardRef(({className:e,children:t,checked:o,...n},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 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...n,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(g.CheckIcon,{className:"h-4 w-4"})})}),t]}));Ke.displayName=i.CheckboxItem.displayName;const We=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxs(i.RadioItem,{ref:n,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(i.ItemIndicator,{children:a.jsx(g.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));We.displayName=i.RadioItem.displayName;const Ze=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsx(i.Label,{ref:n,className:s("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...o}));Ze.displayName=i.Label.displayName;const $e=r.forwardRef(({className:e,...t},o)=>a.jsx(i.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-border",e),...t}));$e.displayName=i.Separator.displayName;const et=({className:e,...t})=>a.jsx("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});et.displayName="ContextMenuShortcut";exports.Accordion=Nt;exports.AccordionContent=E;exports.AccordionItem=H;exports.AccordionTrigger=V;exports.AlertDialog=wt;exports.AlertDialogAction=K;exports.AlertDialogCancel=W;exports.AlertDialogContent=U;exports.AlertDialogDescription=J;exports.AlertDialogFooter=X;exports.AlertDialogHeader=Q;exports.AlertDialogTitle=Y;exports.AlertDialogTrigger=Ct;exports.Badge=ht;exports.Button=q;exports.Card=re;exports.CardContent=le;exports.CardDescription=ie;exports.CardFooter=ce;exports.CardHeader=ne;exports.CardTitle=de;exports.Command=_;exports.CommandDialog=Jt;exports.CommandEmpty=Ee;exports.CommandGroup=Ge;exports.CommandInput=He;exports.CommandItem=Be;exports.CommandList=Ve;exports.CommandSeparator=Fe;exports.CommandShortcut=Ue;exports.ContextMenu=Kt;exports.ContextMenuCheckboxItem=Ke;exports.ContextMenuContent=Ye;exports.ContextMenuGroup=Zt;exports.ContextMenuItem=Je;exports.ContextMenuLabel=Ze;exports.ContextMenuPortal=$t;exports.ContextMenuRadioGroup=to;exports.ContextMenuRadioItem=We;exports.ContextMenuSeparator=$e;exports.ContextMenuShortcut=et;exports.ContextMenuSub=eo;exports.ContextMenuSubContent=Xe;exports.ContextMenuSubTrigger=Qe;exports.ContextMenuTrigger=Wt;exports.Dialog=Z;exports.DialogContent=A;exports.DialogDescription=se;exports.DialogFooter=oe;exports.DialogHeader=te;exports.DialogTitle=ae;exports.DialogTrigger=jt;exports.DropdownMenu=zt;exports.DropdownMenuCheckboxItem=Te;exports.DropdownMenuContent=Ce;exports.DropdownMenuGroup=Lt;exports.DropdownMenuItem=je;exports.DropdownMenuLabel=Re;exports.DropdownMenuPortal=qt;exports.DropdownMenuRadioGroup=Vt;exports.DropdownMenuRadioItem=De;exports.DropdownMenuSeparator=Se;exports.DropdownMenuShortcut=Me;exports.DropdownMenuSub=Ht;exports.DropdownMenuSubContent=we;exports.DropdownMenuSubTrigger=he;exports.DropdownMenuTrigger=Ot;exports.HoverCard=_t;exports.HoverCardContent=Ne;exports.HoverCardTrigger=Pt;exports.Input=me;exports.Label=pe;exports.Popover=At;exports.PopoverContent=ve;exports.PopoverTrigger=It;exports.ScrollArea=fe;exports.ScrollBar=I;exports.Separator=ke;exports.Skeleton=Yt;exports.Switch=L;exports.Tabs=Dt;exports.TabsContent=be;exports.TabsList=ge;exports.TabsTrigger=xe;exports.Textarea=ue;exports.Toaster=Xt;exports.Tooltip=Mt;exports.TooltipContent=ye;exports.TooltipPortal=Rt;exports.TooltipProvider=St;exports.TooltipTrigger=kt;exports.badgeVariants=G;exports.buttonVariants=D;exports.cn=s;exports.reducer=Ae;exports.toast=Ie;exports.useToast=_e;