@chaibuilder/sdk 2.0.0-beta.109 → 2.0.0-beta.111
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/{CodeEditor-Bv7cAp6l.js → CodeEditor-C-jeR5bt.js} +1 -1
- package/dist/{CodeEditor-ol63c03C.cjs → CodeEditor-SZJ1H4vl.cjs} +1 -1
- package/dist/{Topbar-lIu26u9Y.cjs → Topbar-DSfx67NF.cjs} +1 -1
- package/dist/{Topbar-DutZ_viX.js → Topbar-DZ2jHLv7.js} +1 -1
- package/dist/core.cjs +6 -6
- package/dist/core.js +141 -168
- package/dist/tooltip-1Uu2avkZ.cjs +1 -0
- package/dist/{tooltip-CuxBhGWF.js → tooltip-PKiP886L.js} +250 -366
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +293 -192
- package/package.json +1 -1
- package/dist/tooltip-DHlrjqh8.cjs +0 -1
package/dist/core.js
CHANGED
|
@@ -4,9 +4,9 @@ var V = (o, n, r) => K(o, typeof n != "symbol" ? n + "" : n, r);
|
|
|
4
4
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import React__default, { createContext, useReducer, useEffect, useDebugValue, useCallback, useContext, useMemo, Component, Children, useState, useRef, Suspense, createElement, memo, lazy } from "react";
|
|
7
|
-
import { S as Skeleton, B as Button,
|
|
7
|
+
import { S as Skeleton, B as Button, a6 as Label, H as Dialog, I as DialogTrigger, J as DialogContent, a7 as Popover, ak as Tooltip, al as TooltipTrigger, a8 as PopoverTrigger, am as TooltipContent, a9 as PopoverContent, v as Command, x as CommandInput, y as CommandList, z as CommandEmpty, D as CommandGroup, E as CommandItem, K as DialogHeader, M as DialogTitle, n as Badge, O as DropdownMenu, P as DropdownMenuTrigger, Q as DropdownMenuContent, V as DropdownMenuLabel, W as DropdownMenuSeparator, T as DropdownMenuCheckboxItem, a2 as HoverCard, a3 as HoverCardTrigger, a4 as HoverCardContent, aj as Textarea, a5 as Input$1, ao as TooltipPortal, a as AccordionItem, b as AccordionTrigger, d as AccordionContent, aa as ScrollArea, Y as DropdownMenuGroup, R as DropdownMenuItem, X as DropdownMenuShortcut, A as Accordion, C as Card, q as CardHeader, t as CardDescription, u as CardContent, r as CardFooter, af as Tabs, ag as TabsList, ah as TabsTrigger, ai as TabsContent, e as AlertDialog, f as AlertDialogTrigger, g as AlertDialogContent, h as AlertDialogHeader, j as AlertDialogTitle, k as AlertDialogDescription, i as AlertDialogFooter, m as AlertDialogCancel, l as AlertDialogAction, ae as Switch, ac as Separator, an as TooltipProvider, ad as Toaster } from "./tooltip-PKiP886L.js";
|
|
8
8
|
import { atom as atom$1, useAtom as useAtom$1, useAtomValue as useAtomValue$1, getDefaultStore as getDefaultStore$1, useSetAtom as useSetAtom$1, Provider } from "jotai";
|
|
9
|
-
import { find, filter, flatten, map, omit, isString, has,
|
|
9
|
+
import { find, filter, flatten, map, omit, isString, has, isObject, memoize, get, compact, isEmpty, noop, includes, without, each, first, keys, range, values, flattenDeep, set, startsWith, forEach, unset, chunk, cloneDeep, pick, isNull, throttle, isFunction as isFunction$1, reverse, startCase, debounce, capitalize, split, findIndex, take, toUpper, toLower, nth, isNumber, parseInt as parseInt$1, isNaN as isNaN$1, findLast, intersection, groupBy, uniq, flatMapDeep, some, reject, sortBy, round } from "lodash-es";
|
|
10
10
|
import { Provider as Provider$1 } from "react-wrap-balancer";
|
|
11
11
|
import { useTranslation, initReactI18next } from "react-i18next";
|
|
12
12
|
import { useTranslation as Ve } from "react-i18next";
|
|
@@ -22,7 +22,7 @@ import { e as getDefaultExportFromCjs, d as defaultThemeOptions, g as getChaiThe
|
|
|
22
22
|
import TreeModel from "tree-model";
|
|
23
23
|
import { useHotkeys } from "react-hotkeys-hook";
|
|
24
24
|
import { toast } from "sonner";
|
|
25
|
-
import { PlusIcon as PlusIcon$1, ChevronRight, DatabaseIcon, ChevronLeft, Bold, Italic, Underline as Underline$1, Strikethrough, List, ListOrdered, AlignLeft, AlignCenter, AlignRight, Link as Link$1, Unlink, Maximize2, X, Plus, PlusCircle, ChevronDown, Loader, SparklesIcon, EyeOff, Eye, SmileIcon, ShuffleIcon, DatabaseZapIcon, Edit2, Paintbrush, Layers } from "lucide-react";
|
|
25
|
+
import { PlusIcon as PlusIcon$1, ChevronRight, DatabaseIcon, ChevronLeft, Bold, Italic, Underline as Underline$1, Strikethrough, List, ListOrdered, AlignLeft, AlignCenter, AlignRight, Link as Link$1, Unlink, Maximize2, X, Plus, PlusCircle, ChevronDown, Loader, SparklesIcon, Globe, PencilIcon, EyeOff, Eye, SmileIcon, ShuffleIcon, DatabaseZapIcon, Edit2, Paintbrush, Layers } from "lucide-react";
|
|
26
26
|
import { useEditor, EditorContent } from "@tiptap/react";
|
|
27
27
|
import StarterKit from "@tiptap/starter-kit";
|
|
28
28
|
import typography from "@tailwindcss/typography";
|
|
@@ -930,61 +930,7 @@ function requireUndomanager() {
|
|
|
930
930
|
}(undomanager)), undomanager.exports;
|
|
931
931
|
}
|
|
932
932
|
var undomanagerExports = requireUndomanager();
|
|
933
|
-
const UndoManager = /* @__PURE__ */ getDefaultExportFromCjs(undomanagerExports)
|
|
934
|
-
function getBlocksTree(o) {
|
|
935
|
-
return convertToBlocksTree(o);
|
|
936
|
-
}
|
|
937
|
-
const nestedToFlatArray = (o, n) => flatten(
|
|
938
|
-
o.map((r) => {
|
|
939
|
-
if (r = n ? { ...r, _parent: n } : { ...r }, r.children) {
|
|
940
|
-
const a = [...r.children];
|
|
941
|
-
return delete r.children, flatten([r, ...nestedToFlatArray(a, r._id)]);
|
|
942
|
-
}
|
|
943
|
-
return r;
|
|
944
|
-
})
|
|
945
|
-
);
|
|
946
|
-
function setProjectBlocksInMemory(o, n = !1) {
|
|
947
|
-
for (let r = 0; r < o.length; r++) {
|
|
948
|
-
const a = o[r];
|
|
949
|
-
a.global && !n ? o[r] = {
|
|
950
|
-
type: "GlobalBlock",
|
|
951
|
-
blockId: a.blockId,
|
|
952
|
-
_parent: get(a, "_parent", null),
|
|
953
|
-
_id: a._id
|
|
954
|
-
} : a.children && a.children.length && setProjectBlocksInMemory(a.children);
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
function getInnerBlocks(o) {
|
|
958
|
-
let n = [], r = filter(o, { type: "GlobalBlock" });
|
|
959
|
-
return r.length > 0 && (r = map(r, getPBlocks), each(r, (a) => {
|
|
960
|
-
n = [...n, ...getSingleBlock(a)];
|
|
961
|
-
})), n;
|
|
962
|
-
}
|
|
963
|
-
function getSingleBlock(o) {
|
|
964
|
-
let n = [];
|
|
965
|
-
const r = get(first(o), "_parent", null);
|
|
966
|
-
set(first(o), "_parent", null);
|
|
967
|
-
const a = [flatToNestedInstance.convert(clone(o))];
|
|
968
|
-
setProjectBlocksInMemory(a, !0);
|
|
969
|
-
let l = nestedToFlatArray(a, o[0]._id);
|
|
970
|
-
return l = set(l, "0._parent", r), n = [...n, l, ...getInnerBlocks(l)], n;
|
|
971
|
-
}
|
|
972
|
-
function getPBlocks(o) {
|
|
973
|
-
const n = find(FLAT_ARRAY, { _id: o._id });
|
|
974
|
-
if (!n) return [];
|
|
975
|
-
const r = [n], a = filter(FLAT_ARRAY, { _parent: o._id });
|
|
976
|
-
return a.length ? flatten([...r, ...flatten(map(a, getPBlocks))]) : flatten(r);
|
|
977
|
-
}
|
|
978
|
-
const clone = (o) => JSON.parse(JSON.stringify(o));
|
|
979
|
-
let FLAT_ARRAY = [];
|
|
980
|
-
function splitPageBlocks(o) {
|
|
981
|
-
FLAT_ARRAY = o;
|
|
982
|
-
const n = getBlocksTree(clone(o));
|
|
983
|
-
setProjectBlocksInMemory(n);
|
|
984
|
-
const r = nestedToFlatArray(n, null), a = getInnerBlocks(r), l = {};
|
|
985
|
-
return each(a, (i) => set(l, first(i).blockId, i)), [r, l];
|
|
986
|
-
}
|
|
987
|
-
const MODIFIERS = [
|
|
933
|
+
const UndoManager = /* @__PURE__ */ getDefaultExportFromCjs(undomanagerExports), MODIFIERS = [
|
|
988
934
|
"hover",
|
|
989
935
|
"focus",
|
|
990
936
|
"focus-within",
|
|
@@ -1051,10 +997,10 @@ const useBrandingOptions = () => {
|
|
|
1051
997
|
}), useGetPageData = () => {
|
|
1052
998
|
const [o] = useBrandingOptions(), { currentPage: n } = useCurrentPage(), [r] = useBlocksStore();
|
|
1053
999
|
return useCallback(() => {
|
|
1054
|
-
const a = map(r, (
|
|
1000
|
+
const a = map(r, (l) => omit(l, getBlockBuilderProps(l._type)));
|
|
1055
1001
|
return {
|
|
1056
1002
|
currentPage: n,
|
|
1057
|
-
blocks:
|
|
1003
|
+
blocks: a
|
|
1058
1004
|
};
|
|
1059
1005
|
}, [o, n, r]);
|
|
1060
1006
|
}, chaiBuilderPropsAtom = atom$1(null);
|
|
@@ -1314,6 +1260,9 @@ function insertBlocksAtPosition(o, n, r, a) {
|
|
|
1314
1260
|
}
|
|
1315
1261
|
return !r && a !== void 0 && a >= c.length && (p = i.length), [...i.slice(0, p), ...l, ...i.slice(p)];
|
|
1316
1262
|
}
|
|
1263
|
+
function getBlocksTree(o) {
|
|
1264
|
+
return convertToBlocksTree(o);
|
|
1265
|
+
}
|
|
1317
1266
|
function flattenTree(o) {
|
|
1318
1267
|
let n = [];
|
|
1319
1268
|
return o.walk((r) => (delete r.model.children, n.push(r.model), !0)), n;
|
|
@@ -3095,7 +3044,7 @@ const useBlockHighlight = () => {
|
|
|
3095
3044
|
const [o, n] = useAtom(partialBlocksStoreAtom), r = useCallback((l) => get(o, l, []), [o]), a = useCallback(() => n({}), [n]);
|
|
3096
3045
|
return { getPartailBlocks: r, reset: a };
|
|
3097
3046
|
}, useWatchPartailBlocks = () => {
|
|
3098
|
-
const [o] = useBlocksStore(), [n, r] = useAtom(partialBlocksStoreAtom), [a, l] = useAtom(partialBlocksLoadingStateAtom), i = useBuilderProp("getPartialBlockBlocks", async (d) => []), c = useMemo(() => o.filter((d) => d._type === "PartialBlock").map((d) => d
|
|
3047
|
+
const [o] = useBlocksStore(), [n, r] = useAtom(partialBlocksStoreAtom), [a, l] = useAtom(partialBlocksLoadingStateAtom), i = useBuilderProp("getPartialBlockBlocks", async (d) => []), c = useMemo(() => o.filter((d) => d._type === "PartialBlock" || d._type === "GlobalBlock").map((d) => get(d, "partialBlockId", get(d, "globalBlock", ""))), [o]);
|
|
3099
3048
|
useEffect(() => {
|
|
3100
3049
|
forEach(c, (d) => {
|
|
3101
3050
|
has(n, d) || get(a, `${d}.loading`, !1) || (l((p) => ({ ...p, [d]: { loading: !0, error: null } })), i(d).then((p) => {
|
|
@@ -3498,7 +3447,7 @@ const pubsub = new PubSub(), draggedBlockAtom = atom$1(null), dropTargetBlockIdA
|
|
|
3498
3447
|
.frame-root .frame-content { height: 100%; }
|
|
3499
3448
|
[data-drop="yes"] { outline: 2px dashed orange !important; outline-offset: -2px }
|
|
3500
3449
|
[data-dnd="yes"] { pointer-events: auto !important}
|
|
3501
|
-
[data-dnd="no"],[data-block-type="GlobalBlock"] > * { pointer-events: none !important; }
|
|
3450
|
+
[data-dnd="no"],[data-block-type="GlobalBlock"],[data-block-type="PartialBlock"] > * { pointer-events: none !important; }
|
|
3502
3451
|
[data-dnd-dragged="yes"] { opacity: 0.6; pointer-events: none; }
|
|
3503
3452
|
[data-dnd-dragged="no"] { opacity: 1; pointer-events: auto !important; }
|
|
3504
3453
|
[force-show] { display: block !important; }
|
|
@@ -4080,7 +4029,7 @@ const getBlockRuntimeProps = memoize((o) => {
|
|
|
4080
4029
|
l !== o.length - 1 && /* @__PURE__ */ jsx(ChevronRight, { className: "rtl:rotate-180", size: 16 })
|
|
4081
4030
|
] }, l))
|
|
4082
4031
|
] }) });
|
|
4083
|
-
}, CodeEditor$1 = React__default.lazy(() => import("./CodeEditor-
|
|
4032
|
+
}, CodeEditor$1 = React__default.lazy(() => import("./CodeEditor-C-jeR5bt.js")), CanvasArea = () => {
|
|
4084
4033
|
const [o] = useCodeEditor(), n = useBuilderProp("onError", noop);
|
|
4085
4034
|
return /* @__PURE__ */ jsx("div", { className: "flex h-full max-h-full w-full flex-1 flex-col", children: /* @__PURE__ */ jsxs("div", { className: "relative flex h-full max-h-full flex-col overflow-hidden bg-gray-100/40 px-2", children: [
|
|
4086
4035
|
/* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "h-full" }), children: /* @__PURE__ */ jsx(ErrorBoundary, { fallback: /* @__PURE__ */ jsx(FallbackError, {}), onError: n, children: /* @__PURE__ */ jsx(StaticCanvas, {}) }) }),
|
|
@@ -7294,11 +7243,13 @@ const CoreBlock = ({
|
|
|
7294
7243
|
// Set the type to PartialBlock
|
|
7295
7244
|
label: formatReadableName(y.name || x),
|
|
7296
7245
|
description: y.description || "",
|
|
7246
|
+
icon: Globe,
|
|
7297
7247
|
group: j,
|
|
7298
7248
|
// Use formatted type as group
|
|
7299
7249
|
category: "partial",
|
|
7300
|
-
partialBlockId: x
|
|
7250
|
+
partialBlockId: x,
|
|
7301
7251
|
// Store the original ID as partialBlockId
|
|
7252
|
+
_name: y.name
|
|
7302
7253
|
};
|
|
7303
7254
|
}), h = uniq(map(m, "group"));
|
|
7304
7255
|
p({
|
|
@@ -7666,65 +7617,46 @@ const BlockCard = ({
|
|
|
7666
7617
|
}
|
|
7667
7618
|
)
|
|
7668
7619
|
] }) }) });
|
|
7669
|
-
}, UILibrariesPanel = ({ parentId: o, position: n }) => /* @__PURE__ */ jsx(UILibrarySection, { parentId: o, position: n })
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
};
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
-
return
|
|
7684
|
-
}
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
[r]
|
|
7690
|
-
);
|
|
7691
|
-
return r ? /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Overlay, { isDragging: n, children: /* @__PURE__ */ jsx(
|
|
7692
|
-
"div",
|
|
7693
|
-
{
|
|
7694
|
-
className: "pointer-events-none absolute z-50 rounded border border-border bg-gray-100/80 font-semibold text-blue-600 shadow-md dark:border-gray-700 dark:bg-gray-800",
|
|
7695
|
-
style: i,
|
|
7696
|
-
children: /* @__PURE__ */ jsxs("button", { type: "button", className: "flex !cursor-grab items-center p-0.5", "aria-label": `Type: ${l == null ? void 0 : l._type}`, children: [
|
|
7697
|
-
/* @__PURE__ */ jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ jsx(TypeIcon, { type: l == null ? void 0 : l._type }) }),
|
|
7698
|
-
/* @__PURE__ */ jsx("div", { className: "ml-2 truncate text-[11px]", children: (l == null ? void 0 : l._name) || (l == null ? void 0 : l._type) })
|
|
7699
|
-
] })
|
|
7700
|
-
}
|
|
7701
|
-
) }) }) : /* @__PURE__ */ jsx("div", { className: "hidden" });
|
|
7702
|
-
}), PasteAtRootContextMenu = ({ parentContext: o, setParentContext: n }) => {
|
|
7620
|
+
}, UILibrariesPanel = ({ parentId: o, position: n }) => /* @__PURE__ */ jsx(UILibrarySection, { parentId: o, position: n });
|
|
7621
|
+
function BiCollapseVertical(o) {
|
|
7622
|
+
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 7.59 7.05 2.64 5.64 4.05 12 10.41l6.36-6.36-1.41-1.41L12 7.59zM5.64 19.95l1.41 1.41L12 16.41l4.95 4.95 1.41-1.41L12 13.59l-6.36 6.36z" }, child: [] }] })(o);
|
|
7623
|
+
}
|
|
7624
|
+
function BiExpandVertical(o) {
|
|
7625
|
+
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "m12 19.24-4.95-4.95-1.41 1.42L12 22.07l6.36-6.36-1.41-1.42L12 19.24zM5.64 8.29l1.41 1.42L12 4.76l4.95 4.95 1.41-1.42L12 1.93 5.64 8.29z" }, child: [] }] })(o);
|
|
7626
|
+
}
|
|
7627
|
+
function BsLightningFill(o) {
|
|
7628
|
+
return GenIcon({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641z" }, child: [] }] })(o);
|
|
7629
|
+
}
|
|
7630
|
+
function BsThreeDotsVertical(o) {
|
|
7631
|
+
return GenIcon({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" }, child: [] }] })(o);
|
|
7632
|
+
}
|
|
7633
|
+
function TbEyeDown(o) {
|
|
7634
|
+
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M12 18c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6" }, child: [] }, { tag: "path", attr: { d: "M19 16v6" }, child: [] }, { tag: "path", attr: { d: "M22 19l-3 3l-3 -3" }, child: [] }] })(o);
|
|
7635
|
+
}
|
|
7636
|
+
function VscJson(o) {
|
|
7637
|
+
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 16 16", fill: "currentColor" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M6 2.984V2h-.09c-.313 0-.616.062-.909.185a2.33 2.33 0 0 0-.775.53 2.23 2.23 0 0 0-.493.753v.001a3.542 3.542 0 0 0-.198.83v.002a6.08 6.08 0 0 0-.024.863c.012.29.018.58.018.869 0 .203-.04.393-.117.572v.001a1.504 1.504 0 0 1-.765.787 1.376 1.376 0 0 1-.558.115H2v.984h.09c.195 0 .38.04.556.121l.001.001c.178.078.329.184.455.318l.002.002c.13.13.233.285.307.465l.001.002c.078.18.117.368.117.566 0 .29-.006.58-.018.869-.012.296-.004.585.024.87v.001c.033.283.099.558.197.824v.001c.106.273.271.524.494.753.223.23.482.407.775.53.293.123.596.185.91.185H6v-.984h-.09c-.2 0-.387-.038-.563-.115a1.613 1.613 0 0 1-.457-.32 1.659 1.659 0 0 1-.309-.467c-.074-.18-.11-.37-.11-.573 0-.228.003-.453.011-.672.008-.228.008-.45 0-.665a4.639 4.639 0 0 0-.055-.64 2.682 2.682 0 0 0-.168-.609A2.284 2.284 0 0 0 3.522 8a2.284 2.284 0 0 0 .738-.955c.08-.192.135-.393.168-.602.033-.21.051-.423.055-.64.008-.22.008-.442 0-.666-.008-.224-.012-.45-.012-.678a1.47 1.47 0 0 1 .877-1.354 1.33 1.33 0 0 1 .563-.121H6zm4 10.032V14h.09c.313 0 .616-.062.909-.185.293-.123.552-.3.775-.53.223-.23.388-.48.493-.753v-.001c.1-.266.165-.543.198-.83v-.002c.028-.28.036-.567.024-.863-.012-.29-.018-.58-.018-.869 0-.203.04-.393.117-.572v-.001a1.502 1.502 0 0 1 .765-.787 1.38 1.38 0 0 1 .558-.115H14v-.984h-.09c-.196 0-.381-.04-.557-.121l-.001-.001a1.376 1.376 0 0 1-.455-.318l-.002-.002a1.415 1.415 0 0 1-.307-.465v-.002a1.405 1.405 0 0 1-.118-.566c0-.29.006-.58.018-.869a6.174 6.174 0 0 0-.024-.87v-.001a3.537 3.537 0 0 0-.197-.824v-.001a2.23 2.23 0 0 0-.494-.753 2.331 2.331 0 0 0-.775-.53 2.325 2.325 0 0 0-.91-.185H10v.984h.09c.2 0 .387.038.562.115.174.082.326.188.457.32.127.134.23.29.309.467.074.18.11.37.11.573 0 .228-.003.452-.011.672-.008.228-.008.45 0 .665.004.222.022.435.055.64.033.214.089.416.168.609a2.285 2.285 0 0 0 .738.955 2.285 2.285 0 0 0-.738.955 2.689 2.689 0 0 0-.168.602c-.033.21-.051.423-.055.64a9.15 9.15 0 0 0 0 .666c.008.224.012.45.012.678a1.471 1.471 0 0 1-.877 1.354 1.33 1.33 0 0 1-.563.121H10z" }, child: [] }] })(o);
|
|
7638
|
+
}
|
|
7639
|
+
const PasteAtRootContextMenu = ({ parentContext: o, setParentContext: n }) => {
|
|
7703
7640
|
const { t: r } = useTranslation(), { canPaste: a, pasteBlocks: l } = usePasteBlocks();
|
|
7704
7641
|
return useEffect(() => {
|
|
7705
7642
|
a("root") || n(null);
|
|
7706
|
-
}, [a("root")]), o
|
|
7707
|
-
"
|
|
7708
|
-
{
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
]
|
|
7724
|
-
}
|
|
7725
|
-
)
|
|
7726
|
-
}
|
|
7727
|
-
);
|
|
7643
|
+
}, [a("root")]), !o || !a("root") ? null : /* @__PURE__ */ jsx("div", { style: { position: "absolute", top: o.y - 75, left: o.x - 56 }, children: /* @__PURE__ */ jsxs(DropdownMenu, { open: !0, onOpenChange: () => n(null), children: [
|
|
7644
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { className: "hidden" }),
|
|
7645
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { className: "w-28 p-1 text-xs", children: /* @__PURE__ */ jsxs(
|
|
7646
|
+
DropdownMenuItem,
|
|
7647
|
+
{
|
|
7648
|
+
className: "flex items-center gap-x-4 text-xs",
|
|
7649
|
+
onClick: () => {
|
|
7650
|
+
l("root"), n(null);
|
|
7651
|
+
},
|
|
7652
|
+
children: [
|
|
7653
|
+
/* @__PURE__ */ jsx(CardStackIcon, {}),
|
|
7654
|
+
" ",
|
|
7655
|
+
r("Paste")
|
|
7656
|
+
]
|
|
7657
|
+
}
|
|
7658
|
+
) })
|
|
7659
|
+
] }) });
|
|
7728
7660
|
}, CopyPasteBlocks = () => {
|
|
7729
7661
|
const [o] = useBlocksStore(), [n] = useSelectedBlockIds(), { pasteBlocks: r } = usePasteBlocks(), [, a] = useCopyBlockIds(), { t: l } = useTranslation(), i = useSelectedBlock(), c = useCallback(() => {
|
|
7730
7662
|
const d = n.map((p) => {
|
|
@@ -7738,7 +7670,7 @@ const BlockCard = ({
|
|
|
7738
7670
|
}, [n, o, a]);
|
|
7739
7671
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7740
7672
|
/* @__PURE__ */ jsxs(
|
|
7741
|
-
|
|
7673
|
+
DropdownMenuItem,
|
|
7742
7674
|
{
|
|
7743
7675
|
disabled: !canDuplicateBlock(i == null ? void 0 : i._type),
|
|
7744
7676
|
onClick: c,
|
|
@@ -7751,7 +7683,7 @@ const BlockCard = ({
|
|
|
7751
7683
|
}
|
|
7752
7684
|
),
|
|
7753
7685
|
/* @__PURE__ */ jsxs(
|
|
7754
|
-
|
|
7686
|
+
DropdownMenuItem,
|
|
7755
7687
|
{
|
|
7756
7688
|
className: "flex items-center gap-x-4 text-xs",
|
|
7757
7689
|
onClick: () => {
|
|
@@ -7767,7 +7699,7 @@ const BlockCard = ({
|
|
|
7767
7699
|
] });
|
|
7768
7700
|
}, CutBlocks = () => {
|
|
7769
7701
|
const [o] = useSelectedBlockIds(), [, n] = useCutBlockIds(), { t: r } = useTranslation();
|
|
7770
|
-
return /* @__PURE__ */ jsxs(
|
|
7702
|
+
return /* @__PURE__ */ jsxs(DropdownMenuItem, { className: "flex items-center gap-x-4 text-xs", onClick: () => n(o), children: [
|
|
7771
7703
|
/* @__PURE__ */ jsx(ScissorsIcon, {}),
|
|
7772
7704
|
" ",
|
|
7773
7705
|
r("Cut")
|
|
@@ -7775,7 +7707,7 @@ const BlockCard = ({
|
|
|
7775
7707
|
}, RemoveBlocks = () => {
|
|
7776
7708
|
const [o] = useSelectedBlockIds(), n = useRemoveBlocks(), r = useSelectedBlock(), { t: a } = useTranslation();
|
|
7777
7709
|
return /* @__PURE__ */ jsxs(
|
|
7778
|
-
|
|
7710
|
+
DropdownMenuItem,
|
|
7779
7711
|
{
|
|
7780
7712
|
disabled: !canDeleteBlock(r == null ? void 0 : r._type),
|
|
7781
7713
|
className: "flex items-center gap-x-4 text-xs",
|
|
@@ -7787,45 +7719,106 @@ const BlockCard = ({
|
|
|
7787
7719
|
]
|
|
7788
7720
|
}
|
|
7789
7721
|
);
|
|
7790
|
-
},
|
|
7791
|
-
const { t:
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7722
|
+
}, RenameBlock = ({ node: o }) => {
|
|
7723
|
+
const { t: n } = useTranslation();
|
|
7724
|
+
return console.log(o), /* @__PURE__ */ jsxs(
|
|
7725
|
+
DropdownMenuItem,
|
|
7726
|
+
{
|
|
7727
|
+
onClick: (r) => {
|
|
7728
|
+
r.stopPropagation(), console.log(o), o.edit(), o.deselect();
|
|
7729
|
+
},
|
|
7730
|
+
className: "flex items-center gap-x-4 text-xs",
|
|
7731
|
+
children: [
|
|
7732
|
+
/* @__PURE__ */ jsx(PencilIcon, { className: "h-4 w-4" }),
|
|
7733
|
+
" ",
|
|
7734
|
+
n("Rename")
|
|
7735
|
+
]
|
|
7736
|
+
}
|
|
7737
|
+
);
|
|
7738
|
+
}, BlockContextMenuContent = ({ node: o }) => {
|
|
7739
|
+
const { t: n } = useTranslation(), [r] = useSelectedBlockIds(), a = useDuplicateBlocks(), l = useSelectedBlock(), i = useCallback(() => {
|
|
7740
|
+
a(r);
|
|
7741
|
+
}, [r, a]);
|
|
7742
|
+
return /* @__PURE__ */ jsxs(DropdownMenuContent, { side: "bottom", className: "border-border text-xs", children: [
|
|
7795
7743
|
/* @__PURE__ */ jsxs(
|
|
7796
|
-
|
|
7744
|
+
DropdownMenuItem,
|
|
7797
7745
|
{
|
|
7798
|
-
disabled: !canAddChildBlock(
|
|
7746
|
+
disabled: !canAddChildBlock(l == null ? void 0 : l._type),
|
|
7799
7747
|
className: "flex items-center gap-x-4 text-xs",
|
|
7800
|
-
onClick: () => pubsub.publish(CHAI_BUILDER_EVENTS.OPEN_ADD_BLOCK,
|
|
7748
|
+
onClick: () => pubsub.publish(CHAI_BUILDER_EVENTS.OPEN_ADD_BLOCK, l),
|
|
7801
7749
|
children: [
|
|
7802
7750
|
/* @__PURE__ */ jsx(PlusIcon$1, { size: "14" }),
|
|
7803
7751
|
" ",
|
|
7804
|
-
|
|
7752
|
+
n("Add block")
|
|
7805
7753
|
]
|
|
7806
7754
|
}
|
|
7807
7755
|
),
|
|
7808
7756
|
/* @__PURE__ */ jsxs(
|
|
7809
|
-
|
|
7757
|
+
DropdownMenuItem,
|
|
7810
7758
|
{
|
|
7811
|
-
disabled: !canDuplicateBlock(
|
|
7759
|
+
disabled: !canDuplicateBlock(l == null ? void 0 : l._type),
|
|
7812
7760
|
className: "flex items-center gap-x-4 text-xs",
|
|
7813
|
-
onClick:
|
|
7761
|
+
onClick: i,
|
|
7814
7762
|
children: [
|
|
7815
7763
|
/* @__PURE__ */ jsx(CardStackPlusIcon, {}),
|
|
7816
7764
|
" ",
|
|
7817
|
-
|
|
7765
|
+
n("Duplicate")
|
|
7818
7766
|
]
|
|
7819
7767
|
}
|
|
7820
7768
|
),
|
|
7769
|
+
/* @__PURE__ */ jsx(RenameBlock, { node: o }),
|
|
7821
7770
|
/* @__PURE__ */ jsx(CutBlocks, {}),
|
|
7822
7771
|
/* @__PURE__ */ jsx(CopyPasteBlocks, {}),
|
|
7823
7772
|
/* @__PURE__ */ jsx(RemoveBlocks, {})
|
|
7824
7773
|
] });
|
|
7825
|
-
},
|
|
7826
|
-
|
|
7827
|
-
/* @__PURE__ */ jsx(
|
|
7828
|
-
|
|
7774
|
+
}, BlockMoreOptions = ({ children: o, id: n, node: r }) => {
|
|
7775
|
+
const [, a] = useSelectedBlockIds();
|
|
7776
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
7777
|
+
DropdownMenu,
|
|
7778
|
+
{
|
|
7779
|
+
onOpenChange: (l) => {
|
|
7780
|
+
l && a([n]);
|
|
7781
|
+
},
|
|
7782
|
+
children: [
|
|
7783
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { children: o }),
|
|
7784
|
+
/* @__PURE__ */ jsx(BlockContextMenuContent, { node: r })
|
|
7785
|
+
]
|
|
7786
|
+
}
|
|
7787
|
+
) });
|
|
7788
|
+
}, placeholderStyle = {
|
|
7789
|
+
display: "flex",
|
|
7790
|
+
alignItems: "center",
|
|
7791
|
+
zIndex: 1
|
|
7792
|
+
}, DefaultCursor = React__default.memo(function({ top: n, left: r }) {
|
|
7793
|
+
const a = {
|
|
7794
|
+
position: "absolute",
|
|
7795
|
+
pointerEvents: "none",
|
|
7796
|
+
top: n + "px",
|
|
7797
|
+
left: r + "px",
|
|
7798
|
+
right: 0
|
|
7799
|
+
};
|
|
7800
|
+
return /* @__PURE__ */ jsx("div", { style: { ...placeholderStyle, ...a }, children: /* @__PURE__ */ jsx("div", { className: "h-0.5 flex-1 rounded-[1px] bg-green-500" }) });
|
|
7801
|
+
}), Overlay = memo(function({ children: n, isDragging: r }) {
|
|
7802
|
+
return r ? /* @__PURE__ */ jsx("div", { className: "pointer-events-none fixed left-0 top-0 z-[100] h-full w-full", children: n }) : null;
|
|
7803
|
+
}), DefaultDragPreview = memo(({ id: o, isDragging: n, mouse: r }) => {
|
|
7804
|
+
const [a] = useBlocksStore(), l = useMemo(() => a.find((c) => c._id === o), [a, o]), i = useMemo(
|
|
7805
|
+
() => ({
|
|
7806
|
+
transform: `translate(${(r == null ? void 0 : r.x) - 10}px, ${(r == null ? void 0 : r.y) - 10}px)`
|
|
7807
|
+
}),
|
|
7808
|
+
[r]
|
|
7809
|
+
);
|
|
7810
|
+
return r ? /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Overlay, { isDragging: n, children: /* @__PURE__ */ jsx(
|
|
7811
|
+
"div",
|
|
7812
|
+
{
|
|
7813
|
+
className: "pointer-events-none absolute z-50 rounded border border-border bg-gray-100/80 font-semibold text-blue-600 shadow-md dark:border-gray-700 dark:bg-gray-800",
|
|
7814
|
+
style: i,
|
|
7815
|
+
children: /* @__PURE__ */ jsxs("button", { type: "button", className: "flex !cursor-grab items-center p-0.5", "aria-label": `Type: ${l == null ? void 0 : l._type}`, children: [
|
|
7816
|
+
/* @__PURE__ */ jsx("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ jsx(TypeIcon, { type: l == null ? void 0 : l._type }) }),
|
|
7817
|
+
/* @__PURE__ */ jsx("div", { className: "ml-2 truncate text-[11px]", children: (l == null ? void 0 : l._name) || (l == null ? void 0 : l._type) })
|
|
7818
|
+
] })
|
|
7819
|
+
}
|
|
7820
|
+
) }) }) : /* @__PURE__ */ jsx("div", { className: "hidden" });
|
|
7821
|
+
}), defaultShortcuts = [
|
|
7829
7822
|
{ key: "ArrowDown", command: "selectNext" },
|
|
7830
7823
|
{ key: "ArrowUp", command: "selectPrev" },
|
|
7831
7824
|
{ key: "ArrowLeft", command: "selectParent", when: "isLeaf || isClosed" },
|
|
@@ -7859,23 +7852,7 @@ const selectParent = (o, n) => {
|
|
|
7859
7852
|
}, close = (o, n) => {
|
|
7860
7853
|
const r = o.selectedNodes[0];
|
|
7861
7854
|
r.isInternal && n && r.close();
|
|
7862
|
-
}
|
|
7863
|
-
function VscJson(o) {
|
|
7864
|
-
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 16 16", fill: "currentColor" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M6 2.984V2h-.09c-.313 0-.616.062-.909.185a2.33 2.33 0 0 0-.775.53 2.23 2.23 0 0 0-.493.753v.001a3.542 3.542 0 0 0-.198.83v.002a6.08 6.08 0 0 0-.024.863c.012.29.018.58.018.869 0 .203-.04.393-.117.572v.001a1.504 1.504 0 0 1-.765.787 1.376 1.376 0 0 1-.558.115H2v.984h.09c.195 0 .38.04.556.121l.001.001c.178.078.329.184.455.318l.002.002c.13.13.233.285.307.465l.001.002c.078.18.117.368.117.566 0 .29-.006.58-.018.869-.012.296-.004.585.024.87v.001c.033.283.099.558.197.824v.001c.106.273.271.524.494.753.223.23.482.407.775.53.293.123.596.185.91.185H6v-.984h-.09c-.2 0-.387-.038-.563-.115a1.613 1.613 0 0 1-.457-.32 1.659 1.659 0 0 1-.309-.467c-.074-.18-.11-.37-.11-.573 0-.228.003-.453.011-.672.008-.228.008-.45 0-.665a4.639 4.639 0 0 0-.055-.64 2.682 2.682 0 0 0-.168-.609A2.284 2.284 0 0 0 3.522 8a2.284 2.284 0 0 0 .738-.955c.08-.192.135-.393.168-.602.033-.21.051-.423.055-.64.008-.22.008-.442 0-.666-.008-.224-.012-.45-.012-.678a1.47 1.47 0 0 1 .877-1.354 1.33 1.33 0 0 1 .563-.121H6zm4 10.032V14h.09c.313 0 .616-.062.909-.185.293-.123.552-.3.775-.53.223-.23.388-.48.493-.753v-.001c.1-.266.165-.543.198-.83v-.002c.028-.28.036-.567.024-.863-.012-.29-.018-.58-.018-.869 0-.203.04-.393.117-.572v-.001a1.502 1.502 0 0 1 .765-.787 1.38 1.38 0 0 1 .558-.115H14v-.984h-.09c-.196 0-.381-.04-.557-.121l-.001-.001a1.376 1.376 0 0 1-.455-.318l-.002-.002a1.415 1.415 0 0 1-.307-.465v-.002a1.405 1.405 0 0 1-.118-.566c0-.29.006-.58.018-.869a6.174 6.174 0 0 0-.024-.87v-.001a3.537 3.537 0 0 0-.197-.824v-.001a2.23 2.23 0 0 0-.494-.753 2.331 2.331 0 0 0-.775-.53 2.325 2.325 0 0 0-.91-.185H10v.984h.09c.2 0 .387.038.562.115.174.082.326.188.457.32.127.134.23.29.309.467.074.18.11.37.11.573 0 .228-.003.452-.011.672-.008.228-.008.45 0 .665.004.222.022.435.055.64.033.214.089.416.168.609a2.285 2.285 0 0 0 .738.955 2.285 2.285 0 0 0-.738.955 2.689 2.689 0 0 0-.168.602c-.033.21-.051.423-.055.64a9.15 9.15 0 0 0 0 .666c.008.224.012.45.012.678a1.471 1.471 0 0 1-.877 1.354 1.33 1.33 0 0 1-.563.121H10z" }, child: [] }] })(o);
|
|
7865
|
-
}
|
|
7866
|
-
function BsLightningFill(o) {
|
|
7867
|
-
return GenIcon({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641z" }, child: [] }] })(o);
|
|
7868
|
-
}
|
|
7869
|
-
function TbEyeDown(o) {
|
|
7870
|
-
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M12 18c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6" }, child: [] }, { tag: "path", attr: { d: "M19 16v6" }, child: [] }, { tag: "path", attr: { d: "M22 19l-3 3l-3 -3" }, child: [] }] })(o);
|
|
7871
|
-
}
|
|
7872
|
-
function BiCollapseVertical(o) {
|
|
7873
|
-
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 7.59 7.05 2.64 5.64 4.05 12 10.41l6.36-6.36-1.41-1.41L12 7.59zM5.64 19.95l1.41 1.41L12 16.41l4.95 4.95 1.41-1.41L12 13.59l-6.36 6.36z" }, child: [] }] })(o);
|
|
7874
|
-
}
|
|
7875
|
-
function BiExpandVertical(o) {
|
|
7876
|
-
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "m12 19.24-4.95-4.95-1.41 1.42L12 22.07l6.36-6.36-1.41-1.42L12 19.24zM5.64 8.29l1.41 1.42L12 4.76l4.95 4.95 1.41-1.42L12 1.93 5.64 8.29z" }, child: [] }] })(o);
|
|
7877
|
-
}
|
|
7878
|
-
const currentAddSelection = atom$1(null), Node = memo(({ node: o, style: n, dragHandle: r }) => {
|
|
7855
|
+
}, currentAddSelection = atom$1(null), Node = memo(({ node: o, style: n, dragHandle: r }) => {
|
|
7879
7856
|
var R;
|
|
7880
7857
|
const a = useBuilderProp("outlineMenuItems", []), { t: l } = useTranslation(), [i, , c] = useHiddenBlockIds(), [d] = useAtom$1(canvasIframeAtom);
|
|
7881
7858
|
let p = null;
|
|
@@ -7932,7 +7909,7 @@ const currentAddSelection = atom$1(null), Node = memo(({ node: o, style: n, drag
|
|
|
7932
7909
|
}
|
|
7933
7910
|
),
|
|
7934
7911
|
/* @__PURE__ */ jsx("br", {})
|
|
7935
|
-
] }) : /* @__PURE__ */ jsx(
|
|
7912
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxs(
|
|
7936
7913
|
"div",
|
|
7937
7914
|
{
|
|
7938
7915
|
onMouseEnter: () => g(m),
|
|
@@ -7982,12 +7959,7 @@ const currentAddSelection = atom$1(null), Node = memo(({ node: o, style: n, drag
|
|
|
7982
7959
|
"div",
|
|
7983
7960
|
{
|
|
7984
7961
|
className: `flex h-4 w-4 rotate-0 transform cursor-pointer items-center justify-center transition-transform duration-100 ${o.isOpen ? "rotate-90" : ""}`,
|
|
7985
|
-
children: u && /* @__PURE__ */ jsx("button", { onClick: C, type: "button", children: /* @__PURE__ */ jsx(
|
|
7986
|
-
ChevronRight,
|
|
7987
|
-
{
|
|
7988
|
-
className: `h-3 w-3 stroke-[3] ${x ? "text-slate-200" : "text-slate-400"}`
|
|
7989
|
-
}
|
|
7990
|
-
) })
|
|
7962
|
+
children: u && /* @__PURE__ */ jsx("button", { onClick: C, type: "button", children: /* @__PURE__ */ jsx(ChevronRight, { className: `h-3 w-3 stroke-[3] ${x ? "text-slate-200" : "text-slate-400"}` }) })
|
|
7991
7963
|
}
|
|
7992
7964
|
),
|
|
7993
7965
|
/* @__PURE__ */ jsxs("div", { className: "leading-1 flex items-center", children: [
|
|
@@ -8046,14 +8018,15 @@ const currentAddSelection = atom$1(null), Node = memo(({ node: o, style: n, drag
|
|
|
8046
8018
|
}
|
|
8047
8019
|
),
|
|
8048
8020
|
/* @__PURE__ */ jsx(TooltipContent, { className: "isolate z-[9999]", side: "left", children: l("Hide block") })
|
|
8049
|
-
] })
|
|
8021
|
+
] }),
|
|
8022
|
+
/* @__PURE__ */ jsx(BlockMoreOptions, { node: o, id: m, children: /* @__PURE__ */ jsx(BsThreeDotsVertical, { size: "15" }) })
|
|
8050
8023
|
] })
|
|
8051
8024
|
]
|
|
8052
8025
|
}
|
|
8053
8026
|
)
|
|
8054
8027
|
]
|
|
8055
8028
|
}
|
|
8056
|
-
) })
|
|
8029
|
+
) });
|
|
8057
8030
|
}), Input = ({ node: o }) => {
|
|
8058
8031
|
var n, r;
|
|
8059
8032
|
return /* @__PURE__ */ jsx(
|
|
@@ -9281,7 +9254,7 @@ const ChooseLayout = ({ open: o, close: n }) => {
|
|
|
9281
9254
|
)
|
|
9282
9255
|
] }) })
|
|
9283
9256
|
] }) });
|
|
9284
|
-
}, TopBar = lazy(() => import("./Topbar-
|
|
9257
|
+
}, TopBar = lazy(() => import("./Topbar-DZ2jHLv7.js"));
|
|
9285
9258
|
function useSidebarMenuItems() {
|
|
9286
9259
|
return useMemo(() => compact([
|
|
9287
9260
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),_e=require("react"),Ae=require("@radix-ui/react-accordion"),x=require("@radix-ui/react-icons"),Ie=require("@radix-ui/react-alert-dialog"),Me=require("@radix-ui/react-slot"),v=require("class-variance-authority"),l=require("cmdk"),ze=require("@radix-ui/react-dialog"),qe=require("@radix-ui/react-dropdown-menu"),He=require("@radix-ui/react-hover-card"),Le=require("@radix-ui/react-label"),Oe=require("@radix-ui/react-popover"),Ge=require("@radix-ui/react-scroll-area"),Fe=require("@radix-ui/react-separator"),Be=require("next-themes"),Ve=require("sonner"),Ee=require("@radix-ui/react-switch"),Je=require("@radix-ui/react-tabs"),Ke=require("@radix-ui/react-tooltip"),Qe=require("clsx"),Ue=require("tailwind-merge");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const s=m(_e),f=m(Ae),i=m(Ie),c=m(ze),d=m(qe),N=m(He),R=m(Le),y=m(Oe),u=m(Ge),T=m(Fe),h=m(Ee),g=m(Je),b=m(Ke),r=(...e)=>Ue.twMerge(Qe.clsx(e)),We=f.Root,k=s.forwardRef(({className:e,...t},a)=>o.jsx(f.Item,{ref:a,className:r("border-b",e),...t}));k.displayName="AccordionItem";const S=s.forwardRef(({className:e,children:t,...a},n)=>o.jsx(f.Header,{className:"flex",children:o.jsxs(f.Trigger,{ref:n,className:r("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...a,children:[t,a.hideArrow?null:o.jsx(x.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));S.displayName=f.Trigger.displayName;const P=s.forwardRef(({className:e,children:t,...a},n)=>o.jsx(f.Content,{ref:n,className:r("text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...a,children:o.jsx("div",{className:"pb-4 pt-0",children:t})}));P.displayName=f.Content.displayName;const w=v.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"}}),_=s.forwardRef(({className:e,variant:t,size:a,asChild:n=!1,...p},Se)=>{const Pe=n?Me.Slot:"button";return o.jsx(Pe,{className:r(w({variant:t,size:a,className:e})),ref:Se,...p})});_.displayName="Button";const Xe=i.Root,Ye=i.Trigger,A=({className:e,...t})=>o.jsx(i.Portal,{className:r(e),...t});A.displayName=i.Portal.displayName;const I=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Overlay,{className:r("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:a}));I.displayName=i.Overlay.displayName;const M=s.forwardRef(({className:e,...t},a)=>o.jsxs(A,{children:[o.jsx(I,{}),o.jsx(i.Content,{ref:a,className:r("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})]}));M.displayName=i.Content.displayName;const z=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-2 text-center sm:text-left",e),...t});z.displayName="AlertDialogHeader";const q=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});q.displayName="AlertDialogFooter";const H=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Title,{ref:a,className:r("text-lg font-semibold",e),...t}));H.displayName=i.Title.displayName;const L=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));L.displayName=i.Description.displayName;const O=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Action,{ref:a,className:r(w(),e),...t}));O.displayName=i.Action.displayName;const G=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Cancel,{ref:a,className:r(w({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));G.displayName=i.Cancel.displayName;const F=v.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"}}),Ze=({className:e,variant:t,...a})=>o.jsx("div",{className:r(F({variant:t}),e),...a}),B=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("rounded-xl border bg-card text-card-foreground shadow",e),...t}));B.displayName="Card";const V=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("flex flex-col space-y-1.5 p-6",e),...t}));V.displayName="CardHeader";const E=s.forwardRef(({className:e,...t},a)=>o.jsx("h3",{ref:a,className:r("font-semibold leading-none tracking-tight",e),...t}));E.displayName="CardTitle";const J=s.forwardRef(({className:e,...t},a)=>o.jsx("p",{ref:a,className:r("text-sm text-muted-foreground",e),...t}));J.displayName="CardDescription";const K=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("p-6 pt-0",e),...t}));K.displayName="CardContent";const Q=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r(" flex items-center p-6 pt-0",e),...t}));Q.displayName="CardFooter";const U=c.Root,$e=c.Trigger,W=({className:e,...t})=>o.jsx(c.Portal,{className:r(e),...t});W.displayName=c.Portal.displayName;const X=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Overlay,{ref:a,className:r("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}));X.displayName=c.Overlay.displayName;const C=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(W,{children:[o.jsx(X,{}),o.jsxs(c.Content,{ref:n,className:r("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),...a,children:[t,o.jsxs(c.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:[o.jsx(x.Cross2Icon,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));C.displayName=c.Content.displayName;const Y=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Y.displayName="DialogHeader";const Z=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Z.displayName="DialogFooter";const $=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Title,{ref:a,className:r("text-lg font-semibold leading-none tracking-tight",e),...t}));$.displayName=c.Title.displayName;const ee=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));ee.displayName=c.Description.displayName;const j=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Command,{ref:a,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));j.displayName=l.Command.displayName;const et=({children:e,...t})=>o.jsx(U,{...t,children:o.jsx(C,{className:"overflow-hidden p-0",children:o.jsx(j,{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})})}),te=s.forwardRef(({className:e,...t},a)=>o.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[o.jsx(x.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),o.jsx(l.Command.Input,{ref:a,className:r("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})]}));te.displayName=l.Command.Input.displayName;const ae=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Command.List,{ref:a,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));ae.displayName=l.Command.List.displayName;const oe=s.forwardRef((e,t)=>o.jsx(l.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));oe.displayName=l.Command.Empty.displayName;const re=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Command.Group,{ref:a,className:r("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}));re.displayName=l.Command.Group.displayName;const se=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Command.Separator,{ref:a,className:r("-mx-1 h-px bg-border",e),...t}));se.displayName=l.Command.Separator.displayName;const ne=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Command.Item,{ref:a,className:r("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}));ne.displayName=l.Command.Item.displayName;const de=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});de.displayName="CommandShortcut";const tt=d.Root,at=d.Trigger,ot=d.Group,rt=d.Portal,st=d.Sub,nt=d.RadioGroup,ie=s.forwardRef(({className:e,inset:t,children:a,...n},p)=>o.jsxs(d.SubTrigger,{ref:p,className:r("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:[a,o.jsx(x.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));ie.displayName=d.SubTrigger.displayName;const le=s.forwardRef(({className:e,...t},a)=>o.jsx(d.SubContent,{ref:a,className:r("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}));le.displayName=d.SubContent.displayName;const ce=s.forwardRef(({className:e,sideOffset:t=4,...a},n)=>o.jsx(d.Portal,{children:o.jsx(d.Content,{ref:n,sideOffset:t,className:r("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),...a})}));ce.displayName=d.Content.displayName;const me=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(d.Item,{ref:n,className:r("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),...a}));me.displayName=d.Item.displayName;const pe=s.forwardRef(({className:e,children:t,checked:a,...n},p)=>o.jsxs(d.CheckboxItem,{ref:p,className:r("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:a,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(d.ItemIndicator,{children:o.jsx(x.CheckIcon,{className:"h-4 w-4"})})}),t]}));pe.displayName=d.CheckboxItem.displayName;const ue=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(d.RadioItem,{ref:n,className:r("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),...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(d.ItemIndicator,{children:o.jsx(x.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));ue.displayName=d.RadioItem.displayName;const fe=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(d.Label,{ref:n,className:r("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));fe.displayName=d.Label.displayName;const ge=s.forwardRef(({className:e,...t},a)=>o.jsx(d.Separator,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));ge.displayName=d.Separator.displayName;const xe=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest opacity-60",e),...t});xe.displayName="DropdownMenuShortcut";const dt=N.Root,it=N.Trigger,be=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...n},p)=>o.jsx(N.Content,{ref:p,align:t,sideOffset:a,className:r("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}));be.displayName=N.Content.displayName;const ye=s.forwardRef(({className:e,type:t,...a},n)=>o.jsx("input",{type:t,className:r("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,...a,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));ye.displayName="Input";const lt=v.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ne=s.forwardRef(({className:e,...t},a)=>o.jsx(R.Root,{ref:a,className:r(lt(),e),...t}));Ne.displayName=R.Root.displayName;const ct=y.Root,mt=y.Trigger,we=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...n},p)=>o.jsx(y.Portal,{children:o.jsx(y.Content,{ref:p,align:t,sideOffset:a,className:r("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})}));we.displayName=y.Content.displayName;const he=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(u.Root,{ref:n,className:r("relative overflow-hidden",e),...a,children:[o.jsx(u.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),o.jsx(D,{}),o.jsx(u.Corner,{})]}));he.displayName=u.Root.displayName;const D=s.forwardRef(({className:e,orientation:t="vertical",...a},n)=>o.jsx(u.ScrollAreaScrollbar,{ref:n,orientation:t,className:r("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),...a,children:o.jsx(u.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));D.displayName=u.ScrollAreaScrollbar.displayName;const ve=s.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...n},p)=>o.jsx(T.Root,{ref:p,decorative:a,orientation:t,className:r("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));ve.displayName=T.Root.displayName;const pt=({className:e,...t})=>o.jsx("div",{className:r("animate-pulse rounded-md bg-primary/10",e),...t}),ut=({...e})=>{const{theme:t="system"}=Be.useTheme();return o.jsx(Ve.Toaster,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},Ce=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Root,{className:r("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:a,children:o.jsx(h.Thumb,{className:r("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")})}));Ce.displayName=h.Root.displayName;const ft=g.Root,je=s.forwardRef(({className:e,...t},a)=>o.jsx(g.List,{ref:a,className:r("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));je.displayName=g.List.displayName;const De=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Trigger,{ref:a,className:r("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}));De.displayName=g.Trigger.displayName;const Re=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Content,{ref:a,className:r("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Re.displayName=g.Content.displayName;const Te=s.forwardRef(({className:e,...t},a)=>o.jsx("textarea",{className:r("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:a,...t,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));Te.displayName="Textarea";const gt=b.Portal,xt=b.Provider,bt=b.Root,yt=b.Trigger,ke=s.forwardRef(({className:e,sideOffset:t=4,...a},n)=>o.jsx(b.Content,{ref:n,sideOffset:t,className:r("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),...a}));ke.displayName=b.Content.displayName;exports.Accordion=We;exports.AccordionContent=P;exports.AccordionItem=k;exports.AccordionTrigger=S;exports.AlertDialog=Xe;exports.AlertDialogAction=O;exports.AlertDialogCancel=G;exports.AlertDialogContent=M;exports.AlertDialogDescription=L;exports.AlertDialogFooter=q;exports.AlertDialogHeader=z;exports.AlertDialogTitle=H;exports.AlertDialogTrigger=Ye;exports.Badge=Ze;exports.Button=_;exports.Card=B;exports.CardContent=K;exports.CardDescription=J;exports.CardFooter=Q;exports.CardHeader=V;exports.CardTitle=E;exports.Command=j;exports.CommandDialog=et;exports.CommandEmpty=oe;exports.CommandGroup=re;exports.CommandInput=te;exports.CommandItem=ne;exports.CommandList=ae;exports.CommandSeparator=se;exports.CommandShortcut=de;exports.Dialog=U;exports.DialogContent=C;exports.DialogDescription=ee;exports.DialogFooter=Z;exports.DialogHeader=Y;exports.DialogTitle=$;exports.DialogTrigger=$e;exports.DropdownMenu=tt;exports.DropdownMenuCheckboxItem=pe;exports.DropdownMenuContent=ce;exports.DropdownMenuGroup=ot;exports.DropdownMenuItem=me;exports.DropdownMenuLabel=fe;exports.DropdownMenuPortal=rt;exports.DropdownMenuRadioGroup=nt;exports.DropdownMenuRadioItem=ue;exports.DropdownMenuSeparator=ge;exports.DropdownMenuShortcut=xe;exports.DropdownMenuSub=st;exports.DropdownMenuSubContent=le;exports.DropdownMenuSubTrigger=ie;exports.DropdownMenuTrigger=at;exports.HoverCard=dt;exports.HoverCardContent=be;exports.HoverCardTrigger=it;exports.Input=ye;exports.Label=Ne;exports.Popover=ct;exports.PopoverContent=we;exports.PopoverTrigger=mt;exports.ScrollArea=he;exports.ScrollBar=D;exports.Separator=ve;exports.Skeleton=pt;exports.Switch=Ce;exports.Tabs=ft;exports.TabsContent=Re;exports.TabsList=je;exports.TabsTrigger=De;exports.Textarea=Te;exports.Toaster=ut;exports.Tooltip=bt;exports.TooltipContent=ke;exports.TooltipPortal=gt;exports.TooltipProvider=xt;exports.TooltipTrigger=yt;exports.badgeVariants=F;exports.buttonVariants=w;exports.cn=r;
|