diff --git "a/static/assets/stripPrefix-300c9267.js" "b/static/assets/stripPrefix-300c9267.js" new file mode 100644--- /dev/null +++ "b/static/assets/stripPrefix-300c9267.js" @@ -0,0 +1,19 @@ +import{r as u,k as Bd,C as Qa,c as de,R as V,ar as Rt,p as J,az as Be,_ as ue,n as F,ao as It,ab as Mn,b6 as Kr,e as Xt,bK as jd,d as ei,ax as Cn,aq as W,K as ve,w as Jt,bL as Wd,an as qe,aa as Al,aw as Ho,au as zo,a$ as Ud,al as Fo,o as Bo,aR as Kl,t as Xr,a as Gd,m as Xd,bv as Yd,aS as qd,bq as Zd,a9 as So,am as Yr,ap as Ll,as as ti,at as ni,ac as ri,bM as zi,a6 as Vl,bN as Fi,bO as Bi,bP as ji,av as En,aA as Hl,j as Ne,ak as no,b9 as Jd,bm as Qd,l as Wi,ba as Zt,h as ef,b0 as tf,b1 as nf,b2 as rf}from"./index-351f7d94.js";import{u as en,R as Fn,b as oi,c as of,h as af,m as sf,k as lf,j as cf,P as uf,T as df,i as ff}from"./TextArea-8951d75f.js";import{g as vf,Z as hf,a as pf}from"./routes-17d4ed4d.js";function mf(e){return t=>u.createElement(Bd,{theme:{token:{motion:!1,zIndexPopupBase:0}}},u.createElement(e,Object.assign({},t)))}const t5=(e,t,r,n)=>mf(a=>{const{prefixCls:s,style:i}=a,l=u.useRef(null),[c,d]=u.useState(0),[f,v]=u.useState(0),[h,p]=en(!1,{value:a.open}),{getPrefixCls:g}=u.useContext(Qa),y=g(t||"select",s);u.useEffect(()=>{if(p(!0),typeof ResizeObserver<"u"){const S=new ResizeObserver(E=>{const N=E[0].target;d(N.offsetHeight+8),v(N.offsetWidth)}),x=setInterval(()=>{var E;const N=r?`.${r(y)}`:`.${y}-dropdown`,R=(E=l.current)===null||E===void 0?void 0:E.querySelector(N);R&&(clearInterval(x),S.observe(R))},10);return()=>{clearInterval(x),S.disconnect()}}},[]);let m=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},i),{margin:0}),open:h,visible:h,getPopupContainer:()=>l.current});n&&(m=n(m));const C={paddingBottom:c,position:"relative",minWidth:f};return u.createElement("div",{ref:l,style:C},u.createElement(e,Object.assign({},m)))});var jo=function(t){var r=t.className,n=t.customizeIcon,o=t.customizeIconProps,a=t.onMouseDown,s=t.onClick,i=t.children,l;return typeof n=="function"?l=n(o):l=n,u.createElement("span",{className:r,onMouseDown:function(d){d.preventDefault(),a&&a(d)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:u.createElement("span",{className:de(r.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},i))};function gf(e,t,r,n,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,i=arguments.length>7?arguments[7]:void 0,l=V.useMemo(function(){if(Rt(n)==="object")return n.clearIcon;if(o)return o},[n,o]),c=V.useMemo(function(){return!!(!a&&n&&(r.length||s)&&!(i==="combobox"&&s===""))},[n,a,r.length,s,i]);return{allowClear:c,clearIcon:V.createElement(jo,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:l},"×")}}var zl=u.createContext(null);function yf(){return u.useContext(zl)}function Cf(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=u.useState(!1),r=J(t,2),n=r[0],o=r[1],a=u.useRef(null),s=function(){window.clearTimeout(a.current)};u.useEffect(function(){return s},[]);var i=function(c,d){s(),a.current=window.setTimeout(function(){o(c),d&&d()},e)};return[n,i,s]}function Fl(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=u.useRef(null),r=u.useRef(null);u.useEffect(function(){return function(){window.clearTimeout(r.current)}},[]);function n(o){(o||t.current===null)&&(t.current=o),window.clearTimeout(r.current),r.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},n]}function xf(e,t,r,n){var o=u.useRef(null);o.current={open:t,triggerOpen:r,customizedTrigger:n},u.useEffect(function(){function a(s){var i;if(!((i=o.current)!==null&&i!==void 0&&i.customizedTrigger)){var l=s.target;l.shadowRoot&&s.composed&&(l=s.composedPath()[0]||l),o.current.open&&e().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&o.current.triggerOpen(!1)}}return window.addEventListener("mousedown",a),function(){return window.removeEventListener("mousedown",a)}},[])}var bf=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Gn=void 0;function Sf(e,t){var r=e.prefixCls,n=e.invalidate,o=e.item,a=e.renderItem,s=e.responsive,i=e.responsiveDisabled,l=e.registerSize,c=e.itemKey,d=e.className,f=e.style,v=e.children,h=e.display,p=e.order,g=e.component,y=g===void 0?"div":g,m=Be(e,bf),C=s&&!h;function S(M){l(c,M)}u.useEffect(function(){return function(){S(null)}},[]);var x=a&&o!==Gn?a(o):v,E;n||(E={opacity:C?0:1,height:C?0:Gn,overflowY:C?"hidden":Gn,order:s?p:Gn,pointerEvents:C?"none":Gn,position:C?"absolute":Gn});var N={};C&&(N["aria-hidden"]=!0);var R=u.createElement(y,ue({className:de(!n&&r,d),style:F(F({},E),f)},N,m,{ref:t}),x);return s&&(R=u.createElement(Fn,{onResize:function(_){var A=_.offsetWidth;S(A)},disabled:i},R)),R}var Dr=u.forwardRef(Sf);Dr.displayName="Item";function wf(e){if(typeof MessageChannel>"u")It(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function Ef(){var e=u.useRef(null),t=function(n){e.current||(e.current=[],wf(function(){Kr.unstable_batchedUpdates(function(){e.current.forEach(function(o){o()}),e.current=null})})),e.current.push(n)};return t}function Sr(e,t){var r=u.useState(t),n=J(r,2),o=n[0],a=n[1],s=Mn(function(i){e(function(){a(i)})});return[o,s]}var wo=V.createContext(null),Nf=["component"],_f=["className"],Rf=["className"],kf=function(t,r){var n=u.useContext(wo);if(!n){var o=t.component,a=o===void 0?"div":o,s=Be(t,Nf);return u.createElement(a,ue({},s,{ref:r}))}var i=n.className,l=Be(n,_f),c=t.className,d=Be(t,Rf);return u.createElement(wo.Provider,{value:null},u.createElement(Dr,ue({ref:r,className:de(i,c)},l,d)))},Bl=u.forwardRef(kf);Bl.displayName="RawItem";var If=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],jl="responsive",Wl="invalidate";function Mf(e){return"+ ".concat(e.length," ...")}function Pf(e,t){var r=e.prefixCls,n=r===void 0?"rc-overflow":r,o=e.data,a=o===void 0?[]:o,s=e.renderItem,i=e.renderRawItem,l=e.itemKey,c=e.itemWidth,d=c===void 0?10:c,f=e.ssr,v=e.style,h=e.className,p=e.maxCount,g=e.renderRest,y=e.renderRawRest,m=e.suffix,C=e.component,S=C===void 0?"div":C,x=e.itemComponent,E=e.onVisibleChange,N=Be(e,If),R=f==="full",M=Ef(),_=Sr(M,null),A=J(_,2),T=A[0],O=A[1],w=T||0,b=Sr(M,new Map),I=J(b,2),k=I[0],P=I[1],$=Sr(M,0),D=J($,2),K=D[0],L=D[1],H=Sr(M,0),z=J(H,2),j=z[0],G=z[1],Y=Sr(M,0),ee=J(Y,2),X=ee[0],B=ee[1],U=u.useState(null),q=J(U,2),oe=q[0],te=q[1],ie=u.useState(null),Z=J(ie,2),ye=Z[0],Ee=Z[1],ne=u.useMemo(function(){return ye===null&&R?Number.MAX_SAFE_INTEGER:ye||0},[ye,T]),ge=u.useState(!1),re=J(ge,2),_e=re[0],fe=re[1],Me="".concat(n,"-item"),be=Math.max(K,j),Re=p===jl,se=a.length&&Re,Le=p===Wl,$e=se||typeof p=="number"&&a.length>p,Ge=u.useMemo(function(){var Ce=a;return se?T===null&&R?Ce=a:Ce=a.slice(0,Math.min(a.length,w/d)):typeof p=="number"&&(Ce=a.slice(0,p)),Ce},[a,d,T,p,se]),Ie=u.useMemo(function(){return se?a.slice(ne+1):a.slice(Ge.length)},[a,Ge,se,ne]),pe=u.useCallback(function(Ce,Te){var Q;return typeof l=="function"?l(Ce):(Q=l&&(Ce==null?void 0:Ce[l]))!==null&&Q!==void 0?Q:Te},[l]),je=u.useCallback(s||function(Ce){return Ce},[s]);function Ze(Ce,Te,Q){ye===Ce&&(Te===void 0||Te===oe)||(Ee(Ce),Q||(fe(Cew){Ze(le-1,Ce-ae-X+j);break}}m&&ut(0)+X>w&&te(null)}},[w,k,j,X,pe,Ge]);var Qe=_e&&!!Ie.length,wt={};oe!==null&&se&&(wt={position:"absolute",left:oe,top:0});var ft={prefixCls:Me,responsive:se,component:x,invalidate:Le},dt=i?function(Ce,Te){var Q=pe(Ce,Te);return u.createElement(wo.Provider,{key:Q,value:F(F({},ft),{},{order:Te,item:Ce,itemKey:Q,registerSize:We,display:Te<=ne})},i(Ce,Te))}:function(Ce,Te){var Q=pe(Ce,Te);return u.createElement(Dr,ue({},ft,{order:Te,key:Q,item:Ce,renderItem:je,itemKey:Q,registerSize:We,display:Te<=ne}))},mt,gt={order:Qe?ne:Number.MAX_SAFE_INTEGER,className:"".concat(Me,"-rest"),registerSize:Ve,display:Qe};if(y)y&&(mt=u.createElement(wo.Provider,{value:F(F({},ft),gt)},y(Ie)));else{var ot=g||Mf;mt=u.createElement(Dr,ue({},ft,gt),typeof ot=="function"?ot(Ie):ot)}var ze=u.createElement(S,ue({className:de(!Le&&n,h),style:v,ref:t},N),Ge.map(dt),$e?mt:null,m&&u.createElement(Dr,ue({},ft,{responsive:Re,responsiveDisabled:!se,order:ne,className:"".concat(Me,"-suffix"),registerSize:ct,display:!0,style:wt}),m));return Re&&(ze=u.createElement(Fn,{onResize:rt,disabled:!se},ze)),ze}var dn=u.forwardRef(Pf);dn.displayName="Overflow";dn.Item=Bl;dn.RESPONSIVE=jl;dn.INVALIDATE=Wl;var Tf=function(t,r){var n,o=t.prefixCls,a=t.id,s=t.inputElement,i=t.disabled,l=t.tabIndex,c=t.autoFocus,d=t.autoComplete,f=t.editable,v=t.activeDescendantId,h=t.value,p=t.maxLength,g=t.onKeyDown,y=t.onMouseDown,m=t.onChange,C=t.onPaste,S=t.onCompositionStart,x=t.onCompositionEnd,E=t.open,N=t.attrs,R=s||u.createElement("input",null),M=R,_=M.ref,A=M.props,T=A.onKeyDown,O=A.onChange,w=A.onMouseDown,b=A.onCompositionStart,I=A.onCompositionEnd,k=A.style;return jd(!("maxLength"in R.props)),R=u.cloneElement(R,F(F(F({type:"search"},A),{},{id:a,ref:ei(r,_),disabled:i,tabIndex:l,autoComplete:d||"off",autoFocus:c,className:de("".concat(o,"-selection-search-input"),(n=R)===null||n===void 0||(n=n.props)===null||n===void 0?void 0:n.className),role:"combobox","aria-expanded":E||!1,"aria-haspopup":"listbox","aria-owns":"".concat(a,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(a,"_list"),"aria-activedescendant":E?v:void 0},N),{},{value:f?h:"",maxLength:p,readOnly:!f,unselectable:f?null:"on",style:F(F({},k),{},{opacity:f?null:0}),onKeyDown:function($){g($),T&&T($)},onMouseDown:function($){y($),w&&w($)},onChange:function($){m($),O&&O($)},onCompositionStart:function($){S($),b&&b($)},onCompositionEnd:function($){x($),I&&I($)},onPaste:C})),R},ai=u.forwardRef(Tf);ai.displayName="Input";function Ul(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var $f=typeof window<"u"&&window.document&&window.document.documentElement,Of=$f;function Df(e){return e!=null}function Af(e){return!e&&e!==0}function Ui(e){return["string","number"].includes(Rt(e))}function Gl(e){var t=void 0;return e&&(Ui(e.title)?t=e.title.toString():Ui(e.label)&&(t=e.label.toString())),t}function Kf(e,t){Of?u.useLayoutEffect(e,t):u.useEffect(e,t)}function Lf(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var Gi=function(t){t.preventDefault(),t.stopPropagation()},Vf=function(t){var r=t.id,n=t.prefixCls,o=t.values,a=t.open,s=t.searchValue,i=t.autoClearSearchValue,l=t.inputRef,c=t.placeholder,d=t.disabled,f=t.mode,v=t.showSearch,h=t.autoFocus,p=t.autoComplete,g=t.activeDescendantId,y=t.tabIndex,m=t.removeIcon,C=t.maxTagCount,S=t.maxTagTextLength,x=t.maxTagPlaceholder,E=x===void 0?function(te){return"+ ".concat(te.length," ...")}:x,N=t.tagRender,R=t.onToggleOpen,M=t.onRemove,_=t.onInputChange,A=t.onInputPaste,T=t.onInputKeyDown,O=t.onInputMouseDown,w=t.onInputCompositionStart,b=t.onInputCompositionEnd,I=u.useRef(null),k=u.useState(0),P=J(k,2),$=P[0],D=P[1],K=u.useState(!1),L=J(K,2),H=L[0],z=L[1],j="".concat(n,"-selection"),G=a||f==="multiple"&&i===!1||f==="tags"?s:"",Y=f==="tags"||f==="multiple"&&i===!1||v&&(a||H);Kf(function(){D(I.current.scrollWidth)},[G]);function ee(te,ie,Z,ye,Ee){return u.createElement("span",{className:de("".concat(j,"-item"),W({},"".concat(j,"-item-disabled"),Z)),title:Gl(te)},u.createElement("span",{className:"".concat(j,"-item-content")},ie),ye&&u.createElement(jo,{className:"".concat(j,"-item-remove"),onMouseDown:Gi,onClick:Ee,customizeIcon:m},"×"))}function X(te,ie,Z,ye,Ee){var ne=function(re){Gi(re),R(!a)};return u.createElement("span",{onMouseDown:ne},N({label:ie,value:te,disabled:Z,closable:ye,onClose:Ee}))}function B(te){var ie=te.disabled,Z=te.label,ye=te.value,Ee=!d&&!ie,ne=Z;if(typeof S=="number"&&(typeof Z=="string"||typeof Z=="number")){var ge=String(ne);ge.length>S&&(ne="".concat(ge.slice(0,S),"..."))}var re=function(fe){fe&&fe.stopPropagation(),M(te)};return typeof N=="function"?X(ye,ne,ie,Ee,re):ee(te,ne,ie,Ee,re)}function U(te){var ie=typeof E=="function"?E(te):E;return ee({title:ie},ie,!1)}var q=u.createElement("div",{className:"".concat(j,"-search"),style:{width:$},onFocus:function(){z(!0)},onBlur:function(){z(!1)}},u.createElement(ai,{ref:l,open:a,prefixCls:n,id:r,inputElement:null,disabled:d,autoFocus:h,autoComplete:p,editable:Y,activeDescendantId:g,value:G,onKeyDown:T,onMouseDown:O,onChange:_,onPaste:A,onCompositionStart:w,onCompositionEnd:b,tabIndex:y,attrs:Cn(t,!0)}),u.createElement("span",{ref:I,className:"".concat(j,"-search-mirror"),"aria-hidden":!0},G," ")),oe=u.createElement(dn,{prefixCls:"".concat(j,"-overflow"),data:o,renderItem:B,renderRest:U,suffix:q,itemKey:Lf,maxCount:C});return u.createElement(u.Fragment,null,oe,!o.length&&!G&&u.createElement("span",{className:"".concat(j,"-placeholder")},c))},Hf=function(t){var r=t.inputElement,n=t.prefixCls,o=t.id,a=t.inputRef,s=t.disabled,i=t.autoFocus,l=t.autoComplete,c=t.activeDescendantId,d=t.mode,f=t.open,v=t.values,h=t.placeholder,p=t.tabIndex,g=t.showSearch,y=t.searchValue,m=t.activeValue,C=t.maxLength,S=t.onInputKeyDown,x=t.onInputMouseDown,E=t.onInputChange,N=t.onInputPaste,R=t.onInputCompositionStart,M=t.onInputCompositionEnd,_=t.title,A=u.useState(!1),T=J(A,2),O=T[0],w=T[1],b=d==="combobox",I=b||g,k=v[0],P=y||"";b&&m&&!O&&(P=m),u.useEffect(function(){b&&w(!1)},[b,m]);var $=d!=="combobox"&&!f&&!g?!1:!!P,D=_===void 0?Gl(k):_,K=function(){if(k)return null;var H=$?{visibility:"hidden"}:void 0;return u.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:H},h)};return u.createElement(u.Fragment,null,u.createElement("span",{className:"".concat(n,"-selection-search")},u.createElement(ai,{ref:a,prefixCls:n,id:o,open:f,inputElement:r,disabled:s,autoFocus:i,autoComplete:l,editable:I,activeDescendantId:c,value:P,onKeyDown:S,onMouseDown:x,onChange:function(H){w(!0),E(H)},onPaste:N,onCompositionStart:R,onCompositionEnd:M,tabIndex:p,attrs:Cn(t,!0),maxLength:b?C:void 0})),!b&&k?u.createElement("span",{className:"".concat(n,"-selection-item"),title:D,style:$?{visibility:"hidden"}:void 0},k.label):null,K())};function zf(e){return![ve.ESC,ve.SHIFT,ve.BACKSPACE,ve.TAB,ve.WIN_KEY,ve.ALT,ve.META,ve.WIN_KEY_RIGHT,ve.CTRL,ve.SEMICOLON,ve.EQUALS,ve.CAPS_LOCK,ve.CONTEXT_MENU,ve.F1,ve.F2,ve.F3,ve.F4,ve.F5,ve.F6,ve.F7,ve.F8,ve.F9,ve.F10,ve.F11,ve.F12].includes(e)}var Ff=function(t,r){var n=u.useRef(null),o=u.useRef(!1),a=t.prefixCls,s=t.open,i=t.mode,l=t.showSearch,c=t.tokenWithEnter,d=t.autoClearSearchValue,f=t.onSearch,v=t.onSearchSubmit,h=t.onToggleOpen,p=t.onInputKeyDown,g=t.domRef;u.useImperativeHandle(r,function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}});var y=Fl(0),m=J(y,2),C=m[0],S=m[1],x=function(P){var $=P.which;($===ve.UP||$===ve.DOWN)&&P.preventDefault(),p&&p(P),$===ve.ENTER&&i==="tags"&&!o.current&&!s&&(v==null||v(P.target.value)),zf($)&&h(!0)},E=function(){S(!0)},N=u.useRef(null),R=function(P){f(P,!0,o.current)!==!1&&h(!0)},M=function(){o.current=!0},_=function(P){o.current=!1,i!=="combobox"&&R(P.target.value)},A=function(P){var $=P.target.value;if(c&&N.current&&/[\r\n]/.test(N.current)){var D=N.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");$=$.replace(D,N.current)}N.current=null,R($)},T=function(P){var $=P.clipboardData,D=$.getData("text");N.current=D},O=function(P){var $=P.target;if($!==n.current){var D=document.body.style.msTouchAction!==void 0;D?setTimeout(function(){n.current.focus()}):n.current.focus()}},w=function(P){var $=C();P.target!==n.current&&!$&&i!=="combobox"&&P.preventDefault(),(i!=="combobox"&&(!l||!$)||!s)&&(s&&d!==!1&&f("",!0,!1),h())},b={inputRef:n,onInputKeyDown:x,onInputMouseDown:E,onInputChange:A,onInputPaste:T,onInputCompositionStart:M,onInputCompositionEnd:_},I=i==="multiple"||i==="tags"?u.createElement(Vf,ue({},t,b)):u.createElement(Hf,ue({},t,b));return u.createElement("div",{ref:g,className:"".concat(a,"-selector"),onClick:O,onMouseDown:w},I)},Xl=u.forwardRef(Ff);Xl.displayName="Selector";var Bf=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],jf=function(t){var r=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:r,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:r,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:r,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:r,adjustY:1},htmlRegion:"scroll"}}},Wf=function(t,r){var n=t.prefixCls;t.disabled;var o=t.visible,a=t.children,s=t.popupElement,i=t.animation,l=t.transitionName,c=t.dropdownStyle,d=t.dropdownClassName,f=t.direction,v=f===void 0?"ltr":f,h=t.placement,p=t.builtinPlacements,g=t.dropdownMatchSelectWidth,y=t.dropdownRender,m=t.dropdownAlign,C=t.getPopupContainer,S=t.empty,x=t.getTriggerDOMNode,E=t.onPopupVisibleChange,N=t.onPopupMouseEnter,R=Be(t,Bf),M="".concat(n,"-dropdown"),_=s;y&&(_=y(s));var A=u.useMemo(function(){return p||jf(g)},[p,g]),T=i?"".concat(M,"-").concat(i):l,O=typeof g=="number",w=u.useMemo(function(){return O?null:g===!1?"minWidth":"width"},[g,O]),b=c;O&&(b=F(F({},b),{},{width:g}));var I=u.useRef(null);return u.useImperativeHandle(r,function(){return{getPopupElement:function(){return I.current}}}),u.createElement(oi,ue({},R,{showAction:E?["click"]:[],hideAction:E?["click"]:[],popupPlacement:h||(v==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:A,prefixCls:M,popupTransitionName:T,popup:u.createElement("div",{ref:I,onMouseEnter:N},_),stretch:w,popupAlign:m,popupVisible:o,getPopupContainer:C,popupClassName:de(d,W({},"".concat(M,"-empty"),S)),popupStyle:b,getTriggerDOMNode:x,onPopupVisibleChange:E}),a)},Yl=u.forwardRef(Wf);Yl.displayName="SelectTrigger";function Xi(e,t){var r=e.key,n;return"value"in e&&(n=e.value),r??(n!==void 0?n:"rc-index-key-".concat(t))}function ql(e,t){var r=e||{},n=r.label,o=r.value,a=r.options,s=r.groupLabel,i=n||(t?"children":"label");return{label:i,value:o||"value",options:a||"options",groupLabel:s||i}}function Uf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.fieldNames,n=t.childrenAsData,o=[],a=ql(r,!1),s=a.label,i=a.value,l=a.options,c=a.groupLabel;function d(f,v){f.forEach(function(h){if(v||!(l in h)){var p=h[i];o.push({key:Xi(h,o.length),groupOption:v,data:h,label:h[s],value:p})}else{var g=h[c];g===void 0&&n&&(g=h.label),o.push({key:Xi(h,o.length),group:!0,data:h,label:g}),d(h[l],!0)}})}return d(e,!1),o}function _a(e){var t=F({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Jt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function Gf(e,t){if(!t||!t.length)return null;var r=!1;function n(a,s){var i=Wd(s),l=i[0],c=i.slice(1);if(!l)return[a];var d=a.split(l);return r=r||d.length>1,d.reduce(function(f,v){return[].concat(qe(f),qe(n(v,c)))},[]).filter(function(f){return f})}var o=n(e,t);return r?o:null}var Xf=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Yf=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Ra(e){return e==="tags"||e==="multiple"}var qf=u.forwardRef(function(e,t){var r,n,o=e.id,a=e.prefixCls,s=e.className,i=e.showSearch,l=e.tagRender,c=e.direction,d=e.omitDomProps,f=e.displayValues,v=e.onDisplayValuesChange,h=e.emptyOptions,p=e.notFoundContent,g=p===void 0?"Not Found":p,y=e.onClear,m=e.mode,C=e.disabled,S=e.loading,x=e.getInputElement,E=e.getRawInputElement,N=e.open,R=e.defaultOpen,M=e.onDropdownVisibleChange,_=e.activeValue,A=e.onActiveValueChange,T=e.activeDescendantId,O=e.searchValue,w=e.autoClearSearchValue,b=e.onSearch,I=e.onSearchSplit,k=e.tokenSeparators,P=e.allowClear,$=e.suffixIcon,D=e.clearIcon,K=e.OptionList,L=e.animation,H=e.transitionName,z=e.dropdownStyle,j=e.dropdownClassName,G=e.dropdownMatchSelectWidth,Y=e.dropdownRender,ee=e.dropdownAlign,X=e.placement,B=e.builtinPlacements,U=e.getPopupContainer,q=e.showAction,oe=q===void 0?[]:q,te=e.onFocus,ie=e.onBlur,Z=e.onKeyUp,ye=e.onKeyDown,Ee=e.onMouseDown,ne=Be(e,Xf),ge=Ra(m),re=(i!==void 0?i:ge)||m==="combobox",_e=F({},ne);Yf.forEach(function(Ae){delete _e[Ae]}),d==null||d.forEach(function(Ae){delete _e[Ae]});var fe=u.useState(!1),Me=J(fe,2),be=Me[0],Re=Me[1];u.useEffect(function(){Re(of())},[]);var se=u.useRef(null),Le=u.useRef(null),$e=u.useRef(null),Ge=u.useRef(null),Ie=u.useRef(null),pe=u.useRef(!1),je=Cf(),Ze=J(je,3),rt=Ze[0],We=Ze[1],Ve=Ze[2];u.useImperativeHandle(t,function(){var Ae,he;return{focus:(Ae=Ge.current)===null||Ae===void 0?void 0:Ae.focus,blur:(he=Ge.current)===null||he===void 0?void 0:he.blur,scrollTo:function(Ke){var Ye;return(Ye=Ie.current)===null||Ye===void 0?void 0:Ye.scrollTo(Ke)}}});var ct=u.useMemo(function(){var Ae;if(m!=="combobox")return O;var he=(Ae=f[0])===null||Ae===void 0?void 0:Ae.value;return typeof he=="string"||typeof he=="number"?String(he):""},[O,m,f]),ut=m==="combobox"&&typeof x=="function"&&x()||null,Qe=typeof E=="function"&&E(),wt=Al(Le,Qe==null||(r=Qe.props)===null||r===void 0?void 0:r.ref),ft=u.useState(!1),dt=J(ft,2),mt=dt[0],gt=dt[1];Xt(function(){gt(!0)},[]);var ot=en(!1,{defaultValue:R,value:N}),ze=J(ot,2),Ce=ze[0],Te=ze[1],Q=mt?Ce:!1,le=!g&&h;(C||le&&Q&&m==="combobox")&&(Q=!1);var ae=le?!1:Q,ce=u.useCallback(function(Ae){var he=Ae!==void 0?Ae:!Q;C||(Te(he),Q!==he&&(M==null||M(he)))},[C,Q,Te,M]),Oe=u.useMemo(function(){return(k||[]).some(function(Ae){return[` +`,`\r +`].includes(Ae)})},[k]),Fe=function(he,Pe,Ke){var Ye=!0,st=he;A==null||A(null);var Et=Ke?null:Gf(he,k);return m!=="combobox"&&Et&&(st="",I==null||I(Et),ce(!1),Ye=!1),b&&ct!==st&&b(st,{source:Pe?"typing":"effect"}),Ye},yt=function(he){!he||!he.trim()||b(he,{source:"submit"})};u.useEffect(function(){!Q&&!ge&&m!=="combobox"&&Fe("",!1,!1)},[Q]),u.useEffect(function(){Ce&&C&&Te(!1),C&&!pe.current&&We(!1)},[C]);var Xe=Fl(),et=J(Xe,2),tt=et[0],at=et[1],pt=function(he){var Pe=tt(),Ke=he.which;if(Ke===ve.ENTER&&(m!=="combobox"&&he.preventDefault(),Q||ce(!0)),at(!!ct),Ke===ve.BACKSPACE&&!Pe&&ge&&!ct&&f.length){for(var Ye=qe(f),st=null,Et=Ye.length-1;Et>=0;Et-=1){var jt=Ye[Et];if(!jt.disabled){Ye.splice(Et,1),st=jt;break}}st&&v(Ye,{type:"remove",values:[st]})}for(var Wt=arguments.length,Ut=new Array(Wt>1?Wt-1:0),Ht=1;Ht1?Pe-1:0),Ye=1;Ye1?Et-1:0),Wt=1;Wt0,z=u.useMemo(function(){if(a===0||K===0)return 0;var oe=a/K;return oe*L},[a,K,L]),j=function(te){te.stopPropagation(),te.preventDefault()},G=u.useRef({top:z,dragging:m,pageY:E,startTop:_});G.current={top:z,dragging:m,pageY:E,startTop:_};var Y=function(te){C(!0),N(Yi(te,d)),A(G.current.top),i(),te.stopPropagation(),te.preventDefault()};u.useEffect(function(){var oe=function(ye){ye.preventDefault()},te=O.current,ie=w.current;return te.addEventListener("touchstart",oe),ie.addEventListener("touchstart",Y),function(){te.removeEventListener("touchstart",oe),ie.removeEventListener("touchstart",Y)}},[]);var ee=u.useRef();ee.current=K;var X=u.useRef();X.current=L,u.useEffect(function(){if(m){var oe,te=function(ye){var Ee=G.current,ne=Ee.dragging,ge=Ee.pageY,re=Ee.startTop;if(It.cancel(oe),ne){var _e=Yi(ye,d)-ge,fe=re;!T&&d?fe-=_e:fe+=_e;var Me=ee.current,be=X.current,Re=be?fe/be:0,se=Math.ceil(Re*Me);se=Math.max(se,0),se=Math.min(se,Me),oe=It(function(){c(se,d)})}},ie=function(){C(!1),l()};return window.addEventListener("mousemove",te),window.addEventListener("touchmove",te),window.addEventListener("mouseup",ie),window.addEventListener("touchend",ie),function(){window.removeEventListener("mousemove",te),window.removeEventListener("touchmove",te),window.removeEventListener("mouseup",ie),window.removeEventListener("touchend",ie),It.cancel(oe)}}},[m]),u.useEffect(function(){D()},[a]),u.useImperativeHandle(t,function(){return{delayHidden:D}});var B="".concat(n,"-scrollbar"),U={position:"absolute",visibility:k&&H?null:"hidden"},q={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return d?(U.height=8,U.left=0,U.right=0,U.bottom=0,q.height="100%",q.width=f,T?q.left=z:q.right=z):(U.width=8,U.top=0,U.bottom=0,T?U.right=0:U.left=0,q.width="100%",q.height=f,q.top=z),u.createElement("div",{ref:O,className:de(B,(r={},W(r,"".concat(B,"-horizontal"),d),W(r,"".concat(B,"-vertical"),!d),W(r,"".concat(B,"-visible"),k),r)),style:F(F({},U),h),onMouseDown:j,onMouseMove:D},u.createElement("div",{ref:w,className:de("".concat(B,"-thumb"),W({},"".concat(B,"-thumb-moving"),m)),style:F(F({},q),p),onMouseDown:Y}))});function Zf(e){var t=e.children,r=e.setRef,n=u.useCallback(function(o){r(o)},[]);return u.cloneElement(t,{ref:n})}function Jf(e,t,r,n,o,a,s){var i=s.getKey;return e.slice(t,r+1).map(function(l,c){var d=t+c,f=a(l,d,{style:{width:n}}),v=i(l);return u.createElement(Zf,{key:v,setRef:function(p){return o(l,p)}},f)})}var Qf=function(){function e(){zo(this,e),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return Ho(e,[{key:"set",value:function(r,n){this.maps[r]=n,this.id+=1}},{key:"get",value:function(r){return this.maps[r]}}]),e}();function ev(e,t,r){var n=u.useState(0),o=J(n,2),a=o[0],s=o[1],i=u.useRef(new Map),l=u.useRef(new Qf),c=u.useRef();function d(){It.cancel(c.current)}function f(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;d();var p=function(){i.current.forEach(function(y,m){if(y&&y.offsetParent){var C=Ud(y),S=C.offsetHeight;l.current.get(m)!==S&&l.current.set(m,C.offsetHeight)}}),s(function(y){return y+1})};h?p():c.current=It(p)}function v(h,p){var g=e(h),y=i.current.get(g);p?(i.current.set(g,p),f()):i.current.delete(g),!y!=!p&&(p?t==null||t(h):r==null||r(h))}return u.useEffect(function(){return d},[]),[v,f,l.current,a]}var tv=10;function nv(e,t,r,n,o,a,s,i){var l=u.useRef(),c=u.useState(null),d=J(c,2),f=d[0],v=d[1];return Xt(function(){if(f&&f.times=0;b-=1){var I=o(t[b]),k=r.get(I);if(k===void 0){C=!0;break}if(w-=k,w<=0)break}switch(E){case"top":x=R-y;break;case"bottom":x=M-m+y;break;default:{var P=e.current.scrollTop,$=P+m;R$&&(S="bottom")}}x!==null&&s(x),x!==f.lastTop&&(C=!0)}C&&v(F(F({},f),{},{times:f.times+1,targetAlign:S,lastTop:x}))}},[f,e.current]),function(h){if(h==null){i();return}if(It.cancel(l.current),typeof h=="number")s(h);else if(h&&Rt(h)==="object"){var p,g=h.align;"index"in h?p=h.index:p=t.findIndex(function(C){return o(C)===h.key});var y=h.offset,m=y===void 0?0:y;v({times:0,index:p,offset:m,originAlign:g})}}}function rv(e,t,r){var n=e.length,o=t.length,a,s;if(n===0&&o===0)return null;n"u"?"undefined":Rt(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const ec=function(e,t){var r=u.useRef(!1),n=u.useRef(null);function o(){clearTimeout(n.current),r.current=!0,n.current=setTimeout(function(){r.current=!1},50)}var a=u.useRef({top:e,bottom:t});return a.current.top=e,a.current.bottom=t,function(s){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l=s<0&&a.current.top||s>0&&a.current.bottom;return i&&l?(clearTimeout(n.current),r.current=!1):(!l||r.current)&&o(),!r.current&&l}};function av(e,t,r,n,o){var a=u.useRef(0),s=u.useRef(null),i=u.useRef(null),l=u.useRef(!1),c=ec(t,r);function d(y,m){It.cancel(s.current),a.current+=m,i.current=m,!c(m)&&(Zi||y.preventDefault(),s.current=It(function(){var C=l.current?10:1;o(a.current*C),a.current=0}))}function f(y,m){o(m,!0),Zi||y.preventDefault()}var v=u.useRef(null),h=u.useRef(null);function p(y){if(e){It.cancel(h.current),h.current=It(function(){v.current=null},2);var m=y.deltaX,C=y.deltaY,S=y.shiftKey,x=m,E=C;(v.current==="sx"||!v.current&&S&&C&&!m)&&(x=C,E=0,v.current="sx");var N=Math.abs(x),R=Math.abs(E);v.current===null&&(v.current=n&&N>R?"x":"y"),v.current==="y"?d(y,E):f(y,x)}}function g(y){e&&(l.current=y.detail===i.current)}return[p,g]}var iv=14/15;function sv(e,t,r){var n=u.useRef(!1),o=u.useRef(0),a=u.useRef(null),s=u.useRef(null),i,l=function(v){if(n.current){var h=Math.ceil(v.touches[0].pageY),p=o.current-h;o.current=h,r(p)&&v.preventDefault(),clearInterval(s.current),s.current=setInterval(function(){p*=iv,(!r(p,!0)||Math.abs(p)<=.1)&&clearInterval(s.current)},16)}},c=function(){n.current=!1,i()},d=function(v){i(),v.touches.length===1&&!n.current&&(n.current=!0,o.current=Math.ceil(v.touches[0].pageY),a.current=v.target,a.current.addEventListener("touchmove",l),a.current.addEventListener("touchend",c))};i=function(){a.current&&(a.current.removeEventListener("touchmove",l),a.current.removeEventListener("touchend",c))},Xt(function(){return e&&t.current.addEventListener("touchstart",d),function(){var f;(f=t.current)===null||f===void 0||f.removeEventListener("touchstart",d),i(),clearInterval(s.current)}},[e])}var lv=20;function Ji(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=e/t*100;return isNaN(r)&&(r=0),r=Math.max(r,lv),r=Math.min(r,e/2),Math.floor(r)}function cv(e,t,r,n){var o=u.useMemo(function(){return[new Map,[]]},[e,r.id,n]),a=J(o,2),s=a[0],i=a[1],l=function(d){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d,v=s.get(d),h=s.get(f);if(v===void 0||h===void 0)for(var p=e.length,g=i.length;ga||!!g),T=p==="rtl",O=de(n,W({},"".concat(n,"-rtl"),T),o),w=d||dv,b=u.useRef(),I=u.useRef(),k=u.useState(0),P=J(k,2),$=P[0],D=P[1],K=u.useState(0),L=J(K,2),H=L[0],z=L[1],j=u.useState(!1),G=J(j,2),Y=G[0],ee=G[1],X=function(){ee(!0)},B=function(){ee(!1)},U=u.useCallback(function(Se){return typeof v=="function"?v(Se):Se==null?void 0:Se[v]},[v]),q={getKey:U};function oe(Se){D(function(me){var ke;typeof Se=="function"?ke=Se(me):ke=Se;var nt=wt(ke);return b.current.scrollTop=nt,nt})}var te=u.useRef({start:0,end:w.length}),ie=u.useRef(),Z=ov(w,U),ye=J(Z,1),Ee=ye[0];ie.current=Ee;var ne=ev(U,null,null),ge=J(ne,4),re=ge[0],_e=ge[1],fe=ge[2],Me=ge[3],be=u.useMemo(function(){if(!_)return{scrollHeight:void 0,start:0,end:w.length-1,offset:void 0};if(!A){var Se;return{scrollHeight:((Se=I.current)===null||Se===void 0?void 0:Se.offsetHeight)||0,start:0,end:w.length-1,offset:void 0}}for(var me=0,ke,nt,lt,Ct=w.length,Nt=0;Nt=$&&ke===void 0&&(ke=Nt,nt=me),xt>$+a&<===void 0&&(lt=Nt),me=xt}return ke===void 0&&(ke=0,nt=0,lt=Math.ceil(a/s)),lt===void 0&&(lt=w.length-1),lt=Math.min(lt+1,w.length-1),{scrollHeight:me,start:ke,end:lt,offset:nt}},[A,_,$,w,Me,a]),Re=be.scrollHeight,se=be.start,Le=be.end,$e=be.offset;te.current.start=se,te.current.end=Le;var Ge=u.useState({width:0,height:a}),Ie=J(Ge,2),pe=Ie[0],je=Ie[1],Ze=function(me){je({width:me.width||me.offsetWidth,height:me.height||me.offsetHeight})},rt=u.useRef(),We=u.useRef(),Ve=u.useMemo(function(){return Ji(pe.width,g)},[pe.width,g]),ct=u.useMemo(function(){return Ji(pe.height,Re)},[pe.height,Re]),ut=Re-a,Qe=u.useRef(ut);Qe.current=ut;function wt(Se){var me=Se;return Number.isNaN(Qe.current)||(me=Math.min(me,Qe.current)),me=Math.max(me,0),me}var ft=$<=0,dt=$>=ut,mt=ec(ft,dt),gt=function(){return{x:T?-H:H,y:$}},ot=u.useRef(gt()),ze=Mn(function(){if(S){var Se=gt();(ot.current.x!==Se.x||ot.current.y!==Se.y)&&(S(Se),ot.current=Se)}});function Ce(Se,me){var ke=Se;me?(Kr.flushSync(function(){z(ke)}),ze()):oe(ke)}function Te(Se){var me=Se.currentTarget.scrollTop;me!==$&&oe(me),C==null||C(Se),ze()}var Q=function(me){var ke=me,nt=g-pe.width;return ke=Math.max(ke,0),ke=Math.min(ke,nt),ke},le=Mn(function(Se,me){me?(Kr.flushSync(function(){z(function(ke){var nt=ke+(T?-Se:Se);return Q(nt)})}),ze()):oe(function(ke){var nt=ke+Se;return nt})}),ae=av(_,ft,dt,!!g,le),ce=J(ae,2),Oe=ce[0],Fe=ce[1];sv(_,b,function(Se,me){return mt(Se,me)?!1:(Oe({preventDefault:function(){},deltaY:Se}),!0)}),Xt(function(){function Se(ke){_&&ke.preventDefault()}var me=b.current;return me.addEventListener("wheel",Oe),me.addEventListener("DOMMouseScroll",Fe),me.addEventListener("MozMousePixelScroll",Se),function(){me.removeEventListener("wheel",Oe),me.removeEventListener("DOMMouseScroll",Fe),me.removeEventListener("MozMousePixelScroll",Se)}},[_]),Xt(function(){g&&z(function(Se){return Q(Se)})},[pe.width,g]);var yt=function(){var me,ke;(me=rt.current)===null||me===void 0||me.delayHidden(),(ke=We.current)===null||ke===void 0||ke.delayHidden()},Xe=nv(b,w,fe,s,U,function(){return _e(!0)},oe,yt);u.useImperativeHandle(t,function(){return{getScrollInfo:gt,scrollTo:function(me){function ke(nt){return nt&&Rt(nt)==="object"&&("left"in nt||"top"in nt)}ke(me)?(me.left!==void 0&&z(Q(me.left)),Xe(me.top)):Xe(me)}}}),Xt(function(){if(x){var Se=w.slice(se,Le+1);x(Se,w)}},[se,Le,w]);var et=cv(w,U,fe,s),tt=N==null?void 0:N({start:se,end:Le,virtual:A,offsetX:H,offsetY:$e,rtl:T,getSize:et}),at=Jf(w,se,Le,g,re,f,q),pt=null;a&&(pt=F(W({},l?"height":"maxHeight",a),fv),_&&(pt.overflowY="hidden",g&&(pt.overflowX="hidden"),Y&&(pt.pointerEvents="none")));var Mt={};return T&&(Mt.dir="rtl"),u.createElement("div",ue({style:F(F({},c),{},{position:"relative"}),className:O},Mt,M),u.createElement(Fn,{onResize:Ze},u.createElement(m,{className:"".concat(n,"-holder"),style:pt,ref:b,onScroll:Te,onMouseEnter:yt},u.createElement(Ql,{prefixCls:n,height:Re,offsetX:H,offsetY:$e,scrollWidth:g,onInnerResize:_e,ref:I,innerProps:E,rtl:T,extra:tt},at))),A&&Re>a&&u.createElement(qi,{ref:rt,prefixCls:n,scrollOffset:$,scrollRange:Re,rtl:T,onScroll:Ce,onStartMove:X,onStopMove:B,spinSize:ct,containerSize:pe.height,style:R==null?void 0:R.verticalScrollBar,thumbStyle:R==null?void 0:R.verticalScrollBarThumb}),A&&g&&u.createElement(qi,{ref:We,prefixCls:n,scrollOffset:H,scrollRange:g,rtl:T,onScroll:Ce,onStartMove:X,onStopMove:B,spinSize:Ve,containerSize:pe.width,horizontal:!0,style:R==null?void 0:R.horizontalScrollBar,thumbStyle:R==null?void 0:R.horizontalScrollBarThumb}))}var Wo=u.forwardRef(vv);Wo.displayName="List";var tc=u.createContext(null);function hv(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var pv=["disabled","title","children","style","className"];function Qi(e){return typeof e=="string"||typeof e=="number"}var mv=function(t,r){var n=yf(),o=n.prefixCls,a=n.id,s=n.open,i=n.multiple,l=n.mode,c=n.searchValue,d=n.toggleOpen,f=n.notFoundContent,v=n.onPopupScroll,h=u.useContext(tc),p=h.flattenOptions,g=h.onActiveValue,y=h.defaultActiveFirstOption,m=h.onSelect,C=h.menuItemSelectedIcon,S=h.rawValues,x=h.fieldNames,E=h.virtual,N=h.direction,R=h.listHeight,M=h.listItemHeight,_=h.optionRender,A="".concat(o,"-item"),T=Fo(function(){return p},[s,p],function(X,B){return B[0]&&X[1]!==B[1]}),O=u.useRef(null),w=function(B){B.preventDefault()},b=function(B){O.current&&O.current.scrollTo(typeof B=="number"?{index:B}:B)},I=function(B){for(var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,q=T.length,oe=0;oe1&&arguments[1]!==void 0?arguments[1]:!1;D(B);var q={source:U?"keyboard":"mouse"},oe=T[B];if(!oe){g(null,-1,q);return}g(oe.value,B,q)};u.useEffect(function(){K(y!==!1?I(0):-1)},[T.length,c]);var L=u.useCallback(function(X){return S.has(X)&&l!=="combobox"},[l,qe(S).toString(),S.size]);u.useEffect(function(){var X=setTimeout(function(){if(!i&&s&&S.size===1){var U=Array.from(S)[0],q=T.findIndex(function(oe){var te=oe.data;return te.value===U});q!==-1&&(K(q),b(q))}});if(s){var B;(B=O.current)===null||B===void 0||B.scrollTo(void 0)}return function(){return clearTimeout(X)}},[s,c]);var H=function(B){B!==void 0&&m(B,{selected:!S.has(B)}),i||d(!1)};if(u.useImperativeHandle(r,function(){return{onKeyDown:function(B){var U=B.which,q=B.ctrlKey;switch(U){case ve.N:case ve.P:case ve.UP:case ve.DOWN:{var oe=0;if(U===ve.UP?oe=-1:U===ve.DOWN?oe=1:hv()&&q&&(U===ve.N?oe=1:U===ve.P&&(oe=-1)),oe!==0){var te=I($+oe,oe);b(te),K(te,!0)}break}case ve.ENTER:{var ie=T[$];ie&&!ie.data.disabled?H(ie.value):H(void 0),s&&B.preventDefault();break}case ve.ESC:d(!1),s&&B.stopPropagation()}},onKeyUp:function(){},scrollTo:function(B){b(B)}}}),T.length===0)return u.createElement("div",{role:"listbox",id:"".concat(a,"_list"),className:"".concat(A,"-empty"),onMouseDown:w},f);var z=Object.keys(x).map(function(X){return x[X]}),j=function(B){return B.label};function G(X,B){var U=X.group;return{role:U?"presentation":"option",id:"".concat(a,"_list_").concat(B)}}var Y=function(B){var U=T[B];if(!U)return null;var q=U.data||{},oe=q.value,te=U.group,ie=Cn(q,!0),Z=j(U);return U?u.createElement("div",ue({"aria-label":typeof Z=="string"&&!te?Z:null},ie,{key:B},G(U,B),{"aria-selected":L(oe)}),oe):null},ee={role:"listbox",id:"".concat(a,"_list")};return u.createElement(u.Fragment,null,E&&u.createElement("div",ue({},ee,{style:{height:0,width:0,overflow:"hidden"}}),Y($-1),Y($),Y($+1)),u.createElement(Wo,{itemKey:"key",ref:O,data:T,height:R,itemHeight:M,fullHeight:!1,onMouseDown:w,onScroll:v,virtual:E,direction:N,innerProps:E?null:ee},function(X,B){var U,q=X.group,oe=X.groupOption,te=X.data,ie=X.label,Z=X.value,ye=te.key;if(q){var Ee,ne=(Ee=te.title)!==null&&Ee!==void 0?Ee:Qi(ie)?ie.toString():void 0;return u.createElement("div",{className:de(A,"".concat(A,"-group")),title:ne},ie!==void 0?ie:ye)}var ge=te.disabled,re=te.title;te.children;var _e=te.style,fe=te.className,Me=Be(te,pv),be=Bo(Me,z),Re=L(Z),se="".concat(A,"-option"),Le=de(A,se,fe,(U={},W(U,"".concat(se,"-grouped"),oe),W(U,"".concat(se,"-active"),$===B&&!ge),W(U,"".concat(se,"-disabled"),ge),W(U,"".concat(se,"-selected"),Re),U)),$e=j(X),Ge=!C||typeof C=="function"||Re,Ie=typeof $e=="number"?$e:$e||Z,pe=Qi(Ie)?Ie.toString():void 0;return re!==void 0&&(pe=re),u.createElement("div",ue({},Cn(be),E?{}:G(X,B),{"aria-selected":Re,className:Le,title:pe,onMouseMove:function(){$===B||ge||K(B)},onClick:function(){ge||H(Z)},style:_e}),u.createElement("div",{className:"".concat(se,"-content")},typeof _=="function"?_(X,{index:B}):Ie),u.isValidElement(C)||Re,Ge&&u.createElement(jo,{className:"".concat(A,"-option-state"),customizeIcon:C,customizeIconProps:{value:Z,disabled:ge,isSelected:Re}},Re?"✓":null))}))},nc=u.forwardRef(mv);nc.displayName="OptionList";const gv=function(e,t){var r=u.useRef({values:new Map,options:new Map}),n=u.useMemo(function(){var a=r.current,s=a.values,i=a.options,l=e.map(function(f){if(f.label===void 0){var v;return F(F({},f),{},{label:(v=s.get(f.value))===null||v===void 0?void 0:v.label})}return f}),c=new Map,d=new Map;return l.forEach(function(f){c.set(f.value,f),d.set(f.value,t.get(f.value)||i.get(f.value))}),r.current.values=c,r.current.options=d,l},[e,t]),o=u.useCallback(function(a){return t.get(a)||r.current.options.get(a)},[t]);return[n,o]};function da(e,t){return Ul(e).join("").toUpperCase().includes(t)}const yv=function(e,t,r,n,o){return u.useMemo(function(){if(!r||n===!1)return e;var a=t.options,s=t.label,i=t.value,l=[],c=typeof n=="function",d=r.toUpperCase(),f=c?n:function(h,p){return o?da(p[o],d):p[a]?da(p[s!=="children"?s:"label"],d):da(p[i],d)},v=c?function(h){return _a(h)}:function(h){return h};return e.forEach(function(h){if(h[a]){var p=f(r,v(h));if(p)l.push(h);else{var g=h[a].filter(function(y){return f(r,v(y))});g.length&&l.push(F(F({},h),{},W({},a,g)))}return}f(r,v(h))&&l.push(h)}),l},[e,n,o,r,t])};var es=0,Cv=Kl();function xv(){var e;return Cv?(e=es,es+=1):e="TEST_OR_SSR",e}function bv(e){var t=u.useState(),r=J(t,2),n=r[0],o=r[1];return u.useEffect(function(){o("rc_select_".concat(xv()))},[]),e||n}var Sv=["children","value"],wv=["children"];function Ev(e){var t=e,r=t.key,n=t.props,o=n.children,a=n.value,s=Be(n,Sv);return F({key:r,value:a!==void 0?a:r,children:o},s)}function rc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Xr(e).map(function(r,n){if(!u.isValidElement(r)||!r.type)return null;var o=r,a=o.type.isSelectOptGroup,s=o.key,i=o.props,l=i.children,c=Be(i,wv);return t||!a?Ev(r):F(F({key:"__RC_SELECT_GRP__".concat(s===null?n:s,"__"),label:s},c),{},{options:rc(l)})}).filter(function(r){return r})}function Nv(e,t,r,n,o){return u.useMemo(function(){var a=e,s=!e;s&&(a=rc(t));var i=new Map,l=new Map,c=function(v,h,p){p&&typeof p=="string"&&v.set(h[p],h)};function d(f){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,h=0;h2&&arguments[2]!==void 0?arguments[2]:{},ce=ae.source,Oe=ce===void 0?"keyboard":ce;wt(le),s&&n==="combobox"&&Q!==null&&Oe==="keyboard"&&Ve(String(Q))},[s,n]),mt=function(le,ae,ce){var Oe=function(){var me,ke=Me(le);return[$?{label:ke==null?void 0:ke[G.label],value:le,key:(me=ke==null?void 0:ke.key)!==null&&me!==void 0?me:le}:le,_a(ke)]};if(ae&&h){var Fe=Oe(),yt=J(Fe,2),Xe=yt[0],et=yt[1];h(Xe,et)}else if(!ae&&p&&ce!=="clear"){var tt=Oe(),at=J(tt,2),pt=at[0],Mt=at[1];p(pt,Mt)}},gt=ts(function(Q,le){var ae,ce=H?le.selected:!0;ce?ae=H?[].concat(qe(fe),[Q]):[Q]:ae=fe.filter(function(Oe){return Oe.value!==Q}),je(ae),mt(Q,ce),n==="combobox"?Ve(""):(!Ra||v)&&(B(""),Ve(""))}),ot=function(le,ae){je(le);var ce=ae.type,Oe=ae.values;(ce==="remove"||ce==="clear")&&Oe.forEach(function(Fe){mt(Fe.value,!1,ce)})},ze=function(le,ae){if(B(le),Ve(null),ae.source==="submit"){var ce=(le||"").trim();if(ce){var Oe=Array.from(new Set([].concat(qe(Re),[ce])));je(Oe),mt(ce,!0),B("")}return}ae.source!=="blur"&&(n==="combobox"&&je(le),d==null||d(le))},Ce=function(le){var ae=le;n!=="tags"&&(ae=le.map(function(Oe){var Fe=oe.get(Oe);return Fe==null?void 0:Fe.value}).filter(function(Oe){return Oe!==void 0}));var ce=Array.from(new Set([].concat(qe(Re),qe(ae))));je(ce),ce.forEach(function(Oe){mt(Oe,!0)})},Te=u.useMemo(function(){var Q=A!==!1&&y!==!1;return F(F({},U),{},{flattenOptions:pe,onActiveValue:dt,defaultActiveFirstOption:ft,onSelect:gt,menuItemSelectedIcon:_,rawValues:Re,fieldNames:G,virtual:Q,direction:T,listHeight:w,listItemHeight:I,childrenAsData:z,optionRender:N})},[U,pe,dt,ft,gt,_,Re,G,A,y,w,I,z,N]);return u.createElement(tc.Provider,{value:Te},u.createElement(qf,ue({},K,{id:L,prefixCls:a,ref:t,omitDomProps:Rv,mode:n,displayValues:be,onDisplayValuesChange:ot,direction:T,searchValue:X,onSearch:ze,autoClearSearchValue:v,onSearchSplit:Ce,dropdownMatchSelectWidth:y,OptionList:nc,emptyOptions:!pe.length,activeValue:We,activeDescendantId:"".concat(L,"_list_").concat(Qe)})))}),oc=Iv;oc.Option=Jl;oc.OptGroup=Zl;const Eo=e=>e?typeof e=="function"?e():e:null,Mv=e=>{const{componentCls:t,popoverColor:r,titleMinWidth:n,fontWeightStrong:o,innerPadding:a,boxShadowSecondary:s,colorTextHeading:i,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:d,colorBgElevated:f,popoverBg:v,titleBorderBottom:h,innerContentPadding:p,titlePadding:g}=e;return[{[t]:Object.assign(Object.assign({},qd(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":f,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:v,backgroundClip:"padding-box",borderRadius:l,boxShadow:s,padding:a},[`${t}-title`]:{minWidth:n,marginBottom:d,color:i,fontWeight:o,borderBottom:h,padding:g},[`${t}-inner-content`]:{color:r,padding:p}})},af(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},Pv=e=>{const{componentCls:t}=e;return{[t]:sf.map(r=>{const n=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":n,[`${t}-inner`]:{backgroundColor:n},[`${t}-arrow`]:{background:"transparent"}}}})}},Tv=e=>{const{lineWidth:t,controlHeight:r,fontHeight:n,padding:o,wireframe:a,zIndexPopupBase:s,borderRadiusLG:i,marginXS:l,lineType:c,colorSplit:d,paddingSM:f}=e,v=r-n,h=v/2,p=v/2-t,g=o;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:s+30},lf(e)),cf({contentRadius:i,limitVerticalRadius:!0})),{innerPadding:a?0:12,titleMarginBottom:a?0:l,titlePadding:a?`${h}px ${g}px ${p}px`:0,titleBorderBottom:a?`${t}px ${c} ${d}`:"none",innerContentPadding:a?`${f}px ${g}px`:0})},ac=Gd("Popover",e=>{const{colorBgElevated:t,colorText:r}=e,n=Xd(e,{popoverBg:t,popoverColor:r});return[Mv(n),Pv(n),Yd(n,"zoom-big")]},Tv,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var $v=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{if(!(!t&&!r))return u.createElement(u.Fragment,null,t&&u.createElement("div",{className:`${e}-title`},Eo(t)),u.createElement("div",{className:`${e}-inner-content`},Eo(r)))},Dv=e=>{const{hashId:t,prefixCls:r,className:n,style:o,placement:a="top",title:s,content:i,children:l}=e;return u.createElement("div",{className:de(t,r,`${r}-pure`,`${r}-placement-${a}`,n),style:o},u.createElement("div",{className:`${r}-arrow`}),u.createElement(uf,Object.assign({},e,{className:t,prefixCls:r}),l||Ov(r,s,i)))},Av=e=>{const{prefixCls:t,className:r}=e,n=$v(e,["prefixCls","className"]),{getPrefixCls:o}=u.useContext(Qa),a=o("popover",t),[s,i,l]=ac(a);return s(u.createElement(Dv,Object.assign({},n,{prefixCls:a,hashId:i,className:de(r,l)})))},Kv=Av;var Lv=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{let{title:t,content:r,prefixCls:n}=e;return u.createElement(u.Fragment,null,t&&u.createElement("div",{className:`${n}-title`},Eo(t)),u.createElement("div",{className:`${n}-inner-content`},Eo(r)))},ic=u.forwardRef((e,t)=>{const{prefixCls:r,title:n,content:o,overlayClassName:a,placement:s="top",trigger:i="hover",mouseEnterDelay:l=.1,mouseLeaveDelay:c=.1,overlayStyle:d={}}=e,f=Lv(e,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:v}=u.useContext(Qa),h=v("popover",r),[p,g,y]=ac(h),m=v(),C=de(a,g,y);return p(u.createElement(df,Object.assign({placement:s,trigger:i,mouseEnterDelay:l,mouseLeaveDelay:c,overlayStyle:d},f,{prefixCls:h,overlayClassName:C,ref:t,overlay:n||o?u.createElement(Vv,{prefixCls:h,title:n,content:o}):null,transitionName:Zd(m,"zoom-big",f.transitionName),"data-popover-inject":!0})))});ic._InternalPanelDoNotUseOrYouWillBeFired=Kv;const Hv=ic;var zv=ve.ESC,Fv=ve.TAB;function Bv(e){var t=e.visible,r=e.triggerRef,n=e.onVisibleChange,o=e.autoFocus,a=e.overlayRef,s=u.useRef(!1),i=function(){if(t){var f,v;(f=r.current)===null||f===void 0||(v=f.focus)===null||v===void 0||v.call(f),n==null||n(!1)}},l=function(){var f;return(f=a.current)!==null&&f!==void 0&&f.focus?(a.current.focus(),s.current=!0,!0):!1},c=function(f){switch(f.keyCode){case zv:i();break;case Fv:{var v=!1;s.current||(v=l()),v?f.preventDefault():i();break}}};u.useEffect(function(){return t?(window.addEventListener("keydown",c),o&&It(l,3),function(){window.removeEventListener("keydown",c),s.current=!1}):function(){s.current=!1}},[t])}var jv=u.forwardRef(function(e,t){var r=e.overlay,n=e.arrow,o=e.prefixCls,a=u.useMemo(function(){var i;return typeof r=="function"?i=r():i=r,i},[r]),s=ei(t,a==null?void 0:a.ref);return V.createElement(V.Fragment,null,n&&V.createElement("div",{className:"".concat(o,"-arrow")}),V.cloneElement(a,{ref:So(a)?s:void 0}))}),Xn={adjustX:1,adjustY:1},Yn=[0,0],Wv={topLeft:{points:["bl","tl"],overflow:Xn,offset:[0,-4],targetOffset:Yn},top:{points:["bc","tc"],overflow:Xn,offset:[0,-4],targetOffset:Yn},topRight:{points:["br","tr"],overflow:Xn,offset:[0,-4],targetOffset:Yn},bottomLeft:{points:["tl","bl"],overflow:Xn,offset:[0,4],targetOffset:Yn},bottom:{points:["tc","bc"],overflow:Xn,offset:[0,4],targetOffset:Yn},bottomRight:{points:["tr","br"],overflow:Xn,offset:[0,4],targetOffset:Yn}},Uv=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Gv(e,t){var r,n=e.arrow,o=n===void 0?!1:n,a=e.prefixCls,s=a===void 0?"rc-dropdown":a,i=e.transitionName,l=e.animation,c=e.align,d=e.placement,f=d===void 0?"bottomLeft":d,v=e.placements,h=v===void 0?Wv:v,p=e.getPopupContainer,g=e.showAction,y=e.hideAction,m=e.overlayClassName,C=e.overlayStyle,S=e.visible,x=e.trigger,E=x===void 0?["hover"]:x,N=e.autoFocus,R=e.overlay,M=e.children,_=e.onVisibleChange,A=Be(e,Uv),T=V.useState(),O=J(T,2),w=O[0],b=O[1],I="visible"in e?S:w,k=V.useRef(null),P=V.useRef(null),$=V.useRef(null);V.useImperativeHandle(t,function(){return k.current});var D=function(X){b(X),_==null||_(X)};Bv({visible:I,triggerRef:$,onVisibleChange:D,autoFocus:N,overlayRef:P});var K=function(X){var B=e.onOverlayClick;b(!1),B&&B(X)},L=function(){return V.createElement(jv,{ref:P,overlay:R,prefixCls:s,arrow:o})},H=function(){return typeof R=="function"?L:L()},z=function(){var X=e.minOverlayWidthMatchTrigger,B=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?X:!B},j=function(){var X=e.openClassName;return X!==void 0?X:"".concat(s,"-open")},G=V.cloneElement(M,{className:de((r=M.props)===null||r===void 0?void 0:r.className,I&&j()),ref:So(M)?ei($,M.ref):void 0}),Y=y;return!Y&&E.indexOf("contextMenu")!==-1&&(Y=["click"]),V.createElement(oi,ue({builtinPlacements:h},A,{prefixCls:s,ref:k,popupClassName:de(m,W({},"".concat(s,"-show-arrow"),o)),popupStyle:C,action:E,showAction:g,hideAction:Y,popupPlacement:f,popupAlign:c,popupTransitionName:i,popupAnimation:l,popupVisible:I,stretch:z()?"minWidth":"",popup:H(),onPopupVisibleChange:D,onPopupClick:K,getPopupContainer:p}),G)}const n5=V.forwardRef(Gv);var sc=u.createContext(null);function lc(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function cc(e){var t=u.useContext(sc);return lc(t,e)}var Xv=["children","locked"],sn=u.createContext(null);function Yv(e,t){var r=F({},e);return Object.keys(t).forEach(function(n){var o=t[n];o!==void 0&&(r[n]=o)}),r}function Lr(e){var t=e.children,r=e.locked,n=Be(e,Xv),o=u.useContext(sn),a=Fo(function(){return Yv(o,n)},[o,n],function(s,i){return!r&&(s[0]!==i[0]||!Yr(s[1],i[1],!0))});return u.createElement(sn.Provider,{value:a},t)}var qv=[],uc=u.createContext(null);function Uo(){return u.useContext(uc)}var dc=u.createContext(qv);function fr(e){var t=u.useContext(dc);return u.useMemo(function(){return e!==void 0?[].concat(qe(t),[e]):t},[t,e])}var fc=u.createContext(null),ii=u.createContext({});function ns(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Ll(e)){var r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),a=Number(o),s=null;return o&&!Number.isNaN(a)?s=a:n&&s===null&&(s=0),n&&e.disabled&&(s=null),s!==null&&(s>=0||t&&s<0)}return!1}function Zv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=qe(e.querySelectorAll("*")).filter(function(n){return ns(n,t)});return ns(e,t)&&r.unshift(e),r}var ka=ve.LEFT,Ia=ve.RIGHT,Ma=ve.UP,mo=ve.DOWN,go=ve.ENTER,vc=ve.ESC,wr=ve.HOME,Er=ve.END,rs=[Ma,mo,ka,Ia];function Jv(e,t,r,n){var o,a,s,i,l="prev",c="next",d="children",f="parent";if(e==="inline"&&n===go)return{inlineTrigger:!0};var v=(o={},W(o,Ma,l),W(o,mo,c),o),h=(a={},W(a,ka,r?c:l),W(a,Ia,r?l:c),W(a,mo,d),W(a,go,d),a),p=(s={},W(s,Ma,l),W(s,mo,c),W(s,go,d),W(s,vc,f),W(s,ka,r?d:f),W(s,Ia,r?f:d),s),g={inline:v,horizontal:h,vertical:p,inlineSub:v,horizontalSub:p,verticalSub:p},y=(i=g["".concat(e).concat(t?"":"Sub")])===null||i===void 0?void 0:i[n];switch(y){case l:return{offset:-1,sibling:!0};case c:return{offset:1,sibling:!0};case f:return{offset:-1,sibling:!1};case d:return{offset:1,sibling:!1};default:return null}}function Qv(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function eh(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function si(e,t){var r=Zv(e,!0);return r.filter(function(n){return t.has(n)})}function os(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=si(e,t),a=o.length,s=o.findIndex(function(i){return r===i});return n<0?s===-1?s=a-1:s-=1:n>0&&(s+=1),s=(s+a)%a,o[s]}var Pa=function(t,r){var n=new Set,o=new Map,a=new Map;return t.forEach(function(s){var i=document.querySelector("[data-menu-id='".concat(lc(r,s),"']"));i&&(n.add(i),a.set(i,s),o.set(s,i))}),{elements:n,key2element:o,element2key:a}};function th(e,t,r,n,o,a,s,i,l,c){var d=u.useRef(),f=u.useRef();f.current=t;var v=function(){It.cancel(d.current)};return u.useEffect(function(){return function(){v()}},[]),function(h){var p=h.which;if([].concat(rs,[go,vc,wr,Er]).includes(p)){var g=a(),y=Pa(g,n),m=y,C=m.elements,S=m.key2element,x=m.element2key,E=S.get(t),N=eh(E,C),R=x.get(N),M=Jv(e,s(R,!0).length===1,r,p);if(!M&&p!==wr&&p!==Er)return;(rs.includes(p)||[wr,Er].includes(p))&&h.preventDefault();var _=function(P){if(P){var $=P,D=P.querySelector("a");D!=null&&D.getAttribute("href")&&($=D);var K=x.get(P);i(K),v(),d.current=It(function(){f.current===K&&$.focus()})}};if([wr,Er].includes(p)||M.sibling||!N){var A;!N||e==="inline"?A=o.current:A=Qv(N);var T,O=si(A,C);p===wr?T=O[0]:p===Er?T=O[O.length-1]:T=os(A,C,N,M.offset),_(T)}else if(M.inlineTrigger)l(R);else if(M.offset>0)l(R,!0),v(),d.current=It(function(){y=Pa(g,n);var k=N.getAttribute("aria-controls"),P=document.getElementById(k),$=os(P,y.elements);_($)},5);else if(M.offset<0){var w=s(R,!0),b=w[w.length-2],I=S.get(b);l(b,!1),_(I)}}c==null||c(h)}}function nh(e){Promise.resolve().then(e)}var li="__RC_UTIL_PATH_SPLIT__",as=function(t){return t.join(li)},rh=function(t){return t.split(li)},Ta="rc-menu-more";function oh(){var e=u.useState({}),t=J(e,2),r=t[1],n=u.useRef(new Map),o=u.useRef(new Map),a=u.useState([]),s=J(a,2),i=s[0],l=s[1],c=u.useRef(0),d=u.useRef(!1),f=function(){d.current||r({})},v=u.useCallback(function(S,x){var E=as(x);o.current.set(E,S),n.current.set(S,E),c.current+=1;var N=c.current;nh(function(){N===c.current&&f()})},[]),h=u.useCallback(function(S,x){var E=as(x);o.current.delete(E),n.current.delete(S)},[]),p=u.useCallback(function(S){l(S)},[]),g=u.useCallback(function(S,x){var E=n.current.get(S)||"",N=rh(E);return x&&i.includes(N[0])&&N.unshift(Ta),N},[i]),y=u.useCallback(function(S,x){return S.some(function(E){var N=g(E,!0);return N.includes(x)})},[g]),m=function(){var x=qe(n.current.keys());return i.length&&x.push(Ta),x},C=u.useCallback(function(S){var x="".concat(n.current.get(S)).concat(li),E=new Set;return qe(o.current.keys()).forEach(function(N){N.startsWith(x)&&E.add(o.current.get(N))}),E},[]);return u.useEffect(function(){return function(){d.current=!0}},[]),{registerPath:v,unregisterPath:h,refreshOverflowKeys:p,isSubPathKey:y,getKeyPath:g,getKeys:m,getSubPathKeys:C}}function Tr(e){var t=u.useRef(e);t.current=e;var r=u.useCallback(function(){for(var n,o=arguments.length,a=new Array(o),s=0;s1&&(C.motionAppear=!1);var S=C.onVisibleChanged;return C.onVisibleChanged=function(x){return!v.current&&!x&&y(!0),S==null?void 0:S(x)},g?null:u.createElement(Lr,{mode:a,locked:!v.current},u.createElement(ri,ue({visible:m},C,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(i,"-hidden")}),function(x){var E=x.className,N=x.style;return u.createElement(ci,{id:t,className:E,style:N},o)}))}var bh=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Sh=["active"],wh=function(t){var r,n=t.style,o=t.className,a=t.title,s=t.eventKey;t.warnKey;var i=t.disabled,l=t.internalPopupClose,c=t.children,d=t.itemIcon,f=t.expandIcon,v=t.popupClassName,h=t.popupOffset,p=t.popupStyle,g=t.onClick,y=t.onMouseEnter,m=t.onMouseLeave,C=t.onTitleClick,S=t.onTitleMouseEnter,x=t.onTitleMouseLeave,E=Be(t,bh),N=cc(s),R=u.useContext(sn),M=R.prefixCls,_=R.mode,A=R.openKeys,T=R.disabled,O=R.overflowDisabled,w=R.activeKey,b=R.selectedKeys,I=R.itemIcon,k=R.expandIcon,P=R.onItemClick,$=R.onOpenChange,D=R.onActive,K=u.useContext(ii),L=K._internalRenderSubMenuItem,H=u.useContext(fc),z=H.isSubPathKey,j=fr(),G="".concat(M,"-submenu"),Y=T||i,ee=u.useRef(),X=u.useRef(),B=d??I,U=f??k,q=A.includes(s),oe=!O&&q,te=z(b,s),ie=hc(s,Y,S,x),Z=ie.active,ye=Be(ie,Sh),Ee=u.useState(!1),ne=J(Ee,2),ge=ne[0],re=ne[1],_e=function(Ve){Y||re(Ve)},fe=function(Ve){_e(!0),y==null||y({key:s,domEvent:Ve})},Me=function(Ve){_e(!1),m==null||m({key:s,domEvent:Ve})},be=u.useMemo(function(){return Z||(_!=="inline"?ge||z([w],s):!1)},[_,Z,w,ge,s,z]),Re=pc(j.length),se=function(Ve){Y||(C==null||C({key:s,domEvent:Ve}),_==="inline"&&$(s,!q))},Le=Tr(function(We){g==null||g(No(We)),P(We)}),$e=function(Ve){_!=="inline"&&$(s,Ve)},Ge=function(){D(s)},Ie=N&&"".concat(N,"-popup"),pe=u.createElement("div",ue({role:"menuitem",style:Re,className:"".concat(G,"-title"),tabIndex:Y?null:-1,ref:ee,title:typeof a=="string"?a:null,"data-menu-id":O&&N?null:N,"aria-expanded":oe,"aria-haspopup":!0,"aria-controls":Ie,"aria-disabled":Y,onClick:se,onFocus:Ge},ye),a,u.createElement(mc,{icon:_!=="horizontal"?U:void 0,props:F(F({},t),{},{isOpen:oe,isSubMenu:!0})},u.createElement("i",{className:"".concat(G,"-arrow")}))),je=u.useRef(_);if(_!=="inline"&&j.length>1?je.current="vertical":je.current=_,!O){var Ze=je.current;pe=u.createElement(Ch,{mode:Ze,prefixCls:G,visible:!l&&oe&&_!=="inline",popupClassName:v,popupOffset:h,popupStyle:p,popup:u.createElement(Lr,{mode:Ze==="horizontal"?"vertical":Ze},u.createElement(ci,{id:Ie,ref:X},c)),disabled:Y,onVisibleChange:$e},pe)}var rt=u.createElement(dn.Item,ue({role:"none"},E,{component:"li",style:n,className:de(G,"".concat(G,"-").concat(_),o,(r={},W(r,"".concat(G,"-open"),oe),W(r,"".concat(G,"-active"),be),W(r,"".concat(G,"-selected"),te),W(r,"".concat(G,"-disabled"),Y),r)),onMouseEnter:fe,onMouseLeave:Me}),pe,!O&&u.createElement(xh,{id:Ie,open:oe,keyPath:j},c));return L&&(rt=L(rt,t,{selected:te,active:be,open:oe,disabled:Y})),u.createElement(Lr,{onItemClick:Le,mode:_==="horizontal"?"vertical":_,itemIcon:B,expandIcon:U},rt)};function Go(e){var t=e.eventKey,r=e.children,n=fr(t),o=ui(r,n),a=Uo();u.useEffect(function(){if(a)return a.registerPath(t,n),function(){a.unregisterPath(t,n)}},[n]);var s;return a?s=o:s=u.createElement(wh,e,o),u.createElement(dc.Provider,{value:n},s)}var Eh=["className","title","eventKey","children"],Nh=["children"],_h=function(t){var r=t.className,n=t.title;t.eventKey;var o=t.children,a=Be(t,Eh),s=u.useContext(sn),i=s.prefixCls,l="".concat(i,"-item-group");return u.createElement("li",ue({role:"presentation"},a,{onClick:function(d){return d.stopPropagation()},className:de(l,r)}),u.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof n=="string"?n:void 0},n),u.createElement("ul",{role:"group",className:"".concat(l,"-list")},o))};function _o(e){var t=e.children,r=Be(e,Nh),n=fr(r.eventKey),o=ui(t,n),a=Uo();return a?o:u.createElement(_h,Bo(r,["warnKey"]),o)}function di(e){var t=e.className,r=e.style,n=u.useContext(sn),o=n.prefixCls,a=Uo();return a?null:u.createElement("li",{role:"separator",className:de("".concat(o,"-item-divider"),t),style:r})}var Rh=["label","children","key","type"];function $a(e){return(e||[]).map(function(t,r){if(t&&Rt(t)==="object"){var n=t,o=n.label,a=n.children,s=n.key,i=n.type,l=Be(n,Rh),c=s??"tmp-".concat(r);return a||i==="group"?i==="group"?u.createElement(_o,ue({key:c},l,{title:o}),$a(a)):u.createElement(Go,ue({key:c},l,{title:o}),$a(a)):i==="divider"?u.createElement(di,ue({key:c},l)):u.createElement(Vr,ue({key:c},l),o)}return null}).filter(function(t){return t})}function kh(e,t,r){var n=e;return t&&(n=$a(t)),ui(n,r)}var Ih=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],qn=[],Mh=u.forwardRef(function(e,t){var r,n,o=e,a=o.prefixCls,s=a===void 0?"rc-menu":a,i=o.rootClassName,l=o.style,c=o.className,d=o.tabIndex,f=d===void 0?0:d,v=o.items,h=o.children,p=o.direction,g=o.id,y=o.mode,m=y===void 0?"vertical":y,C=o.inlineCollapsed,S=o.disabled,x=o.disabledOverflow,E=o.subMenuOpenDelay,N=E===void 0?.1:E,R=o.subMenuCloseDelay,M=R===void 0?.1:R,_=o.forceSubMenuRender,A=o.defaultOpenKeys,T=o.openKeys,O=o.activeKey,w=o.defaultActiveFirst,b=o.selectable,I=b===void 0?!0:b,k=o.multiple,P=k===void 0?!1:k,$=o.defaultSelectedKeys,D=o.selectedKeys,K=o.onSelect,L=o.onDeselect,H=o.inlineIndent,z=H===void 0?24:H,j=o.motion,G=o.defaultMotions,Y=o.triggerSubMenuAction,ee=Y===void 0?"hover":Y,X=o.builtinPlacements,B=o.itemIcon,U=o.expandIcon,q=o.overflowedIndicator,oe=q===void 0?"...":q,te=o.overflowedIndicatorPopupClassName,ie=o.getPopupContainer,Z=o.onClick,ye=o.onOpenChange,Ee=o.onKeyDown;o.openAnimation,o.openTransitionName;var ne=o._internalRenderMenuItem,ge=o._internalRenderSubMenuItem,re=Be(o,Ih),_e=u.useMemo(function(){return kh(h,v,qn)},[h,v]),fe=u.useState(!1),Me=J(fe,2),be=Me[0],Re=Me[1],se=u.useRef(),Le=ih(g),$e=p==="rtl",Ge=en(A,{value:T,postState:function(Pe){return Pe||qn}}),Ie=J(Ge,2),pe=Ie[0],je=Ie[1],Ze=function(Pe){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Ye(){je(Pe),ye==null||ye(Pe)}Ke?Kr.flushSync(Ye):Ye()},rt=u.useState(pe),We=J(rt,2),Ve=We[0],ct=We[1],ut=u.useRef(!1),Qe=u.useMemo(function(){return(m==="inline"||m==="vertical")&&C?["vertical",C]:[m,!1]},[m,C]),wt=J(Qe,2),ft=wt[0],dt=wt[1],mt=ft==="inline",gt=u.useState(ft),ot=J(gt,2),ze=ot[0],Ce=ot[1],Te=u.useState(dt),Q=J(Te,2),le=Q[0],ae=Q[1];u.useEffect(function(){Ce(ft),ae(dt),ut.current&&(mt?je(Ve):Ze(qn))},[ft,dt]);var ce=u.useState(0),Oe=J(ce,2),Fe=Oe[0],yt=Oe[1],Xe=Fe>=_e.length-1||ze!=="horizontal"||x;u.useEffect(function(){mt&&ct(pe)},[pe]),u.useEffect(function(){return ut.current=!0,function(){ut.current=!1}},[]);var et=oh(),tt=et.registerPath,at=et.unregisterPath,pt=et.refreshOverflowKeys,Mt=et.isSubPathKey,Se=et.getKeyPath,me=et.getKeys,ke=et.getSubPathKeys,nt=u.useMemo(function(){return{registerPath:tt,unregisterPath:at}},[tt,at]),lt=u.useMemo(function(){return{isSubPathKey:Mt}},[Mt]);u.useEffect(function(){pt(Xe?qn:_e.slice(Fe+1).map(function(he){return he.key}))},[Fe,Xe]);var Ct=en(O||w&&((r=_e[0])===null||r===void 0?void 0:r.key),{value:O}),Nt=J(Ct,2),_t=Nt[0],Pt=Nt[1],Ot=Tr(function(he){Pt(he)}),xt=Tr(function(){Pt(void 0)});u.useImperativeHandle(t,function(){return{list:se.current,focus:function(Pe){var Ke,Ye=me(),st=Pa(Ye,Le),Et=st.elements,jt=st.key2element,Wt=st.element2key,Ut=si(se.current,Et),Ht=_t??(Ut[0]?Wt.get(Ut[0]):(Ke=_e.find(function(Je){return!Je.props.disabled}))===null||Ke===void 0?void 0:Ke.key),cn=jt.get(Ht);if(Ht&&cn){var He;cn==null||(He=cn.focus)===null||He===void 0||He.call(cn,Pe)}}}});var Lt=en($||[],{value:D,postState:function(Pe){return Array.isArray(Pe)?Pe:Pe==null?qn:[Pe]}}),qt=J(Lt,2),xe=qt[0],De=qt[1],it=function(Pe){if(I){var Ke=Pe.key,Ye=xe.includes(Ke),st;P?Ye?st=xe.filter(function(jt){return jt!==Ke}):st=[].concat(qe(xe),[Ke]):st=[Ke],De(st);var Et=F(F({},Pe),{},{selectedKeys:st});Ye?L==null||L(Et):K==null||K(Et)}!P&&pe.length&&ze!=="inline"&&Ze(qn)},Vt=Tr(function(he){Z==null||Z(No(he)),it(he)}),nn=Tr(function(he,Pe){var Ke=pe.filter(function(st){return st!==he});if(Pe)Ke.push(he);else if(ze!=="inline"){var Ye=ke(he);Ke=Ke.filter(function(st){return!Ye.has(st)})}Yr(pe,Ke,!0)||Ze(Ke,!0)}),xr=function(Pe,Ke){var Ye=Ke??!pe.includes(Pe);nn(Pe,Ye)},Wn=th(ze,_t,$e,Le,se,me,Se,Pt,xr,Ee);u.useEffect(function(){Re(!0)},[]);var hn=u.useMemo(function(){return{_internalRenderMenuItem:ne,_internalRenderSubMenuItem:ge}},[ne,ge]),pn=ze!=="horizontal"||x?_e:_e.map(function(he,Pe){return u.createElement(Lr,{key:he.key,overflowDisabled:Pe>Fe},he)}),Ae=u.createElement(dn,ue({id:g,ref:se,prefixCls:"".concat(s,"-overflow"),component:"ul",itemComponent:Vr,className:de(s,"".concat(s,"-root"),"".concat(s,"-").concat(ze),c,(n={},W(n,"".concat(s,"-inline-collapsed"),le),W(n,"".concat(s,"-rtl"),$e),n),i),dir:p,style:l,role:"menu",tabIndex:f,data:pn,renderRawItem:function(Pe){return Pe},renderRawRest:function(Pe){var Ke=Pe.length,Ye=Ke?_e.slice(-Ke):null;return u.createElement(Go,{eventKey:Ta,title:oe,disabled:Xe,internalPopupClose:Ke===0,popupClassName:te},Ye)},maxCount:ze!=="horizontal"||x?dn.INVALIDATE:dn.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Pe){yt(Pe)},onKeyDown:Wn},re));return u.createElement(ii.Provider,{value:hn},u.createElement(sc.Provider,{value:Le},u.createElement(Lr,{prefixCls:s,rootClassName:i,mode:ze,openKeys:pe,rtl:$e,disabled:S,motion:be?j:null,defaultMotions:be?G:null,activeKey:_t,onActive:Ot,onInactive:xt,selectedKeys:xe,inlineIndent:z,subMenuOpenDelay:N,subMenuCloseDelay:M,forceSubMenuRender:_,builtinPlacements:X,triggerSubMenuAction:ee,getPopupContainer:ie,itemIcon:B,expandIcon:U,onItemClick:Vt,onOpenChange:nn},u.createElement(fc.Provider,{value:lt},Ae),u.createElement("div",{style:{display:"none"},"aria-hidden":!0},u.createElement(uc.Provider,{value:nt},_e)))))}),qr=Mh;qr.Item=Vr;qr.SubMenu=Go;qr.ItemGroup=_o;qr.Divider=di;const r5=Object.freeze(Object.defineProperty({__proto__:null,Divider:di,Item:Vr,ItemGroup:_o,MenuItem:Vr,MenuItemGroup:_o,SubMenu:Go,default:qr,useFullPath:fr},Symbol.toStringTag,{value:"Module"}));var Ph=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],ss=u.forwardRef(function(e,t){var r,n=e.prefixCls,o=n===void 0?"rc-checkbox":n,a=e.className,s=e.style,i=e.checked,l=e.disabled,c=e.defaultChecked,d=c===void 0?!1:c,f=e.type,v=f===void 0?"checkbox":f,h=e.title,p=e.onChange,g=Be(e,Ph),y=u.useRef(null),m=en(d,{value:i}),C=J(m,2),S=C[0],x=C[1];u.useImperativeHandle(t,function(){return{focus:function(){var M;(M=y.current)===null||M===void 0||M.focus()},blur:function(){var M;(M=y.current)===null||M===void 0||M.blur()},input:y.current}});var E=de(o,a,(r={},W(r,"".concat(o,"-checked"),S),W(r,"".concat(o,"-disabled"),l),r)),N=function(M){l||("checked"in e||x(M.target.checked),p==null||p({target:F(F({},e),{},{type:v,checked:M.target.checked}),stopPropagation:function(){M.stopPropagation()},preventDefault:function(){M.preventDefault()},nativeEvent:M.nativeEvent}))};return u.createElement("span",{className:E,title:h,style:s},u.createElement("input",ue({},g,{className:"".concat(o,"-input"),ref:y,onChange:N,disabled:l,checked:!!S,type:v})),u.createElement("span",{className:"".concat(o,"-inner")}))});const o5=Object.freeze(Object.defineProperty({__proto__:null,Checkbox:ss,default:ss},Symbol.toStringTag,{value:"Module"}));function yc(e,t,r){var n=r||{},o=n.noTrailing,a=o===void 0?!1:o,s=n.noLeading,i=s===void 0?!1:s,l=n.debounceMode,c=l===void 0?void 0:l,d,f=!1,v=0;function h(){d&&clearTimeout(d)}function p(y){var m=y||{},C=m.upcomingOnly,S=C===void 0?!1:C;h(),f=!S}function g(){for(var y=arguments.length,m=new Array(y),C=0;Ce?i?(v=Date.now(),a||(d=setTimeout(c?N:E,e))):E():a!==!0&&(d=setTimeout(c?N:E,c===void 0?e-x:e))}return g.cancel=p,g}function Th(e,t,r){var n=r||{},o=n.atBegin,a=o===void 0?!1:o;return yc(e,t,{debounceMode:a!==!1})}const a5=Object.freeze(Object.defineProperty({__proto__:null,debounce:Th,throttle:yc},Symbol.toStringTag,{value:"Module"}));function Gt(e,t){return e[t]}var $h=["children"];function Cc(e,t){return"".concat(e,"-").concat(t)}function Oh(e){return e&&e.type&&e.type.isTreeNode}function Zr(e,t){return e??t}function Ro(e){var t=e||{},r=t.title,n=t._title,o=t.key,a=t.children,s=r||"title";return{title:s,_title:n||[s],key:o||"key",children:a||"children"}}function Dh(e){function t(r){var n=Xr(r);return n.map(function(o){if(!Oh(o))return Jt(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var a=o.key,s=o.props,i=s.children,l=Be(s,$h),c=F({key:a},l),d=t(i);return d.length&&(c.children=d),c}).filter(function(o){return o})}return t(e)}function fa(e,t,r){var n=Ro(r),o=n._title,a=n.key,s=n.children,i=new Set(t===!0?[]:t),l=[];function c(d){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return d.map(function(v,h){for(var p=Cc(f?f.pos:"0",h),g=Zr(v[a],p),y,m=0;m1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,o=t.onProcessFinished,a=t.externalGetKey,s=t.childrenPropName,i=t.fieldNames,l=arguments.length>2?arguments[2]:void 0,c=a||l,d={},f={},v={posEntities:d,keyEntities:f};return r&&(v=r(v)||v),Ah(e,function(h){var p=h.node,g=h.index,y=h.pos,m=h.key,C=h.parentPos,S=h.level,x=h.nodes,E={node:p,nodes:x,index:g,key:m,pos:y,level:S},N=Zr(m,y);d[y]=E,f[N]=E,E.parent=d[C],E.parent&&(E.parent.children=E.parent.children||[],E.parent.children.push(E)),n&&n(E,v)},{externalGetKey:c,childrenPropName:s,fieldNames:i}),o&&o(v),v}function Ar(e,t){var r=t.expandedKeys,n=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,s=t.checkedKeys,i=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,d=t.keyEntities,f=Gt(d,e),v={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:o.indexOf(e)!==-1,loading:a.indexOf(e)!==-1,checked:s.indexOf(e)!==-1,halfChecked:i.indexOf(e)!==-1,pos:String(f?f.pos:""),dragOver:l===e&&c===0,dragOverGapTop:l===e&&c===-1,dragOverGapBottom:l===e&&c===1};return v}function bt(e){var t=e.data,r=e.expanded,n=e.selected,o=e.checked,a=e.loaded,s=e.loading,i=e.halfChecked,l=e.dragOver,c=e.dragOverGapTop,d=e.dragOverGapBottom,f=e.pos,v=e.active,h=e.eventKey,p=F(F({},t),{},{expanded:r,selected:n,checked:o,loaded:a,loading:s,halfChecked:i,dragOver:l,dragOverGapTop:c,dragOverGapBottom:d,pos:f,active:v,key:h});return"props"in p||Object.defineProperty(p,"props",{get:function(){return Jt(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),p}function xc(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function Lh(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,o=t.checkable;return!!(r||n)||o===!1}function Vh(e,t,r,n){for(var o=new Set(e),a=new Set,s=0;s<=r;s+=1){var i=t.get(s)||new Set;i.forEach(function(f){var v=f.key,h=f.node,p=f.children,g=p===void 0?[]:p;o.has(v)&&!n(h)&&g.filter(function(y){return!n(y.node)}).forEach(function(y){o.add(y.key)})})}for(var l=new Set,c=r;c>=0;c-=1){var d=t.get(c)||new Set;d.forEach(function(f){var v=f.parent,h=f.node;if(!(n(h)||!f.parent||l.has(f.parent.key))){if(n(f.parent.node)){l.add(v.key);return}var p=!0,g=!1;(v.children||[]).filter(function(y){return!n(y.node)}).forEach(function(y){var m=y.key,C=o.has(m);p&&!C&&(p=!1),!g&&(C||a.has(m))&&(g=!0)}),p&&o.add(v.key),g&&a.add(v.key),l.add(v.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(xc(a,o))}}function Hh(e,t,r,n,o){for(var a=new Set(e),s=new Set(t),i=0;i<=n;i+=1){var l=r.get(i)||new Set;l.forEach(function(v){var h=v.key,p=v.node,g=v.children,y=g===void 0?[]:g;!a.has(h)&&!s.has(h)&&!o(p)&&y.filter(function(m){return!o(m.node)}).forEach(function(m){a.delete(m.key)})})}s=new Set;for(var c=new Set,d=n;d>=0;d-=1){var f=r.get(d)||new Set;f.forEach(function(v){var h=v.parent,p=v.node;if(!(o(p)||!v.parent||c.has(v.parent.key))){if(o(v.parent.node)){c.add(h.key);return}var g=!0,y=!1;(h.children||[]).filter(function(m){return!o(m.node)}).forEach(function(m){var C=m.key,S=a.has(C);g&&!S&&(g=!1),!y&&(S||s.has(C))&&(y=!0)}),g||a.delete(h.key),y&&s.add(h.key),c.add(h.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(xc(s,a))}}function va(e,t,r,n){var o=[],a;n?a=n:a=Lh;var s=new Set(e.filter(function(d){var f=!!Gt(r,d);return f||o.push(d),f})),i=new Map,l=0;Object.keys(r).forEach(function(d){var f=r[d],v=f.level,h=i.get(v);h||(h=new Set,i.set(v,h)),h.add(f),l=Math.max(l,v)}),Jt(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(d){return"'".concat(d,"'")}).join(", ")));var c;return t===!0?c=Vh(s,i,l,a):c=Hh(s,t.halfCheckedKeys,i,l,a),c}var bc=V.forwardRef(function(e,t){var r,n=e.prefixCls,o=e.forceRender,a=e.className,s=e.style,i=e.children,l=e.isActive,c=e.role,d=V.useState(l||o),f=J(d,2),v=f[0],h=f[1];return V.useEffect(function(){(o||l)&&h(!0)},[o,l]),v?V.createElement("div",{ref:t,className:de("".concat(n,"-content"),(r={},W(r,"".concat(n,"-content-active"),l),W(r,"".concat(n,"-content-inactive"),!l),r),a),style:s,role:c},V.createElement("div",{className:"".concat(n,"-content-box")},i)):null});bc.displayName="PanelContent";var zh=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],Sc=V.forwardRef(function(e,t){var r,n,o=e.showArrow,a=o===void 0?!0:o,s=e.headerClass,i=e.isActive,l=e.onItemClick,c=e.forceRender,d=e.className,f=e.prefixCls,v=e.collapsible,h=e.accordion,p=e.panelKey,g=e.extra,y=e.header,m=e.expandIcon,C=e.openMotion,S=e.destroyInactivePanel,x=e.children,E=Be(e,zh),N=v==="disabled",R=v==="header",M=v==="icon",_=g!=null&&typeof g!="boolean",A=function(){l==null||l(p)},T=function(P){(P.key==="Enter"||P.keyCode===ve.ENTER||P.which===ve.ENTER)&&A()},O=typeof m=="function"?m(e):V.createElement("i",{className:"arrow"});O&&(O=V.createElement("div",{className:"".concat(f,"-expand-icon"),onClick:["header","icon"].includes(v)?A:void 0},O));var w=de((r={},W(r,"".concat(f,"-item"),!0),W(r,"".concat(f,"-item-active"),i),W(r,"".concat(f,"-item-disabled"),N),r),d),b=de(s,(n={},W(n,"".concat(f,"-header"),!0),W(n,"".concat(f,"-header-collapsible-only"),R),W(n,"".concat(f,"-icon-collapsible-only"),M),n)),I={className:b,"aria-expanded":i,"aria-disabled":N,onKeyDown:T};return!R&&!M&&(I.onClick=A,I.role=h?"tab":"button",I.tabIndex=N?-1:0),V.createElement("div",ue({},E,{ref:t,className:w}),V.createElement("div",I,a&&O,V.createElement("span",{className:"".concat(f,"-header-text"),onClick:v==="header"?A:void 0},y),_&&V.createElement("div",{className:"".concat(f,"-extra")},g)),V.createElement(ri,ue({visible:i,leavedClassName:"".concat(f,"-content-hidden")},C,{forceRender:c,removeOnLeave:S}),function(k,P){var $=k.className,D=k.style;return V.createElement(bc,{ref:P,prefixCls:f,className:$,style:D,isActive:i,forceRender:c,role:h?"tabpanel":void 0},x)}))}),Fh=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Bh=function(t,r){var n=r.prefixCls,o=r.accordion,a=r.collapsible,s=r.destroyInactivePanel,i=r.onItemClick,l=r.activeKey,c=r.openMotion,d=r.expandIcon;return t.map(function(f,v){var h=f.children,p=f.label,g=f.key,y=f.collapsible,m=f.onItemClick,C=f.destroyInactivePanel,S=Be(f,Fh),x=String(g??v),E=y??a,N=C??s,R=function(A){E!=="disabled"&&(i(A),m==null||m(A))},M=!1;return o?M=l[0]===x:M=l.indexOf(x)>-1,V.createElement(Sc,ue({},S,{prefixCls:n,key:x,panelKey:x,isActive:M,accordion:o,openMotion:c,expandIcon:d,header:p,collapsible:E,onItemClick:R,destroyInactivePanel:N}),h)})},jh=function(t,r,n){if(!t)return null;var o=n.prefixCls,a=n.accordion,s=n.collapsible,i=n.destroyInactivePanel,l=n.onItemClick,c=n.activeKey,d=n.openMotion,f=n.expandIcon,v=t.key||String(r),h=t.props,p=h.header,g=h.headerClass,y=h.destroyInactivePanel,m=h.collapsible,C=h.onItemClick,S=!1;a?S=c[0]===v:S=c.indexOf(v)>-1;var x=m??s,E=function(M){x!=="disabled"&&(l(M),C==null||C(M))},N={key:v,panelKey:v,header:p,headerClass:g,isActive:S,prefixCls:o,destroyInactivePanel:y??i,openMotion:d,accordion:a,children:t.props.children,onItemClick:E,expandIcon:f,collapsible:x};return typeof t.type=="string"?t:(Object.keys(N).forEach(function(R){typeof N[R]>"u"&&delete N[R]}),V.cloneElement(t,N))};function Wh(e,t,r){return Array.isArray(e)?Bh(e,r):Xr(t).map(function(n,o){return jh(n,o,r)})}function Uh(e){var t=e;if(!Array.isArray(t)){var r=Rt(t);t=r==="number"||r==="string"?[t]:[]}return t.map(function(n){return String(n)})}var Gh=V.forwardRef(function(e,t){var r=e.prefixCls,n=r===void 0?"rc-collapse":r,o=e.destroyInactivePanel,a=o===void 0?!1:o,s=e.style,i=e.accordion,l=e.className,c=e.children,d=e.collapsible,f=e.openMotion,v=e.expandIcon,h=e.activeKey,p=e.defaultActiveKey,g=e.onChange,y=e.items,m=de(n,l),C=en([],{value:h,onChange:function(_){return g==null?void 0:g(_)},defaultValue:p,postState:Uh}),S=J(C,2),x=S[0],E=S[1],N=function(_){return E(function(){if(i)return x[0]===_?[]:[_];var A=x.indexOf(_),T=A>-1;return T?x.filter(function(O){return O!==_}):[].concat(qe(x),[_])})};Jt(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var R=Wh(y,c,{prefixCls:n,accordion:i,openMotion:f,expandIcon:v,collapsible:d,destroyInactivePanel:a,onItemClick:N,activeKey:x});return V.createElement("div",{ref:t,className:m,style:s,role:i?"tablist":void 0},R)});const wc=Object.assign(Gh,{Panel:Sc});var Xh=wc.Panel;const i5=Object.freeze(Object.defineProperty({__proto__:null,Panel:Xh,default:wc},Symbol.toStringTag,{value:"Module"}));function s5(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function ls(e){var t=e.getBoundingClientRect(),r=document.documentElement;return{left:t.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||document.body.clientTop||0)}}function ro(e,t,r,n){var o=zi.unstable_batchedUpdates?function(s){zi.unstable_batchedUpdates(r,s)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,o,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,o,n)}}}var Yh={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},qh=["10","20","50","100"],Zh=function(t){var r=t.pageSizeOptions,n=r===void 0?qh:r,o=t.locale,a=t.changeSize,s=t.pageSize,i=t.goButton,l=t.quickGo,c=t.rootPrefixCls,d=t.selectComponentClass,f=t.selectPrefixCls,v=t.disabled,h=t.buildOptionText,p=V.useState(""),g=J(p,2),y=g[0],m=g[1],C=function(){return!y||Number.isNaN(y)?void 0:Number(y)},S=typeof h=="function"?h:function(b){return"".concat(b," ").concat(o.items_per_page)},x=function(I){a==null||a(Number(I))},E=function(I){m(I.target.value)},N=function(I){i||y===""||(m(""),!(I.relatedTarget&&(I.relatedTarget.className.indexOf("".concat(c,"-item-link"))>=0||I.relatedTarget.className.indexOf("".concat(c,"-item"))>=0))&&(l==null||l(C())))},R=function(I){y!==""&&(I.keyCode===ve.ENTER||I.type==="click")&&(m(""),l==null||l(C()))},M=function(){return n.some(function(I){return I.toString()===s.toString()})?n:n.concat([s.toString()]).sort(function(I,k){var P=Number.isNaN(Number(I))?0:Number(I),$=Number.isNaN(Number(k))?0:Number(k);return P-$})},_="".concat(c,"-options");if(!a&&!l)return null;var A=null,T=null,O=null;if(a&&d){var w=M().map(function(b,I){return V.createElement(d.Option,{key:I,value:b.toString()},S(b))});A=V.createElement(d,{disabled:v,prefixCls:f,showSearch:!1,className:"".concat(_,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(s||n[0]).toString(),onChange:x,getPopupContainer:function(I){return I.parentNode},"aria-label":o.page_size,defaultOpen:!1},w)}return l&&(i&&(O=typeof i=="boolean"?V.createElement("button",{type:"button",onClick:R,onKeyUp:R,disabled:v,className:"".concat(_,"-quick-jumper-button")},o.jump_to_confirm):V.createElement("span",{onClick:R,onKeyUp:R},i)),T=V.createElement("div",{className:"".concat(_,"-quick-jumper")},o.jump_to,V.createElement("input",{disabled:v,type:"text",value:y,onChange:E,onKeyUp:R,onBlur:N,"aria-label":o.page}),o.page,O)),V.createElement("li",{className:_},A,T)},Nr=function(t){var r,n=t.rootPrefixCls,o=t.page,a=t.active,s=t.className,i=t.showTitle,l=t.onClick,c=t.onKeyPress,d=t.itemRender,f="".concat(n,"-item"),v=de(f,"".concat(f,"-").concat(o),(r={},W(r,"".concat(f,"-active"),a),W(r,"".concat(f,"-disabled"),!o),r),s),h=function(){l(o)},p=function(m){c(m,l,o)},g=d(o,"page",V.createElement("a",{rel:"nofollow"},o));return g?V.createElement("li",{title:i?String(o):null,className:v,onClick:h,onKeyDown:p,tabIndex:0},g):null},Jh=function(t,r,n){return n};function cs(){}function us(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function $n(e,t,r){var n=typeof e>"u"?t:e;return Math.floor((r-1)/n)+1}var l5=function(t){var r,n=t.prefixCls,o=n===void 0?"rc-pagination":n,a=t.selectPrefixCls,s=a===void 0?"rc-select":a,i=t.className,l=t.selectComponentClass,c=t.current,d=t.defaultCurrent,f=d===void 0?1:d,v=t.total,h=v===void 0?0:v,p=t.pageSize,g=t.defaultPageSize,y=g===void 0?10:g,m=t.onChange,C=m===void 0?cs:m,S=t.hideOnSinglePage,x=t.showPrevNextJumpers,E=x===void 0?!0:x,N=t.showQuickJumper,R=t.showLessItems,M=t.showTitle,_=M===void 0?!0:M,A=t.onShowSizeChange,T=A===void 0?cs:A,O=t.locale,w=O===void 0?Yh:O,b=t.style,I=t.totalBoundaryShowSizeChanger,k=I===void 0?50:I,P=t.disabled,$=t.simple,D=t.showTotal,K=t.showSizeChanger,L=t.pageSizeOptions,H=t.itemRender,z=H===void 0?Jh:H,j=t.jumpPrevIcon,G=t.jumpNextIcon,Y=t.prevIcon,ee=t.nextIcon,X=V.useRef(null),B=en(10,{value:p,defaultValue:y}),U=J(B,2),q=U[0],oe=U[1],te=en(1,{value:c,defaultValue:f,postState:function(De){return Math.max(1,Math.min(De,$n(void 0,q,h)))}}),ie=J(te,2),Z=ie[0],ye=ie[1],Ee=V.useState(Z),ne=J(Ee,2),ge=ne[0],re=ne[1];u.useEffect(function(){re(Z)},[Z]);var _e=Math.max(1,Z-(R?3:5)),fe=Math.min($n(void 0,q,h),Z+(R?3:5));function Me(xe,De){var it=xe||V.createElement("button",{type:"button","aria-label":De,className:"".concat(o,"-item-link")});return typeof xe=="function"&&(it=V.createElement(xe,F({},t))),it}function be(xe){var De=xe.target.value,it=$n(void 0,q,h),Vt;return De===""?Vt=De:Number.isNaN(Number(De))?Vt=ge:De>=it?Vt=it:Vt=Number(De),Vt}function Re(xe){return us(xe)&&xe!==Z&&us(h)&&h>0}var se=h>q?N:!1;function Le(xe){(xe.keyCode===ve.UP||xe.keyCode===ve.DOWN)&&xe.preventDefault()}function $e(xe){var De=be(xe);switch(De!==ge&&re(De),xe.keyCode){case ve.ENTER:pe(De);break;case ve.UP:pe(De-1);break;case ve.DOWN:pe(De+1);break}}function Ge(xe){pe(be(xe))}function Ie(xe){var De=$n(xe,q,h),it=Z>De&&De!==0?De:Z;oe(xe),re(it),T==null||T(Z,xe),ye(it),C==null||C(it,xe)}function pe(xe){if(Re(xe)&&!P){var De=$n(void 0,q,h),it=xe;return xe>De?it=De:xe<1&&(it=1),it!==ge&&re(it),ye(it),C==null||C(it,q),it}return Z}var je=Z>1,Ze=Z<$n(void 0,q,h),rt=K??h>k;function We(){je&&pe(Z-1)}function Ve(){Ze&&pe(Z+1)}function ct(){pe(_e)}function ut(){pe(fe)}function Qe(xe,De){if(xe.key==="Enter"||xe.charCode===ve.ENTER||xe.keyCode===ve.ENTER){for(var it=arguments.length,Vt=new Array(it>2?it-2:0),nn=2;nnh?h:Z*q])),le=null,ae=$n(void 0,q,h);if(S&&h<=q)return null;var ce=[],Oe={rootPrefixCls:o,onClick:pe,onKeyPress:Qe,showTitle:_,itemRender:z,page:-1},Fe=Z-1>0?Z-1:0,yt=Z+1=at*2&&Z!==1+2&&(ce[0]=V.cloneElement(ce[0],{className:de("".concat(o,"-item-after-jump-prev"),ce[0].props.className)}),ce.unshift(Ce)),ae-Z>=at*2&&Z!==ae-2){var Nt=ce[ce.length-1];ce[ce.length-1]=V.cloneElement(Nt,{className:de("".concat(o,"-item-before-jump-next"),Nt.props.className)}),ce.push(le)}nt!==1&&ce.unshift(V.createElement(Nr,ue({},Oe,{key:1,page:1}))),lt!==ae&&ce.push(V.createElement(Nr,ue({},Oe,{key:ae,page:ae})))}var _t=gt(Fe);if(_t){var Pt=!je||!ae;_t=V.createElement("li",{title:_?w.prev_page:null,onClick:We,tabIndex:Pt?null:0,onKeyDown:wt,className:de("".concat(o,"-prev"),W({},"".concat(o,"-disabled"),Pt)),"aria-disabled":Pt},_t)}var Ot=ot(yt);if(Ot){var xt,Lt;$?(xt=!Ze,Lt=je?0:null):(xt=!Ze||!ae,Lt=xt?null:0),Ot=V.createElement("li",{title:_?w.next_page:null,onClick:Ve,tabIndex:Lt,onKeyDown:ft,className:de("".concat(o,"-next"),W({},"".concat(o,"-disabled"),xt)),"aria-disabled":xt},Ot)}var qt=de(o,i,(r={},W(r,"".concat(o,"-simple"),$),W(r,"".concat(o,"-disabled"),P),r));return V.createElement("ul",ue({className:qt,style:b,ref:X},Te),Q,_t,$?tt:ce,Ot,V.createElement(Zh,{locale:w,rootPrefixCls:o,disabled:P,selectComponentClass:l,selectPrefixCls:s,changeSize:rt?Ie:null,pageSize:q,pageSizeOptions:L,quickGo:se?pe:null,goButton:et}))},On={},Xo="rc-table-internal-hook";function fi(e){var t=u.createContext(void 0),r=function(o){var a=o.value,s=o.children,i=u.useRef(a);i.current=a;var l=u.useState(function(){return{getValue:function(){return i.current},listeners:new Set}}),c=J(l,1),d=c[0];return Xt(function(){Kr.unstable_batchedUpdates(function(){d.listeners.forEach(function(f){f(a)})})},[a]),u.createElement(t.Provider,{value:d},s)};return{Context:t,Provider:r,defaultValue:e}}function Kt(e,t){var r=Mn(typeof t=="function"?t:function(f){if(t===void 0)return f;if(!Array.isArray(t))return f[t];var v={};return t.forEach(function(h){v[h]=f[h]}),v}),n=u.useContext(e==null?void 0:e.Context),o=n||{},a=o.listeners,s=o.getValue,i=u.useRef();i.current=r(n?s():e==null?void 0:e.defaultValue);var l=u.useState({}),c=J(l,2),d=c[1];return Xt(function(){if(!n)return;function f(v){var h=r(v);Yr(i.current,h,!0)||d({})}return a.add(f),function(){a.delete(f)}},[n]),i.current}function Qh(){var e=u.createContext(null);function t(){return u.useContext(e)}function r(o,a){var s=So(o),i=function(c,d){var f=s?{ref:d}:{},v=u.useRef(0),h=u.useRef(c),p=t();return p!==null?u.createElement(o,ue({},c,f)):((!a||a(h.current,c))&&(v.current+=1),h.current=c,u.createElement(e.Provider,{value:v.current},u.createElement(o,ue({},c,f))))};return s?u.forwardRef(i):i}function n(o,a){var s=So(o),i=function(c,d){var f=s?{ref:d}:{};return t(),u.createElement(o,ue({},c,f))};return s?u.memo(u.forwardRef(i),a):u.memo(i,a)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var vi=Qh(),Ec=vi.makeImmutable,vr=vi.responseImmutable,ep=vi.useImmutableMark,Bt=fi();function tp(e,t){var r=u.useRef(0);r.current+=1;var n=u.useRef(e),o=[];Object.keys(e||{}).map(function(s){var i;(e==null?void 0:e[s])!==((i=n.current)===null||i===void 0?void 0:i[s])&&o.push(s)}),n.current=e;var a=u.useRef([]);return o.length&&(a.current=o),u.useDebugValue(r.current),u.useDebugValue(a.current.join(", ")),t&&console.log("".concat(t,":"),r.current,a.current),r.current}var np=u.memo(function(){var e=tp();return u.createElement("h1",null,"Render Times: ",e)});np.displayName="RenderBlock";var Nc=u.createContext({renderWithProps:!1}),rp="RC_TABLE_KEY";function op(e){return e==null?[]:Array.isArray(e)?e:[e]}function Yo(e){var t=[],r={};return e.forEach(function(n){for(var o=n||{},a=o.key,s=o.dataIndex,i=a||op(s).join("-")||rp;r[i];)i="".concat(i,"_next");r[i]=!0,t.push(i)}),t}function Oa(e){return e!=null}function ap(e){return e&&Rt(e)==="object"&&!Array.isArray(e)&&!u.isValidElement(e)}function ip(e,t,r,n,o,a){var s=u.useContext(Nc),i=ep(),l=Fo(function(){if(Oa(n))return[n];var c=t==null||t===""?[]:Array.isArray(t)?t:[t],d=Vl(e,c),f=d,v=void 0;if(o){var h=o(d,e,r);ap(h)?(f=h.children,v=h.props,s.renderWithProps=!0):f=h}return[f,v]},[i,e,n,t,o,r],function(c,d){if(a){var f=J(c,2),v=f[1],h=J(d,2),p=h[1];return a(p,v)}return s.renderWithProps?!0:!Yr(c,d,!0)});return l}function sp(e,t,r,n){var o=e+t-1;return e<=n&&o>=r}function lp(e,t){return Kt(Bt,function(r){var n=sp(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var cp=function(t){var r=t.ellipsis,n=t.rowType,o=t.children,a,s=r===!0?{showTitle:!0}:r;return s&&(s.showTitle||n==="header")&&(typeof o=="string"||typeof o=="number"?a=o.toString():u.isValidElement(o)&&typeof o.props.children=="string"&&(a=o.props.children)),a};function up(e){var t,r,n,o,a,s,i,l,c=e.component,d=e.children,f=e.ellipsis,v=e.scope,h=e.prefixCls,p=e.className,g=e.align,y=e.record,m=e.render,C=e.dataIndex,S=e.renderIndex,x=e.shouldCellUpdate,E=e.index,N=e.rowType,R=e.colSpan,M=e.rowSpan,_=e.fixLeft,A=e.fixRight,T=e.firstFixLeft,O=e.lastFixLeft,w=e.firstFixRight,b=e.lastFixRight,I=e.appendNode,k=e.additionalProps,P=k===void 0?{}:k,$=e.isSticky,D="".concat(h,"-cell"),K=Kt(Bt,["supportSticky","allColumnsFixedLeft"]),L=K.supportSticky,H=K.allColumnsFixedLeft,z=ip(y,C,S,d,m,x),j=J(z,2),G=j[0],Y=j[1],ee={},X=typeof _=="number"&&L,B=typeof A=="number"&&L;X&&(ee.position="sticky",ee.left=_),B&&(ee.position="sticky",ee.right=A);var U=(t=(r=(n=Y==null?void 0:Y.colSpan)!==null&&n!==void 0?n:P.colSpan)!==null&&r!==void 0?r:R)!==null&&t!==void 0?t:1,q=(o=(a=(s=Y==null?void 0:Y.rowSpan)!==null&&s!==void 0?s:P.rowSpan)!==null&&a!==void 0?a:M)!==null&&o!==void 0?o:1,oe=lp(E,q),te=J(oe,2),ie=te[0],Z=te[1],ye=Mn(function(Me){var be;y&&Z(E,E+q-1),P==null||(be=P.onMouseEnter)===null||be===void 0||be.call(P,Me)}),Ee=Mn(function(Me){var be;y&&Z(-1,-1),P==null||(be=P.onMouseLeave)===null||be===void 0||be.call(P,Me)});if(U===0||q===0)return null;var ne=(i=P.title)!==null&&i!==void 0?i:cp({rowType:N,ellipsis:f,children:G}),ge=de(D,p,(l={},W(l,"".concat(D,"-fix-left"),X&&L),W(l,"".concat(D,"-fix-left-first"),T&&L),W(l,"".concat(D,"-fix-left-last"),O&&L),W(l,"".concat(D,"-fix-left-all"),O&&H&&L),W(l,"".concat(D,"-fix-right"),B&&L),W(l,"".concat(D,"-fix-right-first"),w&&L),W(l,"".concat(D,"-fix-right-last"),b&&L),W(l,"".concat(D,"-ellipsis"),f),W(l,"".concat(D,"-with-append"),I),W(l,"".concat(D,"-fix-sticky"),(X||B)&&$&&L),W(l,"".concat(D,"-row-hover"),!Y&&ie),l),P.className,Y==null?void 0:Y.className),re={};g&&(re.textAlign=g);var _e=F(F(F(F({},ee),P.style),re),Y==null?void 0:Y.style),fe=G;return Rt(fe)==="object"&&!Array.isArray(fe)&&!u.isValidElement(fe)&&(fe=null),f&&(O||w)&&(fe=u.createElement("span",{className:"".concat(D,"-content")},fe)),u.createElement(c,ue({},Y,P,{className:ge,style:_e,title:ne,scope:v,onMouseEnter:ye,onMouseLeave:Ee,colSpan:U!==1?U:null,rowSpan:q!==1?q:null}),I,fe)}const Bn=u.memo(up);function hi(e,t,r,n,o,a){var s=r[e]||{},i=r[t]||{},l,c;s.fixed==="left"?l=n.left[o==="rtl"?t:e]:i.fixed==="right"&&(c=n.right[o==="rtl"?e:t]);var d=!1,f=!1,v=!1,h=!1,p=r[t+1],g=r[e-1],y=!(a!=null&&a.children);if(o==="rtl"){if(l!==void 0){var m=g&&g.fixed==="left";h=!m&&y}else if(c!==void 0){var C=p&&p.fixed==="right";v=!C&&y}}else if(l!==void 0){var S=p&&p.fixed==="left";d=!S&&y}else if(c!==void 0){var x=g&&g.fixed==="right";f=!x&&y}return{fixLeft:l,fixRight:c,lastFixLeft:d,firstFixRight:f,lastFixRight:v,firstFixLeft:h,isSticky:n.isSticky}}var _c=u.createContext({});function dp(e){var t=e.className,r=e.index,n=e.children,o=e.colSpan,a=o===void 0?1:o,s=e.rowSpan,i=e.align,l=Kt(Bt,["prefixCls","direction"]),c=l.prefixCls,d=l.direction,f=u.useContext(_c),v=f.scrollColumnIndex,h=f.stickyOffsets,p=f.flattenColumns,g=f.columns,y=r+a-1,m=y+1===v?a+1:a,C=hi(r,r+m-1,p,h,d,g==null?void 0:g[r]);return u.createElement(Bn,ue({className:t,index:r,component:"td",prefixCls:c,record:null,dataIndex:null,align:i,colSpan:m,rowSpan:s,render:function(){return n}},C))}var fp=["children"];function vp(e){var t=e.children,r=Be(e,fp);return u.createElement("tr",r,t)}function qo(e){var t=e.children;return t}qo.Row=vp;qo.Cell=dp;function hp(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,o=e.columns,a=Kt(Bt,"prefixCls"),s=n.length-1,i=n[s],l=u.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:i!=null&&i.scrollbar?s:null,columns:o}},[i,n,s,r,o]);return u.createElement(_c.Provider,{value:l},u.createElement("tfoot",{className:"".concat(a,"-summary")},t))}const oo=vr(hp);var pp=qo;function mp(e){return null}function gp(e){return null}function Rc(e,t,r,n,o,a,s){e.push({record:t,indent:r,index:s});var i=a(t),l=o==null?void 0:o.has(i);if(t&&Array.isArray(t[n])&&l)for(var c=0;c1?T-1:0),w=1;w=0;i-=1){var l=t[i],c=r&&r[i],d=c&&c[Oc];if(l||d||s){var f=d||{};f.columnType;var v=Be(f,Ep);o.unshift(u.createElement("col",ue({key:i,style:{width:l}},v))),s=!0}}return u.createElement("colgroup",null,o)}var Np=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function _p(e,t){return u.useMemo(function(){for(var r=[],n=0;n1?"colgroup":"col":null,ellipsis:y.ellipsis,align:y.align,component:y.title?a:s,prefixCls:d,key:h[g]},m,{additionalProps:C,rowType:"header"}))}))}Kc.displayName="HeaderRow";function Rp(e){var t=[];function r(s,i){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[l]=t[l]||[];var c=i,d=s.filter(Boolean).map(function(f){var v={key:f.key,className:f.className||"",children:f.title,column:f,colStart:c},h=1,p=f.children;return p&&p.length>0&&(h=r(p,c,l+1).reduce(function(g,y){return g+y},0),v.hasSubColumns=!0),"colSpan"in f&&(h=f.colSpan),"rowSpan"in f&&(v.rowSpan=f.rowSpan),v.colSpan=h,v.colEnd=v.colStart+h-1,t[l].push(v),c+=h,h});return d}r(e,0);for(var n=t.length,o=function(i){t[i].forEach(function(l){!("rowSpan"in l)&&!l.hasSubColumns&&(l.rowSpan=n-i)})},a=0;a1&&arguments[1]!==void 0?arguments[1]:"";return typeof t=="number"?t:t.endsWith("%")?e*parseFloat(t)/100:null}function Ip(e,t,r){return u.useMemo(function(){if(t&&t>0){var n=0,o=0;e.forEach(function(v){var h=vs(t,v.width);h?n+=h:o+=1});var a=Math.max(t,r),s=Math.max(a-n,o),i=o,l=s/o,c=0,d=e.map(function(v){var h=F({},v),p=vs(t,h.width);if(p)h.width=p;else{var g=Math.floor(l);h.width=i===1?s:g,s-=g,i-=1}return c+=h.width,h});if(c1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&Rt(r)==="object"}).reduce(function(r,n,o){var a=n.fixed,s=a===!0?"left":a,i="".concat(t,"-").concat(o),l=n.children;return l&&l.length>0?[].concat(qe(r),qe(Da(l,i).map(function(c){return F({fixed:s},c)}))):[].concat(qe(r),[F(F({key:i},n),{},{fixed:s})])},[])}function Tp(e){return e.map(function(t){var r=t.fixed,n=Be(t,Pp),o=r;return r==="left"?o="right":r==="right"&&(o="left"),F({fixed:o},n)})}function $p(e,t){var r=e.prefixCls,n=e.columns,o=e.children,a=e.expandable,s=e.expandedKeys,i=e.columnTitle,l=e.getRowKey,c=e.onTriggerExpand,d=e.expandIcon,f=e.rowExpandable,v=e.expandIconColumnIndex,h=e.direction,p=e.expandRowByClick,g=e.columnWidth,y=e.fixed,m=e.scrollWidth,C=e.clientWidth,S=u.useMemo(function(){return n||Lc(o)},[n,o]),x=u.useMemo(function(){if(a){var T,O=S.slice();if(!O.includes(On)){var w=v||0;w>=0&&O.splice(w,0,On)}var b=O.indexOf(On);O=O.filter(function($,D){return $!==On||D===b});var I=S[b],k;(y==="left"||y)&&!v?k="left":(y==="right"||y)&&v===S.length?k="right":k=I?I.fixed:null;var P=(T={},W(T,Oc,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),W(T,"title",i),W(T,"fixed",k),W(T,"className","".concat(r,"-row-expand-icon-cell")),W(T,"width",g),W(T,"render",function(D,K,L){var H=l(K,L),z=s.has(H),j=f?f(K):!0,G=d({prefixCls:r,expanded:z,expandable:j,record:K,onExpand:c});return p?u.createElement("span",{onClick:function(ee){return ee.stopPropagation()}},G):G}),T);return O.map(function($){return $===On?P:$})}return S.filter(function($){return $!==On})},[a,S,l,s,d,h]),E=u.useMemo(function(){var T=x;return t&&(T=t(T)),T.length||(T=[{render:function(){return null}}]),T},[t,x,h]),N=u.useMemo(function(){return h==="rtl"?Tp(Da(E)):Da(E)},[E,h,m]),R=Ip(N,m,C),M=J(R,2),_=M[0],A=M[1];return[E,_,A]}function Op(e){var t,r=e.prefixCls,n=e.record,o=e.onExpand,a=e.expanded,s=e.expandable,i="".concat(r,"-row-expand-icon");if(!s)return u.createElement("span",{className:de(i,"".concat(r,"-row-spaced"))});var l=function(d){o(n,d),d.stopPropagation()};return u.createElement("span",{className:de(i,(t={},W(t,"".concat(r,"-row-expanded"),a),W(t,"".concat(r,"-row-collapsed"),!a),t)),onClick:l})}function Dp(e,t,r){var n=[];function o(a){(a||[]).forEach(function(s,i){n.push(t(s,i)),o(s[r])})}return o(e),n}function Ap(e,t,r){var n=wp(e),o=n.expandIcon,a=n.expandedRowKeys,s=n.defaultExpandedRowKeys,i=n.defaultExpandAllRows,l=n.expandedRowRender,c=n.onExpand,d=n.onExpandedRowsChange,f=n.childrenColumnName,v=o||Op,h=f||"children",p=u.useMemo(function(){return l?"row":e.expandable&&e.internalHooks===Xo&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(E){return E&&Rt(E)==="object"&&E[h]})?"nest":!1},[!!l,t]),g=u.useState(function(){return s||(i?Dp(t,r,h):[])}),y=J(g,2),m=y[0],C=y[1],S=u.useMemo(function(){return new Set(a||m||[])},[a,m]),x=u.useCallback(function(E){var N=r(E,t.indexOf(E)),R,M=S.has(N);M?(S.delete(N),R=qe(S)):R=[].concat(qe(S),[N]),C(R),c&&c(!M,E),d&&d(R)},[r,S,t,c,d]);return[n,p,S,v,h,x]}function Kp(e,t,r,n){var o=e.map(function(a,s){return hi(s,s,e,t,r,n==null?void 0:n[s])});return Fo(function(){return o},[o],function(a,s){return!Yr(a,s)})}function Vc(e){var t=u.useRef(e),r=u.useState({}),n=J(r,2),o=n[1],a=u.useRef(null),s=u.useRef([]);function i(l){s.current.push(l);var c=Promise.resolve();a.current=c,c.then(function(){if(a.current===c){var d=s.current,f=t.current;s.current=[],d.forEach(function(v){t.current=v(t.current)}),a.current=null,f!==t.current&&o({})}})}return u.useEffect(function(){return function(){a.current=null}},[]),[t.current,i]}function Lp(e){var t=u.useRef(e||null),r=u.useRef();function n(){window.clearTimeout(r.current)}function o(s){t.current=s,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function a(){return t.current}return u.useEffect(function(){return n},[]),[o,a]}function Vp(){var e=u.useState(-1),t=J(e,2),r=t[0],n=t[1],o=u.useState(-1),a=J(o,2),s=a[0],i=a[1],l=u.useCallback(function(c,d){n(c),i(d)},[]);return[r,s,l]}var hs=Kl()?window:null;function Hp(e,t){var r=Rt(e)==="object"?e:{},n=r.offsetHeader,o=n===void 0?0:n,a=r.offsetSummary,s=a===void 0?0:a,i=r.offsetScroll,l=i===void 0?0:i,c=r.getContainer,d=c===void 0?function(){return hs}:c,f=d()||hs;return u.useMemo(function(){var v=!!e;return{isSticky:v,stickyClassName:v?"".concat(t,"-sticky-holder"):"",offsetHeader:o,offsetSummary:s,offsetScroll:l,container:f}},[l,o,s,t,f])}function zp(e,t,r){var n=u.useMemo(function(){for(var o=[],a=[],s=0,i=0,l=0;l=f&&(P=f-v),s({scrollLeft:P/f*(d+2)}),C.current.x=w.pageX},A=function(){if(a.current){var w=ls(a.current).top,b=w+a.current.offsetHeight,I=l===window?document.documentElement.scrollTop+window.innerHeight:ls(l).top+l.clientHeight;b-Bi()<=I||w>=I-i?m(function(k){return F(F({},k),{},{isHiddenScrollBar:!0})}):m(function(k){return F(F({},k),{},{isHiddenScrollBar:!1})})}},T=function(w){m(function(b){return F(F({},b),{},{scrollLeft:w/d*f||0})})};return u.useImperativeHandle(r,function(){return{setScrollLeft:T}}),u.useEffect(function(){var O=ro(document.body,"mouseup",R,!1),w=ro(document.body,"mousemove",_,!1);return A(),function(){O.remove(),w.remove()}},[v,E]),u.useEffect(function(){var O=ro(l,"scroll",A,!1),w=ro(window,"resize",A,!1);return function(){O.remove(),w.remove()}},[l]),u.useEffect(function(){y.isHiddenScrollBar||m(function(O){var w=a.current;return w?F(F({},O),{},{scrollLeft:w.scrollLeft/w.scrollWidth*w.clientWidth}):O})},[y.isHiddenScrollBar]),d<=f||!v||y.isHiddenScrollBar?null:u.createElement("div",{style:{height:Bi(),width:f,bottom:i},className:"".concat(c,"-sticky-scroll")},u.createElement("div",{onMouseDown:M,ref:h,className:de("".concat(c,"-sticky-scroll-bar"),W({},"".concat(c,"-sticky-scroll-bar-active"),E)),style:{width:"".concat(v,"px"),transform:"translate3d(".concat(y.scrollLeft,"px, 0, 0)")}}))};const Bp=u.forwardRef(Fp);var Hc="rc-table",jp=[],Wp={};function Up(){return"No Data"}function Gp(e,t){var r,n=F({rowKey:"key",prefixCls:Hc,emptyText:Up},e),o=n.prefixCls,a=n.className,s=n.rowClassName,i=n.style,l=n.data,c=n.rowKey,d=n.scroll,f=n.tableLayout,v=n.direction,h=n.title,p=n.footer,g=n.summary,y=n.caption,m=n.id,C=n.showHeader,S=n.components,x=n.emptyText,E=n.onRow,N=n.onHeaderRow,R=n.internalHooks,M=n.transformColumns,_=n.internalRefs,A=n.tailor,T=n.getContainerWidth,O=n.sticky,w=l||jp,b=!!w.length,I=R===Xo,k=u.useCallback(function(He,Je){return Vl(S,He)||Je},[S]),P=u.useMemo(function(){return typeof c=="function"?c:function(He){var Je=He&&He[c];return Je}},[c]),$=k(["body"]),D=Vp(),K=J(D,3),L=K[0],H=K[1],z=K[2],j=Ap(n,w,P),G=J(j,6),Y=G[0],ee=G[1],X=G[2],B=G[3],U=G[4],q=G[5],oe=d==null?void 0:d.x,te=u.useState(0),ie=J(te,2),Z=ie[0],ye=ie[1],Ee=$p(F(F(F({},n),Y),{},{expandable:!!Y.expandedRowRender,columnTitle:Y.columnTitle,expandedKeys:X,getRowKey:P,onTriggerExpand:q,expandIcon:B,expandIconColumnIndex:Y.expandIconColumnIndex,direction:v,scrollWidth:I&&A&&typeof oe=="number"?oe:null,clientWidth:Z}),I?M:null),ne=J(Ee,3),ge=ne[0],re=ne[1],_e=ne[2],fe=_e??oe,Me=u.useMemo(function(){return{columns:ge,flattenColumns:re}},[ge,re]),be=u.useRef(),Re=u.useRef(),se=u.useRef(),Le=u.useRef();u.useImperativeHandle(t,function(){return{nativeElement:be.current,scrollTo:function(Je){var Dt;if(se.current instanceof HTMLElement){var Tt=Je.index,rn=Je.top,Un=Je.key;if(rn){var Pn;(Pn=se.current)===null||Pn===void 0||Pn.scrollTo({top:rn})}else{var Tn,br=Un??P(w[Tt]);(Tn=se.current.querySelector('[data-row-key="'.concat(br,'"]')))===null||Tn===void 0||Tn.scrollIntoView()}}else(Dt=se.current)!==null&&Dt!==void 0&&Dt.scrollTo&&se.current.scrollTo(Je)}}});var $e=u.useRef(),Ge=u.useState(!1),Ie=J(Ge,2),pe=Ie[0],je=Ie[1],Ze=u.useState(!1),rt=J(Ze,2),We=rt[0],Ve=rt[1],ct=Vc(new Map),ut=J(ct,2),Qe=ut[0],wt=ut[1],ft=Yo(re),dt=ft.map(function(He){return Qe.get(He)}),mt=u.useMemo(function(){return dt},[dt.join("_")]),gt=zp(mt,re.length,v),ot=d&&Oa(d.y),ze=d&&Oa(fe)||!!Y.fixed,Ce=ze&&re.some(function(He){var Je=He.fixed;return Je}),Te=u.useRef(),Q=Hp(O,o),le=Q.isSticky,ae=Q.offsetHeader,ce=Q.offsetSummary,Oe=Q.offsetScroll,Fe=Q.stickyClassName,yt=Q.container,Xe=u.useMemo(function(){return g==null?void 0:g(w)},[g,w]),et=(ot||le)&&u.isValidElement(Xe)&&Xe.type===qo&&Xe.props.fixed,tt,at,pt;ot&&(at={overflowY:"scroll",maxHeight:d.y}),ze&&(tt={overflowX:"auto"},ot||(at={overflowY:"hidden"}),pt={width:fe===!0?"auto":fe,minWidth:"100%"});var Mt=u.useCallback(function(He,Je){Ll(be.current)&&wt(function(Dt){if(Dt.get(He)!==Je){var Tt=new Map(Dt);return Tt.set(He,Je),Tt}return Dt})},[]),Se=Lp(null),me=J(Se,2),ke=me[0],nt=me[1];function lt(He,Je){Je&&(typeof Je=="function"?Je(He):Je.scrollLeft!==He&&(Je.scrollLeft=He,Je.scrollLeft!==He&&setTimeout(function(){Je.scrollLeft=He},0)))}var Ct=Mn(function(He){var Je=He.currentTarget,Dt=He.scrollLeft,Tt=v==="rtl",rn=typeof Dt=="number"?Dt:Je.scrollLeft,Un=Je||Wp;if(!nt()||nt()===Un){var Pn;ke(Un),lt(rn,Re.current),lt(rn,se.current),lt(rn,$e.current),lt(rn,(Pn=Te.current)===null||Pn===void 0?void 0:Pn.setScrollLeft)}var Tn=Je||Re.current;if(Tn){var br=Tn.scrollWidth,ua=Tn.clientWidth;if(br===ua){je(!1),Ve(!1);return}Tt?(je(-rn0)):(je(rn>0),Ve(rn1?g-w:0,I=F(F(F({},R),l),{},{flex:"0 0 ".concat(w,"px"),width:"".concat(w,"px"),marginRight:b,pointerEvents:"auto"}),k=u.useMemo(function(){return d?T<=1:_===0||T===0||T>1},[T,_,d]);k?I.visibility="hidden":d&&(I.height=f==null?void 0:f(T));var P=k?function(){return null}:v,$={};return(T===0||_===0)&&($.rowSpan=1,$.colSpan=1),u.createElement(Bn,ue({className:de(p,c),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:"div",prefixCls:t.prefixCls,key:S,record:i,index:a,renderIndex:s,dataIndex:h,render:P,shouldCellUpdate:r.shouldCellUpdate},x,{appendNode:E,additionalProps:F(F({},N),{},{style:I},$)}))}var Jp=["data","index","className","rowKey","style","extra","getHeight"],Qp=u.forwardRef(function(e,t){var r=e.data,n=e.index,o=e.className,a=e.rowKey,s=e.style,i=e.extra,l=e.getHeight,c=Be(e,Jp),d=r.record,f=r.indent,v=r.index,h=Kt(Bt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),p=h.scrollX,g=h.flattenColumns,y=h.prefixCls,m=h.fixColumn,C=h.componentWidth,S=Ic(d,a,n,f),x=S.rowSupportExpand,E=S.expanded,N=S.rowProps,R=S.expandedRowRender,M=S.expandedRowClassName,_;if(x&&E){var A=R(d,n,f+1,E),T=M==null?void 0:M(d,n,f),O={};m&&(O={style:W({},"--virtual-width","".concat(C,"px"))});var w="".concat(y,"-expanded-row-cell");_=u.createElement("div",{className:de("".concat(y,"-expanded-row"),"".concat(y,"-expanded-row-level-").concat(f+1),T)},u.createElement(Bn,{component:"div",prefixCls:y,className:de(w,W({},"".concat(w,"-fixed"),m)),additionalProps:O},A))}var b=F(F({},s),{},{width:p});i&&(b.position="absolute",b.pointerEvents="none");var I=u.createElement("div",ue({},N,c,{ref:x?null:t,className:de(o,"".concat(y,"-row"),N==null?void 0:N.className,W({},"".concat(y,"-row-extra"),i)),style:F(F({},b),N==null?void 0:N.style)}),g.map(function(k,P){return u.createElement(Zp,{key:P,rowInfo:S,column:k,colIndex:P,indent:f,index:n,renderIndex:v,record:d,inverse:i,getHeight:l})}));return x?u.createElement("div",{ref:t},I,_):I}),ms=vr(Qp),em=u.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=Kt(Bt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),a=o.flattenColumns,s=o.onColumnResize,i=o.getRowKey,l=o.expandedKeys,c=o.prefixCls,d=o.childrenColumnName,f=o.emptyNode,v=o.scrollX,h=Kt(zc),p=h.sticky,g=h.scrollY,y=h.listItemHeight,m=u.useRef(),C=kc(r,d,l,i),S=u.useMemo(function(){var T=0;return a.map(function(O){var w=O.width,b=O.key;return T+=w,[b,w,T]})},[a]),x=u.useMemo(function(){return S.map(function(T){return T[2]})},[S]);u.useEffect(function(){S.forEach(function(T){var O=J(T,2),w=O[0],b=O[1];s(w,b)})},[S]),u.useImperativeHandle(t,function(){var T={scrollTo:function(w){var b;(b=m.current)===null||b===void 0||b.scrollTo(w)}};return Object.defineProperty(T,"scrollLeft",{get:function(){var w;return((w=m.current)===null||w===void 0?void 0:w.getScrollInfo().x)||0},set:function(w){var b;(b=m.current)===null||b===void 0||b.scrollTo({left:w})}}),T});var E=function(O,w){var b,I=(b=C[w])===null||b===void 0?void 0:b.record,k=O.onCell;if(k){var P,$=k(I,w);return(P=$==null?void 0:$.rowSpan)!==null&&P!==void 0?P:1}return 1},N=function(O){var w=O.start,b=O.end,I=O.getSize,k=O.offsetY;if(b<0)return null;for(var P=a.filter(function(B){return E(B,w)===0}),$=w,D=function(U){if(P=P.filter(function(q){return E(q,U)===0}),!P.length)return $=U,1},K=w;K>=0&&!D(K);K-=1);for(var L=a.filter(function(B){return E(B,b)!==1}),H=b,z=function(U){if(L=L.filter(function(q){return E(q,U)!==1}),!L.length)return H=Math.max(U-1,b),1},j=b;j1})&&G.push(U)},ee=$;ee<=H;ee+=1)Y(ee);var X=G.map(function(B){var U=C[B],q=i(U.record,B),oe=function(Z){var ye=B+Z-1,Ee=i(C[ye].record,ye),ne=I(q,Ee);return ne.bottom-ne.top},te=I(q);return u.createElement(ms,{key:B,data:U,rowKey:q,index:B,style:{top:-k+te.top},extra:!0,getHeight:oe})});return X},R=u.useMemo(function(){return{columnsOffset:x}},[x]),M="".concat(c,"-tbody"),_;if(C.length){var A={};p&&(A.position="sticky",A.bottom=0,Rt(p)==="object"&&p.offsetScroll&&(A.bottom=p.offsetScroll)),_=u.createElement(Wo,{fullHeight:!1,ref:m,styles:{horizontalScrollBar:A},className:de(M,"".concat(M,"-virtual")),height:g,itemHeight:y||24,data:C,itemKey:function(O){return i(O.record)},scrollWidth:v,onVirtualScroll:function(O){var w=O.x;n({scrollLeft:w})},extraRender:N},function(T,O,w){var b=i(T.record,O);return u.createElement(ms,ue({data:T,rowKey:b,index:O},w))})}else _=u.createElement("div",{className:de("".concat(c,"-placeholder"))},u.createElement(Bn,{component:"div",prefixCls:c},f));return u.createElement(Fc.Provider,{value:R},_)}),tm=vr(em),nm=function(t,r){var n=r.ref,o=r.onScroll;return u.createElement(tm,{ref:n,data:t,onScroll:o})};function rm(e,t){var r=e.columns,n=e.scroll,o=e.sticky,a=e.prefixCls,s=a===void 0?Hc:a,i=e.className,l=e.listItemHeight,c=e.components,d=n||{},f=d.x,v=d.y;typeof f!="number"&&(f=1),typeof v!="number"&&(v=500);var h=u.useMemo(function(){return{sticky:o,scrollY:v,listItemHeight:l}},[o,v,l]);return u.createElement(zc.Provider,{value:h},u.createElement(hr,ue({},e,{className:de(i,"".concat(s,"-virtual")),scroll:F(F({},n),{},{x:f}),components:F(F({},c),{},{body:nm}),columns:r,internalHooks:Xo,tailor:!0,ref:t})))}var om=u.forwardRef(rm);function am(e){return Ec(om,e)}const c5=am();var pi=u.createContext(null),im=function(t){for(var r=t.prefixCls,n=t.level,o=t.isStart,a=t.isEnd,s="".concat(r,"-indent-unit"),i=[],l=0;l=0&&r.splice(n,1),r}function Sn(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function mi(e){return e.split("-")}function dm(e,t){var r=[],n=Gt(t,e);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(s){var i=s.key,l=s.children;r.push(i),o(l)})}return o(n.children),r}function fm(e){if(e.parent){var t=mi(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function vm(e){var t=mi(e.pos);return Number(t[t.length-1])===0}function Cs(e,t,r,n,o,a,s,i,l,c){var d,f=e.clientX,v=e.clientY,h=e.target.getBoundingClientRect(),p=h.top,g=h.height,y=(c==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-f),m=(y-12)/n,C=Gt(i,r.props.eventKey);if(v-1.5?a({dragNode:O,dropNode:w,dropPosition:1})?_=1:b=!1:a({dragNode:O,dropNode:w,dropPosition:0})?_=0:a({dragNode:O,dropNode:w,dropPosition:1})?_=1:b=!1:a({dragNode:O,dropNode:w,dropPosition:1})?_=1:b=!1,{dropPosition:_,dropLevelOffset:A,dropTargetKey:C.key,dropTargetPos:C.pos,dragOverNodeKey:M,dropContainerKey:_===0?null:((d=C.parent)===null||d===void 0?void 0:d.key)||null,dropAllowed:b}}function xs(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function ha(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(Rt(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Jt(!1,"`checkedKeys` is not an array or an object"),null;return t}function bs(e,t){var r=new Set;function n(o){if(!r.has(o)){var a=Gt(t,o);if(a){r.add(o);var s=a.parent,i=a.node;i.disabled||s&&n(s.key)}}}return(e||[]).forEach(function(o){n(o)}),qe(r)}function hm(e){var t=e.dropPosition,r=e.dropLevelOffset,n=e.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:o.top=0,o.left=-r*n;break;case 1:o.bottom=0,o.left=-r*n;break;case 0:o.bottom=0,o.left=n;break}return u.createElement("div",{style:o})}function Bc(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function pm(e,t){var r=u.useState(!1),n=J(r,2),o=n[0],a=n[1];Xt(function(){if(o)return e(),function(){t()}},[o]),Xt(function(){return a(!0),function(){a(!1)}},[])}var mm=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],jc=function(t,r){var n=t.className,o=t.style,a=t.motion,s=t.motionNodes,i=t.motionType,l=t.onMotionStart,c=t.onMotionEnd,d=t.active,f=t.treeNodeRequiredProps,v=Be(t,mm),h=u.useState(!0),p=J(h,2),g=p[0],y=p[1],m=u.useContext(pi),C=m.prefixCls,S=s&&i!=="hide";Xt(function(){s&&S!==g&&y(S)},[s]);var x=function(){s&&l()},E=u.useRef(!1),N=function(){s&&!E.current&&(E.current=!0,c())};pm(x,N);var R=function(_){S===_&&N()};return s?u.createElement(ri,ue({ref:r,visible:g},a,{motionAppear:i==="show",onVisibleChanged:R}),function(M,_){var A=M.className,T=M.style;return u.createElement("div",{ref:_,className:de("".concat(C,"-treenode-motion"),A),style:T},s.map(function(O){var w=ue({},(Bc(O.data),O.data)),b=O.title,I=O.key,k=O.isStart,P=O.isEnd;delete w.children;var $=Ar(I,f);return u.createElement(Hr,ue({},w,$,{title:b,active:d,data:O.data,key:I,isStart:k,isEnd:P}))}))}):u.createElement(Hr,ue({domRef:r,className:n,style:o},v,{active:d}))};jc.displayName="MotionTreeNode";var gm=u.forwardRef(jc);function ym(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.length,n=t.length;if(Math.abs(r-n)!==1)return{add:!1,key:null};function o(a,s){var i=new Map;a.forEach(function(c){i.set(c,!0)});var l=s.filter(function(c){return!i.has(c)});return l.length===1?l[0]:null}return r ").concat(t);return t}var Uc=u.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var o=e.expandedKeys,a=e.selectedKeys,s=e.checkedKeys,i=e.loadedKeys,l=e.loadingKeys,c=e.halfCheckedKeys,d=e.keyEntities,f=e.disabled,v=e.dragging,h=e.dragOverNodeKey,p=e.dropPosition,g=e.motion,y=e.height,m=e.itemHeight,C=e.virtual,S=e.focusable,x=e.activeItem,E=e.focused,N=e.tabIndex,R=e.onKeyDown,M=e.onFocus,_=e.onBlur,A=e.onActiveChange,T=e.onListChangeStart,O=e.onListChangeEnd,w=Be(e,Cm),b=u.useRef(null),I=u.useRef(null);u.useImperativeHandle(t,function(){return{scrollTo:function(_e){b.current.scrollTo(_e)},getIndentWidth:function(){return I.current.offsetWidth}}});var k=u.useState(o),P=J(k,2),$=P[0],D=P[1],K=u.useState(n),L=J(K,2),H=L[0],z=L[1],j=u.useState(n),G=J(j,2),Y=G[0],ee=G[1],X=u.useState([]),B=J(X,2),U=B[0],q=B[1],oe=u.useState(null),te=J(oe,2),ie=te[0],Z=te[1],ye=u.useRef(n);ye.current=n;function Ee(){var re=ye.current;z(re),ee(re),q([]),Z(null),O()}Xt(function(){D(o);var re=ym($,o);if(re.key!==null)if(re.add){var _e=H.findIndex(function(Le){var $e=Le.key;return $e===re.key}),fe=Ns(Ss(H,n,re.key),C,y,m),Me=H.slice();Me.splice(_e+1,0,Es),ee(Me),q(fe),Z("show")}else{var be=n.findIndex(function(Le){var $e=Le.key;return $e===re.key}),Re=Ns(Ss(n,H,re.key),C,y,m),se=n.slice();se.splice(be+1,0,Es),ee(se),q(Re),Z("hide")}else H!==n&&(z(n),ee(n))},[o,n]),u.useEffect(function(){v||Ee()},[v]);var ne=g?Y:n,ge={expandedKeys:o,selectedKeys:a,loadedKeys:i,loadingKeys:l,checkedKeys:s,halfCheckedKeys:c,dragOverNodeKey:h,dropPosition:p,keyEntities:d};return u.createElement(u.Fragment,null,E&&x&&u.createElement("span",{style:ws,"aria-live":"assertive"},bm(x)),u.createElement("div",null,u.createElement("input",{style:ws,disabled:S===!1||f,tabIndex:S!==!1?N:null,onKeyDown:R,onFocus:M,onBlur:_,value:"",onChange:xm,"aria-label":"for screen reader"})),u.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},u.createElement("div",{className:"".concat(r,"-indent")},u.createElement("div",{ref:I,className:"".concat(r,"-indent-unit")}))),u.createElement(Wo,ue({},w,{data:ne,itemKey:_s,height:y,fullHeight:!1,virtual:C,itemHeight:m,prefixCls:"".concat(r,"-list"),ref:b,onVisibleChange:function(_e,fe){var Me=new Set(_e),be=fe.filter(function(Re){return!Me.has(Re)});be.some(function(Re){return _s(Re)===Vn})&&Ee()}}),function(re){var _e=re.pos,fe=ue({},(Bc(re.data),re.data)),Me=re.title,be=re.key,Re=re.isStart,se=re.isEnd,Le=Zr(be,_e);delete fe.key,delete fe.children;var $e=Ar(Le,ge);return u.createElement(gm,ue({},fe,$e,{title:Me,active:!!x&&be===x.key,pos:_e,data:re.data,isStart:Re,isEnd:se,motion:g,motionNodes:be===Vn?U:null,motionType:ie,onMotionStart:T,onMotionEnd:Ee,treeNodeRequiredProps:ge,onMouseMove:function(){A(null)}}))}))});Uc.displayName="NodeList";var Sm=10,Gc=function(e){ti(r,e);var t=ni(r);function r(){var n;zo(this,r);for(var o=arguments.length,a=new Array(o),s=0;s2&&arguments[2]!==void 0?arguments[2]:!1,f=n.state,v=f.dragChildrenKeys,h=f.dropPosition,p=f.dropTargetKey,g=f.dropTargetPos,y=f.dropAllowed;if(y){var m=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),p!==null){var C=F(F({},Ar(p,n.getTreeNodeRequiredProps())),{},{active:((c=n.getActiveItem())===null||c===void 0?void 0:c.key)===p,data:Gt(n.state.keyEntities,p).node}),S=v.indexOf(p)!==-1;Jt(!S,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var x=mi(g),E={event:i,node:bt(C),dragNode:n.dragNode?bt(n.dragNode.props):null,dragNodesKeys:[n.dragNode.props.eventKey].concat(v),dropToGap:h!==0,dropPosition:h+Number(x[x.length-1])};d||m==null||m(E),n.dragNode=null}}},n.cleanDragState=function(){var i=n.state.draggingNodeKey;i!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null},n.triggerExpandActionExpand=function(i,l){var c=n.state,d=c.expandedKeys,f=c.flattenNodes,v=l.expanded,h=l.key,p=l.isLeaf;if(!(p||i.shiftKey||i.metaKey||i.ctrlKey)){var g=f.filter(function(m){return m.key===h})[0],y=bt(F(F({},Ar(h,n.getTreeNodeRequiredProps())),{},{data:g.data}));n.setExpandedKeys(v?mn(d,h):Sn(d,h)),n.onNodeExpand(i,y)}},n.onNodeClick=function(i,l){var c=n.props,d=c.onClick,f=c.expandAction;f==="click"&&n.triggerExpandActionExpand(i,l),d==null||d(i,l)},n.onNodeDoubleClick=function(i,l){var c=n.props,d=c.onDoubleClick,f=c.expandAction;f==="doubleClick"&&n.triggerExpandActionExpand(i,l),d==null||d(i,l)},n.onNodeSelect=function(i,l){var c=n.state.selectedKeys,d=n.state,f=d.keyEntities,v=d.fieldNames,h=n.props,p=h.onSelect,g=h.multiple,y=l.selected,m=l[v.key],C=!y;C?g?c=Sn(c,m):c=[m]:c=mn(c,m);var S=c.map(function(x){var E=Gt(f,x);return E?E.node:null}).filter(function(x){return x});n.setUncontrolledState({selectedKeys:c}),p==null||p(c,{event:"select",selected:C,node:l,selectedNodes:S,nativeEvent:i.nativeEvent})},n.onNodeCheck=function(i,l,c){var d=n.state,f=d.keyEntities,v=d.checkedKeys,h=d.halfCheckedKeys,p=n.props,g=p.checkStrictly,y=p.onCheck,m=l.key,C,S={event:"check",node:l,checked:c,nativeEvent:i.nativeEvent};if(g){var x=c?Sn(v,m):mn(v,m),E=mn(h,m);C={checked:x,halfChecked:E},S.checkedNodes=x.map(function(T){return Gt(f,T)}).filter(function(T){return T}).map(function(T){return T.node}),n.setUncontrolledState({checkedKeys:x})}else{var N=va([].concat(qe(v),[m]),!0,f),R=N.checkedKeys,M=N.halfCheckedKeys;if(!c){var _=new Set(R);_.delete(m);var A=va(Array.from(_),{checked:!1,halfCheckedKeys:M},f);R=A.checkedKeys,M=A.halfCheckedKeys}C=R,S.checkedNodes=[],S.checkedNodesPositions=[],S.halfCheckedKeys=M,R.forEach(function(T){var O=Gt(f,T);if(O){var w=O.node,b=O.pos;S.checkedNodes.push(w),S.checkedNodesPositions.push({node:w,pos:b})}}),n.setUncontrolledState({checkedKeys:R},!1,{halfCheckedKeys:M})}y==null||y(C,S)},n.onNodeLoad=function(i){var l=i.key,c=new Promise(function(d,f){n.setState(function(v){var h=v.loadedKeys,p=h===void 0?[]:h,g=v.loadingKeys,y=g===void 0?[]:g,m=n.props,C=m.loadData,S=m.onLoad;if(!C||p.indexOf(l)!==-1||y.indexOf(l)!==-1)return null;var x=C(i);return x.then(function(){var E=n.state.loadedKeys,N=Sn(E,l);S==null||S(N,{event:"load",node:i}),n.setUncontrolledState({loadedKeys:N}),n.setState(function(R){return{loadingKeys:mn(R.loadingKeys,l)}}),d()}).catch(function(E){if(n.setState(function(R){return{loadingKeys:mn(R.loadingKeys,l)}}),n.loadingRetryTimes[l]=(n.loadingRetryTimes[l]||0)+1,n.loadingRetryTimes[l]>=Sm){var N=n.state.loadedKeys;Jt(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:Sn(N,l)}),d()}f(E)}),{loadingKeys:Sn(y,l)}})});return c.catch(function(){}),c},n.onNodeMouseEnter=function(i,l){var c=n.props.onMouseEnter;c==null||c({event:i,node:l})},n.onNodeMouseLeave=function(i,l){var c=n.props.onMouseLeave;c==null||c({event:i,node:l})},n.onNodeContextMenu=function(i,l){var c=n.props.onRightClick;c&&(i.preventDefault(),c({event:i,node:l}))},n.onFocus=function(){var i=n.props.onFocus;n.setState({focused:!0});for(var l=arguments.length,c=new Array(l),d=0;d1&&arguments[1]!==void 0?arguments[1]:!1,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var d=!1,f=!0,v={};Object.keys(i).forEach(function(h){if(h in n.props){f=!1;return}d=!0,v[h]=i[h]}),d&&(!l||f)&&n.setState(F(F({},v),c))}},n.scrollTo=function(i){n.listRef.current.scrollTo(i)},n}return Ho(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var o=this.props,a=o.activeKey,s=o.itemScrollOffset,i=s===void 0?0:s;a!==void 0&&a!==this.state.activeKey&&(this.setState({activeKey:a}),a!==null&&this.scrollTo({key:a,offset:i}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var o,a=this.state,s=a.focused,i=a.flattenNodes,l=a.keyEntities,c=a.draggingNodeKey,d=a.activeKey,f=a.dropLevelOffset,v=a.dropContainerKey,h=a.dropTargetKey,p=a.dropPosition,g=a.dragOverNodeKey,y=a.indent,m=this.props,C=m.prefixCls,S=m.className,x=m.style,E=m.showLine,N=m.focusable,R=m.tabIndex,M=R===void 0?0:R,_=m.selectable,A=m.showIcon,T=m.icon,O=m.switcherIcon,w=m.draggable,b=m.checkable,I=m.checkStrictly,k=m.disabled,P=m.motion,$=m.loadData,D=m.filterTreeNode,K=m.height,L=m.itemHeight,H=m.virtual,z=m.titleRender,j=m.dropIndicatorRender,G=m.onContextMenu,Y=m.onScroll,ee=m.direction,X=m.rootClassName,B=m.rootStyle,U=Cn(this.props,{aria:!0,data:!0}),q;return w&&(Rt(w)==="object"?q=w:typeof w=="function"?q={nodeDraggable:w}:q={}),u.createElement(pi.Provider,{value:{prefixCls:C,selectable:_,showIcon:A,icon:T,switcherIcon:O,draggable:q,draggingNodeKey:c,checkable:b,checkStrictly:I,disabled:k,keyEntities:l,dropLevelOffset:f,dropContainerKey:v,dropTargetKey:h,dropPosition:p,dragOverNodeKey:g,indent:y,direction:ee,dropIndicatorRender:j,loadData:$,filterTreeNode:D,titleRender:z,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},u.createElement("div",{role:"tree",className:de(C,S,X,(o={},W(o,"".concat(C,"-show-line"),E),W(o,"".concat(C,"-focused"),s),W(o,"".concat(C,"-active-focused"),d!==null),o)),style:B},u.createElement(Uc,ue({ref:this.listRef,prefixCls:C,style:x,data:i,disabled:k,selectable:_,checkable:!!b,motion:P,dragging:c!==null,height:K,itemHeight:L,virtual:H,focusable:N,focused:s,tabIndex:M,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:G,onScroll:Y},this.getTreeNodeRequiredProps(),U))))}}],[{key:"getDerivedStateFromProps",value:function(o,a){var s=a.prevProps,i={prevProps:o};function l(N){return!s&&N in o||s&&s[N]!==o[N]}var c,d=a.fieldNames;if(l("fieldNames")&&(d=Ro(o.fieldNames),i.fieldNames=d),l("treeData")?c=o.treeData:l("children")&&(Jt(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),c=Dh(o.children)),c){i.treeData=c;var f=Kh(c,{fieldNames:d});i.keyEntities=F(W({},Vn,Wc),f.keyEntities)}var v=i.keyEntities||a.keyEntities;if(l("expandedKeys")||s&&l("autoExpandParent"))i.expandedKeys=o.autoExpandParent||!s&&o.defaultExpandParent?bs(o.expandedKeys,v):o.expandedKeys;else if(!s&&o.defaultExpandAll){var h=F({},v);delete h[Vn],i.expandedKeys=Object.keys(h).map(function(N){return h[N].key})}else!s&&o.defaultExpandedKeys&&(i.expandedKeys=o.autoExpandParent||o.defaultExpandParent?bs(o.defaultExpandedKeys,v):o.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,c||i.expandedKeys){var p=fa(c||a.treeData,i.expandedKeys||a.expandedKeys,d);i.flattenNodes=p}if(o.selectable&&(l("selectedKeys")?i.selectedKeys=xs(o.selectedKeys,o):!s&&o.defaultSelectedKeys&&(i.selectedKeys=xs(o.defaultSelectedKeys,o))),o.checkable){var g;if(l("checkedKeys")?g=ha(o.checkedKeys)||{}:!s&&o.defaultCheckedKeys?g=ha(o.defaultCheckedKeys)||{}:c&&(g=ha(o.checkedKeys)||{checkedKeys:a.checkedKeys,halfCheckedKeys:a.halfCheckedKeys}),g){var y=g,m=y.checkedKeys,C=m===void 0?[]:m,S=y.halfCheckedKeys,x=S===void 0?[]:S;if(!o.checkStrictly){var E=va(C,!0,v);C=E.checkedKeys,x=E.halfCheckedKeys}i.checkedKeys=C,i.halfCheckedKeys=x}}return l("loadedKeys")&&(i.loadedKeys=o.loadedKeys),i}}]),r}(u.Component);Gc.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:hm,allowDrop:function(){return!0},expandAction:!1};Gc.TreeNode=Hr;function tn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,n;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Mm:Im;Zc.useSyncExternalStore=sr.useSyncExternalStore!==void 0?sr.useSyncExternalStore:Pm;qc.exports=Zc;var Tm=qc.exports;/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Zo=u,$m=Tm;function Om(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dm=typeof Object.is=="function"?Object.is:Om,Am=$m.useSyncExternalStore,Km=Zo.useRef,Lm=Zo.useEffect,Vm=Zo.useMemo,Hm=Zo.useDebugValue;Yc.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var a=Km(null);if(a.current===null){var s={hasValue:!1,value:null};a.current=s}else s=a.current;a=Vm(function(){function l(h){if(!c){if(c=!0,d=h,h=n(h),o!==void 0&&s.hasValue){var p=s.value;if(o(p,h))return f=p}return f=h}if(p=f,Dm(d,h))return p;var g=n(h);return o!==void 0&&o(p,g)?p:(d=h,f=g)}var c=!1,d,f,v=r===void 0?null:r;return[function(){return l(t())},v===null?void 0:function(){return l(v())}]},[t,r,n,o]);var i=Am(e,a[0],a[1]);return Lm(function(){s.hasValue=!0,s.value=i},[i]),Hm(i),i};Xc.exports=Yc;var zm=Xc.exports;const Jc=Hl(zm),Rs=e=>{let t;const r=new Set,n=(l,c)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const f=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(v=>v(t,f))}},o=()=>t,i={setState:n,getState:o,subscribe:l=>(r.add(l),()=>r.delete(l)),destroy:()=>{r.clear()}};return t=e(n,o,i),i},Qc=e=>e?Rs(e):Rs,{useDebugValue:Fm}=V,{useSyncExternalStoreWithSelector:Bm}=Jc;function eu(e,t=e.getState,r){const n=Bm(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return Fm(n),n}const ks=(e,t)=>{const r=Qc(e),n=(o,a=t)=>eu(r,o,a);return Object.assign(n,r),n},jm=(e,t)=>e?ks(e,t):ks;function Ft(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,o]of e)if(!Object.is(o,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n{}};function Jo(){for(var e=0,t=arguments.length,r={},n;e=0&&(n=r.slice(o+1),r=r.slice(0,o)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}yo.prototype=Jo.prototype={constructor:yo,on:function(e,t){var r=this._,n=Um(e+"",r),o,a=-1,s=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(o),n=0,o,a;n=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Ms.hasOwnProperty(t)?{space:Ms[t],local:e}:e}function Xm(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ka&&t.documentElement.namespaceURI===Ka?t.createElement(e):t.createElementNS(r,e)}}function Ym(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function tu(e){var t=Qo(e);return(t.local?Ym:Xm)(t)}function qm(){}function gi(e){return e==null?qm:function(){return this.querySelector(e)}}function Zm(e){typeof e!="function"&&(e=gi(e));for(var t=this._groups,r=t.length,n=new Array(r),o=0;o=S&&(S=C+1);!(E=y[S])&&++S=0;)(s=n[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Sg(e){e||(e=wg);function t(f,v){return f&&v?e(f.__data__,v.__data__):!f-!v}for(var r=this._groups,n=r.length,o=new Array(n),a=0;at?1:e>=t?0:NaN}function Eg(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ng(){return Array.from(this)}function _g(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?Kg:typeof t=="function"?Vg:Lg)(e,t,r??"")):lr(this.node(),e)}function lr(e,t){return e.style.getPropertyValue(t)||iu(e).getComputedStyle(e,null).getPropertyValue(t)}function zg(e){return function(){delete this[e]}}function Fg(e,t){return function(){this[e]=t}}function Bg(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function jg(e,t){return arguments.length>1?this.each((t==null?zg:typeof t=="function"?Bg:Fg)(e,t)):this.node()[e]}function su(e){return e.trim().split(/^|\s+/)}function yi(e){return e.classList||new lu(e)}function lu(e){this._node=e,this._names=su(e.getAttribute("class")||"")}lu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function cu(e,t){for(var r=yi(e),n=-1,o=t.length;++n=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function y1(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,o=t.length,a;r()=>e;function La(e,{sourceEvent:t,subject:r,target:n,identifier:o,active:a,x:s,y:i,dx:l,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:i,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}La.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function k1(e){return!e.ctrlKey&&!e.button}function I1(){return this.parentNode}function M1(e,t){return t??{x:e.x,y:e.y}}function P1(){return navigator.maxTouchPoints||"ontouchstart"in this}function T1(){var e=k1,t=I1,r=M1,n=P1,o={},a=Jo("start","drag","end"),s=0,i,l,c,d,f=0;function v(x){x.on("mousedown.drag",h).filter(n).on("touchstart.drag",y).on("touchmove.drag",m,R1).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(x,E){if(!(d||!e.call(this,x,E))){var N=S(this,t.call(this,x,E),x,E,"mouse");N&&(on(x.view).on("mousemove.drag",p,zr).on("mouseup.drag",g,zr),vu(x.view),ma(x),c=!1,i=x.clientX,l=x.clientY,N("start",x))}}function p(x){if(rr(x),!c){var E=x.clientX-i,N=x.clientY-l;c=E*E+N*N>f}o.mouse("drag",x)}function g(x){on(x.view).on("mousemove.drag mouseup.drag",null),hu(x.view,c),rr(x),o.mouse("end",x)}function y(x,E){if(e.call(this,x,E)){var N=x.changedTouches,R=t.call(this,x,E),M=N.length,_,A;for(_=0;_>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?io(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?io(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=O1.exec(e))?new zt(t[1],t[2],t[3],1):(t=D1.exec(e))?new zt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=A1.exec(e))?io(t[1],t[2],t[3],t[4]):(t=K1.exec(e))?io(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=L1.exec(e))?Ks(t[1],t[2]/100,t[3]/100,1):(t=V1.exec(e))?Ks(t[1],t[2]/100,t[3]/100,t[4]):Ps.hasOwnProperty(e)?Os(Ps[e]):e==="transparent"?new zt(NaN,NaN,NaN,0):null}function Os(e){return new zt(e>>16&255,e>>8&255,e&255,1)}function io(e,t,r,n){return n<=0&&(e=t=r=NaN),new zt(e,t,r,n)}function F1(e){return e instanceof Qr||(e=jr(e)),e?(e=e.rgb(),new zt(e.r,e.g,e.b,e.opacity)):new zt}function Va(e,t,r,n){return arguments.length===1?F1(e):new zt(e,t,r,n??1)}function zt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Ci(zt,Va,pu(Qr,{brighter(e){return e=e==null?Io:Math.pow(Io,e),new zt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Fr:Math.pow(Fr,e),new zt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new zt(Ln(this.r),Ln(this.g),Ln(this.b),Mo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ds,formatHex:Ds,formatHex8:B1,formatRgb:As,toString:As}));function Ds(){return`#${An(this.r)}${An(this.g)}${An(this.b)}`}function B1(){return`#${An(this.r)}${An(this.g)}${An(this.b)}${An((isNaN(this.opacity)?1:this.opacity)*255)}`}function As(){const e=Mo(this.opacity);return`${e===1?"rgb(":"rgba("}${Ln(this.r)}, ${Ln(this.g)}, ${Ln(this.b)}${e===1?")":`, ${e})`}`}function Mo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ln(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function An(e){return e=Ln(e),(e<16?"0":"")+e.toString(16)}function Ks(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new an(e,t,r,n)}function mu(e){if(e instanceof an)return new an(e.h,e.s,e.l,e.opacity);if(e instanceof Qr||(e=jr(e)),!e)return new an;if(e instanceof an)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,i=a-o,l=(a+o)/2;return i?(t===a?s=(r-n)/i+(r0&&l<1?0:s,new an(s,i,l,e.opacity)}function j1(e,t,r,n){return arguments.length===1?mu(e):new an(e,t,r,n??1)}function an(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ci(an,j1,pu(Qr,{brighter(e){return e=e==null?Io:Math.pow(Io,e),new an(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Fr:Math.pow(Fr,e),new an(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new zt(ga(e>=240?e-240:e+120,o,n),ga(e,o,n),ga(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new an(Ls(this.h),so(this.s),so(this.l),Mo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Mo(this.opacity);return`${e===1?"hsl(":"hsla("}${Ls(this.h)}, ${so(this.s)*100}%, ${so(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ls(e){return e=(e||0)%360,e<0?e+360:e}function so(e){return Math.max(0,Math.min(1,e||0))}function ga(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const gu=e=>()=>e;function W1(e,t){return function(r){return e+r*t}}function U1(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function G1(e){return(e=+e)==1?yu:function(t,r){return r-t?U1(t,r,e):gu(isNaN(t)?r:t)}}function yu(e,t){var r=t-e;return r?W1(e,r):gu(isNaN(e)?t:e)}const Vs=function e(t){var r=G1(t);function n(o,a){var s=r((o=Va(o)).r,(a=Va(a)).r),i=r(o.g,a.g),l=r(o.b,a.b),c=yu(o.opacity,a.opacity);return function(d){return o.r=s(d),o.g=i(d),o.b=l(d),o.opacity=c(d),o+""}}return n.gamma=e,n}(1);function Nn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Ha=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ya=new RegExp(Ha.source,"g");function X1(e){return function(){return e}}function Y1(e){return function(t){return e(t)+""}}function q1(e,t){var r=Ha.lastIndex=ya.lastIndex=0,n,o,a,s=-1,i=[],l=[];for(e=e+"",t=t+"";(n=Ha.exec(e))&&(o=ya.exec(t));)(a=o.index)>r&&(a=t.slice(r,a),i[s]?i[s]+=a:i[++s]=a),(n=n[0])===(o=o[0])?i[s]?i[s]+=o:i[++s]=o:(i[++s]=null,l.push({i:s,x:Nn(n,o)})),r=ya.lastIndex;return r180?d+=360:d-c>180&&(c+=360),v.push({i:f.push(o(f)+"rotate(",null,n)-2,x:Nn(c,d)})):d&&f.push(o(f)+"rotate("+d+n)}function i(c,d,f,v){c!==d?v.push({i:f.push(o(f)+"skewX(",null,n)-2,x:Nn(c,d)}):d&&f.push(o(f)+"skewX("+d+n)}function l(c,d,f,v,h,p){if(c!==f||d!==v){var g=h.push(o(h)+"scale(",null,",",null,")");p.push({i:g-4,x:Nn(c,f)},{i:g-2,x:Nn(d,v)})}else(f!==1||v!==1)&&h.push(o(h)+"scale("+f+","+v+")")}return function(c,d){var f=[],v=[];return c=e(c),d=e(d),a(c.translateX,c.translateY,d.translateX,d.translateY,f,v),s(c.rotate,d.rotate,f,v),i(c.skewX,d.skewX,f,v),l(c.scaleX,c.scaleY,d.scaleX,d.scaleY,f,v),c=d=null,function(h){for(var p=-1,g=v.length,y;++p=0&&e._call.call(void 0,t),e=e._next;--cr}function Fs(){Hn=(To=Wr.now())+ea,cr=$r=0;try{i0()}finally{cr=0,l0(),Hn=0}}function s0(){var e=Wr.now(),t=e-To;t>bu&&(ea-=t,To=e)}function l0(){for(var e,t=Po,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Po=r);Or=e,Fa(n)}function Fa(e){if(!cr){$r&&($r=clearTimeout($r));var t=e-Hn;t>24?(e<1/0&&($r=setTimeout(Fs,e-Wr.now()-ea)),_r&&(_r=clearInterval(_r))):(_r||(To=Wr.now(),_r=setInterval(s0,bu)),cr=1,Su(Fs))}}function Bs(e,t,r){var n=new $o;return t=t==null?0:+t,n.restart(o=>{n.stop(),e(o+t)},t,r),n}var c0=Jo("start","end","cancel","interrupt"),u0=[],Eu=0,js=1,Ba=2,Co=3,Ws=4,ja=5,xo=6;function ta(e,t,r,n,o,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;d0(e,r,{name:t,index:n,group:o,on:c0,tween:u0,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Eu})}function bi(e,t){var r=ln(e,t);if(r.state>Eu)throw new Error("too late; already scheduled");return r}function vn(e,t){var r=ln(e,t);if(r.state>Co)throw new Error("too late; already running");return r}function ln(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function d0(e,t,r){var n=e.__transition,o;n[t]=r,r.timer=wu(a,0,r.time);function a(c){r.state=js,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var d,f,v,h;if(r.state!==js)return l();for(d in n)if(h=n[d],h.name===r.name){if(h.state===Co)return Bs(s);h.state===Ws?(h.state=xo,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete n[d]):+dBa&&n.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function z0(e,t,r){var n,o,a=H0(t)?bi:vn;return function(){var s=a(this,e),i=s.on;i!==n&&(o=(n=i).copy()).on(t,r),s.on=o}}function F0(e,t){var r=this._id;return arguments.length<2?ln(this.node(),r).on.on(e):this.each(z0(r,e,t))}function B0(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function j0(){return this.on("end.remove",B0(this._id))}function W0(e){var t=this._name,r=this._id;typeof e!="function"&&(e=gi(e));for(var n=this._groups,o=n.length,a=new Array(o),s=0;s()=>e;function my(e,{sourceEvent:t,target:r,transform:n,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:o}})}function yn(e,t,r){this.k=e,this.x=t,this.y=r}yn.prototype={constructor:yn,scale:function(e){return e===1?this:new yn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new yn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var kn=new yn(1,0,0);yn.prototype;function Ca(e){e.stopImmediatePropagation()}function Rr(e){e.preventDefault(),e.stopImmediatePropagation()}function gy(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function yy(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Us(){return this.__zoom||kn}function Cy(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function xy(){return navigator.maxTouchPoints||"ontouchstart"in this}function by(e,t,r){var n=e.invertX(t[0][0])-r[0][0],o=e.invertX(t[1][0])-r[1][0],a=e.invertY(t[0][1])-r[0][1],s=e.invertY(t[1][1])-r[1][1];return e.translate(o>n?(n+o)/2:Math.min(0,n)||Math.max(0,o),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function Sy(){var e=gy,t=yy,r=by,n=Cy,o=xy,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],i=250,l=o0,c=Jo("start","zoom","end"),d,f,v,h=500,p=150,g=0,y=10;function m(b){b.property("__zoom",Us).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",_).on("dblclick.zoom",A).filter(o).on("touchstart.zoom",T).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",w).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}m.transform=function(b,I,k,P){var $=b.selection?b.selection():b;$.property("__zoom",Us),b!==$?E(b,I,k,P):$.interrupt().each(function(){N(this,arguments).event(P).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},m.scaleBy=function(b,I,k,P){m.scaleTo(b,function(){var $=this.__zoom.k,D=typeof I=="function"?I.apply(this,arguments):I;return $*D},k,P)},m.scaleTo=function(b,I,k,P){m.transform(b,function(){var $=t.apply(this,arguments),D=this.__zoom,K=k==null?x($):typeof k=="function"?k.apply(this,arguments):k,L=D.invert(K),H=typeof I=="function"?I.apply(this,arguments):I;return r(S(C(D,H),K,L),$,s)},k,P)},m.translateBy=function(b,I,k,P){m.transform(b,function(){return r(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof k=="function"?k.apply(this,arguments):k),t.apply(this,arguments),s)},null,P)},m.translateTo=function(b,I,k,P,$){m.transform(b,function(){var D=t.apply(this,arguments),K=this.__zoom,L=P==null?x(D):typeof P=="function"?P.apply(this,arguments):P;return r(kn.translate(L[0],L[1]).scale(K.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof k=="function"?-k.apply(this,arguments):-k),D,s)},P,$)};function C(b,I){return I=Math.max(a[0],Math.min(a[1],I)),I===b.k?b:new yn(I,b.x,b.y)}function S(b,I,k){var P=I[0]-k[0]*b.k,$=I[1]-k[1]*b.k;return P===b.x&&$===b.y?b:new yn(b.k,P,$)}function x(b){return[(+b[0][0]+ +b[1][0])/2,(+b[0][1]+ +b[1][1])/2]}function E(b,I,k,P){b.on("start.zoom",function(){N(this,arguments).event(P).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(P).end()}).tween("zoom",function(){var $=this,D=arguments,K=N($,D).event(P),L=t.apply($,D),H=k==null?x(L):typeof k=="function"?k.apply($,D):k,z=Math.max(L[1][0]-L[0][0],L[1][1]-L[0][1]),j=$.__zoom,G=typeof I=="function"?I.apply($,D):I,Y=l(j.invert(H).concat(z/j.k),G.invert(H).concat(z/G.k));return function(ee){if(ee===1)ee=G;else{var X=Y(ee),B=z/X[2];ee=new yn(B,H[0]-X[0]*B,H[1]-X[1]*B)}K.zoom(null,ee)}})}function N(b,I,k){return!k&&b.__zooming||new R(b,I)}function R(b,I){this.that=b,this.args=I,this.active=0,this.sourceEvent=null,this.extent=t.apply(b,I),this.taps=0}R.prototype={event:function(b){return b&&(this.sourceEvent=b),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(b,I){return this.mouse&&b!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&b!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&b!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(b){var I=on(this.that).datum();c.call(b,this.that,new my(b,{sourceEvent:this.sourceEvent,target:m,type:b,transform:this.that.__zoom,dispatch:c}),I)}};function M(b,...I){if(!e.apply(this,arguments))return;var k=N(this,I).event(b),P=this.__zoom,$=Math.max(a[0],Math.min(a[1],P.k*Math.pow(2,n.apply(this,arguments)))),D=un(b);if(k.wheel)(k.mouse[0][0]!==D[0]||k.mouse[0][1]!==D[1])&&(k.mouse[1]=P.invert(k.mouse[0]=D)),clearTimeout(k.wheel);else{if(P.k===$)return;k.mouse=[D,P.invert(D)],bo(this),k.start()}Rr(b),k.wheel=setTimeout(K,p),k.zoom("mouse",r(S(C(P,$),k.mouse[0],k.mouse[1]),k.extent,s));function K(){k.wheel=null,k.end()}}function _(b,...I){if(v||!e.apply(this,arguments))return;var k=b.currentTarget,P=N(this,I,!0).event(b),$=on(b.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",z,!0),D=un(b,k),K=b.clientX,L=b.clientY;vu(b.view),Ca(b),P.mouse=[D,this.__zoom.invert(D)],bo(this),P.start();function H(j){if(Rr(j),!P.moved){var G=j.clientX-K,Y=j.clientY-L;P.moved=G*G+Y*Y>g}P.event(j).zoom("mouse",r(S(P.that.__zoom,P.mouse[0]=un(j,k),P.mouse[1]),P.extent,s))}function z(j){$.on("mousemove.zoom mouseup.zoom",null),hu(j.view,P.moved),Rr(j),P.event(j).end()}}function A(b,...I){if(e.apply(this,arguments)){var k=this.__zoom,P=un(b.changedTouches?b.changedTouches[0]:b,this),$=k.invert(P),D=k.k*(b.shiftKey?.5:2),K=r(S(C(k,D),P,$),t.apply(this,I),s);Rr(b),i>0?on(this).transition().duration(i).call(E,K,P,b):on(this).call(m.transform,K,P,b)}}function T(b,...I){if(e.apply(this,arguments)){var k=b.touches,P=k.length,$=N(this,I,b.changedTouches.length===P).event(b),D,K,L,H;for(Ca(b),K=0;K"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},ku=bn.error001();function ht(e,t){const r=u.useContext(na);if(r===null)throw new Error(ku);return eu(r,e,t)}const kt=()=>{const e=u.useContext(na);if(e===null)throw new Error(ku);return u.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},Ey=e=>e.userSelectionActive?"none":"all";function Ny({position:e,children:t,className:r,style:n,...o}){const a=ht(Ey),s=`${e}`.split("-");return V.createElement("div",{className:tn(["react-flow__panel",r,...s]),style:{...n,pointerEvents:a},...o},t)}function _y({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:V.createElement(Ny,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},V.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const Ry=({x:e,y:t,label:r,labelStyle:n={},labelShowBg:o=!0,labelBgStyle:a={},labelBgPadding:s=[2,4],labelBgBorderRadius:i=2,children:l,className:c,...d})=>{const f=u.useRef(null),[v,h]=u.useState({x:0,y:0,width:0,height:0}),p=tn(["react-flow__edge-textwrapper",c]);return u.useEffect(()=>{if(f.current){const g=f.current.getBBox();h({x:g.x,y:g.y,width:g.width,height:g.height})}},[r]),typeof r>"u"||!r?null:V.createElement("g",{transform:`translate(${e-v.width/2} ${t-v.height/2})`,className:p,visibility:v.width?"visible":"hidden",...d},o&&V.createElement("rect",{width:v.width+2*s[0],x:-s[0],y:-s[1],height:v.height+2*s[1],className:"react-flow__edge-textbg",style:a,rx:i,ry:i}),V.createElement("text",{className:"react-flow__edge-text",y:v.height/2,dy:"0.3em",ref:f,style:n},r),l)};var ky=u.memo(Ry);const wi=e=>({width:e.offsetWidth,height:e.offsetHeight}),ur=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),Ei=(e={x:0,y:0},t)=>({x:ur(e.x,t[0][0],t[1][0]),y:ur(e.y,t[0][1],t[1][1])}),Gs=(e,t,r)=>er?-ur(Math.abs(e-r),1,50)/50:0,Iu=(e,t)=>{const r=Gs(e.x,35,t.width-35)*20,n=Gs(e.y,35,t.height-35)*20;return[r,n]},Mu=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Iy=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Ni=({x:e,y:t,width:r,height:n})=>({x:e,y:t,x2:e+r,y2:t+n}),My=({x:e,y:t,x2:r,y2:n})=>({x:e,y:t,width:r-e,height:n-t}),Xs=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),Wa=(e,t)=>{const r=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),n=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(r*n)},Py=e=>Qt(e.width)&&Qt(e.height)&&Qt(e.x)&&Qt(e.y),Qt=e=>!isNaN(e)&&isFinite(e),St=Symbol.for("internals"),Pu=["Enter"," ","Escape"],Ty=(e,t)=>{},$y=e=>"nativeEvent"in e;function Ua(e){var o,a;const t=$y(e)?e.nativeEvent:e,r=((a=(o=t.composedPath)==null?void 0:o.call(t))==null?void 0:a[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||(r==null?void 0:r.hasAttribute("contenteditable"))||!!(r!=null&&r.closest(".nokey"))}const Tu=e=>"clientX"in e,In=(e,t)=>{var a,s;const r=Tu(e),n=r?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,o=r?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:n-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},Oo=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},eo=({id:e,path:t,labelX:r,labelY:n,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:c,style:d,markerEnd:f,markerStart:v,interactionWidth:h=20})=>V.createElement(V.Fragment,null,V.createElement("path",{id:e,style:d,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:v}),h&&V.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}),o&&Qt(r)&&Qt(n)?V.createElement(ky,{x:r,y:n,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:c}):null);eo.displayName="BaseEdge";function kr(e,t,r){return r===void 0?r:n=>{const o=t().edges.find(a=>a.id===e);o&&r(n,{...o})}}function $u({sourceX:e,sourceY:t,targetX:r,targetY:n}){const o=Math.abs(r-e)/2,a=r{const[y,m,C]=Du({sourceX:e,sourceY:t,sourcePosition:o,targetX:r,targetY:n,targetPosition:a});return V.createElement(eo,{path:y,labelX:m,labelY:C,label:s,labelStyle:i,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:v,markerEnd:h,markerStart:p,interactionWidth:g})});_i.displayName="SimpleBezierEdge";const qs={[we.Left]:{x:-1,y:0},[we.Right]:{x:1,y:0},[we.Top]:{x:0,y:-1},[we.Bottom]:{x:0,y:1}},Oy=({source:e,sourcePosition:t=we.Bottom,target:r})=>t===we.Left||t===we.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Dy({source:e,sourcePosition:t=we.Bottom,target:r,targetPosition:n=we.Top,center:o,offset:a}){const s=qs[t],i=qs[n],l={x:e.x+s.x*a,y:e.y+s.y*a},c={x:r.x+i.x*a,y:r.y+i.y*a},d=Oy({source:l,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",v=d[f];let h=[],p,g;const y={x:0,y:0},m={x:0,y:0},[C,S,x,E]=$u({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(s[f]*i[f]===-1){p=o.x||C,g=o.y||S;const R=[{x:p,y:l.y},{x:p,y:c.y}],M=[{x:l.x,y:g},{x:c.x,y:g}];s[f]===v?h=f==="x"?R:M:h=f==="x"?M:R}else{const R=[{x:l.x,y:c.y}],M=[{x:c.x,y:l.y}];if(f==="x"?h=s.x===v?M:R:h=s.y===v?R:M,t===n){const w=Math.abs(e[f]-r[f]);if(w<=a){const b=Math.min(a-1,a-w);s[f]===v?y[f]=(l[f]>e[f]?-1:1)*b:m[f]=(c[f]>r[f]?-1:1)*b}}if(t!==n){const w=f==="x"?"y":"x",b=s[f]===i[w],I=l[w]>c[w],k=l[w]=O?(p=(_.x+A.x)/2,g=h[0].y):(p=h[0].x,g=(_.y+A.y)/2)}return[[e,{x:l.x+y.x,y:l.y+y.y},...h,{x:c.x+m.x,y:c.y+m.y},r],p,g,x,E]}function Ay(e,t,r,n){const o=Math.min(Zs(e,t)/2,Zs(t,r)/2,n),{x:a,y:s}=t;if(e.x===a&&a===r.x||e.y===s&&s===r.y)return`L${a} ${s}`;if(e.y===s){const c=e.x{let S="";return C>0&&C{const[m,C,S]=Ga({sourceX:e,sourceY:t,sourcePosition:f,targetX:r,targetY:n,targetPosition:v,borderRadius:g==null?void 0:g.borderRadius,offset:g==null?void 0:g.offset});return V.createElement(eo,{path:m,labelX:C,labelY:S,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:c,style:d,markerEnd:h,markerStart:p,interactionWidth:y})});ra.displayName="SmoothStepEdge";const Ri=u.memo(e=>{var t;return V.createElement(ra,{...e,pathOptions:u.useMemo(()=>{var r;return{borderRadius:0,offset:(r=e.pathOptions)==null?void 0:r.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});Ri.displayName="StepEdge";function Ky({sourceX:e,sourceY:t,targetX:r,targetY:n}){const[o,a,s,i]=$u({sourceX:e,sourceY:t,targetX:r,targetY:n});return[`M ${e},${t}L ${r},${n}`,o,a,s,i]}const ki=u.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:c,style:d,markerEnd:f,markerStart:v,interactionWidth:h})=>{const[p,g,y]=Ky({sourceX:e,sourceY:t,targetX:r,targetY:n});return V.createElement(eo,{path:p,labelX:g,labelY:y,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:c,style:d,markerEnd:f,markerStart:v,interactionWidth:h})});ki.displayName="StraightEdge";function uo(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Js({pos:e,x1:t,y1:r,x2:n,y2:o,c:a}){switch(e){case we.Left:return[t-uo(t-n,a),r];case we.Right:return[t+uo(n-t,a),r];case we.Top:return[t,r-uo(r-o,a)];case we.Bottom:return[t,r+uo(o-r,a)]}}function Au({sourceX:e,sourceY:t,sourcePosition:r=we.Bottom,targetX:n,targetY:o,targetPosition:a=we.Top,curvature:s=.25}){const[i,l]=Js({pos:r,x1:e,y1:t,x2:n,y2:o,c:s}),[c,d]=Js({pos:a,x1:n,y1:o,x2:e,y2:t,c:s}),[f,v,h,p]=Ou({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:l,targetControlX:c,targetControlY:d});return[`M${e},${t} C${i},${l} ${c},${d} ${n},${o}`,f,v,h,p]}const Ao=u.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,sourcePosition:o=we.Bottom,targetPosition:a=we.Top,label:s,labelStyle:i,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:v,markerEnd:h,markerStart:p,pathOptions:g,interactionWidth:y})=>{const[m,C,S]=Au({sourceX:e,sourceY:t,sourcePosition:o,targetX:r,targetY:n,targetPosition:a,curvature:g==null?void 0:g.curvature});return V.createElement(eo,{path:m,labelX:C,labelY:S,label:s,labelStyle:i,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:v,markerEnd:h,markerStart:p,interactionWidth:y})});Ao.displayName="BezierEdge";const Ii=u.createContext(null),Ly=Ii.Provider;Ii.Consumer;const Vy=()=>u.useContext(Ii),Hy=e=>"id"in e&&"source"in e&&"target"in e,zy=({source:e,sourceHandle:t,target:r,targetHandle:n})=>`reactflow__edge-${e}${t||""}-${r}${n||""}`,Xa=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(n=>`${n}=${e[n]}`).join("&")}`,Fy=(e,t)=>t.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),Ku=(e,t)=>{if(!e.source||!e.target)return t;let r;return Hy(e)?r={...e}:r={...e,id:zy(e)},Fy(r,t)?t:t.concat(r)},Ya=({x:e,y:t},[r,n,o],a,[s,i])=>{const l={x:(e-r)/o,y:(t-n)/o};return a?{x:s*Math.round(l.x/s),y:i*Math.round(l.y/i)}:l},Lu=({x:e,y:t},[r,n,o])=>({x:e*o+r,y:t*o+n}),ar=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const r=(e.width??0)*t[0],n=(e.height??0)*t[1],o={x:e.position.x-r,y:e.position.y-n};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-r,y:e.positionAbsolute.y-n}:o}},Mi=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((n,o)=>{const{x:a,y:s}=ar(o,t).positionAbsolute;return Iy(n,Ni({x:a,y:s,width:o.width||0,height:o.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return My(r)},Vu=(e,t,[r,n,o]=[0,0,1],a=!1,s=!1,i=[0,0])=>{const l={x:(t.x-r)/o,y:(t.y-n)/o,width:t.width/o,height:t.height/o},c=[];return e.forEach(d=>{const{width:f,height:v,selectable:h=!0,hidden:p=!1}=d;if(s&&!h||p)return!1;const{positionAbsolute:g}=ar(d,i),y={x:g.x,y:g.y,width:f||0,height:v||0},m=Wa(l,y),C=typeof f>"u"||typeof v>"u"||f===null||v===null,S=a&&m>0,x=(f||0)*(v||0);(C||S||m>=x||d.dragging)&&c.push(d)}),c},Hu=(e,t)=>{const r=e.map(n=>n.id);return t.filter(n=>r.includes(n.source)||r.includes(n.target))},zu=(e,t,r,n,o,a=.1)=>{const s=t/(e.width*(1+a)),i=r/(e.height*(1+a)),l=Math.min(s,i),c=ur(l,n,o),d=e.x+e.width/2,f=e.y+e.height/2,v=t/2-d*c,h=r/2-f*c;return{x:v,y:h,zoom:c}},Dn=(e,t=0)=>e.transition().duration(t);function Qs(e,t,r,n){return(t[r]||[]).reduce((o,a)=>{var s,i;return`${e.id}-${a.id}-${r}`!==n&&o.push({id:a.id||null,type:r,nodeId:e.id,x:(((s=e.positionAbsolute)==null?void 0:s.x)??0)+a.x+a.width/2,y:(((i=e.positionAbsolute)==null?void 0:i.y)??0)+a.y+a.height/2}),o},[])}function By(e,t,r,n,o,a){const{x:s,y:i}=In(e),c=t.elementsFromPoint(s,i).find(p=>p.classList.contains("react-flow__handle"));if(c){const p=c.getAttribute("data-nodeid");if(p){const g=Pi(void 0,c),y=c.getAttribute("data-handleid"),m=a({nodeId:p,id:y,type:g});if(m){const C=o.find(S=>S.nodeId===p&&S.type===g&&S.id===y);return{handle:{id:y,type:g,nodeId:p,x:(C==null?void 0:C.x)||r.x,y:(C==null?void 0:C.y)||r.y},validHandleResult:m}}}}let d=[],f=1/0;if(o.forEach(p=>{const g=Math.sqrt((p.x-r.x)**2+(p.y-r.y)**2);if(g<=n){const y=a(p);g<=f&&(gp.isValid),h=d.some(({handle:p})=>p.type==="target");return d.find(({handle:p,validHandleResult:g})=>h?p.type==="target":v?g.isValid:!0)||d[0]}const jy={source:null,target:null,sourceHandle:null,targetHandle:null},Fu=()=>({handleDomNode:null,isValid:!1,connection:jy,endHandle:null});function Bu(e,t,r,n,o,a,s){const i=o==="target",l=s.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),c={...Fu(),handleDomNode:l};if(l){const d=Pi(void 0,l),f=l.getAttribute("data-nodeid"),v=l.getAttribute("data-handleid"),h=l.classList.contains("connectable"),p=l.classList.contains("connectableend"),g={source:i?f:r,sourceHandle:i?v:n,target:i?r:f,targetHandle:i?n:v};c.connection=g,h&&p&&(t===zn.Strict?i&&d==="source"||!i&&d==="target":f!==r||v!==n)&&(c.endHandle={nodeId:f,handleId:v,type:d},c.isValid=a(g))}return c}function Wy({nodes:e,nodeId:t,handleId:r,handleType:n}){return e.reduce((o,a)=>{if(a[St]){const{handleBounds:s}=a[St];let i=[],l=[];s&&(i=Qs(a,s,"source",`${t}-${r}-${n}`),l=Qs(a,s,"target",`${t}-${r}-${n}`)),o.push(...i,...l)}return o},[])}function Pi(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function xa(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function Uy(e,t){let r=null;return t?r="valid":e&&!t&&(r="invalid"),r}function ju({event:e,handleId:t,nodeId:r,onConnect:n,isTarget:o,getState:a,setState:s,isValidConnection:i,edgeUpdaterType:l,onEdgeUpdateEnd:c}){const d=Mu(e.target),{connectionMode:f,domNode:v,autoPanOnConnect:h,connectionRadius:p,onConnectStart:g,panBy:y,getNodes:m,cancelConnection:C}=a();let S=0,x;const{x:E,y:N}=In(e),R=d==null?void 0:d.elementFromPoint(E,N),M=Pi(l,R),_=v==null?void 0:v.getBoundingClientRect();if(!_||!M)return;let A,T=In(e,_),O=!1,w=null,b=!1,I=null;const k=Wy({nodes:m(),nodeId:r,handleId:t,handleType:M}),P=()=>{if(!h)return;const[K,L]=Iu(T,_);y({x:K,y:L}),S=requestAnimationFrame(P)};s({connectionPosition:T,connectionStatus:null,connectionNodeId:r,connectionHandleId:t,connectionHandleType:M,connectionStartHandle:{nodeId:r,handleId:t,type:M},connectionEndHandle:null}),g==null||g(e,{nodeId:r,handleId:t,handleType:M});function $(K){const{transform:L}=a();T=In(K,_);const{handle:H,validHandleResult:z}=By(K,d,Ya(T,L,!1,[1,1]),p,k,j=>Bu(j,f,r,t,o?"target":"source",i,d));if(x=H,O||(P(),O=!0),I=z.handleDomNode,w=z.connection,b=z.isValid,s({connectionPosition:x&&b?Lu({x:x.x,y:x.y},L):T,connectionStatus:Uy(!!x,b),connectionEndHandle:z.endHandle}),!x&&!b&&!I)return xa(A);w.source!==w.target&&I&&(xa(A),A=I,I.classList.add("connecting","react-flow__handle-connecting"),I.classList.toggle("valid",b),I.classList.toggle("react-flow__handle-valid",b))}function D(K){var L,H;(x||I)&&w&&b&&(n==null||n(w)),(H=(L=a()).onConnectEnd)==null||H.call(L,K),l&&(c==null||c(K)),xa(A),C(),cancelAnimationFrame(S),O=!1,b=!1,w=null,I=null,d.removeEventListener("mousemove",$),d.removeEventListener("mouseup",D),d.removeEventListener("touchmove",$),d.removeEventListener("touchend",D)}d.addEventListener("mousemove",$),d.addEventListener("mouseup",D),d.addEventListener("touchmove",$),d.addEventListener("touchend",D)}const el=()=>!0,Gy=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),Xy=(e,t,r)=>n=>{const{connectionStartHandle:o,connectionEndHandle:a,connectionClickStartHandle:s}=n;return{connecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.handleId)===t&&(o==null?void 0:o.type)===r||(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.handleId)===t&&(a==null?void 0:a.type)===r,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.handleId)===t&&(s==null?void 0:s.type)===r}},Wu=u.forwardRef(({type:e="source",position:t=we.Top,isValidConnection:r,isConnectable:n=!0,isConnectableStart:o=!0,isConnectableEnd:a=!0,id:s,onConnect:i,children:l,className:c,onMouseDown:d,onTouchStart:f,...v},h)=>{var _,A;const p=s||null,g=e==="target",y=kt(),m=Vy(),{connectOnClick:C,noPanClassName:S}=ht(Gy,Ft),{connecting:x,clickConnecting:E}=ht(Xy(m,p,e),Ft);m||(A=(_=y.getState()).onError)==null||A.call(_,"010",bn.error010());const N=T=>{const{defaultEdgeOptions:O,onConnect:w,hasDefaultEdges:b}=y.getState(),I={...O,...T};if(b){const{edges:k,setEdges:P}=y.getState();P(Ku(I,k))}w==null||w(I),i==null||i(I)},R=T=>{if(!m)return;const O=Tu(T);o&&(O&&T.button===0||!O)&&ju({event:T,handleId:p,nodeId:m,onConnect:N,isTarget:g,getState:y.getState,setState:y.setState,isValidConnection:r||y.getState().isValidConnection||el}),O?d==null||d(T):f==null||f(T)},M=T=>{const{onClickConnectStart:O,onClickConnectEnd:w,connectionClickStartHandle:b,connectionMode:I,isValidConnection:k}=y.getState();if(!m||!b&&!o)return;if(!b){O==null||O(T,{nodeId:m,handleId:p,handleType:e}),y.setState({connectionClickStartHandle:{nodeId:m,type:e,handleId:p}});return}const P=Mu(T.target),$=r||k||el,{connection:D,isValid:K}=Bu({nodeId:m,id:p,type:e},I,b.nodeId,b.handleId||null,b.type,$,P);K&&N(D),w==null||w(T),y.setState({connectionClickStartHandle:null})};return V.createElement("div",{"data-handleid":p,"data-nodeid":m,"data-handlepos":t,"data-id":`${m}-${p}-${e}`,className:tn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",S,c,{source:!g,target:g,connectable:n,connectablestart:o,connectableend:a,connecting:E,connectionindicator:n&&(o&&!x||a&&x)}]),onMouseDown:R,onTouchStart:R,onClick:C?M:void 0,ref:h,...v},l)});Wu.displayName="Handle";var dr=u.memo(Wu);const Uu=({data:e,isConnectable:t,targetPosition:r=we.Top,sourcePosition:n=we.Bottom})=>V.createElement(V.Fragment,null,V.createElement(dr,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label,V.createElement(dr,{type:"source",position:n,isConnectable:t}));Uu.displayName="DefaultNode";var qa=u.memo(Uu);const Gu=({data:e,isConnectable:t,sourcePosition:r=we.Bottom})=>V.createElement(V.Fragment,null,e==null?void 0:e.label,V.createElement(dr,{type:"source",position:r,isConnectable:t}));Gu.displayName="InputNode";var Xu=u.memo(Gu);const Yu=({data:e,isConnectable:t,targetPosition:r=we.Top})=>V.createElement(V.Fragment,null,V.createElement(dr,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label);Yu.displayName="OutputNode";var qu=u.memo(Yu);const Ti=()=>null;Ti.displayName="GroupNode";const Yy=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected)}),fo=e=>e.id;function qy(e,t){return Ft(e.selectedNodes.map(fo),t.selectedNodes.map(fo))&&Ft(e.selectedEdges.map(fo),t.selectedEdges.map(fo))}const Zu=u.memo(({onSelectionChange:e})=>{const t=kt(),{selectedNodes:r,selectedEdges:n}=ht(Yy,qy);return u.useEffect(()=>{const o={nodes:r,edges:n};e==null||e(o),t.getState().onSelectionChange.forEach(a=>a(o))},[r,n,e]),null});Zu.displayName="SelectionListener";const Zy=e=>!!e.onSelectionChange;function Jy({onSelectionChange:e}){const t=ht(Zy);return e||t?V.createElement(Zu,{onSelectionChange:e}):null}const Qy=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function Zn(e,t){u.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function Ue(e,t,r){u.useEffect(()=>{typeof t<"u"&&r({[e]:t})},[t])}const eC=({nodes:e,edges:t,defaultNodes:r,defaultEdges:n,onConnect:o,onConnectStart:a,onConnectEnd:s,onClickConnectStart:i,onClickConnectEnd:l,nodesDraggable:c,nodesConnectable:d,nodesFocusable:f,edgesFocusable:v,edgesUpdatable:h,elevateNodesOnSelect:p,minZoom:g,maxZoom:y,nodeExtent:m,onNodesChange:C,onEdgesChange:S,elementsSelectable:x,connectionMode:E,snapGrid:N,snapToGrid:R,translateExtent:M,connectOnClick:_,defaultEdgeOptions:A,fitView:T,fitViewOptions:O,onNodesDelete:w,onEdgesDelete:b,onNodeDrag:I,onNodeDragStart:k,onNodeDragStop:P,onSelectionDrag:$,onSelectionDragStart:D,onSelectionDragStop:K,noPanClassName:L,nodeOrigin:H,rfId:z,autoPanOnConnect:j,autoPanOnNodeDrag:G,onError:Y,connectionRadius:ee,isValidConnection:X,nodeDragThreshold:B})=>{const{setNodes:U,setEdges:q,setDefaultNodesAndEdges:oe,setMinZoom:te,setMaxZoom:ie,setTranslateExtent:Z,setNodeExtent:ye,reset:Ee}=ht(Qy,Ft),ne=kt();return u.useEffect(()=>{const ge=n==null?void 0:n.map(re=>({...re,...A}));return oe(r,ge),()=>{Ee()}},[]),Ue("defaultEdgeOptions",A,ne.setState),Ue("connectionMode",E,ne.setState),Ue("onConnect",o,ne.setState),Ue("onConnectStart",a,ne.setState),Ue("onConnectEnd",s,ne.setState),Ue("onClickConnectStart",i,ne.setState),Ue("onClickConnectEnd",l,ne.setState),Ue("nodesDraggable",c,ne.setState),Ue("nodesConnectable",d,ne.setState),Ue("nodesFocusable",f,ne.setState),Ue("edgesFocusable",v,ne.setState),Ue("edgesUpdatable",h,ne.setState),Ue("elementsSelectable",x,ne.setState),Ue("elevateNodesOnSelect",p,ne.setState),Ue("snapToGrid",R,ne.setState),Ue("snapGrid",N,ne.setState),Ue("onNodesChange",C,ne.setState),Ue("onEdgesChange",S,ne.setState),Ue("connectOnClick",_,ne.setState),Ue("fitViewOnInit",T,ne.setState),Ue("fitViewOnInitOptions",O,ne.setState),Ue("onNodesDelete",w,ne.setState),Ue("onEdgesDelete",b,ne.setState),Ue("onNodeDrag",I,ne.setState),Ue("onNodeDragStart",k,ne.setState),Ue("onNodeDragStop",P,ne.setState),Ue("onSelectionDrag",$,ne.setState),Ue("onSelectionDragStart",D,ne.setState),Ue("onSelectionDragStop",K,ne.setState),Ue("noPanClassName",L,ne.setState),Ue("nodeOrigin",H,ne.setState),Ue("rfId",z,ne.setState),Ue("autoPanOnConnect",j,ne.setState),Ue("autoPanOnNodeDrag",G,ne.setState),Ue("onError",Y,ne.setState),Ue("connectionRadius",ee,ne.setState),Ue("isValidConnection",X,ne.setState),Ue("nodeDragThreshold",B,ne.setState),Zn(e,U),Zn(t,q),Zn(g,te),Zn(y,ie),Zn(M,Z),Zn(m,ye),null},tl={display:"none"},tC={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Ju="react-flow__node-desc",Qu="react-flow__edge-desc",nC="react-flow__aria-live",rC=e=>e.ariaLiveMessage;function oC({rfId:e}){const t=ht(rC);return V.createElement("div",{id:`${nC}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:tC},t)}function aC({rfId:e,disableKeyboardA11y:t}){return V.createElement(V.Fragment,null,V.createElement("div",{id:`${Ju}-${e}`,style:tl},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),V.createElement("div",{id:`${Qu}-${e}`,style:tl},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&V.createElement(oC,{rfId:e}))}var Gr=(e=null,t={actInsideInputWithModifier:!0})=>{const[r,n]=u.useState(!1),o=u.useRef(!1),a=u.useRef(new Set([])),[s,i]=u.useMemo(()=>{if(e!==null){const c=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.split("+")),d=c.reduce((f,v)=>f.concat(...v),[]);return[c,d]}return[[],[]]},[e]);return u.useEffect(()=>{const l=typeof document<"u"?document:null,c=(t==null?void 0:t.target)||l;if(e!==null){const d=h=>{if(o.current=h.ctrlKey||h.metaKey||h.shiftKey,(!o.current||o.current&&!t.actInsideInputWithModifier)&&Ua(h))return!1;const g=rl(h.code,i);a.current.add(h[g]),nl(s,a.current,!1)&&(h.preventDefault(),n(!0))},f=h=>{if((!o.current||o.current&&!t.actInsideInputWithModifier)&&Ua(h))return!1;const g=rl(h.code,i);nl(s,a.current,!0)?(n(!1),a.current.clear()):a.current.delete(h[g]),h.key==="Meta"&&a.current.clear(),o.current=!1},v=()=>{a.current.clear(),n(!1)};return c==null||c.addEventListener("keydown",d),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",v),()=>{c==null||c.removeEventListener("keydown",d),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",v)}}},[e,n]),r};function nl(e,t,r){return e.filter(n=>r||n.length===t.size).some(n=>n.every(o=>t.has(o)))}function rl(e,t){return t.includes(e)?"code":"key"}function ed(e,t,r,n){var s,i;if(!e.parentNode)return r;const o=t.get(e.parentNode),a=ar(o,n);return ed(o,t,{x:(r.x??0)+a.x,y:(r.y??0)+a.y,z:(((s=o[St])==null?void 0:s.z)??0)>(r.z??0)?((i=o[St])==null?void 0:i.z)??0:r.z??0},n)}function td(e,t,r){e.forEach(n=>{var o;if(n.parentNode&&!e.has(n.parentNode))throw new Error(`Parent node ${n.parentNode} not found`);if(n.parentNode||r!=null&&r[n.id]){const{x:a,y:s,z:i}=ed(n,e,{...n.position,z:((o=n[St])==null?void 0:o.z)??0},t);n.positionAbsolute={x:a,y:s},n[St].z=i,r!=null&&r[n.id]&&(n[St].isParent=!0)}})}function ba(e,t,r,n){const o=new Map,a={},s=n?1e3:0;return e.forEach(i=>{var f;const l=(Qt(i.zIndex)?i.zIndex:0)+(i.selected?s:0),c=t.get(i.id),d={width:c==null?void 0:c.width,height:c==null?void 0:c.height,...i,positionAbsolute:{x:i.position.x,y:i.position.y}};i.parentNode&&(d.parentNode=i.parentNode,a[i.parentNode]=!0),Object.defineProperty(d,St,{enumerable:!1,value:{handleBounds:(f=c==null?void 0:c[St])==null?void 0:f.handleBounds,z:l}}),o.set(i.id,d)}),td(o,r,a),o}function nd(e,t={}){const{getNodes:r,width:n,height:o,minZoom:a,maxZoom:s,d3Zoom:i,d3Selection:l,fitViewOnInitDone:c,fitViewOnInit:d,nodeOrigin:f}=e(),v=t.initial&&!c&&d;if(i&&l&&(v||!t.initial)){const p=r().filter(y=>{var C;const m=t.includeHiddenNodes?y.width&&y.height:!y.hidden;return(C=t.nodes)!=null&&C.length?m&&t.nodes.some(S=>S.id===y.id):m}),g=p.every(y=>y.width&&y.height);if(p.length>0&&g){const y=Mi(p,f),{x:m,y:C,zoom:S}=zu(y,n,o,t.minZoom??a,t.maxZoom??s,t.padding??.1),x=kn.translate(m,C).scale(S);return typeof t.duration=="number"&&t.duration>0?i.transform(Dn(l,t.duration),x):i.transform(l,x),!0}}return!1}function iC(e,t){return e.forEach(r=>{const n=t.get(r.id);n&&t.set(n.id,{...n,[St]:n[St],selected:r.selected})}),new Map(t)}function sC(e,t){return t.map(r=>{const n=e.find(o=>o.id===r.id);return n&&(r.selected=n.selected),r})}function vo({changedNodes:e,changedEdges:t,get:r,set:n}){const{nodeInternals:o,edges:a,onNodesChange:s,onEdgesChange:i,hasDefaultNodes:l,hasDefaultEdges:c}=r();e!=null&&e.length&&(l&&n({nodeInternals:iC(e,o)}),s==null||s(e)),t!=null&&t.length&&(c&&n({edges:sC(t,a)}),i==null||i(t))}const Jn=()=>{},lC={zoomIn:Jn,zoomOut:Jn,zoomTo:Jn,getZoom:()=>1,setViewport:Jn,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Jn,fitBounds:Jn,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},cC=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),uC=()=>{const e=kt(),{d3Zoom:t,d3Selection:r}=ht(cC,Ft);return u.useMemo(()=>r&&t?{zoomIn:o=>t.scaleBy(Dn(r,o==null?void 0:o.duration),1.2),zoomOut:o=>t.scaleBy(Dn(r,o==null?void 0:o.duration),1/1.2),zoomTo:(o,a)=>t.scaleTo(Dn(r,a==null?void 0:a.duration),o),getZoom:()=>e.getState().transform[2],setViewport:(o,a)=>{const[s,i,l]=e.getState().transform,c=kn.translate(o.x??s,o.y??i).scale(o.zoom??l);t.transform(Dn(r,a==null?void 0:a.duration),c)},getViewport:()=>{const[o,a,s]=e.getState().transform;return{x:o,y:a,zoom:s}},fitView:o=>nd(e.getState,o),setCenter:(o,a,s)=>{const{width:i,height:l,maxZoom:c}=e.getState(),d=typeof(s==null?void 0:s.zoom)<"u"?s.zoom:c,f=i/2-o*d,v=l/2-a*d,h=kn.translate(f,v).scale(d);t.transform(Dn(r,s==null?void 0:s.duration),h)},fitBounds:(o,a)=>{const{width:s,height:i,minZoom:l,maxZoom:c}=e.getState(),{x:d,y:f,zoom:v}=zu(o,s,i,l,c,(a==null?void 0:a.padding)??.1),h=kn.translate(d,f).scale(v);t.transform(Dn(r,a==null?void 0:a.duration),h)},project:o=>{const{transform:a,snapToGrid:s,snapGrid:i}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),Ya(o,a,s,i)},screenToFlowPosition:o=>{const{transform:a,snapToGrid:s,snapGrid:i,domNode:l}=e.getState();if(!l)return o;const{x:c,y:d}=l.getBoundingClientRect(),f={x:o.x-c,y:o.y-d};return Ya(f,a,s,i)},flowToScreenPosition:o=>{const{transform:a,domNode:s}=e.getState();if(!s)return o;const{x:i,y:l}=s.getBoundingClientRect(),c=Lu(o,a);return{x:c.x+i,y:c.y+l}},viewportInitialized:!0}:lC,[t,r])};function rd(){const e=uC(),t=kt(),r=u.useCallback(()=>t.getState().getNodes().map(g=>({...g})),[]),n=u.useCallback(g=>t.getState().nodeInternals.get(g),[]),o=u.useCallback(()=>{const{edges:g=[]}=t.getState();return g.map(y=>({...y}))},[]),a=u.useCallback(g=>{const{edges:y=[]}=t.getState();return y.find(m=>m.id===g)},[]),s=u.useCallback(g=>{const{getNodes:y,setNodes:m,hasDefaultNodes:C,onNodesChange:S}=t.getState(),x=y(),E=typeof g=="function"?g(x):g;if(C)m(E);else if(S){const N=E.length===0?x.map(R=>({type:"remove",id:R.id})):E.map(R=>({item:R,type:"reset"}));S(N)}},[]),i=u.useCallback(g=>{const{edges:y=[],setEdges:m,hasDefaultEdges:C,onEdgesChange:S}=t.getState(),x=typeof g=="function"?g(y):g;if(C)m(x);else if(S){const E=x.length===0?y.map(N=>({type:"remove",id:N.id})):x.map(N=>({item:N,type:"reset"}));S(E)}},[]),l=u.useCallback(g=>{const y=Array.isArray(g)?g:[g],{getNodes:m,setNodes:C,hasDefaultNodes:S,onNodesChange:x}=t.getState();if(S){const N=[...m(),...y];C(N)}else if(x){const E=y.map(N=>({item:N,type:"add"}));x(E)}},[]),c=u.useCallback(g=>{const y=Array.isArray(g)?g:[g],{edges:m=[],setEdges:C,hasDefaultEdges:S,onEdgesChange:x}=t.getState();if(S)C([...m,...y]);else if(x){const E=y.map(N=>({item:N,type:"add"}));x(E)}},[]),d=u.useCallback(()=>{const{getNodes:g,edges:y=[],transform:m}=t.getState(),[C,S,x]=m;return{nodes:g().map(E=>({...E})),edges:y.map(E=>({...E})),viewport:{x:C,y:S,zoom:x}}},[]),f=u.useCallback(({nodes:g,edges:y})=>{const{nodeInternals:m,getNodes:C,edges:S,hasDefaultNodes:x,hasDefaultEdges:E,onNodesDelete:N,onEdgesDelete:R,onNodesChange:M,onEdgesChange:_}=t.getState(),A=(g||[]).map(I=>I.id),T=(y||[]).map(I=>I.id),O=C().reduce((I,k)=>{const P=!A.includes(k.id)&&k.parentNode&&I.find(D=>D.id===k.parentNode);return(typeof k.deletable=="boolean"?k.deletable:!0)&&(A.includes(k.id)||P)&&I.push(k),I},[]),w=S.filter(I=>typeof I.deletable=="boolean"?I.deletable:!0),b=w.filter(I=>T.includes(I.id));if(O||b){const I=Hu(O,w),k=[...b,...I],P=k.reduce(($,D)=>($.includes(D.id)||$.push(D.id),$),[]);if((E||x)&&(E&&t.setState({edges:S.filter($=>!P.includes($.id))}),x&&(O.forEach($=>{m.delete($.id)}),t.setState({nodeInternals:new Map(m)}))),P.length>0&&(R==null||R(k),_&&_(P.map($=>({id:$,type:"remove"})))),O.length>0&&(N==null||N(O),M)){const $=O.map(D=>({id:D.id,type:"remove"}));M($)}}},[]),v=u.useCallback(g=>{const y=Py(g),m=y?null:t.getState().nodeInternals.get(g.id);return[y?g:Xs(m),m,y]},[]),h=u.useCallback((g,y=!0,m)=>{const[C,S,x]=v(g);return C?(m||t.getState().getNodes()).filter(E=>{if(!x&&(E.id===S.id||!E.positionAbsolute))return!1;const N=Xs(E),R=Wa(N,C);return y&&R>0||R>=C.width*C.height}):[]},[]),p=u.useCallback((g,y,m=!0)=>{const[C]=v(g);if(!C)return!1;const S=Wa(C,y);return m&&S>0||S>=C.width*C.height},[]);return u.useMemo(()=>({...e,getNodes:r,getNode:n,getEdges:o,getEdge:a,setNodes:s,setEdges:i,addNodes:l,addEdges:c,toObject:d,deleteElements:f,getIntersectingNodes:h,isNodeIntersecting:p}),[e,r,n,o,a,s,i,l,c,d,f,h,p])}const dC={actInsideInputWithModifier:!1};var fC=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const r=kt(),{deleteElements:n}=rd(),o=Gr(e,dC),a=Gr(t);u.useEffect(()=>{if(o){const{edges:s,getNodes:i}=r.getState(),l=i().filter(d=>d.selected),c=s.filter(d=>d.selected);n({nodes:l,edges:c}),r.setState({nodesSelectionActive:!1})}},[o]),u.useEffect(()=>{r.setState({multiSelectionActive:a})},[a])};function vC(e){const t=kt();u.useEffect(()=>{let r;const n=()=>{var a,s;if(!e.current)return;const o=wi(e.current);(o.height===0||o.width===0)&&((s=(a=t.getState()).onError)==null||s.call(a,"004",bn.error004())),t.setState({width:o.width||500,height:o.height||500})};return n(),window.addEventListener("resize",n),e.current&&(r=new ResizeObserver(()=>n()),r.observe(e.current)),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}},[])}const $i={position:"absolute",width:"100%",height:"100%",top:0,left:0},hC=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,ho=e=>({x:e.x,y:e.y,zoom:e.k}),Qn=(e,t)=>e.target.closest(`.${t}`),ol=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),al=e=>{const t=e.ctrlKey&&Oo()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},pC=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),mC=({onMove:e,onMoveStart:t,onMoveEnd:r,onPaneContextMenu:n,zoomOnScroll:o=!0,zoomOnPinch:a=!0,panOnScroll:s=!1,panOnScrollSpeed:i=.5,panOnScrollMode:l=Kn.Free,zoomOnDoubleClick:c=!0,elementsSelectable:d,panOnDrag:f=!0,defaultViewport:v,translateExtent:h,minZoom:p,maxZoom:g,zoomActivationKeyCode:y,preventScrolling:m=!0,children:C,noWheelClassName:S,noPanClassName:x})=>{const E=u.useRef(),N=kt(),R=u.useRef(!1),M=u.useRef(!1),_=u.useRef(null),A=u.useRef({x:0,y:0,zoom:0}),{d3Zoom:T,d3Selection:O,d3ZoomHandler:w,userSelectionActive:b}=ht(pC,Ft),I=Gr(y),k=u.useRef(0),P=u.useRef(!1),$=u.useRef();return vC(_),u.useEffect(()=>{if(_.current){const D=_.current.getBoundingClientRect(),K=Sy().scaleExtent([p,g]).translateExtent(h),L=on(_.current).call(K),H=kn.translate(v.x,v.y).scale(ur(v.zoom,p,g)),z=[[0,0],[D.width,D.height]],j=K.constrain()(H,z,h);K.transform(L,j),K.wheelDelta(al),N.setState({d3Zoom:K,d3Selection:L,d3ZoomHandler:L.on("wheel.zoom"),transform:[j.x,j.y,j.k],domNode:_.current.closest(".react-flow")})}},[]),u.useEffect(()=>{O&&T&&(s&&!I&&!b?O.on("wheel.zoom",D=>{if(Qn(D,S))return!1;D.preventDefault(),D.stopImmediatePropagation();const K=O.property("__zoom").k||1,L=Oo();if(D.ctrlKey&&a&&L){const B=un(D),U=al(D),q=K*Math.pow(2,U);T.scaleTo(O,q,B,D);return}const H=D.deltaMode===1?20:1;let z=l===Kn.Vertical?0:D.deltaX*H,j=l===Kn.Horizontal?0:D.deltaY*H;!L&&D.shiftKey&&l!==Kn.Vertical&&(z=D.deltaY*H,j=0),T.translateBy(O,-(z/K)*i,-(j/K)*i,{internal:!0});const G=ho(O.property("__zoom")),{onViewportChangeStart:Y,onViewportChange:ee,onViewportChangeEnd:X}=N.getState();clearTimeout($.current),P.current||(P.current=!0,t==null||t(D,G),Y==null||Y(G)),P.current&&(e==null||e(D,G),ee==null||ee(G),$.current=setTimeout(()=>{r==null||r(D,G),X==null||X(G),P.current=!1},150))},{passive:!1}):typeof w<"u"&&O.on("wheel.zoom",function(D,K){if(!m||Qn(D,S))return null;D.preventDefault(),w.call(this,D,K)},{passive:!1}))},[b,s,l,O,T,w,I,a,m,S,t,e,r]),u.useEffect(()=>{T&&T.on("start",D=>{var H,z;if(!D.sourceEvent||D.sourceEvent.internal)return null;k.current=(H=D.sourceEvent)==null?void 0:H.button;const{onViewportChangeStart:K}=N.getState(),L=ho(D.transform);R.current=!0,A.current=L,((z=D.sourceEvent)==null?void 0:z.type)==="mousedown"&&N.setState({paneDragging:!0}),K==null||K(L),t==null||t(D.sourceEvent,L)})},[T,t]),u.useEffect(()=>{T&&(b&&!R.current?T.on("zoom",null):b||T.on("zoom",D=>{var L;const{onViewportChange:K}=N.getState();if(N.setState({transform:[D.transform.x,D.transform.y,D.transform.k]}),M.current=!!(n&&ol(f,k.current??0)),(e||K)&&!((L=D.sourceEvent)!=null&&L.internal)){const H=ho(D.transform);K==null||K(H),e==null||e(D.sourceEvent,H)}}))},[b,T,e,f,n]),u.useEffect(()=>{T&&T.on("end",D=>{if(!D.sourceEvent||D.sourceEvent.internal)return null;const{onViewportChangeEnd:K}=N.getState();if(R.current=!1,N.setState({paneDragging:!1}),n&&ol(f,k.current??0)&&!M.current&&n(D.sourceEvent),M.current=!1,(r||K)&&hC(A.current,D.transform)){const L=ho(D.transform);A.current=L,clearTimeout(E.current),E.current=setTimeout(()=>{K==null||K(L),r==null||r(D.sourceEvent,L)},s?150:0)}})},[T,s,f,r,n]),u.useEffect(()=>{T&&T.filter(D=>{const K=I||o,L=a&&D.ctrlKey;if((f===!0||Array.isArray(f)&&f.includes(1))&&D.button===1&&D.type==="mousedown"&&(Qn(D,"react-flow__node")||Qn(D,"react-flow__edge")))return!0;if(!f&&!K&&!s&&!c&&!a||b||!c&&D.type==="dblclick"||Qn(D,S)&&D.type==="wheel"||Qn(D,x)&&(D.type!=="wheel"||s&&D.type==="wheel"&&!I)||!a&&D.ctrlKey&&D.type==="wheel"||!K&&!s&&!L&&D.type==="wheel"||!f&&(D.type==="mousedown"||D.type==="touchstart")||Array.isArray(f)&&!f.includes(D.button)&&(D.type==="mousedown"||D.type==="touchstart"))return!1;const H=Array.isArray(f)&&f.includes(D.button)||!D.button||D.button<=1;return(!D.ctrlKey||D.type==="wheel")&&H})},[b,T,o,a,s,c,f,d,I]),V.createElement("div",{className:"react-flow__renderer",ref:_,style:$i},C)},gC=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function yC(){const{userSelectionActive:e,userSelectionRect:t}=ht(gC,Ft);return e&&t?V.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function il(e,t){const r=e.find(n=>n.id===t.parentNode);if(r){const n=t.position.x+t.width-r.width,o=t.position.y+t.height-r.height;if(n>0||o>0||t.position.x<0||t.position.y<0){if(r.style={...r.style},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,n>0&&(r.style.width+=n),o>0&&(r.style.height+=o),t.position.x<0){const a=Math.abs(t.position.x);r.position.x=r.position.x-a,r.style.width+=a,t.position.x=0}if(t.position.y<0){const a=Math.abs(t.position.y);r.position.y=r.position.y-a,r.style.height+=a,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function od(e,t){if(e.some(n=>n.type==="reset"))return e.filter(n=>n.type==="reset").map(n=>n.item);const r=e.filter(n=>n.type==="add").map(n=>n.item);return t.reduce((n,o)=>{const a=e.filter(i=>i.id===o.id);if(a.length===0)return n.push(o),n;const s={...o};for(const i of a)if(i)switch(i.type){case"select":{s.selected=i.selected;break}case"position":{typeof i.position<"u"&&(s.position=i.position),typeof i.positionAbsolute<"u"&&(s.positionAbsolute=i.positionAbsolute),typeof i.dragging<"u"&&(s.dragging=i.dragging),s.expandParent&&il(n,s);break}case"dimensions":{typeof i.dimensions<"u"&&(s.width=i.dimensions.width,s.height=i.dimensions.height),typeof i.updateStyle<"u"&&(s.style={...s.style||{},...i.dimensions}),typeof i.resizing=="boolean"&&(s.resizing=i.resizing),s.expandParent&&il(n,s);break}case"remove":return n}return n.push(s),n},r)}function ad(e,t){return od(e,t)}function CC(e,t){return od(e,t)}const _n=(e,t)=>({id:e,type:"select",selected:t});function nr(e,t){return e.reduce((r,n)=>{const o=t.includes(n.id);return!n.selected&&o?(n.selected=!0,r.push(_n(n.id,!0))):n.selected&&!o&&(n.selected=!1,r.push(_n(n.id,!1))),r},[])}const Sa=(e,t)=>r=>{r.target===t.current&&(e==null||e(r))},xC=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),id=u.memo(({isSelecting:e,selectionMode:t=Ur.Full,panOnDrag:r,onSelectionStart:n,onSelectionEnd:o,onPaneClick:a,onPaneContextMenu:s,onPaneScroll:i,onPaneMouseEnter:l,onPaneMouseMove:c,onPaneMouseLeave:d,children:f})=>{const v=u.useRef(null),h=kt(),p=u.useRef(0),g=u.useRef(0),y=u.useRef(),{userSelectionActive:m,elementsSelectable:C,dragging:S}=ht(xC,Ft),x=()=>{h.setState({userSelectionActive:!1,userSelectionRect:null}),p.current=0,g.current=0},E=w=>{a==null||a(w),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},N=w=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){w.preventDefault();return}s==null||s(w)},R=i?w=>i(w):void 0,M=w=>{const{resetSelectedElements:b,domNode:I}=h.getState();if(y.current=I==null?void 0:I.getBoundingClientRect(),!C||!e||w.button!==0||w.target!==v.current||!y.current)return;const{x:k,y:P}=In(w,y.current);b(),h.setState({userSelectionRect:{width:0,height:0,startX:k,startY:P,x:k,y:P}}),n==null||n(w)},_=w=>{const{userSelectionRect:b,nodeInternals:I,edges:k,transform:P,onNodesChange:$,onEdgesChange:D,nodeOrigin:K,getNodes:L}=h.getState();if(!e||!y.current||!b)return;h.setState({userSelectionActive:!0,nodesSelectionActive:!1});const H=In(w,y.current),z=b.startX??0,j=b.startY??0,G={...b,x:H.xU.id),B=ee.map(U=>U.id);if(p.current!==B.length){p.current=B.length;const U=nr(Y,B);U.length&&($==null||$(U))}if(g.current!==X.length){g.current=X.length;const U=nr(k,X);U.length&&(D==null||D(U))}h.setState({userSelectionRect:G})},A=w=>{if(w.button!==0)return;const{userSelectionRect:b}=h.getState();!m&&b&&w.target===v.current&&(E==null||E(w)),h.setState({nodesSelectionActive:p.current>0}),x(),o==null||o(w)},T=w=>{m&&(h.setState({nodesSelectionActive:p.current>0}),o==null||o(w)),x()},O=C&&(e||m);return V.createElement("div",{className:tn(["react-flow__pane",{dragging:S,selection:e}]),onClick:O?void 0:Sa(E,v),onContextMenu:Sa(N,v),onWheel:Sa(R,v),onMouseEnter:O?void 0:l,onMouseDown:O?M:void 0,onMouseMove:O?_:c,onMouseUp:O?A:void 0,onMouseLeave:O?T:d,ref:v,style:$i},f,V.createElement(yC,null))});id.displayName="Pane";function sd(e,t){if(!e.parentNode)return!1;const r=t.get(e.parentNode);return r?r.selected?!0:sd(r,t):!1}function sl(e,t,r){let n=e;do{if(n!=null&&n.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function bC(e,t,r,n){return Array.from(e.values()).filter(o=>(o.selected||o.id===n)&&(!o.parentNode||!sd(o,e))&&(o.draggable||t&&typeof o.draggable>"u")).map(o=>{var a,s;return{id:o.id,position:o.position||{x:0,y:0},positionAbsolute:o.positionAbsolute||{x:0,y:0},distance:{x:r.x-(((a=o.positionAbsolute)==null?void 0:a.x)??0),y:r.y-(((s=o.positionAbsolute)==null?void 0:s.y)??0)},delta:{x:0,y:0},extent:o.extent,parentNode:o.parentNode,width:o.width,height:o.height,expandParent:o.expandParent}})}function SC(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function ld(e,t,r,n,o=[0,0],a){const s=SC(e,e.extent||n);let i=s;if(e.extent==="parent"&&!e.expandParent)if(e.parentNode&&e.width&&e.height){const d=r.get(e.parentNode),{x:f,y:v}=ar(d,o).positionAbsolute;i=d&&Qt(f)&&Qt(v)&&Qt(d.width)&&Qt(d.height)?[[f+e.width*o[0],v+e.height*o[1]],[f+d.width-e.width+e.width*o[0],v+d.height-e.height+e.height*o[1]]]:i}else a==null||a("005",bn.error005()),i=s;else if(e.extent&&e.parentNode&&e.extent!=="parent"){const d=r.get(e.parentNode),{x:f,y:v}=ar(d,o).positionAbsolute;i=[[e.extent[0][0]+f,e.extent[0][1]+v],[e.extent[1][0]+f,e.extent[1][1]+v]]}let l={x:0,y:0};if(e.parentNode){const d=r.get(e.parentNode);l=ar(d,o).positionAbsolute}const c=i&&i!=="parent"?Ei(t,i):t;return{position:{x:c.x-l.x,y:c.y-l.y},positionAbsolute:c}}function wa({nodeId:e,dragItems:t,nodeInternals:r}){const n=t.map(o=>({...r.get(o.id),position:o.position,positionAbsolute:o.positionAbsolute}));return[e?n.find(o=>o.id===e):n[0],n]}const ll=(e,t,r,n)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const a=Array.from(o),s=t.getBoundingClientRect(),i={x:s.width*n[0],y:s.height*n[1]};return a.map(l=>{const c=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(c.left-s.left-i.x)/r,y:(c.top-s.top-i.y)/r,...wi(l)}})};function Ir(e,t,r){return r===void 0?r:n=>{const o=t().nodeInternals.get(e);o&&r(n,{...o})}}function Za({id:e,store:t,unselect:r=!1,nodeRef:n}){const{addSelectedNodes:o,unselectNodesAndEdges:a,multiSelectionActive:s,nodeInternals:i,onError:l}=t.getState(),c=i.get(e);if(!c){l==null||l("012",bn.error012(e));return}t.setState({nodesSelectionActive:!1}),c.selected?(r||c.selected&&s)&&(a({nodes:[c],edges:[]}),requestAnimationFrame(()=>{var d;return(d=n==null?void 0:n.current)==null?void 0:d.blur()})):o([e])}function wC(){const e=kt();return u.useCallback(({sourceEvent:r})=>{const{transform:n,snapGrid:o,snapToGrid:a}=e.getState(),s=r.touches?r.touches[0].clientX:r.clientX,i=r.touches?r.touches[0].clientY:r.clientY,l={x:(s-n[0])/n[2],y:(i-n[1])/n[2]};return{xSnapped:a?o[0]*Math.round(l.x/o[0]):l.x,ySnapped:a?o[1]*Math.round(l.y/o[1]):l.y,...l}},[])}function Ea(e){return(t,r,n)=>e==null?void 0:e(t,n)}function cd({nodeRef:e,disabled:t=!1,noDragClassName:r,handleSelector:n,nodeId:o,isSelectable:a,selectNodesOnDrag:s}){const i=kt(),[l,c]=u.useState(!1),d=u.useRef([]),f=u.useRef({x:null,y:null}),v=u.useRef(0),h=u.useRef(null),p=u.useRef({x:0,y:0}),g=u.useRef(null),y=u.useRef(!1),m=u.useRef(!1),C=wC();return u.useEffect(()=>{if(e!=null&&e.current){const S=on(e.current),x=({x:R,y:M})=>{const{nodeInternals:_,onNodeDrag:A,onSelectionDrag:T,updateNodePositions:O,nodeExtent:w,snapGrid:b,snapToGrid:I,nodeOrigin:k,onError:P}=i.getState();f.current={x:R,y:M};let $=!1,D={x:0,y:0,x2:0,y2:0};if(d.current.length>1&&w){const L=Mi(d.current,k);D=Ni(L)}if(d.current=d.current.map(L=>{const H={x:R-L.distance.x,y:M-L.distance.y};I&&(H.x=b[0]*Math.round(H.x/b[0]),H.y=b[1]*Math.round(H.y/b[1]));const z=[[w[0][0],w[0][1]],[w[1][0],w[1][1]]];d.current.length>1&&w&&!L.extent&&(z[0][0]=L.positionAbsolute.x-D.x+w[0][0],z[1][0]=L.positionAbsolute.x+(L.width??0)-D.x2+w[1][0],z[0][1]=L.positionAbsolute.y-D.y+w[0][1],z[1][1]=L.positionAbsolute.y+(L.height??0)-D.y2+w[1][1]);const j=ld(L,H,_,z,k,P);return $=$||L.position.x!==j.position.x||L.position.y!==j.position.y,L.position=j.position,L.positionAbsolute=j.positionAbsolute,L}),!$)return;O(d.current,!0,!0),c(!0);const K=o?A:Ea(T);if(K&&g.current){const[L,H]=wa({nodeId:o,dragItems:d.current,nodeInternals:_});K(g.current,L,H)}},E=()=>{if(!h.current)return;const[R,M]=Iu(p.current,h.current);if(R!==0||M!==0){const{transform:_,panBy:A}=i.getState();f.current.x=(f.current.x??0)-R/_[2],f.current.y=(f.current.y??0)-M/_[2],A({x:R,y:M})&&x(f.current)}v.current=requestAnimationFrame(E)},N=R=>{var k;const{nodeInternals:M,multiSelectionActive:_,nodesDraggable:A,unselectNodesAndEdges:T,onNodeDragStart:O,onSelectionDragStart:w}=i.getState();m.current=!0;const b=o?O:Ea(w);(!s||!a)&&!_&&o&&((k=M.get(o))!=null&&k.selected||T()),o&&a&&s&&Za({id:o,store:i,nodeRef:e});const I=C(R);if(f.current=I,d.current=bC(M,A,I,o),b&&d.current){const[P,$]=wa({nodeId:o,dragItems:d.current,nodeInternals:M});b(R.sourceEvent,P,$)}};if(t)S.on(".drag",null);else{const R=T1().on("start",M=>{const{domNode:_,nodeDragThreshold:A}=i.getState();A===0&&N(M);const T=C(M);f.current=T,h.current=(_==null?void 0:_.getBoundingClientRect())||null,p.current=In(M.sourceEvent,h.current)}).on("drag",M=>{var O,w;const _=C(M),{autoPanOnNodeDrag:A,nodeDragThreshold:T}=i.getState();if(!y.current&&m.current&&A&&(y.current=!0,E()),!m.current){const b=_.xSnapped-(((O=f==null?void 0:f.current)==null?void 0:O.x)??0),I=_.ySnapped-(((w=f==null?void 0:f.current)==null?void 0:w.y)??0);Math.sqrt(b*b+I*I)>T&&N(M)}(f.current.x!==_.xSnapped||f.current.y!==_.ySnapped)&&d.current&&m.current&&(g.current=M.sourceEvent,p.current=In(M.sourceEvent,h.current),x(_))}).on("end",M=>{if(m.current&&(c(!1),y.current=!1,m.current=!1,cancelAnimationFrame(v.current),d.current)){const{updateNodePositions:_,nodeInternals:A,onNodeDragStop:T,onSelectionDragStop:O}=i.getState(),w=o?T:Ea(O);if(_(d.current,!1,!1),w){const[b,I]=wa({nodeId:o,dragItems:d.current,nodeInternals:A});w(M.sourceEvent,b,I)}}}).filter(M=>{const _=M.target;return!M.button&&(!r||!sl(_,`.${r}`,e))&&(!n||sl(_,n,e))});return S.call(R),()=>{S.on(".drag",null)}}}},[e,t,r,n,a,i,o,s,C]),l}function ud(){const e=kt();return u.useCallback(r=>{const{nodeInternals:n,nodeExtent:o,updateNodePositions:a,getNodes:s,snapToGrid:i,snapGrid:l,onError:c,nodesDraggable:d}=e.getState(),f=s().filter(C=>C.selected&&(C.draggable||d&&typeof C.draggable>"u")),v=i?l[0]:5,h=i?l[1]:5,p=r.isShiftPressed?4:1,g=r.x*v*p,y=r.y*h*p,m=f.map(C=>{if(C.positionAbsolute){const S={x:C.positionAbsolute.x+g,y:C.positionAbsolute.y+y};i&&(S.x=l[0]*Math.round(S.x/l[0]),S.y=l[1]*Math.round(S.y/l[1]));const{positionAbsolute:x,position:E}=ld(C,S,n,o,void 0,c);C.position=E,C.positionAbsolute=x}return C});a(m,!0,!1)},[])}const ir={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Mr=e=>{const t=({id:r,type:n,data:o,xPos:a,yPos:s,xPosOrigin:i,yPosOrigin:l,selected:c,onClick:d,onMouseEnter:f,onMouseMove:v,onMouseLeave:h,onContextMenu:p,onDoubleClick:g,style:y,className:m,isDraggable:C,isSelectable:S,isConnectable:x,isFocusable:E,selectNodesOnDrag:N,sourcePosition:R,targetPosition:M,hidden:_,resizeObserver:A,dragHandle:T,zIndex:O,isParent:w,noDragClassName:b,noPanClassName:I,initialized:k,disableKeyboardA11y:P,ariaLabel:$,rfId:D})=>{const K=kt(),L=u.useRef(null),H=u.useRef(R),z=u.useRef(M),j=u.useRef(n),G=S||C||d||f||v||h,Y=ud(),ee=Ir(r,K.getState,f),X=Ir(r,K.getState,v),B=Ir(r,K.getState,h),U=Ir(r,K.getState,p),q=Ir(r,K.getState,g),oe=Z=>{const{nodeDragThreshold:ye}=K.getState();if(S&&(!N||!C||ye>0)&&Za({id:r,store:K,nodeRef:L}),d){const Ee=K.getState().nodeInternals.get(r);Ee&&d(Z,{...Ee})}},te=Z=>{if(!Ua(Z))if(Pu.includes(Z.key)&&S){const ye=Z.key==="Escape";Za({id:r,store:K,unselect:ye,nodeRef:L})}else!P&&C&&c&&Object.prototype.hasOwnProperty.call(ir,Z.key)&&(K.setState({ariaLiveMessage:`Moved selected node ${Z.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~a}, y: ${~~s}`}),Y({x:ir[Z.key].x,y:ir[Z.key].y,isShiftPressed:Z.shiftKey}))};u.useEffect(()=>{if(L.current&&!_){const Z=L.current;return A==null||A.observe(Z),()=>A==null?void 0:A.unobserve(Z)}},[_]),u.useEffect(()=>{const Z=j.current!==n,ye=H.current!==R,Ee=z.current!==M;L.current&&(Z||ye||Ee)&&(Z&&(j.current=n),ye&&(H.current=R),Ee&&(z.current=M),K.getState().updateNodeDimensions([{id:r,nodeElement:L.current,forceUpdate:!0}]))},[r,n,R,M]);const ie=cd({nodeRef:L,disabled:_||!C,noDragClassName:b,handleSelector:T,nodeId:r,isSelectable:S,selectNodesOnDrag:N});return _?null:V.createElement("div",{className:tn(["react-flow__node",`react-flow__node-${n}`,{[I]:C},m,{selected:c,selectable:S,parent:w,dragging:ie}]),ref:L,style:{zIndex:O,transform:`translate(${i}px,${l}px)`,pointerEvents:G?"all":"none",visibility:k?"visible":"hidden",...y},"data-id":r,"data-testid":`rf__node-${r}`,onMouseEnter:ee,onMouseMove:X,onMouseLeave:B,onContextMenu:U,onClick:oe,onDoubleClick:q,onKeyDown:E?te:void 0,tabIndex:E?0:void 0,role:E?"button":void 0,"aria-describedby":P?void 0:`${Ju}-${D}`,"aria-label":$},V.createElement(Ly,{value:r},V.createElement(e,{id:r,data:o,type:n,xPos:a,yPos:s,selected:c,isConnectable:x,sourcePosition:R,targetPosition:M,dragging:ie,dragHandle:T,zIndex:O})))};return t.displayName="NodeWrapper",u.memo(t)};const EC=e=>{const t=e.getNodes().filter(r=>r.selected);return{...Mi(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function NC({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:r}){const n=kt(),{width:o,height:a,x:s,y:i,transformString:l,userSelectionActive:c}=ht(EC,Ft),d=ud(),f=u.useRef(null);if(u.useEffect(()=>{var p;r||(p=f.current)==null||p.focus({preventScroll:!0})},[r]),cd({nodeRef:f}),c||!o||!a)return null;const v=e?p=>{const g=n.getState().getNodes().filter(y=>y.selected);e(p,g)}:void 0,h=p=>{Object.prototype.hasOwnProperty.call(ir,p.key)&&d({x:ir[p.key].x,y:ir[p.key].y,isShiftPressed:p.shiftKey})};return V.createElement("div",{className:tn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l}},V.createElement("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:v,tabIndex:r?void 0:-1,onKeyDown:r?void 0:h,style:{width:o,height:a,top:i,left:s}}))}var _C=u.memo(NC);const RC=e=>e.nodesSelectionActive,dd=({children:e,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:n,onPaneMouseLeave:o,onPaneContextMenu:a,onPaneScroll:s,deleteKeyCode:i,onMove:l,onMoveStart:c,onMoveEnd:d,selectionKeyCode:f,selectionOnDrag:v,selectionMode:h,onSelectionStart:p,onSelectionEnd:g,multiSelectionKeyCode:y,panActivationKeyCode:m,zoomActivationKeyCode:C,elementsSelectable:S,zoomOnScroll:x,zoomOnPinch:E,panOnScroll:N,panOnScrollSpeed:R,panOnScrollMode:M,zoomOnDoubleClick:_,panOnDrag:A,defaultViewport:T,translateExtent:O,minZoom:w,maxZoom:b,preventScrolling:I,onSelectionContextMenu:k,noWheelClassName:P,noPanClassName:$,disableKeyboardA11y:D})=>{const K=ht(RC),L=Gr(f),H=Gr(m),z=H||A,j=H||N,G=L||v&&z!==!0;return fC({deleteKeyCode:i,multiSelectionKeyCode:y}),V.createElement(mC,{onMove:l,onMoveStart:c,onMoveEnd:d,onPaneContextMenu:a,elementsSelectable:S,zoomOnScroll:x,zoomOnPinch:E,panOnScroll:j,panOnScrollSpeed:R,panOnScrollMode:M,zoomOnDoubleClick:_,panOnDrag:!L&&z,defaultViewport:T,translateExtent:O,minZoom:w,maxZoom:b,zoomActivationKeyCode:C,preventScrolling:I,noWheelClassName:P,noPanClassName:$},V.createElement(id,{onSelectionStart:p,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:n,onPaneMouseLeave:o,onPaneContextMenu:a,onPaneScroll:s,panOnDrag:z,isSelecting:!!G,selectionMode:h},e,K&&V.createElement(_C,{onSelectionContextMenu:k,noPanClassName:$,disableKeyboardA11y:D})))};dd.displayName="FlowRenderer";var kC=u.memo(dd);function IC(e){return ht(u.useCallback(r=>e?Vu(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):r.getNodes(),[e]))}function MC(e){const t={input:Mr(e.input||Xu),default:Mr(e.default||qa),output:Mr(e.output||qu),group:Mr(e.group||Ti)},r={},n=Object.keys(e).filter(o=>!["input","default","output","group"].includes(o)).reduce((o,a)=>(o[a]=Mr(e[a]||qa),o),r);return{...t,...n}}const PC=({x:e,y:t,width:r,height:n,origin:o})=>!r||!n?{x:e,y:t}:o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-r*o[0],y:t-n*o[1]},TC=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),fd=e=>{const{nodesDraggable:t,nodesConnectable:r,nodesFocusable:n,elementsSelectable:o,updateNodeDimensions:a,onError:s}=ht(TC,Ft),i=IC(e.onlyRenderVisibleElements),l=u.useRef(),c=u.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const d=new ResizeObserver(f=>{const v=f.map(h=>({id:h.target.getAttribute("data-id"),nodeElement:h.target,forceUpdate:!0}));a(v)});return l.current=d,d},[]);return u.useEffect(()=>()=>{var d;(d=l==null?void 0:l.current)==null||d.disconnect()},[]),V.createElement("div",{className:"react-flow__nodes",style:$i},i.map(d=>{var E,N;let f=d.type||"default";e.nodeTypes[f]||(s==null||s("003",bn.error003(f)),f="default");const v=e.nodeTypes[f]||e.nodeTypes.default,h=!!(d.draggable||t&&typeof d.draggable>"u"),p=!!(d.selectable||o&&typeof d.selectable>"u"),g=!!(d.connectable||r&&typeof d.connectable>"u"),y=!!(d.focusable||n&&typeof d.focusable>"u"),m=e.nodeExtent?Ei(d.positionAbsolute,e.nodeExtent):d.positionAbsolute,C=(m==null?void 0:m.x)??0,S=(m==null?void 0:m.y)??0,x=PC({x:C,y:S,width:d.width??0,height:d.height??0,origin:e.nodeOrigin});return V.createElement(v,{key:d.id,id:d.id,className:d.className,style:d.style,type:f,data:d.data,sourcePosition:d.sourcePosition||we.Bottom,targetPosition:d.targetPosition||we.Top,hidden:d.hidden,xPos:C,yPos:S,xPosOrigin:x.x,yPosOrigin:x.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!d.selected,isDraggable:h,isSelectable:p,isConnectable:g,isFocusable:y,resizeObserver:c,dragHandle:d.dragHandle,zIndex:((E=d[St])==null?void 0:E.z)??0,isParent:!!((N=d[St])!=null&&N.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!d.width&&!!d.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:d.ariaLabel})}))};fd.displayName="NodeRenderer";var $C=u.memo(fd);const OC=(e,t,r)=>r===we.Left?e-t:r===we.Right?e+t:e,DC=(e,t,r)=>r===we.Top?e-t:r===we.Bottom?e+t:e,cl="react-flow__edgeupdater",ul=({position:e,centerX:t,centerY:r,radius:n=10,onMouseDown:o,onMouseEnter:a,onMouseOut:s,type:i})=>V.createElement("circle",{onMouseDown:o,onMouseEnter:a,onMouseOut:s,className:tn([cl,`${cl}-${i}`]),cx:OC(t,n,e),cy:DC(r,n,e),r:n,stroke:"transparent",fill:"transparent"}),AC=()=>!0;var er=e=>{const t=({id:r,className:n,type:o,data:a,onClick:s,onEdgeDoubleClick:i,selected:l,animated:c,label:d,labelStyle:f,labelShowBg:v,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:g,style:y,source:m,target:C,sourceX:S,sourceY:x,targetX:E,targetY:N,sourcePosition:R,targetPosition:M,elementsSelectable:_,hidden:A,sourceHandleId:T,targetHandleId:O,onContextMenu:w,onMouseEnter:b,onMouseMove:I,onMouseLeave:k,edgeUpdaterRadius:P,onEdgeUpdate:$,onEdgeUpdateStart:D,onEdgeUpdateEnd:K,markerEnd:L,markerStart:H,rfId:z,ariaLabel:j,isFocusable:G,isUpdatable:Y,pathOptions:ee,interactionWidth:X})=>{const B=u.useRef(null),[U,q]=u.useState(!1),[oe,te]=u.useState(!1),ie=kt(),Z=u.useMemo(()=>`url(#${Xa(H,z)})`,[H,z]),ye=u.useMemo(()=>`url(#${Xa(L,z)})`,[L,z]);if(A)return null;const Ee=Ie=>{var Ve;const{edges:pe,addSelectedEdges:je,unselectNodesAndEdges:Ze,multiSelectionActive:rt}=ie.getState(),We=pe.find(ct=>ct.id===r);We&&(_&&(ie.setState({nodesSelectionActive:!1}),We.selected&&rt?(Ze({nodes:[],edges:[We]}),(Ve=B.current)==null||Ve.blur()):je([r])),s&&s(Ie,We))},ne=kr(r,ie.getState,i),ge=kr(r,ie.getState,w),re=kr(r,ie.getState,b),_e=kr(r,ie.getState,I),fe=kr(r,ie.getState,k),Me=(Ie,pe)=>{if(Ie.button!==0)return;const{edges:je,isValidConnection:Ze}=ie.getState(),rt=pe?C:m,We=(pe?O:T)||null,Ve=pe?"target":"source",ct=Ze||AC,ut=pe,Qe=je.find(dt=>dt.id===r);te(!0),D==null||D(Ie,Qe,Ve);const wt=dt=>{te(!1),K==null||K(dt,Qe,Ve)};ju({event:Ie,handleId:We,nodeId:rt,onConnect:dt=>$==null?void 0:$(Qe,dt),isTarget:ut,getState:ie.getState,setState:ie.setState,isValidConnection:ct,edgeUpdaterType:Ve,onEdgeUpdateEnd:wt})},be=Ie=>Me(Ie,!0),Re=Ie=>Me(Ie,!1),se=()=>q(!0),Le=()=>q(!1),$e=!_&&!s,Ge=Ie=>{var pe;if(Pu.includes(Ie.key)&&_){const{unselectNodesAndEdges:je,addSelectedEdges:Ze,edges:rt}=ie.getState();Ie.key==="Escape"?((pe=B.current)==null||pe.blur(),je({edges:[rt.find(Ve=>Ve.id===r)]})):Ze([r])}};return V.createElement("g",{className:tn(["react-flow__edge",`react-flow__edge-${o}`,n,{selected:l,animated:c,inactive:$e,updating:U}]),onClick:Ee,onDoubleClick:ne,onContextMenu:ge,onMouseEnter:re,onMouseMove:_e,onMouseLeave:fe,onKeyDown:G?Ge:void 0,tabIndex:G?0:void 0,role:G?"button":"img","data-testid":`rf__edge-${r}`,"aria-label":j===null?void 0:j||`Edge from ${m} to ${C}`,"aria-describedby":G?`${Qu}-${z}`:void 0,ref:B},!oe&&V.createElement(e,{id:r,source:m,target:C,selected:l,animated:c,label:d,labelStyle:f,labelShowBg:v,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:g,data:a,style:y,sourceX:S,sourceY:x,targetX:E,targetY:N,sourcePosition:R,targetPosition:M,sourceHandleId:T,targetHandleId:O,markerStart:Z,markerEnd:ye,pathOptions:ee,interactionWidth:X}),Y&&V.createElement(V.Fragment,null,(Y==="source"||Y===!0)&&V.createElement(ul,{position:R,centerX:S,centerY:x,radius:P,onMouseDown:be,onMouseEnter:se,onMouseOut:Le,type:"source"}),(Y==="target"||Y===!0)&&V.createElement(ul,{position:M,centerX:E,centerY:N,radius:P,onMouseDown:Re,onMouseEnter:se,onMouseOut:Le,type:"target"})))};return t.displayName="EdgeWrapper",u.memo(t)};function KC(e){const t={default:er(e.default||Ao),straight:er(e.bezier||ki),step:er(e.step||Ri),smoothstep:er(e.step||ra),simplebezier:er(e.simplebezier||_i)},r={},n=Object.keys(e).filter(o=>!["default","bezier"].includes(o)).reduce((o,a)=>(o[a]=er(e[a]||Ao),o),r);return{...t,...n}}function dl(e,t,r=null){const n=((r==null?void 0:r.x)||0)+t.x,o=((r==null?void 0:r.y)||0)+t.y,a=(r==null?void 0:r.width)||t.width,s=(r==null?void 0:r.height)||t.height;switch(e){case we.Top:return{x:n+a/2,y:o};case we.Right:return{x:n+a,y:o+s/2};case we.Bottom:return{x:n+a/2,y:o+s};case we.Left:return{x:n,y:o+s/2}}}function fl(e,t){return e?e.length===1||!t?e[0]:t&&e.find(r=>r.id===t)||null:null}const LC=(e,t,r,n,o,a)=>{const s=dl(r,e,t),i=dl(a,n,o);return{sourceX:s.x,sourceY:s.y,targetX:i.x,targetY:i.y}};function VC({sourcePos:e,targetPos:t,sourceWidth:r,sourceHeight:n,targetWidth:o,targetHeight:a,width:s,height:i,transform:l}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+r,t.x+o),y2:Math.max(e.y+n,t.y+a)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const d=Ni({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:s/l[2],height:i/l[2]}),f=Math.max(0,Math.min(d.x2,c.x2)-Math.max(d.x,c.x)),v=Math.max(0,Math.min(d.y2,c.y2)-Math.max(d.y,c.y));return Math.ceil(f*v)>0}function vl(e){var n,o,a,s,i;const t=((n=e==null?void 0:e[St])==null?void 0:n.handleBounds)||null,r=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.x)<"u"&&typeof((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.y)<"u";return[{x:((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.x)||0,y:((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!r]}const HC=[{level:0,isMaxLevel:!0,edges:[]}];function zC(e,t,r=!1){let n=-1;const o=e.reduce((s,i)=>{var d,f;const l=Qt(i.zIndex);let c=l?i.zIndex:0;if(r){const v=t.get(i.target),h=t.get(i.source),p=i.selected||(v==null?void 0:v.selected)||(h==null?void 0:h.selected),g=Math.max(((d=h==null?void 0:h[St])==null?void 0:d.z)||0,((f=v==null?void 0:v[St])==null?void 0:f.z)||0,1e3);c=(l?i.zIndex:0)+(p?g:0)}return s[c]?s[c].push(i):s[c]=[i],n=c>n?c:n,s},{}),a=Object.entries(o).map(([s,i])=>{const l=+s;return{edges:i,level:l,isMaxLevel:l===n}});return a.length===0?HC:a}function FC(e,t,r){const n=ht(u.useCallback(o=>e?o.edges.filter(a=>{const s=t.get(a.source),i=t.get(a.target);return(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&(i==null?void 0:i.width)&&(i==null?void 0:i.height)&&VC({sourcePos:s.positionAbsolute||{x:0,y:0},targetPos:i.positionAbsolute||{x:0,y:0},sourceWidth:s.width,sourceHeight:s.height,targetWidth:i.width,targetHeight:i.height,width:o.width,height:o.height,transform:o.transform})}):o.edges,[e,t]));return zC(n,t,r)}const BC=({color:e="none",strokeWidth:t=1})=>V.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),jC=({color:e="none",strokeWidth:t=1})=>V.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),hl={[Do.Arrow]:BC,[Do.ArrowClosed]:jC};function WC(e){const t=kt();return u.useMemo(()=>{var o,a;return Object.prototype.hasOwnProperty.call(hl,e)?hl[e]:((a=(o=t.getState()).onError)==null||a.call(o,"009",bn.error009(e)),null)},[e])}const UC=({id:e,type:t,color:r,width:n=12.5,height:o=12.5,markerUnits:a="strokeWidth",strokeWidth:s,orient:i="auto-start-reverse"})=>{const l=WC(t);return l?V.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${n}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:i,refX:"0",refY:"0"},V.createElement(l,{color:r,strokeWidth:s})):null},GC=({defaultColor:e,rfId:t})=>r=>{const n=[];return r.edges.reduce((o,a)=>([a.markerStart,a.markerEnd].forEach(s=>{if(s&&typeof s=="object"){const i=Xa(s,t);n.includes(i)||(o.push({id:i,color:s.color||e,...s}),n.push(i))}}),o),[]).sort((o,a)=>o.id.localeCompare(a.id))},vd=({defaultColor:e,rfId:t})=>{const r=ht(u.useCallback(GC({defaultColor:e,rfId:t}),[e,t]),(n,o)=>!(n.length!==o.length||n.some((a,s)=>a.id!==o[s].id)));return V.createElement("defs",null,r.map(n=>V.createElement(UC,{id:n.id,key:n.id,type:n.type,color:n.color,width:n.width,height:n.height,markerUnits:n.markerUnits,strokeWidth:n.strokeWidth,orient:n.orient})))};vd.displayName="MarkerDefinitions";var XC=u.memo(vd);const YC=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),hd=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:r,rfId:n,edgeTypes:o,noPanClassName:a,onEdgeUpdate:s,onEdgeContextMenu:i,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:f,edgeUpdaterRadius:v,onEdgeDoubleClick:h,onEdgeUpdateStart:p,onEdgeUpdateEnd:g,children:y})=>{const{edgesFocusable:m,edgesUpdatable:C,elementsSelectable:S,width:x,height:E,connectionMode:N,nodeInternals:R,onError:M}=ht(YC,Ft),_=FC(t,R,r);return x?V.createElement(V.Fragment,null,_.map(({level:A,edges:T,isMaxLevel:O})=>V.createElement("svg",{key:A,style:{zIndex:A},width:x,height:E,className:"react-flow__edges react-flow__container"},O&&V.createElement(XC,{defaultColor:e,rfId:n}),V.createElement("g",null,T.map(w=>{const[b,I,k]=vl(R.get(w.source)),[P,$,D]=vl(R.get(w.target));if(!k||!D)return null;let K=w.type||"default";o[K]||(M==null||M("011",bn.error011(K)),K="default");const L=o[K]||o.default,H=N===zn.Strict?$.target:($.target??[]).concat($.source??[]),z=fl(I.source,w.sourceHandle),j=fl(H,w.targetHandle),G=(z==null?void 0:z.position)||we.Bottom,Y=(j==null?void 0:j.position)||we.Top,ee=!!(w.focusable||m&&typeof w.focusable>"u"),X=typeof s<"u"&&(w.updatable||C&&typeof w.updatable>"u");if(!z||!j)return M==null||M("008",bn.error008(z,w)),null;const{sourceX:B,sourceY:U,targetX:q,targetY:oe}=LC(b,z,G,P,j,Y);return V.createElement(L,{key:w.id,id:w.id,className:tn([w.className,a]),type:K,data:w.data,selected:!!w.selected,animated:!!w.animated,hidden:!!w.hidden,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,style:w.style,source:w.source,target:w.target,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerEnd:w.markerEnd,markerStart:w.markerStart,sourceX:B,sourceY:U,targetX:q,targetY:oe,sourcePosition:G,targetPosition:Y,elementsSelectable:S,onEdgeUpdate:s,onContextMenu:i,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,onClick:f,edgeUpdaterRadius:v,onEdgeDoubleClick:h,onEdgeUpdateStart:p,onEdgeUpdateEnd:g,rfId:n,ariaLabel:w.ariaLabel,isFocusable:ee,isUpdatable:X,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth})})))),y):null};hd.displayName="EdgeRenderer";var qC=u.memo(hd);const ZC=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function JC({children:e}){const t=ht(ZC);return V.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function QC(e){const t=rd(),r=u.useRef(!1);u.useEffect(()=>{!r.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),r.current=!0)},[e,t.viewportInitialized])}const ex={[we.Left]:we.Right,[we.Right]:we.Left,[we.Top]:we.Bottom,[we.Bottom]:we.Top},pd=({nodeId:e,handleType:t,style:r,type:n=Rn.Bezier,CustomComponent:o,connectionStatus:a})=>{var N,R,M;const{fromNode:s,handleId:i,toX:l,toY:c,connectionMode:d}=ht(u.useCallback(_=>({fromNode:_.nodeInternals.get(e),handleId:_.connectionHandleId,toX:(_.connectionPosition.x-_.transform[0])/_.transform[2],toY:(_.connectionPosition.y-_.transform[1])/_.transform[2],connectionMode:_.connectionMode}),[e]),Ft),f=(N=s==null?void 0:s[St])==null?void 0:N.handleBounds;let v=f==null?void 0:f[t];if(d===zn.Loose&&(v=v||(f==null?void 0:f[t==="source"?"target":"source"])),!s||!v)return null;const h=i?v.find(_=>_.id===i):v[0],p=h?h.x+h.width/2:(s.width??0)/2,g=h?h.y+h.height/2:s.height??0,y=(((R=s.positionAbsolute)==null?void 0:R.x)??0)+p,m=(((M=s.positionAbsolute)==null?void 0:M.y)??0)+g,C=h==null?void 0:h.position,S=C?ex[C]:null;if(!C||!S)return null;if(o)return V.createElement(o,{connectionLineType:n,connectionLineStyle:r,fromNode:s,fromHandle:h,fromX:y,fromY:m,toX:l,toY:c,fromPosition:C,toPosition:S,connectionStatus:a});let x="";const E={sourceX:y,sourceY:m,sourcePosition:C,targetX:l,targetY:c,targetPosition:S};return n===Rn.Bezier?[x]=Au(E):n===Rn.Step?[x]=Ga({...E,borderRadius:0}):n===Rn.SmoothStep?[x]=Ga(E):n===Rn.SimpleBezier?[x]=Du(E):x=`M${y},${m} ${l},${c}`,V.createElement("path",{d:x,fill:"none",className:"react-flow__connection-path",style:r})};pd.displayName="ConnectionLine";const tx=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function nx({containerStyle:e,style:t,type:r,component:n}){const{nodeId:o,handleType:a,nodesConnectable:s,width:i,height:l,connectionStatus:c}=ht(tx,Ft);return!(o&&a&&i&&s)?null:V.createElement("svg",{style:e,width:i,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},V.createElement("g",{className:tn(["react-flow__connection",c])},V.createElement(pd,{nodeId:o,handleType:a,style:t,type:r,CustomComponent:n,connectionStatus:c})))}function pl(e,t){return u.useRef(null),kt(),u.useMemo(()=>t(e),[e])}const md=({nodeTypes:e,edgeTypes:t,onMove:r,onMoveStart:n,onMoveEnd:o,onInit:a,onNodeClick:s,onEdgeClick:i,onNodeDoubleClick:l,onEdgeDoubleClick:c,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:v,onNodeContextMenu:h,onSelectionContextMenu:p,onSelectionStart:g,onSelectionEnd:y,connectionLineType:m,connectionLineStyle:C,connectionLineComponent:S,connectionLineContainerStyle:x,selectionKeyCode:E,selectionOnDrag:N,selectionMode:R,multiSelectionKeyCode:M,panActivationKeyCode:_,zoomActivationKeyCode:A,deleteKeyCode:T,onlyRenderVisibleElements:O,elementsSelectable:w,selectNodesOnDrag:b,defaultViewport:I,translateExtent:k,minZoom:P,maxZoom:$,preventScrolling:D,defaultMarkerColor:K,zoomOnScroll:L,zoomOnPinch:H,panOnScroll:z,panOnScrollSpeed:j,panOnScrollMode:G,zoomOnDoubleClick:Y,panOnDrag:ee,onPaneClick:X,onPaneMouseEnter:B,onPaneMouseMove:U,onPaneMouseLeave:q,onPaneScroll:oe,onPaneContextMenu:te,onEdgeUpdate:ie,onEdgeContextMenu:Z,onEdgeMouseEnter:ye,onEdgeMouseMove:Ee,onEdgeMouseLeave:ne,edgeUpdaterRadius:ge,onEdgeUpdateStart:re,onEdgeUpdateEnd:_e,noDragClassName:fe,noWheelClassName:Me,noPanClassName:be,elevateEdgesOnSelect:Re,disableKeyboardA11y:se,nodeOrigin:Le,nodeExtent:$e,rfId:Ge})=>{const Ie=pl(e,MC),pe=pl(t,KC);return QC(a),V.createElement(kC,{onPaneClick:X,onPaneMouseEnter:B,onPaneMouseMove:U,onPaneMouseLeave:q,onPaneContextMenu:te,onPaneScroll:oe,deleteKeyCode:T,selectionKeyCode:E,selectionOnDrag:N,selectionMode:R,onSelectionStart:g,onSelectionEnd:y,multiSelectionKeyCode:M,panActivationKeyCode:_,zoomActivationKeyCode:A,elementsSelectable:w,onMove:r,onMoveStart:n,onMoveEnd:o,zoomOnScroll:L,zoomOnPinch:H,zoomOnDoubleClick:Y,panOnScroll:z,panOnScrollSpeed:j,panOnScrollMode:G,panOnDrag:ee,defaultViewport:I,translateExtent:k,minZoom:P,maxZoom:$,onSelectionContextMenu:p,preventScrolling:D,noDragClassName:fe,noWheelClassName:Me,noPanClassName:be,disableKeyboardA11y:se},V.createElement(JC,null,V.createElement(qC,{edgeTypes:pe,onEdgeClick:i,onEdgeDoubleClick:c,onEdgeUpdate:ie,onlyRenderVisibleElements:O,onEdgeContextMenu:Z,onEdgeMouseEnter:ye,onEdgeMouseMove:Ee,onEdgeMouseLeave:ne,onEdgeUpdateStart:re,onEdgeUpdateEnd:_e,edgeUpdaterRadius:ge,defaultMarkerColor:K,noPanClassName:be,elevateEdgesOnSelect:!!Re,disableKeyboardA11y:se,rfId:Ge},V.createElement(nx,{style:C,type:m,component:S,containerStyle:x})),V.createElement("div",{className:"react-flow__edgelabel-renderer"}),V.createElement($C,{nodeTypes:Ie,onNodeClick:s,onNodeDoubleClick:l,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:v,onNodeContextMenu:h,selectNodesOnDrag:b,onlyRenderVisibleElements:O,noPanClassName:be,noDragClassName:fe,disableKeyboardA11y:se,nodeOrigin:Le,nodeExtent:$e,rfId:Ge})))};md.displayName="GraphView";var rx=u.memo(md);const Ja=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],wn={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Ja,nodeExtent:Ja,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:zn.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:Ty,isValidConnection:void 0},ox=()=>jm((e,t)=>({...wn,setNodes:r=>{const{nodeInternals:n,nodeOrigin:o,elevateNodesOnSelect:a}=t();e({nodeInternals:ba(r,n,o,a)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:r=>{const{defaultEdgeOptions:n={}}=t();e({edges:r.map(o=>({...n,...o}))})},setDefaultNodesAndEdges:(r,n)=>{const o=typeof r<"u",a=typeof n<"u",s=o?ba(r,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:s,edges:a?n:[],hasDefaultNodes:o,hasDefaultEdges:a})},updateNodeDimensions:r=>{const{onNodesChange:n,nodeInternals:o,fitViewOnInit:a,fitViewOnInitDone:s,fitViewOnInitOptions:i,domNode:l,nodeOrigin:c}=t(),d=l==null?void 0:l.querySelector(".react-flow__viewport");if(!d)return;const f=window.getComputedStyle(d),{m22:v}=new window.DOMMatrixReadOnly(f.transform),h=r.reduce((g,y)=>{const m=o.get(y.id);if(m){const C=wi(y.nodeElement);!!(C.width&&C.height&&(m.width!==C.width||m.height!==C.height||y.forceUpdate))&&(o.set(m.id,{...m,[St]:{...m[St],handleBounds:{source:ll(".source",y.nodeElement,v,c),target:ll(".target",y.nodeElement,v,c)}},...C}),g.push({id:m.id,type:"dimensions",dimensions:C}))}return g},[]);td(o,c);const p=s||a&&!s&&nd(t,{initial:!0,...i});e({nodeInternals:new Map(o),fitViewOnInitDone:p}),(h==null?void 0:h.length)>0&&(n==null||n(h))},updateNodePositions:(r,n=!0,o=!1)=>{const{triggerNodeChanges:a}=t(),s=r.map(i=>{const l={id:i.id,type:"position",dragging:o};return n&&(l.positionAbsolute=i.positionAbsolute,l.position=i.position),l});a(s)},triggerNodeChanges:r=>{const{onNodesChange:n,nodeInternals:o,hasDefaultNodes:a,nodeOrigin:s,getNodes:i,elevateNodesOnSelect:l}=t();if(r!=null&&r.length){if(a){const c=ad(r,i()),d=ba(c,o,s,l);e({nodeInternals:d})}n==null||n(r)}},addSelectedNodes:r=>{const{multiSelectionActive:n,edges:o,getNodes:a}=t();let s,i=null;n?s=r.map(l=>_n(l,!0)):(s=nr(a(),r),i=nr(o,[])),vo({changedNodes:s,changedEdges:i,get:t,set:e})},addSelectedEdges:r=>{const{multiSelectionActive:n,edges:o,getNodes:a}=t();let s,i=null;n?s=r.map(l=>_n(l,!0)):(s=nr(o,r),i=nr(a(),[])),vo({changedNodes:i,changedEdges:s,get:t,set:e})},unselectNodesAndEdges:({nodes:r,edges:n}={})=>{const{edges:o,getNodes:a}=t(),s=r||a(),i=n||o,l=s.map(d=>(d.selected=!1,_n(d.id,!1))),c=i.map(d=>_n(d.id,!1));vo({changedNodes:l,changedEdges:c,get:t,set:e})},setMinZoom:r=>{const{d3Zoom:n,maxZoom:o}=t();n==null||n.scaleExtent([r,o]),e({minZoom:r})},setMaxZoom:r=>{const{d3Zoom:n,minZoom:o}=t();n==null||n.scaleExtent([o,r]),e({maxZoom:r})},setTranslateExtent:r=>{var n;(n=t().d3Zoom)==null||n.translateExtent(r),e({translateExtent:r})},resetSelectedElements:()=>{const{edges:r,getNodes:n}=t(),a=n().filter(i=>i.selected).map(i=>_n(i.id,!1)),s=r.filter(i=>i.selected).map(i=>_n(i.id,!1));vo({changedNodes:a,changedEdges:s,get:t,set:e})},setNodeExtent:r=>{const{nodeInternals:n}=t();n.forEach(o=>{o.positionAbsolute=Ei(o.position,r)}),e({nodeExtent:r,nodeInternals:new Map(n)})},panBy:r=>{const{transform:n,width:o,height:a,d3Zoom:s,d3Selection:i,translateExtent:l}=t();if(!s||!i||!r.x&&!r.y)return!1;const c=kn.translate(n[0]+r.x,n[1]+r.y).scale(n[2]),d=[[0,0],[o,a]],f=s==null?void 0:s.constrain()(c,d,l);return s.transform(i,f),n[0]!==f.x||n[1]!==f.y||n[2]!==f.k},cancelConnection:()=>e({connectionNodeId:wn.connectionNodeId,connectionHandleId:wn.connectionHandleId,connectionHandleType:wn.connectionHandleType,connectionStatus:wn.connectionStatus,connectionStartHandle:wn.connectionStartHandle,connectionEndHandle:wn.connectionEndHandle}),reset:()=>e({...wn})}),Object.is),gd=({children:e})=>{const t=u.useRef(null);return t.current||(t.current=ox()),V.createElement(wy,{value:t.current},e)};gd.displayName="ReactFlowProvider";const yd=({children:e})=>u.useContext(na)?V.createElement(V.Fragment,null,e):V.createElement(gd,null,e);yd.displayName="ReactFlowWrapper";const ax={input:Xu,default:qa,output:qu,group:Ti},ix={default:Ao,straight:ki,step:Ri,smoothstep:ra,simplebezier:_i},sx=[0,0],lx=[15,15],cx={x:0,y:0,zoom:1},ux={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},dx=u.forwardRef(({nodes:e,edges:t,defaultNodes:r,defaultEdges:n,className:o,nodeTypes:a=ax,edgeTypes:s=ix,onNodeClick:i,onEdgeClick:l,onInit:c,onMove:d,onMoveStart:f,onMoveEnd:v,onConnect:h,onConnectStart:p,onConnectEnd:g,onClickConnectStart:y,onClickConnectEnd:m,onNodeMouseEnter:C,onNodeMouseMove:S,onNodeMouseLeave:x,onNodeContextMenu:E,onNodeDoubleClick:N,onNodeDragStart:R,onNodeDrag:M,onNodeDragStop:_,onNodesDelete:A,onEdgesDelete:T,onSelectionChange:O,onSelectionDragStart:w,onSelectionDrag:b,onSelectionDragStop:I,onSelectionContextMenu:k,onSelectionStart:P,onSelectionEnd:$,connectionMode:D=zn.Strict,connectionLineType:K=Rn.Bezier,connectionLineStyle:L,connectionLineComponent:H,connectionLineContainerStyle:z,deleteKeyCode:j="Backspace",selectionKeyCode:G="Shift",selectionOnDrag:Y=!1,selectionMode:ee=Ur.Full,panActivationKeyCode:X="Space",multiSelectionKeyCode:B=Oo()?"Meta":"Control",zoomActivationKeyCode:U=Oo()?"Meta":"Control",snapToGrid:q=!1,snapGrid:oe=lx,onlyRenderVisibleElements:te=!1,selectNodesOnDrag:ie=!0,nodesDraggable:Z,nodesConnectable:ye,nodesFocusable:Ee,nodeOrigin:ne=sx,edgesFocusable:ge,edgesUpdatable:re,elementsSelectable:_e,defaultViewport:fe=cx,minZoom:Me=.5,maxZoom:be=2,translateExtent:Re=Ja,preventScrolling:se=!0,nodeExtent:Le,defaultMarkerColor:$e="#b1b1b7",zoomOnScroll:Ge=!0,zoomOnPinch:Ie=!0,panOnScroll:pe=!1,panOnScrollSpeed:je=.5,panOnScrollMode:Ze=Kn.Free,zoomOnDoubleClick:rt=!0,panOnDrag:We=!0,onPaneClick:Ve,onPaneMouseEnter:ct,onPaneMouseMove:ut,onPaneMouseLeave:Qe,onPaneScroll:wt,onPaneContextMenu:ft,children:dt,onEdgeUpdate:mt,onEdgeContextMenu:gt,onEdgeDoubleClick:ot,onEdgeMouseEnter:ze,onEdgeMouseMove:Ce,onEdgeMouseLeave:Te,onEdgeUpdateStart:Q,onEdgeUpdateEnd:le,edgeUpdaterRadius:ae=10,onNodesChange:ce,onEdgesChange:Oe,noDragClassName:Fe="nodrag",noWheelClassName:yt="nowheel",noPanClassName:Xe="nopan",fitView:et=!1,fitViewOptions:tt,connectOnClick:at=!0,attributionPosition:pt,proOptions:Mt,defaultEdgeOptions:Se,elevateNodesOnSelect:me=!0,elevateEdgesOnSelect:ke=!1,disableKeyboardA11y:nt=!1,autoPanOnConnect:lt=!0,autoPanOnNodeDrag:Ct=!0,connectionRadius:Nt=20,isValidConnection:_t,onError:Pt,style:Ot,id:xt,nodeDragThreshold:Lt,...qt},xe)=>{const De=xt||"1";return V.createElement("div",{...qt,style:{...Ot,...ux},ref:xe,className:tn(["react-flow",o]),"data-testid":"rf__wrapper",id:xt},V.createElement(yd,null,V.createElement(rx,{onInit:c,onMove:d,onMoveStart:f,onMoveEnd:v,onNodeClick:i,onEdgeClick:l,onNodeMouseEnter:C,onNodeMouseMove:S,onNodeMouseLeave:x,onNodeContextMenu:E,onNodeDoubleClick:N,nodeTypes:a,edgeTypes:s,connectionLineType:K,connectionLineStyle:L,connectionLineComponent:H,connectionLineContainerStyle:z,selectionKeyCode:G,selectionOnDrag:Y,selectionMode:ee,deleteKeyCode:j,multiSelectionKeyCode:B,panActivationKeyCode:X,zoomActivationKeyCode:U,onlyRenderVisibleElements:te,selectNodesOnDrag:ie,defaultViewport:fe,translateExtent:Re,minZoom:Me,maxZoom:be,preventScrolling:se,zoomOnScroll:Ge,zoomOnPinch:Ie,zoomOnDoubleClick:rt,panOnScroll:pe,panOnScrollSpeed:je,panOnScrollMode:Ze,panOnDrag:We,onPaneClick:Ve,onPaneMouseEnter:ct,onPaneMouseMove:ut,onPaneMouseLeave:Qe,onPaneScroll:wt,onPaneContextMenu:ft,onSelectionContextMenu:k,onSelectionStart:P,onSelectionEnd:$,onEdgeUpdate:mt,onEdgeContextMenu:gt,onEdgeDoubleClick:ot,onEdgeMouseEnter:ze,onEdgeMouseMove:Ce,onEdgeMouseLeave:Te,onEdgeUpdateStart:Q,onEdgeUpdateEnd:le,edgeUpdaterRadius:ae,defaultMarkerColor:$e,noDragClassName:Fe,noWheelClassName:yt,noPanClassName:Xe,elevateEdgesOnSelect:ke,rfId:De,disableKeyboardA11y:nt,nodeOrigin:ne,nodeExtent:Le}),V.createElement(eC,{nodes:e,edges:t,defaultNodes:r,defaultEdges:n,onConnect:h,onConnectStart:p,onConnectEnd:g,onClickConnectStart:y,onClickConnectEnd:m,nodesDraggable:Z,nodesConnectable:ye,nodesFocusable:Ee,edgesFocusable:ge,edgesUpdatable:re,elementsSelectable:_e,elevateNodesOnSelect:me,minZoom:Me,maxZoom:be,nodeExtent:Le,onNodesChange:ce,onEdgesChange:Oe,snapToGrid:q,snapGrid:oe,connectionMode:D,translateExtent:Re,connectOnClick:at,defaultEdgeOptions:Se,fitView:et,fitViewOptions:tt,onNodesDelete:A,onEdgesDelete:T,onNodeDragStart:R,onNodeDrag:M,onNodeDragStop:_,onSelectionDrag:b,onSelectionDragStart:w,onSelectionDragStop:I,noPanClassName:Xe,nodeOrigin:ne,rfId:De,autoPanOnConnect:lt,autoPanOnNodeDrag:Ct,onError:Pt,connectionRadius:Nt,isValidConnection:_t,nodeDragThreshold:Lt}),V.createElement(Jy,{onSelectionChange:O}),dt,V.createElement(_y,{proOptions:Mt,position:pt}),V.createElement(aC,{rfId:De,disableKeyboardA11y:nt})))});dx.displayName="ReactFlow";function u5(){const e=kt();return u.useCallback(t=>{const{domNode:r,updateNodeDimensions:n}=e.getState(),a=(Array.isArray(t)?t:[t]).reduce((s,i)=>{const l=r==null?void 0:r.querySelector(`.react-flow__node[data-id="${i}"]`);return l&&s.push({id:i,nodeElement:l,forceUpdate:!0}),s},[]);requestAnimationFrame(()=>n(a))},[])}const fx=e=>t=>t.nodeInternals.size===0?!1:t.getNodes().filter(r=>e.includeHiddenNodes?!0:!r.hidden).every(r=>{var n;return((n=r[St])==null?void 0:n.handleBounds)!==void 0}),vx={includeHiddenNodes:!1};function d5(e=vx){return ht(fx(e))}let Oi="";const hx=e=>Oi=e,Cd=e=>e?Oi:Di(),Di=()=>`https://huggingface.co/${Ai}/raw/main/.integrity`,px=()=>`https://huggingface.co/${Ai}/raw/main/.integrity.anchor.json`,f5=()=>`${Cd()}/store/v1`;let po=null;const v5=async e=>{if(!po){if(e){const n=await fetch(`${Oi}/users.json`);if(!n.ok)return console.error(`Failed to fetch users. Status: ${n.status}`),null;po=(await n.json()).results}const t=await fetch(`${Di()}/users.json`);if(!t.ok)return console.error(`Failed to fetch users. Status: ${t.status}`),null;po=(await t.json()).results}return po},h5=async e=>{e.startsWith("/")&&(e=e.slice(1));const t=`${Di()}/${e}`;return await fetch(t,{})},p5=async e=>e.endsWith(".node")||e.endsWith(".governance")?await fetch(e):(hx(e),e.endsWith("integrity.json")||(e=`${Cd()}/integrity.json`),await fetch(e)),m5=async()=>{const e=await fetch(`${px()}`);return e.ok?await e.json():(console.error(`Failed to fetch integrity anchor. Status: ${e.status}`),null)};let Ai="";const g5=e=>Ai=e,mx=({className:e})=>Ne.jsx("svg",{className:`${e}`,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ne.jsx("path",{d:"M7 6.41667C8.45833 6.41667 9.69792 6.18819 10.7188 5.73125C11.7396 5.27431 12.25 4.725 12.25 4.08333C12.25 3.44167 11.7396 2.89236 10.7188 2.43542C9.69792 1.97847 8.45833 1.75 7 1.75C5.54167 1.75 4.30208 1.97847 3.28125 2.43542C2.26042 2.89236 1.75 3.44167 1.75 4.08333C1.75 4.725 2.26042 5.27431 3.28125 5.73125C4.30208 6.18819 5.54167 6.41667 7 6.41667ZM7 7.875C7.39861 7.875 7.89688 7.83368 8.49479 7.75104C9.09271 7.6684 9.66875 7.53472 10.2229 7.35C10.7771 7.16528 11.2535 6.92465 11.6521 6.62813C12.0507 6.3316 12.25 5.96944 12.25 5.54167V7C12.25 7.42778 12.0507 7.78993 11.6521 8.08646C11.2535 8.38299 10.7771 8.62361 10.2229 8.80833C9.66875 8.99306 9.09271 9.12674 8.49479 9.20938C7.89688 9.29201 7.39861 9.33333 7 9.33333C6.60139 9.33333 6.10313 9.29201 5.50521 9.20938C4.90729 9.12674 4.33125 8.99306 3.77708 8.80833C3.22292 8.62361 2.74653 8.38299 2.34792 8.08646C1.94931 7.78993 1.75 7.42778 1.75 7V5.54167C1.75 5.96944 1.94931 6.3316 2.34792 6.62813C2.74653 6.92465 3.22292 7.16528 3.77708 7.35C4.33125 7.53472 4.90729 7.6684 5.50521 7.75104C6.10313 7.83368 6.60139 7.875 7 7.875ZM7 10.7917C7.39861 10.7917 7.89688 10.7503 8.49479 10.6677C9.09271 10.5851 9.66875 10.4514 10.2229 10.2667C10.7771 10.0819 11.2535 9.84132 11.6521 9.54479C12.0507 9.24826 12.25 8.88611 12.25 8.45833V9.91667C12.25 10.3444 12.0507 10.7066 11.6521 11.0031C11.2535 11.2997 10.7771 11.5403 10.2229 11.725C9.66875 11.9097 9.09271 12.0434 8.49479 12.126C7.89688 12.2087 7.39861 12.25 7 12.25C6.60139 12.25 6.10313 12.2087 5.50521 12.126C4.90729 12.0434 4.33125 11.9097 3.77708 11.725C3.22292 11.5403 2.74653 11.2997 2.34792 11.0031C1.94931 10.7066 1.75 10.3444 1.75 9.91667V8.45833C1.75 8.88611 1.94931 9.24826 2.34792 9.54479C2.74653 9.84132 3.22292 10.0819 3.77708 10.2667C4.33125 10.4514 4.90729 10.5851 5.50521 10.6677C6.10313 10.7503 6.60139 10.7917 7 10.7917Z",fill:"black"})}),gx=({className:e})=>Ne.jsx("svg",{className:`${e} w-14 h-14`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",children:Ne.jsx("path",{d:"M6.41667 12.6729L2.33333 10.325C2.14861 10.2181 2.00521 10.0771 1.90313 9.90208C1.80104 9.72708 1.75 9.53264 1.75 9.31875V4.68125C1.75 4.46736 1.80104 4.27291 1.90313 4.09791C2.00521 3.92291 2.14861 3.78194 2.33333 3.675L6.41667 1.32708C6.60139 1.22014 6.79583 1.16666 7 1.16666C7.20417 1.16666 7.39861 1.22014 7.58333 1.32708L11.6667 3.675C11.8514 3.78194 11.9948 3.92291 12.0969 4.09791C12.199 4.27291 12.25 4.46736 12.25 4.68125V9.31875C12.25 9.53264 12.199 9.72708 12.0969 9.90208C11.9948 10.0771 11.8514 10.2181 11.6667 10.325L7.58333 12.6729C7.39861 12.7799 7.20417 12.8333 7 12.8333C6.79583 12.8333 6.60139 12.7799 6.41667 12.6729ZM6.41667 7.33541V11.3312L7 11.6667L7.58333 11.3312V7.33541L11.0833 5.30833V4.69583L10.4563 4.33125L7 6.32916L3.54375 4.33125L2.91667 4.69583V5.30833L6.41667 7.33541Z",fill:"black"})}),yx=({className:e})=>Ne.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",children:Ne.jsx("path",{d:"M3.49999 12.8333C3.17916 12.8333 2.90451 12.7191 2.67604 12.4906C2.44756 12.2622 2.33333 11.9875 2.33333 11.6667V2.33333C2.33333 2.0125 2.44756 1.73785 2.67604 1.50938C2.90451 1.2809 3.17916 1.16667 3.49999 1.16667H7.68541C7.84097 1.16667 7.98923 1.19583 8.1302 1.25417C8.27117 1.3125 8.39513 1.39514 8.50208 1.50208L11.3312 4.33125C11.4382 4.4382 11.5208 4.56215 11.5792 4.70313C11.6375 4.8441 11.6667 4.99236 11.6667 5.14792V11.6667C11.6667 11.9875 11.5524 12.2622 11.324 12.4906C11.0955 12.7191 10.8208 12.8333 10.5 12.8333H3.49999ZM7.58333 4.66667C7.58333 4.83195 7.63923 4.97049 7.75104 5.08229C7.86284 5.1941 8.00138 5.25 8.16666 5.25H10.5L7.58333 2.33333V4.66667Z",fill:"black"})}),Cx=({className:e})=>Ne.jsx("svg",{className:`${e} `,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 11 11",children:Ne.jsx("path",{d:"M3.75 6.66667V4.33333C3.75 4.16806 3.8059 4.02951 3.91771 3.91771C4.02951 3.8059 4.16806 3.75 4.33333 3.75H6.66667C6.83194 3.75 6.97049 3.8059 7.08229 3.91771C7.1941 4.02951 7.25 4.16806 7.25 4.33333V6.66667C7.25 6.83194 7.1941 6.97049 7.08229 7.08229C6.97049 7.1941 6.83194 7.25 6.66667 7.25H4.33333C4.16806 7.25 4.02951 7.1941 3.91771 7.08229C3.8059 6.97049 3.75 6.83194 3.75 6.66667ZM3.75 10.1667V9.58333H2.58333C2.2625 9.58333 1.98785 9.4691 1.75937 9.24063C1.5309 9.01215 1.41667 8.7375 1.41667 8.41667V7.25H0.833333C0.668056 7.25 0.529514 7.1941 0.417708 7.08229C0.305903 6.97049 0.25 6.83194 0.25 6.66667C0.25 6.50139 0.305903 6.36285 0.417708 6.25104C0.529514 6.13924 0.668056 6.08333 0.833333 6.08333H1.41667V4.91667H0.833333C0.668056 4.91667 0.529514 4.86076 0.417708 4.74896C0.305903 4.63715 0.25 4.49861 0.25 4.33333C0.25 4.16806 0.305903 4.02951 0.417708 3.91771C0.529514 3.8059 0.668056 3.75 0.833333 3.75H1.41667V2.58333C1.41667 2.2625 1.5309 1.98785 1.75937 1.75937C1.98785 1.5309 2.2625 1.41667 2.58333 1.41667H3.75V0.833333C3.75 0.668056 3.8059 0.529514 3.91771 0.417708C4.02951 0.305903 4.16806 0.25 4.33333 0.25C4.49861 0.25 4.63715 0.305903 4.74896 0.417708C4.86076 0.529514 4.91667 0.668056 4.91667 0.833333V1.41667H6.08333V0.833333C6.08333 0.668056 6.13924 0.529514 6.25104 0.417708C6.36285 0.305903 6.50139 0.25 6.66667 0.25C6.83194 0.25 6.97049 0.305903 7.08229 0.417708C7.1941 0.529514 7.25 0.668056 7.25 0.833333V1.41667H8.41667C8.7375 1.41667 9.01215 1.5309 9.24063 1.75937C9.4691 1.98785 9.58333 2.2625 9.58333 2.58333V3.75H10.1667C10.3319 3.75 10.4705 3.8059 10.5823 3.91771C10.6941 4.02951 10.75 4.16806 10.75 4.33333C10.75 4.49861 10.6941 4.63715 10.5823 4.74896C10.4705 4.86076 10.3319 4.91667 10.1667 4.91667H9.58333V6.08333H10.1667C10.3319 6.08333 10.4705 6.13924 10.5823 6.25104C10.6941 6.36285 10.75 6.50139 10.75 6.66667C10.75 6.83194 10.6941 6.97049 10.5823 7.08229C10.4705 7.1941 10.3319 7.25 10.1667 7.25H9.58333V8.41667C9.58333 8.7375 9.4691 9.01215 9.24063 9.24063C9.01215 9.4691 8.7375 9.58333 8.41667 9.58333H7.25V10.1667C7.25 10.3319 7.1941 10.4705 7.08229 10.5823C6.97049 10.6941 6.83194 10.75 6.66667 10.75C6.50139 10.75 6.36285 10.6941 6.25104 10.5823C6.13924 10.4705 6.08333 10.3319 6.08333 10.1667V9.58333H4.91667V10.1667C4.91667 10.3319 4.86076 10.4705 4.74896 10.5823C4.63715 10.6941 4.49861 10.75 4.33333 10.75C4.16806 10.75 4.02951 10.6941 3.91771 10.5823C3.8059 10.4705 3.75 10.3319 3.75 10.1667ZM8.41667 8.41667V2.58333H2.58333V8.41667H8.41667Z",fill:"black"})}),xx=({className:e})=>Ne.jsx("svg",{className:`${e}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",children:Ne.jsx("path",{d:"M3.90834 11.2583L4.75417 12.6875C4.83195 12.8139 4.93889 12.899 5.075 12.9427C5.21111 12.9865 5.34722 12.9792 5.48334 12.9208L7 12.2792L8.51667 12.9208C8.65278 12.9792 8.78889 12.9865 8.925 12.9427C9.06111 12.899 9.16806 12.8139 9.24584 12.6875L10.0917 11.2583L11.6958 10.9083C11.8417 10.8792 11.9583 10.8038 12.0458 10.6823C12.1333 10.5608 12.1674 10.4271 12.1479 10.2812L11.9875 8.63333L13.0813 7.37916C13.1785 7.27221 13.2271 7.14583 13.2271 6.99999C13.2271 6.85416 13.1785 6.72777 13.0813 6.62083L11.9875 5.36666L12.1479 3.71874C12.1674 3.57291 12.1333 3.43923 12.0458 3.3177C11.9583 3.19617 11.8417 3.12083 11.6958 3.09166L10.0917 2.74166L9.24584 1.31249C9.16806 1.1861 9.06111 1.10103 8.925 1.05728C8.78889 1.01353 8.65278 1.02083 8.51667 1.07916L7 1.72083L5.48334 1.07916C5.34722 1.02083 5.21111 1.01353 5.075 1.05728C4.93889 1.10103 4.83195 1.1861 4.75417 1.31249L3.90834 2.74166L2.30417 3.09166C2.15834 3.12083 2.04167 3.19617 1.95417 3.3177C1.86667 3.43923 1.83264 3.57291 1.85209 3.71874L2.0125 5.36666L0.918752 6.62083C0.82153 6.72777 0.772919 6.85416 0.772919 6.99999C0.772919 7.14583 0.82153 7.27221 0.918752 7.37916L2.0125 8.63333L1.85209 10.2812C1.83264 10.4271 1.86667 10.5608 1.95417 10.6823C2.04167 10.8038 2.15834 10.8792 2.30417 10.9083L3.90834 11.2583Z",fill:"black"})}),bx=({className:e})=>Ne.jsx("svg",{className:e,viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ne.jsx("path",{d:"M7.47254 9.26664C7.75031 9.54442 8.10031 9.67498 8.52254 9.65831C8.94476 9.64164 9.25031 9.48887 9.4392 9.19998L12.2559 4.98331C12.3559 4.82775 12.342 4.68609 12.2142 4.55831C12.0864 4.43053 11.9448 4.41664 11.7892 4.51664L7.57254 7.33331C7.28365 7.53331 7.12531 7.83609 7.09754 8.24164C7.06976 8.6472 7.19476 8.98887 7.47254 9.26664ZM3.90587 12.2666C3.66142 12.2666 3.43642 12.2139 3.23087 12.1083C3.02531 12.0028 2.86142 11.8444 2.7392 11.6333C2.45031 11.1111 2.22809 10.5694 2.07254 10.0083C1.91698 9.4472 1.8392 8.86664 1.8392 8.26664C1.8392 7.34442 2.0142 6.47775 2.3642 5.66664C2.7142 4.85553 3.1892 4.14998 3.7892 3.54998C4.3892 2.94998 5.09476 2.47498 5.90587 2.12498C6.71698 1.77498 7.58365 1.59998 8.50587 1.59998C9.41698 1.59998 10.2725 1.7722 11.0725 2.11664C11.8725 2.46109 12.5725 2.93053 13.1725 3.52498C13.7725 4.11942 14.2503 4.81386 14.6059 5.60831C14.9614 6.40275 15.1448 7.25553 15.1559 8.16664C15.167 8.77775 15.0975 9.37498 14.9475 9.95831C14.7975 10.5416 14.567 11.1 14.2559 11.6333C14.1336 11.8444 13.9698 12.0028 13.7642 12.1083C13.5586 12.2139 13.3336 12.2666 13.0892 12.2666H3.90587Z",fill:"white"})}),Sx=({className:e})=>Ne.jsxs("svg",{className:`${e}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",children:[Ne.jsx("path",{d:"M5.68451 8.71817C5.91785 8.9515 6.21185 9.06117 6.56652 9.04717C6.92118 9.03317 7.17785 8.90483 7.33652 8.66217L9.70252 5.12017C9.78652 4.9895 9.77485 4.8705 9.66752 4.76317C9.56018 4.65583 9.44118 4.64417 9.31052 4.72817L5.76852 7.09417C5.52585 7.26217 5.39285 7.5165 5.36952 7.85717C5.34618 8.19783 5.45118 8.48483 5.68451 8.71817ZM2.68851 11.2382C2.48318 11.2382 2.29418 11.1938 2.12151 11.1052C1.94885 11.0165 1.81118 10.8835 1.70851 10.7062C1.46585 10.2675 1.27918 9.8125 1.14851 9.34117C1.01785 8.86983 0.952515 8.38217 0.952515 7.87817C0.952515 7.1035 1.09951 6.3755 1.39351 5.69417C1.68751 5.01283 2.08651 4.42017 2.59051 3.91617C3.09451 3.41217 3.68718 3.01317 4.36852 2.71917C5.04985 2.42517 5.77785 2.27817 6.55252 2.27817C7.31785 2.27817 8.03652 2.42283 8.70852 2.71217C9.38052 3.0015 9.96852 3.39583 10.4725 3.89517C10.9765 4.3945 11.3778 4.97783 11.6765 5.64517C11.9752 6.3125 12.1292 7.02883 12.1385 7.79417C12.1478 8.3075 12.0895 8.80917 11.9635 9.29917C11.8375 9.78917 11.6438 10.2582 11.3825 10.7062C11.2798 10.8835 11.1422 11.0165 10.9695 11.1052C10.7968 11.1938 10.6078 11.2382 10.4025 11.2382H2.68851Z",fill:"black"}),Ne.jsx("path",{d:"M11.6175 6.47817H13.5288V11.7218H9.24592V8.84977C9.24592 8.19363 9.47715 7.63433 9.93961 7.17186C10.4021 6.7094 10.9614 6.47817 11.6175 6.47817Z",fill:"white"}),Ne.jsx("path",{d:"M10.6689 11.2214C10.5345 11.2214 10.4218 11.1759 10.3309 11.085C10.24 10.9941 10.1946 10.8814 10.1946 10.7471V9.32409C10.1946 9.1897 10.24 9.07705 10.3309 8.98614C10.4218 8.89523 10.5345 8.84977 10.6689 8.84977V8.37545C10.6689 8.11458 10.7618 7.89125 10.9475 7.70547C11.1333 7.5197 11.3566 7.42681 11.6175 7.42681C11.8784 7.42681 12.1017 7.5197 12.2875 7.70547C12.4733 7.89125 12.5662 8.11458 12.5662 8.37545V8.84977C12.7005 8.84977 12.8132 8.89523 12.9041 8.98614C12.995 9.07705 13.0405 9.1897 13.0405 9.32409V10.7471C13.0405 10.8814 12.995 10.9941 12.9041 11.085C12.8132 11.1759 12.7005 11.2214 12.5662 11.2214H10.6689ZM11.1432 8.84977H12.0918V8.37545C12.0918 8.24106 12.0464 8.12841 11.9555 8.0375C11.8646 7.94659 11.7519 7.90113 11.6175 7.90113C11.4831 7.90113 11.3705 7.94659 11.2796 8.0375C11.1887 8.12841 11.1432 8.24106 11.1432 8.37545V8.84977Z",fill:"black"})]}),wx=({className:e})=>Ne.jsx("svg",{className:`${e}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",children:Ne.jsx("path",{d:"M6.99999 7.58333C6.51388 7.58333 6.10069 7.41319 5.76041 7.07291C5.42013 6.73264 5.24999 6.31944 5.24999 5.83333C5.24999 5.34722 5.42013 4.93403 5.76041 4.59375C6.10069 4.25347 6.51388 4.08333 6.99999 4.08333C7.48611 4.08333 7.8993 4.25347 8.23958 4.59375C8.57986 4.93403 8.74999 5.34722 8.74999 5.83333C8.74999 6.31944 8.57986 6.73264 8.23958 7.07291C7.8993 7.41319 7.48611 7.58333 6.99999 7.58333ZM6.99999 12.25L4.27291 13.1542C4.07847 13.2222 3.90104 13.1979 3.74062 13.0812C3.5802 12.9646 3.49999 12.809 3.49999 12.6146V8.91041C3.13055 8.50208 2.84374 8.03541 2.63958 7.51041C2.43541 6.98541 2.33333 6.42639 2.33333 5.83333C2.33333 4.53055 2.78541 3.42708 3.68958 2.52291C4.59374 1.61875 5.69722 1.16666 6.99999 1.16666C8.30277 1.16666 9.40624 1.61875 10.3104 2.52291C11.2146 3.42708 11.6667 4.53055 11.6667 5.83333C11.6667 6.42639 11.5646 6.98541 11.3604 7.51041C11.1562 8.03541 10.8694 8.50208 10.5 8.91041V12.6146C10.5 12.809 10.4198 12.9646 10.2594 13.0812C10.099 13.1979 9.92152 13.2222 9.72708 13.1542L6.99999 12.25ZM6.99999 9.33333C7.97222 9.33333 8.79861 8.99305 9.47916 8.3125C10.1597 7.63194 10.5 6.80555 10.5 5.83333C10.5 4.86111 10.1597 4.03472 9.47916 3.35416C8.79861 2.67361 7.97222 2.33333 6.99999 2.33333C6.02777 2.33333 5.20138 2.67361 4.52083 3.35416C3.84027 4.03472 3.49999 4.86111 3.49999 5.83333C3.49999 6.80555 3.84027 7.63194 4.52083 8.3125C5.20138 8.99305 6.02777 9.33333 6.99999 9.33333Z",fill:"black"})});function Ex({className:e}){return Ne.jsx("svg",{className:`${e} w-14 h-14`,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ne.jsx("path",{d:"M5.31407 5.89587C5.52796 5.67226 5.77831 5.49483 6.06511 5.36358C6.35192 5.23233 6.66546 5.1667 7.00574 5.1667C7.34602 5.1667 7.65956 5.23233 7.94636 5.36358C8.23317 5.49483 8.48352 5.67226 8.6974 5.89587L11.6432 4.24795L7.57449 1.98753C7.39949 1.88059 7.2099 1.82712 7.00574 1.82712C6.80157 1.82712 6.61199 1.88059 6.43699 1.98753L2.36824 4.24795L5.31407 5.89587ZM6.4224 13.0125V9.76045C5.91685 9.62434 5.49879 9.34969 5.16824 8.93649C4.83768 8.5233 4.6724 8.04448 4.6724 7.50003C4.6724 7.39309 4.67727 7.29101 4.68699 7.19378C4.69671 7.09656 4.71615 7.0042 4.74532 6.9167L1.75574 5.23962V9.73129C1.75574 9.94517 1.80921 10.142 1.91615 10.3219C2.0231 10.5018 2.16893 10.6452 2.35365 10.7521L6.4224 13.0125ZM7.00574 8.6667C7.32657 8.6667 7.60122 8.55247 7.8297 8.32399C8.05817 8.09552 8.1724 7.82087 8.1724 7.50003C8.1724 7.1792 8.05817 6.90455 7.8297 6.67608C7.60122 6.4476 7.32657 6.33337 7.00574 6.33337C6.6849 6.33337 6.41025 6.4476 6.18178 6.67608C5.95331 6.90455 5.83907 7.1792 5.83907 7.50003C5.83907 7.82087 5.95331 8.09552 6.18178 8.32399C6.41025 8.55247 6.6849 8.6667 7.00574 8.6667ZM7.58907 13.0125L11.6578 10.7521C11.8425 10.6452 11.9884 10.5018 12.0953 10.3219C12.2023 10.142 12.2557 9.94517 12.2557 9.73129V5.23962L9.26615 6.9167C9.29532 7.01392 9.31477 7.10872 9.32449 7.20108C9.33421 7.29344 9.33907 7.39309 9.33907 7.50003C9.33907 8.04448 9.17379 8.5233 8.84324 8.93649C8.51268 9.34969 8.09463 9.62434 7.58907 9.76045V13.0125Z",fill:"black"})})}const Nx=({className:e})=>Ne.jsx("svg",{className:`${e}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",children:Ne.jsx("path",{d:"M2.81458 7.01458L5.075 9.275C5.18194 9.38194 5.23541 9.51806 5.23541 9.68333C5.23541 9.84861 5.18194 9.98472 5.075 10.0917C4.96805 10.1986 4.83194 10.2521 4.66666 10.2521C4.50139 10.2521 4.36528 10.1986 4.25833 10.0917L1.575 7.40833C1.51666 7.35 1.47535 7.28681 1.45104 7.21875C1.42673 7.15069 1.41458 7.07778 1.41458 7C1.41458 6.92222 1.42673 6.84931 1.45104 6.78125C1.47535 6.71319 1.51666 6.65 1.575 6.59167L4.25833 3.90833C4.375 3.79167 4.51354 3.73333 4.67396 3.73333C4.83437 3.73333 4.97291 3.79167 5.08958 3.90833C5.20625 4.025 5.26458 4.16354 5.26458 4.32396C5.26458 4.48438 5.20625 4.62292 5.08958 4.73958L2.81458 7.01458ZM11.1854 6.98542L8.925 4.725C8.81805 4.61806 8.76458 4.48194 8.76458 4.31667C8.76458 4.15139 8.81805 4.01528 8.925 3.90833C9.03194 3.80139 9.16805 3.74792 9.33333 3.74792C9.49861 3.74792 9.63472 3.80139 9.74166 3.90833L12.425 6.59167C12.4833 6.65 12.5247 6.71319 12.549 6.78125C12.5733 6.84931 12.5854 6.92222 12.5854 7C12.5854 7.07778 12.5733 7.15069 12.549 7.21875C12.5247 7.28681 12.4833 7.35 12.425 7.40833L9.74166 10.0917C9.625 10.2083 9.48889 10.2642 9.33333 10.2594C9.17778 10.2545 9.04166 10.1938 8.925 10.0771C8.80833 9.96042 8.75 9.82188 8.75 9.66146C8.75 9.50104 8.80833 9.3625 8.925 9.24583L11.1854 6.98542Z",fill:"black"})}),_x=({className:e})=>Ne.jsx("svg",{className:`${e}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",children:Ne.jsx("path",{d:"M7 6.41667C8.45833 6.41667 9.69792 6.18819 10.7188 5.73125C11.7396 5.27431 12.25 4.725 12.25 4.08333C12.25 3.44167 11.7396 2.89236 10.7188 2.43542C9.69792 1.97847 8.45833 1.75 7 1.75C5.54167 1.75 4.30208 1.97847 3.28125 2.43542C2.26042 2.89236 1.75 3.44167 1.75 4.08333C1.75 4.725 2.26042 5.27431 3.28125 5.73125C4.30208 6.18819 5.54167 6.41667 7 6.41667ZM7 7.875C7.39861 7.875 7.89687 7.83368 8.49479 7.75104C9.09271 7.6684 9.66875 7.53472 10.2229 7.35C10.7771 7.16528 11.2535 6.92465 11.6521 6.62813C12.0507 6.3316 12.25 5.96944 12.25 5.54167V7C12.25 7.42778 12.0507 7.78993 11.6521 8.08646C11.2535 8.38299 10.7771 8.62361 10.2229 8.80833C9.66875 8.99306 9.09271 9.12674 8.49479 9.20937C7.89687 9.29201 7.39861 9.33333 7 9.33333C6.60139 9.33333 6.10313 9.29201 5.50521 9.20937C4.90729 9.12674 4.33125 8.99306 3.77708 8.80833C3.22292 8.62361 2.74653 8.38299 2.34792 8.08646C1.94931 7.78993 1.75 7.42778 1.75 7V5.54167C1.75 5.96944 1.94931 6.3316 2.34792 6.62813C2.74653 6.92465 3.22292 7.16528 3.77708 7.35C4.33125 7.53472 4.90729 7.6684 5.50521 7.75104C6.10313 7.83368 6.60139 7.875 7 7.875ZM7 10.7917C7.39861 10.7917 7.89687 10.7503 8.49479 10.6677C9.09271 10.5851 9.66875 10.4514 10.2229 10.2667C10.7771 10.0819 11.2535 9.84132 11.6521 9.54479C12.0507 9.24826 12.25 8.88611 12.25 8.45833V9.91667C12.25 10.3444 12.0507 10.7066 11.6521 11.0031C11.2535 11.2997 10.7771 11.5403 10.2229 11.725C9.66875 11.9097 9.09271 12.0434 8.49479 12.126C7.89687 12.2087 7.39861 12.25 7 12.25C6.60139 12.25 6.10313 12.2087 5.50521 12.126C4.90729 12.0434 4.33125 11.9097 3.77708 11.725C3.22292 11.5403 2.74653 11.2997 2.34792 11.0031C1.94931 10.7066 1.75 10.3444 1.75 9.91667V8.45833C1.75 8.88611 1.94931 9.24826 2.34792 9.54479C2.74653 9.84132 3.22292 10.0819 3.77708 10.2667C4.33125 10.4514 4.90729 10.5851 5.50521 10.6677C6.10313 10.7503 6.60139 10.7917 7 10.7917Z",fill:"black"})}),Rx=({className:e})=>Ne.jsx("svg",{className:`${e}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",children:Ne.jsx("path",{d:"M4.66667 9.91667H5.83333C5.99861 9.91667 6.13715 9.86076 6.24896 9.74896C6.36076 9.63715 6.41667 9.49861 6.41667 9.33333V8.16667C6.41667 8.00139 6.36076 7.86285 6.24896 7.75104C6.13715 7.63924 5.99861 7.58333 5.83333 7.58333H4.66667C4.50139 7.58333 4.36285 7.63924 4.25104 7.75104C4.13924 7.86285 4.08333 8.00139 4.08333 8.16667V9.33333C4.08333 9.49861 4.13924 9.63715 4.25104 9.74896C4.36285 9.86076 4.50139 9.91667 4.66667 9.91667ZM8.16667 9.91667H9.33333C9.49861 9.91667 9.63715 9.86076 9.74896 9.74896C9.86076 9.63715 9.91667 9.49861 9.91667 9.33333V8.16667C9.91667 8.00139 9.86076 7.86285 9.74896 7.75104C9.63715 7.63924 9.49861 7.58333 9.33333 7.58333H8.16667C8.00139 7.58333 7.86285 7.63924 7.75104 7.75104C7.63924 7.86285 7.58333 8.00139 7.58333 8.16667V9.33333C7.58333 9.49861 7.63924 9.63715 7.75104 9.74896C7.86285 9.86076 8.00139 9.91667 8.16667 9.91667ZM4.66667 6.41667H5.83333C5.99861 6.41667 6.13715 6.36076 6.24896 6.24896C6.36076 6.13715 6.41667 5.99861 6.41667 5.83333V4.66667C6.41667 4.50139 6.36076 4.36285 6.24896 4.25104C6.13715 4.13924 5.99861 4.08333 5.83333 4.08333H4.66667C4.50139 4.08333 4.36285 4.13924 4.25104 4.25104C4.13924 4.36285 4.08333 4.50139 4.08333 4.66667V5.83333C4.08333 5.99861 4.13924 6.13715 4.25104 6.24896C4.36285 6.36076 4.50139 6.41667 4.66667 6.41667ZM8.16667 6.41667H9.33333C9.49861 6.41667 9.63715 6.36076 9.74896 6.24896C9.86076 6.13715 9.91667 5.99861 9.91667 5.83333V4.66667C9.91667 4.50139 9.86076 4.36285 9.74896 4.25104C9.63715 4.13924 9.49861 4.08333 9.33333 4.08333H8.16667C8.00139 4.08333 7.86285 4.13924 7.75104 4.25104C7.63924 4.36285 7.58333 4.50139 7.58333 4.66667V5.83333C7.58333 5.99861 7.63924 6.13715 7.75104 6.24896C7.86285 6.36076 8.00139 6.41667 8.16667 6.41667ZM2.91667 12.25C2.59583 12.25 2.32118 12.1358 2.09271 11.9073C1.86424 11.6788 1.75 11.4042 1.75 11.0833V2.91667C1.75 2.59583 1.86424 2.32118 2.09271 2.09271C2.32118 1.86424 2.59583 1.75 2.91667 1.75H11.0833C11.4042 1.75 11.6788 1.86424 11.9073 2.09271C12.1358 2.32118 12.25 2.59583 12.25 2.91667V11.0833C12.25 11.4042 12.1358 11.6788 11.9073 11.9073C11.6788 12.1358 11.4042 12.25 11.0833 12.25H2.91667Z",fill:"black"})}),kx=({className:e})=>Ne.jsx("svg",{className:`${e}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",children:Ne.jsx("path",{d:"M6.21251 9.1875L9.05626 7.36458C9.19237 7.27708 9.26042 7.15555 9.26042 7C9.26042 6.84444 9.19237 6.72291 9.05626 6.63541L6.21251 4.8125C6.06667 4.71528 5.91841 4.70798 5.76771 4.79062C5.61702 4.87326 5.54167 5.00208 5.54167 5.17708V8.82291C5.54167 8.99791 5.61702 9.12673 5.76771 9.20937C5.91841 9.29201 6.06667 9.28472 6.21251 9.1875ZM7.00001 12.8333C6.19306 12.8333 5.43473 12.6802 4.72501 12.374C4.01528 12.0677 3.39792 11.6521 2.87292 11.1271C2.34792 10.6021 1.9323 9.98472 1.62605 9.275C1.3198 8.56528 1.16667 7.80694 1.16667 7C1.16667 6.19305 1.3198 5.43472 1.62605 4.725C1.9323 4.01528 2.34792 3.39791 2.87292 2.87291C3.39792 2.34791 4.01528 1.93229 4.72501 1.62604C5.43473 1.31979 6.19306 1.16666 7.00001 1.16666C7.80695 1.16666 8.56528 1.31979 9.27501 1.62604C9.98473 1.93229 10.6021 2.34791 11.1271 2.87291C11.6521 3.39791 12.0677 4.01528 12.374 4.725C12.6802 5.43472 12.8333 6.19305 12.8333 7C12.8333 7.80694 12.6802 8.56528 12.374 9.275C12.0677 9.98472 11.6521 10.6021 11.1271 11.1271C10.6021 11.6521 9.98473 12.0677 9.27501 12.374C8.56528 12.6802 7.80695 12.8333 7.00001 12.8333Z",fill:"black"})}),Ix="_container_jb5f6_5",Mx="_containerIsPill_jb5f6_16",Px="_topBar_jb5f6_21",Tx="_selectedNode_jb5f6_35",$x="_vcModeOn_jb5f6_39",Ox="_isTrusted_jb5f6_43",Dx="_labelContainer_jb5f6_46",Ax="_nodeType_jb5f6_50",Kx="_nodeLabel_jb5f6_56",Lx="_nodeTypeLarge_jb5f6_61",Vx="_topBarIsVCNone_jb5f6_79",Hx="_badge_jb5f6_84",zx="_iconContainer_jb5f6_91",Fx="_icon_jb5f6_91",Bx="_displayType_jb5f6_113",jx="_clickableArea_jb5f6_118",Wx="_flex_jb5f6_124",At={container:Ix,containerIsPill:Mx,topBar:Px,selectedNode:Tx,vcModeOn:$x,isTrusted:Ox,labelContainer:Dx,nodeType:Ax,nodeLabel:Kx,nodeTypeLarge:Lx,topBarIsVCNone:Vx,badge:Hx,iconContainer:zx,icon:Fx,displayType:Bx,clickableArea:jx,flex:Wx};function Ux(){this.__data__=[],this.size=0}var Gx=Ux;function Xx(e,t){return e===t||e!==e&&t!==t}var oa=Xx,Yx=oa;function qx(e,t){for(var r=e.length;r--;)if(Yx(e[r][0],t))return r;return-1}var aa=qx,Zx=aa,Jx=Array.prototype,Qx=Jx.splice;function e2(e){var t=this.__data__,r=Zx(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Qx.call(t,r,1),--this.size,!0}var t2=e2,n2=aa;function r2(e){var t=this.__data__,r=n2(t,e);return r<0?void 0:t[r][1]}var o2=r2,a2=aa;function i2(e){return a2(this.__data__,e)>-1}var s2=i2,l2=aa;function c2(e,t){var r=this.__data__,n=l2(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var u2=c2,d2=Gx,f2=t2,v2=o2,h2=s2,p2=u2;function pr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=$S}var Pd=OS,DS=Ki,AS=Pd;function KS(e){return e!=null&&AS(e.length)&&!DS(e)}var Hi=KS,LS=Hi,VS=to;function HS(e){return VS(e)&&LS(e)}var zS=HS,Lo={exports:{}};function FS(){return!1}var BS=FS;Lo.exports;(function(e,t){var r=mr,n=BS,o=t&&!t.nodeType&&t,a=o&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===o,i=s?r.Buffer:void 0,l=i?i.isBuffer:void 0,c=l||n;e.exports=c})(Lo,Lo.exports);var Td=Lo.exports,jS=sa,WS=_d,US=to,GS="[object Object]",XS=Function.prototype,YS=Object.prototype,$d=XS.toString,qS=YS.hasOwnProperty,ZS=$d.call(Object);function JS(e){if(!US(e)||jS(e)!=GS)return!1;var t=WS(e);if(t===null)return!0;var r=qS.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&$d.call(r)==ZS}var QS=JS,ew=sa,tw=Pd,nw=to,rw="[object Arguments]",ow="[object Array]",aw="[object Boolean]",iw="[object Date]",sw="[object Error]",lw="[object Function]",cw="[object Map]",uw="[object Number]",dw="[object Object]",fw="[object RegExp]",vw="[object Set]",hw="[object String]",pw="[object WeakMap]",mw="[object ArrayBuffer]",gw="[object DataView]",yw="[object Float32Array]",Cw="[object Float64Array]",xw="[object Int8Array]",bw="[object Int16Array]",Sw="[object Int32Array]",ww="[object Uint8Array]",Ew="[object Uint8ClampedArray]",Nw="[object Uint16Array]",_w="[object Uint32Array]",vt={};vt[yw]=vt[Cw]=vt[xw]=vt[bw]=vt[Sw]=vt[ww]=vt[Ew]=vt[Nw]=vt[_w]=!0;vt[rw]=vt[ow]=vt[mw]=vt[aw]=vt[gw]=vt[iw]=vt[sw]=vt[lw]=vt[cw]=vt[uw]=vt[dw]=vt[fw]=vt[vw]=vt[hw]=vt[pw]=!1;function Rw(e){return nw(e)&&tw(e.length)&&!!vt[ew(e)]}var kw=Rw;function Iw(e){return function(t){return e(t)}}var Mw=Iw,Vo={exports:{}};Vo.exports;(function(e,t){var r=xd,n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===n,s=a&&r.process,i=function(){try{var l=o&&o.require&&o.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=i})(Vo,Vo.exports);var Pw=Vo.exports,Tw=kw,$w=Mw,_l=Pw,Rl=_l&&_l.isTypedArray,Ow=Rl?$w(Rl):Tw,Od=Ow;function Dw(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Dd=Dw,Aw=Vi,Kw=oa,Lw=Object.prototype,Vw=Lw.hasOwnProperty;function Hw(e,t,r){var n=e[t];(!(Vw.call(e,t)&&Kw(n,r))||r===void 0&&!(t in e))&&Aw(e,t,r)}var zw=Hw,Fw=zw,Bw=Vi;function jw(e,t,r,n){var o=!r;r||(r={});for(var a=-1,s=t.length;++a-1&&e%1==0&&e0){if(++t>=r7)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var s7=i7,l7=n7,c7=s7,u7=c7(l7),d7=u7,f7=Vd,v7=q6,h7=d7;function p7(e,t){return h7(v7(e,t,f7),e+"")}var m7=p7,g7=oa,y7=Hi,C7=Ad,x7=jn;function b7(e,t,r){if(!x7(r))return!1;var n=typeof t;return(n=="number"?y7(r)&&C7(t,r.length):n=="string"&&t in r)?g7(r[t],e):!1}var S7=b7,w7=m7,E7=S7;function N7(e){return w7(function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,s&&E7(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++n{const t=typeof e=="function"?Qc(e):e,r=(n,o)=>O7(t,n,o);return Object.assign(r,t),r},D7=e=>e?Ol(e):Ol,A7=D7()((e,t)=>({graphName:"",nodes:[],edges:[],allNodes:[],graphState:"vc-off",governanceFilter:null,vcs:new Map,vcsToGraph:new Map,sinks:{},activeSink:null,showBenchmarks:!1,hasMeasured:!1,pretty:!0,setGraphName:r=>e({graphName:r}),setGovernanceFilter:r=>e({governanceFilter:r}),setAllNodes:r=>e({allNodes:r}),setNodes:r=>{const n=new Map(t().nodes.map(a=>[a.id,a]));let o=[];for(const a of r){let s=n.get(a.id);o.push(s?P7(a,s):a)}e({nodes:o})},setEdges:r=>e({edges:r}),setGraphState:r=>{e({graphState:r})},setVcs:r=>e({vcs:r}),setVcsToGraph:r=>e({vcsToGraph:r}),setSinkMap:r=>e({sinks:r}),setActiveSink:r=>e({activeSink:r}),setShowBenchmarks:r=>{e({showBenchmarks:r})},setPretty:r=>e({pretty:r}),setHasMeasured:r=>e({hasMeasured:r}),setGraph:r=>e({graph:r}),setNoBenchmarksGraph:r=>e({noBenchmarksGraph:r}),onNodesChange:r=>{const n=ad(r,t().nodes);e({nodes:n})},onEdgesChange:r=>{e({edges:CC(r,t().edges)})},onConnect:r=>{e({edges:Ku(r,t().edges)})},getNodeById:r=>t().nodes.find(n=>n.id===r),getNodeFromFullGraph:r=>t().allNodes.find(n=>n.id===r)})),K7=({className:e})=>Ne.jsx("svg",{className:`${e}`,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ne.jsx("path",{d:"M2.94604 11.3881H8.77938C8.94465 11.3881 9.0832 11.444 9.195 11.5558C9.30681 11.6676 9.36271 11.8061 9.36271 11.9714C9.36271 12.1367 9.30681 12.2752 9.195 12.387C9.0832 12.4988 8.94465 12.5548 8.77938 12.5548H2.94604C2.78076 12.5548 2.64222 12.4988 2.53042 12.387C2.41861 12.2752 2.36271 12.1367 2.36271 11.9714C2.36271 11.8061 2.41861 11.6676 2.53042 11.5558C2.64222 11.444 2.78076 11.3881 2.94604 11.3881ZM4.82729 8.89434L3.17938 7.24642C2.95576 7.02281 2.84153 6.74815 2.83667 6.42246C2.83181 6.09677 2.94118 5.82211 3.16479 5.5985L3.58771 5.17558L6.91271 8.47142L6.48979 8.89434C6.26618 9.11795 5.9891 9.22975 5.65854 9.22975C5.32799 9.22975 5.0509 9.11795 4.82729 8.89434ZM9.36271 6.02142L6.06688 2.69642L6.48979 2.2735C6.7134 2.04989 6.98806 1.94051 7.31375 1.94538C7.63945 1.95024 7.9141 2.06447 8.13771 2.28808L9.78563 3.936C10.0092 4.15961 10.121 4.4367 10.121 4.76725C10.121 5.09781 10.0092 5.37489 9.78563 5.5985L9.36271 6.02142ZM11.6377 11.5631L4.43354 4.35892L5.25021 3.54225L12.4544 10.7464C12.5613 10.8534 12.6148 10.9895 12.6148 11.1548C12.6148 11.32 12.5613 11.4561 12.4544 11.5631C12.3474 11.67 12.2113 11.7235 12.046 11.7235C11.8808 11.7235 11.7447 11.67 11.6377 11.5631Z",fill:"black"})}),L7="_titleContainer_1p5wf_1",V7="_title_1p5wf_1",H7="_closeButton_1p5wf_15",z7="_govButton_1p5wf_22",F7="_iconButton_1p5wf_28",B7="_icon_1p5wf_28",tr={titleContainer:L7,title:V7,closeButton:H7,govButton:z7,iconButton:F7,icon:B7},j7=({governanceNodes:e,onGovernanceSelect:t,onGovernanceClose:r,governanceFilter:n})=>{const[o,a]=u.useState(!1),s=Ne.jsx("div",{children:e.map(d=>{var h;const v=(n==null?void 0:n.find(p=>p===d.id))?{backgroundColor:"#E2CCFF",color:"#000000"}:{};return Ne.jsx(Jd,{style:v,onClick:()=>{},className:tr.govButton,type:"text",children:((h=d.data.enrichments.governance)==null?void 0:h.name)||d.data.label},d.id)})}),i=()=>{a(!1),r()},l=()=>{i()},c=()=>Ne.jsxs("div",{className:tr.titleContainer,children:[Ne.jsx("span",{className:tr.title,children:"Governance "}),Ne.jsx("button",{onClick:l,className:tr.closeButton,children:Ne.jsx(Qd,{})})]});return Ne.jsx(Hv,{content:s,title:c,trigger:"click",open:o,getTooltipContainer:d=>d,children:Ne.jsx("div",{children:Ne.jsx("button",{className:tr.iconButton,children:Ne.jsx(K7,{className:tr.icon})})})})},Dl={untrusted:"#FFCCD5",none:"white",trusted:"#CEFFDC",unknown:"#E2E8F0",waiting:"orange"},y5={untrusted:"#FF6682",none:"black",trusted:"#26D958",unknown:"#a7a9b3",waiting:"orange"};function C5(e){let t="DataIcon",r="governance",n=null;switch(e?e.toLowerCase():""){case"attribution":t="AttributionIcon",n=Zt.certificate,r="Attribution";break;case"benchmark":t="BenchmarkIcon",n=Zt.benchmark,r="benchmark";break;case"benchmark_result":t="Benchmark_resultIcon",n=Zt.benchmark,r="benchmark result";break;case"certificate":t="CertificateIcon",n=Zt.certificate,r="certificate";break;case"database":t="DatabaseIcon",n=Zt.data,r="database";break;case"dataset":t="DatasetIcon",n=Zt.data,r="dataset";break;case"data":t="DataIcon",n=Wi.grey400,r="data";break;case"document":t="DocumentIcon",n=Zt.data,r="document";break;case"media_file":t="Media_fileIcon",n=Zt.data,r="media file";break;case"computation":t="ComputationIcon",n=Zt.computation,r="computation";break;case"model":t="ModelIcon",n=Zt.model,r="model";break;case"token":t="TokenIcon",n=Zt.tokens,r="token";break;case"code":t="DataIcon",n=Zt.code,r="code";break;case"governance":t="DataIcon",n=Wi.blue,r="Governance";break;default:n="#AAEEDD",r="Unknown"}return{iconId:t,color:n,displayType:r}}function W7(e,t){if(!t)return"waiting";const r=[];for(const[o,{nodes:a,vc:s}]of t)a.some(i=>i.node.id==e)&&r.push(s);const n=r.map(o=>o.issuerStatus);return Hd(n)}function x5(e,t){if(!t)return"waiting";const r=[];for(const[o,{edges:a,vc:s}]of t)a.some(i=>i.edge.id==e)&&r.push(s);const n=r.map(o=>o.issuerStatus);return Hd(n)}function Hd(e){let t="none";return e.some(n=>n.toLocaleLowerCase()==="trusted")?t="trusted":e.some(n=>n.toLocaleLowerCase()==="untrusted")?t="untrusted":e.some(n=>n.toLocaleLowerCase()==="unknown")&&(t="unknown"),t}const U7={DataIcon:mx,ModelIcon:gx,ComputationIcon:Cx,DocumentIcon:yx,TokenIcon:Ex,AttributionIcon:xx,BenchmarkIcon:bx,Benchmark_resultIcon:Sx,CertificateIcon:wx,CodeIcon:Nx,DatabaseIcon:_x,DatasetIcon:Rx,Media_fileIcon:kx},G7=e=>U7[e]||null,X7=({top:e,bottom:t})=>({"--node-color-top":e,"--node-color-bottom":t}),Y7=e=>e.transform[2]>=hf,q7=e=>e.transform[2]>=pf,Z7=({id:e,data:t,...r})=>{const{nodeColor:n,label:o,icon:a,sourcePosition:s,displayType:i,typeLabel:l,governanceNodes:c,isSourceForConnection:d,isTargetForConnection:f}=t,v=ef(),h=tf(),[p,g]=nf(),y=h.nodeCid,{graphState:m,vcsToGraph:C,governanceFilter:S,setGovernanceFilter:x,sinks:E,activeSink:N,getNodeFromFullGraph:R}=A7(z=>({graphState:z.graphState,vcsToGraph:z.vcsToGraph,governanceFilter:z.governanceFilter,setGovernanceFilter:z.setGovernanceFilter,sinks:z.sinks,activeSink:z.activeSink,getNodeFromFullGraph:z.getNodeFromFullGraph})),M=y===e,_=N?E[N]:null,A=_?_.nodes.has(e)||N===e:!1,T=W7(e,C),O=z=>{var G;let j=1;if(_&&!y&&(j=A?1:.1),_&&y){const Y=R(y),ee=(G=Y==null?void 0:Y.data.model)!=null&&G.id?`${Y.data.model.id}-benchmarks`:y;_.nodes.has(ee)||N===ee?A?ee===z?j=1:j=.5:j=.1:j=ee!==z?.1:1}return!_&&y&&(j=y!==z?.1:1),S?{opacity:S.find(ee=>c.some(X=>X.id===ee))?1:.2}:{opacity:j}},w=z=>{z.altKey?g(j=>({...j,sourceNode:e})):M||v(vf(`${h.owner}/${h.repo}`)+"/"+e+`?${p.toString()}`)},b={"vc-off":{top:n,bottom:"white"},"vc-on":{top:Dl[T],bottom:Dl[T]}},I={...X7(b[m])},k=de(At.container,{[At.vcModeOn]:m==="vc-on",[At.selectedNode]:M}),P=de(At.topBar,{[At.topBarIsVCUnknown]:T==="unknown"&&m==="vc-on",[At.topBarIsVCNone]:T==="none"&&m==="vc-on",[At.isTrusted]:T==="trusted"&&m==="vc-on"}),$=G7(a),D=o,K=z=>{const j=[...S||[]],G=j.indexOf(z);G>-1?j.splice(G,1):j.push(z),j.length===0?x(null):x(j)},L=()=>{x(null)};u.useEffect(()=>{y&&x(null)},[y]);const H=ht(Y7);return ht(q7),Ne.jsxs(rf.div,{style:I,className:k,animate:{...O(e)},initial:{opacity:0},transition:{duration:1},children:[Ne.jsx("div",{className:"popup-container"}),Ne.jsx("div",{className:At.badge,children:c.length>0&&Ne.jsx(j7,{governanceNodes:c,onGovernanceSelect:K,onGovernanceClose:L,governanceFilter:S})}),Ne.jsx("div",{className:At.clickableArea,onClick:w,children:Ne.jsxs("div",{className:P,children:[Ne.jsx("span",{className:At.iconContainer,children:$&&Ne.jsx($,{className:At.icon})}),Ne.jsxs("div",{className:At.labelContainer,children:[Ne.jsx("div",{className:At.nodeType,style:{visibility:H?"visible":"hidden"},children:i}),Ne.jsx("div",{className:At.nodeLabel,style:{visibility:H?"visible":"hidden"},children:D}),Ne.jsx("div",{className:At.nodeTypeLarge,style:{display:H?"none":"flex"},children:i})]})]})}),Ne.jsx(dr,{type:"target",position:we.Left,id:"left",style:{opacity:f?1:0}}),Ne.jsx(dr,{type:"source",position:we.Right,id:"source",style:{opacity:d?1:0}})]})},b5=u.memo(Z7);var zd={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(zd);var S5=zd.exports,Fd={exports:{}};(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Fd);var w5=Fd.exports;function E5(e,t){return e.startsWith(t)?e.slice(t.length):e}export{Rx as $,A7 as A,qf as B,mp as C,n5 as D,qr as E,pp as F,W7 as G,Hd as H,hr as I,dr as J,we as K,mx as L,Vr as M,Dl as N,Zl as O,l5 as P,gx as Q,Cx as R,yx as S,oc as T,Ex as U,xx as V,bx as W,Sx as X,wx as Y,Nx as Z,_x as _,Jl as a,kx as a0,Au as a1,x5 as a2,eo as a3,y5 as a4,w5 as a5,S5 as a6,r5 as a7,o5 as a8,i5 as a9,Lc as aA,m5 as aB,f5 as aC,p5 as aD,G7 as aE,a5 as aa,j7 as ab,Do as ac,rd as ad,d5 as ae,kt as af,dx as ag,b5 as ah,C5 as ai,v5 as aj,h5 as ak,E5 as al,gd as am,hx as an,t5 as ao,di as ap,fr as aq,Go as ar,_o as as,ss as at,wc as au,mn as av,Sn as aw,Ro as ax,bs as ay,Dh as az,va as b,Kh as c,Th as d,bv as e,ro as f,s5 as g,ls as h,gp as i,On as j,Oc as k,Xo as l,c5 as m,Yp as n,am as o,Gc as p,Hr as q,ht as r,Ft as s,tn as t,yf as u,Di as v,mf as w,Cd as x,g5 as y,u5 as z};