@salesforce/metadata-plugins 1.14.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/plugins/agent/ui/assets/{VibeEditComposer-D5GykTkw.js → VibeEditComposer-sSbOXosJ.js} +1 -1
- package/dist/plugins/agent/ui/assets/index-BIxtmvIY.js +72 -0
- package/dist/plugins/agent/ui/assets/index-DK6mLwjU.css +1 -0
- package/dist/plugins/agent/ui/index.html +2 -2
- package/dist/plugins/{flow/ui/assets/VibeEditComposer-C36-RsSl.js → flexipage/ui/assets/VibeEditComposer-2omfTQa8.js} +1 -1
- package/dist/plugins/flexipage/ui/assets/index-Ch0zZsHI.css +1 -0
- package/dist/plugins/flexipage/ui/assets/index-uJdxEdOM.js +49 -0
- package/dist/plugins/flexipage/ui/index.html +2 -2
- package/dist/plugins/{permissionset/ui/assets/VibeEditComposer-HYu9RPHQ.js → flow/ui/assets/VibeEditComposer-6VCphcxQ.js} +1 -1
- package/dist/plugins/flow/ui/assets/index-CQ3TDL7z.css +1 -0
- package/dist/plugins/flow/ui/assets/index-CpyTpkLI.js +49 -0
- package/dist/plugins/flow/ui/index.html +2 -2
- package/dist/plugins/flowintent/ui/assets/{index-CzlE9StJ.js → index-y2EUB92Z.js} +8 -8
- package/dist/plugins/flowintent/ui/index.html +1 -1
- package/dist/plugins/keyvaluetable/KeyValueTableParser.d.ts +2 -1
- package/dist/plugins/keyvaluetable/KeyValueTableParser.d.ts.map +1 -1
- package/dist/plugins/keyvaluetable/KeyValueTableParser.js +4 -0
- package/dist/plugins/keyvaluetable/keyvaluetableSelectionGraph.d.ts +42 -0
- package/dist/plugins/keyvaluetable/keyvaluetableSelectionGraph.d.ts.map +1 -0
- package/dist/plugins/keyvaluetable/keyvaluetableSelectionGraph.js +167 -0
- package/dist/plugins/keyvaluetable/panelModel.d.ts +61 -0
- package/dist/plugins/keyvaluetable/panelModel.d.ts.map +1 -0
- package/dist/plugins/keyvaluetable/panelModel.js +101 -0
- package/dist/plugins/keyvaluetable/ui/assets/VibeEditComposer-BQeSigSs.css +1 -0
- package/dist/plugins/{flexipage/ui/assets/VibeEditComposer-CwNZdtC5.js → keyvaluetable/ui/assets/VibeEditComposer-D5tmk2tP.js} +1 -1
- package/dist/plugins/keyvaluetable/ui/assets/index-BHCYa3XE.css +1 -0
- package/dist/plugins/keyvaluetable/ui/assets/index-CKi34Iea.js +51 -0
- package/dist/plugins/keyvaluetable/ui/index.html +2 -2
- package/dist/plugins/permissionset/ui/assets/VibeEditComposer-CIuLlA6k.js +1 -0
- package/dist/plugins/permissionset/ui/assets/index-C30GA5Fg.js +49 -0
- package/dist/plugins/permissionset/ui/assets/index-DrM8dMi5.css +1 -0
- package/dist/plugins/permissionset/ui/index.html +2 -2
- package/dist/plugins/schema/ui/assets/VibeEditComposer-4dxANHzI.js +1 -0
- package/dist/plugins/schema/ui/assets/index-ByiBxce_.js +71 -0
- package/dist/plugins/schema/ui/assets/index-CkSyHqut.css +1 -0
- package/dist/plugins/schema/ui/index.html +2 -2
- package/package.json +3 -3
- package/dist/plugins/agent/ui/assets/index-CFqH429G.css +0 -1
- package/dist/plugins/agent/ui/assets/index-nYWtX5pm.js +0 -72
- package/dist/plugins/flexipage/ui/assets/index-C2upgZns.css +0 -1
- package/dist/plugins/flexipage/ui/assets/index-hFZPLB6p.js +0 -49
- package/dist/plugins/flow/ui/assets/index-CdpIq7gH.js +0 -49
- package/dist/plugins/flow/ui/assets/index-Ckw5Ej7p.css +0 -1
- package/dist/plugins/keyvaluetable/ui/assets/index-BMYDJ7MA.js +0 -50
- package/dist/plugins/keyvaluetable/ui/assets/index-CxfJGu2l.css +0 -1
- package/dist/plugins/permissionset/ui/assets/index-DWBjNYzW.css +0 -1
- package/dist/plugins/permissionset/ui/assets/index-DilBd-cG.js +0 -49
- package/dist/plugins/schema/ui/assets/VibeEditComposer-Ce9dBbb3.js +0 -1
- package/dist/plugins/schema/ui/assets/index-DSSQ6K8b.js +0 -71
- package/dist/plugins/schema/ui/assets/index-Dsaw92BM.css +0 -1
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./VibeEditComposer-D5GykTkw.js","./VibeEditComposer-BQeSigSs.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function zf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hf={exports:{}},el={},Ff={exports:{}},oe={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var Ji=Symbol.for("react.element"),T8=Symbol.for("react.portal"),P8=Symbol.for("react.fragment"),A8=Symbol.for("react.strict_mode"),R8=Symbol.for("react.profiler"),$8=Symbol.for("react.provider"),O8=Symbol.for("react.context"),D8=Symbol.for("react.forward_ref"),V8=Symbol.for("react.suspense"),z8=Symbol.for("react.memo"),H8=Symbol.for("react.lazy"),o1=Symbol.iterator;function F8(e){return e===null||typeof e!="object"?null:(e=o1&&e[o1]||e["@@iterator"],typeof e=="function"?e:null)}var Bf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Wf=Object.assign,Uf={};function Yr(e,t,n){this.props=e,this.context=t,this.refs=Uf,this.updater=n||Bf}Yr.prototype.isReactComponent={};Yr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Zf(){}Zf.prototype=Yr.prototype;function Iu(e,t,n){this.props=e,this.context=t,this.refs=Uf,this.updater=n||Bf}var Lu=Iu.prototype=new Zf;Lu.constructor=Iu;Wf(Lu,Yr.prototype);Lu.isPureReactComponent=!0;var s1=Array.isArray,Yf=Object.prototype.hasOwnProperty,bu={current:null},Gf={key:!0,ref:!0,__self:!0,__source:!0};function Xf(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Yf.call(t,r)&&!Gf.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Ji,type:e,key:o,ref:s,props:i,_owner:bu.current}}function B8(e,t){return{$$typeof:Ji,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ju(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ji}function W8(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var l1=/\/+/g;function bl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?W8(""+e.key):t.toString(36)}function qo(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ji:case T8:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+bl(s,0):r,s1(i)?(n="",e!=null&&(n=e.replace(l1,"$&/")+"/"),qo(i,t,n,"",function(u){return u})):i!=null&&(ju(i)&&(i=B8(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(l1,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",s1(e))for(var l=0;l<e.length;l++){o=e[l];var a=r+bl(o,l);s+=qo(o,t,n,a,i)}else if(a=F8(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=r+bl(o,l++),s+=qo(o,t,n,a,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function wo(e,t,n){if(e==null)return e;var r=[],i=0;return qo(e,r,"","",function(o){return t.call(n,o,i++)}),r}function U8(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var He={current:null},Jo={transition:null},Z8={ReactCurrentDispatcher:He,ReactCurrentBatchConfig:Jo,ReactCurrentOwner:bu};function Kf(){throw Error("act(...) is not supported in production builds of React.")}oe.Children={map:wo,forEach:function(e,t,n){wo(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return wo(e,function(){t++}),t},toArray:function(e){return wo(e,function(t){return t})||[]},only:function(e){if(!ju(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=Yr;oe.Fragment=P8;oe.Profiler=R8;oe.PureComponent=Iu;oe.StrictMode=A8;oe.Suspense=V8;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z8;oe.act=Kf;oe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Wf({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=bu.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Yf.call(t,a)&&!Gf.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Ji,type:e.type,key:i,ref:o,props:r,_owner:s}};oe.createContext=function(e){return e={$$typeof:O8,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:$8,_context:e},e.Consumer=e};oe.createElement=Xf;oe.createFactory=function(e){var t=Xf.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:D8,render:e}};oe.isValidElement=ju;oe.lazy=function(e){return{$$typeof:H8,_payload:{_status:-1,_result:e},_init:U8}};oe.memo=function(e,t){return{$$typeof:z8,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=Jo.transition;Jo.transition={};try{e()}finally{Jo.transition=t}};oe.unstable_act=Kf;oe.useCallback=function(e,t){return He.current.useCallback(e,t)};oe.useContext=function(e){return He.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return He.current.useDeferredValue(e)};oe.useEffect=function(e,t){return He.current.useEffect(e,t)};oe.useId=function(){return He.current.useId()};oe.useImperativeHandle=function(e,t,n){return He.current.useImperativeHandle(e,t,n)};oe.useInsertionEffect=function(e,t){return He.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return He.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return He.current.useMemo(e,t)};oe.useReducer=function(e,t,n){return He.current.useReducer(e,t,n)};oe.useRef=function(e){return He.current.useRef(e)};oe.useState=function(e){return He.current.useState(e)};oe.useSyncExternalStore=function(e,t,n){return He.current.useSyncExternalStore(e,t,n)};oe.useTransition=function(){return He.current.useTransition()};oe.version="18.3.1";Ff.exports=oe;var V=Ff.exports;const J=zf(V);/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-jsx-runtime.production.min.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var Y8=V,G8=Symbol.for("react.element"),X8=Symbol.for("react.fragment"),K8=Object.prototype.hasOwnProperty,Q8=Y8.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,q8={key:!0,ref:!0,__self:!0,__source:!0};function Qf(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)K8.call(t,r)&&!q8.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:G8,type:e,key:o,ref:s,props:i,_owner:Q8.current}}el.Fragment=X8;el.jsx=Qf;el.jsxs=Qf;Hf.exports=el;var m=Hf.exports,ma={},qf={exports:{}},rt={},Jf={exports:{}},e0={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.min.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/(function(e){function t(S,N){var I=S.length;S.push(N);e:for(;0<I;){var R=I-1>>>1,B=S[R];if(0<i(B,N))S[R]=N,S[I]=B,I=R;else break e}}function n(S){return S.length===0?null:S[0]}function r(S){if(S.length===0)return null;var N=S[0],I=S.pop();if(I!==N){S[0]=I;e:for(var R=0,B=S.length,Z=B>>>1;R<Z;){var A=2*(R+1)-1,M=S[A],H=A+1,W=S[H];if(0>i(M,I))H<B&&0>i(W,M)?(S[R]=W,S[H]=I,R=H):(S[R]=M,S[A]=I,R=A);else if(H<B&&0>i(W,I))S[R]=W,S[H]=I,R=H;else break e}}return N}function i(S,N){var I=S.sortIndex-N.sortIndex;return I!==0?I:S.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,f=3,h=!1,y=!1,x=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(S){for(var N=n(u);N!==null;){if(N.callback===null)r(u);else if(N.startTime<=S)r(u),N.sortIndex=N.expirationTime,t(a,N);else break;N=n(u)}}function w(S){if(x=!1,g(S),!y)if(n(a)!==null)y=!0,b(k);else{var N=n(u);N!==null&&$(w,N.startTime-S)}}function k(S,N){y=!1,x&&(x=!1,v(T),T=-1),h=!0;var I=f;try{for(g(N),d=n(a);d!==null&&(!(d.expirationTime>N)||S&&!j());){var R=d.callback;if(typeof R=="function"){d.callback=null,f=d.priorityLevel;var B=R(d.expirationTime<=N);N=e.unstable_now(),typeof B=="function"?d.callback=B:d===n(a)&&r(a),g(N)}else r(a);d=n(a)}if(d!==null)var Z=!0;else{var A=n(u);A!==null&&$(w,A.startTime-N),Z=!1}return Z}finally{d=null,f=I,h=!1}}var C=!1,L=null,T=-1,F=5,P=-1;function j(){return!(e.unstable_now()-P<F)}function D(){if(L!==null){var S=e.unstable_now();P=S;var N=!0;try{N=L(!0,S)}finally{N?z():(C=!1,L=null)}}else C=!1}var z;if(typeof p=="function")z=function(){p(D)};else if(typeof MessageChannel<"u"){var E=new MessageChannel,O=E.port2;E.port1.onmessage=D,z=function(){O.postMessage(null)}}else z=function(){_(D,0)};function b(S){L=S,C||(C=!0,z())}function $(S,N){T=_(function(){S(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(S){S.callback=null},e.unstable_continueExecution=function(){y||h||(y=!0,b(k))},e.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<S?Math.floor(1e3/S):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(S){switch(f){case 1:case 2:case 3:var N=3;break;default:N=f}var I=f;f=N;try{return S()}finally{f=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(S,N){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var I=f;f=S;try{return N()}finally{f=I}},e.unstable_scheduleCallback=function(S,N,I){var R=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?R+I:R):I=R,S){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=I+B,S={id:c++,callback:N,priorityLevel:S,startTime:I,expirationTime:B,sortIndex:-1},I>R?(S.sortIndex=I,t(u,S),n(a)===null&&S===n(u)&&(x?(v(T),T=-1):x=!0,$(w,I-R))):(S.sortIndex=B,t(a,S),y||h||(y=!0,b(k))),S},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(S){var N=f;return function(){var I=f;f=N;try{return S.apply(this,arguments)}finally{f=I}}}})(e0);Jf.exports=e0;var J8=Jf.exports;/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.min.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var e4=V,tt=J8;function Q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t0=new Set,Mi={};function er(e,t){Mr(e,t),Mr(e+"Capture",t)}function Mr(e,t){for(Mi[e]=t,e=0;e<t.length;e++)t0.add(t[e])}var Yt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ya=Object.prototype.hasOwnProperty,t4=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,a1={},u1={};function n4(e){return ya.call(u1,e)?!0:ya.call(a1,e)?!1:t4.test(e)?u1[e]=!0:(a1[e]=!0,!1)}function r4(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function i4(e,t,n,r){if(t===null||typeof t>"u"||r4(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Fe(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pe[e]=new Fe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pe[t]=new Fe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pe[e]=new Fe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pe[e]=new Fe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Pe[e]=new Fe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pe[e]=new Fe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pe[e]=new Fe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pe[e]=new Fe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pe[e]=new Fe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Tu=/[\-:]([a-z])/g;function Pu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Tu,Pu);Pe[t]=new Fe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Tu,Pu);Pe[t]=new Fe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Tu,Pu);Pe[t]=new Fe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pe[e]=new Fe(e,1,!1,e.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new Fe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pe[e]=new Fe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Au(e,t,n,r){var i=Pe.hasOwnProperty(t)?Pe[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(i4(t,n,i,r)&&(n=null),r||i===null?n4(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Jt=e4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,xo=Symbol.for("react.element"),or=Symbol.for("react.portal"),sr=Symbol.for("react.fragment"),Ru=Symbol.for("react.strict_mode"),va=Symbol.for("react.profiler"),n0=Symbol.for("react.provider"),r0=Symbol.for("react.context"),$u=Symbol.for("react.forward_ref"),wa=Symbol.for("react.suspense"),xa=Symbol.for("react.suspense_list"),Ou=Symbol.for("react.memo"),un=Symbol.for("react.lazy"),i0=Symbol.for("react.offscreen"),c1=Symbol.iterator;function qr(e){return e===null||typeof e!="object"?null:(e=c1&&e[c1]||e["@@iterator"],typeof e=="function"?e:null)}var xe=Object.assign,jl;function ui(e){if(jl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);jl=t&&t[1]||""}return`
|
|
35
|
-
`+jl+e}var Tl=!1;function Pl(e,t){if(!e||Tl)return"";Tl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
36
|
-
`),o=r.stack.split(`
|
|
37
|
-
`),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var a=`
|
|
38
|
-
`+i[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{Tl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ui(e):""}function o4(e){switch(e.tag){case 5:return ui(e.type);case 16:return ui("Lazy");case 13:return ui("Suspense");case 19:return ui("SuspenseList");case 0:case 2:case 15:return e=Pl(e.type,!1),e;case 11:return e=Pl(e.type.render,!1),e;case 1:return e=Pl(e.type,!0),e;default:return""}}function Ca(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sr:return"Fragment";case or:return"Portal";case va:return"Profiler";case Ru:return"StrictMode";case wa:return"Suspense";case xa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case r0:return(e.displayName||"Context")+".Consumer";case n0:return(e._context.displayName||"Context")+".Provider";case $u:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ou:return t=e.displayName||null,t!==null?t:Ca(e.type)||"Memo";case un:t=e._payload,e=e._init;try{return Ca(e(t))}catch{}}return null}function s4(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ca(t);case 8:return t===Ru?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function kn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function o0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function l4(e){var t=o0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Co(e){e._valueTracker||(e._valueTracker=l4(e))}function s0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=o0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ys(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function _a(e,t){var n=t.checked;return xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function d1(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=kn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function l0(e,t){t=t.checked,t!=null&&Au(e,"checked",t,!1)}function Ea(e,t){l0(e,t);var n=kn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ka(e,t.type,n):t.hasOwnProperty("defaultValue")&&ka(e,t.type,kn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function f1(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ka(e,t,n){(t!=="number"||ys(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ci=Array.isArray;function wr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+kn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Sa(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return xe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function h1(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(ci(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:kn(n)}}function a0(e,t){var n=kn(t.value),r=kn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function p1(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function u0(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Na(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?u0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var _o,c0=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(_o=_o||document.createElement("div"),_o.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=_o.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ii(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var gi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},a4=["Webkit","ms","Moz","O"];Object.keys(gi).forEach(function(e){a4.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),gi[t]=gi[e]})});function d0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||gi.hasOwnProperty(e)&&gi[e]?(""+t).trim():t+"px"}function f0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=d0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var u4=xe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ma(e,t){if(t){if(u4[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Ia(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var La=null;function Du(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ba=null,xr=null,Cr=null;function g1(e){if(e=no(e)){if(typeof ba!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=ol(t),ba(e.stateNode,e.type,t))}}function h0(e){xr?Cr?Cr.push(e):Cr=[e]:xr=e}function p0(){if(xr){var e=xr,t=Cr;if(Cr=xr=null,g1(e),t)for(e=0;e<t.length;e++)g1(t[e])}}function g0(e,t){return e(t)}function m0(){}var Al=!1;function y0(e,t,n){if(Al)return e(t,n);Al=!0;try{return g0(e,t,n)}finally{Al=!1,(xr!==null||Cr!==null)&&(m0(),p0())}}function Li(e,t){var n=e.stateNode;if(n===null)return null;var r=ol(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Q(231,t,typeof n));return n}var ja=!1;if(Yt)try{var Jr={};Object.defineProperty(Jr,"passive",{get:function(){ja=!0}}),window.addEventListener("test",Jr,Jr),window.removeEventListener("test",Jr,Jr)}catch{ja=!1}function c4(e,t,n,r,i,o,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var mi=!1,vs=null,ws=!1,Ta=null,d4={onError:function(e){mi=!0,vs=e}};function f4(e,t,n,r,i,o,s,l,a){mi=!1,vs=null,c4.apply(d4,arguments)}function h4(e,t,n,r,i,o,s,l,a){if(f4.apply(this,arguments),mi){if(mi){var u=vs;mi=!1,vs=null}else throw Error(Q(198));ws||(ws=!0,Ta=u)}}function tr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function v0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m1(e){if(tr(e)!==e)throw Error(Q(188))}function p4(e){var t=e.alternate;if(!t){if(t=tr(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return m1(i),e;if(o===r)return m1(i),t;o=o.sibling}throw Error(Q(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function w0(e){return e=p4(e),e!==null?x0(e):null}function x0(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=x0(e);if(t!==null)return t;e=e.sibling}return null}var C0=tt.unstable_scheduleCallback,y1=tt.unstable_cancelCallback,g4=tt.unstable_shouldYield,m4=tt.unstable_requestPaint,_e=tt.unstable_now,y4=tt.unstable_getCurrentPriorityLevel,Vu=tt.unstable_ImmediatePriority,_0=tt.unstable_UserBlockingPriority,xs=tt.unstable_NormalPriority,v4=tt.unstable_LowPriority,E0=tt.unstable_IdlePriority,tl=null,Pt=null;function w4(e){if(Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(tl,e,void 0,(e.current.flags&128)===128)}catch{}}var kt=Math.clz32?Math.clz32:_4,x4=Math.log,C4=Math.LN2;function _4(e){return e>>>=0,e===0?32:31-(x4(e)/C4|0)|0}var Eo=64,ko=4194304;function di(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Cs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=di(l):(o&=s,o!==0&&(r=di(o)))}else s=n&~i,s!==0?r=di(s):o!==0&&(r=di(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-kt(t),i=1<<n,r|=e[n],t&=~i;return r}function E4(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function k4(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-kt(o),l=1<<s,a=i[s];a===-1?(!(l&n)||l&r)&&(i[s]=E4(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function Pa(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function k0(){var e=Eo;return Eo<<=1,!(Eo&4194240)&&(Eo=64),e}function Rl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function eo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kt(t),e[t]=n}function S4(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-kt(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function zu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-kt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ue=0;function S0(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var N0,Hu,M0,I0,L0,Aa=!1,So=[],mn=null,yn=null,vn=null,bi=new Map,ji=new Map,dn=[],N4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function v1(e,t){switch(e){case"focusin":case"focusout":mn=null;break;case"dragenter":case"dragleave":yn=null;break;case"mouseover":case"mouseout":vn=null;break;case"pointerover":case"pointerout":bi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ji.delete(t.pointerId)}}function ei(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=no(t),t!==null&&Hu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function M4(e,t,n,r,i){switch(t){case"focusin":return mn=ei(mn,e,t,n,r,i),!0;case"dragenter":return yn=ei(yn,e,t,n,r,i),!0;case"mouseover":return vn=ei(vn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return bi.set(o,ei(bi.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ji.set(o,ei(ji.get(o)||null,e,t,n,r,i)),!0}return!1}function b0(e){var t=Pn(e.target);if(t!==null){var n=tr(t);if(n!==null){if(t=n.tag,t===13){if(t=v0(n),t!==null){e.blockedOn=t,L0(e.priority,function(){M0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function es(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ra(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);La=r,n.target.dispatchEvent(r),La=null}else return t=no(n),t!==null&&Hu(t),e.blockedOn=n,!1;t.shift()}return!0}function w1(e,t,n){es(e)&&n.delete(t)}function I4(){Aa=!1,mn!==null&&es(mn)&&(mn=null),yn!==null&&es(yn)&&(yn=null),vn!==null&&es(vn)&&(vn=null),bi.forEach(w1),ji.forEach(w1)}function ti(e,t){e.blockedOn===t&&(e.blockedOn=null,Aa||(Aa=!0,tt.unstable_scheduleCallback(tt.unstable_NormalPriority,I4)))}function Ti(e){function t(i){return ti(i,e)}if(0<So.length){ti(So[0],e);for(var n=1;n<So.length;n++){var r=So[n];r.blockedOn===e&&(r.blockedOn=null)}}for(mn!==null&&ti(mn,e),yn!==null&&ti(yn,e),vn!==null&&ti(vn,e),bi.forEach(t),ji.forEach(t),n=0;n<dn.length;n++)r=dn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<dn.length&&(n=dn[0],n.blockedOn===null);)b0(n),n.blockedOn===null&&dn.shift()}var _r=Jt.ReactCurrentBatchConfig,_s=!0;function L4(e,t,n,r){var i=ue,o=_r.transition;_r.transition=null;try{ue=1,Fu(e,t,n,r)}finally{ue=i,_r.transition=o}}function b4(e,t,n,r){var i=ue,o=_r.transition;_r.transition=null;try{ue=4,Fu(e,t,n,r)}finally{ue=i,_r.transition=o}}function Fu(e,t,n,r){if(_s){var i=Ra(e,t,n,r);if(i===null)Ul(e,t,r,Es,n),v1(e,r);else if(M4(i,e,t,n,r))r.stopPropagation();else if(v1(e,r),t&4&&-1<N4.indexOf(e)){for(;i!==null;){var o=no(i);if(o!==null&&N0(o),o=Ra(e,t,n,r),o===null&&Ul(e,t,r,Es,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Ul(e,t,r,null,n)}}var Es=null;function Ra(e,t,n,r){if(Es=null,e=Du(r),e=Pn(e),e!==null)if(t=tr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=v0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Es=e,null}function j0(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(y4()){case Vu:return 1;case _0:return 4;case xs:case v4:return 16;case E0:return 536870912;default:return 16}default:return 16}}var pn=null,Bu=null,ts=null;function T0(){if(ts)return ts;var e,t=Bu,n=t.length,r,i="value"in pn?pn.value:pn.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return ts=i.slice(e,1<r?1-r:void 0)}function ns(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function No(){return!0}function x1(){return!1}function it(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?No:x1,this.isPropagationStopped=x1,this}return xe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=No)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=No)},persist:function(){},isPersistent:No}),t}var Gr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wu=it(Gr),to=xe({},Gr,{view:0,detail:0}),j4=it(to),$l,Ol,ni,nl=xe({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ni&&(ni&&e.type==="mousemove"?($l=e.screenX-ni.screenX,Ol=e.screenY-ni.screenY):Ol=$l=0,ni=e),$l)},movementY:function(e){return"movementY"in e?e.movementY:Ol}}),C1=it(nl),T4=xe({},nl,{dataTransfer:0}),P4=it(T4),A4=xe({},to,{relatedTarget:0}),Dl=it(A4),R4=xe({},Gr,{animationName:0,elapsedTime:0,pseudoElement:0}),$4=it(R4),O4=xe({},Gr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),D4=it(O4),V4=xe({},Gr,{data:0}),_1=it(V4),z4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},H4={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},F4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=F4[e])?!!t[e]:!1}function Uu(){return B4}var W4=xe({},to,{key:function(e){if(e.key){var t=z4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ns(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?H4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uu,charCode:function(e){return e.type==="keypress"?ns(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ns(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),U4=it(W4),Z4=xe({},nl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),E1=it(Z4),Y4=xe({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uu}),G4=it(Y4),X4=xe({},Gr,{propertyName:0,elapsedTime:0,pseudoElement:0}),K4=it(X4),Q4=xe({},nl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),q4=it(Q4),J4=[9,13,27,32],Zu=Yt&&"CompositionEvent"in window,yi=null;Yt&&"documentMode"in document&&(yi=document.documentMode);var e6=Yt&&"TextEvent"in window&&!yi,P0=Yt&&(!Zu||yi&&8<yi&&11>=yi),k1=" ",S1=!1;function A0(e,t){switch(e){case"keyup":return J4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function R0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var lr=!1;function t6(e,t){switch(e){case"compositionend":return R0(t);case"keypress":return t.which!==32?null:(S1=!0,k1);case"textInput":return e=t.data,e===k1&&S1?null:e;default:return null}}function n6(e,t){if(lr)return e==="compositionend"||!Zu&&A0(e,t)?(e=T0(),ts=Bu=pn=null,lr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return P0&&t.locale!=="ko"?null:t.data;default:return null}}var r6={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function N1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!r6[e.type]:t==="textarea"}function $0(e,t,n,r){h0(r),t=ks(t,"onChange"),0<t.length&&(n=new Wu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var vi=null,Pi=null;function i6(e){Y0(e,0)}function rl(e){var t=cr(e);if(s0(t))return e}function o6(e,t){if(e==="change")return t}var O0=!1;if(Yt){var Vl;if(Yt){var zl="oninput"in document;if(!zl){var M1=document.createElement("div");M1.setAttribute("oninput","return;"),zl=typeof M1.oninput=="function"}Vl=zl}else Vl=!1;O0=Vl&&(!document.documentMode||9<document.documentMode)}function I1(){vi&&(vi.detachEvent("onpropertychange",D0),Pi=vi=null)}function D0(e){if(e.propertyName==="value"&&rl(Pi)){var t=[];$0(t,Pi,e,Du(e)),y0(i6,t)}}function s6(e,t,n){e==="focusin"?(I1(),vi=t,Pi=n,vi.attachEvent("onpropertychange",D0)):e==="focusout"&&I1()}function l6(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return rl(Pi)}function a6(e,t){if(e==="click")return rl(t)}function u6(e,t){if(e==="input"||e==="change")return rl(t)}function c6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nt=typeof Object.is=="function"?Object.is:c6;function Ai(e,t){if(Nt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ya.call(t,i)||!Nt(e[i],t[i]))return!1}return!0}function L1(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function b1(e,t){var n=L1(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=L1(n)}}function V0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?V0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function z0(){for(var e=window,t=ys();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ys(e.document)}return t}function Yu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function d6(e){var t=z0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&V0(n.ownerDocument.documentElement,n)){if(r!==null&&Yu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=b1(n,o);var s=b1(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var f6=Yt&&"documentMode"in document&&11>=document.documentMode,ar=null,$a=null,wi=null,Oa=!1;function j1(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Oa||ar==null||ar!==ys(r)||(r=ar,"selectionStart"in r&&Yu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),wi&&Ai(wi,r)||(wi=r,r=ks($a,"onSelect"),0<r.length&&(t=new Wu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ar)))}function Mo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ur={animationend:Mo("Animation","AnimationEnd"),animationiteration:Mo("Animation","AnimationIteration"),animationstart:Mo("Animation","AnimationStart"),transitionend:Mo("Transition","TransitionEnd")},Hl={},H0={};Yt&&(H0=document.createElement("div").style,"AnimationEvent"in window||(delete ur.animationend.animation,delete ur.animationiteration.animation,delete ur.animationstart.animation),"TransitionEvent"in window||delete ur.transitionend.transition);function il(e){if(Hl[e])return Hl[e];if(!ur[e])return e;var t=ur[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in H0)return Hl[e]=t[n];return e}var F0=il("animationend"),B0=il("animationiteration"),W0=il("animationstart"),U0=il("transitionend"),Z0=new Map,T1="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nn(e,t){Z0.set(e,t),er(t,[e])}for(var Fl=0;Fl<T1.length;Fl++){var Bl=T1[Fl],h6=Bl.toLowerCase(),p6=Bl[0].toUpperCase()+Bl.slice(1);Nn(h6,"on"+p6)}Nn(F0,"onAnimationEnd");Nn(B0,"onAnimationIteration");Nn(W0,"onAnimationStart");Nn("dblclick","onDoubleClick");Nn("focusin","onFocus");Nn("focusout","onBlur");Nn(U0,"onTransitionEnd");Mr("onMouseEnter",["mouseout","mouseover"]);Mr("onMouseLeave",["mouseout","mouseover"]);Mr("onPointerEnter",["pointerout","pointerover"]);Mr("onPointerLeave",["pointerout","pointerover"]);er("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));er("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));er("onBeforeInput",["compositionend","keypress","textInput","paste"]);er("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));er("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));er("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),g6=new Set("cancel close invalid load scroll toggle".split(" ").concat(fi));function P1(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,h4(r,t,void 0,e),e.currentTarget=null}function Y0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==o&&i.isPropagationStopped())break e;P1(i,l,u),o=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==o&&i.isPropagationStopped())break e;P1(i,l,u),o=a}}}if(ws)throw e=Ta,ws=!1,Ta=null,e}function he(e,t){var n=t[Fa];n===void 0&&(n=t[Fa]=new Set);var r=e+"__bubble";n.has(r)||(G0(t,e,2,!1),n.add(r))}function Wl(e,t,n){var r=0;t&&(r|=4),G0(n,e,r,t)}var Io="_reactListening"+Math.random().toString(36).slice(2);function Ri(e){if(!e[Io]){e[Io]=!0,t0.forEach(function(n){n!=="selectionchange"&&(g6.has(n)||Wl(n,!1,e),Wl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Io]||(t[Io]=!0,Wl("selectionchange",!1,t))}}function G0(e,t,n,r){switch(j0(t)){case 1:var i=L4;break;case 4:i=b4;break;default:i=Fu}n=i.bind(null,t,n,e),i=void 0,!ja||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ul(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;s=s.return}for(;l!==null;){if(s=Pn(l),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}l=l.parentNode}}r=r.return}y0(function(){var u=o,c=Du(n),d=[];e:{var f=Z0.get(e);if(f!==void 0){var h=Wu,y=e;switch(e){case"keypress":if(ns(n)===0)break e;case"keydown":case"keyup":h=U4;break;case"focusin":y="focus",h=Dl;break;case"focusout":y="blur",h=Dl;break;case"beforeblur":case"afterblur":h=Dl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=C1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=P4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=G4;break;case F0:case B0:case W0:h=$4;break;case U0:h=K4;break;case"scroll":h=j4;break;case"wheel":h=q4;break;case"copy":case"cut":case"paste":h=D4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=E1}var x=(t&4)!==0,_=!x&&e==="scroll",v=x?f!==null?f+"Capture":null:f;x=[];for(var p=u,g;p!==null;){g=p;var w=g.stateNode;if(g.tag===5&&w!==null&&(g=w,v!==null&&(w=Li(p,v),w!=null&&x.push($i(p,w,g)))),_)break;p=p.return}0<x.length&&(f=new h(f,y,null,n,c),d.push({event:f,listeners:x}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==La&&(y=n.relatedTarget||n.fromElement)&&(Pn(y)||y[Gt]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?Pn(y):null,y!==null&&(_=tr(y),y!==_||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(x=C1,w="onMouseLeave",v="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(x=E1,w="onPointerLeave",v="onPointerEnter",p="pointer"),_=h==null?f:cr(h),g=y==null?f:cr(y),f=new x(w,p+"leave",h,n,c),f.target=_,f.relatedTarget=g,w=null,Pn(c)===u&&(x=new x(v,p+"enter",y,n,c),x.target=g,x.relatedTarget=_,w=x),_=w,h&&y)t:{for(x=h,v=y,p=0,g=x;g;g=rr(g))p++;for(g=0,w=v;w;w=rr(w))g++;for(;0<p-g;)x=rr(x),p--;for(;0<g-p;)v=rr(v),g--;for(;p--;){if(x===v||v!==null&&x===v.alternate)break t;x=rr(x),v=rr(v)}x=null}else x=null;h!==null&&A1(d,f,h,x,!1),y!==null&&_!==null&&A1(d,_,y,x,!0)}}e:{if(f=u?cr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var k=o6;else if(N1(f))if(O0)k=u6;else{k=l6;var C=s6}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=a6);if(k&&(k=k(e,u))){$0(d,k,n,c);break e}C&&C(e,f,u),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&ka(f,"number",f.value)}switch(C=u?cr(u):window,e){case"focusin":(N1(C)||C.contentEditable==="true")&&(ar=C,$a=u,wi=null);break;case"focusout":wi=$a=ar=null;break;case"mousedown":Oa=!0;break;case"contextmenu":case"mouseup":case"dragend":Oa=!1,j1(d,n,c);break;case"selectionchange":if(f6)break;case"keydown":case"keyup":j1(d,n,c)}var L;if(Zu)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else lr?A0(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(P0&&n.locale!=="ko"&&(lr||T!=="onCompositionStart"?T==="onCompositionEnd"&&lr&&(L=T0()):(pn=c,Bu="value"in pn?pn.value:pn.textContent,lr=!0)),C=ks(u,T),0<C.length&&(T=new _1(T,e,null,n,c),d.push({event:T,listeners:C}),L?T.data=L:(L=R0(n),L!==null&&(T.data=L)))),(L=e6?t6(e,n):n6(e,n))&&(u=ks(u,"onBeforeInput"),0<u.length&&(c=new _1("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=L))}Y0(d,t)})}function $i(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ks(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Li(e,n),o!=null&&r.unshift($i(e,o,i)),o=Li(e,t),o!=null&&r.push($i(e,o,i))),e=e.return}return r}function rr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function A1(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,i?(a=Li(n,o),a!=null&&s.unshift($i(n,a,l))):i||(a=Li(n,o),a!=null&&s.push($i(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var m6=/\r\n?/g,y6=/\u0000|\uFFFD/g;function R1(e){return(typeof e=="string"?e:""+e).replace(m6,`
|
|
39
|
-
`).replace(y6,"")}function Lo(e,t,n){if(t=R1(t),R1(e)!==t&&n)throw Error(Q(425))}function Ss(){}var Da=null,Va=null;function za(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ha=typeof setTimeout=="function"?setTimeout:void 0,v6=typeof clearTimeout=="function"?clearTimeout:void 0,$1=typeof Promise=="function"?Promise:void 0,w6=typeof queueMicrotask=="function"?queueMicrotask:typeof $1<"u"?function(e){return $1.resolve(null).then(e).catch(x6)}:Ha;function x6(e){setTimeout(function(){throw e})}function Zl(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Ti(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ti(t)}function wn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function O1(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Xr=Math.random().toString(36).slice(2),Tt="__reactFiber$"+Xr,Oi="__reactProps$"+Xr,Gt="__reactContainer$"+Xr,Fa="__reactEvents$"+Xr,C6="__reactListeners$"+Xr,_6="__reactHandles$"+Xr;function Pn(e){var t=e[Tt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Gt]||n[Tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=O1(e);e!==null;){if(n=e[Tt])return n;e=O1(e)}return t}e=n,n=e.parentNode}return null}function no(e){return e=e[Tt]||e[Gt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function cr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function ol(e){return e[Oi]||null}var Ba=[],dr=-1;function Mn(e){return{current:e}}function pe(e){0>dr||(e.current=Ba[dr],Ba[dr]=null,dr--)}function de(e,t){dr++,Ba[dr]=e.current,e.current=t}var Sn={},De=Mn(Sn),Ge=Mn(!1),Bn=Sn;function Ir(e,t){var n=e.type.contextTypes;if(!n)return Sn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Xe(e){return e=e.childContextTypes,e!=null}function Ns(){pe(Ge),pe(De)}function D1(e,t,n){if(De.current!==Sn)throw Error(Q(168));de(De,t),de(Ge,n)}function X0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Q(108,s4(e)||"Unknown",i));return xe({},n,r)}function Ms(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sn,Bn=De.current,de(De,e),de(Ge,Ge.current),!0}function V1(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=X0(e,t,Bn),r.__reactInternalMemoizedMergedChildContext=e,pe(Ge),pe(De),de(De,e)):pe(Ge),de(Ge,n)}var Ft=null,sl=!1,Yl=!1;function K0(e){Ft===null?Ft=[e]:Ft.push(e)}function E6(e){sl=!0,K0(e)}function In(){if(!Yl&&Ft!==null){Yl=!0;var e=0,t=ue;try{var n=Ft;for(ue=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ft=null,sl=!1}catch(i){throw Ft!==null&&(Ft=Ft.slice(e+1)),C0(Vu,In),i}finally{ue=t,Yl=!1}}return null}var fr=[],hr=0,Is=null,Ls=0,lt=[],at=0,Wn=null,Bt=1,Wt="";function bn(e,t){fr[hr++]=Ls,fr[hr++]=Is,Is=e,Ls=t}function Q0(e,t,n){lt[at++]=Bt,lt[at++]=Wt,lt[at++]=Wn,Wn=e;var r=Bt;e=Wt;var i=32-kt(r)-1;r&=~(1<<i),n+=1;var o=32-kt(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Bt=1<<32-kt(t)+i|n<<i|r,Wt=o+e}else Bt=1<<o|n<<i|r,Wt=e}function Gu(e){e.return!==null&&(bn(e,1),Q0(e,1,0))}function Xu(e){for(;e===Is;)Is=fr[--hr],fr[hr]=null,Ls=fr[--hr],fr[hr]=null;for(;e===Wn;)Wn=lt[--at],lt[at]=null,Wt=lt[--at],lt[at]=null,Bt=lt[--at],lt[at]=null}var et=null,Je=null,me=!1,wt=null;function q0(e,t){var n=ut(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function z1(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,et=e,Je=wn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,et=e,Je=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Wn!==null?{id:Bt,overflow:Wt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ut(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,et=e,Je=null,!0):!1;default:return!1}}function Wa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ua(e){if(me){var t=Je;if(t){var n=t;if(!z1(e,t)){if(Wa(e))throw Error(Q(418));t=wn(n.nextSibling);var r=et;t&&z1(e,t)?q0(r,n):(e.flags=e.flags&-4097|2,me=!1,et=e)}}else{if(Wa(e))throw Error(Q(418));e.flags=e.flags&-4097|2,me=!1,et=e}}}function H1(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;et=e}function bo(e){if(e!==et)return!1;if(!me)return H1(e),me=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!za(e.type,e.memoizedProps)),t&&(t=Je)){if(Wa(e))throw J0(),Error(Q(418));for(;t;)q0(e,t),t=wn(t.nextSibling)}if(H1(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Je=wn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Je=null}}else Je=et?wn(e.stateNode.nextSibling):null;return!0}function J0(){for(var e=Je;e;)e=wn(e.nextSibling)}function Lr(){Je=et=null,me=!1}function Ku(e){wt===null?wt=[e]:wt.push(e)}var k6=Jt.ReactCurrentBatchConfig;function ri(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Q(309));var r=n.stateNode}if(!r)throw Error(Q(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var l=i.refs;s===null?delete l[o]:l[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function jo(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function F1(e){var t=e._init;return t(e._payload)}function e2(e){function t(v,p){if(e){var g=v.deletions;g===null?(v.deletions=[p],v.flags|=16):g.push(p)}}function n(v,p){if(!e)return null;for(;p!==null;)t(v,p),p=p.sibling;return null}function r(v,p){for(v=new Map;p!==null;)p.key!==null?v.set(p.key,p):v.set(p.index,p),p=p.sibling;return v}function i(v,p){return v=En(v,p),v.index=0,v.sibling=null,v}function o(v,p,g){return v.index=g,e?(g=v.alternate,g!==null?(g=g.index,g<p?(v.flags|=2,p):g):(v.flags|=2,p)):(v.flags|=1048576,p)}function s(v){return e&&v.alternate===null&&(v.flags|=2),v}function l(v,p,g,w){return p===null||p.tag!==6?(p=ea(g,v.mode,w),p.return=v,p):(p=i(p,g),p.return=v,p)}function a(v,p,g,w){var k=g.type;return k===sr?c(v,p,g.props.children,w,g.key):p!==null&&(p.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===un&&F1(k)===p.type)?(w=i(p,g.props),w.ref=ri(v,p,g),w.return=v,w):(w=us(g.type,g.key,g.props,null,v.mode,w),w.ref=ri(v,p,g),w.return=v,w)}function u(v,p,g,w){return p===null||p.tag!==4||p.stateNode.containerInfo!==g.containerInfo||p.stateNode.implementation!==g.implementation?(p=ta(g,v.mode,w),p.return=v,p):(p=i(p,g.children||[]),p.return=v,p)}function c(v,p,g,w,k){return p===null||p.tag!==7?(p=Vn(g,v.mode,w,k),p.return=v,p):(p=i(p,g),p.return=v,p)}function d(v,p,g){if(typeof p=="string"&&p!==""||typeof p=="number")return p=ea(""+p,v.mode,g),p.return=v,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case xo:return g=us(p.type,p.key,p.props,null,v.mode,g),g.ref=ri(v,null,p),g.return=v,g;case or:return p=ta(p,v.mode,g),p.return=v,p;case un:var w=p._init;return d(v,w(p._payload),g)}if(ci(p)||qr(p))return p=Vn(p,v.mode,g,null),p.return=v,p;jo(v,p)}return null}function f(v,p,g,w){var k=p!==null?p.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return k!==null?null:l(v,p,""+g,w);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case xo:return g.key===k?a(v,p,g,w):null;case or:return g.key===k?u(v,p,g,w):null;case un:return k=g._init,f(v,p,k(g._payload),w)}if(ci(g)||qr(g))return k!==null?null:c(v,p,g,w,null);jo(v,g)}return null}function h(v,p,g,w,k){if(typeof w=="string"&&w!==""||typeof w=="number")return v=v.get(g)||null,l(p,v,""+w,k);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case xo:return v=v.get(w.key===null?g:w.key)||null,a(p,v,w,k);case or:return v=v.get(w.key===null?g:w.key)||null,u(p,v,w,k);case un:var C=w._init;return h(v,p,g,C(w._payload),k)}if(ci(w)||qr(w))return v=v.get(g)||null,c(p,v,w,k,null);jo(p,w)}return null}function y(v,p,g,w){for(var k=null,C=null,L=p,T=p=0,F=null;L!==null&&T<g.length;T++){L.index>T?(F=L,L=null):F=L.sibling;var P=f(v,L,g[T],w);if(P===null){L===null&&(L=F);break}e&&L&&P.alternate===null&&t(v,L),p=o(P,p,T),C===null?k=P:C.sibling=P,C=P,L=F}if(T===g.length)return n(v,L),me&&bn(v,T),k;if(L===null){for(;T<g.length;T++)L=d(v,g[T],w),L!==null&&(p=o(L,p,T),C===null?k=L:C.sibling=L,C=L);return me&&bn(v,T),k}for(L=r(v,L);T<g.length;T++)F=h(L,v,T,g[T],w),F!==null&&(e&&F.alternate!==null&&L.delete(F.key===null?T:F.key),p=o(F,p,T),C===null?k=F:C.sibling=F,C=F);return e&&L.forEach(function(j){return t(v,j)}),me&&bn(v,T),k}function x(v,p,g,w){var k=qr(g);if(typeof k!="function")throw Error(Q(150));if(g=k.call(g),g==null)throw Error(Q(151));for(var C=k=null,L=p,T=p=0,F=null,P=g.next();L!==null&&!P.done;T++,P=g.next()){L.index>T?(F=L,L=null):F=L.sibling;var j=f(v,L,P.value,w);if(j===null){L===null&&(L=F);break}e&&L&&j.alternate===null&&t(v,L),p=o(j,p,T),C===null?k=j:C.sibling=j,C=j,L=F}if(P.done)return n(v,L),me&&bn(v,T),k;if(L===null){for(;!P.done;T++,P=g.next())P=d(v,P.value,w),P!==null&&(p=o(P,p,T),C===null?k=P:C.sibling=P,C=P);return me&&bn(v,T),k}for(L=r(v,L);!P.done;T++,P=g.next())P=h(L,v,T,P.value,w),P!==null&&(e&&P.alternate!==null&&L.delete(P.key===null?T:P.key),p=o(P,p,T),C===null?k=P:C.sibling=P,C=P);return e&&L.forEach(function(D){return t(v,D)}),me&&bn(v,T),k}function _(v,p,g,w){if(typeof g=="object"&&g!==null&&g.type===sr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case xo:e:{for(var k=g.key,C=p;C!==null;){if(C.key===k){if(k=g.type,k===sr){if(C.tag===7){n(v,C.sibling),p=i(C,g.props.children),p.return=v,v=p;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===un&&F1(k)===C.type){n(v,C.sibling),p=i(C,g.props),p.ref=ri(v,C,g),p.return=v,v=p;break e}n(v,C);break}else t(v,C);C=C.sibling}g.type===sr?(p=Vn(g.props.children,v.mode,w,g.key),p.return=v,v=p):(w=us(g.type,g.key,g.props,null,v.mode,w),w.ref=ri(v,p,g),w.return=v,v=w)}return s(v);case or:e:{for(C=g.key;p!==null;){if(p.key===C)if(p.tag===4&&p.stateNode.containerInfo===g.containerInfo&&p.stateNode.implementation===g.implementation){n(v,p.sibling),p=i(p,g.children||[]),p.return=v,v=p;break e}else{n(v,p);break}else t(v,p);p=p.sibling}p=ta(g,v.mode,w),p.return=v,v=p}return s(v);case un:return C=g._init,_(v,p,C(g._payload),w)}if(ci(g))return y(v,p,g,w);if(qr(g))return x(v,p,g,w);jo(v,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,p!==null&&p.tag===6?(n(v,p.sibling),p=i(p,g),p.return=v,v=p):(n(v,p),p=ea(g,v.mode,w),p.return=v,v=p),s(v)):n(v,p)}return _}var br=e2(!0),t2=e2(!1),bs=Mn(null),js=null,pr=null,Qu=null;function qu(){Qu=pr=js=null}function Ju(e){var t=bs.current;pe(bs),e._currentValue=t}function Za(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Er(e,t){js=e,Qu=pr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ze=!0),e.firstContext=null)}function ft(e){var t=e._currentValue;if(Qu!==e)if(e={context:e,memoizedValue:t,next:null},pr===null){if(js===null)throw Error(Q(308));pr=e,js.dependencies={lanes:0,firstContext:e}}else pr=pr.next=e;return t}var An=null;function ec(e){An===null?An=[e]:An.push(e)}function n2(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ec(t)):(n.next=i.next,i.next=n),t.interleaved=n,Xt(e,r)}function Xt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var cn=!1;function tc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function r2(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Zt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Xt(e,n)}return i=r.interleaved,i===null?(t.next=t,ec(r)):(t.next=i.next,i.next=t),r.interleaved=t,Xt(e,n)}function rs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zu(e,n)}}function B1(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ts(e,t,n,r){var i=e.updateQueue;cn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?o=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(o!==null){var d=i.baseState;s=0,c=u=a=null,l=o;do{var f=l.lane,h=l.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,x=l;switch(f=t,h=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){d=y.call(h,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,f=typeof y=="function"?y.call(h,d,f):y,f==null)break e;d=xe({},d,f);break e;case 2:cn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[l]:f.push(l))}else h={eventTime:h,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=h,a=d):c=c.next=h,s|=f;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;f=l,l=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Zn|=s,e.lanes=s,e.memoizedState=d}}function W1(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Q(191,i));i.call(r)}}}var ro={},At=Mn(ro),Di=Mn(ro),Vi=Mn(ro);function Rn(e){if(e===ro)throw Error(Q(174));return e}function nc(e,t){switch(de(Vi,t),de(Di,e),de(At,ro),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Na(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Na(t,e)}pe(At),de(At,t)}function jr(){pe(At),pe(Di),pe(Vi)}function i2(e){Rn(Vi.current);var t=Rn(At.current),n=Na(t,e.type);t!==n&&(de(Di,e),de(At,n))}function rc(e){Di.current===e&&(pe(At),pe(Di))}var ve=Mn(0);function Ps(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Gl=[];function ic(){for(var e=0;e<Gl.length;e++)Gl[e]._workInProgressVersionPrimary=null;Gl.length=0}var is=Jt.ReactCurrentDispatcher,Xl=Jt.ReactCurrentBatchConfig,Un=0,we=null,Ne=null,Le=null,As=!1,xi=!1,zi=0,S6=0;function Ae(){throw Error(Q(321))}function oc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Nt(e[n],t[n]))return!1;return!0}function sc(e,t,n,r,i,o){if(Un=o,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,is.current=e===null||e.memoizedState===null?L6:b6,e=n(r,i),xi){o=0;do{if(xi=!1,zi=0,25<=o)throw Error(Q(301));o+=1,Le=Ne=null,t.updateQueue=null,is.current=j6,e=n(r,i)}while(xi)}if(is.current=Rs,t=Ne!==null&&Ne.next!==null,Un=0,Le=Ne=we=null,As=!1,t)throw Error(Q(300));return e}function lc(){var e=zi!==0;return zi=0,e}function bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?we.memoizedState=Le=e:Le=Le.next=e,Le}function ht(){if(Ne===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=Le===null?we.memoizedState:Le.next;if(t!==null)Le=t,Ne=e;else{if(e===null)throw Error(Q(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Le===null?we.memoizedState=Le=e:Le=Le.next=e}return Le}function Hi(e,t){return typeof t=="function"?t(e):t}function Kl(e){var t=ht(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=Ne,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,a=null,u=o;do{var c=u.lane;if((Un&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=d,s=r):a=a.next=d,we.lanes|=c,Zn|=c}u=u.next}while(u!==null&&u!==o);a===null?s=r:a.next=l,Nt(r,t.memoizedState)||(Ze=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,we.lanes|=o,Zn|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ql(e){var t=ht(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Nt(o,t.memoizedState)||(Ze=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function o2(){}function s2(e,t){var n=we,r=ht(),i=t(),o=!Nt(r.memoizedState,i);if(o&&(r.memoizedState=i,Ze=!0),r=r.queue,ac(u2.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Le!==null&&Le.memoizedState.tag&1){if(n.flags|=2048,Fi(9,a2.bind(null,n,r,i,t),void 0,null),be===null)throw Error(Q(349));Un&30||l2(n,t,i)}return i}function l2(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function a2(e,t,n,r){t.value=n,t.getSnapshot=r,c2(t)&&d2(e)}function u2(e,t,n){return n(function(){c2(t)&&d2(e)})}function c2(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Nt(e,n)}catch{return!0}}function d2(e){var t=Xt(e,1);t!==null&&St(t,e,1,-1)}function U1(e){var t=bt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hi,lastRenderedState:e},t.queue=e,e=e.dispatch=I6.bind(null,we,e),[t.memoizedState,e]}function Fi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function f2(){return ht().memoizedState}function os(e,t,n,r){var i=bt();we.flags|=e,i.memoizedState=Fi(1|t,n,void 0,r===void 0?null:r)}function ll(e,t,n,r){var i=ht();r=r===void 0?null:r;var o=void 0;if(Ne!==null){var s=Ne.memoizedState;if(o=s.destroy,r!==null&&oc(r,s.deps)){i.memoizedState=Fi(t,n,o,r);return}}we.flags|=e,i.memoizedState=Fi(1|t,n,o,r)}function Z1(e,t){return os(8390656,8,e,t)}function ac(e,t){return ll(2048,8,e,t)}function h2(e,t){return ll(4,2,e,t)}function p2(e,t){return ll(4,4,e,t)}function g2(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function m2(e,t,n){return n=n!=null?n.concat([e]):null,ll(4,4,g2.bind(null,t,e),n)}function uc(){}function y2(e,t){var n=ht();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&oc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function v2(e,t){var n=ht();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&oc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function w2(e,t,n){return Un&21?(Nt(n,t)||(n=k0(),we.lanes|=n,Zn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ze=!0),e.memoizedState=n)}function N6(e,t){var n=ue;ue=n!==0&&4>n?n:4,e(!0);var r=Xl.transition;Xl.transition={};try{e(!1),t()}finally{ue=n,Xl.transition=r}}function x2(){return ht().memoizedState}function M6(e,t,n){var r=_n(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},C2(e))_2(t,n);else if(n=n2(e,t,n,r),n!==null){var i=ze();St(n,e,r,i),E2(n,t,r)}}function I6(e,t,n){var r=_n(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(C2(e))_2(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,Nt(l,s)){var a=t.interleaved;a===null?(i.next=i,ec(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=n2(e,t,i,r),n!==null&&(i=ze(),St(n,e,r,i),E2(n,t,r))}}function C2(e){var t=e.alternate;return e===we||t!==null&&t===we}function _2(e,t){xi=As=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function E2(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zu(e,n)}}var Rs={readContext:ft,useCallback:Ae,useContext:Ae,useEffect:Ae,useImperativeHandle:Ae,useInsertionEffect:Ae,useLayoutEffect:Ae,useMemo:Ae,useReducer:Ae,useRef:Ae,useState:Ae,useDebugValue:Ae,useDeferredValue:Ae,useTransition:Ae,useMutableSource:Ae,useSyncExternalStore:Ae,useId:Ae,unstable_isNewReconciler:!1},L6={readContext:ft,useCallback:function(e,t){return bt().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:Z1,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,os(4194308,4,g2.bind(null,t,e),n)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){return os(4,2,e,t)},useMemo:function(e,t){var n=bt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=M6.bind(null,we,e),[r.memoizedState,e]},useRef:function(e){var t=bt();return e={current:e},t.memoizedState=e},useState:U1,useDebugValue:uc,useDeferredValue:function(e){return bt().memoizedState=e},useTransition:function(){var e=U1(!1),t=e[0];return e=N6.bind(null,e[1]),bt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=we,i=bt();if(me){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),be===null)throw Error(Q(349));Un&30||l2(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Z1(u2.bind(null,r,o,e),[e]),r.flags|=2048,Fi(9,a2.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=bt(),t=be.identifierPrefix;if(me){var n=Wt,r=Bt;n=(r&~(1<<32-kt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=S6++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},b6={readContext:ft,useCallback:y2,useContext:ft,useEffect:ac,useImperativeHandle:m2,useInsertionEffect:h2,useLayoutEffect:p2,useMemo:v2,useReducer:Kl,useRef:f2,useState:function(){return Kl(Hi)},useDebugValue:uc,useDeferredValue:function(e){var t=ht();return w2(t,Ne.memoizedState,e)},useTransition:function(){var e=Kl(Hi)[0],t=ht().memoizedState;return[e,t]},useMutableSource:o2,useSyncExternalStore:s2,useId:x2,unstable_isNewReconciler:!1},j6={readContext:ft,useCallback:y2,useContext:ft,useEffect:ac,useImperativeHandle:m2,useInsertionEffect:h2,useLayoutEffect:p2,useMemo:v2,useReducer:Ql,useRef:f2,useState:function(){return Ql(Hi)},useDebugValue:uc,useDeferredValue:function(e){var t=ht();return Ne===null?t.memoizedState=e:w2(t,Ne.memoizedState,e)},useTransition:function(){var e=Ql(Hi)[0],t=ht().memoizedState;return[e,t]},useMutableSource:o2,useSyncExternalStore:s2,useId:x2,unstable_isNewReconciler:!1};function gt(e,t){if(e&&e.defaultProps){t=xe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ya(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:xe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var al={isMounted:function(e){return(e=e._reactInternals)?tr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ze(),i=_n(e),o=Zt(r,i);o.payload=t,n!=null&&(o.callback=n),t=xn(e,o,i),t!==null&&(St(t,e,i,r),rs(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ze(),i=_n(e),o=Zt(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=xn(e,o,i),t!==null&&(St(t,e,i,r),rs(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ze(),r=_n(e),i=Zt(n,r);i.tag=2,t!=null&&(i.callback=t),t=xn(e,i,r),t!==null&&(St(t,e,r,n),rs(t,e,r))}};function Y1(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!Ai(n,r)||!Ai(i,o):!0}function k2(e,t,n){var r=!1,i=Sn,o=t.contextType;return typeof o=="object"&&o!==null?o=ft(o):(i=Xe(t)?Bn:De.current,r=t.contextTypes,o=(r=r!=null)?Ir(e,i):Sn),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=al,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function G1(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&al.enqueueReplaceState(t,t.state,null)}function Ga(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},tc(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=ft(o):(o=Xe(t)?Bn:De.current,i.context=Ir(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Ya(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&al.enqueueReplaceState(i,i.state,null),Ts(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Tr(e,t){try{var n="",r=t;do n+=o4(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
40
|
-
Error generating stack: `+o.message+`
|
|
41
|
-
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function ql(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Xa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var T6=typeof WeakMap=="function"?WeakMap:Map;function S2(e,t,n){n=Zt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Os||(Os=!0,ou=r),Xa(e,t)},n}function N2(e,t,n){n=Zt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Xa(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Xa(e,t),typeof r!="function"&&(Cn===null?Cn=new Set([this]):Cn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function X1(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new T6;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Z6.bind(null,e,t,n),t.then(e,e))}function K1(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Q1(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Zt(-1,1),t.tag=2,xn(n,t,1))),n.lanes|=1),e)}var P6=Jt.ReactCurrentOwner,Ze=!1;function Ve(e,t,n,r){t.child=e===null?t2(t,null,n,r):br(t,e.child,n,r)}function q1(e,t,n,r,i){n=n.render;var o=t.ref;return Er(t,i),r=sc(e,t,n,r,o,i),n=lc(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Kt(e,t,i)):(me&&n&&Gu(t),t.flags|=1,Ve(e,t,r,i),t.child)}function J1(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!yc(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,M2(e,t,o,r,i)):(e=us(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ai,n(s,r)&&e.ref===t.ref)return Kt(e,t,i)}return t.flags|=1,e=En(o,r),e.ref=t.ref,e.return=t,t.child=e}function M2(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Ai(o,r)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Ze=!0);else return t.lanes=e.lanes,Kt(e,t,i)}return Ka(e,t,n,r,i)}function I2(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(mr,Qe),Qe|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(mr,Qe),Qe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,de(mr,Qe),Qe|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,de(mr,Qe),Qe|=r;return Ve(e,t,i,n),t.child}function L2(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ka(e,t,n,r,i){var o=Xe(n)?Bn:De.current;return o=Ir(t,o),Er(t,i),n=sc(e,t,n,r,o,i),r=lc(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Kt(e,t,i)):(me&&r&&Gu(t),t.flags|=1,Ve(e,t,n,i),t.child)}function ed(e,t,n,r,i){if(Xe(n)){var o=!0;Ms(t)}else o=!1;if(Er(t,i),t.stateNode===null)ss(e,t),k2(t,n,r),Ga(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=ft(u):(u=Xe(n)?Bn:De.current,u=Ir(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&G1(t,s,r,u),cn=!1;var f=t.memoizedState;s.state=f,Ts(t,r,s,i),a=t.memoizedState,l!==r||f!==a||Ge.current||cn?(typeof c=="function"&&(Ya(t,n,c,r),a=t.memoizedState),(l=cn||Y1(t,n,l,r,f,a,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,r2(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:gt(t.type,l),s.props=u,d=t.pendingProps,f=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=ft(a):(a=Xe(n)?Bn:De.current,a=Ir(t,a));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||f!==a)&&G1(t,s,r,a),cn=!1,f=t.memoizedState,s.state=f,Ts(t,r,s,i);var y=t.memoizedState;l!==d||f!==y||Ge.current||cn?(typeof h=="function"&&(Ya(t,n,h,r),y=t.memoizedState),(u=cn||Y1(t,n,u,r,f,y,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Qa(e,t,n,r,o,i)}function Qa(e,t,n,r,i,o){L2(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&V1(t,n,!1),Kt(e,t,o);r=t.stateNode,P6.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=br(t,e.child,null,o),t.child=br(t,null,l,o)):Ve(e,t,l,o),t.memoizedState=r.state,i&&V1(t,n,!0),t.child}function b2(e){var t=e.stateNode;t.pendingContext?D1(e,t.pendingContext,t.pendingContext!==t.context):t.context&&D1(e,t.context,!1),nc(e,t.containerInfo)}function td(e,t,n,r,i){return Lr(),Ku(i),t.flags|=256,Ve(e,t,n,r),t.child}var qa={dehydrated:null,treeContext:null,retryLane:0};function Ja(e){return{baseLanes:e,cachePool:null,transitions:null}}function j2(e,t,n){var r=t.pendingProps,i=ve.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),de(ve,i&1),e===null)return Ua(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=dl(s,r,0,null),e=Vn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ja(n),t.memoizedState=qa,e):cc(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return A6(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=En(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=En(l,o):(o=Vn(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Ja(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=qa,r}return o=e.child,e=o.sibling,r=En(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function cc(e,t){return t=dl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function To(e,t,n,r){return r!==null&&Ku(r),br(t,e.child,null,n),e=cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function A6(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=ql(Error(Q(422))),To(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=dl({mode:"visible",children:r.children},i,0,null),o=Vn(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&br(t,e.child,null,s),t.child.memoizedState=Ja(s),t.memoizedState=qa,o);if(!(t.mode&1))return To(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(Q(419)),r=ql(o,r,void 0),To(e,t,s,r)}if(l=(s&e.childLanes)!==0,Ze||l){if(r=be,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Xt(e,i),St(r,e,i,-1))}return mc(),r=ql(Error(Q(421))),To(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Y6.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Je=wn(i.nextSibling),et=t,me=!0,wt=null,e!==null&&(lt[at++]=Bt,lt[at++]=Wt,lt[at++]=Wn,Bt=e.id,Wt=e.overflow,Wn=t),t=cc(t,r.children),t.flags|=4096,t)}function nd(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Za(e.return,t,n)}function Jl(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function T2(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ve(e,t,r.children,n),r=ve.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nd(e,n,t);else if(e.tag===19)nd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(de(ve,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ps(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Jl(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ps(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Jl(t,!0,n,null,o);break;case"together":Jl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ss(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Kt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=En(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=En(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function R6(e,t,n){switch(t.tag){case 3:b2(t),Lr();break;case 5:i2(t);break;case 1:Xe(t.type)&&Ms(t);break;case 4:nc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(bs,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(de(ve,ve.current&1),t.flags|=128,null):n&t.child.childLanes?j2(e,t,n):(de(ve,ve.current&1),e=Kt(e,t,n),e!==null?e.sibling:null);de(ve,ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return T2(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),de(ve,ve.current),r)break;return null;case 22:case 23:return t.lanes=0,I2(e,t,n)}return Kt(e,t,n)}var P2,eu,A2,R2;P2=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};eu=function(){};A2=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Rn(At.current);var o=null;switch(n){case"input":i=_a(e,i),r=_a(e,r),o=[];break;case"select":i=xe({},i,{value:void 0}),r=xe({},r,{value:void 0}),o=[];break;case"textarea":i=Sa(e,i),r=Sa(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ss)}Ma(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Mi.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Mi.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&he("scroll",e),o||l===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};R2=function(e,t,n,r){n!==r&&(t.flags|=4)};function ii(e,t){if(!me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function $6(e,t,n){var r=t.pendingProps;switch(Xu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Xe(t.type)&&Ns(),Re(t),null;case 3:return r=t.stateNode,jr(),pe(Ge),pe(De),ic(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(bo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,wt!==null&&(au(wt),wt=null))),eu(e,t),Re(t),null;case 5:rc(t);var i=Rn(Vi.current);if(n=t.type,e!==null&&t.stateNode!=null)A2(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return Re(t),null}if(e=Rn(At.current),bo(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Tt]=t,r[Oi]=o,e=(t.mode&1)!==0,n){case"dialog":he("cancel",r),he("close",r);break;case"iframe":case"object":case"embed":he("load",r);break;case"video":case"audio":for(i=0;i<fi.length;i++)he(fi[i],r);break;case"source":he("error",r);break;case"img":case"image":case"link":he("error",r),he("load",r);break;case"details":he("toggle",r);break;case"input":d1(r,o),he("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},he("invalid",r);break;case"textarea":h1(r,o),he("invalid",r)}Ma(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&Lo(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&Lo(r.textContent,l,e),i=["children",""+l]):Mi.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&he("scroll",r)}switch(n){case"input":Co(r),f1(r,o,!0);break;case"textarea":Co(r),p1(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Ss)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=u0(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Tt]=t,e[Oi]=r,P2(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ia(n,r),n){case"dialog":he("cancel",e),he("close",e),i=r;break;case"iframe":case"object":case"embed":he("load",e),i=r;break;case"video":case"audio":for(i=0;i<fi.length;i++)he(fi[i],e);i=r;break;case"source":he("error",e),i=r;break;case"img":case"image":case"link":he("error",e),he("load",e),i=r;break;case"details":he("toggle",e),i=r;break;case"input":d1(e,r),i=_a(e,r),he("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=xe({},r,{value:void 0}),he("invalid",e);break;case"textarea":h1(e,r),i=Sa(e,r),he("invalid",e);break;default:i=r}Ma(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?f0(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&c0(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Ii(e,a):typeof a=="number"&&Ii(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Mi.hasOwnProperty(o)?a!=null&&o==="onScroll"&&he("scroll",e):a!=null&&Au(e,o,a,s))}switch(n){case"input":Co(e),f1(e,r,!1);break;case"textarea":Co(e),p1(e);break;case"option":r.value!=null&&e.setAttribute("value",""+kn(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?wr(e,!!r.multiple,o,!1):r.defaultValue!=null&&wr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ss)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Re(t),null;case 6:if(e&&t.stateNode!=null)R2(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=Rn(Vi.current),Rn(At.current),bo(t)){if(r=t.stateNode,n=t.memoizedProps,r[Tt]=t,(o=r.nodeValue!==n)&&(e=et,e!==null))switch(e.tag){case 3:Lo(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Lo(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Tt]=t,t.stateNode=r}return Re(t),null;case 13:if(pe(ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(me&&Je!==null&&t.mode&1&&!(t.flags&128))J0(),Lr(),t.flags|=98560,o=!1;else if(o=bo(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Q(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Q(317));o[Tt]=t}else Lr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Re(t),o=!1}else wt!==null&&(au(wt),wt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ve.current&1?Me===0&&(Me=3):mc())),t.updateQueue!==null&&(t.flags|=4),Re(t),null);case 4:return jr(),eu(e,t),e===null&&Ri(t.stateNode.containerInfo),Re(t),null;case 10:return Ju(t.type._context),Re(t),null;case 17:return Xe(t.type)&&Ns(),Re(t),null;case 19:if(pe(ve),o=t.memoizedState,o===null)return Re(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)ii(o,!1);else{if(Me!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Ps(e),s!==null){for(t.flags|=128,ii(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(ve,ve.current&1|2),t.child}e=e.sibling}o.tail!==null&&_e()>Pr&&(t.flags|=128,r=!0,ii(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ps(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ii(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!me)return Re(t),null}else 2*_e()-o.renderingStartTime>Pr&&n!==1073741824&&(t.flags|=128,r=!0,ii(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=_e(),t.sibling=null,n=ve.current,de(ve,r?n&1|2:n&1),t):(Re(t),null);case 22:case 23:return gc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Qe&1073741824&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function O6(e,t){switch(Xu(t),t.tag){case 1:return Xe(t.type)&&Ns(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jr(),pe(Ge),pe(De),ic(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return rc(t),null;case 13:if(pe(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Lr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ve),null;case 4:return jr(),null;case 10:return Ju(t.type._context),null;case 22:case 23:return gc(),null;case 24:return null;default:return null}}var Po=!1,Oe=!1,D6=typeof WeakSet=="function"?WeakSet:Set,ee=null;function gr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ce(e,t,r)}else n.current=null}function tu(e,t,n){try{n()}catch(r){Ce(e,t,r)}}var rd=!1;function V6(e,t){if(Da=_s,e=z0(),Yu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(l=s+i),d!==o||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(l=s),f===o&&++c===r&&(a=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Va={focusedElem:e,selectionRange:n},_s=!1,ee=t;ee!==null;)if(t=ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ee=e;else for(;ee!==null;){t=ee;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,_=y.memoizedState,v=t.stateNode,p=v.getSnapshotBeforeUpdate(t.elementType===t.type?x:gt(t.type,x),_);v.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(w){Ce(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ee=e;break}ee=t.return}return y=rd,rd=!1,y}function Ci(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&tu(t,n,o)}i=i.next}while(i!==r)}}function ul(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function nu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $2(e){var t=e.alternate;t!==null&&(e.alternate=null,$2(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Tt],delete t[Oi],delete t[Fa],delete t[C6],delete t[_6])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function O2(e){return e.tag===5||e.tag===3||e.tag===4}function id(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||O2(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ru(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ss));else if(r!==4&&(e=e.child,e!==null))for(ru(e,t,n),e=e.sibling;e!==null;)ru(e,t,n),e=e.sibling}function iu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(iu(e,t,n),e=e.sibling;e!==null;)iu(e,t,n),e=e.sibling}var je=null,yt=!1;function sn(e,t,n){for(n=n.child;n!==null;)D2(e,t,n),n=n.sibling}function D2(e,t,n){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(tl,n)}catch{}switch(n.tag){case 5:Oe||gr(n,t);case 6:var r=je,i=yt;je=null,sn(e,t,n),je=r,yt=i,je!==null&&(yt?(e=je,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):je.removeChild(n.stateNode));break;case 18:je!==null&&(yt?(e=je,n=n.stateNode,e.nodeType===8?Zl(e.parentNode,n):e.nodeType===1&&Zl(e,n),Ti(e)):Zl(je,n.stateNode));break;case 4:r=je,i=yt,je=n.stateNode.containerInfo,yt=!0,sn(e,t,n),je=r,yt=i;break;case 0:case 11:case 14:case 15:if(!Oe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&tu(n,t,s),i=i.next}while(i!==r)}sn(e,t,n);break;case 1:if(!Oe&&(gr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ce(n,t,l)}sn(e,t,n);break;case 21:sn(e,t,n);break;case 22:n.mode&1?(Oe=(r=Oe)||n.memoizedState!==null,sn(e,t,n),Oe=r):sn(e,t,n);break;default:sn(e,t,n)}}function od(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new D6),t.forEach(function(r){var i=G6.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function pt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:je=l.stateNode,yt=!1;break e;case 3:je=l.stateNode.containerInfo,yt=!0;break e;case 4:je=l.stateNode.containerInfo,yt=!0;break e}l=l.return}if(je===null)throw Error(Q(160));D2(o,s,i),je=null,yt=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){Ce(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)V2(t,e),t=t.sibling}function V2(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(pt(t,e),Lt(e),r&4){try{Ci(3,e,e.return),ul(3,e)}catch(x){Ce(e,e.return,x)}try{Ci(5,e,e.return)}catch(x){Ce(e,e.return,x)}}break;case 1:pt(t,e),Lt(e),r&512&&n!==null&&gr(n,n.return);break;case 5:if(pt(t,e),Lt(e),r&512&&n!==null&&gr(n,n.return),e.flags&32){var i=e.stateNode;try{Ii(i,"")}catch(x){Ce(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&l0(i,o),Ia(l,s);var u=Ia(l,o);for(s=0;s<a.length;s+=2){var c=a[s],d=a[s+1];c==="style"?f0(i,d):c==="dangerouslySetInnerHTML"?c0(i,d):c==="children"?Ii(i,d):Au(i,c,d,u)}switch(l){case"input":Ea(i,o);break;case"textarea":a0(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?wr(i,!!o.multiple,h,!1):f!==!!o.multiple&&(o.defaultValue!=null?wr(i,!!o.multiple,o.defaultValue,!0):wr(i,!!o.multiple,o.multiple?[]:"",!1))}i[Oi]=o}catch(x){Ce(e,e.return,x)}}break;case 6:if(pt(t,e),Lt(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(x){Ce(e,e.return,x)}}break;case 3:if(pt(t,e),Lt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ti(t.containerInfo)}catch(x){Ce(e,e.return,x)}break;case 4:pt(t,e),Lt(e);break;case 13:pt(t,e),Lt(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(hc=_e())),r&4&&od(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Oe=(u=Oe)||c,pt(t,e),Oe=u):pt(t,e),Lt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(ee=e,c=e.child;c!==null;){for(d=ee=c;ee!==null;){switch(f=ee,h=f.child,f.tag){case 0:case 11:case 14:case 15:Ci(4,f,f.return);break;case 1:gr(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(x){Ce(r,n,x)}}break;case 5:gr(f,f.return);break;case 22:if(f.memoizedState!==null){ld(d);continue}}h!==null?(h.return=f,ee=h):ld(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=d.stateNode,a=d.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=d0("display",s))}catch(x){Ce(e,e.return,x)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(x){Ce(e,e.return,x)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:pt(t,e),Lt(e),r&4&&od(e);break;case 21:break;default:pt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(O2(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ii(i,""),r.flags&=-33);var o=id(e);iu(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=id(e);ru(e,l,s);break;default:throw Error(Q(161))}}catch(a){Ce(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function z6(e,t,n){ee=e,z2(e)}function z2(e,t,n){for(var r=(e.mode&1)!==0;ee!==null;){var i=ee,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Po;if(!s){var l=i.alternate,a=l!==null&&l.memoizedState!==null||Oe;l=Po;var u=Oe;if(Po=s,(Oe=a)&&!u)for(ee=i;ee!==null;)s=ee,a=s.child,s.tag===22&&s.memoizedState!==null?ad(i):a!==null?(a.return=s,ee=a):ad(i);for(;o!==null;)ee=o,z2(o),o=o.sibling;ee=i,Po=l,Oe=u}sd(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,ee=o):sd(e)}}function sd(e){for(;ee!==null;){var t=ee;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Oe||ul(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Oe)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:gt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&W1(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}W1(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Ti(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Oe||t.flags&512&&nu(t)}catch(f){Ce(t,t.return,f)}}if(t===e){ee=null;break}if(n=t.sibling,n!==null){n.return=t.return,ee=n;break}ee=t.return}}function ld(e){for(;ee!==null;){var t=ee;if(t===e){ee=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ee=n;break}ee=t.return}}function ad(e){for(;ee!==null;){var t=ee;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ul(4,t)}catch(a){Ce(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){Ce(t,i,a)}}var o=t.return;try{nu(t)}catch(a){Ce(t,o,a)}break;case 5:var s=t.return;try{nu(t)}catch(a){Ce(t,s,a)}}}catch(a){Ce(t,t.return,a)}if(t===e){ee=null;break}var l=t.sibling;if(l!==null){l.return=t.return,ee=l;break}ee=t.return}}var H6=Math.ceil,$s=Jt.ReactCurrentDispatcher,dc=Jt.ReactCurrentOwner,dt=Jt.ReactCurrentBatchConfig,le=0,be=null,Ee=null,Te=0,Qe=0,mr=Mn(0),Me=0,Bi=null,Zn=0,cl=0,fc=0,_i=null,We=null,hc=0,Pr=1/0,Ht=null,Os=!1,ou=null,Cn=null,Ao=!1,gn=null,Ds=0,Ei=0,su=null,ls=-1,as=0;function ze(){return le&6?_e():ls!==-1?ls:ls=_e()}function _n(e){return e.mode&1?le&2&&Te!==0?Te&-Te:k6.transition!==null?(as===0&&(as=k0()),as):(e=ue,e!==0||(e=window.event,e=e===void 0?16:j0(e.type)),e):1}function St(e,t,n,r){if(50<Ei)throw Ei=0,su=null,Error(Q(185));eo(e,n,r),(!(le&2)||e!==be)&&(e===be&&(!(le&2)&&(cl|=n),Me===4&&fn(e,Te)),Ke(e,r),n===1&&le===0&&!(t.mode&1)&&(Pr=_e()+500,sl&&In()))}function Ke(e,t){var n=e.callbackNode;k4(e,t);var r=Cs(e,e===be?Te:0);if(r===0)n!==null&&y1(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&y1(n),t===1)e.tag===0?E6(ud.bind(null,e)):K0(ud.bind(null,e)),w6(function(){!(le&6)&&In()}),n=null;else{switch(S0(r)){case 1:n=Vu;break;case 4:n=_0;break;case 16:n=xs;break;case 536870912:n=E0;break;default:n=xs}n=G2(n,H2.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function H2(e,t){if(ls=-1,as=0,le&6)throw Error(Q(327));var n=e.callbackNode;if(kr()&&e.callbackNode!==n)return null;var r=Cs(e,e===be?Te:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Vs(e,r);else{t=r;var i=le;le|=2;var o=B2();(be!==e||Te!==t)&&(Ht=null,Pr=_e()+500,Dn(e,t));do try{W6();break}catch(l){F2(e,l)}while(!0);qu(),$s.current=o,le=i,Ee!==null?t=0:(be=null,Te=0,t=Me)}if(t!==0){if(t===2&&(i=Pa(e),i!==0&&(r=i,t=lu(e,i))),t===1)throw n=Bi,Dn(e,0),fn(e,r),Ke(e,_e()),n;if(t===6)fn(e,r);else{if(i=e.current.alternate,!(r&30)&&!F6(i)&&(t=Vs(e,r),t===2&&(o=Pa(e),o!==0&&(r=o,t=lu(e,o))),t===1))throw n=Bi,Dn(e,0),fn(e,r),Ke(e,_e()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:jn(e,We,Ht);break;case 3:if(fn(e,r),(r&130023424)===r&&(t=hc+500-_e(),10<t)){if(Cs(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ze(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Ha(jn.bind(null,e,We,Ht),t);break}jn(e,We,Ht);break;case 4:if(fn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-kt(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=_e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*H6(r/1960))-r,10<r){e.timeoutHandle=Ha(jn.bind(null,e,We,Ht),r);break}jn(e,We,Ht);break;case 5:jn(e,We,Ht);break;default:throw Error(Q(329))}}}return Ke(e,_e()),e.callbackNode===n?H2.bind(null,e):null}function lu(e,t){var n=_i;return e.current.memoizedState.isDehydrated&&(Dn(e,t).flags|=256),e=Vs(e,t),e!==2&&(t=We,We=n,t!==null&&au(t)),e}function au(e){We===null?We=e:We.push.apply(We,e)}function F6(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Nt(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function fn(e,t){for(t&=~fc,t&=~cl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-kt(t),r=1<<n;e[n]=-1,t&=~r}}function ud(e){if(le&6)throw Error(Q(327));kr();var t=Cs(e,0);if(!(t&1))return Ke(e,_e()),null;var n=Vs(e,t);if(e.tag!==0&&n===2){var r=Pa(e);r!==0&&(t=r,n=lu(e,r))}if(n===1)throw n=Bi,Dn(e,0),fn(e,t),Ke(e,_e()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,jn(e,We,Ht),Ke(e,_e()),null}function pc(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(Pr=_e()+500,sl&&In())}}function Yn(e){gn!==null&&gn.tag===0&&!(le&6)&&kr();var t=le;le|=1;var n=dt.transition,r=ue;try{if(dt.transition=null,ue=1,e)return e()}finally{ue=r,dt.transition=n,le=t,!(le&6)&&In()}}function gc(){Qe=mr.current,pe(mr)}function Dn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,v6(n)),Ee!==null)for(n=Ee.return;n!==null;){var r=n;switch(Xu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ns();break;case 3:jr(),pe(Ge),pe(De),ic();break;case 5:rc(r);break;case 4:jr();break;case 13:pe(ve);break;case 19:pe(ve);break;case 10:Ju(r.type._context);break;case 22:case 23:gc()}n=n.return}if(be=e,Ee=e=En(e.current,null),Te=Qe=t,Me=0,Bi=null,fc=cl=Zn=0,We=_i=null,An!==null){for(t=0;t<An.length;t++)if(n=An[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}An=null}return e}function F2(e,t){do{var n=Ee;try{if(qu(),is.current=Rs,As){for(var r=we.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}As=!1}if(Un=0,Le=Ne=we=null,xi=!1,zi=0,dc.current=null,n===null||n.return===null){Me=1,Bi=t,Ee=null;break}e:{var o=e,s=n.return,l=n,a=t;if(t=Te,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=K1(s);if(h!==null){h.flags&=-257,Q1(h,s,l,o,t),h.mode&1&&X1(o,u,t),t=h,a=u;var y=t.updateQueue;if(y===null){var x=new Set;x.add(a),t.updateQueue=x}else y.add(a);break e}else{if(!(t&1)){X1(o,u,t),mc();break e}a=Error(Q(426))}}else if(me&&l.mode&1){var _=K1(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Q1(_,s,l,o,t),Ku(Tr(a,l));break e}}o=a=Tr(a,l),Me!==4&&(Me=2),_i===null?_i=[o]:_i.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=S2(o,a,t);B1(o,v);break e;case 1:l=a;var p=o.type,g=o.stateNode;if(!(o.flags&128)&&(typeof p.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Cn===null||!Cn.has(g)))){o.flags|=65536,t&=-t,o.lanes|=t;var w=N2(o,l,t);B1(o,w);break e}}o=o.return}while(o!==null)}U2(n)}catch(k){t=k,Ee===n&&n!==null&&(Ee=n=n.return);continue}break}while(!0)}function B2(){var e=$s.current;return $s.current=Rs,e===null?Rs:e}function mc(){(Me===0||Me===3||Me===2)&&(Me=4),be===null||!(Zn&268435455)&&!(cl&268435455)||fn(be,Te)}function Vs(e,t){var n=le;le|=2;var r=B2();(be!==e||Te!==t)&&(Ht=null,Dn(e,t));do try{B6();break}catch(i){F2(e,i)}while(!0);if(qu(),le=n,$s.current=r,Ee!==null)throw Error(Q(261));return be=null,Te=0,Me}function B6(){for(;Ee!==null;)W2(Ee)}function W6(){for(;Ee!==null&&!g4();)W2(Ee)}function W2(e){var t=Y2(e.alternate,e,Qe);e.memoizedProps=e.pendingProps,t===null?U2(e):Ee=t,dc.current=null}function U2(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=O6(n,t),n!==null){n.flags&=32767,Ee=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Me=6,Ee=null;return}}else if(n=$6(n,t,Qe),n!==null){Ee=n;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);Me===0&&(Me=5)}function jn(e,t,n){var r=ue,i=dt.transition;try{dt.transition=null,ue=1,U6(e,t,n,r)}finally{dt.transition=i,ue=r}return null}function U6(e,t,n,r){do kr();while(gn!==null);if(le&6)throw Error(Q(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(S4(e,o),e===be&&(Ee=be=null,Te=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ao||(Ao=!0,G2(xs,function(){return kr(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=dt.transition,dt.transition=null;var s=ue;ue=1;var l=le;le|=4,dc.current=null,V6(e,n),V2(n,e),d6(Va),_s=!!Da,Va=Da=null,e.current=n,z6(n),m4(),le=l,ue=s,dt.transition=o}else e.current=n;if(Ao&&(Ao=!1,gn=e,Ds=i),o=e.pendingLanes,o===0&&(Cn=null),w4(n.stateNode),Ke(e,_e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Os)throw Os=!1,e=ou,ou=null,e;return Ds&1&&e.tag!==0&&kr(),o=e.pendingLanes,o&1?e===su?Ei++:(Ei=0,su=e):Ei=0,In(),null}function kr(){if(gn!==null){var e=S0(Ds),t=dt.transition,n=ue;try{if(dt.transition=null,ue=16>e?16:e,gn===null)var r=!1;else{if(e=gn,gn=null,Ds=0,le&6)throw Error(Q(331));var i=le;for(le|=4,ee=e.current;ee!==null;){var o=ee,s=o.child;if(ee.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(ee=u;ee!==null;){var c=ee;switch(c.tag){case 0:case 11:case 15:Ci(8,c,o)}var d=c.child;if(d!==null)d.return=c,ee=d;else for(;ee!==null;){c=ee;var f=c.sibling,h=c.return;if($2(c),c===u){ee=null;break}if(f!==null){f.return=h,ee=f;break}ee=h}}}var y=o.alternate;if(y!==null){var x=y.child;if(x!==null){y.child=null;do{var _=x.sibling;x.sibling=null,x=_}while(x!==null)}}ee=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,ee=s;else e:for(;ee!==null;){if(o=ee,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ci(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,ee=v;break e}ee=o.return}}var p=e.current;for(ee=p;ee!==null;){s=ee;var g=s.child;if(s.subtreeFlags&2064&&g!==null)g.return=s,ee=g;else e:for(s=p;ee!==null;){if(l=ee,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:ul(9,l)}}catch(k){Ce(l,l.return,k)}if(l===s){ee=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,ee=w;break e}ee=l.return}}if(le=i,In(),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(tl,e)}catch{}r=!0}return r}finally{ue=n,dt.transition=t}}return!1}function cd(e,t,n){t=Tr(n,t),t=S2(e,t,1),e=xn(e,t,1),t=ze(),e!==null&&(eo(e,1,t),Ke(e,t))}function Ce(e,t,n){if(e.tag===3)cd(e,e,n);else for(;t!==null;){if(t.tag===3){cd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Cn===null||!Cn.has(r))){e=Tr(n,e),e=N2(t,e,1),t=xn(t,e,1),e=ze(),t!==null&&(eo(t,1,e),Ke(t,e));break}}t=t.return}}function Z6(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ze(),e.pingedLanes|=e.suspendedLanes&n,be===e&&(Te&n)===n&&(Me===4||Me===3&&(Te&130023424)===Te&&500>_e()-hc?Dn(e,0):fc|=n),Ke(e,t)}function Z2(e,t){t===0&&(e.mode&1?(t=ko,ko<<=1,!(ko&130023424)&&(ko=4194304)):t=1);var n=ze();e=Xt(e,t),e!==null&&(eo(e,t,n),Ke(e,n))}function Y6(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Z2(e,n)}function G6(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(t),Z2(e,n)}var Y2;Y2=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ge.current)Ze=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ze=!1,R6(e,t,n);Ze=!!(e.flags&131072)}else Ze=!1,me&&t.flags&1048576&&Q0(t,Ls,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ss(e,t),e=t.pendingProps;var i=Ir(t,De.current);Er(t,n),i=sc(null,t,r,e,i,n);var o=lc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xe(r)?(o=!0,Ms(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,tc(t),i.updater=al,t.stateNode=i,i._reactInternals=t,Ga(t,r,e,n),t=Qa(null,t,r,!0,o,n)):(t.tag=0,me&&o&&Gu(t),Ve(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ss(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=K6(r),e=gt(r,e),i){case 0:t=Ka(null,t,r,e,n);break e;case 1:t=ed(null,t,r,e,n);break e;case 11:t=q1(null,t,r,e,n);break e;case 14:t=J1(null,t,r,gt(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),Ka(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),ed(e,t,r,i,n);case 3:e:{if(b2(t),e===null)throw Error(Q(387));r=t.pendingProps,o=t.memoizedState,i=o.element,r2(e,t),Ts(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Tr(Error(Q(423)),t),t=td(e,t,r,n,i);break e}else if(r!==i){i=Tr(Error(Q(424)),t),t=td(e,t,r,n,i);break e}else for(Je=wn(t.stateNode.containerInfo.firstChild),et=t,me=!0,wt=null,n=t2(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Lr(),r===i){t=Kt(e,t,n);break e}Ve(e,t,r,n)}t=t.child}return t;case 5:return i2(t),e===null&&Ua(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,za(r,i)?s=null:o!==null&&za(r,o)&&(t.flags|=32),L2(e,t),Ve(e,t,s,n),t.child;case 6:return e===null&&Ua(t),null;case 13:return j2(e,t,n);case 4:return nc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=br(t,null,r,n):Ve(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),q1(e,t,r,i,n);case 7:return Ve(e,t,t.pendingProps,n),t.child;case 8:return Ve(e,t,t.pendingProps.children,n),t.child;case 12:return Ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,de(bs,r._currentValue),r._currentValue=s,o!==null)if(Nt(o.value,s)){if(o.children===i.children&&!Ge.current){t=Kt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Zt(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Za(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Q(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Za(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ve(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Er(t,n),i=ft(i),r=r(i),t.flags|=1,Ve(e,t,r,n),t.child;case 14:return r=t.type,i=gt(r,t.pendingProps),i=gt(r.type,i),J1(e,t,r,i,n);case 15:return M2(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),ss(e,t),t.tag=1,Xe(r)?(e=!0,Ms(t)):e=!1,Er(t,n),k2(t,r,i),Ga(t,r,i,n),Qa(null,t,r,!0,e,n);case 19:return T2(e,t,n);case 22:return I2(e,t,n)}throw Error(Q(156,t.tag))};function G2(e,t){return C0(e,t)}function X6(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ut(e,t,n,r){return new X6(e,t,n,r)}function yc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function K6(e){if(typeof e=="function")return yc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$u)return 11;if(e===Ou)return 14}return 2}function En(e,t){var n=e.alternate;return n===null?(n=ut(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function us(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")yc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case sr:return Vn(n.children,i,o,t);case Ru:s=8,i|=8;break;case va:return e=ut(12,n,t,i|2),e.elementType=va,e.lanes=o,e;case wa:return e=ut(13,n,t,i),e.elementType=wa,e.lanes=o,e;case xa:return e=ut(19,n,t,i),e.elementType=xa,e.lanes=o,e;case i0:return dl(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case n0:s=10;break e;case r0:s=9;break e;case $u:s=11;break e;case Ou:s=14;break e;case un:s=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=ut(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Vn(e,t,n,r){return e=ut(7,e,r,t),e.lanes=n,e}function dl(e,t,n,r){return e=ut(22,e,r,t),e.elementType=i0,e.lanes=n,e.stateNode={isHidden:!1},e}function ea(e,t,n){return e=ut(6,e,null,t),e.lanes=n,e}function ta(e,t,n){return t=ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Q6(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rl(0),this.expirationTimes=Rl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rl(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function vc(e,t,n,r,i,o,s,l,a){return e=new Q6(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ut(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},tc(o),e}function q6(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:or,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function X2(e){if(!e)return Sn;e=e._reactInternals;e:{if(tr(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Xe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(Xe(n))return X0(e,n,t)}return t}function K2(e,t,n,r,i,o,s,l,a){return e=vc(n,r,!0,e,i,o,s,l,a),e.context=X2(null),n=e.current,r=ze(),i=_n(n),o=Zt(r,i),o.callback=t??null,xn(n,o,i),e.current.lanes=i,eo(e,i,r),Ke(e,r),e}function fl(e,t,n,r){var i=t.current,o=ze(),s=_n(i);return n=X2(n),t.context===null?t.context=n:t.pendingContext=n,t=Zt(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=xn(i,t,s),e!==null&&(St(e,i,s,o),rs(e,i,s)),s}function zs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function dd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function wc(e,t){dd(e,t),(e=e.alternate)&&dd(e,t)}function J6(){return null}var Q2=typeof reportError=="function"?reportError:function(e){console.error(e)};function xc(e){this._internalRoot=e}hl.prototype.render=xc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));fl(e,t,null,null)};hl.prototype.unmount=xc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Yn(function(){fl(null,e,null,null)}),t[Gt]=null}};function hl(e){this._internalRoot=e}hl.prototype.unstable_scheduleHydration=function(e){if(e){var t=I0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<dn.length&&t!==0&&t<dn[n].priority;n++);dn.splice(n,0,e),n===0&&b0(e)}};function Cc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function pl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function fd(){}function eg(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=zs(s);o.call(u)}}var s=K2(t,r,e,0,null,!1,!1,"",fd);return e._reactRootContainer=s,e[Gt]=s.current,Ri(e.nodeType===8?e.parentNode:e),Yn(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=zs(a);l.call(u)}}var a=vc(e,0,!1,null,null,!1,!1,"",fd);return e._reactRootContainer=a,e[Gt]=a.current,Ri(e.nodeType===8?e.parentNode:e),Yn(function(){fl(t,a,n,r)}),a}function gl(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var a=zs(s);l.call(a)}}fl(t,s,e,i)}else s=eg(n,t,e,i,r);return zs(s)}N0=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=di(t.pendingLanes);n!==0&&(zu(t,n|1),Ke(t,_e()),!(le&6)&&(Pr=_e()+500,In()))}break;case 13:Yn(function(){var r=Xt(e,1);if(r!==null){var i=ze();St(r,e,1,i)}}),wc(e,1)}};Hu=function(e){if(e.tag===13){var t=Xt(e,134217728);if(t!==null){var n=ze();St(t,e,134217728,n)}wc(e,134217728)}};M0=function(e){if(e.tag===13){var t=_n(e),n=Xt(e,t);if(n!==null){var r=ze();St(n,e,t,r)}wc(e,t)}};I0=function(){return ue};L0=function(e,t){var n=ue;try{return ue=e,t()}finally{ue=n}};ba=function(e,t,n){switch(t){case"input":if(Ea(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ol(r);if(!i)throw Error(Q(90));s0(r),Ea(r,i)}}}break;case"textarea":a0(e,n);break;case"select":t=n.value,t!=null&&wr(e,!!n.multiple,t,!1)}};g0=pc;m0=Yn;var tg={usingClientEntryPoint:!1,Events:[no,cr,ol,h0,p0,pc]},oi={findFiberByHostInstance:Pn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ng={bundleType:oi.bundleType,version:oi.version,rendererPackageName:oi.rendererPackageName,rendererConfig:oi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Jt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=w0(e),e===null?null:e.stateNode},findFiberByHostInstance:oi.findFiberByHostInstance||J6,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ro=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ro.isDisabled&&Ro.supportsFiber)try{tl=Ro.inject(ng),Pt=Ro}catch{}}rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tg;rt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cc(t))throw Error(Q(200));return q6(e,t,null,n)};rt.createRoot=function(e,t){if(!Cc(e))throw Error(Q(299));var n=!1,r="",i=Q2;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=vc(e,1,!1,null,null,n,!1,r,i),e[Gt]=t.current,Ri(e.nodeType===8?e.parentNode:e),new xc(t)};rt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=w0(t),e=e===null?null:e.stateNode,e};rt.flushSync=function(e){return Yn(e)};rt.hydrate=function(e,t,n){if(!pl(t))throw Error(Q(200));return gl(null,e,t,!0,n)};rt.hydrateRoot=function(e,t,n){if(!Cc(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=Q2;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=K2(t,null,e,1,n??null,i,!1,o,s),e[Gt]=t.current,Ri(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new hl(t)};rt.render=function(e,t,n){if(!pl(t))throw Error(Q(200));return gl(null,e,t,!1,n)};rt.unmountComponentAtNode=function(e){if(!pl(e))throw Error(Q(40));return e._reactRootContainer?(Yn(function(){gl(null,null,e,!1,function(){e._reactRootContainer=null,e[Gt]=null})}),!0):!1};rt.unstable_batchedUpdates=pc;rt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!pl(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return gl(e,t,n,!1,r)};rt.version="18.3.1-next-f1338f8080-20240426";function q2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q2)}catch(e){console.error(e)}}q2(),qf.exports=rt;var J2=qf.exports,hd=J2;ma.createRoot=hd.createRoot,ma.hydrateRoot=hd.hydrateRoot;var Ar;(function(e){e.Parsing="Parsing",e.Validation="Validation",e.Network="Network",e.Dependency="Dependency",e.Rendering="Rendering",e.Timeout="Timeout",e.Permission="Permission",e.Configuration="Configuration",e.Runtime="Runtime"})(Ar||(Ar={}));var pd;(function(e){e.Debug="debug",e.Info="info",e.Warn="warn",e.Error="error",e.Success="success"})(pd||(pd={}));const Qt={PLUGIN_ERROR:"PLUGIN_ERROR",RETRY_VISUALIZATION:"RETRY_VISUALIZATION",CLOSE_VISUALIZER:"CLOSE_VISUALIZER",COPY_STACK_TRACE:"COPY_STACK_TRACE",OPEN_SETTINGS:"openSettings",REQUEST_PLUGIN_DATA:"REQUEST_PLUGIN_DATA",PLUGIN_DATA_RESPONSE:"PLUGIN_DATA_RESPONSE",PLUGIN_DATA_UPDATE:"PLUGIN_DATA_UPDATE",SUBMIT_EDIT:"SUBMIT_EDIT",SUBMIT_EDIT_RESULT:"SUBMIT_EDIT_RESULT",TELEMETRY_EVENT:"TELEMETRY_EVENT"};new Set(Object.values(Qt));let si=null;function cs(){return typeof window<"u"&&typeof window.getHostApi=="function"}function _c(e){const t=window.__ExtensionHostExpectedRenderId;return t===void 0||e.renderId===t}function $o(e,...t){e||console.error(...t)}function eh(e,t){if(typeof window>"u")return $o(t,"[sendToHost] Not in browser context"),!1;if(typeof window.__ExtensionHostPostMessage=="function")try{return window.__ExtensionHostPostMessage(e),!0}catch(n){$o(t,"[sendToHost] Error sending via __ExtensionHostPostMessage:",n)}if(window.parent&&window.parent!==window)try{const n=typeof window.location<"u"&&window.location.origin?window.location.origin:"*";return window.parent.postMessage(e,n),!0}catch(n){$o(t,"[sendToHost] Error sending via window.parent:",n)}return $o(t,"[sendToHost] No host communication channel available"),!1}function th(e){return eh(e,!1)}function rg(e){try{return eh({type:Qt.TELEMETRY_EVENT,payload:e},!0)}catch{return!1}}function ig(e){var n,r;if(!cs()||typeof window.__ExtensionHostPostMessage!="function")return Promise.reject(new Error("vibe-edit: acknowledged submission is only available in VS Code"));const t=((r=(n=globalThis.crypto)==null?void 0:n.randomUUID)==null?void 0:r.call(n))??`${Date.now()}-${Math.random()}`;return new Promise((i,o)=>{const s=window.setTimeout(()=>{l(),o(new Error("vibe-edit: host acknowledgement timed out; the edit may still be pending"))},12e4),l=()=>{clearTimeout(s),window.removeEventListener("message",a)},a=u=>{if(!Ec(u))return;const c=u.data,d=c.payload;c.type!==Qt.SUBMIT_EDIT_RESULT||!_c(c)||(d==null?void 0:d.requestId)!==t||(l(),d.result.delivered?i(d):o(new Error(d.result.detail??"vibe-edit: host did not deliver the edit")))};window.addEventListener("message",a);try{window.__ExtensionHostPostMessage({type:Qt.SUBMIT_EDIT,payload:e,requestId:t})}catch(u){l(),o(u)}})}async function og(e=5e3){return typeof window.__ExtensionHostPostMessage!="function"?(console.error("[getPluginData] Extension host postMessage not available. Ensure platform bootstrap has run."),Promise.resolve(null)):(si!==null||(si=new Promise(t=>{let n=0;const r=o=>{if(!Ec(o))return;const s=o.data;s.type===Qt.PLUGIN_DATA_RESPONSE&&_c(s)&&(i(),t(s.payload))};function i(){n&&(clearTimeout(n),n=0),window.removeEventListener("message",r),si=null}window.addEventListener("message",r),n=window.setTimeout(()=>{console.error("[getPluginData] Timeout waiting for plugin data"),i(),t(null)},e),window.__ExtensionHostPostMessage({type:Qt.REQUEST_PLUGIN_DATA})})),si)}function Ec(e){var t,n;return e.source===null?!0:typeof window>"u"?!1:window.parent!==window&&e.source===window.parent||window.parent===window&&((n=(t=e.source)==null?void 0:t.constructor)==null?void 0:n.name)==="Window"}function sg(e){const t=n=>{if(!Ec(n))return;const r=n.data;if(r.type===Qt.PLUGIN_DATA_UPDATE&&_c(r)){const i=r.payload;e(i)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}}class Gn{constructor(){this.error={}}static create(){return new Gn}category(t){return this.error.category=t,this}message(t){return this.error.message=t,this}stackTrace(t){return this.error.stackTrace=t,this}context(t){return this.error.context={...this.error.context,...t},this}build(){if(!this.error.category)throw new Error("ErrorBuilder: category is required");if(!this.error.message)throw new Error("ErrorBuilder: message is required");return this.error}send(){const t=this.build();th({type:Qt.PLUGIN_ERROR,payload:t})||console.error("[ErrorBuilder] Unable to send error to host:",t)}static fromError(t,n,r){const i=Gn.create().category(t);return n instanceof Error?(i.message(n.message),i.stackTrace(n.stack)):i.message(String(n)),r&&i.context(r),i}}function lg(){typeof window>"u"||(window.addEventListener("error",e=>{const t=e.error;Gn.create().category(Ar.Runtime).message(e.message||"An error occurred").stackTrace(t==null?void 0:t.stack).context({lineno:e.lineno,colno:e.colno,filename:e.filename}).send()}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;let n;if(t instanceof Error)n=t.message;else if(t!=null&&typeof t=="object")try{n=JSON.stringify(t)}catch{n=String(t)}else n=t!=null?String(t):"Unhandled promise rejection";Gn.create().category(Ar.Runtime).message(n).stackTrace(t instanceof Error?t.stack:void 0).send()}))}const gd=1,ag=["vibeEdit.selectMode","vibeEdit.selection","vibeEdit.promptAbandoned"],ug=["agent","start-agent","subagent","topic","system-instructions","reasoning","reasoning-action","action","action-target","action-input","action-output","messages","description","heading","step","detail","start","screen","apexAction","apexPluginCall","emailAction","externalCallout","routeWork","addScreenPop","addSkillRequirement","checkAvailability","setScreenProperty","assignment","addPromptInstructions","decision","loop","recordCreate","recordLookup","recordUpdate","recordDelete","recordRollback","subflow","wait","collectionProcessor","collectionSort","transform","customError","stage","interactiveStep","managedContentStep","permissionset","objectPermission","fieldPermission","recordTypeVisibility","tabSetting","apexClassAccesses","pageAccesses","flowAccesses","agentAccesses","customPermissions","customMetadataTypeAccesses","customSettingAccesses","externalDataSourceAccesses","externalCredentialPrincipalAccesses","servicePresenceStatusAccesses","emailRoutingAddressAccesses","genComputingSummaryDefAccesses","userPermissions","applicationVisibilities","object","field","region","block","dataProvider","other"],uu=1e4;new Set(ag);const cg=new Set(ug);function md(e){return typeof e=="string"&&cg.has(e)?e:"other"}const Rr="data-mv-selectable",$r="data-mv-type",cu="data-mv-id",yd="data-mv-selected",vd="data-mv-hover",nh=.5,dg=5;function Oo(e,t,n,r){return{left:Math.min(e,n),top:Math.min(t,r),right:Math.max(e,n),bottom:Math.max(t,r)}}function fg(e,t){const n=Math.max(0,Math.min(e.right,t.right)-Math.max(e.left,t.left)),r=Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top));return n*r}function hg(e){return Math.max(0,e.right-e.left)*Math.max(0,e.bottom-e.top)}function rh(e,t){const n=hg(t);return n<=0?0:fg(e,t)/n}function kc(e){const t=e.getAttribute($r),n=e.getAttribute(cu);return!t||!n?null:{type:t,id:n}}function ki(e){return`${e.type}::${e.id}`}function pg(e,t,n=nh){const i=Array.from(e.querySelectorAll(`[${Rr}]`)).filter(l=>{const a=l.getBoundingClientRect();return rh(t,{left:a.left,top:a.top,right:a.right,bottom:a.bottom})>=n}),o=new Set(i),s=[];for(const l of i){let a=l.parentElement,u=!1;for(;a;){if(o.has(a)){u=!0;break}a=a.parentElement}if(u)continue;const c=kc(l);c&&s.push(c)}return s}function gg(e,t,n=nh){const r=Array.from(e.querySelectorAll(`[${Rr}]`)),i=[];for(const o of r){const s=o.getBoundingClientRect();if(rh(t,{left:s.left,top:s.top,right:s.right,bottom:s.bottom})>=n){const l=kc(o);l&&i.push(l)}}return i}function na(e,t,n){const r=Array.from(e.querySelectorAll(`[${Rr}]`));let i=null;for(const o of r){const s=o.getBoundingClientRect();if(t<s.left||t>s.right||n<s.top||n>s.bottom)continue;const l=(s.right-s.left)*(s.bottom-s.top);(!i||l<i.area)&&(i={el:o,area:l})}return i?kc(i.el):null}function mg(e,t){Gn.create().category(Ar.Rendering).message(e.message).stackTrace(e.stack).context({componentStack:t.componentStack,errorName:e.name}).send(),console.error("[ErrorBoundary] Rendering error:",e,t)}function yg({error:e}){return m.jsxs(m.Fragment,{children:[m.jsx("p",{children:"Something went wrong. Check the error panel for details."}),e&&m.jsxs(m.Fragment,{children:[e.message&&m.jsx("p",{children:e.message}),e.stack&&m.jsx("pre",{children:e.stack})]})]})}class vg extends J.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){mg(t,n)}render(){return this.state.hasError?m.jsx(yg,{error:this.state.error}):this.props.children}}let st=null,Do=null,mt=null,wd=!1;function wg(e){if(typeof e!="object"||e===null)return e;const t=e;return t.kind===void 0&&typeof t.filePath=="string"&&typeof t.fileName=="string"?{...t,kind:"file",filePath:t.filePath,fileName:t.fileName}:e}function xg(e,t){const{rootClass:n,title:r,message:i,filePath:o}=t,s=o?`<p>File: ${o}</p>`:"";e.innerHTML=`
|
|
42
|
-
<div class="${n}">
|
|
43
|
-
<div class="error-message">
|
|
44
|
-
<h2>${r}</h2>
|
|
45
|
-
<p>${i}</p>
|
|
46
|
-
${s}
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
`}function Vo(e,t){const{logPrefix:n,rootClass:r,title:i,consoleMessage:o,errorBuilderMessage:s,context:l={},domMessage:a,filePath:u}=t;console.error(`${n} ${o}`),Gn.create().category(Ar.Rendering).message(s).context(l).send(),xg(e,{rootClass:r,title:i,message:a,filePath:u})}async function xd(e){const{pluginName:t,rootClass:n,expectedSourceKind:r,render:i,validateData:o}=e,s=`[${t} React App]`,l=document.getElementById("root");if(!l){console.error(`${s} Root element not found`);return}if(mt&&(mt(),mt=null),st){try{st.unmount()}catch(p){console.warn(`${s} Error unmounting previous root:`,p)}st=null,Do=null}const a={fn:null};let u=null,c=!1;mt=sg(p=>{if(!c)if(a.fn)try{a.fn(p)}catch(g){console.error(`${s} Update handler threw:`,g)}else u=p});const f=(p,g,w)=>{p.render(m.jsx(J.StrictMode,{children:m.jsx(vg,{children:i(g,w)})}))},h=()=>{if(st){try{st.unmount()}catch(p){console.warn(`${s} Error unmounting previous root:`,p)}st=null}Do=null},y=p=>p.kind===r,x=()=>{c=!0,mt==null||mt(),mt=null,u=null},_=(p,g)=>{const w=p!=null&&p.context?wg(p.context):void 0,k=p==null?void 0:p.data;if(!w||k==null){h();const P=(w==null?void 0:w.kind)==="file"?w.filePath:void 0;Vo(l,{logPrefix:s,rootClass:n,title:g?"Error: No updated data provided":"Error: No data provided",consoleMessage:"No data provided",errorBuilderMessage:`${t} data is missing or invalid`,context:{sourceKind:w==null?void 0:w.kind,reason:"No data provided in response"},domMessage:`${t} data is missing or invalid.`,filePath:P});return}if(!y(w)){h(),x(),Vo(l,{logPrefix:s,rootClass:n,title:"Error: Unsupported visualization source",consoleMessage:`Expected ${r} context but received ${w.kind}`,errorBuilderMessage:`${t} received an incompatible visualization source`,context:{expectedSourceKind:r,actualSourceKind:w.kind},domMessage:`${t} cannot render data from this source.`});return}const C=w,L=o!=null?o(k):null;if(L!=null){h(),Vo(l,{logPrefix:s,rootClass:n,title:g?"Error: Invalid Updated Data":"Error: Invalid Data",consoleMessage:`Validation failed: ${L}`,errorBuilderMessage:`${t} data structure is invalid`,context:{sourceKind:C.kind,reason:L},domMessage:L,filePath:C.kind==="file"?C.filePath:void 0});return}const T={...C,selectableNodes:p.selectableNodes},F=C.kind==="file"?`file:${C.filePath}`:`payload:${C.pluginId}`;if(st==null||F!==Do){if(st){try{st.unmount()}catch(P){console.warn(`${s} Error unmounting previous root:`,P)}st=null}l.innerHTML="",st=ma.createRoot(l),Do=F}f(st,k,T)},v=await og();if(!v){if(Vo(l,{logPrefix:s,rootClass:n,title:"Error: Failed to load data",consoleMessage:"Failed to receive plugin data from host",errorBuilderMessage:`${t} data is missing or invalid`,context:{reason:"Failed to receive plugin data from host"},domMessage:`Could not receive ${t} data from the extension host.`}),a.fn=p=>_(p,!0),u){const p=u;u=null,a.fn(p)}return}if(_(v,!1),!c&&(a.fn=p=>_(p,!0),u)){const p=u;u=null,a.fn(p)}}function Cg(e){lg(),wd||(window.addEventListener("pagehide",()=>{mt&&(mt(),mt=null)}),wd=!0),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{xd(e)}):xd(e)}const _g="modulepreload",Eg=function(e,t){return new URL(e,t).href},Cd={},kg=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=Eg(u,r),u in Cd)return;Cd[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(!!r)for(let y=s.length-1;y>=0;y--){const x=s[y];if(x.href===u&&(!c||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${d}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":_g,c||(h.as="script"),h.crossOrigin="",h.href=u,a&&h.setAttribute("nonce",a),document.head.appendChild(h),c)return new Promise((y,x)=>{h.addEventListener("load",y),h.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return i.then(s=>{for(const l of s||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};function Sg(e,t,n){if(n)return{changed:!1,key:e,item:null};const r=t?ki(t):null;return r===e?{changed:!1,key:r,item:null}:{changed:!0,key:r,item:t}}const Ng=({active:e,selected:t,onReplace:n,onAdd:r,onToggle:i,onClear:o,onActivate:s,onHover:l,onMarqueePreview:a})=>{var N;const u=V.useRef(null),c=V.useRef(null),[d,f]=V.useState(null),[h,y]=V.useState(!1),x=V.useRef(!1),_=V.useRef(null),v=V.useRef(null),p=V.useRef(null),g=V.useRef(null),w=V.useCallback(()=>{var I;return((I=u.current)==null?void 0:I.parentElement)??null},[]),k=V.useCallback(()=>{var R;const I=_.current;I!==null&&((R=u.current)!=null&&R.hasPointerCapture(I))&&u.current.releasePointerCapture(I),_.current=null,c.current=null,f(null),a==null||a([])},[a]),C=V.useCallback(I=>{x.current=I,y(I),I&&k()},[k]),L=V.useCallback(I=>{I.code==="Space"&&!I.nativeEvent.isComposing&&(I.preventDefault(),C(!0))},[C]),T=V.useCallback(I=>{I.code==="Space"&&C(!1)},[C]),F=V.useCallback(I=>{var R;!e||x.current||I.button!==0||(I.currentTarget.focus(),c.current={x:I.clientX,y:I.clientY,additive:I.shiftKey||I.metaKey||I.ctrlKey},f(Oo(I.clientX,I.clientY,I.clientX,I.clientY)),(R=u.current)==null||R.setPointerCapture(I.pointerId),_.current=I.pointerId,v.current!==null&&(cancelAnimationFrame(v.current),v.current=null),g.current!==null&&(g.current=null,l==null||l(null)))},[e,l]),P=V.useCallback(I=>{if(c.current){const R=c.current,B=Oo(R.x,R.y,I.clientX,I.clientY);f(B),a&&(p.current={x:I.clientX,y:I.clientY},v.current===null&&(v.current=requestAnimationFrame(()=>{v.current=null;const Z=c.current,A=p.current,M=w();!Z||!A||!M||a(gg(M,Oo(Z.x,Z.y,A.x,A.y)))})));return}l&&(p.current={x:I.clientX,y:I.clientY},v.current===null&&(v.current=requestAnimationFrame(()=>{v.current=null;const R=p.current,B=w();if(!R||!B)return;const Z=na(B,R.x,R.y),A=Sg(g.current,Z,c.current!==null);A.changed&&(g.current=A.key,l(A.item))})))},[l,a,w]),j=V.useCallback(I=>{var H;const R=c.current;if(c.current=null,_.current=null,f(null),v.current!==null&&(cancelAnimationFrame(v.current),v.current=null),a==null||a([]),!R)return;(H=u.current)==null||H.releasePointerCapture(I.pointerId);const B=w();if(!B)return;if(Math.hypot(I.clientX-R.x,I.clientY-R.y)<dg){const W=na(B,I.clientX,I.clientY);W?i(W):R.additive||o();return}const A=Oo(R.x,R.y,I.clientX,I.clientY),M=pg(B,A);R.additive?r(M):n(M)},[w,r,n,i,o,a]),D=V.useCallback(I=>{if(!e||!s)return;const R=w();if(!R)return;const B=na(R,I.clientX,I.clientY);B&&s(B)},[e,s,w]),z=V.useCallback(()=>{c.current||(v.current!==null&&(cancelAnimationFrame(v.current),v.current=null),g.current!==null&&(g.current=null,l==null||l(null)))},[l]),E=V.useCallback(()=>{k()},[k]),O=V.useRef(l);O.current=l;const b=V.useRef(a);if(b.current=a,V.useEffect(()=>()=>{var I,R;v.current!==null&&(cancelAnimationFrame(v.current),v.current=null),g.current!==null&&(g.current=null,(I=O.current)==null||I.call(O,null)),(R=b.current)==null||R.call(b,[])},[]),!e)return null;const $=(N=u.current)==null?void 0:N.getBoundingClientRect(),S=d&&$?{left:d.left-$.left,top:d.top-$.top,width:d.right-d.left,height:d.bottom-d.top}:void 0;return J.createElement("div",{ref:u,className:`mv-marquee-overlay${h?" mv-marquee-overlay--panning":""}`,tabIndex:0,"aria-label":"Metadata selection canvas",onKeyDown:L,onKeyUp:T,onBlur:()=>C(!1),onPointerDown:F,onPointerMove:P,onPointerUp:j,onPointerCancel:E,onLostPointerCapture:E,onPointerLeave:z,onDoubleClick:D},S&&J.createElement("div",{className:"mv-marquee-box",style:S}),J.createElement("span",{hidden:!0},t.size))};function Mg(){const[e,t]=V.useState(new Map),n=V.useCallback(a=>{const u=new Map;for(const c of a)u.set(ki(c),c);t(u)},[]),r=V.useCallback(a=>{t(u=>{const c=new Map(u);for(const d of a)c.set(ki(d),d);return c})},[]),i=V.useCallback(a=>{t(u=>{const c=new Map(u),d=ki(a);return c.has(d)?c.delete(d):c.set(d,a),c})},[]),o=V.useCallback(()=>t(new Map),[]),s=V.useCallback((a,u)=>e.has(`${a}::${u}`),[e]),l=V.useMemo(()=>Array.from(e.values()),[e]);return{selected:e,items:l,replace:n,add:r,toggle:i,clear:o,isSelected:s}}function ih(e){const t=new Map;for(const n of e)n.id&&!t.has(n.id)&&t.set(n.id,n);return t}function Ig(e,t){if(typeof document>"u")return;const n=new Map,r=document.querySelectorAll(`[${cu}]`);for(let i=0;i<r.length;i++){const o=r.item(i),s=o.getAttribute(cu)??"",l=e.get(s);l&&(o.setAttribute(Rr,""),o.setAttribute($r,l.type),n.set(s,o))}for(const[i,o]of t)n.get(i)!==o&&(o.removeAttribute(Rr),o.removeAttribute($r));t.clear(),n.forEach((i,o)=>t.set(o,i))}function _d(e){for(const t of e.values())t.removeAttribute(Rr),t.removeAttribute($r);e.clear()}function Lg(e,t){const n=ih(e),r=()=>Ig(n,t);if(typeof document>"u"||typeof MutationObserver>"u")return r(),()=>_d(t);r();const i=new MutationObserver(()=>r());return i.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{i.disconnect(),_d(t)}}function bg(e,t,n){var l;const r=e.parentId?(l=t.get(e.parentId))==null?void 0:l.apiName:void 0,i={elementType:e.type,apiName:e.apiName};r&&(i.parent=r),e.attributes&&Object.keys(e.attributes).length>0&&(i.attributes=e.attributes),e.filePath&&(i.filePath=e.filePath);const s=(e.filePath?e.filePath.split("/").pop():void 0)||n;return s&&(i.fileName=s),i}function ra(e,t,n){const r=ih(t),i=[];for(const o of e){const s=r.get(o.id);s&&i.push(bg(s,r,n))}return i}function jg(){return J.createElement("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},J.createElement("path",{d:"M14.5 1.5L7 9M14.5 1.5L10 14.5l-3-5.5-5.5-3L14.5 1.5z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}))}const Tg=({chips:e,onSubmit:t,onClear:n,onRemove:r,placeholder:i,onDraftChange:o})=>{const[s,l]=V.useState(""),[a,u]=V.useState(!1),c=V.useRef(null),d=e.length,f=d===0;V.useEffect(()=>{var p;f||(p=c.current)==null||p.focus()},[f]);const h=!f&&s.trim().length>0;V.useEffect(()=>{o==null||o(h)},[h,o]);const y=e.map(p=>p.title??p.label).join("|");if(V.useEffect(()=>{u(!1)},[y]),f)return null;const x=s.trim().length>0,_=()=>{if(!x)return;t(s)&&(u(!0),l(""))},v=p=>{(p.metaKey||p.ctrlKey)&&p.key==="Enter"&&(p.preventDefault(),_())};return J.createElement("div",{className:"vibe-edit-panel",role:"dialog","aria-label":"Edit selected metadata with AI"},J.createElement("div",{className:"vibe-edit-panel__header"},J.createElement("span",{className:"vibe-edit-panel__title"},"Edit Element (",d," Selected)"),J.createElement("button",{className:"vibe-edit-panel__close",onClick:n,"aria-label":"Clear selection",type:"button"},"✕")),J.createElement("div",{className:"vibe-edit-panel__chips"},e.map((p,g)=>J.createElement("span",{className:`vibe-edit-panel__chip ${p.variant==="primary"?"vibe-edit-panel__chip--field":""}`,key:`${p.title??p.label}:${g}`,title:p.title??p.label},J.createElement("span",{className:"vibe-edit-panel__chip-label"},p.label),r&&J.createElement("button",{type:"button",className:"vibe-edit-panel__chip-remove","aria-label":`Remove ${p.label} from selection`,onClick:()=>r(g)},"✕")))),J.createElement("div",{className:"vibe-edit-panel__input-wrap"},J.createElement("textarea",{ref:c,className:"vibe-edit-panel__input",value:s,onChange:p=>l(p.target.value),onKeyDown:v,placeholder:i??"Describe the change you want…",rows:3}),J.createElement("button",{className:"vibe-edit-panel__submit",onClick:_,disabled:!x,type:"button"},J.createElement(jg,null),J.createElement("span",null,"Send to Agent"))),J.createElement("div",{className:"vibe-edit-panel__footer"},J.createElement("span",{className:"vibe-edit-panel__hint",role:"status","aria-live":"polite"},a?"✓ Sent to agent":"⌘/Ctrl + Enter to send")))};function Pg(e,t){const n=Object.keys(t).sort().map(r=>`${r}=${t[r]}`);return`${e}|${n.join("&")}`}const Ag=2e4;class Rg{constructor(t,n=0){this.send=t,this.flushDelayMs=n,this.buckets=new Map,this.lifecycleAttached=!1}add(t,n,r=1){const i=Math.floor(r);if(!Number.isFinite(i)||i<=0)return;this.scheduleFlush();const o=Pg(t,n),s=this.buckets.get(o);s?s.count=Math.min(uu,s.count+i):this.buckets.set(o,{name:t,properties:{...n},count:Math.min(uu,i)})}flush(t){t===void 0&&this.cancelScheduledFlush();const n=[];for(const[r,i]of this.buckets)(t===void 0||i.name===t)&&(n.push(i),this.buckets.delete(r));for(const r of n)this.dispatch({schemaVersion:gd,name:r.name,properties:r.properties,measurements:{count:r.count}})}emitNow(t,n,r={}){this.dispatch({schemaVersion:gd,name:t,properties:{...n},measurements:{...r}})}attachPageLifecycle(t,n){if(!this.lifecycleAttached){this.lifecycleAttached=!0;try{t==null||t.addEventListener("pagehide",()=>this.flush()),n==null||n.addEventListener("visibilitychange",()=>{n.visibilityState==="hidden"&&this.flush()})}catch{}}}scheduleFlush(){var t;if(!(this.flushDelayMs<=0||this.flushTimer!==void 0))try{const n=setTimeout(()=>{this.flushTimer=void 0,this.flush()},this.flushDelayMs);(t=n.unref)==null||t.call(n),this.flushTimer=n}catch{}}cancelScheduledFlush(){this.flushTimer!==void 0&&(clearTimeout(this.flushTimer),this.flushTimer=void 0)}dispatch(t){try{this.send(t)}catch{}}}let zo;function Ho(){return zo||(zo=new Rg(rg,Ag),zo.attachPageLifecycle(typeof window>"u"?void 0:window,typeof document>"u"?void 0:document)),zo}function oh(e){const t=new Map;for(const n of e)t.set(ki(n),n.type);return t}function $g(e,t){const n=oh(t),r=[],i=[];for(const[o,s]of n)e.has(o)||r.push(s);for(const[o,s]of e)n.has(o)||i.push(s);return{added:r,removed:i}}function Og(e){return e.attachmentCount>0||e.hadText}function Dg(e,t){for(const n of t.added)e.add("vibeEdit.selection",{action:"add",elementType:md(n)});for(const n of t.removed)e.add("vibeEdit.selection",{action:"remove",elementType:md(n)})}const Vg=["M11.5 2H10.5C10.3674 2 10.2402 2.05268 10.1464 2.14645C10.0527 2.24021 10 2.36739 10 2.5C10 2.63261 10.0527 2.75979 10.1464 2.85355C10.2402 2.94732 10.3674 3 10.5 3H11V3.5C11 3.63261 11.0527 3.75979 11.1464 3.85355C11.2402 3.94732 11.3674 4 11.5 4C11.6326 4 11.7598 3.94732 11.8536 3.85355C11.9473 3.75979 12 3.63261 12 3.5V2.5C12 2.36739 11.9473 2.24021 11.8536 2.14645C11.7598 2.05268 11.6326 2 11.5 2V2Z","M2.5 8C2.63261 8 2.75979 7.94732 2.85355 7.85355C2.94732 7.75979 3 7.63261 3 7.5V6.5C3 6.36739 2.94732 6.24021 2.85355 6.14645C2.75979 6.05268 2.63261 6 2.5 6C2.36739 6 2.24021 6.05268 2.14645 6.14645C2.05268 6.24021 2 6.36739 2 6.5V7.5C2 7.63261 2.05268 7.75979 2.14645 7.85355C2.24021 7.94732 2.36739 8 2.5 8Z","M11.5 6C11.3674 6 11.2402 6.05268 11.1464 6.14645C11.0527 6.24021 11 6.36739 11 6.5V7.5C11 7.63261 11.0527 7.75979 11.1464 7.85355C11.2402 7.94732 11.3674 8 11.5 8C11.6326 8 11.7598 7.94732 11.8536 7.85355C11.9473 7.75979 12 7.63261 12 7.5V6.5C12 6.36739 11.9473 6.24021 11.8536 6.14645C11.7598 6.05268 11.6326 6 11.5 6Z","M3.5 2H2.5C2.36739 2 2.24021 2.05268 2.14645 2.14645C2.05268 2.24021 2 2.36739 2 2.5V3.5C2 3.63261 2.05268 3.75979 2.14645 3.85355C2.24021 3.94732 2.36739 4 2.5 4C2.63261 4 2.75979 3.94732 2.85355 3.85355C2.94732 3.75979 3 3.63261 3 3.5V3H3.5C3.63261 3 3.75979 2.94732 3.85355 2.85355C3.94732 2.75979 4 2.63261 4 2.5C4 2.36739 3.94732 2.24021 3.85355 2.14645C3.75979 2.05268 3.63261 2 3.5 2V2Z","M6.5 3H7.5C7.63261 3 7.75979 2.94732 7.85355 2.85355C7.94732 2.75979 8 2.63261 8 2.5C8 2.36739 7.94732 2.24021 7.85355 2.14645C7.75979 2.05268 7.63261 2 7.5 2H6.5C6.36739 2 6.24021 2.05268 6.14645 2.14645C6.05268 2.24021 6 2.36739 6 2.5C6 2.63261 6.05268 2.75979 6.14645 2.85355C6.24021 2.94732 6.36739 3 6.5 3V3Z","M3.5 11H3V10.5C3 10.3674 2.94732 10.2402 2.85355 10.1464C2.75979 10.0527 2.63261 10 2.5 10C2.36739 10 2.24021 10.0527 2.14645 10.1464C2.05268 10.2402 2 10.3674 2 10.5V11.5C2 11.6326 2.05268 11.7598 2.14645 11.8536C2.24021 11.9473 2.36739 12 2.5 12H3.5C3.63261 12 3.75979 11.9473 3.85355 11.8536C3.94732 11.7598 4 11.6326 4 11.5C4 11.3674 3.94732 11.2402 3.85355 11.1464C3.75979 11.0527 3.63261 11 3.5 11Z","M6.85002 5.18144C6.78805 5.10177 6.70208 5.04416 6.60483 5.01715C6.50757 4.99013 6.40421 4.99514 6.31002 5.03144C6.21214 5.07132 6.1294 5.14119 6.07371 5.23102C6.01801 5.32086 5.99221 5.42603 6.00002 5.53144V12.5314C6.00052 12.6302 6.03022 12.7265 6.08539 12.8084C6.14055 12.8902 6.21872 12.9539 6.31002 12.9914C6.37257 13.0056 6.43748 13.0056 6.50002 12.9914C6.5656 12.9922 6.63062 12.9793 6.6909 12.9535C6.75117 12.9276 6.80538 12.8895 6.85002 12.8414L8.71002 11.0314H11.5C11.5987 11.0309 11.6951 11.0012 11.777 10.9461C11.8588 10.8909 11.9225 10.8127 11.96 10.7214C12.0009 10.6313 12.0122 10.5306 11.9925 10.4336C11.9727 10.3367 11.9229 10.2484 11.85 10.1814L6.85002 5.18144ZM8.50002 10.0314C8.43445 10.0306 8.36943 10.0436 8.30915 10.0694C8.24888 10.0952 8.19467 10.1334 8.15002 10.1814L7.00002 11.3214V6.74144L10.29 10.0314H8.50002Z"],G_=["M9.00527 7.75427C11.1465 7.75427 12.8824 6.01842 12.8824 3.87714C12.8824 1.73585 11.1465 0 9.00527 0C6.86401 0 5.12817 1.73585 5.12817 3.87714C5.12817 6.01842 6.86401 7.75427 9.00527 7.75427Z","M30.9978 7.75427C33.139 7.75427 34.8749 6.01842 34.8749 3.87714C34.8749 1.73585 33.139 0 30.9978 0C28.8565 0 27.1207 1.73585 27.1207 3.87714C27.1207 6.01842 28.8565 7.75427 30.9978 7.75427Z","M20.0013 48.3291C11.2613 48.3291 1.47456 43.1867 0.331247 41.5454C-0.00920626 41.0575 -0.0905088 40.4732 0.102584 39.9396C0.813978 37.9934 2.15038 34.157 3.07011 30.3154C3.54268 28.3387 3.85265 26.5805 3.98985 25.0815L4.00509 24.9392C4.04066 24.5226 4.07623 24.05 4.1118 23.5164C4.37603 19.8222 4.81811 13.6381 6.38318 10.264C7.69418 7.44893 10.4229 4.21205 19.9962 4.21205C29.4933 4.21205 32.1509 7.11864 33.6093 10.264C35.1743 13.6381 35.6164 19.8222 35.8806 23.5164C35.9213 24.05 35.9518 24.5226 35.9873 24.9087L36.0077 25.0713C36.1449 26.5856 36.4548 28.3489 36.9274 30.3154C37.8471 34.1519 39.1835 37.9934 39.8949 39.9396C40.0931 40.4732 40.0067 41.0575 39.6714 41.5454C38.528 43.1867 28.7413 48.3291 20.0013 48.3291ZM3.5935 39.9955C5.86488 41.4183 13.1211 45.0261 20.0013 45.0261C26.8612 45.0261 34.1276 41.4183 36.4091 39.9955C35.6367 37.8156 34.529 34.4618 33.7211 31.0878C33.2129 28.9637 32.8775 27.0429 32.7251 25.3813C32.7149 25.2949 32.7048 25.234 32.7048 25.1781C32.6743 24.7817 32.6387 24.299 32.5981 23.7502C32.3694 20.5082 31.9375 14.4766 30.6265 11.6564C29.9049 10.1065 28.7057 7.51499 20.0064 7.51499C11.307 7.51499 10.0113 10.3098 9.38628 11.6564C8.07528 14.4816 7.64336 20.5133 7.4147 23.7553C7.37405 24.3041 7.33848 24.7919 7.30799 25.1882C7.30291 25.2441 7.29783 25.2949 7.29275 25.3457C7.13523 27.0429 6.79985 28.9637 6.29171 31.0929C5.47361 34.4618 4.36587 37.8207 3.5935 39.9955Z","M19.8686 39.8437C18.9133 39.8437 14.0606 39.5998 12.0483 34.8487C11.1947 32.8415 11.1032 31.373 11.1032 28.7103C11.1032 26.9877 11.2963 25.4531 11.6774 24.1573C11.967 23.1715 12.3736 22.2924 12.8868 21.5455C13.7252 20.3158 14.8533 19.6044 15.7374 19.1165C18.0444 17.8513 22.1298 17.8614 24.3047 19.1419C25.2904 19.7212 26.3169 20.3818 27.1096 21.5455C27.6228 22.2924 28.0293 23.1715 28.319 24.1573C28.7001 25.4531 28.8932 26.9826 28.8932 28.7103C28.8932 31.2815 28.8931 32.8364 27.9226 34.9046C26.4287 38.0855 23.6644 39.8386 20.1328 39.8437H19.8686ZM19.8737 36.5408H20.1328C22.3788 36.5408 23.9947 35.5194 24.9398 33.5021C25.5648 32.1707 25.5953 31.2307 25.5953 28.7154C25.5953 27.3078 25.448 26.0883 25.1532 25.0974C24.9602 24.447 24.7061 23.8778 24.386 23.4205C23.9744 22.8158 23.3443 22.4195 22.6278 21.9977C21.4642 21.3168 18.5881 21.327 17.3177 22.0231C16.6877 22.3687 16.0474 22.7752 15.6053 23.4205C15.2903 23.8829 15.0311 24.447 14.838 25.0974C14.5484 26.0883 14.3959 27.3078 14.3959 28.7154C14.3959 31.2256 14.4874 32.1657 15.0769 33.558C16.2913 36.3934 19.2842 36.5408 19.8737 36.5408Z","M31.2512 12.8562C30.9869 12.6936 30.7125 12.5259 30.4331 12.409C28.116 11.4588 25.7379 11.4893 23.3699 12.1244C22.2419 12.4243 21.1189 12.6529 19.9857 12.6631C18.8577 12.6631 17.7347 12.4243 16.6015 12.1244C14.2336 11.4842 11.8504 11.4588 9.5384 12.409C9.24877 12.5259 8.97437 12.6834 8.7203 12.8562C8.21724 13.1763 7.98858 13.593 8.11053 14.2332C8.32903 15.4172 8.46623 16.6317 8.68473 17.8157C8.90323 18.9895 9.68577 19.7923 10.8748 19.9041C12.4958 20.0566 14.1218 20.143 15.7529 20.1684C17.0589 20.1938 17.9888 19.6043 18.3597 18.273C18.7052 17.0534 19.0609 15.8288 19.4624 14.6194C19.5437 14.3654 19.8181 14.1723 20.0111 13.9538C20.1941 14.1723 20.4736 14.3654 20.5599 14.6194C20.9614 15.8339 21.3171 17.0534 21.6626 18.273C22.0386 19.6043 22.9685 20.1988 24.2694 20.1684C25.8903 20.143 27.5214 20.0566 29.1475 19.9041C30.3314 19.7923 31.1241 18.9844 31.3376 17.8157C31.5561 16.6215 31.6933 15.4172 31.9118 14.2332C32.0286 13.6031 31.7949 13.1763 31.302 12.8562H31.2512Z","M21.3181 34.1013C21.3689 34.0861 21.4197 34.0708 21.4655 34.0505L21.4604 34.0454C21.4147 34.0657 21.3638 34.081 21.3181 34.1013Z","M18.6603 34.0869C18.6603 34.0869 18.6756 34.092 18.6959 34.1022C18.6807 34.0971 18.6705 34.092 18.6603 34.0869Z","M22.6086 30.7222C22.136 30.5291 21.6177 30.6409 21.2722 30.9661V30.8695V30.0108V27.4345C21.7498 27.2262 22.2021 26.9009 22.5832 26.4589C22.7915 26.22 22.9491 25.9761 23.0558 25.7373C23.1625 25.4985 23.2184 25.2596 23.2184 25.0259C23.2184 24.7464 23.132 24.472 22.9745 24.2434C22.8576 24.0706 22.695 23.9181 22.507 23.7911C22.2224 23.598 21.8667 23.4557 21.45 23.3541C21.0334 23.2576 20.5506 23.2067 20.0069 23.2067C19.5242 23.2067 19.0872 23.2474 18.6959 23.3287C18.1167 23.4456 17.6441 23.6488 17.3087 23.9385C17.141 24.0807 17.0038 24.2484 16.9124 24.4364C16.8209 24.6245 16.7701 24.8328 16.7701 25.0462C16.7701 25.2749 16.826 25.5086 16.9276 25.7475C17.0292 25.9812 17.1817 26.22 17.3849 26.4589C17.7356 26.8705 18.1421 27.1855 18.5841 27.3938C18.6299 27.4142 18.6807 27.4345 18.7264 27.4548V30.0108V30.8695V30.9661C18.3606 30.6256 17.8067 30.524 17.329 30.7476C16.6939 31.0423 16.4195 31.7995 16.7142 32.4346C17.141 33.3493 17.9236 33.8371 18.6553 34.0861C18.6654 34.0912 18.6807 34.0963 18.6909 34.1013C18.8941 34.1776 19.9968 34.5333 21.3129 34.1013C21.3586 34.0861 21.4094 34.0658 21.4551 34.0505C22.1818 33.7863 22.9389 33.2832 23.3048 32.3787C23.5741 31.7232 23.259 30.9813 22.6086 30.7222Z"],zg=J.lazy(()=>kg(()=>import("./VibeEditComposer-D5GykTkw.js"),__vite__mapDeps([0,1]),import.meta.url)),Ed="viz-header-actions";function Hg(e){return e.length>0}function Fg(e){return{label:e.apiName,title:`${e.elementType}: ${e.apiName}`,variant:e.elementType==="field"?"primary":"default"}}function Bg(){return J.createElement("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true"},Vg.map(e=>J.createElement("path",{key:e,d:e,fill:"currentColor"})))}const Wg=20,Ug=2e3;function sh(e){const{nodes:t,fileName:n,options:r}=e,i=r==null?void 0:r.placeholder,o=(r==null?void 0:r.selectLabel)??"Select",s=(r==null?void 0:r.selectingLabel)??"Selecting",l=(r==null?void 0:r.chipFor)??Fg,a=r==null?void 0:r.onActivate,u=(r==null?void 0:r.toggleInline)??!1,[c,d]=V.useState(()=>!u&&cs()&&typeof document<"u"?document.getElementById(Ed):null);V.useEffect(()=>{u||c||!cs()||typeof document>"u"||d(document.getElementById(Ed))},[u,c]);const[f,h]=V.useState(!1),[y,x]=V.useState(null),[_,v]=V.useState([]),p=Mg(),g=Hg(t),w=V.useRef(!1),k=V.useRef(0),C=V.useRef(!1),L=V.useRef(new Map),T=V.useRef(!1),F=V.useRef(!1),P=V.useRef(!1);V.useEffect(()=>{w.current=f},[f]);const j=V.useCallback(G=>{C.current=G},[]),D=V.useCallback(()=>{if(F.current||P.current)return;const G=Math.min(k.current,uu),q=C.current;Og({attachmentCount:G,hadText:q})&&(F.current=!0,Ho().emitNow("vibeEdit.promptAbandoned",{hadText:String(q)},{attachmentCount:G}))},[]),z=V.useCallback(()=>{k.current>0&&(T.current=!0)},[]),E=V.useCallback(()=>{const G=Ho();z(),G.flush("vibeEdit.selection"),w.current&&(w.current=!1,G.emitNow("vibeEdit.selectMode",{action:"exit"}))},[z]);V.useEffect(()=>{const G=$g(L.current,p.items);if(L.current=oh(p.items),k.current=p.items.length,!(G.added.length===0&&G.removed.length===0)){if(T.current){T.current=!1;return}g&&Dg(Ho(),G)}},[p.items,g]),V.useEffect(()=>{if(!g||typeof window>"u")return;const G=()=>{w.current&&D()};return window.addEventListener("pagehide",G),()=>{window.removeEventListener("pagehide",G)}},[g,D]);const O=V.useRef(new Map);V.useEffect(()=>{if(f)return Lg(t,O.current)},[f,t]),V.useEffect(()=>{if(typeof document>"u")return;const G=[];if(f)for(const[q,te]of O.current){const re=te.getAttribute($r)??"";q&&p.isSelected(re,q)&&(te.setAttribute(yd,""),G.push(te))}return()=>{for(const q of G)q.removeAttribute(yd)}},[f,p.selected,t]),V.useEffect(()=>{if(typeof document>"u"||!f)return;const G=new Set;y&&G.add(`${y.type}::${y.id}`);for(const te of _)G.add(`${te.type}::${te.id}`);if(G.size===0)return;const q=[];for(const[te,re]of O.current){const ie=re.getAttribute($r)??"";te&&G.has(`${ie}::${te}`)&&(re.setAttribute(vd,""),q.push(re))}return()=>{for(const te of q)te.removeAttribute(vd)}},[f,y,_,t]);const b=V.useMemo(()=>ra(p.items,t,n),[t,p.items,n]),$=V.useMemo(()=>b.map(l),[b,l]),S=V.useCallback(G=>{const q={prompt:G.trim(),attachments:b},te=th({type:Qt.SUBMIT_EDIT,payload:q});return te&&(E(),p.clear(),h(!1)),te},[b,p,E]),N=V.useMemo(()=>p.items.flatMap(G=>{const[q]=ra([G],t,n);return q?[{id:G.id,elementType:q.elementType,label:l(q).label,data:q}]:[]}),[p.items,t,n,l]),I=V.useCallback(G=>{const q=O.current.get(G);if(q)return q;if(typeof document>"u")return null;const te=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(G):G;return document.querySelector(`[data-mv-id="${te}"]`)},[]),R=V.useRef(null),B=V.useCallback(()=>{var G;return(G=R.current)==null?void 0:G.focus()},[]),Z=V.useCallback(async(G,q,te)=>{const re=G.map(Vt=>({type:"",id:Vt})),ie=ra(re,t,n),fe=[];let Be=0;for(const Vt of ie.slice(0,Wg)){const on=`@${Vt.apiName}`;if(fe.length>0&&Be+on.length+1>Ug)break;fe.push(on),Be+=on.length+1}const ot=ie.length-fe.length,Ln={prompt:[(ot>0?[...fe,`and ${ot} more`]:fe).join(" "),q.trim()].filter(Vt=>Vt.length>0).join(" "),attachments:ie,chatTarget:te,selectionIds:G};let nn;P.current=!0;try{nn=await ig(Ln)}finally{P.current=!1}const{result:rn}=nn;return E(),p.clear(),h(!1),rn.conversationId?{chatId:rn.conversationId}:void 0},[t,n,p,E]),A=V.useCallback(G=>{const q=p.items.find(te=>te.id===G);q&&p.toggle(q)},[p]),M=V.useCallback(G=>{const q=p.items[G];q&&p.toggle(q)},[p]),H=V.useCallback((G,q)=>{f&&p.toggle({type:G,id:q})},[f,p]),W=V.useCallback(()=>{const G=Ho();if(!w.current){w.current=!0,F.current=!1,G.emitNow("vibeEdit.selectMode",{action:"enter"}),h(!0);return}w.current=!1,D(),z(),p.clear(),x(null),v([]),h(!1),G.flush("vibeEdit.selection"),G.emitNow("vibeEdit.selectMode",{action:"exit"})},[p,D,z]);if(!g)return{toggleButton:null,overlay:null,panel:null,selectMode:!1,isSelected:()=>!1,toggle:()=>{}};const U=J.createElement("button",{ref:R,className:`mv-vibe-edit-toggle ${f?"mv-vibe-edit-toggle--active":""}`,onClick:W,"aria-label":"Select components to edit with AI",title:"Select components to edit with AI",type:"button"},J.createElement(Bg,null),J.createElement("span",null,f?s:o)),Y=c?J2.createPortal(U,c):U,X=J.createElement(Ng,{active:f,selected:p.selected,onReplace:p.replace,onAdd:p.add,onToggle:p.toggle,onClear:p.clear,onActivate:a?G=>a(G.id):void 0,onHover:x,onMarqueePreview:v});let K;return cs()?K=J.createElement(J.Suspense,{fallback:null},J.createElement(zg,{elements:N,active:f,nodeFor:I,onEdit:Z,onDeselect:A,onSent:B,onClose:B,onDraftChange:j})):K=J.createElement(Tg,{chips:$,onSubmit:S,onClear:p.clear,onRemove:M,placeholder:i,onDraftChange:j}),{toggleButton:Y,overlay:X,panel:K,selectMode:f,isSelected:p.isSelected,toggle:H}}function Se(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Se(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Zg={value:()=>{}};function ml(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ds(n)}function ds(e){this._=e}function Yg(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ds.prototype=ml.prototype={constructor:ds,on:function(e,t){var n=this._,r=Yg(e+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(e=r[o]).type)&&(i=Gg(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<s;)if(i=(e=r[o]).type)n[i]=kd(n[i],e.name,t);else if(t==null)for(i in n)n[i]=kd(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ds(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function Gg(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function kd(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Zg,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var du="http://www.w3.org/1999/xhtml";const Sd={svg:"http://www.w3.org/2000/svg",xhtml:du,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function yl(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Sd.hasOwnProperty(t)?{space:Sd[t],local:e}:e}function Xg(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===du&&t.documentElement.namespaceURI===du?t.createElement(e):t.createElementNS(n,e)}}function Kg(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function lh(e){var t=yl(e);return(t.local?Kg:Xg)(t)}function Qg(){}function Sc(e){return e==null?Qg:function(){return this.querySelector(e)}}function qg(e){typeof e!="function"&&(e=Sc(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,l=r[i]=new Array(s),a,u,c=0;c<s;++c)(a=o[c])&&(u=e.call(a,a.__data__,c,o))&&("__data__"in a&&(u.__data__=a.__data__),l[c]=u);return new nt(r,this._parents)}function Jg(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function e5(){return[]}function ah(e){return e==null?e5:function(){return this.querySelectorAll(e)}}function t5(e){return function(){return Jg(e.apply(this,arguments))}}function n5(e){typeof e=="function"?e=t5(e):e=ah(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var s=t[o],l=s.length,a,u=0;u<l;++u)(a=s[u])&&(r.push(e.call(a,a.__data__,u,s)),i.push(a));return new nt(r,i)}function uh(e){return function(){return this.matches(e)}}function ch(e){return function(t){return t.matches(e)}}var r5=Array.prototype.find;function i5(e){return function(){return r5.call(this.children,e)}}function o5(){return this.firstElementChild}function s5(e){return this.select(e==null?o5:i5(typeof e=="function"?e:ch(e)))}var l5=Array.prototype.filter;function a5(){return Array.from(this.children)}function u5(e){return function(){return l5.call(this.children,e)}}function c5(e){return this.selectAll(e==null?a5:u5(typeof e=="function"?e:ch(e)))}function d5(e){typeof e!="function"&&(e=uh(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,l=r[i]=[],a,u=0;u<s;++u)(a=o[u])&&e.call(a,a.__data__,u,o)&&l.push(a);return new nt(r,this._parents)}function dh(e){return new Array(e.length)}function f5(){return new nt(this._enter||this._groups.map(dh),this._parents)}function Hs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Hs.prototype={constructor:Hs,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function h5(e){return function(){return e}}function p5(e,t,n,r,i,o){for(var s=0,l,a=t.length,u=o.length;s<u;++s)(l=t[s])?(l.__data__=o[s],r[s]=l):n[s]=new Hs(e,o[s]);for(;s<a;++s)(l=t[s])&&(i[s]=l)}function g5(e,t,n,r,i,o,s){var l,a,u=new Map,c=t.length,d=o.length,f=new Array(c),h;for(l=0;l<c;++l)(a=t[l])&&(f[l]=h=s.call(a,a.__data__,l,t)+"",u.has(h)?i[l]=a:u.set(h,a));for(l=0;l<d;++l)h=s.call(e,o[l],l,o)+"",(a=u.get(h))?(r[l]=a,a.__data__=o[l],u.delete(h)):n[l]=new Hs(e,o[l]);for(l=0;l<c;++l)(a=t[l])&&u.get(f[l])===a&&(i[l]=a)}function m5(e){return e.__data__}function y5(e,t){if(!arguments.length)return Array.from(this,m5);var n=t?g5:p5,r=this._parents,i=this._groups;typeof e!="function"&&(e=h5(e));for(var o=i.length,s=new Array(o),l=new Array(o),a=new Array(o),u=0;u<o;++u){var c=r[u],d=i[u],f=d.length,h=v5(e.call(c,c&&c.__data__,u,r)),y=h.length,x=l[u]=new Array(y),_=s[u]=new Array(y),v=a[u]=new Array(f);n(c,d,x,_,v,h,t);for(var p=0,g=0,w,k;p<y;++p)if(w=x[p]){for(p>=g&&(g=p+1);!(k=_[g])&&++g<y;);w._next=k||null}}return s=new nt(s,r),s._enter=l,s._exit=a,s}function v5(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function w5(){return new nt(this._exit||this._groups.map(dh),this._parents)}function x5(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function C5(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,s=Math.min(i,o),l=new Array(i),a=0;a<s;++a)for(var u=n[a],c=r[a],d=u.length,f=l[a]=new Array(d),h,y=0;y<d;++y)(h=u[y]||c[y])&&(f[y]=h);for(;a<i;++a)l[a]=n[a];return new nt(l,this._parents)}function _5(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function E5(e){e||(e=k5);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],l=s.length,a=i[o]=new Array(l),u,c=0;c<l;++c)(u=s[c])&&(a[c]=u);a.sort(t)}return new nt(i,this._parents).order()}function k5(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function S5(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function N5(){return Array.from(this)}function M5(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function I5(){let e=0;for(const t of this)++e;return e}function L5(){return!this.node()}function b5(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,s=i.length,l;o<s;++o)(l=i[o])&&e.call(l,l.__data__,o,i);return this}function j5(e){return function(){this.removeAttribute(e)}}function T5(e){return function(){this.removeAttributeNS(e.space,e.local)}}function P5(e,t){return function(){this.setAttribute(e,t)}}function A5(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function R5(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function $5(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function O5(e,t){var n=yl(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?T5:j5:typeof t=="function"?n.local?$5:R5:n.local?A5:P5)(n,t))}function fh(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function D5(e){return function(){this.style.removeProperty(e)}}function V5(e,t,n){return function(){this.style.setProperty(e,t,n)}}function z5(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function H5(e,t,n){return arguments.length>1?this.each((t==null?D5:typeof t=="function"?z5:V5)(e,t,n??"")):Or(this.node(),e)}function Or(e,t){return e.style.getPropertyValue(t)||fh(e).getComputedStyle(e,null).getPropertyValue(t)}function F5(e){return function(){delete this[e]}}function B5(e,t){return function(){this[e]=t}}function W5(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function U5(e,t){return arguments.length>1?this.each((t==null?F5:typeof t=="function"?W5:B5)(e,t)):this.node()[e]}function hh(e){return e.trim().split(/^|\s+/)}function Nc(e){return e.classList||new ph(e)}function ph(e){this._node=e,this._names=hh(e.getAttribute("class")||"")}ph.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 gh(e,t){for(var n=Nc(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function mh(e,t){for(var n=Nc(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Z5(e){return function(){gh(this,e)}}function Y5(e){return function(){mh(this,e)}}function G5(e,t){return function(){(t.apply(this,arguments)?gh:mh)(this,e)}}function X5(e,t){var n=hh(e+"");if(arguments.length<2){for(var r=Nc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?G5:t?Z5:Y5)(n,t))}function K5(){this.textContent=""}function Q5(e){return function(){this.textContent=e}}function q5(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function J5(e){return arguments.length?this.each(e==null?K5:(typeof e=="function"?q5:Q5)(e)):this.node().textContent}function em(){this.innerHTML=""}function tm(e){return function(){this.innerHTML=e}}function nm(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function rm(e){return arguments.length?this.each(e==null?em:(typeof e=="function"?nm:tm)(e)):this.node().innerHTML}function im(){this.nextSibling&&this.parentNode.appendChild(this)}function om(){return this.each(im)}function sm(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function lm(){return this.each(sm)}function am(e){var t=typeof e=="function"?e:lh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function um(){return null}function cm(e,t){var n=typeof e=="function"?e:lh(e),r=t==null?um:typeof t=="function"?t:Sc(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function dm(){var e=this.parentNode;e&&e.removeChild(this)}function fm(){return this.each(dm)}function hm(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function pm(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function gm(e){return this.select(e?pm:hm)}function mm(e){return arguments.length?this.property("__data__",e):this.node().__data__}function ym(e){return function(t){e.call(this,t,this.__data__)}}function vm(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function wm(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function xm(e,t,n){return function(){var r=this.__on,i,o=ym(t);if(r){for(var s=0,l=r.length;s<l;++s)if((i=r[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Cm(e,t,n){var r=vm(e+""),i,o=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,c;a<u;++a)for(i=0,c=l[a];i<o;++i)if((s=r[i]).type===c.type&&s.name===c.name)return c.value}return}for(l=t?xm:wm,i=0;i<o;++i)this.each(l(r[i],t,n));return this}function yh(e,t,n){var r=fh(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function _m(e,t){return function(){return yh(this,e,t)}}function Em(e,t){return function(){return yh(this,e,t.apply(this,arguments))}}function km(e,t){return this.each((typeof t=="function"?Em:_m)(e,t))}function*Sm(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var vh=[null];function nt(e,t){this._groups=e,this._parents=t}function io(){return new nt([[document.documentElement]],vh)}function Nm(){return this}nt.prototype=io.prototype={constructor:nt,select:qg,selectAll:n5,selectChild:s5,selectChildren:c5,filter:d5,data:y5,enter:f5,exit:w5,join:x5,merge:C5,selection:Nm,order:_5,sort:E5,call:S5,nodes:N5,node:M5,size:I5,empty:L5,each:b5,attr:O5,style:H5,property:U5,classed:X5,text:J5,html:rm,raise:om,lower:lm,append:am,insert:cm,remove:fm,clone:gm,datum:mm,on:Cm,dispatch:km,[Symbol.iterator]:Sm};function qe(e){return typeof e=="string"?new nt([[document.querySelector(e)]],[document.documentElement]):new nt([[e]],vh)}function Mm(e){let t;for(;t=e.sourceEvent;)e=t;return e}function vt(e,t){if(e=Mm(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const Im={passive:!1},Wi={capture:!0,passive:!1};function ia(e){e.stopImmediatePropagation()}function Sr(e){e.preventDefault(),e.stopImmediatePropagation()}function wh(e){var t=e.document.documentElement,n=qe(e).on("dragstart.drag",Sr,Wi);"onselectstart"in t?n.on("selectstart.drag",Sr,Wi):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function xh(e,t){var n=e.document.documentElement,r=qe(e).on("dragstart.drag",null);t&&(r.on("click.drag",Sr,Wi),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Fo=e=>()=>e;function fu(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:s,y:l,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}fu.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Lm(e){return!e.ctrlKey&&!e.button}function bm(){return this.parentNode}function jm(e,t){return t??{x:e.x,y:e.y}}function Tm(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ch(){var e=Lm,t=bm,n=jm,r=Tm,i={},o=ml("start","drag","end"),s=0,l,a,u,c,d=0;function f(w){w.on("mousedown.drag",h).filter(r).on("touchstart.drag",_).on("touchmove.drag",v,Im).on("touchend.drag touchcancel.drag",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(w,k){if(!(c||!e.call(this,w,k))){var C=g(this,t.call(this,w,k),w,k,"mouse");C&&(qe(w.view).on("mousemove.drag",y,Wi).on("mouseup.drag",x,Wi),wh(w.view),ia(w),u=!1,l=w.clientX,a=w.clientY,C("start",w))}}function y(w){if(Sr(w),!u){var k=w.clientX-l,C=w.clientY-a;u=k*k+C*C>d}i.mouse("drag",w)}function x(w){qe(w.view).on("mousemove.drag mouseup.drag",null),xh(w.view,u),Sr(w),i.mouse("end",w)}function _(w,k){if(e.call(this,w,k)){var C=w.changedTouches,L=t.call(this,w,k),T=C.length,F,P;for(F=0;F<T;++F)(P=g(this,L,w,k,C[F].identifier,C[F]))&&(ia(w),P("start",w,C[F]))}}function v(w){var k=w.changedTouches,C=k.length,L,T;for(L=0;L<C;++L)(T=i[k[L].identifier])&&(Sr(w),T("drag",w,k[L]))}function p(w){var k=w.changedTouches,C=k.length,L,T;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),L=0;L<C;++L)(T=i[k[L].identifier])&&(ia(w),T("end",w,k[L]))}function g(w,k,C,L,T,F){var P=o.copy(),j=vt(F||C,k),D,z,E;if((E=n.call(w,new fu("beforestart",{sourceEvent:C,target:f,identifier:T,active:s,x:j[0],y:j[1],dx:0,dy:0,dispatch:P}),L))!=null)return D=E.x-j[0]||0,z=E.y-j[1]||0,function O(b,$,S){var N=j,I;switch(b){case"start":i[T]=O,I=s++;break;case"end":delete i[T],--s;case"drag":j=vt(S||$,k),I=s;break}P.call(b,w,new fu(b,{sourceEvent:$,subject:E,target:f,identifier:T,active:I,x:j[0]+D,y:j[1]+z,dx:j[0]-N[0],dy:j[1]-N[1],dispatch:P}),L)}}return f.filter=function(w){return arguments.length?(e=typeof w=="function"?w:Fo(!!w),f):e},f.container=function(w){return arguments.length?(t=typeof w=="function"?w:Fo(w),f):t},f.subject=function(w){return arguments.length?(n=typeof w=="function"?w:Fo(w),f):n},f.touchable=function(w){return arguments.length?(r=typeof w=="function"?w:Fo(!!w),f):r},f.on=function(){var w=o.on.apply(o,arguments);return w===o?f:w},f.clickDistance=function(w){return arguments.length?(d=(w=+w)*w,f):Math.sqrt(d)},f}function Mc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _h(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function oo(){}var Ui=.7,Fs=1/Ui,Nr="\\s*([+-]?\\d+)\\s*",Zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Rt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pm=/^#([0-9a-f]{3,8})$/,Am=new RegExp(`^rgb\\(${Nr},${Nr},${Nr}\\)$`),Rm=new RegExp(`^rgb\\(${Rt},${Rt},${Rt}\\)$`),$m=new RegExp(`^rgba\\(${Nr},${Nr},${Nr},${Zi}\\)$`),Om=new RegExp(`^rgba\\(${Rt},${Rt},${Rt},${Zi}\\)$`),Dm=new RegExp(`^hsl\\(${Zi},${Rt},${Rt}\\)$`),Vm=new RegExp(`^hsla\\(${Zi},${Rt},${Rt},${Zi}\\)$`),Nd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Mc(oo,Xn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Md,formatHex:Md,formatHex8:zm,formatHsl:Hm,formatRgb:Id,toString:Id});function Md(){return this.rgb().formatHex()}function zm(){return this.rgb().formatHex8()}function Hm(){return Eh(this).formatHsl()}function Id(){return this.rgb().formatRgb()}function Xn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Pm.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Ld(t):n===3?new Ye(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Bo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Bo(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=Am.exec(e))?new Ye(t[1],t[2],t[3],1):(t=Rm.exec(e))?new Ye(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$m.exec(e))?Bo(t[1],t[2],t[3],t[4]):(t=Om.exec(e))?Bo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Dm.exec(e))?Td(t[1],t[2]/100,t[3]/100,1):(t=Vm.exec(e))?Td(t[1],t[2]/100,t[3]/100,t[4]):Nd.hasOwnProperty(e)?Ld(Nd[e]):e==="transparent"?new Ye(NaN,NaN,NaN,0):null}function Ld(e){return new Ye(e>>16&255,e>>8&255,e&255,1)}function Bo(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ye(e,t,n,r)}function Fm(e){return e instanceof oo||(e=Xn(e)),e?(e=e.rgb(),new Ye(e.r,e.g,e.b,e.opacity)):new Ye}function hu(e,t,n,r){return arguments.length===1?Fm(e):new Ye(e,t,n,r??1)}function Ye(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Mc(Ye,hu,_h(oo,{brighter(e){return e=e==null?Fs:Math.pow(Fs,e),new Ye(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ui:Math.pow(Ui,e),new Ye(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ye(zn(this.r),zn(this.g),zn(this.b),Bs(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:bd,formatHex:bd,formatHex8:Bm,formatRgb:jd,toString:jd}));function bd(){return`#${$n(this.r)}${$n(this.g)}${$n(this.b)}`}function Bm(){return`#${$n(this.r)}${$n(this.g)}${$n(this.b)}${$n((isNaN(this.opacity)?1:this.opacity)*255)}`}function jd(){const e=Bs(this.opacity);return`${e===1?"rgb(":"rgba("}${zn(this.r)}, ${zn(this.g)}, ${zn(this.b)}${e===1?")":`, ${e})`}`}function Bs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function $n(e){return e=zn(e),(e<16?"0":"")+e.toString(16)}function Td(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ct(e,t,n,r)}function Eh(e){if(e instanceof Ct)return new Ct(e.h,e.s,e.l,e.opacity);if(e instanceof oo||(e=Xn(e)),!e)return new Ct;if(e instanceof Ct)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,l=o-i,a=(o+i)/2;return l?(t===o?s=(n-r)/l+(n<r)*6:n===o?s=(r-t)/l+2:s=(t-n)/l+4,l/=a<.5?o+i:2-o-i,s*=60):l=a>0&&a<1?0:s,new Ct(s,l,a,e.opacity)}function Wm(e,t,n,r){return arguments.length===1?Eh(e):new Ct(e,t,n,r??1)}function Ct(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Mc(Ct,Wm,_h(oo,{brighter(e){return e=e==null?Fs:Math.pow(Fs,e),new Ct(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ui:Math.pow(Ui,e),new Ct(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ye(oa(e>=240?e-240:e+120,i,r),oa(e,i,r),oa(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ct(Pd(this.h),Wo(this.s),Wo(this.l),Bs(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=Bs(this.opacity);return`${e===1?"hsl(":"hsla("}${Pd(this.h)}, ${Wo(this.s)*100}%, ${Wo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Pd(e){return e=(e||0)%360,e<0?e+360:e}function Wo(e){return Math.max(0,Math.min(1,e||0))}function oa(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Ic=e=>()=>e;function Um(e,t){return function(n){return e+n*t}}function Zm(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Ym(e){return(e=+e)==1?kh:function(t,n){return n-t?Zm(t,n,e):Ic(isNaN(t)?n:t)}}function kh(e,t){var n=t-e;return n?Um(e,n):Ic(isNaN(e)?t:e)}const Ws=function e(t){var n=Ym(t);function r(i,o){var s=n((i=hu(i)).r,(o=hu(o)).r),l=n(i.g,o.g),a=n(i.b,o.b),u=kh(i.opacity,o.opacity);return function(c){return i.r=s(c),i.g=l(c),i.b=a(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function Gm(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function Xm(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Km(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Si(e[s],t[s]);for(;s<n;++s)o[s]=t[s];return function(l){for(s=0;s<r;++s)o[s]=i[s](l);return o}}function Qm(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function jt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function qm(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Si(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var pu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sa=new RegExp(pu.source,"g");function Jm(e){return function(){return e}}function e9(e){return function(t){return e(t)+""}}function Sh(e,t){var n=pu.lastIndex=sa.lastIndex=0,r,i,o,s=-1,l=[],a=[];for(e=e+"",t=t+"";(r=pu.exec(e))&&(i=sa.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,a.push({i:s,x:jt(r,i)})),n=sa.lastIndex;return n<t.length&&(o=t.slice(n),l[s]?l[s]+=o:l[++s]=o),l.length<2?a[0]?e9(a[0].x):Jm(t):(t=a.length,function(u){for(var c=0,d;c<t;++c)l[(d=a[c]).i]=d.x(u);return l.join("")})}function Si(e,t){var n=typeof t,r;return t==null||n==="boolean"?Ic(t):(n==="number"?jt:n==="string"?(r=Xn(t))?(t=r,Ws):Sh:t instanceof Xn?Ws:t instanceof Date?Qm:Xm(t)?Gm:Array.isArray(t)?Km:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?qm:jt)(e,t)}var Ad=180/Math.PI,gu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Nh(e,t,n,r,i,o){var s,l,a;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(a=e*n+t*r)&&(n-=e*a,r-=t*a),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,a/=l),e*r<t*n&&(e=-e,t=-t,a=-a,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Ad,skewX:Math.atan(a)*Ad,scaleX:s,scaleY:l}}var Uo;function t9(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?gu:Nh(t.a,t.b,t.c,t.d,t.e,t.f)}function n9(e){return e==null||(Uo||(Uo=document.createElementNS("http://www.w3.org/2000/svg","g")),Uo.setAttribute("transform",e),!(e=Uo.transform.baseVal.consolidate()))?gu:(e=e.matrix,Nh(e.a,e.b,e.c,e.d,e.e,e.f))}function Mh(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,d,f,h,y){if(u!==d||c!==f){var x=h.push("translate(",null,t,null,n);y.push({i:x-4,x:jt(u,d)},{i:x-2,x:jt(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function s(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,r)-2,x:jt(u,c)})):c&&d.push(i(d)+"rotate("+c+r)}function l(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,r)-2,x:jt(u,c)}):c&&d.push(i(d)+"skewX("+c+r)}function a(u,c,d,f,h,y){if(u!==d||c!==f){var x=h.push(i(h)+"scale(",null,",",null,")");y.push({i:x-4,x:jt(u,d)},{i:x-2,x:jt(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,d,f),s(u.rotate,c.rotate,d,f),l(u.skewX,c.skewX,d,f),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var y=-1,x=f.length,_;++y<x;)d[(_=f[y]).i]=_.x(h);return d.join("")}}}var r9=Mh(t9,"px, ","px)","deg)"),i9=Mh(n9,", ",")",")"),o9=1e-12;function Rd(e){return((e=Math.exp(e))+1/e)/2}function s9(e){return((e=Math.exp(e))-1/e)/2}function l9(e){return((e=Math.exp(2*e))-1)/(e+1)}const fs=function e(t,n,r){function i(o,s){var l=o[0],a=o[1],u=o[2],c=s[0],d=s[1],f=s[2],h=c-l,y=d-a,x=h*h+y*y,_,v;if(x<o9)v=Math.log(f/u)/t,_=function(L){return[l+L*h,a+L*y,u*Math.exp(t*L*v)]};else{var p=Math.sqrt(x),g=(f*f-u*u+r*x)/(2*u*n*p),w=(f*f-u*u-r*x)/(2*f*n*p),k=Math.log(Math.sqrt(g*g+1)-g),C=Math.log(Math.sqrt(w*w+1)-w);v=(C-k)/t,_=function(L){var T=L*v,F=Rd(k),P=u/(n*p)*(F*l9(t*T+k)-s9(k));return[l+P*h,a+P*y,u*F/Rd(t*T+k)]}}return _.duration=v*1e3*t/Math.SQRT2,_}return i.rho=function(o){var s=Math.max(.001,+o),l=s*s,a=l*l;return e(s,l,a)},i}(Math.SQRT2,2,4);var Dr=0,hi=0,li=0,Ih=1e3,Us,pi,Zs=0,Kn=0,vl=0,Yi=typeof performance=="object"&&performance.now?performance:Date,Lh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Lc(){return Kn||(Lh(a9),Kn=Yi.now()+vl)}function a9(){Kn=0}function Ys(){this._call=this._time=this._next=null}Ys.prototype=bh.prototype={constructor:Ys,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Lc():+n)+(t==null?0:+t),!this._next&&pi!==this&&(pi?pi._next=this:Us=this,pi=this),this._call=e,this._time=n,mu()},stop:function(){this._call&&(this._call=null,this._time=1/0,mu())}};function bh(e,t,n){var r=new Ys;return r.restart(e,t,n),r}function u9(){Lc(),++Dr;for(var e=Us,t;e;)(t=Kn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Dr}function $d(){Kn=(Zs=Yi.now())+vl,Dr=hi=0;try{u9()}finally{Dr=0,d9(),Kn=0}}function c9(){var e=Yi.now(),t=e-Zs;t>Ih&&(vl-=t,Zs=e)}function d9(){for(var e,t=Us,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Us=n);pi=e,mu(r)}function mu(e){if(!Dr){hi&&(hi=clearTimeout(hi));var t=e-Kn;t>24?(e<1/0&&(hi=setTimeout($d,e-Yi.now()-vl)),li&&(li=clearInterval(li))):(li||(Zs=Yi.now(),li=setInterval(c9,Ih)),Dr=1,Lh($d))}}function Od(e,t,n){var r=new Ys;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var f9=ml("start","end","cancel","interrupt"),h9=[],jh=0,Dd=1,yu=2,hs=3,Vd=4,vu=5,ps=6;function wl(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;p9(e,n,{name:t,index:r,group:i,on:f9,tween:h9,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:jh})}function bc(e,t){var n=It(e,t);if(n.state>jh)throw new Error("too late; already scheduled");return n}function Dt(e,t){var n=It(e,t);if(n.state>hs)throw new Error("too late; already running");return n}function It(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function p9(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=bh(o,0,n.time);function o(u){n.state=Dd,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,d,f,h;if(n.state!==Dd)return a();for(c in r)if(h=r[c],h.name===n.name){if(h.state===hs)return Od(s);h.state===Vd?(h.state=ps,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=ps,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(Od(function(){n.state===hs&&(n.state=Vd,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=yu,n.on.call("start",e,e.__data__,n.index,n.group),n.state===yu){for(n.state=hs,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function l(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=vu,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===vu&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=ps,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function gs(e,t){var n=e.__transition,r,i,o=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){o=!1;continue}i=r.state>yu&&r.state<vu,r.state=ps,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}o&&delete e.__transition}}function g9(e){return this.each(function(){gs(this,e)})}function m9(e,t){var n,r;return function(){var i=Dt(this,e),o=i.tween;if(o!==n){r=n=o;for(var s=0,l=r.length;s<l;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function y9(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Dt(this,e),s=o.tween;if(s!==r){i=(r=s).slice();for(var l={name:t,value:n},a=0,u=i.length;a<u;++a)if(i[a].name===t){i[a]=l;break}a===u&&i.push(l)}o.tween=i}}function v9(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=It(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===e)return s.value;return null}return this.each((t==null?m9:y9)(n,e,t))}function jc(e,t,n){var r=e._id;return e.each(function(){var i=Dt(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return It(i,r).value[t]}}function Th(e,t){var n;return(typeof t=="number"?jt:t instanceof Xn?Ws:(n=Xn(t))?(t=n,Ws):Sh)(e,t)}function w9(e){return function(){this.removeAttribute(e)}}function x9(e){return function(){this.removeAttributeNS(e.space,e.local)}}function C9(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttribute(e);return s===i?null:s===r?o:o=t(r=s,n)}}function _9(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?o:o=t(r=s,n)}}function E9(e,t,n){var r,i,o;return function(){var s,l=n(this),a;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),a=l+"",s===a?null:s===r&&a===i?o:(i=a,o=t(r=s,l)))}}function k9(e,t,n){var r,i,o;return function(){var s,l=n(this),a;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),a=l+"",s===a?null:s===r&&a===i?o:(i=a,o=t(r=s,l)))}}function S9(e,t){var n=yl(e),r=n==="transform"?i9:Th;return this.attrTween(e,typeof t=="function"?(n.local?k9:E9)(n,r,jc(this,"attr."+e,t)):t==null?(n.local?x9:w9)(n):(n.local?_9:C9)(n,r,t))}function N9(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function M9(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function I9(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&M9(e,o)),n}return i._value=t,i}function L9(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&N9(e,o)),n}return i._value=t,i}function b9(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=yl(e);return this.tween(n,(r.local?I9:L9)(r,t))}function j9(e,t){return function(){bc(this,e).delay=+t.apply(this,arguments)}}function T9(e,t){return t=+t,function(){bc(this,e).delay=t}}function P9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?j9:T9)(t,e)):It(this.node(),t).delay}function A9(e,t){return function(){Dt(this,e).duration=+t.apply(this,arguments)}}function R9(e,t){return t=+t,function(){Dt(this,e).duration=t}}function $9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?A9:R9)(t,e)):It(this.node(),t).duration}function O9(e,t){if(typeof t!="function")throw new Error;return function(){Dt(this,e).ease=t}}function D9(e){var t=this._id;return arguments.length?this.each(O9(t,e)):It(this.node(),t).ease}function V9(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Dt(this,e).ease=n}}function z9(e){if(typeof e!="function")throw new Error;return this.each(V9(this._id,e))}function H9(e){typeof e!="function"&&(e=uh(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,l=r[i]=[],a,u=0;u<s;++u)(a=o[u])&&e.call(a,a.__data__,u,o)&&l.push(a);return new qt(r,this._parents,this._name,this._id)}function F9(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),s=new Array(r),l=0;l<o;++l)for(var a=t[l],u=n[l],c=a.length,d=s[l]=new Array(c),f,h=0;h<c;++h)(f=a[h]||u[h])&&(d[h]=f);for(;l<r;++l)s[l]=t[l];return new qt(s,this._parents,this._name,this._id)}function B9(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function W9(e,t,n){var r,i,o=B9(t)?bc:Dt;return function(){var s=o(this,e),l=s.on;l!==r&&(i=(r=l).copy()).on(t,n),s.on=i}}function U9(e,t){var n=this._id;return arguments.length<2?It(this.node(),n).on.on(e):this.each(W9(n,e,t))}function Z9(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Y9(){return this.on("end.remove",Z9(this._id))}function G9(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Sc(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var l=r[s],a=l.length,u=o[s]=new Array(a),c,d,f=0;f<a;++f)(c=l[f])&&(d=e.call(c,c.__data__,f,l))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,wl(u[f],t,n,f,u,It(c,n)));return new qt(o,this._parents,t,n)}function X9(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ah(e));for(var r=this._groups,i=r.length,o=[],s=[],l=0;l<i;++l)for(var a=r[l],u=a.length,c,d=0;d<u;++d)if(c=a[d]){for(var f=e.call(c,c.__data__,d,a),h,y=It(c,n),x=0,_=f.length;x<_;++x)(h=f[x])&&wl(h,t,n,x,f,y);o.push(f),s.push(c)}return new qt(o,s,t,n)}var K9=io.prototype.constructor;function Q9(){return new K9(this._groups,this._parents)}function q9(e,t){var n,r,i;return function(){var o=Or(this,e),s=(this.style.removeProperty(e),Or(this,e));return o===s?null:o===n&&s===r?i:i=t(n=o,r=s)}}function Ph(e){return function(){this.style.removeProperty(e)}}function J9(e,t,n){var r,i=n+"",o;return function(){var s=Or(this,e);return s===i?null:s===r?o:o=t(r=s,n)}}function e7(e,t,n){var r,i,o;return function(){var s=Or(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),Or(this,e))),s===a?null:s===r&&a===i?o:(i=a,o=t(r=s,l))}}function t7(e,t){var n,r,i,o="style."+t,s="end."+o,l;return function(){var a=Dt(this,e),u=a.on,c=a.value[o]==null?l||(l=Ph(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(s,i=c),a.on=r}}function n7(e,t,n){var r=(e+="")=="transform"?r9:Th;return t==null?this.styleTween(e,q9(e,r)).on("end.style."+e,Ph(e)):typeof t=="function"?this.styleTween(e,e7(e,r,jc(this,"style."+e,t))).each(t7(this._id,e)):this.styleTween(e,J9(e,r,t),n).on("end.style."+e,null)}function r7(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function i7(e,t,n){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&r7(e,s,n)),r}return o._value=t,o}function o7(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,i7(e,t,n??""))}function s7(e){return function(){this.textContent=e}}function l7(e){return function(){var t=e(this);this.textContent=t??""}}function a7(e){return this.tween("text",typeof e=="function"?l7(jc(this,"text",e)):s7(e==null?"":e+""))}function u7(e){return function(t){this.textContent=e.call(this,t)}}function c7(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&u7(i)),t}return r._value=e,r}function d7(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,c7(e))}function f7(){for(var e=this._name,t=this._id,n=Ah(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],l=s.length,a,u=0;u<l;++u)if(a=s[u]){var c=It(a,t);wl(a,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new qt(r,this._parents,e,n)}function h7(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var l={value:s},a={value:function(){--i===0&&o()}};n.each(function(){var u=Dt(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),i===0&&o()})}var p7=0;function qt(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ah(){return++p7}var zt=io.prototype;qt.prototype={constructor:qt,select:G9,selectAll:X9,selectChild:zt.selectChild,selectChildren:zt.selectChildren,filter:H9,merge:F9,selection:Q9,transition:f7,call:zt.call,nodes:zt.nodes,node:zt.node,size:zt.size,empty:zt.empty,each:zt.each,on:U9,attr:S9,attrTween:b9,style:n7,styleTween:o7,text:a7,textTween:d7,remove:Y9,tween:v9,delay:P9,duration:$9,ease:D9,easeVarying:z9,end:h7,[Symbol.iterator]:zt[Symbol.iterator]};function g7(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var m7={time:null,delay:0,duration:250,ease:g7};function y7(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function v7(e){var t,n;e instanceof qt?(t=e._id,e=e._name):(t=Ah(),(n=m7).time=Lc(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],l=s.length,a,u=0;u<l;++u)(a=s[u])&&wl(a,e,t,u,s,n||y7(a,t));return new qt(r,this._parents,e,t)}io.prototype.interrupt=g9;io.prototype.transition=v7;const Zo=e=>()=>e;function w7(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Ut(e,t,n){this.k=e,this.x=t,this.y=n}Ut.prototype={constructor:Ut,scale:function(e){return e===1?this:new Ut(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ut(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 xl=new Ut(1,0,0);Rh.prototype=Ut.prototype;function Rh(e){for(;!e.__zoom;)if(!(e=e.parentNode))return xl;return e.__zoom}function la(e){e.stopImmediatePropagation()}function ai(e){e.preventDefault(),e.stopImmediatePropagation()}function x7(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function C7(){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 zd(){return this.__zoom||xl}function _7(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function E7(){return navigator.maxTouchPoints||"ontouchstart"in this}function k7(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function $h(){var e=x7,t=C7,n=k7,r=_7,i=E7,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=fs,u=ml("start","zoom","end"),c,d,f,h=500,y=150,x=0,_=10;function v(E){E.property("__zoom",zd).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",F).on("dblclick.zoom",P).filter(i).on("touchstart.zoom",j).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(E,O,b,$){var S=E.selection?E.selection():E;S.property("__zoom",zd),E!==S?k(E,O,b,$):S.interrupt().each(function(){C(this,arguments).event($).start().zoom(null,typeof O=="function"?O.apply(this,arguments):O).end()})},v.scaleBy=function(E,O,b,$){v.scaleTo(E,function(){var S=this.__zoom.k,N=typeof O=="function"?O.apply(this,arguments):O;return S*N},b,$)},v.scaleTo=function(E,O,b,$){v.transform(E,function(){var S=t.apply(this,arguments),N=this.__zoom,I=b==null?w(S):typeof b=="function"?b.apply(this,arguments):b,R=N.invert(I),B=typeof O=="function"?O.apply(this,arguments):O;return n(g(p(N,B),I,R),S,s)},b,$)},v.translateBy=function(E,O,b,$){v.transform(E,function(){return n(this.__zoom.translate(typeof O=="function"?O.apply(this,arguments):O,typeof b=="function"?b.apply(this,arguments):b),t.apply(this,arguments),s)},null,$)},v.translateTo=function(E,O,b,$,S){v.transform(E,function(){var N=t.apply(this,arguments),I=this.__zoom,R=$==null?w(N):typeof $=="function"?$.apply(this,arguments):$;return n(xl.translate(R[0],R[1]).scale(I.k).translate(typeof O=="function"?-O.apply(this,arguments):-O,typeof b=="function"?-b.apply(this,arguments):-b),N,s)},$,S)};function p(E,O){return O=Math.max(o[0],Math.min(o[1],O)),O===E.k?E:new Ut(O,E.x,E.y)}function g(E,O,b){var $=O[0]-b[0]*E.k,S=O[1]-b[1]*E.k;return $===E.x&&S===E.y?E:new Ut(E.k,$,S)}function w(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function k(E,O,b,$){E.on("start.zoom",function(){C(this,arguments).event($).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event($).end()}).tween("zoom",function(){var S=this,N=arguments,I=C(S,N).event($),R=t.apply(S,N),B=b==null?w(R):typeof b=="function"?b.apply(S,N):b,Z=Math.max(R[1][0]-R[0][0],R[1][1]-R[0][1]),A=S.__zoom,M=typeof O=="function"?O.apply(S,N):O,H=a(A.invert(B).concat(Z/A.k),M.invert(B).concat(Z/M.k));return function(W){if(W===1)W=M;else{var U=H(W),Y=Z/U[2];W=new Ut(Y,B[0]-U[0]*Y,B[1]-U[1]*Y)}I.zoom(null,W)}})}function C(E,O,b){return!b&&E.__zooming||new L(E,O)}function L(E,O){this.that=E,this.args=O,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,O),this.taps=0}L.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,O){return this.mouse&&E!=="mouse"&&(this.mouse[1]=O.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=O.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=O.invert(this.touch1[0])),this.that.__zoom=O,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var O=qe(this.that).datum();u.call(E,this.that,new w7(E,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:u}),O)}};function T(E,...O){if(!e.apply(this,arguments))return;var b=C(this,O).event(E),$=this.__zoom,S=Math.max(o[0],Math.min(o[1],$.k*Math.pow(2,r.apply(this,arguments)))),N=vt(E);if(b.wheel)(b.mouse[0][0]!==N[0]||b.mouse[0][1]!==N[1])&&(b.mouse[1]=$.invert(b.mouse[0]=N)),clearTimeout(b.wheel);else{if($.k===S)return;b.mouse=[N,$.invert(N)],gs(this),b.start()}ai(E),b.wheel=setTimeout(I,y),b.zoom("mouse",n(g(p($,S),b.mouse[0],b.mouse[1]),b.extent,s));function I(){b.wheel=null,b.end()}}function F(E,...O){if(f||!e.apply(this,arguments))return;var b=E.currentTarget,$=C(this,O,!0).event(E),S=qe(E.view).on("mousemove.zoom",B,!0).on("mouseup.zoom",Z,!0),N=vt(E,b),I=E.clientX,R=E.clientY;wh(E.view),la(E),$.mouse=[N,this.__zoom.invert(N)],gs(this),$.start();function B(A){if(ai(A),!$.moved){var M=A.clientX-I,H=A.clientY-R;$.moved=M*M+H*H>x}$.event(A).zoom("mouse",n(g($.that.__zoom,$.mouse[0]=vt(A,b),$.mouse[1]),$.extent,s))}function Z(A){S.on("mousemove.zoom mouseup.zoom",null),xh(A.view,$.moved),ai(A),$.event(A).end()}}function P(E,...O){if(e.apply(this,arguments)){var b=this.__zoom,$=vt(E.changedTouches?E.changedTouches[0]:E,this),S=b.invert($),N=b.k*(E.shiftKey?.5:2),I=n(g(p(b,N),$,S),t.apply(this,O),s);ai(E),l>0?qe(this).transition().duration(l).call(k,I,$,E):qe(this).call(v.transform,I,$,E)}}function j(E,...O){if(e.apply(this,arguments)){var b=E.touches,$=b.length,S=C(this,O,E.changedTouches.length===$).event(E),N,I,R,B;for(la(E),I=0;I<$;++I)R=b[I],B=vt(R,this),B=[B,this.__zoom.invert(B),R.identifier],S.touch0?!S.touch1&&S.touch0[2]!==B[2]&&(S.touch1=B,S.taps=0):(S.touch0=B,N=!0,S.taps=1+!!c);c&&(c=clearTimeout(c)),N&&(S.taps<2&&(d=B[0],c=setTimeout(function(){c=null},h)),gs(this),S.start())}}function D(E,...O){if(this.__zooming){var b=C(this,O).event(E),$=E.changedTouches,S=$.length,N,I,R,B;for(ai(E),N=0;N<S;++N)I=$[N],R=vt(I,this),b.touch0&&b.touch0[2]===I.identifier?b.touch0[0]=R:b.touch1&&b.touch1[2]===I.identifier&&(b.touch1[0]=R);if(I=b.that.__zoom,b.touch1){var Z=b.touch0[0],A=b.touch0[1],M=b.touch1[0],H=b.touch1[1],W=(W=M[0]-Z[0])*W+(W=M[1]-Z[1])*W,U=(U=H[0]-A[0])*U+(U=H[1]-A[1])*U;I=p(I,Math.sqrt(W/U)),R=[(Z[0]+M[0])/2,(Z[1]+M[1])/2],B=[(A[0]+H[0])/2,(A[1]+H[1])/2]}else if(b.touch0)R=b.touch0[0],B=b.touch0[1];else return;b.zoom("touch",n(g(I,R,B),b.extent,s))}}function z(E,...O){if(this.__zooming){var b=C(this,O).event(E),$=E.changedTouches,S=$.length,N,I;for(la(E),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),N=0;N<S;++N)I=$[N],b.touch0&&b.touch0[2]===I.identifier?delete b.touch0:b.touch1&&b.touch1[2]===I.identifier&&delete b.touch1;if(b.touch1&&!b.touch0&&(b.touch0=b.touch1,delete b.touch1),b.touch0)b.touch0[1]=this.__zoom.invert(b.touch0[0]);else if(b.end(),b.taps===2&&(I=vt(I,this),Math.hypot(d[0]-I[0],d[1]-I[1])<_)){var R=qe(this).on("dblclick.zoom");R&&R.apply(this,arguments)}}}return v.wheelDelta=function(E){return arguments.length?(r=typeof E=="function"?E:Zo(+E),v):r},v.filter=function(E){return arguments.length?(e=typeof E=="function"?E:Zo(!!E),v):e},v.touchable=function(E){return arguments.length?(i=typeof E=="function"?E:Zo(!!E),v):i},v.extent=function(E){return arguments.length?(t=typeof E=="function"?E:Zo([[+E[0][0],+E[0][1]],[+E[1][0],+E[1][1]]]),v):t},v.scaleExtent=function(E){return arguments.length?(o[0]=+E[0],o[1]=+E[1],v):[o[0],o[1]]},v.translateExtent=function(E){return arguments.length?(s[0][0]=+E[0][0],s[1][0]=+E[1][0],s[0][1]=+E[0][1],s[1][1]=+E[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(E){return arguments.length?(n=E,v):n},v.duration=function(E){return arguments.length?(l=+E,v):l},v.interpolate=function(E){return arguments.length?(a=E,v):a},v.on=function(){var E=u.on.apply(u,arguments);return E===u?v:E},v.clickDistance=function(E){return arguments.length?(x=(E=+E)*E,v):Math.sqrt(x)},v.tapDistance=function(E){return arguments.length?(_=+E,v):_},v}const Ot={error001:()=>"[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,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,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.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Gi=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Oh=["Enter"," ","Escape"],Dh={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Vr;(function(e){e.Strict="strict",e.Loose="loose"})(Vr||(Vr={}));var Hn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Hn||(Hn={}));var Xi;(function(e){e.Partial="partial",e.Full="full"})(Xi||(Xi={}));const Vh={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var hn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(hn||(hn={}));var Gs;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Gs||(Gs={}));var ne;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ne||(ne={}));const Hd={[ne.Left]:ne.Right,[ne.Right]:ne.Left,[ne.Top]:ne.Bottom,[ne.Bottom]:ne.Top};function zh(e){return e===null?null:e?"valid":"invalid"}const Hh=e=>"id"in e&&"source"in e&&"target"in e,S7=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Tc=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),so=(e,t=[0,0])=>{const{width:n,height:r}=en(e),i=e.origin??t,o=n*i[0],s=r*i[1];return{x:e.position.x-o,y:e.position.y-s}},N7=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const o=typeof i=="string";let s=!t.nodeLookup&&!o?i:void 0;t.nodeLookup&&(s=o?t.nodeLookup.get(i):Tc(i)?i:t.nodeLookup.get(i.id));const l=s?Xs(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Cl(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return _l(n)},lo=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=Cl(n,Xs(i)),r=!0)}),r?_l(n):{x:0,y:0,width:0,height:0}},Pc=(e,t,[n,r,i]=[0,0,1],o=!1,s=!1)=>{const l={...uo(t,[n,r,i]),width:t.width/i,height:t.height/i},a=[];for(const u of e.values()){const{measured:c,selectable:d=!0,hidden:f=!1}=u;if(s&&!d||f)continue;const h=c.width??u.width??u.initialWidth??null,y=c.height??u.height??u.initialHeight??null,x=Ki(l,Hr(u)),_=(h??0)*(y??0),v=o&&x>0;(!u.internals.handleBounds||v||x>=_||u.dragging)&&a.push(u)}return a},M7=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function I7(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function L7({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:o},s){if(e.size===0)return Promise.resolve(!0);const l=I7(e,s),a=lo(l),u=Ac(a,t,n,(s==null?void 0:s.minZoom)??i,(s==null?void 0:s.maxZoom)??o,(s==null?void 0:s.padding)??.1);return await r.setViewport(u,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function Fh({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:o}){const s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:a,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},c=s.origin??r;let d=s.extent||i;if(s.extent==="parent"&&!s.expandParent)if(!l)o==null||o("005",Ot.error005());else{const h=l.measured.width,y=l.measured.height;h&&y&&(d=[[a,u],[a+h,u+y]])}else l&&Fr(s.extent)&&(d=[[s.extent[0][0]+a,s.extent[0][1]+u],[s.extent[1][0]+a,s.extent[1][1]+u]]);const f=Fr(d)?Qn(t,d,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(o==null||o("015",Ot.error015())),{position:{x:f.x-a+(s.measured.width??0)*c[0],y:f.y-u+(s.measured.height??0)*c[1]},positionAbsolute:f}}async function b7({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const o=new Set(e.map(f=>f.id)),s=[];for(const f of n){if(f.deletable===!1)continue;const h=o.has(f.id),y=!h&&f.parentId&&s.find(x=>x.id===f.parentId);(h||y)&&s.push(f)}const l=new Set(t.map(f=>f.id)),a=r.filter(f=>f.deletable!==!1),c=M7(s,a);for(const f of a)l.has(f.id)&&!c.find(y=>y.id===f.id)&&c.push(f);if(!i)return{edges:c,nodes:s};const d=await i({nodes:s,edges:c});return typeof d=="boolean"?d?{edges:c,nodes:s}:{edges:[],nodes:[]}:d}const zr=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Qn=(e={x:0,y:0},t,n)=>({x:zr(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:zr(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Bh(e,t,n){const{width:r,height:i}=en(n),{x:o,y:s}=n.internals.positionAbsolute;return Qn(e,[[o,s],[o+r,s+i]],t)}const Fd=(e,t,n)=>e<t?zr(Math.abs(e-t),1,t)/t:e>n?-zr(Math.abs(e-n),1,t)/t:0,Wh=(e,t,n=15,r=40)=>{const i=Fd(e.x,r,t.width-r)*n,o=Fd(e.y,r,t.height-r)*n;return[i,o]},Cl=(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)}),wu=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),_l=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Hr=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=Tc(e)?e.internals.positionAbsolute:so(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},Xs=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=Tc(e)?e.internals.positionAbsolute:so(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},Uh=(e,t)=>_l(Cl(wu(e),wu(t))),Ki=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Bd=e=>_t(e.width)&&_t(e.height)&&_t(e.x)&&_t(e.y),_t=e=>!isNaN(e)&&isFinite(e),j7=(e,t)=>{},ao=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),uo=({x:e,y:t},[n,r,i],o=!1,s=[1,1])=>{const l={x:(e-n)/i,y:(t-r)/i};return o?ao(l,s):l},Ks=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function ir(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function T7(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=ir(e,n),i=ir(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=ir(e.top??e.y??0,n),i=ir(e.bottom??e.y??0,n),o=ir(e.left??e.x??0,t),s=ir(e.right??e.x??0,t);return{top:r,right:s,bottom:i,left:o,x:o+s,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function P7(e,t,n,r,i,o){const{x:s,y:l}=Ks(e,[t,n,r]),{x:a,y:u}=Ks({x:e.x+e.width,y:e.y+e.height},[t,n,r]),c=i-a,d=o-u;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(c),bottom:Math.floor(d)}}const Ac=(e,t,n,r,i,o)=>{const s=T7(o,t,n),l=(t-s.x)/e.width,a=(n-s.y)/e.height,u=Math.min(l,a),c=zr(u,r,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c,y=n/2-f*c,x=P7(e,h,y,c,t,n),_={left:Math.min(x.left-s.left,0),top:Math.min(x.top-s.top,0),right:Math.min(x.right-s.right,0),bottom:Math.min(x.bottom-s.bottom,0)};return{x:h-_.left+_.right,y:y-_.top+_.bottom,zoom:c}},Qi=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Fr(e){return e!=null&&e!=="parent"}function en(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Zh(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Yh(e,t={width:0,height:0},n,r,i){const o={...e},s=r.get(n);if(s){const l=s.origin||i;o.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],o.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return o}function Wd(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function A7(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function R7(e){return{...Dh,...e||{}}}function Ni(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:o,y:s}=Et(e),l=uo({x:o-((i==null?void 0:i.left)??0),y:s-((i==null?void 0:i.top)??0)},r),{x:a,y:u}=n?ao(l,t):l;return{xSnapped:a,ySnapped:u,...l}}const Rc=e=>({width:e.offsetWidth,height:e.offsetHeight}),Gh=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},$7=["INPUT","SELECT","TEXTAREA"];function Xh(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:$7.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Kh=e=>"clientX"in e,Et=(e,t)=>{var o,s;const n=Kh(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,i=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},Ud=(e,t,n,r,i)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:i,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...Rc(s)}})};function Qh({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:s,targetControlY:l}){const a=e*.125+i*.375+s*.375+n*.125,u=t*.125+o*.375+l*.375+r*.125,c=Math.abs(a-e),d=Math.abs(u-t);return[a,u,c,d]}function Yo(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Zd({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case ne.Left:return[t-Yo(t-r,o),n];case ne.Right:return[t+Yo(r-t,o),n];case ne.Top:return[t,n-Yo(n-i,o)];case ne.Bottom:return[t,n+Yo(i-n,o)]}}function qh({sourceX:e,sourceY:t,sourcePosition:n=ne.Bottom,targetX:r,targetY:i,targetPosition:o=ne.Top,curvature:s=.25}){const[l,a]=Zd({pos:n,x1:e,y1:t,x2:r,y2:i,c:s}),[u,c]=Zd({pos:o,x1:r,y1:i,x2:e,y2:t,c:s}),[d,f,h,y]=Qh({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:c});return[`M${e},${t} C${l},${a} ${u},${c} ${r},${i}`,d,f,h,y]}function Jh({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n<e?n+i:n-i,s=Math.abs(r-t)/2,l=r<t?r+s:r-s;return[o,l,i,s]}function O7({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:o="basic"}){if(o==="manual")return r;const s=i&&n?r+1e3:r,l=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return s+l}function D7({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const o=Cl(Xs(e),Xs(t));o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const s={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return Ki(s,_l(o))>0}const V7=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,z7=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),H7=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||V7;let i;return Hh(e)?i={...e}:i={...e,id:r(e)},z7(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function ep({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,s,l]=Jh({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,s,l]}const Yd={[ne.Left]:{x:-1,y:0},[ne.Right]:{x:1,y:0},[ne.Top]:{x:0,y:-1},[ne.Bottom]:{x:0,y:1}},F7=({source:e,sourcePosition:t=ne.Bottom,target:n})=>t===ne.Left||t===ne.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Gd=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function B7({source:e,sourcePosition:t=ne.Bottom,target:n,targetPosition:r=ne.Top,center:i,offset:o,stepPosition:s}){const l=Yd[t],a=Yd[r],u={x:e.x+l.x*o,y:e.y+l.y*o},c={x:n.x+a.x*o,y:n.y+a.y*o},d=F7({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f];let y=[],x,_;const v={x:0,y:0},p={x:0,y:0},[,,g,w]=Jh({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[f]*a[f]===-1){f==="x"?(x=i.x??u.x+(c.x-u.x)*s,_=i.y??(u.y+c.y)/2):(x=i.x??(u.x+c.x)/2,_=i.y??u.y+(c.y-u.y)*s);const T=[{x,y:u.y},{x,y:c.y}],F=[{x:u.x,y:_},{x:c.x,y:_}];l[f]===h?y=f==="x"?T:F:y=f==="x"?F:T}else{const T=[{x:u.x,y:c.y}],F=[{x:c.x,y:u.y}];if(f==="x"?y=l.x===h?F:T:y=l.y===h?T:F,t===r){const E=Math.abs(e[f]-n[f]);if(E<=o){const O=Math.min(o-1,o-E);l[f]===h?v[f]=(u[f]>e[f]?-1:1)*O:p[f]=(c[f]>n[f]?-1:1)*O}}if(t!==r){const E=f==="x"?"y":"x",O=l[f]===a[E],b=u[E]>c[E],$=u[E]<c[E];(l[f]===1&&(!O&&b||O&&$)||l[f]!==1&&(!O&&$||O&&b))&&(y=f==="x"?T:F)}const P={x:u.x+v.x,y:u.y+v.y},j={x:c.x+p.x,y:c.y+p.y},D=Math.max(Math.abs(P.x-y[0].x),Math.abs(j.x-y[0].x)),z=Math.max(Math.abs(P.y-y[0].y),Math.abs(j.y-y[0].y));D>=z?(x=(P.x+j.x)/2,_=y[0].y):(x=y[0].x,_=(P.y+j.y)/2)}const k={x:u.x+v.x,y:u.y+v.y},C={x:c.x+p.x,y:c.y+p.y};return[[e,...k.x!==y[0].x||k.y!==y[0].y?[k]:[],...y,...C.x!==y[y.length-1].x||C.y!==y[y.length-1].y?[C]:[],n],x,_,g,w]}function W7(e,t,n,r){const i=Math.min(Gd(e,t)/2,Gd(t,n)/2,r),{x:o,y:s}=t;if(e.x===o&&o===n.x||e.y===s&&s===n.y)return`L${o} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${o+i*u},${s}Q ${o},${s} ${o},${s+i*c}`}const l=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${o},${s+i*a}Q ${o},${s} ${o+i*l},${s}`}function xu({sourceX:e,sourceY:t,sourcePosition:n=ne.Bottom,targetX:r,targetY:i,targetPosition:o=ne.Top,borderRadius:s=5,centerX:l,centerY:a,offset:u=20,stepPosition:c=.5}){const[d,f,h,y,x]=B7({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:l,y:a},offset:u,stepPosition:c});let _=`M${d[0].x} ${d[0].y}`;for(let v=1;v<d.length-1;v++)_+=W7(d[v-1],d[v],d[v+1],s);return _+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[_,f,h,y,x]}function Xd(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function U7(e){var d;const{sourceNode:t,targetNode:n}=e;if(!Xd(t)||!Xd(n))return null;const r=t.internals.handleBounds||Kd(t.handles),i=n.internals.handleBounds||Kd(n.handles),o=Qd((r==null?void 0:r.source)??[],e.sourceHandle),s=Qd(e.connectionMode===Vr.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!o||!s)return(d=e.onError)==null||d.call(e,"008",Ot.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(o==null?void 0:o.position)||ne.Bottom,a=(s==null?void 0:s.position)||ne.Top,u=qn(t,o,l),c=qn(n,s,a);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:l,targetPosition:a}}function Kd(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function qn(e,t,n=ne.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,o=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??en(e);if(r)return{x:i+s/2,y:o+l/2};switch((t==null?void 0:t.position)??n){case ne.Top:return{x:i+s/2,y:o};case ne.Right:return{x:i+s,y:o+l/2};case ne.Bottom:return{x:i+s/2,y:o+l};case ne.Left:return{x:i,y:o+l/2}}}function Qd(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Cu(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function Z7(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const o=new Set;return e.reduce((s,l)=>([l.markerStart||r,l.markerEnd||i].forEach(a=>{if(a&&typeof a=="object"){const u=Cu(a,t);o.has(u)||(s.push({id:u,color:a.color||n,...a}),o.add(u))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}const tp=1e3,Y7=10,$c={nodeOrigin:[0,0],nodeExtent:Gi,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},G7={...$c,checkEquality:!0};function Oc(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function X7(e,t,n){const r=Oc($c,n);for(const i of e.values())if(i.parentId)Vc(i,e,t,r);else{const o=so(i,r.nodeOrigin),s=Fr(i.extent)?i.extent:r.nodeExtent,l=Qn(o,s,en(i));i.internals.positionAbsolute=l}}function K7(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const i of e.handles){const o={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(o):i.type==="target"&&r.push(o)}return{source:n,target:r}}function Dc(e){return e==="manual"}function _u(e,t,n,r={}){var c,d;const i=Oc(G7,r),o={i:0},s=new Map(t),l=i!=null&&i.elevateNodesOnSelect&&!Dc(i.zIndexMode)?tp:0;let a=e.length>0,u=!1;t.clear(),n.clear();for(const f of e){let h=s.get(f.id);if(i.checkEquality&&f===(h==null?void 0:h.internals.userNode))t.set(f.id,h);else{const y=so(f,i.nodeOrigin),x=Fr(f.extent)?f.extent:i.nodeExtent,_=Qn(y,x,en(f));h={...i.defaults,...f,measured:{width:(c=f.measured)==null?void 0:c.width,height:(d=f.measured)==null?void 0:d.height},internals:{positionAbsolute:_,handleBounds:K7(f,h),z:np(f,l,i.zIndexMode),userNode:f}},t.set(f.id,h)}(h.measured===void 0||h.measured.width===void 0||h.measured.height===void 0)&&!h.hidden&&(a=!1),f.parentId&&Vc(h,t,n,r,o),u||(u=f.selected??!1)}return{nodesInitialized:a,hasSelectedNodes:u}}function Q7(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Vc(e,t,n,r,i){const{elevateNodesOnSelect:o,nodeOrigin:s,nodeExtent:l,zIndexMode:a}=Oc($c,r),u=e.parentId,c=t.get(u);if(!c){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Q7(e,n),i&&!c.parentId&&c.internals.rootParentIndex===void 0&&a==="auto"&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+i.i*Y7),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);const d=o&&!Dc(a)?tp:0,{x:f,y:h,z:y}=q7(e,c,s,l,d,a),{positionAbsolute:x}=e.internals,_=f!==x.x||h!==x.y;(_||y!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:_?{x:f,y:h}:x,z:y}})}function np(e,t,n){const r=_t(e.zIndex)?e.zIndex:0;return Dc(n)?r:r+(e.selected?t:0)}function q7(e,t,n,r,i,o){const{x:s,y:l}=t.internals.positionAbsolute,a=en(e),u=so(e,n),c=Fr(e.extent)?Qn(u,e.extent,a):u;let d=Qn({x:s+c.x,y:l+c.y},r,a);e.extent==="parent"&&(d=Bh(d,a,t));const f=np(e,i,o),h=t.internals.z??0;return{x:d.x,y:d.y,z:h>=f?h+1:f}}function zc(e,t,n,r=[0,0]){var s;const i=[],o=new Map;for(const l of e){const a=t.get(l.parentId);if(!a)continue;const u=((s=o.get(l.parentId))==null?void 0:s.expandedRect)??Hr(a),c=Uh(u,l.rect);o.set(l.parentId,{expandedRect:c,parent:a})}return o.size>0&&o.forEach(({expandedRect:l,parent:a},u)=>{var g;const c=a.internals.positionAbsolute,d=en(a),f=a.origin??r,h=l.x<c.x?Math.round(Math.abs(c.x-l.x)):0,y=l.y<c.y?Math.round(Math.abs(c.y-l.y)):0,x=Math.max(d.width,Math.round(l.width)),_=Math.max(d.height,Math.round(l.height)),v=(x-d.width)*f[0],p=(_-d.height)*f[1];(h>0||y>0||v||p)&&(i.push({id:u,type:"position",position:{x:a.position.x-h+v,y:a.position.y-y+p}}),(g=n.get(u))==null||g.forEach(w=>{e.some(k=>k.id===w.id)||i.push({id:w.id,type:"position",position:{x:w.position.x+h,y:w.position.y+y}})})),(d.width<l.width||d.height<l.height||h||y)&&i.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:x+(h?f[0]*h-v:0),height:_+(y?f[1]*y-p:0)}})}),i}function J7(e,t,n,r,i,o,s){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let a=!1;if(!l)return{changes:[],updatedInternals:a};const u=[],c=window.getComputedStyle(l),{m22:d}=new window.DOMMatrixReadOnly(c.transform),f=[];for(const h of e.values()){const y=t.get(h.id);if(!y)continue;if(y.hidden){t.set(y.id,{...y,internals:{...y.internals,handleBounds:void 0}}),a=!0;continue}const x=Rc(h.nodeElement),_=y.measured.width!==x.width||y.measured.height!==x.height;if(!!(x.width&&x.height&&(_||!y.internals.handleBounds||h.force))){const p=h.nodeElement.getBoundingClientRect(),g=Fr(y.extent)?y.extent:o;let{positionAbsolute:w}=y.internals;y.parentId&&y.extent==="parent"?w=Bh(w,x,t.get(y.parentId)):g&&(w=Qn(w,g,x));const k={...y,measured:x,internals:{...y.internals,positionAbsolute:w,handleBounds:{source:Ud("source",h.nodeElement,p,d,y.id),target:Ud("target",h.nodeElement,p,d,y.id)}}};t.set(y.id,k),y.parentId&&Vc(k,t,n,{nodeOrigin:i,zIndexMode:s}),a=!0,_&&(u.push({id:y.id,type:"dimensions",dimensions:x}),y.expandParent&&y.parentId&&f.push({id:y.id,parentId:y.parentId,rect:Hr(k,i)}))}}if(f.length>0){const h=zc(f,t,n,i);u.push(...h)}return{changes:u,updatedInternals:a}}async function ey({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:o}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,o]],r),l=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(l)}function qd(e,t,n,r,i,o){let s=i;const l=r.get(s)||new Map;r.set(s,l.set(n,t)),s=`${i}-${e}`;const a=r.get(s)||new Map;if(r.set(s,a.set(n,t)),o){s=`${i}-${e}-${o}`;const u=r.get(s)||new Map;r.set(s,u.set(n,t))}}function rp(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:o,sourceHandle:s=null,targetHandle:l=null}=r,a={edgeId:r.id,source:i,target:o,sourceHandle:s,targetHandle:l},u=`${i}-${s}--${o}-${l}`,c=`${o}-${l}--${i}-${s}`;qd("source",a,c,e,i,s),qd("target",a,u,e,o,l),t.set(r.id,r)}}function ip(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:ip(n,t):!1}function Jd(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function ty(e,t,n,r){const i=new Map;for(const[o,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!ip(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const l=e.get(o);l&&i.set(o,{id:o,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function aa({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,l,a;const i=[];for(const[u,c]of t){const d=(s=n.get(u))==null?void 0:s.internals.userNode;d&&i.push({...d,position:c.position,dragging:r})}if(!e)return[i[0],i];const o=(l=n.get(e))==null?void 0:l.internals.userNode;return[o?{...o,position:((a=t.get(e))==null?void 0:a.position)||o.position,dragging:r}:i[0],i]}function ny({dragItems:e,snapGrid:t,x:n,y:r}){const i=e.values().next().value;if(!i)return null;const o={x:n-i.distance.x,y:r-i.distance.y},s=ao(o,t);return{x:s.x-o.x,y:s.y-o.y}}function ry({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let o={x:null,y:null},s=0,l=new Map,a=!1,u={x:0,y:0},c=null,d=!1,f=null,h=!1,y=!1,x=null;function _({noDragClassName:p,handleSelector:g,domNode:w,isSelectable:k,nodeId:C,nodeClickDistance:L=0}){f=qe(w);function T({x:D,y:z}){const{nodeLookup:E,nodeExtent:O,snapGrid:b,snapToGrid:$,nodeOrigin:S,onNodeDrag:N,onSelectionDrag:I,onError:R,updateNodePositions:B}=t();o={x:D,y:z};let Z=!1;const A=l.size>1,M=A&&O?wu(lo(l)):null,H=A&&$?ny({dragItems:l,snapGrid:b,x:D,y:z}):null;for(const[W,U]of l){if(!E.has(W))continue;let Y={x:D-U.distance.x,y:z-U.distance.y};$&&(Y=H?{x:Math.round(Y.x+H.x),y:Math.round(Y.y+H.y)}:ao(Y,b));let X=null;if(A&&O&&!U.extent&&M){const{positionAbsolute:q}=U.internals,te=q.x-M.x+O[0][0],re=q.x+U.measured.width-M.x2+O[1][0],ie=q.y-M.y+O[0][1],fe=q.y+U.measured.height-M.y2+O[1][1];X=[[te,ie],[re,fe]]}const{position:K,positionAbsolute:G}=Fh({nodeId:W,nextPosition:Y,nodeLookup:E,nodeExtent:X||O,nodeOrigin:S,onError:R});Z=Z||U.position.x!==K.x||U.position.y!==K.y,U.position=K,U.internals.positionAbsolute=G}if(y=y||Z,!!Z&&(B(l,!0),x&&(r||N||!C&&I))){const[W,U]=aa({nodeId:C,dragItems:l,nodeLookup:E});r==null||r(x,l,W,U),N==null||N(x,W,U),C||I==null||I(x,U)}}async function F(){if(!c)return;const{transform:D,panBy:z,autoPanSpeed:E,autoPanOnNodeDrag:O}=t();if(!O){a=!1,cancelAnimationFrame(s);return}const[b,$]=Wh(u,c,E);(b!==0||$!==0)&&(o.x=(o.x??0)-b/D[2],o.y=(o.y??0)-$/D[2],await z({x:b,y:$})&&T(o)),s=requestAnimationFrame(F)}function P(D){var A;const{nodeLookup:z,multiSelectionActive:E,nodesDraggable:O,transform:b,snapGrid:$,snapToGrid:S,selectNodesOnDrag:N,onNodeDragStart:I,onSelectionDragStart:R,unselectNodesAndEdges:B}=t();d=!0,(!N||!k)&&!E&&C&&((A=z.get(C))!=null&&A.selected||B()),k&&N&&C&&(e==null||e(C));const Z=Ni(D.sourceEvent,{transform:b,snapGrid:$,snapToGrid:S,containerBounds:c});if(o=Z,l=ty(z,O,Z,C),l.size>0&&(n||I||!C&&R)){const[M,H]=aa({nodeId:C,dragItems:l,nodeLookup:z});n==null||n(D.sourceEvent,l,M,H),I==null||I(D.sourceEvent,M,H),C||R==null||R(D.sourceEvent,H)}}const j=Ch().clickDistance(L).on("start",D=>{const{domNode:z,nodeDragThreshold:E,transform:O,snapGrid:b,snapToGrid:$}=t();c=(z==null?void 0:z.getBoundingClientRect())||null,h=!1,y=!1,x=D.sourceEvent,E===0&&P(D),o=Ni(D.sourceEvent,{transform:O,snapGrid:b,snapToGrid:$,containerBounds:c}),u=Et(D.sourceEvent,c)}).on("drag",D=>{const{autoPanOnNodeDrag:z,transform:E,snapGrid:O,snapToGrid:b,nodeDragThreshold:$,nodeLookup:S}=t(),N=Ni(D.sourceEvent,{transform:E,snapGrid:O,snapToGrid:b,containerBounds:c});if(x=D.sourceEvent,(D.sourceEvent.type==="touchmove"&&D.sourceEvent.touches.length>1||C&&!S.has(C))&&(h=!0),!h){if(!a&&z&&d&&(a=!0,F()),!d){const I=Et(D.sourceEvent,c),R=I.x-u.x,B=I.y-u.y;Math.sqrt(R*R+B*B)>$&&P(D)}(o.x!==N.xSnapped||o.y!==N.ySnapped)&&l&&d&&(u=Et(D.sourceEvent,c),T(N))}}).on("end",D=>{if(!(!d||h)&&(a=!1,d=!1,cancelAnimationFrame(s),l.size>0)){const{nodeLookup:z,updateNodePositions:E,onNodeDragStop:O,onSelectionDragStop:b}=t();if(y&&(E(l,!1),y=!1),i||O||!C&&b){const[$,S]=aa({nodeId:C,dragItems:l,nodeLookup:z,dragging:!1});i==null||i(D.sourceEvent,l,$,S),O==null||O(D.sourceEvent,$,S),C||b==null||b(D.sourceEvent,S)}}}).filter(D=>{const z=D.target;return!D.button&&(!p||!Jd(z,`.${p}`,w))&&(!g||Jd(z,g,w))});f.call(j)}function v(){f==null||f.on(".drag",null)}return{update:_,destroy:v}}function iy(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const o of t.values())Ki(i,Hr(o))>0&&r.push(o);return r}const oy=250;function sy(e,t,n,r){var l,a;let i=[],o=1/0;const s=iy(e,n,t+oy);for(const u of s){const c=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((a=u.internals.handleBounds)==null?void 0:a.target)??[]];for(const d of c){if(r.nodeId===d.nodeId&&r.type===d.type&&r.id===d.id)continue;const{x:f,y:h}=qn(u,d,d.position,!0),y=Math.sqrt(Math.pow(f-e.x,2)+Math.pow(h-e.y,2));y>t||(y<o?(i=[{...d,x:f,y:h}],o=y):y===o&&i.push({...d,x:f,y:h}))}}if(!i.length)return null;if(i.length>1){const u=r.type==="source"?"target":"source";return i.find(c=>c.type===u)??i[0]}return i[0]}function op(e,t,n,r,i,o=!1){var u,c,d;const s=r.get(e);if(!s)return null;const l=i==="strict"?(u=s.internals.handleBounds)==null?void 0:u[t]:[...((c=s.internals.handleBounds)==null?void 0:c.source)??[],...((d=s.internals.handleBounds)==null?void 0:d.target)??[]],a=(n?l==null?void 0:l.find(f=>f.id===n):l==null?void 0:l[0])??null;return a&&o?{...a,...qn(s,a,a.position,!0)}:a}function sp(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function ly(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const lp=()=>!0;function ay(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:o,isTarget:s,domNode:l,nodeLookup:a,lib:u,autoPanOnConnect:c,flowId:d,panBy:f,cancelConnection:h,onConnectStart:y,onConnect:x,onConnectEnd:_,isValidConnection:v=lp,onReconnectEnd:p,updateConnection:g,getTransform:w,getFromHandle:k,autoPanSpeed:C,dragThreshold:L=1,handleDomNode:T}){const F=Gh(e.target);let P=0,j;const{x:D,y:z}=Et(e),E=sp(o,T),O=l==null?void 0:l.getBoundingClientRect();let b=!1;if(!O||!E)return;const $=op(i,E,r,a,t);if(!$)return;let S=Et(e,O),N=!1,I=null,R=!1,B=null;function Z(){if(!c||!O)return;const[K,G]=Wh(S,O,C);f({x:K,y:G}),P=requestAnimationFrame(Z)}const A={...$,nodeId:i,type:E,position:$.position},M=a.get(i);let W={inProgress:!0,isValid:null,from:qn(M,A,ne.Left,!0),fromHandle:A,fromPosition:A.position,fromNode:M,to:S,toHandle:null,toPosition:Hd[A.position],toNode:null,pointer:S};function U(){b=!0,g(W),y==null||y(e,{nodeId:i,handleId:r,handleType:E})}L===0&&U();function Y(K){if(!b){const{x:fe,y:Be}=Et(K),ot=fe-D,tn=Be-z;if(!(ot*ot+tn*tn>L*L))return;U()}if(!k()||!A){X(K);return}const G=w();S=Et(K,O),j=sy(uo(S,G,!1,[1,1]),n,a,A),N||(Z(),N=!0);const q=ap(K,{handle:j,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:s?"target":"source",isValidConnection:v,doc:F,lib:u,flowId:d,nodeLookup:a});B=q.handleDomNode,I=q.connection,R=ly(!!j,q.isValid);const te=a.get(i),re=te?qn(te,A,ne.Left,!0):W.from,ie={...W,from:re,isValid:R,to:q.toHandle&&R?Ks({x:q.toHandle.x,y:q.toHandle.y},G):S,toHandle:q.toHandle,toPosition:R&&q.toHandle?q.toHandle.position:Hd[A.position],toNode:q.toHandle?a.get(q.toHandle.nodeId):null,pointer:S};g(ie),W=ie}function X(K){if(!("touches"in K&&K.touches.length>0)){if(b){(j||B)&&I&&R&&(x==null||x(I));const{inProgress:G,...q}=W,te={...q,toPosition:W.toHandle?W.toPosition:null};_==null||_(K,te),o&&(p==null||p(K,te))}h(),cancelAnimationFrame(P),N=!1,R=!1,I=null,B=null,F.removeEventListener("mousemove",Y),F.removeEventListener("mouseup",X),F.removeEventListener("touchmove",Y),F.removeEventListener("touchend",X)}}F.addEventListener("mousemove",Y),F.addEventListener("mouseup",X),F.addEventListener("touchmove",Y),F.addEventListener("touchend",X)}function ap(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:o,doc:s,lib:l,flowId:a,isValidConnection:u=lp,nodeLookup:c}){const d=o==="target",f=t?s.querySelector(`.${l}-flow__handle[data-id="${a}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:h,y}=Et(e),x=s.elementFromPoint(h,y),_=x!=null&&x.classList.contains(`${l}-flow__handle`)?x:f,v={handleDomNode:_,isValid:!1,connection:null,toHandle:null};if(_){const p=sp(void 0,_),g=_.getAttribute("data-nodeid"),w=_.getAttribute("data-handleid"),k=_.classList.contains("connectable"),C=_.classList.contains("connectableend");if(!g||!p)return v;const L={source:d?g:r,sourceHandle:d?w:i,target:d?r:g,targetHandle:d?i:w};v.connection=L;const F=k&&C&&(n===Vr.Strict?d&&p==="source"||!d&&p==="target":g!==r||w!==i);v.isValid=F&&u(L),v.toHandle=op(g,p,w,c,n,!0)}return v}const Eu={onPointerDown:ay,isValid:ap};function uy({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=qe(e);function o({translateExtent:l,width:a,height:u,zoomStep:c=1,pannable:d=!0,zoomable:f=!0,inversePan:h=!1}){const y=g=>{if(g.sourceEvent.type!=="wheel"||!t)return;const w=n(),k=g.sourceEvent.ctrlKey&&Qi()?10:1,C=-g.sourceEvent.deltaY*(g.sourceEvent.deltaMode===1?.05:g.sourceEvent.deltaMode?1:.002)*c,L=w[2]*Math.pow(2,C*k);t.scaleTo(L)};let x=[0,0];const _=g=>{(g.sourceEvent.type==="mousedown"||g.sourceEvent.type==="touchstart")&&(x=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY])},v=g=>{const w=n();if(g.sourceEvent.type!=="mousemove"&&g.sourceEvent.type!=="touchmove"||!t)return;const k=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY],C=[k[0]-x[0],k[1]-x[1]];x=k;const L=r()*Math.max(w[2],Math.log(w[2]))*(h?-1:1),T={x:w[0]-C[0]*L,y:w[1]-C[1]*L},F=[[0,0],[a,u]];t.setViewportConstrained({x:T.x,y:T.y,zoom:w[2]},F,l)},p=$h().on("start",_).on("zoom",d?v:null).on("zoom.wheel",f?y:null);i.call(p,{})}function s(){i.on("zoom",null)}return{update:o,destroy:s,pointer:vt}}const El=e=>({x:e.x,y:e.y,zoom:e.k}),ua=({x:e,y:t,zoom:n})=>xl.translate(e,t).scale(n),yr=(e,t)=>e.target.closest(`.${t}`),up=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),cy=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,ca=(e,t=0,n=cy,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},cp=e=>{const t=e.ctrlKey&&Qi()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function dy({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:o,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:u}){return c=>{if(yr(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();const d=n.property("__zoom").k||1;if(c.ctrlKey&&s){const _=vt(c),v=cp(c),p=d*Math.pow(2,v);r.scaleTo(n,p,_,c);return}const f=c.deltaMode===1?20:1;let h=i===Hn.Vertical?0:c.deltaX*f,y=i===Hn.Horizontal?0:c.deltaY*f;!Qi()&&c.shiftKey&&i!==Hn.Vertical&&(h=c.deltaY*f,y=0),r.translateBy(n,-(h/d)*o,-(y/d)*o,{internal:!0});const x=El(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(a==null||a(c,x),e.panScrollTimeout=setTimeout(()=>{u==null||u(c,x),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(c,x))}}function fy({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const o=r.type==="wheel",s=!t&&o&&!r.ctrlKey,l=yr(r,e);if(r.ctrlKey&&o&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,i)}}function hy({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,s,l;if((o=r.sourceEvent)!=null&&o.internal)return;const i=El(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function py({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return o=>{var s,l;e.usedRightMouseButton=!!(n&&up(t,e.mouseButton??0)),(s=o.sourceEvent)!=null&&s.sync||r([o.transform.x,o.transform.y,o.transform.k]),i&&!((l=o.sourceEvent)!=null&&l.internal)&&(i==null||i(o.sourceEvent,El(o.transform)))}}function gy({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:o}){return s=>{var l;if(!((l=s.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,o&&up(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&o(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const a=El(s.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(s.sourceEvent,a)},n?150:0)}}}function my({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:o,userSelectionActive:s,noWheelClassName:l,noPanClassName:a,lib:u,connectionInProgress:c}){return d=>{var _;const f=e||t,h=n&&d.ctrlKey,y=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(yr(d,`${u}-flow__node`)||yr(d,`${u}-flow__edge`)))return!0;if(!r&&!f&&!i&&!o&&!n||s||c&&!y||yr(d,l)&&y||yr(d,a)&&(!y||i&&y&&!e)||!n&&d.ctrlKey&&y)return!1;if(!n&&d.type==="touchstart"&&((_=d.touches)==null?void 0:_.length)>1)return d.preventDefault(),!1;if(!f&&!i&&!h&&y||!r&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(r)&&!r.includes(d.button)&&d.type==="mousedown")return!1;const x=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||y)&&x}}function yy({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:o,onPanZoomStart:s,onPanZoomEnd:l,onDraggingChange:a}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=$h().scaleExtent([t,n]).translateExtent(r),f=qe(e).call(d);p({x:i.x,y:i.y,zoom:zr(i.zoom,t,n)},[[0,0],[c.width,c.height]],r);const h=f.on("wheel.zoom"),y=f.on("dblclick.zoom");d.wheelDelta(cp);function x(j,D){return f?new Promise(z=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Si:fs).transform(ca(f,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>z(!0)),j)}):Promise.resolve(!1)}function _({noWheelClassName:j,noPanClassName:D,onPaneContextMenu:z,userSelectionActive:E,panOnScroll:O,panOnDrag:b,panOnScrollMode:$,panOnScrollSpeed:S,preventScrolling:N,zoomOnPinch:I,zoomOnScroll:R,zoomOnDoubleClick:B,zoomActivationKeyPressed:Z,lib:A,onTransformChange:M,connectionInProgress:H,paneClickDistance:W,selectionOnDrag:U}){E&&!u.isZoomingOrPanning&&v();const Y=O&&!Z&&!E;d.clickDistance(U?1/0:!_t(W)||W<0?0:W);const X=Y?dy({zoomPanValues:u,noWheelClassName:j,d3Selection:f,d3Zoom:d,panOnScrollMode:$,panOnScrollSpeed:S,zoomOnPinch:I,onPanZoomStart:s,onPanZoom:o,onPanZoomEnd:l}):fy({noWheelClassName:j,preventScrolling:N,d3ZoomHandler:h});if(f.on("wheel.zoom",X,{passive:!1}),!E){const G=hy({zoomPanValues:u,onDraggingChange:a,onPanZoomStart:s});d.on("start",G);const q=py({zoomPanValues:u,panOnDrag:b,onPaneContextMenu:!!z,onPanZoom:o,onTransformChange:M});d.on("zoom",q);const te=gy({zoomPanValues:u,panOnDrag:b,panOnScroll:O,onPaneContextMenu:z,onPanZoomEnd:l,onDraggingChange:a});d.on("end",te)}const K=my({zoomActivationKeyPressed:Z,panOnDrag:b,zoomOnScroll:R,panOnScroll:O,zoomOnDoubleClick:B,zoomOnPinch:I,userSelectionActive:E,noPanClassName:D,noWheelClassName:j,lib:A,connectionInProgress:H});d.filter(K),B?f.on("dblclick.zoom",y):f.on("dblclick.zoom",null)}function v(){d.on("zoom",null)}async function p(j,D,z){const E=ua(j),O=d==null?void 0:d.constrain()(E,D,z);return O&&await x(O),new Promise(b=>b(O))}async function g(j,D){const z=ua(j);return await x(z,D),new Promise(E=>E(z))}function w(j){if(f){const D=ua(j),z=f.property("__zoom");(z.k!==j.zoom||z.x!==j.x||z.y!==j.y)&&(d==null||d.transform(f,D,null,{sync:!0}))}}function k(){const j=f?Rh(f.node()):{x:0,y:0,k:1};return{x:j.x,y:j.y,zoom:j.k}}function C(j,D){return f?new Promise(z=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Si:fs).scaleTo(ca(f,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>z(!0)),j)}):Promise.resolve(!1)}function L(j,D){return f?new Promise(z=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Si:fs).scaleBy(ca(f,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>z(!0)),j)}):Promise.resolve(!1)}function T(j){d==null||d.scaleExtent(j)}function F(j){d==null||d.translateExtent(j)}function P(j){const D=!_t(j)||j<0?0:j;d==null||d.clickDistance(D)}return{update:_,destroy:v,setViewport:g,setViewportConstrained:p,getViewport:k,scaleTo:C,scaleBy:L,setScaleExtent:T,setTranslateExtent:F,syncViewport:w,setClickDistance:P}}var Br;(function(e){e.Line="line",e.Handle="handle"})(Br||(Br={}));function vy({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:o}){const s=e-t,l=n-r,a=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&i&&(a[0]=a[0]*-1),l&&o&&(a[1]=a[1]*-1),a}function ef(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function ln(e,t){return Math.max(0,t-e)}function an(e,t){return Math.max(0,e-t)}function Go(e,t,n){return Math.max(0,t-e,e-n)}function tf(e,t){return e?!t:t}function wy(e,t,n,r,i,o,s,l){let{affectsX:a,affectsY:u}=t;const{isHorizontal:c,isVertical:d}=t,f=c&&d,{xSnapped:h,ySnapped:y}=n,{minWidth:x,maxWidth:_,minHeight:v,maxHeight:p}=r,{x:g,y:w,width:k,height:C,aspectRatio:L}=e;let T=Math.floor(c?h-e.pointerX:0),F=Math.floor(d?y-e.pointerY:0);const P=k+(a?-T:T),j=C+(u?-F:F),D=-o[0]*k,z=-o[1]*C;let E=Go(P,x,_),O=Go(j,v,p);if(s){let S=0,N=0;a&&T<0?S=ln(g+T+D,s[0][0]):!a&&T>0&&(S=an(g+P+D,s[1][0])),u&&F<0?N=ln(w+F+z,s[0][1]):!u&&F>0&&(N=an(w+j+z,s[1][1])),E=Math.max(E,S),O=Math.max(O,N)}if(l){let S=0,N=0;a&&T>0?S=an(g+T,l[0][0]):!a&&T<0&&(S=ln(g+P,l[1][0])),u&&F>0?N=an(w+F,l[0][1]):!u&&F<0&&(N=ln(w+j,l[1][1])),E=Math.max(E,S),O=Math.max(O,N)}if(i){if(c){const S=Go(P/L,v,p)*L;if(E=Math.max(E,S),s){let N=0;!a&&!u||a&&!u&&f?N=an(w+z+P/L,s[1][1])*L:N=ln(w+z+(a?T:-T)/L,s[0][1])*L,E=Math.max(E,N)}if(l){let N=0;!a&&!u||a&&!u&&f?N=ln(w+P/L,l[1][1])*L:N=an(w+(a?T:-T)/L,l[0][1])*L,E=Math.max(E,N)}}if(d){const S=Go(j*L,x,_)/L;if(O=Math.max(O,S),s){let N=0;!a&&!u||u&&!a&&f?N=an(g+j*L+D,s[1][0])/L:N=ln(g+(u?F:-F)*L+D,s[0][0])/L,O=Math.max(O,N)}if(l){let N=0;!a&&!u||u&&!a&&f?N=ln(g+j*L,l[1][0])/L:N=an(g+(u?F:-F)*L,l[0][0])/L,O=Math.max(O,N)}}}F=F+(F<0?O:-O),T=T+(T<0?E:-E),i&&(f?P>j*L?F=(tf(a,u)?-T:T)/L:T=(tf(a,u)?-F:F)*L:c?(F=T/L,u=a):(T=F*L,a=u));const b=a?g+T:g,$=u?w+F:w;return{width:k+(a?-T:T),height:C+(u?-F:F),x:o[0]*T*(a?-1:1)+b,y:o[1]*F*(u?-1:1)+$}}const dp={width:0,height:0,x:0,y:0},xy={...dp,pointerX:0,pointerY:0,aspectRatio:1};function Cy(e){return[[0,0],[e.measured.width,e.measured.height]]}function _y(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,o=e.measured.width??0,s=e.measured.height??0,l=n[0]*o,a=n[1]*s;return[[r-l,i-a],[r+o-l,i+s-a]]}function Ey({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const o=qe(e);let s={controlDirection:ef("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:c,keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:y,onResizeEnd:x,shouldResize:_}){let v={...dp},p={...xy};s={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:ef(u)};let g,w=null,k=[],C,L,T,F=!1;const P=Ch().on("start",j=>{const{nodeLookup:D,transform:z,snapGrid:E,snapToGrid:O,nodeOrigin:b,paneDomNode:$}=n();if(g=D.get(t),!g)return;w=($==null?void 0:$.getBoundingClientRect())??null;const{xSnapped:S,ySnapped:N}=Ni(j.sourceEvent,{transform:z,snapGrid:E,snapToGrid:O,containerBounds:w});v={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},p={...v,pointerX:S,pointerY:N,aspectRatio:v.width/v.height},C=void 0,g.parentId&&(g.extent==="parent"||g.expandParent)&&(C=D.get(g.parentId),L=C&&g.extent==="parent"?Cy(C):void 0),k=[],T=void 0;for(const[I,R]of D)if(R.parentId===t&&(k.push({id:I,position:{...R.position},extent:R.extent}),R.extent==="parent"||R.expandParent)){const B=_y(R,g,R.origin??b);T?T=[[Math.min(B[0][0],T[0][0]),Math.min(B[0][1],T[0][1])],[Math.max(B[1][0],T[1][0]),Math.max(B[1][1],T[1][1])]]:T=B}h==null||h(j,{...v})}).on("drag",j=>{const{transform:D,snapGrid:z,snapToGrid:E,nodeOrigin:O}=n(),b=Ni(j.sourceEvent,{transform:D,snapGrid:z,snapToGrid:E,containerBounds:w}),$=[];if(!g)return;const{x:S,y:N,width:I,height:R}=v,B={},Z=g.origin??O,{width:A,height:M,x:H,y:W}=wy(p,s.controlDirection,b,s.boundaries,s.keepAspectRatio,Z,L,T),U=A!==I,Y=M!==R,X=H!==S&&U,K=W!==N&&Y;if(!X&&!K&&!U&&!Y)return;if((X||K||Z[0]===1||Z[1]===1)&&(B.x=X?H:v.x,B.y=K?W:v.y,v.x=B.x,v.y=B.y,k.length>0)){const re=H-S,ie=W-N;for(const fe of k)fe.position={x:fe.position.x-re+Z[0]*(A-I),y:fe.position.y-ie+Z[1]*(M-R)},$.push(fe)}if((U||Y)&&(B.width=U&&(!s.resizeDirection||s.resizeDirection==="horizontal")?A:v.width,B.height=Y&&(!s.resizeDirection||s.resizeDirection==="vertical")?M:v.height,v.width=B.width,v.height=B.height),C&&g.expandParent){const re=Z[0]*(B.width??0);B.x&&B.x<re&&(v.x=re,p.x=p.x-(B.x-re));const ie=Z[1]*(B.height??0);B.y&&B.y<ie&&(v.y=ie,p.y=p.y-(B.y-ie))}const G=vy({width:v.width,prevWidth:I,height:v.height,prevHeight:R,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),q={...v,direction:G};(_==null?void 0:_(j,q))!==!1&&(F=!0,y==null||y(j,q),r(B,$))}).on("end",j=>{F&&(x==null||x(j,{...v}),i==null||i({...v}),F=!1)});o.call(P)}function a(){o.on(".drag",null)}return{update:l,destroy:a}}var fp={exports:{}},hp={},pp={exports:{}},gp={};/**
|
|
50
|
-
* @license React
|
|
51
|
-
* use-sync-external-store-shim.production.js
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/var Wr=V;function ky(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sy=typeof Object.is=="function"?Object.is:ky,Ny=Wr.useState,My=Wr.useEffect,Iy=Wr.useLayoutEffect,Ly=Wr.useDebugValue;function by(e,t){var n=t(),r=Ny({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Iy(function(){i.value=n,i.getSnapshot=t,da(i)&&o({inst:i})},[e,n,t]),My(function(){return da(i)&&o({inst:i}),e(function(){da(i)&&o({inst:i})})},[e]),Ly(n),n}function da(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sy(e,n)}catch{return!0}}function jy(e,t){return t()}var Ty=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?jy:by;gp.useSyncExternalStore=Wr.useSyncExternalStore!==void 0?Wr.useSyncExternalStore:Ty;pp.exports=gp;var Py=pp.exports;/**
|
|
58
|
-
* @license React
|
|
59
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
60
|
-
*
|
|
61
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the MIT license found in the
|
|
64
|
-
* LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/var kl=V,Ay=Py;function Ry(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $y=typeof Object.is=="function"?Object.is:Ry,Oy=Ay.useSyncExternalStore,Dy=kl.useRef,Vy=kl.useEffect,zy=kl.useMemo,Hy=kl.useDebugValue;hp.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Dy(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=zy(function(){function a(h){if(!u){if(u=!0,c=h,h=r(h),i!==void 0&&s.hasValue){var y=s.value;if(i(y,h))return d=y}return d=h}if(y=d,$y(c,h))return y;var x=r(h);return i!==void 0&&i(y,x)?(c=h,y):(c=h,d=x)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return a(t())},f===null?void 0:function(){return a(f())}]},[t,n,r,i]);var l=Oy(e,o[0],o[1]);return Vy(function(){s.hasValue=!0,s.value=l},[l]),Hy(l),l};fp.exports=hp;var Fy=fp.exports;const By=zf(Fy),Wy={},nf=e=>{let t;const n=new Set,r=(c,d)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const h=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(y=>y(t,h))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(Wy?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,a);return a},Uy=e=>e?nf(e):nf,{useDebugValue:Zy}=J,{useSyncExternalStoreWithSelector:Yy}=By,Gy=e=>e;function mp(e,t=Gy,n){const r=Yy(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Zy(r),r}const rf=(e,t)=>{const n=Uy(e),r=(i,o=t)=>mp(n,i,o);return Object.assign(r,n),r},Xy=(e,t)=>e?rf(e,t):rf;function ge(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[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const Sl=V.createContext(null),Ky=Sl.Provider,yp=Ot.error001();function se(e,t){const n=V.useContext(Sl);if(n===null)throw new Error(yp);return mp(n,e,t)}function ye(){const e=V.useContext(Sl);if(e===null)throw new Error(yp);return V.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const of={display:"none"},Qy={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},vp="react-flow__node-desc",wp="react-flow__edge-desc",qy="react-flow__aria-live",Jy=e=>e.ariaLiveMessage,ev=e=>e.ariaLabelConfig;function tv({rfId:e}){const t=se(Jy);return m.jsx("div",{id:`${qy}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Qy,children:t})}function nv({rfId:e,disableKeyboardA11y:t}){const n=se(ev);return m.jsxs(m.Fragment,{children:[m.jsx("div",{id:`${vp}-${e}`,style:of,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),m.jsx("div",{id:`${wp}-${e}`,style:of,children:n["edge.a11yDescription.default"]}),!t&&m.jsx(tv,{rfId:e})]})}const co=V.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},o)=>{const s=`${e}`.split("-");return m.jsx("div",{className:Se(["react-flow__panel",n,...s]),style:r,ref:o,...i,children:t})});co.displayName="Panel";function rv({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:m.jsx(co,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:m.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const iv=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Xo=e=>e.id;function ov(e,t){return ge(e.selectedNodes.map(Xo),t.selectedNodes.map(Xo))&&ge(e.selectedEdges.map(Xo),t.selectedEdges.map(Xo))}function sv({onSelectionChange:e}){const t=ye(),{selectedNodes:n,selectedEdges:r}=se(iv,ov);return V.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(o=>o(i))},[n,r,e]),null}const lv=e=>!!e.onSelectionChangeHandlers;function av({onSelectionChange:e}){const t=se(lv);return e||t?m.jsx(sv,{onSelectionChange:e}):null}const ku=typeof window<"u"?V.useLayoutEffect:V.useEffect,xp=[0,0],uv={x:0,y:0,zoom:1},cv=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],sf=[...cv,"rfId"],dv=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),lf={translateExtent:Gi,nodeOrigin:xp,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function fv(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:o,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:a}=se(dv,ge),u=ye();ku(()=>(a(e.defaultNodes,e.defaultEdges),()=>{c.current=lf,l()}),[]);const c=V.useRef(lf);return ku(()=>{for(const d of sf){const f=e[d],h=c.current[d];f!==h&&(typeof e[d]>"u"||(d==="nodes"?t(f):d==="edges"?n(f):d==="minZoom"?r(f):d==="maxZoom"?i(f):d==="translateExtent"?o(f):d==="nodeExtent"?s(f):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:R7(f)}):d==="fitView"?u.setState({fitViewQueued:f}):d==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[d]:f})))}c.current=e},sf.map(d=>e[d])),null}function af(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function hv(e){var r;const[t,n]=V.useState(e==="system"?null:e);return V.useEffect(()=>{if(e!=="system"){n(e);return}const i=af(),o=()=>n(i!=null&&i.matches?"dark":"light");return o(),i==null||i.addEventListener("change",o),()=>{i==null||i.removeEventListener("change",o)}},[e]),t!==null?t:(r=af())!=null&&r.matches?"dark":"light"}const uf=typeof document<"u"?document:null;function qi(e=null,t={target:uf,actInsideInputWithModifier:!0}){const[n,r]=V.useState(!1),i=V.useRef(!1),o=V.useRef(new Set([])),[s,l]=V.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
|
|
66
|
-
`).replace(`
|
|
67
|
-
|
|
68
|
-
`,`
|
|
69
|
-
+`).split(`
|
|
70
|
-
`)),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return V.useEffect(()=>{const a=(t==null?void 0:t.target)??uf,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const c=h=>{var _,v;if(i.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!i.current||i.current&&!u)&&Xh(h))return!1;const x=df(h.code,l);if(o.current.add(h[x]),cf(s,o.current,!1)){const p=((v=(_=h.composedPath)==null?void 0:_.call(h))==null?void 0:v[0])||h.target,g=(p==null?void 0:p.nodeName)==="BUTTON"||(p==null?void 0:p.nodeName)==="A";t.preventDefault!==!1&&(i.current||!g)&&h.preventDefault(),r(!0)}},d=h=>{const y=df(h.code,l);cf(s,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(h[y]),h.key==="Meta"&&o.current.clear(),i.current=!1},f=()=>{o.current.clear(),r(!1)};return a==null||a.addEventListener("keydown",c),a==null||a.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{a==null||a.removeEventListener("keydown",c),a==null||a.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,r]),n}function cf(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function df(e,t){return t.includes(e)?"code":"key"}const pv=()=>{const e=ye();return V.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,o],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??o},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:o,maxZoom:s,panZoom:l}=e.getState(),a=Ac(t,r,i,o,s,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(a,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:o,domNode:s}=e.getState();if(!s)return t;const{x:l,y:a}=s.getBoundingClientRect(),u={x:t.x-l,y:t.y-a},c=n.snapGrid??i,d=n.snapToGrid??o;return uo(u,r,d,c)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:o}=r.getBoundingClientRect(),s=Ks(t,n);return{x:s.x+i,y:s.y+o}}}),[])};function Cp(e,t){const n=[],r=new Map,i=[];for(const o of e)if(o.type==="add"){i.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const s=r.get(o.id);s?s.push(o):r.set(o.id,[o])}for(const o of t){const s=r.get(o.id);if(!s){n.push(o);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...o};for(const a of s)gv(a,l);n.push(l)}return i.length&&i.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function gv(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function mv(e,t){return Cp(e,t)}function yv(e,t){return Cp(e,t)}function Tn(e,t){return{id:e,type:"select",selected:t}}function vr(e,t=new Set,n=!1){const r=[];for(const[i,o]of e){const s=t.has(i);!(o.selected===void 0&&!s)&&o.selected!==s&&(n&&(o.selected=s),r.push(Tn(o.id,s)))}return r}function ff({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(o=>[o.id,o]));for(const[o,s]of e.entries()){const l=t.get(s.id),a=((i=l==null?void 0:l.internals)==null?void 0:i.userNode)??l;a!==void 0&&a!==s&&n.push({id:s.id,item:s,type:"replace"}),a===void 0&&n.push({item:s,type:"add",index:o})}for(const[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function hf(e){return{id:e.id,type:"remove"}}const pf=e=>S7(e),vv=e=>Hh(e);function _p(e){return V.forwardRef(e)}function gf(e){const[t,n]=V.useState(BigInt(0)),[r]=V.useState(()=>wv(()=>n(i=>i+BigInt(1))));return ku(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function wv(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Ep=V.createContext(null);function xv({children:e}){const t=ye(),n=V.useCallback(l=>{const{nodes:a=[],setNodes:u,hasDefaultNodes:c,onNodesChange:d,nodeLookup:f,fitViewQueued:h,onNodesChangeMiddlewareMap:y}=t.getState();let x=a;for(const v of l)x=typeof v=="function"?v(x):v;let _=ff({items:x,lookup:f});for(const v of y.values())_=v(_);c&&u(x),_.length>0?d==null||d(_):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:p,setNodes:g}=t.getState();v&&g(p)})},[]),r=gf(n),i=V.useCallback(l=>{const{edges:a=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:d,edgeLookup:f}=t.getState();let h=a;for(const y of l)h=typeof y=="function"?y(h):y;c?u(h):d&&d(ff({items:h,lookup:f}))},[]),o=gf(i),s=V.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return m.jsx(Ep.Provider,{value:s,children:e})}function Cv(){const e=V.useContext(Ep);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const _v=e=>!!e.panZoom;function fo(){const e=pv(),t=ye(),n=Cv(),r=se(_v),i=V.useMemo(()=>{const o=d=>t.getState().nodeLookup.get(d),s=d=>{n.nodeQueue.push(d)},l=d=>{n.edgeQueue.push(d)},a=d=>{var v,p;const{nodeLookup:f,nodeOrigin:h}=t.getState(),y=pf(d)?d:f.get(d.id),x=y.parentId?Yh(y.position,y.measured,y.parentId,f,h):y.position,_={...y,position:x,width:((v=y.measured)==null?void 0:v.width)??y.width,height:((p=y.measured)==null?void 0:p.height)??y.height};return Hr(_)},u=(d,f,h={replace:!1})=>{s(y=>y.map(x=>{if(x.id===d){const _=typeof f=="function"?f(x):f;return h.replace&&pf(_)?_:{...x,..._}}return x}))},c=(d,f,h={replace:!1})=>{l(y=>y.map(x=>{if(x.id===d){const _=typeof f=="function"?f(x):f;return h.replace&&vv(_)?_:{...x,..._}}return x}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>{var f;return(f=o(d))==null?void 0:f.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:s,setEdges:l,addNodes:d=>{const f=Array.isArray(d)?d:[d];n.nodeQueue.push(h=>[...h,...f])},addEdges:d=>{const f=Array.isArray(d)?d:[d];n.edgeQueue.push(h=>[...h,...f])},toObject:()=>{const{nodes:d=[],edges:f=[],transform:h}=t.getState(),[y,x,_]=h;return{nodes:d.map(v=>({...v})),edges:f.map(v=>({...v})),viewport:{x:y,y:x,zoom:_}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{const{nodes:h,edges:y,onNodesDelete:x,onEdgesDelete:_,triggerNodeChanges:v,triggerEdgeChanges:p,onDelete:g,onBeforeDelete:w}=t.getState(),{nodes:k,edges:C}=await b7({nodesToRemove:d,edgesToRemove:f,nodes:h,edges:y,onBeforeDelete:w}),L=C.length>0,T=k.length>0;if(L){const F=C.map(hf);_==null||_(C),p(F)}if(T){const F=k.map(hf);x==null||x(k),v(F)}return(T||L)&&(g==null||g({nodes:k,edges:C})),{deletedNodes:k,deletedEdges:C}},getIntersectingNodes:(d,f=!0,h)=>{const y=Bd(d),x=y?d:a(d),_=h!==void 0;return x?(h||t.getState().nodes).filter(v=>{const p=t.getState().nodeLookup.get(v.id);if(p&&!y&&(v.id===d.id||!p.internals.positionAbsolute))return!1;const g=Hr(_?v:p),w=Ki(g,x);return f&&w>0||w>=g.width*g.height||w>=x.width*x.height}):[]},isNodeIntersecting:(d,f,h=!0)=>{const x=Bd(d)?d:a(d);if(!x)return!1;const _=Ki(x,f);return h&&_>0||_>=f.width*f.height||_>=x.width*x.height},updateNode:u,updateNodeData:(d,f,h={replace:!1})=>{u(d,y=>{const x=typeof f=="function"?f(y):f;return h.replace?{...y,data:x}:{...y,data:{...y.data,...x}}},h)},updateEdge:c,updateEdgeData:(d,f,h={replace:!1})=>{c(d,y=>{const x=typeof f=="function"?f(y):f;return h.replace?{...y,data:x}:{...y,data:{...y.data,...x}}},h)},getNodesBounds:d=>{const{nodeLookup:f,nodeOrigin:h}=t.getState();return N7(d,{nodeLookup:f,nodeOrigin:h})},getHandleConnections:({type:d,id:f,nodeId:h})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${h}-${d}${f?`-${f}`:""}`))==null?void 0:y.values())??[])},getNodeConnections:({type:d,handleId:f,nodeId:h})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${h}${d?f?`-${d}-${f}`:`-${d}`:""}`))==null?void 0:y.values())??[])},fitView:async d=>{const f=t.getState().fitViewResolver??A7();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(h=>[...h]),f.promise}}},[]);return V.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const mf=e=>e.selected,Ev=typeof window<"u"?window:void 0;function kv({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=ye(),{deleteElements:r}=fo(),i=qi(e,{actInsideInputWithModifier:!1}),o=qi(t,{target:Ev});V.useEffect(()=>{if(i){const{edges:s,nodes:l}=n.getState();r({nodes:l.filter(mf),edges:s.filter(mf)}),n.setState({nodesSelectionActive:!1})}},[i]),V.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function Sv(e){const t=ye();V.useEffect(()=>{const n=()=>{var i,o,s,l;if(!e.current||!(((o=(i=e.current).checkVisibility)==null?void 0:o.call(i))??!0))return!1;const r=Rc(e.current);(r.height===0||r.width===0)&&((l=(s=t.getState()).onError)==null||l.call(s,"004",Ot.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const Nl={position:"absolute",width:"100%",height:"100%",top:0,left:0},Nv=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Mv({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:o=Hn.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:a,translateExtent:u,minZoom:c,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:h=!0,children:y,noWheelClassName:x,noPanClassName:_,onViewportChange:v,isControlledViewport:p,paneClickDistance:g,selectionOnDrag:w}){const k=ye(),C=V.useRef(null),{userSelectionActive:L,lib:T,connectionInProgress:F}=se(Nv,ge),P=qi(f),j=V.useRef();Sv(C);const D=V.useCallback(z=>{v==null||v({x:z[0],y:z[1],zoom:z[2]}),p||k.setState({transform:z})},[v,p]);return V.useEffect(()=>{if(C.current){j.current=yy({domNode:C.current,minZoom:c,maxZoom:d,translateExtent:u,viewport:a,onDraggingChange:b=>k.setState($=>$.paneDragging===b?$:{paneDragging:b}),onPanZoomStart:(b,$)=>{const{onViewportChangeStart:S,onMoveStart:N}=k.getState();N==null||N(b,$),S==null||S($)},onPanZoom:(b,$)=>{const{onViewportChange:S,onMove:N}=k.getState();N==null||N(b,$),S==null||S($)},onPanZoomEnd:(b,$)=>{const{onViewportChangeEnd:S,onMoveEnd:N}=k.getState();N==null||N(b,$),S==null||S($)}});const{x:z,y:E,zoom:O}=j.current.getViewport();return k.setState({panZoom:j.current,transform:[z,E,O],domNode:C.current.closest(".react-flow")}),()=>{var b;(b=j.current)==null||b.destroy()}}},[]),V.useEffect(()=>{var z;(z=j.current)==null||z.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:P,preventScrolling:h,noPanClassName:_,userSelectionActive:L,noWheelClassName:x,lib:T,onTransformChange:D,connectionInProgress:F,selectionOnDrag:w,paneClickDistance:g})},[e,t,n,r,i,o,s,l,P,h,_,L,x,T,D,F,w,g]),m.jsx("div",{className:"react-flow__renderer",ref:C,style:Nl,children:y})}const Iv=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Lv(){const{userSelectionActive:e,userSelectionRect:t}=se(Iv,ge);return e&&t?m.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const fa=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},bv=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function jv({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Xi.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:o,onSelectionStart:s,onSelectionEnd:l,onPaneClick:a,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:h,children:y}){const x=ye(),{userSelectionActive:_,elementsSelectable:v,dragging:p,connectionInProgress:g}=se(bv,ge),w=v&&(e||_),k=V.useRef(null),C=V.useRef(),L=V.useRef(new Set),T=V.useRef(new Set),F=V.useRef(!1),P=S=>{if(F.current||g){F.current=!1;return}a==null||a(S),x.getState().resetSelectedElements(),x.setState({nodesSelectionActive:!1})},j=S=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){S.preventDefault();return}u==null||u(S)},D=c?S=>c(S):void 0,z=S=>{F.current&&(S.stopPropagation(),F.current=!1)},E=S=>{var M,H;const{domNode:N}=x.getState();if(C.current=N==null?void 0:N.getBoundingClientRect(),!C.current)return;const I=S.target===k.current;if(!I&&!!S.target.closest(".nokey")||!e||!(o&&I||t)||S.button!==0||!S.isPrimary)return;(H=(M=S.target)==null?void 0:M.setPointerCapture)==null||H.call(M,S.pointerId),F.current=!1;const{x:Z,y:A}=Et(S.nativeEvent,C.current);x.setState({userSelectionRect:{width:0,height:0,startX:Z,startY:A,x:Z,y:A}}),I||(S.stopPropagation(),S.preventDefault())},O=S=>{const{userSelectionRect:N,transform:I,nodeLookup:R,edgeLookup:B,connectionLookup:Z,triggerNodeChanges:A,triggerEdgeChanges:M,defaultEdgeOptions:H,resetSelectedElements:W}=x.getState();if(!C.current||!N)return;const{x:U,y:Y}=Et(S.nativeEvent,C.current),{startX:X,startY:K}=N;if(!F.current){const ie=t?0:i;if(Math.hypot(U-X,Y-K)<=ie)return;W(),s==null||s(S)}F.current=!0;const G={startX:X,startY:K,x:U<X?U:X,y:Y<K?Y:K,width:Math.abs(U-X),height:Math.abs(Y-K)},q=L.current,te=T.current;L.current=new Set(Pc(R,G,I,n===Xi.Partial,!0).map(ie=>ie.id)),T.current=new Set;const re=(H==null?void 0:H.selectable)??!0;for(const ie of L.current){const fe=Z.get(ie);if(fe)for(const{edgeId:Be}of fe.values()){const ot=B.get(Be);ot&&(ot.selectable??re)&&T.current.add(Be)}}if(!Wd(q,L.current)){const ie=vr(R,L.current,!0);A(ie)}if(!Wd(te,T.current)){const ie=vr(B,T.current);M(ie)}x.setState({userSelectionRect:G,userSelectionActive:!0,nodesSelectionActive:!1})},b=S=>{var N,I;S.button===0&&((I=(N=S.target)==null?void 0:N.releasePointerCapture)==null||I.call(N,S.pointerId),!_&&S.target===k.current&&x.getState().userSelectionRect&&(P==null||P(S)),x.setState({userSelectionActive:!1,userSelectionRect:null}),F.current&&(l==null||l(S),x.setState({nodesSelectionActive:L.current.size>0})))},$=r===!0||Array.isArray(r)&&r.includes(0);return m.jsxs("div",{className:Se(["react-flow__pane",{draggable:$,dragging:p,selection:e}]),onClick:w?void 0:fa(P,k),onContextMenu:fa(j,k),onWheel:fa(D,k),onPointerEnter:w?void 0:d,onPointerMove:w?O:f,onPointerUp:w?b:void 0,onPointerDownCapture:w?E:void 0,onClickCapture:w?z:void 0,onPointerLeave:h,ref:k,style:Nl,children:[y,m.jsx(Lv,{})]})}function Su({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:s,nodeLookup:l,onError:a}=t.getState(),u=l.get(e);if(!u){a==null||a("012",Ot.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&s)&&(o({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.blur()})):i([e])}function kp({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,nodeClickDistance:s}){const l=ye(),[a,u]=V.useState(!1),c=V.useRef();return V.useEffect(()=>{c.current=ry({getStoreItems:()=>l.getState(),onNodeMouseDown:d=>{Su({id:d,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),V.useEffect(()=>{if(!(t||!e.current||!c.current))return c.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:i,nodeClickDistance:s}),()=>{var d;(d=c.current)==null||d.destroy()}},[n,r,t,o,e,i,s]),a}const Tv=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Sp(){const e=ye();return V.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:o,nodesDraggable:s,onError:l,updateNodePositions:a,nodeLookup:u,nodeOrigin:c}=e.getState(),d=new Map,f=Tv(s),h=i?o[0]:5,y=i?o[1]:5,x=n.direction.x*h*n.factor,_=n.direction.y*y*n.factor;for(const[,v]of u){if(!f(v))continue;let p={x:v.internals.positionAbsolute.x+x,y:v.internals.positionAbsolute.y+_};i&&(p=ao(p,o));const{position:g,positionAbsolute:w}=Fh({nodeId:v.id,nextPosition:p,nodeLookup:u,nodeExtent:r,nodeOrigin:c,onError:l});v.position=g,v.internals.positionAbsolute=w,d.set(v.id,v)}a(d)},[])}const Hc=V.createContext(null),Pv=Hc.Provider;Hc.Consumer;const Np=()=>V.useContext(Hc),Av=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Rv=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:o,connection:s}=r,{fromHandle:l,toHandle:a,isValid:u}=s,c=(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:c,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:o===Vr.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:c&&u}};function $v({type:e="source",position:t=ne.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:s,onConnect:l,children:a,className:u,onMouseDown:c,onTouchStart:d,...f},h){var O,b;const y=s||null,x=e==="target",_=ye(),v=Np(),{connectOnClick:p,noPanClassName:g,rfId:w}=se(Av,ge),{connectingFrom:k,connectingTo:C,clickConnecting:L,isPossibleEndHandle:T,connectionInProcess:F,clickConnectionInProcess:P,valid:j}=se(Rv(v,y,e),ge);v||(b=(O=_.getState()).onError)==null||b.call(O,"010",Ot.error010());const D=$=>{const{defaultEdgeOptions:S,onConnect:N,hasDefaultEdges:I}=_.getState(),R={...S,...$};if(I){const{edges:B,setEdges:Z}=_.getState();Z(H7(R,B))}N==null||N(R),l==null||l(R)},z=$=>{if(!v)return;const S=Kh($.nativeEvent);if(i&&(S&&$.button===0||!S)){const N=_.getState();Eu.onPointerDown($.nativeEvent,{handleDomNode:$.currentTarget,autoPanOnConnect:N.autoPanOnConnect,connectionMode:N.connectionMode,connectionRadius:N.connectionRadius,domNode:N.domNode,nodeLookup:N.nodeLookup,lib:N.lib,isTarget:x,handleId:y,nodeId:v,flowId:N.rfId,panBy:N.panBy,cancelConnection:N.cancelConnection,onConnectStart:N.onConnectStart,onConnectEnd:(...I)=>{var R,B;return(B=(R=_.getState()).onConnectEnd)==null?void 0:B.call(R,...I)},updateConnection:N.updateConnection,onConnect:D,isValidConnection:n||((...I)=>{var R,B;return((B=(R=_.getState()).isValidConnection)==null?void 0:B.call(R,...I))??!0}),getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,autoPanSpeed:N.autoPanSpeed,dragThreshold:N.connectionDragThreshold})}S?c==null||c($):d==null||d($)},E=$=>{const{onClickConnectStart:S,onClickConnectEnd:N,connectionClickStartHandle:I,connectionMode:R,isValidConnection:B,lib:Z,rfId:A,nodeLookup:M,connection:H}=_.getState();if(!v||!I&&!i)return;if(!I){S==null||S($.nativeEvent,{nodeId:v,handleId:y,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:v,type:e,id:y}});return}const W=Gh($.target),U=n||B,{connection:Y,isValid:X}=Eu.isValid($.nativeEvent,{handle:{nodeId:v,id:y,type:e},connectionMode:R,fromNodeId:I.nodeId,fromHandleId:I.id||null,fromType:I.type,isValidConnection:U,flowId:A,doc:W,lib:Z,nodeLookup:M});X&&Y&&D(Y);const K=structuredClone(H);delete K.inProgress,K.toPosition=K.toHandle?K.toHandle.position:null,N==null||N($,K),_.setState({connectionClickStartHandle:null})};return m.jsx("div",{"data-handleid":y,"data-nodeid":v,"data-handlepos":t,"data-id":`${w}-${v}-${y}-${e}`,className:Se(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",g,u,{source:!x,target:x,connectable:r,connectablestart:i,connectableend:o,clickconnecting:L,connectingfrom:k,connectingto:C,valid:j,connectionindicator:r&&(!F||T)&&(F||P?o:i)}]),onMouseDown:z,onTouchStart:z,onClick:p?E:void 0,ref:h,...f,children:a})}const ct=V.memo(_p($v));function Ov({data:e,isConnectable:t,sourcePosition:n=ne.Bottom}){return m.jsxs(m.Fragment,{children:[e==null?void 0:e.label,m.jsx(ct,{type:"source",position:n,isConnectable:t})]})}function Dv({data:e,isConnectable:t,targetPosition:n=ne.Top,sourcePosition:r=ne.Bottom}){return m.jsxs(m.Fragment,{children:[m.jsx(ct,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,m.jsx(ct,{type:"source",position:r,isConnectable:t})]})}function Vv(){return null}function zv({data:e,isConnectable:t,targetPosition:n=ne.Top}){return m.jsxs(m.Fragment,{children:[m.jsx(ct,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Qs={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},yf={input:Ov,default:Dv,output:zv,group:Vv};function Hv(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const Fv=e=>{const{width:t,height:n,x:r,y:i}=lo(e.nodeLookup,{filter:o=>!!o.selected});return{width:_t(t)?t:null,height:_t(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function Bv({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=ye(),{width:i,height:o,transformString:s,userSelectionActive:l}=se(Fv,ge),a=Sp(),u=V.useRef(null);V.useEffect(()=>{var h;n||(h=u.current)==null||h.focus({preventScroll:!0})},[n]);const c=!l&&i!==null&&o!==null;if(kp({nodeRef:u,disabled:!c}),!c)return null;const d=e?h=>{const y=r.getState().nodes.filter(x=>x.selected);e(h,y)}:void 0,f=h=>{Object.prototype.hasOwnProperty.call(Qs,h.key)&&(h.preventDefault(),a({direction:Qs[h.key],factor:h.shiftKey?4:1}))};return m.jsx("div",{className:Se(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:m.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:i,height:o}})})}const vf=typeof window<"u"?window:void 0,Wv=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Mp({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:a,selectionKeyCode:u,selectionOnDrag:c,selectionMode:d,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:y,panActivationKeyCode:x,zoomActivationKeyCode:_,elementsSelectable:v,zoomOnScroll:p,zoomOnPinch:g,panOnScroll:w,panOnScrollSpeed:k,panOnScrollMode:C,zoomOnDoubleClick:L,panOnDrag:T,defaultViewport:F,translateExtent:P,minZoom:j,maxZoom:D,preventScrolling:z,onSelectionContextMenu:E,noWheelClassName:O,noPanClassName:b,disableKeyboardA11y:$,onViewportChange:S,isControlledViewport:N}){const{nodesSelectionActive:I,userSelectionActive:R}=se(Wv,ge),B=qi(u,{target:vf}),Z=qi(x,{target:vf}),A=Z||T,M=Z||w,H=c&&A!==!0,W=B||R||H;return kv({deleteKeyCode:a,multiSelectionKeyCode:y}),m.jsx(Mv,{onPaneContextMenu:o,elementsSelectable:v,zoomOnScroll:p,zoomOnPinch:g,panOnScroll:M,panOnScrollSpeed:k,panOnScrollMode:C,zoomOnDoubleClick:L,panOnDrag:!B&&A,defaultViewport:F,translateExtent:P,minZoom:j,maxZoom:D,zoomActivationKeyCode:_,preventScrolling:z,noWheelClassName:O,noPanClassName:b,onViewportChange:S,isControlledViewport:N,paneClickDistance:l,selectionOnDrag:H,children:m.jsxs(jv,{onSelectionStart:f,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,panOnDrag:A,isSelecting:!!W,selectionMode:d,selectionKeyPressed:B,paneClickDistance:l,selectionOnDrag:H,children:[e,I&&m.jsx(Bv,{onSelectionContextMenu:E,noPanClassName:b,disableKeyboardA11y:$})]})})}Mp.displayName="FlowRenderer";const Uv=V.memo(Mp),Zv=e=>t=>e?Pc(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function Yv(e){return se(V.useCallback(Zv(e),[e]),ge)}const Gv=e=>e.updateNodeInternals;function Xv(){const e=se(Gv),[t]=V.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const o=i.target.getAttribute("data-id");r.set(o,{id:o,nodeElement:i.target,force:!0})}),e(r)}));return V.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function Kv({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=ye(),o=V.useRef(null),s=V.useRef(null),l=V.useRef(e.sourcePosition),a=V.useRef(e.targetPosition),u=V.useRef(t),c=n&&!!e.internals.handleBounds;return V.useEffect(()=>{o.current&&!e.hidden&&(!c||s.current!==o.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(o.current),s.current=o.current)},[c,e.hidden]),V.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),V.useEffect(()=>{if(o.current){const d=u.current!==t,f=l.current!==e.sourcePosition,h=a.current!==e.targetPosition;(d||f||h)&&(u.current=t,l.current=e.sourcePosition,a.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function Qv({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:o,onDoubleClick:s,nodesDraggable:l,elementsSelectable:a,nodesConnectable:u,nodesFocusable:c,resizeObserver:d,noDragClassName:f,noPanClassName:h,disableKeyboardA11y:y,rfId:x,nodeTypes:_,nodeClickDistance:v,onError:p}){const{node:g,internals:w,isParent:k}=se(U=>{const Y=U.nodeLookup.get(e),X=U.parentLookup.has(e);return{node:Y,internals:Y.internals,isParent:X}},ge);let C=g.type||"default",L=(_==null?void 0:_[C])||yf[C];L===void 0&&(p==null||p("003",Ot.error003(C)),C="default",L=(_==null?void 0:_.default)||yf.default);const T=!!(g.draggable||l&&typeof g.draggable>"u"),F=!!(g.selectable||a&&typeof g.selectable>"u"),P=!!(g.connectable||u&&typeof g.connectable>"u"),j=!!(g.focusable||c&&typeof g.focusable>"u"),D=ye(),z=Zh(g),E=Kv({node:g,nodeType:C,hasDimensions:z,resizeObserver:d}),O=kp({nodeRef:E,disabled:g.hidden||!T,noDragClassName:f,handleSelector:g.dragHandle,nodeId:e,isSelectable:F,nodeClickDistance:v}),b=Sp();if(g.hidden)return null;const $=en(g),S=Hv(g),N=F||T||t||n||r||i,I=n?U=>n(U,{...w.userNode}):void 0,R=r?U=>r(U,{...w.userNode}):void 0,B=i?U=>i(U,{...w.userNode}):void 0,Z=o?U=>o(U,{...w.userNode}):void 0,A=s?U=>s(U,{...w.userNode}):void 0,M=U=>{const{selectNodesOnDrag:Y,nodeDragThreshold:X}=D.getState();F&&(!Y||!T||X>0)&&Su({id:e,store:D,nodeRef:E}),t&&t(U,{...w.userNode})},H=U=>{if(!(Xh(U.nativeEvent)||y)){if(Oh.includes(U.key)&&F){const Y=U.key==="Escape";Su({id:e,store:D,unselect:Y,nodeRef:E})}else if(T&&g.selected&&Object.prototype.hasOwnProperty.call(Qs,U.key)){U.preventDefault();const{ariaLabelConfig:Y}=D.getState();D.setState({ariaLiveMessage:Y["node.a11yDescription.ariaLiveMessage"]({direction:U.key.replace("Arrow","").toLowerCase(),x:~~w.positionAbsolute.x,y:~~w.positionAbsolute.y})}),b({direction:Qs[U.key],factor:U.shiftKey?4:1})}}},W=()=>{var te;if(y||!((te=E.current)!=null&&te.matches(":focus-visible")))return;const{transform:U,width:Y,height:X,autoPanOnNodeFocus:K,setCenter:G}=D.getState();if(!K)return;Pc(new Map([[e,g]]),{x:0,y:0,width:Y,height:X},U,!0).length>0||G(g.position.x+$.width/2,g.position.y+$.height/2,{zoom:U[2]})};return m.jsx("div",{className:Se(["react-flow__node",`react-flow__node-${C}`,{[h]:T},g.className,{selected:g.selected,selectable:F,parent:k,draggable:T,dragging:O}]),ref:E,style:{zIndex:w.z,transform:`translate(${w.positionAbsolute.x}px,${w.positionAbsolute.y}px)`,pointerEvents:N?"all":"none",visibility:z?"visible":"hidden",...g.style,...S},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:I,onMouseMove:R,onMouseLeave:B,onContextMenu:Z,onClick:M,onDoubleClick:A,onKeyDown:j?H:void 0,tabIndex:j?0:void 0,onFocus:j?W:void 0,role:g.ariaRole??(j?"group":void 0),"aria-roledescription":"node","aria-describedby":y?void 0:`${vp}-${x}`,"aria-label":g.ariaLabel,...g.domAttributes,children:m.jsx(Pv,{value:e,children:m.jsx(L,{id:e,data:g.data,type:C,positionAbsoluteX:w.positionAbsolute.x,positionAbsoluteY:w.positionAbsolute.y,selected:g.selected??!1,selectable:F,draggable:T,deletable:g.deletable??!0,isConnectable:P,sourcePosition:g.sourcePosition,targetPosition:g.targetPosition,dragging:O,dragHandle:g.dragHandle,zIndex:w.z,parentId:g.parentId,...$})})})}var qv=V.memo(Qv);const Jv=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Ip(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:o}=se(Jv,ge),s=Yv(e.onlyRenderVisibleElements),l=Xv();return m.jsx("div",{className:"react-flow__nodes",style:Nl,children:s.map(a=>m.jsx(qv,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:o},a))})}Ip.displayName="NodeRenderer";const ew=V.memo(Ip);function tw(e){return se(V.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const o=n.nodeLookup.get(i.source),s=n.nodeLookup.get(i.target);o&&s&&D7({sourceNode:o,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),ge)}const nw=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return m.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},rw=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return m.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},wf={[Gs.Arrow]:nw,[Gs.ArrowClosed]:rw};function iw(e){const t=ye();return V.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(wf,e)?wf[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",Ot.error009(e)),null)},[e])}const ow=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{const a=iw(t);return a?m.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:l,refX:"0",refY:"0",children:m.jsx(a,{color:n,strokeWidth:s})}):null},Lp=({defaultColor:e,rfId:t})=>{const n=se(o=>o.edges),r=se(o=>o.defaultEdgeOptions),i=V.useMemo(()=>Z7(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?m.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:m.jsx("defs",{children:i.map(o=>m.jsx(ow,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};Lp.displayName="MarkerDefinitions";var sw=V.memo(Lp);function bp({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:o,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:a,className:u,...c}){const[d,f]=V.useState({x:1,y:0,width:0,height:0}),h=Se(["react-flow__edge-textwrapper",u]),y=V.useRef(null);return V.useEffect(()=>{if(y.current){const x=y.current.getBBox();f({x:x.x,y:x.y,width:x.width,height:x.height})}},[n]),n?m.jsxs("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:h,visibility:d.width?"visible":"hidden",...c,children:[i&&m.jsx("rect",{width:d.width+2*s[0],x:-s[0],y:-s[1],height:d.height+2*s[1],className:"react-flow__edge-textbg",style:o,rx:l,ry:l}),m.jsx("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:y,style:r,children:n}),a]}):null}bp.displayName="EdgeText";const lw=V.memo(bp);function Ur({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a,interactionWidth:u=20,...c}){return m.jsxs(m.Fragment,{children:[m.jsx("path",{...c,d:e,fill:"none",className:Se(["react-flow__edge-path",c.className])}),u?m.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&_t(t)&&_t(n)?m.jsx(lw,{x:t,y:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a}):null]})}function xf({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===ne.Left||e===ne.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function jp({sourceX:e,sourceY:t,sourcePosition:n=ne.Bottom,targetX:r,targetY:i,targetPosition:o=ne.Top}){const[s,l]=xf({pos:n,x1:e,y1:t,x2:r,y2:i}),[a,u]=xf({pos:o,x1:r,y1:i,x2:e,y2:t}),[c,d,f,h]=Qh({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:a,targetControlY:u});return[`M${e},${t} C${s},${l} ${a},${u} ${r},${i}`,c,d,f,h]}function Tp(e){return V.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:x,markerStart:_,interactionWidth:v})=>{const[p,g,w]=jp({sourceX:n,sourceY:r,sourcePosition:s,targetX:i,targetY:o,targetPosition:l}),k=e.isInternal?void 0:t;return m.jsx(Ur,{id:k,path:p,labelX:g,labelY:w,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:x,markerStart:_,interactionWidth:v})})}const aw=Tp({isInternal:!1}),Pp=Tp({isInternal:!0});aw.displayName="SimpleBezierEdge";Pp.displayName="SimpleBezierEdgeInternal";function Ap(e){return V.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,sourcePosition:h=ne.Bottom,targetPosition:y=ne.Top,markerEnd:x,markerStart:_,pathOptions:v,interactionWidth:p})=>{const[g,w,k]=xu({sourceX:n,sourceY:r,sourcePosition:h,targetX:i,targetY:o,targetPosition:y,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),C=e.isInternal?void 0:t;return m.jsx(Ur,{id:C,path:g,labelX:w,labelY:k,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:x,markerStart:_,interactionWidth:p})})}const Rp=Ap({isInternal:!1}),$p=Ap({isInternal:!0});Rp.displayName="SmoothStepEdge";$p.displayName="SmoothStepEdgeInternal";function Op(e){return V.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return m.jsx(Rp,{...n,id:r,pathOptions:V.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const uw=Op({isInternal:!1}),Dp=Op({isInternal:!0});uw.displayName="StepEdge";Dp.displayName="StepEdgeInternal";function Vp(e){return V.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:y,interactionWidth:x})=>{const[_,v,p]=ep({sourceX:n,sourceY:r,targetX:i,targetY:o}),g=e.isInternal?void 0:t;return m.jsx(Ur,{id:g,path:_,labelX:v,labelY:p,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:y,interactionWidth:x})})}const cw=Vp({isInternal:!1}),zp=Vp({isInternal:!0});cw.displayName="StraightEdge";zp.displayName="StraightEdgeInternal";function Hp(e){return V.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:s=ne.Bottom,targetPosition:l=ne.Top,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:x,markerStart:_,pathOptions:v,interactionWidth:p})=>{const[g,w,k]=qh({sourceX:n,sourceY:r,sourcePosition:s,targetX:i,targetY:o,targetPosition:l,curvature:v==null?void 0:v.curvature}),C=e.isInternal?void 0:t;return m.jsx(Ur,{id:C,path:g,labelX:w,labelY:k,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:x,markerStart:_,interactionWidth:p})})}const dw=Hp({isInternal:!1}),Fp=Hp({isInternal:!0});dw.displayName="BezierEdge";Fp.displayName="BezierEdgeInternal";const Cf={default:Fp,straight:zp,step:Dp,smoothstep:$p,simplebezier:Pp},_f={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},fw=(e,t,n)=>n===ne.Left?e-t:n===ne.Right?e+t:e,hw=(e,t,n)=>n===ne.Top?e-t:n===ne.Bottom?e+t:e,Ef="react-flow__edgeupdater";function kf({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:s,type:l}){return m.jsx("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:s,className:Se([Ef,`${Ef}-${l}`]),cx:fw(t,r,e),cy:hw(n,r,e),r,stroke:"transparent",fill:"transparent"})}function pw({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:o,targetY:s,sourcePosition:l,targetPosition:a,onReconnect:u,onReconnectStart:c,onReconnectEnd:d,setReconnecting:f,setUpdateHover:h}){const y=ye(),x=(w,k)=>{if(w.button!==0)return;const{autoPanOnConnect:C,domNode:L,connectionMode:T,connectionRadius:F,lib:P,onConnectStart:j,cancelConnection:D,nodeLookup:z,rfId:E,panBy:O,updateConnection:b}=y.getState(),$=k.type==="target",S=(R,B)=>{f(!1),d==null||d(R,n,k.type,B)},N=R=>u==null?void 0:u(n,R),I=(R,B)=>{f(!0),c==null||c(w,n,k.type),j==null||j(R,B)};Eu.onPointerDown(w.nativeEvent,{autoPanOnConnect:C,connectionMode:T,connectionRadius:F,domNode:L,handleId:k.id,nodeId:k.nodeId,nodeLookup:z,isTarget:$,edgeUpdaterType:k.type,lib:P,flowId:E,cancelConnection:D,panBy:O,isValidConnection:(...R)=>{var B,Z;return((Z=(B=y.getState()).isValidConnection)==null?void 0:Z.call(B,...R))??!0},onConnect:N,onConnectStart:I,onConnectEnd:(...R)=>{var B,Z;return(Z=(B=y.getState()).onConnectEnd)==null?void 0:Z.call(B,...R)},onReconnectEnd:S,updateConnection:b,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,dragThreshold:y.getState().connectionDragThreshold,handleDomNode:w.currentTarget})},_=w=>x(w,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),v=w=>x(w,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),p=()=>h(!0),g=()=>h(!1);return m.jsxs(m.Fragment,{children:[(e===!0||e==="source")&&m.jsx(kf,{position:l,centerX:r,centerY:i,radius:t,onMouseDown:_,onMouseEnter:p,onMouseOut:g,type:"source"}),(e===!0||e==="target")&&m.jsx(kf,{position:a,centerX:o,centerY:s,radius:t,onMouseDown:v,onMouseEnter:p,onMouseOut:g,type:"target"})]})}function gw({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:o,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,rfId:y,edgeTypes:x,noPanClassName:_,onError:v,disableKeyboardA11y:p}){let g=se(G=>G.edgeLookup.get(e));const w=se(G=>G.defaultEdgeOptions);g=w?{...w,...g}:g;let k=g.type||"default",C=(x==null?void 0:x[k])||Cf[k];C===void 0&&(v==null||v("011",Ot.error011(k)),k="default",C=(x==null?void 0:x.default)||Cf.default);const L=!!(g.focusable||t&&typeof g.focusable>"u"),T=typeof d<"u"&&(g.reconnectable||n&&typeof g.reconnectable>"u"),F=!!(g.selectable||r&&typeof g.selectable>"u"),P=V.useRef(null),[j,D]=V.useState(!1),[z,E]=V.useState(!1),O=ye(),{zIndex:b,sourceX:$,sourceY:S,targetX:N,targetY:I,sourcePosition:R,targetPosition:B}=se(V.useCallback(G=>{const q=G.nodeLookup.get(g.source),te=G.nodeLookup.get(g.target);if(!q||!te)return{zIndex:g.zIndex,..._f};const re=U7({id:e,sourceNode:q,targetNode:te,sourceHandle:g.sourceHandle||null,targetHandle:g.targetHandle||null,connectionMode:G.connectionMode,onError:v});return{zIndex:O7({selected:g.selected,zIndex:g.zIndex,sourceNode:q,targetNode:te,elevateOnSelect:G.elevateEdgesOnSelect,zIndexMode:G.zIndexMode}),...re||_f}},[g.source,g.target,g.sourceHandle,g.targetHandle,g.selected,g.zIndex]),ge),Z=V.useMemo(()=>g.markerStart?`url('#${Cu(g.markerStart,y)}')`:void 0,[g.markerStart,y]),A=V.useMemo(()=>g.markerEnd?`url('#${Cu(g.markerEnd,y)}')`:void 0,[g.markerEnd,y]);if(g.hidden||$===null||S===null||N===null||I===null)return null;const M=G=>{var ie;const{addSelectedEdges:q,unselectNodesAndEdges:te,multiSelectionActive:re}=O.getState();F&&(O.setState({nodesSelectionActive:!1}),g.selected&&re?(te({nodes:[],edges:[g]}),(ie=P.current)==null||ie.blur()):q([e])),i&&i(G,g)},H=o?G=>{o(G,{...g})}:void 0,W=s?G=>{s(G,{...g})}:void 0,U=l?G=>{l(G,{...g})}:void 0,Y=a?G=>{a(G,{...g})}:void 0,X=u?G=>{u(G,{...g})}:void 0,K=G=>{var q;if(!p&&Oh.includes(G.key)&&F){const{unselectNodesAndEdges:te,addSelectedEdges:re}=O.getState();G.key==="Escape"?((q=P.current)==null||q.blur(),te({edges:[g]})):re([e])}};return m.jsx("svg",{style:{zIndex:b},children:m.jsxs("g",{className:Se(["react-flow__edge",`react-flow__edge-${k}`,g.className,_,{selected:g.selected,animated:g.animated,inactive:!F&&!i,updating:j,selectable:F}]),onClick:M,onDoubleClick:H,onContextMenu:W,onMouseEnter:U,onMouseMove:Y,onMouseLeave:X,onKeyDown:L?K:void 0,tabIndex:L?0:void 0,role:g.ariaRole??(L?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":g.ariaLabel===null?void 0:g.ariaLabel||`Edge from ${g.source} to ${g.target}`,"aria-describedby":L?`${wp}-${y}`:void 0,ref:P,...g.domAttributes,children:[!z&&m.jsx(C,{id:e,source:g.source,target:g.target,type:g.type,selected:g.selected,animated:g.animated,selectable:F,deletable:g.deletable??!0,label:g.label,labelStyle:g.labelStyle,labelShowBg:g.labelShowBg,labelBgStyle:g.labelBgStyle,labelBgPadding:g.labelBgPadding,labelBgBorderRadius:g.labelBgBorderRadius,sourceX:$,sourceY:S,targetX:N,targetY:I,sourcePosition:R,targetPosition:B,data:g.data,style:g.style,sourceHandleId:g.sourceHandle,targetHandleId:g.targetHandle,markerStart:Z,markerEnd:A,pathOptions:"pathOptions"in g?g.pathOptions:void 0,interactionWidth:g.interactionWidth}),T&&m.jsx(pw,{edge:g,isReconnectable:T,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,sourceX:$,sourceY:S,targetX:N,targetY:I,sourcePosition:R,targetPosition:B,setUpdateHover:D,setReconnecting:E})]})})}var mw=V.memo(gw);const yw=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Bp({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:o,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:a,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:h,onReconnectEnd:y,disableKeyboardA11y:x}){const{edgesFocusable:_,edgesReconnectable:v,elementsSelectable:p,onError:g}=se(yw,ge),w=tw(t);return m.jsxs("div",{className:"react-flow__edges",children:[m.jsx(sw,{defaultColor:e,rfId:n}),w.map(k=>m.jsx(mw,{id:k,edgesFocusable:_,edgesReconnectable:v,elementsSelectable:p,noPanClassName:i,onReconnect:o,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,onClick:c,reconnectRadius:d,onDoubleClick:f,onReconnectStart:h,onReconnectEnd:y,rfId:n,onError:g,edgeTypes:r,disableKeyboardA11y:x},k))]})}Bp.displayName="EdgeRenderer";const vw=V.memo(Bp),ww=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function xw({children:e}){const t=se(ww);return m.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Cw(e){const t=fo(),n=V.useRef(!1);V.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const _w=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function Ew(e){const t=se(_w),n=ye();return V.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function kw(e){return e.connection.inProgress?{...e.connection,to:uo(e.connection.to,e.transform)}:{...e.connection}}function Sw(e){return kw}function Nw(e){const t=Sw();return se(t,ge)}const Mw=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Iw({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:o,height:s,isValid:l,inProgress:a}=se(Mw,ge);return!(o&&i&&a)?null:m.jsx("svg",{style:e,width:o,height:s,className:"react-flow__connectionline react-flow__container",children:m.jsx("g",{className:Se(["react-flow__connection",zh(l)]),children:m.jsx(Wp,{style:t,type:n,CustomComponent:r,isValid:l})})})}const Wp=({style:e,type:t=hn.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:o,fromNode:s,fromHandle:l,fromPosition:a,to:u,toNode:c,toHandle:d,toPosition:f,pointer:h}=Nw();if(!i)return;if(n)return m.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:o.x,fromY:o.y,toX:u.x,toY:u.y,fromPosition:a,toPosition:f,connectionStatus:zh(r),toNode:c,toHandle:d,pointer:h});let y="";const x={sourceX:o.x,sourceY:o.y,sourcePosition:a,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case hn.Bezier:[y]=qh(x);break;case hn.SimpleBezier:[y]=jp(x);break;case hn.Step:[y]=xu({...x,borderRadius:0});break;case hn.SmoothStep:[y]=xu(x);break;default:[y]=ep(x)}return m.jsx("path",{d:y,fill:"none",className:"react-flow__connection-path",style:e})};Wp.displayName="ConnectionLine";const Lw={};function Sf(e=Lw){V.useRef(e),ye(),V.useEffect(()=>{},[e])}function bw(){ye(),V.useRef(!1),V.useEffect(()=>{},[])}function Up({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:o,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:h,connectionLineType:y,connectionLineStyle:x,connectionLineComponent:_,connectionLineContainerStyle:v,selectionKeyCode:p,selectionOnDrag:g,selectionMode:w,multiSelectionKeyCode:k,panActivationKeyCode:C,zoomActivationKeyCode:L,deleteKeyCode:T,onlyRenderVisibleElements:F,elementsSelectable:P,defaultViewport:j,translateExtent:D,minZoom:z,maxZoom:E,preventScrolling:O,defaultMarkerColor:b,zoomOnScroll:$,zoomOnPinch:S,panOnScroll:N,panOnScrollSpeed:I,panOnScrollMode:R,zoomOnDoubleClick:B,panOnDrag:Z,onPaneClick:A,onPaneMouseEnter:M,onPaneMouseMove:H,onPaneMouseLeave:W,onPaneScroll:U,onPaneContextMenu:Y,paneClickDistance:X,nodeClickDistance:K,onEdgeContextMenu:G,onEdgeMouseEnter:q,onEdgeMouseMove:te,onEdgeMouseLeave:re,reconnectRadius:ie,onReconnect:fe,onReconnectStart:Be,onReconnectEnd:ot,noDragClassName:tn,noWheelClassName:Ln,noPanClassName:nn,disableKeyboardA11y:rn,nodeExtent:Vt,rfId:on,viewport:nr,onViewportChange:Qr}){return Sf(e),Sf(t),bw(),Cw(n),Ew(nr),m.jsx(Uv,{onPaneClick:A,onPaneMouseEnter:M,onPaneMouseMove:H,onPaneMouseLeave:W,onPaneContextMenu:Y,onPaneScroll:U,paneClickDistance:X,deleteKeyCode:T,selectionKeyCode:p,selectionOnDrag:g,selectionMode:w,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:k,panActivationKeyCode:C,zoomActivationKeyCode:L,elementsSelectable:P,zoomOnScroll:$,zoomOnPinch:S,zoomOnDoubleClick:B,panOnScroll:N,panOnScrollSpeed:I,panOnScrollMode:R,panOnDrag:Z,defaultViewport:j,translateExtent:D,minZoom:z,maxZoom:E,onSelectionContextMenu:d,preventScrolling:O,noDragClassName:tn,noWheelClassName:Ln,noPanClassName:nn,disableKeyboardA11y:rn,onViewportChange:Qr,isControlledViewport:!!nr,children:m.jsxs(xw,{children:[m.jsx(vw,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:s,onReconnect:fe,onReconnectStart:Be,onReconnectEnd:ot,onlyRenderVisibleElements:F,onEdgeContextMenu:G,onEdgeMouseEnter:q,onEdgeMouseMove:te,onEdgeMouseLeave:re,reconnectRadius:ie,defaultMarkerColor:b,noPanClassName:nn,disableKeyboardA11y:rn,rfId:on}),m.jsx(Iw,{style:x,type:y,component:_,containerStyle:v}),m.jsx("div",{className:"react-flow__edgelabel-renderer"}),m.jsx(ew,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:K,onlyRenderVisibleElements:F,noPanClassName:nn,noDragClassName:tn,disableKeyboardA11y:rn,nodeExtent:Vt,rfId:on}),m.jsx("div",{className:"react-flow__viewport-portal"})]})})}Up.displayName="GraphView";const jw=V.memo(Up),Nf=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,fitViewOptions:l,minZoom:a=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:d,zIndexMode:f="basic"}={})=>{const h=new Map,y=new Map,x=new Map,_=new Map,v=r??t??[],p=n??e??[],g=c??[0,0],w=d??Gi;rp(x,_,v);const{nodesInitialized:k}=_u(p,h,y,{nodeOrigin:g,nodeExtent:w,zIndexMode:f});let C=[0,0,1];if(s&&i&&o){const L=lo(h,{filter:j=>!!((j.width||j.initialWidth)&&(j.height||j.initialHeight))}),{x:T,y:F,zoom:P}=Ac(L,i,o,a,u,(l==null?void 0:l.padding)??.1);C=[T,F,P]}return{rfId:"1",width:i??0,height:o??0,transform:C,nodes:p,nodesInitialized:k,nodeLookup:h,parentLookup:y,edges:v,edgeLookup:_,connectionLookup:x,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:a,maxZoom:u,translateExtent:Gi,nodeExtent:w,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Vr.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:g,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...Vh},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:j7,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Dh,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Tw=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f})=>Xy((h,y)=>{async function x(){const{nodeLookup:_,panZoom:v,fitViewOptions:p,fitViewResolver:g,width:w,height:k,minZoom:C,maxZoom:L}=y();v&&(await L7({nodes:_,width:w,height:k,panZoom:v,minZoom:C,maxZoom:L},p),g==null||g.resolve(!0),h({fitViewResolver:null}))}return{...Nf({nodes:e,edges:t,width:i,height:o,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:c,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:_=>{const{nodeLookup:v,parentLookup:p,nodeOrigin:g,elevateNodesOnSelect:w,fitViewQueued:k,zIndexMode:C,nodesSelectionActive:L}=y(),{nodesInitialized:T,hasSelectedNodes:F}=_u(_,v,p,{nodeOrigin:g,nodeExtent:d,elevateNodesOnSelect:w,checkEquality:!0,zIndexMode:C}),P=L&&F;k&&T?(x(),h({nodes:_,nodesInitialized:T,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:P})):h({nodes:_,nodesInitialized:T,nodesSelectionActive:P})},setEdges:_=>{const{connectionLookup:v,edgeLookup:p}=y();rp(v,p,_),h({edges:_})},setDefaultNodesAndEdges:(_,v)=>{if(_){const{setNodes:p}=y();p(_),h({hasDefaultNodes:!0})}if(v){const{setEdges:p}=y();p(v),h({hasDefaultEdges:!0})}},updateNodeInternals:_=>{const{triggerNodeChanges:v,nodeLookup:p,parentLookup:g,domNode:w,nodeOrigin:k,nodeExtent:C,debug:L,fitViewQueued:T,zIndexMode:F}=y(),{changes:P,updatedInternals:j}=J7(_,p,g,w,k,C,F);j&&(X7(p,g,{nodeOrigin:k,nodeExtent:C,zIndexMode:F}),T?(x(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),(P==null?void 0:P.length)>0&&(L&&console.log("React Flow: trigger node changes",P),v==null||v(P)))},updateNodePositions:(_,v=!1)=>{const p=[];let g=[];const{nodeLookup:w,triggerNodeChanges:k,connection:C,updateConnection:L,onNodesChangeMiddlewareMap:T}=y();for(const[F,P]of _){const j=w.get(F),D=!!(j!=null&&j.expandParent&&(j!=null&&j.parentId)&&(P!=null&&P.position)),z={id:F,type:"position",position:D?{x:Math.max(0,P.position.x),y:Math.max(0,P.position.y)}:P.position,dragging:v};if(j&&C.inProgress&&C.fromNode.id===j.id){const E=qn(j,C.fromHandle,ne.Left,!0);L({...C,from:E})}D&&j.parentId&&p.push({id:F,parentId:j.parentId,rect:{...P.internals.positionAbsolute,width:P.measured.width??0,height:P.measured.height??0}}),g.push(z)}if(p.length>0){const{parentLookup:F,nodeOrigin:P}=y(),j=zc(p,w,F,P);g.push(...j)}for(const F of T.values())g=F(g);k(g)},triggerNodeChanges:_=>{const{onNodesChange:v,setNodes:p,nodes:g,hasDefaultNodes:w,debug:k}=y();if(_!=null&&_.length){if(w){const C=mv(_,g);p(C)}k&&console.log("React Flow: trigger node changes",_),v==null||v(_)}},triggerEdgeChanges:_=>{const{onEdgesChange:v,setEdges:p,edges:g,hasDefaultEdges:w,debug:k}=y();if(_!=null&&_.length){if(w){const C=yv(_,g);p(C)}k&&console.log("React Flow: trigger edge changes",_),v==null||v(_)}},addSelectedNodes:_=>{const{multiSelectionActive:v,edgeLookup:p,nodeLookup:g,triggerNodeChanges:w,triggerEdgeChanges:k}=y();if(v){const C=_.map(L=>Tn(L,!0));w(C);return}w(vr(g,new Set([..._]),!0)),k(vr(p))},addSelectedEdges:_=>{const{multiSelectionActive:v,edgeLookup:p,nodeLookup:g,triggerNodeChanges:w,triggerEdgeChanges:k}=y();if(v){const C=_.map(L=>Tn(L,!0));k(C);return}k(vr(p,new Set([..._]))),w(vr(g,new Set,!0))},unselectNodesAndEdges:({nodes:_,edges:v}={})=>{const{edges:p,nodes:g,nodeLookup:w,triggerNodeChanges:k,triggerEdgeChanges:C}=y(),L=_||g,T=v||p,F=[];for(const j of L){if(!j.selected)continue;const D=w.get(j.id);D&&(D.selected=!1),F.push(Tn(j.id,!1))}const P=[];for(const j of T)j.selected&&P.push(Tn(j.id,!1));k(F),C(P)},setMinZoom:_=>{const{panZoom:v,maxZoom:p}=y();v==null||v.setScaleExtent([_,p]),h({minZoom:_})},setMaxZoom:_=>{const{panZoom:v,minZoom:p}=y();v==null||v.setScaleExtent([p,_]),h({maxZoom:_})},setTranslateExtent:_=>{var v;(v=y().panZoom)==null||v.setTranslateExtent(_),h({translateExtent:_})},resetSelectedElements:()=>{const{edges:_,nodes:v,triggerNodeChanges:p,triggerEdgeChanges:g,elementsSelectable:w}=y();if(!w)return;const k=v.reduce((L,T)=>T.selected?[...L,Tn(T.id,!1)]:L,[]),C=_.reduce((L,T)=>T.selected?[...L,Tn(T.id,!1)]:L,[]);p(k),g(C)},setNodeExtent:_=>{const{nodes:v,nodeLookup:p,parentLookup:g,nodeOrigin:w,elevateNodesOnSelect:k,nodeExtent:C,zIndexMode:L}=y();_[0][0]===C[0][0]&&_[0][1]===C[0][1]&&_[1][0]===C[1][0]&&_[1][1]===C[1][1]||(_u(v,p,g,{nodeOrigin:w,nodeExtent:_,elevateNodesOnSelect:k,checkEquality:!1,zIndexMode:L}),h({nodeExtent:_}))},panBy:_=>{const{transform:v,width:p,height:g,panZoom:w,translateExtent:k}=y();return ey({delta:_,panZoom:w,transform:v,translateExtent:k,width:p,height:g})},setCenter:async(_,v,p)=>{const{width:g,height:w,maxZoom:k,panZoom:C}=y();if(!C)return Promise.resolve(!1);const L=typeof(p==null?void 0:p.zoom)<"u"?p.zoom:k;return await C.setViewport({x:g/2-_*L,y:w/2-v*L,zoom:L},{duration:p==null?void 0:p.duration,ease:p==null?void 0:p.ease,interpolate:p==null?void 0:p.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...Vh}})},updateConnection:_=>{h({connection:_})},reset:()=>h({...Nf()})}},Object.is);function Fc({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:o,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:a,fitView:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f,children:h}){const[y]=V.useState(()=>Tw({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:u,minZoom:s,maxZoom:l,fitViewOptions:a,nodeOrigin:c,nodeExtent:d,zIndexMode:f}));return m.jsx(Ky,{value:y,children:m.jsx(xv,{children:h})})}function Pw({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:o,height:s,fitView:l,fitViewOptions:a,minZoom:u,maxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h}){return V.useContext(Sl)?m.jsx(m.Fragment,{children:e}):m.jsx(Fc,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:o,initialHeight:s,fitView:l,initialFitViewOptions:a,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h,children:e})}const Aw={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Rw({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o,edgeTypes:s,onNodeClick:l,onEdgeClick:a,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:y,onConnectEnd:x,onClickConnectStart:_,onClickConnectEnd:v,onNodeMouseEnter:p,onNodeMouseMove:g,onNodeMouseLeave:w,onNodeContextMenu:k,onNodeDoubleClick:C,onNodeDragStart:L,onNodeDrag:T,onNodeDragStop:F,onNodesDelete:P,onEdgesDelete:j,onDelete:D,onSelectionChange:z,onSelectionDragStart:E,onSelectionDrag:O,onSelectionDragStop:b,onSelectionContextMenu:$,onSelectionStart:S,onSelectionEnd:N,onBeforeDelete:I,connectionMode:R,connectionLineType:B=hn.Bezier,connectionLineStyle:Z,connectionLineComponent:A,connectionLineContainerStyle:M,deleteKeyCode:H="Backspace",selectionKeyCode:W="Shift",selectionOnDrag:U=!1,selectionMode:Y=Xi.Full,panActivationKeyCode:X="Space",multiSelectionKeyCode:K=Qi()?"Meta":"Control",zoomActivationKeyCode:G=Qi()?"Meta":"Control",snapToGrid:q,snapGrid:te,onlyRenderVisibleElements:re=!1,selectNodesOnDrag:ie,nodesDraggable:fe,autoPanOnNodeFocus:Be,nodesConnectable:ot,nodesFocusable:tn,nodeOrigin:Ln=xp,edgesFocusable:nn,edgesReconnectable:rn,elementsSelectable:Vt=!0,defaultViewport:on=uv,minZoom:nr=.5,maxZoom:Qr=2,translateExtent:Qc=Gi,preventScrolling:L3=!0,nodeExtent:Il,defaultMarkerColor:b3="#b1b1b7",zoomOnScroll:j3=!0,zoomOnPinch:T3=!0,panOnScroll:P3=!1,panOnScrollSpeed:A3=.5,panOnScrollMode:R3=Hn.Free,zoomOnDoubleClick:$3=!0,panOnDrag:O3=!0,onPaneClick:D3,onPaneMouseEnter:V3,onPaneMouseMove:z3,onPaneMouseLeave:H3,onPaneScroll:F3,onPaneContextMenu:B3,paneClickDistance:W3=1,nodeClickDistance:U3=0,children:Z3,onReconnect:Y3,onReconnectStart:G3,onReconnectEnd:X3,onEdgeContextMenu:K3,onEdgeDoubleClick:Q3,onEdgeMouseEnter:q3,onEdgeMouseMove:J3,onEdgeMouseLeave:e8,reconnectRadius:t8=10,onNodesChange:n8,onEdgesChange:r8,noDragClassName:i8="nodrag",noWheelClassName:o8="nowheel",noPanClassName:qc="nopan",fitView:Jc,fitViewOptions:e1,connectOnClick:s8,attributionPosition:l8,proOptions:a8,defaultEdgeOptions:u8,elevateNodesOnSelect:c8=!0,elevateEdgesOnSelect:d8=!1,disableKeyboardA11y:t1=!1,autoPanOnConnect:f8,autoPanOnNodeDrag:h8,autoPanSpeed:p8,connectionRadius:g8,isValidConnection:m8,onError:y8,style:v8,id:n1,nodeDragThreshold:w8,connectionDragThreshold:x8,viewport:C8,onViewportChange:_8,width:E8,height:k8,colorMode:S8="light",debug:N8,onScroll:vo,ariaLabelConfig:M8,zIndexMode:r1="basic",...I8},L8){const Ll=n1||"1",b8=hv(S8),j8=V.useCallback(i1=>{i1.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),vo==null||vo(i1)},[vo]);return m.jsx("div",{"data-testid":"rf__wrapper",...I8,onScroll:j8,style:{...v8,...Aw},ref:L8,className:Se(["react-flow",i,b8]),id:n1,role:"application",children:m.jsxs(Pw,{nodes:e,edges:t,width:E8,height:k8,fitView:Jc,fitViewOptions:e1,minZoom:nr,maxZoom:Qr,nodeOrigin:Ln,nodeExtent:Il,zIndexMode:r1,children:[m.jsx(fv,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:y,onConnectEnd:x,onClickConnectStart:_,onClickConnectEnd:v,nodesDraggable:fe,autoPanOnNodeFocus:Be,nodesConnectable:ot,nodesFocusable:tn,edgesFocusable:nn,edgesReconnectable:rn,elementsSelectable:Vt,elevateNodesOnSelect:c8,elevateEdgesOnSelect:d8,minZoom:nr,maxZoom:Qr,nodeExtent:Il,onNodesChange:n8,onEdgesChange:r8,snapToGrid:q,snapGrid:te,connectionMode:R,translateExtent:Qc,connectOnClick:s8,defaultEdgeOptions:u8,fitView:Jc,fitViewOptions:e1,onNodesDelete:P,onEdgesDelete:j,onDelete:D,onNodeDragStart:L,onNodeDrag:T,onNodeDragStop:F,onSelectionDrag:O,onSelectionDragStart:E,onSelectionDragStop:b,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:qc,nodeOrigin:Ln,rfId:Ll,autoPanOnConnect:f8,autoPanOnNodeDrag:h8,autoPanSpeed:p8,onError:y8,connectionRadius:g8,isValidConnection:m8,selectNodesOnDrag:ie,nodeDragThreshold:w8,connectionDragThreshold:x8,onBeforeDelete:I,debug:N8,ariaLabelConfig:M8,zIndexMode:r1}),m.jsx(jw,{onInit:u,onNodeClick:l,onEdgeClick:a,onNodeMouseEnter:p,onNodeMouseMove:g,onNodeMouseLeave:w,onNodeContextMenu:k,onNodeDoubleClick:C,nodeTypes:o,edgeTypes:s,connectionLineType:B,connectionLineStyle:Z,connectionLineComponent:A,connectionLineContainerStyle:M,selectionKeyCode:W,selectionOnDrag:U,selectionMode:Y,deleteKeyCode:H,multiSelectionKeyCode:K,panActivationKeyCode:X,zoomActivationKeyCode:G,onlyRenderVisibleElements:re,defaultViewport:on,translateExtent:Qc,minZoom:nr,maxZoom:Qr,preventScrolling:L3,zoomOnScroll:j3,zoomOnPinch:T3,zoomOnDoubleClick:$3,panOnScroll:P3,panOnScrollSpeed:A3,panOnScrollMode:R3,panOnDrag:O3,onPaneClick:D3,onPaneMouseEnter:V3,onPaneMouseMove:z3,onPaneMouseLeave:H3,onPaneScroll:F3,onPaneContextMenu:B3,paneClickDistance:W3,nodeClickDistance:U3,onSelectionContextMenu:$,onSelectionStart:S,onSelectionEnd:N,onReconnect:Y3,onReconnectStart:G3,onReconnectEnd:X3,onEdgeContextMenu:K3,onEdgeDoubleClick:Q3,onEdgeMouseEnter:q3,onEdgeMouseMove:J3,onEdgeMouseLeave:e8,reconnectRadius:t8,defaultMarkerColor:b3,noDragClassName:i8,noWheelClassName:o8,noPanClassName:qc,rfId:Ll,disableKeyboardA11y:t1,nodeExtent:Il,viewport:C8,onViewportChange:_8}),m.jsx(av,{onSelectionChange:z}),Z3,m.jsx(rv,{proOptions:a8,position:l8}),m.jsx(nv,{rfId:Ll,disableKeyboardA11y:t1})]})})}var Zp=_p(Rw);const $w=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2]});function Ow(){return se($w,ge)}function Dw({dimensions:e,lineWidth:t,variant:n,className:r}){return m.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Se(["react-flow__background-pattern",n,r])})}function Vw({radius:e,className:t}){return m.jsx("circle",{cx:e,cy:e,r:e,className:Se(["react-flow__background-pattern","dots",t])})}var $t;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})($t||($t={}));const zw={[$t.Dots]:1,[$t.Lines]:1,[$t.Cross]:6},Hw=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Yp({id:e,variant:t=$t.Dots,gap:n=20,size:r,lineWidth:i=1,offset:o=0,color:s,bgColor:l,style:a,className:u,patternClassName:c}){const d=V.useRef(null),{transform:f,patternId:h}=se(Hw,ge),y=r||zw[t],x=t===$t.Dots,_=t===$t.Cross,v=Array.isArray(n)?n:[n,n],p=[v[0]*f[2]||1,v[1]*f[2]||1],g=y*f[2],w=Array.isArray(o)?o:[o,o],k=_?[g,g]:p,C=[w[0]*f[2]||1+k[0]/2,w[1]*f[2]||1+k[1]/2],L=`${h}${e||""}`;return m.jsxs("svg",{className:Se(["react-flow__background",u]),style:{...a,...Nl,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:d,"data-testid":"rf__background",children:[m.jsx("pattern",{id:L,x:f[0]%p[0],y:f[1]%p[1],width:p[0],height:p[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${C[0]},-${C[1]})`,children:x?m.jsx(Vw,{radius:g/2,className:c}):m.jsx(Dw,{dimensions:k,lineWidth:i,variant:t,className:c})}),m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${L})`})]})}Yp.displayName="Background";const Gp=V.memo(Yp);function Fw(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:m.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Bw(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:m.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Ww(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:m.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Uw(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Zw(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Ko({children:e,className:t,...n}){return m.jsx("button",{type:"button",className:Se(["react-flow__controls-button",t]),...n,children:e})}const Yw=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Xp({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:o,onZoomOut:s,onFitView:l,onInteractiveChange:a,className:u,children:c,position:d="bottom-left",orientation:f="vertical","aria-label":h}){const y=ye(),{isInteractive:x,minZoomReached:_,maxZoomReached:v,ariaLabelConfig:p}=se(Yw,ge),{zoomIn:g,zoomOut:w,fitView:k}=fo(),C=()=>{g(),o==null||o()},L=()=>{w(),s==null||s()},T=()=>{k(i),l==null||l()},F=()=>{y.setState({nodesDraggable:!x,nodesConnectable:!x,elementsSelectable:!x}),a==null||a(!x)},P=f==="horizontal"?"horizontal":"vertical";return m.jsxs(co,{className:Se(["react-flow__controls",P,u]),position:d,style:e,"data-testid":"rf__controls","aria-label":h??p["controls.ariaLabel"],children:[t&&m.jsxs(m.Fragment,{children:[m.jsx(Ko,{onClick:C,className:"react-flow__controls-zoomin",title:p["controls.zoomIn.ariaLabel"],"aria-label":p["controls.zoomIn.ariaLabel"],disabled:v,children:m.jsx(Fw,{})}),m.jsx(Ko,{onClick:L,className:"react-flow__controls-zoomout",title:p["controls.zoomOut.ariaLabel"],"aria-label":p["controls.zoomOut.ariaLabel"],disabled:_,children:m.jsx(Bw,{})})]}),n&&m.jsx(Ko,{className:"react-flow__controls-fitview",onClick:T,title:p["controls.fitView.ariaLabel"],"aria-label":p["controls.fitView.ariaLabel"],children:m.jsx(Ww,{})}),r&&m.jsx(Ko,{className:"react-flow__controls-interactive",onClick:F,title:p["controls.interactive.ariaLabel"],"aria-label":p["controls.interactive.ariaLabel"],children:x?m.jsx(Zw,{}):m.jsx(Uw,{})}),c]})}Xp.displayName="Controls";V.memo(Xp);function Gw({id:e,x:t,y:n,width:r,height:i,style:o,color:s,strokeColor:l,strokeWidth:a,className:u,borderRadius:c,shapeRendering:d,selected:f,onClick:h}){const{background:y,backgroundColor:x}=o||{},_=s||y||x;return m.jsx("rect",{className:Se(["react-flow__minimap-node",{selected:f},u]),x:t,y:n,rx:c,ry:c,width:r,height:i,style:{fill:_,stroke:l,strokeWidth:a},shapeRendering:d,onClick:h?v=>h(v,e):void 0})}const Xw=V.memo(Gw),Kw=e=>e.nodes.map(t=>t.id),ha=e=>e instanceof Function?e:()=>e;function Qw({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:o=Xw,onClick:s}){const l=se(Kw,ge),a=ha(t),u=ha(e),c=ha(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return m.jsx(m.Fragment,{children:l.map(f=>m.jsx(Jw,{id:f,nodeColorFunc:a,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:o,onClick:s,shapeRendering:d},f))})}function qw({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:o,shapeRendering:s,NodeComponent:l,onClick:a}){const{node:u,x:c,y:d,width:f,height:h}=se(y=>{const x=y.nodeLookup.get(e);if(!x)return{node:void 0,x:0,y:0,width:0,height:0};const _=x.internals.userNode,{x:v,y:p}=x.internals.positionAbsolute,{width:g,height:w}=en(_);return{node:_,x:v,y:p,width:g,height:w}},ge);return!u||u.hidden||!Zh(u)?null:m.jsx(l,{x:c,y:d,width:f,height:h,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:o,shapeRendering:s,onClick:a,id:u.id})}const Jw=V.memo(qw);var ex=V.memo(Qw);const tx=200,nx=150,rx=e=>!e.hidden,ix=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Uh(lo(e.nodeLookup,{filter:rx}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},ox="react-flow__minimap-desc";function Kp({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:o=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:a,maskColor:u,maskStrokeColor:c,maskStrokeWidth:d,position:f="bottom-right",onClick:h,onNodeClick:y,pannable:x=!1,zoomable:_=!1,ariaLabel:v,inversePan:p,zoomStep:g=1,offsetScale:w=5}){const k=ye(),C=V.useRef(null),{boundingRect:L,viewBB:T,rfId:F,panZoom:P,translateExtent:j,flowWidth:D,flowHeight:z,ariaLabelConfig:E}=se(ix,ge),O=(e==null?void 0:e.width)??tx,b=(e==null?void 0:e.height)??nx,$=L.width/O,S=L.height/b,N=Math.max($,S),I=N*O,R=N*b,B=w*N,Z=L.x-(I-L.width)/2-B,A=L.y-(R-L.height)/2-B,M=I+B*2,H=R+B*2,W=`${ox}-${F}`,U=V.useRef(0),Y=V.useRef();U.current=N,V.useEffect(()=>{if(C.current&&P)return Y.current=uy({domNode:C.current,panZoom:P,getTransform:()=>k.getState().transform,getViewScale:()=>U.current}),()=>{var q;(q=Y.current)==null||q.destroy()}},[P]),V.useEffect(()=>{var q;(q=Y.current)==null||q.update({translateExtent:j,width:D,height:z,inversePan:p,pannable:x,zoomStep:g,zoomable:_})},[x,_,p,g,j,D,z]);const X=h?q=>{var ie;const[te,re]=((ie=Y.current)==null?void 0:ie.pointer(q))||[0,0];h(q,{x:te,y:re})}:void 0,K=y?V.useCallback((q,te)=>{const re=k.getState().nodeLookup.get(te).internals.userNode;y(q,re)},[]):void 0,G=v??E["minimap.ariaLabel"];return m.jsx(co,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*N:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Se(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:m.jsxs("svg",{width:O,height:b,viewBox:`${Z} ${A} ${M} ${H}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":W,ref:C,onClick:X,children:[G&&m.jsx("title",{id:W,children:G}),m.jsx(ex,{onClick:K,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:i,nodeStrokeWidth:s,nodeComponent:l}),m.jsx("path",{className:"react-flow__minimap-mask",d:`M${Z-B},${A-B}h${M+B*2}v${H+B*2}h${-M-B*2}z
|
|
71
|
-
M${T.x},${T.y}h${T.width}v${T.height}h${-T.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Kp.displayName="MiniMap";V.memo(Kp);const sx=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,lx={[Br.Line]:"right",[Br.Handle]:"bottom-right"};function ax({nodeId:e,position:t,variant:n=Br.Handle,className:r,style:i=void 0,children:o,color:s,minWidth:l=10,minHeight:a=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:h=!0,shouldResize:y,onResizeStart:x,onResize:_,onResizeEnd:v}){const p=Np(),g=typeof e=="string"?e:p,w=ye(),k=V.useRef(null),C=n===Br.Handle,L=se(V.useCallback(sx(C&&h),[C,h]),ge),T=V.useRef(null),F=t??lx[n];V.useEffect(()=>{if(!(!k.current||!g))return T.current||(T.current=Ey({domNode:k.current,nodeId:g,getStoreItems:()=>{const{nodeLookup:j,transform:D,snapGrid:z,snapToGrid:E,nodeOrigin:O,domNode:b}=w.getState();return{nodeLookup:j,transform:D,snapGrid:z,snapToGrid:E,nodeOrigin:O,paneDomNode:b}},onChange:(j,D)=>{const{triggerNodeChanges:z,nodeLookup:E,parentLookup:O,nodeOrigin:b}=w.getState(),$=[],S={x:j.x,y:j.y},N=E.get(g);if(N&&N.expandParent&&N.parentId){const I=N.origin??b,R=j.width??N.measured.width??0,B=j.height??N.measured.height??0,Z={id:N.id,parentId:N.parentId,rect:{width:R,height:B,...Yh({x:j.x??N.position.x,y:j.y??N.position.y},{width:R,height:B},N.parentId,E,I)}},A=zc([Z],E,O,b);$.push(...A),S.x=j.x?Math.max(I[0]*R,j.x):void 0,S.y=j.y?Math.max(I[1]*B,j.y):void 0}if(S.x!==void 0&&S.y!==void 0){const I={id:g,type:"position",position:{...S}};$.push(I)}if(j.width!==void 0&&j.height!==void 0){const R={id:g,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:j.width,height:j.height}};$.push(R)}for(const I of D){const R={...I,type:"position"};$.push(R)}z($)},onEnd:({width:j,height:D})=>{const z={id:g,type:"dimensions",resizing:!1,dimensions:{width:j,height:D}};w.getState().triggerNodeChanges([z])}})),T.current.update({controlPosition:F,boundaries:{minWidth:l,minHeight:a,maxWidth:u,maxHeight:c},keepAspectRatio:d,resizeDirection:f,onResizeStart:x,onResize:_,onResizeEnd:v,shouldResize:y}),()=>{var j;(j=T.current)==null||j.destroy()}},[F,l,a,u,c,d,x,_,v,y]);const P=F.split("-");return m.jsx("div",{className:Se(["react-flow__resize-control","nodrag",...P,n,r]),ref:k,style:{...i,scale:L,...s&&{[C?"backgroundColor":"borderColor"]:s}},children:o})}V.memo(ax);const Qp=({legend:e})=>{const{zoomIn:t,zoomOut:n}=fo(),{zoom:r}=Ow(),[i,o]=V.useState(!1),s=V.useRef(null);V.useEffect(()=>{if(!i)return;const a=c=>{s.current&&!s.current.contains(c.target)&&o(!1)},u=c=>{c.key==="Escape"&&o(!1)};return document.addEventListener("mousedown",a),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",u)}},[i]);const l=`${Math.round(r*100)}%`;return J.createElement(co,{position:"bottom-right",style:{margin:"var(--mv-spacing-md)",marginBottom:"60px"}},J.createElement("div",{className:"mv-zoom-bar",ref:s},e&&J.createElement(J.Fragment,null,J.createElement("button",{className:`mv-zoom-bar__btn ${i?"mv-zoom-bar__btn--active":""}`,onClick:()=>o(!i),"aria-label":"Legend","aria-haspopup":"true","aria-expanded":i},J.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},J.createElement("line",{x1:"6",y1:"3.5",x2:"14",y2:"3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),J.createElement("line",{x1:"6",y1:"8",x2:"14",y2:"8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),J.createElement("line",{x1:"6",y1:"12.5",x2:"14",y2:"12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),J.createElement("circle",{cx:"3",cy:"3.5",r:"1.5",fill:"currentColor"}),J.createElement("circle",{cx:"3",cy:"8",r:"1.5",fill:"currentColor"}),J.createElement("circle",{cx:"3",cy:"12.5",r:"1.5",fill:"currentColor"}))),J.createElement("span",{className:"mv-zoom-bar__divider"})),J.createElement("button",{className:"mv-zoom-bar__btn",onClick:()=>n(),"aria-label":"Zoom out"},J.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},J.createElement("circle",{cx:"7",cy:"7",r:"5.5",stroke:"currentColor",strokeWidth:"1.5"}),J.createElement("line",{x1:"11",y1:"11",x2:"14",y2:"14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),J.createElement("line",{x1:"4.5",y1:"7",x2:"9.5",y2:"7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))),J.createElement("span",{className:"mv-zoom-bar__level"},l),J.createElement("button",{className:"mv-zoom-bar__btn",onClick:()=>t(),"aria-label":"Zoom in"},J.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},J.createElement("circle",{cx:"7",cy:"7",r:"5.5",stroke:"currentColor",strokeWidth:"1.5"}),J.createElement("line",{x1:"11",y1:"11",x2:"14",y2:"14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),J.createElement("line",{x1:"4.5",y1:"7",x2:"9.5",y2:"7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),J.createElement("line",{x1:"7",y1:"4.5",x2:"7",y2:"9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))),e&&i&&e))},qp=({items:e,header:t="LEGEND"})=>J.createElement("div",{className:"mv-legend-panel"},J.createElement("div",{className:"mv-legend-panel__header"},t),J.createElement("div",{className:"mv-legend-panel__body"},e.map(n=>J.createElement("div",{key:n.key,className:"mv-legend-panel__item"},J.createElement("span",{className:"mv-legend-panel__icon"},n.icon),n.label))));var ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mt=ce((e,t)=>{var n=Object.defineProperty,r=(z,E,O)=>E in z?n(z,E,{enumerable:!0,configurable:!0,writable:!0,value:O}):z[E]=O,i=(z,E)=>()=>(E||z((E={exports:{}}).exports,E),E.exports),o=(z,E,O)=>r(z,typeof E!="symbol"?E+"":E,O),s=i((z,E)=>{var O="\0",b="\0",$="",S=class{constructor(A){o(this,"_isDirected",!0),o(this,"_isMultigraph",!1),o(this,"_isCompound",!1),o(this,"_label"),o(this,"_defaultNodeLabelFn",()=>{}),o(this,"_defaultEdgeLabelFn",()=>{}),o(this,"_nodes",{}),o(this,"_in",{}),o(this,"_preds",{}),o(this,"_out",{}),o(this,"_sucs",{}),o(this,"_edgeObjs",{}),o(this,"_edgeLabels",{}),o(this,"_nodeCount",0),o(this,"_edgeCount",0),o(this,"_parent"),o(this,"_children"),A&&(this._isDirected=Object.hasOwn(A,"directed")?A.directed:!0,this._isMultigraph=Object.hasOwn(A,"multigraph")?A.multigraph:!1,this._isCompound=Object.hasOwn(A,"compound")?A.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[b]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(A){return this._label=A,this}graph(){return this._label}setDefaultNodeLabel(A){return this._defaultNodeLabelFn=A,typeof A!="function"&&(this._defaultNodeLabelFn=()=>A),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var A=this;return this.nodes().filter(M=>Object.keys(A._in[M]).length===0)}sinks(){var A=this;return this.nodes().filter(M=>Object.keys(A._out[M]).length===0)}setNodes(A,M){var H=arguments,W=this;return A.forEach(function(U){H.length>1?W.setNode(U,M):W.setNode(U)}),this}setNode(A,M){return Object.hasOwn(this._nodes,A)?(arguments.length>1&&(this._nodes[A]=M),this):(this._nodes[A]=arguments.length>1?M:this._defaultNodeLabelFn(A),this._isCompound&&(this._parent[A]=b,this._children[A]={},this._children[b][A]=!0),this._in[A]={},this._preds[A]={},this._out[A]={},this._sucs[A]={},++this._nodeCount,this)}node(A){return this._nodes[A]}hasNode(A){return Object.hasOwn(this._nodes,A)}removeNode(A){var M=this;if(Object.hasOwn(this._nodes,A)){var H=W=>M.removeEdge(M._edgeObjs[W]);delete this._nodes[A],this._isCompound&&(this._removeFromParentsChildList(A),delete this._parent[A],this.children(A).forEach(function(W){M.setParent(W)}),delete this._children[A]),Object.keys(this._in[A]).forEach(H),delete this._in[A],delete this._preds[A],Object.keys(this._out[A]).forEach(H),delete this._out[A],delete this._sucs[A],--this._nodeCount}return this}setParent(A,M){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(M===void 0)M=b;else{M+="";for(var H=M;H!==void 0;H=this.parent(H))if(H===A)throw new Error("Setting "+M+" as parent of "+A+" would create a cycle");this.setNode(M)}return this.setNode(A),this._removeFromParentsChildList(A),this._parent[A]=M,this._children[M][A]=!0,this}_removeFromParentsChildList(A){delete this._children[this._parent[A]][A]}parent(A){if(this._isCompound){var M=this._parent[A];if(M!==b)return M}}children(A=b){if(this._isCompound){var M=this._children[A];if(M)return Object.keys(M)}else{if(A===b)return this.nodes();if(this.hasNode(A))return[]}}predecessors(A){var M=this._preds[A];if(M)return Object.keys(M)}successors(A){var M=this._sucs[A];if(M)return Object.keys(M)}neighbors(A){var M=this.predecessors(A);if(M){let W=new Set(M);for(var H of this.successors(A))W.add(H);return Array.from(W.values())}}isLeaf(A){var M;return this.isDirected()?M=this.successors(A):M=this.neighbors(A),M.length===0}filterNodes(A){var M=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});M.setGraph(this.graph());var H=this;Object.entries(this._nodes).forEach(function([Y,X]){A(Y)&&M.setNode(Y,X)}),Object.values(this._edgeObjs).forEach(function(Y){M.hasNode(Y.v)&&M.hasNode(Y.w)&&M.setEdge(Y,H.edge(Y))});var W={};function U(Y){var X=H.parent(Y);return X===void 0||M.hasNode(X)?(W[Y]=X,X):X in W?W[X]:U(X)}return this._isCompound&&M.nodes().forEach(Y=>M.setParent(Y,U(Y))),M}setDefaultEdgeLabel(A){return this._defaultEdgeLabelFn=A,typeof A!="function"&&(this._defaultEdgeLabelFn=()=>A),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(A,M){var H=this,W=arguments;return A.reduce(function(U,Y){return W.length>1?H.setEdge(U,Y,M):H.setEdge(U,Y),Y}),this}setEdge(){var A,M,H,W,U=!1,Y=arguments[0];typeof Y=="object"&&Y!==null&&"v"in Y?(A=Y.v,M=Y.w,H=Y.name,arguments.length===2&&(W=arguments[1],U=!0)):(A=Y,M=arguments[1],H=arguments[3],arguments.length>2&&(W=arguments[2],U=!0)),A=""+A,M=""+M,H!==void 0&&(H=""+H);var X=R(this._isDirected,A,M,H);if(Object.hasOwn(this._edgeLabels,X))return U&&(this._edgeLabels[X]=W),this;if(H!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(A),this.setNode(M),this._edgeLabels[X]=U?W:this._defaultEdgeLabelFn(A,M,H);var K=B(this._isDirected,A,M,H);return A=K.v,M=K.w,Object.freeze(K),this._edgeObjs[X]=K,N(this._preds[M],A),N(this._sucs[A],M),this._in[M][X]=K,this._out[A][X]=K,this._edgeCount++,this}edge(A,M,H){var W=arguments.length===1?Z(this._isDirected,arguments[0]):R(this._isDirected,A,M,H);return this._edgeLabels[W]}edgeAsObj(){let A=this.edge(...arguments);return typeof A!="object"?{label:A}:A}hasEdge(A,M,H){var W=arguments.length===1?Z(this._isDirected,arguments[0]):R(this._isDirected,A,M,H);return Object.hasOwn(this._edgeLabels,W)}removeEdge(A,M,H){var W=arguments.length===1?Z(this._isDirected,arguments[0]):R(this._isDirected,A,M,H),U=this._edgeObjs[W];return U&&(A=U.v,M=U.w,delete this._edgeLabels[W],delete this._edgeObjs[W],I(this._preds[M],A),I(this._sucs[A],M),delete this._in[M][W],delete this._out[A][W],this._edgeCount--),this}inEdges(A,M){return this.isDirected()?this.filterEdges(this._in[A],A,M):this.nodeEdges(A,M)}outEdges(A,M){return this.isDirected()?this.filterEdges(this._out[A],A,M):this.nodeEdges(A,M)}nodeEdges(A,M){if(A in this._nodes)return this.filterEdges({...this._in[A],...this._out[A]},A,M)}filterEdges(A,M,H){if(A){var W=Object.values(A);return H?W.filter(function(U){return U.v===M&&U.w===H||U.v===H&&U.w===M}):W}}};function N(A,M){A[M]?A[M]++:A[M]=1}function I(A,M){--A[M]||delete A[M]}function R(A,M,H,W){var U=""+M,Y=""+H;if(!A&&U>Y){var X=U;U=Y,Y=X}return U+$+Y+$+(W===void 0?O:W)}function B(A,M,H,W){var U=""+M,Y=""+H;if(!A&&U>Y){var X=U;U=Y,Y=X}var K={v:U,w:Y};return W&&(K.name=W),K}function Z(A,M){return R(A,M.v,M.w,M.name)}E.exports=S}),l=i((z,E)=>{E.exports="3.0.2"}),a=i((z,E)=>{E.exports={Graph:s(),version:l()}}),u=i((z,E)=>{var O=s();E.exports={write:b,read:N};function b(I){var R={options:{directed:I.isDirected(),multigraph:I.isMultigraph(),compound:I.isCompound()},nodes:$(I),edges:S(I)};return I.graph()!==void 0&&(R.value=structuredClone(I.graph())),R}function $(I){return I.nodes().map(function(R){var B=I.node(R),Z=I.parent(R),A={v:R};return B!==void 0&&(A.value=B),Z!==void 0&&(A.parent=Z),A})}function S(I){return I.edges().map(function(R){var B=I.edge(R),Z={v:R.v,w:R.w};return R.name!==void 0&&(Z.name=R.name),B!==void 0&&(Z.value=B),Z})}function N(I){var R=new O(I.options).setGraph(I.value);return I.nodes.forEach(function(B){R.setNode(B.v,B.value),B.parent&&R.setParent(B.v,B.parent)}),I.edges.forEach(function(B){R.setEdge({v:B.v,w:B.w,name:B.name},B.value)}),R}}),c=i((z,E)=>{E.exports=b;var O=()=>1;function b(S,N,I,R){return $(S,String(N),I||O,R||function(B){return S.outEdges(B)})}function $(S,N,I,R){var B={},Z=!0,A=0,M=S.nodes(),H=function(X){var K=I(X);B[X.v].distance+K<B[X.w].distance&&(B[X.w]={distance:B[X.v].distance+K,predecessor:X.v},Z=!0)},W=function(){M.forEach(function(X){R(X).forEach(function(K){var G=K.v===X?K.v:K.w,q=G===K.v?K.w:K.v;H({v:G,w:q})})})};M.forEach(function(X){var K=X===N?0:Number.POSITIVE_INFINITY;B[X]={distance:K}});for(var U=M.length,Y=1;Y<U&&(Z=!1,A++,W(),!!Z);Y++);if(A===U-1&&(Z=!1,W(),Z))throw new Error("The graph contains a negative weight cycle");return B}}),d=i((z,E)=>{E.exports=O;function O(b){var $={},S=[],N;function I(R){Object.hasOwn($,R)||($[R]=!0,N.push(R),b.successors(R).forEach(I),b.predecessors(R).forEach(I))}return b.nodes().forEach(function(R){N=[],I(R),N.length&&S.push(N)}),S}}),f=i((z,E)=>{var O=class{constructor(){o(this,"_arr",[]),o(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(b){return b.key})}has(b){return Object.hasOwn(this._keyIndices,b)}priority(b){var $=this._keyIndices[b];if($!==void 0)return this._arr[$].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(b,$){var S=this._keyIndices;if(b=String(b),!Object.hasOwn(S,b)){var N=this._arr,I=N.length;return S[b]=I,N.push({key:b,priority:$}),this._decrease(I),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var b=this._arr.pop();return delete this._keyIndices[b.key],this._heapify(0),b.key}decrease(b,$){var S=this._keyIndices[b];if($>this._arr[S].priority)throw new Error("New priority is greater than current priority. Key: "+b+" Old: "+this._arr[S].priority+" New: "+$);this._arr[S].priority=$,this._decrease(S)}_heapify(b){var $=this._arr,S=2*b,N=S+1,I=b;S<$.length&&(I=$[S].priority<$[I].priority?S:I,N<$.length&&(I=$[N].priority<$[I].priority?N:I),I!==b&&(this._swap(b,I),this._heapify(I)))}_decrease(b){for(var $=this._arr,S=$[b].priority,N;b!==0&&(N=b>>1,!($[N].priority<S));)this._swap(b,N),b=N}_swap(b,$){var S=this._arr,N=this._keyIndices,I=S[b],R=S[$];S[b]=R,S[$]=I,N[R.key]=b,N[I.key]=$}};E.exports=O}),h=i((z,E)=>{var O=f();E.exports=$;var b=()=>1;function $(N,I,R,B){var Z=function(A){return N.outEdges(A)};return S(N,String(I),R||b,B||Z)}function S(N,I,R,B){var Z={},A=new O,M,H,W=function(U){var Y=U.v!==M?U.v:U.w,X=Z[Y],K=R(U),G=H.distance+K;if(K<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+U+" Weight: "+K);G<X.distance&&(X.distance=G,X.predecessor=M,A.decrease(Y,G))};for(N.nodes().forEach(function(U){var Y=U===I?0:Number.POSITIVE_INFINITY;Z[U]={distance:Y},A.add(U,Y)});A.size()>0&&(M=A.removeMin(),H=Z[M],H.distance!==Number.POSITIVE_INFINITY);)B(M).forEach(W);return Z}}),y=i((z,E)=>{var O=h();E.exports=b;function b($,S,N){return $.nodes().reduce(function(I,R){return I[R]=O($,R,S,N),I},{})}}),x=i((z,E)=>{E.exports=O;function O($,S,N){if($[S].predecessor!==void 0)throw new Error("Invalid source vertex");if($[N].predecessor===void 0&&N!==S)throw new Error("Invalid destination vertex");return{weight:$[N].distance,path:b($,S,N)}}function b($,S,N){for(var I=[],R=N;R!==S;)I.push(R),R=$[R].predecessor;return I.push(S),I.reverse()}}),_=i((z,E)=>{E.exports=O;function O(b){var $=0,S=[],N={},I=[];function R(B){var Z=N[B]={onStack:!0,lowlink:$,index:$++};if(S.push(B),b.successors(B).forEach(function(H){Object.hasOwn(N,H)?N[H].onStack&&(Z.lowlink=Math.min(Z.lowlink,N[H].index)):(R(H),Z.lowlink=Math.min(Z.lowlink,N[H].lowlink))}),Z.lowlink===Z.index){var A=[],M;do M=S.pop(),N[M].onStack=!1,A.push(M);while(B!==M);I.push(A)}}return b.nodes().forEach(function(B){Object.hasOwn(N,B)||R(B)}),I}}),v=i((z,E)=>{var O=_();E.exports=b;function b($){return O($).filter(function(S){return S.length>1||S.length===1&&$.hasEdge(S[0],S[0])})}}),p=i((z,E)=>{E.exports=b;var O=()=>1;function b(S,N,I){return $(S,N||O,I||function(R){return S.outEdges(R)})}function $(S,N,I){var R={},B=S.nodes();return B.forEach(function(Z){R[Z]={},R[Z][Z]={distance:0},B.forEach(function(A){Z!==A&&(R[Z][A]={distance:Number.POSITIVE_INFINITY})}),I(Z).forEach(function(A){var M=A.v===Z?A.w:A.v,H=N(A);R[Z][M]={distance:H,predecessor:Z}})}),B.forEach(function(Z){var A=R[Z];B.forEach(function(M){var H=R[M];B.forEach(function(W){var U=H[Z],Y=A[W],X=H[W],K=U.distance+Y.distance;K<X.distance&&(X.distance=K,X.predecessor=Y.predecessor)})})}),R}}),g=i((z,E)=>{function O($){var S={},N={},I=[];function R(B){if(Object.hasOwn(N,B))throw new b;Object.hasOwn(S,B)||(N[B]=!0,S[B]=!0,$.predecessors(B).forEach(R),delete N[B],I.push(B))}if($.sinks().forEach(R),Object.keys(S).length!==$.nodeCount())throw new b;return I}var b=class extends Error{constructor(){super(...arguments)}};E.exports=O,O.CycleException=b}),w=i((z,E)=>{var O=g();E.exports=b;function b($){try{O($)}catch(S){if(S instanceof O.CycleException)return!1;throw S}return!0}}),k=i((z,E)=>{E.exports=O;function O($,S,N,I,R){Array.isArray(S)||(S=[S]);var B=($.isDirected()?$.successors:$.neighbors).bind($),Z={};return S.forEach(function(A){if(!$.hasNode(A))throw new Error("Graph does not have node: "+A);R=b($,A,N==="post",Z,B,I,R)}),R}function b($,S,N,I,R,B,Z){return Object.hasOwn(I,S)||(I[S]=!0,N||(Z=B(Z,S)),R(S).forEach(function(A){Z=b($,A,N,I,R,B,Z)}),N&&(Z=B(Z,S))),Z}}),C=i((z,E)=>{var O=k();E.exports=b;function b($,S,N){return O($,S,N,function(I,R){return I.push(R),I},[])}}),L=i((z,E)=>{var O=C();E.exports=b;function b($,S){return O($,S,"post")}}),T=i((z,E)=>{var O=C();E.exports=b;function b($,S){return O($,S,"pre")}}),F=i((z,E)=>{var O=s(),b=f();E.exports=$;function $(S,N){var I=new O,R={},B=new b,Z;function A(H){var W=H.v===Z?H.w:H.v,U=B.priority(W);if(U!==void 0){var Y=N(H);Y<U&&(R[W]=Z,B.decrease(W,Y))}}if(S.nodeCount()===0)return I;S.nodes().forEach(function(H){B.add(H,Number.POSITIVE_INFINITY),I.setNode(H)}),B.decrease(S.nodes()[0],0);for(var M=!1;B.size()>0;){if(Z=B.removeMin(),Object.hasOwn(R,Z))I.setEdge(Z,R[Z]);else{if(M)throw new Error("Input graph is not connected: "+S);M=!0}S.nodeEdges(Z).forEach(A)}return I}}),P=i((z,E)=>{var O=h(),b=c();E.exports=$;function $(N,I,R,B){return S(N,I,R,B||function(Z){return N.outEdges(Z)})}function S(N,I,R,B){if(R===void 0)return O(N,I,R,B);for(var Z=!1,A=N.nodes(),M=0;M<A.length;M++){for(var H=B(A[M]),W=0;W<H.length;W++){var U=H[W],Y=U.v===A[M]?U.v:U.w,X=Y===U.v?U.w:U.v;R({v:Y,w:X})<0&&(Z=!0)}if(Z)return b(N,I,R,B)}return O(N,I,R,B)}}),j=i((z,E)=>{E.exports={bellmanFord:c(),components:d(),dijkstra:h(),dijkstraAll:y(),extractPath:x(),findCycles:v(),floydWarshall:p(),isAcyclic:w(),postorder:L(),preorder:T(),prim:F(),shortestPaths:P(),reduce:k(),tarjan:_(),topsort:g()}}),D=a();t.exports={Graph:D.Graph,json:u(),alg:j(),version:D.version}}),ux=ce((e,t)=>{var n=class{constructor(){let o={};o._next=o._prev=o,this._sentinel=o}dequeue(){let o=this._sentinel,s=o._prev;if(s!==o)return r(s),s}enqueue(o){let s=this._sentinel;o._prev&&o._next&&r(o),o._next=s._next,s._next._prev=o,s._next=o,o._prev=s}toString(){let o=[],s=this._sentinel,l=s._prev;for(;l!==s;)o.push(JSON.stringify(l,i)),l=l._prev;return"["+o.join(", ")+"]"}};function r(o){o._prev._next=o._next,o._next._prev=o._prev,delete o._next,delete o._prev}function i(o,s){if(o!=="_next"&&o!=="_prev")return s}t.exports=n}),cx=ce((e,t)=>{var n=Mt().Graph,r=ux();t.exports=o;var i=()=>1;function o(d,f){if(d.nodeCount()<=1)return[];let h=a(d,f||i);return s(h.graph,h.buckets,h.zeroIdx).flatMap(y=>d.outEdges(y.v,y.w))}function s(d,f,h){let y=[],x=f[f.length-1],_=f[0],v;for(;d.nodeCount();){for(;v=_.dequeue();)l(d,f,h,v);for(;v=x.dequeue();)l(d,f,h,v);if(d.nodeCount()){for(let p=f.length-2;p>0;--p)if(v=f[p].dequeue(),v){y=y.concat(l(d,f,h,v,!0));break}}}return y}function l(d,f,h,y,x){let _=x?[]:void 0;return d.inEdges(y.v).forEach(v=>{let p=d.edge(v),g=d.node(v.v);x&&_.push({v:v.v,w:v.w}),g.out-=p,u(f,h,g)}),d.outEdges(y.v).forEach(v=>{let p=d.edge(v),g=v.w,w=d.node(g);w.in-=p,u(f,h,w)}),d.removeNode(y.v),_}function a(d,f){let h=new n,y=0,x=0;d.nodes().forEach(p=>{h.setNode(p,{v:p,in:0,out:0})}),d.edges().forEach(p=>{let g=h.edge(p.v,p.w)||0,w=f(p),k=g+w;h.setEdge(p.v,p.w,k),x=Math.max(x,h.node(p.v).out+=w),y=Math.max(y,h.node(p.w).in+=w)});let _=c(x+y+3).map(()=>new r),v=y+1;return h.nodes().forEach(p=>{u(_,v,h.node(p))}),{graph:h,buckets:_,zeroIdx:v}}function u(d,f,h){h.out?h.in?d[h.out-h.in+f].enqueue(h):d[d.length-1].enqueue(h):d[0].enqueue(h)}function c(d){let f=[];for(let h=0;h<d;h++)f.push(h);return f}}),ke=ce((e,t)=>{var n=Mt().Graph;t.exports={addBorderNode:f,addDummyNode:r,applyWithChunking:x,asNonCompoundGraph:o,buildLayerMatrix:u,intersectRect:a,mapValues:T,maxRank:_,normalizeRanks:c,notime:g,partition:v,pick:L,predecessorWeights:l,range:C,removeEmptyRanks:d,simplify:i,successorWeights:s,time:p,uniqueId:k,zipObject:F};function r(P,j,D,z){for(var E=z;P.hasNode(E);)E=k(z);return D.dummy=j,P.setNode(E,D),E}function i(P){let j=new n().setGraph(P.graph());return P.nodes().forEach(D=>j.setNode(D,P.node(D))),P.edges().forEach(D=>{let z=j.edge(D.v,D.w)||{weight:0,minlen:1},E=P.edge(D);j.setEdge(D.v,D.w,{weight:z.weight+E.weight,minlen:Math.max(z.minlen,E.minlen)})}),j}function o(P){let j=new n({multigraph:P.isMultigraph()}).setGraph(P.graph());return P.nodes().forEach(D=>{P.children(D).length||j.setNode(D,P.node(D))}),P.edges().forEach(D=>{j.setEdge(D,P.edge(D))}),j}function s(P){let j=P.nodes().map(D=>{let z={};return P.outEdges(D).forEach(E=>{z[E.w]=(z[E.w]||0)+P.edge(E).weight}),z});return F(P.nodes(),j)}function l(P){let j=P.nodes().map(D=>{let z={};return P.inEdges(D).forEach(E=>{z[E.v]=(z[E.v]||0)+P.edge(E).weight}),z});return F(P.nodes(),j)}function a(P,j){let D=P.x,z=P.y,E=j.x-D,O=j.y-z,b=P.width/2,$=P.height/2;if(!E&&!O)throw new Error("Not possible to find intersection inside of the rectangle");let S,N;return Math.abs(O)*b>Math.abs(E)*$?(O<0&&($=-$),S=$*E/O,N=$):(E<0&&(b=-b),S=b,N=b*O/E),{x:D+S,y:z+N}}function u(P){let j=C(_(P)+1).map(()=>[]);return P.nodes().forEach(D=>{let z=P.node(D),E=z.rank;E!==void 0&&(j[E][z.order]=D)}),j}function c(P){let j=P.nodes().map(z=>{let E=P.node(z).rank;return E===void 0?Number.MAX_VALUE:E}),D=x(Math.min,j);P.nodes().forEach(z=>{let E=P.node(z);Object.hasOwn(E,"rank")&&(E.rank-=D)})}function d(P){let j=P.nodes().map(b=>P.node(b).rank).filter(b=>b!==void 0),D=x(Math.min,j),z=[];P.nodes().forEach(b=>{let $=P.node(b).rank-D;z[$]||(z[$]=[]),z[$].push(b)});let E=0,O=P.graph().nodeRankFactor;Array.from(z).forEach((b,$)=>{b===void 0&&$%O!==0?--E:b!==void 0&&E&&b.forEach(S=>P.node(S).rank+=E)})}function f(P,j,D,z){let E={width:0,height:0};return arguments.length>=4&&(E.rank=D,E.order=z),r(P,"border",E,j)}function h(P,j=y){let D=[];for(let z=0;z<P.length;z+=j){let E=P.slice(z,z+j);D.push(E)}return D}var y=65535;function x(P,j){if(j.length>y){let D=h(j);return P.apply(null,D.map(z=>P.apply(null,z)))}else return P.apply(null,j)}function _(P){let j=P.nodes().map(D=>{let z=P.node(D).rank;return z===void 0?Number.MIN_VALUE:z});return x(Math.max,j)}function v(P,j){let D={lhs:[],rhs:[]};return P.forEach(z=>{j(z)?D.lhs.push(z):D.rhs.push(z)}),D}function p(P,j){let D=Date.now();try{return j()}finally{console.log(P+" time: "+(Date.now()-D)+"ms")}}function g(P,j){return j()}var w=0;function k(P){var j=++w;return P+(""+j)}function C(P,j,D=1){j==null&&(j=P,P=0);let z=O=>O<j;D<0&&(z=O=>j<O);let E=[];for(let O=P;z(O);O+=D)E.push(O);return E}function L(P,j){let D={};for(let z of j)P[z]!==void 0&&(D[z]=P[z]);return D}function T(P,j){let D=j;return typeof j=="string"&&(D=z=>z[j]),Object.entries(P).reduce((z,[E,O])=>(z[E]=D(O,E),z),{})}function F(P,j){return P.reduce((D,z,E)=>(D[z]=j[E],D),{})}}),dx=ce((e,t)=>{var n=cx(),r=ke().uniqueId;t.exports={run:i,undo:s};function i(l){(l.graph().acyclicer==="greedy"?n(l,a(l)):o(l)).forEach(u=>{let c=l.edge(u);l.removeEdge(u),c.forwardName=u.name,c.reversed=!0,l.setEdge(u.w,u.v,c,r("rev"))});function a(u){return c=>u.edge(c).weight}}function o(l){let a=[],u={},c={};function d(f){Object.hasOwn(c,f)||(c[f]=!0,u[f]=!0,l.outEdges(f).forEach(h=>{Object.hasOwn(u,h.w)?a.push(h):d(h.w)}),delete u[f])}return l.nodes().forEach(d),a}function s(l){l.edges().forEach(a=>{let u=l.edge(a);if(u.reversed){l.removeEdge(a);let c=u.forwardName;delete u.reversed,delete u.forwardName,l.setEdge(a.w,a.v,u,c)}})}}),fx=ce((e,t)=>{var n=ke();t.exports={run:r,undo:o};function r(s){s.graph().dummyChains=[],s.edges().forEach(l=>i(s,l))}function i(s,l){let a=l.v,u=s.node(a).rank,c=l.w,d=s.node(c).rank,f=l.name,h=s.edge(l),y=h.labelRank;if(d===u+1)return;s.removeEdge(l);let x,_,v;for(v=0,++u;u<d;++v,++u)h.points=[],_={width:0,height:0,edgeLabel:h,edgeObj:l,rank:u},x=n.addDummyNode(s,"edge",_,"_d"),u===y&&(_.width=h.width,_.height=h.height,_.dummy="edge-label",_.labelpos=h.labelpos),s.setEdge(a,x,{weight:h.weight},f),v===0&&s.graph().dummyChains.push(x),a=x;s.setEdge(a,c,{weight:h.weight},f)}function o(s){s.graph().dummyChains.forEach(l=>{let a=s.node(l),u=a.edgeLabel,c;for(s.setEdge(a.edgeObj,u);a.dummy;)c=s.successors(l)[0],s.removeNode(l),u.points.push({x:a.x,y:a.y}),a.dummy==="edge-label"&&(u.x=a.x,u.y=a.y,u.width=a.width,u.height=a.height),l=c,a=s.node(l)})}}),qs=ce((e,t)=>{var{applyWithChunking:n}=ke();t.exports={longestPath:r,slack:i};function r(o){var s={};function l(a){var u=o.node(a);if(Object.hasOwn(s,a))return u.rank;s[a]=!0;let c=o.outEdges(a).map(f=>f==null?Number.POSITIVE_INFINITY:l(f.w)-o.edge(f).minlen);var d=n(Math.min,c);return d===Number.POSITIVE_INFINITY&&(d=0),u.rank=d}o.sources().forEach(l)}function i(o,s){return o.node(s.w).rank-o.node(s.v).rank-o.edge(s).minlen}}),Jp=ce((e,t)=>{var n=Mt().Graph,r=qs().slack;t.exports=i;function i(a){var u=new n({directed:!1}),c=a.nodes()[0],d=a.nodeCount();u.setNode(c,{});for(var f,h;o(u,a)<d;)f=s(u,a),h=u.hasNode(f.v)?r(a,f):-r(a,f),l(u,a,h);return u}function o(a,u){function c(d){u.nodeEdges(d).forEach(f=>{var h=f.v,y=d===h?f.w:h;!a.hasNode(y)&&!r(u,f)&&(a.setNode(y,{}),a.setEdge(d,y,{}),c(y))})}return a.nodes().forEach(c),a.nodeCount()}function s(a,u){return u.edges().reduce((c,d)=>{let f=Number.POSITIVE_INFINITY;return a.hasNode(d.v)!==a.hasNode(d.w)&&(f=r(u,d)),f<c[0]?[f,d]:c},[Number.POSITIVE_INFINITY,null])[1]}function l(a,u,c){a.nodes().forEach(d=>u.node(d).rank+=c)}}),hx=ce((e,t)=>{var n=Jp(),r=qs().slack,i=qs().longestPath,o=Mt().alg.preorder,s=Mt().alg.postorder,l=ke().simplify;t.exports=a,a.initLowLimValues=f,a.initCutValues=u,a.calcCutValue=d,a.leaveEdge=y,a.enterEdge=x,a.exchangeEdges=_;function a(w){w=l(w),i(w);var k=n(w);f(k),u(k,w);for(var C,L;C=y(k);)L=x(k,w,C),_(k,w,C,L)}function u(w,k){var C=s(w,w.nodes());C=C.slice(0,C.length-1),C.forEach(L=>c(w,k,L))}function c(w,k,C){var L=w.node(C),T=L.parent;w.edge(C,T).cutvalue=d(w,k,C)}function d(w,k,C){var L=w.node(C),T=L.parent,F=!0,P=k.edge(C,T),j=0;return P||(F=!1,P=k.edge(T,C)),j=P.weight,k.nodeEdges(C).forEach(D=>{var z=D.v===C,E=z?D.w:D.v;if(E!==T){var O=z===F,b=k.edge(D).weight;if(j+=O?b:-b,p(w,C,E)){var $=w.edge(C,E).cutvalue;j+=O?-$:$}}}),j}function f(w,k){arguments.length<2&&(k=w.nodes()[0]),h(w,{},1,k)}function h(w,k,C,L,T){var F=C,P=w.node(L);return k[L]=!0,w.neighbors(L).forEach(j=>{Object.hasOwn(k,j)||(C=h(w,k,C,j,L))}),P.low=F,P.lim=C++,T?P.parent=T:delete P.parent,C}function y(w){return w.edges().find(k=>w.edge(k).cutvalue<0)}function x(w,k,C){var L=C.v,T=C.w;k.hasEdge(L,T)||(L=C.w,T=C.v);var F=w.node(L),P=w.node(T),j=F,D=!1;F.lim>P.lim&&(j=P,D=!0);var z=k.edges().filter(E=>D===g(w,w.node(E.v),j)&&D!==g(w,w.node(E.w),j));return z.reduce((E,O)=>r(k,O)<r(k,E)?O:E)}function _(w,k,C,L){var T=C.v,F=C.w;w.removeEdge(T,F),w.setEdge(L.v,L.w,{}),f(w),u(w,k),v(w,k)}function v(w,k){var C=w.nodes().find(T=>!k.node(T).parent),L=o(w,C);L=L.slice(1),L.forEach(T=>{var F=w.node(T).parent,P=k.edge(T,F),j=!1;P||(P=k.edge(F,T),j=!0),k.node(T).rank=k.node(F).rank+(j?P.minlen:-P.minlen)})}function p(w,k,C){return w.hasEdge(k,C)}function g(w,k,C){return C.low<=k.lim&&k.lim<=C.lim}}),px=ce((e,t)=>{var n=qs(),r=n.longestPath,i=Jp(),o=hx();t.exports=s;function s(c){var d=c.graph().ranker;if(d instanceof Function)return d(c);switch(c.graph().ranker){case"network-simplex":u(c);break;case"tight-tree":a(c);break;case"longest-path":l(c);break;case"none":break;default:u(c)}}var l=r;function a(c){r(c),i(c)}function u(c){o(c)}}),gx=ce((e,t)=>{t.exports=n;function n(o){let s=i(o);o.graph().dummyChains.forEach(l=>{let a=o.node(l),u=a.edgeObj,c=r(o,s,u.v,u.w),d=c.path,f=c.lca,h=0,y=d[h],x=!0;for(;l!==u.w;){if(a=o.node(l),x){for(;(y=d[h])!==f&&o.node(y).maxRank<a.rank;)h++;y===f&&(x=!1)}if(!x){for(;h<d.length-1&&o.node(y=d[h+1]).minRank<=a.rank;)h++;y=d[h]}o.setParent(l,y),l=o.successors(l)[0]}})}function r(o,s,l,a){let u=[],c=[],d=Math.min(s[l].low,s[a].low),f=Math.max(s[l].lim,s[a].lim),h,y;h=l;do h=o.parent(h),u.push(h);while(h&&(s[h].low>d||f>s[h].lim));for(y=h,h=a;(h=o.parent(h))!==y;)c.push(h);return{path:u.concat(c.reverse()),lca:y}}function i(o){let s={},l=0;function a(u){let c=l;o.children(u).forEach(a),s[u]={low:c,lim:l++}}return o.children().forEach(a),s}}),mx=ce((e,t)=>{var n=ke();t.exports={run:r,cleanup:l};function r(a){let u=n.addDummyNode(a,"root",{},"_root"),c=o(a),d=Object.values(c),f=n.applyWithChunking(Math.max,d)-1,h=2*f+1;a.graph().nestingRoot=u,a.edges().forEach(x=>a.edge(x).minlen*=h);let y=s(a)+1;a.children().forEach(x=>i(a,u,h,y,f,c,x)),a.graph().nodeRankFactor=h}function i(a,u,c,d,f,h,y){let x=a.children(y);if(!x.length){y!==u&&a.setEdge(u,y,{weight:0,minlen:c});return}let _=n.addBorderNode(a,"_bt"),v=n.addBorderNode(a,"_bb"),p=a.node(y);a.setParent(_,y),p.borderTop=_,a.setParent(v,y),p.borderBottom=v,x.forEach(g=>{i(a,u,c,d,f,h,g);let w=a.node(g),k=w.borderTop?w.borderTop:g,C=w.borderBottom?w.borderBottom:g,L=w.borderTop?d:2*d,T=k!==C?1:f-h[y]+1;a.setEdge(_,k,{weight:L,minlen:T,nestingEdge:!0}),a.setEdge(C,v,{weight:L,minlen:T,nestingEdge:!0})}),a.parent(y)||a.setEdge(u,_,{weight:0,minlen:f+h[y]})}function o(a){var u={};function c(d,f){var h=a.children(d);h&&h.length&&h.forEach(y=>c(y,f+1)),u[d]=f}return a.children().forEach(d=>c(d,1)),u}function s(a){return a.edges().reduce((u,c)=>u+a.edge(c).weight,0)}function l(a){var u=a.graph();a.removeNode(u.nestingRoot),delete u.nestingRoot,a.edges().forEach(c=>{var d=a.edge(c);d.nestingEdge&&a.removeEdge(c)})}}),yx=ce((e,t)=>{var n=ke();t.exports=r;function r(o){function s(l){let a=o.children(l),u=o.node(l);if(a.length&&a.forEach(s),Object.hasOwn(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(let c=u.minRank,d=u.maxRank+1;c<d;++c)i(o,"borderLeft","_bl",l,u,c),i(o,"borderRight","_br",l,u,c)}}o.children().forEach(s)}function i(o,s,l,a,u,c){let d={width:0,height:0,rank:c,borderType:s},f=u[s][c-1],h=n.addDummyNode(o,"border",d,l);u[s][c]=h,o.setParent(h,a),f&&o.setEdge(f,h,{weight:1})}}),vx=ce((e,t)=>{t.exports={adjust:n,undo:r};function n(c){let d=c.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&i(c)}function r(c){let d=c.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&s(c),(d==="lr"||d==="rl")&&(a(c),i(c))}function i(c){c.nodes().forEach(d=>o(c.node(d))),c.edges().forEach(d=>o(c.edge(d)))}function o(c){let d=c.width;c.width=c.height,c.height=d}function s(c){c.nodes().forEach(d=>l(c.node(d))),c.edges().forEach(d=>{let f=c.edge(d);f.points.forEach(l),Object.hasOwn(f,"y")&&l(f)})}function l(c){c.y=-c.y}function a(c){c.nodes().forEach(d=>u(c.node(d))),c.edges().forEach(d=>{let f=c.edge(d);f.points.forEach(u),Object.hasOwn(f,"x")&&u(f)})}function u(c){let d=c.x;c.x=c.y,c.y=d}}),wx=ce((e,t)=>{var n=ke();t.exports=r;function r(i){let o={},s=i.nodes().filter(d=>!i.children(d).length),l=s.map(d=>i.node(d).rank),a=n.applyWithChunking(Math.max,l),u=n.range(a+1).map(()=>[]);function c(d){if(o[d])return;o[d]=!0;let f=i.node(d);u[f.rank].push(d),i.successors(d).forEach(c)}return s.sort((d,f)=>i.node(d).rank-i.node(f).rank).forEach(c),u}}),xx=ce((e,t)=>{var n=ke().zipObject;t.exports=r;function r(o,s){let l=0;for(let a=1;a<s.length;++a)l+=i(o,s[a-1],s[a]);return l}function i(o,s,l){let a=n(l,l.map((y,x)=>x)),u=s.flatMap(y=>o.outEdges(y).map(x=>({pos:a[x.w],weight:o.edge(x).weight})).sort((x,_)=>x.pos-_.pos)),c=1;for(;c<l.length;)c<<=1;let d=2*c-1;c-=1;let f=new Array(d).fill(0),h=0;return u.forEach(y=>{let x=y.pos+c;f[x]+=y.weight;let _=0;for(;x>0;)x%2&&(_+=f[x+1]),x=x-1>>1,f[x]+=y.weight;h+=y.weight*_}),h}}),Cx=ce((e,t)=>{t.exports=n;function n(r,i=[]){return i.map(o=>{let s=r.inEdges(o);if(s.length){let l=s.reduce((a,u)=>{let c=r.edge(u),d=r.node(u.v);return{sum:a.sum+c.weight*d.order,weight:a.weight+c.weight}},{sum:0,weight:0});return{v:o,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:o}})}}),_x=ce((e,t)=>{var n=ke();t.exports=r;function r(s,l){let a={};s.forEach((c,d)=>{let f=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:d};c.barycenter!==void 0&&(f.barycenter=c.barycenter,f.weight=c.weight)}),l.edges().forEach(c=>{let d=a[c.v],f=a[c.w];d!==void 0&&f!==void 0&&(f.indegree++,d.out.push(a[c.w]))});let u=Object.values(a).filter(c=>!c.indegree);return i(u)}function i(s){let l=[];function a(c){return d=>{d.merged||(d.barycenter===void 0||c.barycenter===void 0||d.barycenter>=c.barycenter)&&o(c,d)}}function u(c){return d=>{d.in.push(c),--d.indegree===0&&s.push(d)}}for(;s.length;){let c=s.pop();l.push(c),c.in.reverse().forEach(a(c)),c.out.forEach(u(c))}return l.filter(c=>!c.merged).map(c=>n.pick(c,["vs","i","barycenter","weight"]))}function o(s,l){let a=0,u=0;s.weight&&(a+=s.barycenter*s.weight,u+=s.weight),l.weight&&(a+=l.barycenter*l.weight,u+=l.weight),s.vs=l.vs.concat(s.vs),s.barycenter=a/u,s.weight=u,s.i=Math.min(l.i,s.i),l.merged=!0}}),Ex=ce((e,t)=>{var n=ke();t.exports=r;function r(s,l){let a=n.partition(s,_=>Object.hasOwn(_,"barycenter")),u=a.lhs,c=a.rhs.sort((_,v)=>v.i-_.i),d=[],f=0,h=0,y=0;u.sort(o(!!l)),y=i(d,c,y),u.forEach(_=>{y+=_.vs.length,d.push(_.vs),f+=_.barycenter*_.weight,h+=_.weight,y=i(d,c,y)});let x={vs:d.flat(!0)};return h&&(x.barycenter=f/h,x.weight=h),x}function i(s,l,a){let u;for(;l.length&&(u=l[l.length-1]).i<=a;)l.pop(),s.push(u.vs),a++;return a}function o(s){return(l,a)=>l.barycenter<a.barycenter?-1:l.barycenter>a.barycenter?1:s?a.i-l.i:l.i-a.i}}),kx=ce((e,t)=>{var n=Cx(),r=_x(),i=Ex();t.exports=o;function o(a,u,c,d){let f=a.children(u),h=a.node(u),y=h?h.borderLeft:void 0,x=h?h.borderRight:void 0,_={};y&&(f=f.filter(w=>w!==y&&w!==x));let v=n(a,f);v.forEach(w=>{if(a.children(w.v).length){let k=o(a,w.v,c,d);_[w.v]=k,Object.hasOwn(k,"barycenter")&&l(w,k)}});let p=r(v,c);s(p,_);let g=i(p,d);if(y&&(g.vs=[y,g.vs,x].flat(!0),a.predecessors(y).length)){let w=a.node(a.predecessors(y)[0]),k=a.node(a.predecessors(x)[0]);Object.hasOwn(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+w.order+k.order)/(g.weight+2),g.weight+=2}return g}function s(a,u){a.forEach(c=>{c.vs=c.vs.flatMap(d=>u[d]?u[d].vs:d)})}function l(a,u){a.barycenter!==void 0?(a.barycenter=(a.barycenter*a.weight+u.barycenter*u.weight)/(a.weight+u.weight),a.weight+=u.weight):(a.barycenter=u.barycenter,a.weight=u.weight)}}),Sx=ce((e,t)=>{var n=Mt().Graph,r=ke();t.exports=i;function i(s,l,a,u){u||(u=s.nodes());let c=o(s),d=new n({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(f=>s.node(f));return u.forEach(f=>{let h=s.node(f),y=s.parent(f);(h.rank===l||h.minRank<=l&&l<=h.maxRank)&&(d.setNode(f),d.setParent(f,y||c),s[a](f).forEach(x=>{let _=x.v===f?x.w:x.v,v=d.edge(_,f),p=v!==void 0?v.weight:0;d.setEdge(_,f,{weight:s.edge(x).weight+p})}),Object.hasOwn(h,"minRank")&&d.setNode(f,{borderLeft:h.borderLeft[l],borderRight:h.borderRight[l]}))}),d}function o(s){for(var l;s.hasNode(l=r.uniqueId("_root")););return l}}),Nx=ce((e,t)=>{t.exports=n;function n(r,i,o){let s={},l;o.forEach(a=>{let u=r.parent(a),c,d;for(;u;){if(c=r.parent(u),c?(d=s[c],s[c]=u):(d=l,l=u),d&&d!==u){i.setEdge(d,u);return}u=c}})}}),Mx=ce((e,t)=>{var n=wx(),r=xx(),i=kx(),o=Sx(),s=Nx(),l=Mt().Graph,a=ke();t.exports=u;function u(h,y={}){if(typeof y.customOrder=="function"){y.customOrder(h,u);return}let x=a.maxRank(h),_=c(h,a.range(1,x+1),"inEdges"),v=c(h,a.range(x-1,-1,-1),"outEdges"),p=n(h);if(f(h,p),y.disableOptimalOrderHeuristic)return;let g=Number.POSITIVE_INFINITY,w,k=y.constraints||[];for(let C=0,L=0;L<4;++C,++L){d(C%2?_:v,C%4>=2,k),p=a.buildLayerMatrix(h);let T=r(h,p);T<g?(L=0,w=Object.assign({},p),g=T):T===g&&(w=structuredClone(p))}f(h,w)}function c(h,y,x){let _=new Map,v=(p,g)=>{_.has(p)||_.set(p,[]),_.get(p).push(g)};for(let p of h.nodes()){let g=h.node(p);if(typeof g.rank=="number"&&v(g.rank,p),typeof g.minRank=="number"&&typeof g.maxRank=="number")for(let w=g.minRank;w<=g.maxRank;w++)w!==g.rank&&v(w,p)}return y.map(function(p){return o(h,p,x,_.get(p)||[])})}function d(h,y,x){let _=new l;h.forEach(function(v){x.forEach(w=>_.setEdge(w.left,w.right));let p=v.graph().root,g=i(v,p,_,y);g.vs.forEach((w,k)=>v.node(w).order=k),s(v,_,g.vs)})}function f(h,y){Object.values(y).forEach(x=>x.forEach((_,v)=>h.node(_).order=v))}}),Ix=ce((e,t)=>{var n=Mt().Graph,r=ke();t.exports={positionX:x,findType1Conflicts:i,findType2Conflicts:o,addConflict:l,hasConflict:a,verticalAlignment:u,horizontalCompaction:c,alignCoordinates:h,findSmallestWidthAlignment:f,balance:y};function i(p,g){let w={};function k(C,L){let T=0,F=0,P=C.length,j=L[L.length-1];return L.forEach((D,z)=>{let E=s(p,D),O=E?p.node(E).order:P;(E||D===j)&&(L.slice(F,z+1).forEach(b=>{p.predecessors(b).forEach($=>{let S=p.node($),N=S.order;(N<T||O<N)&&!(S.dummy&&p.node(b).dummy)&&l(w,$,b)})}),F=z+1,T=O)}),L}return g.length&&g.reduce(k),w}function o(p,g){let w={};function k(L,T,F,P,j){let D;r.range(T,F).forEach(z=>{D=L[z],p.node(D).dummy&&p.predecessors(D).forEach(E=>{let O=p.node(E);O.dummy&&(O.order<P||O.order>j)&&l(w,E,D)})})}function C(L,T){let F=-1,P,j=0;return T.forEach((D,z)=>{if(p.node(D).dummy==="border"){let E=p.predecessors(D);E.length&&(P=p.node(E[0]).order,k(T,j,z,F,P),j=z,F=P)}k(T,j,T.length,P,L.length)}),T}return g.length&&g.reduce(C),w}function s(p,g){if(p.node(g).dummy)return p.predecessors(g).find(w=>p.node(w).dummy)}function l(p,g,w){if(g>w){let C=g;g=w,w=C}let k=p[g];k||(p[g]=k={}),k[w]=!0}function a(p,g,w){if(g>w){let k=g;g=w,w=k}return!!p[g]&&Object.hasOwn(p[g],w)}function u(p,g,w,k){let C={},L={},T={};return g.forEach(F=>{F.forEach((P,j)=>{C[P]=P,L[P]=P,T[P]=j})}),g.forEach(F=>{let P=-1;F.forEach(j=>{let D=k(j);if(D.length){D=D.sort((E,O)=>T[E]-T[O]);let z=(D.length-1)/2;for(let E=Math.floor(z),O=Math.ceil(z);E<=O;++E){let b=D[E];L[j]===j&&P<T[b]&&!a(w,j,b)&&(L[b]=j,L[j]=C[j]=C[b],P=T[b])}}})}),{root:C,align:L}}function c(p,g,w,k,C){let L={},T=d(p,g,w,C),F=C?"borderLeft":"borderRight";function P(z,E){let O=T.nodes().slice(),b={},$=O.pop();for(;$;){if(b[$])z($);else{b[$]=!0,O.push($);for(let S of E($))O.push(S)}$=O.pop()}}function j(z){L[z]=T.inEdges(z).reduce((E,O)=>Math.max(E,L[O.v]+T.edge(O)),0)}function D(z){let E=T.outEdges(z).reduce((b,$)=>Math.min(b,L[$.w]-T.edge($)),Number.POSITIVE_INFINITY),O=p.node(z);E!==Number.POSITIVE_INFINITY&&O.borderType!==F&&(L[z]=Math.max(L[z],E))}return P(j,T.predecessors.bind(T)),P(D,T.successors.bind(T)),Object.keys(k).forEach(z=>L[z]=L[w[z]]),L}function d(p,g,w,k){let C=new n,L=p.graph(),T=_(L.nodesep,L.edgesep,k);return g.forEach(F=>{let P;F.forEach(j=>{let D=w[j];if(C.setNode(D),P){var z=w[P],E=C.edge(z,D);C.setEdge(z,D,Math.max(T(p,j,P),E||0))}P=j})}),C}function f(p,g){return Object.values(g).reduce((w,k)=>{let C=Number.NEGATIVE_INFINITY,L=Number.POSITIVE_INFINITY;Object.entries(k).forEach(([F,P])=>{let j=v(p,F)/2;C=Math.max(P+j,C),L=Math.min(P-j,L)});let T=C-L;return T<w[0]&&(w=[T,k]),w},[Number.POSITIVE_INFINITY,null])[1]}function h(p,g){let w=Object.values(g),k=r.applyWithChunking(Math.min,w),C=r.applyWithChunking(Math.max,w);["u","d"].forEach(L=>{["l","r"].forEach(T=>{let F=L+T,P=p[F];if(P===g)return;let j=Object.values(P),D=k-r.applyWithChunking(Math.min,j);T!=="l"&&(D=C-r.applyWithChunking(Math.max,j)),D&&(p[F]=r.mapValues(P,z=>z+D))})})}function y(p,g){return r.mapValues(p.ul,(w,k)=>{if(g)return p[g.toLowerCase()][k];{let C=Object.values(p).map(L=>L[k]).sort((L,T)=>L-T);return(C[1]+C[2])/2}})}function x(p){let g=r.buildLayerMatrix(p),w=Object.assign(i(p,g),o(p,g)),k={},C;["u","d"].forEach(T=>{C=T==="u"?g:Object.values(g).reverse(),["l","r"].forEach(F=>{F==="r"&&(C=C.map(z=>Object.values(z).reverse()));let P=(T==="u"?p.predecessors:p.successors).bind(p),j=u(p,C,w,P),D=c(p,C,j.root,j.align,F==="r");F==="r"&&(D=r.mapValues(D,z=>-z)),k[T+F]=D})});let L=f(p,k);return h(k,L),y(k,p.graph().align)}function _(p,g,w){return(k,C,L)=>{let T=k.node(C),F=k.node(L),P=0,j;if(P+=T.width/2,Object.hasOwn(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":j=-T.width/2;break;case"r":j=T.width/2;break}if(j&&(P+=w?j:-j),j=0,P+=(T.dummy?g:p)/2,P+=(F.dummy?g:p)/2,P+=F.width/2,Object.hasOwn(F,"labelpos"))switch(F.labelpos.toLowerCase()){case"l":j=F.width/2;break;case"r":j=-F.width/2;break}return j&&(P+=w?j:-j),j=0,P}}function v(p,g){return p.node(g).width}}),Lx=ce((e,t)=>{var n=ke(),r=Ix().positionX;t.exports=i;function i(s){s=n.asNonCompoundGraph(s),o(s),Object.entries(r(s)).forEach(([l,a])=>s.node(l).x=a)}function o(s){let l=n.buildLayerMatrix(s),a=s.graph().ranksep,u=s.graph().rankalign,c=0;l.forEach(d=>{let f=d.reduce((h,y)=>{let x=s.node(y).height;return h>x?h:x},0);d.forEach(h=>{let y=s.node(h);u==="top"?y.y=c+y.height/2:u==="bottom"?y.y=c+f-y.height/2:y.y=c+f/2}),c+=f+a})}}),bx=ce((e,t)=>{var n=dx(),r=fx(),i=px(),o=ke().normalizeRanks,s=gx(),l=ke().removeEmptyRanks,a=mx(),u=yx(),c=vx(),d=Mx(),f=Lx(),h=ke(),y=Mt().Graph;t.exports=x;function x(M,H={}){let W=H.debugTiming?h.time:h.notime;return W("layout",()=>{let U=W(" buildLayoutGraph",()=>P(M));return W(" runLayout",()=>_(U,W,H)),W(" updateInputGraph",()=>v(M,U)),U})}function _(M,H,W){H(" makeSpaceForEdgeLabels",()=>j(M)),H(" removeSelfEdges",()=>I(M)),H(" acyclic",()=>n.run(M)),H(" nestingGraph.run",()=>a.run(M)),H(" rank",()=>i(h.asNonCompoundGraph(M))),H(" injectEdgeLabelProxies",()=>D(M)),H(" removeEmptyRanks",()=>l(M)),H(" nestingGraph.cleanup",()=>a.cleanup(M)),H(" normalizeRanks",()=>o(M)),H(" assignRankMinMax",()=>z(M)),H(" removeEdgeLabelProxies",()=>E(M)),H(" normalize.run",()=>r.run(M)),H(" parentDummyChains",()=>s(M)),H(" addBorderSegments",()=>u(M)),H(" order",()=>d(M,W)),H(" insertSelfEdges",()=>R(M)),H(" adjustCoordinateSystem",()=>c.adjust(M)),H(" position",()=>f(M)),H(" positionSelfEdges",()=>B(M)),H(" removeBorderNodes",()=>N(M)),H(" normalize.undo",()=>r.undo(M)),H(" fixupEdgeLabelCoords",()=>$(M)),H(" undoCoordinateSystem",()=>c.undo(M)),H(" translateGraph",()=>O(M)),H(" assignNodeIntersects",()=>b(M)),H(" reversePoints",()=>S(M)),H(" acyclic.undo",()=>n.undo(M))}function v(M,H){M.nodes().forEach(W=>{let U=M.node(W),Y=H.node(W);U&&(U.x=Y.x,U.y=Y.y,U.order=Y.order,U.rank=Y.rank,H.children(W).length&&(U.width=Y.width,U.height=Y.height))}),M.edges().forEach(W=>{let U=M.edge(W),Y=H.edge(W);U.points=Y.points,Object.hasOwn(Y,"x")&&(U.x=Y.x,U.y=Y.y)}),M.graph().width=H.graph().width,M.graph().height=H.graph().height}var p=["nodesep","edgesep","ranksep","marginx","marginy"],g={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},w=["acyclicer","ranker","rankdir","align","rankalign"],k=["width","height","rank"],C={width:0,height:0},L=["minlen","weight","width","height","labeloffset"],T={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},F=["labelpos"];function P(M){let H=new y({multigraph:!0,compound:!0}),W=A(M.graph());return H.setGraph(Object.assign({},g,Z(W,p),h.pick(W,w))),M.nodes().forEach(U=>{let Y=A(M.node(U)),X=Z(Y,k);Object.keys(C).forEach(K=>{X[K]===void 0&&(X[K]=C[K])}),H.setNode(U,X),H.setParent(U,M.parent(U))}),M.edges().forEach(U=>{let Y=A(M.edge(U));H.setEdge(U,Object.assign({},T,Z(Y,L),h.pick(Y,F)))}),H}function j(M){let H=M.graph();H.ranksep/=2,M.edges().forEach(W=>{let U=M.edge(W);U.minlen*=2,U.labelpos.toLowerCase()!=="c"&&(H.rankdir==="TB"||H.rankdir==="BT"?U.width+=U.labeloffset:U.height+=U.labeloffset)})}function D(M){M.edges().forEach(H=>{let W=M.edge(H);if(W.width&&W.height){let U=M.node(H.v),Y={rank:(M.node(H.w).rank-U.rank)/2+U.rank,e:H};h.addDummyNode(M,"edge-proxy",Y,"_ep")}})}function z(M){let H=0;M.nodes().forEach(W=>{let U=M.node(W);U.borderTop&&(U.minRank=M.node(U.borderTop).rank,U.maxRank=M.node(U.borderBottom).rank,H=Math.max(H,U.maxRank))}),M.graph().maxRank=H}function E(M){M.nodes().forEach(H=>{let W=M.node(H);W.dummy==="edge-proxy"&&(M.edge(W.e).labelRank=W.rank,M.removeNode(H))})}function O(M){let H=Number.POSITIVE_INFINITY,W=0,U=Number.POSITIVE_INFINITY,Y=0,X=M.graph(),K=X.marginx||0,G=X.marginy||0;function q(te){let re=te.x,ie=te.y,fe=te.width,Be=te.height;H=Math.min(H,re-fe/2),W=Math.max(W,re+fe/2),U=Math.min(U,ie-Be/2),Y=Math.max(Y,ie+Be/2)}M.nodes().forEach(te=>q(M.node(te))),M.edges().forEach(te=>{let re=M.edge(te);Object.hasOwn(re,"x")&&q(re)}),H-=K,U-=G,M.nodes().forEach(te=>{let re=M.node(te);re.x-=H,re.y-=U}),M.edges().forEach(te=>{let re=M.edge(te);re.points.forEach(ie=>{ie.x-=H,ie.y-=U}),Object.hasOwn(re,"x")&&(re.x-=H),Object.hasOwn(re,"y")&&(re.y-=U)}),X.width=W-H+K,X.height=Y-U+G}function b(M){M.edges().forEach(H=>{let W=M.edge(H),U=M.node(H.v),Y=M.node(H.w),X,K;W.points?(X=W.points[0],K=W.points[W.points.length-1]):(W.points=[],X=Y,K=U),W.points.unshift(h.intersectRect(U,X)),W.points.push(h.intersectRect(Y,K))})}function $(M){M.edges().forEach(H=>{let W=M.edge(H);if(Object.hasOwn(W,"x"))switch((W.labelpos==="l"||W.labelpos==="r")&&(W.width-=W.labeloffset),W.labelpos){case"l":W.x-=W.width/2+W.labeloffset;break;case"r":W.x+=W.width/2+W.labeloffset;break}})}function S(M){M.edges().forEach(H=>{let W=M.edge(H);W.reversed&&W.points.reverse()})}function N(M){M.nodes().forEach(H=>{if(M.children(H).length){let W=M.node(H),U=M.node(W.borderTop),Y=M.node(W.borderBottom),X=M.node(W.borderLeft[W.borderLeft.length-1]),K=M.node(W.borderRight[W.borderRight.length-1]);W.width=Math.abs(K.x-X.x),W.height=Math.abs(Y.y-U.y),W.x=X.x+W.width/2,W.y=U.y+W.height/2}}),M.nodes().forEach(H=>{M.node(H).dummy==="border"&&M.removeNode(H)})}function I(M){M.edges().forEach(H=>{if(H.v===H.w){var W=M.node(H.v);W.selfEdges||(W.selfEdges=[]),W.selfEdges.push({e:H,label:M.edge(H)}),M.removeEdge(H)}})}function R(M){var H=h.buildLayerMatrix(M);H.forEach(W=>{var U=0;W.forEach((Y,X)=>{var K=M.node(Y);K.order=X+U,(K.selfEdges||[]).forEach(G=>{h.addDummyNode(M,"selfedge",{width:G.label.width,height:G.label.height,rank:K.rank,order:X+ ++U,e:G.e,label:G.label},"_se")}),delete K.selfEdges})})}function B(M){M.nodes().forEach(H=>{var W=M.node(H);if(W.dummy==="selfedge"){var U=M.node(W.e.v),Y=U.x+U.width/2,X=U.y,K=W.x-Y,G=U.height/2;M.setEdge(W.e,W.label),M.removeNode(H),W.label.points=[{x:Y+2*K/3,y:X-G},{x:Y+5*K/6,y:X-G},{x:Y+K,y:X},{x:Y+5*K/6,y:X+G},{x:Y+2*K/3,y:X+G}],W.label.x=W.x,W.label.y=W.y}})}function Z(M,H){return h.mapValues(h.pick(M,H),Number)}function A(M){var H={};return M&&Object.entries(M).forEach(([W,U])=>{typeof W=="string"&&(W=W.toLowerCase()),H[W]=U}),H}}),jx=ce((e,t)=>{var n=ke(),r=Mt().Graph;t.exports={debugOrdering:i};function i(o){let s=n.buildLayerMatrix(o),l=new r({compound:!0,multigraph:!0}).setGraph({});return o.nodes().forEach(a=>{l.setNode(a,{label:a}),l.setParent(a,"layer"+o.node(a).rank)}),o.edges().forEach(a=>l.setEdge(a.v,a.w,{},a.name)),s.forEach((a,u)=>{let c="layer"+u;l.setNode(c,{rank:"same"}),a.reduce((d,f)=>(l.setEdge(d,f,{style:"invis"}),f))}),l}}),Tx=ce((e,t)=>{t.exports="2.0.4"}),Px=ce((e,t)=>{t.exports={graphlib:Mt(),layout:bx(),debug:jx(),util:{time:ke().time,notime:ke().notime},version:Tx()}});const Mf=Px();/*! For license information please see dagre.esm.js.LEGAL.txt */const Bc=320,e3=Bc,Ax=78,Rx=18,$x=46,t3=Bc,n3=72,ms=Bc,Nu=110,Ox=6,Dx=6,pa=40,ga=60;function Vx(e,t){if(!e)return 0;const n=e.split(`
|
|
72
|
-
`).length,r=Math.ceil(e.length/t);return Math.max(n,r)}function r3(e){let t=Ax;const n=e.data.description??"";return n&&(t+=Vx(n,$x)*Rx+8),t}function zx(e){switch(e.type){case"meta":return{width:e3,height:r3(e)};case"start-agent":return{width:t3,height:n3};case"subagent":return{width:ms,height:Nu};case"junction":return{width:1,height:1}}}function Hx(e,t){if(e.length===0)return{nodes:e,edges:t};const n=e.filter(o=>o.data.nodeType==="subagent");if(n.length>Ox)return Fx(e,t,n);const r=new Mf.graphlib.Graph({directed:!0});r.setGraph({rankdir:"TB",nodesep:40,ranksep:100,marginx:40,marginy:40,ranker:"tight-tree"}),r.setDefaultNodeLabel(()=>({})),r.setDefaultEdgeLabel(()=>({}));for(const o of e)r.setNode(o.id,zx(o));for(const o of t)r.hasNode(o.source)&&r.hasNode(o.target)&&r.setEdge(o.source,o.target);return Mf.layout(r),{nodes:e.map(o=>{const s=r.node(o.id);return{...o,position:{x:s?s.x-s.width/2:0,y:s?s.y-s.height/2:0}}}),edges:t}}function Fx(e,t,n){const r=e.find(C=>C.type==="meta"),i=e.find(C=>C.type==="start-agent"),o=i??r,s=o==null?void 0:o.id,l=new Set(n.map(C=>C.id)),a=Math.min(Dx,n.length),c=(a*ms+(a-1)*pa)/2,d=new Map;let f=40;if(r){const C=r3(r);d.set(r.id,{x:c-e3/2,y:f}),f+=C+60}i&&(d.set(i.id,{x:c-t3/2,y:f}),f+=n3+80);const h=f,y=Math.ceil(n.length/a);for(let C=0;C<n.length;C++){const L=C%a,T=Math.floor(C/a),F=T===y-1?n.length-T*a:a,P=F*ms+(F-1)*pa,j=c-P/2;d.set(n[C].id,{x:j+L*(ms+pa),y:h+T*(Nu+ga)})}const x=[];for(let C=0;C<y;C++){const L=`__junction-${C}`;x.push(L),d.set(L,{x:c-.5,y:h+C*(Nu+ga)-ga/2})}const _=x.map(C=>({id:C,type:"junction",position:d.get(C),data:{nodeType:"junction",label:""},selectable:!1,draggable:!1})),v=e.map(C=>({...C,position:d.get(C.id)??{x:0,y:0}})),p=s,g=t.filter(C=>!(p&&C.source===p&&l.has(C.target))),w=[];if(s&&x.length>0){w.push({id:`e-trunk-${s}-${x[0]}`,source:s,target:x[0],type:"straight"});for(let C=0;C<x.length-1;C++)w.push({id:`e-trunk-${x[C]}-${x[C+1]}`,source:x[C],target:x[C+1],type:"straight"})}const k=[];for(let C=0;C<n.length;C++){const L=n[C],T=Math.floor(C/a),F={id:`e-branch-${x[T]}-${L.id}`,source:x[T],sourceHandle:"bottom",target:L.id,type:"rail"};k.push(F)}return{nodes:[...v,..._],edges:[...g,...w,...k]}}const If=22,Lf=10;function Bx({sourceX:e,sourceY:t,targetX:n,targetY:r,style:i,markerEnd:o}){if(Math.abs(n-e)<1)return m.jsx(Ur,{path:`M ${e} ${t} L ${n} ${r}`,style:i,markerEnd:o});const s=n>e?1:-1,l=t,a=e,u=l-If,c=a+s*If,d=n-s*Lf,f=l+Lf,h=[`M ${a} ${u}`,`Q ${a} ${l} ${c} ${l}`,`L ${d} ${l}`,`Q ${n} ${l} ${n} ${f}`,`L ${n} ${r}`].join(" ");return m.jsx(Ur,{path:h,style:i,markerEnd:o})}const Wx={rail:Bx};function Ux(){return m.jsxs("div",{className:"agent-node-junction",children:[m.jsx(ct,{type:"target",position:ne.Top,id:"top"}),m.jsx(ct,{type:"source",position:ne.Bottom,id:"bottom"}),m.jsx(ct,{type:"source",position:ne.Right,id:"right"}),m.jsx(ct,{type:"source",position:ne.Left,id:"left"})]})}function Zx(){return"meta-title"}function Yx(){return"meta-description"}function Gx(){return"meta-system-instructions"}function Xx(){return"meta-messages"}function Kx(e){return`${e}-title`}function Qx(e){return`${e}-title`}function i3(e){return`subagent-detail-${e}`}function o3(){return"subagent-description"}function s3(){return"subagent-system-instructions"}function Wc(e){return`reasoning-${e}`}function xt(e){return`heading-${e}`}function On(e,t){return`action-${e}-heading-${t}`}function l3(e){return`action-${e}`}function a3(e){return`reasoning-action-${e}`}function u3(e){return`action-${e}-target`}function c3(e,t,n){return`action-${e}-${t}-${n}`}function qx(e,t){var l,a,u,c,d,f,h,y;const n=e.label,r=i3(e.apiName),i=[],o=(x,_,v,p=r)=>({id:x,type:"heading",apiName:_,parentId:p,attributes:{subagent:n,...v??{}},filePath:t});if(i.push({id:r,type:e.sourceKeyword==="topic"?"topic":"subagent",apiName:n,attributes:{...e.description?{description:e.description}:{},hasSystemInstructions:!!e.systemInstructions},filePath:t}),i.push(o(xt("subagent-role"),n,{role:"title"})),e.description&&i.push({id:o3(),type:"description",apiName:`${n}.description`,parentId:r,attributes:{subagent:n,description:e.description},filePath:t}),e.systemInstructions&&i.push({id:s3(),type:"system-instructions",apiName:`${n}.system_instructions`,parentId:r,attributes:{subagent:n},filePath:t}),(((l=e.actions)==null?void 0:l.length)??0)>0&&i.push(o(xt("actions"),"ACTIONS")),e.beforeReasoning&&i.push(o(xt("before-reasoning"),"BEFORE REASONING")),(a=e.reasoning)!=null&&a.instructions&&i.push(o(xt("reasoning"),"REASONING")),e.afterReasoning&&i.push(o(xt("after-reasoning"),"AFTER REASONING")),(((c=(u=e.reasoning)==null?void 0:u.actionRefs)==null?void 0:c.length)??0)>0){i.push(o(xt("reasoning-actions"),"ACTIONS AVAILABLE FOR REASONING"));for(const x of((d=e.reasoning)==null?void 0:d.actionRefs)??[])i.push({id:a3(x),type:"reasoning-action",apiName:x,parentId:r,attributes:{subagent:n,ref:x},filePath:t})}const s=(x,_)=>({id:Wc(x),type:"reasoning",apiName:`${n}.${_}`,parentId:r,attributes:{subagent:n,slot:_},filePath:t});(f=e.reasoning)!=null&&f.instructions&&i.push(s("reasoning","reasoning")),e.beforeReasoning&&i.push(s("before","before_reasoning")),e.afterReasoning&&i.push(s("after","after_reasoning"));for(const x of e.actions??[]){const _=l3(x.name);i.push({id:_,type:"action",apiName:x.name,parentId:r,attributes:{label:x.label??x.name,subagent:n,...x.target?{target:x.target}:{}},filePath:t}),i.push(o(On(x.name,"title"),x.label??x.name,{action:x.name},_)),i.push(o(On(x.name,"name"),x.name,{action:x.name},_)),(((h=x.inputs)==null?void 0:h.length)??0)>0&&i.push(o(On(x.name,"inputs"),"INPUTS",{action:x.name},_)),(((y=x.outputs)==null?void 0:y.length)??0)>0&&i.push(o(On(x.name,"outputs"),"OUTPUTS",{action:x.name},_)),x.target&&i.push({id:u3(x.name),type:"action-target",apiName:`${x.name}.target`,parentId:_,attributes:{action:x.name,subagent:n,target:x.target},filePath:t});const v=(p,g)=>({id:c3(x.name,g,p.name),type:g==="input"?"action-input":"action-output",apiName:`${x.name}.${g}.${p.name}`,parentId:_,attributes:{param:p.name,direction:g,action:x.name,subagent:n,...p.type?{dataType:p.type}:{},...p.label?{label:p.label}:{}},filePath:t});for(const p of x.inputs??[])i.push(v(p,"input"));for(const p of x.outputs??[])i.push(v(p,"output"))}return i}const d3=({size:e=32})=>m.jsxs("svg",{width:e,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M19.3773 16.983H19.3896C18.8851 17.0261 18.436 17.1124 18.0485 17.2356C18.0485 17.2356 17.4825 17.4142 16.6151 17.5374C16.4121 17.5682 16.1537 17.5682 16.0122 17.5682H15.9076C15.7661 17.5682 15.5016 17.5559 15.3047 17.5251C14.4373 17.3834 13.8775 17.1863 13.8775 17.1863C13.4899 17.0631 13.0408 16.9707 12.5363 16.9152C9.77414 16.6319 8.58067 17.6853 8.513 17.8824C8.44533 18.0795 8.74677 20.6422 8.96824 21.0488C9.18356 21.4492 9.51576 21.6833 9.8172 21.8127C10.1248 21.942 12.6532 22.1946 13.496 22.0776C14.3389 21.9605 14.468 21.6771 14.6957 21.2459C14.8556 20.9379 15.2678 19.5457 15.4954 18.7264C15.5508 18.5662 15.5569 18.2459 15.9445 18.2212C16.3321 18.252 16.3382 18.5785 16.3874 18.7387C16.6089 19.558 16.9965 20.9626 17.1503 21.2706C17.3656 21.708 17.4948 21.9913 18.3376 22.1269C19.1743 22.2562 21.7089 22.0529 22.0164 21.9297C22.324 21.8065 22.6562 21.5786 22.8777 21.1782C23.0992 20.7777 23.4437 18.2212 23.3822 18.0241C23.3207 17.8208 22.1456 16.7489 19.3773 16.983Z",fill:"currentColor"}),m.jsx("path",{d:"M28.0084 8.93145H28.0146C27.2456 7.95196 26.3351 7.08336 25.3262 6.33796C26.372 6.15315 27.1656 5.24142 27.1656 4.14489C27.1656 2.91282 26.169 1.90869 24.9325 1.90869C23.6959 1.90869 22.6993 2.90666 22.6993 4.14489C22.6993 4.3913 22.7485 4.62539 22.8224 4.84716C21.2352 4.0956 19.5003 3.60278 17.6855 3.41181C14.6465 3.09147 11.712 3.63358 9.18356 4.82868C9.25123 4.61307 9.30044 4.38514 9.30044 4.14489C9.30044 2.91282 8.30383 1.90869 7.0673 1.90869C5.83076 1.90869 4.83415 2.90666 4.83415 4.14489C4.83415 5.24142 5.6216 6.14699 6.65512 6.33796C3.78833 8.45711 1.78896 11.5434 1.33371 15.1226C0.909231 18.4307 1.85047 21.7449 3.99134 24.4555C6.41519 27.5233 10.1802 29.5377 14.3143 29.9751C14.8925 30.0367 15.4647 30.0675 16.0306 30.0675C23.4068 30.0675 29.7925 25.053 30.666 18.2643C31.0905 14.9562 30.1493 11.642 28.0084 8.93145ZM16.0122 26.2481H16.006C10.457 26.2419 5.9415 22.5334 5.9415 17.9748C5.9415 16.601 6.35983 15.2827 7.11651 14.1123C7.18418 14.5312 7.30722 14.8946 7.44256 15.1657C7.62712 15.5353 7.99624 15.7509 8.38381 15.7509C8.5376 15.7509 8.69755 15.7201 8.8452 15.6462C9.36811 15.3936 9.58343 14.7653 9.34351 14.2416C9.21432 13.9644 8.88211 13.0465 9.68801 12.3443C10.4693 13.0527 11.589 13.8843 12.8501 14.2909C15.2001 15.0363 16.978 14.5989 17.0519 14.5805C17.4087 14.4881 17.6855 14.2232 17.7962 13.872C17.907 13.5209 17.827 13.139 17.5871 12.8679C16.3998 11.5003 15.8338 10.5023 15.5877 9.89862C20.3985 10.5516 21.3213 14.3895 21.3582 14.562C21.4628 15.0548 21.8996 15.3936 22.3856 15.3936C22.4594 15.3936 22.5271 15.3875 22.6009 15.369C23.173 15.2519 23.536 14.6913 23.4191 14.1184C23.2714 13.4038 22.8839 12.4367 22.1949 11.4695C24.551 12.9849 26.0767 15.3382 26.0767 17.981C26.0767 22.5396 21.5612 26.2481 16.0122 26.2481Z",fill:"currentColor"})]}),Jx=J.memo(function({id:t,data:n}){const r=typeof n.systemInstructions=="string"&&n.systemInstructions.length>0,i=typeof n.welcomeMessage=="string"&&n.welcomeMessage.length>0||typeof n.errorMessage=="string"&&n.errorMessage.length>0,o=r||i,[s,l]=V.useState(!1),a=V.useRef(null),u=y=>{y.key==="Escape"&&o&&(y.stopPropagation(),l(!0))},c=()=>{var y,x;(x=(y=a.current)==null?void 0:y.closest(".react-flow__node"))==null||x.classList.add("is-meta-hover")},d=()=>{var y,x;(x=(y=a.current)==null?void 0:y.closest(".react-flow__node"))==null||x.classList.remove("is-meta-hover"),s&&l(!1)},f=y=>{var x;(x=a.current)!=null&&x.contains(y.relatedTarget)||l(!1)};V.useEffect(()=>()=>{var y,x;(x=(y=a.current)==null?void 0:y.closest(".react-flow__node"))==null||x.classList.remove("is-meta-hover")},[]);const h=n.description?`${n.label} — agent. ${n.description}`:`${n.label} — agent.`;return m.jsxs("div",{ref:a,className:"agent-node-meta","data-mv-id":t,role:"group","aria-label":h,tabIndex:0,"data-hide-popover":s?"true":void 0,onKeyDown:u,onPointerEnter:c,onPointerLeave:d,onBlur:f,children:[m.jsxs("div",{className:"agent-node-meta__row",children:[m.jsx("span",{className:"agent-node-meta__avatar","aria-hidden":!0,children:m.jsx(d3,{})}),m.jsxs("div",{className:"agent-node-meta__heading",children:[m.jsx("div",{className:"agent-node-meta__title","data-mv-id":Zx(),children:n.label}),m.jsx("div",{className:"agent-node-meta__subtitle",children:"Agent"})]})]}),n.description&&m.jsx("div",{className:"agent-node-meta__description","data-mv-id":Yx(),children:n.description}),o&&m.jsxs("div",{className:"agent-node-meta__actions",children:[r&&m.jsxs("div",{className:"agent-node-meta__action","data-mv-id":Gx(),children:[m.jsx("span",{className:"agent-node-meta__action-label",children:"System Instructions"}),m.jsxs("div",{className:"agent-node-meta__popover",role:"tooltip",children:[m.jsx("div",{className:"agent-node-meta__popover-title",children:"System Instructions"}),m.jsx("pre",{className:"agent-node-meta__popover-body",children:n.systemInstructions})]})]}),i&&m.jsxs("div",{className:"agent-node-meta__action","data-mv-id":Xx(),children:[m.jsx("span",{className:"agent-node-meta__action-label",children:"Messages"}),m.jsxs("div",{className:"agent-node-meta__popover",role:"tooltip",children:[m.jsx("div",{className:"agent-node-meta__popover-title",children:"Messages"}),n.welcomeMessage&&m.jsxs("div",{className:"agent-node-meta__popover-section",children:[m.jsx("div",{className:"agent-node-meta__popover-label",children:"Welcome Message"}),m.jsx("div",{className:"agent-node-meta__popover-text",children:n.welcomeMessage})]}),n.errorMessage&&m.jsxs("div",{className:"agent-node-meta__popover-section",children:[m.jsx("div",{className:"agent-node-meta__popover-label",children:"Error Message"}),m.jsx("div",{className:"agent-node-meta__popover-text",children:n.errorMessage})]})]})]})]}),m.jsx(ct,{type:"source",position:ne.Bottom,id:"bottom"})]})}),eC=J.memo(function({id:t,data:n}){const[r,i]=V.useState(!1),o=V.useRef(null),s=n.description?`${n.label} — start agent. ${n.description}`:`${n.label} — start agent.`,l=c=>{c.key==="Escape"&&n.description&&(c.stopPropagation(),i(!0))},a=()=>{r&&i(!1)},u=()=>{n.description&&i(!0)};return m.jsxs("div",{ref:o,className:"agent-node-start","data-mv-id":t,role:"group","aria-label":s,tabIndex:n.description?0:void 0,"data-hide-popover":r?"true":void 0,onKeyDown:l,onClick:u,onPointerEnter:a,children:[m.jsx(ct,{type:"target",position:ne.Top,id:"top"}),m.jsx("span",{className:"agent-node-start__icon","aria-hidden":!0,children:"#"}),m.jsxs("div",{className:"agent-node-start__heading",children:[m.jsx("div",{className:"agent-node-start__title","data-mv-id":Qx(t),children:n.label}),m.jsx("div",{className:"agent-node-start__subtitle",children:"Start Agent"})]}),n.description&&m.jsx("div",{className:"agent-node-popover",role:"region","aria-label":`${n.label} description`,children:n.description}),m.jsx(ct,{type:"source",position:ne.Bottom,id:"bottom"})]})}),f3=V.createContext(null),tC=J.memo(function({id:t,data:n,selected:r}){const i=n.actionsCount??0,o=V.useContext(f3),s=V.useId(),[l,a]=V.useState(!1),u=V.useRef(null),c=x=>{if(x.key==="Enter"||x.key===" "){x.preventDefault(),a(!0),o==null||o(n);return}x.key==="Escape"&&n.description&&(x.stopPropagation(),a(!0))},d=()=>{n.description&&a(!0)},f=()=>{l&&a(!1)},h=n.sourceKeyword==="topic"?"topic":"subagent",y=i>0?`${n.label} ${h}, ${i} ${i===1?"action":"actions"}. Press Enter to open details.`:`${n.label} ${h}. Press Enter to open details.`;return m.jsxs("div",{ref:u,className:"agent-node-subagent","data-mv-id":t,role:"button",tabIndex:0,"aria-label":y,"aria-describedby":n.description&&!l?s:void 0,"data-hide-popover":l?"true":void 0,onKeyDown:c,onClick:d,onPointerEnter:f,children:[m.jsx(ct,{type:"target",position:ne.Top,id:"top"}),m.jsxs("div",{className:"agent-node-subagent__row",children:[m.jsx("span",{className:"agent-node-subagent__icon","aria-hidden":!0,children:"#"}),m.jsxs("div",{className:"agent-node-subagent__heading",children:[m.jsx("div",{className:"agent-node-subagent__title","data-mv-id":Kx(t),children:n.label}),m.jsx("div",{className:"agent-node-subagent__subtitle",children:h})]})]}),i>0&&m.jsxs("div",{className:"agent-node-subagent__action-pill",children:[i," ",i===1?"Action":"Actions"]}),n.description&&m.jsx("div",{id:s,className:"agent-node-popover",role:"region","aria-label":`${n.label} description`,children:n.description})]})}),nC={meta:Jx,"start-agent":eC,subagent:tC,junction:Ux};function rC(){const[e,t]=V.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1);return V.useEffect(()=>{const n=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null;if(!n)return;const r=i=>t(i.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}function iC(e){const t=new Set;for(const r of e)t.add(r.data.nodeType);const n=[];return t.has("meta")&&n.push({key:"agent",icon:m.jsx("span",{className:"agent-legend__avatar agent-legend__avatar--agent","aria-hidden":!0,children:m.jsx(d3,{size:20})}),label:"Agent"}),t.has("start-agent")&&n.push({key:"start-agent",icon:m.jsx("span",{className:"agent-legend__avatar agent-legend__avatar--start","aria-hidden":!0,children:"#"}),label:"Start Agent"}),t.has("subagent")&&n.push({key:"subagent",icon:m.jsx("span",{className:"agent-legend__avatar agent-legend__avatar--subagent","aria-hidden":!0,children:"#"}),label:"Subagent/Topic"}),n}const oC="var(--mv-edge-neutral, var(--vscode-editorIndentGuide-activeBackground, #94a3b8))",sC={style:{stroke:oC,strokeWidth:1.5}};function lC({graph:e,emptyMessage:t,onSubagentClick:n}){const r=rC(),i=V.useMemo(()=>!e||e.nodes.length===0?{nodes:[],edges:[]}:Hx(e.nodes,e.edges),[e]),o=V.useMemo(()=>iC(i.nodes),[i.nodes]),s=V.useMemo(()=>({padding:.1,duration:r?0:void 0}),[r]),l=V.useCallback((u,c)=>{if(!n)return;const d=c.data;(d==null?void 0:d.nodeType)==="subagent"&&n(c.data)},[n]),a=V.useCallback(u=>{n==null||n(u)},[n]);return i.nodes.length===0?m.jsx("div",{className:"agent-empty",children:t??"No agent definition to visualize."}):m.jsx(f3.Provider,{value:a,children:m.jsxs(Zp,{nodes:i.nodes,edges:i.edges,nodeTypes:nC,edgeTypes:Wx,defaultEdgeOptions:sC,colorMode:"system",fitView:!0,fitViewOptions:s,nodesDraggable:!0,nodesConnectable:!1,elementsSelectable:!0,onNodeClick:l,proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:2,"aria-label":"Agent script overview graph",children:[m.jsx(Gp,{variant:$t.Dots,gap:20,size:1.5,color:"var(--mv-canvas-grid)",bgColor:"var(--mv-canvas-bg)"}),m.jsx(Qp,{legend:m.jsx(qp,{items:o})})]})})}function aC(e){return m.jsx(Fc,{children:m.jsx(lC,{...e})})}function Uc(e){throw new Error(`Unhandled discriminant: ${JSON.stringify(e)}`)}const uC=64,bf=4096;function h3(e){const t=dC(e),{blocks:n}=Mu(t,0,-1,0);return n}function p3(e){return e.some(t=>t.kind==="if"||t.kind==="run"||t.kind==="set"||t.kind==="transition"||t.kind==="declaration"||t.kind==="header"||t.kind==="bullet"||t.kind==="numbered")}function cC(e,t){const n=[],r=new Set,i=a=>{t.has(a)&&!r.has(a)&&(r.add(a),n.push(a))},o=a=>{for(const u of a)u.kind==="ident"?i(u.name):u.kind==="bold"&&o(u.children)},s=a=>{for(const u of a){if(u.group){s(u.group);continue}i(u.left),u.rightIsString||i(u.right)}},l=a=>{switch(a.kind){case"if":s(a.clauses),a.consequent&&o(a.consequent);for(const u of a.body)l(u);if(a.elseBody)for(const u of a.elseBody)l(u);break;case"run":i(Qo(a.action));break;case"set":i(Qo(a.target)),a.valueIsString||i(Qo(a.value));break;case"transition":i(Qo(a.target));break;case"declaration":i(a.value),o(a.label);break;case"header":case"bullet":case"numbered":case"prose":o(a.inline);break;default:Uc(a)}};for(const a of e)l(a);return n}function dC(e){return e.split(/\r?\n/).map(t=>{const n=t.match(/^[ \t]*/),i=(n?n[0]:"").replace(/\t/g," ").length,o=t.replace(/^[ \t]+/,"").replace(/\s+$/,"");return{indent:i,trimmed:o}}).filter(t=>t.trimmed.length>0)}function Mu(e,t,n,r,i=!1){const o=[];let s=t;if(r>=uC){for(;s<e.length&&e[s].indent>n;)o.push({kind:"prose",inline:$e(e[s].trimmed)}),s++;return{blocks:o,nextIdx:s}}for(;s<e.length;){const l=e[s];if(l.indent<=n)break;const a=wC(l.trimmed);if(a){const _=m3(a.conditionText);if(i){o.push({kind:"prose",inline:$e(l.trimmed)}),s++;continue}if(!g3(_)||hC(a.conditionText)){o.push({kind:"prose",inline:$e(l.trimmed)}),s++;continue}const v=a.consequent?$e(a.consequent):void 0,{blocks:p,nextIdx:g}=Mu(e,s+1,l.indent,r+1,!0);let w=g,k;if(w<e.length&&e[w].indent===l.indent&&/^else\s*:?\s*$/i.test(e[w].trimmed)){const{blocks:C,nextIdx:L}=Mu(e,w+1,l.indent,r+1,!0);k=C,w=L}o.push({kind:"if",clauses:_,consequent:v,body:p,elseBody:k}),s=w;continue}const u=gC(l.trimmed);if(u){const{clauses:_,nextIdx:v}=vC(e,s+1,l.indent);if(!_.some(g=>g.kind==="with"||g.kind==="set")){for(let g=s;g<v;g++)o.push({kind:"prose",inline:$e(e[g].trimmed)});s=v;continue}o.push({kind:"run",action:u.action,clauses:_}),s=v;continue}const c=mC(l.trimmed);if(c){o.push({kind:"set",target:c.target,value:c.value,valueIsString:c.valueIsString}),s++;continue}const d=yC(l.trimmed);if(d){o.push({kind:"transition",target:d.target}),s++;continue}const f=l.trimmed.match(/^(#{2,6})\s+(.+)$/);if(f){o.push({kind:"header",level:f[1].length,inline:$e(f[2])}),s++;continue}const h=l.trimmed.match(/^[-*+]\s+(.+)$/);if(h){o.push({kind:"bullet",inline:$e(h[1])}),s++;continue}const y=l.trimmed.match(/^(\d+)[.)]\s+(.+)$/);if(y){o.push({kind:"numbered",n:parseInt(y[1],10),inline:$e(y[2])}),s++;continue}const x=l.trimmed.match(/^(\*\*[^*\n]+\*\*[^:\n]*)\s*:\s*([a-z][a-z0-9]*(?:_[a-z0-9]+)+)\s*$/);if(x){o.push({kind:"declaration",label:$e(x[1].trim()),value:x[2]}),s++;continue}o.push({kind:"prose",inline:$e(l.trimmed)}),s++}return{blocks:o,nextIdx:s}}function Qo(e){return e.startsWith("@")?e.slice(1):e}function g3(e){for(const t of e)if(t.group&&g3(t.group)||jf(t.left)||!t.rightIsString&&jf(t.right))return!0;return!1}const fC=/@(?:system_)?variables\.\w/;function jf(e){return e?fC.test(e):!1}function hC(e){if(!e)return!1;const t=e.replace(/"(?:[^"\\]|\\.)*"/g,"");return/\bif\b/i.test(t)}function pC(e){return e.replace(/"(?:[^"\\]|\\.)*"/g,t=>" ".repeat(t.length))}function gC(e){const t=e.match(/^run\s+(@?[\w.]+)\s*:?\s*$/i);return t?{action:t[1]}:null}function mC(e){const t=e.match(/^set\s+(@?[\w.]+)\s*=\s*(.+)$/i);if(!t)return null;const n=t[2].trim(),r=/^"(?:[^"\\]|\\.)*"$/.test(n);return{target:t[1],value:r?n.slice(1,-1):n,valueIsString:r}}function yC(e){const t=e.match(/^(?:transition\s+to|transition|to)\s+(@?[\w.]+)\s*$/i);return t?{target:t[1]}:null}function vC(e,t,n){const r=[];let i=t;for(;i<e.length;){const o=e[i];if(o.indent<=n)break;const s=o.trimmed.match(/^with\s+(@?[\w.]+)\s*=\s*(.+)$/i);if(s){const u=s[2].trim(),c=/^"(?:[^"\\]|\\.)*"$/.test(u);r.push({kind:"with",target:s[1],value:c?u.slice(1,-1):u,valueIsString:c}),i++;continue}const l=o.trimmed.match(/^set\s+(@?[\w.]+)\s*=\s*(.+)$/i);if(l){const u=l[2].trim(),c=/^"(?:[^"\\]|\\.)*"$/.test(u);r.push({kind:"set",target:l[1],value:c?u.slice(1,-1):u,valueIsString:c}),i++;continue}const a=o.trimmed.match(/^(?:transition\s+to|transition|to)\s+(@?[\w.]+)\s*$/i);if(a){r.push({kind:"to",target:a[1]}),i++;continue}break}return{clauses:r,nextIdx:i}}function wC(e){const t=e.match(/^if\s+(.+)$/i);if(!t)return null;const n=t[1].replace(/\s*:\s*$/,""),i=pC(n).match(new RegExp("→|(?<=\\s)->(?=\\s)"));if(i&&i.index!==void 0&&i.index>0){const o=i.index,s=n.slice(0,o).trim(),l=n.slice(o+i[0].length).trim();if(s.length>0&&l.length>0)return{conditionText:s,consequent:l}}return{conditionText:n.trim()}}function xC(e){const t=[];let n="",r=0,i=!1,o=0;const s=e.toLowerCase();for(;o<e.length;){const l=e[o];if(i){if(n+=l,l==="\\"&&o+1<e.length){n+=e[o+1],o+=2;continue}l==='"'&&(i=!1),o++;continue}if(l==='"'){i=!0,n+=l,o++;continue}if(l==="("){r++,n+=l,o++;continue}if(l===")"){r=Math.max(0,r-1),n+=l,o++;continue}if(r===0&&/\s/.test(l)){const u=s.slice(o).match(/^\s+(and|or)\s+/);if(u){t.push(n.trim()),t.push(u[1]),n="",o+=u[0].length;continue}}n+=l,o++}return t.push(n.trim()),t}function Tf(e){if(!e.startsWith("(")||!e.endsWith(")"))return!1;let t=0,n=!1;for(let r=0;r<e.length;r++){const i=e[r];if(n){if(i==="\\"&&r+1<e.length){r++;continue}i==='"'&&(n=!1);continue}if(i==='"'){n=!0;continue}if(i==="(")t++;else if(i===")"&&(t--,t===0&&r!==e.length-1))return!1}return t===0}function m3(e){let t=e.trim();if(Tf(t)&&(t=t.slice(1,-1).trim()),t.length>bf)return[{left:t.slice(0,bf),op:"=",right:"",rightIsString:!1}];const n=xC(t),r=[];for(let i=0;i<n.length;i+=2){let o=n[i].trim();const s=i>0?n[i-1].toLowerCase():void 0,l=s==="and"||s==="or"?s:void 0;let a=!1;const u=o.match(/^not\s+(.+)$/i);if(u&&(a=!0,o=u[1].trim()),Tf(o)){const f=m3(o.slice(1,-1));if(f.length>1){r.push({joiner:l,...a?{negate:!0}:{},left:"",op:"=",right:"",rightIsString:!1,group:f});continue}o=o.slice(1,-1).trim()}const c=o.match(/^(.+?)\s+(is\s+not|is)\s+(.+)$/i);if(c){const f=/^is\s+not$/i.test(c[2])?"is not":"is",h=c[3].trim(),y=/^"(?:[^"\\]|\\.)*"$/.test(h);r.push({joiner:l,...a?{negate:!0}:{},left:c[1].trim(),op:f,right:y?h.slice(1,-1):h,rightIsString:y});continue}const d=o.match(/^(.+?)\s*(==|!=|>=|<=|>|<|=)\s*(.+)$/);if(d){const f=d[3].trim(),h=/^"(?:[^"\\]|\\.)*"$/.test(f);r.push({joiner:l,...a?{negate:!0}:{},left:d[1].trim(),op:d[2],right:h?f.slice(1,-1):f,rightIsString:h})}else r.push({joiner:l,...a?{negate:!0}:{},left:o,op:"=",right:"",rightIsString:!1})}return CC(r)}function CC(e){if(e.length<2)return e;const t=e.slice(1).map(s=>s.joiner),n=t.includes("and"),r=t.includes("or");if(!n||!r)return e;const i=[];let o=0;for(;o<e.length;){let s=o+1;for(;s<e.length&&e[s].joiner==="and";)s++;const l=e.slice(o,s);if(l.length===1)i.push(l[0]);else{const a=l.map((u,c)=>c===0?{...u,joiner:void 0}:u);i.push({joiner:l[0].joiner,left:"",op:"=",right:"",rightIsString:!1,group:a})}o=s}return i}function $e(e){e=e.replace(/\{!\s*([\s\S]*?)\s*\}/g,"$1");const t=[],n=/(\*\*[^*\n]+\*\*)|(@(?:system_variables|variables|actions|action|subagent|utils|outputs|MessagingSession|MessagingEndUser|VoiceCall)\.[\w.]+)|(→|->)|(\b[a-z][a-z0-9]*(?:_[a-z0-9]+)+\b)/g;let r=0,i;for(;(i=n.exec(e))!==null;)i.index>r&&t.push({kind:"text",text:e.slice(r,i.index)}),i[1]?t.push({kind:"bold",children:$e(i[1].slice(2,-2))}):i[2]?t.push({kind:"varRef",path:i[2]}):i[3]?t.push({kind:"arrow"}):i[4]&&t.push({kind:"ident",name:i[4]}),r=n.lastIndex;return r<e.length&&t.push({kind:"text",text:e.slice(r)}),t}function y3(e){switch(e){case"==":return"==";case"!=":return"!=";case">=":return">=";case"<=":return"<=";case"is":return"is";case"is not":return"is not";default:return e}}function ho(e){if(!e.startsWith("@"))return null;const t=e.indexOf(".");if(t<0)return null;const n=e.slice(1,t),r=e.slice(t+1),i=r.split(".")[0];return{namespace:n,root:i,path:r}}const Ie=e=>({width:e??24,height:e??24}),_C=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"24",height:"24",fill:"#032D60"}),m.jsx("path",{d:"M18.7195 16.1988H10.6569C10.4169 16.1988 10.2009 16.4147 10.2009 16.6547V17.5425C10.2009 17.7825 10.4169 17.9985 10.6569 17.9985H18.7195C18.9595 17.9985 19.1754 17.7825 19.1754 17.5425V16.6547C19.1754 16.3907 18.9595 16.1988 18.7195 16.1988ZM11.8087 10.7517L6.02563 6.09644C5.85766 5.95247 5.56971 5.97646 5.42573 6.19243L4.92182 6.91231C4.77784 7.12827 4.82583 7.39223 5.0178 7.5362L9.12112 10.8237C9.26509 10.9436 9.26509 11.1836 9.12112 11.3036L4.9938 14.615C4.82583 14.759 4.75384 15.0709 4.89782 15.2389L5.40174 16.0068C5.54571 16.2228 5.80967 16.2468 6.00164 16.1028L11.8087 11.4715C12.0486 11.2796 12.0486 10.9196 11.8087 10.7517Z",fill:"white"})]}),EC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"24",height:"24",fill:"#032D60"}),m.jsx("path",{d:"M19.178 7.36425C18.5541 6.14045 16.9704 3.86083 14.0189 5.20461L11.1633 6.52439L8.52378 7.6762C7.7799 8.03614 6.14818 7.53222 5.23633 7.19628C4.97237 7.10029 4.73241 7.38825 4.85239 7.6522C5.47629 8.876 7.06002 11.1556 10.0115 9.81184C11.8352 8.97198 15.5066 7.38825 15.5066 7.38825C16.2505 7.02831 17.8822 7.53222 18.7941 7.86817C19.058 7.91616 19.298 7.6522 19.178 7.36425ZM12.8431 11.2276C12.5071 11.4196 11.1873 12.0195 11.1873 12.0195L9.86756 12.5954C9.21966 12.9553 7.8039 12.4754 6.96404 12.1395C6.72408 12.0195 6.50812 12.3314 6.6281 12.5714C7.15601 13.7712 8.57177 15.9308 11.1633 14.611C12.7711 13.7952 14.1388 13.2673 14.1388 13.2673C14.7867 12.9073 16.2025 13.3872 17.0424 13.7232C17.2823 13.8192 17.4983 13.5312 17.3783 13.2673C16.8264 12.0675 15.4106 9.90783 12.8431 11.2276ZM11.8832 16.5307L11.1633 16.9626C10.6594 17.2746 9.6036 16.8667 8.9797 16.5547C8.81173 16.4587 8.64376 16.7467 8.73974 16.9866C9.12368 18.0665 10.1795 20.0101 12.1232 18.8103L12.8431 18.3784C13.371 18.1145 14.4028 18.4744 15.0267 18.7623C15.1947 18.8583 15.3626 18.5704 15.2667 18.3304C14.8827 17.2746 13.8989 15.4269 11.8832 16.5307Z",fill:"white"})]}),kC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 48 48",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"48",height:"48",rx:"4",fill:"#032D60"}),m.jsx("path",{d:"M28.4256 12.4705C27.8459 11.9069 27.0693 11.5916 26.2608 11.5916C25.4523 11.5916 24.6757 11.9069 24.096 12.4705L12.5472 23.7985C12.3531 23.9853 12.0942 24.0897 11.8248 24.0897C11.5554 24.0897 11.2965 23.9853 11.1024 23.7985C10.9149 23.6157 10.8075 23.3659 10.8039 23.104C10.8003 22.8422 10.9008 22.5896 11.0832 22.4017L11.1024 22.3825L22.6512 11.0545C23.6185 10.1161 24.9131 9.59131 26.2608 9.59131C27.6084 9.59131 28.9031 10.1161 29.8704 11.0545C30.4292 11.5984 30.8514 12.2668 31.1025 13.0051C31.3536 13.7434 31.4265 14.5306 31.3152 15.3025C32.8992 15.0769 34.5024 15.6001 35.6448 16.7185L35.7024 16.7761C36.64 17.6902 37.1767 18.9389 37.1947 20.2482C37.2127 21.5576 36.7105 22.8206 35.7984 23.7601L35.7024 23.8561L25.2576 34.0993C25.1968 34.1612 25.1624 34.2443 25.1615 34.3311C25.1606 34.4179 25.1933 34.5017 25.2528 34.5649L25.2576 34.5697L27.4032 36.6721C27.792 37.0513 27.8016 37.6753 27.4224 38.0689L27.4032 38.0881C27.2091 38.2749 26.9502 38.3793 26.6808 38.3793C26.4114 38.3793 26.1525 38.2749 25.9584 38.0881L23.8128 35.9857C23.5955 35.7749 23.4219 35.5233 23.302 35.2454C23.182 34.9675 23.1179 34.6687 23.1134 34.366C23.109 34.0633 23.1642 33.7628 23.276 33.4814C23.3877 33.2001 23.5538 32.9436 23.7648 32.7265L23.8128 32.6785L34.2576 22.4353C34.8179 21.8856 35.1383 21.1368 35.149 20.3519C35.1598 19.5671 34.8601 18.8098 34.3152 18.2449L34.2 18.1297C33.6209 17.565 32.844 17.2489 32.0352 17.2489C31.2263 17.2489 30.4495 17.565 29.8704 18.1297L21.264 26.5681L21.1488 26.6881C20.9559 26.8772 20.6965 26.9831 20.4264 26.9831C20.1563 26.9831 19.8969 26.8772 19.704 26.6881C19.5165 26.5053 19.4091 26.2555 19.4055 25.9936C19.4019 25.7318 19.5024 25.4792 19.6848 25.2913L19.704 25.2721L28.4304 16.7137C28.7089 16.4418 28.9311 16.1177 29.0842 15.7599C29.2374 15.4021 29.3185 15.0176 29.3229 14.6284C29.3274 14.2392 29.2551 13.853 29.1102 13.4918C28.9653 13.1306 28.7506 12.8015 28.4784 12.5233L28.4256 12.4705ZM26.9808 15.3025C27.3696 14.9233 27.3792 14.2993 27 13.9057L26.9808 13.8865C26.7879 13.6974 26.5285 13.5915 26.2584 13.5915C25.9883 13.5915 25.7289 13.6974 25.536 13.8865L16.992 22.2625C16.0544 23.1766 15.5177 24.4253 15.4997 25.7346C15.4817 27.044 15.9838 28.307 16.896 29.2465L16.992 29.3425C17.9593 30.2808 19.2539 30.8056 20.6016 30.8056C21.9492 30.8056 23.2439 30.2808 24.2112 29.3425L32.7552 20.9665C33.144 20.5873 33.1536 19.9633 32.7744 19.5697L32.7552 19.5505C32.5623 19.3614 32.3029 19.2555 32.0328 19.2555C31.7627 19.2555 31.5033 19.3614 31.3104 19.5505L22.7664 27.9265C22.1867 28.49 21.4101 28.8053 20.6016 28.8053C19.7931 28.8053 19.0165 28.49 18.4368 27.9265C17.8765 27.3768 17.5561 26.628 17.5453 25.8431C17.5345 25.0583 17.8343 24.301 18.3792 23.7361L18.4368 23.6785L26.9808 15.3025Z",fill:"white"})]}),SC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 48 48",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"48",height:"48",rx:"4",fill:"#032D60"}),m.jsx("path",{d:"M24.864 9.6001C25.1186 9.6001 25.3628 9.70124 25.5428 9.88128C25.7229 10.0613 25.824 10.3055 25.824 10.5601V17.2801C25.7957 17.6172 25.8404 17.9565 25.9551 18.2747C26.0699 18.593 26.2519 18.8827 26.4889 19.1242C26.7258 19.3657 27.012 19.5533 27.328 19.674C27.6441 19.7948 27.9824 19.846 28.32 19.8241H35.04C35.2946 19.8241 35.5388 19.9252 35.7188 20.1053C35.8989 20.2853 36 20.5295 36 20.7841V35.5201C35.9876 36.2801 35.6802 37.0054 35.1428 37.5429C34.6053 38.0803 33.88 38.3877 33.12 38.4001H14.88C14.12 38.3877 13.3947 38.0803 12.8572 37.5429C12.3198 37.0054 12.0124 36.2801 12 35.5201V12.4801C12.0124 11.7201 12.3198 10.9948 12.8572 10.4573C13.3947 9.91986 14.12 9.61246 14.88 9.6001H24.864ZM29.376 24.0001H18.672C18.5957 24.0041 18.5219 24.0283 18.4581 24.0701C18.3942 24.112 18.3426 24.17 18.3084 24.2383C18.2743 24.3066 18.2588 24.3827 18.2637 24.4589C18.2685 24.5351 18.2935 24.6087 18.336 24.6721L22.992 30.1441C23.1407 30.3187 23.2253 30.5389 23.232 30.7681V34.2241C23.232 34.3259 23.2725 34.4236 23.3445 34.4956C23.4165 34.5676 23.5142 34.6081 23.616 34.6081H24.336C24.3845 34.6086 24.4325 34.5986 24.4767 34.5788C24.521 34.559 24.5604 34.5299 24.5923 34.4934C24.6242 34.4569 24.6479 34.4139 24.6616 34.3675C24.6754 34.321 24.6789 34.2721 24.672 34.2241V30.7681C24.6748 30.6499 24.7017 30.5336 24.7513 30.4262C24.8008 30.3189 24.8719 30.2229 24.96 30.1441L29.664 24.6721C29.7055 24.612 29.731 24.5424 29.7383 24.4697C29.7455 24.397 29.7342 24.3237 29.7055 24.2566C29.6767 24.1895 29.6314 24.1308 29.5738 24.0859C29.5162 24.041 29.4481 24.0115 29.376 24.0001ZM28.944 9.6001C29.1372 9.59958 29.3243 9.66762 29.472 9.7921L35.808 16.1281C35.9437 16.2883 36.0125 16.4946 36 16.7041C36.0004 16.887 35.9312 17.0632 35.8064 17.197C35.6815 17.3307 35.5105 17.4119 35.328 17.4241H30.24C29.7049 17.3999 29.1989 17.1732 28.8246 16.79C28.4503 16.4068 28.2356 15.8957 28.224 15.3601V10.2721C28.2362 10.0896 28.3174 9.91855 28.4511 9.79374C28.5849 9.66893 28.7611 9.59969 28.944 9.6001Z",fill:"white"})]}),NC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 48 48",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"48",height:"48",rx:"4",fill:"#032D60"}),m.jsx("path",{d:"M23.136 30.672H37.488C38.016 30.672 38.448 31.104 38.448 31.632V33.552C38.448 34.08 38.016 34.512 37.488 34.512H23.136C22.608 34.512 22.176 34.08 22.176 33.552V31.632C22.176 31.104 22.608 30.672 23.136 30.672ZM23.136 22.08H37.488C38.016 22.08 38.448 22.512 38.448 23.04V24.96C38.448 25.488 38.016 25.92 37.488 25.92H23.136C22.608 25.92 22.176 25.488 22.176 24.96V23.04C22.176 22.512 22.608 22.08 23.136 22.08ZM23.136 13.536H37.488C38.016 13.536 38.448 13.968 38.448 14.496V16.416C38.448 16.944 38.016 17.376 37.488 17.376H23.136C22.608 17.376 22.176 16.944 22.176 16.416V14.496C22.176 13.968 22.608 13.536 23.136 13.536ZM13.92 13.536C12.864 13.536 12 14.4 12 15.456C12 16.512 12.864 17.376 13.92 17.376C14.976 17.376 15.84 16.512 15.84 15.456C15.84 14.4 14.976 13.536 13.92 13.536ZM13.92 30.672C12.864 30.672 12 31.536 12 32.592C12 33.648 12.864 34.512 13.92 34.512C14.976 34.512 15.84 33.648 15.84 32.592C15.84 31.536 14.976 30.672 13.92 30.672ZM13.92 19.68C11.52 19.68 9.60001 21.6 9.60001 24C9.60001 26.4 11.52 28.32 13.92 28.32C16.32 28.32 18.24 26.4 18.24 24C18.24 21.6 16.32 19.68 13.92 19.68ZM13.92 25.44C13.104 25.44 12.48 24.768 12.48 24C12.48 23.184 13.152 22.56 13.92 22.56C14.688 22.56 15.36 23.232 15.36 24C15.36 24.816 14.736 25.44 13.92 25.44Z",fill:"white"})]}),MC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 48 48",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"48",height:"48",rx:"4",fill:"#032D60"}),m.jsx("path",{d:"M37.104 14.4H10.896C10.5523 14.4 10.2226 14.5365 9.9796 14.7796C9.73655 15.0226 9.60001 15.3523 9.60001 15.696V32.304C9.60001 32.6477 9.73655 32.9774 9.9796 33.2204C10.2226 33.4635 10.5523 33.6 10.896 33.6H37.104C37.4477 33.6 37.7774 33.4635 38.0204 33.2204C38.2635 32.9774 38.4 32.6477 38.4 32.304V15.696C38.4 15.3523 38.2635 15.0226 38.0204 14.7796C37.7774 14.5365 37.4477 14.4 37.104 14.4ZM30.48 20.256V23.616C30.4909 23.8181 30.4407 24.0188 30.336 24.192C30.284 24.2741 30.2134 24.3428 30.1301 24.3928C30.0468 24.4428 29.9529 24.4727 29.856 24.48C29.6017 24.494 29.3496 24.4268 29.136 24.288L28.656 23.952H28.608L27.744 25.2L26.544 26.928L25.632 28.08C25.4864 28.3187 25.2675 28.5039 25.008 28.608C24.8382 28.6692 24.6551 28.6836 24.4777 28.6499C24.3004 28.6161 24.1354 28.5353 24 28.416C23.8605 28.2956 23.7463 28.1488 23.664 27.984L22.224 25.584L22.032 25.296C21.984 25.2 22.032 25.296 21.984 25.296L21.456 26.064L20.064 28.176C19.8889 28.4167 19.6336 28.587 19.344 28.656C19.2162 28.6659 19.0878 28.6659 18.96 28.656C18.8618 28.6586 18.7641 28.6423 18.672 28.608C18.4376 28.5022 18.2498 28.3144 18.144 28.08C18.0699 27.9138 18.0316 27.7339 18.0316 27.552C18.0316 27.3701 18.0699 27.1902 18.144 27.024C18.1809 26.9076 18.2292 26.795 18.288 26.688L19.824 24.528L21.168 22.608C21.3188 22.3849 21.5377 22.2165 21.792 22.128C21.9682 22.0573 22.1609 22.0378 22.3477 22.0718C22.5345 22.1057 22.7079 22.1918 22.848 22.32C22.9679 22.4282 23.0658 22.5586 23.136 22.704L24.48 25.104L24.672 25.44C24.768 25.536 24.72 25.488 24.768 25.44L25.968 23.664L26.688 22.656V22.608L25.776 21.936C25.674 21.8666 25.5902 21.7737 25.5317 21.6651C25.4732 21.5565 25.4418 21.4353 25.44 21.312C25.4227 21.1793 25.4455 21.0444 25.5053 20.9247C25.5652 20.8049 25.6594 20.7058 25.776 20.64C25.932 20.5664 26.0923 20.5022 26.256 20.448L27.552 19.872L29.376 18.96C29.5577 18.882 29.7599 18.8651 29.952 18.912C30.0741 18.9392 30.1871 18.9978 30.2797 19.082C30.3722 19.1662 30.4413 19.273 30.48 19.392C30.5067 19.4695 30.5229 19.5502 30.528 19.632L30.48 20.256Z",fill:"white"})]}),IC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 48 48",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"48",height:"48",rx:"4",fill:"#032D60"}),m.jsx("path",{d:"M24 37.2722C16.7568 37.2722 10.896 31.373 10.896 24.0914C10.896 16.8098 16.7568 10.9058 24 10.9058C31.2432 10.9058 37.104 16.805 37.104 24.0866C37.104 31.3682 31.2432 37.2674 24 37.2674V37.2722ZM24 9.60498C16.0656 9.60498 9.59998 16.0226 9.59998 24.005C9.59998 31.9874 16.0656 38.405 24 38.405C27.8191 38.405 31.4818 36.8878 34.1823 34.1873C36.8828 31.4868 38.4 27.8241 38.4 24.005C38.4 20.1859 36.8828 16.5232 34.1823 13.8226C31.4818 11.1221 27.8191 9.60498 24 9.60498ZM20.4 30.5282C19.2799 29.9749 18.3362 29.1204 17.6748 28.0605C17.0135 27.0007 16.6606 25.7775 16.656 24.5282C16.656 23.1362 17.088 21.8402 17.808 20.7362L22.512 27.8402H25.392L30.144 20.6882C30.8743 21.8351 31.2576 23.1685 31.248 24.5282C31.248 27.0242 29.952 29.2322 27.984 30.3362L28.944 33.7922C32.352 31.9682 34.8 28.3202 34.8 24.1922C34.8 20.0642 32.64 16.7042 29.52 14.8802L24 23.3762L18.576 14.8322C16.953 15.797 15.6087 17.167 14.6746 18.8079C13.7406 20.4487 13.249 22.3041 13.248 24.1922C13.248 28.5122 15.744 32.2562 19.44 33.9842L20.4 30.5282Z",fill:"white"})]}),LC=({size:e,className:t})=>m.jsx("svg",{...Ie(e),viewBox:"0 0 30 30",fill:"none",className:t,"aria-hidden":!0,children:m.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.0309 29.7846H21.7232V26.8308H26.0309V29.7846ZM17.3536 29.7846H13.0459V26.8308H17.3536V29.7846ZM8.73839 29.7846H4.43068V26.8308H8.73839V29.7846ZM2.95386 26.1552H0V21.8477H2.95386V26.1552ZM29.4153 25.1084H26.4614V20.8008H29.4153V25.1084ZM2.95386 17.5381H0V13.2305H2.95386V17.5381ZM29.4153 16.4912H26.4614V12.1836H29.4153V16.4912ZM2.95386 8.92459H0V4.61701H2.95386V8.92459ZM29.4154 7.93636H26.4615V3.62878H29.4154V7.93636ZM24.923 2.95377H20.6153V0H24.923V2.95377ZM16.3078 2.95377H12.0001V0H16.3078V2.95377ZM7.7541 2.95377H3.44639V0H7.7541V2.95377Z",fill:"#747474"})}),bC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"24",height:"24",fill:"#FF0000"}),m.jsx("path",{d:"M13.5485 11.9431L17.1762 8.31538C17.3424 8.14923 17.3424 7.9 17.1762 7.73385L16.5947 7.15231C16.4285 6.98615 16.1793 6.98615 16.0131 7.15231L12.3855 10.78C12.2747 10.8908 12.1085 10.8908 11.9978 10.78L8.37007 7.12462C8.20392 6.95846 7.95469 6.95846 7.78853 7.12462L7.207 7.70615C7.04084 7.87231 7.04084 8.12154 7.207 8.28769L10.8347 11.9154C10.9455 12.0262 10.9455 12.1923 10.8347 12.3031L7.1793 15.9585C7.01315 16.1246 7.01315 16.3738 7.1793 16.54L7.76084 17.1215C7.927 17.2877 8.17623 17.2877 8.34238 17.1215L11.9978 13.4938C12.1085 13.3831 12.2747 13.3831 12.3855 13.4938L16.0131 17.1215C16.1793 17.2877 16.4285 17.2877 16.5947 17.1215L17.1762 16.54C17.3424 16.3738 17.3424 16.1246 17.1762 15.9585L13.5485 12.3308C13.4655 12.22 13.4655 12.0538 13.5485 11.9431Z",fill:"white"})]}),jC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 48 48",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"48",height:"48",rx:"4",fill:"#032D60"}),m.jsx("path",{d:"M15.36 28.32H21.6C21.8546 28.32 22.0988 28.2189 22.2788 28.0389C22.4589 27.8588 22.56 27.6146 22.56 27.36V12.96C22.56 11.904 21.6 11.04 20.64 11.04H15.504C14.88 11.04 14.4 11.52 14.4 12.144V27.36C14.4 27.888 14.832 28.32 15.36 28.32ZM36.48 13.92V29.28C36.48 29.7893 36.2777 30.2776 35.9177 30.6377C35.5576 30.9978 35.0692 31.2 34.56 31.2H13.44C12.9308 31.2 12.4424 30.9978 12.0824 30.6377C11.7223 30.2776 11.52 29.7893 11.52 29.28V13.92C10.7562 13.92 10.0237 14.2235 9.48355 14.7636C8.94344 15.3037 8.64001 16.0362 8.64001 16.8V31.2C8.64001 31.9639 8.94344 32.6964 9.48355 33.2365C10.0237 33.7766 10.7562 34.08 11.52 34.08H20.64C21.168 34.08 21.6 34.512 21.6 35.04C21.6 35.568 22.032 36 22.56 36H25.44C25.968 36 26.4 35.568 26.4 35.04C26.4 34.512 26.832 34.08 27.36 34.08H36.48C37.2438 34.08 37.9764 33.7766 38.5165 33.2365C39.0566 32.6964 39.36 31.9639 39.36 31.2V16.8C39.36 16.0362 39.0566 15.3037 38.5165 14.7636C37.9764 14.2235 37.2438 13.92 36.48 13.92ZM26.4 28.32H32.496C33.12 28.32 33.6 27.84 33.6 27.216V12C33.6 11.7454 33.4989 11.5013 33.3188 11.3212C33.1388 11.1412 32.8946 11.04 32.64 11.04H27.36C26.4 11.04 25.44 11.904 25.44 12.96V27.36C25.44 27.888 25.872 28.32 26.4 28.32Z",fill:"white"})]}),TC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"24",height:"24",fill:"#032D60"}),m.jsx("path",{d:"M19.0821 10.0776C18.9945 9.85307 18.8519 9.65412 18.6674 9.49899C18.4829 9.34387 18.2625 9.23754 18.0262 9.18975C17.7863 9.14176 17.5463 9.11777 17.2584 9.11777C15.7706 9.11777 14.0429 9.83765 12.8191 10.6775C13.299 9.57369 13.539 8.78182 13.1071 8.61385C12.6751 8.42188 12.2192 9.11777 11.6673 10.2456C11.5713 8.51787 10.8274 6.28624 9.50766 5.18242C9.2519 4.99051 8.93953 4.8892 8.61981 4.89447C8.45184 4.89447 8.28387 4.89447 8.1159 4.96646C7.70796 5.08644 7.39602 5.37439 7.27604 5.73433C7.22804 5.78232 7.22805 5.85431 7.22805 5.9263C7.15606 8.75783 6.72413 9.42971 6.62815 10.0056C6.53216 10.5815 6.77212 11.1094 7.27604 11.4214L7.70796 11.6133L7.06007 11.5414C6.58015 11.5414 6.10023 11.6613 5.74029 11.9013C5.46672 12.053 5.23553 12.2709 5.06785 12.5349C4.90018 12.799 4.80137 13.1009 4.78045 13.413C4.78045 14.3489 4.90043 15.5967 6.12423 16.2206L6.2922 16.2926C6.46017 16.3646 6.62814 16.3646 6.72413 16.3646C6.94836 16.3677 7.17022 16.3184 7.37202 16.2206L7.61198 16.0766L9.81961 14.4449C9.36369 15.6927 9.19572 16.6045 9.33969 16.6765C9.48367 16.7485 10.0596 16.0286 10.7555 14.8768C10.7555 15.9086 10.8274 17.3724 10.8754 17.8043C10.9714 18.4762 11.6913 18.8841 11.6913 18.8841C12.0272 19.0441 12.3632 19.1241 12.6991 19.1241C13.371 19.1241 14.0189 18.8121 14.7628 18.1403C14.9801 17.9239 15.1416 17.658 15.2336 17.3654C15.3255 17.0728 15.3451 16.7623 15.2907 16.4605C15.1947 15.8126 14.8108 15.2127 14.2349 14.7568L14.7388 14.9728C14.9911 15.0657 15.2663 15.0763 15.525 15.003C15.7837 14.9297 16.0125 14.7763 16.1786 14.5649C16.1786 14.5649 17.4503 12.5972 18.9381 11.4454C18.9861 11.3974 19.0101 11.4214 19.0581 11.3014C19.226 11.0614 19.25 10.4855 19.0581 10.1016L19.0821 10.0776ZM8.16389 6.79015C8.16389 6.43021 8.45184 6.14226 8.81178 6.14226C9.17172 6.14226 9.45967 6.43021 9.45967 6.79015C9.45967 7.15009 9.17172 7.43805 8.81178 7.43805C8.7267 7.43805 8.64245 7.42129 8.56384 7.38873C8.48524 7.35617 8.41381 7.30844 8.35365 7.24828C8.29349 7.18812 8.24577 7.1167 8.21321 7.03809C8.18065 6.95948 8.16389 6.87524 8.16389 6.79015ZM9.45967 9.28574C9.19572 9.28574 8.97975 9.06977 8.97975 8.80582C8.97975 8.54186 9.19572 8.34989 9.45967 8.34989C9.72363 8.34989 9.9156 8.56586 9.9156 8.82981C9.9156 9.09377 9.69963 9.28574 9.43568 9.28574M15.2667 11.7333C15.0267 11.7333 14.8108 11.5414 14.8108 11.2774C14.8108 11.0134 15.0267 10.7975 15.2907 10.7975C15.5547 10.7975 15.7466 11.0374 15.7466 11.2774C15.7466 11.5174 15.5307 11.7573 15.2667 11.7573M17.3064 11.3014C16.9464 11.3014 16.6585 11.0134 16.6585 10.6535C16.6585 10.2936 16.9464 10.0296 17.3064 10.0296C17.6663 10.0296 17.9543 10.3176 17.9543 10.6535C17.9543 10.9895 17.6663 11.3014 17.3064 11.3014Z",fill:"white"})]}),PC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"24",height:"24",fill:"#032D60"}),m.jsx("path",{d:"M15.0647 17.0865V18.9582C15.0647 19.1022 15.1846 19.2221 15.3286 19.2221L15.4726 19.1741L19.096 16.2226C19.144 16.1746 19.168 16.1027 19.168 16.0307C19.168 15.9587 19.12 15.8867 19.072 15.8387L15.4486 12.7432L15.3286 12.7192C15.1846 12.7192 15.0647 12.8392 15.0647 12.9832V14.9748C12.833 15.5747 11.0093 13.6071 11.0093 13.6071C10.9614 13.5591 10.8894 13.5351 10.8174 13.5351C10.6734 13.5351 10.5534 13.6551 10.5534 13.799V13.847C11.4653 17.6144 15.0647 17.0865 15.0647 17.0865ZM9.16165 14.135L9.11366 13.967V13.751C9.11366 12.8152 9.88153 12.0473 10.8174 12.0473C11.2733 12.0473 11.6812 12.2153 12.0172 12.5512L12.0652 12.5992C12.2811 12.8392 12.905 13.3431 13.6489 13.5591V12.9592C13.6489 12.0233 14.4168 11.2555 15.3526 11.2555C15.7126 11.2555 15.9525 11.3514 16.1205 11.4474L16.2885 11.5194L16.4324 11.6394L18.4721 13.3671C18.8394 12.9887 19.0872 12.5105 19.1847 11.9923C19.2822 11.474 19.225 10.9385 19.0204 10.4525C18.8158 9.96646 18.4726 9.55137 18.0338 9.25893C17.595 8.9665 17.0798 8.80963 16.5524 8.80787H16.4084V8.56791C16.4084 7.08016 15.1846 5.85636 13.6969 5.85636C12.977 5.85636 12.3531 6.12032 11.8732 6.57624C11.4893 5.56841 10.5054 4.80054 9.32962 4.80054C8.85442 4.80593 8.38882 4.93503 7.97869 5.17511C7.56856 5.41519 7.22805 5.75798 6.99071 6.1697C6.75336 6.58142 6.62737 7.04787 6.62515 7.5231C6.62292 7.99832 6.74454 8.46593 6.97802 8.87986C5.77822 9.16781 4.91436 10.2236 4.91436 11.5194C4.91436 12.9832 6.04217 14.159 7.50593 14.207H9.28163C9.18565 14.183 9.18565 14.159 9.16165 14.135Z",fill:"white"})]}),AC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"24",height:"24",fill:"#032D60"}),m.jsx("g",{transform:"translate(5.8 3) scale(0.62)",children:m.jsx("path",{d:"M12.5766 0.262958C12.5002 0.180053 12.4074 0.113884 12.3041 0.068625C12.2009 0.0233663 12.0894 0 11.9766 0C11.8638 0 11.7523 0.0233663 11.6491 0.068625C11.5458 0.113884 11.453 0.180053 11.3766 0.262958L10.1766 1.36696C10.0949 1.43903 10.0294 1.52766 9.9846 1.62697C9.93977 1.72628 9.91658 1.834 9.91658 1.94296C9.91658 2.05192 9.93977 2.15963 9.9846 2.25894C10.0294 2.35825 10.0949 2.44689 10.1766 2.51896L12.2406 4.48696C12.3238 4.56318 12.3805 4.66407 12.4022 4.77483C12.4239 4.8856 12.4095 5.0004 12.3612 5.1024C12.3129 5.20441 12.2332 5.28824 12.1337 5.34161C12.0343 5.39499 11.9203 5.41508 11.8086 5.39896H0.864601C0.646826 5.40925 0.439942 5.49721 0.28144 5.64691C0.122939 5.7966 0.0233069 5.99813 0.000600586 6.21496V7.89496C0.0233069 8.11179 0.122939 8.31331 0.28144 8.46301C0.439942 8.61271 0.646826 8.70067 0.864601 8.71096H11.8086C11.9203 8.69483 12.0343 8.71493 12.1337 8.7683C12.2332 8.82167 12.3129 8.90551 12.3612 9.00751C12.4095 9.10952 12.4239 9.22432 12.4022 9.33508C12.3805 9.44584 12.3238 9.54673 12.2406 9.62296L10.2246 11.591C10.1429 11.663 10.0774 11.7517 10.0326 11.851C9.98777 11.9503 9.96459 12.058 9.96459 12.167C9.96459 12.2759 9.98777 12.3836 10.0326 12.4829C10.0774 12.5823 10.1429 12.6709 10.2246 12.743L11.3766 13.943C11.453 14.0259 11.5458 14.092 11.6491 14.1373C11.7523 14.1825 11.8638 14.2059 11.9766 14.2059C12.0894 14.2059 12.2009 14.1825 12.3041 14.1373C12.4074 14.092 12.5002 14.0259 12.5766 13.943L19.0566 7.70296C19.1383 7.63089 19.2038 7.54225 19.2486 7.44294C19.2934 7.34363 19.3166 7.23592 19.3166 7.12696C19.3166 7.018 19.2934 6.91028 19.2486 6.81097C19.2038 6.71166 19.1383 6.62303 19.0566 6.55096L12.5766 0.262958ZM6.7206 14.951C6.79702 14.8681 6.88979 14.8019 6.99305 14.7566C7.09632 14.7114 7.20785 14.688 7.3206 14.688C7.43335 14.688 7.54488 14.7114 7.64815 14.7566C7.75142 14.8019 7.84418 14.8681 7.9206 14.951L9.1206 16.007C9.20232 16.079 9.26777 16.1677 9.3126 16.267C9.35743 16.3663 9.38062 16.474 9.38062 16.583C9.38062 16.6919 9.35743 16.7996 9.3126 16.8989C9.26777 16.9983 9.20232 17.0869 9.1206 17.159L7.0566 19.127C6.97336 19.2032 6.91673 19.3041 6.89502 19.4148C6.87331 19.5256 6.88767 19.6404 6.93599 19.7424C6.98431 19.8444 7.06404 19.9282 7.1635 19.9816C7.26295 20.035 7.37689 20.0551 7.4886 20.039H18.4326C18.6504 20.0492 18.8573 20.1372 19.0158 20.2869C19.1743 20.4366 19.2739 20.6381 19.2966 20.855V22.535C19.2739 22.7518 19.1743 22.9533 19.0158 23.103C18.8573 23.2527 18.6504 23.3407 18.4326 23.351H7.4886C7.37689 23.3348 7.26295 23.3549 7.1635 23.4083C7.06404 23.4617 6.98431 23.5455 6.93599 23.6475C6.88767 23.7495 6.87331 23.8643 6.89502 23.9751C6.91673 24.0858 6.97336 24.1867 7.0566 24.263L9.1206 26.231C9.20232 26.303 9.26777 26.3917 9.3126 26.491C9.35743 26.5903 9.38062 26.698 9.38062 26.807C9.38062 26.9159 9.35743 27.0236 9.3126 27.1229C9.26777 27.2222 9.20232 27.3109 9.1206 27.383L7.9206 28.583C7.76765 28.7354 7.56053 28.821 7.3446 28.821C7.12867 28.821 6.92155 28.7354 6.7686 28.583L0.288601 22.343C0.198557 22.271 0.12586 22.1797 0.0759009 22.0759C0.0259415 21.972 0 21.8582 0 21.743C0 21.6277 0.0259415 21.5139 0.0759009 21.4101C0.12586 21.3062 0.198557 21.2149 0.288601 21.143L6.7206 14.951Z",fill:"white"})})]}),RC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"24",height:"24",fill:"#032D60"}),m.jsx("g",{transform:"translate(1.6 2) scale(0.72)",children:m.jsx("path",{d:"M17.7091 14.928C17.2291 14.928 16.7491 15.024 16.4131 15.168L15.0211 15.456L14.3971 15.504H14.3011C14.1083 15.5001 13.9159 15.484 13.7251 15.456C12.8611 15.312 12.3331 15.12 12.3331 15.12C11.9491 14.976 11.5171 14.88 11.0371 14.832C8.3491 14.544 7.1491 15.6 7.1011 15.792C7.0531 15.984 7.3411 18.528 7.5331 18.912C7.72119 19.2621 8.02732 19.5343 8.3971 19.68C8.6851 19.824 11.1331 20.064 11.9491 19.92C12.7651 19.776 12.9091 19.536 13.1491 19.104C13.2931 18.816 13.6771 17.424 13.9171 16.608C13.9651 16.464 13.9651 16.128 14.3491 16.128C14.7331 16.176 14.7331 16.464 14.7811 16.656C14.9827 17.4986 15.2229 18.3315 15.5011 19.152C15.7411 19.584 15.8371 19.872 16.6531 19.968C17.5171 20.112 19.9651 19.92 20.2531 19.776C20.5411 19.68 20.8771 19.44 21.1171 19.056C21.3091 18.672 21.6451 16.128 21.5971 15.936C21.5491 15.744 20.3971 14.688 17.7091 14.88V14.928ZM26.1091 6.96C25.3666 5.98247 24.4946 5.11047 23.5171 4.368C24.017 4.26828 24.4669 3.99869 24.7906 3.60498C25.1143 3.21128 25.2919 2.7177 25.2931 2.208C25.2931 1.6224 25.0605 1.06079 24.6464 0.646708C24.2323 0.232628 23.6707 0 23.0851 0C22.7394 0.0111101 22.4011 0.103296 22.0975 0.269125C21.7939 0.434955 21.5336 0.66979 21.3374 0.9547C21.1412 1.23961 21.0148 1.56662 20.9682 1.90938C20.9215 2.25214 20.9561 2.60106 21.0691 2.928C19.484 2.16277 17.7792 1.67568 16.0291 1.488C13.2014 1.18107 10.3439 1.66286 7.7731 2.88C7.87793 2.55209 7.90463 2.20422 7.85108 1.86416C7.79752 1.5241 7.66519 1.20127 7.46466 0.921451C7.26413 0.641636 7.00094 0.412587 6.69612 0.252595C6.39131 0.0926041 6.0533 0.00610298 5.7091 0C5.12351 0 4.56189 0.232628 4.14781 0.646708C3.73373 1.06079 3.5011 1.6224 3.5011 2.208C3.5011 3.312 4.2691 4.176 5.2771 4.368C2.4931 6.48 0.525103 9.552 0.0931035 13.056C-0.108065 14.6873 0.017518 16.3423 0.462531 17.9246C0.907544 19.5069 1.66308 20.9847 2.6851 22.272C4.08834 24.0383 5.87838 25.4589 7.91727 26.4243C9.95617 27.3896 12.1895 27.874 14.4451 27.84C21.6451 27.84 27.8371 22.896 28.7011 16.176C28.9023 14.5447 28.7767 12.8897 28.3317 11.3074C27.8867 9.72513 27.1311 8.24728 26.1091 6.96ZM14.3971 24.048C8.9731 24.048 4.6051 20.4 4.6051 15.888C4.6051 14.544 4.9891 13.2 5.7571 12.048C5.80283 12.4118 5.89979 12.7673 6.0451 13.104C6.10138 13.2301 6.18295 13.3432 6.28476 13.4365C6.38657 13.5297 6.50644 13.601 6.63695 13.646C6.76746 13.691 6.90583 13.7088 7.04347 13.6981C7.18111 13.6874 7.31509 13.6486 7.4371 13.584C7.68259 13.4601 7.87009 13.2454 7.95973 12.9855C8.04936 12.7255 8.03407 12.4408 7.9171 12.192C7.7731 11.904 7.4371 10.992 8.2531 10.32C9.13429 11.1643 10.18 11.8179 11.3251 12.24C13.6291 12.96 15.3571 12.528 15.4051 12.528C15.5761 12.4784 15.7317 12.3864 15.8576 12.2605C15.9835 12.1346 16.0755 11.979 16.1251 11.808C16.2691 11.472 16.1731 11.088 15.9331 10.848C14.7811 9.456 14.2531 8.496 14.0131 7.872C18.6691 8.544 19.5811 12.336 19.6291 12.528C19.6865 12.7889 19.8452 13.0163 20.0702 13.1603C20.2952 13.3043 20.5681 13.3531 20.8291 13.296C21.4051 13.2 21.7411 12.624 21.6451 12.048C21.5011 11.376 21.1171 10.416 20.4451 9.456C22.7491 10.944 24.2371 13.296 24.2371 15.888C24.2371 20.4 19.8211 24.048 14.3971 24.048Z",fill:"white"})})]}),$C=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 48 48",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"48",height:"48",rx:"4",fill:"#032D60"}),m.jsx("path",{d:"M21.216 9.6001C20.016 9.6001 18.96 10.3201 18.528 11.4241L13.488 24.4321C13.104 25.3921 13.824 26.4001 14.832 26.4001H23.088L20.016 37.1521C19.728 38.1601 20.976 38.8321 21.648 38.0161L34.272 23.0401C35.088 22.1281 34.416 20.6401 33.168 20.6401H26.928L32.4 11.8081C32.976 10.8481 32.304 9.6001 31.152 9.6001H21.216Z",fill:"white"})]}),OC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"24",height:"24",fill:"#0070D2"}),m.jsx("g",{transform:"translate(4 4.5) scale(0.55)",children:m.jsx("path",{d:"M27.744 26.0433H9.984C9.408 26.0433 8.88 25.5633 8.88 24.9873V22.7313C8.88 22.1553 9.36 21.6273 9.936 21.6273H27.696C28.272 21.6273 28.8 22.1073 28.8 22.6833V24.9393C28.848 25.5153 28.368 26.0433 27.744 26.0433ZM1.104 26.0433C0.528 26.0433 0 25.5633 0 24.9873V22.7313C0 22.1553 0.48 21.6273 1.056 21.6273H3.312C3.888 21.6273 4.416 22.1073 4.416 22.6833V24.9393C4.464 25.5153 4.032 25.9953 3.456 26.0433H1.104ZM2.112 12.1713C5.376 6.55532 13.104 4.01132 18.24 6.50732L19.632 7.13132C20.112 7.37132 20.592 6.84332 20.448 6.36332L19.104 1.85132C18.96 1.37132 19.248 0.891323 19.68 0.699323L21.312 0.0753225C21.696 -0.116677 22.128 0.0753225 22.32 0.459323L22.368 0.603323L25.632 11.4993C25.776 11.9793 25.536 12.5073 25.056 12.6513L14.496 16.7793C14.112 16.9713 13.68 16.7793 13.488 16.3953L13.44 16.2513L12.912 14.5713C12.768 14.0913 13.008 13.5633 13.488 13.4193L17.808 11.6913C18.144 11.5953 18.288 11.2593 18.192 10.9233C18.144 10.7793 18.048 10.6353 17.904 10.5873L17.088 10.2033C13.104 8.23532 7.008 10.2513 4.608 14.2353C4.368 14.6193 3.504 14.7153 3.072 14.5233L2.256 13.7553C1.824 13.5633 1.872 12.6033 2.112 12.1713Z",fill:"white"})})]}),DC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"24",height:"24",fill:"#032D60"}),m.jsx("g",{transform:"translate(4.2 4.2) scale(0.54)",children:m.jsx("path",{d:"M20.448 5.712L20.352 5.616C20.016 5.28 19.44 5.328 19.152 5.712L17.856 6.96L17.808 7.008C17.472 7.344 17.472 7.92 17.856 8.208L21.216 11.568C21.312 11.664 21.408 11.808 21.408 12C21.408 12.336 21.168 12.624 20.784 12.624H8.064C7.584 12.624 7.2 13.008 7.152 13.488V15.312C7.2 15.792 7.584 16.176 8.064 16.272H20.832C20.976 16.272 21.072 16.32 21.168 16.416C21.456 16.608 21.504 17.04 21.264 17.28L17.856 20.688C17.52 21.024 17.52 21.6 17.904 21.888L19.152 23.184L19.2 23.232C19.536 23.568 20.112 23.568 20.4 23.184L28.56 15.024C28.896 14.688 28.896 14.112 28.512 13.824L20.448 5.712ZM11.376 9.072H13.152C13.632 9.072 14.064 8.64 14.064 8.16V2.4C14.064 1.056 13.008 0 11.664 0H2.4C1.056 0 0 1.056 0 2.4V26.4C0 27.744 1.056 28.8 2.4 28.8H11.664C13.008 28.8 14.064 27.744 14.064 26.4V20.736C14.064 20.256 13.632 19.824 13.152 19.824H11.376C10.896 19.824 10.464 20.256 10.464 20.736V24.288C10.464 24.768 10.032 25.2 9.552 25.2H4.512C4.032 25.2 3.6 24.768 3.6 24.288V4.512C3.6 4.032 4.032 3.6 4.512 3.6H9.552C10.032 3.6 10.464 4.032 10.464 4.512V8.16C10.464 8.64 10.848 9.072 11.376 9.072Z",fill:"white"})})]}),VC=({size:e,className:t})=>m.jsxs("svg",{...Ie(e),viewBox:"0 0 24 24",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("rect",{width:"24",height:"24",fill:"#FF4800"}),m.jsx("path",{d:"M15.5314 16.2008C15.4834 16.3208 15.3634 16.3448 15.2434 16.3448H13.8514C13.7942 16.3448 13.7392 16.3221 13.6987 16.2815C13.6582 16.241 13.6354 16.1861 13.6354 16.1288L13.6594 16.0088L13.7314 15.9368L16.8034 12.2168C16.8994 12.0968 16.9234 11.9288 16.8514 11.8088L16.8274 11.7608L13.6594 7.96881L13.6354 7.84881C13.6354 7.72881 13.7554 7.63281 13.8514 7.63281H15.2434C15.3634 7.63281 15.4834 7.65681 15.5314 7.77681L18.8194 11.7608C18.8674 11.8088 18.8674 11.9048 18.8674 11.9768L18.8194 12.2168L15.5314 16.2008ZM12.0994 16.2008C12.0514 16.3208 11.9314 16.3448 11.8114 16.3448H10.4194C10.3622 16.3448 10.3072 16.3221 10.2667 16.2815C10.2262 16.241 10.2034 16.1861 10.2034 16.1288L10.2274 16.0088L10.2994 15.9368L13.3474 12.2168C13.4434 12.0968 13.4674 11.9288 13.3954 11.8088L13.3714 11.7608L10.2274 7.96881L10.2034 7.84881C10.2034 7.72881 10.3234 7.63281 10.4194 7.63281H11.8114C11.9314 7.63281 12.0514 7.65681 12.0994 7.77681L15.3874 11.7608C15.4354 11.8088 15.4354 11.9048 15.4354 11.9768L15.3874 12.2168L12.0994 16.2008ZM8.64344 16.2008C8.59544 16.3208 8.47544 16.3448 8.35544 16.3448H5.73944C5.68215 16.3448 5.62721 16.3221 5.5867 16.2815C5.54619 16.241 5.52344 16.1861 5.52344 16.1288L5.54744 16.0088L5.61944 15.9368L8.66744 12.2168C8.76344 12.0968 8.78744 11.9288 8.71544 11.8088L8.69144 11.7608L5.57144 7.96881C5.52344 7.94481 5.52344 7.89681 5.52344 7.84881C5.52344 7.72881 5.64344 7.63281 5.73944 7.63281H8.33144C8.45144 7.63281 8.57144 7.65681 8.61944 7.77681L11.9074 11.7608C11.9554 11.8088 11.9554 11.9048 11.9554 11.9768L11.9074 12.2168L8.64344 16.2008Z",fill:"white"})]}),zC={default:"#9050E9",dark:"#2E2E2E",neutral:"#6B7281"},HC={array:m.jsx("path",{d:"M8.9065 14.9514H18.4825C18.7465 14.9514 18.9625 15.1674 18.9625 15.4314V16.3914C18.9625 16.6554 18.7465 16.8714 18.4825 16.8714H8.9065C8.6425 16.8714 8.4265 16.6554 8.4265 16.3914V15.4314C8.4265 15.1674 8.6425 14.9514 8.9065 14.9514ZM5.0425 16.8714C4.7785 16.8714 4.5625 16.6554 4.5625 16.3914V15.4314C4.5625 15.1674 4.7785 14.9514 5.0425 14.9514H6.0025C6.2665 14.9514 6.4825 15.1674 6.4825 15.4314V16.3914C6.5065 16.6314 6.3145 16.8474 6.0505 16.8714H5.0425ZM5.0425 12.5754C4.7785 12.5754 4.5625 12.3594 4.5625 12.0954V11.1354C4.5625 10.8714 4.7785 10.6554 5.0425 10.6554H6.0025C6.2665 10.6554 6.4825 10.8714 6.4825 11.1354V12.0954C6.5065 12.3354 6.3145 12.5514 6.0505 12.5754H5.0425ZM5.0425 8.27938C4.7785 8.27938 4.5625 8.06338 4.5625 7.79938V6.83938C4.5625 6.57538 4.7785 6.35938 5.0425 6.35938H6.0025C6.2665 6.35938 6.4825 6.57538 6.4825 6.83938V7.79938C6.5065 8.03938 6.3145 8.25538 6.0505 8.27938H5.0425ZM8.9065 10.6554H17.3305C17.5945 10.6554 17.8105 10.8714 17.8105 11.1354V12.0954C17.8105 12.3594 17.5945 12.5754 17.3305 12.5754H8.9065C8.6425 12.5754 8.4265 12.3594 8.4265 12.0954V11.1354C8.4265 10.8714 8.6425 10.6554 8.9065 10.6554ZM8.9065 6.38338H18.4825C18.7465 6.38338 18.9625 6.59938 18.9625 6.86338V7.82337C18.9625 8.08737 18.7465 8.30338 18.4825 8.30338H8.9065C8.6425 8.30338 8.4265 8.08737 8.4265 7.82337V6.86338C8.4265 6.59938 8.6425 6.38338 8.9065 6.38338Z",fill:"white"}),boolean:m.jsx("path",{d:"M4.79688 8.00054C4.79645 7.16328 5.12184 6.35871 5.70416 5.75712C6.28649 5.15554 7.08005 4.80415 7.91688 4.77734H15.9713C16.8118 4.80027 17.6103 5.15029 18.1967 5.75293C18.7831 6.35558 19.1113 7.16326 19.1113 8.00414C19.1113 8.84502 18.7831 9.65271 18.1967 10.2554C17.6103 10.858 16.8118 11.208 15.9713 11.2309H7.91688C7.079 11.2035 6.28472 10.8509 5.70233 10.2479C5.11994 9.64492 4.79518 8.83887 4.79688 8.00054ZM8.02248 9.80774C8.38001 9.80822 8.72965 9.70263 9.02716 9.50434C9.32467 9.30605 9.55668 9.02397 9.69383 8.69379C9.83098 8.36361 9.86711 8.00017 9.79765 7.64945C9.72819 7.29873 9.55626 6.97649 9.30361 6.72351C9.05097 6.47053 8.72896 6.29817 8.37833 6.22825C8.0277 6.15832 7.66421 6.19397 7.33385 6.33068C7.00349 6.46739 6.7211 6.69902 6.52242 6.99627C6.32373 7.29351 6.21768 7.64301 6.21768 8.00054C6.22082 8.47846 6.4119 8.93594 6.74962 9.27411C7.08734 9.61228 7.54457 9.80397 8.02248 9.80774ZM4.79688 15.9493C4.79518 15.111 5.11994 14.305 5.70233 13.702C6.28472 13.099 7.079 12.7464 7.91688 12.7189H15.9713C16.8118 12.7419 17.6103 13.0919 18.1967 13.6945C18.7831 14.2972 19.1113 15.1049 19.1113 15.9457C19.1113 16.7866 18.7831 17.5943 18.1967 18.197C17.6103 18.7996 16.8118 19.1496 15.9713 19.1725H7.91688C7.08005 19.1457 6.28649 18.7944 5.70416 18.1928C5.12184 17.5912 4.79645 16.7866 4.79688 15.9493ZM16.0913 13.6789H7.90248C7.32908 13.7245 6.79392 13.9845 6.40364 14.4071C6.01336 14.8296 5.79662 15.3837 5.79662 15.9589C5.79662 16.5342 6.01336 17.0883 6.40364 17.5108C6.79392 17.9334 7.32908 18.1933 7.90248 18.2389H16.0913C16.6647 18.1933 17.1998 17.9334 17.5901 17.5108C17.9804 17.0883 18.1971 16.5342 18.1971 15.9589C18.1971 15.3837 17.9804 14.8296 17.5901 14.4071C17.1998 13.9845 16.6647 13.7245 16.0913 13.6789ZM15.9713 17.5189C15.6611 17.5194 15.3578 17.4278 15.0997 17.2558C14.8416 17.0838 14.6404 16.8391 14.5214 16.5526C14.4025 16.2661 14.3713 15.9508 14.4317 15.6466C14.4921 15.3424 14.6414 15.0629 14.8607 14.8436C15.08 14.6242 15.3595 14.4749 15.6637 14.4145C15.968 14.3541 16.2833 14.3854 16.5697 14.5043C16.8562 14.6232 17.1009 14.8245 17.273 15.0826C17.445 15.3406 17.5366 15.644 17.5361 15.9541C17.5323 16.368 17.3663 16.7638 17.0736 17.0565C16.781 17.3491 16.3851 17.5152 15.9713 17.5189Z",fill:"white"}),currency:m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M18.2403 6.96094H5.76031C5.3784 6.96094 5.01213 7.11265 4.74208 7.3827C4.47203 7.65276 4.32031 8.01903 4.32031 8.40094V15.3609C4.32031 15.7428 4.47203 16.1091 4.74208 16.3792C5.01213 16.6492 5.3784 16.8009 5.76031 16.8009H18.2403C18.6222 16.8009 18.9885 16.6492 19.2585 16.3792C19.5286 16.1091 19.6803 15.7428 19.6803 15.3609V8.40094C19.6803 8.01903 19.5286 7.65276 19.2585 7.3827C18.9885 7.11265 18.6222 6.96094 18.2403 6.96094ZM7.44031 15.3609C7.44031 14.9154 7.26331 14.4881 6.94825 14.173C6.63319 13.8579 6.20588 13.6809 5.76031 13.6809V10.0809C6.20588 10.0809 6.63319 9.90394 6.94825 9.58888C7.26331 9.27382 7.44031 8.8465 7.44031 8.40094H16.5603C16.5603 8.8465 16.7373 9.27382 17.0524 9.58888C17.3674 9.90394 17.7947 10.0809 18.2403 10.0809V13.6809C17.7947 13.6809 17.3674 13.8579 17.0524 14.173C16.7373 14.4881 16.5603 14.9154 16.5603 15.3609H7.44031Z",fill:"white"}),m.jsx("path",{d:"M12.0003 14.1609C13.3258 14.1609 14.4003 13.0864 14.4003 11.7609C14.4003 10.4355 13.3258 9.36094 12.0003 9.36094C10.6748 9.36094 9.60031 10.4355 9.60031 11.7609C9.60031 13.0864 10.6748 14.1609 12.0003 14.1609Z",fill:"white"})]}),date:m.jsx("path",{d:"M18.2413 10.0808H5.76125C5.63395 10.0808 5.51186 10.1314 5.42184 10.2214C5.33182 10.3114 5.28125 10.4335 5.28125 10.5608V17.7608C5.28125 18.1427 5.43296 18.509 5.70302 18.779C5.97307 19.0491 6.33934 19.2008 6.72125 19.2008H17.2812C17.6632 19.2008 18.0294 19.0491 18.2995 18.779C18.5695 18.509 18.7212 18.1427 18.7212 17.7608V10.5608C18.7212 10.4335 18.6707 10.3114 18.5807 10.2214C18.4906 10.1314 18.3686 10.0808 18.2413 10.0808ZM9.60125 16.8008C9.60125 16.9281 9.55068 17.0502 9.46066 17.1402C9.37064 17.2302 9.24855 17.2808 9.12125 17.2808H8.16125C8.03395 17.2808 7.91186 17.2302 7.82184 17.1402C7.73182 17.0502 7.68125 16.9281 7.68125 16.8008V15.8408C7.68125 15.5768 7.89725 15.3608 8.16125 15.3608H9.12125C9.24855 15.3608 9.37064 15.4114 9.46066 15.5014C9.55068 15.5914 9.60125 15.7135 9.60125 15.8408V16.8008ZM9.60125 13.4408C9.60125 13.5681 9.55068 13.6902 9.46066 13.7802C9.37064 13.8702 9.24855 13.9208 9.12125 13.9208H8.16125C8.03395 13.9208 7.91186 13.8702 7.82184 13.7802C7.73182 13.6902 7.68125 13.5681 7.68125 13.4408V12.4808C7.68125 12.2168 7.89725 12.0008 8.16125 12.0008H9.12125C9.24855 12.0008 9.37064 12.0514 9.46066 12.1414C9.55068 12.2314 9.60125 12.3535 9.60125 12.4808V13.4408ZM12.9612 16.8008C12.9612 16.9281 12.9107 17.0502 12.8207 17.1402C12.7306 17.2302 12.6086 17.2808 12.4812 17.2808H11.5212C11.3939 17.2808 11.2719 17.2302 11.1818 17.1402C11.0918 17.0502 11.0412 16.9281 11.0412 16.8008V15.8408C11.0412 15.5768 11.2572 15.3608 11.5212 15.3608H12.4812C12.6086 15.3608 12.7306 15.4114 12.8207 15.5014C12.9107 15.5914 12.9612 15.7135 12.9612 15.8408V16.8008ZM12.9612 13.4408C12.9612 13.5681 12.9107 13.6902 12.8207 13.7802C12.7306 13.8702 12.6086 13.9208 12.4812 13.9208H11.5212C11.3939 13.9208 11.2719 13.8702 11.1818 13.7802C11.0918 13.6902 11.0412 13.5681 11.0412 13.4408V12.4808C11.0412 12.2168 11.2572 12.0008 11.5212 12.0008H12.4812C12.6086 12.0008 12.7306 12.0514 12.8207 12.1414C12.9107 12.2314 12.9612 12.3535 12.9612 12.4808V13.4408ZM16.3212 16.8008C16.3212 16.9281 16.2707 17.0502 16.1807 17.1402C16.0906 17.2302 15.9686 17.2808 15.8412 17.2808H14.8812C14.7539 17.2808 14.6319 17.2302 14.5418 17.1402C14.4518 17.0502 14.4012 16.9281 14.4012 16.8008V15.8408C14.4012 15.5768 14.6172 15.3608 14.8812 15.3608H15.8412C15.9686 15.3608 16.0906 15.4114 16.1807 15.5014C16.2707 15.5914 16.3212 15.7135 16.3212 15.8408V16.8008ZM16.3212 13.4408C16.3212 13.5681 16.2707 13.6902 16.1807 13.7802C16.0906 13.8702 15.9686 13.9208 15.8412 13.9208H14.8812C14.7539 13.9208 14.6319 13.8702 14.5418 13.7802C14.4518 13.6902 14.4012 13.5681 14.4012 13.4408V12.4808C14.4012 12.2168 14.6172 12.0008 14.8812 12.0008H15.8412C15.9686 12.0008 16.0906 12.0514 16.1807 12.1414C16.2707 12.2314 16.3212 12.3535 16.3212 12.4808V13.4408ZM17.2812 6.24078H16.0813V5.76078C16.0813 5.23278 15.6493 4.80078 15.1213 4.80078C14.5933 4.80078 14.1613 5.23278 14.1613 5.76078V6.24078H9.84125V5.76078C9.84125 5.23278 9.40925 4.80078 8.88125 4.80078C8.35325 4.80078 7.92125 5.23278 7.92125 5.76078V6.24078H6.72125C6.33934 6.24078 5.97307 6.39249 5.70302 6.66255C5.43296 6.9326 5.28125 7.29887 5.28125 7.68078V8.16078C5.28125 8.42478 5.49725 8.64078 5.76125 8.64078H18.2413C18.3686 8.64078 18.4906 8.59021 18.5807 8.50019C18.6707 8.41018 18.7212 8.28808 18.7212 8.16078V7.68078C18.7212 7.29887 18.5695 6.9326 18.2995 6.66255C18.0294 6.39249 17.6632 6.24078 17.2812 6.24078Z",fill:"white"}),id:m.jsx("path",{d:"M17.0129 9.52931C17.7569 9.52931 19.1969 8.92931 19.1969 6.98531C19.1969 5.04131 17.8049 4.94531 17.3729 4.94531C16.5089 4.94531 15.6689 5.56931 14.9249 6.84131L13.3409 9.60131H13.3169L12.9089 7.58531C12.7649 6.79331 11.8289 5.04131 9.90887 5.04131C7.98887 5.04131 6.23688 6.14531 6.23688 6.14531C6.0082 6.31506 5.84888 6.56202 5.78852 6.84034C5.72815 7.11866 5.77084 7.40943 5.90865 7.65866C6.04646 7.90789 6.27003 8.09864 6.53784 8.1955C6.80566 8.29236 7.09953 8.28874 7.36488 8.18531C7.36488 8.18531 8.82887 7.36931 9.14087 8.18531L9.40487 9.00131C9.78887 10.2493 10.1249 11.7373 10.4129 13.0813L9.16488 14.9053C9.16488 14.9053 7.74887 14.4013 7.00487 14.4013C6.26087 14.4013 4.79688 15.0013 4.79688 16.9453C4.79688 18.8893 6.18887 18.9853 6.62088 18.9853C7.48487 18.9853 8.32487 18.3613 9.06887 17.0893L10.6529 14.3293C10.8929 15.5293 11.1089 16.4893 11.2289 16.8733C11.7089 18.2413 12.8129 19.0573 14.2769 19.0573C14.2769 19.0573 15.7889 19.0573 17.5649 18.0493C17.9969 17.8813 18.3089 17.4493 18.3089 16.9693C18.3089 16.3213 17.7809 15.7933 17.1329 15.7933C16.9409 15.7933 16.7729 15.8413 16.6289 15.9133C16.6289 15.9133 15.3569 16.6333 14.9249 16.0573C14.6129 15.4573 14.3489 14.6893 14.1569 13.7293L13.5569 10.8733L14.8289 9.02531C14.8529 9.02531 16.2689 9.52931 17.0129 9.52931Z",fill:"white"}),knowledge:m.jsx("path",{d:"M7.68031 14.1595H10.8003C10.9276 14.1595 11.0497 14.109 11.1397 14.0189C11.2297 13.9289 11.2803 13.8068 11.2803 13.6795V6.47953C11.2803 5.95153 10.8003 5.51953 10.3203 5.51953H7.75231C7.44031 5.51953 7.20031 5.75953 7.20031 6.07153V13.6795C7.20031 13.9435 7.41631 14.1595 7.68031 14.1595ZM18.2403 6.95953V14.6395C18.2403 14.8941 18.1392 15.1383 17.9591 15.3184C17.7791 15.4984 17.5349 15.5995 17.2803 15.5995H6.72031C6.4657 15.5995 6.22152 15.4984 6.04149 15.3184C5.86146 15.1383 5.76031 14.8941 5.76031 14.6395V6.95953C5.3784 6.95953 5.01213 7.11124 4.74208 7.3813C4.47203 7.65135 4.32031 8.01762 4.32031 8.39953V15.5995C4.32031 15.9814 4.47203 16.3477 4.74208 16.6178C5.01213 16.8878 5.3784 17.0395 5.76031 17.0395H10.3203C10.5843 17.0395 10.8003 17.2555 10.8003 17.5195C10.8003 17.7835 11.0163 17.9995 11.2803 17.9995H12.7203C12.9843 17.9995 13.2003 17.7835 13.2003 17.5195C13.2003 17.2555 13.4163 17.0395 13.6803 17.0395H18.2403C18.6222 17.0395 18.9885 16.8878 19.2585 16.6178C19.5286 16.3477 19.6803 15.9814 19.6803 15.5995V8.39953C19.6803 8.01762 19.5286 7.65135 19.2585 7.3813C18.9885 7.11124 18.6222 6.95953 18.2403 6.95953ZM13.2003 14.1595H16.2483C16.5603 14.1595 16.8003 13.9195 16.8003 13.6075V5.99953C16.8003 5.87223 16.7497 5.75014 16.6597 5.66012C16.5697 5.5701 16.4476 5.51953 16.3203 5.51953H13.6803C13.2003 5.51953 12.7203 5.95153 12.7203 6.47953V13.6795C12.7203 13.9435 12.9363 14.1595 13.2003 14.1595Z",fill:"white"}),number:m.jsx("path",{d:"M17.7569 19.2008H6.23688C5.44488 19.2008 4.79688 18.5528 4.79688 17.7608V6.24078C4.79688 5.44878 5.44488 4.80078 6.23688 4.80078H17.7569C18.5489 4.80078 19.1969 5.44878 19.1969 6.24078V17.7608C19.1969 18.5528 18.5489 19.2008 17.7569 19.2008ZM6.74088 7.20078V16.8008C6.74088 17.0648 6.95688 17.2808 7.22088 17.2808H16.7969C17.0609 17.2808 17.2769 17.0648 17.2769 16.8008V7.20078C17.2769 6.93678 17.0609 6.72078 16.7969 6.72078H7.22088C6.95688 6.72078 6.74088 6.93678 6.74088 7.20078ZM15.1169 10.2728H14.2289L14.6129 8.80878V8.78478C14.6129 8.73678 14.5649 8.66478 14.4929 8.66478H13.7969C13.7489 8.66478 13.7009 8.71278 13.6769 8.76078L13.2929 10.2728H11.5169L11.9009 8.80878V8.78478C11.9009 8.73678 11.8529 8.66478 11.7809 8.66478H11.0849C11.0369 8.66478 10.9889 8.71278 10.9649 8.76078L10.5809 10.2728H9.59688C9.54888 10.2728 9.50087 10.2968 9.47687 10.3448L9.30888 11.0168V11.0408C9.30888 11.0888 9.35687 11.1608 9.42887 11.1608H10.3649L9.93288 12.8648H8.97288C8.92488 12.8648 8.87688 12.8888 8.85288 12.9368L8.68488 13.6088V13.6328C8.68488 13.6808 8.73287 13.7528 8.80487 13.7528H9.69287L9.30888 15.2408V15.2648C9.30888 15.3128 9.35687 15.3848 9.42887 15.3848H10.1249C10.1729 15.3848 10.2209 15.3608 10.2449 15.2888L10.6289 13.7528H12.3809L11.9969 15.1928V15.2168C11.9969 15.2648 12.0449 15.3368 12.1169 15.3368H12.8129C12.8609 15.3368 12.9089 15.3128 12.9329 15.2408L13.3169 13.7048H14.3009C14.3489 13.7048 14.3969 13.6808 14.4209 13.6088L14.5889 12.9368V12.9128C14.5889 12.8648 14.5409 12.7928 14.4689 12.7928H13.5569L13.9889 11.0888H14.9249C14.9729 11.0888 15.0209 11.0648 15.0449 10.9928L15.2129 10.3208C15.2369 10.2968 15.1889 10.2728 15.1169 10.2728ZM12.6449 12.8648H10.8689L11.3009 11.1608H13.0529L12.6449 12.8648Z",fill:"white"}),object:m.jsx("path",{d:"M12.7234 12.6238V18.4798C12.7234 18.6718 12.9154 18.7678 13.0834 18.6958L17.7394 16.0558C18.1954 15.7918 18.4834 15.3118 18.4834 14.7838V9.52776C18.4834 9.33576 18.2914 9.23976 18.1234 9.31176L12.9634 12.2158C12.8194 12.3118 12.7234 12.4558 12.7234 12.6238ZM12.2434 10.9918L17.4274 8.08776C17.5954 7.99176 17.5954 7.77576 17.4274 7.67976L12.7474 5.01576C12.5212 4.88516 12.2646 4.81641 12.0034 4.81641C11.7422 4.81641 11.4856 4.88516 11.2594 5.01576L6.57944 7.67976C6.41144 7.77576 6.41144 7.99176 6.57944 8.08776L11.7634 10.9918C11.9074 11.0638 12.0994 11.0638 12.2434 10.9918ZM11.0434 12.2158L5.88344 9.31176C5.71544 9.21576 5.52344 9.33576 5.52344 9.52776V14.7598C5.52344 15.2878 5.81144 15.7678 6.26744 16.0318L10.9234 18.6718C11.0914 18.7678 11.2834 18.6478 11.2834 18.4558V12.6238C11.2834 12.4558 11.1874 12.3118 11.0434 12.2158Z",fill:"white"}),text:m.jsx("path",{d:"M19.178 18.6968C19.106 17.7128 19.082 16.7048 19.082 15.7208L19.106 14.2328C19.106 13.7768 19.154 13.3208 18.986 12.8888C18.602 11.9048 17.306 11.7128 16.37 11.7128C15.5402 11.7267 14.7225 11.9148 13.97 12.2648L14.282 13.0328C14.354 13.1768 14.378 13.3448 14.402 13.4888C15.026 13.2008 15.65 13.0328 16.274 13.0328C17.258 13.0328 17.738 13.4168 17.738 14.1848V14.5448L17.042 14.5208C15.794 14.5208 14.858 14.7128 14.186 15.0728C13.538 15.4568 13.202 16.1048 13.202 17.0408C13.202 17.7368 13.418 18.2888 13.85 18.6728C14.282 19.0568 14.834 19.2488 15.482 19.2488C16.058 19.2488 16.538 19.1768 16.898 19.0088C17.258 18.8408 17.57 18.6008 17.81 18.2648H17.858L17.978 19.0808H19.178V18.6968ZM17.762 16.2728C17.762 16.4408 17.738 16.6088 17.666 16.7768C17.618 16.8968 17.57 17.0168 17.474 17.1368C17.155 17.5274 16.7011 17.7843 16.202 17.8568C15.89 17.9048 15.602 17.8808 15.29 17.8328C15.05 17.7848 14.81 17.6648 14.69 17.4488C14.474 17.1128 14.522 16.5848 14.762 16.2728C14.906 16.0808 15.122 15.9608 15.338 15.8888C15.938 15.6968 16.634 15.6968 17.234 15.6968L17.762 15.7208V16.2728ZM13.178 13.5128L9.77 5.06478C9.722 4.89678 9.578 4.80078 9.41 4.80078H8.33C8.162 4.80078 7.994 4.92078 7.946 5.06478L4.826 13.5128C4.754 13.6808 4.874 13.8728 5.042 13.8728H6.242C6.41 13.8728 6.578 13.7288 6.626 13.5608L7.418 11.3528H10.49L11.378 13.5608C11.426 13.7288 11.594 13.8728 11.762 13.8728H12.938C13.13 13.8728 13.274 13.6808 13.178 13.5128ZM8.042 9.69678L8.93 7.39278L9.914 9.69678H8.042Z",fill:"white"}),timestamp:m.jsx("path",{d:"M11.9969 4.80078C8.03688 4.80078 4.79688 8.04078 4.79688 12.0008C4.79688 15.9608 8.03688 19.2008 11.9969 19.2008C15.9569 19.2008 19.1969 15.9608 19.1969 12.0008C19.1969 8.04078 15.9569 4.80078 11.9969 4.80078ZM11.9969 17.7608C8.82888 17.7608 6.23688 15.1688 6.23688 12.0008C6.23688 8.83278 8.82888 6.24078 11.9969 6.24078C15.1649 6.24078 17.7569 8.83278 17.7569 12.0008C17.7569 15.1688 15.1649 17.7608 11.9969 17.7608ZM12.7169 11.7128V8.64078C12.7169 8.37678 12.5009 8.16078 12.2369 8.16078H11.7569C11.4929 8.16078 11.2769 8.37678 11.2769 8.64078V12.0008C11.2769 12.1928 11.3489 12.3848 11.4929 12.5048L13.7969 14.8088C13.9889 15.0008 14.2769 15.0008 14.4689 14.8088L14.8049 14.4728C14.9969 14.2808 14.9969 13.9928 14.8049 13.8008L12.7169 11.7128Z",fill:"white"}),system:m.jsx("path",{d:"M11.7089 18.1453C11.7089 17.2573 12.1409 16.5853 12.7169 16.2013V15.3133C12.4049 15.0973 12.1649 14.7853 12.0689 14.4253C11.9489 13.9213 12.1169 13.3453 12.4289 12.9373L12.6929 12.6493C13.3993 12.1584 14.233 11.8833 15.0929 11.8573C15.7409 11.8573 16.3169 12.1213 16.7249 12.5053C17.3009 11.9293 17.9009 11.8093 18.2609 11.8093C18.5969 11.8093 18.9089 11.8813 19.1969 12.0253V11.9773C19.1969 8.01734 15.9569 4.77734 11.9969 4.77734C8.03688 4.77734 4.79688 8.04134 4.79688 12.0013C4.79688 15.9373 8.01287 19.1773 11.9489 19.2013C11.7809 18.8893 11.7089 18.5533 11.7089 18.1453ZM17.7089 11.2813H15.8129C15.7409 9.57734 15.3569 8.08934 14.7809 6.96134C16.3649 7.84934 17.4689 9.43334 17.7089 11.2813ZM12.7169 6.55334C13.5329 7.24934 14.2529 9.02534 14.3729 11.2813H12.7169V6.55334ZM6.28488 12.7213H8.18088C8.25288 14.4253 8.63687 15.9133 9.21287 17.0413C8.42165 16.5996 7.74476 15.9789 7.23634 15.2287C6.72792 14.4786 6.40208 13.6199 6.28488 12.7213ZM8.18088 11.2813H6.28488C6.52488 9.43334 7.62887 7.84934 9.21287 6.96134C8.63687 8.08934 8.27688 9.57734 8.18088 11.2813ZM11.2769 17.4493C10.4609 16.7533 9.74087 14.9773 9.62087 12.7213H11.2769V17.4493ZM11.2769 11.2813H9.62087C9.74087 9.02534 10.4609 7.24934 11.2769 6.55334V11.2813ZM18.1169 14.9773C18.4289 14.9773 19.0529 14.7133 19.0529 13.8973C19.0529 13.0813 18.4529 13.0333 18.2849 13.0333C17.9249 13.0333 17.5649 13.2973 17.2529 13.8493L16.5569 15.0253H16.5329L16.3649 14.1613C16.2929 13.8253 15.9089 13.0813 15.0929 13.0813C14.2769 13.0813 13.5329 13.5613 13.5329 13.5613C13.4381 13.6183 13.3647 13.7048 13.3239 13.8076C13.2832 13.9104 13.2774 14.0238 13.3074 14.1302C13.3374 14.2366 13.4016 14.3302 13.49 14.3966C13.5785 14.4629 13.6863 14.4983 13.7969 14.4973L14.0129 14.4493C14.0129 14.4493 14.6369 14.1133 14.7569 14.4493L14.8769 14.7853C15.0449 15.3133 15.1889 15.9613 15.3089 16.5373L14.7569 17.2813C14.7569 17.2813 14.1569 17.0653 13.8449 17.0653C13.5329 17.0653 12.9089 17.3293 12.9089 18.1453C12.9089 18.9613 13.5089 19.0093 13.6769 19.0093C14.0369 19.0093 14.3969 18.7453 14.7089 18.1933L15.3809 17.0173L15.6209 18.0973C15.8369 18.6733 16.2929 19.0333 16.9169 19.0333C16.9169 19.0333 17.5649 19.0333 18.3089 18.6013C18.5009 18.5293 18.6209 18.3373 18.6209 18.1453C18.6209 17.8813 18.4049 17.6413 18.1169 17.6413L17.9009 17.6893C17.9009 17.6893 17.3489 18.0013 17.1809 17.7613C17.0369 17.5213 16.9409 17.1853 16.8449 16.7533L16.5809 15.5293L17.1329 14.7373C17.2049 14.7613 17.8049 14.9773 18.1169 14.9773Z",fill:"white"})},ae=(e,t)=>({size:r,className:i})=>m.jsxs("svg",{...Ie(r),viewBox:"0 0 24 24",fill:"none",className:i,"aria-hidden":!0,children:[m.jsx("rect",{width:"24",height:"24",fill:zC[t]}),HC[e]]}),FC=ae("array","default"),BC=ae("boolean","default"),WC=ae("currency","default"),UC=ae("date","default"),v3=ae("id","default"),ZC=ae("knowledge","default"),YC=ae("number","default"),GC=ae("object","default"),Pf=ae("text","default"),XC=ae("timestamp","default"),KC=ae("system","default"),QC=ae("array","dark"),qC=ae("boolean","dark"),JC=ae("currency","dark"),e_=ae("date","dark"),t_=ae("id","dark"),n_=ae("knowledge","dark"),r_=ae("number","dark"),i_=ae("object","dark"),Af=ae("text","dark"),o_=ae("timestamp","dark"),s_=ae("system","dark"),l_=ae("array","neutral"),a_=ae("boolean","neutral"),u_=ae("currency","neutral"),c_=ae("date","neutral"),d_=ae("id","neutral"),f_=ae("knowledge","neutral"),h_=ae("number","neutral"),p_=ae("object","neutral"),Rf=ae("text","neutral"),g_=ae("timestamp","neutral"),m_=ae("system","neutral"),Kr=({size:e,className:t})=>m.jsx("svg",{width:e??12,height:e??12,viewBox:"0 0 12 12",fill:"none",className:t,"aria-hidden":!0,children:m.jsx("path",{d:"M4.5 2.5L8 6L4.5 9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),y_=({size:e,className:t})=>m.jsxs("svg",{width:e??14,height:e??14,viewBox:"0 0 16 16",fill:"none",className:t,"aria-hidden":!0,children:[m.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.25",fill:"none"}),m.jsx("circle",{cx:"8",cy:"4.75",r:"0.9",fill:"currentColor"}),m.jsx("path",{d:"M8 7.25V11.75",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]});function po(e){switch(e){case"apex":return _C;case"flow":return EC;case"prompt":return TC;case"mcp":return kC;case"knowledge":return jC;case"retriever":return SC;case"mulesoft":return IC;case"quickaction":return MC;case"runexpressionset":return NC;case"placeholder":return LC;case"external":return DC;case"transition":return OC;case"setvar":return v3;case"slack":case"standard-invocable":return PC;case"escalate":return VC;case"end-session":return bC;case"subagent":case"subagent-util":return AC;case"connected-subagent":return RC;default:return $C}}function go(e,t){const n=(t==null?void 0:t.dark)??!1,r=!n&&((t==null?void 0:t.neutral)??!1);switch(e){case"string":return n?Af:r?Rf:Pf;case"number":return n?r_:r?h_:YC;case"boolean":return n?qC:r?a_:BC;case"date":return n?e_:r?c_:UC;case"timestamp":return n?o_:r?g_:XC;case"id":return n?t_:r?d_:v3;case"object":return n?i_:r?p_:GC;case"array":return n?QC:r?l_:FC;case"currency":return n?JC:r?u_:WC;case"knowledge":return n?n_:r?f_:ZC;case"system":return n?s_:r?m_:KC;case"unknown":default:return n?Af:r?Rf:Pf}}function Fn(e){return e.replace(/_/g," ").trim()}function Jn(e){if(!e||typeof e!="string")return{glyph:"Aa",kind:"unknown"};const t=e.toLowerCase();return t.startsWith("list")||t.includes("array")?{glyph:"☰",kind:"array"}:t.includes("string")?{glyph:"Aa",kind:"string"}:t.includes("number")||t.includes("int")||t.includes("float")?{glyph:"⌗",kind:"number"}:t.includes("bool")?{glyph:"◐",kind:"boolean"}:t.includes("timestamp")||t.includes("datetime")?{glyph:"◷",kind:"timestamp"}:t.includes("date")?{glyph:"▦",kind:"date"}:t.includes("currency")||t.includes("money")?{glyph:"◉",kind:"currency"}:t.includes("id")?{glyph:"✺",kind:"id"}:t.includes("object")?{glyph:"⛁",kind:"object"}:{glyph:"✦",kind:"generic"}}const v_=[{match:e=>e==="@utils.setvariables",glyph:"Aa",kind:"setvar"},{match:e=>e==="@utils.invokesubagent",glyph:"⇢",kind:"subagent-util"},{match:e=>e.startsWith("@connected_subagent."),glyph:"#",kind:"connected-subagent"},{match:e=>e.startsWith("@subagent.")||e.startsWith("@topic."),glyph:"#",kind:"subagent"},{match:e=>e==="@utils.escalate",glyph:"Aa",kind:"escalate"},{match:e=>e==="@utils.end_session",glyph:"Aa",kind:"end-session"},{match:e=>e.startsWith("@utils.transition"),glyph:"⚙",kind:"transition"},{match:e=>e.startsWith("@utils."),glyph:"⚙",kind:"util"},{match:e=>e.startsWith("@actions."),glyph:"↪",kind:"ref"},{match:e=>e.startsWith("flow://"),glyph:"≋",kind:"flow"},{match:e=>e.startsWith("apex://")||e.startsWith("apex-class://")||e.startsWith("apex-rest://"),glyph:">_",kind:"apex"},{match:e=>e.startsWith("prompt://"),glyph:"✦",kind:"prompt"},{match:e=>e.startsWith("generatepromptresponse://"),glyph:"✦",kind:"prompt"},{match:e=>e.startsWith("knowledge://"),glyph:"◫",kind:"knowledge"},{match:e=>e.startsWith("standardinvocableaction://"),glyph:"⚡",kind:"standard-invocable"},{match:e=>e.startsWith("slack://"),glyph:"⚡",kind:"standard-invocable"},{match:e=>e.startsWith("mulesoft://"),glyph:"∞",kind:"mulesoft"},{match:e=>e.startsWith("heroku://"),glyph:"∞",kind:"heroku"},{match:e=>e.startsWith("placeholder://"),glyph:"∞",kind:"placeholder"},{match:e=>e.startsWith("quickaction://"),glyph:"∞",kind:"quickaction"},{match:e=>e.startsWith("runexpressionset://"),glyph:"∞",kind:"runexpressionset"},{match:e=>e.startsWith("externalconnector://")||e.startsWith("externalservice://"),glyph:"⌘",kind:"external"},{match:e=>e.startsWith("retriever://"),glyph:"⌘",kind:"retriever"},{match:e=>e.startsWith("agent://")||e.startsWith("subagent://"),glyph:"#",kind:"subagent"},{match:e=>e.startsWith("topic://"),glyph:"◎",kind:"subagent"},{match:e=>e.startsWith("mcptool://"),glyph:"⊞",kind:"mcp"}];function mo(e){if(!e||typeof e!="string")return{glyph:"▶",kind:"generic"};const t=e.toLowerCase();for(const n of v_)if(n.match(t))return{glyph:n.glyph,kind:n.kind};return{glyph:"▶",kind:"generic"}}function w_(e,t,n){switch(e.namespace){case"variables":{const r=Object.prototype.hasOwnProperty.call(t,e.root)?t[e.root]:void 0,i=Jn(r);return{glyph:i.glyph,cssMod:`var var-${i.kind}`,iconKind:i.kind,iconFamily:"var"}}case"subagent":case"topic":return{glyph:"#",cssMod:"subagent"};case"system_variables":return{glyph:"🌐",cssMod:"var var-system",iconKind:"system",iconFamily:"var"};case"actions":case"action":{const r=Object.prototype.hasOwnProperty.call(n,e.root)?n[e.root]:void 0,i=mo(r);return{glyph:i.glyph,cssMod:`step action-${i.kind}`,iconKind:i.kind,iconFamily:"action"}}default:return{glyph:"@",cssMod:"var"}}}function Zc({path:e,variableTypes:t,actionTargets:n,actionNames:r,onSelectAction:i,forceVarKind:o,labelByName:s,useDark:l}){const a=ho(e);if(!a)return m.jsx("span",{className:"agent-chip agent-chip--var",children:e});const u=a.namespace==="actions"||a.namespace==="action";let c=a;if(u){const g=Object.prototype.hasOwnProperty.call(n,a.root)?n[a.root]:void 0,w=typeof g=="string"?g.match(/^@actions?\.([\w.]+)$/):null;if(w){const k=w[1],C=k.split(".")[0];c={namespace:a.namespace,root:C,path:k}}}const d=w_(c,t,n),f=o?{glyph:Jn(o).glyph,cssMod:`var var-${o}`,iconKind:o,iconFamily:"var"}:d;let h=c.path;const y=a.namespace==="actions"||a.namespace==="action",x=y?c.root:a.root;if(y){const g=s==null?void 0:s.get(x);g&&(h=g)}const _=f.iconFamily==="var"&&f.iconKind?go(f.iconKind,{dark:l}):f.iconFamily==="action"&&f.iconKind?po(f.iconKind):null,v=_?m.jsx(_,{size:14}):f.glyph,p=`agent-chip__icon${_?" agent-chip__icon--svg":""}`;return y&&(r!=null&&r.has(x))&&i?m.jsxs("button",{type:"button",className:`agent-chip agent-chip--${f.cssMod} agent-chip--clickable`,onClick:()=>i(x),title:`Open ${x}`,children:[m.jsx("span",{className:p,"aria-hidden":!0,children:v}),h]}):m.jsxs("span",{className:`agent-chip agent-chip--${f.cssMod}`,children:[m.jsx("span",{className:p,"aria-hidden":!0,children:v}),h]})}function w3(e){return Jn(e).kind}function Yc({tooltip:e}){const t=V.useId(),[n,r]=V.useState(!1),i=l=>{l.key==="Escape"&&(l.stopPropagation(),l.nativeEvent.stopImmediatePropagation(),r(!0))},o=()=>{n&&r(!1)},s=()=>{r(!1)};return m.jsxs("button",{type:"button",className:"agent-detail-card__info","aria-label":"More info","aria-describedby":t,"data-hide-tooltip":n?"true":void 0,onClick:l=>l.stopPropagation(),onKeyDown:i,onPointerLeave:o,onBlur:s,children:[m.jsx("span",{className:"agent-detail-card__info-glyph","aria-hidden":!0,children:m.jsx(y_,{})}),m.jsx("div",{id:t,className:"agent-detail-card__info-tooltip nowheel",children:e})]})}const Js={ACTIONS:"Defines the actions the agent can invoke based on the user request and reasoning instructions. Customize action inputs and outputs, filters, and post-run logic.","BEFORE REASONING":"Runs before each incoming message before any reasoning instructions or actions are applied.",REASONING:"Instructions tell your agent what to do and how to reply. Inline actions, such as conditionals or setting variables, run before any LLM reasoning.","AFTER REASONING":"Runs after reasoning and actions are completed, before the response is sent to the user."};function x_({actions:e,selectedAction:t,onSelect:n,onClear:r}){const[i,o]=V.useState(!0);return m.jsxs("div",{className:`agent-detail-card agent-detail-card--actions${i?" agent-detail-card--open":""}`,children:[m.jsxs("button",{type:"button",className:"agent-detail-card__collapsible-header","aria-expanded":i,onClick:()=>o(s=>!s),children:[m.jsx("span",{className:"agent-detail-card__chevron","aria-hidden":!0,children:m.jsx(Kr,{})}),m.jsx("span",{className:"agent-detail-card__badge-text",role:"heading","aria-level":2,"data-mv-id":xt("actions"),children:"ACTIONS"}),m.jsx(Yc,{tooltip:Js.ACTIONS})]}),i&&m.jsx("div",{className:"agent-detail-actions-pills",children:e.map(s=>{const l=s.name===t,a=mo(s.target),u=po(a.kind);return m.jsxs("button",{type:"button",className:`agent-detail-actions-pill${l?" agent-detail-actions-pill--selected":""}`,"data-mv-id":l3(s.name),onClick:()=>n(s.name),"aria-pressed":l,title:s.name,children:[m.jsx("span",{className:`agent-detail-actions-pill__icon agent-detail-actions-pill__icon--${a.kind} agent-detail-actions-pill__icon--svg`,"aria-hidden":!0,children:m.jsx(u,{size:18})}),m.jsx("span",{className:"agent-detail-actions-pill__label",children:s.label??s.name}),l&&m.jsx("button",{type:"button",className:"agent-detail-actions-pill__clear","aria-label":"Clear selection",onClick:c=>{c.stopPropagation(),r()},children:m.jsx("span",{"aria-hidden":!0,children:"×"})})]},s.name)})})]})}function C_({action:e,onClose:t}){const n=mo(e.target),r=po(n.kind);return m.jsxs("aside",{className:"agent-detail-action-card",role:"complementary","aria-label":`Action ${e.name}`,children:[m.jsxs("div",{className:"agent-detail-action-card__header",children:[m.jsx("span",{className:`agent-detail-action-card__icon agent-detail-action-card__icon--${n.kind} agent-detail-action-card__icon--svg`,"aria-hidden":!0,children:m.jsx(r,{size:28})}),m.jsxs("div",{className:"agent-detail-action-card__heading-group",children:[m.jsx("h2",{className:"agent-detail-action-card__title","data-mv-id":On(e.name,"title"),children:e.label??e.name}),m.jsx("div",{className:"agent-detail-action-card__subtitle",children:e.name})]}),m.jsx("button",{type:"button",className:"agent-detail-action-card__close","aria-label":"Close",onClick:t,children:m.jsx("span",{"aria-hidden":!0,children:"×"})})]}),m.jsxs("div",{className:"agent-detail-action-card__body",children:[m.jsx("div",{className:"agent-detail-action-card__name","data-mv-id":On(e.name,"name"),children:e.name}),e.target&&m.jsxs("div",{className:"agent-detail-action-card__target","data-mv-id":u3(e.name),children:[m.jsx("span",{"aria-hidden":!0,children:"◎"}),m.jsx("span",{className:"agent-detail-action-card__target-label",children:"TARGET"}),m.jsx("span",{className:"agent-detail-action-card__target-value",children:e.target})]}),m.jsx($f,{label:"INPUTS",icon:"↓",params:e.inputs,actionName:e.name,direction:"input"}),m.jsx($f,{label:"OUTPUTS",icon:"↑",params:e.outputs,actionName:e.name,direction:"output"})]})]})}function $f({label:e,icon:t,params:n,actionName:r,direction:i}){if(n.length===0)return null;const o=On(r,i==="input"?"inputs":"outputs");return m.jsxs("div",{className:"agent-detail-card__params",children:[m.jsxs("div",{className:"agent-detail-card__section-label","data-mv-id":o,children:[m.jsx("span",{"aria-hidden":!0,children:t})," ",e]}),m.jsx("div",{className:"agent-detail-card__param-pills",children:n.map(s=>{const l=w3(s.type),a=go(l,{neutral:!0}),u=c3(r,i,s.name);return m.jsxs("span",{className:`agent-detail-param-pill agent-detail-param-pill--${l}`,title:s.label??s.name,"data-mv-id":u,children:[m.jsx("span",{className:"agent-detail-param-pill__icon agent-detail-param-pill__icon--svg","aria-hidden":!0,children:m.jsx(a,{size:16})}),m.jsx("span",{className:"agent-detail-param-pill__name",children:s.name}),s.type&&m.jsx("span",{className:"agent-detail-param-pill__type",children:s.type})]},s.name)})})]})}function Ue({inline:e,actionNames:t,labelByName:n,onSelectAction:r,variableTypes:i,actionTargets:o}){return m.jsx(m.Fragment,{children:e.map((s,l)=>{switch(s.kind){case"text":return m.jsx(J.Fragment,{children:s.text},l);case"bold":return m.jsx("strong",{children:m.jsx(Ue,{inline:s.children,actionNames:t,labelByName:n,onSelectAction:r,variableTypes:i,actionTargets:o})},l);case"arrow":return m.jsxs("span",{className:"agent-detail-flow__arrow","aria-hidden":!0,children:[" ","→"," "]},l);case"varRef":return m.jsx(Zc,{path:s.path,variableTypes:i,actionTargets:o,actionNames:t,onSelectAction:r,labelByName:n},l);case"ident":{if(t.has(s.name)){const u=n.get(s.name)??Fn(s.name);return m.jsxs("button",{type:"button",className:"agent-chip agent-chip--step agent-chip--clickable",onClick:()=>r(s.name),title:`Open ${s.name}`,children:[m.jsx("span",{"aria-hidden":!0,children:"▶"})," ",u]},l)}return m.jsx("span",{className:"agent-chip agent-chip--var",children:s.name},l)}default:Uc(s)}})})}function Ml({text:e,ctx:t,forceVarKind:n,useDark:r}){var a;if(e.startsWith("@"))return m.jsx(Zc,{path:e,variableTypes:t.variableTypes,actionTargets:t.actionTargets,actionNames:t.actionNames,onSelectAction:t.onSelectAction,forceVarKind:n,labelByName:t.labelByName,useDark:r});const i=((a=ho(`@x.${e}`))==null?void 0:a.root)??e.split(".")[0],o=t.variableTypes[i],s=n?{kind:n,glyph:Jn(n).glyph}:Jn(o),l=go(s.kind,{dark:r});return m.jsxs("span",{className:`agent-chip agent-chip--var var-${s.kind}`,children:[m.jsx("span",{className:"agent-chip__icon agent-chip__icon--svg","aria-hidden":!0,children:m.jsx(l,{size:14})}),e]})}function Gc({text:e,isString:t,ctx:n,forceVarKind:r,useDark:i}){const o=/@\w/.test(e),s=/@actions?\./.test(e),l=/^@[\w.]+$/.test(e.trim());if(t&&o||o&&(s||!l)){const u=t?`"${e}"`:e;return m.jsx("span",{className:"agent-detail-flow__inline-rhs",children:m.jsx(Ue,{inline:$e(u),...n})})}return t?m.jsx("span",{className:"agent-chip agent-chip--value",children:`"${e}"`}):e.startsWith("@")?m.jsx(Ml,{text:e,ctx:n,forceVarKind:r,useDark:i}):m.jsx("span",{className:"agent-chip agent-chip--value",children:e})}const x3=V.createContext(null);function Xc(e){const t=V.useContext(x3);if(!t)throw new Error("useOpenCard must be used within OpenCardsContext.Provider");return[t.isOpen(e),()=>t.toggle(e)]}function Kc(e,t){if(e.group)return e.group.some(i=>Kc(i,t));const n=e.left;if(!n)return!1;if(/^@(?:system_)?variables\.\w/.test(n))return!0;if(n.startsWith("@"))return!1;const r=n.split(".")[0];return Object.prototype.hasOwnProperty.call(t,r)}function C3({block:e,ctx:t,renderNonIf:n}){return m.jsxs("div",{className:"agent-detail-ifcard__body",children:[e.consequent&&m.jsx("div",{className:"agent-detail-flow__consequent",children:m.jsx(Ue,{inline:e.consequent,...t})}),e.body.map((r,i)=>m.jsx(Zr,{block:r,ctx:t,renderNonIf:n},i)),e.elseBody&&e.elseBody.length>0&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"agent-detail-ifcard__else-label",children:m.jsx("span",{className:"agent-detail-flow__kw",children:"Else"})}),m.jsx("div",{className:"agent-detail-ifcard__else-body",children:e.elseBody.map((r,i)=>m.jsx(Zr,{block:r,ctx:t,renderNonIf:n},`e-${i}`))})]})]})}function _3(e){const t=r=>{if(r.group){const s=r.group.map((l,a)=>a===0?t(l):`${l.joiner==="or"?"Or":"And"} ${t(l)}`).join(" ");return`${r.negate?"Not ":""}(${s})`}const i=r.left;if(!r.right&&!r.rightIsString)return`${r.negate?"Not ":""}${i}`;const o=r.rightIsString?`"${r.right}"`:r.right;return`${r.negate?"Not ":""}${i} ${y3(r.op)} ${o}`};return`If ${e.clauses.map((r,i)=>i===0?t(r):`${r.joiner==="or"?"Or":"And"} ${t(r)}`).join(" ")}`}const __=J.memo(function({block:t,ctx:n,renderNonIf:r}){const i=V.useId(),[o,s]=Xc(i);return t.clauses.some(a=>Kc(a,n.variableTypes))?m.jsxs("div",{className:`agent-detail-ifcard${o?" agent-detail-ifcard--open":""}`,children:[m.jsxs("button",{type:"button",className:"agent-detail-ifcard__header","aria-expanded":o,onClick:s,children:[m.jsx("span",{className:"agent-detail-ifcard__chevron","aria-hidden":!0,children:m.jsx(Kr,{})}),m.jsx(E3,{clauses:t.clauses,ctx:n})]}),o&&m.jsx(C3,{block:t,ctx:n,renderNonIf:r})]}):m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"agent-detail-flow__prose",children:m.jsx(Ue,{inline:$e(_3(t)),...n})}),t.consequent&&m.jsx("p",{className:"agent-detail-flow__prose",children:m.jsx(Ue,{inline:t.consequent,...n})}),t.body.map((a,u)=>m.jsx(Zr,{block:a,ctx:n,renderNonIf:r},u)),t.elseBody&&t.elseBody.length>0&&m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"agent-detail-flow__prose",children:"Else"}),t.elseBody.map((a,u)=>m.jsx(Zr,{block:a,ctx:n,renderNonIf:r},`e-${u}`))]})]})}),E_=J.memo(function({block:t,ctx:n,renderNonIf:r}){const i=V.useId(),[o,s]=Xc(i);return t.clauses.some(a=>Kc(a,n.variableTypes))?m.jsxs(m.Fragment,{children:[m.jsxs("button",{type:"button",className:"agent-detail-ifcard__header agent-detail-ifcard__header--nested","aria-expanded":o,onClick:s,children:[m.jsx("span",{className:"agent-detail-ifcard__chevron","aria-hidden":!0,children:m.jsx(Kr,{})}),m.jsx(E3,{clauses:t.clauses,ctx:n})]}),o&&m.jsx(C3,{block:t,ctx:n,renderNonIf:r})]}):m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"agent-detail-flow__prose",children:m.jsx(Ue,{inline:$e(_3(t)),...n})}),t.consequent&&m.jsx("p",{className:"agent-detail-flow__prose",children:m.jsx(Ue,{inline:t.consequent,...n})}),t.body.map((a,u)=>m.jsx(Zr,{block:a,ctx:n,renderNonIf:r},u)),t.elseBody&&t.elseBody.length>0&&m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"agent-detail-flow__prose",children:"Else"}),t.elseBody.map((a,u)=>m.jsx(Zr,{block:a,ctx:n,renderNonIf:r},`e-${u}`))]})]})});function E3({clauses:e,ctx:t}){return m.jsxs("span",{className:"agent-detail-clauses",children:[m.jsx("span",{className:"agent-detail-flow__kw",children:"If"}),m.jsx(k3,{clauses:e,ctx:t})]})}function k3({clauses:e,ctx:t}){return m.jsx(m.Fragment,{children:e.map((n,r)=>m.jsxs(J.Fragment,{children:[n.joiner&&m.jsx("span",{className:"agent-detail-clauses__joiner",children:n.joiner==="and"?"And":"Or"}),m.jsx(k_,{clause:n,ctx:t})]},r))})}function k_({clause:e,ctx:t}){if(e.group)return m.jsxs("span",{className:"agent-detail-clause agent-detail-clause--group",children:[e.negate&&m.jsx("span",{className:"agent-detail-flow__kw",children:"Not"}),m.jsx("span",{className:"agent-detail-clauses__paren",children:"("}),m.jsx(k3,{clauses:e.group,ctx:t}),m.jsx("span",{className:"agent-detail-clauses__paren",children:")"})]});const n=e.rightIsString||e.right.length>0,r=e.left.startsWith("@"),i=e.left.split(".")[0],o=!r&&Object.prototype.hasOwnProperty.call(t.variableTypes,i),s=!r&&!o;return m.jsxs("span",{className:"agent-detail-clause",children:[e.negate&&m.jsx("span",{className:"agent-detail-flow__kw",children:"Not"}),s?m.jsx("span",{children:e.left}):m.jsx(Ml,{text:e.left,ctx:t}),n&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"agent-detail-flow__op",children:y3(e.op)}),m.jsx(Gc,{text:e.right,isString:e.rightIsString,ctx:t})]})]})}function Zr({block:e,ctx:t,renderNonIf:n}){return e.kind==="if"?m.jsx("div",{className:"agent-detail-ifcard agent-detail-ifcard--nested",children:m.jsx(E_,{block:e,ctx:t,renderNonIf:n})}):m.jsx(m.Fragment,{children:n(e,t)})}const S_=J.memo(function({block:t,ctx:n}){const r=V.useId(),[i,o]=Xc(r),s=t.action.startsWith("@")?t.action:`@actions.${t.action}`,l=t.clauses.length>0;return m.jsxs("div",{className:`agent-detail-runcard${i?" agent-detail-runcard--open":""}`,children:[m.jsxs("button",{type:"button",className:"agent-detail-runcard__header","aria-expanded":i,"aria-controls":l?r:void 0,onClick:o,children:[m.jsx("span",{className:"agent-detail-runcard__chevron","aria-hidden":!0,children:m.jsx(Kr,{})}),m.jsx("span",{className:"agent-detail-kw-badge",children:"Run"}),m.jsx(Zc,{path:s,variableTypes:n.variableTypes,actionTargets:n.actionTargets,actionNames:n.actionNames,onSelectAction:n.onSelectAction,labelByName:n.labelByName})]}),i&&l&&m.jsx("div",{id:r,className:"agent-detail-runcard__body",children:t.clauses.map((a,u)=>m.jsx(N_,{clause:a,ctx:n},u))})]})});function N_({clause:e,ctx:t}){const n=e.kind==="set"&&!e.valueIsString&&typeof e.value=="string"&&/^@outputs\./i.test(e.value.trim()),r=e.kind==="with"?"With input:":e.kind==="set"?n?"Set output:":"Set variable:":"Transition to",i=e.valueIsString?void 0:M_(e.target,e.value,t.variableTypes),o=e.kind==="with",s=e.kind==="set";return m.jsxs("div",{className:`agent-detail-runcard__clause agent-detail-runcard__clause--${e.kind}`,children:[m.jsx("span",{className:"agent-detail-kw-badge",children:r}),m.jsx(Ml,{text:e.target,ctx:t,forceVarKind:i,useDark:o}),e.value!==void 0&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"agent-detail-flow__op",children:"="}),m.jsx(Gc,{text:e.value,isString:e.valueIsString,ctx:t,forceVarKind:i,useDark:s})]})]})}function M_(e,t,n){const r=i=>{if(!i||!i.startsWith("@"))return;const o=ho(i);if(!o||o.namespace!=="variables")return;const s=n[o.root];return s?Jn(s).kind:void 0};return r(e)??r(t)}function I_({block:e,ctx:t}){return m.jsxs("div",{className:"agent-detail-flow__statement",children:[m.jsx("span",{className:"agent-detail-kw-badge",children:"Set variable:"}),m.jsx(Ml,{text:e.target,ctx:t}),m.jsx("span",{className:"agent-detail-flow__op",children:"="}),m.jsx(Gc,{text:e.value,isString:e.valueIsString,ctx:t})]})}function L_({block:e,ctx:t}){const n=/^@?(subagent|topic)\./.test(e.target),r=n?e.target.replace(/^@?(?:subagent|topic)\./,""):e.target;return m.jsxs("div",{className:"agent-detail-flow__statement",children:[m.jsx("span",{className:"agent-detail-kw-badge",children:"Transition to"}),n?m.jsxs("span",{className:"agent-chip agent-chip--subagent",children:[m.jsx("span",{className:"agent-chip__icon","aria-hidden":!0,children:"#"}),t.labelByName.get(r)??Fn(r)]}):m.jsx("span",{className:"agent-chip",children:r})]})}const b_=["h1","h2","h3","h4","h5","h6"];function Of({block:e,ctx:t}){switch(e.kind){case"run":return m.jsx(S_,{block:e,ctx:t});case"set":return m.jsx(I_,{block:e,ctx:t});case"transition":return m.jsx(L_,{block:e,ctx:t});case"header":{const n=Number.isFinite(e.level)?e.level:-1,r=Math.max(1,Math.min(6,n+2|0))-1,i=b_[r];return m.jsx(i,{className:`agent-detail-flow__header agent-detail-flow__header--l${e.level}`,children:m.jsx(Ue,{inline:e.inline,...t})})}case"bullet":return m.jsxs("div",{className:"agent-detail-flow__bullet",children:[m.jsx("span",{className:"agent-detail-flow__bullet-mark","aria-hidden":!0,children:"•"}),m.jsx("span",{children:m.jsx(Ue,{inline:e.inline,...t})})]});case"numbered":return m.jsxs("div",{className:"agent-detail-flow__numbered",children:[m.jsxs("span",{className:"agent-detail-flow__numbered-mark","aria-hidden":!0,children:[e.n,"."]}),m.jsx("span",{children:m.jsx(Ue,{inline:e.inline,...t})})]});case"declaration":return m.jsxs("div",{className:"agent-detail-flow__decl",children:[m.jsxs("span",{className:"agent-detail-flow__decl-label",children:[m.jsx(Ue,{inline:e.label,...t}),":"]}),m.jsx("span",{className:"agent-chip agent-chip--var",children:e.value})]});case"prose":return m.jsx("p",{className:"agent-detail-flow__prose",children:m.jsx(Ue,{inline:e.inline,...t})});case"if":return null;default:Uc(e)}}const S3=V.createContext(null);function yo(){const e=V.useContext(S3);if(!e)throw new Error("useSubagentActions must be used within SubagentActionsContext.Provider");return e}function N3({blocks:e,actionNames:t,labelByName:n,onSelectAction:r,variableTypes:i,actions:o,reasoningActions:s}){const{actionTargets:l}=yo(),a=V.useMemo(()=>({actionNames:t,labelByName:n,onSelectAction:r,variableTypes:i,actionTargets:l}),[t,n,r,i,l]),[u,c]=V.useState(()=>new Set),d=V.useMemo(()=>({isOpen:h=>u.has(h),toggle:h=>c(y=>{const x=new Set(y);return x.has(h)?x.delete(h):x.add(h),x})}),[u]),f=V.useCallback((h,y)=>m.jsx(Of,{block:h,ctx:y}),[]);return m.jsx(x3.Provider,{value:d,children:m.jsx("div",{className:"agent-detail-flow",children:e.map((h,y)=>h.kind==="if"?m.jsx(__,{block:h,ctx:a,renderNonIf:f},y):m.jsx(Of,{block:h,ctx:a},y))})})}function Df({label:e,slot:t,text:n,actions:r,onSelectAction:i,variableTypes:o}){const[s,l]=V.useState(!1),a=V.useMemo(()=>s?h3(n):[],[s,n]),{actionNames:u,labelByName:c,actionTargets:d}=yo(),f=p3(a),h=V.useMemo(()=>s?$e(n):[],[s,n]),y=Wc(t),x=xt(t==="before"?"before-reasoning":"after-reasoning");return m.jsxs("div",{className:`agent-detail-card agent-detail-card--prompt${s?" agent-detail-card--open":""}`,"data-mv-id":y,children:[m.jsxs("button",{type:"button",className:"agent-detail-card__collapsible-header","aria-expanded":s,onClick:()=>l(_=>!_),children:[m.jsx("span",{className:"agent-detail-card__chevron","aria-hidden":!0,children:m.jsx(Kr,{})}),m.jsx("span",{className:"agent-detail-card__badge-text",role:"heading","aria-level":2,"data-mv-id":x,children:e}),Js[e]&&m.jsx(Yc,{tooltip:Js[e]})]}),s&&m.jsx("div",{className:"agent-detail-card__collapsible-body",children:f?m.jsx(N3,{blocks:a,actionNames:u,labelByName:c,onSelectAction:i,variableTypes:o,actions:r}):m.jsx("div",{className:"agent-detail-card__instructions",children:m.jsx(Ue,{inline:h,actionNames:u,labelByName:c,onSelectAction:i,variableTypes:o,actionTargets:d})})})]})}function j_({data:e,flowRefs:t,onSelectStep:n,selectedAction:r}){const{labelByName:i}=yo();return m.jsxs("div",{className:"agent-detail-card agent-detail-card--subagent","data-mv-id":i3(e.apiName),children:[m.jsxs("div",{className:"agent-detail-card__row",children:[m.jsx("span",{className:"agent-detail-card__icon agent-detail-card__icon--subagent","aria-hidden":!0,children:"#"}),m.jsxs("div",{className:"agent-detail-card__heading-group",children:[m.jsx("h1",{className:"agent-detail-card__heading","data-mv-id":xt("subagent-role"),children:e.label}),m.jsx("div",{className:"agent-detail-card__subheading",children:e.sourceKeyword==="topic"?"Topic":"Subagent"})]})]}),e.description&&m.jsx("div",{className:"agent-detail-card__description","data-mv-id":o3(),children:e.description}),e.systemInstructions&&m.jsxs("div",{className:"agent-detail-card__system","data-mv-id":s3(),children:[m.jsx("span",{className:"agent-detail-card__system-link",children:"System Instructions"}),m.jsxs("div",{className:"agent-detail-card__system-popover nowheel",role:"tooltip",children:[m.jsx("div",{className:"agent-detail-card__system-popover-title",children:"System Instructions"}),m.jsx("pre",{className:"agent-detail-card__system-body",children:e.systemInstructions})]})]}),t.length>1&&m.jsx(T_,{steps:t,labelByName:i,onSelect:n,selectedStep:r})]})}function T_({steps:e,labelByName:t,onSelect:n,selectedStep:r}){return m.jsx("nav",{className:"agent-detail-flowstrip","aria-label":"Reasoning flow",children:m.jsx("ol",{className:"agent-detail-flowstrip__list",children:e.map((i,o)=>{const s=i===r;return m.jsxs("li",{className:"agent-detail-flowstrip__item",children:[o>0&&m.jsx("span",{className:"agent-detail-flowstrip__arrow","aria-hidden":!0,children:"→"}),m.jsxs("button",{type:"button",className:`agent-detail-flowstrip__step${s?" agent-detail-flowstrip__step--current":""}`,onClick:()=>{s||n(i)},title:`Jump to ${i}`,"aria-label":`Jump to ${i}`,"aria-current":s?"step":void 0,children:[m.jsx("span",{className:"agent-detail-flowstrip__index",children:o+1}),t.get(i)??Fn(i)]})]},`${i}-${o}`)})})})}const M3=/^@actions?\.([\w.]+)$/;function P_({reasoning:e,blocks:t,actions:n,onSelectAction:r,onClearAction:i,variableTypes:o,selectedAction:s}){const{actionNames:l,labelByName:a,actionTargets:u}=yo(),[c,d]=V.useState(!1),f=p3(t),h=V.useMemo(()=>c&&e.instructions?$e(e.instructions):[],[c,e.instructions]);return m.jsxs("div",{className:`agent-detail-card agent-detail-card--reasoning${c?" agent-detail-card--open":""}`,"data-mv-id":e.instructions?Wc("reasoning"):void 0,children:[m.jsxs("button",{type:"button",className:"agent-detail-card__collapsible-header","aria-expanded":c,onClick:()=>d(y=>!y),children:[m.jsx("span",{className:"agent-detail-card__chevron","aria-hidden":!0,children:m.jsx(Kr,{})}),m.jsx("span",{className:"agent-detail-card__badge-text",role:"heading","aria-level":2,"data-mv-id":e.instructions?xt("reasoning"):void 0,children:"REASONING"}),m.jsx(Yc,{tooltip:Js.REASONING})]}),c&&m.jsxs("div",{className:"agent-detail-card__collapsible-body",children:[e.instructions&&(f?m.jsx(N3,{blocks:t,actionNames:l,labelByName:a,onSelectAction:r,variableTypes:o,actions:n,reasoningActions:e.actions}):m.jsx("div",{className:"agent-detail-card__instructions",children:m.jsx(Ue,{inline:h,actionNames:l,labelByName:a,onSelectAction:r,variableTypes:o,actionTargets:u})})),e.actionRefs&&e.actionRefs.length>0&&m.jsx(A_,{actionRefs:e.actionRefs,variableTypes:o,selectedAction:s,onSelect:r,onClear:i})]})]})}function A_({actionRefs:e,variableTypes:t,selectedAction:n,onSelect:r,onClear:i}){const{labelByName:o,actionTargets:s,actionNames:l}=yo();return m.jsxs("div",{className:"agent-detail-reasoning-actions",children:[m.jsx("div",{className:"agent-detail-reasoning-actions__header",children:m.jsx("span",{className:"agent-detail-reasoning-actions__label","data-mv-id":xt("reasoning-actions"),children:"ACTIONS AVAILABLE FOR REASONING"})}),m.jsx("div",{className:"agent-detail-actions-pills",children:e.map(a=>{const u=a.startsWith("@")?a:`@actions.${a}`,c=ho(u);let d=c==null?void 0:c.root;if(c){const x=s[c.root],_=x==null?void 0:x.match(M3);_&&(d=_[1].split(".")[0])}const f=!!d&&l.has(d),h=f&&d===n,y=f?`agent-detail-actions-pill${h?" agent-detail-actions-pill--selected":""}`:"agent-detail-actions-pill agent-detail-actions-pill--static";return m.jsx(R_,{isClickable:f,pillClass:y,isSelected:h,actionName:d,mvId:a3(a),onSelect:r,onClear:i,children:m.jsx($_,{path:u,variableTypes:t,actionTargets:s,labelByName:o})},a)})})]})}function R_({isClickable:e,pillClass:t,isSelected:n,actionName:r,mvId:i,onSelect:o,onClear:s,children:l}){return e?m.jsxs("button",{type:"button",className:t,"data-mv-id":i,onClick:r?()=>o(r):void 0,"aria-pressed":n,children:[l,n&&r&&m.jsx("button",{type:"button",className:"agent-detail-actions-pill__clear","aria-label":"Clear selection",onClick:a=>{a.stopPropagation(),s()},children:m.jsx("span",{"aria-hidden":!0,children:"×"})})]}):m.jsx("span",{className:t,"data-mv-id":i,children:l})}function $_({path:e,variableTypes:t,actionTargets:n,labelByName:r}){const i=ho(e);if(!i)return m.jsx("span",{className:"agent-detail-actions-pill__label",children:Fn(e)});const o=i.namespace==="actions"||i.namespace==="action",s=i.namespace==="variables"||i.namespace==="system_variables";let l=i;if(o){const u=n[i.root],c=u==null?void 0:u.match(M3);if(c){const d=c[1],f=d.split(".")[0];l={namespace:i.namespace,root:f,path:d}}}const a=o?r.get(l.root)??Fn(l.path):Fn(i.path);if(o){const u=mo(n[l.root]),c=po(u.kind);return m.jsxs(m.Fragment,{children:[m.jsx("span",{className:`agent-detail-actions-pill__icon agent-detail-actions-pill__icon--${u.kind} agent-detail-actions-pill__icon--svg`,"aria-hidden":!0,children:m.jsx(c,{size:18})}),m.jsx("span",{className:"agent-detail-actions-pill__label",children:a})]})}if(s){const u=i.namespace==="system_variables"?{kind:"system"}:Jn(t[i.root]),c=go(u.kind);return m.jsxs(m.Fragment,{children:[m.jsx("span",{className:`agent-detail-actions-pill__icon agent-detail-actions-pill__icon--var var-${u.kind} agent-detail-actions-pill__icon--svg`,"aria-hidden":!0,children:m.jsx(c,{size:18})}),m.jsx("span",{className:"agent-detail-actions-pill__label",children:a})]})}return m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"agent-detail-actions-pill__icon agent-detail-actions-pill__icon--standard-invocable","aria-hidden":!0,children:"⚡"}),m.jsx("span",{className:"agent-detail-actions-pill__label",children:a})]})}function O_(e){const t=new Map;for(const n of e)t.set(n.name,n.label??Fn(n.name));return t}function D_(e,t){const n=Object.create(null);for(const r of t??[])r.target&&(n[r.name]=r.target);for(const r of e)r.target&&(n[r.name]=r.target);return n}function V_(e){const t=Object.create(null);if(e)for(const n of Object.keys(e))t[n]=e[n];return t}const z_={flow:"Flow",apex:"Apex",prompt:"Prompt Template",knowledge:"Knowledge",retriever:"Retriever",mcp:"MCP Tool",mulesoft:"MuleSoft",placeholder:"Placeholder",quickaction:"Quick Action",runexpressionset:"Expression Set",external:"External Service",transition:"Transition","standard-invocable":"Standard",escalate:"Escalate","end-session":"End Session",subagent:"Subagent Transfer","subagent-util":"Subagent Transfer","connected-subagent":"Connected Subagent"},H_={string:"String",number:"Number",boolean:"Boolean",date:"Date",timestamp:"Timestamp",id:"ID",object:"Object",array:"List",currency:"Currency",knowledge:"Knowledge",system:"System"};function Vf(e){return e.split(/[-_]/g).map(t=>t.length>0?t[0].toUpperCase()+t.slice(1):t).join(" ")}function F_(e,t){const n=new Set;for(const a of[...e,...t]){if(!a.target)continue;const u=mo(a.target).kind;u==="ref"||u==="setvar"||n.add(u)}const r=new Set;for(const a of[...e,...t])for(const u of[...a.inputs,...a.outputs]){const c=w3(u.type);c&&c!=="unknown"&&r.add(c)}const i=(a,u)=>({key:`section:${a}`,icon:m.jsx("span",{className:"agent-legend__section-icon","aria-hidden":!0}),label:m.jsx("span",{className:"agent-legend__section",children:u})}),o=[i("type","Type"),{key:"subagent-header",icon:m.jsx("span",{className:"agent-legend__avatar agent-legend__avatar--subagent","aria-hidden":!0,children:"#"}),label:"Subagent/Topic"}],s=Array.from(n).sort();s.length>0&&o.push(i("action","Action"));for(const a of s){const u=po(a);o.push({key:`action:${a}`,icon:m.jsx("span",{className:`agent-legend__glyph agent-detail-actions-pill__icon agent-detail-actions-pill__icon--${a} agent-detail-actions-pill__icon--svg`,"aria-hidden":!0,children:m.jsx(u,{size:14})}),label:z_[a]??Vf(a)})}const l=Array.from(r).sort();l.length>0&&o.push(i("variable","Variable"));for(const a of l){const u=go(a);o.push({key:`var:${a}`,icon:m.jsx("span",{className:"agent-legend__glyph agent-detail-param-pill__icon agent-detail-param-pill__icon--svg","aria-hidden":!0,children:m.jsx(u,{size:14})}),label:H_[a]??Vf(a)})}return o}function B_({data:e}){const{subagent:t,actions:n,variableTypes:r,reasoningBlocks:i,flowRefs:o,selectedAction:s,selectedActionDetail:l,selectAction:a,clearAction:u}=e;return m.jsxs("div",{className:"agent-detail-overlay__stage",children:[m.jsxs("div",{className:"agent-detail-overlay__cards",children:[m.jsx(j_,{data:t,flowRefs:o,onSelectStep:a,selectedAction:s}),n.length>0&&m.jsx(x_,{actions:n,selectedAction:s,onSelect:a,onClear:u}),t.beforeReasoning&&m.jsx(Df,{label:"BEFORE REASONING",slot:"before",text:t.beforeReasoning,actions:n,onSelectAction:a,variableTypes:r}),t.reasoning&&m.jsx(P_,{reasoning:t.reasoning,blocks:i,actions:n,onSelectAction:a,onClearAction:u,variableTypes:r,selectedAction:s}),t.afterReasoning&&m.jsx(Df,{label:"AFTER REASONING",slot:"after",text:t.afterReasoning,actions:n,onSelectAction:a,variableTypes:r})]}),l&&m.jsx("div",{className:"agent-detail-overlay__side",children:m.jsx(C_,{action:l,onClose:u})})]})}const W_={detailCards:B_};function U_({fitKey:e,disabled:t}){const{fitView:n}=fo(),r=J.useRef(!0);return V.useEffect(()=>{if(r.current){r.current=!1;return}const i=requestAnimationFrame(()=>{n({padding:.15,duration:t?0:250,maxZoom:1})});return()=>cancelAnimationFrame(i)},[e,t,n]),null}function Z_({subagent:e,onBack:t,filePath:n,vibeEditEnabled:r=!1}){var b,$,S;const i=(e==null?void 0:e.actions)??[],[o,s]=V.useState(null),l=V.useMemo(()=>r&&e?qx(e,n):[],[r,e,n]),{toggleButton:a,overlay:u,panel:c}=sh({nodes:l,options:{...I3,onActivate:N=>{const I=l.find(R=>R.id===N);(I==null?void 0:I.type)==="action"&&s(I.apiName)}}}),d=V.useMemo(()=>V_(e==null?void 0:e.variableTypes),[e==null?void 0:e.variableTypes]),f=J.useRef(null),h=J.useRef(null),y=J.useRef(null),x=J.useRef(null),_=J.useRef(null),v=J.useRef(null);v.current=o;const[p,g]=V.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1);V.useEffect(()=>{const N=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null;if(!N)return;const I=R=>g(R.matches);return N.addEventListener("change",I),()=>N.removeEventListener("change",I)},[]),V.useEffect(()=>{s(null)},[e]);const w=J.useRef(null);V.useEffect(()=>{var I;w.current!==null&&o===null&&((I=f.current)==null||I.focus()),w.current=o},[o]),V.useEffect(()=>{if(!e)return;_.current=document.activeElement,(()=>{var Z;const R=f.current;R==null||R.focus(),document.activeElement===R||((Z=h.current)==null?void 0:Z.contains(document.activeElement))||requestAnimationFrame(()=>{var H,W;const A=f.current;A==null||A.focus(),document.activeElement===A||((H=h.current)==null?void 0:H.contains(document.activeElement))||(W=y.current)==null||W.focus()})})();const I=R=>{var B,Z,A,M;if(R.key==="Escape"){R.stopPropagation(),v.current!==null?s(null):t();return}if(R.key==="Tab"){const H=document.activeElement;if(!((B=h.current)==null?void 0:B.contains(H))){R.preventDefault(),(Z=R.shiftKey?x.current:f.current)==null||Z.focus();return}R.shiftKey&&H===y.current?(R.preventDefault(),(A=x.current)==null||A.focus()):!R.shiftKey&&H===x.current&&(R.preventDefault(),(M=y.current)==null||M.focus())}};return window.addEventListener("keydown",I),()=>{window.removeEventListener("keydown",I);const R=_.current;R&&typeof R.focus=="function"&&document.contains(R)&&R.focus()}},[e,t]);const k=V.useMemo(()=>{var N;return(N=e==null?void 0:e.reasoning)!=null&&N.instructions?h3(e.reasoning.instructions):[]},[(b=e==null?void 0:e.reasoning)==null?void 0:b.instructions]),C=($=e==null?void 0:e.reasoning)==null?void 0:$.actions,L=V.useMemo(()=>({actionNames:new Set(i.map(N=>N.name)),labelByName:O_(i),actionTargets:D_(i,C)}),[i,C]),T=V.useMemo(()=>cC(k,L.actionNames),[k,L]),F=J.useCallback(N=>{s(N)},[]),P=J.useCallback(()=>s(null),[]),j=((S=e==null?void 0:e.reasoning)==null?void 0:S.actions)??[],D=V.useMemo(()=>F_(i,j),[i,j]),z=o?i.find(N=>N.name===o)??j.find(N=>N.name===o)??null:null,E=V.useMemo(()=>e?[{id:"detail-cards",type:"detailCards",position:{x:0,y:0},draggable:!1,selectable:!1,focusable:!1,data:{subagent:e,actions:i,variableTypes:d,reasoningBlocks:k,flowRefs:T,selectedAction:o,selectedActionDetail:z,selectAction:F,clearAction:P},className:"agent-detail-overlay__card-node nodrag"}]:[],[e,i,d,k,T,o,z,F,P]);if(!e)return null;const O=`${e.label}::${z?z.name:"-"}`;return m.jsx(S3.Provider,{value:L,children:m.jsxs("div",{ref:h,className:`agent-detail-overlay${z?" agent-detail-overlay--with-side":""}`,role:"dialog","aria-modal":"true","aria-label":`Subagent details: ${e.label}`,children:[m.jsx("span",{ref:y,tabIndex:0,style:{position:"absolute",width:"1px",height:"1px",opacity:0,clip:"rect(0 0 0 0)",overflow:"hidden"},"aria-hidden":"true"}),m.jsxs("header",{className:"agent-detail-overlay__header",children:[m.jsxs("button",{ref:f,type:"button",className:"agent-detail-overlay__back","aria-label":"Back to graph",onClick:t,children:[m.jsx("span",{"aria-hidden":!0,children:"←"})," Go Back"]}),m.jsx("span",{className:"agent-detail-overlay__breadcrumb","aria-hidden":!0,children:"›"}),m.jsx("h1",{className:"agent-detail-overlay__title",children:e.label}),m.jsx("div",{className:"agent-detail-overlay__vibe-toggle",children:a})]}),m.jsxs("div",{className:"agent-detail-overlay__canvas",children:[u,m.jsx(Fc,{children:m.jsxs(Zp,{nodes:E,edges:[],nodeTypes:W_,colorMode:"system",fitView:!0,fitViewOptions:{padding:.15,maxZoom:1,duration:p?0:void 0},nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,edgesFocusable:!1,elementsSelectable:!1,panOnDrag:!0,panOnScroll:!0,zoomOnScroll:!1,zoomOnPinch:!0,zoomOnDoubleClick:!1,minZoom:.4,maxZoom:2,proOptions:{hideAttribution:!0},"aria-label":"Subagent detail canvas — drag or wheel to pan, pinch or +/- to zoom",children:[m.jsx(Gp,{variant:$t.Dots,gap:20,size:1.5,color:"var(--mv-canvas-grid)",bgColor:"var(--mv-canvas-bg)"}),m.jsx(Qp,{legend:m.jsx(qp,{items:D})}),m.jsx(U_,{fitKey:O,disabled:p})]})})]}),m.jsx("span",{ref:x,tabIndex:0,style:{position:"absolute",width:"1px",height:"1px",opacity:0,clip:"rect(0 0 0 0)",overflow:"hidden"},"aria-hidden":"true"}),c]})})}const I3={selectLabel:"Select to Edit",selectingLabel:"Selecting…"};function Y_({data:e,selectableNodes:t}){const[n,r]=V.useState(null),i=V.useMemo(()=>{const f=new Map;for(const h of e.graph.nodes)h.data.nodeType==="subagent"&&f.set(h.id,h.data);return f},[e]),{toggleButton:o,overlay:s,panel:l,selectMode:a}=sh({nodes:t??[],options:{...I3,onActivate:f=>{const h=i.get(f);h&&r(h)}}}),u=V.useCallback(f=>{a||r(f)},[a]),c=V.useCallback(()=>r(null),[]),d=n!==null;return m.jsxs("div",{className:"agent-app",children:[m.jsx("div",{className:"agent-app__vibe-toggle",children:o}),s,m.jsx("div",{className:"agent-app__graph","aria-hidden":d?!0:void 0,inert:d?"":void 0,children:m.jsx(aC,{graph:e.graph,emptyMessage:"No agent definition to visualize.",onSubagentClick:u})}),l,n&&m.jsx(Z_,{subagent:n,onBack:c,filePath:e.filePath,vibeEditEnabled:((t==null?void 0:t.length)??0)>0},n.label)]})}Cg({pluginName:"Agent",rootClass:"agent-app",expectedSourceKind:"file",render:(e,t)=>m.jsx(Y_,{data:e,selectableNodes:t.selectableNodes}),validateData:e=>!(e!=null&&e.graph)||!Array.isArray(e.graph.nodes)?"Agent script data is missing pre-built graph":null});export{G_ as A,J as R,Vg as S,V as r};
|