treege 3.0.0-beta.41 → 3.0.0-beta.42

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.
@@ -1,30 +1,30 @@
1
- import { A as e, E as t, F as n, I as r, L as i, N as a, P as o, T as s, j as c, k as l, t as u } from "./ThemeContext-Ejgu9Mwr.js";
2
- import { $ as d, A as f, B as p, F as m, G as h, H as g, I as _, J as v, K as y, L as b, M as ee, N as te, P as x, Q as ne, R as S, U as C, V as re, W as w, X as ie, Y as T, Z as ae, _ as oe, at as E, c as D, et as O, it as k, j as se, k as ce, nt as A, o as le, p as ue, q as de, rt as fe, t as pe, tt as j, v as me, z as he } from "./DefaultInputs-xMZhO-ry.js";
3
- import { Background as ge, BackgroundVariant as _e, BaseEdge as ve, Controls as ye, EdgeLabelRenderer as be, Handle as xe, MiniMap as Se, NodeResizer as Ce, Panel as we, Position as Te, ReactFlow as Ee, ReactFlowProvider as De, addEdge as Oe, getBezierPath as ke, useEdges as Ae, useNodes as je, useNodesInitialized as Me, useReactFlow as M, useStore as Ne } from "@xyflow/react";
4
- import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
5
- import { useForm as Pe } from "@tanstack/react-form";
6
- import { AlignLeft as Fe, ArrowRightFromLine as Ie, Boxes as Le, Calendar as Re, CalendarRange as ze, CaseSensitive as Be, Check as Ve, CheckSquare as He, ChevronDown as Ue, ChevronsUpDown as We, CircleDot as Ge, Clock as Ke, ClockFading as qe, Cloud as Je, Copy as Ye, Download as Xe, EllipsisVertical as Ze, EyeOff as Qe, Hash as $e, Heading as et, ImagePlus as tt, KeyRound as nt, Link2 as rt, ListFilter as it, Loader2 as at, MapPin as ot, Minus as st, MoreVertical as ct, Network as lt, Paperclip as ut, Plus as I, PlusCircle as dt, RectangleEllipsis as ft, Save as pt, Search as mt, Send as ht, Settings as gt, ToggleLeft as _t, Trash2 as vt, Upload as yt, Variable as bt, WandSparkles as xt, Waypoints as St, X as L, XIcon as Ct } from "lucide-react";
7
- import { createContext as wt, memo as Tt, useCallback as R, useContext as Et, useEffect as Dt, useId as Ot, useMemo as kt, useRef as At, useState as z } from "react";
8
- import { Slot as jt } from "@radix-ui/react-slot";
9
- import { cva as Mt } from "class-variance-authority";
10
- import * as Nt from "@radix-ui/react-scroll-area";
11
- import * as B from "@radix-ui/react-dropdown-menu";
12
- import * as Pt from "@radix-ui/react-dialog";
13
- import { Toaster as Ft, toast as V } from "sonner";
14
- import * as It from "@radix-ui/react-collapsible";
15
- import Lt from "@dagrejs/dagre";
16
- import { useTheme as Rt } from "next-themes";
1
+ import { A as e, E as t, F as n, I as r, L as i, N as a, P as o, T as s, j as c, k as l, t as u } from "./ThemeContext-CUHjGVUf.js";
2
+ import { $ as d, A as f, B as p, F as m, G as h, H as g, I as _, J as v, K as y, L as ee, M as te, N as b, P as x, Q as ne, R as S, U as C, V as re, W as w, X as ie, Y as T, Z as ae, _ as E, at as D, c as O, et as k, it as A, j as oe, k as se, nt as j, o as ce, p as le, q as ue, rt as de, t as fe, tt as M, v as pe, z as me } from "./DefaultInputs-Cr6wTVNE.js";
3
+ import { Background as he, BackgroundVariant as ge, BaseEdge as _e, ControlButton as ve, Controls as ye, EdgeLabelRenderer as be, Handle as xe, MiniMap as Se, NodeResizer as Ce, Panel as we, Position as Te, ReactFlow as Ee, ReactFlowProvider as De, addEdge as Oe, getBezierPath as ke, useEdges as Ae, useNodes as je, useNodesInitialized as Me, useReactFlow as N, useStore as Ne } from "@xyflow/react";
4
+ import { createContext as Pe, memo as Fe, useCallback as P, useContext as Ie, useEffect as Le, useId as Re, useMemo as ze, useRef as Be, useState as F } from "react";
5
+ import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
6
+ import { useForm as Ve } from "@tanstack/react-form";
7
+ import { AlignLeft as He, ArrowRightFromLine as Ue, Boxes as We, Calendar as Ge, CalendarRange as Ke, CaseSensitive as qe, Check as Je, CheckSquare as Ye, ChevronDown as Xe, ChevronsUpDown as Ze, CircleDot as Qe, Clock as $e, ClockFading as et, Cloud as tt, Copy as nt, Download as rt, EllipsisVertical as it, EyeOff as at, Hash as ot, Heading as st, ImagePlus as ct, KeyRound as lt, Link2 as ut, ListFilter as dt, Loader2 as ft, MapPin as pt, MapPinMinusInside as mt, Minus as ht, MoreVertical as gt, Network as _t, Paperclip as vt, Plus as z, PlusCircle as yt, RectangleEllipsis as bt, Save as xt, Search as St, Send as Ct, Settings as wt, ToggleLeft as Tt, Trash2 as Et, Upload as Dt, Variable as Ot, WandSparkles as kt, Waypoints as At, X as B, XIcon as jt } from "lucide-react";
8
+ import { Slot as Mt } from "@radix-ui/react-slot";
9
+ import { cva as Nt } from "class-variance-authority";
10
+ import * as Pt from "@radix-ui/react-scroll-area";
11
+ import * as V from "@radix-ui/react-dropdown-menu";
12
+ import * as Ft from "@radix-ui/react-dialog";
13
+ import It from "@dagrejs/dagre";
14
+ import { Toaster as Lt, toast as H } from "sonner";
15
+ import * as Rt from "@radix-ui/react-collapsible";
16
+ import { useTheme as zt } from "next-themes";
17
17
  //#region src/editor/assets/img/treege-black.svg
18
- var zt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1809_3434)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1303%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.455%2046.7988C17.0611%2047.1509%2017.7491%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34V41.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.251%20116.58%20138.64L151.39%2078.3401C151.741%2077.7316%20151.926%2077.0413%20151.926%2076.3386C151.926%2075.636%20151.74%2074.9458%20151.389%2074.3375C151.037%2073.7293%20150.531%2073.2244%20149.922%2072.8738C149.313%2072.5231%20148.623%2072.3391%20147.92%2072.3401H92.48C91.4191%2072.3401%2090.4017%2072.7615%2089.6516%2073.5117C88.9014%2074.2618%2088.48%2075.2792%2088.48%2076.3401V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.469C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.3201H3.99999C3.29819%2072.3208%202.60893%2072.5061%202.00143%2072.8575C1.39392%2073.2089%200.88955%2073.7139%200.538962%2074.3218C0.188375%2074.9298%200.00390931%2075.6193%200.00408949%2076.3211C0.00426966%2077.0229%200.189089%2077.7123%200.539989%2078.3201L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.489C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.3101C63.4773%2075.2509%2063.0547%2074.2361%2062.3049%2073.4881C61.555%2072.7401%2060.5391%2072.3201%2059.48%2072.3201V72.3201Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='black'/%3e%3cdefs%3e%3cclipPath%20id='clip0_1809_3434'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", Bt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2_65)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1302%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.4549%2046.7988C17.061%2047.1509%2017.749%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.25%20116.58%20138.64L151.39%2078.34C151.741%2077.7315%20151.926%2077.0412%20151.926%2076.3385C151.926%2075.6359%20151.74%2074.9457%20151.389%2074.3374C151.037%2073.7292%20150.531%2073.2243%20149.922%2072.8737C149.313%2072.523%20148.623%2072.339%20147.92%2072.34H92.48C91.4191%2072.34%2090.4017%2072.7614%2089.6516%2073.5116C88.9014%2074.2617%2088.48%2075.2791%2088.48%2076.34V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.468C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.32H4C3.2982%2072.3207%202.60894%2072.5061%202.00143%2072.8574C1.39393%2073.2088%200.889558%2073.7138%200.53897%2074.3218C0.188382%2074.9297%200.00391694%2075.6192%200.00409712%2076.321C0.00427729%2077.0228%200.189097%2077.7122%200.539997%2078.32L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.488C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.31C63.4773%2075.2509%2063.0548%2074.236%2062.3049%2073.488C61.555%2072.7401%2060.5391%2072.32%2059.48%2072.32Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_2_65'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", Vt = ({ theme: e = "dark" }) => /* @__PURE__ */ P("div", {
19
- className: "tg:absolute tg:top-5 tg:left-5 tg:z-50 tg:select-none",
20
- children: /* @__PURE__ */ P("img", {
21
- src: e === "dark" ? Bt : zt,
18
+ var Bt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1809_3434)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1303%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.455%2046.7988C17.0611%2047.1509%2017.7491%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34V41.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.251%20116.58%20138.64L151.39%2078.3401C151.741%2077.7316%20151.926%2077.0413%20151.926%2076.3386C151.926%2075.636%20151.74%2074.9458%20151.389%2074.3375C151.037%2073.7293%20150.531%2073.2244%20149.922%2072.8738C149.313%2072.5231%20148.623%2072.3391%20147.92%2072.3401H92.48C91.4191%2072.3401%2090.4017%2072.7615%2089.6516%2073.5117C88.9014%2074.2618%2088.48%2075.2792%2088.48%2076.3401V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.469C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.3201H3.99999C3.29819%2072.3208%202.60893%2072.5061%202.00143%2072.8575C1.39392%2073.2089%200.88955%2073.7139%200.538962%2074.3218C0.188375%2074.9298%200.00390931%2075.6193%200.00408949%2076.3211C0.00426966%2077.0229%200.189089%2077.7123%200.539989%2078.3201L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.489C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.3101C63.4773%2075.2509%2063.0547%2074.2361%2062.3049%2073.4881C61.555%2072.7401%2060.5391%2072.3201%2059.48%2072.3201V72.3201Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='black'/%3e%3cdefs%3e%3cclipPath%20id='clip0_1809_3434'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", Vt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2_65)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1302%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.4549%2046.7988C17.061%2047.1509%2017.749%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.25%20116.58%20138.64L151.39%2078.34C151.741%2077.7315%20151.926%2077.0412%20151.926%2076.3385C151.926%2075.6359%20151.74%2074.9457%20151.389%2074.3374C151.037%2073.7292%20150.531%2073.2243%20149.922%2072.8737C149.313%2072.523%20148.623%2072.339%20147.92%2072.34H92.48C91.4191%2072.34%2090.4017%2072.7614%2089.6516%2073.5116C88.9014%2074.2617%2088.48%2075.2791%2088.48%2076.34V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.468C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.32H4C3.2982%2072.3207%202.60894%2072.5061%202.00143%2072.8574C1.39393%2073.2088%200.889558%2073.7138%200.53897%2074.3218C0.188382%2074.9297%200.00391694%2075.6192%200.00409712%2076.321C0.00427729%2077.0228%200.189097%2077.7122%200.539997%2078.32L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.488C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.31C63.4773%2075.2509%2063.0548%2074.236%2062.3049%2073.488C61.555%2072.7401%2060.5391%2072.32%2059.48%2072.32Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_2_65'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", Ht = ({ theme: e = "dark" }) => /* @__PURE__ */ L("div", {
19
+ className: "tg:absolute tg:top-4 tg:left-5 tg:z-50 tg:select-none tg:md:top-5",
20
+ children: /* @__PURE__ */ L("img", {
21
+ src: e === "dark" ? Vt : Bt,
22
22
  alt: "Treege",
23
- className: "tg:relative tg:h-14 tg:w-auto tg:drop-shadow-[0_0px_35px] tg:drop-shadow-blue-600"
23
+ className: "tg:relative tg:h-7 tg:w-auto tg:drop-shadow-[0_0px_35px] tg:drop-shadow-blue-600 tg:md:h-14"
24
24
  })
25
- }), Ht = (e) => {
25
+ }), Ut = (e) => {
26
26
  let t = je(), n = Ae();
27
- return kt(() => {
27
+ return ze(() => {
28
28
  if (!e) return [];
29
29
  let i = (e, t = /* @__PURE__ */ new Set()) => {
30
30
  if (t.has(e)) return [];
@@ -45,8 +45,8 @@ var zt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%20
45
45
  t,
46
46
  n
47
47
  ]);
48
- }, Ut = wt(null), Wt = ({ children: e, value: t }) => {
49
- let [n, r] = z(t?.flowId), [i, a] = z(!1), [o, s] = z(null), [c, l] = z(null), u = kt(() => ({
48
+ }, Wt = Pe(null), Gt = ({ children: e, value: t }) => {
49
+ let [n, r] = F(t?.flowId), [i, a] = F(!1), [o, s] = F(null), [c, l] = F(null), u = ze(() => ({
50
50
  ...t,
51
51
  ...t?.aiConfig && { aiConfig: {
52
52
  ...t.aiConfig,
@@ -69,11 +69,11 @@ var zt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%20
69
69
  o,
70
70
  c
71
71
  ]);
72
- return /* @__PURE__ */ P(Ut.Provider, {
72
+ return /* @__PURE__ */ L(Wt.Provider, {
73
73
  value: u,
74
74
  children: e
75
75
  });
76
- }, H = () => Et(Ut) ?? {
76
+ }, U = () => Ie(Wt) ?? {
77
77
  closeDeleteNodeConfirmation: () => {},
78
78
  closeNodeTypeChangeConfirmation: () => {},
79
79
  flowId: void 0,
@@ -85,35 +85,35 @@ var zt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%20
85
85
  pendingNodeTypeChange: null,
86
86
  setFlowId: () => {},
87
87
  setIsNodeSheetOpen: () => {}
88
- }, U = (e) => {
89
- let t = H();
88
+ }, W = (e) => {
89
+ let t = U();
90
90
  return c(e ?? t.language);
91
91
  };
92
92
  //#endregion
93
93
  //#region src/shared/components/ui/scroll-area.tsx
94
- function Gt({ className: e, children: t, ...n }) {
95
- return /* @__PURE__ */ F(Nt.Root, {
94
+ function Kt({ className: e, children: t, ...n }) {
95
+ return /* @__PURE__ */ R(Pt.Root, {
96
96
  "data-slot": "scroll-area",
97
- className: E("tg:relative", e),
97
+ className: D("tg:relative", e),
98
98
  ...n,
99
99
  children: [
100
- /* @__PURE__ */ P(Nt.Viewport, {
100
+ /* @__PURE__ */ L(Pt.Viewport, {
101
101
  "data-slot": "scroll-area-viewport",
102
102
  className: "tg:size-full tg:rounded-[inherit] tg:outline-none tg:transition-[color,box-shadow] tg:focus-visible:outline-1 tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50",
103
103
  children: t
104
104
  }),
105
- /* @__PURE__ */ P(Kt, {}),
106
- /* @__PURE__ */ P(Nt.Corner, {})
105
+ /* @__PURE__ */ L(qt, {}),
106
+ /* @__PURE__ */ L(Pt.Corner, {})
107
107
  ]
108
108
  });
109
109
  }
110
- function Kt({ className: e, orientation: t = "vertical", ...n }) {
111
- return /* @__PURE__ */ P(Nt.ScrollAreaScrollbar, {
110
+ function qt({ className: e, orientation: t = "vertical", ...n }) {
111
+ return /* @__PURE__ */ L(Pt.ScrollAreaScrollbar, {
112
112
  "data-slot": "scroll-area-scrollbar",
113
113
  orientation: t,
114
- className: E("tg:flex tg:touch-none tg:select-none tg:p-px tg:transition-colors", t === "vertical" && "tg:h-full tg:w-2.5 tg:border-l tg:border-l-transparent", t === "horizontal" && "tg:h-2.5 tg:flex-col tg:border-t tg:border-t-transparent", e),
114
+ className: D("tg:flex tg:touch-none tg:select-none tg:p-px tg:transition-colors", t === "vertical" && "tg:h-full tg:w-2.5 tg:border-l tg:border-l-transparent", t === "horizontal" && "tg:h-2.5 tg:flex-col tg:border-t tg:border-t-transparent", e),
115
115
  ...n,
116
- children: /* @__PURE__ */ P(Nt.ScrollAreaThumb, {
116
+ children: /* @__PURE__ */ L(Pt.ScrollAreaThumb, {
117
117
  "data-slot": "scroll-area-thumb",
118
118
  className: "tg:relative tg:flex-1 tg:rounded-full tg:bg-border"
119
119
  })
@@ -121,15 +121,15 @@ function Kt({ className: e, orientation: t = "vertical", ...n }) {
121
121
  }
122
122
  //#endregion
123
123
  //#region src/editor/features/TreegeEditor/edges/ConditionalEdge.tsx
124
- var qt = {
124
+ var Jt = {
125
125
  "!==": "≠",
126
126
  "<": "<",
127
127
  "<=": "≤",
128
128
  "===": "=",
129
129
  ">": ">",
130
130
  ">=": "≥"
131
- }, Jt = (e) => !!e.field && e.value !== void 0 && e.value !== "", Yt = {
132
- conditional: Tt(({ id: t, target: n, sourceX: r, sourceY: i, targetX: a, targetY: o, sourcePosition: s, targetPosition: c, markerEnd: l, style: u, data: f }) => {
131
+ }, Yt = (e) => !!e.field && e.value !== void 0 && e.value !== "", Xt = {
132
+ conditional: Fe(({ id: t, target: n, sourceX: r, sourceY: i, targetX: a, targetY: o, sourcePosition: s, targetPosition: c, markerEnd: l, style: u, data: f }) => {
133
133
  let [p, m, _] = ke({
134
134
  sourcePosition: s,
135
135
  sourceX: r,
@@ -137,10 +137,10 @@ var qt = {
137
137
  targetPosition: c,
138
138
  targetX: a,
139
139
  targetY: o
140
- }), [y, b] = z(!1), { updateEdgeData: ee } = M(), te = Ht(n), x = U(), S = !!f?.configured || !!f?.isFallback || !!f?.label || (f?.conditions?.some(Jt) ?? !1), { handleSubmit: re, reset: w, Field: oe } = Pe({
140
+ }), [y, ee] = F(!1), { updateEdgeData: te } = N(), b = Ut(n), x = W(), S = !!f?.configured || !!f?.isFallback || !!f?.label || (f?.conditions?.some(Yt) ?? !1), { handleSubmit: re, reset: w, Field: E } = Ve({
141
141
  defaultValues: {
142
142
  conditions: f?.conditions || [{
143
- field: te[0]?.nodeId ?? "",
143
+ field: b[0]?.nodeId ?? "",
144
144
  operator: "===",
145
145
  value: ""
146
146
  }],
@@ -154,163 +154,163 @@ var qt = {
154
154
  onChangeDebounceMs: 150
155
155
  },
156
156
  onSubmit: ({ value: e }) => {
157
- ee(t, {
157
+ te(t, {
158
158
  ...e,
159
159
  configured: !0
160
160
  });
161
161
  }
162
- }), D = (e) => {
162
+ }), O = (e) => {
163
163
  e.stopPropagation();
164
- }, se = () => {
164
+ }, oe = () => {
165
165
  w({
166
166
  conditions: [],
167
167
  isFallback: !1,
168
168
  label: ""
169
- }), ee(t, {
169
+ }), te(t, {
170
170
  conditions: void 0,
171
171
  configured: void 0,
172
172
  isFallback: void 0,
173
173
  label: void 0
174
174
  });
175
- }, ce = (e) => {
176
- b(e), !(e || f?.configured) && (f?.isFallback || f?.label || f?.conditions?.length) && ee(t, { configured: !0 });
177
- }, le = () => {
175
+ }, se = (e) => {
176
+ ee(e), !(e || f?.configured) && (f?.isFallback || f?.label || f?.conditions?.length) && te(t, { configured: !0 });
177
+ }, ce = () => {
178
178
  if (f?.isFallback) return f.label || x("editor.conditionalEdge.fallback");
179
179
  if (f?.label) return f.label;
180
180
  let t = f?.conditions ?? [];
181
181
  if (t.length === 0) return null;
182
182
  if (t.length === 1) {
183
- let [e] = t, n = te.find((t) => t.nodeId === e.field)?.label ?? e.field ?? "";
184
- return `${n === e.field && n.length > 5 ? `${n.slice(0, 5)}…` : n} ${qt[e.operator] ?? e.operator} ${e.value ?? ""}`;
183
+ let [e] = t, n = b.find((t) => t.nodeId === e.field)?.label ?? e.field ?? "";
184
+ return `${n === e.field && n.length > 5 ? `${n.slice(0, 5)}…` : n} ${Jt[e.operator] ?? e.operator} ${e.value ?? ""}`;
185
185
  }
186
186
  let n = t.filter((t) => t.logicalOperator === e.AND).length, r = t.filter((t) => t.logicalOperator === e.OR).length;
187
187
  return n > 0 && r === 0 ? `${t.length} ${x("editor.conditionalEdge.conditionsAnd")}` : r > 0 && n === 0 ? `${t.length} ${x("editor.conditionalEdge.conditionsOr")}` : `${t.length} ${x("editor.conditionalEdge.conditionsMixed")}`;
188
- }, ue = () => f?.isFallback ? "var(--treege-chart-4)" : S ? "var(--treege-chart-2)" : "var(--treege-chart-3)";
189
- return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(ve, {
188
+ }, le = () => f?.isFallback ? "var(--treege-chart-4)" : S ? "var(--treege-chart-2)" : "var(--treege-chart-3)";
189
+ return /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(_e, {
190
190
  path: p,
191
191
  markerEnd: l,
192
192
  style: {
193
193
  ...u,
194
- stroke: ue(),
194
+ stroke: le(),
195
195
  strokeDasharray: f?.isFallback ? "5,5" : void 0,
196
196
  strokeWidth: S ? 2 : u?.strokeWidth
197
197
  }
198
- }), /* @__PURE__ */ P(be, { children: /* @__PURE__ */ P("div", {
198
+ }), /* @__PURE__ */ L(be, { children: /* @__PURE__ */ L("div", {
199
199
  className: "nodrag nopan tg:absolute",
200
200
  style: {
201
201
  pointerEvents: "all",
202
202
  transform: `translate(-50%, -50%) translate(${m}px,${_}px)`
203
203
  },
204
- children: /* @__PURE__ */ F(ie, {
204
+ children: /* @__PURE__ */ R(ie, {
205
205
  open: y,
206
- onOpenChange: ce,
207
- children: [/* @__PURE__ */ P(ne, {
206
+ onOpenChange: se,
207
+ children: [/* @__PURE__ */ L(ne, {
208
208
  asChild: !0,
209
- children: /* @__PURE__ */ F(k, {
209
+ children: /* @__PURE__ */ R(A, {
210
210
  variant: S ? "default" : "secondary",
211
211
  size: "xs",
212
- className: E("tg:transition-[filter]", S ? "tg:hover:bg-primary tg:hover:brightness-125" : "tg:hover:bg-secondary tg:hover:brightness-90"),
213
- onClick: D,
214
- children: [/* @__PURE__ */ P(St, { className: "tg:h-3 tg:w-3" }), S ? le() : x("editor.conditionalEdge.defineCondition")]
212
+ className: D("tg:transition-[filter]", S ? "tg:hover:bg-primary tg:hover:brightness-125" : "tg:hover:bg-secondary tg:hover:brightness-90"),
213
+ onClick: O,
214
+ children: [/* @__PURE__ */ L(At, { className: "tg:h-3 tg:w-3" }), S ? ce() : x("editor.conditionalEdge.defineCondition")]
215
215
  })
216
- }), /* @__PURE__ */ P(ae, {
216
+ }), /* @__PURE__ */ L(ae, {
217
217
  className: "tg:w-96 tg:p-1",
218
218
  align: "center",
219
219
  onClick: (e) => e.stopPropagation(),
220
- children: /* @__PURE__ */ P(Gt, {
220
+ children: /* @__PURE__ */ L(Kt, {
221
221
  className: "tg:flex tg:max-h-150 tg:flex-col tg:p-3",
222
- children: /* @__PURE__ */ P("form", {
222
+ children: /* @__PURE__ */ L("form", {
223
223
  onSubmit: (e) => {
224
224
  e.preventDefault(), e.stopPropagation();
225
225
  },
226
- children: /* @__PURE__ */ F("div", {
226
+ children: /* @__PURE__ */ R("div", {
227
227
  className: "tg:grid tg:gap-5",
228
228
  children: [
229
- /* @__PURE__ */ F("div", {
229
+ /* @__PURE__ */ R("div", {
230
230
  className: "tg:space-y-2",
231
- children: [/* @__PURE__ */ P("h4", {
231
+ children: [/* @__PURE__ */ L("h4", {
232
232
  className: "tg:font-medium tg:leading-none",
233
233
  children: x("editor.conditionalEdge.displayConditions")
234
- }), /* @__PURE__ */ P("p", {
234
+ }), /* @__PURE__ */ L("p", {
235
235
  className: "tg:text-muted-foreground tg:text-sm",
236
236
  children: x("editor.conditionalEdge.displayConditionsDesc")
237
237
  })]
238
238
  }),
239
- /* @__PURE__ */ F("div", {
239
+ /* @__PURE__ */ R("div", {
240
240
  className: "tg:grid tg:gap-4",
241
241
  children: [
242
- /* @__PURE__ */ P(oe, {
242
+ /* @__PURE__ */ L(E, {
243
243
  name: "label",
244
- children: (e) => /* @__PURE__ */ F(A, { children: [
245
- /* @__PURE__ */ P(d, {
244
+ children: (e) => /* @__PURE__ */ R(j, { children: [
245
+ /* @__PURE__ */ L(d, {
246
246
  htmlFor: e.name,
247
247
  children: x("editor.conditionalEdge.labelOptional")
248
248
  }),
249
- /* @__PURE__ */ P(O, {
249
+ /* @__PURE__ */ L(k, {
250
250
  id: e.name,
251
251
  placeholder: x("editor.conditionalEdge.labelPlaceholder"),
252
252
  value: e.state.value,
253
253
  onChange: (t) => e.handleChange(t.target.value)
254
254
  }),
255
- /* @__PURE__ */ P(j, { children: x("editor.conditionalEdge.labelDesc") })
255
+ /* @__PURE__ */ L(M, { children: x("editor.conditionalEdge.labelDesc") })
256
256
  ] })
257
257
  }),
258
- /* @__PURE__ */ P(oe, {
258
+ /* @__PURE__ */ L(E, {
259
259
  name: "isFallback",
260
- children: (e) => /* @__PURE__ */ P(A, { children: /* @__PURE__ */ F("div", {
260
+ children: (e) => /* @__PURE__ */ L(j, { children: /* @__PURE__ */ R("div", {
261
261
  className: "tg:flex tg:items-center tg:gap-3 tg:rounded-lg tg:border tg:bg-muted/20 tg:p-3",
262
- children: [/* @__PURE__ */ P(fe, {
262
+ children: [/* @__PURE__ */ L(de, {
263
263
  id: e.name,
264
264
  checked: e.state.value,
265
265
  onCheckedChange: (t) => e.handleChange(t)
266
- }), /* @__PURE__ */ F("div", {
266
+ }), /* @__PURE__ */ R("div", {
267
267
  className: "tg:flex tg:flex-col tg:gap-1",
268
- children: [/* @__PURE__ */ P(d, {
268
+ children: [/* @__PURE__ */ L(d, {
269
269
  htmlFor: e.name,
270
270
  className: "tg:cursor-pointer tg:font-medium",
271
271
  children: x("editor.conditionalEdge.fallbackPath")
272
- }), /* @__PURE__ */ P(j, {
272
+ }), /* @__PURE__ */ L(M, {
273
273
  className: "tg:text-xs",
274
274
  children: x("editor.conditionalEdge.fallbackPathDesc")
275
275
  })]
276
276
  })]
277
277
  }) })
278
278
  }),
279
- /* @__PURE__ */ P(oe, {
279
+ /* @__PURE__ */ L(E, {
280
280
  name: "conditions",
281
281
  mode: "array",
282
282
  children: (t) => {
283
283
  let n = t.form.getFieldValue("isFallback");
284
- return /* @__PURE__ */ F("div", {
284
+ return /* @__PURE__ */ R("div", {
285
285
  className: "tg:space-y-3",
286
- children: [/* @__PURE__ */ P(d, {
286
+ children: [/* @__PURE__ */ L(d, {
287
287
  className: n ? "tg:text-muted-foreground" : "",
288
288
  children: x("editor.conditionalEdge.conditions")
289
- }), /* @__PURE__ */ F("div", {
289
+ }), /* @__PURE__ */ R("div", {
290
290
  className: "tg:space-y-2",
291
- children: [t.state.value?.map((r, i) => /* @__PURE__ */ F("div", {
291
+ children: [t.state.value?.map((r, i) => /* @__PURE__ */ R("div", {
292
292
  className: "tg:space-y-2",
293
- children: [/* @__PURE__ */ F("div", {
293
+ children: [/* @__PURE__ */ R("div", {
294
294
  className: "tg:space-y-2 tg:rounded-lg tg:border tg:bg-muted/30 tg:p-3",
295
295
  children: [
296
- /* @__PURE__ */ P(oe, {
296
+ /* @__PURE__ */ L(E, {
297
297
  name: `conditions[${i}].field`,
298
- children: (e) => /* @__PURE__ */ F(A, { children: [/* @__PURE__ */ P(d, {
298
+ children: (e) => /* @__PURE__ */ R(j, { children: [/* @__PURE__ */ L(d, {
299
299
  htmlFor: `field-${i}`,
300
300
  children: x("editor.conditionalEdge.field")
301
- }), /* @__PURE__ */ F(g, {
301
+ }), /* @__PURE__ */ R(g, {
302
302
  disabled: n,
303
303
  value: e.state.value || "",
304
304
  onValueChange: (t) => e.handleChange(t),
305
- children: [/* @__PURE__ */ P(v, {
305
+ children: [/* @__PURE__ */ L(v, {
306
306
  id: `field-${i}`,
307
307
  className: "tg:w-full",
308
- children: /* @__PURE__ */ P(T, { placeholder: x("editor.conditionalEdge.selectField") })
309
- }), /* @__PURE__ */ P(C, { children: te.length === 0 ? /* @__PURE__ */ P(h, {
308
+ children: /* @__PURE__ */ L(T, { placeholder: x("editor.conditionalEdge.selectField") })
309
+ }), /* @__PURE__ */ L(C, { children: b.length === 0 ? /* @__PURE__ */ L(h, {
310
310
  value: "none",
311
311
  disabled: !0,
312
312
  children: x("editor.conditionalEdge.noFieldsAvailable")
313
- }) : te.map((e) => /* @__PURE__ */ F(h, {
313
+ }) : b.map((e) => /* @__PURE__ */ R(h, {
314
314
  value: e.nodeId,
315
315
  children: [
316
316
  e.label,
@@ -321,55 +321,55 @@ var qt = {
321
321
  }, e.nodeId)) })]
322
322
  })] })
323
323
  }),
324
- /* @__PURE__ */ F("div", {
324
+ /* @__PURE__ */ R("div", {
325
325
  className: "tg:flex tg:gap-2",
326
- children: [/* @__PURE__ */ P(oe, {
326
+ children: [/* @__PURE__ */ L(E, {
327
327
  name: `conditions[${i}].operator`,
328
- children: (e) => /* @__PURE__ */ F(A, { children: [/* @__PURE__ */ P(d, {
328
+ children: (e) => /* @__PURE__ */ R(j, { children: [/* @__PURE__ */ L(d, {
329
329
  htmlFor: `operator-${i}`,
330
330
  children: x("editor.conditionalEdge.operator")
331
- }), /* @__PURE__ */ F(g, {
331
+ }), /* @__PURE__ */ R(g, {
332
332
  disabled: n,
333
333
  value: e.state.value || "===",
334
334
  onValueChange: (t) => e.handleChange(t),
335
- children: [/* @__PURE__ */ P(v, {
335
+ children: [/* @__PURE__ */ L(v, {
336
336
  id: `operator-${i}`,
337
- children: /* @__PURE__ */ P(T, {})
338
- }), /* @__PURE__ */ F(C, { children: [
339
- /* @__PURE__ */ P(h, {
337
+ children: /* @__PURE__ */ L(T, {})
338
+ }), /* @__PURE__ */ R(C, { children: [
339
+ /* @__PURE__ */ L(h, {
340
340
  value: "===",
341
341
  children: "="
342
342
  }),
343
- /* @__PURE__ */ P(h, {
343
+ /* @__PURE__ */ L(h, {
344
344
  value: "!==",
345
345
  children: "≠"
346
346
  }),
347
- /* @__PURE__ */ P(h, {
347
+ /* @__PURE__ */ L(h, {
348
348
  value: ">",
349
349
  children: ">"
350
350
  }),
351
- /* @__PURE__ */ P(h, {
351
+ /* @__PURE__ */ L(h, {
352
352
  value: "<",
353
353
  children: "<"
354
354
  }),
355
- /* @__PURE__ */ P(h, {
355
+ /* @__PURE__ */ L(h, {
356
356
  value: ">=",
357
357
  children: ">="
358
358
  }),
359
- /* @__PURE__ */ P(h, {
359
+ /* @__PURE__ */ L(h, {
360
360
  value: "<=",
361
361
  children: "<="
362
362
  })
363
363
  ] })]
364
364
  })] })
365
- }), /* @__PURE__ */ P(oe, {
365
+ }), /* @__PURE__ */ L(E, {
366
366
  name: `conditions[${i}].value`,
367
- children: (e) => /* @__PURE__ */ F(A, {
367
+ children: (e) => /* @__PURE__ */ R(j, {
368
368
  className: "tg:w-full",
369
- children: [/* @__PURE__ */ P(d, {
369
+ children: [/* @__PURE__ */ L(d, {
370
370
  htmlFor: `value-${i}`,
371
371
  children: x("editor.conditionalEdge.value")
372
- }), /* @__PURE__ */ P(O, {
372
+ }), /* @__PURE__ */ L(k, {
373
373
  disabled: n,
374
374
  id: `value-${i}`,
375
375
  placeholder: x("editor.conditionalEdge.valuePlaceholder"),
@@ -379,7 +379,7 @@ var qt = {
379
379
  })
380
380
  })]
381
381
  }),
382
- t.state.value && t.state.value.length > 1 && /* @__PURE__ */ F(k, {
382
+ t.state.value && t.state.value.length > 1 && /* @__PURE__ */ R(A, {
383
383
  disabled: n,
384
384
  type: "button",
385
385
  variant: "ghost",
@@ -388,31 +388,31 @@ var qt = {
388
388
  onClick: () => {
389
389
  t.removeValue(i), re().then();
390
390
  },
391
- children: [/* @__PURE__ */ P(L, { className: "tg:mr-1 tg:h-4 tg:w-4" }), x("editor.conditionalEdge.removeCondition")]
391
+ children: [/* @__PURE__ */ L(B, { className: "tg:mr-1 tg:h-4 tg:w-4" }), x("editor.conditionalEdge.removeCondition")]
392
392
  })
393
393
  ]
394
- }), t.state.value && i < t.state.value.length - 1 && /* @__PURE__ */ P(oe, {
394
+ }), t.state.value && i < t.state.value.length - 1 && /* @__PURE__ */ L(E, {
395
395
  name: `conditions[${i}].logicalOperator`,
396
- children: (t) => /* @__PURE__ */ P("div", {
396
+ children: (t) => /* @__PURE__ */ L("div", {
397
397
  className: "tg:flex tg:justify-center",
398
- children: /* @__PURE__ */ F(g, {
398
+ children: /* @__PURE__ */ R(g, {
399
399
  disabled: n,
400
400
  value: t.state.value || e.AND,
401
401
  onValueChange: (e) => t.handleChange(e),
402
- children: [/* @__PURE__ */ P(v, {
402
+ children: [/* @__PURE__ */ L(v, {
403
403
  className: "tg:h-9 tg:w-32 tg:font-semibold",
404
- children: /* @__PURE__ */ P(T, {})
405
- }), /* @__PURE__ */ F(C, { children: [/* @__PURE__ */ P(h, {
404
+ children: /* @__PURE__ */ L(T, {})
405
+ }), /* @__PURE__ */ R(C, { children: [/* @__PURE__ */ L(h, {
406
406
  value: e.AND,
407
407
  children: "AND"
408
- }), /* @__PURE__ */ P(h, {
408
+ }), /* @__PURE__ */ L(h, {
409
409
  value: e.OR,
410
410
  children: "OR"
411
411
  })] })]
412
412
  })
413
413
  })
414
414
  })]
415
- }, `condition-${i}`)), /* @__PURE__ */ F(k, {
415
+ }, `condition-${i}`)), /* @__PURE__ */ R(A, {
416
416
  disabled: n,
417
417
  type: "button",
418
418
  variant: "outline",
@@ -420,13 +420,13 @@ var qt = {
420
420
  className: "tg:w-full",
421
421
  onClick: () => {
422
422
  t.pushValue({
423
- field: te[0]?.nodeId ?? "",
423
+ field: b[0]?.nodeId ?? "",
424
424
  logicalOperator: e.AND,
425
425
  operator: "===",
426
426
  value: ""
427
427
  }), re().then();
428
428
  },
429
- children: [/* @__PURE__ */ P(I, { className: "tg:mr-2 tg:h-4 tg:w-4" }), x("editor.conditionalEdge.addCondition")]
429
+ children: [/* @__PURE__ */ L(z, { className: "tg:mr-2 tg:h-4 tg:w-4" }), x("editor.conditionalEdge.addCondition")]
430
430
  })]
431
431
  })]
432
432
  });
@@ -434,18 +434,18 @@ var qt = {
434
434
  })
435
435
  ]
436
436
  }),
437
- /* @__PURE__ */ F("div", {
437
+ /* @__PURE__ */ R("div", {
438
438
  className: "tg:flex tg:justify-end tg:gap-2 tg:pt-2",
439
- children: [/* @__PURE__ */ F(k, {
439
+ children: [/* @__PURE__ */ R(A, {
440
440
  type: "button",
441
441
  size: "sm",
442
442
  variant: "outline",
443
- onClick: se,
444
- children: [/* @__PURE__ */ P(L, { className: "tg:mr-1 tg:h-4 tg:w-4" }), x("common.clear")]
445
- }), /* @__PURE__ */ P(k, {
443
+ onClick: oe,
444
+ children: [/* @__PURE__ */ L(B, { className: "tg:mr-1 tg:h-4 tg:w-4" }), x("common.clear")]
445
+ }), /* @__PURE__ */ L(A, {
446
446
  type: "button",
447
447
  size: "sm",
448
- onClick: () => ce(!1),
448
+ onClick: () => se(!1),
449
449
  children: x("common.close")
450
450
  })]
451
451
  })
@@ -457,7 +457,7 @@ var qt = {
457
457
  })
458
458
  }) })] });
459
459
  }),
460
- default: Tt(({ id: e, sourceX: t, sourceY: n, targetX: r, targetY: i, sourcePosition: a, targetPosition: o, style: s, markerEnd: c, selected: l }) => {
460
+ default: Fe(({ id: e, sourceX: t, sourceY: n, targetX: r, targetY: i, sourcePosition: a, targetPosition: o, style: s, markerEnd: c, selected: l }) => {
461
461
  let [u, d, f] = ke({
462
462
  sourcePosition: a,
463
463
  sourceX: t,
@@ -465,15 +465,15 @@ var qt = {
465
465
  targetPosition: o,
466
466
  targetX: r,
467
467
  targetY: i
468
- }), { setEdges: p } = M();
469
- return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(ve, {
468
+ }), { setEdges: p } = N();
469
+ return /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(_e, {
470
470
  path: u,
471
471
  markerEnd: c,
472
472
  style: s
473
- }), /* @__PURE__ */ P(be, { children: l && /* @__PURE__ */ P("div", {
473
+ }), /* @__PURE__ */ L(be, { children: l && /* @__PURE__ */ L("div", {
474
474
  className: "button-edge__label nodrag nopan",
475
475
  style: { transform: `translate(-50%, -50%) translate(${d}px,${f}px)` },
476
- children: /* @__PURE__ */ P("button", {
476
+ children: /* @__PURE__ */ L("button", {
477
477
  type: "button",
478
478
  className: "button-edge__button",
479
479
  onClick: () => {
@@ -484,11 +484,11 @@ var qt = {
484
484
  })
485
485
  }) })] });
486
486
  })
487
- }, Xt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Zt = (e = 21) => {
487
+ }, Zt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Qt = (e = 21) => {
488
488
  let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
489
- for (; e--;) t += Xt[n[e] & 63];
489
+ for (; e--;) t += Zt[n[e] & 63];
490
490
  return t;
491
- }, Qt = (e, t) => {
491
+ }, $t = (e, t) => {
492
492
  if (t.size === 0) return e;
493
493
  let n = /* @__PURE__ */ new Map();
494
494
  return e.forEach((e) => {
@@ -502,15 +502,15 @@ var qt = {
502
502
  type: "default"
503
503
  };
504
504
  });
505
- }, W = () => {
506
- let { setNodes: e, setEdges: t, getNodes: n } = M(), r = R(() => {
505
+ }, G = () => {
506
+ let { setNodes: e, setEdges: t, getNodes: n } = N(), r = P(() => {
507
507
  e((e) => e.map(({ selected: e, ...t }) => t)), t((e) => e.map(({ selected: e, ...t }) => t));
508
- }, [t, e]), i = R((n) => {
508
+ }, [t, e]), i = P((n) => {
509
509
  e((e) => e.map((e) => ({
510
510
  ...e,
511
511
  selected: e.id === n
512
512
  }))), t((e) => e.map(({ selected: e, ...t }) => t));
513
- }, [t, e]), a = R((t, n) => {
513
+ }, [t, e]), a = P((t, n) => {
514
514
  e((e) => e.map((e) => e.id === t ? {
515
515
  ...e,
516
516
  data: {
@@ -518,7 +518,7 @@ var qt = {
518
518
  ...n
519
519
  }
520
520
  } : e));
521
- }, [e]), o = R((t, n, r) => {
521
+ }, [e]), o = P((t, n, r) => {
522
522
  e((e) => e.map((e) => {
523
523
  if (e.id !== t) return e;
524
524
  let i = e.type === n ? e.data : {};
@@ -531,32 +531,32 @@ var qt = {
531
531
  type: n
532
532
  };
533
533
  }));
534
- }, [e]), s = R((e, t) => {
534
+ }, [e]), s = P((e, t) => {
535
535
  let r = n().find((e) => e.selected);
536
536
  r && o(r.id, e, t);
537
- }, [n, o]), c = R((e) => {
537
+ }, [n, o]), c = P((e) => {
538
538
  let t = n().find((e) => e.selected);
539
539
  t && a(t.id, e);
540
- }, [n, a]), l = R((n) => {
540
+ }, [n, a]), l = P((n) => {
541
541
  e((e) => e.filter((e) => e.id !== n)), t((e) => {
542
542
  let t = e.filter((e) => e.target === n), r = e.filter((e) => e.source === n), i = new Set(t.map((e) => e.source)), a = e.filter((e) => e.source !== n && e.target !== n);
543
543
  if (t.length === 1 && r.length === 1) {
544
544
  let [e] = t, [n] = r, o = {
545
545
  data: e.data,
546
- id: Zt(),
546
+ id: Qt(),
547
547
  source: e.source,
548
548
  target: n.target,
549
549
  type: e.type
550
550
  };
551
- return Qt([...a, o], i);
551
+ return $t([...a, o], i);
552
552
  }
553
- return Qt(a, i);
553
+ return $t(a, i);
554
554
  });
555
555
  }, [e, t]);
556
556
  return {
557
557
  clearSelection: r,
558
558
  deleteNode: l,
559
- deleteSelectedNode: R(() => {
559
+ deleteSelectedNode: P(() => {
560
560
  let e = n().find((e) => e.selected);
561
561
  e && l(e.id);
562
562
  }, [n, l]),
@@ -566,14 +566,14 @@ var qt = {
566
566
  updateSelectedNodeData: c,
567
567
  updateSelectedNodeType: s
568
568
  };
569
- }, $t = ({ nodeId: e, label: t, placeholder: n, className: r }) => {
570
- let { language: i } = H(), { updateNodeData: a, clearSelection: o } = W(), s = U(), c = At(null), l = t?.[i] ?? "", u = n || s("editor.treegeNode.labelPlaceholder"), d = (e) => e.stopPropagation();
571
- return Dt(() => {
569
+ }, en = ({ nodeId: e, label: t, placeholder: n, className: r }) => {
570
+ let { language: i } = U(), { updateNodeData: a, clearSelection: o } = G(), s = W(), c = Be(null), l = t?.[i] ?? "", u = n || s("editor.treegeNode.labelPlaceholder"), d = (e) => e.stopPropagation();
571
+ return Le(() => {
572
572
  let e = setTimeout(() => {
573
573
  c.current?.focus();
574
574
  }, 300);
575
575
  return () => clearTimeout(e);
576
- }, []), /* @__PURE__ */ P("input", {
576
+ }, []), /* @__PURE__ */ L("input", {
577
577
  ref: c,
578
578
  type: "text",
579
579
  value: l,
@@ -590,98 +590,98 @@ var qt = {
590
590
  onClick: d,
591
591
  onMouseDown: d,
592
592
  onPointerDown: d,
593
- className: E("nodrag nopan tg:w-full tg:truncate tg:bg-transparent tg:outline-none tg:placeholder:text-muted-foreground/40", r)
593
+ className: D("nodrag nopan tg:w-full tg:truncate tg:bg-transparent tg:outline-none tg:placeholder:text-muted-foreground/40", r)
594
594
  });
595
595
  };
596
596
  //#endregion
597
597
  //#region src/shared/components/ui/dropdown-menu.tsx
598
- function G({ ...e }) {
599
- return /* @__PURE__ */ P(B.Root, {
598
+ function K({ ...e }) {
599
+ return /* @__PURE__ */ L(V.Root, {
600
600
  "data-slot": "dropdown-menu",
601
601
  ...e
602
602
  });
603
603
  }
604
- function K({ ...e }) {
605
- return /* @__PURE__ */ P(B.Trigger, {
604
+ function tn({ ...e }) {
605
+ return /* @__PURE__ */ L(V.Trigger, {
606
606
  "data-slot": "dropdown-menu-trigger",
607
607
  ...e
608
608
  });
609
609
  }
610
- function q({ className: e, sideOffset: t = 4, ...n }) {
611
- return /* @__PURE__ */ P(B.Portal, { children: /* @__PURE__ */ P(B.Content, {
610
+ function nn({ className: e, sideOffset: t = 4, ...n }) {
611
+ return /* @__PURE__ */ L(V.Portal, { children: /* @__PURE__ */ L(V.Content, {
612
612
  "data-slot": "dropdown-menu-content",
613
613
  sideOffset: t,
614
- className: E("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:data-[state=closed]:zoom-out-95 tg:data-[state=open]:zoom-in-95 tg:data-[side=bottom]:slide-in-from-top-2 tg:data-[side=left]:slide-in-from-right-2 tg:data-[side=right]:slide-in-from-left-2 tg:data-[side=top]:slide-in-from-bottom-2 tg:z-50 tg:max-h-(--radix-dropdown-menu-content-available-height) tg:min-w-[8rem] tg:origin-(--radix-dropdown-menu-content-transform-origin) tg:overflow-y-auto tg:overflow-x-hidden tg:rounded-md tg:border tg:bg-popover tg:p-1 tg:text-popover-foreground tg:shadow-md tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", e),
614
+ className: D("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:data-[state=closed]:zoom-out-95 tg:data-[state=open]:zoom-in-95 tg:data-[side=bottom]:slide-in-from-top-2 tg:data-[side=left]:slide-in-from-right-2 tg:data-[side=right]:slide-in-from-left-2 tg:data-[side=top]:slide-in-from-bottom-2 tg:z-50 tg:max-h-(--radix-dropdown-menu-content-available-height) tg:min-w-[8rem] tg:origin-(--radix-dropdown-menu-content-transform-origin) tg:overflow-y-auto tg:overflow-x-hidden tg:rounded-md tg:border tg:bg-popover tg:p-1 tg:text-popover-foreground tg:shadow-md tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", e),
615
615
  ...n
616
616
  }) });
617
617
  }
618
- function J({ ...e }) {
619
- return /* @__PURE__ */ P(B.Group, {
618
+ function q({ ...e }) {
619
+ return /* @__PURE__ */ L(V.Group, {
620
620
  "data-slot": "dropdown-menu-group",
621
621
  ...e
622
622
  });
623
623
  }
624
- function Y({ className: e, inset: t, variant: n = "default", ...r }) {
625
- return /* @__PURE__ */ P(B.Item, {
624
+ function J({ className: e, inset: t, variant: n = "default", ...r }) {
625
+ return /* @__PURE__ */ L(V.Item, {
626
626
  "data-slot": "dropdown-menu-item",
627
627
  "data-inset": t,
628
628
  "data-variant": n,
629
- className: E("tg:data-[variant=destructive]:*:[svg]:!text-destructive tg:relative tg:flex tg:cursor-default tg:select-none tg:items-center tg:gap-2 tg:rounded-sm tg:px-2 tg:py-1.5 tg:text-sm tg:outline-hidden tg:focus:bg-accent tg:focus:text-accent-foreground tg:data-[disabled]:pointer-events-none tg:data-[inset]:pl-8 tg:data-[variant=destructive]:text-destructive tg:data-[disabled]:opacity-50 tg:data-[variant=destructive]:focus:bg-destructive/10 tg:data-[variant=destructive]:focus:text-destructive tg:dark:data-[variant=destructive]:focus:bg-destructive/20 tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg:not([class*='text-'])]:text-muted-foreground tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0", e),
629
+ className: D("tg:data-[variant=destructive]:*:[svg]:!text-destructive tg:relative tg:flex tg:cursor-default tg:select-none tg:items-center tg:gap-2 tg:rounded-sm tg:px-2 tg:py-1.5 tg:text-sm tg:outline-hidden tg:focus:bg-accent tg:focus:text-accent-foreground tg:data-[disabled]:pointer-events-none tg:data-[inset]:pl-8 tg:data-[variant=destructive]:text-destructive tg:data-[disabled]:opacity-50 tg:data-[variant=destructive]:focus:bg-destructive/10 tg:data-[variant=destructive]:focus:text-destructive tg:dark:data-[variant=destructive]:focus:bg-destructive/20 tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg:not([class*='text-'])]:text-muted-foreground tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0", e),
630
630
  ...r
631
631
  });
632
632
  }
633
- function en({ className: e, inset: t, ...n }) {
634
- return /* @__PURE__ */ P(B.Label, {
633
+ function rn({ className: e, inset: t, ...n }) {
634
+ return /* @__PURE__ */ L(V.Label, {
635
635
  "data-slot": "dropdown-menu-label",
636
636
  "data-inset": t,
637
- className: E("tg:px-1.5 tg:py-1 tg:font-medium tg:text-muted-foreground tg:text-xs tg:data-[inset]:pl-7", e),
637
+ className: D("tg:px-1.5 tg:py-1 tg:font-medium tg:text-muted-foreground tg:text-xs tg:data-[inset]:pl-7", e),
638
638
  ...n
639
639
  });
640
640
  }
641
- function tn({ className: e, ...t }) {
642
- return /* @__PURE__ */ P(B.Separator, {
641
+ function Y({ className: e, ...t }) {
642
+ return /* @__PURE__ */ L(V.Separator, {
643
643
  "data-slot": "dropdown-menu-separator",
644
- className: E("tg:-mx-1 tg:my-1 tg:h-px tg:bg-border", e),
644
+ className: D("tg:-mx-1 tg:my-1 tg:h-px tg:bg-border", e),
645
645
  ...t
646
646
  });
647
647
  }
648
648
  //#endregion
649
649
  //#region src/editor/features/TreegeEditor/nodes/components/NodeMoreMenu.tsx
650
- var nn = ({ nodeId: e, className: t }) => {
651
- let { selectNode: n } = W(), { setIsNodeSheetOpen: r, openDeleteNodeConfirmation: i } = H(), a = U(), o = (e) => e.stopPropagation();
652
- return /* @__PURE__ */ F(G, {
650
+ var an = ({ nodeId: e, className: t }) => {
651
+ let { selectNode: n } = G(), { setIsNodeSheetOpen: r, openDeleteNodeConfirmation: i } = U(), a = W(), o = (e) => e.stopPropagation();
652
+ return /* @__PURE__ */ R(K, {
653
653
  modal: !1,
654
- children: [/* @__PURE__ */ P(K, {
654
+ children: [/* @__PURE__ */ L(tn, {
655
655
  asChild: !0,
656
656
  onClick: o,
657
- children: /* @__PURE__ */ P("button", {
657
+ children: /* @__PURE__ */ L("button", {
658
658
  type: "button",
659
659
  "aria-label": a("editor.nodeActionsSheet.editNode"),
660
- className: E("nodrag nopan tg:absolute tg:top-2 tg:right-2 tg:flex tg:h-6 tg:w-6 tg:cursor-pointer tg:items-center tg:justify-center tg:rounded-md tg:opacity-60 tg:transition-all tg:hover:text-[--treege-color-primary] tg:hover:opacity-100", t),
661
- children: /* @__PURE__ */ P(ct, { className: "tg:h-3.5 tg:w-3.5" })
660
+ className: D("nodrag nopan tg:absolute tg:top-2 tg:right-2 tg:flex tg:h-6 tg:w-6 tg:cursor-pointer tg:items-center tg:justify-center tg:rounded-md tg:opacity-60 tg:transition-all tg:hover:text-[--treege-color-primary] tg:hover:opacity-100", t),
661
+ children: /* @__PURE__ */ L(gt, { className: "tg:h-3.5 tg:w-3.5" })
662
662
  })
663
- }), /* @__PURE__ */ F(q, {
663
+ }), /* @__PURE__ */ R(nn, {
664
664
  align: "end",
665
665
  onClick: o,
666
666
  children: [
667
- /* @__PURE__ */ F(Y, {
667
+ /* @__PURE__ */ R(J, {
668
668
  onSelect: () => {
669
669
  n(e), r(!0);
670
670
  },
671
- children: [/* @__PURE__ */ P(gt, {}), a("common.settings")]
671
+ children: [/* @__PURE__ */ L(wt, {}), a("common.settings")]
672
672
  }),
673
- /* @__PURE__ */ P(tn, {}),
674
- /* @__PURE__ */ F(Y, {
673
+ /* @__PURE__ */ L(Y, {}),
674
+ /* @__PURE__ */ R(J, {
675
675
  variant: "destructive",
676
676
  onSelect: () => {
677
677
  i(e);
678
678
  },
679
- children: [/* @__PURE__ */ P(vt, {}), a("common.delete")]
679
+ children: [/* @__PURE__ */ L(Et, {}), a("common.delete")]
680
680
  })
681
681
  ]
682
682
  })]
683
683
  });
684
- }, rn = Mt("tg:inline-flex tg:w-fit tg:shrink-0 tg:items-center tg:justify-center tg:gap-1 tg:overflow-hidden tg:rounded-full tg:border tg:border-transparent tg:px-2 tg:py-0.5 tg:text-xs tg:font-medium tg:whitespace-nowrap tg:transition-[color,box-shadow] tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:dark:aria-invalid:ring-destructive/40 tg:[&>svg]:pointer-events-none tg:[&>svg]:size-3", {
684
+ }, on = Nt("tg:inline-flex tg:w-fit tg:shrink-0 tg:items-center tg:justify-center tg:gap-1 tg:overflow-hidden tg:rounded-full tg:border tg:border-transparent tg:px-2 tg:py-0.5 tg:text-xs tg:font-medium tg:whitespace-nowrap tg:transition-[color,box-shadow] tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:dark:aria-invalid:ring-destructive/40 tg:[&>svg]:pointer-events-none tg:[&>svg]:size-3", {
685
685
  defaultVariants: { variant: "default" },
686
686
  variants: { variant: {
687
687
  blue: "tg:bg-blue-500 tg:text-white tg:dark:bg-blue-600",
@@ -692,41 +692,41 @@ var nn = ({ nodeId: e, className: t }) => {
692
692
  secondary: "tg:border-transparent tg:bg-secondary tg:text-secondary-foreground tg:[a&]:hover:bg-secondary/90"
693
693
  } }
694
694
  });
695
- function an({ className: e, variant: t, asChild: n = !1, ...r }) {
696
- return /* @__PURE__ */ P(n ? jt : "span", {
695
+ function sn({ className: e, variant: t, asChild: n = !1, ...r }) {
696
+ return /* @__PURE__ */ L(n ? Mt : "span", {
697
697
  "data-slot": "badge",
698
- className: E(rn({ variant: t }), e),
698
+ className: D(on({ variant: t }), e),
699
699
  ...r
700
700
  });
701
701
  }
702
- var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
703
- /* @__PURE__ */ P(Ce, {}),
704
- /* @__PURE__ */ P("div", {
702
+ var cn = Fe(({ data: e, id: t }) => /* @__PURE__ */ R(I, { children: [
703
+ /* @__PURE__ */ L(Ce, {}),
704
+ /* @__PURE__ */ L("div", {
705
705
  className: "tg:-top-3.5 tg:absolute tg:left-6",
706
- children: /* @__PURE__ */ F(an, {
706
+ children: /* @__PURE__ */ R(sn, {
707
707
  className: "tg:max-w-50 tg:bg-chart-2",
708
- children: [/* @__PURE__ */ P(Le, { className: "tg:!w-3 tg:!h-3" }), /* @__PURE__ */ P($t, {
708
+ children: [/* @__PURE__ */ L(We, { className: "tg:!w-3 tg:!h-3" }), /* @__PURE__ */ L(en, {
709
709
  nodeId: t,
710
710
  label: e?.label,
711
711
  className: "tg:min-w-0 tg:flex-1 tg:text-xs tg:text-white tg:placeholder:text-white/60"
712
712
  })]
713
713
  })
714
714
  }),
715
- /* @__PURE__ */ P(nn, { nodeId: t })
716
- ] })), sn = {
715
+ /* @__PURE__ */ L(an, { nodeId: t })
716
+ ] })), ln = {
717
717
  data: { type: "text" },
718
- id: Zt(),
718
+ id: Qt(),
719
719
  position: {
720
720
  x: 0,
721
721
  y: 0
722
722
  },
723
723
  type: "input"
724
- }, cn = () => {
725
- let { setNodes: e, setEdges: t, screenToFlowPosition: n, getNode: i, getNodes: a, getEdges: o } = M(), s = R((n, i, a = !1, s) => {
724
+ }, un = () => {
725
+ let { setNodes: e, setEdges: t, screenToFlowPosition: n, getNode: i, getNodes: a, getEdges: o } = N(), s = P((n, i, a = !1, s) => {
726
726
  let c = n.id, l = o().filter((e) => e.source === c), u = r(n);
727
727
  if (l.length > 0 && !u) return;
728
- let d = Zt(), f = {
729
- ...sn,
728
+ let d = Qt(), f = {
729
+ ...ln,
730
730
  ...s && {
731
731
  data: s.data ?? {},
732
732
  type: s.type
@@ -742,7 +742,7 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
742
742
  operator: "===",
743
743
  value: ""
744
744
  }] } : void 0,
745
- id: Zt(),
745
+ id: Qt(),
746
746
  source: c,
747
747
  target: d,
748
748
  type: t && u ? "conditional" : "default"
@@ -772,7 +772,7 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
772
772
  o,
773
773
  e,
774
774
  t
775
- ]), c = R((e) => {
775
+ ]), c = P((e) => {
776
776
  t((t) => {
777
777
  let n = Oe(e, t), a = e.source, o = i(a);
778
778
  return n.filter((e) => e.source === a).length > 1 && o && r(o) ? n.map((e) => e.source === a ? {
@@ -788,7 +788,7 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
788
788
  type: "conditional"
789
789
  } : e) : n;
790
790
  });
791
- }, [t, i]), l = R((e, t) => {
791
+ }, [t, i]), l = P((e, t) => {
792
792
  let n = i(e);
793
793
  if (!n) return;
794
794
  let r = getComputedStyle(document.documentElement).getPropertyValue("--node-height"), c = getComputedStyle(document.documentElement).getPropertyValue("--node-width"), l = parseFloat(r) || 100, u = parseFloat(c) || 100, d = n.position.y + l + 100, f = a(), p = o(), m = f.filter((t) => p.some((n) => n.source === e && n.target === t.id)).map((e) => e.position.x);
@@ -801,7 +801,7 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
801
801
  a,
802
802
  o,
803
803
  s
804
- ]), u = R((e, t) => {
804
+ ]), u = P((e, t) => {
805
805
  if (!t.isValid) {
806
806
  let { clientX: r, clientY: a } = "changedTouches" in e ? e.changedTouches[0] : e, o = t.fromNode;
807
807
  if (!o) return;
@@ -821,11 +821,11 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
821
821
  s,
822
822
  i,
823
823
  n
824
- ]), d = R((e) => {
825
- t((t) => Qt(t.filter((t) => !e.find((e) => e.id === t.id)), new Set(e.map((e) => e.source))));
824
+ ]), d = P((e) => {
825
+ t((t) => $t(t.filter((t) => !e.find((e) => e.id === t.id)), new Set(e.map((e) => e.source))));
826
826
  }, [t]);
827
827
  return {
828
- isValidConnection: R((e) => {
828
+ isValidConnection: P((e) => {
829
829
  if (e.source === e.target) return !1;
830
830
  let t = i(e.source);
831
831
  return t ? !(o().filter((t) => t.source === e.source).length > 0 && !r(t)) : !1;
@@ -854,34 +854,34 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
854
854
  textarea: "textarea",
855
855
  time: "time",
856
856
  timerange: "timerange"
857
- }, ln = {
857
+ }, dn = {
858
858
  divider: "divider",
859
859
  title: "title"
860
- }, un = {
861
- [X.address]: ot,
862
- [X.autocomplete]: mt,
863
- [X.checkbox]: He,
864
- [X.date]: Re,
865
- [X.daterange]: ze,
866
- [X.file]: ut,
867
- [X.hidden]: Qe,
868
- [X.http]: Je,
869
- [X.number]: $e,
870
- [X.password]: nt,
871
- [X.radio]: Ge,
872
- [X.select]: it,
873
- [X.submit]: ht,
874
- [X.switch]: _t,
875
- [X.text]: Be,
876
- [X.textarea]: Fe,
877
- [X.time]: Ke,
878
- [X.timerange]: qe,
879
- [ln.divider]: st,
880
- [ln.title]: et,
881
- [l.flow]: lt
882
- }, dn = ft, Z = (e) => e && un[e] || dn, fn = ({ nodeId: e, isConnectable: t }) => {
883
- let { onAddFromHandle: n } = cn(), r = U(), [i, a] = z(!1), o = Z(l.flow);
884
- return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(xe, {
860
+ }, fn = {
861
+ [X.address]: pt,
862
+ [X.autocomplete]: St,
863
+ [X.checkbox]: Ye,
864
+ [X.date]: Ge,
865
+ [X.daterange]: Ke,
866
+ [X.file]: vt,
867
+ [X.hidden]: at,
868
+ [X.http]: tt,
869
+ [X.number]: ot,
870
+ [X.password]: lt,
871
+ [X.radio]: Qe,
872
+ [X.select]: dt,
873
+ [X.submit]: Ct,
874
+ [X.switch]: Tt,
875
+ [X.text]: qe,
876
+ [X.textarea]: He,
877
+ [X.time]: $e,
878
+ [X.timerange]: et,
879
+ [dn.divider]: ht,
880
+ [dn.title]: st,
881
+ [l.flow]: _t
882
+ }, pn = bt, Z = (e) => e && fn[e] || pn, mn = ({ nodeId: e, isConnectable: t }) => {
883
+ let { onAddFromHandle: n } = un(), r = W(), [i, a] = F(!1), o = Z(l.flow);
884
+ return /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(xe, {
885
885
  type: "source",
886
886
  position: Te.Bottom,
887
887
  isConnectable: t,
@@ -889,50 +889,50 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
889
889
  e.defaultPrevented || a(!0);
890
890
  },
891
891
  className: "tg:flex tg:h-6! tg:w-6! tg:cursor-pointer tg:items-center tg:justify-center tg:rounded-sm tg:transition-colors tg:hover:bg-primary/80!",
892
- children: /* @__PURE__ */ P(I, { className: "tg:h-4 tg:w-4 tg:text-primary-foreground" })
893
- }), /* @__PURE__ */ F(G, {
892
+ children: /* @__PURE__ */ L(z, { className: "tg:h-4 tg:w-4 tg:text-primary-foreground" })
893
+ }), /* @__PURE__ */ R(K, {
894
894
  open: i,
895
895
  onOpenChange: a,
896
- children: [/* @__PURE__ */ P(K, {
896
+ children: [/* @__PURE__ */ L(tn, {
897
897
  asChild: !0,
898
- children: /* @__PURE__ */ P("span", {
898
+ children: /* @__PURE__ */ L("span", {
899
899
  "aria-hidden": !0,
900
900
  className: "tg:-translate-x-1/2 tg:pointer-events-none tg:absolute tg:bottom-0 tg:left-1/2 tg:h-0 tg:w-0"
901
901
  })
902
- }), /* @__PURE__ */ F(q, {
902
+ }), /* @__PURE__ */ R(nn, {
903
903
  align: "center",
904
904
  side: "bottom",
905
905
  className: "treege-scrollbar tg:max-h-80",
906
906
  children: [
907
- /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(en, { children: r("editor.selectNodeType.options.input") }), Object.values(X).map((t) => /* @__PURE__ */ F(Y, {
907
+ /* @__PURE__ */ R(q, { children: [/* @__PURE__ */ L(rn, { children: r("editor.selectNodeType.options.input") }), Object.values(X).map((t) => /* @__PURE__ */ R(J, {
908
908
  onClick: () => n(e, {
909
909
  data: { type: t },
910
910
  type: l.input
911
911
  }),
912
912
  className: "tg:capitalize",
913
- children: [/* @__PURE__ */ P(Z(t), {}), t]
913
+ children: [/* @__PURE__ */ L(Z(t), {}), t]
914
914
  }, t))] }),
915
- /* @__PURE__ */ P(tn, {}),
916
- /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(en, { children: r("editor.selectNodeType.options.ui") }), Object.values(ln).map((t) => /* @__PURE__ */ F(Y, {
915
+ /* @__PURE__ */ L(Y, {}),
916
+ /* @__PURE__ */ R(q, { children: [/* @__PURE__ */ L(rn, { children: r("editor.selectNodeType.options.ui") }), Object.values(dn).map((t) => /* @__PURE__ */ R(J, {
917
917
  onClick: () => n(e, {
918
918
  data: { type: t },
919
919
  type: l.ui
920
920
  }),
921
921
  className: "tg:capitalize",
922
- children: [/* @__PURE__ */ P(Z(t), {}), t]
922
+ children: [/* @__PURE__ */ L(Z(t), {}), t]
923
923
  }, t))] }),
924
- /* @__PURE__ */ P(tn, {}),
925
- /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(en, { children: r("common.other") }), /* @__PURE__ */ F(Y, {
924
+ /* @__PURE__ */ L(Y, {}),
925
+ /* @__PURE__ */ R(q, { children: [/* @__PURE__ */ L(rn, { children: r("common.other") }), /* @__PURE__ */ R(J, {
926
926
  onClick: () => n(e, {
927
927
  data: {},
928
928
  type: l.flow
929
929
  }),
930
- children: [/* @__PURE__ */ P(o, {}), r("editor.selectNodeType.options.flow")]
930
+ children: [/* @__PURE__ */ L(o, {}), r("editor.selectNodeType.options.flow")]
931
931
  })] })
932
932
  ]
933
933
  })]
934
934
  })] });
935
- }, pn = (e) => {
935
+ }, hn = (e) => {
936
936
  switch (e) {
937
937
  case "number":
938
938
  case "daterange":
@@ -942,8 +942,8 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
942
942
  case "checkbox": return [];
943
943
  default: return "";
944
944
  }
945
- }, mn = ({ nodeId: e, data: n }) => {
946
- let { language: r } = H(), i = n?.type;
945
+ }, gn = ({ nodeId: e, data: n }) => {
946
+ let { language: r } = U(), i = n?.type;
947
947
  if (!i) return null;
948
948
  let o = {
949
949
  data: n,
@@ -953,35 +953,35 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
953
953
  y: 0
954
954
  },
955
955
  type: "input"
956
- }, c = a(n.label, r), l = t(o), u = /* @__PURE__ */ F("div", {
956
+ }, c = a(n.label, r), l = t(o), u = /* @__PURE__ */ R("div", {
957
957
  className: "tg:flex tg:items-center tg:gap-1 tg:text-[10px] tg:text-muted-foreground tg:capitalize tg:[&>svg]:size-3",
958
- children: [/* @__PURE__ */ P(Z(i), {}), i]
958
+ children: [/* @__PURE__ */ L(Z(i), {}), i]
959
959
  });
960
960
  if (i === "hidden") {
961
961
  let e = n.defaultValue?.type === "static" ? n.defaultValue.staticValue : void 0, t = n.defaultValue?.type === "reference" ? n.defaultValue.referenceField : void 0, r = Array.isArray(e) ? e.join(", ") : typeof e == "boolean" ? String(e) : e ?? (t ? `→ ${t}` : "");
962
- return /* @__PURE__ */ F("div", {
962
+ return /* @__PURE__ */ R("div", {
963
963
  className: "tg:pointer-events-none tg:flex tg:select-none tg:flex-col tg:gap-1 tg:text-sm",
964
964
  children: [
965
965
  u,
966
- /* @__PURE__ */ P("span", {
966
+ /* @__PURE__ */ L("span", {
967
967
  className: "tg:truncate tg:font-medium",
968
968
  children: c || l
969
969
  }),
970
- /* @__PURE__ */ P("span", {
970
+ /* @__PURE__ */ L("span", {
971
971
  className: "tg:truncate tg:text-muted-foreground tg:text-xs",
972
972
  children: r || "—"
973
973
  })
974
974
  ]
975
975
  });
976
976
  }
977
- let d = pe[i];
977
+ let d = fe[i];
978
978
  if (!d) return null;
979
979
  let f = a(n.helperText, r), p = s(n, r);
980
- return /* @__PURE__ */ F("div", {
981
- className: E("tg:pointer-events-none tg:flex tg:select-none tg:flex-col tg:gap-1", i === "submit" && "tg:items-center"),
982
- children: [u, /* @__PURE__ */ P(d, {
980
+ return /* @__PURE__ */ R("div", {
981
+ className: D("tg:pointer-events-none tg:flex tg:select-none tg:flex-col tg:gap-1", i === "submit" && "tg:items-center"),
982
+ children: [u, /* @__PURE__ */ L(d, {
983
983
  node: o,
984
- value: pn(i),
984
+ value: hn(i),
985
985
  setValue: () => {},
986
986
  id: e,
987
987
  name: l,
@@ -990,8 +990,8 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
990
990
  helperText: f || void 0
991
991
  })]
992
992
  });
993
- }, hn = Object.values(X), gn = Object.values(ln), _n = ({ nodeId: e, nodeType: t, subType: n }) => {
994
- let { updateNodeType: r } = W(), { getEdges: i } = M(), { openNodeTypeChangeConfirmation: a } = H(), o = U(), s = (e) => e.stopPropagation(), c = n || t, u = t === l.flow ? o("editor.selectNodeType.options.flow") : c, d = Z(c), f = Z(l.flow), p = (t, n) => {
993
+ }, _n = Object.values(X), vn = Object.values(dn), yn = ({ nodeId: e, nodeType: t, subType: n }) => {
994
+ let { updateNodeType: r } = G(), { getEdges: i } = N(), { openNodeTypeChangeConfirmation: a } = U(), o = W(), s = (e) => e.stopPropagation(), c = n || t, u = t === l.flow ? o("editor.selectNodeType.options.flow") : c, d = Z(c), f = Z(l.flow), p = (t, n) => {
995
995
  let o = i().filter((t) => t.source === e).length;
996
996
  if ((t === l.ui || t === l.flow) && o > 1) {
997
997
  a({
@@ -1003,56 +1003,56 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
1003
1003
  }
1004
1004
  r(e, t, n);
1005
1005
  };
1006
- return /* @__PURE__ */ F(G, { children: [/* @__PURE__ */ P(K, {
1006
+ return /* @__PURE__ */ R(K, { children: [/* @__PURE__ */ L(tn, {
1007
1007
  asChild: !0,
1008
1008
  onClick: s,
1009
- children: /* @__PURE__ */ F(an, {
1009
+ children: /* @__PURE__ */ R(sn, {
1010
1010
  variant: "default",
1011
1011
  className: "nodrag nopan tg:cursor-pointer tg:px-1.5 tg:py-0 tg:text-[10px] tg:capitalize tg:[&>svg]:size-2.5",
1012
1012
  children: [
1013
- /* @__PURE__ */ P(d, { className: "tg:mt-0.5" }),
1013
+ /* @__PURE__ */ L(d, { className: "tg:mt-0.5" }),
1014
1014
  u || o("editor.selectNodeType.nodeType"),
1015
- /* @__PURE__ */ P(Ue, {})
1015
+ /* @__PURE__ */ L(Xe, {})
1016
1016
  ]
1017
1017
  })
1018
- }), /* @__PURE__ */ F(q, {
1018
+ }), /* @__PURE__ */ R(nn, {
1019
1019
  align: "start",
1020
1020
  className: "treege-scrollbar tg:max-h-80",
1021
1021
  onClick: s,
1022
1022
  children: [
1023
- /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(en, { children: o("editor.selectNodeType.options.input") }), hn.map((e) => {
1023
+ /* @__PURE__ */ R(q, { children: [/* @__PURE__ */ L(rn, { children: o("editor.selectNodeType.options.input") }), _n.map((e) => {
1024
1024
  let r = Z(e);
1025
- return /* @__PURE__ */ F(Y, {
1025
+ return /* @__PURE__ */ R(J, {
1026
1026
  onClick: () => p(l.input, e),
1027
- className: E("tg:capitalize", t === l.input && e === n && "tg:bg-accent"),
1028
- children: [/* @__PURE__ */ P(r, {}), e]
1027
+ className: D("tg:capitalize", t === l.input && e === n && "tg:bg-accent"),
1028
+ children: [/* @__PURE__ */ L(r, {}), e]
1029
1029
  }, e);
1030
1030
  })] }),
1031
- /* @__PURE__ */ P(tn, {}),
1032
- /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(en, { children: o("editor.selectNodeType.options.ui") }), gn.map((e) => {
1031
+ /* @__PURE__ */ L(Y, {}),
1032
+ /* @__PURE__ */ R(q, { children: [/* @__PURE__ */ L(rn, { children: o("editor.selectNodeType.options.ui") }), vn.map((e) => {
1033
1033
  let r = Z(e);
1034
- return /* @__PURE__ */ F(Y, {
1034
+ return /* @__PURE__ */ R(J, {
1035
1035
  onClick: () => p(l.ui, e),
1036
- className: E("tg:capitalize", t === l.ui && e === n && "tg:bg-accent"),
1037
- children: [/* @__PURE__ */ P(r, {}), e]
1036
+ className: D("tg:capitalize", t === l.ui && e === n && "tg:bg-accent"),
1037
+ children: [/* @__PURE__ */ L(r, {}), e]
1038
1038
  }, e);
1039
1039
  })] }),
1040
- /* @__PURE__ */ P(tn, {}),
1041
- /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(en, { children: o("common.other") }), /* @__PURE__ */ F(Y, {
1040
+ /* @__PURE__ */ L(Y, {}),
1041
+ /* @__PURE__ */ R(q, { children: [/* @__PURE__ */ L(rn, { children: o("common.other") }), /* @__PURE__ */ R(J, {
1042
1042
  onClick: () => p(l.flow),
1043
- className: E(t === l.flow && "tg:bg-accent"),
1044
- children: [/* @__PURE__ */ P(f, {}), o("editor.selectNodeType.options.flow")]
1043
+ className: D(t === l.flow && "tg:bg-accent"),
1044
+ children: [/* @__PURE__ */ L(f, {}), o("editor.selectNodeType.options.flow")]
1045
1045
  })] })
1046
1046
  ]
1047
1047
  })] });
1048
- }, vn = [
1048
+ }, bn = [
1049
1049
  "radio",
1050
1050
  "select",
1051
1051
  "checkbox",
1052
1052
  "autocomplete"
1053
- ], yn = ({ nodeId: e, data: t }) => {
1054
- let [n, r] = z(!1), [i, a] = z(""), [o, s] = z(""), { updateNodeData: c } = W(), { language: l } = H(), u = U(), f = t && "type" in t ? t.type : void 0;
1055
- if (!(f && vn.includes(f))) return null;
1053
+ ], xn = ({ nodeId: e, data: t }) => {
1054
+ let [n, r] = F(!1), [i, a] = F(""), [o, s] = F(""), { updateNodeData: c } = G(), { language: l } = U(), u = W(), f = t && "type" in t ? t.type : void 0;
1055
+ if (!(f && bn.includes(f))) return null;
1056
1056
  let p = t.options ?? [], m = () => {
1057
1057
  a(""), s("");
1058
1058
  }, h = (t) => {
@@ -1069,42 +1069,42 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
1069
1069
  }, _ = (e) => {
1070
1070
  e.key === "Enter" && (e.preventDefault(), h());
1071
1071
  }, v = (e) => e.stopPropagation();
1072
- return /* @__PURE__ */ F("div", {
1072
+ return /* @__PURE__ */ R("div", {
1073
1073
  className: "nodrag nopan tg:my-1 tg:flex tg:flex-col tg:gap-0.5",
1074
1074
  children: [p.map((e, t) => {
1075
1075
  let n = u(e.label) || e.value || "—", r = `${e.value || "opt"}-${t}`;
1076
- return /* @__PURE__ */ P("div", {
1076
+ return /* @__PURE__ */ L("div", {
1077
1077
  className: "tg:truncate tg:text-muted-foreground tg:text-xs",
1078
1078
  children: n
1079
1079
  }, r);
1080
- }), /* @__PURE__ */ F(ie, {
1080
+ }), /* @__PURE__ */ R(ie, {
1081
1081
  open: n,
1082
1082
  onOpenChange: g,
1083
- children: [/* @__PURE__ */ P(ne, {
1083
+ children: [/* @__PURE__ */ L(ne, {
1084
1084
  asChild: !0,
1085
1085
  onClick: v,
1086
- children: /* @__PURE__ */ F(k, {
1086
+ children: /* @__PURE__ */ R(A, {
1087
1087
  type: "button",
1088
1088
  variant: "link",
1089
1089
  size: "xs",
1090
1090
  className: "tg:w-fit tg:p-0! tg:focus-visible:border-transparent! tg:focus-visible:ring-0!",
1091
- children: [/* @__PURE__ */ P(I, { className: "tg:size-3" }), u("editor.inputNodeForm.addOption")]
1091
+ children: [/* @__PURE__ */ L(z, { className: "tg:size-3" }), u("editor.inputNodeForm.addOption")]
1092
1092
  })
1093
- }), /* @__PURE__ */ P(ae, {
1093
+ }), /* @__PURE__ */ L(ae, {
1094
1094
  align: "start",
1095
1095
  className: "tg:w-64 tg:p-3",
1096
1096
  onClick: v,
1097
- children: /* @__PURE__ */ F("form", {
1097
+ children: /* @__PURE__ */ R("form", {
1098
1098
  onSubmit: h,
1099
1099
  className: "tg:flex tg:flex-col tg:gap-2",
1100
1100
  children: [
1101
- /* @__PURE__ */ F("div", {
1101
+ /* @__PURE__ */ R("div", {
1102
1102
  className: "tg:flex tg:flex-col tg:gap-1",
1103
- children: [/* @__PURE__ */ P(d, {
1103
+ children: [/* @__PURE__ */ L(d, {
1104
1104
  htmlFor: `${e}-option-label`,
1105
1105
  className: "tg:text-xs",
1106
1106
  children: u("editor.inputNodeForm.optionLabel")
1107
- }), /* @__PURE__ */ P(O, {
1107
+ }), /* @__PURE__ */ L(k, {
1108
1108
  id: `${e}-option-label`,
1109
1109
  autoFocus: !0,
1110
1110
  value: i,
@@ -1112,20 +1112,20 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
1112
1112
  onKeyDown: _
1113
1113
  })]
1114
1114
  }),
1115
- /* @__PURE__ */ F("div", {
1115
+ /* @__PURE__ */ R("div", {
1116
1116
  className: "tg:flex tg:flex-col tg:gap-1",
1117
- children: [/* @__PURE__ */ P(d, {
1117
+ children: [/* @__PURE__ */ L(d, {
1118
1118
  htmlFor: `${e}-option-value`,
1119
1119
  className: "tg:text-xs",
1120
1120
  children: u("editor.inputNodeForm.optionValue")
1121
- }), /* @__PURE__ */ P(O, {
1121
+ }), /* @__PURE__ */ L(k, {
1122
1122
  id: `${e}-option-value`,
1123
1123
  value: o,
1124
1124
  onChange: (e) => s(e.target.value),
1125
1125
  onKeyDown: _
1126
1126
  })]
1127
1127
  }),
1128
- /* @__PURE__ */ P(k, {
1128
+ /* @__PURE__ */ L(A, {
1129
1129
  type: "submit",
1130
1130
  size: "sm",
1131
1131
  disabled: !(i.trim() || o.trim()),
@@ -1136,13 +1136,13 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
1136
1136
  })]
1137
1137
  })]
1138
1138
  });
1139
- }, bn = ({ nodeId: e, required: t }) => {
1140
- let { updateNodeData: n } = W(), r = U();
1141
- return /* @__PURE__ */ P(an, {
1139
+ }, Sn = ({ nodeId: e, required: t }) => {
1140
+ let { updateNodeData: n } = G(), r = W();
1141
+ return /* @__PURE__ */ L(sn, {
1142
1142
  variant: t ? "destructive" : "outline",
1143
1143
  asChild: !0,
1144
1144
  className: "nodrag nopan tg:cursor-pointer tg:px-1.5 tg:py-0 tg:text-[10px] tg:capitalize tg:[&>svg]:size-2.5",
1145
- children: /* @__PURE__ */ P("button", {
1145
+ children: /* @__PURE__ */ L("button", {
1146
1146
  type: "button",
1147
1147
  onClick: (r) => {
1148
1148
  r.stopPropagation(), n(e, { required: !t });
@@ -1150,74 +1150,78 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
1150
1150
  children: r(t ? "editor.inputNodeForm.required" : "editor.inputNodeForm.optional")
1151
1151
  })
1152
1152
  });
1153
- }, xn = ({ children: e, inGroup: t, isSubmit: n }) => /* @__PURE__ */ P("div", {
1154
- className: E("react-flow__node__wrapper tg:relative", t && "in-group", n && "submit-type"),
1153
+ }, Cn = ({ children: e, inGroup: t, isSubmit: n }) => /* @__PURE__ */ L("div", {
1154
+ className: D("react-flow__node__wrapper tg:relative", t && "in-group", n && "submit-type"),
1155
1155
  children: e
1156
- }), Sn = Tt((e) => {
1156
+ }), wn = Fe((e) => {
1157
1157
  let { id: t, isConnectable: n, parentId: r, selected: i, type: a } = e, o = e.type === "input" ? e.data : void 0, s = e.type === "ui" ? e.data : void 0, c = o?.type ?? s?.type, l = o?.type === "submit", u = !i && !!o?.type;
1158
- return /* @__PURE__ */ F(xn, {
1158
+ return /* @__PURE__ */ R(Cn, {
1159
1159
  inGroup: !!r,
1160
1160
  isSubmit: l,
1161
1161
  children: [
1162
- /* @__PURE__ */ P(nn, { nodeId: t }),
1163
- /* @__PURE__ */ P(xe, {
1162
+ /* @__PURE__ */ L(an, { nodeId: t }),
1163
+ /* @__PURE__ */ L(xe, {
1164
1164
  type: "target",
1165
1165
  position: Te.Top,
1166
1166
  isConnectable: n,
1167
1167
  isConnectableStart: a === "ui"
1168
1168
  }),
1169
- u && o ? /* @__PURE__ */ P(mn, {
1169
+ u && o ? /* @__PURE__ */ L(gn, {
1170
1170
  nodeId: t,
1171
1171
  data: o
1172
- }) : /* @__PURE__ */ F(N, { children: [
1173
- /* @__PURE__ */ P($t, {
1172
+ }) : /* @__PURE__ */ R(I, { children: [
1173
+ /* @__PURE__ */ L(en, {
1174
1174
  nodeId: t,
1175
1175
  label: e.data?.label,
1176
1176
  placeholder: o?.name,
1177
- className: E("tg:py-1", a === "ui" && "tg:capitalize")
1177
+ className: D("tg:py-1", a === "ui" && "tg:capitalize")
1178
1178
  }),
1179
- /* @__PURE__ */ F("div", {
1179
+ /* @__PURE__ */ R("div", {
1180
1180
  className: "tg:mb-1 tg:flex tg:gap-1",
1181
- children: [/* @__PURE__ */ P(_n, {
1181
+ children: [/* @__PURE__ */ L(yn, {
1182
1182
  nodeId: t,
1183
1183
  nodeType: a,
1184
1184
  subType: c
1185
- }), o && !l && /* @__PURE__ */ P(bn, {
1185
+ }), o && !l && /* @__PURE__ */ L(Sn, {
1186
1186
  nodeId: t,
1187
1187
  required: o.required
1188
1188
  })]
1189
1189
  }),
1190
- o && /* @__PURE__ */ P(yn, {
1190
+ o && /* @__PURE__ */ L(xn, {
1191
1191
  nodeId: t,
1192
1192
  data: o
1193
1193
  })
1194
1194
  ] }),
1195
- /* @__PURE__ */ P(fn, {
1195
+ /* @__PURE__ */ L(mn, {
1196
1196
  nodeId: t,
1197
1197
  isConnectable: n
1198
1198
  })
1199
1199
  ]
1200
1200
  });
1201
- }), Cn = {
1202
- [l.flow]: Sn,
1203
- [l.group]: on,
1204
- [l.input]: Sn,
1205
- [l.ui]: Sn
1206
- }, wn = {
1201
+ }), Tn = {
1202
+ [l.flow]: wn,
1203
+ [l.group]: cn,
1204
+ [l.input]: wn,
1205
+ [l.ui]: wn
1206
+ }, En = ({ show: e, onToggle: t }) => /* @__PURE__ */ L(ve, {
1207
+ onClick: t,
1208
+ title: e ? "Hide minimap" : "Show minimap",
1209
+ children: L(e ? mt : pt, {})
1210
+ }), Dn = {
1207
1211
  "!==": "≠",
1208
1212
  "<": "<",
1209
1213
  "<=": "≤",
1210
1214
  "===": "=",
1211
1215
  ">": ">",
1212
1216
  ">=": "≥"
1213
- }, Tn = (e, t) => {
1217
+ }, On = (e, t) => {
1214
1218
  let n = e?.filter((e) => e.value !== void 0 && e.value !== "") ?? [];
1215
1219
  return n.length === 0 ? "" : n.map((e, n) => {
1216
- let r = wn[e.operator ?? ""] ?? e.operator ?? "", i = `${e.field ? t(e.field) : ""} ${r} ${e.value ?? ""}`.trim();
1220
+ let r = Dn[e.operator ?? ""] ?? e.operator ?? "", i = `${e.field ? t(e.field) : ""} ${r} ${e.value ?? ""}`.trim();
1217
1221
  return `${n === 0 ? "" : ` ${e.logicalOperator ?? "AND"} `}${i}`;
1218
1222
  }).join("");
1219
- }, En = () => {
1220
- let { pendingNodeTypeChange: e, closeNodeTypeChangeConfirmation: t } = H(), { getEdges: n, getNode: r, setEdges: i, updateEdgeData: a } = M(), { updateNodeType: o } = W(), s = U(), c = kt(() => e ? n().filter((t) => t.source === e.nodeId).sort((e, t) => {
1223
+ }, kn = () => {
1224
+ let { pendingNodeTypeChange: e, closeNodeTypeChangeConfirmation: t } = U(), { getEdges: n, getNode: r, setEdges: i, updateEdgeData: a } = N(), { updateNodeType: o } = G(), s = W(), c = ze(() => e ? n().filter((t) => t.source === e.nodeId).sort((e, t) => {
1221
1225
  let n = r(e.target)?.position ?? {
1222
1226
  x: 0,
1223
1227
  y: 0
@@ -1230,8 +1234,8 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
1230
1234
  e,
1231
1235
  n,
1232
1236
  r
1233
- ]), [l, u] = z("");
1234
- Dt(() => {
1237
+ ]), [l, u] = F("");
1238
+ Le(() => {
1235
1239
  c.length > 0 && u(c[0].id);
1236
1240
  }, [c]);
1237
1241
  let f = (e) => {
@@ -1253,35 +1257,35 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
1253
1257
  }, v = (e) => {
1254
1258
  let t = r(e)?.data, n = s(t?.label) || t?.name || e;
1255
1259
  return n === e && n.length > 5 ? `${n.slice(0, 5)}…` : n;
1256
- }, y = (e) => e?.isFallback ? s("editor.conditionalEdge.fallback") : e?.label ? e.label : Tn(e?.conditions, v) || s("editor.changeNodeTypeDialog.noConditions");
1257
- return /* @__PURE__ */ P(m, {
1260
+ }, y = (e) => e?.isFallback ? s("editor.conditionalEdge.fallback") : e?.label ? e.label : On(e?.conditions, v) || s("editor.changeNodeTypeDialog.noConditions");
1261
+ return /* @__PURE__ */ L(m, {
1258
1262
  open: e !== null,
1259
1263
  onOpenChange: f,
1260
- children: /* @__PURE__ */ F(_, {
1264
+ children: /* @__PURE__ */ R(_, {
1261
1265
  showCloseButton: !1,
1262
1266
  children: [
1263
- /* @__PURE__ */ F(he, { children: [/* @__PURE__ */ P(p, { children: s("editor.changeNodeTypeDialog.title") }), /* @__PURE__ */ P(b, { children: s("editor.changeNodeTypeDialog.description") })] }),
1264
- /* @__PURE__ */ P(Gt, {
1267
+ /* @__PURE__ */ R(me, { children: [/* @__PURE__ */ L(p, { children: s("editor.changeNodeTypeDialog.title") }), /* @__PURE__ */ L(ee, { children: s("editor.changeNodeTypeDialog.description") })] }),
1268
+ /* @__PURE__ */ L(Kt, {
1265
1269
  className: "tg:max-h-80",
1266
- children: /* @__PURE__ */ P(oe, {
1270
+ children: /* @__PURE__ */ L(E, {
1267
1271
  value: l,
1268
1272
  onValueChange: u,
1269
1273
  className: "tg:gap-2 tg:pr-2",
1270
1274
  children: c.map((e) => {
1271
1275
  let t = e.data, n = y(t), r = g(e.target);
1272
- return /* @__PURE__ */ F(d, {
1276
+ return /* @__PURE__ */ R(d, {
1273
1277
  htmlFor: `keep-${e.id}`,
1274
1278
  className: "tg:flex tg:cursor-pointer tg:items-start tg:gap-3 tg:rounded-lg tg:border tg:bg-muted/20 tg:p-3",
1275
- children: [/* @__PURE__ */ P(me, {
1279
+ children: [/* @__PURE__ */ L(pe, {
1276
1280
  id: `keep-${e.id}`,
1277
1281
  value: e.id,
1278
1282
  className: "tg:mt-1"
1279
- }), /* @__PURE__ */ F("div", {
1283
+ }), /* @__PURE__ */ R("div", {
1280
1284
  className: "tg:flex tg:flex-col tg:gap-1",
1281
- children: [/* @__PURE__ */ P("span", {
1285
+ children: [/* @__PURE__ */ L("span", {
1282
1286
  className: "tg:font-medium",
1283
1287
  children: r
1284
- }), /* @__PURE__ */ P("span", {
1288
+ }), /* @__PURE__ */ L("span", {
1285
1289
  className: "tg:text-muted-foreground tg:text-xs",
1286
1290
  children: n
1287
1291
  })]
@@ -1290,11 +1294,11 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
1290
1294
  })
1291
1295
  })
1292
1296
  }),
1293
- /* @__PURE__ */ F(S, { children: [/* @__PURE__ */ P(k, {
1297
+ /* @__PURE__ */ R(S, { children: [/* @__PURE__ */ L(A, {
1294
1298
  variant: "outline",
1295
1299
  onClick: t,
1296
1300
  children: s("common.cancel")
1297
- }), /* @__PURE__ */ P(k, {
1301
+ }), /* @__PURE__ */ L(A, {
1298
1302
  onClick: h,
1299
1303
  disabled: !l,
1300
1304
  children: s("editor.changeNodeTypeDialog.keepBranch")
@@ -1302,20 +1306,20 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
1302
1306
  ]
1303
1307
  })
1304
1308
  });
1305
- }, Dn = () => {
1306
- let { pendingDeleteNodeId: e, closeDeleteNodeConfirmation: t } = H(), { deleteNode: n } = W(), r = U();
1307
- return /* @__PURE__ */ P(m, {
1309
+ }, An = () => {
1310
+ let { pendingDeleteNodeId: e, closeDeleteNodeConfirmation: t } = U(), { deleteNode: n } = G(), r = W();
1311
+ return /* @__PURE__ */ L(m, {
1308
1312
  open: e !== null,
1309
1313
  onOpenChange: (e) => {
1310
1314
  e || t();
1311
1315
  },
1312
- children: /* @__PURE__ */ F(_, {
1316
+ children: /* @__PURE__ */ R(_, {
1313
1317
  showCloseButton: !1,
1314
- children: [/* @__PURE__ */ F(he, { children: [/* @__PURE__ */ P(p, { children: r("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ P(b, { children: r("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ F(S, { children: [/* @__PURE__ */ P(k, {
1318
+ children: [/* @__PURE__ */ R(me, { children: [/* @__PURE__ */ L(p, { children: r("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ L(ee, { children: r("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ R(S, { children: [/* @__PURE__ */ L(A, {
1315
1319
  variant: "outline",
1316
1320
  onClick: t,
1317
1321
  children: r("common.cancel")
1318
- }), /* @__PURE__ */ P(k, {
1322
+ }), /* @__PURE__ */ L(A, {
1319
1323
  onClick: () => {
1320
1324
  e && n(e), t();
1321
1325
  },
@@ -1323,13 +1327,82 @@ var on = Tt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
1323
1327
  })] })]
1324
1328
  })
1325
1329
  });
1326
- }, On = "You are a Treege decision tree generator. You must generate valid JSON structures for decision trees.\n\nIMPORTANT RULES:\n1. Always respond with valid JSON only, no markdown, no code blocks, no explanations outside the JSON\n2. The JSON must have this exact structure: { \"nodes\": [...], \"edges\": [...] }\n3. Every node must have: id (string), type (string), position ({ x: number, y: number }), data (object)\n4. Every edge must have: id (string), source (string), target (string)\n5. For regex patterns: ALWAYS use double backslashes (\\\\) for special characters (\\\\s, \\\\d, etc.)\n6. AVOID using \"pattern\" field unless specifically requested - prefer using simple validation\n7. For submit buttons, use type \"input\" with data.type \"submit\", NOT type \"flow\"\n8. For conditional logic, use conditional edges with proper operators (===, !==, >, <, >=, <=)\n\nNODE TYPES:\n- \"input\": Form input fields (text, number, select, checkbox, etc.)\n- \"ui\": UI elements (title, divider)\n- \"flow\": Navigation/flow control nodes\n- \"group\": Container for organizing nodes\n\nINPUT NODE TYPES (data.type):\n- \"text\", \"number\", \"textarea\", \"password\"\n- \"select\", \"radio\", \"checkbox\", \"switch\"\n- \"autocomplete\", \"date\", \"daterange\", \"time\", \"timerange\"\n- \"file\", \"address\", \"http\", \"hidden\", \"submit\"\n\nINPUT NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Field Label\",\n \"name\": \"fieldName\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter value...\",\n \"helperText\": \"Optional helper text\",\n \"pattern\": \"regex pattern (optional)\",\n \"errorMessage\": \"Error message if validation fails\",\n \"options\": [{ \"value\": \"val\", \"label\": \"Label\" }], // for select/radio/checkbox\n \"multiple\": false // for select/checkbox\n }\n}\n\nUI NODE TYPES (data.type):\n- \"title\": Display a title\n- \"divider\": Display a divider line\n\nUI NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"UI Element Label\",\n \"type\": \"title\" // or \"divider\"\n }\n}\n\nFLOW NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"flow\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Flow Step Label\",\n \"targetId\": \"next-node-id\" // optional\n }\n}\n\nGROUP NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"group\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Group Label\"\n }\n}\n\nEDGE STRUCTURE:\n{\n \"id\": \"edge-id\",\n \"source\": \"source-node-id\",\n \"target\": \"target-node-id\",\n \"type\": \"default\" // or \"conditional\" for conditional logic\n}\n\nCONDITIONAL EDGE STRUCTURE:\n{\n \"id\": \"edge-id\",\n \"source\": \"source-node-id\",\n \"target\": \"target-node-id\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If condition is true\", // optional label for the edge\n \"conditions\": [\n {\n \"field\": \"field-node-id\", // ID of the field to check\n \"operator\": \">=\", // operators: ===, !==, >, <, >=, <=\n \"value\": \"18\" // value to compare (as string)\n }\n ],\n \"operator\": \"AND\" // optional: \"AND\" or \"OR\" for multiple conditions (default: AND)\n }\n}\n\nIMPORTANT: For conditional edges, the value must ALWAYS be a string, even for numbers.\nExample: For \"age >= 18\", use \"value\": \"18\" (not value: 18)\n\nLAYOUT GUIDELINES:\n- Position nodes in a vertical flow (top to bottom)\n- Start at position { x: 0, y: 0 }\n- Space nodes vertically by exactly 250 pixels between each position (node height 150px + 100px spacing)\n- For horizontal spacing, use 350 pixels\n- Create logical flow from top to bottom\n- IMPORTANT: Keep consistent vertical spacing to avoid overlap\n- Each node position Y should increment by 250: first at y:0, second at y:250, third at y:500, etc.\n\nEXAMPLES:\n\nUser: \"Create a simple contact form with name, email and message\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"Contact Form\", \"type\": \"title\" }\n },\n {\n \"id\": \"name-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Name\",\n \"name\": \"name\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter your name\"\n }\n },\n {\n \"id\": \"email-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Email\",\n \"name\": \"email\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"your@email.com\"\n }\n },\n {\n \"id\": \"message-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 750 },\n \"data\": {\n \"label\": \"Message\",\n \"name\": \"message\",\n \"type\": \"textarea\",\n \"required\": true,\n \"placeholder\": \"Enter your message\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"name-1\" },\n { \"id\": \"e2\", \"source\": \"name-1\", \"target\": \"email-1\" },\n { \"id\": \"e3\", \"source\": \"email-1\", \"target\": \"message-1\" }\n ]\n}\n\nUser: \"Create a user registration form with age, address and country selector\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"User Registration\", \"type\": \"title\" }\n },\n {\n \"id\": \"age-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Age\",\n \"name\": \"age\",\n \"type\": \"number\",\n \"required\": true,\n \"placeholder\": \"Enter your age\"\n }\n },\n {\n \"id\": \"address-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Address\",\n \"name\": \"address\",\n \"type\": \"address\",\n \"required\": true,\n \"placeholder\": \"Enter your address\"\n }\n },\n {\n \"id\": \"country-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 750 },\n \"data\": {\n \"label\": \"Country\",\n \"name\": \"country\",\n \"type\": \"select\",\n \"required\": true,\n \"options\": [\n { \"value\": \"us\", \"label\": \"United States\" },\n { \"value\": \"ca\", \"label\": \"Canada\" },\n { \"value\": \"uk\", \"label\": \"United Kingdom\" },\n { \"value\": \"fr\", \"label\": \"France\" },\n { \"value\": \"de\", \"label\": \"Germany\" }\n ]\n }\n },\n {\n \"id\": \"submit-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 1000 },\n \"data\": {\n \"label\": \"Submit\",\n \"type\": \"submit\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"age-1\" },\n { \"id\": \"e2\", \"source\": \"age-1\", \"target\": \"address-1\" },\n { \"id\": \"e3\", \"source\": \"address-1\", \"target\": \"country-1\" },\n { \"id\": \"e4\", \"source\": \"country-1\", \"target\": \"submit-1\" }\n ]\n}\n\nUser: \"Create a form with name, age, and show different questions based on age (movie for 18+, color for under 18)\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"Survey Form\", \"type\": \"title\" }\n },\n {\n \"id\": \"name-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Name\",\n \"name\": \"name\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter your name\"\n }\n },\n {\n \"id\": \"age-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Age\",\n \"name\": \"age\",\n \"type\": \"number\",\n \"required\": true,\n \"placeholder\": \"Enter your age\"\n }\n },\n {\n \"id\": \"movie-1\",\n \"type\": \"input\",\n \"position\": { \"x\": -350, \"y\": 750 },\n \"data\": {\n \"label\": \"Favorite Movie\",\n \"name\": \"favoriteMovie\",\n \"type\": \"text\",\n \"required\": true,\n \"helperText\": \"For adults 18 and over\"\n }\n },\n {\n \"id\": \"color-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 350, \"y\": 750 },\n \"data\": {\n \"label\": \"Favorite Color\",\n \"name\": \"favoriteColor\",\n \"type\": \"text\",\n \"required\": true,\n \"helperText\": \"For those under 18\"\n }\n },\n {\n \"id\": \"submit-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 1000 },\n \"data\": {\n \"label\": \"Submit\",\n \"type\": \"submit\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"name-1\" },\n { \"id\": \"e2\", \"source\": \"name-1\", \"target\": \"age-1\" },\n {\n \"id\": \"e3\",\n \"source\": \"age-1\",\n \"target\": \"movie-1\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If 18 or older\",\n \"conditions\": [\n {\n \"field\": \"age-1\",\n \"operator\": \">=\",\n \"value\": \"18\"\n }\n ]\n }\n },\n {\n \"id\": \"e4\",\n \"source\": \"age-1\",\n \"target\": \"color-1\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If under 18\",\n \"conditions\": [\n {\n \"field\": \"age-1\",\n \"operator\": \"<\",\n \"value\": \"18\"\n }\n ]\n }\n },\n { \"id\": \"e5\", \"source\": \"movie-1\", \"target\": \"submit-1\" },\n { \"id\": \"e6\", \"source\": \"color-1\", \"target\": \"submit-1\" }\n ]\n}\n\nRemember:\n- Always respond with ONLY valid JSON\n- No markdown code blocks\n- No explanations outside the JSON\n- Follow the exact structure shown above\n- For submit buttons, ALWAYS use type \"input\" with data.type \"submit\"\n- For conditional edges, ALWAYS specify the value as a string and use proper operators (>=, <, ===, etc.)\n- Never leave condition values empty - always provide the comparison value\n", kn = {
1330
+ }, jn = 200, Mn = 100, Nn = (e) => !!(e.measured?.width && e.measured?.height), Pn = (e, t, n) => {
1331
+ let r = n === "TB" ? "y" : "x";
1332
+ return e.reduce((e, n) => t.node(n.id)[r] < t.node(e.id)[r] ? n : e, e[0]);
1333
+ }, Fn = (e, t, n) => {
1334
+ let r = new It.graphlib.Graph().setDefaultEdgeLabel(() => ({}));
1335
+ r.setGraph({
1336
+ nodesep: n.horizontalSpacing,
1337
+ rankdir: n.direction,
1338
+ ranksep: n.verticalSpacing
1339
+ });
1340
+ let i = /* @__PURE__ */ new Set();
1341
+ e.forEach((e) => {
1342
+ i.add(e.id), r.setNode(e.id, {
1343
+ height: e.measured?.height ?? Mn,
1344
+ width: e.measured?.width ?? jn
1345
+ });
1346
+ }), t.forEach((e) => {
1347
+ i.has(e.source) && i.has(e.target) && r.setEdge(e.source, e.target);
1348
+ }), It.layout(r);
1349
+ let a = Pn(e, r, n.direction), o = a.measured?.width ?? jn, s = a.measured?.height ?? Mn, c = r.node(a.id), l = a.position.x - (c.x - o / 2), u = a.position.y - (c.y - s / 2), d = /* @__PURE__ */ new Map();
1350
+ return e.forEach((e) => {
1351
+ let { x: t, y: n } = r.node(e.id), i = e.measured?.width ?? jn, a = e.measured?.height ?? Mn;
1352
+ d.set(e.id, {
1353
+ x: t - i / 2 + l,
1354
+ y: n - a / 2 + u
1355
+ });
1356
+ }), d;
1357
+ }, In = (e) => {
1358
+ let t = /* @__PURE__ */ new Map();
1359
+ return e.forEach((e) => {
1360
+ let n = t.get(e.parentId) ?? [];
1361
+ n.push(e), t.set(e.parentId, n);
1362
+ }), t;
1363
+ }, Ln = (e, t, n = {}) => {
1364
+ let r = {
1365
+ direction: n.direction ?? "TB",
1366
+ horizontalSpacing: n.horizontalSpacing ?? 60,
1367
+ verticalSpacing: n.verticalSpacing ?? 80
1368
+ }, i = /* @__PURE__ */ new Map();
1369
+ return In(e).forEach((e) => {
1370
+ let n = e.filter(Nn);
1371
+ n.length !== 0 && Fn(n, t, r).forEach((e, t) => {
1372
+ i.set(t, e);
1373
+ });
1374
+ }), e.map((e) => {
1375
+ let t = i.get(e.id);
1376
+ return t ? {
1377
+ ...e,
1378
+ position: t
1379
+ } : e;
1380
+ });
1381
+ }, Rn = (e) => Array.from(e.nodeLookup.values()).map((e) => `${e.id}:${e.measured?.width ?? 0}x${e.measured?.height ?? 0}`).join("|"), zn = ({ direction: e, horizontalSpacing: t, verticalSpacing: n } = {}) => {
1382
+ let { getNodes: r, getEdges: i, setNodes: a } = N(), o = Me(), s = Ne(Rn);
1383
+ return Le(() => {
1384
+ o && s && a(Ln(r(), i(), {
1385
+ direction: e,
1386
+ horizontalSpacing: t,
1387
+ verticalSpacing: n
1388
+ }));
1389
+ }, [
1390
+ o,
1391
+ s,
1392
+ e,
1393
+ t,
1394
+ n,
1395
+ r,
1396
+ i,
1397
+ a
1398
+ ]), null;
1399
+ }, Bn = "You are a Treege decision tree generator. You must generate valid JSON structures for decision trees.\n\nIMPORTANT RULES:\n1. Always respond with valid JSON only, no markdown, no code blocks, no explanations outside the JSON\n2. The JSON must have this exact structure: { \"nodes\": [...], \"edges\": [...] }\n3. Every node must have: id (string), type (string), position ({ x: number, y: number }), data (object)\n4. Every edge must have: id (string), source (string), target (string)\n5. For regex patterns: ALWAYS use double backslashes (\\\\) for special characters (\\\\s, \\\\d, etc.)\n6. AVOID using \"pattern\" field unless specifically requested - prefer using simple validation\n7. For submit buttons, use type \"input\" with data.type \"submit\", NOT type \"flow\"\n8. For conditional logic, use conditional edges with proper operators (===, !==, >, <, >=, <=)\n\nNODE TYPES:\n- \"input\": Form input fields (text, number, select, checkbox, etc.)\n- \"ui\": UI elements (title, divider)\n- \"flow\": Navigation/flow control nodes\n- \"group\": Container for organizing nodes\n\nINPUT NODE TYPES (data.type):\n- \"text\", \"number\", \"textarea\", \"password\"\n- \"select\", \"radio\", \"checkbox\", \"switch\"\n- \"autocomplete\", \"date\", \"daterange\", \"time\", \"timerange\"\n- \"file\", \"address\", \"http\", \"hidden\", \"submit\"\n\nINPUT NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Field Label\",\n \"name\": \"fieldName\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter value...\",\n \"helperText\": \"Optional helper text\",\n \"pattern\": \"regex pattern (optional)\",\n \"errorMessage\": \"Error message if validation fails\",\n \"options\": [{ \"value\": \"val\", \"label\": \"Label\" }], // for select/radio/checkbox\n \"multiple\": false // for select/checkbox\n }\n}\n\nUI NODE TYPES (data.type):\n- \"title\": Display a title\n- \"divider\": Display a divider line\n\nUI NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"UI Element Label\",\n \"type\": \"title\" // or \"divider\"\n }\n}\n\nFLOW NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"flow\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Flow Step Label\",\n \"targetId\": \"next-node-id\" // optional\n }\n}\n\nGROUP NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"group\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Group Label\"\n }\n}\n\nEDGE STRUCTURE:\n{\n \"id\": \"edge-id\",\n \"source\": \"source-node-id\",\n \"target\": \"target-node-id\",\n \"type\": \"default\" // or \"conditional\" for conditional logic\n}\n\nCONDITIONAL EDGE STRUCTURE:\n{\n \"id\": \"edge-id\",\n \"source\": \"source-node-id\",\n \"target\": \"target-node-id\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If condition is true\", // optional label for the edge\n \"conditions\": [\n {\n \"field\": \"field-node-id\", // ID of the field to check\n \"operator\": \">=\", // operators: ===, !==, >, <, >=, <=\n \"value\": \"18\" // value to compare (as string)\n }\n ],\n \"operator\": \"AND\" // optional: \"AND\" or \"OR\" for multiple conditions (default: AND)\n }\n}\n\nIMPORTANT: For conditional edges, the value must ALWAYS be a string, even for numbers.\nExample: For \"age >= 18\", use \"value\": \"18\" (not value: 18)\n\nLAYOUT GUIDELINES:\n- Position nodes in a vertical flow (top to bottom)\n- Start at position { x: 0, y: 0 }\n- Space nodes vertically by exactly 250 pixels between each position (node height 150px + 100px spacing)\n- For horizontal spacing, use 350 pixels\n- Create logical flow from top to bottom\n- IMPORTANT: Keep consistent vertical spacing to avoid overlap\n- Each node position Y should increment by 250: first at y:0, second at y:250, third at y:500, etc.\n\nEXAMPLES:\n\nUser: \"Create a simple contact form with name, email and message\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"Contact Form\", \"type\": \"title\" }\n },\n {\n \"id\": \"name-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Name\",\n \"name\": \"name\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter your name\"\n }\n },\n {\n \"id\": \"email-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Email\",\n \"name\": \"email\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"your@email.com\"\n }\n },\n {\n \"id\": \"message-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 750 },\n \"data\": {\n \"label\": \"Message\",\n \"name\": \"message\",\n \"type\": \"textarea\",\n \"required\": true,\n \"placeholder\": \"Enter your message\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"name-1\" },\n { \"id\": \"e2\", \"source\": \"name-1\", \"target\": \"email-1\" },\n { \"id\": \"e3\", \"source\": \"email-1\", \"target\": \"message-1\" }\n ]\n}\n\nUser: \"Create a user registration form with age, address and country selector\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"User Registration\", \"type\": \"title\" }\n },\n {\n \"id\": \"age-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Age\",\n \"name\": \"age\",\n \"type\": \"number\",\n \"required\": true,\n \"placeholder\": \"Enter your age\"\n }\n },\n {\n \"id\": \"address-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Address\",\n \"name\": \"address\",\n \"type\": \"address\",\n \"required\": true,\n \"placeholder\": \"Enter your address\"\n }\n },\n {\n \"id\": \"country-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 750 },\n \"data\": {\n \"label\": \"Country\",\n \"name\": \"country\",\n \"type\": \"select\",\n \"required\": true,\n \"options\": [\n { \"value\": \"us\", \"label\": \"United States\" },\n { \"value\": \"ca\", \"label\": \"Canada\" },\n { \"value\": \"uk\", \"label\": \"United Kingdom\" },\n { \"value\": \"fr\", \"label\": \"France\" },\n { \"value\": \"de\", \"label\": \"Germany\" }\n ]\n }\n },\n {\n \"id\": \"submit-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 1000 },\n \"data\": {\n \"label\": \"Submit\",\n \"type\": \"submit\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"age-1\" },\n { \"id\": \"e2\", \"source\": \"age-1\", \"target\": \"address-1\" },\n { \"id\": \"e3\", \"source\": \"address-1\", \"target\": \"country-1\" },\n { \"id\": \"e4\", \"source\": \"country-1\", \"target\": \"submit-1\" }\n ]\n}\n\nUser: \"Create a form with name, age, and show different questions based on age (movie for 18+, color for under 18)\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"Survey Form\", \"type\": \"title\" }\n },\n {\n \"id\": \"name-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Name\",\n \"name\": \"name\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter your name\"\n }\n },\n {\n \"id\": \"age-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Age\",\n \"name\": \"age\",\n \"type\": \"number\",\n \"required\": true,\n \"placeholder\": \"Enter your age\"\n }\n },\n {\n \"id\": \"movie-1\",\n \"type\": \"input\",\n \"position\": { \"x\": -350, \"y\": 750 },\n \"data\": {\n \"label\": \"Favorite Movie\",\n \"name\": \"favoriteMovie\",\n \"type\": \"text\",\n \"required\": true,\n \"helperText\": \"For adults 18 and over\"\n }\n },\n {\n \"id\": \"color-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 350, \"y\": 750 },\n \"data\": {\n \"label\": \"Favorite Color\",\n \"name\": \"favoriteColor\",\n \"type\": \"text\",\n \"required\": true,\n \"helperText\": \"For those under 18\"\n }\n },\n {\n \"id\": \"submit-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 1000 },\n \"data\": {\n \"label\": \"Submit\",\n \"type\": \"submit\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"name-1\" },\n { \"id\": \"e2\", \"source\": \"name-1\", \"target\": \"age-1\" },\n {\n \"id\": \"e3\",\n \"source\": \"age-1\",\n \"target\": \"movie-1\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If 18 or older\",\n \"conditions\": [\n {\n \"field\": \"age-1\",\n \"operator\": \">=\",\n \"value\": \"18\"\n }\n ]\n }\n },\n {\n \"id\": \"e4\",\n \"source\": \"age-1\",\n \"target\": \"color-1\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If under 18\",\n \"conditions\": [\n {\n \"field\": \"age-1\",\n \"operator\": \"<\",\n \"value\": \"18\"\n }\n ]\n }\n },\n { \"id\": \"e5\", \"source\": \"movie-1\", \"target\": \"submit-1\" },\n { \"id\": \"e6\", \"source\": \"color-1\", \"target\": \"submit-1\" }\n ]\n}\n\nRemember:\n- Always respond with ONLY valid JSON\n- No markdown code blocks\n- No explanations outside the JSON\n- Follow the exact structure shown above\n- For submit buttons, ALWAYS use type \"input\" with data.type \"submit\"\n- For conditional edges, ALWAYS specify the value as a string and use proper operators (>=, <, ===, etc.)\n- Never leave condition values empty - always provide the comparison value\n", Vn = {
1327
1400
  claude: "claude-3-5-haiku-20241022",
1328
1401
  deepseek: "deepseek-chat",
1329
1402
  gemini: "gemini-2.5-flash",
1330
1403
  openai: "gpt-4o-mini"
1331
- }, An = .3;
1332
- function jn(e) {
1404
+ }, Hn = .3;
1405
+ function Un(e) {
1333
1406
  try {
1334
1407
  return JSON.parse(e);
1335
1408
  } catch (t) {
@@ -1341,10 +1414,10 @@ function jn(e) {
1341
1414
  }
1342
1415
  }
1343
1416
  }
1344
- async function Mn(e) {
1345
- let t = e.config.model || kn.gemini, n = e.config.temperature ?? An, r = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/${t}:generateContent?key=${e.config.apiKey}`, {
1417
+ async function Wn(e) {
1418
+ let t = e.config.model || Vn.gemini, n = e.config.temperature ?? Hn, r = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/${t}:generateContent?key=${e.config.apiKey}`, {
1346
1419
  body: JSON.stringify({
1347
- contents: [{ parts: [{ text: `${On}\n\nUser request: ${e.prompt}` }] }],
1420
+ contents: [{ parts: [{ text: `${Bn}\n\nUser request: ${e.prompt}` }] }],
1348
1421
  generationConfig: {
1349
1422
  responseMimeType: "application/json",
1350
1423
  temperature: n
@@ -1359,13 +1432,13 @@ async function Mn(e) {
1359
1432
  }
1360
1433
  let i = (await r.json()).candidates?.[0]?.content?.parts?.[0]?.text;
1361
1434
  if (!i) throw Error("No response from Gemini");
1362
- return jn(i);
1435
+ return Un(i);
1363
1436
  }
1364
- async function Nn(e) {
1365
- let t = e.config.model || kn.openai, n = e.config.temperature ?? An, r = await fetch("https://api.openai.com/v1/chat/completions", {
1437
+ async function Gn(e) {
1438
+ let t = e.config.model || Vn.openai, n = e.config.temperature ?? Hn, r = await fetch("https://api.openai.com/v1/chat/completions", {
1366
1439
  body: JSON.stringify({
1367
1440
  messages: [{
1368
- content: On,
1441
+ content: Bn,
1369
1442
  role: "system"
1370
1443
  }, {
1371
1444
  content: e.prompt,
@@ -1387,13 +1460,13 @@ async function Nn(e) {
1387
1460
  }
1388
1461
  let i = (await r.json()).choices?.[0]?.message?.content;
1389
1462
  if (!i) throw Error("No response from OpenAI");
1390
- return jn(i);
1463
+ return Un(i);
1391
1464
  }
1392
- async function Pn(e) {
1393
- let t = e.config.model || kn.deepseek, n = e.config.temperature ?? An, r = await fetch("https://api.deepseek.com/v1/chat/completions", {
1465
+ async function Kn(e) {
1466
+ let t = e.config.model || Vn.deepseek, n = e.config.temperature ?? Hn, r = await fetch("https://api.deepseek.com/v1/chat/completions", {
1394
1467
  body: JSON.stringify({
1395
1468
  messages: [{
1396
- content: On,
1469
+ content: Bn,
1397
1470
  role: "system"
1398
1471
  }, {
1399
1472
  content: e.prompt,
@@ -1415,10 +1488,10 @@ async function Pn(e) {
1415
1488
  }
1416
1489
  let i = (await r.json()).choices?.[0]?.message?.content;
1417
1490
  if (!i) throw Error("No response from DeepSeek");
1418
- return jn(i);
1491
+ return Un(i);
1419
1492
  }
1420
- async function Fn(e) {
1421
- let t = e.config.model || kn.claude, n = e.config.temperature ?? An, r = await fetch("https://api.anthropic.com/v1/messages", {
1493
+ async function qn(e) {
1494
+ let t = e.config.model || Vn.claude, n = e.config.temperature ?? Hn, r = await fetch("https://api.anthropic.com/v1/messages", {
1422
1495
  body: JSON.stringify({
1423
1496
  max_tokens: 4096,
1424
1497
  messages: [{
@@ -1426,7 +1499,7 @@ async function Fn(e) {
1426
1499
  role: "user"
1427
1500
  }],
1428
1501
  model: t,
1429
- system: On,
1502
+ system: Bn,
1430
1503
  temperature: n
1431
1504
  }),
1432
1505
  headers: {
@@ -1442,75 +1515,78 @@ async function Fn(e) {
1442
1515
  }
1443
1516
  let i = (await r.json()).content?.[0]?.text;
1444
1517
  if (!i) throw Error("No response from Claude");
1445
- return jn(i);
1518
+ return Un(i);
1446
1519
  }
1447
- function In(e) {
1520
+ function Jn(e) {
1448
1521
  switch (e.config.provider) {
1449
- case "gemini": return Mn(e);
1450
- case "openai": return Nn(e);
1451
- case "deepseek": return Pn(e);
1452
- case "claude": return Fn(e);
1522
+ case "gemini": return Wn(e);
1523
+ case "openai": return Gn(e);
1524
+ case "deepseek": return Kn(e);
1525
+ case "claude": return qn(e);
1453
1526
  default: throw Error(`Unsupported AI provider: ${e.config.provider}`);
1454
1527
  }
1455
1528
  }
1456
1529
  //#endregion
1457
1530
  //#region src/editor/features/TreegeEditor/panel/AIGeneratorDialog.tsx
1458
- var Ln = ({ aiConfig: e, onGenerate: t }) => {
1459
- let [n, r] = z(!1), [i, a] = z(""), [o, s] = z(!1), c = U(), l = async () => {
1531
+ var Yn = ({ aiConfig: e, onGenerate: t }) => {
1532
+ let [n, r] = F(!1), [i, a] = F(""), [o, s] = F(!1), c = W(), l = async () => {
1460
1533
  if (!i.trim()) {
1461
- V.error(c("editor.aiGenerator.enterDescription"));
1534
+ H.error(c("editor.aiGenerator.enterDescription"));
1462
1535
  return;
1463
1536
  }
1464
1537
  if (!e?.apiKey) {
1465
- V.error(c("editor.aiGenerator.missingApiKey"), { description: c("editor.aiGenerator.missingApiKeyDesc") });
1538
+ H.error(c("editor.aiGenerator.missingApiKey"), { description: c("editor.aiGenerator.missingApiKeyDesc") });
1466
1539
  return;
1467
1540
  }
1468
1541
  s(!0);
1469
1542
  try {
1470
- let n = await In({
1543
+ let n = await Jn({
1471
1544
  config: e,
1472
1545
  prompt: i.trim()
1473
1546
  });
1474
1547
  t({
1475
1548
  edges: n.edges,
1476
1549
  nodes: n.nodes
1477
- }), V.success(c("editor.aiGenerator.successTitle"), { description: c("editor.aiGenerator.successDescription").replace("{nodes}", String(n.nodes.length)).replace("{edges}", String(n.edges.length)) }), a(""), r(!1);
1550
+ }), H.success(c("editor.aiGenerator.successTitle"), { description: c("editor.aiGenerator.successDescription").replace("{nodes}", String(n.nodes.length)).replace("{edges}", String(n.edges.length)) }), a(""), r(!1);
1478
1551
  } catch (e) {
1479
- console.error("AI generation error:", e), V.error(c("editor.aiGenerator.failedToGenerate"), { description: e instanceof Error ? e.message : c("editor.aiGenerator.unknownError") });
1552
+ console.error("AI generation error:", e), H.error(c("editor.aiGenerator.failedToGenerate"), { description: e instanceof Error ? e.message : c("editor.aiGenerator.unknownError") });
1480
1553
  } finally {
1481
1554
  s(!1);
1482
1555
  }
1483
1556
  };
1484
- return /* @__PURE__ */ F(m, {
1557
+ return /* @__PURE__ */ R(m, {
1485
1558
  open: n,
1486
1559
  onOpenChange: r,
1487
- children: [/* @__PURE__ */ P(re, {
1560
+ children: [/* @__PURE__ */ L(re, {
1488
1561
  asChild: !0,
1489
- children: /* @__PURE__ */ F(k, {
1562
+ children: /* @__PURE__ */ R(A, {
1490
1563
  variant: "outline",
1491
1564
  size: "sm",
1492
1565
  disabled: !e?.apiKey,
1493
1566
  children: [
1494
- /* @__PURE__ */ P(xt, { className: "tg:h-4 tg:w-4 tg:text-[#13d3b4]" }),
1567
+ /* @__PURE__ */ L(kt, { className: "tg:h-4 tg:w-4 tg:text-[#13d3b4]" }),
1495
1568
  " ",
1496
- c("editor.aiGenerator.buttonLabel")
1569
+ /* @__PURE__ */ L("span", {
1570
+ className: "tg:hidden tg:md:inline",
1571
+ children: c("editor.aiGenerator.buttonLabel")
1572
+ })
1497
1573
  ]
1498
1574
  })
1499
- }), /* @__PURE__ */ F(_, {
1575
+ }), /* @__PURE__ */ R(_, {
1500
1576
  className: "tg:sm:max-w-[550px]!",
1501
1577
  children: [
1502
- /* @__PURE__ */ F(he, { children: [/* @__PURE__ */ P(p, { children: c("editor.aiGenerator.title") }), /* @__PURE__ */ P(b, { children: c("editor.aiGenerator.titleDescription") })] }),
1503
- /* @__PURE__ */ F("div", {
1578
+ /* @__PURE__ */ R(me, { children: [/* @__PURE__ */ L(p, { children: c("editor.aiGenerator.title") }), /* @__PURE__ */ L(ee, { children: c("editor.aiGenerator.titleDescription") })] }),
1579
+ /* @__PURE__ */ R("div", {
1504
1580
  className: "tg:grid tg:gap-4 tg:py-4",
1505
- children: [/* @__PURE__ */ F("div", {
1581
+ children: [/* @__PURE__ */ R("div", {
1506
1582
  className: "tg:grid tg:gap-2",
1507
1583
  children: [
1508
- /* @__PURE__ */ P("label", {
1584
+ /* @__PURE__ */ L("label", {
1509
1585
  htmlFor: "ai-prompt",
1510
1586
  className: "tg:font-medium tg:text-sm",
1511
1587
  children: c("editor.aiGenerator.description")
1512
1588
  }),
1513
- /* @__PURE__ */ P(le, {
1589
+ /* @__PURE__ */ L(ce, {
1514
1590
  placeholder: c("editor.aiGenerator.descriptionPlaceholder"),
1515
1591
  value: i,
1516
1592
  onChange: (e) => a(e.target.value),
@@ -1521,22 +1597,22 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
1521
1597
  disabled: o,
1522
1598
  className: "tg:resize-none"
1523
1599
  }),
1524
- /* @__PURE__ */ P("p", {
1600
+ /* @__PURE__ */ L("p", {
1525
1601
  className: "tg:text-muted-foreground tg:text-xs",
1526
1602
  children: c("editor.aiGenerator.keyboardShortcut").replace("{cmdEnter}", "⌘ Enter").replace("{ctrlEnter}", "Ctrl Enter")
1527
1603
  })
1528
1604
  ]
1529
- }), !e?.apiKey && /* @__PURE__ */ F("div", {
1605
+ }), !e?.apiKey && /* @__PURE__ */ R("div", {
1530
1606
  className: "tg:rounded-md tg:bg-muted tg:p-3 tg:text-sm",
1531
- children: [/* @__PURE__ */ P("p", {
1607
+ children: [/* @__PURE__ */ L("p", {
1532
1608
  className: "tg:font-medium",
1533
1609
  children: c("editor.aiGenerator.aiNotConfigured")
1534
- }), /* @__PURE__ */ F("p", {
1610
+ }), /* @__PURE__ */ R("p", {
1535
1611
  className: "tg:mt-1 tg:text-muted-foreground tg:text-xs",
1536
1612
  children: [
1537
1613
  c("editor.aiGenerator.aiNotConfiguredDesc").replace("{code}", ""),
1538
1614
  " ",
1539
- /* @__PURE__ */ P("code", {
1615
+ /* @__PURE__ */ L("code", {
1540
1616
  className: "tg:rounded tg:bg-background tg:px-1 tg:py-0.5",
1541
1617
  children: "aiConfig"
1542
1618
  })
@@ -1544,176 +1620,187 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
1544
1620
  })]
1545
1621
  })]
1546
1622
  }),
1547
- /* @__PURE__ */ F(S, { children: [/* @__PURE__ */ P(k, {
1623
+ /* @__PURE__ */ R(S, { children: [/* @__PURE__ */ L(A, {
1548
1624
  variant: "outline",
1549
1625
  onClick: () => r(!1),
1550
1626
  disabled: o,
1551
1627
  children: c("editor.aiGenerator.cancel")
1552
- }), /* @__PURE__ */ P(k, {
1628
+ }), /* @__PURE__ */ L(A, {
1553
1629
  onClick: l,
1554
1630
  disabled: o || !i.trim() || !e?.apiKey,
1555
- children: o ? /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(at, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), c("editor.aiGenerator.generating")] }) : /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(xt, { className: "tg:h-4 tg:w-4 tg:text-[--treege-color-primary]" }), c("editor.aiGenerator.generate")] })
1631
+ children: o ? /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(ft, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), c("editor.aiGenerator.generating")] }) : /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(kt, { className: "tg:h-4 tg:w-4 tg:text-[--treege-color-primary]" }), c("editor.aiGenerator.generate")] })
1556
1632
  })] })
1557
1633
  ]
1558
1634
  })]
1559
1635
  });
1560
- }, Rn = Zt(), zn = ({ onExportJson: e, onSave: t }) => {
1561
- let { flowId: n, setFlowId: r, aiConfig: i } = H(), { setNodes: a, setEdges: o, addNodes: s, screenToFlowPosition: c } = M(), l = n || Rn, u = je(), d = Ae(), f = At(null), p = U(), m = () => {
1562
- let e = (window.innerWidth || 0) / 2, t = (window.innerHeight || 0) / 2, n = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-width"), 10), r = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-height"), 10), i = c({
1636
+ }, Xn = Qt(), Zn = ({ onExportJson: e, onSave: t, extraMenuItems: n }) => {
1637
+ let { flowId: r, setFlowId: i, aiConfig: a } = U(), { setNodes: o, setEdges: s, addNodes: c, screenToFlowPosition: l } = N(), u = r || Xn, d = je(), f = Ae(), p = Be(null), m = W(), h = () => {
1638
+ let e = (window.innerWidth || 0) / 2, t = (window.innerHeight || 0) / 2, n = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-width"), 10), r = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-height"), 10), i = l({
1563
1639
  x: e - n,
1564
1640
  y: t - r
1565
1641
  });
1566
- s([{
1567
- ...sn,
1568
- id: Zt(),
1642
+ c([{
1643
+ ...ln,
1644
+ id: Qt(),
1569
1645
  position: i,
1570
1646
  selected: !0
1571
1647
  }]);
1572
- }, h = ({ target: e }) => {
1648
+ }, g = ({ target: e }) => {
1573
1649
  let t = e.files?.[0];
1574
1650
  if (!t) return;
1575
1651
  let n = new FileReader();
1576
1652
  n.onload = (e) => {
1577
1653
  try {
1578
1654
  let t = JSON.parse(e.target?.result);
1579
- t && Array.isArray(t.nodes) && Array.isArray(t.edges) ? (a(t.nodes), o(t.edges), V.success(p("editor.actionsPanel.importSuccess"), { description: p("editor.actionsPanel.importSuccessDesc") })) : V.error(p("editor.actionsPanel.invalidJson"), { description: p("editor.actionsPanel.invalidJsonDesc") });
1655
+ t && Array.isArray(t.nodes) && Array.isArray(t.edges) ? (o(t.nodes), s(t.edges), H.success(m("editor.actionsPanel.importSuccess"), { description: m("editor.actionsPanel.importSuccessDesc") })) : H.error(m("editor.actionsPanel.invalidJson"), { description: m("editor.actionsPanel.invalidJsonDesc") });
1580
1656
  } catch (e) {
1581
- console.warn(e), V.error(p("editor.actionsPanel.parseError"), { description: p("editor.actionsPanel.parseErrorDesc") });
1657
+ console.warn(e), H.error(m("editor.actionsPanel.parseError"), { description: m("editor.actionsPanel.parseErrorDesc") });
1582
1658
  }
1583
- f.current && (f.current.value = "");
1659
+ p.current && (p.current.value = "");
1584
1660
  }, n.readAsText(t);
1585
- }, g = () => {
1661
+ }, _ = () => {
1586
1662
  let t = {
1587
- edges: d,
1588
- id: l,
1589
- nodes: u
1590
- }, i = new Blob([JSON.stringify(t, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
1591
- o.href = a, o.download = "treege.json", o.click(), URL.revokeObjectURL(a), V.success(p("editor.actionsPanel.downloadSuccess"), { description: p("editor.actionsPanel.downloadSuccessDesc") }), n || r?.(l), e?.(t);
1592
- }, _ = R(() => {
1593
- n || r?.(l), t?.({
1594
- edges: d,
1595
- id: l,
1596
- nodes: u
1663
+ edges: f,
1664
+ id: u,
1665
+ nodes: d
1666
+ }, n = new Blob([JSON.stringify(t, null, 2)], { type: "application/json" }), a = URL.createObjectURL(n), o = document.createElement("a");
1667
+ o.href = a, o.download = "treege.json", o.click(), URL.revokeObjectURL(a), H.success(m("editor.actionsPanel.downloadSuccess"), { description: m("editor.actionsPanel.downloadSuccessDesc") }), r || i?.(u), e?.(t);
1668
+ }, v = P(() => {
1669
+ r || i?.(u), t?.({
1670
+ edges: f,
1671
+ id: u,
1672
+ nodes: d
1597
1673
  });
1598
1674
  }, [
1599
- d,
1600
- n,
1601
- l,
1675
+ f,
1676
+ r,
1602
1677
  u,
1678
+ d,
1603
1679
  t,
1604
- r
1680
+ i
1605
1681
  ]);
1606
- return Dt(() => {
1682
+ return Le(() => {
1607
1683
  let e = (e) => {
1608
- (e.ctrlKey || e.metaKey) && e.key === "s" && (e.preventDefault(), _());
1684
+ (e.ctrlKey || e.metaKey) && e.key === "s" && (e.preventDefault(), v());
1609
1685
  };
1610
1686
  return window.addEventListener("keydown", e), () => {
1611
1687
  window.removeEventListener("keydown", e);
1612
1688
  };
1613
- }, [_]), /* @__PURE__ */ F(we, {
1689
+ }, [v]), /* @__PURE__ */ R(we, {
1614
1690
  position: "top-right",
1615
1691
  className: "tg:flex tg:gap-2",
1616
1692
  children: [
1617
- /* @__PURE__ */ P(Ln, {
1618
- aiConfig: i,
1693
+ /* @__PURE__ */ L(Yn, {
1694
+ aiConfig: a,
1619
1695
  onGenerate: (e) => {
1620
- a(e.nodes), o(e.edges);
1696
+ o(e.nodes), s(e.edges);
1621
1697
  }
1622
1698
  }),
1623
- /* @__PURE__ */ F(k, {
1699
+ /* @__PURE__ */ R(A, {
1624
1700
  variant: "outline",
1625
1701
  size: "sm",
1626
- onClick: m,
1702
+ onClick: h,
1627
1703
  children: [
1628
- /* @__PURE__ */ P(I, {}),
1704
+ /* @__PURE__ */ L(z, {}),
1629
1705
  " ",
1630
- p("editor.actionsPanel.addNode")
1706
+ /* @__PURE__ */ L("span", {
1707
+ className: "tg:hidden tg:md:inline",
1708
+ children: m("editor.actionsPanel.addNode")
1709
+ })
1631
1710
  ]
1632
1711
  }),
1633
- /* @__PURE__ */ F(k, {
1712
+ /* @__PURE__ */ R(A, {
1634
1713
  variant: "outline",
1635
1714
  size: "sm",
1636
- onClick: _,
1715
+ onClick: v,
1637
1716
  children: [
1638
- /* @__PURE__ */ P(pt, {}),
1717
+ /* @__PURE__ */ L(xt, {}),
1639
1718
  " ",
1640
- p("common.save")
1719
+ /* @__PURE__ */ L("span", {
1720
+ className: "tg:hidden tg:md:inline",
1721
+ children: m("common.save")
1722
+ })
1641
1723
  ]
1642
1724
  }),
1643
- /* @__PURE__ */ F(G, { children: [/* @__PURE__ */ P(K, {
1725
+ /* @__PURE__ */ R(K, { children: [/* @__PURE__ */ L(tn, {
1644
1726
  asChild: !0,
1645
- children: /* @__PURE__ */ P(k, {
1727
+ children: /* @__PURE__ */ L(A, {
1646
1728
  variant: "outline",
1647
1729
  size: "sm",
1648
- children: /* @__PURE__ */ P(Ze, {})
1730
+ children: /* @__PURE__ */ L(it, {})
1649
1731
  })
1650
- }), /* @__PURE__ */ F(q, {
1732
+ }), /* @__PURE__ */ R(nn, {
1651
1733
  align: "start",
1652
1734
  children: [
1653
- /* @__PURE__ */ P(en, {
1735
+ /* @__PURE__ */ L(rn, {
1654
1736
  className: "tg:font-normal",
1655
- children: /* @__PURE__ */ F("div", {
1737
+ children: /* @__PURE__ */ R("div", {
1656
1738
  className: "tg:flex tg:flex-col tg:gap-1",
1657
- children: [/* @__PURE__ */ P("span", {
1739
+ children: [/* @__PURE__ */ L("span", {
1658
1740
  className: "tg:text-muted-foreground tg:text-xs",
1659
1741
  children: "Flow ID"
1660
- }), /* @__PURE__ */ F("button", {
1742
+ }), /* @__PURE__ */ R("button", {
1661
1743
  onClick: async () => {
1662
1744
  try {
1663
- await navigator.clipboard.writeText(l), V.success(p("editor.actionsPanel.idCopied"), { description: l });
1745
+ await navigator.clipboard.writeText(u), H.success(m("editor.actionsPanel.idCopied"), { description: u });
1664
1746
  } catch {
1665
- V.error(p("editor.actionsPanel.copyFailed"));
1747
+ H.error(m("editor.actionsPanel.copyFailed"));
1666
1748
  }
1667
1749
  },
1668
1750
  className: "tg:flex tg:items-center tg:gap-2 tg:font-mono tg:text-muted-foreground tg:transition-colors tg:hover:text-primary",
1669
1751
  type: "button",
1670
- children: [/* @__PURE__ */ P(Ye, { className: "tg:h-3 tg:w-3" }), /* @__PURE__ */ P("span", {
1752
+ children: [/* @__PURE__ */ L(nt, { className: "tg:h-3 tg:w-3" }), /* @__PURE__ */ L("span", {
1671
1753
  className: "tg:truncate tg:text-xs",
1672
- children: l
1754
+ children: u
1673
1755
  })]
1674
1756
  })]
1675
1757
  })
1676
1758
  }),
1677
- /* @__PURE__ */ P(tn, {}),
1678
- /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ F(Y, {
1679
- onClick: () => f?.current?.click(),
1759
+ /* @__PURE__ */ L(Y, {}),
1760
+ /* @__PURE__ */ R(q, { children: [/* @__PURE__ */ R(J, {
1761
+ onClick: () => p?.current?.click(),
1680
1762
  children: [
1681
- /* @__PURE__ */ P(Xe, {}),
1763
+ /* @__PURE__ */ L(rt, {}),
1682
1764
  " ",
1683
- p("editor.actionsPanel.importJson")
1765
+ m("editor.actionsPanel.importJson")
1684
1766
  ]
1685
- }), /* @__PURE__ */ F(Y, {
1686
- onClick: g,
1767
+ }), /* @__PURE__ */ R(J, {
1768
+ onClick: _,
1687
1769
  children: [
1688
- /* @__PURE__ */ P(Ie, {}),
1770
+ /* @__PURE__ */ L(Ue, {}),
1689
1771
  " ",
1690
- p("editor.actionsPanel.exportJson")
1772
+ m("editor.actionsPanel.exportJson")
1691
1773
  ]
1692
1774
  })] }),
1693
- /* @__PURE__ */ P(tn, {}),
1694
- /* @__PURE__ */ P(J, { children: /* @__PURE__ */ F(Y, {
1775
+ n && n.length > 0 && /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(Y, {}), /* @__PURE__ */ L(q, { children: n.map((e, t) => /* @__PURE__ */ R(J, {
1776
+ onClick: e.onClick,
1777
+ className: e.destructive ? "tg:text-destructive tg:focus:text-destructive" : void 0,
1778
+ children: [e.icon, e.label]
1779
+ }, t)) })] }),
1780
+ /* @__PURE__ */ L(Y, {}),
1781
+ /* @__PURE__ */ L(q, { children: /* @__PURE__ */ R(J, {
1695
1782
  onClick: () => {
1696
- a([]), o([]), V.success(p("editor.actionsPanel.clearSuccess"), { description: p("editor.actionsPanel.clearSuccessDesc") });
1783
+ o([]), s([]), H.success(m("editor.actionsPanel.clearSuccess"), { description: m("editor.actionsPanel.clearSuccessDesc") });
1697
1784
  },
1698
1785
  className: "tg:text-destructive tg:focus:text-destructive",
1699
1786
  children: [
1700
- /* @__PURE__ */ P(vt, { className: "tg:text-destructive" }),
1787
+ /* @__PURE__ */ L(Et, { className: "tg:text-destructive" }),
1701
1788
  " ",
1702
- p("editor.actionsPanel.clear")
1789
+ m("editor.actionsPanel.clear")
1703
1790
  ]
1704
1791
  }) })
1705
1792
  ]
1706
1793
  })] }),
1707
- /* @__PURE__ */ P("input", {
1794
+ /* @__PURE__ */ L("input", {
1708
1795
  type: "file",
1709
1796
  accept: "application/json,.json",
1710
1797
  className: "tg:hidden",
1711
- ref: f,
1712
- onChange: h
1798
+ ref: p,
1799
+ onChange: g
1713
1800
  })
1714
1801
  ]
1715
1802
  });
1716
- }, Bn = {
1803
+ }, Qn = {
1717
1804
  ar: "ar",
1718
1805
  de: "de",
1719
1806
  en: "en",
@@ -1721,19 +1808,19 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
1721
1808
  fr: "fr",
1722
1809
  it: "it",
1723
1810
  pt: "pt"
1724
- }, Q = ({ value: e = "en", onValueChange: t }) => /* @__PURE__ */ F(g, {
1811
+ }, Q = ({ value: e = "en", onValueChange: t }) => /* @__PURE__ */ R(g, {
1725
1812
  value: e,
1726
1813
  onValueChange: t,
1727
- children: [/* @__PURE__ */ P(v, {
1814
+ children: [/* @__PURE__ */ L(v, {
1728
1815
  className: "tg:uppercase",
1729
- children: /* @__PURE__ */ P(T, { placeholder: "" })
1730
- }), /* @__PURE__ */ P(C, { children: /* @__PURE__ */ P(w, { children: Object.values(Bn).map((e) => /* @__PURE__ */ P(h, {
1816
+ children: /* @__PURE__ */ L(T, { placeholder: "" })
1817
+ }), /* @__PURE__ */ L(C, { children: /* @__PURE__ */ L(w, { children: Object.values(Qn).map((e) => /* @__PURE__ */ L(h, {
1731
1818
  value: e,
1732
1819
  className: "tg:uppercase",
1733
1820
  children: e
1734
1821
  }, e)) }) })]
1735
1822
  }), $ = () => {
1736
- let e = je(), t = kt(() => e.filter(n), [e]), r = kt(() => e.filter((e) => e.selected), [e]), i = kt(() => e.find((e) => e.selected), [e]);
1823
+ let e = je(), t = ze(() => e.filter(n), [e]), r = ze(() => e.filter((e) => e.selected), [e]), i = ze(() => e.find((e) => e.selected), [e]);
1737
1824
  return {
1738
1825
  groupNodes: t,
1739
1826
  hasSelectedNodes: r.length > 0,
@@ -1741,8 +1828,8 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
1741
1828
  selectedNode: i,
1742
1829
  selectedNodes: r
1743
1830
  };
1744
- }, Vn = () => {
1745
- let [e, t] = z("en"), { updateSelectedNodeData: n } = W(), { selectedNode: r } = $(), i = U(), { Field: a } = Pe({
1831
+ }, $n = () => {
1832
+ let [e, t] = F("en"), { updateSelectedNodeData: n } = G(), { selectedNode: r } = $(), i = W(), { Field: a } = Ve({
1746
1833
  defaultValues: {
1747
1834
  label: r?.data?.label || { en: "" },
1748
1835
  targetId: r?.data?.targetId || ""
@@ -1757,22 +1844,22 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
1757
1844
  n(e);
1758
1845
  }
1759
1846
  });
1760
- return /* @__PURE__ */ P("form", {
1847
+ return /* @__PURE__ */ L("form", {
1761
1848
  onSubmit: (e) => {
1762
1849
  e.preventDefault(), e.stopPropagation();
1763
1850
  },
1764
- children: /* @__PURE__ */ F("div", {
1851
+ children: /* @__PURE__ */ R("div", {
1765
1852
  className: "tg:grid tg:gap-6",
1766
- children: [/* @__PURE__ */ F("div", {
1853
+ children: [/* @__PURE__ */ R("div", {
1767
1854
  className: "tg:flex tg:items-end tg:gap-2",
1768
- children: [/* @__PURE__ */ P(a, {
1855
+ children: [/* @__PURE__ */ L(a, {
1769
1856
  name: "label",
1770
- children: (t) => /* @__PURE__ */ F(A, {
1857
+ children: (t) => /* @__PURE__ */ R(j, {
1771
1858
  className: "tg:flex-1",
1772
- children: [/* @__PURE__ */ P(d, {
1859
+ children: [/* @__PURE__ */ L(d, {
1773
1860
  htmlFor: t.name,
1774
1861
  children: i("editor.flowNodeForm.label")
1775
- }), /* @__PURE__ */ P(O, {
1862
+ }), /* @__PURE__ */ L(k, {
1776
1863
  id: t.name,
1777
1864
  name: t.name,
1778
1865
  value: t.state.value?.[e] || "",
@@ -1785,31 +1872,31 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
1785
1872
  }
1786
1873
  })]
1787
1874
  })
1788
- }), /* @__PURE__ */ P(Q, {
1875
+ }), /* @__PURE__ */ L(Q, {
1789
1876
  value: e,
1790
1877
  onValueChange: t
1791
1878
  })]
1792
- }), /* @__PURE__ */ P(a, {
1879
+ }), /* @__PURE__ */ L(a, {
1793
1880
  name: "targetId",
1794
- children: (e) => /* @__PURE__ */ F(A, { children: [
1795
- /* @__PURE__ */ F(d, {
1881
+ children: (e) => /* @__PURE__ */ R(j, { children: [
1882
+ /* @__PURE__ */ R(d, {
1796
1883
  htmlFor: e.name,
1797
1884
  children: [i("editor.flowNodeForm.targetId"), " (Flow ID)"]
1798
1885
  }),
1799
- /* @__PURE__ */ P(O, {
1886
+ /* @__PURE__ */ L(k, {
1800
1887
  id: e.name,
1801
1888
  name: e.name,
1802
1889
  value: e.state.value,
1803
1890
  onBlur: e.handleBlur,
1804
1891
  onChange: ({ target: t }) => e.handleChange(t.value)
1805
1892
  }),
1806
- /* @__PURE__ */ P(j, { children: "Unique identifier of the target flow." })
1893
+ /* @__PURE__ */ L(M, { children: "Unique identifier of the target flow." })
1807
1894
  ] })
1808
1895
  })]
1809
1896
  })
1810
1897
  });
1811
- }, Hn = () => {
1812
- let [e, t] = z("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = W(), { Field: i } = Pe({
1898
+ }, er = () => {
1899
+ let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = G(), { Field: i } = Ve({
1813
1900
  defaultValues: { label: n?.data?.label || { en: "" } },
1814
1901
  listeners: {
1815
1902
  onChange: ({ formApi: e }) => {
@@ -1821,20 +1908,20 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
1821
1908
  r(e);
1822
1909
  }
1823
1910
  });
1824
- return /* @__PURE__ */ P("form", {
1911
+ return /* @__PURE__ */ L("form", {
1825
1912
  onSubmit: (e) => {
1826
1913
  e.preventDefault(), e.stopPropagation();
1827
1914
  },
1828
- children: /* @__PURE__ */ F("div", {
1915
+ children: /* @__PURE__ */ R("div", {
1829
1916
  className: "tg:flex tg:items-end tg:gap-2",
1830
- children: [/* @__PURE__ */ P(i, {
1917
+ children: [/* @__PURE__ */ L(i, {
1831
1918
  name: "label",
1832
- children: (t) => /* @__PURE__ */ F(A, {
1919
+ children: (t) => /* @__PURE__ */ R(j, {
1833
1920
  className: "tg:flex-1",
1834
- children: [/* @__PURE__ */ P(d, {
1921
+ children: [/* @__PURE__ */ L(d, {
1835
1922
  htmlFor: t.name,
1836
1923
  children: "Label"
1837
- }), /* @__PURE__ */ P(O, {
1924
+ }), /* @__PURE__ */ L(k, {
1838
1925
  id: t.name,
1839
1926
  name: t.name,
1840
1927
  value: t.state.value?.[e] || "",
@@ -1847,18 +1934,18 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
1847
1934
  }
1848
1935
  })]
1849
1936
  })
1850
- }), /* @__PURE__ */ P(Q, {
1937
+ }), /* @__PURE__ */ L(Q, {
1851
1938
  value: e,
1852
1939
  onValueChange: t
1853
1940
  })]
1854
1941
  })
1855
1942
  });
1856
- }, Un = [
1943
+ }, tr = [
1857
1944
  "POST",
1858
1945
  "PUT",
1859
1946
  "PATCH"
1860
- ], Wn = ({ value: e, onChange: t }) => {
1861
- let { selectedNode: n } = $(), r = U(), i = Ht(n?.id), { handleSubmit: a, Field: o, Subscribe: s } = Pe({
1947
+ ], nr = ({ value: e, onChange: t }) => {
1948
+ let { selectedNode: n } = $(), r = W(), i = Ut(n?.id), { handleSubmit: a, Field: o, Subscribe: s } = Ve({
1862
1949
  defaultValues: {
1863
1950
  body: e?.body || "",
1864
1951
  fetchOnMount: e?.fetchOnMount ?? !e?.searchParam,
@@ -1884,19 +1971,19 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
1884
1971
  t(e);
1885
1972
  }
1886
1973
  });
1887
- return /* @__PURE__ */ P("div", { children: /* @__PURE__ */ F("div", {
1974
+ return /* @__PURE__ */ L("div", { children: /* @__PURE__ */ R("div", {
1888
1975
  className: "tg:grid tg:gap-6",
1889
1976
  children: [
1890
- /* @__PURE__ */ P(o, {
1977
+ /* @__PURE__ */ L(o, {
1891
1978
  name: "url",
1892
- children: (e) => /* @__PURE__ */ F(A, { children: [
1893
- /* @__PURE__ */ P(d, {
1979
+ children: (e) => /* @__PURE__ */ R(j, { children: [
1980
+ /* @__PURE__ */ L(d, {
1894
1981
  htmlFor: e.name,
1895
1982
  children: r("editor.httpConfigForm.apiUrl")
1896
1983
  }),
1897
- /* @__PURE__ */ F("div", {
1984
+ /* @__PURE__ */ R("div", {
1898
1985
  className: "tg:flex tg:gap-2",
1899
- children: [/* @__PURE__ */ P(O, {
1986
+ children: [/* @__PURE__ */ L(k, {
1900
1987
  id: e.name,
1901
1988
  name: e.name,
1902
1989
  value: e.state.value,
@@ -1904,30 +1991,30 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
1904
1991
  onChange: ({ target: t }) => e.handleChange(t.value),
1905
1992
  placeholder: r("editor.httpConfigForm.apiUrlPlaceholder"),
1906
1993
  className: "tg:flex-1"
1907
- }), /* @__PURE__ */ F(G, { children: [/* @__PURE__ */ P(K, {
1994
+ }), /* @__PURE__ */ R(K, { children: [/* @__PURE__ */ L(tn, {
1908
1995
  asChild: !0,
1909
- children: /* @__PURE__ */ P(k, {
1996
+ children: /* @__PURE__ */ L(A, {
1910
1997
  type: "button",
1911
1998
  variant: "outline",
1912
1999
  size: "icon",
1913
- children: /* @__PURE__ */ P(bt, { className: "tg:h-4 tg:w-4" })
2000
+ children: /* @__PURE__ */ L(Ot, { className: "tg:h-4 tg:w-4" })
1914
2001
  })
1915
- }), /* @__PURE__ */ P(q, {
2002
+ }), /* @__PURE__ */ L(nn, {
1916
2003
  align: "end",
1917
- children: i.length === 0 ? /* @__PURE__ */ P(Y, {
2004
+ children: i.length === 0 ? /* @__PURE__ */ L(J, {
1918
2005
  disabled: !0,
1919
2006
  children: r("editor.httpConfigForm.noFieldsAvailable")
1920
- }) : i.map((t) => /* @__PURE__ */ P(Y, {
2007
+ }) : i.map((t) => /* @__PURE__ */ L(J, {
1921
2008
  onClick: () => {
1922
2009
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
1923
2010
  e.handleChange(r + n);
1924
2011
  },
1925
- children: /* @__PURE__ */ F("div", {
2012
+ children: /* @__PURE__ */ R("div", {
1926
2013
  className: "tg:flex tg:flex-col",
1927
- children: [/* @__PURE__ */ P("span", {
2014
+ children: [/* @__PURE__ */ L("span", {
1928
2015
  className: "tg:font-medium",
1929
2016
  children: t.label
1930
- }), /* @__PURE__ */ P("span", {
2017
+ }), /* @__PURE__ */ L("span", {
1931
2018
  className: "tg:text-muted-foreground tg:text-xs",
1932
2019
  children: `{{${t.nodeId}}}`
1933
2020
  })]
@@ -1935,87 +2022,87 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
1935
2022
  }, t.nodeId))
1936
2023
  })] })]
1937
2024
  }),
1938
- /* @__PURE__ */ P(j, { children: r("editor.httpConfigForm.apiUrlDesc") })
2025
+ /* @__PURE__ */ L(M, { children: r("editor.httpConfigForm.apiUrlDesc") })
1939
2026
  ] })
1940
2027
  }),
1941
- /* @__PURE__ */ P(o, {
2028
+ /* @__PURE__ */ L(o, {
1942
2029
  name: "method",
1943
- children: (e) => /* @__PURE__ */ F(A, { children: [/* @__PURE__ */ P(d, {
2030
+ children: (e) => /* @__PURE__ */ R(j, { children: [/* @__PURE__ */ L(d, {
1944
2031
  htmlFor: e.name,
1945
2032
  children: r("editor.httpConfigForm.httpMethod")
1946
- }), /* @__PURE__ */ F(g, {
2033
+ }), /* @__PURE__ */ R(g, {
1947
2034
  value: e.state.value,
1948
2035
  onValueChange: (t) => e.handleChange(t),
1949
- children: [/* @__PURE__ */ P(v, {
2036
+ children: [/* @__PURE__ */ L(v, {
1950
2037
  id: e.name,
1951
- children: /* @__PURE__ */ P(T, { placeholder: r("editor.httpConfigForm.selectMethod") })
1952
- }), /* @__PURE__ */ F(C, { children: [
1953
- /* @__PURE__ */ P(h, {
2038
+ children: /* @__PURE__ */ L(T, { placeholder: r("editor.httpConfigForm.selectMethod") })
2039
+ }), /* @__PURE__ */ R(C, { children: [
2040
+ /* @__PURE__ */ L(h, {
1954
2041
  value: "GET",
1955
2042
  children: r("editor.httpConfigForm.methodGet")
1956
2043
  }),
1957
- /* @__PURE__ */ P(h, {
2044
+ /* @__PURE__ */ L(h, {
1958
2045
  value: "POST",
1959
2046
  children: r("editor.httpConfigForm.methodPost")
1960
2047
  }),
1961
- /* @__PURE__ */ P(h, {
2048
+ /* @__PURE__ */ L(h, {
1962
2049
  value: "PUT",
1963
2050
  children: r("editor.httpConfigForm.methodPut")
1964
2051
  }),
1965
- /* @__PURE__ */ P(h, {
2052
+ /* @__PURE__ */ L(h, {
1966
2053
  value: "DELETE",
1967
2054
  children: r("editor.httpConfigForm.methodDelete")
1968
2055
  }),
1969
- /* @__PURE__ */ P(h, {
2056
+ /* @__PURE__ */ L(h, {
1970
2057
  value: "PATCH",
1971
2058
  children: r("editor.httpConfigForm.methodPatch")
1972
2059
  })
1973
2060
  ] })]
1974
2061
  })] })
1975
2062
  }),
1976
- /* @__PURE__ */ F("div", {
2063
+ /* @__PURE__ */ R("div", {
1977
2064
  className: "tg:space-y-4",
1978
- children: [/* @__PURE__ */ P("h4", {
2065
+ children: [/* @__PURE__ */ L("h4", {
1979
2066
  className: "tg:font-semibold tg:text-sm",
1980
2067
  children: r("editor.httpConfigForm.headers")
1981
- }), /* @__PURE__ */ P(o, {
2068
+ }), /* @__PURE__ */ L(o, {
1982
2069
  name: "headers",
1983
2070
  mode: "array",
1984
- children: (e) => /* @__PURE__ */ F("div", {
2071
+ children: (e) => /* @__PURE__ */ R("div", {
1985
2072
  className: "tg:space-y-2",
1986
2073
  children: [e.state.value?.map((t, n) => {
1987
2074
  let i = `headers[${n}]`;
1988
- return /* @__PURE__ */ F("div", {
2075
+ return /* @__PURE__ */ R("div", {
1989
2076
  className: "tg:flex tg:items-start tg:gap-2",
1990
2077
  children: [
1991
- /* @__PURE__ */ P(o, {
2078
+ /* @__PURE__ */ L(o, {
1992
2079
  name: `headers[${n}].key`,
1993
- children: (e) => /* @__PURE__ */ P(O, {
2080
+ children: (e) => /* @__PURE__ */ L(k, {
1994
2081
  placeholder: r("editor.httpConfigForm.headerName"),
1995
2082
  value: e.state.value || "",
1996
2083
  onChange: ({ target: t }) => e.handleChange(t.value)
1997
2084
  })
1998
2085
  }),
1999
- /* @__PURE__ */ P(o, {
2086
+ /* @__PURE__ */ L(o, {
2000
2087
  name: `headers[${n}].value`,
2001
- children: (e) => /* @__PURE__ */ P(O, {
2088
+ children: (e) => /* @__PURE__ */ L(k, {
2002
2089
  placeholder: r("editor.httpConfigForm.headerValue"),
2003
2090
  value: e.state.value || "",
2004
2091
  onChange: ({ target: t }) => e.handleChange(t.value)
2005
2092
  })
2006
2093
  }),
2007
- /* @__PURE__ */ P(k, {
2094
+ /* @__PURE__ */ L(A, {
2008
2095
  type: "button",
2009
2096
  variant: "ghost",
2010
2097
  size: "icon",
2011
2098
  onClick: () => {
2012
2099
  e.removeValue(n);
2013
2100
  },
2014
- children: /* @__PURE__ */ P(L, { className: "tg:h-4 tg:w-4" })
2101
+ children: /* @__PURE__ */ L(B, { className: "tg:h-4 tg:w-4" })
2015
2102
  })
2016
2103
  ]
2017
2104
  }, i);
2018
- }), /* @__PURE__ */ F(k, {
2105
+ }), /* @__PURE__ */ R(A, {
2019
2106
  type: "button",
2020
2107
  variant: "outline",
2021
2108
  size: "sm",
@@ -2025,64 +2112,64 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2025
2112
  value: ""
2026
2113
  });
2027
2114
  },
2028
- children: [/* @__PURE__ */ P(I, { className: "tg:mr-2 tg:h-4 tg:w-4" }), r("editor.httpConfigForm.addHeader")]
2115
+ children: [/* @__PURE__ */ L(z, { className: "tg:mr-2 tg:h-4 tg:w-4" }), r("editor.httpConfigForm.addHeader")]
2029
2116
  })]
2030
2117
  })
2031
2118
  })]
2032
2119
  }),
2033
- /* @__PURE__ */ P(s, {
2120
+ /* @__PURE__ */ L(s, {
2034
2121
  selector: (e) => ({
2035
2122
  method: e.values.method,
2036
2123
  sendAllFormValues: e.values.sendAllFormValues
2037
2124
  }),
2038
- children: ({ method: e, sendAllFormValues: t }) => Un.includes(e || "") && /* @__PURE__ */ F("div", {
2125
+ children: ({ method: e, sendAllFormValues: t }) => tr.includes(e || "") && /* @__PURE__ */ R("div", {
2039
2126
  className: "tg:space-y-4",
2040
- children: [/* @__PURE__ */ P(o, {
2127
+ children: [/* @__PURE__ */ L(o, {
2041
2128
  name: "sendAllFormValues",
2042
- children: (e) => /* @__PURE__ */ F("div", {
2129
+ children: (e) => /* @__PURE__ */ R("div", {
2043
2130
  className: "tg:flex tg:items-center tg:space-x-2",
2044
- children: [/* @__PURE__ */ P(D, {
2131
+ children: [/* @__PURE__ */ L(O, {
2045
2132
  id: e.name,
2046
2133
  checked: e.state.value,
2047
2134
  onCheckedChange: (t) => e.handleChange(t)
2048
- }), /* @__PURE__ */ P(d, {
2135
+ }), /* @__PURE__ */ L(d, {
2049
2136
  htmlFor: e.name,
2050
2137
  children: r("editor.httpConfigForm.sendAllFormValues")
2051
2138
  })]
2052
2139
  })
2053
- }), /* @__PURE__ */ P(o, {
2140
+ }), /* @__PURE__ */ L(o, {
2054
2141
  name: "body",
2055
- children: (e) => /* @__PURE__ */ F(A, { children: [
2056
- /* @__PURE__ */ F("div", {
2142
+ children: (e) => /* @__PURE__ */ R(j, { children: [
2143
+ /* @__PURE__ */ R("div", {
2057
2144
  className: "tg:mb-2 tg:flex tg:items-center tg:justify-between",
2058
- children: [/* @__PURE__ */ P(d, {
2145
+ children: [/* @__PURE__ */ L(d, {
2059
2146
  htmlFor: e.name,
2060
2147
  children: r("editor.httpConfigForm.requestBody")
2061
- }), /* @__PURE__ */ F(G, { children: [/* @__PURE__ */ P(K, {
2148
+ }), /* @__PURE__ */ R(K, { children: [/* @__PURE__ */ L(tn, {
2062
2149
  asChild: !0,
2063
- children: /* @__PURE__ */ F(k, {
2150
+ children: /* @__PURE__ */ R(A, {
2064
2151
  type: "button",
2065
2152
  variant: "ghost",
2066
2153
  size: "sm",
2067
2154
  disabled: t,
2068
- children: [/* @__PURE__ */ P(bt, { className: "tg:mr-2 tg:h-4 tg:w-4" }), r("editor.httpConfigForm.insertVariable")]
2155
+ children: [/* @__PURE__ */ L(Ot, { className: "tg:mr-2 tg:h-4 tg:w-4" }), r("editor.httpConfigForm.insertVariable")]
2069
2156
  })
2070
- }), /* @__PURE__ */ P(q, {
2157
+ }), /* @__PURE__ */ L(nn, {
2071
2158
  align: "end",
2072
- children: i.length === 0 ? /* @__PURE__ */ P(Y, {
2159
+ children: i.length === 0 ? /* @__PURE__ */ L(J, {
2073
2160
  disabled: !0,
2074
2161
  children: r("editor.httpConfigForm.noFieldsAvailable")
2075
- }) : i.map((t) => /* @__PURE__ */ P(Y, {
2162
+ }) : i.map((t) => /* @__PURE__ */ L(J, {
2076
2163
  onClick: () => {
2077
2164
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
2078
2165
  e.handleChange(r + n), a().then();
2079
2166
  },
2080
- children: /* @__PURE__ */ F("div", {
2167
+ children: /* @__PURE__ */ R("div", {
2081
2168
  className: "tg:flex tg:flex-col",
2082
- children: [/* @__PURE__ */ P("span", {
2169
+ children: [/* @__PURE__ */ L("span", {
2083
2170
  className: "tg:font-medium",
2084
2171
  children: t.label
2085
- }), /* @__PURE__ */ P("span", {
2172
+ }), /* @__PURE__ */ L("span", {
2086
2173
  className: "tg:text-muted-foreground tg:text-xs",
2087
2174
  children: `{{${t.nodeId}}}`
2088
2175
  })]
@@ -2090,7 +2177,7 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2090
2177
  }, t.nodeId))
2091
2178
  })] })]
2092
2179
  }),
2093
- /* @__PURE__ */ P(le, {
2180
+ /* @__PURE__ */ L(ce, {
2094
2181
  id: e.name,
2095
2182
  name: e.name,
2096
2183
  value: e.state.value,
@@ -2100,26 +2187,26 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2100
2187
  rows: 4,
2101
2188
  disabled: t
2102
2189
  }),
2103
- /* @__PURE__ */ P(j, { children: r(t ? "editor.httpConfigForm.sendAllFormValuesDesc" : "editor.httpConfigForm.requestBodyDesc") })
2190
+ /* @__PURE__ */ L(M, { children: r(t ? "editor.httpConfigForm.sendAllFormValuesDesc" : "editor.httpConfigForm.requestBodyDesc") })
2104
2191
  ] })
2105
2192
  })]
2106
2193
  })
2107
2194
  }),
2108
- /* @__PURE__ */ F("div", {
2195
+ /* @__PURE__ */ R("div", {
2109
2196
  className: "tg:space-y-4",
2110
2197
  children: [
2111
- /* @__PURE__ */ P("h4", {
2198
+ /* @__PURE__ */ L("h4", {
2112
2199
  className: "tg:font-semibold tg:text-sm",
2113
2200
  children: r("editor.httpConfigForm.responseConfiguration")
2114
2201
  }),
2115
- /* @__PURE__ */ P(o, {
2202
+ /* @__PURE__ */ L(o, {
2116
2203
  name: "responsePath",
2117
- children: (e) => /* @__PURE__ */ F(A, { children: [
2118
- /* @__PURE__ */ P(d, {
2204
+ children: (e) => /* @__PURE__ */ R(j, { children: [
2205
+ /* @__PURE__ */ L(d, {
2119
2206
  htmlFor: e.name,
2120
2207
  children: r("editor.httpConfigForm.responsePath")
2121
2208
  }),
2122
- /* @__PURE__ */ P(O, {
2209
+ /* @__PURE__ */ L(k, {
2123
2210
  id: e.name,
2124
2211
  name: e.name,
2125
2212
  value: e.state.value,
@@ -2127,24 +2214,24 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2127
2214
  onChange: ({ target: t }) => e.handleChange(t.value),
2128
2215
  placeholder: r("editor.httpConfigForm.responsePathPlaceholder")
2129
2216
  }),
2130
- /* @__PURE__ */ P(j, { children: r("editor.httpConfigForm.responsePathDesc") })
2217
+ /* @__PURE__ */ L(M, { children: r("editor.httpConfigForm.responsePathDesc") })
2131
2218
  ] })
2132
2219
  }),
2133
- /* @__PURE__ */ F("div", {
2220
+ /* @__PURE__ */ R("div", {
2134
2221
  className: "tg:space-y-4",
2135
2222
  children: [
2136
- /* @__PURE__ */ P("h5", {
2223
+ /* @__PURE__ */ L("h5", {
2137
2224
  className: "tg:font-medium tg:text-sm",
2138
2225
  children: r("editor.httpConfigForm.mapToOptions")
2139
2226
  }),
2140
- /* @__PURE__ */ P(o, {
2227
+ /* @__PURE__ */ L(o, {
2141
2228
  name: "responseMapping.valueField",
2142
- children: (e) => /* @__PURE__ */ F(A, { children: [
2143
- /* @__PURE__ */ P(d, {
2229
+ children: (e) => /* @__PURE__ */ R(j, { children: [
2230
+ /* @__PURE__ */ L(d, {
2144
2231
  htmlFor: e.name,
2145
2232
  children: r("editor.httpConfigForm.valueField")
2146
2233
  }),
2147
- /* @__PURE__ */ P(O, {
2234
+ /* @__PURE__ */ L(k, {
2148
2235
  id: e.name,
2149
2236
  name: e.name,
2150
2237
  value: e.state.value,
@@ -2152,17 +2239,17 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2152
2239
  onChange: ({ target: t }) => e.handleChange(t.value),
2153
2240
  placeholder: r("editor.httpConfigForm.valueFieldPlaceholder")
2154
2241
  }),
2155
- /* @__PURE__ */ P(j, { children: r("editor.httpConfigForm.valueFieldDesc") })
2242
+ /* @__PURE__ */ L(M, { children: r("editor.httpConfigForm.valueFieldDesc") })
2156
2243
  ] })
2157
2244
  }),
2158
- /* @__PURE__ */ P(o, {
2245
+ /* @__PURE__ */ L(o, {
2159
2246
  name: "responseMapping.labelField",
2160
- children: (e) => /* @__PURE__ */ F(A, { children: [
2161
- /* @__PURE__ */ P(d, {
2247
+ children: (e) => /* @__PURE__ */ R(j, { children: [
2248
+ /* @__PURE__ */ L(d, {
2162
2249
  htmlFor: e.name,
2163
2250
  children: r("editor.httpConfigForm.labelField")
2164
2251
  }),
2165
- /* @__PURE__ */ P(O, {
2252
+ /* @__PURE__ */ L(k, {
2166
2253
  id: e.name,
2167
2254
  name: e.name,
2168
2255
  value: e.state.value,
@@ -2170,19 +2257,19 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2170
2257
  onChange: ({ target: t }) => e.handleChange(t.value),
2171
2258
  placeholder: r("editor.httpConfigForm.labelFieldPlaceholder")
2172
2259
  }),
2173
- /* @__PURE__ */ P(j, { children: r("editor.httpConfigForm.labelFieldDesc") })
2260
+ /* @__PURE__ */ L(M, { children: r("editor.httpConfigForm.labelFieldDesc") })
2174
2261
  ] })
2175
2262
  })
2176
2263
  ]
2177
2264
  }),
2178
- /* @__PURE__ */ P(o, {
2265
+ /* @__PURE__ */ L(o, {
2179
2266
  name: "searchParam",
2180
- children: (e) => /* @__PURE__ */ F(A, { children: [
2181
- /* @__PURE__ */ P(d, {
2267
+ children: (e) => /* @__PURE__ */ R(j, { children: [
2268
+ /* @__PURE__ */ L(d, {
2182
2269
  htmlFor: e.name,
2183
2270
  children: r("editor.httpConfigForm.searchParameter")
2184
2271
  }),
2185
- /* @__PURE__ */ P(O, {
2272
+ /* @__PURE__ */ L(k, {
2186
2273
  id: e.name,
2187
2274
  name: e.name,
2188
2275
  value: e.state.value,
@@ -2190,32 +2277,32 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2190
2277
  onChange: ({ target: t }) => e.handleChange(t.value),
2191
2278
  placeholder: r("editor.httpConfigForm.searchParameterPlaceholder")
2192
2279
  }),
2193
- /* @__PURE__ */ P(j, { children: r("editor.httpConfigForm.searchParameterDesc") })
2280
+ /* @__PURE__ */ L(M, { children: r("editor.httpConfigForm.searchParameterDesc") })
2194
2281
  ] })
2195
2282
  })
2196
2283
  ]
2197
2284
  }),
2198
- /* @__PURE__ */ F("div", {
2285
+ /* @__PURE__ */ R("div", {
2199
2286
  className: "tg:space-y-4",
2200
2287
  children: [
2201
- /* @__PURE__ */ P("h4", {
2288
+ /* @__PURE__ */ L("h4", {
2202
2289
  className: "tg:font-semibold tg:text-sm",
2203
2290
  children: r("editor.httpConfigForm.behavior")
2204
2291
  }),
2205
- /* @__PURE__ */ P(s, {
2292
+ /* @__PURE__ */ L(s, {
2206
2293
  selector: (e) => e.values.searchParam,
2207
- children: (e) => /* @__PURE__ */ P(o, {
2294
+ children: (e) => /* @__PURE__ */ L(o, {
2208
2295
  name: "fetchOnMount",
2209
2296
  children: (t) => {
2210
2297
  let n = !!e?.trim(), i = n ? t.state.value : !0;
2211
- return !n && t.state.value !== !0 && t.handleChange(!0), /* @__PURE__ */ F("div", {
2298
+ return !n && t.state.value !== !0 && t.handleChange(!0), /* @__PURE__ */ R("div", {
2212
2299
  className: "tg:flex tg:items-center tg:space-x-2",
2213
- children: [/* @__PURE__ */ P(D, {
2300
+ children: [/* @__PURE__ */ L(O, {
2214
2301
  id: t.name,
2215
2302
  checked: i,
2216
2303
  disabled: !n,
2217
2304
  onCheckedChange: (e) => t.handleChange(e)
2218
- }), /* @__PURE__ */ P(d, {
2305
+ }), /* @__PURE__ */ L(d, {
2219
2306
  htmlFor: t.name,
2220
2307
  className: n ? "" : "tg:text-muted-foreground",
2221
2308
  children: r("editor.httpConfigForm.fetchOnMount")
@@ -2224,15 +2311,15 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2224
2311
  }
2225
2312
  })
2226
2313
  }),
2227
- /* @__PURE__ */ P(o, {
2314
+ /* @__PURE__ */ L(o, {
2228
2315
  name: "showLoading",
2229
- children: (e) => /* @__PURE__ */ F("div", {
2316
+ children: (e) => /* @__PURE__ */ R("div", {
2230
2317
  className: "tg:flex tg:items-center tg:space-x-2",
2231
- children: [/* @__PURE__ */ P(D, {
2318
+ children: [/* @__PURE__ */ L(O, {
2232
2319
  id: e.name,
2233
2320
  checked: e.state.value,
2234
2321
  onCheckedChange: (t) => e.handleChange(t)
2235
- }), /* @__PURE__ */ P(d, {
2322
+ }), /* @__PURE__ */ L(d, {
2236
2323
  htmlFor: e.name,
2237
2324
  children: r("editor.httpConfigForm.showLoadingState")
2238
2325
  })]
@@ -2242,12 +2329,12 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2242
2329
  })
2243
2330
  ]
2244
2331
  }) });
2245
- }, Gn = [
2332
+ }, rr = [
2246
2333
  "POST",
2247
2334
  "PUT",
2248
2335
  "PATCH"
2249
- ], Kn = ({ value: e, onChange: t }) => {
2250
- let [n, r] = z("en"), { selectedNode: i } = $(), a = U(), o = Ht(i?.id), { handleSubmit: s, Field: c, Subscribe: l } = Pe({
2336
+ ], ir = ({ value: e, onChange: t }) => {
2337
+ let [n, r] = F("en"), { selectedNode: i } = $(), a = W(), o = Ut(i?.id), { handleSubmit: s, Field: c, Subscribe: l } = Ve({
2251
2338
  defaultValues: {
2252
2339
  body: e?.body || "",
2253
2340
  errorMessage: e?.errorMessage || { en: "" },
@@ -2269,19 +2356,19 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2269
2356
  t(e);
2270
2357
  }
2271
2358
  });
2272
- return /* @__PURE__ */ P("div", { children: /* @__PURE__ */ F("div", {
2359
+ return /* @__PURE__ */ L("div", { children: /* @__PURE__ */ R("div", {
2273
2360
  className: "tg:grid tg:gap-6",
2274
2361
  children: [
2275
- /* @__PURE__ */ P(c, {
2362
+ /* @__PURE__ */ L(c, {
2276
2363
  name: "url",
2277
- children: (e) => /* @__PURE__ */ F(A, { children: [
2278
- /* @__PURE__ */ P(d, {
2364
+ children: (e) => /* @__PURE__ */ R(j, { children: [
2365
+ /* @__PURE__ */ L(d, {
2279
2366
  htmlFor: e.name,
2280
2367
  children: a("editor.submitConfigForm.apiUrl")
2281
2368
  }),
2282
- /* @__PURE__ */ F("div", {
2369
+ /* @__PURE__ */ R("div", {
2283
2370
  className: "tg:flex tg:gap-2",
2284
- children: [/* @__PURE__ */ P(O, {
2371
+ children: [/* @__PURE__ */ L(k, {
2285
2372
  id: e.name,
2286
2373
  name: e.name,
2287
2374
  value: e.state.value,
@@ -2289,30 +2376,30 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2289
2376
  onChange: ({ target: t }) => e.handleChange(t.value),
2290
2377
  placeholder: a("editor.submitConfigForm.apiUrlPlaceholder"),
2291
2378
  className: "tg:flex-1"
2292
- }), /* @__PURE__ */ F(G, { children: [/* @__PURE__ */ P(K, {
2379
+ }), /* @__PURE__ */ R(K, { children: [/* @__PURE__ */ L(tn, {
2293
2380
  asChild: !0,
2294
- children: /* @__PURE__ */ P(k, {
2381
+ children: /* @__PURE__ */ L(A, {
2295
2382
  type: "button",
2296
2383
  variant: "outline",
2297
2384
  size: "icon",
2298
- children: /* @__PURE__ */ P(bt, { className: "tg:h-4 tg:w-4" })
2385
+ children: /* @__PURE__ */ L(Ot, { className: "tg:h-4 tg:w-4" })
2299
2386
  })
2300
- }), /* @__PURE__ */ P(q, {
2387
+ }), /* @__PURE__ */ L(nn, {
2301
2388
  align: "end",
2302
- children: o.length === 0 ? /* @__PURE__ */ P(Y, {
2389
+ children: o.length === 0 ? /* @__PURE__ */ L(J, {
2303
2390
  disabled: !0,
2304
2391
  children: a("editor.submitConfigForm.noFieldsAvailable")
2305
- }) : o.map((t) => /* @__PURE__ */ P(Y, {
2392
+ }) : o.map((t) => /* @__PURE__ */ L(J, {
2306
2393
  onClick: () => {
2307
2394
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
2308
2395
  e.handleChange(r + n);
2309
2396
  },
2310
- children: /* @__PURE__ */ F("div", {
2397
+ children: /* @__PURE__ */ R("div", {
2311
2398
  className: "tg:flex tg:flex-col",
2312
- children: [/* @__PURE__ */ P("span", {
2399
+ children: [/* @__PURE__ */ L("span", {
2313
2400
  className: "tg:font-medium",
2314
2401
  children: t.label
2315
- }), /* @__PURE__ */ P("span", {
2402
+ }), /* @__PURE__ */ L("span", {
2316
2403
  className: "tg:text-muted-foreground tg:text-xs",
2317
2404
  children: `{{${t.nodeId}}}`
2318
2405
  })]
@@ -2320,83 +2407,83 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2320
2407
  }, t.nodeId))
2321
2408
  })] })]
2322
2409
  }),
2323
- /* @__PURE__ */ P(j, { children: a("editor.submitConfigForm.apiUrlDesc") })
2410
+ /* @__PURE__ */ L(M, { children: a("editor.submitConfigForm.apiUrlDesc") })
2324
2411
  ] })
2325
2412
  }),
2326
- /* @__PURE__ */ P(c, {
2413
+ /* @__PURE__ */ L(c, {
2327
2414
  name: "method",
2328
- children: (e) => /* @__PURE__ */ F(A, { children: [/* @__PURE__ */ P(d, {
2415
+ children: (e) => /* @__PURE__ */ R(j, { children: [/* @__PURE__ */ L(d, {
2329
2416
  htmlFor: e.name,
2330
2417
  children: a("editor.submitConfigForm.httpMethod")
2331
- }), /* @__PURE__ */ F(g, {
2418
+ }), /* @__PURE__ */ R(g, {
2332
2419
  value: e.state.value,
2333
2420
  onValueChange: (t) => e.handleChange(t),
2334
- children: [/* @__PURE__ */ P(v, {
2421
+ children: [/* @__PURE__ */ L(v, {
2335
2422
  id: e.name,
2336
- children: /* @__PURE__ */ P(T, { placeholder: a("editor.submitConfigForm.selectMethod") })
2337
- }), /* @__PURE__ */ F(C, { children: [
2338
- /* @__PURE__ */ P(h, {
2423
+ children: /* @__PURE__ */ L(T, { placeholder: a("editor.submitConfigForm.selectMethod") })
2424
+ }), /* @__PURE__ */ R(C, { children: [
2425
+ /* @__PURE__ */ L(h, {
2339
2426
  value: "POST",
2340
2427
  children: a("editor.submitConfigForm.methodPost")
2341
2428
  }),
2342
- /* @__PURE__ */ P(h, {
2429
+ /* @__PURE__ */ L(h, {
2343
2430
  value: "PUT",
2344
2431
  children: a("editor.submitConfigForm.methodPut")
2345
2432
  }),
2346
- /* @__PURE__ */ P(h, {
2433
+ /* @__PURE__ */ L(h, {
2347
2434
  value: "DELETE",
2348
2435
  children: a("editor.submitConfigForm.methodDelete")
2349
2436
  }),
2350
- /* @__PURE__ */ P(h, {
2437
+ /* @__PURE__ */ L(h, {
2351
2438
  value: "PATCH",
2352
2439
  children: a("editor.submitConfigForm.methodPatch")
2353
2440
  })
2354
2441
  ] })]
2355
2442
  })] })
2356
2443
  }),
2357
- /* @__PURE__ */ F("div", {
2444
+ /* @__PURE__ */ R("div", {
2358
2445
  className: "tg:space-y-4",
2359
- children: [/* @__PURE__ */ P("h4", {
2446
+ children: [/* @__PURE__ */ L("h4", {
2360
2447
  className: "tg:font-semibold tg:text-sm",
2361
2448
  children: a("editor.submitConfigForm.headers")
2362
- }), /* @__PURE__ */ P(c, {
2449
+ }), /* @__PURE__ */ L(c, {
2363
2450
  name: "headers",
2364
2451
  mode: "array",
2365
- children: (e) => /* @__PURE__ */ F("div", {
2452
+ children: (e) => /* @__PURE__ */ R("div", {
2366
2453
  className: "tg:space-y-2",
2367
2454
  children: [e.state.value?.map((t, n) => {
2368
2455
  let r = `headers[${n}]`;
2369
- return /* @__PURE__ */ F("div", {
2456
+ return /* @__PURE__ */ R("div", {
2370
2457
  className: "tg:flex tg:items-start tg:gap-2",
2371
2458
  children: [
2372
- /* @__PURE__ */ P(c, {
2459
+ /* @__PURE__ */ L(c, {
2373
2460
  name: `headers[${n}].key`,
2374
- children: (e) => /* @__PURE__ */ P(O, {
2461
+ children: (e) => /* @__PURE__ */ L(k, {
2375
2462
  placeholder: a("editor.submitConfigForm.headerName"),
2376
2463
  value: e.state.value || "",
2377
2464
  onChange: ({ target: t }) => e.handleChange(t.value)
2378
2465
  })
2379
2466
  }),
2380
- /* @__PURE__ */ P(c, {
2467
+ /* @__PURE__ */ L(c, {
2381
2468
  name: `headers[${n}].value`,
2382
- children: (e) => /* @__PURE__ */ P(O, {
2469
+ children: (e) => /* @__PURE__ */ L(k, {
2383
2470
  placeholder: a("editor.submitConfigForm.headerValue"),
2384
2471
  value: e.state.value || "",
2385
2472
  onChange: ({ target: t }) => e.handleChange(t.value)
2386
2473
  })
2387
2474
  }),
2388
- /* @__PURE__ */ P(k, {
2475
+ /* @__PURE__ */ L(A, {
2389
2476
  type: "button",
2390
2477
  variant: "ghost",
2391
2478
  size: "icon",
2392
2479
  onClick: () => {
2393
2480
  e.removeValue(n);
2394
2481
  },
2395
- children: /* @__PURE__ */ P(L, { className: "tg:h-4 tg:w-4" })
2482
+ children: /* @__PURE__ */ L(B, { className: "tg:h-4 tg:w-4" })
2396
2483
  })
2397
2484
  ]
2398
2485
  }, r);
2399
- }), /* @__PURE__ */ F(k, {
2486
+ }), /* @__PURE__ */ R(A, {
2400
2487
  type: "button",
2401
2488
  variant: "outline",
2402
2489
  size: "sm",
@@ -2406,64 +2493,64 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2406
2493
  value: ""
2407
2494
  });
2408
2495
  },
2409
- children: [/* @__PURE__ */ P(I, { className: "tg:mr-2 tg:h-4 tg:w-4" }), a("editor.submitConfigForm.addHeader")]
2496
+ children: [/* @__PURE__ */ L(z, { className: "tg:mr-2 tg:h-4 tg:w-4" }), a("editor.submitConfigForm.addHeader")]
2410
2497
  })]
2411
2498
  })
2412
2499
  })]
2413
2500
  }),
2414
- /* @__PURE__ */ P(l, {
2501
+ /* @__PURE__ */ L(l, {
2415
2502
  selector: (e) => ({
2416
2503
  method: e.values.method,
2417
2504
  sendAllFormValues: e.values.sendAllFormValues
2418
2505
  }),
2419
- children: ({ method: e, sendAllFormValues: t }) => Gn.includes(e || "") && /* @__PURE__ */ F("div", {
2506
+ children: ({ method: e, sendAllFormValues: t }) => rr.includes(e || "") && /* @__PURE__ */ R("div", {
2420
2507
  className: "tg:space-y-4",
2421
- children: [/* @__PURE__ */ P(c, {
2508
+ children: [/* @__PURE__ */ L(c, {
2422
2509
  name: "sendAllFormValues",
2423
- children: (e) => /* @__PURE__ */ F("div", {
2510
+ children: (e) => /* @__PURE__ */ R("div", {
2424
2511
  className: "tg:flex tg:items-center tg:space-x-2",
2425
- children: [/* @__PURE__ */ P(D, {
2512
+ children: [/* @__PURE__ */ L(O, {
2426
2513
  id: e.name,
2427
2514
  checked: e.state.value,
2428
2515
  onCheckedChange: (t) => e.handleChange(t)
2429
- }), /* @__PURE__ */ P(d, {
2516
+ }), /* @__PURE__ */ L(d, {
2430
2517
  htmlFor: e.name,
2431
2518
  children: a("editor.submitConfigForm.sendAllFormValues")
2432
2519
  })]
2433
2520
  })
2434
- }), /* @__PURE__ */ P(c, {
2521
+ }), /* @__PURE__ */ L(c, {
2435
2522
  name: "body",
2436
- children: (e) => /* @__PURE__ */ F(A, { children: [
2437
- /* @__PURE__ */ F("div", {
2523
+ children: (e) => /* @__PURE__ */ R(j, { children: [
2524
+ /* @__PURE__ */ R("div", {
2438
2525
  className: "tg:mb-2 tg:flex tg:items-center tg:justify-between",
2439
- children: [/* @__PURE__ */ P(d, {
2526
+ children: [/* @__PURE__ */ L(d, {
2440
2527
  htmlFor: e.name,
2441
2528
  children: a("editor.submitConfigForm.requestBody")
2442
- }), /* @__PURE__ */ F(G, { children: [/* @__PURE__ */ P(K, {
2529
+ }), /* @__PURE__ */ R(K, { children: [/* @__PURE__ */ L(tn, {
2443
2530
  asChild: !0,
2444
- children: /* @__PURE__ */ F(k, {
2531
+ children: /* @__PURE__ */ R(A, {
2445
2532
  type: "button",
2446
2533
  variant: "ghost",
2447
2534
  size: "sm",
2448
2535
  disabled: t,
2449
- children: [/* @__PURE__ */ P(bt, { className: "tg:mr-2 tg:h-4 tg:w-4" }), a("editor.submitConfigForm.insertVariable")]
2536
+ children: [/* @__PURE__ */ L(Ot, { className: "tg:mr-2 tg:h-4 tg:w-4" }), a("editor.submitConfigForm.insertVariable")]
2450
2537
  })
2451
- }), /* @__PURE__ */ P(q, {
2538
+ }), /* @__PURE__ */ L(nn, {
2452
2539
  align: "end",
2453
- children: o.length === 0 ? /* @__PURE__ */ P(Y, {
2540
+ children: o.length === 0 ? /* @__PURE__ */ L(J, {
2454
2541
  disabled: !0,
2455
2542
  children: a("editor.submitConfigForm.noFieldsAvailable")
2456
- }) : o.map((t) => /* @__PURE__ */ P(Y, {
2543
+ }) : o.map((t) => /* @__PURE__ */ L(J, {
2457
2544
  onClick: () => {
2458
2545
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
2459
2546
  e.handleChange(r + n), s().then();
2460
2547
  },
2461
- children: /* @__PURE__ */ F("div", {
2548
+ children: /* @__PURE__ */ R("div", {
2462
2549
  className: "tg:flex tg:flex-col",
2463
- children: [/* @__PURE__ */ P("span", {
2550
+ children: [/* @__PURE__ */ L("span", {
2464
2551
  className: "tg:font-medium",
2465
2552
  children: t.label
2466
- }), /* @__PURE__ */ P("span", {
2553
+ }), /* @__PURE__ */ L("span", {
2467
2554
  className: "tg:text-muted-foreground tg:text-xs",
2468
2555
  children: `{{${t.nodeId}}}`
2469
2556
  })]
@@ -2471,7 +2558,7 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2471
2558
  }, t.nodeId))
2472
2559
  })] })]
2473
2560
  }),
2474
- /* @__PURE__ */ P(le, {
2561
+ /* @__PURE__ */ L(ce, {
2475
2562
  id: e.name,
2476
2563
  name: e.name,
2477
2564
  value: e.state.value,
@@ -2481,26 +2568,26 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2481
2568
  rows: 4,
2482
2569
  disabled: t
2483
2570
  }),
2484
- /* @__PURE__ */ P(j, { children: a(t ? "editor.submitConfigForm.sendAllFormValuesDesc" : "editor.submitConfigForm.requestBodyDesc") })
2571
+ /* @__PURE__ */ L(M, { children: a(t ? "editor.submitConfigForm.sendAllFormValuesDesc" : "editor.submitConfigForm.requestBodyDesc") })
2485
2572
  ] })
2486
2573
  })]
2487
2574
  })
2488
2575
  }),
2489
- /* @__PURE__ */ F("div", {
2576
+ /* @__PURE__ */ R("div", {
2490
2577
  className: "tg:space-y-4",
2491
2578
  children: [
2492
- /* @__PURE__ */ P("h4", {
2579
+ /* @__PURE__ */ L("h4", {
2493
2580
  className: "tg:font-semibold tg:text-sm",
2494
2581
  children: a("editor.submitConfigForm.postSubmission")
2495
2582
  }),
2496
- /* @__PURE__ */ P(c, {
2583
+ /* @__PURE__ */ L(c, {
2497
2584
  name: "redirectUrl",
2498
- children: (e) => /* @__PURE__ */ F(A, { children: [
2499
- /* @__PURE__ */ P(d, {
2585
+ children: (e) => /* @__PURE__ */ R(j, { children: [
2586
+ /* @__PURE__ */ L(d, {
2500
2587
  htmlFor: e.name,
2501
2588
  children: a("editor.submitConfigForm.redirectUrl")
2502
2589
  }),
2503
- /* @__PURE__ */ P(O, {
2590
+ /* @__PURE__ */ L(k, {
2504
2591
  id: e.name,
2505
2592
  name: e.name,
2506
2593
  value: e.state.value,
@@ -2508,21 +2595,21 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2508
2595
  onChange: ({ target: t }) => e.handleChange(t.value),
2509
2596
  placeholder: a("editor.submitConfigForm.redirectUrlPlaceholder")
2510
2597
  }),
2511
- /* @__PURE__ */ P(j, { children: a("editor.submitConfigForm.redirectUrlDesc") })
2598
+ /* @__PURE__ */ L(M, { children: a("editor.submitConfigForm.redirectUrlDesc") })
2512
2599
  ] })
2513
2600
  }),
2514
- /* @__PURE__ */ F("div", {
2601
+ /* @__PURE__ */ R("div", {
2515
2602
  className: "tg:flex tg:items-center tg:gap-2",
2516
- children: [/* @__PURE__ */ P(c, {
2603
+ children: [/* @__PURE__ */ L(c, {
2517
2604
  name: "successMessage",
2518
- children: (e) => /* @__PURE__ */ F(A, {
2605
+ children: (e) => /* @__PURE__ */ R(j, {
2519
2606
  className: "tg:flex-1",
2520
2607
  children: [
2521
- /* @__PURE__ */ P(d, {
2608
+ /* @__PURE__ */ L(d, {
2522
2609
  htmlFor: e.name,
2523
2610
  children: a("editor.submitConfigForm.successMessage")
2524
2611
  }),
2525
- /* @__PURE__ */ P(O, {
2612
+ /* @__PURE__ */ L(k, {
2526
2613
  id: e.name,
2527
2614
  name: e.name,
2528
2615
  value: e.state.value?.[n] || "",
@@ -2535,26 +2622,26 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2535
2622
  },
2536
2623
  placeholder: a("editor.submitConfigForm.successMessagePlaceholder")
2537
2624
  }),
2538
- /* @__PURE__ */ P(j, { children: a("editor.submitConfigForm.successMessageDesc") })
2625
+ /* @__PURE__ */ L(M, { children: a("editor.submitConfigForm.successMessageDesc") })
2539
2626
  ]
2540
2627
  })
2541
- }), /* @__PURE__ */ P(Q, {
2628
+ }), /* @__PURE__ */ L(Q, {
2542
2629
  value: n,
2543
2630
  onValueChange: r
2544
2631
  })]
2545
2632
  }),
2546
- /* @__PURE__ */ F("div", {
2633
+ /* @__PURE__ */ R("div", {
2547
2634
  className: "tg:flex tg:items-center tg:gap-2",
2548
- children: [/* @__PURE__ */ P(c, {
2635
+ children: [/* @__PURE__ */ L(c, {
2549
2636
  name: "errorMessage",
2550
- children: (e) => /* @__PURE__ */ F(A, {
2637
+ children: (e) => /* @__PURE__ */ R(j, {
2551
2638
  className: "tg:flex-1",
2552
2639
  children: [
2553
- /* @__PURE__ */ P(d, {
2640
+ /* @__PURE__ */ L(d, {
2554
2641
  htmlFor: e.name,
2555
2642
  children: a("editor.submitConfigForm.errorMessage")
2556
2643
  }),
2557
- /* @__PURE__ */ P(O, {
2644
+ /* @__PURE__ */ L(k, {
2558
2645
  id: e.name,
2559
2646
  name: e.name,
2560
2647
  value: e.state.value?.[n] || "",
@@ -2567,30 +2654,30 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2567
2654
  },
2568
2655
  placeholder: a("editor.submitConfigForm.errorMessagePlaceholder")
2569
2656
  }),
2570
- /* @__PURE__ */ P(j, { children: a("editor.submitConfigForm.errorMessageDesc") })
2657
+ /* @__PURE__ */ L(M, { children: a("editor.submitConfigForm.errorMessageDesc") })
2571
2658
  ]
2572
2659
  })
2573
- }), /* @__PURE__ */ P(Q, {
2660
+ }), /* @__PURE__ */ L(Q, {
2574
2661
  value: n,
2575
2662
  onValueChange: r
2576
2663
  })]
2577
2664
  })
2578
2665
  ]
2579
2666
  }),
2580
- /* @__PURE__ */ F("div", {
2667
+ /* @__PURE__ */ R("div", {
2581
2668
  className: "tg:space-y-4",
2582
- children: [/* @__PURE__ */ P("h4", {
2669
+ children: [/* @__PURE__ */ L("h4", {
2583
2670
  className: "tg:font-semibold tg:text-sm",
2584
2671
  children: a("editor.submitConfigForm.behavior")
2585
- }), /* @__PURE__ */ P(c, {
2672
+ }), /* @__PURE__ */ L(c, {
2586
2673
  name: "showLoading",
2587
- children: (e) => /* @__PURE__ */ F("div", {
2674
+ children: (e) => /* @__PURE__ */ R("div", {
2588
2675
  className: "tg:flex tg:items-center tg:space-x-2",
2589
- children: [/* @__PURE__ */ P(D, {
2676
+ children: [/* @__PURE__ */ L(O, {
2590
2677
  id: e.name,
2591
2678
  checked: e.state.value,
2592
2679
  onCheckedChange: (t) => e.handleChange(t)
2593
- }), /* @__PURE__ */ P(d, {
2680
+ }), /* @__PURE__ */ L(d, {
2594
2681
  htmlFor: e.name,
2595
2682
  children: a("editor.submitConfigForm.showLoadingState")
2596
2683
  })]
@@ -2599,69 +2686,69 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2599
2686
  })
2600
2687
  ]
2601
2688
  }) });
2602
- }, qn = ({ options: e, id: t, value: n, onValueChange: r, placeholder: i = "Select...", searchPlaceholder: a = "Search or create...", createLabel: o = (e) => `Use: ${e}`, clearLabel: s = "Clear selection", emptyLabel: c = "No results found", className: l, allowClear: u = !0, allowCreate: d = !0 }) => {
2603
- let [p, m] = z(!1), [h, g] = z(""), _ = (e) => e ?? "", v = (e) => e.trim().toLowerCase(), y = _(n), b = n !== null && n !== "", S = b ? e.find((e) => _(e.value) === y) : void 0, C = v(h), re = d && C !== "" && !e.some((e) => v(e.label) === C || v(e.value ?? "") === C), w = (e) => {
2689
+ }, ar = ({ options: e, id: t, value: n, onValueChange: r, placeholder: i = "Select...", searchPlaceholder: a = "Search or create...", createLabel: o = (e) => `Use: ${e}`, clearLabel: s = "Clear selection", emptyLabel: c = "No results found", className: l, allowClear: u = !0, allowCreate: d = !0 }) => {
2690
+ let [p, m] = F(!1), [h, g] = F(""), _ = (e) => e ?? "", v = (e) => e.trim().toLowerCase(), y = _(n), ee = n !== null && n !== "", S = ee ? e.find((e) => _(e.value) === y) : void 0, C = v(h), re = d && C !== "" && !e.some((e) => v(e.label) === C || v(e.value ?? "") === C), w = (e) => {
2604
2691
  e === y ? u && r?.("") : r?.(e), m(!1), g("");
2605
2692
  };
2606
- return /* @__PURE__ */ F(ie, {
2693
+ return /* @__PURE__ */ R(ie, {
2607
2694
  open: p,
2608
2695
  onOpenChange: m,
2609
- children: [/* @__PURE__ */ P(ne, {
2696
+ children: [/* @__PURE__ */ L(ne, {
2610
2697
  asChild: !0,
2611
2698
  id: t,
2612
- children: /* @__PURE__ */ F(k, {
2699
+ children: /* @__PURE__ */ R(A, {
2613
2700
  type: "button",
2614
2701
  variant: "outline",
2615
2702
  role: "combobox",
2616
2703
  "aria-expanded": p,
2617
- className: E("tg:w-full tg:justify-between tg:font-normal", l),
2618
- children: [/* @__PURE__ */ P("span", {
2704
+ className: D("tg:w-full tg:justify-between tg:font-normal", l),
2705
+ children: [/* @__PURE__ */ L("span", {
2619
2706
  className: "tg:truncate",
2620
- children: b && S ? S.label : i
2621
- }), /* @__PURE__ */ P(We, { className: "tg:ml-2 tg:h-4 tg:w-4 tg:shrink-0 tg:opacity-50" })]
2707
+ children: ee && S ? S.label : i
2708
+ }), /* @__PURE__ */ L(Ze, { className: "tg:ml-2 tg:h-4 tg:w-4 tg:shrink-0 tg:opacity-50" })]
2622
2709
  })
2623
- }), /* @__PURE__ */ P(ae, {
2710
+ }), /* @__PURE__ */ L(ae, {
2624
2711
  className: "tg:w-full tg:p-0",
2625
2712
  align: "start",
2626
- children: /* @__PURE__ */ F(ce, {
2713
+ children: /* @__PURE__ */ R(se, {
2627
2714
  shouldFilter: !1,
2628
- children: [/* @__PURE__ */ P(ee, {
2715
+ children: [/* @__PURE__ */ L(te, {
2629
2716
  placeholder: a,
2630
2717
  value: h,
2631
2718
  onValueChange: g
2632
- }), /* @__PURE__ */ F(x, { children: [
2633
- /* @__PURE__ */ P(f, { children: c }),
2634
- u && b && /* @__PURE__ */ P(se, { children: /* @__PURE__ */ F(te, {
2719
+ }), /* @__PURE__ */ R(x, { children: [
2720
+ /* @__PURE__ */ L(f, { children: c }),
2721
+ u && ee && /* @__PURE__ */ L(oe, { children: /* @__PURE__ */ R(b, {
2635
2722
  value: "__clear__",
2636
2723
  onSelect: () => {
2637
2724
  r?.(""), m(!1), g("");
2638
2725
  },
2639
2726
  className: "tg:mt-1 tg:text-muted-foreground",
2640
- children: [/* @__PURE__ */ P(L, { className: "tg:mr-2 tg:h-4 tg:w-4" }), s]
2727
+ children: [/* @__PURE__ */ L(B, { className: "tg:mr-2 tg:h-4 tg:w-4" }), s]
2641
2728
  }) }),
2642
- /* @__PURE__ */ F(se, { children: [re && /* @__PURE__ */ F(te, {
2729
+ /* @__PURE__ */ R(oe, { children: [re && /* @__PURE__ */ R(b, {
2643
2730
  value: `__create__${h}`,
2644
2731
  onSelect: () => {
2645
2732
  h.trim() && (r?.(h.trim()), m(!1), g(""));
2646
2733
  },
2647
2734
  className: "tg:text-primary",
2648
- children: [/* @__PURE__ */ P(I, { className: "tg:mr-2 tg:h-4 tg:w-4" }), o(h)]
2735
+ children: [/* @__PURE__ */ L(z, { className: "tg:mr-2 tg:h-4 tg:w-4" }), o(h)]
2649
2736
  }), e.filter((e) => {
2650
2737
  let t = h.toLowerCase();
2651
2738
  return e.label.toLowerCase().includes(t) || (e.value?.toLowerCase() ?? "").includes(t);
2652
- }).map((e, t) => /* @__PURE__ */ F(te, {
2739
+ }).map((e, t) => /* @__PURE__ */ R(b, {
2653
2740
  value: e.label,
2654
2741
  onSelect: () => w(e?.value || ""),
2655
- children: [/* @__PURE__ */ P(Ve, {
2742
+ children: [/* @__PURE__ */ L(Je, {
2656
2743
  "aria-hidden": "true",
2657
- className: E("tg:mr-2 tg:h-4 tg:w-4", b && _(e.value) === y ? "tg:opacity-100" : "tg:opacity-0")
2744
+ className: D("tg:mr-2 tg:h-4 tg:w-4", ee && _(e.value) === y ? "tg:opacity-100" : "tg:opacity-0")
2658
2745
  }), e.label]
2659
2746
  }, e.value ?? e.label ?? t))] })
2660
2747
  ] })]
2661
2748
  })
2662
2749
  })]
2663
2750
  });
2664
- }, Jn = Object.entries({
2751
+ }, or = Object.entries({
2665
2752
  alphanumeric: "^[a-zA-Z0-9]+$",
2666
2753
  email: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
2667
2754
  letters: "^[a-zA-Z]+$",
@@ -2670,52 +2757,52 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2670
2757
  }).map(([e, t]) => ({
2671
2758
  label: e.charAt(0).toUpperCase() + e.slice(1).replace(/_/g, " "),
2672
2759
  value: t
2673
- })), Yn = ({ id: e, value: t, onValueChange: n }) => /* @__PURE__ */ P(qn, {
2760
+ })), sr = ({ id: e, value: t, onValueChange: n }) => /* @__PURE__ */ L(ar, {
2674
2761
  id: e,
2675
- options: kt(() => t && !Jn.some((e) => e.value === t) ? [...Jn, {
2762
+ options: ze(() => t && !or.some((e) => e.value === t) ? [...or, {
2676
2763
  label: `Custom: ${t}`,
2677
2764
  value: t
2678
- }] : Jn, [t]),
2765
+ }] : or, [t]),
2679
2766
  value: t,
2680
2767
  onValueChange: n,
2681
2768
  placeholder: "Select or create a pattern",
2682
2769
  searchPlaceholder: "Search patterns...",
2683
2770
  createLabel: (e) => `Use pattern: ${e}`
2684
- }), Xn = 400, Zn = .8, Qn = (e) => new Promise((t, n) => {
2771
+ }), cr = 400, lr = .8, ur = (e) => new Promise((t, n) => {
2685
2772
  let r = new FileReader();
2686
2773
  r.onerror = () => n(/* @__PURE__ */ Error("read_failed")), r.onload = () => {
2687
2774
  let e = new Image();
2688
2775
  e.onload = () => t(e), e.onerror = () => n(/* @__PURE__ */ Error("decode_failed")), e.src = r.result;
2689
2776
  }, r.readAsDataURL(e);
2690
- }), $n = async (e) => {
2777
+ }), dr = async (e) => {
2691
2778
  if (!e.type.startsWith("image/")) throw Error("invalid_type");
2692
2779
  if (e.size > 5242880) throw Error("too_large");
2693
- let t = await Qn(e), n = Math.min(1, Xn / Math.max(t.width, t.height)), r = document.createElement("canvas");
2780
+ let t = await ur(e), n = Math.min(1, cr / Math.max(t.width, t.height)), r = document.createElement("canvas");
2694
2781
  r.width = Math.round(t.width * n), r.height = Math.round(t.height * n);
2695
2782
  let i = r.getContext("2d");
2696
2783
  if (!i) throw Error("canvas_unavailable");
2697
- return i.drawImage(t, 0, 0, r.width, r.height), r.toDataURL("image/jpeg", Zn);
2698
- }, er = 400, tr = (e) => {
2784
+ return i.drawImage(t, 0, 0, r.width, r.height), r.toDataURL("image/jpeg", lr);
2785
+ }, fr = 400, pr = (e) => {
2699
2786
  if (!/^https?:\/\//i.test(e)) return !1;
2700
2787
  try {
2701
2788
  return !!new URL(e).hostname;
2702
2789
  } catch {
2703
2790
  return !1;
2704
2791
  }
2705
- }, nr = ({ value: e, onChange: t }) => {
2706
- let n = At(null), r = At(null), [i, a] = z(!1), [o, s] = z(e && /^https?:\/\//i.test(e) ? e : ""), c = U();
2707
- Dt(() => {
2792
+ }, mr = ({ value: e, onChange: t }) => {
2793
+ let n = Be(null), r = Be(null), [i, a] = F(!1), [o, s] = F(e && /^https?:\/\//i.test(e) ? e : ""), c = W();
2794
+ Le(() => {
2708
2795
  i || s(e && /^https?:\/\//i.test(e) ? e : "");
2709
- }, [i, e]), Dt(() => () => {
2796
+ }, [i, e]), Le(() => () => {
2710
2797
  r.current && clearTimeout(r.current);
2711
2798
  }, []);
2712
2799
  let l = async (e) => {
2713
2800
  let r = e.target.files?.[0];
2714
2801
  if (r) try {
2715
- t(await $n(r)), a(!1);
2802
+ t(await dr(r)), a(!1);
2716
2803
  } catch (e) {
2717
2804
  let t = e.message;
2718
- t === "too_large" ? V.error(c("editor.inputNodeForm.optionImageTooLarge")) : t === "invalid_type" ? V.error(c("editor.inputNodeForm.optionImageInvalid")) : V.error(c("editor.inputNodeForm.optionImageError"));
2805
+ t === "too_large" ? H.error(c("editor.inputNodeForm.optionImageTooLarge")) : t === "invalid_type" ? H.error(c("editor.inputNodeForm.optionImageInvalid")) : H.error(c("editor.inputNodeForm.optionImageError"));
2719
2806
  } finally {
2720
2807
  n.current && (n.current.value = "");
2721
2808
  }
@@ -2723,62 +2810,62 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2723
2810
  let e = o.trim();
2724
2811
  e && (t(e), a(!1));
2725
2812
  };
2726
- return /* @__PURE__ */ F("div", {
2813
+ return /* @__PURE__ */ R("div", {
2727
2814
  className: "tg:relative",
2728
2815
  children: [
2729
- /* @__PURE__ */ P("input", {
2816
+ /* @__PURE__ */ L("input", {
2730
2817
  ref: n,
2731
2818
  type: "file",
2732
2819
  accept: "image/*",
2733
2820
  className: "tg:hidden",
2734
2821
  onChange: l
2735
2822
  }),
2736
- /* @__PURE__ */ F(ie, {
2823
+ /* @__PURE__ */ R(ie, {
2737
2824
  open: i,
2738
2825
  onOpenChange: a,
2739
- children: [/* @__PURE__ */ P(ne, {
2826
+ children: [/* @__PURE__ */ L(ne, {
2740
2827
  asChild: !0,
2741
- children: e ? /* @__PURE__ */ P("button", {
2828
+ children: e ? /* @__PURE__ */ L("button", {
2742
2829
  type: "button",
2743
2830
  className: "tg:h-9 tg:w-9 tg:cursor-pointer tg:overflow-hidden tg:rounded-md tg:border tg:border-input",
2744
2831
  "aria-label": c("editor.inputNodeForm.optionImageReplace"),
2745
- children: /* @__PURE__ */ P("img", {
2832
+ children: /* @__PURE__ */ L("img", {
2746
2833
  src: e,
2747
2834
  alt: "",
2748
2835
  className: "tg:h-full tg:w-full tg:object-cover"
2749
2836
  })
2750
- }) : /* @__PURE__ */ P(k, {
2837
+ }) : /* @__PURE__ */ L(A, {
2751
2838
  type: "button",
2752
2839
  variant: "outline",
2753
2840
  size: "icon",
2754
2841
  "aria-label": c("editor.inputNodeForm.optionImageAdd"),
2755
- children: /* @__PURE__ */ P(tt, { className: "tg:h-4 tg:w-4" })
2842
+ children: /* @__PURE__ */ L(ct, { className: "tg:h-4 tg:w-4" })
2756
2843
  })
2757
- }), /* @__PURE__ */ F(ae, {
2844
+ }), /* @__PURE__ */ R(ae, {
2758
2845
  align: "start",
2759
2846
  className: "tg:w-64 tg:space-y-3 tg:p-3",
2760
2847
  children: [
2761
- /* @__PURE__ */ F(k, {
2848
+ /* @__PURE__ */ R(A, {
2762
2849
  type: "button",
2763
2850
  variant: "outline",
2764
2851
  size: "sm",
2765
2852
  className: "tg:w-full",
2766
2853
  onClick: () => n.current?.click(),
2767
- children: [/* @__PURE__ */ P(yt, { className: "tg:mr-2 tg:h-4 tg:w-4" }), c("editor.inputNodeForm.optionImageUpload")]
2854
+ children: [/* @__PURE__ */ L(Dt, { className: "tg:mr-2 tg:h-4 tg:w-4" }), c("editor.inputNodeForm.optionImageUpload")]
2768
2855
  }),
2769
- /* @__PURE__ */ P(ue, {}),
2770
- /* @__PURE__ */ F("div", {
2856
+ /* @__PURE__ */ L(le, {}),
2857
+ /* @__PURE__ */ R("div", {
2771
2858
  className: "tg:flex tg:items-center tg:gap-2",
2772
- children: [/* @__PURE__ */ P(rt, { className: "tg:h-4 tg:w-4 tg:shrink-0 tg:text-muted-foreground" }), /* @__PURE__ */ P(O, {
2859
+ children: [/* @__PURE__ */ L(ut, { className: "tg:h-4 tg:w-4 tg:shrink-0 tg:text-muted-foreground" }), /* @__PURE__ */ L(k, {
2773
2860
  placeholder: c("editor.inputNodeForm.optionImageUrlPlaceholder"),
2774
2861
  value: o,
2775
2862
  onChange: (n) => {
2776
2863
  let i = n.target.value;
2777
2864
  s(i), r.current && clearTimeout(r.current);
2778
2865
  let a = i.trim();
2779
- !tr(a) || a === e || (r.current = setTimeout(() => {
2866
+ !pr(a) || a === e || (r.current = setTimeout(() => {
2780
2867
  t(a);
2781
- }, er));
2868
+ }, fr));
2782
2869
  },
2783
2870
  onKeyDown: (e) => {
2784
2871
  e.key === "Enter" && (e.preventDefault(), u());
@@ -2789,47 +2876,47 @@ var Ln = ({ aiConfig: e, onGenerate: t }) => {
2789
2876
  ]
2790
2877
  })]
2791
2878
  }),
2792
- e && /* @__PURE__ */ P("button", {
2879
+ e && /* @__PURE__ */ L("button", {
2793
2880
  type: "button",
2794
2881
  onClick: (e) => {
2795
2882
  e.stopPropagation(), t("");
2796
2883
  },
2797
2884
  className: "tg:-top-1 tg:-right-1 tg:absolute tg:flex tg:h-4 tg:w-4 tg:cursor-pointer tg:items-center tg:justify-center tg:rounded-full tg:bg-destructive tg:text-destructive-foreground",
2798
2885
  "aria-label": c("editor.inputNodeForm.optionImageRemove"),
2799
- children: /* @__PURE__ */ P(L, { className: "tg:h-3 tg:w-3" })
2886
+ children: /* @__PURE__ */ L(B, { className: "tg:h-3 tg:w-3" })
2800
2887
  })
2801
2888
  ]
2802
2889
  });
2803
2890
  };
2804
2891
  //#endregion
2805
2892
  //#region src/shared/components/ui/collapsible.tsx
2806
- function rr({ ...e }) {
2807
- return /* @__PURE__ */ P(It.Root, {
2893
+ function hr({ ...e }) {
2894
+ return /* @__PURE__ */ L(Rt.Root, {
2808
2895
  "data-slot": "collapsible",
2809
2896
  ...e
2810
2897
  });
2811
2898
  }
2812
- function ir({ ...e }) {
2813
- return /* @__PURE__ */ P(It.CollapsibleTrigger, {
2899
+ function gr({ ...e }) {
2900
+ return /* @__PURE__ */ L(Rt.CollapsibleTrigger, {
2814
2901
  "data-slot": "collapsible-trigger",
2815
2902
  ...e
2816
2903
  });
2817
2904
  }
2818
- function ar({ ...e }) {
2819
- return /* @__PURE__ */ P(It.CollapsibleContent, {
2905
+ function _r({ ...e }) {
2906
+ return /* @__PURE__ */ L(Rt.CollapsibleContent, {
2820
2907
  "data-slot": "collapsible-content",
2821
2908
  ...e
2822
2909
  });
2823
2910
  }
2824
2911
  //#endregion
2825
2912
  //#region src/editor/features/TreegeEditor/forms/InputNodeForm.tsx
2826
- var or = () => {
2827
- let [e, t] = z("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = W(), i = [
2913
+ var vr = () => {
2914
+ let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = G(), i = [
2828
2915
  "select",
2829
2916
  "radio",
2830
2917
  "autocomplete",
2831
2918
  "checkbox"
2832
- ].includes(n?.data?.type || ""), a = Ht(n?.id), o = U(), s = n?.data?.type === "submit", c = n?.data?.type === "hidden", { handleSubmit: l, Field: u } = Pe({
2919
+ ].includes(n?.data?.type || ""), a = Ut(n?.id), o = W(), s = n?.data?.type === "submit", c = n?.data?.type === "hidden", { handleSubmit: l, Field: u } = Ve({
2833
2920
  defaultValues: {
2834
2921
  defaultValue: n?.data?.defaultValue,
2835
2922
  disablePast: n?.data?.disablePast,
@@ -2856,23 +2943,23 @@ var or = () => {
2856
2943
  r(e);
2857
2944
  }
2858
2945
  });
2859
- return /* @__PURE__ */ P("form", {
2946
+ return /* @__PURE__ */ L("form", {
2860
2947
  onSubmit: (e) => {
2861
2948
  e.preventDefault(), e.stopPropagation();
2862
2949
  },
2863
- children: /* @__PURE__ */ F("div", {
2950
+ children: /* @__PURE__ */ R("div", {
2864
2951
  className: "tg:grid tg:gap-6",
2865
2952
  children: [
2866
- /* @__PURE__ */ F("div", {
2953
+ /* @__PURE__ */ R("div", {
2867
2954
  className: "tg:flex tg:items-end tg:gap-2",
2868
- children: [/* @__PURE__ */ P(u, {
2955
+ children: [/* @__PURE__ */ L(u, {
2869
2956
  name: "label",
2870
- children: (t) => /* @__PURE__ */ F(A, {
2957
+ children: (t) => /* @__PURE__ */ R(j, {
2871
2958
  className: "tg:flex-1",
2872
- children: [/* @__PURE__ */ P(d, {
2959
+ children: [/* @__PURE__ */ L(d, {
2873
2960
  htmlFor: t.name,
2874
2961
  children: o("editor.inputNodeForm.label")
2875
- }), /* @__PURE__ */ P(O, {
2962
+ }), /* @__PURE__ */ L(k, {
2876
2963
  autoFocus: !0,
2877
2964
  id: t.name,
2878
2965
  name: t.name,
@@ -2886,21 +2973,21 @@ var or = () => {
2886
2973
  }
2887
2974
  })]
2888
2975
  })
2889
- }), /* @__PURE__ */ P(Q, {
2976
+ }), /* @__PURE__ */ L(Q, {
2890
2977
  value: e,
2891
2978
  onValueChange: t
2892
2979
  })]
2893
2980
  }),
2894
- !(s || c) && n?.data?.type !== "file" && /* @__PURE__ */ F("div", {
2981
+ !(s || c) && n?.data?.type !== "file" && /* @__PURE__ */ R("div", {
2895
2982
  className: "tg:flex tg:items-end tg:gap-2",
2896
- children: [/* @__PURE__ */ P(u, {
2983
+ children: [/* @__PURE__ */ L(u, {
2897
2984
  name: "placeholder",
2898
- children: (t) => /* @__PURE__ */ F(A, {
2985
+ children: (t) => /* @__PURE__ */ R(j, {
2899
2986
  className: "tg:flex-1",
2900
- children: [/* @__PURE__ */ P(d, {
2987
+ children: [/* @__PURE__ */ L(d, {
2901
2988
  htmlFor: t.name,
2902
2989
  children: o("editor.inputNodeForm.placeholder")
2903
- }), /* @__PURE__ */ P(O, {
2990
+ }), /* @__PURE__ */ L(k, {
2904
2991
  id: t.name,
2905
2992
  name: t.name,
2906
2993
  value: t.state.value?.[e] || "",
@@ -2913,21 +3000,21 @@ var or = () => {
2913
3000
  }
2914
3001
  })]
2915
3002
  })
2916
- }), /* @__PURE__ */ P(Q, {
3003
+ }), /* @__PURE__ */ L(Q, {
2917
3004
  value: e,
2918
3005
  onValueChange: t
2919
3006
  })]
2920
3007
  }),
2921
- !(s || c) && /* @__PURE__ */ F("div", {
3008
+ !(s || c) && /* @__PURE__ */ R("div", {
2922
3009
  className: "tg:flex tg:items-end tg:gap-2",
2923
- children: [/* @__PURE__ */ P(u, {
3010
+ children: [/* @__PURE__ */ L(u, {
2924
3011
  name: "helperText",
2925
- children: (t) => /* @__PURE__ */ F(A, {
3012
+ children: (t) => /* @__PURE__ */ R(j, {
2926
3013
  className: "tg:flex-1",
2927
- children: [/* @__PURE__ */ P(d, {
3014
+ children: [/* @__PURE__ */ L(d, {
2928
3015
  htmlFor: t.name,
2929
3016
  children: o("editor.inputNodeForm.helperText")
2930
- }), /* @__PURE__ */ P(O, {
3017
+ }), /* @__PURE__ */ L(k, {
2931
3018
  id: t.name,
2932
3019
  name: t.name,
2933
3020
  value: t.state.value?.[e] || "",
@@ -2940,36 +3027,36 @@ var or = () => {
2940
3027
  }
2941
3028
  })]
2942
3029
  })
2943
- }), /* @__PURE__ */ P(Q, {
3030
+ }), /* @__PURE__ */ L(Q, {
2944
3031
  value: e,
2945
3032
  onValueChange: t
2946
3033
  })]
2947
3034
  }),
2948
- n?.data?.type === "http" && /* @__PURE__ */ F(rr, {
3035
+ n?.data?.type === "http" && /* @__PURE__ */ R(hr, {
2949
3036
  defaultOpen: !0,
2950
3037
  className: "tg:flex tg:w-full tg:max-w-[350px] tg:flex-col tg:gap-2",
2951
- children: [/* @__PURE__ */ P(ir, {
3038
+ children: [/* @__PURE__ */ L(gr, {
2952
3039
  asChild: !0,
2953
- children: /* @__PURE__ */ F("div", {
3040
+ children: /* @__PURE__ */ R("div", {
2954
3041
  className: "tg:flex tg:items-center tg:justify-between tg:gap-4",
2955
- children: [/* @__PURE__ */ P("h4", {
3042
+ children: [/* @__PURE__ */ L("h4", {
2956
3043
  className: "tg:font-semibold tg:text-sm",
2957
3044
  children: o("editor.inputNodeForm.httpConfiguration")
2958
- }), /* @__PURE__ */ F(k, {
3045
+ }), /* @__PURE__ */ R(A, {
2959
3046
  variant: "ghost",
2960
3047
  size: "icon",
2961
3048
  className: "tg:size-8",
2962
- children: [/* @__PURE__ */ P(We, {}), /* @__PURE__ */ P("span", {
3049
+ children: [/* @__PURE__ */ L(Ze, {}), /* @__PURE__ */ L("span", {
2963
3050
  className: "tg:sr-only",
2964
3051
  children: o("common.toggle")
2965
3052
  })]
2966
3053
  })]
2967
3054
  })
2968
- }), /* @__PURE__ */ P(ar, {
3055
+ }), /* @__PURE__ */ L(_r, {
2969
3056
  className: "tg:flex tg:flex-col tg:gap-4",
2970
- children: /* @__PURE__ */ P(u, {
3057
+ children: /* @__PURE__ */ L(u, {
2971
3058
  name: "httpConfig",
2972
- children: (e) => /* @__PURE__ */ P(Wn, {
3059
+ children: (e) => /* @__PURE__ */ L(nr, {
2973
3060
  value: e.state.value,
2974
3061
  onChange: (t) => {
2975
3062
  e.handleChange(t), l().then();
@@ -2978,30 +3065,30 @@ var or = () => {
2978
3065
  })
2979
3066
  })]
2980
3067
  }),
2981
- s && /* @__PURE__ */ F(rr, {
3068
+ s && /* @__PURE__ */ R(hr, {
2982
3069
  className: "tg:flex tg:w-full tg:max-w-[350px] tg:flex-col tg:gap-2",
2983
- children: [/* @__PURE__ */ P(ir, {
3070
+ children: [/* @__PURE__ */ L(gr, {
2984
3071
  asChild: !0,
2985
- children: /* @__PURE__ */ F("div", {
3072
+ children: /* @__PURE__ */ R("div", {
2986
3073
  className: "tg:flex tg:items-center tg:justify-between tg:gap-4",
2987
- children: [/* @__PURE__ */ P("h4", {
3074
+ children: [/* @__PURE__ */ L("h4", {
2988
3075
  className: "tg:font-semibold tg:text-sm",
2989
3076
  children: o("editor.inputNodeForm.submitConfiguration")
2990
- }), /* @__PURE__ */ F(k, {
3077
+ }), /* @__PURE__ */ R(A, {
2991
3078
  variant: "ghost",
2992
3079
  size: "icon",
2993
3080
  className: "tg:size-8",
2994
- children: [/* @__PURE__ */ P(We, {}), /* @__PURE__ */ P("span", {
3081
+ children: [/* @__PURE__ */ L(Ze, {}), /* @__PURE__ */ L("span", {
2995
3082
  className: "tg:sr-only",
2996
3083
  children: o("common.toggle")
2997
3084
  })]
2998
3085
  })]
2999
3086
  })
3000
- }), /* @__PURE__ */ P(ar, {
3087
+ }), /* @__PURE__ */ L(_r, {
3001
3088
  className: "tg:flex tg:flex-col tg:gap-4",
3002
- children: /* @__PURE__ */ P(u, {
3089
+ children: /* @__PURE__ */ L(u, {
3003
3090
  name: "submitConfig",
3004
- children: (e) => /* @__PURE__ */ P(Kn, {
3091
+ children: (e) => /* @__PURE__ */ L(ir, {
3005
3092
  value: e.state.value,
3006
3093
  onChange: (t) => {
3007
3094
  e.handleChange(t), l().then();
@@ -3010,65 +3097,65 @@ var or = () => {
3010
3097
  })
3011
3098
  })]
3012
3099
  }),
3013
- n?.data?.type === "file" && /* @__PURE__ */ P(u, {
3100
+ n?.data?.type === "file" && /* @__PURE__ */ L(u, {
3014
3101
  name: "multiple",
3015
- children: (e) => /* @__PURE__ */ F("div", {
3102
+ children: (e) => /* @__PURE__ */ R("div", {
3016
3103
  className: "tg:flex tg:items-center tg:space-x-2",
3017
- children: [/* @__PURE__ */ P(D, {
3104
+ children: [/* @__PURE__ */ L(O, {
3018
3105
  id: e.name,
3019
3106
  checked: e.state.value,
3020
3107
  onCheckedChange: (t) => e.handleChange(t)
3021
- }), /* @__PURE__ */ P(d, {
3108
+ }), /* @__PURE__ */ L(d, {
3022
3109
  htmlFor: e.name,
3023
3110
  children: o("editor.inputNodeForm.multipleFiles")
3024
3111
  })]
3025
3112
  })
3026
3113
  }),
3027
- i && /* @__PURE__ */ F(rr, {
3114
+ i && /* @__PURE__ */ R(hr, {
3028
3115
  defaultOpen: !0,
3029
3116
  className: "tg:flex tg:w-full tg:max-w-[350px] tg:flex-col tg:gap-2",
3030
- children: [/* @__PURE__ */ P(ir, {
3117
+ children: [/* @__PURE__ */ L(gr, {
3031
3118
  asChild: !0,
3032
- children: /* @__PURE__ */ F("div", {
3119
+ children: /* @__PURE__ */ R("div", {
3033
3120
  className: "tg:flex tg:items-center tg:justify-between tg:gap-4",
3034
- children: [/* @__PURE__ */ P("h4", {
3121
+ children: [/* @__PURE__ */ L("h4", {
3035
3122
  className: "tg:font-semibold tg:text-sm",
3036
3123
  children: o("editor.inputNodeForm.options")
3037
- }), /* @__PURE__ */ F(k, {
3124
+ }), /* @__PURE__ */ R(A, {
3038
3125
  variant: "ghost",
3039
3126
  size: "icon",
3040
3127
  className: "tg:size-8",
3041
- children: [/* @__PURE__ */ P(We, {}), /* @__PURE__ */ P("span", {
3128
+ children: [/* @__PURE__ */ L(Ze, {}), /* @__PURE__ */ L("span", {
3042
3129
  className: "tg:sr-only",
3043
3130
  children: o("common.toggle")
3044
3131
  })]
3045
3132
  })]
3046
3133
  })
3047
- }), /* @__PURE__ */ F(ar, {
3134
+ }), /* @__PURE__ */ R(_r, {
3048
3135
  className: "tg:flex tg:flex-col tg:gap-4",
3049
3136
  children: [
3050
- /* @__PURE__ */ P(u, {
3137
+ /* @__PURE__ */ L(u, {
3051
3138
  name: "options",
3052
3139
  mode: "array",
3053
- children: (t) => /* @__PURE__ */ F("div", {
3140
+ children: (t) => /* @__PURE__ */ R("div", {
3054
3141
  className: "tg:space-y-2",
3055
3142
  children: [t.state.value?.map((r, i) => {
3056
3143
  let a = `options[${i}]`;
3057
- return /* @__PURE__ */ F("div", {
3144
+ return /* @__PURE__ */ R("div", {
3058
3145
  className: "tg:flex tg:flex-col tg:gap-2",
3059
- children: [/* @__PURE__ */ F("div", {
3146
+ children: [/* @__PURE__ */ R("div", {
3060
3147
  className: "tg:flex tg:items-start tg:gap-2",
3061
3148
  children: [
3062
- n?.data?.type === "radio" && /* @__PURE__ */ P(u, {
3149
+ n?.data?.type === "radio" && /* @__PURE__ */ L(u, {
3063
3150
  name: `options[${i}].image`,
3064
- children: (e) => /* @__PURE__ */ P(nr, {
3151
+ children: (e) => /* @__PURE__ */ L(mr, {
3065
3152
  value: e.state.value,
3066
3153
  onChange: (t) => e.handleChange(t)
3067
3154
  })
3068
3155
  }),
3069
- /* @__PURE__ */ P(u, {
3156
+ /* @__PURE__ */ L(u, {
3070
3157
  name: `options[${i}].label`,
3071
- children: (t) => /* @__PURE__ */ P(O, {
3158
+ children: (t) => /* @__PURE__ */ L(k, {
3072
3159
  placeholder: o("editor.inputNodeForm.optionLabel"),
3073
3160
  value: t.state.value?.[e] || "",
3074
3161
  onChange: ({ target: n }) => {
@@ -3079,27 +3166,27 @@ var or = () => {
3079
3166
  }
3080
3167
  })
3081
3168
  }),
3082
- /* @__PURE__ */ P(u, {
3169
+ /* @__PURE__ */ L(u, {
3083
3170
  name: `options[${i}].value`,
3084
- children: (e) => /* @__PURE__ */ P(O, {
3171
+ children: (e) => /* @__PURE__ */ L(k, {
3085
3172
  placeholder: o("editor.inputNodeForm.optionValue"),
3086
3173
  value: e.state.value || "",
3087
3174
  onChange: ({ target: t }) => e.handleChange(t.value)
3088
3175
  })
3089
3176
  }),
3090
- /* @__PURE__ */ P(k, {
3177
+ /* @__PURE__ */ L(A, {
3091
3178
  type: "button",
3092
3179
  variant: "ghost",
3093
3180
  size: "icon",
3094
3181
  onClick: () => {
3095
3182
  t.removeValue(i), l().then();
3096
3183
  },
3097
- children: /* @__PURE__ */ P(L, { className: "tg:h-4 tg:w-4" })
3184
+ children: /* @__PURE__ */ L(B, { className: "tg:h-4 tg:w-4" })
3098
3185
  })
3099
3186
  ]
3100
- }), (n?.data?.type === "radio" || n?.data?.type === "checkbox") && /* @__PURE__ */ P(u, {
3187
+ }), (n?.data?.type === "radio" || n?.data?.type === "checkbox") && /* @__PURE__ */ L(u, {
3101
3188
  name: `options[${i}].description`,
3102
- children: (t) => /* @__PURE__ */ P(O, {
3189
+ children: (t) => /* @__PURE__ */ L(k, {
3103
3190
  placeholder: o("editor.inputNodeForm.optionDescription"),
3104
3191
  value: t.state.value?.[e] || "",
3105
3192
  onChange: ({ target: n }) => {
@@ -3111,7 +3198,7 @@ var or = () => {
3111
3198
  })
3112
3199
  })]
3113
3200
  }, a);
3114
- }), /* @__PURE__ */ P(k, {
3201
+ }), /* @__PURE__ */ L(A, {
3115
3202
  type: "button",
3116
3203
  variant: "outline",
3117
3204
  size: "sm",
@@ -3125,36 +3212,36 @@ var or = () => {
3125
3212
  })]
3126
3213
  })
3127
3214
  }),
3128
- n?.data?.type === "select" && /* @__PURE__ */ P(u, {
3215
+ n?.data?.type === "select" && /* @__PURE__ */ L(u, {
3129
3216
  name: "multiple",
3130
- children: (e) => /* @__PURE__ */ F("div", {
3217
+ children: (e) => /* @__PURE__ */ R("div", {
3131
3218
  className: "tg:flex tg:items-center tg:space-x-2",
3132
- children: [/* @__PURE__ */ P(D, {
3219
+ children: [/* @__PURE__ */ L(O, {
3133
3220
  id: e.name,
3134
3221
  checked: e.state.value,
3135
3222
  onCheckedChange: (t) => e.handleChange(t)
3136
- }), /* @__PURE__ */ P(d, {
3223
+ }), /* @__PURE__ */ L(d, {
3137
3224
  htmlFor: e.name,
3138
3225
  children: o("editor.inputNodeForm.multipleSelection")
3139
3226
  })]
3140
3227
  })
3141
3228
  }),
3142
- n?.data?.type === "radio" && /* @__PURE__ */ P(u, {
3229
+ n?.data?.type === "radio" && /* @__PURE__ */ L(u, {
3143
3230
  name: "variant",
3144
- children: (e) => /* @__PURE__ */ F(A, { children: [/* @__PURE__ */ P(d, {
3231
+ children: (e) => /* @__PURE__ */ R(j, { children: [/* @__PURE__ */ L(d, {
3145
3232
  htmlFor: e.name,
3146
3233
  children: o("editor.inputNodeForm.variant")
3147
- }), /* @__PURE__ */ F(g, {
3234
+ }), /* @__PURE__ */ R(g, {
3148
3235
  value: e.state.value || "default",
3149
3236
  onValueChange: (t) => e.handleChange(t),
3150
- children: [/* @__PURE__ */ P(v, {
3237
+ children: [/* @__PURE__ */ L(v, {
3151
3238
  id: e.name,
3152
3239
  className: "tg:w-full",
3153
- children: /* @__PURE__ */ P(T, {})
3154
- }), /* @__PURE__ */ F(C, { children: [/* @__PURE__ */ P(h, {
3240
+ children: /* @__PURE__ */ L(T, {})
3241
+ }), /* @__PURE__ */ R(C, { children: [/* @__PURE__ */ L(h, {
3155
3242
  value: "default",
3156
3243
  children: o("editor.inputNodeForm.variantDefault")
3157
- }), /* @__PURE__ */ P(h, {
3244
+ }), /* @__PURE__ */ L(h, {
3158
3245
  value: "card",
3159
3246
  children: o("editor.inputNodeForm.variantCard")
3160
3247
  })] })]
@@ -3163,77 +3250,77 @@ var or = () => {
3163
3250
  ]
3164
3251
  })]
3165
3252
  }),
3166
- !s && /* @__PURE__ */ F(rr, {
3253
+ !s && /* @__PURE__ */ R(hr, {
3167
3254
  className: "tg:flex tg:w-full tg:max-w-[350px] tg:flex-col tg:gap-2",
3168
- children: [/* @__PURE__ */ P(ir, {
3255
+ children: [/* @__PURE__ */ L(gr, {
3169
3256
  asChild: !0,
3170
- children: /* @__PURE__ */ F("div", {
3257
+ children: /* @__PURE__ */ R("div", {
3171
3258
  className: "tg:flex tg:items-center tg:justify-between tg:gap-4",
3172
- children: [/* @__PURE__ */ P("h4", {
3259
+ children: [/* @__PURE__ */ L("h4", {
3173
3260
  className: "tg:font-semibold tg:text-sm",
3174
3261
  children: o("editor.inputNodeForm.validation")
3175
- }), /* @__PURE__ */ F(k, {
3262
+ }), /* @__PURE__ */ R(A, {
3176
3263
  variant: "ghost",
3177
3264
  size: "icon",
3178
3265
  className: "tg:size-8",
3179
- children: [/* @__PURE__ */ P(We, {}), /* @__PURE__ */ P("span", {
3266
+ children: [/* @__PURE__ */ L(Ze, {}), /* @__PURE__ */ L("span", {
3180
3267
  className: "tg:sr-only",
3181
3268
  children: o("common.toggle")
3182
3269
  })]
3183
3270
  })]
3184
3271
  })
3185
- }), /* @__PURE__ */ F(ar, {
3272
+ }), /* @__PURE__ */ R(_r, {
3186
3273
  className: "tg:flex tg:flex-col tg:gap-6",
3187
3274
  children: [
3188
- /* @__PURE__ */ P(u, {
3275
+ /* @__PURE__ */ L(u, {
3189
3276
  name: "required",
3190
- children: (e) => /* @__PURE__ */ P(A, { children: /* @__PURE__ */ F("div", {
3277
+ children: (e) => /* @__PURE__ */ L(j, { children: /* @__PURE__ */ R("div", {
3191
3278
  className: "tg:flex tg:items-center tg:space-x-2",
3192
- children: [/* @__PURE__ */ P(D, {
3279
+ children: [/* @__PURE__ */ L(O, {
3193
3280
  id: e.name,
3194
3281
  checked: e.state.value,
3195
3282
  onCheckedChange: (t) => e.handleChange(t)
3196
- }), /* @__PURE__ */ P(d, {
3283
+ }), /* @__PURE__ */ L(d, {
3197
3284
  htmlFor: e.name,
3198
3285
  children: o("editor.inputNodeForm.required")
3199
3286
  })]
3200
3287
  }) })
3201
3288
  }),
3202
- (n?.data?.type === "date" || n?.data?.type === "daterange") && /* @__PURE__ */ P(u, {
3289
+ (n?.data?.type === "date" || n?.data?.type === "daterange") && /* @__PURE__ */ L(u, {
3203
3290
  name: "disablePast",
3204
- children: (e) => /* @__PURE__ */ P(A, { children: /* @__PURE__ */ F("div", {
3291
+ children: (e) => /* @__PURE__ */ L(j, { children: /* @__PURE__ */ R("div", {
3205
3292
  className: "tg:flex tg:items-center tg:space-x-2",
3206
- children: [/* @__PURE__ */ P(D, {
3293
+ children: [/* @__PURE__ */ L(O, {
3207
3294
  id: e.name,
3208
3295
  checked: e.state.value,
3209
3296
  onCheckedChange: (t) => e.handleChange(t)
3210
- }), /* @__PURE__ */ P(d, {
3297
+ }), /* @__PURE__ */ L(d, {
3211
3298
  htmlFor: e.name,
3212
3299
  children: o("editor.inputNodeForm.disablePast")
3213
3300
  })]
3214
3301
  }) })
3215
3302
  }),
3216
- /* @__PURE__ */ P(u, {
3303
+ /* @__PURE__ */ L(u, {
3217
3304
  name: "pattern",
3218
- children: (e) => /* @__PURE__ */ F(A, { children: [/* @__PURE__ */ P(d, {
3305
+ children: (e) => /* @__PURE__ */ R(j, { children: [/* @__PURE__ */ L(d, {
3219
3306
  htmlFor: e.name,
3220
3307
  children: o("editor.inputNodeForm.pattern")
3221
- }), /* @__PURE__ */ P(Yn, {
3308
+ }), /* @__PURE__ */ L(sr, {
3222
3309
  id: e.name,
3223
3310
  value: e.state.value,
3224
3311
  onValueChange: e.handleChange
3225
3312
  })] })
3226
3313
  }),
3227
- /* @__PURE__ */ F("div", {
3314
+ /* @__PURE__ */ R("div", {
3228
3315
  className: "tg:flex tg:items-end tg:gap-2",
3229
- children: [/* @__PURE__ */ P(u, {
3316
+ children: [/* @__PURE__ */ L(u, {
3230
3317
  name: "errorMessage",
3231
- children: (t) => /* @__PURE__ */ F(A, {
3318
+ children: (t) => /* @__PURE__ */ R(j, {
3232
3319
  className: "tg:flex-1",
3233
- children: [/* @__PURE__ */ P(d, {
3320
+ children: [/* @__PURE__ */ L(d, {
3234
3321
  htmlFor: t.name,
3235
3322
  children: o("editor.inputNodeForm.errorMessage")
3236
- }), /* @__PURE__ */ P(O, {
3323
+ }), /* @__PURE__ */ L(k, {
3237
3324
  id: t.name,
3238
3325
  name: t.name,
3239
3326
  value: t.state.value?.[e] || "",
@@ -3246,7 +3333,7 @@ var or = () => {
3246
3333
  }
3247
3334
  })]
3248
3335
  })
3249
- }), /* @__PURE__ */ P(Q, {
3336
+ }), /* @__PURE__ */ L(Q, {
3250
3337
  value: e,
3251
3338
  onValueChange: t
3252
3339
  })]
@@ -3254,80 +3341,80 @@ var or = () => {
3254
3341
  ]
3255
3342
  })]
3256
3343
  }),
3257
- !s && /* @__PURE__ */ F(rr, {
3344
+ !s && /* @__PURE__ */ R(hr, {
3258
3345
  className: "tg:flex tg:w-full tg:max-w-[350px] tg:flex-col tg:gap-2",
3259
- children: [/* @__PURE__ */ P(ir, {
3346
+ children: [/* @__PURE__ */ L(gr, {
3260
3347
  asChild: !0,
3261
- children: /* @__PURE__ */ F("div", {
3348
+ children: /* @__PURE__ */ R("div", {
3262
3349
  className: "tg:flex tg:items-center tg:justify-between tg:gap-4",
3263
- children: [/* @__PURE__ */ P("h4", {
3350
+ children: [/* @__PURE__ */ L("h4", {
3264
3351
  className: "tg:font-semibold tg:text-sm",
3265
3352
  children: o("editor.inputNodeForm.advancedConfiguration")
3266
- }), /* @__PURE__ */ F(k, {
3353
+ }), /* @__PURE__ */ R(A, {
3267
3354
  variant: "ghost",
3268
3355
  size: "icon",
3269
3356
  className: "tg:size-8",
3270
- children: [/* @__PURE__ */ P(We, {}), /* @__PURE__ */ P("span", {
3357
+ children: [/* @__PURE__ */ L(Ze, {}), /* @__PURE__ */ L("span", {
3271
3358
  className: "tg:sr-only",
3272
3359
  children: o("common.toggle")
3273
3360
  })]
3274
3361
  })]
3275
3362
  })
3276
- }), /* @__PURE__ */ F(ar, {
3363
+ }), /* @__PURE__ */ R(_r, {
3277
3364
  className: "tg:flex tg:flex-col tg:gap-6",
3278
- children: [/* @__PURE__ */ P(u, {
3365
+ children: [/* @__PURE__ */ L(u, {
3279
3366
  name: "name",
3280
- children: (e) => /* @__PURE__ */ F(A, { children: [
3281
- /* @__PURE__ */ P(d, {
3367
+ children: (e) => /* @__PURE__ */ R(j, { children: [
3368
+ /* @__PURE__ */ L(d, {
3282
3369
  htmlFor: e.name,
3283
3370
  children: o("editor.inputNodeForm.name")
3284
3371
  }),
3285
- /* @__PURE__ */ P(O, {
3372
+ /* @__PURE__ */ L(k, {
3286
3373
  id: e.name,
3287
3374
  name: e.name,
3288
3375
  value: e.state.value,
3289
3376
  onBlur: e.handleBlur,
3290
3377
  onChange: ({ target: t }) => e.handleChange(t.value)
3291
3378
  }),
3292
- /* @__PURE__ */ P(j, { children: o("editor.inputNodeForm.nameDescription") })
3379
+ /* @__PURE__ */ L(M, { children: o("editor.inputNodeForm.nameDescription") })
3293
3380
  ] })
3294
- }), /* @__PURE__ */ P(u, {
3381
+ }), /* @__PURE__ */ L(u, {
3295
3382
  name: "defaultValue",
3296
- children: (e) => /* @__PURE__ */ F(N, { children: [
3297
- /* @__PURE__ */ F(A, { children: [/* @__PURE__ */ P(d, {
3383
+ children: (e) => /* @__PURE__ */ R(I, { children: [
3384
+ /* @__PURE__ */ R(j, { children: [/* @__PURE__ */ L(d, {
3298
3385
  htmlFor: e.name,
3299
3386
  children: o("editor.inputNodeForm.defaultValueType")
3300
- }), /* @__PURE__ */ F(g, {
3387
+ }), /* @__PURE__ */ R(g, {
3301
3388
  value: e.state.value?.type || "none",
3302
3389
  onValueChange: (t) => {
3303
3390
  e.handleChange(t === "none" ? null : { type: t });
3304
3391
  },
3305
- children: [/* @__PURE__ */ P(v, {
3392
+ children: [/* @__PURE__ */ L(v, {
3306
3393
  id: e.name,
3307
- children: /* @__PURE__ */ P(T, { placeholder: o("editor.inputNodeForm.selectType") })
3308
- }), /* @__PURE__ */ F(C, { children: [
3309
- /* @__PURE__ */ P(h, {
3394
+ children: /* @__PURE__ */ L(T, { placeholder: o("editor.inputNodeForm.selectType") })
3395
+ }), /* @__PURE__ */ R(C, { children: [
3396
+ /* @__PURE__ */ L(h, {
3310
3397
  value: "none",
3311
3398
  children: o("editor.inputNodeForm.defaultValueTypeNone")
3312
3399
  }),
3313
- /* @__PURE__ */ P(h, {
3400
+ /* @__PURE__ */ L(h, {
3314
3401
  value: "static",
3315
3402
  children: o("editor.inputNodeForm.defaultValueTypeStatic")
3316
3403
  }),
3317
- /* @__PURE__ */ P(h, {
3404
+ /* @__PURE__ */ L(h, {
3318
3405
  value: "reference",
3319
3406
  children: o("editor.inputNodeForm.defaultValueTypeReference")
3320
3407
  })
3321
3408
  ] })]
3322
3409
  })] }),
3323
- e.state.value?.type === "static" && /* @__PURE__ */ P(u, {
3410
+ e.state.value?.type === "static" && /* @__PURE__ */ L(u, {
3324
3411
  name: "defaultValue.staticValue",
3325
3412
  children: (e) => {
3326
3413
  let t = n?.data?.type;
3327
- return (t === "select" || t === "checkbox") && n?.data?.multiple ? /* @__PURE__ */ F(A, { children: [/* @__PURE__ */ P(d, {
3414
+ return (t === "select" || t === "checkbox") && n?.data?.multiple ? /* @__PURE__ */ R(j, { children: [/* @__PURE__ */ L(d, {
3328
3415
  htmlFor: e.name,
3329
3416
  children: o("editor.inputNodeForm.defaultValuesCommaSeparated")
3330
- }), /* @__PURE__ */ P(O, {
3417
+ }), /* @__PURE__ */ L(k, {
3331
3418
  id: e.name,
3332
3419
  placeholder: o("editor.inputNodeForm.defaultValuesPlaceholder"),
3333
3420
  value: Array.isArray(e.state.value) ? e.state.value.join(", ") : "",
@@ -3335,20 +3422,20 @@ var or = () => {
3335
3422
  let n = t.value.split(",").map((e) => e.trim()).filter(Boolean);
3336
3423
  e.handleChange(n.length > 0 ? n : null);
3337
3424
  }
3338
- })] }) : t === "checkbox" ? /* @__PURE__ */ P(A, { children: /* @__PURE__ */ F("div", {
3425
+ })] }) : t === "checkbox" ? /* @__PURE__ */ L(j, { children: /* @__PURE__ */ R("div", {
3339
3426
  className: "tg:flex tg:items-center tg:space-x-2",
3340
- children: [/* @__PURE__ */ P(D, {
3427
+ children: [/* @__PURE__ */ L(O, {
3341
3428
  id: e.name,
3342
3429
  checked: !!e.state.value,
3343
3430
  onCheckedChange: (t) => e.handleChange(t)
3344
- }), /* @__PURE__ */ P(d, {
3431
+ }), /* @__PURE__ */ L(d, {
3345
3432
  htmlFor: e.name,
3346
3433
  children: o("editor.inputNodeForm.defaultChecked")
3347
3434
  })]
3348
- }) }) : /* @__PURE__ */ F(A, { children: [/* @__PURE__ */ P(d, {
3435
+ }) }) : /* @__PURE__ */ R(j, { children: [/* @__PURE__ */ L(d, {
3349
3436
  htmlFor: e.name,
3350
3437
  children: o("editor.inputNodeForm.staticValue")
3351
- }), /* @__PURE__ */ P(O, {
3438
+ }), /* @__PURE__ */ L(k, {
3352
3439
  id: e.name,
3353
3440
  placeholder: o("editor.inputNodeForm.staticValuePlaceholder"),
3354
3441
  value: typeof e.state.value == "string" ? e.state.value : "",
@@ -3356,27 +3443,27 @@ var or = () => {
3356
3443
  })] });
3357
3444
  }
3358
3445
  }),
3359
- e.state.value?.type === "reference" && /* @__PURE__ */ F(N, { children: [
3360
- /* @__PURE__ */ P(u, {
3446
+ e.state.value?.type === "reference" && /* @__PURE__ */ R(I, { children: [
3447
+ /* @__PURE__ */ L(u, {
3361
3448
  name: "defaultValue.referenceField",
3362
- children: (e) => /* @__PURE__ */ F(A, { children: [
3363
- /* @__PURE__ */ P(d, {
3449
+ children: (e) => /* @__PURE__ */ R(j, { children: [
3450
+ /* @__PURE__ */ L(d, {
3364
3451
  htmlFor: e.name,
3365
3452
  children: o("editor.inputNodeForm.referenceField")
3366
3453
  }),
3367
- /* @__PURE__ */ F(g, {
3454
+ /* @__PURE__ */ R(g, {
3368
3455
  value: e.state.value || "",
3369
3456
  onValueChange: (t) => {
3370
3457
  e.handleChange(t);
3371
3458
  },
3372
- children: [/* @__PURE__ */ P(v, {
3459
+ children: [/* @__PURE__ */ L(v, {
3373
3460
  id: e.name,
3374
- children: /* @__PURE__ */ P(T, { placeholder: o("editor.inputNodeForm.selectReferenceField") })
3375
- }), /* @__PURE__ */ P(C, { children: a.length === 0 ? /* @__PURE__ */ P(h, {
3461
+ children: /* @__PURE__ */ L(T, { placeholder: o("editor.inputNodeForm.selectReferenceField") })
3462
+ }), /* @__PURE__ */ L(C, { children: a.length === 0 ? /* @__PURE__ */ L(h, {
3376
3463
  value: "none",
3377
3464
  disabled: !0,
3378
3465
  children: o("editor.inputNodeForm.noParentFieldsAvailable")
3379
- }) : a.map((e) => /* @__PURE__ */ F(h, {
3466
+ }) : a.map((e) => /* @__PURE__ */ R(h, {
3380
3467
  value: e.nodeId,
3381
3468
  children: [
3382
3469
  e.label,
@@ -3386,17 +3473,17 @@ var or = () => {
3386
3473
  ]
3387
3474
  }, e.nodeId)) })]
3388
3475
  }),
3389
- a.length === 0 && /* @__PURE__ */ P(j, { children: o("editor.inputNodeForm.addInputFieldsBeforeReference") })
3476
+ a.length === 0 && /* @__PURE__ */ L(M, { children: o("editor.inputNodeForm.addInputFieldsBeforeReference") })
3390
3477
  ] })
3391
3478
  }),
3392
- /* @__PURE__ */ P(u, {
3479
+ /* @__PURE__ */ L(u, {
3393
3480
  name: "defaultValue.transformFunction",
3394
- children: (t) => /* @__PURE__ */ F(A, { children: [
3395
- /* @__PURE__ */ P(d, {
3481
+ children: (t) => /* @__PURE__ */ R(j, { children: [
3482
+ /* @__PURE__ */ L(d, {
3396
3483
  htmlFor: t.name,
3397
3484
  children: o("editor.inputNodeForm.transformType")
3398
3485
  }),
3399
- /* @__PURE__ */ F(g, {
3486
+ /* @__PURE__ */ R(g, {
3400
3487
  value: t.state.value || "none",
3401
3488
  onValueChange: (n) => {
3402
3489
  let r = n === "none" ? null : n;
@@ -3408,80 +3495,80 @@ var or = () => {
3408
3495
  });
3409
3496
  }
3410
3497
  },
3411
- children: [/* @__PURE__ */ P(v, {
3498
+ children: [/* @__PURE__ */ L(v, {
3412
3499
  id: t.name,
3413
- children: /* @__PURE__ */ P(T, { placeholder: o("editor.inputNodeForm.selectTransformation") })
3414
- }), /* @__PURE__ */ F(C, { children: [
3415
- /* @__PURE__ */ P(h, {
3500
+ children: /* @__PURE__ */ L(T, { placeholder: o("editor.inputNodeForm.selectTransformation") })
3501
+ }), /* @__PURE__ */ R(C, { children: [
3502
+ /* @__PURE__ */ L(h, {
3416
3503
  value: "none",
3417
3504
  children: o("editor.inputNodeForm.transformNone")
3418
3505
  }),
3419
- /* @__PURE__ */ P(h, {
3506
+ /* @__PURE__ */ L(h, {
3420
3507
  value: "toString",
3421
3508
  children: o("editor.inputNodeForm.transformString")
3422
3509
  }),
3423
- /* @__PURE__ */ P(h, {
3510
+ /* @__PURE__ */ L(h, {
3424
3511
  value: "toNumber",
3425
3512
  children: o("editor.inputNodeForm.transformNumber")
3426
3513
  }),
3427
- /* @__PURE__ */ P(h, {
3514
+ /* @__PURE__ */ L(h, {
3428
3515
  value: "toBoolean",
3429
3516
  children: o("editor.inputNodeForm.transformBoolean")
3430
3517
  }),
3431
- /* @__PURE__ */ P(h, {
3518
+ /* @__PURE__ */ L(h, {
3432
3519
  value: "toArray",
3433
3520
  children: o("editor.inputNodeForm.transformArray")
3434
3521
  }),
3435
- /* @__PURE__ */ P(h, {
3522
+ /* @__PURE__ */ L(h, {
3436
3523
  value: "toObject",
3437
3524
  children: o("editor.inputNodeForm.transformMapToObject")
3438
3525
  })
3439
3526
  ] })]
3440
3527
  }),
3441
- /* @__PURE__ */ P(j, { children: o("editor.inputNodeForm.transformDesc") })
3528
+ /* @__PURE__ */ L(M, { children: o("editor.inputNodeForm.transformDesc") })
3442
3529
  ] })
3443
3530
  }),
3444
- e.state.value?.transformFunction === "toObject" && /* @__PURE__ */ P(u, {
3531
+ e.state.value?.transformFunction === "toObject" && /* @__PURE__ */ L(u, {
3445
3532
  name: "defaultValue.objectMapping",
3446
3533
  mode: "array",
3447
- children: (e) => /* @__PURE__ */ F(A, { children: [
3448
- /* @__PURE__ */ P(d, { children: o("editor.inputNodeForm.objectMapping") }),
3449
- /* @__PURE__ */ F("div", {
3534
+ children: (e) => /* @__PURE__ */ R(j, { children: [
3535
+ /* @__PURE__ */ L(d, { children: o("editor.inputNodeForm.objectMapping") }),
3536
+ /* @__PURE__ */ R("div", {
3450
3537
  className: "tg:space-y-2",
3451
- children: [e.state.value?.map((t, n) => /* @__PURE__ */ F("div", {
3538
+ children: [e.state.value?.map((t, n) => /* @__PURE__ */ R("div", {
3452
3539
  className: "tg:flex tg:items-center tg:gap-2",
3453
3540
  children: [
3454
- /* @__PURE__ */ P(u, {
3541
+ /* @__PURE__ */ L(u, {
3455
3542
  name: `defaultValue.objectMapping[${n}].sourceKey`,
3456
- children: (e) => /* @__PURE__ */ P(O, {
3543
+ children: (e) => /* @__PURE__ */ L(k, {
3457
3544
  placeholder: o("editor.inputNodeForm.sourceKey"),
3458
3545
  value: e.state.value || "",
3459
3546
  onChange: ({ target: t }) => e.handleChange(t.value)
3460
3547
  })
3461
3548
  }),
3462
- /* @__PURE__ */ P("span", {
3549
+ /* @__PURE__ */ L("span", {
3463
3550
  className: "tg:text-muted-foreground",
3464
3551
  children: "→"
3465
3552
  }),
3466
- /* @__PURE__ */ P(u, {
3553
+ /* @__PURE__ */ L(u, {
3467
3554
  name: `defaultValue.objectMapping[${n}].targetKey`,
3468
- children: (e) => /* @__PURE__ */ P(O, {
3555
+ children: (e) => /* @__PURE__ */ L(k, {
3469
3556
  placeholder: o("editor.inputNodeForm.targetKey"),
3470
3557
  value: e.state.value || "",
3471
3558
  onChange: ({ target: t }) => e.handleChange(t.value)
3472
3559
  })
3473
3560
  }),
3474
- /* @__PURE__ */ P(k, {
3561
+ /* @__PURE__ */ L(A, {
3475
3562
  type: "button",
3476
3563
  variant: "ghost",
3477
3564
  size: "icon",
3478
3565
  onClick: () => {
3479
3566
  e.removeValue(n), l().then();
3480
3567
  },
3481
- children: /* @__PURE__ */ P(L, { className: "tg:h-4 tg:w-4" })
3568
+ children: /* @__PURE__ */ L(B, { className: "tg:h-4 tg:w-4" })
3482
3569
  })
3483
3570
  ]
3484
- }, `mapping-${n}`)), /* @__PURE__ */ F(k, {
3571
+ }, `mapping-${n}`)), /* @__PURE__ */ R(A, {
3485
3572
  type: "button",
3486
3573
  variant: "outline",
3487
3574
  size: "sm",
@@ -3492,10 +3579,10 @@ var or = () => {
3492
3579
  targetKey: ""
3493
3580
  }), l().then();
3494
3581
  },
3495
- children: [/* @__PURE__ */ P(I, { className: "tg:mr-2 tg:h-4 tg:w-4" }), o("editor.inputNodeForm.addMapping")]
3582
+ children: [/* @__PURE__ */ L(z, { className: "tg:mr-2 tg:h-4 tg:w-4" }), o("editor.inputNodeForm.addMapping")]
3496
3583
  })]
3497
3584
  }),
3498
- /* @__PURE__ */ P(j, { children: o("editor.inputNodeForm.objectMappingDesc") })
3585
+ /* @__PURE__ */ L(M, { children: o("editor.inputNodeForm.objectMappingDesc") })
3499
3586
  ] })
3500
3587
  })
3501
3588
  ] })
@@ -3506,8 +3593,8 @@ var or = () => {
3506
3593
  ]
3507
3594
  })
3508
3595
  });
3509
- }, sr = () => {
3510
- let [e, t] = z("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = W(), { Field: i } = Pe({
3596
+ }, yr = () => {
3597
+ let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = G(), { Field: i } = Ve({
3511
3598
  defaultValues: { label: n?.data?.label || { en: "" } },
3512
3599
  listeners: {
3513
3600
  onChange: ({ formApi: e }) => {
@@ -3519,22 +3606,22 @@ var or = () => {
3519
3606
  r(e);
3520
3607
  }
3521
3608
  });
3522
- return /* @__PURE__ */ P("form", {
3609
+ return /* @__PURE__ */ L("form", {
3523
3610
  onSubmit: (e) => {
3524
3611
  e.preventDefault(), e.stopPropagation();
3525
3612
  },
3526
- children: /* @__PURE__ */ P("div", {
3613
+ children: /* @__PURE__ */ L("div", {
3527
3614
  className: "tg:grid tg:gap-6",
3528
- children: /* @__PURE__ */ F("div", {
3615
+ children: /* @__PURE__ */ R("div", {
3529
3616
  className: "tg:flex tg:items-end tg:gap-2",
3530
- children: [/* @__PURE__ */ P(i, {
3617
+ children: [/* @__PURE__ */ L(i, {
3531
3618
  name: "label",
3532
- children: (t) => /* @__PURE__ */ F(A, {
3619
+ children: (t) => /* @__PURE__ */ R(j, {
3533
3620
  className: "tg:flex-1",
3534
- children: [/* @__PURE__ */ P(d, {
3621
+ children: [/* @__PURE__ */ L(d, {
3535
3622
  htmlFor: t.name,
3536
3623
  children: "Label"
3537
- }), /* @__PURE__ */ P(O, {
3624
+ }), /* @__PURE__ */ L(k, {
3538
3625
  id: t.name,
3539
3626
  name: t.name,
3540
3627
  value: t.state.value?.[e] || "",
@@ -3547,15 +3634,15 @@ var or = () => {
3547
3634
  }
3548
3635
  })]
3549
3636
  })
3550
- }), /* @__PURE__ */ P(Q, {
3637
+ }), /* @__PURE__ */ L(Q, {
3551
3638
  value: e,
3552
3639
  onValueChange: t
3553
3640
  })]
3554
3641
  })
3555
3642
  })
3556
3643
  });
3557
- }, cr = () => {
3558
- let [e, t] = z(""), [r, i] = z(!1), { selectedNode: a, groupNodes: o } = $(), { setNodes: s } = M(), c = a?.parentId || "none", l = n(a), u = U(), f = Ot(), p = Ot();
3644
+ }, br = () => {
3645
+ let [e, t] = F(""), [r, i] = F(!1), { selectedNode: a, groupNodes: o } = $(), { setNodes: s } = N(), c = a?.parentId || "none", l = n(a), u = W(), f = Re(), p = Re();
3559
3646
  if (l) return null;
3560
3647
  let m = (e) => {
3561
3648
  a && s((t) => e === "none" ? t.map((e) => {
@@ -3579,10 +3666,10 @@ var or = () => {
3579
3666
  let n = t.data?.label?.en || t.data?.label;
3580
3667
  return String(n).toLowerCase() === e.trim().toLowerCase();
3581
3668
  })) {
3582
- V.error("This group already exists", { description: "Use the selector to add the node to an existing group." });
3669
+ H.error("This group already exists", { description: "Use the selector to add the node to an existing group." });
3583
3670
  return;
3584
3671
  }
3585
- let n = Zt();
3672
+ let n = Qt();
3586
3673
  s((t) => [{
3587
3674
  data: { label: { en: e.trim() } },
3588
3675
  id: n,
@@ -3603,63 +3690,63 @@ var or = () => {
3603
3690
  x: 175,
3604
3691
  y: 30
3605
3692
  }
3606
- } : e)]), t(""), i(!1), V.success("Group created", { description: `The group "${e.trim()}" has been created successfully.` });
3693
+ } : e)]), t(""), i(!1), H.success("Group created", { description: `The group "${e.trim()}" has been created successfully.` });
3607
3694
  };
3608
- return /* @__PURE__ */ F("div", {
3695
+ return /* @__PURE__ */ R("div", {
3609
3696
  className: "tg:space-y-2",
3610
- children: [/* @__PURE__ */ P(d, {
3697
+ children: [/* @__PURE__ */ L(d, {
3611
3698
  htmlFor: f,
3612
3699
  children: u("editor.selectNodeGroup.group")
3613
- }), /* @__PURE__ */ F("div", {
3700
+ }), /* @__PURE__ */ R("div", {
3614
3701
  className: "tg:flex tg:gap-2",
3615
- children: [/* @__PURE__ */ F(g, {
3702
+ children: [/* @__PURE__ */ R(g, {
3616
3703
  value: c,
3617
3704
  onValueChange: m,
3618
- children: [/* @__PURE__ */ P(v, {
3705
+ children: [/* @__PURE__ */ L(v, {
3619
3706
  id: f,
3620
3707
  className: "tg:flex-1",
3621
- children: /* @__PURE__ */ P(T, { placeholder: u("editor.selectNodeGroup.noGroup") })
3622
- }), /* @__PURE__ */ P(C, { children: /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(h, {
3708
+ children: /* @__PURE__ */ L(T, { placeholder: u("editor.selectNodeGroup.noGroup") })
3709
+ }), /* @__PURE__ */ L(C, { children: /* @__PURE__ */ R(w, { children: [/* @__PURE__ */ L(h, {
3623
3710
  value: "none",
3624
3711
  children: u("editor.selectNodeGroup.noGroup")
3625
- }), o.map((e) => /* @__PURE__ */ P(h, {
3712
+ }), o.map((e) => /* @__PURE__ */ L(h, {
3626
3713
  value: e.id,
3627
3714
  children: e.data.label?.en ? String(e.data.label?.en) : e.id
3628
3715
  }, e.id))] }) })]
3629
- }), /* @__PURE__ */ F(ie, {
3716
+ }), /* @__PURE__ */ R(ie, {
3630
3717
  open: r,
3631
3718
  onOpenChange: i,
3632
- children: [/* @__PURE__ */ P(ne, {
3719
+ children: [/* @__PURE__ */ L(ne, {
3633
3720
  asChild: !0,
3634
- children: /* @__PURE__ */ P(k, {
3721
+ children: /* @__PURE__ */ L(A, {
3635
3722
  variant: "outline",
3636
3723
  size: "icon",
3637
3724
  title: "Create a new group",
3638
- children: /* @__PURE__ */ P(dt, { className: "tg:h-4 tg:w-4" })
3725
+ children: /* @__PURE__ */ L(yt, { className: "tg:h-4 tg:w-4" })
3639
3726
  })
3640
- }), /* @__PURE__ */ P(ae, {
3727
+ }), /* @__PURE__ */ L(ae, {
3641
3728
  className: "tg:w-80",
3642
3729
  align: "end",
3643
3730
  disablePortal: !0,
3644
- children: /* @__PURE__ */ F("div", {
3731
+ children: /* @__PURE__ */ R("div", {
3645
3732
  className: "tg:space-y-4",
3646
3733
  children: [
3647
- /* @__PURE__ */ F("div", {
3734
+ /* @__PURE__ */ R("div", {
3648
3735
  className: "tg:space-y-2",
3649
- children: [/* @__PURE__ */ P("h4", {
3736
+ children: [/* @__PURE__ */ L("h4", {
3650
3737
  className: "tg:font-medium tg:leading-none",
3651
3738
  children: u("editor.selectNodeGroup.newGroup")
3652
- }), /* @__PURE__ */ P("p", {
3739
+ }), /* @__PURE__ */ L("p", {
3653
3740
  className: "tg:text-muted-foreground tg:text-sm",
3654
3741
  children: u("editor.selectNodeGroup.newGroupDescription")
3655
3742
  })]
3656
3743
  }),
3657
- /* @__PURE__ */ F("div", {
3744
+ /* @__PURE__ */ R("div", {
3658
3745
  className: "tg:space-y-2",
3659
- children: [/* @__PURE__ */ P(d, {
3746
+ children: [/* @__PURE__ */ L(d, {
3660
3747
  htmlFor: p,
3661
3748
  children: u("editor.selectNodeGroup.groupName")
3662
- }), /* @__PURE__ */ P(O, {
3749
+ }), /* @__PURE__ */ L(k, {
3663
3750
  autoFocus: !0,
3664
3751
  id: p,
3665
3752
  value: e,
@@ -3670,14 +3757,14 @@ var or = () => {
3670
3757
  }
3671
3758
  })]
3672
3759
  }),
3673
- /* @__PURE__ */ F("div", {
3760
+ /* @__PURE__ */ R("div", {
3674
3761
  className: "tg:flex tg:justify-end tg:gap-2",
3675
- children: [/* @__PURE__ */ P(k, {
3762
+ children: [/* @__PURE__ */ L(A, {
3676
3763
  variant: "outline",
3677
3764
  size: "sm",
3678
3765
  onClick: () => i(!1),
3679
3766
  children: "Cancel"
3680
- }), /* @__PURE__ */ P(k, {
3767
+ }), /* @__PURE__ */ L(A, {
3681
3768
  size: "sm",
3682
3769
  onClick: _,
3683
3770
  disabled: !e.trim(),
@@ -3690,8 +3777,8 @@ var or = () => {
3690
3777
  })]
3691
3778
  })]
3692
3779
  });
3693
- }, lr = Object.values(X), ur = Object.values(ln), dr = () => {
3694
- let { selectedNode: e } = $(), { updateSelectedNodeType: t } = W(), { getEdges: a } = M(), { openNodeTypeChangeConfirmation: o } = H(), s = n(e), c = U(), u = Ot(), d = Z(l.flow), f = () => e ? r(e) || i(e) ? e.data?.type || "" : e.type || "" : "", p = (n, r) => {
3780
+ }, xr = Object.values(X), Sr = Object.values(dn), Cr = () => {
3781
+ let { selectedNode: e } = $(), { updateSelectedNodeType: t } = G(), { getEdges: a } = N(), { openNodeTypeChangeConfirmation: o } = U(), s = n(e), c = W(), u = Re(), d = Z(l.flow), f = () => e ? r(e) || i(e) ? e.data?.type || "" : e.type || "" : "", p = (n, r) => {
3695
3782
  if (!e) return;
3696
3783
  let i = a().filter((t) => t.source === e.id).length;
3697
3784
  if ((n === l.ui || n === l.flow) && i > 1) {
@@ -3704,48 +3791,48 @@ var or = () => {
3704
3791
  }
3705
3792
  t(n, r);
3706
3793
  };
3707
- return /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(y, {
3794
+ return /* @__PURE__ */ R(w, { children: [/* @__PURE__ */ L(y, {
3708
3795
  htmlFor: u,
3709
3796
  children: c("editor.selectNodeType.nodeType")
3710
- }), /* @__PURE__ */ F(g, {
3797
+ }), /* @__PURE__ */ R(g, {
3711
3798
  value: f(),
3712
3799
  onValueChange: (e) => {
3713
- if (lr.includes(e)) {
3800
+ if (xr.includes(e)) {
3714
3801
  p(l.input, e);
3715
3802
  return;
3716
3803
  }
3717
- if (ur.includes(e)) {
3804
+ if (Sr.includes(e)) {
3718
3805
  p(l.ui, e);
3719
3806
  return;
3720
3807
  }
3721
3808
  p(e);
3722
3809
  },
3723
3810
  disabled: s,
3724
- children: [/* @__PURE__ */ P(v, {
3811
+ children: [/* @__PURE__ */ L(v, {
3725
3812
  className: "tg:w-full tg:capitalize",
3726
3813
  id: u,
3727
- children: /* @__PURE__ */ P(T, { placeholder: c("editor.selectNodeType.nodeType") })
3728
- }), /* @__PURE__ */ P(C, {
3814
+ children: /* @__PURE__ */ L(T, { placeholder: c("editor.selectNodeType.nodeType") })
3815
+ }), /* @__PURE__ */ L(C, {
3729
3816
  className: "treege-scrollbar tg:max-h-80",
3730
- children: s ? /* @__PURE__ */ P(w, { children: /* @__PURE__ */ P(h, {
3817
+ children: s ? /* @__PURE__ */ L(w, { children: /* @__PURE__ */ L(h, {
3731
3818
  value: l.group,
3732
3819
  children: c("editor.selectNodeType.options.group")
3733
- }) }) : /* @__PURE__ */ F(N, { children: [
3734
- /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(y, { children: c("editor.selectNodeType.options.input") }), lr.map((e) => /* @__PURE__ */ F(h, {
3820
+ }) }) : /* @__PURE__ */ R(I, { children: [
3821
+ /* @__PURE__ */ R(w, { children: [/* @__PURE__ */ L(y, { children: c("editor.selectNodeType.options.input") }), xr.map((e) => /* @__PURE__ */ R(h, {
3735
3822
  value: e,
3736
3823
  className: "tg:capitalize",
3737
- children: [/* @__PURE__ */ P(Z(e), {}), e]
3824
+ children: [/* @__PURE__ */ L(Z(e), {}), e]
3738
3825
  }, e))] }),
3739
- /* @__PURE__ */ P(de, {}),
3740
- /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(y, { children: c("editor.selectNodeType.options.ui") }), ur.map((e) => /* @__PURE__ */ F(h, {
3826
+ /* @__PURE__ */ L(ue, {}),
3827
+ /* @__PURE__ */ R(w, { children: [/* @__PURE__ */ L(y, { children: c("editor.selectNodeType.options.ui") }), Sr.map((e) => /* @__PURE__ */ R(h, {
3741
3828
  value: e,
3742
3829
  className: "tg:capitalize",
3743
- children: [/* @__PURE__ */ P(Z(e), {}), e]
3830
+ children: [/* @__PURE__ */ L(Z(e), {}), e]
3744
3831
  }, e))] }),
3745
- /* @__PURE__ */ P(de, {}),
3746
- /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(y, { children: c("common.other") }), /* @__PURE__ */ F(h, {
3832
+ /* @__PURE__ */ L(ue, {}),
3833
+ /* @__PURE__ */ R(w, { children: [/* @__PURE__ */ L(y, { children: c("common.other") }), /* @__PURE__ */ R(h, {
3747
3834
  value: l.flow,
3748
- children: [/* @__PURE__ */ P(d, {}), c("editor.selectNodeType.options.flow")]
3835
+ children: [/* @__PURE__ */ L(d, {}), c("editor.selectNodeType.options.flow")]
3749
3836
  })] })
3750
3837
  ] })
3751
3838
  })]
@@ -3753,191 +3840,122 @@ var or = () => {
3753
3840
  };
3754
3841
  //#endregion
3755
3842
  //#region src/shared/components/ui/sheet.tsx
3756
- function fr({ ...e }) {
3757
- return /* @__PURE__ */ P(Pt.Root, {
3843
+ function wr({ ...e }) {
3844
+ return /* @__PURE__ */ L(Ft.Root, {
3758
3845
  "data-slot": "sheet",
3759
3846
  ...e
3760
3847
  });
3761
3848
  }
3762
- function pr({ ...e }) {
3763
- return /* @__PURE__ */ P(Pt.Portal, {
3849
+ function Tr({ ...e }) {
3850
+ return /* @__PURE__ */ L(Ft.Portal, {
3764
3851
  "data-slot": "sheet-portal",
3765
3852
  ...e
3766
3853
  });
3767
3854
  }
3768
- function mr({ className: e, ...t }) {
3769
- return /* @__PURE__ */ P(Pt.Overlay, {
3855
+ function Er({ className: e, ...t }) {
3856
+ return /* @__PURE__ */ L(Ft.Overlay, {
3770
3857
  "data-slot": "sheet-overlay",
3771
- className: E("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:fixed tg:inset-0 tg:z-50 tg:bg-black/50 tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", e),
3858
+ className: D("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:fixed tg:inset-0 tg:z-50 tg:bg-black/50 tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", e),
3772
3859
  ...t
3773
3860
  });
3774
3861
  }
3775
- function hr({ className: e, children: t, side: n = "right", ...r }) {
3776
- return /* @__PURE__ */ F(pr, { children: [/* @__PURE__ */ P(mr, {}), /* @__PURE__ */ F(Pt.Content, {
3862
+ function Dr({ className: e, children: t, side: n = "right", ...r }) {
3863
+ return /* @__PURE__ */ R(Tr, { children: [/* @__PURE__ */ L(Er, {}), /* @__PURE__ */ R(Ft.Content, {
3777
3864
  "data-slot": "sheet-content",
3778
- className: E("tg:fixed tg:z-50 tg:flex tg:flex-col tg:gap-4 tg:bg-background tg:shadow-lg tg:transition tg:ease-in-out tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in tg:data-[state=closed]:duration-300 tg:data-[state=open]:duration-500", n === "right" && "tg:data-[state=closed]:slide-out-to-right tg:data-[state=open]:slide-in-from-right tg:inset-y-0 tg:right-0 tg:h-full tg:w-3/4 tg:border-l tg:sm:max-w-sm", n === "left" && "tg:data-[state=closed]:slide-out-to-left tg:data-[state=open]:slide-in-from-left tg:inset-y-0 tg:left-0 tg:h-full tg:w-3/4 tg:border-r tg:sm:max-w-sm", n === "top" && "tg:data-[state=closed]:slide-out-to-top tg:data-[state=open]:slide-in-from-top tg:inset-x-0 tg:top-0 tg:h-auto tg:border-b", n === "bottom" && "tg:data-[state=closed]:slide-out-to-bottom tg:data-[state=open]:slide-in-from-bottom tg:inset-x-0 tg:bottom-0 tg:h-auto tg:border-t", e),
3865
+ className: D("tg:fixed tg:z-50 tg:flex tg:flex-col tg:gap-4 tg:bg-background tg:shadow-lg tg:transition tg:ease-in-out tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in tg:data-[state=closed]:duration-300 tg:data-[state=open]:duration-500", n === "right" && "tg:data-[state=closed]:slide-out-to-right tg:data-[state=open]:slide-in-from-right tg:inset-y-0 tg:right-0 tg:h-full tg:w-3/4 tg:border-l tg:sm:max-w-sm", n === "left" && "tg:data-[state=closed]:slide-out-to-left tg:data-[state=open]:slide-in-from-left tg:inset-y-0 tg:left-0 tg:h-full tg:w-3/4 tg:border-r tg:sm:max-w-sm", n === "top" && "tg:data-[state=closed]:slide-out-to-top tg:data-[state=open]:slide-in-from-top tg:inset-x-0 tg:top-0 tg:h-auto tg:border-b", n === "bottom" && "tg:data-[state=closed]:slide-out-to-bottom tg:data-[state=open]:slide-in-from-bottom tg:inset-x-0 tg:bottom-0 tg:h-auto tg:border-t", e),
3779
3866
  ...r,
3780
- children: [t, /* @__PURE__ */ F(Pt.Close, {
3867
+ children: [t, /* @__PURE__ */ R(Ft.Close, {
3781
3868
  className: "tg:absolute tg:top-4 tg:right-4 tg:rounded-xs tg:opacity-70 tg:ring-offset-background tg:transition-opacity tg:hover:opacity-100 tg:focus:outline-hidden tg:focus:ring-2 tg:focus:ring-ring tg:focus:ring-offset-2 tg:disabled:pointer-events-none tg:data-[state=open]:bg-secondary",
3782
- children: [/* @__PURE__ */ P(Ct, { className: "tg:size-4" }), /* @__PURE__ */ P("span", {
3869
+ children: [/* @__PURE__ */ L(jt, { className: "tg:size-4" }), /* @__PURE__ */ L("span", {
3783
3870
  className: "tg:sr-only",
3784
3871
  children: "Close"
3785
3872
  })]
3786
3873
  })]
3787
3874
  })] });
3788
3875
  }
3789
- function gr({ className: e, ...t }) {
3790
- return /* @__PURE__ */ P("div", {
3876
+ function Or({ className: e, ...t }) {
3877
+ return /* @__PURE__ */ L("div", {
3791
3878
  "data-slot": "sheet-header",
3792
- className: E("tg:flex tg:flex-col tg:gap-1.5 tg:p-4", e),
3879
+ className: D("tg:flex tg:flex-col tg:gap-1.5 tg:p-4", e),
3793
3880
  ...t
3794
3881
  });
3795
3882
  }
3796
- function _r({ className: e, ...t }) {
3797
- return /* @__PURE__ */ P("div", {
3883
+ function kr({ className: e, ...t }) {
3884
+ return /* @__PURE__ */ L("div", {
3798
3885
  "data-slot": "sheet-footer",
3799
- className: E("tg:mt-auto tg:flex tg:flex-col tg:gap-2 tg:p-4", e),
3886
+ className: D("tg:mt-auto tg:flex tg:flex-col tg:gap-2 tg:p-4", e),
3800
3887
  ...t
3801
3888
  });
3802
3889
  }
3803
- function vr({ className: e, ...t }) {
3804
- return /* @__PURE__ */ P(Pt.Title, {
3890
+ function Ar({ className: e, ...t }) {
3891
+ return /* @__PURE__ */ L(Ft.Title, {
3805
3892
  "data-slot": "sheet-title",
3806
- className: E("tg:font-semibold tg:text-foreground", e),
3893
+ className: D("tg:font-semibold tg:text-foreground", e),
3807
3894
  ...t
3808
3895
  });
3809
3896
  }
3810
- function yr({ className: e, ...t }) {
3811
- return /* @__PURE__ */ P(Pt.Description, {
3897
+ function jr({ className: e, ...t }) {
3898
+ return /* @__PURE__ */ L(Ft.Description, {
3812
3899
  "data-slot": "sheet-description",
3813
- className: E("tg:text-muted-foreground tg:text-sm", e),
3900
+ className: D("tg:text-muted-foreground tg:text-sm", e),
3814
3901
  ...t
3815
3902
  });
3816
3903
  }
3817
3904
  //#endregion
3818
3905
  //#region src/editor/features/TreegeEditor/sheets/NodeActionsSheet.tsx
3819
- var br = () => {
3820
- let { selectedNode: e } = $(), { clearSelection: t } = W(), { isNodeSheetOpen: a, setIsNodeSheetOpen: s, openDeleteNodeConfirmation: c } = H(), l = U(), u = l(e?.data?.label), d = () => {
3906
+ var Mr = () => {
3907
+ let { selectedNode: e } = $(), { clearSelection: t } = G(), { isNodeSheetOpen: a, setIsNodeSheetOpen: s, openDeleteNodeConfirmation: c } = U(), l = W(), u = l(e?.data?.label), d = () => {
3821
3908
  s(!1), t();
3822
3909
  };
3823
- return /* @__PURE__ */ P(fr, {
3910
+ return /* @__PURE__ */ L(wr, {
3824
3911
  open: a && !!e,
3825
3912
  onOpenChange: (e) => {
3826
3913
  e || d();
3827
3914
  },
3828
- children: /* @__PURE__ */ F(hr, {
3915
+ children: /* @__PURE__ */ R(Dr, {
3829
3916
  className: "tg:flex tg:flex-col tg:gap-0",
3830
3917
  children: [
3831
- /* @__PURE__ */ F(gr, { children: [/* @__PURE__ */ F(vr, { children: [
3918
+ /* @__PURE__ */ R(Or, { children: [/* @__PURE__ */ R(Ar, { children: [
3832
3919
  l("editor.nodeActionsSheet.editNode"),
3833
3920
  " ",
3834
- /* @__PURE__ */ P("span", {
3921
+ /* @__PURE__ */ L("span", {
3835
3922
  className: "tg:font-light tg:text-muted-foreground tg:text-xs",
3836
3923
  children: e?.id
3837
3924
  })
3838
- ] }), /* @__PURE__ */ P(yr, { children: u || "\xA0" })] }),
3839
- /* @__PURE__ */ P(Gt, {
3925
+ ] }), /* @__PURE__ */ L(jr, { children: u || "\xA0" })] }),
3926
+ /* @__PURE__ */ L(Kt, {
3840
3927
  className: "tg:flex tg:min-h-0 tg:flex-1 tg:flex-col tg:px-4",
3841
- children: /* @__PURE__ */ F("div", {
3928
+ children: /* @__PURE__ */ R("div", {
3842
3929
  className: "tg:space-y-6 tg:py-4",
3843
3930
  children: [
3844
- /* @__PURE__ */ P(dr, {}),
3845
- /* @__PURE__ */ P(cr, {}),
3846
- /* @__PURE__ */ P(ue, {}),
3847
- r(e) && /* @__PURE__ */ P(or, {}),
3848
- i(e) && /* @__PURE__ */ P(sr, {}),
3849
- o(e) && /* @__PURE__ */ P(Vn, {}),
3850
- n(e) && /* @__PURE__ */ P(Hn, {})
3931
+ /* @__PURE__ */ L(Cr, {}),
3932
+ /* @__PURE__ */ L(br, {}),
3933
+ /* @__PURE__ */ L(le, {}),
3934
+ r(e) && /* @__PURE__ */ L(vr, {}),
3935
+ i(e) && /* @__PURE__ */ L(yr, {}),
3936
+ o(e) && /* @__PURE__ */ L($n, {}),
3937
+ n(e) && /* @__PURE__ */ L(er, {})
3851
3938
  ]
3852
3939
  })
3853
3940
  }),
3854
- /* @__PURE__ */ P(_r, {
3941
+ /* @__PURE__ */ L(kr, {
3855
3942
  className: "tg:flex tg:items-end tg:border-t",
3856
- children: /* @__PURE__ */ P(k, {
3943
+ children: /* @__PURE__ */ L(A, {
3857
3944
  variant: "ghost",
3858
3945
  size: "icon",
3859
3946
  onClick: () => {
3860
3947
  e && c(e.id);
3861
3948
  },
3862
3949
  "aria-label": l("editor.nodeActionsSheet.deleteNode"),
3863
- children: /* @__PURE__ */ P(vt, {})
3950
+ children: /* @__PURE__ */ L(Et, {})
3864
3951
  })
3865
3952
  })
3866
3953
  ]
3867
3954
  })
3868
3955
  });
3869
- }, xr = 200, Sr = 100, Cr = (e) => !!(e.measured?.width && e.measured?.height), wr = (e, t, n) => {
3870
- let r = n === "TB" ? "y" : "x";
3871
- return e.reduce((e, n) => t.node(n.id)[r] < t.node(e.id)[r] ? n : e, e[0]);
3872
- }, Tr = (e, t, n) => {
3873
- let r = new Lt.graphlib.Graph().setDefaultEdgeLabel(() => ({}));
3874
- r.setGraph({
3875
- nodesep: n.horizontalSpacing,
3876
- rankdir: n.direction,
3877
- ranksep: n.verticalSpacing
3878
- });
3879
- let i = /* @__PURE__ */ new Set();
3880
- e.forEach((e) => {
3881
- i.add(e.id), r.setNode(e.id, {
3882
- height: e.measured?.height ?? Sr,
3883
- width: e.measured?.width ?? xr
3884
- });
3885
- }), t.forEach((e) => {
3886
- i.has(e.source) && i.has(e.target) && r.setEdge(e.source, e.target);
3887
- }), Lt.layout(r);
3888
- let a = wr(e, r, n.direction), o = a.measured?.width ?? xr, s = a.measured?.height ?? Sr, c = r.node(a.id), l = a.position.x - (c.x - o / 2), u = a.position.y - (c.y - s / 2), d = /* @__PURE__ */ new Map();
3889
- return e.forEach((e) => {
3890
- let { x: t, y: n } = r.node(e.id), i = e.measured?.width ?? xr, a = e.measured?.height ?? Sr;
3891
- d.set(e.id, {
3892
- x: t - i / 2 + l,
3893
- y: n - a / 2 + u
3894
- });
3895
- }), d;
3896
- }, Er = (e) => {
3897
- let t = /* @__PURE__ */ new Map();
3898
- return e.forEach((e) => {
3899
- let n = t.get(e.parentId) ?? [];
3900
- n.push(e), t.set(e.parentId, n);
3901
- }), t;
3902
- }, Dr = (e, t, n = {}) => {
3903
- let r = {
3904
- direction: n.direction ?? "TB",
3905
- horizontalSpacing: n.horizontalSpacing ?? 60,
3906
- verticalSpacing: n.verticalSpacing ?? 80
3907
- }, i = /* @__PURE__ */ new Map();
3908
- return Er(e).forEach((e) => {
3909
- let n = e.filter(Cr);
3910
- n.length !== 0 && Tr(n, t, r).forEach((e, t) => {
3911
- i.set(t, e);
3912
- });
3913
- }), e.map((e) => {
3914
- let t = i.get(e.id);
3915
- return t ? {
3916
- ...e,
3917
- position: t
3918
- } : e;
3919
- });
3920
- }, Or = (e) => Array.from(e.nodeLookup.values()).map((e) => `${e.id}:${e.measured?.width ?? 0}x${e.measured?.height ?? 0}`).join("|"), kr = ({ direction: e, horizontalSpacing: t, verticalSpacing: n } = {}) => {
3921
- let { getNodes: r, getEdges: i, setNodes: a } = M(), o = Me(), s = Ne(Or);
3922
- Dt(() => {
3923
- o && s && a(Dr(r(), i(), {
3924
- direction: e,
3925
- horizontalSpacing: t,
3926
- verticalSpacing: n
3927
- }));
3928
- }, [
3929
- o,
3930
- s,
3931
- e,
3932
- t,
3933
- n,
3934
- r,
3935
- i,
3936
- a
3937
- ]);
3938
- }, Ar = ({ ...e }) => {
3939
- let { theme: t = "system" } = Rt();
3940
- return /* @__PURE__ */ P(Ft, {
3956
+ }, Nr = ({ ...e }) => {
3957
+ let { theme: t = "system" } = zt();
3958
+ return /* @__PURE__ */ L(Lt, {
3941
3959
  theme: t,
3942
3960
  className: "toaster tg:group",
3943
3961
  style: {
@@ -3947,55 +3965,73 @@ var br = () => {
3947
3965
  },
3948
3966
  ...e
3949
3967
  });
3950
- }, jr = ({ flow: e, onExportJson: t, onSave: n, theme: r, className: i }) => {
3951
- let { onConnect: a, onConnectEnd: o, onEdgesDelete: s, isValidConnection: c } = cn();
3952
- return kr(), /* @__PURE__ */ F(Ee, {
3968
+ }, Pr = {
3969
+ desktop: "(min-width: 1024px)",
3970
+ mobile: "(max-width: 767px)",
3971
+ tablet: "(min-width: 768px) and (max-width: 1023px)"
3972
+ }, Fr = (e) => e in Pr, Ir = (e) => {
3973
+ let [t, n] = F(void 0), r = Fr(e) ? Pr[e] : e;
3974
+ return Le(() => {
3975
+ let e = window.matchMedia(r), t = () => n(e.matches);
3976
+ return e.addEventListener("change", t), n(e.matches), () => e.removeEventListener("change", t);
3977
+ }, [r]), !!t;
3978
+ }, Lr = ({ flow: e, onExportJson: t, onSave: n, theme: r, className: i, extraMenuItems: a }) => {
3979
+ let { onConnect: o, onConnectEnd: s, onEdgesDelete: c, isValidConnection: l } = un(), [u, d] = F(!1);
3980
+ return /* @__PURE__ */ R(Ee, {
3953
3981
  fitView: !0,
3982
+ minZoom: .1,
3983
+ fitViewOptions: { maxZoom: Ir("mobile") ? .6 : 1 },
3954
3984
  colorMode: r,
3955
3985
  selectNodesOnDrag: !1,
3956
- nodeTypes: Cn,
3957
- edgeTypes: Yt,
3986
+ nodeTypes: Tn,
3987
+ edgeTypes: Xt,
3958
3988
  defaultEdges: e?.edges || [],
3959
3989
  defaultNodes: e?.nodes || [],
3960
- onConnect: a,
3961
- onConnectEnd: o,
3962
- onEdgesDelete: s,
3963
- isValidConnection: c,
3964
- className: E(i, "treege"),
3990
+ onConnect: o,
3991
+ onConnectEnd: s,
3992
+ onEdgesDelete: c,
3993
+ isValidConnection: l,
3994
+ className: D(i, "treege"),
3965
3995
  children: [
3966
- /* @__PURE__ */ P(ge, {
3996
+ /* @__PURE__ */ L(zn, {}),
3997
+ /* @__PURE__ */ L(he, {
3967
3998
  gap: 10,
3968
- variant: _e.Dots
3999
+ variant: ge.Dots
3969
4000
  }),
3970
- /* @__PURE__ */ P(zn, {
4001
+ /* @__PURE__ */ L(Zn, {
3971
4002
  onExportJson: t,
3972
- onSave: n
4003
+ onSave: n,
4004
+ extraMenuItems: a
3973
4005
  }),
3974
- /* @__PURE__ */ P(Vt, { theme: r }),
3975
- /* @__PURE__ */ P(Se, {}),
3976
- /* @__PURE__ */ P(ye, {}),
3977
- /* @__PURE__ */ P(br, {}),
3978
- /* @__PURE__ */ P(Dn, {}),
3979
- /* @__PURE__ */ P(En, {})
4006
+ /* @__PURE__ */ L(Ht, { theme: r }),
4007
+ u && /* @__PURE__ */ L(Se, {}),
4008
+ /* @__PURE__ */ L(ye, { children: /* @__PURE__ */ L(En, {
4009
+ show: u,
4010
+ onToggle: () => d((e) => !e)
4011
+ }) }),
4012
+ /* @__PURE__ */ L(Mr, {}),
4013
+ /* @__PURE__ */ L(An, {}),
4014
+ /* @__PURE__ */ L(kn, {})
3980
4015
  ]
3981
4016
  });
3982
- }, Mr = ({ flow: e, onExportJson: t, onSave: n, theme: r = "dark", language: i = "en", aiConfig: a }) => /* @__PURE__ */ P(u, {
4017
+ }, Rr = ({ flow: e, onExportJson: t, onSave: n, theme: r = "dark", language: i = "en", aiConfig: a, extraMenuItems: o }) => /* @__PURE__ */ L(u, {
3983
4018
  defaultTheme: r,
3984
4019
  storageKey: "treege-editor-theme",
3985
4020
  theme: r,
3986
- children: /* @__PURE__ */ F(Wt, {
4021
+ children: /* @__PURE__ */ R(Gt, {
3987
4022
  value: {
3988
4023
  aiConfig: a,
3989
4024
  flowId: e?.id,
3990
4025
  language: i
3991
4026
  },
3992
- children: [/* @__PURE__ */ P(Ar, { position: "bottom-center" }), /* @__PURE__ */ P(De, { children: /* @__PURE__ */ P(jr, {
4027
+ children: [/* @__PURE__ */ L(Nr, { position: "bottom-center" }), /* @__PURE__ */ L(De, { children: /* @__PURE__ */ L(Lr, {
3993
4028
  onExportJson: t,
3994
4029
  onSave: n,
3995
4030
  flow: e,
3996
- theme: r
4031
+ theme: r,
4032
+ extraMenuItems: o
3997
4033
  }) })]
3998
4034
  })
3999
4035
  });
4000
4036
  //#endregion
4001
- export { Mr as t };
4037
+ export { Rr as t };