treege 3.0.0-beta.32 → 3.0.0-beta.34

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