treege 3.0.0-beta.34 → 3.0.0-beta.36

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,29 @@
1
1
  import { a as e, c as t, d as n, i as r, l as i, r as a, t as o, u as s } from "./ThemeContext-DBFles56.js";
2
- import { C as c, D as l, E as u, F as d, M as f, N as p, O as m, P as h, S as g, T as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as ee, i as te, j as T, k as E, l as ne, m as re, n as ie, o as D, p as ae, r as oe, s as O, t as se, u as ce, v as k, w as le, x as ue, y as A } from "./separator-Cdfv5nIR.js";
3
- import { Background as de, BackgroundVariant as fe, BaseEdge as pe, Controls as me, EdgeLabelRenderer as he, Handle as ge, MiniMap as _e, NodeResizer as ve, Panel as ye, Position as be, ReactFlow as xe, ReactFlowProvider as Se, addEdge as Ce, getBezierPath as we, useEdges as Te, useNodes as Ee, useReactFlow as j } from "@xyflow/react";
4
- import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
5
- import { useForm as F } from "@tanstack/react-form";
6
- import { AlignLeft as De, ArrowRightFromLine as Oe, Boxes as ke, Calendar as Ae, CalendarRange as je, CaseSensitive as Me, Check as Ne, CheckSquare as Pe, ChevronDown as Fe, ChevronsUpDown as Ie, CircleDot as Le, Clock as Re, Cloud as ze, Copy as Be, Download as Ve, EllipsisVertical as He, EyeOff as Ue, Hash as We, Heading as Ge, ImagePlus as Ke, KeyRound as qe, Link2 as Je, ListFilter as Ye, Loader2 as Xe, MapPin as Ze, Minus as Qe, MoreVertical as $e, Paperclip as et, Plus as I, PlusCircle as tt, RectangleEllipsis as nt, Save as rt, Search as it, Send as at, Settings as ot, ToggleLeft as st, Trash2 as ct, Upload as lt, Variable as ut, WandSparkles as dt, Waypoints as ft, X as L, XIcon as pt } from "lucide-react";
7
- import { createContext as mt, memo as ht, useCallback as R, useContext as gt, useEffect as _t, useId as vt, useMemo as yt, useRef as bt, useState as z } from "react";
8
- import { Slot as xt } from "@radix-ui/react-slot";
9
- import { cva as St } from "class-variance-authority";
10
- import * as Ct from "@radix-ui/react-scroll-area";
11
- import * as B from "@radix-ui/react-dropdown-menu";
12
- import * as V from "@radix-ui/react-alert-dialog";
13
- import { Toaster as wt, toast as H } from "sonner";
14
- import * as U from "@radix-ui/react-dialog";
15
- import * as Tt from "@radix-ui/react-collapsible";
16
- import { useTheme as Et } from "next-themes";
2
+ import { C as c, D as l, E as u, F as d, M as f, N as p, O as m, S as h, T as ee, _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as C, i as te, j as w, k as T, l as ne, m as re, n as E, o as D, p as O, r as ie, s as ae, t as k, u as oe, v as A, w as se, x as ce, y as j } from "./separator-Cdfv5nIR.js";
3
+ import { Background as le, BackgroundVariant as ue, BaseEdge as de, Controls as fe, EdgeLabelRenderer as pe, Handle as me, MiniMap as he, NodeResizer as ge, Panel as _e, Position as ve, ReactFlow as ye, ReactFlowProvider as be, addEdge as xe, getBezierPath as Se, useEdges as Ce, useNodes as we, useReactFlow as M } from "@xyflow/react";
4
+ import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
5
+ import { useForm as I } from "@tanstack/react-form";
6
+ import { AlignLeft as Te, ArrowRightFromLine as Ee, Boxes as De, Calendar as Oe, CalendarRange as ke, CaseSensitive as Ae, Check as je, CheckSquare as Me, ChevronDown as Ne, ChevronsUpDown as Pe, CircleDot as Fe, Clock as Ie, Cloud as Le, Copy as Re, Download as ze, EllipsisVertical as Be, EyeOff as Ve, Hash as He, Heading as Ue, ImagePlus as We, KeyRound as Ge, Link2 as Ke, ListFilter as qe, Loader2 as Je, MapPin as Ye, Minus as Xe, MoreVertical as Ze, Paperclip as Qe, Plus as L, PlusCircle as $e, RectangleEllipsis as et, Save as tt, Search as nt, Send as rt, Settings as it, ToggleLeft as at, Trash2 as ot, Upload as st, Variable as ct, WandSparkles as lt, Waypoints as ut, X as R, XIcon as dt } from "lucide-react";
7
+ import { createContext as ft, memo as pt, useCallback as z, useContext as mt, useEffect as ht, useId as gt, useMemo as _t, useRef as vt, useState as B } from "react";
8
+ import { Slot as yt } from "@radix-ui/react-slot";
9
+ import { cva as bt } from "class-variance-authority";
10
+ import * as xt from "@radix-ui/react-scroll-area";
11
+ import * as V from "@radix-ui/react-dropdown-menu";
12
+ import * as H from "@radix-ui/react-dialog";
13
+ import { Toaster as St, toast as U } from "sonner";
14
+ import * as Ct from "@radix-ui/react-collapsible";
15
+ import { useTheme as wt } from "next-themes";
17
16
  //#region src/editor/assets/img/treege-black.svg
18
- var Dt = "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", Ot = "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", kt = ({ theme: e = "dark" }) => /* @__PURE__ */ N("div", {
17
+ var Tt = "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", Et = "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", Dt = ({ theme: e = "dark" }) => /* @__PURE__ */ P("div", {
19
18
  className: "absolute top-5 left-5 z-50 select-none",
20
- children: /* @__PURE__ */ N("img", {
21
- src: e === "dark" ? Ot : Dt,
19
+ children: /* @__PURE__ */ P("img", {
20
+ src: e === "dark" ? Et : Tt,
22
21
  alt: "Treege",
23
22
  className: "relative h-14 w-auto drop-shadow-[0_0px_35px] drop-shadow-blue-600"
24
23
  })
25
- }), At = (e) => {
26
- let t = Ee(), n = Te();
27
- return yt(() => {
24
+ }), Ot = (e) => {
25
+ let t = we(), n = Ce();
26
+ return _t(() => {
28
27
  if (!e) return [];
29
28
  let r = (e, t = /* @__PURE__ */ new Set()) => {
30
29
  if (t.has(e)) return [];
@@ -45,8 +44,8 @@ var Dt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%20
45
44
  t,
46
45
  n
47
46
  ]);
48
- }, jt = mt(null), Mt = ({ children: e, value: t }) => {
49
- let [n, r] = z(t?.flowId), [i, a] = z(!1), [o, s] = z(null), c = yt(() => ({
47
+ }, kt = ft(null), At = ({ children: e, value: t }) => {
48
+ let [n, r] = B(t?.flowId), [i, a] = B(!1), [o, s] = B(null), c = _t(() => ({
50
49
  ...t,
51
50
  ...t?.aiConfig && { aiConfig: {
52
51
  ...t.aiConfig,
@@ -65,11 +64,11 @@ var Dt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%20
65
64
  i,
66
65
  o
67
66
  ]);
68
- return /* @__PURE__ */ N(jt.Provider, {
67
+ return /* @__PURE__ */ P(kt.Provider, {
69
68
  value: c,
70
69
  children: e
71
70
  });
72
- }, W = () => gt(jt) ?? {
71
+ }, W = () => mt(kt) ?? {
73
72
  closeDeleteNodeConfirmation: () => {},
74
73
  flowId: void 0,
75
74
  isNodeSheetOpen: !1,
@@ -84,29 +83,29 @@ var Dt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%20
84
83
  };
85
84
  //#endregion
86
85
  //#region src/shared/components/ui/scroll-area.tsx
87
- function Nt({ className: e, children: t, ...n }) {
88
- return /* @__PURE__ */ P(Ct.Root, {
86
+ function jt({ className: e, children: t, ...n }) {
87
+ return /* @__PURE__ */ F(xt.Root, {
89
88
  "data-slot": "scroll-area",
90
89
  className: d("relative", e),
91
90
  ...n,
92
91
  children: [
93
- /* @__PURE__ */ N(Ct.Viewport, {
92
+ /* @__PURE__ */ P(xt.Viewport, {
94
93
  "data-slot": "scroll-area-viewport",
95
94
  className: "size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] focus-visible:ring-ring/50",
96
95
  children: t
97
96
  }),
98
- /* @__PURE__ */ N(Pt, {}),
99
- /* @__PURE__ */ N(Ct.Corner, {})
97
+ /* @__PURE__ */ P(Mt, {}),
98
+ /* @__PURE__ */ P(xt.Corner, {})
100
99
  ]
101
100
  });
102
101
  }
103
- function Pt({ className: e, orientation: t = "vertical", ...n }) {
104
- return /* @__PURE__ */ N(Ct.ScrollAreaScrollbar, {
102
+ function Mt({ className: e, orientation: t = "vertical", ...n }) {
103
+ return /* @__PURE__ */ P(xt.ScrollAreaScrollbar, {
105
104
  "data-slot": "scroll-area-scrollbar",
106
105
  orientation: t,
107
106
  className: d("flex touch-none select-none p-px transition-colors", t === "vertical" && "h-full w-2.5 border-l border-l-transparent", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", e),
108
107
  ...n,
109
- children: /* @__PURE__ */ N(Ct.ScrollAreaThumb, {
108
+ children: /* @__PURE__ */ P(xt.ScrollAreaThumb, {
110
109
  "data-slot": "scroll-area-thumb",
111
110
  className: "relative flex-1 rounded-full bg-border"
112
111
  })
@@ -114,24 +113,24 @@ function Pt({ className: e, orientation: t = "vertical", ...n }) {
114
113
  }
115
114
  //#endregion
116
115
  //#region src/editor/constants/edgeTypes.ts
117
- var Ft = {
118
- conditional: ht(({ id: e, target: t, sourceX: n, sourceY: i, targetX: a, targetY: o, sourcePosition: s, targetPosition: d, markerEnd: h, style: y, data: x }) => {
119
- let [S, C, w] = we({
116
+ var Nt = {
117
+ conditional: pt(({ id: e, target: t, sourceX: n, sourceY: i, targetX: a, targetY: o, sourcePosition: s, targetPosition: d, markerEnd: _, style: y, data: b }) => {
118
+ let [x, S, C] = Se({
120
119
  sourcePosition: s,
121
120
  sourceX: n,
122
121
  sourceY: i,
123
122
  targetPosition: d,
124
123
  targetX: a,
125
124
  targetY: o
126
- }), [ee, te] = z(!1), { updateEdgeData: ne } = j(), re = At(t), ie = x?.conditions && x.conditions.length > 0, D = G(), { handleSubmit: ae, reset: oe, Field: O } = F({
125
+ }), [te, ne] = B(!1), { updateEdgeData: re } = M(), E = Ot(t), D = b?.conditions && b.conditions.length > 0, O = G(), { handleSubmit: ie, reset: ae, Field: k } = I({
127
126
  defaultValues: {
128
- conditions: x?.conditions || [{
129
- field: re[0]?.nodeId ?? "",
127
+ conditions: b?.conditions || [{
128
+ field: E[0]?.nodeId ?? "",
130
129
  operator: "===",
131
130
  value: ""
132
131
  }],
133
- isFallback: !!x?.isFallback,
134
- label: x?.label || ""
132
+ isFallback: !!b?.isFallback,
133
+ label: b?.label || ""
135
134
  },
136
135
  listeners: {
137
136
  onChange: ({ formApi: e }) => {
@@ -140,153 +139,153 @@ var Ft = {
140
139
  onChangeDebounceMs: 150
141
140
  },
142
141
  onSubmit: ({ value: t }) => {
143
- ne(e, t);
142
+ re(e, t);
144
143
  }
145
- }), se = (e) => {
144
+ }), oe = (e) => {
146
145
  e.stopPropagation();
147
146
  }, ce = () => {
148
- oe({
147
+ ae({
149
148
  conditions: [],
150
149
  isFallback: !1,
151
150
  label: ""
152
- }), ne(e, {
151
+ }), re(e, {
153
152
  conditions: void 0,
154
153
  isFallback: void 0,
155
154
  label: void 0
156
155
  });
157
- }, ue = () => {
158
- if (x?.isFallback) return x.label || D("editor.conditionalEdge.fallback");
159
- if (!ie) return null;
160
- if (x.label) return x.label;
161
- let e = x.conditions;
162
- if (e.length === 1) return `${re.find((t) => t.nodeId === e[0].field)?.label || e[0].field} ${e[0].operator} ${e[0].value}`;
156
+ }, j = () => {
157
+ if (b?.isFallback) return b.label || O("editor.conditionalEdge.fallback");
158
+ if (!D) return null;
159
+ if (b.label) return b.label;
160
+ let e = b.conditions;
161
+ if (e.length === 1) return `${E.find((t) => t.nodeId === e[0].field)?.label || e[0].field} ${e[0].operator} ${e[0].value}`;
163
162
  let t = e.filter((e) => e.logicalOperator === r.AND).length, n = e.filter((e) => e.logicalOperator === r.OR).length;
164
- return t > 0 && n === 0 ? `${e.length} ${D("editor.conditionalEdge.conditionsAnd")}` : n > 0 && t === 0 ? `${e.length} ${D("editor.conditionalEdge.conditionsOr")}` : `${e.length} ${D("editor.conditionalEdge.conditionsMixed")}`;
165
- }, A = () => x?.isFallback ? "var(--color-chart-4)" : ie ? "var(--color-chart-2)" : "var(--color-chart-3)";
166
- return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(pe, {
167
- path: S,
168
- markerEnd: h,
163
+ return t > 0 && n === 0 ? `${e.length} ${O("editor.conditionalEdge.conditionsAnd")}` : n > 0 && t === 0 ? `${e.length} ${O("editor.conditionalEdge.conditionsOr")}` : `${e.length} ${O("editor.conditionalEdge.conditionsMixed")}`;
164
+ }, le = () => b?.isFallback ? "var(--color-chart-4)" : D ? "var(--color-chart-2)" : "var(--color-chart-3)";
165
+ return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(de, {
166
+ path: x,
167
+ markerEnd: _,
169
168
  style: {
170
169
  ...y,
171
- stroke: A(),
172
- strokeDasharray: x?.isFallback ? "5,5" : void 0,
173
- strokeWidth: ie || x?.isFallback ? 2 : y?.strokeWidth
170
+ stroke: le(),
171
+ strokeDasharray: b?.isFallback ? "5,5" : void 0,
172
+ strokeWidth: D || b?.isFallback ? 2 : y?.strokeWidth
174
173
  }
175
- }), /* @__PURE__ */ N(he, { children: /* @__PURE__ */ N("div", {
174
+ }), /* @__PURE__ */ P(pe, { children: /* @__PURE__ */ P("div", {
176
175
  className: "nodrag nopan absolute",
177
176
  style: {
178
177
  pointerEvents: "all",
179
- transform: `translate(-50%, -50%) translate(${C}px,${w}px)`
178
+ transform: `translate(-50%, -50%) translate(${S}px,${C}px)`
180
179
  },
181
- children: /* @__PURE__ */ P(le, {
182
- open: ee,
183
- onOpenChange: te,
184
- children: [/* @__PURE__ */ N(u, {
180
+ children: /* @__PURE__ */ F(se, {
181
+ open: te,
182
+ onOpenChange: ne,
183
+ children: [/* @__PURE__ */ P(u, {
185
184
  asChild: !0,
186
- children: /* @__PURE__ */ P(p, {
187
- variant: ie || x?.isFallback ? "default" : "secondary",
185
+ children: /* @__PURE__ */ F(p, {
186
+ variant: D || b?.isFallback ? "default" : "secondary",
188
187
  className: "h-8 px-2 text-xs",
189
- onClick: se,
190
- children: [/* @__PURE__ */ N(ft, { className: "mr-1 h-3 w-3" }), ie || x?.isFallback ? ue() : D("editor.conditionalEdge.condition")]
188
+ onClick: oe,
189
+ children: [/* @__PURE__ */ P(ut, { className: "mr-1 h-3 w-3" }), D || b?.isFallback ? j() : O("editor.conditionalEdge.condition")]
191
190
  })
192
- }), /* @__PURE__ */ N(_, {
191
+ }), /* @__PURE__ */ P(ee, {
193
192
  className: "w-96 p-1",
194
193
  align: "center",
195
194
  onClick: (e) => e.stopPropagation(),
196
- children: /* @__PURE__ */ N(Nt, {
195
+ children: /* @__PURE__ */ P(jt, {
197
196
  className: "flex max-h-150 flex-col p-3",
198
- children: /* @__PURE__ */ N("form", {
197
+ children: /* @__PURE__ */ P("form", {
199
198
  onSubmit: (e) => {
200
199
  e.preventDefault(), e.stopPropagation();
201
200
  },
202
- children: /* @__PURE__ */ P("div", {
201
+ children: /* @__PURE__ */ F("div", {
203
202
  className: "grid gap-5",
204
203
  children: [
205
- /* @__PURE__ */ P("div", {
204
+ /* @__PURE__ */ F("div", {
206
205
  className: "space-y-2",
207
- children: [/* @__PURE__ */ N("h4", {
206
+ children: [/* @__PURE__ */ P("h4", {
208
207
  className: "font-medium leading-none",
209
- children: D("editor.conditionalEdge.displayConditions")
210
- }), /* @__PURE__ */ N("p", {
208
+ children: O("editor.conditionalEdge.displayConditions")
209
+ }), /* @__PURE__ */ P("p", {
211
210
  className: "text-muted-foreground text-sm",
212
- children: D("editor.conditionalEdge.displayConditionsDesc")
211
+ children: O("editor.conditionalEdge.displayConditionsDesc")
213
212
  })]
214
213
  }),
215
- /* @__PURE__ */ P("div", {
214
+ /* @__PURE__ */ F("div", {
216
215
  className: "grid gap-4",
217
216
  children: [
218
- /* @__PURE__ */ N(O, {
217
+ /* @__PURE__ */ P(k, {
219
218
  name: "label",
220
- children: (e) => /* @__PURE__ */ P(T, { children: [
221
- /* @__PURE__ */ N(l, {
219
+ children: (e) => /* @__PURE__ */ F(w, { children: [
220
+ /* @__PURE__ */ P(l, {
222
221
  htmlFor: e.name,
223
- children: D("editor.conditionalEdge.labelOptional")
222
+ children: O("editor.conditionalEdge.labelOptional")
224
223
  }),
225
- /* @__PURE__ */ N(m, {
224
+ /* @__PURE__ */ P(m, {
226
225
  id: e.name,
227
- placeholder: D("editor.conditionalEdge.labelPlaceholder"),
226
+ placeholder: O("editor.conditionalEdge.labelPlaceholder"),
228
227
  value: e.state.value,
229
228
  onChange: (t) => e.handleChange(t.target.value)
230
229
  }),
231
- /* @__PURE__ */ N(E, { children: D("editor.conditionalEdge.labelDesc") })
230
+ /* @__PURE__ */ P(T, { children: O("editor.conditionalEdge.labelDesc") })
232
231
  ] })
233
232
  }),
234
- /* @__PURE__ */ N(O, {
233
+ /* @__PURE__ */ P(k, {
235
234
  name: "isFallback",
236
- children: (e) => /* @__PURE__ */ N(T, { children: /* @__PURE__ */ P("div", {
235
+ children: (e) => /* @__PURE__ */ P(w, { children: /* @__PURE__ */ F("div", {
237
236
  className: "flex items-center gap-3 rounded-lg border bg-muted/20 p-3",
238
- children: [/* @__PURE__ */ N(f, {
237
+ children: [/* @__PURE__ */ P(f, {
239
238
  id: e.name,
240
239
  checked: e.state.value,
241
240
  onCheckedChange: (t) => e.handleChange(t)
242
- }), /* @__PURE__ */ P("div", {
241
+ }), /* @__PURE__ */ F("div", {
243
242
  className: "flex flex-col gap-1",
244
- children: [/* @__PURE__ */ N(l, {
243
+ children: [/* @__PURE__ */ P(l, {
245
244
  htmlFor: e.name,
246
245
  className: "cursor-pointer font-medium",
247
- children: D("editor.conditionalEdge.fallbackPath")
248
- }), /* @__PURE__ */ N(E, {
246
+ children: O("editor.conditionalEdge.fallbackPath")
247
+ }), /* @__PURE__ */ P(T, {
249
248
  className: "text-xs",
250
- children: D("editor.conditionalEdge.fallbackPathDesc")
249
+ children: O("editor.conditionalEdge.fallbackPathDesc")
251
250
  })]
252
251
  })]
253
252
  }) })
254
253
  }),
255
- /* @__PURE__ */ N(O, {
254
+ /* @__PURE__ */ P(k, {
256
255
  name: "conditions",
257
256
  mode: "array",
258
257
  children: (e) => {
259
258
  let t = e.form.getFieldValue("isFallback");
260
- return /* @__PURE__ */ P("div", {
259
+ return /* @__PURE__ */ F("div", {
261
260
  className: "space-y-3",
262
- children: [/* @__PURE__ */ N(l, {
261
+ children: [/* @__PURE__ */ P(l, {
263
262
  className: t ? "text-muted-foreground" : "",
264
- children: D("editor.conditionalEdge.conditions")
265
- }), /* @__PURE__ */ P("div", {
263
+ children: O("editor.conditionalEdge.conditions")
264
+ }), /* @__PURE__ */ F("div", {
266
265
  className: "space-y-2",
267
- children: [e.state.value?.map((n, i) => /* @__PURE__ */ P("div", {
266
+ children: [e.state.value?.map((n, i) => /* @__PURE__ */ F("div", {
268
267
  className: "space-y-2",
269
- children: [/* @__PURE__ */ P("div", {
268
+ children: [/* @__PURE__ */ F("div", {
270
269
  className: "space-y-2 rounded-lg border bg-muted/30 p-3",
271
270
  children: [
272
- /* @__PURE__ */ N(O, {
271
+ /* @__PURE__ */ P(k, {
273
272
  name: `conditions[${i}].field`,
274
- children: (e) => /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
273
+ children: (e) => /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(l, {
275
274
  htmlFor: `field-${i}`,
276
- children: D("editor.conditionalEdge.field")
277
- }), /* @__PURE__ */ P(v, {
275
+ children: O("editor.conditionalEdge.field")
276
+ }), /* @__PURE__ */ F(g, {
278
277
  disabled: t,
279
278
  value: e.state.value || "",
280
279
  onValueChange: (t) => e.handleChange(t),
281
- children: [/* @__PURE__ */ N(g, {
280
+ children: [/* @__PURE__ */ P(h, {
282
281
  id: `field-${i}`,
283
282
  className: "w-full",
284
- children: /* @__PURE__ */ N(c, { placeholder: D("editor.conditionalEdge.selectField") })
285
- }), /* @__PURE__ */ N(k, { children: re.length === 0 ? /* @__PURE__ */ N(b, {
283
+ children: /* @__PURE__ */ P(c, { placeholder: O("editor.conditionalEdge.selectField") })
284
+ }), /* @__PURE__ */ P(A, { children: E.length === 0 ? /* @__PURE__ */ P(v, {
286
285
  value: "none",
287
286
  disabled: !0,
288
- children: D("editor.conditionalEdge.noFieldsAvailable")
289
- }) : re.map((e) => /* @__PURE__ */ P(b, {
287
+ children: O("editor.conditionalEdge.noFieldsAvailable")
288
+ }) : E.map((e) => /* @__PURE__ */ F(v, {
290
289
  value: e.nodeId,
291
290
  children: [
292
291
  e.label,
@@ -297,98 +296,98 @@ var Ft = {
297
296
  }, e.nodeId)) })]
298
297
  })] })
299
298
  }),
300
- /* @__PURE__ */ P("div", {
299
+ /* @__PURE__ */ F("div", {
301
300
  className: "flex gap-2",
302
- children: [/* @__PURE__ */ N(O, {
301
+ children: [/* @__PURE__ */ P(k, {
303
302
  name: `conditions[${i}].operator`,
304
- children: (e) => /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
303
+ children: (e) => /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(l, {
305
304
  htmlFor: `operator-${i}`,
306
- children: D("editor.conditionalEdge.operator")
307
- }), /* @__PURE__ */ P(v, {
305
+ children: O("editor.conditionalEdge.operator")
306
+ }), /* @__PURE__ */ F(g, {
308
307
  disabled: t,
309
308
  value: e.state.value || "===",
310
309
  onValueChange: (t) => e.handleChange(t),
311
- children: [/* @__PURE__ */ N(g, {
310
+ children: [/* @__PURE__ */ P(h, {
312
311
  id: `operator-${i}`,
313
- children: /* @__PURE__ */ N(c, {})
314
- }), /* @__PURE__ */ P(k, { children: [
315
- /* @__PURE__ */ N(b, {
312
+ children: /* @__PURE__ */ P(c, {})
313
+ }), /* @__PURE__ */ F(A, { children: [
314
+ /* @__PURE__ */ P(v, {
316
315
  value: "===",
317
316
  children: "="
318
317
  }),
319
- /* @__PURE__ */ N(b, {
318
+ /* @__PURE__ */ P(v, {
320
319
  value: "!==",
321
320
  children: "≠"
322
321
  }),
323
- /* @__PURE__ */ N(b, {
322
+ /* @__PURE__ */ P(v, {
324
323
  value: ">",
325
324
  children: ">"
326
325
  }),
327
- /* @__PURE__ */ N(b, {
326
+ /* @__PURE__ */ P(v, {
328
327
  value: "<",
329
328
  children: "<"
330
329
  }),
331
- /* @__PURE__ */ N(b, {
330
+ /* @__PURE__ */ P(v, {
332
331
  value: ">=",
333
332
  children: ">="
334
333
  }),
335
- /* @__PURE__ */ N(b, {
334
+ /* @__PURE__ */ P(v, {
336
335
  value: "<=",
337
336
  children: "<="
338
337
  })
339
338
  ] })]
340
339
  })] })
341
- }), /* @__PURE__ */ N(O, {
340
+ }), /* @__PURE__ */ P(k, {
342
341
  name: `conditions[${i}].value`,
343
- children: (e) => /* @__PURE__ */ P(T, {
342
+ children: (e) => /* @__PURE__ */ F(w, {
344
343
  className: "w-full",
345
- children: [/* @__PURE__ */ N(l, {
344
+ children: [/* @__PURE__ */ P(l, {
346
345
  htmlFor: `value-${i}`,
347
- children: D("editor.conditionalEdge.value")
348
- }), /* @__PURE__ */ N(m, {
346
+ children: O("editor.conditionalEdge.value")
347
+ }), /* @__PURE__ */ P(m, {
349
348
  disabled: t,
350
349
  id: `value-${i}`,
351
- placeholder: D("editor.conditionalEdge.valuePlaceholder"),
350
+ placeholder: O("editor.conditionalEdge.valuePlaceholder"),
352
351
  value: e.state.value || "",
353
352
  onChange: (t) => e.handleChange(t.target.value)
354
353
  })]
355
354
  })
356
355
  })]
357
356
  }),
358
- e.state.value && e.state.value.length > 1 && /* @__PURE__ */ P(p, {
357
+ e.state.value && e.state.value.length > 1 && /* @__PURE__ */ F(p, {
359
358
  disabled: t,
360
359
  type: "button",
361
360
  variant: "ghost",
362
361
  size: "sm",
363
362
  className: "w-full",
364
363
  onClick: () => {
365
- e.removeValue(i), ae().then();
364
+ e.removeValue(i), ie().then();
366
365
  },
367
- children: [/* @__PURE__ */ N(L, { className: "mr-1 h-4 w-4" }), D("editor.conditionalEdge.removeCondition")]
366
+ children: [/* @__PURE__ */ P(R, { className: "mr-1 h-4 w-4" }), O("editor.conditionalEdge.removeCondition")]
368
367
  })
369
368
  ]
370
- }), e.state.value && i < e.state.value.length - 1 && /* @__PURE__ */ N(O, {
369
+ }), e.state.value && i < e.state.value.length - 1 && /* @__PURE__ */ P(k, {
371
370
  name: `conditions[${i}].logicalOperator`,
372
- children: (e) => /* @__PURE__ */ N("div", {
371
+ children: (e) => /* @__PURE__ */ P("div", {
373
372
  className: "flex justify-center",
374
- children: /* @__PURE__ */ P(v, {
373
+ children: /* @__PURE__ */ F(g, {
375
374
  disabled: t,
376
375
  value: e.state.value || r.AND,
377
376
  onValueChange: (t) => e.handleChange(t),
378
- children: [/* @__PURE__ */ N(g, {
377
+ children: [/* @__PURE__ */ P(h, {
379
378
  className: "h-9 w-32 font-semibold",
380
- children: /* @__PURE__ */ N(c, {})
381
- }), /* @__PURE__ */ P(k, { children: [/* @__PURE__ */ N(b, {
379
+ children: /* @__PURE__ */ P(c, {})
380
+ }), /* @__PURE__ */ F(A, { children: [/* @__PURE__ */ P(v, {
382
381
  value: r.AND,
383
382
  children: "AND"
384
- }), /* @__PURE__ */ N(b, {
383
+ }), /* @__PURE__ */ P(v, {
385
384
  value: r.OR,
386
385
  children: "OR"
387
386
  })] })]
388
387
  })
389
388
  })
390
389
  })]
391
- }, `condition-${i}`)), /* @__PURE__ */ P(p, {
390
+ }, `condition-${i}`)), /* @__PURE__ */ F(p, {
392
391
  disabled: t,
393
392
  type: "button",
394
393
  variant: "outline",
@@ -396,13 +395,13 @@ var Ft = {
396
395
  className: "w-full",
397
396
  onClick: () => {
398
397
  e.pushValue({
399
- field: re[0]?.nodeId ?? "",
398
+ field: E[0]?.nodeId ?? "",
400
399
  logicalOperator: r.AND,
401
400
  operator: "===",
402
401
  value: ""
403
- }), ae().then();
402
+ }), ie().then();
404
403
  },
405
- children: [/* @__PURE__ */ N(I, { className: "mr-2 h-4 w-4" }), D("editor.conditionalEdge.addCondition")]
404
+ children: [/* @__PURE__ */ P(L, { className: "mr-2 h-4 w-4" }), O("editor.conditionalEdge.addCondition")]
406
405
  })]
407
406
  })]
408
407
  });
@@ -410,19 +409,19 @@ var Ft = {
410
409
  })
411
410
  ]
412
411
  }),
413
- /* @__PURE__ */ P("div", {
412
+ /* @__PURE__ */ F("div", {
414
413
  className: "flex justify-end gap-2 pt-2",
415
- children: [/* @__PURE__ */ P(p, {
414
+ children: [/* @__PURE__ */ F(p, {
416
415
  type: "button",
417
416
  size: "sm",
418
417
  variant: "outline",
419
418
  onClick: ce,
420
- children: [/* @__PURE__ */ N(L, { className: "mr-1 h-4 w-4" }), D("common.clear")]
421
- }), /* @__PURE__ */ N(p, {
419
+ children: [/* @__PURE__ */ P(R, { className: "mr-1 h-4 w-4" }), O("common.clear")]
420
+ }), /* @__PURE__ */ P(p, {
422
421
  type: "button",
423
422
  size: "sm",
424
- onClick: () => te(!1),
425
- children: D("common.close")
423
+ onClick: () => ne(!1),
424
+ children: O("common.close")
426
425
  })]
427
426
  })
428
427
  ]
@@ -433,23 +432,23 @@ var Ft = {
433
432
  })
434
433
  }) })] });
435
434
  }),
436
- default: ht(({ id: e, sourceX: t, sourceY: n, targetX: r, targetY: i, sourcePosition: a, targetPosition: o, style: s, markerEnd: c, selected: l }) => {
437
- let [u, d, f] = we({
435
+ default: pt(({ id: e, sourceX: t, sourceY: n, targetX: r, targetY: i, sourcePosition: a, targetPosition: o, style: s, markerEnd: c, selected: l }) => {
436
+ let [u, d, f] = Se({
438
437
  sourcePosition: a,
439
438
  sourceX: t,
440
439
  sourceY: n,
441
440
  targetPosition: o,
442
441
  targetX: r,
443
442
  targetY: i
444
- }), { setEdges: p } = j();
445
- return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(pe, {
443
+ }), { setEdges: p } = M();
444
+ return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(de, {
446
445
  path: u,
447
446
  markerEnd: c,
448
447
  style: s
449
- }), /* @__PURE__ */ N(he, { children: l && /* @__PURE__ */ N("div", {
448
+ }), /* @__PURE__ */ P(pe, { children: l && /* @__PURE__ */ P("div", {
450
449
  className: "button-edge__label nodrag nopan",
451
450
  style: { transform: `translate(-50%, -50%) translate(${d}px,${f}px)` },
452
- children: /* @__PURE__ */ N("button", {
451
+ children: /* @__PURE__ */ P("button", {
453
452
  type: "button",
454
453
  className: "button-edge__button",
455
454
  onClick: () => {
@@ -479,15 +478,15 @@ var Ft = {
479
478
  textarea: "textarea",
480
479
  time: "time",
481
480
  timerange: "timerange"
482
- }, It = { [a.input]: { type: K.text } }, q = () => {
483
- let { setNodes: e, setEdges: t, getNodes: n } = j(), r = R(() => {
481
+ }, Pt = { [a.input]: { type: K.text } }, q = () => {
482
+ let { setNodes: e, setEdges: t, getNodes: n } = M(), r = z(() => {
484
483
  e((e) => e.map(({ selected: e, ...t }) => t)), t((e) => e.map(({ selected: e, ...t }) => t));
485
- }, [t, e]), i = R((n) => {
484
+ }, [t, e]), i = z((n) => {
486
485
  e((e) => e.map((e) => ({
487
486
  ...e,
488
487
  selected: e.id === n
489
488
  }))), t((e) => e.map(({ selected: e, ...t }) => t));
490
- }, [t, e]), a = R((t, n) => {
489
+ }, [t, e]), a = z((t, n) => {
491
490
  e((e) => e.map((e) => e.id === t ? {
492
491
  ...e,
493
492
  data: {
@@ -495,25 +494,25 @@ var Ft = {
495
494
  ...n
496
495
  }
497
496
  } : e));
498
- }, [e]), o = R((t, n) => {
497
+ }, [e]), o = z((t, n) => {
499
498
  e((e) => e.map((e) => e.id === t ? {
500
499
  ...e,
501
- data: It[n] ?? {},
500
+ data: Pt[n] ?? {},
502
501
  type: n
503
502
  } : e));
504
- }, [e]), s = R((e) => {
503
+ }, [e]), s = z((e) => {
505
504
  let t = n().find((e) => e.selected);
506
505
  t && o(t.id, e);
507
- }, [n, o]), c = R((e) => {
506
+ }, [n, o]), c = z((e) => {
508
507
  let t = n().find((e) => e.selected);
509
508
  t && a(t.id, e);
510
- }, [n, a]), l = R((n) => {
509
+ }, [n, a]), l = z((n) => {
511
510
  e((e) => e.filter((e) => e.id !== n)), t((e) => e.filter((e) => e.source !== n && e.target !== n));
512
511
  }, [e, t]);
513
512
  return {
514
513
  clearSelection: r,
515
514
  deleteNode: l,
516
- deleteSelectedNode: R(() => {
515
+ deleteSelectedNode: z(() => {
517
516
  let e = n().find((e) => e.selected);
518
517
  e && l(e.id);
519
518
  }, [n, l]),
@@ -523,14 +522,14 @@ var Ft = {
523
522
  updateSelectedNodeData: c,
524
523
  updateSelectedNodeType: s
525
524
  };
526
- }, Lt = ({ nodeId: e, label: t, placeholder: n, className: r }) => {
525
+ }, Ft = ({ nodeId: e, label: t, placeholder: n, className: r }) => {
527
526
  let { language: i } = W(), { updateNodeData: a } = q(), o = G(), s = t?.[i] ?? "", c = n || o("editor.treegeNode.labelPlaceholder"), l = (n) => {
528
527
  a(e, { label: {
529
528
  ...t,
530
529
  [i]: n.target.value
531
530
  } });
532
531
  }, u = (e) => e.stopPropagation();
533
- return /* @__PURE__ */ N("input", {
532
+ return /* @__PURE__ */ P("input", {
534
533
  type: "text",
535
534
  value: s,
536
535
  placeholder: c,
@@ -544,33 +543,33 @@ var Ft = {
544
543
  //#endregion
545
544
  //#region src/shared/components/ui/dropdown-menu.tsx
546
545
  function J({ ...e }) {
547
- return /* @__PURE__ */ N(B.Root, {
546
+ return /* @__PURE__ */ P(V.Root, {
548
547
  "data-slot": "dropdown-menu",
549
548
  ...e
550
549
  });
551
550
  }
552
551
  function Y({ ...e }) {
553
- return /* @__PURE__ */ N(B.Trigger, {
552
+ return /* @__PURE__ */ P(V.Trigger, {
554
553
  "data-slot": "dropdown-menu-trigger",
555
554
  ...e
556
555
  });
557
556
  }
558
557
  function X({ className: e, sideOffset: t = 4, ...n }) {
559
- return /* @__PURE__ */ N(B.Portal, { children: /* @__PURE__ */ N(B.Content, {
558
+ return /* @__PURE__ */ P(V.Portal, { children: /* @__PURE__ */ P(V.Content, {
560
559
  "data-slot": "dropdown-menu-content",
561
560
  sideOffset: t,
562
561
  className: d("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in", e),
563
562
  ...n
564
563
  }) });
565
564
  }
566
- function Rt({ ...e }) {
567
- return /* @__PURE__ */ N(B.Group, {
565
+ function It({ ...e }) {
566
+ return /* @__PURE__ */ P(V.Group, {
568
567
  "data-slot": "dropdown-menu-group",
569
568
  ...e
570
569
  });
571
570
  }
572
571
  function Z({ className: e, inset: t, variant: n = "default", ...r }) {
573
- return /* @__PURE__ */ N(B.Item, {
572
+ return /* @__PURE__ */ P(V.Item, {
574
573
  "data-slot": "dropdown-menu-item",
575
574
  "data-inset": t,
576
575
  "data-variant": n,
@@ -578,16 +577,16 @@ function Z({ className: e, inset: t, variant: n = "default", ...r }) {
578
577
  ...r
579
578
  });
580
579
  }
581
- function zt({ className: e, inset: t, ...n }) {
582
- return /* @__PURE__ */ N(B.Label, {
580
+ function Lt({ className: e, inset: t, ...n }) {
581
+ return /* @__PURE__ */ P(V.Label, {
583
582
  "data-slot": "dropdown-menu-label",
584
583
  "data-inset": t,
585
584
  className: d("px-1.5 py-1 font-medium text-muted-foreground text-xs data-[inset]:pl-7", e),
586
585
  ...n
587
586
  });
588
587
  }
589
- function Bt({ className: e, ...t }) {
590
- return /* @__PURE__ */ N(B.Separator, {
588
+ function Rt({ className: e, ...t }) {
589
+ return /* @__PURE__ */ P(V.Separator, {
591
590
  "data-slot": "dropdown-menu-separator",
592
591
  className: d("-mx-1 my-1 h-px bg-border", e),
593
592
  ...t
@@ -595,38 +594,38 @@ function Bt({ className: e, ...t }) {
595
594
  }
596
595
  //#endregion
597
596
  //#region src/editor/features/TreegeEditor/nodes/components/NodeMoreMenu.tsx
598
- var Vt = ({ nodeId: e, className: t }) => {
597
+ var zt = ({ nodeId: e, className: t }) => {
599
598
  let { selectNode: n } = q(), { setIsNodeSheetOpen: r, openDeleteNodeConfirmation: i } = W(), a = G(), o = (e) => e.stopPropagation();
600
- return /* @__PURE__ */ P(J, { children: [/* @__PURE__ */ N(Y, {
599
+ return /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(Y, {
601
600
  asChild: !0,
602
601
  onClick: o,
603
- children: /* @__PURE__ */ N("button", {
602
+ children: /* @__PURE__ */ P("button", {
604
603
  type: "button",
605
604
  "aria-label": a("editor.nodeActionsSheet.editNode"),
606
605
  className: d("nodrag nopan absolute top-2 right-2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-md opacity-60 transition-all hover:text-[--treege-color-primary] hover:opacity-100", t),
607
- children: /* @__PURE__ */ N($e, { className: "h-3.5 w-3.5" })
606
+ children: /* @__PURE__ */ P(Ze, { className: "h-3.5 w-3.5" })
608
607
  })
609
- }), /* @__PURE__ */ P(X, {
608
+ }), /* @__PURE__ */ F(X, {
610
609
  align: "end",
611
610
  onClick: o,
612
611
  children: [
613
- /* @__PURE__ */ P(Z, {
612
+ /* @__PURE__ */ F(Z, {
614
613
  onClick: () => {
615
614
  n(e), r(!0);
616
615
  },
617
- children: [/* @__PURE__ */ N(ot, {}), a("common.settings")]
616
+ children: [/* @__PURE__ */ P(it, {}), a("common.settings")]
618
617
  }),
619
- /* @__PURE__ */ N(Bt, {}),
620
- /* @__PURE__ */ P(Z, {
618
+ /* @__PURE__ */ P(Rt, {}),
619
+ /* @__PURE__ */ F(Z, {
621
620
  variant: "destructive",
622
- onClick: () => {
623
- i(e);
621
+ onSelect: (t) => {
622
+ t.preventDefault(), i(e);
624
623
  },
625
- children: [/* @__PURE__ */ N(ct, {}), a("common.delete")]
624
+ children: [/* @__PURE__ */ P(ot, {}), a("common.delete")]
626
625
  })
627
626
  ]
628
627
  })] });
629
- }, Ht = St("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
628
+ }, Bt = bt("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
630
629
  defaultVariants: { variant: "default" },
631
630
  variants: { variant: {
632
631
  blue: "bg-blue-500 text-white dark:bg-blue-600",
@@ -637,45 +636,45 @@ var Vt = ({ nodeId: e, className: t }) => {
637
636
  secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90"
638
637
  } }
639
638
  });
640
- function Ut({ className: e, variant: t, asChild: n = !1, ...r }) {
641
- return /* @__PURE__ */ N(n ? xt : "span", {
639
+ function Vt({ className: e, variant: t, asChild: n = !1, ...r }) {
640
+ return /* @__PURE__ */ P(n ? yt : "span", {
642
641
  "data-slot": "badge",
643
- className: d(Ht({ variant: t }), e),
642
+ className: d(Bt({ variant: t }), e),
644
643
  ...r
645
644
  });
646
645
  }
647
- var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
648
- /* @__PURE__ */ N(ve, {}),
649
- /* @__PURE__ */ N("div", {
646
+ var Ht = pt(({ data: e, id: t }) => /* @__PURE__ */ F(N, { children: [
647
+ /* @__PURE__ */ P(ge, {}),
648
+ /* @__PURE__ */ P("div", {
650
649
  className: "-top-3.5 absolute left-6",
651
- children: /* @__PURE__ */ P(Ut, {
650
+ children: /* @__PURE__ */ F(Vt, {
652
651
  className: "max-w-50 bg-chart-2",
653
- children: [/* @__PURE__ */ N(ke, { className: "!w-3 !h-3" }), /* @__PURE__ */ N(Lt, {
652
+ children: [/* @__PURE__ */ P(De, { className: "!w-3 !h-3" }), /* @__PURE__ */ P(Ft, {
654
653
  nodeId: t,
655
654
  label: e?.label,
656
655
  className: "min-w-0 flex-1 text-xs text-white placeholder:text-white/60"
657
656
  })]
658
657
  })
659
658
  }),
660
- /* @__PURE__ */ N(Vt, { nodeId: t })
661
- ] })), Gt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Kt = (e = 21) => {
659
+ /* @__PURE__ */ P(zt, { nodeId: t })
660
+ ] })), Ut = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Wt = (e = 21) => {
662
661
  let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
663
- for (; e--;) t += Gt[n[e] & 63];
662
+ for (; e--;) t += Ut[n[e] & 63];
664
663
  return t;
665
- }, qt = {
664
+ }, Gt = {
666
665
  data: { type: "text" },
667
- id: Kt(),
666
+ id: Wt(),
668
667
  position: {
669
668
  x: 0,
670
669
  y: 0
671
670
  },
672
671
  type: "input"
673
- }, Jt = () => {
674
- let { setNodes: e, setEdges: t, screenToFlowPosition: n, getNode: r, getNodes: i, getEdges: a } = j(), o = R((n, r, i = !1, o) => {
672
+ }, Kt = () => {
673
+ let { setNodes: e, setEdges: t, screenToFlowPosition: n, getNode: r, getNodes: i, getEdges: a } = M(), o = z((n, r, i = !1, o) => {
675
674
  let c = n.id, l = a().filter((e) => e.source === c), u = s(n);
676
675
  if (l.length > 0 && !u) return;
677
- let d = Kt(), f = {
678
- ...qt,
676
+ let d = Wt(), f = {
677
+ ...Gt,
679
678
  ...o && {
680
679
  data: o.data ?? {},
681
680
  type: o.type
@@ -691,7 +690,7 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
691
690
  operator: "===",
692
691
  value: ""
693
692
  }] } : void 0,
694
- id: Kt(),
693
+ id: Wt(),
695
694
  source: c,
696
695
  target: d,
697
696
  type: t && u ? "conditional" : "default"
@@ -719,9 +718,9 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
719
718
  a,
720
719
  e,
721
720
  t
722
- ]), c = R((e) => {
721
+ ]), c = z((e) => {
723
722
  t((t) => {
724
- let n = Ce(e, t), i = e.source, a = r(i);
723
+ let n = xe(e, t), i = e.source, a = r(i);
725
724
  return n.filter((e) => e.source === i).length > 1 && a && s(a) ? n.map((e) => e.source === i ? {
726
725
  ...e,
727
726
  data: {
@@ -735,7 +734,7 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
735
734
  type: "conditional"
736
735
  } : e) : n;
737
736
  });
738
- }, [t, r]), l = R((e, t) => {
737
+ }, [t, r]), l = z((e, t) => {
739
738
  let n = r(e);
740
739
  if (!n) return;
741
740
  let s = getComputedStyle(document.documentElement).getPropertyValue("--node-height"), c = getComputedStyle(document.documentElement).getPropertyValue("--node-width"), l = parseFloat(s) || 100, u = parseFloat(c) || 100, d = n.position.y + l + 100, f = i(), p = a(), m = f.filter((t) => p.some((n) => n.source === e && n.target === t.id));
@@ -748,7 +747,7 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
748
747
  i,
749
748
  a,
750
749
  o
751
- ]), u = R((e, t) => {
750
+ ]), u = z((e, t) => {
752
751
  if (!t.isValid) {
753
752
  let { clientX: i, clientY: a } = "changedTouches" in e ? e.changedTouches[0] : e, s = t.fromNode;
754
753
  if (!s) return;
@@ -768,7 +767,7 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
768
767
  o,
769
768
  r,
770
769
  n
771
- ]), d = R((e) => {
770
+ ]), d = z((e) => {
772
771
  t((t) => {
773
772
  let n = t.filter((t) => !e.find((e) => e.id === t.id)), r = new Set(e.map((e) => e.source)), i = /* @__PURE__ */ new Map();
774
773
  return n.forEach((e) => {
@@ -787,7 +786,7 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
787
786
  });
788
787
  }, [t]);
789
788
  return {
790
- isValidConnection: R((e) => {
789
+ isValidConnection: z((e) => {
791
790
  if (e.source === e.target) return !1;
792
791
  let t = r(e.source);
793
792
  return t ? !(a().filter((t) => t.source === e.source).length > 0 && !s(t)) : !1;
@@ -797,35 +796,35 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
797
796
  onConnectEnd: u,
798
797
  onEdgesDelete: d
799
798
  };
800
- }, Yt = {
799
+ }, qt = {
801
800
  divider: "divider",
802
801
  title: "title"
803
- }, Xt = ({ nodeId: e, isConnectable: t }) => {
804
- let { onAddFromHandle: n } = Jt(), r = G(), [i, o] = z(!1);
805
- return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(ge, {
802
+ }, Jt = ({ nodeId: e, isConnectable: t }) => {
803
+ let { onAddFromHandle: n } = Kt(), r = G(), [i, o] = B(!1);
804
+ return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(me, {
806
805
  type: "source",
807
- position: be.Bottom,
806
+ position: ve.Bottom,
808
807
  isConnectable: t,
809
808
  onClick: (e) => {
810
809
  e.defaultPrevented || o(!0);
811
810
  },
812
811
  className: "flex h-6! w-6! cursor-pointer items-center justify-center rounded-sm transition-colors hover:bg-primary/80!",
813
- children: /* @__PURE__ */ N(I, { className: "h-4 w-4 text-primary-foreground" })
814
- }), /* @__PURE__ */ P(J, {
812
+ children: /* @__PURE__ */ P(L, { className: "h-4 w-4 text-primary-foreground" })
813
+ }), /* @__PURE__ */ F(J, {
815
814
  open: i,
816
815
  onOpenChange: o,
817
- children: [/* @__PURE__ */ N(Y, {
816
+ children: [/* @__PURE__ */ P(Y, {
818
817
  asChild: !0,
819
- children: /* @__PURE__ */ N("span", {
818
+ children: /* @__PURE__ */ P("span", {
820
819
  "aria-hidden": !0,
821
820
  className: "-translate-x-1/2 pointer-events-none absolute bottom-0 left-1/2 h-0 w-0"
822
821
  })
823
- }), /* @__PURE__ */ P(X, {
822
+ }), /* @__PURE__ */ F(X, {
824
823
  align: "center",
825
824
  side: "bottom",
826
825
  className: "treege-scrollbar max-h-80",
827
826
  children: [
828
- /* @__PURE__ */ P(Rt, { children: [/* @__PURE__ */ N(zt, { children: r("editor.selectNodeType.options.input") }), Object.values(K).map((t) => /* @__PURE__ */ N(Z, {
827
+ /* @__PURE__ */ F(It, { children: [/* @__PURE__ */ P(Lt, { children: r("editor.selectNodeType.options.input") }), Object.values(K).map((t) => /* @__PURE__ */ P(Z, {
829
828
  onClick: () => n(e, {
830
829
  data: { type: t },
831
830
  type: a.input
@@ -833,8 +832,8 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
833
832
  className: "capitalize",
834
833
  children: t
835
834
  }, t))] }),
836
- /* @__PURE__ */ N(Bt, {}),
837
- /* @__PURE__ */ P(Rt, { children: [/* @__PURE__ */ N(zt, { children: r("editor.selectNodeType.options.ui") }), Object.values(Yt).map((t) => /* @__PURE__ */ N(Z, {
835
+ /* @__PURE__ */ P(Rt, {}),
836
+ /* @__PURE__ */ F(It, { children: [/* @__PURE__ */ P(Lt, { children: r("editor.selectNodeType.options.ui") }), Object.values(qt).map((t) => /* @__PURE__ */ P(Z, {
838
837
  onClick: () => n(e, {
839
838
  data: { type: t },
840
839
  type: a.ui
@@ -842,8 +841,8 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
842
841
  className: "capitalize",
843
842
  children: t
844
843
  }, t))] }),
845
- /* @__PURE__ */ N(Bt, {}),
846
- /* @__PURE__ */ P(Rt, { children: [/* @__PURE__ */ N(zt, { children: r("common.other") }), /* @__PURE__ */ N(Z, {
844
+ /* @__PURE__ */ P(Rt, {}),
845
+ /* @__PURE__ */ F(It, { children: [/* @__PURE__ */ P(Lt, { children: r("common.other") }), /* @__PURE__ */ P(Z, {
847
846
  onClick: () => n(e, {
848
847
  data: {},
849
848
  type: a.flow
@@ -853,68 +852,68 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
853
852
  ]
854
853
  })]
855
854
  })] });
856
- }, Zt = {
857
- [K.address]: Ze,
858
- [K.autocomplete]: it,
859
- [K.checkbox]: Pe,
860
- [K.date]: Ae,
861
- [K.daterange]: je,
862
- [K.file]: et,
863
- [K.hidden]: Ue,
864
- [K.http]: ze,
865
- [K.number]: We,
866
- [K.password]: qe,
867
- [K.radio]: Le,
868
- [K.select]: Ye,
869
- [K.submit]: at,
870
- [K.switch]: st,
871
- [K.text]: Me,
872
- [K.textarea]: De,
873
- [K.time]: Re,
874
- [K.timerange]: Re,
875
- [Yt.divider]: Qe,
876
- [Yt.title]: Ge
877
- }, Qt = nt, $t = (e) => e && Zt[e] || Qt, en = {
855
+ }, Yt = {
856
+ [K.address]: Ye,
857
+ [K.autocomplete]: nt,
858
+ [K.checkbox]: Me,
859
+ [K.date]: Oe,
860
+ [K.daterange]: ke,
861
+ [K.file]: Qe,
862
+ [K.hidden]: Ve,
863
+ [K.http]: Le,
864
+ [K.number]: He,
865
+ [K.password]: Ge,
866
+ [K.radio]: Fe,
867
+ [K.select]: qe,
868
+ [K.submit]: rt,
869
+ [K.switch]: at,
870
+ [K.text]: Ae,
871
+ [K.textarea]: Te,
872
+ [K.time]: Ie,
873
+ [K.timerange]: Ie,
874
+ [qt.divider]: Xe,
875
+ [qt.title]: Ue
876
+ }, Xt = et, Zt = (e) => e && Yt[e] || Xt, Qt = {
878
877
  input: Object.values(K),
879
- ui: Object.values(Yt)
880
- }, tn = ({ nodeId: e, type: t, inputType: n }) => {
881
- let { updateNodeData: r } = q(), i = G(), a = en[t], o = (e) => e.stopPropagation();
882
- return /* @__PURE__ */ P(J, { children: [/* @__PURE__ */ N(Y, {
878
+ ui: Object.values(qt)
879
+ }, $t = ({ nodeId: e, type: t, inputType: n }) => {
880
+ let { updateNodeData: r } = q(), i = G(), a = Qt[t], o = (e) => e.stopPropagation();
881
+ return /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(Y, {
883
882
  asChild: !0,
884
883
  onClick: o,
885
- children: /* @__PURE__ */ P(Ut, {
884
+ children: /* @__PURE__ */ F(Vt, {
886
885
  variant: "default",
887
886
  className: "nodrag nopan cursor-pointer px-1.5 py-0 text-[10px] capitalize [&>svg]:size-2.5",
888
887
  children: [
889
- /* @__PURE__ */ N($t(n), { className: "mt-0.5" }),
888
+ /* @__PURE__ */ P(Zt(n), { className: "mt-0.5" }),
890
889
  n || i("editor.selectInputType.type"),
891
- /* @__PURE__ */ N(Fe, {})
890
+ /* @__PURE__ */ P(Ne, {})
892
891
  ]
893
892
  })
894
- }), /* @__PURE__ */ N(X, {
893
+ }), /* @__PURE__ */ P(X, {
895
894
  align: "start",
896
895
  className: "treege-scrollbar max-h-60",
897
896
  onClick: o,
898
897
  children: a.map((t) => {
899
- let i = $t(t);
900
- return /* @__PURE__ */ P(Z, {
898
+ let i = Zt(t);
899
+ return /* @__PURE__ */ F(Z, {
901
900
  onClick: () => r(e, { type: t }),
902
901
  className: d("capitalize", t === n && "bg-accent"),
903
- children: [/* @__PURE__ */ N(i, {}), t]
902
+ children: [/* @__PURE__ */ P(i, {}), t]
904
903
  }, t);
905
904
  })
906
905
  })] });
907
- }, nn = [
906
+ }, en = [
908
907
  "radio",
909
908
  "select",
910
909
  "checkbox",
911
910
  "autocomplete"
912
- ], rn = ({ nodeId: e, data: t }) => {
913
- let [n, r] = z(!1), [i, a] = z(""), [o, s] = z(""), { updateNodeData: c } = q(), { language: d } = W(), f = G(), h = t && "type" in t ? t.type : void 0;
914
- if (!(h && nn.includes(h))) return null;
915
- let g = t.options ?? [], v = () => {
911
+ ], tn = ({ nodeId: e, data: t }) => {
912
+ let [n, r] = B(!1), [i, a] = B(""), [o, s] = B(""), { updateNodeData: c } = q(), { language: d } = W(), f = G(), h = t && "type" in t ? t.type : void 0;
913
+ if (!(h && en.includes(h))) return null;
914
+ let g = t.options ?? [], _ = () => {
916
915
  a(""), s("");
917
- }, y = (t) => {
916
+ }, v = (t) => {
918
917
  t?.preventDefault();
919
918
  let n = i.trim(), a = o.trim() || n;
920
919
  if (!(n || a)) return;
@@ -922,69 +921,69 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
922
921
  label: { [d]: n },
923
922
  value: a
924
923
  };
925
- c(e, { options: [...g, s] }), v(), r(!1);
924
+ c(e, { options: [...g, s] }), _(), r(!1);
925
+ }, y = (e) => {
926
+ r(e), e || _();
926
927
  }, b = (e) => {
927
- r(e), e || v();
928
- }, x = (e) => {
929
- e.key === "Enter" && (e.preventDefault(), y());
930
- }, S = (e) => e.stopPropagation();
931
- return /* @__PURE__ */ P("div", {
928
+ e.key === "Enter" && (e.preventDefault(), v());
929
+ }, x = (e) => e.stopPropagation();
930
+ return /* @__PURE__ */ F("div", {
932
931
  className: "nodrag nopan my-1 flex flex-col gap-0.5",
933
932
  children: [g.map((e, t) => {
934
933
  let n = f(e.label) || e.value || "—", r = `${e.value || "opt"}-${t}`;
935
- return /* @__PURE__ */ N("div", {
934
+ return /* @__PURE__ */ P("div", {
936
935
  className: "truncate text-muted-foreground text-xs",
937
936
  children: n
938
937
  }, r);
939
- }), /* @__PURE__ */ P(le, {
938
+ }), /* @__PURE__ */ F(se, {
940
939
  open: n,
941
- onOpenChange: b,
942
- children: [/* @__PURE__ */ N(u, {
940
+ onOpenChange: y,
941
+ children: [/* @__PURE__ */ P(u, {
943
942
  asChild: !0,
944
- onClick: S,
945
- children: /* @__PURE__ */ P(p, {
943
+ onClick: x,
944
+ children: /* @__PURE__ */ F(p, {
946
945
  type: "button",
947
946
  variant: "link",
948
947
  size: "xs",
949
948
  className: "w-fit p-0!",
950
- children: [/* @__PURE__ */ N(I, { className: "size-3" }), f("editor.inputNodeForm.addOption")]
949
+ children: [/* @__PURE__ */ P(L, { className: "size-3" }), f("editor.inputNodeForm.addOption")]
951
950
  })
952
- }), /* @__PURE__ */ N(_, {
951
+ }), /* @__PURE__ */ P(ee, {
953
952
  align: "start",
954
953
  className: "w-64 p-3",
955
- onClick: S,
956
- children: /* @__PURE__ */ P("form", {
957
- onSubmit: y,
954
+ onClick: x,
955
+ children: /* @__PURE__ */ F("form", {
956
+ onSubmit: v,
958
957
  className: "flex flex-col gap-2",
959
958
  children: [
960
- /* @__PURE__ */ P("div", {
959
+ /* @__PURE__ */ F("div", {
961
960
  className: "flex flex-col gap-1",
962
- children: [/* @__PURE__ */ N(l, {
961
+ children: [/* @__PURE__ */ P(l, {
963
962
  htmlFor: `${e}-option-label`,
964
963
  className: "text-xs",
965
964
  children: f("editor.inputNodeForm.optionLabel")
966
- }), /* @__PURE__ */ N(m, {
965
+ }), /* @__PURE__ */ P(m, {
967
966
  id: `${e}-option-label`,
968
967
  autoFocus: !0,
969
968
  value: i,
970
969
  onChange: (e) => a(e.target.value),
971
- onKeyDown: x
970
+ onKeyDown: b
972
971
  })]
973
972
  }),
974
- /* @__PURE__ */ P("div", {
973
+ /* @__PURE__ */ F("div", {
975
974
  className: "flex flex-col gap-1",
976
- children: [/* @__PURE__ */ N(l, {
975
+ children: [/* @__PURE__ */ P(l, {
977
976
  htmlFor: `${e}-option-value`,
978
977
  className: "text-xs",
979
978
  children: f("editor.inputNodeForm.optionValue")
980
- }), /* @__PURE__ */ N(m, {
979
+ }), /* @__PURE__ */ P(m, {
981
980
  id: `${e}-option-value`,
982
981
  value: o,
983
982
  onChange: (e) => s(e.target.value),
984
- onKeyDown: x
983
+ onKeyDown: b
985
984
  })]
986
985
  }),
987
- /* @__PURE__ */ N(p, {
986
+ /* @__PURE__ */ P(p, {
988
987
  type: "submit",
989
988
  size: "sm",
990
989
  disabled: !(i.trim() || o.trim()),
@@ -995,13 +994,13 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
995
994
  })]
996
995
  })]
997
996
  });
998
- }, an = ({ nodeId: e, required: t }) => {
997
+ }, nn = ({ nodeId: e, required: t }) => {
999
998
  let { updateNodeData: n } = q(), r = G();
1000
- return /* @__PURE__ */ N(Ut, {
999
+ return /* @__PURE__ */ P(Vt, {
1001
1000
  variant: t ? "destructive" : "outline",
1002
1001
  asChild: !0,
1003
1002
  className: "nodrag nopan cursor-pointer px-1.5 py-0 text-[10px] capitalize [&>svg]:size-2.5",
1004
- children: /* @__PURE__ */ N("button", {
1003
+ children: /* @__PURE__ */ P("button", {
1005
1004
  type: "button",
1006
1005
  onClick: (r) => {
1007
1006
  r.stopPropagation(), n(e, { required: !t });
@@ -1009,146 +1008,85 @@ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
1009
1008
  children: r(t ? "editor.inputNodeForm.required" : "editor.inputNodeForm.optional")
1010
1009
  })
1011
1010
  });
1012
- }, on = ({ children: e, inGroup: t, isSubmit: n }) => /* @__PURE__ */ N("div", {
1011
+ }, rn = ({ children: e, inGroup: t, isSubmit: n }) => /* @__PURE__ */ P("div", {
1013
1012
  className: d("react-flow__node__wrapper relative", t && "in-group", n && "submit-type"),
1014
1013
  children: e
1015
- }), sn = ht(({ data: e, isConnectable: t, parentId: n, type: r, id: i }) => {
1014
+ }), an = pt(({ data: e, isConnectable: t, parentId: n, type: r, id: i }) => {
1016
1015
  let a = r === "input" || r === "ui" ? e?.type : void 0, o = r === "input" && e?.type === "submit", s = r === "input" ? e?.name : void 0;
1017
- return /* @__PURE__ */ P(on, {
1016
+ return /* @__PURE__ */ F(rn, {
1018
1017
  inGroup: !!n,
1019
1018
  isSubmit: o,
1020
1019
  children: [
1021
- /* @__PURE__ */ N(Vt, { nodeId: i }),
1022
- /* @__PURE__ */ N(ge, {
1020
+ /* @__PURE__ */ P(zt, { nodeId: i }),
1021
+ /* @__PURE__ */ P(me, {
1023
1022
  type: "target",
1024
- position: be.Top,
1023
+ position: ve.Top,
1025
1024
  isConnectable: t,
1026
1025
  isConnectableStart: r === "ui"
1027
1026
  }),
1028
- /* @__PURE__ */ N(Lt, {
1027
+ /* @__PURE__ */ P(Ft, {
1029
1028
  nodeId: i,
1030
1029
  label: e?.label,
1031
1030
  placeholder: s,
1032
1031
  className: d("py-1", r === "ui" && "capitalize")
1033
1032
  }),
1034
- /* @__PURE__ */ P("div", {
1033
+ /* @__PURE__ */ F("div", {
1035
1034
  className: "mb-1 flex gap-1",
1036
- children: [(r === "input" || r === "ui") && /* @__PURE__ */ N(tn, {
1035
+ children: [(r === "input" || r === "ui") && /* @__PURE__ */ P($t, {
1037
1036
  nodeId: i,
1038
1037
  type: r,
1039
1038
  inputType: a
1040
- }), r === "input" && !o && /* @__PURE__ */ N(an, {
1039
+ }), r === "input" && !o && /* @__PURE__ */ P(nn, {
1041
1040
  nodeId: i,
1042
1041
  required: e?.required
1043
1042
  })]
1044
1043
  }),
1045
- r === "input" && /* @__PURE__ */ N(rn, {
1044
+ r === "input" && /* @__PURE__ */ P(tn, {
1046
1045
  nodeId: i,
1047
1046
  data: e
1048
1047
  }),
1049
- /* @__PURE__ */ N(Xt, {
1048
+ /* @__PURE__ */ P(Jt, {
1050
1049
  nodeId: i,
1051
1050
  isConnectable: t
1052
1051
  })
1053
1052
  ]
1054
1053
  });
1055
- }), cn = {
1056
- [a.flow]: sn,
1057
- [a.group]: Wt,
1058
- [a.input]: sn,
1059
- [a.ui]: sn
1060
- };
1061
- //#endregion
1062
- //#region src/shared/components/ui/alert-dialog.tsx
1063
- function ln({ ...e }) {
1064
- return /* @__PURE__ */ N(V.Root, {
1065
- "data-slot": "alert-dialog",
1066
- ...e
1067
- });
1068
- }
1069
- function un({ ...e }) {
1070
- return /* @__PURE__ */ N(V.Portal, {
1071
- "data-slot": "alert-dialog-portal",
1072
- ...e
1073
- });
1074
- }
1075
- function dn({ className: e, ...t }) {
1076
- return /* @__PURE__ */ N(V.Overlay, {
1077
- "data-slot": "alert-dialog-overlay",
1078
- className: d("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", e),
1079
- ...t
1080
- });
1081
- }
1082
- function fn({ className: e, ...t }) {
1083
- return /* @__PURE__ */ P(un, { children: [/* @__PURE__ */ N(dn, {}), /* @__PURE__ */ N(V.Content, {
1084
- "data-slot": "alert-dialog-content",
1085
- className: d("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg", e),
1086
- ...t
1087
- })] });
1088
- }
1089
- function pn({ className: e, ...t }) {
1090
- return /* @__PURE__ */ N("div", {
1091
- "data-slot": "alert-dialog-header",
1092
- className: d("flex flex-col gap-2 text-center sm:text-left", e),
1093
- ...t
1094
- });
1095
- }
1096
- function mn({ className: e, ...t }) {
1097
- return /* @__PURE__ */ N("div", {
1098
- "data-slot": "alert-dialog-footer",
1099
- className: d("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
1100
- ...t
1101
- });
1102
- }
1103
- function hn({ className: e, ...t }) {
1104
- return /* @__PURE__ */ N(V.Title, {
1105
- "data-slot": "alert-dialog-title",
1106
- className: d("font-semibold text-lg", e),
1107
- ...t
1108
- });
1109
- }
1110
- function gn({ className: e, ...t }) {
1111
- return /* @__PURE__ */ N(V.Description, {
1112
- "data-slot": "alert-dialog-description",
1113
- className: d("text-muted-foreground text-sm", e),
1114
- ...t
1115
- });
1116
- }
1117
- function _n({ className: e, ...t }) {
1118
- return /* @__PURE__ */ N(V.Action, {
1119
- className: d(h(), e),
1120
- ...t
1121
- });
1122
- }
1123
- function vn({ className: e, ...t }) {
1124
- return /* @__PURE__ */ N(V.Cancel, {
1125
- className: d(h({ variant: "outline" }), e),
1126
- ...t
1127
- });
1128
- }
1129
- //#endregion
1130
- //#region src/editor/features/TreegeEditor/dialogs/DeleteNodeDialog.tsx
1131
- var yn = () => {
1054
+ }), on = {
1055
+ [a.flow]: an,
1056
+ [a.group]: Ht,
1057
+ [a.input]: an,
1058
+ [a.ui]: an
1059
+ }, sn = () => {
1132
1060
  let { pendingDeleteNodeId: e, closeDeleteNodeConfirmation: t } = W(), { deleteNode: n } = q(), r = G();
1133
- return /* @__PURE__ */ N(ln, {
1061
+ return /* @__PURE__ */ P(oe, {
1134
1062
  open: e !== null,
1135
1063
  onOpenChange: (e) => {
1136
1064
  e || t();
1137
1065
  },
1138
- children: /* @__PURE__ */ P(fn, { children: [/* @__PURE__ */ P(pn, { children: [/* @__PURE__ */ N(hn, { children: r("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ N(gn, { children: r("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ P(mn, { children: [/* @__PURE__ */ N(vn, { children: r("common.cancel") }), /* @__PURE__ */ N(_n, {
1139
- onClick: () => {
1140
- e && n(e), t();
1141
- },
1142
- children: r("common.delete")
1143
- })] })] })
1066
+ modal: !1,
1067
+ children: /* @__PURE__ */ F(b, {
1068
+ showCloseButton: !1,
1069
+ onInteractOutside: (e) => e.preventDefault(),
1070
+ onPointerDownOutside: (e) => e.preventDefault(),
1071
+ children: [/* @__PURE__ */ F(re, { children: [/* @__PURE__ */ P(C, { children: r("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ P(x, { children: r("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ F(O, { children: [/* @__PURE__ */ P(p, {
1072
+ variant: "outline",
1073
+ onClick: t,
1074
+ children: r("common.cancel")
1075
+ }), /* @__PURE__ */ P(p, {
1076
+ onClick: () => {
1077
+ e && n(e), t();
1078
+ },
1079
+ children: r("common.delete")
1080
+ })] })]
1081
+ })
1144
1082
  });
1145
- }, 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", xn = {
1083
+ }, cn = "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", ln = {
1146
1084
  claude: "claude-3-5-haiku-20241022",
1147
1085
  deepseek: "deepseek-chat",
1148
1086
  gemini: "gemini-2.5-flash",
1149
1087
  openai: "gpt-4o-mini"
1150
- }, Sn = .3;
1151
- function Cn(e) {
1088
+ }, un = .3;
1089
+ function dn(e) {
1152
1090
  try {
1153
1091
  return JSON.parse(e);
1154
1092
  } catch (t) {
@@ -1160,10 +1098,10 @@ function Cn(e) {
1160
1098
  }
1161
1099
  }
1162
1100
  }
1163
- async function wn(e) {
1164
- let t = e.config.model || xn.gemini, n = e.config.temperature ?? Sn, r = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/${t}:generateContent?key=${e.config.apiKey}`, {
1101
+ async function fn(e) {
1102
+ let t = e.config.model || ln.gemini, n = e.config.temperature ?? un, r = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/${t}:generateContent?key=${e.config.apiKey}`, {
1165
1103
  body: JSON.stringify({
1166
- contents: [{ parts: [{ text: `${bn}\n\nUser request: ${e.prompt}` }] }],
1104
+ contents: [{ parts: [{ text: `${cn}\n\nUser request: ${e.prompt}` }] }],
1167
1105
  generationConfig: {
1168
1106
  responseMimeType: "application/json",
1169
1107
  temperature: n
@@ -1178,13 +1116,13 @@ async function wn(e) {
1178
1116
  }
1179
1117
  let i = (await r.json()).candidates?.[0]?.content?.parts?.[0]?.text;
1180
1118
  if (!i) throw Error("No response from Gemini");
1181
- return Cn(i);
1119
+ return dn(i);
1182
1120
  }
1183
- async function Tn(e) {
1184
- let t = e.config.model || xn.openai, n = e.config.temperature ?? Sn, r = await fetch("https://api.openai.com/v1/chat/completions", {
1121
+ async function pn(e) {
1122
+ let t = e.config.model || ln.openai, n = e.config.temperature ?? un, r = await fetch("https://api.openai.com/v1/chat/completions", {
1185
1123
  body: JSON.stringify({
1186
1124
  messages: [{
1187
- content: bn,
1125
+ content: cn,
1188
1126
  role: "system"
1189
1127
  }, {
1190
1128
  content: e.prompt,
@@ -1206,13 +1144,13 @@ async function Tn(e) {
1206
1144
  }
1207
1145
  let i = (await r.json()).choices?.[0]?.message?.content;
1208
1146
  if (!i) throw Error("No response from OpenAI");
1209
- return Cn(i);
1147
+ return dn(i);
1210
1148
  }
1211
- async function En(e) {
1212
- let t = e.config.model || xn.deepseek, n = e.config.temperature ?? Sn, r = await fetch("https://api.deepseek.com/v1/chat/completions", {
1149
+ async function mn(e) {
1150
+ let t = e.config.model || ln.deepseek, n = e.config.temperature ?? un, r = await fetch("https://api.deepseek.com/v1/chat/completions", {
1213
1151
  body: JSON.stringify({
1214
1152
  messages: [{
1215
- content: bn,
1153
+ content: cn,
1216
1154
  role: "system"
1217
1155
  }, {
1218
1156
  content: e.prompt,
@@ -1234,10 +1172,10 @@ async function En(e) {
1234
1172
  }
1235
1173
  let i = (await r.json()).choices?.[0]?.message?.content;
1236
1174
  if (!i) throw Error("No response from DeepSeek");
1237
- return Cn(i);
1175
+ return dn(i);
1238
1176
  }
1239
- async function Dn(e) {
1240
- let t = e.config.model || xn.claude, n = e.config.temperature ?? Sn, r = await fetch("https://api.anthropic.com/v1/messages", {
1177
+ async function hn(e) {
1178
+ let t = e.config.model || ln.claude, n = e.config.temperature ?? un, r = await fetch("https://api.anthropic.com/v1/messages", {
1241
1179
  body: JSON.stringify({
1242
1180
  max_tokens: 4096,
1243
1181
  messages: [{
@@ -1245,7 +1183,7 @@ async function Dn(e) {
1245
1183
  role: "user"
1246
1184
  }],
1247
1185
  model: t,
1248
- system: bn,
1186
+ system: cn,
1249
1187
  temperature: n
1250
1188
  }),
1251
1189
  headers: {
@@ -1261,75 +1199,75 @@ async function Dn(e) {
1261
1199
  }
1262
1200
  let i = (await r.json()).content?.[0]?.text;
1263
1201
  if (!i) throw Error("No response from Claude");
1264
- return Cn(i);
1202
+ return dn(i);
1265
1203
  }
1266
- function On(e) {
1204
+ function gn(e) {
1267
1205
  switch (e.config.provider) {
1268
- case "gemini": return wn(e);
1269
- case "openai": return Tn(e);
1270
- case "deepseek": return En(e);
1271
- case "claude": return Dn(e);
1206
+ case "gemini": return fn(e);
1207
+ case "openai": return pn(e);
1208
+ case "deepseek": return mn(e);
1209
+ case "claude": return hn(e);
1272
1210
  default: throw Error(`Unsupported AI provider: ${e.config.provider}`);
1273
1211
  }
1274
1212
  }
1275
1213
  //#endregion
1276
1214
  //#region src/editor/features/TreegeEditor/panel/AIGeneratorDialog.tsx
1277
- var kn = ({ aiConfig: e, onGenerate: t }) => {
1278
- let [n, r] = z(!1), [i, a] = z(""), [o, s] = z(!1), c = G(), l = async () => {
1215
+ var _n = ({ aiConfig: e, onGenerate: t }) => {
1216
+ let [n, r] = B(!1), [i, a] = B(""), [o, s] = B(!1), c = G(), l = async () => {
1279
1217
  if (!i.trim()) {
1280
- H.error(c("editor.aiGenerator.enterDescription"));
1218
+ U.error(c("editor.aiGenerator.enterDescription"));
1281
1219
  return;
1282
1220
  }
1283
1221
  if (!e?.apiKey) {
1284
- H.error(c("editor.aiGenerator.missingApiKey"), { description: c("editor.aiGenerator.missingApiKeyDesc") });
1222
+ U.error(c("editor.aiGenerator.missingApiKey"), { description: c("editor.aiGenerator.missingApiKeyDesc") });
1285
1223
  return;
1286
1224
  }
1287
1225
  s(!0);
1288
1226
  try {
1289
- let n = await On({
1227
+ let n = await gn({
1290
1228
  config: e,
1291
1229
  prompt: i.trim()
1292
1230
  });
1293
1231
  t({
1294
1232
  edges: n.edges,
1295
1233
  nodes: n.nodes
1296
- }), 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);
1234
+ }), U.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);
1297
1235
  } catch (e) {
1298
- console.error("AI generation error:", e), H.error(c("editor.aiGenerator.failedToGenerate"), { description: e instanceof Error ? e.message : c("editor.aiGenerator.unknownError") });
1236
+ console.error("AI generation error:", e), U.error(c("editor.aiGenerator.failedToGenerate"), { description: e instanceof Error ? e.message : c("editor.aiGenerator.unknownError") });
1299
1237
  } finally {
1300
1238
  s(!1);
1301
1239
  }
1302
1240
  };
1303
- return /* @__PURE__ */ P(ce, {
1241
+ return /* @__PURE__ */ F(oe, {
1304
1242
  open: n,
1305
1243
  onOpenChange: r,
1306
- children: [/* @__PURE__ */ N(w, {
1244
+ children: [/* @__PURE__ */ P(S, {
1307
1245
  asChild: !0,
1308
- children: /* @__PURE__ */ P(p, {
1246
+ children: /* @__PURE__ */ F(p, {
1309
1247
  variant: "outline",
1310
1248
  size: "sm",
1311
1249
  disabled: !e?.apiKey,
1312
1250
  children: [
1313
- /* @__PURE__ */ N(dt, { className: "h-4 w-4 text-[#13d3b4]" }),
1251
+ /* @__PURE__ */ P(lt, { className: "h-4 w-4 text-[#13d3b4]" }),
1314
1252
  " ",
1315
1253
  c("editor.aiGenerator.buttonLabel")
1316
1254
  ]
1317
1255
  })
1318
- }), /* @__PURE__ */ P(S, {
1319
- className: "sm:max-w-[550px]",
1256
+ }), /* @__PURE__ */ F(b, {
1257
+ className: "sm:max-w-[550px]!",
1320
1258
  children: [
1321
- /* @__PURE__ */ P(re, { children: [/* @__PURE__ */ N(ee, { children: c("editor.aiGenerator.title") }), /* @__PURE__ */ N(C, { children: c("editor.aiGenerator.titleDescription") })] }),
1322
- /* @__PURE__ */ P("div", {
1259
+ /* @__PURE__ */ F(re, { children: [/* @__PURE__ */ P(C, { children: c("editor.aiGenerator.title") }), /* @__PURE__ */ P(x, { children: c("editor.aiGenerator.titleDescription") })] }),
1260
+ /* @__PURE__ */ F("div", {
1323
1261
  className: "grid gap-4 py-4",
1324
- children: [/* @__PURE__ */ P("div", {
1262
+ children: [/* @__PURE__ */ F("div", {
1325
1263
  className: "grid gap-2",
1326
1264
  children: [
1327
- /* @__PURE__ */ N("label", {
1265
+ /* @__PURE__ */ P("label", {
1328
1266
  htmlFor: "ai-prompt",
1329
1267
  className: "font-medium text-sm",
1330
1268
  children: c("editor.aiGenerator.description")
1331
1269
  }),
1332
- /* @__PURE__ */ N(ne, {
1270
+ /* @__PURE__ */ P(ne, {
1333
1271
  placeholder: c("editor.aiGenerator.descriptionPlaceholder"),
1334
1272
  value: i,
1335
1273
  onChange: (e) => a(e.target.value),
@@ -1340,22 +1278,22 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1340
1278
  disabled: o,
1341
1279
  className: "resize-none"
1342
1280
  }),
1343
- /* @__PURE__ */ N("p", {
1281
+ /* @__PURE__ */ P("p", {
1344
1282
  className: "text-muted-foreground text-xs",
1345
1283
  children: c("editor.aiGenerator.keyboardShortcut").replace("{cmdEnter}", "⌘ Enter").replace("{ctrlEnter}", "Ctrl Enter")
1346
1284
  })
1347
1285
  ]
1348
- }), !e?.apiKey && /* @__PURE__ */ P("div", {
1286
+ }), !e?.apiKey && /* @__PURE__ */ F("div", {
1349
1287
  className: "rounded-md bg-muted p-3 text-sm",
1350
- children: [/* @__PURE__ */ N("p", {
1288
+ children: [/* @__PURE__ */ P("p", {
1351
1289
  className: "font-medium",
1352
1290
  children: c("editor.aiGenerator.aiNotConfigured")
1353
- }), /* @__PURE__ */ P("p", {
1291
+ }), /* @__PURE__ */ F("p", {
1354
1292
  className: "mt-1 text-muted-foreground text-xs",
1355
1293
  children: [
1356
1294
  c("editor.aiGenerator.aiNotConfiguredDesc").replace("{code}", ""),
1357
1295
  " ",
1358
- /* @__PURE__ */ N("code", {
1296
+ /* @__PURE__ */ P("code", {
1359
1297
  className: "rounded bg-background px-1 py-0.5",
1360
1298
  children: "aiConfig"
1361
1299
  })
@@ -1363,52 +1301,52 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1363
1301
  })]
1364
1302
  })]
1365
1303
  }),
1366
- /* @__PURE__ */ P(ae, { children: [/* @__PURE__ */ N(p, {
1304
+ /* @__PURE__ */ F(O, { children: [/* @__PURE__ */ P(p, {
1367
1305
  variant: "outline",
1368
1306
  onClick: () => r(!1),
1369
1307
  disabled: o,
1370
1308
  children: c("editor.aiGenerator.cancel")
1371
- }), /* @__PURE__ */ N(p, {
1309
+ }), /* @__PURE__ */ P(p, {
1372
1310
  onClick: l,
1373
1311
  disabled: o || !i.trim() || !e?.apiKey,
1374
- children: o ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(Xe, { className: "h-4 w-4 animate-spin" }), c("editor.aiGenerator.generating")] }) : /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(dt, { className: "h-4 w-4 text-[--treege-color-primary]" }), c("editor.aiGenerator.generate")] })
1312
+ children: o ? /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(Je, { className: "h-4 w-4 animate-spin" }), c("editor.aiGenerator.generating")] }) : /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(lt, { className: "h-4 w-4 text-[--treege-color-primary]" }), c("editor.aiGenerator.generate")] })
1375
1313
  })] })
1376
1314
  ]
1377
1315
  })]
1378
1316
  });
1379
- }, An = Kt(), jn = ({ onExportJson: e, onSave: t }) => {
1380
- let { flowId: n, setFlowId: r, aiConfig: i } = W(), { setNodes: a, setEdges: o, addNodes: s, screenToFlowPosition: c } = j(), l = n || An, u = Ee(), d = Te(), f = bt(null), m = G(), h = () => {
1317
+ }, vn = Wt(), yn = ({ onExportJson: e, onSave: t }) => {
1318
+ let { flowId: n, setFlowId: r, aiConfig: i } = W(), { setNodes: a, setEdges: o, addNodes: s, screenToFlowPosition: c } = M(), l = n || vn, u = we(), d = Ce(), f = vt(null), m = G(), h = () => {
1381
1319
  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({
1382
1320
  x: e - n,
1383
1321
  y: t - r
1384
1322
  });
1385
1323
  s([{
1386
- ...qt,
1387
- id: Kt(),
1324
+ ...Gt,
1325
+ id: Wt(),
1388
1326
  position: i,
1389
1327
  selected: !0
1390
1328
  }]);
1391
- }, g = ({ target: e }) => {
1329
+ }, ee = ({ target: e }) => {
1392
1330
  let t = e.files?.[0];
1393
1331
  if (!t) return;
1394
1332
  let n = new FileReader();
1395
1333
  n.onload = (e) => {
1396
1334
  try {
1397
1335
  let t = JSON.parse(e.target?.result);
1398
- t && Array.isArray(t.nodes) && Array.isArray(t.edges) ? (a(t.nodes), o(t.edges), H.success(m("editor.actionsPanel.importSuccess"), { description: m("editor.actionsPanel.importSuccessDesc") })) : H.error(m("editor.actionsPanel.invalidJson"), { description: m("editor.actionsPanel.invalidJsonDesc") });
1336
+ t && Array.isArray(t.nodes) && Array.isArray(t.edges) ? (a(t.nodes), o(t.edges), U.success(m("editor.actionsPanel.importSuccess"), { description: m("editor.actionsPanel.importSuccessDesc") })) : U.error(m("editor.actionsPanel.invalidJson"), { description: m("editor.actionsPanel.invalidJsonDesc") });
1399
1337
  } catch (e) {
1400
- console.warn(e), H.error(m("editor.actionsPanel.parseError"), { description: m("editor.actionsPanel.parseErrorDesc") });
1338
+ console.warn(e), U.error(m("editor.actionsPanel.parseError"), { description: m("editor.actionsPanel.parseErrorDesc") });
1401
1339
  }
1402
1340
  f.current && (f.current.value = "");
1403
1341
  }, n.readAsText(t);
1404
- }, _ = () => {
1342
+ }, g = () => {
1405
1343
  let t = {
1406
1344
  edges: d,
1407
1345
  id: l,
1408
1346
  nodes: u
1409
1347
  }, i = new Blob([JSON.stringify(t, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
1410
- o.href = a, o.download = "treege.json", o.click(), URL.revokeObjectURL(a), H.success(m("editor.actionsPanel.downloadSuccess"), { description: m("editor.actionsPanel.downloadSuccessDesc") }), n || r?.(l), e?.(t);
1411
- }, v = R(() => {
1348
+ o.href = a, o.download = "treege.json", o.click(), URL.revokeObjectURL(a), U.success(m("editor.actionsPanel.downloadSuccess"), { description: m("editor.actionsPanel.downloadSuccessDesc") }), n || r?.(l), e?.(t);
1349
+ }, _ = z(() => {
1412
1350
  n || r?.(l), t?.({
1413
1351
  edges: d,
1414
1352
  id: l,
@@ -1422,117 +1360,117 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1422
1360
  t,
1423
1361
  r
1424
1362
  ]);
1425
- return _t(() => {
1363
+ return ht(() => {
1426
1364
  let e = (e) => {
1427
- (e.ctrlKey || e.metaKey) && e.key === "s" && (e.preventDefault(), v());
1365
+ (e.ctrlKey || e.metaKey) && e.key === "s" && (e.preventDefault(), _());
1428
1366
  };
1429
1367
  return window.addEventListener("keydown", e), () => {
1430
1368
  window.removeEventListener("keydown", e);
1431
1369
  };
1432
- }, [v]), /* @__PURE__ */ P(ye, {
1370
+ }, [_]), /* @__PURE__ */ F(_e, {
1433
1371
  position: "top-right",
1434
1372
  className: "flex gap-2",
1435
1373
  children: [
1436
- /* @__PURE__ */ N(kn, {
1374
+ /* @__PURE__ */ P(_n, {
1437
1375
  aiConfig: i,
1438
1376
  onGenerate: (e) => {
1439
1377
  a(e.nodes), o(e.edges);
1440
1378
  }
1441
1379
  }),
1442
- /* @__PURE__ */ P(p, {
1380
+ /* @__PURE__ */ F(p, {
1443
1381
  variant: "outline",
1444
1382
  size: "sm",
1445
1383
  onClick: h,
1446
1384
  children: [
1447
- /* @__PURE__ */ N(I, {}),
1385
+ /* @__PURE__ */ P(L, {}),
1448
1386
  " ",
1449
1387
  m("editor.actionsPanel.addNode")
1450
1388
  ]
1451
1389
  }),
1452
- /* @__PURE__ */ P(p, {
1390
+ /* @__PURE__ */ F(p, {
1453
1391
  variant: "outline",
1454
1392
  size: "sm",
1455
- onClick: v,
1393
+ onClick: _,
1456
1394
  children: [
1457
- /* @__PURE__ */ N(rt, {}),
1395
+ /* @__PURE__ */ P(tt, {}),
1458
1396
  " ",
1459
1397
  m("common.save")
1460
1398
  ]
1461
1399
  }),
1462
- /* @__PURE__ */ P(J, { children: [/* @__PURE__ */ N(Y, {
1400
+ /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(Y, {
1463
1401
  asChild: !0,
1464
- children: /* @__PURE__ */ N(p, {
1402
+ children: /* @__PURE__ */ P(p, {
1465
1403
  variant: "outline",
1466
1404
  size: "sm",
1467
- children: /* @__PURE__ */ N(He, {})
1405
+ children: /* @__PURE__ */ P(Be, {})
1468
1406
  })
1469
- }), /* @__PURE__ */ P(X, {
1407
+ }), /* @__PURE__ */ F(X, {
1470
1408
  align: "start",
1471
1409
  children: [
1472
- /* @__PURE__ */ N(zt, {
1410
+ /* @__PURE__ */ P(Lt, {
1473
1411
  className: "font-normal",
1474
- children: /* @__PURE__ */ P("div", {
1412
+ children: /* @__PURE__ */ F("div", {
1475
1413
  className: "flex flex-col gap-1",
1476
- children: [/* @__PURE__ */ N("span", {
1414
+ children: [/* @__PURE__ */ P("span", {
1477
1415
  className: "text-muted-foreground text-xs",
1478
1416
  children: "Flow ID"
1479
- }), /* @__PURE__ */ P("button", {
1417
+ }), /* @__PURE__ */ F("button", {
1480
1418
  onClick: async () => {
1481
1419
  try {
1482
- await navigator.clipboard.writeText(l), H.success(m("editor.actionsPanel.idCopied"), { description: l });
1420
+ await navigator.clipboard.writeText(l), U.success(m("editor.actionsPanel.idCopied"), { description: l });
1483
1421
  } catch {
1484
- H.error(m("editor.actionsPanel.copyFailed"));
1422
+ U.error(m("editor.actionsPanel.copyFailed"));
1485
1423
  }
1486
1424
  },
1487
1425
  className: "flex items-center gap-2 font-mono text-muted-foreground transition-colors hover:text-primary",
1488
1426
  type: "button",
1489
- children: [/* @__PURE__ */ N(Be, { className: "h-3 w-3" }), /* @__PURE__ */ N("span", {
1427
+ children: [/* @__PURE__ */ P(Re, { className: "h-3 w-3" }), /* @__PURE__ */ P("span", {
1490
1428
  className: "truncate text-xs",
1491
1429
  children: l
1492
1430
  })]
1493
1431
  })]
1494
1432
  })
1495
1433
  }),
1496
- /* @__PURE__ */ N(Bt, {}),
1497
- /* @__PURE__ */ P(Rt, { children: [/* @__PURE__ */ P(Z, {
1434
+ /* @__PURE__ */ P(Rt, {}),
1435
+ /* @__PURE__ */ F(It, { children: [/* @__PURE__ */ F(Z, {
1498
1436
  onClick: () => f?.current?.click(),
1499
1437
  children: [
1500
- /* @__PURE__ */ N(Ve, {}),
1438
+ /* @__PURE__ */ P(ze, {}),
1501
1439
  " ",
1502
1440
  m("editor.actionsPanel.importJson")
1503
1441
  ]
1504
- }), /* @__PURE__ */ P(Z, {
1505
- onClick: _,
1442
+ }), /* @__PURE__ */ F(Z, {
1443
+ onClick: g,
1506
1444
  children: [
1507
- /* @__PURE__ */ N(Oe, {}),
1445
+ /* @__PURE__ */ P(Ee, {}),
1508
1446
  " ",
1509
1447
  m("editor.actionsPanel.exportJson")
1510
1448
  ]
1511
1449
  })] }),
1512
- /* @__PURE__ */ N(Bt, {}),
1513
- /* @__PURE__ */ N(Rt, { children: /* @__PURE__ */ P(Z, {
1450
+ /* @__PURE__ */ P(Rt, {}),
1451
+ /* @__PURE__ */ P(It, { children: /* @__PURE__ */ F(Z, {
1514
1452
  onClick: () => {
1515
- a([]), o([]), H.success(m("editor.actionsPanel.clearSuccess"), { description: m("editor.actionsPanel.clearSuccessDesc") });
1453
+ a([]), o([]), U.success(m("editor.actionsPanel.clearSuccess"), { description: m("editor.actionsPanel.clearSuccessDesc") });
1516
1454
  },
1517
1455
  className: "text-destructive focus:text-destructive",
1518
1456
  children: [
1519
- /* @__PURE__ */ N(ct, { className: "text-destructive" }),
1457
+ /* @__PURE__ */ P(ot, { className: "text-destructive" }),
1520
1458
  " ",
1521
1459
  m("editor.actionsPanel.clear")
1522
1460
  ]
1523
1461
  }) })
1524
1462
  ]
1525
1463
  })] }),
1526
- /* @__PURE__ */ N("input", {
1464
+ /* @__PURE__ */ P("input", {
1527
1465
  type: "file",
1528
1466
  accept: "application/json,.json",
1529
1467
  className: "hidden",
1530
1468
  ref: f,
1531
- onChange: g
1469
+ onChange: ee
1532
1470
  })
1533
1471
  ]
1534
1472
  });
1535
- }, Mn = {
1473
+ }, bn = {
1536
1474
  ar: "ar",
1537
1475
  de: "de",
1538
1476
  en: "en",
@@ -1540,19 +1478,19 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1540
1478
  fr: "fr",
1541
1479
  it: "it",
1542
1480
  pt: "pt"
1543
- }, Q = ({ value: e = "en", onValueChange: t }) => /* @__PURE__ */ P(v, {
1481
+ }, Q = ({ value: e = "en", onValueChange: t }) => /* @__PURE__ */ F(g, {
1544
1482
  value: e,
1545
1483
  onValueChange: t,
1546
- children: [/* @__PURE__ */ N(g, {
1484
+ children: [/* @__PURE__ */ P(h, {
1547
1485
  className: "uppercase",
1548
- children: /* @__PURE__ */ N(c, { placeholder: "" })
1549
- }), /* @__PURE__ */ N(k, { children: /* @__PURE__ */ N(A, { children: Object.values(Mn).map((e) => /* @__PURE__ */ N(b, {
1486
+ children: /* @__PURE__ */ P(c, { placeholder: "" })
1487
+ }), /* @__PURE__ */ P(A, { children: /* @__PURE__ */ P(j, { children: Object.values(bn).map((e) => /* @__PURE__ */ P(v, {
1550
1488
  value: e,
1551
1489
  className: "uppercase",
1552
1490
  children: e
1553
1491
  }, e)) }) })]
1554
1492
  }), $ = () => {
1555
- let e = Ee(), t = yt(() => e.filter(i), [e]), n = yt(() => e.filter((e) => e.selected), [e]), r = yt(() => e.find((e) => e.selected), [e]);
1493
+ let e = we(), t = _t(() => e.filter(i), [e]), n = _t(() => e.filter((e) => e.selected), [e]), r = _t(() => e.find((e) => e.selected), [e]);
1556
1494
  return {
1557
1495
  groupNodes: t,
1558
1496
  hasSelectedNodes: n.length > 0,
@@ -1560,8 +1498,8 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1560
1498
  selectedNode: r,
1561
1499
  selectedNodes: n
1562
1500
  };
1563
- }, Nn = () => {
1564
- let [e, t] = z("en"), { updateSelectedNodeData: n } = q(), { selectedNode: r } = $(), i = G(), { Field: a } = F({
1501
+ }, xn = () => {
1502
+ let [e, t] = B("en"), { updateSelectedNodeData: n } = q(), { selectedNode: r } = $(), i = G(), { Field: a } = I({
1565
1503
  defaultValues: {
1566
1504
  label: r?.data?.label || { en: "" },
1567
1505
  targetId: r?.data?.targetId || ""
@@ -1576,22 +1514,22 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1576
1514
  n(e);
1577
1515
  }
1578
1516
  });
1579
- return /* @__PURE__ */ N("form", {
1517
+ return /* @__PURE__ */ P("form", {
1580
1518
  onSubmit: (e) => {
1581
1519
  e.preventDefault(), e.stopPropagation();
1582
1520
  },
1583
- children: /* @__PURE__ */ P("div", {
1521
+ children: /* @__PURE__ */ F("div", {
1584
1522
  className: "grid gap-6",
1585
- children: [/* @__PURE__ */ P("div", {
1523
+ children: [/* @__PURE__ */ F("div", {
1586
1524
  className: "flex items-end gap-2",
1587
- children: [/* @__PURE__ */ N(a, {
1525
+ children: [/* @__PURE__ */ P(a, {
1588
1526
  name: "label",
1589
- children: (t) => /* @__PURE__ */ P(T, {
1527
+ children: (t) => /* @__PURE__ */ F(w, {
1590
1528
  className: "flex-1",
1591
- children: [/* @__PURE__ */ N(l, {
1529
+ children: [/* @__PURE__ */ P(l, {
1592
1530
  htmlFor: t.name,
1593
1531
  children: i("editor.flowNodeForm.label")
1594
- }), /* @__PURE__ */ N(m, {
1532
+ }), /* @__PURE__ */ P(m, {
1595
1533
  id: t.name,
1596
1534
  name: t.name,
1597
1535
  value: t.state.value?.[e] || "",
@@ -1604,31 +1542,31 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1604
1542
  }
1605
1543
  })]
1606
1544
  })
1607
- }), /* @__PURE__ */ N(Q, {
1545
+ }), /* @__PURE__ */ P(Q, {
1608
1546
  value: e,
1609
1547
  onValueChange: t
1610
1548
  })]
1611
- }), /* @__PURE__ */ N(a, {
1549
+ }), /* @__PURE__ */ P(a, {
1612
1550
  name: "targetId",
1613
- children: (e) => /* @__PURE__ */ P(T, { children: [
1614
- /* @__PURE__ */ P(l, {
1551
+ children: (e) => /* @__PURE__ */ F(w, { children: [
1552
+ /* @__PURE__ */ F(l, {
1615
1553
  htmlFor: e.name,
1616
1554
  children: [i("editor.flowNodeForm.targetId"), " (Flow ID)"]
1617
1555
  }),
1618
- /* @__PURE__ */ N(m, {
1556
+ /* @__PURE__ */ P(m, {
1619
1557
  id: e.name,
1620
1558
  name: e.name,
1621
1559
  value: e.state.value,
1622
1560
  onBlur: e.handleBlur,
1623
1561
  onChange: ({ target: t }) => e.handleChange(t.value)
1624
1562
  }),
1625
- /* @__PURE__ */ N(E, { children: "Unique identifier of the target flow." })
1563
+ /* @__PURE__ */ P(T, { children: "Unique identifier of the target flow." })
1626
1564
  ] })
1627
1565
  })]
1628
1566
  })
1629
1567
  });
1630
- }, Pn = () => {
1631
- let [e, t] = z("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), { Field: i } = F({
1568
+ }, Sn = () => {
1569
+ let [e, t] = B("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), { Field: i } = I({
1632
1570
  defaultValues: { label: n?.data?.label || { en: "" } },
1633
1571
  listeners: {
1634
1572
  onChange: ({ formApi: e }) => {
@@ -1640,20 +1578,20 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1640
1578
  r(e);
1641
1579
  }
1642
1580
  });
1643
- return /* @__PURE__ */ N("form", {
1581
+ return /* @__PURE__ */ P("form", {
1644
1582
  onSubmit: (e) => {
1645
1583
  e.preventDefault(), e.stopPropagation();
1646
1584
  },
1647
- children: /* @__PURE__ */ P("div", {
1585
+ children: /* @__PURE__ */ F("div", {
1648
1586
  className: "flex items-end gap-2",
1649
- children: [/* @__PURE__ */ N(i, {
1587
+ children: [/* @__PURE__ */ P(i, {
1650
1588
  name: "label",
1651
- children: (t) => /* @__PURE__ */ P(T, {
1589
+ children: (t) => /* @__PURE__ */ F(w, {
1652
1590
  className: "flex-1",
1653
- children: [/* @__PURE__ */ N(l, {
1591
+ children: [/* @__PURE__ */ P(l, {
1654
1592
  htmlFor: t.name,
1655
1593
  children: "Label"
1656
- }), /* @__PURE__ */ N(m, {
1594
+ }), /* @__PURE__ */ P(m, {
1657
1595
  id: t.name,
1658
1596
  name: t.name,
1659
1597
  value: t.state.value?.[e] || "",
@@ -1666,18 +1604,18 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1666
1604
  }
1667
1605
  })]
1668
1606
  })
1669
- }), /* @__PURE__ */ N(Q, {
1607
+ }), /* @__PURE__ */ P(Q, {
1670
1608
  value: e,
1671
1609
  onValueChange: t
1672
1610
  })]
1673
1611
  })
1674
1612
  });
1675
- }, Fn = [
1613
+ }, Cn = [
1676
1614
  "POST",
1677
1615
  "PUT",
1678
1616
  "PATCH"
1679
- ], In = ({ value: e, onChange: t }) => {
1680
- let { selectedNode: n } = $(), r = G(), i = At(n?.id), { handleSubmit: a, Field: o, Subscribe: s } = F({
1617
+ ], wn = ({ value: e, onChange: t }) => {
1618
+ let { selectedNode: n } = $(), r = G(), i = Ot(n?.id), { handleSubmit: a, Field: o, Subscribe: s } = I({
1681
1619
  defaultValues: {
1682
1620
  body: e?.body || "",
1683
1621
  fetchOnMount: e?.fetchOnMount ?? !e?.searchParam,
@@ -1703,19 +1641,19 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1703
1641
  t(e);
1704
1642
  }
1705
1643
  });
1706
- return /* @__PURE__ */ N("div", { children: /* @__PURE__ */ P("div", {
1644
+ return /* @__PURE__ */ P("div", { children: /* @__PURE__ */ F("div", {
1707
1645
  className: "grid gap-6",
1708
1646
  children: [
1709
- /* @__PURE__ */ N(o, {
1647
+ /* @__PURE__ */ P(o, {
1710
1648
  name: "url",
1711
- children: (e) => /* @__PURE__ */ P(T, { children: [
1712
- /* @__PURE__ */ N(l, {
1649
+ children: (e) => /* @__PURE__ */ F(w, { children: [
1650
+ /* @__PURE__ */ P(l, {
1713
1651
  htmlFor: e.name,
1714
1652
  children: r("editor.httpConfigForm.apiUrl")
1715
1653
  }),
1716
- /* @__PURE__ */ P("div", {
1654
+ /* @__PURE__ */ F("div", {
1717
1655
  className: "flex gap-2",
1718
- children: [/* @__PURE__ */ N(m, {
1656
+ children: [/* @__PURE__ */ P(m, {
1719
1657
  id: e.name,
1720
1658
  name: e.name,
1721
1659
  value: e.state.value,
@@ -1723,30 +1661,30 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1723
1661
  onChange: ({ target: t }) => e.handleChange(t.value),
1724
1662
  placeholder: r("editor.httpConfigForm.apiUrlPlaceholder"),
1725
1663
  className: "flex-1"
1726
- }), /* @__PURE__ */ P(J, { children: [/* @__PURE__ */ N(Y, {
1664
+ }), /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(Y, {
1727
1665
  asChild: !0,
1728
- children: /* @__PURE__ */ N(p, {
1666
+ children: /* @__PURE__ */ P(p, {
1729
1667
  type: "button",
1730
1668
  variant: "outline",
1731
1669
  size: "icon",
1732
- children: /* @__PURE__ */ N(ut, { className: "h-4 w-4" })
1670
+ children: /* @__PURE__ */ P(ct, { className: "h-4 w-4" })
1733
1671
  })
1734
- }), /* @__PURE__ */ N(X, {
1672
+ }), /* @__PURE__ */ P(X, {
1735
1673
  align: "end",
1736
- children: i.length === 0 ? /* @__PURE__ */ N(Z, {
1674
+ children: i.length === 0 ? /* @__PURE__ */ P(Z, {
1737
1675
  disabled: !0,
1738
1676
  children: r("editor.httpConfigForm.noFieldsAvailable")
1739
- }) : i.map((t) => /* @__PURE__ */ N(Z, {
1677
+ }) : i.map((t) => /* @__PURE__ */ P(Z, {
1740
1678
  onClick: () => {
1741
1679
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
1742
1680
  e.handleChange(r + n);
1743
1681
  },
1744
- children: /* @__PURE__ */ P("div", {
1682
+ children: /* @__PURE__ */ F("div", {
1745
1683
  className: "flex flex-col",
1746
- children: [/* @__PURE__ */ N("span", {
1684
+ children: [/* @__PURE__ */ P("span", {
1747
1685
  className: "font-medium",
1748
1686
  children: t.label
1749
- }), /* @__PURE__ */ N("span", {
1687
+ }), /* @__PURE__ */ P("span", {
1750
1688
  className: "text-muted-foreground text-xs",
1751
1689
  children: `{{${t.nodeId}}}`
1752
1690
  })]
@@ -1754,87 +1692,87 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1754
1692
  }, t.nodeId))
1755
1693
  })] })]
1756
1694
  }),
1757
- /* @__PURE__ */ N(E, { children: r("editor.httpConfigForm.apiUrlDesc") })
1695
+ /* @__PURE__ */ P(T, { children: r("editor.httpConfigForm.apiUrlDesc") })
1758
1696
  ] })
1759
1697
  }),
1760
- /* @__PURE__ */ N(o, {
1698
+ /* @__PURE__ */ P(o, {
1761
1699
  name: "method",
1762
- children: (e) => /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
1700
+ children: (e) => /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(l, {
1763
1701
  htmlFor: e.name,
1764
1702
  children: r("editor.httpConfigForm.httpMethod")
1765
- }), /* @__PURE__ */ P(v, {
1703
+ }), /* @__PURE__ */ F(g, {
1766
1704
  value: e.state.value,
1767
1705
  onValueChange: (t) => e.handleChange(t),
1768
- children: [/* @__PURE__ */ N(g, {
1706
+ children: [/* @__PURE__ */ P(h, {
1769
1707
  id: e.name,
1770
- children: /* @__PURE__ */ N(c, { placeholder: r("editor.httpConfigForm.selectMethod") })
1771
- }), /* @__PURE__ */ P(k, { children: [
1772
- /* @__PURE__ */ N(b, {
1708
+ children: /* @__PURE__ */ P(c, { placeholder: r("editor.httpConfigForm.selectMethod") })
1709
+ }), /* @__PURE__ */ F(A, { children: [
1710
+ /* @__PURE__ */ P(v, {
1773
1711
  value: "GET",
1774
1712
  children: r("editor.httpConfigForm.methodGet")
1775
1713
  }),
1776
- /* @__PURE__ */ N(b, {
1714
+ /* @__PURE__ */ P(v, {
1777
1715
  value: "POST",
1778
1716
  children: r("editor.httpConfigForm.methodPost")
1779
1717
  }),
1780
- /* @__PURE__ */ N(b, {
1718
+ /* @__PURE__ */ P(v, {
1781
1719
  value: "PUT",
1782
1720
  children: r("editor.httpConfigForm.methodPut")
1783
1721
  }),
1784
- /* @__PURE__ */ N(b, {
1722
+ /* @__PURE__ */ P(v, {
1785
1723
  value: "DELETE",
1786
1724
  children: r("editor.httpConfigForm.methodDelete")
1787
1725
  }),
1788
- /* @__PURE__ */ N(b, {
1726
+ /* @__PURE__ */ P(v, {
1789
1727
  value: "PATCH",
1790
1728
  children: r("editor.httpConfigForm.methodPatch")
1791
1729
  })
1792
1730
  ] })]
1793
1731
  })] })
1794
1732
  }),
1795
- /* @__PURE__ */ P("div", {
1733
+ /* @__PURE__ */ F("div", {
1796
1734
  className: "space-y-4",
1797
- children: [/* @__PURE__ */ N("h4", {
1735
+ children: [/* @__PURE__ */ P("h4", {
1798
1736
  className: "font-semibold text-sm",
1799
1737
  children: r("editor.httpConfigForm.headers")
1800
- }), /* @__PURE__ */ N(o, {
1738
+ }), /* @__PURE__ */ P(o, {
1801
1739
  name: "headers",
1802
1740
  mode: "array",
1803
- children: (e) => /* @__PURE__ */ P("div", {
1741
+ children: (e) => /* @__PURE__ */ F("div", {
1804
1742
  className: "space-y-2",
1805
1743
  children: [e.state.value?.map((t, n) => {
1806
1744
  let i = `headers[${n}]`;
1807
- return /* @__PURE__ */ P("div", {
1745
+ return /* @__PURE__ */ F("div", {
1808
1746
  className: "flex items-start gap-2",
1809
1747
  children: [
1810
- /* @__PURE__ */ N(o, {
1748
+ /* @__PURE__ */ P(o, {
1811
1749
  name: `headers[${n}].key`,
1812
- children: (e) => /* @__PURE__ */ N(m, {
1750
+ children: (e) => /* @__PURE__ */ P(m, {
1813
1751
  placeholder: r("editor.httpConfigForm.headerName"),
1814
1752
  value: e.state.value || "",
1815
1753
  onChange: ({ target: t }) => e.handleChange(t.value)
1816
1754
  })
1817
1755
  }),
1818
- /* @__PURE__ */ N(o, {
1756
+ /* @__PURE__ */ P(o, {
1819
1757
  name: `headers[${n}].value`,
1820
- children: (e) => /* @__PURE__ */ N(m, {
1758
+ children: (e) => /* @__PURE__ */ P(m, {
1821
1759
  placeholder: r("editor.httpConfigForm.headerValue"),
1822
1760
  value: e.state.value || "",
1823
1761
  onChange: ({ target: t }) => e.handleChange(t.value)
1824
1762
  })
1825
1763
  }),
1826
- /* @__PURE__ */ N(p, {
1764
+ /* @__PURE__ */ P(p, {
1827
1765
  type: "button",
1828
1766
  variant: "ghost",
1829
1767
  size: "icon",
1830
1768
  onClick: () => {
1831
1769
  e.removeValue(n);
1832
1770
  },
1833
- children: /* @__PURE__ */ N(L, { className: "h-4 w-4" })
1771
+ children: /* @__PURE__ */ P(R, { className: "h-4 w-4" })
1834
1772
  })
1835
1773
  ]
1836
1774
  }, i);
1837
- }), /* @__PURE__ */ P(p, {
1775
+ }), /* @__PURE__ */ F(p, {
1838
1776
  type: "button",
1839
1777
  variant: "outline",
1840
1778
  size: "sm",
@@ -1844,64 +1782,64 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1844
1782
  value: ""
1845
1783
  });
1846
1784
  },
1847
- children: [/* @__PURE__ */ N(I, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.addHeader")]
1785
+ children: [/* @__PURE__ */ P(L, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.addHeader")]
1848
1786
  })]
1849
1787
  })
1850
1788
  })]
1851
1789
  }),
1852
- /* @__PURE__ */ N(s, {
1790
+ /* @__PURE__ */ P(s, {
1853
1791
  selector: (e) => ({
1854
1792
  method: e.values.method,
1855
1793
  sendAllFormValues: e.values.sendAllFormValues
1856
1794
  }),
1857
- children: ({ method: e, sendAllFormValues: t }) => Fn.includes(e || "") && /* @__PURE__ */ P("div", {
1795
+ children: ({ method: e, sendAllFormValues: t }) => Cn.includes(e || "") && /* @__PURE__ */ F("div", {
1858
1796
  className: "space-y-4",
1859
- children: [/* @__PURE__ */ N(o, {
1797
+ children: [/* @__PURE__ */ P(o, {
1860
1798
  name: "sendAllFormValues",
1861
- children: (e) => /* @__PURE__ */ P("div", {
1799
+ children: (e) => /* @__PURE__ */ F("div", {
1862
1800
  className: "flex items-center space-x-2",
1863
- children: [/* @__PURE__ */ N(x, {
1801
+ children: [/* @__PURE__ */ P(y, {
1864
1802
  id: e.name,
1865
1803
  checked: e.state.value,
1866
1804
  onCheckedChange: (t) => e.handleChange(t)
1867
- }), /* @__PURE__ */ N(l, {
1805
+ }), /* @__PURE__ */ P(l, {
1868
1806
  htmlFor: e.name,
1869
1807
  children: r("editor.httpConfigForm.sendAllFormValues")
1870
1808
  })]
1871
1809
  })
1872
- }), /* @__PURE__ */ N(o, {
1810
+ }), /* @__PURE__ */ P(o, {
1873
1811
  name: "body",
1874
- children: (e) => /* @__PURE__ */ P(T, { children: [
1875
- /* @__PURE__ */ P("div", {
1812
+ children: (e) => /* @__PURE__ */ F(w, { children: [
1813
+ /* @__PURE__ */ F("div", {
1876
1814
  className: "mb-2 flex items-center justify-between",
1877
- children: [/* @__PURE__ */ N(l, {
1815
+ children: [/* @__PURE__ */ P(l, {
1878
1816
  htmlFor: e.name,
1879
1817
  children: r("editor.httpConfigForm.requestBody")
1880
- }), /* @__PURE__ */ P(J, { children: [/* @__PURE__ */ N(Y, {
1818
+ }), /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(Y, {
1881
1819
  asChild: !0,
1882
- children: /* @__PURE__ */ P(p, {
1820
+ children: /* @__PURE__ */ F(p, {
1883
1821
  type: "button",
1884
1822
  variant: "ghost",
1885
1823
  size: "sm",
1886
1824
  disabled: t,
1887
- children: [/* @__PURE__ */ N(ut, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.insertVariable")]
1825
+ children: [/* @__PURE__ */ P(ct, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.insertVariable")]
1888
1826
  })
1889
- }), /* @__PURE__ */ N(X, {
1827
+ }), /* @__PURE__ */ P(X, {
1890
1828
  align: "end",
1891
- children: i.length === 0 ? /* @__PURE__ */ N(Z, {
1829
+ children: i.length === 0 ? /* @__PURE__ */ P(Z, {
1892
1830
  disabled: !0,
1893
1831
  children: r("editor.httpConfigForm.noFieldsAvailable")
1894
- }) : i.map((t) => /* @__PURE__ */ N(Z, {
1832
+ }) : i.map((t) => /* @__PURE__ */ P(Z, {
1895
1833
  onClick: () => {
1896
1834
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
1897
1835
  e.handleChange(r + n), a().then();
1898
1836
  },
1899
- children: /* @__PURE__ */ P("div", {
1837
+ children: /* @__PURE__ */ F("div", {
1900
1838
  className: "flex flex-col",
1901
- children: [/* @__PURE__ */ N("span", {
1839
+ children: [/* @__PURE__ */ P("span", {
1902
1840
  className: "font-medium",
1903
1841
  children: t.label
1904
- }), /* @__PURE__ */ N("span", {
1842
+ }), /* @__PURE__ */ P("span", {
1905
1843
  className: "text-muted-foreground text-xs",
1906
1844
  children: `{{${t.nodeId}}}`
1907
1845
  })]
@@ -1909,7 +1847,7 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1909
1847
  }, t.nodeId))
1910
1848
  })] })]
1911
1849
  }),
1912
- /* @__PURE__ */ N(ne, {
1850
+ /* @__PURE__ */ P(ne, {
1913
1851
  id: e.name,
1914
1852
  name: e.name,
1915
1853
  value: e.state.value,
@@ -1919,26 +1857,26 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1919
1857
  rows: 4,
1920
1858
  disabled: t
1921
1859
  }),
1922
- /* @__PURE__ */ N(E, { children: r(t ? "editor.httpConfigForm.sendAllFormValuesDesc" : "editor.httpConfigForm.requestBodyDesc") })
1860
+ /* @__PURE__ */ P(T, { children: r(t ? "editor.httpConfigForm.sendAllFormValuesDesc" : "editor.httpConfigForm.requestBodyDesc") })
1923
1861
  ] })
1924
1862
  })]
1925
1863
  })
1926
1864
  }),
1927
- /* @__PURE__ */ P("div", {
1865
+ /* @__PURE__ */ F("div", {
1928
1866
  className: "space-y-4",
1929
1867
  children: [
1930
- /* @__PURE__ */ N("h4", {
1868
+ /* @__PURE__ */ P("h4", {
1931
1869
  className: "font-semibold text-sm",
1932
1870
  children: r("editor.httpConfigForm.responseConfiguration")
1933
1871
  }),
1934
- /* @__PURE__ */ N(o, {
1872
+ /* @__PURE__ */ P(o, {
1935
1873
  name: "responsePath",
1936
- children: (e) => /* @__PURE__ */ P(T, { children: [
1937
- /* @__PURE__ */ N(l, {
1874
+ children: (e) => /* @__PURE__ */ F(w, { children: [
1875
+ /* @__PURE__ */ P(l, {
1938
1876
  htmlFor: e.name,
1939
1877
  children: r("editor.httpConfigForm.responsePath")
1940
1878
  }),
1941
- /* @__PURE__ */ N(m, {
1879
+ /* @__PURE__ */ P(m, {
1942
1880
  id: e.name,
1943
1881
  name: e.name,
1944
1882
  value: e.state.value,
@@ -1946,24 +1884,24 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1946
1884
  onChange: ({ target: t }) => e.handleChange(t.value),
1947
1885
  placeholder: r("editor.httpConfigForm.responsePathPlaceholder")
1948
1886
  }),
1949
- /* @__PURE__ */ N(E, { children: r("editor.httpConfigForm.responsePathDesc") })
1887
+ /* @__PURE__ */ P(T, { children: r("editor.httpConfigForm.responsePathDesc") })
1950
1888
  ] })
1951
1889
  }),
1952
- /* @__PURE__ */ P("div", {
1890
+ /* @__PURE__ */ F("div", {
1953
1891
  className: "space-y-4",
1954
1892
  children: [
1955
- /* @__PURE__ */ N("h5", {
1893
+ /* @__PURE__ */ P("h5", {
1956
1894
  className: "font-medium text-sm",
1957
1895
  children: r("editor.httpConfigForm.mapToOptions")
1958
1896
  }),
1959
- /* @__PURE__ */ N(o, {
1897
+ /* @__PURE__ */ P(o, {
1960
1898
  name: "responseMapping.valueField",
1961
- children: (e) => /* @__PURE__ */ P(T, { children: [
1962
- /* @__PURE__ */ N(l, {
1899
+ children: (e) => /* @__PURE__ */ F(w, { children: [
1900
+ /* @__PURE__ */ P(l, {
1963
1901
  htmlFor: e.name,
1964
1902
  children: r("editor.httpConfigForm.valueField")
1965
1903
  }),
1966
- /* @__PURE__ */ N(m, {
1904
+ /* @__PURE__ */ P(m, {
1967
1905
  id: e.name,
1968
1906
  name: e.name,
1969
1907
  value: e.state.value,
@@ -1971,17 +1909,17 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1971
1909
  onChange: ({ target: t }) => e.handleChange(t.value),
1972
1910
  placeholder: r("editor.httpConfigForm.valueFieldPlaceholder")
1973
1911
  }),
1974
- /* @__PURE__ */ N(E, { children: r("editor.httpConfigForm.valueFieldDesc") })
1912
+ /* @__PURE__ */ P(T, { children: r("editor.httpConfigForm.valueFieldDesc") })
1975
1913
  ] })
1976
1914
  }),
1977
- /* @__PURE__ */ N(o, {
1915
+ /* @__PURE__ */ P(o, {
1978
1916
  name: "responseMapping.labelField",
1979
- children: (e) => /* @__PURE__ */ P(T, { children: [
1980
- /* @__PURE__ */ N(l, {
1917
+ children: (e) => /* @__PURE__ */ F(w, { children: [
1918
+ /* @__PURE__ */ P(l, {
1981
1919
  htmlFor: e.name,
1982
1920
  children: r("editor.httpConfigForm.labelField")
1983
1921
  }),
1984
- /* @__PURE__ */ N(m, {
1922
+ /* @__PURE__ */ P(m, {
1985
1923
  id: e.name,
1986
1924
  name: e.name,
1987
1925
  value: e.state.value,
@@ -1989,19 +1927,19 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1989
1927
  onChange: ({ target: t }) => e.handleChange(t.value),
1990
1928
  placeholder: r("editor.httpConfigForm.labelFieldPlaceholder")
1991
1929
  }),
1992
- /* @__PURE__ */ N(E, { children: r("editor.httpConfigForm.labelFieldDesc") })
1930
+ /* @__PURE__ */ P(T, { children: r("editor.httpConfigForm.labelFieldDesc") })
1993
1931
  ] })
1994
1932
  })
1995
1933
  ]
1996
1934
  }),
1997
- /* @__PURE__ */ N(o, {
1935
+ /* @__PURE__ */ P(o, {
1998
1936
  name: "searchParam",
1999
- children: (e) => /* @__PURE__ */ P(T, { children: [
2000
- /* @__PURE__ */ N(l, {
1937
+ children: (e) => /* @__PURE__ */ F(w, { children: [
1938
+ /* @__PURE__ */ P(l, {
2001
1939
  htmlFor: e.name,
2002
1940
  children: r("editor.httpConfigForm.searchParameter")
2003
1941
  }),
2004
- /* @__PURE__ */ N(m, {
1942
+ /* @__PURE__ */ P(m, {
2005
1943
  id: e.name,
2006
1944
  name: e.name,
2007
1945
  value: e.state.value,
@@ -2009,32 +1947,32 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2009
1947
  onChange: ({ target: t }) => e.handleChange(t.value),
2010
1948
  placeholder: r("editor.httpConfigForm.searchParameterPlaceholder")
2011
1949
  }),
2012
- /* @__PURE__ */ N(E, { children: r("editor.httpConfigForm.searchParameterDesc") })
1950
+ /* @__PURE__ */ P(T, { children: r("editor.httpConfigForm.searchParameterDesc") })
2013
1951
  ] })
2014
1952
  })
2015
1953
  ]
2016
1954
  }),
2017
- /* @__PURE__ */ P("div", {
1955
+ /* @__PURE__ */ F("div", {
2018
1956
  className: "space-y-4",
2019
1957
  children: [
2020
- /* @__PURE__ */ N("h4", {
1958
+ /* @__PURE__ */ P("h4", {
2021
1959
  className: "font-semibold text-sm",
2022
1960
  children: r("editor.httpConfigForm.behavior")
2023
1961
  }),
2024
- /* @__PURE__ */ N(s, {
1962
+ /* @__PURE__ */ P(s, {
2025
1963
  selector: (e) => e.values.searchParam,
2026
- children: (e) => /* @__PURE__ */ N(o, {
1964
+ children: (e) => /* @__PURE__ */ P(o, {
2027
1965
  name: "fetchOnMount",
2028
1966
  children: (t) => {
2029
1967
  let n = !!e?.trim(), i = n ? t.state.value : !0;
2030
- return !n && t.state.value !== !0 && t.handleChange(!0), /* @__PURE__ */ P("div", {
1968
+ return !n && t.state.value !== !0 && t.handleChange(!0), /* @__PURE__ */ F("div", {
2031
1969
  className: "flex items-center space-x-2",
2032
- children: [/* @__PURE__ */ N(x, {
1970
+ children: [/* @__PURE__ */ P(y, {
2033
1971
  id: t.name,
2034
1972
  checked: i,
2035
1973
  disabled: !n,
2036
1974
  onCheckedChange: (e) => t.handleChange(e)
2037
- }), /* @__PURE__ */ N(l, {
1975
+ }), /* @__PURE__ */ P(l, {
2038
1976
  htmlFor: t.name,
2039
1977
  className: n ? "" : "text-muted-foreground",
2040
1978
  children: r("editor.httpConfigForm.fetchOnMount")
@@ -2043,15 +1981,15 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2043
1981
  }
2044
1982
  })
2045
1983
  }),
2046
- /* @__PURE__ */ N(o, {
1984
+ /* @__PURE__ */ P(o, {
2047
1985
  name: "showLoading",
2048
- children: (e) => /* @__PURE__ */ P("div", {
1986
+ children: (e) => /* @__PURE__ */ F("div", {
2049
1987
  className: "flex items-center space-x-2",
2050
- children: [/* @__PURE__ */ N(x, {
1988
+ children: [/* @__PURE__ */ P(y, {
2051
1989
  id: e.name,
2052
1990
  checked: e.state.value,
2053
1991
  onCheckedChange: (t) => e.handleChange(t)
2054
- }), /* @__PURE__ */ N(l, {
1992
+ }), /* @__PURE__ */ P(l, {
2055
1993
  htmlFor: e.name,
2056
1994
  children: r("editor.httpConfigForm.showLoadingState")
2057
1995
  })]
@@ -2061,12 +1999,12 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2061
1999
  })
2062
2000
  ]
2063
2001
  }) });
2064
- }, Ln = [
2002
+ }, Tn = [
2065
2003
  "POST",
2066
2004
  "PUT",
2067
2005
  "PATCH"
2068
- ], Rn = ({ value: e, onChange: t }) => {
2069
- let [n, r] = z("en"), { selectedNode: i } = $(), a = G(), o = At(i?.id), { handleSubmit: s, Field: u, Subscribe: d } = F({
2006
+ ], En = ({ value: e, onChange: t }) => {
2007
+ let [n, r] = B("en"), { selectedNode: i } = $(), a = G(), o = Ot(i?.id), { handleSubmit: s, Field: u, Subscribe: d } = I({
2070
2008
  defaultValues: {
2071
2009
  body: e?.body || "",
2072
2010
  errorMessage: e?.errorMessage || { en: "" },
@@ -2088,19 +2026,19 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2088
2026
  t(e);
2089
2027
  }
2090
2028
  });
2091
- return /* @__PURE__ */ N("div", { children: /* @__PURE__ */ P("div", {
2029
+ return /* @__PURE__ */ P("div", { children: /* @__PURE__ */ F("div", {
2092
2030
  className: "grid gap-6",
2093
2031
  children: [
2094
- /* @__PURE__ */ N(u, {
2032
+ /* @__PURE__ */ P(u, {
2095
2033
  name: "url",
2096
- children: (e) => /* @__PURE__ */ P(T, { children: [
2097
- /* @__PURE__ */ N(l, {
2034
+ children: (e) => /* @__PURE__ */ F(w, { children: [
2035
+ /* @__PURE__ */ P(l, {
2098
2036
  htmlFor: e.name,
2099
2037
  children: a("editor.submitConfigForm.apiUrl")
2100
2038
  }),
2101
- /* @__PURE__ */ P("div", {
2039
+ /* @__PURE__ */ F("div", {
2102
2040
  className: "flex gap-2",
2103
- children: [/* @__PURE__ */ N(m, {
2041
+ children: [/* @__PURE__ */ P(m, {
2104
2042
  id: e.name,
2105
2043
  name: e.name,
2106
2044
  value: e.state.value,
@@ -2108,30 +2046,30 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2108
2046
  onChange: ({ target: t }) => e.handleChange(t.value),
2109
2047
  placeholder: a("editor.submitConfigForm.apiUrlPlaceholder"),
2110
2048
  className: "flex-1"
2111
- }), /* @__PURE__ */ P(J, { children: [/* @__PURE__ */ N(Y, {
2049
+ }), /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(Y, {
2112
2050
  asChild: !0,
2113
- children: /* @__PURE__ */ N(p, {
2051
+ children: /* @__PURE__ */ P(p, {
2114
2052
  type: "button",
2115
2053
  variant: "outline",
2116
2054
  size: "icon",
2117
- children: /* @__PURE__ */ N(ut, { className: "h-4 w-4" })
2055
+ children: /* @__PURE__ */ P(ct, { className: "h-4 w-4" })
2118
2056
  })
2119
- }), /* @__PURE__ */ N(X, {
2057
+ }), /* @__PURE__ */ P(X, {
2120
2058
  align: "end",
2121
- children: o.length === 0 ? /* @__PURE__ */ N(Z, {
2059
+ children: o.length === 0 ? /* @__PURE__ */ P(Z, {
2122
2060
  disabled: !0,
2123
2061
  children: a("editor.submitConfigForm.noFieldsAvailable")
2124
- }) : o.map((t) => /* @__PURE__ */ N(Z, {
2062
+ }) : o.map((t) => /* @__PURE__ */ P(Z, {
2125
2063
  onClick: () => {
2126
2064
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
2127
2065
  e.handleChange(r + n);
2128
2066
  },
2129
- children: /* @__PURE__ */ P("div", {
2067
+ children: /* @__PURE__ */ F("div", {
2130
2068
  className: "flex flex-col",
2131
- children: [/* @__PURE__ */ N("span", {
2069
+ children: [/* @__PURE__ */ P("span", {
2132
2070
  className: "font-medium",
2133
2071
  children: t.label
2134
- }), /* @__PURE__ */ N("span", {
2072
+ }), /* @__PURE__ */ P("span", {
2135
2073
  className: "text-muted-foreground text-xs",
2136
2074
  children: `{{${t.nodeId}}}`
2137
2075
  })]
@@ -2139,83 +2077,83 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2139
2077
  }, t.nodeId))
2140
2078
  })] })]
2141
2079
  }),
2142
- /* @__PURE__ */ N(E, { children: a("editor.submitConfigForm.apiUrlDesc") })
2080
+ /* @__PURE__ */ P(T, { children: a("editor.submitConfigForm.apiUrlDesc") })
2143
2081
  ] })
2144
2082
  }),
2145
- /* @__PURE__ */ N(u, {
2083
+ /* @__PURE__ */ P(u, {
2146
2084
  name: "method",
2147
- children: (e) => /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
2085
+ children: (e) => /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(l, {
2148
2086
  htmlFor: e.name,
2149
2087
  children: a("editor.submitConfigForm.httpMethod")
2150
- }), /* @__PURE__ */ P(v, {
2088
+ }), /* @__PURE__ */ F(g, {
2151
2089
  value: e.state.value,
2152
2090
  onValueChange: (t) => e.handleChange(t),
2153
- children: [/* @__PURE__ */ N(g, {
2091
+ children: [/* @__PURE__ */ P(h, {
2154
2092
  id: e.name,
2155
- children: /* @__PURE__ */ N(c, { placeholder: a("editor.submitConfigForm.selectMethod") })
2156
- }), /* @__PURE__ */ P(k, { children: [
2157
- /* @__PURE__ */ N(b, {
2093
+ children: /* @__PURE__ */ P(c, { placeholder: a("editor.submitConfigForm.selectMethod") })
2094
+ }), /* @__PURE__ */ F(A, { children: [
2095
+ /* @__PURE__ */ P(v, {
2158
2096
  value: "POST",
2159
2097
  children: a("editor.submitConfigForm.methodPost")
2160
2098
  }),
2161
- /* @__PURE__ */ N(b, {
2099
+ /* @__PURE__ */ P(v, {
2162
2100
  value: "PUT",
2163
2101
  children: a("editor.submitConfigForm.methodPut")
2164
2102
  }),
2165
- /* @__PURE__ */ N(b, {
2103
+ /* @__PURE__ */ P(v, {
2166
2104
  value: "DELETE",
2167
2105
  children: a("editor.submitConfigForm.methodDelete")
2168
2106
  }),
2169
- /* @__PURE__ */ N(b, {
2107
+ /* @__PURE__ */ P(v, {
2170
2108
  value: "PATCH",
2171
2109
  children: a("editor.submitConfigForm.methodPatch")
2172
2110
  })
2173
2111
  ] })]
2174
2112
  })] })
2175
2113
  }),
2176
- /* @__PURE__ */ P("div", {
2114
+ /* @__PURE__ */ F("div", {
2177
2115
  className: "space-y-4",
2178
- children: [/* @__PURE__ */ N("h4", {
2116
+ children: [/* @__PURE__ */ P("h4", {
2179
2117
  className: "font-semibold text-sm",
2180
2118
  children: a("editor.submitConfigForm.headers")
2181
- }), /* @__PURE__ */ N(u, {
2119
+ }), /* @__PURE__ */ P(u, {
2182
2120
  name: "headers",
2183
2121
  mode: "array",
2184
- children: (e) => /* @__PURE__ */ P("div", {
2122
+ children: (e) => /* @__PURE__ */ F("div", {
2185
2123
  className: "space-y-2",
2186
2124
  children: [e.state.value?.map((t, n) => {
2187
2125
  let r = `headers[${n}]`;
2188
- return /* @__PURE__ */ P("div", {
2126
+ return /* @__PURE__ */ F("div", {
2189
2127
  className: "flex items-start gap-2",
2190
2128
  children: [
2191
- /* @__PURE__ */ N(u, {
2129
+ /* @__PURE__ */ P(u, {
2192
2130
  name: `headers[${n}].key`,
2193
- children: (e) => /* @__PURE__ */ N(m, {
2131
+ children: (e) => /* @__PURE__ */ P(m, {
2194
2132
  placeholder: a("editor.submitConfigForm.headerName"),
2195
2133
  value: e.state.value || "",
2196
2134
  onChange: ({ target: t }) => e.handleChange(t.value)
2197
2135
  })
2198
2136
  }),
2199
- /* @__PURE__ */ N(u, {
2137
+ /* @__PURE__ */ P(u, {
2200
2138
  name: `headers[${n}].value`,
2201
- children: (e) => /* @__PURE__ */ N(m, {
2139
+ children: (e) => /* @__PURE__ */ P(m, {
2202
2140
  placeholder: a("editor.submitConfigForm.headerValue"),
2203
2141
  value: e.state.value || "",
2204
2142
  onChange: ({ target: t }) => e.handleChange(t.value)
2205
2143
  })
2206
2144
  }),
2207
- /* @__PURE__ */ N(p, {
2145
+ /* @__PURE__ */ P(p, {
2208
2146
  type: "button",
2209
2147
  variant: "ghost",
2210
2148
  size: "icon",
2211
2149
  onClick: () => {
2212
2150
  e.removeValue(n);
2213
2151
  },
2214
- children: /* @__PURE__ */ N(L, { className: "h-4 w-4" })
2152
+ children: /* @__PURE__ */ P(R, { className: "h-4 w-4" })
2215
2153
  })
2216
2154
  ]
2217
2155
  }, r);
2218
- }), /* @__PURE__ */ P(p, {
2156
+ }), /* @__PURE__ */ F(p, {
2219
2157
  type: "button",
2220
2158
  variant: "outline",
2221
2159
  size: "sm",
@@ -2225,64 +2163,64 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2225
2163
  value: ""
2226
2164
  });
2227
2165
  },
2228
- children: [/* @__PURE__ */ N(I, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.addHeader")]
2166
+ children: [/* @__PURE__ */ P(L, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.addHeader")]
2229
2167
  })]
2230
2168
  })
2231
2169
  })]
2232
2170
  }),
2233
- /* @__PURE__ */ N(d, {
2171
+ /* @__PURE__ */ P(d, {
2234
2172
  selector: (e) => ({
2235
2173
  method: e.values.method,
2236
2174
  sendAllFormValues: e.values.sendAllFormValues
2237
2175
  }),
2238
- children: ({ method: e, sendAllFormValues: t }) => Ln.includes(e || "") && /* @__PURE__ */ P("div", {
2176
+ children: ({ method: e, sendAllFormValues: t }) => Tn.includes(e || "") && /* @__PURE__ */ F("div", {
2239
2177
  className: "space-y-4",
2240
- children: [/* @__PURE__ */ N(u, {
2178
+ children: [/* @__PURE__ */ P(u, {
2241
2179
  name: "sendAllFormValues",
2242
- children: (e) => /* @__PURE__ */ P("div", {
2180
+ children: (e) => /* @__PURE__ */ F("div", {
2243
2181
  className: "flex items-center space-x-2",
2244
- children: [/* @__PURE__ */ N(x, {
2182
+ children: [/* @__PURE__ */ P(y, {
2245
2183
  id: e.name,
2246
2184
  checked: e.state.value,
2247
2185
  onCheckedChange: (t) => e.handleChange(t)
2248
- }), /* @__PURE__ */ N(l, {
2186
+ }), /* @__PURE__ */ P(l, {
2249
2187
  htmlFor: e.name,
2250
2188
  children: a("editor.submitConfigForm.sendAllFormValues")
2251
2189
  })]
2252
2190
  })
2253
- }), /* @__PURE__ */ N(u, {
2191
+ }), /* @__PURE__ */ P(u, {
2254
2192
  name: "body",
2255
- children: (e) => /* @__PURE__ */ P(T, { children: [
2256
- /* @__PURE__ */ P("div", {
2193
+ children: (e) => /* @__PURE__ */ F(w, { children: [
2194
+ /* @__PURE__ */ F("div", {
2257
2195
  className: "mb-2 flex items-center justify-between",
2258
- children: [/* @__PURE__ */ N(l, {
2196
+ children: [/* @__PURE__ */ P(l, {
2259
2197
  htmlFor: e.name,
2260
2198
  children: a("editor.submitConfigForm.requestBody")
2261
- }), /* @__PURE__ */ P(J, { children: [/* @__PURE__ */ N(Y, {
2199
+ }), /* @__PURE__ */ F(J, { children: [/* @__PURE__ */ P(Y, {
2262
2200
  asChild: !0,
2263
- children: /* @__PURE__ */ P(p, {
2201
+ children: /* @__PURE__ */ F(p, {
2264
2202
  type: "button",
2265
2203
  variant: "ghost",
2266
2204
  size: "sm",
2267
2205
  disabled: t,
2268
- children: [/* @__PURE__ */ N(ut, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.insertVariable")]
2206
+ children: [/* @__PURE__ */ P(ct, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.insertVariable")]
2269
2207
  })
2270
- }), /* @__PURE__ */ N(X, {
2208
+ }), /* @__PURE__ */ P(X, {
2271
2209
  align: "end",
2272
- children: o.length === 0 ? /* @__PURE__ */ N(Z, {
2210
+ children: o.length === 0 ? /* @__PURE__ */ P(Z, {
2273
2211
  disabled: !0,
2274
2212
  children: a("editor.submitConfigForm.noFieldsAvailable")
2275
- }) : o.map((t) => /* @__PURE__ */ N(Z, {
2213
+ }) : o.map((t) => /* @__PURE__ */ P(Z, {
2276
2214
  onClick: () => {
2277
2215
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
2278
2216
  e.handleChange(r + n), s().then();
2279
2217
  },
2280
- children: /* @__PURE__ */ P("div", {
2218
+ children: /* @__PURE__ */ F("div", {
2281
2219
  className: "flex flex-col",
2282
- children: [/* @__PURE__ */ N("span", {
2220
+ children: [/* @__PURE__ */ P("span", {
2283
2221
  className: "font-medium",
2284
2222
  children: t.label
2285
- }), /* @__PURE__ */ N("span", {
2223
+ }), /* @__PURE__ */ P("span", {
2286
2224
  className: "text-muted-foreground text-xs",
2287
2225
  children: `{{${t.nodeId}}}`
2288
2226
  })]
@@ -2290,7 +2228,7 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2290
2228
  }, t.nodeId))
2291
2229
  })] })]
2292
2230
  }),
2293
- /* @__PURE__ */ N(ne, {
2231
+ /* @__PURE__ */ P(ne, {
2294
2232
  id: e.name,
2295
2233
  name: e.name,
2296
2234
  value: e.state.value,
@@ -2300,26 +2238,26 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2300
2238
  rows: 4,
2301
2239
  disabled: t
2302
2240
  }),
2303
- /* @__PURE__ */ N(E, { children: a(t ? "editor.submitConfigForm.sendAllFormValuesDesc" : "editor.submitConfigForm.requestBodyDesc") })
2241
+ /* @__PURE__ */ P(T, { children: a(t ? "editor.submitConfigForm.sendAllFormValuesDesc" : "editor.submitConfigForm.requestBodyDesc") })
2304
2242
  ] })
2305
2243
  })]
2306
2244
  })
2307
2245
  }),
2308
- /* @__PURE__ */ P("div", {
2246
+ /* @__PURE__ */ F("div", {
2309
2247
  className: "space-y-4",
2310
2248
  children: [
2311
- /* @__PURE__ */ N("h4", {
2249
+ /* @__PURE__ */ P("h4", {
2312
2250
  className: "font-semibold text-sm",
2313
2251
  children: a("editor.submitConfigForm.postSubmission")
2314
2252
  }),
2315
- /* @__PURE__ */ N(u, {
2253
+ /* @__PURE__ */ P(u, {
2316
2254
  name: "redirectUrl",
2317
- children: (e) => /* @__PURE__ */ P(T, { children: [
2318
- /* @__PURE__ */ N(l, {
2255
+ children: (e) => /* @__PURE__ */ F(w, { children: [
2256
+ /* @__PURE__ */ P(l, {
2319
2257
  htmlFor: e.name,
2320
2258
  children: a("editor.submitConfigForm.redirectUrl")
2321
2259
  }),
2322
- /* @__PURE__ */ N(m, {
2260
+ /* @__PURE__ */ P(m, {
2323
2261
  id: e.name,
2324
2262
  name: e.name,
2325
2263
  value: e.state.value,
@@ -2327,21 +2265,21 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2327
2265
  onChange: ({ target: t }) => e.handleChange(t.value),
2328
2266
  placeholder: a("editor.submitConfigForm.redirectUrlPlaceholder")
2329
2267
  }),
2330
- /* @__PURE__ */ N(E, { children: a("editor.submitConfigForm.redirectUrlDesc") })
2268
+ /* @__PURE__ */ P(T, { children: a("editor.submitConfigForm.redirectUrlDesc") })
2331
2269
  ] })
2332
2270
  }),
2333
- /* @__PURE__ */ P("div", {
2271
+ /* @__PURE__ */ F("div", {
2334
2272
  className: "flex items-center gap-2",
2335
- children: [/* @__PURE__ */ N(u, {
2273
+ children: [/* @__PURE__ */ P(u, {
2336
2274
  name: "successMessage",
2337
- children: (e) => /* @__PURE__ */ P(T, {
2275
+ children: (e) => /* @__PURE__ */ F(w, {
2338
2276
  className: "flex-1",
2339
2277
  children: [
2340
- /* @__PURE__ */ N(l, {
2278
+ /* @__PURE__ */ P(l, {
2341
2279
  htmlFor: e.name,
2342
2280
  children: a("editor.submitConfigForm.successMessage")
2343
2281
  }),
2344
- /* @__PURE__ */ N(m, {
2282
+ /* @__PURE__ */ P(m, {
2345
2283
  id: e.name,
2346
2284
  name: e.name,
2347
2285
  value: e.state.value?.[n] || "",
@@ -2354,26 +2292,26 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2354
2292
  },
2355
2293
  placeholder: a("editor.submitConfigForm.successMessagePlaceholder")
2356
2294
  }),
2357
- /* @__PURE__ */ N(E, { children: a("editor.submitConfigForm.successMessageDesc") })
2295
+ /* @__PURE__ */ P(T, { children: a("editor.submitConfigForm.successMessageDesc") })
2358
2296
  ]
2359
2297
  })
2360
- }), /* @__PURE__ */ N(Q, {
2298
+ }), /* @__PURE__ */ P(Q, {
2361
2299
  value: n,
2362
2300
  onValueChange: r
2363
2301
  })]
2364
2302
  }),
2365
- /* @__PURE__ */ P("div", {
2303
+ /* @__PURE__ */ F("div", {
2366
2304
  className: "flex items-center gap-2",
2367
- children: [/* @__PURE__ */ N(u, {
2305
+ children: [/* @__PURE__ */ P(u, {
2368
2306
  name: "errorMessage",
2369
- children: (e) => /* @__PURE__ */ P(T, {
2307
+ children: (e) => /* @__PURE__ */ F(w, {
2370
2308
  className: "flex-1",
2371
2309
  children: [
2372
- /* @__PURE__ */ N(l, {
2310
+ /* @__PURE__ */ P(l, {
2373
2311
  htmlFor: e.name,
2374
2312
  children: a("editor.submitConfigForm.errorMessage")
2375
2313
  }),
2376
- /* @__PURE__ */ N(m, {
2314
+ /* @__PURE__ */ P(m, {
2377
2315
  id: e.name,
2378
2316
  name: e.name,
2379
2317
  value: e.state.value?.[n] || "",
@@ -2386,30 +2324,30 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2386
2324
  },
2387
2325
  placeholder: a("editor.submitConfigForm.errorMessagePlaceholder")
2388
2326
  }),
2389
- /* @__PURE__ */ N(E, { children: a("editor.submitConfigForm.errorMessageDesc") })
2327
+ /* @__PURE__ */ P(T, { children: a("editor.submitConfigForm.errorMessageDesc") })
2390
2328
  ]
2391
2329
  })
2392
- }), /* @__PURE__ */ N(Q, {
2330
+ }), /* @__PURE__ */ P(Q, {
2393
2331
  value: n,
2394
2332
  onValueChange: r
2395
2333
  })]
2396
2334
  })
2397
2335
  ]
2398
2336
  }),
2399
- /* @__PURE__ */ P("div", {
2337
+ /* @__PURE__ */ F("div", {
2400
2338
  className: "space-y-4",
2401
- children: [/* @__PURE__ */ N("h4", {
2339
+ children: [/* @__PURE__ */ P("h4", {
2402
2340
  className: "font-semibold text-sm",
2403
2341
  children: a("editor.submitConfigForm.behavior")
2404
- }), /* @__PURE__ */ N(u, {
2342
+ }), /* @__PURE__ */ P(u, {
2405
2343
  name: "showLoading",
2406
- children: (e) => /* @__PURE__ */ P("div", {
2344
+ children: (e) => /* @__PURE__ */ F("div", {
2407
2345
  className: "flex items-center space-x-2",
2408
- children: [/* @__PURE__ */ N(x, {
2346
+ children: [/* @__PURE__ */ P(y, {
2409
2347
  id: e.name,
2410
2348
  checked: e.state.value,
2411
2349
  onCheckedChange: (t) => e.handleChange(t)
2412
- }), /* @__PURE__ */ N(l, {
2350
+ }), /* @__PURE__ */ P(l, {
2413
2351
  htmlFor: e.name,
2414
2352
  children: a("editor.submitConfigForm.showLoadingState")
2415
2353
  })]
@@ -2418,69 +2356,69 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2418
2356
  })
2419
2357
  ]
2420
2358
  }) });
2421
- }, zn = ({ 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: f = !0, allowCreate: m = !0 }) => {
2422
- let [h, g] = z(!1), [v, b] = z(""), x = (e) => e ?? "", S = (e) => e.trim().toLowerCase(), C = x(n), w = n !== null && n !== "", ee = w ? e.find((e) => x(e.value) === C) : void 0, T = S(v), E = m && T !== "" && !e.some((e) => S(e.label) === T || S(e.value ?? "") === T), ne = (e) => {
2423
- e === C ? f && r?.("") : r?.(e), g(!1), b("");
2359
+ }, Dn = ({ 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: f = !0, allowCreate: m = !0 }) => {
2360
+ let [h, g] = B(!1), [v, y] = B(""), b = (e) => e ?? "", x = (e) => e.trim().toLowerCase(), S = b(n), C = n !== null && n !== "", w = C ? e.find((e) => b(e.value) === S) : void 0, T = x(v), ne = m && T !== "" && !e.some((e) => x(e.label) === T || x(e.value ?? "") === T), re = (e) => {
2361
+ e === S ? f && r?.("") : r?.(e), g(!1), y("");
2424
2362
  };
2425
- return /* @__PURE__ */ P(le, {
2363
+ return /* @__PURE__ */ F(se, {
2426
2364
  open: h,
2427
2365
  onOpenChange: g,
2428
- children: [/* @__PURE__ */ N(u, {
2366
+ children: [/* @__PURE__ */ P(u, {
2429
2367
  asChild: !0,
2430
2368
  id: t,
2431
- children: /* @__PURE__ */ P(p, {
2369
+ children: /* @__PURE__ */ F(p, {
2432
2370
  type: "button",
2433
2371
  variant: "outline",
2434
2372
  role: "combobox",
2435
2373
  "aria-expanded": h,
2436
2374
  className: d("w-full justify-between font-normal", l),
2437
- children: [/* @__PURE__ */ N("span", {
2375
+ children: [/* @__PURE__ */ P("span", {
2438
2376
  className: "truncate",
2439
- children: w && ee ? ee.label : i
2440
- }), /* @__PURE__ */ N(Ie, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
2377
+ children: C && w ? w.label : i
2378
+ }), /* @__PURE__ */ P(Pe, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
2441
2379
  })
2442
- }), /* @__PURE__ */ N(_, {
2380
+ }), /* @__PURE__ */ P(ee, {
2443
2381
  className: "w-full p-0",
2444
2382
  align: "start",
2445
- children: /* @__PURE__ */ P(ie, {
2383
+ children: /* @__PURE__ */ F(E, {
2446
2384
  shouldFilter: !1,
2447
- children: [/* @__PURE__ */ N(y, {
2385
+ children: [/* @__PURE__ */ P(_, {
2448
2386
  placeholder: a,
2449
2387
  value: v,
2450
- onValueChange: b
2451
- }), /* @__PURE__ */ P(O, { children: [
2452
- /* @__PURE__ */ N(oe, { children: c }),
2453
- f && w && /* @__PURE__ */ N(te, { children: /* @__PURE__ */ P(D, {
2388
+ onValueChange: y
2389
+ }), /* @__PURE__ */ F(ae, { children: [
2390
+ /* @__PURE__ */ P(ie, { children: c }),
2391
+ f && C && /* @__PURE__ */ P(te, { children: /* @__PURE__ */ F(D, {
2454
2392
  value: "__clear__",
2455
2393
  onSelect: () => {
2456
- r?.(""), g(!1), b("");
2394
+ r?.(""), g(!1), y("");
2457
2395
  },
2458
2396
  className: "mt-1 text-muted-foreground",
2459
- children: [/* @__PURE__ */ N(L, { className: "mr-2 h-4 w-4" }), s]
2397
+ children: [/* @__PURE__ */ P(R, { className: "mr-2 h-4 w-4" }), s]
2460
2398
  }) }),
2461
- /* @__PURE__ */ P(te, { children: [E && /* @__PURE__ */ P(D, {
2399
+ /* @__PURE__ */ F(te, { children: [ne && /* @__PURE__ */ F(D, {
2462
2400
  value: `__create__${v}`,
2463
2401
  onSelect: () => {
2464
- v.trim() && (r?.(v.trim()), g(!1), b(""));
2402
+ v.trim() && (r?.(v.trim()), g(!1), y(""));
2465
2403
  },
2466
2404
  className: "text-primary",
2467
- children: [/* @__PURE__ */ N(I, { className: "mr-2 h-4 w-4" }), o(v)]
2405
+ children: [/* @__PURE__ */ P(L, { className: "mr-2 h-4 w-4" }), o(v)]
2468
2406
  }), e.filter((e) => {
2469
2407
  let t = v.toLowerCase();
2470
2408
  return e.label.toLowerCase().includes(t) || (e.value?.toLowerCase() ?? "").includes(t);
2471
- }).map((e, t) => /* @__PURE__ */ P(D, {
2409
+ }).map((e, t) => /* @__PURE__ */ F(D, {
2472
2410
  value: e.label,
2473
- onSelect: () => ne(e?.value || ""),
2474
- children: [/* @__PURE__ */ N(Ne, {
2411
+ onSelect: () => re(e?.value || ""),
2412
+ children: [/* @__PURE__ */ P(je, {
2475
2413
  "aria-hidden": "true",
2476
- className: d("mr-2 h-4 w-4", w && x(e.value) === C ? "opacity-100" : "opacity-0")
2414
+ className: d("mr-2 h-4 w-4", C && b(e.value) === S ? "opacity-100" : "opacity-0")
2477
2415
  }), e.label]
2478
2416
  }, e.value ?? e.label ?? t))] })
2479
2417
  ] })]
2480
2418
  })
2481
2419
  })]
2482
2420
  });
2483
- }, Bn = Object.entries({
2421
+ }, On = Object.entries({
2484
2422
  alphanumeric: "^[a-zA-Z0-9]+$",
2485
2423
  email: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
2486
2424
  letters: "^[a-zA-Z]+$",
@@ -2489,52 +2427,52 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2489
2427
  }).map(([e, t]) => ({
2490
2428
  label: e.charAt(0).toUpperCase() + e.slice(1).replace(/_/g, " "),
2491
2429
  value: t
2492
- })), Vn = ({ id: e, value: t, onValueChange: n }) => /* @__PURE__ */ N(zn, {
2430
+ })), kn = ({ id: e, value: t, onValueChange: n }) => /* @__PURE__ */ P(Dn, {
2493
2431
  id: e,
2494
- options: yt(() => t && !Bn.some((e) => e.value === t) ? [...Bn, {
2432
+ options: _t(() => t && !On.some((e) => e.value === t) ? [...On, {
2495
2433
  label: `Custom: ${t}`,
2496
2434
  value: t
2497
- }] : Bn, [t]),
2435
+ }] : On, [t]),
2498
2436
  value: t,
2499
2437
  onValueChange: n,
2500
2438
  placeholder: "Select or create a pattern",
2501
2439
  searchPlaceholder: "Search patterns...",
2502
2440
  createLabel: (e) => `Use pattern: ${e}`
2503
- }), Hn = 400, Un = .8, Wn = (e) => new Promise((t, n) => {
2441
+ }), An = 400, jn = .8, Mn = (e) => new Promise((t, n) => {
2504
2442
  let r = new FileReader();
2505
2443
  r.onerror = () => n(/* @__PURE__ */ Error("read_failed")), r.onload = () => {
2506
2444
  let e = new Image();
2507
2445
  e.onload = () => t(e), e.onerror = () => n(/* @__PURE__ */ Error("decode_failed")), e.src = r.result;
2508
2446
  }, r.readAsDataURL(e);
2509
- }), Gn = async (e) => {
2447
+ }), Nn = async (e) => {
2510
2448
  if (!e.type.startsWith("image/")) throw Error("invalid_type");
2511
2449
  if (e.size > 5242880) throw Error("too_large");
2512
- let t = await Wn(e), n = Math.min(1, Hn / Math.max(t.width, t.height)), r = document.createElement("canvas");
2450
+ let t = await Mn(e), n = Math.min(1, An / Math.max(t.width, t.height)), r = document.createElement("canvas");
2513
2451
  r.width = Math.round(t.width * n), r.height = Math.round(t.height * n);
2514
2452
  let i = r.getContext("2d");
2515
2453
  if (!i) throw Error("canvas_unavailable");
2516
- return i.drawImage(t, 0, 0, r.width, r.height), r.toDataURL("image/jpeg", Un);
2517
- }, Kn = 400, qn = (e) => {
2454
+ return i.drawImage(t, 0, 0, r.width, r.height), r.toDataURL("image/jpeg", jn);
2455
+ }, Pn = 400, Fn = (e) => {
2518
2456
  if (!/^https?:\/\//i.test(e)) return !1;
2519
2457
  try {
2520
2458
  return !!new URL(e).hostname;
2521
2459
  } catch {
2522
2460
  return !1;
2523
2461
  }
2524
- }, Jn = ({ value: e, onChange: t }) => {
2525
- let n = bt(null), r = bt(null), [i, a] = z(!1), [o, s] = z(e && /^https?:\/\//i.test(e) ? e : ""), c = G();
2526
- _t(() => {
2462
+ }, In = ({ value: e, onChange: t }) => {
2463
+ let n = vt(null), r = vt(null), [i, a] = B(!1), [o, s] = B(e && /^https?:\/\//i.test(e) ? e : ""), c = G();
2464
+ ht(() => {
2527
2465
  i || s(e && /^https?:\/\//i.test(e) ? e : "");
2528
- }, [i, e]), _t(() => () => {
2466
+ }, [i, e]), ht(() => () => {
2529
2467
  r.current && clearTimeout(r.current);
2530
2468
  }, []);
2531
2469
  let l = async (e) => {
2532
2470
  let r = e.target.files?.[0];
2533
2471
  if (r) try {
2534
- t(await Gn(r)), a(!1);
2472
+ t(await Nn(r)), a(!1);
2535
2473
  } catch (e) {
2536
2474
  let t = e.message;
2537
- t === "too_large" ? H.error(c("editor.inputNodeForm.optionImageTooLarge")) : t === "invalid_type" ? H.error(c("editor.inputNodeForm.optionImageInvalid")) : H.error(c("editor.inputNodeForm.optionImageError"));
2475
+ t === "too_large" ? U.error(c("editor.inputNodeForm.optionImageTooLarge")) : t === "invalid_type" ? U.error(c("editor.inputNodeForm.optionImageInvalid")) : U.error(c("editor.inputNodeForm.optionImageError"));
2538
2476
  } finally {
2539
2477
  n.current && (n.current.value = "");
2540
2478
  }
@@ -2542,62 +2480,62 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2542
2480
  let e = o.trim();
2543
2481
  e && (t(e), a(!1));
2544
2482
  };
2545
- return /* @__PURE__ */ P("div", {
2483
+ return /* @__PURE__ */ F("div", {
2546
2484
  className: "relative",
2547
2485
  children: [
2548
- /* @__PURE__ */ N("input", {
2486
+ /* @__PURE__ */ P("input", {
2549
2487
  ref: n,
2550
2488
  type: "file",
2551
2489
  accept: "image/*",
2552
2490
  className: "hidden",
2553
2491
  onChange: l
2554
2492
  }),
2555
- /* @__PURE__ */ P(le, {
2493
+ /* @__PURE__ */ F(se, {
2556
2494
  open: i,
2557
2495
  onOpenChange: a,
2558
- children: [/* @__PURE__ */ N(u, {
2496
+ children: [/* @__PURE__ */ P(u, {
2559
2497
  asChild: !0,
2560
- children: e ? /* @__PURE__ */ N("button", {
2498
+ children: e ? /* @__PURE__ */ P("button", {
2561
2499
  type: "button",
2562
2500
  className: "h-9 w-9 cursor-pointer overflow-hidden rounded-md border border-input",
2563
2501
  "aria-label": c("editor.inputNodeForm.optionImageReplace"),
2564
- children: /* @__PURE__ */ N("img", {
2502
+ children: /* @__PURE__ */ P("img", {
2565
2503
  src: e,
2566
2504
  alt: "",
2567
2505
  className: "h-full w-full object-cover"
2568
2506
  })
2569
- }) : /* @__PURE__ */ N(p, {
2507
+ }) : /* @__PURE__ */ P(p, {
2570
2508
  type: "button",
2571
2509
  variant: "outline",
2572
2510
  size: "icon",
2573
2511
  "aria-label": c("editor.inputNodeForm.optionImageAdd"),
2574
- children: /* @__PURE__ */ N(Ke, { className: "h-4 w-4" })
2512
+ children: /* @__PURE__ */ P(We, { className: "h-4 w-4" })
2575
2513
  })
2576
- }), /* @__PURE__ */ P(_, {
2514
+ }), /* @__PURE__ */ F(ee, {
2577
2515
  align: "start",
2578
2516
  className: "w-64 space-y-3 p-3",
2579
2517
  children: [
2580
- /* @__PURE__ */ P(p, {
2518
+ /* @__PURE__ */ F(p, {
2581
2519
  type: "button",
2582
2520
  variant: "outline",
2583
2521
  size: "sm",
2584
2522
  className: "w-full",
2585
2523
  onClick: () => n.current?.click(),
2586
- children: [/* @__PURE__ */ N(lt, { className: "mr-2 h-4 w-4" }), c("editor.inputNodeForm.optionImageUpload")]
2524
+ children: [/* @__PURE__ */ P(st, { className: "mr-2 h-4 w-4" }), c("editor.inputNodeForm.optionImageUpload")]
2587
2525
  }),
2588
- /* @__PURE__ */ N(se, {}),
2589
- /* @__PURE__ */ P("div", {
2526
+ /* @__PURE__ */ P(k, {}),
2527
+ /* @__PURE__ */ F("div", {
2590
2528
  className: "flex items-center gap-2",
2591
- children: [/* @__PURE__ */ N(Je, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ N(m, {
2529
+ children: [/* @__PURE__ */ P(Ke, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ P(m, {
2592
2530
  placeholder: c("editor.inputNodeForm.optionImageUrlPlaceholder"),
2593
2531
  value: o,
2594
2532
  onChange: (n) => {
2595
2533
  let i = n.target.value;
2596
2534
  s(i), r.current && clearTimeout(r.current);
2597
2535
  let a = i.trim();
2598
- !qn(a) || a === e || (r.current = setTimeout(() => {
2536
+ !Fn(a) || a === e || (r.current = setTimeout(() => {
2599
2537
  t(a);
2600
- }, Kn));
2538
+ }, Pn));
2601
2539
  },
2602
2540
  onKeyDown: (e) => {
2603
2541
  e.key === "Enter" && (e.preventDefault(), d());
@@ -2608,65 +2546,65 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2608
2546
  ]
2609
2547
  })]
2610
2548
  }),
2611
- e && /* @__PURE__ */ N("button", {
2549
+ e && /* @__PURE__ */ P("button", {
2612
2550
  type: "button",
2613
2551
  onClick: (e) => {
2614
2552
  e.stopPropagation(), t("");
2615
2553
  },
2616
2554
  className: "-top-1 -right-1 absolute flex h-4 w-4 cursor-pointer items-center justify-center rounded-full bg-destructive text-destructive-foreground",
2617
2555
  "aria-label": c("editor.inputNodeForm.optionImageRemove"),
2618
- children: /* @__PURE__ */ N(L, { className: "h-3 w-3" })
2556
+ children: /* @__PURE__ */ P(R, { className: "h-3 w-3" })
2619
2557
  })
2620
2558
  ]
2621
2559
  });
2622
- }, Yn = ({ value: e, onValueChange: t }) => {
2623
- let n = G(), r = vt();
2624
- return /* @__PURE__ */ P(A, { children: [/* @__PURE__ */ N(ue, {
2560
+ }, Ln = ({ value: e, onValueChange: t }) => {
2561
+ let n = G(), r = gt();
2562
+ return /* @__PURE__ */ F(j, { children: [/* @__PURE__ */ P(ce, {
2625
2563
  htmlFor: r,
2626
2564
  children: n("editor.selectInputType.type")
2627
- }), /* @__PURE__ */ P(v, {
2565
+ }), /* @__PURE__ */ F(g, {
2628
2566
  value: e,
2629
2567
  onValueChange: t,
2630
- children: [/* @__PURE__ */ N(g, {
2568
+ children: [/* @__PURE__ */ P(h, {
2631
2569
  id: r,
2632
2570
  className: "w-full capitalize",
2633
- children: /* @__PURE__ */ N(c, { placeholder: "" })
2634
- }), /* @__PURE__ */ N(k, { children: /* @__PURE__ */ N(A, { children: Object.values(K).map((e) => /* @__PURE__ */ P(b, {
2571
+ children: /* @__PURE__ */ P(c, { placeholder: "" })
2572
+ }), /* @__PURE__ */ P(A, { children: /* @__PURE__ */ P(j, { children: Object.values(K).map((e) => /* @__PURE__ */ F(v, {
2635
2573
  value: e,
2636
2574
  className: "capitalize",
2637
- children: [/* @__PURE__ */ N($t(e), {}), e]
2575
+ children: [/* @__PURE__ */ P(Zt(e), {}), e]
2638
2576
  }, e)) }) })]
2639
2577
  })] });
2640
2578
  };
2641
2579
  //#endregion
2642
2580
  //#region src/shared/components/ui/collapsible.tsx
2643
- function Xn({ ...e }) {
2644
- return /* @__PURE__ */ N(Tt.Root, {
2581
+ function Rn({ ...e }) {
2582
+ return /* @__PURE__ */ P(Ct.Root, {
2645
2583
  "data-slot": "collapsible",
2646
2584
  ...e
2647
2585
  });
2648
2586
  }
2649
- function Zn({ ...e }) {
2650
- return /* @__PURE__ */ N(Tt.CollapsibleTrigger, {
2587
+ function zn({ ...e }) {
2588
+ return /* @__PURE__ */ P(Ct.CollapsibleTrigger, {
2651
2589
  "data-slot": "collapsible-trigger",
2652
2590
  ...e
2653
2591
  });
2654
2592
  }
2655
- function Qn({ ...e }) {
2656
- return /* @__PURE__ */ N(Tt.CollapsibleContent, {
2593
+ function Bn({ ...e }) {
2594
+ return /* @__PURE__ */ P(Ct.CollapsibleContent, {
2657
2595
  "data-slot": "collapsible-content",
2658
2596
  ...e
2659
2597
  });
2660
2598
  }
2661
2599
  //#endregion
2662
2600
  //#region src/editor/features/TreegeEditor/forms/InputNodeForm.tsx
2663
- var $n = () => {
2664
- let [e, t] = z("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), i = [
2601
+ var Vn = () => {
2602
+ let [e, t] = B("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), i = [
2665
2603
  "select",
2666
2604
  "radio",
2667
2605
  "autocomplete",
2668
2606
  "checkbox"
2669
- ].includes(n?.data?.type || ""), a = At(n?.id), o = G(), s = n?.data?.type === "submit", { handleSubmit: u, Field: d } = F({
2607
+ ].includes(n?.data?.type || ""), a = Ot(n?.id), o = G(), s = n?.data?.type === "submit", { handleSubmit: u, Field: d } = I({
2670
2608
  defaultValues: {
2671
2609
  defaultValue: n?.data?.defaultValue,
2672
2610
  disablePast: n?.data?.disablePast,
@@ -2694,30 +2632,30 @@ var $n = () => {
2694
2632
  r(e);
2695
2633
  }
2696
2634
  });
2697
- return /* @__PURE__ */ N("form", {
2635
+ return /* @__PURE__ */ P("form", {
2698
2636
  onSubmit: (e) => {
2699
2637
  e.preventDefault(), e.stopPropagation();
2700
2638
  },
2701
- children: /* @__PURE__ */ P("div", {
2639
+ children: /* @__PURE__ */ F("div", {
2702
2640
  className: "grid gap-6",
2703
2641
  children: [
2704
- /* @__PURE__ */ N(d, {
2642
+ /* @__PURE__ */ P(d, {
2705
2643
  name: "type",
2706
- children: (e) => /* @__PURE__ */ N(T, { children: /* @__PURE__ */ N(Yn, {
2644
+ children: (e) => /* @__PURE__ */ P(w, { children: /* @__PURE__ */ P(Ln, {
2707
2645
  value: e.state.value,
2708
2646
  onValueChange: (t) => e.handleChange(t)
2709
2647
  }) })
2710
2648
  }),
2711
- /* @__PURE__ */ P("div", {
2649
+ /* @__PURE__ */ F("div", {
2712
2650
  className: "flex items-end gap-2",
2713
- children: [/* @__PURE__ */ N(d, {
2651
+ children: [/* @__PURE__ */ P(d, {
2714
2652
  name: "label",
2715
- children: (t) => /* @__PURE__ */ P(T, {
2653
+ children: (t) => /* @__PURE__ */ F(w, {
2716
2654
  className: "flex-1",
2717
- children: [/* @__PURE__ */ N(l, {
2655
+ children: [/* @__PURE__ */ P(l, {
2718
2656
  htmlFor: t.name,
2719
2657
  children: o("editor.inputNodeForm.label")
2720
- }), /* @__PURE__ */ N(m, {
2658
+ }), /* @__PURE__ */ P(m, {
2721
2659
  autoFocus: !0,
2722
2660
  id: t.name,
2723
2661
  name: t.name,
@@ -2731,21 +2669,21 @@ var $n = () => {
2731
2669
  }
2732
2670
  })]
2733
2671
  })
2734
- }), /* @__PURE__ */ N(Q, {
2672
+ }), /* @__PURE__ */ P(Q, {
2735
2673
  value: e,
2736
2674
  onValueChange: t
2737
2675
  })]
2738
2676
  }),
2739
- !s && n?.data?.type !== "file" && /* @__PURE__ */ P("div", {
2677
+ !s && n?.data?.type !== "file" && /* @__PURE__ */ F("div", {
2740
2678
  className: "flex items-end gap-2",
2741
- children: [/* @__PURE__ */ N(d, {
2679
+ children: [/* @__PURE__ */ P(d, {
2742
2680
  name: "placeholder",
2743
- children: (t) => /* @__PURE__ */ P(T, {
2681
+ children: (t) => /* @__PURE__ */ F(w, {
2744
2682
  className: "flex-1",
2745
- children: [/* @__PURE__ */ N(l, {
2683
+ children: [/* @__PURE__ */ P(l, {
2746
2684
  htmlFor: t.name,
2747
2685
  children: o("editor.inputNodeForm.placeholder")
2748
- }), /* @__PURE__ */ N(m, {
2686
+ }), /* @__PURE__ */ P(m, {
2749
2687
  id: t.name,
2750
2688
  name: t.name,
2751
2689
  value: t.state.value?.[e] || "",
@@ -2758,21 +2696,21 @@ var $n = () => {
2758
2696
  }
2759
2697
  })]
2760
2698
  })
2761
- }), /* @__PURE__ */ N(Q, {
2699
+ }), /* @__PURE__ */ P(Q, {
2762
2700
  value: e,
2763
2701
  onValueChange: t
2764
2702
  })]
2765
2703
  }),
2766
- !s && /* @__PURE__ */ P("div", {
2704
+ !s && /* @__PURE__ */ F("div", {
2767
2705
  className: "flex items-end gap-2",
2768
- children: [/* @__PURE__ */ N(d, {
2706
+ children: [/* @__PURE__ */ P(d, {
2769
2707
  name: "helperText",
2770
- children: (t) => /* @__PURE__ */ P(T, {
2708
+ children: (t) => /* @__PURE__ */ F(w, {
2771
2709
  className: "flex-1",
2772
- children: [/* @__PURE__ */ N(l, {
2710
+ children: [/* @__PURE__ */ P(l, {
2773
2711
  htmlFor: t.name,
2774
2712
  children: o("editor.inputNodeForm.helperText")
2775
- }), /* @__PURE__ */ N(m, {
2713
+ }), /* @__PURE__ */ P(m, {
2776
2714
  id: t.name,
2777
2715
  name: t.name,
2778
2716
  value: t.state.value?.[e] || "",
@@ -2785,36 +2723,36 @@ var $n = () => {
2785
2723
  }
2786
2724
  })]
2787
2725
  })
2788
- }), /* @__PURE__ */ N(Q, {
2726
+ }), /* @__PURE__ */ P(Q, {
2789
2727
  value: e,
2790
2728
  onValueChange: t
2791
2729
  })]
2792
2730
  }),
2793
- n?.data?.type === "http" && /* @__PURE__ */ P(Xn, {
2731
+ n?.data?.type === "http" && /* @__PURE__ */ F(Rn, {
2794
2732
  defaultOpen: !0,
2795
2733
  className: "flex w-full max-w-[350px] flex-col gap-2",
2796
- children: [/* @__PURE__ */ N(Zn, {
2734
+ children: [/* @__PURE__ */ P(zn, {
2797
2735
  asChild: !0,
2798
- children: /* @__PURE__ */ P("div", {
2736
+ children: /* @__PURE__ */ F("div", {
2799
2737
  className: "flex items-center justify-between gap-4",
2800
- children: [/* @__PURE__ */ N("h4", {
2738
+ children: [/* @__PURE__ */ P("h4", {
2801
2739
  className: "font-semibold text-sm",
2802
2740
  children: o("editor.inputNodeForm.httpConfiguration")
2803
- }), /* @__PURE__ */ P(p, {
2741
+ }), /* @__PURE__ */ F(p, {
2804
2742
  variant: "ghost",
2805
2743
  size: "icon",
2806
2744
  className: "size-8",
2807
- children: [/* @__PURE__ */ N(Ie, {}), /* @__PURE__ */ N("span", {
2745
+ children: [/* @__PURE__ */ P(Pe, {}), /* @__PURE__ */ P("span", {
2808
2746
  className: "sr-only",
2809
2747
  children: o("common.toggle")
2810
2748
  })]
2811
2749
  })]
2812
2750
  })
2813
- }), /* @__PURE__ */ N(Qn, {
2751
+ }), /* @__PURE__ */ P(Bn, {
2814
2752
  className: "flex flex-col gap-4",
2815
- children: /* @__PURE__ */ N(d, {
2753
+ children: /* @__PURE__ */ P(d, {
2816
2754
  name: "httpConfig",
2817
- children: (e) => /* @__PURE__ */ N(In, {
2755
+ children: (e) => /* @__PURE__ */ P(wn, {
2818
2756
  value: e.state.value,
2819
2757
  onChange: (t) => {
2820
2758
  e.handleChange(t), u().then();
@@ -2823,30 +2761,30 @@ var $n = () => {
2823
2761
  })
2824
2762
  })]
2825
2763
  }),
2826
- s && /* @__PURE__ */ P(Xn, {
2764
+ s && /* @__PURE__ */ F(Rn, {
2827
2765
  className: "flex w-full max-w-[350px] flex-col gap-2",
2828
- children: [/* @__PURE__ */ N(Zn, {
2766
+ children: [/* @__PURE__ */ P(zn, {
2829
2767
  asChild: !0,
2830
- children: /* @__PURE__ */ P("div", {
2768
+ children: /* @__PURE__ */ F("div", {
2831
2769
  className: "flex items-center justify-between gap-4",
2832
- children: [/* @__PURE__ */ N("h4", {
2770
+ children: [/* @__PURE__ */ P("h4", {
2833
2771
  className: "font-semibold text-sm",
2834
2772
  children: o("editor.inputNodeForm.submitConfiguration")
2835
- }), /* @__PURE__ */ P(p, {
2773
+ }), /* @__PURE__ */ F(p, {
2836
2774
  variant: "ghost",
2837
2775
  size: "icon",
2838
2776
  className: "size-8",
2839
- children: [/* @__PURE__ */ N(Ie, {}), /* @__PURE__ */ N("span", {
2777
+ children: [/* @__PURE__ */ P(Pe, {}), /* @__PURE__ */ P("span", {
2840
2778
  className: "sr-only",
2841
2779
  children: o("common.toggle")
2842
2780
  })]
2843
2781
  })]
2844
2782
  })
2845
- }), /* @__PURE__ */ N(Qn, {
2783
+ }), /* @__PURE__ */ P(Bn, {
2846
2784
  className: "flex flex-col gap-4",
2847
- children: /* @__PURE__ */ N(d, {
2785
+ children: /* @__PURE__ */ P(d, {
2848
2786
  name: "submitConfig",
2849
- children: (e) => /* @__PURE__ */ N(Rn, {
2787
+ children: (e) => /* @__PURE__ */ P(En, {
2850
2788
  value: e.state.value,
2851
2789
  onChange: (t) => {
2852
2790
  e.handleChange(t), u().then();
@@ -2855,65 +2793,65 @@ var $n = () => {
2855
2793
  })
2856
2794
  })]
2857
2795
  }),
2858
- n?.data?.type === "file" && /* @__PURE__ */ N(d, {
2796
+ n?.data?.type === "file" && /* @__PURE__ */ P(d, {
2859
2797
  name: "multiple",
2860
- children: (e) => /* @__PURE__ */ P("div", {
2798
+ children: (e) => /* @__PURE__ */ F("div", {
2861
2799
  className: "flex items-center space-x-2",
2862
- children: [/* @__PURE__ */ N(x, {
2800
+ children: [/* @__PURE__ */ P(y, {
2863
2801
  id: e.name,
2864
2802
  checked: e.state.value,
2865
2803
  onCheckedChange: (t) => e.handleChange(t)
2866
- }), /* @__PURE__ */ N(l, {
2804
+ }), /* @__PURE__ */ P(l, {
2867
2805
  htmlFor: e.name,
2868
2806
  children: o("editor.inputNodeForm.multipleFiles")
2869
2807
  })]
2870
2808
  })
2871
2809
  }),
2872
- i && /* @__PURE__ */ P(Xn, {
2810
+ i && /* @__PURE__ */ F(Rn, {
2873
2811
  defaultOpen: !0,
2874
2812
  className: "flex w-full max-w-[350px] flex-col gap-2",
2875
- children: [/* @__PURE__ */ N(Zn, {
2813
+ children: [/* @__PURE__ */ P(zn, {
2876
2814
  asChild: !0,
2877
- children: /* @__PURE__ */ P("div", {
2815
+ children: /* @__PURE__ */ F("div", {
2878
2816
  className: "flex items-center justify-between gap-4",
2879
- children: [/* @__PURE__ */ N("h4", {
2817
+ children: [/* @__PURE__ */ P("h4", {
2880
2818
  className: "font-semibold text-sm",
2881
2819
  children: o("editor.inputNodeForm.options")
2882
- }), /* @__PURE__ */ P(p, {
2820
+ }), /* @__PURE__ */ F(p, {
2883
2821
  variant: "ghost",
2884
2822
  size: "icon",
2885
2823
  className: "size-8",
2886
- children: [/* @__PURE__ */ N(Ie, {}), /* @__PURE__ */ N("span", {
2824
+ children: [/* @__PURE__ */ P(Pe, {}), /* @__PURE__ */ P("span", {
2887
2825
  className: "sr-only",
2888
2826
  children: o("common.toggle")
2889
2827
  })]
2890
2828
  })]
2891
2829
  })
2892
- }), /* @__PURE__ */ P(Qn, {
2830
+ }), /* @__PURE__ */ F(Bn, {
2893
2831
  className: "flex flex-col gap-4",
2894
2832
  children: [
2895
- /* @__PURE__ */ N(d, {
2833
+ /* @__PURE__ */ P(d, {
2896
2834
  name: "options",
2897
2835
  mode: "array",
2898
- children: (t) => /* @__PURE__ */ P("div", {
2836
+ children: (t) => /* @__PURE__ */ F("div", {
2899
2837
  className: "space-y-2",
2900
2838
  children: [t.state.value?.map((r, i) => {
2901
2839
  let a = `options[${i}]`;
2902
- return /* @__PURE__ */ P("div", {
2840
+ return /* @__PURE__ */ F("div", {
2903
2841
  className: "flex flex-col gap-2",
2904
- children: [/* @__PURE__ */ P("div", {
2842
+ children: [/* @__PURE__ */ F("div", {
2905
2843
  className: "flex items-start gap-2",
2906
2844
  children: [
2907
- n?.data?.type === "radio" && /* @__PURE__ */ N(d, {
2845
+ n?.data?.type === "radio" && /* @__PURE__ */ P(d, {
2908
2846
  name: `options[${i}].image`,
2909
- children: (e) => /* @__PURE__ */ N(Jn, {
2847
+ children: (e) => /* @__PURE__ */ P(In, {
2910
2848
  value: e.state.value,
2911
2849
  onChange: (t) => e.handleChange(t)
2912
2850
  })
2913
2851
  }),
2914
- /* @__PURE__ */ N(d, {
2852
+ /* @__PURE__ */ P(d, {
2915
2853
  name: `options[${i}].label`,
2916
- children: (t) => /* @__PURE__ */ N(m, {
2854
+ children: (t) => /* @__PURE__ */ P(m, {
2917
2855
  placeholder: o("editor.inputNodeForm.optionLabel"),
2918
2856
  value: t.state.value?.[e] || "",
2919
2857
  onChange: ({ target: n }) => {
@@ -2924,27 +2862,27 @@ var $n = () => {
2924
2862
  }
2925
2863
  })
2926
2864
  }),
2927
- /* @__PURE__ */ N(d, {
2865
+ /* @__PURE__ */ P(d, {
2928
2866
  name: `options[${i}].value`,
2929
- children: (e) => /* @__PURE__ */ N(m, {
2867
+ children: (e) => /* @__PURE__ */ P(m, {
2930
2868
  placeholder: o("editor.inputNodeForm.optionValue"),
2931
2869
  value: e.state.value || "",
2932
2870
  onChange: ({ target: t }) => e.handleChange(t.value)
2933
2871
  })
2934
2872
  }),
2935
- /* @__PURE__ */ N(p, {
2873
+ /* @__PURE__ */ P(p, {
2936
2874
  type: "button",
2937
2875
  variant: "ghost",
2938
2876
  size: "icon",
2939
2877
  onClick: () => {
2940
2878
  t.removeValue(i), u().then();
2941
2879
  },
2942
- children: /* @__PURE__ */ N(L, { className: "h-4 w-4" })
2880
+ children: /* @__PURE__ */ P(R, { className: "h-4 w-4" })
2943
2881
  })
2944
2882
  ]
2945
- }), (n?.data?.type === "radio" || n?.data?.type === "checkbox") && /* @__PURE__ */ N(d, {
2883
+ }), (n?.data?.type === "radio" || n?.data?.type === "checkbox") && /* @__PURE__ */ P(d, {
2946
2884
  name: `options[${i}].description`,
2947
- children: (t) => /* @__PURE__ */ N(m, {
2885
+ children: (t) => /* @__PURE__ */ P(m, {
2948
2886
  placeholder: o("editor.inputNodeForm.optionDescription"),
2949
2887
  value: t.state.value?.[e] || "",
2950
2888
  onChange: ({ target: n }) => {
@@ -2956,7 +2894,7 @@ var $n = () => {
2956
2894
  })
2957
2895
  })]
2958
2896
  }, a);
2959
- }), /* @__PURE__ */ N(p, {
2897
+ }), /* @__PURE__ */ P(p, {
2960
2898
  type: "button",
2961
2899
  variant: "outline",
2962
2900
  size: "sm",
@@ -2970,36 +2908,36 @@ var $n = () => {
2970
2908
  })]
2971
2909
  })
2972
2910
  }),
2973
- n?.data?.type === "select" && /* @__PURE__ */ N(d, {
2911
+ n?.data?.type === "select" && /* @__PURE__ */ P(d, {
2974
2912
  name: "multiple",
2975
- children: (e) => /* @__PURE__ */ P("div", {
2913
+ children: (e) => /* @__PURE__ */ F("div", {
2976
2914
  className: "flex items-center space-x-2",
2977
- children: [/* @__PURE__ */ N(x, {
2915
+ children: [/* @__PURE__ */ P(y, {
2978
2916
  id: e.name,
2979
2917
  checked: e.state.value,
2980
2918
  onCheckedChange: (t) => e.handleChange(t)
2981
- }), /* @__PURE__ */ N(l, {
2919
+ }), /* @__PURE__ */ P(l, {
2982
2920
  htmlFor: e.name,
2983
2921
  children: o("editor.inputNodeForm.multipleSelection")
2984
2922
  })]
2985
2923
  })
2986
2924
  }),
2987
- n?.data?.type === "radio" && /* @__PURE__ */ N(d, {
2925
+ n?.data?.type === "radio" && /* @__PURE__ */ P(d, {
2988
2926
  name: "variant",
2989
- children: (e) => /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
2927
+ children: (e) => /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(l, {
2990
2928
  htmlFor: e.name,
2991
2929
  children: o("editor.inputNodeForm.variant")
2992
- }), /* @__PURE__ */ P(v, {
2930
+ }), /* @__PURE__ */ F(g, {
2993
2931
  value: e.state.value || "default",
2994
2932
  onValueChange: (t) => e.handleChange(t),
2995
- children: [/* @__PURE__ */ N(g, {
2933
+ children: [/* @__PURE__ */ P(h, {
2996
2934
  id: e.name,
2997
2935
  className: "w-full",
2998
- children: /* @__PURE__ */ N(c, {})
2999
- }), /* @__PURE__ */ P(k, { children: [/* @__PURE__ */ N(b, {
2936
+ children: /* @__PURE__ */ P(c, {})
2937
+ }), /* @__PURE__ */ F(A, { children: [/* @__PURE__ */ P(v, {
3000
2938
  value: "default",
3001
2939
  children: o("editor.inputNodeForm.variantDefault")
3002
- }), /* @__PURE__ */ N(b, {
2940
+ }), /* @__PURE__ */ P(v, {
3003
2941
  value: "card",
3004
2942
  children: o("editor.inputNodeForm.variantCard")
3005
2943
  })] })]
@@ -3008,77 +2946,77 @@ var $n = () => {
3008
2946
  ]
3009
2947
  })]
3010
2948
  }),
3011
- !s && /* @__PURE__ */ P(Xn, {
2949
+ !s && /* @__PURE__ */ F(Rn, {
3012
2950
  className: "flex w-full max-w-[350px] flex-col gap-2",
3013
- children: [/* @__PURE__ */ N(Zn, {
2951
+ children: [/* @__PURE__ */ P(zn, {
3014
2952
  asChild: !0,
3015
- children: /* @__PURE__ */ P("div", {
2953
+ children: /* @__PURE__ */ F("div", {
3016
2954
  className: "flex items-center justify-between gap-4",
3017
- children: [/* @__PURE__ */ N("h4", {
2955
+ children: [/* @__PURE__ */ P("h4", {
3018
2956
  className: "font-semibold text-sm",
3019
2957
  children: o("editor.inputNodeForm.validation")
3020
- }), /* @__PURE__ */ P(p, {
2958
+ }), /* @__PURE__ */ F(p, {
3021
2959
  variant: "ghost",
3022
2960
  size: "icon",
3023
2961
  className: "size-8",
3024
- children: [/* @__PURE__ */ N(Ie, {}), /* @__PURE__ */ N("span", {
2962
+ children: [/* @__PURE__ */ P(Pe, {}), /* @__PURE__ */ P("span", {
3025
2963
  className: "sr-only",
3026
2964
  children: o("common.toggle")
3027
2965
  })]
3028
2966
  })]
3029
2967
  })
3030
- }), /* @__PURE__ */ P(Qn, {
2968
+ }), /* @__PURE__ */ F(Bn, {
3031
2969
  className: "flex flex-col gap-6",
3032
2970
  children: [
3033
- /* @__PURE__ */ N(d, {
2971
+ /* @__PURE__ */ P(d, {
3034
2972
  name: "required",
3035
- children: (e) => /* @__PURE__ */ N(T, { children: /* @__PURE__ */ P("div", {
2973
+ children: (e) => /* @__PURE__ */ P(w, { children: /* @__PURE__ */ F("div", {
3036
2974
  className: "flex items-center space-x-2",
3037
- children: [/* @__PURE__ */ N(x, {
2975
+ children: [/* @__PURE__ */ P(y, {
3038
2976
  id: e.name,
3039
2977
  checked: e.state.value,
3040
2978
  onCheckedChange: (t) => e.handleChange(t)
3041
- }), /* @__PURE__ */ N(l, {
2979
+ }), /* @__PURE__ */ P(l, {
3042
2980
  htmlFor: e.name,
3043
2981
  children: o("editor.inputNodeForm.required")
3044
2982
  })]
3045
2983
  }) })
3046
2984
  }),
3047
- (n?.data?.type === "date" || n?.data?.type === "daterange") && /* @__PURE__ */ N(d, {
2985
+ (n?.data?.type === "date" || n?.data?.type === "daterange") && /* @__PURE__ */ P(d, {
3048
2986
  name: "disablePast",
3049
- children: (e) => /* @__PURE__ */ N(T, { children: /* @__PURE__ */ P("div", {
2987
+ children: (e) => /* @__PURE__ */ P(w, { children: /* @__PURE__ */ F("div", {
3050
2988
  className: "flex items-center space-x-2",
3051
- children: [/* @__PURE__ */ N(x, {
2989
+ children: [/* @__PURE__ */ P(y, {
3052
2990
  id: e.name,
3053
2991
  checked: e.state.value,
3054
2992
  onCheckedChange: (t) => e.handleChange(t)
3055
- }), /* @__PURE__ */ N(l, {
2993
+ }), /* @__PURE__ */ P(l, {
3056
2994
  htmlFor: e.name,
3057
2995
  children: o("editor.inputNodeForm.disablePast")
3058
2996
  })]
3059
2997
  }) })
3060
2998
  }),
3061
- /* @__PURE__ */ N(d, {
2999
+ /* @__PURE__ */ P(d, {
3062
3000
  name: "pattern",
3063
- children: (e) => /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
3001
+ children: (e) => /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(l, {
3064
3002
  htmlFor: e.name,
3065
3003
  children: o("editor.inputNodeForm.pattern")
3066
- }), /* @__PURE__ */ N(Vn, {
3004
+ }), /* @__PURE__ */ P(kn, {
3067
3005
  id: e.name,
3068
3006
  value: e.state.value,
3069
3007
  onValueChange: e.handleChange
3070
3008
  })] })
3071
3009
  }),
3072
- /* @__PURE__ */ P("div", {
3010
+ /* @__PURE__ */ F("div", {
3073
3011
  className: "flex items-end gap-2",
3074
- children: [/* @__PURE__ */ N(d, {
3012
+ children: [/* @__PURE__ */ P(d, {
3075
3013
  name: "errorMessage",
3076
- children: (t) => /* @__PURE__ */ P(T, {
3014
+ children: (t) => /* @__PURE__ */ F(w, {
3077
3015
  className: "flex-1",
3078
- children: [/* @__PURE__ */ N(l, {
3016
+ children: [/* @__PURE__ */ P(l, {
3079
3017
  htmlFor: t.name,
3080
3018
  children: o("editor.inputNodeForm.errorMessage")
3081
- }), /* @__PURE__ */ N(m, {
3019
+ }), /* @__PURE__ */ P(m, {
3082
3020
  id: t.name,
3083
3021
  name: t.name,
3084
3022
  value: t.state.value?.[e] || "",
@@ -3091,7 +3029,7 @@ var $n = () => {
3091
3029
  }
3092
3030
  })]
3093
3031
  })
3094
- }), /* @__PURE__ */ N(Q, {
3032
+ }), /* @__PURE__ */ P(Q, {
3095
3033
  value: e,
3096
3034
  onValueChange: t
3097
3035
  })]
@@ -3099,80 +3037,80 @@ var $n = () => {
3099
3037
  ]
3100
3038
  })]
3101
3039
  }),
3102
- !s && /* @__PURE__ */ P(Xn, {
3040
+ !s && /* @__PURE__ */ F(Rn, {
3103
3041
  className: "flex w-full max-w-[350px] flex-col gap-2",
3104
- children: [/* @__PURE__ */ N(Zn, {
3042
+ children: [/* @__PURE__ */ P(zn, {
3105
3043
  asChild: !0,
3106
- children: /* @__PURE__ */ P("div", {
3044
+ children: /* @__PURE__ */ F("div", {
3107
3045
  className: "flex items-center justify-between gap-4",
3108
- children: [/* @__PURE__ */ N("h4", {
3046
+ children: [/* @__PURE__ */ P("h4", {
3109
3047
  className: "font-semibold text-sm",
3110
3048
  children: o("editor.inputNodeForm.advancedConfiguration")
3111
- }), /* @__PURE__ */ P(p, {
3049
+ }), /* @__PURE__ */ F(p, {
3112
3050
  variant: "ghost",
3113
3051
  size: "icon",
3114
3052
  className: "size-8",
3115
- children: [/* @__PURE__ */ N(Ie, {}), /* @__PURE__ */ N("span", {
3053
+ children: [/* @__PURE__ */ P(Pe, {}), /* @__PURE__ */ P("span", {
3116
3054
  className: "sr-only",
3117
3055
  children: o("common.toggle")
3118
3056
  })]
3119
3057
  })]
3120
3058
  })
3121
- }), /* @__PURE__ */ P(Qn, {
3059
+ }), /* @__PURE__ */ F(Bn, {
3122
3060
  className: "flex flex-col gap-6",
3123
- children: [/* @__PURE__ */ N(d, {
3061
+ children: [/* @__PURE__ */ P(d, {
3124
3062
  name: "name",
3125
- children: (e) => /* @__PURE__ */ P(T, { children: [
3126
- /* @__PURE__ */ N(l, {
3063
+ children: (e) => /* @__PURE__ */ F(w, { children: [
3064
+ /* @__PURE__ */ P(l, {
3127
3065
  htmlFor: e.name,
3128
3066
  children: o("editor.inputNodeForm.name")
3129
3067
  }),
3130
- /* @__PURE__ */ N(m, {
3068
+ /* @__PURE__ */ P(m, {
3131
3069
  id: e.name,
3132
3070
  name: e.name,
3133
3071
  value: e.state.value,
3134
3072
  onBlur: e.handleBlur,
3135
3073
  onChange: ({ target: t }) => e.handleChange(t.value)
3136
3074
  }),
3137
- /* @__PURE__ */ N(E, { children: o("editor.inputNodeForm.nameDescription") })
3075
+ /* @__PURE__ */ P(T, { children: o("editor.inputNodeForm.nameDescription") })
3138
3076
  ] })
3139
- }), /* @__PURE__ */ N(d, {
3077
+ }), /* @__PURE__ */ P(d, {
3140
3078
  name: "defaultValue",
3141
- children: (e) => /* @__PURE__ */ P(M, { children: [
3142
- /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
3079
+ children: (e) => /* @__PURE__ */ F(N, { children: [
3080
+ /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(l, {
3143
3081
  htmlFor: e.name,
3144
3082
  children: o("editor.inputNodeForm.defaultValueType")
3145
- }), /* @__PURE__ */ P(v, {
3083
+ }), /* @__PURE__ */ F(g, {
3146
3084
  value: e.state.value?.type || "none",
3147
3085
  onValueChange: (t) => {
3148
3086
  e.handleChange(t === "none" ? null : { type: t });
3149
3087
  },
3150
- children: [/* @__PURE__ */ N(g, {
3088
+ children: [/* @__PURE__ */ P(h, {
3151
3089
  id: e.name,
3152
- children: /* @__PURE__ */ N(c, { placeholder: o("editor.inputNodeForm.selectType") })
3153
- }), /* @__PURE__ */ P(k, { children: [
3154
- /* @__PURE__ */ N(b, {
3090
+ children: /* @__PURE__ */ P(c, { placeholder: o("editor.inputNodeForm.selectType") })
3091
+ }), /* @__PURE__ */ F(A, { children: [
3092
+ /* @__PURE__ */ P(v, {
3155
3093
  value: "none",
3156
3094
  children: o("editor.inputNodeForm.defaultValueTypeNone")
3157
3095
  }),
3158
- /* @__PURE__ */ N(b, {
3096
+ /* @__PURE__ */ P(v, {
3159
3097
  value: "static",
3160
3098
  children: o("editor.inputNodeForm.defaultValueTypeStatic")
3161
3099
  }),
3162
- /* @__PURE__ */ N(b, {
3100
+ /* @__PURE__ */ P(v, {
3163
3101
  value: "reference",
3164
3102
  children: o("editor.inputNodeForm.defaultValueTypeReference")
3165
3103
  })
3166
3104
  ] })]
3167
3105
  })] }),
3168
- e.state.value?.type === "static" && /* @__PURE__ */ N(d, {
3106
+ e.state.value?.type === "static" && /* @__PURE__ */ P(d, {
3169
3107
  name: "defaultValue.staticValue",
3170
3108
  children: (e) => {
3171
3109
  let t = n?.data?.type;
3172
- return (t === "select" || t === "checkbox") && n?.data?.multiple ? /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
3110
+ return (t === "select" || t === "checkbox") && n?.data?.multiple ? /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(l, {
3173
3111
  htmlFor: e.name,
3174
3112
  children: o("editor.inputNodeForm.defaultValuesCommaSeparated")
3175
- }), /* @__PURE__ */ N(m, {
3113
+ }), /* @__PURE__ */ P(m, {
3176
3114
  id: e.name,
3177
3115
  placeholder: o("editor.inputNodeForm.defaultValuesPlaceholder"),
3178
3116
  value: Array.isArray(e.state.value) ? e.state.value.join(", ") : "",
@@ -3180,20 +3118,20 @@ var $n = () => {
3180
3118
  let n = t.value.split(",").map((e) => e.trim()).filter(Boolean);
3181
3119
  e.handleChange(n.length > 0 ? n : null);
3182
3120
  }
3183
- })] }) : t === "checkbox" ? /* @__PURE__ */ N(T, { children: /* @__PURE__ */ P("div", {
3121
+ })] }) : t === "checkbox" ? /* @__PURE__ */ P(w, { children: /* @__PURE__ */ F("div", {
3184
3122
  className: "flex items-center space-x-2",
3185
- children: [/* @__PURE__ */ N(x, {
3123
+ children: [/* @__PURE__ */ P(y, {
3186
3124
  id: e.name,
3187
3125
  checked: !!e.state.value,
3188
3126
  onCheckedChange: (t) => e.handleChange(t)
3189
- }), /* @__PURE__ */ N(l, {
3127
+ }), /* @__PURE__ */ P(l, {
3190
3128
  htmlFor: e.name,
3191
3129
  children: o("editor.inputNodeForm.defaultChecked")
3192
3130
  })]
3193
- }) }) : /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
3131
+ }) }) : /* @__PURE__ */ F(w, { children: [/* @__PURE__ */ P(l, {
3194
3132
  htmlFor: e.name,
3195
3133
  children: o("editor.inputNodeForm.staticValue")
3196
- }), /* @__PURE__ */ N(m, {
3134
+ }), /* @__PURE__ */ P(m, {
3197
3135
  id: e.name,
3198
3136
  placeholder: o("editor.inputNodeForm.staticValuePlaceholder"),
3199
3137
  value: typeof e.state.value == "string" ? e.state.value : "",
@@ -3201,27 +3139,27 @@ var $n = () => {
3201
3139
  })] });
3202
3140
  }
3203
3141
  }),
3204
- e.state.value?.type === "reference" && /* @__PURE__ */ P(M, { children: [
3205
- /* @__PURE__ */ N(d, {
3142
+ e.state.value?.type === "reference" && /* @__PURE__ */ F(N, { children: [
3143
+ /* @__PURE__ */ P(d, {
3206
3144
  name: "defaultValue.referenceField",
3207
- children: (e) => /* @__PURE__ */ P(T, { children: [
3208
- /* @__PURE__ */ N(l, {
3145
+ children: (e) => /* @__PURE__ */ F(w, { children: [
3146
+ /* @__PURE__ */ P(l, {
3209
3147
  htmlFor: e.name,
3210
3148
  children: o("editor.inputNodeForm.referenceField")
3211
3149
  }),
3212
- /* @__PURE__ */ P(v, {
3150
+ /* @__PURE__ */ F(g, {
3213
3151
  value: e.state.value || "",
3214
3152
  onValueChange: (t) => {
3215
3153
  e.handleChange(t);
3216
3154
  },
3217
- children: [/* @__PURE__ */ N(g, {
3155
+ children: [/* @__PURE__ */ P(h, {
3218
3156
  id: e.name,
3219
- children: /* @__PURE__ */ N(c, { placeholder: o("editor.inputNodeForm.selectReferenceField") })
3220
- }), /* @__PURE__ */ N(k, { children: a.length === 0 ? /* @__PURE__ */ N(b, {
3157
+ children: /* @__PURE__ */ P(c, { placeholder: o("editor.inputNodeForm.selectReferenceField") })
3158
+ }), /* @__PURE__ */ P(A, { children: a.length === 0 ? /* @__PURE__ */ P(v, {
3221
3159
  value: "none",
3222
3160
  disabled: !0,
3223
3161
  children: o("editor.inputNodeForm.noParentFieldsAvailable")
3224
- }) : a.map((e) => /* @__PURE__ */ P(b, {
3162
+ }) : a.map((e) => /* @__PURE__ */ F(v, {
3225
3163
  value: e.nodeId,
3226
3164
  children: [
3227
3165
  e.label,
@@ -3231,17 +3169,17 @@ var $n = () => {
3231
3169
  ]
3232
3170
  }, e.nodeId)) })]
3233
3171
  }),
3234
- a.length === 0 && /* @__PURE__ */ N(E, { children: o("editor.inputNodeForm.addInputFieldsBeforeReference") })
3172
+ a.length === 0 && /* @__PURE__ */ P(T, { children: o("editor.inputNodeForm.addInputFieldsBeforeReference") })
3235
3173
  ] })
3236
3174
  }),
3237
- /* @__PURE__ */ N(d, {
3175
+ /* @__PURE__ */ P(d, {
3238
3176
  name: "defaultValue.transformFunction",
3239
- children: (t) => /* @__PURE__ */ P(T, { children: [
3240
- /* @__PURE__ */ N(l, {
3177
+ children: (t) => /* @__PURE__ */ F(w, { children: [
3178
+ /* @__PURE__ */ P(l, {
3241
3179
  htmlFor: t.name,
3242
3180
  children: o("editor.inputNodeForm.transformType")
3243
3181
  }),
3244
- /* @__PURE__ */ P(v, {
3182
+ /* @__PURE__ */ F(g, {
3245
3183
  value: t.state.value || "none",
3246
3184
  onValueChange: (n) => {
3247
3185
  let r = n === "none" ? null : n;
@@ -3253,80 +3191,80 @@ var $n = () => {
3253
3191
  });
3254
3192
  }
3255
3193
  },
3256
- children: [/* @__PURE__ */ N(g, {
3194
+ children: [/* @__PURE__ */ P(h, {
3257
3195
  id: t.name,
3258
- children: /* @__PURE__ */ N(c, { placeholder: o("editor.inputNodeForm.selectTransformation") })
3259
- }), /* @__PURE__ */ P(k, { children: [
3260
- /* @__PURE__ */ N(b, {
3196
+ children: /* @__PURE__ */ P(c, { placeholder: o("editor.inputNodeForm.selectTransformation") })
3197
+ }), /* @__PURE__ */ F(A, { children: [
3198
+ /* @__PURE__ */ P(v, {
3261
3199
  value: "none",
3262
3200
  children: o("editor.inputNodeForm.transformNone")
3263
3201
  }),
3264
- /* @__PURE__ */ N(b, {
3202
+ /* @__PURE__ */ P(v, {
3265
3203
  value: "toString",
3266
3204
  children: o("editor.inputNodeForm.transformString")
3267
3205
  }),
3268
- /* @__PURE__ */ N(b, {
3206
+ /* @__PURE__ */ P(v, {
3269
3207
  value: "toNumber",
3270
3208
  children: o("editor.inputNodeForm.transformNumber")
3271
3209
  }),
3272
- /* @__PURE__ */ N(b, {
3210
+ /* @__PURE__ */ P(v, {
3273
3211
  value: "toBoolean",
3274
3212
  children: o("editor.inputNodeForm.transformBoolean")
3275
3213
  }),
3276
- /* @__PURE__ */ N(b, {
3214
+ /* @__PURE__ */ P(v, {
3277
3215
  value: "toArray",
3278
3216
  children: o("editor.inputNodeForm.transformArray")
3279
3217
  }),
3280
- /* @__PURE__ */ N(b, {
3218
+ /* @__PURE__ */ P(v, {
3281
3219
  value: "toObject",
3282
3220
  children: o("editor.inputNodeForm.transformMapToObject")
3283
3221
  })
3284
3222
  ] })]
3285
3223
  }),
3286
- /* @__PURE__ */ N(E, { children: o("editor.inputNodeForm.transformDesc") })
3224
+ /* @__PURE__ */ P(T, { children: o("editor.inputNodeForm.transformDesc") })
3287
3225
  ] })
3288
3226
  }),
3289
- e.state.value?.transformFunction === "toObject" && /* @__PURE__ */ N(d, {
3227
+ e.state.value?.transformFunction === "toObject" && /* @__PURE__ */ P(d, {
3290
3228
  name: "defaultValue.objectMapping",
3291
3229
  mode: "array",
3292
- children: (e) => /* @__PURE__ */ P(T, { children: [
3293
- /* @__PURE__ */ N(l, { children: o("editor.inputNodeForm.objectMapping") }),
3294
- /* @__PURE__ */ P("div", {
3230
+ children: (e) => /* @__PURE__ */ F(w, { children: [
3231
+ /* @__PURE__ */ P(l, { children: o("editor.inputNodeForm.objectMapping") }),
3232
+ /* @__PURE__ */ F("div", {
3295
3233
  className: "space-y-2",
3296
- children: [e.state.value?.map((t, n) => /* @__PURE__ */ P("div", {
3234
+ children: [e.state.value?.map((t, n) => /* @__PURE__ */ F("div", {
3297
3235
  className: "flex items-center gap-2",
3298
3236
  children: [
3299
- /* @__PURE__ */ N(d, {
3237
+ /* @__PURE__ */ P(d, {
3300
3238
  name: `defaultValue.objectMapping[${n}].sourceKey`,
3301
- children: (e) => /* @__PURE__ */ N(m, {
3239
+ children: (e) => /* @__PURE__ */ P(m, {
3302
3240
  placeholder: o("editor.inputNodeForm.sourceKey"),
3303
3241
  value: e.state.value || "",
3304
3242
  onChange: ({ target: t }) => e.handleChange(t.value)
3305
3243
  })
3306
3244
  }),
3307
- /* @__PURE__ */ N("span", {
3245
+ /* @__PURE__ */ P("span", {
3308
3246
  className: "text-muted-foreground",
3309
3247
  children: "→"
3310
3248
  }),
3311
- /* @__PURE__ */ N(d, {
3249
+ /* @__PURE__ */ P(d, {
3312
3250
  name: `defaultValue.objectMapping[${n}].targetKey`,
3313
- children: (e) => /* @__PURE__ */ N(m, {
3251
+ children: (e) => /* @__PURE__ */ P(m, {
3314
3252
  placeholder: o("editor.inputNodeForm.targetKey"),
3315
3253
  value: e.state.value || "",
3316
3254
  onChange: ({ target: t }) => e.handleChange(t.value)
3317
3255
  })
3318
3256
  }),
3319
- /* @__PURE__ */ N(p, {
3257
+ /* @__PURE__ */ P(p, {
3320
3258
  type: "button",
3321
3259
  variant: "ghost",
3322
3260
  size: "icon",
3323
3261
  onClick: () => {
3324
3262
  e.removeValue(n), u().then();
3325
3263
  },
3326
- children: /* @__PURE__ */ N(L, { className: "h-4 w-4" })
3264
+ children: /* @__PURE__ */ P(R, { className: "h-4 w-4" })
3327
3265
  })
3328
3266
  ]
3329
- }, `mapping-${n}`)), /* @__PURE__ */ P(p, {
3267
+ }, `mapping-${n}`)), /* @__PURE__ */ F(p, {
3330
3268
  type: "button",
3331
3269
  variant: "outline",
3332
3270
  size: "sm",
@@ -3337,10 +3275,10 @@ var $n = () => {
3337
3275
  targetKey: ""
3338
3276
  }), u().then();
3339
3277
  },
3340
- children: [/* @__PURE__ */ N(I, { className: "mr-2 h-4 w-4" }), o("editor.inputNodeForm.addMapping")]
3278
+ children: [/* @__PURE__ */ P(L, { className: "mr-2 h-4 w-4" }), o("editor.inputNodeForm.addMapping")]
3341
3279
  })]
3342
3280
  }),
3343
- /* @__PURE__ */ N(E, { children: o("editor.inputNodeForm.objectMappingDesc") })
3281
+ /* @__PURE__ */ P(T, { children: o("editor.inputNodeForm.objectMappingDesc") })
3344
3282
  ] })
3345
3283
  })
3346
3284
  ] })
@@ -3351,8 +3289,8 @@ var $n = () => {
3351
3289
  ]
3352
3290
  })
3353
3291
  });
3354
- }, er = () => {
3355
- let [e, t] = z("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), { Field: i } = F({
3292
+ }, Hn = () => {
3293
+ let [e, t] = B("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), { Field: i } = I({
3356
3294
  defaultValues: {
3357
3295
  label: n?.data?.label || { en: "" },
3358
3296
  type: n?.data?.type || ""
@@ -3367,22 +3305,22 @@ var $n = () => {
3367
3305
  r(e);
3368
3306
  }
3369
3307
  });
3370
- return /* @__PURE__ */ N("form", {
3308
+ return /* @__PURE__ */ P("form", {
3371
3309
  onSubmit: (e) => {
3372
3310
  e.preventDefault(), e.stopPropagation();
3373
3311
  },
3374
- children: /* @__PURE__ */ P("div", {
3312
+ children: /* @__PURE__ */ F("div", {
3375
3313
  className: "grid gap-6",
3376
- children: [/* @__PURE__ */ P("div", {
3314
+ children: [/* @__PURE__ */ F("div", {
3377
3315
  className: "flex items-end gap-2",
3378
- children: [/* @__PURE__ */ N(i, {
3316
+ children: [/* @__PURE__ */ P(i, {
3379
3317
  name: "label",
3380
- children: (t) => /* @__PURE__ */ P(T, {
3318
+ children: (t) => /* @__PURE__ */ F(w, {
3381
3319
  className: "flex-1",
3382
- children: [/* @__PURE__ */ N(l, {
3320
+ children: [/* @__PURE__ */ P(l, {
3383
3321
  htmlFor: t.name,
3384
3322
  children: "Label"
3385
- }), /* @__PURE__ */ N(m, {
3323
+ }), /* @__PURE__ */ P(m, {
3386
3324
  id: t.name,
3387
3325
  name: t.name,
3388
3326
  value: t.state.value?.[e] || "",
@@ -3395,37 +3333,37 @@ var $n = () => {
3395
3333
  }
3396
3334
  })]
3397
3335
  })
3398
- }), /* @__PURE__ */ N(Q, {
3336
+ }), /* @__PURE__ */ P(Q, {
3399
3337
  value: e,
3400
3338
  onValueChange: t
3401
3339
  })]
3402
- }), /* @__PURE__ */ N(i, {
3340
+ }), /* @__PURE__ */ P(i, {
3403
3341
  name: "type",
3404
- children: (e) => /* @__PURE__ */ P(A, { children: [/* @__PURE__ */ N(ue, {
3342
+ children: (e) => /* @__PURE__ */ F(j, { children: [/* @__PURE__ */ P(ce, {
3405
3343
  htmlFor: e.name,
3406
3344
  children: "Type"
3407
- }), /* @__PURE__ */ P(v, {
3345
+ }), /* @__PURE__ */ F(g, {
3408
3346
  value: e.state.value,
3409
3347
  onValueChange: (t) => e.handleChange(t),
3410
- children: [/* @__PURE__ */ N(g, {
3348
+ children: [/* @__PURE__ */ P(h, {
3411
3349
  id: e.name,
3412
3350
  className: "w-full",
3413
- children: /* @__PURE__ */ N(c, { placeholder: "" })
3414
- }), /* @__PURE__ */ N(k, { children: /* @__PURE__ */ P(A, { children: [/* @__PURE__ */ N(b, {
3415
- value: Yt.title,
3351
+ children: /* @__PURE__ */ P(c, { placeholder: "" })
3352
+ }), /* @__PURE__ */ P(A, { children: /* @__PURE__ */ F(j, { children: [/* @__PURE__ */ P(v, {
3353
+ value: qt.title,
3416
3354
  children: "Title"
3417
- }), /* @__PURE__ */ N(b, {
3418
- value: Yt.divider,
3355
+ }), /* @__PURE__ */ P(v, {
3356
+ value: qt.divider,
3419
3357
  children: "Divider"
3420
3358
  })] }) })]
3421
3359
  })] })
3422
3360
  })]
3423
3361
  })
3424
3362
  });
3425
- }, tr = () => {
3426
- let [e, t] = z(""), [n, r] = z(!1), { selectedNode: a, groupNodes: o } = $(), { setNodes: s } = j(), d = a?.parentId || "none", f = i(a), h = G(), y = vt(), x = vt();
3363
+ }, Un = () => {
3364
+ let [e, t] = B(""), [n, r] = B(!1), { selectedNode: a, groupNodes: o } = $(), { setNodes: s } = M(), d = a?.parentId || "none", f = i(a), _ = G(), y = gt(), b = gt();
3427
3365
  if (f) return null;
3428
- let S = (e) => {
3366
+ let x = (e) => {
3429
3367
  a && s((t) => e === "none" ? t.map((e) => {
3430
3368
  if (e.id === a.id) {
3431
3369
  let { parentId: t, extent: n, ...r } = e;
@@ -3441,16 +3379,16 @@ var $n = () => {
3441
3379
  y: 80
3442
3380
  }
3443
3381
  } : t) : t);
3444
- }, C = () => {
3382
+ }, S = () => {
3445
3383
  if (!(e.trim() && a)) return;
3446
3384
  if (o.find((t) => {
3447
3385
  let n = t.data?.label?.en || t.data?.label;
3448
3386
  return String(n).toLowerCase() === e.trim().toLowerCase();
3449
3387
  })) {
3450
- H.error("This group already exists", { description: "Use the selector to add the node to an existing group." });
3388
+ U.error("This group already exists", { description: "Use the selector to add the node to an existing group." });
3451
3389
  return;
3452
3390
  }
3453
- let n = Kt();
3391
+ let n = Wt();
3454
3392
  s((t) => [{
3455
3393
  data: { label: { en: e.trim() } },
3456
3394
  id: n,
@@ -3471,83 +3409,83 @@ var $n = () => {
3471
3409
  x: 175,
3472
3410
  y: 30
3473
3411
  }
3474
- } : e)]), t(""), r(!1), H.success("Group created", { description: `The group "${e.trim()}" has been created successfully.` });
3412
+ } : e)]), t(""), r(!1), U.success("Group created", { description: `The group "${e.trim()}" has been created successfully.` });
3475
3413
  };
3476
- return /* @__PURE__ */ P("div", {
3414
+ return /* @__PURE__ */ F("div", {
3477
3415
  className: "space-y-2",
3478
- children: [/* @__PURE__ */ N(l, {
3416
+ children: [/* @__PURE__ */ P(l, {
3479
3417
  htmlFor: y,
3480
- children: h("editor.selectNodeGroup.group")
3481
- }), /* @__PURE__ */ P("div", {
3418
+ children: _("editor.selectNodeGroup.group")
3419
+ }), /* @__PURE__ */ F("div", {
3482
3420
  className: "flex gap-2",
3483
- children: [/* @__PURE__ */ P(v, {
3421
+ children: [/* @__PURE__ */ F(g, {
3484
3422
  value: d,
3485
- onValueChange: S,
3486
- children: [/* @__PURE__ */ N(g, {
3423
+ onValueChange: x,
3424
+ children: [/* @__PURE__ */ P(h, {
3487
3425
  id: y,
3488
3426
  className: "flex-1",
3489
- children: /* @__PURE__ */ N(c, { placeholder: h("editor.selectNodeGroup.noGroup") })
3490
- }), /* @__PURE__ */ N(k, { children: /* @__PURE__ */ P(A, { children: [/* @__PURE__ */ N(b, {
3427
+ children: /* @__PURE__ */ P(c, { placeholder: _("editor.selectNodeGroup.noGroup") })
3428
+ }), /* @__PURE__ */ P(A, { children: /* @__PURE__ */ F(j, { children: [/* @__PURE__ */ P(v, {
3491
3429
  value: "none",
3492
- children: h("editor.selectNodeGroup.noGroup")
3493
- }), o.map((e) => /* @__PURE__ */ N(b, {
3430
+ children: _("editor.selectNodeGroup.noGroup")
3431
+ }), o.map((e) => /* @__PURE__ */ P(v, {
3494
3432
  value: e.id,
3495
3433
  children: e.data.label?.en ? String(e.data.label?.en) : e.id
3496
3434
  }, e.id))] }) })]
3497
- }), /* @__PURE__ */ P(le, {
3435
+ }), /* @__PURE__ */ F(se, {
3498
3436
  open: n,
3499
3437
  onOpenChange: r,
3500
- children: [/* @__PURE__ */ N(u, {
3438
+ children: [/* @__PURE__ */ P(u, {
3501
3439
  asChild: !0,
3502
- children: /* @__PURE__ */ N(p, {
3440
+ children: /* @__PURE__ */ P(p, {
3503
3441
  variant: "outline",
3504
3442
  size: "icon",
3505
3443
  title: "Create a new group",
3506
- children: /* @__PURE__ */ N(tt, { className: "h-4 w-4" })
3444
+ children: /* @__PURE__ */ P($e, { className: "h-4 w-4" })
3507
3445
  })
3508
- }), /* @__PURE__ */ N(_, {
3446
+ }), /* @__PURE__ */ P(ee, {
3509
3447
  className: "w-80",
3510
3448
  align: "end",
3511
3449
  disablePortal: !0,
3512
- children: /* @__PURE__ */ P("div", {
3450
+ children: /* @__PURE__ */ F("div", {
3513
3451
  className: "space-y-4",
3514
3452
  children: [
3515
- /* @__PURE__ */ P("div", {
3453
+ /* @__PURE__ */ F("div", {
3516
3454
  className: "space-y-2",
3517
- children: [/* @__PURE__ */ N("h4", {
3455
+ children: [/* @__PURE__ */ P("h4", {
3518
3456
  className: "font-medium leading-none",
3519
- children: h("editor.selectNodeGroup.newGroup")
3520
- }), /* @__PURE__ */ N("p", {
3457
+ children: _("editor.selectNodeGroup.newGroup")
3458
+ }), /* @__PURE__ */ P("p", {
3521
3459
  className: "text-muted-foreground text-sm",
3522
- children: h("editor.selectNodeGroup.newGroupDescription")
3460
+ children: _("editor.selectNodeGroup.newGroupDescription")
3523
3461
  })]
3524
3462
  }),
3525
- /* @__PURE__ */ P("div", {
3463
+ /* @__PURE__ */ F("div", {
3526
3464
  className: "space-y-2",
3527
- children: [/* @__PURE__ */ N(l, {
3528
- htmlFor: x,
3529
- children: h("editor.selectNodeGroup.groupName")
3530
- }), /* @__PURE__ */ N(m, {
3465
+ children: [/* @__PURE__ */ P(l, {
3466
+ htmlFor: b,
3467
+ children: _("editor.selectNodeGroup.groupName")
3468
+ }), /* @__PURE__ */ P(m, {
3531
3469
  autoFocus: !0,
3532
- id: x,
3470
+ id: b,
3533
3471
  value: e,
3534
3472
  onChange: (e) => t(e.target.value),
3535
3473
  placeholder: "Ex: Step 1 - Personal info",
3536
3474
  onKeyDown: (e) => {
3537
- e.key === "Enter" && (e.preventDefault(), C());
3475
+ e.key === "Enter" && (e.preventDefault(), S());
3538
3476
  }
3539
3477
  })]
3540
3478
  }),
3541
- /* @__PURE__ */ P("div", {
3479
+ /* @__PURE__ */ F("div", {
3542
3480
  className: "flex justify-end gap-2",
3543
- children: [/* @__PURE__ */ N(p, {
3481
+ children: [/* @__PURE__ */ P(p, {
3544
3482
  variant: "outline",
3545
3483
  size: "sm",
3546
3484
  onClick: () => r(!1),
3547
3485
  children: "Cancel"
3548
- }), /* @__PURE__ */ N(p, {
3486
+ }), /* @__PURE__ */ P(p, {
3549
3487
  size: "sm",
3550
- onClick: C,
3488
+ onClick: S,
3551
3489
  disabled: !e.trim(),
3552
3490
  children: "Create"
3553
3491
  })]
@@ -3558,20 +3496,20 @@ var $n = () => {
3558
3496
  })]
3559
3497
  })]
3560
3498
  });
3561
- }, nr = () => {
3562
- let { selectedNode: e } = $(), { updateSelectedNodeType: t } = q(), n = e?.type || "", r = i(e), a = G(), o = vt();
3563
- return /* @__PURE__ */ P(A, { children: [/* @__PURE__ */ N(ue, {
3499
+ }, Wn = () => {
3500
+ let { selectedNode: e } = $(), { updateSelectedNodeType: t } = q(), n = e?.type || "", r = i(e), a = G(), o = gt();
3501
+ return /* @__PURE__ */ F(j, { children: [/* @__PURE__ */ P(ce, {
3564
3502
  htmlFor: o,
3565
3503
  children: a("editor.selectNodeType.nodeType")
3566
- }), /* @__PURE__ */ P(v, {
3504
+ }), /* @__PURE__ */ F(g, {
3567
3505
  value: n,
3568
3506
  onValueChange: (e) => t(e),
3569
3507
  disabled: r,
3570
- children: [/* @__PURE__ */ N(g, {
3508
+ children: [/* @__PURE__ */ P(h, {
3571
3509
  className: "w-full",
3572
3510
  id: o,
3573
- children: /* @__PURE__ */ N(c, { placeholder: a("editor.selectNodeType.nodeType") })
3574
- }), /* @__PURE__ */ N(k, { children: /* @__PURE__ */ N(A, { children: Object.keys(cn).filter((e) => r ? e === "group" : e !== "group").map((e) => /* @__PURE__ */ N(b, {
3511
+ children: /* @__PURE__ */ P(c, { placeholder: a("editor.selectNodeType.nodeType") })
3512
+ }), /* @__PURE__ */ P(A, { children: /* @__PURE__ */ P(j, { children: Object.keys(on).filter((e) => r ? e === "group" : e !== "group").map((e) => /* @__PURE__ */ P(v, {
3575
3513
  value: e,
3576
3514
  children: a(`editor.selectNodeType.options.${e}`)
3577
3515
  }, e)) }) })]
@@ -3579,62 +3517,62 @@ var $n = () => {
3579
3517
  };
3580
3518
  //#endregion
3581
3519
  //#region src/shared/components/ui/sheet.tsx
3582
- function rr({ ...e }) {
3583
- return /* @__PURE__ */ N(U.Root, {
3520
+ function Gn({ ...e }) {
3521
+ return /* @__PURE__ */ P(H.Root, {
3584
3522
  "data-slot": "sheet",
3585
3523
  ...e
3586
3524
  });
3587
3525
  }
3588
- function ir({ ...e }) {
3589
- return /* @__PURE__ */ N(U.Portal, {
3526
+ function Kn({ ...e }) {
3527
+ return /* @__PURE__ */ P(H.Portal, {
3590
3528
  "data-slot": "sheet-portal",
3591
3529
  ...e
3592
3530
  });
3593
3531
  }
3594
- function ar({ className: e, ...t }) {
3595
- return /* @__PURE__ */ N(U.Overlay, {
3532
+ function qn({ className: e, ...t }) {
3533
+ return /* @__PURE__ */ P(H.Overlay, {
3596
3534
  "data-slot": "sheet-overlay",
3597
3535
  className: d("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", e),
3598
3536
  ...t
3599
3537
  });
3600
3538
  }
3601
- function or({ className: e, children: t, side: n = "right", ...r }) {
3602
- return /* @__PURE__ */ P(ir, { children: [/* @__PURE__ */ N(ar, {}), /* @__PURE__ */ P(U.Content, {
3539
+ function Jn({ className: e, children: t, side: n = "right", ...r }) {
3540
+ return /* @__PURE__ */ F(Kn, { children: [/* @__PURE__ */ P(qn, {}), /* @__PURE__ */ F(H.Content, {
3603
3541
  "data-slot": "sheet-content",
3604
3542
  className: d("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500", n === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", n === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", n === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", n === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", e),
3605
3543
  ...r,
3606
- children: [t, /* @__PURE__ */ P(U.Close, {
3544
+ children: [t, /* @__PURE__ */ F(H.Close, {
3607
3545
  className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
3608
- children: [/* @__PURE__ */ N(pt, { className: "size-4" }), /* @__PURE__ */ N("span", {
3546
+ children: [/* @__PURE__ */ P(dt, { className: "size-4" }), /* @__PURE__ */ P("span", {
3609
3547
  className: "sr-only",
3610
3548
  children: "Close"
3611
3549
  })]
3612
3550
  })]
3613
3551
  })] });
3614
3552
  }
3615
- function sr({ className: e, ...t }) {
3616
- return /* @__PURE__ */ N("div", {
3553
+ function Yn({ className: e, ...t }) {
3554
+ return /* @__PURE__ */ P("div", {
3617
3555
  "data-slot": "sheet-header",
3618
3556
  className: d("flex flex-col gap-1.5 p-4", e),
3619
3557
  ...t
3620
3558
  });
3621
3559
  }
3622
- function cr({ className: e, ...t }) {
3623
- return /* @__PURE__ */ N("div", {
3560
+ function Xn({ className: e, ...t }) {
3561
+ return /* @__PURE__ */ P("div", {
3624
3562
  "data-slot": "sheet-footer",
3625
3563
  className: d("mt-auto flex flex-col gap-2 p-4", e),
3626
3564
  ...t
3627
3565
  });
3628
3566
  }
3629
- function lr({ className: e, ...t }) {
3630
- return /* @__PURE__ */ N(U.Title, {
3567
+ function Zn({ className: e, ...t }) {
3568
+ return /* @__PURE__ */ P(H.Title, {
3631
3569
  "data-slot": "sheet-title",
3632
3570
  className: d("font-semibold text-foreground", e),
3633
3571
  ...t
3634
3572
  });
3635
3573
  }
3636
- function ur({ className: e, ...t }) {
3637
- return /* @__PURE__ */ N(U.Description, {
3574
+ function Qn({ className: e, ...t }) {
3575
+ return /* @__PURE__ */ P(H.Description, {
3638
3576
  "data-slot": "sheet-description",
3639
3577
  className: d("text-muted-foreground text-sm", e),
3640
3578
  ...t
@@ -3642,59 +3580,59 @@ function ur({ className: e, ...t }) {
3642
3580
  }
3643
3581
  //#endregion
3644
3582
  //#region src/editor/features/TreegeEditor/sheets/NodeActionsSheet.tsx
3645
- var dr = () => {
3583
+ var $n = () => {
3646
3584
  let { selectedNode: e } = $(), { clearSelection: r } = q(), { isNodeSheetOpen: a, setIsNodeSheetOpen: o, openDeleteNodeConfirmation: c } = W(), l = G(), u = l(e?.data?.label), d = () => {
3647
3585
  o(!1), r();
3648
3586
  };
3649
- return /* @__PURE__ */ N(rr, {
3587
+ return /* @__PURE__ */ P(Gn, {
3650
3588
  open: a && !!e,
3651
3589
  onOpenChange: (e) => {
3652
3590
  e || d();
3653
3591
  },
3654
- children: /* @__PURE__ */ P(or, {
3592
+ children: /* @__PURE__ */ F(Jn, {
3655
3593
  className: "flex flex-col gap-0",
3656
3594
  children: [
3657
- /* @__PURE__ */ P(sr, { children: [/* @__PURE__ */ P(lr, { children: [
3595
+ /* @__PURE__ */ F(Yn, { children: [/* @__PURE__ */ F(Zn, { children: [
3658
3596
  l("editor.nodeActionsSheet.editNode"),
3659
3597
  " ",
3660
- /* @__PURE__ */ N("span", {
3598
+ /* @__PURE__ */ P("span", {
3661
3599
  className: "font-light text-muted-foreground text-xs",
3662
3600
  children: e?.id
3663
3601
  })
3664
- ] }), /* @__PURE__ */ N(ur, { children: u || "\xA0" })] }),
3665
- /* @__PURE__ */ N(Nt, {
3602
+ ] }), /* @__PURE__ */ P(Qn, { children: u || "\xA0" })] }),
3603
+ /* @__PURE__ */ P(jt, {
3666
3604
  className: "flex min-h-0 flex-1 flex-col px-4",
3667
- children: /* @__PURE__ */ P("div", {
3605
+ children: /* @__PURE__ */ F("div", {
3668
3606
  className: "space-y-6 py-4",
3669
3607
  children: [
3670
- /* @__PURE__ */ N(nr, {}),
3671
- /* @__PURE__ */ N(tr, {}),
3672
- /* @__PURE__ */ N(se, {}),
3673
- s(e) && /* @__PURE__ */ N($n, {}),
3674
- n(e) && /* @__PURE__ */ N(er, {}),
3675
- t(e) && /* @__PURE__ */ N(Nn, {}),
3676
- i(e) && /* @__PURE__ */ N(Pn, {})
3608
+ /* @__PURE__ */ P(Wn, {}),
3609
+ /* @__PURE__ */ P(Un, {}),
3610
+ /* @__PURE__ */ P(k, {}),
3611
+ s(e) && /* @__PURE__ */ P(Vn, {}),
3612
+ n(e) && /* @__PURE__ */ P(Hn, {}),
3613
+ t(e) && /* @__PURE__ */ P(xn, {}),
3614
+ i(e) && /* @__PURE__ */ P(Sn, {})
3677
3615
  ]
3678
3616
  })
3679
3617
  }),
3680
- /* @__PURE__ */ N(cr, {
3618
+ /* @__PURE__ */ P(Xn, {
3681
3619
  className: "flex items-end border-t",
3682
- children: /* @__PURE__ */ N(p, {
3620
+ children: /* @__PURE__ */ P(p, {
3683
3621
  variant: "ghost",
3684
3622
  size: "icon",
3685
3623
  onClick: () => {
3686
3624
  e && c(e.id);
3687
3625
  },
3688
3626
  "aria-label": l("editor.nodeActionsSheet.deleteNode"),
3689
- children: /* @__PURE__ */ N(ct, {})
3627
+ children: /* @__PURE__ */ P(ot, {})
3690
3628
  })
3691
3629
  })
3692
3630
  ]
3693
3631
  })
3694
3632
  });
3695
- }, fr = ({ ...e }) => {
3696
- let { theme: t = "system" } = Et();
3697
- return /* @__PURE__ */ N(wt, {
3633
+ }, er = ({ ...e }) => {
3634
+ let { theme: t = "system" } = wt();
3635
+ return /* @__PURE__ */ P(St, {
3698
3636
  theme: t,
3699
3637
  className: "toaster group",
3700
3638
  style: {
@@ -3704,14 +3642,14 @@ var dr = () => {
3704
3642
  },
3705
3643
  ...e
3706
3644
  });
3707
- }, pr = ({ flow: e, onExportJson: t, onSave: n, theme: r, className: i }) => {
3708
- let { onConnect: a, onConnectEnd: o, onEdgesDelete: s, isValidConnection: c } = Jt();
3709
- return /* @__PURE__ */ P(xe, {
3645
+ }, tr = ({ flow: e, onExportJson: t, onSave: n, theme: r, className: i }) => {
3646
+ let { onConnect: a, onConnectEnd: o, onEdgesDelete: s, isValidConnection: c } = Kt();
3647
+ return /* @__PURE__ */ F(ye, {
3710
3648
  fitView: !0,
3711
3649
  colorMode: r,
3712
3650
  selectNodesOnDrag: !1,
3713
- nodeTypes: cn,
3714
- edgeTypes: Ft,
3651
+ nodeTypes: on,
3652
+ edgeTypes: Nt,
3715
3653
  defaultEdges: e?.edges || [],
3716
3654
  defaultNodes: e?.nodes || [],
3717
3655
  onConnect: a,
@@ -3720,32 +3658,32 @@ var dr = () => {
3720
3658
  isValidConnection: c,
3721
3659
  className: d(i, "treege"),
3722
3660
  children: [
3723
- /* @__PURE__ */ N(de, {
3661
+ /* @__PURE__ */ P(le, {
3724
3662
  gap: 10,
3725
- variant: fe.Dots
3663
+ variant: ue.Dots
3726
3664
  }),
3727
- /* @__PURE__ */ N(jn, {
3665
+ /* @__PURE__ */ P(yn, {
3728
3666
  onExportJson: t,
3729
3667
  onSave: n
3730
3668
  }),
3731
- /* @__PURE__ */ N(kt, { theme: r }),
3732
- /* @__PURE__ */ N(_e, {}),
3733
- /* @__PURE__ */ N(me, {}),
3734
- /* @__PURE__ */ N(dr, {}),
3735
- /* @__PURE__ */ N(yn, {})
3669
+ /* @__PURE__ */ P(Dt, { theme: r }),
3670
+ /* @__PURE__ */ P(he, {}),
3671
+ /* @__PURE__ */ P(fe, {}),
3672
+ /* @__PURE__ */ P($n, {}),
3673
+ /* @__PURE__ */ P(sn, {})
3736
3674
  ]
3737
3675
  });
3738
- }, mr = ({ flow: e, onExportJson: t, onSave: n, theme: r = "dark", language: i = "en", aiConfig: a }) => /* @__PURE__ */ N(o, {
3676
+ }, nr = ({ flow: e, onExportJson: t, onSave: n, theme: r = "dark", language: i = "en", aiConfig: a }) => /* @__PURE__ */ P(o, {
3739
3677
  defaultTheme: r,
3740
3678
  storageKey: "treege-editor-theme",
3741
3679
  theme: r,
3742
- children: /* @__PURE__ */ P(Mt, {
3680
+ children: /* @__PURE__ */ F(At, {
3743
3681
  value: {
3744
3682
  aiConfig: a,
3745
3683
  flowId: e?.id,
3746
3684
  language: i
3747
3685
  },
3748
- children: [/* @__PURE__ */ N(fr, { position: "bottom-center" }), /* @__PURE__ */ N(Se, { children: /* @__PURE__ */ N(pr, {
3686
+ children: [/* @__PURE__ */ P(er, { position: "bottom-center" }), /* @__PURE__ */ P(be, { children: /* @__PURE__ */ P(tr, {
3749
3687
  onExportJson: t,
3750
3688
  onSave: n,
3751
3689
  flow: e,
@@ -3754,4 +3692,4 @@ var dr = () => {
3754
3692
  })
3755
3693
  });
3756
3694
  //#endregion
3757
- export { mr as t };
3695
+ export { nr as t };