import{r as l,y as J,x as j,cd as Pe,ao as Ye,A as ee,ag as te,U as Qe,ce as Ke,bm as Ze,c0 as Je,br as et,u as $,b as tt,aq as ot,g as Ee,m as ce,bP as nt,a9 as Te,ap as pe,a as ze,a4 as ge,bz as rt,bq as je,d as De,am as Ne,bR as it,aa as at,a3 as be,ad as lt,ac as st,c6 as dt,aZ as ct,Z as ut,cf as mt,bs as pt,b1 as gt,bt,S as $t,B as $e,q as ue,D as vt,E as He,Q as Me,f as F,F as ft,j as w,e as R,bI as Re,cg as ht,n as ve,k as Ae,aU as Ct}from"./main-few-lands-burn.js";import{D as St,M as It,u as yt,S as wt,E as xt,R as _e,a as Bt,b as Ot}from"./index-CyNIBchZ.js";import{g as Pt,M as Et}from"./index-CB2KTxNj.js";import{D as Q,E as Tt,F as zt,G as jt,H as Dt,u as Nt,R as fe,C as Y,b as he,P as Ce,I as Se}from"./index-ubWv-fhI.js";import{i as Ie,S as se}from"./index-BcDJZYeX.js";import{c as Fe}from"./mutative-C6xjlr6O.js";import{S as Le,u as Ht}from"./usedebou-9GKFiQAC.js";import{P as Mt,g as Rt}from"./tabpanel-DvU0ks7q.js";import{u as At}from"./useflows-BpG3C9m1.js";import{u as _t}from"./useflows-BbAh-zeS.js";const Ft=t=>typeof t!="object"&&typeof t!="function"||t===null,K=l.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var Lt=function(t,o){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&o.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)o.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(e[r[n]]=t[r[n]]);return e};const ke=t=>{const{prefixCls:o,className:e,dashed:r}=t,n=Lt(t,["prefixCls","className","dashed"]),{getPrefixCls:a}=l.useContext(J),i=a("menu",o),s=j({[`${i}-item-divider-dashed`]:!!r},e);return l.createElement(St,Object.assign({className:s},n))},We=t=>{var o;const{className:e,children:r,icon:n,title:a,danger:i,extra:s}=t,{prefixCls:d,firstLevel:p,direction:g,disableMenuItemTitleTooltip:v,inlineCollapsed:u}=l.useContext(K),b=z=>{const S=r?.[0],B=l.createElement("span",{className:j(`${d}-title-content`,{[`${d}-title-content-with-extra`]:!!s||s===0})},r);return(!n||l.isValidElement(r)&&r.type==="span")&&r&&z&&p&&typeof S=="string"?l.createElement("div",{className:`${d}-inline-collapsed-noicon`},S.charAt(0)):B},{siderCollapsed:c}=l.useContext(Pe);let m=a;typeof a>"u"?m=p?r:"":a===!1&&(m="");const h={title:m};!c&&!u&&(h.title=null,h.open=!1);const C=Ye(r).length;let x=l.createElement(It,Object.assign({},ee(t,["title","icon","danger"]),{className:j({[`${d}-item-danger`]:i,[`${d}-item-only-child`]:(n?C+1:C)===1},e),title:typeof a=="string"?a:void 0}),te(n,{className:j(l.isValidElement(n)?(o=n.props)===null||o===void 0?void 0:o.className:"",`${d}-item-icon`)}),b(u));return v||(x=l.createElement(Qe,Object.assign({},h,{placement:g==="rtl"?"left":"right",classNames:{root:`${d}-inline-collapsed-tooltip`}}),x)),x};var kt=function(t,o){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&o.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)o.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(e[r[n]]=t[r[n]]);return e};const Z=l.createContext(null),Wt=l.forwardRef((t,o)=>{const{children:e}=t,r=kt(t,["children"]),n=l.useContext(Z),a=l.useMemo(()=>Object.assign(Object.assign({},n),r),[n,r.prefixCls,r.mode,r.selectable,r.rootClassName]),i=Ke(e),s=Ze(o,i?Je(e):null);return l.createElement(Z.Provider,{value:a},l.createElement(et,{space:!0},i?l.cloneElement(e,{ref:s}):e))}),qt=t=>{const{componentCls:o,motionDurationSlow:e,horizontalLineHeight:r,colorSplit:n,lineWidth:a,lineType:i,itemPaddingInline:s}=t;return{[`${o}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${$(a)} ${i} ${n}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${o}-item, ${o}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${o}-item:hover,
        > ${o}-item-active,
        > ${o}-submenu ${o}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${o}-item, ${o}-submenu-title`]:{transition:[`border-color ${e}`,`background ${e}`].join(",")},[`${o}-submenu-arrow`]:{display:"none"}}}},Xt=t=>{let{componentCls:o,menuArrowOffset:e,calc:r}=t;return{[`${o}-rtl`]:{direction:"rtl"},[`${o}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${o}-rtl${o}-vertical,
    ${o}-submenu-rtl ${o}-vertical`]:{[`${o}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${$(r(e).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${$(e)})`}}}}},ye=t=>Object.assign({},tt(t)),we=(t,o)=>{const{componentCls:e,itemColor:r,itemSelectedColor:n,subMenuItemSelectedColor:a,groupTitleColor:i,itemBg:s,subMenuItemBg:d,itemSelectedBg:p,activeBarHeight:g,activeBarWidth:v,activeBarBorderWidth:u,motionDurationSlow:b,motionEaseInOut:c,motionEaseOut:m,itemPaddingInline:h,motionDurationMid:C,itemHoverColor:x,lineType:z,colorSplit:S,itemDisabledColor:B,dangerItemColor:E,dangerItemHoverColor:N,dangerItemSelectedColor:T,dangerItemActiveBg:f,dangerItemSelectedBg:O,popupBg:H,itemHoverBg:D,itemActiveBg:y,menuSubMenuBg:I,horizontalItemSelectedColor:A,horizontalItemSelectedBg:k,horizontalItemBorderRadius:W,horizontalItemHoverBg:_}=t;return{[`${e}-${o}, ${e}-${o} > ${e}`]:{color:r,background:s,[`&${e}-root:focus-visible`]:Object.assign({},ye(t)),[`${e}-item`]:{"&-group-title, &-extra":{color:i}},[`${e}-submenu-selected > ${e}-submenu-title`]:{color:a},[`${e}-item, ${e}-submenu-title`]:{color:r,[`&:not(${e}-item-disabled):focus-visible`]:Object.assign({},ye(t))},[`${e}-item-disabled, ${e}-submenu-disabled`]:{color:`${B} !important`},[`${e}-item:not(${e}-item-selected):not(${e}-submenu-selected)`]:{[`&:hover, > ${e}-submenu-title:hover`]:{color:x}},[`&:not(${e}-horizontal)`]:{[`${e}-item:not(${e}-item-selected)`]:{"&:hover":{backgroundColor:D},"&:active":{backgroundColor:y}},[`${e}-submenu-title`]:{"&:hover":{backgroundColor:D},"&:active":{backgroundColor:y}}},[`${e}-item-danger`]:{color:E,[`&${e}-item:hover`]:{[`&:not(${e}-item-selected):not(${e}-submenu-selected)`]:{color:N}},[`&${e}-item:active`]:{background:f}},[`${e}-item a`]:{"&, &:hover":{color:"inherit"}},[`${e}-item-selected`]:{color:n,[`&${e}-item-danger`]:{color:T},"a, a:hover":{color:"inherit"}},[`& ${e}-item-selected`]:{backgroundColor:p,[`&${e}-item-danger`]:{backgroundColor:O}},[`&${e}-submenu > ${e}`]:{backgroundColor:I},[`&${e}-popup > ${e}`]:{backgroundColor:H},[`&${e}-submenu-popup > ${e}`]:{backgroundColor:H},[`&${e}-horizontal`]:Object.assign(Object.assign({},o==="dark"?{borderBottom:0}:{}),{[`> ${e}-item, > ${e}-submenu`]:{top:u,marginTop:t.calc(u).mul(-1).equal(),marginBottom:0,borderRadius:W,"&::after":{position:"absolute",insetInline:h,bottom:0,borderBottom:`${$(g)} solid transparent`,transition:`border-color ${b} ${c}`,content:'""'},"&:hover, &-active, &-open":{background:_,"&::after":{borderBottomWidth:g,borderBottomColor:A}},"&-selected":{color:A,backgroundColor:k,"&:hover":{backgroundColor:k},"&::after":{borderBottomWidth:g,borderBottomColor:A}}}}),[`&${e}-root`]:{[`&${e}-inline, &${e}-vertical`]:{borderInlineEnd:`${$(u)} ${z} ${S}`}},[`&${e}-inline`]:{[`${e}-sub${e}-inline`]:{background:d},[`${e}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${$(v)} solid ${n}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${C} ${m}`,`opacity ${C} ${m}`].join(","),content:'""'},[`&${e}-item-danger`]:{"&::after":{borderInlineEndColor:T}}},[`${e}-selected, ${e}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${C} ${c}`,`opacity ${C} ${c}`].join(",")}}}}}},xe=t=>{const{componentCls:o,itemHeight:e,itemMarginInline:r,padding:n,menuArrowSize:a,marginXS:i,itemMarginBlock:s,itemWidth:d,itemPaddingInline:p}=t,g=t.calc(a).add(n).add(i).equal();return{[`${o}-item`]:{position:"relative",overflow:"hidden"},[`${o}-item, ${o}-submenu-title`]:{height:e,lineHeight:$(e),paddingInline:p,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:d},[`> ${o}-item,
            > ${o}-submenu > ${o}-submenu-title`]:{height:e,lineHeight:$(e)},[`${o}-item-group-list ${o}-submenu-title,
            ${o}-submenu-title`]:{paddingInlineEnd:g}}},Ut=t=>{const{componentCls:o,iconCls:e,itemHeight:r,colorTextLightSolid:n,dropdownWidth:a,controlHeightLG:i,motionEaseOut:s,paddingXL:d,itemMarginInline:p,fontSizeLG:g,motionDurationFast:v,motionDurationSlow:u,paddingXS:b,boxShadowSecondary:c,collapsedWidth:m,collapsedIconSize:h}=t,C={height:r,lineHeight:$(r),listStylePosition:"inside",listStyleType:"disc"};return[{[o]:{"&-inline, &-vertical":Object.assign({[`&${o}-root`]:{boxShadow:"none"}},xe(t))},[`${o}-submenu-popup`]:{[`${o}-vertical`]:Object.assign(Object.assign({},xe(t)),{boxShadow:c})}},{[`${o}-submenu-popup ${o}-vertical${o}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${$(t.calc(i).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${o}-inline`]:{width:"100%",[`&${o}-root`]:{[`${o}-item, ${o}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${u}`,`background ${u}`,`padding ${v} ${s}`].join(","),[`> ${o}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${o}-sub${o}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${o}-submenu > ${o}-submenu-title`]:C,[`& ${o}-item-group-title`]:{paddingInlineStart:d}},[`${o}-item`]:C}},{[`${o}-inline-collapsed`]:{width:m,[`&${o}-root`]:{[`${o}-item, ${o}-submenu ${o}-submenu-title`]:{[`> ${o}-inline-collapsed-noicon`]:{fontSize:g,textAlign:"center"}}},[`> ${o}-item,
          > ${o}-item-group > ${o}-item-group-list > ${o}-item,
          > ${o}-item-group > ${o}-item-group-list > ${o}-submenu > ${o}-submenu-title,
          > ${o}-submenu > ${o}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${$(t.calc(h).div(2).equal())} - ${$(p)})`,textOverflow:"clip",[`
            ${o}-submenu-arrow,
            ${o}-submenu-expand-icon
          `]:{opacity:0},[`${o}-item-icon, ${e}`]:{margin:0,fontSize:h,lineHeight:$(r),"+ span":{display:"inline-block",opacity:0}}},[`${o}-item-icon, ${e}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${o}-item-icon, ${e}`]:{display:"none"},"a, a:hover":{color:n}},[`${o}-item-group-title`]:Object.assign(Object.assign({},ot),{paddingInline:b})}}]},Be=t=>{const{componentCls:o,motionDurationSlow:e,motionDurationMid:r,motionEaseInOut:n,motionEaseOut:a,iconCls:i,iconSize:s,iconMarginInlineEnd:d}=t;return{[`${o}-item, ${o}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${e}`,`background ${e}`,`padding calc(${e} + 0.1s) ${n}`].join(","),[`${o}-item-icon, ${i}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${a}`,`margin ${e} ${n}`,`color ${e}`].join(","),"+ span":{marginInlineStart:d,opacity:1,transition:[`opacity ${e} ${n}`,`margin ${e}`,`color ${e}`].join(",")}},[`${o}-item-icon`]:Object.assign({},rt()),[`&${o}-item-only-child`]:{[`> ${i}, > ${o}-item-icon`]:{marginInlineEnd:0}}},[`${o}-item-disabled, ${o}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${o}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Oe=t=>{const{componentCls:o,motionDurationSlow:e,motionEaseInOut:r,borderRadius:n,menuArrowSize:a,menuArrowOffset:i}=t;return{[`${o}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:t.margin,width:a,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${e} ${r}, opacity ${e}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:t.calc(a).mul(.6).equal(),height:t.calc(a).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:n,transition:[`background ${e} ${r}`,`transform ${e} ${r}`,`top ${e} ${r}`,`color ${e} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${$(t.calc(i).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${$(i)})`}}}}},Vt=t=>{const{antCls:o,componentCls:e,fontSize:r,motionDurationSlow:n,motionDurationMid:a,motionEaseInOut:i,paddingXS:s,padding:d,colorSplit:p,lineWidth:g,zIndexPopup:v,borderRadiusLG:u,subMenuItemBorderRadius:b,menuArrowSize:c,menuArrowOffset:m,lineType:h,groupTitleLineHeight:C,groupTitleFontSize:x}=t;return[{"":{[e]:Object.assign(Object.assign({},pe()),{"&-hidden":{display:"none"}})},[`${e}-submenu-hidden`]:{display:"none"}},{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ze(t)),pe()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${n} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${e}-item`]:{flex:"none"}},[`${e}-item, ${e}-submenu, ${e}-submenu-title`]:{borderRadius:t.itemBorderRadius},[`${e}-item-group-title`]:{padding:`${$(s)} ${$(d)}`,fontSize:x,lineHeight:C,transition:`all ${n}`},[`&-horizontal ${e}-submenu`]:{transition:[`border-color ${n} ${i}`,`background ${n} ${i}`].join(",")},[`${e}-submenu, ${e}-submenu-inline`]:{transition:[`border-color ${n} ${i}`,`background ${n} ${i}`,`padding ${a} ${i}`].join(",")},[`${e}-submenu ${e}-sub`]:{cursor:"initial",transition:[`background ${n} ${i}`,`padding ${n} ${i}`].join(",")},[`${e}-title-content`]:{transition:`color ${n}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${o}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${e}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:t.padding}},[`${e}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${e}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:p,borderStyle:h,borderWidth:0,borderTopWidth:g,marginBlock:g,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Be(t)),{[`${e}-item-group`]:{[`${e}-item-group-list`]:{margin:0,padding:0,[`${e}-item, ${e}-submenu-title`]:{paddingInline:`${$(t.calc(r).mul(2).equal())} ${$(d)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:v,borderRadius:u,boxShadow:"none",transformOrigin:"0 0",[`&${e}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${e}`]:Object.assign(Object.assign(Object.assign({borderRadius:u},Be(t)),Oe(t)),{[`${e}-item, ${e}-submenu > ${e}-submenu-title`]:{borderRadius:b},[`${e}-submenu-title::after`]:{transition:`transform ${n} ${i}`}})},"\n          &-placement-leftTop,\n          &-placement-bottomRight,\n          ":{transformOrigin:"100% 0"},"\n          &-placement-leftBottom,\n          &-placement-topRight,\n          ":{transformOrigin:"100% 100%"},"\n          &-placement-rightBottom,\n          &-placement-topLeft,\n          ":{transformOrigin:"0 100%"},"\n          &-placement-bottomLeft,\n          &-placement-rightTop,\n          ":{transformOrigin:"0 0"},"\n          &-placement-leftTop,\n          &-placement-leftBottom\n          ":{paddingInlineEnd:t.paddingXS},"\n          &-placement-rightTop,\n          &-placement-rightBottom\n          ":{paddingInlineStart:t.paddingXS},"\n          &-placement-topRight,\n          &-placement-topLeft\n          ":{paddingBottom:t.paddingXS},"\n          &-placement-bottomRight,\n          &-placement-bottomLeft\n          ":{paddingTop:t.paddingXS}}}),Oe(t)),{[`&-inline-collapsed ${e}-submenu-arrow,
        &-inline ${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${$(m)})`},"&::after":{transform:`rotate(45deg) translateX(${$(t.calc(m).mul(-1).equal())})`}},[`${e}-submenu-open${e}-submenu-inline > ${e}-submenu-title > ${e}-submenu-arrow`]:{transform:`translateY(${$(t.calc(c).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${$(t.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${$(m)})`}}})},{[`${o}-layout-header`]:{[e]:{lineHeight:"inherit"}}}]},Gt=t=>{var o,e,r;const{colorPrimary:n,colorError:a,colorTextDisabled:i,colorErrorBg:s,colorText:d,colorTextDescription:p,colorBgContainer:g,colorFillAlter:v,colorFillContent:u,lineWidth:b,lineWidthBold:c,controlItemBgActive:m,colorBgTextHover:h,controlHeightLG:C,lineHeight:x,colorBgElevated:z,marginXXS:S,padding:B,fontSize:E,controlHeightSM:N,fontSizeLG:T,colorTextLightSolid:f,colorErrorHover:O}=t,H=(o=t.activeBarWidth)!==null&&o!==void 0?o:0,D=(e=t.activeBarBorderWidth)!==null&&e!==void 0?e:b,y=(r=t.itemMarginInline)!==null&&r!==void 0?r:t.marginXXS,I=new ge(f).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:t.zIndexPopupBase+50,radiusItem:t.borderRadiusLG,itemBorderRadius:t.borderRadiusLG,radiusSubMenuItem:t.borderRadiusSM,subMenuItemBorderRadius:t.borderRadiusSM,colorItemText:d,itemColor:d,colorItemTextHover:d,itemHoverColor:d,colorItemTextHoverHorizontal:n,horizontalItemHoverColor:n,colorGroupTitle:p,groupTitleColor:p,colorItemTextSelected:n,itemSelectedColor:n,subMenuItemSelectedColor:n,colorItemTextSelectedHorizontal:n,horizontalItemSelectedColor:n,colorItemBg:g,itemBg:g,colorItemBgHover:h,itemHoverBg:h,colorItemBgActive:u,itemActiveBg:m,colorSubItemBg:v,subMenuItemBg:v,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:H,colorActiveBarHeight:c,activeBarHeight:c,colorActiveBarBorderSize:b,activeBarBorderWidth:D,colorItemTextDisabled:i,itemDisabledColor:i,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:y,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:C,groupTitleLineHeight:x,collapsedWidth:C*2,popupBg:z,itemMarginBlock:S,itemPaddingInline:B,horizontalLineHeight:`${C*1.15}px`,iconSize:E,iconMarginInlineEnd:N-E,collapsedIconSize:T,groupTitleFontSize:E,darkItemDisabledColor:new ge(f).setA(.25).toRgbString(),darkItemColor:I,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:f,darkItemSelectedBg:n,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:I,darkItemHoverColor:f,darkDangerItemHoverColor:O,darkDangerItemSelectedColor:f,darkDangerItemActiveBg:a,itemWidth:H?`calc(100% + ${D}px)`:`calc(100% - ${y*2}px)`}},Yt=(function(t){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return Ee("Menu",n=>{const{colorBgElevated:a,controlHeightLG:i,fontSize:s,darkItemColor:d,darkDangerItemColor:p,darkItemBg:g,darkSubMenuItemBg:v,darkItemSelectedColor:u,darkItemSelectedBg:b,darkDangerItemSelectedBg:c,darkItemHoverBg:m,darkGroupTitleColor:h,darkItemHoverColor:C,darkItemDisabledColor:x,darkDangerItemHoverColor:z,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:B,popupBg:E,darkPopupBg:N}=n,T=n.calc(s).div(7).mul(5).equal(),f=ce(n,{menuArrowSize:T,menuHorizontalHeight:n.calc(i).mul(1.15).equal(),menuArrowOffset:n.calc(T).mul(.25).equal(),menuSubMenuBg:a,calc:n.calc,popupBg:E}),O=ce(f,{itemColor:d,itemHoverColor:C,groupTitleColor:h,itemSelectedColor:u,itemBg:g,popupBg:N,subMenuItemBg:v,itemActiveBg:"transparent",itemSelectedBg:b,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:m,itemDisabledColor:x,dangerItemColor:p,dangerItemHoverColor:z,dangerItemSelectedColor:S,dangerItemActiveBg:B,dangerItemSelectedBg:c,menuSubMenuBg:v,horizontalItemSelectedColor:u,horizontalItemSelectedBg:b});return[Vt(f),qt(f),Ut(f),we(f,"light"),we(O,"dark"),Xt(f),nt(f),Q(f,"slide-up"),Q(f,"slide-down"),Te(f,"zoom-big")]},Gt,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:e,unitless:{groupTitleLineHeight:!0}})(t,o)}),qe=t=>{var o;const{popupClassName:e,icon:r,title:n,theme:a}=t,i=l.useContext(K),{prefixCls:s,inlineCollapsed:d,theme:p}=i,g=yt();let v;if(!r)v=d&&!g.length&&n&&typeof n=="string"?l.createElement("div",{className:`${s}-inline-collapsed-noicon`},n.charAt(0)):l.createElement("span",{className:`${s}-title-content`},n);else{const c=l.isValidElement(n)&&n.type==="span";v=l.createElement(l.Fragment,null,te(r,{className:j(l.isValidElement(r)?(o=r.props)===null||o===void 0?void 0:o.className:"",`${s}-item-icon`)}),c?n:l.createElement("span",{className:`${s}-title-content`},n))}const u=l.useMemo(()=>Object.assign(Object.assign({},i),{firstLevel:!1}),[i]),[b]=je("Menu");return l.createElement(K.Provider,{value:u},l.createElement(wt,Object.assign({},ee(t,["icon"]),{title:v,popupClassName:j(s,e,`${s}-${a||p}`),popupStyle:Object.assign({zIndex:b},t.popupStyle)})))};var Qt=function(t,o){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&o.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)o.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(e[r[n]]=t[r[n]]);return e};function de(t){return t===null||t===!1}const Kt={item:We,submenu:qe,divider:ke},Zt=l.forwardRef((t,o)=>{var e;const r=l.useContext(Z),n=r||{},{getPrefixCls:a,getPopupContainer:i,direction:s,menu:d}=l.useContext(J),p=a(),{prefixCls:g,className:v,style:u,theme:b="light",expandIcon:c,_internalDisableMenuItemTitleTooltip:m,inlineCollapsed:h,siderCollapsed:C,rootClassName:x,mode:z,selectable:S,onClick:B,overflowedIndicatorPopupClassName:E}=t,N=Qt(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),T=ee(N,["collapsedWidth"]);(e=n.validator)===null||e===void 0||e.call(n,{mode:z});const f=De(function(){var M;B?.apply(void 0,arguments),(M=n.onClick)===null||M===void 0||M.call(n)}),O=n.mode||z,H=S??n.selectable,D=h??C,y={horizontal:{motionName:`${p}-slide-up`},inline:it(p),other:{motionName:`${p}-zoom-big`}},I=a("menu",g||n.prefixCls),A=Ne(I),[k,W,_]=Yt(I,A,!r),U=j(`${I}-${b}`,d?.className,v),L=l.useMemo(()=>{var M,V;if(typeof c=="function"||de(c))return c||null;if(typeof n.expandIcon=="function"||de(n.expandIcon))return n.expandIcon||null;if(typeof d?.expandIcon=="function"||de(d?.expandIcon))return d?.expandIcon||null;const X=(M=c??n?.expandIcon)!==null&&M!==void 0?M:d?.expandIcon;return te(X,{className:j(`${I}-submenu-expand-icon`,l.isValidElement(X)?(V=X.props)===null||V===void 0?void 0:V.className:void 0)})},[c,n?.expandIcon,d?.expandIcon,I]),q=l.useMemo(()=>({prefixCls:I,inlineCollapsed:D||!1,direction:s,firstLevel:!0,theme:b,mode:O,disableMenuItemTitleTooltip:m}),[I,D,s,m,b]);return k(l.createElement(Z.Provider,{value:null},l.createElement(K.Provider,{value:q},l.createElement(xt,Object.assign({getPopupContainer:i,overflowedIndicator:l.createElement(_e,null),overflowedIndicatorPopupClassName:j(I,`${I}-${b}`,E),mode:O,selectable:H,onClick:f},T,{inlineCollapsed:D,style:Object.assign(Object.assign({},d?.style),u),className:U,prefixCls:I,direction:s,defaultMotions:y,expandIcon:L,ref:o,rootClassName:j(x,W,n.rootClassName,_,A),_internalComponents:Kt})))))}),G=l.forwardRef((t,o)=>{const e=l.useRef(null),r=l.useContext(Pe);return l.useImperativeHandle(o,()=>({menu:e.current,focus:n=>{var a;(a=e.current)===null||a===void 0||a.focus(n)}})),l.createElement(Zt,Object.assign({ref:e},t,r))});G.Item=We;G.SubMenu=qe;G.Divider=ke;G.ItemGroup=Bt;const Jt=t=>{const{componentCls:o,menuCls:e,colorError:r,colorTextLightSolid:n}=t,a=`${e}-item`;return{[`${o}, ${o}-menu-submenu`]:{[`${e} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:r,"&:hover":{color:n,backgroundColor:r}}}}}},eo=t=>{const{componentCls:o,menuCls:e,zIndexPopup:r,dropdownArrowDistance:n,sizePopupArrow:a,antCls:i,iconCls:s,motionDurationMid:d,paddingBlock:p,fontSize:g,dropdownEdgeChildPadding:v,colorTextDisabled:u,fontSizeIcon:b,controlPaddingHorizontal:c,colorBgElevated:m}=t;return[{[o]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:t.calc(a).div(2).sub(n).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${i}-btn`]:{[`& > ${s}-down, & > ${i}-btn-icon > ${s}-down`]:{fontSize:b}},[`${o}-wrap`]:{position:"relative",[`${i}-btn > ${s}-down`]:{fontSize:b},[`${s}-down::before`]:{transition:`transform ${d}`}},[`${o}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n        &-hidden,\n        &-menu-hidden,\n        &-menu-submenu-hidden\n      ":{display:"none"},[`&${i}-slide-down-enter${i}-slide-down-enter-active${o}-placement-bottomLeft,
          &${i}-slide-down-appear${i}-slide-down-appear-active${o}-placement-bottomLeft,
          &${i}-slide-down-enter${i}-slide-down-enter-active${o}-placement-bottom,
          &${i}-slide-down-appear${i}-slide-down-appear-active${o}-placement-bottom,
          &${i}-slide-down-enter${i}-slide-down-enter-active${o}-placement-bottomRight,
          &${i}-slide-down-appear${i}-slide-down-appear-active${o}-placement-bottomRight`]:{animationName:Dt},[`&${i}-slide-up-enter${i}-slide-up-enter-active${o}-placement-topLeft,
          &${i}-slide-up-appear${i}-slide-up-appear-active${o}-placement-topLeft,
          &${i}-slide-up-enter${i}-slide-up-enter-active${o}-placement-top,
          &${i}-slide-up-appear${i}-slide-up-appear-active${o}-placement-top,
          &${i}-slide-up-enter${i}-slide-up-enter-active${o}-placement-topRight,
          &${i}-slide-up-appear${i}-slide-up-appear-active${o}-placement-topRight`]:{animationName:jt},[`&${i}-slide-down-leave${i}-slide-down-leave-active${o}-placement-bottomLeft,
          &${i}-slide-down-leave${i}-slide-down-leave-active${o}-placement-bottom,
          &${i}-slide-down-leave${i}-slide-down-leave-active${o}-placement-bottomRight`]:{animationName:zt},[`&${i}-slide-up-leave${i}-slide-up-leave-active${o}-placement-topLeft,
          &${i}-slide-up-leave${i}-slide-up-leave-active${o}-placement-top,
          &${i}-slide-up-leave${i}-slide-up-leave-active${o}-placement-topRight`]:{animationName:Tt}}},at(t,m,{arrowPlacement:{top:!0,bottom:!0}}),{[`${o} ${e}`]:{position:"relative",margin:0},[`${e}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${o}, ${o}-menu-submenu`]:Object.assign(Object.assign({},ze(t)),{[e]:Object.assign(Object.assign({padding:v,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},be(t)),{"&:empty":{padding:0,boxShadow:"none"},[`${e}-item-group-title`]:{padding:`${$(p)} ${$(c)}`,color:t.colorTextDescription,transition:`all ${d}`},[`${e}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${e}-item-icon`]:{minWidth:g,marginInlineEnd:t.marginXS,fontSize:t.fontSizeSM},[`${e}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${d}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${e}-item-extra`]:{paddingInlineStart:t.padding,marginInlineStart:"auto",fontSize:t.fontSizeSM,color:t.colorTextDescription}},[`${e}-item, ${e}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${$(p)} ${$(c)}`,color:t.colorText,fontWeight:"normal",fontSize:g,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${d}`,borderRadius:t.borderRadiusSM,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},be(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:u,cursor:"not-allowed","&:hover":{color:u,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${$(t.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:t.colorSplit},[`${o}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:t.paddingXS,[`${o}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:t.colorTextDescription,fontSize:b,fontStyle:"normal"}}}),[`${e}-item-group-list`]:{margin:`0 ${$(t.marginXS)}`,padding:0,listStyle:"none"},[`${e}-submenu-title`]:{paddingInlineEnd:t.calc(c).add(t.fontSizeSM).equal()},[`${e}-submenu-vertical`]:{position:"relative"},[`${e}-submenu${e}-submenu-disabled ${o}-menu-submenu-title`]:{[`&, ${o}-menu-submenu-arrow-icon`]:{color:u,backgroundColor:m,cursor:"not-allowed"}},[`${e}-submenu-selected ${o}-menu-submenu-title`]:{color:t.colorPrimary}})})},[Q(t,"slide-up"),Q(t,"slide-down"),Ie(t,"move-up"),Ie(t,"move-down"),Te(t,"zoom-big")]]},to=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+50,paddingBlock:(t.controlHeight-t.fontSize*t.lineHeight)/2},lt({contentRadius:t.borderRadiusLG,limitVerticalRadius:!0})),st(t)),oo=Ee("Dropdown",t=>{const{marginXXS:o,sizePopupArrow:e,paddingXXS:r,componentCls:n}=t,a=ce(t,{menuCls:`${n}-menu`,dropdownArrowDistance:t.calc(e).div(2).add(o).equal(),dropdownEdgeChildPadding:r});return[eo(a),Jt(a)]},to,{resetStyle:!1}),oe=t=>{var o;const{menu:e,arrow:r,prefixCls:n,children:a,trigger:i,disabled:s,dropdownRender:d,getPopupContainer:p,overlayClassName:g,rootClassName:v,overlayStyle:u,open:b,onOpenChange:c,visible:m,onVisibleChange:h,mouseEnterDelay:C=.15,mouseLeaveDelay:x=.1,autoAdjustOverflow:z=!0,placement:S="",overlay:B,transitionName:E}=t,{getPopupContainer:N,getPrefixCls:T,direction:f,dropdown:O}=l.useContext(J);dt();const H=l.useMemo(()=>{const P=T();return E!==void 0?E:S.includes("top")?`${P}-slide-down`:`${P}-slide-up`},[T,S,E]),D=l.useMemo(()=>S?S.includes("Center")?S.slice(0,S.indexOf("Center")):S:f==="rtl"?"bottomRight":"bottomLeft",[S,f]),y=T("dropdown",n),I=Ne(y),[A,k,W]=oo(y,I),[,_]=ct(),U=l.Children.only(Ft(a)?l.createElement("span",null,a):a),L=te(U,{className:j(`${y}-trigger`,{[`${y}-rtl`]:f==="rtl"},U.props.className),disabled:(o=U.props.disabled)!==null&&o!==void 0?o:s}),q=s?[]:i,M=!!q?.includes("contextMenu"),[V,X]=ut(!1,{value:b??m}),ne=De(P=>{c?.(P,{source:"trigger"}),h?.(P),X(P)}),re=j(g,v,k,W,I,O?.className,{[`${y}-rtl`]:f==="rtl"}),ie=mt({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:z,offset:_.marginXXS,arrowWidth:r?_.sizePopupArrow:0,borderRadius:_.borderRadius}),ae=l.useCallback(()=>{e?.selectable&&e?.multiple||(c?.(!1,{source:"menu"}),X(!1))},[e?.selectable,e?.multiple]),Ue=()=>{let P;return e?.items?P=l.createElement(G,Object.assign({},e)):typeof B=="function"?P=B():P=B,d&&(P=d(P)),P=l.Children.only(typeof P=="string"?l.createElement("span",null,P):P),l.createElement(Wt,{prefixCls:`${y}-menu`,rootClassName:j(W,I),expandIcon:l.createElement("span",{className:`${y}-menu-submenu-arrow`},l.createElement(gt,{className:`${y}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ae,validator:Ge=>{let{mode:mo}=Ge}},P)},[me,Ve]=je("Dropdown",u?.zIndex);let le=l.createElement(Ot,Object.assign({alignPoint:M},ee(t,["rootClassName"]),{mouseEnterDelay:C,mouseLeaveDelay:x,visible:V,builtinPlacements:ie,arrow:!!r,overlayClassName:re,prefixCls:y,getPopupContainer:p||N,transitionName:H,trigger:q,overlay:Ue,placement:D,onVisibleChange:ne,overlayStyle:Object.assign(Object.assign(Object.assign({},O?.style),u),{zIndex:me})}),L);return me&&(le=l.createElement(pt.Provider,{value:Ve},le)),A(le)},no=Pt(oe,"align",void 0,"dropdown",t=>t),ro=t=>l.createElement(no,Object.assign({},t),l.createElement("span",null));oe._InternalPanelDoNotUseOrYouWillBeFired=ro;var io=function(t,o){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&o.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)o.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(e[r[n]]=t[r[n]]);return e};const Xe=t=>{const{getPopupContainer:o,getPrefixCls:e,direction:r}=l.useContext(J),{prefixCls:n,type:a="default",danger:i,disabled:s,loading:d,onClick:p,htmlType:g,children:v,className:u,menu:b,arrow:c,autoFocus:m,overlay:h,trigger:C,align:x,open:z,onOpenChange:S,placement:B,getPopupContainer:E,href:N,icon:T=l.createElement(_e,null),title:f,buttonsRender:O=ae=>ae,mouseEnterDelay:H,mouseLeaveDelay:D,overlayClassName:y,overlayStyle:I,destroyPopupOnHide:A,dropdownRender:k}=t,W=io(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),_=e("dropdown",n),U=`${_}-button`,L={menu:b,arrow:c,autoFocus:m,align:x,disabled:s,trigger:s?[]:C,onOpenChange:S,getPopupContainer:E||o,mouseEnterDelay:H,mouseLeaveDelay:D,overlayClassName:y,overlayStyle:I,destroyPopupOnHide:A,dropdownRender:k},{compactSize:q,compactItemClassnames:M}=bt(_,r),V=j(U,M,u);"overlay"in t&&(L.overlay=h),"open"in t&&(L.open=z),"placement"in t?L.placement=B:L.placement=r==="rtl"?"bottomLeft":"bottomRight";const X=l.createElement($e,{type:a,danger:i,disabled:s,loading:d,onClick:p,htmlType:g,href:N,title:f},v),ne=l.createElement($e,{type:a,danger:i,icon:T}),[re,ie]=O([X,ne]);return l.createElement($t.Compact,Object.assign({className:V,size:q,block:!0},W),re,l.createElement(oe,Object.assign({},L),ie))};Xe.__ANT_BUTTON=!0;const ao=oe;ao.Button=Xe;function yo(t,o){const[e,r]=l.useState(t);return l.useEffect(()=>{const n=setTimeout(()=>r(t),o);return()=>{clearTimeout(n)}},[t,o]),e}const wo=t=>Array.isArray(t)?t.map(({actions:o,color:e,description:r,logo:n,name:a,slug:i,triggers:s})=>({actions:o||[],appSlug:i,color:e,description:r||"",isCustom:!0,logoUrl:n||"",name:a,slug:i,tags:[a],triggers:s||[],type:"node"})):[];function lo(t){return Nt({enabled:!!t,queryFn:()=>ue(`flow-settings/${t}`,void 0,void 0,"GET"),queryKey:["flow-settings",t],select:o=>o.data})}function so(t){const o=vt();return He({mutationFn:e=>ue("flow-settings/update",{flow_id:t,settings:e}),mutationKey:["update-flow-settings",t],onMutate:async e=>{const r=["flow-settings",t];await o.cancelQueries({queryKey:r});const n=o.getQueryData(r);return o.setQueryData(r,a=>a&&Fe(a,i=>{Object.assign(i.data,e)})),{previousData:n}},onError:(e,r,n)=>{n?.previousData&&o.setQueryData(["flow-settings",t],n.previousData)},onSettled:()=>{o.invalidateQueries({queryKey:["flow-settings",t]})}})}function co({flowId:t}){const{data:o}=lo(t),{error:e,mutateAsync:r}=so(t),{messageApi:n}=l.useContext(Me),a=async(i,s)=>{await r({[i]:s}),n?.success("Flow settings updated")};return F(ft,{children:[F(fe,{className:"mt-4",gutter:20,justify:"space-between",children:[F(Y,{span:16,children:[w(he,{level:5,style:{marginBottom:0},children:R("Background Processing")}),w(Ce,{type:"secondary",children:R("Disable this if your server blocks internal requests. Nodes will execute directly instead of via background queue.")})]}),F(Y,{span:8,children:[w(Le,{checked:o?.background_process??!0,onChange:i=>a("background_process",i)}),e?.data?.["settings.background_process"]&&w(Se,{type:"danger",children:e?.data?.["settings.background_process"][0]})]})]}),F(fe,{className:"mt-4",gutter:20,justify:"space-between",children:[F(Y,{span:16,children:[w(he,{level:5,style:{marginBottom:0},children:R("If Any Node Fail")}),w(Ce,{type:"secondary",children:R("When a node fails in the flow execution process")})]}),F(Y,{span:8,children:[F(se,{onChange:i=>a("onNodeFail",i),status:e?.data?.["settings.onNodeFail"]&&"error",style:{width:"100%"},value:o?.onNodeFail,children:[w(se.Option,{value:"block",children:R("Block execution")}),w(se.Option,{value:"continue",children:R("Continue execution")})]}),e?.data?.["settings.onNodeFail"]&&w(Se,{type:"danger",children:e?.data?.["settings.onNodeFail"][0]})]})]})]})}function xo({flowId:t,isOpen:o,setIsOpen:e}){return w(Et,{destroyOnClose:!0,footer:!1,onCancel:()=>{e(!1)},open:o,title:R("Flow Settings"),width:600,children:w(co,{flowId:t})})}function Bo({className:t,flowId:o}){return w("a",{className:Ae(["link-reset",!ve.IS_PRO&&"cursor-not-allowed",t]),href:ve.IS_PRO?Rt(`pro_flow-export/${o}`):void 0,rel:"noreferrer",children:F("div",{className:"flex items-center gap-1.5",children:[w(Re,{children:w(ht,{})}),R("Export Flow"),w(Mt,{})]})})}function Oo({className:t}){return F("div",{className:Ae(["flex items-center gap-1.5",t]),children:[w(Re,{children:w(Ct,{})}),R("Flow Settings")]})}function uo(){const{data:t,error:o,isError:e,isPending:r,mutateAsync:n}=He({mutationFn:async a=>ue("flows/update",a),mutationKey:["update_flow"]});return{flowUpdateError:o,isFlowUpdateError:e,isFlowUpdating:r,updateFlow:n,updateFlowData:t?.data}}function Po({flowId:t,isChecked:o}){const{setFlows:e}=_t(s=>s.actions),{updateFlow:r}=uo(),{messageApi:n}=l.useContext(Me),a=Ht(s=>{r({flow:{is_active:Number(s)},id:t}),n?.success(o?R("Flow activated."):R("Flow deactivated."))});return w(Le,{checked:o,onChange:(s,d)=>{d.preventDefault(),d.stopPropagation(),At.getState().actions.setMeta({is_active:Number(s)}),e(p=>Fe(p,g=>{const v=g.find(u=>u.id===t);v&&(v.is_active=Number(s))})),a(s)},size:"small"})}export{ao as D,Po as F,G as M,Wt as O,Oo as a,Bo as b,xo as c,yo as d,oe as e,wo as m,uo as u};
