@chaibuilder/sdk 1.2.65 → 1.2.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AddBlocks-TVOOPK2w.cjs +1 -0
- package/dist/AddBlocks-mbuhydG3.js +123 -0
- package/dist/CanvasArea-KJMcis97.cjs +1 -0
- package/dist/CanvasArea-kg3Rgg9t.js +136 -0
- package/dist/CodeEditor-QP6l0mv4.cjs +1 -0
- package/dist/{CodeEditor-Qff4q7sx.js → CodeEditor-q5unEaUI.js} +60 -46
- package/dist/STRINGS--j49GZJP.js +7 -0
- package/dist/STRINGS-gPz7CUOk.cjs +1 -0
- package/dist/SettingsPanel-MWeQjDWs.cjs +1 -0
- package/dist/SettingsPanel-pomLrOxB.js +81 -0
- package/dist/SidePanels-9sbERNEv.cjs +1 -0
- package/dist/{SidePanels-ijaUKSek.js → SidePanels-YpRrvfiH.js} +87 -93
- package/dist/{Topbar-vHlnfxPs.js → Topbar-kVBx7pp4.js} +56 -61
- package/dist/Topbar-veJ2_blW.cjs +1 -0
- package/dist/{UILibrariesPanel-NVUMUPUj.js → UILibrariesPanel-ES8YzN9C.js} +92 -101
- package/dist/UILibrariesPanel-H8t36R6M.cjs +1 -0
- package/dist/UnsplashImages--MXx-DYM.cjs +1 -0
- package/dist/{UnsplashImages-UkHihhA5.js → UnsplashImages-sotLcz6r.js} +72 -57
- package/dist/{UploadImages-HtuJZJlo.js → UploadImages-I0QQ6vj1.js} +57 -44
- package/dist/UploadImages-xhxeYKkl.cjs +1 -0
- package/dist/badge-7BVT3zxN.cjs +1 -0
- package/dist/badge-pJqQSA13.js +23 -0
- package/dist/context-menu-_8TFbFEJ.cjs +1 -0
- package/dist/context-menu-sks9vdzC.js +906 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +45 -20
- package/dist/core.js +85 -87
- package/dist/iconBase-vJD0OXxU.cjs +1 -0
- package/dist/iconBase-zweRWSz0.js +323 -0
- package/dist/index-5hfuDpYs.cjs +223 -0
- package/dist/index-Zu-K_BX7.js +33933 -0
- package/dist/jsx-runtime-JYMCiFoE.cjs +27 -0
- package/dist/{jsx-runtime-WbnYoNE9.js → jsx-runtime-Sp0orL4X.js} +106 -109
- package/dist/plugin-P0tpo_XZ.cjs +1 -0
- package/dist/plugin-_F-KZp1i.cjs +1 -0
- package/dist/plugin-f5uJtdXY.js +43 -0
- package/dist/plugin-sJ3Hzvpv.js +57 -0
- package/dist/render.cjs +3 -1
- package/dist/render.d.ts +19 -52
- package/dist/render.js +136 -183
- package/dist/select-JW3OMYm-.js +75 -0
- package/dist/select-fXj5tdMX.cjs +1 -0
- package/dist/separator-hT24N-xp.cjs +1 -0
- package/dist/separator-sgwOa1FE.js +18 -0
- package/dist/style.css +1 -1
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.d.ts +41 -1
- package/dist/tailwind.js +16 -8
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +0 -10
- package/dist/ui.js +345 -163
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.d.ts +1 -1
- package/dist/web-blocks.js +489 -724
- package/package.json +15 -45
- package/dist/CanvasArea-fSdH_RiN.cjs +0 -1
- package/dist/CanvasArea-ut5yknzX.js +0 -168
- package/dist/CodeEditor-ypUx3RAV.cjs +0 -1
- package/dist/CurrentPage-jHSVy3hq.js +0 -120
- package/dist/CurrentPage-p_AM4lrF.cjs +0 -1
- package/dist/Functions-7jnEwJyw.js +0 -15
- package/dist/Functions-N3yhPYKY.cjs +0 -1
- package/dist/MODIFIERS-fd5XOmum.js +0 -60
- package/dist/MODIFIERS-mVmfEGgo.cjs +0 -1
- package/dist/PagesPanel-U3InJ9Db.js +0 -78
- package/dist/PagesPanel-wqDb4D-x.cjs +0 -1
- package/dist/ProjectPanel-XODJTO4J.js +0 -99
- package/dist/ProjectPanel-fWESzHr6.cjs +0 -1
- package/dist/SidePanels-lrMQqc0h.cjs +0 -1
- package/dist/Topbar-RrCDxd0i.cjs +0 -1
- package/dist/UILibrariesPanel-7btHgBD0.cjs +0 -1
- package/dist/UnsplashImages-6UjgojvF.cjs +0 -1
- package/dist/UploadImages-3h0cRsvr.cjs +0 -1
- package/dist/_commonjsHelpers-UyOWmZb0.js +0 -8
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +0 -1
- package/dist/add-page-modal-RwIj1FxH.cjs +0 -1
- package/dist/add-page-modal-TOfMfmPA.js +0 -115
- package/dist/confirm-alert-eIp2cAkc.js +0 -60
- package/dist/confirm-alert-v1lG8ex4.cjs +0 -1
- package/dist/controls-rRZhz0vu.cjs +0 -1
- package/dist/controls-yjgoZzB6.js +0 -199
- package/dist/delete-page-modal-4bxjpVBD.js +0 -97
- package/dist/delete-page-modal-qYDZmpgT.cjs +0 -1
- package/dist/email-blocks.cjs +0 -1
- package/dist/email-blocks.d.ts +0 -3
- package/dist/email-blocks.js +0 -294
- package/dist/email.cjs +0 -1
- package/dist/email.d.ts +0 -171
- package/dist/email.js +0 -90
- package/dist/empty-slot-Lsxjts7Q.js +0 -6
- package/dist/empty-slot-Sy930lX6.cjs +0 -1
- package/dist/form-4jTocVbZ.cjs +0 -1
- package/dist/form-NAzFjGs0.js +0 -125
- package/dist/functions--tdNWQDW.js +0 -30
- package/dist/functions-EVUeSwX1.cjs +0 -1
- package/dist/html-to-json-NqRjgFqp.cjs +0 -1
- package/dist/html-to-json-l_mw5y-e.js +0 -243
- package/dist/index--k2M8kzI.cjs +0 -1
- package/dist/index--mLLy7QQ.cjs +0 -1
- package/dist/index-5XyNUAjc.cjs +0 -290
- package/dist/index-C7mB4XFm.js +0 -3141
- package/dist/index-VBXQixVm.js +0 -117
- package/dist/index-YZhtVcj_.js +0 -2201
- package/dist/index-aeDphKpP.cjs +0 -1
- package/dist/index-lFgDm1oa.js +0 -83780
- package/dist/jsx-runtime-Z_BpKhVy.cjs +0 -27
- package/dist/lib.cjs +0 -3
- package/dist/lib.d.ts +0 -80
- package/dist/lib.js +0 -1350
- package/dist/page-viewer-4wrnWnK0.js +0 -124
- package/dist/page-viewer-ra0GLx1p.cjs +0 -1
- package/dist/project-general-setting-IwZUkYF3.js +0 -90
- package/dist/project-general-setting-lFjTUhHD.cjs +0 -1
- package/dist/project-seo-setting-e1fTqVsd.js +0 -83
- package/dist/project-seo-setting-o0V9acCV.cjs +0 -1
- package/dist/server.cjs +0 -1
- package/dist/server.d.ts +0 -299
- package/dist/server.js +0 -216
- package/dist/single-page-detail-ZNWFKqLW.js +0 -229
- package/dist/single-page-detail-g55Anu7R.cjs +0 -1
- package/dist/studio.cjs +0 -1
- package/dist/studio.d.ts +0 -176
- package/dist/studio.js +0 -67
- package/dist/utils-D_vtk3zK.cjs +0 -1
- package/dist/utils-VpVqnC9m.js +0 -1075
|
@@ -1,76 +1,89 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
2
|
-
import { useState as
|
|
1
|
+
import { j as e } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
|
+
import { useState as l, useEffect as k } from "react";
|
|
3
3
|
import { isEmpty as j, map as b } from "lodash-es";
|
|
4
4
|
import { atom as F, useAtom as U } from "jotai";
|
|
5
|
-
import {
|
|
5
|
+
import { X as C } from "./context-menu-sks9vdzC.js";
|
|
6
6
|
import { useTranslation as E } from "react-i18next";
|
|
7
|
+
import { c as y } from "./index-Zu-K_BX7.js";
|
|
7
8
|
import { Upload as G, Loader as P } from "lucide-react";
|
|
8
|
-
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
|
-
import "@radix-ui/react-toggle";
|
|
10
|
-
import "class-variance-authority";
|
|
11
|
-
import "./utils-VpVqnC9m.js";
|
|
12
|
-
import "./MODIFIERS-fd5XOmum.js";
|
|
13
|
-
import "clsx";
|
|
14
|
-
import "tailwind-merge";
|
|
15
9
|
import "@radix-ui/react-switch";
|
|
16
|
-
import "@radix-ui/react-slot";
|
|
17
10
|
import "@radix-ui/react-accordion";
|
|
18
11
|
import "@radix-ui/react-icons";
|
|
12
|
+
import "class-variance-authority";
|
|
19
13
|
import "@radix-ui/react-alert-dialog";
|
|
20
|
-
import "@radix-ui/react-
|
|
14
|
+
import "@radix-ui/react-slot";
|
|
21
15
|
import "@radix-ui/react-label";
|
|
22
16
|
import "@radix-ui/react-scroll-area";
|
|
23
17
|
import "@radix-ui/react-tabs";
|
|
24
18
|
import "@radix-ui/react-tooltip";
|
|
25
19
|
import "@radix-ui/react-popover";
|
|
26
|
-
import "@radix-ui/react-menubar";
|
|
27
20
|
import "@radix-ui/react-hover-card";
|
|
28
|
-
import "@radix-ui/react-select";
|
|
29
21
|
import "@radix-ui/react-dropdown-menu";
|
|
30
|
-
import "@radix-ui/react-separator";
|
|
31
22
|
import "@radix-ui/react-toast";
|
|
32
23
|
import "cmdk";
|
|
24
|
+
import "@radix-ui/react-dialog";
|
|
33
25
|
import "@radix-ui/react-context-menu";
|
|
34
|
-
import "
|
|
35
|
-
import "
|
|
36
|
-
import "
|
|
37
|
-
import "./Functions-7jnEwJyw.js";
|
|
26
|
+
import "clsx";
|
|
27
|
+
import "tailwind-merge";
|
|
28
|
+
import "./iconBase-zweRWSz0.js";
|
|
38
29
|
import "@chaibuilder/runtime";
|
|
30
|
+
import "./plugin-sJ3Hzvpv.js";
|
|
39
31
|
import "@react-hookz/web";
|
|
40
32
|
import "tree-model";
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
import "react-quill";
|
|
34
|
+
import "./STRINGS--j49GZJP.js";
|
|
35
|
+
import "react-hotkeys-hook";
|
|
36
|
+
import "@floating-ui/dom";
|
|
37
|
+
import "@floating-ui/react-dom";
|
|
38
|
+
import "flagged";
|
|
39
|
+
import "@tailwindcss/typography";
|
|
40
|
+
import "@tailwindcss/forms";
|
|
41
|
+
import "@tailwindcss/aspect-ratio";
|
|
42
|
+
import "tailwindcss-palette-generator";
|
|
43
|
+
import "react-wrap-balancer";
|
|
44
|
+
import "react-dom";
|
|
45
|
+
import "prop-types";
|
|
46
|
+
import "@rjsf/validator-ajv8";
|
|
47
|
+
import "@rjsf/core";
|
|
48
|
+
import "react-arborist";
|
|
49
|
+
import "himalaya";
|
|
50
|
+
import "react-icons-picker";
|
|
51
|
+
import "react-autosuggest";
|
|
52
|
+
import "fuse.js";
|
|
53
|
+
import "i18next";
|
|
54
|
+
const S = F([]), Se = ({ isModalView: o, onSelect: m }) => {
|
|
55
|
+
const { t: r } = E(), p = y("uploadMediaCallback"), n = y("fetchMediaCallback"), [a, c] = U(S), [N, u] = l(!1), [x, f] = l(!1), [, v] = l(), [h, d] = l("");
|
|
43
56
|
k(() => {
|
|
44
57
|
(async () => {
|
|
45
58
|
if (!n)
|
|
46
59
|
return;
|
|
47
60
|
f(!0);
|
|
48
61
|
const t = await n();
|
|
49
|
-
|
|
62
|
+
c(t || []), f(!1);
|
|
50
63
|
})();
|
|
51
64
|
}, []);
|
|
52
65
|
const w = (t) => {
|
|
53
|
-
var
|
|
54
|
-
if (
|
|
66
|
+
var s, i;
|
|
67
|
+
if (d(""), t && ((i = (s = t == null ? void 0 : t.target) == null ? void 0 : s.files) == null ? void 0 : i.length) > 0) {
|
|
55
68
|
const g = t.target.files[0];
|
|
56
|
-
g.type.startsWith("image") ? I(g) :
|
|
69
|
+
g.type.startsWith("image") ? I(g) : d(r("Please select an image"));
|
|
57
70
|
}
|
|
58
71
|
}, I = async (t) => {
|
|
59
72
|
if (p) {
|
|
60
73
|
u(!0);
|
|
61
74
|
try {
|
|
62
|
-
const { url:
|
|
63
|
-
m(
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
} catch (
|
|
67
|
-
|
|
75
|
+
const { url: s } = await p(t);
|
|
76
|
+
m(s), v(void 0);
|
|
77
|
+
const i = await n();
|
|
78
|
+
c(i);
|
|
79
|
+
} catch (s) {
|
|
80
|
+
c([]), d((s == null ? void 0 : s.message) || "Something went wrong.");
|
|
68
81
|
}
|
|
69
82
|
u(!1);
|
|
70
83
|
}
|
|
71
84
|
};
|
|
72
85
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
73
|
-
/* @__PURE__ */ e.jsxs("label", { htmlFor:
|
|
86
|
+
/* @__PURE__ */ e.jsxs("label", { htmlFor: o ? "upload-in-modal" : "upload-in-panel", children: [
|
|
74
87
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center rounded-lg", children: /* @__PURE__ */ e.jsxs(
|
|
75
88
|
"label",
|
|
76
89
|
{
|
|
@@ -79,14 +92,14 @@ const S = F([]), be = ({ isModalView: a, onSelect: m }) => {
|
|
|
79
92
|
children: [
|
|
80
93
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center justify-center pb-6 pt-5", children: [
|
|
81
94
|
/* @__PURE__ */ e.jsx(G, { className: "mb-3 h-10 w-10 text-gray-400" }),
|
|
82
|
-
/* @__PURE__ */ e.jsx("p", { className: "mb-2 text-sm text-gray-500 dark:text-gray-400", children: /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children:
|
|
83
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children:
|
|
95
|
+
/* @__PURE__ */ e.jsx("p", { className: "mb-2 text-sm text-gray-500 dark:text-gray-400", children: /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: r("Click to upload") }) }),
|
|
96
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: r("SVG, PNG, JPG or GIF (Max. 2mb)") })
|
|
84
97
|
] }),
|
|
85
98
|
N ? /* @__PURE__ */ e.jsxs("div", { className: "flex h-full w-full items-center justify-center", children: [
|
|
86
99
|
/* @__PURE__ */ e.jsx(P, { className: "h-6 w-6 animate-spin" }),
|
|
87
|
-
/* @__PURE__ */ e.jsx("span", { className: "ml-2 text-sm text-gray-500", children:
|
|
100
|
+
/* @__PURE__ */ e.jsx("span", { className: "ml-2 text-sm text-gray-500", children: r("Uploading...") })
|
|
88
101
|
] }) : null,
|
|
89
|
-
h && /* @__PURE__ */ e.jsx("p", { className: "pb-2 text-xs text-red-500", children: h ||
|
|
102
|
+
h && /* @__PURE__ */ e.jsx("p", { className: "pb-2 text-xs text-red-500", children: h || r("Something went wrong") })
|
|
90
103
|
]
|
|
91
104
|
}
|
|
92
105
|
) }),
|
|
@@ -101,21 +114,21 @@ const S = F([]), be = ({ isModalView: a, onSelect: m }) => {
|
|
|
101
114
|
}
|
|
102
115
|
)
|
|
103
116
|
] }),
|
|
104
|
-
/* @__PURE__ */ e.jsxs(C, { className: `-mx-2 flex h-full flex-col pb-8 pt-2 ${
|
|
105
|
-
j(
|
|
106
|
-
j(
|
|
117
|
+
/* @__PURE__ */ e.jsxs(C, { className: `-mx-2 flex h-full flex-col pb-8 pt-2 ${o ? "px-2" : ""} pt-2`, children: [
|
|
118
|
+
j(a) && x && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e.jsx("div", { className: "animate-pulse font-medium", children: r("Fetching...") }) }),
|
|
119
|
+
j(a) && !x && /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col items-center justify-center text-center", children: [
|
|
107
120
|
/* @__PURE__ */ e.jsx("div", { className: "mb-4 h-12 rounded-full p-6" }),
|
|
108
|
-
/* @__PURE__ */ e.jsx("h3", { className: "mb-2 text-sm font-semibold", children:
|
|
109
|
-
/* @__PURE__ */ e.jsx("p", { className: "mb-4 max-w-sm text-muted-foreground", children:
|
|
121
|
+
/* @__PURE__ */ e.jsx("h3", { className: "mb-2 text-sm font-semibold", children: r("No images found") }),
|
|
122
|
+
/* @__PURE__ */ e.jsx("p", { className: "mb-4 max-w-sm text-muted-foreground", children: r("It looks like you haven't uploaded any images yet. Start by clicking the upload button above.") })
|
|
110
123
|
] }),
|
|
111
|
-
|
|
124
|
+
o ? /* @__PURE__ */ e.jsx("div", { className: "h-full columns-5 py-2", children: b(a, (t) => /* @__PURE__ */ e.jsx("div", { role: "button", tabIndex: 0, className: "my-1 flex", onClick: () => m(t.url), children: /* @__PURE__ */ e.jsx("div", { className: "relative overflow-hidden rounded-md bg-cover bg-no-repeat", children: /* @__PURE__ */ e.jsx(
|
|
112
125
|
"img",
|
|
113
126
|
{
|
|
114
127
|
className: "h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",
|
|
115
128
|
alt: t.name,
|
|
116
129
|
src: t.thumbUrl
|
|
117
130
|
}
|
|
118
|
-
) }) }, t.id)) }) : b(
|
|
131
|
+
) }) }, t.id)) }) : b(a, (t) => (
|
|
119
132
|
// TODO: Drag and Drop Image to Canvas from Here use `pic.url` for image quality
|
|
120
133
|
/* @__PURE__ */ e.jsx("div", { role: "button", tabIndex: 0, className: "px-2 py-1", onClick: () => m(t.url), children: /* @__PURE__ */ e.jsx("div", { className: "relative overflow-hidden rounded-md bg-cover bg-no-repeat", children: /* @__PURE__ */ e.jsx(
|
|
121
134
|
"img",
|
|
@@ -130,5 +143,5 @@ const S = F([]), be = ({ isModalView: a, onSelect: m }) => {
|
|
|
130
143
|
] });
|
|
131
144
|
};
|
|
132
145
|
export {
|
|
133
|
-
|
|
146
|
+
Se as default
|
|
134
147
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),i=require("react"),u=require("lodash-es"),E=require("jotai"),I=require("./context-menu-_8TFbFEJ.cjs"),w=require("react-i18next"),q=require("./index-5hfuDpYs.cjs"),b=require("lucide-react");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-dialog");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("./iconBase-vJD0OXxU.cjs");require("@chaibuilder/runtime");require("./plugin-_F-KZp1i.cjs");require("@react-hookz/web");require("tree-model");require("react-quill");require("./STRINGS-gPz7CUOk.cjs");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("react-wrap-balancer");require("react-dom");require("prop-types");require("@rjsf/validator-ajv8");require("@rjsf/core");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("i18next");const k=E.atom([]),S=({isModalView:a,onSelect:o})=>{const{t:s}=w.useTranslation(),d=q.useBuilderProp("uploadMediaCallback"),x=q.useBuilderProp("fetchMediaCallback"),[l,c]=E.useAtom(k),[y,p]=i.useState(!1),[j,h]=i.useState(!1),[,R]=i.useState(),[f,m]=i.useState("");i.useEffect(()=>{(async()=>{if(!x)return;h(!0);const r=await x();c(r||[]),h(!1)})()},[]);const N=r=>{var t,n;if(m(""),r&&((n=(t=r==null?void 0:r.target)==null?void 0:t.files)==null?void 0:n.length)>0){const g=r.target.files[0];g.type.startsWith("image")?v(g):m(s("Please select an image"))}},v=async r=>{if(d){p(!0);try{const{url:t}=await d(r);o(t),R(void 0);const n=await x();c(n)}catch(t){c([]),m((t==null?void 0:t.message)||"Something went wrong.")}p(!1)}};return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs("label",{htmlFor:a?"upload-in-modal":"upload-in-panel",children:[e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center rounded-lg",children:e.jsxRuntimeExports.jsxs("label",{htmlFor:"image-upload",className:"flex w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed border-gray-300 bg-gray-50 hover:bg-gray-100",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[e.jsxRuntimeExports.jsx(b.Upload,{className:"mb-3 h-10 w-10 text-gray-400"}),e.jsxRuntimeExports.jsx("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:e.jsxRuntimeExports.jsx("span",{className:"font-semibold",children:s("Click to upload")})}),e.jsxRuntimeExports.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:s("SVG, PNG, JPG or GIF (Max. 2mb)")})]}),y?e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-full items-center justify-center",children:[e.jsxRuntimeExports.jsx(b.Loader,{className:"h-6 w-6 animate-spin"}),e.jsxRuntimeExports.jsx("span",{className:"ml-2 text-sm text-gray-500",children:s("Uploading...")})]}):null,f&&e.jsxRuntimeExports.jsx("p",{className:"pb-2 text-xs text-red-500",children:f||s("Something went wrong")})]})}),e.jsxRuntimeExports.jsx("input",{type:"file",id:"image-upload",accept:"image/*",hidden:!0,onChange:N})]}),e.jsxRuntimeExports.jsxs(I.ScrollArea,{className:`-mx-2 flex h-full flex-col pb-8 pt-2 ${a?"px-2":""} pt-2`,children:[u.isEmpty(l)&&j&&e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsxRuntimeExports.jsx("div",{className:"animate-pulse font-medium",children:s("Fetching...")})}),u.isEmpty(l)&&!j&&e.jsxRuntimeExports.jsxs("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[e.jsxRuntimeExports.jsx("div",{className:"mb-4 h-12 rounded-full p-6"}),e.jsxRuntimeExports.jsx("h3",{className:"mb-2 text-sm font-semibold",children:s("No images found")}),e.jsxRuntimeExports.jsx("p",{className:"mb-4 max-w-sm text-muted-foreground",children:s("It looks like you haven't uploaded any images yet. Start by clicking the upload button above.")})]}),a?e.jsxRuntimeExports.jsx("div",{className:"h-full columns-5 py-2",children:u.map(l,r=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>o(r.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:r.name,src:r.thumbUrl})})},r.id))}):u.map(l,r=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"px-2 py-1",onClick:()=>o(r.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto w-full cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:r.name,src:r.url})})},r.id))]})]})};exports.default=S;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("./jsx-runtime-JYMCiFoE.cjs"),s=require("class-variance-authority"),a=require("./context-menu-_8TFbFEJ.cjs"),r=s.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"}}),i=({className:e,variant:t,...n})=>o.jsxRuntimeExports.jsx("div",{className:a.cn(r({variant:t}),e),...n});exports.Badge=i;exports.badgeVariants=r;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { j as o } from "./jsx-runtime-Sp0orL4X.js";
|
|
2
|
+
import { cva as a } from "class-variance-authority";
|
|
3
|
+
import { ag as n } from "./context-menu-sks9vdzC.js";
|
|
4
|
+
const s = a(
|
|
5
|
+
"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",
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
10
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
11
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
12
|
+
outline: "text-foreground"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
variant: "default"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
), u = ({ className: r, variant: e, ...t }) => /* @__PURE__ */ o.jsx("div", { className: n(s({ variant: e }), r), ...t });
|
|
20
|
+
export {
|
|
21
|
+
u as B,
|
|
22
|
+
s as b
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./jsx-runtime-JYMCiFoE.cjs"),ot=require("@radix-ui/react-switch"),at=require("react"),st=require("@radix-ui/react-accordion"),f=require("@radix-ui/react-icons"),w=require("class-variance-authority"),rt=require("@radix-ui/react-alert-dialog"),nt=require("@radix-ui/react-slot"),it=require("@radix-ui/react-label"),dt=require("@radix-ui/react-scroll-area"),lt=require("@radix-ui/react-tabs"),mt=require("@radix-ui/react-tooltip"),ct=require("@radix-ui/react-popover"),pt=require("@radix-ui/react-hover-card"),ut=require("@radix-ui/react-dropdown-menu"),xt=require("@radix-ui/react-toast"),c=require("cmdk"),ft=require("@radix-ui/react-dialog"),gt=require("@radix-ui/react-context-menu"),bt=require("clsx"),jt=require("tailwind-merge");function p(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 M=p(ot),r=p(at),b=p(st),m=p(rt),P=p(it),g=p(dt),j=p(lt),v=p(mt),N=p(ct),C=p(pt),i=p(ut),x=p(xt),u=p(ft),d=p(gt),s=(...e)=>jt.twMerge(bt.clsx(e)),z=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.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.jsxRuntimeExports.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")})}));z.displayName=M.Root.displayName;const E=w.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"}}),O=r.forwardRef(({className:e,variant:t,size:o,asChild:n=!1,...l},T)=>{const tt=n?nt.Slot:"button";return a.jsxRuntimeExports.jsx(tt,{className:s(E({variant:t,size:o,className:e})),ref:T,...l})});O.displayName="Button";const vt=b.Root,L=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(b.Item,{ref:o,className:s("border-b",e),...t}));L.displayName="AccordionItem";const q=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsx(b.Header,{className:"flex",children:a.jsxRuntimeExports.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.jsxRuntimeExports.jsx(f.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));q.displayName=b.Trigger.displayName;const H=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.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.jsxRuntimeExports.jsx("div",{className:"pb-4 pt-0",children:t})}));H.displayName=b.Content.displayName;const yt=w.cva("relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),G=r.forwardRef(({className:e,variant:t,...o},n)=>a.jsxRuntimeExports.jsx("div",{ref:n,role:"alert",className:s(yt({variant:t}),e),...o}));G.displayName="Alert";const V=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("h5",{ref:o,className:s("mb-1 font-medium leading-none tracking-tight",e),...t}));V.displayName="AlertTitle";const F=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s("text-sm [&_p]:leading-relaxed",e),...t}));F.displayName="AlertDescription";const Nt=m.Root,Rt=m.Trigger,B=({className:e,...t})=>a.jsxRuntimeExports.jsx(m.Portal,{className:s(e),...t});B.displayName=m.Portal.displayName;const U=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.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}));U.displayName=m.Overlay.displayName;const Q=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsxs(B,{children:[a.jsxRuntimeExports.jsx(U,{}),a.jsxRuntimeExports.jsx(m.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})]}));Q.displayName=m.Content.displayName;const X=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("flex flex-col space-y-2 text-center sm:text-left",e),...t});X.displayName="AlertDialogHeader";const Y=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Y.displayName="AlertDialogFooter";const J=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Title,{ref:o,className:s("text-lg font-semibold",e),...t}));J.displayName=m.Title.displayName;const K=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Description,{ref:o,className:s("text-sm text-muted-foreground",e),...t}));K.displayName=m.Description.displayName;const W=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Action,{ref:o,className:s(E(),e),...t}));W.displayName=m.Action.displayName;const Z=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Cancel,{ref:o,className:s(E({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Z.displayName=m.Cancel.displayName;const $=u.Root,ht=u.Trigger,ee=({className:e,...t})=>a.jsxRuntimeExports.jsx(u.Portal,{className:s(e),...t});ee.displayName=u.Portal.displayName;const te=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.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}));te.displayName=u.Overlay.displayName;const A=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsxs(ee,{children:[a.jsxRuntimeExports.jsx(te,{}),a.jsxRuntimeExports.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.jsxRuntimeExports.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.jsxRuntimeExports.jsx(f.Cross2Icon,{className:"h-4 w-4"}),a.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));A.displayName=u.Content.displayName;const oe=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});oe.displayName="DialogHeader";const ae=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ae.displayName="DialogFooter";const se=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(u.Title,{ref:o,className:s("text-lg font-semibold leading-none tracking-tight",e),...t}));se.displayName=u.Title.displayName;const re=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(u.Description,{ref:o,className:s("text-sm text-muted-foreground",e),...t}));re.displayName=u.Description.displayName;const ne=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ne.displayName="Card";const ie=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s("flex flex-col space-y-1.5 p-6",e),...t}));ie.displayName="CardHeader";const de=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("h3",{ref:o,className:s("font-semibold leading-none tracking-tight",e),...t}));de.displayName="CardTitle";const le=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("p",{ref:o,className:s("text-sm text-muted-foreground",e),...t}));le.displayName="CardDescription";const me=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s("p-6 pt-0",e),...t}));me.displayName="CardContent";const ce=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s(" flex items-center p-6 pt-0",e),...t}));ce.displayName="CardFooter";const pe=r.forwardRef(({className:e,type:t,...o},n)=>a.jsxRuntimeExports.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"}));pe.displayName="Input";const wt=w.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ue=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(P.Root,{ref:o,className:s(wt(),e),...t}));ue.displayName=P.Root.displayName;const xe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.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"}));xe.displayName="Textarea";const fe=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsxs(g.Root,{ref:n,className:s("relative overflow-hidden",e),...o,children:[a.jsxRuntimeExports.jsx(g.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsxRuntimeExports.jsx(k,{}),a.jsxRuntimeExports.jsx(g.Corner,{})]}));fe.displayName=g.Root.displayName;const k=r.forwardRef(({className:e,orientation:t="vertical",...o},n)=>a.jsxRuntimeExports.jsx(g.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.jsxRuntimeExports.jsx(g.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));k.displayName=g.ScrollAreaScrollbar.displayName;const Ct=j.Root,ge=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(j.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=j.List.displayName;const be=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(j.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}));be.displayName=j.Trigger.displayName;const je=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(j.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}));je.displayName=j.Content.displayName;const Et=v.Portal,Tt=v.Provider,Dt=v.Root,St=v.Trigger,ve=r.forwardRef(({className:e,sideOffset:t=4,...o},n)=>a.jsxRuntimeExports.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}));ve.displayName=v.Content.displayName;const Mt=N.Root,At=N.Trigger,ye=r.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},l)=>a.jsxRuntimeExports.jsx(N.Portal,{children:a.jsxRuntimeExports.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),...n})}));ye.displayName=N.Content.displayName;const kt=C.Root,It=C.Trigger,Ne=r.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},l)=>a.jsxRuntimeExports.jsx(C.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=C.Content.displayName;const _t=i.Root,Pt=i.Trigger,zt=i.Group,Ot=i.Portal,Lt=i.Sub,qt=i.RadioGroup,Re=r.forwardRef(({className:e,inset:t,children:o,...n},l)=>a.jsxRuntimeExports.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),...n,children:[o,a.jsxRuntimeExports.jsx(f.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Re.displayName=i.SubTrigger.displayName;const he=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.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}));he.displayName=i.SubContent.displayName;const we=r.forwardRef(({className:e,sideOffset:t=4,...o},n)=>a.jsxRuntimeExports.jsx(i.Portal,{children:a.jsxRuntimeExports.jsx(i.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})}));we.displayName=i.Content.displayName;const Ce=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsxRuntimeExports.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 transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));Ce.displayName=i.Item.displayName;const Ee=r.forwardRef(({className:e,children:t,checked:o,...n},l)=>a.jsxRuntimeExports.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,...n,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(i.ItemIndicator,{children:a.jsxRuntimeExports.jsx(f.CheckIcon,{className:"h-4 w-4"})})}),t]}));Ee.displayName=i.CheckboxItem.displayName;const Te=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.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 transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(i.ItemIndicator,{children:a.jsxRuntimeExports.jsx(f.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Te.displayName=i.RadioItem.displayName;const De=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsxRuntimeExports.jsx(i.Label,{ref:n,className:s("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));De.displayName=i.Label.displayName;const Se=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(i.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));Se.displayName=i.Separator.displayName;const Me=({className:e,...t})=>a.jsxRuntimeExports.jsx("span",{className:s("ml-auto text-xs tracking-widest opacity-60",e),...t});Me.displayName="DropdownMenuShortcut";const Ht=1,Gt=1e6;let D=0;function Vt(){return D=(D+1)%Number.MAX_VALUE,D.toString()}const S=new Map,_=e=>{if(S.has(e))return;const t=setTimeout(()=>{S.delete(e),y({type:"REMOVE_TOAST",toastId:e})},Gt);S.set(e,t)},Ae=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Ht)};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?_(o):e.toasts.forEach(n=>{_(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)}}},R=[];let h={toasts:[]};function y(e){h=Ae(h,e),R.forEach(t=>{t(h)})}function ke({...e}){const t=Vt(),o=l=>y({type:"UPDATE_TOAST",toast:{...l,id:t}}),n=()=>y({type:"DISMISS_TOAST",toastId:t});return y({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:l=>{l||n()}}}),{id:t,dismiss:n,update:o}}function Ie(){const[e,t]=r.useState(h);return r.useEffect(()=>(R.push(t),()=>{const o=R.indexOf(t);o>-1&&R.splice(o,1)}),[e]),{...e,toast:ke,dismiss:o=>y({type:"DISMISS_TOAST",toastId:o})}}const Ft=x.Provider,_e=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.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}));_e.displayName=x.Viewport.displayName;const Bt=w.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"}}),Pe=r.forwardRef(({className:e,variant:t,...o},n)=>a.jsxRuntimeExports.jsx(x.Root,{ref:n,className:s(Bt({variant:t}),e),...o}));Pe.displayName=x.Root.displayName;const Ut=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.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}));Ut.displayName=x.Action.displayName;const ze=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.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.jsxRuntimeExports.jsx(f.Cross2Icon,{className:"h-4 w-4"})}));ze.displayName=x.Close.displayName;const Oe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.Title,{ref:o,className:s("text-sm font-semibold [&+div]:text-xs",e),...t}));Oe.displayName=x.Title.displayName;const Le=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.Description,{ref:o,className:s("text-sm opacity-90",e),...t}));Le.displayName=x.Description.displayName;function Qt(){const{toasts:e}=Ie();return a.jsxRuntimeExports.jsxs(Ft,{children:[e.map(({id:t,title:o,description:n,action:l,...T})=>a.jsxRuntimeExports.jsxs(Pe,{...T,children:[a.jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[o&&a.jsxRuntimeExports.jsx(Oe,{children:o}),n&&a.jsxRuntimeExports.jsx(Le,{children:n})]}),l,a.jsxRuntimeExports.jsx(ze,{})]},t)),a.jsxRuntimeExports.jsx(_e,{})]})}const Xt=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("animate-pulse rounded-md bg-primary/10",e),...t}),I=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(c.Command,{ref:o,className:s("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));I.displayName=c.Command.displayName;const Yt=({children:e,...t})=>a.jsxRuntimeExports.jsx($,{...t,children:a.jsxRuntimeExports.jsx(A,{className:"overflow-hidden p-0",children:a.jsxRuntimeExports.jsx(I,{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})})}),qe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[a.jsxRuntimeExports.jsx(f.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),a.jsxRuntimeExports.jsx(c.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})]}));qe.displayName=c.Command.Input.displayName;const He=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(c.Command.List,{ref:o,className:s("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));He.displayName=c.Command.List.displayName;const Ge=r.forwardRef((e,t)=>a.jsxRuntimeExports.jsx(c.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ge.displayName=c.Command.Empty.displayName;const Ve=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(c.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}));Ve.displayName=c.Command.Group.displayName;const Fe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(c.Command.Separator,{ref:o,className:s("-mx-1 h-px bg-border",e),...t}));Fe.displayName=c.Command.Separator.displayName;const Be=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(c.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=c.Command.Item.displayName;const Ue=({className:e,...t})=>a.jsxRuntimeExports.jsx("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ue.displayName="CommandShortcut";const Jt=d.Root,Kt=d.Trigger,Wt=d.Group,Zt=d.Portal,$t=d.Sub,eo=d.RadioGroup,Qe=r.forwardRef(({className:e,inset:t,children:o,...n},l)=>a.jsxRuntimeExports.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),...n,children:[o,a.jsxRuntimeExports.jsx(f.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Qe.displayName=d.SubTrigger.displayName;const Xe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.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}));Xe.displayName=d.SubContent.displayName;const Ye=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(d.Portal,{children:a.jsxRuntimeExports.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})}));Ye.displayName=d.Content.displayName;const Je=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsxRuntimeExports.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 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 Ke=r.forwardRef(({className:e,children:t,checked:o,...n},l)=>a.jsxRuntimeExports.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,...n,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(d.ItemIndicator,{children:a.jsxRuntimeExports.jsx(f.CheckIcon,{className:"h-4 w-4"})})}),t]}));Ke.displayName=d.CheckboxItem.displayName;const We=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.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 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(d.ItemIndicator,{children:a.jsxRuntimeExports.jsx(f.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));We.displayName=d.RadioItem.displayName;const Ze=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsxRuntimeExports.jsx(d.Label,{ref:n,className:s("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...o}));Ze.displayName=d.Label.displayName;const $e=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(d.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-border",e),...t}));$e.displayName=d.Separator.displayName;const et=({className:e,...t})=>a.jsxRuntimeExports.jsx("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});et.displayName="ContextMenuShortcut";exports.Accordion=vt;exports.AccordionContent=H;exports.AccordionItem=L;exports.AccordionTrigger=q;exports.Alert=G;exports.AlertDescription=F;exports.AlertDialog=Nt;exports.AlertDialogAction=W;exports.AlertDialogCancel=Z;exports.AlertDialogContent=Q;exports.AlertDialogDescription=K;exports.AlertDialogFooter=Y;exports.AlertDialogHeader=X;exports.AlertDialogTitle=J;exports.AlertDialogTrigger=Rt;exports.AlertTitle=V;exports.Button=O;exports.Card=ne;exports.CardContent=me;exports.CardDescription=le;exports.CardFooter=ce;exports.CardHeader=ie;exports.CardTitle=de;exports.Command=I;exports.CommandDialog=Yt;exports.CommandEmpty=Ge;exports.CommandGroup=Ve;exports.CommandInput=qe;exports.CommandItem=Be;exports.CommandList=He;exports.CommandSeparator=Fe;exports.CommandShortcut=Ue;exports.ContextMenu=Jt;exports.ContextMenuCheckboxItem=Ke;exports.ContextMenuContent=Ye;exports.ContextMenuGroup=Wt;exports.ContextMenuItem=Je;exports.ContextMenuLabel=Ze;exports.ContextMenuPortal=Zt;exports.ContextMenuRadioGroup=eo;exports.ContextMenuRadioItem=We;exports.ContextMenuSeparator=$e;exports.ContextMenuShortcut=et;exports.ContextMenuSub=$t;exports.ContextMenuSubContent=Xe;exports.ContextMenuSubTrigger=Qe;exports.ContextMenuTrigger=Kt;exports.Dialog=$;exports.DialogContent=A;exports.DialogDescription=re;exports.DialogFooter=ae;exports.DialogHeader=oe;exports.DialogTitle=se;exports.DialogTrigger=ht;exports.DropdownMenu=_t;exports.DropdownMenuCheckboxItem=Ee;exports.DropdownMenuContent=we;exports.DropdownMenuGroup=zt;exports.DropdownMenuItem=Ce;exports.DropdownMenuLabel=De;exports.DropdownMenuPortal=Ot;exports.DropdownMenuRadioGroup=qt;exports.DropdownMenuRadioItem=Te;exports.DropdownMenuSeparator=Se;exports.DropdownMenuShortcut=Me;exports.DropdownMenuSub=Lt;exports.DropdownMenuSubContent=he;exports.DropdownMenuSubTrigger=Re;exports.DropdownMenuTrigger=Pt;exports.HoverCard=kt;exports.HoverCardContent=Ne;exports.HoverCardTrigger=It;exports.Input=pe;exports.Label=ue;exports.Popover=Mt;exports.PopoverContent=ye;exports.PopoverTrigger=At;exports.ScrollArea=fe;exports.ScrollBar=k;exports.Skeleton=Xt;exports.Switch=z;exports.Tabs=Ct;exports.TabsContent=je;exports.TabsList=ge;exports.TabsTrigger=be;exports.Textarea=xe;exports.Toaster=Qt;exports.Tooltip=Dt;exports.TooltipContent=ve;exports.TooltipPortal=Et;exports.TooltipProvider=Tt;exports.TooltipTrigger=St;exports.buttonVariants=E;exports.cn=s;exports.reducer=Ae;exports.toast=ke;exports.useToast=Ie;
|