treege 3.0.0-beta.33 → 3.0.0-beta.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,30 +1,30 @@
1
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
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 De } from "@xyflow/react";
4
- import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
5
- import { useForm as P } from "@tanstack/react-form";
6
- import { AlignLeft as Oe, ArrowRightFromLine as ke, Boxes as Ae, Calendar as je, CalendarRange as Me, CaseSensitive as Ne, Check as Pe, CheckSquare as Fe, ChevronDown as Ie, ChevronsUpDown as Le, CircleDot as Re, Clock as ze, Cloud as Be, Copy as Ve, Download as He, EllipsisVertical as Ue, EyeOff as We, Hash as Ge, Heading as Ke, ImagePlus as qe, KeyRound as Je, Link2 as Ye, ListFilter as Xe, Loader2 as Ze, MapPin as Qe, Minus as $e, MoreVertical as et, Paperclip as tt, Plus as F, PlusCircle as nt, RectangleEllipsis as rt, Save as it, Search as at, Send as ot, Settings as st, ToggleLeft as ct, Trash2 as lt, Upload as ut, Variable as dt, WandSparkles as ft, Waypoints as pt, X as I, XIcon as mt } from "lucide-react";
7
- import { createContext as ht, memo as gt, useCallback as L, useContext as _t, useEffect as vt, useId as yt, useMemo as R, useRef as bt, useState as z } from "react";
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
8
  import { Slot as xt } from "@radix-ui/react-slot";
9
9
  import { cva as St } from "class-variance-authority";
10
10
  import * as Ct from "@radix-ui/react-scroll-area";
11
- import * as B from "@radix-ui/react-alert-dialog";
12
- import * as V from "@radix-ui/react-dropdown-menu";
11
+ import * as B from "@radix-ui/react-dropdown-menu";
12
+ import * as V from "@radix-ui/react-alert-dialog";
13
13
  import { Toaster as wt, toast as H } from "sonner";
14
14
  import * as U from "@radix-ui/react-dialog";
15
15
  import * as Tt from "@radix-ui/react-collapsible";
16
16
  import { useTheme as Et } from "next-themes";
17
17
  //#region src/editor/assets/img/treege-black.svg
18
- var Dt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1809_3434)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1303%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.455%2046.7988C17.0611%2047.1509%2017.7491%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34V41.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.251%20116.58%20138.64L151.39%2078.3401C151.741%2077.7316%20151.926%2077.0413%20151.926%2076.3386C151.926%2075.636%20151.74%2074.9458%20151.389%2074.3375C151.037%2073.7293%20150.531%2073.2244%20149.922%2072.8738C149.313%2072.5231%20148.623%2072.3391%20147.92%2072.3401H92.48C91.4191%2072.3401%2090.4017%2072.7615%2089.6516%2073.5117C88.9014%2074.2618%2088.48%2075.2792%2088.48%2076.3401V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.469C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.3201H3.99999C3.29819%2072.3208%202.60893%2072.5061%202.00143%2072.8575C1.39392%2073.2089%200.88955%2073.7139%200.538962%2074.3218C0.188375%2074.9298%200.00390931%2075.6193%200.00408949%2076.3211C0.00426966%2077.0229%200.189089%2077.7123%200.539989%2078.3201L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.489C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.3101C63.4773%2075.2509%2063.0547%2074.2361%2062.3049%2073.4881C61.555%2072.7401%2060.5391%2072.3201%2059.48%2072.3201V72.3201Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='black'/%3e%3cdefs%3e%3cclipPath%20id='clip0_1809_3434'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", Ot = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2_65)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1302%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.4549%2046.7988C17.061%2047.1509%2017.749%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.25%20116.58%20138.64L151.39%2078.34C151.741%2077.7315%20151.926%2077.0412%20151.926%2076.3385C151.926%2075.6359%20151.74%2074.9457%20151.389%2074.3374C151.037%2073.7292%20150.531%2073.2243%20149.922%2072.8737C149.313%2072.523%20148.623%2072.339%20147.92%2072.34H92.48C91.4191%2072.34%2090.4017%2072.7614%2089.6516%2073.5116C88.9014%2074.2617%2088.48%2075.2791%2088.48%2076.34V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.468C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.32H4C3.2982%2072.3207%202.60894%2072.5061%202.00143%2072.8574C1.39393%2073.2088%200.889558%2073.7138%200.53897%2074.3218C0.188382%2074.9297%200.00391694%2075.6192%200.00409712%2076.321C0.00427729%2077.0228%200.189097%2077.7122%200.539997%2078.32L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.488C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.31C63.4773%2075.2509%2063.0548%2074.236%2062.3049%2073.488C61.555%2072.7401%2060.5391%2072.32%2059.48%2072.32Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_2_65'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", kt = ({ theme: e = "dark" }) => /* @__PURE__ */ M("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", {
19
19
  className: "absolute top-5 left-5 z-50 select-none",
20
- children: /* @__PURE__ */ M("img", {
20
+ children: /* @__PURE__ */ N("img", {
21
21
  src: e === "dark" ? Ot : Dt,
22
22
  alt: "Treege",
23
23
  className: "relative h-14 w-auto drop-shadow-[0_0px_35px] drop-shadow-blue-600"
24
24
  })
25
25
  }), At = (e) => {
26
26
  let t = Ee(), n = Te();
27
- return R(() => {
27
+ return yt(() => {
28
28
  if (!e) return [];
29
29
  let r = (e, t = /* @__PURE__ */ new Set()) => {
30
30
  if (t.has(e)) return [];
@@ -45,30 +45,37 @@ var Dt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%20
45
45
  t,
46
46
  n
47
47
  ]);
48
- }, jt = ht(null), Mt = ({ children: e, value: t }) => {
49
- let [n, r] = z(t?.flowId), [i, a] = z(!1), o = R(() => ({
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(() => ({
50
50
  ...t,
51
51
  ...t?.aiConfig && { aiConfig: {
52
52
  ...t.aiConfig,
53
53
  provider: t?.aiConfig.provider ?? "gemini"
54
54
  } },
55
+ closeDeleteNodeConfirmation: () => s(null),
55
56
  flowId: n,
56
57
  isNodeSheetOpen: i,
58
+ openDeleteNodeConfirmation: (e) => s(e),
59
+ pendingDeleteNodeId: o,
57
60
  setFlowId: r,
58
61
  setIsNodeSheetOpen: a
59
62
  }), [
60
63
  n,
61
64
  t,
62
- i
65
+ i,
66
+ o
63
67
  ]);
64
- return /* @__PURE__ */ M(jt.Provider, {
65
- value: o,
68
+ return /* @__PURE__ */ N(jt.Provider, {
69
+ value: c,
66
70
  children: e
67
71
  });
68
- }, W = () => _t(jt) ?? {
72
+ }, W = () => gt(jt) ?? {
73
+ closeDeleteNodeConfirmation: () => {},
69
74
  flowId: void 0,
70
75
  isNodeSheetOpen: !1,
71
76
  language: "en",
77
+ openDeleteNodeConfirmation: () => {},
78
+ pendingDeleteNodeId: null,
72
79
  setFlowId: () => {},
73
80
  setIsNodeSheetOpen: () => {}
74
81
  }, G = (t) => {
@@ -78,28 +85,28 @@ var Dt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%20
78
85
  //#endregion
79
86
  //#region src/shared/components/ui/scroll-area.tsx
80
87
  function Nt({ className: e, children: t, ...n }) {
81
- return /* @__PURE__ */ N(Ct.Root, {
88
+ return /* @__PURE__ */ P(Ct.Root, {
82
89
  "data-slot": "scroll-area",
83
90
  className: d("relative", e),
84
91
  ...n,
85
92
  children: [
86
- /* @__PURE__ */ M(Ct.Viewport, {
93
+ /* @__PURE__ */ N(Ct.Viewport, {
87
94
  "data-slot": "scroll-area-viewport",
88
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",
89
96
  children: t
90
97
  }),
91
- /* @__PURE__ */ M(Pt, {}),
92
- /* @__PURE__ */ M(Ct.Corner, {})
98
+ /* @__PURE__ */ N(Pt, {}),
99
+ /* @__PURE__ */ N(Ct.Corner, {})
93
100
  ]
94
101
  });
95
102
  }
96
103
  function Pt({ className: e, orientation: t = "vertical", ...n }) {
97
- return /* @__PURE__ */ M(Ct.ScrollAreaScrollbar, {
104
+ return /* @__PURE__ */ N(Ct.ScrollAreaScrollbar, {
98
105
  "data-slot": "scroll-area-scrollbar",
99
106
  orientation: t,
100
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),
101
108
  ...n,
102
- children: /* @__PURE__ */ M(Ct.ScrollAreaThumb, {
109
+ children: /* @__PURE__ */ N(Ct.ScrollAreaThumb, {
103
110
  "data-slot": "scroll-area-thumb",
104
111
  className: "relative flex-1 rounded-full bg-border"
105
112
  })
@@ -108,7 +115,7 @@ function Pt({ className: e, orientation: t = "vertical", ...n }) {
108
115
  //#endregion
109
116
  //#region src/editor/constants/edgeTypes.ts
110
117
  var Ft = {
111
- conditional: gt(({ id: e, target: t, sourceX: n, sourceY: i, targetX: a, targetY: o, sourcePosition: s, targetPosition: d, markerEnd: h, style: y, data: x }) => {
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 }) => {
112
119
  let [S, C, w] = we({
113
120
  sourcePosition: s,
114
121
  sourceX: n,
@@ -116,7 +123,7 @@ var Ft = {
116
123
  targetPosition: d,
117
124
  targetX: a,
118
125
  targetY: o
119
- }), [ee, te] = z(!1), { updateEdgeData: ne } = De(), re = At(t), ie = x?.conditions && x.conditions.length > 0, D = G(), { handleSubmit: ae, reset: oe, Field: O } = P({
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({
120
127
  defaultValues: {
121
128
  conditions: x?.conditions || [{
122
129
  field: re[0]?.nodeId ?? "",
@@ -156,7 +163,7 @@ var Ft = {
156
163
  let t = e.filter((e) => e.logicalOperator === r.AND).length, n = e.filter((e) => e.logicalOperator === r.OR).length;
157
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")}`;
158
165
  }, A = () => x?.isFallback ? "var(--color-chart-4)" : ie ? "var(--color-chart-2)" : "var(--color-chart-3)";
159
- return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(pe, {
166
+ return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(pe, {
160
167
  path: S,
161
168
  markerEnd: h,
162
169
  style: {
@@ -165,121 +172,121 @@ var Ft = {
165
172
  strokeDasharray: x?.isFallback ? "5,5" : void 0,
166
173
  strokeWidth: ie || x?.isFallback ? 2 : y?.strokeWidth
167
174
  }
168
- }), /* @__PURE__ */ M(he, { children: /* @__PURE__ */ M("div", {
175
+ }), /* @__PURE__ */ N(he, { children: /* @__PURE__ */ N("div", {
169
176
  className: "nodrag nopan absolute",
170
177
  style: {
171
178
  pointerEvents: "all",
172
179
  transform: `translate(-50%, -50%) translate(${C}px,${w}px)`
173
180
  },
174
- children: /* @__PURE__ */ N(le, {
181
+ children: /* @__PURE__ */ P(le, {
175
182
  open: ee,
176
183
  onOpenChange: te,
177
- children: [/* @__PURE__ */ M(u, {
184
+ children: [/* @__PURE__ */ N(u, {
178
185
  asChild: !0,
179
- children: /* @__PURE__ */ N(p, {
186
+ children: /* @__PURE__ */ P(p, {
180
187
  variant: ie || x?.isFallback ? "default" : "secondary",
181
188
  className: "h-8 px-2 text-xs",
182
189
  onClick: se,
183
- children: [/* @__PURE__ */ M(pt, { className: "mr-1 h-3 w-3" }), ie || x?.isFallback ? ue() : D("editor.conditionalEdge.condition")]
190
+ children: [/* @__PURE__ */ N(ft, { className: "mr-1 h-3 w-3" }), ie || x?.isFallback ? ue() : D("editor.conditionalEdge.condition")]
184
191
  })
185
- }), /* @__PURE__ */ M(_, {
192
+ }), /* @__PURE__ */ N(_, {
186
193
  className: "w-96 p-1",
187
194
  align: "center",
188
195
  onClick: (e) => e.stopPropagation(),
189
- children: /* @__PURE__ */ M(Nt, {
196
+ children: /* @__PURE__ */ N(Nt, {
190
197
  className: "flex max-h-150 flex-col p-3",
191
- children: /* @__PURE__ */ M("form", {
198
+ children: /* @__PURE__ */ N("form", {
192
199
  onSubmit: (e) => {
193
200
  e.preventDefault(), e.stopPropagation();
194
201
  },
195
- children: /* @__PURE__ */ N("div", {
202
+ children: /* @__PURE__ */ P("div", {
196
203
  className: "grid gap-5",
197
204
  children: [
198
- /* @__PURE__ */ N("div", {
205
+ /* @__PURE__ */ P("div", {
199
206
  className: "space-y-2",
200
- children: [/* @__PURE__ */ M("h4", {
207
+ children: [/* @__PURE__ */ N("h4", {
201
208
  className: "font-medium leading-none",
202
209
  children: D("editor.conditionalEdge.displayConditions")
203
- }), /* @__PURE__ */ M("p", {
210
+ }), /* @__PURE__ */ N("p", {
204
211
  className: "text-muted-foreground text-sm",
205
212
  children: D("editor.conditionalEdge.displayConditionsDesc")
206
213
  })]
207
214
  }),
208
- /* @__PURE__ */ N("div", {
215
+ /* @__PURE__ */ P("div", {
209
216
  className: "grid gap-4",
210
217
  children: [
211
- /* @__PURE__ */ M(O, {
218
+ /* @__PURE__ */ N(O, {
212
219
  name: "label",
213
- children: (e) => /* @__PURE__ */ N(T, { children: [
214
- /* @__PURE__ */ M(l, {
220
+ children: (e) => /* @__PURE__ */ P(T, { children: [
221
+ /* @__PURE__ */ N(l, {
215
222
  htmlFor: e.name,
216
223
  children: D("editor.conditionalEdge.labelOptional")
217
224
  }),
218
- /* @__PURE__ */ M(m, {
225
+ /* @__PURE__ */ N(m, {
219
226
  id: e.name,
220
227
  placeholder: D("editor.conditionalEdge.labelPlaceholder"),
221
228
  value: e.state.value,
222
229
  onChange: (t) => e.handleChange(t.target.value)
223
230
  }),
224
- /* @__PURE__ */ M(E, { children: D("editor.conditionalEdge.labelDesc") })
231
+ /* @__PURE__ */ N(E, { children: D("editor.conditionalEdge.labelDesc") })
225
232
  ] })
226
233
  }),
227
- /* @__PURE__ */ M(O, {
234
+ /* @__PURE__ */ N(O, {
228
235
  name: "isFallback",
229
- children: (e) => /* @__PURE__ */ M(T, { children: /* @__PURE__ */ N("div", {
236
+ children: (e) => /* @__PURE__ */ N(T, { children: /* @__PURE__ */ P("div", {
230
237
  className: "flex items-center gap-3 rounded-lg border bg-muted/20 p-3",
231
- children: [/* @__PURE__ */ M(f, {
238
+ children: [/* @__PURE__ */ N(f, {
232
239
  id: e.name,
233
240
  checked: e.state.value,
234
241
  onCheckedChange: (t) => e.handleChange(t)
235
- }), /* @__PURE__ */ N("div", {
242
+ }), /* @__PURE__ */ P("div", {
236
243
  className: "flex flex-col gap-1",
237
- children: [/* @__PURE__ */ M(l, {
244
+ children: [/* @__PURE__ */ N(l, {
238
245
  htmlFor: e.name,
239
246
  className: "cursor-pointer font-medium",
240
247
  children: D("editor.conditionalEdge.fallbackPath")
241
- }), /* @__PURE__ */ M(E, {
248
+ }), /* @__PURE__ */ N(E, {
242
249
  className: "text-xs",
243
250
  children: D("editor.conditionalEdge.fallbackPathDesc")
244
251
  })]
245
252
  })]
246
253
  }) })
247
254
  }),
248
- /* @__PURE__ */ M(O, {
255
+ /* @__PURE__ */ N(O, {
249
256
  name: "conditions",
250
257
  mode: "array",
251
258
  children: (e) => {
252
259
  let t = e.form.getFieldValue("isFallback");
253
- return /* @__PURE__ */ N("div", {
260
+ return /* @__PURE__ */ P("div", {
254
261
  className: "space-y-3",
255
- children: [/* @__PURE__ */ M(l, {
262
+ children: [/* @__PURE__ */ N(l, {
256
263
  className: t ? "text-muted-foreground" : "",
257
264
  children: D("editor.conditionalEdge.conditions")
258
- }), /* @__PURE__ */ N("div", {
265
+ }), /* @__PURE__ */ P("div", {
259
266
  className: "space-y-2",
260
- children: [e.state.value?.map((n, i) => /* @__PURE__ */ N("div", {
267
+ children: [e.state.value?.map((n, i) => /* @__PURE__ */ P("div", {
261
268
  className: "space-y-2",
262
- children: [/* @__PURE__ */ N("div", {
269
+ children: [/* @__PURE__ */ P("div", {
263
270
  className: "space-y-2 rounded-lg border bg-muted/30 p-3",
264
271
  children: [
265
- /* @__PURE__ */ M(O, {
272
+ /* @__PURE__ */ N(O, {
266
273
  name: `conditions[${i}].field`,
267
- children: (e) => /* @__PURE__ */ N(T, { children: [/* @__PURE__ */ M(l, {
274
+ children: (e) => /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
268
275
  htmlFor: `field-${i}`,
269
276
  children: D("editor.conditionalEdge.field")
270
- }), /* @__PURE__ */ N(v, {
277
+ }), /* @__PURE__ */ P(v, {
271
278
  disabled: t,
272
279
  value: e.state.value || "",
273
280
  onValueChange: (t) => e.handleChange(t),
274
- children: [/* @__PURE__ */ M(g, {
281
+ children: [/* @__PURE__ */ N(g, {
275
282
  id: `field-${i}`,
276
283
  className: "w-full",
277
- children: /* @__PURE__ */ M(c, { placeholder: D("editor.conditionalEdge.selectField") })
278
- }), /* @__PURE__ */ M(k, { children: re.length === 0 ? /* @__PURE__ */ M(b, {
284
+ children: /* @__PURE__ */ N(c, { placeholder: D("editor.conditionalEdge.selectField") })
285
+ }), /* @__PURE__ */ N(k, { children: re.length === 0 ? /* @__PURE__ */ N(b, {
279
286
  value: "none",
280
287
  disabled: !0,
281
288
  children: D("editor.conditionalEdge.noFieldsAvailable")
282
- }) : re.map((e) => /* @__PURE__ */ N(b, {
289
+ }) : re.map((e) => /* @__PURE__ */ P(b, {
283
290
  value: e.nodeId,
284
291
  children: [
285
292
  e.label,
@@ -290,55 +297,55 @@ var Ft = {
290
297
  }, e.nodeId)) })]
291
298
  })] })
292
299
  }),
293
- /* @__PURE__ */ N("div", {
300
+ /* @__PURE__ */ P("div", {
294
301
  className: "flex gap-2",
295
- children: [/* @__PURE__ */ M(O, {
302
+ children: [/* @__PURE__ */ N(O, {
296
303
  name: `conditions[${i}].operator`,
297
- children: (e) => /* @__PURE__ */ N(T, { children: [/* @__PURE__ */ M(l, {
304
+ children: (e) => /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
298
305
  htmlFor: `operator-${i}`,
299
306
  children: D("editor.conditionalEdge.operator")
300
- }), /* @__PURE__ */ N(v, {
307
+ }), /* @__PURE__ */ P(v, {
301
308
  disabled: t,
302
309
  value: e.state.value || "===",
303
310
  onValueChange: (t) => e.handleChange(t),
304
- children: [/* @__PURE__ */ M(g, {
311
+ children: [/* @__PURE__ */ N(g, {
305
312
  id: `operator-${i}`,
306
- children: /* @__PURE__ */ M(c, {})
307
- }), /* @__PURE__ */ N(k, { children: [
308
- /* @__PURE__ */ M(b, {
313
+ children: /* @__PURE__ */ N(c, {})
314
+ }), /* @__PURE__ */ P(k, { children: [
315
+ /* @__PURE__ */ N(b, {
309
316
  value: "===",
310
317
  children: "="
311
318
  }),
312
- /* @__PURE__ */ M(b, {
319
+ /* @__PURE__ */ N(b, {
313
320
  value: "!==",
314
321
  children: "≠"
315
322
  }),
316
- /* @__PURE__ */ M(b, {
323
+ /* @__PURE__ */ N(b, {
317
324
  value: ">",
318
325
  children: ">"
319
326
  }),
320
- /* @__PURE__ */ M(b, {
327
+ /* @__PURE__ */ N(b, {
321
328
  value: "<",
322
329
  children: "<"
323
330
  }),
324
- /* @__PURE__ */ M(b, {
331
+ /* @__PURE__ */ N(b, {
325
332
  value: ">=",
326
333
  children: ">="
327
334
  }),
328
- /* @__PURE__ */ M(b, {
335
+ /* @__PURE__ */ N(b, {
329
336
  value: "<=",
330
337
  children: "<="
331
338
  })
332
339
  ] })]
333
340
  })] })
334
- }), /* @__PURE__ */ M(O, {
341
+ }), /* @__PURE__ */ N(O, {
335
342
  name: `conditions[${i}].value`,
336
- children: (e) => /* @__PURE__ */ N(T, {
343
+ children: (e) => /* @__PURE__ */ P(T, {
337
344
  className: "w-full",
338
- children: [/* @__PURE__ */ M(l, {
345
+ children: [/* @__PURE__ */ N(l, {
339
346
  htmlFor: `value-${i}`,
340
347
  children: D("editor.conditionalEdge.value")
341
- }), /* @__PURE__ */ M(m, {
348
+ }), /* @__PURE__ */ N(m, {
342
349
  disabled: t,
343
350
  id: `value-${i}`,
344
351
  placeholder: D("editor.conditionalEdge.valuePlaceholder"),
@@ -348,7 +355,7 @@ var Ft = {
348
355
  })
349
356
  })]
350
357
  }),
351
- e.state.value && e.state.value.length > 1 && /* @__PURE__ */ N(p, {
358
+ e.state.value && e.state.value.length > 1 && /* @__PURE__ */ P(p, {
352
359
  disabled: t,
353
360
  type: "button",
354
361
  variant: "ghost",
@@ -357,31 +364,31 @@ var Ft = {
357
364
  onClick: () => {
358
365
  e.removeValue(i), ae().then();
359
366
  },
360
- children: [/* @__PURE__ */ M(I, { className: "mr-1 h-4 w-4" }), D("editor.conditionalEdge.removeCondition")]
367
+ children: [/* @__PURE__ */ N(L, { className: "mr-1 h-4 w-4" }), D("editor.conditionalEdge.removeCondition")]
361
368
  })
362
369
  ]
363
- }), e.state.value && i < e.state.value.length - 1 && /* @__PURE__ */ M(O, {
370
+ }), e.state.value && i < e.state.value.length - 1 && /* @__PURE__ */ N(O, {
364
371
  name: `conditions[${i}].logicalOperator`,
365
- children: (e) => /* @__PURE__ */ M("div", {
372
+ children: (e) => /* @__PURE__ */ N("div", {
366
373
  className: "flex justify-center",
367
- children: /* @__PURE__ */ N(v, {
374
+ children: /* @__PURE__ */ P(v, {
368
375
  disabled: t,
369
376
  value: e.state.value || r.AND,
370
377
  onValueChange: (t) => e.handleChange(t),
371
- children: [/* @__PURE__ */ M(g, {
378
+ children: [/* @__PURE__ */ N(g, {
372
379
  className: "h-9 w-32 font-semibold",
373
- children: /* @__PURE__ */ M(c, {})
374
- }), /* @__PURE__ */ N(k, { children: [/* @__PURE__ */ M(b, {
380
+ children: /* @__PURE__ */ N(c, {})
381
+ }), /* @__PURE__ */ P(k, { children: [/* @__PURE__ */ N(b, {
375
382
  value: r.AND,
376
383
  children: "AND"
377
- }), /* @__PURE__ */ M(b, {
384
+ }), /* @__PURE__ */ N(b, {
378
385
  value: r.OR,
379
386
  children: "OR"
380
387
  })] })]
381
388
  })
382
389
  })
383
390
  })]
384
- }, `condition-${i}`)), /* @__PURE__ */ N(p, {
391
+ }, `condition-${i}`)), /* @__PURE__ */ P(p, {
385
392
  disabled: t,
386
393
  type: "button",
387
394
  variant: "outline",
@@ -395,7 +402,7 @@ var Ft = {
395
402
  value: ""
396
403
  }), ae().then();
397
404
  },
398
- children: [/* @__PURE__ */ M(F, { className: "mr-2 h-4 w-4" }), D("editor.conditionalEdge.addCondition")]
405
+ children: [/* @__PURE__ */ N(I, { className: "mr-2 h-4 w-4" }), D("editor.conditionalEdge.addCondition")]
399
406
  })]
400
407
  })]
401
408
  });
@@ -403,15 +410,15 @@ var Ft = {
403
410
  })
404
411
  ]
405
412
  }),
406
- /* @__PURE__ */ N("div", {
413
+ /* @__PURE__ */ P("div", {
407
414
  className: "flex justify-end gap-2 pt-2",
408
- children: [/* @__PURE__ */ N(p, {
415
+ children: [/* @__PURE__ */ P(p, {
409
416
  type: "button",
410
417
  size: "sm",
411
418
  variant: "outline",
412
419
  onClick: ce,
413
- children: [/* @__PURE__ */ M(I, { className: "mr-1 h-4 w-4" }), D("common.clear")]
414
- }), /* @__PURE__ */ M(p, {
420
+ children: [/* @__PURE__ */ N(L, { className: "mr-1 h-4 w-4" }), D("common.clear")]
421
+ }), /* @__PURE__ */ N(p, {
415
422
  type: "button",
416
423
  size: "sm",
417
424
  onClick: () => te(!1),
@@ -426,7 +433,7 @@ var Ft = {
426
433
  })
427
434
  }) })] });
428
435
  }),
429
- default: gt(({ 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 }) => {
430
437
  let [u, d, f] = we({
431
438
  sourcePosition: a,
432
439
  sourceX: t,
@@ -434,15 +441,15 @@ var Ft = {
434
441
  targetPosition: o,
435
442
  targetX: r,
436
443
  targetY: i
437
- }), { setEdges: p } = De();
438
- return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(pe, {
444
+ }), { setEdges: p } = j();
445
+ return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(pe, {
439
446
  path: u,
440
447
  markerEnd: c,
441
448
  style: s
442
- }), /* @__PURE__ */ M(he, { children: l && /* @__PURE__ */ M("div", {
449
+ }), /* @__PURE__ */ N(he, { children: l && /* @__PURE__ */ N("div", {
443
450
  className: "button-edge__label nodrag nopan",
444
451
  style: { transform: `translate(-50%, -50%) translate(${d}px,${f}px)` },
445
- children: /* @__PURE__ */ M("button", {
452
+ children: /* @__PURE__ */ N("button", {
446
453
  type: "button",
447
454
  className: "button-edge__button",
448
455
  onClick: () => {
@@ -473,14 +480,14 @@ var Ft = {
473
480
  time: "time",
474
481
  timerange: "timerange"
475
482
  }, It = { [a.input]: { type: K.text } }, q = () => {
476
- let { setNodes: e, setEdges: t, getNodes: n } = De(), r = L(() => {
483
+ let { setNodes: e, setEdges: t, getNodes: n } = j(), r = R(() => {
477
484
  e((e) => e.map(({ selected: e, ...t }) => t)), t((e) => e.map(({ selected: e, ...t }) => t));
478
- }, [t, e]), i = L((n) => {
485
+ }, [t, e]), i = R((n) => {
479
486
  e((e) => e.map((e) => ({
480
487
  ...e,
481
488
  selected: e.id === n
482
489
  }))), t((e) => e.map(({ selected: e, ...t }) => t));
483
- }, [t, e]), a = L((t, n) => {
490
+ }, [t, e]), a = R((t, n) => {
484
491
  e((e) => e.map((e) => e.id === t ? {
485
492
  ...e,
486
493
  data: {
@@ -488,25 +495,25 @@ var Ft = {
488
495
  ...n
489
496
  }
490
497
  } : e));
491
- }, [e]), o = L((t, n) => {
498
+ }, [e]), o = R((t, n) => {
492
499
  e((e) => e.map((e) => e.id === t ? {
493
500
  ...e,
494
501
  data: It[n] ?? {},
495
502
  type: n
496
503
  } : e));
497
- }, [e]), s = L((e) => {
504
+ }, [e]), s = R((e) => {
498
505
  let t = n().find((e) => e.selected);
499
506
  t && o(t.id, e);
500
- }, [n, o]), c = L((e) => {
507
+ }, [n, o]), c = R((e) => {
501
508
  let t = n().find((e) => e.selected);
502
509
  t && a(t.id, e);
503
- }, [n, a]), l = L((n) => {
510
+ }, [n, a]), l = R((n) => {
504
511
  e((e) => e.filter((e) => e.id !== n)), t((e) => e.filter((e) => e.source !== n && e.target !== n));
505
512
  }, [e, t]);
506
513
  return {
507
514
  clearSelection: r,
508
515
  deleteNode: l,
509
- deleteSelectedNode: L(() => {
516
+ deleteSelectedNode: R(() => {
510
517
  let e = n().find((e) => e.selected);
511
518
  e && l(e.id);
512
519
  }, [n, l]),
@@ -523,7 +530,7 @@ var Ft = {
523
530
  [i]: n.target.value
524
531
  } });
525
532
  }, u = (e) => e.stopPropagation();
526
- return /* @__PURE__ */ M("input", {
533
+ return /* @__PURE__ */ N("input", {
527
534
  type: "text",
528
535
  value: s,
529
536
  placeholder: c,
@@ -535,109 +542,35 @@ var Ft = {
535
542
  });
536
543
  };
537
544
  //#endregion
538
- //#region src/shared/components/ui/alert-dialog.tsx
539
- function Rt({ ...e }) {
540
- return /* @__PURE__ */ M(B.Root, {
541
- "data-slot": "alert-dialog",
542
- ...e
543
- });
544
- }
545
- function zt({ ...e }) {
546
- return /* @__PURE__ */ M(B.Trigger, {
547
- "data-slot": "alert-dialog-trigger",
548
- ...e
549
- });
550
- }
551
- function Bt({ ...e }) {
552
- return /* @__PURE__ */ M(B.Portal, {
553
- "data-slot": "alert-dialog-portal",
554
- ...e
555
- });
556
- }
557
- function Vt({ className: e, ...t }) {
558
- return /* @__PURE__ */ M(B.Overlay, {
559
- "data-slot": "alert-dialog-overlay",
560
- 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),
561
- ...t
562
- });
563
- }
564
- function Ht({ className: e, ...t }) {
565
- return /* @__PURE__ */ N(Bt, { children: [/* @__PURE__ */ M(Vt, {}), /* @__PURE__ */ M(B.Content, {
566
- "data-slot": "alert-dialog-content",
567
- 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),
568
- ...t
569
- })] });
570
- }
571
- function Ut({ className: e, ...t }) {
572
- return /* @__PURE__ */ M("div", {
573
- "data-slot": "alert-dialog-header",
574
- className: d("flex flex-col gap-2 text-center sm:text-left", e),
575
- ...t
576
- });
577
- }
578
- function Wt({ className: e, ...t }) {
579
- return /* @__PURE__ */ M("div", {
580
- "data-slot": "alert-dialog-footer",
581
- className: d("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
582
- ...t
583
- });
584
- }
585
- function Gt({ className: e, ...t }) {
586
- return /* @__PURE__ */ M(B.Title, {
587
- "data-slot": "alert-dialog-title",
588
- className: d("font-semibold text-lg", e),
589
- ...t
590
- });
591
- }
592
- function Kt({ className: e, ...t }) {
593
- return /* @__PURE__ */ M(B.Description, {
594
- "data-slot": "alert-dialog-description",
595
- className: d("text-muted-foreground text-sm", e),
596
- ...t
597
- });
598
- }
599
- function qt({ className: e, ...t }) {
600
- return /* @__PURE__ */ M(B.Action, {
601
- className: d(h(), e),
602
- ...t
603
- });
604
- }
605
- function Jt({ className: e, ...t }) {
606
- return /* @__PURE__ */ M(B.Cancel, {
607
- className: d(h({ variant: "outline" }), e),
608
- ...t
609
- });
610
- }
611
- //#endregion
612
545
  //#region src/shared/components/ui/dropdown-menu.tsx
613
546
  function J({ ...e }) {
614
- return /* @__PURE__ */ M(V.Root, {
547
+ return /* @__PURE__ */ N(B.Root, {
615
548
  "data-slot": "dropdown-menu",
616
549
  ...e
617
550
  });
618
551
  }
619
552
  function Y({ ...e }) {
620
- return /* @__PURE__ */ M(V.Trigger, {
553
+ return /* @__PURE__ */ N(B.Trigger, {
621
554
  "data-slot": "dropdown-menu-trigger",
622
555
  ...e
623
556
  });
624
557
  }
625
558
  function X({ className: e, sideOffset: t = 4, ...n }) {
626
- return /* @__PURE__ */ M(V.Portal, { children: /* @__PURE__ */ M(V.Content, {
559
+ return /* @__PURE__ */ N(B.Portal, { children: /* @__PURE__ */ N(B.Content, {
627
560
  "data-slot": "dropdown-menu-content",
628
561
  sideOffset: t,
629
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),
630
563
  ...n
631
564
  }) });
632
565
  }
633
- function Yt({ ...e }) {
634
- return /* @__PURE__ */ M(V.Group, {
566
+ function Rt({ ...e }) {
567
+ return /* @__PURE__ */ N(B.Group, {
635
568
  "data-slot": "dropdown-menu-group",
636
569
  ...e
637
570
  });
638
571
  }
639
572
  function Z({ className: e, inset: t, variant: n = "default", ...r }) {
640
- return /* @__PURE__ */ M(V.Item, {
573
+ return /* @__PURE__ */ N(B.Item, {
641
574
  "data-slot": "dropdown-menu-item",
642
575
  "data-inset": t,
643
576
  "data-variant": n,
@@ -645,16 +578,16 @@ function Z({ className: e, inset: t, variant: n = "default", ...r }) {
645
578
  ...r
646
579
  });
647
580
  }
648
- function Xt({ className: e, inset: t, ...n }) {
649
- return /* @__PURE__ */ M(V.Label, {
581
+ function zt({ className: e, inset: t, ...n }) {
582
+ return /* @__PURE__ */ N(B.Label, {
650
583
  "data-slot": "dropdown-menu-label",
651
584
  "data-inset": t,
652
585
  className: d("px-1.5 py-1 font-medium text-muted-foreground text-xs data-[inset]:pl-7", e),
653
586
  ...n
654
587
  });
655
588
  }
656
- function Zt({ className: e, ...t }) {
657
- return /* @__PURE__ */ M(V.Separator, {
589
+ function Bt({ className: e, ...t }) {
590
+ return /* @__PURE__ */ N(B.Separator, {
658
591
  "data-slot": "dropdown-menu-separator",
659
592
  className: d("-mx-1 my-1 h-px bg-border", e),
660
593
  ...t
@@ -662,48 +595,38 @@ function Zt({ className: e, ...t }) {
662
595
  }
663
596
  //#endregion
664
597
  //#region src/editor/features/TreegeEditor/nodes/components/NodeMoreMenu.tsx
665
- var Qt = ({ nodeId: e, className: t }) => {
666
- let { deleteNode: n, selectNode: r } = q(), { setIsNodeSheetOpen: i } = W(), a = G(), [o, s] = z(!1), c = (e) => e.stopPropagation();
667
- return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N(J, { children: [/* @__PURE__ */ M(Y, {
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, {
668
601
  asChild: !0,
669
- onClick: c,
670
- children: /* @__PURE__ */ M("button", {
602
+ onClick: o,
603
+ children: /* @__PURE__ */ N("button", {
671
604
  type: "button",
672
605
  "aria-label": a("editor.nodeActionsSheet.editNode"),
673
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),
674
- children: /* @__PURE__ */ M(et, { className: "h-3.5 w-3.5" })
607
+ children: /* @__PURE__ */ N($e, { className: "h-3.5 w-3.5" })
675
608
  })
676
- }), /* @__PURE__ */ N(X, {
609
+ }), /* @__PURE__ */ P(X, {
677
610
  align: "end",
678
- onClick: c,
611
+ onClick: o,
679
612
  children: [
680
- /* @__PURE__ */ N(Z, {
613
+ /* @__PURE__ */ P(Z, {
681
614
  onClick: () => {
682
- r(e), i(!0);
615
+ n(e), r(!0);
683
616
  },
684
- children: [/* @__PURE__ */ M(st, {}), a("common.settings")]
617
+ children: [/* @__PURE__ */ N(ot, {}), a("common.settings")]
685
618
  }),
686
- /* @__PURE__ */ M(Zt, {}),
687
- /* @__PURE__ */ N(Z, {
619
+ /* @__PURE__ */ N(Bt, {}),
620
+ /* @__PURE__ */ P(Z, {
688
621
  variant: "destructive",
689
- onClick: () => s(!0),
690
- children: [/* @__PURE__ */ M(lt, {}), a("common.delete")]
622
+ onSelect: (t) => {
623
+ t.preventDefault(), i(e);
624
+ },
625
+ children: [/* @__PURE__ */ N(ct, {}), a("common.delete")]
691
626
  })
692
627
  ]
693
- })] }), /* @__PURE__ */ M(Rt, {
694
- open: o,
695
- onOpenChange: s,
696
- children: /* @__PURE__ */ N(Ht, {
697
- onClick: c,
698
- children: [/* @__PURE__ */ N(Ut, { children: [/* @__PURE__ */ M(Gt, { children: a("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ M(Kt, { children: a("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ N(Wt, { children: [/* @__PURE__ */ M(Jt, { children: a("common.cancel") }), /* @__PURE__ */ M(qt, {
699
- onClick: () => {
700
- n(e), s(!1);
701
- },
702
- children: a("common.delete")
703
- })] })]
704
- })
705
628
  })] });
706
- }, $t = 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", {
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", {
707
630
  defaultVariants: { variant: "default" },
708
631
  variants: { variant: {
709
632
  blue: "bg-blue-500 text-white dark:bg-blue-600",
@@ -714,45 +637,45 @@ var Qt = ({ nodeId: e, className: t }) => {
714
637
  secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90"
715
638
  } }
716
639
  });
717
- function en({ className: e, variant: t, asChild: n = !1, ...r }) {
718
- return /* @__PURE__ */ M(n ? xt : "span", {
640
+ function Ut({ className: e, variant: t, asChild: n = !1, ...r }) {
641
+ return /* @__PURE__ */ N(n ? xt : "span", {
719
642
  "data-slot": "badge",
720
- className: d($t({ variant: t }), e),
643
+ className: d(Ht({ variant: t }), e),
721
644
  ...r
722
645
  });
723
646
  }
724
- var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
725
- /* @__PURE__ */ M(ve, {}),
726
- /* @__PURE__ */ M("div", {
647
+ var Wt = ht(({ data: e, id: t }) => /* @__PURE__ */ P(M, { children: [
648
+ /* @__PURE__ */ N(ve, {}),
649
+ /* @__PURE__ */ N("div", {
727
650
  className: "-top-3.5 absolute left-6",
728
- children: /* @__PURE__ */ N(en, {
651
+ children: /* @__PURE__ */ P(Ut, {
729
652
  className: "max-w-50 bg-chart-2",
730
- children: [/* @__PURE__ */ M(Ae, { className: "!w-3 !h-3" }), /* @__PURE__ */ M(Lt, {
653
+ children: [/* @__PURE__ */ N(ke, { className: "!w-3 !h-3" }), /* @__PURE__ */ N(Lt, {
731
654
  nodeId: t,
732
655
  label: e?.label,
733
656
  className: "min-w-0 flex-1 text-xs text-white placeholder:text-white/60"
734
657
  })]
735
658
  })
736
659
  }),
737
- /* @__PURE__ */ M(Qt, { nodeId: t })
738
- ] })), nn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", rn = (e = 21) => {
660
+ /* @__PURE__ */ N(Vt, { nodeId: t })
661
+ ] })), Gt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Kt = (e = 21) => {
739
662
  let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
740
- for (; e--;) t += nn[n[e] & 63];
663
+ for (; e--;) t += Gt[n[e] & 63];
741
664
  return t;
742
- }, an = {
665
+ }, qt = {
743
666
  data: { type: "text" },
744
- id: rn(),
667
+ id: Kt(),
745
668
  position: {
746
669
  x: 0,
747
670
  y: 0
748
671
  },
749
672
  type: "input"
750
- }, on = () => {
751
- let { setNodes: e, setEdges: t, screenToFlowPosition: n, getNode: r, getNodes: i, getEdges: a } = De(), o = L((n, r, i = !1, o) => {
673
+ }, Jt = () => {
674
+ let { setNodes: e, setEdges: t, screenToFlowPosition: n, getNode: r, getNodes: i, getEdges: a } = j(), o = R((n, r, i = !1, o) => {
752
675
  let c = n.id, l = a().filter((e) => e.source === c), u = s(n);
753
676
  if (l.length > 0 && !u) return;
754
- let d = rn(), f = {
755
- ...an,
677
+ let d = Kt(), f = {
678
+ ...qt,
756
679
  ...o && {
757
680
  data: o.data ?? {},
758
681
  type: o.type
@@ -768,7 +691,7 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
768
691
  operator: "===",
769
692
  value: ""
770
693
  }] } : void 0,
771
- id: rn(),
694
+ id: Kt(),
772
695
  source: c,
773
696
  target: d,
774
697
  type: t && u ? "conditional" : "default"
@@ -796,7 +719,7 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
796
719
  a,
797
720
  e,
798
721
  t
799
- ]), c = L((e) => {
722
+ ]), c = R((e) => {
800
723
  t((t) => {
801
724
  let n = Ce(e, t), i = e.source, a = r(i);
802
725
  return n.filter((e) => e.source === i).length > 1 && a && s(a) ? n.map((e) => e.source === i ? {
@@ -812,7 +735,7 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
812
735
  type: "conditional"
813
736
  } : e) : n;
814
737
  });
815
- }, [t, r]), l = L((e, t) => {
738
+ }, [t, r]), l = R((e, t) => {
816
739
  let n = r(e);
817
740
  if (!n) return;
818
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));
@@ -825,7 +748,7 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
825
748
  i,
826
749
  a,
827
750
  o
828
- ]), u = L((e, t) => {
751
+ ]), u = R((e, t) => {
829
752
  if (!t.isValid) {
830
753
  let { clientX: i, clientY: a } = "changedTouches" in e ? e.changedTouches[0] : e, s = t.fromNode;
831
754
  if (!s) return;
@@ -845,7 +768,7 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
845
768
  o,
846
769
  r,
847
770
  n
848
- ]), d = L((e) => {
771
+ ]), d = R((e) => {
849
772
  t((t) => {
850
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();
851
774
  return n.forEach((e) => {
@@ -864,7 +787,7 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
864
787
  });
865
788
  }, [t]);
866
789
  return {
867
- isValidConnection: L((e) => {
790
+ isValidConnection: R((e) => {
868
791
  if (e.source === e.target) return !1;
869
792
  let t = r(e.source);
870
793
  return t ? !(a().filter((t) => t.source === e.source).length > 0 && !s(t)) : !1;
@@ -874,12 +797,12 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
874
797
  onConnectEnd: u,
875
798
  onEdgesDelete: d
876
799
  };
877
- }, sn = {
800
+ }, Yt = {
878
801
  divider: "divider",
879
802
  title: "title"
880
- }, cn = ({ nodeId: e, isConnectable: t }) => {
881
- let { onAddFromHandle: n } = on(), r = G(), [i, o] = z(!1);
882
- return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(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, {
883
806
  type: "source",
884
807
  position: be.Bottom,
885
808
  isConnectable: t,
@@ -887,22 +810,22 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
887
810
  e.defaultPrevented || o(!0);
888
811
  },
889
812
  className: "flex h-6! w-6! cursor-pointer items-center justify-center rounded-sm transition-colors hover:bg-primary/80!",
890
- children: /* @__PURE__ */ M(F, { className: "h-4 w-4 text-primary-foreground" })
891
- }), /* @__PURE__ */ N(J, {
813
+ children: /* @__PURE__ */ N(I, { className: "h-4 w-4 text-primary-foreground" })
814
+ }), /* @__PURE__ */ P(J, {
892
815
  open: i,
893
816
  onOpenChange: o,
894
- children: [/* @__PURE__ */ M(Y, {
817
+ children: [/* @__PURE__ */ N(Y, {
895
818
  asChild: !0,
896
- children: /* @__PURE__ */ M("span", {
819
+ children: /* @__PURE__ */ N("span", {
897
820
  "aria-hidden": !0,
898
821
  className: "-translate-x-1/2 pointer-events-none absolute bottom-0 left-1/2 h-0 w-0"
899
822
  })
900
- }), /* @__PURE__ */ N(X, {
823
+ }), /* @__PURE__ */ P(X, {
901
824
  align: "center",
902
825
  side: "bottom",
903
826
  className: "treege-scrollbar max-h-80",
904
827
  children: [
905
- /* @__PURE__ */ N(Yt, { children: [/* @__PURE__ */ M(Xt, { children: r("editor.selectNodeType.options.input") }), Object.values(K).map((t) => /* @__PURE__ */ M(Z, {
828
+ /* @__PURE__ */ P(Rt, { children: [/* @__PURE__ */ N(zt, { children: r("editor.selectNodeType.options.input") }), Object.values(K).map((t) => /* @__PURE__ */ N(Z, {
906
829
  onClick: () => n(e, {
907
830
  data: { type: t },
908
831
  type: a.input
@@ -910,8 +833,8 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
910
833
  className: "capitalize",
911
834
  children: t
912
835
  }, t))] }),
913
- /* @__PURE__ */ M(Zt, {}),
914
- /* @__PURE__ */ N(Yt, { children: [/* @__PURE__ */ M(Xt, { children: r("editor.selectNodeType.options.ui") }), Object.values(sn).map((t) => /* @__PURE__ */ M(Z, {
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, {
915
838
  onClick: () => n(e, {
916
839
  data: { type: t },
917
840
  type: a.ui
@@ -919,8 +842,8 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
919
842
  className: "capitalize",
920
843
  children: t
921
844
  }, t))] }),
922
- /* @__PURE__ */ M(Zt, {}),
923
- /* @__PURE__ */ N(Yt, { children: [/* @__PURE__ */ M(Xt, { children: r("common.other") }), /* @__PURE__ */ M(Z, {
845
+ /* @__PURE__ */ N(Bt, {}),
846
+ /* @__PURE__ */ P(Rt, { children: [/* @__PURE__ */ N(zt, { children: r("common.other") }), /* @__PURE__ */ N(Z, {
924
847
  onClick: () => n(e, {
925
848
  data: {},
926
849
  type: a.flow
@@ -930,65 +853,65 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
930
853
  ]
931
854
  })]
932
855
  })] });
933
- }, ln = {
934
- [K.address]: Qe,
935
- [K.autocomplete]: at,
936
- [K.checkbox]: Fe,
937
- [K.date]: je,
938
- [K.daterange]: Me,
939
- [K.file]: tt,
940
- [K.hidden]: We,
941
- [K.http]: Be,
942
- [K.number]: Ge,
943
- [K.password]: Je,
944
- [K.radio]: Re,
945
- [K.select]: Xe,
946
- [K.submit]: ot,
947
- [K.switch]: ct,
948
- [K.text]: Ne,
949
- [K.textarea]: Oe,
950
- [K.time]: ze,
951
- [K.timerange]: ze,
952
- [sn.divider]: $e,
953
- [sn.title]: Ke
954
- }, un = rt, dn = (e) => e && ln[e] || un, fn = {
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 = {
955
878
  input: Object.values(K),
956
- ui: Object.values(sn)
957
- }, pn = ({ nodeId: e, type: t, inputType: n }) => {
958
- let { updateNodeData: r } = q(), i = G(), a = fn[t], o = (e) => e.stopPropagation();
959
- return /* @__PURE__ */ N(J, { children: [/* @__PURE__ */ M(Y, {
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, {
960
883
  asChild: !0,
961
884
  onClick: o,
962
- children: /* @__PURE__ */ N(en, {
885
+ children: /* @__PURE__ */ P(Ut, {
963
886
  variant: "default",
964
887
  className: "nodrag nopan cursor-pointer px-1.5 py-0 text-[10px] capitalize [&>svg]:size-2.5",
965
888
  children: [
966
- /* @__PURE__ */ M(dn(n), { className: "mt-0.5" }),
889
+ /* @__PURE__ */ N($t(n), { className: "mt-0.5" }),
967
890
  n || i("editor.selectInputType.type"),
968
- /* @__PURE__ */ M(Ie, {})
891
+ /* @__PURE__ */ N(Fe, {})
969
892
  ]
970
893
  })
971
- }), /* @__PURE__ */ M(X, {
894
+ }), /* @__PURE__ */ N(X, {
972
895
  align: "start",
973
896
  className: "treege-scrollbar max-h-60",
974
897
  onClick: o,
975
898
  children: a.map((t) => {
976
- let i = dn(t);
977
- return /* @__PURE__ */ N(Z, {
899
+ let i = $t(t);
900
+ return /* @__PURE__ */ P(Z, {
978
901
  onClick: () => r(e, { type: t }),
979
902
  className: d("capitalize", t === n && "bg-accent"),
980
- children: [/* @__PURE__ */ M(i, {}), t]
903
+ children: [/* @__PURE__ */ N(i, {}), t]
981
904
  }, t);
982
905
  })
983
906
  })] });
984
- }, mn = [
907
+ }, nn = [
985
908
  "radio",
986
909
  "select",
987
910
  "checkbox",
988
911
  "autocomplete"
989
- ], hn = ({ nodeId: e, data: t }) => {
912
+ ], rn = ({ nodeId: e, data: t }) => {
990
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;
991
- if (!(h && mn.includes(h))) return null;
914
+ if (!(h && nn.includes(h))) return null;
992
915
  let g = t.options ?? [], v = () => {
993
916
  a(""), s("");
994
917
  }, y = (t) => {
@@ -1005,42 +928,42 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
1005
928
  }, x = (e) => {
1006
929
  e.key === "Enter" && (e.preventDefault(), y());
1007
930
  }, S = (e) => e.stopPropagation();
1008
- return /* @__PURE__ */ N("div", {
931
+ return /* @__PURE__ */ P("div", {
1009
932
  className: "nodrag nopan my-1 flex flex-col gap-0.5",
1010
933
  children: [g.map((e, t) => {
1011
934
  let n = f(e.label) || e.value || "—", r = `${e.value || "opt"}-${t}`;
1012
- return /* @__PURE__ */ M("div", {
935
+ return /* @__PURE__ */ N("div", {
1013
936
  className: "truncate text-muted-foreground text-xs",
1014
937
  children: n
1015
938
  }, r);
1016
- }), /* @__PURE__ */ N(le, {
939
+ }), /* @__PURE__ */ P(le, {
1017
940
  open: n,
1018
941
  onOpenChange: b,
1019
- children: [/* @__PURE__ */ M(u, {
942
+ children: [/* @__PURE__ */ N(u, {
1020
943
  asChild: !0,
1021
944
  onClick: S,
1022
- children: /* @__PURE__ */ N(p, {
945
+ children: /* @__PURE__ */ P(p, {
1023
946
  type: "button",
1024
947
  variant: "link",
1025
948
  size: "xs",
1026
949
  className: "w-fit p-0!",
1027
- children: [/* @__PURE__ */ M(F, { className: "size-3" }), f("editor.inputNodeForm.addOption")]
950
+ children: [/* @__PURE__ */ N(I, { className: "size-3" }), f("editor.inputNodeForm.addOption")]
1028
951
  })
1029
- }), /* @__PURE__ */ M(_, {
952
+ }), /* @__PURE__ */ N(_, {
1030
953
  align: "start",
1031
954
  className: "w-64 p-3",
1032
955
  onClick: S,
1033
- children: /* @__PURE__ */ N("form", {
956
+ children: /* @__PURE__ */ P("form", {
1034
957
  onSubmit: y,
1035
958
  className: "flex flex-col gap-2",
1036
959
  children: [
1037
- /* @__PURE__ */ N("div", {
960
+ /* @__PURE__ */ P("div", {
1038
961
  className: "flex flex-col gap-1",
1039
- children: [/* @__PURE__ */ M(l, {
962
+ children: [/* @__PURE__ */ N(l, {
1040
963
  htmlFor: `${e}-option-label`,
1041
964
  className: "text-xs",
1042
965
  children: f("editor.inputNodeForm.optionLabel")
1043
- }), /* @__PURE__ */ M(m, {
966
+ }), /* @__PURE__ */ N(m, {
1044
967
  id: `${e}-option-label`,
1045
968
  autoFocus: !0,
1046
969
  value: i,
@@ -1048,20 +971,20 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
1048
971
  onKeyDown: x
1049
972
  })]
1050
973
  }),
1051
- /* @__PURE__ */ N("div", {
974
+ /* @__PURE__ */ P("div", {
1052
975
  className: "flex flex-col gap-1",
1053
- children: [/* @__PURE__ */ M(l, {
976
+ children: [/* @__PURE__ */ N(l, {
1054
977
  htmlFor: `${e}-option-value`,
1055
978
  className: "text-xs",
1056
979
  children: f("editor.inputNodeForm.optionValue")
1057
- }), /* @__PURE__ */ M(m, {
980
+ }), /* @__PURE__ */ N(m, {
1058
981
  id: `${e}-option-value`,
1059
982
  value: o,
1060
983
  onChange: (e) => s(e.target.value),
1061
984
  onKeyDown: x
1062
985
  })]
1063
986
  }),
1064
- /* @__PURE__ */ M(p, {
987
+ /* @__PURE__ */ N(p, {
1065
988
  type: "submit",
1066
989
  size: "sm",
1067
990
  disabled: !(i.trim() || o.trim()),
@@ -1072,13 +995,13 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
1072
995
  })]
1073
996
  })]
1074
997
  });
1075
- }, gn = ({ nodeId: e, required: t }) => {
998
+ }, an = ({ nodeId: e, required: t }) => {
1076
999
  let { updateNodeData: n } = q(), r = G();
1077
- return /* @__PURE__ */ M(en, {
1000
+ return /* @__PURE__ */ N(Ut, {
1078
1001
  variant: t ? "destructive" : "outline",
1079
1002
  asChild: !0,
1080
1003
  className: "nodrag nopan cursor-pointer px-1.5 py-0 text-[10px] capitalize [&>svg]:size-2.5",
1081
- children: /* @__PURE__ */ M("button", {
1004
+ children: /* @__PURE__ */ N("button", {
1082
1005
  type: "button",
1083
1006
  onClick: (r) => {
1084
1007
  r.stopPropagation(), n(e, { required: !t });
@@ -1086,54 +1009,142 @@ var tn = gt(({ data: e, id: t }) => /* @__PURE__ */ N(j, { children: [
1086
1009
  children: r(t ? "editor.inputNodeForm.required" : "editor.inputNodeForm.optional")
1087
1010
  })
1088
1011
  });
1089
- }, _n = ({ children: e, inGroup: t, isSubmit: n }) => /* @__PURE__ */ M("div", {
1012
+ }, on = ({ children: e, inGroup: t, isSubmit: n }) => /* @__PURE__ */ N("div", {
1090
1013
  className: d("react-flow__node__wrapper relative", t && "in-group", n && "submit-type"),
1091
1014
  children: e
1092
- }), vn = gt(({ data: e, isConnectable: t, parentId: n, type: r, id: i }) => {
1015
+ }), sn = ht(({ data: e, isConnectable: t, parentId: n, type: r, id: i }) => {
1093
1016
  let a = r === "input" || r === "ui" ? e?.type : void 0, o = r === "input" && e?.type === "submit", s = r === "input" ? e?.name : void 0;
1094
- return /* @__PURE__ */ N(_n, {
1017
+ return /* @__PURE__ */ P(on, {
1095
1018
  inGroup: !!n,
1096
1019
  isSubmit: o,
1097
1020
  children: [
1098
- /* @__PURE__ */ M(Qt, { nodeId: i }),
1099
- /* @__PURE__ */ M(ge, {
1021
+ /* @__PURE__ */ N(Vt, { nodeId: i }),
1022
+ /* @__PURE__ */ N(ge, {
1100
1023
  type: "target",
1101
1024
  position: be.Top,
1102
1025
  isConnectable: t,
1103
1026
  isConnectableStart: r === "ui"
1104
1027
  }),
1105
- /* @__PURE__ */ M(Lt, {
1028
+ /* @__PURE__ */ N(Lt, {
1106
1029
  nodeId: i,
1107
1030
  label: e?.label,
1108
1031
  placeholder: s,
1109
1032
  className: d("py-1", r === "ui" && "capitalize")
1110
1033
  }),
1111
- /* @__PURE__ */ N("div", {
1034
+ /* @__PURE__ */ P("div", {
1112
1035
  className: "mb-1 flex gap-1",
1113
- children: [(r === "input" || r === "ui") && /* @__PURE__ */ M(pn, {
1036
+ children: [(r === "input" || r === "ui") && /* @__PURE__ */ N(tn, {
1114
1037
  nodeId: i,
1115
1038
  type: r,
1116
1039
  inputType: a
1117
- }), r === "input" && !o && /* @__PURE__ */ M(gn, {
1040
+ }), r === "input" && !o && /* @__PURE__ */ N(an, {
1118
1041
  nodeId: i,
1119
1042
  required: e?.required
1120
1043
  })]
1121
1044
  }),
1122
- r === "input" && /* @__PURE__ */ M(hn, {
1045
+ r === "input" && /* @__PURE__ */ N(rn, {
1123
1046
  nodeId: i,
1124
1047
  data: e
1125
1048
  }),
1126
- /* @__PURE__ */ M(cn, {
1049
+ /* @__PURE__ */ N(Xt, {
1127
1050
  nodeId: i,
1128
1051
  isConnectable: t
1129
1052
  })
1130
1053
  ]
1131
1054
  });
1132
- }), yn = {
1133
- [a.flow]: vn,
1134
- [a.group]: tn,
1135
- [a.input]: vn,
1136
- [a.ui]: vn
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
+ let r = e;
1141
+ t(), r && requestAnimationFrame(() => {
1142
+ n(r);
1143
+ });
1144
+ },
1145
+ children: r("common.delete")
1146
+ })] })] })
1147
+ });
1137
1148
  }, 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 = {
1138
1149
  claude: "claude-3-5-haiku-20241022",
1139
1150
  deepseek: "deepseek-chat",
@@ -1292,36 +1303,36 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1292
1303
  s(!1);
1293
1304
  }
1294
1305
  };
1295
- return /* @__PURE__ */ N(ce, {
1306
+ return /* @__PURE__ */ P(ce, {
1296
1307
  open: n,
1297
1308
  onOpenChange: r,
1298
- children: [/* @__PURE__ */ M(w, {
1309
+ children: [/* @__PURE__ */ N(w, {
1299
1310
  asChild: !0,
1300
- children: /* @__PURE__ */ N(p, {
1311
+ children: /* @__PURE__ */ P(p, {
1301
1312
  variant: "outline",
1302
1313
  size: "sm",
1303
1314
  disabled: !e?.apiKey,
1304
1315
  children: [
1305
- /* @__PURE__ */ M(ft, { className: "h-4 w-4 text-[#13d3b4]" }),
1316
+ /* @__PURE__ */ N(dt, { className: "h-4 w-4 text-[#13d3b4]" }),
1306
1317
  " ",
1307
1318
  c("editor.aiGenerator.buttonLabel")
1308
1319
  ]
1309
1320
  })
1310
- }), /* @__PURE__ */ N(S, {
1321
+ }), /* @__PURE__ */ P(S, {
1311
1322
  className: "sm:max-w-[550px]",
1312
1323
  children: [
1313
- /* @__PURE__ */ N(re, { children: [/* @__PURE__ */ M(ee, { children: c("editor.aiGenerator.title") }), /* @__PURE__ */ M(C, { children: c("editor.aiGenerator.titleDescription") })] }),
1314
- /* @__PURE__ */ N("div", {
1324
+ /* @__PURE__ */ P(re, { children: [/* @__PURE__ */ N(ee, { children: c("editor.aiGenerator.title") }), /* @__PURE__ */ N(C, { children: c("editor.aiGenerator.titleDescription") })] }),
1325
+ /* @__PURE__ */ P("div", {
1315
1326
  className: "grid gap-4 py-4",
1316
- children: [/* @__PURE__ */ N("div", {
1327
+ children: [/* @__PURE__ */ P("div", {
1317
1328
  className: "grid gap-2",
1318
1329
  children: [
1319
- /* @__PURE__ */ M("label", {
1330
+ /* @__PURE__ */ N("label", {
1320
1331
  htmlFor: "ai-prompt",
1321
1332
  className: "font-medium text-sm",
1322
1333
  children: c("editor.aiGenerator.description")
1323
1334
  }),
1324
- /* @__PURE__ */ M(ne, {
1335
+ /* @__PURE__ */ N(ne, {
1325
1336
  placeholder: c("editor.aiGenerator.descriptionPlaceholder"),
1326
1337
  value: i,
1327
1338
  onChange: (e) => a(e.target.value),
@@ -1332,22 +1343,22 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1332
1343
  disabled: o,
1333
1344
  className: "resize-none"
1334
1345
  }),
1335
- /* @__PURE__ */ M("p", {
1346
+ /* @__PURE__ */ N("p", {
1336
1347
  className: "text-muted-foreground text-xs",
1337
1348
  children: c("editor.aiGenerator.keyboardShortcut").replace("{cmdEnter}", "⌘ Enter").replace("{ctrlEnter}", "Ctrl Enter")
1338
1349
  })
1339
1350
  ]
1340
- }), !e?.apiKey && /* @__PURE__ */ N("div", {
1351
+ }), !e?.apiKey && /* @__PURE__ */ P("div", {
1341
1352
  className: "rounded-md bg-muted p-3 text-sm",
1342
- children: [/* @__PURE__ */ M("p", {
1353
+ children: [/* @__PURE__ */ N("p", {
1343
1354
  className: "font-medium",
1344
1355
  children: c("editor.aiGenerator.aiNotConfigured")
1345
- }), /* @__PURE__ */ N("p", {
1356
+ }), /* @__PURE__ */ P("p", {
1346
1357
  className: "mt-1 text-muted-foreground text-xs",
1347
1358
  children: [
1348
1359
  c("editor.aiGenerator.aiNotConfiguredDesc").replace("{code}", ""),
1349
1360
  " ",
1350
- /* @__PURE__ */ M("code", {
1361
+ /* @__PURE__ */ N("code", {
1351
1362
  className: "rounded bg-background px-1 py-0.5",
1352
1363
  children: "aiConfig"
1353
1364
  })
@@ -1355,28 +1366,28 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1355
1366
  })]
1356
1367
  })]
1357
1368
  }),
1358
- /* @__PURE__ */ N(ae, { children: [/* @__PURE__ */ M(p, {
1369
+ /* @__PURE__ */ P(ae, { children: [/* @__PURE__ */ N(p, {
1359
1370
  variant: "outline",
1360
1371
  onClick: () => r(!1),
1361
1372
  disabled: o,
1362
1373
  children: c("editor.aiGenerator.cancel")
1363
- }), /* @__PURE__ */ M(p, {
1374
+ }), /* @__PURE__ */ N(p, {
1364
1375
  onClick: l,
1365
1376
  disabled: o || !i.trim() || !e?.apiKey,
1366
- children: o ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(Ze, { className: "h-4 w-4 animate-spin" }), c("editor.aiGenerator.generating")] }) : /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(ft, { className: "h-4 w-4 text-[--treege-color-primary]" }), c("editor.aiGenerator.generate")] })
1377
+ 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")] })
1367
1378
  })] })
1368
1379
  ]
1369
1380
  })]
1370
1381
  });
1371
- }, An = rn(), jn = ({ onExportJson: e, onSave: t }) => {
1372
- let { flowId: n, setFlowId: r, aiConfig: i } = W(), { setNodes: a, setEdges: o, addNodes: s, screenToFlowPosition: c } = De(), l = n || An, u = Ee(), d = Te(), f = bt(null), m = G(), h = () => {
1382
+ }, An = Kt(), jn = ({ onExportJson: e, onSave: t }) => {
1383
+ 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 = () => {
1373
1384
  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({
1374
1385
  x: e - n,
1375
1386
  y: t - r
1376
1387
  });
1377
1388
  s([{
1378
- ...an,
1379
- id: rn(),
1389
+ ...qt,
1390
+ id: Kt(),
1380
1391
  position: i,
1381
1392
  selected: !0
1382
1393
  }]);
@@ -1400,7 +1411,7 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1400
1411
  nodes: u
1401
1412
  }, i = new Blob([JSON.stringify(t, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
1402
1413
  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);
1403
- }, v = L(() => {
1414
+ }, v = R(() => {
1404
1415
  n || r?.(l), t?.({
1405
1416
  edges: d,
1406
1417
  id: l,
@@ -1414,61 +1425,61 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1414
1425
  t,
1415
1426
  r
1416
1427
  ]);
1417
- return vt(() => {
1428
+ return _t(() => {
1418
1429
  let e = (e) => {
1419
1430
  (e.ctrlKey || e.metaKey) && e.key === "s" && (e.preventDefault(), v());
1420
1431
  };
1421
1432
  return window.addEventListener("keydown", e), () => {
1422
1433
  window.removeEventListener("keydown", e);
1423
1434
  };
1424
- }, [v]), /* @__PURE__ */ N(ye, {
1435
+ }, [v]), /* @__PURE__ */ P(ye, {
1425
1436
  position: "top-right",
1426
1437
  className: "flex gap-2",
1427
1438
  children: [
1428
- /* @__PURE__ */ M(kn, {
1439
+ /* @__PURE__ */ N(kn, {
1429
1440
  aiConfig: i,
1430
1441
  onGenerate: (e) => {
1431
1442
  a(e.nodes), o(e.edges);
1432
1443
  }
1433
1444
  }),
1434
- /* @__PURE__ */ N(p, {
1445
+ /* @__PURE__ */ P(p, {
1435
1446
  variant: "outline",
1436
1447
  size: "sm",
1437
1448
  onClick: h,
1438
1449
  children: [
1439
- /* @__PURE__ */ M(F, {}),
1450
+ /* @__PURE__ */ N(I, {}),
1440
1451
  " ",
1441
1452
  m("editor.actionsPanel.addNode")
1442
1453
  ]
1443
1454
  }),
1444
- /* @__PURE__ */ N(p, {
1455
+ /* @__PURE__ */ P(p, {
1445
1456
  variant: "outline",
1446
1457
  size: "sm",
1447
1458
  onClick: v,
1448
1459
  children: [
1449
- /* @__PURE__ */ M(it, {}),
1460
+ /* @__PURE__ */ N(rt, {}),
1450
1461
  " ",
1451
1462
  m("common.save")
1452
1463
  ]
1453
1464
  }),
1454
- /* @__PURE__ */ N(J, { children: [/* @__PURE__ */ M(Y, {
1465
+ /* @__PURE__ */ P(J, { children: [/* @__PURE__ */ N(Y, {
1455
1466
  asChild: !0,
1456
- children: /* @__PURE__ */ M(p, {
1467
+ children: /* @__PURE__ */ N(p, {
1457
1468
  variant: "outline",
1458
1469
  size: "sm",
1459
- children: /* @__PURE__ */ M(Ue, {})
1470
+ children: /* @__PURE__ */ N(He, {})
1460
1471
  })
1461
- }), /* @__PURE__ */ N(X, {
1472
+ }), /* @__PURE__ */ P(X, {
1462
1473
  align: "start",
1463
1474
  children: [
1464
- /* @__PURE__ */ M(Xt, {
1475
+ /* @__PURE__ */ N(zt, {
1465
1476
  className: "font-normal",
1466
- children: /* @__PURE__ */ N("div", {
1477
+ children: /* @__PURE__ */ P("div", {
1467
1478
  className: "flex flex-col gap-1",
1468
- children: [/* @__PURE__ */ M("span", {
1479
+ children: [/* @__PURE__ */ N("span", {
1469
1480
  className: "text-muted-foreground text-xs",
1470
1481
  children: "Flow ID"
1471
- }), /* @__PURE__ */ N("button", {
1482
+ }), /* @__PURE__ */ P("button", {
1472
1483
  onClick: async () => {
1473
1484
  try {
1474
1485
  await navigator.clipboard.writeText(l), H.success(m("editor.actionsPanel.idCopied"), { description: l });
@@ -1478,44 +1489,44 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1478
1489
  },
1479
1490
  className: "flex items-center gap-2 font-mono text-muted-foreground transition-colors hover:text-primary",
1480
1491
  type: "button",
1481
- children: [/* @__PURE__ */ M(Ve, { className: "h-3 w-3" }), /* @__PURE__ */ M("span", {
1492
+ children: [/* @__PURE__ */ N(Be, { className: "h-3 w-3" }), /* @__PURE__ */ N("span", {
1482
1493
  className: "truncate text-xs",
1483
1494
  children: l
1484
1495
  })]
1485
1496
  })]
1486
1497
  })
1487
1498
  }),
1488
- /* @__PURE__ */ M(Zt, {}),
1489
- /* @__PURE__ */ N(Yt, { children: [/* @__PURE__ */ N(Z, {
1499
+ /* @__PURE__ */ N(Bt, {}),
1500
+ /* @__PURE__ */ P(Rt, { children: [/* @__PURE__ */ P(Z, {
1490
1501
  onClick: () => f?.current?.click(),
1491
1502
  children: [
1492
- /* @__PURE__ */ M(He, {}),
1503
+ /* @__PURE__ */ N(Ve, {}),
1493
1504
  " ",
1494
1505
  m("editor.actionsPanel.importJson")
1495
1506
  ]
1496
- }), /* @__PURE__ */ N(Z, {
1507
+ }), /* @__PURE__ */ P(Z, {
1497
1508
  onClick: _,
1498
1509
  children: [
1499
- /* @__PURE__ */ M(ke, {}),
1510
+ /* @__PURE__ */ N(Oe, {}),
1500
1511
  " ",
1501
1512
  m("editor.actionsPanel.exportJson")
1502
1513
  ]
1503
1514
  })] }),
1504
- /* @__PURE__ */ M(Zt, {}),
1505
- /* @__PURE__ */ M(Yt, { children: /* @__PURE__ */ N(Z, {
1515
+ /* @__PURE__ */ N(Bt, {}),
1516
+ /* @__PURE__ */ N(Rt, { children: /* @__PURE__ */ P(Z, {
1506
1517
  onClick: () => {
1507
1518
  a([]), o([]), H.success(m("editor.actionsPanel.clearSuccess"), { description: m("editor.actionsPanel.clearSuccessDesc") });
1508
1519
  },
1509
1520
  className: "text-destructive focus:text-destructive",
1510
1521
  children: [
1511
- /* @__PURE__ */ M(lt, { className: "text-destructive" }),
1522
+ /* @__PURE__ */ N(ct, { className: "text-destructive" }),
1512
1523
  " ",
1513
1524
  m("editor.actionsPanel.clear")
1514
1525
  ]
1515
1526
  }) })
1516
1527
  ]
1517
1528
  })] }),
1518
- /* @__PURE__ */ M("input", {
1529
+ /* @__PURE__ */ N("input", {
1519
1530
  type: "file",
1520
1531
  accept: "application/json,.json",
1521
1532
  className: "hidden",
@@ -1532,19 +1543,19 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1532
1543
  fr: "fr",
1533
1544
  it: "it",
1534
1545
  pt: "pt"
1535
- }, Q = ({ value: e = "en", onValueChange: t }) => /* @__PURE__ */ N(v, {
1546
+ }, Q = ({ value: e = "en", onValueChange: t }) => /* @__PURE__ */ P(v, {
1536
1547
  value: e,
1537
1548
  onValueChange: t,
1538
- children: [/* @__PURE__ */ M(g, {
1549
+ children: [/* @__PURE__ */ N(g, {
1539
1550
  className: "uppercase",
1540
- children: /* @__PURE__ */ M(c, { placeholder: "" })
1541
- }), /* @__PURE__ */ M(k, { children: /* @__PURE__ */ M(A, { children: Object.values(Mn).map((e) => /* @__PURE__ */ M(b, {
1551
+ children: /* @__PURE__ */ N(c, { placeholder: "" })
1552
+ }), /* @__PURE__ */ N(k, { children: /* @__PURE__ */ N(A, { children: Object.values(Mn).map((e) => /* @__PURE__ */ N(b, {
1542
1553
  value: e,
1543
1554
  className: "uppercase",
1544
1555
  children: e
1545
1556
  }, e)) }) })]
1546
1557
  }), $ = () => {
1547
- let e = Ee(), t = R(() => e.filter(i), [e]), n = R(() => e.filter((e) => e.selected), [e]), r = R(() => e.find((e) => e.selected), [e]);
1558
+ 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]);
1548
1559
  return {
1549
1560
  groupNodes: t,
1550
1561
  hasSelectedNodes: n.length > 0,
@@ -1553,7 +1564,7 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1553
1564
  selectedNodes: n
1554
1565
  };
1555
1566
  }, Nn = () => {
1556
- let [e, t] = z("en"), { updateSelectedNodeData: n } = q(), { selectedNode: r } = $(), i = G(), { Field: a } = P({
1567
+ let [e, t] = z("en"), { updateSelectedNodeData: n } = q(), { selectedNode: r } = $(), i = G(), { Field: a } = F({
1557
1568
  defaultValues: {
1558
1569
  label: r?.data?.label || { en: "" },
1559
1570
  targetId: r?.data?.targetId || ""
@@ -1568,22 +1579,22 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1568
1579
  n(e);
1569
1580
  }
1570
1581
  });
1571
- return /* @__PURE__ */ M("form", {
1582
+ return /* @__PURE__ */ N("form", {
1572
1583
  onSubmit: (e) => {
1573
1584
  e.preventDefault(), e.stopPropagation();
1574
1585
  },
1575
- children: /* @__PURE__ */ N("div", {
1586
+ children: /* @__PURE__ */ P("div", {
1576
1587
  className: "grid gap-6",
1577
- children: [/* @__PURE__ */ N("div", {
1588
+ children: [/* @__PURE__ */ P("div", {
1578
1589
  className: "flex items-end gap-2",
1579
- children: [/* @__PURE__ */ M(a, {
1590
+ children: [/* @__PURE__ */ N(a, {
1580
1591
  name: "label",
1581
- children: (t) => /* @__PURE__ */ N(T, {
1592
+ children: (t) => /* @__PURE__ */ P(T, {
1582
1593
  className: "flex-1",
1583
- children: [/* @__PURE__ */ M(l, {
1594
+ children: [/* @__PURE__ */ N(l, {
1584
1595
  htmlFor: t.name,
1585
1596
  children: i("editor.flowNodeForm.label")
1586
- }), /* @__PURE__ */ M(m, {
1597
+ }), /* @__PURE__ */ N(m, {
1587
1598
  id: t.name,
1588
1599
  name: t.name,
1589
1600
  value: t.state.value?.[e] || "",
@@ -1596,31 +1607,31 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1596
1607
  }
1597
1608
  })]
1598
1609
  })
1599
- }), /* @__PURE__ */ M(Q, {
1610
+ }), /* @__PURE__ */ N(Q, {
1600
1611
  value: e,
1601
1612
  onValueChange: t
1602
1613
  })]
1603
- }), /* @__PURE__ */ M(a, {
1614
+ }), /* @__PURE__ */ N(a, {
1604
1615
  name: "targetId",
1605
- children: (e) => /* @__PURE__ */ N(T, { children: [
1606
- /* @__PURE__ */ N(l, {
1616
+ children: (e) => /* @__PURE__ */ P(T, { children: [
1617
+ /* @__PURE__ */ P(l, {
1607
1618
  htmlFor: e.name,
1608
1619
  children: [i("editor.flowNodeForm.targetId"), " (Flow ID)"]
1609
1620
  }),
1610
- /* @__PURE__ */ M(m, {
1621
+ /* @__PURE__ */ N(m, {
1611
1622
  id: e.name,
1612
1623
  name: e.name,
1613
1624
  value: e.state.value,
1614
1625
  onBlur: e.handleBlur,
1615
1626
  onChange: ({ target: t }) => e.handleChange(t.value)
1616
1627
  }),
1617
- /* @__PURE__ */ M(E, { children: "Unique identifier of the target flow." })
1628
+ /* @__PURE__ */ N(E, { children: "Unique identifier of the target flow." })
1618
1629
  ] })
1619
1630
  })]
1620
1631
  })
1621
1632
  });
1622
1633
  }, Pn = () => {
1623
- let [e, t] = z("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), { Field: i } = P({
1634
+ let [e, t] = z("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), { Field: i } = F({
1624
1635
  defaultValues: { label: n?.data?.label || { en: "" } },
1625
1636
  listeners: {
1626
1637
  onChange: ({ formApi: e }) => {
@@ -1632,20 +1643,20 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1632
1643
  r(e);
1633
1644
  }
1634
1645
  });
1635
- return /* @__PURE__ */ M("form", {
1646
+ return /* @__PURE__ */ N("form", {
1636
1647
  onSubmit: (e) => {
1637
1648
  e.preventDefault(), e.stopPropagation();
1638
1649
  },
1639
- children: /* @__PURE__ */ N("div", {
1650
+ children: /* @__PURE__ */ P("div", {
1640
1651
  className: "flex items-end gap-2",
1641
- children: [/* @__PURE__ */ M(i, {
1652
+ children: [/* @__PURE__ */ N(i, {
1642
1653
  name: "label",
1643
- children: (t) => /* @__PURE__ */ N(T, {
1654
+ children: (t) => /* @__PURE__ */ P(T, {
1644
1655
  className: "flex-1",
1645
- children: [/* @__PURE__ */ M(l, {
1656
+ children: [/* @__PURE__ */ N(l, {
1646
1657
  htmlFor: t.name,
1647
1658
  children: "Label"
1648
- }), /* @__PURE__ */ M(m, {
1659
+ }), /* @__PURE__ */ N(m, {
1649
1660
  id: t.name,
1650
1661
  name: t.name,
1651
1662
  value: t.state.value?.[e] || "",
@@ -1658,7 +1669,7 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1658
1669
  }
1659
1670
  })]
1660
1671
  })
1661
- }), /* @__PURE__ */ M(Q, {
1672
+ }), /* @__PURE__ */ N(Q, {
1662
1673
  value: e,
1663
1674
  onValueChange: t
1664
1675
  })]
@@ -1669,7 +1680,7 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1669
1680
  "PUT",
1670
1681
  "PATCH"
1671
1682
  ], In = ({ value: e, onChange: t }) => {
1672
- let { selectedNode: n } = $(), r = G(), i = At(n?.id), { handleSubmit: a, Field: o, Subscribe: s } = P({
1683
+ let { selectedNode: n } = $(), r = G(), i = At(n?.id), { handleSubmit: a, Field: o, Subscribe: s } = F({
1673
1684
  defaultValues: {
1674
1685
  body: e?.body || "",
1675
1686
  fetchOnMount: e?.fetchOnMount ?? !e?.searchParam,
@@ -1695,19 +1706,19 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1695
1706
  t(e);
1696
1707
  }
1697
1708
  });
1698
- return /* @__PURE__ */ M("div", { children: /* @__PURE__ */ N("div", {
1709
+ return /* @__PURE__ */ N("div", { children: /* @__PURE__ */ P("div", {
1699
1710
  className: "grid gap-6",
1700
1711
  children: [
1701
- /* @__PURE__ */ M(o, {
1712
+ /* @__PURE__ */ N(o, {
1702
1713
  name: "url",
1703
- children: (e) => /* @__PURE__ */ N(T, { children: [
1704
- /* @__PURE__ */ M(l, {
1714
+ children: (e) => /* @__PURE__ */ P(T, { children: [
1715
+ /* @__PURE__ */ N(l, {
1705
1716
  htmlFor: e.name,
1706
1717
  children: r("editor.httpConfigForm.apiUrl")
1707
1718
  }),
1708
- /* @__PURE__ */ N("div", {
1719
+ /* @__PURE__ */ P("div", {
1709
1720
  className: "flex gap-2",
1710
- children: [/* @__PURE__ */ M(m, {
1721
+ children: [/* @__PURE__ */ N(m, {
1711
1722
  id: e.name,
1712
1723
  name: e.name,
1713
1724
  value: e.state.value,
@@ -1715,30 +1726,30 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1715
1726
  onChange: ({ target: t }) => e.handleChange(t.value),
1716
1727
  placeholder: r("editor.httpConfigForm.apiUrlPlaceholder"),
1717
1728
  className: "flex-1"
1718
- }), /* @__PURE__ */ N(J, { children: [/* @__PURE__ */ M(Y, {
1729
+ }), /* @__PURE__ */ P(J, { children: [/* @__PURE__ */ N(Y, {
1719
1730
  asChild: !0,
1720
- children: /* @__PURE__ */ M(p, {
1731
+ children: /* @__PURE__ */ N(p, {
1721
1732
  type: "button",
1722
1733
  variant: "outline",
1723
1734
  size: "icon",
1724
- children: /* @__PURE__ */ M(dt, { className: "h-4 w-4" })
1735
+ children: /* @__PURE__ */ N(ut, { className: "h-4 w-4" })
1725
1736
  })
1726
- }), /* @__PURE__ */ M(X, {
1737
+ }), /* @__PURE__ */ N(X, {
1727
1738
  align: "end",
1728
- children: i.length === 0 ? /* @__PURE__ */ M(Z, {
1739
+ children: i.length === 0 ? /* @__PURE__ */ N(Z, {
1729
1740
  disabled: !0,
1730
1741
  children: r("editor.httpConfigForm.noFieldsAvailable")
1731
- }) : i.map((t) => /* @__PURE__ */ M(Z, {
1742
+ }) : i.map((t) => /* @__PURE__ */ N(Z, {
1732
1743
  onClick: () => {
1733
1744
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
1734
1745
  e.handleChange(r + n);
1735
1746
  },
1736
- children: /* @__PURE__ */ N("div", {
1747
+ children: /* @__PURE__ */ P("div", {
1737
1748
  className: "flex flex-col",
1738
- children: [/* @__PURE__ */ M("span", {
1749
+ children: [/* @__PURE__ */ N("span", {
1739
1750
  className: "font-medium",
1740
1751
  children: t.label
1741
- }), /* @__PURE__ */ M("span", {
1752
+ }), /* @__PURE__ */ N("span", {
1742
1753
  className: "text-muted-foreground text-xs",
1743
1754
  children: `{{${t.nodeId}}}`
1744
1755
  })]
@@ -1746,87 +1757,87 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1746
1757
  }, t.nodeId))
1747
1758
  })] })]
1748
1759
  }),
1749
- /* @__PURE__ */ M(E, { children: r("editor.httpConfigForm.apiUrlDesc") })
1760
+ /* @__PURE__ */ N(E, { children: r("editor.httpConfigForm.apiUrlDesc") })
1750
1761
  ] })
1751
1762
  }),
1752
- /* @__PURE__ */ M(o, {
1763
+ /* @__PURE__ */ N(o, {
1753
1764
  name: "method",
1754
- children: (e) => /* @__PURE__ */ N(T, { children: [/* @__PURE__ */ M(l, {
1765
+ children: (e) => /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
1755
1766
  htmlFor: e.name,
1756
1767
  children: r("editor.httpConfigForm.httpMethod")
1757
- }), /* @__PURE__ */ N(v, {
1768
+ }), /* @__PURE__ */ P(v, {
1758
1769
  value: e.state.value,
1759
1770
  onValueChange: (t) => e.handleChange(t),
1760
- children: [/* @__PURE__ */ M(g, {
1771
+ children: [/* @__PURE__ */ N(g, {
1761
1772
  id: e.name,
1762
- children: /* @__PURE__ */ M(c, { placeholder: r("editor.httpConfigForm.selectMethod") })
1763
- }), /* @__PURE__ */ N(k, { children: [
1764
- /* @__PURE__ */ M(b, {
1773
+ children: /* @__PURE__ */ N(c, { placeholder: r("editor.httpConfigForm.selectMethod") })
1774
+ }), /* @__PURE__ */ P(k, { children: [
1775
+ /* @__PURE__ */ N(b, {
1765
1776
  value: "GET",
1766
1777
  children: r("editor.httpConfigForm.methodGet")
1767
1778
  }),
1768
- /* @__PURE__ */ M(b, {
1779
+ /* @__PURE__ */ N(b, {
1769
1780
  value: "POST",
1770
1781
  children: r("editor.httpConfigForm.methodPost")
1771
1782
  }),
1772
- /* @__PURE__ */ M(b, {
1783
+ /* @__PURE__ */ N(b, {
1773
1784
  value: "PUT",
1774
1785
  children: r("editor.httpConfigForm.methodPut")
1775
1786
  }),
1776
- /* @__PURE__ */ M(b, {
1787
+ /* @__PURE__ */ N(b, {
1777
1788
  value: "DELETE",
1778
1789
  children: r("editor.httpConfigForm.methodDelete")
1779
1790
  }),
1780
- /* @__PURE__ */ M(b, {
1791
+ /* @__PURE__ */ N(b, {
1781
1792
  value: "PATCH",
1782
1793
  children: r("editor.httpConfigForm.methodPatch")
1783
1794
  })
1784
1795
  ] })]
1785
1796
  })] })
1786
1797
  }),
1787
- /* @__PURE__ */ N("div", {
1798
+ /* @__PURE__ */ P("div", {
1788
1799
  className: "space-y-4",
1789
- children: [/* @__PURE__ */ M("h4", {
1800
+ children: [/* @__PURE__ */ N("h4", {
1790
1801
  className: "font-semibold text-sm",
1791
1802
  children: r("editor.httpConfigForm.headers")
1792
- }), /* @__PURE__ */ M(o, {
1803
+ }), /* @__PURE__ */ N(o, {
1793
1804
  name: "headers",
1794
1805
  mode: "array",
1795
- children: (e) => /* @__PURE__ */ N("div", {
1806
+ children: (e) => /* @__PURE__ */ P("div", {
1796
1807
  className: "space-y-2",
1797
1808
  children: [e.state.value?.map((t, n) => {
1798
1809
  let i = `headers[${n}]`;
1799
- return /* @__PURE__ */ N("div", {
1810
+ return /* @__PURE__ */ P("div", {
1800
1811
  className: "flex items-start gap-2",
1801
1812
  children: [
1802
- /* @__PURE__ */ M(o, {
1813
+ /* @__PURE__ */ N(o, {
1803
1814
  name: `headers[${n}].key`,
1804
- children: (e) => /* @__PURE__ */ M(m, {
1815
+ children: (e) => /* @__PURE__ */ N(m, {
1805
1816
  placeholder: r("editor.httpConfigForm.headerName"),
1806
1817
  value: e.state.value || "",
1807
1818
  onChange: ({ target: t }) => e.handleChange(t.value)
1808
1819
  })
1809
1820
  }),
1810
- /* @__PURE__ */ M(o, {
1821
+ /* @__PURE__ */ N(o, {
1811
1822
  name: `headers[${n}].value`,
1812
- children: (e) => /* @__PURE__ */ M(m, {
1823
+ children: (e) => /* @__PURE__ */ N(m, {
1813
1824
  placeholder: r("editor.httpConfigForm.headerValue"),
1814
1825
  value: e.state.value || "",
1815
1826
  onChange: ({ target: t }) => e.handleChange(t.value)
1816
1827
  })
1817
1828
  }),
1818
- /* @__PURE__ */ M(p, {
1829
+ /* @__PURE__ */ N(p, {
1819
1830
  type: "button",
1820
1831
  variant: "ghost",
1821
1832
  size: "icon",
1822
1833
  onClick: () => {
1823
1834
  e.removeValue(n);
1824
1835
  },
1825
- children: /* @__PURE__ */ M(I, { className: "h-4 w-4" })
1836
+ children: /* @__PURE__ */ N(L, { className: "h-4 w-4" })
1826
1837
  })
1827
1838
  ]
1828
1839
  }, i);
1829
- }), /* @__PURE__ */ N(p, {
1840
+ }), /* @__PURE__ */ P(p, {
1830
1841
  type: "button",
1831
1842
  variant: "outline",
1832
1843
  size: "sm",
@@ -1836,64 +1847,64 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1836
1847
  value: ""
1837
1848
  });
1838
1849
  },
1839
- children: [/* @__PURE__ */ M(F, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.addHeader")]
1850
+ children: [/* @__PURE__ */ N(I, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.addHeader")]
1840
1851
  })]
1841
1852
  })
1842
1853
  })]
1843
1854
  }),
1844
- /* @__PURE__ */ M(s, {
1855
+ /* @__PURE__ */ N(s, {
1845
1856
  selector: (e) => ({
1846
1857
  method: e.values.method,
1847
1858
  sendAllFormValues: e.values.sendAllFormValues
1848
1859
  }),
1849
- children: ({ method: e, sendAllFormValues: t }) => Fn.includes(e || "") && /* @__PURE__ */ N("div", {
1860
+ children: ({ method: e, sendAllFormValues: t }) => Fn.includes(e || "") && /* @__PURE__ */ P("div", {
1850
1861
  className: "space-y-4",
1851
- children: [/* @__PURE__ */ M(o, {
1862
+ children: [/* @__PURE__ */ N(o, {
1852
1863
  name: "sendAllFormValues",
1853
- children: (e) => /* @__PURE__ */ N("div", {
1864
+ children: (e) => /* @__PURE__ */ P("div", {
1854
1865
  className: "flex items-center space-x-2",
1855
- children: [/* @__PURE__ */ M(x, {
1866
+ children: [/* @__PURE__ */ N(x, {
1856
1867
  id: e.name,
1857
1868
  checked: e.state.value,
1858
1869
  onCheckedChange: (t) => e.handleChange(t)
1859
- }), /* @__PURE__ */ M(l, {
1870
+ }), /* @__PURE__ */ N(l, {
1860
1871
  htmlFor: e.name,
1861
1872
  children: r("editor.httpConfigForm.sendAllFormValues")
1862
1873
  })]
1863
1874
  })
1864
- }), /* @__PURE__ */ M(o, {
1875
+ }), /* @__PURE__ */ N(o, {
1865
1876
  name: "body",
1866
- children: (e) => /* @__PURE__ */ N(T, { children: [
1867
- /* @__PURE__ */ N("div", {
1877
+ children: (e) => /* @__PURE__ */ P(T, { children: [
1878
+ /* @__PURE__ */ P("div", {
1868
1879
  className: "mb-2 flex items-center justify-between",
1869
- children: [/* @__PURE__ */ M(l, {
1880
+ children: [/* @__PURE__ */ N(l, {
1870
1881
  htmlFor: e.name,
1871
1882
  children: r("editor.httpConfigForm.requestBody")
1872
- }), /* @__PURE__ */ N(J, { children: [/* @__PURE__ */ M(Y, {
1883
+ }), /* @__PURE__ */ P(J, { children: [/* @__PURE__ */ N(Y, {
1873
1884
  asChild: !0,
1874
- children: /* @__PURE__ */ N(p, {
1885
+ children: /* @__PURE__ */ P(p, {
1875
1886
  type: "button",
1876
1887
  variant: "ghost",
1877
1888
  size: "sm",
1878
1889
  disabled: t,
1879
- children: [/* @__PURE__ */ M(dt, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.insertVariable")]
1890
+ children: [/* @__PURE__ */ N(ut, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.insertVariable")]
1880
1891
  })
1881
- }), /* @__PURE__ */ M(X, {
1892
+ }), /* @__PURE__ */ N(X, {
1882
1893
  align: "end",
1883
- children: i.length === 0 ? /* @__PURE__ */ M(Z, {
1894
+ children: i.length === 0 ? /* @__PURE__ */ N(Z, {
1884
1895
  disabled: !0,
1885
1896
  children: r("editor.httpConfigForm.noFieldsAvailable")
1886
- }) : i.map((t) => /* @__PURE__ */ M(Z, {
1897
+ }) : i.map((t) => /* @__PURE__ */ N(Z, {
1887
1898
  onClick: () => {
1888
1899
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
1889
1900
  e.handleChange(r + n), a().then();
1890
1901
  },
1891
- children: /* @__PURE__ */ N("div", {
1902
+ children: /* @__PURE__ */ P("div", {
1892
1903
  className: "flex flex-col",
1893
- children: [/* @__PURE__ */ M("span", {
1904
+ children: [/* @__PURE__ */ N("span", {
1894
1905
  className: "font-medium",
1895
1906
  children: t.label
1896
- }), /* @__PURE__ */ M("span", {
1907
+ }), /* @__PURE__ */ N("span", {
1897
1908
  className: "text-muted-foreground text-xs",
1898
1909
  children: `{{${t.nodeId}}}`
1899
1910
  })]
@@ -1901,7 +1912,7 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1901
1912
  }, t.nodeId))
1902
1913
  })] })]
1903
1914
  }),
1904
- /* @__PURE__ */ M(ne, {
1915
+ /* @__PURE__ */ N(ne, {
1905
1916
  id: e.name,
1906
1917
  name: e.name,
1907
1918
  value: e.state.value,
@@ -1911,26 +1922,26 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1911
1922
  rows: 4,
1912
1923
  disabled: t
1913
1924
  }),
1914
- /* @__PURE__ */ M(E, { children: r(t ? "editor.httpConfigForm.sendAllFormValuesDesc" : "editor.httpConfigForm.requestBodyDesc") })
1925
+ /* @__PURE__ */ N(E, { children: r(t ? "editor.httpConfigForm.sendAllFormValuesDesc" : "editor.httpConfigForm.requestBodyDesc") })
1915
1926
  ] })
1916
1927
  })]
1917
1928
  })
1918
1929
  }),
1919
- /* @__PURE__ */ N("div", {
1930
+ /* @__PURE__ */ P("div", {
1920
1931
  className: "space-y-4",
1921
1932
  children: [
1922
- /* @__PURE__ */ M("h4", {
1933
+ /* @__PURE__ */ N("h4", {
1923
1934
  className: "font-semibold text-sm",
1924
1935
  children: r("editor.httpConfigForm.responseConfiguration")
1925
1936
  }),
1926
- /* @__PURE__ */ M(o, {
1937
+ /* @__PURE__ */ N(o, {
1927
1938
  name: "responsePath",
1928
- children: (e) => /* @__PURE__ */ N(T, { children: [
1929
- /* @__PURE__ */ M(l, {
1939
+ children: (e) => /* @__PURE__ */ P(T, { children: [
1940
+ /* @__PURE__ */ N(l, {
1930
1941
  htmlFor: e.name,
1931
1942
  children: r("editor.httpConfigForm.responsePath")
1932
1943
  }),
1933
- /* @__PURE__ */ M(m, {
1944
+ /* @__PURE__ */ N(m, {
1934
1945
  id: e.name,
1935
1946
  name: e.name,
1936
1947
  value: e.state.value,
@@ -1938,24 +1949,24 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1938
1949
  onChange: ({ target: t }) => e.handleChange(t.value),
1939
1950
  placeholder: r("editor.httpConfigForm.responsePathPlaceholder")
1940
1951
  }),
1941
- /* @__PURE__ */ M(E, { children: r("editor.httpConfigForm.responsePathDesc") })
1952
+ /* @__PURE__ */ N(E, { children: r("editor.httpConfigForm.responsePathDesc") })
1942
1953
  ] })
1943
1954
  }),
1944
- /* @__PURE__ */ N("div", {
1955
+ /* @__PURE__ */ P("div", {
1945
1956
  className: "space-y-4",
1946
1957
  children: [
1947
- /* @__PURE__ */ M("h5", {
1958
+ /* @__PURE__ */ N("h5", {
1948
1959
  className: "font-medium text-sm",
1949
1960
  children: r("editor.httpConfigForm.mapToOptions")
1950
1961
  }),
1951
- /* @__PURE__ */ M(o, {
1962
+ /* @__PURE__ */ N(o, {
1952
1963
  name: "responseMapping.valueField",
1953
- children: (e) => /* @__PURE__ */ N(T, { children: [
1954
- /* @__PURE__ */ M(l, {
1964
+ children: (e) => /* @__PURE__ */ P(T, { children: [
1965
+ /* @__PURE__ */ N(l, {
1955
1966
  htmlFor: e.name,
1956
1967
  children: r("editor.httpConfigForm.valueField")
1957
1968
  }),
1958
- /* @__PURE__ */ M(m, {
1969
+ /* @__PURE__ */ N(m, {
1959
1970
  id: e.name,
1960
1971
  name: e.name,
1961
1972
  value: e.state.value,
@@ -1963,17 +1974,17 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1963
1974
  onChange: ({ target: t }) => e.handleChange(t.value),
1964
1975
  placeholder: r("editor.httpConfigForm.valueFieldPlaceholder")
1965
1976
  }),
1966
- /* @__PURE__ */ M(E, { children: r("editor.httpConfigForm.valueFieldDesc") })
1977
+ /* @__PURE__ */ N(E, { children: r("editor.httpConfigForm.valueFieldDesc") })
1967
1978
  ] })
1968
1979
  }),
1969
- /* @__PURE__ */ M(o, {
1980
+ /* @__PURE__ */ N(o, {
1970
1981
  name: "responseMapping.labelField",
1971
- children: (e) => /* @__PURE__ */ N(T, { children: [
1972
- /* @__PURE__ */ M(l, {
1982
+ children: (e) => /* @__PURE__ */ P(T, { children: [
1983
+ /* @__PURE__ */ N(l, {
1973
1984
  htmlFor: e.name,
1974
1985
  children: r("editor.httpConfigForm.labelField")
1975
1986
  }),
1976
- /* @__PURE__ */ M(m, {
1987
+ /* @__PURE__ */ N(m, {
1977
1988
  id: e.name,
1978
1989
  name: e.name,
1979
1990
  value: e.state.value,
@@ -1981,19 +1992,19 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
1981
1992
  onChange: ({ target: t }) => e.handleChange(t.value),
1982
1993
  placeholder: r("editor.httpConfigForm.labelFieldPlaceholder")
1983
1994
  }),
1984
- /* @__PURE__ */ M(E, { children: r("editor.httpConfigForm.labelFieldDesc") })
1995
+ /* @__PURE__ */ N(E, { children: r("editor.httpConfigForm.labelFieldDesc") })
1985
1996
  ] })
1986
1997
  })
1987
1998
  ]
1988
1999
  }),
1989
- /* @__PURE__ */ M(o, {
2000
+ /* @__PURE__ */ N(o, {
1990
2001
  name: "searchParam",
1991
- children: (e) => /* @__PURE__ */ N(T, { children: [
1992
- /* @__PURE__ */ M(l, {
2002
+ children: (e) => /* @__PURE__ */ P(T, { children: [
2003
+ /* @__PURE__ */ N(l, {
1993
2004
  htmlFor: e.name,
1994
2005
  children: r("editor.httpConfigForm.searchParameter")
1995
2006
  }),
1996
- /* @__PURE__ */ M(m, {
2007
+ /* @__PURE__ */ N(m, {
1997
2008
  id: e.name,
1998
2009
  name: e.name,
1999
2010
  value: e.state.value,
@@ -2001,32 +2012,32 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2001
2012
  onChange: ({ target: t }) => e.handleChange(t.value),
2002
2013
  placeholder: r("editor.httpConfigForm.searchParameterPlaceholder")
2003
2014
  }),
2004
- /* @__PURE__ */ M(E, { children: r("editor.httpConfigForm.searchParameterDesc") })
2015
+ /* @__PURE__ */ N(E, { children: r("editor.httpConfigForm.searchParameterDesc") })
2005
2016
  ] })
2006
2017
  })
2007
2018
  ]
2008
2019
  }),
2009
- /* @__PURE__ */ N("div", {
2020
+ /* @__PURE__ */ P("div", {
2010
2021
  className: "space-y-4",
2011
2022
  children: [
2012
- /* @__PURE__ */ M("h4", {
2023
+ /* @__PURE__ */ N("h4", {
2013
2024
  className: "font-semibold text-sm",
2014
2025
  children: r("editor.httpConfigForm.behavior")
2015
2026
  }),
2016
- /* @__PURE__ */ M(s, {
2027
+ /* @__PURE__ */ N(s, {
2017
2028
  selector: (e) => e.values.searchParam,
2018
- children: (e) => /* @__PURE__ */ M(o, {
2029
+ children: (e) => /* @__PURE__ */ N(o, {
2019
2030
  name: "fetchOnMount",
2020
2031
  children: (t) => {
2021
2032
  let n = !!e?.trim(), i = n ? t.state.value : !0;
2022
- return !n && t.state.value !== !0 && t.handleChange(!0), /* @__PURE__ */ N("div", {
2033
+ return !n && t.state.value !== !0 && t.handleChange(!0), /* @__PURE__ */ P("div", {
2023
2034
  className: "flex items-center space-x-2",
2024
- children: [/* @__PURE__ */ M(x, {
2035
+ children: [/* @__PURE__ */ N(x, {
2025
2036
  id: t.name,
2026
2037
  checked: i,
2027
2038
  disabled: !n,
2028
2039
  onCheckedChange: (e) => t.handleChange(e)
2029
- }), /* @__PURE__ */ M(l, {
2040
+ }), /* @__PURE__ */ N(l, {
2030
2041
  htmlFor: t.name,
2031
2042
  className: n ? "" : "text-muted-foreground",
2032
2043
  children: r("editor.httpConfigForm.fetchOnMount")
@@ -2035,15 +2046,15 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2035
2046
  }
2036
2047
  })
2037
2048
  }),
2038
- /* @__PURE__ */ M(o, {
2049
+ /* @__PURE__ */ N(o, {
2039
2050
  name: "showLoading",
2040
- children: (e) => /* @__PURE__ */ N("div", {
2051
+ children: (e) => /* @__PURE__ */ P("div", {
2041
2052
  className: "flex items-center space-x-2",
2042
- children: [/* @__PURE__ */ M(x, {
2053
+ children: [/* @__PURE__ */ N(x, {
2043
2054
  id: e.name,
2044
2055
  checked: e.state.value,
2045
2056
  onCheckedChange: (t) => e.handleChange(t)
2046
- }), /* @__PURE__ */ M(l, {
2057
+ }), /* @__PURE__ */ N(l, {
2047
2058
  htmlFor: e.name,
2048
2059
  children: r("editor.httpConfigForm.showLoadingState")
2049
2060
  })]
@@ -2058,7 +2069,7 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2058
2069
  "PUT",
2059
2070
  "PATCH"
2060
2071
  ], Rn = ({ value: e, onChange: t }) => {
2061
- let [n, r] = z("en"), { selectedNode: i } = $(), a = G(), o = At(i?.id), { handleSubmit: s, Field: u, Subscribe: d } = P({
2072
+ let [n, r] = z("en"), { selectedNode: i } = $(), a = G(), o = At(i?.id), { handleSubmit: s, Field: u, Subscribe: d } = F({
2062
2073
  defaultValues: {
2063
2074
  body: e?.body || "",
2064
2075
  errorMessage: e?.errorMessage || { en: "" },
@@ -2080,19 +2091,19 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2080
2091
  t(e);
2081
2092
  }
2082
2093
  });
2083
- return /* @__PURE__ */ M("div", { children: /* @__PURE__ */ N("div", {
2094
+ return /* @__PURE__ */ N("div", { children: /* @__PURE__ */ P("div", {
2084
2095
  className: "grid gap-6",
2085
2096
  children: [
2086
- /* @__PURE__ */ M(u, {
2097
+ /* @__PURE__ */ N(u, {
2087
2098
  name: "url",
2088
- children: (e) => /* @__PURE__ */ N(T, { children: [
2089
- /* @__PURE__ */ M(l, {
2099
+ children: (e) => /* @__PURE__ */ P(T, { children: [
2100
+ /* @__PURE__ */ N(l, {
2090
2101
  htmlFor: e.name,
2091
2102
  children: a("editor.submitConfigForm.apiUrl")
2092
2103
  }),
2093
- /* @__PURE__ */ N("div", {
2104
+ /* @__PURE__ */ P("div", {
2094
2105
  className: "flex gap-2",
2095
- children: [/* @__PURE__ */ M(m, {
2106
+ children: [/* @__PURE__ */ N(m, {
2096
2107
  id: e.name,
2097
2108
  name: e.name,
2098
2109
  value: e.state.value,
@@ -2100,30 +2111,30 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2100
2111
  onChange: ({ target: t }) => e.handleChange(t.value),
2101
2112
  placeholder: a("editor.submitConfigForm.apiUrlPlaceholder"),
2102
2113
  className: "flex-1"
2103
- }), /* @__PURE__ */ N(J, { children: [/* @__PURE__ */ M(Y, {
2114
+ }), /* @__PURE__ */ P(J, { children: [/* @__PURE__ */ N(Y, {
2104
2115
  asChild: !0,
2105
- children: /* @__PURE__ */ M(p, {
2116
+ children: /* @__PURE__ */ N(p, {
2106
2117
  type: "button",
2107
2118
  variant: "outline",
2108
2119
  size: "icon",
2109
- children: /* @__PURE__ */ M(dt, { className: "h-4 w-4" })
2120
+ children: /* @__PURE__ */ N(ut, { className: "h-4 w-4" })
2110
2121
  })
2111
- }), /* @__PURE__ */ M(X, {
2122
+ }), /* @__PURE__ */ N(X, {
2112
2123
  align: "end",
2113
- children: o.length === 0 ? /* @__PURE__ */ M(Z, {
2124
+ children: o.length === 0 ? /* @__PURE__ */ N(Z, {
2114
2125
  disabled: !0,
2115
2126
  children: a("editor.submitConfigForm.noFieldsAvailable")
2116
- }) : o.map((t) => /* @__PURE__ */ M(Z, {
2127
+ }) : o.map((t) => /* @__PURE__ */ N(Z, {
2117
2128
  onClick: () => {
2118
2129
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
2119
2130
  e.handleChange(r + n);
2120
2131
  },
2121
- children: /* @__PURE__ */ N("div", {
2132
+ children: /* @__PURE__ */ P("div", {
2122
2133
  className: "flex flex-col",
2123
- children: [/* @__PURE__ */ M("span", {
2134
+ children: [/* @__PURE__ */ N("span", {
2124
2135
  className: "font-medium",
2125
2136
  children: t.label
2126
- }), /* @__PURE__ */ M("span", {
2137
+ }), /* @__PURE__ */ N("span", {
2127
2138
  className: "text-muted-foreground text-xs",
2128
2139
  children: `{{${t.nodeId}}}`
2129
2140
  })]
@@ -2131,83 +2142,83 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2131
2142
  }, t.nodeId))
2132
2143
  })] })]
2133
2144
  }),
2134
- /* @__PURE__ */ M(E, { children: a("editor.submitConfigForm.apiUrlDesc") })
2145
+ /* @__PURE__ */ N(E, { children: a("editor.submitConfigForm.apiUrlDesc") })
2135
2146
  ] })
2136
2147
  }),
2137
- /* @__PURE__ */ M(u, {
2148
+ /* @__PURE__ */ N(u, {
2138
2149
  name: "method",
2139
- children: (e) => /* @__PURE__ */ N(T, { children: [/* @__PURE__ */ M(l, {
2150
+ children: (e) => /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
2140
2151
  htmlFor: e.name,
2141
2152
  children: a("editor.submitConfigForm.httpMethod")
2142
- }), /* @__PURE__ */ N(v, {
2153
+ }), /* @__PURE__ */ P(v, {
2143
2154
  value: e.state.value,
2144
2155
  onValueChange: (t) => e.handleChange(t),
2145
- children: [/* @__PURE__ */ M(g, {
2156
+ children: [/* @__PURE__ */ N(g, {
2146
2157
  id: e.name,
2147
- children: /* @__PURE__ */ M(c, { placeholder: a("editor.submitConfigForm.selectMethod") })
2148
- }), /* @__PURE__ */ N(k, { children: [
2149
- /* @__PURE__ */ M(b, {
2158
+ children: /* @__PURE__ */ N(c, { placeholder: a("editor.submitConfigForm.selectMethod") })
2159
+ }), /* @__PURE__ */ P(k, { children: [
2160
+ /* @__PURE__ */ N(b, {
2150
2161
  value: "POST",
2151
2162
  children: a("editor.submitConfigForm.methodPost")
2152
2163
  }),
2153
- /* @__PURE__ */ M(b, {
2164
+ /* @__PURE__ */ N(b, {
2154
2165
  value: "PUT",
2155
2166
  children: a("editor.submitConfigForm.methodPut")
2156
2167
  }),
2157
- /* @__PURE__ */ M(b, {
2168
+ /* @__PURE__ */ N(b, {
2158
2169
  value: "DELETE",
2159
2170
  children: a("editor.submitConfigForm.methodDelete")
2160
2171
  }),
2161
- /* @__PURE__ */ M(b, {
2172
+ /* @__PURE__ */ N(b, {
2162
2173
  value: "PATCH",
2163
2174
  children: a("editor.submitConfigForm.methodPatch")
2164
2175
  })
2165
2176
  ] })]
2166
2177
  })] })
2167
2178
  }),
2168
- /* @__PURE__ */ N("div", {
2179
+ /* @__PURE__ */ P("div", {
2169
2180
  className: "space-y-4",
2170
- children: [/* @__PURE__ */ M("h4", {
2181
+ children: [/* @__PURE__ */ N("h4", {
2171
2182
  className: "font-semibold text-sm",
2172
2183
  children: a("editor.submitConfigForm.headers")
2173
- }), /* @__PURE__ */ M(u, {
2184
+ }), /* @__PURE__ */ N(u, {
2174
2185
  name: "headers",
2175
2186
  mode: "array",
2176
- children: (e) => /* @__PURE__ */ N("div", {
2187
+ children: (e) => /* @__PURE__ */ P("div", {
2177
2188
  className: "space-y-2",
2178
2189
  children: [e.state.value?.map((t, n) => {
2179
2190
  let r = `headers[${n}]`;
2180
- return /* @__PURE__ */ N("div", {
2191
+ return /* @__PURE__ */ P("div", {
2181
2192
  className: "flex items-start gap-2",
2182
2193
  children: [
2183
- /* @__PURE__ */ M(u, {
2194
+ /* @__PURE__ */ N(u, {
2184
2195
  name: `headers[${n}].key`,
2185
- children: (e) => /* @__PURE__ */ M(m, {
2196
+ children: (e) => /* @__PURE__ */ N(m, {
2186
2197
  placeholder: a("editor.submitConfigForm.headerName"),
2187
2198
  value: e.state.value || "",
2188
2199
  onChange: ({ target: t }) => e.handleChange(t.value)
2189
2200
  })
2190
2201
  }),
2191
- /* @__PURE__ */ M(u, {
2202
+ /* @__PURE__ */ N(u, {
2192
2203
  name: `headers[${n}].value`,
2193
- children: (e) => /* @__PURE__ */ M(m, {
2204
+ children: (e) => /* @__PURE__ */ N(m, {
2194
2205
  placeholder: a("editor.submitConfigForm.headerValue"),
2195
2206
  value: e.state.value || "",
2196
2207
  onChange: ({ target: t }) => e.handleChange(t.value)
2197
2208
  })
2198
2209
  }),
2199
- /* @__PURE__ */ M(p, {
2210
+ /* @__PURE__ */ N(p, {
2200
2211
  type: "button",
2201
2212
  variant: "ghost",
2202
2213
  size: "icon",
2203
2214
  onClick: () => {
2204
2215
  e.removeValue(n);
2205
2216
  },
2206
- children: /* @__PURE__ */ M(I, { className: "h-4 w-4" })
2217
+ children: /* @__PURE__ */ N(L, { className: "h-4 w-4" })
2207
2218
  })
2208
2219
  ]
2209
2220
  }, r);
2210
- }), /* @__PURE__ */ N(p, {
2221
+ }), /* @__PURE__ */ P(p, {
2211
2222
  type: "button",
2212
2223
  variant: "outline",
2213
2224
  size: "sm",
@@ -2217,64 +2228,64 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2217
2228
  value: ""
2218
2229
  });
2219
2230
  },
2220
- children: [/* @__PURE__ */ M(F, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.addHeader")]
2231
+ children: [/* @__PURE__ */ N(I, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.addHeader")]
2221
2232
  })]
2222
2233
  })
2223
2234
  })]
2224
2235
  }),
2225
- /* @__PURE__ */ M(d, {
2236
+ /* @__PURE__ */ N(d, {
2226
2237
  selector: (e) => ({
2227
2238
  method: e.values.method,
2228
2239
  sendAllFormValues: e.values.sendAllFormValues
2229
2240
  }),
2230
- children: ({ method: e, sendAllFormValues: t }) => Ln.includes(e || "") && /* @__PURE__ */ N("div", {
2241
+ children: ({ method: e, sendAllFormValues: t }) => Ln.includes(e || "") && /* @__PURE__ */ P("div", {
2231
2242
  className: "space-y-4",
2232
- children: [/* @__PURE__ */ M(u, {
2243
+ children: [/* @__PURE__ */ N(u, {
2233
2244
  name: "sendAllFormValues",
2234
- children: (e) => /* @__PURE__ */ N("div", {
2245
+ children: (e) => /* @__PURE__ */ P("div", {
2235
2246
  className: "flex items-center space-x-2",
2236
- children: [/* @__PURE__ */ M(x, {
2247
+ children: [/* @__PURE__ */ N(x, {
2237
2248
  id: e.name,
2238
2249
  checked: e.state.value,
2239
2250
  onCheckedChange: (t) => e.handleChange(t)
2240
- }), /* @__PURE__ */ M(l, {
2251
+ }), /* @__PURE__ */ N(l, {
2241
2252
  htmlFor: e.name,
2242
2253
  children: a("editor.submitConfigForm.sendAllFormValues")
2243
2254
  })]
2244
2255
  })
2245
- }), /* @__PURE__ */ M(u, {
2256
+ }), /* @__PURE__ */ N(u, {
2246
2257
  name: "body",
2247
- children: (e) => /* @__PURE__ */ N(T, { children: [
2248
- /* @__PURE__ */ N("div", {
2258
+ children: (e) => /* @__PURE__ */ P(T, { children: [
2259
+ /* @__PURE__ */ P("div", {
2249
2260
  className: "mb-2 flex items-center justify-between",
2250
- children: [/* @__PURE__ */ M(l, {
2261
+ children: [/* @__PURE__ */ N(l, {
2251
2262
  htmlFor: e.name,
2252
2263
  children: a("editor.submitConfigForm.requestBody")
2253
- }), /* @__PURE__ */ N(J, { children: [/* @__PURE__ */ M(Y, {
2264
+ }), /* @__PURE__ */ P(J, { children: [/* @__PURE__ */ N(Y, {
2254
2265
  asChild: !0,
2255
- children: /* @__PURE__ */ N(p, {
2266
+ children: /* @__PURE__ */ P(p, {
2256
2267
  type: "button",
2257
2268
  variant: "ghost",
2258
2269
  size: "sm",
2259
2270
  disabled: t,
2260
- children: [/* @__PURE__ */ M(dt, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.insertVariable")]
2271
+ children: [/* @__PURE__ */ N(ut, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.insertVariable")]
2261
2272
  })
2262
- }), /* @__PURE__ */ M(X, {
2273
+ }), /* @__PURE__ */ N(X, {
2263
2274
  align: "end",
2264
- children: o.length === 0 ? /* @__PURE__ */ M(Z, {
2275
+ children: o.length === 0 ? /* @__PURE__ */ N(Z, {
2265
2276
  disabled: !0,
2266
2277
  children: a("editor.submitConfigForm.noFieldsAvailable")
2267
- }) : o.map((t) => /* @__PURE__ */ M(Z, {
2278
+ }) : o.map((t) => /* @__PURE__ */ N(Z, {
2268
2279
  onClick: () => {
2269
2280
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
2270
2281
  e.handleChange(r + n), s().then();
2271
2282
  },
2272
- children: /* @__PURE__ */ N("div", {
2283
+ children: /* @__PURE__ */ P("div", {
2273
2284
  className: "flex flex-col",
2274
- children: [/* @__PURE__ */ M("span", {
2285
+ children: [/* @__PURE__ */ N("span", {
2275
2286
  className: "font-medium",
2276
2287
  children: t.label
2277
- }), /* @__PURE__ */ M("span", {
2288
+ }), /* @__PURE__ */ N("span", {
2278
2289
  className: "text-muted-foreground text-xs",
2279
2290
  children: `{{${t.nodeId}}}`
2280
2291
  })]
@@ -2282,7 +2293,7 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2282
2293
  }, t.nodeId))
2283
2294
  })] })]
2284
2295
  }),
2285
- /* @__PURE__ */ M(ne, {
2296
+ /* @__PURE__ */ N(ne, {
2286
2297
  id: e.name,
2287
2298
  name: e.name,
2288
2299
  value: e.state.value,
@@ -2292,26 +2303,26 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2292
2303
  rows: 4,
2293
2304
  disabled: t
2294
2305
  }),
2295
- /* @__PURE__ */ M(E, { children: a(t ? "editor.submitConfigForm.sendAllFormValuesDesc" : "editor.submitConfigForm.requestBodyDesc") })
2306
+ /* @__PURE__ */ N(E, { children: a(t ? "editor.submitConfigForm.sendAllFormValuesDesc" : "editor.submitConfigForm.requestBodyDesc") })
2296
2307
  ] })
2297
2308
  })]
2298
2309
  })
2299
2310
  }),
2300
- /* @__PURE__ */ N("div", {
2311
+ /* @__PURE__ */ P("div", {
2301
2312
  className: "space-y-4",
2302
2313
  children: [
2303
- /* @__PURE__ */ M("h4", {
2314
+ /* @__PURE__ */ N("h4", {
2304
2315
  className: "font-semibold text-sm",
2305
2316
  children: a("editor.submitConfigForm.postSubmission")
2306
2317
  }),
2307
- /* @__PURE__ */ M(u, {
2318
+ /* @__PURE__ */ N(u, {
2308
2319
  name: "redirectUrl",
2309
- children: (e) => /* @__PURE__ */ N(T, { children: [
2310
- /* @__PURE__ */ M(l, {
2320
+ children: (e) => /* @__PURE__ */ P(T, { children: [
2321
+ /* @__PURE__ */ N(l, {
2311
2322
  htmlFor: e.name,
2312
2323
  children: a("editor.submitConfigForm.redirectUrl")
2313
2324
  }),
2314
- /* @__PURE__ */ M(m, {
2325
+ /* @__PURE__ */ N(m, {
2315
2326
  id: e.name,
2316
2327
  name: e.name,
2317
2328
  value: e.state.value,
@@ -2319,21 +2330,21 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2319
2330
  onChange: ({ target: t }) => e.handleChange(t.value),
2320
2331
  placeholder: a("editor.submitConfigForm.redirectUrlPlaceholder")
2321
2332
  }),
2322
- /* @__PURE__ */ M(E, { children: a("editor.submitConfigForm.redirectUrlDesc") })
2333
+ /* @__PURE__ */ N(E, { children: a("editor.submitConfigForm.redirectUrlDesc") })
2323
2334
  ] })
2324
2335
  }),
2325
- /* @__PURE__ */ N("div", {
2336
+ /* @__PURE__ */ P("div", {
2326
2337
  className: "flex items-center gap-2",
2327
- children: [/* @__PURE__ */ M(u, {
2338
+ children: [/* @__PURE__ */ N(u, {
2328
2339
  name: "successMessage",
2329
- children: (e) => /* @__PURE__ */ N(T, {
2340
+ children: (e) => /* @__PURE__ */ P(T, {
2330
2341
  className: "flex-1",
2331
2342
  children: [
2332
- /* @__PURE__ */ M(l, {
2343
+ /* @__PURE__ */ N(l, {
2333
2344
  htmlFor: e.name,
2334
2345
  children: a("editor.submitConfigForm.successMessage")
2335
2346
  }),
2336
- /* @__PURE__ */ M(m, {
2347
+ /* @__PURE__ */ N(m, {
2337
2348
  id: e.name,
2338
2349
  name: e.name,
2339
2350
  value: e.state.value?.[n] || "",
@@ -2346,26 +2357,26 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2346
2357
  },
2347
2358
  placeholder: a("editor.submitConfigForm.successMessagePlaceholder")
2348
2359
  }),
2349
- /* @__PURE__ */ M(E, { children: a("editor.submitConfigForm.successMessageDesc") })
2360
+ /* @__PURE__ */ N(E, { children: a("editor.submitConfigForm.successMessageDesc") })
2350
2361
  ]
2351
2362
  })
2352
- }), /* @__PURE__ */ M(Q, {
2363
+ }), /* @__PURE__ */ N(Q, {
2353
2364
  value: n,
2354
2365
  onValueChange: r
2355
2366
  })]
2356
2367
  }),
2357
- /* @__PURE__ */ N("div", {
2368
+ /* @__PURE__ */ P("div", {
2358
2369
  className: "flex items-center gap-2",
2359
- children: [/* @__PURE__ */ M(u, {
2370
+ children: [/* @__PURE__ */ N(u, {
2360
2371
  name: "errorMessage",
2361
- children: (e) => /* @__PURE__ */ N(T, {
2372
+ children: (e) => /* @__PURE__ */ P(T, {
2362
2373
  className: "flex-1",
2363
2374
  children: [
2364
- /* @__PURE__ */ M(l, {
2375
+ /* @__PURE__ */ N(l, {
2365
2376
  htmlFor: e.name,
2366
2377
  children: a("editor.submitConfigForm.errorMessage")
2367
2378
  }),
2368
- /* @__PURE__ */ M(m, {
2379
+ /* @__PURE__ */ N(m, {
2369
2380
  id: e.name,
2370
2381
  name: e.name,
2371
2382
  value: e.state.value?.[n] || "",
@@ -2378,30 +2389,30 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2378
2389
  },
2379
2390
  placeholder: a("editor.submitConfigForm.errorMessagePlaceholder")
2380
2391
  }),
2381
- /* @__PURE__ */ M(E, { children: a("editor.submitConfigForm.errorMessageDesc") })
2392
+ /* @__PURE__ */ N(E, { children: a("editor.submitConfigForm.errorMessageDesc") })
2382
2393
  ]
2383
2394
  })
2384
- }), /* @__PURE__ */ M(Q, {
2395
+ }), /* @__PURE__ */ N(Q, {
2385
2396
  value: n,
2386
2397
  onValueChange: r
2387
2398
  })]
2388
2399
  })
2389
2400
  ]
2390
2401
  }),
2391
- /* @__PURE__ */ N("div", {
2402
+ /* @__PURE__ */ P("div", {
2392
2403
  className: "space-y-4",
2393
- children: [/* @__PURE__ */ M("h4", {
2404
+ children: [/* @__PURE__ */ N("h4", {
2394
2405
  className: "font-semibold text-sm",
2395
2406
  children: a("editor.submitConfigForm.behavior")
2396
- }), /* @__PURE__ */ M(u, {
2407
+ }), /* @__PURE__ */ N(u, {
2397
2408
  name: "showLoading",
2398
- children: (e) => /* @__PURE__ */ N("div", {
2409
+ children: (e) => /* @__PURE__ */ P("div", {
2399
2410
  className: "flex items-center space-x-2",
2400
- children: [/* @__PURE__ */ M(x, {
2411
+ children: [/* @__PURE__ */ N(x, {
2401
2412
  id: e.name,
2402
2413
  checked: e.state.value,
2403
2414
  onCheckedChange: (t) => e.handleChange(t)
2404
- }), /* @__PURE__ */ M(l, {
2415
+ }), /* @__PURE__ */ N(l, {
2405
2416
  htmlFor: e.name,
2406
2417
  children: a("editor.submitConfigForm.showLoadingState")
2407
2418
  })]
@@ -2414,56 +2425,56 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2414
2425
  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) => {
2415
2426
  e === C ? f && r?.("") : r?.(e), g(!1), b("");
2416
2427
  };
2417
- return /* @__PURE__ */ N(le, {
2428
+ return /* @__PURE__ */ P(le, {
2418
2429
  open: h,
2419
2430
  onOpenChange: g,
2420
- children: [/* @__PURE__ */ M(u, {
2431
+ children: [/* @__PURE__ */ N(u, {
2421
2432
  asChild: !0,
2422
2433
  id: t,
2423
- children: /* @__PURE__ */ N(p, {
2434
+ children: /* @__PURE__ */ P(p, {
2424
2435
  type: "button",
2425
2436
  variant: "outline",
2426
2437
  role: "combobox",
2427
2438
  "aria-expanded": h,
2428
2439
  className: d("w-full justify-between font-normal", l),
2429
- children: [/* @__PURE__ */ M("span", {
2440
+ children: [/* @__PURE__ */ N("span", {
2430
2441
  className: "truncate",
2431
2442
  children: w && ee ? ee.label : i
2432
- }), /* @__PURE__ */ M(Le, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
2443
+ }), /* @__PURE__ */ N(Ie, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
2433
2444
  })
2434
- }), /* @__PURE__ */ M(_, {
2445
+ }), /* @__PURE__ */ N(_, {
2435
2446
  className: "w-full p-0",
2436
2447
  align: "start",
2437
- children: /* @__PURE__ */ N(ie, {
2448
+ children: /* @__PURE__ */ P(ie, {
2438
2449
  shouldFilter: !1,
2439
- children: [/* @__PURE__ */ M(y, {
2450
+ children: [/* @__PURE__ */ N(y, {
2440
2451
  placeholder: a,
2441
2452
  value: v,
2442
2453
  onValueChange: b
2443
- }), /* @__PURE__ */ N(O, { children: [
2444
- /* @__PURE__ */ M(oe, { children: c }),
2445
- f && w && /* @__PURE__ */ M(te, { children: /* @__PURE__ */ N(D, {
2454
+ }), /* @__PURE__ */ P(O, { children: [
2455
+ /* @__PURE__ */ N(oe, { children: c }),
2456
+ f && w && /* @__PURE__ */ N(te, { children: /* @__PURE__ */ P(D, {
2446
2457
  value: "__clear__",
2447
2458
  onSelect: () => {
2448
2459
  r?.(""), g(!1), b("");
2449
2460
  },
2450
2461
  className: "mt-1 text-muted-foreground",
2451
- children: [/* @__PURE__ */ M(I, { className: "mr-2 h-4 w-4" }), s]
2462
+ children: [/* @__PURE__ */ N(L, { className: "mr-2 h-4 w-4" }), s]
2452
2463
  }) }),
2453
- /* @__PURE__ */ N(te, { children: [E && /* @__PURE__ */ N(D, {
2464
+ /* @__PURE__ */ P(te, { children: [E && /* @__PURE__ */ P(D, {
2454
2465
  value: `__create__${v}`,
2455
2466
  onSelect: () => {
2456
2467
  v.trim() && (r?.(v.trim()), g(!1), b(""));
2457
2468
  },
2458
2469
  className: "text-primary",
2459
- children: [/* @__PURE__ */ M(F, { className: "mr-2 h-4 w-4" }), o(v)]
2470
+ children: [/* @__PURE__ */ N(I, { className: "mr-2 h-4 w-4" }), o(v)]
2460
2471
  }), e.filter((e) => {
2461
2472
  let t = v.toLowerCase();
2462
2473
  return e.label.toLowerCase().includes(t) || (e.value?.toLowerCase() ?? "").includes(t);
2463
- }).map((e, t) => /* @__PURE__ */ N(D, {
2474
+ }).map((e, t) => /* @__PURE__ */ P(D, {
2464
2475
  value: e.label,
2465
2476
  onSelect: () => ne(e?.value || ""),
2466
- children: [/* @__PURE__ */ M(Pe, {
2477
+ children: [/* @__PURE__ */ N(Ne, {
2467
2478
  "aria-hidden": "true",
2468
2479
  className: d("mr-2 h-4 w-4", w && x(e.value) === C ? "opacity-100" : "opacity-0")
2469
2480
  }), e.label]
@@ -2481,9 +2492,9 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2481
2492
  }).map(([e, t]) => ({
2482
2493
  label: e.charAt(0).toUpperCase() + e.slice(1).replace(/_/g, " "),
2483
2494
  value: t
2484
- })), Vn = ({ id: e, value: t, onValueChange: n }) => /* @__PURE__ */ M(zn, {
2495
+ })), Vn = ({ id: e, value: t, onValueChange: n }) => /* @__PURE__ */ N(zn, {
2485
2496
  id: e,
2486
- options: R(() => t && !Bn.some((e) => e.value === t) ? [...Bn, {
2497
+ options: yt(() => t && !Bn.some((e) => e.value === t) ? [...Bn, {
2487
2498
  label: `Custom: ${t}`,
2488
2499
  value: t
2489
2500
  }] : Bn, [t]),
@@ -2515,9 +2526,9 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2515
2526
  }
2516
2527
  }, Jn = ({ value: e, onChange: t }) => {
2517
2528
  let n = bt(null), r = bt(null), [i, a] = z(!1), [o, s] = z(e && /^https?:\/\//i.test(e) ? e : ""), c = G();
2518
- vt(() => {
2529
+ _t(() => {
2519
2530
  i || s(e && /^https?:\/\//i.test(e) ? e : "");
2520
- }, [i, e]), vt(() => () => {
2531
+ }, [i, e]), _t(() => () => {
2521
2532
  r.current && clearTimeout(r.current);
2522
2533
  }, []);
2523
2534
  let l = async (e) => {
@@ -2534,53 +2545,53 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2534
2545
  let e = o.trim();
2535
2546
  e && (t(e), a(!1));
2536
2547
  };
2537
- return /* @__PURE__ */ N("div", {
2548
+ return /* @__PURE__ */ P("div", {
2538
2549
  className: "relative",
2539
2550
  children: [
2540
- /* @__PURE__ */ M("input", {
2551
+ /* @__PURE__ */ N("input", {
2541
2552
  ref: n,
2542
2553
  type: "file",
2543
2554
  accept: "image/*",
2544
2555
  className: "hidden",
2545
2556
  onChange: l
2546
2557
  }),
2547
- /* @__PURE__ */ N(le, {
2558
+ /* @__PURE__ */ P(le, {
2548
2559
  open: i,
2549
2560
  onOpenChange: a,
2550
- children: [/* @__PURE__ */ M(u, {
2561
+ children: [/* @__PURE__ */ N(u, {
2551
2562
  asChild: !0,
2552
- children: e ? /* @__PURE__ */ M("button", {
2563
+ children: e ? /* @__PURE__ */ N("button", {
2553
2564
  type: "button",
2554
2565
  className: "h-9 w-9 cursor-pointer overflow-hidden rounded-md border border-input",
2555
2566
  "aria-label": c("editor.inputNodeForm.optionImageReplace"),
2556
- children: /* @__PURE__ */ M("img", {
2567
+ children: /* @__PURE__ */ N("img", {
2557
2568
  src: e,
2558
2569
  alt: "",
2559
2570
  className: "h-full w-full object-cover"
2560
2571
  })
2561
- }) : /* @__PURE__ */ M(p, {
2572
+ }) : /* @__PURE__ */ N(p, {
2562
2573
  type: "button",
2563
2574
  variant: "outline",
2564
2575
  size: "icon",
2565
2576
  "aria-label": c("editor.inputNodeForm.optionImageAdd"),
2566
- children: /* @__PURE__ */ M(qe, { className: "h-4 w-4" })
2577
+ children: /* @__PURE__ */ N(Ke, { className: "h-4 w-4" })
2567
2578
  })
2568
- }), /* @__PURE__ */ N(_, {
2579
+ }), /* @__PURE__ */ P(_, {
2569
2580
  align: "start",
2570
2581
  className: "w-64 space-y-3 p-3",
2571
2582
  children: [
2572
- /* @__PURE__ */ N(p, {
2583
+ /* @__PURE__ */ P(p, {
2573
2584
  type: "button",
2574
2585
  variant: "outline",
2575
2586
  size: "sm",
2576
2587
  className: "w-full",
2577
2588
  onClick: () => n.current?.click(),
2578
- children: [/* @__PURE__ */ M(ut, { className: "mr-2 h-4 w-4" }), c("editor.inputNodeForm.optionImageUpload")]
2589
+ children: [/* @__PURE__ */ N(lt, { className: "mr-2 h-4 w-4" }), c("editor.inputNodeForm.optionImageUpload")]
2579
2590
  }),
2580
- /* @__PURE__ */ M(se, {}),
2581
- /* @__PURE__ */ N("div", {
2591
+ /* @__PURE__ */ N(se, {}),
2592
+ /* @__PURE__ */ P("div", {
2582
2593
  className: "flex items-center gap-2",
2583
- children: [/* @__PURE__ */ M(Ye, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ M(m, {
2594
+ children: [/* @__PURE__ */ N(Je, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ N(m, {
2584
2595
  placeholder: c("editor.inputNodeForm.optionImageUrlPlaceholder"),
2585
2596
  value: o,
2586
2597
  onChange: (n) => {
@@ -2600,52 +2611,52 @@ var kn = ({ aiConfig: e, onGenerate: t }) => {
2600
2611
  ]
2601
2612
  })]
2602
2613
  }),
2603
- e && /* @__PURE__ */ M("button", {
2614
+ e && /* @__PURE__ */ N("button", {
2604
2615
  type: "button",
2605
2616
  onClick: (e) => {
2606
2617
  e.stopPropagation(), t("");
2607
2618
  },
2608
2619
  className: "-top-1 -right-1 absolute flex h-4 w-4 cursor-pointer items-center justify-center rounded-full bg-destructive text-destructive-foreground",
2609
2620
  "aria-label": c("editor.inputNodeForm.optionImageRemove"),
2610
- children: /* @__PURE__ */ M(I, { className: "h-3 w-3" })
2621
+ children: /* @__PURE__ */ N(L, { className: "h-3 w-3" })
2611
2622
  })
2612
2623
  ]
2613
2624
  });
2614
2625
  }, Yn = ({ value: e, onValueChange: t }) => {
2615
- let n = G(), r = yt();
2616
- return /* @__PURE__ */ N(A, { children: [/* @__PURE__ */ M(ue, {
2626
+ let n = G(), r = vt();
2627
+ return /* @__PURE__ */ P(A, { children: [/* @__PURE__ */ N(ue, {
2617
2628
  htmlFor: r,
2618
2629
  children: n("editor.selectInputType.type")
2619
- }), /* @__PURE__ */ N(v, {
2630
+ }), /* @__PURE__ */ P(v, {
2620
2631
  value: e,
2621
2632
  onValueChange: t,
2622
- children: [/* @__PURE__ */ M(g, {
2633
+ children: [/* @__PURE__ */ N(g, {
2623
2634
  id: r,
2624
2635
  className: "w-full capitalize",
2625
- children: /* @__PURE__ */ M(c, { placeholder: "" })
2626
- }), /* @__PURE__ */ M(k, { children: /* @__PURE__ */ M(A, { children: Object.values(K).map((e) => /* @__PURE__ */ N(b, {
2636
+ children: /* @__PURE__ */ N(c, { placeholder: "" })
2637
+ }), /* @__PURE__ */ N(k, { children: /* @__PURE__ */ N(A, { children: Object.values(K).map((e) => /* @__PURE__ */ P(b, {
2627
2638
  value: e,
2628
2639
  className: "capitalize",
2629
- children: [/* @__PURE__ */ M(dn(e), {}), e]
2640
+ children: [/* @__PURE__ */ N($t(e), {}), e]
2630
2641
  }, e)) }) })]
2631
2642
  })] });
2632
2643
  };
2633
2644
  //#endregion
2634
2645
  //#region src/shared/components/ui/collapsible.tsx
2635
2646
  function Xn({ ...e }) {
2636
- return /* @__PURE__ */ M(Tt.Root, {
2647
+ return /* @__PURE__ */ N(Tt.Root, {
2637
2648
  "data-slot": "collapsible",
2638
2649
  ...e
2639
2650
  });
2640
2651
  }
2641
2652
  function Zn({ ...e }) {
2642
- return /* @__PURE__ */ M(Tt.CollapsibleTrigger, {
2653
+ return /* @__PURE__ */ N(Tt.CollapsibleTrigger, {
2643
2654
  "data-slot": "collapsible-trigger",
2644
2655
  ...e
2645
2656
  });
2646
2657
  }
2647
2658
  function Qn({ ...e }) {
2648
- return /* @__PURE__ */ M(Tt.CollapsibleContent, {
2659
+ return /* @__PURE__ */ N(Tt.CollapsibleContent, {
2649
2660
  "data-slot": "collapsible-content",
2650
2661
  ...e
2651
2662
  });
@@ -2658,7 +2669,7 @@ var $n = () => {
2658
2669
  "radio",
2659
2670
  "autocomplete",
2660
2671
  "checkbox"
2661
- ].includes(n?.data?.type || ""), a = At(n?.id), o = G(), s = n?.data?.type === "submit", { handleSubmit: u, Field: d } = P({
2672
+ ].includes(n?.data?.type || ""), a = At(n?.id), o = G(), s = n?.data?.type === "submit", { handleSubmit: u, Field: d } = F({
2662
2673
  defaultValues: {
2663
2674
  defaultValue: n?.data?.defaultValue,
2664
2675
  disablePast: n?.data?.disablePast,
@@ -2686,30 +2697,30 @@ var $n = () => {
2686
2697
  r(e);
2687
2698
  }
2688
2699
  });
2689
- return /* @__PURE__ */ M("form", {
2700
+ return /* @__PURE__ */ N("form", {
2690
2701
  onSubmit: (e) => {
2691
2702
  e.preventDefault(), e.stopPropagation();
2692
2703
  },
2693
- children: /* @__PURE__ */ N("div", {
2704
+ children: /* @__PURE__ */ P("div", {
2694
2705
  className: "grid gap-6",
2695
2706
  children: [
2696
- /* @__PURE__ */ M(d, {
2707
+ /* @__PURE__ */ N(d, {
2697
2708
  name: "type",
2698
- children: (e) => /* @__PURE__ */ M(T, { children: /* @__PURE__ */ M(Yn, {
2709
+ children: (e) => /* @__PURE__ */ N(T, { children: /* @__PURE__ */ N(Yn, {
2699
2710
  value: e.state.value,
2700
2711
  onValueChange: (t) => e.handleChange(t)
2701
2712
  }) })
2702
2713
  }),
2703
- /* @__PURE__ */ N("div", {
2714
+ /* @__PURE__ */ P("div", {
2704
2715
  className: "flex items-end gap-2",
2705
- children: [/* @__PURE__ */ M(d, {
2716
+ children: [/* @__PURE__ */ N(d, {
2706
2717
  name: "label",
2707
- children: (t) => /* @__PURE__ */ N(T, {
2718
+ children: (t) => /* @__PURE__ */ P(T, {
2708
2719
  className: "flex-1",
2709
- children: [/* @__PURE__ */ M(l, {
2720
+ children: [/* @__PURE__ */ N(l, {
2710
2721
  htmlFor: t.name,
2711
2722
  children: o("editor.inputNodeForm.label")
2712
- }), /* @__PURE__ */ M(m, {
2723
+ }), /* @__PURE__ */ N(m, {
2713
2724
  autoFocus: !0,
2714
2725
  id: t.name,
2715
2726
  name: t.name,
@@ -2723,21 +2734,21 @@ var $n = () => {
2723
2734
  }
2724
2735
  })]
2725
2736
  })
2726
- }), /* @__PURE__ */ M(Q, {
2737
+ }), /* @__PURE__ */ N(Q, {
2727
2738
  value: e,
2728
2739
  onValueChange: t
2729
2740
  })]
2730
2741
  }),
2731
- !s && n?.data?.type !== "file" && /* @__PURE__ */ N("div", {
2742
+ !s && n?.data?.type !== "file" && /* @__PURE__ */ P("div", {
2732
2743
  className: "flex items-end gap-2",
2733
- children: [/* @__PURE__ */ M(d, {
2744
+ children: [/* @__PURE__ */ N(d, {
2734
2745
  name: "placeholder",
2735
- children: (t) => /* @__PURE__ */ N(T, {
2746
+ children: (t) => /* @__PURE__ */ P(T, {
2736
2747
  className: "flex-1",
2737
- children: [/* @__PURE__ */ M(l, {
2748
+ children: [/* @__PURE__ */ N(l, {
2738
2749
  htmlFor: t.name,
2739
2750
  children: o("editor.inputNodeForm.placeholder")
2740
- }), /* @__PURE__ */ M(m, {
2751
+ }), /* @__PURE__ */ N(m, {
2741
2752
  id: t.name,
2742
2753
  name: t.name,
2743
2754
  value: t.state.value?.[e] || "",
@@ -2750,21 +2761,21 @@ var $n = () => {
2750
2761
  }
2751
2762
  })]
2752
2763
  })
2753
- }), /* @__PURE__ */ M(Q, {
2764
+ }), /* @__PURE__ */ N(Q, {
2754
2765
  value: e,
2755
2766
  onValueChange: t
2756
2767
  })]
2757
2768
  }),
2758
- !s && /* @__PURE__ */ N("div", {
2769
+ !s && /* @__PURE__ */ P("div", {
2759
2770
  className: "flex items-end gap-2",
2760
- children: [/* @__PURE__ */ M(d, {
2771
+ children: [/* @__PURE__ */ N(d, {
2761
2772
  name: "helperText",
2762
- children: (t) => /* @__PURE__ */ N(T, {
2773
+ children: (t) => /* @__PURE__ */ P(T, {
2763
2774
  className: "flex-1",
2764
- children: [/* @__PURE__ */ M(l, {
2775
+ children: [/* @__PURE__ */ N(l, {
2765
2776
  htmlFor: t.name,
2766
2777
  children: o("editor.inputNodeForm.helperText")
2767
- }), /* @__PURE__ */ M(m, {
2778
+ }), /* @__PURE__ */ N(m, {
2768
2779
  id: t.name,
2769
2780
  name: t.name,
2770
2781
  value: t.state.value?.[e] || "",
@@ -2777,36 +2788,36 @@ var $n = () => {
2777
2788
  }
2778
2789
  })]
2779
2790
  })
2780
- }), /* @__PURE__ */ M(Q, {
2791
+ }), /* @__PURE__ */ N(Q, {
2781
2792
  value: e,
2782
2793
  onValueChange: t
2783
2794
  })]
2784
2795
  }),
2785
- n?.data?.type === "http" && /* @__PURE__ */ N(Xn, {
2796
+ n?.data?.type === "http" && /* @__PURE__ */ P(Xn, {
2786
2797
  defaultOpen: !0,
2787
2798
  className: "flex w-full max-w-[350px] flex-col gap-2",
2788
- children: [/* @__PURE__ */ M(Zn, {
2799
+ children: [/* @__PURE__ */ N(Zn, {
2789
2800
  asChild: !0,
2790
- children: /* @__PURE__ */ N("div", {
2801
+ children: /* @__PURE__ */ P("div", {
2791
2802
  className: "flex items-center justify-between gap-4",
2792
- children: [/* @__PURE__ */ M("h4", {
2803
+ children: [/* @__PURE__ */ N("h4", {
2793
2804
  className: "font-semibold text-sm",
2794
2805
  children: o("editor.inputNodeForm.httpConfiguration")
2795
- }), /* @__PURE__ */ N(p, {
2806
+ }), /* @__PURE__ */ P(p, {
2796
2807
  variant: "ghost",
2797
2808
  size: "icon",
2798
2809
  className: "size-8",
2799
- children: [/* @__PURE__ */ M(Le, {}), /* @__PURE__ */ M("span", {
2810
+ children: [/* @__PURE__ */ N(Ie, {}), /* @__PURE__ */ N("span", {
2800
2811
  className: "sr-only",
2801
2812
  children: o("common.toggle")
2802
2813
  })]
2803
2814
  })]
2804
2815
  })
2805
- }), /* @__PURE__ */ M(Qn, {
2816
+ }), /* @__PURE__ */ N(Qn, {
2806
2817
  className: "flex flex-col gap-4",
2807
- children: /* @__PURE__ */ M(d, {
2818
+ children: /* @__PURE__ */ N(d, {
2808
2819
  name: "httpConfig",
2809
- children: (e) => /* @__PURE__ */ M(In, {
2820
+ children: (e) => /* @__PURE__ */ N(In, {
2810
2821
  value: e.state.value,
2811
2822
  onChange: (t) => {
2812
2823
  e.handleChange(t), u().then();
@@ -2815,30 +2826,30 @@ var $n = () => {
2815
2826
  })
2816
2827
  })]
2817
2828
  }),
2818
- s && /* @__PURE__ */ N(Xn, {
2829
+ s && /* @__PURE__ */ P(Xn, {
2819
2830
  className: "flex w-full max-w-[350px] flex-col gap-2",
2820
- children: [/* @__PURE__ */ M(Zn, {
2831
+ children: [/* @__PURE__ */ N(Zn, {
2821
2832
  asChild: !0,
2822
- children: /* @__PURE__ */ N("div", {
2833
+ children: /* @__PURE__ */ P("div", {
2823
2834
  className: "flex items-center justify-between gap-4",
2824
- children: [/* @__PURE__ */ M("h4", {
2835
+ children: [/* @__PURE__ */ N("h4", {
2825
2836
  className: "font-semibold text-sm",
2826
2837
  children: o("editor.inputNodeForm.submitConfiguration")
2827
- }), /* @__PURE__ */ N(p, {
2838
+ }), /* @__PURE__ */ P(p, {
2828
2839
  variant: "ghost",
2829
2840
  size: "icon",
2830
2841
  className: "size-8",
2831
- children: [/* @__PURE__ */ M(Le, {}), /* @__PURE__ */ M("span", {
2842
+ children: [/* @__PURE__ */ N(Ie, {}), /* @__PURE__ */ N("span", {
2832
2843
  className: "sr-only",
2833
2844
  children: o("common.toggle")
2834
2845
  })]
2835
2846
  })]
2836
2847
  })
2837
- }), /* @__PURE__ */ M(Qn, {
2848
+ }), /* @__PURE__ */ N(Qn, {
2838
2849
  className: "flex flex-col gap-4",
2839
- children: /* @__PURE__ */ M(d, {
2850
+ children: /* @__PURE__ */ N(d, {
2840
2851
  name: "submitConfig",
2841
- children: (e) => /* @__PURE__ */ M(Rn, {
2852
+ children: (e) => /* @__PURE__ */ N(Rn, {
2842
2853
  value: e.state.value,
2843
2854
  onChange: (t) => {
2844
2855
  e.handleChange(t), u().then();
@@ -2847,65 +2858,65 @@ var $n = () => {
2847
2858
  })
2848
2859
  })]
2849
2860
  }),
2850
- n?.data?.type === "file" && /* @__PURE__ */ M(d, {
2861
+ n?.data?.type === "file" && /* @__PURE__ */ N(d, {
2851
2862
  name: "multiple",
2852
- children: (e) => /* @__PURE__ */ N("div", {
2863
+ children: (e) => /* @__PURE__ */ P("div", {
2853
2864
  className: "flex items-center space-x-2",
2854
- children: [/* @__PURE__ */ M(x, {
2865
+ children: [/* @__PURE__ */ N(x, {
2855
2866
  id: e.name,
2856
2867
  checked: e.state.value,
2857
2868
  onCheckedChange: (t) => e.handleChange(t)
2858
- }), /* @__PURE__ */ M(l, {
2869
+ }), /* @__PURE__ */ N(l, {
2859
2870
  htmlFor: e.name,
2860
2871
  children: o("editor.inputNodeForm.multipleFiles")
2861
2872
  })]
2862
2873
  })
2863
2874
  }),
2864
- i && /* @__PURE__ */ N(Xn, {
2875
+ i && /* @__PURE__ */ P(Xn, {
2865
2876
  defaultOpen: !0,
2866
2877
  className: "flex w-full max-w-[350px] flex-col gap-2",
2867
- children: [/* @__PURE__ */ M(Zn, {
2878
+ children: [/* @__PURE__ */ N(Zn, {
2868
2879
  asChild: !0,
2869
- children: /* @__PURE__ */ N("div", {
2880
+ children: /* @__PURE__ */ P("div", {
2870
2881
  className: "flex items-center justify-between gap-4",
2871
- children: [/* @__PURE__ */ M("h4", {
2882
+ children: [/* @__PURE__ */ N("h4", {
2872
2883
  className: "font-semibold text-sm",
2873
2884
  children: o("editor.inputNodeForm.options")
2874
- }), /* @__PURE__ */ N(p, {
2885
+ }), /* @__PURE__ */ P(p, {
2875
2886
  variant: "ghost",
2876
2887
  size: "icon",
2877
2888
  className: "size-8",
2878
- children: [/* @__PURE__ */ M(Le, {}), /* @__PURE__ */ M("span", {
2889
+ children: [/* @__PURE__ */ N(Ie, {}), /* @__PURE__ */ N("span", {
2879
2890
  className: "sr-only",
2880
2891
  children: o("common.toggle")
2881
2892
  })]
2882
2893
  })]
2883
2894
  })
2884
- }), /* @__PURE__ */ N(Qn, {
2895
+ }), /* @__PURE__ */ P(Qn, {
2885
2896
  className: "flex flex-col gap-4",
2886
2897
  children: [
2887
- /* @__PURE__ */ M(d, {
2898
+ /* @__PURE__ */ N(d, {
2888
2899
  name: "options",
2889
2900
  mode: "array",
2890
- children: (t) => /* @__PURE__ */ N("div", {
2901
+ children: (t) => /* @__PURE__ */ P("div", {
2891
2902
  className: "space-y-2",
2892
2903
  children: [t.state.value?.map((r, i) => {
2893
2904
  let a = `options[${i}]`;
2894
- return /* @__PURE__ */ N("div", {
2905
+ return /* @__PURE__ */ P("div", {
2895
2906
  className: "flex flex-col gap-2",
2896
- children: [/* @__PURE__ */ N("div", {
2907
+ children: [/* @__PURE__ */ P("div", {
2897
2908
  className: "flex items-start gap-2",
2898
2909
  children: [
2899
- n?.data?.type === "radio" && /* @__PURE__ */ M(d, {
2910
+ n?.data?.type === "radio" && /* @__PURE__ */ N(d, {
2900
2911
  name: `options[${i}].image`,
2901
- children: (e) => /* @__PURE__ */ M(Jn, {
2912
+ children: (e) => /* @__PURE__ */ N(Jn, {
2902
2913
  value: e.state.value,
2903
2914
  onChange: (t) => e.handleChange(t)
2904
2915
  })
2905
2916
  }),
2906
- /* @__PURE__ */ M(d, {
2917
+ /* @__PURE__ */ N(d, {
2907
2918
  name: `options[${i}].label`,
2908
- children: (t) => /* @__PURE__ */ M(m, {
2919
+ children: (t) => /* @__PURE__ */ N(m, {
2909
2920
  placeholder: o("editor.inputNodeForm.optionLabel"),
2910
2921
  value: t.state.value?.[e] || "",
2911
2922
  onChange: ({ target: n }) => {
@@ -2916,27 +2927,27 @@ var $n = () => {
2916
2927
  }
2917
2928
  })
2918
2929
  }),
2919
- /* @__PURE__ */ M(d, {
2930
+ /* @__PURE__ */ N(d, {
2920
2931
  name: `options[${i}].value`,
2921
- children: (e) => /* @__PURE__ */ M(m, {
2932
+ children: (e) => /* @__PURE__ */ N(m, {
2922
2933
  placeholder: o("editor.inputNodeForm.optionValue"),
2923
2934
  value: e.state.value || "",
2924
2935
  onChange: ({ target: t }) => e.handleChange(t.value)
2925
2936
  })
2926
2937
  }),
2927
- /* @__PURE__ */ M(p, {
2938
+ /* @__PURE__ */ N(p, {
2928
2939
  type: "button",
2929
2940
  variant: "ghost",
2930
2941
  size: "icon",
2931
2942
  onClick: () => {
2932
2943
  t.removeValue(i), u().then();
2933
2944
  },
2934
- children: /* @__PURE__ */ M(I, { className: "h-4 w-4" })
2945
+ children: /* @__PURE__ */ N(L, { className: "h-4 w-4" })
2935
2946
  })
2936
2947
  ]
2937
- }), (n?.data?.type === "radio" || n?.data?.type === "checkbox") && /* @__PURE__ */ M(d, {
2948
+ }), (n?.data?.type === "radio" || n?.data?.type === "checkbox") && /* @__PURE__ */ N(d, {
2938
2949
  name: `options[${i}].description`,
2939
- children: (t) => /* @__PURE__ */ M(m, {
2950
+ children: (t) => /* @__PURE__ */ N(m, {
2940
2951
  placeholder: o("editor.inputNodeForm.optionDescription"),
2941
2952
  value: t.state.value?.[e] || "",
2942
2953
  onChange: ({ target: n }) => {
@@ -2948,7 +2959,7 @@ var $n = () => {
2948
2959
  })
2949
2960
  })]
2950
2961
  }, a);
2951
- }), /* @__PURE__ */ M(p, {
2962
+ }), /* @__PURE__ */ N(p, {
2952
2963
  type: "button",
2953
2964
  variant: "outline",
2954
2965
  size: "sm",
@@ -2962,36 +2973,36 @@ var $n = () => {
2962
2973
  })]
2963
2974
  })
2964
2975
  }),
2965
- n?.data?.type === "select" && /* @__PURE__ */ M(d, {
2976
+ n?.data?.type === "select" && /* @__PURE__ */ N(d, {
2966
2977
  name: "multiple",
2967
- children: (e) => /* @__PURE__ */ N("div", {
2978
+ children: (e) => /* @__PURE__ */ P("div", {
2968
2979
  className: "flex items-center space-x-2",
2969
- children: [/* @__PURE__ */ M(x, {
2980
+ children: [/* @__PURE__ */ N(x, {
2970
2981
  id: e.name,
2971
2982
  checked: e.state.value,
2972
2983
  onCheckedChange: (t) => e.handleChange(t)
2973
- }), /* @__PURE__ */ M(l, {
2984
+ }), /* @__PURE__ */ N(l, {
2974
2985
  htmlFor: e.name,
2975
2986
  children: o("editor.inputNodeForm.multipleSelection")
2976
2987
  })]
2977
2988
  })
2978
2989
  }),
2979
- n?.data?.type === "radio" && /* @__PURE__ */ M(d, {
2990
+ n?.data?.type === "radio" && /* @__PURE__ */ N(d, {
2980
2991
  name: "variant",
2981
- children: (e) => /* @__PURE__ */ N(T, { children: [/* @__PURE__ */ M(l, {
2992
+ children: (e) => /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
2982
2993
  htmlFor: e.name,
2983
2994
  children: o("editor.inputNodeForm.variant")
2984
- }), /* @__PURE__ */ N(v, {
2995
+ }), /* @__PURE__ */ P(v, {
2985
2996
  value: e.state.value || "default",
2986
2997
  onValueChange: (t) => e.handleChange(t),
2987
- children: [/* @__PURE__ */ M(g, {
2998
+ children: [/* @__PURE__ */ N(g, {
2988
2999
  id: e.name,
2989
3000
  className: "w-full",
2990
- children: /* @__PURE__ */ M(c, {})
2991
- }), /* @__PURE__ */ N(k, { children: [/* @__PURE__ */ M(b, {
3001
+ children: /* @__PURE__ */ N(c, {})
3002
+ }), /* @__PURE__ */ P(k, { children: [/* @__PURE__ */ N(b, {
2992
3003
  value: "default",
2993
3004
  children: o("editor.inputNodeForm.variantDefault")
2994
- }), /* @__PURE__ */ M(b, {
3005
+ }), /* @__PURE__ */ N(b, {
2995
3006
  value: "card",
2996
3007
  children: o("editor.inputNodeForm.variantCard")
2997
3008
  })] })]
@@ -3000,77 +3011,77 @@ var $n = () => {
3000
3011
  ]
3001
3012
  })]
3002
3013
  }),
3003
- !s && /* @__PURE__ */ N(Xn, {
3014
+ !s && /* @__PURE__ */ P(Xn, {
3004
3015
  className: "flex w-full max-w-[350px] flex-col gap-2",
3005
- children: [/* @__PURE__ */ M(Zn, {
3016
+ children: [/* @__PURE__ */ N(Zn, {
3006
3017
  asChild: !0,
3007
- children: /* @__PURE__ */ N("div", {
3018
+ children: /* @__PURE__ */ P("div", {
3008
3019
  className: "flex items-center justify-between gap-4",
3009
- children: [/* @__PURE__ */ M("h4", {
3020
+ children: [/* @__PURE__ */ N("h4", {
3010
3021
  className: "font-semibold text-sm",
3011
3022
  children: o("editor.inputNodeForm.validation")
3012
- }), /* @__PURE__ */ N(p, {
3023
+ }), /* @__PURE__ */ P(p, {
3013
3024
  variant: "ghost",
3014
3025
  size: "icon",
3015
3026
  className: "size-8",
3016
- children: [/* @__PURE__ */ M(Le, {}), /* @__PURE__ */ M("span", {
3027
+ children: [/* @__PURE__ */ N(Ie, {}), /* @__PURE__ */ N("span", {
3017
3028
  className: "sr-only",
3018
3029
  children: o("common.toggle")
3019
3030
  })]
3020
3031
  })]
3021
3032
  })
3022
- }), /* @__PURE__ */ N(Qn, {
3033
+ }), /* @__PURE__ */ P(Qn, {
3023
3034
  className: "flex flex-col gap-6",
3024
3035
  children: [
3025
- /* @__PURE__ */ M(d, {
3036
+ /* @__PURE__ */ N(d, {
3026
3037
  name: "required",
3027
- children: (e) => /* @__PURE__ */ M(T, { children: /* @__PURE__ */ N("div", {
3038
+ children: (e) => /* @__PURE__ */ N(T, { children: /* @__PURE__ */ P("div", {
3028
3039
  className: "flex items-center space-x-2",
3029
- children: [/* @__PURE__ */ M(x, {
3040
+ children: [/* @__PURE__ */ N(x, {
3030
3041
  id: e.name,
3031
3042
  checked: e.state.value,
3032
3043
  onCheckedChange: (t) => e.handleChange(t)
3033
- }), /* @__PURE__ */ M(l, {
3044
+ }), /* @__PURE__ */ N(l, {
3034
3045
  htmlFor: e.name,
3035
3046
  children: o("editor.inputNodeForm.required")
3036
3047
  })]
3037
3048
  }) })
3038
3049
  }),
3039
- (n?.data?.type === "date" || n?.data?.type === "daterange") && /* @__PURE__ */ M(d, {
3050
+ (n?.data?.type === "date" || n?.data?.type === "daterange") && /* @__PURE__ */ N(d, {
3040
3051
  name: "disablePast",
3041
- children: (e) => /* @__PURE__ */ M(T, { children: /* @__PURE__ */ N("div", {
3052
+ children: (e) => /* @__PURE__ */ N(T, { children: /* @__PURE__ */ P("div", {
3042
3053
  className: "flex items-center space-x-2",
3043
- children: [/* @__PURE__ */ M(x, {
3054
+ children: [/* @__PURE__ */ N(x, {
3044
3055
  id: e.name,
3045
3056
  checked: e.state.value,
3046
3057
  onCheckedChange: (t) => e.handleChange(t)
3047
- }), /* @__PURE__ */ M(l, {
3058
+ }), /* @__PURE__ */ N(l, {
3048
3059
  htmlFor: e.name,
3049
3060
  children: o("editor.inputNodeForm.disablePast")
3050
3061
  })]
3051
3062
  }) })
3052
3063
  }),
3053
- /* @__PURE__ */ M(d, {
3064
+ /* @__PURE__ */ N(d, {
3054
3065
  name: "pattern",
3055
- children: (e) => /* @__PURE__ */ N(T, { children: [/* @__PURE__ */ M(l, {
3066
+ children: (e) => /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
3056
3067
  htmlFor: e.name,
3057
3068
  children: o("editor.inputNodeForm.pattern")
3058
- }), /* @__PURE__ */ M(Vn, {
3069
+ }), /* @__PURE__ */ N(Vn, {
3059
3070
  id: e.name,
3060
3071
  value: e.state.value,
3061
3072
  onValueChange: e.handleChange
3062
3073
  })] })
3063
3074
  }),
3064
- /* @__PURE__ */ N("div", {
3075
+ /* @__PURE__ */ P("div", {
3065
3076
  className: "flex items-end gap-2",
3066
- children: [/* @__PURE__ */ M(d, {
3077
+ children: [/* @__PURE__ */ N(d, {
3067
3078
  name: "errorMessage",
3068
- children: (t) => /* @__PURE__ */ N(T, {
3079
+ children: (t) => /* @__PURE__ */ P(T, {
3069
3080
  className: "flex-1",
3070
- children: [/* @__PURE__ */ M(l, {
3081
+ children: [/* @__PURE__ */ N(l, {
3071
3082
  htmlFor: t.name,
3072
3083
  children: o("editor.inputNodeForm.errorMessage")
3073
- }), /* @__PURE__ */ M(m, {
3084
+ }), /* @__PURE__ */ N(m, {
3074
3085
  id: t.name,
3075
3086
  name: t.name,
3076
3087
  value: t.state.value?.[e] || "",
@@ -3083,7 +3094,7 @@ var $n = () => {
3083
3094
  }
3084
3095
  })]
3085
3096
  })
3086
- }), /* @__PURE__ */ M(Q, {
3097
+ }), /* @__PURE__ */ N(Q, {
3087
3098
  value: e,
3088
3099
  onValueChange: t
3089
3100
  })]
@@ -3091,80 +3102,80 @@ var $n = () => {
3091
3102
  ]
3092
3103
  })]
3093
3104
  }),
3094
- !s && /* @__PURE__ */ N(Xn, {
3105
+ !s && /* @__PURE__ */ P(Xn, {
3095
3106
  className: "flex w-full max-w-[350px] flex-col gap-2",
3096
- children: [/* @__PURE__ */ M(Zn, {
3107
+ children: [/* @__PURE__ */ N(Zn, {
3097
3108
  asChild: !0,
3098
- children: /* @__PURE__ */ N("div", {
3109
+ children: /* @__PURE__ */ P("div", {
3099
3110
  className: "flex items-center justify-between gap-4",
3100
- children: [/* @__PURE__ */ M("h4", {
3111
+ children: [/* @__PURE__ */ N("h4", {
3101
3112
  className: "font-semibold text-sm",
3102
3113
  children: o("editor.inputNodeForm.advancedConfiguration")
3103
- }), /* @__PURE__ */ N(p, {
3114
+ }), /* @__PURE__ */ P(p, {
3104
3115
  variant: "ghost",
3105
3116
  size: "icon",
3106
3117
  className: "size-8",
3107
- children: [/* @__PURE__ */ M(Le, {}), /* @__PURE__ */ M("span", {
3118
+ children: [/* @__PURE__ */ N(Ie, {}), /* @__PURE__ */ N("span", {
3108
3119
  className: "sr-only",
3109
3120
  children: o("common.toggle")
3110
3121
  })]
3111
3122
  })]
3112
3123
  })
3113
- }), /* @__PURE__ */ N(Qn, {
3124
+ }), /* @__PURE__ */ P(Qn, {
3114
3125
  className: "flex flex-col gap-6",
3115
- children: [/* @__PURE__ */ M(d, {
3126
+ children: [/* @__PURE__ */ N(d, {
3116
3127
  name: "name",
3117
- children: (e) => /* @__PURE__ */ N(T, { children: [
3118
- /* @__PURE__ */ M(l, {
3128
+ children: (e) => /* @__PURE__ */ P(T, { children: [
3129
+ /* @__PURE__ */ N(l, {
3119
3130
  htmlFor: e.name,
3120
3131
  children: o("editor.inputNodeForm.name")
3121
3132
  }),
3122
- /* @__PURE__ */ M(m, {
3133
+ /* @__PURE__ */ N(m, {
3123
3134
  id: e.name,
3124
3135
  name: e.name,
3125
3136
  value: e.state.value,
3126
3137
  onBlur: e.handleBlur,
3127
3138
  onChange: ({ target: t }) => e.handleChange(t.value)
3128
3139
  }),
3129
- /* @__PURE__ */ M(E, { children: o("editor.inputNodeForm.nameDescription") })
3140
+ /* @__PURE__ */ N(E, { children: o("editor.inputNodeForm.nameDescription") })
3130
3141
  ] })
3131
- }), /* @__PURE__ */ M(d, {
3142
+ }), /* @__PURE__ */ N(d, {
3132
3143
  name: "defaultValue",
3133
- children: (e) => /* @__PURE__ */ N(j, { children: [
3134
- /* @__PURE__ */ N(T, { children: [/* @__PURE__ */ M(l, {
3144
+ children: (e) => /* @__PURE__ */ P(M, { children: [
3145
+ /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
3135
3146
  htmlFor: e.name,
3136
3147
  children: o("editor.inputNodeForm.defaultValueType")
3137
- }), /* @__PURE__ */ N(v, {
3148
+ }), /* @__PURE__ */ P(v, {
3138
3149
  value: e.state.value?.type || "none",
3139
3150
  onValueChange: (t) => {
3140
3151
  e.handleChange(t === "none" ? null : { type: t });
3141
3152
  },
3142
- children: [/* @__PURE__ */ M(g, {
3153
+ children: [/* @__PURE__ */ N(g, {
3143
3154
  id: e.name,
3144
- children: /* @__PURE__ */ M(c, { placeholder: o("editor.inputNodeForm.selectType") })
3145
- }), /* @__PURE__ */ N(k, { children: [
3146
- /* @__PURE__ */ M(b, {
3155
+ children: /* @__PURE__ */ N(c, { placeholder: o("editor.inputNodeForm.selectType") })
3156
+ }), /* @__PURE__ */ P(k, { children: [
3157
+ /* @__PURE__ */ N(b, {
3147
3158
  value: "none",
3148
3159
  children: o("editor.inputNodeForm.defaultValueTypeNone")
3149
3160
  }),
3150
- /* @__PURE__ */ M(b, {
3161
+ /* @__PURE__ */ N(b, {
3151
3162
  value: "static",
3152
3163
  children: o("editor.inputNodeForm.defaultValueTypeStatic")
3153
3164
  }),
3154
- /* @__PURE__ */ M(b, {
3165
+ /* @__PURE__ */ N(b, {
3155
3166
  value: "reference",
3156
3167
  children: o("editor.inputNodeForm.defaultValueTypeReference")
3157
3168
  })
3158
3169
  ] })]
3159
3170
  })] }),
3160
- e.state.value?.type === "static" && /* @__PURE__ */ M(d, {
3171
+ e.state.value?.type === "static" && /* @__PURE__ */ N(d, {
3161
3172
  name: "defaultValue.staticValue",
3162
3173
  children: (e) => {
3163
3174
  let t = n?.data?.type;
3164
- return (t === "select" || t === "checkbox") && n?.data?.multiple ? /* @__PURE__ */ N(T, { children: [/* @__PURE__ */ M(l, {
3175
+ return (t === "select" || t === "checkbox") && n?.data?.multiple ? /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
3165
3176
  htmlFor: e.name,
3166
3177
  children: o("editor.inputNodeForm.defaultValuesCommaSeparated")
3167
- }), /* @__PURE__ */ M(m, {
3178
+ }), /* @__PURE__ */ N(m, {
3168
3179
  id: e.name,
3169
3180
  placeholder: o("editor.inputNodeForm.defaultValuesPlaceholder"),
3170
3181
  value: Array.isArray(e.state.value) ? e.state.value.join(", ") : "",
@@ -3172,20 +3183,20 @@ var $n = () => {
3172
3183
  let n = t.value.split(",").map((e) => e.trim()).filter(Boolean);
3173
3184
  e.handleChange(n.length > 0 ? n : null);
3174
3185
  }
3175
- })] }) : t === "checkbox" ? /* @__PURE__ */ M(T, { children: /* @__PURE__ */ N("div", {
3186
+ })] }) : t === "checkbox" ? /* @__PURE__ */ N(T, { children: /* @__PURE__ */ P("div", {
3176
3187
  className: "flex items-center space-x-2",
3177
- children: [/* @__PURE__ */ M(x, {
3188
+ children: [/* @__PURE__ */ N(x, {
3178
3189
  id: e.name,
3179
3190
  checked: !!e.state.value,
3180
3191
  onCheckedChange: (t) => e.handleChange(t)
3181
- }), /* @__PURE__ */ M(l, {
3192
+ }), /* @__PURE__ */ N(l, {
3182
3193
  htmlFor: e.name,
3183
3194
  children: o("editor.inputNodeForm.defaultChecked")
3184
3195
  })]
3185
- }) }) : /* @__PURE__ */ N(T, { children: [/* @__PURE__ */ M(l, {
3196
+ }) }) : /* @__PURE__ */ P(T, { children: [/* @__PURE__ */ N(l, {
3186
3197
  htmlFor: e.name,
3187
3198
  children: o("editor.inputNodeForm.staticValue")
3188
- }), /* @__PURE__ */ M(m, {
3199
+ }), /* @__PURE__ */ N(m, {
3189
3200
  id: e.name,
3190
3201
  placeholder: o("editor.inputNodeForm.staticValuePlaceholder"),
3191
3202
  value: typeof e.state.value == "string" ? e.state.value : "",
@@ -3193,27 +3204,27 @@ var $n = () => {
3193
3204
  })] });
3194
3205
  }
3195
3206
  }),
3196
- e.state.value?.type === "reference" && /* @__PURE__ */ N(j, { children: [
3197
- /* @__PURE__ */ M(d, {
3207
+ e.state.value?.type === "reference" && /* @__PURE__ */ P(M, { children: [
3208
+ /* @__PURE__ */ N(d, {
3198
3209
  name: "defaultValue.referenceField",
3199
- children: (e) => /* @__PURE__ */ N(T, { children: [
3200
- /* @__PURE__ */ M(l, {
3210
+ children: (e) => /* @__PURE__ */ P(T, { children: [
3211
+ /* @__PURE__ */ N(l, {
3201
3212
  htmlFor: e.name,
3202
3213
  children: o("editor.inputNodeForm.referenceField")
3203
3214
  }),
3204
- /* @__PURE__ */ N(v, {
3215
+ /* @__PURE__ */ P(v, {
3205
3216
  value: e.state.value || "",
3206
3217
  onValueChange: (t) => {
3207
3218
  e.handleChange(t);
3208
3219
  },
3209
- children: [/* @__PURE__ */ M(g, {
3220
+ children: [/* @__PURE__ */ N(g, {
3210
3221
  id: e.name,
3211
- children: /* @__PURE__ */ M(c, { placeholder: o("editor.inputNodeForm.selectReferenceField") })
3212
- }), /* @__PURE__ */ M(k, { children: a.length === 0 ? /* @__PURE__ */ M(b, {
3222
+ children: /* @__PURE__ */ N(c, { placeholder: o("editor.inputNodeForm.selectReferenceField") })
3223
+ }), /* @__PURE__ */ N(k, { children: a.length === 0 ? /* @__PURE__ */ N(b, {
3213
3224
  value: "none",
3214
3225
  disabled: !0,
3215
3226
  children: o("editor.inputNodeForm.noParentFieldsAvailable")
3216
- }) : a.map((e) => /* @__PURE__ */ N(b, {
3227
+ }) : a.map((e) => /* @__PURE__ */ P(b, {
3217
3228
  value: e.nodeId,
3218
3229
  children: [
3219
3230
  e.label,
@@ -3223,17 +3234,17 @@ var $n = () => {
3223
3234
  ]
3224
3235
  }, e.nodeId)) })]
3225
3236
  }),
3226
- a.length === 0 && /* @__PURE__ */ M(E, { children: o("editor.inputNodeForm.addInputFieldsBeforeReference") })
3237
+ a.length === 0 && /* @__PURE__ */ N(E, { children: o("editor.inputNodeForm.addInputFieldsBeforeReference") })
3227
3238
  ] })
3228
3239
  }),
3229
- /* @__PURE__ */ M(d, {
3240
+ /* @__PURE__ */ N(d, {
3230
3241
  name: "defaultValue.transformFunction",
3231
- children: (t) => /* @__PURE__ */ N(T, { children: [
3232
- /* @__PURE__ */ M(l, {
3242
+ children: (t) => /* @__PURE__ */ P(T, { children: [
3243
+ /* @__PURE__ */ N(l, {
3233
3244
  htmlFor: t.name,
3234
3245
  children: o("editor.inputNodeForm.transformType")
3235
3246
  }),
3236
- /* @__PURE__ */ N(v, {
3247
+ /* @__PURE__ */ P(v, {
3237
3248
  value: t.state.value || "none",
3238
3249
  onValueChange: (n) => {
3239
3250
  let r = n === "none" ? null : n;
@@ -3245,80 +3256,80 @@ var $n = () => {
3245
3256
  });
3246
3257
  }
3247
3258
  },
3248
- children: [/* @__PURE__ */ M(g, {
3259
+ children: [/* @__PURE__ */ N(g, {
3249
3260
  id: t.name,
3250
- children: /* @__PURE__ */ M(c, { placeholder: o("editor.inputNodeForm.selectTransformation") })
3251
- }), /* @__PURE__ */ N(k, { children: [
3252
- /* @__PURE__ */ M(b, {
3261
+ children: /* @__PURE__ */ N(c, { placeholder: o("editor.inputNodeForm.selectTransformation") })
3262
+ }), /* @__PURE__ */ P(k, { children: [
3263
+ /* @__PURE__ */ N(b, {
3253
3264
  value: "none",
3254
3265
  children: o("editor.inputNodeForm.transformNone")
3255
3266
  }),
3256
- /* @__PURE__ */ M(b, {
3267
+ /* @__PURE__ */ N(b, {
3257
3268
  value: "toString",
3258
3269
  children: o("editor.inputNodeForm.transformString")
3259
3270
  }),
3260
- /* @__PURE__ */ M(b, {
3271
+ /* @__PURE__ */ N(b, {
3261
3272
  value: "toNumber",
3262
3273
  children: o("editor.inputNodeForm.transformNumber")
3263
3274
  }),
3264
- /* @__PURE__ */ M(b, {
3275
+ /* @__PURE__ */ N(b, {
3265
3276
  value: "toBoolean",
3266
3277
  children: o("editor.inputNodeForm.transformBoolean")
3267
3278
  }),
3268
- /* @__PURE__ */ M(b, {
3279
+ /* @__PURE__ */ N(b, {
3269
3280
  value: "toArray",
3270
3281
  children: o("editor.inputNodeForm.transformArray")
3271
3282
  }),
3272
- /* @__PURE__ */ M(b, {
3283
+ /* @__PURE__ */ N(b, {
3273
3284
  value: "toObject",
3274
3285
  children: o("editor.inputNodeForm.transformMapToObject")
3275
3286
  })
3276
3287
  ] })]
3277
3288
  }),
3278
- /* @__PURE__ */ M(E, { children: o("editor.inputNodeForm.transformDesc") })
3289
+ /* @__PURE__ */ N(E, { children: o("editor.inputNodeForm.transformDesc") })
3279
3290
  ] })
3280
3291
  }),
3281
- e.state.value?.transformFunction === "toObject" && /* @__PURE__ */ M(d, {
3292
+ e.state.value?.transformFunction === "toObject" && /* @__PURE__ */ N(d, {
3282
3293
  name: "defaultValue.objectMapping",
3283
3294
  mode: "array",
3284
- children: (e) => /* @__PURE__ */ N(T, { children: [
3285
- /* @__PURE__ */ M(l, { children: o("editor.inputNodeForm.objectMapping") }),
3286
- /* @__PURE__ */ N("div", {
3295
+ children: (e) => /* @__PURE__ */ P(T, { children: [
3296
+ /* @__PURE__ */ N(l, { children: o("editor.inputNodeForm.objectMapping") }),
3297
+ /* @__PURE__ */ P("div", {
3287
3298
  className: "space-y-2",
3288
- children: [e.state.value?.map((t, n) => /* @__PURE__ */ N("div", {
3299
+ children: [e.state.value?.map((t, n) => /* @__PURE__ */ P("div", {
3289
3300
  className: "flex items-center gap-2",
3290
3301
  children: [
3291
- /* @__PURE__ */ M(d, {
3302
+ /* @__PURE__ */ N(d, {
3292
3303
  name: `defaultValue.objectMapping[${n}].sourceKey`,
3293
- children: (e) => /* @__PURE__ */ M(m, {
3304
+ children: (e) => /* @__PURE__ */ N(m, {
3294
3305
  placeholder: o("editor.inputNodeForm.sourceKey"),
3295
3306
  value: e.state.value || "",
3296
3307
  onChange: ({ target: t }) => e.handleChange(t.value)
3297
3308
  })
3298
3309
  }),
3299
- /* @__PURE__ */ M("span", {
3310
+ /* @__PURE__ */ N("span", {
3300
3311
  className: "text-muted-foreground",
3301
3312
  children: "→"
3302
3313
  }),
3303
- /* @__PURE__ */ M(d, {
3314
+ /* @__PURE__ */ N(d, {
3304
3315
  name: `defaultValue.objectMapping[${n}].targetKey`,
3305
- children: (e) => /* @__PURE__ */ M(m, {
3316
+ children: (e) => /* @__PURE__ */ N(m, {
3306
3317
  placeholder: o("editor.inputNodeForm.targetKey"),
3307
3318
  value: e.state.value || "",
3308
3319
  onChange: ({ target: t }) => e.handleChange(t.value)
3309
3320
  })
3310
3321
  }),
3311
- /* @__PURE__ */ M(p, {
3322
+ /* @__PURE__ */ N(p, {
3312
3323
  type: "button",
3313
3324
  variant: "ghost",
3314
3325
  size: "icon",
3315
3326
  onClick: () => {
3316
3327
  e.removeValue(n), u().then();
3317
3328
  },
3318
- children: /* @__PURE__ */ M(I, { className: "h-4 w-4" })
3329
+ children: /* @__PURE__ */ N(L, { className: "h-4 w-4" })
3319
3330
  })
3320
3331
  ]
3321
- }, `mapping-${n}`)), /* @__PURE__ */ N(p, {
3332
+ }, `mapping-${n}`)), /* @__PURE__ */ P(p, {
3322
3333
  type: "button",
3323
3334
  variant: "outline",
3324
3335
  size: "sm",
@@ -3329,10 +3340,10 @@ var $n = () => {
3329
3340
  targetKey: ""
3330
3341
  }), u().then();
3331
3342
  },
3332
- children: [/* @__PURE__ */ M(F, { className: "mr-2 h-4 w-4" }), o("editor.inputNodeForm.addMapping")]
3343
+ children: [/* @__PURE__ */ N(I, { className: "mr-2 h-4 w-4" }), o("editor.inputNodeForm.addMapping")]
3333
3344
  })]
3334
3345
  }),
3335
- /* @__PURE__ */ M(E, { children: o("editor.inputNodeForm.objectMappingDesc") })
3346
+ /* @__PURE__ */ N(E, { children: o("editor.inputNodeForm.objectMappingDesc") })
3336
3347
  ] })
3337
3348
  })
3338
3349
  ] })
@@ -3344,7 +3355,7 @@ var $n = () => {
3344
3355
  })
3345
3356
  });
3346
3357
  }, er = () => {
3347
- let [e, t] = z("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), { Field: i } = P({
3358
+ let [e, t] = z("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), { Field: i } = F({
3348
3359
  defaultValues: {
3349
3360
  label: n?.data?.label || { en: "" },
3350
3361
  type: n?.data?.type || ""
@@ -3359,22 +3370,22 @@ var $n = () => {
3359
3370
  r(e);
3360
3371
  }
3361
3372
  });
3362
- return /* @__PURE__ */ M("form", {
3373
+ return /* @__PURE__ */ N("form", {
3363
3374
  onSubmit: (e) => {
3364
3375
  e.preventDefault(), e.stopPropagation();
3365
3376
  },
3366
- children: /* @__PURE__ */ N("div", {
3377
+ children: /* @__PURE__ */ P("div", {
3367
3378
  className: "grid gap-6",
3368
- children: [/* @__PURE__ */ N("div", {
3379
+ children: [/* @__PURE__ */ P("div", {
3369
3380
  className: "flex items-end gap-2",
3370
- children: [/* @__PURE__ */ M(i, {
3381
+ children: [/* @__PURE__ */ N(i, {
3371
3382
  name: "label",
3372
- children: (t) => /* @__PURE__ */ N(T, {
3383
+ children: (t) => /* @__PURE__ */ P(T, {
3373
3384
  className: "flex-1",
3374
- children: [/* @__PURE__ */ M(l, {
3385
+ children: [/* @__PURE__ */ N(l, {
3375
3386
  htmlFor: t.name,
3376
3387
  children: "Label"
3377
- }), /* @__PURE__ */ M(m, {
3388
+ }), /* @__PURE__ */ N(m, {
3378
3389
  id: t.name,
3379
3390
  name: t.name,
3380
3391
  value: t.state.value?.[e] || "",
@@ -3387,27 +3398,27 @@ var $n = () => {
3387
3398
  }
3388
3399
  })]
3389
3400
  })
3390
- }), /* @__PURE__ */ M(Q, {
3401
+ }), /* @__PURE__ */ N(Q, {
3391
3402
  value: e,
3392
3403
  onValueChange: t
3393
3404
  })]
3394
- }), /* @__PURE__ */ M(i, {
3405
+ }), /* @__PURE__ */ N(i, {
3395
3406
  name: "type",
3396
- children: (e) => /* @__PURE__ */ N(A, { children: [/* @__PURE__ */ M(ue, {
3407
+ children: (e) => /* @__PURE__ */ P(A, { children: [/* @__PURE__ */ N(ue, {
3397
3408
  htmlFor: e.name,
3398
3409
  children: "Type"
3399
- }), /* @__PURE__ */ N(v, {
3410
+ }), /* @__PURE__ */ P(v, {
3400
3411
  value: e.state.value,
3401
3412
  onValueChange: (t) => e.handleChange(t),
3402
- children: [/* @__PURE__ */ M(g, {
3413
+ children: [/* @__PURE__ */ N(g, {
3403
3414
  id: e.name,
3404
3415
  className: "w-full",
3405
- children: /* @__PURE__ */ M(c, { placeholder: "" })
3406
- }), /* @__PURE__ */ M(k, { children: /* @__PURE__ */ N(A, { children: [/* @__PURE__ */ M(b, {
3407
- value: sn.title,
3416
+ children: /* @__PURE__ */ N(c, { placeholder: "" })
3417
+ }), /* @__PURE__ */ N(k, { children: /* @__PURE__ */ P(A, { children: [/* @__PURE__ */ N(b, {
3418
+ value: Yt.title,
3408
3419
  children: "Title"
3409
- }), /* @__PURE__ */ M(b, {
3410
- value: sn.divider,
3420
+ }), /* @__PURE__ */ N(b, {
3421
+ value: Yt.divider,
3411
3422
  children: "Divider"
3412
3423
  })] }) })]
3413
3424
  })] })
@@ -3415,7 +3426,7 @@ var $n = () => {
3415
3426
  })
3416
3427
  });
3417
3428
  }, tr = () => {
3418
- let [e, t] = z(""), [n, r] = z(!1), { selectedNode: a, groupNodes: o } = $(), { setNodes: s } = De(), d = a?.parentId || "none", f = i(a), h = G(), y = yt(), x = yt();
3429
+ 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();
3419
3430
  if (f) return null;
3420
3431
  let S = (e) => {
3421
3432
  a && s((t) => e === "none" ? t.map((e) => {
@@ -3442,7 +3453,7 @@ var $n = () => {
3442
3453
  H.error("This group already exists", { description: "Use the selector to add the node to an existing group." });
3443
3454
  return;
3444
3455
  }
3445
- let n = rn();
3456
+ let n = Kt();
3446
3457
  s((t) => [{
3447
3458
  data: { label: { en: e.trim() } },
3448
3459
  id: n,
@@ -3465,61 +3476,61 @@ var $n = () => {
3465
3476
  }
3466
3477
  } : e)]), t(""), r(!1), H.success("Group created", { description: `The group "${e.trim()}" has been created successfully.` });
3467
3478
  };
3468
- return /* @__PURE__ */ N("div", {
3479
+ return /* @__PURE__ */ P("div", {
3469
3480
  className: "space-y-2",
3470
- children: [/* @__PURE__ */ M(l, {
3481
+ children: [/* @__PURE__ */ N(l, {
3471
3482
  htmlFor: y,
3472
3483
  children: h("editor.selectNodeGroup.group")
3473
- }), /* @__PURE__ */ N("div", {
3484
+ }), /* @__PURE__ */ P("div", {
3474
3485
  className: "flex gap-2",
3475
- children: [/* @__PURE__ */ N(v, {
3486
+ children: [/* @__PURE__ */ P(v, {
3476
3487
  value: d,
3477
3488
  onValueChange: S,
3478
- children: [/* @__PURE__ */ M(g, {
3489
+ children: [/* @__PURE__ */ N(g, {
3479
3490
  id: y,
3480
3491
  className: "flex-1",
3481
- children: /* @__PURE__ */ M(c, { placeholder: h("editor.selectNodeGroup.noGroup") })
3482
- }), /* @__PURE__ */ M(k, { children: /* @__PURE__ */ N(A, { children: [/* @__PURE__ */ M(b, {
3492
+ children: /* @__PURE__ */ N(c, { placeholder: h("editor.selectNodeGroup.noGroup") })
3493
+ }), /* @__PURE__ */ N(k, { children: /* @__PURE__ */ P(A, { children: [/* @__PURE__ */ N(b, {
3483
3494
  value: "none",
3484
3495
  children: h("editor.selectNodeGroup.noGroup")
3485
- }), o.map((e) => /* @__PURE__ */ M(b, {
3496
+ }), o.map((e) => /* @__PURE__ */ N(b, {
3486
3497
  value: e.id,
3487
3498
  children: e.data.label?.en ? String(e.data.label?.en) : e.id
3488
3499
  }, e.id))] }) })]
3489
- }), /* @__PURE__ */ N(le, {
3500
+ }), /* @__PURE__ */ P(le, {
3490
3501
  open: n,
3491
3502
  onOpenChange: r,
3492
- children: [/* @__PURE__ */ M(u, {
3503
+ children: [/* @__PURE__ */ N(u, {
3493
3504
  asChild: !0,
3494
- children: /* @__PURE__ */ M(p, {
3505
+ children: /* @__PURE__ */ N(p, {
3495
3506
  variant: "outline",
3496
3507
  size: "icon",
3497
3508
  title: "Create a new group",
3498
- children: /* @__PURE__ */ M(nt, { className: "h-4 w-4" })
3509
+ children: /* @__PURE__ */ N(tt, { className: "h-4 w-4" })
3499
3510
  })
3500
- }), /* @__PURE__ */ M(_, {
3511
+ }), /* @__PURE__ */ N(_, {
3501
3512
  className: "w-80",
3502
3513
  align: "end",
3503
3514
  disablePortal: !0,
3504
- children: /* @__PURE__ */ N("div", {
3515
+ children: /* @__PURE__ */ P("div", {
3505
3516
  className: "space-y-4",
3506
3517
  children: [
3507
- /* @__PURE__ */ N("div", {
3518
+ /* @__PURE__ */ P("div", {
3508
3519
  className: "space-y-2",
3509
- children: [/* @__PURE__ */ M("h4", {
3520
+ children: [/* @__PURE__ */ N("h4", {
3510
3521
  className: "font-medium leading-none",
3511
3522
  children: h("editor.selectNodeGroup.newGroup")
3512
- }), /* @__PURE__ */ M("p", {
3523
+ }), /* @__PURE__ */ N("p", {
3513
3524
  className: "text-muted-foreground text-sm",
3514
3525
  children: h("editor.selectNodeGroup.newGroupDescription")
3515
3526
  })]
3516
3527
  }),
3517
- /* @__PURE__ */ N("div", {
3528
+ /* @__PURE__ */ P("div", {
3518
3529
  className: "space-y-2",
3519
- children: [/* @__PURE__ */ M(l, {
3530
+ children: [/* @__PURE__ */ N(l, {
3520
3531
  htmlFor: x,
3521
3532
  children: h("editor.selectNodeGroup.groupName")
3522
- }), /* @__PURE__ */ M(m, {
3533
+ }), /* @__PURE__ */ N(m, {
3523
3534
  autoFocus: !0,
3524
3535
  id: x,
3525
3536
  value: e,
@@ -3530,14 +3541,14 @@ var $n = () => {
3530
3541
  }
3531
3542
  })]
3532
3543
  }),
3533
- /* @__PURE__ */ N("div", {
3544
+ /* @__PURE__ */ P("div", {
3534
3545
  className: "flex justify-end gap-2",
3535
- children: [/* @__PURE__ */ M(p, {
3546
+ children: [/* @__PURE__ */ N(p, {
3536
3547
  variant: "outline",
3537
3548
  size: "sm",
3538
3549
  onClick: () => r(!1),
3539
3550
  children: "Cancel"
3540
- }), /* @__PURE__ */ M(p, {
3551
+ }), /* @__PURE__ */ N(p, {
3541
3552
  size: "sm",
3542
3553
  onClick: C,
3543
3554
  disabled: !e.trim(),
@@ -3551,19 +3562,19 @@ var $n = () => {
3551
3562
  })]
3552
3563
  });
3553
3564
  }, nr = () => {
3554
- let { selectedNode: e } = $(), { updateSelectedNodeType: t } = q(), n = e?.type || "", r = i(e), a = G(), o = yt();
3555
- return /* @__PURE__ */ N(A, { children: [/* @__PURE__ */ M(ue, {
3565
+ let { selectedNode: e } = $(), { updateSelectedNodeType: t } = q(), n = e?.type || "", r = i(e), a = G(), o = vt();
3566
+ return /* @__PURE__ */ P(A, { children: [/* @__PURE__ */ N(ue, {
3556
3567
  htmlFor: o,
3557
3568
  children: a("editor.selectNodeType.nodeType")
3558
- }), /* @__PURE__ */ N(v, {
3569
+ }), /* @__PURE__ */ P(v, {
3559
3570
  value: n,
3560
3571
  onValueChange: (e) => t(e),
3561
3572
  disabled: r,
3562
- children: [/* @__PURE__ */ M(g, {
3573
+ children: [/* @__PURE__ */ N(g, {
3563
3574
  className: "w-full",
3564
3575
  id: o,
3565
- children: /* @__PURE__ */ M(c, { placeholder: a("editor.selectNodeType.nodeType") })
3566
- }), /* @__PURE__ */ M(k, { children: /* @__PURE__ */ M(A, { children: Object.keys(yn).filter((e) => r ? e === "group" : e !== "group").map((e) => /* @__PURE__ */ M(b, {
3576
+ children: /* @__PURE__ */ N(c, { placeholder: a("editor.selectNodeType.nodeType") })
3577
+ }), /* @__PURE__ */ N(k, { children: /* @__PURE__ */ N(A, { children: Object.keys(cn).filter((e) => r ? e === "group" : e !== "group").map((e) => /* @__PURE__ */ N(b, {
3567
3578
  value: e,
3568
3579
  children: a(`editor.selectNodeType.options.${e}`)
3569
3580
  }, e)) }) })]
@@ -3572,32 +3583,32 @@ var $n = () => {
3572
3583
  //#endregion
3573
3584
  //#region src/shared/components/ui/sheet.tsx
3574
3585
  function rr({ ...e }) {
3575
- return /* @__PURE__ */ M(U.Root, {
3586
+ return /* @__PURE__ */ N(U.Root, {
3576
3587
  "data-slot": "sheet",
3577
3588
  ...e
3578
3589
  });
3579
3590
  }
3580
3591
  function ir({ ...e }) {
3581
- return /* @__PURE__ */ M(U.Portal, {
3592
+ return /* @__PURE__ */ N(U.Portal, {
3582
3593
  "data-slot": "sheet-portal",
3583
3594
  ...e
3584
3595
  });
3585
3596
  }
3586
3597
  function ar({ className: e, ...t }) {
3587
- return /* @__PURE__ */ M(U.Overlay, {
3598
+ return /* @__PURE__ */ N(U.Overlay, {
3588
3599
  "data-slot": "sheet-overlay",
3589
3600
  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),
3590
3601
  ...t
3591
3602
  });
3592
3603
  }
3593
3604
  function or({ className: e, children: t, side: n = "right", ...r }) {
3594
- return /* @__PURE__ */ N(ir, { children: [/* @__PURE__ */ M(ar, {}), /* @__PURE__ */ N(U.Content, {
3605
+ return /* @__PURE__ */ P(ir, { children: [/* @__PURE__ */ N(ar, {}), /* @__PURE__ */ P(U.Content, {
3595
3606
  "data-slot": "sheet-content",
3596
3607
  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),
3597
3608
  ...r,
3598
- children: [t, /* @__PURE__ */ N(U.Close, {
3609
+ children: [t, /* @__PURE__ */ P(U.Close, {
3599
3610
  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",
3600
- children: [/* @__PURE__ */ M(mt, { className: "size-4" }), /* @__PURE__ */ M("span", {
3611
+ children: [/* @__PURE__ */ N(pt, { className: "size-4" }), /* @__PURE__ */ N("span", {
3601
3612
  className: "sr-only",
3602
3613
  children: "Close"
3603
3614
  })]
@@ -3605,28 +3616,28 @@ function or({ className: e, children: t, side: n = "right", ...r }) {
3605
3616
  })] });
3606
3617
  }
3607
3618
  function sr({ className: e, ...t }) {
3608
- return /* @__PURE__ */ M("div", {
3619
+ return /* @__PURE__ */ N("div", {
3609
3620
  "data-slot": "sheet-header",
3610
3621
  className: d("flex flex-col gap-1.5 p-4", e),
3611
3622
  ...t
3612
3623
  });
3613
3624
  }
3614
3625
  function cr({ className: e, ...t }) {
3615
- return /* @__PURE__ */ M("div", {
3626
+ return /* @__PURE__ */ N("div", {
3616
3627
  "data-slot": "sheet-footer",
3617
3628
  className: d("mt-auto flex flex-col gap-2 p-4", e),
3618
3629
  ...t
3619
3630
  });
3620
3631
  }
3621
3632
  function lr({ className: e, ...t }) {
3622
- return /* @__PURE__ */ M(U.Title, {
3633
+ return /* @__PURE__ */ N(U.Title, {
3623
3634
  "data-slot": "sheet-title",
3624
3635
  className: d("font-semibold text-foreground", e),
3625
3636
  ...t
3626
3637
  });
3627
3638
  }
3628
3639
  function ur({ className: e, ...t }) {
3629
- return /* @__PURE__ */ M(U.Description, {
3640
+ return /* @__PURE__ */ N(U.Description, {
3630
3641
  "data-slot": "sheet-description",
3631
3642
  className: d("text-muted-foreground text-sm", e),
3632
3643
  ...t
@@ -3635,62 +3646,58 @@ function ur({ className: e, ...t }) {
3635
3646
  //#endregion
3636
3647
  //#region src/editor/features/TreegeEditor/sheets/NodeActionsSheet.tsx
3637
3648
  var dr = () => {
3638
- let { selectedNode: e } = $(), { clearSelection: r, deleteSelectedNode: a } = q(), { isNodeSheetOpen: o, setIsNodeSheetOpen: c } = W(), l = G(), u = l(e?.data?.label), d = () => {
3639
- c(!1), r();
3649
+ let { selectedNode: e } = $(), { clearSelection: r } = q(), { isNodeSheetOpen: a, setIsNodeSheetOpen: o, openDeleteNodeConfirmation: c } = W(), l = G(), u = l(e?.data?.label), d = () => {
3650
+ o(!1), r();
3640
3651
  };
3641
- return /* @__PURE__ */ M(rr, {
3642
- open: o && !!e,
3652
+ return /* @__PURE__ */ N(rr, {
3653
+ open: a && !!e,
3643
3654
  onOpenChange: (e) => {
3644
3655
  e || d();
3645
3656
  },
3646
- children: /* @__PURE__ */ N(or, {
3657
+ children: /* @__PURE__ */ P(or, {
3647
3658
  className: "flex flex-col gap-0",
3648
3659
  children: [
3649
- /* @__PURE__ */ N(sr, { children: [/* @__PURE__ */ N(lr, { children: [
3660
+ /* @__PURE__ */ P(sr, { children: [/* @__PURE__ */ P(lr, { children: [
3650
3661
  l("editor.nodeActionsSheet.editNode"),
3651
3662
  " ",
3652
- /* @__PURE__ */ M("span", {
3663
+ /* @__PURE__ */ N("span", {
3653
3664
  className: "font-light text-muted-foreground text-xs",
3654
3665
  children: e?.id
3655
3666
  })
3656
- ] }), /* @__PURE__ */ M(ur, { children: u || "\xA0" })] }),
3657
- /* @__PURE__ */ M(Nt, {
3667
+ ] }), /* @__PURE__ */ N(ur, { children: u || "\xA0" })] }),
3668
+ /* @__PURE__ */ N(Nt, {
3658
3669
  className: "flex min-h-0 flex-1 flex-col px-4",
3659
- children: /* @__PURE__ */ N("div", {
3670
+ children: /* @__PURE__ */ P("div", {
3660
3671
  className: "space-y-6 py-4",
3661
3672
  children: [
3662
- /* @__PURE__ */ M(nr, {}),
3663
- /* @__PURE__ */ M(tr, {}),
3664
- /* @__PURE__ */ M(se, {}),
3665
- s(e) && /* @__PURE__ */ M($n, {}),
3666
- n(e) && /* @__PURE__ */ M(er, {}),
3667
- t(e) && /* @__PURE__ */ M(Nn, {}),
3668
- i(e) && /* @__PURE__ */ M(Pn, {})
3673
+ /* @__PURE__ */ N(nr, {}),
3674
+ /* @__PURE__ */ N(tr, {}),
3675
+ /* @__PURE__ */ N(se, {}),
3676
+ s(e) && /* @__PURE__ */ N($n, {}),
3677
+ n(e) && /* @__PURE__ */ N(er, {}),
3678
+ t(e) && /* @__PURE__ */ N(Nn, {}),
3679
+ i(e) && /* @__PURE__ */ N(Pn, {})
3669
3680
  ]
3670
3681
  })
3671
3682
  }),
3672
- /* @__PURE__ */ M(cr, {
3683
+ /* @__PURE__ */ N(cr, {
3673
3684
  className: "flex items-end border-t",
3674
- children: /* @__PURE__ */ N(Rt, { children: [/* @__PURE__ */ M(zt, {
3675
- asChild: !0,
3676
- children: /* @__PURE__ */ M(p, {
3677
- variant: "ghost",
3678
- size: "icon",
3679
- children: /* @__PURE__ */ M(lt, {})
3680
- })
3681
- }), /* @__PURE__ */ N(Ht, { children: [/* @__PURE__ */ N(Ut, { children: [/* @__PURE__ */ M(Gt, { children: l("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ M(Kt, { children: l("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ N(Wt, { children: [/* @__PURE__ */ M(Jt, { children: l("common.cancel") }), /* @__PURE__ */ M(qt, {
3685
+ children: /* @__PURE__ */ N(p, {
3686
+ variant: "ghost",
3687
+ size: "icon",
3682
3688
  onClick: () => {
3683
- a(), d();
3689
+ e && c(e.id);
3684
3690
  },
3685
- children: l("common.delete")
3686
- })] })] })] })
3691
+ "aria-label": l("editor.nodeActionsSheet.deleteNode"),
3692
+ children: /* @__PURE__ */ N(ct, {})
3693
+ })
3687
3694
  })
3688
3695
  ]
3689
3696
  })
3690
3697
  });
3691
3698
  }, fr = ({ ...e }) => {
3692
3699
  let { theme: t = "system" } = Et();
3693
- return /* @__PURE__ */ M(wt, {
3700
+ return /* @__PURE__ */ N(wt, {
3694
3701
  theme: t,
3695
3702
  className: "toaster group",
3696
3703
  style: {
@@ -3701,12 +3708,12 @@ var dr = () => {
3701
3708
  ...e
3702
3709
  });
3703
3710
  }, pr = ({ flow: e, onExportJson: t, onSave: n, theme: r, className: i }) => {
3704
- let { onConnect: a, onConnectEnd: o, onEdgesDelete: s, isValidConnection: c } = on();
3705
- return /* @__PURE__ */ N(xe, {
3711
+ let { onConnect: a, onConnectEnd: o, onEdgesDelete: s, isValidConnection: c } = Jt();
3712
+ return /* @__PURE__ */ P(xe, {
3706
3713
  fitView: !0,
3707
3714
  colorMode: r,
3708
3715
  selectNodesOnDrag: !1,
3709
- nodeTypes: yn,
3716
+ nodeTypes: cn,
3710
3717
  edgeTypes: Ft,
3711
3718
  defaultEdges: e?.edges || [],
3712
3719
  defaultNodes: e?.nodes || [],
@@ -3716,31 +3723,32 @@ var dr = () => {
3716
3723
  isValidConnection: c,
3717
3724
  className: d(i, "treege"),
3718
3725
  children: [
3719
- /* @__PURE__ */ M(de, {
3726
+ /* @__PURE__ */ N(de, {
3720
3727
  gap: 10,
3721
3728
  variant: fe.Dots
3722
3729
  }),
3723
- /* @__PURE__ */ M(jn, {
3730
+ /* @__PURE__ */ N(jn, {
3724
3731
  onExportJson: t,
3725
3732
  onSave: n
3726
3733
  }),
3727
- /* @__PURE__ */ M(kt, { theme: r }),
3728
- /* @__PURE__ */ M(_e, {}),
3729
- /* @__PURE__ */ M(me, {}),
3730
- /* @__PURE__ */ M(dr, {})
3734
+ /* @__PURE__ */ N(kt, { theme: r }),
3735
+ /* @__PURE__ */ N(_e, {}),
3736
+ /* @__PURE__ */ N(me, {}),
3737
+ /* @__PURE__ */ N(dr, {}),
3738
+ /* @__PURE__ */ N(yn, {})
3731
3739
  ]
3732
3740
  });
3733
- }, mr = ({ flow: e, onExportJson: t, onSave: n, theme: r = "dark", language: i = "en", aiConfig: a }) => /* @__PURE__ */ M(o, {
3741
+ }, mr = ({ flow: e, onExportJson: t, onSave: n, theme: r = "dark", language: i = "en", aiConfig: a }) => /* @__PURE__ */ N(o, {
3734
3742
  defaultTheme: r,
3735
3743
  storageKey: "treege-editor-theme",
3736
3744
  theme: r,
3737
- children: /* @__PURE__ */ N(Mt, {
3745
+ children: /* @__PURE__ */ P(Mt, {
3738
3746
  value: {
3739
3747
  aiConfig: a,
3740
3748
  flowId: e?.id,
3741
3749
  language: i
3742
3750
  },
3743
- children: [/* @__PURE__ */ M(fr, { position: "bottom-center" }), /* @__PURE__ */ M(Se, { children: /* @__PURE__ */ M(pr, {
3751
+ children: [/* @__PURE__ */ N(fr, { position: "bottom-center" }), /* @__PURE__ */ N(Se, { children: /* @__PURE__ */ N(pr, {
3744
3752
  onExportJson: t,
3745
3753
  onSave: n,
3746
3754
  flow: e,